Skip to content

Commit 8927cef

Browse files
committed
feat(storybook): display custom properties
1 parent 4b146e3 commit 8927cef

File tree

1,060 files changed

+87037
-35137
lines changed

Some content is hidden

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

1,060 files changed

+87037
-35137
lines changed

.changeset/angry-needles-behave.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
"@spectrum-css/radio": major
3+
---
4+
5+
### Spectrum 2 migration
6+
7+
Updates:
8+
9+
- High contrast tokens have been modified
10+
- Typography tokens modified
11+
12+
#### New tokens
13+
14+
`--spectrum-radio-border-width`
15+
`--spectrum-radio-text-font-weight`
16+
`--spectrum-radio-text-font-style`
17+
18+
#### Modified tokens
19+
20+
`--spectrum-radio-emphasized-accent-color`
21+
`--spectrum-radio-emphasized-accent-color-hover`
22+
`--spectrum-radio-emphasized-accent-color-down`
23+
`--spectrum-radio-emphasized-accent-color-focus`

.changeset/beige-dragons-tickle.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
"@spectrum-css/illustratedmessage": major
3+
"@spectrum-css/dropzone": major
4+
---
5+
6+
### S2 Illustrated Message Migration
7+
8+
This migration contains new tokens for t-shirt sizes (S, M, L), vertical and horizontal orientation along with their maximum width, illustration sizes, and content spacing. Dropzone `--mod` names are renamed to match the semantic tokens in illustrated message.
9+
10+
#### Illustrated Message
11+
12+
New properties
13+
`--spectrum-illustrated-message-heading-to-description`
14+
`--spectrum-illustrated-message-illustration-to-heading`
15+
`--spectrum-illustrated-message-illustration-to-content`
16+
`--spectrum-illustrated-message-description-to-action`
17+
`--spectrum-illustrated-message-illustration-color`
18+
`--spectrum-illustrated-message-illustration-size`
19+
`--spectrum-illustrated-message-small-cjk-title-font-size`
20+
`--spectrum-illustrated-message-large-cjk-title-font-size`
21+
`--spectrum-illustrated-message-large-body-font-size`
22+
`--spectrum-illustrated-message-horizontal-maximum-width`
23+
24+
New mods
25+
`--mod-illustrated-message-description-to-action`
26+
`--mod-illustrated-message-heading-to-description`
27+
`--mod-illustrated-message-illustration-to-content`
28+
`--mod-illustrated-message-horizontal-maximum-width`
29+
30+
Removed properties
31+
`--spectrum-illustrated-message-title-to-heading`
32+
`--spectrum-illustrated-message-description-max-inline-size`
33+
`--spectrum-illustrated-message-heading-max-inline-size`
34+
`--spectrum-illustrated-message-illustration-accent-color`
35+
`--mod-illustrated-message-illustration-accent-color`
36+
`--highcontrast-illustrated-message-illustration-accent-color`
37+
38+
#### Dropzone
39+
40+
New mods
41+
`--mod-drop-zone-body-to-action`
42+
`--mod-drop-zone-illustration-to-title`
43+
44+
#### Dropzone nested mods
45+
46+
Renamed mods
47+
`--mod-illustrated-message-title-to-heading` > `--mod-illustrated-message-illustration-to-heading`
48+
`--mod-illustrated-message-heading-to-body` > `--mod-illustrated-message-heading-to-description`
49+
`--mod-illustrated-message-content-maximum-width` > `--mod-illustrated-message-vertical-maximum-width`

.changeset/big-beds-care.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
"@spectrum-css/dropzone": major
3+
---
4+
5+
### Spectrum 2 migration
6+
7+
Since dropzone shares a lot of illustrated message's new content tokens (typography and spacing), tons of unused`--mods` were removed.
8+
9+
The component reflects the [new design](https://www.figma.com/design/eoZHKJH9a3LJkHYCGt60Vb/S2-token-specs?node-id=10141-2822&m=dev) of the borders that includes dash length and dash gap.
10+
11+
#### SVG Border
12+
13+
To support the intention of the design, an SVG element is used. There are custom `--mod` tokens to adjust the length of dashed lines and the gap between them. It's understood it may be too much to consume an additional element so there's a fallback where the SVG element is not necessary - dropzone will use the standard `border` CSS property.
14+
15+
#### New mods
16+
17+
`--mod-drop-zone-content-height`
18+
`--mod-drop-zone-edge-to-text`
19+
`--mod-drop-zone-title-line-height`
20+
`--mod-drop-zone-border-dash-length`
21+
`--mod-drop-zone-border-dash-gap`
22+
23+
#### Removed mods
24+
25+
`--mod-drop-zone-body-color`
26+
`--mod-drop-zone-body-font-family`
27+
`--mod-drop-zone-body-font-style`
28+
`--mod-drop-zone-body-font-weight`
29+
`--mod-drop-zone-body-line-height`
30+
`--mod-drop-zone-content-color`
31+
`--mod-drop-zone-content-edge-to-text`
32+
`--mod-drop-zone-content-font-size`
33+
`--mod-drop-zone-heading-color`
34+
`--mod-drop-zone-heading-font-family`
35+
`--mod-drop-zone-heading-font-size`
36+
`--mod-drop-zone-heading-font-style`
37+
`--mod-drop-zone-heading-font-weight`
38+
`--mod-drop-zone-heading-line-height`
39+
`--mod-drop-zone-heading-to-body` `--mod-drop-zone-illustration-to-heading` `--mod-drop-zone-illustration-to-title`

.changeset/big-jars-pump.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
"@spectrum-css/inlinealert": major
3+
---
4+
5+
#### Spectrum 2 migration
6+
7+
This migrates the `in-line alert` component to Spectrum 2. Custom properties have been updated and added per the design specification.
8+
9+
Subtle and bold treatments have been added for each badge variant.
10+
11+
To use the subtle treatment, you will need to apply the `spectrum-InLineAlert--subtle` class:
12+
13+
```html
14+
<div
15+
class="spectrum-InLineAlert spectrum-InLineAlert--info spectrum-InLineAlert--subtle"
16+
>
17+
<div class="spectrum-InLineAlert-header">
18+
Info variant with subtle fill
19+
<svg
20+
focusable="false"
21+
aria-hidden="true"
22+
role="img"
23+
class=" spectrum-Icon spectrum-Icon--sizeM spectrum-InLineAlert-icon "
24+
id="icon-52w58"
25+
aria-label="InfoCircle"
26+
>
27+
<title id="InfoCircle">Info Circle</title>
28+
<use xlink:href="#icon-info-circle" href="#icon-info-circle"></use>
29+
</svg>
30+
</div>
31+
<div class="spectrum-InLineAlert-content">This is an alert.</div>
32+
</div>
33+
```
34+
35+
To use the bold treatment (which is reserved for high-attention alerts only), you will need to apply the `spectrum-InLineAlert--bold` class:
36+
37+
```html
38+
<div
39+
class="spectrum-InLineAlert spectrum-InLineAlert--info spectrum-InLineAlert--bold"
40+
>
41+
<div class="spectrum-InLineAlert-header">
42+
Info variant with bold fill
43+
<svg
44+
focusable="false"
45+
aria-hidden="true"
46+
role="img"
47+
class=" spectrum-Icon spectrum-Icon--sizeM spectrum-InLineAlert-icon "
48+
id="icon-mty2x"
49+
aria-label="InfoCircle"
50+
>
51+
<title id="InfoCircle">Info Circle</title>
52+
<use xlink:href="#icon-info-circle" href="#icon-info-circle"></use>
53+
</svg>
54+
</div>
55+
<div class="spectrum-InLineAlert-content">This is an alert.</div>
56+
</div>
57+
```
58+
59+
Because subtle and bold treatments draw a similar level of attention you should choose only one to use consistently within a single product.
60+
61+
##### New mods
62+
63+
`--mod-inlinealert-border-and-icon-color-neutral`
64+
`--mod-inlinealert-min-spacing-header-to-icon`
65+
`--mod-inlinealert-spacing-content-link-button`
66+
`--mod-inlinealert-spacing-header-content`
67+
68+
##### Removed mods
69+
70+
`--mod-inlinealert-spacing-header-content-button`
71+
`--mod-inlinealert-spacing-header-to-icon`
72+
73+
##### New custom properties
74+
75+
`--spectrum-inlinealert-min-spacing-header-to-icon`
76+
`--spectrum-inlinealert-spacing-content-link-button`
77+
`--spectrum-inlinealert-spacing-header-content`
78+
79+
##### Removed custom properties
80+
81+
`--spectrum-inlinealert-spacing-header-content-button`
82+
`--spectrum-inlinealert-spacing-header-to-icon`

.changeset/breezy-impalas-push.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@spectrum-css/switch": patch
3+
---
4+
5+
### S2 switch fixes
6+
7+
This work addresses minor regressions in the Switch component. Animation tokens are reimplemented and their usage updated within the style definitions.
8+
9+
Reference:
10+
11+
- [S2 switch migration](https://github.com/adobe/spectrum-css/pull/2651)

.changeset/calm-hats-sleep.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@spectrum-css/bundle": major
3+
---
4+
5+
Release bundle with the latest styles on the S2 feature branch.

.changeset/chatty-lands-attack.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
"@spectrum-css/accordion": major
3+
---
4+
5+
### Spectrum 2 migration
6+
7+
Accordion now uses Spectrum 2 tokens and specifications.
8+
9+
New sized tokens are used for corner rounding, the spacing around the disclosure icon, and
10+
the spacing around the content area.
11+
12+
#### New features
13+
14+
- Adds the optional "quiet" style, which does not show dividers between accordion items.
15+
- Adds CSS transition to animate the rotation of the disclosure indicator when expanding and
16+
collapsing the accordion item.
17+
- Adds no inline padding variant (`.spectrum-Accordion--noInlinePadding`) in which the item
18+
header does not have padding.
19+
- Per design spec, accordion items have a min-width and default width. Default width can be
20+
overridden with `--mod-accordion-item-width` but should not be smaller than
21+
`--spectrum-accordion-item-minimum-width`.
22+
23+
#### Markup changes
24+
25+
The HTML markup has changed slightly for the accordion header. The disclosure icon has been moved
26+
from outside the button (`spectrum-Accordion-itemHeader`), to within the button. The extra
27+
element with class `spectrum-Accordion-itemIconContainer`, previously wrapping the icon, has
28+
been removed. A span with class `spectrum-Accordion-itemTitle` has been added around the heading
29+
text.
30+
31+
#### Mod changes
32+
33+
The following `--mod` custom properties have been renamed to better reflect how they are used:
34+
35+
- `--mod-accordion-item-height` has been renamed to `--mod-accordion-item-minimum-height`
36+
- `--mod-accordion-min-block-size` has been renamed to `--mod-accordion-item-min-block-size`
37+
- `--mod-accordion-component-edge-to-text` has been renamed to `--mod-accordion-content-padding-inline`
38+
39+
New mods:
40+
41+
- `--mod-accordion-animation-duration`
42+
- `--mod-accordion-edge-to-content-area`
43+
- `--mod-accordion-item-minimum-width`
44+
- `--mod-accordion-top-to-disclosure-indicator`

.changeset/chilled-peaches-enjoy.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
"@spectrum-css/actionbutton": major
3+
---
4+
5+
Action button now uses Spectrum 2 tokens and design specifications. A few notable changes:
6+
7+
- Medium is now the default size and `.spectrum-ActionButton--sizeM` has been removed.
8+
- Includes the Spectrum 2 down state transform.
9+
- The component border was not removed and its color was changed to `transparent` in order to continue support for Windows High Contrast / forced colors, which still shows a border. The mod custom properties for border were removed to avoid interference with Windows High Contrast / forced colors accessibility.
10+
- Some selectors to target the icon + text button and the icon-only button have been simplified using `:has`. This removes some overly complex `calc()` functions used for inline spacing, uses the design tokens more directly, and removes the previously documented need for the component's child elements to use a specific source order.
11+
- Background and content colors were updated.
12+
- Mod custom properties have been adjusted:
13+
- Renamed:
14+
- `--mod-line-height-100` renamed to `--mod-actionbutton-line-height`.
15+
- `--mod-sans-font-family-stack` renamed to `--mod-button-font-family`.
16+
- `--mod-animation-duration-100` renamed to `--mod-button-animation-duration`.
17+
- Removed:
18+
- `--mod-actionbutton-border-color-default`
19+
- `--mod-actionbutton-border-color-disabled`
20+
- `--mod-actionbutton-border-color-down`
21+
- `--mod-actionbutton-border-color-focus`
22+
- `--mod-actionbutton-border-color-hover`
23+
- `--mod-actionbutton-border-width`
24+
- `--mod-actionbutton-static-content-color`
25+
- New:
26+
- `--mod-actionbutton-font-weight`
27+
- `--mod-actionbutton-font-style`

.changeset/chilly-peaches-sniff.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
"@spectrum-css/statuslight": major
3+
---
4+
5+
#### Spectrum 2 migration
6+
7+
New non-semantic colors were added to the variants list, while the `accent` semantic variant was removed. There were also some new and updated color and text-to-visual tokens used to match the designs, along with normalizing font family, font style, and font weight.
8+
9+
New mods added:
10+
11+
- `--mod-statuslight-font-family`
12+
- `--mod-statuslight-font-style`
13+
- `--mod-statuslight-nonsemantic-brown-color`
14+
- `--mod-statuslight-nonsemantic-cinnamon-color`
15+
- `--mod-statuslight-nonsemantic-pink-color`
16+
- `--mod-statuslight-nonsemantic-silver-color`
17+
- `--mod-statuslight-nonsemantic-turquoise-color`
18+
19+
Removed mods:
20+
21+
- `--mod-statuslight-semantic-accent-color`

.changeset/chubby-mirrors-wish.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@spectrum-css/sidenav": patch
3+
"@spectrum-css/tooltip": patch
4+
---
5+
6+
Replace deprecated `word-break: break-word` with `overflow-wrap: break-word` to align with modern CSS standards and improve cross-browser compatibility. This property was deprecated in Chrome 44 (July 2015) in favor of the standardized `overflow-wrap` property.

0 commit comments

Comments
 (0)