@kamod-ch/ui 0.2.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 (415) hide show
  1. package/LICENSE.md +9 -0
  2. package/README.md +183 -0
  3. package/dist/Accordion-D1PiNspd.d.ts +39 -0
  4. package/dist/AlertDialog-ALB541qy.d.ts +64 -0
  5. package/dist/Button-vQnkiVTI.d.ts +84 -0
  6. package/dist/CalendarDateTimePanel-B3J8OlSc.d.ts +79 -0
  7. package/dist/Carousel-BUB4DVuh.d.ts +48 -0
  8. package/dist/Chart-Ax22S5_N.d.ts +10 -0
  9. package/dist/Checkbox-DBbLYq6Q.d.ts +12 -0
  10. package/dist/Collapsible-CW1hQwqV.d.ts +34 -0
  11. package/dist/ComboboxValue-BGfXgtZt.d.ts +135 -0
  12. package/dist/CommandSeparator-wZRCsqsT.d.ts +47 -0
  13. package/dist/DataTable-zNTTdYVU.d.ts +13 -0
  14. package/dist/DatePicker-AFAYh5Ca.d.ts +20 -0
  15. package/dist/Dialog-BOIteLfe.d.ts +28 -0
  16. package/dist/DialogContent-CK1t4m4e.d.ts +24 -0
  17. package/dist/DialogHeader-CYT7iUDq.d.ts +13 -0
  18. package/dist/DialogTitle-CerJD0oA.d.ts +13 -0
  19. package/dist/Direction-25ZOt0gW.d.ts +24 -0
  20. package/dist/Drawer-B3pZMn5j.d.ts +41 -0
  21. package/dist/Dropdown-CVbWVKok.d.ts +143 -0
  22. package/dist/FieldTitle-aSgThW-B.d.ts +100 -0
  23. package/dist/HoverCard-aVEEtkyO.d.ts +52 -0
  24. package/dist/Input-Cem05el9.d.ts +27 -0
  25. package/dist/Menubar-DwYDW4w2.d.ts +88 -0
  26. package/dist/PopoverTrigger-CH_Kx2mn.d.ts +43 -0
  27. package/dist/Progress-BGij8Hob.d.ts +13 -0
  28. package/dist/RadioGroup-BaElzLwa.d.ts +40 -0
  29. package/dist/ScrollArea-B-vILe3g.d.ts +16 -0
  30. package/dist/Select-B_mNVh70.d.ts +51 -0
  31. package/dist/Separator-DCQYrnpB.d.ts +9 -0
  32. package/dist/Sheet-s0xRF22F.d.ts +29 -0
  33. package/dist/SidebarProvider-IAihmyD7.d.ts +46 -0
  34. package/dist/Slider-BQLMBpYs.d.ts +16 -0
  35. package/dist/Switch-CTTkNdqF.d.ts +31 -0
  36. package/dist/Tabs-CR-thcs6.d.ts +47 -0
  37. package/dist/Textarea-DbKkduOG.d.ts +27 -0
  38. package/dist/ThemeToggle-DfiEM1dZ.d.ts +9 -0
  39. package/dist/Toggle-CseZl7XN.d.ts +49 -0
  40. package/dist/ToggleGroup-UeYHzQe7.d.ts +137 -0
  41. package/dist/Tooltip-Ba3GxE7u.d.ts +40 -0
  42. package/dist/Typography-ccTtE182.d.ts +64 -0
  43. package/dist/chunk-26CRIZXP.js +244 -0
  44. package/dist/chunk-26CRIZXP.js.map +1 -0
  45. package/dist/chunk-2BQ54337.js +282 -0
  46. package/dist/chunk-2BQ54337.js.map +1 -0
  47. package/dist/chunk-2HZCH73K.js +109 -0
  48. package/dist/chunk-2HZCH73K.js.map +1 -0
  49. package/dist/chunk-2KY7P27I.js +64 -0
  50. package/dist/chunk-2KY7P27I.js.map +1 -0
  51. package/dist/chunk-3DNIMQX6.js +78 -0
  52. package/dist/chunk-3DNIMQX6.js.map +1 -0
  53. package/dist/chunk-3KB54OYF.js +81 -0
  54. package/dist/chunk-3KB54OYF.js.map +1 -0
  55. package/dist/chunk-4BJJOHZT.js +477 -0
  56. package/dist/chunk-4BJJOHZT.js.map +1 -0
  57. package/dist/chunk-4IBTERDG.js +9 -0
  58. package/dist/chunk-4IBTERDG.js.map +1 -0
  59. package/dist/chunk-4V3WHQJE.js +510 -0
  60. package/dist/chunk-4V3WHQJE.js.map +1 -0
  61. package/dist/chunk-5FBD2NTR.js +103 -0
  62. package/dist/chunk-5FBD2NTR.js.map +1 -0
  63. package/dist/chunk-5KS2VSX2.js +94 -0
  64. package/dist/chunk-5KS2VSX2.js.map +1 -0
  65. package/dist/chunk-5Q4RBIMZ.js +25 -0
  66. package/dist/chunk-5Q4RBIMZ.js.map +1 -0
  67. package/dist/chunk-67J4KBOW.js +124 -0
  68. package/dist/chunk-67J4KBOW.js.map +1 -0
  69. package/dist/chunk-6BK3PIRX.js +151 -0
  70. package/dist/chunk-6BK3PIRX.js.map +1 -0
  71. package/dist/chunk-6FYSVMH7.js +21 -0
  72. package/dist/chunk-6FYSVMH7.js.map +1 -0
  73. package/dist/chunk-6RASPU5N.js +31 -0
  74. package/dist/chunk-6RASPU5N.js.map +1 -0
  75. package/dist/chunk-7AJT2E2Y.js +624 -0
  76. package/dist/chunk-7AJT2E2Y.js.map +1 -0
  77. package/dist/chunk-7IOAIEIA.js +102 -0
  78. package/dist/chunk-7IOAIEIA.js.map +1 -0
  79. package/dist/chunk-7MITRFPE.js +192 -0
  80. package/dist/chunk-7MITRFPE.js.map +1 -0
  81. package/dist/chunk-BDK7CDEI.js +22 -0
  82. package/dist/chunk-BDK7CDEI.js.map +1 -0
  83. package/dist/chunk-BQP4UA44.js +18 -0
  84. package/dist/chunk-BQP4UA44.js.map +1 -0
  85. package/dist/chunk-BYG2ULS3.js +196 -0
  86. package/dist/chunk-BYG2ULS3.js.map +1 -0
  87. package/dist/chunk-C7WEQOUA.js +26 -0
  88. package/dist/chunk-C7WEQOUA.js.map +1 -0
  89. package/dist/chunk-CLEC2RMU.js +8 -0
  90. package/dist/chunk-CLEC2RMU.js.map +1 -0
  91. package/dist/chunk-CMBERB5B.js +9 -0
  92. package/dist/chunk-CMBERB5B.js.map +1 -0
  93. package/dist/chunk-COPT6I2D.js +122 -0
  94. package/dist/chunk-COPT6I2D.js.map +1 -0
  95. package/dist/chunk-CP55TVOV.js +271 -0
  96. package/dist/chunk-CP55TVOV.js.map +1 -0
  97. package/dist/chunk-D3DQ4ICC.js +25 -0
  98. package/dist/chunk-D3DQ4ICC.js.map +1 -0
  99. package/dist/chunk-ERBGZZ2U.js +26 -0
  100. package/dist/chunk-ERBGZZ2U.js.map +1 -0
  101. package/dist/chunk-FIOKWIJP.js +361 -0
  102. package/dist/chunk-FIOKWIJP.js.map +1 -0
  103. package/dist/chunk-G6TV6TF7.js +95 -0
  104. package/dist/chunk-G6TV6TF7.js.map +1 -0
  105. package/dist/chunk-GGTDJEE2.js +15 -0
  106. package/dist/chunk-GGTDJEE2.js.map +1 -0
  107. package/dist/chunk-GIU6BZTW.js +173 -0
  108. package/dist/chunk-GIU6BZTW.js.map +1 -0
  109. package/dist/chunk-HAAXVB3R.js +34 -0
  110. package/dist/chunk-HAAXVB3R.js.map +1 -0
  111. package/dist/chunk-HTSAUMF5.js +398 -0
  112. package/dist/chunk-HTSAUMF5.js.map +1 -0
  113. package/dist/chunk-IJ4ZRIR4.js +182 -0
  114. package/dist/chunk-IJ4ZRIR4.js.map +1 -0
  115. package/dist/chunk-J4DMQV64.js +340 -0
  116. package/dist/chunk-J4DMQV64.js.map +1 -0
  117. package/dist/chunk-JKXSX67K.js +95 -0
  118. package/dist/chunk-JKXSX67K.js.map +1 -0
  119. package/dist/chunk-JNF7FDJO.js +633 -0
  120. package/dist/chunk-JNF7FDJO.js.map +1 -0
  121. package/dist/chunk-JURNPBSW.js +70 -0
  122. package/dist/chunk-JURNPBSW.js.map +1 -0
  123. package/dist/chunk-LCMPFPBN.js +141 -0
  124. package/dist/chunk-LCMPFPBN.js.map +1 -0
  125. package/dist/chunk-LCWXIQKA.js +36 -0
  126. package/dist/chunk-LCWXIQKA.js.map +1 -0
  127. package/dist/chunk-LFJF3M6M.js +171 -0
  128. package/dist/chunk-LFJF3M6M.js.map +1 -0
  129. package/dist/chunk-MD6HHORY.js +524 -0
  130. package/dist/chunk-MD6HHORY.js.map +1 -0
  131. package/dist/chunk-MJG6UKD4.js +83 -0
  132. package/dist/chunk-MJG6UKD4.js.map +1 -0
  133. package/dist/chunk-MKG3UAP6.js +347 -0
  134. package/dist/chunk-MKG3UAP6.js.map +1 -0
  135. package/dist/chunk-MS2ZNYCJ.js +9 -0
  136. package/dist/chunk-MS2ZNYCJ.js.map +1 -0
  137. package/dist/chunk-NGKQBNZ5.js +29 -0
  138. package/dist/chunk-NGKQBNZ5.js.map +1 -0
  139. package/dist/chunk-NKKMM6CK.js +56 -0
  140. package/dist/chunk-NKKMM6CK.js.map +1 -0
  141. package/dist/chunk-OCLVMKVC.js +110 -0
  142. package/dist/chunk-OCLVMKVC.js.map +1 -0
  143. package/dist/chunk-PFV7YIEP.js +104 -0
  144. package/dist/chunk-PFV7YIEP.js.map +1 -0
  145. package/dist/chunk-PGOCR4LG.js +216 -0
  146. package/dist/chunk-PGOCR4LG.js.map +1 -0
  147. package/dist/chunk-PPYJQNE5.js +159 -0
  148. package/dist/chunk-PPYJQNE5.js.map +1 -0
  149. package/dist/chunk-PU5J5EPY.js +733 -0
  150. package/dist/chunk-PU5J5EPY.js.map +1 -0
  151. package/dist/chunk-PZS2D2QM.js +32 -0
  152. package/dist/chunk-PZS2D2QM.js.map +1 -0
  153. package/dist/chunk-Q5IUIA6B.js +9 -0
  154. package/dist/chunk-Q5IUIA6B.js.map +1 -0
  155. package/dist/chunk-QFDTG2ZJ.js +176 -0
  156. package/dist/chunk-QFDTG2ZJ.js.map +1 -0
  157. package/dist/chunk-QZX3RFIC.js +165 -0
  158. package/dist/chunk-QZX3RFIC.js.map +1 -0
  159. package/dist/chunk-R565SY7K.js +69 -0
  160. package/dist/chunk-R565SY7K.js.map +1 -0
  161. package/dist/chunk-RHNI5UQO.js +455 -0
  162. package/dist/chunk-RHNI5UQO.js.map +1 -0
  163. package/dist/chunk-ROKLAZHC.js +550 -0
  164. package/dist/chunk-ROKLAZHC.js.map +1 -0
  165. package/dist/chunk-RTIFG4XT.js +9 -0
  166. package/dist/chunk-RTIFG4XT.js.map +1 -0
  167. package/dist/chunk-TFLSEEM4.js +88 -0
  168. package/dist/chunk-TFLSEEM4.js.map +1 -0
  169. package/dist/chunk-U2UNWXBC.js +242 -0
  170. package/dist/chunk-U2UNWXBC.js.map +1 -0
  171. package/dist/chunk-UEGIKBX6.js +385 -0
  172. package/dist/chunk-UEGIKBX6.js.map +1 -0
  173. package/dist/chunk-UEXTD7ZB.js +108 -0
  174. package/dist/chunk-UEXTD7ZB.js.map +1 -0
  175. package/dist/chunk-UNWEH4Z6.js +83 -0
  176. package/dist/chunk-UNWEH4Z6.js.map +1 -0
  177. package/dist/chunk-UXWUFNXY.js +8 -0
  178. package/dist/chunk-UXWUFNXY.js.map +1 -0
  179. package/dist/chunk-V2MG5Y5F.js +77 -0
  180. package/dist/chunk-V2MG5Y5F.js.map +1 -0
  181. package/dist/chunk-V63YIVKJ.js +326 -0
  182. package/dist/chunk-V63YIVKJ.js.map +1 -0
  183. package/dist/chunk-WAPRVVDQ.js +9 -0
  184. package/dist/chunk-WAPRVVDQ.js.map +1 -0
  185. package/dist/chunk-X4HPHMYW.js +17 -0
  186. package/dist/chunk-X4HPHMYW.js.map +1 -0
  187. package/dist/chunk-XGFJJ2YB.js +36 -0
  188. package/dist/chunk-XGFJJ2YB.js.map +1 -0
  189. package/dist/chunk-YJGECAOZ.js +18 -0
  190. package/dist/chunk-YJGECAOZ.js.map +1 -0
  191. package/dist/chunk-YTHUHPE5.js +51 -0
  192. package/dist/chunk-YTHUHPE5.js.map +1 -0
  193. package/dist/chunk-YTJRKLUR.js +76 -0
  194. package/dist/chunk-YTJRKLUR.js.map +1 -0
  195. package/dist/chunk-YVALXJRN.js +49 -0
  196. package/dist/chunk-YVALXJRN.js.map +1 -0
  197. package/dist/chunk-YZLPO4B2.js +33 -0
  198. package/dist/chunk-YZLPO4B2.js.map +1 -0
  199. package/dist/chunk-ZHAGKFSO.js +16 -0
  200. package/dist/chunk-ZHAGKFSO.js.map +1 -0
  201. package/dist/chunk-ZM67EKZC.js +135 -0
  202. package/dist/chunk-ZM67EKZC.js.map +1 -0
  203. package/dist/chunk-ZVAW22GX.js +50 -0
  204. package/dist/chunk-ZVAW22GX.js.map +1 -0
  205. package/dist/components/accordion/index.d.ts +12 -0
  206. package/dist/components/accordion/index.js +4 -0
  207. package/dist/components/accordion/index.js.map +1 -0
  208. package/dist/components/alert/index.d.ts +64 -0
  209. package/dist/components/alert/index.js +4 -0
  210. package/dist/components/alert/index.js.map +1 -0
  211. package/dist/components/alert-dialog/index.d.ts +22 -0
  212. package/dist/components/alert-dialog/index.js +9 -0
  213. package/dist/components/alert-dialog/index.js.map +1 -0
  214. package/dist/components/aspect-ratio/index.d.ts +11 -0
  215. package/dist/components/aspect-ratio/index.js +4 -0
  216. package/dist/components/aspect-ratio/index.js.map +1 -0
  217. package/dist/components/avatar/index.d.ts +53 -0
  218. package/dist/components/avatar/index.js +4 -0
  219. package/dist/components/avatar/index.js.map +1 -0
  220. package/dist/components/badge/index.d.ts +175 -0
  221. package/dist/components/badge/index.js +4 -0
  222. package/dist/components/badge/index.js.map +1 -0
  223. package/dist/components/breadcrumb/index.d.ts +38 -0
  224. package/dist/components/breadcrumb/index.js +4 -0
  225. package/dist/components/breadcrumb/index.js.map +1 -0
  226. package/dist/components/button/index.d.ts +72 -0
  227. package/dist/components/button/index.js +5 -0
  228. package/dist/components/button/index.js.map +1 -0
  229. package/dist/components/button-group/index.d.ts +21 -0
  230. package/dist/components/button-group/index.js +4 -0
  231. package/dist/components/button-group/index.js.map +1 -0
  232. package/dist/components/calendar/index.d.ts +7 -0
  233. package/dist/components/calendar/index.js +12 -0
  234. package/dist/components/calendar/index.js.map +1 -0
  235. package/dist/components/card/index.d.ts +80 -0
  236. package/dist/components/card/index.js +3 -0
  237. package/dist/components/card/index.js.map +1 -0
  238. package/dist/components/carousel/index.d.ts +15 -0
  239. package/dist/components/carousel/index.js +5 -0
  240. package/dist/components/carousel/index.js.map +1 -0
  241. package/dist/components/chart/index.d.ts +6 -0
  242. package/dist/components/chart/index.js +4 -0
  243. package/dist/components/chart/index.js.map +1 -0
  244. package/dist/components/checkbox/index.d.ts +7 -0
  245. package/dist/components/checkbox/index.js +4 -0
  246. package/dist/components/checkbox/index.js.map +1 -0
  247. package/dist/components/collapsible/index.d.ts +11 -0
  248. package/dist/components/collapsible/index.js +4 -0
  249. package/dist/components/collapsible/index.js.map +1 -0
  250. package/dist/components/combobox/index.d.ts +13 -0
  251. package/dist/components/combobox/index.js +7 -0
  252. package/dist/components/combobox/index.js.map +1 -0
  253. package/dist/components/command/index.d.ts +21 -0
  254. package/dist/components/command/index.js +10 -0
  255. package/dist/components/command/index.js.map +1 -0
  256. package/dist/components/context-menu/index.d.ts +114 -0
  257. package/dist/components/context-menu/index.js +5 -0
  258. package/dist/components/context-menu/index.js.map +1 -0
  259. package/dist/components/data-table/index.d.ts +6 -0
  260. package/dist/components/data-table/index.js +5 -0
  261. package/dist/components/data-table/index.js.map +1 -0
  262. package/dist/components/date-picker/index.d.ts +7 -0
  263. package/dist/components/date-picker/index.js +8 -0
  264. package/dist/components/date-picker/index.js.map +1 -0
  265. package/dist/components/dialog/index.d.ts +22 -0
  266. package/dist/components/dialog/index.js +8 -0
  267. package/dist/components/dialog/index.js.map +1 -0
  268. package/dist/components/direction/index.d.ts +7 -0
  269. package/dist/components/direction/index.js +4 -0
  270. package/dist/components/direction/index.js.map +1 -0
  271. package/dist/components/drawer/index.d.ts +19 -0
  272. package/dist/components/drawer/index.js +8 -0
  273. package/dist/components/drawer/index.js.map +1 -0
  274. package/dist/components/dropdown/index.d.ts +24 -0
  275. package/dist/components/dropdown/index.js +5 -0
  276. package/dist/components/dropdown/index.js.map +1 -0
  277. package/dist/components/dropzone/index.d.ts +26 -0
  278. package/dist/components/dropzone/index.js +5 -0
  279. package/dist/components/dropzone/index.js.map +1 -0
  280. package/dist/components/empty/index.d.ts +59 -0
  281. package/dist/components/empty/index.js +4 -0
  282. package/dist/components/empty/index.js.map +1 -0
  283. package/dist/components/field/index.d.ts +8 -0
  284. package/dist/components/field/index.js +6 -0
  285. package/dist/components/field/index.js.map +1 -0
  286. package/dist/components/hover-card/index.d.ts +12 -0
  287. package/dist/components/hover-card/index.js +3 -0
  288. package/dist/components/hover-card/index.js.map +1 -0
  289. package/dist/components/image/index.d.ts +6 -0
  290. package/dist/components/image/index.js +4 -0
  291. package/dist/components/image/index.js.map +1 -0
  292. package/dist/components/input/index.d.ts +27 -0
  293. package/dist/components/input/index.js +4 -0
  294. package/dist/components/input/index.js.map +1 -0
  295. package/dist/components/input-group/index.d.ts +132 -0
  296. package/dist/components/input-group/index.js +7 -0
  297. package/dist/components/input-group/index.js.map +1 -0
  298. package/dist/components/input-otp/index.d.ts +39 -0
  299. package/dist/components/input-otp/index.js +4 -0
  300. package/dist/components/input-otp/index.js.map +1 -0
  301. package/dist/components/item/index.d.ts +108 -0
  302. package/dist/components/item/index.js +5 -0
  303. package/dist/components/item/index.js.map +1 -0
  304. package/dist/components/kbd/index.d.ts +31 -0
  305. package/dist/components/kbd/index.js +4 -0
  306. package/dist/components/kbd/index.js.map +1 -0
  307. package/dist/components/label/index.d.ts +49 -0
  308. package/dist/components/label/index.js +4 -0
  309. package/dist/components/label/index.js.map +1 -0
  310. package/dist/components/locale-segment-group/index.d.ts +15 -0
  311. package/dist/components/locale-segment-group/index.js +4 -0
  312. package/dist/components/locale-segment-group/index.js.map +1 -0
  313. package/dist/components/menubar/index.d.ts +23 -0
  314. package/dist/components/menubar/index.js +5 -0
  315. package/dist/components/menubar/index.js.map +1 -0
  316. package/dist/components/native-select/index.d.ts +89 -0
  317. package/dist/components/native-select/index.js +3 -0
  318. package/dist/components/native-select/index.js.map +1 -0
  319. package/dist/components/navigation-menu/index.d.ts +15 -0
  320. package/dist/components/navigation-menu/index.js +5 -0
  321. package/dist/components/navigation-menu/index.js.map +1 -0
  322. package/dist/components/pagination/index.d.ts +44 -0
  323. package/dist/components/pagination/index.js +5 -0
  324. package/dist/components/pagination/index.js.map +1 -0
  325. package/dist/components/popover/index.d.ts +76 -0
  326. package/dist/components/popover/index.js +5 -0
  327. package/dist/components/popover/index.js.map +1 -0
  328. package/dist/components/progress/index.d.ts +6 -0
  329. package/dist/components/progress/index.js +4 -0
  330. package/dist/components/progress/index.js.map +1 -0
  331. package/dist/components/prose/index.d.ts +8 -0
  332. package/dist/components/prose/index.js +4 -0
  333. package/dist/components/prose/index.js.map +1 -0
  334. package/dist/components/radio-group/index.d.ts +11 -0
  335. package/dist/components/radio-group/index.js +5 -0
  336. package/dist/components/radio-group/index.js.map +1 -0
  337. package/dist/components/scroll-area/index.d.ts +11 -0
  338. package/dist/components/scroll-area/index.js +4 -0
  339. package/dist/components/scroll-area/index.js.map +1 -0
  340. package/dist/components/select/index.d.ts +17 -0
  341. package/dist/components/select/index.js +5 -0
  342. package/dist/components/select/index.js.map +1 -0
  343. package/dist/components/selectable-card/index.d.ts +11 -0
  344. package/dist/components/selectable-card/index.js +5 -0
  345. package/dist/components/selectable-card/index.js.map +1 -0
  346. package/dist/components/separator/index.d.ts +24 -0
  347. package/dist/components/separator/index.js +4 -0
  348. package/dist/components/separator/index.js.map +1 -0
  349. package/dist/components/sheet/index.d.ts +20 -0
  350. package/dist/components/sheet/index.js +8 -0
  351. package/dist/components/sheet/index.js.map +1 -0
  352. package/dist/components/sidebar/index.d.ts +16 -0
  353. package/dist/components/sidebar/index.js +3 -0
  354. package/dist/components/sidebar/index.js.map +1 -0
  355. package/dist/components/skeleton/index.d.ts +52 -0
  356. package/dist/components/skeleton/index.js +3 -0
  357. package/dist/components/skeleton/index.js.map +1 -0
  358. package/dist/components/slider/index.d.ts +7 -0
  359. package/dist/components/slider/index.js +4 -0
  360. package/dist/components/slider/index.js.map +1 -0
  361. package/dist/components/sonner/index.d.ts +7 -0
  362. package/dist/components/sonner/index.js +3 -0
  363. package/dist/components/sonner/index.js.map +1 -0
  364. package/dist/components/spinner/index.d.ts +10 -0
  365. package/dist/components/spinner/index.js +4 -0
  366. package/dist/components/spinner/index.js.map +1 -0
  367. package/dist/components/switch/index.d.ts +7 -0
  368. package/dist/components/switch/index.js +4 -0
  369. package/dist/components/switch/index.js.map +1 -0
  370. package/dist/components/table/index.d.ts +45 -0
  371. package/dist/components/table/index.js +5 -0
  372. package/dist/components/table/index.js.map +1 -0
  373. package/dist/components/tabs/index.d.ts +13 -0
  374. package/dist/components/tabs/index.js +5 -0
  375. package/dist/components/tabs/index.js.map +1 -0
  376. package/dist/components/textarea/index.d.ts +27 -0
  377. package/dist/components/textarea/index.js +4 -0
  378. package/dist/components/textarea/index.js.map +1 -0
  379. package/dist/components/theme-toggle/index.d.ts +6 -0
  380. package/dist/components/theme-toggle/index.js +6 -0
  381. package/dist/components/theme-toggle/index.js.map +1 -0
  382. package/dist/components/toast/index.d.ts +27 -0
  383. package/dist/components/toast/index.js +3 -0
  384. package/dist/components/toast/index.js.map +1 -0
  385. package/dist/components/toggle/index.d.ts +7 -0
  386. package/dist/components/toggle/index.js +4 -0
  387. package/dist/components/toggle/index.js.map +1 -0
  388. package/dist/components/toggle-group/index.d.ts +11 -0
  389. package/dist/components/toggle-group/index.js +4 -0
  390. package/dist/components/toggle-group/index.js.map +1 -0
  391. package/dist/components/tooltip/index.d.ts +12 -0
  392. package/dist/components/tooltip/index.js +3 -0
  393. package/dist/components/tooltip/index.js.map +1 -0
  394. package/dist/components/typography/index.d.ts +8 -0
  395. package/dist/components/typography/index.js +4 -0
  396. package/dist/components/typography/index.js.map +1 -0
  397. package/dist/components/video/index.d.ts +8 -0
  398. package/dist/components/video/index.js +4 -0
  399. package/dist/components/video/index.js.map +1 -0
  400. package/dist/index.d.ts +82 -0
  401. package/dist/index.js +83 -0
  402. package/dist/index.js.map +1 -0
  403. package/dist/lib/interactive/index.d.ts +44 -0
  404. package/dist/lib/interactive/index.js +3 -0
  405. package/dist/lib/interactive/index.js.map +1 -0
  406. package/dist/lib/signals/index.d.ts +15 -0
  407. package/dist/lib/signals/index.js +3 -0
  408. package/dist/lib/signals/index.js.map +1 -0
  409. package/dist/lib/utils.d.ts +5 -0
  410. package/dist/lib/utils.js +3 -0
  411. package/dist/lib/utils.js.map +1 -0
  412. package/dist/navigationMenuTriggerStyle-BWnESpon.d.ts +48 -0
  413. package/dist/sonner-store-Dfdxy8ba.d.ts +11 -0
  414. package/dist/theme.css +81 -0
  415. package/package.json +360 -0
@@ -0,0 +1,733 @@
1
+ import { Command, CommandInput, CommandItem, CommandList, CommandEmpty, useCommand } from './chunk-CP55TVOV.js';
2
+ import { Popover, PopoverTrigger, usePopover, PopoverContent } from './chunk-U2UNWXBC.js';
3
+ import { cn } from './chunk-MS2ZNYCJ.js';
4
+ import { signal } from '@preact/signals';
5
+ import { createContext } from 'preact';
6
+ import { useContext, useMemo, useState, useRef, useCallback, useLayoutEffect } from 'preact/hooks';
7
+ import { jsx, jsxs, Fragment } from 'preact/jsx-runtime';
8
+
9
+ // src/components/combobox/combobox-utils.ts
10
+ function flattenComboboxItems(items) {
11
+ const out = [];
12
+ for (const el of items) {
13
+ if (el !== null && typeof el === "object" && "items" in el) {
14
+ const sub = el.items;
15
+ if (Array.isArray(sub)) {
16
+ out.push(...sub);
17
+ continue;
18
+ }
19
+ }
20
+ out.push(el);
21
+ }
22
+ return out;
23
+ }
24
+ function defaultComboboxItemKey(item) {
25
+ if (typeof item === "string" || typeof item === "number") return String(item);
26
+ if (item && typeof item === "object" && "value" in item) {
27
+ const v = item.value;
28
+ return v === void 0 || v === null ? "" : String(v);
29
+ }
30
+ return JSON.stringify(item);
31
+ }
32
+ function defaultComboboxItemString(item, custom) {
33
+ if (custom) return custom(item);
34
+ if (typeof item === "string") return item;
35
+ if (item && typeof item === "object" && "label" in item) {
36
+ const l = item.label;
37
+ return l === void 0 || l === null ? "" : String(l);
38
+ }
39
+ return String(item);
40
+ }
41
+ function normalizeInitialKeys(multiple, defaultValue) {
42
+ if (defaultValue === void 0 || defaultValue === "") return [];
43
+ if (multiple) return Array.isArray(defaultValue) ? [...defaultValue] : [defaultValue];
44
+ return typeof defaultValue === "string" ? [defaultValue] : [];
45
+ }
46
+ function keysFromValueProp(multiple, valueProp) {
47
+ if (valueProp === void 0) return [];
48
+ if (multiple) return Array.isArray(valueProp) ? [...valueProp] : [];
49
+ return typeof valueProp === "string" && valueProp ? [valueProp] : [];
50
+ }
51
+ var ComboboxContext = createContext(null);
52
+ var useCombobox = () => {
53
+ const ctx = useContext(ComboboxContext);
54
+ if (!ctx) throw new Error("Combobox components must be used within Combobox");
55
+ return ctx;
56
+ };
57
+ function comboboxSelectionLabel(ctx) {
58
+ if (ctx.selectedKeys.length === 0) return "";
59
+ const labels = ctx.selectedKeys.map((k) => {
60
+ const it = ctx.leafItems.find((i) => ctx.itemKey(i) === k);
61
+ return it !== void 0 ? ctx.itemToString(it) : k;
62
+ });
63
+ return labels.join(", ");
64
+ }
65
+ var Combobox = ({
66
+ items = [],
67
+ itemToStringValue,
68
+ itemKey: itemKeyProp,
69
+ value: valueProp,
70
+ defaultValue,
71
+ onValueChange,
72
+ placeholder = "Select\u2026",
73
+ disabled = false,
74
+ open: openProp,
75
+ defaultOpen = false,
76
+ onOpenChange,
77
+ multiple: multipleProp = false,
78
+ liftedFilter = false,
79
+ autoHighlight = false,
80
+ showClear = false,
81
+ closeOnSelect: closeOnSelectProp,
82
+ class: className,
83
+ children,
84
+ ...rest
85
+ }) => {
86
+ const multiple = Boolean(multipleProp);
87
+ const closeOnSelect = closeOnSelectProp ?? !multiple;
88
+ const itemToString = useMemo(
89
+ () => (item) => defaultComboboxItemString(item, itemToStringValue),
90
+ [itemToStringValue]
91
+ );
92
+ const itemKey = useMemo(
93
+ () => (item) => itemKeyProp ? itemKeyProp(item) : defaultComboboxItemKey(item),
94
+ [itemKeyProp]
95
+ );
96
+ const leafItems = useMemo(() => flattenComboboxItems(items), [items]);
97
+ const isValueControlled = valueProp !== void 0;
98
+ const [internalKeys, setInternalKeys] = useState(
99
+ () => normalizeInitialKeys(multiple, defaultValue)
100
+ );
101
+ const selectedKeys = isValueControlled ? keysFromValueProp(multiple, valueProp) : internalKeys;
102
+ const selectedKey = selectedKeys[0] ?? "";
103
+ const filterQuery = useMemo(() => liftedFilter ? signal("") : null, [liftedFilter]);
104
+ const hasVisibleItemsSig = useMemo(() => liftedFilter ? signal(true) : null, [liftedFilter]);
105
+ const comboboxListRef = useMemo(() => ({ current: null }), []);
106
+ const commandNavRef = useMemo(() => ({ current: null }), []);
107
+ const isOpenRef = useRef(false);
108
+ const selectedKeysRef = useRef(selectedKeys);
109
+ selectedKeysRef.current = selectedKeys;
110
+ const emitKeys = useCallback(
111
+ (next) => {
112
+ if (!isValueControlled) setInternalKeys(next);
113
+ if (multiple) onValueChange?.(next);
114
+ else onValueChange?.(next[0] ?? "");
115
+ },
116
+ [isValueControlled, multiple, onValueChange]
117
+ );
118
+ const selectByItem = useCallback(
119
+ (item) => {
120
+ const key = itemKey(item);
121
+ emitKeys(key ? [key] : []);
122
+ },
123
+ [itemKey, emitKeys]
124
+ );
125
+ const toggleByItem = useCallback(
126
+ (item) => {
127
+ const key = itemKey(item);
128
+ const exists = selectedKeysRef.current.includes(key);
129
+ const next = exists ? selectedKeysRef.current.filter((k) => k !== key) : [...selectedKeysRef.current, key];
130
+ emitKeys(next);
131
+ },
132
+ [itemKey, emitKeys]
133
+ );
134
+ const removeKey = useCallback(
135
+ (key) => {
136
+ emitKeys(selectedKeysRef.current.filter((k) => k !== key));
137
+ },
138
+ [emitKeys]
139
+ );
140
+ const clearSelection = useCallback(() => {
141
+ emitKeys([]);
142
+ }, [emitKeys]);
143
+ const isSelected = useCallback(
144
+ (key) => {
145
+ return selectedKeys.includes(key);
146
+ },
147
+ [selectedKeys]
148
+ );
149
+ const handleOpenChange = useCallback(
150
+ (open) => {
151
+ isOpenRef.current = open;
152
+ onOpenChange?.(open);
153
+ if (!liftedFilter || !filterQuery) return;
154
+ if (open) {
155
+ filterQuery.value = "";
156
+ } else if (multiple) {
157
+ filterQuery.value = "";
158
+ } else {
159
+ const k = selectedKeysRef.current[0];
160
+ if (!k) filterQuery.value = "";
161
+ else {
162
+ const it = leafItems.find((i) => itemKey(i) === k);
163
+ filterQuery.value = it !== void 0 ? itemToString(it) : k;
164
+ }
165
+ }
166
+ },
167
+ [liftedFilter, filterQuery, onOpenChange, multiple, leafItems, itemKey, itemToString]
168
+ );
169
+ useLayoutEffect(() => {
170
+ if (!liftedFilter || !filterQuery || multiple || isOpenRef.current) return;
171
+ const k = selectedKeys[0];
172
+ if (!k) {
173
+ filterQuery.value = "";
174
+ return;
175
+ }
176
+ const it = leafItems.find((i) => itemKey(i) === k);
177
+ filterQuery.value = it !== void 0 ? itemToString(it) : k;
178
+ }, [liftedFilter, filterQuery, multiple, selectedKeys, leafItems, itemKey, itemToString]);
179
+ const contextValue = useMemo(
180
+ () => ({
181
+ items,
182
+ leafItems,
183
+ itemToString,
184
+ itemKey,
185
+ selectedKeys,
186
+ selectedKey,
187
+ multiple,
188
+ isSelected,
189
+ selectByItem,
190
+ toggleByItem,
191
+ removeKey,
192
+ clearSelection,
193
+ placeholder,
194
+ disabled,
195
+ liftedFilter,
196
+ filterQuery,
197
+ hasVisibleItems: hasVisibleItemsSig,
198
+ autoHighlight,
199
+ showClear,
200
+ closeOnSelect,
201
+ comboboxListRef,
202
+ commandNavRef
203
+ }),
204
+ [
205
+ items,
206
+ leafItems,
207
+ itemToString,
208
+ itemKey,
209
+ selectedKeys,
210
+ selectedKey,
211
+ multiple,
212
+ isSelected,
213
+ selectByItem,
214
+ toggleByItem,
215
+ removeKey,
216
+ clearSelection,
217
+ placeholder,
218
+ disabled,
219
+ liftedFilter,
220
+ filterQuery,
221
+ hasVisibleItemsSig,
222
+ autoHighlight,
223
+ showClear,
224
+ closeOnSelect,
225
+ comboboxListRef,
226
+ commandNavRef
227
+ ]
228
+ );
229
+ return /* @__PURE__ */ jsx(ComboboxContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx("div", { "data-slot": "combobox", class: cn("relative", className), ...rest, children: /* @__PURE__ */ jsx(Popover, { open: openProp, defaultOpen, onOpenChange: handleOpenChange, children }) }) });
230
+ };
231
+ var ComboboxChip = ({
232
+ itemKey: chipKey,
233
+ children,
234
+ class: className,
235
+ ...rest
236
+ }) => {
237
+ const ctx = useCombobox();
238
+ return /* @__PURE__ */ jsxs(
239
+ "span",
240
+ {
241
+ "data-slot": "combobox-chip",
242
+ class: cn(
243
+ "bg-secondary text-secondary-foreground inline-flex max-w-full items-center gap-0.5 rounded-md px-2 py-0.5 text-xs",
244
+ className
245
+ ),
246
+ ...rest,
247
+ children: [
248
+ /* @__PURE__ */ jsx("span", { class: "min-w-0 truncate", children }),
249
+ /* @__PURE__ */ jsx(
250
+ "button",
251
+ {
252
+ type: "button",
253
+ class: "text-muted-foreground hover:text-foreground shrink-0 rounded p-0.5 outline-none focus-visible:ring-2 focus-visible:ring-ring/50",
254
+ "aria-label": "Remove",
255
+ onClick: (event) => {
256
+ event.stopPropagation();
257
+ ctx.removeKey(chipKey);
258
+ },
259
+ children: /* @__PURE__ */ jsx(
260
+ "svg",
261
+ {
262
+ xmlns: "http://www.w3.org/2000/svg",
263
+ width: "12",
264
+ height: "12",
265
+ viewBox: "0 0 24 24",
266
+ fill: "none",
267
+ stroke: "currentColor",
268
+ "stroke-width": "2",
269
+ "aria-hidden": true,
270
+ children: /* @__PURE__ */ jsx("path", { d: "M18 6 6 18M6 6l12 12" })
271
+ }
272
+ )
273
+ }
274
+ )
275
+ ]
276
+ }
277
+ );
278
+ };
279
+ var ComboboxChips = ({ class: className, children, ...rest }) => /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
280
+ "div",
281
+ {
282
+ "data-slot": "combobox-chips",
283
+ class: cn(
284
+ "border-input bg-background flex min-h-8 w-full min-w-44 flex-wrap items-center gap-1 rounded-md border px-2 py-1 shadow-xs outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50",
285
+ className
286
+ ),
287
+ ...rest,
288
+ children
289
+ }
290
+ ) });
291
+ var ComboboxChipsInput = ({
292
+ class: className,
293
+ onKeyDown,
294
+ onInput,
295
+ onFocus,
296
+ ...rest
297
+ }) => {
298
+ const ctx = useCombobox();
299
+ const popover = usePopover();
300
+ if (!ctx.filterQuery) {
301
+ throw new Error("ComboboxChipsInput must be used with Combobox liftedFilter={true}");
302
+ }
303
+ void ctx.filterQuery.value;
304
+ void popover.open.value;
305
+ return /* @__PURE__ */ jsx(
306
+ "input",
307
+ {
308
+ ...rest,
309
+ "data-slot": "combobox-chips-input",
310
+ class: cn(
311
+ "placeholder:text-muted-foreground min-w-[6rem] flex-1 border-0 bg-transparent px-1 py-1 text-sm outline-none",
312
+ className
313
+ ),
314
+ value: ctx.filterQuery.value,
315
+ onInput: (event) => {
316
+ ctx.filterQuery.value = event.currentTarget.value;
317
+ popover.setOpen(true);
318
+ onInput?.(event);
319
+ },
320
+ onFocus: (event) => {
321
+ onFocus?.(event);
322
+ popover.setOpen(true);
323
+ },
324
+ onKeyDown: (event) => {
325
+ const nav = ctx.commandNavRef.current;
326
+ if (ctx.autoHighlight && nav) {
327
+ if (event.key === "ArrowDown") {
328
+ event.preventDefault();
329
+ popover.setOpen(true);
330
+ nav.moveHighlight(1);
331
+ return;
332
+ }
333
+ if (event.key === "ArrowUp") {
334
+ event.preventDefault();
335
+ popover.setOpen(true);
336
+ nav.moveHighlight(-1);
337
+ return;
338
+ }
339
+ if (event.key === "Enter") {
340
+ event.preventDefault();
341
+ if (popover.open.value) nav.activateHighlighted();
342
+ return;
343
+ }
344
+ }
345
+ onKeyDown?.(event);
346
+ }
347
+ }
348
+ );
349
+ };
350
+ var ComboboxClear = ({ class: className, onClick, ...rest }) => {
351
+ const ctx = useCombobox();
352
+ const has = ctx.selectedKeys.length > 0;
353
+ if (!has || !ctx.showClear) return null;
354
+ return /* @__PURE__ */ jsx(
355
+ "button",
356
+ {
357
+ type: "button",
358
+ "data-slot": "combobox-clear",
359
+ "aria-label": "Clear selection",
360
+ class: cn(
361
+ "text-muted-foreground hover:text-foreground inline-flex size-7 shrink-0 items-center justify-center rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring/50",
362
+ className
363
+ ),
364
+ onClick: (event) => {
365
+ onClick?.(event);
366
+ if (event.defaultPrevented) return;
367
+ ctx.clearSelection();
368
+ if (ctx.filterQuery) ctx.filterQuery.value = "";
369
+ },
370
+ ...rest,
371
+ children: /* @__PURE__ */ jsx(
372
+ "svg",
373
+ {
374
+ xmlns: "http://www.w3.org/2000/svg",
375
+ width: "14",
376
+ height: "14",
377
+ viewBox: "0 0 24 24",
378
+ fill: "none",
379
+ stroke: "currentColor",
380
+ "stroke-width": "2",
381
+ "aria-hidden": true,
382
+ children: /* @__PURE__ */ jsx("path", { d: "M18 6 6 18M6 6l12 12" })
383
+ }
384
+ )
385
+ }
386
+ );
387
+ };
388
+ function CommandNavBridge() {
389
+ const cmd = useCommand();
390
+ const combo = useCombobox();
391
+ const navRef = combo.commandNavRef;
392
+ useLayoutEffect(() => {
393
+ navRef.current = {
394
+ moveHighlight: cmd.moveHighlight,
395
+ activateHighlighted: cmd.activateHighlighted
396
+ };
397
+ return () => {
398
+ navRef.current = null;
399
+ };
400
+ }, [cmd.moveHighlight, cmd.activateHighlighted, navRef]);
401
+ return null;
402
+ }
403
+ var ComboboxCommand = ({
404
+ autoHighlight: autoHighlightProp,
405
+ class: className,
406
+ children,
407
+ ...rest
408
+ }) => {
409
+ const ctx = useCombobox();
410
+ const query = ctx.liftedFilter && ctx.filterQuery ? ctx.filterQuery : void 0;
411
+ const hasVis = ctx.liftedFilter && ctx.hasVisibleItems ? ctx.hasVisibleItems : void 0;
412
+ const autoHighlight = autoHighlightProp ?? ctx.autoHighlight;
413
+ return /* @__PURE__ */ jsxs(
414
+ Command,
415
+ {
416
+ ...rest,
417
+ class: cn("rounded-lg border-0 bg-transparent shadow-none", className),
418
+ autoHighlight,
419
+ query,
420
+ hasVisibleItems: hasVis,
421
+ children: [
422
+ /* @__PURE__ */ jsx(CommandNavBridge, {}),
423
+ children
424
+ ]
425
+ }
426
+ );
427
+ };
428
+ var ComboboxContent = ({
429
+ forceMount: forceMountProp,
430
+ class: className,
431
+ ...rest
432
+ }) => {
433
+ const popover = usePopover();
434
+ const ctx = useCombobox();
435
+ const forceMount = forceMountProp ?? ctx.liftedFilter;
436
+ return /* @__PURE__ */ jsx(
437
+ PopoverContent,
438
+ {
439
+ forceMount,
440
+ class: cn(
441
+ "w-64 max-w-[calc(100vw-1.5rem)] gap-0 overflow-hidden p-0",
442
+ ctx.liftedFilter && !popover.open.value && "pointer-events-none invisible max-h-0 min-h-0 border-0 p-0 opacity-0 shadow-none",
443
+ className
444
+ ),
445
+ ...rest
446
+ }
447
+ );
448
+ };
449
+ var ComboboxInlineInput = ({
450
+ class: className,
451
+ onKeyDown,
452
+ onInput,
453
+ onFocus,
454
+ ...rest
455
+ }) => {
456
+ const ctx = useCombobox();
457
+ const popover = usePopover();
458
+ if (!ctx.filterQuery) {
459
+ throw new Error("ComboboxInlineInput must be used with Combobox liftedFilter={true}");
460
+ }
461
+ void ctx.filterQuery.value;
462
+ void popover.open.value;
463
+ return /* @__PURE__ */ jsx(
464
+ "input",
465
+ {
466
+ ...rest,
467
+ "data-slot": "combobox-inline-input",
468
+ class: cn(
469
+ "border-input bg-background placeholder:text-muted-foreground flex h-10 w-full min-w-0 rounded-md border px-3 py-2 text-sm shadow-xs outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",
470
+ className
471
+ ),
472
+ value: ctx.filterQuery.value,
473
+ onInput: (event) => {
474
+ ctx.filterQuery.value = event.currentTarget.value;
475
+ popover.setOpen(true);
476
+ onInput?.(event);
477
+ },
478
+ onFocus: (event) => {
479
+ onFocus?.(event);
480
+ popover.setOpen(true);
481
+ },
482
+ onKeyDown: (event) => {
483
+ const nav = ctx.commandNavRef.current;
484
+ if (ctx.autoHighlight && nav) {
485
+ if (event.key === "ArrowDown") {
486
+ event.preventDefault();
487
+ popover.setOpen(true);
488
+ nav.moveHighlight(1);
489
+ return;
490
+ }
491
+ if (event.key === "ArrowUp") {
492
+ event.preventDefault();
493
+ popover.setOpen(true);
494
+ nav.moveHighlight(-1);
495
+ return;
496
+ }
497
+ if (event.key === "Enter") {
498
+ event.preventDefault();
499
+ if (popover.open.value) nav.activateHighlighted();
500
+ return;
501
+ }
502
+ }
503
+ onKeyDown?.(event);
504
+ }
505
+ }
506
+ );
507
+ };
508
+ var ComboboxInput = ({ class: className, ...rest }) => /* @__PURE__ */ jsx(CommandInput, { class: cn(className), ...rest });
509
+ var ComboboxItem = ({
510
+ item,
511
+ class: className,
512
+ children,
513
+ disabled,
514
+ onClick,
515
+ ...rest
516
+ }) => {
517
+ const ctx = useCombobox();
518
+ const popover = usePopover();
519
+ const filterValue = ctx.itemToString(item);
520
+ const key = ctx.itemKey(item);
521
+ const selected = ctx.multiple ? ctx.selectedKeys.includes(key) : ctx.selectedKey === key;
522
+ return /* @__PURE__ */ jsx(
523
+ CommandItem,
524
+ {
525
+ value: filterValue,
526
+ disabled,
527
+ class: cn(selected && "bg-accent/60", className),
528
+ onSelect: () => {
529
+ if (ctx.multiple) {
530
+ ctx.toggleByItem(item);
531
+ if (ctx.closeOnSelect) popover.setOpen(false);
532
+ } else {
533
+ ctx.selectByItem(item);
534
+ popover.setOpen(false);
535
+ }
536
+ },
537
+ onClick,
538
+ ...rest,
539
+ children
540
+ }
541
+ );
542
+ };
543
+ var ComboboxList = ({
544
+ items: itemsProp,
545
+ children,
546
+ onMount,
547
+ ...rest
548
+ }) => {
549
+ const ctx = useCombobox();
550
+ const list = itemsProp !== void 0 ? itemsProp : ctx.items;
551
+ const body = typeof children === "function" ? list.map(
552
+ (item, index) => children(item, index)
553
+ ) : children;
554
+ return /* @__PURE__ */ jsx(
555
+ CommandList,
556
+ {
557
+ ...rest,
558
+ onMount: (el) => {
559
+ ctx.comboboxListRef.current = el;
560
+ onMount?.(el);
561
+ },
562
+ children: body
563
+ }
564
+ );
565
+ };
566
+ var ComboboxTrigger = ({ class: className, disabled, ...rest }) => {
567
+ const ctx = useCombobox();
568
+ return /* @__PURE__ */ jsx(
569
+ PopoverTrigger,
570
+ {
571
+ class: cn(
572
+ "border-input bg-background hover:bg-muted/50 flex h-8 w-full min-w-44 items-center justify-between gap-2 rounded-md border px-3 py-1 text-start text-sm font-normal shadow-xs outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",
573
+ className
574
+ ),
575
+ disabled: disabled ?? ctx.disabled,
576
+ ...rest
577
+ }
578
+ );
579
+ };
580
+ var ComboboxValue = ({
581
+ placeholder: placeholderProp,
582
+ children,
583
+ class: className,
584
+ ...rest
585
+ }) => {
586
+ const ctx = useCombobox();
587
+ const label = comboboxSelectionLabel(ctx);
588
+ const empty = ctx.selectedKeys.length === 0;
589
+ if (typeof children === "function") {
590
+ return /* @__PURE__ */ jsx(Fragment, { children: children({ label, empty, keys: ctx.selectedKeys }) });
591
+ }
592
+ return /* @__PURE__ */ jsx(
593
+ "span",
594
+ {
595
+ "data-slot": "combobox-value",
596
+ class: cn("truncate", empty && "text-muted-foreground", className),
597
+ ...rest,
598
+ children: empty ? placeholderProp ?? ctx.placeholder : label
599
+ }
600
+ );
601
+ };
602
+ var ChevronDownIcon = () => /* @__PURE__ */ jsx(
603
+ "svg",
604
+ {
605
+ xmlns: "http://www.w3.org/2000/svg",
606
+ width: "16",
607
+ height: "16",
608
+ viewBox: "0 0 24 24",
609
+ fill: "none",
610
+ stroke: "currentColor",
611
+ "stroke-width": "2",
612
+ "aria-hidden": true,
613
+ class: "shrink-0 opacity-50",
614
+ children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" })
615
+ }
616
+ );
617
+ var ComboboxSelect = ({
618
+ options,
619
+ searchPlaceholder = "Search\u2026",
620
+ emptyText = "No results found.",
621
+ triggerClass,
622
+ showClear = false,
623
+ autoHighlight = false,
624
+ liftedFilter = false,
625
+ multiple = false,
626
+ class: className,
627
+ placeholder,
628
+ ...rest
629
+ }) => {
630
+ const useLifted = Boolean(liftedFilter || multiple);
631
+ if (multiple) {
632
+ return /* @__PURE__ */ jsxs(
633
+ Combobox,
634
+ {
635
+ class: className,
636
+ items: options,
637
+ itemKey: (o) => o.value,
638
+ itemToStringValue: (o) => o.label,
639
+ multiple: true,
640
+ liftedFilter: true,
641
+ autoHighlight,
642
+ showClear,
643
+ placeholder,
644
+ ...rest,
645
+ children: [
646
+ /* @__PURE__ */ jsxs(ComboboxChips, { class: triggerClass, children: [
647
+ /* @__PURE__ */ jsx(ComboboxValue, { placeholder: placeholder ?? "Select\u2026", children: ({ keys, empty }) => /* @__PURE__ */ jsxs(Fragment, { children: [
648
+ keys.map((k) => {
649
+ const o = options.find((x) => x.value === k);
650
+ if (!o) return null;
651
+ return /* @__PURE__ */ jsx(ComboboxChip, { itemKey: k, children: o.label }, k);
652
+ }),
653
+ empty ? /* @__PURE__ */ jsx("span", { class: "text-muted-foreground px-1 py-0.5 text-sm", children: placeholder ?? "Select\u2026" }) : null
654
+ ] }) }),
655
+ showClear ? /* @__PURE__ */ jsx(ComboboxClear, { class: "shrink-0" }) : null,
656
+ /* @__PURE__ */ jsx(ComboboxChipsInput, { placeholder: searchPlaceholder })
657
+ ] }),
658
+ /* @__PURE__ */ jsx(ComboboxContent, { children: /* @__PURE__ */ jsxs(ComboboxCommand, { children: [
659
+ /* @__PURE__ */ jsx(CommandEmpty, { children: emptyText }),
660
+ /* @__PURE__ */ jsx(ComboboxList, { children: (opt) => {
661
+ const o = opt;
662
+ return /* @__PURE__ */ jsx(ComboboxItem, { item: o, children: o.label }, o.value);
663
+ } })
664
+ ] }) })
665
+ ]
666
+ }
667
+ );
668
+ }
669
+ if (useLifted) {
670
+ return /* @__PURE__ */ jsxs(
671
+ Combobox,
672
+ {
673
+ class: className,
674
+ items: options,
675
+ itemKey: (o) => o.value,
676
+ itemToStringValue: (o) => o.label,
677
+ liftedFilter: true,
678
+ autoHighlight,
679
+ showClear,
680
+ placeholder,
681
+ ...rest,
682
+ children: [
683
+ /* @__PURE__ */ jsx(ComboboxTrigger, { asChild: true, children: /* @__PURE__ */ jsxs("div", { class: cn("relative flex w-full min-w-44 items-center", triggerClass), children: [
684
+ /* @__PURE__ */ jsx(ComboboxInlineInput, { placeholder: searchPlaceholder, class: "pe-16" }),
685
+ showClear ? /* @__PURE__ */ jsx(ComboboxClear, { class: "absolute end-9 top-1/2 z-10 -translate-y-1/2" }) : null,
686
+ /* @__PURE__ */ jsx("span", { class: "pointer-events-none absolute end-3 top-1/2 -translate-y-1/2", children: /* @__PURE__ */ jsx(ChevronDownIcon, {}) })
687
+ ] }) }),
688
+ /* @__PURE__ */ jsx(ComboboxContent, { children: /* @__PURE__ */ jsxs(ComboboxCommand, { children: [
689
+ /* @__PURE__ */ jsx(CommandEmpty, { children: emptyText }),
690
+ /* @__PURE__ */ jsx(ComboboxList, { children: (opt) => {
691
+ const o = opt;
692
+ return /* @__PURE__ */ jsx(ComboboxItem, { item: o, children: o.label }, o.value);
693
+ } })
694
+ ] }) })
695
+ ]
696
+ }
697
+ );
698
+ }
699
+ return /* @__PURE__ */ jsxs(
700
+ Combobox,
701
+ {
702
+ class: className,
703
+ items: options,
704
+ itemKey: (o) => o.value,
705
+ itemToStringValue: (o) => o.label,
706
+ autoHighlight,
707
+ showClear,
708
+ placeholder,
709
+ ...rest,
710
+ children: [
711
+ /* @__PURE__ */ jsxs(ComboboxTrigger, { class: cn(triggerClass), children: [
712
+ /* @__PURE__ */ jsx(ComboboxValue, {}),
713
+ /* @__PURE__ */ jsxs("span", { class: "ms-auto flex shrink-0 items-center gap-0.5", children: [
714
+ showClear ? /* @__PURE__ */ jsx(ComboboxClear, {}) : null,
715
+ /* @__PURE__ */ jsx(ChevronDownIcon, {})
716
+ ] })
717
+ ] }),
718
+ /* @__PURE__ */ jsx(ComboboxContent, { children: /* @__PURE__ */ jsxs(ComboboxCommand, { children: [
719
+ /* @__PURE__ */ jsx(ComboboxInput, { placeholder: searchPlaceholder }),
720
+ /* @__PURE__ */ jsx(CommandEmpty, { children: emptyText }),
721
+ /* @__PURE__ */ jsx(ComboboxList, { children: (opt) => {
722
+ const o = opt;
723
+ return /* @__PURE__ */ jsx(ComboboxItem, { item: o, children: o.label }, o.value);
724
+ } })
725
+ ] }) })
726
+ ]
727
+ }
728
+ );
729
+ };
730
+
731
+ export { Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxClear, ComboboxCommand, ComboboxContent, ComboboxInlineInput, ComboboxInput, ComboboxItem, ComboboxList, ComboboxSelect, ComboboxTrigger, ComboboxValue, comboboxSelectionLabel, defaultComboboxItemKey, defaultComboboxItemString, flattenComboboxItems, useCombobox };
732
+ //# sourceMappingURL=chunk-PU5J5EPY.js.map
733
+ //# sourceMappingURL=chunk-PU5J5EPY.js.map