@kumix/ui 0.3.11 → 0.3.13

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 (890) hide show
  1. package/README.md +13 -13
  2. package/dist/components/agents/agent-activity/activity-row.d.ts +1 -2
  3. package/dist/components/agents/agent-activity/activity-row.d.ts.map +1 -1
  4. package/dist/components/agents/agent-activity/activity-row.js +1 -1
  5. package/dist/components/agents/agent-activity/activity-row.js.map +1 -1
  6. package/dist/components/agents/agent-activity/index.d.ts +2 -2
  7. package/dist/components/agents/agent-activity/index.d.ts.map +1 -1
  8. package/dist/components/agents/agent-activity/index.js +1 -1
  9. package/dist/components/agents/agent-activity/index.js.map +1 -1
  10. package/dist/components/agents/agent-code.d.ts +8 -9
  11. package/dist/components/agents/agent-code.d.ts.map +1 -1
  12. package/dist/components/agents/agent-code.js +1 -1
  13. package/dist/components/agents/agent-code.js.map +1 -1
  14. package/dist/components/agents/agent-disclosure.d.ts +2 -3
  15. package/dist/components/agents/agent-disclosure.d.ts.map +1 -1
  16. package/dist/components/agents/agent-disclosure.js +1 -1
  17. package/dist/components/agents/agent-disclosure.js.map +1 -1
  18. package/dist/components/agents/ai-sidebar.d.ts +8 -9
  19. package/dist/components/agents/ai-sidebar.d.ts.map +1 -1
  20. package/dist/components/agents/ai-sidebar.js +1 -1
  21. package/dist/components/agents/ai-sidebar.js.map +1 -1
  22. package/dist/components/agents/approval-card/index.d.ts +2 -2
  23. package/dist/components/agents/approval-card/index.d.ts.map +1 -1
  24. package/dist/components/agents/approval-card/index.js +1 -1
  25. package/dist/components/agents/approval-card/index.js.map +1 -1
  26. package/dist/components/agents/chat-app.d.ts +2 -3
  27. package/dist/components/agents/chat-app.d.ts.map +1 -1
  28. package/dist/components/agents/chat-app.js +1 -1
  29. package/dist/components/agents/chat-app.js.map +1 -1
  30. package/dist/components/agents/citations.d.ts +10 -11
  31. package/dist/components/agents/citations.d.ts.map +1 -1
  32. package/dist/components/agents/citations.js +1 -1
  33. package/dist/components/agents/citations.js.map +1 -1
  34. package/dist/components/agents/code-block.d.ts +3 -4
  35. package/dist/components/agents/code-block.d.ts.map +1 -1
  36. package/dist/components/agents/code-block.js +1 -1
  37. package/dist/components/agents/code-block.js.map +1 -1
  38. package/dist/components/agents/file-diff.d.ts +5 -6
  39. package/dist/components/agents/file-diff.d.ts.map +1 -1
  40. package/dist/components/agents/file-diff.js +1 -1
  41. package/dist/components/agents/file-diff.js.map +1 -1
  42. package/dist/components/agents/image-generation.d.ts +3 -4
  43. package/dist/components/agents/image-generation.d.ts.map +1 -1
  44. package/dist/components/agents/image-generation.js +1 -1
  45. package/dist/components/agents/image-generation.js.map +1 -1
  46. package/dist/components/agents/loading-states/agent-progress.d.ts +2 -3
  47. package/dist/components/agents/loading-states/agent-progress.d.ts.map +1 -1
  48. package/dist/components/agents/loading-states/agent-progress.js +1 -1
  49. package/dist/components/agents/loading-states/agent-progress.js.map +1 -1
  50. package/dist/components/agents/loading-states/reasoning-text.d.ts +3 -4
  51. package/dist/components/agents/loading-states/reasoning-text.d.ts.map +1 -1
  52. package/dist/components/agents/loading-states/reasoning-text.js +1 -1
  53. package/dist/components/agents/loading-states/reasoning-text.js.map +1 -1
  54. package/dist/components/agents/loading-states/thinking-shimmer.d.ts +2 -3
  55. package/dist/components/agents/loading-states/thinking-shimmer.d.ts.map +1 -1
  56. package/dist/components/agents/loading-states/thinking-shimmer.js +1 -1
  57. package/dist/components/agents/loading-states/thinking-shimmer.js.map +1 -1
  58. package/dist/components/agents/message-bubble.d.ts +10 -11
  59. package/dist/components/agents/message-bubble.d.ts.map +1 -1
  60. package/dist/components/agents/message-bubble.js +1 -1
  61. package/dist/components/agents/message-bubble.js.map +1 -1
  62. package/dist/components/agents/message-context.d.ts +2 -3
  63. package/dist/components/agents/message-context.d.ts.map +1 -1
  64. package/dist/components/agents/message-scroller.d.ts +2 -3
  65. package/dist/components/agents/message-scroller.d.ts.map +1 -1
  66. package/dist/components/agents/message-scroller.js +1 -1
  67. package/dist/components/agents/message-scroller.js.map +1 -1
  68. package/dist/components/agents/message.d.ts +18 -18
  69. package/dist/components/agents/message.d.ts.map +1 -1
  70. package/dist/components/agents/message.js +1 -1
  71. package/dist/components/agents/message.js.map +1 -1
  72. package/dist/components/agents/prompt-input.d.ts +4 -5
  73. package/dist/components/agents/prompt-input.d.ts.map +1 -1
  74. package/dist/components/agents/prompt-input.js +1 -1
  75. package/dist/components/agents/prompt-input.js.map +1 -1
  76. package/dist/components/agents/streaming-response.d.ts +4 -5
  77. package/dist/components/agents/streaming-response.d.ts.map +1 -1
  78. package/dist/components/agents/streaming-response.js +1 -1
  79. package/dist/components/agents/streaming-response.js.map +1 -1
  80. package/dist/components/agents/todo-list.d.ts +4 -5
  81. package/dist/components/agents/todo-list.d.ts.map +1 -1
  82. package/dist/components/agents/todo-list.js +1 -1
  83. package/dist/components/agents/todo-list.js.map +1 -1
  84. package/dist/components/agents/tool-approval.d.ts +6 -7
  85. package/dist/components/agents/tool-approval.d.ts.map +1 -1
  86. package/dist/components/agents/tool-approval.js +1 -1
  87. package/dist/components/agents/tool-approval.js.map +1 -1
  88. package/dist/components/agents/tool-result.d.ts +6 -7
  89. package/dist/components/agents/tool-result.d.ts.map +1 -1
  90. package/dist/components/agents/tool-result.js +1 -1
  91. package/dist/components/agents/tool-result.js.map +1 -1
  92. package/dist/components/custom/confirm-dialog.d.ts +2 -3
  93. package/dist/components/custom/confirm-dialog.d.ts.map +1 -1
  94. package/dist/components/custom/toast.d.ts +6 -7
  95. package/dist/components/custom/toast.d.ts.map +1 -1
  96. package/dist/components/motion/action-swap-blur.d.ts +7 -7
  97. package/dist/components/motion/action-swap-blur.d.ts.map +1 -1
  98. package/dist/components/motion/action-swap-cascade.d.ts +7 -7
  99. package/dist/components/motion/action-swap-cascade.d.ts.map +1 -1
  100. package/dist/components/motion/action-swap-roll.d.ts +7 -7
  101. package/dist/components/motion/action-swap-roll.d.ts.map +1 -1
  102. package/dist/components/motion/action-swap.d.ts +10 -11
  103. package/dist/components/motion/action-swap.d.ts.map +1 -1
  104. package/dist/components/motion/action-swap.js +1 -1
  105. package/dist/components/motion/action-swap.js.map +1 -1
  106. package/dist/components/motion/adaptive-stepper.d.ts +7 -8
  107. package/dist/components/motion/adaptive-stepper.d.ts.map +1 -1
  108. package/dist/components/motion/adaptive-stepper.js +1 -1
  109. package/dist/components/motion/adaptive-stepper.js.map +1 -1
  110. package/dist/components/motion/animated-badge.d.ts +4 -5
  111. package/dist/components/motion/animated-badge.d.ts.map +1 -1
  112. package/dist/components/motion/animated-badge.js +1 -1
  113. package/dist/components/motion/animated-badge.js.map +1 -1
  114. package/dist/components/motion/animated-number.d.ts +2 -3
  115. package/dist/components/motion/animated-number.d.ts.map +1 -1
  116. package/dist/components/motion/animated-number.js +1 -1
  117. package/dist/components/motion/animated-number.js.map +1 -1
  118. package/dist/components/motion/animated-sidebar.d.ts +28 -29
  119. package/dist/components/motion/animated-sidebar.d.ts.map +1 -1
  120. package/dist/components/motion/animated-sidebar.js +1 -1
  121. package/dist/components/motion/animated-sidebar.js.map +1 -1
  122. package/dist/components/motion/animated-toast-stack.d.ts +10 -11
  123. package/dist/components/motion/animated-toast-stack.d.ts.map +1 -1
  124. package/dist/components/motion/animated-toast-stack.js +1 -1
  125. package/dist/components/motion/animated-toast-stack.js.map +1 -1
  126. package/dist/components/motion/attachment-upload.d.ts +7 -8
  127. package/dist/components/motion/attachment-upload.d.ts.map +1 -1
  128. package/dist/components/motion/attachment-upload.js +1 -1
  129. package/dist/components/motion/attachment-upload.js.map +1 -1
  130. package/dist/components/motion/availability-scheduler/copy-menu.d.ts +1 -2
  131. package/dist/components/motion/availability-scheduler/copy-menu.d.ts.map +1 -1
  132. package/dist/components/motion/availability-scheduler/day-row.d.ts +1 -2
  133. package/dist/components/motion/availability-scheduler/day-row.d.ts.map +1 -1
  134. package/dist/components/motion/availability-scheduler/icon-button.d.ts +1 -2
  135. package/dist/components/motion/availability-scheduler/icon-button.d.ts.map +1 -1
  136. package/dist/components/motion/availability-scheduler/icon-button.js +1 -1
  137. package/dist/components/motion/availability-scheduler/icon-button.js.map +1 -1
  138. package/dist/components/motion/availability-scheduler/index.d.ts +3 -3
  139. package/dist/components/motion/availability-scheduler/index.d.ts.map +1 -1
  140. package/dist/components/motion/availability-scheduler/index.js +1 -1
  141. package/dist/components/motion/availability-scheduler/index.js.map +1 -1
  142. package/dist/components/motion/availability-scheduler/time-select.d.ts +1 -2
  143. package/dist/components/motion/availability-scheduler/time-select.d.ts.map +1 -1
  144. package/dist/components/motion/bloom-menu.d.ts +2 -3
  145. package/dist/components/motion/bloom-menu.d.ts.map +1 -1
  146. package/dist/components/motion/bloom-menu.js +1 -1
  147. package/dist/components/motion/bloom-menu.js.map +1 -1
  148. package/dist/components/motion/bottom-sheet.d.ts +2 -3
  149. package/dist/components/motion/bottom-sheet.d.ts.map +1 -1
  150. package/dist/components/motion/bottom-sheet.js +1 -1
  151. package/dist/components/motion/bottom-sheet.js.map +1 -1
  152. package/dist/components/motion/bounce-sidebar.d.ts +3 -4
  153. package/dist/components/motion/bounce-sidebar.d.ts.map +1 -1
  154. package/dist/components/motion/bounce-sidebar.js +1 -1
  155. package/dist/components/motion/bounce-sidebar.js.map +1 -1
  156. package/dist/components/motion/bouncy-accordion.d.ts +4 -5
  157. package/dist/components/motion/bouncy-accordion.d.ts.map +1 -1
  158. package/dist/components/motion/bouncy-accordion.js +1 -1
  159. package/dist/components/motion/bouncy-accordion.js.map +1 -1
  160. package/dist/components/motion/button/base.d.ts +6 -7
  161. package/dist/components/motion/button/base.d.ts.map +1 -1
  162. package/dist/components/motion/button/base.js +1 -1
  163. package/dist/components/motion/button/base.js.map +1 -1
  164. package/dist/components/motion/button/magnetic.d.ts +2 -3
  165. package/dist/components/motion/button/magnetic.d.ts.map +1 -1
  166. package/dist/components/motion/button/metallic.d.ts +2 -3
  167. package/dist/components/motion/button/metallic.d.ts.map +1 -1
  168. package/dist/components/motion/button/metallic.js +1 -1
  169. package/dist/components/motion/button/metallic.js.map +1 -1
  170. package/dist/components/motion/button/stateful.d.ts +3 -4
  171. package/dist/components/motion/button/stateful.d.ts.map +1 -1
  172. package/dist/components/motion/card-folder.d.ts +30 -0
  173. package/dist/components/motion/card-folder.d.ts.map +1 -0
  174. package/dist/components/motion/card-folder.js +254 -0
  175. package/dist/components/motion/card-folder.js.map +1 -0
  176. package/dist/components/motion/center-morph-modal.d.ts +8 -9
  177. package/dist/components/motion/center-morph-modal.d.ts.map +1 -1
  178. package/dist/components/motion/center-morph-modal.js +1 -1
  179. package/dist/components/motion/center-morph-modal.js.map +1 -1
  180. package/dist/components/motion/checkbox.d.ts +2 -3
  181. package/dist/components/motion/checkbox.d.ts.map +1 -1
  182. package/dist/components/motion/checkbox.js +1 -1
  183. package/dist/components/motion/checkbox.js.map +1 -1
  184. package/dist/components/motion/chromatic-text-reveal.d.ts +2 -3
  185. package/dist/components/motion/chromatic-text-reveal.d.ts.map +1 -1
  186. package/dist/components/motion/chromatic-text-reveal.js +1 -1
  187. package/dist/components/motion/chromatic-text-reveal.js.map +1 -1
  188. package/dist/components/motion/combobox/content.d.ts +2 -3
  189. package/dist/components/motion/combobox/content.d.ts.map +1 -1
  190. package/dist/components/motion/combobox/content.js +1 -1
  191. package/dist/components/motion/combobox/content.js.map +1 -1
  192. package/dist/components/motion/combobox/context.d.ts +9 -10
  193. package/dist/components/motion/combobox/context.d.ts.map +1 -1
  194. package/dist/components/motion/combobox/context.js +1 -1
  195. package/dist/components/motion/combobox/context.js.map +1 -1
  196. package/dist/components/motion/combobox/list.d.ts +12 -13
  197. package/dist/components/motion/combobox/list.d.ts.map +1 -1
  198. package/dist/components/motion/combobox/list.js +1 -1
  199. package/dist/components/motion/combobox/list.js.map +1 -1
  200. package/dist/components/motion/combobox/trigger.d.ts +6 -7
  201. package/dist/components/motion/combobox/trigger.d.ts.map +1 -1
  202. package/dist/components/motion/combobox/trigger.js +1 -1
  203. package/dist/components/motion/combobox/trigger.js.map +1 -1
  204. package/dist/components/motion/command-palette.d.ts +3 -4
  205. package/dist/components/motion/command-palette.d.ts.map +1 -1
  206. package/dist/components/motion/command-palette.js +1 -1
  207. package/dist/components/motion/command-palette.js.map +1 -1
  208. package/dist/components/motion/context-menu.d.ts +20 -21
  209. package/dist/components/motion/context-menu.d.ts.map +1 -1
  210. package/dist/components/motion/context-menu.js +1 -1
  211. package/dist/components/motion/context-menu.js.map +1 -1
  212. package/dist/components/motion/cylinder-carousel.d.ts +2 -3
  213. package/dist/components/motion/cylinder-carousel.d.ts.map +1 -1
  214. package/dist/components/motion/cylinder-carousel.js +1 -1
  215. package/dist/components/motion/cylinder-carousel.js.map +1 -1
  216. package/dist/components/motion/digit-swap.d.ts +23 -0
  217. package/dist/components/motion/digit-swap.d.ts.map +1 -0
  218. package/dist/components/motion/digit-swap.js +77 -0
  219. package/dist/components/motion/digit-swap.js.map +1 -0
  220. package/dist/components/motion/dock.d.ts +5 -6
  221. package/dist/components/motion/dock.d.ts.map +1 -1
  222. package/dist/components/motion/dock.js +1 -1
  223. package/dist/components/motion/dock.js.map +1 -1
  224. package/dist/components/motion/drawer.d.ts +2 -3
  225. package/dist/components/motion/drawer.d.ts.map +1 -1
  226. package/dist/components/motion/drawer.js +1 -1
  227. package/dist/components/motion/drawer.js.map +1 -1
  228. package/dist/components/motion/dynamic-island.d.ts +4 -5
  229. package/dist/components/motion/dynamic-island.d.ts.map +1 -1
  230. package/dist/components/motion/dynamic-island.js +1 -1
  231. package/dist/components/motion/dynamic-island.js.map +1 -1
  232. package/dist/components/motion/expandable-action-bar.d.ts +6 -7
  233. package/dist/components/motion/expandable-action-bar.d.ts.map +1 -1
  234. package/dist/components/motion/expandable-action-bar.js +1 -1
  235. package/dist/components/motion/expandable-action-bar.js.map +1 -1
  236. package/dist/components/motion/expandable-control.d.ts +4 -5
  237. package/dist/components/motion/expandable-control.d.ts.map +1 -1
  238. package/dist/components/motion/expandable-control.js +1 -1
  239. package/dist/components/motion/expandable-control.js.map +1 -1
  240. package/dist/components/motion/expandable-tabs.d.ts +4 -5
  241. package/dist/components/motion/expandable-tabs.d.ts.map +1 -1
  242. package/dist/components/motion/expandable-tabs.js +1 -1
  243. package/dist/components/motion/expandable-tabs.js.map +1 -1
  244. package/dist/components/motion/expanding-arrow-button.d.ts +2 -3
  245. package/dist/components/motion/expanding-arrow-button.d.ts.map +1 -1
  246. package/dist/components/motion/expanding-arrow-button.js +1 -1
  247. package/dist/components/motion/expanding-arrow-button.js.map +1 -1
  248. package/dist/components/motion/feedback-widget.d.ts +3 -4
  249. package/dist/components/motion/feedback-widget.d.ts.map +1 -1
  250. package/dist/components/motion/feedback-widget.js +1 -1
  251. package/dist/components/motion/feedback-widget.js.map +1 -1
  252. package/dist/components/motion/file-tree.d.ts +7 -8
  253. package/dist/components/motion/file-tree.d.ts.map +1 -1
  254. package/dist/components/motion/file-tree.js +1 -1
  255. package/dist/components/motion/file-tree.js.map +1 -1
  256. package/dist/components/motion/file-upload.d.ts +7 -8
  257. package/dist/components/motion/file-upload.d.ts.map +1 -1
  258. package/dist/components/motion/file-upload.js +1 -1
  259. package/dist/components/motion/file-upload.js.map +1 -1
  260. package/dist/components/motion/hold-action-button.d.ts +2 -3
  261. package/dist/components/motion/hold-action-button.d.ts.map +1 -1
  262. package/dist/components/motion/hold-action-button.js +1 -1
  263. package/dist/components/motion/hold-action-button.js.map +1 -1
  264. package/dist/components/motion/infinite-masonry.d.ts +3 -4
  265. package/dist/components/motion/infinite-masonry.d.ts.map +1 -1
  266. package/dist/components/motion/infinite-masonry.js +1 -1
  267. package/dist/components/motion/infinite-masonry.js.map +1 -1
  268. package/dist/components/motion/input.d.ts +3 -4
  269. package/dist/components/motion/input.d.ts.map +1 -1
  270. package/dist/components/motion/input.js +1 -1
  271. package/dist/components/motion/input.js.map +1 -1
  272. package/dist/components/motion/liquid.d.ts +6 -7
  273. package/dist/components/motion/liquid.d.ts.map +1 -1
  274. package/dist/components/motion/liquid.js +1 -1
  275. package/dist/components/motion/liquid.js.map +1 -1
  276. package/dist/components/motion/loader.d.ts +3 -4
  277. package/dist/components/motion/loader.d.ts.map +1 -1
  278. package/dist/components/motion/loader.js +1 -1
  279. package/dist/components/motion/loader.js.map +1 -1
  280. package/dist/components/motion/magnetic.d.ts +2 -3
  281. package/dist/components/motion/magnetic.d.ts.map +1 -1
  282. package/dist/components/motion/magnetic.js +1 -1
  283. package/dist/components/motion/magnetic.js.map +1 -1
  284. package/dist/components/motion/marquee.d.ts +2 -3
  285. package/dist/components/motion/marquee.d.ts.map +1 -1
  286. package/dist/components/motion/marquee.js +1 -1
  287. package/dist/components/motion/marquee.js.map +1 -1
  288. package/dist/components/motion/morphing-modal.d.ts +2 -3
  289. package/dist/components/motion/morphing-modal.d.ts.map +1 -1
  290. package/dist/components/motion/morphing-modal.js +1 -1
  291. package/dist/components/motion/morphing-modal.js.map +1 -1
  292. package/dist/components/motion/morphing-search.d.ts +3 -4
  293. package/dist/components/motion/morphing-search.d.ts.map +1 -1
  294. package/dist/components/motion/morphing-search.js +1 -1
  295. package/dist/components/motion/morphing-search.js.map +1 -1
  296. package/dist/components/motion/morphing-tabs.d.ts +4 -5
  297. package/dist/components/motion/morphing-tabs.d.ts.map +1 -1
  298. package/dist/components/motion/morphing-tabs.js +1 -1
  299. package/dist/components/motion/morphing-tabs.js.map +1 -1
  300. package/dist/components/motion/multi-select/content.d.ts +2 -3
  301. package/dist/components/motion/multi-select/content.d.ts.map +1 -1
  302. package/dist/components/motion/multi-select/content.js +1 -1
  303. package/dist/components/motion/multi-select/content.js.map +1 -1
  304. package/dist/components/motion/multi-select/context.d.ts +9 -10
  305. package/dist/components/motion/multi-select/context.d.ts.map +1 -1
  306. package/dist/components/motion/multi-select/context.js +1 -1
  307. package/dist/components/motion/multi-select/context.js.map +1 -1
  308. package/dist/components/motion/multi-select/list.d.ts +12 -13
  309. package/dist/components/motion/multi-select/list.d.ts.map +1 -1
  310. package/dist/components/motion/multi-select/list.js +1 -1
  311. package/dist/components/motion/multi-select/list.js.map +1 -1
  312. package/dist/components/motion/multi-select/trigger.d.ts +6 -7
  313. package/dist/components/motion/multi-select/trigger.d.ts.map +1 -1
  314. package/dist/components/motion/multi-select/trigger.js +1 -1
  315. package/dist/components/motion/multi-select/trigger.js.map +1 -1
  316. package/dist/components/motion/not-found/glitch.d.ts +1 -2
  317. package/dist/components/motion/not-found/glitch.d.ts.map +1 -1
  318. package/dist/components/motion/not-found/magnetic.d.ts +1 -2
  319. package/dist/components/motion/not-found/magnetic.d.ts.map +1 -1
  320. package/dist/components/motion/not-found/magnetic.js +1 -1
  321. package/dist/components/motion/not-found/magnetic.js.map +1 -1
  322. package/dist/components/motion/not-found/shared.d.ts +4 -5
  323. package/dist/components/motion/not-found/shared.d.ts.map +1 -1
  324. package/dist/components/motion/not-found/shared.js +1 -1
  325. package/dist/components/motion/not-found/shared.js.map +1 -1
  326. package/dist/components/motion/not-found/spotlight.d.ts +1 -2
  327. package/dist/components/motion/not-found/spotlight.d.ts.map +1 -1
  328. package/dist/components/motion/not-found/spotlight.js +1 -1
  329. package/dist/components/motion/not-found/spotlight.js.map +1 -1
  330. package/dist/components/motion/not-found/stacked.d.ts +1 -2
  331. package/dist/components/motion/not-found/stacked.d.ts.map +1 -1
  332. package/dist/components/motion/not-found/terminal.d.ts +1 -2
  333. package/dist/components/motion/not-found/terminal.d.ts.map +1 -1
  334. package/dist/components/motion/notification-stack.d.ts +4 -5
  335. package/dist/components/motion/notification-stack.d.ts.map +1 -1
  336. package/dist/components/motion/notification-stack.js +1 -1
  337. package/dist/components/motion/notification-stack.js.map +1 -1
  338. package/dist/components/motion/number-ticker.d.ts +2 -3
  339. package/dist/components/motion/number-ticker.d.ts.map +1 -1
  340. package/dist/components/motion/number-ticker.js +1 -1
  341. package/dist/components/motion/number-ticker.js.map +1 -1
  342. package/dist/components/motion/otp-input.d.ts +3 -4
  343. package/dist/components/motion/otp-input.d.ts.map +1 -1
  344. package/dist/components/motion/otp-input.js +1 -1
  345. package/dist/components/motion/otp-input.js.map +1 -1
  346. package/dist/components/motion/overflow-actions.d.ts +5 -6
  347. package/dist/components/motion/overflow-actions.d.ts.map +1 -1
  348. package/dist/components/motion/overflow-actions.js +1 -1
  349. package/dist/components/motion/overflow-actions.js.map +1 -1
  350. package/dist/components/motion/parallax.d.ts +2 -3
  351. package/dist/components/motion/parallax.d.ts.map +1 -1
  352. package/dist/components/motion/parallax.js +1 -1
  353. package/dist/components/motion/parallax.js.map +1 -1
  354. package/dist/components/motion/popover-morph.d.ts +6 -7
  355. package/dist/components/motion/popover-morph.d.ts.map +1 -1
  356. package/dist/components/motion/popover-morph.js +1 -1
  357. package/dist/components/motion/popover-morph.js.map +1 -1
  358. package/dist/components/motion/popover.d.ts +6 -7
  359. package/dist/components/motion/popover.d.ts.map +1 -1
  360. package/dist/components/motion/popover.js +1 -1
  361. package/dist/components/motion/popover.js.map +1 -1
  362. package/dist/components/motion/preview-rail.d.ts +3 -4
  363. package/dist/components/motion/preview-rail.d.ts.map +1 -1
  364. package/dist/components/motion/preview-rail.js +1 -1
  365. package/dist/components/motion/preview-rail.js.map +1 -1
  366. package/dist/components/motion/project-folder.d.ts +3 -4
  367. package/dist/components/motion/project-folder.d.ts.map +1 -1
  368. package/dist/components/motion/project-folder.js +1 -1
  369. package/dist/components/motion/project-folder.js.map +1 -1
  370. package/dist/components/motion/pull-to-refresh.d.ts +3 -4
  371. package/dist/components/motion/pull-to-refresh.d.ts.map +1 -1
  372. package/dist/components/motion/pull-to-refresh.js +1 -1
  373. package/dist/components/motion/pull-to-refresh.js.map +1 -1
  374. package/dist/components/motion/radio.d.ts +4 -5
  375. package/dist/components/motion/radio.d.ts.map +1 -1
  376. package/dist/components/motion/radio.js +1 -1
  377. package/dist/components/motion/radio.js.map +1 -1
  378. package/dist/components/motion/range-slider-bubble.d.ts +2 -3
  379. package/dist/components/motion/range-slider-bubble.d.ts.map +1 -1
  380. package/dist/components/motion/range-slider-bubble.js +1 -1
  381. package/dist/components/motion/range-slider-bubble.js.map +1 -1
  382. package/dist/components/motion/range-slider-fluid.d.ts +2 -3
  383. package/dist/components/motion/range-slider-fluid.d.ts.map +1 -1
  384. package/dist/components/motion/range-slider-fluid.js +1 -1
  385. package/dist/components/motion/range-slider-fluid.js.map +1 -1
  386. package/dist/components/motion/range-slider-ruler.d.ts +2 -3
  387. package/dist/components/motion/range-slider-ruler.d.ts.map +1 -1
  388. package/dist/components/motion/range-slider-ruler.js +1 -1
  389. package/dist/components/motion/range-slider-ruler.js.map +1 -1
  390. package/dist/components/motion/range-slider-wave.d.ts +2 -3
  391. package/dist/components/motion/range-slider-wave.d.ts.map +1 -1
  392. package/dist/components/motion/range-slider-wave.js +1 -1
  393. package/dist/components/motion/range-slider-wave.js.map +1 -1
  394. package/dist/components/motion/range-slider.d.ts +2 -3
  395. package/dist/components/motion/range-slider.d.ts.map +1 -1
  396. package/dist/components/motion/range-slider.js +1 -1
  397. package/dist/components/motion/range-slider.js.map +1 -1
  398. package/dist/components/motion/scroll-progress.d.ts +4 -5
  399. package/dist/components/motion/scroll-progress.d.ts.map +1 -1
  400. package/dist/components/motion/scroll-progress.js +1 -1
  401. package/dist/components/motion/scroll-progress.js.map +1 -1
  402. package/dist/components/motion/scroll-reveal.d.ts +2 -3
  403. package/dist/components/motion/scroll-reveal.d.ts.map +1 -1
  404. package/dist/components/motion/scroll-reveal.js +1 -1
  405. package/dist/components/motion/scroll-reveal.js.map +1 -1
  406. package/dist/components/motion/scroll-to.d.ts +2 -3
  407. package/dist/components/motion/scroll-to.d.ts.map +1 -1
  408. package/dist/components/motion/scroll-to.js +1 -1
  409. package/dist/components/motion/scroll-to.js.map +1 -1
  410. package/dist/components/motion/select-morph.d.ts +10 -11
  411. package/dist/components/motion/select-morph.d.ts.map +1 -1
  412. package/dist/components/motion/select-morph.js +1 -1
  413. package/dist/components/motion/select-morph.js.map +1 -1
  414. package/dist/components/motion/select.d.ts +10 -11
  415. package/dist/components/motion/select.d.ts.map +1 -1
  416. package/dist/components/motion/select.js +1 -1
  417. package/dist/components/motion/select.js.map +1 -1
  418. package/dist/components/motion/shader-background.d.ts +4 -5
  419. package/dist/components/motion/shader-background.d.ts.map +1 -1
  420. package/dist/components/motion/shader-background.js +1 -1
  421. package/dist/components/motion/shader-background.js.map +1 -1
  422. package/dist/components/motion/shared-layout-bg.d.ts +2 -3
  423. package/dist/components/motion/shared-layout-bg.d.ts.map +1 -1
  424. package/dist/components/motion/shared-layout-bg.js +1 -1
  425. package/dist/components/motion/shared-layout-bg.js.map +1 -1
  426. package/dist/components/motion/signup-form.d.ts +7 -8
  427. package/dist/components/motion/signup-form.d.ts.map +1 -1
  428. package/dist/components/motion/signup-form.js +1 -1
  429. package/dist/components/motion/signup-form.js.map +1 -1
  430. package/dist/components/motion/slide-action-button.d.ts +2 -3
  431. package/dist/components/motion/slide-action-button.d.ts.map +1 -1
  432. package/dist/components/motion/slide-action-button.js +1 -1
  433. package/dist/components/motion/slide-action-button.js.map +1 -1
  434. package/dist/components/motion/smooth-scroll.d.ts +6 -7
  435. package/dist/components/motion/smooth-scroll.d.ts.map +1 -1
  436. package/dist/components/motion/swipeable-list.d.ts +8 -9
  437. package/dist/components/motion/swipeable-list.d.ts.map +1 -1
  438. package/dist/components/motion/swipeable-list.js +1 -1
  439. package/dist/components/motion/swipeable-list.js.map +1 -1
  440. package/dist/components/motion/switch.d.ts +2 -3
  441. package/dist/components/motion/switch.d.ts.map +1 -1
  442. package/dist/components/motion/switch.js +1 -1
  443. package/dist/components/motion/switch.js.map +1 -1
  444. package/dist/components/motion/table/editable-cell.d.ts +1 -2
  445. package/dist/components/motion/table/editable-cell.d.ts.map +1 -1
  446. package/dist/components/motion/table/index.d.ts +2 -2
  447. package/dist/components/motion/table/index.d.ts.map +1 -1
  448. package/dist/components/motion/table/index.js +1 -1
  449. package/dist/components/motion/table/index.js.map +1 -1
  450. package/dist/components/motion/table/row-handle.d.ts +1 -2
  451. package/dist/components/motion/table/row-handle.d.ts.map +1 -1
  452. package/dist/components/motion/table/skeleton-rows.d.ts +1 -2
  453. package/dist/components/motion/table/skeleton-rows.d.ts.map +1 -1
  454. package/dist/components/motion/table/skeleton-rows.js +1 -1
  455. package/dist/components/motion/table/skeleton-rows.js.map +1 -1
  456. package/dist/components/motion/table/table-header.d.ts +2 -3
  457. package/dist/components/motion/table/table-header.d.ts.map +1 -1
  458. package/dist/components/motion/table/table-header.js +1 -1
  459. package/dist/components/motion/table/table-header.js.map +1 -1
  460. package/dist/components/motion/table/table-menu.d.ts +2 -3
  461. package/dist/components/motion/table/table-menu.d.ts.map +1 -1
  462. package/dist/components/motion/table/table-menu.js +1 -1
  463. package/dist/components/motion/table/table-menu.js.map +1 -1
  464. package/dist/components/motion/tabs.d.ts +4 -5
  465. package/dist/components/motion/tabs.d.ts.map +1 -1
  466. package/dist/components/motion/tabs.js +1 -1
  467. package/dist/components/motion/tabs.js.map +1 -1
  468. package/dist/components/motion/text-cascade.d.ts +2 -3
  469. package/dist/components/motion/text-cascade.d.ts.map +1 -1
  470. package/dist/components/motion/text-reveal.d.ts +2 -3
  471. package/dist/components/motion/text-reveal.d.ts.map +1 -1
  472. package/dist/components/motion/text-reveal.js +1 -1
  473. package/dist/components/motion/text-reveal.js.map +1 -1
  474. package/dist/components/motion/text-scramble.d.ts +2 -3
  475. package/dist/components/motion/text-scramble.d.ts.map +1 -1
  476. package/dist/components/motion/text-scramble.js +1 -1
  477. package/dist/components/motion/text-scramble.js.map +1 -1
  478. package/dist/components/motion/text-shimmer.d.ts +2 -3
  479. package/dist/components/motion/text-shimmer.d.ts.map +1 -1
  480. package/dist/components/motion/text-shimmer.js +1 -1
  481. package/dist/components/motion/text-shimmer.js.map +1 -1
  482. package/dist/components/motion/theme-toggle.d.ts +5 -6
  483. package/dist/components/motion/theme-toggle.d.ts.map +1 -1
  484. package/dist/components/motion/theme-toggle.js +1 -1
  485. package/dist/components/motion/theme-toggle.js.map +1 -1
  486. package/dist/components/motion/tilt-card.d.ts +2 -3
  487. package/dist/components/motion/tilt-card.d.ts.map +1 -1
  488. package/dist/components/motion/tilt-card.js +1 -1
  489. package/dist/components/motion/tilt-card.js.map +1 -1
  490. package/dist/components/motion/tooltip.d.ts +2 -3
  491. package/dist/components/motion/tooltip.d.ts.map +1 -1
  492. package/dist/components/motion/tooltip.js +1 -1
  493. package/dist/components/motion/tooltip.js.map +1 -1
  494. package/dist/components/motion/wheel-picker.d.ts +3 -4
  495. package/dist/components/motion/wheel-picker.d.ts.map +1 -1
  496. package/dist/components/motion/wheel-picker.js +1 -1
  497. package/dist/components/motion/wheel-picker.js.map +1 -1
  498. package/dist/components/reui/alert.d.ts.map +1 -1
  499. package/dist/components/reui/alert.js +1 -1
  500. package/dist/components/reui/alert.js.map +1 -1
  501. package/dist/components/reui/autocomplete.d.ts +2 -2
  502. package/dist/components/reui/autocomplete.d.ts.map +1 -1
  503. package/dist/components/reui/autocomplete.js +1 -1
  504. package/dist/components/reui/autocomplete.js.map +1 -1
  505. package/dist/components/reui/badge.d.ts +1 -1
  506. package/dist/components/reui/badge.d.ts.map +1 -1
  507. package/dist/components/reui/badge.js +1 -1
  508. package/dist/components/reui/badge.js.map +1 -1
  509. package/dist/components/reui/cascader/cascader-async.d.ts +8 -9
  510. package/dist/components/reui/cascader/cascader-async.d.ts.map +1 -1
  511. package/dist/components/reui/cascader/cascader-columns.d.ts +3 -3
  512. package/dist/components/reui/cascader/cascader-columns.d.ts.map +1 -1
  513. package/dist/components/reui/cascader/cascader-columns.js +1 -1
  514. package/dist/components/reui/cascader/cascader-columns.js.map +1 -1
  515. package/dist/components/reui/cascader/cascader-context.d.ts +13 -13
  516. package/dist/components/reui/cascader/cascader-context.d.ts.map +1 -1
  517. package/dist/components/reui/cascader/cascader-footer.d.ts +8 -8
  518. package/dist/components/reui/cascader/cascader-footer.d.ts.map +1 -1
  519. package/dist/components/reui/cascader/cascader-footer.js +1 -1
  520. package/dist/components/reui/cascader/cascader-footer.js.map +1 -1
  521. package/dist/components/reui/cascader/cascader-i18n.d.ts +3 -4
  522. package/dist/components/reui/cascader/cascader-i18n.d.ts.map +1 -1
  523. package/dist/components/reui/cascader/cascader-item.d.ts +9 -9
  524. package/dist/components/reui/cascader/cascader-item.d.ts.map +1 -1
  525. package/dist/components/reui/cascader/cascader-item.js +1 -1
  526. package/dist/components/reui/cascader/cascader-item.js.map +1 -1
  527. package/dist/components/reui/cascader/cascader-lib.d.ts +38 -39
  528. package/dist/components/reui/cascader/cascader-lib.d.ts.map +1 -1
  529. package/dist/components/reui/cascader/cascader-nav.d.ts +6 -6
  530. package/dist/components/reui/cascader/cascader-nav.d.ts.map +1 -1
  531. package/dist/components/reui/cascader/cascader-nav.js +1 -1
  532. package/dist/components/reui/cascader/cascader-nav.js.map +1 -1
  533. package/dist/components/reui/cascader/cascader-virtual.d.ts +6 -6
  534. package/dist/components/reui/cascader/cascader-virtual.d.ts.map +1 -1
  535. package/dist/components/reui/cascader/cascader.d.ts +19 -19
  536. package/dist/components/reui/cascader/cascader.d.ts.map +1 -1
  537. package/dist/components/reui/cascader/cascader.js +1 -1
  538. package/dist/components/reui/cascader/cascader.js.map +1 -1
  539. package/dist/components/reui/code-block/code-block-highlight.d.ts +32 -33
  540. package/dist/components/reui/code-block/code-block-highlight.d.ts.map +1 -1
  541. package/dist/components/reui/code-block/code-block.d.ts +7 -7
  542. package/dist/components/reui/code-block/code-block.d.ts.map +1 -1
  543. package/dist/components/reui/code-block/code-block.js +1 -1
  544. package/dist/components/reui/code-block/code-block.js.map +1 -1
  545. package/dist/components/reui/data-grid/data-grid-cell-selection.js +1 -1
  546. package/dist/components/reui/data-grid/data-grid-cell-selection.js.map +1 -1
  547. package/dist/components/reui/data-grid/data-grid-column-filter.js +1 -1
  548. package/dist/components/reui/data-grid/data-grid-column-filter.js.map +1 -1
  549. package/dist/components/reui/data-grid/data-grid-column-header.d.ts.map +1 -1
  550. package/dist/components/reui/data-grid/data-grid-column-header.js +9 -6
  551. package/dist/components/reui/data-grid/data-grid-column-header.js.map +1 -1
  552. package/dist/components/reui/data-grid/data-grid-i18n.d.ts +1 -1
  553. package/dist/components/reui/data-grid/data-grid-i18n.js.map +1 -1
  554. package/dist/components/reui/data-grid/data-grid-pagination.js +1 -1
  555. package/dist/components/reui/data-grid/data-grid-pagination.js.map +1 -1
  556. package/dist/components/reui/data-grid/data-grid-scroll-area.js +1 -1
  557. package/dist/components/reui/data-grid/data-grid-scroll-area.js.map +1 -1
  558. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js +1 -1
  559. package/dist/components/reui/data-grid/data-grid-table-dnd-rows.js.map +1 -1
  560. package/dist/components/reui/data-grid/data-grid-table-virtual.js +1 -1
  561. package/dist/components/reui/data-grid/data-grid-table-virtual.js.map +1 -1
  562. package/dist/components/reui/data-grid/data-grid-table.js +1 -1
  563. package/dist/components/reui/data-grid/data-grid-table.js.map +1 -1
  564. package/dist/components/reui/data-grid/data-grid.d.ts +28 -28
  565. package/dist/components/reui/data-grid/data-grid.d.ts.map +1 -1
  566. package/dist/components/reui/data-grid/data-grid.js +1 -1
  567. package/dist/components/reui/data-grid/data-grid.js.map +1 -1
  568. package/dist/components/reui/date-selector.d.ts +11 -12
  569. package/dist/components/reui/date-selector.d.ts.map +1 -1
  570. package/dist/components/reui/date-selector.js +1 -1
  571. package/dist/components/reui/date-selector.js.map +1 -1
  572. package/dist/components/reui/event-calendar/event-calendar-agenda-view.js +1 -1
  573. package/dist/components/reui/event-calendar/event-calendar-agenda-view.js.map +1 -1
  574. package/dist/components/reui/event-calendar/event-calendar-content.js +1 -1
  575. package/dist/components/reui/event-calendar/event-calendar-content.js.map +1 -1
  576. package/dist/components/reui/event-calendar/event-calendar-event.js +1 -1
  577. package/dist/components/reui/event-calendar/event-calendar-event.js.map +1 -1
  578. package/dist/components/reui/event-calendar/event-calendar-month-view.js +1 -1
  579. package/dist/components/reui/event-calendar/event-calendar-month-view.js.map +1 -1
  580. package/dist/components/reui/event-calendar/event-calendar-nav.js +1 -1
  581. package/dist/components/reui/event-calendar/event-calendar-nav.js.map +1 -1
  582. package/dist/components/reui/event-calendar/event-calendar-resource-view.js +1 -1
  583. package/dist/components/reui/event-calendar/event-calendar-resource-view.js.map +1 -1
  584. package/dist/components/reui/event-calendar/event-calendar-time-grid.js +1 -1
  585. package/dist/components/reui/event-calendar/event-calendar-time-grid.js.map +1 -1
  586. package/dist/components/reui/event-calendar/event-calendar.d.ts.map +1 -1
  587. package/dist/components/reui/event-calendar/event-calendar.js +1 -1
  588. package/dist/components/reui/event-calendar/event-calendar.js.map +1 -1
  589. package/dist/components/reui/filters/filters-advanced.d.ts +6 -7
  590. package/dist/components/reui/filters/filters-advanced.d.ts.map +1 -1
  591. package/dist/components/reui/filters/filters-advanced.js +1 -1
  592. package/dist/components/reui/filters/filters-advanced.js.map +1 -1
  593. package/dist/components/reui/filters/filters-builder.d.ts +5 -5
  594. package/dist/components/reui/filters/filters-builder.d.ts.map +1 -1
  595. package/dist/components/reui/filters/filters-builder.js +1 -1
  596. package/dist/components/reui/filters/filters-builder.js.map +1 -1
  597. package/dist/components/reui/filters/filters-chip.d.ts +10 -11
  598. package/dist/components/reui/filters/filters-chip.d.ts.map +1 -1
  599. package/dist/components/reui/filters/filters-chip.js +1 -1
  600. package/dist/components/reui/filters/filters-chip.js.map +1 -1
  601. package/dist/components/reui/filters/filters-context.d.ts +30 -30
  602. package/dist/components/reui/filters/filters-context.d.ts.map +1 -1
  603. package/dist/components/reui/filters/filters-date.d.ts +13 -14
  604. package/dist/components/reui/filters/filters-date.d.ts.map +1 -1
  605. package/dist/components/reui/filters/filters-dnd.d.ts +15 -16
  606. package/dist/components/reui/filters/filters-dnd.d.ts.map +1 -1
  607. package/dist/components/reui/filters/filters-editors.d.ts +14 -14
  608. package/dist/components/reui/filters/filters-editors.d.ts.map +1 -1
  609. package/dist/components/reui/filters/filters-editors.js +1 -1
  610. package/dist/components/reui/filters/filters-editors.js.map +1 -1
  611. package/dist/components/reui/filters/filters-i18n.d.ts +4 -5
  612. package/dist/components/reui/filters/filters-i18n.d.ts.map +1 -1
  613. package/dist/components/reui/filters/filters-lib.d.ts +34 -35
  614. package/dist/components/reui/filters/filters-lib.d.ts.map +1 -1
  615. package/dist/components/reui/filters/filters-operators.d.ts +13 -14
  616. package/dist/components/reui/filters/filters-operators.d.ts.map +1 -1
  617. package/dist/components/reui/filters/filters-query.d.ts +29 -30
  618. package/dist/components/reui/filters/filters-query.d.ts.map +1 -1
  619. package/dist/components/reui/filters/filters-types.d.ts +31 -32
  620. package/dist/components/reui/filters/filters-types.d.ts.map +1 -1
  621. package/dist/components/reui/filters/filters.d.ts +5 -5
  622. package/dist/components/reui/filters/filters.d.ts.map +1 -1
  623. package/dist/components/reui/filters/filters.js +1 -1
  624. package/dist/components/reui/filters/filters.js.map +1 -1
  625. package/dist/components/reui/frame.d.ts +1 -1
  626. package/dist/components/reui/frame.d.ts.map +1 -1
  627. package/dist/components/reui/frame.js +1 -1
  628. package/dist/components/reui/frame.js.map +1 -1
  629. package/dist/components/reui/gantt/gantt-bar.js +1 -1
  630. package/dist/components/reui/gantt/gantt-bar.js.map +1 -1
  631. package/dist/components/reui/gantt/gantt-nav.js +1 -1
  632. package/dist/components/reui/gantt/gantt-nav.js.map +1 -1
  633. package/dist/components/reui/gantt/gantt-view.js +1 -1
  634. package/dist/components/reui/gantt/gantt-view.js.map +1 -1
  635. package/dist/components/reui/gantt/gantt.d.ts.map +1 -1
  636. package/dist/components/reui/gantt/gantt.js +1 -1
  637. package/dist/components/reui/gantt/gantt.js.map +1 -1
  638. package/dist/components/reui/icon-stack.js +1 -1
  639. package/dist/components/reui/icon-stack.js.map +1 -1
  640. package/dist/components/reui/icon-tile.d.ts.map +1 -1
  641. package/dist/components/reui/icon-tile.js +1 -1
  642. package/dist/components/reui/icon-tile.js.map +1 -1
  643. package/dist/components/reui/kanban.d.ts +11 -11
  644. package/dist/components/reui/kanban.d.ts.map +1 -1
  645. package/dist/components/reui/kanban.js +1 -1
  646. package/dist/components/reui/kanban.js.map +1 -1
  647. package/dist/components/reui/number-field.js +1 -1
  648. package/dist/components/reui/number-field.js.map +1 -1
  649. package/dist/components/reui/phone-input.js +1 -1
  650. package/dist/components/reui/phone-input.js.map +1 -1
  651. package/dist/components/reui/rating.d.ts.map +1 -1
  652. package/dist/components/reui/rating.js +1 -1
  653. package/dist/components/reui/rating.js.map +1 -1
  654. package/dist/components/reui/scrollspy.d.ts +1 -2
  655. package/dist/components/reui/scrollspy.d.ts.map +1 -1
  656. package/dist/components/reui/sortable.d.ts +6 -6
  657. package/dist/components/reui/sortable.d.ts.map +1 -1
  658. package/dist/components/reui/sortable.js +1 -1
  659. package/dist/components/reui/sortable.js.map +1 -1
  660. package/dist/components/reui/stepper.d.ts.map +1 -1
  661. package/dist/components/reui/stepper.js +1 -1
  662. package/dist/components/reui/stepper.js.map +1 -1
  663. package/dist/components/reui/timeline.d.ts.map +1 -1
  664. package/dist/components/reui/timeline.js +1 -1
  665. package/dist/components/reui/timeline.js.map +1 -1
  666. package/dist/components/reui/tree.d.ts.map +1 -1
  667. package/dist/components/reui/tree.js +1 -1
  668. package/dist/components/reui/tree.js.map +1 -1
  669. package/dist/components/ui/accordion.d.ts.map +1 -1
  670. package/dist/components/ui/accordion.js +1 -1
  671. package/dist/components/ui/accordion.js.map +1 -1
  672. package/dist/components/ui/alert-dialog.js +1 -1
  673. package/dist/components/ui/alert-dialog.js.map +1 -1
  674. package/dist/components/ui/alert.d.ts.map +1 -1
  675. package/dist/components/ui/alert.js +1 -1
  676. package/dist/components/ui/alert.js.map +1 -1
  677. package/dist/components/ui/aspect-ratio.js +1 -1
  678. package/dist/components/ui/aspect-ratio.js.map +1 -1
  679. package/dist/components/ui/attachment.js +1 -1
  680. package/dist/components/ui/attachment.js.map +1 -1
  681. package/dist/components/ui/avatar.d.ts.map +1 -1
  682. package/dist/components/ui/avatar.js +1 -1
  683. package/dist/components/ui/avatar.js.map +1 -1
  684. package/dist/components/ui/badge.d.ts +1 -1
  685. package/dist/components/ui/badge.d.ts.map +1 -1
  686. package/dist/components/ui/badge.js +1 -1
  687. package/dist/components/ui/badge.js.map +1 -1
  688. package/dist/components/ui/breadcrumb.d.ts.map +1 -1
  689. package/dist/components/ui/breadcrumb.js +1 -1
  690. package/dist/components/ui/breadcrumb.js.map +1 -1
  691. package/dist/components/ui/bubble.d.ts +1 -1
  692. package/dist/components/ui/bubble.d.ts.map +1 -1
  693. package/dist/components/ui/bubble.js +1 -1
  694. package/dist/components/ui/bubble.js.map +1 -1
  695. package/dist/components/ui/button-group.js +1 -1
  696. package/dist/components/ui/button-group.js.map +1 -1
  697. package/dist/components/ui/button.d.ts +1 -1
  698. package/dist/components/ui/button.d.ts.map +1 -1
  699. package/dist/components/ui/button.js +1 -1
  700. package/dist/components/ui/button.js.map +1 -1
  701. package/dist/components/ui/calendar.js +1 -1
  702. package/dist/components/ui/calendar.js.map +1 -1
  703. package/dist/components/ui/card.d.ts.map +1 -1
  704. package/dist/components/ui/card.js +1 -1
  705. package/dist/components/ui/card.js.map +1 -1
  706. package/dist/components/ui/carousel.js +1 -1
  707. package/dist/components/ui/carousel.js.map +1 -1
  708. package/dist/components/ui/chart.d.ts +2 -2
  709. package/dist/components/ui/chart.d.ts.map +1 -1
  710. package/dist/components/ui/chart.js +1 -1
  711. package/dist/components/ui/chart.js.map +1 -1
  712. package/dist/components/ui/checkbox.d.ts.map +1 -1
  713. package/dist/components/ui/checkbox.js +2 -2
  714. package/dist/components/ui/checkbox.js.map +1 -1
  715. package/dist/components/ui/combobox.js +1 -1
  716. package/dist/components/ui/combobox.js.map +1 -1
  717. package/dist/components/ui/command.js +1 -1
  718. package/dist/components/ui/command.js.map +1 -1
  719. package/dist/components/ui/context-menu.d.ts.map +1 -1
  720. package/dist/components/ui/context-menu.js +1 -1
  721. package/dist/components/ui/context-menu.js.map +1 -1
  722. package/dist/components/ui/dialog.js +1 -1
  723. package/dist/components/ui/dialog.js.map +1 -1
  724. package/dist/components/ui/drawer.d.ts.map +1 -1
  725. package/dist/components/ui/drawer.js +1 -1
  726. package/dist/components/ui/drawer.js.map +1 -1
  727. package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
  728. package/dist/components/ui/dropdown-menu.js +1 -1
  729. package/dist/components/ui/dropdown-menu.js.map +1 -1
  730. package/dist/components/ui/empty.d.ts.map +1 -1
  731. package/dist/components/ui/empty.js +1 -1
  732. package/dist/components/ui/empty.js.map +1 -1
  733. package/dist/components/ui/field.js +2 -2
  734. package/dist/components/ui/field.js.map +1 -1
  735. package/dist/components/ui/hover-card.d.ts.map +1 -1
  736. package/dist/components/ui/hover-card.js +1 -1
  737. package/dist/components/ui/hover-card.js.map +1 -1
  738. package/dist/components/ui/input-group.js +1 -1
  739. package/dist/components/ui/input-group.js.map +1 -1
  740. package/dist/components/ui/input-otp.d.ts.map +1 -1
  741. package/dist/components/ui/input-otp.js +1 -1
  742. package/dist/components/ui/input-otp.js.map +1 -1
  743. package/dist/components/ui/input.d.ts.map +1 -1
  744. package/dist/components/ui/input.js +1 -1
  745. package/dist/components/ui/input.js.map +1 -1
  746. package/dist/components/ui/item.d.ts +2 -2
  747. package/dist/components/ui/item.js +1 -1
  748. package/dist/components/ui/item.js.map +1 -1
  749. package/dist/components/ui/kbd.js +1 -1
  750. package/dist/components/ui/kbd.js.map +1 -1
  751. package/dist/components/ui/label.d.ts.map +1 -1
  752. package/dist/components/ui/label.js +1 -1
  753. package/dist/components/ui/label.js.map +1 -1
  754. package/dist/components/ui/marker.d.ts +1 -1
  755. package/dist/components/ui/marker.d.ts.map +1 -1
  756. package/dist/components/ui/marker.js +1 -1
  757. package/dist/components/ui/marker.js.map +1 -1
  758. package/dist/components/ui/menubar.js +1 -1
  759. package/dist/components/ui/menubar.js.map +1 -1
  760. package/dist/components/ui/message-scroller.js +1 -1
  761. package/dist/components/ui/message-scroller.js.map +1 -1
  762. package/dist/components/ui/message.d.ts.map +1 -1
  763. package/dist/components/ui/message.js +1 -1
  764. package/dist/components/ui/message.js.map +1 -1
  765. package/dist/components/ui/native-select.d.ts.map +1 -1
  766. package/dist/components/ui/native-select.js +1 -1
  767. package/dist/components/ui/native-select.js.map +1 -1
  768. package/dist/components/ui/navigation-menu.d.ts.map +1 -1
  769. package/dist/components/ui/navigation-menu.js +1 -1
  770. package/dist/components/ui/navigation-menu.js.map +1 -1
  771. package/dist/components/ui/pagination.js +1 -1
  772. package/dist/components/ui/pagination.js.map +1 -1
  773. package/dist/components/ui/popover.d.ts.map +1 -1
  774. package/dist/components/ui/popover.js +1 -1
  775. package/dist/components/ui/popover.js.map +1 -1
  776. package/dist/components/ui/progress.d.ts.map +1 -1
  777. package/dist/components/ui/progress.js +1 -1
  778. package/dist/components/ui/progress.js.map +1 -1
  779. package/dist/components/ui/questionnaire.js +3 -3
  780. package/dist/components/ui/questionnaire.js.map +1 -1
  781. package/dist/components/ui/radio-group.d.ts.map +1 -1
  782. package/dist/components/ui/radio-group.js +2 -2
  783. package/dist/components/ui/radio-group.js.map +1 -1
  784. package/dist/components/ui/resizable.d.ts.map +1 -1
  785. package/dist/components/ui/resizable.js +1 -1
  786. package/dist/components/ui/resizable.js.map +1 -1
  787. package/dist/components/ui/scroll-area.d.ts.map +1 -1
  788. package/dist/components/ui/scroll-area.js +1 -1
  789. package/dist/components/ui/scroll-area.js.map +1 -1
  790. package/dist/components/ui/select.d.ts.map +1 -1
  791. package/dist/components/ui/select.js +1 -1
  792. package/dist/components/ui/select.js.map +1 -1
  793. package/dist/components/ui/separator.d.ts.map +1 -1
  794. package/dist/components/ui/separator.js +1 -1
  795. package/dist/components/ui/separator.js.map +1 -1
  796. package/dist/components/ui/sheet.js +1 -1
  797. package/dist/components/ui/sheet.js.map +1 -1
  798. package/dist/components/ui/sidebar.d.ts +1 -1
  799. package/dist/components/ui/sidebar.js +1 -1
  800. package/dist/components/ui/sidebar.js.map +1 -1
  801. package/dist/components/ui/skeleton.js +1 -1
  802. package/dist/components/ui/skeleton.js.map +1 -1
  803. package/dist/components/ui/slider.d.ts.map +1 -1
  804. package/dist/components/ui/slider.js +1 -1
  805. package/dist/components/ui/slider.js.map +1 -1
  806. package/dist/components/ui/spinner.d.ts.map +1 -1
  807. package/dist/components/ui/spinner.js +1 -1
  808. package/dist/components/ui/spinner.js.map +1 -1
  809. package/dist/components/ui/switch.d.ts.map +1 -1
  810. package/dist/components/ui/switch.js +2 -2
  811. package/dist/components/ui/switch.js.map +1 -1
  812. package/dist/components/ui/table.d.ts.map +1 -1
  813. package/dist/components/ui/table.js +1 -1
  814. package/dist/components/ui/table.js.map +1 -1
  815. package/dist/components/ui/tabs.d.ts +1 -1
  816. package/dist/components/ui/tabs.d.ts.map +1 -1
  817. package/dist/components/ui/tabs.js +1 -1
  818. package/dist/components/ui/tabs.js.map +1 -1
  819. package/dist/components/ui/textarea.d.ts.map +1 -1
  820. package/dist/components/ui/textarea.js +1 -1
  821. package/dist/components/ui/textarea.js.map +1 -1
  822. package/dist/components/ui/toast.js +2 -2
  823. package/dist/components/ui/toast.js.map +1 -1
  824. package/dist/components/ui/toggle-group.js +1 -1
  825. package/dist/components/ui/toggle-group.js.map +1 -1
  826. package/dist/components/ui/toggle.d.ts +1 -1
  827. package/dist/components/ui/toggle.d.ts.map +1 -1
  828. package/dist/components/ui/toggle.js +1 -1
  829. package/dist/components/ui/toggle.js.map +1 -1
  830. package/dist/components/ui/tooltip.d.ts.map +1 -1
  831. package/dist/components/ui/tooltip.js +1 -1
  832. package/dist/components/ui/tooltip.js.map +1 -1
  833. package/dist/{data-grid-i18n-52UUYPbr.d.ts → data-grid-i18n-TQR2PZlU.d.ts} +1 -13
  834. package/dist/data-grid-i18n-TQR2PZlU.d.ts.map +1 -0
  835. package/dist/hooks/use-body-classes.d.ts +1 -2
  836. package/dist/hooks/use-body-classes.d.ts.map +1 -1
  837. package/dist/hooks/use-copy-to-clipboard.d.ts +1 -2
  838. package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -1
  839. package/dist/hooks/use-dismiss.d.ts +3 -4
  840. package/dist/hooks/use-dismiss.d.ts.map +1 -1
  841. package/dist/hooks/use-favicon.d.ts +1 -2
  842. package/dist/hooks/use-favicon.d.ts.map +1 -1
  843. package/dist/hooks/use-file-upload.d.ts +7 -8
  844. package/dist/hooks/use-file-upload.d.ts.map +1 -1
  845. package/dist/hooks/use-hover-capable.d.ts +1 -2
  846. package/dist/hooks/use-hover-capable.d.ts.map +1 -1
  847. package/dist/hooks/use-hover-gesture.d.ts +2 -3
  848. package/dist/hooks/use-hover-gesture.d.ts.map +1 -1
  849. package/dist/hooks/use-hydrated.d.ts +1 -2
  850. package/dist/hooks/use-hydrated.d.ts.map +1 -1
  851. package/dist/hooks/use-intersection-observer.d.ts +1 -2
  852. package/dist/hooks/use-intersection-observer.d.ts.map +1 -1
  853. package/dist/hooks/use-is-mac.d.ts +1 -2
  854. package/dist/hooks/use-is-mac.d.ts.map +1 -1
  855. package/dist/hooks/use-media-query.d.ts +1 -2
  856. package/dist/hooks/use-media-query.d.ts.map +1 -1
  857. package/dist/hooks/use-meta-color.d.ts +1 -2
  858. package/dist/hooks/use-meta-color.d.ts.map +1 -1
  859. package/dist/hooks/use-mobile.d.ts +1 -2
  860. package/dist/hooks/use-mobile.d.ts.map +1 -1
  861. package/dist/hooks/use-mutation-observer.d.ts +1 -2
  862. package/dist/hooks/use-mutation-observer.d.ts.map +1 -1
  863. package/dist/hooks/use-on-open.d.ts +1 -2
  864. package/dist/hooks/use-on-open.d.ts.map +1 -1
  865. package/dist/hooks/use-row-cursor.d.ts +1 -2
  866. package/dist/hooks/use-row-cursor.d.ts.map +1 -1
  867. package/dist/hooks/use-scroll-position.d.ts +1 -2
  868. package/dist/hooks/use-scroll-position.d.ts.map +1 -1
  869. package/dist/hooks/use-slider-input.d.ts +1 -2
  870. package/dist/hooks/use-slider-input.d.ts.map +1 -1
  871. package/dist/hooks/use-slider.d.ts +3 -4
  872. package/dist/hooks/use-slider.d.ts.map +1 -1
  873. package/dist/hooks/use-tap-gesture.d.ts +3 -4
  874. package/dist/hooks/use-tap-gesture.d.ts.map +1 -1
  875. package/dist/hooks/use-touch-capable.d.ts +1 -2
  876. package/dist/hooks/use-touch-capable.d.ts.map +1 -1
  877. package/dist/hooks/use-viewport.d.ts +1 -2
  878. package/dist/hooks/use-viewport.d.ts.map +1 -1
  879. package/dist/lib/ease.d.ts +10 -11
  880. package/dist/lib/ease.d.ts.map +1 -1
  881. package/dist/lib/favicon.d.ts +1 -2
  882. package/dist/lib/favicon.d.ts.map +1 -1
  883. package/dist/lib/text-shimmer.d.ts +3 -4
  884. package/dist/lib/text-shimmer.d.ts.map +1 -1
  885. package/dist/lib/tick-sound.d.ts +1 -2
  886. package/dist/lib/tick-sound.d.ts.map +1 -1
  887. package/dist/lib/touch.d.ts +6 -7
  888. package/dist/lib/touch.d.ts.map +1 -1
  889. package/package.json +6 -4
  890. package/dist/data-grid-i18n-52UUYPbr.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"cascader-footer.js","names":["React","PopoverPrimitive"],"sources":["../../../../src/components/reui/cascader/cascader-footer.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Popover as PopoverPrimitive } from \"@base-ui/react\";\nimport { useDirection } from \"@base-ui/react/direction-provider\";\nimport { ChevronRightIcon } from \"lucide-react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { useCascaderActions } from \"./cascader-context\";\nimport { CASCADER_ACTION_CLASS, CascaderGroup, CascaderLabel } from \"./cascader-item\";\nimport { CASCADER_LIST_PAD_CLASS, getCascaderFooterStops, isCascaderRtl } from \"./cascader-lib\";\nimport type { CascaderActionItem } from \"./cascader-types\";\n\n/**\n * The pinned footer, and the side-anchored flyout a footer row can open. These\n * are COMMANDS: nothing here joins the selection, the filter set or the\n * highlight. The flyout is a Base UI `Popover` rendered as a REACT CHILD of\n * `Combobox.Popup` with its OWN `Portal` and NO `container`: a nested portal\n * resolves to the parent portal node, so it is a DOM sibling of the combobox\n * popup (not clipped, not `aria-hidden`) but a React descendant, which is what\n * the outside-press and focus-out whitelists read. `Combobox` builds no\n * `FloatingTree`, so the flyout is not consulted first and one Escape would\n * dismiss both; hence `CascaderSubmenu` registering with the root to turn one\n * Escape into two. `Combobox.List` clicks its highlighted row on Enter, hence\n * the footer sitting outside `CascaderList`. And a `Positioner` throws without\n * its `Portal`, while `modal` stays `false` on the `Root` so the combobox\n * keeps its own dismissal behaviour.\n */\n\n/* -------------------------------------------------------------------------- */\n/* Footer */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Keys the option list acts on, swallowed at the footer boundary. Escape and\n * Tab are absent on purpose: Escape must reach the root, Tab must keep moving.\n */\nconst FOOTER_SWALLOWED_KEYS = new Set([\n \"Enter\",\n \" \",\n \"ArrowUp\",\n \"ArrowDown\",\n \"Home\",\n \"End\",\n \"PageUp\",\n \"PageDown\",\n]);\n\nexport type CascaderFooterProps = React.ComponentProps<\"div\">;\n\n/**\n * Actions pinned below the list, a SIBLING of `CascaderList`. Children win\n * over the root's `actions` prop; with neither it renders nothing.\n */\nfunction CascaderFooter({ className, children, onKeyDown, ...props }: CascaderFooterProps) {\n const { actions, labels } = useCascaderActions();\n const hasChildren = React.Children.count(children) > 0;\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(event);\n if (event.defaultPrevented) return;\n if (!FOOTER_SWALLOWED_KEYS.has(event.key)) return;\n event.stopPropagation();\n\n // The strip's own vertical movement, and the way back from the list's\n // hand-off: either end returns focus to the search field, from which\n // Base UI's empty highlight resumes the list. Down wraps to the FIELD,\n // not a command (traps the arrows) or a row (no imperative highlight).\n if (event.key !== \"ArrowDown\" && event.key !== \"ArrowUp\") return;\n const footer = event.currentTarget;\n const stops = getCascaderFooterStops(footer);\n const active = document.activeElement as HTMLElement | null;\n const index = active ? stops.indexOf(active) : -1;\n if (index === -1) return;\n event.preventDefault();\n const next = event.key === \"ArrowDown\" ? stops[index + 1] : stops[index - 1];\n if (next) {\n next.focus();\n return;\n }\n if (event.key === \"ArrowUp\" && index > 0) return;\n footer\n .closest<HTMLElement>('[data-slot=\"cascader-panel\"]')\n ?.querySelector<HTMLElement>('[data-slot=\"cascader-input\"]')\n ?.focus();\n },\n [onKeyDown],\n );\n\n if (!hasChildren && actions.length === 0) return null;\n\n return (\n <div\n data-slot=\"cascader-footer\"\n /* Named, not a bare div: without it a screen reader reaches the actions\n with nothing to say they are not more options. */\n role=\"group\"\n aria-label={labels.actionsLabel}\n onKeyDown={handleKeyDown}\n className={cn(\n \"flex shrink-0 flex-col gap-0.5 border-border/60 border-t\",\n /* The LIST's padding, not a flat `p-1`: with a padding of its own the\n two columns of text were 2px out in luma and sera and 4px out in\n lyra. It also gives a separator in here a number to cancel. */\n CASCADER_LIST_PAD_CLASS,\n \"p-(--cascader-list-pad,4px)\",\n className,\n )}\n {...props}\n >\n {hasChildren ? children : <CascaderFooterActions actions={actions} />}\n </div>\n );\n}\n\nfunction CascaderFooterActions({ actions }: { actions: CascaderActionItem[] }) {\n return (\n <>\n {actions.map((action, i) =>\n action.items?.length ? (\n <CascaderSubmenu key={actionKey(action, i)}>\n <CascaderSubmenuTrigger icon={action.icon} disabled={action.disabled}>\n {action.label}\n </CascaderSubmenuTrigger>\n <CascaderSubmenuContent>\n <CascaderActionList items={action.items} />\n </CascaderSubmenuContent>\n </CascaderSubmenu>\n ) : (\n <CascaderAction\n key={actionKey(action, i)}\n icon={action.icon}\n disabled={action.disabled}\n onSelect={action.onSelect}\n >\n {action.label}\n </CascaderAction>\n ),\n )}\n </>\n );\n}\n\nfunction actionKey(action: CascaderActionItem, index: number): string {\n if (action.value != null) return action.value;\n if (typeof action.label === \"string\") return action.label;\n return String(index);\n}\n\n/**\n * Consecutive entries sharing a `group`, as runs not buckets: two separated\n * runs with the same name stay two, so the author's order survives.\n */\nfunction groupActionRuns(\n items: CascaderActionItem[],\n): { group?: string; items: CascaderActionItem[] }[] {\n const runs: { group?: string; items: CascaderActionItem[] }[] = [];\n for (const item of items) {\n const last = runs[runs.length - 1];\n if (last && last.group === item.group) last.items.push(item);\n else runs.push({ group: item.group, items: [item] });\n }\n return runs;\n}\n\n/**\n * Flyout body for a data-driven submenu. A named run becomes a real\n * `CascaderGroup`; unnamed runs stay unwrapped, as an unnamed group is noise.\n */\nfunction CascaderActionList({ items }: { items: CascaderActionItem[] }) {\n const { close } = useCascaderSubmenu();\n const runs = React.useMemo(() => groupActionRuns(items), [items]);\n\n const renderAction = (item: CascaderActionItem, i: number) => (\n <CascaderAction\n key={actionKey(item, i)}\n icon={item.icon}\n disabled={item.disabled}\n onSelect={() => {\n item.onSelect?.();\n /* Closes behind the command, or the entries would read as toggles. */\n close();\n }}\n >\n {item.label}\n </CascaderAction>\n );\n\n return (\n <>\n {runs.map((run, runIndex) =>\n run.group ? (\n <CascaderGroup key={`${run.group}-${runIndex}`} className=\"gap-0.5\">\n <CascaderLabel>{run.group}</CascaderLabel>\n {run.items.map(renderAction)}\n </CascaderGroup>\n ) : (\n <React.Fragment key={`run-${runIndex}`}>{run.items.map(renderAction)}</React.Fragment>\n ),\n )}\n </>\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Action */\n/* -------------------------------------------------------------------------- */\n\nexport interface CascaderActionProps extends Omit<React.ComponentProps<\"button\">, \"onSelect\"> {\n icon?: React.ReactNode;\n /** Fires on press, after `onClick`, and not at all when disabled. */\n onSelect?: () => void;\n}\n\n/**\n * The cascader popup's panel per style, spelled with `style-<name>:` variants\n * rather than ReUI theme CSS so an installed footer needs only Tailwind.\n */\nconst FLYOUT_SURFACE_CLASS =\n \"bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 max-h-72 overflow-hidden ring-1 duration-100 ring-foreground/10 shadow-md rounded-lg\";\n\n/**\n * One footer command, shaped like a row and deliberately NOT one. A real\n * `<button>`, never a `Combobox.Item`: an item would join the arrow-key ring,\n * appear in `filteredItems`, and vanish the moment a query matched nothing -\n * exactly when \"Create new attribute\" is most useful. Disabled is\n * `aria-disabled`, never the native attribute: that one is not a tab stop and\n * the panel's Tab order reads `button:not([disabled])`, so a footer whose ONLY\n * row is a disabled command had no stop after the search field (measured on\n * `c-cascader-8`). Staying focusable costs the guards below, plus the\n * greyed-out look: `CASCADER_ACTION_CLASS` keys that off `aria-disabled`\n * instead of `:disabled`.\n */\nfunction CascaderAction({\n className,\n icon,\n children,\n onSelect,\n onClick,\n onKeyDown,\n disabled,\n ...props\n}: CascaderActionProps) {\n // Set by `CascaderSubmenuContent`: a plain button in the footer's Tab ring,\n // a roving-focus `menuitem` inside a flyout, never both.\n const inMenu = React.useContext(CascaderMenuContext);\n\n const handleClick = React.useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n // Before the consumer's handler: a disabled command runs none of them.\n if (disabled) {\n event.preventDefault();\n return;\n }\n onClick?.(event);\n if (event.defaultPrevented) return;\n onSelect?.();\n },\n [disabled, onClick, onSelect],\n );\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLButtonElement>) => {\n if (disabled) {\n // The two keys a `<button>` activates on, and only those.\n if (event.key === \"Enter\" || event.key === \" \") event.preventDefault();\n return;\n }\n onKeyDown?.(event);\n },\n [disabled, onKeyDown],\n );\n\n return (\n <button\n type=\"button\"\n data-slot=\"cascader-action\"\n /* Conditional spread: `false` would publish `aria-disabled=\"false\"`. */\n {...(disabled ? { \"aria-disabled\": true, \"data-disabled\": \"\" } : null)}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n /* Conditional spread, so a consumer's own `role` or `tabIndex` wins. */\n {...(inMenu ? { role: \"menuitem\" as const, tabIndex: -1 } : null)}\n className={cn(CASCADER_ACTION_CLASS, className)}\n {...props}\n >\n {icon ? (\n <span\n data-slot=\"cascader-action-icon\"\n className=\"flex shrink-0 items-center justify-center text-muted-foreground\"\n >\n {icon}\n </span>\n ) : null}\n <span className=\"min-w-0 flex-1 truncate text-start\">{children}</span>\n </button>\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Submenu */\n/* -------------------------------------------------------------------------- */\n\ninterface CascaderSubmenuContextValue {\n rowRef: React.RefObject<HTMLButtonElement | null>;\n open: boolean;\n setOpen: (open: boolean) => void;\n close: () => void;\n /** Names the flyout: a menu is labelled by the control that opens it. */\n triggerId: string;\n /**\n * Whether the pending open came from the KEYBOARD. Base UI's own `openType`\n * calls the opening arrow a POINTER open, because the trigger intercepts it\n * and calls `setOpen` (measured: focus landed on the popup, not the first\n * entry). A ref, so reading it in the focus phase cannot render.\n */\n keyboardRef: React.RefObject<boolean>;\n}\n\n/** Marks the subtree INSIDE a flyout. See `inMenu` in `CascaderAction`. */\nconst CascaderMenuContext = React.createContext(false);\n\n/**\n * Every entry a menu's roving focus may land on, in DOM order, read from the\n * DOM because the entries are whatever the consumer composed. A disabled\n * `CascaderAction` is INCLUDED: it carries `aria-disabled`, not the native\n * attribute, so `:not([disabled])` excludes only a consumer's own natively\n * disabled `menuitem`, which cannot take focus.\n */\nfunction menuItems(popup: HTMLElement | null): HTMLElement[] {\n if (!popup) return [];\n return Array.from(popup.querySelectorAll<HTMLElement>('[role=\"menuitem\"]:not([disabled])'));\n}\n\nconst CascaderSubmenuContext = React.createContext<CascaderSubmenuContextValue | undefined>(\n undefined,\n);\n\n/** The flyout's own state. `close()` is the one a custom entry usually wants. */\nexport function useCascaderSubmenu(): CascaderSubmenuContextValue {\n const context = React.useContext(CascaderSubmenuContext);\n if (!context) {\n throw new Error(\"useCascaderSubmenu must be used within a CascaderSubmenu\");\n }\n return context;\n}\n\nexport interface CascaderSubmenuProps {\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n children?: React.ReactNode;\n}\n\n/**\n * A footer row plus the flyout it opens. Registers with the cascader root\n * while open, which turns one Escape into two. Cleared in an EFFECT, so the\n * flyout still reads as open during the event that closed it.\n */\nfunction CascaderSubmenu({\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n children,\n}: CascaderSubmenuProps) {\n const { setFlyoutOpen } = useCascaderActions();\n const key = React.useId();\n const triggerId = React.useId();\n const rowRef = React.useRef<HTMLButtonElement | null>(null);\n const keyboardRef = React.useRef(false);\n const [uncontrolled, setUncontrolled] = React.useState(defaultOpen);\n const open = openProp ?? uncontrolled;\n\n const setOpen = React.useCallback(\n (next: boolean) => {\n if (openProp == null) setUncontrolled(next);\n onOpenChange?.(next);\n },\n [openProp, onOpenChange],\n );\n\n const close = React.useCallback(() => setOpen(false), [setOpen]);\n\n React.useEffect(() => {\n setFlyoutOpen(key, open);\n return () => setFlyoutOpen(key, false);\n }, [setFlyoutOpen, key, open]);\n\n const context = React.useMemo<CascaderSubmenuContextValue>(\n () => ({ rowRef, open, setOpen, close, triggerId, keyboardRef }),\n [open, setOpen, close, triggerId],\n );\n\n return (\n <CascaderSubmenuContext.Provider value={context}>\n <PopoverPrimitive.Root\n open={open}\n onOpenChange={setOpen}\n /* NEVER modal: it would disable the combobox that owns it. */\n modal={false}\n >\n {children}\n </PopoverPrimitive.Root>\n </CascaderSubmenuContext.Provider>\n );\n}\n\nexport interface CascaderSubmenuTriggerProps\n extends Omit<React.ComponentProps<\"button\">, \"onSelect\"> {\n icon?: React.ReactNode;\n}\n\n/** Carries the handler-veto hook, derived so a Base UI bump cannot drift. */\ntype CascaderSubmenuTriggerClickEvent = Parameters<\n NonNullable<PopoverPrimitive.Trigger.Props[\"onClick\"]>\n>[0];\n\n/**\n * The footer row that opens the flyout, and its anchor. `aria-haspopup=\"menu\"`\n * rather than the `dialog` Base UI would announce: what opens is a list of\n * commands with roving focus. `disabled` is intercepted, not forwarded:\n * `Popover.Trigger` runs it through `useButton`, which writes the NATIVE\n * attribute for a native `<button>` and takes the row out of the panel's Tab\n * ring, the defect `CascaderAction` documents, and this component exposes no\n * `focusableWhenDisabled` to opt out. Published as `aria-disabled`, with the\n * arrow keys, Enter and Space, and the click closed by hand (`useClick`\n * ignores `defaultPrevented`).\n */\nfunction CascaderSubmenuTrigger({\n className,\n icon,\n children,\n onKeyDown,\n onClick,\n disabled,\n ...props\n}: CascaderSubmenuTriggerProps) {\n const { labels } = useCascaderActions();\n const { rowRef, setOpen, triggerId, keyboardRef } = useCascaderSubmenu();\n const direction = useDirection();\n\n const handleClick = React.useCallback(\n (event: CascaderSubmenuTriggerClickEvent) => {\n if (disabled) {\n // `mergeProps` runs right to left, so this drops Base UI's own handler.\n event.preventDefault();\n event.preventBaseUIHandler();\n return;\n }\n onClick?.(event);\n },\n [disabled, onClick],\n );\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLButtonElement>) => {\n if (disabled) {\n if (event.key === \"Enter\" || event.key === \" \") event.preventDefault();\n return;\n }\n\n onKeyDown?.(event);\n if (event.defaultPrevented) return;\n\n // The opening key points AT the flyout, so it flips with the writing\n // direction; ArrowDown stays \"next command\". Resolved per keydown, never\n // `useDirection()` alone: with no provider that answers \"ltr\" in RTL.\n const openKey = isCascaderRtl(event.currentTarget, direction) ? \"ArrowLeft\" : \"ArrowRight\";\n\n // Enter and Space open through the button's own click, so only FLAGGED.\n if (event.key === \"Enter\" || event.key === \" \") {\n keyboardRef.current = true;\n return;\n }\n\n if (event.key !== openKey) return;\n\n event.preventDefault();\n keyboardRef.current = true;\n setOpen(true);\n },\n [disabled, onKeyDown, direction, setOpen, keyboardRef],\n );\n\n return (\n <PopoverPrimitive.Trigger\n ref={rowRef}\n id={triggerId}\n data-slot=\"cascader-submenu-trigger\"\n aria-haspopup=\"menu\"\n /* NOT `disabled={disabled}`: Base UI writes the native attribute. */\n {...(disabled ? { \"aria-disabled\": true, \"data-disabled\": \"\" } : null)}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n className={cn(\n CASCADER_ACTION_CLASS,\n /* Painted while the flyout is open, as shadcn paints a SubTrigger.\n Keyed off `aria-expanded`, not shadcn's `data-[state=open]`: the\n popover trigger carries `aria-expanded` in both states. */\n \"aria-expanded:bg-accent aria-expanded:text-accent-foreground\",\n className,\n )}\n {...props}\n >\n {icon ? (\n <span\n data-slot=\"cascader-action-icon\"\n className=\"flex shrink-0 items-center justify-center text-muted-foreground\"\n >\n {icon}\n </span>\n ) : null}\n <span className=\"min-w-0 flex-1 truncate text-start\">{children}</span>\n {/* Nothing else says the row opens a MENU, not another tree level. */}\n <span className=\"sr-only\">, {labels.submenuAffordance}</span>\n <ChevronRightIcon\n aria-hidden=\"true\"\n className=\"-me-0.5 size-4 shrink-0 text-muted-foreground rtl:-scale-x-100\"\n />\n </PopoverPrimitive.Trigger>\n );\n}\n\nexport interface CascaderSubmenuContentProps\n extends PopoverPrimitive.Popup.Props,\n Pick<PopoverPrimitive.Positioner.Props, \"side\" | \"align\" | \"sideOffset\" | \"alignOffset\"> {}\n\n/** Carries Base UI's handler-veto hook, so a plain React event will not do. */\ntype CascaderSubmenuKeyEvent = Parameters<\n NonNullable<PopoverPrimitive.Popup.Props[\"onKeyDown\"]>\n>[0];\n\n/**\n * The flyout itself. `Portal` with NO `container`: a nested portal resolves to\n * the parent portal node, the mechanism the file header describes.\n */\nfunction CascaderSubmenuContent({\n className,\n children,\n onKeyDown,\n side = \"inline-end\",\n align = \"end\",\n sideOffset = 8,\n alignOffset = 0,\n ...props\n}: CascaderSubmenuContentProps) {\n const { rowRef, close, triggerId, keyboardRef } = useCascaderSubmenu();\n const direction = useDirection();\n const popupRef = React.useRef<HTMLDivElement | null>(null);\n const typeaheadRef = React.useRef({ buffer: \"\", at: 0 });\n\n /**\n * Keyboard opens land on the first entry; a pointer open falls through to\n * Base UI's default, the popup, so a click paints no focus ring. Not an\n * effect of our own: Base UI's focus manager runs on open and wins the race.\n */\n const initialFocus = React.useCallback(() => {\n const byKeyboard = keyboardRef.current;\n keyboardRef.current = false;\n if (!byKeyboard) return true;\n return menuItems(popupRef.current)[0] ?? true;\n }, [keyboardRef]);\n\n const closeAndReturn = React.useCallback(() => {\n close();\n rowRef.current?.focus();\n }, [close, rowRef]);\n\n const handleKeyDown = React.useCallback(\n (event: CascaderSubmenuKeyEvent) => {\n onKeyDown?.(event);\n // A DOM sibling of the combobox popup but a REACT descendant, so keys in\n // here reach its handlers unless stopped. Enter would commit a row.\n event.stopPropagation();\n if (event.defaultPrevented) return;\n\n const popup = popupRef.current;\n const items = menuItems(popup);\n if (items.length === 0) return;\n\n const active = document.activeElement as HTMLElement | null;\n const index = active ? items.indexOf(active) : -1;\n const move = (next: number) => {\n event.preventDefault();\n items[(next + items.length) % items.length]?.focus();\n };\n\n // Mirrors the open key on the SAME per-keydown answer as the trigger.\n const closeKey = isCascaderRtl(event.currentTarget, direction) ? \"ArrowRight\" : \"ArrowLeft\";\n\n switch (event.key) {\n case \"ArrowDown\":\n return move(index + 1);\n case \"ArrowUp\":\n // From the popup itself (a pointer open) Up means the LAST entry.\n return move(index === -1 ? items.length - 1 : index - 1);\n case \"Home\":\n return move(0);\n case \"End\":\n return move(items.length - 1);\n case closeKey:\n event.preventDefault();\n return closeAndReturn();\n case \"Tab\":\n // A menu never holds Tab: it closes and focus carries on from its row.\n close();\n rowRef.current?.focus();\n return;\n default:\n break;\n }\n\n // Typeahead, after the switch so it can never swallow a navigation key.\n if (event.key.length !== 1 || event.metaKey || event.ctrlKey || event.altKey) return;\n const now = event.timeStamp;\n const state = typeaheadRef.current;\n state.buffer = now - state.at > 500 ? event.key : state.buffer + event.key;\n state.at = now;\n const prefix = state.buffer.toLowerCase();\n const from = index === -1 ? 0 : index;\n // Starts AFTER the current entry so one letter cycles rather than sticks.\n const ordered = [\n ...items.slice(state.buffer.length > 1 ? from : from + 1),\n ...items.slice(0, state.buffer.length > 1 ? from : from + 1),\n ];\n const hit = ordered.find((item) =>\n (item.textContent ?? \"\").trim().toLowerCase().startsWith(prefix),\n );\n if (hit) {\n event.preventDefault();\n hit.focus();\n }\n },\n [onKeyDown, direction, close, closeAndReturn, rowRef],\n );\n\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Positioner\n /* The ROW, not whatever Base UI last treated as the trigger. */\n anchor={rowRef}\n side={side}\n align={align}\n sideOffset={sideOffset}\n alignOffset={alignOffset}\n className=\"isolate z-50\"\n >\n <PopoverPrimitive.Popup\n ref={popupRef}\n initialFocus={initialFocus}\n data-slot=\"cascader-submenu-content\"\n /* Roving focus, named by the row that opens it. `tabIndex={-1}` lets\n a pointer open park focus here without adding a Tab stop. */\n role=\"menu\"\n aria-orientation=\"vertical\"\n aria-labelledby={triggerId}\n tabIndex={-1}\n onKeyDown={handleKeyDown}\n /* Marks a menu surface for the docs design-system picker, which\n repaints menus by walking the DOM. An attribute, not a class. */\n data-menu-target=\"\"\n className={cn(\n FLYOUT_SURFACE_CLASS,\n \"flex min-w-48 max-w-(--available-width) flex-col gap-0.5 outline-hidden\",\n CASCADER_LIST_PAD_CLASS,\n \"p-(--cascader-list-pad,4px)\",\n className,\n )}\n {...props}\n >\n <CascaderMenuContext.Provider value={true}>{children}</CascaderMenuContext.Provider>\n </PopoverPrimitive.Popup>\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n );\n}\n\n/**\n * Whether the footer would render anything, for a wrapper (a separator, a grid\n * row) that has to make the same call `CascaderFooter` already makes.\n */\nexport function useCascaderHasActions(): boolean {\n const { actions } = useCascaderActions();\n return actions.length > 0;\n}\n\nexport {\n CascaderAction,\n CascaderFooter,\n CascaderSubmenu,\n CascaderSubmenuContent,\n CascaderSubmenuTrigger,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,MAAM,wCAAwB,IAAI,IAAI;CACpC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;;;;AAQD,SAAS,eAAe,EAAE,WAAW,UAAU,WAAW,GAAG,SAA8B;CACzF,MAAM,EAAE,SAAS,WAAW,mBAAmB;CAC/C,MAAM,cAAcA,QAAM,SAAS,MAAM,QAAQ,IAAI;CAErD,MAAM,gBAAgBA,QAAM,aACzB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,MAAM,MAAM;EAClB,MAAM,QAAQ,aAAa;EAC3B,MAAM,SAAS,MAAM,MAAM,KAAK,MAAM,MAAM,MAAM,MAAM,SAAS,MAAM;EACvE,MAAM,KAAK;EACX,MAAM,SAAS,MAAM,OAAO,YAAY;EACxC,MAAM,OAAO,UAAU,KAAK,IAAI;EAMhC,MAAM,MAAM,CAHV,GAAG,MAAM,MAAM,MAAM,OAAO,SAAS,IAAI,OAAO,OAAO,CAAC,GACxD,GAAG,MAAM,MAAM,GAAG,MAAM,OAAO,SAAS,IAAI,OAAO,OAAO,CAAC,CAE3C,CAAC,CAAC,MAAM,UACvB,KAAK,eAAe,GAAA,CAAI,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,WAAW,MAAM,CACjE;EACA,IAAI,KAAK;GACP,MAAM,eAAe;GACrB,IAAI,MAAM;EACZ;CACF,GACA;EAAC;EAAW;EAAW;EAAO;EAAgB;CAAM,CACtD;CAEA,OACE,oBAACC,QAAiB,QAAlB,EAAA,UACE,oBAACA,QAAiB,YAAlB;EAEE,QAAQ;EACF;EACC;EACK;EACC;EACb,WAAU;EAEV,UAAA,oBAACA,QAAiB,OAAlB;GACE,KAAK;GACS;GACd,aAAU;GAGV,MAAK;GACL,oBAAiB;GACjB,mBAAiB;GACjB,UAAU;GACV,WAAW;GAGX,oBAAiB;GACjB,WAAW,GACT,sBACA,2EACA,yBACA,+BACA,SACF;GACA,GAAI;GAEJ,UAAA,oBAAC,oBAAoB,UAArB;IAA8B,OAAO;IAAO;GAAuC,CAAA;EAC7D,CAAA;CACG,CAAA,EACN,CAAA;AAE7B;;;;;AAMA,SAAgB,wBAAiC;CAC/C,MAAM,EAAE,YAAY,mBAAmB;CACvC,OAAO,QAAQ,SAAS;AAC1B"}
1
+ {"version":3,"file":"cascader-footer.js","names":["React","PopoverPrimitive"],"sources":["../../../../src/components/reui/cascader/cascader-footer.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Popover as PopoverPrimitive } from \"@base-ui/react\";\nimport { useDirection } from \"@base-ui/react/direction-provider\";\nimport { cn } from \"cn\";\nimport { ChevronRightIcon } from \"lucide-react\";\n\nimport { useCascaderActions } from \"./cascader-context\";\nimport { CASCADER_ACTION_CLASS, CascaderGroup, CascaderLabel } from \"./cascader-item\";\nimport { CASCADER_LIST_PAD_CLASS, getCascaderFooterStops, isCascaderRtl } from \"./cascader-lib\";\nimport type { CascaderActionItem } from \"./cascader-types\";\n\n/**\n * The pinned footer, and the side-anchored flyout a footer row can open. These\n * are COMMANDS: nothing here joins the selection, the filter set or the\n * highlight. The flyout is a Base UI `Popover` rendered as a REACT CHILD of\n * `Combobox.Popup` with its OWN `Portal` and NO `container`: a nested portal\n * resolves to the parent portal node, so it is a DOM sibling of the combobox\n * popup (not clipped, not `aria-hidden`) but a React descendant, which is what\n * the outside-press and focus-out whitelists read. `Combobox` builds no\n * `FloatingTree`, so the flyout is not consulted first and one Escape would\n * dismiss both; hence `CascaderSubmenu` registering with the root to turn one\n * Escape into two. `Combobox.List` clicks its highlighted row on Enter, hence\n * the footer sitting outside `CascaderList`. And a `Positioner` throws without\n * its `Portal`, while `modal` stays `false` on the `Root` so the combobox\n * keeps its own dismissal behaviour.\n */\n\n/* -------------------------------------------------------------------------- */\n/* Footer */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Keys the option list acts on, swallowed at the footer boundary. Escape and\n * Tab are absent on purpose: Escape must reach the root, Tab must keep moving.\n */\nconst FOOTER_SWALLOWED_KEYS = new Set([\n \"Enter\",\n \" \",\n \"ArrowUp\",\n \"ArrowDown\",\n \"Home\",\n \"End\",\n \"PageUp\",\n \"PageDown\",\n]);\n\nexport type CascaderFooterProps = React.ComponentProps<\"div\">;\n\n/**\n * Actions pinned below the list, a SIBLING of `CascaderList`. Children win\n * over the root's `actions` prop; with neither it renders nothing.\n */\nfunction CascaderFooter({ className, children, onKeyDown, ...props }: CascaderFooterProps) {\n const { actions, labels } = useCascaderActions();\n const hasChildren = React.Children.count(children) > 0;\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(event);\n if (event.defaultPrevented) return;\n if (!FOOTER_SWALLOWED_KEYS.has(event.key)) return;\n event.stopPropagation();\n\n // The strip's own vertical movement, and the way back from the list's\n // hand-off: either end returns focus to the search field, from which\n // Base UI's empty highlight resumes the list. Down wraps to the FIELD,\n // not a command (traps the arrows) or a row (no imperative highlight).\n if (event.key !== \"ArrowDown\" && event.key !== \"ArrowUp\") return;\n const footer = event.currentTarget;\n const stops = getCascaderFooterStops(footer);\n const active = document.activeElement as HTMLElement | null;\n const index = active ? stops.indexOf(active) : -1;\n if (index === -1) return;\n event.preventDefault();\n const next = event.key === \"ArrowDown\" ? stops[index + 1] : stops[index - 1];\n if (next) {\n next.focus();\n return;\n }\n if (event.key === \"ArrowUp\" && index > 0) return;\n footer\n .closest<HTMLElement>('[data-slot=\"cascader-panel\"]')\n ?.querySelector<HTMLElement>('[data-slot=\"cascader-input\"]')\n ?.focus();\n },\n [onKeyDown],\n );\n\n if (!hasChildren && actions.length === 0) return null;\n\n return (\n <div\n data-slot=\"cascader-footer\"\n /* Named, not a bare div: without it a screen reader reaches the actions\n with nothing to say they are not more options. */\n role=\"group\"\n aria-label={labels.actionsLabel}\n onKeyDown={handleKeyDown}\n className={cn(\n \"flex shrink-0 flex-col gap-0.5 border-border/60 border-t\",\n /* The LIST's padding, not a flat `p-1`: with a padding of its own the\n two columns of text were 2px out in luma and sera and 4px out in\n lyra. It also gives a separator in here a number to cancel. */\n CASCADER_LIST_PAD_CLASS,\n \"p-(--cascader-list-pad,4px)\",\n className,\n )}\n {...props}\n >\n {hasChildren ? children : <CascaderFooterActions actions={actions} />}\n </div>\n );\n}\n\nfunction CascaderFooterActions({ actions }: { actions: CascaderActionItem[] }) {\n return (\n <>\n {actions.map((action, i) =>\n action.items?.length ? (\n <CascaderSubmenu key={actionKey(action, i)}>\n <CascaderSubmenuTrigger icon={action.icon} disabled={action.disabled}>\n {action.label}\n </CascaderSubmenuTrigger>\n <CascaderSubmenuContent>\n <CascaderActionList items={action.items} />\n </CascaderSubmenuContent>\n </CascaderSubmenu>\n ) : (\n <CascaderAction\n key={actionKey(action, i)}\n icon={action.icon}\n disabled={action.disabled}\n onSelect={action.onSelect}\n >\n {action.label}\n </CascaderAction>\n ),\n )}\n </>\n );\n}\n\nfunction actionKey(action: CascaderActionItem, index: number): string {\n if (action.value != null) return action.value;\n if (typeof action.label === \"string\") return action.label;\n return String(index);\n}\n\n/**\n * Consecutive entries sharing a `group`, as runs not buckets: two separated\n * runs with the same name stay two, so the author's order survives.\n */\nfunction groupActionRuns(\n items: CascaderActionItem[],\n): { group?: string; items: CascaderActionItem[] }[] {\n const runs: { group?: string; items: CascaderActionItem[] }[] = [];\n for (const item of items) {\n const last = runs[runs.length - 1];\n if (last && last.group === item.group) last.items.push(item);\n else runs.push({ group: item.group, items: [item] });\n }\n return runs;\n}\n\n/**\n * Flyout body for a data-driven submenu. A named run becomes a real\n * `CascaderGroup`; unnamed runs stay unwrapped, as an unnamed group is noise.\n */\nfunction CascaderActionList({ items }: { items: CascaderActionItem[] }) {\n const { close } = useCascaderSubmenu();\n const runs = React.useMemo(() => groupActionRuns(items), [items]);\n\n const renderAction = (item: CascaderActionItem, i: number) => (\n <CascaderAction\n key={actionKey(item, i)}\n icon={item.icon}\n disabled={item.disabled}\n onSelect={() => {\n item.onSelect?.();\n /* Closes behind the command, or the entries would read as toggles. */\n close();\n }}\n >\n {item.label}\n </CascaderAction>\n );\n\n return (\n <>\n {runs.map((run, runIndex) =>\n run.group ? (\n <CascaderGroup key={`${run.group}-${runIndex}`} className=\"gap-0.5\">\n <CascaderLabel>{run.group}</CascaderLabel>\n {run.items.map(renderAction)}\n </CascaderGroup>\n ) : (\n <React.Fragment key={`run-${runIndex}`}>{run.items.map(renderAction)}</React.Fragment>\n ),\n )}\n </>\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Action */\n/* -------------------------------------------------------------------------- */\n\nexport interface CascaderActionProps extends Omit<React.ComponentProps<\"button\">, \"onSelect\"> {\n icon?: React.ReactNode;\n /** Fires on press, after `onClick`, and not at all when disabled. */\n onSelect?: () => void;\n}\n\n/**\n * The cascader popup's panel per style, spelled with `style-<name>:` variants\n * rather than ReUI theme CSS so an installed footer needs only Tailwind.\n */\nconst FLYOUT_SURFACE_CLASS =\n \"bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 max-h-72 overflow-hidden ring-1 duration-100 ring-foreground/10 shadow-md rounded-lg\";\n\n/**\n * One footer command, shaped like a row and deliberately NOT one. A real\n * `<button>`, never a `Combobox.Item`: an item would join the arrow-key ring,\n * appear in `filteredItems`, and vanish the moment a query matched nothing -\n * exactly when \"Create new attribute\" is most useful. Disabled is\n * `aria-disabled`, never the native attribute: that one is not a tab stop and\n * the panel's Tab order reads `button:not([disabled])`, so a footer whose ONLY\n * row is a disabled command had no stop after the search field (measured on\n * `c-cascader-8`). Staying focusable costs the guards below, plus the\n * greyed-out look: `CASCADER_ACTION_CLASS` keys that off `aria-disabled`\n * instead of `:disabled`.\n */\nfunction CascaderAction({\n className,\n icon,\n children,\n onSelect,\n onClick,\n onKeyDown,\n disabled,\n ...props\n}: CascaderActionProps) {\n // Set by `CascaderSubmenuContent`: a plain button in the footer's Tab ring,\n // a roving-focus `menuitem` inside a flyout, never both.\n const inMenu = React.useContext(CascaderMenuContext);\n\n const handleClick = React.useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n // Before the consumer's handler: a disabled command runs none of them.\n if (disabled) {\n event.preventDefault();\n return;\n }\n onClick?.(event);\n if (event.defaultPrevented) return;\n onSelect?.();\n },\n [disabled, onClick, onSelect],\n );\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLButtonElement>) => {\n if (disabled) {\n // The two keys a `<button>` activates on, and only those.\n if (event.key === \"Enter\" || event.key === \" \") event.preventDefault();\n return;\n }\n onKeyDown?.(event);\n },\n [disabled, onKeyDown],\n );\n\n return (\n <button\n type=\"button\"\n data-slot=\"cascader-action\"\n /* Conditional spread: `false` would publish `aria-disabled=\"false\"`. */\n {...(disabled ? { \"aria-disabled\": true, \"data-disabled\": \"\" } : null)}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n /* Conditional spread, so a consumer's own `role` or `tabIndex` wins. */\n {...(inMenu ? { role: \"menuitem\" as const, tabIndex: -1 } : null)}\n className={cn(CASCADER_ACTION_CLASS, className)}\n {...props}\n >\n {icon ? (\n <span\n data-slot=\"cascader-action-icon\"\n className=\"flex shrink-0 items-center justify-center text-muted-foreground\"\n >\n {icon}\n </span>\n ) : null}\n <span className=\"min-w-0 flex-1 truncate text-start\">{children}</span>\n </button>\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Submenu */\n/* -------------------------------------------------------------------------- */\n\ninterface CascaderSubmenuContextValue {\n rowRef: React.RefObject<HTMLButtonElement | null>;\n open: boolean;\n setOpen: (open: boolean) => void;\n close: () => void;\n /** Names the flyout: a menu is labelled by the control that opens it. */\n triggerId: string;\n /**\n * Whether the pending open came from the KEYBOARD. Base UI's own `openType`\n * calls the opening arrow a POINTER open, because the trigger intercepts it\n * and calls `setOpen` (measured: focus landed on the popup, not the first\n * entry). A ref, so reading it in the focus phase cannot render.\n */\n keyboardRef: React.RefObject<boolean>;\n}\n\n/** Marks the subtree INSIDE a flyout. See `inMenu` in `CascaderAction`. */\nconst CascaderMenuContext = React.createContext(false);\n\n/**\n * Every entry a menu's roving focus may land on, in DOM order, read from the\n * DOM because the entries are whatever the consumer composed. A disabled\n * `CascaderAction` is INCLUDED: it carries `aria-disabled`, not the native\n * attribute, so `:not([disabled])` excludes only a consumer's own natively\n * disabled `menuitem`, which cannot take focus.\n */\nfunction menuItems(popup: HTMLElement | null): HTMLElement[] {\n if (!popup) return [];\n return Array.from(popup.querySelectorAll<HTMLElement>('[role=\"menuitem\"]:not([disabled])'));\n}\n\nconst CascaderSubmenuContext = React.createContext<CascaderSubmenuContextValue | undefined>(\n undefined,\n);\n\n/** The flyout's own state. `close()` is the one a custom entry usually wants. */\nexport function useCascaderSubmenu(): CascaderSubmenuContextValue {\n const context = React.useContext(CascaderSubmenuContext);\n if (!context) {\n throw new Error(\"useCascaderSubmenu must be used within a CascaderSubmenu\");\n }\n return context;\n}\n\nexport interface CascaderSubmenuProps {\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n children?: React.ReactNode;\n}\n\n/**\n * A footer row plus the flyout it opens. Registers with the cascader root\n * while open, which turns one Escape into two. Cleared in an EFFECT, so the\n * flyout still reads as open during the event that closed it.\n */\nfunction CascaderSubmenu({\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n children,\n}: CascaderSubmenuProps) {\n const { setFlyoutOpen } = useCascaderActions();\n const key = React.useId();\n const triggerId = React.useId();\n const rowRef = React.useRef<HTMLButtonElement | null>(null);\n const keyboardRef = React.useRef(false);\n const [uncontrolled, setUncontrolled] = React.useState(defaultOpen);\n const open = openProp ?? uncontrolled;\n\n const setOpen = React.useCallback(\n (next: boolean) => {\n if (openProp == null) setUncontrolled(next);\n onOpenChange?.(next);\n },\n [openProp, onOpenChange],\n );\n\n const close = React.useCallback(() => setOpen(false), [setOpen]);\n\n React.useEffect(() => {\n setFlyoutOpen(key, open);\n return () => setFlyoutOpen(key, false);\n }, [setFlyoutOpen, key, open]);\n\n const context = React.useMemo<CascaderSubmenuContextValue>(\n () => ({ rowRef, open, setOpen, close, triggerId, keyboardRef }),\n [open, setOpen, close, triggerId],\n );\n\n return (\n <CascaderSubmenuContext.Provider value={context}>\n <PopoverPrimitive.Root\n open={open}\n onOpenChange={setOpen}\n /* NEVER modal: it would disable the combobox that owns it. */\n modal={false}\n >\n {children}\n </PopoverPrimitive.Root>\n </CascaderSubmenuContext.Provider>\n );\n}\n\nexport interface CascaderSubmenuTriggerProps\n extends Omit<React.ComponentProps<\"button\">, \"onSelect\"> {\n icon?: React.ReactNode;\n}\n\n/** Carries the handler-veto hook, derived so a Base UI bump cannot drift. */\ntype CascaderSubmenuTriggerClickEvent = Parameters<\n NonNullable<PopoverPrimitive.Trigger.Props[\"onClick\"]>\n>[0];\n\n/**\n * The footer row that opens the flyout, and its anchor. `aria-haspopup=\"menu\"`\n * rather than the `dialog` Base UI would announce: what opens is a list of\n * commands with roving focus. `disabled` is intercepted, not forwarded:\n * `Popover.Trigger` runs it through `useButton`, which writes the NATIVE\n * attribute for a native `<button>` and takes the row out of the panel's Tab\n * ring, the defect `CascaderAction` documents, and this component exposes no\n * `focusableWhenDisabled` to opt out. Published as `aria-disabled`, with the\n * arrow keys, Enter and Space, and the click closed by hand (`useClick`\n * ignores `defaultPrevented`).\n */\nfunction CascaderSubmenuTrigger({\n className,\n icon,\n children,\n onKeyDown,\n onClick,\n disabled,\n ...props\n}: CascaderSubmenuTriggerProps) {\n const { labels } = useCascaderActions();\n const { rowRef, setOpen, triggerId, keyboardRef } = useCascaderSubmenu();\n const direction = useDirection();\n\n const handleClick = React.useCallback(\n (event: CascaderSubmenuTriggerClickEvent) => {\n if (disabled) {\n // `mergeProps` runs right to left, so this drops Base UI's own handler.\n event.preventDefault();\n event.preventBaseUIHandler();\n return;\n }\n onClick?.(event);\n },\n [disabled, onClick],\n );\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLButtonElement>) => {\n if (disabled) {\n if (event.key === \"Enter\" || event.key === \" \") event.preventDefault();\n return;\n }\n\n onKeyDown?.(event);\n if (event.defaultPrevented) return;\n\n // The opening key points AT the flyout, so it flips with the writing\n // direction; ArrowDown stays \"next command\". Resolved per keydown, never\n // `useDirection()` alone: with no provider that answers \"ltr\" in RTL.\n const openKey = isCascaderRtl(event.currentTarget, direction) ? \"ArrowLeft\" : \"ArrowRight\";\n\n // Enter and Space open through the button's own click, so only FLAGGED.\n if (event.key === \"Enter\" || event.key === \" \") {\n keyboardRef.current = true;\n return;\n }\n\n if (event.key !== openKey) return;\n\n event.preventDefault();\n keyboardRef.current = true;\n setOpen(true);\n },\n [disabled, onKeyDown, direction, setOpen, keyboardRef],\n );\n\n return (\n <PopoverPrimitive.Trigger\n ref={rowRef}\n id={triggerId}\n data-slot=\"cascader-submenu-trigger\"\n aria-haspopup=\"menu\"\n /* NOT `disabled={disabled}`: Base UI writes the native attribute. */\n {...(disabled ? { \"aria-disabled\": true, \"data-disabled\": \"\" } : null)}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n className={cn(\n CASCADER_ACTION_CLASS,\n /* Painted while the flyout is open, as shadcn paints a SubTrigger.\n Keyed off `aria-expanded`, not shadcn's `data-[state=open]`: the\n popover trigger carries `aria-expanded` in both states. */\n \"aria-expanded:bg-accent aria-expanded:text-accent-foreground\",\n className,\n )}\n {...props}\n >\n {icon ? (\n <span\n data-slot=\"cascader-action-icon\"\n className=\"flex shrink-0 items-center justify-center text-muted-foreground\"\n >\n {icon}\n </span>\n ) : null}\n <span className=\"min-w-0 flex-1 truncate text-start\">{children}</span>\n {/* Nothing else says the row opens a MENU, not another tree level. */}\n <span className=\"sr-only\">, {labels.submenuAffordance}</span>\n <ChevronRightIcon\n aria-hidden=\"true\"\n className=\"-me-0.5 size-4 shrink-0 text-muted-foreground rtl:-scale-x-100\"\n />\n </PopoverPrimitive.Trigger>\n );\n}\n\nexport interface CascaderSubmenuContentProps\n extends PopoverPrimitive.Popup.Props,\n Pick<PopoverPrimitive.Positioner.Props, \"side\" | \"align\" | \"sideOffset\" | \"alignOffset\"> {}\n\n/** Carries Base UI's handler-veto hook, so a plain React event will not do. */\ntype CascaderSubmenuKeyEvent = Parameters<\n NonNullable<PopoverPrimitive.Popup.Props[\"onKeyDown\"]>\n>[0];\n\n/**\n * The flyout itself. `Portal` with NO `container`: a nested portal resolves to\n * the parent portal node, the mechanism the file header describes.\n */\nfunction CascaderSubmenuContent({\n className,\n children,\n onKeyDown,\n side = \"inline-end\",\n align = \"end\",\n sideOffset = 8,\n alignOffset = 0,\n ...props\n}: CascaderSubmenuContentProps) {\n const { rowRef, close, triggerId, keyboardRef } = useCascaderSubmenu();\n const direction = useDirection();\n const popupRef = React.useRef<HTMLDivElement | null>(null);\n const typeaheadRef = React.useRef({ buffer: \"\", at: 0 });\n\n /**\n * Keyboard opens land on the first entry; a pointer open falls through to\n * Base UI's default, the popup, so a click paints no focus ring. Not an\n * effect of our own: Base UI's focus manager runs on open and wins the race.\n */\n const initialFocus = React.useCallback(() => {\n const byKeyboard = keyboardRef.current;\n keyboardRef.current = false;\n if (!byKeyboard) return true;\n return menuItems(popupRef.current)[0] ?? true;\n }, [keyboardRef]);\n\n const closeAndReturn = React.useCallback(() => {\n close();\n rowRef.current?.focus();\n }, [close, rowRef]);\n\n const handleKeyDown = React.useCallback(\n (event: CascaderSubmenuKeyEvent) => {\n onKeyDown?.(event);\n // A DOM sibling of the combobox popup but a REACT descendant, so keys in\n // here reach its handlers unless stopped. Enter would commit a row.\n event.stopPropagation();\n if (event.defaultPrevented) return;\n\n const popup = popupRef.current;\n const items = menuItems(popup);\n if (items.length === 0) return;\n\n const active = document.activeElement as HTMLElement | null;\n const index = active ? items.indexOf(active) : -1;\n const move = (next: number) => {\n event.preventDefault();\n items[(next + items.length) % items.length]?.focus();\n };\n\n // Mirrors the open key on the SAME per-keydown answer as the trigger.\n const closeKey = isCascaderRtl(event.currentTarget, direction) ? \"ArrowRight\" : \"ArrowLeft\";\n\n switch (event.key) {\n case \"ArrowDown\":\n return move(index + 1);\n case \"ArrowUp\":\n // From the popup itself (a pointer open) Up means the LAST entry.\n return move(index === -1 ? items.length - 1 : index - 1);\n case \"Home\":\n return move(0);\n case \"End\":\n return move(items.length - 1);\n case closeKey:\n event.preventDefault();\n return closeAndReturn();\n case \"Tab\":\n // A menu never holds Tab: it closes and focus carries on from its row.\n close();\n rowRef.current?.focus();\n return;\n default:\n break;\n }\n\n // Typeahead, after the switch so it can never swallow a navigation key.\n if (event.key.length !== 1 || event.metaKey || event.ctrlKey || event.altKey) return;\n const now = event.timeStamp;\n const state = typeaheadRef.current;\n state.buffer = now - state.at > 500 ? event.key : state.buffer + event.key;\n state.at = now;\n const prefix = state.buffer.toLowerCase();\n const from = index === -1 ? 0 : index;\n // Starts AFTER the current entry so one letter cycles rather than sticks.\n const ordered = [\n ...items.slice(state.buffer.length > 1 ? from : from + 1),\n ...items.slice(0, state.buffer.length > 1 ? from : from + 1),\n ];\n const hit = ordered.find((item) =>\n (item.textContent ?? \"\").trim().toLowerCase().startsWith(prefix),\n );\n if (hit) {\n event.preventDefault();\n hit.focus();\n }\n },\n [onKeyDown, direction, close, closeAndReturn, rowRef],\n );\n\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Positioner\n /* The ROW, not whatever Base UI last treated as the trigger. */\n anchor={rowRef}\n side={side}\n align={align}\n sideOffset={sideOffset}\n alignOffset={alignOffset}\n className=\"isolate z-50\"\n >\n <PopoverPrimitive.Popup\n ref={popupRef}\n initialFocus={initialFocus}\n data-slot=\"cascader-submenu-content\"\n /* Roving focus, named by the row that opens it. `tabIndex={-1}` lets\n a pointer open park focus here without adding a Tab stop. */\n role=\"menu\"\n aria-orientation=\"vertical\"\n aria-labelledby={triggerId}\n tabIndex={-1}\n onKeyDown={handleKeyDown}\n /* Marks a menu surface for the docs design-system picker, which\n repaints menus by walking the DOM. An attribute, not a class. */\n data-menu-target=\"\"\n className={cn(\n FLYOUT_SURFACE_CLASS,\n \"flex min-w-48 max-w-(--available-width) flex-col gap-0.5 outline-hidden\",\n CASCADER_LIST_PAD_CLASS,\n \"p-(--cascader-list-pad,4px)\",\n className,\n )}\n {...props}\n >\n <CascaderMenuContext.Provider value={true}>{children}</CascaderMenuContext.Provider>\n </PopoverPrimitive.Popup>\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n );\n}\n\n/**\n * Whether the footer would render anything, for a wrapper (a separator, a grid\n * row) that has to make the same call `CascaderFooter` already makes.\n */\nexport function useCascaderHasActions(): boolean {\n const { actions } = useCascaderActions();\n return actions.length > 0;\n}\n\nexport {\n CascaderAction,\n CascaderFooter,\n CascaderSubmenu,\n CascaderSubmenuContent,\n CascaderSubmenuTrigger,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,MAAM,wCAAwB,IAAI,IAAI;CACpC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;;;;AAQD,SAAS,eAAe,EAAE,WAAW,UAAU,WAAW,GAAG,SAA8B;CACzF,MAAM,EAAE,SAAS,WAAW,mBAAmB;CAC/C,MAAM,cAAcA,QAAM,SAAS,MAAM,QAAQ,IAAI;CAErD,MAAM,gBAAgBA,QAAM,aACzB,UAA+C;EAC9C,YAAY,KAAK;EACjB,IAAI,MAAM,kBAAkB;EAC5B,IAAI,CAAC,sBAAsB,IAAI,MAAM,GAAG,GAAG;EAC3C,MAAM,gBAAgB;EAMtB,IAAI,MAAM,QAAQ,eAAe,MAAM,QAAQ,WAAW;EAC1D,MAAM,SAAS,MAAM;EACrB,MAAM,QAAQ,uBAAuB,MAAM;EAC3C,MAAM,SAAS,SAAS;EACxB,MAAM,QAAQ,SAAS,MAAM,QAAQ,MAAM,IAAI;EAC/C,IAAI,UAAU,IAAI;EAClB,MAAM,eAAe;EACrB,MAAM,OAAO,MAAM,QAAQ,cAAc,MAAM,QAAQ,KAAK,MAAM,QAAQ;EAC1E,IAAI,MAAM;GACR,KAAK,MAAM;GACX;EACF;EACA,IAAI,MAAM,QAAQ,aAAa,QAAQ,GAAG;EAC1C,OACG,QAAqB,gCAA8B,CAAC,EACnD,cAA2B,gCAA8B,CAAC,EAC1D,MAAM;CACZ,GACA,CAAC,SAAS,CACZ;CAEA,IAAI,CAAC,eAAe,QAAQ,WAAW,GAAG,OAAO;CAEjD,OACE,oBAAC,OAAD;EACE,a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BAACA,QAAiB,OAAlB;GACE,KAAK;GACS;GACd,aAAU;GAGV,MAAK;GACL,oBAAiB;GACjB,mBAAiB;GACjB,UAAU;GACV,WAAW;GAGX,oBAAiB;GACjB,WAAW,GACT,sBACA,2EACA,yBACA,+BACA,SACF;GACA,GAAI;GAEJ,UAAA,oBAAC,oBAAoB,UAArB;IAA8B,OAAO;IAAO;GAAuC,CAAA;EAC7D,CAAA;CACG,CAAA,EACN,CAAA;AAE7B;;;;;AAMA,SAAgB,wBAAiC;CAC/C,MAAM,EAAE,YAAY,mBAAmB;CACvC,OAAO,QAAQ,SAAS;AAC1B"}
@@ -4,14 +4,13 @@ import { s as CascaderLabels } from "../../../cascader-types-BnH6wYD-.js";
4
4
  * English defaults. Every string the primitive can render lives here, so a
5
5
  * consumer can translate the whole surface by passing `labels`.
6
6
  */
7
- declare const CASCADER_LABELS: CascaderLabels;
7
+ export declare const CASCADER_LABELS: CascaderLabels;
8
8
  /**
9
9
  * Shallow-merges consumer overrides over the defaults, so `labels` can carry a
10
10
  * single key without restating the rest.
11
11
  */
12
- declare function resolveCascaderLabels(labels?: Partial<CascaderLabels>): CascaderLabels;
12
+ export declare function resolveCascaderLabels(labels?: Partial<CascaderLabels>): CascaderLabels;
13
13
  /** Resolves the search placeholder, which may be a string or a function. */
14
- declare function resolveCascaderSearchLabel(labels: CascaderLabels, parentLabel?: string): string;
14
+ export declare function resolveCascaderSearchLabel(labels: CascaderLabels, parentLabel?: string): string;
15
15
  //#endregion
16
- export { CASCADER_LABELS, resolveCascaderLabels, resolveCascaderSearchLabel };
17
16
  //# sourceMappingURL=cascader-i18n.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cascader-i18n.d.ts","names":[],"sources":["../../../../src/components/reui/cascader/cascader-i18n.tsx"],"mappings":";;;;;;cAca,iBAAiB;;;;;iBAyDd,sBAAsB,SAAS,QAAQ,kBAAkB;;iBAMzD,2BAA2B,QAAQ,gBAAgB"}
1
+ {"version":3,"file":"cascader-i18n.d.ts","names":[],"sources":["../../../../src/components/reui/cascader/cascader-i18n.tsx"],"mappings":";;;;;;qBAca,iBAAiB;;;;;wBAyDd,sBAAsB,SAAS,QAAQ,kBAAkB;;wBAMzD,2BAA2B,QAAQ,gBAAgB"}
@@ -7,7 +7,7 @@ type VetoableEvent = {
7
7
  };
8
8
  /** A row press. The veto hook is optional: an `as="button"` row is outside Base
9
9
  * UI's listbox and gets a plain React event. */
10
- type CascaderRowEvent = React$1.MouseEvent<HTMLElement> & VetoableEvent;
10
+ export type CascaderRowEvent = React$1.MouseEvent<HTMLElement> & VetoableEvent;
11
11
  /** A footer COMMAND: the row theme, so it cannot drift from the list, plus the
12
12
  * hover and `focus-visible` fills a plain button never gets. Fills, never a
13
13
  * ring: a ring under rows that all paint with a fill read as a different
@@ -15,8 +15,8 @@ type CascaderRowEvent = React$1.MouseEvent<HTMLElement> & VetoableEvent;
15
15
  * leave a command painted as if it were still hovered. Disabled keys off
16
16
  * `aria-disabled`, not `:disabled`, to keep it FOCUSABLE: a footer whose only
17
17
  * row is disabled has no tab stop. */
18
- declare const CASCADER_ACTION_CLASS = "data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground [&_svg:not([class*='size-'])]:size-4 rounded-md py-1 relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [--cascader-row-inset:6px] text-sm ps-[var(--cascader-row-inset,8px)]! pe-[var(--cascader-row-inset,8px)]! hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground cursor-pointer gap-2 transition-colors aria-disabled:pointer-events-none aria-disabled:opacity-50";
19
- interface CascaderItemProps extends Omit<Combobox.Item.Props, "value" | "children" | "className" | "style" | "onClick" | "onMouseUp"> {
18
+ export declare const CASCADER_ACTION_CLASS = "data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground [&_svg:not([class*='size-'])]:size-4 rounded-md py-1 relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [--cascader-row-inset:6px] text-sm ps-[var(--cascader-row-inset,8px)]! pe-[var(--cascader-row-inset,8px)]! hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground cursor-pointer gap-2 transition-colors aria-disabled:pointer-events-none aria-disabled:opacity-50";
19
+ export interface CascaderItemProps extends Omit<Combobox.Item.Props, "value" | "children" | "className" | "style" | "onClick" | "onMouseUp"> {
20
20
  /** No state callback: the row merges `className` and `style` itself. */
21
21
  className?: string;
22
22
  style?: React$1.CSSProperties;
@@ -69,13 +69,13 @@ declare const CascaderItem: React$1.MemoExoticComponent<({ node, index, depth, s
69
69
  /** Every load-derived prop a row needs. A PAGING row reports the level it
70
70
  * belongs to, a BRANCH row the level it OWNS; mutually exclusive, so one call
71
71
  * answers both. Exported because a memoised row cannot read them itself. */
72
- declare function getCascaderMoreProps(node: CascaderNode, loadStates: ReadonlyMap<string, CascaderLoadState>): {
72
+ export declare function getCascaderMoreProps(node: CascaderNode, loadStates: ReadonlyMap<string, CascaderLoadState>): {
73
73
  loading: boolean;
74
74
  error: boolean;
75
75
  childrenLoading: boolean;
76
76
  childrenError: boolean;
77
77
  };
78
- interface CascaderItemsProps {
78
+ export interface CascaderItemsProps {
79
79
  /** Replaces the default row for every item. */
80
80
  children?: (node: CascaderNode, index: number) => React$1.ReactNode;
81
81
  }
@@ -84,7 +84,7 @@ interface CascaderItemsProps {
84
84
  * component, which would cycle with the context. `index` is deliberately not
85
85
  * passed; see `CascaderItemProps`. */
86
86
  declare function CascaderItems({ children }: CascaderItemsProps): React$1.JSX.Element;
87
- interface CascaderGroupProps extends Omit<Combobox.Group.Props, "className"> {
87
+ export interface CascaderGroupProps extends Omit<Combobox.Group.Props, "className"> {
88
88
  /** Base UI also accepts a state callback here; the group has no state. */
89
89
  className?: string;
90
90
  }
@@ -94,7 +94,7 @@ interface CascaderGroupProps extends Omit<Combobox.Group.Props, "className"> {
94
94
  * Grouping is composition, not data: `CascaderItems` renders one flat run per
95
95
  * level, so its indices line up with `listRef`. */
96
96
  declare function CascaderGroup({ className, ...props }: CascaderGroupProps): React$1.JSX.Element;
97
- interface CascaderLabelProps extends Omit<Combobox.GroupLabel.Props, "className" | "style"> {
97
+ export interface CascaderLabelProps extends Omit<Combobox.GroupLabel.Props, "className" | "style"> {
98
98
  /** No state callback; outside a group this is not a Base UI part at all. */
99
99
  className?: string;
100
100
  style?: React$1.CSSProperties;
@@ -102,7 +102,7 @@ interface CascaderLabelProps extends Omit<Combobox.GroupLabel.Props, "className"
102
102
  /** A heading. Inside `CascaderGroup` it is the group's accessible name; outside
103
103
  * one (the footer flyout is a menu, not a listbox) it is decoration only. */
104
104
  declare function CascaderLabel(props: CascaderLabelProps): React$1.JSX.Element;
105
- interface CascaderSeparatorProps extends Omit<Combobox.Separator.Props, "className"> {
105
+ export interface CascaderSeparatorProps extends Omit<Combobox.Separator.Props, "className"> {
106
106
  /** Base UI also accepts a state callback here; only the orientation varies. */
107
107
  className?: string;
108
108
  }
@@ -111,5 +111,5 @@ interface CascaderSeparatorProps extends Omit<Combobox.Separator.Props, "classNa
111
111
  * needs a `CascaderGroup`, not a line. A consumer can pass the role back. */
112
112
  declare function CascaderSeparator({ className, ...props }: CascaderSeparatorProps): React$1.JSX.Element;
113
113
  //#endregion
114
- export { CASCADER_ACTION_CLASS, CascaderGroup, CascaderGroupProps, CascaderItem, CascaderItemProps, CascaderItems, CascaderItemsProps, CascaderLabel, CascaderLabelProps, CascaderRowEvent, CascaderSeparator, CascaderSeparatorProps, getCascaderMoreProps };
114
+ export { CascaderGroup, CascaderItem, CascaderItems, CascaderLabel, CascaderSeparator };
115
115
  //# sourceMappingURL=cascader-item.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cascader-item.d.ts","names":[],"sources":["../../../../src/components/reui/cascader/cascader-item.tsx"],"mappings":";;;;KA0BK;EAAkB;;;;KAIX,mBAAmB,QAAM,WAAW,eAAe;;;;;;;;cAsDlD;UAyBI,0BACP,KACN,SAAkB,KAAK;;EAIzB;EACA,QAAQ,QAAM;EACd,WAAW,OAAO;EAClB,aAAa,OAAO;EACpB,MAAM;;;EAGN;;EAEA;;EAEA;;;EAGA;;EAEA;;EAEA;;;;EAIA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;EAIA;;;;EAIA;EACA,WAAW,QAAM;;;;cAKb,cAAY,QAAA,uBAAA,MAAA,OAAA,OAAA,UAAA,IAAA,UAAA,QAAA,QAAA,YAAA,YAAA,gBAAA,UAAA,cAAA,eAAA,mBAAA,eAAA,mBAAA,SAAA,OAAA,iBAAA,eAAA,WAAA,UAAA,SAAA,WAAA,UAAA,SAuBf,sBAAiB,QAAA,IAAA;;;;iBAunBJ,qBACd,MAAM,cACN,YAAY,oBAAoB;EAEhC;EACA;EACA;EACA;;UAqBe;;EAEf,YAAY,MAAM,cAAc,kBAAkB,QAAM;;;;;;iBAOjD,gBAAgB,YAAY,qBAAkB,QAAA,IAAA;UA0EtC,2BAA2B,KAAK,SAAkB,MAAM;;EAEvE;;;;;;;iBAQO,gBAAgB,cAAc,SAAS,qBAAkB,QAAA,IAAA;UAYjD,2BACP,KAAK,SAAkB,WAAW;;EAE1C;EACA,QAAQ,QAAM;;;;iBA+BP,cAAc,OAAO,qBAAkB,QAAA,IAAA;UAK/B,+BACP,KAAK,SAAkB,UAAU;;EAEzC;;;;;iBAMO,oBAAoB,cAAc,SAAS,yBAAsB,QAAA,IAAA"}
1
+ {"version":3,"file":"cascader-item.d.ts","names":[],"sources":["../../../../src/components/reui/cascader/cascader-item.tsx"],"mappings":";;;;KA0BK;EAAkB;;;;YAIX,mBAAmB,QAAM,WAAW,eAAe;;;;;;;;qBAsDlD;iBAyBI,0BACP,KACN,SAAkB,KAAK;;EAIzB;EACA,QAAQ,QAAM;EACd,WAAW,OAAO;EAClB,aAAa,OAAO;EACpB,MAAM;;;EAGN;;EAEA;;EAEA;;;EAGA;;EAEA;;EAEA;;;;EAIA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;;EAIA;;;;EAIA;EACA,WAAW,QAAM;;;;cAKb,cAAY,QAAA,uBAAA,MAAA,OAAA,OAAA,UAAA,IAAA,UAAA,QAAA,QAAA,YAAA,YAAA,gBAAA,UAAA,cAAA,eAAA,mBAAA,eAAA,mBAAA,SAAA,OAAA,iBAAA,eAAA,WAAA,UAAA,SAAA,WAAA,UAAA,SAuBf,sBAAiB,QAAA,IAAA;;;;wBAunBJ,qBACd,MAAM,cACN,YAAY,oBAAoB;EAEhC;EACA;EACA;EACA;;iBAqBe;;EAEf,YAAY,MAAM,cAAc,kBAAkB,QAAM;;;;;;iBAOjD,gBAAgB,YAAY,qBAAkB,QAAA,IAAA;iBA0EtC,2BAA2B,KAAK,SAAkB,MAAM;;EAEvE;;;;;;;iBAQO,gBAAgB,cAAc,SAAS,qBAAkB,QAAA,IAAA;iBAYjD,2BACP,KAAK,SAAkB,WAAW;;EAE1C;EACA,QAAQ,QAAM;;;;iBA+BP,cAAc,OAAO,qBAAkB,QAAA,IAAA;iBAK/B,+BACP,KAAK,SAAkB,UAAU;;EAEzC;;;;;iBAMO,oBAAoB,cAAc,SAAS,yBAAsB,QAAA,IAAA"}
@@ -3,7 +3,7 @@ import { Spinner } from "../../ui/spinner.js";
3
3
  import { useCascaderActions, useCascaderRender, useCascaderState } from "./cascader-context.js";
4
4
  import { getCascaderCount, getCascaderMoreParent, getCascaderPath, isCascaderMoreNode } from "./cascader-lib.js";
5
5
  import * as React$1 from "react";
6
- import { cn } from "@kumix/utils";
6
+ import { cn } from "cn";
7
7
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
8
8
  import { CheckIcon, ChevronRightIcon, LoaderCircleIcon, MinusIcon, RotateCwIcon } from "lucide-react";
9
9
  import { mergeProps } from "@base-ui/react/merge-props";
@@ -1 +1 @@
1
- {"version":3,"file":"cascader-item.js","names":["React","ComboboxPrimitive"],"sources":["../../../../src/components/reui/cascader/cascader-item.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport {\n CheckIcon,\n ChevronRightIcon,\n LoaderCircleIcon,\n MinusIcon,\n RotateCwIcon,\n} from \"lucide-react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { Spinner } from \"../../ui/spinner\";\nimport { useCascaderActions, useCascaderRender, useCascaderState } from \"./cascader-context\";\nimport {\n getCascaderCount,\n getCascaderMoreParent,\n getCascaderPath,\n isCascaderMoreNode,\n} from \"./cascader-lib\";\nimport type { CascaderLoadState, CascaderNode } from \"./cascader-types\";\n\n// Base UI extends its synthetic events with a handler-veto escape hatch.\ntype VetoableEvent = { preventBaseUIHandler?: () => void };\n\n/** A row press. The veto hook is optional: an `as=\"button\"` row is outside Base\n * UI's listbox and gets a plain React event. */\nexport type CascaderRowEvent = React.MouseEvent<HTMLElement> & VetoableEvent;\n\n// Each style's inline inset, as a variable: a row and its absolutely positioned\n// check have to land on the same number, in LOGICAL properties. These eight\n// numbers MIRROR the shared style sheets; keep them in step with\n// `registry/styles/style-*.css`.\nconst ROW_INSET_CLASS = \"[--cascader-row-inset:6px]\";\n\n// Both insets equal, for a row with no check. `!` because a consumer may not\n// import the sheets into `layer(base)`, where the class would win on order.\nconst ROW_FLUSH_CLASS = \"ps-[var(--cascader-row-inset,8px)]! pe-[var(--cascader-row-inset,8px)]!\";\n\n// The same start inset plus room for the check. A flat `pr-8` is wrong in five\n// of the eight styles: 4px of slack in nova, 8px short in maia, luma and sera,\n// and no gutter at all in mira, whose check then overlaps its own label.\nconst ROW_GUTTER_CLASS =\n \"ps-[var(--cascader-row-inset,8px)]! pe-[calc(var(--cascader-row-inset,8px)*2_+_16px)]!\";\n\n// The check's box, inset to match the row's. A physical `right-2` neither\n// mirrors under RTL nor tracks the style's inset; `right-auto` comes with the\n// logical `end-*`, because width + `left` + `right` is over-constrained.\nconst INDICATOR_CLASS =\n \"pointer-events-none absolute flex items-center justify-center size-4 end-[var(--cascader-row-inset,8px)]! rtl:right-auto!\";\n\n// The row's type, gap, radius and icon size per style. No horizontal padding:\n// every row pairs this with `ROW_FLUSH_CLASS` or `ROW_GUTTER_CLASS`.\nconst ROW_THEME_CLASS =\n \"data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground [&_svg:not([class*='size-'])]:size-4 rounded-md py-1\";\n\n/**\n * The row's gap and type, per style, held apart from the rest of the theme.\n *\n * A row that pins its own gap or text size takes `ROW_SHELL_CLASS` and leaves\n * these out, because a `style-<name>:` utility is emitted AFTER the plain one\n * it would have to lose to. Not receiving the token beats overriding it with\n * `!`, which a consumer then has to fight in turn.\n */\nconst ROW_GAP_CLASS = \"gap-2\";\n\nconst ROW_TEXT_CLASS = \"text-sm\";\n\nconst ROW_SHELL_CLASS = `${ROW_THEME_CLASS} relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 ${ROW_INSET_CLASS}`;\n\nconst ROW_CLASS = `${ROW_SHELL_CLASS} ${ROW_GAP_CLASS} ${ROW_TEXT_CLASS}`;\n\nconst CASCADER_ACTION_INSET_CLASS = `${ROW_INSET_CLASS} ${ROW_FLUSH_CLASS}`;\n\n/** A footer COMMAND: the row theme, so it cannot drift from the list, plus the\n * hover and `focus-visible` fills a plain button never gets. Fills, never a\n * ring: a ring under rows that all paint with a fill read as a different\n * widget bolted on. `focus-visible`, not `focus`, so a pointer press does not\n * leave a command painted as if it were still hovered. Disabled keys off\n * `aria-disabled`, not `:disabled`, to keep it FOCUSABLE: a footer whose only\n * row is disabled has no tab stop. */\nexport const CASCADER_ACTION_CLASS = `${ROW_SHELL_CLASS} ${ROW_TEXT_CLASS} ${ROW_FLUSH_CLASS} hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground cursor-pointer gap-2 transition-colors aria-disabled:pointer-events-none aria-disabled:opacity-50`;\n\n// The box around the affordances that are not the row. 20px around a 16px icon,\n// the outer 2px cancelled at the call site; 24px would set the row height.\nconst AFFORDANCE_BOX_CLASS = \"flex size-5 shrink-0 items-center justify-center rounded-sm\";\n\n// What makes an affordance read as pressable on an already highlighted row. Not\n// `hover:bg-accent`: the row is `bg-accent` under the pointer, so the chip would\n// be invisible. `!` and `**:` for the `CHECKBOX_MARK_CLASS` reason.\nconst AFFORDANCE_HOVER_CLASS =\n \"transition-[background-color,box-shadow,color] hover:bg-background hover:text-foreground! hover:**:text-foreground! hover:shadow-xs\";\n\n// The selection MARK's colour, pinned so nothing can repaint it: every row\n// carries a DESCENDANT highlight rule, and a mark is STATE. Pinned TWICE\n// because icon sets draw with `fill`/`stroke=\"currentColor\"`, which the\n// `<path>` inherits and resolves against the PATH's own `color`. Both halves\n// are asserted in `cascader-behavior.test.tsx`.\nconst CHECKBOX_MARK_CLASS = \"text-primary-foreground! **:text-primary-foreground!\";\nconst INDICATOR_MARK_CLASS = \"text-foreground! **:text-foreground!\";\n\n// Milliseconds the pointer must rest on a branch row before\n// `expandTrigger=\"hover\"` drills in: long enough that a pointer crossing the\n// column on its way elsewhere opens nothing, short enough to read as immediate.\nconst CASCADER_HOVER_EXPAND_DELAY = 150;\n\nexport interface CascaderItemProps\n extends Omit<\n ComboboxPrimitive.Item.Props,\n \"value\" | \"children\" | \"className\" | \"style\" | \"onClick\" | \"onMouseUp\"\n > {\n /** No state callback: the row merges `className` and `style` itself. */\n className?: string;\n style?: React.CSSProperties;\n onClick?: (event: CascaderRowEvent) => void;\n onMouseUp?: (event: CascaderRowEvent) => void;\n node: CascaderNode;\n /** Explicit render index. Required while virtualized and DELIBERATELY IGNORED\n * otherwise: it self-registers the row and breaks `aria-activedescendant`. */\n index?: number;\n /** Indentation depth. Drives `--cascader-indent` in tree mode. */\n depth?: number;\n /** Renders the ancestor chain under the label, for deep-search results. */\n showPath?: boolean;\n /** `option` renders a real `Combobox.Item`; `button` renders identical markup\n * outside the listbox, for the ancestor columns in columns mode. */\n as?: \"option\" | \"button\";\n /** Tree mode: this row is an expanded branch. */\n expanded?: boolean;\n /** Indent each depth by this many pixels. Tree mode only. */\n indent?: number;\n /** Whether the node has children. Defaults to the cascader's own answer, as do\n * the three below: callers pass them because they already hold the level,\n * which keeps a memoised row off the volatile context. */\n branch?: boolean;\n /** Whether the node may be committed. Defaults to the cascader's own answer. */\n selectable?: boolean;\n /** Whether the node is currently selected. Defaults to the cascader's answer. */\n selected?: boolean;\n /** Some but not all of the loaded subtree selected. `cascade` only. */\n indeterminate?: boolean;\n /** Selected nodes below this one, at any depth. Drives the trailing count. */\n selectedCount?: number;\n /** Paging row only: a request for this level is in flight. */\n loading?: boolean;\n /** Paging row only: this level's last request failed. */\n error?: boolean;\n /** Branch row only: this node's OWN children are being fetched. The chevron\n * (or, in tree mode, the expander) becomes a spinner IN PLACE, in the same\n * 16px box: no skeleton row appears below, nothing reflows. */\n childrenLoading?: boolean;\n /** Branch row only: the last fetch of this node's children failed. The same\n * box becomes the retry. The press path is unchanged: it goes through\n * `navigate`, which refires the failed level rather than moving. */\n childrenError?: boolean;\n children?: React.ReactNode;\n}\n\n/** One row. Branch presses navigate instead of selecting, vetoed here with\n * `preventBaseUIHandler()` on `onClick` (Enter too) and on `onMouseUp`. */\nconst CascaderItem = React.memo(function CascaderItem({\n node,\n index,\n depth,\n showPath = false,\n as = \"option\",\n expanded,\n indent = 16,\n branch: branchProp,\n selectable: selectableProp,\n selected: selectedProp,\n indeterminate: indeterminateProp,\n selectedCount: selectedCountProp,\n loading,\n error,\n childrenLoading = false,\n childrenError = false,\n className,\n children,\n onClick,\n onMouseUp,\n style,\n ...props\n}: CascaderItemProps) {\n // The ACTIONS context only: the state context republishes on every keystroke.\n const {\n index: treeIndex,\n mode,\n labels,\n isBranch,\n isSelectable,\n isSelected,\n isIndeterminate,\n selectedDescendantCount,\n multiple,\n branchesSelectable,\n indicator: indicatorEnabled,\n expandTrigger = \"click\",\n navigate,\n navigateAt,\n toggleExpanded,\n commit,\n virtualized,\n loadMore,\n retryLevel,\n } = useCascaderActions();\n // Render props come from an always-current context, or a closure goes stale.\n const { renderItem, renderLabel } = useCascaderRender();\n\n const branch = branchProp ?? isBranch(node);\n const selectable = selectableProp ?? isSelectable(node);\n const selected = selectedProp ?? isSelected(node);\n // A selected node is never also partially selected (a dash in a filled box).\n const indeterminate = !selected && (indeterminateProp ?? isIndeterminate(node));\n const count = branch ? getCascaderCount(treeIndex, node) : 0;\n const nodeDepth = depth ?? treeIndex.depthOf.get(node.value) ?? 0;\n\n // O(1): the cascader publishes a map of selected-descendant counts, because a\n // row walking its own subtree is `rows x descendants`, paid every keystroke.\n const selectedDescendants = branch ? (selectedCountProp ?? selectedDescendantCount(node)) : 0;\n // `multiple` only: with a single selection the trigger, the breadcrumb and\n // the leaf's own check already say where it is, so swapping a branch's real\n // child total (\"24\") for a permanent \"1\" would trade a useful number away.\n const showsSelectedCount = multiple && selectedDescendants > 0;\n const trailingCount = showsSelectedCount ? selectedDescendants : count;\n // Shown selected or not: suppressing it under a checked branch read as data\n // loss, and the row's TWO trailing columns mean the count never has to share\n // a slot with the check.\n const showCount = trailingCount > 0;\n\n // Where a multi-select tree puts its checkbox: at the HEAD of the row, since a\n // trailing box does not follow the label stagger. Per-LIST, never per-row, or\n // the labels below an unselectable row step back out.\n const leadingCheckbox = mode === \"tree\" && multiple;\n\n // Whether this row draws a MARK, and so whether it reserves the gutter one\n // needs. `|| multiple` is the scope of the opt-out: a checkbox is the\n // selection CONTROL, so `indicator={false}` is a no-op in multi-select.\n const showsIndicator = indicatorEnabled || multiple;\n\n const veto = React.useCallback((event: VetoableEvent) => {\n event.preventBaseUIHandler?.();\n }, []);\n\n const handleClick = React.useCallback(\n (event: CascaderRowEvent) => {\n onClick?.(event);\n if (node.disabled) return;\n if (branch && !selectable) {\n veto(event);\n navigate(node);\n }\n },\n [onClick, node, branch, selectable, veto, navigate],\n );\n\n const handleMouseUp = React.useCallback(\n (event: CascaderRowEvent) => {\n onMouseUp?.(event);\n if (node.disabled) return;\n if (branch && !selectable) veto(event);\n },\n [onMouseUp, node, branch, selectable, veto],\n );\n\n // The tree expander's own press. With `selectable=\"any\"` the row press\n // commits, and under `cascade` that selected a whole subtree while the row\n // stayed collapsed, so expanding needs its own target. `stopPropagation`\n // before the veto, so Base UI's handler never runs, and no role: nesting\n // one in `role=\"option\"` fails axe. `navigate` fetches BEFORE it opens.\n const handleExpanderClick = React.useCallback(\n (event: CascaderRowEvent) => {\n event.stopPropagation();\n veto(event);\n if (node.disabled) return;\n if (expanded) toggleExpanded(node.value);\n else navigate(node);\n },\n [veto, node, expanded, toggleExpanded, navigate],\n );\n\n const handleExpanderMouseUp = React.useCallback(\n (event: CascaderRowEvent) => {\n // Base UI treats a drag-select mouseup as a commit; this is not one.\n event.stopPropagation();\n veto(event);\n },\n [veto],\n );\n\n const handleChevronClick = React.useCallback(\n (event: CascaderRowEvent) => {\n event.stopPropagation();\n veto(event);\n if (node.disabled) return;\n // `navigate` falls through to `pushLevel`, which APPENDS: right in the\n // deepest column, but from an ancestor column it duplicated the level and\n // corrupted the path. `navigateAt` rebuilds the trail from this depth.\n if (as === \"button\") navigateAt(node, depth ?? 0);\n else navigate(node);\n },\n [veto, node, as, navigateAt, depth, navigate],\n );\n\n const handleChevronMouseUp = React.useCallback((event: CascaderRowEvent) => veto(event), [veto]);\n\n // Keeps focus in the search field: Base UI prevents the mousedown default for\n // option rows, and focusing a `tabindex=\"-1\"` trail row kills every key.\n const handleButtonMouseDown = React.useCallback((event: React.MouseEvent<HTMLElement>) => {\n event.preventDefault();\n }, []);\n\n const handleButtonClick = React.useCallback(\n (event: CascaderRowEvent) => {\n onClick?.(event);\n if (node.disabled) return;\n if (branch && !selectable) {\n // Button rows only exist in the columns trail, where `depth` is the\n // column's own depth, so navigating replaces the trail from here.\n navigateAt(node, depth ?? 0);\n return;\n }\n if (selectable) commit(node);\n },\n [onClick, node, branch, selectable, navigateAt, depth, commit],\n );\n\n // The paging row's press, never a selection, whatever `selectable` says.\n const handleMoreClick = React.useCallback(\n (event: CascaderRowEvent) => {\n onClick?.(event);\n veto(event);\n const parent = getCascaderMoreParent(node);\n if (parent == null) return;\n if (error) retryLevel(parent);\n else if (!loading) loadMore(parent);\n },\n [onClick, veto, node, error, loading, retryLevel, loadMore],\n );\n\n // `expandTrigger=\"hover\"`: resting on a BRANCH row in the ACTIVE column drills\n // in after a delay. The deepest column of columns mode only, and it never\n // commits, so a pointer crossing the panel cannot change the value.\n const hoverNavigates =\n expandTrigger === \"hover\" && mode === \"columns\" && as === \"option\" && branch && !node.disabled;\n const hoverTimerRef = React.useRef<number | null>(null);\n\n const cancelHoverNavigate = React.useCallback(() => {\n if (hoverTimerRef.current == null) return;\n window.clearTimeout(hoverTimerRef.current);\n hoverTimerRef.current = null;\n }, []);\n\n const handleHoverPointerEnter = React.useCallback(() => {\n cancelHoverNavigate();\n hoverTimerRef.current = window.setTimeout(() => {\n hoverTimerRef.current = null;\n navigate(node);\n }, CASCADER_HOVER_EXPAND_DELAY);\n }, [cancelHoverNavigate, navigate, node]);\n\n // Drilling in demotes this column to the trail WITHOUT unmounting the row, so\n // a pending timer has to die or it fires `navigate` from an inactive column.\n React.useEffect(() => {\n if (!hoverNavigates) cancelHoverNavigate();\n }, [hoverNavigates, cancelHoverNavigate]);\n React.useEffect(() => cancelHoverNavigate, [cancelHoverNavigate]);\n\n /* ------------------------------- paging row ------------------------------ */\n\n if (isCascaderMoreNode(node)) {\n const text = error\n ? labels.error\n : loading\n ? node.count\n ? labels.loadingMore\n : labels.loading\n : labels.loadMore;\n\n const moreStyle =\n mode === \"tree\" && nodeDepth > 0\n ? ({\n ...style,\n \"--cascader-indent\": `${nodeDepth * indent}px`,\n } as React.CSSProperties)\n : style;\n\n const moreShared = {\n \"data-slot\": \"cascader-item\",\n \"data-more\": \"\",\n \"data-state\": error ? \"error\" : loading ? \"loading\" : \"idle\",\n \"data-depth\": nodeDepth,\n style: moreStyle,\n className: cn(\n ROW_SHELL_CLASS,\n ROW_FLUSH_CLASS,\n \"justify-center gap-1.5 text-muted-foreground text-xs\",\n !error && !loading && \"hover:text-foreground\",\n mode === \"tree\" && \"ps-[calc(var(--cascader-row-inset,8px)_+_var(--cascader-indent,0px))]!\",\n className,\n ),\n };\n\n const moreBody = children ?? (\n <>\n {loading ? <LoaderCircleIcon className=\"size-3.5 animate-spin\" aria-hidden /> : null}\n <span>{text}</span>\n {/* TEXT, not a button: a focusable element inside a `role=\"option\"`\n row is a `nested-interactive` violation. */}\n {error ? <span className=\"font-medium text-foreground\">{labels.retry}</span> : null}\n </>\n );\n\n if (as === \"button\") {\n const buttonProps = { ...(props as React.ComponentProps<\"button\">) };\n delete buttonProps[\"aria-setsize\"];\n delete buttonProps[\"aria-posinset\"];\n delete buttonProps[\"aria-level\"];\n\n return (\n <button\n type=\"button\"\n {...moreShared}\n tabIndex={-1}\n onClick={handleMoreClick}\n {...buttonProps}\n >\n {moreBody}\n </button>\n );\n }\n\n return (\n <ComboboxPrimitive.Item\n {...moreShared}\n value={node}\n {...(virtualized && index != null ? { index } : null)}\n {...(mode === \"tree\" ? { role: \"treeitem\" as const, \"aria-level\": nodeDepth + 1 } : null)}\n onClick={handleMoreClick}\n onMouseUp={veto}\n {...props}\n >\n {moreBody}\n </ComboboxPrimitive.Item>\n );\n }\n\n const itemState = {\n branch,\n selected,\n disabled: !!node.disabled,\n depth: nodeDepth,\n count,\n path: showPath ? getCascaderPath(treeIndex, node.value).slice(0, -1) : [],\n };\n\n const custom = renderItem?.(node, itemState);\n const customLabel = renderLabel?.(node, itemState);\n\n // What the markup cannot say: a branch would announce \"Person 24\", a naked\n // number. Trail rows are outside the listbox, so they need words for state.\n const srDetails = [\n branch ? labels.itemCount(count) : null,\n showsSelectedCount ? labels.selectedCount(selectedDescendants) : null,\n branch && mode !== \"tree\" ? labels.branchAffordance : null,\n as === \"button\" && selected ? labels.selectedState : null,\n // Option rows say this with `aria-checked=\"mixed\"`; `role=\"button\"` allows\n // neither that nor `aria-selected`, so a trail row says it in words.\n as === \"button\" && indeterminate ? labels.partiallySelectedState : null,\n ]\n .filter(Boolean)\n .map((detail) => `, ${detail}`)\n .join(\"\");\n\n // Extracted because tree mode renders it INLINE at the head of the row. It\n // reads `data-selected` off the ROW, so it also works on the trail rows.\n const checkbox = (\n <span\n data-slot=\"cascader-item-checkbox\"\n className=\"flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input in-data-indeterminate:border-primary in-data-selected:border-primary in-data-indeterminate:bg-primary in-data-selected:bg-primary in-data-indeterminate:text-primary-foreground in-data-selected:text-primary-foreground transition-colors\"\n >\n {/* Colour declared ON THE ICON with `!`; see `CHECKBOX_MARK_CLASS`. */}\n {indeterminate ? (\n <MinusIcon data-slot=\"cascader-item-dash\" className={cn(CHECKBOX_MARK_CLASS, \"size-3\")} />\n ) : (\n <CheckIcon\n data-slot=\"cascader-item-tick\"\n className={cn(CHECKBOX_MARK_CLASS, \"size-3 in-data-selected:opacity-100 opacity-0\")}\n />\n )}\n </span>\n );\n\n const indicator = (\n <>\n {multiple ? (\n checkbox\n ) : (\n <CheckIcon\n data-slot=\"cascader-item-check\"\n className={cn(\"pointer-events-none\", INDICATOR_MARK_CLASS)}\n />\n )}\n </>\n );\n\n const body = custom ?? children ?? (\n <>\n {/* Tree mode expands in place, so the branch marker leads the row. */}\n {mode === \"tree\" && branch ? (\n <span\n data-slot=\"cascader-item-expander\"\n /* Pure affordance: the row itself carries `aria-expanded`. */\n aria-hidden=\"true\"\n data-state={childrenError ? \"error\" : childrenLoading ? \"loading\" : \"idle\"}\n onClick={handleExpanderClick}\n onMouseUp={handleExpanderMouseUp}\n className={cn(\n \"-ms-0.5\",\n childrenError ? \"text-destructive\" : \"text-muted-foreground\",\n AFFORDANCE_BOX_CLASS,\n AFFORDANCE_HOVER_CLASS,\n childrenLoading && \"pointer-events-none\",\n )}\n >\n {childrenLoading ? (\n <Spinner aria-hidden=\"true\" className=\"size-4\" />\n ) : childrenError ? (\n <RotateCwIcon className=\"size-4\" />\n ) : (\n <ChevronRightIcon\n className={cn(\n \"size-4 transition-transform\",\n /* Collapsed it points INTO the level, so it mirrors; expanded\n it points DOWN, the same in both writing modes, so the mirror\n has to come off or `scaleX(-1)` composed with `rotate(90deg)`\n lands it pointing up. `rtl:rotate-90` beside `rotate-90` was\n a no-op that only looked like it handled this. */\n expanded ? \"rotate-90\" : \"rtl:-scale-x-100\",\n )}\n />\n )}\n </span>\n ) : mode === \"tree\" ? (\n // A LEAF's expander slot, reserved and empty: without it a leaf's label\n // started 28px off its sibling branches' and read as one level up.\n <span\n data-slot=\"cascader-item-expander-spacer\"\n aria-hidden=\"true\"\n className={cn(\"-ms-0.5\", AFFORDANCE_BOX_CLASS)}\n />\n ) : null}\n\n {/* Tree + multi-select: the box leads the row, and an unselectable row\n still reserves its width. */}\n {leadingCheckbox ? (\n selectable ? (\n checkbox\n ) : (\n <span\n data-slot=\"cascader-item-checkbox-spacer\"\n aria-hidden=\"true\"\n className=\"size-4 shrink-0\"\n />\n )\n ) : null}\n\n {node.icon ? (\n <span\n data-slot=\"cascader-item-icon\"\n className=\"flex shrink-0 items-center justify-center text-muted-foreground\"\n >\n {node.icon}\n </span>\n ) : null}\n\n {/* The row box is sized for pieces side by side; this one stacks, so it\n restates the gap: 8px reads as a paragraph break, not a subtitle. */}\n <span className=\"flex min-w-0 flex-1 flex-col items-start gap-0.5\">\n {customLabel ?? (\n <>\n <span className=\"w-full truncate text-start\">{node.label}</span>\n {node.description ? (\n <span\n data-slot=\"cascader-item-description\"\n className=\"w-full truncate text-start text-muted-foreground text-xs\"\n >\n {node.description}\n </span>\n ) : null}\n </>\n )}\n {showPath ? <CascaderItemPath node={node} /> : null}\n </span>\n\n {/* The count is a bare number, and nothing else says a branch opens. */}\n {srDetails ? (\n <span data-slot=\"cascader-item-details\" className=\"sr-only\">\n {srDetails}\n </span>\n ) : null}\n\n {/* Tree mode expands in place, so it has no drill-in chevron. */}\n {branch && mode !== \"tree\" ? (\n <span\n data-slot=\"cascader-item-trailing\"\n aria-hidden=\"true\"\n className=\"ms-auto flex shrink-0 items-center gap-1 text-muted-foreground text-xs tabular-nums\"\n >\n {showCount ? (\n <span\n data-slot=\"cascader-item-count\"\n /* The marker a consumer (and a test) reads to tell the two\n numbers apart without matching on a colour class. */\n {...(showsSelectedCount ? { \"data-selected-count\": \"\" } : null)}\n className={cn(showsSelectedCount && \"text-primary!\")}\n >\n {trailingCount}\n </span>\n ) : null}\n {/* ONLY the chevron is the drill target: sharing a hit area with the count made a number pressable. */}\n {/** biome-ignore lint/a11y/useKeyWithClickEvents: <> */}\n <span\n data-slot=\"cascader-item-chevron\"\n data-state={childrenError ? \"error\" : childrenLoading ? \"loading\" : \"idle\"}\n onClick={selectable ? handleChevronClick : undefined}\n onMouseUp={selectable ? handleChevronMouseUp : undefined}\n onMouseDown={as === \"button\" ? handleButtonMouseDown : undefined}\n className={cn(\n /* Cancels the box's outer slack, so the icon keeps its column. */\n \"-me-0.5\",\n AFFORDANCE_BOX_CLASS,\n selectable && AFFORDANCE_HOVER_CLASS,\n childrenError && \"text-destructive\",\n childrenLoading && \"pointer-events-none\",\n )}\n >\n {childrenLoading ? (\n <Spinner aria-hidden=\"true\" className=\"size-4\" />\n ) : childrenError ? (\n <RotateCwIcon className=\"size-4\" />\n ) : (\n <ChevronRightIcon className=\"size-4 rtl:-scale-x-100\" />\n )}\n </span>\n </span>\n ) : null}\n\n {branch && mode === \"tree\" && showCount ? (\n <span\n data-slot=\"cascader-item-count\"\n {...(showsSelectedCount ? { \"data-selected-count\": \"\" } : null)}\n /* The count is spoken by the sr-only details span instead. */\n aria-hidden=\"true\"\n className={cn(\n \"ms-auto shrink-0 text-muted-foreground text-xs tabular-nums\",\n showsSelectedCount && \"text-primary!\",\n )}\n >\n {trailingCount}\n </span>\n ) : null}\n\n {/* No trailing indicator when a tree's box led the row, or when\n `indicator={false}` opted out. See `showsIndicator`. */}\n {selectable && !leadingCheckbox && showsIndicator ? (\n as === \"button\" ? (\n // No ItemIndicator outside Base UI: `data-selected` drives it.\n (multiple || selected) && (\n <span data-slot=\"cascader-item-indicator\" className={INDICATOR_CLASS}>\n {indicator}\n </span>\n )\n ) : (\n <ComboboxPrimitive.ItemIndicator\n /* Kept mounted for a partial selection too: the row is not\n selected, so Base UI would unmount the box the dash lives in. */\n keepMounted={multiple || indeterminate}\n render={<span data-slot=\"cascader-item-indicator\" className={INDICATOR_CLASS} />}\n >\n {indicator}\n </ComboboxPrimitive.ItemIndicator>\n )\n ) : null}\n </>\n );\n\n const rowStyle =\n mode === \"tree\" && nodeDepth > 0\n ? ({\n ...style,\n \"--cascader-indent\": `${nodeDepth * indent}px`,\n } as React.CSSProperties)\n : style;\n\n const shared = {\n \"data-slot\": \"cascader-item\",\n \"data-branch\": branch || undefined,\n \"data-selected\": selected || undefined,\n \"data-indeterminate\": indeterminate || undefined,\n \"data-depth\": nodeDepth,\n \"data-expanded\": expanded || undefined,\n // No `aria-level`: `role=\"option\"` allows only `aria-selected`,\n // `aria-checked`, `aria-posinset` and `aria-setsize`, and a `role=\"button\"`\n // trail row allows none of the four. Only tree mode has a role that takes a\n // level, and it adds one below.\n style: rowStyle,\n className: cn(\n ROW_CLASS,\n /* Three separate reasons to hand the check gutter back. A multi-select\n tree's box leads the row, so the gutter would be 24px of dead space;\n `indicator={false}` drops the check, and keeping the gutter would park\n the count and the chevron one gutter in from an edge nothing sits on;\n and for branches the question is per-LIST, not per-row, because the old\n `branch && !selectable` put neighbouring chevrons on 24px and 6px in\n nova. One `pe-*` is emitted either way, so nothing here depends on\n class-merge order. */\n leadingCheckbox || !showsIndicator || (branch && !branchesSelectable)\n ? ROW_FLUSH_CLASS\n : ROW_GUTTER_CLASS,\n /* ADDED to the style's own inset, never substituted: replacing it put\n depth 0 at 12px and depth 1 at 16px in maia, luma and sera, a 4px step.\n `_+_` because Tailwind's parser splits on whitespace. */\n mode === \"tree\" && \"ps-[calc(var(--cascader-row-inset,8px)_+_var(--cascader-indent,0px))]!\",\n className,\n ),\n };\n\n if (as === \"button\") {\n const buttonProps = { ...(props as React.ComponentProps<\"button\">) };\n // `role=\"button\"` allows none of these, so they are dropped, not passed.\n delete buttonProps[\"aria-setsize\"];\n delete buttonProps[\"aria-posinset\"];\n delete buttonProps[\"aria-level\"];\n\n return (\n <button\n type=\"button\"\n {...shared}\n /* Focus stays in the search input; the trail uses ArrowLeft. */\n tabIndex={-1}\n disabled={node.disabled}\n aria-disabled={node.disabled || undefined}\n onClick={handleButtonClick}\n onMouseDown={handleButtonMouseDown}\n {...buttonProps}\n >\n {body}\n </button>\n );\n }\n\n return (\n <ComboboxPrimitive.Item\n {...shared}\n value={node}\n /* THE one gate for the explicit index: supply one outside virtualized mode\n and the first arrow key leaves `aria-activedescendant` pointing at\n nothing. */\n {...(virtualized && index != null ? { index } : null)}\n disabled={node.disabled}\n /* Conditional spread, never `role={... : undefined}`: `mergeProps`\n iterates own keys, so `undefined` would delete `role=\"option\"`. */\n {...(mode === \"tree\"\n ? {\n role: \"treeitem\" as const,\n \"aria-level\": nodeDepth + 1,\n ...(branch ? { \"aria-expanded\": !!expanded } : null),\n }\n : branch\n ? { \"aria-haspopup\": \"listbox\" as const }\n : null)}\n /* Only ever `mixed`: a selected row already says so with `aria-selected`,\n and two selection attributes on one row is noise. */\n {...(indeterminate ? { \"aria-checked\": \"mixed\" as const } : null)}\n {...(hoverNavigates\n ? {\n onPointerEnter: handleHoverPointerEnter,\n onPointerLeave: cancelHoverNavigate,\n }\n : null)}\n onClick={handleClick}\n onMouseUp={handleMouseUp}\n {...props}\n >\n {body}\n </ComboboxPrimitive.Item>\n );\n});\n\n/** Ancestor chain under a deep-search result: \"Name\" alone is ambiguous. */\nfunction CascaderItemPath({ node }: { node: CascaderNode }) {\n const { index, labels } = useCascaderActions();\n const ancestors = getCascaderPath(index, node.value).slice(0, -1);\n if (!ancestors.length) return null;\n\n return (\n <span\n data-slot=\"cascader-item-path\"\n className=\"flex w-full items-center gap-0.5 truncate text-start text-muted-foreground text-xs\"\n >\n {ancestors.map((ancestor, i) => (\n <React.Fragment key={ancestor.value}>\n {i > 0 ? <span aria-hidden=\"true\">{labels.pathSeparator}</span> : null}\n <span className=\"truncate\">{ancestor.label}</span>\n </React.Fragment>\n ))}\n </span>\n );\n}\n\n/** Every load-derived prop a row needs. A PAGING row reports the level it\n * belongs to, a BRANCH row the level it OWNS; mutually exclusive, so one call\n * answers both. Exported because a memoised row cannot read them itself. */\nexport function getCascaderMoreProps(\n node: CascaderNode,\n loadStates: ReadonlyMap<string, CascaderLoadState>,\n): {\n loading: boolean;\n error: boolean;\n childrenLoading: boolean;\n childrenError: boolean;\n} {\n const parent = getCascaderMoreParent(node);\n if (parent == null) {\n const own = loadStates.get(node.value);\n return {\n loading: false,\n error: false,\n childrenLoading: !!own?.loading,\n childrenError: !!own?.error,\n };\n }\n const state = loadStates.get(parent);\n return {\n loading: !!state?.loading,\n error: !!state?.error,\n childrenLoading: false,\n childrenError: false,\n };\n}\n\nexport interface CascaderItemsProps {\n /** Replaces the default row for every item. */\n children?: (node: CascaderNode, index: number) => React.ReactNode;\n}\n\n/** Whatever the active view is: the current level, the deepest column, or the\n * flattened tree rows. Lives here so `cascader.tsx` never imports a row\n * component, which would cycle with the context. `index` is deliberately not\n * passed; see `CascaderItemProps`. */\nfunction CascaderItems({ children }: CascaderItemsProps) {\n const { mode, isBranch, isSelectable, isSelected, isIndeterminate } = useCascaderActions();\n const { renderedItems, deepResults, treeRows, loadStates } = useCascaderState();\n const showPath = deepResults !== null;\n\n // Answered once here, as plain booleans, so `React.memo` can skip a row.\n if (mode === \"tree\") {\n return (\n <>\n {treeRows.map((row, i) =>\n children ? (\n <React.Fragment key={row.node.value}>{children(row.node, i)}</React.Fragment>\n ) : (\n <CascaderItem\n key={row.node.value}\n node={row.node}\n depth={row.depth}\n expanded={row.expanded}\n branch={row.branch}\n selectable={isSelectable(row.node)}\n selected={isSelected(row.node)}\n indeterminate={isIndeterminate(row.node)}\n {...getCascaderMoreProps(row.node, loadStates)}\n aria-setsize={row.setSize}\n aria-posinset={row.posInSet}\n />\n ),\n )}\n </>\n );\n }\n\n return (\n <>\n {renderedItems.map((node, i) =>\n children ? (\n <React.Fragment key={node.value}>{children(node, i)}</React.Fragment>\n ) : (\n <CascaderItem\n key={node.value}\n node={node}\n showPath={showPath}\n branch={isBranch(node)}\n selectable={isSelectable(node)}\n selected={isSelected(node)}\n indeterminate={isIndeterminate(node)}\n {...getCascaderMoreProps(node, loadStates)}\n aria-setsize={renderedItems.length}\n aria-posinset={i + 1}\n />\n ),\n )}\n </>\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Group / Label / Separator */\n/* -------------------------------------------------------------------------- */\n\n// Whether a `CascaderLabel` has a group to name: Base UI's `Combobox.GroupLabel`\n// THROWS when there is none, and a heading is useful outside a group.\nconst CascaderGroupContext = React.createContext(false);\n\n// A heading over a run of rows. All eight styles are spelled out because the\n// type is not uniform (sera is uppercase), and the inset is the row's own.\nconst CASCADER_LABEL_CLASS = `text-muted-foreground text-xs py-1.5 ${CASCADER_ACTION_INSET_CLASS} block truncate`;\n\n// A rule between two runs. The inline margin is not the combobox separator's:\n// that cancels the container's padding with a per-style number, wrong in a\n// footer and 4px too much in lyra. `--cascader-list-pad` reaches the edge.\nconst CASCADER_SEPARATOR_CLASS =\n \"h-px bg-border my-1 mx-[calc(var(--cascader-list-pad,4px)*-1)]! shrink-0\";\n\nexport interface CascaderGroupProps extends Omit<ComboboxPrimitive.Group.Props, \"className\"> {\n /** Base UI also accepts a state callback here; the group has no state. */\n className?: string;\n}\n\n/** A run of related rows, named by the `CascaderLabel` inside it: the group is\n * `role=\"group\"` and Base UI points its `aria-labelledby` at the label, where a\n * heading alone inside a listbox is dropped from the accessibility tree.\n * Grouping is composition, not data: `CascaderItems` renders one flat run per\n * level, so its indices line up with `listRef`. */\nfunction CascaderGroup({ className, ...props }: CascaderGroupProps) {\n return (\n <CascaderGroupContext.Provider value={true}>\n <ComboboxPrimitive.Group\n data-slot=\"cascader-group\"\n className={cn(\"flex flex-col\", className)}\n {...props}\n />\n </CascaderGroupContext.Provider>\n );\n}\n\nexport interface CascaderLabelProps\n extends Omit<ComboboxPrimitive.GroupLabel.Props, \"className\" | \"style\"> {\n /** No state callback; outside a group this is not a Base UI part at all. */\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** Inside a group: the real thing, with the id association Base UI wires up. */\nfunction CascaderGroupLabel({ className, ...props }: CascaderLabelProps) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"cascader-label\"\n className={cn(CASCADER_LABEL_CLASS, className)}\n {...props}\n />\n );\n}\n\n// Outside a group: the same heading as a plain element. A separate component\n// rather than a branch, so the hook count cannot change when a label moves in.\nfunction CascaderPlainLabel({ className, ...props }: CascaderLabelProps) {\n const defaultProps = {\n \"data-slot\": \"cascader-label\",\n className: cn(CASCADER_LABEL_CLASS, className),\n };\n\n return useRender({\n defaultTagName: \"div\",\n render: props.render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n/** A heading. Inside `CascaderGroup` it is the group's accessible name; outside\n * one (the footer flyout is a menu, not a listbox) it is decoration only. */\nfunction CascaderLabel(props: CascaderLabelProps) {\n const grouped = React.useContext(CascaderGroupContext);\n return grouped ? <CascaderGroupLabel {...props} /> : <CascaderPlainLabel {...props} />;\n}\n\nexport interface CascaderSeparatorProps\n extends Omit<ComboboxPrimitive.Separator.Props, \"className\"> {\n /** Base UI also accepts a state callback here; only the orientation varies. */\n className?: string;\n}\n\n/** Decorative on purpose: Base UI's separator is `role=\"separator\"`, which a\n * `listbox` may not own, and a run that needs separating for a screen reader\n * needs a `CascaderGroup`, not a line. A consumer can pass the role back. */\nfunction CascaderSeparator({ className, ...props }: CascaderSeparatorProps) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"cascader-separator\"\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(CASCADER_SEPARATOR_CLASS, className)}\n {...props}\n />\n );\n}\n\nexport { CascaderGroup, CascaderItem, CascaderItems, CascaderLabel, CascaderSeparator };\n"],"mappings":";;;;;;;;;;;;AAoCA,MAAM,kBAAkB;AAIxB,MAAM,kBAAkB;AAKxB,MAAM,mBACJ;AAKF,MAAM,kBACJ;AAIF,MAAM,kBACJ;;;;;;;;;AAUF,MAAM,gBAAgB;AAEtB,MAAM,iBAAiB;AAEvB,MAAM,kBAAkB,GAAG,gBAAgB,uLAAuL;AAElO,MAAM,YAAY,GAAG,gBAAgB,GAAG,cAAc,GAAG;AAEzD,MAAM,8BAA8B,GAAG,gBAAgB,GAAG;;;;;;;;AAS1D,MAAa,wBAAwB,GAAG,gBAAgB,GAAG,eAAe,GAAG,gBAAgB;AAI7F,MAAM,uBAAuB;AAK7B,MAAM,yBACJ;AAOF,MAAM,sBAAsB;AAC5B,MAAM,uBAAuB;AAK7B,MAAM,8BAA8B;;;AAwDpC,MAAM,eAAeA,QAAM,KAAK,SAAS,aAAa,EACpD,MACA,OACA,OACA,WAAW,OACX,KAAK,UACL,UACA,SAAS,IACT,QAAQ,YACR,YAAY,gBACZ,UAAU,cACV,eAAe,mBACf,eAAe,mBACf,SACA,OACA,kBAAkB,OAClB,gBAAgB,OAChB,WACA,UACA,SACA,WACA,OACA,GAAG,SACiB;CAEpB,MAAM,EACJ,OAAO,WACP,MACA,QACA,UACA,cACA,YACA,iBACA,yBACA,UACA,oBACA,WAAW,kBACX,gBAAgB,SAChB,UACA,YACA,gBACA,QACA,aACA,UACA,eACE,mBAAmB;CAEvB,MAAM,EAAE,YAAY,gBAAgB,kBAAkB;CAEtD,MAAM,SAAS,cAAc,SAAS,IAAI;CAC1C,MAAM,aAAa,kBAAkB,aAAa,IA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{"version":3,"file":"cascader-item.js","names":["React","ComboboxPrimitive"],"sources":["../../../../src/components/reui/cascader/cascader-item.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { cn } from \"cn\";\nimport {\n CheckIcon,\n ChevronRightIcon,\n LoaderCircleIcon,\n MinusIcon,\n RotateCwIcon,\n} from \"lucide-react\";\n\nimport { Spinner } from \"../../ui/spinner\";\nimport { useCascaderActions, useCascaderRender, useCascaderState } from \"./cascader-context\";\nimport {\n getCascaderCount,\n getCascaderMoreParent,\n getCascaderPath,\n isCascaderMoreNode,\n} from \"./cascader-lib\";\nimport type { CascaderLoadState, CascaderNode } from \"./cascader-types\";\n\n// Base UI extends its synthetic events with a handler-veto escape hatch.\ntype VetoableEvent = { preventBaseUIHandler?: () => void };\n\n/** A row press. The veto hook is optional: an `as=\"button\"` row is outside Base\n * UI's listbox and gets a plain React event. */\nexport type CascaderRowEvent = React.MouseEvent<HTMLElement> & VetoableEvent;\n\n// Each style's inline inset, as a variable: a row and its absolutely positioned\n// check have to land on the same number, in LOGICAL properties. These eight\n// numbers MIRROR the shared style sheets; keep them in step with\n// `registry/styles/style-*.css`.\nconst ROW_INSET_CLASS = \"[--cascader-row-inset:6px]\";\n\n// Both insets equal, for a row with no check. `!` because a consumer may not\n// import the sheets into `layer(base)`, where the class would win on order.\nconst ROW_FLUSH_CLASS = \"ps-[var(--cascader-row-inset,8px)]! pe-[var(--cascader-row-inset,8px)]!\";\n\n// The same start inset plus room for the check. A flat `pr-8` is wrong in five\n// of the eight styles: 4px of slack in nova, 8px short in maia, luma and sera,\n// and no gutter at all in mira, whose check then overlaps its own label.\nconst ROW_GUTTER_CLASS =\n \"ps-[var(--cascader-row-inset,8px)]! pe-[calc(var(--cascader-row-inset,8px)*2_+_16px)]!\";\n\n// The check's box, inset to match the row's. A physical `right-2` neither\n// mirrors under RTL nor tracks the style's inset; `right-auto` comes with the\n// logical `end-*`, because width + `left` + `right` is over-constrained.\nconst INDICATOR_CLASS =\n \"pointer-events-none absolute flex items-center justify-center size-4 end-[var(--cascader-row-inset,8px)]! rtl:right-auto!\";\n\n// The row's type, gap, radius and icon size per style. No horizontal padding:\n// every row pairs this with `ROW_FLUSH_CLASS` or `ROW_GUTTER_CLASS`.\nconst ROW_THEME_CLASS =\n \"data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground [&_svg:not([class*='size-'])]:size-4 rounded-md py-1\";\n\n/**\n * The row's gap and type, per style, held apart from the rest of the theme.\n *\n * A row that pins its own gap or text size takes `ROW_SHELL_CLASS` and leaves\n * these out, because a `style-<name>:` utility is emitted AFTER the plain one\n * it would have to lose to. Not receiving the token beats overriding it with\n * `!`, which a consumer then has to fight in turn.\n */\nconst ROW_GAP_CLASS = \"gap-2\";\n\nconst ROW_TEXT_CLASS = \"text-sm\";\n\nconst ROW_SHELL_CLASS = `${ROW_THEME_CLASS} relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 ${ROW_INSET_CLASS}`;\n\nconst ROW_CLASS = `${ROW_SHELL_CLASS} ${ROW_GAP_CLASS} ${ROW_TEXT_CLASS}`;\n\nconst CASCADER_ACTION_INSET_CLASS = `${ROW_INSET_CLASS} ${ROW_FLUSH_CLASS}`;\n\n/** A footer COMMAND: the row theme, so it cannot drift from the list, plus the\n * hover and `focus-visible` fills a plain button never gets. Fills, never a\n * ring: a ring under rows that all paint with a fill read as a different\n * widget bolted on. `focus-visible`, not `focus`, so a pointer press does not\n * leave a command painted as if it were still hovered. Disabled keys off\n * `aria-disabled`, not `:disabled`, to keep it FOCUSABLE: a footer whose only\n * row is disabled has no tab stop. */\nexport const CASCADER_ACTION_CLASS = `${ROW_SHELL_CLASS} ${ROW_TEXT_CLASS} ${ROW_FLUSH_CLASS} hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground cursor-pointer gap-2 transition-colors aria-disabled:pointer-events-none aria-disabled:opacity-50`;\n\n// The box around the affordances that are not the row. 20px around a 16px icon,\n// the outer 2px cancelled at the call site; 24px would set the row height.\nconst AFFORDANCE_BOX_CLASS = \"flex size-5 shrink-0 items-center justify-center rounded-sm\";\n\n// What makes an affordance read as pressable on an already highlighted row. Not\n// `hover:bg-accent`: the row is `bg-accent` under the pointer, so the chip would\n// be invisible. `!` and `**:` for the `CHECKBOX_MARK_CLASS` reason.\nconst AFFORDANCE_HOVER_CLASS =\n \"transition-[background-color,box-shadow,color] hover:bg-background hover:text-foreground! hover:**:text-foreground! hover:shadow-xs\";\n\n// The selection MARK's colour, pinned so nothing can repaint it: every row\n// carries a DESCENDANT highlight rule, and a mark is STATE. Pinned TWICE\n// because icon sets draw with `fill`/`stroke=\"currentColor\"`, which the\n// `<path>` inherits and resolves against the PATH's own `color`. Both halves\n// are asserted in `cascader-behavior.test.tsx`.\nconst CHECKBOX_MARK_CLASS = \"text-primary-foreground! **:text-primary-foreground!\";\nconst INDICATOR_MARK_CLASS = \"text-foreground! **:text-foreground!\";\n\n// Milliseconds the pointer must rest on a branch row before\n// `expandTrigger=\"hover\"` drills in: long enough that a pointer crossing the\n// column on its way elsewhere opens nothing, short enough to read as immediate.\nconst CASCADER_HOVER_EXPAND_DELAY = 150;\n\nexport interface CascaderItemProps\n extends Omit<\n ComboboxPrimitive.Item.Props,\n \"value\" | \"children\" | \"className\" | \"style\" | \"onClick\" | \"onMouseUp\"\n > {\n /** No state callback: the row merges `className` and `style` itself. */\n className?: string;\n style?: React.CSSProperties;\n onClick?: (event: CascaderRowEvent) => void;\n onMouseUp?: (event: CascaderRowEvent) => void;\n node: CascaderNode;\n /** Explicit render index. Required while virtualized and DELIBERATELY IGNORED\n * otherwise: it self-registers the row and breaks `aria-activedescendant`. */\n index?: number;\n /** Indentation depth. Drives `--cascader-indent` in tree mode. */\n depth?: number;\n /** Renders the ancestor chain under the label, for deep-search results. */\n showPath?: boolean;\n /** `option` renders a real `Combobox.Item`; `button` renders identical markup\n * outside the listbox, for the ancestor columns in columns mode. */\n as?: \"option\" | \"button\";\n /** Tree mode: this row is an expanded branch. */\n expanded?: boolean;\n /** Indent each depth by this many pixels. Tree mode only. */\n indent?: number;\n /** Whether the node has children. Defaults to the cascader's own answer, as do\n * the three below: callers pass them because they already hold the level,\n * which keeps a memoised row off the volatile context. */\n branch?: boolean;\n /** Whether the node may be committed. Defaults to the cascader's own answer. */\n selectable?: boolean;\n /** Whether the node is currently selected. Defaults to the cascader's answer. */\n selected?: boolean;\n /** Some but not all of the loaded subtree selected. `cascade` only. */\n indeterminate?: boolean;\n /** Selected nodes below this one, at any depth. Drives the trailing count. */\n selectedCount?: number;\n /** Paging row only: a request for this level is in flight. */\n loading?: boolean;\n /** Paging row only: this level's last request failed. */\n error?: boolean;\n /** Branch row only: this node's OWN children are being fetched. The chevron\n * (or, in tree mode, the expander) becomes a spinner IN PLACE, in the same\n * 16px box: no skeleton row appears below, nothing reflows. */\n childrenLoading?: boolean;\n /** Branch row only: the last fetch of this node's children failed. The same\n * box becomes the retry. The press path is unchanged: it goes through\n * `navigate`, which refires the failed level rather than moving. */\n childrenError?: boolean;\n children?: React.ReactNode;\n}\n\n/** One row. Branch presses navigate instead of selecting, vetoed here with\n * `preventBaseUIHandler()` on `onClick` (Enter too) and on `onMouseUp`. */\nconst CascaderItem = React.memo(function CascaderItem({\n node,\n index,\n depth,\n showPath = false,\n as = \"option\",\n expanded,\n indent = 16,\n branch: branchProp,\n selectable: selectableProp,\n selected: selectedProp,\n indeterminate: indeterminateProp,\n selectedCount: selectedCountProp,\n loading,\n error,\n childrenLoading = false,\n childrenError = false,\n className,\n children,\n onClick,\n onMouseUp,\n style,\n ...props\n}: CascaderItemProps) {\n // The ACTIONS context only: the state context republishes on every keystroke.\n const {\n index: treeIndex,\n mode,\n labels,\n isBranch,\n isSelectable,\n isSelected,\n isIndeterminate,\n selectedDescendantCount,\n multiple,\n branchesSelectable,\n indicator: indicatorEnabled,\n expandTrigger = \"click\",\n navigate,\n navigateAt,\n toggleExpanded,\n commit,\n virtualized,\n loadMore,\n retryLevel,\n } = useCascaderActions();\n // Render props come from an always-current context, or a closure goes stale.\n const { renderItem, renderLabel } = useCascaderRender();\n\n const branch = branchProp ?? isBranch(node);\n const selectable = selectableProp ?? isSelectable(node);\n const selected = selectedProp ?? isSelected(node);\n // A selected node is never also partially selected (a dash in a filled box).\n const indeterminate = !selected && (indeterminateProp ?? isIndeterminate(node));\n const count = branch ? getCascaderCount(treeIndex, node) : 0;\n const nodeDepth = depth ?? treeIndex.depthOf.get(node.value) ?? 0;\n\n // O(1): the cascader publishes a map of selected-descendant counts, because a\n // row walking its own subtree is `rows x descendants`, paid every keystroke.\n const selectedDescendants = branch ? (selectedCountProp ?? selectedDescendantCount(node)) : 0;\n // `multiple` only: with a single selection the trigger, the breadcrumb and\n // the leaf's own check already say where it is, so swapping a branch's real\n // child total (\"24\") for a permanent \"1\" would trade a useful number away.\n const showsSelectedCount = multiple && selectedDescendants > 0;\n const trailingCount = showsSelectedCount ? selectedDescendants : count;\n // Shown selected or not: suppressing it under a checked branch read as data\n // loss, and the row's TWO trailing columns mean the count never has to share\n // a slot with the check.\n const showCount = trailingCount > 0;\n\n // Where a multi-select tree puts its checkbox: at the HEAD of the row, since a\n // trailing box does not follow the label stagger. Per-LIST, never per-row, or\n // the labels below an unselectable row step back out.\n const leadingCheckbox = mode === \"tree\" && multiple;\n\n // Whether this row draws a MARK, and so whether it reserves the gutter one\n // needs. `|| multiple` is the scope of the opt-out: a checkbox is the\n // selection CONTROL, so `indicator={false}` is a no-op in multi-select.\n const showsIndicator = indicatorEnabled || multiple;\n\n const veto = React.useCallback((event: VetoableEvent) => {\n event.preventBaseUIHandler?.();\n }, []);\n\n const handleClick = React.useCallback(\n (event: CascaderRowEvent) => {\n onClick?.(event);\n if (node.disabled) return;\n if (branch && !selectable) {\n veto(event);\n navigate(node);\n }\n },\n [onClick, node, branch, selectable, veto, navigate],\n );\n\n const handleMouseUp = React.useCallback(\n (event: CascaderRowEvent) => {\n onMouseUp?.(event);\n if (node.disabled) return;\n if (branch && !selectable) veto(event);\n },\n [onMouseUp, node, branch, selectable, veto],\n );\n\n // The tree expander's own press. With `selectable=\"any\"` the row press\n // commits, and under `cascade` that selected a whole subtree while the row\n // stayed collapsed, so expanding needs its own target. `stopPropagation`\n // before the veto, so Base UI's handler never runs, and no role: nesting\n // one in `role=\"option\"` fails axe. `navigate` fetches BEFORE it opens.\n const handleExpanderClick = React.useCallback(\n (event: CascaderRowEvent) => {\n event.stopPropagation();\n veto(event);\n if (node.disabled) return;\n if (expanded) toggleExpanded(node.value);\n else navigate(node);\n },\n [veto, node, expanded, toggleExpanded, navigate],\n );\n\n const handleExpanderMouseUp = React.useCallback(\n (event: CascaderRowEvent) => {\n // Base UI treats a drag-select mouseup as a commit; this is not one.\n event.stopPropagation();\n veto(event);\n },\n [veto],\n );\n\n const handleChevronClick = React.useCallback(\n (event: CascaderRowEvent) => {\n event.stopPropagation();\n veto(event);\n if (node.disabled) return;\n // `navigate` falls through to `pushLevel`, which APPENDS: right in the\n // deepest column, but from an ancestor column it duplicated the level and\n // corrupted the path. `navigateAt` rebuilds the trail from this depth.\n if (as === \"button\") navigateAt(node, depth ?? 0);\n else navigate(node);\n },\n [veto, node, as, navigateAt, depth, navigate],\n );\n\n const handleChevronMouseUp = React.useCallback((event: CascaderRowEvent) => veto(event), [veto]);\n\n // Keeps focus in the search field: Base UI prevents the mousedown default for\n // option rows, and focusing a `tabindex=\"-1\"` trail row kills every key.\n const handleButtonMouseDown = React.useCallback((event: React.MouseEvent<HTMLElement>) => {\n event.preventDefault();\n }, []);\n\n const handleButtonClick = React.useCallback(\n (event: CascaderRowEvent) => {\n onClick?.(event);\n if (node.disabled) return;\n if (branch && !selectable) {\n // Button rows only exist in the columns trail, where `depth` is the\n // column's own depth, so navigating replaces the trail from here.\n navigateAt(node, depth ?? 0);\n return;\n }\n if (selectable) commit(node);\n },\n [onClick, node, branch, selectable, navigateAt, depth, commit],\n );\n\n // The paging row's press, never a selection, whatever `selectable` says.\n const handleMoreClick = React.useCallback(\n (event: CascaderRowEvent) => {\n onClick?.(event);\n veto(event);\n const parent = getCascaderMoreParent(node);\n if (parent == null) return;\n if (error) retryLevel(parent);\n else if (!loading) loadMore(parent);\n },\n [onClick, veto, node, error, loading, retryLevel, loadMore],\n );\n\n // `expandTrigger=\"hover\"`: resting on a BRANCH row in the ACTIVE column drills\n // in after a delay. The deepest column of columns mode only, and it never\n // commits, so a pointer crossing the panel cannot change the value.\n const hoverNavigates =\n expandTrigger === \"hover\" && mode === \"columns\" && as === \"option\" && branch && !node.disabled;\n const hoverTimerRef = React.useRef<number | null>(null);\n\n const cancelHoverNavigate = React.useCallback(() => {\n if (hoverTimerRef.current == null) return;\n window.clearTimeout(hoverTimerRef.current);\n hoverTimerRef.current = null;\n }, []);\n\n const handleHoverPointerEnter = React.useCallback(() => {\n cancelHoverNavigate();\n hoverTimerRef.current = window.setTimeout(() => {\n hoverTimerRef.current = null;\n navigate(node);\n }, CASCADER_HOVER_EXPAND_DELAY);\n }, [cancelHoverNavigate, navigate, node]);\n\n // Drilling in demotes this column to the trail WITHOUT unmounting the row, so\n // a pending timer has to die or it fires `navigate` from an inactive column.\n React.useEffect(() => {\n if (!hoverNavigates) cancelHoverNavigate();\n }, [hoverNavigates, cancelHoverNavigate]);\n React.useEffect(() => cancelHoverNavigate, [cancelHoverNavigate]);\n\n /* ------------------------------- paging row ------------------------------ */\n\n if (isCascaderMoreNode(node)) {\n const text = error\n ? labels.error\n : loading\n ? node.count\n ? labels.loadingMore\n : labels.loading\n : labels.loadMore;\n\n const moreStyle =\n mode === \"tree\" && nodeDepth > 0\n ? ({\n ...style,\n \"--cascader-indent\": `${nodeDepth * indent}px`,\n } as React.CSSProperties)\n : style;\n\n const moreShared = {\n \"data-slot\": \"cascader-item\",\n \"data-more\": \"\",\n \"data-state\": error ? \"error\" : loading ? \"loading\" : \"idle\",\n \"data-depth\": nodeDepth,\n style: moreStyle,\n className: cn(\n ROW_SHELL_CLASS,\n ROW_FLUSH_CLASS,\n \"justify-center gap-1.5 text-muted-foreground text-xs\",\n !error && !loading && \"hover:text-foreground\",\n mode === \"tree\" && \"ps-[calc(var(--cascader-row-inset,8px)_+_var(--cascader-indent,0px))]!\",\n className,\n ),\n };\n\n const moreBody = children ?? (\n <>\n {loading ? <LoaderCircleIcon className=\"size-3.5 animate-spin\" aria-hidden /> : null}\n <span>{text}</span>\n {/* TEXT, not a button: a focusable element inside a `role=\"option\"`\n row is a `nested-interactive` violation. */}\n {error ? <span className=\"font-medium text-foreground\">{labels.retry}</span> : null}\n </>\n );\n\n if (as === \"button\") {\n const buttonProps = { ...(props as React.ComponentProps<\"button\">) };\n delete buttonProps[\"aria-setsize\"];\n delete buttonProps[\"aria-posinset\"];\n delete buttonProps[\"aria-level\"];\n\n return (\n <button\n type=\"button\"\n {...moreShared}\n tabIndex={-1}\n onClick={handleMoreClick}\n {...buttonProps}\n >\n {moreBody}\n </button>\n );\n }\n\n return (\n <ComboboxPrimitive.Item\n {...moreShared}\n value={node}\n {...(virtualized && index != null ? { index } : null)}\n {...(mode === \"tree\" ? { role: \"treeitem\" as const, \"aria-level\": nodeDepth + 1 } : null)}\n onClick={handleMoreClick}\n onMouseUp={veto}\n {...props}\n >\n {moreBody}\n </ComboboxPrimitive.Item>\n );\n }\n\n const itemState = {\n branch,\n selected,\n disabled: !!node.disabled,\n depth: nodeDepth,\n count,\n path: showPath ? getCascaderPath(treeIndex, node.value).slice(0, -1) : [],\n };\n\n const custom = renderItem?.(node, itemState);\n const customLabel = renderLabel?.(node, itemState);\n\n // What the markup cannot say: a branch would announce \"Person 24\", a naked\n // number. Trail rows are outside the listbox, so they need words for state.\n const srDetails = [\n branch ? labels.itemCount(count) : null,\n showsSelectedCount ? labels.selectedCount(selectedDescendants) : null,\n branch && mode !== \"tree\" ? labels.branchAffordance : null,\n as === \"button\" && selected ? labels.selectedState : null,\n // Option rows say this with `aria-checked=\"mixed\"`; `role=\"button\"` allows\n // neither that nor `aria-selected`, so a trail row says it in words.\n as === \"button\" && indeterminate ? labels.partiallySelectedState : null,\n ]\n .filter(Boolean)\n .map((detail) => `, ${detail}`)\n .join(\"\");\n\n // Extracted because tree mode renders it INLINE at the head of the row. It\n // reads `data-selected` off the ROW, so it also works on the trail rows.\n const checkbox = (\n <span\n data-slot=\"cascader-item-checkbox\"\n className=\"flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input in-data-indeterminate:border-primary in-data-selected:border-primary in-data-indeterminate:bg-primary in-data-selected:bg-primary in-data-indeterminate:text-primary-foreground in-data-selected:text-primary-foreground transition-colors\"\n >\n {/* Colour declared ON THE ICON with `!`; see `CHECKBOX_MARK_CLASS`. */}\n {indeterminate ? (\n <MinusIcon data-slot=\"cascader-item-dash\" className={cn(CHECKBOX_MARK_CLASS, \"size-3\")} />\n ) : (\n <CheckIcon\n data-slot=\"cascader-item-tick\"\n className={cn(CHECKBOX_MARK_CLASS, \"size-3 in-data-selected:opacity-100 opacity-0\")}\n />\n )}\n </span>\n );\n\n const indicator = (\n <>\n {multiple ? (\n checkbox\n ) : (\n <CheckIcon\n data-slot=\"cascader-item-check\"\n className={cn(\"pointer-events-none\", INDICATOR_MARK_CLASS)}\n />\n )}\n </>\n );\n\n const body = custom ?? children ?? (\n <>\n {/* Tree mode expands in place, so the branch marker leads the row. */}\n {mode === \"tree\" && branch ? (\n <span\n data-slot=\"cascader-item-expander\"\n /* Pure affordance: the row itself carries `aria-expanded`. */\n aria-hidden=\"true\"\n data-state={childrenError ? \"error\" : childrenLoading ? \"loading\" : \"idle\"}\n onClick={handleExpanderClick}\n onMouseUp={handleExpanderMouseUp}\n className={cn(\n \"-ms-0.5\",\n childrenError ? \"text-destructive\" : \"text-muted-foreground\",\n AFFORDANCE_BOX_CLASS,\n AFFORDANCE_HOVER_CLASS,\n childrenLoading && \"pointer-events-none\",\n )}\n >\n {childrenLoading ? (\n <Spinner aria-hidden=\"true\" className=\"size-4\" />\n ) : childrenError ? (\n <RotateCwIcon className=\"size-4\" />\n ) : (\n <ChevronRightIcon\n className={cn(\n \"size-4 transition-transform\",\n /* Collapsed it points INTO the level, so it mirrors; expanded\n it points DOWN, the same in both writing modes, so the mirror\n has to come off or `scaleX(-1)` composed with `rotate(90deg)`\n lands it pointing up. `rtl:rotate-90` beside `rotate-90` was\n a no-op that only looked like it handled this. */\n expanded ? \"rotate-90\" : \"rtl:-scale-x-100\",\n )}\n />\n )}\n </span>\n ) : mode === \"tree\" ? (\n // A LEAF's expander slot, reserved and empty: without it a leaf's label\n // started 28px off its sibling branches' and read as one level up.\n <span\n data-slot=\"cascader-item-expander-spacer\"\n aria-hidden=\"true\"\n className={cn(\"-ms-0.5\", AFFORDANCE_BOX_CLASS)}\n />\n ) : null}\n\n {/* Tree + multi-select: the box leads the row, and an unselectable row\n still reserves its width. */}\n {leadingCheckbox ? (\n selectable ? (\n checkbox\n ) : (\n <span\n data-slot=\"cascader-item-checkbox-spacer\"\n aria-hidden=\"true\"\n className=\"size-4 shrink-0\"\n />\n )\n ) : null}\n\n {node.icon ? (\n <span\n data-slot=\"cascader-item-icon\"\n className=\"flex shrink-0 items-center justify-center text-muted-foreground\"\n >\n {node.icon}\n </span>\n ) : null}\n\n {/* The row box is sized for pieces side by side; this one stacks, so it\n restates the gap: 8px reads as a paragraph break, not a subtitle. */}\n <span className=\"flex min-w-0 flex-1 flex-col items-start gap-0.5\">\n {customLabel ?? (\n <>\n <span className=\"w-full truncate text-start\">{node.label}</span>\n {node.description ? (\n <span\n data-slot=\"cascader-item-description\"\n className=\"w-full truncate text-start text-muted-foreground text-xs\"\n >\n {node.description}\n </span>\n ) : null}\n </>\n )}\n {showPath ? <CascaderItemPath node={node} /> : null}\n </span>\n\n {/* The count is a bare number, and nothing else says a branch opens. */}\n {srDetails ? (\n <span data-slot=\"cascader-item-details\" className=\"sr-only\">\n {srDetails}\n </span>\n ) : null}\n\n {/* Tree mode expands in place, so it has no drill-in chevron. */}\n {branch && mode !== \"tree\" ? (\n <span\n data-slot=\"cascader-item-trailing\"\n aria-hidden=\"true\"\n className=\"ms-auto flex shrink-0 items-center gap-1 text-muted-foreground text-xs tabular-nums\"\n >\n {showCount ? (\n <span\n data-slot=\"cascader-item-count\"\n /* The marker a consumer (and a test) reads to tell the two\n numbers apart without matching on a colour class. */\n {...(showsSelectedCount ? { \"data-selected-count\": \"\" } : null)}\n className={cn(showsSelectedCount && \"text-primary!\")}\n >\n {trailingCount}\n </span>\n ) : null}\n {/* ONLY the chevron is the drill target: sharing a hit area with the count made a number pressable. */}\n {/** biome-ignore lint/a11y/useKeyWithClickEvents: <> */}\n <span\n data-slot=\"cascader-item-chevron\"\n data-state={childrenError ? \"error\" : childrenLoading ? \"loading\" : \"idle\"}\n onClick={selectable ? handleChevronClick : undefined}\n onMouseUp={selectable ? handleChevronMouseUp : undefined}\n onMouseDown={as === \"button\" ? handleButtonMouseDown : undefined}\n className={cn(\n /* Cancels the box's outer slack, so the icon keeps its column. */\n \"-me-0.5\",\n AFFORDANCE_BOX_CLASS,\n selectable && AFFORDANCE_HOVER_CLASS,\n childrenError && \"text-destructive\",\n childrenLoading && \"pointer-events-none\",\n )}\n >\n {childrenLoading ? (\n <Spinner aria-hidden=\"true\" className=\"size-4\" />\n ) : childrenError ? (\n <RotateCwIcon className=\"size-4\" />\n ) : (\n <ChevronRightIcon className=\"size-4 rtl:-scale-x-100\" />\n )}\n </span>\n </span>\n ) : null}\n\n {branch && mode === \"tree\" && showCount ? (\n <span\n data-slot=\"cascader-item-count\"\n {...(showsSelectedCount ? { \"data-selected-count\": \"\" } : null)}\n /* The count is spoken by the sr-only details span instead. */\n aria-hidden=\"true\"\n className={cn(\n \"ms-auto shrink-0 text-muted-foreground text-xs tabular-nums\",\n showsSelectedCount && \"text-primary!\",\n )}\n >\n {trailingCount}\n </span>\n ) : null}\n\n {/* No trailing indicator when a tree's box led the row, or when\n `indicator={false}` opted out. See `showsIndicator`. */}\n {selectable && !leadingCheckbox && showsIndicator ? (\n as === \"button\" ? (\n // No ItemIndicator outside Base UI: `data-selected` drives it.\n (multiple || selected) && (\n <span data-slot=\"cascader-item-indicator\" className={INDICATOR_CLASS}>\n {indicator}\n </span>\n )\n ) : (\n <ComboboxPrimitive.ItemIndicator\n /* Kept mounted for a partial selection too: the row is not\n selected, so Base UI would unmount the box the dash lives in. */\n keepMounted={multiple || indeterminate}\n render={<span data-slot=\"cascader-item-indicator\" className={INDICATOR_CLASS} />}\n >\n {indicator}\n </ComboboxPrimitive.ItemIndicator>\n )\n ) : null}\n </>\n );\n\n const rowStyle =\n mode === \"tree\" && nodeDepth > 0\n ? ({\n ...style,\n \"--cascader-indent\": `${nodeDepth * indent}px`,\n } as React.CSSProperties)\n : style;\n\n const shared = {\n \"data-slot\": \"cascader-item\",\n \"data-branch\": branch || undefined,\n \"data-selected\": selected || undefined,\n \"data-indeterminate\": indeterminate || undefined,\n \"data-depth\": nodeDepth,\n \"data-expanded\": expanded || undefined,\n // No `aria-level`: `role=\"option\"` allows only `aria-selected`,\n // `aria-checked`, `aria-posinset` and `aria-setsize`, and a `role=\"button\"`\n // trail row allows none of the four. Only tree mode has a role that takes a\n // level, and it adds one below.\n style: rowStyle,\n className: cn(\n ROW_CLASS,\n /* Three separate reasons to hand the check gutter back. A multi-select\n tree's box leads the row, so the gutter would be 24px of dead space;\n `indicator={false}` drops the check, and keeping the gutter would park\n the count and the chevron one gutter in from an edge nothing sits on;\n and for branches the question is per-LIST, not per-row, because the old\n `branch && !selectable` put neighbouring chevrons on 24px and 6px in\n nova. One `pe-*` is emitted either way, so nothing here depends on\n class-merge order. */\n leadingCheckbox || !showsIndicator || (branch && !branchesSelectable)\n ? ROW_FLUSH_CLASS\n : ROW_GUTTER_CLASS,\n /* ADDED to the style's own inset, never substituted: replacing it put\n depth 0 at 12px and depth 1 at 16px in maia, luma and sera, a 4px step.\n `_+_` because Tailwind's parser splits on whitespace. */\n mode === \"tree\" && \"ps-[calc(var(--cascader-row-inset,8px)_+_var(--cascader-indent,0px))]!\",\n className,\n ),\n };\n\n if (as === \"button\") {\n const buttonProps = { ...(props as React.ComponentProps<\"button\">) };\n // `role=\"button\"` allows none of these, so they are dropped, not passed.\n delete buttonProps[\"aria-setsize\"];\n delete buttonProps[\"aria-posinset\"];\n delete buttonProps[\"aria-level\"];\n\n return (\n <button\n type=\"button\"\n {...shared}\n /* Focus stays in the search input; the trail uses ArrowLeft. */\n tabIndex={-1}\n disabled={node.disabled}\n aria-disabled={node.disabled || undefined}\n onClick={handleButtonClick}\n onMouseDown={handleButtonMouseDown}\n {...buttonProps}\n >\n {body}\n </button>\n );\n }\n\n return (\n <ComboboxPrimitive.Item\n {...shared}\n value={node}\n /* THE one gate for the explicit index: supply one outside virtualized mode\n and the first arrow key leaves `aria-activedescendant` pointing at\n nothing. */\n {...(virtualized && index != null ? { index } : null)}\n disabled={node.disabled}\n /* Conditional spread, never `role={... : undefined}`: `mergeProps`\n iterates own keys, so `undefined` would delete `role=\"option\"`. */\n {...(mode === \"tree\"\n ? {\n role: \"treeitem\" as const,\n \"aria-level\": nodeDepth + 1,\n ...(branch ? { \"aria-expanded\": !!expanded } : null),\n }\n : branch\n ? { \"aria-haspopup\": \"listbox\" as const }\n : null)}\n /* Only ever `mixed`: a selected row already says so with `aria-selected`,\n and two selection attributes on one row is noise. */\n {...(indeterminate ? { \"aria-checked\": \"mixed\" as const } : null)}\n {...(hoverNavigates\n ? {\n onPointerEnter: handleHoverPointerEnter,\n onPointerLeave: cancelHoverNavigate,\n }\n : null)}\n onClick={handleClick}\n onMouseUp={handleMouseUp}\n {...props}\n >\n {body}\n </ComboboxPrimitive.Item>\n );\n});\n\n/** Ancestor chain under a deep-search result: \"Name\" alone is ambiguous. */\nfunction CascaderItemPath({ node }: { node: CascaderNode }) {\n const { index, labels } = useCascaderActions();\n const ancestors = getCascaderPath(index, node.value).slice(0, -1);\n if (!ancestors.length) return null;\n\n return (\n <span\n data-slot=\"cascader-item-path\"\n className=\"flex w-full items-center gap-0.5 truncate text-start text-muted-foreground text-xs\"\n >\n {ancestors.map((ancestor, i) => (\n <React.Fragment key={ancestor.value}>\n {i > 0 ? <span aria-hidden=\"true\">{labels.pathSeparator}</span> : null}\n <span className=\"truncate\">{ancestor.label}</span>\n </React.Fragment>\n ))}\n </span>\n );\n}\n\n/** Every load-derived prop a row needs. A PAGING row reports the level it\n * belongs to, a BRANCH row the level it OWNS; mutually exclusive, so one call\n * answers both. Exported because a memoised row cannot read them itself. */\nexport function getCascaderMoreProps(\n node: CascaderNode,\n loadStates: ReadonlyMap<string, CascaderLoadState>,\n): {\n loading: boolean;\n error: boolean;\n childrenLoading: boolean;\n childrenError: boolean;\n} {\n const parent = getCascaderMoreParent(node);\n if (parent == null) {\n const own = loadStates.get(node.value);\n return {\n loading: false,\n error: false,\n childrenLoading: !!own?.loading,\n childrenError: !!own?.error,\n };\n }\n const state = loadStates.get(parent);\n return {\n loading: !!state?.loading,\n error: !!state?.error,\n childrenLoading: false,\n childrenError: false,\n };\n}\n\nexport interface CascaderItemsProps {\n /** Replaces the default row for every item. */\n children?: (node: CascaderNode, index: number) => React.ReactNode;\n}\n\n/** Whatever the active view is: the current level, the deepest column, or the\n * flattened tree rows. Lives here so `cascader.tsx` never imports a row\n * component, which would cycle with the context. `index` is deliberately not\n * passed; see `CascaderItemProps`. */\nfunction CascaderItems({ children }: CascaderItemsProps) {\n const { mode, isBranch, isSelectable, isSelected, isIndeterminate } = useCascaderActions();\n const { renderedItems, deepResults, treeRows, loadStates } = useCascaderState();\n const showPath = deepResults !== null;\n\n // Answered once here, as plain booleans, so `React.memo` can skip a row.\n if (mode === \"tree\") {\n return (\n <>\n {treeRows.map((row, i) =>\n children ? (\n <React.Fragment key={row.node.value}>{children(row.node, i)}</React.Fragment>\n ) : (\n <CascaderItem\n key={row.node.value}\n node={row.node}\n depth={row.depth}\n expanded={row.expanded}\n branch={row.branch}\n selectable={isSelectable(row.node)}\n selected={isSelected(row.node)}\n indeterminate={isIndeterminate(row.node)}\n {...getCascaderMoreProps(row.node, loadStates)}\n aria-setsize={row.setSize}\n aria-posinset={row.posInSet}\n />\n ),\n )}\n </>\n );\n }\n\n return (\n <>\n {renderedItems.map((node, i) =>\n children ? (\n <React.Fragment key={node.value}>{children(node, i)}</React.Fragment>\n ) : (\n <CascaderItem\n key={node.value}\n node={node}\n showPath={showPath}\n branch={isBranch(node)}\n selectable={isSelectable(node)}\n selected={isSelected(node)}\n indeterminate={isIndeterminate(node)}\n {...getCascaderMoreProps(node, loadStates)}\n aria-setsize={renderedItems.length}\n aria-posinset={i + 1}\n />\n ),\n )}\n </>\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Group / Label / Separator */\n/* -------------------------------------------------------------------------- */\n\n// Whether a `CascaderLabel` has a group to name: Base UI's `Combobox.GroupLabel`\n// THROWS when there is none, and a heading is useful outside a group.\nconst CascaderGroupContext = React.createContext(false);\n\n// A heading over a run of rows. All eight styles are spelled out because the\n// type is not uniform (sera is uppercase), and the inset is the row's own.\nconst CASCADER_LABEL_CLASS = `text-muted-foreground text-xs py-1.5 ${CASCADER_ACTION_INSET_CLASS} block truncate`;\n\n// A rule between two runs. The inline margin is not the combobox separator's:\n// that cancels the container's padding with a per-style number, wrong in a\n// footer and 4px too much in lyra. `--cascader-list-pad` reaches the edge.\nconst CASCADER_SEPARATOR_CLASS =\n \"h-px bg-border my-1 mx-[calc(var(--cascader-list-pad,4px)*-1)]! shrink-0\";\n\nexport interface CascaderGroupProps extends Omit<ComboboxPrimitive.Group.Props, \"className\"> {\n /** Base UI also accepts a state callback here; the group has no state. */\n className?: string;\n}\n\n/** A run of related rows, named by the `CascaderLabel` inside it: the group is\n * `role=\"group\"` and Base UI points its `aria-labelledby` at the label, where a\n * heading alone inside a listbox is dropped from the accessibility tree.\n * Grouping is composition, not data: `CascaderItems` renders one flat run per\n * level, so its indices line up with `listRef`. */\nfunction CascaderGroup({ className, ...props }: CascaderGroupProps) {\n return (\n <CascaderGroupContext.Provider value={true}>\n <ComboboxPrimitive.Group\n data-slot=\"cascader-group\"\n className={cn(\"flex flex-col\", className)}\n {...props}\n />\n </CascaderGroupContext.Provider>\n );\n}\n\nexport interface CascaderLabelProps\n extends Omit<ComboboxPrimitive.GroupLabel.Props, \"className\" | \"style\"> {\n /** No state callback; outside a group this is not a Base UI part at all. */\n className?: string;\n style?: React.CSSProperties;\n}\n\n/** Inside a group: the real thing, with the id association Base UI wires up. */\nfunction CascaderGroupLabel({ className, ...props }: CascaderLabelProps) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"cascader-label\"\n className={cn(CASCADER_LABEL_CLASS, className)}\n {...props}\n />\n );\n}\n\n// Outside a group: the same heading as a plain element. A separate component\n// rather than a branch, so the hook count cannot change when a label moves in.\nfunction CascaderPlainLabel({ className, ...props }: CascaderLabelProps) {\n const defaultProps = {\n \"data-slot\": \"cascader-label\",\n className: cn(CASCADER_LABEL_CLASS, className),\n };\n\n return useRender({\n defaultTagName: \"div\",\n render: props.render,\n props: mergeProps<\"div\">(defaultProps, props),\n });\n}\n\n/** A heading. Inside `CascaderGroup` it is the group's accessible name; outside\n * one (the footer flyout is a menu, not a listbox) it is decoration only. */\nfunction CascaderLabel(props: CascaderLabelProps) {\n const grouped = React.useContext(CascaderGroupContext);\n return grouped ? <CascaderGroupLabel {...props} /> : <CascaderPlainLabel {...props} />;\n}\n\nexport interface CascaderSeparatorProps\n extends Omit<ComboboxPrimitive.Separator.Props, \"className\"> {\n /** Base UI also accepts a state callback here; only the orientation varies. */\n className?: string;\n}\n\n/** Decorative on purpose: Base UI's separator is `role=\"separator\"`, which a\n * `listbox` may not own, and a run that needs separating for a screen reader\n * needs a `CascaderGroup`, not a line. A consumer can pass the role back. */\nfunction CascaderSeparator({ className, ...props }: CascaderSeparatorProps) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"cascader-separator\"\n role=\"presentation\"\n aria-hidden=\"true\"\n className={cn(CASCADER_SEPARATOR_CLASS, className)}\n {...props}\n />\n );\n}\n\nexport { CascaderGroup, CascaderItem, CascaderItems, CascaderLabel, CascaderSeparator };\n"],"mappings":";;;;;;;;;;;;AAoCA,MAAM,kBAAkB;AAIxB,MAAM,kBAAkB;AAKxB,MAAM,mBACJ;AAKF,MAAM,kBACJ;AAIF,MAAM,kBACJ;;;;;;;;;AAUF,MAAM,gBAAgB;AAEtB,MAAM,iBAAiB;AAEvB,MAAM,kBAAkB,GAAG,gBAAgB,uLAAuL;AAElO,MAAM,YAAY,GAAG,gBAAgB,GAAG,cAAc,GAAG;AAEzD,MAAM,8BAA8B,GAAG,gBAAgB,GAAG;;;;;;;;AAS1D,MAAa,wBAAwB,GAAG,gBAAgB,GAAG,eAAe,GAAG,gBAAgB;AAI7F,MAAM,uBAAuB;AAK7B,MAAM,yBACJ;AAOF,MAAM,sBAAsB;AAC5B,MAAM,uBAAuB;AAK7B,MAAM,8BAA8B;;;AAwDpC,MAAM,eAAeA,QAAM,KAAK,SAAS,aAAa,EACpD,MACA,OACA,OACA,WAAW,OACX,KAAK,UACL,UACA,SAAS,IACT,QAAQ,YACR,YAAY,gBACZ,UAAU,cACV,eAAe,mBACf,eAAe,mBACf,SACA,OACA,kBAAkB,OAClB,gBAAgB,OAChB,WACA,UACA,SACA,WACA,OACA,GAAG,SACiB;CAEpB,MAAM,EACJ,OAAO,WACP,MACA,QACA,UACA,cACA,YACA,iBACA,yBACA,UACA,oBACA,WAAW,kBACX,gBAAgB,SAChB,UACA,YACA,gBACA,QACA,aACA,UACA,eACE,mBAAmB;CAEvB,MAAM,EAAE,YAAY,gBAAgB,kBAAkB;CAEtD,MAAM,SAAS,cAAc,SAAS,IAAI;CAC1C,MAAM,aAAa,kBAAkB,aAAa,IAAI;CACtD,MAAM,WAAW,gBAAgB,WAAW,IAAI;CAEhD,MA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