Skip to content

Commit 2f762fc

Browse files
jawinncastastrophe
authored andcommitted
fix: restore undefined custom properties [part 4] (#3473)
* fix(search): restore missing custom properties * fix(colorwheel): restore missing custom properties * fix(assetcard): restore missing custom properties * fix(treeview): restore missing custom properties Restore missing properties from foundations that were flagged by the linter. * fix(combobox): restore missing custom properties Restore missing properties from foundations that were flagged by the linter. Also removes a group of duplicate custom property definitions that were flagged.
1 parent 7bd2503 commit 2f762fc

File tree

11 files changed

+57
-16
lines changed

11 files changed

+57
-16
lines changed

.changeset/healthy-zebras-unite.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"@spectrum-css/colorwheel": patch
3+
"@spectrum-css/assetcard": patch
4+
"@spectrum-css/combobox": patch
5+
"@spectrum-css/treeview": patch
6+
"@spectrum-css/search": patch
7+
---
8+
9+
Restores missing custom properties that were flagged by the linter. The missing properties were copied from the spectrum two theme files in the foundations branch. This clears up all linter errors and warnings for these components.

components/assetcard/dist/metadata.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@
123123
"--spectrum-assetcard-header-content-text-color",
124124
"--spectrum-assetcard-header-margin-block-start",
125125
"--spectrum-assetcard-overlay-background-color",
126+
"--spectrum-assetcard-overlay-background-color-opacity",
127+
"--spectrum-assetcard-overlay-background-color-rgb",
126128
"--spectrum-assetcard-selectionindicator-background-color-default",
127129
"--spectrum-assetcard-selectionindicator-background-color-ordered",
128130
"--spectrum-assetcard-selectionindicator-blur",
@@ -157,10 +159,11 @@
157159
"--spectrum-default-font-style",
158160
"--spectrum-focus-indicator-thickness",
159161
"--spectrum-font-size-400",
160-
"--spectrum-gray-100",
161162
"--spectrum-gray-500",
162163
"--spectrum-gray-600",
163164
"--spectrum-gray-700",
165+
"--spectrum-gray-75",
166+
"--spectrum-gray-75-rgb",
164167
"--spectrum-gray-900",
165168
"--spectrum-heading-cjk-font-style",
166169
"--spectrum-heading-cjk-font-weight",
@@ -172,6 +175,7 @@
172175
"--spectrum-sans-font-family-stack",
173176
"--spectrum-spacing-300",
174177
"--spectrum-spacing-75",
178+
"--spectrum-transparent-black-300",
175179
"--spectrum-white"
176180
],
177181
"passthroughs": [],

components/assetcard/index.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
.spectrum-AssetCard {
1616
/* todo: this isn't quite the size from the XD file as 232px is not a size token, so we use 224px */
1717
--spectrum-assetcard-asset-size: 224px;
18-
--spectrum-assetcard-background-color: var(--spectrum-gray-100);
18+
--spectrum-assetcard-background-color: var(--spectrum-gray-75);
19+
--spectrum-assetcard-overlay-background-color: rgba(27 127 245 / 10%);
1920
--spectrum-assetcard-asset-animation-duration: var(--spectrum-animation-duration-100);
2021
--spectrum-assetcard-asset-container-border-size: 1px;
2122
--spectrum-assetcard-header-margin-block-start: var(--spectrum-spacing-300);
@@ -36,6 +37,8 @@
3637
--spectrum-assetcard-selectionindicator-color: var(--spectrum-white);
3738
--spectrum-assetcard-selectionindicator-font-weight: var(--spectrum-bold-font-weight);
3839
--spectrum-assetcard-selectionindicator-font-size: var(--spectrum-font-size-400);
40+
--spectrum-assetcard-selectionindicator-background-color-default: rgba(var(--spectrum-gray-75-rgb), 0.9);
41+
--spectrum-assetcard-selectionindicator-box-shadow-color: var(--spectrum-transparent-black-300);
3942

4043
/* title */
4144
--spectrum-assetcard-title-text-color: var(--spectrum-gray-900);

components/colorwheel/dist/metadata.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"global": [
4848
"--spectrum-border-width-100",
4949
"--spectrum-color-control-track-width",
50-
"--spectrum-disabled-background-color"
50+
"--spectrum-disabled-background-color",
51+
"--spectrum-transparent-black-300"
5152
],
5253
"passthroughs": [],
5354
"high-contrast": [

components/colorwheel/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
--spectrum-colorwheel-width: var(--mod-colorwheel-width, var(--spectrum-color-wheel-width));
2626
--spectrum-colorwheel-height: var(--mod-colorwheel-height, var(--spectrum-color-wheel-width));
2727
--spectrum-colorwheel-fill-color-disabled: var(--mod-colorwheel-fill-color-disabled, var(--spectrum-disabled-background-color));
28+
--spectrum-colorwheel-border-color: var(--spectrum-transparent-black-300);
2829

2930
--spectrum-colorwheel-border-width: var(--mod-colorwheel-border-width, var(--spectrum-border-width-100));
3031
--spectrum-colorwheel-track-width: var(--mod-colorwheel-track-width, var(--spectrum-color-control-track-width));

components/combobox/dist/metadata.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,12 @@
230230
"--spectrum-font-size-200",
231231
"--spectrum-font-size-300",
232232
"--spectrum-font-size-75",
233+
"--spectrum-gray-25",
233234
"--spectrum-gray-50",
234235
"--spectrum-gray-500",
236+
"--spectrum-gray-600",
237+
"--spectrum-gray-800",
238+
"--spectrum-gray-900",
235239
"--spectrum-line-height-100",
236240
"--spectrum-negative-border-color-default",
237241
"--spectrum-negative-border-color-focus",

components/combobox/index.css

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@
4040
--spectrum-combobox-font-style: var(--spectrum-default-font-style);
4141
--spectrum-combobox-line-height: var(--spectrum-line-height-100);
4242

43+
--spectrum-combobox-background-color-disabled: var(--spectrum-gray-25);
44+
45+
--spectrum-combobox-border-color-default: var(--spectrum-gray-500);
46+
--spectrum-combobox-border-color-hover: var(--spectrum-gray-600);
47+
--spectrum-combobox-border-color-focus: var(--spectrum-gray-800);
48+
--spectrum-combobox-border-color-focus-hover: var(--spectrum-gray-900);
49+
--spectrum-combobox-border-color-key-focus: var(--spectrum-gray-800);
50+
4351
--spectrum-combobox-border-color-invalid-default: var(--spectrum-negative-border-color-default);
4452
--spectrum-combobox-border-color-invalid-hover: var(--spectrum-negative-border-color-hover);
4553
--spectrum-combobox-border-color-invalid-focus: var(--spectrum-negative-border-color-focus);
@@ -96,19 +104,6 @@
96104
--spectrum-combobox-readonly-background-color-disabled: var(--spectrum-disabled-background-color);
97105
--spectrum-combobox-readonly-text-color-disabled: var(--spectrum-disabled-content-color);
98106
--spectrum-combobox-border-color-disabled: var(--spectrum-disabled-border-color);
99-
100-
--spectrum-combobox-block-size: var(--spectrum-component-height-100);
101-
--spectrum-combobox-icon-size: var(--spectrum-workflow-icon-size-100);
102-
--spectrum-combobox-font-size: var(--spectrum-font-size-100);
103-
104-
--spectrum-combobox-spacing-inline-icon-to-button: var(--spectrum-combo-box-visual-to-field-button-medium);
105-
--spectrum-combobox-block-spacing-edge-to-progress-circle: var(--spectrum-field-top-to-progress-circle-medium);
106-
--spectrum-combobox-block-spacing-edge-to-alert: var(--spectrum-field-top-to-alert-icon-medium);
107-
--spectrum-combobox-spacing-edge-to-menu: var(--spectrum-component-to-menu-medium);
108-
--spectrum-combobox-spacing-block-start-edge-to-text: var(--spectrum-component-top-to-text-100);
109-
--spectrum-combobox-spacing-block-end-edge-to-text: var(--spectrum-component-bottom-to-text-100);
110-
--spectrum-combobox-spacing-inline-start-edge-to-text: var(--spectrum-component-edge-to-text-100);
111-
--spectrum-combobox-spacing-inline-end-edge-to-text: var(--spectrum-component-edge-to-text-100);
112107
}
113108

114109
.spectrum-Combobox--sizeS {

components/search/dist/metadata.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,16 @@
103103
"global": [
104104
"--spectrum-border-width-100",
105105
"--spectrum-component-bottom-to-text-100",
106+
"--spectrum-component-edge-to-visual-100",
107+
"--spectrum-component-edge-to-visual-200",
108+
"--spectrum-component-edge-to-visual-300",
109+
"--spectrum-component-edge-to-visual-75",
106110
"--spectrum-component-height-100",
107111
"--spectrum-component-height-200",
108112
"--spectrum-component-height-300",
109113
"--spectrum-component-height-75",
110114
"--spectrum-component-top-to-text-100",
115+
"--spectrum-corner-radius-100",
111116
"--spectrum-default-font-style",
112117
"--spectrum-disabled-background-color",
113118
"--spectrum-disabled-border-color",
@@ -118,6 +123,10 @@
118123
"--spectrum-focus-indicator-gap",
119124
"--spectrum-focus-indicator-thickness",
120125
"--spectrum-gray-25",
126+
"--spectrum-gray-500",
127+
"--spectrum-gray-600",
128+
"--spectrum-gray-800",
129+
"--spectrum-gray-900",
121130
"--spectrum-help-text-to-component",
122131
"--spectrum-line-height-100",
123132
"--spectrum-neutral-content-color-default",

components/search/index.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
--spectrum-search-to-help-text: var(--spectrum-help-text-to-component);
2424
--spectrum-search-top-to-text: var(--spectrum-component-top-to-text-100);
2525
--spectrum-search-bottom-to-text: var(--spectrum-component-bottom-to-text-100);
26+
--spectrum-search-border-radius: var(--spectrum-corner-radius-100);
27+
--spectrum-search-edge-to-visual: var(--spectrum-component-edge-to-visual-100);
2628

2729
/* Focus Indicator */
2830
--spectrum-search-focus-indicator-thickness: var(--spectrum-focus-indicator-thickness);
@@ -41,6 +43,12 @@
4143
--spectrum-search-color-focus-hover: var(--spectrum-neutral-content-color-focus-hover);
4244
--spectrum-search-color-key-focus: var(--spectrum-neutral-content-color-key-focus);
4345

46+
--spectrum-search-border-color-default: var(--spectrum-gray-500);
47+
--spectrum-search-border-color-hover: var(--spectrum-gray-600);
48+
--spectrum-search-border-color-focus: var(--spectrum-gray-800);
49+
--spectrum-search-border-color-focus-hover: var(--spectrum-gray-900);
50+
--spectrum-search-border-color-key-focus: var(--spectrum-gray-900);
51+
4452
/* Background and Border */
4553
--spectrum-search-border-width: var(--spectrum-border-width-100);
4654
--spectrum-search-background-color: var(--spectrum-gray-25);
@@ -93,18 +101,21 @@
93101
--spectrum-search-block-size: var(--spectrum-component-height-75);
94102
--spectrum-search-icon-size: var(--spectrum-workflow-icon-size-75);
95103
--spectrum-search-text-to-icon: var(--spectrum-text-to-visual-75);
104+
--spectrum-search-edge-to-visual: var(--spectrum-component-edge-to-visual-75);
96105
}
97106

98107
.spectrum-Search--sizeL {
99108
--spectrum-search-block-size: var(--spectrum-component-height-200);
100109
--spectrum-search-icon-size: var(--spectrum-workflow-icon-size-200);
101110
--spectrum-search-text-to-icon: var(--spectrum-text-to-visual-200);
111+
--spectrum-search-edge-to-visual: var(--spectrum-component-edge-to-visual-200);
102112
}
103113

104114
.spectrum-Search--sizeXL {
105115
--spectrum-search-block-size: var(--spectrum-component-height-300);
106116
--spectrum-search-icon-size: var(--spectrum-workflow-icon-size-300);
107117
--spectrum-search-text-to-icon: var(--spectrum-text-to-visual-300);
118+
--spectrum-search-edge-to-visual: var(--spectrum-component-edge-to-visual-300);
108119
}
109120

110121
@media (forced-colors: active) {

components/treeview/dist/metadata.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@
157157
"--spectrum-font-size-200",
158158
"--spectrum-font-size-300",
159159
"--spectrum-font-size-75",
160+
"--spectrum-gray-100",
160161
"--spectrum-gray-500",
161162
"--spectrum-gray-700",
162163
"--spectrum-gray-900",

0 commit comments

Comments
 (0)