@constructive-io/ui 0.6.0 → 0.6.1

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 (414) hide show
  1. package/dist/button-D4vqTxhp.d.cts +20 -0
  2. package/dist/button-D4vqTxhp.d.ts +20 -0
  3. package/dist/components/alert-dialog.cjs +98 -302
  4. package/dist/components/alert-dialog.cjs.map +1 -1
  5. package/dist/components/alert-dialog.d.cts +22 -21
  6. package/dist/components/alert-dialog.d.ts +22 -21
  7. package/dist/components/alert-dialog.js +96 -281
  8. package/dist/components/alert-dialog.js.map +1 -1
  9. package/dist/components/alert.cjs +51 -108
  10. package/dist/components/alert.cjs.map +1 -1
  11. package/dist/components/alert.d.cts +13 -13
  12. package/dist/components/alert.d.ts +13 -13
  13. package/dist/components/alert.js +49 -87
  14. package/dist/components/alert.js.map +1 -1
  15. package/dist/components/app-bar.cjs +73 -359
  16. package/dist/components/app-bar.cjs.map +1 -1
  17. package/dist/components/app-bar.d.cts +21 -20
  18. package/dist/components/app-bar.d.ts +21 -20
  19. package/dist/components/app-bar.js +71 -338
  20. package/dist/components/app-bar.js.map +1 -1
  21. package/dist/components/app-shell.cjs +252 -1777
  22. package/dist/components/app-shell.cjs.map +1 -1
  23. package/dist/components/app-shell.d.cts +77 -85
  24. package/dist/components/app-shell.d.ts +77 -85
  25. package/dist/components/app-shell.js +249 -1756
  26. package/dist/components/app-shell.js.map +1 -1
  27. package/dist/components/autocomplete.cjs +146 -397
  28. package/dist/components/autocomplete.cjs.map +1 -1
  29. package/dist/components/autocomplete.d.cts +24 -24
  30. package/dist/components/autocomplete.d.ts +24 -24
  31. package/dist/components/autocomplete.js +146 -376
  32. package/dist/components/autocomplete.js.map +1 -1
  33. package/dist/components/avatar.cjs +26 -38
  34. package/dist/components/avatar.cjs.map +1 -1
  35. package/dist/components/avatar.d.cts +11 -10
  36. package/dist/components/avatar.d.ts +11 -10
  37. package/dist/components/avatar.js +24 -37
  38. package/dist/components/avatar.js.map +1 -1
  39. package/dist/components/badge.cjs +42 -60
  40. package/dist/components/badge.cjs.map +1 -1
  41. package/dist/components/badge.d.cts +13 -13
  42. package/dist/components/badge.d.ts +13 -13
  43. package/dist/components/badge.js +39 -38
  44. package/dist/components/badge.js.map +1 -1
  45. package/dist/components/breadcrumb.cjs +65 -94
  46. package/dist/components/breadcrumb.cjs.map +1 -1
  47. package/dist/components/breadcrumb.d.cts +14 -13
  48. package/dist/components/breadcrumb.d.ts +14 -13
  49. package/dist/components/breadcrumb.js +63 -73
  50. package/dist/components/breadcrumb.js.map +1 -1
  51. package/dist/components/button.cjs +68 -162
  52. package/dist/components/button.cjs.map +1 -1
  53. package/dist/components/button.d.cts +2 -20
  54. package/dist/components/button.d.ts +2 -20
  55. package/dist/components/button.js +65 -140
  56. package/dist/components/button.js.map +1 -1
  57. package/dist/components/calendar-rac.cjs +49 -62
  58. package/dist/components/calendar-rac.cjs.map +1 -1
  59. package/dist/components/calendar-rac.d.cts +8 -8
  60. package/dist/components/calendar-rac.d.ts +8 -8
  61. package/dist/components/calendar-rac.js +49 -61
  62. package/dist/components/calendar-rac.js.map +1 -1
  63. package/dist/components/card.cjs +61 -74
  64. package/dist/components/card.cjs.map +1 -1
  65. package/dist/components/card.d.cts +15 -16
  66. package/dist/components/card.d.ts +15 -16
  67. package/dist/components/card.js +58 -72
  68. package/dist/components/card.js.map +1 -1
  69. package/dist/components/checkbox-group.cjs +12 -11
  70. package/dist/components/checkbox-group.cjs.map +1 -1
  71. package/dist/components/checkbox-group.d.cts +5 -5
  72. package/dist/components/checkbox-group.d.ts +5 -5
  73. package/dist/components/checkbox-group.js +12 -10
  74. package/dist/components/checkbox-group.js.map +1 -1
  75. package/dist/components/checkbox.cjs +60 -114
  76. package/dist/components/checkbox.cjs.map +1 -1
  77. package/dist/components/checkbox.d.cts +6 -6
  78. package/dist/components/checkbox.d.ts +6 -6
  79. package/dist/components/checkbox.js +58 -93
  80. package/dist/components/checkbox.js.map +1 -1
  81. package/dist/components/collapsible.cjs +76 -113
  82. package/dist/components/collapsible.cjs.map +1 -1
  83. package/dist/components/collapsible.d.cts +16 -15
  84. package/dist/components/collapsible.d.ts +16 -15
  85. package/dist/components/collapsible.js +74 -92
  86. package/dist/components/collapsible.js.map +1 -1
  87. package/dist/components/combobox.cjs +213 -507
  88. package/dist/components/combobox.cjs.map +1 -1
  89. package/dist/components/combobox.d.cts +36 -35
  90. package/dist/components/combobox.d.ts +36 -35
  91. package/dist/components/combobox.js +229 -504
  92. package/dist/components/combobox.js.map +1 -1
  93. package/dist/components/command.cjs +102 -199
  94. package/dist/components/command.cjs.map +1 -1
  95. package/dist/components/command.d.cts +22 -21
  96. package/dist/components/command.d.ts +22 -21
  97. package/dist/components/command.js +100 -198
  98. package/dist/components/command.js.map +1 -1
  99. package/dist/components/dialog.cjs +110 -402
  100. package/dist/components/dialog.cjs.map +1 -1
  101. package/dist/components/dialog.d.cts +27 -26
  102. package/dist/components/dialog.d.ts +27 -26
  103. package/dist/components/dialog.js +107 -380
  104. package/dist/components/dialog.js.map +1 -1
  105. package/dist/components/dock.cjs +80 -111
  106. package/dist/components/dock.cjs.map +1 -1
  107. package/dist/components/dock.d.cts +25 -25
  108. package/dist/components/dock.d.ts +25 -25
  109. package/dist/components/dock.js +78 -106
  110. package/dist/components/dock.js.map +1 -1
  111. package/dist/components/drawer.cjs +77 -111
  112. package/dist/components/drawer.cjs.map +1 -1
  113. package/dist/components/drawer.d.cts +15 -14
  114. package/dist/components/drawer.d.ts +15 -14
  115. package/dist/components/drawer.js +75 -90
  116. package/dist/components/drawer.js.map +1 -1
  117. package/dist/components/dropdown-menu.cjs +163 -238
  118. package/dist/components/dropdown-menu.cjs.map +1 -1
  119. package/dist/components/dropdown-menu.d.cts +44 -43
  120. package/dist/components/dropdown-menu.d.ts +44 -43
  121. package/dist/components/dropdown-menu.js +161 -217
  122. package/dist/components/dropdown-menu.js.map +1 -1
  123. package/dist/components/empty.cjs +51 -85
  124. package/dist/components/empty.cjs.map +1 -1
  125. package/dist/components/empty.d.cts +13 -13
  126. package/dist/components/empty.d.ts +13 -13
  127. package/dist/components/empty.js +48 -83
  128. package/dist/components/empty.js.map +1 -1
  129. package/dist/components/field.cjs +150 -259
  130. package/dist/components/field.cjs.map +1 -1
  131. package/dist/components/field.d.cts +39 -39
  132. package/dist/components/field.d.ts +39 -39
  133. package/dist/components/field.js +148 -238
  134. package/dist/components/field.js.map +1 -1
  135. package/dist/components/flickering-grid.cjs +143 -166
  136. package/dist/components/flickering-grid.cjs.map +1 -1
  137. package/dist/components/flickering-grid.d.cts +14 -13
  138. package/dist/components/flickering-grid.d.ts +14 -13
  139. package/dist/components/flickering-grid.js +141 -161
  140. package/dist/components/flickering-grid.js.map +1 -1
  141. package/dist/components/flow-zoom-panel.cjs +56 -188
  142. package/dist/components/flow-zoom-panel.cjs.map +1 -1
  143. package/dist/components/flow-zoom-panel.d.cts +9 -9
  144. package/dist/components/flow-zoom-panel.d.ts +9 -9
  145. package/dist/components/flow-zoom-panel.js +56 -168
  146. package/dist/components/flow-zoom-panel.js.map +1 -1
  147. package/dist/components/form-control.cjs +58 -186
  148. package/dist/components/form-control.cjs.map +1 -1
  149. package/dist/components/form-control.d.cts +11 -10
  150. package/dist/components/form-control.d.ts +11 -10
  151. package/dist/components/form-control.js +56 -165
  152. package/dist/components/form-control.js.map +1 -1
  153. package/dist/components/form.cjs +78 -184
  154. package/dist/components/form.cjs.map +1 -1
  155. package/dist/components/form.d.cts +2 -36
  156. package/dist/components/form.d.ts +2 -36
  157. package/dist/components/form.js +76 -163
  158. package/dist/components/form.js.map +1 -1
  159. package/dist/components/input-group.cjs +51 -165
  160. package/dist/components/input-group.cjs.map +1 -1
  161. package/dist/components/input-group.d.cts +14 -15
  162. package/dist/components/input-group.d.ts +14 -15
  163. package/dist/components/input-group.js +51 -164
  164. package/dist/components/input-group.js.map +1 -1
  165. package/dist/components/input.cjs +30 -55
  166. package/dist/components/input.cjs.map +1 -1
  167. package/dist/components/input.d.cts +2 -10
  168. package/dist/components/input.d.ts +2 -10
  169. package/dist/components/input.js +30 -54
  170. package/dist/components/input.js.map +1 -1
  171. package/dist/components/json-input.cjs +133 -337
  172. package/dist/components/json-input.cjs.map +1 -1
  173. package/dist/components/json-input.d.cts +20 -19
  174. package/dist/components/json-input.d.ts +20 -19
  175. package/dist/components/json-input.js +132 -317
  176. package/dist/components/json-input.js.map +1 -1
  177. package/dist/components/label.cjs +19 -21
  178. package/dist/components/label.cjs.map +1 -1
  179. package/dist/components/label.d.cts +6 -5
  180. package/dist/components/label.d.ts +6 -5
  181. package/dist/components/label.js +17 -20
  182. package/dist/components/label.js.map +1 -1
  183. package/dist/components/motion-grid.cjs +61 -101
  184. package/dist/components/motion-grid.cjs.map +1 -1
  185. package/dist/components/motion-grid.d.cts +15 -14
  186. package/dist/components/motion-grid.d.ts +15 -14
  187. package/dist/components/motion-grid.js +59 -80
  188. package/dist/components/motion-grid.js.map +1 -1
  189. package/dist/components/multi-select.cjs +563 -786
  190. package/dist/components/multi-select.cjs.map +1 -1
  191. package/dist/components/multi-select.d.cts +173 -173
  192. package/dist/components/multi-select.d.ts +173 -173
  193. package/dist/components/multi-select.js +561 -765
  194. package/dist/components/multi-select.js.map +1 -1
  195. package/dist/components/page-header.cjs +24 -13
  196. package/dist/components/page-header.cjs.map +1 -1
  197. package/dist/components/page-header.d.cts +11 -11
  198. package/dist/components/page-header.d.ts +11 -11
  199. package/dist/components/page-header.js +23 -11
  200. package/dist/components/page-header.js.map +1 -1
  201. package/dist/components/pagination.cjs +72 -272
  202. package/dist/components/pagination.cjs.map +1 -1
  203. package/dist/components/pagination.d.cts +15 -16
  204. package/dist/components/pagination.d.ts +15 -16
  205. package/dist/components/pagination.js +69 -250
  206. package/dist/components/pagination.js.map +1 -1
  207. package/dist/components/popover.cjs +68 -111
  208. package/dist/components/popover.cjs.map +1 -1
  209. package/dist/components/popover.d.cts +31 -30
  210. package/dist/components/popover.d.ts +31 -30
  211. package/dist/components/popover.js +66 -90
  212. package/dist/components/popover.js.map +1 -1
  213. package/dist/components/portal.cjs +128 -81
  214. package/dist/components/portal.cjs.map +1 -1
  215. package/dist/components/portal.d.cts +24 -23
  216. package/dist/components/portal.d.ts +24 -23
  217. package/dist/components/portal.js +126 -60
  218. package/dist/components/portal.js.map +1 -1
  219. package/dist/components/progress.cjs +23 -24
  220. package/dist/components/progress.cjs.map +1 -1
  221. package/dist/components/progress.d.cts +8 -7
  222. package/dist/components/progress.d.ts +8 -7
  223. package/dist/components/progress.js +21 -23
  224. package/dist/components/progress.js.map +1 -1
  225. package/dist/components/progressive-blur-scroll-container.cjs +70 -138
  226. package/dist/components/progressive-blur-scroll-container.cjs.map +1 -1
  227. package/dist/components/progressive-blur-scroll-container.d.cts +19 -19
  228. package/dist/components/progressive-blur-scroll-container.d.ts +19 -19
  229. package/dist/components/progressive-blur-scroll-container.js +70 -137
  230. package/dist/components/progressive-blur-scroll-container.js.map +1 -1
  231. package/dist/components/progressive-blur.cjs +40 -64
  232. package/dist/components/progressive-blur.cjs.map +1 -1
  233. package/dist/components/progressive-blur.d.cts +15 -14
  234. package/dist/components/progressive-blur.d.ts +15 -14
  235. package/dist/components/progressive-blur.js +38 -63
  236. package/dist/components/progressive-blur.js.map +1 -1
  237. package/dist/components/radio-group.cjs +28 -42
  238. package/dist/components/radio-group.cjs.map +1 -1
  239. package/dist/components/radio-group.d.cts +8 -8
  240. package/dist/components/radio-group.d.ts +8 -8
  241. package/dist/components/radio-group.js +28 -41
  242. package/dist/components/radio-group.js.map +1 -1
  243. package/dist/components/record-picker.cjs +6 -418
  244. package/dist/components/record-picker.d.cts +13 -13
  245. package/dist/components/record-picker.d.ts +13 -13
  246. package/dist/components/record-picker.js +5 -397
  247. package/dist/components/resizable.cjs +32 -58
  248. package/dist/components/resizable.cjs.map +1 -1
  249. package/dist/components/resizable.d.cts +10 -9
  250. package/dist/components/resizable.d.ts +10 -9
  251. package/dist/components/resizable.js +29 -37
  252. package/dist/components/resizable.js.map +1 -1
  253. package/dist/components/responsive-diagram.cjs +50 -61
  254. package/dist/components/responsive-diagram.cjs.map +1 -1
  255. package/dist/components/responsive-diagram.d.cts +7 -7
  256. package/dist/components/responsive-diagram.d.ts +7 -7
  257. package/dist/components/responsive-diagram.js +50 -60
  258. package/dist/components/responsive-diagram.js.map +1 -1
  259. package/dist/components/scroll-area.cjs +37 -83
  260. package/dist/components/scroll-area.cjs.map +1 -1
  261. package/dist/components/scroll-area.d.cts +9 -8
  262. package/dist/components/scroll-area.d.ts +9 -8
  263. package/dist/components/scroll-area.js +35 -62
  264. package/dist/components/scroll-area.js.map +1 -1
  265. package/dist/components/select.cjs +175 -300
  266. package/dist/components/select.cjs.map +1 -1
  267. package/dist/components/select.d.cts +36 -35
  268. package/dist/components/select.d.ts +36 -35
  269. package/dist/components/select.js +172 -278
  270. package/dist/components/select.js.map +1 -1
  271. package/dist/components/separator.cjs +16 -19
  272. package/dist/components/separator.cjs.map +1 -1
  273. package/dist/components/separator.d.cts +2 -10
  274. package/dist/components/separator.d.ts +2 -10
  275. package/dist/components/separator.js +14 -18
  276. package/dist/components/separator.js.map +1 -1
  277. package/dist/components/sheet.cjs +17 -487
  278. package/dist/components/sheet.d.cts +85 -85
  279. package/dist/components/sheet.d.ts +85 -85
  280. package/dist/components/sheet.js +3 -453
  281. package/dist/components/sidebar.cjs +27 -1298
  282. package/dist/components/sidebar.d.cts +62 -65
  283. package/dist/components/sidebar.d.ts +62 -65
  284. package/dist/components/sidebar.js +3 -1254
  285. package/dist/components/skeleton.cjs +18 -30
  286. package/dist/components/skeleton.cjs.map +1 -1
  287. package/dist/components/skeleton.d.cts +6 -5
  288. package/dist/components/skeleton.d.ts +6 -5
  289. package/dist/components/skeleton.js +15 -28
  290. package/dist/components/skeleton.js.map +1 -1
  291. package/dist/components/sonner.cjs +17 -19
  292. package/dist/components/sonner.cjs.map +1 -1
  293. package/dist/components/sonner.d.cts +7 -7
  294. package/dist/components/sonner.d.ts +7 -7
  295. package/dist/components/sonner.js +17 -18
  296. package/dist/components/sonner.js.map +1 -1
  297. package/dist/components/stack/index.cjs +43 -1515
  298. package/dist/components/stack/index.d.cts +2 -672
  299. package/dist/components/stack/index.d.ts +2 -672
  300. package/dist/components/stack/index.js +3 -1455
  301. package/dist/components/stepper.cjs +131 -285
  302. package/dist/components/stepper.cjs.map +1 -1
  303. package/dist/components/stepper.d.cts +27 -26
  304. package/dist/components/stepper.d.ts +27 -26
  305. package/dist/components/stepper.js +130 -265
  306. package/dist/components/stepper.js.map +1 -1
  307. package/dist/components/switch.cjs +21 -32
  308. package/dist/components/switch.cjs.map +1 -1
  309. package/dist/components/switch.d.cts +7 -6
  310. package/dist/components/switch.d.ts +7 -6
  311. package/dist/components/switch.js +19 -31
  312. package/dist/components/switch.js.map +1 -1
  313. package/dist/components/table.cjs +58 -106
  314. package/dist/components/table.cjs.map +1 -1
  315. package/dist/components/table.d.cts +17 -16
  316. package/dist/components/table.d.ts +17 -16
  317. package/dist/components/table.js +55 -104
  318. package/dist/components/table.js.map +1 -1
  319. package/dist/components/tabs.cjs +31 -35
  320. package/dist/components/tabs.cjs.map +1 -1
  321. package/dist/components/tabs.d.cts +9 -8
  322. package/dist/components/tabs.d.ts +9 -8
  323. package/dist/components/tabs.js +29 -34
  324. package/dist/components/tabs.js.map +1 -1
  325. package/dist/components/tags.cjs +114 -433
  326. package/dist/components/tags.cjs.map +1 -1
  327. package/dist/components/tags.d.cts +24 -28
  328. package/dist/components/tags.d.ts +24 -28
  329. package/dist/components/tags.js +114 -413
  330. package/dist/components/tags.js.map +1 -1
  331. package/dist/components/textarea.cjs +27 -49
  332. package/dist/components/textarea.cjs.map +1 -1
  333. package/dist/components/textarea.d.cts +8 -7
  334. package/dist/components/textarea.d.ts +8 -7
  335. package/dist/components/textarea.js +27 -48
  336. package/dist/components/textarea.js.map +1 -1
  337. package/dist/components/toast/index.cjs +9 -612
  338. package/dist/components/toast/index.d.cts +2 -52
  339. package/dist/components/toast/index.d.ts +2 -52
  340. package/dist/components/toast/index.js +3 -586
  341. package/dist/components/tooltip.cjs +47 -72
  342. package/dist/components/tooltip.cjs.map +1 -1
  343. package/dist/components/tooltip.d.cts +2 -28
  344. package/dist/components/tooltip.d.ts +2 -28
  345. package/dist/components/tooltip.js +45 -51
  346. package/dist/components/tooltip.js.map +1 -1
  347. package/dist/components/unlink-button.cjs +19 -192
  348. package/dist/components/unlink-button.cjs.map +1 -1
  349. package/dist/components/unlink-button.d.cts +11 -11
  350. package/dist/components/unlink-button.d.ts +11 -11
  351. package/dist/components/unlink-button.js +18 -170
  352. package/dist/components/unlink-button.js.map +1 -1
  353. package/dist/form-DgRTv7O7.d.ts +54 -0
  354. package/dist/form-DoZEWSzb.d.cts +54 -0
  355. package/dist/index-CjA4CENl.d.cts +684 -0
  356. package/dist/index-CjA4CENl.d.ts +684 -0
  357. package/dist/index-UnM04j0t.d.cts +58 -0
  358. package/dist/index-UnM04j0t.d.ts +58 -0
  359. package/dist/index.cjs +408 -8697
  360. package/dist/index.d.cts +224 -2136
  361. package/dist/index.d.ts +224 -2136
  362. package/dist/index.js +65 -8350
  363. package/dist/input-CBrCuMH8.d.cts +11 -0
  364. package/dist/input-CBrCuMH8.d.ts +11 -0
  365. package/dist/motion-config-COCFHq1L.cjs +271 -0
  366. package/dist/motion-config-COCFHq1L.cjs.map +1 -0
  367. package/dist/motion-config-COsZ6azM.js +241 -0
  368. package/dist/motion-config-COsZ6azM.js.map +1 -0
  369. package/dist/record-picker-BbxngCeV.js +162 -0
  370. package/dist/record-picker-BbxngCeV.js.map +1 -0
  371. package/dist/record-picker-Bz4FApxD.cjs +167 -0
  372. package/dist/record-picker-Bz4FApxD.cjs.map +1 -0
  373. package/dist/rolldown-runtime-D_qnwXdH.cjs +35 -0
  374. package/dist/separator-BQEsr0Rc.d.cts +11 -0
  375. package/dist/separator-BQEsr0Rc.d.ts +11 -0
  376. package/dist/sheet-BLHnhLRH.js +425 -0
  377. package/dist/sheet-BLHnhLRH.js.map +1 -0
  378. package/dist/sheet-BdA0rfIz.cjs +515 -0
  379. package/dist/sheet-BdA0rfIz.cjs.map +1 -0
  380. package/dist/sidebar-CPy_fibW.cjs +608 -0
  381. package/dist/sidebar-CPy_fibW.cjs.map +1 -0
  382. package/dist/sidebar-Cfax0g0_.js +463 -0
  383. package/dist/sidebar-Cfax0g0_.js.map +1 -0
  384. package/dist/slot-C-jEfihz.cjs +122 -0
  385. package/dist/slot-C-jEfihz.cjs.map +1 -0
  386. package/dist/slot-EL8zfLG0.js +97 -0
  387. package/dist/slot-EL8zfLG0.js.map +1 -0
  388. package/dist/stack-DKdvlOM6.cjs +1771 -0
  389. package/dist/stack-DKdvlOM6.cjs.map +1 -0
  390. package/dist/stack-jMdxDrex.js +1531 -0
  391. package/dist/stack-jMdxDrex.js.map +1 -0
  392. package/dist/toast-D6MqijT2.cjs +316 -0
  393. package/dist/toast-D6MqijT2.cjs.map +1 -0
  394. package/dist/toast-D_BOLzm3.js +287 -0
  395. package/dist/toast-D_BOLzm3.js.map +1 -0
  396. package/dist/tooltip-CTRQoN1A.d.cts +29 -0
  397. package/dist/tooltip-CTRQoN1A.d.ts +29 -0
  398. package/dist/utils-BkMLyah9.js +12 -0
  399. package/dist/utils-BkMLyah9.js.map +1 -0
  400. package/dist/utils-CzTQ3-VI.cjs +17 -0
  401. package/dist/utils-CzTQ3-VI.cjs.map +1 -0
  402. package/package.json +5 -5
  403. package/dist/components/record-picker.cjs.map +0 -1
  404. package/dist/components/record-picker.js.map +0 -1
  405. package/dist/components/sheet.cjs.map +0 -1
  406. package/dist/components/sheet.js.map +0 -1
  407. package/dist/components/sidebar.cjs.map +0 -1
  408. package/dist/components/sidebar.js.map +0 -1
  409. package/dist/components/stack/index.cjs.map +0 -1
  410. package/dist/components/stack/index.js.map +0 -1
  411. package/dist/components/toast/index.cjs.map +0 -1
  412. package/dist/components/toast/index.js.map +0 -1
  413. package/dist/index.cjs.map +0 -1
  414. package/dist/index.js.map +0 -1
@@ -1,511 +1,236 @@
1
1
  "use client";
2
- import { Combobox as Combobox$1 } from '@base-ui/react/combobox';
3
- import { ChevronsUpDownIcon, XIcon } from 'lucide-react';
4
- import * as React2 from 'react';
5
- import { clsx } from 'clsx';
6
- import { twMerge } from 'tailwind-merge';
7
- import { useFloatingOverlayPortalProps } from '@constructive-io/ui/portal';
8
- import { Input as Input$1 } from '@base-ui/react/input';
9
- import { jsxs, jsx } from 'react/jsx-runtime';
10
- import { ScrollArea as ScrollArea$1 } from '@base-ui/react/scroll-area';
11
2
 
12
- function cn(...inputs) {
13
- return twMerge(clsx(inputs));
14
- }
15
- function Input({ className, size = "default", unstyled = false, ...props }) {
16
- const isFloating = props.placeholder === " ";
17
- return /* @__PURE__ */ jsx(
18
- "span",
19
- {
20
- className: cn(
21
- !unstyled && [
22
- // Base layout
23
- "relative inline-flex w-full rounded-lg border border-input bg-background bg-clip-padding text-base transition-shadow",
24
- // Inner shadow highlight
25
- "before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)]",
26
- "not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)]",
27
- // Focus state - use primary brand color
28
- "has-focus-visible:border-primary/60 has-focus-visible:ring-[3px] has-focus-visible:ring-primary/35",
29
- // Invalid state
30
- "has-aria-invalid:border-destructive/36",
31
- "has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16",
32
- // Disabled state
33
- "has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none",
34
- // Dark mode
35
- "sm:text-sm dark:bg-input/32 dark:not-in-data-[slot=group]:bg-clip-border",
36
- "dark:has-aria-invalid:ring-destructive/24",
37
- "dark:not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/8%)]"
38
- ],
39
- className
40
- ) || void 0,
41
- "data-size": size,
42
- "data-slot": "input-control",
43
- children: /* @__PURE__ */ jsx(
44
- Input$1,
45
- {
46
- className: cn(
47
- "w-full min-w-0 rounded-[inherit] bg-transparent px-[calc(--spacing(3)-1px)] outline-none pointer-coarse:min-h-11",
48
- isFloating ? "h-11 pt-4.5 pb-1 leading-none placeholder:text-transparent sm:h-10" : "h-8.5 leading-8.5 placeholder:text-muted-foreground/72 sm:h-7.5 sm:leading-7.5",
49
- size === "sm" && (isFloating ? "h-10 px-[calc(--spacing(2.5)-1px)] pt-4 pb-1 sm:h-9" : "h-7.5 px-[calc(--spacing(2.5)-1px)] leading-7.5 sm:h-6.5 sm:leading-6.5"),
50
- size === "lg" && (isFloating ? "h-12 pt-5 pb-1.5 sm:h-11" : "h-9.5 leading-9.5 sm:h-8.5 sm:leading-8.5"),
51
- props.type === "search" && "[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-webkit-search-results-button]:appearance-none [&::-webkit-search-results-decoration]:appearance-none",
52
- props.type === "file" && "text-muted-foreground file:me-3 file:bg-transparent file:font-medium file:text-foreground file:text-sm"
53
- ),
54
- "data-slot": "input",
55
- size: typeof size === "number" ? size : void 0,
56
- ...props
57
- }
58
- )
59
- }
60
- );
61
- }
62
- var ScrollArea = React2.forwardRef(
63
- ({ className, children, scrollFade = false, scrollbarGutter = false, ...props }, ref) => {
64
- return /* @__PURE__ */ jsxs(
65
- ScrollArea$1.Root,
66
- {
67
- ref,
68
- className: cn("size-full min-h-0", className),
69
- ...props,
70
- children: [
71
- /* @__PURE__ */ jsx(
72
- ScrollArea$1.Viewport,
73
- {
74
- className: cn(
75
- "h-full overscroll-contain rounded-[inherit] outline-none transition-shadows focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background",
76
- scrollFade && "mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] [--fade-size:1.5rem]",
77
- scrollbarGutter && "data-has-overflow-y:pe-2.5 data-has-overflow-x:pb-2.5"
78
- ),
79
- "data-slot": "scroll-area-viewport",
80
- children
81
- }
82
- ),
83
- /* @__PURE__ */ jsx(ScrollBar, { orientation: "vertical" }),
84
- /* @__PURE__ */ jsx(ScrollBar, { orientation: "horizontal" }),
85
- /* @__PURE__ */ jsx(ScrollArea$1.Corner, { "data-slot": "scroll-area-corner" })
86
- ]
87
- }
88
- );
89
- }
90
- );
91
- ScrollArea.displayName = "ScrollArea";
92
- function ScrollBar({
93
- className,
94
- orientation = "vertical",
95
- ...props
96
- }) {
97
- return /* @__PURE__ */ jsx(
98
- ScrollArea$1.Scrollbar,
99
- {
100
- className: cn(
101
- "m-1 flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-100 data-scrolling:duration-100",
102
- className
103
- ),
104
- "data-slot": "scroll-area-scrollbar",
105
- orientation,
106
- ...props,
107
- children: /* @__PURE__ */ jsx(
108
- ScrollArea$1.Thumb,
109
- {
110
- className: "relative flex-1 rounded-full bg-foreground/20",
111
- "data-slot": "scroll-area-thumb"
112
- }
113
- )
114
- }
115
- );
116
- }
117
- var ComboboxContext = React2.createContext({
118
- chipsRef: null,
119
- multiple: false
3
+ import { t as cn } from "../utils-BkMLyah9.js";
4
+ import { Input } from "./input.js";
5
+ import { ScrollArea } from "./scroll-area.js";
6
+ import * as React$1 from "react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { ChevronsUpDownIcon, XIcon } from "lucide-react";
9
+ import { useFloatingOverlayPortalProps } from "@constructive-io/ui/portal";
10
+ import { Combobox as Combobox$1 } from "@base-ui/react/combobox";
11
+
12
+ //#region src/components/combobox.tsx
13
+ const ComboboxContext = React$1.createContext({
14
+ chipsRef: null,
15
+ multiple: false
120
16
  });
121
17
  function Combobox(props) {
122
- const chipsRef = React2.useRef(null);
123
- return /* @__PURE__ */ jsx(ComboboxContext.Provider, { value: { chipsRef, multiple: !!props.multiple }, children: /* @__PURE__ */ jsx(
124
- Combobox$1.Root,
125
- {
126
- ...props
127
- }
128
- ) });
129
- }
130
- function ComboboxInput({
131
- className,
132
- showTrigger = true,
133
- showClear = false,
134
- startAddon,
135
- size,
136
- ...props
137
- }) {
138
- const { multiple } = React2.useContext(ComboboxContext);
139
- const sizeValue = size ?? "default";
140
- if (multiple) {
141
- return /* @__PURE__ */ jsx(
142
- Combobox$1.Input,
143
- {
144
- className: cn(
145
- "min-w-12 flex-1 text-base outline-none sm:text-sm [[data-slot=combobox-chip]+&]:ps-0.5",
146
- sizeValue === "sm" ? "ps-1.5" : "ps-2",
147
- className
148
- ),
149
- "data-size": typeof sizeValue === "string" ? sizeValue : void 0,
150
- "data-slot": "combobox-input",
151
- size: typeof sizeValue === "number" ? sizeValue : void 0,
152
- ...props
153
- }
154
- );
155
- }
156
- return /* @__PURE__ */ jsxs("div", { className: "relative not-has-[>*.w-full]:w-fit w-full has-disabled:opacity-64", children: [
157
- startAddon && /* @__PURE__ */ jsx(
158
- "div",
159
- {
160
- "aria-hidden": "true",
161
- className: "[&_svg]:-mx-0.5 pointer-events-none absolute inset-y-0 start-px z-10 flex items-center ps-[calc(--spacing(3)-1px)] has-[+[data-size=sm]]:ps-[calc(--spacing(2.5)-1px)] [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:opacity-80",
162
- "data-slot": "combobox-start-addon",
163
- children: startAddon
164
- }
165
- ),
166
- /* @__PURE__ */ jsx(
167
- Combobox$1.Input,
168
- {
169
- className: cn(
170
- startAddon && "data-[size=sm]:*:data-[slot=combobox-input]:ps-[calc(--spacing(7.5)-1px)] *:data-[slot=combobox-input]:ps-[calc(--spacing(8.5)-1px)] sm:data-[size=sm]:*:data-[slot=combobox-input]:ps-[calc(--spacing(7)-1px)] sm:*:data-[slot=combobox-input]:ps-[calc(--spacing(8)-1px)]",
171
- sizeValue === "sm" ? "has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-6.5 pointer-coarse:has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-11" : "has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-7 pointer-coarse:has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-11",
172
- className
173
- ),
174
- "data-slot": "combobox-input",
175
- render: /* @__PURE__ */ jsx(Input, { className: "has-disabled:opacity-100", size: sizeValue }),
176
- ...props
177
- }
178
- ),
179
- showTrigger && /* @__PURE__ */ jsx(
180
- ComboboxTrigger,
181
- {
182
- className: cn(
183
- "-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-opacity pointer-coarse:size-11 sm:pointer-coarse:size-11 hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
184
- sizeValue === "sm" ? "end-0" : "end-0.5"
185
- ),
186
- children: /* @__PURE__ */ jsx(ChevronsUpDownIcon, {})
187
- }
188
- ),
189
- showClear && /* @__PURE__ */ jsx(
190
- ComboboxClear,
191
- {
192
- className: cn(
193
- "-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-opacity pointer-coarse:size-11 sm:pointer-coarse:size-11 hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
194
- sizeValue === "sm" ? "end-0" : "end-0.5"
195
- ),
196
- children: /* @__PURE__ */ jsx(XIcon, {})
197
- }
198
- )
199
- ] });
200
- }
201
- function ComboboxTrigger({
202
- className,
203
- ...props
204
- }) {
205
- return /* @__PURE__ */ jsx(
206
- Combobox$1.Trigger,
207
- {
208
- className,
209
- "data-slot": "combobox-trigger",
210
- ...props
211
- }
212
- );
213
- }
214
- function ComboboxPopup({
215
- className,
216
- children,
217
- sideOffset = 4,
218
- ...props
219
- }) {
220
- const { chipsRef, multiple } = React2.useContext(ComboboxContext);
221
- const { container, zIndexClass } = useFloatingOverlayPortalProps();
222
- return /* @__PURE__ */ jsx(Combobox$1.Portal, { container, children: /* @__PURE__ */ jsx(
223
- Combobox$1.Positioner,
224
- {
225
- ...multiple ? { anchor: chipsRef } : {},
226
- className: cn("select-none", zIndexClass),
227
- "data-slot": "combobox-positioner",
228
- sideOffset,
229
- children: /* @__PURE__ */ jsx(
230
- "span",
231
- {
232
- className: cn(
233
- "relative flex max-h-full origin-(--transform-origin) rounded-lg border bg-popover not-dark:bg-clip-padding shadow-lg/5 transition-[scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/6%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]",
234
- className
235
- ),
236
- children: /* @__PURE__ */ jsx(
237
- Combobox$1.Popup,
238
- {
239
- className: "flex max-h-[min(var(--available-height),23rem)] w-(--anchor-width) max-w-(--available-width) flex-col",
240
- "data-slot": "combobox-popup",
241
- ...props,
242
- children
243
- }
244
- )
245
- }
246
- )
247
- }
248
- ) });
249
- }
250
- function ComboboxItem({
251
- className,
252
- children,
253
- ...props
254
- }) {
255
- return /* @__PURE__ */ jsxs(
256
- Combobox$1.Item,
257
- {
258
- className: cn(
259
- "grid min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default grid-cols-[1rem_1fr] items-center gap-2 rounded-sm py-1 ps-2 pe-4 text-base outline-none pointer-coarse:min-h-11 sm:pointer-coarse:min-h-11 data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
260
- className
261
- ),
262
- "data-slot": "combobox-item",
263
- ...props,
264
- children: [
265
- /* @__PURE__ */ jsx(
266
- Combobox$1.ItemIndicator,
267
- {
268
- keepMounted: true,
269
- className: (state) => cn(
270
- "col-start-1 transition-[opacity,scale,filter] duration-300 ease-[cubic-bezier(0.2,0,0,1)] motion-reduce:transition-none",
271
- state.selected ? "scale-100 opacity-100 blur-0" : "scale-[0.25] opacity-0 blur-[4px]"
272
- ),
273
- children: /* @__PURE__ */ jsx(
274
- "svg",
275
- {
276
- fill: "none",
277
- height: "24",
278
- stroke: "currentColor",
279
- strokeLinecap: "round",
280
- strokeLinejoin: "round",
281
- strokeWidth: "2",
282
- viewBox: "0 0 24 24",
283
- width: "24",
284
- xmlns: "http://www.w3.org/1500/svg",
285
- children: /* @__PURE__ */ jsx("path", { d: "M5.252 12.7 10.2 18.63 18.748 5.37" })
286
- }
287
- )
288
- }
289
- ),
290
- /* @__PURE__ */ jsx("div", { className: "col-start-2", children })
291
- ]
292
- }
293
- );
294
- }
295
- function ComboboxSeparator({
296
- className,
297
- ...props
298
- }) {
299
- return /* @__PURE__ */ jsx(
300
- Combobox$1.Separator,
301
- {
302
- className: cn("mx-2 my-1 h-px bg-border last:hidden", className),
303
- "data-slot": "combobox-separator",
304
- ...props
305
- }
306
- );
307
- }
308
- function ComboboxGroup({
309
- className,
310
- ...props
311
- }) {
312
- return /* @__PURE__ */ jsx(
313
- Combobox$1.Group,
314
- {
315
- className: cn("[[role=group]+&]:mt-1.5", className),
316
- "data-slot": "combobox-group",
317
- ...props
318
- }
319
- );
320
- }
321
- function ComboboxGroupLabel({
322
- className,
323
- ...props
324
- }) {
325
- return /* @__PURE__ */ jsx(
326
- Combobox$1.GroupLabel,
327
- {
328
- className: cn(
329
- "px-2 py-1.5 font-medium text-muted-foreground text-xs",
330
- className
331
- ),
332
- "data-slot": "combobox-group-label",
333
- ...props
334
- }
335
- );
336
- }
337
- function ComboboxEmpty({
338
- className,
339
- ...props
340
- }) {
341
- return /* @__PURE__ */ jsx(
342
- Combobox$1.Empty,
343
- {
344
- className: cn(
345
- "not-empty:p-2 text-center text-base text-muted-foreground sm:text-sm",
346
- className
347
- ),
348
- "data-slot": "combobox-empty",
349
- ...props
350
- }
351
- );
352
- }
353
- function ComboboxRow({
354
- className,
355
- ...props
356
- }) {
357
- return /* @__PURE__ */ jsx(
358
- Combobox$1.Row,
359
- {
360
- className,
361
- "data-slot": "combobox-row",
362
- ...props
363
- }
364
- );
365
- }
366
- function ComboboxValue({
367
- ...props
368
- }) {
369
- return /* @__PURE__ */ jsx(
370
- Combobox$1.Value,
371
- {
372
- "data-slot": "combobox-value",
373
- ...props
374
- }
375
- );
376
- }
377
- function ComboboxList({
378
- className,
379
- ...props
380
- }) {
381
- return /* @__PURE__ */ jsx(ScrollArea, { scrollbarGutter: true, scrollFade: true, children: /* @__PURE__ */ jsx(
382
- Combobox$1.List,
383
- {
384
- className: cn(
385
- "not-empty:scroll-py-1 not-empty:px-1 not-empty:py-1 in-data-has-overflow-y:pe-3",
386
- className
387
- ),
388
- "data-slot": "combobox-list",
389
- ...props
390
- }
391
- ) });
392
- }
393
- function ComboboxClear({
394
- className,
395
- ...props
396
- }) {
397
- return /* @__PURE__ */ jsx(
398
- Combobox$1.Clear,
399
- {
400
- className,
401
- "data-slot": "combobox-clear",
402
- ...props
403
- }
404
- );
405
- }
406
- function ComboboxStatus({
407
- className,
408
- ...props
409
- }) {
410
- return /* @__PURE__ */ jsx(
411
- Combobox$1.Status,
412
- {
413
- className: cn(
414
- "px-3 py-2 font-medium text-muted-foreground text-xs empty:m-0 empty:p-0",
415
- className
416
- ),
417
- "data-slot": "combobox-status",
418
- ...props
419
- }
420
- );
421
- }
422
- function ComboboxCollection({
423
- ...props
424
- }) {
425
- return /* @__PURE__ */ jsx(
426
- Combobox$1.Collection,
427
- {
428
- "data-slot": "combobox-collection",
429
- ...props
430
- }
431
- );
432
- }
433
- function ComboboxChips({
434
- className,
435
- children,
436
- startAddon,
437
- ...props
438
- }) {
439
- const { chipsRef } = React2.useContext(ComboboxContext);
440
- return /* @__PURE__ */ jsxs(
441
- Combobox$1.Chips,
442
- {
443
- className: cn(
444
- "relative inline-flex min-h-9 w-full flex-wrap gap-1 rounded-lg border border-input bg-background not-dark:bg-clip-padding p-[calc(--spacing(1)-1px)] text-base outline-none ring-ring/24 transition-shadow *:min-h-7 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/6%)] focus-within:border-ring focus-within:ring-[3px] has-disabled:pointer-events-none has-data-[size=lg]:min-h-10 has-data-[size=sm]:min-h-8 has-aria-invalid:border-destructive/36 has-disabled:opacity-64 has-[:disabled,:focus-within,[aria-invalid]]:shadow-none focus-within:has-aria-invalid:border-destructive/64 focus-within:has-aria-invalid:ring-destructive/16 has-data-[size=lg]:*:min-h-8 has-data-[size=sm]:*:min-h-6 sm:min-h-8 sm:text-sm sm:has-data-[size=lg]:min-h-9 sm:has-data-[size=sm]:min-h-7 sm:*:min-h-6 sm:has-data-[size=lg]:*:min-h-7 sm:has-data-[size=sm]:*:min-h-5 dark:not-has-disabled:bg-input/32 dark:has-aria-invalid:ring-destructive/24 dark:not-has-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]",
445
- className
446
- ),
447
- "data-slot": "combobox-chips",
448
- onMouseDown: (e) => {
449
- const target = e.target;
450
- const isChip = target.closest('[data-slot="combobox-chip"]');
451
- if (isChip || !chipsRef?.current) return;
452
- e.preventDefault();
453
- const input = chipsRef.current.querySelector("input");
454
- if (input && !chipsRef.current.querySelector("input:focus")) {
455
- input.focus();
456
- }
457
- },
458
- ref: chipsRef,
459
- ...props,
460
- children: [
461
- startAddon && /* @__PURE__ */ jsx(
462
- "div",
463
- {
464
- "aria-hidden": "true",
465
- className: "[&_svg]:-ms-0.5 [&_svg]:-me-1.5 flex shrink-0 items-center ps-2 opacity-80 has-[~[data-size=sm]]:has-[+[data-slot=combobox-chip]]:pe-1.5 has-[~[data-size=sm]]:ps-1.5 has-[+[data-slot=combobox-chip]]:pe-2 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
466
- "data-slot": "combobox-start-addon",
467
- children: startAddon
468
- }
469
- ),
470
- children
471
- ]
472
- }
473
- );
474
- }
475
- function ComboboxChip({
476
- children,
477
- ...props
478
- }) {
479
- return /* @__PURE__ */ jsxs(
480
- Combobox$1.Chip,
481
- {
482
- className: "flex items-center rounded-[calc(var(--radius-md)-1px)] bg-accent ps-2 font-medium text-accent-foreground text-sm outline-none sm:text-xs/(--text-xs--line-height) [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5",
483
- "data-slot": "combobox-chip",
484
- ...props,
485
- children: [
486
- children,
487
- /* @__PURE__ */ jsx(ComboboxChipRemove, {})
488
- ]
489
- }
490
- );
491
- }
492
- function ComboboxChipRemove({
493
- ...props
494
- }) {
495
- return /* @__PURE__ */ jsx(
496
- Combobox$1.ChipRemove,
497
- {
498
- "aria-label": "Remove",
499
- className: "h-full shrink-0 cursor-pointer px-1.5 opacity-80 hover:opacity-100 [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5",
500
- "data-slot": "combobox-chip-remove",
501
- ...props,
502
- children: /* @__PURE__ */ jsx(XIcon, {})
503
- }
504
- );
505
- }
506
- var useComboboxFilter = Combobox$1.useFilter;
507
- var ComboboxContent = ComboboxPopup;
18
+ const chipsRef = React$1.useRef(null);
19
+ return /* @__PURE__ */ jsx(ComboboxContext.Provider, {
20
+ value: {
21
+ chipsRef,
22
+ multiple: !!props.multiple
23
+ },
24
+ children: /* @__PURE__ */ jsx(Combobox$1.Root, { ...props })
25
+ });
26
+ }
27
+ function ComboboxInput({ className, showTrigger = true, showClear = false, startAddon, size, ...props }) {
28
+ const { multiple } = React$1.useContext(ComboboxContext);
29
+ const sizeValue = size ?? "default";
30
+ if (multiple) return /* @__PURE__ */ jsx(Combobox$1.Input, {
31
+ className: cn("min-w-12 flex-1 text-base outline-none sm:text-sm [[data-slot=combobox-chip]+&]:ps-0.5", sizeValue === "sm" ? "ps-1.5" : "ps-2", className),
32
+ "data-size": typeof sizeValue === "string" ? sizeValue : void 0,
33
+ "data-slot": "combobox-input",
34
+ size: typeof sizeValue === "number" ? sizeValue : void 0,
35
+ ...props
36
+ });
37
+ return /* @__PURE__ */ jsxs("div", {
38
+ className: "relative not-has-[>*.w-full]:w-fit w-full has-disabled:opacity-64",
39
+ children: [
40
+ startAddon && /* @__PURE__ */ jsx("div", {
41
+ "aria-hidden": "true",
42
+ className: "[&_svg]:-mx-0.5 pointer-events-none absolute inset-y-0 start-px z-10 flex items-center ps-[calc(--spacing(3)-1px)] has-[+[data-size=sm]]:ps-[calc(--spacing(2.5)-1px)] [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:opacity-80",
43
+ "data-slot": "combobox-start-addon",
44
+ children: startAddon
45
+ }),
46
+ /* @__PURE__ */ jsx(Combobox$1.Input, {
47
+ className: cn(startAddon && "data-[size=sm]:*:data-[slot=combobox-input]:ps-[calc(--spacing(7.5)-1px)] *:data-[slot=combobox-input]:ps-[calc(--spacing(8.5)-1px)] sm:data-[size=sm]:*:data-[slot=combobox-input]:ps-[calc(--spacing(7)-1px)] sm:*:data-[slot=combobox-input]:ps-[calc(--spacing(8)-1px)]", sizeValue === "sm" ? "has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-6.5 pointer-coarse:has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-11" : "has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-7 pointer-coarse:has-[+[data-slot=combobox-trigger],+[data-slot=combobox-clear]]:*:data-[slot=combobox-input]:pe-11", className),
48
+ "data-slot": "combobox-input",
49
+ render: /* @__PURE__ */ jsx(Input, {
50
+ className: "has-disabled:opacity-100",
51
+ size: sizeValue
52
+ }),
53
+ ...props
54
+ }),
55
+ showTrigger && /* @__PURE__ */ jsx(ComboboxTrigger, {
56
+ className: cn("-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-opacity pointer-coarse:size-11 sm:pointer-coarse:size-11 hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", sizeValue === "sm" ? "end-0" : "end-0.5"),
57
+ children: /* @__PURE__ */ jsx(ChevronsUpDownIcon, {})
58
+ }),
59
+ showClear && /* @__PURE__ */ jsx(ComboboxClear, {
60
+ className: cn("-translate-y-1/2 absolute top-1/2 inline-flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 outline-none transition-opacity pointer-coarse:size-11 sm:pointer-coarse:size-11 hover:opacity-100 has-[+[data-slot=combobox-clear]]:hidden sm:size-7 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", sizeValue === "sm" ? "end-0" : "end-0.5"),
61
+ children: /* @__PURE__ */ jsx(XIcon, {})
62
+ })
63
+ ]
64
+ });
65
+ }
66
+ function ComboboxTrigger({ className, ...props }) {
67
+ return /* @__PURE__ */ jsx(Combobox$1.Trigger, {
68
+ className,
69
+ "data-slot": "combobox-trigger",
70
+ ...props
71
+ });
72
+ }
73
+ function ComboboxPopup({ className, children, sideOffset = 4, ...props }) {
74
+ const { chipsRef, multiple } = React$1.useContext(ComboboxContext);
75
+ const { container, zIndexClass } = useFloatingOverlayPortalProps();
76
+ return /* @__PURE__ */ jsx(Combobox$1.Portal, {
77
+ container,
78
+ children: /* @__PURE__ */ jsx(Combobox$1.Positioner, {
79
+ ...multiple ? { anchor: chipsRef } : {},
80
+ className: cn("select-none", zIndexClass),
81
+ "data-slot": "combobox-positioner",
82
+ sideOffset,
83
+ children: /* @__PURE__ */ jsx("span", {
84
+ className: cn("relative flex max-h-full origin-(--transform-origin) rounded-lg border bg-popover not-dark:bg-clip-padding shadow-lg/5 transition-[scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/6%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]", className),
85
+ children: /* @__PURE__ */ jsx(Combobox$1.Popup, {
86
+ className: "flex max-h-[min(var(--available-height),23rem)] w-(--anchor-width) max-w-(--available-width) flex-col",
87
+ "data-slot": "combobox-popup",
88
+ ...props,
89
+ children
90
+ })
91
+ })
92
+ })
93
+ });
94
+ }
95
+ function ComboboxItem({ className, children, ...props }) {
96
+ return /* @__PURE__ */ jsxs(Combobox$1.Item, {
97
+ className: cn("grid min-h-8 in-data-[side=none]:min-w-[calc(var(--anchor-width)+1.25rem)] cursor-default grid-cols-[1rem_1fr] items-center gap-2 rounded-sm py-1 ps-2 pe-4 text-base outline-none pointer-coarse:min-h-11 sm:pointer-coarse:min-h-11 data-disabled:pointer-events-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-disabled:opacity-64 sm:min-h-7 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
98
+ "data-slot": "combobox-item",
99
+ ...props,
100
+ children: [/* @__PURE__ */ jsx(Combobox$1.ItemIndicator, {
101
+ keepMounted: true,
102
+ className: (state) => cn("col-start-1 transition-[opacity,scale,filter] duration-300 ease-[cubic-bezier(0.2,0,0,1)] motion-reduce:transition-none", state.selected ? "scale-100 opacity-100 blur-0" : "scale-[0.25] opacity-0 blur-[4px]"),
103
+ children: /* @__PURE__ */ jsx("svg", {
104
+ fill: "none",
105
+ height: "24",
106
+ stroke: "currentColor",
107
+ strokeLinecap: "round",
108
+ strokeLinejoin: "round",
109
+ strokeWidth: "2",
110
+ viewBox: "0 0 24 24",
111
+ width: "24",
112
+ xmlns: "http://www.w3.org/1500/svg",
113
+ children: /* @__PURE__ */ jsx("path", { d: "M5.252 12.7 10.2 18.63 18.748 5.37" })
114
+ })
115
+ }), /* @__PURE__ */ jsx("div", {
116
+ className: "col-start-2",
117
+ children
118
+ })]
119
+ });
120
+ }
121
+ function ComboboxSeparator({ className, ...props }) {
122
+ return /* @__PURE__ */ jsx(Combobox$1.Separator, {
123
+ className: cn("mx-2 my-1 h-px bg-border last:hidden", className),
124
+ "data-slot": "combobox-separator",
125
+ ...props
126
+ });
127
+ }
128
+ function ComboboxGroup({ className, ...props }) {
129
+ return /* @__PURE__ */ jsx(Combobox$1.Group, {
130
+ className: cn("[[role=group]+&]:mt-1.5", className),
131
+ "data-slot": "combobox-group",
132
+ ...props
133
+ });
134
+ }
135
+ function ComboboxGroupLabel({ className, ...props }) {
136
+ return /* @__PURE__ */ jsx(Combobox$1.GroupLabel, {
137
+ className: cn("px-2 py-1.5 font-medium text-muted-foreground text-xs", className),
138
+ "data-slot": "combobox-group-label",
139
+ ...props
140
+ });
141
+ }
142
+ function ComboboxEmpty({ className, ...props }) {
143
+ return /* @__PURE__ */ jsx(Combobox$1.Empty, {
144
+ className: cn("not-empty:p-2 text-center text-base text-muted-foreground sm:text-sm", className),
145
+ "data-slot": "combobox-empty",
146
+ ...props
147
+ });
148
+ }
149
+ function ComboboxRow({ className, ...props }) {
150
+ return /* @__PURE__ */ jsx(Combobox$1.Row, {
151
+ className,
152
+ "data-slot": "combobox-row",
153
+ ...props
154
+ });
155
+ }
156
+ function ComboboxValue({ ...props }) {
157
+ return /* @__PURE__ */ jsx(Combobox$1.Value, {
158
+ "data-slot": "combobox-value",
159
+ ...props
160
+ });
161
+ }
162
+ function ComboboxList({ className, ...props }) {
163
+ return /* @__PURE__ */ jsx(ScrollArea, {
164
+ scrollbarGutter: true,
165
+ scrollFade: true,
166
+ children: /* @__PURE__ */ jsx(Combobox$1.List, {
167
+ className: cn("not-empty:scroll-py-1 not-empty:px-1 not-empty:py-1 in-data-has-overflow-y:pe-3", className),
168
+ "data-slot": "combobox-list",
169
+ ...props
170
+ })
171
+ });
172
+ }
173
+ function ComboboxClear({ className, ...props }) {
174
+ return /* @__PURE__ */ jsx(Combobox$1.Clear, {
175
+ className,
176
+ "data-slot": "combobox-clear",
177
+ ...props
178
+ });
179
+ }
180
+ function ComboboxStatus({ className, ...props }) {
181
+ return /* @__PURE__ */ jsx(Combobox$1.Status, {
182
+ className: cn("px-3 py-2 font-medium text-muted-foreground text-xs empty:m-0 empty:p-0", className),
183
+ "data-slot": "combobox-status",
184
+ ...props
185
+ });
186
+ }
187
+ function ComboboxCollection({ ...props }) {
188
+ return /* @__PURE__ */ jsx(Combobox$1.Collection, {
189
+ "data-slot": "combobox-collection",
190
+ ...props
191
+ });
192
+ }
193
+ function ComboboxChips({ className, children, startAddon, ...props }) {
194
+ const { chipsRef } = React$1.useContext(ComboboxContext);
195
+ return /* @__PURE__ */ jsxs(Combobox$1.Chips, {
196
+ className: cn("relative inline-flex min-h-9 w-full flex-wrap gap-1 rounded-lg border border-input bg-background not-dark:bg-clip-padding p-[calc(--spacing(1)-1px)] text-base outline-none ring-ring/24 transition-shadow *:min-h-7 before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/6%)] focus-within:border-ring focus-within:ring-[3px] has-disabled:pointer-events-none has-data-[size=lg]:min-h-10 has-data-[size=sm]:min-h-8 has-aria-invalid:border-destructive/36 has-disabled:opacity-64 has-[:disabled,:focus-within,[aria-invalid]]:shadow-none focus-within:has-aria-invalid:border-destructive/64 focus-within:has-aria-invalid:ring-destructive/16 has-data-[size=lg]:*:min-h-8 has-data-[size=sm]:*:min-h-6 sm:min-h-8 sm:text-sm sm:has-data-[size=lg]:min-h-9 sm:has-data-[size=sm]:min-h-7 sm:*:min-h-6 sm:has-data-[size=lg]:*:min-h-7 sm:has-data-[size=sm]:*:min-h-5 dark:not-has-disabled:bg-input/32 dark:has-aria-invalid:ring-destructive/24 dark:not-has-disabled:not-focus-within:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]", className),
197
+ "data-slot": "combobox-chips",
198
+ onMouseDown: (e) => {
199
+ if (e.target.closest("[data-slot=\"combobox-chip\"]") || !chipsRef?.current) return;
200
+ e.preventDefault();
201
+ const input = chipsRef.current.querySelector("input");
202
+ if (input && !chipsRef.current.querySelector("input:focus")) input.focus();
203
+ },
204
+ ref: chipsRef,
205
+ ...props,
206
+ children: [startAddon && /* @__PURE__ */ jsx("div", {
207
+ "aria-hidden": "true",
208
+ className: "[&_svg]:-ms-0.5 [&_svg]:-me-1.5 flex shrink-0 items-center ps-2 opacity-80 has-[~[data-size=sm]]:has-[+[data-slot=combobox-chip]]:pe-1.5 has-[~[data-size=sm]]:ps-1.5 has-[+[data-slot=combobox-chip]]:pe-2 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
209
+ "data-slot": "combobox-start-addon",
210
+ children: startAddon
211
+ }), children]
212
+ });
213
+ }
214
+ function ComboboxChip({ children, ...props }) {
215
+ return /* @__PURE__ */ jsxs(Combobox$1.Chip, {
216
+ className: "flex items-center rounded-[calc(var(--radius-md)-1px)] bg-accent ps-2 font-medium text-accent-foreground text-sm outline-none sm:text-xs/(--text-xs--line-height) [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5",
217
+ "data-slot": "combobox-chip",
218
+ ...props,
219
+ children: [children, /* @__PURE__ */ jsx(ComboboxChipRemove, {})]
220
+ });
221
+ }
222
+ function ComboboxChipRemove({ ...props }) {
223
+ return /* @__PURE__ */ jsx(Combobox$1.ChipRemove, {
224
+ "aria-label": "Remove",
225
+ className: "h-full shrink-0 cursor-pointer px-1.5 opacity-80 hover:opacity-100 [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5",
226
+ "data-slot": "combobox-chip-remove",
227
+ ...props,
228
+ children: /* @__PURE__ */ jsx(XIcon, {})
229
+ });
230
+ }
231
+ const useComboboxFilter = Combobox$1.useFilter;
232
+ const ComboboxContent = ComboboxPopup;
508
233
 
234
+ //#endregion
509
235
  export { Combobox, ComboboxChip, ComboboxChips, ComboboxClear, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxGroupLabel, ComboboxInput, ComboboxItem, ComboboxList, ComboboxPopup, ComboboxRow, ComboboxSeparator, ComboboxStatus, ComboboxTrigger, ComboboxValue, useComboboxFilter };
510
- //# sourceMappingURL=combobox.js.map
511
236
  //# sourceMappingURL=combobox.js.map