@slotted/styles 0.1.0-beta.38 → 0.1.0-beta.39
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/dialog/dialog.css +27 -0
- package/src/dialog/dialog.tokens.json +1 -0
- package/src/drawer/drawer.css +48 -1
- package/src/drawer/drawer.tokens.json +1 -0
- package/src/list-item/list-item.css +9 -3
- package/src/section/section.css +48 -6
- package/src/table/table.css +53 -27
package/package.json
CHANGED
package/src/dialog/dialog.css
CHANGED
|
@@ -255,6 +255,33 @@
|
|
|
255
255
|
transition: opacity var(--slotted-duration-long) var(--slotted-easing-standard);
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
+
/**
|
|
259
|
+
* A theme filters the page under a modal layer with
|
|
260
|
+
* `--slotted-dialog-scrim-backdrop-filter`, `none` unless set. A filter makes
|
|
261
|
+
* the scrim a stacking context, which its place in the document would paint
|
|
262
|
+
* over the panel, so it stands at the bottom of the layer's own. It comes and
|
|
263
|
+
* goes with the scrim's opacity.
|
|
264
|
+
*/
|
|
265
|
+
[data-ui-dialog][data-modal] > [data-part-backdrop] {
|
|
266
|
+
transition-property:
|
|
267
|
+
opacity,
|
|
268
|
+
-webkit-backdrop-filter,
|
|
269
|
+
backdrop-filter;
|
|
270
|
+
z-index: -1;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
[data-ui-dialog][data-modal][data-open] > [data-part-backdrop] {
|
|
274
|
+
-webkit-backdrop-filter: var(--slotted-dialog-scrim-backdrop-filter, none);
|
|
275
|
+
backdrop-filter: var(--slotted-dialog-scrim-backdrop-filter, none);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
|
|
279
|
+
[data-ui-dialog][data-modal][data-open] > [data-part-backdrop] {
|
|
280
|
+
-webkit-backdrop-filter: none;
|
|
281
|
+
backdrop-filter: none;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
258
285
|
/* ── The box the panel sits in ────────────────────────────────────────── */
|
|
259
286
|
|
|
260
287
|
/**
|
package/src/drawer/drawer.css
CHANGED
|
@@ -334,6 +334,35 @@
|
|
|
334
334
|
transition: opacity var(--slotted-duration-long) var(--slotted-easing-standard);
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
+
/**
|
|
338
|
+
* A theme filters the page under a modal layer with
|
|
339
|
+
* `--slotted-drawer-scrim-backdrop-filter`, `none` unless set. A filter makes
|
|
340
|
+
* the scrim a stacking context, which its place in the document would paint
|
|
341
|
+
* over the panel, so it stands at the bottom of the layer's own. It comes and
|
|
342
|
+
* goes with the scrim's opacity.
|
|
343
|
+
*/
|
|
344
|
+
[data-ui-drawer][data-mode='overlay'][data-modal] > [data-part-backdrop] {
|
|
345
|
+
transition-property:
|
|
346
|
+
opacity,
|
|
347
|
+
-webkit-backdrop-filter,
|
|
348
|
+
backdrop-filter;
|
|
349
|
+
z-index: -1;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
[data-ui-drawer][data-mode='overlay'][data-modal][data-open]:not([data-undimmed])
|
|
353
|
+
> [data-part-backdrop] {
|
|
354
|
+
-webkit-backdrop-filter: var(--slotted-drawer-scrim-backdrop-filter, none);
|
|
355
|
+
backdrop-filter: var(--slotted-drawer-scrim-backdrop-filter, none);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
|
|
359
|
+
[data-ui-drawer][data-mode='overlay'][data-modal][data-open]:not([data-undimmed])
|
|
360
|
+
> [data-part-backdrop] {
|
|
361
|
+
-webkit-backdrop-filter: none;
|
|
362
|
+
backdrop-filter: none;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
337
366
|
/* ── The panel ────────────────────────────────────────────────────────── */
|
|
338
367
|
|
|
339
368
|
/**
|
|
@@ -1709,13 +1738,24 @@
|
|
|
1709
1738
|
/**
|
|
1710
1739
|
* The scrim dims with the sheet: out of sight it is clear, at the lowest stop
|
|
1711
1740
|
* it is whole. The element keeps the fade it opens and closes with; the
|
|
1712
|
-
* scroll drives a layer inside it, and the two multiply.
|
|
1741
|
+
* scroll drives a layer inside it, and the two multiply. The scroll drives the
|
|
1742
|
+
* filter of the element itself, from none to the token.
|
|
1713
1743
|
*/
|
|
1714
1744
|
@supports (animation-timeline: scroll()) {
|
|
1715
1745
|
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag] > [data-part-backdrop] {
|
|
1716
1746
|
background: none;
|
|
1717
1747
|
}
|
|
1718
1748
|
|
|
1749
|
+
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag][data-modal]:not(
|
|
1750
|
+
[data-sheet-content],
|
|
1751
|
+
[data-sheet-travel]
|
|
1752
|
+
)
|
|
1753
|
+
> [data-part-backdrop] {
|
|
1754
|
+
animation: slotted-drawer-sheet-filter linear both;
|
|
1755
|
+
animation-timeline: --slotted-drawer-sheet;
|
|
1756
|
+
animation-range: 0px var(--slotted-drawer-sheet-floor, 100%);
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1719
1759
|
[data-ui-drawer][data-mode='overlay'][data-side='bottom'][data-drag]
|
|
1720
1760
|
> [data-part-backdrop]::before {
|
|
1721
1761
|
content: '';
|
|
@@ -1743,6 +1783,13 @@
|
|
|
1743
1783
|
}
|
|
1744
1784
|
}
|
|
1745
1785
|
|
|
1786
|
+
@keyframes slotted-drawer-sheet-filter {
|
|
1787
|
+
from {
|
|
1788
|
+
-webkit-backdrop-filter: none;
|
|
1789
|
+
backdrop-filter: none;
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1746
1793
|
@keyframes slotted-drawer-sheet-dim {
|
|
1747
1794
|
from {
|
|
1748
1795
|
opacity: 0;
|
|
@@ -61,6 +61,10 @@
|
|
|
61
61
|
calc((var(--_min-block) - var(--_font-size) * var(--slotted-line-height-md, 1.5)) / 2)
|
|
62
62
|
)
|
|
63
63
|
);
|
|
64
|
+
/* What stands above and below a control of `actions`. The row is as tall as
|
|
65
|
+
a control of its own size, so a control one step smaller left two pixels
|
|
66
|
+
at each edge and the outlines of two rows read as one column of boxes. */
|
|
67
|
+
--_actions-inset: var(--slotted-space-3, 0.375rem);
|
|
64
68
|
--_radius: var(--slotted-list-item-radius, var(--slotted-radius-md, 6px));
|
|
65
69
|
|
|
66
70
|
/* Ink. `secondary` is the library's neutral, and a neutral row takes the
|
|
@@ -618,6 +622,7 @@
|
|
|
618
622
|
display: flex;
|
|
619
623
|
flex: none;
|
|
620
624
|
gap: var(--_gap);
|
|
625
|
+
padding-block: var(--_actions-start, var(--_actions-inset)) var(--_actions-inset);
|
|
621
626
|
padding-inline-end: var(--_pad-inline);
|
|
622
627
|
position: relative;
|
|
623
628
|
}
|
|
@@ -658,8 +663,9 @@
|
|
|
658
663
|
* on two different lines — the one thing a trailing pair must not do.
|
|
659
664
|
*/
|
|
660
665
|
[data-ui-list-item][data-align='start'] > [data-part-actions] {
|
|
666
|
+
--_actions-start: max(var(--_pad-block), var(--_actions-inset));
|
|
667
|
+
|
|
661
668
|
align-items: start;
|
|
662
|
-
padding-block-start: var(--_pad-block);
|
|
663
669
|
}
|
|
664
670
|
|
|
665
671
|
/**
|
|
@@ -948,7 +954,7 @@
|
|
|
948
954
|
[data-ui-list-item] > [data-part-actions] {
|
|
949
955
|
flex-basis: 100%;
|
|
950
956
|
justify-content: flex-end;
|
|
951
|
-
padding-block
|
|
957
|
+
padding-block: var(--_actions-start, 0px) max(var(--_pad-block), var(--_actions-inset));
|
|
952
958
|
padding-inline: var(--_pad-inline);
|
|
953
959
|
}
|
|
954
960
|
|
|
@@ -967,7 +973,7 @@
|
|
|
967
973
|
*/
|
|
968
974
|
[data-ui-list-item] > [data-part-actions]:not(:has(> :not([data-shape]))) {
|
|
969
975
|
flex-basis: auto;
|
|
970
|
-
padding-block
|
|
976
|
+
padding-block: var(--_actions-start, var(--_actions-inset)) var(--_actions-inset);
|
|
971
977
|
padding-inline: 0 var(--_pad-inline);
|
|
972
978
|
}
|
|
973
979
|
|
package/src/section/section.css
CHANGED
|
@@ -198,6 +198,9 @@
|
|
|
198
198
|
* their column; the tags never leave the heading's row.
|
|
199
199
|
*/
|
|
200
200
|
[data-ui-section] > [data-part-header] > [data-part-title] {
|
|
201
|
+
/* The heading's text, which an inline icon button in the tags takes too. */
|
|
202
|
+
--_text-size: var(--_heading-size);
|
|
203
|
+
--_text-line-height: var(--_heading-line-height);
|
|
201
204
|
align-items: baseline;
|
|
202
205
|
display: grid;
|
|
203
206
|
grid-column: 1;
|
|
@@ -225,10 +228,10 @@
|
|
|
225
228
|
--slotted-font-family-heading,
|
|
226
229
|
var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif)
|
|
227
230
|
);
|
|
228
|
-
font-size: var(--
|
|
231
|
+
font-size: var(--_text-size);
|
|
229
232
|
font-weight: var(--slotted-font-weight-semibold, 600);
|
|
230
233
|
letter-spacing: 0.08em;
|
|
231
|
-
line-height: var(--
|
|
234
|
+
line-height: var(--_text-line-height);
|
|
232
235
|
text-transform: uppercase;
|
|
233
236
|
grid-column: 1;
|
|
234
237
|
grid-row: 2;
|
|
@@ -243,13 +246,16 @@
|
|
|
243
246
|
* section whose body opens with text heavier than a label. It stands above
|
|
244
247
|
* the subsection's rule, so a nested section keeps the subsection's form.
|
|
245
248
|
*/
|
|
249
|
+
[data-ui-section][data-heading='title'] > [data-part-header] > [data-part-title] {
|
|
250
|
+
--_text-size: var(--_title-size);
|
|
251
|
+
--_text-line-height: var(--_title-line-height);
|
|
252
|
+
}
|
|
253
|
+
|
|
246
254
|
[data-ui-section][data-heading='title']
|
|
247
255
|
> [data-part-header]
|
|
248
256
|
> [data-part-title]
|
|
249
257
|
> [data-part-heading] {
|
|
250
|
-
font-size: var(--_title-size);
|
|
251
258
|
letter-spacing: normal;
|
|
252
|
-
line-height: var(--_title-line-height);
|
|
253
259
|
text-transform: none;
|
|
254
260
|
}
|
|
255
261
|
|
|
@@ -258,15 +264,18 @@
|
|
|
258
264
|
* read without the color. The text stays the muted token, which the theme
|
|
259
265
|
* holds above 4.5:1 on every ground a section stands on.
|
|
260
266
|
*/
|
|
267
|
+
[data-ui-section] [data-ui-section] > [data-part-header] > [data-part-title] {
|
|
268
|
+
--_text-size: var(--_subheading-size);
|
|
269
|
+
--_text-line-height: var(--_subheading-line-height);
|
|
270
|
+
}
|
|
271
|
+
|
|
261
272
|
[data-ui-section]
|
|
262
273
|
[data-ui-section]
|
|
263
274
|
> [data-part-header]
|
|
264
275
|
> [data-part-title]
|
|
265
276
|
> [data-part-heading] {
|
|
266
277
|
color: var(--_muted);
|
|
267
|
-
font-size: var(--_subheading-size);
|
|
268
278
|
letter-spacing: normal;
|
|
269
|
-
line-height: var(--_subheading-line-height);
|
|
270
279
|
text-transform: none;
|
|
271
280
|
}
|
|
272
281
|
|
|
@@ -289,6 +298,39 @@
|
|
|
289
298
|
display: none;
|
|
290
299
|
}
|
|
291
300
|
|
|
301
|
+
/**
|
|
302
|
+
* An inline icon button is a mark on the text before it, so it takes the
|
|
303
|
+
* heading's text and keeps the distance it keeps after a word: its own
|
|
304
|
+
* margin, with neither the tags' margin nor their gap added to it.
|
|
305
|
+
*/
|
|
306
|
+
[data-ui-section]
|
|
307
|
+
> [data-part-header]
|
|
308
|
+
> [data-part-title]
|
|
309
|
+
> [data-part-tags]
|
|
310
|
+
> [data-ui-button][data-shape][data-inline] {
|
|
311
|
+
font-family: var(
|
|
312
|
+
--slotted-font-family-heading,
|
|
313
|
+
var(--slotted-font-family-sans, ui-sans-serif, system-ui, sans-serif)
|
|
314
|
+
);
|
|
315
|
+
font-size: var(--_text-size);
|
|
316
|
+
line-height: var(--_text-line-height);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
[data-ui-section]
|
|
320
|
+
> [data-part-header]
|
|
321
|
+
> [data-part-title]
|
|
322
|
+
> [data-part-tags]:has(> [data-ui-button][data-shape][data-inline]:first-child) {
|
|
323
|
+
margin-inline-start: 0;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
[data-ui-section]
|
|
327
|
+
> [data-part-header]
|
|
328
|
+
> [data-part-title]
|
|
329
|
+
> [data-part-tags]
|
|
330
|
+
> [data-ui-button][data-shape][data-inline]:not(:first-child) {
|
|
331
|
+
margin-inline-start: calc(0.25em - var(--slotted-space-3, 0.375rem));
|
|
332
|
+
}
|
|
333
|
+
|
|
292
334
|
[data-ui-section] > [data-part-header] > [data-part-title] > [data-part-description] {
|
|
293
335
|
color: var(--_muted);
|
|
294
336
|
font-size: var(--slotted-font-size-sm, 0.8125rem);
|
package/src/table/table.css
CHANGED
|
@@ -1204,7 +1204,10 @@
|
|
|
1204
1204
|
* half the expander plus a step of the space scale, so the line one level up
|
|
1205
1205
|
* sits on the expander's center and the row's own expander starts a fixed
|
|
1206
1206
|
* distance past it. A row without an expander keeps the expander's box as
|
|
1207
|
-
* space, so a leaf's text lines up with a sibling's that has one.
|
|
1207
|
+
* space, so a leaf's text lines up with a sibling's that has one. An expander
|
|
1208
|
+
* that leads a cell with no mark stands out of flow in that same space, on
|
|
1209
|
+
* the middle of the content where `cellAlign` places it: in flow it stood on
|
|
1210
|
+
* one line of text, above the middle of any content taller than that line.
|
|
1208
1211
|
*
|
|
1209
1212
|
* The guide is one box per row with a line per ancestor level, through the
|
|
1210
1213
|
* whole row and over the rule above it, so it stays continuous across rows
|
|
@@ -1221,23 +1224,53 @@
|
|
|
1221
1224
|
--slotted-table-guide-color,
|
|
1222
1225
|
color-mix(in oklab, var(--slotted-border-strong) 60%, var(--slotted-border-subtle))
|
|
1223
1226
|
);
|
|
1227
|
+
/* Where the row's lead starts in its cell. */
|
|
1228
|
+
--_own: calc(var(--_pad-inline) + var(--_tree-step) * var(--slotted-table-depth, 0));
|
|
1224
1229
|
}
|
|
1225
1230
|
|
|
1231
|
+
/**
|
|
1232
|
+
* The middle the row's lead stands on: in the cell, in the box of the lines,
|
|
1233
|
+
* which starts a rule above it, and of a line placed there as a tile. A cell
|
|
1234
|
+
* that states `blockAlign` answers for its own lead.
|
|
1235
|
+
*/
|
|
1226
1236
|
[data-ui-table] [data-part-row][data-level] > :nth-child(1 of :not([data-part-selection])) {
|
|
1237
|
+
--_y: 50%;
|
|
1238
|
+
--_at: calc(var(--_y) + var(--_rule-width) / 2);
|
|
1239
|
+
--_tile: calc(var(--_y) + var(--_rule-width) / 2);
|
|
1227
1240
|
inline-size: auto;
|
|
1228
1241
|
padding-inline-end: var(--_pad-inline);
|
|
1229
|
-
padding-inline-start:
|
|
1230
|
-
var(--_pad-inline) + var(--_tree-step) * var(--slotted-table-depth, 0)
|
|
1231
|
-
);
|
|
1242
|
+
padding-inline-start: var(--_own);
|
|
1232
1243
|
}
|
|
1233
1244
|
|
|
1245
|
+
[data-ui-table][data-cell-align='start']
|
|
1246
|
+
[data-part-row][data-level]
|
|
1247
|
+
> :nth-child(1 of :not([data-part-selection])):not([data-block-align]),
|
|
1234
1248
|
[data-ui-table]
|
|
1235
1249
|
[data-part-row][data-level]
|
|
1236
|
-
> :nth-child(1 of :not([data-part-selection]))
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1250
|
+
> :nth-child(1 of :not([data-part-selection]))[data-block-align='start'] {
|
|
1251
|
+
--_y: calc(var(--_pad-block) + var(--_line) / 2);
|
|
1252
|
+
--_at: calc(var(--_y) + var(--_rule-width));
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
[data-ui-table][data-cell-align='end']
|
|
1256
|
+
[data-part-row][data-level]
|
|
1257
|
+
> :nth-child(1 of :not([data-part-selection])):not([data-block-align]),
|
|
1258
|
+
[data-ui-table]
|
|
1259
|
+
[data-part-row][data-level]
|
|
1260
|
+
> :nth-child(1 of :not([data-part-selection]))[data-block-align='end'] {
|
|
1261
|
+
--_y: calc(100% - var(--_pad-block) - var(--_line) / 2);
|
|
1262
|
+
--_at: var(--_y);
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
[data-ui-table]
|
|
1266
|
+
[data-part-row][data-level]
|
|
1267
|
+
> :nth-child(1 of :not([data-part-selection])):not(:has(> [data-part-expander])),
|
|
1268
|
+
[data-ui-table]
|
|
1269
|
+
[data-part-row][data-level]
|
|
1270
|
+
> :nth-child(1 of :not([data-part-selection])):has(> [data-part-expander]:first-child):not(
|
|
1271
|
+
:has(> [data-part-mark])
|
|
1272
|
+
) {
|
|
1273
|
+
padding-inline-start: calc(var(--_own) + var(--slotted-target-min, 24px) + var(--_gap));
|
|
1241
1274
|
}
|
|
1242
1275
|
|
|
1243
1276
|
[data-ui-table]
|
|
@@ -1277,6 +1310,16 @@
|
|
|
1277
1310
|
vertical-align: top;
|
|
1278
1311
|
}
|
|
1279
1312
|
|
|
1313
|
+
[data-ui-table]
|
|
1314
|
+
[data-part-row][data-level]
|
|
1315
|
+
> :nth-child(1 of :not([data-part-selection])):not(:has(> [data-part-mark]))
|
|
1316
|
+
> [data-part-expander]:first-child {
|
|
1317
|
+
inset-block-start: calc(var(--_y) - var(--slotted-target-min, 24px) / 2);
|
|
1318
|
+
inset-inline-start: var(--_own);
|
|
1319
|
+
margin: 0;
|
|
1320
|
+
position: absolute;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1280
1323
|
[data-ui-table][data-guides='false']
|
|
1281
1324
|
[data-part-row][data-level]
|
|
1282
1325
|
> :nth-child(1 of :not([data-part-selection]))::before {
|
|
@@ -1368,11 +1411,6 @@
|
|
|
1368
1411
|
--_own: calc(var(--_pad-inline) + var(--_lead));
|
|
1369
1412
|
--_from: 0px;
|
|
1370
1413
|
--_mark-size: var(--_node);
|
|
1371
|
-
/* The middle of the mark: in the cell, and in the box of the lines, which
|
|
1372
|
-
starts a rule above it; the middle of a line placed there as a tile. */
|
|
1373
|
-
--_y: 50%;
|
|
1374
|
-
--_at: calc(50% + var(--_rule-width) / 2);
|
|
1375
|
-
--_tile: calc(50% + var(--_rule-width) / 2);
|
|
1376
1414
|
}
|
|
1377
1415
|
|
|
1378
1416
|
[data-ui-table][data-guides='branch'] [data-part-row][data-level]:not([data-level='0']) {
|
|
@@ -1381,20 +1419,8 @@
|
|
|
1381
1419
|
--_mark-size: var(--_node-child);
|
|
1382
1420
|
}
|
|
1383
1421
|
|
|
1384
|
-
[data-ui-table][data-guides='branch'][data-cell-align='start'] [data-part-row][data-level] {
|
|
1385
|
-
--_y: calc(var(--_pad-block) + var(--_line) / 2);
|
|
1386
|
-
--_at: calc(var(--_y) + var(--_rule-width));
|
|
1387
|
-
--_tile: calc(var(--_y) + var(--_rule-width) / 2);
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
[data-ui-table][data-guides='branch'][data-cell-align='end'] [data-part-row][data-level] {
|
|
1391
|
-
--_y: calc(100% - var(--_pad-block) - var(--_line) / 2);
|
|
1392
|
-
--_at: var(--_y);
|
|
1393
|
-
--_tile: calc(var(--_y) + var(--_rule-width) / 2);
|
|
1394
|
-
}
|
|
1395
|
-
|
|
1396
1422
|
/* The row's lead: the mark stands out of flow at one place of its level, and
|
|
1397
|
-
the cell keeps its room. An expander before it
|
|
1423
|
+
the cell keeps its room. An expander before it stands inside the indent. */
|
|
1398
1424
|
[data-ui-table][data-guides='branch']
|
|
1399
1425
|
[data-part-row][data-level]
|
|
1400
1426
|
> :nth-child(1 of :not([data-part-selection])) {
|