@slotted/styles 0.1.0-beta.33 → 0.1.0-beta.35

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 (83) hide show
  1. package/package.json +5 -1
  2. package/src/accordion/accordion.css +20 -2
  3. package/src/accordion/accordion.tokens.json +2 -0
  4. package/src/avatar/avatar.css +1 -1
  5. package/src/avatar/avatar.tokens.json +1 -0
  6. package/src/badge/badge.css +1 -1
  7. package/src/badge/badge.tokens.json +1 -0
  8. package/src/button/button.css +168 -4
  9. package/src/button/button.tokens.json +5 -0
  10. package/src/calendar/calendar.css +131 -0
  11. package/src/calendar/calendar.tokens.json +10 -0
  12. package/src/card/card.css +63 -3
  13. package/src/cascader/cascader.css +13 -0
  14. package/src/chart/chart.css +3 -3
  15. package/src/chart/chart.tokens.json +1 -0
  16. package/src/checkbox/checkbox.css +47 -0
  17. package/src/checkbox/checkbox.tokens.json +4 -0
  18. package/src/collapsible/collapsible.css +174 -5
  19. package/src/collapsible/collapsible.tokens.json +4 -0
  20. package/src/combobox/combobox.css +13 -0
  21. package/src/command-palette/command-palette.css +10 -1
  22. package/src/command-palette/command-palette.tokens.json +1 -0
  23. package/src/dashboard-grid/dashboard-grid.css +12 -7
  24. package/src/dashboard-grid/dashboard-grid.tokens.json +1 -0
  25. package/src/data-grid/data-grid.css +44 -5
  26. package/src/data-list/data-list.css +17 -11
  27. package/src/description-list/description-list.css +15 -1
  28. package/src/drawer/drawer.css +91 -0
  29. package/src/entity-picker/entity-picker.css +23 -1
  30. package/src/entity-picker/entity-picker.tokens.json +1 -0
  31. package/src/filter-bar/filter-bar.css +24 -0
  32. package/src/floating-panel/floating-panel.css +123 -0
  33. package/src/floating-panel/floating-panel.tokens.json +30 -0
  34. package/src/form/form.css +19 -16
  35. package/src/inline-message/inline-message.css +1 -1
  36. package/src/inline-message/inline-message.tokens.json +1 -0
  37. package/src/kbd/kbd.css +1 -1
  38. package/src/kbd/kbd.tokens.json +1 -0
  39. package/src/list/list.css +10 -1
  40. package/src/list/list.tokens.json +1 -0
  41. package/src/list-item/list-item.css +108 -7
  42. package/src/list-item/list-item.tokens.json +3 -0
  43. package/src/listbox/listbox.css +50 -2
  44. package/src/listbox/listbox.tokens.json +6 -0
  45. package/src/message/message.css +20 -0
  46. package/src/message/message.tokens.json +1 -0
  47. package/src/meter/meter.css +136 -0
  48. package/src/meter/meter.tokens.json +23 -0
  49. package/src/multi-select/multi-select.css +13 -0
  50. package/src/page/page.css +58 -4
  51. package/src/page/page.tokens.json +7 -0
  52. package/src/progress-indicator/progress-indicator.css +70 -0
  53. package/src/progress-indicator/progress-indicator.tokens.json +3 -0
  54. package/src/prompt-composer/prompt-composer.css +18 -7
  55. package/src/radio-group/radio-group.css +50 -0
  56. package/src/radio-group/radio-group.tokens.json +2 -0
  57. package/src/rating/rating.css +1 -1
  58. package/src/rating/rating.tokens.json +1 -0
  59. package/src/runtime-properties.mjs +19 -0
  60. package/src/section/section.css +61 -4
  61. package/src/section/section.tokens.json +6 -0
  62. package/src/segmented-control/segmented-control.css +11 -0
  63. package/src/select/select.css +13 -0
  64. package/src/side-navigation/side-navigation.css +3 -3
  65. package/src/side-navigation/side-navigation.tokens.json +1 -0
  66. package/src/slider/slider.css +7 -1
  67. package/src/slider/slider.tokens.json +1 -0
  68. package/src/sparkline/sparkline.css +207 -0
  69. package/src/sparkline/sparkline.tokens.json +10 -0
  70. package/src/stat-card/stat-card.css +5 -0
  71. package/src/status-indicator/status-indicator.css +3 -2
  72. package/src/switch/switch.css +49 -25
  73. package/src/switch/switch.tokens.json +4 -0
  74. package/src/table/table.css +166 -12
  75. package/src/table/table.tokens.json +5 -0
  76. package/src/tag/tag.css +4 -1
  77. package/src/tag/tag.tokens.json +1 -0
  78. package/src/toolbar/toolbar.css +16 -2
  79. package/src/toolbar/toolbar.tokens.json +2 -1
  80. package/src/top-navigation/top-navigation.css +1 -1
  81. package/src/top-navigation/top-navigation.tokens.json +1 -0
  82. package/src/typography/typography.css +25 -0
  83. package/src/typography/typography.tokens.json +1 -0
@@ -301,4 +301,211 @@
301
301
  stroke: Canvas;
302
302
  }
303
303
  }
304
+
305
+ /**
306
+ * ── The position strip ──────────────────────────────────────────────
307
+ *
308
+ * ┌─ root ─ role="img" ─ data-type="strip" ─────────────────────────┐
309
+ * │ start │ ┌─ track ───────────────────────────────────────┐ │ end │
310
+ * │ │ │ ░░░░░░ band ░░░░░░ · dot ● value ┆ ref │ │ │
311
+ * │ │ └───────────────────────────────────────────────┘ │ │
312
+ * └──────────────────────────────────────────────────────────────────┘
313
+ *
314
+ * Every mark is placed by a share of the track the binding writes as
315
+ * --slotted-sparkline-at, so the strip is drawn without measuring. Each end
316
+ * is as wide as its text, never cut: rows that state the same extent write
317
+ * the same ends in tabular figures, so their tracks line up.
318
+ */
319
+ [data-ui-sparkline][data-type='strip'] {
320
+ --_end: var(--slotted-sparkline-end-size, max-content);
321
+ --_dot: var(--_marker);
322
+ --_value-dot: calc(var(--_marker) * 1.75);
323
+ --_band-color: color-mix(in oklab, var(--_color) 18%, var(--slotted-surface, Canvas));
324
+
325
+ align-items: center;
326
+ column-gap: var(--slotted-space-3, 0.375rem);
327
+ display: inline-grid;
328
+ font-size: var(--slotted-font-size-xs, 0.75rem);
329
+ font-variant-numeric: tabular-nums;
330
+ grid-template-columns: var(--_end) minmax(0, 1fr) var(--_end);
331
+ line-height: var(--slotted-line-height-sm, 1.45);
332
+ }
333
+
334
+ [data-ui-sparkline][data-type='strip'] [data-part-track] {
335
+ block-size: var(--_size);
336
+ position: relative;
337
+ }
338
+
339
+ [data-ui-sparkline][data-type='strip'] :is([data-part-start], [data-part-end]) {
340
+ color: var(--slotted-text-muted, GrayText);
341
+ white-space: nowrap;
342
+ }
343
+
344
+ [data-ui-sparkline][data-type='strip'] [data-part-start] {
345
+ text-align: end;
346
+ }
347
+
348
+ [data-ui-sparkline][data-type='strip'] [data-part-band] {
349
+ background-color: var(--_band-color);
350
+ block-size: calc(var(--_size) / 2);
351
+ border-radius: var(--slotted-radius-full, 9999px);
352
+ inline-size: calc((var(--slotted-sparkline-to, 0) - var(--slotted-sparkline-from, 0)) * 100%);
353
+ inset-block-start: calc(var(--_size) / 4);
354
+ inset-inline-start: calc(var(--slotted-sparkline-from, 0) * 100%);
355
+ position: absolute;
356
+ }
357
+
358
+ [data-ui-sparkline][data-type='strip']
359
+ :is([data-part-dot], [data-part-value], [data-part-reference], [data-part-zero]) {
360
+ inset-inline-start: calc(var(--slotted-sparkline-at, 0) * 100%);
361
+ position: absolute;
362
+ }
363
+
364
+ [data-ui-sparkline][data-type='strip'] [data-part-dot] {
365
+ background-color: var(--_bar-dim);
366
+ block-size: var(--_dot);
367
+ border-radius: 50%;
368
+ inline-size: var(--_dot);
369
+ inset-block-start: calc((var(--_size) - var(--_dot)) / 2);
370
+ margin-inline-start: calc(var(--_dot) / -2);
371
+ }
372
+
373
+ [data-ui-sparkline][data-type='strip'] [data-part-value] {
374
+ background-color: var(--_color);
375
+ block-size: var(--_value-dot);
376
+ border-radius: 50%;
377
+ box-shadow: 0 0 0 var(--_ring) var(--_ring-color);
378
+ inline-size: var(--_value-dot);
379
+ inset-block-start: calc((var(--_size) - var(--_value-dot)) / 2);
380
+ margin-inline-start: calc(var(--_value-dot) / -2);
381
+ }
382
+
383
+ /* The reference is dashed and the zero is solid: one is not data, the other is the origin. */
384
+ [data-ui-sparkline][data-type='strip'] :is([data-part-reference], [data-part-zero]) {
385
+ block-size: var(--_size);
386
+ border-inline-start: var(--slotted-border-width-thin, 1px) solid var(--_reference-color);
387
+ inset-block-start: 0;
388
+ margin-inline-start: calc(var(--slotted-border-width-thin, 1px) / -2);
389
+ }
390
+
391
+ [data-ui-sparkline][data-type='strip'] [data-part-reference] {
392
+ border-inline-start-style: dashed;
393
+ }
394
+
395
+ /**
396
+ * ── The comparison ──────────────────────────────────────────────────
397
+ *
398
+ * One row per value: a label column, then a track whose zero, ticks and
399
+ * bar are placed by shares the binding writes, so roots that state the
400
+ * same domain draw the same axis. The track keeps room on both sides for
401
+ * the value written past a bar's end, and rows touch, so the zero line and
402
+ * the ticks run unbroken through a root.
403
+ */
404
+ [data-ui-sparkline][data-type='compare'] {
405
+ --_label: var(--slotted-sparkline-label-size, 6rem);
406
+ --_room: var(--slotted-sparkline-value-size, 3.5rem);
407
+ --_thickness: var(--slotted-sparkline-bar-thickness, var(--slotted-space-5, 0.625rem));
408
+ --_texture: repeating-linear-gradient(
409
+ -45deg,
410
+ var(--_color) 0 var(--slotted-border-width-thin, 1px),
411
+ var(--slotted-surface, Canvas) var(--slotted-border-width-thin, 1px) 4px
412
+ );
413
+
414
+ block-size: auto;
415
+ display: grid;
416
+ font-size: var(--slotted-font-size-xs, 0.75rem);
417
+ font-variant-numeric: tabular-nums;
418
+ grid-template-columns: var(--_label) minmax(0, 1fr);
419
+ line-height: var(--slotted-line-height-sm, 1.45);
420
+ }
421
+
422
+ [data-ui-sparkline][data-type='compare'] [data-part-row] {
423
+ align-items: center;
424
+ display: grid;
425
+ grid-column: 1 / -1;
426
+ grid-template-columns: subgrid;
427
+ }
428
+
429
+ [data-ui-sparkline][data-type='compare'] [data-part-label] {
430
+ color: var(--slotted-text-muted, GrayText);
431
+ overflow: hidden;
432
+ padding-inline-end: var(--slotted-space-4, 0.5rem);
433
+ text-overflow: ellipsis;
434
+ white-space: nowrap;
435
+ }
436
+
437
+ [data-ui-sparkline][data-type='compare'] [data-part-track] {
438
+ block-size: calc(var(--_thickness) + var(--slotted-space-4, 0.5rem));
439
+ margin-inline: var(--_room);
440
+ position: relative;
441
+ }
442
+
443
+ [data-ui-sparkline][data-type='compare'] :is([data-part-zero], [data-part-tick]) {
444
+ border-inline-start: var(--slotted-border-width-thin, 1px) solid var(--_reference-color);
445
+ inset-block: 0;
446
+ inset-inline-start: calc(var(--slotted-sparkline-at, 0) * 100%);
447
+ margin-inline-start: calc(var(--slotted-border-width-thin, 1px) / -2);
448
+ position: absolute;
449
+ }
450
+
451
+ [data-ui-sparkline][data-type='compare'] [data-part-tick] {
452
+ border-inline-start-color: color-mix(in oklab, var(--_reference-color) 40%, transparent);
453
+ }
454
+
455
+ [data-ui-sparkline][data-type='compare'] [data-part-bar] {
456
+ background-color: var(--_color);
457
+ block-size: var(--_thickness);
458
+ inline-size: calc((var(--slotted-sparkline-to, 0) - var(--slotted-sparkline-from, 0)) * 100%);
459
+ inset-block-start: calc(50% - var(--_thickness) / 2);
460
+ inset-inline-start: calc(var(--slotted-sparkline-from, 0) * 100%);
461
+ position: absolute;
462
+ }
463
+
464
+ [data-ui-sparkline][data-type='compare'] [data-part-row][data-texture] [data-part-bar] {
465
+ background-image: var(--_texture);
466
+ box-shadow: inset 0 0 0 var(--slotted-border-width-thin, 1px) var(--_color);
467
+ }
468
+
469
+ /* The value stands past the bar's far end: after a positive bar, before a negative one. */
470
+ [data-ui-sparkline][data-type='compare'] [data-part-value] {
471
+ color: var(--slotted-text, CanvasText);
472
+ inset-block-start: 50%;
473
+ inset-inline-start: calc(
474
+ var(--slotted-sparkline-to, 0) * 100% + var(--slotted-space-3, 0.375rem)
475
+ );
476
+ position: absolute;
477
+ translate: 0 -50%;
478
+ white-space: nowrap;
479
+ }
480
+
481
+ [data-ui-sparkline][data-type='compare'] [data-part-row][data-negative] [data-part-value] {
482
+ inset-inline-end: calc(
483
+ (1 - var(--slotted-sparkline-from, 0)) * 100% + var(--slotted-space-3, 0.375rem)
484
+ );
485
+ inset-inline-start: auto;
486
+ }
487
+
488
+ /**
489
+ * Under forced colors a mix of two system colors is a color the mode does
490
+ * not have: the band and the dots take GrayText, the value and the bars
491
+ * CanvasText, and the texture is drawn in CanvasText over Canvas.
492
+ */
493
+ @media (forced-colors: active) {
494
+ [data-ui-sparkline][data-type='strip'] :is([data-part-band], [data-part-dot]) {
495
+ background-color: GrayText;
496
+ forced-color-adjust: none;
497
+ }
498
+
499
+ [data-ui-sparkline][data-type='strip'] [data-part-value],
500
+ [data-ui-sparkline][data-type='compare'] [data-part-bar] {
501
+ background-color: CanvasText;
502
+ forced-color-adjust: none;
503
+ }
504
+
505
+ [data-ui-sparkline][data-type='compare'] [data-part-row][data-texture] [data-part-bar] {
506
+ background-color: Canvas;
507
+ background-image: repeating-linear-gradient(-45deg, CanvasText 0 1px, Canvas 1px 4px);
508
+ box-shadow: inset 0 0 0 1px CanvasText;
509
+ }
510
+ }
304
511
  }
@@ -14,18 +14,25 @@
14
14
  "--slotted-duration-medium",
15
15
  "--slotted-duration-short",
16
16
  "--slotted-easing-standard",
17
+ "--slotted-font-size-xs",
18
+ "--slotted-line-height-sm",
19
+ "--slotted-radius-full",
17
20
  "--slotted-space-11",
18
21
  "--slotted-space-2",
19
22
  "--slotted-space-3",
20
23
  "--slotted-space-4",
24
+ "--slotted-space-5",
21
25
  "--slotted-space-7",
22
26
  "--slotted-space-9",
23
27
  "--slotted-sparkline-area-opacity",
24
28
  "--slotted-sparkline-bar-share",
29
+ "--slotted-sparkline-bar-thickness",
25
30
  "--slotted-sparkline-block-size",
26
31
  "--slotted-sparkline-block-size-lg",
27
32
  "--slotted-sparkline-block-size-sm",
28
33
  "--slotted-sparkline-color",
34
+ "--slotted-sparkline-end-size",
35
+ "--slotted-sparkline-label-size",
29
36
  "--slotted-sparkline-line-width",
30
37
  "--slotted-sparkline-line-width-sm",
31
38
  "--slotted-sparkline-marker-size",
@@ -36,7 +43,10 @@
36
43
  "--slotted-sparkline-ring-color",
37
44
  "--slotted-sparkline-ring-width",
38
45
  "--slotted-sparkline-ring-width-sm",
46
+ "--slotted-sparkline-value-size",
47
+ "--slotted-surface",
39
48
  "--slotted-surface-raised",
49
+ "--slotted-text",
40
50
  "--slotted-text-muted",
41
51
  "--slotted-tone-accent-text",
42
52
  "--slotted-tone-danger-text",
@@ -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)
@@ -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
- [data-ui-switch][data-part-root][data-invalid] > [data-part-track],
549
- [data-ui-switch][data-part-root][data-invalid] > [data-part-track] > [data-part-thumb] {
550
- border-color: var(--slotted-switch-invalid-border-color, var(--slotted-tone-danger-border));
551
- /*
552
- * Width as well as color (WCAG 1.4.1), the edge `text-field` draws: in
553
- * `high-contrast` the danger border is the resting edge's black. An edge
554
- * inside the border of the track and of the thumb, so neither moves, in
555
- * place of the thumb's resting lift; the thumb carries it where a checked
556
- * track's fill would hide the track's own.
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: inset 0 0 0 var(--_invalid-edge-width)
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",
@@ -242,6 +242,26 @@
242
242
  text-align: start;
243
243
  }
244
244
 
245
+ /* The name without the picture: a table under a heading that already names
246
+ it. The caption keeps naming the table and takes no box, so the space
247
+ above the header row is the space under the last row. */
248
+ /* Inside a frame the caption is the top of the same band as the header,
249
+ not a band of the table's surface above it. */
250
+ [data-ui-table][data-variant='framed'] [data-part-caption] {
251
+ background-color: var(--slotted-table-caption-surface, var(--_head-surface));
252
+ }
253
+
254
+ [data-ui-table] [data-part-caption][data-visually-hidden] {
255
+ block-size: 1px;
256
+ clip-path: inset(50%);
257
+ inline-size: 1px;
258
+ margin: -1px;
259
+ overflow: hidden;
260
+ padding: 0;
261
+ position: absolute;
262
+ white-space: nowrap;
263
+ }
264
+
245
265
  /**
246
266
  * ── The header ─────────────────────────────────────────────────────────
247
267
  *
@@ -297,6 +317,21 @@
297
317
  background-color: var(--_row-ground);
298
318
  }
299
319
 
320
+ /**
321
+ * In the body the cells paint the row's ground, not the row. A pinned cell
322
+ * paints that ground over its own surface, and above a row that painted it
323
+ * too a translucent ground showed twice on the pinned column: a hover of 6%
324
+ * read as 12% there. Each cell is one layer, pinned or not. `:where()` keeps
325
+ * the rule under every other ground a cell states.
326
+ */
327
+ [data-ui-table] [data-part-body] > [data-part-row] {
328
+ background-color: transparent;
329
+ }
330
+
331
+ [data-ui-table] :where([data-part-body] > [data-part-row] > *) {
332
+ background-color: var(--_row-ground);
333
+ }
334
+
300
335
  /**
301
336
  * ── Where a cell's content sits in its row ─────────────────────────────
302
337
  *
@@ -327,6 +362,12 @@
327
362
 
328
363
  [data-ui-table] [data-part-cell],
329
364
  [data-ui-table] [data-part-row-header] {
365
+ /* Published on the cell and not on the root, where the private values
366
+ read these two names: content drawn inside a cell reads the padding in
367
+ use, and an override set by the application still wins. */
368
+ --slotted-table-cell-padding-block: var(--_pad-block);
369
+ --slotted-table-cell-padding-inline: var(--_pad-inline);
370
+
330
371
  padding-block: var(--_pad-block);
331
372
  padding-inline: var(--_pad-inline);
332
373
  text-align: start;
@@ -576,6 +617,33 @@
576
617
  min-inline-size: 0;
577
618
  }
578
619
 
620
+ /*
621
+ * A table wider than its scroller kept the group's total at the end of the
622
+ * full table width, off screen until the reader scrolled all the way across,
623
+ * and the name left the view on the way. The band's ground and rule still
624
+ * span the table; its content is the scroller's width, pinned to its start,
625
+ * so the name and the total stay in view at every scroll position. The
626
+ * scroller is a size container only when it holds a group row.
627
+ */
628
+ [data-ui-table] [data-part-scroll]:has([data-part-group-row]) {
629
+ container-type: inline-size;
630
+ }
631
+
632
+ [data-ui-table]
633
+ [data-part-scroll]:has([data-part-group-row])
634
+ [data-part-group-row]
635
+ > [data-part-group-header] {
636
+ padding-inline: 0;
637
+ }
638
+
639
+ [data-ui-table] [data-part-scroll]:has([data-part-group-row]) [data-part-group-content] {
640
+ box-sizing: border-box;
641
+ inline-size: min(100cqi, 100%);
642
+ inset-inline-start: 0;
643
+ padding-inline: var(--_pad-inline);
644
+ position: sticky;
645
+ }
646
+
579
647
  [data-ui-table] [data-part-group-end] {
580
648
  font-variant-numeric: tabular-nums;
581
649
  text-align: end;
@@ -699,20 +767,19 @@
699
767
  * top, over the first rows. A `page` table inside a scrolling box of the
700
768
  * consumer's own sets the offset on that box, `0` for its top edge.
701
769
  */
702
- [data-ui-table][data-sticky-header] [data-part-column-header],
703
- /* The chooser's own header is a `selection` cell and not a `column-header`,
704
- and a rule naming only the second left the select-all scrolling away while
705
- every column beside it stayed. */
706
- [data-ui-table][data-sticky-header] [data-part-head] [data-part-selection] {
770
+ /* The `thead` is pinned as one element, not each cell: a backdrop filter
771
+ samples only inside the box that carries it, so a blur set per cell
772
+ restarted at every column boundary. Pinned as one, the head is the box a
773
+ theme blurs once (`--slotted-table-header-backdrop-filter`) and the
774
+ select-all moves with the columns beside it. */
775
+ [data-ui-table][data-sticky-header] [data-part-head] {
776
+ backdrop-filter: var(--slotted-table-header-backdrop-filter, none);
707
777
  inset-block-start: 0;
708
778
  position: sticky;
709
779
  z-index: calc(var(--slotted-z-index-sticky, 100) + 1);
710
780
  }
711
781
 
712
- [data-ui-table][data-sticky-to='page'][data-sticky-header] [data-part-column-header],
713
- [data-ui-table][data-sticky-to='page'][data-sticky-header]
714
- [data-part-head]
715
- [data-part-selection] {
782
+ [data-ui-table][data-sticky-to='page'][data-sticky-header] [data-part-head] {
716
783
  inset-block-start: var(--slotted-table-sticky-offset, 0);
717
784
  }
718
785
 
@@ -764,7 +831,7 @@
764
831
  var(--_pinned-ground, var(--_row-ground)),
765
832
  var(--_pinned-ground, var(--_row-ground))
766
833
  ),
767
- var(--slotted-table-sticky-surface, var(--slotted-surface, Canvas));
834
+ var(--slotted-table-sticky-surface, var(--slotted-ground, var(--slotted-surface, Canvas)));
768
835
  }
769
836
 
770
837
  [data-ui-table] [data-sticky='start'] {
@@ -1128,6 +1195,94 @@
1128
1195
  display: contents;
1129
1196
  }
1130
1197
 
1198
+ /**
1199
+ * ── Rows that fold their children ──────────────────────────────────────
1200
+ *
1201
+ * A row with a `level` is a node of a bounded hierarchy: accounts, folders,
1202
+ * cost centres. The first cell that is not the selection carries the
1203
+ * indent, and the indent and the guide are the `tree` family's: one step is
1204
+ * half the expander plus a step of the space scale, so the line one level up
1205
+ * sits on the expander's center and the row's own expander starts a fixed
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.
1208
+ *
1209
+ * The guide is one box per row with a line per ancestor level, through the
1210
+ * whole row and over the rule above it, so it stays continuous across rows
1211
+ * of any height. It turns no elbow at a last child, which is the rule the
1212
+ * `tree` family settled: a chain of only children drew a staircase of short
1213
+ * segments with a gap under each.
1214
+ */
1215
+ [data-ui-table] [data-part-row][data-level] {
1216
+ --_tree-step: var(
1217
+ --slotted-table-tree-indent,
1218
+ calc(var(--slotted-target-min, 24px) / 2 + var(--slotted-space-4, 0.5rem))
1219
+ );
1220
+ --_guide: var(
1221
+ --slotted-table-guide-color,
1222
+ color-mix(in oklab, var(--slotted-border-strong) 60%, var(--slotted-border-subtle))
1223
+ );
1224
+ }
1225
+
1226
+ [data-ui-table] [data-part-row][data-level] > :nth-child(1 of :not([data-part-selection])) {
1227
+ inline-size: auto;
1228
+ padding-inline-end: var(--_pad-inline);
1229
+ padding-inline-start: calc(
1230
+ var(--_pad-inline) + var(--_tree-step) * var(--slotted-table-depth, 0)
1231
+ );
1232
+ }
1233
+
1234
+ [data-ui-table]
1235
+ [data-part-row][data-level]
1236
+ > :nth-child(1 of :not([data-part-selection])):not(:has(> [data-part-expander])) {
1237
+ padding-inline-start: calc(
1238
+ var(--_pad-inline) + var(--_tree-step) * var(--slotted-table-depth, 0) +
1239
+ var(--slotted-target-min, 24px) + var(--_gap)
1240
+ );
1241
+ }
1242
+
1243
+ [data-ui-table]
1244
+ [data-part-row][data-level]
1245
+ > :nth-child(1 of :not([data-part-selection])):not([data-sticky]) {
1246
+ position: relative;
1247
+ }
1248
+
1249
+ [data-ui-table]
1250
+ [data-part-row][data-level]
1251
+ > :nth-child(1 of :not([data-part-selection]))::before {
1252
+ background-image: repeating-linear-gradient(
1253
+ to right,
1254
+ var(--_guide) 0 var(--_rule-width),
1255
+ transparent var(--_rule-width) var(--_tree-step)
1256
+ );
1257
+ content: '';
1258
+ inline-size: calc(var(--slotted-table-depth, 0) * var(--_tree-step));
1259
+ inset-block: calc(-1 * var(--_rule-width)) 0;
1260
+ inset-inline-start: calc(var(--_pad-inline) + var(--slotted-target-min, 24px) / 2);
1261
+ pointer-events: none;
1262
+ position: absolute;
1263
+ }
1264
+
1265
+ [data-ui-table]
1266
+ [data-part-row][data-level]
1267
+ > :nth-child(1 of :not([data-part-selection])):dir(rtl)::before {
1268
+ background-image: repeating-linear-gradient(
1269
+ to left,
1270
+ var(--_guide) 0 var(--_rule-width),
1271
+ transparent var(--_rule-width) var(--_tree-step)
1272
+ );
1273
+ }
1274
+
1275
+ [data-ui-table] [data-part-row][data-level] > * > [data-part-expander] {
1276
+ margin-inline-end: var(--_gap);
1277
+ vertical-align: top;
1278
+ }
1279
+
1280
+ [data-ui-table][data-guides='false']
1281
+ [data-part-row][data-level]
1282
+ > :nth-child(1 of :not([data-part-selection]))::before {
1283
+ background-image: none;
1284
+ }
1285
+
1131
1286
  /**
1132
1287
  * ── The expander ───────────────────────────────────────────────────────
1133
1288
  *
@@ -1654,8 +1809,7 @@
1654
1809
  overflow: visible;
1655
1810
  }
1656
1811
 
1657
- [data-ui-table][data-sticky-header] [data-part-column-header],
1658
- [data-ui-table][data-sticky-header] [data-part-head] [data-part-selection],
1812
+ [data-ui-table][data-sticky-header] [data-part-head],
1659
1813
  [data-ui-table][data-sticky-footer] [data-part-summary] > [data-part-row] > *,
1660
1814
  [data-ui-table] [data-sticky] {
1661
1815
  position: static;
@@ -26,12 +26,14 @@
26
26
  "--slotted-radius-sm",
27
27
  "--slotted-shadow-xs",
28
28
  "--slotted-space-2",
29
+ "--slotted-space-4",
29
30
  "--slotted-space-5",
30
31
  "--slotted-space-9",
31
32
  "--slotted-surface",
32
33
  "--slotted-table-border-color",
33
34
  "--slotted-table-border-color-strong",
34
35
  "--slotted-table-border-width",
36
+ "--slotted-table-caption-surface",
35
37
  "--slotted-table-cell-padding-block",
36
38
  "--slotted-table-cell-padding-inline",
37
39
  "--slotted-table-color",
@@ -45,6 +47,8 @@
45
47
  "--slotted-table-group-color",
46
48
  "--slotted-table-group-sticky-offset",
47
49
  "--slotted-table-group-surface",
50
+ "--slotted-table-guide-color",
51
+ "--slotted-table-header-backdrop-filter",
48
52
  "--slotted-table-header-surface",
49
53
  "--slotted-table-header-surface-hover",
50
54
  "--slotted-table-icon-size",
@@ -63,6 +67,7 @@
63
67
  "--slotted-table-sticky-offset-end",
64
68
  "--slotted-table-sticky-surface",
65
69
  "--slotted-table-surface",
70
+ "--slotted-table-tree-indent",
66
71
  "--slotted-target-comfortable",
67
72
  "--slotted-target-min",
68
73
  "--slotted-text",