@zazz-ui/core 0.15.1 → 0.16.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 (247) hide show
  1. package/AUTHORING.md +29 -14
  2. package/CHANGELOG.md +156 -0
  3. package/README.md +6 -5
  4. package/dist/{csp-LRx1fynI.js → csp-C1f62vyT.js} +1 -1
  5. package/dist/sri.json +70 -65
  6. package/dist/zazz.css +1 -1
  7. package/dist/zazz.js +1 -1
  8. package/editor/zazz.css-data.json +74 -2
  9. package/editor/zazz.html-data.json +119 -79
  10. package/editor/zazz.language-data.json +401 -313
  11. package/editor/zazz.lint-data.json +1752 -1731
  12. package/package.json +2 -1
  13. package/src/base/_defaults.css +11 -11
  14. package/src/base/_reset.css +2 -10
  15. package/src/base/_typography.css +17 -568
  16. package/src/base/_utilities-box.css +17 -17
  17. package/src/base/_utilities-pseudo.css +2 -2
  18. package/src/base/_variables.css +142 -97
  19. package/src/base/carousel-scroll.d.ts +1 -1
  20. package/src/base/carousel-scroll.js +6 -6
  21. package/src/base/carousel-scroll.ts +6 -6
  22. package/src/base/carousel.d.ts.map +1 -1
  23. package/src/base/carousel.js +6 -2
  24. package/src/base/carousel.ts +6 -2
  25. package/src/base/csp.js +2 -2
  26. package/src/base/csp.ts +2 -2
  27. package/src/base/kit-styling.d.ts.map +1 -1
  28. package/src/base/kit-styling.js +186 -183
  29. package/src/base/kit-styling.ts +186 -183
  30. package/src/base/navigation.d.ts +2 -2
  31. package/src/base/navigation.d.ts.map +1 -1
  32. package/src/base/navigation.js +25 -21
  33. package/src/base/navigation.ts +27 -21
  34. package/src/base/utilities.d.ts +1 -1
  35. package/src/base/utilities.d.ts.map +1 -1
  36. package/src/base/utilities.js +20 -4
  37. package/src/base/utilities.ts +21 -5
  38. package/src/base/zazz-element.d.ts +1 -1
  39. package/src/base/zazz-element.js +1 -1
  40. package/src/base/zazz-element.ts +1 -1
  41. package/src/{base → behaviors}/gesture.d.ts +4 -3
  42. package/src/behaviors/gesture.d.ts.map +1 -0
  43. package/src/{base → behaviors}/gesture.js +1 -1
  44. package/src/{base → behaviors}/gesture.ts +5 -4
  45. package/src/{base → behaviors}/hotkeys.d.ts +2 -1
  46. package/src/behaviors/hotkeys.d.ts.map +1 -0
  47. package/src/{base → behaviors}/hotkeys.ts +2 -1
  48. package/src/behaviors/list-navigation.d.ts +64 -0
  49. package/src/behaviors/list-navigation.d.ts.map +1 -0
  50. package/src/behaviors/list-navigation.js +66 -0
  51. package/src/behaviors/list-navigation.ts +107 -0
  52. package/src/{base → behaviors}/typeahead.d.ts +3 -1
  53. package/src/behaviors/typeahead.d.ts.map +1 -0
  54. package/src/{base → behaviors}/typeahead.js +12 -17
  55. package/src/{base → behaviors}/typeahead.ts +12 -17
  56. package/src/css-properties.json +704 -0
  57. package/src/index.css +7 -0
  58. package/src/manifest.d.ts +20 -9
  59. package/src/manifest.d.ts.map +1 -1
  60. package/src/manifest.js +125 -37
  61. package/src/manifest.ts +132 -38
  62. package/src/primitives/accordion/accordion.json +49 -0
  63. package/src/primitives/alert-dialog/alert-dialog.json +35 -0
  64. package/src/primitives/autocomplete/autocomplete.d.ts +2 -2
  65. package/src/primitives/autocomplete/autocomplete.d.ts.map +1 -1
  66. package/src/primitives/autocomplete/autocomplete.js +2 -2
  67. package/src/primitives/autocomplete/autocomplete.json +65 -0
  68. package/src/primitives/autocomplete/autocomplete.ts +2 -2
  69. package/src/primitives/avatar/avatar.css +108 -0
  70. package/src/primitives/avatar/avatar.html +20 -74
  71. package/src/primitives/avatar/avatar.json +48 -0
  72. package/src/primitives/badge/badge.css +45 -10
  73. package/src/primitives/badge/badge.html +4 -0
  74. package/src/primitives/badge/badge.json +83 -0
  75. package/src/primitives/breadcrumbs/breadcrumbs.json +20 -0
  76. package/src/primitives/button/button.css +50 -66
  77. package/src/primitives/button/button.html +4 -0
  78. package/src/primitives/button/button.json +85 -0
  79. package/src/primitives/button-group/button-group.css +4 -15
  80. package/src/primitives/button-group/button-group.json +40 -0
  81. package/src/primitives/callout/callout.css +1 -1
  82. package/src/primitives/callout/callout.html +12 -12
  83. package/src/primitives/callout/callout.json +54 -0
  84. package/src/primitives/card/card-article.html +13 -37
  85. package/src/primitives/card/card-horizontal.html +11 -14
  86. package/src/primitives/card/card-login.html +4 -4
  87. package/src/primitives/card/card-product.html +3 -3
  88. package/src/primitives/card/card-subgrid.html +4 -4
  89. package/src/primitives/card/card.css +1 -1
  90. package/src/primitives/card/card.html +8 -8
  91. package/src/primitives/card/card.json +73 -0
  92. package/src/primitives/carousel/carousel.css +1 -1
  93. package/src/primitives/carousel/carousel.json +89 -0
  94. package/src/primitives/checkbox/checkbox.css +1 -2
  95. package/src/primitives/checkbox/checkbox.json +51 -0
  96. package/src/primitives/combobox/combobox.css +3 -2
  97. package/src/primitives/combobox/combobox.d.ts +2 -2
  98. package/src/primitives/combobox/combobox.d.ts.map +1 -1
  99. package/src/primitives/combobox/combobox.js +2 -2
  100. package/src/primitives/combobox/combobox.json +113 -0
  101. package/src/primitives/combobox/combobox.ts +2 -2
  102. package/src/primitives/command/command-actions.html +1 -1
  103. package/src/primitives/command/command.d.ts +4 -3
  104. package/src/primitives/command/command.d.ts.map +1 -1
  105. package/src/primitives/command/command.js +7 -6
  106. package/src/primitives/command/command.json +86 -0
  107. package/src/primitives/command/command.ts +7 -6
  108. package/src/primitives/debug/audit-core.d.ts +19 -12
  109. package/src/primitives/debug/audit-core.d.ts.map +1 -1
  110. package/src/primitives/debug/audit-core.js +78 -16
  111. package/src/primitives/debug/audit-core.ts +94 -22
  112. package/src/primitives/debug/debug.d.ts +6 -4
  113. package/src/primitives/debug/debug.d.ts.map +1 -1
  114. package/src/primitives/debug/debug.js +50 -21
  115. package/src/primitives/debug/debug.json +29 -0
  116. package/src/primitives/debug/debug.ts +57 -35
  117. package/src/primitives/dialog/dialog.css +1 -4
  118. package/src/primitives/dialog/dialog.json +78 -0
  119. package/src/primitives/drawer/drawer.css +4 -2
  120. package/src/primitives/drawer/drawer.d.ts.map +1 -1
  121. package/src/primitives/drawer/drawer.js +76 -4
  122. package/src/primitives/drawer/drawer.json +98 -0
  123. package/src/primitives/drawer/drawer.ts +78 -5
  124. package/src/primitives/fields/fields.css +11 -4
  125. package/src/primitives/fields/fields.json +92 -0
  126. package/src/primitives/font/font.css +188 -0
  127. package/src/primitives/font/font.html +14 -0
  128. package/src/primitives/font/font.json +39 -0
  129. package/src/primitives/group/group.json +25 -0
  130. package/src/primitives/input/input.css +1 -2
  131. package/src/primitives/input/input.json +56 -0
  132. package/src/primitives/input-group/input-group-password-group.html +1 -1
  133. package/src/primitives/input-group/input-group.css +32 -3
  134. package/src/primitives/input-group/input-group.html +5 -8
  135. package/src/primitives/input-group/input-group.json +69 -0
  136. package/src/primitives/kbd/kbd.css +1 -1
  137. package/src/primitives/kbd/kbd.json +52 -0
  138. package/src/primitives/layout/layout.json +45 -0
  139. package/src/primitives/lightbox/lightbox.css +4 -3
  140. package/src/primitives/lightbox/lightbox.html +2 -2
  141. package/src/primitives/lightbox/lightbox.js +1 -1
  142. package/src/primitives/lightbox/lightbox.json +87 -0
  143. package/src/primitives/lightbox/lightbox.ts +1 -1
  144. package/src/primitives/link/link.css +28 -0
  145. package/src/primitives/link/link.html +5 -0
  146. package/src/primitives/link/link.json +23 -0
  147. package/src/primitives/menu/menu.d.ts +3 -0
  148. package/src/primitives/menu/menu.d.ts.map +1 -1
  149. package/src/primitives/menu/menu.js +10 -25
  150. package/src/primitives/menu/menu.json +51 -0
  151. package/src/primitives/menu/menu.ts +10 -27
  152. package/src/primitives/menubar/menubar.json +23 -0
  153. package/src/primitives/meter/meter.css +24 -3
  154. package/src/primitives/meter/meter.json +41 -0
  155. package/src/primitives/mobile-menu/mobile-menu.html +1 -1
  156. package/src/primitives/mobile-menu/mobile-menu.json +64 -0
  157. package/src/primitives/navigation-menu/navigation-menu-featured.html +58 -58
  158. package/src/primitives/navigation-menu/navigation-menu-megamenu.html +6 -113
  159. package/src/primitives/navigation-menu/navigation-menu.css +11 -5
  160. package/src/primitives/navigation-menu/navigation-menu.html +1 -1
  161. package/src/primitives/navigation-menu/navigation-menu.json +82 -0
  162. package/src/primitives/otp/otp.css +1 -1
  163. package/src/primitives/otp/otp.d.ts +3 -3
  164. package/src/primitives/otp/otp.js +5 -5
  165. package/src/primitives/otp/otp.json +75 -0
  166. package/src/primitives/otp/otp.ts +5 -5
  167. package/src/primitives/password-group/password-group.css +32 -2
  168. package/src/primitives/password-group/password-group.html +1 -1
  169. package/src/primitives/password-group/password-group.json +74 -0
  170. package/src/primitives/popover/popover.css +1 -1
  171. package/src/primitives/popover/popover.json +64 -0
  172. package/src/primitives/progress/progress.css +25 -3
  173. package/src/primitives/progress/progress.json +41 -0
  174. package/src/primitives/prose/prose.css +341 -0
  175. package/src/primitives/prose/prose.html +11 -11
  176. package/src/primitives/prose/prose.json +47 -0
  177. package/src/primitives/radio/radio.css +1 -1
  178. package/src/primitives/radio/radio.json +48 -0
  179. package/src/primitives/reveal/reveal.json +72 -0
  180. package/src/primitives/scroll-fade/scroll-fade.css +0 -3
  181. package/src/primitives/scroll-fade/scroll-fade.json +34 -0
  182. package/src/primitives/select/select.css +2 -2
  183. package/src/primitives/select/select.json +119 -0
  184. package/src/primitives/separator/separator.json +34 -0
  185. package/src/primitives/slider/slider.css +87 -13
  186. package/src/primitives/slider/slider.json +49 -0
  187. package/src/primitives/style-guard/style-guard.js +1 -1
  188. package/src/primitives/style-guard/style-guard.json +22 -0
  189. package/src/primitives/style-guard/style-guard.ts +2 -2
  190. package/src/primitives/switch/switch.css +107 -18
  191. package/src/primitives/switch/switch.json +71 -0
  192. package/src/primitives/table/table.json +74 -0
  193. package/src/primitives/tabs/tabs.css +24 -12
  194. package/src/primitives/tabs/tabs.d.ts +4 -2
  195. package/src/primitives/tabs/tabs.d.ts.map +1 -1
  196. package/src/primitives/tabs/tabs.js +14 -24
  197. package/src/primitives/tabs/tabs.json +94 -0
  198. package/src/primitives/tabs/tabs.ts +14 -26
  199. package/src/primitives/textarea/textarea.css +1 -1
  200. package/src/primitives/textarea/textarea.json +48 -0
  201. package/src/primitives/toaster/toaster.d.ts.map +1 -1
  202. package/src/primitives/toaster/toaster.js +4 -4
  203. package/src/primitives/toaster/toaster.json +101 -0
  204. package/src/primitives/toaster/toaster.ts +5 -5
  205. package/src/primitives/toggle/toggle.css +2 -52
  206. package/src/primitives/toggle/toggle.json +84 -0
  207. package/src/primitives/toggle-group/toggle-group.css +1 -1
  208. package/src/primitives/toggle-group/toggle-group.json +41 -0
  209. package/src/primitives/toolbar/toolbar.json +26 -0
  210. package/src/primitives/tooltip/tooltip.css +1 -1
  211. package/src/primitives/tooltip/tooltip.json +85 -0
  212. package/src/primitives/utilities/aspect-ratio.html +3 -3
  213. package/src/primitives/utilities/basis.html +5 -5
  214. package/src/primitives/utilities/col-span.html +5 -5
  215. package/src/primitives/utilities/compose.html +3 -3
  216. package/src/primitives/utilities/flex-align.html +3 -3
  217. package/src/primitives/utilities/flex-direction.html +8 -8
  218. package/src/primitives/utilities/flex-grow.html +3 -3
  219. package/src/primitives/utilities/flex-reverse.html +8 -8
  220. package/src/primitives/utilities/gallery.html +19 -19
  221. package/src/primitives/utilities/gap.html +12 -12
  222. package/src/primitives/utilities/grid-cols.html +6 -6
  223. package/src/primitives/utilities/grid-responsive.html +9 -9
  224. package/src/primitives/utilities/inline-flex.html +2 -2
  225. package/src/primitives/utilities/margin-auto.html +1 -1
  226. package/src/primitives/utilities/object-fit.html +3 -3
  227. package/src/primitives/utilities/order.html +3 -3
  228. package/src/primitives/utilities/overflow.html +14 -14
  229. package/src/primitives/utilities/padding-compose.html +3 -3
  230. package/src/primitives/utilities/padding.html +4 -4
  231. package/src/primitives/utilities/position.html +1 -1
  232. package/src/primitives/utilities/responsive-flex.html +4 -4
  233. package/src/primitives/utilities/responsive-grid.html +9 -9
  234. package/src/primitives/utilities/size.html +5 -5
  235. package/src/primitives/utilities/subgrid-col.html +7 -7
  236. package/src/primitives/utilities/subgrid-row.html +9 -9
  237. package/src/primitives/utilities/subgrid.html +9 -9
  238. package/src/primitives/utilities/utilities.json +48 -0
  239. package/src/primitives/utilities/width.html +5 -5
  240. package/src/base/gesture.d.ts.map +0 -1
  241. package/src/base/hotkeys.d.ts.map +0 -1
  242. package/src/base/typeahead.d.ts.map +0 -1
  243. /package/src/{base → behaviors}/command-score.d.ts +0 -0
  244. /package/src/{base → behaviors}/command-score.d.ts.map +0 -0
  245. /package/src/{base → behaviors}/command-score.js +0 -0
  246. /package/src/{base → behaviors}/command-score.ts +0 -0
  247. /package/src/{base → behaviors}/hotkeys.js +0 -0
@@ -19,9 +19,9 @@
19
19
  * - `data-otp-type`: sanitization charset: `numeric` (default), `alpha`,
20
20
  * `alphanumeric`, `none`. Keep it in agreement with the input `pattern`
21
21
  * and `inputmode`, which carry the no-JS validation.
22
- * - `data-otp-mask`: render `•` in the cells instead of characters.
23
- * - `data-otp-auto-submit`: request the owning form submission once when
24
- * the code is complete.
22
+ * - `data-otp-mask="true"`: render `•` in the cells instead of characters.
23
+ * - `data-otp-submit-behavior="auto"`: request the owning form submission once
24
+ * when the code is complete (default: leave submitting to the form).
25
25
  *
26
26
  * Stamped state: cells are `[data-otp-slot~="cell"]` with a `data-otp-state`
27
27
  * token list (`filled`, `active`); separators are `[data-otp-slot~="separator"]`; the root
@@ -116,7 +116,7 @@ class UiOtp extends ZazzElement {
116
116
  return;
117
117
  const length = input.maxLength > 0 ? input.maxLength : 6;
118
118
  const type = (this.getAttribute("data-otp-type") ?? "numeric");
119
- const mask = this.hasAttribute("data-otp-mask");
119
+ const mask = this.getAttribute("data-otp-mask") === "true";
120
120
  const groups = parseGroups(this.getAttribute("data-otp-groups"), length);
121
121
  const rail = this.#stampRail(groups);
122
122
  this.setAttribute("data-otp-ready", "");
@@ -169,7 +169,7 @@ class UiOtp extends ZazzElement {
169
169
  this.setAttribute("data-otp-complete", "");
170
170
  else
171
171
  this.removeAttribute("data-otp-complete");
172
- if (complete && this.hasAttribute("data-otp-auto-submit")) {
172
+ if (complete && this.getAttribute("data-otp-submit-behavior") === "auto") {
173
173
  // Once per distinct complete value, so corrections can resubmit
174
174
  if (this.#lastSubmitted !== value.get()) {
175
175
  this.#lastSubmitted = value.get();
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "otp",
3
+ "summary": "otp.css: OTP (ui-otp wrapping :where(ui-otp, [data-ui~=\"otp\"]) [data-otp-slot~=\"input\"] on one real <input>)",
4
+ "identities": [
5
+ "otp"
6
+ ],
7
+ "tags": [
8
+ "ui-otp"
9
+ ],
10
+ "hooks": {
11
+ "Layout & Positioning": {
12
+ "--ui-otp-gap": "calc(var(--spacing) * 1.5)"
13
+ },
14
+ "Box Model & Sizing": {
15
+ "--ui-otp-cell-h": "var(--ui-field-h)",
16
+ "--ui-otp-cell-py": "calc(var(--ui-field-py) / 2)",
17
+ "--ui-otp-cell-w": "var(--ui-field-h)"
18
+ },
19
+ "Typography": {
20
+ "--ui-otp-cell-font-size": "var(--font-size-md)"
21
+ },
22
+ "Color & Backgrounds": {
23
+ "--ui-otp-cell-bg": "var(--ui-field-bg)",
24
+ "--ui-otp-separator-text": "var(--color-muted-foreground)"
25
+ },
26
+ "Borders & Outlines": {
27
+ "--ui-otp-cell-border-color": "var(--ui-field-border-color)",
28
+ "--ui-otp-cell-border-style": "var(--ui-field-border-style)",
29
+ "--ui-otp-cell-border-width": "var(--ui-field-border-width)",
30
+ "--ui-otp-cell-corner-shape": "var(--ui-field-corner-shape)",
31
+ "--ui-otp-cell-radius": "var(--ui-field-radius)"
32
+ },
33
+ "Interaction & UI": {
34
+ "--ui-otp-caret-color": "var(--ui-field-border-color--focus-within)"
35
+ }
36
+ },
37
+ "attributes": {
38
+ "data-otp-complete": [],
39
+ "data-otp-groups": [],
40
+ "data-otp-index": [],
41
+ "data-otp-mask": [],
42
+ "data-otp-ready": [],
43
+ "data-otp-submit-behavior": [],
44
+ "data-otp-type": []
45
+ },
46
+ "slots": {
47
+ "data-otp-slot": [
48
+ "cell",
49
+ "input",
50
+ "rail",
51
+ "separator"
52
+ ]
53
+ },
54
+ "states": {
55
+ "data-otp-state": [
56
+ "active"
57
+ ]
58
+ },
59
+ "requires": [
60
+ "fields",
61
+ "input"
62
+ ],
63
+ "files": {
64
+ "css": [
65
+ "primitives/otp/otp.css"
66
+ ],
67
+ "js": [
68
+ "primitives/otp/otp.js"
69
+ ],
70
+ "base": [],
71
+ "examples": [
72
+ "primitives/otp/otp.html"
73
+ ]
74
+ }
75
+ }
@@ -20,9 +20,9 @@
20
20
  * - `data-otp-type`: sanitization charset: `numeric` (default), `alpha`,
21
21
  * `alphanumeric`, `none`. Keep it in agreement with the input `pattern`
22
22
  * and `inputmode`, which carry the no-JS validation.
23
- * - `data-otp-mask`: render `•` in the cells instead of characters.
24
- * - `data-otp-auto-submit`: request the owning form submission once when
25
- * the code is complete.
23
+ * - `data-otp-mask="true"`: render `•` in the cells instead of characters.
24
+ * - `data-otp-submit-behavior="auto"`: request the owning form submission once
25
+ * when the code is complete (default: leave submitting to the form).
26
26
  *
27
27
  * Stamped state: cells are `[data-otp-slot~="cell"]` with a `data-otp-state`
28
28
  * token list (`filled`, `active`); separators are `[data-otp-slot~="separator"]`; the root
@@ -142,7 +142,7 @@ class UiOtp extends ZazzElement {
142
142
 
143
143
  const length = input.maxLength > 0 ? input.maxLength : 6;
144
144
  const type = (this.getAttribute("data-otp-type") ?? "numeric") as OtpType;
145
- const mask = this.hasAttribute("data-otp-mask");
145
+ const mask = this.getAttribute("data-otp-mask") === "true";
146
146
  const groups = parseGroups(this.getAttribute("data-otp-groups"), length);
147
147
 
148
148
  const rail = this.#stampRail(groups);
@@ -211,7 +211,7 @@ class UiOtp extends ZazzElement {
211
211
  if (complete) this.setAttribute("data-otp-complete", "");
212
212
  else this.removeAttribute("data-otp-complete");
213
213
 
214
- if (complete && this.hasAttribute("data-otp-auto-submit")) {
214
+ if (complete && this.getAttribute("data-otp-submit-behavior") === "auto") {
215
215
  // Once per distinct complete value, so corrections can resubmit
216
216
  if (this.#lastSubmitted !== value.get()) {
217
217
  this.#lastSubmitted = value.get();
@@ -7,6 +7,9 @@
7
7
  * @uses :focus-within, :has: shell focus ring and padding (as input-group.css)
8
8
  * @uses --_touch-min (touch screens): the shell and its addons grow to the touch floor,
9
9
  * and the input's inline sides gain half of what the height grew
10
+ * @uses --ui-button-* / --ui-toggle-* hooks — a button or toggle in an addon takes its
11
+ * size from the shell (no size preset; "icon" stays square); on a touch screen
12
+ * it keeps its box and an ::after hit area takes the floor
10
13
  * @uses aria-pressed on toggle — show/hide icon swap via CSS (JS sets type +
11
14
  * aria in password-group.ts)
12
15
  * @uses Native reveal suppressed in _reset.css (::-ms-reveal, etc.)
@@ -83,7 +86,7 @@
83
86
  --_radius-len: var(--_radius-resolved, var(--ui-field-radius));
84
87
  --_radius-num: var(--_radius-resolved, var(--ui-field-radius));
85
88
  border-radius: calc(
86
- var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-multiplier)
89
+ var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-coefficient)
87
90
  );
88
91
  corner-shape: var(--_corner-shape-resolved, var(--ui-field-corner-shape));
89
92
 
@@ -239,10 +242,37 @@
239
242
  block-size: var(--ui-field-icon-size);
240
243
  }
241
244
 
242
- :where([data-ui~="password-group"]) [data-ui~="button"] {
245
+ /* A button or toggle in an addon takes its size from the shell: it sits
246
+ --ui-field-inset-p inside the border (an addon is --ui-field-h tall), so it never
247
+ makes the group taller and needs no size preset; an icon-only one keeps "icon"
248
+ and comes out square. The hooks go on the control itself, so a popover or dialog
249
+ opened from the addon (a menu's items) keeps its own sizes. */
250
+ :where([data-ui~="password-group"] [data-password-group-slot~="addon"])
251
+ :is([data-ui~="button"], [data-ui~="toggle"]):not(:where([popover], dialog) *) {
252
+ --ui-button-min-h: calc(var(--ui-field-h) - 2 * var(--ui-field-inset-p));
253
+ --ui-button-py: 0px;
254
+ --ui-button-px: calc(var(--spacing) * 2);
255
+ --ui-button-font-size: var(--font-size-xs);
256
+ --ui-button-icon-size: calc(var(--spacing) * 3.5);
257
+ --ui-toggle-min-h: var(--ui-button-min-h);
258
+ --ui-toggle-py: var(--ui-button-py);
259
+ --ui-toggle-px: var(--ui-button-px);
260
+ --ui-toggle-font-size: var(--ui-button-font-size);
261
+ --ui-toggle-icon-size: var(--ui-button-icon-size);
262
+
243
263
  flex-shrink: 0;
244
264
  border-radius: var(--ui-field-inset-radius);
245
265
  corner-shape: var(--ui-field-corner-shape);
266
+ /* the box stays inside the shell on a touch screen; ::after takes the floor */
267
+ --_touch-floor: 0px;
268
+ position: relative;
269
+ }
270
+
271
+ :where([data-ui~="password-group"] [data-password-group-slot~="addon"])
272
+ :is([data-ui~="button"], [data-ui~="toggle"]):not(:where([popover], dialog) *)::after {
273
+ content: "";
274
+ position: absolute;
275
+ inset: min(0px, calc((100% - var(--_touch-min)) / 2));
246
276
  }
247
277
 
248
278
  :where([data-ui~="field"]:has(:user-invalid))
@@ -27,7 +27,7 @@
27
27
  data-password-group-slot="toggle"
28
28
  type="button"
29
29
  data-button-variant="ghost"
30
- data-button-size="icon-sm"
30
+ data-button-size="icon"
31
31
  aria-pressed="false"
32
32
  aria-label="Show password"
33
33
  aria-describedby="pw-preview-warning"
@@ -0,0 +1,74 @@
1
+ {
2
+ "name": "password-group",
3
+ "summary": "password-group.css — Password group ([data-ui~=\"password-group\"])",
4
+ "identities": [
5
+ "password-group"
6
+ ],
7
+ "tags": [
8
+ "ui-password"
9
+ ],
10
+ "hooks": {
11
+ "Layout & Positioning": {
12
+ "--ui-password-group-display": "flex",
13
+ "--ui-password-group-flex-wrap": "wrap",
14
+ "--ui-password-group-gap": "var(--spacing)",
15
+ "--ui-password-group-items": "center"
16
+ },
17
+ "Box Model & Sizing": {
18
+ "--ui-password-group-min-h": "var(--ui-field-h)",
19
+ "--ui-password-group-p": "0",
20
+ "--ui-password-group-textarea-min-h": "3lh",
21
+ "--ui-password-group-textarea-px": "calc(var(--spacing) * 2)",
22
+ "--ui-password-group-textarea-py": "calc(var(--spacing) * 1.5)",
23
+ "--ui-password-group-w": "100%"
24
+ },
25
+ "Typography": {
26
+ "--ui-password-group-font-size": "var(--font-size-sm)",
27
+ "--ui-password-group-font-weight": "var(--font-weight-strong)"
28
+ },
29
+ "Color & Backgrounds": {
30
+ "--ui-password-group-text": "var(--color-muted-foreground)"
31
+ },
32
+ "Interaction & UI": {
33
+ "--ui-password-group-cursor": "text"
34
+ }
35
+ },
36
+ "attributes": {
37
+ "data-password-group-align": [
38
+ "block-end",
39
+ "block-start",
40
+ "inline-end",
41
+ "inline-start"
42
+ ],
43
+ "data-password-group-label-hide": [],
44
+ "data-password-group-label-show": []
45
+ },
46
+ "slots": {
47
+ "data-password-group-slot": [
48
+ "addon",
49
+ "icon",
50
+ "icon-hide",
51
+ "icon-show",
52
+ "text",
53
+ "toggle"
54
+ ]
55
+ },
56
+ "states": {},
57
+ "requires": [
58
+ "fields",
59
+ "input",
60
+ "button"
61
+ ],
62
+ "files": {
63
+ "css": [
64
+ "primitives/password-group/password-group.css"
65
+ ],
66
+ "js": [
67
+ "primitives/password-group/password-group.js"
68
+ ],
69
+ "base": [],
70
+ "examples": [
71
+ "primitives/password-group/password-group.html"
72
+ ]
73
+ }
74
+ }
@@ -71,7 +71,7 @@
71
71
  --_radius-len: var(--_radius-resolved, var(--ui-popover-radius));
72
72
  --_radius-num: var(--_radius-resolved, var(--ui-popover-radius));
73
73
  border-radius: calc(
74
- var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-multiplier)
74
+ var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-coefficient)
75
75
  );
76
76
  corner-shape: var(--_corner-shape-resolved, var(--ui-popover-corner-shape));
77
77
  box-shadow: var(--_shadow-resolved, var(--ui-popover-shadow));
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "popover",
3
+ "summary": "popover.css: Shared [popover] primitive (Tier 3 owner for --ui-popover-*)",
4
+ "identities": [],
5
+ "tags": [],
6
+ "hooks": {
7
+ "Layout & Positioning": {
8
+ "--ui-popover-position-area": "block-end inline-start",
9
+ "--ui-popover-position-try-fallbacks": "flip-block, flip-inline, flip-block flip-inline"
10
+ },
11
+ "Box Model & Sizing": {
12
+ "--ui-popover-max-w": "100vi",
13
+ "--ui-popover-min-w": "var(--article-xs)",
14
+ "--ui-popover-mx": "0",
15
+ "--ui-popover-my": "calc(var(--spacing) * 1.5)",
16
+ "--ui-popover-p": "calc(var(--spacing) * 1.5)"
17
+ },
18
+ "Borders & Outlines": {
19
+ "--ui-popover-border-color": "var(--color-border)",
20
+ "--ui-popover-button-corner-shape": "var(--radius-corner-shape)",
21
+ "--ui-popover-button-radius": "var(--radius-sm)",
22
+ "--ui-popover-corner-shape": "var(--radius-corner-shape)",
23
+ "--ui-popover-radius": "var(--radius-md)"
24
+ },
25
+ "Visual Effects": {
26
+ "--ui-popover-opacity--end": "1",
27
+ "--ui-popover-opacity--start": "0",
28
+ "--ui-popover-shadow": "var(--shadow-md)"
29
+ },
30
+ "Transforms & Animation": {
31
+ "--ui-popover-origin": "top center",
32
+ "--ui-popover-scale--end": "1",
33
+ "--ui-popover-scale--start": "0.98",
34
+ "--ui-popover-translate--end": "0, 0, 0",
35
+ "--ui-popover-translate--start": "0, 0, 0"
36
+ }
37
+ },
38
+ "attributes": {
39
+ "data-popover-align": [
40
+ "center",
41
+ "end",
42
+ "start"
43
+ ],
44
+ "data-popover-side": [
45
+ "bottom",
46
+ "left",
47
+ "right",
48
+ "top"
49
+ ]
50
+ },
51
+ "slots": {},
52
+ "states": {},
53
+ "requires": [],
54
+ "files": {
55
+ "css": [
56
+ "primitives/popover/popover.css"
57
+ ],
58
+ "js": [],
59
+ "base": [],
60
+ "examples": [
61
+ "primitives/popover/popover.html"
62
+ ]
63
+ }
64
+ }
@@ -8,7 +8,13 @@
8
8
  * ::-moz-progress-bar) — never combine the two vendors in one
9
9
  * selector list (an unknown pseudo invalidates the whole rule)
10
10
  * @uses :indeterminate — animated stripe on the element background
11
- * @uses corner-shape — round by default, so circles stay circles; a hook takes any shape
11
+ * @uses corner-shape — round by default, so circles stay circles. A concave shape at a
12
+ * full radius can empty the bar, and CSS can't read the number in superellipse(), so
13
+ * the hook keeps a convex shape from this list (round, squircle, square,
14
+ * superellipse(1 | 1.3 | 2 | infinity)) and draws anything else round; the check is an
15
+ * if(). Only Chromium and Safari draw corner-shape, and both support if(); where if()
16
+ * is missing the private is invalid and its round fallback draws. The
17
+ * --corner-shape utility still sets any shape, and the fill inherits the track's.
12
18
  * @tokens --ui-progress-* (@layer variables)
13
19
  * @consumedby meter.css
14
20
  */
@@ -26,6 +32,13 @@
26
32
  }
27
33
  }
28
34
 
35
+ /* The hook's shape, floored (see the header). Read as var(…, round): WebKit drops a
36
+ registered "*" property read with no fallback in corner-shape. */
37
+ @property --_progress-shape {
38
+ syntax: "*";
39
+ inherits: false;
40
+ }
41
+
29
42
  @layer reset {
30
43
  /* ===========================================================================
31
44
  PROGRESS — native <progress> fill redraw
@@ -46,9 +59,18 @@
46
59
  --_radius-len: var(--_radius-resolved, var(--ui-progress-radius));
47
60
  --_radius-num: var(--_radius-resolved, var(--ui-progress-radius));
48
61
  border-radius: calc(
49
- var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-multiplier)
62
+ var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-coefficient)
63
+ );
64
+ --_progress-shape: if(
65
+ style(--ui-progress-corner-shape: round) or style(--ui-progress-corner-shape: squircle) or
66
+ style(--ui-progress-corner-shape: square) or
67
+ style(--ui-progress-corner-shape: superellipse(1)) or
68
+ style(--ui-progress-corner-shape: superellipse(1.3)) or
69
+ style(--ui-progress-corner-shape: superellipse(2)) or
70
+ style(--ui-progress-corner-shape: superellipse(infinity)): var(--ui-progress-corner-shape);
71
+ else: round
50
72
  );
51
- corner-shape: var(--_corner-shape-resolved, var(--ui-progress-corner-shape));
73
+ corner-shape: var(--_corner-shape-resolved, var(--_progress-shape, round));
52
74
  }
53
75
 
54
76
  :where([data-ui~="progress"])::-webkit-progress-bar {
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "progress",
3
+ "summary": "progress.css — Progress ([data-ui~=\"progress\"] on native <progress>)",
4
+ "identities": [
5
+ "progress"
6
+ ],
7
+ "tags": [],
8
+ "hooks": {
9
+ "Box Model & Sizing": {
10
+ "--ui-progress-h": "calc(var(--spacing) * 1.5)",
11
+ "--ui-progress-w": "100%"
12
+ },
13
+ "Color & Backgrounds": {
14
+ "--ui-progress-bar-bg": "var(--color-primary)",
15
+ "--ui-progress-bg": "var(--color-muted)"
16
+ },
17
+ "Borders & Outlines": {
18
+ "--ui-progress-corner-shape": "round",
19
+ "--ui-progress-radius": "var(--radius-full)",
20
+ "--ui-progress-track-border": "1px solid transparent"
21
+ },
22
+ "Transforms & Animation": {
23
+ "--ui-progress-indeterminate-duration": "1s"
24
+ }
25
+ },
26
+ "attributes": {},
27
+ "slots": {},
28
+ "states": {},
29
+ "requires": [],
30
+ "files": {
31
+ "css": [
32
+ "primitives/progress/progress.css"
33
+ ],
34
+ "js": [],
35
+ "base": [],
36
+ "examples": [
37
+ "primitives/progress/progress.html",
38
+ "primitives/progress/progress-indeterminate.html"
39
+ ]
40
+ }
41
+ }