@slotted/styles 0.1.0-beta.15 → 0.1.0-beta.16
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/calendar/calendar.css +40 -0
- package/src/calendar/calendar.tokens.json +5 -1
- package/src/chart/chart.css +3 -0
- package/src/dashboard-grid/dashboard-grid.css +59 -10
- package/src/dialog/dialog.css +4 -0
- package/src/drawer/drawer.css +47 -8
- package/src/drawer/drawer.tokens.json +2 -0
- package/src/link/link.css +21 -0
- package/src/link/link.tokens.json +4 -0
- package/src/message/message.css +10 -0
- package/src/prompt-composer/prompt-composer.css +47 -19
- package/src/section/section.css +3 -0
- package/src/stat-card/stat-card.css +3 -0
- package/src/table/table.css +31 -11
package/package.json
CHANGED
|
@@ -504,6 +504,46 @@
|
|
|
504
504
|
background-color: currentcolor;
|
|
505
505
|
}
|
|
506
506
|
|
|
507
|
+
/**
|
|
508
|
+
* What falls on the day (`marks`): a dot in the row today's dot reserves, in
|
|
509
|
+
* the mark's tone. A marked day draws its mark there instead, and today
|
|
510
|
+
* keeps its colour and weight; on a chosen day the dot takes the day's ink.
|
|
511
|
+
*/
|
|
512
|
+
[data-ui-calendar] [data-part-day]:has(> [data-part-mark])::before {
|
|
513
|
+
display: none;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
[data-ui-calendar] [data-part-mark] {
|
|
517
|
+
--_mark: var(--slotted-tone-accent-solid, currentcolor);
|
|
518
|
+
|
|
519
|
+
background-color: var(--_mark);
|
|
520
|
+
block-size: var(--slotted-space-2, 0.25rem);
|
|
521
|
+
border-radius: var(--slotted-radius-full, 9999px);
|
|
522
|
+
flex: 0 0 auto;
|
|
523
|
+
inline-size: var(--slotted-space-2, 0.25rem);
|
|
524
|
+
order: 1;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
[data-ui-calendar] [data-part-mark][data-tone='info'] {
|
|
528
|
+
--_mark: var(--slotted-tone-info-solid, currentcolor);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
[data-ui-calendar] [data-part-mark][data-tone='success'] {
|
|
532
|
+
--_mark: var(--slotted-tone-success-solid, currentcolor);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
[data-ui-calendar] [data-part-mark][data-tone='warning'] {
|
|
536
|
+
--_mark: var(--slotted-tone-warning-solid, currentcolor);
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
[data-ui-calendar] [data-part-mark][data-tone='danger'] {
|
|
540
|
+
--_mark: var(--slotted-tone-danger-solid, currentcolor);
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
[data-ui-calendar] [data-part-cell][data-selected] [data-part-mark] {
|
|
544
|
+
--_mark: currentcolor;
|
|
545
|
+
}
|
|
546
|
+
|
|
507
547
|
/**
|
|
508
548
|
* A day of the month either side. Quiet enough to read as context and legible
|
|
509
549
|
* enough to press, because a reader who wants 1 October while looking at
|
|
@@ -62,6 +62,10 @@
|
|
|
62
62
|
"--slotted-tone-accent-subtle-active",
|
|
63
63
|
"--slotted-tone-accent-subtle-hover",
|
|
64
64
|
"--slotted-tone-accent-text",
|
|
65
|
+
"--slotted-tone-danger-solid",
|
|
66
|
+
"--slotted-tone-info-solid",
|
|
65
67
|
"--slotted-tone-secondary-subtle-active",
|
|
66
|
-
"--slotted-tone-secondary-subtle-hover"
|
|
68
|
+
"--slotted-tone-secondary-subtle-hover",
|
|
69
|
+
"--slotted-tone-success-solid",
|
|
70
|
+
"--slotted-tone-warning-solid"
|
|
67
71
|
]
|
package/src/chart/chart.css
CHANGED
|
@@ -249,6 +249,9 @@
|
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
[data-ui-chart] > [data-part-header] > [data-part-actions] {
|
|
252
|
+
/* An action slot states one size for the links it holds. */
|
|
253
|
+
--slotted-link-font-size: var(--slotted-font-size-sm, 0.8125rem);
|
|
254
|
+
|
|
252
255
|
align-items: center;
|
|
253
256
|
display: flex;
|
|
254
257
|
flex: none;
|
|
@@ -68,37 +68,69 @@
|
|
|
68
68
|
* The medium class flows the same order, each widget a half or the whole
|
|
69
69
|
* of the row; its height stays in rows. The compact class is one
|
|
70
70
|
* column whose widgets are as tall as their content, the way a phone reads a
|
|
71
|
-
* dashboard.
|
|
72
|
-
*
|
|
71
|
+
* dashboard. Once the binding has measured the grid it writes the class on
|
|
72
|
+
* the root (`data-size-class`, from `expandedFrom`), and the rules follow
|
|
73
|
+
* the attribute. Before that the container queries draw the classes at the
|
|
74
|
+
* thresholds of §2.7, literal because CSS refuses a custom property in a
|
|
75
|
+
* container condition.
|
|
73
76
|
*/
|
|
74
77
|
@container dashboard-grid (width < 1024px) {
|
|
75
|
-
[data-ui-dashboard-grid] > [data-part-grid] {
|
|
78
|
+
[data-ui-dashboard-grid]:not([data-size-class]) > [data-part-grid] {
|
|
76
79
|
--_cols: var(--_dg-columns-medium, 6);
|
|
77
80
|
}
|
|
78
81
|
|
|
79
|
-
[data-ui-dashboard-grid]
|
|
82
|
+
[data-ui-dashboard-grid]:not([data-size-class])
|
|
83
|
+
:is([data-part-widget], [data-part-placeholder]) {
|
|
80
84
|
grid-column: auto / span var(--_dg-span-medium, 3);
|
|
81
85
|
grid-row: auto / span var(--_dg-h, 2);
|
|
82
86
|
}
|
|
83
87
|
}
|
|
84
88
|
|
|
89
|
+
[data-ui-dashboard-grid]:is([data-size-class='medium'], [data-size-class='compact'])
|
|
90
|
+
> [data-part-grid] {
|
|
91
|
+
--_cols: var(--_dg-columns-medium, 6);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
[data-ui-dashboard-grid]:is([data-size-class='medium'], [data-size-class='compact'])
|
|
95
|
+
:is([data-part-widget], [data-part-placeholder]) {
|
|
96
|
+
grid-column: auto / span var(--_dg-span-medium, 3);
|
|
97
|
+
grid-row: auto / span var(--_dg-h, 2);
|
|
98
|
+
}
|
|
99
|
+
|
|
85
100
|
@container dashboard-grid (width < 600px) {
|
|
86
|
-
[data-ui-dashboard-grid] > [data-part-grid] {
|
|
101
|
+
[data-ui-dashboard-grid]:not([data-size-class]) > [data-part-grid] {
|
|
87
102
|
--_cols: var(--_dg-columns-compact, 1);
|
|
88
103
|
|
|
89
104
|
grid-auto-rows: auto;
|
|
90
105
|
}
|
|
91
106
|
|
|
92
|
-
[data-ui-dashboard-grid]
|
|
107
|
+
[data-ui-dashboard-grid]:not([data-size-class])
|
|
108
|
+
:is([data-part-widget], [data-part-placeholder]) {
|
|
93
109
|
grid-column: 1 / -1;
|
|
94
110
|
grid-row: auto;
|
|
95
111
|
}
|
|
96
112
|
|
|
97
|
-
[data-ui-dashboard-grid] [data-part-placeholder] {
|
|
113
|
+
[data-ui-dashboard-grid]:not([data-size-class]) [data-part-placeholder] {
|
|
98
114
|
min-block-size: calc(var(--_row) * 2);
|
|
99
115
|
}
|
|
100
116
|
}
|
|
101
117
|
|
|
118
|
+
[data-ui-dashboard-grid][data-size-class='compact'] > [data-part-grid] {
|
|
119
|
+
--_cols: var(--_dg-columns-compact, 1);
|
|
120
|
+
|
|
121
|
+
grid-auto-rows: auto;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
[data-ui-dashboard-grid][data-size-class='compact']
|
|
125
|
+
:is([data-part-widget], [data-part-placeholder]) {
|
|
126
|
+
grid-column: 1 / -1;
|
|
127
|
+
grid-row: auto;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
[data-ui-dashboard-grid][data-size-class='compact'] [data-part-placeholder] {
|
|
131
|
+
min-block-size: calc(var(--_row) * 2);
|
|
132
|
+
}
|
|
133
|
+
|
|
102
134
|
/* ── The widget ──────────────────────────────────────────────────────── */
|
|
103
135
|
|
|
104
136
|
/**
|
|
@@ -361,11 +393,16 @@
|
|
|
361
393
|
/* Below the expanded class the widgets flow, so no cell is a place to drop
|
|
362
394
|
on and the lattice would be specks in the gaps. */
|
|
363
395
|
@container dashboard-grid (width < 1024px) {
|
|
364
|
-
[data-ui-dashboard-grid] > [data-part-grid]::before {
|
|
396
|
+
[data-ui-dashboard-grid]:not([data-size-class]) > [data-part-grid]::before {
|
|
365
397
|
display: none;
|
|
366
398
|
}
|
|
367
399
|
}
|
|
368
400
|
|
|
401
|
+
[data-ui-dashboard-grid]:is([data-size-class='medium'], [data-size-class='compact'])
|
|
402
|
+
> [data-part-grid]::before {
|
|
403
|
+
display: none;
|
|
404
|
+
}
|
|
405
|
+
|
|
369
406
|
/* ── Editing: the widget ─────────────────────────────────────────────── */
|
|
370
407
|
|
|
371
408
|
/* The whole card is a place to pick the widget up from; its controls keep
|
|
@@ -638,21 +675,33 @@
|
|
|
638
675
|
/* The medium class flows the widgets, so a widget's start is where the one
|
|
639
676
|
before it ends: there is no start edge to pull. */
|
|
640
677
|
@container dashboard-grid (width < 1024px) {
|
|
641
|
-
[data-ui-dashboard-grid]
|
|
678
|
+
[data-ui-dashboard-grid]:not([data-size-class])
|
|
642
679
|
[data-part-widget]
|
|
643
680
|
> [data-part-resize-handle]:is([data-edge='start'], [data-edge='bottom-start']) {
|
|
644
681
|
display: none;
|
|
645
682
|
}
|
|
646
683
|
}
|
|
647
684
|
|
|
685
|
+
[data-ui-dashboard-grid]:is([data-size-class='medium'], [data-size-class='compact'])
|
|
686
|
+
[data-part-widget]
|
|
687
|
+
> [data-part-resize-handle]:is([data-edge='start'], [data-edge='bottom-start']) {
|
|
688
|
+
display: none;
|
|
689
|
+
}
|
|
690
|
+
|
|
648
691
|
/* A phone reads a dashboard as one column as tall as its content: there is
|
|
649
692
|
no size to pull, only an order to change. */
|
|
650
693
|
@container dashboard-grid (width < 600px) {
|
|
651
|
-
[data-ui-dashboard-grid] [data-part-widget] > [data-part-resize-handle] {
|
|
694
|
+
[data-ui-dashboard-grid]:not([data-size-class]) [data-part-widget] > [data-part-resize-handle] {
|
|
652
695
|
display: none;
|
|
653
696
|
}
|
|
654
697
|
}
|
|
655
698
|
|
|
699
|
+
[data-ui-dashboard-grid][data-size-class='compact']
|
|
700
|
+
[data-part-widget]
|
|
701
|
+
> [data-part-resize-handle] {
|
|
702
|
+
display: none;
|
|
703
|
+
}
|
|
704
|
+
|
|
656
705
|
/* ── Editing: a widget in hand ───────────────────────────────────────── */
|
|
657
706
|
|
|
658
707
|
/**
|
package/src/dialog/dialog.css
CHANGED
|
@@ -954,6 +954,8 @@
|
|
|
954
954
|
|
|
955
955
|
[data-ui-dialog] > [data-part-viewport] > [data-part-content] > form > [data-part-body],
|
|
956
956
|
[data-ui-dialog] > [data-part-viewport] > [data-part-content] > [data-part-body] {
|
|
957
|
+
/* The row that stretches, with or without a header above it. */
|
|
958
|
+
grid-row: 2;
|
|
957
959
|
min-block-size: 0;
|
|
958
960
|
overflow-x: hidden;
|
|
959
961
|
overflow-y: auto;
|
|
@@ -1005,6 +1007,8 @@
|
|
|
1005
1007
|
*/
|
|
1006
1008
|
[data-ui-dialog] > [data-part-viewport] > [data-part-content] > form > [data-part-footer],
|
|
1007
1009
|
[data-ui-dialog] > [data-part-viewport] > [data-part-content] > [data-part-footer] {
|
|
1010
|
+
/* The last row, with or without a body above it: without one it took the row that stretches. */
|
|
1011
|
+
grid-row: 3;
|
|
1008
1012
|
display: flex;
|
|
1009
1013
|
flex-wrap: wrap;
|
|
1010
1014
|
align-items: center;
|
package/src/drawer/drawer.css
CHANGED
|
@@ -136,7 +136,8 @@
|
|
|
136
136
|
* decide. A property is resolved on the element instead, and the three
|
|
137
137
|
* states below read as what they are.
|
|
138
138
|
*/
|
|
139
|
-
--_slide: var(--slotted-duration
|
|
139
|
+
--_slide: var(--slotted-drawer-slide-duration, var(--slotted-duration-long))
|
|
140
|
+
var(--slotted-easing-enter);
|
|
140
141
|
--_move: var(--slotted-duration-medium) var(--slotted-easing-enter);
|
|
141
142
|
/**
|
|
142
143
|
* `allow-discrete` is the whole of it. Without it the rule that hides a
|
|
@@ -155,7 +156,8 @@
|
|
|
155
156
|
* it had finished leaving — which is a hundred and fifty milliseconds
|
|
156
157
|
* before `closed` fires.
|
|
157
158
|
*/
|
|
158
|
-
--_reveal: content-visibility
|
|
159
|
+
--_reveal: content-visibility
|
|
160
|
+
var(--slotted-drawer-slide-exit-duration, var(--slotted-duration-medium)) allow-discrete;
|
|
159
161
|
|
|
160
162
|
/**
|
|
161
163
|
* The repository has no global reset, so a family that gives a box an
|
|
@@ -177,7 +179,8 @@
|
|
|
177
179
|
|
|
178
180
|
/** Leaving is shorter than arriving: a reader who has decided is waiting. */
|
|
179
181
|
[data-ui-drawer]:not([data-open]) {
|
|
180
|
-
--_slide: var(--slotted-duration
|
|
182
|
+
--_slide: var(--slotted-drawer-slide-exit-duration, var(--slotted-duration-medium))
|
|
183
|
+
var(--slotted-easing-exit);
|
|
181
184
|
--_move: var(--slotted-duration-medium) var(--slotted-easing-exit);
|
|
182
185
|
}
|
|
183
186
|
|
|
@@ -575,8 +578,9 @@
|
|
|
575
578
|
/**
|
|
576
579
|
* A sheet on a wide layer is a card over the page, not a strip across it:
|
|
577
580
|
* forty rems, Material 3's 640 dp, centred, with the scrim on both sides. The
|
|
578
|
-
* edge then shows on three sides, so the panel draws it on three
|
|
579
|
-
*
|
|
581
|
+
* edge then shows on three sides, so the panel draws it on three. An overlay
|
|
582
|
+
* layer is the viewport, so at the sheet's measure or under it — a phone —
|
|
583
|
+
* the side edges would sit on the screen's own and are not drawn.
|
|
580
584
|
*/
|
|
581
585
|
[data-ui-drawer][data-mode='overlay'][data-side='top'] > [data-part-panel],
|
|
582
586
|
[data-ui-drawer][data-mode='overlay'][data-side='bottom'] > [data-part-panel] {
|
|
@@ -585,7 +589,12 @@
|
|
|
585
589
|
100%,
|
|
586
590
|
var(--slotted-drawer-sheet-inline-size, var(--slotted-drawer-extent-xl, 40rem))
|
|
587
591
|
);
|
|
588
|
-
border-inline-width:
|
|
592
|
+
border-inline-width: clamp(
|
|
593
|
+
0px,
|
|
594
|
+
(100vw - var(--slotted-drawer-sheet-inline-size, var(--slotted-drawer-extent-xl, 40rem))) *
|
|
595
|
+
1000,
|
|
596
|
+
var(--_rule-size)
|
|
597
|
+
);
|
|
589
598
|
}
|
|
590
599
|
|
|
591
600
|
/**
|
|
@@ -689,7 +698,7 @@
|
|
|
689
698
|
* step, because a container condition cannot hold a custom property — buy one
|
|
690
699
|
* hairline at the extreme edge of the viewport.
|
|
691
700
|
*/
|
|
692
|
-
[data-ui-drawer][data-size='full'] > [data-part-panel] {
|
|
701
|
+
[data-ui-drawer][data-mode][data-size='full'] > [data-part-panel] {
|
|
693
702
|
border-width: 0;
|
|
694
703
|
border-radius: 0;
|
|
695
704
|
}
|
|
@@ -1112,6 +1121,20 @@
|
|
|
1112
1121
|
color: var(--slotted-drawer-title-color, var(--slotted-text, CanvasText));
|
|
1113
1122
|
}
|
|
1114
1123
|
|
|
1124
|
+
/* Actions take a column between the words and the close button, on the title's row. */
|
|
1125
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-header]:has(> [data-part-actions]) {
|
|
1126
|
+
grid-template-columns: minmax(0, 1fr) auto auto;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
[data-ui-drawer] > [data-part-panel] > [data-part-header] > [data-part-actions] {
|
|
1130
|
+
grid-column: 2;
|
|
1131
|
+
grid-row: 1 / span 2;
|
|
1132
|
+
align-self: start;
|
|
1133
|
+
display: flex;
|
|
1134
|
+
align-items: center;
|
|
1135
|
+
gap: var(--slotted-space-2, 0.25rem);
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1115
1138
|
[data-ui-drawer] > [data-part-panel] > [data-part-header] > [data-part-description] {
|
|
1116
1139
|
grid-column: 1;
|
|
1117
1140
|
grid-row: 2;
|
|
@@ -1136,7 +1159,8 @@
|
|
|
1136
1159
|
[data-ui-drawer] > [data-part-panel] > [data-part-header] > [data-part-close] {
|
|
1137
1160
|
--slotted-icon-size: var(--_icon-size);
|
|
1138
1161
|
|
|
1139
|
-
|
|
1162
|
+
/* The last column, beside the actions when there are any. */
|
|
1163
|
+
grid-column: -2;
|
|
1140
1164
|
grid-row: 1 / span 2;
|
|
1141
1165
|
align-self: start;
|
|
1142
1166
|
display: inline-grid;
|
|
@@ -1428,6 +1452,14 @@
|
|
|
1428
1452
|
grid-template-rows: auto auto auto auto minmax(0, 1fr);
|
|
1429
1453
|
}
|
|
1430
1454
|
|
|
1455
|
+
/* `size="full"` is the screen: the footer rests at its bottom, in the row that takes what is left. */
|
|
1456
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel'][data-size='full']
|
|
1457
|
+
> [data-part-panel]
|
|
1458
|
+
> [data-part-footer] {
|
|
1459
|
+
grid-row: 5;
|
|
1460
|
+
align-self: end;
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1431
1463
|
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel'][data-sheet-scrolls]
|
|
1432
1464
|
> [data-part-panel] {
|
|
1433
1465
|
scroll-snap-align: start;
|
|
@@ -1504,6 +1536,13 @@
|
|
|
1504
1536
|
touch-action: pan-y;
|
|
1505
1537
|
}
|
|
1506
1538
|
|
|
1539
|
+
/* Every region inside the sheet passes its block-axis overscroll on to the sheet, a family's own `contain` included. */
|
|
1540
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag='panel']
|
|
1541
|
+
> [data-part-panel]
|
|
1542
|
+
* {
|
|
1543
|
+
overscroll-behavior-y: auto;
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1507
1546
|
/* A region the consumer keeps from the sheet: its own scroll never passes on to it. */
|
|
1508
1547
|
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag] [data-drawer-drag='none'] {
|
|
1509
1548
|
overscroll-behavior: contain;
|
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
"--slotted-drawer-sheet-floor",
|
|
33
33
|
"--slotted-drawer-sheet-height",
|
|
34
34
|
"--slotted-drawer-sheet-inline-size",
|
|
35
|
+
"--slotted-drawer-slide-duration",
|
|
36
|
+
"--slotted-drawer-slide-exit-duration",
|
|
35
37
|
"--slotted-drawer-surface",
|
|
36
38
|
"--slotted-drawer-title-color",
|
|
37
39
|
"--slotted-drawer-title-font-family",
|
package/src/link/link.css
CHANGED
|
@@ -80,6 +80,27 @@
|
|
|
80
80
|
* pointer. Fluent calls it `subtle`, Primer `muted`, Polaris `monochrome`,
|
|
81
81
|
* and all three describe the same two colours.
|
|
82
82
|
*/
|
|
83
|
+
/**
|
|
84
|
+
* The text size. Unset, a link takes the size an action slot states for the
|
|
85
|
+
* controls it holds (`--slotted-link-font-size`), or else its parent's; a
|
|
86
|
+
* `size` states its own.
|
|
87
|
+
*/
|
|
88
|
+
[data-ui-link] {
|
|
89
|
+
font-size: var(--slotted-link-font-size, inherit);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
[data-ui-link][data-size='xs'] {
|
|
93
|
+
font-size: var(--slotted-font-size-xs, 0.75rem);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[data-ui-link][data-size='sm'] {
|
|
97
|
+
font-size: var(--slotted-font-size-sm, 0.8125rem);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
[data-ui-link][data-size='md'] {
|
|
101
|
+
font-size: var(--slotted-font-size-md, 0.875rem);
|
|
102
|
+
}
|
|
103
|
+
|
|
83
104
|
[data-ui-link][data-variant='neutral'] {
|
|
84
105
|
--_rest: var(--slotted-link-color, currentColor);
|
|
85
106
|
--_hover: var(--slotted-link-color-hover, var(--slotted-tone-accent-text, LinkText));
|
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
"--slotted-easing-standard",
|
|
6
6
|
"--slotted-focus-ring-color",
|
|
7
7
|
"--slotted-focus-ring-width",
|
|
8
|
+
"--slotted-font-size-md",
|
|
9
|
+
"--slotted-font-size-sm",
|
|
10
|
+
"--slotted-font-size-xs",
|
|
8
11
|
"--slotted-link-color",
|
|
9
12
|
"--slotted-link-color-active",
|
|
10
13
|
"--slotted-link-color-current",
|
|
@@ -14,6 +17,7 @@
|
|
|
14
17
|
"--slotted-link-external-icon-gap",
|
|
15
18
|
"--slotted-link-external-icon-size",
|
|
16
19
|
"--slotted-link-focus-ring-offset",
|
|
20
|
+
"--slotted-link-font-size",
|
|
17
21
|
"--slotted-link-radius",
|
|
18
22
|
"--slotted-link-underline-color",
|
|
19
23
|
"--slotted-link-underline-offset",
|
package/src/message/message.css
CHANGED
|
@@ -617,6 +617,16 @@
|
|
|
617
617
|
unicode-bidi: plaintext;
|
|
618
618
|
}
|
|
619
619
|
|
|
620
|
+
/**
|
|
621
|
+
* A bubble is as wide as its words. Prose — markdown's typography — is a size
|
|
622
|
+
* container for its narrow-column rules, and a size container contributes no
|
|
623
|
+
* width, so the bubble shrank to its padding. Inside a bubble prose sizes to
|
|
624
|
+
* its text and its narrow-column rules do not apply.
|
|
625
|
+
*/
|
|
626
|
+
[data-ui-message][data-part-bubble] > [data-part-content] [data-ui-prose] {
|
|
627
|
+
container-type: normal;
|
|
628
|
+
}
|
|
629
|
+
|
|
620
630
|
[data-ui-message][data-part-bubble][data-variant='solid'] > [data-part-content] {
|
|
621
631
|
--_ground: var(--_solid);
|
|
622
632
|
--_ink: var(--_on-solid);
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
*/
|
|
238
238
|
[data-ui-prompt-composer]
|
|
239
239
|
> :is([data-part-header], [data-part-footer])
|
|
240
|
-
> :is([data-part-action], [data-part-attach]) {
|
|
240
|
+
> :is([data-part-action], [data-part-attach], [data-part-dictate]) {
|
|
241
241
|
align-items: center;
|
|
242
242
|
appearance: none;
|
|
243
243
|
background-color: transparent;
|
|
@@ -313,7 +313,7 @@
|
|
|
313
313
|
finger, and never across the edge two buttons share. */
|
|
314
314
|
[data-ui-prompt-composer]
|
|
315
315
|
> :is([data-part-header], [data-part-footer])
|
|
316
|
-
> :is([data-part-action], [data-part-attach], [data-part-submit])::after {
|
|
316
|
+
> :is([data-part-action], [data-part-attach], [data-part-dictate], [data-part-submit])::after {
|
|
317
317
|
content: '';
|
|
318
318
|
inset: min(0px, calc((100% - var(--slotted-target-min, 24px)) / 2));
|
|
319
319
|
position: absolute;
|
|
@@ -322,27 +322,41 @@
|
|
|
322
322
|
@media (pointer: coarse) {
|
|
323
323
|
[data-ui-prompt-composer]
|
|
324
324
|
> :is([data-part-header], [data-part-footer])
|
|
325
|
-
> :is(
|
|
325
|
+
> :is(
|
|
326
|
+
[data-part-action],
|
|
327
|
+
[data-part-attach],
|
|
328
|
+
[data-part-dictate],
|
|
329
|
+
[data-part-submit]
|
|
330
|
+
)::after {
|
|
326
331
|
inset: min(0px, calc((100% - var(--slotted-target-comfortable, 44px)) / 2));
|
|
327
332
|
}
|
|
328
333
|
|
|
329
334
|
[data-ui-prompt-composer]
|
|
330
335
|
> :is([data-part-header], [data-part-footer])
|
|
331
|
-
> :is([data-part-action], [data-part-attach]):has(+ *)::after {
|
|
336
|
+
> :is([data-part-action], [data-part-attach], [data-part-dictate]):has(+ *)::after {
|
|
332
337
|
inset-inline-end: 0;
|
|
333
338
|
}
|
|
334
339
|
|
|
335
340
|
[data-ui-prompt-composer]
|
|
336
341
|
> :is([data-part-header], [data-part-footer])
|
|
337
342
|
> *
|
|
338
|
-
+ :is(
|
|
343
|
+
+ :is(
|
|
344
|
+
[data-part-action],
|
|
345
|
+
[data-part-attach],
|
|
346
|
+
[data-part-dictate],
|
|
347
|
+
[data-part-submit]
|
|
348
|
+
)::after {
|
|
339
349
|
inset-inline-start: 0;
|
|
340
350
|
}
|
|
341
351
|
}
|
|
342
352
|
|
|
343
353
|
[data-ui-prompt-composer]
|
|
344
354
|
> :is([data-part-header], [data-part-footer])
|
|
345
|
-
> :is([data-part-action], [data-part-attach]):hover:not(
|
|
355
|
+
> :is([data-part-action], [data-part-attach], [data-part-dictate]):hover:not(
|
|
356
|
+
:disabled,
|
|
357
|
+
[aria-expanded='true'],
|
|
358
|
+
[aria-pressed='true']
|
|
359
|
+
) {
|
|
346
360
|
background-color: var(
|
|
347
361
|
--slotted-prompt-composer-action-hover-background,
|
|
348
362
|
var(--slotted-tone-secondary-subtle-hover)
|
|
@@ -351,9 +365,11 @@
|
|
|
351
365
|
|
|
352
366
|
[data-ui-prompt-composer]
|
|
353
367
|
> :is([data-part-header], [data-part-footer])
|
|
354
|
-
> :is([data-part-action], [data-part-attach]
|
|
355
|
-
:
|
|
356
|
-
|
|
368
|
+
> :is([data-part-action], [data-part-attach], [data-part-dictate]):is(
|
|
369
|
+
:active,
|
|
370
|
+
[aria-expanded='true'],
|
|
371
|
+
[aria-pressed='true']
|
|
372
|
+
):not(:disabled) {
|
|
357
373
|
background-color: var(
|
|
358
374
|
--slotted-prompt-composer-action-active-background,
|
|
359
375
|
var(--slotted-tone-secondary-subtle-active)
|
|
@@ -362,7 +378,7 @@
|
|
|
362
378
|
|
|
363
379
|
[data-ui-prompt-composer]
|
|
364
380
|
> :is([data-part-header], [data-part-footer])
|
|
365
|
-
> :is([data-part-action], [data-part-attach]):disabled {
|
|
381
|
+
> :is([data-part-action], [data-part-attach], [data-part-dictate]):disabled {
|
|
366
382
|
color: var(--slotted-disabled-foreground);
|
|
367
383
|
cursor: not-allowed;
|
|
368
384
|
}
|
|
@@ -535,7 +551,7 @@
|
|
|
535
551
|
ring stands against the frame's ground rather than against the accent. */
|
|
536
552
|
[data-ui-prompt-composer]
|
|
537
553
|
> :is([data-part-header], [data-part-footer])
|
|
538
|
-
> :is([data-part-action], [data-part-attach]):focus-visible {
|
|
554
|
+
> :is([data-part-action], [data-part-attach], [data-part-dictate]):focus-visible {
|
|
539
555
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
540
556
|
outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
|
|
541
557
|
}
|
|
@@ -576,8 +592,8 @@
|
|
|
576
592
|
* outline and its raised shadow; the controls inside keep their own focus
|
|
577
593
|
* rings. Two marks the binding draws, both `aria-hidden`: the ring, a band
|
|
578
594
|
* the width of `--slotted-prompt-composer-ring-width` cut out of a turning
|
|
579
|
-
* conic gradient, and the glow, the same gradient blurred
|
|
580
|
-
*
|
|
595
|
+
* conic gradient, and the glow, the same gradient blurred under the frame's
|
|
596
|
+
* surface, so only its halo outside the frame shows. Each turns a square larger than its box by a
|
|
581
597
|
* `transform`, which the compositor runs at a constant speed.
|
|
582
598
|
*/
|
|
583
599
|
[data-ui-prompt-composer][data-part-root][data-emphasis='ring'] {
|
|
@@ -627,19 +643,31 @@
|
|
|
627
643
|
z-index: 1;
|
|
628
644
|
}
|
|
629
645
|
|
|
646
|
+
/**
|
|
647
|
+
* The glow is the frame's own box, blurred: the halo is the blur's ink, which
|
|
648
|
+
* fades to nothing past the edge, and ink adds no overflow to a scrolling
|
|
649
|
+
* ancestor. A box the reach larger, cut by a mask, gave both a hard edge and
|
|
650
|
+
* that overflow. The frame's surface is restated on `::after`, which paints
|
|
651
|
+
* above the glow, so the halo shows outside the frame only.
|
|
652
|
+
*/
|
|
630
653
|
[data-ui-prompt-composer] > [data-part-glow] {
|
|
631
|
-
border-radius: calc(var(--_radius) + var(--_ring-reach));
|
|
632
654
|
filter: blur(calc(var(--_ring-reach) / 2));
|
|
633
|
-
inset: calc(-1 * var(--
|
|
634
|
-
mask:
|
|
635
|
-
linear-gradient(#000 0 0) content-box exclude,
|
|
636
|
-
linear-gradient(#000 0 0);
|
|
655
|
+
inset: calc(-1 * var(--slotted-control-border-width, 1px));
|
|
637
656
|
opacity: var(--_glow);
|
|
638
|
-
padding: var(--_ring-reach);
|
|
639
657
|
transition: opacity var(--slotted-duration-medium) var(--slotted-easing-standard);
|
|
640
658
|
z-index: -1;
|
|
641
659
|
}
|
|
642
660
|
|
|
661
|
+
[data-ui-prompt-composer][data-part-root][data-emphasis='ring']::after {
|
|
662
|
+
background-color: inherit;
|
|
663
|
+
border-radius: inherit;
|
|
664
|
+
content: '';
|
|
665
|
+
inset: 0;
|
|
666
|
+
pointer-events: none;
|
|
667
|
+
position: absolute;
|
|
668
|
+
z-index: -1;
|
|
669
|
+
}
|
|
670
|
+
|
|
643
671
|
[data-ui-prompt-composer] > :is([data-part-ring], [data-part-glow])::before {
|
|
644
672
|
animation: slotted-prompt-composer-turn
|
|
645
673
|
var(--slotted-prompt-composer-ring-duration, var(--slotted-duration-loop-slow)) linear
|
package/src/section/section.css
CHANGED
|
@@ -276,6 +276,9 @@
|
|
|
276
276
|
|
|
277
277
|
/* An implicit column: a header with no actions has one column and no gap. */
|
|
278
278
|
[data-ui-section] > [data-part-header] > [data-part-actions] {
|
|
279
|
+
/* An action slot states one size for the links it holds. */
|
|
280
|
+
--slotted-link-font-size: var(--slotted-font-size-sm, 0.8125rem);
|
|
281
|
+
|
|
279
282
|
align-items: center;
|
|
280
283
|
display: flex;
|
|
281
284
|
gap: var(--slotted-control-gap-md, 8px);
|
|
@@ -406,6 +406,9 @@
|
|
|
406
406
|
and a corner is where a control is looked for. */
|
|
407
407
|
@scope ([data-ui-stat-card]) to (:scope [data-ui] > *) {
|
|
408
408
|
:scope [data-part-action] {
|
|
409
|
+
/* An action slot states one size for the links it holds. */
|
|
410
|
+
--slotted-link-font-size: var(--slotted-font-size-sm, 0.8125rem);
|
|
411
|
+
|
|
409
412
|
flex: none;
|
|
410
413
|
/* The label's line, so a link here is as tall in the fallback face as in
|
|
411
414
|
the web face and the header does not grow when the font arrives. */
|
package/src/table/table.css
CHANGED
|
@@ -259,6 +259,9 @@
|
|
|
259
259
|
column's digits ended at one edge and their name at the other. */
|
|
260
260
|
[data-ui-table] [data-part-column-header],
|
|
261
261
|
[data-ui-table] [data-part-head] [data-part-selection] {
|
|
262
|
+
/* What a pinned header cell paints, in place of its row's ground. */
|
|
263
|
+
--_pinned-ground: var(--_head-surface);
|
|
264
|
+
|
|
262
265
|
background-color: var(--_head-surface);
|
|
263
266
|
border-block-end: var(--_rule-width) solid var(--_rule-strong);
|
|
264
267
|
color: var(--_text);
|
|
@@ -279,6 +282,8 @@
|
|
|
279
282
|
}
|
|
280
283
|
|
|
281
284
|
[data-ui-table][data-variant='plain'] [data-part-column-header] {
|
|
285
|
+
--_pinned-ground: transparent;
|
|
286
|
+
|
|
282
287
|
background-color: transparent;
|
|
283
288
|
}
|
|
284
289
|
|
|
@@ -286,7 +291,10 @@
|
|
|
286
291
|
* ── Rows and cells ─────────────────────────────────────────────────────
|
|
287
292
|
*/
|
|
288
293
|
[data-ui-table] [data-part-row] {
|
|
289
|
-
|
|
294
|
+
/* Published for a pinned cell, which paints it over an opaque ground. */
|
|
295
|
+
--_row-ground: var(--_surface);
|
|
296
|
+
|
|
297
|
+
background-color: var(--_row-ground);
|
|
290
298
|
}
|
|
291
299
|
|
|
292
300
|
/**
|
|
@@ -470,7 +478,7 @@
|
|
|
470
478
|
the same body, so the stripe follows the record it belongs to rather than
|
|
471
479
|
alternating around it — see the detail rule below. */
|
|
472
480
|
[data-ui-table][data-striped] [data-part-body] > [data-part-row]:nth-child(even) {
|
|
473
|
-
|
|
481
|
+
--_row-ground: var(--_stripe);
|
|
474
482
|
}
|
|
475
483
|
|
|
476
484
|
/**
|
|
@@ -482,7 +490,7 @@
|
|
|
482
490
|
* disabled does not answer the pointer at all.
|
|
483
491
|
*/
|
|
484
492
|
[data-ui-table] [data-part-body] > [data-part-row]:not([data-disabled]):hover {
|
|
485
|
-
|
|
493
|
+
--_row-ground: var(--_hover);
|
|
486
494
|
}
|
|
487
495
|
|
|
488
496
|
/**
|
|
@@ -498,12 +506,12 @@
|
|
|
498
506
|
* requirement anyway.
|
|
499
507
|
*/
|
|
500
508
|
[data-ui-table] [data-part-body] > [data-part-row][data-selected] {
|
|
501
|
-
|
|
509
|
+
--_row-ground: var(--_selected);
|
|
502
510
|
color: var(--_selected-text);
|
|
503
511
|
}
|
|
504
512
|
|
|
505
513
|
[data-ui-table] [data-part-body] > [data-part-row][data-selected]:not([data-disabled]):hover {
|
|
506
|
-
|
|
514
|
+
--_row-ground: var(--_selected-hover);
|
|
507
515
|
}
|
|
508
516
|
|
|
509
517
|
[data-ui-table] [data-part-row][data-disabled] {
|
|
@@ -518,7 +526,7 @@
|
|
|
518
526
|
* scrolled cells through it. Selection is stronger and paints over it.
|
|
519
527
|
*/
|
|
520
528
|
[data-ui-table] [data-part-body] > [data-part-row][data-current]:not([data-selected]) {
|
|
521
|
-
|
|
529
|
+
--_row-ground: var(
|
|
522
530
|
--slotted-table-row-surface-current,
|
|
523
531
|
var(--slotted-tone-secondary-subtle-active, ButtonFace)
|
|
524
532
|
);
|
|
@@ -729,11 +737,20 @@
|
|
|
729
737
|
z-index: calc(var(--slotted-z-index-sticky, 100) + 2);
|
|
730
738
|
}
|
|
731
739
|
|
|
740
|
+
/* The ground the row is painted with, whatever state it is in, so a
|
|
741
|
+
hovered, striped or selected row keeps one colour across the seam — over
|
|
742
|
+
the page's own surface, so a row on a transparent table surface still
|
|
743
|
+
covers what scrolls under it. `inherit` copied a transparent row as is. */
|
|
744
|
+
[data-ui-table] [data-sticky] {
|
|
745
|
+
background:
|
|
746
|
+
linear-gradient(
|
|
747
|
+
var(--_pinned-ground, var(--_row-ground)),
|
|
748
|
+
var(--_pinned-ground, var(--_row-ground))
|
|
749
|
+
),
|
|
750
|
+
var(--slotted-surface, Canvas);
|
|
751
|
+
}
|
|
752
|
+
|
|
732
753
|
[data-ui-table] [data-sticky='start'] {
|
|
733
|
-
/* The ground the row is painted with, whatever state it is in: `inherit`
|
|
734
|
-
takes the row's own computed value, so a hovered, striped or selected row
|
|
735
|
-
keeps one colour across the seam. */
|
|
736
|
-
background-color: inherit;
|
|
737
754
|
/**
|
|
738
755
|
* Where the column stops, and it is stated rather than measured. Two
|
|
739
756
|
* columns pinned to the same edge both resolve against the scroller, so
|
|
@@ -748,7 +765,6 @@
|
|
|
748
765
|
}
|
|
749
766
|
|
|
750
767
|
[data-ui-table] [data-sticky='end'] {
|
|
751
|
-
background-color: inherit;
|
|
752
768
|
inset-inline-end: var(--slotted-table-sticky-inset, 0);
|
|
753
769
|
position: sticky;
|
|
754
770
|
z-index: var(--slotted-z-index-sticky, 100);
|
|
@@ -1550,6 +1566,8 @@
|
|
|
1550
1566
|
* table holding the consumer's own controls.
|
|
1551
1567
|
*/
|
|
1552
1568
|
[data-ui-table] [data-part-summary] > [data-part-row] > * {
|
|
1569
|
+
--_pinned-ground: var(--_head-surface);
|
|
1570
|
+
|
|
1553
1571
|
background-color: var(--_head-surface);
|
|
1554
1572
|
border-block-start: var(--_rule-width) solid var(--_rule-strong);
|
|
1555
1573
|
font-weight: var(--slotted-font-weight-medium, 500);
|
|
@@ -1558,6 +1576,8 @@
|
|
|
1558
1576
|
}
|
|
1559
1577
|
|
|
1560
1578
|
[data-ui-table][data-variant='plain'] [data-part-summary] > [data-part-row] > * {
|
|
1579
|
+
--_pinned-ground: transparent;
|
|
1580
|
+
|
|
1561
1581
|
background-color: transparent;
|
|
1562
1582
|
}
|
|
1563
1583
|
|