Skip to content

Commit 87d7d99

Browse files
authored
feat(tokens,card): update to @adobe/[email protected] (#3669)
* feat(tokens): update to latest release * feat(card): update styles to use refreshed token
1 parent bc52f28 commit 87d7d99

13 files changed

+426
-188
lines changed

.changeset/puny-kids-rhyme.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
"@spectrum-css/tokens": minor
3+
---
4+
5+
Package update from `@adobe/[email protected]` to `@adobe/[email protected]`.
6+
7+
#### New custom properties
8+
9+
- `--spectrum-card-background-loading-color`
10+
- `--spectrum-card-background-well-color`
11+
- `--spectrum-card-default-width-extra-small`
12+
- `--spectrum-card-default-width-small`
13+
- `--spectrum-card-default-width-medium`
14+
- `--spectrum-card-default-width-large`
15+
- `--spectrum-card-default-width-extra-large`
16+
- `--spectrum-card-description-to-footer`
17+
- `--spectrum-card-edge-to-content-default-extra-small`
18+
- `--spectrum-card-edge-to-content-default-small`
19+
- `--spectrum-card-edge-to-content-default-medium`
20+
- `--spectrum-card-edge-to-content-default-large`
21+
- `--spectrum-card-edge-to-content-default-extra-large`
22+
- `--spectrum-card-edge-to-content-compact-extra-small`
23+
- `--spectrum-card-edge-to-content-compact-small`
24+
- `--spectrum-card-edge-to-content-compact-medium`
25+
- `--spectrum-card-edge-to-content-compact-large`
26+
- `--spectrum-card-edge-to-content-compact-extra-large`
27+
- `--spectrum-card-edge-to-content-spacious-extra-small`
28+
- `--spectrum-card-edge-to-content-spacious-small`
29+
- `--spectrum-card-edge-to-content-spacious-medium`
30+
- `--spectrum-card-edge-to-content-spacious-large`
31+
- `--spectrum-card-edge-to-content-spacious-extra-large`
32+
- `--spectrum-card-header-to-description`
33+
- `--spectrum-card-minimum-width-extra-small`
34+
- `--spectrum-card-minimum-width-small`
35+
- `--spectrum-card-minimum-width-medium`
36+
- `--spectrum-card-minimum-width-large`
37+
- `--spectrum-card-minimum-width-extra-large`
38+
- `--spectrum-card-maximum-width-extra-small`
39+
- `--spectrum-card-maximum-width-small`
40+
- `--spectrum-card-maximum-width-medium`
41+
- `--spectrum-card-maximum-width-large`
42+
- `--spectrum-card-maximum-width-extra-large`
43+
- `--spectrum-card-minimum-height-extra-small`
44+
- `--spectrum-card-minimum-height-small`
45+
- `--spectrum-card-minimum-height-medium`
46+
- `--spectrum-card-minimum-height-large`
47+
- `--spectrum-card-minimum-height-extra-large`
48+
- `--spectrum-card-selection-background-size-small`
49+
- `--spectrum-card-selection-background-size-medium`
50+
- `--spectrum-card-selection-background-size-large`
51+
- `--spectrum-card-selection-background-size-extra-large`
52+
- `--spectrum-collection-card-minimum-height-extra-small`
53+
- `--spectrum-collection-card-minimum-height-small`
54+
- `--spectrum-collection-card-minimum-height-medium`
55+
- `--spectrum-collection-card-minimum-height-large`
56+
- `--spectrum-collection-card-minimum-height-extra-large`
57+
- `--spectrum-collection-card-minimum-height-hero-extra-small`
58+
- `--spectrum-collection-card-minimum-height-hero-small`
59+
- `--spectrum-collection-card-minimum-height-hero-medium`
60+
- `--spectrum-collection-card-minimum-height-hero-large`
61+
- `--spectrum-collection-card-minimum-height-hero-extra-large`
62+
- `--spectrum-segmented-control-item-maximum-width`
63+
- `--spectrum-user-card-minimum-height-small`
64+
- `--spectrum-user-card-minimum-height-medium`
65+
- `--spectrum-user-card-minimum-height-large`
66+
- `--spectrum-user-card-minimum-height-extra-large`
67+
- `--spectrum-user-card-minimum-height-title-below-small`
68+
- `--spectrum-user-card-minimum-height-title-below-medium`
69+
- `--spectrum-user-card-minimum-height-title-below-large`
70+
- `--spectrum-user-card-minimum-height-title-below-extra-large`
71+
72+
#### Updated custom properties
73+
74+
- `--spectrum-card-selection-background-color` was mapped to `var(--spectrum-gray-100)`; updated to:
75+
- light: `var(--spectrum-transparent-white-600)`
76+
- dark: `var(--spectrum-transparent-black-600)`

.changeset/spotty-bats-deny.md

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
"@spectrum-css/card": major
3+
---
4+
5+
Previously:
6+
7+
```css
8+
.spectrum-Card.is-selected::before {
9+
background-color: rgba(
10+
var(
11+
--mod-card-selected-background-color-rgb,
12+
var(--spectrum-card-selected-background-color-rgb)
13+
),
14+
var(--spectrum-card-selected-background-opacity)
15+
);
16+
}
17+
```
18+
19+
Styles now use `--spectrum-card-selection-background-color` which maps to a transparent global property of `--spectrum-transparent-(black|white)-600` depending on color context.
20+
21+
Updated:
22+
23+
```css
24+
.spectrum-Card.is-selected::before {
25+
background-color: var(
26+
--mod-card-background-color-selected,
27+
var(--spectrum-card-selection-background-color)
28+
);
29+
}
30+
```
31+
32+
#### Removed variants
33+
34+
Removed the quiet variant which is no longer supported in Spectrum 2.
35+
36+
#### Removed/replaced properties
37+
38+
- `--mod-card-selected-background-color-rgb`. Use `--mod-card-background-color-selected` to override the selected background color.
39+
- `--mod-card-content-margin-top-quiet`. Use `--mod-card-content-margin-top` with appropriate selectors to override.
40+
- `--mod-card-minimum-width-quiet`. Use `--mod-card-minimum-width` with appropriate selectors to override.
41+
- `--mod-card-actions-background-color-rgb`. No replacement, using token value `--spectrum-card-selection-background-color` directly.
42+
- `--mod-card-actions-background-color-opacity`. No replacement, using token value `--spectrum-card-selection-background-color` directly.

.markdownlint.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "markdownlint/style/prettier",
33
"first-line-h1": false,
4-
"no-inline-html": false,
4+
"no-inline-html": false,
55
"no-bare-urls": false,
66
"no-duplicate-heading": {
77
"siblings_only": true

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
**/.svn
44
**/.hg
55
**/node_modules
6+
yarn.lock
67

78
# Compiled and generated files
89
dist

components/card/dist/metadata.json

+3-26
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,6 @@
2222
".spectrum-Card--horizontal .spectrum-Card-preview",
2323
".spectrum-Card--horizontal .spectrum-Card-title",
2424
".spectrum-Card--horizontal:hover .spectrum-Card-preview",
25-
".spectrum-Card--quiet",
26-
".spectrum-Card--quiet .spectrum-Card-body",
27-
".spectrum-Card--quiet .spectrum-Card-footer",
28-
".spectrum-Card--quiet .spectrum-Card-preview",
29-
".spectrum-Card--quiet .spectrum-Card-preview:after",
30-
".spectrum-Card--quiet .spectrum-Card-preview:before",
31-
".spectrum-Card--quiet.is-drop-target",
32-
".spectrum-Card--quiet.is-drop-target .spectrum-Card-preview",
33-
".spectrum-Card--quiet.is-drop-target .spectrum-Card-preview:before",
34-
".spectrum-Card--quiet.is-focused .spectrum-Card-preview:after",
35-
".spectrum-Card--quiet.is-focused:after",
36-
".spectrum-Card--quiet.is-selected .spectrum-Card-preview",
37-
".spectrum-Card--quiet.is-selected .spectrum-Card-preview:before",
38-
".spectrum-Card--quiet:before",
39-
".spectrum-Card--quiet:focus .spectrum-Card-preview:after",
40-
".spectrum-Card--quiet:focus:after",
41-
".spectrum-Card--quiet:hover .spectrum-Card-preview",
4225
".spectrum-Card-actionButton",
4326
".spectrum-Card-actions",
4427
".spectrum-Card-body",
@@ -55,11 +38,11 @@
5538
".spectrum-Card.is-drop-target",
5639
".spectrum-Card.is-focused .spectrum-Card-actions",
5740
".spectrum-Card.is-focused .spectrum-Card-quickActions",
41+
".spectrum-Card.is-selected",
5842
".spectrum-Card.is-selected .spectrum-Card-actions",
5943
".spectrum-Card.is-selected .spectrum-Card-quickActions",
6044
".spectrum-Card.is-selected:before",
6145
".spectrum-Card.spectrum-Card--gallery",
62-
".spectrum-Card.spectrum-Card--quiet",
6346
".spectrum-Card:after",
6447
".spectrum-Card:before",
6548
".spectrum-Card:focus .spectrum-Card-actions",
@@ -74,8 +57,6 @@
7457
],
7558
"modifiers": [
7659
"--mod-animation-duration-100",
77-
"--mod-card-actions-background-color-opacity",
78-
"--mod-card-actions-background-color-rgb",
7960
"--mod-card-actions-border-radius",
8061
"--mod-card-actions-drop-shadow-blur",
8162
"--mod-card-actions-drop-shadow-color",
@@ -86,6 +67,7 @@
8667
"--mod-card-animation-duration",
8768
"--mod-card-background-color",
8869
"--mod-card-background-color-hover",
70+
"--mod-card-background-color-selected",
8971
"--mod-card-body-font-color",
9072
"--mod-card-body-font-family",
9173
"--mod-card-body-font-size",
@@ -103,7 +85,6 @@
10385
"--mod-card-border-width",
10486
"--mod-card-content-margin-bottom",
10587
"--mod-card-content-margin-top",
106-
"--mod-card-content-margin-top-quiet",
10788
"--mod-card-corner-radius",
10889
"--mod-card-divider-color",
10990
"--mod-card-focus-indicator-color",
@@ -116,7 +97,6 @@
11697
"--mod-card-horizontal-body-padding",
11798
"--mod-card-horizontal-preview-padding",
11899
"--mod-card-minimum-width",
119-
"--mod-card-minimum-width-quiet",
120100
"--mod-card-preview-background-color",
121101
"--mod-card-preview-background-color-hover",
122102
"--mod-card-preview-border-width-selected",
@@ -134,8 +114,6 @@
134114
"--mod-overlay-animation-duration"
135115
],
136116
"component": [
137-
"--spectrum-card-actions-background-color-opacity",
138-
"--spectrum-card-actions-background-color-rgb",
139117
"--spectrum-card-actions-border-radius",
140118
"--spectrum-card-actions-drop-shadow-blur",
141119
"--spectrum-card-actions-drop-shadow-color",
@@ -172,7 +150,7 @@
172150
"--spectrum-card-preview-minimum-height",
173151
"--spectrum-card-selected-background-color-rgb",
174152
"--spectrum-card-selected-background-opacity",
175-
"--spectrum-card-selection-background-color-opacity",
153+
"--spectrum-card-selection-background-color",
176154
"--spectrum-card-selection-background-size",
177155
"--spectrum-card-subtitle-padding-right",
178156
"--spectrum-card-title-font-color",
@@ -202,7 +180,6 @@
202180
"--spectrum-focus-indicator-color",
203181
"--spectrum-focus-indicator-thickness",
204182
"--spectrum-gray-100",
205-
"--spectrum-gray-100-rgb",
206183
"--spectrum-gray-200",
207184
"--spectrum-heading-color",
208185
"--spectrum-heading-line-height",

0 commit comments

Comments
 (0)