@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
@@ -35,11 +35,11 @@
35
35
  <span data-ui="badge" data-badge-variant="success">In stock</span>
36
36
  <span data-ui="badge" data-badge-variant="muted">Free shipping</span>
37
37
  </div>
38
- <h3 data-ui="text-lg">Field monitor headphones</h3>
39
- <p data-ui="text-sm" style="--text: var(--color-muted-foreground)">
38
+ <h3 data-font="lg">Field monitor headphones</h3>
39
+ <p data-font="sm" style="--text: var(--color-muted-foreground)">
40
40
  Closed-back, 40 hours of battery, and a fold-flat frame for the trail.
41
41
  </p>
42
- <p data-ui="text-xl" style="--font-weight: strong">$189</p>
42
+ <p data-font="xl" style="--font-weight: strong">$189</p>
43
43
  </div>
44
44
  <footer
45
45
  data-card-slot="footer"
@@ -43,8 +43,8 @@
43
43
  >
44
44
  <span data-ui="badge" data-badge-variant="muted">Research</span>
45
45
  </div>
46
- <h3 data-ui="text-lg">Migration patterns</h3>
47
- <p data-ui="text-sm" style="--text: var(--color-muted-foreground)">
46
+ <h3 data-font="lg">Migration patterns</h3>
47
+ <p data-font="sm" style="--text: var(--color-muted-foreground)">
48
48
  Satellite collars reveal ancient routes herds still follow each dry season across the
49
49
  floodplain.
50
50
  </p>
@@ -105,8 +105,8 @@
105
105
  >
106
106
  <span data-ui="badge" data-badge-variant="muted">Field notes</span>
107
107
  </div>
108
- <h3 data-ui="text-lg">How quickly zebras jump</h3>
109
- <p data-ui="text-sm" style="--text: var(--color-muted-foreground)">
108
+ <h3 data-font="lg">How quickly zebras jump</h3>
109
+ <p data-font="sm" style="--text: var(--color-muted-foreground)">
110
110
  Striped coats and sudden bursts of speed help herds evade predators when the grasslands go
111
111
  quiet at dusk, long after the light fades from the plain.
112
112
  </p>
@@ -131,7 +131,7 @@
131
131
  --_radius-len: var(--_radius-resolved, var(--_card-radius, var(--ui-card-radius)));
132
132
  --_radius-num: var(--_radius-resolved, var(--_card-radius, var(--ui-card-radius)));
133
133
  border-radius: calc(
134
- var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-multiplier)
134
+ var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-coefficient)
135
135
  );
136
136
  corner-shape: var(--_corner-shape-resolved, var(--ui-card-corner-shape));
137
137
  box-shadow: var(--_shadow-resolved, var(--_card-shadow, var(--ui-card-shadow)));
@@ -34,8 +34,8 @@
34
34
  --gap: 1;
35
35
  "
36
36
  >
37
- <h3 data-ui="text-lg">Default</h3>
38
- <p data-ui="text-sm" style="--text: var(--color-muted-foreground)">
37
+ <h3 data-font="lg">Default</h3>
38
+ <p data-font="sm" style="--text: var(--color-muted-foreground)">
39
39
  Bare: no padding, radius, or surface, so media runs edge to edge.
40
40
  </p>
41
41
  </hgroup>
@@ -64,8 +64,8 @@
64
64
  --gap: 1;
65
65
  "
66
66
  >
67
- <h3 data-ui="text-lg">Outline</h3>
68
- <p data-ui="text-sm" style="--text: var(--color-muted-foreground)">
67
+ <h3 data-font="lg">Outline</h3>
68
+ <p data-font="sm" style="--text: var(--color-muted-foreground)">
69
69
  Padding, the radius, and a border. The header image bleeds to the card's edges.
70
70
  </p>
71
71
  </hgroup>
@@ -94,8 +94,8 @@
94
94
  --gap: 1;
95
95
  "
96
96
  >
97
- <h3 data-ui="text-lg">Muted</h3>
98
- <p data-ui="text-sm" style="--text: var(--color-muted-foreground)">
97
+ <h3 data-font="lg">Muted</h3>
98
+ <p data-font="sm" style="--text: var(--color-muted-foreground)">
99
99
  Padding, the radius, and the muted surface, for quieter groupings.
100
100
  </p>
101
101
  </hgroup>
@@ -124,8 +124,8 @@
124
124
  --gap: 1;
125
125
  "
126
126
  >
127
- <h3 data-ui="text-lg">Floating</h3>
128
- <p data-ui="text-sm" style="--text: var(--color-muted-foreground)">
127
+ <h3 data-font="lg">Floating</h3>
128
+ <p data-font="sm" style="--text: var(--color-muted-foreground)">
129
129
  Padding, the radius, the card surface, a border, and a small shadow.
130
130
  </p>
131
131
  </hgroup>
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "card",
3
+ "summary": "card.css: Card (ui-card | [data-ui~=\"card\"])",
4
+ "identities": [
5
+ "card"
6
+ ],
7
+ "tags": [
8
+ "ui-card"
9
+ ],
10
+ "hooks": {
11
+ "Layout & Positioning": {
12
+ "--ui-card-display": "grid",
13
+ "--ui-card-gap": "var(--space-sm)",
14
+ "--ui-card-place-content": "start stretch"
15
+ },
16
+ "Box Model & Sizing": {
17
+ "--ui-card-header-w": "40%",
18
+ "--ui-card-p": "0"
19
+ },
20
+ "Color & Backgrounds": {
21
+ "--ui-card-bg": "transparent",
22
+ "--ui-card-text": "var(--color-card-foreground)"
23
+ },
24
+ "Borders & Outlines": {
25
+ "--ui-card-border-color": "transparent",
26
+ "--ui-card-border-style": "solid",
27
+ "--ui-card-border-width": "1px",
28
+ "--ui-card-corner-shape": "var(--radius-corner-shape)",
29
+ "--ui-card-radius": "var(--radius-lg)"
30
+ },
31
+ "Visual Effects": {
32
+ "--ui-card-shadow": "none"
33
+ }
34
+ },
35
+ "attributes": {
36
+ "data-card-orientation": [
37
+ "horizontal",
38
+ "vertical"
39
+ ],
40
+ "data-card-variant": [
41
+ "floating",
42
+ "muted",
43
+ "outline"
44
+ ]
45
+ },
46
+ "slots": {
47
+ "data-card-slot": [
48
+ "body",
49
+ "footer",
50
+ "header"
51
+ ]
52
+ },
53
+ "states": {},
54
+ "requires": [
55
+ "font",
56
+ "link"
57
+ ],
58
+ "files": {
59
+ "css": [
60
+ "primitives/card/card.css"
61
+ ],
62
+ "js": [],
63
+ "base": [],
64
+ "examples": [
65
+ "primitives/card/card.html",
66
+ "primitives/card/card-horizontal.html",
67
+ "primitives/card/card-product.html",
68
+ "primitives/card/card-login.html",
69
+ "primitives/card/card-article.html",
70
+ "primitives/card/card-subgrid.html"
71
+ ]
72
+ }
73
+ }
@@ -64,7 +64,7 @@
64
64
  overscroll-behavior-y: contain;
65
65
  }
66
66
 
67
- /* free: drag-free (thumb strips by default), no snapping at all.
67
+ /* free: `data-carousel-snap="free"` (thumb strips by default), no snapping at all.
68
68
  gliding: a mouse drag, its release scroll, or auto-scroll; snapping off
69
69
  until it lands. settling: a loop rotation's compensating scroll, with the
70
70
  axis locked too (iOS Safari otherwise paints the reordered frame before
@@ -0,0 +1,89 @@
1
+ {
2
+ "name": "carousel",
3
+ "summary": "carousel.css — scroll-snap carousel (ui-carousel | [data-ui~=\"carousel\"] + data-carousel-slot hooks)",
4
+ "identities": [
5
+ "carousel"
6
+ ],
7
+ "tags": [
8
+ "ui-carousel"
9
+ ],
10
+ "hooks": {
11
+ "Layout & Positioning": {
12
+ "--ui-carousel-gap": "0px",
13
+ "--ui-carousel-slide-basis": "calc(100% - var(--ui-carousel-gap))"
14
+ },
15
+ "Box Model & Sizing": {
16
+ "--ui-carousel-slide-min-w": "0"
17
+ },
18
+ "Transforms & Animation": {
19
+ "--ui-carousel-settle-duration": "calc(var(--default-transition-duration) * 2)",
20
+ "--ui-carousel-settle-ease": "var(--default-transition-timing-function)"
21
+ },
22
+ "Interaction & UI": {
23
+ "--ui-carousel-cursor--grabbing": "grabbing",
24
+ "--ui-carousel-snap-align": "start"
25
+ }
26
+ },
27
+ "attributes": {
28
+ "data-carousel-align": [
29
+ "center",
30
+ "end"
31
+ ],
32
+ "data-carousel-axis": [
33
+ "y"
34
+ ],
35
+ "data-carousel-draggable": [
36
+ "false"
37
+ ],
38
+ "data-carousel-init": [],
39
+ "data-carousel-keyboard": [],
40
+ "data-carousel-loop": [],
41
+ "data-carousel-plugins": [],
42
+ "data-carousel-start": [],
43
+ "data-carousel-start-index": [],
44
+ "data-carousel-thumbs-axis": [
45
+ "y"
46
+ ]
47
+ },
48
+ "slots": {
49
+ "data-carousel-slot": [
50
+ "container",
51
+ "dot",
52
+ "dots",
53
+ "next",
54
+ "prev",
55
+ "slide",
56
+ "thumbs",
57
+ "viewport"
58
+ ]
59
+ },
60
+ "states": {
61
+ "data-carousel-state": [
62
+ "active",
63
+ "dragging",
64
+ "free",
65
+ "gliding",
66
+ "in-view",
67
+ "jumping",
68
+ "settling",
69
+ "snapped"
70
+ ]
71
+ },
72
+ "requires": [],
73
+ "files": {
74
+ "css": [
75
+ "primitives/carousel/carousel.css"
76
+ ],
77
+ "js": [
78
+ "primitives/carousel/carousel.js"
79
+ ],
80
+ "base": [
81
+ "behaviors/gesture.js",
82
+ "base/carousel-scroll.js",
83
+ "base/carousel.js"
84
+ ],
85
+ "examples": [
86
+ "primitives/carousel/carousel.html"
87
+ ]
88
+ }
89
+ }
@@ -40,7 +40,6 @@
40
40
  @layer reset {
41
41
  :where(input[type="checkbox"]:not([role="switch"])) {
42
42
  position: relative;
43
- -webkit-appearance: none;
44
43
  appearance: none;
45
44
  flex-shrink: 0;
46
45
  /* dual-mode: --size is a scale number or a length */
@@ -65,7 +64,7 @@
65
64
  --_radius-len: var(--_radius-resolved, var(--ui-checkbox-radius));
66
65
  --_radius-num: var(--_radius-resolved, var(--ui-checkbox-radius));
67
66
  border-radius: calc(
68
- var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-multiplier)
67
+ var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-coefficient)
69
68
  );
70
69
  corner-shape: var(--_corner-shape-resolved, var(--ui-checkbox-corner-shape));
71
70
 
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "checkbox",
3
+ "summary": "checkbox.css — Checkbox (input[type=\"checkbox\"]:not([role=\"switch\"]))",
4
+ "identities": [],
5
+ "tags": [],
6
+ "hooks": {
7
+ "Box Model & Sizing": {
8
+ "--ui-checkbox-glyph-size": "1em",
9
+ "--ui-checkbox-size": "calc(var(--spacing) * 4.5)"
10
+ },
11
+ "Color & Backgrounds": {
12
+ "--ui-checkbox-bg": "var(--ui-field-bg)",
13
+ "--ui-checkbox-bg--checked": "var(--color-primary)",
14
+ "--ui-checkbox-glyph-color": "var(--color-primary-foreground)"
15
+ },
16
+ "Borders & Outlines": {
17
+ "--ui-checkbox-border-color": "var(--ui-field-border-color)",
18
+ "--ui-checkbox-border-color--checked": "var(--color-primary)",
19
+ "--ui-checkbox-border-color--hover": "var(--ui-field-border-color--hover)",
20
+ "--ui-checkbox-border-style": "var(--ui-field-border-style)",
21
+ "--ui-checkbox-border-width": "var(--ui-field-border-width)",
22
+ "--ui-checkbox-corner-shape": "var(--radius-corner-shape)",
23
+ "--ui-checkbox-radius": "var(--radius-xs)"
24
+ },
25
+ "Visual Effects": {
26
+ "--ui-checkbox-checkmark-mask": "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' fill='none' stroke='currentColor' stroke-linecap='square' stroke-linejoin='square' stroke-width='3' viewBox='0 0 24 24'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E\") center / contain no-repeat",
27
+ "--ui-checkbox-indeterminate-mask": "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' fill='none' stroke='currentColor' stroke-linecap='square' stroke-linejoin='square' stroke-width='3' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E\") center / contain no-repeat"
28
+ }
29
+ },
30
+ "attributes": {
31
+ "data-checkbox-controls": []
32
+ },
33
+ "slots": {},
34
+ "states": {},
35
+ "requires": [
36
+ "fields"
37
+ ],
38
+ "files": {
39
+ "css": [
40
+ "primitives/checkbox/checkbox.css"
41
+ ],
42
+ "js": [
43
+ "primitives/checkbox/checkbox.js"
44
+ ],
45
+ "base": [],
46
+ "examples": [
47
+ "primitives/checkbox/checkbox.html",
48
+ "primitives/checkbox/checkbox-tasklist.html"
49
+ ]
50
+ }
51
+ }
@@ -153,7 +153,7 @@
153
153
  --_radius-len: var(--_radius-resolved, var(--ui-combobox-radius));
154
154
  --_radius-num: var(--_radius-resolved, var(--ui-combobox-radius));
155
155
  border-radius: calc(
156
- var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-multiplier)
156
+ var(--_radius-len) + var(--_radius-num) * var(--spacing) * var(--radius-coefficient)
157
157
  );
158
158
  corner-shape: var(--_corner-shape-resolved, var(--ui-combobox-corner-shape));
159
159
 
@@ -341,7 +341,8 @@
341
341
  /* The label wears its own box because text-overflow ignores a flex
342
342
  container's own text, and [data-ui~="badge"] is display: flex */
343
343
  :where(ui-combobox, [data-ui~="combobox"]) [data-combobox-slot~="tag-label"] {
344
- overflow: hidden;
344
+ overflow-x: clip;
345
+ overflow-y: visible;
345
346
  text-overflow: ellipsis;
346
347
  white-space: nowrap;
347
348
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @fileoverview `<ui-combobox>`: an input restricted to a predefined list.
3
3
  * @description Light-DOM custom element on the shared typeahead engine
4
- * (`base/typeahead.ts`). A relative of select: the panel filters as you type,
4
+ * (`behaviors/typeahead.ts`). A relative of select: the panel filters as you type,
5
5
  * but free text can never submit. The form value lives in an authored hidden
6
6
  * input (`data-combobox-slot="value"`), synced whenever the selection changes.
7
7
  *
@@ -43,7 +43,7 @@
43
43
  * `combobox-trigger` (chevron), `combobox-panel`, `combobox-list`,
44
44
  * `combobox-item`, `combobox-group` / `combobox-group-label`, `combobox-empty`.
45
45
  */
46
- import { TypeaheadElement } from "../../base/typeahead.ts";
46
+ import { TypeaheadElement } from "../../behaviors/typeahead.ts";
47
47
  /** What a blur does to the input's text and to the committed selection. */
48
48
  interface BlurOutcome {
49
49
  /** The text the input shows once focus has left. */
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["comb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OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;AACvD,YAAY,EAAE,WAAW,EAAE,CAAC"}
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * @fileoverview `<ui-combobox>`: an input restricted to a predefined list.
4
4
  * @description Light-DOM custom element on the shared typeahead engine
5
- * (`base/typeahead.ts`). A relative of select: the panel filters as you type,
5
+ * (`behaviors/typeahead.ts`). A relative of select: the panel filters as you type,
6
6
  * but free text can never submit. The form value lives in an authored hidden
7
7
  * input (`data-combobox-slot="value"`), synced whenever the selection changes.
8
8
  *
@@ -44,7 +44,7 @@
44
44
  * `combobox-trigger` (chevron), `combobox-panel`, `combobox-list`,
45
45
  * `combobox-item`, `combobox-group` / `combobox-group-label`, `combobox-empty`.
46
46
  */
47
- import { TypeaheadElement } from "../../base/typeahead.js";
47
+ import { TypeaheadElement } from "../../behaviors/typeahead.js";
48
48
  import { defineZazzElement } from "../../base/zazz-element.js";
49
49
  /** Default tag markup, cloned per selected value; a `tag-template` overrides it. */
50
50
  const TAG_MARKUP = '<span data-ui="badge" data-combobox-slot="tag">' +
@@ -0,0 +1,113 @@
1
+ {
2
+ "name": "combobox",
3
+ "summary": "combobox.css: Combobox (ui-combobox | [data-ui~=\"combobox\"], [data-combobox-slot~=\"control\"])",
4
+ "identities": [
5
+ "combobox"
6
+ ],
7
+ "tags": [
8
+ "ui-combobox"
9
+ ],
10
+ "hooks": {
11
+ "Layout & Positioning": {
12
+ "--ui-combobox-control-flex-wrap": "nowrap",
13
+ "--ui-combobox-control-gap": "var(--ui-field-gap)",
14
+ "--ui-combobox-control-items": "center",
15
+ "--ui-combobox-option-gap": "var(--ui-field-option-gap)",
16
+ "--ui-combobox-tag-gap": "var(--spacing)"
17
+ },
18
+ "Box Model & Sizing": {
19
+ "--ui-combobox-control-h": "var(--ui-field-h)",
20
+ "--ui-combobox-control-min-h": "auto",
21
+ "--ui-combobox-control-py": "0",
22
+ "--ui-combobox-icon-size": "var(--ui-select-picker-icon-size)",
23
+ "--ui-combobox-input-min-h": "auto",
24
+ "--ui-combobox-input-min-w": "0",
25
+ "--ui-combobox-min-w": "var(--ui-select-min-w)",
26
+ "--ui-combobox-panel-max-h": "calc(var(--spacing) * 72)",
27
+ "--ui-combobox-pl": "var(--ui-select-pl)",
28
+ "--ui-combobox-pr": "var(--ui-select-pr)",
29
+ "--ui-combobox-tag-max-w": "100%",
30
+ "--ui-combobox-tag-py": "var(--spacing)",
31
+ "--ui-combobox-tag-remove-size": "var(--ui-badge-icon-size)",
32
+ "--ui-combobox-w": "var(--ui-select-w)"
33
+ },
34
+ "Color & Backgrounds": {
35
+ "--ui-combobox-icon-color": "var(--ui-select-picker-icon-color)",
36
+ "--ui-combobox-tag-remove-color": "currentColor"
37
+ },
38
+ "Borders & Outlines": {
39
+ "--ui-combobox-border-color": "var(--ui-select-border-color)",
40
+ "--ui-combobox-border-style": "var(--ui-select-border-style)",
41
+ "--ui-combobox-border-width": "var(--ui-select-border-width)",
42
+ "--ui-combobox-corner-shape": "var(--ui-select-corner-shape)",
43
+ "--ui-combobox-radius": "var(--ui-select-radius)",
44
+ "--ui-combobox-tag-remove-corner-shape": "var(--radius-corner-shape)",
45
+ "--ui-combobox-tag-remove-radius": "var(--radius-sm)"
46
+ },
47
+ "Visual Effects": {
48
+ "--ui-combobox-icon-mask": "var(--ui-select-picker-icon-mask)",
49
+ "--ui-combobox-shadow": "var(--ui-menu-shadow)",
50
+ "--ui-combobox-tag-remove-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%3Cline x1='200' y1='56' x2='56' y2='200' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='16'/%3E%3Cline x1='200' y1='200' x2='56' y2='56' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='16'/%3E%3C/svg%3E\")",
51
+ "--ui-combobox-tag-remove-opacity": "0.65",
52
+ "--ui-combobox-tag-remove-opacity--hover": "1"
53
+ }
54
+ },
55
+ "attributes": {
56
+ "data-combobox-filter": [],
57
+ "data-combobox-keywords": [],
58
+ "data-combobox-label-remove": [],
59
+ "data-combobox-min-length": [],
60
+ "data-combobox-sort": [],
61
+ "data-combobox-value": [],
62
+ "data-combobox-variant": [
63
+ "multiselect"
64
+ ]
65
+ },
66
+ "slots": {
67
+ "data-combobox-slot": [
68
+ "control",
69
+ "empty",
70
+ "group",
71
+ "group-label",
72
+ "item",
73
+ "list",
74
+ "panel",
75
+ "tag",
76
+ "tag-label",
77
+ "tag-remove",
78
+ "tag-template",
79
+ "trigger",
80
+ "value"
81
+ ]
82
+ },
83
+ "states": {
84
+ "data-combobox-state": [
85
+ "highlighted"
86
+ ]
87
+ },
88
+ "requires": [
89
+ "popover",
90
+ "button",
91
+ "fields",
92
+ "badge",
93
+ "select"
94
+ ],
95
+ "files": {
96
+ "css": [
97
+ "primitives/combobox/combobox.css"
98
+ ],
99
+ "js": [
100
+ "primitives/combobox/combobox.js"
101
+ ],
102
+ "base": [
103
+ "behaviors/list-navigation.js",
104
+ "behaviors/command-score.js",
105
+ "behaviors/hotkeys.js",
106
+ "behaviors/typeahead.js"
107
+ ],
108
+ "examples": [
109
+ "primitives/combobox/combobox.html",
110
+ "primitives/combobox/combobox-multiselect.html"
111
+ ]
112
+ }
113
+ }
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * @fileoverview `<ui-combobox>`: an input restricted to a predefined list.
5
5
  * @description Light-DOM custom element on the shared typeahead engine
6
- * (`base/typeahead.ts`). A relative of select: the panel filters as you type,
6
+ * (`behaviors/typeahead.ts`). A relative of select: the panel filters as you type,
7
7
  * but free text can never submit. The form value lives in an authored hidden
8
8
  * input (`data-combobox-slot="value"`), synced whenever the selection changes.
9
9
  *
@@ -46,7 +46,7 @@
46
46
  * `combobox-item`, `combobox-group` / `combobox-group-label`, `combobox-empty`.
47
47
  */
48
48
 
49
- import { TypeaheadElement } from "../../base/typeahead.ts";
49
+ import { TypeaheadElement } from "../../behaviors/typeahead.ts";
50
50
  import { defineZazzElement } from "../../base/zazz-element.ts";
51
51
 
52
52
  /** Default tag markup, cloned per selected value; a `tag-template` overrides it. */
@@ -54,7 +54,7 @@
54
54
  commandfor="command-actions-target"
55
55
  tabindex="-1"
56
56
  data-command-keywords="dark light mode appearance"
57
- data-command-stay-open
57
+ data-command-select-behavior="persist"
58
58
  style="--justify: start"
59
59
  >
60
60
  Toggle theme
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @fileoverview `<ui-command>`: a command menu for search and quick actions.
3
3
  * @description Light-DOM custom element on the shared typeahead engine
4
- * (`base/typeahead.ts`). The panel (a `popover="auto"`
4
+ * (`behaviors/typeahead.ts`). The panel (a `popover="auto"`
5
5
  * dropdown or a `<dialog data-ui="dialog">`) contains the search input;
6
6
  * items rank by match score and the best match auto-highlights.
7
7
  *
@@ -17,7 +17,8 @@
17
17
  * - `data-command-hotkey` (root): global toggle shortcut, e.g. `"mod+k"`.
18
18
  * - `data-command-hotkey` (item): global accelerator that activates the item, active
19
19
  * while the element is connected (even with the panel closed).
20
- * - `data-command-stay-open` (item): keep the panel open after activation.
20
+ * - `data-command-select-behavior="persist"` (item): keep the panel open after
21
+ * activation (default: close it).
21
22
  * - `data-command-sort="document"` (root): opt out of score ranking (default: score).
22
23
  * - `data-command-filter="none"` (root): opt out of filtering for a list another
23
24
  * source already filtered (a search index); items added later are highlighted
@@ -31,7 +32,7 @@
31
32
  * For complex custom actions, see the example `command-actions.ts`: listen
32
33
  * for your `--command` on its target, or for `zazz:command-select` on the root.
33
34
  */
34
- import { TypeaheadElement } from "../../base/typeahead.ts";
35
+ import { TypeaheadElement } from "../../behaviors/typeahead.ts";
35
36
  declare class UiCommand extends TypeaheadElement {
36
37
  #private;
37
38
  protected readonly slotPrefix = "command";
@@ -1 +1 @@
1
- {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["command.ts"],"names":[],"mappings":"AAEA;;;;;;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 -2,7 +2,7 @@
2
2
  /**
3
3
  * @fileoverview `<ui-command>`: a command menu for search and quick actions.
4
4
  * @description Light-DOM custom element on the shared typeahead engine
5
- * (`base/typeahead.ts`). The panel (a `popover="auto"`
5
+ * (`behaviors/typeahead.ts`). The panel (a `popover="auto"`
6
6
  * dropdown or a `<dialog data-ui="dialog">`) contains the search input;
7
7
  * items rank by match score and the best match auto-highlights.
8
8
  *
@@ -18,7 +18,8 @@
18
18
  * - `data-command-hotkey` (root): global toggle shortcut, e.g. `"mod+k"`.
19
19
  * - `data-command-hotkey` (item): global accelerator that activates the item, active
20
20
  * while the element is connected (even with the panel closed).
21
- * - `data-command-stay-open` (item): keep the panel open after activation.
21
+ * - `data-command-select-behavior="persist"` (item): keep the panel open after
22
+ * activation (default: close it).
22
23
  * - `data-command-sort="document"` (root): opt out of score ranking (default: score).
23
24
  * - `data-command-filter="none"` (root): opt out of filtering for a list another
24
25
  * source already filtered (a search index); items added later are highlighted
@@ -32,8 +33,8 @@
32
33
  * For complex custom actions, see the example `command-actions.ts`: listen
33
34
  * for your `--command` on its target, or for `zazz:command-select` on the root.
34
35
  */
35
- import { TypeaheadElement } from "../../base/typeahead.js";
36
- import { bindHotkey } from "../../base/hotkeys.js";
36
+ import { TypeaheadElement } from "../../behaviors/typeahead.js";
37
+ import { bindHotkey } from "../../behaviors/hotkeys.js";
37
38
  import { defineZazzElement } from "../../base/zazz-element.js";
38
39
  class UiCommand extends TypeaheadElement {
39
40
  slotPrefix = "command";
@@ -100,7 +101,7 @@ class UiCommand extends TypeaheadElement {
100
101
  #clicking = false;
101
102
  /**
102
103
  * @description Runs one item's activation: optional synthetic click,
103
- * `zazz:command-select`, then close (unless `data-command-stay-open`).
104
+ * `zazz:command-select`, then close (unless `data-command-select-behavior="persist"`).
104
105
  *
105
106
  * @param item - The item to activate.
106
107
  * @param click - Whether to run the native activation via `click()`.
@@ -120,7 +121,7 @@ class UiCommand extends TypeaheadElement {
120
121
  this.#clicking = false;
121
122
  }
122
123
  }
123
- if (!item.hasAttribute("data-command-stay-open")) {
124
+ if (item.getAttribute("data-command-select-behavior") !== "persist") {
124
125
  this.#closePanel();
125
126
  }
126
127
  }