@slotted/styles 0.1.0-beta.34 → 0.1.0-beta.36
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 +5 -1
- package/src/accordion/accordion.css +20 -2
- package/src/accordion/accordion.tokens.json +2 -0
- package/src/avatar/avatar.css +1 -1
- package/src/avatar/avatar.tokens.json +1 -0
- package/src/badge/badge.css +1 -1
- package/src/badge/badge.tokens.json +1 -0
- package/src/button/button.css +247 -4
- package/src/button/button.tokens.json +8 -0
- package/src/calendar/calendar.css +131 -0
- package/src/calendar/calendar.tokens.json +10 -0
- package/src/card/card.css +63 -3
- package/src/cascader/cascader.css +13 -0
- package/src/chart/chart.css +3 -3
- package/src/chart/chart.tokens.json +1 -0
- package/src/checkbox/checkbox.css +47 -0
- package/src/checkbox/checkbox.tokens.json +4 -0
- package/src/collapsible/collapsible.css +174 -5
- package/src/collapsible/collapsible.tokens.json +4 -0
- package/src/combobox/combobox.css +13 -0
- package/src/command-palette/command-palette.css +60 -1
- package/src/command-palette/command-palette.tokens.json +2 -0
- package/src/dashboard-grid/dashboard-grid.css +29 -9
- package/src/dashboard-grid/dashboard-grid.tokens.json +3 -1
- package/src/data-grid/data-grid.css +44 -5
- package/src/data-list/data-list.css +17 -11
- package/src/description-list/description-list.css +15 -1
- package/src/entity-picker/entity-picker.css +70 -1
- package/src/entity-picker/entity-picker.tokens.json +2 -0
- package/src/field-group/field-group.css +17 -7
- package/src/filter-bar/filter-bar.css +24 -0
- package/src/floating-panel/floating-panel.css +123 -0
- package/src/floating-panel/floating-panel.tokens.json +30 -0
- package/src/inline-message/inline-message.css +1 -1
- package/src/inline-message/inline-message.tokens.json +1 -0
- package/src/kbd/kbd.css +1 -1
- package/src/kbd/kbd.tokens.json +1 -0
- package/src/list/list.css +32 -1
- package/src/list/list.tokens.json +2 -0
- package/src/list-item/list-item.css +102 -7
- package/src/list-item/list-item.tokens.json +3 -0
- package/src/listbox/listbox.css +50 -2
- package/src/listbox/listbox.tokens.json +6 -0
- package/src/message/message.css +20 -0
- package/src/message/message.tokens.json +1 -0
- package/src/meter/meter.css +136 -0
- package/src/meter/meter.tokens.json +23 -0
- package/src/multi-select/multi-select.css +13 -0
- package/src/page/page.css +58 -4
- package/src/page/page.tokens.json +7 -0
- package/src/prompt-composer/prompt-composer.css +18 -7
- package/src/rating/rating.css +1 -1
- package/src/rating/rating.tokens.json +1 -0
- package/src/runtime-properties.mjs +19 -0
- package/src/section/section.css +61 -4
- package/src/section/section.tokens.json +6 -0
- package/src/segmented-control/segmented-control.css +11 -0
- package/src/select/select.css +13 -0
- package/src/side-navigation/side-navigation.css +3 -3
- package/src/side-navigation/side-navigation.tokens.json +1 -0
- package/src/slider/slider.css +7 -1
- package/src/slider/slider.tokens.json +1 -0
- package/src/stat-card/stat-card.css +5 -0
- package/src/status-indicator/status-indicator.css +3 -2
- package/src/switch/switch.css +49 -25
- package/src/switch/switch.tokens.json +4 -0
- package/src/table/table.css +166 -12
- package/src/table/table.tokens.json +5 -0
- package/src/tag/tag.css +4 -1
- package/src/tag/tag.tokens.json +1 -0
- package/src/toolbar/toolbar.css +16 -2
- package/src/toolbar/toolbar.tokens.json +2 -1
- package/src/tooltip/tooltip.css +30 -0
- package/src/top-navigation/top-navigation.css +1 -1
- package/src/top-navigation/top-navigation.tokens.json +1 -0
- package/src/typography/typography.css +25 -0
- 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.
|
|
3
|
+
"version": "0.1.0-beta.36",
|
|
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
|
/**
|
package/src/avatar/avatar.css
CHANGED
package/src/badge/badge.css
CHANGED
package/src/button/button.css
CHANGED
|
@@ -201,6 +201,11 @@
|
|
|
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. The
|
|
205
|
+
ground is the solid as a tint: a fixed dark step under the ink reads as a hole, not as danger. */
|
|
206
|
+
--_bare-edge: var(--slotted-tone-danger-border);
|
|
207
|
+
--_bare-hover: color-mix(in oklab, var(--slotted-tone-danger-solid) 12%, transparent);
|
|
208
|
+
--_bare-active: color-mix(in oklab, var(--slotted-tone-danger-solid) 20%, transparent);
|
|
204
209
|
}
|
|
205
210
|
|
|
206
211
|
/* ── Size: the control scale, one step of it per member instance ──────── */
|
|
@@ -273,7 +278,7 @@
|
|
|
273
278
|
*/
|
|
274
279
|
[data-ui-button][data-variant='outline'] {
|
|
275
280
|
background: transparent;
|
|
276
|
-
border-color: var(--slotted-control-border-color, ButtonBorder);
|
|
281
|
+
border-color: var(--_bare-edge, var(--slotted-control-border-color, ButtonBorder));
|
|
277
282
|
box-shadow: var(--slotted-control-shadow, none);
|
|
278
283
|
color: var(--_text, ButtonText);
|
|
279
284
|
}
|
|
@@ -369,7 +374,7 @@
|
|
|
369
374
|
[data-ui-button][data-variant='ghost']:hover:not(:disabled):not([data-disabled]):not(
|
|
370
375
|
[data-loading]
|
|
371
376
|
):not([data-pressed]) {
|
|
372
|
-
background: var(--slotted-tone-secondary-subtle-hover, ButtonFace);
|
|
377
|
+
background: var(--_bare-hover, var(--slotted-tone-secondary-subtle-hover, ButtonFace));
|
|
373
378
|
}
|
|
374
379
|
|
|
375
380
|
[data-ui-button][data-variant='outline']:active:not(:disabled):not([data-disabled]):not(
|
|
@@ -378,7 +383,7 @@
|
|
|
378
383
|
[data-ui-button][data-variant='ghost']:active:not(:disabled):not([data-disabled]):not(
|
|
379
384
|
[data-loading]
|
|
380
385
|
):not([data-pressed]) {
|
|
381
|
-
background: var(--slotted-tone-secondary-subtle-active, ButtonFace);
|
|
386
|
+
background: var(--_bare-active, var(--slotted-tone-secondary-subtle-active, ButtonFace));
|
|
382
387
|
transition-duration: var(--slotted-duration-instant);
|
|
383
388
|
}
|
|
384
389
|
|
|
@@ -719,7 +724,7 @@
|
|
|
719
724
|
@supports (text-box: trim-both cap alphabetic) {
|
|
720
725
|
[data-ui-button] [data-part-label] {
|
|
721
726
|
padding-block: calc((var(--slotted-line-height-sm, 1.45) * 1em - 0.75em) / 2);
|
|
722
|
-
text-box: trim-both cap alphabetic;
|
|
727
|
+
text-box: trim-both var(--slotted-text-box-edge, cap alphabetic);
|
|
723
728
|
}
|
|
724
729
|
}
|
|
725
730
|
|
|
@@ -742,6 +747,45 @@
|
|
|
742
747
|
inline-size: 100%;
|
|
743
748
|
}
|
|
744
749
|
|
|
750
|
+
/**
|
|
751
|
+
* ── Flush ──────────────────────────────────────────────────────────────
|
|
752
|
+
*
|
|
753
|
+
* A boxless button as the first line of a stacked cell: its label starts
|
|
754
|
+
* one inset after the line under it. `flush` pulls the button out by its own
|
|
755
|
+
* inset and edge on the stated side, so the label stands on the edge of the
|
|
756
|
+
* text around it and the hover ground, the target and the focus ring extend
|
|
757
|
+
* past that edge. The inset is the one in force: the glyph side's when a
|
|
758
|
+
* slot holds one.
|
|
759
|
+
*/
|
|
760
|
+
[data-ui-button]:not([data-shape], [data-inline]):is([data-flush='start'], [data-flush='both']) {
|
|
761
|
+
margin-inline-start: calc(
|
|
762
|
+
-1 * (var(--_padding-inline) + var(--slotted-control-border-width, 1px))
|
|
763
|
+
);
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
[data-ui-button]:not([data-shape], [data-inline]):is([data-flush='end'], [data-flush='both']) {
|
|
767
|
+
margin-inline-end: calc(
|
|
768
|
+
-1 * (var(--_padding-inline) + var(--slotted-control-border-width, 1px))
|
|
769
|
+
);
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
[data-ui-button]:not([data-shape], [data-inline]):is(
|
|
773
|
+
[data-flush='start'],
|
|
774
|
+
[data-flush='both']
|
|
775
|
+
):has(> [data-part-start]) {
|
|
776
|
+
margin-inline-start: calc(
|
|
777
|
+
-1 * (var(--_padding-inline-visual) + var(--slotted-control-border-width, 1px))
|
|
778
|
+
);
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
[data-ui-button]:not([data-shape], [data-inline]):is([data-flush='end'], [data-flush='both']):has(
|
|
782
|
+
> [data-part-end]
|
|
783
|
+
) {
|
|
784
|
+
margin-inline-end: calc(
|
|
785
|
+
-1 * (var(--_padding-inline-visual) + var(--slotted-control-border-width, 1px))
|
|
786
|
+
);
|
|
787
|
+
}
|
|
788
|
+
|
|
745
789
|
/**
|
|
746
790
|
* A field trigger: the label at the start and `end` at the inline end. The
|
|
747
791
|
* label takes the free space, so `start` stays beside it and the end slot is
|
|
@@ -762,6 +806,86 @@
|
|
|
762
806
|
min-inline-size: var(--_icon-size);
|
|
763
807
|
}
|
|
764
808
|
|
|
809
|
+
/**
|
|
810
|
+
* ── Widest ─────────────────────────────────────────────────────────────
|
|
811
|
+
*
|
|
812
|
+
* `widest` reserves the width of the whole content with the widest text the
|
|
813
|
+
* label can show, so a stepper's arrow stays under the pointer as the label
|
|
814
|
+
* changes. The control is a grid of one row: the start slot, the label and
|
|
815
|
+
* the end slot at their own widths, between two tracks that share the room
|
|
816
|
+
* left over, so what is visible is centered whatever is missing. `::before`
|
|
817
|
+
* crosses every track and gives the row its width: the texts from an
|
|
818
|
+
* attribute, one per line, with no height and no paint, so out of the
|
|
819
|
+
* accessible name and of the text content, and the room of a start and an
|
|
820
|
+
* end that are part of the control. A start that renders nothing is drawn at
|
|
821
|
+
* no width and stays in that room.
|
|
822
|
+
*
|
|
823
|
+
* shortcut: a slot wider than its icon box (a key) is reserved at the icon's
|
|
824
|
+
* width, reserve its own measure when a stepper holds one.
|
|
825
|
+
*/
|
|
826
|
+
[data-ui-button][data-widest] {
|
|
827
|
+
--_reserve-start: 0px;
|
|
828
|
+
--_reserve-end: 0px;
|
|
829
|
+
|
|
830
|
+
column-gap: 0;
|
|
831
|
+
display: inline-grid;
|
|
832
|
+
font-variant-numeric: tabular-nums;
|
|
833
|
+
grid-template-columns: minmax(0, 1fr) auto minmax(0, auto) auto minmax(0, 1fr);
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
[data-ui-button][data-widest]:has(> [data-part-start]) {
|
|
837
|
+
--_reserve-start: calc(var(--slotted-button-widest-start, var(--_icon-size)) + var(--_gap));
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
[data-ui-button][data-widest]:has(> [data-part-end]) {
|
|
841
|
+
--_reserve-end: calc(var(--_icon-size) + var(--_gap));
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
[data-ui-button][data-widest][data-justify='between'] {
|
|
845
|
+
grid-template-columns: 0 auto minmax(0, 1fr) auto 0;
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
/* One inset on both sides: the smaller one beside a glyph would move the center. */
|
|
849
|
+
[data-ui-button][data-widest]:not([data-shape], [data-inline]) {
|
|
850
|
+
padding-inline: var(--_padding-inline);
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
[data-ui-button][data-widest]::before {
|
|
854
|
+
block-size: 0;
|
|
855
|
+
box-sizing: border-box;
|
|
856
|
+
content: attr(data-widest);
|
|
857
|
+
grid-area: 1 / 1 / 2 / -1;
|
|
858
|
+
min-inline-size: 0;
|
|
859
|
+
overflow: hidden;
|
|
860
|
+
padding-inline: var(--_reserve-start) var(--_reserve-end);
|
|
861
|
+
visibility: hidden;
|
|
862
|
+
white-space: pre;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
[data-ui-button][data-widest] > [data-part-start] {
|
|
866
|
+
grid-area: 1 / 2;
|
|
867
|
+
margin-inline-end: var(--_gap);
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
/* As wide as the mark it holds, up to the glyph's box, so the group starts where the mark does. */
|
|
871
|
+
[data-ui-button][data-widest] > [data-part-start]:not(:has(> [data-ui-kbd])) {
|
|
872
|
+
inline-size: fit-content;
|
|
873
|
+
max-inline-size: var(--_icon-size);
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
[data-ui-button][data-widest] > [data-part-start]:empty {
|
|
877
|
+
display: none;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
[data-ui-button][data-widest] > [data-part-label] {
|
|
881
|
+
grid-area: 1 / 3;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
[data-ui-button][data-widest] > [data-part-end] {
|
|
885
|
+
grid-area: 1 / 4;
|
|
886
|
+
margin-inline-start: var(--_gap);
|
|
887
|
+
}
|
|
888
|
+
|
|
765
889
|
/**
|
|
766
890
|
* An icon-only control is square from the control height, so its visual box
|
|
767
891
|
* and its target are the same box. The two minimums are the WCAG 2.2 floor
|
|
@@ -782,6 +906,125 @@
|
|
|
782
906
|
border-radius: var(--slotted-radius-full, 9999px);
|
|
783
907
|
}
|
|
784
908
|
|
|
909
|
+
/**
|
|
910
|
+
* A text action inside a line — "show details" in a sentence, "split" in a
|
|
911
|
+
* dense table cell — is a word of that line. It takes the font, weight and
|
|
912
|
+
* line height around it, or the step of the text scale its `size` names, draws
|
|
913
|
+
* no box in any variant, stands on the baseline and is underlined in its tone's
|
|
914
|
+
* text color, so the row keeps its height and the word lines up with its
|
|
915
|
+
* neighbours. WCAG 2.5.8 exempts a target inside a sentence from the 24px
|
|
916
|
+
* minimum.
|
|
917
|
+
*/
|
|
918
|
+
[data-ui-button][data-inline]:not([data-shape]) {
|
|
919
|
+
background: transparent;
|
|
920
|
+
border-color: transparent;
|
|
921
|
+
border-radius: var(--slotted-radius-sm, 2px);
|
|
922
|
+
border-width: 0;
|
|
923
|
+
box-shadow: none;
|
|
924
|
+
color: var(--_text, LinkText);
|
|
925
|
+
font: inherit;
|
|
926
|
+
gap: 0.25em;
|
|
927
|
+
min-block-size: 0;
|
|
928
|
+
padding-inline: 0;
|
|
929
|
+
text-decoration-line: underline;
|
|
930
|
+
text-decoration-thickness: from-font;
|
|
931
|
+
text-underline-offset: 0.2em;
|
|
932
|
+
vertical-align: baseline;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
/* The root writes no size of its own here: only one the consumer stated. */
|
|
936
|
+
[data-ui-button][data-inline]:not([data-shape])[data-size='sm'] {
|
|
937
|
+
font-size: var(--slotted-font-size-sm, 0.8125rem);
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
[data-ui-button][data-inline]:not([data-shape])[data-size='md'] {
|
|
941
|
+
font-size: var(--slotted-font-size-md, 0.875rem);
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
[data-ui-button][data-inline]:not([data-shape])[data-size='lg'] {
|
|
945
|
+
font-size: var(--slotted-font-size-lg, 1rem);
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
[data-ui-button][data-inline]:not([data-shape]) [data-part-label] {
|
|
949
|
+
line-height: inherit;
|
|
950
|
+
padding-block: 0;
|
|
951
|
+
text-box: normal;
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
[data-ui-button][data-inline]:not([data-shape]):hover:not(:disabled):not([data-disabled]):not(
|
|
955
|
+
[data-loading]
|
|
956
|
+
):not([data-pressed]),
|
|
957
|
+
[data-ui-button][data-inline]:not([data-shape]):active:not(:disabled):not([data-disabled]):not(
|
|
958
|
+
[data-loading]
|
|
959
|
+
):not([data-pressed]) {
|
|
960
|
+
background: transparent;
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
[data-ui-button][data-inline]:not([data-shape]):disabled,
|
|
964
|
+
[data-ui-button][data-inline]:not([data-shape])[data-disabled] {
|
|
965
|
+
color: var(--slotted-disabled-foreground, GrayText);
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
/**
|
|
969
|
+
* An icon-only control inside a line of text — a help trigger beside a term
|
|
970
|
+
* — is that line tall, so the line does not grow. The box takes the text's
|
|
971
|
+
* line height and stands on the line box's top, and a pseudo-element outside
|
|
972
|
+
* layout keeps the target at the WCAG 2.2 minimum around it.
|
|
973
|
+
*/
|
|
974
|
+
[data-ui-button][data-shape][data-inline] {
|
|
975
|
+
block-size: 1lh;
|
|
976
|
+
font-size: inherit;
|
|
977
|
+
inline-size: 1lh;
|
|
978
|
+
line-height: inherit;
|
|
979
|
+
margin-inline-start: 0.25em;
|
|
980
|
+
min-block-size: 0;
|
|
981
|
+
min-inline-size: 0;
|
|
982
|
+
position: relative;
|
|
983
|
+
vertical-align: top;
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
[data-ui-button][data-shape][data-inline]::before {
|
|
987
|
+
content: '';
|
|
988
|
+
/* Measured from the padding edge, so the border is taken back as well. */
|
|
989
|
+
inset: calc(
|
|
990
|
+
min(0px, (1lh - var(--slotted-target-min, 24px)) / 2) -
|
|
991
|
+
var(--slotted-control-border-width, 1px)
|
|
992
|
+
);
|
|
993
|
+
position: absolute;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
/**
|
|
997
|
+
* In ghost it is a mark on the text rather than a control beside it: no
|
|
998
|
+
* ground under the pointer. In the secondary tone it is quieter than the
|
|
999
|
+
* term it explains, and takes the text color while it is being read.
|
|
1000
|
+
*/
|
|
1001
|
+
[data-ui-button][data-shape][data-inline][data-variant='ghost']:hover:not(:disabled):not(
|
|
1002
|
+
[data-disabled]
|
|
1003
|
+
):not([data-loading]):not([data-pressed]),
|
|
1004
|
+
[data-ui-button][data-shape][data-inline][data-variant='ghost']:active:not(:disabled):not(
|
|
1005
|
+
[data-disabled]
|
|
1006
|
+
):not([data-loading]):not([data-pressed]) {
|
|
1007
|
+
background: transparent;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
[data-ui-button][data-shape][data-inline][data-variant='ghost'][data-tone='secondary']:not(
|
|
1011
|
+
:disabled
|
|
1012
|
+
):not([data-disabled]):not([data-pressed]) {
|
|
1013
|
+
color: var(--slotted-text-muted, GrayText);
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
[data-ui-button][data-shape][data-inline][data-variant='ghost'][data-tone='secondary']:hover:not(
|
|
1017
|
+
:disabled
|
|
1018
|
+
):not([data-disabled]):not([data-loading]):not([data-pressed]),
|
|
1019
|
+
[data-ui-button][data-shape][data-inline][data-variant='ghost'][data-tone='secondary']:focus-visible:not(
|
|
1020
|
+
:disabled
|
|
1021
|
+
):not([data-disabled]):not([data-pressed]),
|
|
1022
|
+
[data-ui-button][data-shape][data-inline][data-variant='ghost'][data-tone='secondary'][data-open]:not(
|
|
1023
|
+
:disabled
|
|
1024
|
+
):not([data-disabled]):not([data-pressed]) {
|
|
1025
|
+
color: var(--slotted-text, CanvasText);
|
|
1026
|
+
}
|
|
1027
|
+
|
|
785
1028
|
/**
|
|
786
1029
|
* ── Forced colors ────────────────────────────────────────────────────
|
|
787
1030
|
*
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
[
|
|
2
2
|
"--slotted-border-subtle",
|
|
3
3
|
"--slotted-border-width-thin",
|
|
4
|
+
"--slotted-button-widest-start",
|
|
4
5
|
"--slotted-control-border-color",
|
|
5
6
|
"--slotted-control-border-width",
|
|
6
7
|
"--slotted-control-font-family",
|
|
@@ -34,10 +35,16 @@
|
|
|
34
35
|
"--slotted-focus-ring-color",
|
|
35
36
|
"--slotted-focus-ring-offset",
|
|
36
37
|
"--slotted-focus-ring-width",
|
|
38
|
+
"--slotted-font-size-lg",
|
|
39
|
+
"--slotted-font-size-md",
|
|
40
|
+
"--slotted-font-size-sm",
|
|
37
41
|
"--slotted-line-height-sm",
|
|
38
42
|
"--slotted-radius-full",
|
|
43
|
+
"--slotted-radius-sm",
|
|
39
44
|
"--slotted-space-2",
|
|
40
45
|
"--slotted-target-min",
|
|
46
|
+
"--slotted-text",
|
|
47
|
+
"--slotted-text-box-edge",
|
|
41
48
|
"--slotted-text-muted",
|
|
42
49
|
"--slotted-tone-accent-border",
|
|
43
50
|
"--slotted-tone-accent-on-solid",
|
|
@@ -47,6 +54,7 @@
|
|
|
47
54
|
"--slotted-tone-accent-subtle-active",
|
|
48
55
|
"--slotted-tone-accent-subtle-hover",
|
|
49
56
|
"--slotted-tone-accent-text",
|
|
57
|
+
"--slotted-tone-danger-border",
|
|
50
58
|
"--slotted-tone-danger-on-solid",
|
|
51
59
|
"--slotted-tone-danger-solid",
|
|
52
60
|
"--slotted-tone-danger-solid-active",
|
|
@@ -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.
|
|
284
|
-
|
|
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
|