Skip to content

Commit

Permalink
build: remove theme processing, site package; add reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
castastrophe committed Dec 27, 2024
1 parent c1701e9 commit c93daf7
Show file tree
Hide file tree
Showing 275 changed files with 427 additions and 3,329 deletions.
7 changes: 1 addition & 6 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,13 @@
"@spectrum-css/well": "4.1.5-next.2",
"@spectrum-css/generator": "3.0.0",
"conventional-changelog-spectrum": "1.0.2",
"postcss-combininator": "2.0.0",
"postcss-custom-properties-mapping": "2.0.0",
"@spectrum-tools/stylelint-no-missing-var": "1.3.1",
"@spectrum-tools/stylelint-no-unknown-custom-properties": "1.3.2",
"@spectrum-tools/stylelint-no-unused-custom-properties": "1.3.1",
"@spectrum-tools/documentation": "1.0.0",
"@spectrum-css/tokens": "14.0.0-next.6",
"@spectrum-css/ui-icons": "1.1.2",
"@spectrum-tools/postcss-add-theming-layer": "0.0.0",
"@spectrum-tools/postcss-property-rollup": "0.0.0",
"@spectrum-tools/postcss-rgb-mapping": "3.0.0-s2-foundations.0",
"@spectrum-tools/theme-alignment": "1.1.0"
"@spectrum-tools/postcss-rgb-mapping": "3.0.0-s2-foundations.0"
},
"changesets": [
"chilly-peaches-sniff",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
filter_mode: diff_context
level: error
reporter: github-pr-review
# stylelint_input: "components/*/index.css
# stylelint_input: "components/*/index.css"
stylelint_input: "${{ inputs.styles_added_files }} ${{ inputs.styles_modified_files }}"
stylelint_config: stylelint.config.js

Expand Down
7 changes: 3 additions & 4 deletions .storybook/guides/develop.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,18 @@ Each component has the following files:
- `stories/*.stories.js` - The storybook file that defines the component's stories and the available knobs for the component.
- `stories/template.js` - The template function that generates the component's mark-up based on the provided settings.
- `stories/*.test.js` - The testing grid for visual regression testing in Chromatic.
- `stories/*.mdx` - This asset generates the component-specific documentation and is rendered in Storybook as the Docs page.

Each component outputs the following assets to `dist`:

- `index.css`: This asset includes the base CSS.
- `index.css`: This asset includes the CSS for the component and is meant to be loaded in conjunction with the tokens for your desired color context and scales.

## Adding a new component

1. Generate a new component using the `yarn new component` command. The generator will prompt you to answer questions about your component.
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`.
3. Once your folder has been generated, you can run `yarn start` in the root of the project to begin developing.
4. The `index.css` file is where all of your styles will be added.
5. Inside the `stories` directory you will find a `template.js`, `*.stories.js`, and `*.mdx` file.
4. The `index.css` file is where all of your styles should be added.
5. Inside the `stories` directory you will find a `template.js` and `*.stories.js` file.
- 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).
- 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.

Expand Down
2 changes: 1 addition & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default {
},
{
directory: "./foundations",
files: "*/*.mdx",
files: "*/*.@(stories.js|mdx)",
titlePrefix: "Foundations",
},
{
Expand Down
2 changes: 1 addition & 1 deletion .storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"dependencies": {
"@adobe/spectrum-css-workflow-icons": "^1.5.4",
"@adobe/spectrum-tokens": "13.0.0-beta.52",
"@adobe/spectrum-tokens": "13.0.0-beta.55",
"@spectrum-css/actionbutton": "workspace:^",
"@spectrum-css/button": "workspace:^",
"@spectrum-css/table": "workspace:^",
Expand Down
1 change: 0 additions & 1 deletion components/accordion/metadata/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@
"--spectrum-neutral-content-color-key-focus",
"--spectrum-sans-font-family-stack"
],
"system-theme": [],
"passthroughs": [],
"high-contrast": []
}
41 changes: 0 additions & 41 deletions components/accordion/metadata/mods.md

This file was deleted.

1 change: 1 addition & 0 deletions components/accordion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"dist/*",
"*.md",
"package.json",
"stories/*",
"metadata/*"
],
"peerDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions components/actionbar/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
--spectrum-actionbar-emphasized-background-color: var(--spectrum-informative-background-color-default);
--spectrum-actionbar-emphasized-item-counter-color: var(--spectrum-white);

/* colors - applied to popover */
--spectrum-actionbar-popover-background-color: var(--spectrum-gray-25);
--spectrum-actionbar-popover-border-color: var(--spectrum-gray-400);
/* colors - applied to popover */
--spectrum-actionbar-popover-background-color: var(--spectrum-gray-25);
--spectrum-actionbar-popover-border-color: var(--spectrum-gray-400);

/* spacing of action bar bottom and horizontal outer edge */
--spectrum-actionbar-spacing-outer-edge: var(--spectrum-spacing-300);
Expand Down
1 change: 0 additions & 1 deletion components/actionbar/metadata/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
"--spectrum-spacing-75",
"--spectrum-white"
],
"system-theme": [],
"passthroughs": [],
"high-contrast": ["--highcontrast-actionbar-popover-border-color"]
}
24 changes: 0 additions & 24 deletions components/actionbar/metadata/mods.md

This file was deleted.

1 change: 1 addition & 0 deletions components/actionbar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"dist/*",
"*.md",
"package.json",
"stories/*",
"metadata/*"
],
"peerDependencies": {
Expand Down
1 change: 0 additions & 1 deletion components/actionbutton/metadata/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@
"--spectrum-workflow-icon-size-50",
"--spectrum-workflow-icon-size-75"
],
"system-theme": [],
"passthroughs": [
"--mod-button-animation-duration",
"--mod-button-font-family",
Expand Down
50 changes: 0 additions & 50 deletions components/actionbutton/metadata/mods.md

This file was deleted.

1 change: 1 addition & 0 deletions components/actionbutton/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"dist/*",
"*.md",
"package.json",
"stories/*",
"metadata/*"
],
"peerDependencies": {
Expand Down
1 change: 0 additions & 1 deletion components/actiongroup/metadata/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"--spectrum-spacing-50",
"--spectrum-spacing-75"
],
"system-theme": [],
"passthroughs": ["--mod-actionbutton-focus-indicator-border-radius"],
"high-contrast": []
}
7 changes: 0 additions & 7 deletions components/actiongroup/metadata/mods.md

This file was deleted.

1 change: 1 addition & 0 deletions components/actiongroup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"dist/*",
"*.md",
"package.json",
"stories/*",
"metadata/*"
],
"peerDependencies": {
Expand Down
1 change: 1 addition & 0 deletions components/actionmenu/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"dist/*",
"*.md",
"package.json",
"stories/*",
"metadata/*"
],
"peerDependencies": {
Expand Down
1 change: 0 additions & 1 deletion components/alertbanner/metadata/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
"--spectrum-white",
"--spectrum-workflow-icon-size-100"
],
"system-theme": [],
"passthroughs": [
"--mod-closebutton-align-self",
"--mod-closebutton-margin-inline",
Expand Down
28 changes: 0 additions & 28 deletions components/alertbanner/metadata/mods.md

This file was deleted.

1 change: 1 addition & 0 deletions components/alertbanner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"dist/*",
"*.md",
"package.json",
"stories/*",
"metadata/*"
],
"peerDependencies": {
Expand Down
1 change: 0 additions & 1 deletion components/alertdialog/metadata/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
"--spectrum-spacing-300",
"--spectrum-workflow-icon-size-100"
],
"system-theme": [],
"passthroughs": ["--mod-buttongroup-justify-content", "--mod-icon-color"],
"high-contrast": []
}
24 changes: 0 additions & 24 deletions components/alertdialog/metadata/mods.md

This file was deleted.

1 change: 1 addition & 0 deletions components/alertdialog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"dist/*",
"*.md",
"package.json",
"stories/*",
"metadata/*"
],
"peerDependencies": {
Expand Down
1 change: 0 additions & 1 deletion components/asset/metadata/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"--spectrum-gray-25",
"--spectrum-gray-500"
],
"system-theme": [],
"passthroughs": [],
"high-contrast": ["--highcontrast-asset-icon-background-color"]
}
8 changes: 0 additions & 8 deletions components/asset/metadata/mods.md

This file was deleted.

1 change: 1 addition & 0 deletions components/asset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"dist/*",
"*.md",
"package.json",
"stories/*",
"metadata/*"
],
"peerDependencies": {
Expand Down
1 change: 0 additions & 1 deletion components/assetcard/metadata/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@
"--spectrum-spacing-75",
"--spectrum-white"
],
"system-theme": [],
"passthroughs": [],
"high-contrast": [
"--highcontrast-assectcard-border-color-selected-down",
Expand Down
Loading

0 comments on commit c93daf7

Please sign in to comment.