@zazz-ui/core 0.9.0 → 0.10.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 +111 -0
- package/README.md +3 -3
- package/dist/sri.json +89 -88
- package/dist/zazz.css +1 -1
- package/dist/zazz.js +1 -1
- package/editor/zazz.css-data.json +9042 -1944
- package/editor/zazz.html-data.json +31 -41
- package/editor/zazz.language-data.json +468 -233
- package/editor/zazz.lint-data.json +412 -396
- 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 +123 -57
- package/src/base/dialog-lifecycle.d.ts.map +1 -1
- package/src/base/dialog-lifecycle.js +4 -1
- package/src/base/dialog-lifecycle.ts +4 -1
- package/src/base/kit-styling.d.ts.map +1 -1
- package/src/base/kit-styling.js +90 -86
- package/src/base/kit-styling.ts +90 -86
- 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/alert-dialog/alert-dialog.css +1 -1
- package/src/primitives/autocomplete/autocomplete.css +4 -2
- package/src/primitives/avatar/avatar.html +4 -6
- package/src/primitives/badge/badge.css +66 -62
- package/src/primitives/breadcrumbs/breadcrumbs.html +1 -7
- package/src/primitives/button/button.css +47 -63
- 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 +4 -0
- package/src/primitives/combobox/combobox.css +8 -1
- package/src/primitives/combobox/combobox.d.ts +23 -0
- package/src/primitives/combobox/combobox.d.ts.map +1 -1
- package/src/primitives/combobox/combobox.js +53 -2
- package/src/primitives/combobox/combobox.ts +51 -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/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/debug/debug.d.ts.map +1 -1
- package/src/primitives/debug/debug.js +4 -1
- package/src/primitives/debug/debug.ts +4 -1
- package/src/primitives/dialog/dialog-with-form.html +1 -1
- package/src/primitives/dialog/dialog.css +19 -4
- 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 +14 -8
- package/src/primitives/input-group/input-group-password-group.html +1 -1
- package/src/primitives/input-group/input-group.css +12 -8
- package/src/primitives/kbd/kbd.css +4 -0
- package/src/primitives/lightbox/lightbox.css +13 -0
- 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/navigation-menu/navigation-menu.css +5 -0
- package/src/primitives/navigation-menu/navigation-menu.html +2 -2
- package/src/primitives/otp/otp.css +4 -0
- package/src/primitives/password-group/password-group.css +13 -9
- package/src/primitives/password-group/password-group.html +1 -1
- package/src/primitives/popover/popover.css +6 -0
- package/src/primitives/progress/progress.css +5 -0
- package/src/primitives/radio/radio.css +3 -0
- package/src/primitives/select/select.css +17 -9
- package/src/primitives/slider/slider.css +8 -0
- package/src/primitives/switch/switch.css +56 -20
- package/src/primitives/tabs/tabs.css +18 -0
- package/src/primitives/textarea/textarea.css +19 -10
- package/src/primitives/toaster/toaster.css +8 -4
- package/src/primitives/toggle/toggle.css +10 -6
- package/src/primitives/toggle-group/toggle-group.css +4 -0
- package/src/primitives/tooltip/tooltip.css +4 -0
- package/src/primitives/utilities/pile.html +2 -3
- package/src/base/_switches.css +0 -148
package/src/base/utilities.ts
CHANGED
|
@@ -119,7 +119,8 @@ export type Family =
|
|
|
119
119
|
| "typography"
|
|
120
120
|
| "color"
|
|
121
121
|
| "effects"
|
|
122
|
-
| "box"
|
|
122
|
+
| "box"
|
|
123
|
+
| "sr";
|
|
123
124
|
|
|
124
125
|
/** A family's tiers: breakpoints, states, both (paint that also changes per breakpoint), or none. */
|
|
125
126
|
export type Tiers = "breakpoints" | "states" | "both" | "none";
|
|
@@ -134,6 +135,7 @@ export const FAMILY_TIERS: Record<Family, Tiers> = {
|
|
|
134
135
|
color: "both",
|
|
135
136
|
effects: "states",
|
|
136
137
|
box: "none",
|
|
138
|
+
sr: "breakpoints",
|
|
137
139
|
};
|
|
138
140
|
|
|
139
141
|
export interface Utility {
|
|
@@ -153,7 +155,13 @@ export interface Utility {
|
|
|
153
155
|
* composite too, as one signed length `--_<name>-w`: a number is that many
|
|
154
156
|
* pixels, a length passes through, and the sign carries meaning (a negative
|
|
155
157
|
* ring is inset). `space` is a dual value the container publishes for its
|
|
156
|
-
* direct children, who take it as a margin (`SPACE_PROPERTIES`).
|
|
158
|
+
* direct children, who take it as a margin (`SPACE_PROPERTIES`). `direct` skips
|
|
159
|
+
* the resolver chain: exact rules per breakpoint, ascending, declare the
|
|
160
|
+
* properties themselves, so a higher tier wins by source order and a tier below
|
|
161
|
+
* the first one set declares nothing. `text-wrap` reads its value through typed
|
|
162
|
+
* channels, which turn `truncate` and `none` into real `text-wrap` values.
|
|
163
|
+
* `animation` yields to `--_motion-off`, so reduced motion stops any value.
|
|
164
|
+
* `divide` is a border between the element's direct children (`divideRules`).
|
|
157
165
|
*/
|
|
158
166
|
emit?:
|
|
159
167
|
| "plain"
|
|
@@ -165,7 +173,11 @@ export interface Utility {
|
|
|
165
173
|
| "none"
|
|
166
174
|
| "border"
|
|
167
175
|
| "px"
|
|
168
|
-
| "space"
|
|
176
|
+
| "space"
|
|
177
|
+
| "direct"
|
|
178
|
+
| "text-wrap"
|
|
179
|
+
| "animation"
|
|
180
|
+
| "divide";
|
|
169
181
|
/**
|
|
170
182
|
* What the precedence chain ends in when neither the base nor an active tier
|
|
171
183
|
* sets the utility: a `px` utility that stands in for a token (`--focus-ring`
|
|
@@ -175,11 +187,6 @@ export interface Utility {
|
|
|
175
187
|
chainEnd?: string;
|
|
176
188
|
/** Overrides the family's tier kind (`none` for a utility that is base-only). */
|
|
177
189
|
tiers?: Tiers;
|
|
178
|
-
/**
|
|
179
|
-
* The `border` emission's width and color channels (`--_<name>-w`, `--_<name>-c`)
|
|
180
|
-
* inherit, for a switch that draws them on the element's children (`--divide`).
|
|
181
|
-
*/
|
|
182
|
-
inherits?: true;
|
|
183
190
|
/**
|
|
184
191
|
* What a dual utility's number multiplies (default `var(--spacing)`):
|
|
185
192
|
* `--radius: 2` is two steps of `--spacing` times `--radius-multiplier`.
|
|
@@ -290,6 +297,38 @@ export const FONT_WEIGHT_NAMES: Readonly<Record<string, number>> = {
|
|
|
290
297
|
heavy: 900,
|
|
291
298
|
};
|
|
292
299
|
|
|
300
|
+
/**
|
|
301
|
+
* `data-ui` tokens that are gone, and what replaces each. `data-ui` holds
|
|
302
|
+
* identities only; a leftover token matches nothing, so an element it hid or
|
|
303
|
+
* clipped would change without a word. The audit reports them by this table.
|
|
304
|
+
*/
|
|
305
|
+
export const RETIRED_TOKENS: Readonly<Record<string, string>> = {
|
|
306
|
+
"sr-only": "`--sr: only`",
|
|
307
|
+
pile: "`--display: grid-pile`",
|
|
308
|
+
isolate: "`--isolation: isolate`",
|
|
309
|
+
"not-prose": '`data-prose-slot="end"`',
|
|
310
|
+
truncate: "`--text-wrap: truncate`",
|
|
311
|
+
spin: "`--animation: var(--spin)`",
|
|
312
|
+
ping: "`--animation: var(--ping)`",
|
|
313
|
+
pulse: "`--animation: var(--pulse)`",
|
|
314
|
+
bounce: "`--animation: var(--bounce)`",
|
|
315
|
+
"divide-x": "`--divide-x: 1`",
|
|
316
|
+
"divide-y": "`--divide-y: 1`",
|
|
317
|
+
container: "`--container-type: inline-size`",
|
|
318
|
+
"theme-dark": '`data-theme="dark"`',
|
|
319
|
+
"theme-light": '`data-theme="light"`',
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
/** The kit's looping animations: each is a keyframe name and a token (`--spin`). */
|
|
323
|
+
export const ANIMATION_TOKENS = ["spin", "ping", "pulse", "bounce"] as const;
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* The `--display` keyword for a pile: a grid whose direct children share one
|
|
327
|
+
* cell, centered. Not a `DISPLAY_SHORTHANDS` entry, which pairs a display with
|
|
328
|
+
* a flex direction.
|
|
329
|
+
*/
|
|
330
|
+
export const DISPLAY_PILE = "grid-pile";
|
|
331
|
+
|
|
293
332
|
/**
|
|
294
333
|
* `--display` shorthands that set the flex direction with the display (there
|
|
295
334
|
* is no `--flex-direction` utility): `[display, flex-direction]`. Plain `flex`
|
|
@@ -773,6 +812,8 @@ export const UTILITIES: readonly Utility[] = [
|
|
|
773
812
|
properties: ["text-wrap"],
|
|
774
813
|
mode: "keyword",
|
|
775
814
|
family: "typography",
|
|
815
|
+
emit: "text-wrap",
|
|
816
|
+
tiers: "both",
|
|
776
817
|
noBase: "wrap",
|
|
777
818
|
},
|
|
778
819
|
{
|
|
@@ -819,6 +860,15 @@ export const UTILITIES: readonly Utility[] = [
|
|
|
819
860
|
tiers: "none",
|
|
820
861
|
})),
|
|
821
862
|
{ name: "bg-stops", properties: [], mode: "raw", family: "color", emit: "none", tiers: "none" },
|
|
863
|
+
// before the border utilities: a child's own border loads later and wins
|
|
864
|
+
...["divide", "divide-x", "divide-y"].map((name) => ({
|
|
865
|
+
name,
|
|
866
|
+
properties: [],
|
|
867
|
+
mode: "raw" as const,
|
|
868
|
+
family: "color" as const,
|
|
869
|
+
emit: "divide" as const,
|
|
870
|
+
tiers: "breakpoints" as const,
|
|
871
|
+
})),
|
|
822
872
|
{
|
|
823
873
|
name: "border-color",
|
|
824
874
|
properties: ["border-color"],
|
|
@@ -977,6 +1027,15 @@ export const UTILITIES: readonly Utility[] = [
|
|
|
977
1027
|
family: "effects",
|
|
978
1028
|
noBase: "none",
|
|
979
1029
|
},
|
|
1030
|
+
{
|
|
1031
|
+
name: "animation",
|
|
1032
|
+
properties: ["animation"],
|
|
1033
|
+
mode: "raw",
|
|
1034
|
+
family: "effects",
|
|
1035
|
+
emit: "animation",
|
|
1036
|
+
tiers: "both",
|
|
1037
|
+
noBase: "none",
|
|
1038
|
+
},
|
|
980
1039
|
{ name: "transition", pseudo: true, properties: ["transition"], mode: "raw", family: "effects" },
|
|
981
1040
|
// longhands after the shorthand, so they win over --transition and over a
|
|
982
1041
|
// primitive's transition: retime one element without restating its property list
|
|
@@ -1029,6 +1088,25 @@ export const UTILITIES: readonly Utility[] = [
|
|
|
1029
1088
|
scale: "var(--spacing) * var(--radius-multiplier)",
|
|
1030
1089
|
aliases: { full: "var(--radius-full)" },
|
|
1031
1090
|
})),
|
|
1091
|
+
// the radius rules leave corner-shape to the defaults layer (see generate-utilities.ts);
|
|
1092
|
+
// this is the per-element override
|
|
1093
|
+
{ name: "corner-shape", properties: ["corner-shape"], mode: "raw", family: "box" },
|
|
1094
|
+
// visually hidden, in its own layer above every other utility (`srRules`)
|
|
1095
|
+
{
|
|
1096
|
+
name: "sr",
|
|
1097
|
+
properties: [],
|
|
1098
|
+
mode: "keyword",
|
|
1099
|
+
family: "sr",
|
|
1100
|
+
emit: "direct",
|
|
1101
|
+
keywords: ["only", "none"],
|
|
1102
|
+
},
|
|
1103
|
+
{
|
|
1104
|
+
name: "isolation",
|
|
1105
|
+
properties: ["isolation"],
|
|
1106
|
+
mode: "keyword",
|
|
1107
|
+
family: "flow",
|
|
1108
|
+
noBase: "auto",
|
|
1109
|
+
},
|
|
1032
1110
|
{ name: "overflow", properties: ["overflow"], mode: "keyword", family: "box" },
|
|
1033
1111
|
{
|
|
1034
1112
|
name: "overflow-x",
|
|
@@ -1064,9 +1142,15 @@ export const UTILITIES: readonly Utility[] = [
|
|
|
1064
1142
|
},
|
|
1065
1143
|
{ name: "object-fit", properties: ["object-fit"], mode: "keyword", family: "box" },
|
|
1066
1144
|
{ name: "object-position", properties: ["object-position"], mode: "raw", family: "box" },
|
|
1067
|
-
// the
|
|
1068
|
-
|
|
1069
|
-
|
|
1145
|
+
// the shorthand first: each tier's longhands load after it (`containerRules`)
|
|
1146
|
+
...["container", "container-name", "container-type"].map((name) => ({
|
|
1147
|
+
name,
|
|
1148
|
+
properties: [name],
|
|
1149
|
+
mode: "raw" as const,
|
|
1150
|
+
family: "box" as const,
|
|
1151
|
+
emit: "direct" as const,
|
|
1152
|
+
tiers: "breakpoints" as const,
|
|
1153
|
+
})),
|
|
1070
1154
|
];
|
|
1071
1155
|
|
|
1072
1156
|
/** Utilities that exist only on pseudo-elements. */
|
package/src/head.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"head.d.ts","sourceRoot":"","sources":["head.ts"],"names":[],"mappings":"AA6BA,wDAAwD;AACxD,UAAU,aAAa;IACrB,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAwCD;;;;;;GAMG;AACH,iBAAS,MAAM,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAE1C;AAED;;;;;GAKG;AACH,QAAA,MAAM,gBAAgB,EAAE,SAAS,aAAa,EA+B7C,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,SAAS,EAAE,SAAS,aAAa,EAOtC,CAAC;
|
|
1
|
+
{"version":3,"file":"head.d.ts","sourceRoot":"","sources":["head.ts"],"names":[],"mappings":"AA6BA,wDAAwD;AACxD,UAAU,aAAa;IACrB,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,IAA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AM,CAAC;IACpB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,WAAW,CAAC;IACrB,wCAAwC;IACxC,MAAM,EAAE,MAAM,CAAC;CAChB;AAKD,yEAAyE;AACzE,wBAAgB,UAAU,CAAC,OAAO,GAAE,WAAgB,GAAG,MAAM,CAI5D;AAED,+FAA+F;AAC/F,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAgBjE;AAcD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,WAAW,GACpB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAa1D;AAED,0FAA0F;AAC1F,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,MAAM,CAG1F"}
|
package/src/head.js
CHANGED
|
@@ -182,7 +182,7 @@ function nonceAttr(nonce) {
|
|
|
182
182
|
}
|
|
183
183
|
/**
|
|
184
184
|
* The theme-persistence script. Runs inline (no `defer`) while the parser is
|
|
185
|
-
* still in `<head>`, so
|
|
185
|
+
* still in `<head>`, so `data-theme` lands on `<html>` before first paint. The
|
|
186
186
|
* try/catch covers contexts where storage access throws (sandboxed iframes,
|
|
187
187
|
* blocked site data).
|
|
188
188
|
*/
|
|
@@ -190,12 +190,11 @@ const themeScript = (nonce) => `<!-- Theme: apply the persisted (or preferred) s
|
|
|
190
190
|
<script${nonceAttr(nonce)}>
|
|
191
191
|
(() => {
|
|
192
192
|
try {
|
|
193
|
-
// A stored choice pins the scheme with
|
|
194
|
-
//
|
|
193
|
+
// A stored choice pins the scheme with data-theme; with no choice the
|
|
194
|
+
// page follows the system scheme.
|
|
195
195
|
const storedTheme = localStorage.getItem("theme");
|
|
196
196
|
if (storedTheme === "dark" || storedTheme === "light") {
|
|
197
|
-
|
|
198
|
-
root.dataset.ui = ((root.dataset.ui || "") + " theme-" + storedTheme).trim();
|
|
197
|
+
document.documentElement.dataset.theme = storedTheme;
|
|
199
198
|
}
|
|
200
199
|
} catch {
|
|
201
200
|
/* no storage access: follow the system scheme */
|
package/src/head.ts
CHANGED
|
@@ -215,7 +215,7 @@ function nonceAttr(nonce?: string): string {
|
|
|
215
215
|
|
|
216
216
|
/**
|
|
217
217
|
* The theme-persistence script. Runs inline (no `defer`) while the parser is
|
|
218
|
-
* still in `<head>`, so
|
|
218
|
+
* still in `<head>`, so `data-theme` lands on `<html>` before first paint. The
|
|
219
219
|
* try/catch covers contexts where storage access throws (sandboxed iframes,
|
|
220
220
|
* blocked site data).
|
|
221
221
|
*/
|
|
@@ -225,12 +225,11 @@ const themeScript = (
|
|
|
225
225
|
<script${nonceAttr(nonce)}>
|
|
226
226
|
(() => {
|
|
227
227
|
try {
|
|
228
|
-
// A stored choice pins the scheme with
|
|
229
|
-
//
|
|
228
|
+
// A stored choice pins the scheme with data-theme; with no choice the
|
|
229
|
+
// page follows the system scheme.
|
|
230
230
|
const storedTheme = localStorage.getItem("theme");
|
|
231
231
|
if (storedTheme === "dark" || storedTheme === "light") {
|
|
232
|
-
|
|
233
|
-
root.dataset.ui = ((root.dataset.ui || "") + " theme-" + storedTheme).trim();
|
|
232
|
+
document.documentElement.dataset.theme = storedTheme;
|
|
234
233
|
}
|
|
235
234
|
} catch {
|
|
236
235
|
/* no storage access: follow the system scheme */
|
package/src/index.css
CHANGED
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
|
|
32
32
|
/* Primitives */
|
|
33
33
|
@import "./primitives/layout/layout.css";
|
|
34
|
+
@import "./primitives/group/group.css";
|
|
34
35
|
@import "./primitives/scroll-fade/scroll-fade.css";
|
|
35
36
|
@import "./primitives/separator/separator.css";
|
|
36
37
|
/* fields.css owns the shared --ui-field-* family; it registers before its
|
|
@@ -74,7 +75,7 @@
|
|
|
74
75
|
@import "./primitives/toaster/toaster.css";
|
|
75
76
|
@import "./primitives/reveal/reveal.css";
|
|
76
77
|
|
|
77
|
-
/* Generated utilities (scripts/generate-utilities.ts)
|
|
78
|
+
/* Generated utilities (scripts/generate-utilities.ts): the last
|
|
78
79
|
normal Zazz layer. */
|
|
79
80
|
@import "./base/_properties.css";
|
|
80
81
|
@import "./base/_properties-sm.css";
|
|
@@ -118,7 +119,7 @@
|
|
|
118
119
|
@import "./base/_utilities-box.css";
|
|
119
120
|
@import "./base/_utilities-pseudo.css";
|
|
120
121
|
@import "./base/_defaults.css";
|
|
121
|
-
@import "./base/
|
|
122
|
+
@import "./base/_utilities-sr.css";
|
|
122
123
|
|
|
123
124
|
/* Migration shims: beat all other legacy sublayers; Zazz still wins. */
|
|
124
125
|
/* @import "./migrations.css" layer(legacy.migrations); */
|
package/src/manifest.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["manifest.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AAIH;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAIlC,yEAAyE;AACzE,MAAM,WAAW,cAAc;IAC7B,6EAA6E;IAC7E,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,qDAAqD;IACrD,EAAE,EAAE,MAAM,EAAE,CAAC;IACb;;;;OAIG;IACH,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,0EAA0E;IAC1E,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB;;;;;OAKG;IACH,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,uDAAuD;IACvD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,uGAAuG;IACvG,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;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e;IAC9B,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB;;;;OAIG;IACH,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,eAAe,EAE3C,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,SAAS,EAAE,MAAM,EAErB,CAAC;AAEV,eAAO,MAAM,iBAAiB,EAAE,MAAM,EA2CrC,CAAC;AAIF;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAoBxD;AAID,MAAM,MAAM,aAAa,GACrB,cAAc,GACd,UAAU,GACV,SAAS,GACT,iBAAiB,GACjB,OAAO,GACP,QAAQ,GACR,UAAU,GACV,UAAU,GACV,UAAU,GACV,MAAM,GACN,aAAa,GACb,KAAK,GACL,UAAU,GACV,MAAM,GACN,SAAS,CAAC;AAEd;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,CAAC,CAmC/E,CAAC"}
|
package/src/manifest.js
CHANGED
|
@@ -224,6 +224,15 @@ export const PRIMITIVES = {
|
|
|
224
224
|
"primitives/input-group/input-group-password-group.html",
|
|
225
225
|
],
|
|
226
226
|
},
|
|
227
|
+
group: {
|
|
228
|
+
tags: ["ui-group"],
|
|
229
|
+
css: ["primitives/group/group.css"],
|
|
230
|
+
js: [],
|
|
231
|
+
base: [],
|
|
232
|
+
primitives: [],
|
|
233
|
+
bare: [],
|
|
234
|
+
examples: ["primitives/group/group.html"],
|
|
235
|
+
},
|
|
227
236
|
kbd: {
|
|
228
237
|
tags: ["ui-kbd-group"],
|
|
229
238
|
css: ["primitives/kbd/kbd.css"],
|
|
@@ -381,7 +390,7 @@ export const PRIMITIVES = {
|
|
|
381
390
|
css: ["primitives/select/select.css"],
|
|
382
391
|
js: ["primitives/select/multiselect.js"],
|
|
383
392
|
base: [],
|
|
384
|
-
primitives: ["fields", "popover", "button"],
|
|
393
|
+
primitives: ["fields", "popover", "button", "menu"],
|
|
385
394
|
bare: SIGNALS_BARE,
|
|
386
395
|
examples: [
|
|
387
396
|
"primitives/select/select.html",
|
|
@@ -410,7 +419,7 @@ export const PRIMITIVES = {
|
|
|
410
419
|
css: ["primitives/switch/switch.css"],
|
|
411
420
|
js: [],
|
|
412
421
|
base: [],
|
|
413
|
-
primitives: [],
|
|
422
|
+
primitives: ["fields"],
|
|
414
423
|
bare: [],
|
|
415
424
|
examples: ["primitives/switch/switch.html"],
|
|
416
425
|
},
|
|
@@ -602,7 +611,7 @@ export const BASE_CSS_POST = [
|
|
|
602
611
|
"base/_utilities-box.css",
|
|
603
612
|
"base/_utilities-pseudo.css",
|
|
604
613
|
"base/_defaults.css",
|
|
605
|
-
"base/
|
|
614
|
+
"base/_utilities-sr.css",
|
|
606
615
|
];
|
|
607
616
|
/**
|
|
608
617
|
* Core runtime scripts, in load order: always present (the CLI's `init`
|
|
@@ -641,6 +650,7 @@ export const TAG_FORMS = Object.values(PRIMITIVES)
|
|
|
641
650
|
.sort();
|
|
642
651
|
export const CSS_CASCADE_ORDER = [
|
|
643
652
|
"layout",
|
|
653
|
+
"group",
|
|
644
654
|
"scroll-fade",
|
|
645
655
|
"separator",
|
|
646
656
|
"fields",
|
package/src/manifest.ts
CHANGED
|
@@ -260,6 +260,15 @@ export const PRIMITIVES: Record<string, PrimitiveEntry> = {
|
|
|
260
260
|
"primitives/input-group/input-group-password-group.html",
|
|
261
261
|
],
|
|
262
262
|
},
|
|
263
|
+
group: {
|
|
264
|
+
tags: ["ui-group"],
|
|
265
|
+
css: ["primitives/group/group.css"],
|
|
266
|
+
js: [],
|
|
267
|
+
base: [],
|
|
268
|
+
primitives: [],
|
|
269
|
+
bare: [],
|
|
270
|
+
examples: ["primitives/group/group.html"],
|
|
271
|
+
},
|
|
263
272
|
kbd: {
|
|
264
273
|
tags: ["ui-kbd-group"],
|
|
265
274
|
css: ["primitives/kbd/kbd.css"],
|
|
@@ -417,7 +426,7 @@ export const PRIMITIVES: Record<string, PrimitiveEntry> = {
|
|
|
417
426
|
css: ["primitives/select/select.css"],
|
|
418
427
|
js: ["primitives/select/multiselect.js"],
|
|
419
428
|
base: [],
|
|
420
|
-
primitives: ["fields", "popover", "button"],
|
|
429
|
+
primitives: ["fields", "popover", "button", "menu"],
|
|
421
430
|
bare: SIGNALS_BARE,
|
|
422
431
|
examples: [
|
|
423
432
|
"primitives/select/select.html",
|
|
@@ -446,7 +455,7 @@ export const PRIMITIVES: Record<string, PrimitiveEntry> = {
|
|
|
446
455
|
css: ["primitives/switch/switch.css"],
|
|
447
456
|
js: [],
|
|
448
457
|
base: [],
|
|
449
|
-
primitives: [],
|
|
458
|
+
primitives: ["fields"],
|
|
450
459
|
bare: [],
|
|
451
460
|
examples: ["primitives/switch/switch.html"],
|
|
452
461
|
},
|
|
@@ -641,7 +650,7 @@ export const BASE_CSS_POST: string[] = [
|
|
|
641
650
|
"base/_utilities-box.css",
|
|
642
651
|
"base/_utilities-pseudo.css",
|
|
643
652
|
"base/_defaults.css",
|
|
644
|
-
"base/
|
|
653
|
+
"base/_utilities-sr.css",
|
|
645
654
|
];
|
|
646
655
|
|
|
647
656
|
/**
|
|
@@ -707,6 +716,7 @@ export const TAG_FORMS: string[] = Object.values(PRIMITIVES)
|
|
|
707
716
|
|
|
708
717
|
export const CSS_CASCADE_ORDER: string[] = [
|
|
709
718
|
"layout",
|
|
719
|
+
"group",
|
|
710
720
|
"scroll-fade",
|
|
711
721
|
"separator",
|
|
712
722
|
"fields",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
:root {
|
|
14
14
|
/* narrower than the base dialog: an alert is a single question */
|
|
15
15
|
--ui-alert-dialog-w: min(45ch, 100% - var(--space-md) * 2);
|
|
16
|
-
--ui-alert-dialog-accent: var(--color-destructive);
|
|
16
|
+
--ui-alert-dialog-accent: var(--color-destructive-foreground);
|
|
17
17
|
--ui-alert-dialog-shadow: var(--ui-dialog-shadow);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @layer variables, components
|
|
5
5
|
* @requires _layers.css, _variables.css, popover.css, button.css, fields.css,
|
|
6
|
-
* select.css (--ui-option-*), input.css
|
|
6
|
+
* select.css (--ui-option-*), input.css, menu.css (--ui-menu-shadow)
|
|
7
7
|
* @uses [popover="manual"] — panel opened/closed by autocomplete.ts
|
|
8
8
|
* @uses anchor-name, anchor-scope, position-anchor — tether panel to the input
|
|
9
9
|
* @uses anchor-size(width) — match panel width to the input (Baseline 2026)
|
|
@@ -42,7 +42,9 @@
|
|
|
42
42
|
position-anchor: --ui-autocomplete-trigger;
|
|
43
43
|
/* ungated so the close fade keeps the column layout */
|
|
44
44
|
flex-direction: column;
|
|
45
|
-
|
|
45
|
+
--_max-h-len: var(--_max-h-resolved, var(--ui-autocomplete-panel-max-h));
|
|
46
|
+
--_max-h-num: var(--_max-h-resolved, var(--ui-autocomplete-panel-max-h));
|
|
47
|
+
max-block-size: calc(var(--_max-h-len) + var(--_max-h-num) * var(--spacing));
|
|
46
48
|
overflow: auto;
|
|
47
49
|
box-shadow: var(--_shadow-resolved, var(--ui-autocomplete-shadow));
|
|
48
50
|
}
|
|
@@ -6,10 +6,9 @@
|
|
|
6
6
|
"
|
|
7
7
|
>
|
|
8
8
|
<figure
|
|
9
|
-
data-ui="pile"
|
|
10
9
|
role="img"
|
|
11
10
|
style="
|
|
12
|
-
--display: grid;
|
|
11
|
+
--display: grid-pile;
|
|
13
12
|
--size: 11;
|
|
14
13
|
--bg: var(--color-background);
|
|
15
14
|
--border-color: var(--color-border);
|
|
@@ -48,7 +47,7 @@
|
|
|
48
47
|
--bg: var(--color-muted);
|
|
49
48
|
"
|
|
50
49
|
>
|
|
51
|
-
<span
|
|
50
|
+
<span style="--sr: only">John Doe</span>
|
|
52
51
|
<span aria-hidden="true">JD</span>
|
|
53
52
|
</figcaption>
|
|
54
53
|
</figure>
|
|
@@ -83,10 +82,9 @@
|
|
|
83
82
|
"
|
|
84
83
|
>
|
|
85
84
|
<figure
|
|
86
|
-
data-ui="pile"
|
|
87
85
|
role="img"
|
|
88
86
|
style="
|
|
89
|
-
--display: grid;
|
|
87
|
+
--display: grid-pile;
|
|
90
88
|
--size: 11;
|
|
91
89
|
--bg: var(--color-background);
|
|
92
90
|
--border-color: var(--color-border);
|
|
@@ -111,7 +109,7 @@
|
|
|
111
109
|
--bg: var(--color-muted);
|
|
112
110
|
"
|
|
113
111
|
>
|
|
114
|
-
<span
|
|
112
|
+
<span style="--sr: only">John Doe</span>
|
|
115
113
|
<span aria-hidden="true">JD</span>
|
|
116
114
|
</figcaption>
|
|
117
115
|
</figure>
|