Skip to content

Commit 924fc7f

Browse files
authored
feat(dropzone): migrating new S2 tokens, more spaced out dashed lines, more illustrations (#3429)
* feat(dropzone): adding dropzone migration feat(dropzone): s2 migrations feat(dropzone): rebuilding css and cleaning up index chore(dropzone): updating package files feat(dropzone): modify layout and color tokens chore(dropzone): add metadata file chore(dropzone): update files chore(dropzone): restoring image, story and template files * chore(dropzone): update test data * chore(dropzone): storybook build fix and s2 updates * chore(dropzone): adding metadata files * feat(dropzone): adjusting template and css files * chore(dropzone): adding icons * feat(dropzone): fixing svg box, border fallback, whcm fix * chore(dropzone): removing icon dist files * feat(dropzone): updating changeset and modifiers * feat(dropzone): removing illustration mod token using im color * chore(dropzone): restoring s2 files * feat(dropzone): updating whcm mode * feat(dropzone): adding metadata * feat(dropzone): adding filled story desc * feat(dropzone): update changeset, cleaning up template and css files * chore(dropzone): restoring base s2 files * chore(dropzone): restoring global vars and changelog * chore(dropzone): update with new revisions * chore(dropzone): fixing lint error * chore(dropzone): reverting files * chore(dropzone): fixing weird changes * chore(dropzone): fixing weird changes again
1 parent 023efe3 commit 924fc7f

File tree

7 files changed

+264
-228
lines changed

7 files changed

+264
-228
lines changed

.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+
## Dropzone S2 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`
121 KB
Loading

components/dropzone/dist/metadata.json

Lines changed: 31 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -2,166 +2,116 @@
22
"sourceFile": "index.css",
33
"selectors": [
44
".spectrum-DropZone",
5+
".spectrum-DropZone .spectrum-IllustratedMessage",
6+
".spectrum-DropZone-actions",
57
".spectrum-DropZone-button",
8+
".spectrum-DropZone-button .spectrum-Button-label",
69
".spectrum-DropZone-button:focus",
710
".spectrum-DropZone-button:hover",
811
".spectrum-DropZone-content",
12+
".spectrum-DropZone-stroke",
13+
".spectrum-DropZone-strokePath",
914
".spectrum-DropZone.is-dragged",
15+
".spectrum-DropZone.is-dragged .spectrum-DropZone-strokePath",
1016
".spectrum-DropZone.is-filled",
1117
".spectrum-DropZone.is-filled.is-dragged",
18+
".spectrum-DropZone.is-filled.is-dragged .spectrum-DropZone-actions",
19+
".spectrum-DropZone.is-filled.is-dragged .spectrum-DropZone-content",
1220
".spectrum-DropZone:focus-visible",
13-
".spectrum-DropZone:lang(ja)",
14-
".spectrum-DropZone:lang(ko)",
15-
".spectrum-DropZone:lang(zh)"
21+
".spectrum-DropZone:has(.spectrum-DropZone-stroke)"
1622
],
1723
"modifiers": [
1824
"--mod-drop-zone-background-color",
1925
"--mod-drop-zone-background-color-opacity",
2026
"--mod-drop-zone-background-color-opacity-filled",
21-
"--mod-drop-zone-body-color",
22-
"--mod-drop-zone-body-font-family",
2327
"--mod-drop-zone-body-font-size",
24-
"--mod-drop-zone-body-font-style",
25-
"--mod-drop-zone-body-font-weight",
26-
"--mod-drop-zone-body-line-height",
2728
"--mod-drop-zone-body-to-action",
2829
"--mod-drop-zone-border-color",
2930
"--mod-drop-zone-border-color-hover",
31+
"--mod-drop-zone-border-dash-gap",
32+
"--mod-drop-zone-border-dash-length",
3033
"--mod-drop-zone-border-style",
31-
"--mod-drop-zone-border-style--dragged",
3234
"--mod-drop-zone-border-style-dragged",
3335
"--mod-drop-zone-border-width",
3436
"--mod-drop-zone-content-background-color",
3537
"--mod-drop-zone-content-bottom-to-text",
36-
"--mod-drop-zone-content-color",
37-
"--mod-drop-zone-content-display",
38-
"--mod-drop-zone-content-edge-to-text",
3938
"--mod-drop-zone-content-font-family",
4039
"--mod-drop-zone-content-font-size",
41-
"--mod-drop-zone-content-font-style",
4240
"--mod-drop-zone-content-font-weight",
4341
"--mod-drop-zone-content-height",
44-
"--mod-drop-zone-content-line-height",
4542
"--mod-drop-zone-content-max-width",
4643
"--mod-drop-zone-content-maximum-width",
4744
"--mod-drop-zone-content-top-to-text",
4845
"--mod-drop-zone-corner-radius",
49-
"--mod-drop-zone-heading-color",
50-
"--mod-drop-zone-heading-font-family",
51-
"--mod-drop-zone-heading-font-size",
52-
"--mod-drop-zone-heading-font-style",
53-
"--mod-drop-zone-heading-font-weight",
54-
"--mod-drop-zone-heading-line-height",
55-
"--mod-drop-zone-heading-to-body",
56-
"--mod-drop-zone-illustration-color",
46+
"--mod-drop-zone-edge-to-text",
5747
"--mod-drop-zone-illustration-color-hover",
58-
"--mod-drop-zone-illustration-to-heading",
48+
"--mod-drop-zone-inline-size",
5949
"--mod-drop-zone-padding",
60-
"--mod-drop-zone-width"
50+
"--mod-drop-zone-title-line-height"
6151
],
6252
"component": [
6353
"--spectrum-drop-zone-background-color",
6454
"--spectrum-drop-zone-background-color-opacity",
6555
"--spectrum-drop-zone-background-color-opacity-filled",
6656
"--spectrum-drop-zone-background-color-rgb",
67-
"--spectrum-drop-zone-body-color",
68-
"--spectrum-drop-zone-body-font-family",
6957
"--spectrum-drop-zone-body-font-size",
70-
"--spectrum-drop-zone-body-font-style",
71-
"--spectrum-drop-zone-body-font-weight",
72-
"--spectrum-drop-zone-body-line-height",
73-
"--spectrum-drop-zone-body-size",
7458
"--spectrum-drop-zone-body-to-action",
7559
"--spectrum-drop-zone-border-color",
7660
"--spectrum-drop-zone-border-color-hover",
61+
"--spectrum-drop-zone-border-dash-gap",
62+
"--spectrum-drop-zone-border-dash-length",
7763
"--spectrum-drop-zone-border-width",
78-
"--spectrum-drop-zone-cjk-title-size",
64+
"--spectrum-drop-zone-component-height",
7965
"--spectrum-drop-zone-content-background-color",
8066
"--spectrum-drop-zone-content-bottom-to-text",
81-
"--spectrum-drop-zone-content-color",
82-
"--spectrum-drop-zone-content-edge-to-text",
8367
"--spectrum-drop-zone-content-font-family",
8468
"--spectrum-drop-zone-content-font-size",
85-
"--spectrum-drop-zone-content-font-style",
8669
"--spectrum-drop-zone-content-font-weight",
87-
"--spectrum-drop-zone-content-height",
88-
"--spectrum-drop-zone-content-line-height",
8970
"--spectrum-drop-zone-content-max-width",
9071
"--spectrum-drop-zone-content-maximum-width",
9172
"--spectrum-drop-zone-content-top-to-text",
9273
"--spectrum-drop-zone-corner-radius",
93-
"--spectrum-drop-zone-heading-color",
94-
"--spectrum-drop-zone-heading-font-family",
95-
"--spectrum-drop-zone-heading-font-size",
96-
"--spectrum-drop-zone-heading-font-style",
97-
"--spectrum-drop-zone-heading-font-weight",
98-
"--spectrum-drop-zone-heading-line-height",
99-
"--spectrum-drop-zone-heading-to-body",
100-
"--spectrum-drop-zone-illustration-color",
74+
"--spectrum-drop-zone-dragged-background-color",
75+
"--spectrum-drop-zone-edge-to-text",
10176
"--spectrum-drop-zone-illustration-color-hover",
102-
"--spectrum-drop-zone-illustration-to-heading",
103-
"--spectrum-drop-zone-illustration-to-title",
77+
"--spectrum-drop-zone-inline-size",
10478
"--spectrum-drop-zone-padding",
105-
"--spectrum-drop-zone-title-size",
79+
"--spectrum-drop-zone-stroke-dash-gap",
80+
"--spectrum-drop-zone-stroke-dash-length",
81+
"--spectrum-drop-zone-title-line-height",
10682
"--spectrum-drop-zone-width"
10783
],
10884
"global": [
85+
"--spectrum-accent-content-color-default",
10986
"--spectrum-accent-visual-color",
110-
"--spectrum-body-color",
111-
"--spectrum-body-line-height",
112-
"--spectrum-body-sans-serif-font-style",
113-
"--spectrum-body-sans-serif-font-weight",
11487
"--spectrum-bold-font-weight",
11588
"--spectrum-border-width-200",
11689
"--spectrum-component-bottom-to-text-300",
11790
"--spectrum-component-edge-to-text-300",
11891
"--spectrum-component-height-300",
11992
"--spectrum-component-top-to-text-300",
120-
"--spectrum-corner-radius-100",
121-
"--spectrum-default-font-style",
93+
"--spectrum-corner-radius-500",
94+
"--spectrum-corner-radius-700",
12295
"--spectrum-font-size-300",
123-
"--spectrum-gray-200",
124-
"--spectrum-heading-color",
125-
"--spectrum-heading-line-height",
126-
"--spectrum-heading-sans-serif-font-style",
127-
"--spectrum-heading-sans-serif-font-weight",
96+
"--spectrum-gray-300",
12897
"--spectrum-line-height-100",
129-
"--spectrum-neutral-visual-color",
13098
"--spectrum-sans-font-family-stack",
131-
"--spectrum-spacing-200",
13299
"--spectrum-spacing-300",
133-
"--spectrum-spacing-400",
134-
"--spectrum-spacing-75",
135-
"--spectrum-white"
100+
"--spectrum-spacing-400"
136101
],
137102
"passthroughs": [
138-
"--mod-actionbutton-edge-to-text",
139-
"--mod-actionbutton-font-size",
140-
"--mod-actionbutton-label-color",
141-
"--mod-illustrated-message-description-color",
142-
"--mod-illustrated-message-description-font-family",
103+
"--mod-button-border-radius",
143104
"--mod-illustrated-message-description-font-size",
144-
"--mod-illustrated-message-description-font-style",
145-
"--mod-illustrated-message-description-font-weight",
146-
"--mod-illustrated-message-description-line-height",
147105
"--mod-illustrated-message-description-position",
148106
"--mod-illustrated-message-description-to-action",
149107
"--mod-illustrated-message-description-z-index",
150108
"--mod-illustrated-message-display",
151-
"--mod-illustrated-message-heading-to-description",
152109
"--mod-illustrated-message-illustration-color",
153-
"--mod-illustrated-message-illustration-to-heading",
154-
"--mod-illustrated-message-title-color",
155-
"--mod-illustrated-message-title-font-family",
156-
"--mod-illustrated-message-title-font-size",
157-
"--mod-illustrated-message-title-font-style",
158-
"--mod-illustrated-message-title-font-weight",
159-
"--mod-illustrated-message-title-line-height",
160110
"--mod-illustrated-message-vertical-maximum-width"
161111
],
162112
"high-contrast": [
113+
"--highcontrast-drop-zone-border-color",
163114
"--highcontrast-drop-zone-border-color-hover",
164-
"--highcontrast-drop-zone-illustration-color",
165-
"--highcontrast-illustrated-message-illustration-color"
115+
"--highcontrast-drop-zone-button-color"
166116
]
167117
}

0 commit comments

Comments
 (0)