@slotted/styles 0.1.0-beta.4 → 0.1.0-beta.40
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 +21 -1
- package/src/accordion/accordion.css +31 -13
- package/src/accordion/accordion.tokens.json +2 -0
- package/src/action-bar/action-bar.css +47 -44
- package/src/action-bar/action-bar.tokens.json +1 -0
- package/src/action-sheet/action-sheet.css +39 -39
- package/src/alert/alert.css +97 -97
- package/src/alert/alert.tokens.json +6 -1
- package/src/app-shell/app-shell.css +472 -342
- package/src/app-shell/app-shell.tokens.json +6 -3
- package/src/aspect-ratio/aspect-ratio.css +24 -23
- package/src/attachment/attachment.css +118 -114
- package/src/avatar/avatar.css +97 -67
- package/src/avatar/avatar.tokens.json +8 -0
- package/src/avatar-group/avatar-group.css +22 -23
- package/src/badge/badge.css +58 -47
- package/src/badge/badge.tokens.json +6 -0
- package/src/breadcrumb/breadcrumb.css +52 -52
- package/src/button/button.css +408 -93
- package/src/button/button.tokens.json +13 -0
- package/src/button-group/button-group.css +80 -79
- package/src/button-group/button-group.tokens.json +1 -0
- package/src/calendar/calendar.css +594 -267
- package/src/calendar/calendar.tokens.json +35 -3
- package/src/card/card.css +133 -70
- package/src/card/card.tokens.json +1 -0
- package/src/carousel/carousel.css +158 -169
- package/src/cascader/cascader.css +174 -159
- package/src/cascader/cascader.tokens.json +2 -0
- package/src/chart/chart.css +300 -271
- package/src/chart/chart.tokens.json +5 -0
- package/src/checkbox/checkbox.css +190 -148
- package/src/checkbox/checkbox.tokens.json +4 -0
- package/src/checkbox-group/checkbox-group.css +7 -7
- package/src/clock/clock.css +246 -0
- package/src/clock/clock.tokens.json +44 -0
- package/src/code-block/code-block.css +85 -89
- package/src/collapsible/collapsible.css +273 -85
- package/src/collapsible/collapsible.tokens.json +6 -0
- package/src/color-picker/color-picker.css +106 -114
- package/src/column-manager/column-manager.css +111 -119
- package/src/combobox/combobox.css +219 -132
- package/src/combobox/combobox.tokens.json +4 -0
- package/src/command-palette/command-palette.css +214 -102
- package/src/command-palette/command-palette.tokens.json +4 -0
- package/src/container/container.css +27 -27
- package/src/context-menu/context-menu.css +9 -9
- package/src/currency-field/currency-field.css +119 -119
- package/src/currency-field/currency-field.tokens.json +1 -0
- package/src/dashboard-grid/dashboard-grid.css +231 -115
- package/src/dashboard-grid/dashboard-grid.tokens.json +3 -1
- package/src/data-grid/data-grid.css +637 -496
- package/src/data-grid/data-grid.tokens.json +5 -1
- package/src/data-list/data-list.css +93 -76
- package/src/data-list/data-list.tokens.json +2 -1
- package/src/date-field/date-field.css +62 -57
- package/src/date-field/date-field.tokens.json +1 -0
- package/src/date-picker/date-picker.css +31 -269
- package/src/date-picker/date-picker.tokens.json +1 -21
- package/src/date-range-picker/date-range-picker.css +72 -528
- package/src/date-range-picker/date-range-picker.tokens.json +1 -37
- package/src/datetime-field/datetime-field.css +90 -90
- package/src/datetime-field/datetime-field.tokens.json +1 -0
- package/src/datetime-picker/datetime-picker.css +49 -711
- package/src/datetime-picker/datetime-picker.tokens.json +1 -50
- package/src/datetime-range-picker/datetime-range-picker.css +60 -985
- package/src/datetime-range-picker/datetime-range-picker.tokens.json +1 -67
- package/src/description-list/description-list.css +120 -76
- package/src/description-list/description-list.tokens.json +1 -0
- package/src/detail-panel/detail-panel.css +86 -71
- package/src/detail-panel/detail-panel.tokens.json +2 -0
- package/src/dialog/dialog.css +462 -199
- package/src/dialog/dialog.tokens.json +10 -0
- package/src/divider/divider.css +20 -20
- package/src/drawer/drawer.css +736 -237
- package/src/drawer/drawer.tokens.json +15 -0
- package/src/entity-picker/entity-picker.css +402 -272
- package/src/entity-picker/entity-picker.tokens.json +6 -0
- package/src/event-calendar/event-calendar.css +357 -399
- package/src/field/field.css +106 -93
- package/src/field/field.tokens.json +2 -0
- package/src/field-group/field-group.css +58 -38
- package/src/field-group/field-group.tokens.json +3 -0
- package/src/filter-bar/filter-bar.css +224 -216
- package/src/floating-panel/floating-panel.css +147 -0
- package/src/floating-panel/floating-panel.tokens.json +32 -0
- package/src/form/form.css +103 -26
- package/src/form/form.tokens.json +6 -1
- package/src/fullscreen/fullscreen.css +26 -27
- package/src/grid/grid.css +32 -31
- package/src/highlight/highlight.css +11 -11
- package/src/hover-card/hover-card.css +9 -9
- package/src/icon/icon.css +67 -20
- package/src/icon/icon.tokens.json +1 -0
- package/src/image/image.css +42 -42
- package/src/import-export-center/import-export-center.css +147 -168
- package/src/import-export-center/import-export-center.tokens.json +1 -0
- package/src/inline/inline.css +29 -29
- package/src/inline-message/inline-message.css +162 -86
- package/src/inline-message/inline-message.tokens.json +5 -0
- package/src/kbd/kbd.css +63 -51
- package/src/kbd/kbd.tokens.json +4 -0
- package/src/link/link.css +54 -33
- package/src/link/link.tokens.json +4 -0
- package/src/list/list.css +55 -24
- package/src/list/list.tokens.json +2 -0
- package/src/list-item/list-item.css +195 -80
- package/src/list-item/list-item.tokens.json +10 -0
- package/src/listbox/listbox.css +121 -72
- package/src/listbox/listbox.tokens.json +6 -1
- package/src/loading-overlay/loading-overlay.css +86 -103
- package/src/markdown/markdown.css +20 -20
- package/src/media-viewer/media-viewer.css +790 -0
- package/src/media-viewer/media-viewer.tokens.json +53 -0
- package/src/menu/menu.css +166 -83
- package/src/menu/menu.tokens.json +3 -1
- package/src/menubar/menubar.css +16 -16
- package/src/message/message.css +1296 -1243
- package/src/message/message.tokens.json +14 -0
- package/src/message-scroller/message-scroller.css +323 -320
- package/src/meter/meter.css +136 -0
- package/src/meter/meter.tokens.json +23 -0
- package/src/multi-select/multi-select.css +246 -174
- package/src/multi-select/multi-select.tokens.json +3 -0
- package/src/navigation-menu/navigation-menu.css +170 -191
- package/src/navigation-menu/navigation-menu.tokens.json +1 -0
- package/src/notification-center/notification-center.css +155 -163
- package/src/notification-center/notification-center.tokens.json +4 -0
- package/src/number-field/number-field.css +93 -93
- package/src/number-field/number-field.tokens.json +1 -0
- package/src/otp-input/otp-input.css +74 -64
- package/src/otp-input/otp-input.tokens.json +1 -0
- package/src/page/page.css +109 -31
- package/src/page/page.tokens.json +8 -0
- package/src/page-header/page-header.css +342 -287
- package/src/page-header/page-header.tokens.json +6 -1
- package/src/pagination/pagination.css +75 -79
- package/src/picker-panel/picker-panel.css +1074 -0
- package/src/picker-panel/picker-panel.tokens.json +77 -0
- package/src/popover/popover.css +85 -65
- package/src/popover/popover.tokens.json +2 -0
- package/src/progress-indicator/progress-indicator.css +194 -137
- package/src/progress-indicator/progress-indicator.tokens.json +1 -0
- package/src/prompt-composer/prompt-composer.css +274 -116
- package/src/prompt-composer/prompt-composer.tokens.json +15 -0
- package/src/prose/prose.css +77 -82
- package/src/radio-group/radio-group.css +107 -112
- package/src/rating/rating.css +147 -143
- package/src/rating/rating.tokens.json +2 -0
- package/src/result-state/result-state.css +95 -102
- package/src/result-state/result-state.tokens.json +1 -0
- package/src/runtime-properties.mjs +44 -6
- package/src/saved-views/saved-views.css +43 -49
- package/src/scroll-area/scroll-area.css +50 -37
- package/src/section/section.css +311 -46
- package/src/section/section.tokens.json +13 -1
- package/src/segmented-control/segmented-control.css +221 -133
- package/src/segmented-control/segmented-control.tokens.json +7 -11
- package/src/select/select.css +226 -149
- package/src/select/select.tokens.json +4 -0
- package/src/side-navigation/side-navigation.css +204 -201
- package/src/side-navigation/side-navigation.tokens.json +2 -0
- package/src/skeleton/skeleton.css +76 -58
- package/src/slider/slider.css +108 -104
- package/src/slider/slider.tokens.json +1 -0
- package/src/sparkline/sparkline.css +75 -53
- package/src/sparkline/sparkline.tokens.json +2 -0
- package/src/spinner/spinner.css +83 -180
- package/src/spinner/spinner.tokens.json +0 -1
- package/src/split-button/split-button.css +34 -35
- package/src/split-button/split-button.tokens.json +1 -0
- package/src/splitter/splitter.css +47 -48
- package/src/stack/stack.css +26 -26
- package/src/stat-card/stat-card.css +420 -245
- package/src/stat-card/stat-card.tokens.json +8 -0
- package/src/status-indicator/status-indicator.css +126 -101
- package/src/status-indicator/status-indicator.tokens.json +0 -3
- package/src/stepper/stepper.css +78 -82
- package/src/switch/switch.css +143 -125
- package/src/switch/switch.tokens.json +4 -0
- package/src/table/table.css +653 -222
- package/src/table/table.tokens.json +10 -0
- package/src/table-of-contents/table-of-contents.css +60 -59
- package/src/table-of-contents/table-of-contents.tokens.json +1 -0
- package/src/tabs/tabs.css +327 -294
- package/src/tabs/tabs.tokens.json +7 -1
- package/src/tag/tag.css +113 -89
- package/src/tag/tag.tokens.json +11 -0
- package/src/tags-input/tags-input.css +152 -87
- package/src/tags-input/tags-input.tokens.json +7 -1
- package/src/text-field/text-field.css +146 -148
- package/src/text-field/text-field.tokens.json +1 -0
- package/src/textarea/textarea.css +38 -33
- package/src/textarea/textarea.tokens.json +1 -0
- package/src/time-field/time-field.css +82 -77
- package/src/time-field/time-field.tokens.json +1 -0
- package/src/time-picker/time-picker.css +30 -519
- package/src/time-picker/time-picker.tokens.json +1 -38
- package/src/time-range-picker/time-range-picker.css +53 -895
- package/src/time-range-picker/time-range-picker.tokens.json +1 -66
- package/src/timeline/timeline.css +280 -292
- package/src/timeline/timeline.tokens.json +5 -0
- package/src/toast/toast.css +139 -122
- package/src/toast/toast.tokens.json +7 -0
- package/src/toggle/toggle.css +34 -38
- package/src/toggle-group/toggle-group.css +73 -77
- package/src/toolbar/toolbar.css +49 -40
- package/src/toolbar/toolbar.tokens.json +2 -1
- package/src/tooltip/tooltip.css +95 -39
- package/src/tooltip/tooltip.tokens.json +1 -0
- package/src/top-navigation/top-navigation.css +253 -269
- package/src/top-navigation/top-navigation.tokens.json +1 -0
- package/src/tour/tour.css +68 -74
- package/src/tour/tour.tokens.json +1 -0
- package/src/transfer/transfer.css +164 -168
- package/src/tree/tree.css +118 -122
- package/src/typography/typography.css +67 -38
- package/src/typography/typography.tokens.json +2 -0
- package/src/upload/upload.css +256 -257
- package/src/visually-hidden/visually-hidden.css +1 -1
- package/src/wizard/wizard.css +187 -199
package/src/grid/grid.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@layer slotted.components {
|
|
2
2
|
/**
|
|
3
3
|
* Grid arranges its children across two axes and reflows by measuring itself,
|
|
4
|
-
* not the viewport. It paints nothing: a layout that carried a
|
|
4
|
+
* not the viewport. It paints nothing: a layout that carried a color would be
|
|
5
5
|
* a surface, and a surface is another family's decision.
|
|
6
6
|
*
|
|
7
7
|
* Without a stated column count the track list is as many equal tracks as fit
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* `auto-fit` is used here so a single child fills the row rather than sitting
|
|
13
13
|
* alone at its minimum.
|
|
14
14
|
*/
|
|
15
|
-
[data-ui
|
|
15
|
+
[data-ui-grid] {
|
|
16
16
|
--_gap: var(--slotted-space-6, 1rem);
|
|
17
17
|
--_min-item: var(--slotted-grid-min-item-width-md, 16rem);
|
|
18
18
|
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
* `auto-fill` is used here so two children in a three-column grid occupy two
|
|
38
38
|
* thirds of it rather than stretching across the whole row.
|
|
39
39
|
*/
|
|
40
|
-
[data-ui
|
|
40
|
+
[data-ui-grid][data-columns] {
|
|
41
41
|
grid-template-columns: repeat(
|
|
42
42
|
auto-fill,
|
|
43
43
|
minmax(
|
|
@@ -54,56 +54,57 @@
|
|
|
54
54
|
);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
/* Separation is a step on the scale, never a length the consumer states.
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
/* Separation is a step on the scale, never a length the consumer states. The
|
|
58
|
+
zero carries its unit: a track function subtracts it from a percentage. */
|
|
59
|
+
[data-ui-grid][data-gap='0'] {
|
|
60
|
+
--_gap: 0px;
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
[data-ui
|
|
63
|
+
[data-ui-grid][data-gap='1'] {
|
|
63
64
|
--_gap: var(--slotted-space-1, 0.125rem);
|
|
64
65
|
}
|
|
65
66
|
|
|
66
|
-
[data-ui
|
|
67
|
+
[data-ui-grid][data-gap='2'] {
|
|
67
68
|
--_gap: var(--slotted-space-2, 0.25rem);
|
|
68
69
|
}
|
|
69
70
|
|
|
70
|
-
[data-ui
|
|
71
|
+
[data-ui-grid][data-gap='3'] {
|
|
71
72
|
--_gap: var(--slotted-space-3, 0.375rem);
|
|
72
73
|
}
|
|
73
74
|
|
|
74
|
-
[data-ui
|
|
75
|
+
[data-ui-grid][data-gap='4'] {
|
|
75
76
|
--_gap: var(--slotted-space-4, 0.5rem);
|
|
76
77
|
}
|
|
77
78
|
|
|
78
|
-
[data-ui
|
|
79
|
+
[data-ui-grid][data-gap='5'] {
|
|
79
80
|
--_gap: var(--slotted-space-5, 0.75rem);
|
|
80
81
|
}
|
|
81
82
|
|
|
82
|
-
[data-ui
|
|
83
|
+
[data-ui-grid][data-gap='6'] {
|
|
83
84
|
--_gap: var(--slotted-space-6, 1rem);
|
|
84
85
|
}
|
|
85
86
|
|
|
86
|
-
[data-ui
|
|
87
|
+
[data-ui-grid][data-gap='7'] {
|
|
87
88
|
--_gap: var(--slotted-space-7, 1.25rem);
|
|
88
89
|
}
|
|
89
90
|
|
|
90
|
-
[data-ui
|
|
91
|
+
[data-ui-grid][data-gap='8'] {
|
|
91
92
|
--_gap: var(--slotted-space-8, 1.5rem);
|
|
92
93
|
}
|
|
93
94
|
|
|
94
|
-
[data-ui
|
|
95
|
+
[data-ui-grid][data-gap='9'] {
|
|
95
96
|
--_gap: var(--slotted-space-9, 2rem);
|
|
96
97
|
}
|
|
97
98
|
|
|
98
|
-
[data-ui
|
|
99
|
+
[data-ui-grid][data-gap='10'] {
|
|
99
100
|
--_gap: var(--slotted-space-10, 2.5rem);
|
|
100
101
|
}
|
|
101
102
|
|
|
102
|
-
[data-ui
|
|
103
|
+
[data-ui-grid][data-gap='11'] {
|
|
103
104
|
--_gap: var(--slotted-space-11, 3rem);
|
|
104
105
|
}
|
|
105
106
|
|
|
106
|
-
[data-ui
|
|
107
|
+
[data-ui-grid][data-gap='12'] {
|
|
107
108
|
--_gap: var(--slotted-space-12, 4rem);
|
|
108
109
|
}
|
|
109
110
|
|
|
@@ -113,23 +114,23 @@
|
|
|
113
114
|
* these are cell minima rather than reading measure, which `container` owns.
|
|
114
115
|
* A theme retunes any of them through its token.
|
|
115
116
|
*/
|
|
116
|
-
[data-ui
|
|
117
|
+
[data-ui-grid][data-min-item-width='xs'] {
|
|
117
118
|
--_min-item: var(--slotted-grid-min-item-width-xs, 8rem);
|
|
118
119
|
}
|
|
119
120
|
|
|
120
|
-
[data-ui
|
|
121
|
+
[data-ui-grid][data-min-item-width='sm'] {
|
|
121
122
|
--_min-item: var(--slotted-grid-min-item-width-sm, 12rem);
|
|
122
123
|
}
|
|
123
124
|
|
|
124
|
-
[data-ui
|
|
125
|
+
[data-ui-grid][data-min-item-width='md'] {
|
|
125
126
|
--_min-item: var(--slotted-grid-min-item-width-md, 16rem);
|
|
126
127
|
}
|
|
127
128
|
|
|
128
|
-
[data-ui
|
|
129
|
+
[data-ui-grid][data-min-item-width='lg'] {
|
|
129
130
|
--_min-item: var(--slotted-grid-min-item-width-lg, 20rem);
|
|
130
131
|
}
|
|
131
132
|
|
|
132
|
-
[data-ui
|
|
133
|
+
[data-ui-grid][data-min-item-width='xl'] {
|
|
133
134
|
--_min-item: var(--slotted-grid-min-item-width-xl, 24rem);
|
|
134
135
|
}
|
|
135
136
|
|
|
@@ -139,35 +140,35 @@
|
|
|
139
140
|
* distributes tracks: the tracks already fill the row, so there is nothing
|
|
140
141
|
* between them to distribute.
|
|
141
142
|
*/
|
|
142
|
-
[data-ui
|
|
143
|
+
[data-ui-grid][data-align='start'] {
|
|
143
144
|
align-items: start;
|
|
144
145
|
}
|
|
145
146
|
|
|
146
|
-
[data-ui
|
|
147
|
+
[data-ui-grid][data-align='center'] {
|
|
147
148
|
align-items: center;
|
|
148
149
|
}
|
|
149
150
|
|
|
150
|
-
[data-ui
|
|
151
|
+
[data-ui-grid][data-align='end'] {
|
|
151
152
|
align-items: end;
|
|
152
153
|
}
|
|
153
154
|
|
|
154
|
-
[data-ui
|
|
155
|
+
[data-ui-grid][data-align='stretch'] {
|
|
155
156
|
align-items: stretch;
|
|
156
157
|
}
|
|
157
158
|
|
|
158
|
-
[data-ui
|
|
159
|
+
[data-ui-grid][data-justify='start'] {
|
|
159
160
|
justify-items: start;
|
|
160
161
|
}
|
|
161
162
|
|
|
162
|
-
[data-ui
|
|
163
|
+
[data-ui-grid][data-justify='center'] {
|
|
163
164
|
justify-items: center;
|
|
164
165
|
}
|
|
165
166
|
|
|
166
|
-
[data-ui
|
|
167
|
+
[data-ui-grid][data-justify='end'] {
|
|
167
168
|
justify-items: end;
|
|
168
169
|
}
|
|
169
170
|
|
|
170
|
-
[data-ui
|
|
171
|
+
[data-ui-grid][data-justify='stretch'] {
|
|
171
172
|
justify-items: stretch;
|
|
172
173
|
}
|
|
173
174
|
}
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* inline padding, `Blueberry` measured 70.03px marked against 63.17px plain,
|
|
23
23
|
* and the run moved 6.86px as the query grew (CB6). Weight, spacing and
|
|
24
24
|
* padding are therefore the label's own, and the mark is carried entirely by
|
|
25
|
-
*
|
|
25
|
+
* color: the accent's text tone over a band mixed from that same tone, with
|
|
26
26
|
* a rule of the accent's border tone under it.
|
|
27
27
|
*
|
|
28
28
|
* The rule is `text-decoration` rather than a shadow, so it follows the
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
* a ground is calibrated to sit under text on the page rather than to
|
|
34
34
|
* separate from it: it measured 1.220 | 1.014 | 1.000:1 against the panel in
|
|
35
35
|
* `light` | `dark` | `high-contrast`, so in two schemes out of three the band
|
|
36
|
-
* did not exist and the mark was carried by its
|
|
36
|
+
* did not exist and the mark was carried by its color and its rule alone
|
|
37
37
|
* (CB10, the same fact CK7 found under the pointer halo). The band is mixed
|
|
38
38
|
* from `accent-text` instead — the one role every scheme keeps legible over
|
|
39
39
|
* the surface — so one share gives one gesture in all three: 1.120 | 1.165 |
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
* highlighted row — that caps the share: 0.075 leaves 7.078:1, 0.08 leaves
|
|
47
47
|
* 7.001:1, and 0.12 leaves 6.540:1.
|
|
48
48
|
*/
|
|
49
|
-
[data-ui
|
|
49
|
+
[data-ui-highlight] [data-part-match] {
|
|
50
50
|
background-color: var(
|
|
51
51
|
--slotted-highlight-background,
|
|
52
52
|
color-mix(
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
* sits inside the fill and reads as nothing, which the capture showed. An
|
|
88
88
|
* outline is not used: R3 reserves it for the focus ring.
|
|
89
89
|
*/
|
|
90
|
-
[data-ui
|
|
90
|
+
[data-ui-highlight] [data-part-match][data-current] {
|
|
91
91
|
background-color: var(--slotted-highlight-current-background, var(--slotted-tone-accent-solid));
|
|
92
92
|
color: var(--slotted-highlight-current-color, var(--slotted-tone-accent-on-solid));
|
|
93
93
|
text-decoration-line: none;
|
|
@@ -98,13 +98,13 @@
|
|
|
98
98
|
* is why the option is here", and saying it in the accent tone on a row that
|
|
99
99
|
* answers nothing puts the loudest thing on the surface on the one option a
|
|
100
100
|
* reader cannot take. The rule stays: the reader still has to see which span
|
|
101
|
-
* matched, and it is the part of the mark that costs no
|
|
101
|
+
* matched, and it is the part of the mark that costs no color.
|
|
102
102
|
*
|
|
103
103
|
* The state is the root's own, or any row's above it: the host's option
|
|
104
104
|
* already carries `data-disabled`, and the family reads it from there rather
|
|
105
105
|
* than asking the host to say it twice.
|
|
106
106
|
*/
|
|
107
|
-
[data-ui
|
|
107
|
+
[data-ui-highlight]:is([data-disabled], [data-disabled] *) [data-part-match] {
|
|
108
108
|
background-color: var(--slotted-highlight-disabled-background, transparent);
|
|
109
109
|
color: inherit;
|
|
110
110
|
/* Restated for the current match, which gave the rule up for its fill. */
|
|
@@ -112,22 +112,22 @@
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
|
-
* Under forced
|
|
115
|
+
* Under forced colors the accent ground becomes `Canvas` and the mark would
|
|
116
116
|
* vanish. `Mark` and `MarkText` are the system pair for exactly this element,
|
|
117
|
-
* and they are the one case where this sheet names a system
|
|
117
|
+
* and they are the one case where this sheet names a system color because
|
|
118
118
|
* the theme has no token that maps to it. The current match takes
|
|
119
119
|
* `Highlight` and `HighlightText`, the pair the user agent draws its own
|
|
120
120
|
* active find match in.
|
|
121
121
|
*/
|
|
122
122
|
@media (forced-colors: active) {
|
|
123
|
-
[data-ui
|
|
124
|
-
[data-ui
|
|
123
|
+
[data-ui-highlight] [data-part-match],
|
|
124
|
+
[data-ui-highlight]:is([data-disabled], [data-disabled] *) [data-part-match] {
|
|
125
125
|
background-color: Mark;
|
|
126
126
|
color: MarkText;
|
|
127
127
|
forced-color-adjust: none;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
[data-ui
|
|
130
|
+
[data-ui-highlight] [data-part-match][data-current] {
|
|
131
131
|
background-color: Highlight;
|
|
132
132
|
color: HighlightText;
|
|
133
133
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* preview of where it goes, or of who it names.
|
|
5
5
|
*
|
|
6
6
|
* root ─ the trigger ─ <a> ─ data-open
|
|
7
|
-
* └─ [data-ui
|
|
7
|
+
* └─ [data-ui-popover] ─ unchanged, autoFocus off ─┐
|
|
8
8
|
* │ header / body / footer — the consumer's │
|
|
9
9
|
* │ arrow │
|
|
10
10
|
* └───────────────────────────────────────────────┘
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* the family renders its own anchor, it owes the reader a link that reads as
|
|
21
21
|
* one and says, while the card shows, which word the card is about.
|
|
22
22
|
*/
|
|
23
|
-
[data-ui
|
|
23
|
+
[data-ui-hover-card] {
|
|
24
24
|
--_text: var(--slotted-hover-card-color, var(--slotted-tone-accent-text, LinkText));
|
|
25
25
|
/* The underline at rest is the text at less than half strength, as
|
|
26
26
|
`link` draws it: present enough to say "link", quiet enough that a
|
|
@@ -59,34 +59,34 @@
|
|
|
59
59
|
|
|
60
60
|
/* Hover fills the underline. The card itself waits for `openDelay`, so this
|
|
61
61
|
is the only thing that answers the pointer at once. */
|
|
62
|
-
[data-ui
|
|
62
|
+
[data-ui-hover-card]:not([data-disabled]):hover {
|
|
63
63
|
text-decoration-color: currentColor;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* While the card shows, the word it is about is marked: the tint behind it
|
|
68
|
-
* and a halo of the same
|
|
68
|
+
* and a halo of the same color drawn as a spread shadow, so the inline box
|
|
69
69
|
* grows by one step of space without moving the line it sits on. A padding
|
|
70
70
|
* would have reflowed the paragraph on every open.
|
|
71
71
|
*/
|
|
72
|
-
[data-ui
|
|
72
|
+
[data-ui-hover-card][data-open] {
|
|
73
73
|
background-color: var(--_tint);
|
|
74
74
|
box-shadow: 0 0 0 var(--_halo) var(--_tint);
|
|
75
75
|
text-decoration-color: currentColor;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
[data-ui
|
|
78
|
+
[data-ui-hover-card]:focus-visible {
|
|
79
79
|
outline: var(--slotted-focus-ring-width, 2px) solid var(--slotted-focus-ring-color, Highlight);
|
|
80
80
|
outline-offset: var(--slotted-focus-ring-offset, 2px);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
|
-
* Forced
|
|
84
|
+
* Forced colors remove backgrounds, so the open mark would vanish with them;
|
|
85
85
|
* a link the reader is looking at is underlined in the system's own link
|
|
86
|
-
*
|
|
86
|
+
* color instead, which is the one thing forced colors keep.
|
|
87
87
|
*/
|
|
88
88
|
@media (forced-colors: active) {
|
|
89
|
-
[data-ui
|
|
89
|
+
[data-ui-hover-card][data-open] {
|
|
90
90
|
text-decoration-thickness: var(--slotted-border-width-thick, 2px);
|
|
91
91
|
}
|
|
92
92
|
}
|
package/src/icon/icon.css
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Icon is the box a glyph is drawn in, not the glyph. The library ships no
|
|
4
4
|
* catalogue: the artwork is the consumer's, and this family owns the size it
|
|
5
|
-
* is drawn at, the
|
|
5
|
+
* is drawn at, the color it inherits, where it sits against a line of text,
|
|
6
6
|
* and whether it mirrors in a right-to-left document.
|
|
7
7
|
*
|
|
8
8
|
* The size is read through the family token rather than stated, so a
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* this family. An instance overrides that container through `data-size`,
|
|
12
12
|
* which sets the same token on the element itself.
|
|
13
13
|
*/
|
|
14
|
-
[data-ui
|
|
14
|
+
[data-ui-icon] {
|
|
15
15
|
--_size: var(--slotted-icon-size, var(--slotted-control-icon-size-md, 16px));
|
|
16
16
|
|
|
17
17
|
align-items: center;
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
line-height: 1;
|
|
25
25
|
/**
|
|
26
26
|
* An inline box sits with its bottom edge on the baseline, which puts its
|
|
27
|
-
*
|
|
27
|
+
* center half its own height above the line while text reads centerd
|
|
28
28
|
* between the baseline and the cap height. The icon reads high without a
|
|
29
29
|
* correction, and by more the larger it is relative to the type around it:
|
|
30
30
|
* a constant shift is right at one ratio and wrong at every other, which a
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
*
|
|
33
33
|
* The default is therefore computed rather than stated. `cap` is the cap
|
|
34
34
|
* height of the font the icon inherits and `--_size` is the box, so the
|
|
35
|
-
* expression puts the box's
|
|
35
|
+
* expression puts the box's center on the text's optical center at every
|
|
36
36
|
* combination of the two. At `1em` it resolves near the `-0.125em` this
|
|
37
37
|
* family used to state, which is why that constant looked right until the
|
|
38
38
|
* ratio changed. A theme still overrides the whole thing through the token.
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
* is on the child and not on the box, because `vertical-align` above reads
|
|
59
59
|
* `cap` from the text the box sits in.
|
|
60
60
|
*/
|
|
61
|
-
[data-ui
|
|
62
|
-
[data-ui
|
|
61
|
+
[data-ui-icon] > *,
|
|
62
|
+
[data-ui-icon] svg {
|
|
63
63
|
block-size: 100%;
|
|
64
64
|
display: block;
|
|
65
65
|
font-size: var(--_size);
|
|
@@ -72,54 +72,101 @@
|
|
|
72
72
|
* the type it sits in, because sixteen pixels inside a display heading is
|
|
73
73
|
* not an icon.
|
|
74
74
|
*/
|
|
75
|
-
|
|
75
|
+
/**
|
|
76
|
+
* A status mark is drawn on three grids (`@slotted/core/glyph`), and the box
|
|
77
|
+
* shows the one it is sized for, so every cut lands on whole pixels. The box
|
|
78
|
+
* is a size container for that question alone: its size is its own and never
|
|
79
|
+
* its content's. Under 1dppx — a page zoomed out — the 12-unit drawing is
|
|
80
|
+
* the heaviest per pixel, and the one that stays legible.
|
|
81
|
+
*/
|
|
82
|
+
[data-ui-icon]:has(> svg > svg[data-grid]) {
|
|
83
|
+
container-type: size;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
[data-ui-icon] svg[data-grid] {
|
|
87
|
+
display: none;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@container (width < 13px) {
|
|
91
|
+
[data-ui-icon] svg[data-grid='12'] {
|
|
92
|
+
display: block;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@container (13px <= width < 15px) {
|
|
97
|
+
[data-ui-icon] svg[data-grid='14'] {
|
|
98
|
+
display: block;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@container (width >= 15px) {
|
|
103
|
+
[data-ui-icon] svg[data-grid='16'] {
|
|
104
|
+
display: block;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@media (max-resolution: 0.99dppx) {
|
|
109
|
+
[data-ui-icon] svg[data-grid] {
|
|
110
|
+
display: none;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
[data-ui-icon] svg[data-grid='12'] {
|
|
114
|
+
display: block;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
[data-ui-icon][data-size='text'] {
|
|
76
119
|
--slotted-icon-size: 1em;
|
|
77
120
|
}
|
|
78
121
|
|
|
79
|
-
[data-ui
|
|
122
|
+
[data-ui-icon][data-size='sm'] {
|
|
80
123
|
--slotted-icon-size: var(--slotted-control-icon-size-sm, 14px);
|
|
81
124
|
}
|
|
82
125
|
|
|
83
|
-
[data-ui
|
|
126
|
+
[data-ui-icon][data-size='md'] {
|
|
84
127
|
--slotted-icon-size: var(--slotted-control-icon-size-md, 16px);
|
|
85
128
|
}
|
|
86
129
|
|
|
87
|
-
[data-ui
|
|
130
|
+
[data-ui-icon][data-size='lg'] {
|
|
88
131
|
--slotted-icon-size: var(--slotted-control-icon-size-lg, 18px);
|
|
89
132
|
}
|
|
90
133
|
|
|
91
134
|
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
135
|
+
* Color is inherited rather than painted, so an icon beside a label is the
|
|
136
|
+
* color of that label without anyone deciding it. The family sets `color`
|
|
94
137
|
* and never `fill` or `stroke`: stroked artwork declares
|
|
95
138
|
* `stroke="currentColor"` and filled artwork declares `fill="currentColor"`,
|
|
96
139
|
* and imposing either would break the other.
|
|
97
140
|
*/
|
|
98
|
-
[data-ui
|
|
141
|
+
[data-ui-icon][data-tone='default'] {
|
|
99
142
|
color: var(--slotted-text, CanvasText);
|
|
100
143
|
}
|
|
101
144
|
|
|
102
|
-
[data-ui
|
|
145
|
+
[data-ui-icon][data-tone='muted'] {
|
|
103
146
|
color: var(--slotted-text-muted, GrayText);
|
|
104
147
|
}
|
|
105
148
|
|
|
106
|
-
[data-ui
|
|
149
|
+
[data-ui-icon][data-tone='accent'] {
|
|
107
150
|
color: var(--slotted-tone-accent-text, LinkText);
|
|
108
151
|
}
|
|
109
152
|
|
|
110
|
-
[data-ui
|
|
153
|
+
[data-ui-icon][data-tone='success'] {
|
|
111
154
|
color: var(--slotted-tone-success-text, CanvasText);
|
|
112
155
|
}
|
|
113
156
|
|
|
114
|
-
[data-ui
|
|
157
|
+
[data-ui-icon][data-tone='info'] {
|
|
158
|
+
color: var(--slotted-tone-info-text, CanvasText);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
[data-ui-icon][data-tone='warning'] {
|
|
115
162
|
color: var(--slotted-tone-warning-text, CanvasText);
|
|
116
163
|
}
|
|
117
164
|
|
|
118
|
-
[data-ui
|
|
165
|
+
[data-ui-icon][data-tone='danger'] {
|
|
119
166
|
color: var(--slotted-tone-danger-text, CanvasText);
|
|
120
167
|
}
|
|
121
168
|
|
|
122
|
-
[data-ui
|
|
169
|
+
[data-ui-icon][data-tone='inverse'] {
|
|
123
170
|
color: var(--slotted-text-inverse, Canvas);
|
|
124
171
|
}
|
|
125
172
|
|
|
@@ -130,7 +177,7 @@
|
|
|
130
177
|
* right-to-left page has to read the directionality that actually applies to
|
|
131
178
|
* it.
|
|
132
179
|
*/
|
|
133
|
-
[data-ui
|
|
180
|
+
[data-ui-icon][data-directional]:dir(rtl) {
|
|
134
181
|
scale: -1 1;
|
|
135
182
|
}
|
|
136
183
|
}
|