Skip to content

Commit a688b94

Browse files
pfultoncastastrophe
authored andcommitted
chore: s2 grays component-level migration (#2583)
* chore: migrate gray-50 to gray-25 Migrates any instance of `--spectrum-gray-50` to use `--spectrum-gray-25` as per the S2 migration guide * chore: migrate gray-75 to gray-50 Migrates usages of `--spectrum-gray-75` to use `--spectrum-gray-50` as per the s2 migration guide. * chore: migrate gray-100 to gray-75 Migrates usages of `--spectrum-gray-100` to use `--spectrum-gray-75` as per the s2 migration guide * chore: migrate gray-200 to gray-100 Migrates usages of `--spectrum-gray-200` to use `--spectrum-gray-100` as per the s2 migration guide * chore: migrate gray-300 to gray-200 Migrates usages of `--spectrum-gray-300` to use `spectrum-gray-200` as per the s2 migration guide * chore(infieldbutton): gray-300 to gray-200
1 parent 75e470e commit a688b94

File tree

342 files changed

+4161
-11279
lines changed

Some content is hidden

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

342 files changed

+4161
-11279
lines changed

.github/actions/file-diff/CHANGELOG.md

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,65 +16,70 @@ All notable changes to this project will be documented in this file.
1616
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
1717

1818
<a name="2.0.5"></a>
19-
##2.0.5
20-
🗓
21-
2024-03-07 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-tools/gh-action-file-diff@2.0.4...@spectrum-tools/gh-action-file-diff@2.0.5)
19+
20+
## 2.0.5
21+
22+
🗓 2024-03-07 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-tools/gh-action-file-diff@2.0.4...@spectrum-tools/gh-action-file-diff@2.0.5)
2223

2324
**Note:** Version bump only for package @spectrum-tools/gh-action-file-diff
2425

2526
<a name="2.0.4"></a>
26-
##2.0.4
27-
🗓
28-
2024-02-12 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-tools/gh-action-file-diff@2.0.3...@spectrum-tools/gh-action-file-diff@2.0.4)
27+
28+
## 2.0.4
29+
30+
🗓 2024-02-12 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-tools/gh-action-file-diff@2.0.3...@spectrum-tools/gh-action-file-diff@2.0.4)
2931

3032
**Note:** Version bump only for package @spectrum-tools/gh-action-file-diff
3133

3234
<a name="2.0.3"></a>
33-
##2.0.3
34-
🗓
35-
2024-02-06
35+
36+
## 2.0.3
37+
38+
🗓 2024-02-06
3639

3740
**Note:** Version bump only for package @spectrum-tools/gh-action-file-diff
3841

3942
<a name="2.0.2"></a>
40-
##2.0.2
41-
🗓
42-
2024-01-29 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-tools/gh-action-file-diff@2.0.1...@spectrum-tools/gh-action-file-diff@2.0.2)
43+
44+
## 2.0.2
45+
46+
🗓 2024-01-29 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-tools/gh-action-file-diff@2.0.1...@spectrum-tools/gh-action-file-diff@2.0.2)
4347

4448
**Note:** Version bump only for package @spectrum-tools/gh-action-file-diff
4549

4650
<a name="2.0.1"></a>
47-
##2.0.1
48-
🗓
49-
2024-01-16 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-tools/gh-action-file-diff@2.0.0...@spectrum-tools/gh-action-file-diff@2.0.1)
51+
52+
## 2.0.1
53+
54+
🗓 2024-01-16 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-tools/gh-action-file-diff@2.0.0...@spectrum-tools/gh-action-file-diff@2.0.1)
5055

5156
**Note:** Version bump only for package @spectrum-tools/gh-action-file-diff
5257

5358
<a name="2.0.0"></a>
54-
#2.0.0
55-
🗓
56-
2023-12-12 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-tools/gh-action-file-diff@1.0.2...@spectrum-tools/gh-action-file-diff@2.0.0)
5759

58-
\*feat(icon,ui-icons)!: migrate the icon compiler to a distinct package (#2343)([d73d594](https://github.com/adobe/spectrum-css/commit/d73d594)), closes[#2343](https://github.com/adobe/spectrum-css/issues/2343)
60+
## 2.0.0
5961

60-
###
61-
🛑 BREAKING CHANGES
62+
🗓 2023-12-12 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-tools/gh-action-file-diff@1.0.2...@spectrum-tools/gh-action-file-diff@2.0.0)
6263

63-
*
64-
- @spectrum-css/icon will no longer contain SVG assets; it will be a purely CSS package with all SVG assets migrated to the new @spectrum-css/ui-icons package.
64+
- feat(icon,ui-icons)!: migrate the icon compiler to a distinct package (#2343)([d73d594](https://github.com/adobe/spectrum-css/commit/d73d594)), closes[#2343](https://github.com/adobe/spectrum-css/issues/2343)
65+
66+
### 🛑 BREAKING CHANGES
67+
- @spectrum-css/icon will no longer contain SVG assets; it will be a purely CSS package with all SVG assets migrated to the new @spectrum-css/ui-icons package.
6568

6669
- NEW: @spectrum-css/ui-icons package for all SVG icons in the UI set.
6770

6871
<a name="1.0.2"></a>
69-
##1.0.2
70-
🗓
71-
2023-11-15
72+
73+
## 1.0.2
74+
75+
🗓 2023-11-15
7276

7377
**Note:** Version bump only for package @spectrum-tools/gh-action-file-diff
7478

7579
<a name="1.0.1"></a>
76-
##1.0.1
77-
🗓
78-
2023-11-13
80+
81+
## 1.0.1
82+
83+
🗓 2023-11-13
7984

8085
**Note:** Version bump only for package @spectrum-tools/gh-action-file-diff

.github/workflows/development.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ jobs:
9898
files_yaml: |
9999
styles:
100100
- components/*/index.css
101-
- components/*/themes/spectrum.css
102-
- components/*/themes/express.css
103101
eslint:
104102
- components/*/stories/*.js
105103
plugins:

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
filter_mode: diff_context
9191
level: error
9292
reporter: github-pr-review
93-
# stylelint_input: "components/*/index.css components/*/themes/*.css"
93+
# stylelint_input: "components/*/index.css
9494
stylelint_input: "${{ inputs.styles_added_files }} ${{ inputs.styles_modified_files }}"
9595
stylelint_config: "${{ github.workspace }}/stylelint.config.js"
9696
packages: 'stylelint-header stylelint-config-standard stylelint-selector-bem-pattern stylelint-order stylelint-use-logical'

.storybook/guides/develop.mdx

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,35 +31,25 @@ For more general information about how to contribute to the Spectrum CSS project
3131

3232
Each component has the following files:
3333

34-
- `index.css` - The source file for all styles related to the component. This contains all selectors and css properties for the component but specifically lacks any custom properties or variables. These values are sourced from the `themes` directory.
35-
- `themes/*.css` - The theme-specific, component-level custom properties used to style the component. These files are meant to be loaded with the source styles.
34+
- `index.css` - The source file for all styles related to the component. This contains all selectors and css properties for the component.
3635
- `stories/*.stories.js` - The storybook file that defines the component's stories and the available knobs for the component.
3736
- `stories/template.js` - The template function that generates the component's mark-up based on the provided settings.
3837
- `stories/*.test.js` - The testing grid for visual regression testing in Chromatic.
3938
- `stories/*.mdx` - This asset generates the component-specific documentation and is rendered in Storybook as the Docs page.
4039

4140
Each component outputs the following assets to `dist`:
4241

43-
- `index.css`: This asset includes the base CSS and the `themes/spectrum.css` definitions (without the system mapping layer). This asset is meant to be used in a environment where only the current Spectrum theme is supported.
44-
- `index-base.css`: This asset includes only the base CSS; that is, the CSS without any custom property definitions. This can be used in conjunction with `index-theme.css` and the desired `themes/*.css` file to render a themed component.
45-
- `index-theme.css`: This asset includes only the custom property definitions for the component as mapped to the system variables. This can be used in conjunction with `index-base.css` and the desired `themes/*.css` file to render a themed component.
46-
47-
Each component outputs theme-specific assets to `dist/themes`. These assets include the system variables mapped to their global token counterparts. This file is meant to be loaded in conjunction with the `index-base.css` and `index-theme.css` files to render a themed component.
48-
49-
- `themes/spectrum-two.css`: Represents the current Spectrum theme, aka Spectrum 2.
50-
- `themes/spectrum.css`: Represents the legacy Spectrum theme, aka Spectrum 1. **deprecated**
51-
- `themes/express.css`: Represents the Express theme. **deprecated**
42+
- `index.css`: This asset includes the base CSS.
5243

5344
## Adding a new component
5445

5546
1. Generate a new component using the `yarn new component` command. The generator will prompt you to answer questions about your component.
5647
2. Edit the `dependencies` within the `package.json` file to use only the dependencies your component needs. All components rely on `@spectrum-css/tokens`, and most rely on `@spectrum-css/icon`.
5748
3. Once your folder has been generated, you can run `yarn start` in the root of the project to begin developing.
58-
4. The `index.css` file is where most of your styles will be added. Add any custom property mappings to the global token library in the `themes/spectrum.css` asset.
49+
4. The `index.css` file is where all of your styles will be added.
5950
5. Inside the `stories` directory you will find a `template.js`, `*.stories.js`, and `*.mdx` file.
6051
- In the `*.stories.js` file, define the available knobs and properties for your component, as well as any standard variations you want to surface in [Storybook](https://storybook.js.org/docs/react/writing-stories/introduction).
6152
- Update the `template.js` file with the markup, using [lit-html syntax](https://lit.dev/docs/templates/overview/) to adjust results based on the provided settings from the Storybook knobs.
62-
- Update the `*.mdx` file with the documentation for your component.
6353

6454
_Note_: Because we use scoped packages, before it can be published, you must manually publish the new component as public:
6555

@@ -116,8 +106,6 @@ CSS assets will be run through their respective postcss configurations. This mea
116106

117107
```js
118108
import "../index.css";
119-
import "../themes/express.css";
120-
import "../themes/spectrum.css";
121109
```
122110

123111
We are leaning on Storybook's `@storybook/web-components-vite` framework configuration as our stories rely on lit for dynamic attribute assignment.
@@ -345,8 +333,6 @@ import { ifDefined } from "lit/directives/if-defined.js";
345333
import { when } from "lit/directives/when.js";
346334

347335
import "../index.css";
348-
import "../themes/express.css";
349-
import "../themes/spectrum.css";
350336

351337
export const Template = (
352338
{

.vscode/settings.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,8 @@
101101
}
102102
],
103103
"cssVariables.lookupFiles": [
104-
"${workspaceFolder}/tokens/dist/css/index.css",
105-
"${workspaceFolder}/tokens/dist/css/*.css",
106-
"${workspaceFolder}/components/*/index.css",
107-
"${workspaceFolder}/components/*/themes/*.css"
104+
"${workspaceFolder}/tokens/**/*.css",
105+
"${workspaceFolder}/components/*/index.css"
108106
],
109107
"docthis.includeDescriptionTag": true,
110108
"docthis.inferTypesFromNames": true,

0 commit comments

Comments
 (0)