Skip to content

Commit e1d180c

Browse files
jianliaoJian Liao
andauthored
fix: fix the issues caused by component rename (#778)
* fix: fix the issues caused by component rename * fix: fix package security vulnerabilities Co-authored-by: Jian Liao <jianliao@adobe.com>
1 parent 0b2064c commit e1d180c

File tree

31 files changed

+237
-204
lines changed

31 files changed

+237
-204
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,10 @@ Each component has a `dist/vars.css` file that contains declarations for each co
138138

139139
As such, **you do not need to include `dist/vars.css`** unless:
140140

141-
1. You wish to reference the component-level variables used by a component in external CSS (i.e. `--spectrum-rule-medium-height`)
142-
2. You have upgraded `@spectrum-css/vars`, but have not updated a component (such as `@spectrum-css/rule`) and do not want to update the component-level variables used by that component
141+
1. You wish to reference the component-level variables used by a component in external CSS (i.e. `--spectrum-divider-medium-height`)
142+
2. You have upgraded `@spectrum-css/vars`, but have not updated a component (such as `@spectrum-css/divider`) and do not want to update the component-level variables used by that component
143143

144-
When this file is imported, if in updated version of `@spectrum-css/vars` changed global variables (such as a global color, `--spectrum-global-color-gray-300`), you will get those updates. However, if the updated version of `@spectrum-css/vars` changed component-level variables (such as the height of a medium Rule, `--spectrum-rule-medium-height`), you will not get those updates. As such, this file can be used to lock-in the basic visual style of a component while still allowing for system-level updates.
144+
When this file is imported, if in updated version of `@spectrum-css/vars` changed global variables (such as a global color, `--spectrum-global-color-gray-300`), you will get those updates. However, if the updated version of `@spectrum-css/vars` changed component-level variables (such as the height of a medium divider, `--spectrum-divider-medium-height`), you will not get those updates. As such, this file can be used to lock-in the basic visual style of a component while still allowing for system-level updates.
145145

146146
In most cases, this file will not be required, so you can safely ignore it. If you see unexpected visual changes creeping into components that you have not updated, `dist/vars.css` may correct them.
147147

backstop_data/backstop_scenarios.json

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@
183183
"package": "@spectrum-css/dialog"
184184
},
185185
{
186-
"label": "dropdown",
187-
"url": "dropdown.html",
188-
"package": "@spectrum-css/dropdown"
186+
"label": "divider",
187+
"url": "divider.html",
188+
"package": "@spectrum-css/divider"
189189
},
190190
{
191191
"label": "dropindicator",
@@ -271,6 +271,11 @@
271271
"url": "miller.html",
272272
"package": "@spectrum-css/miller"
273273
},
274+
{
275+
"label": "modal",
276+
"url": "modal.html",
277+
"package": "@spectrum-css/modal"
278+
},
274279
{
275280
"label": "page",
276281
"url": "page.html",
@@ -291,6 +296,11 @@
291296
"url": "pagination-listing.html",
292297
"package": "@spectrum-css/pagination"
293298
},
299+
{
300+
"label": "picker",
301+
"url": "picker.html",
302+
"package": "@spectrum-css/picker"
303+
},
294304
{
295305
"label": "popover",
296306
"url": "popover.html",
@@ -311,11 +321,6 @@
311321
"url": "rating.html",
312322
"package": "@spectrum-css/rating"
313323
},
314-
{
315-
"label": "rule",
316-
"url": "rule.html",
317-
"package": "@spectrum-css/rule"
318-
},
319324
{
320325
"label": "search",
321326
"url": "search.html",
@@ -406,6 +411,11 @@
406411
"url": "tooltip.html",
407412
"package": "@spectrum-css/tooltip"
408413
},
414+
{
415+
"label": "tray",
416+
"url": "tray.html",
417+
"package": "@spectrum-css/tray"
418+
},
409419
{
410420
"label": "treeview",
411421
"url": "treeview.html",

backstop_data/packageDependentMap.json

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@
6363
"@spectrum-css/coachmark",
6464
"@spectrum-css/cyclebutton",
6565
"@spectrum-css/dialog",
66-
"@spectrum-css/dropdown",
66+
"@spectrum-css/divider",
6767
"@spectrum-css/inputgroup",
6868
"@spectrum-css/pagination",
69+
"@spectrum-css/picker",
6970
"@spectrum-css/popover",
7071
"@spectrum-css/quickaction",
71-
"@spectrum-css/rule",
7272
"@spectrum-css/search",
7373
"@spectrum-css/searchwithin",
7474
"@spectrum-css/splitbutton",
@@ -81,7 +81,7 @@
8181
"@spectrum-css/buttongroup",
8282
[
8383
"@spectrum-css/dialog",
84-
"@spectrum-css/rule"
84+
"@spectrum-css/divider"
8585
]
8686
],
8787
[
@@ -146,15 +146,16 @@
146146
[
147147
"@spectrum-css/dialog",
148148
[
149-
"@spectrum-css/popover"
149+
"@spectrum-css/popover",
150+
"@spectrum-css/tray"
150151
]
151152
],
152153
[
153-
"@spectrum-css/dropdown",
154+
"@spectrum-css/divider",
154155
[
155-
"@spectrum-css/fieldlabel",
156-
"@spectrum-css/searchwithin",
157-
"@spectrum-css/tabs"
156+
"@spectrum-css/dialog",
157+
"@spectrum-css/popover",
158+
"@spectrum-css/tray"
158159
]
159160
],
160161
[
@@ -193,8 +194,8 @@
193194
"@spectrum-css/menu",
194195
[
195196
"@spectrum-css/actionmenu",
196-
"@spectrum-css/dropdown",
197197
"@spectrum-css/inputgroup",
198+
"@spectrum-css/picker",
198199
"@spectrum-css/popover",
199200
"@spectrum-css/tabs"
200201
]
@@ -203,6 +204,13 @@
203204
"@spectrum-css/miller",
204205
[]
205206
],
207+
[
208+
"@spectrum-css/modal",
209+
[
210+
"@spectrum-css/dialog",
211+
"@spectrum-css/tray"
212+
]
213+
],
206214
[
207215
"@spectrum-css/page",
208216
[]
@@ -211,13 +219,21 @@
211219
"@spectrum-css/pagination",
212220
[]
213221
],
222+
[
223+
"@spectrum-css/picker",
224+
[
225+
"@spectrum-css/fieldlabel",
226+
"@spectrum-css/searchwithin",
227+
"@spectrum-css/tabs"
228+
]
229+
],
214230
[
215231
"@spectrum-css/popover",
216232
[
217233
"@spectrum-css/actionbar",
218234
"@spectrum-css/actionmenu",
219-
"@spectrum-css/dropdown",
220-
"@spectrum-css/inputgroup"
235+
"@spectrum-css/inputgroup",
236+
"@spectrum-css/picker"
221237
]
222238
],
223239
[
@@ -237,10 +253,6 @@
237253
"@spectrum-css/rating",
238254
[]
239255
],
240-
[
241-
"@spectrum-css/rule",
242-
[]
243-
],
244256
[
245257
"@spectrum-css/search",
246258
[]
@@ -326,6 +338,10 @@
326338
"@spectrum-css/steplist"
327339
]
328340
],
341+
[
342+
"@spectrum-css/tray",
343+
[]
344+
],
329345
[
330346
"@spectrum-css/treeview",
331347
[]

bundles/spectrum-css-compat/diff.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ cd $CWD
2222
# components=$(ls components/)
2323

2424
# Ignores commons, other new components
25-
components="accordion checkbox fieldlabel rule stepper
25+
components="accordion checkbox fieldlabel divider stepper
2626
actionbar circleloader search table
2727
actionmenu coachmark illustratedmessage searchwithin tabs
2828
alert inputgroup sidenav tags
@@ -32,7 +32,7 @@ avatar menu toggle
3232
banner cyclebutton miller tooltip
3333
barloader decoratedtextfield page treeview
3434
breadcrumb dialog pagination typography
35-
button dropdown popover splitbutton underlay
35+
button picker popover splitbutton underlay
3636
buttongroup dropindicator quickaction splitview well
3737
calendar dropzone radio statuslight
3838
card fieldgroup rating steplist"

components/button/index.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,13 @@ a.spectrum-ActionButton {
264264
.spectrum-FieldButton {
265265
@inherit: %spectrum-BaseButton;
266266

267-
block-size: var(--spectrum-dropdown-height);
267+
block-size: var(--spectrum-picker-height);
268268

269-
padding: 0 var(--spectrum-dropdown-padding-x);
269+
padding: 0 var(--spectrum-picker-padding-x);
270270

271271
font-family: inherit;
272272
font-weight: normal;
273-
font-size: var(--spectrum-dropdown-text-size);
273+
font-size: var(--spectrum-picker-text-size);
274274
line-height: normal;
275275
-webkit-font-smoothing: initial;
276276

@@ -281,9 +281,9 @@ a.spectrum-ActionButton {
281281
.spectrum-FieldButton {
282282
margin: 0;
283283
padding-block: 0;
284-
padding-inline: var(--spectrum-dropdown-padding-x);
284+
padding-inline: var(--spectrum-picker-padding-x);
285285

286-
border-width: var(--spectrum-dropdown-border-size);
286+
border-width: var(--spectrum-picker-border-size);
287287
border-style: solid;
288288
border-radius: var(--spectrum-border-radius);
289289

@@ -298,7 +298,7 @@ a.spectrum-ActionButton {
298298
}
299299

300300
&.is-open {
301-
border-width: var(--spectrum-dropdown-border-size);
301+
border-width: var(--spectrum-picker-border-size);
302302
}
303303
}
304304

0 commit comments

Comments
 (0)