@slotted/styles 0.1.0-beta.2 → 0.1.0-beta.21
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 +45 -42
- package/src/action-bar/action-bar.tokens.json +1 -0
- package/src/action-sheet/action-sheet.css +36 -36
- package/src/alert/alert.css +68 -67
- package/src/alert/alert.tokens.json +5 -0
- package/src/app-shell/app-shell.css +452 -314
- package/src/app-shell/app-shell.tokens.json +5 -2
- 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 +149 -68
- package/src/button/button.tokens.json +10 -0
- package/src/button-group/button-group.css +79 -74
- package/src/button-group/button-group.tokens.json +2 -0
- package/src/calendar/calendar.css +133 -103
- package/src/calendar/calendar.tokens.json +5 -1
- package/src/card/card.css +54 -61
- package/src/carousel/carousel.css +150 -161
- package/src/cascader/cascader.css +154 -153
- package/src/cascader/cascader.tokens.json +1 -0
- package/src/chart/chart.css +258 -248
- 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 +72 -76
- package/src/color-picker/color-picker.css +83 -91
- package/src/column-manager/column-manager.css +106 -114
- package/src/combobox/combobox.css +157 -124
- package/src/combobox/combobox.tokens.json +2 -0
- package/src/command-palette/command-palette.css +103 -90
- package/src/command-palette/command-palette.tokens.json +1 -0
- package/src/container/container.css +24 -24
- package/src/context-menu/context-menu.css +8 -8
- package/src/currency-field/currency-field.css +212 -88
- package/src/currency-field/currency-field.tokens.json +13 -0
- package/src/dashboard-grid/dashboard-grid.css +184 -114
- package/src/data-grid/data-grid.css +535 -470
- package/src/data-grid/data-grid.tokens.json +4 -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 +57 -52
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +75 -57
- package/src/date-picker/date-picker.tokens.json +1 -0
- package/src/date-range-picker/date-range-picker.css +116 -118
- package/src/datetime-field/datetime-field.css +80 -80
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +63 -63
- package/src/datetime-range-picker/datetime-range-picker.css +151 -156
- package/src/description-list/description-list.css +80 -65
- package/src/detail-panel/detail-panel.css +86 -71
- package/src/detail-panel/detail-panel.tokens.json +2 -0
- package/src/dialog/dialog.css +376 -153
- package/src/dialog/dialog.tokens.json +6 -0
- package/src/divider/divider.css +18 -18
- package/src/drawer/drawer.css +513 -217
- package/src/drawer/drawer.tokens.json +6 -0
- package/src/entity-picker/entity-picker.css +273 -256
- package/src/entity-picker/entity-picker.tokens.json +2 -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 +62 -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 +153 -77
- package/src/inline-message/inline-message.tokens.json +4 -0
- package/src/kbd/kbd.css +48 -36
- package/src/kbd/kbd.tokens.json +3 -0
- package/src/link/link.css +36 -15
- package/src/link/link.tokens.json +4 -0
- 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 +117 -74
- package/src/menu/menu.tokens.json +1 -0
- package/src/menubar/menubar.css +13 -13
- package/src/message/message.css +192 -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 +177 -160
- 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 +83 -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 +39 -23
- package/src/page/page.tokens.json +1 -0
- package/src/page-header/page-header.css +339 -284
- package/src/page-header/page-header.tokens.json +5 -0
- package/src/pagination/pagination.css +68 -72
- package/src/popover/popover.css +73 -61
- package/src/popover/popover.tokens.json +1 -0
- package/src/progress-indicator/progress-indicator.css +169 -113
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +251 -104
- 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 +178 -43
- package/src/section/section.tokens.json +8 -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 +153 -132
- package/src/select/select.tokens.json +2 -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 +83 -180
- package/src/spinner/spinner.tokens.json +0 -1
- 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 +380 -241
- package/src/stat-card/stat-card.tokens.json +5 -0
- package/src/status-indicator/status-indicator.css +107 -82
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +58 -62
- package/src/switch/switch.css +86 -92
- package/src/table/table.css +340 -175
- package/src/table/table.tokens.json +6 -0
- package/src/table-of-contents/table-of-contents.css +57 -56
- package/src/table-of-contents/table-of-contents.tokens.json +1 -0
- package/src/tabs/tabs.css +322 -289
- package/src/tabs/tabs.tokens.json +7 -1
- package/src/tag/tag.css +91 -71
- package/src/tag/tag.tokens.json +9 -0
- package/src/tags-input/tags-input.css +147 -82
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +134 -136
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +33 -28
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +74 -69
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +58 -58
- package/src/time-range-picker/time-range-picker.css +128 -133
- package/src/timeline/timeline.css +254 -266
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +115 -98
- package/src/toast/toast.tokens.json +6 -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 +59 -38
- package/src/tooltip/tooltip.tokens.json +1 -0
- 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
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* mirrors its state onto the frame rather than styling through, so a control
|
|
17
17
|
* used outside a field looks the same as one inside it.
|
|
18
18
|
*/
|
|
19
|
-
[data-ui
|
|
19
|
+
[data-ui-currency-field][data-part-root] {
|
|
20
20
|
/**
|
|
21
21
|
* Type, height, inline padding, gap and glyph size all come from the
|
|
22
22
|
* control scales — the only ones the theme restates per density — so an
|
|
@@ -101,6 +101,8 @@
|
|
|
101
101
|
font-family: var(--slotted-control-font-family, system-ui, sans-serif);
|
|
102
102
|
font-size: var(--_font-size);
|
|
103
103
|
gap: var(--_gap);
|
|
104
|
+
/* In a flex row the item's basis is its content, not the whole row. */
|
|
105
|
+
flex-basis: content;
|
|
104
106
|
inline-size: 100%;
|
|
105
107
|
/* A control in a grid track narrower than its intrinsic width has to shrink. */
|
|
106
108
|
min-inline-size: 0;
|
|
@@ -126,7 +128,7 @@
|
|
|
126
128
|
* the reader's eye, and under cents-first entry every keystroke rewrites the
|
|
127
129
|
* whole string — so the setting matters more here than anywhere else.
|
|
128
130
|
*/
|
|
129
|
-
[data-ui
|
|
131
|
+
[data-ui-currency-field] > [data-part-input] {
|
|
130
132
|
background-color: transparent;
|
|
131
133
|
/* The frame's border box, not its content box: on a coarse pointer the frame
|
|
132
134
|
is the touch target's height and the control it holds is too. Stretched
|
|
@@ -160,7 +162,7 @@
|
|
|
160
162
|
unicode-bidi: plaintext;
|
|
161
163
|
}
|
|
162
164
|
|
|
163
|
-
[data-ui
|
|
165
|
+
[data-ui-currency-field] > [data-part-input]::placeholder {
|
|
164
166
|
color: var(--slotted-currency-field-placeholder-color, var(--slotted-text-muted, GrayText));
|
|
165
167
|
text-overflow: ellipsis;
|
|
166
168
|
}
|
|
@@ -176,19 +178,19 @@
|
|
|
176
178
|
* means "the document's end edge, whatever the run inside is doing".
|
|
177
179
|
*/
|
|
178
180
|
|
|
179
|
-
[data-ui
|
|
181
|
+
[data-ui-currency-field][data-align='end'] > [data-part-input] {
|
|
180
182
|
text-align: right;
|
|
181
183
|
}
|
|
182
184
|
|
|
183
|
-
[data-ui
|
|
185
|
+
[data-ui-currency-field][data-align='end']:dir(rtl) > [data-part-input] {
|
|
184
186
|
text-align: left;
|
|
185
187
|
}
|
|
186
188
|
|
|
187
|
-
[data-ui
|
|
189
|
+
[data-ui-currency-field][data-align='start'] > [data-part-input] {
|
|
188
190
|
text-align: left;
|
|
189
191
|
}
|
|
190
192
|
|
|
191
|
-
[data-ui
|
|
193
|
+
[data-ui-currency-field][data-align='start']:dir(rtl) > [data-part-input] {
|
|
192
194
|
text-align: right;
|
|
193
195
|
}
|
|
194
196
|
|
|
@@ -198,7 +200,7 @@
|
|
|
198
200
|
* control beside it. One library, one scale.
|
|
199
201
|
*/
|
|
200
202
|
|
|
201
|
-
[data-ui
|
|
203
|
+
[data-ui-currency-field][data-part-root][data-size='sm'] {
|
|
202
204
|
--_font-size: var(--slotted-control-font-size-sm, 12px);
|
|
203
205
|
--_height: var(--slotted-control-height-sm, 30px);
|
|
204
206
|
--_padding-inline: var(--slotted-control-padding-inline-sm, 10px);
|
|
@@ -207,7 +209,7 @@
|
|
|
207
209
|
--_inner-size: var(--slotted-control-inner-size-sm, 22px);
|
|
208
210
|
}
|
|
209
211
|
|
|
210
|
-
[data-ui
|
|
212
|
+
[data-ui-currency-field][data-part-root][data-size='md'] {
|
|
211
213
|
--_font-size: var(--slotted-control-font-size-md, 13px);
|
|
212
214
|
--_height: var(--slotted-control-height-md, 34px);
|
|
213
215
|
--_padding-inline: var(--slotted-control-padding-inline-md, 13px);
|
|
@@ -216,7 +218,7 @@
|
|
|
216
218
|
--_inner-size: var(--slotted-control-inner-size-md, 24px);
|
|
217
219
|
}
|
|
218
220
|
|
|
219
|
-
[data-ui
|
|
221
|
+
[data-ui-currency-field][data-part-root][data-size='lg'] {
|
|
220
222
|
--_font-size: var(--slotted-control-font-size-lg, 14px);
|
|
221
223
|
--_height: var(--slotted-control-height-lg, 38px);
|
|
222
224
|
--_padding-inline: var(--slotted-control-padding-inline-lg, 16px);
|
|
@@ -232,7 +234,7 @@
|
|
|
232
234
|
* nothing at rest, which is what a dense table of amounts needs.
|
|
233
235
|
*/
|
|
234
236
|
|
|
235
|
-
[data-ui
|
|
237
|
+
[data-ui-currency-field][data-part-root][data-variant='subtle'] {
|
|
236
238
|
background-color: var(
|
|
237
239
|
--slotted-currency-field-subtle-background,
|
|
238
240
|
var(--slotted-surface-sunken, Canvas)
|
|
@@ -246,7 +248,7 @@
|
|
|
246
248
|
/* No edge, no lift, no ground and no corner of its own: the cell it sits in
|
|
247
249
|
is the box, the row is the ground, a cell has no corner, and the resting
|
|
248
250
|
shadow would draw the cell where there is none. */
|
|
249
|
-
[data-ui
|
|
251
|
+
[data-ui-currency-field][data-part-root][data-variant='plain'] {
|
|
250
252
|
background-color: transparent;
|
|
251
253
|
border-color: transparent;
|
|
252
254
|
border-radius: var(--slotted-radius-none, 0px);
|
|
@@ -259,7 +261,7 @@
|
|
|
259
261
|
* its only edge exactly where an edge matters most.
|
|
260
262
|
*/
|
|
261
263
|
@media (forced-colors: active) {
|
|
262
|
-
[data-ui
|
|
264
|
+
[data-ui-currency-field][data-part-root][data-variant='plain'] {
|
|
263
265
|
border-color: ButtonBorder;
|
|
264
266
|
}
|
|
265
267
|
}
|
|
@@ -271,8 +273,8 @@
|
|
|
271
273
|
* holds, is selected with it, is copied with it and is parsed back out of
|
|
272
274
|
* it. This one is none of those things, which is the whole distinction.
|
|
273
275
|
*/
|
|
274
|
-
[data-ui
|
|
275
|
-
[data-ui
|
|
276
|
+
[data-ui-currency-field] > [data-part-start],
|
|
277
|
+
[data-ui-currency-field] > [data-part-end] {
|
|
276
278
|
align-items: center;
|
|
277
279
|
color: var(--slotted-currency-field-adornment-color, var(--slotted-text-muted, GrayText));
|
|
278
280
|
display: inline-flex;
|
|
@@ -290,8 +292,8 @@
|
|
|
290
292
|
--slotted-icon-size: var(--_icon-size);
|
|
291
293
|
}
|
|
292
294
|
|
|
293
|
-
[data-ui
|
|
294
|
-
[data-ui
|
|
295
|
+
[data-ui-currency-field] > [data-part-start] > svg,
|
|
296
|
+
[data-ui-currency-field] > [data-part-end] > svg {
|
|
295
297
|
block-size: var(--_icon-size);
|
|
296
298
|
inline-size: var(--_icon-size);
|
|
297
299
|
}
|
|
@@ -302,8 +304,8 @@
|
|
|
302
304
|
* advance width. An adornment that draws no glyph takes the margin the glyph
|
|
303
305
|
* box already has, on both sides — the measurement `text-field` derived.
|
|
304
306
|
*/
|
|
305
|
-
[data-ui
|
|
306
|
-
[data-ui
|
|
307
|
+
[data-ui-currency-field] > [data-part-start]:not(:has(svg, img, [data-ui-icon])),
|
|
308
|
+
[data-ui-currency-field] > [data-part-end]:not(:has(svg, img, [data-ui-icon])) {
|
|
307
309
|
padding-inline: calc(var(--_icon-size) / 8);
|
|
308
310
|
}
|
|
309
311
|
|
|
@@ -317,12 +319,11 @@
|
|
|
317
319
|
* mark is not a button, it has no ground to change, and the cursor alone
|
|
318
320
|
* said nothing a reader would look at.
|
|
319
321
|
*/
|
|
320
|
-
[data-ui
|
|
321
|
-
> :is([data-part='start'], [data-part='end']):has(> [data-part='scrub']) {
|
|
322
|
+
[data-ui-currency-field] > :is([data-part-start], [data-part-end]):has(> [data-part-scrub]) {
|
|
322
323
|
align-self: stretch;
|
|
323
324
|
}
|
|
324
325
|
|
|
325
|
-
[data-ui
|
|
326
|
+
[data-ui-currency-field] [data-part-scrub] {
|
|
326
327
|
align-items: center;
|
|
327
328
|
align-self: stretch;
|
|
328
329
|
cursor: ew-resize;
|
|
@@ -339,12 +340,12 @@
|
|
|
339
340
|
-webkit-user-select: none;
|
|
340
341
|
}
|
|
341
342
|
|
|
342
|
-
[data-ui
|
|
343
|
-
[data-part
|
|
343
|
+
[data-ui-currency-field]:not([data-disabled]):not([data-readonly])
|
|
344
|
+
[data-part-scrub]:is(:hover, [data-scrubbing]) {
|
|
344
345
|
color: var(--slotted-currency-field-scrub-active-color, var(--slotted-text, CanvasText));
|
|
345
346
|
}
|
|
346
347
|
|
|
347
|
-
[data-ui
|
|
348
|
+
[data-ui-currency-field]:is([data-disabled], [data-readonly]) [data-part-scrub] {
|
|
348
349
|
cursor: default;
|
|
349
350
|
touch-action: auto;
|
|
350
351
|
}
|
|
@@ -357,9 +358,9 @@
|
|
|
357
358
|
* `aria-controls`. Their glyphs are the `Glyph` element the binding
|
|
358
359
|
* renders: a character is never an icon.
|
|
359
360
|
*/
|
|
360
|
-
[data-ui
|
|
361
|
-
[data-ui
|
|
362
|
-
[data-ui
|
|
361
|
+
[data-ui-currency-field] > [data-part-stepper] > button,
|
|
362
|
+
[data-ui-currency-field] > [data-part-decrement],
|
|
363
|
+
[data-ui-currency-field] > [data-part-increment] {
|
|
363
364
|
align-items: center;
|
|
364
365
|
appearance: none;
|
|
365
366
|
background-color: transparent;
|
|
@@ -383,8 +384,8 @@
|
|
|
383
384
|
|
|
384
385
|
/* The `icon` box inside each button is drawn at the control's own icon
|
|
385
386
|
step rather than at the icon family's default. */
|
|
386
|
-
[data-ui
|
|
387
|
-
[data-ui
|
|
387
|
+
[data-ui-currency-field] [data-part-decrement],
|
|
388
|
+
[data-ui-currency-field] [data-part-increment] {
|
|
388
389
|
--slotted-icon-size: var(--_icon-size);
|
|
389
390
|
}
|
|
390
391
|
|
|
@@ -397,7 +398,7 @@
|
|
|
397
398
|
* more do not change with the reading direction, where a chevron along the
|
|
398
399
|
* inline axis would read as "previous" and "next" and would have to mirror.
|
|
399
400
|
*/
|
|
400
|
-
[data-ui
|
|
401
|
+
[data-ui-currency-field][data-stepper='stacked'] [data-part-increment] > [data-ui-icon] {
|
|
401
402
|
rotate: 0.5turn;
|
|
402
403
|
}
|
|
403
404
|
|
|
@@ -410,11 +411,11 @@
|
|
|
410
411
|
* column and its halves are one surface. The paint gives the inset back to
|
|
411
412
|
* the pointer: each half's hit area reaches the frame.
|
|
412
413
|
*/
|
|
413
|
-
[data-ui
|
|
414
|
+
[data-ui-currency-field][data-part-root][data-stepper='stacked'] {
|
|
414
415
|
padding-inline-end: 0;
|
|
415
416
|
}
|
|
416
417
|
|
|
417
|
-
[data-ui
|
|
418
|
+
[data-ui-currency-field] > [data-part-stepper] {
|
|
418
419
|
align-self: stretch;
|
|
419
420
|
box-sizing: content-box;
|
|
420
421
|
display: flex;
|
|
@@ -425,26 +426,26 @@
|
|
|
425
426
|
padding-inline-end: var(--_column-inset);
|
|
426
427
|
}
|
|
427
428
|
|
|
428
|
-
[data-ui
|
|
429
|
+
[data-ui-currency-field] > [data-part-stepper] > button {
|
|
429
430
|
/* Two halves of the column, whatever the frame's height turns out to be. */
|
|
430
431
|
block-size: 50%;
|
|
431
432
|
border-radius: var(--_column-radius);
|
|
432
433
|
inline-size: 100%;
|
|
433
434
|
}
|
|
434
435
|
|
|
435
|
-
[data-ui
|
|
436
|
-
> [data-part
|
|
437
|
-
> :is([data-part
|
|
436
|
+
[data-ui-currency-field]
|
|
437
|
+
> [data-part-stepper]
|
|
438
|
+
> :is([data-part-increment], [data-part-decrement])::after {
|
|
438
439
|
content: '';
|
|
439
440
|
inset-inline: 0 calc(var(--_column-inset) * -1);
|
|
440
441
|
position: absolute;
|
|
441
442
|
}
|
|
442
443
|
|
|
443
|
-
[data-ui
|
|
444
|
+
[data-ui-currency-field] > [data-part-stepper] > [data-part-increment]::after {
|
|
444
445
|
inset-block: calc(var(--_column-inset) * -1) 0;
|
|
445
446
|
}
|
|
446
447
|
|
|
447
|
-
[data-ui
|
|
448
|
+
[data-ui-currency-field] > [data-part-stepper] > [data-part-decrement]::after {
|
|
448
449
|
inset-block: 0 calc(var(--_column-inset) * -1);
|
|
449
450
|
}
|
|
450
451
|
|
|
@@ -459,7 +460,7 @@
|
|
|
459
460
|
* percentage falls back to the `<svg>`'s own square, and two of them plus the
|
|
460
461
|
* divider would stand taller than the value and grow the frame.
|
|
461
462
|
*/
|
|
462
|
-
[data-ui
|
|
463
|
+
[data-ui-currency-field] > [data-part-stepper] > button > [data-ui-icon] {
|
|
463
464
|
block-size: min(var(--_icon-size), 100%);
|
|
464
465
|
contain: size;
|
|
465
466
|
}
|
|
@@ -470,23 +471,23 @@
|
|
|
470
471
|
* frame's padding is that inset on both sides. No rule divides a button from
|
|
471
472
|
* the value: the ground it paints is its edge.
|
|
472
473
|
*/
|
|
473
|
-
[data-ui
|
|
474
|
+
[data-ui-currency-field][data-part-root][data-stepper='split'] {
|
|
474
475
|
gap: 0;
|
|
475
476
|
padding-inline: var(--_inset);
|
|
476
477
|
}
|
|
477
478
|
|
|
478
|
-
[data-ui
|
|
479
|
-
[data-ui
|
|
479
|
+
[data-ui-currency-field][data-stepper='split'] > [data-part-decrement],
|
|
480
|
+
[data-ui-currency-field][data-stepper='split'] > [data-part-increment] {
|
|
480
481
|
block-size: var(--_action-size);
|
|
481
482
|
border-radius: var(--_action-radius);
|
|
482
483
|
inline-size: var(--_action-size);
|
|
483
484
|
}
|
|
484
485
|
|
|
485
|
-
[data-ui
|
|
486
|
+
[data-ui-currency-field][data-stepper='split'] > [data-part-start] {
|
|
486
487
|
padding-inline-start: var(--_gap);
|
|
487
488
|
}
|
|
488
489
|
|
|
489
|
-
[data-ui
|
|
490
|
+
[data-ui-currency-field][data-stepper='split'] > [data-part-end] {
|
|
490
491
|
padding-inline-end: var(--_gap);
|
|
491
492
|
}
|
|
492
493
|
|
|
@@ -501,7 +502,7 @@
|
|
|
501
502
|
* stepper beside it would otherwise be five pixels off every amount without
|
|
502
503
|
* one — which is the comparison `align="end"` exists to make.
|
|
503
504
|
*/
|
|
504
|
-
[data-ui
|
|
505
|
+
[data-ui-currency-field][data-stepper='split'] > [data-part-input] {
|
|
505
506
|
padding-inline: var(--_padding-inline);
|
|
506
507
|
}
|
|
507
508
|
|
|
@@ -511,8 +512,8 @@
|
|
|
511
512
|
* 24 in both axes. This grows the target to the minimum and leaves a larger
|
|
512
513
|
* one alone — the correction `docs/token-foundation.md` leaves to the family.
|
|
513
514
|
*/
|
|
514
|
-
[data-ui
|
|
515
|
-
[data-ui
|
|
515
|
+
[data-ui-currency-field][data-stepper='split'] > [data-part-decrement]::after,
|
|
516
|
+
[data-ui-currency-field][data-stepper='split'] > [data-part-increment]::after {
|
|
516
517
|
content: '';
|
|
517
518
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
518
519
|
position: absolute;
|
|
@@ -528,14 +529,14 @@
|
|
|
528
529
|
* value's edge and past the frame's.
|
|
529
530
|
*/
|
|
530
531
|
@media (pointer: coarse) {
|
|
531
|
-
[data-ui
|
|
532
|
-
> :is([data-part
|
|
532
|
+
[data-ui-currency-field][data-stepper='split']
|
|
533
|
+
> :is([data-part-decrement], [data-part-increment])::after {
|
|
533
534
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
534
535
|
}
|
|
535
536
|
|
|
536
|
-
[data-ui
|
|
537
|
-
> [data-part
|
|
538
|
-
> :is([data-part
|
|
537
|
+
[data-ui-currency-field]
|
|
538
|
+
> [data-part-stepper]
|
|
539
|
+
> :is([data-part-increment], [data-part-decrement])::after {
|
|
539
540
|
inset-inline: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
540
541
|
}
|
|
541
542
|
}
|
|
@@ -546,16 +547,16 @@
|
|
|
546
547
|
* ones it can meet, which is the order `STATE_PRECEDENCE` sets.
|
|
547
548
|
*/
|
|
548
549
|
|
|
549
|
-
[data-ui
|
|
550
|
-
[data-ui
|
|
550
|
+
[data-ui-currency-field] [data-part-decrement]:hover:not(:disabled),
|
|
551
|
+
[data-ui-currency-field] [data-part-increment]:hover:not(:disabled) {
|
|
551
552
|
background-color: var(
|
|
552
553
|
--slotted-currency-field-stepper-hover-background,
|
|
553
554
|
var(--slotted-tone-secondary-subtle-hover)
|
|
554
555
|
);
|
|
555
556
|
}
|
|
556
557
|
|
|
557
|
-
[data-ui
|
|
558
|
-
[data-ui
|
|
558
|
+
[data-ui-currency-field] [data-part-decrement]:active:not(:disabled),
|
|
559
|
+
[data-ui-currency-field] [data-part-increment]:active:not(:disabled) {
|
|
559
560
|
background-color: var(
|
|
560
561
|
--slotted-currency-field-stepper-active-background,
|
|
561
562
|
var(--slotted-tone-secondary-subtle-active)
|
|
@@ -568,8 +569,8 @@
|
|
|
568
569
|
* says it as well as the ink: the disabled foreground and the resting
|
|
569
570
|
* stepper colour are two steps of one neutral.
|
|
570
571
|
*/
|
|
571
|
-
[data-ui
|
|
572
|
-
[data-ui
|
|
572
|
+
[data-ui-currency-field] [data-part-decrement]:disabled,
|
|
573
|
+
[data-ui-currency-field] [data-part-increment]:disabled {
|
|
573
574
|
background-color: var(
|
|
574
575
|
--slotted-currency-field-stepper-disabled-background,
|
|
575
576
|
var(--slotted-disabled-background)
|
|
@@ -583,15 +584,15 @@
|
|
|
583
584
|
* touch and a screen-reader cursor activating one directly. It sits inside
|
|
584
585
|
* the frame's own edge, so the ring never doubles the border.
|
|
585
586
|
*/
|
|
586
|
-
[data-ui
|
|
587
|
-
[data-ui
|
|
587
|
+
[data-ui-currency-field] [data-part-decrement]:focus-visible,
|
|
588
|
+
[data-ui-currency-field] [data-part-increment]:focus-visible {
|
|
588
589
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
589
590
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
590
591
|
}
|
|
591
592
|
|
|
592
593
|
/* ── Frame states ─────────────────────────────────────────────────────── */
|
|
593
594
|
|
|
594
|
-
[data-ui
|
|
595
|
+
[data-ui-currency-field][data-part-root]:hover:not([data-disabled]):not([data-readonly]):not(
|
|
595
596
|
[data-invalid]
|
|
596
597
|
) {
|
|
597
598
|
border-color: var(
|
|
@@ -600,16 +601,16 @@
|
|
|
600
601
|
);
|
|
601
602
|
}
|
|
602
603
|
|
|
603
|
-
[data-ui
|
|
604
|
-
[data-
|
|
605
|
-
):not([data-
|
|
604
|
+
[data-ui-currency-field][data-part-root][data-variant='subtle']:hover:not([data-disabled]):not(
|
|
605
|
+
[data-readonly]
|
|
606
|
+
):not([data-invalid]) {
|
|
606
607
|
background-color: var(
|
|
607
608
|
--slotted-currency-field-subtle-hover-background,
|
|
608
609
|
var(--slotted-tone-secondary-subtle-hover)
|
|
609
610
|
);
|
|
610
611
|
}
|
|
611
612
|
|
|
612
|
-
[data-ui
|
|
613
|
+
[data-ui-currency-field][data-part-root][data-variant='plain']:hover:not([data-disabled]):not(
|
|
613
614
|
[data-readonly]
|
|
614
615
|
):not([data-invalid]) {
|
|
615
616
|
background-color: var(
|
|
@@ -625,13 +626,13 @@
|
|
|
625
626
|
* matches `:focus-visible` on a text input for a pointer press as well as for
|
|
626
627
|
* a Tab, which is right for a control whose caret is the thing that moved.
|
|
627
628
|
*/
|
|
628
|
-
[data-ui
|
|
629
|
+
[data-ui-currency-field][data-part-root]:has(> [data-part-input]:focus-visible) {
|
|
629
630
|
/* The resting shadow, recoloured: the lift under the control and the ring
|
|
630
631
|
around it are one colour, and the state decides which colour that is. */
|
|
631
632
|
box-shadow: var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
632
633
|
var(--slotted-focus-ring-color, Highlight);
|
|
633
634
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
634
|
-
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
635
|
+
outline-offset: var(--slotted-control-focus-ring-offset, var(--slotted-focus-ring-offset, 2px));
|
|
635
636
|
}
|
|
636
637
|
|
|
637
638
|
/**
|
|
@@ -641,8 +642,8 @@
|
|
|
641
642
|
* shadow that appears only under focus is a cell that changes size when it
|
|
642
643
|
* is used.
|
|
643
644
|
*/
|
|
644
|
-
[data-ui
|
|
645
|
-
> [data-part
|
|
645
|
+
[data-ui-currency-field][data-part-root][data-variant='plain']:has(
|
|
646
|
+
> [data-part-input]:focus-visible
|
|
646
647
|
) {
|
|
647
648
|
box-shadow: none;
|
|
648
649
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
@@ -655,7 +656,7 @@
|
|
|
655
656
|
* colour on the element moves the outline, the shadow and both steppers'
|
|
656
657
|
* rings at once.
|
|
657
658
|
*/
|
|
658
|
-
[data-ui
|
|
659
|
+
[data-ui-currency-field][data-part-root][data-invalid] {
|
|
659
660
|
--slotted-focus-ring-color: var(
|
|
660
661
|
--slotted-currency-field-invalid-focus-ring-color,
|
|
661
662
|
var(--slotted-focus-ring-color-invalid, Highlight)
|
|
@@ -683,17 +684,15 @@
|
|
|
683
684
|
box-shadow: var(--_invalid-edge);
|
|
684
685
|
}
|
|
685
686
|
|
|
686
|
-
[data-ui
|
|
687
|
-
> [data-part='input']:focus-visible
|
|
688
|
-
) {
|
|
687
|
+
[data-ui-currency-field][data-part-root][data-invalid]:has(> [data-part-input]:focus-visible) {
|
|
689
688
|
box-shadow:
|
|
690
689
|
var(--_invalid-edge),
|
|
691
690
|
var(--slotted-control-shadow-focus-geometry, 0 1px 4px -1px)
|
|
692
691
|
var(--slotted-focus-ring-color, Highlight);
|
|
693
692
|
}
|
|
694
693
|
|
|
695
|
-
[data-ui
|
|
696
|
-
> [data-part
|
|
694
|
+
[data-ui-currency-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
695
|
+
> [data-part-input]:focus-visible
|
|
697
696
|
) {
|
|
698
697
|
/* The ring lies inside the box here, over the border and an edge as wide as
|
|
699
698
|
it; the edge reaches past the ring. */
|
|
@@ -711,23 +710,24 @@
|
|
|
711
710
|
* control draws its ring double, which a valid ring is not.
|
|
712
711
|
*/
|
|
713
712
|
@media (forced-colors: active) {
|
|
714
|
-
[data-ui
|
|
713
|
+
[data-ui-currency-field][data-part-root][data-invalid] {
|
|
715
714
|
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
716
715
|
outline-offset: calc(
|
|
717
716
|
-1 * (var(--slotted-control-border-width, 1px) + var(--_invalid-edge-width))
|
|
718
717
|
);
|
|
719
718
|
}
|
|
720
719
|
|
|
721
|
-
[data-ui
|
|
722
|
-
> [data-part='input']:focus-visible
|
|
723
|
-
) {
|
|
720
|
+
[data-ui-currency-field][data-part-root][data-invalid]:has(> [data-part-input]:focus-visible) {
|
|
724
721
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
725
722
|
var(--slotted-focus-ring-color, Highlight);
|
|
726
|
-
outline-offset: var(
|
|
723
|
+
outline-offset: var(
|
|
724
|
+
--slotted-control-focus-ring-offset,
|
|
725
|
+
var(--slotted-focus-ring-offset, 2px)
|
|
726
|
+
);
|
|
727
727
|
}
|
|
728
728
|
|
|
729
|
-
[data-ui
|
|
730
|
-
> [data-part
|
|
729
|
+
[data-ui-currency-field][data-part-root][data-variant='plain'][data-invalid]:has(
|
|
730
|
+
> [data-part-input]:focus-visible
|
|
731
731
|
) {
|
|
732
732
|
outline: calc(var(--slotted-focus-ring-width, 2px) + var(--_invalid-edge-width)) double
|
|
733
733
|
var(--slotted-focus-ring-color, Highlight);
|
|
@@ -743,7 +743,7 @@
|
|
|
743
743
|
* ground says "not yours to change", the edge steps down to the separator
|
|
744
744
|
* weight, and the ink stays at full strength.
|
|
745
745
|
*/
|
|
746
|
-
[data-ui
|
|
746
|
+
[data-ui-currency-field][data-part-root][data-readonly] {
|
|
747
747
|
background-color: var(
|
|
748
748
|
--slotted-currency-field-readonly-background,
|
|
749
749
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -760,8 +760,8 @@
|
|
|
760
760
|
* because a control can be disabled by something that never told it so: a
|
|
761
761
|
* disabled `fieldset` disables every control inside it.
|
|
762
762
|
*/
|
|
763
|
-
[data-ui
|
|
764
|
-
[data-ui
|
|
763
|
+
[data-ui-currency-field][data-part-root][data-disabled],
|
|
764
|
+
[data-ui-currency-field][data-part-root]:has(> [data-part-input]:disabled) {
|
|
765
765
|
background-color: var(
|
|
766
766
|
--slotted-currency-field-disabled-background,
|
|
767
767
|
var(--slotted-disabled-background)
|
|
@@ -780,8 +780,132 @@
|
|
|
780
780
|
* Muted to the colour the theme measures rather than faded by opacity: an
|
|
781
781
|
* amount nobody can read is a field nobody can check.
|
|
782
782
|
*/
|
|
783
|
-
[data-ui
|
|
784
|
-
[data-ui
|
|
783
|
+
[data-ui-currency-field][data-part-root][data-disabled] > [data-part-start],
|
|
784
|
+
[data-ui-currency-field][data-part-root][data-disabled] > [data-part-end] {
|
|
785
785
|
color: var(--slotted-disabled-foreground);
|
|
786
786
|
}
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* ── The display step ───────────────────────────────────────────────────
|
|
790
|
+
*
|
|
791
|
+
* The headline amount of an entry sheet: the figure at the 4xl step in
|
|
792
|
+
* tabular figures with the tighter tracking large type takes, and the
|
|
793
|
+
* currency's mark apart from it, muted at the xl step and on the baseline
|
|
794
|
+
* of the digits. Where the platform sizes a field to its content the
|
|
795
|
+
* control is as wide as the amount it holds, so the mark stays beside the
|
|
796
|
+
* digits; elsewhere the control takes the line and `align` places the
|
|
797
|
+
* amount in it.
|
|
798
|
+
*/
|
|
799
|
+
[data-ui-currency-field][data-part-root][data-appearance='display'] {
|
|
800
|
+
--_font-size: var(
|
|
801
|
+
--slotted-currency-field-display-font-size,
|
|
802
|
+
var(--slotted-font-size-4xl, 2rem)
|
|
803
|
+
);
|
|
804
|
+
--_height: calc(
|
|
805
|
+
var(--_font-size) * var(--slotted-line-height-4xl, 1.2) + 2 * var(--slotted-space-2, 0.25rem)
|
|
806
|
+
);
|
|
807
|
+
--_padding-inline: var(--slotted-control-padding-inline-lg, 16px);
|
|
808
|
+
--_gap: var(--slotted-space-3, 0.375rem);
|
|
809
|
+
|
|
810
|
+
align-items: baseline;
|
|
811
|
+
font-weight: var(--slotted-font-weight-medium, 500);
|
|
812
|
+
letter-spacing: var(--slotted-letter-spacing-tighter, -0.03em);
|
|
813
|
+
line-height: var(--slotted-line-height-4xl, 1.2);
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
[data-ui-currency-field][data-part-root][data-appearance='display'] > [data-part-symbol] {
|
|
817
|
+
color: var(--slotted-currency-field-symbol-color, var(--slotted-text-muted, GrayText));
|
|
818
|
+
flex: none;
|
|
819
|
+
font-size: var(
|
|
820
|
+
--slotted-currency-field-symbol-font-size,
|
|
821
|
+
var(--slotted-font-size-xl, 1.125rem)
|
|
822
|
+
);
|
|
823
|
+
font-weight: var(--slotted-font-weight-regular, 400);
|
|
824
|
+
letter-spacing: 0;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
[data-ui-currency-field][data-part-root][data-appearance='display'] > [data-part-input] {
|
|
828
|
+
align-self: auto;
|
|
829
|
+
margin-block: 0;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
@supports (field-sizing: content) {
|
|
833
|
+
[data-ui-currency-field][data-part-root][data-appearance='display'] {
|
|
834
|
+
inline-size: fit-content;
|
|
835
|
+
max-inline-size: 100%;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
[data-ui-currency-field][data-part-root][data-appearance='display'] > [data-part-input] {
|
|
839
|
+
field-sizing: content;
|
|
840
|
+
flex: 0 1 auto;
|
|
841
|
+
min-inline-size: 1ch;
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
/**
|
|
846
|
+
* No box: a rule under the amount. On focus the rule takes the text colour
|
|
847
|
+
* and doubles, which is the focus indicator; invalid, it takes the danger
|
|
848
|
+
* colour. No ground, no corner and no resting lift.
|
|
849
|
+
*/
|
|
850
|
+
[data-ui-currency-field][data-part-root][data-appearance='display'] {
|
|
851
|
+
background-color: transparent;
|
|
852
|
+
border-color: transparent;
|
|
853
|
+
border-block-end-color: var(
|
|
854
|
+
--slotted-currency-field-underline-color,
|
|
855
|
+
var(--slotted-control-border-color, ButtonBorder)
|
|
856
|
+
);
|
|
857
|
+
border-radius: var(--slotted-radius-none, 0px);
|
|
858
|
+
box-shadow: none;
|
|
859
|
+
padding-inline: 0;
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
[data-ui-currency-field][data-part-root][data-appearance='display']:has(
|
|
863
|
+
> [data-part-input]:focus-visible
|
|
864
|
+
) {
|
|
865
|
+
border-block-end-color: var(--slotted-text, CanvasText);
|
|
866
|
+
box-shadow: inset 0 calc(-1 * var(--slotted-border-width-thin, 1px)) 0
|
|
867
|
+
var(--slotted-text, CanvasText);
|
|
868
|
+
outline: none;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
[data-ui-currency-field][data-part-root][data-appearance='display'][data-invalid] {
|
|
872
|
+
border-block-end-color: var(--slotted-tone-danger-border, CanvasText);
|
|
873
|
+
box-shadow: none;
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
[data-ui-currency-field][data-part-root][data-appearance='display'][data-invalid]:has(
|
|
877
|
+
> [data-part-input]:focus-visible
|
|
878
|
+
) {
|
|
879
|
+
box-shadow: inset 0 calc(-1 * var(--_invalid-edge-width)) 0 var(--_invalid-edge-color);
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
[data-ui-currency-field][data-part-root][data-appearance='display']:has(
|
|
883
|
+
> [data-part-input]:disabled
|
|
884
|
+
) {
|
|
885
|
+
border-block-end-color: var(--slotted-disabled-border, GrayText);
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
@media (forced-colors: active) {
|
|
889
|
+
[data-ui-currency-field][data-part-root][data-appearance='display'] {
|
|
890
|
+
border-block-end-color: ButtonBorder;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
/* A shadow is not painted under forced colours, so the doubled rule of
|
|
894
|
+
focus is a wider border there. */
|
|
895
|
+
[data-ui-currency-field][data-part-root][data-appearance='display']:has(
|
|
896
|
+
> [data-part-input]:focus-visible
|
|
897
|
+
) {
|
|
898
|
+
border-block-end-color: Highlight;
|
|
899
|
+
border-block-end-width: calc(2 * var(--slotted-border-width-thin, 1px));
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
[data-ui-currency-field][data-part-root][data-appearance='display'][data-invalid]:has(
|
|
903
|
+
> [data-part-input]:focus-visible
|
|
904
|
+
) {
|
|
905
|
+
border-block-end-color: Highlight;
|
|
906
|
+
border-block-end-width: calc(
|
|
907
|
+
var(--slotted-border-width-thin, 1px) + var(--_invalid-edge-width)
|
|
908
|
+
);
|
|
909
|
+
}
|
|
910
|
+
}
|
|
787
911
|
}
|