@zazz-ui/core 0.9.1 → 0.11.0
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/AUTHORING.md +21 -16
- package/CHANGELOG.md +144 -0
- package/README.md +3 -3
- package/dist/sri.json +89 -88
- package/dist/zazz.css +1 -1
- package/editor/zazz.css-data.json +8370 -1264
- package/editor/zazz.html-data.json +31 -41
- package/editor/zazz.language-data.json +516 -247
- package/editor/zazz.lint-data.json +654 -619
- package/package.json +2 -3
- package/src/base/_defaults.css +59 -40
- package/src/base/_layers.css +5 -2
- package/src/base/_properties-2xl.css +10 -0
- package/src/base/_properties-active.css +8 -0
- package/src/base/_properties-checked.css +8 -0
- package/src/base/_properties-current.css +8 -0
- package/src/base/_properties-disabled.css +8 -0
- package/src/base/_properties-focus-visible.css +8 -0
- package/src/base/_properties-focus-within.css +8 -0
- package/src/base/_properties-hover.css +8 -0
- package/src/base/_properties-lg.css +10 -0
- package/src/base/_properties-md.css +10 -0
- package/src/base/_properties-open.css +8 -0
- package/src/base/_properties-sm.css +10 -0
- package/src/base/_properties-starting.css +4 -0
- package/src/base/_properties-stuck.css +4 -0
- package/src/base/_properties-xl.css +10 -0
- package/src/base/_properties.css +55 -15
- package/src/base/_reset.css +8 -4
- package/src/base/_typography.css +26 -9
- package/src/base/_utilities-box.css +63 -59
- package/src/base/_utilities-color.css +55 -8
- package/src/base/_utilities-effects.css +8 -0
- package/src/base/_utilities-flow.css +28 -5
- package/src/base/_utilities-pseudo.css +4 -0
- package/src/base/_utilities-spacing.css +8 -8
- package/src/base/_utilities-sr.css +98 -0
- package/src/base/_utilities-tier-2xl.css +5 -0
- package/src/base/_utilities-tier-active.css +5 -1
- package/src/base/_utilities-tier-checked.css +5 -1
- package/src/base/_utilities-tier-current.css +5 -1
- package/src/base/_utilities-tier-disabled.css +5 -1
- package/src/base/_utilities-tier-focus-visible.css +5 -1
- package/src/base/_utilities-tier-focus-within.css +5 -1
- package/src/base/_utilities-tier-hover.css +5 -1
- package/src/base/_utilities-tier-lg.css +5 -0
- package/src/base/_utilities-tier-md.css +5 -0
- package/src/base/_utilities-tier-open.css +5 -1
- package/src/base/_utilities-tier-sm.css +5 -0
- package/src/base/_utilities-tier-starting.css +2 -0
- package/src/base/_utilities-tier-stuck.css +3 -0
- package/src/base/_utilities-tier-xl.css +5 -0
- package/src/base/_utilities-typography.css +263 -3
- package/src/base/_variables.css +151 -60
- package/src/base/kit-styling.d.ts.map +1 -1
- package/src/base/kit-styling.js +134 -128
- package/src/base/kit-styling.ts +134 -128
- package/src/base/utilities.d.ts +23 -8
- package/src/base/utilities.d.ts.map +1 -1
- package/src/base/utilities.js +78 -3
- package/src/base/utilities.ts +95 -11
- package/src/head.d.ts.map +1 -1
- package/src/head.js +4 -5
- package/src/head.ts +4 -5
- package/src/index.css +3 -2
- package/src/manifest.d.ts.map +1 -1
- package/src/manifest.js +13 -3
- package/src/manifest.ts +13 -3
- package/src/primitives/accordion/accordion.css +3 -0
- package/src/primitives/alert-dialog/alert-dialog.css +1 -1
- package/src/primitives/alert-dialog/alert-dialog.html +14 -14
- package/src/primitives/autocomplete/autocomplete.css +4 -2
- package/src/primitives/avatar/avatar.html +4 -6
- package/src/primitives/badge/badge.css +77 -56
- package/src/primitives/breadcrumbs/breadcrumbs.html +1 -7
- package/src/primitives/button/button.css +75 -60
- package/src/primitives/button-group/button-group.css +4 -0
- package/src/primitives/callout/callout.css +22 -43
- package/src/primitives/card/card-subgrid.html +2 -3
- package/src/primitives/card/card.css +4 -0
- package/src/primitives/card/card.html +2 -3
- package/src/primitives/checkbox/checkbox.css +13 -0
- package/src/primitives/combobox/combobox.css +25 -2
- package/src/primitives/command/command-actions.d.ts.map +1 -1
- package/src/primitives/command/command-actions.js +4 -9
- package/src/primitives/command/command-actions.ts +4 -9
- package/src/primitives/command/command-dialog.html +109 -107
- package/src/primitives/command/command.css +16 -8
- package/src/primitives/debug/audit-core.d.ts +1 -1
- package/src/primitives/debug/audit-core.d.ts.map +1 -1
- package/src/primitives/debug/audit-core.js +30 -3
- package/src/primitives/debug/audit-core.ts +40 -2
- package/src/primitives/dialog/dialog-with-form.html +1 -1
- package/src/primitives/dialog/dialog.css +111 -44
- package/src/primitives/fields/fields.css +11 -5
- package/src/primitives/group/group.css +18 -0
- package/src/primitives/group/group.html +26 -0
- package/src/primitives/input/input.css +16 -9
- package/src/primitives/input-group/input-group-password-group.html +1 -1
- package/src/primitives/input-group/input-group.css +19 -11
- package/src/primitives/kbd/kbd.css +4 -0
- package/src/primitives/lightbox/lightbox.css +17 -4
- package/src/primitives/lightbox/lightbox.html +2 -1
- package/src/primitives/menu/menu.css +3 -1
- package/src/primitives/meter/meter.css +10 -3
- package/src/primitives/mobile-menu/mobile-menu.css +17 -16
- package/src/primitives/mobile-menu/mobile-menu.html +4 -4
- package/src/primitives/navigation-menu/navigation-menu.css +8 -3
- package/src/primitives/navigation-menu/navigation-menu.html +2 -2
- package/src/primitives/otp/otp.css +7 -2
- package/src/primitives/password-group/password-group.css +20 -12
- package/src/primitives/password-group/password-group.html +1 -1
- package/src/primitives/popover/popover.css +29 -10
- package/src/primitives/progress/progress.css +5 -0
- package/src/primitives/radio/radio.css +15 -2
- package/src/primitives/scroll-fade/scroll-fade.css +1 -1
- package/src/primitives/select/select.css +42 -21
- package/src/primitives/slider/slider.css +11 -0
- package/src/primitives/switch/switch.css +67 -20
- package/src/primitives/tabs/tabs.css +20 -1
- package/src/primitives/textarea/textarea.css +19 -10
- package/src/primitives/toaster/toaster.css +8 -4
- package/src/primitives/toggle/toggle.css +37 -9
- package/src/primitives/toggle-group/toggle-group.css +4 -0
- package/src/primitives/tooltip/tooltip.css +44 -25
- package/src/primitives/utilities/pile.html +2 -3
- package/src/base/_switches.css +0 -148
|
@@ -8,6 +8,11 @@
|
|
|
8
8
|
* @uses anchor-name, position-anchor, position-area, position-try-fallbacks:
|
|
9
9
|
* anchor positioning (gated behind @supports; Safari 26.x falls
|
|
10
10
|
* back to the UA-centered popover)
|
|
11
|
+
* @uses corner-shape — superellipse corners; unsupported browsers keep plain
|
|
12
|
+
* rounded corners
|
|
13
|
+
* @uses :dir(rtl): inline-side transform origins mirror in RTL (transform-origin
|
|
14
|
+
* has no logical keywords); origins follow the declared side, not an
|
|
15
|
+
* active position-try fallback
|
|
11
16
|
* @tokens --ui-popover-* (Tier 3 owner; @layer variables)
|
|
12
17
|
* @presets data-popover-side="top | bottom | left | right", data-popover-align="start | center | end"
|
|
13
18
|
* on the [popover] element (the identity is the native attribute)
|
|
@@ -20,7 +25,9 @@
|
|
|
20
25
|
/* Styles */
|
|
21
26
|
--ui-popover-border-color: var(--color-border);
|
|
22
27
|
--ui-popover-radius: var(--radius-md);
|
|
28
|
+
--ui-popover-corner-shape: var(--radius-corner-shape);
|
|
23
29
|
--ui-popover-button-radius: var(--radius-sm);
|
|
30
|
+
--ui-popover-button-corner-shape: var(--radius-corner-shape);
|
|
24
31
|
--ui-popover-shadow: var(--shadow-md);
|
|
25
32
|
--ui-popover-p: calc(var(--spacing) * 1.5);
|
|
26
33
|
--ui-popover-min-w: var(--article-xs);
|
|
@@ -55,12 +62,18 @@
|
|
|
55
62
|
background-color: var(--color-popover);
|
|
56
63
|
|
|
57
64
|
align-content: start;
|
|
65
|
+
/* transform-origin has no logical keywords: the placement matrix names the
|
|
66
|
+
inline edge through these, resolved per element so RTL mirrors them.
|
|
67
|
+
Origins track the declared side, not the active position-try fallback. */
|
|
68
|
+
--_origin-inline-start: left;
|
|
69
|
+
--_origin-inline-end: right;
|
|
58
70
|
transform-origin: var(--ui-popover-origin);
|
|
59
71
|
--_radius-len: var(--_radius-resolved, var(--ui-popover-radius));
|
|
60
72
|
--_radius-num: var(--_radius-resolved, var(--ui-popover-radius));
|
|
61
73
|
border-radius: calc(
|
|
62
74
|
var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-multiplier)
|
|
63
75
|
);
|
|
76
|
+
corner-shape: var(--_corner-shape-resolved, var(--ui-popover-corner-shape));
|
|
64
77
|
box-shadow: var(--_shadow-resolved, var(--ui-popover-shadow));
|
|
65
78
|
opacity: var(--ui-popover-opacity--start);
|
|
66
79
|
transform: scale(var(--ui-popover-scale--start)) translate3d(var(--ui-popover-translate--start));
|
|
@@ -76,6 +89,11 @@
|
|
|
76
89
|
allow-discrete;
|
|
77
90
|
}
|
|
78
91
|
|
|
92
|
+
:where([popover]:dir(rtl)) {
|
|
93
|
+
--_origin-inline-start: right;
|
|
94
|
+
--_origin-inline-end: left;
|
|
95
|
+
}
|
|
96
|
+
|
|
79
97
|
/* Anchor positioning tethers the popover to its trigger and flips it away
|
|
80
98
|
from viewport edges. The gate keeps Safari 26.x on the UA-centered popover
|
|
81
99
|
(inset: 0 + margin: auto) instead of a mispositioned top-left box.
|
|
@@ -130,6 +148,7 @@
|
|
|
130
148
|
|
|
131
149
|
:where([popover] [data-ui~="button"]) {
|
|
132
150
|
--ui-button-radius: var(--ui-popover-button-radius);
|
|
151
|
+
--ui-button-corner-shape: var(--ui-popover-button-corner-shape);
|
|
133
152
|
}
|
|
134
153
|
|
|
135
154
|
/* ===========================================================================
|
|
@@ -146,7 +165,7 @@
|
|
|
146
165
|
:where([popover])[data-popover-side="bottom"]:not([data-popover-align]),
|
|
147
166
|
:where([popover])[data-popover-side="bottom"][data-popover-align="start"] {
|
|
148
167
|
--ui-popover-position-area: block-end span-inline-end;
|
|
149
|
-
--ui-popover-origin: top
|
|
168
|
+
--ui-popover-origin: top var(--_origin-inline-start);
|
|
150
169
|
--ui-popover-my: calc(var(--spacing) * 1.5);
|
|
151
170
|
--ui-popover-mx: 0;
|
|
152
171
|
}
|
|
@@ -160,7 +179,7 @@
|
|
|
160
179
|
|
|
161
180
|
:where([popover])[data-popover-side="bottom"][data-popover-align="end"] {
|
|
162
181
|
--ui-popover-position-area: block-end span-inline-start;
|
|
163
|
-
--ui-popover-origin: top
|
|
182
|
+
--ui-popover-origin: top var(--_origin-inline-end);
|
|
164
183
|
--ui-popover-my: calc(var(--spacing) * 1.5);
|
|
165
184
|
--ui-popover-mx: 0;
|
|
166
185
|
}
|
|
@@ -168,7 +187,7 @@
|
|
|
168
187
|
:where([popover])[data-popover-side="top"]:not([data-popover-align]),
|
|
169
188
|
:where([popover])[data-popover-side="top"][data-popover-align="start"] {
|
|
170
189
|
--ui-popover-position-area: block-start span-inline-end;
|
|
171
|
-
--ui-popover-origin: bottom
|
|
190
|
+
--ui-popover-origin: bottom var(--_origin-inline-start);
|
|
172
191
|
--ui-popover-my: calc(var(--spacing) * 1.5);
|
|
173
192
|
--ui-popover-mx: 0;
|
|
174
193
|
}
|
|
@@ -182,7 +201,7 @@
|
|
|
182
201
|
|
|
183
202
|
:where([popover])[data-popover-side="top"][data-popover-align="end"] {
|
|
184
203
|
--ui-popover-position-area: block-start span-inline-start;
|
|
185
|
-
--ui-popover-origin: bottom
|
|
204
|
+
--ui-popover-origin: bottom var(--_origin-inline-end);
|
|
186
205
|
--ui-popover-my: calc(var(--spacing) * 1.5);
|
|
187
206
|
--ui-popover-mx: 0;
|
|
188
207
|
}
|
|
@@ -190,21 +209,21 @@
|
|
|
190
209
|
:where([popover])[data-popover-side="right"]:not([data-popover-align]),
|
|
191
210
|
:where([popover])[data-popover-side="right"][data-popover-align="start"] {
|
|
192
211
|
--ui-popover-position-area: inline-end span-block-end;
|
|
193
|
-
--ui-popover-origin:
|
|
212
|
+
--ui-popover-origin: top var(--_origin-inline-start);
|
|
194
213
|
--ui-popover-my: 0;
|
|
195
214
|
--ui-popover-mx: calc(var(--spacing) * 1.5);
|
|
196
215
|
}
|
|
197
216
|
|
|
198
217
|
:where([popover])[data-popover-side="right"][data-popover-align="center"] {
|
|
199
218
|
--ui-popover-position-area: inline-end span-all;
|
|
200
|
-
--ui-popover-origin: center
|
|
219
|
+
--ui-popover-origin: center var(--_origin-inline-start);
|
|
201
220
|
--ui-popover-my: 0;
|
|
202
221
|
--ui-popover-mx: calc(var(--spacing) * 1.5);
|
|
203
222
|
}
|
|
204
223
|
|
|
205
224
|
:where([popover])[data-popover-side="right"][data-popover-align="end"] {
|
|
206
225
|
--ui-popover-position-area: inline-end span-block-start;
|
|
207
|
-
--ui-popover-origin:
|
|
226
|
+
--ui-popover-origin: bottom var(--_origin-inline-start);
|
|
208
227
|
--ui-popover-my: 0;
|
|
209
228
|
--ui-popover-mx: calc(var(--spacing) * 1.5);
|
|
210
229
|
}
|
|
@@ -212,21 +231,21 @@
|
|
|
212
231
|
:where([popover])[data-popover-side="left"]:not([data-popover-align]),
|
|
213
232
|
:where([popover])[data-popover-side="left"][data-popover-align="start"] {
|
|
214
233
|
--ui-popover-position-area: inline-start span-block-end;
|
|
215
|
-
--ui-popover-origin:
|
|
234
|
+
--ui-popover-origin: top var(--_origin-inline-end);
|
|
216
235
|
--ui-popover-my: 0;
|
|
217
236
|
--ui-popover-mx: calc(var(--spacing) * 1.5);
|
|
218
237
|
}
|
|
219
238
|
|
|
220
239
|
:where([popover])[data-popover-side="left"][data-popover-align="center"] {
|
|
221
240
|
--ui-popover-position-area: inline-start span-all;
|
|
222
|
-
--ui-popover-origin: center
|
|
241
|
+
--ui-popover-origin: center var(--_origin-inline-end);
|
|
223
242
|
--ui-popover-my: 0;
|
|
224
243
|
--ui-popover-mx: calc(var(--spacing) * 1.5);
|
|
225
244
|
}
|
|
226
245
|
|
|
227
246
|
:where([popover])[data-popover-side="left"][data-popover-align="end"] {
|
|
228
247
|
--ui-popover-position-area: inline-start span-block-start;
|
|
229
|
-
--ui-popover-origin:
|
|
248
|
+
--ui-popover-origin: bottom var(--_origin-inline-end);
|
|
230
249
|
--ui-popover-my: 0;
|
|
231
250
|
--ui-popover-mx: calc(var(--spacing) * 1.5);
|
|
232
251
|
}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* ::-moz-progress-bar) — never combine the two vendors in one
|
|
9
9
|
* selector list (an unknown pseudo invalidates the whole rule)
|
|
10
10
|
* @uses :indeterminate — animated stripe on the element background
|
|
11
|
+
* @uses corner-shape — round by default, so circles stay circles; a hook takes any shape
|
|
11
12
|
* @tokens --ui-progress-* (@layer variables)
|
|
12
13
|
* @consumedby meter.css
|
|
13
14
|
*/
|
|
@@ -17,6 +18,7 @@
|
|
|
17
18
|
--ui-progress-w: 100%;
|
|
18
19
|
--ui-progress-h: calc(var(--spacing) * 1.5);
|
|
19
20
|
--ui-progress-radius: var(--radius-full);
|
|
21
|
+
--ui-progress-corner-shape: round;
|
|
20
22
|
--ui-progress-bg: var(--color-muted);
|
|
21
23
|
--ui-progress-track-border: 1px solid transparent;
|
|
22
24
|
--ui-progress-bar-bg: var(--color-primary);
|
|
@@ -46,6 +48,7 @@
|
|
|
46
48
|
border-radius: calc(
|
|
47
49
|
var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-multiplier)
|
|
48
50
|
);
|
|
51
|
+
corner-shape: var(--_corner-shape-resolved, var(--ui-progress-corner-shape));
|
|
49
52
|
}
|
|
50
53
|
|
|
51
54
|
:where([data-ui~="progress"])::-webkit-progress-bar {
|
|
@@ -55,6 +58,7 @@
|
|
|
55
58
|
:where([data-ui~="progress"])::-webkit-progress-value {
|
|
56
59
|
background-color: var(--ui-progress-bar-bg);
|
|
57
60
|
border-radius: inherit;
|
|
61
|
+
corner-shape: inherit;
|
|
58
62
|
transition: inline-size var(--default-transition-duration)
|
|
59
63
|
var(--default-transition-timing-function);
|
|
60
64
|
}
|
|
@@ -62,6 +66,7 @@
|
|
|
62
66
|
:where([data-ui~="progress"])::-moz-progress-bar {
|
|
63
67
|
background-color: var(--ui-progress-bar-bg);
|
|
64
68
|
border-radius: inherit;
|
|
69
|
+
corner-shape: inherit;
|
|
65
70
|
}
|
|
66
71
|
|
|
67
72
|
/* Stripe on the element itself so it renders the same in every engine; the
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
* @layer variables, components
|
|
5
5
|
* @requires _layers.css, _variables.css, _properties.css (--_*-resolved, --_focus-shadow), fields.css (field-group layout, --ui-field-* surface/border)
|
|
6
6
|
* @uses appearance: none — custom circle + masked ::before dot when :checked
|
|
7
|
+
* @uses --_touch-min (touch screens) — the circle keeps its size; an invisible ::after
|
|
8
|
+
* centred on it is at least the touch floor square
|
|
9
|
+
* @uses corner-shape — round by default, so circles stay circles; a hook takes any shape
|
|
7
10
|
* @tokens --ui-radio-* (@layer variables)
|
|
8
11
|
*/
|
|
9
12
|
|
|
@@ -19,7 +22,8 @@
|
|
|
19
22
|
--ui-radio-border-color--hover: var(--ui-field-border-color--hover);
|
|
20
23
|
--ui-radio-border-color--checked: var(--color-primary);
|
|
21
24
|
--ui-radio-radius: var(--radius-full);
|
|
22
|
-
--ui-radio-
|
|
25
|
+
--ui-radio-corner-shape: round;
|
|
26
|
+
--ui-radio-dot-size: 1.125em;
|
|
23
27
|
--ui-radio-dot-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' fill='currentColor' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='6'/%3E%3C/svg%3E")
|
|
24
28
|
center / contain no-repeat;
|
|
25
29
|
}
|
|
@@ -43,6 +47,14 @@
|
|
|
43
47
|
block-size: calc(var(--_size-len) + var(--_size-num) * var(--spacing));
|
|
44
48
|
|
|
45
49
|
background-color: var(--_bg-resolved, var(--ui-radio-bg));
|
|
50
|
+
|
|
51
|
+
/* touch: the hit area, --_touch-min square at least; collapses to the box on a mouse */
|
|
52
|
+
&::after {
|
|
53
|
+
content: "";
|
|
54
|
+
position: absolute;
|
|
55
|
+
inset: min(0px, calc((100% - var(--_touch-min)) / 2));
|
|
56
|
+
}
|
|
57
|
+
|
|
46
58
|
border-width: var(--_border-width-resolved, var(--ui-radio-border-width));
|
|
47
59
|
border-style: var(--_border-style-resolved, var(--ui-radio-border-style));
|
|
48
60
|
border-color: var(--_border-color-resolved, var(--ui-radio-border-color));
|
|
@@ -51,11 +63,12 @@
|
|
|
51
63
|
border-radius: calc(
|
|
52
64
|
var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-multiplier)
|
|
53
65
|
);
|
|
66
|
+
corner-shape: var(--_corner-shape-resolved, var(--ui-radio-corner-shape));
|
|
54
67
|
|
|
55
68
|
/* centres the ::before dot */
|
|
56
69
|
display: inline-grid;
|
|
57
70
|
place-items: center;
|
|
58
|
-
background-clip:
|
|
71
|
+
background-clip: border-box;
|
|
59
72
|
|
|
60
73
|
cursor: pointer;
|
|
61
74
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* select.css: Select (:where([data-ui~="select"]) on customizable <select>)
|
|
3
3
|
*
|
|
4
4
|
* @layer variables, reset, components
|
|
5
|
-
* @requires _layers.css, _variables.css, fields.css, _reset.css, popover.css (--ui-popover-*), button.css (--ui-button-*)
|
|
5
|
+
* @requires _layers.css, _variables.css, fields.css, _reset.css, popover.css (--ui-popover-*), button.css (--ui-button-*), menu.css (--ui-menu-*)
|
|
6
6
|
* @uses appearance: base-select: customizable select
|
|
7
7
|
* @uses ::picker(select), ::picker-icon, selectedcontent, option::checkmark
|
|
8
8
|
* @uses @starting-style + allow-discrete: picker open animation
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
* @uses ui-multiselect (multiselect.ts): JS-projected dropdown for
|
|
14
14
|
* <select multiple> (base-select has no stable multi-select);
|
|
15
15
|
* degrades to the native multi listbox without JS
|
|
16
|
+
* @uses --_touch-min (touch screens) — the trigger and every option row grow to the touch floor
|
|
17
|
+
* @uses corner-shape — superellipse corners; unsupported browsers keep plain
|
|
18
|
+
* rounded corners
|
|
16
19
|
* @tokens --ui-select-* (@layer variables); picker panel reuses --ui-popover-* (owned in popover.css)
|
|
17
20
|
* @consumedby autocomplete.css, combobox.css, command.css (--ui-option-*, --ui-select-picker-icon-*)
|
|
18
21
|
*/
|
|
@@ -32,6 +35,7 @@
|
|
|
32
35
|
--ui-select-border-style: var(--ui-field-border-style);
|
|
33
36
|
--ui-select-border-color: var(--ui-field-border-color);
|
|
34
37
|
--ui-select-radius: var(--ui-field-radius);
|
|
38
|
+
--ui-select-corner-shape: var(--ui-field-corner-shape);
|
|
35
39
|
--ui-select-option-gap: var(--ui-field-option-gap);
|
|
36
40
|
|
|
37
41
|
/* Picker icon (trigger chevron) */
|
|
@@ -51,6 +55,7 @@
|
|
|
51
55
|
--ui-option-min-h: var(--ui-button-min-h);
|
|
52
56
|
--ui-option-icon-size: var(--ui-button-icon-size);
|
|
53
57
|
--ui-option-radius: var(--ui-menu-button-radius);
|
|
58
|
+
--ui-option-corner-shape: var(--ui-menu-button-corner-shape);
|
|
54
59
|
--ui-option-shadow: none;
|
|
55
60
|
|
|
56
61
|
--ui-option-bg: transparent;
|
|
@@ -85,6 +90,18 @@
|
|
|
85
90
|
appearance: base-select;
|
|
86
91
|
}
|
|
87
92
|
|
|
93
|
+
/* Inline-edge names for the placement matrix's origins, resolved on the
|
|
94
|
+
select (where the matrix sets them) so RTL mirrors them; see popover.css. */
|
|
95
|
+
:where([data-ui~="select"]) {
|
|
96
|
+
--_origin-inline-start: left;
|
|
97
|
+
--_origin-inline-end: right;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:where([data-ui~="select"]:dir(rtl)) {
|
|
101
|
+
--_origin-inline-start: right;
|
|
102
|
+
--_origin-inline-end: left;
|
|
103
|
+
}
|
|
104
|
+
|
|
88
105
|
:where([data-ui~="select"])::picker(select) {
|
|
89
106
|
transform-origin: var(--ui-popover-origin);
|
|
90
107
|
opacity: var(--ui-popover-opacity--start);
|
|
@@ -154,7 +171,7 @@
|
|
|
154
171
|
min-inline-size: calc(var(--_min-w-len) + var(--_min-w-num) * var(--spacing));
|
|
155
172
|
--_h-len: var(--_h-resolved, var(--ui-field-h));
|
|
156
173
|
--_h-num: var(--_h-resolved, var(--ui-field-h));
|
|
157
|
-
block-size: calc(var(--_h-len) + var(--_h-num) * var(--spacing));
|
|
174
|
+
block-size: max(calc(var(--_h-len) + var(--_h-num) * var(--spacing)), var(--_touch-min));
|
|
158
175
|
--_pl-len: var(--_pl-resolved, var(--ui-select-pl));
|
|
159
176
|
--_pl-num: var(--_pl-resolved, var(--ui-select-pl));
|
|
160
177
|
padding-inline-start: calc(var(--_pl-len) + var(--_pl-num) * var(--spacing));
|
|
@@ -177,6 +194,7 @@
|
|
|
177
194
|
border-radius: calc(
|
|
178
195
|
var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-multiplier)
|
|
179
196
|
);
|
|
197
|
+
corner-shape: var(--_corner-shape-resolved, var(--ui-select-corner-shape));
|
|
180
198
|
cursor: pointer;
|
|
181
199
|
|
|
182
200
|
/* the transparent outline keeps focus visible in forced-colors */
|
|
@@ -269,6 +287,7 @@
|
|
|
269
287
|
border-radius: calc(
|
|
270
288
|
var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-multiplier)
|
|
271
289
|
);
|
|
290
|
+
corner-shape: var(--_corner-shape-resolved, var(--ui-popover-corner-shape));
|
|
272
291
|
box-shadow: var(--ui-popover-shadow);
|
|
273
292
|
}
|
|
274
293
|
|
|
@@ -298,7 +317,7 @@
|
|
|
298
317
|
display: flex;
|
|
299
318
|
align-items: center;
|
|
300
319
|
gap: var(--ui-option-gap);
|
|
301
|
-
min-block-size: var(--ui-option-min-h);
|
|
320
|
+
min-block-size: max(var(--ui-option-min-h), var(--_touch-min));
|
|
302
321
|
padding-inline: var(--ui-option-px);
|
|
303
322
|
|
|
304
323
|
font-family: var(--ui-option-font-family);
|
|
@@ -311,6 +330,7 @@
|
|
|
311
330
|
border: var(--ui-option-border-width) var(--ui-option-border-style)
|
|
312
331
|
var(--ui-option-border-color);
|
|
313
332
|
border-radius: var(--ui-option-radius);
|
|
333
|
+
corner-shape: var(--ui-option-corner-shape);
|
|
314
334
|
box-shadow: var(--ui-option-shadow);
|
|
315
335
|
cursor: pointer;
|
|
316
336
|
|
|
@@ -427,7 +447,7 @@
|
|
|
427
447
|
display: flex;
|
|
428
448
|
align-items: center;
|
|
429
449
|
gap: var(--ui-option-gap);
|
|
430
|
-
min-block-size: var(--ui-option-min-h);
|
|
450
|
+
min-block-size: max(var(--ui-option-min-h), var(--_touch-min));
|
|
431
451
|
padding-inline: var(--ui-option-px);
|
|
432
452
|
|
|
433
453
|
font-family: var(--ui-option-font-family);
|
|
@@ -440,6 +460,7 @@
|
|
|
440
460
|
border: var(--ui-option-border-width) var(--ui-option-border-style)
|
|
441
461
|
var(--ui-option-border-color);
|
|
442
462
|
border-radius: var(--ui-option-radius);
|
|
463
|
+
corner-shape: var(--ui-option-corner-shape);
|
|
443
464
|
cursor: pointer;
|
|
444
465
|
|
|
445
466
|
transition: var(--default-transition);
|
|
@@ -503,14 +524,14 @@
|
|
|
503
524
|
}
|
|
504
525
|
|
|
505
526
|
:where([data-ui~="select"]):user-invalid {
|
|
506
|
-
--ui-field-bg:
|
|
507
|
-
--ui-field-bg--hover:
|
|
508
|
-
--ui-field-border-color: var(--color-destructive);
|
|
509
|
-
--ui-field-border-color--hover: var(--color-destructive);
|
|
510
|
-
--ui-field-border-color--focus-within: var(--color-destructive);
|
|
511
|
-
--ui-field-ring-color: var(--color-destructive);
|
|
527
|
+
--ui-field-bg: var(--color-destructive);
|
|
528
|
+
--ui-field-bg--hover: oklch(from var(--color-destructive) calc(l - 0.025) c h);
|
|
529
|
+
--ui-field-border-color: var(--color-destructive-foreground);
|
|
530
|
+
--ui-field-border-color--hover: var(--color-destructive-foreground);
|
|
531
|
+
--ui-field-border-color--focus-within: var(--color-destructive-foreground);
|
|
532
|
+
--ui-field-ring-color: var(--color-destructive-foreground);
|
|
512
533
|
|
|
513
|
-
border-color: var(--color-destructive);
|
|
534
|
+
border-color: var(--color-destructive-foreground);
|
|
514
535
|
}
|
|
515
536
|
}
|
|
516
537
|
|
|
@@ -522,7 +543,7 @@
|
|
|
522
543
|
:where([data-ui~="select"]:not([data-select-side]):not([data-select-align])),
|
|
523
544
|
:where([data-ui~="select"]:not([data-select-side])[data-select-align="start"]) {
|
|
524
545
|
--ui-popover-position-area: block-end span-inline-end;
|
|
525
|
-
--ui-popover-origin: top
|
|
546
|
+
--ui-popover-origin: top var(--_origin-inline-start);
|
|
526
547
|
--ui-popover-my: calc(var(--spacing) * 1.5);
|
|
527
548
|
--ui-popover-mx: 0;
|
|
528
549
|
}
|
|
@@ -538,7 +559,7 @@
|
|
|
538
559
|
:where([data-ui~="select"])[data-select-side="bottom"][data-select-align="end"],
|
|
539
560
|
:where([data-ui~="select"]:not([data-select-side])[data-select-align="end"]) {
|
|
540
561
|
--ui-popover-position-area: block-end span-inline-start;
|
|
541
|
-
--ui-popover-origin: top
|
|
562
|
+
--ui-popover-origin: top var(--_origin-inline-end);
|
|
542
563
|
--ui-popover-my: calc(var(--spacing) * 1.5);
|
|
543
564
|
--ui-popover-mx: 0;
|
|
544
565
|
}
|
|
@@ -546,7 +567,7 @@
|
|
|
546
567
|
:where([data-ui~="select"])[data-select-side="top"]:not([data-select-align]),
|
|
547
568
|
:where([data-ui~="select"])[data-select-side="top"][data-select-align="start"] {
|
|
548
569
|
--ui-popover-position-area: block-start span-inline-end;
|
|
549
|
-
--ui-popover-origin: bottom
|
|
570
|
+
--ui-popover-origin: bottom var(--_origin-inline-start);
|
|
550
571
|
--ui-popover-my: calc(var(--spacing) * 1.5);
|
|
551
572
|
--ui-popover-mx: 0;
|
|
552
573
|
}
|
|
@@ -560,7 +581,7 @@
|
|
|
560
581
|
|
|
561
582
|
:where([data-ui~="select"])[data-select-side="top"][data-select-align="end"] {
|
|
562
583
|
--ui-popover-position-area: block-start span-inline-start;
|
|
563
|
-
--ui-popover-origin: bottom
|
|
584
|
+
--ui-popover-origin: bottom var(--_origin-inline-end);
|
|
564
585
|
--ui-popover-my: calc(var(--spacing) * 1.5);
|
|
565
586
|
--ui-popover-mx: 0;
|
|
566
587
|
}
|
|
@@ -568,21 +589,21 @@
|
|
|
568
589
|
:where([data-ui~="select"])[data-select-side="right"]:not([data-select-align]),
|
|
569
590
|
:where([data-ui~="select"])[data-select-side="right"][data-select-align="start"] {
|
|
570
591
|
--ui-popover-position-area: inline-end span-block-end;
|
|
571
|
-
--ui-popover-origin:
|
|
592
|
+
--ui-popover-origin: top var(--_origin-inline-start);
|
|
572
593
|
--ui-popover-my: 0;
|
|
573
594
|
--ui-popover-mx: calc(var(--spacing) * 1.5);
|
|
574
595
|
}
|
|
575
596
|
|
|
576
597
|
:where([data-ui~="select"])[data-select-side="right"][data-select-align="center"] {
|
|
577
598
|
--ui-popover-position-area: inline-end span-all;
|
|
578
|
-
--ui-popover-origin: center
|
|
599
|
+
--ui-popover-origin: center var(--_origin-inline-start);
|
|
579
600
|
--ui-popover-my: 0;
|
|
580
601
|
--ui-popover-mx: calc(var(--spacing) * 1.5);
|
|
581
602
|
}
|
|
582
603
|
|
|
583
604
|
:where([data-ui~="select"])[data-select-side="right"][data-select-align="end"] {
|
|
584
605
|
--ui-popover-position-area: inline-end span-block-start;
|
|
585
|
-
--ui-popover-origin:
|
|
606
|
+
--ui-popover-origin: bottom var(--_origin-inline-start);
|
|
586
607
|
--ui-popover-my: 0;
|
|
587
608
|
--ui-popover-mx: calc(var(--spacing) * 1.5);
|
|
588
609
|
}
|
|
@@ -590,21 +611,21 @@
|
|
|
590
611
|
:where([data-ui~="select"])[data-select-side="left"]:not([data-select-align]),
|
|
591
612
|
:where([data-ui~="select"])[data-select-side="left"][data-select-align="start"] {
|
|
592
613
|
--ui-popover-position-area: inline-start span-block-end;
|
|
593
|
-
--ui-popover-origin:
|
|
614
|
+
--ui-popover-origin: top var(--_origin-inline-end);
|
|
594
615
|
--ui-popover-my: 0;
|
|
595
616
|
--ui-popover-mx: calc(var(--spacing) * 1.5);
|
|
596
617
|
}
|
|
597
618
|
|
|
598
619
|
:where([data-ui~="select"])[data-select-side="left"][data-select-align="center"] {
|
|
599
620
|
--ui-popover-position-area: inline-start span-all;
|
|
600
|
-
--ui-popover-origin: center
|
|
621
|
+
--ui-popover-origin: center var(--_origin-inline-end);
|
|
601
622
|
--ui-popover-my: 0;
|
|
602
623
|
--ui-popover-mx: calc(var(--spacing) * 1.5);
|
|
603
624
|
}
|
|
604
625
|
|
|
605
626
|
:where([data-ui~="select"])[data-select-side="left"][data-select-align="end"] {
|
|
606
627
|
--ui-popover-position-area: inline-start span-block-start;
|
|
607
|
-
--ui-popover-origin:
|
|
628
|
+
--ui-popover-origin: bottom var(--_origin-inline-end);
|
|
608
629
|
--ui-popover-my: 0;
|
|
609
630
|
--ui-popover-mx: calc(var(--spacing) * 1.5);
|
|
610
631
|
}
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
* @layer variables, reset
|
|
5
5
|
* @requires _layers.css, _variables.css
|
|
6
6
|
* @uses appearance: none — redraws track + thumb from theme tokens
|
|
7
|
+
* @uses --_touch-min (touch screens) — the transparent input grows to the touch
|
|
8
|
+
* floor; the track stays --ui-slider-track-h and the thumb centred on it
|
|
9
|
+
* @uses corner-shape — round by default, so circles stay circles; a hook takes any shape
|
|
7
10
|
* @tokens --ui-slider-* (@layer variables, on :root so subtree hooks work)
|
|
8
11
|
*
|
|
9
12
|
* Note: The active region is NOT filled (parity across engines); add a paint
|
|
@@ -19,12 +22,14 @@
|
|
|
19
22
|
--ui-slider-track-bg: var(--color-muted);
|
|
20
23
|
--ui-slider-track-border: 1px solid var(--color-muted);
|
|
21
24
|
--ui-slider-track-radius: var(--radius-full);
|
|
25
|
+
--ui-slider-track-corner-shape: round;
|
|
22
26
|
--ui-slider-thumb-size: calc(var(--spacing) * 4);
|
|
23
27
|
--ui-slider-thumb-bg: var(--color-background);
|
|
24
28
|
|
|
25
29
|
--ui-slider-thumb-shadow: var(--shadow-xs);
|
|
26
30
|
--ui-slider-thumb-border: 1px solid var(--color-border);
|
|
27
31
|
--ui-slider-thumb-radius: var(--radius-full);
|
|
32
|
+
--ui-slider-thumb-corner-shape: round;
|
|
28
33
|
}
|
|
29
34
|
}
|
|
30
35
|
|
|
@@ -36,9 +41,11 @@
|
|
|
36
41
|
-webkit-appearance: none;
|
|
37
42
|
appearance: none;
|
|
38
43
|
inline-size: 100%;
|
|
44
|
+
min-block-size: var(--_touch-min);
|
|
39
45
|
background: transparent;
|
|
40
46
|
cursor: grab;
|
|
41
47
|
border-radius: var(--ui-slider-track-radius);
|
|
48
|
+
corner-shape: var(--ui-slider-track-corner-shape);
|
|
42
49
|
|
|
43
50
|
/* transparent outline keeps focus visible in forced-colors / high-contrast
|
|
44
51
|
modes; the visible focus ring lives on the thumb via --shadow-ring */
|
|
@@ -52,6 +59,7 @@
|
|
|
52
59
|
background: var(--ui-slider-track-bg);
|
|
53
60
|
border: var(--ui-slider-track-border);
|
|
54
61
|
border-radius: var(--ui-slider-track-radius);
|
|
62
|
+
corner-shape: var(--ui-slider-track-corner-shape);
|
|
55
63
|
}
|
|
56
64
|
|
|
57
65
|
:where(input[type="range"])::-moz-range-track {
|
|
@@ -60,6 +68,7 @@
|
|
|
60
68
|
background: var(--ui-slider-track-bg);
|
|
61
69
|
border: var(--ui-slider-track-border);
|
|
62
70
|
border-radius: var(--ui-slider-track-radius);
|
|
71
|
+
corner-shape: var(--ui-slider-track-corner-shape);
|
|
63
72
|
}
|
|
64
73
|
|
|
65
74
|
:where(input[type="range"])::-webkit-slider-thumb {
|
|
@@ -82,6 +91,7 @@
|
|
|
82
91
|
background-color: var(--ui-slider-thumb-bg);
|
|
83
92
|
border: var(--ui-slider-thumb-border);
|
|
84
93
|
border-radius: var(--ui-slider-thumb-radius);
|
|
94
|
+
corner-shape: var(--ui-slider-thumb-corner-shape);
|
|
85
95
|
|
|
86
96
|
transition: var(--default-transition);
|
|
87
97
|
}
|
|
@@ -99,6 +109,7 @@
|
|
|
99
109
|
background-color: var(--ui-slider-thumb-bg);
|
|
100
110
|
border: var(--ui-slider-thumb-border);
|
|
101
111
|
border-radius: var(--ui-slider-thumb-radius);
|
|
112
|
+
corner-shape: var(--ui-slider-thumb-corner-shape);
|
|
102
113
|
|
|
103
114
|
box-shadow:
|
|
104
115
|
0 0 0 var(--_ring-offset-width) var(--ring-offset-shadow-color),
|