@zazz-ui/core 0.3.0 → 0.4.1
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/CHANGELOG.md +29 -2
- package/README.md +4 -2
- package/dist/sri.json +16 -16
- package/dist/zazz.css +1 -1
- package/dist/zazz.js +1 -1
- package/examples/about.html +5 -12
- package/examples/components.html +3 -10
- package/examples/forms.html +3 -10
- package/examples/index.html +3 -10
- package/examples/layout.html +3 -10
- package/examples/products.html +3 -10
- package/examples/responsive.html +3 -10
- package/package.json +1 -1
- package/src/base/typeahead.js +1 -1
- package/src/base/typeahead.ts +1 -1
- package/src/head.d.ts +11 -4
- package/src/head.d.ts.map +1 -1
- package/src/head.js +23 -24
- package/src/head.ts +23 -24
- package/src/manifest.d.ts +1 -1
- package/src/manifest.js +6 -6
- package/src/primitives/autocomplete/autocomplete.css +4 -6
- package/src/primitives/combobox/combobox.css +4 -6
- package/src/primitives/command/command.css +1 -1
- package/src/primitives/command/command.js +1 -1
- package/src/primitives/command/command.ts +1 -1
- package/src/primitives/menu/menu.js +1 -1
- package/src/primitives/menu/menu.ts +1 -1
- package/src/primitives/navigation-menu/navigation-menu.css +4 -15
- package/src/primitives/popover/popover.css +12 -9
- package/src/primitives/select/select.css +11 -14
- package/src/primitives/toaster/toaster.css +1 -1
- package/src/primitives/toaster/toaster.js +2 -2
- package/src/primitives/toaster/toaster.ts +2 -2
- package/src/primitives/tooltip/tooltip.css +1 -1
package/src/head.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @fileoverview Canonical `<head>` contract for Zazz pages.
|
|
5
5
|
* @description The single owner of everything a Zazz page loads before its own
|
|
6
6
|
* content: meta tags, the Geist fonts block, the one `index.css` stylesheet
|
|
7
|
-
* link, the feature
|
|
7
|
+
* link, the feature polyfill, the third-party **import map**, the `index.js`
|
|
8
8
|
* module tag, and the theme-persistence script. The docs preview iframe, the
|
|
9
9
|
* kit's example pages (via `scripts/generate-heads.mjs`), and the docs page
|
|
10
10
|
* that teaches head structure all render from this module: there is no other
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* static package files only (never dynamically generated `/+esm` bundles,
|
|
18
18
|
* as jsDelivr regenerates those when its bundler toolchain updates, which would
|
|
19
19
|
* silently invalidate SRI hashes), `sha384` integrity on every URL. ES modules
|
|
20
|
-
* resolve through the import map;
|
|
20
|
+
* resolve through the import map; the polyfill loads as its own module tag.
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* import { buildHead } from "@zazz-ui/core/head";
|
|
@@ -135,23 +135,24 @@ const ESM_DEPENDENCIES: readonly CdnDependency[] = [
|
|
|
135
135
|
];
|
|
136
136
|
|
|
137
137
|
/**
|
|
138
|
-
* Feature polyfills loaded
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
138
|
+
* Feature polyfills loaded ahead of the kit module. Exactly one entry:
|
|
139
|
+
* **Interest Invokers** (`interestfor`), which drives tooltip triggers and the
|
|
140
|
+
* optional hover/focus open on menu, menubar, and navigation-menu. Chromium
|
|
141
|
+
* 142+ ships it; Firefox and Safari do not, so this is the kit's one API below
|
|
142
|
+
* the browser-support floor that a polyfill can cover (ADR-0011).
|
|
143
|
+
*
|
|
144
|
+
* Deliberately *not* polyfilled any more (all native across the support
|
|
145
|
+
* window): the **Popover API** (Chrome 114, Firefox 125, Safari 17, iOS 18.3)
|
|
146
|
+
* and **Invoker Commands** `command`/`commandfor` (Chrome 135, Firefox 144,
|
|
147
|
+
* Safari 26.2). CSS anchor positioning is below the floor but has no polyfill
|
|
148
|
+
* here — the components gate it behind `@supports` instead.
|
|
142
149
|
*/
|
|
143
150
|
const POLYFILLS: readonly CdnDependency[] = [
|
|
144
|
-
{
|
|
145
|
-
name: "@oddbird/popover-polyfill",
|
|
146
|
-
version: "0.7.2",
|
|
147
|
-
file: "dist/popover.min.js",
|
|
148
|
-
integrity: "sha384-pOVHoXRgxuaWHCRM4KSyfyfRTmdxgjVo1Ux78ZKJ+GjUz4zIzXiTa8XXuDF1R1Sd",
|
|
149
|
-
},
|
|
150
151
|
{
|
|
151
152
|
name: "invokers",
|
|
152
153
|
version: "2.2.2",
|
|
153
|
-
file: "dist/esm/production/
|
|
154
|
-
integrity: "sha384-
|
|
154
|
+
file: "dist/esm/production/interest.js",
|
|
155
|
+
integrity: "sha384-hR2BVNtsS7fIIMwOm+f7MY0JZfuByGhQQfevCBB6evFATKzBsTw0JzH/RxD94z2T",
|
|
155
156
|
},
|
|
156
157
|
];
|
|
157
158
|
|
|
@@ -196,18 +197,17 @@ ${json}
|
|
|
196
197
|
}
|
|
197
198
|
|
|
198
199
|
/**
|
|
199
|
-
* @description Renders the polyfill script
|
|
200
|
-
*
|
|
201
|
-
*
|
|
200
|
+
* @description Renders the polyfill script tag. The invokers interest build is
|
|
201
|
+
* an ES module, so it is deferred by default and executes in document order —
|
|
202
|
+
* ahead of the `index.js` module tag that follows it.
|
|
202
203
|
*
|
|
203
204
|
* @returns The polyfill markup.
|
|
204
205
|
* @private
|
|
205
206
|
*/
|
|
206
207
|
function polyfillsBlock(): string {
|
|
207
|
-
const [
|
|
208
|
-
return `<!--
|
|
209
|
-
<script src="${cdnUrl(
|
|
210
|
-
<script type="module" src="${cdnUrl(invokers)}" integrity="${invokers.integrity}" crossorigin="anonymous" defer></script>`;
|
|
208
|
+
const [interest] = POLYFILLS;
|
|
209
|
+
return `<!-- Polyfill: Interest Invokers (interestfor) — native in Chromium only -->
|
|
210
|
+
<script type="module" src="${cdnUrl(interest)}" integrity="${interest.integrity}" crossorigin="anonymous"></script>`;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
/**
|
|
@@ -394,9 +394,8 @@ function cdnBlocks(cdn: CdnHeadOptions, scripts: boolean): string[] {
|
|
|
394
394
|
// Side-effect modules need their own tag (nothing imports them); the rest
|
|
395
395
|
// of each primitive's chain loads through native relative imports. The
|
|
396
396
|
// core dialog-lifecycle module always leads: dialogs, menus, and popovers
|
|
397
|
-
// assume its lifecycle events.
|
|
398
|
-
// closures — tooltip
|
|
399
|
-
// Invoker Commands.
|
|
397
|
+
// assume its lifecycle events. The polyfill stays in even for css-only
|
|
398
|
+
// closures — tooltip is styles-only but its trigger is `interestfor`.
|
|
400
399
|
const scriptFiles = [
|
|
401
400
|
...new Set([
|
|
402
401
|
"base/dialog-lifecycle.js",
|
package/src/manifest.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ export declare const CSS_CASCADE_ORDER: string[];
|
|
|
73
73
|
* @throws {Error} On an unknown primitive name.
|
|
74
74
|
* @example
|
|
75
75
|
* resolveClosure(["combobox"]);
|
|
76
|
-
* // ["
|
|
76
|
+
* // ["fields", "badge", "kbd", "button", "popover", "select", "combobox"]
|
|
77
77
|
*/
|
|
78
78
|
export declare function resolveClosure(names: string[]): string[];
|
|
79
79
|
export type ExampleScript = "autocomplete" | "combobox" | "command" | "command-actions" | "embla" | "reveal" | "carousel" | "checkbox" | "lightbox" | "menu" | "multiselect" | "otp" | "password" | "tabs" | "toaster";
|
package/src/manifest.js
CHANGED
|
@@ -81,7 +81,7 @@ export const PRIMITIVES = {
|
|
|
81
81
|
css: ["primitives/badge/badge.css"],
|
|
82
82
|
js: [],
|
|
83
83
|
base: [],
|
|
84
|
-
primitives: [],
|
|
84
|
+
primitives: ["fields"],
|
|
85
85
|
bare: [],
|
|
86
86
|
examples: ["primitives/badge/badge.html", "primitives/badge/badge-icon.html"],
|
|
87
87
|
},
|
|
@@ -97,7 +97,7 @@ export const PRIMITIVES = {
|
|
|
97
97
|
css: ["primitives/button/button.css"],
|
|
98
98
|
js: [],
|
|
99
99
|
base: [],
|
|
100
|
-
primitives: ["kbd"],
|
|
100
|
+
primitives: ["kbd", "fields"],
|
|
101
101
|
bare: [],
|
|
102
102
|
examples: [
|
|
103
103
|
"primitives/button/button.html",
|
|
@@ -136,7 +136,7 @@ export const PRIMITIVES = {
|
|
|
136
136
|
css: ["primitives/checkbox/checkbox.css"],
|
|
137
137
|
js: ["primitives/checkbox/checkbox.js"],
|
|
138
138
|
base: [],
|
|
139
|
-
primitives: [],
|
|
139
|
+
primitives: ["fields"],
|
|
140
140
|
bare: SIGNALS_BARE,
|
|
141
141
|
examples: ["primitives/checkbox/checkbox.html", "primitives/checkbox/checkbox-tasklist.html"],
|
|
142
142
|
},
|
|
@@ -378,7 +378,7 @@ export const PRIMITIVES = {
|
|
|
378
378
|
css: ["primitives/tabs/tabs.css"],
|
|
379
379
|
js: ["primitives/tabs/tabs.js"],
|
|
380
380
|
base: [],
|
|
381
|
-
primitives: [],
|
|
381
|
+
primitives: ["fields"],
|
|
382
382
|
bare: [],
|
|
383
383
|
examples: ["primitives/tabs/tabs.html"],
|
|
384
384
|
},
|
|
@@ -489,6 +489,7 @@ export const PRIMITIVES = {
|
|
|
489
489
|
*/
|
|
490
490
|
export const CSS_CASCADE_ORDER = [
|
|
491
491
|
"separator",
|
|
492
|
+
"fields",
|
|
492
493
|
"badge",
|
|
493
494
|
"kbd",
|
|
494
495
|
"button",
|
|
@@ -506,7 +507,6 @@ export const CSS_CASCADE_ORDER = [
|
|
|
506
507
|
"menu",
|
|
507
508
|
"navigation-menu",
|
|
508
509
|
"mobile-menu",
|
|
509
|
-
"fields",
|
|
510
510
|
"input",
|
|
511
511
|
"textarea",
|
|
512
512
|
"select",
|
|
@@ -538,7 +538,7 @@ export const CSS_CASCADE_ORDER = [
|
|
|
538
538
|
* @throws {Error} On an unknown primitive name.
|
|
539
539
|
* @example
|
|
540
540
|
* resolveClosure(["combobox"]);
|
|
541
|
-
* // ["
|
|
541
|
+
* // ["fields", "badge", "kbd", "button", "popover", "select", "combobox"]
|
|
542
542
|
*/
|
|
543
543
|
export function resolveClosure(names) {
|
|
544
544
|
const closure = new Set();
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* select.css (--ui-option-*), input.css
|
|
7
7
|
* @uses [popover="manual"] — panel opened/closed by autocomplete.js
|
|
8
8
|
* @uses anchor-name, anchor-scope, position-anchor — tether panel to the input
|
|
9
|
-
* @uses anchor-size(width) — match panel width to the input (
|
|
9
|
+
* @uses anchor-size(width) — match panel width to the input (Baseline 2026)
|
|
10
10
|
* @uses :has() — group + empty-state visibility without JavaScript
|
|
11
11
|
* @uses data-side / data-align — maps to --ui-popover-position-* in popover.css
|
|
12
12
|
* @tokens --ui-autocomplete-* (@layer variables); items alias --ui-option-*
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
/* Only display is gated — see popover.css: closed popovers stay display: none */
|
|
52
|
-
[data-slot~="autocomplete-panel"]:
|
|
52
|
+
[data-slot~="autocomplete-panel"]:popover-open {
|
|
53
53
|
display: flex;
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -60,10 +60,8 @@
|
|
|
60
60
|
box-shadow: none;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
min-inline-size: anchor-size(width);
|
|
66
|
-
}
|
|
63
|
+
[data-slot~="autocomplete-panel"] {
|
|
64
|
+
min-inline-size: anchor-size(width);
|
|
67
65
|
}
|
|
68
66
|
|
|
69
67
|
[data-slot~="autocomplete-list"] {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* select.css (--ui-option-*, --ui-select-picker-icon-*)
|
|
8
8
|
* @uses [popover="manual"]: panel opened/closed by combobox.js
|
|
9
9
|
* @uses anchor-name, anchor-scope, position-anchor: tether panel to the control
|
|
10
|
-
* @uses anchor-size(width): match panel width to the control (
|
|
10
|
+
* @uses anchor-size(width): match panel width to the control (Baseline 2026)
|
|
11
11
|
* @uses :has(): chevron rotation, group + empty-state visibility
|
|
12
12
|
* @uses mask: chevron and tag-remove icons; wiped in forced-colors mode,
|
|
13
13
|
* matching the rest of the kit (option checkmark, picker icon)
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
/* Only display is gated; see popover.css: closed popovers stay display: none */
|
|
182
|
-
[data-slot~="combobox-panel"]:
|
|
182
|
+
[data-slot~="combobox-panel"]:popover-open {
|
|
183
183
|
display: flex;
|
|
184
184
|
}
|
|
185
185
|
|
|
@@ -190,10 +190,8 @@
|
|
|
190
190
|
box-shadow: none;
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
min-inline-size: anchor-size(width);
|
|
196
|
-
}
|
|
193
|
+
[data-slot~="combobox-panel"] {
|
|
194
|
+
min-inline-size: anchor-size(width);
|
|
197
195
|
}
|
|
198
196
|
|
|
199
197
|
[data-slot~="combobox-list"] {
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
|
|
54
54
|
/* Only display is gated; unconditional it would defeat the UA's
|
|
55
55
|
display: none on closed popovers and dialogs */
|
|
56
|
-
[data-slot~="command-panel"]:where(:popover-open,
|
|
56
|
+
[data-slot~="command-panel"]:where(:popover-open, [open]) {
|
|
57
57
|
display: flex;
|
|
58
58
|
}
|
|
59
59
|
|
|
@@ -146,7 +146,7 @@ class UiCommand extends TypeaheadElement {
|
|
|
146
146
|
if (!panel) return;
|
|
147
147
|
if (panel instanceof HTMLDialogElement) {
|
|
148
148
|
if (panel.open) panel.close();
|
|
149
|
-
} else if (panel.matches(":popover-open
|
|
149
|
+
} else if (panel.matches(":popover-open")) {
|
|
150
150
|
panel.hidePopover();
|
|
151
151
|
}
|
|
152
152
|
}
|
|
@@ -78,7 +78,7 @@ class UiMenu extends ZazzElement {
|
|
|
78
78
|
return;
|
|
79
79
|
const isTrigger = target.parentElement === this &&
|
|
80
80
|
(target.hasAttribute("popovertarget") || target.hasAttribute("interestfor"));
|
|
81
|
-
const open = panel.matches(":popover-open
|
|
81
|
+
const open = panel.matches(":popover-open");
|
|
82
82
|
if (isTrigger && !open && (event.key === "ArrowDown" || event.key === "ArrowUp")) {
|
|
83
83
|
event.preventDefault();
|
|
84
84
|
panel.showPopover();
|
|
@@ -87,7 +87,7 @@ class UiMenu extends ZazzElement {
|
|
|
87
87
|
const isTrigger =
|
|
88
88
|
target.parentElement === this &&
|
|
89
89
|
(target.hasAttribute("popovertarget") || target.hasAttribute("interestfor"));
|
|
90
|
-
const open = panel.matches(":popover-open
|
|
90
|
+
const open = panel.matches(":popover-open");
|
|
91
91
|
|
|
92
92
|
if (isTrigger && !open && (event.key === "ArrowDown" || event.key === "ArrowUp")) {
|
|
93
93
|
event.preventDefault();
|
|
@@ -80,9 +80,7 @@
|
|
|
80
80
|
transition: var(--ui-navigation-menu-icon-transition);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
[data-slot~="navigation-menu-item"]:has(
|
|
84
|
-
[data-slot~="navigation-menu-popover"]:where(:popover-open, .\:popover-open)
|
|
85
|
-
)
|
|
83
|
+
[data-slot~="navigation-menu-item"]:has([data-slot~="navigation-menu-popover"]:popover-open)
|
|
86
84
|
[data-slot~="navigation-menu-trigger"]
|
|
87
85
|
> svg {
|
|
88
86
|
transform: var(--ui-navigation-menu-icon-transform);
|
|
@@ -158,10 +156,7 @@
|
|
|
158
156
|
/* Highlight the row on hover and while its submenu is open */
|
|
159
157
|
[data-slot~="navigation-menu-submenu-trigger"]:hover,
|
|
160
158
|
[data-slot~="navigation-menu-submenu"]:has(
|
|
161
|
-
[data-slot~="navigation-menu-popover"][data-variant="submenu"]:
|
|
162
|
-
:popover-open,
|
|
163
|
-
.\:popover-open
|
|
164
|
-
)
|
|
159
|
+
[data-slot~="navigation-menu-popover"][data-variant="submenu"]:popover-open
|
|
165
160
|
)
|
|
166
161
|
[data-slot~="navigation-menu-submenu-trigger"] {
|
|
167
162
|
background-color: var(--muted);
|
|
@@ -237,10 +232,7 @@
|
|
|
237
232
|
padding var(--default-transition-duration) var(--default-transition-timing-function);
|
|
238
233
|
}
|
|
239
234
|
|
|
240
|
-
[data-slot~="navigation-menu-popover"][data-animation="slide-down"]:
|
|
241
|
-
:popover-open,
|
|
242
|
-
.\:popover-open
|
|
243
|
-
) {
|
|
235
|
+
[data-slot~="navigation-menu-popover"][data-animation="slide-down"]:popover-open {
|
|
244
236
|
opacity: var(--ui-popover-opacity--end);
|
|
245
237
|
transform: scale(var(--ui-popover-scale--end)) translate3d(var(--ui-popover-translate--end));
|
|
246
238
|
|
|
@@ -251,10 +243,7 @@
|
|
|
251
243
|
}
|
|
252
244
|
}
|
|
253
245
|
|
|
254
|
-
[data-slot~="navigation-menu-popover"][data-animation="slide-down"]:
|
|
255
|
-
:popover-open,
|
|
256
|
-
.\:popover-open
|
|
257
|
-
)
|
|
246
|
+
[data-slot~="navigation-menu-popover"][data-animation="slide-down"]:popover-open
|
|
258
247
|
[data-slot~="navigation-menu-viewport"] {
|
|
259
248
|
block-size: auto;
|
|
260
249
|
transform: scale(1) translateY(0);
|
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
* @layer variables, reset, components
|
|
5
5
|
* @requires layers.css, _variables.css (--popover, --popover-foreground)
|
|
6
6
|
* @uses [popover], popovertarget, :popover-open: Popover API
|
|
7
|
-
* (
|
|
7
|
+
* (native across the support floor — Chrome 114, Firefox 125,
|
|
8
|
+
* Safari 17, iOS 18.3; no polyfill, see ADR-0011)
|
|
8
9
|
* @uses @starting-style + allow-discrete: enter/exit opacity/transform
|
|
9
10
|
* @uses anchor-name, position-anchor, position-area, position-try-fallbacks:
|
|
10
|
-
* anchor positioning (gated behind @supports;
|
|
11
|
-
* back to UA-centered popover)
|
|
11
|
+
* anchor positioning (gated behind @supports; Safari 26.x falls
|
|
12
|
+
* back to UA-centered popover — full support lands in Safari 27)
|
|
12
13
|
* @uses backdrop-filter: popover surface blur
|
|
13
14
|
* @tokens --ui-popover-* (Tier 3 owner; @layer variables)
|
|
14
15
|
* @consumedby select.css (picker placement), menu.css, navigation-menu.css, tooltip.css, toaster.css,
|
|
@@ -76,10 +77,11 @@
|
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
/* Anchor positioning tethers the popover to its trigger and lets the browser
|
|
79
|
-
flip it away from viewport edges
|
|
80
|
-
@supports
|
|
81
|
-
UA-centered popover (inset: 0 + margin: auto) instead of a
|
|
82
|
-
top-left box.
|
|
80
|
+
flip it away from viewport edges. Baseline 2026: Chrome 151, Firefox 147,
|
|
81
|
+
Safari 27. The @supports gate now covers exactly one case — Safari 26.x,
|
|
82
|
+
which keeps the UA-centered popover (inset: 0 + margin: auto) instead of a
|
|
83
|
+
mispositioned top-left box. Retire this gate once Safari 27 is two versions
|
|
84
|
+
back. Detection key is anchor-name — the entry property of the API. */
|
|
83
85
|
@supports (anchor-name: --zazz) {
|
|
84
86
|
:where([popover]) {
|
|
85
87
|
position: fixed;
|
|
@@ -91,8 +93,9 @@
|
|
|
91
93
|
}
|
|
92
94
|
}
|
|
93
95
|
|
|
94
|
-
/*
|
|
95
|
-
|
|
96
|
+
/* Only display is gated: closed popovers keep the UA's display: none, and
|
|
97
|
+
allow-discrete animates the switch */
|
|
98
|
+
[popover]:popover-open {
|
|
96
99
|
display: grid;
|
|
97
100
|
align-content: start;
|
|
98
101
|
opacity: var(--ui-popover-opacity--end);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @uses appearance: base-select: customizable select (Chromium 135+ / Safari 17+)
|
|
7
7
|
* @uses ::picker(select), ::picker-icon, selectedcontent, option::checkmark
|
|
8
8
|
* @uses @starting-style + allow-discrete: picker open animation
|
|
9
|
-
* @uses anchor-size(width): match picker width to trigger (
|
|
9
|
+
* @uses anchor-size(width): match picker width to trigger (Baseline 2026)
|
|
10
10
|
* @uses position-area, position-try-fallbacks: placement tokens come from
|
|
11
11
|
* popover.css's shared matrix (@supports gated)
|
|
12
12
|
* @uses backdrop-filter: picker surface blur (shared with [popover])
|
|
@@ -244,10 +244,11 @@
|
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
/* Dropdown panel: the shared [popover] surface (--ui-popover-* family), anchored
|
|
247
|
-
to the trigger. anchor-size() matches the panel to the trigger width
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
247
|
+
to the trigger. anchor-size() matches the panel to the trigger width. No
|
|
248
|
+
@supports gate: anchor-size() is Baseline 2026 (Chrome 125, Firefox 147,
|
|
249
|
+
Safari 26.0), and where it is missing the declaration is simply dropped, so
|
|
250
|
+
the max-content declared above stands — the panel sizes to its content
|
|
251
|
+
instead of stretching. */
|
|
251
252
|
.ui-select::picker(select) {
|
|
252
253
|
flex-direction: column;
|
|
253
254
|
gap: var(--step-px);
|
|
@@ -264,10 +265,8 @@
|
|
|
264
265
|
box-shadow: var(--ui-popover-shadow);
|
|
265
266
|
}
|
|
266
267
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
min-inline-size: anchor-size(width);
|
|
270
|
-
}
|
|
268
|
+
.ui-select::picker(select) {
|
|
269
|
+
min-inline-size: anchor-size(width);
|
|
271
270
|
}
|
|
272
271
|
|
|
273
272
|
/* ===========================================================================
|
|
@@ -409,14 +408,12 @@
|
|
|
409
408
|
}
|
|
410
409
|
|
|
411
410
|
/* Only display is gated; see popover.css: closed popovers stay display: none */
|
|
412
|
-
[data-slot~="multiselect-panel"]:
|
|
411
|
+
[data-slot~="multiselect-panel"]:popover-open {
|
|
413
412
|
display: flex;
|
|
414
413
|
}
|
|
415
414
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
min-inline-size: anchor-size(width);
|
|
419
|
-
}
|
|
415
|
+
[data-slot~="multiselect-panel"] {
|
|
416
|
+
min-inline-size: anchor-size(width);
|
|
420
417
|
}
|
|
421
418
|
|
|
422
419
|
/* Rows are ghost options; the checkbox is real but visually replaced by the
|
|
@@ -567,7 +567,7 @@ class UiToaster extends ZazzElement {
|
|
|
567
567
|
*/
|
|
568
568
|
#showRegion() {
|
|
569
569
|
try {
|
|
570
|
-
if (!this.matches(":popover-open
|
|
570
|
+
if (!this.matches(":popover-open"))
|
|
571
571
|
this.showPopover();
|
|
572
572
|
}
|
|
573
573
|
catch {
|
|
@@ -580,7 +580,7 @@ class UiToaster extends ZazzElement {
|
|
|
580
580
|
*/
|
|
581
581
|
#hideRegion() {
|
|
582
582
|
try {
|
|
583
|
-
if (this.matches(":popover-open
|
|
583
|
+
if (this.matches(":popover-open"))
|
|
584
584
|
this.hidePopover();
|
|
585
585
|
}
|
|
586
586
|
catch {
|
|
@@ -642,7 +642,7 @@ class UiToaster extends ZazzElement {
|
|
|
642
642
|
*/
|
|
643
643
|
#showRegion(): void {
|
|
644
644
|
try {
|
|
645
|
-
if (!this.matches(":popover-open
|
|
645
|
+
if (!this.matches(":popover-open")) this.showPopover();
|
|
646
646
|
} catch {
|
|
647
647
|
// Older engines without the Popover API: the region stays a fixed-position
|
|
648
648
|
// element, which still renders (just not on the top layer).
|
|
@@ -654,7 +654,7 @@ class UiToaster extends ZazzElement {
|
|
|
654
654
|
*/
|
|
655
655
|
#hideRegion(): void {
|
|
656
656
|
try {
|
|
657
|
-
if (this.matches(":popover-open
|
|
657
|
+
if (this.matches(":popover-open")) this.hidePopover();
|
|
658
658
|
} catch {
|
|
659
659
|
// See #showRegion.
|
|
660
660
|
}
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
[data-slot~="tooltip-content"]:
|
|
93
|
+
[data-slot~="tooltip-content"]:popover-open {
|
|
94
94
|
display: flex;
|
|
95
95
|
opacity: var(--ui-tooltip-opacity--end);
|
|
96
96
|
transform: scale(var(--ui-tooltip-scale--end)) translate3d(var(--ui-tooltip-translate--end));
|