@slotted/styles 0.1.0-beta.0 → 0.1.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/accordion/accordion.css +10 -10
- package/src/action-bar/action-bar.css +31 -32
- package/src/action-sheet/action-sheet.css +36 -36
- package/src/alert/alert.css +43 -35
- package/src/alert/alert.tokens.json +5 -0
- package/src/app-shell/app-shell.css +356 -301
- package/src/aspect-ratio/aspect-ratio.css +9 -9
- package/src/attachment/attachment.css +91 -99
- package/src/avatar/avatar.css +71 -41
- package/src/avatar/avatar.tokens.json +7 -0
- package/src/avatar-group/avatar-group.css +21 -22
- package/src/badge/badge.css +45 -37
- package/src/badge/badge.tokens.json +5 -0
- package/src/breadcrumb/breadcrumb.css +37 -37
- package/src/button/button.css +139 -64
- package/src/button/button.tokens.json +10 -0
- package/src/button-group/button-group.css +76 -72
- package/src/button-group/button-group.tokens.json +2 -0
- package/src/calendar/calendar.css +93 -103
- package/src/card/card.css +54 -61
- package/src/carousel/carousel.css +150 -161
- package/src/cascader/cascader.css +152 -153
- package/src/cascader/cascader.tokens.json +1 -0
- package/src/chart/chart.css +242 -239
- package/src/chart/chart.tokens.json +1 -0
- package/src/checkbox/checkbox.css +119 -124
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/code-block/code-block.css +81 -85
- package/src/collapsible/collapsible.css +69 -76
- package/src/color-picker/color-picker.css +83 -91
- package/src/column-manager/column-manager.css +106 -114
- package/src/combobox/combobox.css +132 -107
- package/src/combobox/combobox.tokens.json +1 -0
- package/src/command-palette/command-palette.css +84 -90
- package/src/container/container.css +24 -24
- package/src/context-menu/context-menu.css +8 -8
- package/src/currency-field/currency-field.css +210 -88
- package/src/currency-field/currency-field.tokens.json +13 -0
- package/src/dashboard-grid/dashboard-grid.css +148 -116
- package/src/data-grid/data-grid.css +504 -469
- package/src/data-grid/data-grid.tokens.json +2 -0
- package/src/data-list/data-list.css +81 -70
- package/src/data-list/data-list.tokens.json +2 -1
- package/src/date-field/date-field.css +55 -52
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +40 -42
- package/src/date-range-picker/date-range-picker.css +114 -118
- package/src/datetime-field/datetime-field.css +78 -80
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +61 -63
- package/src/datetime-range-picker/datetime-range-picker.css +149 -156
- package/src/description-list/description-list.css +61 -64
- package/src/detail-panel/detail-panel.css +70 -70
- package/src/dialog/dialog.css +334 -153
- package/src/dialog/dialog.tokens.json +5 -0
- package/src/divider/divider.css +18 -18
- package/src/drawer/drawer.css +186 -209
- package/src/entity-picker/entity-picker.css +238 -241
- package/src/entity-picker/entity-picker.tokens.json +1 -0
- package/src/event-calendar/event-calendar.css +343 -385
- package/src/field/field.css +74 -78
- package/src/field-group/field-group.css +22 -25
- package/src/filter-bar/filter-bar.css +193 -209
- package/src/form/form.css +34 -24
- package/src/form/form.tokens.json +1 -0
- package/src/fullscreen/fullscreen.css +24 -25
- package/src/grid/grid.css +28 -28
- package/src/highlight/highlight.css +6 -6
- package/src/hover-card/hover-card.css +6 -6
- package/src/icon/icon.css +19 -15
- package/src/icon/icon.tokens.json +1 -0
- package/src/image/image.css +39 -39
- package/src/import-export-center/import-export-center.css +135 -156
- package/src/inline/inline.css +27 -27
- package/src/inline-message/inline-message.css +52 -28
- package/src/inline-message/inline-message.tokens.json +4 -0
- package/src/kbd/kbd.css +30 -26
- package/src/link/link.css +15 -15
- package/src/list/list.css +44 -17
- package/src/list/list.tokens.json +4 -0
- package/src/list-item/list-item.css +80 -66
- package/src/list-item/list-item.tokens.json +7 -0
- package/src/listbox/listbox.css +56 -59
- package/src/loading-overlay/loading-overlay.css +75 -92
- package/src/markdown/markdown.css +17 -17
- package/src/menu/menu.css +83 -63
- package/src/menubar/menubar.css +13 -13
- package/src/message/message.css +182 -202
- package/src/message/message.tokens.json +5 -0
- package/src/message-scroller/message-scroller.css +41 -42
- package/src/multi-select/multi-select.css +152 -145
- package/src/multi-select/multi-select.tokens.json +1 -0
- package/src/navigation-menu/navigation-menu.css +167 -188
- package/src/notification-center/notification-center.css +140 -148
- package/src/notification-center/notification-center.tokens.json +3 -0
- package/src/number-field/number-field.css +84 -83
- package/src/number-field/number-field.tokens.json +1 -0
- package/src/otp-input/otp-input.css +67 -57
- package/src/otp-input/otp-input.tokens.json +1 -0
- package/src/page/page.css +23 -23
- package/src/page-header/page-header.css +268 -281
- package/src/page-header/page-header.tokens.json +1 -0
- package/src/pagination/pagination.css +68 -72
- package/src/popover/popover.css +40 -49
- package/src/progress-indicator/progress-indicator.css +177 -120
- package/src/progress-indicator/progress-indicator.tokens.json +1 -1
- package/src/prompt-composer/prompt-composer.css +221 -102
- package/src/prompt-composer/prompt-composer.tokens.json +15 -0
- package/src/prose/prose.css +71 -75
- package/src/radio-group/radio-group.css +98 -103
- package/src/rating/rating.css +136 -132
- package/src/rating/rating.tokens.json +1 -0
- package/src/result-state/result-state.css +74 -77
- package/src/runtime-properties.mjs +2 -0
- package/src/saved-views/saved-views.css +41 -47
- package/src/scroll-area/scroll-area.css +39 -32
- package/src/section/section.css +161 -41
- package/src/section/section.tokens.json +7 -2
- package/src/segmented-control/segmented-control.css +254 -97
- package/src/segmented-control/segmented-control.tokens.json +15 -11
- package/src/select/select.css +118 -117
- package/src/select/select.tokens.json +1 -0
- package/src/side-navigation/side-navigation.css +179 -182
- package/src/side-navigation/side-navigation.tokens.json +1 -0
- package/src/skeleton/skeleton.css +47 -48
- package/src/slider/slider.css +86 -88
- package/src/sparkline/sparkline.css +62 -40
- package/src/sparkline/sparkline.tokens.json +2 -0
- package/src/spinner/spinner.css +39 -182
- package/src/spinner/spinner.tokens.json +0 -2
- package/src/split-button/split-button.css +30 -31
- package/src/split-button/split-button.tokens.json +1 -0
- package/src/splitter/splitter.css +35 -35
- package/src/stack/stack.css +24 -24
- package/src/stat-card/stat-card.css +341 -224
- package/src/stat-card/stat-card.tokens.json +3 -0
- package/src/status-indicator/status-indicator.css +28 -28
- package/src/stepper/stepper.css +58 -62
- package/src/switch/switch.css +86 -92
- package/src/table/table.css +310 -165
- package/src/table/table.tokens.json +6 -0
- package/src/table-of-contents/table-of-contents.css +51 -54
- package/src/tabs/tabs.css +330 -302
- package/src/tabs/tabs.tokens.json +8 -5
- package/src/tag/tag.css +79 -71
- package/src/tag/tag.tokens.json +9 -0
- package/src/tags-input/tags-input.css +145 -82
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +132 -136
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +31 -28
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +72 -69
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +56 -58
- package/src/time-range-picker/time-range-picker.css +126 -133
- package/src/timeline/timeline.css +254 -266
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +89 -90
- package/src/toast/toast.tokens.json +5 -0
- package/src/toggle/toggle.css +62 -25
- package/src/toggle/toggle.tokens.json +8 -0
- package/src/toggle-group/toggle-group.css +106 -60
- package/src/toggle-group/toggle-group.tokens.json +10 -0
- package/src/toolbar/toolbar.css +30 -35
- package/src/tooltip/tooltip.css +26 -26
- package/src/top-navigation/top-navigation.css +243 -259
- package/src/tour/tour.css +51 -60
- package/src/transfer/transfer.css +160 -164
- package/src/tree/tree.css +103 -111
- package/src/typography/typography.css +40 -36
- package/src/typography/typography.tokens.json +1 -0
- package/src/upload/upload.css +224 -224
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +185 -197
|
@@ -31,14 +31,15 @@
|
|
|
31
31
|
"--slotted-disabled-background",
|
|
32
32
|
"--slotted-disabled-border",
|
|
33
33
|
"--slotted-disabled-foreground",
|
|
34
|
+
"--slotted-duration-medium",
|
|
34
35
|
"--slotted-duration-short",
|
|
35
36
|
"--slotted-easing-enter",
|
|
36
37
|
"--slotted-focus-ring-color",
|
|
37
38
|
"--slotted-focus-ring-offset",
|
|
38
39
|
"--slotted-focus-ring-width",
|
|
40
|
+
"--slotted-radius-full",
|
|
39
41
|
"--slotted-radius-md",
|
|
40
42
|
"--slotted-radius-sm",
|
|
41
|
-
"--slotted-radius-xs",
|
|
42
43
|
"--slotted-shadow-xs",
|
|
43
44
|
"--slotted-space-1",
|
|
44
45
|
"--slotted-space-2",
|
|
@@ -62,21 +63,23 @@
|
|
|
62
63
|
"--slotted-tabs-hover-background",
|
|
63
64
|
"--slotted-tabs-hover-color",
|
|
64
65
|
"--slotted-tabs-hover-marker-color",
|
|
66
|
+
"--slotted-tabs-hover-marker-opacity",
|
|
65
67
|
"--slotted-tabs-list-gap",
|
|
66
68
|
"--slotted-tabs-marker-color",
|
|
69
|
+
"--slotted-tabs-marker-easing",
|
|
70
|
+
"--slotted-tabs-marker-inset",
|
|
71
|
+
"--slotted-tabs-marker-offset",
|
|
72
|
+
"--slotted-tabs-marker-radius",
|
|
73
|
+
"--slotted-tabs-marker-size",
|
|
67
74
|
"--slotted-tabs-scroll-color",
|
|
68
75
|
"--slotted-tabs-selected-color",
|
|
69
76
|
"--slotted-tabs-track-color",
|
|
70
77
|
"--slotted-target-comfortable",
|
|
71
78
|
"--slotted-target-min",
|
|
72
79
|
"--slotted-text",
|
|
73
|
-
"--slotted-text-inverse",
|
|
74
80
|
"--slotted-text-muted",
|
|
75
81
|
"--slotted-tone-accent-solid",
|
|
76
82
|
"--slotted-tone-accent-text",
|
|
77
|
-
"--slotted-tone-danger-border",
|
|
78
|
-
"--slotted-tone-danger-surface",
|
|
79
|
-
"--slotted-tone-danger-text",
|
|
80
83
|
"--slotted-tone-secondary-subtle-active",
|
|
81
84
|
"--slotted-tone-secondary-subtle-hover"
|
|
82
85
|
]
|
package/src/tag/tag.css
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* disagrees with the type it contains and no density can leave one of its
|
|
24
24
|
* controls unhittable.
|
|
25
25
|
*/
|
|
26
|
-
[data-ui
|
|
26
|
+
[data-ui-tag][data-part-root] {
|
|
27
27
|
/**
|
|
28
28
|
* Tone. The neutral fill is the tone's `solid-hover` step rather than its
|
|
29
29
|
* `solid` one, for the reason `badge` recorded: `solid` is the colour of
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
* `tags-input` set it from the room their frame has left); and the edge,
|
|
66
66
|
* so a host can mark one chip — the one that answered a duplicate —
|
|
67
67
|
* without reaching into this sheet. Both are read here, once, and a host
|
|
68
|
-
* writes `[data-ui
|
|
68
|
+
* writes `[data-ui-tag]` nowhere.
|
|
69
69
|
*/
|
|
70
70
|
--_inset-block: var(--slotted-tag-inset-block, var(--slotted-space-2, 0.25rem));
|
|
71
71
|
--_inset-inline: var(--slotted-space-4, 0.5rem);
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
* the sheet that was missing it, and the two hosts that collapse a row of
|
|
148
148
|
* chips both write the attribute and neither could have known.
|
|
149
149
|
*/
|
|
150
|
-
[data-ui
|
|
150
|
+
[data-ui-tag][data-part-root][hidden] {
|
|
151
151
|
display: none;
|
|
152
152
|
}
|
|
153
153
|
|
|
@@ -157,11 +157,11 @@
|
|
|
157
157
|
* The one tone whose fill is the colour of the page. It keeps the tone's own
|
|
158
158
|
* border, where the other four let their fill be their edge.
|
|
159
159
|
*/
|
|
160
|
-
[data-ui
|
|
160
|
+
[data-ui-tag][data-part-root][data-tone='secondary'] {
|
|
161
161
|
--_edge: var(--_border);
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
[data-ui
|
|
164
|
+
[data-ui-tag][data-part-root][data-tone='accent'] {
|
|
165
165
|
--_solid: var(--slotted-tone-accent-solid);
|
|
166
166
|
--_solid-hover: var(--slotted-tone-accent-solid-hover);
|
|
167
167
|
--_solid-active: var(--slotted-tone-accent-solid-active);
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
--_text: var(--slotted-tone-accent-text);
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
[data-ui
|
|
176
|
+
[data-ui-tag][data-part-root][data-tone='success'] {
|
|
177
177
|
--_solid: var(--slotted-tone-success-solid);
|
|
178
178
|
--_solid-hover: var(--slotted-tone-success-solid-hover);
|
|
179
179
|
--_solid-active: var(--slotted-tone-success-solid-active);
|
|
@@ -185,7 +185,19 @@
|
|
|
185
185
|
--_text: var(--slotted-tone-success-text);
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
[data-ui
|
|
188
|
+
[data-ui-tag][data-part-root][data-tone='info'] {
|
|
189
|
+
--_solid: var(--slotted-tone-info-solid);
|
|
190
|
+
--_solid-hover: var(--slotted-tone-info-solid-hover);
|
|
191
|
+
--_solid-active: var(--slotted-tone-info-solid-active);
|
|
192
|
+
--_on-solid: var(--slotted-tone-info-on-solid);
|
|
193
|
+
--_surface: var(--slotted-tone-info-surface);
|
|
194
|
+
--_subtle-hover: var(--slotted-tone-info-subtle-hover);
|
|
195
|
+
--_subtle-active: var(--slotted-tone-info-subtle-active);
|
|
196
|
+
--_border: var(--slotted-tag-border-color, var(--slotted-tone-info-border));
|
|
197
|
+
--_text: var(--slotted-tone-info-text);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
[data-ui-tag][data-part-root][data-tone='warning'] {
|
|
189
201
|
--_solid: var(--slotted-tone-warning-solid);
|
|
190
202
|
--_solid-hover: var(--slotted-tone-warning-solid-hover);
|
|
191
203
|
--_solid-active: var(--slotted-tone-warning-solid-active);
|
|
@@ -197,7 +209,7 @@
|
|
|
197
209
|
--_text: var(--slotted-tone-warning-text);
|
|
198
210
|
}
|
|
199
211
|
|
|
200
|
-
[data-ui
|
|
212
|
+
[data-ui-tag][data-part-root][data-tone='danger'] {
|
|
201
213
|
--_solid: var(--slotted-tone-danger-solid);
|
|
202
214
|
--_solid-hover: var(--slotted-tone-danger-solid-hover);
|
|
203
215
|
--_solid-active: var(--slotted-tone-danger-solid-active);
|
|
@@ -220,19 +232,19 @@
|
|
|
220
232
|
* converges with `outline` — which is what a high-contrast scheme is for.
|
|
221
233
|
*/
|
|
222
234
|
|
|
223
|
-
[data-ui
|
|
235
|
+
[data-ui-tag][data-part-root][data-variant='solid'] {
|
|
224
236
|
background-color: var(--_solid, ButtonFace);
|
|
225
237
|
border-color: var(--_edge, ButtonFace);
|
|
226
238
|
color: var(--_on-solid, ButtonText);
|
|
227
239
|
}
|
|
228
240
|
|
|
229
|
-
[data-ui
|
|
241
|
+
[data-ui-tag][data-part-root][data-variant='soft'] {
|
|
230
242
|
background-color: var(--_surface, ButtonFace);
|
|
231
243
|
border-color: var(--_border, ButtonBorder);
|
|
232
244
|
color: var(--_text, ButtonText);
|
|
233
245
|
}
|
|
234
246
|
|
|
235
|
-
[data-ui
|
|
247
|
+
[data-ui-tag][data-part-root][data-variant='outline'] {
|
|
236
248
|
background-color: transparent;
|
|
237
249
|
border-color: var(--_border, ButtonBorder);
|
|
238
250
|
color: var(--_text, ButtonText);
|
|
@@ -240,7 +252,7 @@
|
|
|
240
252
|
|
|
241
253
|
/* ── Size ─────────────────────────────────────────────────────────────── */
|
|
242
254
|
|
|
243
|
-
[data-ui
|
|
255
|
+
[data-ui-tag][data-part-root][data-size='sm'] {
|
|
244
256
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
245
257
|
--_inset-block: var(--slotted-tag-inset-block, var(--slotted-space-1, 0.125rem));
|
|
246
258
|
--_inset-inline: var(--slotted-space-3, 0.375rem);
|
|
@@ -252,7 +264,7 @@
|
|
|
252
264
|
* the same reason: a 12px chip and a 13px chip should not carry visibly
|
|
253
265
|
* different glyphs.
|
|
254
266
|
*/
|
|
255
|
-
[data-ui
|
|
267
|
+
[data-ui-tag][data-part-root][data-size='lg'] {
|
|
256
268
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
257
269
|
--_icon-size: var(--slotted-control-icon-size-md, 16px);
|
|
258
270
|
--_inner-size: var(--slotted-control-inner-size-md, 24px);
|
|
@@ -263,7 +275,7 @@
|
|
|
263
275
|
|
|
264
276
|
/* ── Shape ────────────────────────────────────────────────────────────── */
|
|
265
277
|
|
|
266
|
-
[data-ui
|
|
278
|
+
[data-ui-tag][data-part-root][data-shape='square'] {
|
|
267
279
|
--_radius: var(--slotted-radius-sm, 4px);
|
|
268
280
|
}
|
|
269
281
|
|
|
@@ -275,7 +287,7 @@
|
|
|
275
287
|
* ground around itself. It is a `span` when the tag does nothing and the
|
|
276
288
|
* element its member names when it does.
|
|
277
289
|
*/
|
|
278
|
-
[data-ui
|
|
290
|
+
[data-ui-tag] [data-part-body] {
|
|
279
291
|
align-items: center;
|
|
280
292
|
/* The root paints the ground; the body paints only its own states. */
|
|
281
293
|
background-color: transparent;
|
|
@@ -304,7 +316,7 @@
|
|
|
304
316
|
}
|
|
305
317
|
|
|
306
318
|
/* The only child rounds both ends, which is every tag that cannot be removed. */
|
|
307
|
-
[data-ui
|
|
319
|
+
[data-ui-tag] [data-part-body]:last-child {
|
|
308
320
|
border-end-end-radius: var(--_inner-radius);
|
|
309
321
|
border-start-end-radius: var(--_inner-radius);
|
|
310
322
|
}
|
|
@@ -318,11 +330,11 @@
|
|
|
318
330
|
* mostly of air. What is left is the gap the chip uses between any two things
|
|
319
331
|
* inside it.
|
|
320
332
|
*/
|
|
321
|
-
[data-ui
|
|
333
|
+
[data-ui-tag] [data-part-body]:has(+ [data-part-remove]) {
|
|
322
334
|
padding-inline-end: var(--_gap);
|
|
323
335
|
}
|
|
324
336
|
|
|
325
|
-
[data-ui
|
|
337
|
+
[data-ui-tag] [data-part-body]:is(a, button) {
|
|
326
338
|
cursor: pointer;
|
|
327
339
|
}
|
|
328
340
|
|
|
@@ -332,7 +344,7 @@
|
|
|
332
344
|
* Where the line is clipped. `min-inline-size: 0` is what lets the box
|
|
333
345
|
* shrink below its content inside the flex body.
|
|
334
346
|
*/
|
|
335
|
-
[data-ui
|
|
347
|
+
[data-ui-tag] [data-part-label] {
|
|
336
348
|
min-inline-size: 0;
|
|
337
349
|
overflow: hidden;
|
|
338
350
|
text-overflow: ellipsis;
|
|
@@ -349,7 +361,7 @@
|
|
|
349
361
|
}
|
|
350
362
|
|
|
351
363
|
@supports (text-box: trim-both cap alphabetic) {
|
|
352
|
-
[data-ui
|
|
364
|
+
[data-ui-tag] [data-part-label] {
|
|
353
365
|
/**
|
|
354
366
|
* The line box a flex container centres is not symmetric around the
|
|
355
367
|
* letters inside it: the ascender reaches further above the cap than the
|
|
@@ -375,8 +387,8 @@
|
|
|
375
387
|
* from its container, and a bare glyph host such as `ng-icon` reads the
|
|
376
388
|
* slot's font-size, so both are the glyph scale.
|
|
377
389
|
*/
|
|
378
|
-
[data-ui
|
|
379
|
-
[data-ui
|
|
390
|
+
[data-ui-tag] [data-part-start],
|
|
391
|
+
[data-ui-tag] [data-part-end] {
|
|
380
392
|
--slotted-icon-size: var(--_icon-size);
|
|
381
393
|
|
|
382
394
|
align-items: center;
|
|
@@ -390,8 +402,8 @@
|
|
|
390
402
|
line-height: 1;
|
|
391
403
|
}
|
|
392
404
|
|
|
393
|
-
[data-ui
|
|
394
|
-
[data-ui
|
|
405
|
+
[data-ui-tag] [data-part-start] > *,
|
|
406
|
+
[data-ui-tag] [data-part-end] > * {
|
|
395
407
|
block-size: 100%;
|
|
396
408
|
display: block;
|
|
397
409
|
inline-size: 100%;
|
|
@@ -410,7 +422,7 @@
|
|
|
410
422
|
* `hideSingleSelectionIndicator` to avoid it; the transition is the third
|
|
411
423
|
* answer, and the theme collapses its duration under reduced motion.
|
|
412
424
|
*/
|
|
413
|
-
[data-ui
|
|
425
|
+
[data-ui-tag] [data-part-indicator] {
|
|
414
426
|
--slotted-icon-size: var(--_icon-size);
|
|
415
427
|
|
|
416
428
|
align-items: center;
|
|
@@ -433,7 +445,7 @@
|
|
|
433
445
|
opacity var(--slotted-duration-short) var(--slotted-easing-standard);
|
|
434
446
|
}
|
|
435
447
|
|
|
436
|
-
[data-ui
|
|
448
|
+
[data-ui-tag][data-part-root][data-selected] [data-part-indicator] {
|
|
437
449
|
inline-size: var(--_icon-size);
|
|
438
450
|
margin-inline-end: 0;
|
|
439
451
|
opacity: 1;
|
|
@@ -457,7 +469,7 @@
|
|
|
457
469
|
* The mark is the `x` glyph the binding renders; the control hands its icon
|
|
458
470
|
* box the chip's glyph size.
|
|
459
471
|
*/
|
|
460
|
-
[data-ui
|
|
472
|
+
[data-ui-tag] [data-part-remove] {
|
|
461
473
|
--slotted-icon-size: var(--_icon-size);
|
|
462
474
|
|
|
463
475
|
align-items: center;
|
|
@@ -491,7 +503,7 @@
|
|
|
491
503
|
* falls short and is inert on the two larger sizes, where the chip is already
|
|
492
504
|
* taller than the minimum.
|
|
493
505
|
*/
|
|
494
|
-
[data-ui
|
|
506
|
+
[data-ui-tag] [data-part-remove]::after {
|
|
495
507
|
content: '';
|
|
496
508
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
497
509
|
position: absolute;
|
|
@@ -504,7 +516,7 @@
|
|
|
504
516
|
* segment 24 wide and 32 tall. The halo above grows to 44 pixels around it.
|
|
505
517
|
*/
|
|
506
518
|
@media (pointer: coarse) {
|
|
507
|
-
[data-ui
|
|
519
|
+
[data-ui-tag] [data-part-remove] {
|
|
508
520
|
inline-size: max(
|
|
509
521
|
var(--slotted-target-min, 24px),
|
|
510
522
|
min(calc(var(--_icon-size) + 2 * var(--slotted-space-2, 0.25rem)), var(--_inner-size)),
|
|
@@ -512,14 +524,14 @@
|
|
|
512
524
|
);
|
|
513
525
|
}
|
|
514
526
|
|
|
515
|
-
[data-ui
|
|
527
|
+
[data-ui-tag] [data-part-remove]::after {
|
|
516
528
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
517
529
|
}
|
|
518
530
|
}
|
|
519
531
|
|
|
520
532
|
/* A tag that is only a remove control is not a tag, but the rounding is one
|
|
521
533
|
rule either way rather than a case the sheet has to know about. */
|
|
522
|
-
[data-ui
|
|
534
|
+
[data-ui-tag] [data-part-remove]:first-child {
|
|
523
535
|
border-end-start-radius: var(--_inner-radius);
|
|
524
536
|
border-start-start-radius: var(--_inner-radius);
|
|
525
537
|
}
|
|
@@ -531,7 +543,7 @@
|
|
|
531
543
|
* is the rule `button` set for `pressed`: "on" is never one shade away from
|
|
532
544
|
* "hovered".
|
|
533
545
|
*/
|
|
534
|
-
[data-ui
|
|
546
|
+
[data-ui-tag][data-part-root][data-selected]:not([data-disabled]) {
|
|
535
547
|
background-color: var(--_solid, ButtonFace);
|
|
536
548
|
border-color: var(--_edge, ButtonBorder);
|
|
537
549
|
color: var(--_on-solid, ButtonText);
|
|
@@ -558,7 +570,7 @@
|
|
|
558
570
|
* the two component tokens are for.
|
|
559
571
|
*/
|
|
560
572
|
|
|
561
|
-
[data-ui
|
|
573
|
+
[data-ui-tag][data-part-root] {
|
|
562
574
|
--_state-hover: color-mix(
|
|
563
575
|
in oklab,
|
|
564
576
|
currentColor var(--slotted-tag-state-layer-hover, 8%),
|
|
@@ -571,27 +583,23 @@
|
|
|
571
583
|
);
|
|
572
584
|
}
|
|
573
585
|
|
|
574
|
-
[data-ui
|
|
575
|
-
:is([data-part
|
|
586
|
+
[data-ui-tag][data-part-root][data-variant='soft']:not([data-disabled]):not([data-selected])
|
|
587
|
+
:is([data-part-body]:is(a, button), [data-part-remove]):hover:not(:disabled) {
|
|
576
588
|
background-color: var(--_state-hover);
|
|
577
589
|
}
|
|
578
590
|
|
|
579
|
-
[data-ui
|
|
580
|
-
:is([data-part
|
|
591
|
+
[data-ui-tag][data-part-root][data-variant='soft']:not([data-disabled]):not([data-selected])
|
|
592
|
+
:is([data-part-body]:is(a, button), [data-part-remove]):active:not(:disabled) {
|
|
581
593
|
background-color: var(--_state-active);
|
|
582
594
|
}
|
|
583
595
|
|
|
584
|
-
[data-ui
|
|
585
|
-
|
|
586
|
-
)
|
|
587
|
-
:is([data-part='body']:is(a, button), [data-part='remove']):hover:not(:disabled) {
|
|
596
|
+
[data-ui-tag][data-part-root][data-variant='outline']:not([data-disabled]):not([data-selected])
|
|
597
|
+
:is([data-part-body]:is(a, button), [data-part-remove]):hover:not(:disabled) {
|
|
588
598
|
background-color: var(--_subtle-hover, ButtonFace);
|
|
589
599
|
}
|
|
590
600
|
|
|
591
|
-
[data-ui
|
|
592
|
-
|
|
593
|
-
)
|
|
594
|
-
:is([data-part='body']:is(a, button), [data-part='remove']):active:not(:disabled) {
|
|
601
|
+
[data-ui-tag][data-part-root][data-variant='outline']:not([data-disabled]):not([data-selected])
|
|
602
|
+
:is([data-part-body]:is(a, button), [data-part-remove]):active:not(:disabled) {
|
|
595
603
|
background-color: var(--_subtle-active, ButtonFace);
|
|
596
604
|
}
|
|
597
605
|
|
|
@@ -599,17 +607,17 @@
|
|
|
599
607
|
* A filled chip washes along its own ramp, as `button` does — and a selected
|
|
600
608
|
* chip is a filled chip whatever its variant, so the two share these rules.
|
|
601
609
|
*/
|
|
602
|
-
[data-ui
|
|
603
|
-
:is([data-part
|
|
604
|
-
[data-ui
|
|
605
|
-
:is([data-part
|
|
610
|
+
[data-ui-tag][data-part-root][data-variant='solid']:not([data-disabled])
|
|
611
|
+
:is([data-part-body]:is(a, button), [data-part-remove]):hover:not(:disabled),
|
|
612
|
+
[data-ui-tag][data-part-root][data-selected]:not([data-disabled])
|
|
613
|
+
:is([data-part-body]:is(a, button), [data-part-remove]):hover:not(:disabled) {
|
|
606
614
|
background-color: var(--_solid-hover, Highlight);
|
|
607
615
|
}
|
|
608
616
|
|
|
609
|
-
[data-ui
|
|
610
|
-
:is([data-part
|
|
611
|
-
[data-ui
|
|
612
|
-
:is([data-part
|
|
617
|
+
[data-ui-tag][data-part-root][data-variant='solid']:not([data-disabled])
|
|
618
|
+
:is([data-part-body]:is(a, button), [data-part-remove]):active:not(:disabled),
|
|
619
|
+
[data-ui-tag][data-part-root][data-selected]:not([data-disabled])
|
|
620
|
+
:is([data-part-body]:is(a, button), [data-part-remove]):active:not(:disabled) {
|
|
613
621
|
background-color: var(--_solid-active, Highlight);
|
|
614
622
|
}
|
|
615
623
|
|
|
@@ -637,8 +645,8 @@
|
|
|
637
645
|
* target: a rounded rectangle floating inside the segment would be prettier
|
|
638
646
|
* and would say the hit area is somewhere it is not.
|
|
639
647
|
*/
|
|
640
|
-
[data-ui
|
|
641
|
-
[data-ui
|
|
648
|
+
[data-ui-tag] [data-part-body]:focus-visible,
|
|
649
|
+
[data-ui-tag] [data-part-remove]:focus-visible {
|
|
642
650
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
643
651
|
outline-offset: calc(-2 * var(--slotted-focus-ring-width, 2px));
|
|
644
652
|
}
|
|
@@ -648,7 +656,7 @@
|
|
|
648
656
|
* It is drawn for one moment: the group takes focus when the last tag it
|
|
649
657
|
* held is removed, so the keyboard is not returned to the top of the page.
|
|
650
658
|
*/
|
|
651
|
-
[data-ui
|
|
659
|
+
[data-ui-tag][data-part-group]:focus-visible {
|
|
652
660
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
653
661
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
654
662
|
}
|
|
@@ -664,7 +672,7 @@
|
|
|
664
672
|
* a control and a control that keeps its place in the tab sequence carries
|
|
665
673
|
* `aria-disabled` and no `:disabled`.
|
|
666
674
|
*/
|
|
667
|
-
[data-ui
|
|
675
|
+
[data-ui-tag][data-part-root][data-disabled] {
|
|
668
676
|
color: var(--slotted-disabled-foreground, GrayText);
|
|
669
677
|
}
|
|
670
678
|
|
|
@@ -676,21 +684,21 @@
|
|
|
676
684
|
* capture showed "Disabled selected" as a check and two words floating on
|
|
677
685
|
* the page with no box around them.
|
|
678
686
|
*/
|
|
679
|
-
[data-ui
|
|
680
|
-
[data-ui
|
|
681
|
-
[data-ui
|
|
687
|
+
[data-ui-tag][data-part-root][data-variant='solid'][data-disabled],
|
|
688
|
+
[data-ui-tag][data-part-root][data-variant='soft'][data-disabled],
|
|
689
|
+
[data-ui-tag][data-part-root][data-selected][data-disabled] {
|
|
682
690
|
background-color: var(--slotted-disabled-background, Canvas);
|
|
683
691
|
border-color: var(--slotted-disabled-border, GrayText);
|
|
684
692
|
}
|
|
685
693
|
|
|
686
|
-
[data-ui
|
|
694
|
+
[data-ui-tag][data-part-root][data-variant='outline'][data-disabled] {
|
|
687
695
|
background-color: transparent;
|
|
688
696
|
border-color: var(--slotted-disabled-border, GrayText);
|
|
689
697
|
}
|
|
690
698
|
|
|
691
|
-
[data-ui
|
|
692
|
-
[data-ui
|
|
693
|
-
[data-ui
|
|
699
|
+
[data-ui-tag][data-part-root][data-disabled] :is([data-part-body], [data-part-remove]),
|
|
700
|
+
[data-ui-tag] [data-part-body]:disabled,
|
|
701
|
+
[data-ui-tag] [data-part-remove]:disabled {
|
|
694
702
|
background-color: transparent;
|
|
695
703
|
cursor: not-allowed;
|
|
696
704
|
}
|
|
@@ -699,7 +707,7 @@
|
|
|
699
707
|
* A remove control the consumer disabled on its own, inside a chip that is
|
|
700
708
|
* otherwise operable. It loses its colour rather than the whole chip's.
|
|
701
709
|
*/
|
|
702
|
-
[data-ui
|
|
710
|
+
[data-ui-tag] [data-part-remove]:disabled {
|
|
703
711
|
color: var(--slotted-disabled-foreground, GrayText);
|
|
704
712
|
}
|
|
705
713
|
|
|
@@ -711,14 +719,14 @@
|
|
|
711
719
|
* the arrow keys move between the controls inside it — the APG Toolbar
|
|
712
720
|
* pattern, which is a container for grouping a set of controls.
|
|
713
721
|
*/
|
|
714
|
-
[data-ui
|
|
722
|
+
[data-ui-tag][data-part-group] {
|
|
715
723
|
align-items: center;
|
|
716
724
|
display: flex;
|
|
717
725
|
flex-wrap: wrap;
|
|
718
726
|
gap: var(--slotted-tag-group-gap, var(--slotted-space-2, 0.25rem));
|
|
719
727
|
}
|
|
720
728
|
|
|
721
|
-
[data-ui
|
|
729
|
+
[data-ui-tag][data-part-group][data-orientation='vertical'] {
|
|
722
730
|
align-items: start;
|
|
723
731
|
flex-direction: column;
|
|
724
732
|
flex-wrap: nowrap;
|
|
@@ -731,7 +739,7 @@
|
|
|
731
739
|
* that holds it — the defect `button-group` recorded when it found the same
|
|
732
740
|
* thing.
|
|
733
741
|
*/
|
|
734
|
-
[data-ui
|
|
742
|
+
[data-ui-tag][data-part-group]:empty {
|
|
735
743
|
display: none;
|
|
736
744
|
}
|
|
737
745
|
|
|
@@ -750,17 +758,17 @@
|
|
|
750
758
|
* pair instead.
|
|
751
759
|
*/
|
|
752
760
|
@media (forced-colors: active) {
|
|
753
|
-
[data-ui
|
|
761
|
+
[data-ui-tag][data-part-root] {
|
|
754
762
|
border-color: currentColor;
|
|
755
763
|
}
|
|
756
764
|
|
|
757
|
-
[data-ui
|
|
765
|
+
[data-ui-tag][data-part-root][data-selected]:not([data-disabled]) {
|
|
758
766
|
background-color: Highlight;
|
|
759
767
|
color: HighlightText;
|
|
760
768
|
forced-color-adjust: none;
|
|
761
769
|
}
|
|
762
770
|
|
|
763
|
-
[data-ui
|
|
771
|
+
[data-ui-tag][data-part-root][data-disabled] {
|
|
764
772
|
border-color: GrayText;
|
|
765
773
|
color: GrayText;
|
|
766
774
|
}
|
package/src/tag/tag.tokens.json
CHANGED
|
@@ -56,6 +56,15 @@
|
|
|
56
56
|
"--slotted-tone-danger-subtle-hover",
|
|
57
57
|
"--slotted-tone-danger-surface",
|
|
58
58
|
"--slotted-tone-danger-text",
|
|
59
|
+
"--slotted-tone-info-border",
|
|
60
|
+
"--slotted-tone-info-on-solid",
|
|
61
|
+
"--slotted-tone-info-solid",
|
|
62
|
+
"--slotted-tone-info-solid-active",
|
|
63
|
+
"--slotted-tone-info-solid-hover",
|
|
64
|
+
"--slotted-tone-info-subtle-active",
|
|
65
|
+
"--slotted-tone-info-subtle-hover",
|
|
66
|
+
"--slotted-tone-info-surface",
|
|
67
|
+
"--slotted-tone-info-text",
|
|
59
68
|
"--slotted-tone-secondary-border",
|
|
60
69
|
"--slotted-tone-secondary-on-solid",
|
|
61
70
|
"--slotted-tone-secondary-solid-active",
|