@datum-cloud/datum-ui 0.4.0 → 0.6.0-alpha.3e04d8c

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 (290) hide show
  1. package/README.md +81 -39
  2. package/dist/adapter-context-rWveHhDd.mjs +25 -0
  3. package/dist/alert/index.mjs +2 -3
  4. package/dist/{alert-BC2Mccfo.mjs → alert-BDj6od5I.mjs} +2 -4
  5. package/dist/app-navigation/index.mjs +4 -12
  6. package/dist/{app-navigation-DsCKgfPe.mjs → app-navigation-84ro28PU.mjs} +5 -8
  7. package/dist/autocomplete/index.mjs +2 -7
  8. package/dist/{autocomplete-DRB_kSVx.mjs → autocomplete-CkYJueBL.mjs} +7 -9
  9. package/dist/autosearch/index.mjs +195 -0
  10. package/dist/avatar/index.mjs +2 -4
  11. package/dist/{avatar-DyLq0xkt.mjs → avatar-BtKVcvO4.mjs} +2 -4
  12. package/dist/avatar-stack/index.mjs +2 -6
  13. package/dist/{avatar-stack-BT0dBswq.mjs → avatar-stack-oVr8tsU7.mjs} +4 -6
  14. package/dist/badge/index.mjs +2 -3
  15. package/dist/{badge-BgFj4Nsc.mjs → badge-DJR33ftJ.mjs} +2 -4
  16. package/dist/breadcrumb/index.mjs +2 -4
  17. package/dist/{breadcrumb-CJNaYyk1.mjs → breadcrumb-B-9G347O.mjs} +2 -4
  18. package/dist/button/index.mjs +3 -4
  19. package/dist/{button-0N61fmAR.mjs → button-BllvE9Lm.mjs} +3 -5
  20. package/dist/{button-D6AORsOz.mjs → button-D3RrsMfQ.mjs} +2 -4
  21. package/dist/{link-button-Cby0p4LW.mjs → button-fO8nazJE.mjs} +3 -5
  22. package/dist/button-group/index.mjs +2 -5
  23. package/dist/{button-group-BDk8btAy.mjs → button-group-CYPka2zz.mjs} +3 -5
  24. package/dist/calendar/index.mjs +2 -5
  25. package/dist/{calendar-BtfraIvX.mjs → calendar-DEkCw7I1.mjs} +4 -6
  26. package/dist/{calendar-date-picker-B9mxJM7f.mjs → calendar-date-picker-CDT-8Ha8.mjs} +8 -9
  27. package/dist/card/index.mjs +2 -4
  28. package/dist/{card-BiHXFt4s.mjs → card-DKG1Cwlj.mjs} +3 -6
  29. package/dist/chart/index.mjs +2 -4
  30. package/dist/{chart-CL0i-xIt.mjs → chart-CUa21ynK.mjs} +2 -4
  31. package/dist/checkbox/index.mjs +2 -4
  32. package/dist/{checkbox-CQrjygFt.mjs → checkbox-I5BvrMPe.mjs} +3 -6
  33. package/dist/{close.icon-D2r5q3bj.mjs → close.icon-HCfS4Y-N.mjs} +2 -4
  34. package/dist/{cn-DWCc1QRE.mjs → cn-D2KYQ917.mjs} +1 -3
  35. package/dist/code-editor/index.mjs +2 -0
  36. package/dist/{col-C9PDhvm5.mjs → col-1T0Q3SlH.mjs} +2 -7
  37. package/dist/collapsible/index.mjs +2 -3
  38. package/dist/{collapsible-Dw71o2um.mjs → collapsible-CUphkSBt.mjs} +1 -3
  39. package/dist/combobox/index.mjs +2 -0
  40. package/dist/combobox-B-C9lJeD.mjs +97 -0
  41. package/dist/command/index.mjs +2 -5
  42. package/dist/{command-DVroicgn.mjs → command-DqHWukGK.mjs} +3 -5
  43. package/dist/components/features/autocomplete/autocomplete.d.ts +1 -1
  44. package/dist/components/features/autocomplete/autocomplete.d.ts.map +1 -1
  45. package/dist/components/features/autocomplete/autocomplete.types.d.ts +2 -0
  46. package/dist/components/features/autocomplete/autocomplete.types.d.ts.map +1 -1
  47. package/dist/components/features/autosearch/autosearch.d.ts +35 -0
  48. package/dist/components/features/autosearch/autosearch.d.ts.map +1 -0
  49. package/dist/components/features/autosearch/autosearch.types.d.ts +51 -0
  50. package/dist/components/features/autosearch/autosearch.types.d.ts.map +1 -0
  51. package/dist/components/features/autosearch/index.d.ts +3 -0
  52. package/dist/components/features/autosearch/index.d.ts.map +1 -0
  53. package/dist/components/features/calendar-date-picker/calendar-date-picker.d.ts +2 -1
  54. package/dist/components/features/calendar-date-picker/calendar-date-picker.d.ts.map +1 -1
  55. package/dist/components/features/code-editor/code-editor-tabs.d.ts +63 -0
  56. package/dist/components/features/code-editor/code-editor-tabs.d.ts.map +1 -0
  57. package/dist/components/features/code-editor/code-editor.d.ts +58 -0
  58. package/dist/components/features/code-editor/code-editor.d.ts.map +1 -0
  59. package/dist/components/features/code-editor/index.d.ts +6 -0
  60. package/dist/components/features/code-editor/index.d.ts.map +1 -0
  61. package/dist/components/features/code-editor/lib/editor.d.ts +7 -0
  62. package/dist/components/features/code-editor/lib/editor.d.ts.map +1 -0
  63. package/dist/components/features/code-editor/types.d.ts +98 -0
  64. package/dist/components/features/code-editor/types.d.ts.map +1 -0
  65. package/dist/components/features/combobox/combobox.d.ts +27 -0
  66. package/dist/components/features/combobox/combobox.d.ts.map +1 -0
  67. package/dist/components/features/combobox/index.d.ts +3 -0
  68. package/dist/components/features/combobox/index.d.ts.map +1 -0
  69. package/dist/components/features/combobox/types.d.ts +84 -0
  70. package/dist/components/features/combobox/types.d.ts.map +1 -0
  71. package/dist/components/features/date-time-picker/date-time-picker.d.ts +9 -0
  72. package/dist/components/features/date-time-picker/date-time-picker.d.ts.map +1 -0
  73. package/dist/components/features/date-time-picker/index.d.ts +3 -0
  74. package/dist/components/features/date-time-picker/index.d.ts.map +1 -0
  75. package/dist/components/features/date-time-picker/types.d.ts +59 -0
  76. package/dist/components/features/date-time-picker/types.d.ts.map +1 -0
  77. package/dist/components/features/date-time-picker/utils/format.d.ts +13 -0
  78. package/dist/components/features/date-time-picker/utils/format.d.ts.map +1 -0
  79. package/dist/components/features/date-time-picker/utils/index.d.ts +3 -0
  80. package/dist/components/features/date-time-picker/utils/index.d.ts.map +1 -0
  81. package/dist/components/features/date-time-picker/utils/timezone.d.ts +23 -0
  82. package/dist/components/features/date-time-picker/utils/timezone.d.ts.map +1 -0
  83. package/dist/components/features/form/adapter-context.d.ts +17 -0
  84. package/dist/components/features/form/adapter-context.d.ts.map +1 -0
  85. package/dist/components/features/form/adapter-types.d.ts +120 -0
  86. package/dist/components/features/form/adapter-types.d.ts.map +1 -0
  87. package/dist/components/features/form/adapters/conform/conform-adapter.d.ts +9 -0
  88. package/dist/components/features/form/adapters/conform/conform-adapter.d.ts.map +1 -0
  89. package/dist/components/features/form/adapters/conform/conform-provider.d.ts +22 -0
  90. package/dist/components/features/form/adapters/conform/conform-provider.d.ts.map +1 -0
  91. package/dist/components/features/form/adapters/conform/index.d.ts +3 -0
  92. package/dist/components/features/form/adapters/conform/index.d.ts.map +1 -0
  93. package/dist/components/features/form/adapters/rhf/index.d.ts +3 -0
  94. package/dist/components/features/form/adapters/rhf/index.d.ts.map +1 -0
  95. package/dist/components/features/form/adapters/rhf/rhf-adapter.d.ts +10 -0
  96. package/dist/components/features/form/adapters/rhf/rhf-adapter.d.ts.map +1 -0
  97. package/dist/components/features/form/adapters/rhf/rhf-provider.d.ts +22 -0
  98. package/dist/components/features/form/adapters/rhf/rhf-provider.d.ts.map +1 -0
  99. package/dist/components/features/form/components/form-autocomplete.d.ts.map +1 -1
  100. package/dist/components/features/form/components/form-autosearch.d.ts +37 -0
  101. package/dist/components/features/form/components/form-autosearch.d.ts.map +1 -0
  102. package/dist/components/features/form/components/form-checkbox.d.ts.map +1 -1
  103. package/dist/components/features/form/components/form-combobox.d.ts +80 -0
  104. package/dist/components/features/form/components/form-combobox.d.ts.map +1 -0
  105. package/dist/components/features/form/components/form-copy-box.d.ts +3 -0
  106. package/dist/components/features/form/components/form-copy-box.d.ts.map +1 -1
  107. package/dist/components/features/form/components/form-custom.d.ts.map +1 -1
  108. package/dist/components/features/form/components/form-date-picker.d.ts +40 -0
  109. package/dist/components/features/form/components/form-date-picker.d.ts.map +1 -0
  110. package/dist/components/features/form/components/form-date-time-picker.d.ts +39 -0
  111. package/dist/components/features/form/components/form-date-time-picker.d.ts.map +1 -0
  112. package/dist/components/features/form/components/form-dialog.d.ts.map +1 -1
  113. package/dist/components/features/form/components/form-field-array.d.ts +5 -17
  114. package/dist/components/features/form/components/form-field-array.d.ts.map +1 -1
  115. package/dist/components/features/form/components/form-field.d.ts +7 -21
  116. package/dist/components/features/form/components/form-field.d.ts.map +1 -1
  117. package/dist/components/features/form/components/form-input-group.d.ts +4 -4
  118. package/dist/components/features/form/components/form-input-group.d.ts.map +1 -1
  119. package/dist/components/features/form/components/form-input.d.ts.map +1 -1
  120. package/dist/components/features/form/components/form-radio-group.d.ts.map +1 -1
  121. package/dist/components/features/form/components/form-root.d.ts +5 -25
  122. package/dist/components/features/form/components/form-root.d.ts.map +1 -1
  123. package/dist/components/features/form/components/form-select.d.ts.map +1 -1
  124. package/dist/components/features/form/components/form-switch.d.ts.map +1 -1
  125. package/dist/components/features/form/components/form-textarea.d.ts.map +1 -1
  126. package/dist/components/features/form/components/form-time-picker.d.ts +21 -0
  127. package/dist/components/features/form/components/form-time-picker.d.ts.map +1 -0
  128. package/dist/components/features/form/components/form-transfer.d.ts +37 -0
  129. package/dist/components/features/form/components/form-transfer.d.ts.map +1 -0
  130. package/dist/components/features/form/components/index.d.ts +7 -1
  131. package/dist/components/features/form/components/index.d.ts.map +1 -1
  132. package/dist/components/features/form/components/stepper/form-stepper.d.ts.map +1 -1
  133. package/dist/components/features/form/context/form-context.d.ts +2 -2
  134. package/dist/components/features/form/context/form-context.d.ts.map +1 -1
  135. package/dist/components/features/form/hooks/index.d.ts +1 -1
  136. package/dist/components/features/form/hooks/index.d.ts.map +1 -1
  137. package/dist/components/features/form/hooks/use-field.d.ts +12 -18
  138. package/dist/components/features/form/hooks/use-field.d.ts.map +1 -1
  139. package/dist/components/features/form/hooks/use-form-state.d.ts +36 -0
  140. package/dist/components/features/form/hooks/use-form-state.d.ts.map +1 -0
  141. package/dist/components/features/form/hooks/use-watch.d.ts +9 -20
  142. package/dist/components/features/form/hooks/use-watch.d.ts.map +1 -1
  143. package/dist/components/features/form/index.d.ts +69 -45
  144. package/dist/components/features/form/index.d.ts.map +1 -1
  145. package/dist/components/features/form/stepper/index.d.ts +17 -0
  146. package/dist/components/features/form/stepper/index.d.ts.map +1 -0
  147. package/dist/components/features/form/types/index.d.ts +68 -32
  148. package/dist/components/features/form/types/index.d.ts.map +1 -1
  149. package/dist/components/features/form/utils/get-field-constraints.d.ts +33 -0
  150. package/dist/components/features/form/utils/get-field-constraints.d.ts.map +1 -0
  151. package/dist/components/features/form/utils/get-schema-defaults.d.ts +24 -0
  152. package/dist/components/features/form/utils/get-schema-defaults.d.ts.map +1 -0
  153. package/dist/components/features/form/utils/zod-helpers.d.ts +12 -0
  154. package/dist/components/features/form/utils/zod-helpers.d.ts.map +1 -0
  155. package/dist/components/features/index.d.ts +1 -0
  156. package/dist/components/features/index.d.ts.map +1 -1
  157. package/dist/components/features/time-picker/index.d.ts +3 -0
  158. package/dist/components/features/time-picker/index.d.ts.map +1 -0
  159. package/dist/components/features/time-picker/time-picker.d.ts +22 -0
  160. package/dist/components/features/time-picker/time-picker.d.ts.map +1 -0
  161. package/dist/components/features/time-picker/types.d.ts +31 -0
  162. package/dist/components/features/time-picker/types.d.ts.map +1 -0
  163. package/dist/components/features/transfer/components/index.d.ts +9 -0
  164. package/dist/components/features/transfer/components/index.d.ts.map +1 -0
  165. package/dist/components/features/transfer/components/transfer-group.d.ts +7 -0
  166. package/dist/components/features/transfer/components/transfer-group.d.ts.map +1 -0
  167. package/dist/components/features/transfer/components/transfer-item.d.ts +10 -0
  168. package/dist/components/features/transfer/components/transfer-item.d.ts.map +1 -0
  169. package/dist/components/features/transfer/components/transfer-panel.d.ts +18 -0
  170. package/dist/components/features/transfer/components/transfer-panel.d.ts.map +1 -0
  171. package/dist/components/features/transfer/components/transfer-search.d.ts +9 -0
  172. package/dist/components/features/transfer/components/transfer-search.d.ts.map +1 -0
  173. package/dist/components/features/transfer/hooks/use-transfer-dnd.d.ts +26 -0
  174. package/dist/components/features/transfer/hooks/use-transfer-dnd.d.ts.map +1 -0
  175. package/dist/components/features/transfer/hooks/use-transfer-state.d.ts +20 -0
  176. package/dist/components/features/transfer/hooks/use-transfer-state.d.ts.map +1 -0
  177. package/dist/components/features/transfer/index.d.ts +3 -0
  178. package/dist/components/features/transfer/index.d.ts.map +1 -0
  179. package/dist/components/features/transfer/transfer.d.ts +6 -0
  180. package/dist/components/features/transfer/transfer.d.ts.map +1 -0
  181. package/dist/components/features/transfer/types.d.ts +69 -0
  182. package/dist/components/features/transfer/types.d.ts.map +1 -0
  183. package/dist/components/toast.d.ts +2 -0
  184. package/dist/components/toast.d.ts.map +1 -0
  185. package/dist/data-table/index.mjs +21 -51
  186. package/dist/date-picker/index.mjs +3 -10
  187. package/dist/date-time-picker/index.mjs +2 -0
  188. package/dist/date-time-picker-BomrW07W.mjs +178 -0
  189. package/dist/dialog/index.mjs +2 -5
  190. package/dist/{dialog-B0B3Kbfk.mjs → dialog-Bm2H9lrx.mjs} +4 -6
  191. package/dist/{dialog-DdrHeboM.mjs → dialog-DASRaFxD.mjs} +2 -4
  192. package/dist/dropdown/index.mjs +2 -3
  193. package/dist/{dropdown-Cdx7rOKv.mjs → dropdown-DZiAt-jS.mjs} +3 -5
  194. package/dist/{dropdown-menu-CdShrDz_.mjs → dropdown-menu-lALvDnab.mjs} +5 -7
  195. package/dist/dropzone/index.mjs +2 -5
  196. package/dist/{dropzone-B6kSN3DY.mjs → dropzone-ogtpQ4fy.mjs} +5 -8
  197. package/dist/empty-content/index.mjs +2 -3
  198. package/dist/{empty-content-B1lwLr40.mjs → empty-content-C63GPJ5d.mjs} +3 -9
  199. package/dist/form/adapters/conform/index.mjs +327 -0
  200. package/dist/form/adapters/rhf/index.mjs +267 -0
  201. package/dist/form/index.mjs +3 -146
  202. package/dist/form/stepper/index.mjs +541 -0
  203. package/dist/form-D8OnRHdd.mjs +1653 -0
  204. package/dist/form-context-Ccxm-wqL.mjs +17 -0
  205. package/dist/get-field-constraints-BicgDkfH.mjs +51 -0
  206. package/dist/grid/index.mjs +2 -3
  207. package/dist/hooks/index.mjs +3 -4
  208. package/dist/{use-debounce-MnfjH51L.mjs → hooks-D8r2M2U6.mjs} +1 -3
  209. package/dist/hover-card/index.mjs +2 -4
  210. package/dist/{hover-card-CEIauuie.mjs → hover-card-DDWWD5Hx.mjs} +2 -4
  211. package/dist/{icon-wrapper-BBK4z4tj.mjs → icon-wrapper-DuLp3RM1.mjs} +1 -3
  212. package/dist/icons/index.mjs +4 -5
  213. package/dist/index.mjs +66 -71
  214. package/dist/input/index.mjs +2 -5
  215. package/dist/{input-DEMoi_8F.mjs → input-DOmNpcQJ.mjs} +2 -4
  216. package/dist/{input-CYFN0Ap2.mjs → input-FKGqZypx.mjs} +3 -5
  217. package/dist/input-group/index.mjs +2 -7
  218. package/dist/{input-group-DJgYpOlq.mjs → input-group-DDtz-RT7.mjs} +5 -7
  219. package/dist/input-number/index.mjs +2 -6
  220. package/dist/{input-number-Cuy9CCg_.mjs → input-number-a7uydAsw.mjs} +4 -6
  221. package/dist/input-with-addons/index.mjs +28 -3
  222. package/dist/label/index.mjs +2 -4
  223. package/dist/{label-mOg07fuQ.mjs → label-cnAhY-ej.mjs} +3 -6
  224. package/dist/loader-overlay/index.mjs +2 -3
  225. package/dist/{loader-overlay-8IWX_1Ga.mjs → loader-overlay-BTFdkp7W.mjs} +3 -5
  226. package/dist/map/index.mjs +2 -14
  227. package/dist/{map-CaI1EshG.mjs → map-CWIQ-eql.mjs} +10 -14
  228. package/dist/{map-leaflet-imports-J7w1V7mh.mjs → map-leaflet-imports-CRSKA79m.mjs} +1 -2
  229. package/dist/more-actions/index.mjs +2 -5
  230. package/dist/{more-actions-BO5ikUxY.mjs → more-actions-ILnEZq_E.mjs} +5 -7
  231. package/dist/nprogress/index.mjs +1 -3
  232. package/dist/page-title/index.mjs +2 -3
  233. package/dist/{page-title-DWteBy1E.mjs → page-title-ChsnpBiH.mjs} +2 -4
  234. package/dist/popover/index.mjs +2 -4
  235. package/dist/{popover-ugw5MpuT.mjs → popover-FJAcbYoH.mjs} +2 -4
  236. package/dist/radio-group/index.mjs +2 -4
  237. package/dist/{radio-group-_gMymwnb.mjs → radio-group-CiITR0LO.mjs} +3 -6
  238. package/dist/select/index.mjs +2 -4
  239. package/dist/{select-BZOKWjlH.mjs → select-CiLR_DiQ.mjs} +3 -6
  240. package/dist/separator/index.mjs +2 -4
  241. package/dist/{separator-BzyALya2.mjs → separator-DXVTncCK.mjs} +2 -4
  242. package/dist/sheet/index.mjs +3 -5
  243. package/dist/{sheet-BX6lae56.mjs → sheet-BzXksqYY.mjs} +4 -6
  244. package/dist/{sheet-DAcFjaGw.mjs → sheet-Di3b-oPu.mjs} +2 -4
  245. package/dist/sidebar/index.mjs +2 -10
  246. package/dist/{sidebar-B3EV33mG.mjs → sidebar-BnhnjvfO.mjs} +10 -14
  247. package/dist/skeleton/index.mjs +2 -5
  248. package/dist/{skeleton-2vQ0vFQk.mjs → skeleton-BKl4mfJt.mjs} +2 -4
  249. package/dist/{skeleton-BgOwIgE0.mjs → skeleton-D1MUhAVo.mjs} +3 -5
  250. package/dist/spinner/index.mjs +2 -4
  251. package/dist/{spinner-osyXAlhr.mjs → spinner-OyOf9-Yu.mjs} +2 -4
  252. package/dist/{spinner.icon-C0MbtgqX.mjs → spinner.icon-C-vjSM6o.mjs} +2 -4
  253. package/dist/stepper/index.mjs +2 -5
  254. package/dist/{stepper-BMsn7I78.mjs → stepper-DvIOp0hh.mjs} +3 -5
  255. package/dist/switch/index.mjs +2 -4
  256. package/dist/{switch-C60FpEal.mjs → switch-DQJQhPIQ.mjs} +3 -6
  257. package/dist/table/index.mjs +2 -4
  258. package/dist/{table-Cl3UzIhI.mjs → table-Cdsh-39-.mjs} +2 -4
  259. package/dist/tabs/index.mjs +50 -3
  260. package/dist/tag-input/index.mjs +2 -5
  261. package/dist/{tag-input-DR2gukhL.mjs → tag-input-T9cUX9-G.mjs} +5 -7
  262. package/dist/task-queue/index.mjs +2 -7
  263. package/dist/{task-queue-dropdown-C9KHKbGh.mjs → task-queue-dropdown-Wcbj-f0V.mjs} +10 -30
  264. package/dist/textarea/index.mjs +2 -5
  265. package/dist/{textarea-CVo38n3S.mjs → textarea-94vq_G_S.mjs} +2 -4
  266. package/dist/{textarea-CZF5n57i.mjs → textarea-BwD-MmTV.mjs} +3 -5
  267. package/dist/theme/index.mjs +2 -3
  268. package/dist/{theme.provider-TUHlMsjM.mjs → themes-DG1md8FI.mjs} +1 -6
  269. package/dist/time-picker/index.mjs +2 -0
  270. package/dist/time-picker-BoF7pZZ2.mjs +43 -0
  271. package/dist/{to-api-format-naIpF-NI.mjs → to-api-format-Bh3c01gr.mjs} +9 -18
  272. package/dist/toast/index.mjs +3 -3
  273. package/dist/{use-toast-By9HuFwP.mjs → toast-BWnN5fax.mjs} +5 -42
  274. package/dist/toast-DpxlFNNx.mjs +37 -0
  275. package/dist/tooltip/index.mjs +2 -4
  276. package/dist/{tooltip-CuX2jQA9.mjs → tooltip-Cruvl5F6.mjs} +3 -6
  277. package/dist/transfer/index.mjs +2 -0
  278. package/dist/transfer-B2n8pgEQ.mjs +260 -0
  279. package/dist/types-BZNk3q65.mjs +357 -0
  280. package/dist/typography/index.mjs +2 -3
  281. package/dist/{typography-Iap9fU5P.mjs → typography-ClB8k55E.mjs} +2 -4
  282. package/dist/{use-copy-to-clipboard-n29wJwvW.mjs → use-copy-to-clipboard-uNeeVHC4.mjs} +2 -4
  283. package/dist/utils/index.mjs +2 -3
  284. package/dist/{utils-DJboNGQM.mjs → utils-C8KwMfT_.mjs} +1 -3
  285. package/dist/visually-hidden/index.mjs +2 -3
  286. package/dist/{visuallyhidden-BJsQCmg-.mjs → visuallyhidden-BLUsJpYH.mjs} +1 -3
  287. package/package.json +85 -3
  288. package/dist/input-with-addons-B8rzNhpq.mjs +0 -30
  289. package/dist/tabs-DJU7JA3h.mjs +0 -52
  290. package/dist/use-stepper-DigoyHhX.mjs +0 -2017
package/README.md CHANGED
@@ -88,7 +88,7 @@ Some components with shared heavy dependencies are grouped under a single subpat
88
88
  | `@datum-cloud/datum-ui/map` | `Map`, `PlaceAutocomplete`, + map controls | `leaflet`, `react-leaflet`, + leaflet plugins |
89
89
  | `@datum-cloud/datum-ui/dropzone` | `Dropzone`, `FileInputButton` | `react-dropzone` |
90
90
  | `@datum-cloud/datum-ui/chart` | `ChartContainer`, `ChartTooltip`, etc. | `recharts` |
91
- | `@datum-cloud/datum-ui/form` | `Form`, `FormField`, `FormInput`, etc. | `@conform-to/react`, `@conform-to/zod`, `zod` |
91
+ | `@datum-cloud/datum-ui/form` | `Form`, `FormField`, `FormInput`, etc. | See [Form Adapters](#form-adapters) below |
92
92
 
93
93
  ## Components
94
94
 
@@ -136,30 +136,34 @@ Thin wrappers around shadcn/Radix primitives with Datum styling. **Radix UI depe
136
136
 
137
137
  Complex, fully-customized components with significant business logic.
138
138
 
139
- | Component | Additional Dependencies | Description |
140
- | -------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | ------------------------------------------ |
141
- | `Autocomplete` | — | Search autocomplete input |
142
- | `AvatarStack` | — | Stacked avatar display |
143
- | `CalendarDatePicker` | `react-day-picker`, `date-fns` | Date/range picker with presets |
144
- | `DataTable`, `DataTableColumnHeader`, `DataTablePagination`, `DataTableToolbar`, `DataTableViewOptions` | `@tanstack/react-table` | Advanced data table with sorting/filtering |
145
- | `Dropdown`, `DropdownHeader`, `DropdownItem`, `DropdownSection` | — | Dropdown menu |
146
- | `Dropzone` | `react-dropzone` | File drag-and-drop upload area |
147
- | `EmptyContent` | | Empty state placeholder |
148
- | `FileInputButton` | — | File upload button |
149
- | `Form`, `FormField`, `FormInput`, `FormTextarea`, `FormSelect`, `FormCheckbox`, `FormSwitch`, `FormRadioGroup`, `FormFieldArray` | `@conform-to/react`, `@conform-to/zod`, `zod` | Form system with validation |
150
- | `Grid` | `@tanstack/react-virtual` | Virtualized data grid |
151
- | `InputNumber` | `react-number-format` | Numeric input with formatting |
152
- | `InputWithAddons` | | Input with prefix/suffix addons |
153
- | `LoaderOverlay` | | Full-screen loading overlay |
154
- | `MoreActions` | | Three-dot actions menu |
155
- | `NProgress` | `nprogress` | Page navigation progress bar |
156
- | `PageTitle` | — | Page header with breadcrumbs |
157
- | `Sidebar`, `SidebarHeader`, `SidebarContent`, `SidebarFooter`, `SidebarMenu`, `SidebarMenuItem`, `SidebarMenuButton` | — | App sidebar navigation |
158
- | `Stepper` | `@stepperize/react` | Multi-step wizard |
159
- | `TagInput` | — | Tag/chip input |
160
- | `TaskQueue`, `TaskQueueProvider`, `TaskQueueDropdown`, `TaskPanelHeader`, `TaskSummaryDialog` | — | Background task queue with progress UI |
161
- | `TimeRangePicker` | `date-fns`, `date-fns-tz` | Time range selector with timezone support |
162
- | `Toast`, `Toaster`, `useToast` | `sonner` | Toast notifications |
139
+ | Component | Additional Dependencies | Description |
140
+ | -------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- | ------------------------------------------ |
141
+ | `Autocomplete` | — | Search autocomplete input |
142
+ | `AvatarStack` | — | Stacked avatar display |
143
+ | `CalendarDatePicker` | `react-day-picker`, `date-fns` | Date/range picker with presets |
144
+ | `Combobox` | | Searchable single-select dropdown |
145
+ | `CodeEditor`, `CodeEditorTabs` | `@monaco-editor/react`, `monaco-editor` | Monaco-based code editor with VS Code UX |
146
+ | `DataTable`, `DataTableColumnHeader`, `DataTablePagination`, `DataTableToolbar`, `DataTableViewOptions` | `@tanstack/react-table` | Advanced data table with sorting/filtering |
147
+ | `DateTimePicker`, `TimePicker` | `date-fns`, `date-fns-tz` | Date/time picker with timezone support |
148
+ | `Dropdown`, `DropdownHeader`, `DropdownItem`, `DropdownSection` | — | Dropdown menu |
149
+ | `Dropzone` | `react-dropzone` | File drag-and-drop upload area |
150
+ | `EmptyContent` | | Empty state placeholder |
151
+ | `FileInputButton` | | File upload button |
152
+ | `Form`, `FormField`, `FormInput`, `FormTextarea`, `FormSelect`, `FormCheckbox`, `FormSwitch`, `FormRadioGroup`, `FormFieldArray` | See [Form Adapters](#form-adapters) below | Form system with pluggable adapter support |
153
+ | `Grid` | `@tanstack/react-virtual` | Virtualized data grid |
154
+ | `InputNumber` | `react-number-format` | Numeric input with formatting |
155
+ | `InputWithAddons` | | Input with prefix/suffix addons |
156
+ | `LoaderOverlay` | — | Full-screen loading overlay |
157
+ | `MoreActions` | — | Three-dot actions menu |
158
+ | `NProgress` | `nprogress` | Page navigation progress bar |
159
+ | `PageTitle` | — | Page header with breadcrumbs |
160
+ | `Sidebar`, `SidebarHeader`, `SidebarContent`, `SidebarFooter`, `SidebarMenu`, `SidebarMenuItem`, `SidebarMenuButton` | — | App sidebar navigation |
161
+ | `Stepper` | `@stepperize/react` | Multi-step wizard |
162
+ | `TagInput` | | Tag/chip input |
163
+ | `TaskQueue`, `TaskQueueProvider`, `TaskQueueDropdown`, `TaskPanelHeader`, `TaskSummaryDialog` | — | Background task queue with progress UI |
164
+ | `TimeRangePicker` | `date-fns`, `date-fns-tz` | Time range selector with timezone support |
165
+ | `Transfer` | — | Dual-panel item selector with search |
166
+ | `Toast`, `Toaster`, `useToast` | `sonner` | Toast notifications |
163
167
 
164
168
  ## Usage Examples
165
169
 
@@ -211,26 +215,45 @@ import { Title, Text, Paragraph, Code } from '@datum-cloud/datum-ui/typography'
211
215
 
212
216
  ### Form with Validation
213
217
 
218
+ The form system uses a pluggable adapter pattern. Wrap your app with an adapter, then use `Form.*` components as usual:
219
+
214
220
  ```tsx
215
- import { Form, FormField, FormInput, FormSelect } from '@datum-cloud/datum-ui/form'
221
+ import { Form } from '@datum-cloud/datum-ui/form'
222
+ import { ConformAdapter } from '@datum-cloud/datum-ui/form/adapters/conform'
223
+ // or: import { RHFAdapter } from '@datum-cloud/datum-ui/form/adapters/rhf'
216
224
  import { z } from 'zod'
217
225
 
218
226
  const schema = z.object({
219
- name: z.string().min(1),
227
+ name: z.string().min(1, 'Name is required'),
220
228
  role: z.enum(['admin', 'user']),
221
229
  })
222
230
 
223
- <Form schema={schema} onSubmit={handleSubmit}>
224
- <FormField name="name">
225
- <FormInput label="Name" />
226
- </FormField>
227
- <FormField name="role">
228
- <FormSelect label="Role" options={[
229
- { label: 'Admin', value: 'admin' },
230
- { label: 'User', value: 'user' },
231
- ]} />
232
- </FormField>
233
- </Form>
231
+ // Wrap your app once with an adapter
232
+ function App() {
233
+ return (
234
+ <ConformAdapter>
235
+ <MyForm />
236
+ </ConformAdapter>
237
+ )
238
+ }
239
+
240
+ // Form code is identical regardless of adapter
241
+ function MyForm() {
242
+ return (
243
+ <Form.Root schema={schema} onSubmit={handleSubmit}>
244
+ <Form.Field name="name" label="Name" required>
245
+ <Form.Input />
246
+ </Form.Field>
247
+ <Form.Field name="role" label="Role" required>
248
+ <Form.Select placeholder="Select a role">
249
+ <Form.SelectItem value="admin">Admin</Form.SelectItem>
250
+ <Form.SelectItem value="user">User</Form.SelectItem>
251
+ </Form.Select>
252
+ </Form.Field>
253
+ <Form.Submit>Save</Form.Submit>
254
+ </Form.Root>
255
+ )
256
+ }
234
257
  ```
235
258
 
236
259
  ### Map
@@ -363,15 +386,21 @@ Many components require additional packages. Install only what you use:
363
386
  > Replace `npm install` with `yarn add`, `pnpm add`, or `bun add` for your package manager.
364
387
 
365
388
  ```bash
366
- # Forms (Form, FormField, FormInput, etc.)
389
+ # Forms Conform adapter
367
390
  npm install @conform-to/react @conform-to/zod zod
368
391
 
392
+ # Forms — React Hook Form adapter (alternative)
393
+ npm install react-hook-form @hookform/resolvers zod
394
+
369
395
  # Maps (Map, MapMarker, MapPopup, etc.)
370
396
  npm install leaflet react-leaflet leaflet-draw leaflet.fullscreen leaflet.markercluster react-leaflet-markercluster
371
397
 
372
398
  # Charts (ChartContainer, ChartTooltip, etc.)
373
399
  npm install recharts
374
400
 
401
+ # Code editor (CodeEditor, CodeEditorTabs)
402
+ npm install @monaco-editor/react monaco-editor
403
+
375
404
  # Date pickers (Calendar, CalendarDatePicker, TimeRangePicker)
376
405
  npm install react-day-picker date-fns date-fns-tz
377
406
 
@@ -403,6 +432,19 @@ npm install nuqs
403
432
  npm install motion
404
433
  ```
405
434
 
435
+ ## Form Adapters
436
+
437
+ The form system supports pluggable adapters. Choose one and wrap your app:
438
+
439
+ | Adapter | Import Path | Dependencies |
440
+ | ------------------- | --------------------------------------------- | -------------------------------------------------------------------- |
441
+ | **Conform.js** | `@datum-cloud/datum-ui/form/adapters/conform` | `@conform-to/react`, `@conform-to/zod`, `zod` (>=4) |
442
+ | **React Hook Form** | `@datum-cloud/datum-ui/form/adapters/rhf` | `react-hook-form` (>=7.55), `@hookform/resolvers` (>=5), `zod` (>=4) |
443
+
444
+ The `Form.*` component API is identical with either adapter. Switch adapters by changing only the root provider -- no form code changes needed.
445
+
446
+ See the [Form README](./src/components/features/form/README.md) for detailed documentation.
447
+
406
448
  ## Tech Stack
407
449
 
408
450
  - **React 19** with server component support
@@ -0,0 +1,25 @@
1
+ import * as React$1 from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/components/features/form/adapter-context.tsx
4
+ const AdapterContext = React$1.createContext(null);
5
+ /**
6
+ * Read the current form adapter from context.
7
+ * Throws with a helpful error if no adapter is found.
8
+ */
9
+ function useAdapter() {
10
+ const adapter = React$1.use(AdapterContext);
11
+ if (!adapter) throw new Error("No form adapter found. Wrap your application with an adapter provider:\n\n import { ConformAdapter } from '@datum-cloud/datum-ui/form/adapters/conform'\n // or\n import { RHFAdapter } from '@datum-cloud/datum-ui/form/adapters/rhf'\n\n <ConformAdapter>\n <App />\n </ConformAdapter>");
12
+ return adapter;
13
+ }
14
+ /**
15
+ * Internal provider used by adapter packages (ConformAdapter, RHFAdapter).
16
+ * Consumers don't use this directly.
17
+ */
18
+ function FormAdapterProvider({ adapter, children }) {
19
+ return /* @__PURE__ */ jsx(AdapterContext, {
20
+ value: adapter,
21
+ children
22
+ });
23
+ }
24
+ //#endregion
25
+ export { useAdapter as n, FormAdapterProvider as t };
@@ -1,3 +1,2 @@
1
- import { n as AlertDescription, r as AlertTitle, t as Alert } from "../alert-BC2Mccfo.mjs";
2
-
3
- export { Alert, AlertDescription, AlertTitle };
1
+ import { n as AlertDescription, r as AlertTitle, t as Alert } from "../alert-BDj6od5I.mjs";
2
+ export { Alert, AlertDescription, AlertTitle };
@@ -1,9 +1,8 @@
1
- import { t as cn } from "./cn-DWCc1QRE.mjs";
1
+ import { t as cn } from "./cn-D2KYQ917.mjs";
2
2
  import { cva } from "class-variance-authority";
3
3
  import { CircleXIcon } from "lucide-react";
4
4
  import * as React$1 from "react";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
-
7
6
  //#region src/components/base/alert/alert.tsx
8
7
  /**
9
8
  * Datum Alert Component
@@ -90,6 +89,5 @@ function AlertDescription({ className, ...props }) {
90
89
  ...props
91
90
  });
92
91
  }
93
-
94
92
  //#endregion
95
- export { AlertDescription as n, AlertTitle as r, Alert as t };
93
+ export { AlertDescription as n, AlertTitle as r, Alert as t };
@@ -1,12 +1,4 @@
1
- import "../utils-DJboNGQM.mjs";
2
- import "../separator-BzyALya2.mjs";
3
- import "../button-D6AORsOz.mjs";
4
- import "../collapsible-Dw71o2um.mjs";
5
- import "../input-DEMoi_8F.mjs";
6
- import "../sheet-DAcFjaGw.mjs";
7
- import { C as SidebarTrigger, S as SidebarSeparator, _ as SidebarMenuSub, a as SidebarGroupAction, b as SidebarProvider, c as SidebarHeader, d as SidebarMenu, f as SidebarMenuAction, g as SidebarMenuSkeleton, h as SidebarMenuItem, i as SidebarGroup, l as SidebarInput, m as SidebarMenuButton, n as SidebarContent, o as SidebarGroupContent, p as SidebarMenuBadge, r as SidebarFooter, s as SidebarGroupLabel, t as Sidebar, u as SidebarInset, v as SidebarMenuSubButton, w as useSidebar, x as SidebarRail, y as SidebarMenuSubItem } from "../sidebar-B3EV33mG.mjs";
8
- import "../skeleton-2vQ0vFQk.mjs";
9
- import "../tooltip-CuX2jQA9.mjs";
10
- import { n as NavMenu, t as AppNavigation } from "../app-navigation-DsCKgfPe.mjs";
11
-
12
- export { AppNavigation, NavMenu, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar };
1
+ import { C as SidebarTrigger, S as SidebarSeparator, _ as SidebarMenuSub, a as SidebarGroupAction, b as SidebarProvider, c as SidebarHeader, d as SidebarMenu, f as SidebarMenuAction, g as SidebarMenuSkeleton, h as SidebarMenuItem, i as SidebarGroup, l as SidebarInput, m as SidebarMenuButton, n as SidebarContent, o as SidebarGroupContent, p as SidebarMenuBadge, r as SidebarFooter, s as SidebarGroupLabel, t as Sidebar, u as SidebarInset, v as SidebarMenuSubButton, w as useSidebar, x as SidebarRail, y as SidebarMenuSubItem } from "../sidebar-BnhnjvfO.mjs";
2
+ import "../sidebar/index.mjs";
3
+ import { n as NavMenu, t as AppNavigation } from "../app-navigation-84ro28PU.mjs";
4
+ export { AppNavigation, NavMenu, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar };
@@ -1,12 +1,11 @@
1
- import { t as cn } from "./cn-DWCc1QRE.mjs";
2
- import { t as Icon } from "./icon-wrapper-BBK4z4tj.mjs";
3
- import { n as CollapsibleContent, r as CollapsibleTrigger, t as Collapsible } from "./collapsible-Dw71o2um.mjs";
4
- import { C as SidebarTrigger, S as SidebarSeparator, _ as SidebarMenuSub, c as SidebarHeader, d as SidebarMenu, h as SidebarMenuItem, i as SidebarGroup, m as SidebarMenuButton, n as SidebarContent, o as SidebarGroupContent, r as SidebarFooter, s as SidebarGroupLabel, t as Sidebar, w as useSidebar } from "./sidebar-B3EV33mG.mjs";
1
+ import { t as cn } from "./cn-D2KYQ917.mjs";
2
+ import { t as Icon } from "./icon-wrapper-DuLp3RM1.mjs";
3
+ import { n as CollapsibleContent, r as CollapsibleTrigger, t as Collapsible } from "./collapsible-CUphkSBt.mjs";
4
+ import { C as SidebarTrigger, S as SidebarSeparator, _ as SidebarMenuSub, c as SidebarHeader, d as SidebarMenu, h as SidebarMenuItem, i as SidebarGroup, m as SidebarMenuButton, n as SidebarContent, o as SidebarGroupContent, r as SidebarFooter, s as SidebarGroupLabel, t as Sidebar, w as useSidebar } from "./sidebar-BnhnjvfO.mjs";
5
5
  import { ChevronRight, ExternalLinkIcon } from "lucide-react";
6
6
  import { Fragment, useCallback, useEffect, useRef, useState } from "react";
7
7
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
8
8
  import { motion } from "motion/react";
9
-
10
9
  //#region src/components/features/app-navigation/nav-menu.tsx
11
10
  const NAV_STYLES = {
12
11
  menuButton: "rounded-xl h-8 font-normal text-xs transition-all px-2 py-1 data-[active=true]:bg-sidebar data-[active=true]:text-foreground data-[active=true]:text-sidebar-primary data-[active=true]:[&>svg]:text-primary hover:bg-sidebar hover:text-sidebar-primary hover:[&>svg]:text-sidebar-primary hover:bg-sidebar-accent data-[active=true]:bg-sidebar-accent hover:font-semibold data-[active=true]:hover:[&>svg]:text-sidebar-primary transition-colors duration-300 gap-2.5 text-foreground [&>svg]:text-icon-primary",
@@ -378,7 +377,6 @@ function NavMenu({ ref, className, items, currentPath, linkComponent: LinkComp =
378
377
  });
379
378
  }
380
379
  NavMenu.displayName = "NavMenu";
381
-
382
380
  //#endregion
383
381
  //#region src/components/features/app-navigation/app-navigation.tsx
384
382
  function AppNavigation({ navItems, title, closeOnNavigation, defaultOpen, currentPath, linkComponent, ...props }) {
@@ -411,6 +409,5 @@ function AppNavigation({ navItems, title, closeOnNavigation, defaultOpen, curren
411
409
  })
412
410
  });
413
411
  }
414
-
415
412
  //#endregion
416
- export { NavMenu as n, AppNavigation as t };
413
+ export { NavMenu as n, AppNavigation as t };
@@ -1,7 +1,2 @@
1
- import "../utils-DJboNGQM.mjs";
2
- import "../dialog-DdrHeboM.mjs";
3
- import "../command-DVroicgn.mjs";
4
- import "../popover-ugw5MpuT.mjs";
5
- import { t as Autocomplete } from "../autocomplete-DRB_kSVx.mjs";
6
-
7
- export { Autocomplete };
1
+ import { t as Autocomplete } from "../autocomplete-CkYJueBL.mjs";
2
+ export { Autocomplete };
@@ -1,12 +1,11 @@
1
- import { t as cn } from "./cn-DWCc1QRE.mjs";
2
- import { a as CommandInput, i as CommandGroup, o as CommandItem, r as CommandEmpty, s as CommandList, t as Command } from "./command-DVroicgn.mjs";
3
- import { i as PopoverTrigger, r as PopoverContent, t as Popover } from "./popover-ugw5MpuT.mjs";
4
- import { t as LoaderOverlay } from "./loader-overlay-8IWX_1Ga.mjs";
1
+ import { t as cn } from "./cn-D2KYQ917.mjs";
2
+ import { a as CommandInput, i as CommandGroup, o as CommandItem, r as CommandEmpty, s as CommandList, t as Command } from "./command-DqHWukGK.mjs";
3
+ import { i as PopoverTrigger, r as PopoverContent, t as Popover } from "./popover-FJAcbYoH.mjs";
4
+ import { t as LoaderOverlay } from "./loader-overlay-BTFdkp7W.mjs";
5
5
  import { CheckIcon, ChevronDown } from "lucide-react";
6
6
  import * as React$1 from "react";
7
7
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
8
8
  import { useVirtualizer } from "@tanstack/react-virtual";
9
-
10
9
  //#region src/components/features/autocomplete/autocomplete.tsx
11
10
  function isGroupedOptions(options) {
12
11
  return options.length > 0 && "options" in options[0];
@@ -160,7 +159,7 @@ function VirtualizedOptions({ options, selectedValue, onSelect, renderOption, it
160
159
  * />
161
160
  * ```
162
161
  */
163
- function Autocomplete({ options, value, onValueChange, onSearchChange, searchPlaceholder = "Search...", disableSearch = false, renderOption, renderValue, placeholder = "Select...", emptyContent = "No results found", footer, creatable = false, creatableLabel, virtualize = false, itemSize = 36, loading = false, disabled = false, name, id, className, triggerClassName, contentClassName, listClassName }) {
162
+ function Autocomplete({ options, value, onValueChange, onSearchChange, searchPlaceholder = "Search...", disableSearch = false, renderOption, renderValue, placeholder = "Select...", emptyContent = "No results found", footer, creatable = false, creatableLabel, virtualize = false, itemSize = 36, loading = false, modal = false, disabled = false, name, id, className, triggerClassName, contentClassName, listClassName }) {
164
163
  const [open, setOpen] = React$1.useState(false);
165
164
  const [search, setSearch] = React$1.useState("");
166
165
  const flatOptions = React$1.useMemo(() => flattenOptions(options), [options]);
@@ -213,7 +212,7 @@ function Autocomplete({ options, value, onValueChange, onSearchChange, searchPla
213
212
  children: [/* @__PURE__ */ jsxs(Popover, {
214
213
  open,
215
214
  onOpenChange: handleOpenChange,
216
- modal: true,
215
+ modal,
217
216
  children: [/* @__PURE__ */ jsx(PopoverTrigger, {
218
217
  asChild: true,
219
218
  children: /* @__PURE__ */ jsx(Trigger, {
@@ -290,6 +289,5 @@ function Autocomplete({ options, value, onValueChange, onSearchChange, searchPla
290
289
  });
291
290
  }
292
291
  Autocomplete.displayName = "Autocomplete";
293
-
294
292
  //#endregion
295
- export { Autocomplete as t };
293
+ export { Autocomplete as t };
@@ -0,0 +1,195 @@
1
+ import { t as cn } from "../cn-D2KYQ917.mjs";
2
+ import { t as Button } from "../button-BllvE9Lm.mjs";
3
+ import { i as CommandGroup, o as CommandItem, r as CommandEmpty, s as CommandList, t as Command } from "../command-DqHWukGK.mjs";
4
+ import { t as Input } from "../input-FKGqZypx.mjs";
5
+ import { i as PopoverTrigger, r as PopoverContent, t as Popover } from "../popover-FJAcbYoH.mjs";
6
+ import { AlertCircle, Check, Loader2, X } from "lucide-react";
7
+ import * as React$1 from "react";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ //#region src/components/features/autosearch/autosearch.types.ts
10
+ /**
11
+ * Default function to extract searchable text from an option.
12
+ * Combines label, description, and value for comprehensive searching.
13
+ */
14
+ function defaultAutosearchValue(option) {
15
+ return [
16
+ option.label,
17
+ option.description,
18
+ option.value
19
+ ].filter(Boolean).join(" ");
20
+ }
21
+ //#endregion
22
+ //#region src/components/features/autosearch/autosearch.tsx
23
+ /**
24
+ * Autosearch - Search-first input with dropdown results
25
+ *
26
+ * A text input that opens a popover with search results as you type.
27
+ * Different from Autocomplete which shows all options upfront.
28
+ *
29
+ * @example Basic usage
30
+ * ```tsx
31
+ * <Autosearch
32
+ * options={users}
33
+ * value={selectedUser}
34
+ * onValueChange={setSelectedUser}
35
+ * onSearch={handleSearch}
36
+ * placeholder="Search users..."
37
+ * />
38
+ * ```
39
+ *
40
+ * @example With loading state
41
+ * ```tsx
42
+ * <Autosearch
43
+ * options={searchResults}
44
+ * value={selected}
45
+ * onValueChange={setSelected}
46
+ * onSearch={debouncedSearch}
47
+ * loading={isSearching}
48
+ * placeholder="Type to search..."
49
+ * />
50
+ * ```
51
+ */
52
+ function Autosearch({ options = [], value, onValueChange, onSearch, searchDebounceMs = 300, getValue = defaultAutosearchValue, placeholder = "Search for an option", emptyMessage = "No results found.", emptyContent, loading = false, modal = false, disabled = false, name, id, className, inputClassName, contentClassName, selectedClassName }) {
53
+ const [searchQuery, setSearchQuery] = React$1.useState("");
54
+ const [open, setOpen] = React$1.useState(false);
55
+ const [persistedOption, setPersistedOption] = React$1.useState(null);
56
+ const [searchExecuted, setSearchExecuted] = React$1.useState(false);
57
+ const searchDebounceRef = React$1.useRef(null);
58
+ const handleSearchChange = (inputValue) => {
59
+ setSearchQuery(inputValue);
60
+ const normalized = inputValue.trim();
61
+ if (searchDebounceRef.current) {
62
+ clearTimeout(searchDebounceRef.current);
63
+ searchDebounceRef.current = null;
64
+ }
65
+ if (!normalized) {
66
+ onSearch?.("");
67
+ setOpen(false);
68
+ setSearchExecuted(false);
69
+ return;
70
+ }
71
+ setOpen(true);
72
+ searchDebounceRef.current = setTimeout(() => {
73
+ setSearchExecuted(true);
74
+ onSearch?.(normalized);
75
+ searchDebounceRef.current = null;
76
+ }, searchDebounceMs);
77
+ };
78
+ React$1.useEffect(() => {
79
+ return () => {
80
+ if (searchDebounceRef.current) {
81
+ clearTimeout(searchDebounceRef.current);
82
+ searchDebounceRef.current = null;
83
+ }
84
+ };
85
+ }, []);
86
+ const handleSelect = React$1.useCallback((option) => {
87
+ setPersistedOption(option);
88
+ onValueChange?.(option.value);
89
+ setSearchQuery("");
90
+ onSearch?.("");
91
+ setOpen(false);
92
+ setSearchExecuted(false);
93
+ }, [onValueChange, onSearch]);
94
+ const handleClear = React$1.useCallback(() => {
95
+ setPersistedOption(null);
96
+ setSearchQuery("");
97
+ onSearch?.("");
98
+ setOpen(false);
99
+ setSearchExecuted(false);
100
+ onValueChange?.("");
101
+ }, [onValueChange, onSearch]);
102
+ React$1.useEffect(() => {
103
+ const normalized = searchQuery.trim();
104
+ if (value || !normalized) return;
105
+ if (options.length === 1 && !options[0].disabled) handleSelect(options[0]);
106
+ }, [
107
+ searchQuery,
108
+ options,
109
+ value,
110
+ handleSelect
111
+ ]);
112
+ const normalizedQuery = searchQuery.trim();
113
+ const hasSearch = Boolean(normalizedQuery);
114
+ const showResults = hasSearch && !value && options.length > 1;
115
+ const selectedOption = options.find((opt) => opt.value === value) ?? persistedOption;
116
+ const selectedLabel = selectedOption?.label ?? "";
117
+ const selectedDescription = selectedOption?.description ?? "";
118
+ const showNoResults = hasSearch && !loading && options.length === 0 && searchExecuted;
119
+ return /* @__PURE__ */ jsxs("div", {
120
+ className: cn("relative", className),
121
+ children: [name && /* @__PURE__ */ jsx("input", {
122
+ type: "hidden",
123
+ name,
124
+ value: value ?? ""
125
+ }), value ? /* @__PURE__ */ jsxs("div", {
126
+ className: cn("bg-muted/10 border-border flex items-center justify-between gap-2 rounded-md border px-3 py-1 pr-1", selectedClassName),
127
+ children: [/* @__PURE__ */ jsxs("div", {
128
+ className: "flex flex-col",
129
+ children: [/* @__PURE__ */ jsx("span", {
130
+ className: "text-sm font-medium",
131
+ children: selectedLabel
132
+ }), selectedDescription && /* @__PURE__ */ jsx("span", {
133
+ className: "text-muted-foreground text-xs",
134
+ children: selectedDescription
135
+ })]
136
+ }), /* @__PURE__ */ jsx(Button, {
137
+ size: "small",
138
+ type: "tertiary",
139
+ theme: "borderless",
140
+ onClick: handleClear,
141
+ disabled,
142
+ children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
143
+ })]
144
+ }) : /* @__PURE__ */ jsxs(Popover, {
145
+ open: open && showResults,
146
+ onOpenChange: setOpen,
147
+ modal,
148
+ children: [/* @__PURE__ */ jsx(PopoverTrigger, {
149
+ asChild: true,
150
+ children: /* @__PURE__ */ jsxs("div", {
151
+ className: "relative",
152
+ children: [
153
+ /* @__PURE__ */ jsx(Input, {
154
+ id,
155
+ placeholder,
156
+ value: searchQuery,
157
+ onChange: (e) => handleSearchChange(e.target.value),
158
+ disabled,
159
+ autoComplete: "off",
160
+ className: cn("w-full pr-10", inputClassName)
161
+ }),
162
+ loading && /* @__PURE__ */ jsx(Loader2, { className: "text-muted-foreground pointer-events-none absolute top-1/2 right-3 h-4 w-4 -translate-y-1/2 animate-spin" }),
163
+ showNoResults && /* @__PURE__ */ jsx("div", {
164
+ className: "pointer-events-none absolute top-1/2 right-3 -translate-y-1/2",
165
+ children: /* @__PURE__ */ jsx(AlertCircle, { className: "text-destructive h-4 w-4" })
166
+ })
167
+ ]
168
+ })
169
+ }), /* @__PURE__ */ jsx(PopoverContent, {
170
+ className: cn("popover-content-width-full p-0", contentClassName),
171
+ side: "bottom",
172
+ align: "start",
173
+ onOpenAutoFocus: (event) => event.preventDefault(),
174
+ children: /* @__PURE__ */ jsx(Command, { children: /* @__PURE__ */ jsx(CommandList, { children: loading ? /* @__PURE__ */ jsx(CommandEmpty, { children: "Searching..." }) : options.length === 0 ? /* @__PURE__ */ jsx(CommandEmpty, { children: emptyContent ?? emptyMessage }) : /* @__PURE__ */ jsx(CommandGroup, { children: options.map((option) => /* @__PURE__ */ jsxs(CommandItem, {
175
+ value: getValue(option),
176
+ onSelect: () => handleSelect(option),
177
+ disabled: option.disabled,
178
+ children: [/* @__PURE__ */ jsxs("div", {
179
+ className: "flex flex-col",
180
+ children: [/* @__PURE__ */ jsx("span", {
181
+ className: "font-medium",
182
+ children: option.label
183
+ }), option.description && /* @__PURE__ */ jsx("span", {
184
+ className: "text-muted-foreground text-xs",
185
+ children: option.description
186
+ })]
187
+ }), /* @__PURE__ */ jsx(Check, { className: cn("ml-auto h-4 w-4", value === option.value ? "opacity-100" : "opacity-0") })]
188
+ }, option.value)) }) }) })
189
+ })]
190
+ })]
191
+ });
192
+ }
193
+ Autosearch.displayName = "Autosearch";
194
+ //#endregion
195
+ export { Autosearch, defaultAutosearchValue };
@@ -1,4 +1,2 @@
1
- import "../utils-DJboNGQM.mjs";
2
- import { n as AvatarFallback, r as AvatarImage, t as Avatar } from "../avatar-DyLq0xkt.mjs";
3
-
4
- export { Avatar, AvatarFallback, AvatarImage };
1
+ import { n as AvatarFallback, r as AvatarImage, t as Avatar } from "../avatar-BtKVcvO4.mjs";
2
+ export { Avatar, AvatarFallback, AvatarImage };
@@ -1,8 +1,7 @@
1
- import { t as cn } from "./utils-DJboNGQM.mjs";
1
+ import { t as cn } from "./utils-C8KwMfT_.mjs";
2
2
  import "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import * as AvatarPrimitive from "@radix-ui/react-avatar";
5
-
6
5
  //#region ../shadcn/ui/avatar.tsx
7
6
  const Avatar = ({ className, ...props }) => {
8
7
  return /* @__PURE__ */ jsx(AvatarPrimitive.Root, {
@@ -25,6 +24,5 @@ const AvatarFallback = ({ className, ...props }) => {
25
24
  ...props
26
25
  });
27
26
  };
28
-
29
27
  //#endregion
30
- export { AvatarFallback as n, AvatarImage as r, Avatar as t };
28
+ export { AvatarFallback as n, AvatarImage as r, Avatar as t };
@@ -1,6 +1,2 @@
1
- import "../utils-DJboNGQM.mjs";
2
- import "../avatar-DyLq0xkt.mjs";
3
- import "../tooltip-CuX2jQA9.mjs";
4
- import { n as avatarStackVariants, t as AvatarStack } from "../avatar-stack-BT0dBswq.mjs";
5
-
6
- export { AvatarStack, avatarStackVariants };
1
+ import { n as avatarStackVariants, t as AvatarStack } from "../avatar-stack-oVr8tsU7.mjs";
2
+ export { AvatarStack, avatarStackVariants };
@@ -1,10 +1,9 @@
1
- import { t as cn } from "./cn-DWCc1QRE.mjs";
2
- import { n as AvatarFallback, r as AvatarImage, t as Avatar } from "./avatar-DyLq0xkt.mjs";
3
- import { t as Tooltip } from "./tooltip-CuX2jQA9.mjs";
1
+ import { t as cn } from "./cn-D2KYQ917.mjs";
2
+ import { n as AvatarFallback, r as AvatarImage, t as Avatar } from "./avatar-BtKVcvO4.mjs";
3
+ import { t as Tooltip } from "./tooltip-Cruvl5F6.mjs";
4
4
  import { cva } from "class-variance-authority";
5
5
  import "react";
6
6
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
7
-
8
7
  //#region src/components/features/avatar-stack/avatar-stack.tsx
9
8
  const avatarStackVariants = cva("flex", {
10
9
  variants: {
@@ -50,6 +49,5 @@ function AvatarStack({ className, orientation, avatars, spacing, maxAvatarsAmoun
50
49
  }) : null]
51
50
  });
52
51
  }
53
-
54
52
  //#endregion
55
- export { avatarStackVariants as n, AvatarStack as t };
53
+ export { avatarStackVariants as n, AvatarStack as t };
@@ -1,3 +1,2 @@
1
- import { n as badgeVariants, t as Badge } from "../badge-BgFj4Nsc.mjs";
2
-
3
- export { Badge, badgeVariants };
1
+ import { n as badgeVariants, t as Badge } from "../badge-DJR33ftJ.mjs";
2
+ export { Badge, badgeVariants };
@@ -1,8 +1,7 @@
1
- import { t as cn } from "./cn-DWCc1QRE.mjs";
1
+ import { t as cn } from "./cn-D2KYQ917.mjs";
2
2
  import { cva } from "class-variance-authority";
3
3
  import "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
-
6
5
  //#region src/components/base/badge/badge.tsx
7
6
  /**
8
7
  * Datum Badge Component
@@ -180,6 +179,5 @@ function Badge({ className, type, theme, ...props }) {
180
179
  ...props
181
180
  });
182
181
  }
183
-
184
182
  //#endregion
185
- export { badgeVariants as n, Badge as t };
183
+ export { badgeVariants as n, Badge as t };
@@ -1,4 +1,2 @@
1
- import "../utils-DJboNGQM.mjs";
2
- import { a as BreadcrumbList, i as BreadcrumbLink, n as BreadcrumbEllipsis, o as BreadcrumbPage, r as BreadcrumbItem, s as BreadcrumbSeparator, t as Breadcrumb } from "../breadcrumb-CJNaYyk1.mjs";
3
-
4
- export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
1
+ import { a as BreadcrumbList, i as BreadcrumbLink, n as BreadcrumbEllipsis, o as BreadcrumbPage, r as BreadcrumbItem, s as BreadcrumbSeparator, t as Breadcrumb } from "../breadcrumb-B-9G347O.mjs";
2
+ export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };