Skip to content

Commit 13e35a1

Browse files
committed
chore(progresscircle): aligning branch
2 parents c97dee1 + 7bd2670 commit 13e35a1

File tree

83 files changed

+6497
-270
lines changed

Some content is hidden

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

83 files changed

+6497
-270
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
5858
- 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)
5959

6060
### 🛑 BREAKING CHANGES
61-
- @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.
61+
62+
- @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.
6263

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

.storybook/CHANGELOG.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,9 @@ This component has been deprecated. Use an action bar to allow users to perform
649649

650650
🗓 2024-02-06
651651
<a name="7.4.2-next.0"></a>
652+
652653
## 7.4.2-next.0
654+
653655
🗓 2024-02-06 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/[email protected]...@spectrum-css/[email protected])
654656

655657
**Note:** Spectrum 2 next version
@@ -725,11 +727,11 @@ This component has been deprecated. Use an action bar to allow users to perform
725727

726728
- 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)
727729

728-
###
729-
🛑 BREAKING CHANGES
730+
###
731+
732+
🛑 BREAKING CHANGES
730733

731-
*
732-
- @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.
734+
- - @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.
733735

734736
* NEW: @spectrum-css/ui-icons package for all SVG icons in the UI set.
735737

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
export const withDownStateDimensionCapture = (selector) => (Story, context) => {
2+
const captureDownStateDimensions = () => {
3+
const components = document.querySelectorAll(selector);
4+
components.forEach((component) => {
5+
const { width, height } = component.getBoundingClientRect();
6+
component.style.setProperty('--spectrum-downstate-width', `${width}px`);
7+
component.style.setProperty('--spectrum-downstate-height', `${height}px`);
8+
});
9+
};
10+
11+
document.addEventListener("DOMContentLoaded", () => {
12+
// Wait to make sure the story is fully rendered (otherwise width/height can be wrong)
13+
setTimeout(() => {
14+
captureDownStateDimensions();
15+
}, 100);
16+
});
17+
18+
return Story(context);
19+
};

.storybook/foundations/corner-rounding/template.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { html } from "lit";
22
import { classMap } from "lit/directives/class-map.js";
3-
43
import "./index.css";
54

65
const getSizeModifier = (size) => {

.storybook/guides/deprecation.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Meta } from "@storybook/blocks";
22

3-
<Meta title="Deprecation workflow"/>
3+
<Meta title="Deprecation workflow" />
44

55
# Deprecating a component
66

.storybook/guides/develop.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Meta } from "@storybook/blocks";
22

33
import Illustration from "../assets/images/spectrum_illustration_2x.png";
44

5-
<Meta title="Contributing"/>
5+
<Meta title="Contributing" />
66

77
<img src={Illustration} style={{ marginTop: "-20px", marginBottom: "20px" }} />
88

components/README.md

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Spectrum CSS Components
2+
3+
The project is broken down into separate components for each component inside of the `components/` folder.
4+
5+
Components are released on npm as `@spectrum-css/$COMPONENT`, where `$COMPONENT` corresponds to the folder name in this repository.
6+
7+
## Component structure
8+
9+
Each component has the following files:
10+
11+
- `index.css` - The scale-specific styles for the component: dimensions, layout, etc (these change between scales)
12+
- `metadata/*.yml` - The markup examples and documentation for the component; also makes additional examples possible that appear separately in the site navigation.
13+
- `themes/*.css` - The theme-specific styles for the component.
14+
- `stories/*.stories.js` and `stories/template.js` - The storybook assets for rendering components in the Storybook tool and eventually to be used for visual regression testing.
15+
16+
## Editing an existing component
17+
18+
1. Run `gulp dev` in the root of the project to begin developing.
19+
2. Edit `components/$COMPONENT/index.css` with dimensions and color properties. The documentation will live reload with your changes.
20+
3. Edit the markup examples within `components/$COMPONENT/metadata/*.yml`. The documentation will live reload with your changes.
21+
22+
## Adding a new component
23+
24+
1. Generate a new component using the `yarn new component` command. The generator will prompt you to answer questions about your component.
25+
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 `@spectrum-css/component-builder-simple`, and most rely on `@spectrum-css/icon`. **Note: If you are working on a legacy component, it will dependend on `@spectrum-css/vars` and `@spectrum-css/component-builder` instead. This is expected.**
26+
3. Once your folder has been generated, you can run `yarn dev` in the root of the project to begin developing.
27+
4. The `index.css` file is where most of your styles will be added.
28+
5. Inside the `stories` directory you will find a `template.js` and an `*.stories.js` file.
29+
- 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).
30+
- 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.
31+
6. Edit your `metadata/*.yml` to add markup examples for each of the variants of your component.
32+
33+
Because we use scoped packages, before it can be published with Lerna, you must manually publish the new component as public:
34+
35+
```shell
36+
cd components/newcomponent
37+
npm publish --access=public
38+
```
39+
40+
## Component dependencies
41+
42+
1. If your component requires another component in order to render, it should be declared in both `devDependencies` and `peerDependencies`.
43+
1. The version range included in `peerDependencies` must satisfy the version included in `devDependencies`.
44+
2. If a component appears in `peerDependencies`, it must also appear in `devDependencies`.
45+
3. This goes for every class used to render the component; even if the class comes from a component that's a dependency of another component you already have a dependency on.
46+
4. For instance, if your component requires a button with an icon inside of it, you must explicitly include both `icon` and `button` in both `devDependencies` and `peerDependencies`.
47+
2. If your component has an example that uses another component, but the component isn't required to render your component, it should be declared in `devDependencies` only.
48+
1. For instance, if your component is commonly used with a table and includes an example where it is used with a table, but doesn't require table to render itself, you should declare `table` in `devDependencies` only.
49+
50+
For example, `actionbar` gets its tokens from `vars`, and requires `button`, `checkbox`, `icon`, and `popover` to render, but also has an example where the component is used with a `table`. Its dependencies should be declared as follows:
51+
52+
```json
53+
{
54+
"name": "@spectrum-css/actionbar",
55+
"peerDependencies": {
56+
"@spectrum-css/button": ">=12,
57+
"@spectrum-css/checkbox": ">=8",
58+
"@spectrum-css/icon": ">=6",
59+
"@spectrum-css/popover": ">=6",
60+
"@spectrum-css/tokens": ">=14.0.0-next.3"
61+
}
62+
}
63+
```
64+
65+
The release will error out if:
66+
67+
1. A package is specified in `peerDependencies` that does not appear in `devDependencies`
68+
2. The version of a package is specified in `devDependencies` satisfy the range defined for that package in `peerDependencies`
69+
70+
## Releasing components
71+
72+
Any change to a component or a component's dependencies will require a release of that component and all components that depend upon it. Component releases cannot be done ala carte and must be done from the top-level.
73+
74+
See [Releasing](/README.md#Releasing) for more information.

components/actionmenu/CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
369369
\*feat!: postcss config build and script; remove gulp (#2466)([b0f337b](https://github.com/adobe/spectrum-css/commit/b0f337b)), closes[#2466](https://github.com/adobe/spectrum-css/issues/2466)
370370

371371
### 🛑 BREAKING CHANGES
372-
- Removes component-builder & component-builder-simple for script leveraging postcss
372+
373+
- Removes component-builder & component-builder-simple for script leveraging postcss
373374

374375
- Imports added to index.css and themes/express.css
375376

components/breadcrumb/CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
330330
\*feat!: postcss config build and script; remove gulp (#2466)([b0f337b](https://github.com/adobe/spectrum-css/commit/b0f337b)), closes[#2466](https://github.com/adobe/spectrum-css/issues/2466)
331331

332332
### 🛑 BREAKING CHANGES
333-
- Removes component-builder & component-builder-simple for script leveraging postcss
333+
334+
- Removes component-builder & component-builder-simple for script leveraging postcss
334335

335336
- Imports added to index.css and themes/express.css
336337

0 commit comments

Comments
 (0)