Skip to content

Commit dc5167c

Browse files
authored
chore: run formatting on all packages as a refresh (#3588)
1 parent 95db2c4 commit dc5167c

File tree

13 files changed

+96
-91
lines changed

13 files changed

+96
-91
lines changed

.storybook/CHANGELOG.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010

1111
### Patch Changes
1212

13-
- [#3528](https://github.com/adobe/spectrum-css/pull/3528) [`bee70fb`](https://github.com/adobe/spectrum-css/commit/bee70fbab5f12b49ce2611366b614c75277e0aa9) Thanks [@castastrophe](https://github.com/castastrophe)!
13+
- [#3528](https://github.com/adobe/spectrum-css/pull/3528) [`bee70fb`](https://github.com/adobe/spectrum-css/commit/bee70fbab5f12b49ce2611366b614c75277e0aa9) Thanks [@castastrophe](https://github.com/castastrophe)!
1414
- Update fetchToken to use the exported JSON from @spectrum-css/tokens instead of @adobe/spectrum-tokens
1515

16-
- [#3541](https://github.com/adobe/spectrum-css/pull/3541) [`1a3245c`](https://github.com/adobe/spectrum-css/commit/1a3245c3a660bc52ed260f18b6cceab5ee81541d) Thanks [@castastrophe](https://github.com/castastrophe)!
16+
- [#3541](https://github.com/adobe/spectrum-css/pull/3541) [`1a3245c`](https://github.com/adobe/spectrum-css/commit/1a3245c3a660bc52ed260f18b6cceab5ee81541d) Thanks [@castastrophe](https://github.com/castastrophe)!
1717
- Dependency alignment across the project.
1818

1919
Set component peerDependencies as optional to reduce console warnings on downstream projects.
@@ -33,23 +33,23 @@
3333

3434
### Major Changes
3535

36-
- [#2786](https://github.com/adobe/spectrum-css/pull/2786) [`6c19fcf`](https://github.com/adobe/spectrum-css/commit/6c19fcf3f0eda76987f338981ae20f9999febce6) Thanks [@pfulton](https://github.com/pfulton)!
36+
- [#2786](https://github.com/adobe/spectrum-css/pull/2786) [`6c19fcf`](https://github.com/adobe/spectrum-css/commit/6c19fcf3f0eda76987f338981ae20f9999febce6) Thanks [@pfulton](https://github.com/pfulton)!
3737

3838
#### Breaking change
3939

40-
This update removes the previously deprecated component documentation for **cyclebutton**, **quickaction**, **searchwithin**, and **splitbutton**.
40+
This update removes the previously deprecated component documentation for **cyclebutton**, **quickaction**, **searchwithin**, and **splitbutton**.
4141

42-
To support the Spectrum 2 (S2) Foundations release, Storybook has been updated to toggle token packages to connect the following labels with their appropriate data sources:
42+
To support the Spectrum 2 (S2) Foundations release, Storybook has been updated to toggle token packages to connect the following labels with their appropriate data sources:
4343

44-
- **Spectrum 1**: Flagged as the "legacy" context, this version is no longer the default for the component contexts. When selected, Storybook will load the `@spectrum-css/tokens` at release `v14.6.0` and attach the `.spectrum--legacy` class to the container.
45-
- **Spectrum 2**: The new default context, this version represents the "S2 Foundations" release which serves as a bridge between S1 and S2. Components in this context are not fully S2 and will not exactly match specifications but they do reflect a significant move toward the S2 designs. For full details, see the token and component-level changelogs.
46-
- **Express**: This now deprecated context is still rendered in Storybook by leveraging the `@spectrum-css/tokens` at release `v14.6.0`. Please note that Express and S1 will be removed in the next major release.
44+
- **Spectrum 1**: Flagged as the "legacy" context, this version is no longer the default for the component contexts. When selected, Storybook will load the `@spectrum-css/tokens` at release `v14.6.0` and attach the `.spectrum--legacy` class to the container.
45+
- **Spectrum 2**: The new default context, this version represents the "S2 Foundations" release which serves as a bridge between S1 and S2. Components in this context are not fully S2 and will not exactly match specifications but they do reflect a significant move toward the S2 designs. For full details, see the token and component-level changelogs.
46+
- **Express**: This now deprecated context is still rendered in Storybook by leveraging the `@spectrum-css/tokens` at release `v14.6.0`. Please note that Express and S1 will be removed in the next major release.
4747

48-
This release also includes:
48+
This release also includes:
4949

50-
- New migration documentation for S1 -> S2 updates
51-
- Fix for the duplicate line numbers in the code preview plugin
52-
- Updated styles to integrate Spectrum styling into the Storybook UI
50+
- New migration documentation for S1 -> S2 updates
51+
- Fix for the duplicate line numbers in the code preview plugin
52+
- Updated styles to integrate Spectrum styling into the Storybook UI
5353

5454
#### Patch Changes
5555

@@ -61,7 +61,7 @@
6161

6262
### Patch Changes
6363

64-
- [#3522](https://github.com/adobe/spectrum-css/pull/3522) [`7a47c22`](https://github.com/adobe/spectrum-css/commit/7a47c2266b6d0e8c99061fe85cba8d52684bae39) Thanks [@castastrophe](https://github.com/castastrophe)!
64+
- [#3522](https://github.com/adobe/spectrum-css/pull/3522) [`7a47c22`](https://github.com/adobe/spectrum-css/commit/7a47c2266b6d0e8c99061fe85cba8d52684bae39) Thanks [@castastrophe](https://github.com/castastrophe)!
6565
- Minor storybook updates and fixes including some whitespace changes.
6666

6767
A bug was fixed with the HTML code preview that was displaying duplicate line numbers.
@@ -86,7 +86,7 @@
8686

8787
### Major Changes
8888

89-
- [#3458](https://github.com/adobe/spectrum-css/pull/3458) [`e1b7102`](https://github.com/adobe/spectrum-css/commit/e1b71027f92ce18feb3a63c100d2b4871fc73b9f) Thanks [@castastrophe](https://github.com/castastrophe)!
89+
- [#3458](https://github.com/adobe/spectrum-css/pull/3458) [`e1b7102`](https://github.com/adobe/spectrum-css/commit/e1b71027f92ce18feb3a63c100d2b4871fc73b9f) Thanks [@castastrophe](https://github.com/castastrophe)!
9090
- Update the Chromatic add-on to the currently maintained package:
9191

9292
- from "@chromaui/addon-visual-tests": "^1.0.0"
@@ -100,14 +100,14 @@
100100

101101
### Patch Changes
102102

103-
- [#3440](https://github.com/adobe/spectrum-css/pull/3440) [`6808c85`](https://github.com/adobe/spectrum-css/commit/6808c85295d472286c0a52e28d2279b2b5a16f92) Thanks [@castastrophe](https://github.com/castastrophe)!
103+
- [#3440](https://github.com/adobe/spectrum-css/pull/3440) [`6808c85`](https://github.com/adobe/spectrum-css/commit/6808c85295d472286c0a52e28d2279b2b5a16f92) Thanks [@castastrophe](https://github.com/castastrophe)!
104104
- Fix an issue where "show code" was blocking loading in Storybook docs pages [CSS-1070]
105105

106106
## 10.12.0
107107

108108
### Minor Changes
109109

110-
- [#3477](https://github.com/adobe/spectrum-css/pull/3477) [`d52c701`](https://github.com/adobe/spectrum-css/commit/d52c70196bf2d17433c239313a82f00f75d77e79) Thanks [@castastrophe](https://github.com/castastrophe)!
110+
- [#3477](https://github.com/adobe/spectrum-css/pull/3477) [`d52c701`](https://github.com/adobe/spectrum-css/commit/d52c70196bf2d17433c239313a82f00f75d77e79) Thanks [@castastrophe](https://github.com/castastrophe)!
111111
- Update Storybook to leverage the new CSS bundled assets.
112112

113113
### Patch Changes

.storybook/decorators/context.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const withContextWrapper = makeDecorator({
6565
// Check if the container is a testing wrapper to prevent applying colors around the testing grid
6666
const isTestingWrapper = isTesting ? container.matches("body:has([data-testing-preview]),[data-testing-preview]") : false;
6767
// Check if the container has a static color element
68-
let hasStaticElement = container.matches(`:has([data-html-preview])`) ? container.matches(`:has([data-html-preview] .${rootClass}--staticWhite, [data-html-preview] .${rootClass}--staticBlack)`) : container.matches(`:has(.${rootClass}--staticWhite, .${rootClass}--staticBlack)`);
68+
let hasStaticElement = container.matches(":has([data-html-preview])") ? container.matches(`:has([data-html-preview] .${rootClass}--staticWhite, [data-html-preview] .${rootClass}--staticBlack)`) : container.matches(`:has(.${rootClass}--staticWhite, .${rootClass}--staticBlack)`);
6969

7070
// Reset the context to the original values
7171
color = original.color;
@@ -122,7 +122,8 @@ export const withContextWrapper = makeDecorator({
122122
if (hasStaticElement && staticKey && staticColorSettings[staticKey]) {
123123
container.style.background = staticColorSettings[staticKey].background;
124124
}
125-
} else {
125+
}
126+
else {
126127
// Testing background is stark white to highlight the gray-ish background color on light theme
127128
container.style.background = "Canvas";
128129
}

.storybook/decorators/helpers.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { global } from '@storybook/global';
1+
import { global } from "@storybook/global";
22

33
/**
44
* @description Fetches the style container for the given ID or creates a new one
@@ -37,8 +37,8 @@ export function toggleStyles(container, id, styles, add = true, context = undefi
3737
export function fetchStyleContainer(id, container) {
3838
if (!id) return;
3939

40-
const { document } = global;
41-
if (!container) container = document.body;
40+
const { document } = global;
41+
if (!container) container = document.body;
4242

4343
let styleContainer = container.querySelector(`#${id}`);
4444
if (styleContainer) return styleContainer;

.storybook/decorators/icon-sprites.js

+15-15
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,26 @@ export const withIconSpriteSheet = makeDecorator({
1111
parameterName: "spritesheet",
1212
wrapper: (StoryFn, context) => {
1313
const {
14-
loaded = {},
14+
loaded = {},
1515
} = context;
1616

17-
// Load the icons into the window object
18-
if (loaded.icons) window.icons = loaded.icons;
17+
// Load the icons into the window object
18+
if (loaded.icons) window.icons = loaded.icons;
1919

2020
useEffect(() => {
21-
// Inject the sprite sheets into the document
22-
let sprite = document.getElementById("spritesheets");
23-
if (!sprite) {
24-
sprite = document.createElement("div");
25-
sprite.id = "spritesheets";
26-
sprite.innerHTML = workflowSprite + uiSprite;
27-
document.body.appendChild(sprite);
28-
}
29-
else {
30-
sprite.innerHTML = workflowSprite + uiSprite;
31-
}
21+
// Inject the sprite sheets into the document
22+
let sprite = document.getElementById("spritesheets");
23+
if (!sprite) {
24+
sprite = document.createElement("div");
25+
sprite.id = "spritesheets";
26+
sprite.innerHTML = workflowSprite + uiSprite;
27+
document.body.appendChild(sprite);
28+
}
29+
else {
30+
sprite.innerHTML = workflowSprite + uiSprite;
31+
}
3232
}, []);
3333

34-
return StoryFn(context);
34+
return StoryFn(context);
3535
},
3636
});

.storybook/decorators/language.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ export const withLanguageWrapper = makeDecorator({
5959

6060
},
6161
});
62-
} catch (e) {/* empty */}
62+
}
63+
catch (e) {/* empty */}
6364
}, [lang, currentKitId, window]);
6465

6566
return StoryFn(context);

.storybook/decorators/testing-preview.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,16 @@ export const withTestingPreviewWrapper = makeDecorator({
2828
// If isChromatic() is true, we should update the global value to always show the testing grid
2929
if (typeof isChromatic === "function" && isChromatic() === true) {
3030
context.parameters.showTestingGrid = true;
31-
} else if (viewMode === "docs") {
31+
}
32+
else if (viewMode === "docs") {
3233
// If we're in the docs view, we should disable the testing grid
3334
context.parameters.showTestingGrid = false;
34-
} else if (typeof showTestingGrid === "undefined") {
35+
}
36+
else if (typeof showTestingGrid === "undefined") {
3537
// If the global value is undefined, we should set it to the testing preview value
3638
context.parameters.showTestingGrid = testingPreview;
37-
} else if (showTestingGrid !== testingPreview) {
39+
}
40+
else if (showTestingGrid !== testingPreview) {
3841
context.parameters.showTestingGrid = testingPreview;
3942
}
4043

.storybook/decorators/utilities.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const Heading = ({
2424
const headingStyles = {
2525
"display": "block",
2626
"color": "inherit",
27-
"font-family": 'adobe-clean, "adobe clean", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Trebuchet MS", "Lucida Grande", sans-serif',
27+
"font-family": "adobe-clean, \"adobe clean\", \"Source Sans Pro\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Ubuntu, \"Trebuchet MS\", \"Lucida Grande\", sans-serif",
2828
"font-size": "11px",
2929
"line-height": "1.3",
3030
"font-weight": "700",
@@ -215,7 +215,7 @@ export const States = ({
215215

216216
// If the container test heading is in the ignore list, skip rendering this state
217217
if (ignore.length && ignore.includes(containerHeading)) {
218-
return nothing
218+
return nothing;
219219
}
220220

221221
context = {

.storybook/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import fs from "fs";
22
import path from "path";
3-
import remarkGfm from 'remark-gfm';
3+
import remarkGfm from "remark-gfm";
44

55
// Get a list of all the folders in the components directory
66
const componentDir = path.resolve(__dirname, "../components");
@@ -123,7 +123,7 @@ export default {
123123
},
124124
framework: "@storybook/web-components-vite",
125125
typescript: {
126-
reactDocgen: 'react-docgen',
126+
reactDocgen: "react-docgen",
127127
// Not using typescript so disable the check
128128
check: false,
129129
},

.storybook/modes/index.js

+22-22
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,31 @@
1212
*/
1313

1414
const modes = {
15-
"Light | LTR": {
16-
color: "light",
17-
textDirection: "ltr",
18-
},
19-
"Dark | RTL": {
20-
color: "dark",
21-
textDirection: "rtl",
22-
},
23-
"S1 | Light | LTR": {
24-
context: "legacy",
25-
color: "light",
26-
textDirection: "ltr",
27-
},
28-
"Express | Light | LTR": {
29-
context: "express",
30-
color: "light",
31-
textDirection: "ltr",
32-
},
15+
"Light | LTR": {
16+
color: "light",
17+
textDirection: "ltr",
18+
},
19+
"Dark | RTL": {
20+
color: "dark",
21+
textDirection: "rtl",
22+
},
23+
"S1 | Light | LTR": {
24+
context: "legacy",
25+
color: "light",
26+
textDirection: "ltr",
27+
},
28+
"Express | Light | LTR": {
29+
context: "express",
30+
color: "light",
31+
textDirection: "ltr",
32+
},
3333
};
3434

3535
export default modes;
3636

3737
export const disableDefaultModes = {
38-
...Object.keys(modes).reduce((acc, key) => {
39-
acc[key] = { disable: true };
40-
return acc;
41-
}, {}),
38+
...Object.keys(modes).reduce((acc, key) => {
39+
acc[key] = { disable: true };
40+
return acc;
41+
}, {}),
4242
};

.storybook/project.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"outputs": ["{workspaceRoot}/dist"]
2828
}
2929
},
30-
"dependsOn": ["clean", "^build", { "target": "report", "tag": "component" }],
30+
"dependsOn": ["clean", "^build", { "tag": "component", "target": "report" }],
3131
"executor": "nx:run-commands",
3232
"inputs": ["tools", { "externalDependencies": ["storybook"] }],
3333
"options": {
@@ -85,7 +85,7 @@
8585
},
8686
"start": {
8787
"cache": true,
88-
"dependsOn": [{ "target": "report", "projects": "tag:component" }, "^build"],
88+
"dependsOn": [{ "projects": "tag:component", "target": "report" }, "^build"],
8989
"executor": "nx:run-commands",
9090
"inputs": [
9191
"tools",

plugins/postcss-add-theming-layer/package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
"contributors": [
88
"Cassondra Roberts <[email protected]>"
99
],
10+
"homepage": "https://opensource.adobe.com/spectrum-css/",
11+
"repository": {
12+
"type": "git",
13+
"url": "https://github.com/adobe/spectrum-css.git",
14+
"directory": "plugins/postcss-add-theming-layer"
15+
},
16+
"bugs": {
17+
"url": "https://github.com/adobe/spectrum-css/issues"
18+
},
1019
"main": "index.js",
1120
"files": [
1221
"package.json",
@@ -31,14 +40,5 @@
3140
"custom properties",
3241
"postcss",
3342
"postcss-plugin"
34-
],
35-
"repository": {
36-
"type": "git",
37-
"url": "https://github.com/adobe/spectrum-css.git",
38-
"directory": "plugins/postcss-add-theming-layer"
39-
},
40-
"bugs": {
41-
"url": "https://github.com/adobe/spectrum-css/issues"
42-
},
43-
"homepage": "https://opensource.adobe.com/spectrum-css/"
43+
]
4444
}

plugins/postcss-property-rollup/package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
"contributors": [
88
"Cassondra Roberts <[email protected]>"
99
],
10+
"homepage": "https://opensource.adobe.com/spectrum-css/",
11+
"repository": {
12+
"type": "git",
13+
"url": "https://github.com/adobe/spectrum-css.git",
14+
"directory": "plugins/postcss-property-rollup"
15+
},
16+
"bugs": {
17+
"url": "https://github.com/adobe/spectrum-css/issues"
18+
},
1019
"main": "index.js",
1120
"files": [
1221
"package.json",
@@ -27,14 +36,5 @@
2736
"custom properties",
2837
"postcss",
2938
"postcss-plugin"
30-
],
31-
"repository": {
32-
"type": "git",
33-
"url": "https://github.com/adobe/spectrum-css.git",
34-
"directory": "plugins/postcss-property-rollup"
35-
},
36-
"bugs": {
37-
"url": "https://github.com/adobe/spectrum-css/issues"
38-
},
39-
"homepage": "https://opensource.adobe.com/spectrum-css/"
39+
]
4040
}

plugins/stylelint-no-missing-var/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
"description": "Check for custom properties without a var function around them",
55
"license": "Apache-2.0",
66
"author": "Adobe",
7+
"contributors": [
8+
"Cassondra Roberts <[email protected]>"
9+
],
710
"homepage": "https://opensource.adobe.com/spectrum-css",
811
"repository": {
912
"type": "git",
@@ -13,9 +16,6 @@
1316
"bugs": {
1417
"url": "https://github.com/adobe/spectrum-css/issues"
1518
},
16-
"contributors": [
17-
"Cassondra Roberts <[email protected]>"
18-
],
1919
"type": "module",
2020
"main": "index.js",
2121
"files": [

0 commit comments

Comments
 (0)