@zyncat/ui 0.19.0 → 0.21.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 (355) hide show
  1. package/dist/alert.css +1 -2
  2. package/dist/alert.js +6 -6
  3. package/dist/avatar.css +1 -1
  4. package/dist/badge.css +21 -12
  5. package/dist/badge.js +100 -2
  6. package/dist/badge.js.map +1 -1
  7. package/dist/{bloom-HV23M4AW.js → bloom-5MZXLNKG.js} +23 -5
  8. package/dist/bloom-5MZXLNKG.js.map +1 -0
  9. package/dist/button.css +1 -2
  10. package/dist/button.js +2 -2
  11. package/dist/checkbox.css +1 -1
  12. package/dist/{chunk-JINATP4N.js → chunk-2W7FOMWE.js} +7 -8
  13. package/dist/chunk-2W7FOMWE.js.map +1 -0
  14. package/dist/{chunk-LNAV5E7S.js → chunk-3HE7N3UK.js} +7 -3
  15. package/dist/chunk-3HE7N3UK.js.map +1 -0
  16. package/dist/{chunk-UKPX3RIP.js → chunk-47OMFFIB.js} +3 -3
  17. package/dist/{chunk-UKPX3RIP.js.map → chunk-47OMFFIB.js.map} +1 -1
  18. package/dist/chunk-4M5FMCFJ.js +16 -0
  19. package/dist/chunk-4M5FMCFJ.js.map +1 -0
  20. package/dist/chunk-6BY5G7BI.js +122 -0
  21. package/dist/chunk-6BY5G7BI.js.map +1 -0
  22. package/dist/{chunk-RLNCRDAL.js → chunk-AOEO2LCZ.js} +4 -4
  23. package/dist/{chunk-RLNCRDAL.js.map → chunk-AOEO2LCZ.js.map} +1 -1
  24. package/dist/{chunk-BRKGYLEQ.js → chunk-AQMR7ZYO.js} +8 -3
  25. package/dist/chunk-AQMR7ZYO.js.map +1 -0
  26. package/dist/{chunk-N43NDSME.js → chunk-AXZBD7LY.js} +6 -3
  27. package/dist/chunk-AXZBD7LY.js.map +1 -0
  28. package/dist/{chunk-V6QAAOA5.js → chunk-BWGK3OD6.js} +9 -6
  29. package/dist/chunk-BWGK3OD6.js.map +1 -0
  30. package/dist/{chunk-VQFILXQN.js → chunk-CYZKPUCG.js} +70 -8
  31. package/dist/chunk-CYZKPUCG.js.map +1 -0
  32. package/dist/{chunk-AIAPXRCI.js → chunk-DEZIQTBW.js} +176 -103
  33. package/dist/chunk-DEZIQTBW.js.map +1 -0
  34. package/dist/{tide-DJZMDAFT.js → chunk-DVLKB3CZ.js} +15 -12
  35. package/dist/chunk-DVLKB3CZ.js.map +1 -0
  36. package/dist/{chunk-F64Z42PJ.js → chunk-GM7IPTTT.js} +5 -6
  37. package/dist/chunk-GM7IPTTT.js.map +1 -0
  38. package/dist/chunk-ITW5UCVU.js +24 -0
  39. package/dist/chunk-ITW5UCVU.js.map +1 -0
  40. package/dist/{chunk-TDHLZY6I.js → chunk-JQZ3FTHP.js} +77 -18
  41. package/dist/chunk-JQZ3FTHP.js.map +1 -0
  42. package/dist/{chunk-PXQBJMPJ.js → chunk-LC6NQQER.js} +3 -3
  43. package/dist/{chunk-PXQBJMPJ.js.map → chunk-LC6NQQER.js.map} +1 -1
  44. package/dist/{chunk-M2KGLH2G.js → chunk-LV442ZOR.js} +10 -10
  45. package/dist/{chunk-M2KGLH2G.js.map → chunk-LV442ZOR.js.map} +1 -1
  46. package/dist/{chunk-F2TB3TT6.js → chunk-PNFFK5HY.js} +4 -4
  47. package/dist/{chunk-F2TB3TT6.js.map → chunk-PNFFK5HY.js.map} +1 -1
  48. package/dist/{chunk-2YGHPQ66.js → chunk-Q5N24VII.js} +2 -2
  49. package/dist/{chunk-2YGHPQ66.js.map → chunk-Q5N24VII.js.map} +1 -1
  50. package/dist/{chunk-XKDR22VE.js → chunk-SPFHWHJ6.js} +8 -4
  51. package/dist/chunk-SPFHWHJ6.js.map +1 -0
  52. package/dist/{chunk-TRPAKUIB.js → chunk-TBIY5YR5.js} +8 -8
  53. package/dist/{chunk-TRPAKUIB.js.map → chunk-TBIY5YR5.js.map} +1 -1
  54. package/dist/chunk-TXJQUN7C.js +108 -0
  55. package/dist/chunk-TXJQUN7C.js.map +1 -0
  56. package/dist/{chunk-VZXML7EH.js → chunk-V4ZN5RD4.js} +12 -3
  57. package/dist/chunk-V4ZN5RD4.js.map +1 -0
  58. package/dist/{chunk-VJXP256V.js → chunk-ZSP4ZTII.js} +7 -7
  59. package/dist/{chunk-VJXP256V.js.map → chunk-ZSP4ZTII.js.map} +1 -1
  60. package/dist/collapse.css +1 -1
  61. package/dist/confetti.css +1 -1
  62. package/dist/confetti.js +1 -1
  63. package/dist/crossfade-XFZLFLT7.js +91 -0
  64. package/dist/crossfade-XFZLFLT7.js.map +1 -0
  65. package/dist/date-field.js +20 -18
  66. package/dist/date-field.js.map +1 -1
  67. package/dist/date-picker.css +7 -8
  68. package/dist/date-range-field.js +22 -20
  69. package/dist/date-range-field.js.map +1 -1
  70. package/dist/datetime-field.js +21 -19
  71. package/dist/datetime-field.js.map +1 -1
  72. package/dist/dialog.css +1 -2
  73. package/dist/dialog.js +9 -9
  74. package/dist/digit-strip.css +1 -1
  75. package/dist/dropdown.css +13 -10
  76. package/dist/dropdown.js +37 -20
  77. package/dist/dropdown.js.map +1 -1
  78. package/dist/emoji-picker.js +14 -14
  79. package/dist/facebook-feed.css +1 -1
  80. package/dist/flow-field.css +1 -1
  81. package/dist/flow-field.js +1 -1
  82. package/dist/glide.js +2 -2
  83. package/dist/icon.css +1 -1
  84. package/dist/input.css +1 -4
  85. package/dist/instagram-feed.css +1 -1
  86. package/dist/instagram-feed.js +2 -2
  87. package/dist/lens.css +1 -1
  88. package/dist/lens.js +1 -1
  89. package/dist/menu-surface.css +82 -8
  90. package/dist/modal.css +1 -1
  91. package/dist/modal.js +8 -8
  92. package/dist/morphing-text.css +1 -1
  93. package/dist/morphing-text.js +1 -1
  94. package/dist/motion-devtools.css +1 -1
  95. package/dist/motion-devtools.js +3 -3
  96. package/dist/motion.js +9 -0
  97. package/dist/motion.js.map +1 -0
  98. package/dist/multi-select.js +34 -16
  99. package/dist/multi-select.js.map +1 -1
  100. package/dist/number-field.js +2 -2
  101. package/dist/odometer.css +17 -11
  102. package/dist/odometer.js +105 -72
  103. package/dist/odometer.js.map +1 -1
  104. package/dist/otp-field.js +17 -9
  105. package/dist/otp-field.js.map +1 -1
  106. package/dist/overlay.css +1 -1
  107. package/dist/pagination.css +1 -1
  108. package/dist/pagination.js +4 -4
  109. package/dist/{paint-CJQCM6ZO.js → paint-NLTI6TEF.js} +5 -3
  110. package/dist/paint-NLTI6TEF.js.map +1 -0
  111. package/dist/popover.css +1 -1
  112. package/dist/popover.js +9 -9
  113. package/dist/radio-group.css +11 -5
  114. package/dist/radio-group.js +5 -5
  115. package/dist/select.css +34 -8
  116. package/dist/select.js +25 -12
  117. package/dist/select.js.map +1 -1
  118. package/dist/sheet.css +1 -1
  119. package/dist/sheet.js +9 -9
  120. package/dist/spinner.css +1 -1
  121. package/dist/styles.css +1 -1
  122. package/dist/support-rail.css +7 -2
  123. package/dist/support-rail.js +11 -11
  124. package/dist/table.css +10 -5
  125. package/dist/table.js +7 -7
  126. package/dist/tabs.css +32 -7
  127. package/dist/tabs.js +55 -44
  128. package/dist/tabs.js.map +1 -1
  129. package/dist/tag.css +1 -1
  130. package/dist/tag.js +4 -4
  131. package/dist/textarea.css +14 -2
  132. package/dist/textarea.js +36 -23
  133. package/dist/textarea.js.map +1 -1
  134. package/dist/theme-grid.js +5 -5
  135. package/dist/theme-switcher.css +1 -2
  136. package/dist/theme-switcher.js +14 -14
  137. package/dist/{theme-transition-VGLPZDJI.js → theme-transition-FDF2REFD.js} +27 -7
  138. package/dist/theme-transition-FDF2REFD.js.map +1 -0
  139. package/dist/theme-transition.css +50 -1
  140. package/dist/theme.js +2 -2
  141. package/dist/theme.js.map +1 -1
  142. package/dist/tide-AGGMQEJV.js +4 -0
  143. package/dist/tide-AGGMQEJV.js.map +1 -0
  144. package/dist/tiktok.css +1 -1
  145. package/dist/tiktok.js +2 -2
  146. package/dist/time-field.js +5 -3
  147. package/dist/time-field.js.map +1 -1
  148. package/dist/toast.css +1 -1
  149. package/dist/toast.js +7 -7
  150. package/dist/toggle-tag.js +2 -2
  151. package/dist/toggle.css +1 -1
  152. package/dist/toggle.js +4 -15
  153. package/dist/toggle.js.map +1 -1
  154. package/dist/tooltip.css +1 -1
  155. package/dist/tooltip.js +6 -7
  156. package/dist/tooltip.js.map +1 -1
  157. package/dist/trigger.css +1 -2
  158. package/dist/types/components/composites/date-picker/DateField.d.ts +1 -1
  159. package/dist/types/components/composites/date-picker/DateRangeField.d.ts +1 -1
  160. package/dist/types/components/composites/date-picker/DateTimeField.d.ts +1 -1
  161. package/dist/types/components/composites/date-picker/TimeField.d.ts +1 -1
  162. package/dist/types/components/composites/date-picker/field-shell.d.ts +5 -1
  163. package/dist/types/components/composites/dropdown/Dropdown.d.ts +13 -2
  164. package/dist/types/components/composites/dropdown/types.d.ts +5 -2
  165. package/dist/types/components/composites/select/MultiSelect.d.ts +23 -3
  166. package/dist/types/components/composites/select/Select.d.ts +20 -4
  167. package/dist/types/components/composites/select/core/index.d.ts +2 -1
  168. package/dist/types/components/composites/select/core/menu.d.ts +8 -5
  169. package/dist/types/components/composites/select/core/panel.d.ts +6 -4
  170. package/dist/types/components/composites/select/core/trigger.d.ts +7 -2
  171. package/dist/types/components/composites/select/core/types.d.ts +9 -0
  172. package/dist/types/components/composites/select/core/use-listbox.d.ts +5 -3
  173. package/dist/types/components/composites/tabs/Tabs.d.ts +6 -1
  174. package/dist/types/components/expressive/odometer/Odometer.d.ts +1 -1
  175. package/dist/types/components/expressive/odometer/roll.d.ts +20 -0
  176. package/dist/types/components/expressive/theme-transition/scene.d.ts +3 -0
  177. package/dist/types/components/internal/menu/highlight.d.ts +9 -1
  178. package/dist/types/components/internal/menu/menu-row.d.ts +4 -0
  179. package/dist/types/components/internal/menu/use-anchor-width.d.ts +2 -0
  180. package/dist/types/components/internal/overlay/layer.d.ts +5 -8
  181. package/dist/types/components/internal/overlay/track-anchor.d.ts +5 -0
  182. package/dist/types/components/internal/utils/activation.d.ts +1 -0
  183. package/dist/types/components/primitives/badge/Badge.d.ts +17 -8
  184. package/dist/types/components/primitives/badge/morph-label.d.ts +3 -0
  185. package/dist/types/components/primitives/badge/use-glint-on-change.d.ts +2 -0
  186. package/dist/types/components/primitives/input/OtpField.d.ts +2 -2
  187. package/dist/types/components/primitives/textarea/Textarea.d.ts +2 -2
  188. package/dist/types/components/primitives/textarea/char-meter.d.ts +6 -0
  189. package/dist/types/components/primitives/toggle/switch-glyph.d.ts +6 -0
  190. package/dist/types/motion/crossfade.d.ts +3 -0
  191. package/dist/types/motion/element.d.ts +6 -3
  192. package/dist/types/motion/flip.d.ts +8 -2
  193. package/dist/types/motion/motion.d.ts +7 -0
  194. package/dist/types/theme-scope.d.ts +5 -0
  195. package/dist/types/tokens/component-styles.generated.d.ts +0 -2
  196. package/dist/types/tokens/theme-tokens.generated.d.ts +38 -32
  197. package/dist/typing-lines.css +1 -1
  198. package/dist/typing-lines.js +1 -1
  199. package/dist/weight-field.css +1 -1
  200. package/dist/youtube.css +1 -1
  201. package/dist/youtube.js +2 -2
  202. package/package.json +6 -11
  203. package/skills/zyncat-ui/SKILL.md +2 -2
  204. package/skills/zyncat-ui/references/components.md +3 -4
  205. package/skills/zyncat-ui/references/theming.md +3 -3
  206. package/src/components/composites/alert/alert.css +1 -2
  207. package/src/components/composites/date-picker/DateField.tsx +2 -0
  208. package/src/components/composites/date-picker/DateRangeField.tsx +2 -0
  209. package/src/components/composites/date-picker/DateTimeField.tsx +2 -0
  210. package/src/components/composites/date-picker/TimeField.tsx +2 -0
  211. package/src/components/composites/date-picker/date-picker.css +7 -8
  212. package/src/components/composites/date-picker/field-shell.tsx +14 -1
  213. package/src/components/composites/dialog/dialog.css +1 -2
  214. package/src/components/composites/dropdown/Dropdown.tsx +20 -3
  215. package/src/components/composites/dropdown/Dropdown.usage.md +2 -0
  216. package/src/components/composites/dropdown/dropdown.css +13 -10
  217. package/src/components/composites/dropdown/menu-panel.tsx +28 -13
  218. package/src/components/composites/dropdown/types.ts +5 -2
  219. package/src/components/composites/emoji-picker/styles.css +1 -1
  220. package/src/components/composites/modal/modal.css +1 -1
  221. package/src/components/composites/pagination/pagination.css +1 -1
  222. package/src/components/composites/popover/popover.css +1 -1
  223. package/src/components/composites/select/MultiSelect.tsx +56 -5
  224. package/src/components/composites/select/MultiSelect.usage.md +10 -0
  225. package/src/components/composites/select/Select.tsx +32 -2
  226. package/src/components/composites/select/Select.usage.md +13 -1
  227. package/src/components/composites/select/core/index.ts +2 -1
  228. package/src/components/composites/select/core/menu.tsx +28 -15
  229. package/src/components/composites/select/core/panel.tsx +57 -52
  230. package/src/components/composites/select/core/trigger.tsx +44 -11
  231. package/src/components/composites/select/core/types.ts +10 -0
  232. package/src/components/composites/select/core/use-listbox.ts +77 -31
  233. package/src/components/composites/select/select.css +34 -8
  234. package/src/components/composites/sheet/sheet.css +1 -1
  235. package/src/components/composites/table/table.css +10 -5
  236. package/src/components/composites/tabs/Tabs.tsx +13 -1
  237. package/src/components/composites/tabs/tabs.css +32 -7
  238. package/src/components/composites/theme-switcher/theme-switcher.css +1 -2
  239. package/src/components/composites/toast/toast.css +1 -1
  240. package/src/components/composites/tooltip/tooltip-host.tsx +1 -1
  241. package/src/components/composites/tooltip/tooltip.css +1 -1
  242. package/src/components/compound/support-rail/support-rail.css +7 -2
  243. package/src/components/dev/motion-devtools.css +1 -1
  244. package/src/components/expressive/confetti/confetti.css +1 -1
  245. package/src/components/expressive/facebook-feed/facebook-feed.css +1 -1
  246. package/src/components/expressive/flow-field/flow-field.css +1 -1
  247. package/src/components/expressive/instagram-feed/instagram-feed.css +1 -1
  248. package/src/components/expressive/lens/lens.css +1 -1
  249. package/src/components/expressive/morphing-text/morphing-text.css +1 -1
  250. package/src/components/expressive/odometer/Odometer.tsx +45 -92
  251. package/src/components/expressive/odometer/Odometer.usage.md +2 -2
  252. package/src/components/expressive/odometer/odometer.css +17 -11
  253. package/src/components/expressive/odometer/roll.ts +94 -0
  254. package/src/components/expressive/theme-transition/bloom.ts +22 -2
  255. package/src/components/expressive/theme-transition/paint.ts +2 -0
  256. package/src/components/expressive/theme-transition/scene.ts +3 -0
  257. package/src/components/expressive/theme-transition/theme-transition.css +50 -1
  258. package/src/components/expressive/theme-transition/theme-transition.ts +21 -1
  259. package/src/components/expressive/theme-transition/tide.ts +15 -10
  260. package/src/components/expressive/tiktok/tiktok.css +1 -1
  261. package/src/components/expressive/typing-lines/typing-lines.css +1 -1
  262. package/src/components/expressive/weight-field/weight-field.css +1 -1
  263. package/src/components/expressive/youtube/youtube.css +1 -1
  264. package/src/components/internal/glass/glass.css +1 -1
  265. package/src/components/internal/icon/icon.css +1 -1
  266. package/src/components/internal/menu/highlight.ts +20 -2
  267. package/src/components/internal/menu/menu-row.tsx +36 -8
  268. package/src/components/internal/menu/menu-surface.css +82 -8
  269. package/src/components/internal/menu/use-anchor-width.ts +26 -0
  270. package/src/components/internal/overlay/layer.tsx +11 -23
  271. package/src/components/internal/overlay/overlay.css +1 -1
  272. package/src/components/internal/overlay/position.ts +17 -6
  273. package/src/components/internal/overlay/track-anchor.ts +69 -0
  274. package/src/components/internal/overlay/trigger.css +1 -2
  275. package/src/components/internal/utils/activation.ts +5 -0
  276. package/src/components/primitives/avatar/avatar.css +1 -1
  277. package/src/components/primitives/badge/Badge.tsx +38 -15
  278. package/src/components/primitives/badge/Badge.usage.md +12 -5
  279. package/src/components/primitives/badge/badge.css +21 -12
  280. package/src/components/primitives/badge/digit-strip.css +1 -1
  281. package/src/components/primitives/badge/morph-label.tsx +71 -0
  282. package/src/components/primitives/badge/use-glint-on-change.ts +16 -0
  283. package/src/components/primitives/button/button.css +1 -2
  284. package/src/components/primitives/checkbox/checkbox.css +1 -1
  285. package/src/components/primitives/collapse/collapse.css +1 -1
  286. package/src/components/primitives/input/OtpField.tsx +17 -9
  287. package/src/components/primitives/input/input.css +1 -4
  288. package/src/components/primitives/radio-group/radio-group.css +11 -5
  289. package/src/components/primitives/spinner/spinner.css +1 -1
  290. package/src/components/primitives/tag/tag.css +1 -1
  291. package/src/components/primitives/textarea/Textarea.tsx +20 -24
  292. package/src/components/primitives/textarea/char-meter.tsx +34 -0
  293. package/src/components/primitives/textarea/textarea.css +14 -2
  294. package/src/components/primitives/toggle/Toggle.tsx +3 -12
  295. package/src/components/primitives/toggle/switch-glyph.tsx +25 -0
  296. package/src/components/primitives/toggle/toggle.css +1 -1
  297. package/src/engine/flip.ts +5 -1
  298. package/src/motion/crossfade.ts +97 -0
  299. package/src/motion/element.tsx +10 -7
  300. package/src/motion/flip.ts +62 -23
  301. package/src/motion/glide.tsx +5 -0
  302. package/src/motion/motion.ts +7 -0
  303. package/src/motion/motion.usage.md +34 -0
  304. package/src/motion/presence.tsx +4 -0
  305. package/src/motion/use-motion.ts +8 -3
  306. package/src/styles.css +1 -1
  307. package/src/theme-scope.ts +19 -0
  308. package/src/tokens/base.css +62 -13
  309. package/src/tokens/color.css +18 -16
  310. package/src/tokens/component-styles.generated.ts +0 -2
  311. package/src/tokens/dark.css +4 -1
  312. package/src/tokens/decisions.css +6 -4
  313. package/src/tokens/elevation.css +1 -1
  314. package/src/tokens/glass.css +1 -1
  315. package/src/tokens/motion.css +4 -4
  316. package/src/tokens/radius.css +1 -1
  317. package/src/tokens/reset.css +17 -45
  318. package/src/tokens/semantic.css +13 -7
  319. package/src/tokens/spacing.css +4 -4
  320. package/src/tokens/theme-tokens.generated.ts +38 -32
  321. package/src/tokens/typography.css +1 -1
  322. package/tailwind.css +3 -1
  323. package/dist/bloom-HV23M4AW.js.map +0 -1
  324. package/dist/chunk-2DNKZ57E.js +0 -72
  325. package/dist/chunk-2DNKZ57E.js.map +0 -1
  326. package/dist/chunk-AIAPXRCI.js.map +0 -1
  327. package/dist/chunk-BRKGYLEQ.js.map +0 -1
  328. package/dist/chunk-F64Z42PJ.js.map +0 -1
  329. package/dist/chunk-JINATP4N.js.map +0 -1
  330. package/dist/chunk-LNAV5E7S.js.map +0 -1
  331. package/dist/chunk-N43NDSME.js.map +0 -1
  332. package/dist/chunk-RJENXXTI.js +0 -93
  333. package/dist/chunk-RJENXXTI.js.map +0 -1
  334. package/dist/chunk-RW2A4M2Q.js +0 -57
  335. package/dist/chunk-RW2A4M2Q.js.map +0 -1
  336. package/dist/chunk-TDHLZY6I.js.map +0 -1
  337. package/dist/chunk-V6QAAOA5.js.map +0 -1
  338. package/dist/chunk-VDOBLABP.js +0 -38
  339. package/dist/chunk-VDOBLABP.js.map +0 -1
  340. package/dist/chunk-VQFILXQN.js.map +0 -1
  341. package/dist/chunk-VZXML7EH.js.map +0 -1
  342. package/dist/chunk-XKDR22VE.js.map +0 -1
  343. package/dist/count-badge.js +0 -13
  344. package/dist/count-badge.js.map +0 -1
  345. package/dist/paint-CJQCM6ZO.js.map +0 -1
  346. package/dist/status-badge.js +0 -72
  347. package/dist/status-badge.js.map +0 -1
  348. package/dist/theme-transition-VGLPZDJI.js.map +0 -1
  349. package/dist/tide-DJZMDAFT.js.map +0 -1
  350. package/dist/types/components/primitives/badge/CountBadge.d.ts +0 -8
  351. package/dist/types/components/primitives/badge/StatusBadge.d.ts +0 -15
  352. package/src/components/primitives/badge/CountBadge.tsx +0 -20
  353. package/src/components/primitives/badge/CountBadge.usage.md +0 -13
  354. package/src/components/primitives/badge/StatusBadge.tsx +0 -113
  355. package/src/components/primitives/badge/StatusBadge.usage.md +0 -14
@@ -1,4 +1,4 @@
1
- @layer zyncat.reset, zyncat.tokens, zyncat.components;
1
+ @layer zyncat.reset, zyncat.tokens, zyncat.base, zyncat.components;
2
2
 
3
3
  @layer zyncat.components {
4
4
  .zc-dtf__trigger {
@@ -27,7 +27,6 @@
27
27
  .zc-dtf__trigger[aria-expanded='true']:not(:disabled) {
28
28
  border-color: var(--accent);
29
29
  background: var(--bg-surface);
30
- outline: var(--ring-accent);
31
30
  }
32
31
 
33
32
  .zc-dtp,
@@ -72,7 +71,7 @@
72
71
  border-radius: var(--radius-sm);
73
72
  color: var(--text-muted);
74
73
  cursor: pointer;
75
- transition: var(--transition-colors);
74
+ transition: var(--transition-control);
76
75
  }
77
76
  .zc-dtp__jump:hover,
78
77
  .zc-dtp__jump[aria-expanded='true'] {
@@ -141,7 +140,7 @@
141
140
  padding-inline: var(--space-2);
142
141
  border-radius: var(--radius-md);
143
142
  cursor: pointer;
144
- transition: var(--transition-colors);
143
+ transition: var(--transition-control);
145
144
  }
146
145
  .zc-dtp__jumpYear {
147
146
  font-family: var(--font-code);
@@ -194,7 +193,7 @@
194
193
  color: var(--text-muted);
195
194
  border-radius: var(--radius-sm);
196
195
  cursor: pointer;
197
- transition: var(--transition-colors);
196
+ transition: var(--transition-control);
198
197
  }
199
198
  .zc-dtp__nav:hover:not(:disabled) {
200
199
  background: var(--neutral-wash);
@@ -252,7 +251,7 @@
252
251
  font-variant-numeric: tabular-nums;
253
252
  color: var(--text-body);
254
253
  cursor: pointer;
255
- transition: var(--transition-colors);
254
+ transition: var(--transition-control);
256
255
  }
257
256
  .zc-dtp__day:hover:not(:disabled) {
258
257
  color: var(--text-strong);
@@ -350,7 +349,6 @@
350
349
  transform var(--duration-base) var(--ease-entrance);
351
350
  }
352
351
  .zc-dtp__timeHint kbd {
353
- font-family: var(--font-code);
354
352
  font-size: var(--size-micro);
355
353
  line-height: 1;
356
354
  color: var(--text-subtle);
@@ -419,7 +417,7 @@
419
417
  padding: var(--space-1) var(--space-2);
420
418
  border-radius: var(--radius-md);
421
419
  cursor: pointer;
422
- transition: var(--transition-colors);
420
+ transition: var(--transition-control);
423
421
  white-space: nowrap;
424
422
  }
425
423
  .zc-drp__preset:hover {
@@ -679,6 +677,7 @@
679
677
  display: inline-flex;
680
678
  align-items: center;
681
679
  cursor: text;
680
+ outline: var(--ring-rest);
682
681
  }
683
682
  .zc-tfd .zc-tfd__box:focus-within {
684
683
  border-color: var(--accent);
@@ -22,6 +22,9 @@ export interface DateFieldBaseProps {
22
22
  message?: string;
23
23
  /** Disable the field. @default false */
24
24
  disabled?: boolean;
25
+ /** Control height, type and padding - the same scale as `TextField`, so a form row can hold one
26
+ * size throughout. @default 'md' */
27
+ size?: 'sm' | 'md' | 'lg';
25
28
  /** Extra class on the field shell root. */
26
29
  className?: string;
27
30
  /** Standard <div> attributes (style, data-*, aria-*, ...) forwarded to the field shell root. */
@@ -35,6 +38,7 @@ export interface DateFieldBaseProps {
35
38
 
36
39
  export interface FieldShellProps {
37
40
  variant: string;
41
+ size?: 'sm' | 'md' | 'lg';
38
42
  label?: string;
39
43
  required?: boolean;
40
44
  invalid?: boolean;
@@ -47,6 +51,7 @@ export interface FieldShellProps {
47
51
 
48
52
  export function FieldShell({
49
53
  variant,
54
+ size,
50
55
  label,
51
56
  required,
52
57
  invalid,
@@ -56,7 +61,15 @@ export function FieldShell({
56
61
  htmlProps,
57
62
  children,
58
63
  }: FieldShellProps) {
59
- const cls = cx('zc-fld', variant, 'zc-fld--has-lead', invalid && 'zc-is-error', className, htmlProps?.className);
64
+ const cls = cx(
65
+ 'zc-fld',
66
+ variant,
67
+ 'zc-fld--has-lead',
68
+ size === 'sm' ? 'zc-fld--sm' : size === 'lg' ? 'zc-fld--lg' : '',
69
+ invalid && 'zc-is-error',
70
+ className,
71
+ htmlProps?.className,
72
+ );
60
73
  return (
61
74
  <div {...htmlProps} className={cls}>
62
75
  <FieldLabel label={label} required={required} />
@@ -1,4 +1,4 @@
1
- @layer zyncat.reset, zyncat.tokens, zyncat.components;
1
+ @layer zyncat.reset, zyncat.tokens, zyncat.base, zyncat.components;
2
2
 
3
3
  @layer zyncat.components {
4
4
  .zc-overlay-layer--dialog {
@@ -107,7 +107,6 @@
107
107
  cursor: pointer;
108
108
  font-size: var(--icon-sm);
109
109
  transition: var(--transition-control);
110
- outline: var(--ring-rest);
111
110
  }
112
111
  .zc-dialog__close:hover {
113
112
  background: var(--neutral-wash);
@@ -20,8 +20,9 @@ import { popIn, popOut } from '../../../motion/presets';
20
20
  import type { DisableableAnimation } from '../../../motion/timing';
21
21
  import { motionFor } from '../../../tokens/motion-tokens';
22
22
  import { useControllable } from '../../internal/hooks/use-controllable';
23
+ import type { MenuSize, MenuWeight, MenuWidth } from '../../internal/menu/highlight';
23
24
  import { ovCloneTrigger, OverlayPortal } from '../../internal/overlay/layer';
24
- import type { ActivateOn } from '../../internal/utils/activation';
25
+ import { pressedByKeyboard, type ActivateOn } from '../../internal/utils/activation';
25
26
  import { MenuPanel } from './menu-panel';
26
27
  import {
27
28
  levelKey,
@@ -68,6 +69,16 @@ export interface DropdownProps {
68
69
  /** Hue of the highlight that travels between rows: the neutral wash, or the accent wash with accent
69
70
  * ink on the active row. @default 'neutral' */
70
71
  highlight?: 'neutral' | 'accent';
72
+ /** Menu density - row type and padding on every row, submenus included; a row carrying a
73
+ * description sits one step taller than a plain one. The trigger is your own node, so this
74
+ * never touches it. @default 'md' */
75
+ size?: MenuSize;
76
+ /** Weight of every row label. @default 'medium' */
77
+ weight?: MenuWeight;
78
+ /** Width of the top-level menu. `auto` fits the rows, `trigger` is never narrower than the trigger,
79
+ * and `sm` | `md` | `lg` are fixed steps with long labels ellipsizing. Submenus always fit their
80
+ * rows. @default 'auto' */
81
+ width?: MenuWidth;
71
82
  /** Short accent bar on the leading edge of the highlight, marking the active row. @default false */
72
83
  rail?: boolean;
73
84
 
@@ -94,6 +105,9 @@ export function Dropdown({
94
105
  align = 'start',
95
106
  highlight = 'neutral',
96
107
  rail = false,
108
+ size = 'md',
109
+ weight = 'medium',
110
+ width = 'auto',
97
111
  id,
98
112
  ariaLabel,
99
113
  htmlProps,
@@ -101,7 +115,7 @@ export function Dropdown({
101
115
  }: DropdownProps) {
102
116
  const [open, setOpen] = useControllable(controlledOpen, defaultOpen, onOpenChange);
103
117
  const [path, setPath] = useState<string[]>([]);
104
- const [seed, setSeed] = useState({ key: ROOT_LEVEL, focus: 'first' as SeedFocus });
118
+ const [seed, setSeed] = useState({ key: ROOT_LEVEL, focus: 'selected' as SeedFocus });
105
119
 
106
120
  const refs = useRef(new Map<string, RefObject<HTMLElement>>());
107
121
  const hoverDepth = useRef(-1);
@@ -137,6 +151,9 @@ export function Dropdown({
137
151
  align,
138
152
  highlight,
139
153
  rail,
154
+ size,
155
+ weight,
156
+ width,
140
157
  ariaLabel,
141
158
  htmlProps,
142
159
  seed,
@@ -167,7 +184,7 @@ export function Dropdown({
167
184
  <Fragment>
168
185
  {ovCloneTrigger(trigger, {
169
186
  open,
170
- onPress: () => (open ? dismiss(false) : show('first')),
187
+ onPress: (e) => (open ? dismiss(false) : show(pressedByKeyboard(e) ? 'first' : 'selected')),
171
188
  onKeyDown: (e) => {
172
189
  if (open || (e.key !== 'ArrowDown' && e.key !== 'ArrowUp')) return;
173
190
  e.preventDefault();
@@ -10,6 +10,8 @@ DropdownGroup[] (labelled sections); a row with its own items opens a submenu, n
10
10
  you like. content on a row opens your own panel body in place of a submenu; selected marks the
11
11
  current value of a single-choice group with a check. Keyboard is the APG menu button: arrows move,
12
12
  Right/Left open and close a submenu, Enter/Space commit, typeahead, Esc one level, Tab the lot.
13
+ size sm|md|lg sets the vertical padding of every row, submenus included; weight sets the label
14
+ weight regular|medium|semibold.
13
15
  highlight neutral|accent picks the hue of the highlight travelling between rows; rail adds a short
14
16
  accent bar on its leading edge. returnFocus false leaves focus where a committing row put it.
15
17
 
@@ -1,10 +1,9 @@
1
- @layer zyncat.reset, zyncat.tokens, zyncat.components;
1
+ @layer zyncat.reset, zyncat.tokens, zyncat.base, zyncat.components;
2
2
 
3
3
  @layer zyncat.components {
4
4
  .zc-dropdown__menu {
5
5
  --menu-max-width: min(20rem, 92vw);
6
6
  --menu-max-height: min(26rem, 70vh);
7
- min-width: 11rem;
8
7
  }
9
8
 
10
9
  .zc-dropdown__menu[data-danger-active='true'] {
@@ -25,14 +24,6 @@
25
24
  color: var(--menu-active-ink, var(--text-strong));
26
25
  }
27
26
 
28
- .zc-dropdown__item[data-danger='true'],
29
- .zc-dropdown__item[data-danger='true'][data-active='true'] {
30
- color: var(--danger-text);
31
- }
32
- .zc-dropdown__item[data-danger='true'] .zc-menu-row__icon {
33
- color: var(--danger);
34
- }
35
-
36
27
  .zc-dropdown__item-caret {
37
28
  flex: 0 0 auto;
38
29
  color: var(--text-subtle);
@@ -51,6 +42,18 @@
51
42
  color: var(--text-accent);
52
43
  }
53
44
 
45
+ .zc-dropdown__item[data-danger='true'] {
46
+ color: var(--danger-text);
47
+ }
48
+ .zc-dropdown__item[data-danger='true'] .zc-menu-row__label {
49
+ color: var(--danger-text);
50
+ }
51
+ .zc-dropdown__item[data-danger='true'] .zc-menu-row__icon,
52
+ .zc-dropdown__item[data-danger='true'] .zc-dropdown__item-check,
53
+ .zc-dropdown__item[data-danger='true'] .zc-dropdown__item-caret {
54
+ color: var(--danger);
55
+ }
56
+
54
57
  .zc-dropdown__item[data-disabled='true'] {
55
58
  cursor: not-allowed;
56
59
  color: var(--text-disabled);
@@ -5,12 +5,14 @@ import '../../internal/menu/menu-surface.css';
5
5
  import { useEffect, useLayoutEffect, useMemo, useRef, useState, type KeyboardEvent, type RefObject } from 'react';
6
6
 
7
7
  import { GlidePill, useGlide } from '../../../motion/glide';
8
+ import { Presence } from '../../../motion/presence';
8
9
  import { useMotion, type MotionSpecs } from '../../../motion/use-motion';
9
10
  import { edgeEnabled, matchPrefix, stepEnabled } from '../../internal/collection/collection';
10
11
  import { useTypeahead } from '../../internal/hooks/use-typeahead';
11
12
  import { Icon } from '../../internal/icon/Icon';
12
- import { menuHighlightAttrs } from '../../internal/menu/highlight';
13
+ import { menuSurfaceAttrs } from '../../internal/menu/highlight';
13
14
  import { MenuRow } from '../../internal/menu/menu-row';
15
+ import { useAnchorWidth } from '../../internal/menu/use-anchor-width';
14
16
  import { useReturnFocus } from '../../internal/overlay/focus';
15
17
  import { useOutsidePress, useOverlayEntry } from '../../internal/overlay/layer';
16
18
  import { useAnchorPosition } from '../../internal/overlay/position';
@@ -52,7 +54,12 @@ export function MenuPanel({ chain, depth, ...motion }: { chain: MenuChain; depth
52
54
 
53
55
  const { groups, flat } = useMemo(() => normalize(level.items), [level.items]);
54
56
  const indexOf = useMemo(() => new Map(flat.map((item, i) => [item.id, i] as const)), [flat]);
55
- const [activeIdx, setActiveIdx] = useState(() => (seed === 'none' ? -1 : edgeEnabled(flat, seed === 'last')));
57
+ const seedIndex = () => {
58
+ if (seed === 'none') return -1;
59
+ if (seed === 'selected') return flat.findIndex((item) => item.selected && !item.disabled);
60
+ return edgeEnabled(flat, seed === 'last');
61
+ };
62
+ const [activeIdx, setActiveIdx] = useState(seedIndex);
56
63
 
57
64
  const panelRef = refFor('panel:' + level.key);
58
65
  const rowFor = (i: number) => refFor('row:' + levelKey(depth, flat[i].id)) as unknown as RefObject<HTMLDivElement>;
@@ -72,6 +79,7 @@ export function MenuPanel({ chain, depth, ...motion }: { chain: MenuChain; depth
72
79
  const place = { side: nested ? 'right' : chain.side, align: nested ? 'start' : chain.align } as const;
73
80
  useMotion(panelRef, motion);
74
81
  useReturnFocus(panelRef);
82
+ useAnchorWidth(anchorRef, panelRef, !nested && chain.width === 'trigger');
75
83
  useAnchorPosition({ ...place, arrow: false, triggerRef: anchorRef, panelRef });
76
84
  useOutsidePress({ entry, refs: [panelRef, anchorRef], enabled: !nested, onPress: () => chain.dismiss(false) });
77
85
 
@@ -85,8 +93,13 @@ export function MenuPanel({ chain, depth, ...motion }: { chain: MenuChain; depth
85
93
 
86
94
  useLayoutEffect(() => {
87
95
  if (seed === 'none') return;
88
- if (contentLevel) panelRef.current?.focus();
89
- else setActiveIdx(edgeEnabled(flat, seed === 'last'));
96
+ if (contentLevel) {
97
+ panelRef.current?.focus();
98
+ return;
99
+ }
100
+ const i = seedIndex();
101
+ if (i < 0) panelRef.current?.focus();
102
+ setActiveIdx(i);
90
103
  // eslint-disable-next-line react-hooks/exhaustive-deps
91
104
  }, [seed]);
92
105
 
@@ -244,14 +257,16 @@ export function MenuPanel({ chain, depth, ...motion }: { chain: MenuChain; depth
244
257
  return (
245
258
  <>
246
259
  <GlidePill className="zc-menu-glide" glide={glide} />
247
- {groups.length > 1 || groups[0]?.label
248
- ? groups.map((group, gi) => (
249
- <div className="zc-dropdown__group" role="group" aria-label={group.label || undefined} key={gi}>
250
- {group.label && <div className="zc-menu-group-label">{group.label}</div>}
251
- {group.items.map(renderRow)}
252
- </div>
253
- ))
254
- : flat.map(renderRow)}
260
+ <Presence initial={false}>
261
+ {groups.length > 1 || groups[0]?.label
262
+ ? groups.map((group, gi) => (
263
+ <div className="zc-dropdown__group" role="group" aria-label={group.label || undefined} key={gi}>
264
+ {group.label && <div className="zc-menu-group-label">{group.label}</div>}
265
+ {group.items.map(renderRow)}
266
+ </div>
267
+ ))
268
+ : flat.map(renderRow)}
269
+ </Presence>
255
270
  </>
256
271
  );
257
272
  }
@@ -259,7 +274,7 @@ export function MenuPanel({ chain, depth, ...motion }: { chain: MenuChain; depth
259
274
  return (
260
275
  <div
261
276
  {...(nested ? undefined : chain.htmlProps)}
262
- {...menuHighlightAttrs(chain)}
277
+ {...menuSurfaceAttrs({ ...chain, width: nested ? 'auto' : chain.width })}
263
278
  ref={panelRef as unknown as RefObject<HTMLDivElement>}
264
279
  id={menuId}
265
280
  className={cx('zc-menu-surface zc-menu-scroller zc-dropdown__menu', !nested && chain.htmlProps?.className)}
@@ -2,7 +2,7 @@ import type { HTMLAttributes, ReactNode, RefObject } from 'react';
2
2
 
3
3
  import type { DataAttributes } from '../../../dom-props';
4
4
  import { normalizeCollection, type NormalizedGroup } from '../../internal/collection/collection';
5
- import type { MenuHighlight } from '../../internal/menu/highlight';
5
+ import type { MenuHighlight, MenuSize, MenuWeight, MenuWidth } from '../../internal/menu/highlight';
6
6
  import type { ActivateOn } from '../../internal/utils/activation';
7
7
 
8
8
  export interface DropdownItem {
@@ -94,7 +94,7 @@ export function resolveLevels(items: DropdownItems, path: string[]): Level[] {
94
94
  return levels;
95
95
  }
96
96
 
97
- export type SeedFocus = 'first' | 'last' | 'none';
97
+ export type SeedFocus = 'first' | 'last' | 'selected' | 'none';
98
98
 
99
99
  export interface MenuChain {
100
100
  levels: Level[];
@@ -104,6 +104,9 @@ export interface MenuChain {
104
104
  align: 'start' | 'center' | 'end';
105
105
  highlight: MenuHighlight;
106
106
  rail: boolean;
107
+ size: MenuSize;
108
+ weight: MenuWeight;
109
+ width: MenuWidth;
107
110
  ariaLabel?: string;
108
111
  htmlProps?: HTMLAttributes<HTMLDivElement> & DataAttributes;
109
112
  seed: { key: string; focus: SeedFocus };
@@ -1,4 +1,4 @@
1
- @layer zyncat.reset, zyncat.tokens, zyncat.components;
1
+ @layer zyncat.reset, zyncat.tokens, zyncat.base, zyncat.components;
2
2
 
3
3
  @layer zyncat.components {
4
4
  .zc-on-emoji,
@@ -1,4 +1,4 @@
1
- @layer zyncat.reset, zyncat.tokens, zyncat.components;
1
+ @layer zyncat.reset, zyncat.tokens, zyncat.base, zyncat.components;
2
2
 
3
3
  @layer zyncat.components {
4
4
  .zc-overlay-layer--modal {
@@ -1,4 +1,4 @@
1
- @layer zyncat.reset, zyncat.tokens, zyncat.components;
1
+ @layer zyncat.reset, zyncat.tokens, zyncat.base, zyncat.components;
2
2
 
3
3
  @layer zyncat.components {
4
4
  .zc-pgn {
@@ -1,4 +1,4 @@
1
- @layer zyncat.reset, zyncat.tokens, zyncat.components;
1
+ @layer zyncat.reset, zyncat.tokens, zyncat.base, zyncat.components;
2
2
 
3
3
  @layer zyncat.components {
4
4
  .zc-overlay-popover {
@@ -7,10 +7,20 @@ import type { HTMLAttributes, ReactNode } from 'react';
7
7
  import type { DataAttributes } from '../../../dom-props';
8
8
  import type { DisableableAnimation } from '../../../motion/timing';
9
9
  import { useControllable } from '../../internal/hooks/use-controllable';
10
+ import type { MenuSize, MenuWeight, MenuWidth } from '../../internal/menu/highlight';
10
11
  import type { ActivateOn } from '../../internal/utils/activation';
11
12
  import { cx } from '../../internal/utils/cx';
12
13
  import { CheckGlyph } from '../../primitives/checkbox/check-glyph';
13
- import { ListboxPanel, SelectTrigger, useListbox, type SelectGroup, type SelectOption } from './core';
14
+ import { SwitchGlyph } from '../../primitives/toggle/switch-glyph';
15
+ import {
16
+ ListboxPanel,
17
+ SelectTrigger,
18
+ useListbox,
19
+ type CustomTrigger,
20
+ type SelectGroup,
21
+ type SelectMenuHtmlProps,
22
+ type SelectOption,
23
+ } from './core';
14
24
 
15
25
  export type { SelectOption, SelectGroup } from './core';
16
26
 
@@ -25,8 +35,20 @@ export interface MultiSelectProps {
25
35
  onChange?: (value: string[], toggled: SelectOption) => void;
26
36
  /** Trigger text when nothing is selected. @default 'Select options' */
27
37
  placeholder?: string;
28
- /** Control height. @default 'md' */
38
+ /** Trigger height, type and padding. The menu follows it unless `menuSize` overrides. @default 'md' */
29
39
  size?: 'sm' | 'md' | 'lg';
40
+ /** Menu density on its own - row type, row padding, the filter field and the row checkbox. A row
41
+ * carrying a description sits one step taller than a plain one at every step. @default the `size` value */
42
+ menuSize?: MenuSize;
43
+ /** Weight of every option label in the menu. @default 'medium' */
44
+ weight?: MenuWeight;
45
+ /** Glyph mirroring each option's selected state at the trailing edge: a checkbox, or a switch for a
46
+ * settings-style menu where every option is an independent on/off. Decoration only - the option
47
+ * semantics are the same either way. @default 'checkbox' */
48
+ marker?: 'checkbox' | 'switch';
49
+ /** Menu width. `trigger` is never narrower than the trigger, `auto` fits the options, and
50
+ * `sm` | `md` | `lg` are fixed steps with long labels ellipsizing. @default 'trigger' */
51
+ width?: MenuWidth;
30
52
  /** Disabled - trigger is inert and the menu cannot open. @default false */
31
53
  disabled?: boolean;
32
54
  /** Danger ring + border. @default false */
@@ -50,16 +72,32 @@ export interface MultiSelectProps {
50
72
  ariaLabel?: string;
51
73
  /** Standard <div> attributes (className, style, data-*, ...) forwarded to the select root. */
52
74
  htmlProps?: HTMLAttributes<HTMLDivElement> & DataAttributes;
75
+ /** Standard attributes (className, style, data-*, ...) forwarded to the menu panel, which portals
76
+ * to <body> and inherits nothing from the root. */
77
+ menuProps?: SelectMenuHtmlProps;
53
78
  /** Whether the trigger and the options fire on `pointerdown` (snappier) or wait for `click`.
54
79
  * @default 'pointerdown' */
55
80
  activateOn?: ActivateOn;
56
81
  /** Menu open/close timing - motion tokens only, or `null` to disable. @default duration 'base' + ease 'entrance'/'exit' */
57
82
  animation?: DisableableAnimation;
83
+ /** Your own element in place of the built-in trigger. It is cloned with the combobox wiring - role,
84
+ * aria, open/close, arrow keys, and the anchor the menu measures - so it must render one focusable
85
+ * element that forwards its props and ref. Pass a function to read `{ open, selected }`. */
86
+ trigger?: CustomTrigger<SelectOption[]>;
58
87
  }
59
88
 
60
- function CheckboxTick({ checked }: { checked: boolean }) {
89
+ type MultiSelectMarker = NonNullable<MultiSelectProps['marker']>;
90
+
91
+ function OptionMarker({ marker, checked, size }: { marker: MultiSelectMarker; checked: boolean; size: MenuSize }) {
92
+ if (marker === 'switch') {
93
+ return (
94
+ <span className={cx('zc-sw', size === 'sm' && 'zc-sw--sm')} aria-hidden="true">
95
+ <SwitchGlyph checked={checked} readOnly tabIndex={-1} />
96
+ </span>
97
+ );
98
+ }
61
99
  return (
62
- <span className="zc-cbx" aria-hidden="true">
100
+ <span className={cx('zc-cbx', size === 'sm' && 'zc-cbx--sm')} aria-hidden="true">
63
101
  <CheckGlyph checked={checked} readOnly tabIndex={-1} />
64
102
  </span>
65
103
  );
@@ -72,6 +110,7 @@ export function MultiSelect({
72
110
  onChange,
73
111
  placeholder = 'Select options',
74
112
  size = 'md',
113
+ menuSize = size,
75
114
  disabled = false,
76
115
  invalid = false,
77
116
  loading = false,
@@ -79,12 +118,17 @@ export function MultiSelect({
79
118
  searchPlaceholder = 'Filter options',
80
119
  highlight = 'neutral',
81
120
  rail = false,
121
+ weight = 'medium',
122
+ marker = 'checkbox',
123
+ width = 'trigger',
82
124
  leadingIcon = null,
83
125
  id,
84
126
  ariaLabel,
85
127
  htmlProps,
128
+ menuProps,
86
129
  activateOn = 'pointerdown',
87
130
  animation,
131
+ trigger,
88
132
  }: MultiSelectProps) {
89
133
  const [value, setValue] = useControllable<string[], SelectOption>(
90
134
  controlledValue,
@@ -109,6 +153,7 @@ export function MultiSelect({
109
153
 
110
154
  const selectedOptions = lb.flat.filter((o) => isSelected(o.value));
111
155
  const isPlaceholder = !loading && selectedOptions.length === 0;
156
+ const customTrigger = typeof trigger === 'function' ? trigger({ open: lb.open, selected: selectedOptions }) : trigger;
112
157
 
113
158
  return (
114
159
  <div
@@ -116,6 +161,7 @@ export function MultiSelect({
116
161
  className={cx('zc-select', htmlProps?.className)}
117
162
  data-multiple="true"
118
163
  data-size={size}
164
+ data-custom-trigger={customTrigger ? 'true' : undefined}
119
165
  data-open={lb.open ? 'true' : undefined}
120
166
  data-disabled={disabled ? 'true' : undefined}
121
167
  data-invalid={invalid ? 'true' : undefined}
@@ -123,6 +169,7 @@ export function MultiSelect({
123
169
  >
124
170
  <SelectTrigger
125
171
  lb={lb}
172
+ node={customTrigger}
126
173
  disabled={disabled}
127
174
  invalid={invalid}
128
175
  ariaLabel={ariaLabel}
@@ -141,9 +188,13 @@ export function MultiSelect({
141
188
  multiple
142
189
  highlight={highlight}
143
190
  rail={rail}
191
+ size={menuSize}
192
+ weight={weight}
193
+ width={width}
144
194
  activateOn={activateOn}
145
195
  animation={animation}
146
- check={(sel) => <CheckboxTick checked={sel} />}
196
+ menuProps={menuProps}
197
+ check={(sel) => <OptionMarker marker={marker} checked={sel} size={menuSize} />}
147
198
  />
148
199
  </div>
149
200
  );
@@ -7,7 +7,17 @@ Many-of listbox; stays open while toggling, trigger summarises as first +N.
7
7
 
8
8
  value: string[], onChange(string[]); searchable. highlight neutral|accent picks the hue of the
9
9
  highlight travelling between options; rail adds a short accent bar on its leading edge.
10
+ trigger replaces the built-in combobox with your own element - a node, or a function of
11
+ { open, selected } where selected is the SelectOption[] in option order. It is cloned with the full
12
+ wiring - role, aria-expanded/controls/activedescendant, open/close, arrow keys - and becomes the
13
+ anchor the menu measures, so it must render ONE focusable element that forwards its props and its ref
14
+ (a Button does; a plain div is not focusable). placeholder and leadingIcon then stop applying and the
15
+ root drops its width: 100%, leaving the trigger its intrinsic width; size still drives the menu,
16
+ loading still blocks opening, disabled still makes it inert with aria-disabled.
10
17
 
11
18
  ```tsx
12
19
  <MultiSelect options={PEOPLE} value={ids} onChange={setIds} placeholder="Choose members" ariaLabel="Members" />
20
+ <MultiSelect options={PEOPLE} value={ids} onChange={setIds} ariaLabel="Members" trigger={({ selected }) => (
21
+ <Button variant="secondary">{selected.length ? `${selected.length} members` : 'Members'}</Button>
22
+ )} />
13
23
  ```