@oneplatformdev/ui 0.0.1-beta.100

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 (443) hide show
  1. package/Accordion/Accordion.d.ts +9 -0
  2. package/Accordion/Accordion.mjs +49 -0
  3. package/Accordion/index.d.ts +1 -0
  4. package/Accordion/index.mjs +7 -0
  5. package/Accordion/package.json +7 -0
  6. package/Alert/Alert.d.ts +7 -0
  7. package/Alert/Alert.mjs +37 -0
  8. package/Alert/alertVariants.d.ts +4 -0
  9. package/Alert/alertVariants.mjs +19 -0
  10. package/Alert/index.d.ts +1 -0
  11. package/Alert/index.mjs +6 -0
  12. package/Alert/package.json +7 -0
  13. package/AlertDialog/AlertDialog.d.ts +65 -0
  14. package/AlertDialog/AlertDialog.mjs +97 -0
  15. package/AlertDialog/AlertDialog.types.d.ts +53 -0
  16. package/AlertDialog/AlertDialogRoot.d.ts +21 -0
  17. package/AlertDialog/AlertDialogRoot.mjs +114 -0
  18. package/AlertDialog/index.d.ts +3 -0
  19. package/AlertDialog/index.mjs +16 -0
  20. package/AlertDialog/package.json +7 -0
  21. package/AreaChart/AreaChart.d.ts +4 -0
  22. package/AreaChart/AreaChart.mjs +27 -0
  23. package/AreaChart/AreaChart.types.d.ts +15 -0
  24. package/AreaChart/index.d.ts +2 -0
  25. package/AreaChart/index.mjs +4 -0
  26. package/AreaChart/package.json +7 -0
  27. package/Aside/Aside.d.ts +4 -0
  28. package/Aside/Aside.mjs +23 -0
  29. package/Aside/Aside.types.d.ts +18 -0
  30. package/Aside/AsideSidebar.d.ts +3 -0
  31. package/Aside/AsideSidebar.mjs +37 -0
  32. package/Aside/index.d.ts +3 -0
  33. package/Aside/index.mjs +7 -0
  34. package/Aside/package.json +7 -0
  35. package/AspectRatio/AspectRatio.d.ts +2 -0
  36. package/AspectRatio/AspectRatio.mjs +5 -0
  37. package/AspectRatio/index.d.ts +1 -0
  38. package/AspectRatio/index.mjs +5 -0
  39. package/AspectRatio/package.json +7 -0
  40. package/Avatar/Avatar.d.ts +5 -0
  41. package/Avatar/Avatar.mjs +42 -0
  42. package/Avatar/index.d.ts +1 -0
  43. package/Avatar/index.mjs +6 -0
  44. package/Avatar/package.json +7 -0
  45. package/Badge/Badge.d.ts +5 -0
  46. package/Badge/Badge.mjs +10 -0
  47. package/Badge/Badge.types.d.ts +5 -0
  48. package/Badge/badgeVariants.d.ts +3 -0
  49. package/Badge/badgeVariants.mjs +20 -0
  50. package/Badge/index.d.ts +3 -0
  51. package/Badge/index.mjs +6 -0
  52. package/Badge/package.json +7 -0
  53. package/Breadcrumb/Breadcrumb.d.ts +19 -0
  54. package/Breadcrumb/Breadcrumb.mjs +90 -0
  55. package/Breadcrumb/index.d.ts +1 -0
  56. package/Breadcrumb/index.mjs +10 -0
  57. package/Breadcrumb/package.json +7 -0
  58. package/Button/Button.d.ts +4 -0
  59. package/Button/Button.mjs +32 -0
  60. package/Button/Button.types.d.ts +8 -0
  61. package/Button/buttonVariants.d.ts +4 -0
  62. package/Button/buttonVariants.mjs +29 -0
  63. package/Button/index.d.ts +3 -0
  64. package/Button/index.mjs +7 -0
  65. package/Button/package.json +7 -0
  66. package/ButtonIcon/ButtonIcon.d.ts +3 -0
  67. package/ButtonIcon/ButtonIcon.mjs +29 -0
  68. package/ButtonIcon/ButtonIcon.types.d.ts +7 -0
  69. package/ButtonIcon/buttonIconVariants.d.ts +7 -0
  70. package/ButtonIcon/buttonIconVariants.mjs +139 -0
  71. package/ButtonIcon/index.d.ts +3 -0
  72. package/ButtonIcon/index.mjs +7 -0
  73. package/ButtonIcon/package.json +7 -0
  74. package/Calendar/Calendar.d.ts +8 -0
  75. package/Calendar/Calendar.mjs +64 -0
  76. package/Calendar/index.d.ts +1 -0
  77. package/Calendar/index.mjs +4 -0
  78. package/Calendar/package.json +7 -0
  79. package/Card/Card.d.ts +8 -0
  80. package/Card/Card.mjs +61 -0
  81. package/Card/index.d.ts +1 -0
  82. package/Card/index.mjs +9 -0
  83. package/Card/package.json +7 -0
  84. package/Carousel/Carousel.d.ts +18 -0
  85. package/Carousel/Carousel.mjs +168 -0
  86. package/Carousel/index.d.ts +1 -0
  87. package/Carousel/index.mjs +8 -0
  88. package/Carousel/package.json +7 -0
  89. package/Chart/Chart.d.ts +62 -0
  90. package/Chart/Chart.mjs +210 -0
  91. package/Chart/index.d.ts +1 -0
  92. package/Chart/index.mjs +9 -0
  93. package/Chart/package.json +7 -0
  94. package/Checkbox/Checkbox.d.ts +5 -0
  95. package/Checkbox/Checkbox.mjs +54 -0
  96. package/Checkbox/Checkbox.types.d.ts +10 -0
  97. package/Checkbox/index.d.ts +2 -0
  98. package/Checkbox/index.mjs +5 -0
  99. package/Checkbox/package.json +7 -0
  100. package/Collapsible/Collapsible.d.ts +5 -0
  101. package/Collapsible/Collapsible.mjs +7 -0
  102. package/Collapsible/index.d.ts +1 -0
  103. package/Collapsible/index.mjs +6 -0
  104. package/Collapsible/package.json +7 -0
  105. package/Combobox/Combobox.d.ts +4 -0
  106. package/Combobox/Combobox.mjs +15 -0
  107. package/Combobox/Combobox.types.d.ts +38 -0
  108. package/Combobox/ComboboxOptionItem.d.ts +5 -0
  109. package/Combobox/ComboboxOptionItem.mjs +67 -0
  110. package/Combobox/ComboboxOptions.d.ts +4 -0
  111. package/Combobox/ComboboxOptions.mjs +12 -0
  112. package/Combobox/index.d.ts +2 -0
  113. package/Combobox/index.mjs +4 -0
  114. package/Combobox/package.json +7 -0
  115. package/Combobox-Dfbnw0oF.js +303 -0
  116. package/Command/Command.d.ts +80 -0
  117. package/Command/Command.mjs +116 -0
  118. package/Command/index.d.ts +1 -0
  119. package/Command/index.mjs +12 -0
  120. package/Command/package.json +7 -0
  121. package/DataTable/DataTable.d.ts +11 -0
  122. package/DataTable/DataTable.mjs +64 -0
  123. package/DataTable/DataTable.types.d.ts +11 -0
  124. package/DataTable/DataTableColumnFilter.d.ts +4 -0
  125. package/DataTable/DataTableColumnFilter.mjs +31 -0
  126. package/DataTable/index.d.ts +2 -0
  127. package/DataTable/index.mjs +4 -0
  128. package/DataTable/package.json +7 -0
  129. package/DataTable/useDataTable.d.ts +3 -0
  130. package/DataTable/useDataTable.mjs +30 -0
  131. package/DatePicker/DatePicker.d.ts +3 -0
  132. package/DatePicker/DatePicker.mjs +699 -0
  133. package/DatePicker/DatePicker.types.d.ts +5 -0
  134. package/DatePicker/index.d.ts +3 -0
  135. package/DatePicker/index.mjs +5 -0
  136. package/DatePicker/package.json +7 -0
  137. package/Dialog/Dialog.d.ts +21 -0
  138. package/Dialog/Dialog.mjs +117 -0
  139. package/Dialog/index.d.ts +1 -0
  140. package/Dialog/index.mjs +13 -0
  141. package/Dialog/package.json +7 -0
  142. package/Drawer/Drawer.d.ts +22 -0
  143. package/Drawer/Drawer.mjs +98 -0
  144. package/Drawer/index.d.ts +1 -0
  145. package/Drawer/index.mjs +13 -0
  146. package/Drawer/package.json +7 -0
  147. package/DropdownMenu/DropdownMenu.d.ts +27 -0
  148. package/DropdownMenu/DropdownMenu.mjs +148 -0
  149. package/DropdownMenu/index.d.ts +1 -0
  150. package/DropdownMenu/index.mjs +18 -0
  151. package/DropdownMenu/package.json +7 -0
  152. package/Dropzone/Dropzone.d.ts +22 -0
  153. package/Dropzone/Dropzone.mjs +152 -0
  154. package/Dropzone/Dropzone.types.d.ts +42 -0
  155. package/Dropzone/DropzoneFilePreview.d.ts +4 -0
  156. package/Dropzone/DropzoneFilePreview.mjs +9 -0
  157. package/Dropzone/DropzoneSinglePickPreview.d.ts +10 -0
  158. package/Dropzone/DropzoneSinglePickPreview.mjs +41 -0
  159. package/Dropzone/DropzoneUtils.d.ts +5 -0
  160. package/Dropzone/DropzoneUtils.mjs +24 -0
  161. package/Dropzone/index.d.ts +2 -0
  162. package/Dropzone/index.mjs +7 -0
  163. package/Dropzone/package.json +7 -0
  164. package/DropzoneFilePreview-Dhtv8F4u.js +67 -0
  165. package/Form/Form.d.ts +23 -0
  166. package/Form/Form.mjs +98 -0
  167. package/Form/FormRenderControl.d.ts +4 -0
  168. package/Form/FormRenderControl.mjs +21 -0
  169. package/Form/FormRenderControl.types.d.ts +16 -0
  170. package/Form/index.d.ts +3 -0
  171. package/Form/index.mjs +13 -0
  172. package/Form/package.json +7 -0
  173. package/FormCheckbox/FormCheckbox.d.ts +4 -0
  174. package/FormCheckbox/FormCheckbox.mjs +30 -0
  175. package/FormCheckbox/FormCheckbox.types.d.ts +7 -0
  176. package/FormCheckbox/index.d.ts +2 -0
  177. package/FormCheckbox/index.mjs +4 -0
  178. package/FormCheckbox/package.json +7 -0
  179. package/FormCombobox/FormCombobox.d.ts +4 -0
  180. package/FormCombobox/FormCombobox.mjs +26 -0
  181. package/FormCombobox/FormCombobox.types.d.ts +6 -0
  182. package/FormCombobox/index.d.ts +2 -0
  183. package/FormCombobox/index.mjs +4 -0
  184. package/FormCombobox/package.json +7 -0
  185. package/FormDatePicker/FormDatePicker.d.ts +4 -0
  186. package/FormDatePicker/FormDatePicker.mjs +29 -0
  187. package/FormDatePicker/FormDatePicker.types.d.ts +6 -0
  188. package/FormDatePicker/index.d.ts +3 -0
  189. package/FormDatePicker/index.mjs +5 -0
  190. package/FormDatePicker/package.json +7 -0
  191. package/FormDropzone/FormDropzone.d.ts +4 -0
  192. package/FormDropzone/FormDropzone.mjs +19 -0
  193. package/FormDropzone/FormDropzone.types.d.ts +6 -0
  194. package/FormDropzone/index.d.ts +2 -0
  195. package/FormDropzone/index.mjs +4 -0
  196. package/FormDropzone/package.json +7 -0
  197. package/FormInput/FormInput.d.ts +7 -0
  198. package/FormInput/FormInput.mjs +44 -0
  199. package/FormInput/FormInput.types.d.ts +6 -0
  200. package/FormInput/index.d.ts +2 -0
  201. package/FormInput/index.mjs +4 -0
  202. package/FormInput/package.json +7 -0
  203. package/FormRadio/FormRadio.d.ts +4 -0
  204. package/FormRadio/FormRadio.mjs +40 -0
  205. package/FormRadio/FormRadio.types.d.ts +6 -0
  206. package/FormRadio/index.d.ts +2 -0
  207. package/FormRadio/index.mjs +4 -0
  208. package/FormRadio/package.json +7 -0
  209. package/FormSelect/FormSelect.d.ts +4 -0
  210. package/FormSelect/FormSelect.mjs +40 -0
  211. package/FormSelect/FormSelect.types.d.ts +6 -0
  212. package/FormSelect/index.d.ts +2 -0
  213. package/FormSelect/index.mjs +4 -0
  214. package/FormSelect/package.json +7 -0
  215. package/FormTextarea/FormTextarea.d.ts +4 -0
  216. package/FormTextarea/FormTextarea.mjs +27 -0
  217. package/FormTextarea/FormTextarea.types.d.ts +6 -0
  218. package/FormTextarea/index.d.ts +2 -0
  219. package/FormTextarea/index.mjs +4 -0
  220. package/FormTextarea/package.json +7 -0
  221. package/Header/Header.d.ts +4 -0
  222. package/Header/Header.mjs +26 -0
  223. package/Header/Header.types.d.ts +3 -0
  224. package/Header/index.d.ts +2 -0
  225. package/Header/index.mjs +5 -0
  226. package/Header/package.json +7 -0
  227. package/HoverCard/HoverCard.d.ts +6 -0
  228. package/HoverCard/HoverCard.mjs +23 -0
  229. package/HoverCard/index.d.ts +1 -0
  230. package/HoverCard/index.mjs +6 -0
  231. package/HoverCard/package.json +7 -0
  232. package/Input/Input.d.ts +6 -0
  233. package/Input/Input.mjs +73 -0
  234. package/Input/Input.types.d.ts +17 -0
  235. package/Input/index.d.ts +3 -0
  236. package/Input/index.mjs +7 -0
  237. package/Input/inputVariants.d.ts +3 -0
  238. package/Input/inputVariants.mjs +24 -0
  239. package/Input/package.json +7 -0
  240. package/InputOTP/InputOTP.d.ts +34 -0
  241. package/InputOTP/InputOTP.mjs +48 -0
  242. package/InputOTP/index.d.ts +1 -0
  243. package/InputOTP/index.mjs +7 -0
  244. package/InputOTP/package.json +7 -0
  245. package/Label/Label.d.ts +5 -0
  246. package/Label/Label.mjs +17 -0
  247. package/Label/index.d.ts +2 -0
  248. package/Label/index.mjs +6 -0
  249. package/Label/labelVariants.d.ts +1 -0
  250. package/Label/labelVariants.mjs +10 -0
  251. package/Label/package.json +7 -0
  252. package/LazyLoader/LazyLoader.d.ts +20 -0
  253. package/LazyLoader/LazyLoader.mjs +8 -0
  254. package/LazyLoader/index.d.ts +1 -0
  255. package/LazyLoader/index.mjs +5 -0
  256. package/LazyLoader/package.json +7 -0
  257. package/LoadingMask/LoadingMask.d.ts +4 -0
  258. package/LoadingMask/LoadingMask.mjs +21 -0
  259. package/LoadingMask/LoadingMask.types.d.ts +5 -0
  260. package/LoadingMask/RenderLoadingMask.d.ts +3 -0
  261. package/LoadingMask/RenderLoadingMask.mjs +108 -0
  262. package/LoadingMask/index.d.ts +3 -0
  263. package/LoadingMask/index.mjs +6 -0
  264. package/LoadingMask/package.json +7 -0
  265. package/LoadingProgress/LoadingProgress.d.ts +4 -0
  266. package/LoadingProgress/LoadingProgress.mjs +37 -0
  267. package/LoadingProgress/LoadingProgress.types.d.ts +8 -0
  268. package/LoadingProgress/index.d.ts +3 -0
  269. package/LoadingProgress/index.mjs +6 -0
  270. package/LoadingProgress/loadingProgressVariants.d.ts +4 -0
  271. package/LoadingProgress/loadingProgressVariants.mjs +24 -0
  272. package/LoadingProgress/package.json +7 -0
  273. package/Menubar/Menubar.d.ts +28 -0
  274. package/Menubar/Menubar.mjs +175 -0
  275. package/Menubar/index.d.ts +1 -0
  276. package/Menubar/index.mjs +19 -0
  277. package/Menubar/package.json +7 -0
  278. package/NavigationMenu/NavigationMenu.d.ts +11 -0
  279. package/NavigationMenu/NavigationMenu.mjs +101 -0
  280. package/NavigationMenu/index.d.ts +2 -0
  281. package/NavigationMenu/index.mjs +13 -0
  282. package/NavigationMenu/navigationMenuVariants.d.ts +1 -0
  283. package/NavigationMenu/navigationMenuVariants.mjs +7 -0
  284. package/NavigationMenu/package.json +7 -0
  285. package/Pagination/Pagination.d.ts +28 -0
  286. package/Pagination/Pagination.mjs +106 -0
  287. package/Pagination/index.d.ts +1 -0
  288. package/Pagination/index.mjs +10 -0
  289. package/Pagination/package.json +7 -0
  290. package/Popover/Popover.d.ts +7 -0
  291. package/Popover/Popover.mjs +28 -0
  292. package/Popover/index.d.ts +1 -0
  293. package/Popover/index.mjs +7 -0
  294. package/Popover/package.json +7 -0
  295. package/Progress/Progress.d.ts +4 -0
  296. package/Progress/Progress.mjs +26 -0
  297. package/Progress/index.d.ts +1 -0
  298. package/Progress/index.mjs +4 -0
  299. package/Progress/package.json +7 -0
  300. package/README.md +33 -0
  301. package/Radio/Radio.d.ts +4 -0
  302. package/Radio/Radio.mjs +12 -0
  303. package/Radio/Radio.types.d.ts +11 -0
  304. package/Radio/index.d.ts +2 -0
  305. package/Radio/index.mjs +4 -0
  306. package/Radio/package.json +7 -0
  307. package/RadioGroup/RadioGroup.d.ts +11 -0
  308. package/RadioGroup/RadioGroup.mjs +49 -0
  309. package/RadioGroup/index.d.ts +1 -0
  310. package/RadioGroup/index.mjs +6 -0
  311. package/RadioGroup/package.json +7 -0
  312. package/Resizable/Resizable.d.ts +23 -0
  313. package/Resizable/Resizable.mjs +36 -0
  314. package/Resizable/index.d.ts +1 -0
  315. package/Resizable/index.mjs +6 -0
  316. package/Resizable/package.json +7 -0
  317. package/ScrollArea/ScrollArea.d.ts +5 -0
  318. package/ScrollArea/ScrollArea.mjs +51 -0
  319. package/ScrollArea/index.d.ts +1 -0
  320. package/ScrollArea/index.mjs +5 -0
  321. package/ScrollArea/package.json +7 -0
  322. package/Search/Search.d.ts +4 -0
  323. package/Search/Search.mjs +30 -0
  324. package/Search/Search.types.d.ts +6 -0
  325. package/Search/index.d.ts +3 -0
  326. package/Search/index.mjs +5 -0
  327. package/Search/package.json +7 -0
  328. package/Select/Select.d.ts +3 -0
  329. package/Select/Select.mjs +103 -0
  330. package/Select/Select.types.d.ts +37 -0
  331. package/Select/SelectRoot.d.ts +13 -0
  332. package/Select/SelectRoot.mjs +126 -0
  333. package/Select/index.d.ts +3 -0
  334. package/Select/index.mjs +15 -0
  335. package/Select/package.json +7 -0
  336. package/Separator/Separator.d.ts +4 -0
  337. package/Separator/Separator.mjs +24 -0
  338. package/Separator/index.d.ts +1 -0
  339. package/Separator/index.mjs +4 -0
  340. package/Separator/package.json +7 -0
  341. package/Sheet/Sheet.d.ts +28 -0
  342. package/Sheet/Sheet.mjs +110 -0
  343. package/Sheet/index.d.ts +1 -0
  344. package/Sheet/index.mjs +13 -0
  345. package/Sheet/package.json +7 -0
  346. package/Sidebar/Sidebar.d.ts +66 -0
  347. package/Sidebar/Sidebar.mjs +543 -0
  348. package/Sidebar/index.d.ts +1 -0
  349. package/Sidebar/index.mjs +27 -0
  350. package/Sidebar/package.json +7 -0
  351. package/Skeleton/Skeleton.d.ts +4 -0
  352. package/Skeleton/Skeleton.mjs +17 -0
  353. package/Skeleton/index.d.ts +1 -0
  354. package/Skeleton/index.mjs +4 -0
  355. package/Skeleton/package.json +7 -0
  356. package/Slider/Slider.d.ts +4 -0
  357. package/Slider/Slider.mjs +23 -0
  358. package/Slider/index.d.ts +1 -0
  359. package/Slider/index.mjs +4 -0
  360. package/Slider/package.json +7 -0
  361. package/Sonner/Sonner.d.ts +5 -0
  362. package/Sonner/Sonner.mjs +25 -0
  363. package/Sonner/index.d.ts +1 -0
  364. package/Sonner/index.mjs +4 -0
  365. package/Sonner/package.json +7 -0
  366. package/Switch/Switch.d.ts +4 -0
  367. package/Switch/Switch.mjs +27 -0
  368. package/Switch/index.d.ts +1 -0
  369. package/Switch/index.mjs +4 -0
  370. package/Switch/package.json +7 -0
  371. package/Table/Table.d.ts +10 -0
  372. package/Table/Table.mjs +90 -0
  373. package/Table/index.d.ts +1 -0
  374. package/Table/index.mjs +11 -0
  375. package/Table/package.json +7 -0
  376. package/TablePagination/TablePagination.d.ts +16 -0
  377. package/TablePagination/TablePagination.mjs +74 -0
  378. package/TablePagination/index.d.ts +1 -0
  379. package/TablePagination/index.mjs +4 -0
  380. package/TablePagination/package.json +7 -0
  381. package/Tabs/Tabs.d.ts +5 -0
  382. package/Tabs/Tabs.mjs +23 -0
  383. package/Tabs/Tabs.types.d.ts +12 -0
  384. package/Tabs/TabsRoot.d.ts +7 -0
  385. package/Tabs/TabsRoot.mjs +46 -0
  386. package/Tabs/index.d.ts +2 -0
  387. package/Tabs/index.mjs +10 -0
  388. package/Tabs/package.json +7 -0
  389. package/Textarea/Textarea.d.ts +4 -0
  390. package/Textarea/Textarea.mjs +75 -0
  391. package/Textarea/Textarea.types.d.ts +18 -0
  392. package/Textarea/index.d.ts +2 -0
  393. package/Textarea/index.mjs +4 -0
  394. package/Textarea/package.json +7 -0
  395. package/Textarea/useAutosizeTextArea.d.ts +3 -0
  396. package/Textarea/useAutosizeTextArea.mjs +20 -0
  397. package/Theme/ThemeModeToggle.d.ts +8 -0
  398. package/Theme/ThemeModeToggle.mjs +48 -0
  399. package/Theme/ThemeProvider.d.ts +4 -0
  400. package/Theme/ThemeProvider.mjs +27 -0
  401. package/Theme/index.d.ts +2 -0
  402. package/Theme/index.mjs +6 -0
  403. package/Theme/package.json +7 -0
  404. package/Toast/Toast.d.ts +13 -0
  405. package/Toast/Toast.mjs +80 -0
  406. package/Toast/Toast.types.d.ts +34 -0
  407. package/Toast/index.d.ts +3 -0
  408. package/Toast/index.mjs +15 -0
  409. package/Toast/package.json +7 -0
  410. package/Toast/toast.constants.d.ts +6 -0
  411. package/Toast/toast.constants.mjs +9 -0
  412. package/Toast/toastVariants.d.ts +3 -0
  413. package/Toast/toastVariants.mjs +21 -0
  414. package/Toast/useToast.d.ts +16 -0
  415. package/Toast/useToast.mjs +101 -0
  416. package/Toaster/Toaster.d.ts +1 -0
  417. package/Toaster/Toaster.mjs +22 -0
  418. package/Toaster/index.d.ts +1 -0
  419. package/Toaster/index.mjs +4 -0
  420. package/Toaster/package.json +7 -0
  421. package/Toggle/Toggle.d.ts +12 -0
  422. package/Toggle/Toggle.mjs +37 -0
  423. package/Toggle/index.d.ts +1 -0
  424. package/Toggle/index.mjs +5 -0
  425. package/Toggle/package.json +7 -0
  426. package/ToggleGroup/ToggleGroup.d.ts +12 -0
  427. package/ToggleGroup/ToggleGroup.mjs +41 -0
  428. package/ToggleGroup/index.d.ts +1 -0
  429. package/ToggleGroup/index.mjs +5 -0
  430. package/ToggleGroup/package.json +7 -0
  431. package/Tooltip/Tooltip.d.ts +4 -0
  432. package/Tooltip/Tooltip.mjs +12 -0
  433. package/Tooltip/Tooltip.types.d.ts +8 -0
  434. package/Tooltip/TooltipRoot.d.ts +7 -0
  435. package/Tooltip/TooltipRoot.mjs +23 -0
  436. package/Tooltip/index.d.ts +3 -0
  437. package/Tooltip/index.mjs +9 -0
  438. package/Tooltip/package.json +7 -0
  439. package/index.css +1 -0
  440. package/index.d.ts +68 -0
  441. package/index.mjs +367 -0
  442. package/package.json +103 -0
  443. package/tailwind.config.mjs +148 -0
@@ -0,0 +1,152 @@
1
+ import { jsxs as r, jsx as i, Fragment as U } from "react/jsx-runtime";
2
+ import { X as j } from "lucide-react";
3
+ import { forwardRef as H, useState as w, useImperativeHandle as O } from "react";
4
+ import { useDropzone as X } from "react-dropzone";
5
+ import { cn as f } from "@oneplatformdev/utils";
6
+ import { Card as Y } from "../Card/Card.mjs";
7
+ import { F as q, D as G } from "../DropzoneFilePreview-Dhtv8F4u.js";
8
+ import { DropzoneSinglePickPreview as J } from "./DropzoneSinglePickPreview.mjs";
9
+ import { DefaultFileIcon as K, isFile as g, extractName as Q } from "./DropzoneUtils.mjs";
10
+ const R = H(
11
+ ({
12
+ acceptTypes: y = G,
13
+ maxSizeMB: F,
14
+ maxFiles: v = 1,
15
+ onErrors: a,
16
+ hideErrors: D = !1,
17
+ disabled: p = !1,
18
+ classNames: o,
19
+ value: z = [],
20
+ onChangeValue: s,
21
+ className: I,
22
+ labelDropzonePrompt: E = "Drop files here or click to select",
23
+ labelDropzoneSubPrompt: b = "",
24
+ labelOrClickToSelect: Z = "Click to select files",
25
+ labelSelectedFiles: S = "Selected Files",
26
+ labelUploadErrors: N = "Upload Errors",
27
+ labelFileTooLarge: W = "File is too large",
28
+ labelInvalidFileType: k = "Invalid file type",
29
+ singlePick: c = !1,
30
+ ...B
31
+ }, T) => {
32
+ const [n, x] = w(z), [m, _] = w([]), A = (e, l) => {
33
+ _(l), a == null || a(l);
34
+ const t = c ? e.slice(0, 1) : [...n, ...e].slice(0, v);
35
+ x(t), s == null || s(t);
36
+ }, u = (e, l) => {
37
+ if (p) return;
38
+ e.stopPropagation();
39
+ const t = n.filter((d, h) => h !== l);
40
+ x(t), s == null || s(t);
41
+ }, { getRootProps: L, getInputProps: M, isDragActive: P } = X({
42
+ onDrop: A,
43
+ accept: y.reduce((e, l) => (e[l] = [], e), {}),
44
+ maxSize: F * 1024 * 1024,
45
+ maxFiles: c ? 1 : v,
46
+ disabled: p
47
+ });
48
+ return O(T, () => ({
49
+ setItems: x
50
+ }), []), /* @__PURE__ */ r(
51
+ Y,
52
+ {
53
+ ...L(),
54
+ ...B,
55
+ className: f(
56
+ "border-dashed p-2 text-center flex flex-col items-center justify-center cursor-pointer",
57
+ p && "border-[#E4E4E7] pointer-events-none",
58
+ m.length > 0 ? "border-red-500" : "!border-[#E4E4E7]",
59
+ P && "bg-gray-100",
60
+ c && "!shadow-none",
61
+ c && n.length > 0 && "!p-0 !shadow-none",
62
+ I
63
+ ),
64
+ children: [
65
+ /* @__PURE__ */ i("input", { ...M() }),
66
+ n.length === 0 && m.length === 0 && /* @__PURE__ */ r(
67
+ "div",
68
+ {
69
+ className: f(
70
+ "flex flex-col items-center gap-1",
71
+ o == null ? void 0 : o.idleWrapper
72
+ ),
73
+ children: [
74
+ /* @__PURE__ */ i(K, {}),
75
+ !p && /* @__PURE__ */ r(U, { children: [
76
+ /* @__PURE__ */ i("span", { className: "font-medium text-md text-foreground max-w-[200px]", children: E }),
77
+ /* @__PURE__ */ i("span", { className: "font-normal text-xs text-foreground max-w-[250px]", children: b })
78
+ ] })
79
+ ]
80
+ }
81
+ ),
82
+ m.length > 0 && /* @__PURE__ */ r("div", { className: f("w-full mt-4", o == null ? void 0 : o.errorWrapper), children: [
83
+ /* @__PURE__ */ r("span", { className: "font-semibold text-red-500", children: [
84
+ N,
85
+ ":"
86
+ ] }),
87
+ /* @__PURE__ */ i("ul", { className: "mt-2 text-sm text-red-500 list-disc list-inside", children: m.map((e, l) => /* @__PURE__ */ r("li", { children: [
88
+ e.file.name,
89
+ " (",
90
+ (e.file.size / (1024 * 1024)).toFixed(2),
91
+ " MB)",
92
+ !D && /* @__PURE__ */ i("ul", { className: "ml-4 list-disc list-inside", children: e.errors.map((t, d) => /* @__PURE__ */ r("li", { children: [
93
+ t.code === "file-too-large" && W,
94
+ t.code === "file-invalid-type" && k,
95
+ t.code !== "file-too-large" && t.code !== "file-invalid-type" && t.message
96
+ ] }, d)) })
97
+ ] }, l)) })
98
+ ] }),
99
+ !!(c && n.length) && /* @__PURE__ */ i(
100
+ J,
101
+ {
102
+ item: n[0],
103
+ onRemoveClick: (e) => u(e, 0),
104
+ disabled: p
105
+ }
106
+ ),
107
+ !c && n.length > 0 && /* @__PURE__ */ r("div", { className: f("w-full mt-2", o == null ? void 0 : o.previewWrapper), children: [
108
+ /* @__PURE__ */ r("pre", { className: "font-semibold text-gray-600", children: [
109
+ S,
110
+ ":"
111
+ ] }),
112
+ /* @__PURE__ */ i("ul", { className: "mt-2 text-sm text-gray-500 flex flex-wrap gap-4 items-start justify-center", children: n.map((e, l) => {
113
+ const t = g(e) ? e.name : Q(e), d = g(e) ? (e.size / (1024 * 1024)).toFixed(2) + " MB" : "";
114
+ return /* @__PURE__ */ r(
115
+ "li",
116
+ {
117
+ className: "flex flex-col items-center gap-2 relative",
118
+ children: [
119
+ /* @__PURE__ */ r("div", { className: "relative", children: [
120
+ /* @__PURE__ */ i(q, { item: e, styles: o }),
121
+ /* @__PURE__ */ i(
122
+ "div",
123
+ {
124
+ className: "absolute top-0 right-0 cursor-pointer bg-gray-300 rounded-sm",
125
+ onClick: (h) => u(h, l),
126
+ children: /* @__PURE__ */ i(j, { size: 16, strokeWidth: 1, color: "black" })
127
+ }
128
+ )
129
+ ] }),
130
+ /* @__PURE__ */ r("span", { className: "inline-flex flex-col items-center", children: [
131
+ /* @__PURE__ */ i("span", { className: "max-w-[80px] text-ellipsis overflow-hidden whitespace-nowrap", children: t }),
132
+ d && /* @__PURE__ */ r("span", { children: [
133
+ "(",
134
+ d,
135
+ ")"
136
+ ] })
137
+ ] })
138
+ ]
139
+ },
140
+ l
141
+ );
142
+ }) })
143
+ ] })
144
+ ]
145
+ }
146
+ );
147
+ }
148
+ );
149
+ R.displayName = "Dropzone";
150
+ export {
151
+ R as Dropzone
152
+ };
@@ -0,0 +1,42 @@
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ import { FileRejection } from 'react-dropzone';
3
+
4
+ export type DropzoneValueItem = File | string;
5
+ export interface FilePreviewProps {
6
+ item: DropzoneValueItem;
7
+ styles?: Pick<DropzoneStyles, 'previewWraper' | 'previewImage' | 'previewFile'>;
8
+ }
9
+ export interface DropzoneTranslations {
10
+ labelDropzonePrompt?: string;
11
+ labelDropzoneSubPrompt?: string;
12
+ labelOrClickToSelect?: string;
13
+ labelSelectedFiles?: string;
14
+ labelUploadErrors?: string;
15
+ labelFileTooLarge?: string;
16
+ labelInvalidFileType?: string;
17
+ }
18
+ export interface DropzoneProps extends DropzoneTranslations, React.HTMLAttributes<HTMLDivElement> {
19
+ acceptTypes?: string[];
20
+ maxSizeMB: number;
21
+ maxFiles?: number;
22
+ onErrors?: (errors: FileRejection[]) => void;
23
+ hideErrors?: boolean;
24
+ disabled?: boolean;
25
+ classNames?: DropzoneStyles;
26
+ value?: DropzoneValueItem[];
27
+ onChangeValue?: (items: DropzoneValueItem[]) => void;
28
+ singlePick?: boolean;
29
+ }
30
+ export interface DropzoneStyles {
31
+ idleWrapper?: string;
32
+ previewWrapper?: string;
33
+ errorWrapper?: string;
34
+ previewWraper?: string;
35
+ previewImage?: string;
36
+ previewFile?: string;
37
+ }
38
+ export declare const DEFAULT_FILE_TYPES: string[];
39
+ export declare const DEFAULT_IMAGES_TYPES: string[];
40
+ export interface DropzoneControl {
41
+ setItems: Dispatch<SetStateAction<DropzoneValueItem[]>>;
42
+ }
@@ -0,0 +1,4 @@
1
+ import { FilePreviewProps } from './Dropzone.types';
2
+ import { FC } from 'react';
3
+
4
+ export declare const FilePreview: FC<FilePreviewProps>;
@@ -0,0 +1,9 @@
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import "lucide-react";
4
+ import { F } from "../DropzoneFilePreview-Dhtv8F4u.js";
5
+ import "./DropzoneUtils.mjs";
6
+ import "@oneplatformdev/utils";
7
+ export {
8
+ F as FilePreview
9
+ };
@@ -0,0 +1,10 @@
1
+ import { DropzoneValueItem } from './Dropzone.types';
2
+
3
+ export declare const transformImageToSrc: (preview?: string | File | null) => string;
4
+ interface SinglePickPreviewProps {
5
+ item: DropzoneValueItem;
6
+ disabled?: boolean;
7
+ onRemoveClick: (e: React.MouseEvent<HTMLDivElement>) => void;
8
+ }
9
+ export declare const DropzoneSinglePickPreview: ({ item, disabled, onRemoveClick, }: SinglePickPreviewProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,41 @@
1
+ import { jsxs as s, jsx as r } from "react/jsx-runtime";
2
+ import { useMemo as c } from "react";
3
+ import { isFile as i } from "./DropzoneUtils.mjs";
4
+ import { X as a, FileIcon as u } from "lucide-react";
5
+ const d = (t) => {
6
+ if (!t) return "";
7
+ switch (!0) {
8
+ case (typeof t == "string" && !!t.trim() && t !== "null"):
9
+ return t;
10
+ case t instanceof File:
11
+ return URL.createObjectURL(t);
12
+ case t instanceof FileList:
13
+ return t[0] ? URL.createObjectURL(t[0]) : "";
14
+ default:
15
+ return "";
16
+ }
17
+ }, p = ({
18
+ item: t,
19
+ disabled: l,
20
+ onRemoveClick: n
21
+ }) => {
22
+ const e = i(t) ? t.name : t, o = c(() => d(t), [t]);
23
+ return /* @__PURE__ */ s("div", { className: "relative w-full h-64 sm:h-80 md:h-96 overflow-hidden outline-[#E4E4E7] outline-[2px] outline-dashed outline-offset-[-1px] rounded-lg", children: [
24
+ !l && /* @__PURE__ */ r("div", { className: "absolute top-2 right-2 cursor-pointer bg-white/70 rounded-[4px] p-1 shadow", onClick: n, children: /* @__PURE__ */ r(a, { size: 16, strokeWidth: 2, color: "black" }) }),
25
+ o ? /* @__PURE__ */ r(
26
+ "img",
27
+ {
28
+ src: o,
29
+ alt: e == null ? void 0 : e.toString(),
30
+ className: "w-full h-full object-cover rounded-lg "
31
+ }
32
+ ) : /* @__PURE__ */ s("div", { className: "w-full h-full flex flex-col items-center justify-center text-gray-600", children: [
33
+ /* @__PURE__ */ r(u, { size: 28 }),
34
+ /* @__PURE__ */ r("span", { className: "text-sm mt-2 break-all px-2 text-center", children: e == null ? void 0 : e.toString() })
35
+ ] })
36
+ ] });
37
+ };
38
+ export {
39
+ p as DropzoneSinglePickPreview,
40
+ d as transformImageToSrc
41
+ };
@@ -0,0 +1,5 @@
1
+ import { DropzoneValueItem } from './Dropzone.types';
2
+
3
+ export declare function isFile(item: DropzoneValueItem): item is File;
4
+ export declare function extractName(url: string): string;
5
+ export declare const DefaultFileIcon: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,24 @@
1
+ import { jsxs as t, jsx as l } from "react/jsx-runtime";
2
+ function d(e) {
3
+ return e instanceof File;
4
+ }
5
+ function r(e) {
6
+ try {
7
+ const i = e.split("?")[0].split("#")[0].split("/");
8
+ return i[i.length - 1] || e;
9
+ } catch {
10
+ return e;
11
+ }
12
+ }
13
+ const o = () => /* @__PURE__ */ t("svg", { width: "55", height: "55", viewBox: "0 0 55 55", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
14
+ /* @__PURE__ */ l("mask", { id: "mask0_2430_114601", maskUnits: "userSpaceOnUse", x: "7", y: "4", width: "39", height: "46", children: /* @__PURE__ */ l("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M7.25 4.68359H45.6174V49.354H7.25V4.68359Z", fill: "white" }) }),
15
+ /* @__PURE__ */ l("g", { mask: "url(#mask0_2430_114601)", children: /* @__PURE__ */ l("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M17.5386 8.05859C13.8103 8.05859 10.7143 11.0781 10.6266 14.8018V38.9196C10.5456 42.7468 13.5606 45.8968 17.3518 45.9801H35.5386C39.2938 45.8451 42.2661 42.7468 42.2413 38.9308V18.9216L31.8148 8.05859H17.5656H17.5386ZM17.5664 49.3551H17.2829C11.6309 49.2336 7.1309 44.5356 7.2524 38.8836V14.7613C7.38515 9.17909 11.9932 4.68359 17.5327 4.68359H17.5732H32.5334C32.9924 4.68359 33.4312 4.87034 33.7507 5.20109L45.1492 17.0743C45.4484 17.3871 45.6172 17.8078 45.6172 18.2421V38.9196C45.6532 44.5648 41.2522 49.1526 35.5979 49.3551H17.5664Z", fill: "#0D0E2B", "fill-opacity": "0.7" }) }),
16
+ /* @__PURE__ */ l("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M43.9198 20.3703H37.7233C33.6036 20.359 30.2578 17.002 30.2578 12.889V6.34375C30.2578 5.41225 31.0138 4.65625 31.9453 4.65625C32.8768 4.65625 33.6328 5.41225 33.6328 6.34375V12.889C33.6328 15.148 35.4688 16.9885 37.7278 16.9953H43.9198C44.8513 16.9953 45.6073 17.7513 45.6073 18.6828C45.6073 19.6143 44.8513 20.3703 43.9198 20.3703Z", fill: "#0D0E2B", "fill-opacity": "0.7" }),
17
+ /* @__PURE__ */ l("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M25.5708 37.729C24.6393 37.729 23.8833 36.973 23.8833 36.0415V22.4492C23.8833 21.5177 24.6393 20.7617 25.5708 20.7617C26.5023 20.7617 27.2583 21.5177 27.2583 22.4492V36.0415C27.2583 36.973 26.5023 37.729 25.5708 37.729Z", fill: "#0D0E2B", "fill-opacity": "0.7" }),
18
+ /* @__PURE__ */ l("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M25.5678 37.7279C25.1201 37.7279 24.6881 37.5501 24.3731 37.2306L19.0968 31.9341C18.4398 31.2726 18.4421 30.2039 19.1013 29.5469C19.7628 28.8899 20.8316 28.8899 21.4886 29.5514L25.5678 33.6509L29.6471 29.5514C30.3041 28.8899 31.3728 28.8899 32.0343 29.5469C32.6936 30.2039 32.6958 31.2726 32.0388 31.9341L26.7626 37.2306C26.4476 37.5501 26.0156 37.7279 25.5678 37.7279Z", fill: "#0D0E2B", "fill-opacity": "0.7" })
19
+ ] });
20
+ export {
21
+ o as DefaultFileIcon,
22
+ r as extractName,
23
+ d as isFile
24
+ };
@@ -0,0 +1,2 @@
1
+ export * from './Dropzone';
2
+ export * from './Dropzone.types';
@@ -0,0 +1,7 @@
1
+ import { Dropzone as r } from "./Dropzone.mjs";
2
+ import { D as T, a as _ } from "../DropzoneFilePreview-Dhtv8F4u.js";
3
+ export {
4
+ T as DEFAULT_FILE_TYPES,
5
+ _ as DEFAULT_IMAGES_TYPES,
6
+ r as Dropzone
7
+ };
@@ -0,0 +1,7 @@
1
+ {
2
+ "sideEffects": false,
3
+ "main": "./index.mjs",
4
+ "module": "./index.mjs",
5
+ "default": "./index.mjs",
6
+ "types": "./index.d.ts"
7
+ }
@@ -0,0 +1,67 @@
1
+ import { jsx as l, jsxs as d } from "react/jsx-runtime";
2
+ import { useState as m, useEffect as f } from "react";
3
+ import { File as s } from "lucide-react";
4
+ import { isFile as o } from "./Dropzone/DropzoneUtils.mjs";
5
+ import { cn as c } from "@oneplatformdev/utils";
6
+ const h = [
7
+ "application/msword",
8
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
9
+ "text/csv",
10
+ "text/plain",
11
+ "application/pdf"
12
+ ], u = [
13
+ "image/png",
14
+ "image/jpeg",
15
+ "image/jpg",
16
+ "image/webp",
17
+ "image/gif"
18
+ ], j = ({ item: e, styles: r }) => {
19
+ const [t, a] = m(null), p = o(e) && u.includes(e.type);
20
+ return f(() => {
21
+ let n = null;
22
+ if (o(e) && p) {
23
+ const i = new FileReader();
24
+ return i.onloadend = () => a(i.result), i.readAsDataURL(e), () => a(null);
25
+ } else {
26
+ if (typeof e == "string")
27
+ return n = new Image(), n.src = e, n.onload = () => a(e), n.onerror = () => a(null), () => {
28
+ n.onload = null, n.onerror = null;
29
+ };
30
+ a(null);
31
+ }
32
+ return () => a(null);
33
+ }, [e, p]), /* @__PURE__ */ l(
34
+ "div",
35
+ {
36
+ className: c(
37
+ "w-32 h-32 border border-gray-300 rounded-md overflow-hidden flex items-center justify-center",
38
+ r == null ? void 0 : r.previewWraper
39
+ ),
40
+ children: t ? /* @__PURE__ */ l(
41
+ "img",
42
+ {
43
+ src: t,
44
+ alt: o(e) ? e.name : "external-image",
45
+ className: c("w-full h-full object-cover", r == null ? void 0 : r.previewImage)
46
+ }
47
+ ) : /* @__PURE__ */ d(
48
+ "div",
49
+ {
50
+ className: c(
51
+ "flex flex-col items-center justify-center text-gray-500 text-sm p-2 text-center",
52
+ r == null ? void 0 : r.previewFile
53
+ ),
54
+ children: [
55
+ /* @__PURE__ */ l(s, { className: "w-6 h-6" }),
56
+ o(e) ? /* @__PURE__ */ l("span", { className: "text-xs break-all", children: e.name }) : /* @__PURE__ */ l("span", { className: "text-xs break-all", children: e })
57
+ ]
58
+ }
59
+ )
60
+ }
61
+ );
62
+ };
63
+ export {
64
+ h as D,
65
+ j as F,
66
+ u as a
67
+ };
package/Form/Form.d.ts ADDED
@@ -0,0 +1,23 @@
1
+ import { ControllerProps, FieldPath, FieldValues } from 'react-hook-form';
2
+ import * as React from 'react';
3
+ import * as LabelPrimitive from '@radix-ui/react-label';
4
+ declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues extends FieldValues | undefined = undefined>(props: import('react-hook-form').FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
5
+ declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
6
+ declare const useFormField: () => {
7
+ invalid: boolean;
8
+ isDirty: boolean;
9
+ isTouched: boolean;
10
+ isValidating: boolean;
11
+ error?: import('react-hook-form').FieldError;
12
+ id: string;
13
+ name: string;
14
+ formItemId: string;
15
+ formDescriptionId: string;
16
+ formMessageId: string;
17
+ };
18
+ declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
19
+ declare const FormLabel: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
20
+ declare const FormControl: React.ForwardRefExoticComponent<Omit<import('@radix-ui/react-slot').SlotProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
21
+ declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
22
+ declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
23
+ export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
package/Form/Form.mjs ADDED
@@ -0,0 +1,98 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import * as s from "react";
3
+ import { Slot as F } from "@radix-ui/react-slot";
4
+ import { FormProvider as u, Controller as p, useFormContext as x } from "react-hook-form";
5
+ import { cn as a } from "@oneplatformdev/utils";
6
+ import { Label as I } from "../Label/Label.mjs";
7
+ import "../Label/labelVariants.mjs";
8
+ const M = u, l = s.createContext(
9
+ {}
10
+ ), S = ({
11
+ ...e
12
+ }) => /* @__PURE__ */ n(l.Provider, { value: { name: e.name }, children: /* @__PURE__ */ n(p, { ...e }) }), c = () => {
13
+ const e = s.useContext(l), t = s.useContext(f), { getFieldState: o, formState: r } = x(), m = o(e.name, r);
14
+ if (!e)
15
+ throw new Error("useFormField should be used within <FormField>");
16
+ const { id: i } = t;
17
+ return {
18
+ id: i,
19
+ name: e.name,
20
+ formItemId: `${i}-form-item`,
21
+ formDescriptionId: `${i}-form-item-description`,
22
+ formMessageId: `${i}-form-item-message`,
23
+ ...m
24
+ };
25
+ }, f = s.createContext(
26
+ {}
27
+ ), v = s.forwardRef(({ className: e, ...t }, o) => {
28
+ const r = s.useId();
29
+ return /* @__PURE__ */ n(f.Provider, { value: { id: r }, children: /* @__PURE__ */ n("div", { ref: o, className: a("space-y-1", e), ...t }) });
30
+ });
31
+ v.displayName = "FormItem";
32
+ const C = s.forwardRef(({ className: e, ...t }, o) => {
33
+ const { error: r, formItemId: m } = c();
34
+ return /* @__PURE__ */ n(
35
+ I,
36
+ {
37
+ ref: o,
38
+ "data-state": r ? "invalid" : "valid",
39
+ className: a(r && "text-destructive", e),
40
+ htmlFor: m,
41
+ ...t
42
+ }
43
+ );
44
+ });
45
+ C.displayName = "FormLabel";
46
+ const g = s.forwardRef(({ className: e, ...t }, o) => {
47
+ const { error: r, formItemId: m, formDescriptionId: i, formMessageId: d } = c();
48
+ return /* @__PURE__ */ n(
49
+ F,
50
+ {
51
+ ref: o,
52
+ id: m,
53
+ "data-state": r ? "invalid" : "valid",
54
+ "aria-describedby": r ? `${i} ${d}` : `${i}`,
55
+ "aria-invalid": !!r,
56
+ className: a("group/form-control", e),
57
+ ...t
58
+ }
59
+ );
60
+ });
61
+ g.displayName = "FormControl";
62
+ const N = s.forwardRef(({ className: e, ...t }, o) => {
63
+ const { formDescriptionId: r } = c();
64
+ return /* @__PURE__ */ n(
65
+ "p",
66
+ {
67
+ ref: o,
68
+ id: r,
69
+ className: a("text-[0.8rem] text-muted-foreground", e),
70
+ ...t
71
+ }
72
+ );
73
+ });
74
+ N.displayName = "FormDescription";
75
+ const w = s.forwardRef(({ className: e, children: t, ...o }, r) => {
76
+ const { error: m, formMessageId: i } = c(), d = m ? String(m == null ? void 0 : m.message) : t;
77
+ return d ? /* @__PURE__ */ n(
78
+ "p",
79
+ {
80
+ ref: r,
81
+ id: i,
82
+ className: a("text-[0.8rem] font-medium text-destructive", e),
83
+ ...o,
84
+ children: d
85
+ }
86
+ ) : null;
87
+ });
88
+ w.displayName = "FormMessage";
89
+ export {
90
+ M as Form,
91
+ g as FormControl,
92
+ N as FormDescription,
93
+ S as FormField,
94
+ v as FormItem,
95
+ C as FormLabel,
96
+ w as FormMessage,
97
+ c as useFormField
98
+ };
@@ -0,0 +1,4 @@
1
+ import { FieldValues } from 'react-hook-form';
2
+ import { FormRenderControlProps } from './FormRenderControl.types';
3
+
4
+ export declare const FormRenderControl: <Data extends FieldValues>(props: FormRenderControlProps<Data>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { jsx as r, jsxs as a } from "react/jsx-runtime";
2
+ import { FormField as d, FormItem as i, FormLabel as F, FormMessage as p } from "./Form.mjs";
3
+ const b = (e) => {
4
+ const { form: n, name: m, label: o, render: t, containerProps: l = {}, ...s } = e;
5
+ return /* @__PURE__ */ r(
6
+ d,
7
+ {
8
+ control: n.control,
9
+ name: m,
10
+ render: (c) => /* @__PURE__ */ a(i, { ...l, children: [
11
+ !!o && /* @__PURE__ */ r(F, { children: o }),
12
+ t(c),
13
+ /* @__PURE__ */ r(p, {})
14
+ ] }),
15
+ ...s
16
+ }
17
+ );
18
+ };
19
+ export {
20
+ b as FormRenderControl
21
+ };
@@ -0,0 +1,16 @@
1
+ import { ControllerFieldState, ControllerRenderProps, FieldPath, FieldValues, UseFormReturn, UseFormStateReturn } from 'react-hook-form';
2
+ import { default as React } from 'react';
3
+
4
+ export type FormRenderProps<Data extends FieldValues> = ({ field, fieldState, formState, }: {
5
+ field: ControllerRenderProps<Data, FieldPath<Data>>;
6
+ fieldState: ControllerFieldState;
7
+ formState: UseFormStateReturn<Data>;
8
+ }) => React.ReactElement;
9
+ export interface FormRenderControlProps<Data extends FieldValues> {
10
+ form: UseFormReturn<Data>;
11
+ name: FieldPath<Data>;
12
+ label?: string;
13
+ render: FormRenderProps<Data>;
14
+ containerProps?: React.HTMLAttributes<HTMLDivElement>;
15
+ }
16
+ export type FormRenderControlExtendProps<Data extends FieldValues> = Omit<FormRenderControlProps<Data>, 'render'>;
@@ -0,0 +1,3 @@
1
+ export * from './Form';
2
+ export * from './FormRenderControl';
3
+ export type * from './FormRenderControl.types';
package/Form/index.mjs ADDED
@@ -0,0 +1,13 @@
1
+ import { Form as e, FormControl as m, FormDescription as F, FormField as t, FormItem as l, FormLabel as i, FormMessage as n, useFormField as s } from "./Form.mjs";
2
+ import { FormRenderControl as p } from "./FormRenderControl.mjs";
3
+ export {
4
+ e as Form,
5
+ m as FormControl,
6
+ F as FormDescription,
7
+ t as FormField,
8
+ l as FormItem,
9
+ i as FormLabel,
10
+ n as FormMessage,
11
+ p as FormRenderControl,
12
+ s as useFormField
13
+ };
@@ -0,0 +1,7 @@
1
+ {
2
+ "sideEffects": false,
3
+ "main": "./index.mjs",
4
+ "module": "./index.mjs",
5
+ "default": "./index.mjs",
6
+ "types": "./index.d.ts"
7
+ }
@@ -0,0 +1,4 @@
1
+ import { FormCheckboxProps } from './FormCheckbox.types';
2
+ import { FieldValues } from 'react-hook-form';
3
+
4
+ export declare const FormCheckbox: <Data extends FieldValues>(props: FormCheckboxProps<Data>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,30 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { FormControl as h } from "../Form/Form.mjs";
3
+ import { FormRenderControl as p } from "../Form/FormRenderControl.mjs";
4
+ import { CheckboxLabel as s } from "../Checkbox/Checkbox.mjs";
5
+ const i = (t) => {
6
+ const { form: c, label: a, name: l, onCheckedChange: o, ...m } = t;
7
+ return /* @__PURE__ */ e(
8
+ p,
9
+ {
10
+ form: c,
11
+ name: l,
12
+ render: ({ field: r }) => /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(
13
+ s,
14
+ {
15
+ ...r,
16
+ ...m,
17
+ label: a,
18
+ checked: r.value || !1,
19
+ onCheckedChange: (n) => {
20
+ r.onChange(n), o == null || o(n);
21
+ }
22
+ }
23
+ ) }),
24
+ ...m
25
+ }
26
+ );
27
+ };
28
+ export {
29
+ i as FormCheckbox
30
+ };
@@ -0,0 +1,7 @@
1
+ import { FormRenderControlExtendProps } from '../Form';
2
+ import { FieldValues } from 'react-hook-form';
3
+ import { CheckboxProps } from '../Checkbox';
4
+
5
+ export interface FormCheckboxProps<Data extends FieldValues> extends FormRenderControlExtendProps<Data>, Omit<CheckboxProps, 'form' | 'name' | 'label'> {
6
+ disabled?: boolean;
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from './FormCheckbox';
2
+ export type * from './FormCheckbox.types';
@@ -0,0 +1,4 @@
1
+ import { FormCheckbox as e } from "./FormCheckbox.mjs";
2
+ export {
3
+ e as FormCheckbox
4
+ };
@@ -0,0 +1,7 @@
1
+ {
2
+ "sideEffects": false,
3
+ "main": "./index.mjs",
4
+ "module": "./index.mjs",
5
+ "default": "./index.mjs",
6
+ "types": "./index.d.ts"
7
+ }
@@ -0,0 +1,4 @@
1
+ import { FieldValues } from 'react-hook-form';
2
+ import { FormComboboxProps } from './FormCombobox.types';
3
+
4
+ export declare const FormCombobox: <Data extends FieldValues>(props: FormComboboxProps<Data>) => import("react/jsx-runtime").JSX.Element;