@slotted/styles 0.1.0-beta.34 → 0.1.0-beta.36
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 +5 -1
- package/src/accordion/accordion.css +20 -2
- package/src/accordion/accordion.tokens.json +2 -0
- package/src/avatar/avatar.css +1 -1
- package/src/avatar/avatar.tokens.json +1 -0
- package/src/badge/badge.css +1 -1
- package/src/badge/badge.tokens.json +1 -0
- package/src/button/button.css +247 -4
- package/src/button/button.tokens.json +8 -0
- package/src/calendar/calendar.css +131 -0
- package/src/calendar/calendar.tokens.json +10 -0
- package/src/card/card.css +63 -3
- package/src/cascader/cascader.css +13 -0
- package/src/chart/chart.css +3 -3
- package/src/chart/chart.tokens.json +1 -0
- package/src/checkbox/checkbox.css +47 -0
- package/src/checkbox/checkbox.tokens.json +4 -0
- package/src/collapsible/collapsible.css +174 -5
- package/src/collapsible/collapsible.tokens.json +4 -0
- package/src/combobox/combobox.css +13 -0
- package/src/command-palette/command-palette.css +60 -1
- package/src/command-palette/command-palette.tokens.json +2 -0
- package/src/dashboard-grid/dashboard-grid.css +29 -9
- package/src/dashboard-grid/dashboard-grid.tokens.json +3 -1
- package/src/data-grid/data-grid.css +44 -5
- package/src/data-list/data-list.css +17 -11
- package/src/description-list/description-list.css +15 -1
- package/src/entity-picker/entity-picker.css +70 -1
- package/src/entity-picker/entity-picker.tokens.json +2 -0
- package/src/field-group/field-group.css +17 -7
- package/src/filter-bar/filter-bar.css +24 -0
- package/src/floating-panel/floating-panel.css +123 -0
- package/src/floating-panel/floating-panel.tokens.json +30 -0
- package/src/inline-message/inline-message.css +1 -1
- package/src/inline-message/inline-message.tokens.json +1 -0
- package/src/kbd/kbd.css +1 -1
- package/src/kbd/kbd.tokens.json +1 -0
- package/src/list/list.css +32 -1
- package/src/list/list.tokens.json +2 -0
- package/src/list-item/list-item.css +102 -7
- package/src/list-item/list-item.tokens.json +3 -0
- package/src/listbox/listbox.css +50 -2
- package/src/listbox/listbox.tokens.json +6 -0
- package/src/message/message.css +20 -0
- package/src/message/message.tokens.json +1 -0
- package/src/meter/meter.css +136 -0
- package/src/meter/meter.tokens.json +23 -0
- package/src/multi-select/multi-select.css +13 -0
- package/src/page/page.css +58 -4
- package/src/page/page.tokens.json +7 -0
- package/src/prompt-composer/prompt-composer.css +18 -7
- package/src/rating/rating.css +1 -1
- package/src/rating/rating.tokens.json +1 -0
- package/src/runtime-properties.mjs +19 -0
- package/src/section/section.css +61 -4
- package/src/section/section.tokens.json +6 -0
- package/src/segmented-control/segmented-control.css +11 -0
- package/src/select/select.css +13 -0
- package/src/side-navigation/side-navigation.css +3 -3
- package/src/side-navigation/side-navigation.tokens.json +1 -0
- package/src/slider/slider.css +7 -1
- package/src/slider/slider.tokens.json +1 -0
- package/src/stat-card/stat-card.css +5 -0
- package/src/status-indicator/status-indicator.css +3 -2
- package/src/switch/switch.css +49 -25
- package/src/switch/switch.tokens.json +4 -0
- package/src/table/table.css +166 -12
- package/src/table/table.tokens.json +5 -0
- package/src/tag/tag.css +4 -1
- package/src/tag/tag.tokens.json +1 -0
- package/src/toolbar/toolbar.css +16 -2
- package/src/toolbar/toolbar.tokens.json +2 -1
- package/src/tooltip/tooltip.css +30 -0
- package/src/top-navigation/top-navigation.css +1 -1
- package/src/top-navigation/top-navigation.tokens.json +1 -0
- package/src/typography/typography.css +25 -0
- package/src/typography/typography.tokens.json +1 -0
|
@@ -44,6 +44,14 @@
|
|
|
44
44
|
* put the text five pixels inside the paperclip at `md`.
|
|
45
45
|
*/
|
|
46
46
|
--_padding-inline: calc(var(--_inset) + (var(--_button) - var(--_icon-size)) / 2);
|
|
47
|
+
/**
|
|
48
|
+
* Published, not read: the inset of the value's text, for content of the
|
|
49
|
+
* consumer's placed beside the input (attachments above it, a line of help
|
|
50
|
+
* under it) to start on the same edge. Written on the root, so a theme
|
|
51
|
+
* that sets it is overridden; the inherited value follows the size and the
|
|
52
|
+
* variant.
|
|
53
|
+
*/
|
|
54
|
+
--slotted-prompt-composer-content-inset: var(--_padding-inline);
|
|
47
55
|
/* One row of the composer in a form is one row of a text field. */
|
|
48
56
|
--_padding-block: max(0px, calc((var(--_height) - 1lh) / 2));
|
|
49
57
|
--_radius: var(--slotted-prompt-composer-radius, var(--slotted-radius-lg, 8px));
|
|
@@ -110,7 +118,9 @@
|
|
|
110
118
|
* that do not agree.
|
|
111
119
|
*/
|
|
112
120
|
[data-ui-prompt-composer][data-part-root][data-variant='raised'] {
|
|
113
|
-
|
|
121
|
+
/* Rounded: a sum of pixels and rems is a half pixel at a root other than
|
|
122
|
+
16px, and a circle on a half pixel has an uneven edge. */
|
|
123
|
+
--_button: round(up, calc(var(--_inner-size) + var(--slotted-space-2, 0.25rem)), 1px);
|
|
114
124
|
--_inset: var(--slotted-space-4, 0.5rem);
|
|
115
125
|
--_padding-block: calc(var(--_inset) + var(--slotted-space-2, 0.25rem));
|
|
116
126
|
--_radius: var(--slotted-prompt-composer-radius, calc(var(--_button) / 2 + var(--_inset)));
|
|
@@ -231,8 +241,9 @@
|
|
|
231
241
|
*
|
|
232
242
|
* `action` is the consumer's, `attach` the family's: both are R2 inner
|
|
233
243
|
* controls — no frame, no ground at rest, one step of ground for hover and
|
|
234
|
-
* one for press, and the ink never moves. Square when
|
|
235
|
-
*
|
|
244
|
+
* one for press, and the ink never moves. Square when they hold no words
|
|
245
|
+
* (`data-icon-only`, written by the binding), padded when they do, whatever
|
|
246
|
+
* names them: an aria-label gives a text action context, not a shape; round
|
|
236
247
|
* in the chat composer, a pill when they carry words.
|
|
237
248
|
*/
|
|
238
249
|
[data-ui-prompt-composer]
|
|
@@ -266,7 +277,7 @@
|
|
|
266
277
|
|
|
267
278
|
[data-ui-prompt-composer]
|
|
268
279
|
> :is([data-part-header], [data-part-footer])
|
|
269
|
-
> [data-part-action]:not([
|
|
280
|
+
> [data-part-action]:not([data-icon-only]) {
|
|
270
281
|
color: var(--slotted-prompt-composer-action-label-color, var(--slotted-text, CanvasText));
|
|
271
282
|
font-weight: var(--slotted-font-weight-medium, 500);
|
|
272
283
|
padding-inline: var(--slotted-space-3, 0.375rem);
|
|
@@ -286,7 +297,7 @@
|
|
|
286
297
|
*/
|
|
287
298
|
[data-ui-prompt-composer]
|
|
288
299
|
> :is([data-part-header], [data-part-footer])
|
|
289
|
-
> [data-part-action]:not([
|
|
300
|
+
> [data-part-action]:not([data-icon-only]) {
|
|
290
301
|
align-content: center;
|
|
291
302
|
align-items: baseline;
|
|
292
303
|
display: inline-grid;
|
|
@@ -296,7 +307,7 @@
|
|
|
296
307
|
|
|
297
308
|
[data-ui-prompt-composer]
|
|
298
309
|
> :is([data-part-header], [data-part-footer])
|
|
299
|
-
> [data-part-action]:not([
|
|
310
|
+
> [data-part-action]:not([data-icon-only])
|
|
300
311
|
> [data-ui-icon] {
|
|
301
312
|
margin-block-start: calc((1cap + 1ex) / 4 - var(--_icon-size) / 2);
|
|
302
313
|
translate: 0 calc(var(--_icon-size) / 2 - (1cap + 1ex) / 4);
|
|
@@ -305,7 +316,7 @@
|
|
|
305
316
|
/* A pill carries its words a step further from its round ends. */
|
|
306
317
|
[data-ui-prompt-composer][data-variant='raised']
|
|
307
318
|
> :is([data-part-header], [data-part-footer])
|
|
308
|
-
> [data-part-action]:not([
|
|
319
|
+
> [data-part-action]:not([data-icon-only]) {
|
|
309
320
|
padding-inline: var(--slotted-space-4, 0.5rem);
|
|
310
321
|
}
|
|
311
322
|
|
package/src/rating/rating.css
CHANGED
|
@@ -464,7 +464,7 @@
|
|
|
464
464
|
[data-ui-rating][data-part-root] > :is([data-part-value], [data-part-count]),
|
|
465
465
|
[data-ui-rating] [data-part-level-count],
|
|
466
466
|
[data-ui-rating] [data-part-level-label] > span:not([data-ui]) {
|
|
467
|
-
text-box: trim-both cap alphabetic;
|
|
467
|
+
text-box: trim-both var(--slotted-text-box-edge, cap alphabetic);
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
470
|
|
|
@@ -326,6 +326,25 @@ export const RUNTIME_PROPERTY_PREFIXES = [
|
|
|
326
326
|
'--slotted-media-viewer-media-inline-size',
|
|
327
327
|
'--slotted-media-viewer-media-block-size',
|
|
328
328
|
'--slotted-media-viewer-rotation',
|
|
329
|
+
/**
|
|
330
|
+
* `table` — how deep a folded row sits under the rows above it, for the
|
|
331
|
+
* reason `tree-depth` is: a fact about the consumer's data, stated per row.
|
|
332
|
+
* The step is `--slotted-table-tree-indent`, which is a token.
|
|
333
|
+
*/
|
|
334
|
+
'--slotted-table-depth',
|
|
335
|
+
/**
|
|
336
|
+
* `meter` — the share of the track the indicator covers, from the value the
|
|
337
|
+
* consumer states. No theme can know it.
|
|
338
|
+
*/
|
|
339
|
+
'--slotted-meter-ratio',
|
|
340
|
+
/**
|
|
341
|
+
* `sparkline` — where a mark of a position strip or a comparison stands on
|
|
342
|
+
* its axis, as a share from the consumer's data. The family owns theme
|
|
343
|
+
* tokens under the same prefix, so each is named one by one.
|
|
344
|
+
*/
|
|
345
|
+
'--slotted-sparkline-at',
|
|
346
|
+
'--slotted-sparkline-from',
|
|
347
|
+
'--slotted-sparkline-to',
|
|
329
348
|
];
|
|
330
349
|
|
|
331
350
|
/** Whether a custom property is written by script rather than by a theme. */
|
package/src/section/section.css
CHANGED
|
@@ -32,6 +32,9 @@
|
|
|
32
32
|
var(--slotted-font-size-md, 0.875rem)
|
|
33
33
|
);
|
|
34
34
|
--_subheading-line-height: var(--slotted-line-height-md, 1.5);
|
|
35
|
+
/* The heading as a title: mixed case, for a panel whose body outweighs a label. */
|
|
36
|
+
--_title-size: var(--slotted-section-title-size-md, var(--slotted-font-size-lg, 1rem));
|
|
37
|
+
--_title-line-height: var(--slotted-line-height-lg, 1.5);
|
|
35
38
|
/**
|
|
36
39
|
* The ground a sticky header paints, so the content passing under it is
|
|
37
40
|
* covered rather than read through. The page states its own ground in
|
|
@@ -60,6 +63,8 @@
|
|
|
60
63
|
var(--slotted-font-size-sm, 0.8125rem)
|
|
61
64
|
);
|
|
62
65
|
--_subheading-line-height: var(--slotted-line-height-sm, 1.45);
|
|
66
|
+
--_title-size: var(--slotted-section-title-size-sm, var(--slotted-font-size-md, 0.875rem));
|
|
67
|
+
--_title-line-height: var(--slotted-line-height-md, 1.5);
|
|
63
68
|
}
|
|
64
69
|
[data-ui-section][data-size='lg'] {
|
|
65
70
|
--_heading-size: var(--slotted-section-heading-size-lg, var(--slotted-font-size-sm, 0.8125rem));
|
|
@@ -69,6 +74,8 @@
|
|
|
69
74
|
var(--slotted-font-size-lg, 1rem)
|
|
70
75
|
);
|
|
71
76
|
--_subheading-line-height: var(--slotted-line-height-lg, 1.5);
|
|
77
|
+
--_title-size: var(--slotted-section-title-size-lg, var(--slotted-font-size-xl, 1.125rem));
|
|
78
|
+
--_title-line-height: var(--slotted-line-height-xl, 1.5);
|
|
72
79
|
}
|
|
73
80
|
|
|
74
81
|
/**
|
|
@@ -122,6 +129,10 @@
|
|
|
122
129
|
container-type: inline-size;
|
|
123
130
|
display: grid;
|
|
124
131
|
grid-template-columns: minmax(0, 1fr);
|
|
132
|
+
/* The title takes the three middle rows. The flexible rows above and
|
|
133
|
+
below it are empty, so actions taller than the title grow them and not
|
|
134
|
+
the distance from the heading to the description. */
|
|
135
|
+
grid-template-rows: 1fr auto auto auto 1fr;
|
|
125
136
|
min-inline-size: 0;
|
|
126
137
|
}
|
|
127
138
|
|
|
@@ -190,7 +201,7 @@
|
|
|
190
201
|
align-items: baseline;
|
|
191
202
|
display: grid;
|
|
192
203
|
grid-column: 1;
|
|
193
|
-
grid-row:
|
|
204
|
+
grid-row: 2 / span 3;
|
|
194
205
|
grid-template-columns: minmax(min-content, max-content) 1fr;
|
|
195
206
|
grid-template-rows: subgrid;
|
|
196
207
|
min-inline-size: 0;
|
|
@@ -227,6 +238,21 @@
|
|
|
227
238
|
text-wrap: pretty;
|
|
228
239
|
}
|
|
229
240
|
|
|
241
|
+
/**
|
|
242
|
+
* `heading="title"`: the heading in mixed case at a larger step, for a
|
|
243
|
+
* section whose body opens with text heavier than a label. It stands above
|
|
244
|
+
* the subsection's rule, so a nested section keeps the subsection's form.
|
|
245
|
+
*/
|
|
246
|
+
[data-ui-section][data-heading='title']
|
|
247
|
+
> [data-part-header]
|
|
248
|
+
> [data-part-title]
|
|
249
|
+
> [data-part-heading] {
|
|
250
|
+
font-size: var(--_title-size);
|
|
251
|
+
letter-spacing: normal;
|
|
252
|
+
line-height: var(--_title-line-height);
|
|
253
|
+
text-transform: none;
|
|
254
|
+
}
|
|
255
|
+
|
|
230
256
|
/**
|
|
231
257
|
* A subsection: the case, the size and the tone all change, so the level is
|
|
232
258
|
* read without the color. The text stays the muted token, which the theme
|
|
@@ -269,7 +295,7 @@
|
|
|
269
295
|
grid-column: 1 / -1;
|
|
270
296
|
grid-row: 3;
|
|
271
297
|
line-height: var(--slotted-line-height-sm, 1.45);
|
|
272
|
-
margin: var(--slotted-space-1, 0.125rem) 0 0;
|
|
298
|
+
margin: var(--slotted-section-description-gap, var(--slotted-space-1, 0.125rem)) 0 0;
|
|
273
299
|
max-inline-size: var(--slotted-section-description-measure, 70ch);
|
|
274
300
|
text-wrap: pretty;
|
|
275
301
|
}
|
|
@@ -280,10 +306,11 @@
|
|
|
280
306
|
--slotted-link-font-size: var(--slotted-font-size-sm, 0.8125rem);
|
|
281
307
|
|
|
282
308
|
align-items: center;
|
|
309
|
+
align-self: center;
|
|
283
310
|
display: flex;
|
|
284
311
|
gap: var(--slotted-action-gap, 8px);
|
|
285
312
|
grid-column: 2;
|
|
286
|
-
grid-row:
|
|
313
|
+
grid-row: 1 / -1;
|
|
287
314
|
margin-inline-start: var(--slotted-space-6, 1rem);
|
|
288
315
|
}
|
|
289
316
|
[data-ui-section] > [data-part-header] > [data-part-actions]:empty {
|
|
@@ -298,7 +325,7 @@
|
|
|
298
325
|
@container (inline-size < 20rem) {
|
|
299
326
|
[data-ui-section] > [data-part-header] > [data-part-actions] {
|
|
300
327
|
grid-column: 1 / -1;
|
|
301
|
-
grid-row:
|
|
328
|
+
grid-row: 6;
|
|
302
329
|
justify-self: end;
|
|
303
330
|
margin: var(--slotted-space-3, 0.375rem) 0 0;
|
|
304
331
|
}
|
|
@@ -309,4 +336,34 @@
|
|
|
309
336
|
[data-ui-section] > [data-part-body] {
|
|
310
337
|
min-inline-size: 0;
|
|
311
338
|
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* A body that bleeds, in a surface section: a table or a grid with no frame
|
|
342
|
+
* of its own runs to the panel's inline edges, and to the block edge the
|
|
343
|
+
* body touches, where it is clipped to the panel's inner corners. The body
|
|
344
|
+
* takes back the inset the surface gave it; written by hand, the same
|
|
345
|
+
* margins left a grid one inset short of the panel's end edge. `clip` and
|
|
346
|
+
* not `hidden`, so a sticky header inside still sticks to the page.
|
|
347
|
+
*/
|
|
348
|
+
[data-ui-section][data-ground='surface'] > [data-part-body][data-bleed] {
|
|
349
|
+
--_inner-radius: calc(
|
|
350
|
+
var(--slotted-section-radius, var(--slotted-radius-lg, 8px)) -
|
|
351
|
+
var(--slotted-border-width-thin, 1px)
|
|
352
|
+
);
|
|
353
|
+
|
|
354
|
+
margin-inline: calc(-1 * var(--slotted-section-inset, var(--slotted-space-6, 1rem)));
|
|
355
|
+
overflow: clip;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
[data-ui-section][data-ground='surface'] > [data-part-body][data-bleed]:first-child {
|
|
359
|
+
border-start-end-radius: var(--_inner-radius);
|
|
360
|
+
border-start-start-radius: var(--_inner-radius);
|
|
361
|
+
margin-block-start: calc(-1 * var(--slotted-section-inset, var(--slotted-space-6, 1rem)));
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
[data-ui-section][data-ground='surface'] > [data-part-body][data-bleed]:last-child {
|
|
365
|
+
border-end-end-radius: var(--_inner-radius);
|
|
366
|
+
border-end-start-radius: var(--_inner-radius);
|
|
367
|
+
margin-block-end: calc(-1 * var(--slotted-section-inset, var(--slotted-space-6, 1rem)));
|
|
368
|
+
}
|
|
312
369
|
}
|
|
@@ -7,15 +7,18 @@
|
|
|
7
7
|
"--slotted-font-size-lg",
|
|
8
8
|
"--slotted-font-size-md",
|
|
9
9
|
"--slotted-font-size-sm",
|
|
10
|
+
"--slotted-font-size-xl",
|
|
10
11
|
"--slotted-font-size-xs",
|
|
11
12
|
"--slotted-font-weight-semibold",
|
|
12
13
|
"--slotted-line-height-lg",
|
|
13
14
|
"--slotted-line-height-md",
|
|
14
15
|
"--slotted-line-height-sm",
|
|
16
|
+
"--slotted-line-height-xl",
|
|
15
17
|
"--slotted-line-height-xs",
|
|
16
18
|
"--slotted-page-ground",
|
|
17
19
|
"--slotted-radius-lg",
|
|
18
20
|
"--slotted-section-border",
|
|
21
|
+
"--slotted-section-description-gap",
|
|
19
22
|
"--slotted-section-description-measure",
|
|
20
23
|
"--slotted-section-gap",
|
|
21
24
|
"--slotted-section-header-background",
|
|
@@ -30,6 +33,9 @@
|
|
|
30
33
|
"--slotted-section-subheading-size-sm",
|
|
31
34
|
"--slotted-section-subsection-spacing",
|
|
32
35
|
"--slotted-section-surface",
|
|
36
|
+
"--slotted-section-title-size-lg",
|
|
37
|
+
"--slotted-section-title-size-md",
|
|
38
|
+
"--slotted-section-title-size-sm",
|
|
33
39
|
"--slotted-space-1",
|
|
34
40
|
"--slotted-space-3",
|
|
35
41
|
"--slotted-space-4",
|
|
@@ -171,6 +171,17 @@
|
|
|
171
171
|
inline-size: 100%;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
+
/**
|
|
175
|
+
* A control told to condense to a column takes the width its parent gives,
|
|
176
|
+
* for the same reason: the binding compares that width with the width its
|
|
177
|
+
* labels need, and writes `data-orientation="vertical"` below it, which
|
|
178
|
+
* draws the column and moves the thumb on that axis.
|
|
179
|
+
*/
|
|
180
|
+
[data-ui-segmented-control][data-part-root][data-condense='vertical'] {
|
|
181
|
+
display: grid;
|
|
182
|
+
inline-size: 100%;
|
|
183
|
+
}
|
|
184
|
+
|
|
174
185
|
/* ── The segment ──────────────────────────────────────────────────────── */
|
|
175
186
|
|
|
176
187
|
[data-ui-segmented-control] [data-part-item] {
|
package/src/select/select.css
CHANGED
|
@@ -1580,6 +1580,19 @@
|
|
|
1580
1580
|
display: none;
|
|
1581
1581
|
}
|
|
1582
1582
|
|
|
1583
|
+
/* Beside the empty message the status says the same thing to the eye. It
|
|
1584
|
+
stays the live region that announces the count, clipped to one pixel. */
|
|
1585
|
+
[data-ui-select] [data-part-empty] ~ [data-part-status] {
|
|
1586
|
+
block-size: 1px;
|
|
1587
|
+
clip-path: inset(50%);
|
|
1588
|
+
inline-size: 1px;
|
|
1589
|
+
min-inline-size: 0;
|
|
1590
|
+
overflow: hidden;
|
|
1591
|
+
padding: 0;
|
|
1592
|
+
position: absolute;
|
|
1593
|
+
white-space: nowrap;
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1583
1596
|
/**
|
|
1584
1597
|
* The wait, as the shape of the list that is coming. Three rows the height of
|
|
1585
1598
|
* an option rather than one sentence, so the surface a reader is looking at
|
|
@@ -658,19 +658,19 @@
|
|
|
658
658
|
@supports (text-box: trim-both cap alphabetic) {
|
|
659
659
|
[data-ui-side-navigation] [data-part-label] {
|
|
660
660
|
padding-block: calc((var(--_line-height) * 1em - 0.75em) / 2);
|
|
661
|
-
text-box: trim-both cap alphabetic;
|
|
661
|
+
text-box: trim-both var(--slotted-text-box-edge, cap alphabetic);
|
|
662
662
|
}
|
|
663
663
|
|
|
664
664
|
[data-ui-side-navigation] [data-part-description],
|
|
665
665
|
[data-ui-side-navigation] [data-part-section-label] {
|
|
666
666
|
padding-block: calc((var(--slotted-line-height-xs, 1.4) * 1em - 0.75em) / 2);
|
|
667
|
-
text-box: trim-both cap alphabetic;
|
|
667
|
+
text-box: trim-both var(--slotted-text-box-edge, cap alphabetic);
|
|
668
668
|
}
|
|
669
669
|
|
|
670
670
|
[data-ui-side-navigation] [data-part-count] {
|
|
671
671
|
line-height: var(--slotted-line-height-xs, 1.4);
|
|
672
672
|
padding-block: calc((var(--slotted-line-height-xs, 1.4) * 1em - 0.75em) / 2);
|
|
673
|
-
text-box: trim-both cap alphabetic;
|
|
673
|
+
text-box: trim-both var(--slotted-text-box-edge, cap alphabetic);
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
676
|
|
package/src/slider/slider.css
CHANGED
|
@@ -258,8 +258,14 @@
|
|
|
258
258
|
* bounds are the two places a thumb's center can reach and the thumb itself
|
|
259
259
|
* stays inside the band.
|
|
260
260
|
*/
|
|
261
|
+
/* `--slotted-slider-track-background` takes any background, a gradient
|
|
262
|
+
included: a scale whose colors are what each position yields. With it,
|
|
263
|
+
`indicator={false}` leaves the scale whole on both sides of the thumb. */
|
|
261
264
|
[data-ui-slider] [data-part-track] {
|
|
262
|
-
background
|
|
265
|
+
background: var(
|
|
266
|
+
--slotted-slider-track-background,
|
|
267
|
+
var(--slotted-slider-track-color, var(--slotted-surface-sunken, Canvas))
|
|
268
|
+
);
|
|
263
269
|
border: var(--slotted-control-border-width, 1px) solid
|
|
264
270
|
var(--slotted-slider-track-border-color, var(--slotted-control-border-color, ButtonBorder));
|
|
265
271
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"--slotted-slider-thumb-hover-background",
|
|
56
56
|
"--slotted-slider-thumb-shadow",
|
|
57
57
|
"--slotted-slider-thumb-size",
|
|
58
|
+
"--slotted-slider-track-background",
|
|
58
59
|
"--slotted-slider-track-border-color",
|
|
59
60
|
"--slotted-slider-track-color",
|
|
60
61
|
"--slotted-slider-track-size",
|
|
@@ -822,9 +822,14 @@
|
|
|
822
822
|
* the small step. Every box under a row of figures moved when the answer
|
|
823
823
|
* arrived. The floor is one line of the value's own type, so the two states
|
|
824
824
|
* occupy the same box.
|
|
825
|
+
*
|
|
826
|
+
* The bar stands at the middle of that line, where the figure's capitals
|
|
827
|
+
* stand. On the baseline rule of the loaded value a lone bar has no
|
|
828
|
+
* baseline to share and fell to the top of the line, against the label.
|
|
825
829
|
*/
|
|
826
830
|
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
827
831
|
:scope[data-loading] [data-part-value] {
|
|
832
|
+
align-items: center;
|
|
828
833
|
min-block-size: calc(var(--_value-size) * var(--_value-line));
|
|
829
834
|
}
|
|
830
835
|
}
|
|
@@ -49,10 +49,11 @@
|
|
|
49
49
|
* fractional disc lands its edge across two device pixels at 1×. ReUI draws
|
|
50
50
|
* the same light at 6 pixels beside 14-pixel type (0.43 em); 8 beside 13 is
|
|
51
51
|
* 0.62 em, which keeps the tone legible in a table cell without
|
|
52
|
-
* outweighing the word.
|
|
52
|
+
* outweighing the word. The step is rounded, because the space scale is
|
|
53
|
+
* in rems: at a 14px root `sm` was 5.25 pixels.
|
|
53
54
|
*/
|
|
54
55
|
--_dot-size: var(--slotted-space-4, 0.5rem);
|
|
55
|
-
--_mark-size: var(--_dot-size);
|
|
56
|
+
--_mark-size: round(nearest, var(--_dot-size), 1px);
|
|
56
57
|
--_rim-width: var(
|
|
57
58
|
--slotted-status-indicator-mark-border-width,
|
|
58
59
|
var(--slotted-border-width-thin, 1px)
|
package/src/switch/switch.css
CHANGED
|
@@ -368,6 +368,37 @@
|
|
|
368
368
|
--_gap: var(--slotted-control-label-gap-lg, 12px);
|
|
369
369
|
}
|
|
370
370
|
|
|
371
|
+
/**
|
|
372
|
+
* One control tall: in a row of fields aligned to their end, the box ends
|
|
373
|
+
* where their controls end and the pill is centered on their line. The
|
|
374
|
+
* padding is what the control height leaves past the switch's own row, so a
|
|
375
|
+
* label that wraps grows the box. The height is the control of the switch's
|
|
376
|
+
* size unless `--slotted-switch-control-block-size` names another step (a
|
|
377
|
+
* small switch in a row of medium fields).
|
|
378
|
+
*/
|
|
379
|
+
[data-ui-switch][data-part-root][data-variant='control'] {
|
|
380
|
+
padding-block: max(
|
|
381
|
+
0px,
|
|
382
|
+
(
|
|
383
|
+
var(--slotted-switch-control-block-size, var(--_control-height)) -
|
|
384
|
+
max(var(--_track-block), var(--_font-size) * var(--_line-height))
|
|
385
|
+
) /
|
|
386
|
+
2
|
|
387
|
+
);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
[data-ui-switch][data-part-root][data-size='sm'] {
|
|
391
|
+
--_control-height: var(--slotted-control-height-sm, 30px);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
[data-ui-switch][data-part-root][data-size='md'] {
|
|
395
|
+
--_control-height: var(--slotted-control-height-md, 34px);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
[data-ui-switch][data-part-root][data-size='lg'] {
|
|
399
|
+
--_control-height: var(--slotted-control-height-lg, 38px);
|
|
400
|
+
}
|
|
401
|
+
|
|
371
402
|
/* ── States ───────────────────────────────────────────────────────────
|
|
372
403
|
*
|
|
373
404
|
* Written strongest last, and each weaker one guarded against every stronger
|
|
@@ -545,25 +576,32 @@
|
|
|
545
576
|
);
|
|
546
577
|
}
|
|
547
578
|
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
*/
|
|
579
|
+
/*
|
|
580
|
+
* The outer edge of the track alone. An inset edge drew a second danger line
|
|
581
|
+
* inside the accent fill of a checked track and a ring around the thumb, in
|
|
582
|
+
* place of its own border and lift; the thumb keeps both. The edge stands
|
|
583
|
+
* outside the track's border at the invalid edge width, so the state is
|
|
584
|
+
* width as well as color (WCAG 1.4.1, the edge `text-field` draws), and the
|
|
585
|
+
* checked, hover and pressed rules that color the border do not take it.
|
|
586
|
+
*/
|
|
587
|
+
[data-ui-switch][data-part-root][data-invalid] > [data-part-track] {
|
|
558
588
|
--_invalid-edge-width: var(
|
|
559
589
|
--slotted-switch-invalid-edge-width,
|
|
560
590
|
var(--slotted-control-invalid-edge-width, 1px)
|
|
561
591
|
);
|
|
562
592
|
|
|
563
|
-
box-shadow:
|
|
593
|
+
box-shadow: 0 0 0 var(--_invalid-edge-width)
|
|
564
594
|
var(--slotted-switch-invalid-border-color, var(--slotted-tone-danger-border));
|
|
565
595
|
}
|
|
566
596
|
|
|
597
|
+
/* Forced colors remove every box shadow, and the edge with them: it comes
|
|
598
|
+
back as an outline of the same width around the track. */
|
|
599
|
+
@media (forced-colors: active) {
|
|
600
|
+
[data-ui-switch][data-part-root][data-invalid] > [data-part-track] {
|
|
601
|
+
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
|
|
567
605
|
/**
|
|
568
606
|
* Loading. The geometry does not change — the thumb stays where it is and
|
|
569
607
|
* the track keeps its size — because a control that resizes while it saves
|
|
@@ -680,18 +718,4 @@
|
|
|
680
718
|
> [data-part-description] {
|
|
681
719
|
color: var(--slotted-switch-disabled-color, var(--slotted-disabled-foreground, GrayText));
|
|
682
720
|
}
|
|
683
|
-
|
|
684
|
-
/*
|
|
685
|
-
* Forced colors remove every box shadow, and the edge with them. The width
|
|
686
|
-
* comes back as an outline inside the border, on the
|
|
687
|
-
* track and on the thumb; the focus ring takes the track and the thumb keeps
|
|
688
|
-
* its edge.
|
|
689
|
-
*/
|
|
690
|
-
@media (forced-colors: active) {
|
|
691
|
-
[data-ui-switch][data-part-root][data-invalid] > [data-part-track],
|
|
692
|
-
[data-ui-switch][data-part-root][data-invalid] > [data-part-track] > [data-part-thumb] {
|
|
693
|
-
outline: var(--_invalid-edge-width) solid CanvasText;
|
|
694
|
-
outline-offset: calc(-1 * (var(--_border) + var(--_invalid-edge-width)));
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
721
|
}
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
"--slotted-control-font-size-lg",
|
|
7
7
|
"--slotted-control-font-size-md",
|
|
8
8
|
"--slotted-control-font-size-sm",
|
|
9
|
+
"--slotted-control-height-lg",
|
|
10
|
+
"--slotted-control-height-md",
|
|
11
|
+
"--slotted-control-height-sm",
|
|
9
12
|
"--slotted-control-icon-size-lg",
|
|
10
13
|
"--slotted-control-icon-size-md",
|
|
11
14
|
"--slotted-control-icon-size-sm",
|
|
@@ -39,6 +42,7 @@
|
|
|
39
42
|
"--slotted-switch-checked-hover-background",
|
|
40
43
|
"--slotted-switch-checked-thumb-border-color",
|
|
41
44
|
"--slotted-switch-color",
|
|
45
|
+
"--slotted-switch-control-block-size",
|
|
42
46
|
"--slotted-switch-description-color",
|
|
43
47
|
"--slotted-switch-description-font-size",
|
|
44
48
|
"--slotted-switch-disabled-background",
|