@zazz-ui/core 0.10.0 → 0.12.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 +3 -3
- package/CHANGELOG.md +175 -0
- package/README.md +2 -2
- package/dist/{csp-DR-s45Kg.js → csp-LRx1fynI.js} +1 -1
- package/dist/sri.json +53 -53
- package/dist/zazz.css +1 -1
- package/dist/zazz.js +1 -1
- package/editor/zazz.css-data.json +184 -4
- package/editor/zazz.html-data.json +32 -0
- package/editor/zazz.language-data.json +209 -42
- package/editor/zazz.lint-data.json +1750 -1652
- package/package.json +5 -4
- package/src/base/_defaults.css +8 -2
- package/src/base/_properties-2xl.css +2 -0
- package/src/base/_properties-lg.css +2 -0
- package/src/base/_properties-md.css +2 -0
- package/src/base/_properties-sm.css +2 -0
- package/src/base/_properties-xl.css +2 -0
- package/src/base/_properties.css +6 -0
- package/src/base/_shadows.css +28 -28
- package/src/base/_utilities-box.css +3 -2
- package/src/base/_utilities-effects.css +25 -4
- package/src/base/_utilities-tier-2xl.css +1 -0
- package/src/base/_utilities-tier-lg.css +1 -0
- package/src/base/_utilities-tier-md.css +1 -0
- package/src/base/_utilities-tier-sm.css +1 -0
- package/src/base/_utilities-tier-xl.css +1 -0
- package/src/base/_variables.css +32 -2
- package/src/base/csp.d.ts.map +1 -1
- package/src/base/csp.js +7 -3
- package/src/base/csp.ts +9 -3
- package/src/base/kit-styling.d.ts.map +1 -1
- package/src/base/kit-styling.js +172 -158
- package/src/base/kit-styling.ts +172 -158
- package/src/base/utilities.d.ts +4 -1
- package/src/base/utilities.d.ts.map +1 -1
- package/src/base/utilities.js +28 -1
- package/src/base/utilities.ts +33 -2
- package/src/base/zazz-element.d.ts +1 -1
- package/src/base/zazz-element.js +1 -1
- package/src/base/zazz-element.ts +1 -1
- package/src/manifest.d.ts +1 -1
- package/src/manifest.d.ts.map +1 -1
- package/src/manifest.js +10 -2
- package/src/manifest.ts +10 -2
- package/src/primitives/accordion/accordion.css +61 -12
- package/src/primitives/alert-dialog/alert-dialog.html +14 -14
- package/src/primitives/badge/badge.css +33 -9
- package/src/primitives/button/button.css +57 -16
- package/src/primitives/callout/callout.css +2 -0
- package/src/primitives/card/card-article.html +115 -0
- package/src/primitives/card/card-horizontal.html +83 -0
- package/src/primitives/card/card-login.html +56 -0
- package/src/primitives/card/card-product.html +78 -0
- package/src/primitives/card/card-subgrid.html +96 -295
- package/src/primitives/card/card.css +189 -9
- package/src/primitives/card/card.html +110 -147
- package/src/primitives/carousel/carousel.html +4 -4
- package/src/primitives/checkbox/checkbox.css +11 -0
- package/src/primitives/combobox/combobox.css +47 -5
- 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.map +1 -1
- package/src/primitives/debug/audit-core.js +17 -0
- package/src/primitives/debug/audit-core.ts +16 -0
- package/src/primitives/dialog/dialog.css +94 -40
- package/src/primitives/fields/fields.css +2 -0
- package/src/primitives/input/input.css +27 -3
- package/src/primitives/input-group/input-group.css +15 -5
- package/src/primitives/layout/layout.css +2 -0
- package/src/primitives/layout/layout.html +8 -11
- package/src/primitives/lightbox/lightbox.css +4 -4
- 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 +3 -3
- package/src/primitives/otp/otp.css +15 -2
- package/src/primitives/password-group/password-group.css +18 -5
- package/src/primitives/popover/popover.css +23 -10
- package/src/primitives/radio/radio.css +14 -2
- package/src/primitives/reveal/reveal.html +3 -3
- package/src/primitives/scroll-fade/scroll-fade.css +1 -1
- package/src/primitives/scroll-fade/scroll-fade.html +8 -12
- package/src/primitives/select/select.css +54 -17
- package/src/primitives/slider/slider.css +95 -42
- package/src/primitives/switch/switch.css +14 -2
- package/src/primitives/tabs/tabs.css +11 -2
- package/src/primitives/textarea/textarea.css +8 -4
- package/src/primitives/toggle/toggle.css +50 -4
- package/src/primitives/tooltip/tooltip.css +40 -25
|
@@ -1,173 +1,136 @@
|
|
|
1
|
-
<
|
|
2
|
-
href="#"
|
|
1
|
+
<div
|
|
3
2
|
style="
|
|
4
3
|
--display: grid;
|
|
5
|
-
--
|
|
4
|
+
--template-cols: repeat(auto-fit, minmax(min(100%, max(14rem, 40%)), 1fr));
|
|
5
|
+
--gap: 6;
|
|
6
|
+
--w: 100%;
|
|
6
7
|
"
|
|
7
8
|
>
|
|
8
|
-
<
|
|
9
|
+
<ui-card>
|
|
9
10
|
<figure
|
|
11
|
+
data-card-slot="header"
|
|
10
12
|
style="
|
|
11
|
-
--display: grid;
|
|
12
13
|
--aspect: 3 / 2;
|
|
13
|
-
--radius
|
|
14
|
-
--overflow:
|
|
14
|
+
--radius: var(--ui-card-radius);
|
|
15
|
+
--overflow: hidden;
|
|
16
|
+
"
|
|
17
|
+
>
|
|
18
|
+
<img
|
|
19
|
+
width="600"
|
|
20
|
+
height="400"
|
|
21
|
+
loading="lazy"
|
|
22
|
+
src="https://images.unsplash.com/photo-1564760055775-d63b17a55c44?auto=format&fit=crop&w=600&h=400&q=60"
|
|
23
|
+
alt="Elephants crossing a dusty riverbed"
|
|
24
|
+
style="
|
|
25
|
+
--size: 100%;
|
|
26
|
+
--object-fit: cover;
|
|
27
|
+
"
|
|
28
|
+
/>
|
|
29
|
+
</figure>
|
|
30
|
+
<hgroup
|
|
31
|
+
data-card-slot="body"
|
|
32
|
+
style="
|
|
33
|
+
--display: grid;
|
|
34
|
+
--gap: 1;
|
|
15
35
|
"
|
|
16
36
|
>
|
|
37
|
+
<h3 data-ui="text-lg">Default</h3>
|
|
38
|
+
<p data-ui="text-sm" style="--text: var(--color-muted-foreground)">
|
|
39
|
+
Bare: no padding, radius, or surface, so media runs edge to edge.
|
|
40
|
+
</p>
|
|
41
|
+
</hgroup>
|
|
42
|
+
<footer data-card-slot="footer">
|
|
43
|
+
<a href="#" data-ui="button" data-button-variant="outline">Read field notes</a>
|
|
44
|
+
</footer>
|
|
45
|
+
</ui-card>
|
|
46
|
+
<ui-card data-card-variant="outline">
|
|
47
|
+
<figure data-card-slot="header" style="--aspect: 3 / 2">
|
|
17
48
|
<img
|
|
18
|
-
width="
|
|
19
|
-
height="
|
|
49
|
+
width="600"
|
|
50
|
+
height="400"
|
|
20
51
|
loading="lazy"
|
|
21
|
-
src="https://images.unsplash.com/photo-1564760055775-d63b17a55c44?auto=format&fit=crop&w=
|
|
52
|
+
src="https://images.unsplash.com/photo-1564760055775-d63b17a55c44?auto=format&fit=crop&w=600&h=400&q=60"
|
|
22
53
|
alt="Elephants crossing a dusty riverbed"
|
|
23
54
|
style="
|
|
24
55
|
--size: 100%;
|
|
25
|
-
--opacity: 1;
|
|
26
|
-
--opacity--hover: 0.75;
|
|
27
|
-
--scale: 1;
|
|
28
|
-
--scale--hover: 1.02;
|
|
29
|
-
--transition: var(--default-transition);
|
|
30
56
|
--object-fit: cover;
|
|
31
57
|
"
|
|
32
58
|
/>
|
|
33
59
|
</figure>
|
|
34
|
-
<
|
|
60
|
+
<hgroup
|
|
61
|
+
data-card-slot="body"
|
|
35
62
|
style="
|
|
36
63
|
--display: grid;
|
|
37
|
-
--
|
|
38
|
-
--pb: 4;
|
|
39
|
-
--gap: 4;
|
|
64
|
+
--gap: 1;
|
|
40
65
|
"
|
|
41
66
|
>
|
|
42
|
-
<
|
|
67
|
+
<h3 data-ui="text-lg">Outline</h3>
|
|
68
|
+
<p data-ui="text-sm" style="--text: var(--color-muted-foreground)">
|
|
69
|
+
Padding, the radius, and a border. The header image bleeds to the card's edges.
|
|
70
|
+
</p>
|
|
71
|
+
</hgroup>
|
|
72
|
+
<footer data-card-slot="footer">
|
|
73
|
+
<a href="#" data-ui="button" data-button-variant="outline">Read field notes</a>
|
|
74
|
+
</footer>
|
|
75
|
+
</ui-card>
|
|
76
|
+
<ui-card data-card-variant="muted">
|
|
77
|
+
<figure data-card-slot="header" style="--aspect: 3 / 2">
|
|
78
|
+
<img
|
|
79
|
+
width="600"
|
|
80
|
+
height="400"
|
|
81
|
+
loading="lazy"
|
|
82
|
+
src="https://images.unsplash.com/photo-1564760055775-d63b17a55c44?auto=format&fit=crop&w=600&h=400&q=60"
|
|
83
|
+
alt="Elephants crossing a dusty riverbed"
|
|
43
84
|
style="
|
|
44
|
-
--
|
|
45
|
-
--
|
|
85
|
+
--size: 100%;
|
|
86
|
+
--object-fit: cover;
|
|
46
87
|
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
<p
|
|
74
|
-
style="
|
|
75
|
-
--font-size: var(--font-size-sm);
|
|
76
|
-
--leading: var(--leading-sm);
|
|
77
|
-
--tracking: var(--tracking-sm);
|
|
78
|
-
--line-clamp: 2;
|
|
79
|
-
--text: var(--color-muted-foreground);
|
|
80
|
-
"
|
|
81
|
-
>
|
|
82
|
-
Satellite collars reveal ancient routes herds still follow each dry season across the
|
|
83
|
-
floodplain.
|
|
84
|
-
</p>
|
|
85
|
-
</hgroup>
|
|
86
|
-
</header>
|
|
87
|
-
<footer
|
|
88
|
+
/>
|
|
89
|
+
</figure>
|
|
90
|
+
<hgroup
|
|
91
|
+
data-card-slot="body"
|
|
92
|
+
style="
|
|
93
|
+
--display: grid;
|
|
94
|
+
--gap: 1;
|
|
95
|
+
"
|
|
96
|
+
>
|
|
97
|
+
<h3 data-ui="text-lg">Muted</h3>
|
|
98
|
+
<p data-ui="text-sm" style="--text: var(--color-muted-foreground)">
|
|
99
|
+
Padding, the radius, and the muted surface, for quieter groupings.
|
|
100
|
+
</p>
|
|
101
|
+
</hgroup>
|
|
102
|
+
<footer data-card-slot="footer">
|
|
103
|
+
<a href="#" data-ui="button" data-button-variant="primary">Read field notes</a>
|
|
104
|
+
</footer>
|
|
105
|
+
</ui-card>
|
|
106
|
+
<ui-card data-card-variant="floating">
|
|
107
|
+
<figure data-card-slot="header" style="--aspect: 3 / 2">
|
|
108
|
+
<img
|
|
109
|
+
width="600"
|
|
110
|
+
height="400"
|
|
111
|
+
loading="lazy"
|
|
112
|
+
src="https://images.unsplash.com/photo-1564760055775-d63b17a55c44?auto=format&fit=crop&w=600&h=400&q=60"
|
|
113
|
+
alt="Elephants crossing a dusty riverbed"
|
|
88
114
|
style="
|
|
89
|
-
--
|
|
90
|
-
--
|
|
91
|
-
--pt: 4;
|
|
92
|
-
--gap: 4;
|
|
93
|
-
--border-t: 1;
|
|
115
|
+
--size: 100%;
|
|
116
|
+
--object-fit: cover;
|
|
94
117
|
"
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
<img
|
|
115
|
-
width="64"
|
|
116
|
-
height="64"
|
|
117
|
-
loading="lazy"
|
|
118
|
-
src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?auto=format&fit=facearea&facepad=2&w=64&h=64&q=90"
|
|
119
|
-
alt="John Doe"
|
|
120
|
-
aria-hidden="true"
|
|
121
|
-
style="
|
|
122
|
-
--order: 9999;
|
|
123
|
-
--size: 100%;
|
|
124
|
-
--bg: transparent;
|
|
125
|
-
--object-fit: cover;
|
|
126
|
-
"
|
|
127
|
-
/>
|
|
128
|
-
<figcaption
|
|
129
|
-
style="
|
|
130
|
-
--display: flex;
|
|
131
|
-
--items: center;
|
|
132
|
-
--justify: center;
|
|
133
|
-
--order: -9999;
|
|
134
|
-
--size: 100%;
|
|
135
|
-
--font-size: var(--font-size-md);
|
|
136
|
-
--font-weight: strong;
|
|
137
|
-
--leading: var(--leading-md);
|
|
138
|
-
--tracking: var(--tracking-md);
|
|
139
|
-
--text-align: center;
|
|
140
|
-
--text: var(--color-primary-foreground);
|
|
141
|
-
--bg: var(--color-primary);
|
|
142
|
-
"
|
|
143
|
-
>
|
|
144
|
-
<span style="--sr: only">John Doe</span>
|
|
145
|
-
<span aria-hidden="true">JD</span>
|
|
146
|
-
</figcaption>
|
|
147
|
-
</figure>
|
|
148
|
-
<div style="--display: flex-col">
|
|
149
|
-
<span
|
|
150
|
-
style="
|
|
151
|
-
--font-size: var(--font-size-sm);
|
|
152
|
-
--font-weight: strong;
|
|
153
|
-
--leading: var(--leading-sm);
|
|
154
|
-
--leading: 1;
|
|
155
|
-
--tracking: var(--tracking-sm);
|
|
156
|
-
"
|
|
157
|
-
>John Doe</span
|
|
158
|
-
>
|
|
159
|
-
<span
|
|
160
|
-
style="
|
|
161
|
-
--font-size: var(--font-size-xs);
|
|
162
|
-
--leading: var(--leading-xs);
|
|
163
|
-
--tracking: var(--tracking-xs);
|
|
164
|
-
--text: var(--color-muted-foreground);
|
|
165
|
-
"
|
|
166
|
-
>Founder, ACME Inc.</span
|
|
167
|
-
>
|
|
168
|
-
</div>
|
|
169
|
-
</div>
|
|
170
|
-
</footer>
|
|
171
|
-
</div>
|
|
172
|
-
</div>
|
|
173
|
-
</a>
|
|
118
|
+
/>
|
|
119
|
+
</figure>
|
|
120
|
+
<hgroup
|
|
121
|
+
data-card-slot="body"
|
|
122
|
+
style="
|
|
123
|
+
--display: grid;
|
|
124
|
+
--gap: 1;
|
|
125
|
+
"
|
|
126
|
+
>
|
|
127
|
+
<h3 data-ui="text-lg">Floating</h3>
|
|
128
|
+
<p data-ui="text-sm" style="--text: var(--color-muted-foreground)">
|
|
129
|
+
Padding, the radius, the card surface, a border, and a small shadow.
|
|
130
|
+
</p>
|
|
131
|
+
</hgroup>
|
|
132
|
+
<footer data-card-slot="footer">
|
|
133
|
+
<a href="#" data-ui="button" data-button-variant="primary">Read field notes</a>
|
|
134
|
+
</footer>
|
|
135
|
+
</ui-card>
|
|
136
|
+
</div>
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
--gap: 4;
|
|
98
98
|
--text: var(--color-card-foreground);
|
|
99
99
|
--bg: var(--color-card);
|
|
100
|
-
--
|
|
100
|
+
--border: 1;
|
|
101
101
|
--radius: 2.5;
|
|
102
102
|
--overflow: clip;
|
|
103
103
|
"
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
--gap: 4;
|
|
240
240
|
--text: var(--color-card-foreground);
|
|
241
241
|
--bg: var(--color-card);
|
|
242
|
-
--
|
|
242
|
+
--border: 1;
|
|
243
243
|
--radius: 2.5;
|
|
244
244
|
--overflow: clip;
|
|
245
245
|
"
|
|
@@ -381,7 +381,7 @@
|
|
|
381
381
|
--gap: 4;
|
|
382
382
|
--text: var(--color-card-foreground);
|
|
383
383
|
--bg: var(--color-card);
|
|
384
|
-
--
|
|
384
|
+
--border: 1;
|
|
385
385
|
--radius: 2.5;
|
|
386
386
|
--overflow: clip;
|
|
387
387
|
"
|
|
@@ -523,7 +523,7 @@
|
|
|
523
523
|
--gap: 4;
|
|
524
524
|
--text: var(--color-card-foreground);
|
|
525
525
|
--bg: var(--color-card);
|
|
526
|
-
--
|
|
526
|
+
--border: 1;
|
|
527
527
|
--radius: 2.5;
|
|
528
528
|
--overflow: clip;
|
|
529
529
|
"
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* @layer variables, reset
|
|
5
5
|
* @requires _layers.css, _variables.css, _properties.css (--_*-resolved, --_focus-shadow), fields.css (--ui-field-* background/border)
|
|
6
6
|
* @uses appearance: none — redraws the native control from theme tokens
|
|
7
|
+
* @uses --_touch-min (touch screens) — the box keeps its size; an invisible ::after
|
|
8
|
+
* centred on it is at least the touch floor square
|
|
7
9
|
* @uses checked/indeterminate fill with --primary and layer a glyph (never color alone)
|
|
8
10
|
* @uses corner-shape — superellipse corners; unsupported browsers keep plain
|
|
9
11
|
* rounded corners
|
|
@@ -46,8 +48,17 @@
|
|
|
46
48
|
--_size-num: var(--_size-resolved, var(--ui-checkbox-size));
|
|
47
49
|
inline-size: calc(var(--_size-len) + var(--_size-num) * var(--spacing));
|
|
48
50
|
block-size: calc(var(--_size-len) + var(--_size-num) * var(--spacing));
|
|
51
|
+
min-inline-size: var(--spacing-control-min);
|
|
52
|
+
min-block-size: var(--spacing-control-min);
|
|
49
53
|
|
|
50
54
|
background-color: var(--_bg-resolved, var(--ui-checkbox-bg));
|
|
55
|
+
|
|
56
|
+
/* touch: the hit area, --_touch-min square at least; collapses to the box on a mouse */
|
|
57
|
+
&::after {
|
|
58
|
+
content: "";
|
|
59
|
+
position: absolute;
|
|
60
|
+
inset: min(0px, calc((100% - var(--_touch-min)) / 2));
|
|
61
|
+
}
|
|
51
62
|
border-width: var(--_border-width-resolved, var(--ui-checkbox-border-width));
|
|
52
63
|
border-style: var(--_border-style-resolved, var(--ui-checkbox-border-style));
|
|
53
64
|
border-color: var(--_border-color-resolved, var(--ui-checkbox-border-color));
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
* select.css (--ui-option-*, --ui-select-picker-icon-*),
|
|
8
8
|
* menu.css (--ui-menu-shadow)
|
|
9
9
|
* @uses [popover="manual"]: panel opened/closed by combobox.ts
|
|
10
|
+
* @uses --_touch-min (touch screens): the control grows to the touch floor (each inline
|
|
11
|
+
* side gains half of what its height grew); tag-remove
|
|
12
|
+
* keeps its box and extends an invisible ::after hit area (the trigger needs none:
|
|
13
|
+
* the whole control is one hit target)
|
|
10
14
|
* @uses anchor-name, anchor-scope, position-anchor: tether panel to the control
|
|
11
15
|
* @uses anchor-size(width): match panel width to the control (Baseline 2026)
|
|
12
16
|
* @uses :has(): chevron rotation, group + empty-state visibility
|
|
@@ -104,16 +108,39 @@
|
|
|
104
108
|
block-size: calc(var(--_h-len) + var(--_h-num) * var(--spacing));
|
|
105
109
|
--_min-h-len: var(--_min-h-resolved, var(--ui-combobox-control-min-h));
|
|
106
110
|
--_min-h-num: var(--_min-h-resolved, var(--ui-combobox-control-min-h));
|
|
107
|
-
|
|
111
|
+
/* the last term keeps one line plus --ui-field-py and the border above and below at a small
|
|
112
|
+
--spacing (see input.css) */
|
|
113
|
+
min-block-size: max(
|
|
114
|
+
calc(var(--_min-h-len) + var(--_min-h-num) * var(--spacing)),
|
|
115
|
+
var(--_touch-min),
|
|
116
|
+
calc(
|
|
117
|
+
1lh + 2 *
|
|
118
|
+
(var(--ui-field-py) + var(--_border-width-resolved, var(--ui-combobox-border-width)))
|
|
119
|
+
)
|
|
120
|
+
);
|
|
121
|
+
/* half of what the touch floor added to the height, on each inline side. The height
|
|
122
|
+
is the larger of --h and --min-h: the single control sets one and the multiselect
|
|
123
|
+
the other, and the unset one (auto) reads as 0 */
|
|
124
|
+
--_touch-px: max(
|
|
125
|
+
0px,
|
|
126
|
+
(
|
|
127
|
+
var(--_touch-min) -
|
|
128
|
+
max(
|
|
129
|
+
calc(var(--_h-len) + var(--_h-num) * var(--spacing)),
|
|
130
|
+
calc(var(--_min-h-len) + var(--_min-h-num) * var(--spacing))
|
|
131
|
+
)
|
|
132
|
+
) /
|
|
133
|
+
2
|
|
134
|
+
);
|
|
108
135
|
--_py-len: var(--_py-resolved, var(--ui-combobox-control-py));
|
|
109
136
|
--_py-num: var(--_py-resolved, var(--ui-combobox-control-py));
|
|
110
137
|
padding-block: calc(var(--_py-len) + var(--_py-num) * var(--spacing));
|
|
111
138
|
--_pl-len: var(--_pl-resolved, var(--ui-combobox-pl));
|
|
112
139
|
--_pl-num: var(--_pl-resolved, var(--ui-combobox-pl));
|
|
113
|
-
padding-inline-start: calc(var(--_pl-len) + var(--_pl-num) * var(--spacing));
|
|
140
|
+
padding-inline-start: calc(var(--_pl-len) + var(--_pl-num) * var(--spacing) + var(--_touch-px));
|
|
114
141
|
--_pr-len: var(--_pr-resolved, var(--ui-combobox-pr));
|
|
115
142
|
--_pr-num: var(--_pr-resolved, var(--ui-combobox-pr));
|
|
116
|
-
padding-inline-end: calc(var(--_pr-len) + var(--_pr-num) * var(--spacing));
|
|
143
|
+
padding-inline-end: calc(var(--_pr-len) + var(--_pr-num) * var(--spacing) + var(--_touch-px));
|
|
117
144
|
|
|
118
145
|
font-size: var(--_font-size-resolved, var(--ui-field-font-size));
|
|
119
146
|
line-height: var(--_leading-resolved, var(--ui-field-leading));
|
|
@@ -320,11 +347,16 @@
|
|
|
320
347
|
}
|
|
321
348
|
|
|
322
349
|
:where(ui-combobox, [data-ui~="combobox"]) [data-combobox-slot~="tag-remove"] {
|
|
350
|
+
position: relative;
|
|
323
351
|
display: grid;
|
|
324
352
|
place-items: center;
|
|
325
353
|
flex-shrink: 0;
|
|
326
354
|
inline-size: var(--ui-combobox-tag-remove-size);
|
|
327
355
|
block-size: var(--ui-combobox-tag-remove-size);
|
|
356
|
+
min-inline-size: var(--spacing-control-min);
|
|
357
|
+
min-block-size: var(--spacing-control-min);
|
|
358
|
+
/* the floor never makes the tag taller: what it adds hangs into the tag's padding */
|
|
359
|
+
margin-block: min(0px, (var(--ui-combobox-tag-remove-size) - var(--spacing-control-min)) / 2);
|
|
328
360
|
border-radius: var(--ui-combobox-tag-remove-radius);
|
|
329
361
|
corner-shape: var(--ui-combobox-tag-remove-corner-shape);
|
|
330
362
|
opacity: var(--ui-combobox-tag-remove-opacity);
|
|
@@ -332,10 +364,20 @@
|
|
|
332
364
|
transition: var(--default-transition);
|
|
333
365
|
}
|
|
334
366
|
|
|
367
|
+
/* touch: the remove glyph is ~12px; ::after extends its hit area to the touch floor
|
|
368
|
+
block-wise and to 24px (WCAG 2.5.8) inline, so the tag's own text stays tappable */
|
|
369
|
+
:where(ui-combobox, [data-ui~="combobox"]) [data-combobox-slot~="tag-remove"]::after {
|
|
370
|
+
content: "";
|
|
371
|
+
position: absolute;
|
|
372
|
+
inset-block: min(0px, calc((100% - var(--_touch-min)) / 2));
|
|
373
|
+
inset-inline: min(0px, calc((100% - min(24px, var(--_touch-min))) / 2));
|
|
374
|
+
}
|
|
375
|
+
|
|
335
376
|
:where(ui-combobox, [data-ui~="combobox"]) [data-combobox-slot~="tag-remove"]::before {
|
|
336
377
|
content: "";
|
|
337
|
-
|
|
338
|
-
|
|
378
|
+
/* the glyph keeps its own size inside the floored button */
|
|
379
|
+
inline-size: var(--ui-combobox-tag-remove-size);
|
|
380
|
+
block-size: var(--ui-combobox-tag-remove-size);
|
|
339
381
|
background-color: var(--ui-combobox-tag-remove-color);
|
|
340
382
|
mask: var(--ui-combobox-tag-remove-mask) center / contain no-repeat;
|
|
341
383
|
}
|
|
@@ -21,117 +21,119 @@
|
|
|
21
21
|
<ui-kbd-group><kbd>⌘</kbd><kbd>⇧</kbd><kbd>K</kbd></ui-kbd-group>
|
|
22
22
|
</button>
|
|
23
23
|
<dialog id="command-example-dialog-1" data-ui="dialog" data-command-slot="panel" closedby="any">
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
data-button-variant="ghost"
|
|
39
|
-
data-button-size="icon"
|
|
40
|
-
type="button"
|
|
41
|
-
command="close"
|
|
42
|
-
commandfor="command-example-dialog-1"
|
|
43
|
-
aria-label="Close"
|
|
44
|
-
>
|
|
45
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256">
|
|
46
|
-
<rect width="256" height="256" fill="none" />
|
|
47
|
-
<line
|
|
48
|
-
x1="200"
|
|
49
|
-
y1="56"
|
|
50
|
-
x2="56"
|
|
51
|
-
y2="200"
|
|
52
|
-
fill="none"
|
|
53
|
-
stroke="currentColor"
|
|
54
|
-
stroke-linecap="round"
|
|
55
|
-
stroke-linejoin="round"
|
|
56
|
-
stroke-width="16"
|
|
57
|
-
/>
|
|
58
|
-
<line
|
|
59
|
-
x1="200"
|
|
60
|
-
y1="200"
|
|
61
|
-
x2="56"
|
|
62
|
-
y2="56"
|
|
63
|
-
fill="none"
|
|
64
|
-
stroke="currentColor"
|
|
65
|
-
stroke-linecap="round"
|
|
66
|
-
stroke-linejoin="round"
|
|
67
|
-
stroke-width="16"
|
|
68
|
-
/>
|
|
69
|
-
</svg>
|
|
70
|
-
</button>
|
|
71
|
-
</header>
|
|
72
|
-
<div role="listbox" data-command-slot="list" aria-label="Commands">
|
|
73
|
-
<div role="group" data-command-slot="group" aria-labelledby="command-example-dialog-1-nav">
|
|
74
|
-
<span
|
|
75
|
-
data-command-slot="group-label"
|
|
76
|
-
id="command-example-dialog-1-nav"
|
|
77
|
-
style="
|
|
78
|
-
--display: inline-flex;
|
|
79
|
-
--font-size: var(--font-size-eyebrow);
|
|
80
|
-
--font-weight: strong;
|
|
81
|
-
--font-weight: var(--font-weight-eyebrow);
|
|
82
|
-
--leading: var(--leading-eyebrow);
|
|
83
|
-
--tracking: var(--tracking-eyebrow);
|
|
84
|
-
--text-transform: uppercase;
|
|
85
|
-
--text: var(--color-muted-foreground);
|
|
86
|
-
"
|
|
87
|
-
>Navigation</span
|
|
88
|
-
>
|
|
89
|
-
<a
|
|
90
|
-
role="option"
|
|
91
|
-
data-command-slot="item"
|
|
92
|
-
data-ui="button"
|
|
93
|
-
data-button-variant="ghost"
|
|
94
|
-
href="#home"
|
|
95
|
-
tabindex="-1"
|
|
96
|
-
style="--justify: start"
|
|
97
|
-
>
|
|
98
|
-
Go home
|
|
99
|
-
</a>
|
|
100
|
-
<a
|
|
101
|
-
role="option"
|
|
102
|
-
data-command-slot="item"
|
|
24
|
+
<div data-dialog-slot="content">
|
|
25
|
+
<header data-command-slot="header" data-dialog-slot="header">
|
|
26
|
+
<input
|
|
27
|
+
data-command-slot="input"
|
|
28
|
+
name="search"
|
|
29
|
+
type="text"
|
|
30
|
+
placeholder="Type a command or search..."
|
|
31
|
+
role="combobox"
|
|
32
|
+
aria-expanded="false"
|
|
33
|
+
aria-autocomplete="list"
|
|
34
|
+
autocomplete="off"
|
|
35
|
+
aria-label="Search commands"
|
|
36
|
+
/>
|
|
37
|
+
<button
|
|
103
38
|
data-ui="button"
|
|
104
39
|
data-button-variant="ghost"
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
40
|
+
data-button-size="icon"
|
|
41
|
+
type="button"
|
|
42
|
+
command="close"
|
|
43
|
+
commandfor="command-example-dialog-1"
|
|
44
|
+
aria-label="Close"
|
|
109
45
|
>
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
46
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256">
|
|
47
|
+
<rect width="256" height="256" fill="none" />
|
|
48
|
+
<line
|
|
49
|
+
x1="200"
|
|
50
|
+
y1="56"
|
|
51
|
+
x2="56"
|
|
52
|
+
y2="200"
|
|
53
|
+
fill="none"
|
|
54
|
+
stroke="currentColor"
|
|
55
|
+
stroke-linecap="round"
|
|
56
|
+
stroke-linejoin="round"
|
|
57
|
+
stroke-width="16"
|
|
58
|
+
/>
|
|
59
|
+
<line
|
|
60
|
+
x1="200"
|
|
61
|
+
y1="200"
|
|
62
|
+
x2="56"
|
|
63
|
+
y2="56"
|
|
64
|
+
fill="none"
|
|
65
|
+
stroke="currentColor"
|
|
66
|
+
stroke-linecap="round"
|
|
67
|
+
stroke-linejoin="round"
|
|
68
|
+
stroke-width="16"
|
|
69
|
+
/>
|
|
70
|
+
</svg>
|
|
71
|
+
</button>
|
|
72
|
+
</header>
|
|
73
|
+
<div role="listbox" data-command-slot="list" data-dialog-slot="body" aria-label="Commands">
|
|
74
|
+
<div role="group" data-command-slot="group" aria-labelledby="command-example-dialog-1-nav">
|
|
75
|
+
<span
|
|
76
|
+
data-command-slot="group-label"
|
|
77
|
+
id="command-example-dialog-1-nav"
|
|
78
|
+
style="
|
|
79
|
+
--display: inline-flex;
|
|
80
|
+
--font-size: var(--font-size-eyebrow);
|
|
81
|
+
--font-weight: strong;
|
|
82
|
+
--font-weight: var(--font-weight-eyebrow);
|
|
83
|
+
--leading: var(--leading-eyebrow);
|
|
84
|
+
--tracking: var(--tracking-eyebrow);
|
|
85
|
+
--text-transform: uppercase;
|
|
86
|
+
--text: var(--color-muted-foreground);
|
|
87
|
+
"
|
|
88
|
+
>Navigation</span
|
|
89
|
+
>
|
|
90
|
+
<a
|
|
91
|
+
role="option"
|
|
92
|
+
data-command-slot="item"
|
|
93
|
+
data-ui="button"
|
|
94
|
+
data-button-variant="ghost"
|
|
95
|
+
href="#home"
|
|
96
|
+
tabindex="-1"
|
|
97
|
+
style="--justify: start"
|
|
98
|
+
>
|
|
99
|
+
Go home
|
|
100
|
+
</a>
|
|
101
|
+
<a
|
|
102
|
+
role="option"
|
|
103
|
+
data-command-slot="item"
|
|
104
|
+
data-ui="button"
|
|
105
|
+
data-button-variant="ghost"
|
|
106
|
+
href="#projects"
|
|
107
|
+
tabindex="-1"
|
|
108
|
+
data-command-keywords="work portfolio"
|
|
109
|
+
style="--justify: start"
|
|
110
|
+
>
|
|
111
|
+
Go to projects
|
|
112
|
+
</a>
|
|
113
|
+
<a
|
|
114
|
+
role="option"
|
|
115
|
+
data-command-slot="item"
|
|
116
|
+
data-ui="button"
|
|
117
|
+
data-button-variant="ghost"
|
|
118
|
+
href="#team"
|
|
119
|
+
tabindex="-1"
|
|
120
|
+
data-command-keywords="people members"
|
|
121
|
+
style="--justify: start"
|
|
122
|
+
>
|
|
123
|
+
Go to team
|
|
124
|
+
</a>
|
|
125
|
+
</div>
|
|
124
126
|
</div>
|
|
127
|
+
<p data-command-slot="empty" style="--text: var(--color-muted-foreground)">
|
|
128
|
+
No commands found.
|
|
129
|
+
</p>
|
|
130
|
+
<footer data-command-slot="footer" data-dialog-slot="footer">
|
|
131
|
+
<span
|
|
132
|
+
><ui-kbd-group><kbd>↑</kbd><kbd>↓</kbd></ui-kbd-group> navigate</span
|
|
133
|
+
>
|
|
134
|
+
<span><kbd>↵</kbd> select</span>
|
|
135
|
+
<span><kbd>esc</kbd> close</span>
|
|
136
|
+
</footer>
|
|
125
137
|
</div>
|
|
126
|
-
<p data-command-slot="empty" style="--text: var(--color-muted-foreground)">
|
|
127
|
-
No commands found.
|
|
128
|
-
</p>
|
|
129
|
-
<footer data-command-slot="footer">
|
|
130
|
-
<span
|
|
131
|
-
><ui-kbd-group><kbd>↑</kbd><kbd>↓</kbd></ui-kbd-group> navigate</span
|
|
132
|
-
>
|
|
133
|
-
<span><kbd>↵</kbd> select</span>
|
|
134
|
-
<span><kbd>esc</kbd> close</span>
|
|
135
|
-
</footer>
|
|
136
138
|
</dialog>
|
|
137
139
|
</ui-command>
|