@slotted/styles 0.1.0-beta.28 → 0.1.0-beta.29

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.
Files changed (34) hide show
  1. package/package.json +3 -1
  2. package/src/attachment/attachment.css +13 -1
  3. package/src/command-palette/command-palette.css +36 -0
  4. package/src/command-palette/command-palette.tokens.json +1 -0
  5. package/src/date-picker/date-picker.css +41 -0
  6. package/src/date-picker/date-picker.tokens.json +4 -0
  7. package/src/date-range-picker/date-range-picker.css +33 -0
  8. package/src/date-range-picker/date-range-picker.tokens.json +4 -0
  9. package/src/datetime-picker/datetime-picker.css +42 -0
  10. package/src/datetime-picker/datetime-picker.tokens.json +4 -0
  11. package/src/datetime-range-picker/datetime-range-picker.css +33 -0
  12. package/src/datetime-range-picker/datetime-range-picker.tokens.json +4 -0
  13. package/src/description-list/description-list.css +23 -8
  14. package/src/description-list/description-list.tokens.json +1 -0
  15. package/src/dialog/dialog.css +59 -45
  16. package/src/drawer/drawer.css +27 -2
  17. package/src/drawer/drawer.tokens.json +2 -0
  18. package/src/entity-picker/entity-picker.css +36 -0
  19. package/src/entity-picker/entity-picker.tokens.json +1 -0
  20. package/src/field-group/field-group.css +18 -5
  21. package/src/field-group/field-group.tokens.json +3 -0
  22. package/src/media-viewer/media-viewer.css +790 -0
  23. package/src/media-viewer/media-viewer.tokens.json +53 -0
  24. package/src/message/message.css +1255 -1248
  25. package/src/message-scroller/message-scroller.css +322 -318
  26. package/src/runtime-properties.mjs +11 -0
  27. package/src/stat-card/stat-card.css +33 -0
  28. package/src/stat-card/stat-card.tokens.json +4 -0
  29. package/src/tag/tag.css +5 -4
  30. package/src/tag/tag.tokens.json +1 -0
  31. package/src/time-picker/time-picker.css +41 -0
  32. package/src/time-picker/time-picker.tokens.json +4 -0
  33. package/src/time-range-picker/time-range-picker.css +33 -0
  34. package/src/time-range-picker/time-range-picker.tokens.json +4 -0
@@ -8,363 +8,367 @@
8
8
  * `@slotted/core/message-scroller`; this sheet reads what it writes —
9
9
  * `data-scrollable`, `data-following`, `data-pending` and
10
10
  * `--slotted-message-scroller-room` — and draws nothing the engine decides.
11
+ *
12
+ * Every rule is scoped to the family and stops at the parts of any other
13
+ * family nested in a row: an alert in a message keeps its own `content`.
11
14
  */
12
- [data-ui-message-scroller][data-part-root] {
13
- --_inset: var(--slotted-message-scroller-padding, var(--slotted-space-6, 1rem));
14
- /**
15
- * The gap between two runs of a conversation. Twenty at comfortable, the
16
- * ReUI thread gap (`c-message-scroller-4`), fifteen and ten at the two
17
- * tighter densities: the control gap the theme restates, two and a half
18
- * times. The rows of one run are two pixels apart (`message` › group),
19
- * and the difference between the two gaps is the whole grouping signal.
20
- */
21
- --_gap: var(--slotted-message-scroller-gap, calc(var(--slotted-control-gap-md, 8px) * 2.5));
22
- --_fade: var(--slotted-message-scroller-fade, var(--slotted-space-6, 1rem));
23
-
24
- display: flex;
25
- flex-direction: column;
26
- position: relative;
27
- box-sizing: border-box;
28
- block-size: 100%;
29
- min-block-size: 0;
30
- min-inline-size: 0;
31
- overflow: hidden;
32
- color: var(--slotted-text);
33
- font-family: var(--slotted-font-family-sans, sans-serif);
34
- }
15
+ @scope ([data-ui-message-scroller]) to (:scope [data-ui]:not([data-ui-message-scroller]) > *) {
16
+ :scope[data-part-root] {
17
+ --_inset: var(--slotted-message-scroller-padding, var(--slotted-space-6, 1rem));
18
+ /**
19
+ * The gap between two runs of a conversation. Twenty at comfortable, the
20
+ * ReUI thread gap (`c-message-scroller-4`), fifteen and ten at the two
21
+ * tighter densities: the control gap the theme restates, two and a half
22
+ * times. The rows of one run are two pixels apart (`message` › group),
23
+ * and the difference between the two gaps is the whole grouping signal.
24
+ */
25
+ --_gap: var(--slotted-message-scroller-gap, calc(var(--slotted-control-gap-md, 8px) * 2.5));
26
+ --_fade: var(--slotted-message-scroller-fade, var(--slotted-space-6, 1rem));
27
+
28
+ display: flex;
29
+ flex-direction: column;
30
+ position: relative;
31
+ box-sizing: border-box;
32
+ block-size: 100%;
33
+ min-block-size: 0;
34
+ min-inline-size: 0;
35
+ overflow: hidden;
36
+ color: var(--slotted-text);
37
+ font-family: var(--slotted-font-family-sans, sans-serif);
38
+ }
39
+
40
+ :scope [data-part-viewport] {
41
+ /* The rows' offset parent, so the engine reads their layout offset rather than a rectangle an entrance has moved. */
42
+ position: relative;
43
+ flex: 1 1 auto;
44
+ box-sizing: border-box;
45
+ min-block-size: 0;
46
+ overflow-x: hidden;
47
+ overflow-y: auto;
48
+ /**
49
+ * The engine keeps the reader's row in place itself; a native correction
50
+ * added to its own would move the reader twice, and Safari has none to
51
+ * rely on (`contract.json` › `engine.overflowAnchorReason`).
52
+ */
53
+ overflow-anchor: none;
54
+ overscroll-behavior: contain;
55
+ scrollbar-color: var(--slotted-border-strong) transparent;
56
+ scrollbar-gutter: stable;
57
+ scrollbar-width: thin;
58
+ }
35
59
 
36
- [data-ui-message-scroller] [data-part-viewport] {
37
- /* The rows' offset parent, so the engine reads their layout offset rather than a rectangle an entrance has moved. */
38
- position: relative;
39
- flex: 1 1 auto;
40
- box-sizing: border-box;
41
- min-block-size: 0;
42
- overflow-x: hidden;
43
- overflow-y: auto;
44
60
  /**
45
- * The engine keeps the reader's row in place itself; a native correction
46
- * added to its own would move the reader twice, and Safari has none to
47
- * rely on (`contract.json` › `engine.overflowAnchorReason`).
61
+ * An edge the reader can still scroll toward fades the rows into it, so a
62
+ * row cut by the frame reads as continuing rather than as ending there.
48
63
  */
49
- overflow-anchor: none;
50
- overscroll-behavior: contain;
51
- scrollbar-color: var(--slotted-border-strong) transparent;
52
- scrollbar-gutter: stable;
53
- scrollbar-width: thin;
54
- }
55
-
56
- /**
57
- * An edge the reader can still scroll toward fades the rows into it, so a
58
- * row cut by the frame reads as continuing rather than as ending there.
59
- */
60
- [data-ui-message-scroller] [data-part-viewport][data-scrollable~='start'] {
61
- mask-image: linear-gradient(to bottom, transparent, #000 var(--_fade));
62
- }
63
-
64
- [data-ui-message-scroller] [data-part-viewport][data-scrollable~='end'] {
65
- mask-image: linear-gradient(to top, transparent, #000 var(--_fade));
66
- }
64
+ :scope [data-part-viewport][data-scrollable~='start'] {
65
+ mask-image: linear-gradient(to bottom, transparent, #000 var(--_fade));
66
+ }
67
67
 
68
- [data-ui-message-scroller]
69
- [data-part-viewport][data-scrollable~='start'][data-scrollable~='end'] {
70
- mask-image: linear-gradient(
71
- to bottom,
72
- transparent,
73
- #000 var(--_fade),
74
- #000 calc(100% - var(--_fade)),
75
- transparent
76
- );
77
- }
68
+ :scope [data-part-viewport][data-scrollable~='end'] {
69
+ mask-image: linear-gradient(to top, transparent, #000 var(--_fade));
70
+ }
78
71
 
79
- /**
80
- * A conversation opened at its end is at its top until script runs, and
81
- * shows its oldest rows first. The frame stays and the rows wait, laid out,
82
- * so the engine measures them before the reader sees them.
83
- */
84
- [data-ui-message-scroller] [data-part-viewport][data-pending] {
85
- visibility: hidden;
86
- }
72
+ :scope [data-part-viewport][data-scrollable~='start'][data-scrollable~='end'] {
73
+ mask-image: linear-gradient(
74
+ to bottom,
75
+ transparent,
76
+ #000 var(--_fade),
77
+ #000 calc(100% - var(--_fade)),
78
+ transparent
79
+ );
80
+ }
87
81
 
88
- [data-ui-message-scroller] [data-part-viewport]:focus-visible {
89
- outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color);
90
- outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
91
- }
82
+ /**
83
+ * A conversation opened at its end is at its top until script runs, and
84
+ * shows its oldest rows first. The frame stays and the rows wait, laid out,
85
+ * so the engine measures them before the reader sees them.
86
+ */
87
+ :scope [data-part-viewport][data-pending] {
88
+ visibility: hidden;
89
+ }
92
90
 
93
- /**
94
- * The rows stand at the foot of the frame while they are fewer than it
95
- * holds, where a conversation is read from; the room an anchored turn needs
96
- * is added under the last one.
97
- */
98
- [data-ui-message-scroller] [data-part-content] {
99
- display: flex;
100
- flex-direction: column;
101
- justify-content: flex-end;
102
- gap: var(--_gap);
103
- box-sizing: border-box;
104
- min-block-size: 100%;
105
- padding: var(--_inset);
106
- padding-block-end: calc(var(--_inset) + var(--slotted-message-scroller-room, 0px));
107
- }
91
+ :scope [data-part-viewport]:focus-visible {
92
+ outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color);
93
+ outline-offset: calc(var(--slotted-focus-ring-offset, 2px) * -1);
94
+ }
108
95
 
109
- /**
110
- * ── A row ──────────────────────────────────────────────────────────────
111
- *
112
- * A row far from view is not painted (`content-visibility: auto`) and stays
113
- * in the DOM for selection, finding in the page and assistive technology.
114
- * A row that arrives rises by a step and fades in; a row the engine lands a
115
- * jump on glows in the accent's pointer tint and loses it slowly, so the
116
- * reader sees where the jump ended.
117
- */
118
- [data-ui-message-scroller] [data-part-item] {
119
- min-inline-size: 0;
120
- border-radius: var(--slotted-radius-md, 6px);
121
- content-visibility: auto;
122
- contain-intrinsic-size: auto 6rem;
123
- transition:
124
- opacity var(--slotted-duration-medium) var(--slotted-easing-enter, ease-out),
125
- translate var(--slotted-duration-medium) var(--slotted-easing-enter, ease-out),
126
- background-color var(--slotted-duration-long) var(--slotted-easing-standard, ease),
127
- box-shadow var(--slotted-duration-long) var(--slotted-easing-standard, ease);
128
-
129
- @starting-style {
130
- opacity: 0;
131
- translate: 0 var(--slotted-space-4, 0.5rem);
96
+ /**
97
+ * The rows stand at the foot of the frame while they are fewer than it
98
+ * holds, where a conversation is read from; the room an anchored turn needs
99
+ * is added under the last one.
100
+ */
101
+ :scope [data-part-content] {
102
+ display: flex;
103
+ flex-direction: column;
104
+ justify-content: flex-end;
105
+ gap: var(--_gap);
106
+ box-sizing: border-box;
107
+ min-block-size: 100%;
108
+ padding: var(--_inset);
109
+ padding-block-end: calc(var(--_inset) + var(--slotted-message-scroller-room, 0px));
132
110
  }
133
- }
134
111
 
135
- [data-ui-message-scroller] [data-part-item][data-current] {
136
- background-color: var(--slotted-tone-accent-subtle-hover);
137
- box-shadow: 0 0 0 var(--slotted-space-3, 0.375rem) var(--slotted-tone-accent-subtle-hover);
138
- }
112
+ /**
113
+ * ── A row ──────────────────────────────────────────────────────────────
114
+ *
115
+ * A row far from view is not painted (`content-visibility: auto`) and stays
116
+ * in the DOM for selection, finding in the page and assistive technology.
117
+ * A row that arrives rises by a step and fades in; a row the engine lands a
118
+ * jump on glows in the accent's pointer tint and loses it slowly, so the
119
+ * reader sees where the jump ended.
120
+ */
121
+ :scope [data-part-item] {
122
+ min-inline-size: 0;
123
+ border-radius: var(--slotted-radius-md, 6px);
124
+ content-visibility: auto;
125
+ contain-intrinsic-size: auto 6rem;
126
+ transition:
127
+ opacity var(--slotted-duration-medium) var(--slotted-easing-enter, ease-out),
128
+ translate var(--slotted-duration-medium) var(--slotted-easing-enter, ease-out),
129
+ background-color var(--slotted-duration-long) var(--slotted-easing-standard, ease),
130
+ box-shadow var(--slotted-duration-long) var(--slotted-easing-standard, ease);
131
+
132
+ @starting-style {
133
+ opacity: 0;
134
+ translate: 0 var(--slotted-space-4, 0.5rem);
135
+ }
136
+ }
139
137
 
140
- /* ── Separator and unread line ─────────────────────────────────────────
141
- *
142
- * A day, or a line the system writes, between two rules. `sticky` keeps it
143
- * at the top of the frame while the rows after it are in view, so the day
144
- * does not leave with its first message; its label carries a ground of its
145
- * own for the rows passing under it.
146
- */
147
- [data-ui-message-scroller] :is([data-part-separator], [data-part-unread]) {
148
- display: flex;
149
- align-items: center;
150
- gap: var(--slotted-space-4, 0.5rem);
151
- color: var(--slotted-text-muted);
152
- font-size: var(--slotted-font-size-xs, 0.75rem);
153
- font-weight: var(--slotted-font-weight-medium, 500);
154
- line-height: round(
155
- up,
156
- calc(var(--slotted-font-size-xs, 0.75rem) * var(--slotted-line-height-xs, 1.4)),
157
- 1px
158
- );
159
- }
138
+ :scope [data-part-item][data-current] {
139
+ background-color: var(--slotted-tone-accent-subtle-hover);
140
+ box-shadow: 0 0 0 var(--slotted-space-3, 0.375rem) var(--slotted-tone-accent-subtle-hover);
141
+ }
160
142
 
161
- [data-ui-message-scroller] :is([data-part-separator], [data-part-unread])::before,
162
- [data-ui-message-scroller] :is([data-part-separator], [data-part-unread])::after {
163
- content: '';
164
- flex: 1 1 0;
165
- min-inline-size: var(--slotted-space-6, 1rem);
166
- border-block-start: var(--slotted-border-width-thin, 1px) solid var(--slotted-border-subtle);
167
- }
143
+ /* ── Separator and unread line ─────────────────────────────────────────
144
+ *
145
+ * A day, or a line the system writes, between two rules. `sticky` keeps it
146
+ * at the top of the frame while the rows after it are in view, so the day
147
+ * does not leave with its first message; its label carries a ground of its
148
+ * own for the rows passing under it.
149
+ */
150
+ :scope :is([data-part-separator], [data-part-unread]) {
151
+ display: flex;
152
+ align-items: center;
153
+ gap: var(--slotted-space-4, 0.5rem);
154
+ color: var(--slotted-text-muted);
155
+ font-size: var(--slotted-font-size-xs, 0.75rem);
156
+ font-weight: var(--slotted-font-weight-medium, 500);
157
+ line-height: round(
158
+ up,
159
+ calc(var(--slotted-font-size-xs, 0.75rem) * var(--slotted-line-height-xs, 1.4)),
160
+ 1px
161
+ );
162
+ }
168
163
 
169
- /**
170
- * A sticky box sticks inside its containing block, so it is the row that
171
- * holds the separator that sticks, not the separator inside it. Each later
172
- * day stacks over the one before it as it arrives at the top.
173
- */
174
- [data-ui-message-scroller] [data-part-item]:has(> [data-part-separator][data-sticky]),
175
- [data-ui-message-scroller] [data-part-separator][data-sticky]:not([data-part-item] > *) {
176
- position: sticky;
177
- inset-block-start: var(--_fade);
178
- z-index: 1;
179
- content-visibility: visible;
180
- }
164
+ :scope :is([data-part-separator], [data-part-unread])::before,
165
+ :scope :is([data-part-separator], [data-part-unread])::after {
166
+ content: '';
167
+ flex: 1 1 0;
168
+ min-inline-size: var(--slotted-space-6, 1rem);
169
+ border-block-start: var(--slotted-border-width-thin, 1px) solid var(--slotted-border-subtle);
170
+ }
181
171
 
182
- /**
183
- * A day that travels over the rows is its label alone: rules stretched
184
- * across the frame would strike through the message under them, and the
185
- * label stands below the faded edge so it is read whole. WhatsApp and
186
- * Telegram float the same pill.
187
- */
188
- [data-ui-message-scroller] [data-part-separator][data-sticky]::before,
189
- [data-ui-message-scroller] [data-part-separator][data-sticky]::after {
190
- content: none;
191
- }
172
+ /**
173
+ * A sticky box sticks inside its containing block, so it is the row that
174
+ * holds the separator that sticks, not the separator inside it. Each later
175
+ * day stacks over the one before it as it arrives at the top.
176
+ */
177
+ :scope [data-part-item]:has(> [data-part-separator][data-sticky]),
178
+ :scope [data-part-separator][data-sticky]:not([data-part-item] > *) {
179
+ position: sticky;
180
+ inset-block-start: var(--_fade);
181
+ z-index: 1;
182
+ content-visibility: visible;
183
+ }
192
184
 
193
- [data-ui-message-scroller] [data-part-separator][data-sticky] {
194
- justify-content: center;
195
- }
185
+ /**
186
+ * A day that travels over the rows is its label alone: rules stretched
187
+ * across the frame would strike through the message under them, and the
188
+ * label stands below the faded edge so it is read whole. WhatsApp and
189
+ * Telegram float the same pill.
190
+ */
191
+ :scope [data-part-separator][data-sticky]::before,
192
+ :scope [data-part-separator][data-sticky]::after {
193
+ content: none;
194
+ }
196
195
 
197
- [data-ui-message-scroller] [data-part-separator][data-sticky] > * {
198
- box-shadow: var(--slotted-shadow-xs);
199
- }
196
+ :scope [data-part-separator][data-sticky] {
197
+ justify-content: center;
198
+ }
200
199
 
201
- [data-ui-message-scroller] [data-part-separator] > * {
202
- padding-block: var(--slotted-space-1, 0.125rem);
203
- padding-inline: var(--slotted-space-4, 0.5rem);
204
- border: var(--slotted-border-width-thin, 1px) solid var(--slotted-border-subtle);
205
- border-radius: var(--slotted-radius-full, 9999px);
206
- background-color: var(--slotted-surface);
207
- }
200
+ :scope [data-part-separator][data-sticky] > * {
201
+ box-shadow: var(--slotted-shadow-xs);
202
+ }
208
203
 
209
- [data-ui-message-scroller] [data-part-unread] {
210
- color: var(--slotted-tone-accent-text);
211
- }
204
+ :scope [data-part-separator] > * {
205
+ padding-block: var(--slotted-space-1, 0.125rem);
206
+ padding-inline: var(--slotted-space-4, 0.5rem);
207
+ border: var(--slotted-border-width-thin, 1px) solid var(--slotted-border-subtle);
208
+ border-radius: var(--slotted-radius-full, 9999px);
209
+ background-color: var(--slotted-surface);
210
+ }
212
211
 
213
- [data-ui-message-scroller] [data-part-unread]::before,
214
- [data-ui-message-scroller] [data-part-unread]::after {
215
- border-block-start-color: var(--slotted-tone-accent-border);
216
- }
212
+ :scope [data-part-unread] {
213
+ color: var(--slotted-tone-accent-text);
214
+ }
217
215
 
218
- /* ── Loader ─────────────────────────────────────────────────────────────
219
- *
220
- * Older rows on their way: the shared ring and a line of muted text, at the
221
- * head of the rows. The ring is `spinner`'s.
222
- */
223
- [data-ui-message-scroller] [data-part-loader] {
224
- display: flex;
225
- align-items: center;
226
- justify-content: center;
227
- gap: var(--slotted-space-3, 0.375rem);
228
- padding-block: var(--slotted-space-2, 0.25rem);
229
- color: var(--slotted-text-muted);
230
- font-size: var(--slotted-control-font-size-md, 13px);
231
- }
216
+ :scope [data-part-unread]::before,
217
+ :scope [data-part-unread]::after {
218
+ border-block-start-color: var(--slotted-tone-accent-border);
219
+ }
232
220
 
233
- [data-ui-message-scroller] [data-part-loader] > [data-ui-spinner] {
234
- --slotted-spinner-size: var(--slotted-control-icon-size-sm, 14px);
235
- }
221
+ /* ── Loader ─────────────────────────────────────────────────────────────
222
+ *
223
+ * Older rows on their way: the shared ring and a line of muted text, at the
224
+ * head of the rows. The ring is `spinner`'s.
225
+ */
226
+ :scope [data-part-loader] {
227
+ display: flex;
228
+ align-items: center;
229
+ justify-content: center;
230
+ gap: var(--slotted-space-3, 0.375rem);
231
+ padding-block: var(--slotted-space-2, 0.25rem);
232
+ color: var(--slotted-text-muted);
233
+ font-size: var(--slotted-control-font-size-md, 13px);
234
+ }
236
235
 
237
- /**
238
- * ── Jump ───────────────────────────────────────────────────────────────
239
- *
240
- * A raised round control over the foot of the frame, the arrow pointing to
241
- * where it goes. When rows arrived out of view it widens into a pill that
242
- * says how many, the answer shadcn's own documentation asks for (its eighth
243
- * principle) and its control does not give.
244
- *
245
- * With nowhere to go it leaves: `inert`, out of the tab order, and drawn
246
- * out by opacity and a step toward its edge. It arrives on the enter curve
247
- * in the medium step and leaves on the exit curve in the short one, where
248
- * ReUI's leaves in twice the time it arrives (dossier §5). It does not
249
- * scale: it holds text.
250
- */
251
- [data-ui-message-scroller] [data-part-jump] {
252
- --_size: var(--slotted-message-scroller-jump-size, var(--slotted-control-height-md, 34px));
253
- --_ground: var(--slotted-surface-raised);
254
- --_ink: var(--slotted-text);
255
- --_shift: var(--slotted-space-4, 0.5rem);
256
-
257
- display: inline-flex;
258
- align-items: center;
259
- justify-content: center;
260
- gap: var(--slotted-space-2, 0.25rem);
261
- position: absolute;
262
- inset-block-end: var(--_inset);
263
- inset-inline-start: 50%;
264
- z-index: 2;
265
- box-sizing: border-box;
266
- min-inline-size: var(--_size);
267
- block-size: var(--_size);
268
- margin: 0;
269
- padding: 0;
270
- /* A raised surface over the rows, not a field: the rule inside a surface and the lift say so. */
271
- border: var(--slotted-border-width-thin, 1px) solid var(--slotted-border-subtle);
272
- border-radius: var(--slotted-radius-full, 9999px);
273
- background-color: var(--_ground);
274
- box-shadow: var(--slotted-shadow-md);
275
- color: var(--_ink);
276
- font: inherit;
277
- font-size: var(--slotted-control-font-size-md, 13px);
278
- font-weight: var(--slotted-font-weight-medium, 500);
279
- line-height: 1;
280
- white-space: nowrap;
281
- cursor: pointer;
282
- translate: -50% 0;
283
- transition:
284
- opacity var(--slotted-duration-medium) var(--slotted-easing-enter, ease-out),
285
- translate var(--slotted-duration-medium) var(--slotted-easing-enter, ease-out),
286
- background-color var(--slotted-duration-short) var(--slotted-easing-standard, ease);
287
- }
236
+ :scope [data-part-loader] > [data-ui-spinner] {
237
+ --slotted-spinner-size: var(--slotted-control-icon-size-sm, 14px);
238
+ }
288
239
 
289
- [data-ui-message-scroller] [data-part-jump]:dir(rtl) {
290
- translate: 50% 0;
291
- }
240
+ /**
241
+ * ── Jump ───────────────────────────────────────────────────────────────
242
+ *
243
+ * A raised round control over the foot of the frame, the arrow pointing to
244
+ * where it goes. When rows arrived out of view it widens into a pill that
245
+ * says how many, the answer shadcn's own documentation asks for (its eighth
246
+ * principle) and its control does not give.
247
+ *
248
+ * With nowhere to go it leaves: `inert`, out of the tab order, and drawn
249
+ * out by opacity and a step toward its edge. It arrives on the enter curve
250
+ * in the medium step and leaves on the exit curve in the short one, where
251
+ * ReUI's leaves in twice the time it arrives (dossier §5). It does not
252
+ * scale: it holds text.
253
+ */
254
+ :scope [data-part-jump] {
255
+ --_size: var(--slotted-message-scroller-jump-size, var(--slotted-control-height-md, 34px));
256
+ --_ground: var(--slotted-surface-raised);
257
+ --_ink: var(--slotted-text);
258
+ --_shift: var(--slotted-space-4, 0.5rem);
259
+
260
+ display: inline-flex;
261
+ align-items: center;
262
+ justify-content: center;
263
+ gap: var(--slotted-space-2, 0.25rem);
264
+ position: absolute;
265
+ inset-block-end: var(--_inset);
266
+ inset-inline-start: 50%;
267
+ z-index: 2;
268
+ box-sizing: border-box;
269
+ min-inline-size: var(--_size);
270
+ block-size: var(--_size);
271
+ margin: 0;
272
+ padding: 0;
273
+ /* A raised surface over the rows, not a field: the rule inside a surface and the lift say so. */
274
+ border: var(--slotted-border-width-thin, 1px) solid var(--slotted-border-subtle);
275
+ border-radius: var(--slotted-radius-full, 9999px);
276
+ background-color: var(--_ground);
277
+ box-shadow: var(--slotted-shadow-md);
278
+ color: var(--_ink);
279
+ font: inherit;
280
+ font-size: var(--slotted-control-font-size-md, 13px);
281
+ font-weight: var(--slotted-font-weight-medium, 500);
282
+ line-height: 1;
283
+ white-space: nowrap;
284
+ cursor: pointer;
285
+ translate: -50% 0;
286
+ transition:
287
+ opacity var(--slotted-duration-medium) var(--slotted-easing-enter, ease-out),
288
+ translate var(--slotted-duration-medium) var(--slotted-easing-enter, ease-out),
289
+ background-color var(--slotted-duration-short) var(--slotted-easing-standard, ease);
290
+ }
292
291
 
293
- [data-ui-message-scroller] [data-part-jump][data-direction='start'] {
294
- inset-block: var(--_inset) auto;
295
- --_shift: calc(var(--slotted-space-4, 0.5rem) * -1);
296
- }
292
+ :scope [data-part-jump]:dir(rtl) {
293
+ translate: 50% 0;
294
+ }
297
295
 
298
- [data-ui-message-scroller] [data-part-jump] > [data-ui-icon] {
299
- --slotted-icon-size: var(--slotted-control-icon-size-md, 16px);
296
+ :scope [data-part-jump][data-direction='start'] {
297
+ inset-block: var(--_inset) auto;
298
+ --_shift: calc(var(--slotted-space-4, 0.5rem) * -1);
299
+ }
300
300
 
301
- rotate: -90deg;
302
- }
301
+ :scope [data-part-jump] > [data-ui-icon] {
302
+ --slotted-icon-size: var(--slotted-control-icon-size-md, 16px);
303
303
 
304
- [data-ui-message-scroller] [data-part-jump][data-direction='start'] > [data-ui-icon] {
305
- rotate: 90deg;
306
- }
304
+ rotate: -90deg;
305
+ }
307
306
 
308
- [data-ui-message-scroller] [data-part-jump]:has(> [data-part-jump-count]) {
309
- padding-inline: var(--slotted-space-4, 0.5rem) var(--slotted-space-5, 0.75rem);
310
- }
307
+ :scope [data-part-jump][data-direction='start'] > [data-ui-icon] {
308
+ rotate: 90deg;
309
+ }
311
310
 
312
- [data-ui-message-scroller] [data-part-jump-count] {
313
- font-variant-numeric: tabular-nums;
314
- }
311
+ :scope [data-part-jump]:has(> [data-part-jump-count]) {
312
+ padding-inline: var(--slotted-space-4, 0.5rem) var(--slotted-space-5, 0.75rem);
313
+ }
315
314
 
316
- [data-ui-message-scroller] [data-part-jump][data-active='false'] {
317
- opacity: 0;
318
- pointer-events: none;
319
- translate: -50% var(--_shift);
320
- transition:
321
- opacity var(--slotted-duration-short) var(--slotted-easing-exit, ease-in),
322
- translate var(--slotted-duration-short) var(--slotted-easing-exit, ease-in);
323
- }
315
+ :scope [data-part-jump-count] {
316
+ font-variant-numeric: tabular-nums;
317
+ }
324
318
 
325
- [data-ui-message-scroller] [data-part-jump][data-active='false']:dir(rtl) {
326
- translate: 50% var(--_shift);
327
- }
319
+ :scope [data-part-jump][data-active='false'] {
320
+ opacity: 0;
321
+ pointer-events: none;
322
+ translate: -50% var(--_shift);
323
+ transition:
324
+ opacity var(--slotted-duration-short) var(--slotted-easing-exit, ease-in),
325
+ translate var(--slotted-duration-short) var(--slotted-easing-exit, ease-in);
326
+ }
328
327
 
329
- [data-ui-message-scroller] [data-part-jump]:hover:not(:disabled):not([data-disabled]) {
330
- background-color: color-mix(
331
- in oklab,
332
- var(--_ink) var(--slotted-message-scroller-state-layer-hover, 6%),
333
- var(--_ground)
334
- );
335
- }
328
+ :scope [data-part-jump][data-active='false']:dir(rtl) {
329
+ translate: 50% var(--_shift);
330
+ }
336
331
 
337
- /**
338
- * The press answers by the ground and by a pixel toward the edge the
339
- * control points to, the way a key goes down; a scale would resample the
340
- * count it carries (R7, `text-scale.test.mjs`).
341
- */
342
- [data-ui-message-scroller] [data-part-jump]:active:not(:disabled):not([data-disabled]) {
343
- background-color: color-mix(
344
- in oklab,
345
- var(--_ink) var(--slotted-message-scroller-state-layer-active, 12%),
346
- var(--_ground)
347
- );
348
- translate: -50% var(--slotted-space-1, 0.125rem);
349
- }
332
+ :scope [data-part-jump]:hover:not(:disabled):not([data-disabled]) {
333
+ background-color: color-mix(
334
+ in oklab,
335
+ var(--_ink) var(--slotted-message-scroller-state-layer-hover, 6%),
336
+ var(--_ground)
337
+ );
338
+ }
350
339
 
351
- [data-ui-message-scroller] [data-part-jump]:active:not(:disabled):not([data-disabled]):dir(rtl) {
352
- translate: 50% var(--slotted-space-1, 0.125rem);
353
- }
340
+ /**
341
+ * The press answers by the ground and by a pixel toward the edge the
342
+ * control points to, the way a key goes down; a scale would resample the
343
+ * count it carries (R7, `text-scale.test.mjs`).
344
+ */
345
+ :scope [data-part-jump]:active:not(:disabled):not([data-disabled]) {
346
+ background-color: color-mix(
347
+ in oklab,
348
+ var(--_ink) var(--slotted-message-scroller-state-layer-active, 12%),
349
+ var(--_ground)
350
+ );
351
+ translate: -50% var(--slotted-space-1, 0.125rem);
352
+ }
354
353
 
355
- [data-ui-message-scroller] [data-part-jump]:focus-visible {
356
- outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color);
357
- outline-offset: var(--slotted-focus-ring-offset, 2px);
358
- }
354
+ :scope [data-part-jump]:active:not(:disabled):not([data-disabled]):dir(rtl) {
355
+ translate: 50% var(--slotted-space-1, 0.125rem);
356
+ }
359
357
 
360
- @media (forced-colors: active) {
361
- [data-ui-message-scroller] [data-part-item][data-current] {
362
- outline: var(--slotted-border-width-thick, 2px) solid Highlight;
363
- outline-offset: var(--slotted-space-2, 0.25rem);
358
+ :scope [data-part-jump]:focus-visible {
359
+ outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color);
360
+ outline-offset: var(--slotted-focus-ring-offset, 2px);
364
361
  }
365
362
 
366
- [data-ui-message-scroller] [data-part-viewport][data-scrollable] {
367
- mask-image: none;
363
+ @media (forced-colors: active) {
364
+ :scope [data-part-item][data-current] {
365
+ outline: var(--slotted-border-width-thick, 2px) solid Highlight;
366
+ outline-offset: var(--slotted-space-2, 0.25rem);
367
+ }
368
+
369
+ :scope [data-part-viewport][data-scrollable] {
370
+ mask-image: none;
371
+ }
368
372
  }
369
373
  }
370
374
  }