@zazz-ui/core 0.9.1 → 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.
Files changed (120) hide show
  1. package/AUTHORING.md +21 -16
  2. package/CHANGELOG.md +89 -0
  3. package/README.md +3 -3
  4. package/dist/sri.json +85 -84
  5. package/dist/zazz.css +1 -1
  6. package/editor/zazz.css-data.json +9042 -1944
  7. package/editor/zazz.html-data.json +31 -41
  8. package/editor/zazz.language-data.json +468 -233
  9. package/editor/zazz.lint-data.json +412 -396
  10. package/package.json +2 -3
  11. package/src/base/_defaults.css +59 -40
  12. package/src/base/_layers.css +5 -2
  13. package/src/base/_properties-2xl.css +10 -0
  14. package/src/base/_properties-active.css +8 -0
  15. package/src/base/_properties-checked.css +8 -0
  16. package/src/base/_properties-current.css +8 -0
  17. package/src/base/_properties-disabled.css +8 -0
  18. package/src/base/_properties-focus-visible.css +8 -0
  19. package/src/base/_properties-focus-within.css +8 -0
  20. package/src/base/_properties-hover.css +8 -0
  21. package/src/base/_properties-lg.css +10 -0
  22. package/src/base/_properties-md.css +10 -0
  23. package/src/base/_properties-open.css +8 -0
  24. package/src/base/_properties-sm.css +10 -0
  25. package/src/base/_properties-starting.css +4 -0
  26. package/src/base/_properties-stuck.css +4 -0
  27. package/src/base/_properties-xl.css +10 -0
  28. package/src/base/_properties.css +55 -15
  29. package/src/base/_reset.css +8 -4
  30. package/src/base/_typography.css +26 -9
  31. package/src/base/_utilities-box.css +63 -59
  32. package/src/base/_utilities-color.css +55 -8
  33. package/src/base/_utilities-effects.css +8 -0
  34. package/src/base/_utilities-flow.css +28 -5
  35. package/src/base/_utilities-pseudo.css +4 -0
  36. package/src/base/_utilities-spacing.css +8 -8
  37. package/src/base/_utilities-sr.css +98 -0
  38. package/src/base/_utilities-tier-2xl.css +5 -0
  39. package/src/base/_utilities-tier-active.css +5 -1
  40. package/src/base/_utilities-tier-checked.css +5 -1
  41. package/src/base/_utilities-tier-current.css +5 -1
  42. package/src/base/_utilities-tier-disabled.css +5 -1
  43. package/src/base/_utilities-tier-focus-visible.css +5 -1
  44. package/src/base/_utilities-tier-focus-within.css +5 -1
  45. package/src/base/_utilities-tier-hover.css +5 -1
  46. package/src/base/_utilities-tier-lg.css +5 -0
  47. package/src/base/_utilities-tier-md.css +5 -0
  48. package/src/base/_utilities-tier-open.css +5 -1
  49. package/src/base/_utilities-tier-sm.css +5 -0
  50. package/src/base/_utilities-tier-starting.css +2 -0
  51. package/src/base/_utilities-tier-stuck.css +3 -0
  52. package/src/base/_utilities-tier-xl.css +5 -0
  53. package/src/base/_utilities-typography.css +263 -3
  54. package/src/base/_variables.css +123 -57
  55. package/src/base/kit-styling.d.ts.map +1 -1
  56. package/src/base/kit-styling.js +90 -86
  57. package/src/base/kit-styling.ts +90 -86
  58. package/src/base/utilities.d.ts +23 -8
  59. package/src/base/utilities.d.ts.map +1 -1
  60. package/src/base/utilities.js +78 -3
  61. package/src/base/utilities.ts +95 -11
  62. package/src/head.d.ts.map +1 -1
  63. package/src/head.js +4 -5
  64. package/src/head.ts +4 -5
  65. package/src/index.css +3 -2
  66. package/src/manifest.d.ts.map +1 -1
  67. package/src/manifest.js +13 -3
  68. package/src/manifest.ts +13 -3
  69. package/src/primitives/alert-dialog/alert-dialog.css +1 -1
  70. package/src/primitives/autocomplete/autocomplete.css +4 -2
  71. package/src/primitives/avatar/avatar.html +4 -6
  72. package/src/primitives/badge/badge.css +63 -56
  73. package/src/primitives/breadcrumbs/breadcrumbs.html +1 -7
  74. package/src/primitives/button/button.css +44 -57
  75. package/src/primitives/button-group/button-group.css +4 -0
  76. package/src/primitives/callout/callout.css +22 -43
  77. package/src/primitives/card/card-subgrid.html +2 -3
  78. package/src/primitives/card/card.css +4 -0
  79. package/src/primitives/card/card.html +2 -3
  80. package/src/primitives/checkbox/checkbox.css +4 -0
  81. package/src/primitives/combobox/combobox.css +8 -1
  82. package/src/primitives/command/command-actions.d.ts.map +1 -1
  83. package/src/primitives/command/command-actions.js +4 -9
  84. package/src/primitives/command/command-actions.ts +4 -9
  85. package/src/primitives/debug/audit-core.d.ts +1 -1
  86. package/src/primitives/debug/audit-core.d.ts.map +1 -1
  87. package/src/primitives/debug/audit-core.js +30 -3
  88. package/src/primitives/debug/audit-core.ts +40 -2
  89. package/src/primitives/dialog/dialog-with-form.html +1 -1
  90. package/src/primitives/dialog/dialog.css +19 -4
  91. package/src/primitives/fields/fields.css +11 -5
  92. package/src/primitives/group/group.css +18 -0
  93. package/src/primitives/group/group.html +26 -0
  94. package/src/primitives/input/input.css +14 -8
  95. package/src/primitives/input-group/input-group-password-group.html +1 -1
  96. package/src/primitives/input-group/input-group.css +12 -8
  97. package/src/primitives/kbd/kbd.css +4 -0
  98. package/src/primitives/lightbox/lightbox.css +13 -0
  99. package/src/primitives/lightbox/lightbox.html +2 -1
  100. package/src/primitives/menu/menu.css +3 -1
  101. package/src/primitives/meter/meter.css +10 -3
  102. package/src/primitives/navigation-menu/navigation-menu.css +5 -0
  103. package/src/primitives/navigation-menu/navigation-menu.html +2 -2
  104. package/src/primitives/otp/otp.css +4 -0
  105. package/src/primitives/password-group/password-group.css +13 -9
  106. package/src/primitives/password-group/password-group.html +1 -1
  107. package/src/primitives/popover/popover.css +6 -0
  108. package/src/primitives/progress/progress.css +5 -0
  109. package/src/primitives/radio/radio.css +3 -0
  110. package/src/primitives/select/select.css +17 -9
  111. package/src/primitives/slider/slider.css +8 -0
  112. package/src/primitives/switch/switch.css +56 -20
  113. package/src/primitives/tabs/tabs.css +18 -0
  114. package/src/primitives/textarea/textarea.css +19 -10
  115. package/src/primitives/toaster/toaster.css +8 -4
  116. package/src/primitives/toggle/toggle.css +10 -6
  117. package/src/primitives/toggle-group/toggle-group.css +4 -0
  118. package/src/primitives/tooltip/tooltip.css +4 -0
  119. package/src/primitives/utilities/pile.html +2 -3
  120. package/src/base/_switches.css +0 -148
@@ -4,7 +4,8 @@
4
4
  * @layer variables, components
5
5
  * @requires _layers.css, _variables.css, popover.css, button.css, fields.css,
6
6
  * badge.css (--ui-badge-* for the default tag template [data-ui~="badge"]),
7
- * select.css (--ui-option-*, --ui-select-picker-icon-*)
7
+ * select.css (--ui-option-*, --ui-select-picker-icon-*),
8
+ * menu.css (--ui-menu-shadow)
8
9
  * @uses [popover="manual"]: panel opened/closed by combobox.ts
9
10
  * @uses anchor-name, anchor-scope, position-anchor: tether panel to the control
10
11
  * @uses anchor-size(width): match panel width to the control (Baseline 2026)
@@ -16,6 +17,8 @@
16
17
  * <template data-combobox-slot="tag-template"> (or its muted-badge
17
18
  * default) per option carrying aria-selected="true". Tag rules key
18
19
  * off the slots, so a custom template keeps this styling.
20
+ * @uses corner-shape — superellipse corners; unsupported browsers keep plain
21
+ * rounded corners
19
22
  * @tokens --ui-combobox-* (@layer variables); control mirrors --ui-select-*,
20
23
  * items alias --ui-option-*, tags alias --ui-badge-*
21
24
  * @see combobox.ts: filtering, commit/revert, tags, and keyboard behavior
@@ -33,6 +36,7 @@
33
36
  --ui-combobox-border-style: var(--ui-select-border-style);
34
37
  --ui-combobox-border-color: var(--ui-select-border-color);
35
38
  --ui-combobox-radius: var(--ui-select-radius);
39
+ --ui-combobox-corner-shape: var(--ui-select-corner-shape);
36
40
  --ui-combobox-icon-mask: var(--ui-select-picker-icon-mask);
37
41
  --ui-combobox-icon-size: var(--ui-select-picker-icon-size);
38
42
  --ui-combobox-icon-color: var(--ui-select-picker-icon-color);
@@ -59,6 +63,7 @@
59
63
  --ui-combobox-tag-remove-size: var(--ui-badge-icon-size);
60
64
  --ui-combobox-tag-remove-color: currentColor;
61
65
  --ui-combobox-tag-remove-radius: var(--radius-sm);
66
+ --ui-combobox-tag-remove-corner-shape: var(--radius-corner-shape);
62
67
  --ui-combobox-tag-remove-opacity: 0.65;
63
68
  --ui-combobox-tag-remove-opacity--hover: 1;
64
69
  }
@@ -123,6 +128,7 @@
123
128
  border-radius: calc(
124
129
  var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-multiplier)
125
130
  );
131
+ corner-shape: var(--_corner-shape-resolved, var(--ui-combobox-corner-shape));
126
132
 
127
133
  /* Same ring recipe as [data-ui~="select"]: transparent outline twin keeps focus
128
134
  visible in forced-colors mode */
@@ -320,6 +326,7 @@
320
326
  inline-size: var(--ui-combobox-tag-remove-size);
321
327
  block-size: var(--ui-combobox-tag-remove-size);
322
328
  border-radius: var(--ui-combobox-tag-remove-radius);
329
+ corner-shape: var(--ui-combobox-tag-remove-corner-shape);
323
330
  opacity: var(--ui-combobox-tag-remove-opacity);
324
331
  cursor: pointer;
325
332
  transition: var(--default-transition);
@@ -1 +1 @@
1
- {"version":3,"file":"command-actions.d.ts","sourceRoot":"","sources":["command-actions.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;GAGG;AACH,iBAAS,kBAAkB,IAAI,IAAI,CAiClC;AAED;;;GAGG;AACH,iBAAS,wBAAwB,IAAI,IAAI,CAKxC;AAWD,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,CAAC"}
1
+ {"version":3,"file":"command-actions.d.ts","sourceRoot":"","sources":["command-actions.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;GAGG;AACH,iBAAS,kBAAkB,IAAI,IAAI,CA4BlC;AAED;;;GAGG;AACH,iBAAS,wBAAwB,IAAI,IAAI,CAKxC;AAWD,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,CAAC"}
@@ -35,17 +35,12 @@ function initCommandActions() {
35
35
  const command = event.command;
36
36
  switch (command) {
37
37
  case "--theme-toggle": {
38
- // A theme-dark / theme-light switch pins the scheme; neither follows the system
38
+ // data-theme pins the scheme; without it the page follows the system
39
39
  const root = document.documentElement;
40
- const tokens = (root.dataset.ui ?? "").split(/\s+/).filter(Boolean);
41
- const pinned = tokens.find((t) => t === "theme-dark" || t === "theme-light");
42
- const dark = pinned
43
- ? pinned === "theme-dark"
40
+ const dark = root.dataset.theme
41
+ ? root.dataset.theme === "dark"
44
42
  : matchMedia("(prefers-color-scheme: dark)").matches;
45
- root.dataset.ui = [
46
- ...tokens.filter((t) => !t.startsWith("theme-")),
47
- dark ? "theme-light" : "theme-dark",
48
- ].join(" ");
43
+ root.dataset.theme = dark ? "light" : "dark";
49
44
  break;
50
45
  }
51
46
  case "--copy-link":
@@ -38,17 +38,12 @@ function initCommandActions(): void {
38
38
  const command = (event as CommandEvent).command;
39
39
  switch (command) {
40
40
  case "--theme-toggle": {
41
- // A theme-dark / theme-light switch pins the scheme; neither follows the system
41
+ // data-theme pins the scheme; without it the page follows the system
42
42
  const root = document.documentElement;
43
- const tokens = (root.dataset.ui ?? "").split(/\s+/).filter(Boolean);
44
- const pinned = tokens.find((t) => t === "theme-dark" || t === "theme-light");
45
- const dark = pinned
46
- ? pinned === "theme-dark"
43
+ const dark = root.dataset.theme
44
+ ? root.dataset.theme === "dark"
47
45
  : matchMedia("(prefers-color-scheme: dark)").matches;
48
- root.dataset.ui = [
49
- ...tokens.filter((t) => !t.startsWith("theme-")),
50
- dark ? "theme-light" : "theme-dark",
51
- ].join(" ");
46
+ root.dataset.theme = dark ? "light" : "dark";
52
47
  break;
53
48
  }
54
49
  case "--copy-link":
@@ -1,5 +1,5 @@
1
1
  /** A stable name per finding, so a linter can switch each one off. */
2
- export type RuleId = "unknown-utility" | "pseudo-form" | "group-needs-state" | "border-value" | "not-integer" | "tier-unsupported" | "tier-without-base" | "dual-value" | "keyword-number" | "raw-shadows-utility" | "flattens-state" | "gradient-incomplete" | "font-weight-name" | "scroll-state" | "whitespace-before-colon" | "whitespace-after-colon" | "attribute-outside-identity" | "field-id-or-name" | "persist";
2
+ export type RuleId = "unknown-utility" | "pseudo-form" | "group-needs-state" | "border-value" | "not-integer" | "tier-unsupported" | "tier-without-base" | "dual-value" | "keyword-number" | "raw-shadows-utility" | "flattens-state" | "gradient-incomplete" | "font-weight-name" | "scroll-state" | "whitespace-before-colon" | "whitespace-after-colon" | "attribute-outside-identity" | "retired-token" | "field-id-or-name" | "persist";
3
3
  export declare const RULE_IDS: readonly RuleId[];
4
4
  /** `[start, end)` offsets into the `style` attribute's value. */
5
5
  export type Span = [number, number];
@@ -1 +1 @@
1
- {"version":3,"file":"audit-core.d.ts","sourceRoot":"","sources":["audit-core.ts"],"names":[],"mappings":"AA4BA,sEAAsE;AACtE,MAAM,MAAM,MAAM,GACd,iBAAiB,GACjB,aAAa,GACb,mBAAmB,GACnB,cAAc,GACd,aAAa,GACb,kBAAkB,GAClB,mBAAmB,GACnB,YAAY,GACZ,gBAAgB,GAChB,qBAAqB,GACrB,gBAAgB,GAChB,qBAAqB,GACrB,kBAAkB,GAClB,cAAc,GACd,yBAAyB,GACzB,wBAAwB,GACxB,4BAA4B,GAC5B,kBAAkB,GAClB,SAAS,CAAC;AAEd,eAAO,MAAM,QAAQ,EAAE,SAAS,MAAM,EAoBrC,CAAC;AAEF,iEAAiE;AACjE,MAAM,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEpC,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED,+CAA+C;AAC/C,MAAM,WAAW,SAAS;IACxB,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC1C,iBAAiB,IAAI,MAAM,EAAE,CAAC;IAC9B,oGAAoG;IACpG,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,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AAM,EAAE,CAAC,CAAC,GAClD,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAI1B;AAED,4DAA4D;AAC5D,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,EAAE,CAwW3E;AAED,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,EAAE,EAAE,CAAC,CAAC;IACN,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,2FAA2F;AAC3F,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,IAAI,EAAE,OAAO,EACb,SAAS,EAAE,CAAC,EAAE,EACd,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,MAAM,EACvB,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,YAAY,GAAG,IAAI,EACvC,SAAS,GAAE,iBAAiB,GAAG,wBAA4C,GAC1E;IAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,CAAA;CAAE,CAgD9C"}
@@ -7,7 +7,7 @@
7
7
  * where it can, the span of the declaration it is about (offsets into the
8
8
  * `style` attribute) and a suggested rewrite.
9
9
  */
10
- import { BORDER_SHORTHANDS, BOX_SHADOW_COMPOSITE, SHORTHAND_OF, DISPLAY_SHORTHANDS, GRADIENT_TYPES, UTILITIES, PSEUDO_ONLY, FONT_WEIGHT_NAMES, STUCK_STATE, STATES, parseUtilityName, tiersOf, } from "../../base/utilities.js";
10
+ import { BORDER_SHORTHANDS, BOX_SHADOW_COMPOSITE, SHORTHAND_OF, DISPLAY_PILE, RETIRED_TOKENS, DISPLAY_SHORTHANDS, GRADIENT_TYPES, UTILITIES, PSEUDO_ONLY, FONT_WEIGHT_NAMES, STUCK_STATE, STATES, parseUtilityName, tiersOf, } from "../../base/utilities.js";
11
11
  export const RULE_IDS = [
12
12
  "unknown-utility",
13
13
  "pseudo-form",
@@ -26,6 +26,7 @@ export const RULE_IDS = [
26
26
  "whitespace-before-colon",
27
27
  "whitespace-after-colon",
28
28
  "attribute-outside-identity",
29
+ "retired-token",
29
30
  "field-id-or-name",
30
31
  "persist",
31
32
  ];
@@ -47,7 +48,8 @@ const FUNCTION = /^(calc|clamp|min|max|var|env|round|mod|rem|abs|sign)\(/;
47
48
  function gatedValue(utility, value) {
48
49
  return ((utility.keywords ?? []).includes(value) ||
49
50
  value in (utility.aliases ?? {}) ||
50
- (utility.name === "display" && value in DISPLAY_SHORTHANDS) ||
51
+ (utility.name === "display" && (value in DISPLAY_SHORTHANDS || value === DISPLAY_PILE)) ||
52
+ (utility.emit === "text-wrap" && value === "truncate") ||
51
53
  (utility.name === "bg" && value === "none") ||
52
54
  (utility.name === "position" && value === "sticky"));
53
55
  }
@@ -149,6 +151,18 @@ export function auditNode(node, context) {
149
151
  bases.add((parsed.side ? `${parsed.side}-` : "") + parsed.name);
150
152
  }
151
153
  const tokens = (node.getAttribute("data-ui") ?? "").split(/\s+/).filter(Boolean);
154
+ for (const token of tokens) {
155
+ const replacement = RETIRED_TOKENS[token];
156
+ if (replacement) {
157
+ found.push({
158
+ rule: "retired-token",
159
+ message: `\`data-ui="${token}"\` is gone: \`data-ui\` holds identities only. Use ${replacement}.`,
160
+ attribute: "data-ui",
161
+ });
162
+ }
163
+ }
164
+ const sticky = parsedPairs.some(([parsed, , declaration]) => parsed.name === STUCK_STATE.modifier ||
165
+ (parsed.name === "position" && declaration.value === "sticky"));
152
166
  for (const [parsed, name, declaration] of parsedPairs) {
153
167
  const { value, span } = declaration;
154
168
  const warn = (rule, message, suggestion) => found.push({ rule, message, span, ...(suggestion ? { suggestion } : {}) });
@@ -197,6 +211,13 @@ export function auditNode(node, context) {
197
211
  }
198
212
  if (!parsed.side && gatedValue(utility, value))
199
213
  spacing();
214
+ // only --container-type keeps the scroll-state type beside its own, and only
215
+ // beside a size type: the kit cannot read a part of a raw shorthand
216
+ if (sticky &&
217
+ (utility.name === "container" ||
218
+ (utility.name === "container-type" && /normal|scroll-state/.test(value)))) {
219
+ warn("scroll-state", `\`${name}: ${value}\` replaces this sticky element's container type, so its stuck state stops working. Use \`--container-name\` with \`--container-type: inline-size\`.`);
220
+ }
200
221
  const baseName = (parsed.side ? `${parsed.side}-` : "") + utility.name;
201
222
  if (parsed.group && parsed.tier === "stuck") {
202
223
  warn("scroll-state", `\`${name}\` has no group form: the sticky container is the trigger, so write \`--${utility.name}--stuck\` inside it.`);
@@ -217,6 +238,9 @@ export function auditNode(node, context) {
217
238
  warn("group-needs-state", `\`${name}\` needs a state tier: group utilities take \`--group-${utility.name}--<state>\`.`);
218
239
  continue;
219
240
  }
241
+ if (utility.emit === "divide" && value !== "none" && !isBorderValue(value, context.isColor)) {
242
+ warn("border-value", `\`${name}: ${value}\` is not one color, number, length, or \`none\`.`);
243
+ }
220
244
  if (utility.emit === "border" && !isBorderValue(value, context.isColor)) {
221
245
  warn("border-value", `\`${name}: ${value}\` is not one color, number, or length; it draws a 1px transparent border. Use \`--border: 2\`, \`--border: var(--color-primary)\`, or set \`--border-style\` separately.`);
222
246
  }
@@ -255,6 +279,8 @@ export function auditNode(node, context) {
255
279
  // element through another utility or a token, and are not checked here
256
280
  const composite = BOX_SHADOW_COMPOSITE.includes(utility.name);
257
281
  const feedsComposite = !composite && (utility.emit === "none" || utility.emit === "px");
282
+ // each of these declares its own property or resolves on its own gate
283
+ const standalone = utility.emit === "direct" || utility.emit === "divide";
258
284
  // a tier alone works where the kit reads the utility through its own chain,
259
285
  // or where the tier-only rule (`@layer defaults`) applies: a no-base utility
260
286
  // whose property no kit rule above that layer sets on this element
@@ -266,7 +292,8 @@ export function auditNode(node, context) {
266
292
  !bases.has(baseName) &&
267
293
  !borderBase &&
268
294
  !shorthandBase &&
269
- !feedsComposite) {
295
+ !feedsComposite &&
296
+ !standalone) {
270
297
  warn("tier-without-base", `\`${name}\` has no base \`--${baseName}\`; the tier only overrides a base.`);
271
298
  }
272
299
  continue;
@@ -13,6 +13,8 @@ import {
13
13
  BORDER_SHORTHANDS,
14
14
  BOX_SHADOW_COMPOSITE,
15
15
  SHORTHAND_OF,
16
+ DISPLAY_PILE,
17
+ RETIRED_TOKENS,
16
18
  DISPLAY_SHORTHANDS,
17
19
  GRADIENT_TYPES,
18
20
  UTILITIES,
@@ -45,6 +47,7 @@ export type RuleId =
45
47
  | "whitespace-before-colon"
46
48
  | "whitespace-after-colon"
47
49
  | "attribute-outside-identity"
50
+ | "retired-token"
48
51
  | "field-id-or-name"
49
52
  | "persist";
50
53
 
@@ -66,6 +69,7 @@ export const RULE_IDS: readonly RuleId[] = [
66
69
  "whitespace-before-colon",
67
70
  "whitespace-after-colon",
68
71
  "attribute-outside-identity",
72
+ "retired-token",
69
73
  "field-id-or-name",
70
74
  "persist",
71
75
  ];
@@ -148,7 +152,8 @@ function gatedValue(utility: Utility, value: string): boolean {
148
152
  return (
149
153
  (utility.keywords ?? []).includes(value) ||
150
154
  value in (utility.aliases ?? {}) ||
151
- (utility.name === "display" && value in DISPLAY_SHORTHANDS) ||
155
+ (utility.name === "display" && (value in DISPLAY_SHORTHANDS || value === DISPLAY_PILE)) ||
156
+ (utility.emit === "text-wrap" && value === "truncate") ||
152
157
  (utility.name === "bg" && value === "none") ||
153
158
  (utility.name === "position" && value === "sticky")
154
159
  );
@@ -266,6 +271,21 @@ export function auditNode(node: AuditNode, context: AuditContext): Finding[] {
266
271
  if (!parsed.tier) bases.add((parsed.side ? `${parsed.side}-` : "") + parsed.name);
267
272
  }
268
273
  const tokens = (node.getAttribute("data-ui") ?? "").split(/\s+/).filter(Boolean);
274
+ for (const token of tokens) {
275
+ const replacement = RETIRED_TOKENS[token];
276
+ if (replacement) {
277
+ found.push({
278
+ rule: "retired-token",
279
+ message: `\`data-ui="${token}"\` is gone: \`data-ui\` holds identities only. Use ${replacement}.`,
280
+ attribute: "data-ui",
281
+ });
282
+ }
283
+ }
284
+ const sticky = parsedPairs.some(
285
+ ([parsed, , declaration]) =>
286
+ parsed.name === STUCK_STATE.modifier ||
287
+ (parsed.name === "position" && declaration.value === "sticky"),
288
+ );
269
289
  for (const [parsed, name, declaration] of parsedPairs) {
270
290
  const { value, span } = declaration;
271
291
  const warn = (rule: RuleId, message: string, suggestion?: Suggestion) =>
@@ -326,6 +346,18 @@ export function auditNode(node: AuditNode, context: AuditContext): Finding[] {
326
346
  continue;
327
347
  }
328
348
  if (!parsed.side && gatedValue(utility, value)) spacing();
349
+ // only --container-type keeps the scroll-state type beside its own, and only
350
+ // beside a size type: the kit cannot read a part of a raw shorthand
351
+ if (
352
+ sticky &&
353
+ (utility.name === "container" ||
354
+ (utility.name === "container-type" && /normal|scroll-state/.test(value)))
355
+ ) {
356
+ warn(
357
+ "scroll-state",
358
+ `\`${name}: ${value}\` replaces this sticky element's container type, so its stuck state stops working. Use \`--container-name\` with \`--container-type: inline-size\`.`,
359
+ );
360
+ }
329
361
  const baseName = (parsed.side ? `${parsed.side}-` : "") + utility.name;
330
362
  if (parsed.group && parsed.tier === "stuck") {
331
363
  warn(
@@ -358,6 +390,9 @@ export function auditNode(node: AuditNode, context: AuditContext): Finding[] {
358
390
  );
359
391
  continue;
360
392
  }
393
+ if (utility.emit === "divide" && value !== "none" && !isBorderValue(value, context.isColor)) {
394
+ warn("border-value", `\`${name}: ${value}\` is not one color, number, length, or \`none\`.`);
395
+ }
361
396
  if (utility.emit === "border" && !isBorderValue(value, context.isColor)) {
362
397
  warn(
363
398
  "border-value",
@@ -410,6 +445,8 @@ export function auditNode(node: AuditNode, context: AuditContext): Finding[] {
410
445
  // element through another utility or a token, and are not checked here
411
446
  const composite = (BOX_SHADOW_COMPOSITE as readonly string[]).includes(utility.name);
412
447
  const feedsComposite = !composite && (utility.emit === "none" || utility.emit === "px");
448
+ // each of these declares its own property or resolves on its own gate
449
+ const standalone = utility.emit === "direct" || utility.emit === "divide";
413
450
  // a tier alone works where the kit reads the utility through its own chain,
414
451
  // or where the tier-only rule (`@layer defaults`) applies: a no-base utility
415
452
  // whose property no kit rule above that layer sets on this element
@@ -425,7 +462,8 @@ export function auditNode(node: AuditNode, context: AuditContext): Finding[] {
425
462
  !bases.has(baseName) &&
426
463
  !borderBase &&
427
464
  !shorthandBase &&
428
- !feedsComposite
465
+ !feedsComposite &&
466
+ !standalone
429
467
  ) {
430
468
  warn(
431
469
  "tier-without-base",
@@ -52,7 +52,7 @@
52
52
  method="dialog"
53
53
  >
54
54
  <fieldset data-ui="field-group">
55
- <legend data-ui="sr-only">Contact</legend>
55
+ <legend style="--sr: only">Contact</legend>
56
56
  <div
57
57
  style="
58
58
  --display: grid;
@@ -9,9 +9,11 @@
9
9
  * is open (WebKit ignores overscroll-behavior on boxes that do not overflow)
10
10
  * @uses @starting-style + allow-discrete — open/close opacity, transform, overlay
11
11
  * @uses anchor-name, container-type — layout hooks for sized variants
12
- * @tokens --ui-dialog-* (@layer variables; --ui-dialog-h defaults to a keyword, so it is read
13
- * raw: a --h length, or a tier carrying a length, applies; a scale
14
- * number applies only as a base utility)
12
+ * @uses corner-shape — superellipse corners; unsupported browsers keep plain
13
+ * rounded corners
14
+ * @tokens --ui-dialog-* (@layer variables; --ui-dialog-h defaults to a keyword, so the hook
15
+ * is read raw and takes a length or keyword; a --h utility or tier takes a scale
16
+ * number or a length; a keyword tier needs a base --h, or it renders as auto)
15
17
  * @presets data-dialog-size="sm | md | lg | xl | 2xl | full | bleed" (the layout bands; sm when absent)
16
18
  * @uses @media (width < 40rem) + @container style(--ui-dialog-mobile-size) — below the sm
17
19
  * band every dialog takes the hook's size (layout-bleed by default) over its preset;
@@ -53,6 +55,7 @@
53
55
  --ui-dialog-bg: var(--color-card);
54
56
  --ui-dialog-text: var(--color-card-foreground);
55
57
  --ui-dialog-radius: var(--radius-lg);
58
+ --ui-dialog-corner-shape: var(--radius-corner-shape);
56
59
  }
57
60
  }
58
61
 
@@ -140,6 +143,10 @@
140
143
  inherits: false;
141
144
  }
142
145
 
146
+ @property --_dialog-h-typed {
147
+ syntax: "*";
148
+ inherits: false;
149
+ }
143
150
  @property --_dialog-h {
144
151
  syntax: "*";
145
152
  inherits: false;
@@ -165,7 +172,14 @@
165
172
  --_w-len: var(--_w-resolved, var(--_dialog-w, var(--ui-dialog-w)));
166
173
  --_w-num: var(--_w-resolved, var(--_dialog-w, var(--ui-dialog-w)));
167
174
  inline-size: calc(var(--_w-len) + var(--_w-num) * var(--spacing));
168
- block-size: var(--_h-resolved, var(--_dialog-h, var(--ui-dialog-h)));
175
+ /* The typed pair can't carry the hook's keyword. sign() adds nothing to the sum:
176
+ its var() leaves --_dialog-h-typed unset without a --h, so the chain reaches the hook */
177
+ --_h-len: var(--_h-resolved);
178
+ --_h-num: var(--_h-resolved);
179
+ --_dialog-h-typed: calc(
180
+ var(--_h-len) + var(--_h-num) * var(--spacing) + 0px * sign(var(--_h-resolved))
181
+ );
182
+ block-size: var(--_dialog-h-typed, var(--_dialog-h, var(--ui-dialog-h)));
169
183
  background-color: var(--_bg-resolved, var(--ui-dialog-bg));
170
184
  color: var(--_text-resolved, var(--ui-dialog-text));
171
185
  box-shadow: var(--_shadow-resolved, var(--_dialog-shadow, var(--ui-dialog-shadow)));
@@ -174,6 +188,7 @@
174
188
  border-radius: calc(
175
189
  var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-multiplier)
176
190
  );
191
+ corner-shape: var(--_corner-shape-resolved, var(--ui-dialog-corner-shape));
177
192
 
178
193
  anchor-name: --ui-dialog-root;
179
194
  container-type: inline-size;
@@ -8,13 +8,16 @@
8
8
  * @uses @starting-style + visibility allow-discrete: hint <-> error swap
9
9
  * @uses @supports (-webkit-touch-callout: none): iOS-only 16px field text,
10
10
  * so a focused control does not zoom the page
11
+ * @uses corner-shape — superellipse corners; unsupported browsers keep plain
12
+ * rounded corners
11
13
  * @tokens --ui-field-*, --ui-field-group-* (Tier 3 owner; @layer variables)
12
14
  * @consumedby input.css, textarea.css, select.css, input-group.css,
13
- * password-group.css, otp.css, radio.css, checkbox.css,
15
+ * password-group.css, otp.css, radio.css, checkbox.css, switch.css,
14
16
  * autocomplete.css, combobox.css, command.css,
15
17
  * button.css (metrics: h/radius/px/icon/ring/border width+style; not font-size
16
18
  * or leading, so the iOS 16px rule below reaches text controls only),
17
- * toggle.css (via button.css), tabs.css (same metrics), badge.css (border/ring)
19
+ * toggle.css (via button.css), tabs.css (same metrics), badge.css (border/ring),
20
+ * menu.css (option gap)
18
21
  *
19
22
  * Identities: data-ui="field" (label + control + description wrapper),
20
23
  * data-ui="field-group" (fieldset; data-ui="radio-group" shares its rules).
@@ -44,6 +47,7 @@
44
47
  --ui-field-label-text: inherit;
45
48
  --ui-field-ring-color: var(--color-ring);
46
49
  --ui-field-radius: var(--radius-md);
50
+ --ui-field-corner-shape: var(--radius-corner-shape);
47
51
  --ui-field-inset-child-radius: var(--radius-sm);
48
52
  --ui-field-h: calc(var(--spacing) * 8);
49
53
  --ui-field-font-size: var(--font-size-sm);
@@ -71,6 +75,7 @@
71
75
  --ui-field-group-m: 0;
72
76
  --ui-field-group-gap: var(--space-xs);
73
77
  --ui-field-group-radius: var(--radius-lg);
78
+ --ui-field-group-corner-shape: var(--ui-field-corner-shape);
74
79
  }
75
80
 
76
81
  /* iOS zooms the page to any focused control that renders under 16px, so a
@@ -170,7 +175,7 @@
170
175
  }
171
176
 
172
177
  :where([data-ui~="field"]) [data-field-slot~="error"] {
173
- color: var(--color-destructive);
178
+ color: var(--color-destructive-foreground);
174
179
  opacity: 0;
175
180
  translate: var(--ui-field-hint-translate--start);
176
181
  visibility: hidden;
@@ -202,11 +207,11 @@
202
207
  }
203
208
 
204
209
  :where([data-ui~="field"]:has(:user-invalid)) [data-field-slot~="label"] {
205
- --ui-field-label-text: var(--color-destructive);
210
+ --ui-field-label-text: var(--color-destructive-foreground);
206
211
  }
207
212
 
208
213
  :where([data-ui~="field"]:has(:user-invalid)) ::placeholder {
209
- --placeholder-color: var(--color-destructive);
214
+ --placeholder-color: var(--color-destructive-foreground);
210
215
  }
211
216
 
212
217
  /* ---------------------------------------------------------------------------
@@ -231,6 +236,7 @@
231
236
  border-radius: calc(
232
237
  var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-multiplier)
233
238
  );
239
+ corner-shape: var(--_corner-shape-resolved, var(--ui-field-group-corner-shape));
234
240
  --_p-len: var(--_p-resolved, var(--ui-field-group-p));
235
241
  --_p-num: var(--_p-resolved, var(--ui-field-group-p));
236
242
  padding: calc(var(--_p-len) + var(--_p-num) * var(--spacing));
@@ -0,0 +1,18 @@
1
+ /**
2
+ * group.css: Group (ui-group | [data-ui~="group"]), the ancestor whose state
3
+ * its descendants' `--group-*` utilities follow (`--group-bg--hover`)
4
+ *
5
+ * @layer components
6
+ * @requires _layers.css
7
+ *
8
+ * The state selectors live in the generated tier setters. This file only gives
9
+ * the tag a display: the attribute form sits on a link, a button, a list item,
10
+ * and keeps what its host has. A custom element never matches `:disabled`, so
11
+ * `<ui-group>` takes `aria-disabled="true"` (with a role that allows it).
12
+ */
13
+
14
+ @layer ui.components {
15
+ :where(ui-group) {
16
+ display: block;
17
+ }
18
+ }
@@ -0,0 +1,26 @@
1
+ <ui-group
2
+ style="
3
+ --display: block;
4
+ --p: 4;
5
+ --border: 1;
6
+ --radius: 2;
7
+ "
8
+ >
9
+ <p
10
+ style="
11
+ --font-weight: strong;
12
+ --text: var(--color-foreground);
13
+ --group-text--hover: var(--color-primary);
14
+ "
15
+ >
16
+ Hover anywhere on this card
17
+ </p>
18
+ <p
19
+ style="
20
+ --opacity: 0.7;
21
+ --group-opacity--hover: 1;
22
+ "
23
+ >
24
+ The text follows the group's state, not its own.
25
+ </p>
26
+ </ui-group>
@@ -7,6 +7,8 @@
7
7
  * @uses mask — calendar icon (not background-image, for color: currentColor)
8
8
  * @uses @supports (-webkit-touch-callout: none) — iOS-only width fix for temporal
9
9
  * inputs (webkit.org/b/301648)
10
+ * @uses corner-shape — superellipse corners; unsupported browsers keep plain
11
+ * rounded corners
10
12
  * @tokens --ui-input-* (@layer variables; surface colors and height read the
11
13
  * --ui-field-* family directly)
12
14
  */
@@ -23,11 +25,13 @@
23
25
  --ui-input-border-style: var(--ui-field-border-style);
24
26
  --ui-input-border-color: var(--ui-field-border-color);
25
27
  --ui-input-radius: var(--ui-field-radius);
28
+ --ui-input-corner-shape: var(--ui-field-corner-shape);
26
29
 
27
30
  --ui-input-calendar-picker-color: currentColor;
28
31
  --ui-input-calendar-picker-icon-size: calc(var(--spacing) * 4);
29
32
  --ui-input-calendar-picker-size: calc(var(--spacing) * 6);
30
33
  --ui-input-calendar-picker-radius: var(--ui-field-inset-child-radius);
34
+ --ui-input-calendar-picker-corner-shape: var(--ui-field-corner-shape);
31
35
  --ui-input-calendar-picker-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Crect width='256' height='256' fill='none'/%3E%3Crect x='40' y='40' width='176' height='176' rx='8' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='16'/%3E%3Cline x1='176' y1='24' x2='176' y2='56' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='16'/%3E%3Cline x1='80' y1='24' x2='80' y2='56' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='16'/%3E%3Cline x1='40' y1='88' x2='216' y2='88' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='16'/%3E%3C/svg%3E");
32
36
  }
33
37
  }
@@ -72,6 +76,7 @@
72
76
  border-radius: calc(
73
77
  var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-multiplier)
74
78
  );
79
+ corner-shape: var(--_corner-shape-resolved, var(--ui-input-corner-shape));
75
80
 
76
81
  /* The ring is published to --_focus-shadow so a --shadow utility keeps
77
82
  it; the transparent outline twin keeps focus visible in forced-colors */
@@ -147,6 +152,7 @@
147
152
  inline-size: var(--ui-input-calendar-picker-size);
148
153
  block-size: var(--ui-input-calendar-picker-size);
149
154
  border-radius: var(--ui-input-calendar-picker-radius);
155
+ corner-shape: var(--ui-input-calendar-picker-corner-shape);
150
156
 
151
157
  transition:
152
158
  opacity var(--default-transition-duration) var(--default-transition-timing-function),
@@ -175,13 +181,13 @@
175
181
  }
176
182
 
177
183
  :where([data-ui~="input"]):user-invalid {
178
- --ui-field-bg: color-mix(in oklch, var(--color-destructive) 5%, var(--color-input));
179
- --ui-field-bg--hover: color-mix(in oklch, var(--color-destructive) 10%, var(--color-input));
180
- --ui-field-border-color: var(--color-destructive);
181
- --ui-field-border-color--hover: var(--color-destructive);
182
- --ui-field-border-color--focus-within: var(--color-destructive);
183
- --ui-field-ring-color: var(--color-destructive);
184
-
185
- border-color: var(--color-destructive);
184
+ --ui-field-bg: var(--color-destructive);
185
+ --ui-field-bg--hover: oklch(from var(--color-destructive) calc(l - 0.025) c h);
186
+ --ui-field-border-color: var(--color-destructive-foreground);
187
+ --ui-field-border-color--hover: var(--color-destructive-foreground);
188
+ --ui-field-border-color--focus-within: var(--color-destructive-foreground);
189
+ --ui-field-ring-color: var(--color-destructive-foreground);
190
+
191
+ border-color: var(--color-destructive-foreground);
186
192
  }
187
193
  }
@@ -102,7 +102,7 @@
102
102
  <span data-field-slot="hint" id="f-login-password-hint">Use eight or more characters.</span>
103
103
  <span data-field-slot="error" role="alert">Password must be at least 8 characters.</span>
104
104
  </div>
105
- <span data-ui="sr-only" id="f-login-password-warning"
105
+ <span style="--sr: only" id="f-login-password-warning"
106
106
  >Warning: showing the password makes it visible to anyone near your screen.</span
107
107
  >
108
108
  </div>
@@ -7,6 +7,8 @@
7
7
  * @uses :focus-within — lifts shell ring/border as one field
8
8
  * @uses :has() — restore padding when addons absent; invalid text color
9
9
  * @uses data-input-group-align on the addon slot — inline-start/end, block-start/end
10
+ * @uses corner-shape — superellipse corners; unsupported browsers keep plain
11
+ * rounded corners
10
12
  * @tokens --ui-input-group-* (@layer variables)
11
13
  * @presets data-input-group-align="inline-start | inline-end | block-start | block-end" on the addon slot
12
14
  */
@@ -80,6 +82,7 @@
80
82
  border-radius: calc(
81
83
  var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-multiplier)
82
84
  );
85
+ corner-shape: var(--_corner-shape-resolved, var(--ui-field-corner-shape));
83
86
 
84
87
  --_ring-offset-width: 0px;
85
88
  --_ring-width: 0px;
@@ -238,12 +241,13 @@
238
241
  :where([data-ui~="input-group"]) [data-ui~="button"] {
239
242
  flex-shrink: 0;
240
243
  border-radius: var(--ui-field-inset-child-radius);
244
+ corner-shape: var(--ui-field-corner-shape);
241
245
  }
242
246
 
243
247
  :where([data-ui~="field"]:has(:user-invalid))
244
248
  :where([data-ui~="input-group"])
245
249
  [data-input-group-slot~="text"] {
246
- --ui-input-group-text: var(--color-destructive);
250
+ --ui-input-group-text: var(--color-destructive-foreground);
247
251
  }
248
252
  }
249
253
 
@@ -257,13 +261,13 @@
257
261
  }
258
262
 
259
263
  :where([data-ui~="input-group"]):has(:user-invalid) {
260
- --ui-field-bg: color-mix(in oklch, var(--color-destructive) 5%, var(--color-input));
261
- --ui-field-bg--hover: color-mix(in oklch, var(--color-destructive) 10%, var(--color-input));
262
- --ui-field-border-color: var(--color-destructive);
263
- --ui-field-border-color--hover: var(--color-destructive);
264
- --ui-field-border-color--focus-within: var(--color-destructive);
265
- --ui-field-ring-color: var(--color-destructive);
264
+ --ui-field-bg: var(--color-destructive);
265
+ --ui-field-bg--hover: oklch(from var(--color-destructive) calc(l - 0.025) c h);
266
+ --ui-field-border-color: var(--color-destructive-foreground);
267
+ --ui-field-border-color--hover: var(--color-destructive-foreground);
268
+ --ui-field-border-color--focus-within: var(--color-destructive-foreground);
269
+ --ui-field-ring-color: var(--color-destructive-foreground);
266
270
 
267
- border-color: var(--color-destructive);
271
+ border-color: var(--color-destructive-foreground);
268
272
  }
269
273
  }
@@ -4,6 +4,8 @@
4
4
  * @layer variables, reset, components
5
5
  * @requires _layers.css, _variables.css, _properties.css (--_*-resolved)
6
6
  * @uses text-box: vertical trim (patchy browser support)
7
+ * @uses corner-shape — superellipse corners; unsupported browsers keep plain
8
+ * rounded corners
7
9
  * @tokens --ui-kbd-*, --ui-kbd-group-* (@layer variables)
8
10
  * @consumedby button.css, tooltip.css (reassign --ui-kbd-* in scope), command.css (selects the group)
9
11
  *
@@ -27,6 +29,7 @@
27
29
  --ui-kbd-text: var(--color-muted-foreground);
28
30
  --ui-kbd-border: 1px solid transparent;
29
31
  --ui-kbd-radius: var(--radius-xs);
32
+ --ui-kbd-corner-shape: var(--radius-corner-shape);
30
33
 
31
34
  /* metrics (dual-mode: a scale number or a length) */
32
35
  --ui-kbd-px: var(--spacing);
@@ -70,6 +73,7 @@
70
73
  border-radius: calc(
71
74
  var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-multiplier)
72
75
  );
76
+ corner-shape: var(--_corner-shape-resolved, var(--ui-kbd-corner-shape));
73
77
  overflow: hidden;
74
78
  --_min-w-len: var(--_min-w-resolved, var(--ui-kbd-min-w));
75
79
  --_min-w-num: var(--_min-w-resolved, var(--ui-kbd-min-w));