@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
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* does not grow the frame to 4000 pixels. Only content with a height of its
|
|
28
28
|
* own — text, a control, a card — can.
|
|
29
29
|
*/
|
|
30
|
-
[data-ui
|
|
30
|
+
[data-ui-aspect-ratio][data-part-root] {
|
|
31
31
|
/**
|
|
32
32
|
* The proportion, as the public token. A named ratio writes it below; a
|
|
33
33
|
* number the consumer stated is written on the instance, as `w / h`, and
|
|
@@ -61,23 +61,23 @@
|
|
|
61
61
|
* the decision reads in the DOM. Written as the public token so a theme
|
|
62
62
|
* that disagrees about what `wide` means retunes it in one place.
|
|
63
63
|
*/
|
|
64
|
-
[data-ui
|
|
64
|
+
[data-ui-aspect-ratio][data-part-root][data-ratio='square'] {
|
|
65
65
|
--slotted-aspect-ratio: 1 / 1;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
[data-ui
|
|
68
|
+
[data-ui-aspect-ratio][data-part-root][data-ratio='landscape'] {
|
|
69
69
|
--slotted-aspect-ratio: 4 / 3;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
[data-ui
|
|
72
|
+
[data-ui-aspect-ratio][data-part-root][data-ratio='portrait'] {
|
|
73
73
|
--slotted-aspect-ratio: 3 / 4;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
[data-ui
|
|
76
|
+
[data-ui-aspect-ratio][data-part-root][data-ratio='video'] {
|
|
77
77
|
--slotted-aspect-ratio: 16 / 9;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
[data-ui
|
|
80
|
+
[data-ui-aspect-ratio][data-part-root][data-ratio='wide'] {
|
|
81
81
|
--slotted-aspect-ratio: 21 / 9;
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
* shrink with the frame; the block minimum is left alone on purpose, so a
|
|
95
95
|
* child taller than the ratio still grows the box.
|
|
96
96
|
*/
|
|
97
|
-
[data-ui
|
|
97
|
+
[data-ui-aspect-ratio][data-part-root] > * {
|
|
98
98
|
grid-area: 1 / 1;
|
|
99
99
|
min-inline-size: 0;
|
|
100
100
|
}
|
|
@@ -118,14 +118,14 @@
|
|
|
118
118
|
* replaced element has nothing to say about the frame's height; the text
|
|
119
119
|
* child above keeps its automatic minimum, and the growth rule with it.
|
|
120
120
|
*/
|
|
121
|
-
[data-ui
|
|
121
|
+
[data-ui-aspect-ratio][data-part-root] > :is(img, video, canvas, svg, iframe, picture) {
|
|
122
122
|
block-size: 100%;
|
|
123
123
|
display: block;
|
|
124
124
|
inline-size: 100%;
|
|
125
125
|
min-block-size: 0;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
[data-ui
|
|
128
|
+
[data-ui-aspect-ratio][data-part-root] > :is(img, video) {
|
|
129
129
|
object-fit: contain;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
* resolves the same size step its attachments do, because a grid of cards
|
|
24
24
|
* sizes its tracks from the card.
|
|
25
25
|
*/
|
|
26
|
-
[data-ui
|
|
27
|
-
[data-ui
|
|
26
|
+
[data-ui-attachment][data-part-root],
|
|
27
|
+
[data-ui-attachment][data-part-group] {
|
|
28
28
|
/**
|
|
29
29
|
* Type and glyph come from the control scales, the ones the theme restates
|
|
30
30
|
* per density, so an attachment inside a dense form shrinks with the
|
|
@@ -87,14 +87,14 @@
|
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
[data-ui
|
|
90
|
+
[data-ui-attachment][data-size='sm']:is([data-part-root], [data-part-group]) {
|
|
91
91
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
92
92
|
--_glyph-size: var(--slotted-control-icon-size-sm, 14px);
|
|
93
93
|
--_gap: var(--slotted-control-gap-sm, 6px);
|
|
94
94
|
--_inset: var(--slotted-attachment-padding-sm, var(--slotted-space-3, 0.375rem));
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
[data-ui
|
|
97
|
+
[data-ui-attachment][data-size='lg']:is([data-part-root], [data-part-group]) {
|
|
98
98
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
99
99
|
--_glyph-size: var(--slotted-control-icon-size-lg, 18px);
|
|
100
100
|
--_gap: var(--slotted-control-gap-lg, 8px);
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
* without moving either. The message starts under the name, not under the
|
|
110
110
|
* tile, so its first letter lines up with the name's.
|
|
111
111
|
*/
|
|
112
|
-
[data-ui
|
|
112
|
+
[data-ui-attachment][data-part-root] {
|
|
113
113
|
/**
|
|
114
114
|
* What the attachment is painted with at rest. A state of the file —
|
|
115
115
|
* invalid — moves these two; a pointer on the trigger moves `--_fill`,
|
|
@@ -187,22 +187,22 @@
|
|
|
187
187
|
* the gap beside it, and an attachment without actions ended its name eight
|
|
188
188
|
* pixels short of the edge it could have used.
|
|
189
189
|
*/
|
|
190
|
-
[data-ui
|
|
190
|
+
[data-ui-attachment][data-part-root]:not(:has(> [data-part-actions])) {
|
|
191
191
|
grid-template-areas:
|
|
192
192
|
'preview body'
|
|
193
193
|
'. message';
|
|
194
194
|
grid-template-columns: auto minmax(0, 1fr);
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
-
[data-ui
|
|
197
|
+
[data-ui-attachment][data-part-root]:not(:has(> [data-part-preview])) {
|
|
198
198
|
grid-template-areas:
|
|
199
199
|
'body actions'
|
|
200
200
|
'message message';
|
|
201
201
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
[data-ui
|
|
205
|
-
:has(> [data-part
|
|
204
|
+
[data-ui-attachment][data-part-root]:not(:has(> [data-part-preview])):not(
|
|
205
|
+
:has(> [data-part-actions])
|
|
206
206
|
) {
|
|
207
207
|
grid-template-areas:
|
|
208
208
|
'body'
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
* list beside the consumer's — the debt `upload` records for its rows.
|
|
221
221
|
*/
|
|
222
222
|
@starting-style {
|
|
223
|
-
[data-ui
|
|
223
|
+
[data-ui-attachment][data-part-root] {
|
|
224
224
|
opacity: 0;
|
|
225
225
|
translate: 0 calc(-1 * var(--slotted-space-2, 0.25rem));
|
|
226
226
|
}
|
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
* measurements are under **File kind** in `docs/token-foundation.md`; the
|
|
234
234
|
* scale is `upload`'s and is read here under its own name.
|
|
235
235
|
*/
|
|
236
|
-
[data-ui
|
|
236
|
+
[data-ui-attachment] [data-part-preview] {
|
|
237
237
|
--_kind-tile: var(--slotted-upload-kind-other);
|
|
238
238
|
|
|
239
239
|
align-items: center;
|
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
overflow: hidden;
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
[data-ui
|
|
253
|
+
[data-ui-attachment] [data-part-preview] > img {
|
|
254
254
|
block-size: 100%;
|
|
255
255
|
display: block;
|
|
256
256
|
inline-size: 100%;
|
|
@@ -261,39 +261,39 @@
|
|
|
261
261
|
* Half the tile, rounded to a whole pixel: 20 in a 40 tile. The row glyph
|
|
262
262
|
* (16) in a tile two lines tall read as a mark lost in its box.
|
|
263
263
|
*/
|
|
264
|
-
[data-ui
|
|
264
|
+
[data-ui-attachment] [data-part-preview] > [data-ui-icon] {
|
|
265
265
|
--slotted-icon-size: round(calc(var(--_preview-size) / 2), 1px);
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
-
[data-ui
|
|
268
|
+
[data-ui-attachment] [data-part-preview][data-kind='pdf'] {
|
|
269
269
|
--_kind-tile: var(--slotted-upload-kind-pdf);
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
[data-ui
|
|
272
|
+
[data-ui-attachment] [data-part-preview][data-kind='document'] {
|
|
273
273
|
--_kind-tile: var(--slotted-upload-kind-document);
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
[data-ui
|
|
276
|
+
[data-ui-attachment] [data-part-preview][data-kind='spreadsheet'] {
|
|
277
277
|
--_kind-tile: var(--slotted-upload-kind-spreadsheet);
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
-
[data-ui
|
|
280
|
+
[data-ui-attachment] [data-part-preview][data-kind='presentation'] {
|
|
281
281
|
--_kind-tile: var(--slotted-upload-kind-presentation);
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
-
[data-ui
|
|
284
|
+
[data-ui-attachment] [data-part-preview][data-kind='image'] {
|
|
285
285
|
--_kind-tile: var(--slotted-upload-kind-image);
|
|
286
286
|
}
|
|
287
287
|
|
|
288
|
-
[data-ui
|
|
288
|
+
[data-ui-attachment] [data-part-preview][data-kind='video'] {
|
|
289
289
|
--_kind-tile: var(--slotted-upload-kind-video);
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
[data-ui
|
|
292
|
+
[data-ui-attachment] [data-part-preview][data-kind='audio'] {
|
|
293
293
|
--_kind-tile: var(--slotted-upload-kind-audio);
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
[data-ui
|
|
296
|
+
[data-ui-attachment] [data-part-preview][data-kind='archive'] {
|
|
297
297
|
--_kind-tile: var(--slotted-upload-kind-archive);
|
|
298
298
|
}
|
|
299
299
|
|
|
@@ -303,7 +303,7 @@
|
|
|
303
303
|
* `min-inline-size: 0`, which is what makes a long name truncate instead of
|
|
304
304
|
* pushing the actions off the end.
|
|
305
305
|
*/
|
|
306
|
-
[data-ui
|
|
306
|
+
[data-ui-attachment] [data-part-body] {
|
|
307
307
|
display: flex;
|
|
308
308
|
flex-direction: column;
|
|
309
309
|
gap: var(--_line-gap);
|
|
@@ -318,7 +318,7 @@
|
|
|
318
318
|
* about it looks like a control at rest; the attachment is the control, and
|
|
319
319
|
* it answers as one.
|
|
320
320
|
*/
|
|
321
|
-
[data-ui
|
|
321
|
+
[data-ui-attachment] [data-part-trigger] {
|
|
322
322
|
appearance: none;
|
|
323
323
|
background: none;
|
|
324
324
|
border: 0;
|
|
@@ -339,7 +339,7 @@
|
|
|
339
339
|
* The stretched target. Transparent, over the whole attachment, and below
|
|
340
340
|
* `actions`, which is positioned after it in the same stacking context.
|
|
341
341
|
*/
|
|
342
|
-
[data-ui
|
|
342
|
+
[data-ui-attachment] [data-part-trigger]::after {
|
|
343
343
|
content: '';
|
|
344
344
|
inset: 0;
|
|
345
345
|
position: absolute;
|
|
@@ -352,18 +352,18 @@
|
|
|
352
352
|
* by a hairline — the answer `upload` gives its file name — so press and
|
|
353
353
|
* hover differ on the trigger itself and not only on the attachment.
|
|
354
354
|
*/
|
|
355
|
-
[data-ui
|
|
355
|
+
[data-ui-attachment] [data-part-trigger]:not(:disabled):not([aria-disabled='true']):hover {
|
|
356
356
|
text-decoration-line: underline;
|
|
357
357
|
text-underline-offset: 0.2em;
|
|
358
358
|
}
|
|
359
359
|
|
|
360
|
-
[data-ui
|
|
360
|
+
[data-ui-attachment] [data-part-trigger]:not(:disabled):not([aria-disabled='true']):active {
|
|
361
361
|
text-decoration-line: underline;
|
|
362
362
|
text-underline-offset: 0.2em;
|
|
363
363
|
translate: 0 var(--slotted-border-width-thin, 1px);
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
-
[data-ui
|
|
366
|
+
[data-ui-attachment] [data-part-trigger]:is(:disabled, [aria-disabled='true']) {
|
|
367
367
|
cursor: default;
|
|
368
368
|
}
|
|
369
369
|
|
|
@@ -373,13 +373,11 @@
|
|
|
373
373
|
* the words can be pressed. The browser's own ring on the trigger is
|
|
374
374
|
* suppressed so the two are never drawn at once.
|
|
375
375
|
*/
|
|
376
|
-
[data-ui
|
|
376
|
+
[data-ui-attachment] [data-part-trigger]:focus-visible {
|
|
377
377
|
outline: none;
|
|
378
378
|
}
|
|
379
379
|
|
|
380
|
-
[data-ui
|
|
381
|
-
> [data-part='body'] > [data-part='trigger']:focus-visible
|
|
382
|
-
) {
|
|
380
|
+
[data-ui-attachment][data-part-root]:has(> [data-part-body] > [data-part-trigger]:focus-visible) {
|
|
383
381
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
384
382
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
385
383
|
}
|
|
@@ -389,14 +387,14 @@
|
|
|
389
387
|
* cannot be opened: a disabled or loading attachment refuses its trigger,
|
|
390
388
|
* and a fill would promise the press it refuses.
|
|
391
389
|
*/
|
|
392
|
-
[data-ui
|
|
393
|
-
> [data-part
|
|
390
|
+
[data-ui-attachment][data-part-root]:not([data-disabled]):not([data-loading]):has(
|
|
391
|
+
> [data-part-body] > [data-part-trigger]:hover
|
|
394
392
|
) {
|
|
395
393
|
--_fill: var(--_fill-hover);
|
|
396
394
|
}
|
|
397
395
|
|
|
398
|
-
[data-ui
|
|
399
|
-
> [data-part
|
|
396
|
+
[data-ui-attachment][data-part-root]:not([data-disabled]):not([data-loading]):has(
|
|
397
|
+
> [data-part-body] > [data-part-trigger]:active
|
|
400
398
|
) {
|
|
401
399
|
--_fill: var(--_fill-active);
|
|
402
400
|
}
|
|
@@ -407,7 +405,7 @@
|
|
|
407
405
|
* that order inside a right-to-left page instead of `pdf.claim-form` — the
|
|
408
406
|
* defect `upload` found in its capture at `dir="rtl"`.
|
|
409
407
|
*/
|
|
410
|
-
[data-ui
|
|
408
|
+
[data-ui-attachment] [data-part-filename] {
|
|
411
409
|
display: flex;
|
|
412
410
|
font-weight: var(--slotted-attachment-name-font-weight, var(--slotted-font-weight-medium, 500));
|
|
413
411
|
line-height: var(--_title-leading);
|
|
@@ -422,8 +420,8 @@
|
|
|
422
420
|
* gives the run its own direction, so it must also be only as wide as the run.
|
|
423
421
|
* Found in the capture at `dir="rtl"`.
|
|
424
422
|
*/
|
|
425
|
-
[data-ui
|
|
426
|
-
[data-ui
|
|
423
|
+
[data-ui-attachment] [data-part-body] > [data-part-filename],
|
|
424
|
+
[data-ui-attachment] [data-part-body] > [data-part-trigger] {
|
|
427
425
|
align-self: start;
|
|
428
426
|
max-inline-size: 100%;
|
|
429
427
|
}
|
|
@@ -434,7 +432,7 @@
|
|
|
434
432
|
* middle; `splitName` makes the split in the binding, and the whole name
|
|
435
433
|
* stays in the document and in the trigger's `title`.
|
|
436
434
|
*/
|
|
437
|
-
[data-ui
|
|
435
|
+
[data-ui-attachment] [data-part-name] {
|
|
438
436
|
flex: 0 1 auto;
|
|
439
437
|
min-inline-size: 0;
|
|
440
438
|
overflow: hidden;
|
|
@@ -442,13 +440,13 @@
|
|
|
442
440
|
white-space: nowrap;
|
|
443
441
|
}
|
|
444
442
|
|
|
445
|
-
[data-ui
|
|
443
|
+
[data-ui-attachment] [data-part-extension] {
|
|
446
444
|
flex: none;
|
|
447
445
|
white-space: nowrap;
|
|
448
446
|
}
|
|
449
447
|
|
|
450
448
|
/** The second line: a size, a date, a sender — whatever the page says. */
|
|
451
|
-
[data-ui
|
|
449
|
+
[data-ui-attachment] [data-part-detail] {
|
|
452
450
|
color: var(--slotted-text-muted);
|
|
453
451
|
font-size: var(--_detail-size);
|
|
454
452
|
font-variant-numeric: tabular-nums;
|
|
@@ -465,7 +463,7 @@
|
|
|
465
463
|
* length than a line of detail. It wraps, because a reason cut off by an
|
|
466
464
|
* ellipsis is a reason nobody reads.
|
|
467
465
|
*/
|
|
468
|
-
[data-ui
|
|
466
|
+
[data-ui-attachment] [data-part-message] {
|
|
469
467
|
color: var(--_message-color);
|
|
470
468
|
font-size: var(--_detail-size);
|
|
471
469
|
grid-area: message;
|
|
@@ -490,7 +488,7 @@
|
|
|
490
488
|
* Centred in the inset, the bar clears the edge by the same distance it
|
|
491
489
|
* clears the detail line above it.
|
|
492
490
|
*/
|
|
493
|
-
[data-ui
|
|
491
|
+
[data-ui-attachment] [data-part-progress] {
|
|
494
492
|
display: block;
|
|
495
493
|
inset-block-end: round(
|
|
496
494
|
down,
|
|
@@ -505,14 +503,13 @@
|
|
|
505
503
|
}
|
|
506
504
|
|
|
507
505
|
/* Without a tile, or on a card, the text's column starts at the inset. */
|
|
508
|
-
[data-ui
|
|
509
|
-
|
|
510
|
-
[data-ui='attachment'][data-orientation='vertical'] > [data-part='progress'] {
|
|
506
|
+
[data-ui-attachment][data-part-root]:not(:has(> [data-part-preview])) > [data-part-progress],
|
|
507
|
+
[data-ui-attachment][data-orientation='vertical'] > [data-part-progress] {
|
|
511
508
|
inset-inline-start: var(--_inset);
|
|
512
509
|
}
|
|
513
510
|
|
|
514
511
|
@starting-style {
|
|
515
|
-
[data-ui
|
|
512
|
+
[data-ui-attachment] [data-part-progress] {
|
|
516
513
|
opacity: 0;
|
|
517
514
|
}
|
|
518
515
|
}
|
|
@@ -521,7 +518,7 @@
|
|
|
521
518
|
*
|
|
522
519
|
* Above the stretched target, so a press on a control is the control's.
|
|
523
520
|
*/
|
|
524
|
-
[data-ui
|
|
521
|
+
[data-ui-attachment] [data-part-actions] {
|
|
525
522
|
align-items: center;
|
|
526
523
|
display: inline-flex;
|
|
527
524
|
gap: var(--slotted-space-1, 0.125rem);
|
|
@@ -538,8 +535,8 @@
|
|
|
538
535
|
* controls: it is legible on whatever ground the attachment has, including
|
|
539
536
|
* a failed one's tint.
|
|
540
537
|
*/
|
|
541
|
-
[data-ui
|
|
542
|
-
[data-ui
|
|
538
|
+
[data-ui-attachment] [data-part-action],
|
|
539
|
+
[data-ui-attachment] [data-part-remove] {
|
|
543
540
|
--_state-hover: color-mix(
|
|
544
541
|
in oklab,
|
|
545
542
|
currentcolor var(--slotted-attachment-action-state-layer-hover, 8%),
|
|
@@ -574,8 +571,8 @@
|
|
|
574
571
|
color var(--slotted-control-transition-duration) var(--slotted-control-transition-easing);
|
|
575
572
|
}
|
|
576
573
|
|
|
577
|
-
[data-ui
|
|
578
|
-
[data-ui
|
|
574
|
+
[data-ui-attachment] [data-part-action] > [data-ui-icon],
|
|
575
|
+
[data-ui-attachment] [data-part-remove] > [data-ui-icon] {
|
|
579
576
|
--slotted-icon-size: var(--_action-glyph-size);
|
|
580
577
|
}
|
|
581
578
|
|
|
@@ -584,18 +581,18 @@
|
|
|
584
581
|
* has no native disabled state. A control that cannot act does not answer a
|
|
585
582
|
* pointer.
|
|
586
583
|
*/
|
|
587
|
-
[data-ui
|
|
588
|
-
[data-ui
|
|
584
|
+
[data-ui-attachment] [data-part-action]:not(:disabled):not([aria-disabled='true']):hover,
|
|
585
|
+
[data-ui-attachment] [data-part-remove]:not(:disabled):not([aria-disabled='true']):hover {
|
|
589
586
|
background-color: var(--_state-hover);
|
|
590
587
|
}
|
|
591
588
|
|
|
592
|
-
[data-ui
|
|
593
|
-
[data-ui
|
|
589
|
+
[data-ui-attachment] [data-part-action]:not(:disabled):not([aria-disabled='true']):active,
|
|
590
|
+
[data-ui-attachment] [data-part-remove]:not(:disabled):not([aria-disabled='true']):active {
|
|
594
591
|
background-color: var(--_state-active);
|
|
595
592
|
}
|
|
596
593
|
|
|
597
|
-
[data-ui
|
|
598
|
-
[data-ui
|
|
594
|
+
[data-ui-attachment] [data-part-action]:is(:disabled, [aria-disabled='true']),
|
|
595
|
+
[data-ui-attachment] [data-part-remove]:is(:disabled, [aria-disabled='true']) {
|
|
599
596
|
color: var(--slotted-disabled-foreground);
|
|
600
597
|
cursor: default;
|
|
601
598
|
}
|
|
@@ -605,8 +602,8 @@
|
|
|
605
602
|
* stand two pixels apart, and an outward ring would be drawn over the
|
|
606
603
|
* neighbour's box.
|
|
607
604
|
*/
|
|
608
|
-
[data-ui
|
|
609
|
-
[data-ui
|
|
605
|
+
[data-ui-attachment] [data-part-action]:focus-visible,
|
|
606
|
+
[data-ui-attachment] [data-part-remove]:focus-visible {
|
|
610
607
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
611
608
|
outline-offset: calc(-1 * var(--slotted-focus-ring-width, 2px));
|
|
612
609
|
}
|
|
@@ -618,11 +615,11 @@
|
|
|
618
615
|
* `upload`'s.
|
|
619
616
|
*/
|
|
620
617
|
@media (pointer: coarse) {
|
|
621
|
-
[data-ui
|
|
618
|
+
[data-ui-attachment] :is([data-part-action], [data-part-remove]) {
|
|
622
619
|
position: relative;
|
|
623
620
|
}
|
|
624
621
|
|
|
625
|
-
[data-ui
|
|
622
|
+
[data-ui-attachment] :is([data-part-action], [data-part-remove])::after {
|
|
626
623
|
content: '';
|
|
627
624
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
628
625
|
position: absolute;
|
|
@@ -637,7 +634,7 @@
|
|
|
637
634
|
* message was about archives — and every kind clears 4.03 : 1 against the
|
|
638
635
|
* failed ground in `light` (`default-theme.test.mjs`).
|
|
639
636
|
*/
|
|
640
|
-
[data-ui
|
|
637
|
+
[data-ui-attachment][data-part-root][data-invalid] {
|
|
641
638
|
--_surface: var(--slotted-tone-danger-surface);
|
|
642
639
|
--_edge: var(--slotted-tone-danger-border);
|
|
643
640
|
--_message-color: var(--slotted-tone-danger-text);
|
|
@@ -659,15 +656,15 @@
|
|
|
659
656
|
* at its contrast, and the tile gives up the kind's colour, because a file
|
|
660
657
|
* that cannot be opened should not still be the brightest thing in the row.
|
|
661
658
|
*/
|
|
662
|
-
[data-ui
|
|
659
|
+
[data-ui-attachment][data-part-root][data-disabled] {
|
|
663
660
|
--_ink: var(--slotted-disabled-foreground);
|
|
664
661
|
}
|
|
665
662
|
|
|
666
|
-
[data-ui
|
|
663
|
+
[data-ui-attachment][data-part-root][data-disabled] [data-part-detail] {
|
|
667
664
|
color: var(--slotted-disabled-foreground);
|
|
668
665
|
}
|
|
669
666
|
|
|
670
|
-
[data-ui
|
|
667
|
+
[data-ui-attachment][data-part-root][data-disabled] [data-part-preview] {
|
|
671
668
|
--_kind-tile: var(--slotted-disabled-background);
|
|
672
669
|
|
|
673
670
|
color: var(--slotted-disabled-foreground);
|
|
@@ -678,7 +675,7 @@
|
|
|
678
675
|
* whole-strength grey is the one value that says unavailable without
|
|
679
676
|
* dimming the thumbnail below legibility.
|
|
680
677
|
*/
|
|
681
|
-
[data-ui
|
|
678
|
+
[data-ui-attachment][data-part-root][data-disabled] [data-part-preview] > img {
|
|
682
679
|
filter: grayscale(1);
|
|
683
680
|
}
|
|
684
681
|
|
|
@@ -690,7 +687,7 @@
|
|
|
690
687
|
* photograph is any colour, and a dark mark on a mid-blue sky was what
|
|
691
688
|
* `upload`'s first grid capture showed.
|
|
692
689
|
*/
|
|
693
|
-
[data-ui
|
|
690
|
+
[data-ui-attachment][data-part-root][data-orientation='vertical'] {
|
|
694
691
|
align-items: stretch;
|
|
695
692
|
grid-template-areas:
|
|
696
693
|
'preview'
|
|
@@ -705,14 +702,14 @@
|
|
|
705
702
|
* the card rather than from `aspect-ratio`, which carried a fractional
|
|
706
703
|
* width into a fractional height in `upload`'s grid.
|
|
707
704
|
*/
|
|
708
|
-
[data-ui
|
|
705
|
+
[data-ui-attachment][data-orientation='vertical'] > [data-part-preview] {
|
|
709
706
|
--_preview-radius: var(--slotted-attachment-card-preview-radius, var(--slotted-radius-md, 6px));
|
|
710
707
|
|
|
711
708
|
block-size: calc(var(--_card-size) - 2 * var(--_inset) - 2 * var(--_border-width));
|
|
712
709
|
inline-size: 100%;
|
|
713
710
|
}
|
|
714
711
|
|
|
715
|
-
[data-ui
|
|
712
|
+
[data-ui-attachment][data-orientation='vertical'] > [data-part-preview] > [data-ui-icon] {
|
|
716
713
|
--slotted-icon-size: calc(2 * var(--_glyph-size));
|
|
717
714
|
}
|
|
718
715
|
|
|
@@ -721,8 +718,7 @@
|
|
|
721
718
|
* of thumbnails for the one PDF finds it faster by the three letters than by
|
|
722
719
|
* the silhouette. It is text, drawn from the attribute the binding writes.
|
|
723
720
|
*/
|
|
724
|
-
[data-ui
|
|
725
|
-
> [data-part='preview']:not(:has(img))::after {
|
|
721
|
+
[data-ui-attachment][data-orientation='vertical'] > [data-part-preview]:not(:has(img))::after {
|
|
726
722
|
content: attr(data-extension);
|
|
727
723
|
font-size: var(--_detail-size);
|
|
728
724
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
@@ -733,11 +729,11 @@
|
|
|
733
729
|
margin-block-start: var(--slotted-space-2, 0.25rem);
|
|
734
730
|
}
|
|
735
731
|
|
|
736
|
-
[data-ui
|
|
732
|
+
[data-ui-attachment][data-orientation='vertical'] > [data-part-body] {
|
|
737
733
|
margin-block-start: var(--_gap);
|
|
738
734
|
}
|
|
739
735
|
|
|
740
|
-
[data-ui
|
|
736
|
+
[data-ui-attachment][data-orientation='vertical'] > [data-part-actions] {
|
|
741
737
|
background-color: color-mix(
|
|
742
738
|
in oklab,
|
|
743
739
|
var(--slotted-surface) var(--slotted-attachment-card-actions-opacity, 96%),
|
|
@@ -764,17 +760,13 @@
|
|
|
764
760
|
* card it stays too: a card that answers no pointer cannot summon it either.
|
|
765
761
|
*/
|
|
766
762
|
@media (hover: hover) and (pointer: fine) {
|
|
767
|
-
[data-ui
|
|
768
|
-
> [data-part='actions'] {
|
|
763
|
+
[data-ui-attachment][data-orientation='vertical']:not([data-disabled]) > [data-part-actions] {
|
|
769
764
|
opacity: 0;
|
|
770
765
|
transition: opacity var(--slotted-duration-short) var(--slotted-easing-exit);
|
|
771
766
|
}
|
|
772
767
|
|
|
773
|
-
[data-ui
|
|
774
|
-
|
|
775
|
-
:focus-within
|
|
776
|
-
)
|
|
777
|
-
> [data-part='actions'] {
|
|
768
|
+
[data-ui-attachment][data-orientation='vertical']:not([data-disabled]):is(:hover, :focus-within)
|
|
769
|
+
> [data-part-actions] {
|
|
778
770
|
opacity: 1;
|
|
779
771
|
transition: opacity var(--slotted-duration-short) var(--slotted-easing-enter);
|
|
780
772
|
}
|
|
@@ -785,7 +777,7 @@
|
|
|
785
777
|
* A native list. It takes focus only when its last attachment is removed
|
|
786
778
|
* with the keyboard, which is what `tabindex="-1"` is for.
|
|
787
779
|
*/
|
|
788
|
-
[data-ui
|
|
780
|
+
[data-ui-attachment][data-part-group] {
|
|
789
781
|
box-sizing: border-box;
|
|
790
782
|
display: flex;
|
|
791
783
|
flex-direction: column;
|
|
@@ -796,7 +788,7 @@
|
|
|
796
788
|
padding: 0;
|
|
797
789
|
}
|
|
798
790
|
|
|
799
|
-
[data-ui
|
|
791
|
+
[data-ui-attachment][data-part-group]:focus-visible {
|
|
800
792
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
801
793
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
802
794
|
}
|
|
@@ -805,12 +797,12 @@
|
|
|
805
797
|
* An empty set takes no room: a message whose last file was removed does
|
|
806
798
|
* not keep a gap where the files were.
|
|
807
799
|
*/
|
|
808
|
-
[data-ui
|
|
800
|
+
[data-ui-attachment][data-part-group]:empty {
|
|
809
801
|
display: none;
|
|
810
802
|
}
|
|
811
803
|
|
|
812
804
|
/** Rows that share the width: two or three to a line, never narrower than a name. */
|
|
813
|
-
[data-ui
|
|
805
|
+
[data-ui-attachment][data-part-group][data-layout='grid'] {
|
|
814
806
|
display: grid;
|
|
815
807
|
grid-template-columns: repeat(
|
|
816
808
|
auto-fill,
|
|
@@ -819,7 +811,7 @@
|
|
|
819
811
|
}
|
|
820
812
|
|
|
821
813
|
/* Cards keep their own width, so every card is a whole pixel wide. */
|
|
822
|
-
[data-ui
|
|
814
|
+
[data-ui-attachment][data-part-group][data-layout='grid'][data-orientation='vertical'] {
|
|
823
815
|
grid-template-columns: repeat(auto-fill, var(--_card-size));
|
|
824
816
|
}
|
|
825
817
|
|
|
@@ -829,7 +821,7 @@
|
|
|
829
821
|
* at either end keeps its whole ring inside the scroll box instead of
|
|
830
822
|
* losing two pixels of it to the clip.
|
|
831
823
|
*/
|
|
832
|
-
[data-ui
|
|
824
|
+
[data-ui-attachment][data-part-group][data-layout='strip'] {
|
|
833
825
|
--_ring-reach: calc(
|
|
834
826
|
var(--slotted-focus-ring-width, 2px) + var(--slotted-focus-ring-offset, 2px)
|
|
835
827
|
);
|
|
@@ -845,13 +837,13 @@
|
|
|
845
837
|
scrollbar-width: thin;
|
|
846
838
|
}
|
|
847
839
|
|
|
848
|
-
[data-ui
|
|
840
|
+
[data-ui-attachment][data-part-group][data-layout='strip'] > [data-part-root] {
|
|
849
841
|
flex: none;
|
|
850
842
|
scroll-snap-align: start;
|
|
851
843
|
}
|
|
852
844
|
|
|
853
|
-
[data-ui
|
|
854
|
-
> [data-part
|
|
845
|
+
[data-ui-attachment][data-part-group][data-layout='strip']
|
|
846
|
+
> [data-part-root][data-orientation='horizontal'] {
|
|
855
847
|
inline-size: var(--slotted-attachment-strip-item-size, 15rem);
|
|
856
848
|
}
|
|
857
849
|
|
|
@@ -864,38 +856,38 @@
|
|
|
864
856
|
* `upload`'s controls, and the failed attachment keeps its edge.
|
|
865
857
|
*/
|
|
866
858
|
@media (forced-colors: active) {
|
|
867
|
-
[data-ui
|
|
859
|
+
[data-ui-attachment][data-part-root][data-invalid] {
|
|
868
860
|
--_edge: CanvasText;
|
|
869
861
|
}
|
|
870
862
|
|
|
871
863
|
/* The doubled edge is a shadow, which forced colours remove: it comes back
|
|
872
864
|
as an outline inside the border, and a focused failed attachment draws
|
|
873
865
|
its ring double. */
|
|
874
|
-
[data-ui
|
|
866
|
+
[data-ui-attachment][data-part-root][data-invalid] {
|
|
875
867
|
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
876
868
|
outline-offset: calc(-1 * (var(--_border-width) + var(--_invalid-edge-width)));
|
|
877
869
|
}
|
|
878
870
|
|
|
879
|
-
[data-ui
|
|
880
|
-
> [data-part
|
|
871
|
+
[data-ui-attachment][data-part-root][data-invalid]:has(
|
|
872
|
+
> [data-part-body] > [data-part-trigger]:focus-visible
|
|
881
873
|
) {
|
|
882
874
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
883
875
|
var(--slotted-focus-ring-color, Highlight);
|
|
884
876
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
885
877
|
}
|
|
886
878
|
|
|
887
|
-
[data-ui
|
|
888
|
-
> [data-part
|
|
879
|
+
[data-ui-attachment][data-part-root]:not([data-disabled]):not([data-loading]):has(
|
|
880
|
+
> [data-part-body] > [data-part-trigger]:is(:hover, :active)
|
|
889
881
|
) {
|
|
890
882
|
border-color: Highlight;
|
|
891
883
|
}
|
|
892
884
|
|
|
893
|
-
[data-ui
|
|
885
|
+
[data-ui-attachment] [data-part-preview] {
|
|
894
886
|
border: var(--_border-width) solid ButtonBorder;
|
|
895
887
|
}
|
|
896
888
|
|
|
897
|
-
[data-ui
|
|
898
|
-
:is([data-part
|
|
889
|
+
[data-ui-attachment]
|
|
890
|
+
:is([data-part-action], [data-part-remove]):not(:disabled):not([aria-disabled='true']):is(
|
|
899
891
|
:hover,
|
|
900
892
|
:active
|
|
901
893
|
) {
|