Skip to content

Commit c520dae

Browse files
committed
build(component-builder): legacy builder clean-up unused plugins
1 parent 4c1c959 commit c520dae

File tree

199 files changed

+1622
-3544
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+1622
-3544
lines changed

.storybook/main.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,7 @@ module.exports = {
132132
loader: "postcss-loader",
133133
options: {
134134
implementation: require("postcss"),
135-
postcssOptions: {
136-
config: resolve(__dirname, "postcss.config.js"),
137-
},
135+
sourceMap: true,
138136
},
139137
},
140138
],
@@ -154,21 +152,13 @@ module.exports = {
154152
},
155153
framework: {
156154
name: "@storybook/web-components-webpack5",
157-
options: {},
158155
},
159156
features: {
160157
/* Code splitting flag; load stories on-demand */
161158
storyStoreV7: true,
162159
/* Builds stories.json to help with on-demand loading */
163160
buildStoriesJson: true,
164161
},
165-
// refs: {
166-
// 'swc': {
167-
// title: 'Spectrum Web Components',
168-
// url: 'https://opensource.adobe.com/spectrum-web-components/storybook/',
169-
// expanded: false,
170-
// },
171-
// },
172162
docs: {
173163
autodocs: true, // see below for alternatives
174164
defaultName: "Docs", // set to change the name of generated docs entries

.storybook/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"@chromaui/addon-visual-tests": "^0.0.124",
2323
"@etchteam/storybook-addon-status": "^4.2.4",
2424
"@spectrum-css/component-builder": "^4.0.19",
25+
"@spectrum-css/component-builder-simple": "^3.0.2",
2526
"@storybook/addon-a11y": "^7.5.1",
2627
"@storybook/addon-actions": "^7.5.1",
2728
"@storybook/addon-console": "^1.2.3",
@@ -44,9 +45,9 @@
4445
"file-loader": "6.2.0",
4546
"lit": "^2.8.0",
4647
"lodash-es": "^4.17.21",
47-
"postcss": "^7.0.36",
48+
"postcss": "^8.4.32",
4849
"postcss-class-prefix": "^0.3.0",
49-
"postcss-loader": "^4.0.0",
50+
"postcss-loader": "^7.3.0",
5051
"postcss-prefix-selector": "^1.16.0",
5152
"postcss-selector-replace": "^1.0.2",
5253
"postcss-warn-cleaner": "^0.1.9",

.storybook/postcss.config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ const { resolve, basename } = require("path");
22
const { existsSync } = require("fs");
33
const warnCleaner = require("postcss-warn-cleaner");
44

5-
const simpleBuilder = require("@spectrum-css/component-builder-simple/css/processors.js");
6-
const legacyBuilder = require("@spectrum-css/component-builder/css/processors.js");
5+
const simpleBuilder = require("@spectrum-css/component-builder-simple/css/postcss.plugins.js");
6+
const legacyBuilder = require("@spectrum-css/component-builder/css/postcss.plugins.js");
77

88
/**
99
* Determines the package name from a file path
@@ -76,12 +76,12 @@ module.exports = (ctx) => {
7676
if (
7777
deps.includes("@spectrum-css/vars")
7878
) {
79-
plugins.push(...legacyBuilder.processors);
79+
plugins.push(...legacyBuilder.plugins);
8080
} else {
8181
if (ctx.file.split("/").includes("themes")) {
82-
plugins.push(...simpleBuilder.getProcessors({ noSelectors: false }));
82+
plugins.push(...simpleBuilder.getPlugins({ noSelectors: false }));
8383
} else {
84-
plugins.push(...simpleBuilder.getProcessors());
84+
plugins.push(...simpleBuilder.plugins);
8585
}
8686
}
8787
}

.storybook/preview.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export const parameters = {
220220
page: DocumentationTemplate,
221221
story: {
222222
inline: true,
223-
iframeHeight: "200px",
223+
height: "200px",
224224
},
225225
source: {
226226
type: "dynamic",
@@ -230,10 +230,20 @@ export const parameters = {
230230
status: {
231231
statuses: {
232232
migrated: {
233-
background: "#f0f0f0",
234-
color: "#444",
233+
background: "rgb(0,122,77)",
234+
color: "#fff",
235235
description: "Migrated to the latest tokens.",
236236
},
237+
legacy: {
238+
background: "rgb(246,133,17)",
239+
color: "#fff",
240+
description: "Not yet migrated to the latest tokens.",
241+
},
242+
deprecated: {
243+
background: "rgb(211,21,16)",
244+
color: "#fff",
245+
description: "Should not be used and will not receive updates.",
246+
},
237247
},
238248
},
239249
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

components/asset/index.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,16 @@ governing permissions and limitations under the License.
3333
max-inline-size: var(--spectrum-asset-icon-max-width);
3434
margin: var(--spectrum-asset-icon-margin);
3535
}
36+
37+
.spectrum-Asset-folderBackground {
38+
fill: var(--spectrum-asset-folder-background-color);
39+
}
40+
41+
.spectrum-Asset-fileBackground {
42+
fill: var(--spectrum-asset-file-background-color);
43+
}
44+
45+
.spectrum-Asset-folderOutline,
46+
.spectrum-Asset-fileOutline {
47+
fill: var(--spectrum-asset-icon-outline-color);
48+
}
File renamed without changes.

components/asset/postcss.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require("@spectrum-css/component-builder/postcss.config.js");

components/asset/skin.css

Lines changed: 0 additions & 31 deletions
This file was deleted.

components/asset/stories/template.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { classMap } from "lit/directives/class-map.js";
33
import { ifDefined } from "lit/directives/if-defined.js";
44

55
import "../index.css";
6-
import "../skin.css";
76

87
export const Template = ({
98
rootClass = "spectrum-Asset",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

components/cyclebutton/index.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@ governing permissions and limitations under the License.
1111
*/
1212

1313
.spectrum-CycleButton {
14+
--spectrum-actionbutton-m-icononly-padding-left: var(--spectrum-global-dimension-size-85);
15+
--spectrum-actionbutton-m-icononly-padding-right: var(--spectrum-global-dimension-size-85);
16+
1417
/* Be square */
1518
padding-block: 0;
1619
padding-inline: var(--spectrum-actionbutton-m-icononly-padding-left) var(--spectrum-actionbutton-m-icononly-padding-right);
20+
1721
.spectrum-CycleButton-item:not(.is-selected) {
1822
display: none
1923
}
File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require("@spectrum-css/component-builder/postcss.config.js");

components/cyclebutton/skin.css

Lines changed: 0 additions & 11 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

components/icon/icons.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ governing permissions and limitations under the License.
1212

1313
.spectrum-Icon,
1414
.spectrum-UIIcon {
15+
--spectrum-alias-workflow-icon-size-s: var(--spectrum-global-dimension-size-200);
16+
--spectrum-alias-workflow-icon-size-m: var(--spectrum-global-dimension-size-225);
17+
--spectrum-alias-workflow-icon-size-xl: var(--spectrum-global-dimension-size-275);
18+
--spectrum-alias-ui-icon-triplegripper-size-100-height: var(--spectrum-global-dimension-size-100);
19+
--spectrum-alias-ui-icon-doublegripper-size-100-width: var(--spectrum-global-dimension-size-200);
20+
--spectrum-alias-ui-icon-singlegripper-size-100-width: var(--spectrum-global-dimension-size-300);
21+
--spectrum-alias-ui-icon-cornertriangle-size-75: var(--spectrum-global-dimension-size-65);
22+
--spectrum-alias-ui-icon-cornertriangle-size-200: var(--spectrum-global-dimension-size-75);
23+
--spectrum-alias-ui-icon-asterisk-size-75: var(--spectrum-global-dimension-static-size-100);
24+
--spectrum-alias-ui-icon-asterisk-size-100: var(--spectrum-global-dimension-size-100);
25+
1526
display: inline-block;
1627

1728
/* Use custom pass through or inherit the text color */
@@ -28,6 +39,7 @@ governing permissions and limitations under the License.
2839
/* Don't catch clicks or hover, otherwise they may not escape the SVG */
2940
pointer-events: none;
3041
}
42+
3143
@media (forced-colors: active) {
3244
.spectrum-Icon,
3345
.spectrum-UIIcon {
File renamed without changes.

components/icon/postcss.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require("@spectrum-css/component-builder/postcss.config.js");

components/icon/ui-icons.css

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ governing permissions and limitations under the License.
1616
.spectrum-UIIcon--large {
1717
display: none;
1818
}
19+
1920
.spectrum-UIIcon--medium {
2021
display: inline;
2122
}
@@ -25,26 +26,29 @@ governing permissions and limitations under the License.
2526
.spectrum-UIIcon--medium {
2627
display: none;
2728
}
29+
2830
.spectrum-UIIcon--large {
2931
display: inline;
3032
}
3133
}
3234

3335
/* Hide UI icons on browsers that implement SVG 2 correctly (Firefox 56+) */
3436
.spectrum--large {
35-
x--ui-icon-large-display: block;
36-
x--ui-icon-medium-display: none;
37+
--ui-icon-large-display: block;
38+
--ui-icon-medium-display: none;
3739
}
40+
3841
.spectrum--medium {
39-
x--ui-icon-medium-display: block;
40-
x--ui-icon-large-display: none;
42+
--ui-icon-medium-display: block;
43+
--ui-icon-large-display: none;
4144
}
4245

4346
.spectrum-UIIcon--large {
44-
display: xvar(--ui-icon-large-display);
47+
display: var(--ui-icon-large-display);
4548
}
49+
4650
.spectrum-UIIcon--medium {
47-
display: xvar(--ui-icon-medium-display);
51+
display: var(--ui-icon-medium-display);
4852
}
4953

5054
%spectrum-UIIcon--rotation90 {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)