@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slotted/styles",
3
- "version": "0.1.0-beta.33",
3
+ "version": "0.1.0-beta.35",
4
4
  "description": "Per-family stylesheets of Slotted, bundled by the React and Angular bindings.",
5
5
  "keywords": [
6
6
  "slotted",
@@ -165,6 +165,10 @@
165
165
  "./menu/tokens.json": "./src/menu/menu.tokens.json",
166
166
  "./menubar/menubar.css": "./src/menubar/menubar.css",
167
167
  "./menubar/tokens.json": "./src/menubar/menubar.tokens.json",
168
+ "./floating-panel/floating-panel.css": "./src/floating-panel/floating-panel.css",
169
+ "./floating-panel/tokens.json": "./src/floating-panel/floating-panel.tokens.json",
170
+ "./meter/meter.css": "./src/meter/meter.css",
171
+ "./meter/tokens.json": "./src/meter/meter.tokens.json",
168
172
  "./multi-select/multi-select.css": "./src/multi-select/multi-select.css",
169
173
  "./multi-select/tokens.json": "./src/multi-select/multi-select.tokens.json",
170
174
  "./navigation-menu/navigation-menu.css": "./src/navigation-menu/navigation-menu.css",
@@ -55,10 +55,28 @@
55
55
  */
56
56
  [data-ui-accordion][data-variant='framed'] {
57
57
  background-color: var(--slotted-accordion-surface, var(--slotted-surface-raised, Canvas));
58
- border: var(--_rule-size) solid
59
- var(--slotted-accordion-rule-color, var(--slotted-border-subtle, ButtonBorder));
60
58
  border-radius: var(--slotted-accordion-radius, var(--slotted-radius-md, 6px));
59
+ --_frame-edge: var(
60
+ --slotted-accordion-border-color,
61
+ var(--slotted-accordion-rule-color, var(--slotted-border-subtle, ButtonBorder))
62
+ );
63
+
64
+ box-shadow: var(--slotted-accordion-shadow, none);
61
65
  overflow: clip;
66
+ /* The containing block of the edge. */
67
+ position: relative;
68
+ }
69
+
70
+ /* The edge, drawn as a card's is (collapsible records why), in a color of
71
+ its own rather than the inner rules'. */
72
+ [data-ui-accordion][data-variant='framed']::before {
73
+ border: var(--_rule-size) solid var(--_frame-edge);
74
+ border-radius: inherit;
75
+ content: '';
76
+ inset: 0;
77
+ pointer-events: none;
78
+ position: absolute;
79
+ z-index: 1;
62
80
  }
63
81
 
64
82
  /**
@@ -1,7 +1,9 @@
1
1
  [
2
+ "--slotted-accordion-border-color",
2
3
  "--slotted-accordion-gap",
3
4
  "--slotted-accordion-radius",
4
5
  "--slotted-accordion-rule-color",
6
+ "--slotted-accordion-shadow",
5
7
  "--slotted-accordion-surface",
6
8
  "--slotted-border-subtle",
7
9
  "--slotted-border-width-thin",
@@ -407,7 +407,7 @@
407
407
  align-content: center;
408
408
  display: block;
409
409
  text-align: center;
410
- text-box: trim-both cap alphabetic;
410
+ text-box: trim-both var(--slotted-text-box-edge, cap alphabetic);
411
411
  }
412
412
  }
413
413
 
@@ -38,6 +38,7 @@
38
38
  "--slotted-radius-full",
39
39
  "--slotted-surface",
40
40
  "--slotted-target-min",
41
+ "--slotted-text-box-edge",
41
42
  "--slotted-tone-accent-border",
42
43
  "--slotted-tone-accent-on-solid",
43
44
  "--slotted-tone-accent-solid",
@@ -322,7 +322,7 @@
322
322
  */
323
323
  margin-block: -0.3em;
324
324
  padding-block: 0.3em;
325
- text-box: trim-both cap alphabetic;
325
+ text-box: trim-both var(--slotted-text-box-edge, cap alphabetic);
326
326
  }
327
327
  }
328
328
 
@@ -30,6 +30,7 @@
30
30
  "--slotted-space-4",
31
31
  "--slotted-space-5",
32
32
  "--slotted-surface",
33
+ "--slotted-text-box-edge",
33
34
  "--slotted-tone-accent-border",
34
35
  "--slotted-tone-accent-on-solid",
35
36
  "--slotted-tone-accent-solid",
@@ -201,6 +201,10 @@
201
201
  --_solid-active: var(--slotted-tone-danger-solid-active);
202
202
  --_on-solid: var(--slotted-tone-danger-on-solid);
203
203
  --_text: var(--slotted-tone-danger-text);
204
+ /* A destructive action is the one bare control that leaves the neutral edge and ground. */
205
+ --_bare-edge: var(--slotted-tone-danger-border);
206
+ --_bare-hover: var(--slotted-tone-danger-subtle-hover);
207
+ --_bare-active: var(--slotted-tone-danger-subtle-active);
204
208
  }
205
209
 
206
210
  /* ── Size: the control scale, one step of it per member instance ──────── */
@@ -273,7 +277,7 @@
273
277
  */
274
278
  [data-ui-button][data-variant='outline'] {
275
279
  background: transparent;
276
- border-color: var(--slotted-control-border-color, ButtonBorder);
280
+ border-color: var(--_bare-edge, var(--slotted-control-border-color, ButtonBorder));
277
281
  box-shadow: var(--slotted-control-shadow, none);
278
282
  color: var(--_text, ButtonText);
279
283
  }
@@ -369,7 +373,7 @@
369
373
  [data-ui-button][data-variant='ghost']:hover:not(:disabled):not([data-disabled]):not(
370
374
  [data-loading]
371
375
  ):not([data-pressed]) {
372
- background: var(--slotted-tone-secondary-subtle-hover, ButtonFace);
376
+ background: var(--_bare-hover, var(--slotted-tone-secondary-subtle-hover, ButtonFace));
373
377
  }
374
378
 
375
379
  [data-ui-button][data-variant='outline']:active:not(:disabled):not([data-disabled]):not(
@@ -378,7 +382,7 @@
378
382
  [data-ui-button][data-variant='ghost']:active:not(:disabled):not([data-disabled]):not(
379
383
  [data-loading]
380
384
  ):not([data-pressed]) {
381
- background: var(--slotted-tone-secondary-subtle-active, ButtonFace);
385
+ background: var(--_bare-active, var(--slotted-tone-secondary-subtle-active, ButtonFace));
382
386
  transition-duration: var(--slotted-duration-instant);
383
387
  }
384
388
 
@@ -692,6 +696,42 @@
692
696
  white-space: nowrap;
693
697
  }
694
698
 
699
+ /**
700
+ * `widest` reserves the width of the widest text the label can show, so a
701
+ * stepper's arrow stays under the pointer as the label changes. The label is
702
+ * one grid cell holding the visible text and, under it, `::before`: the texts
703
+ * from an attribute, one per line, with no height and no paint, so out of
704
+ * the accessible name and of the text content. The cell is as wide as the
705
+ * widest and as tall as the text. The text keeps its own block, which is
706
+ * what the trim below reads, and its digits take tabular figures.
707
+ */
708
+ [data-ui-button] [data-part-label][data-widest] {
709
+ display: grid;
710
+ font-variant-numeric: tabular-nums;
711
+ justify-items: center;
712
+ }
713
+
714
+ [data-ui-button] [data-part-label][data-widest] > [data-label-text],
715
+ [data-ui-button] [data-part-label][data-widest]::before {
716
+ grid-area: 1 / 1;
717
+ min-inline-size: 0;
718
+ overflow: hidden;
719
+ text-overflow: ellipsis;
720
+ white-space: nowrap;
721
+ }
722
+
723
+ [data-ui-button] [data-part-label][data-widest] > [data-label-text] {
724
+ display: block;
725
+ max-inline-size: 100%;
726
+ }
727
+
728
+ [data-ui-button] [data-part-label][data-widest]::before {
729
+ block-size: 0;
730
+ content: attr(data-widest);
731
+ visibility: hidden;
732
+ white-space: pre;
733
+ }
734
+
695
735
  /**
696
736
  * A flex container centers the line box, and a line box is not symmetric
697
737
  * around the letters inside it. Measured on this family, the word sat 1.2
@@ -719,7 +759,19 @@
719
759
  @supports (text-box: trim-both cap alphabetic) {
720
760
  [data-ui-button] [data-part-label] {
721
761
  padding-block: calc((var(--slotted-line-height-sm, 1.45) * 1em - 0.75em) / 2);
722
- text-box: trim-both cap alphabetic;
762
+ text-box: trim-both var(--slotted-text-box-edge, cap alphabetic);
763
+ }
764
+
765
+ /* Under widest the label is a grid, which nothing trims: the text's own
766
+ block takes the trim and the padding. */
767
+ [data-ui-button] [data-part-label][data-widest] {
768
+ padding-block: 0;
769
+ text-box: normal;
770
+ }
771
+
772
+ [data-ui-button] [data-part-label][data-widest] > [data-label-text] {
773
+ padding-block: calc((var(--slotted-line-height-sm, 1.45) * 1em - 0.75em) / 2);
774
+ text-box: trim-both var(--slotted-text-box-edge, cap alphabetic);
723
775
  }
724
776
  }
725
777
 
@@ -742,6 +794,45 @@
742
794
  inline-size: 100%;
743
795
  }
744
796
 
797
+ /**
798
+ * ── Flush ──────────────────────────────────────────────────────────────
799
+ *
800
+ * A boxless button as the first line of a stacked cell: its label starts
801
+ * one inset after the line under it. `flush` pulls the button out by its own
802
+ * inset and edge on the stated side, so the label stands on the edge of the
803
+ * text around it and the hover ground, the target and the focus ring extend
804
+ * past that edge. The inset is the one in force: the glyph side's when a
805
+ * slot holds one.
806
+ */
807
+ [data-ui-button]:not([data-shape], [data-inline]):is([data-flush='start'], [data-flush='both']) {
808
+ margin-inline-start: calc(
809
+ -1 * (var(--_padding-inline) + var(--slotted-control-border-width, 1px))
810
+ );
811
+ }
812
+
813
+ [data-ui-button]:not([data-shape], [data-inline]):is([data-flush='end'], [data-flush='both']) {
814
+ margin-inline-end: calc(
815
+ -1 * (var(--_padding-inline) + var(--slotted-control-border-width, 1px))
816
+ );
817
+ }
818
+
819
+ [data-ui-button]:not([data-shape], [data-inline]):is(
820
+ [data-flush='start'],
821
+ [data-flush='both']
822
+ ):has(> [data-part-start]) {
823
+ margin-inline-start: calc(
824
+ -1 * (var(--_padding-inline-visual) + var(--slotted-control-border-width, 1px))
825
+ );
826
+ }
827
+
828
+ [data-ui-button]:not([data-shape], [data-inline]):is([data-flush='end'], [data-flush='both']):has(
829
+ > [data-part-end]
830
+ ) {
831
+ margin-inline-end: calc(
832
+ -1 * (var(--_padding-inline-visual) + var(--slotted-control-border-width, 1px))
833
+ );
834
+ }
835
+
745
836
  /**
746
837
  * A field trigger: the label at the start and `end` at the inline end. The
747
838
  * label takes the free space, so `start` stays beside it and the end slot is
@@ -782,6 +873,79 @@
782
873
  border-radius: var(--slotted-radius-full, 9999px);
783
874
  }
784
875
 
876
+ /**
877
+ * A text action inside a line — "show details" in a sentence, "split" in a
878
+ * dense table cell — is a word of that line. It takes the font, weight and
879
+ * line height around it, draws no box in any variant, stands on the
880
+ * baseline and is underlined in its tone's text color, so the row keeps its
881
+ * height and the word lines up with its neighbours. WCAG 2.5.8 exempts a
882
+ * target inside a sentence from the 24px minimum.
883
+ */
884
+ [data-ui-button][data-inline]:not([data-shape]) {
885
+ background: transparent;
886
+ border-color: transparent;
887
+ border-radius: var(--slotted-radius-sm, 2px);
888
+ border-width: 0;
889
+ box-shadow: none;
890
+ color: var(--_text, LinkText);
891
+ font: inherit;
892
+ gap: 0.25em;
893
+ min-block-size: 0;
894
+ padding-inline: 0;
895
+ text-decoration-line: underline;
896
+ text-decoration-thickness: from-font;
897
+ text-underline-offset: 0.2em;
898
+ vertical-align: baseline;
899
+ }
900
+
901
+ [data-ui-button][data-inline]:not([data-shape]) [data-part-label] {
902
+ line-height: inherit;
903
+ padding-block: 0;
904
+ text-box: normal;
905
+ }
906
+
907
+ [data-ui-button][data-inline]:not([data-shape]):hover:not(:disabled):not([data-disabled]):not(
908
+ [data-loading]
909
+ ):not([data-pressed]),
910
+ [data-ui-button][data-inline]:not([data-shape]):active:not(:disabled):not([data-disabled]):not(
911
+ [data-loading]
912
+ ):not([data-pressed]) {
913
+ background: transparent;
914
+ }
915
+
916
+ [data-ui-button][data-inline]:not([data-shape]):disabled,
917
+ [data-ui-button][data-inline]:not([data-shape])[data-disabled] {
918
+ color: var(--slotted-disabled-foreground, GrayText);
919
+ }
920
+
921
+ /**
922
+ * An icon-only control inside a line of text — a help trigger beside a term
923
+ * — is that line tall, so the line does not grow. The box takes the text's
924
+ * line height and stands on the line box's top, and a pseudo-element outside
925
+ * layout keeps the target at the WCAG 2.2 minimum around it.
926
+ */
927
+ [data-ui-button][data-shape][data-inline] {
928
+ block-size: 1lh;
929
+ font-size: inherit;
930
+ inline-size: 1lh;
931
+ line-height: inherit;
932
+ margin-inline-start: 0.25em;
933
+ min-block-size: 0;
934
+ min-inline-size: 0;
935
+ position: relative;
936
+ vertical-align: top;
937
+ }
938
+
939
+ [data-ui-button][data-shape][data-inline]::before {
940
+ content: '';
941
+ /* Measured from the padding edge, so the border is taken back as well. */
942
+ inset: calc(
943
+ min(0px, (1lh - var(--slotted-target-min, 24px)) / 2) -
944
+ var(--slotted-control-border-width, 1px)
945
+ );
946
+ position: absolute;
947
+ }
948
+
785
949
  /**
786
950
  * ── Forced colors ────────────────────────────────────────────────────
787
951
  *
@@ -36,8 +36,10 @@
36
36
  "--slotted-focus-ring-width",
37
37
  "--slotted-line-height-sm",
38
38
  "--slotted-radius-full",
39
+ "--slotted-radius-sm",
39
40
  "--slotted-space-2",
40
41
  "--slotted-target-min",
42
+ "--slotted-text-box-edge",
41
43
  "--slotted-text-muted",
42
44
  "--slotted-tone-accent-border",
43
45
  "--slotted-tone-accent-on-solid",
@@ -47,10 +49,13 @@
47
49
  "--slotted-tone-accent-subtle-active",
48
50
  "--slotted-tone-accent-subtle-hover",
49
51
  "--slotted-tone-accent-text",
52
+ "--slotted-tone-danger-border",
50
53
  "--slotted-tone-danger-on-solid",
51
54
  "--slotted-tone-danger-solid",
52
55
  "--slotted-tone-danger-solid-active",
53
56
  "--slotted-tone-danger-solid-hover",
57
+ "--slotted-tone-danger-subtle-active",
58
+ "--slotted-tone-danger-subtle-hover",
54
59
  "--slotted-tone-danger-text",
55
60
  "--slotted-tone-info-on-solid",
56
61
  "--slotted-tone-info-solid",
@@ -873,4 +873,135 @@
873
873
  border-block-style: dashed;
874
874
  }
875
875
  }
876
+
877
+ /* ── Content in a day ─────────────────────────────────────────────────
878
+ *
879
+ * `layout="fill"` shares the inline size between the seven columns and
880
+ * takes the row height from `--slotted-calendar-day-height`, so a month
881
+ * view with content in its days fills its column instead of leaving the
882
+ * rest of it empty. The day keeps its states; its content stacks under the
883
+ * number: the marks, one per record, and a one-line figure at the end.
884
+ */
885
+ [data-ui-calendar][data-layout='fill'] {
886
+ inline-size: 100%;
887
+ }
888
+
889
+ [data-ui-calendar][data-layout='fill'] :is([data-part-grids], [data-part-grid]) {
890
+ inline-size: 100%;
891
+ }
892
+
893
+ [data-ui-calendar][data-layout='fill'] :is([data-part-week-header], [data-part-cell]) {
894
+ inline-size: auto;
895
+ }
896
+
897
+ [data-ui-calendar][data-layout='fill'] [data-part-day] {
898
+ block-size: calc(
899
+ var(--slotted-calendar-day-height, calc(var(--_cell-size) * 2)) - var(--_inset) * 2
900
+ );
901
+ inline-size: auto;
902
+ justify-content: start;
903
+ padding-block: var(--slotted-space-2, 0.25rem);
904
+ }
905
+
906
+ [data-ui-calendar] [data-part-day-content] {
907
+ align-items: center;
908
+ display: flex;
909
+ flex-direction: column;
910
+ gap: var(--slotted-space-1, 0.125rem);
911
+ inline-size: 100%;
912
+ min-inline-size: 0;
913
+ order: 2;
914
+ }
915
+
916
+ [data-ui-calendar] [data-part-day-marks] {
917
+ display: flex;
918
+ flex-wrap: wrap;
919
+ gap: var(--slotted-space-1, 0.125rem);
920
+ justify-content: center;
921
+ }
922
+
923
+ [data-ui-calendar] [data-part-day-mark] {
924
+ --_mark: var(--slotted-tone-accent-solid, currentcolor);
925
+
926
+ background-color: var(--_mark);
927
+ block-size: var(--slotted-space-3, 0.375rem);
928
+ border: var(--slotted-border-width-thin, 1px) solid var(--_mark);
929
+ border-radius: var(--slotted-radius-full, 9999px);
930
+ box-sizing: border-box;
931
+ inline-size: var(--slotted-space-3, 0.375rem);
932
+ }
933
+
934
+ [data-ui-calendar] [data-part-day-mark][data-hollow] {
935
+ background-color: transparent;
936
+ }
937
+
938
+ [data-ui-calendar] [data-part-day-mark][data-tone='info'] {
939
+ --_mark: var(--slotted-tone-info-solid, currentcolor);
940
+ }
941
+
942
+ [data-ui-calendar] [data-part-day-mark][data-tone='success'] {
943
+ --_mark: var(--slotted-tone-success-solid, currentcolor);
944
+ }
945
+
946
+ [data-ui-calendar] [data-part-day-mark][data-tone='warning'] {
947
+ --_mark: var(--slotted-tone-warning-solid, currentcolor);
948
+ }
949
+
950
+ [data-ui-calendar] [data-part-day-mark][data-tone='danger'] {
951
+ --_mark: var(--slotted-tone-danger-solid, currentcolor);
952
+ }
953
+
954
+ [data-ui-calendar] [data-part-day-mark][data-tone='data-1'] {
955
+ --_mark: var(--slotted-data-1);
956
+ }
957
+ [data-ui-calendar] [data-part-day-mark][data-tone='data-2'] {
958
+ --_mark: var(--slotted-data-2);
959
+ }
960
+ [data-ui-calendar] [data-part-day-mark][data-tone='data-3'] {
961
+ --_mark: var(--slotted-data-3);
962
+ }
963
+ [data-ui-calendar] [data-part-day-mark][data-tone='data-4'] {
964
+ --_mark: var(--slotted-data-4);
965
+ }
966
+ [data-ui-calendar] [data-part-day-mark][data-tone='data-5'] {
967
+ --_mark: var(--slotted-data-5);
968
+ }
969
+ [data-ui-calendar] [data-part-day-mark][data-tone='data-6'] {
970
+ --_mark: var(--slotted-data-6);
971
+ }
972
+ [data-ui-calendar] [data-part-day-mark][data-tone='data-7'] {
973
+ --_mark: var(--slotted-data-7);
974
+ }
975
+ [data-ui-calendar] [data-part-day-mark][data-tone='data-8'] {
976
+ --_mark: var(--slotted-data-8);
977
+ }
978
+
979
+ [data-ui-calendar] [data-part-day-value] {
980
+ align-self: end;
981
+ font-size: var(--slotted-font-size-xs, 0.75rem);
982
+ font-variant-numeric: tabular-nums;
983
+ max-inline-size: 100%;
984
+ overflow: hidden;
985
+ padding-inline: var(--slotted-space-2, 0.25rem);
986
+ text-overflow: ellipsis;
987
+ white-space: nowrap;
988
+ }
989
+
990
+ /* A figure cut to a digit says nothing: below this width only the marks stay. */
991
+ @container slotted-calendar (max-inline-size: 28rem) {
992
+ [data-ui-calendar] [data-part-day-value] {
993
+ display: none;
994
+ }
995
+ }
996
+
997
+ @media (forced-colors: active) {
998
+ [data-ui-calendar] [data-part-day-mark] {
999
+ background-color: CanvasText;
1000
+ border-color: CanvasText;
1001
+ }
1002
+
1003
+ [data-ui-calendar] [data-part-day-mark][data-hollow] {
1004
+ background-color: transparent;
1005
+ }
1006
+ }
876
1007
  }
@@ -5,6 +5,7 @@
5
5
  "--slotted-calendar-background",
6
6
  "--slotted-calendar-cell-size",
7
7
  "--slotted-calendar-color",
8
+ "--slotted-calendar-day-height",
8
9
  "--slotted-calendar-day-radius",
9
10
  "--slotted-calendar-disabled-color",
10
11
  "--slotted-calendar-hover-background",
@@ -36,6 +37,14 @@
36
37
  "--slotted-control-radius",
37
38
  "--slotted-control-transition-duration",
38
39
  "--slotted-control-transition-easing",
40
+ "--slotted-data-1",
41
+ "--slotted-data-2",
42
+ "--slotted-data-3",
43
+ "--slotted-data-4",
44
+ "--slotted-data-5",
45
+ "--slotted-data-6",
46
+ "--slotted-data-7",
47
+ "--slotted-data-8",
39
48
  "--slotted-disabled-background",
40
49
  "--slotted-disabled-foreground",
41
50
  "--slotted-focus-ring-color",
@@ -51,6 +60,7 @@
51
60
  "--slotted-radius-sm",
52
61
  "--slotted-space-1",
53
62
  "--slotted-space-2",
63
+ "--slotted-space-3",
54
64
  "--slotted-space-4",
55
65
  "--slotted-space-6",
56
66
  "--slotted-target-min",
package/src/card/card.css CHANGED
@@ -255,6 +255,28 @@
255
255
  padding-block-end: var(--_card-inset-block);
256
256
  }
257
257
 
258
+ /**
259
+ * A body that bleeds: its children run from one edge of the card to the
260
+ * other, for a list whose rules reach the edge and whose rows take the full
261
+ * width for their ground. The body gives up its padding, as the media does,
262
+ * and is clipped to the corners of the card it touches. The edge is drawn
263
+ * over the box, so a row's ground passes under it.
264
+ */
265
+ [data-ui-card] > [data-part-body][data-bleed] {
266
+ overflow: clip;
267
+ padding: 0;
268
+ }
269
+
270
+ [data-ui-card]:not([data-orientation='horizontal']) > [data-part-body][data-bleed]:first-child {
271
+ border-start-end-radius: var(--_card-radius);
272
+ border-start-start-radius: var(--_card-radius);
273
+ }
274
+
275
+ [data-ui-card]:not([data-orientation='horizontal']) > [data-part-body][data-bleed]:last-child {
276
+ border-end-end-radius: var(--_card-radius);
277
+ border-end-start-radius: var(--_card-radius);
278
+ }
279
+
258
280
  /**
259
281
  * The header stacks a title and the line that supports it in the first
260
282
  * column, and keeps a second column for whatever belongs in the corner: a
@@ -280,9 +302,8 @@
280
302
  min-inline-size: 0;
281
303
  }
282
304
 
283
- /* The corner. It stays on the first row, so a title that wraps to two lines
284
- does not drag the badge down with it, and it takes the last column whether
285
- the header has two or three. */
305
+ /* The corner. Beside a title alone it stays on the first row, and it takes
306
+ the last column whether the header has two or three. */
286
307
  [data-ui-card] > [data-part-header] > [data-part-actions] {
287
308
  align-items: center;
288
309
  display: flex;
@@ -298,6 +319,45 @@
298
319
  position: relative;
299
320
  }
300
321
 
322
+ /* Beside a title and its description, the corner spans both rows, and the
323
+ last row is flexible: a corner taller than the text grows that row, not
324
+ the distance from the title to the description. */
325
+ [data-ui-card]
326
+ > [data-part-header]:has(
327
+ > :not([data-part-actions], [data-part-selection])
328
+ ~ :not([data-part-actions], [data-part-selection])
329
+ ) {
330
+ grid-template-rows: auto 1fr;
331
+ }
332
+
333
+ [data-ui-card]
334
+ > [data-part-header]:has(
335
+ > :not([data-part-actions], [data-part-selection])
336
+ ~ :not([data-part-actions], [data-part-selection])
337
+ )
338
+ > [data-part-actions] {
339
+ grid-row: 1 / span 2;
340
+ }
341
+
342
+ [data-ui-card]
343
+ > [data-part-header]:has(
344
+ > :not([data-part-actions], [data-part-selection])
345
+ ~ :not([data-part-actions], [data-part-selection])
346
+ ~ :not([data-part-actions], [data-part-selection])
347
+ ) {
348
+ grid-template-rows: auto auto 1fr;
349
+ }
350
+
351
+ [data-ui-card]
352
+ > [data-part-header]:has(
353
+ > :not([data-part-actions], [data-part-selection])
354
+ ~ :not([data-part-actions], [data-part-selection])
355
+ ~ :not([data-part-actions], [data-part-selection])
356
+ )
357
+ > [data-part-actions] {
358
+ grid-row: 1 / span 3;
359
+ }
360
+
301
361
  /**
302
362
  * The place a choice card keeps for its control. It is the slot and not the
303
363
  * glyph: `checkbox radio-group` owns where a check and a dot are drawn, and a
@@ -1299,6 +1299,19 @@
1299
1299
  display: none;
1300
1300
  }
1301
1301
 
1302
+ /* Beside the empty message the status says the same thing to the eye. It
1303
+ stays the live region that announces the count, clipped to one pixel. */
1304
+ [data-ui-cascader] [data-part-empty] ~ [data-part-status] {
1305
+ block-size: 1px;
1306
+ clip-path: inset(50%);
1307
+ inline-size: 1px;
1308
+ min-inline-size: 0;
1309
+ overflow: hidden;
1310
+ padding: 0;
1311
+ position: absolute;
1312
+ white-space: nowrap;
1313
+ }
1314
+
1302
1315
  /* ── Forced colors ───────────────────────────────────────────────────── */
1303
1316
 
1304
1317
  @media (forced-colors: active) {
@@ -191,7 +191,7 @@
191
191
  align-content: start;
192
192
  display: grid;
193
193
  flex: 1 1 auto;
194
- gap: var(--slotted-space-1, 0.125rem);
194
+ gap: var(--slotted-chart-header-gap, var(--slotted-space-1, 0.125rem));
195
195
  min-inline-size: 0;
196
196
  }
197
197
 
@@ -243,8 +243,8 @@
243
243
  [data-ui-chart][data-variant='card'] > [data-part-header] > :first-child {
244
244
  min-block-size: calc(
245
245
  var(--slotted-font-size-md, 0.875rem) * var(--slotted-line-height-md, 1.5) +
246
- var(--slotted-space-1, 0.125rem) + var(--slotted-font-size-sm, 0.8125rem) *
247
- var(--slotted-line-height-sm, 1.45)
246
+ var(--slotted-chart-header-gap, var(--slotted-space-1, 0.125rem)) +
247
+ var(--slotted-font-size-sm, 0.8125rem) * var(--slotted-line-height-sm, 1.45)
248
248
  );
249
249
  }
250
250
 
@@ -23,6 +23,7 @@
23
23
  "--slotted-chart-focus-color",
24
24
  "--slotted-chart-gap",
25
25
  "--slotted-chart-grid-color",
26
+ "--slotted-chart-header-gap",
26
27
  "--slotted-chart-inset",
27
28
  "--slotted-chart-label-color",
28
29
  "--slotted-chart-label-size",