Skip to content

Commit de188d5

Browse files
committed
chore(swatch+swatchgroup): drop custom light/dark tokens
1 parent 9a89d4a commit de188d5

File tree

6 files changed

+3
-52
lines changed

6 files changed

+3
-52
lines changed

1

Lines changed: 0 additions & 33 deletions
This file was deleted.

components/swatch/dist/metadata.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@
7676
"--mod-swatch-border-thickness-selected",
7777
"--mod-swatch-disabled-icon-color",
7878
"--mod-swatch-disabled-icon-size",
79-
"--mod-swatch-focus-indicator-border-radius",
8079
"--mod-swatch-focus-indicator-color",
8180
"--mod-swatch-focus-indicator-gap",
8281
"--mod-swatch-focus-indicator-thickness",
@@ -99,10 +98,10 @@
9998
"--spectrum-swatch-disabled-icon-border-opacity",
10099
"--spectrum-swatch-disabled-icon-color",
101100
"--spectrum-swatch-disabled-icon-size",
102-
"--spectrum-swatch-focus-indicator-border-radius",
103101
"--spectrum-swatch-focus-indicator-color",
104102
"--spectrum-swatch-focus-indicator-gap",
105103
"--spectrum-swatch-focus-indicator-thickness",
104+
"--spectrum-swatch-group-border-color",
106105
"--spectrum-swatch-icon-border-color",
107106
"--spectrum-swatch-icon-color",
108107
"--spectrum-swatch-inner-border-color-selected",

components/swatch/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
/* @note: default sizing for swatch is small */
1515
.spectrum-Swatch {
1616
/* Placeholder tokens */
17-
--spectrum-swatch-focus-indicator-border-radius: var(--mod-swatch-focus-indicator-border-radius, 8px);
1817
--spectrum-swatch-icon-border-color: var(--mod-swatch-icon-border-color, rgb(0 0 0 / var(--spectrum-swatch-disabled-icon-border-opacity)));
1918

2019
/* Size */
@@ -37,6 +36,7 @@
3736
--spectrum-add-button-background-hover: var(--spectrum-gray-200);
3837
--spectrum-add-button-background-down: var(--spectrum-gray-200);
3938
--spectrum-add-button-background-keyboard-focus: var(--spectrum-gray-200);
39+
--spectrum-swatch-border-color-light: rgb(var(--spectrum-swatch-group-border-color) / 42%);
4040

4141
/* Focus ring */
4242
--spectrum-swatch-focus-indicator-color: var(--highcontrast-swatch-focus-indicator-color, var(--mod-swatch-focus-indicator-color, var(--spectrum-focus-indicator-color)));

components/swatch/stories/template.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,8 @@ export const Template = ({
8080
@click=${function() {
8181
updateArgs({ isSelected: !isSelected });
8282
}}
83-
@focusin=${function() {
84-
updateArgs({ isKeyboardFocused: true });
85-
}}
8683
@focusout=${function() {
87-
updateArgs({ isKeyboardFocused: false });
84+
updateArgs({ isSelected: false });
8885
}}
8986
@keypress=${function(e) {
9087
if (e.key !== "Enter" && e.key !== " ") return;

tokens/custom/dark-vars.css

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@
5757

5858
--spectrum-steplist-current-marker-color-key-focus: var(--spectrum-blue-700);
5959

60-
--spectrum-swatch-border-color: rgb(255 255 255 / 51%);
61-
--spectrum-swatch-border-color-light: rgb(255 255 255 / 42%);
62-
63-
/**
64-
* `--spectrum-swatch-group-border-color` / `--spectrum-swatch-group-border-opacity`
65-
*/
6660
--spectrum-swatchgroup-border-color: rgb(255 255 255 / 20%);
6761

6862
--spectrum-treeview-item-background-color-quiet-selected: rgb(var(--spectrum-gray-900-rgb), 0.07);

tokens/custom/light-vars.css

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@
5555

5656
--spectrum-steplist-current-marker-color-key-focus: var(--spectrum-blue-800);
5757

58-
--spectrum-swatch-border-color: rgb(0 0 0 / 51%);
59-
--spectrum-swatch-border-color-light: rgb(0 0 0 / 42%);
60-
61-
/**
62-
* `--spectrum-swatch-group-border-color` / `--spectrum-swatch-group-border-opacity`
63-
*/
6458
--spectrum-swatchgroup-border-color: rgb(255 255 255 / 20%);
6559

6660
--spectrum-treeview-item-background-color-quiet-selected: rgb(var(--spectrum-gray-900-rgb), 0.06);

0 commit comments

Comments
 (0)