@oneplatformdev/ui 0.0.1-beta.98 → 0.1.0-5

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 (479) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +3 -29
  3. package/{Button → dist/Button}/Button.d.ts +1 -0
  4. package/dist/Button/Button.d.ts.map +1 -0
  5. package/{Button/Button.mjs → dist/Button/Button.js} +8 -8
  6. package/dist/Button/Button.stories.d.ts +8 -0
  7. package/dist/Button/Button.stories.d.ts.map +1 -0
  8. package/dist/Button/Button.stories.js +20 -0
  9. package/{Button → dist/Button}/Button.types.d.ts +3 -2
  10. package/dist/Button/Button.types.d.ts.map +1 -0
  11. package/dist/Button/Button.types.js +1 -0
  12. package/dist/Button/buttonVariants.d.ts +5 -0
  13. package/dist/Button/buttonVariants.d.ts.map +1 -0
  14. package/dist/Button/buttonVariants.js +35 -0
  15. package/{Button → dist/Button}/index.d.ts +1 -0
  16. package/dist/Button/index.d.ts.map +1 -0
  17. package/dist/Button/index.js +7 -0
  18. package/{ButtonIcon → dist/ButtonIcon}/ButtonIcon.d.ts +1 -0
  19. package/dist/ButtonIcon/ButtonIcon.d.ts.map +1 -0
  20. package/dist/ButtonIcon/ButtonIcon.js +29 -0
  21. package/dist/ButtonIcon/ButtonIcon.stories.d.ts +37 -0
  22. package/dist/ButtonIcon/ButtonIcon.stories.d.ts.map +1 -0
  23. package/dist/ButtonIcon/ButtonIcon.stories.js +126 -0
  24. package/{ButtonIcon → dist/ButtonIcon}/ButtonIcon.types.d.ts +3 -2
  25. package/dist/ButtonIcon/ButtonIcon.types.d.ts.map +1 -0
  26. package/dist/ButtonIcon/ButtonIcon.types.js +1 -0
  27. package/dist/ButtonIcon/buttonIconVariants.d.ts +8 -0
  28. package/dist/ButtonIcon/buttonIconVariants.d.ts.map +1 -0
  29. package/{ButtonIcon/buttonIconVariants.mjs → dist/ButtonIcon/buttonIconVariants.js} +3 -3
  30. package/{ButtonIcon → dist/ButtonIcon}/index.d.ts +1 -0
  31. package/dist/ButtonIcon/index.d.ts.map +1 -0
  32. package/dist/ButtonIcon/index.js +7 -0
  33. package/dist/CHANGELOG.md +17 -0
  34. package/dist/LICENSE +21 -0
  35. package/dist/README.md +7 -0
  36. package/{Tooltip → dist/Tooltip}/Tooltip.d.ts +2 -2
  37. package/dist/Tooltip/Tooltip.d.ts.map +1 -0
  38. package/{Tooltip/Tooltip.mjs → dist/Tooltip/Tooltip.js} +1 -1
  39. package/{Tooltip → dist/Tooltip}/Tooltip.types.d.ts +2 -2
  40. package/dist/Tooltip/Tooltip.types.d.ts.map +1 -0
  41. package/dist/Tooltip/Tooltip.types.js +1 -0
  42. package/{Tooltip → dist/Tooltip}/TooltipRoot.d.ts +1 -0
  43. package/dist/Tooltip/TooltipRoot.d.ts.map +1 -0
  44. package/{Tooltip → dist/Tooltip}/index.d.ts +1 -0
  45. package/dist/Tooltip/index.d.ts.map +1 -0
  46. package/{Tooltip/index.mjs → dist/Tooltip/index.js} +2 -2
  47. package/dist/global.css +1 -0
  48. package/dist/index.d.ts +4 -0
  49. package/dist/index.d.ts.map +1 -0
  50. package/dist/index.js +17 -0
  51. package/dist/package.json +76 -0
  52. package/package.json +45 -72
  53. package/Accordion/Accordion.d.ts +0 -9
  54. package/Accordion/Accordion.mjs +0 -49
  55. package/Accordion/index.d.ts +0 -1
  56. package/Accordion/index.mjs +0 -7
  57. package/Accordion/package.json +0 -7
  58. package/Alert/Alert.d.ts +0 -7
  59. package/Alert/Alert.mjs +0 -37
  60. package/Alert/alertVariants.d.ts +0 -4
  61. package/Alert/alertVariants.mjs +0 -19
  62. package/Alert/index.d.ts +0 -1
  63. package/Alert/index.mjs +0 -6
  64. package/Alert/package.json +0 -7
  65. package/AlertDialog/AlertDialog.d.ts +0 -65
  66. package/AlertDialog/AlertDialog.mjs +0 -97
  67. package/AlertDialog/AlertDialog.types.d.ts +0 -53
  68. package/AlertDialog/AlertDialogRoot.d.ts +0 -21
  69. package/AlertDialog/AlertDialogRoot.mjs +0 -114
  70. package/AlertDialog/index.d.ts +0 -3
  71. package/AlertDialog/index.mjs +0 -16
  72. package/AlertDialog/package.json +0 -7
  73. package/AreaChart/AreaChart.d.ts +0 -4
  74. package/AreaChart/AreaChart.mjs +0 -27
  75. package/AreaChart/AreaChart.types.d.ts +0 -15
  76. package/AreaChart/index.d.ts +0 -2
  77. package/AreaChart/index.mjs +0 -4
  78. package/AreaChart/package.json +0 -7
  79. package/Aside/Aside.d.ts +0 -4
  80. package/Aside/Aside.mjs +0 -23
  81. package/Aside/Aside.types.d.ts +0 -18
  82. package/Aside/AsideSidebar.d.ts +0 -3
  83. package/Aside/AsideSidebar.mjs +0 -37
  84. package/Aside/index.d.ts +0 -3
  85. package/Aside/index.mjs +0 -7
  86. package/Aside/package.json +0 -7
  87. package/AspectRatio/AspectRatio.d.ts +0 -2
  88. package/AspectRatio/AspectRatio.mjs +0 -5
  89. package/AspectRatio/index.d.ts +0 -1
  90. package/AspectRatio/index.mjs +0 -5
  91. package/AspectRatio/package.json +0 -7
  92. package/Avatar/Avatar.d.ts +0 -5
  93. package/Avatar/Avatar.mjs +0 -42
  94. package/Avatar/index.d.ts +0 -1
  95. package/Avatar/index.mjs +0 -6
  96. package/Avatar/package.json +0 -7
  97. package/Badge/Badge.d.ts +0 -5
  98. package/Badge/Badge.mjs +0 -10
  99. package/Badge/Badge.types.d.ts +0 -5
  100. package/Badge/badgeVariants.d.ts +0 -3
  101. package/Badge/badgeVariants.mjs +0 -20
  102. package/Badge/index.d.ts +0 -3
  103. package/Badge/index.mjs +0 -6
  104. package/Badge/package.json +0 -7
  105. package/Breadcrumb/Breadcrumb.d.ts +0 -19
  106. package/Breadcrumb/Breadcrumb.mjs +0 -90
  107. package/Breadcrumb/index.d.ts +0 -1
  108. package/Breadcrumb/index.mjs +0 -10
  109. package/Breadcrumb/package.json +0 -7
  110. package/Button/buttonVariants.d.ts +0 -4
  111. package/Button/buttonVariants.mjs +0 -29
  112. package/Button/index.mjs +0 -7
  113. package/Button/package.json +0 -7
  114. package/ButtonIcon/ButtonIcon.mjs +0 -29
  115. package/ButtonIcon/buttonIconVariants.d.ts +0 -7
  116. package/ButtonIcon/index.mjs +0 -7
  117. package/ButtonIcon/package.json +0 -7
  118. package/Calendar/Calendar.d.ts +0 -8
  119. package/Calendar/Calendar.mjs +0 -64
  120. package/Calendar/index.d.ts +0 -1
  121. package/Calendar/index.mjs +0 -4
  122. package/Calendar/package.json +0 -7
  123. package/Card/Card.d.ts +0 -8
  124. package/Card/Card.mjs +0 -61
  125. package/Card/index.d.ts +0 -1
  126. package/Card/index.mjs +0 -9
  127. package/Card/package.json +0 -7
  128. package/Carousel/Carousel.d.ts +0 -18
  129. package/Carousel/Carousel.mjs +0 -168
  130. package/Carousel/index.d.ts +0 -1
  131. package/Carousel/index.mjs +0 -8
  132. package/Carousel/package.json +0 -7
  133. package/Chart/Chart.d.ts +0 -62
  134. package/Chart/Chart.mjs +0 -210
  135. package/Chart/index.d.ts +0 -1
  136. package/Chart/index.mjs +0 -9
  137. package/Chart/package.json +0 -7
  138. package/Checkbox/Checkbox.d.ts +0 -5
  139. package/Checkbox/Checkbox.mjs +0 -54
  140. package/Checkbox/Checkbox.types.d.ts +0 -10
  141. package/Checkbox/index.d.ts +0 -2
  142. package/Checkbox/index.mjs +0 -5
  143. package/Checkbox/package.json +0 -7
  144. package/Collapsible/Collapsible.d.ts +0 -5
  145. package/Collapsible/Collapsible.mjs +0 -7
  146. package/Collapsible/index.d.ts +0 -1
  147. package/Collapsible/index.mjs +0 -6
  148. package/Collapsible/package.json +0 -7
  149. package/Combobox/Combobox.d.ts +0 -4
  150. package/Combobox/Combobox.mjs +0 -15
  151. package/Combobox/Combobox.types.d.ts +0 -38
  152. package/Combobox/ComboboxOptionItem.d.ts +0 -5
  153. package/Combobox/ComboboxOptionItem.mjs +0 -67
  154. package/Combobox/ComboboxOptions.d.ts +0 -4
  155. package/Combobox/ComboboxOptions.mjs +0 -12
  156. package/Combobox/index.d.ts +0 -2
  157. package/Combobox/index.mjs +0 -4
  158. package/Combobox/package.json +0 -7
  159. package/Combobox-B0sHDL7X.js +0 -301
  160. package/Command/Command.d.ts +0 -80
  161. package/Command/Command.mjs +0 -116
  162. package/Command/index.d.ts +0 -1
  163. package/Command/index.mjs +0 -12
  164. package/Command/package.json +0 -7
  165. package/DataTable/DataTable.d.ts +0 -11
  166. package/DataTable/DataTable.mjs +0 -64
  167. package/DataTable/DataTable.types.d.ts +0 -11
  168. package/DataTable/DataTableColumnFilter.d.ts +0 -4
  169. package/DataTable/DataTableColumnFilter.mjs +0 -31
  170. package/DataTable/index.d.ts +0 -2
  171. package/DataTable/index.mjs +0 -4
  172. package/DataTable/package.json +0 -7
  173. package/DataTable/useDataTable.d.ts +0 -3
  174. package/DataTable/useDataTable.mjs +0 -30
  175. package/DatePicker/DatePicker.d.ts +0 -3
  176. package/DatePicker/DatePicker.mjs +0 -699
  177. package/DatePicker/DatePicker.types.d.ts +0 -5
  178. package/DatePicker/index.d.ts +0 -3
  179. package/DatePicker/index.mjs +0 -5
  180. package/DatePicker/package.json +0 -7
  181. package/Dialog/Dialog.d.ts +0 -21
  182. package/Dialog/Dialog.mjs +0 -117
  183. package/Dialog/index.d.ts +0 -1
  184. package/Dialog/index.mjs +0 -13
  185. package/Dialog/package.json +0 -7
  186. package/Drawer/Drawer.d.ts +0 -22
  187. package/Drawer/Drawer.mjs +0 -98
  188. package/Drawer/index.d.ts +0 -1
  189. package/Drawer/index.mjs +0 -13
  190. package/Drawer/package.json +0 -7
  191. package/DropdownMenu/DropdownMenu.d.ts +0 -27
  192. package/DropdownMenu/DropdownMenu.mjs +0 -148
  193. package/DropdownMenu/index.d.ts +0 -1
  194. package/DropdownMenu/index.mjs +0 -18
  195. package/DropdownMenu/package.json +0 -7
  196. package/Dropzone/Dropzone.d.ts +0 -22
  197. package/Dropzone/Dropzone.mjs +0 -152
  198. package/Dropzone/Dropzone.types.d.ts +0 -42
  199. package/Dropzone/DropzoneFilePreview.d.ts +0 -4
  200. package/Dropzone/DropzoneFilePreview.mjs +0 -9
  201. package/Dropzone/DropzoneSinglePickPreview.d.ts +0 -10
  202. package/Dropzone/DropzoneSinglePickPreview.mjs +0 -41
  203. package/Dropzone/DropzoneUtils.d.ts +0 -5
  204. package/Dropzone/DropzoneUtils.mjs +0 -24
  205. package/Dropzone/index.d.ts +0 -2
  206. package/Dropzone/index.mjs +0 -7
  207. package/Dropzone/package.json +0 -7
  208. package/DropzoneFilePreview-Dhtv8F4u.js +0 -67
  209. package/Form/Form.d.ts +0 -23
  210. package/Form/Form.mjs +0 -98
  211. package/Form/FormRenderControl.d.ts +0 -4
  212. package/Form/FormRenderControl.mjs +0 -21
  213. package/Form/FormRenderControl.types.d.ts +0 -16
  214. package/Form/index.d.ts +0 -3
  215. package/Form/index.mjs +0 -13
  216. package/Form/package.json +0 -7
  217. package/FormCheckbox/FormCheckbox.d.ts +0 -4
  218. package/FormCheckbox/FormCheckbox.mjs +0 -30
  219. package/FormCheckbox/FormCheckbox.types.d.ts +0 -7
  220. package/FormCheckbox/index.d.ts +0 -2
  221. package/FormCheckbox/index.mjs +0 -4
  222. package/FormCheckbox/package.json +0 -7
  223. package/FormCombobox/FormCombobox.d.ts +0 -4
  224. package/FormCombobox/FormCombobox.mjs +0 -26
  225. package/FormCombobox/FormCombobox.types.d.ts +0 -6
  226. package/FormCombobox/index.d.ts +0 -2
  227. package/FormCombobox/index.mjs +0 -4
  228. package/FormCombobox/package.json +0 -7
  229. package/FormDatePicker/FormDatePicker.d.ts +0 -4
  230. package/FormDatePicker/FormDatePicker.mjs +0 -29
  231. package/FormDatePicker/FormDatePicker.types.d.ts +0 -6
  232. package/FormDatePicker/index.d.ts +0 -3
  233. package/FormDatePicker/index.mjs +0 -5
  234. package/FormDatePicker/package.json +0 -7
  235. package/FormDropzone/FormDropzone.d.ts +0 -4
  236. package/FormDropzone/FormDropzone.mjs +0 -19
  237. package/FormDropzone/FormDropzone.types.d.ts +0 -6
  238. package/FormDropzone/index.d.ts +0 -2
  239. package/FormDropzone/index.mjs +0 -4
  240. package/FormDropzone/package.json +0 -7
  241. package/FormInput/FormInput.d.ts +0 -7
  242. package/FormInput/FormInput.mjs +0 -40
  243. package/FormInput/FormInput.types.d.ts +0 -6
  244. package/FormInput/index.d.ts +0 -2
  245. package/FormInput/index.mjs +0 -4
  246. package/FormInput/package.json +0 -7
  247. package/FormRadio/FormRadio.d.ts +0 -4
  248. package/FormRadio/FormRadio.mjs +0 -40
  249. package/FormRadio/FormRadio.types.d.ts +0 -6
  250. package/FormRadio/index.d.ts +0 -2
  251. package/FormRadio/index.mjs +0 -4
  252. package/FormRadio/package.json +0 -7
  253. package/FormSelect/FormSelect.d.ts +0 -4
  254. package/FormSelect/FormSelect.mjs +0 -40
  255. package/FormSelect/FormSelect.types.d.ts +0 -6
  256. package/FormSelect/index.d.ts +0 -2
  257. package/FormSelect/index.mjs +0 -4
  258. package/FormSelect/package.json +0 -7
  259. package/FormTextarea/FormTextarea.d.ts +0 -4
  260. package/FormTextarea/FormTextarea.mjs +0 -27
  261. package/FormTextarea/FormTextarea.types.d.ts +0 -6
  262. package/FormTextarea/index.d.ts +0 -2
  263. package/FormTextarea/index.mjs +0 -4
  264. package/FormTextarea/package.json +0 -7
  265. package/Header/Header.d.ts +0 -4
  266. package/Header/Header.mjs +0 -26
  267. package/Header/Header.types.d.ts +0 -3
  268. package/Header/index.d.ts +0 -2
  269. package/Header/index.mjs +0 -5
  270. package/Header/package.json +0 -7
  271. package/HoverCard/HoverCard.d.ts +0 -6
  272. package/HoverCard/HoverCard.mjs +0 -23
  273. package/HoverCard/index.d.ts +0 -1
  274. package/HoverCard/index.mjs +0 -6
  275. package/HoverCard/package.json +0 -7
  276. package/Input/Input.d.ts +0 -6
  277. package/Input/Input.mjs +0 -73
  278. package/Input/Input.types.d.ts +0 -17
  279. package/Input/index.d.ts +0 -3
  280. package/Input/index.mjs +0 -7
  281. package/Input/inputVariants.d.ts +0 -3
  282. package/Input/inputVariants.mjs +0 -24
  283. package/Input/package.json +0 -7
  284. package/InputOTP/InputOTP.d.ts +0 -34
  285. package/InputOTP/InputOTP.mjs +0 -48
  286. package/InputOTP/index.d.ts +0 -1
  287. package/InputOTP/index.mjs +0 -7
  288. package/InputOTP/package.json +0 -7
  289. package/Label/Label.d.ts +0 -5
  290. package/Label/Label.mjs +0 -17
  291. package/Label/index.d.ts +0 -2
  292. package/Label/index.mjs +0 -6
  293. package/Label/labelVariants.d.ts +0 -1
  294. package/Label/labelVariants.mjs +0 -10
  295. package/Label/package.json +0 -7
  296. package/LazyLoader/LazyLoader.d.ts +0 -20
  297. package/LazyLoader/LazyLoader.mjs +0 -8
  298. package/LazyLoader/index.d.ts +0 -1
  299. package/LazyLoader/index.mjs +0 -5
  300. package/LazyLoader/package.json +0 -7
  301. package/LoadingMask/LoadingMask.d.ts +0 -4
  302. package/LoadingMask/LoadingMask.mjs +0 -21
  303. package/LoadingMask/LoadingMask.types.d.ts +0 -5
  304. package/LoadingMask/RenderLoadingMask.d.ts +0 -3
  305. package/LoadingMask/RenderLoadingMask.mjs +0 -108
  306. package/LoadingMask/index.d.ts +0 -3
  307. package/LoadingMask/index.mjs +0 -6
  308. package/LoadingMask/package.json +0 -7
  309. package/LoadingProgress/LoadingProgress.d.ts +0 -4
  310. package/LoadingProgress/LoadingProgress.mjs +0 -37
  311. package/LoadingProgress/LoadingProgress.types.d.ts +0 -8
  312. package/LoadingProgress/index.d.ts +0 -3
  313. package/LoadingProgress/index.mjs +0 -6
  314. package/LoadingProgress/loadingProgressVariants.d.ts +0 -4
  315. package/LoadingProgress/loadingProgressVariants.mjs +0 -24
  316. package/LoadingProgress/package.json +0 -7
  317. package/Menubar/Menubar.d.ts +0 -28
  318. package/Menubar/Menubar.mjs +0 -175
  319. package/Menubar/index.d.ts +0 -1
  320. package/Menubar/index.mjs +0 -19
  321. package/Menubar/package.json +0 -7
  322. package/NavigationMenu/NavigationMenu.d.ts +0 -11
  323. package/NavigationMenu/NavigationMenu.mjs +0 -101
  324. package/NavigationMenu/index.d.ts +0 -2
  325. package/NavigationMenu/index.mjs +0 -13
  326. package/NavigationMenu/navigationMenuVariants.d.ts +0 -1
  327. package/NavigationMenu/navigationMenuVariants.mjs +0 -7
  328. package/NavigationMenu/package.json +0 -7
  329. package/Pagination/Pagination.d.ts +0 -28
  330. package/Pagination/Pagination.mjs +0 -106
  331. package/Pagination/index.d.ts +0 -1
  332. package/Pagination/index.mjs +0 -10
  333. package/Pagination/package.json +0 -7
  334. package/Popover/Popover.d.ts +0 -7
  335. package/Popover/Popover.mjs +0 -28
  336. package/Popover/index.d.ts +0 -1
  337. package/Popover/index.mjs +0 -7
  338. package/Popover/package.json +0 -7
  339. package/Progress/Progress.d.ts +0 -4
  340. package/Progress/Progress.mjs +0 -26
  341. package/Progress/index.d.ts +0 -1
  342. package/Progress/index.mjs +0 -4
  343. package/Progress/package.json +0 -7
  344. package/Radio/Radio.d.ts +0 -4
  345. package/Radio/Radio.mjs +0 -12
  346. package/Radio/Radio.types.d.ts +0 -11
  347. package/Radio/index.d.ts +0 -2
  348. package/Radio/index.mjs +0 -4
  349. package/Radio/package.json +0 -7
  350. package/RadioGroup/RadioGroup.d.ts +0 -11
  351. package/RadioGroup/RadioGroup.mjs +0 -49
  352. package/RadioGroup/index.d.ts +0 -1
  353. package/RadioGroup/index.mjs +0 -6
  354. package/RadioGroup/package.json +0 -7
  355. package/Resizable/Resizable.d.ts +0 -23
  356. package/Resizable/Resizable.mjs +0 -36
  357. package/Resizable/index.d.ts +0 -1
  358. package/Resizable/index.mjs +0 -6
  359. package/Resizable/package.json +0 -7
  360. package/ScrollArea/ScrollArea.d.ts +0 -5
  361. package/ScrollArea/ScrollArea.mjs +0 -51
  362. package/ScrollArea/index.d.ts +0 -1
  363. package/ScrollArea/index.mjs +0 -5
  364. package/ScrollArea/package.json +0 -7
  365. package/Search/Search.d.ts +0 -4
  366. package/Search/Search.mjs +0 -30
  367. package/Search/Search.types.d.ts +0 -6
  368. package/Search/index.d.ts +0 -3
  369. package/Search/index.mjs +0 -5
  370. package/Search/package.json +0 -7
  371. package/Select/Select.d.ts +0 -3
  372. package/Select/Select.mjs +0 -103
  373. package/Select/Select.types.d.ts +0 -37
  374. package/Select/SelectRoot.d.ts +0 -13
  375. package/Select/SelectRoot.mjs +0 -126
  376. package/Select/index.d.ts +0 -3
  377. package/Select/index.mjs +0 -15
  378. package/Select/package.json +0 -7
  379. package/Separator/Separator.d.ts +0 -4
  380. package/Separator/Separator.mjs +0 -24
  381. package/Separator/index.d.ts +0 -1
  382. package/Separator/index.mjs +0 -4
  383. package/Separator/package.json +0 -7
  384. package/Sheet/Sheet.d.ts +0 -28
  385. package/Sheet/Sheet.mjs +0 -110
  386. package/Sheet/index.d.ts +0 -1
  387. package/Sheet/index.mjs +0 -13
  388. package/Sheet/package.json +0 -7
  389. package/Sidebar/Sidebar.d.ts +0 -66
  390. package/Sidebar/Sidebar.mjs +0 -543
  391. package/Sidebar/index.d.ts +0 -1
  392. package/Sidebar/index.mjs +0 -27
  393. package/Sidebar/package.json +0 -7
  394. package/Skeleton/Skeleton.d.ts +0 -4
  395. package/Skeleton/Skeleton.mjs +0 -17
  396. package/Skeleton/index.d.ts +0 -1
  397. package/Skeleton/index.mjs +0 -4
  398. package/Skeleton/package.json +0 -7
  399. package/Slider/Slider.d.ts +0 -4
  400. package/Slider/Slider.mjs +0 -23
  401. package/Slider/index.d.ts +0 -1
  402. package/Slider/index.mjs +0 -4
  403. package/Slider/package.json +0 -7
  404. package/Sonner/Sonner.d.ts +0 -5
  405. package/Sonner/Sonner.mjs +0 -25
  406. package/Sonner/index.d.ts +0 -1
  407. package/Sonner/index.mjs +0 -4
  408. package/Sonner/package.json +0 -7
  409. package/Switch/Switch.d.ts +0 -4
  410. package/Switch/Switch.mjs +0 -27
  411. package/Switch/index.d.ts +0 -1
  412. package/Switch/index.mjs +0 -4
  413. package/Switch/package.json +0 -7
  414. package/Table/Table.d.ts +0 -10
  415. package/Table/Table.mjs +0 -90
  416. package/Table/index.d.ts +0 -1
  417. package/Table/index.mjs +0 -11
  418. package/Table/package.json +0 -7
  419. package/TablePagination/TablePagination.d.ts +0 -16
  420. package/TablePagination/TablePagination.mjs +0 -74
  421. package/TablePagination/index.d.ts +0 -1
  422. package/TablePagination/index.mjs +0 -4
  423. package/TablePagination/package.json +0 -7
  424. package/Tabs/Tabs.d.ts +0 -5
  425. package/Tabs/Tabs.mjs +0 -23
  426. package/Tabs/Tabs.types.d.ts +0 -12
  427. package/Tabs/TabsRoot.d.ts +0 -7
  428. package/Tabs/TabsRoot.mjs +0 -46
  429. package/Tabs/index.d.ts +0 -2
  430. package/Tabs/index.mjs +0 -10
  431. package/Tabs/package.json +0 -7
  432. package/Textarea/Textarea.d.ts +0 -4
  433. package/Textarea/Textarea.mjs +0 -74
  434. package/Textarea/Textarea.types.d.ts +0 -18
  435. package/Textarea/index.d.ts +0 -2
  436. package/Textarea/index.mjs +0 -4
  437. package/Textarea/package.json +0 -7
  438. package/Textarea/useAutosizeTextArea.d.ts +0 -3
  439. package/Textarea/useAutosizeTextArea.mjs +0 -20
  440. package/Theme/ThemeModeToggle.d.ts +0 -8
  441. package/Theme/ThemeModeToggle.mjs +0 -48
  442. package/Theme/ThemeProvider.d.ts +0 -4
  443. package/Theme/ThemeProvider.mjs +0 -27
  444. package/Theme/index.d.ts +0 -2
  445. package/Theme/index.mjs +0 -6
  446. package/Theme/package.json +0 -7
  447. package/Toast/Toast.d.ts +0 -13
  448. package/Toast/Toast.mjs +0 -80
  449. package/Toast/Toast.types.d.ts +0 -34
  450. package/Toast/index.d.ts +0 -3
  451. package/Toast/index.mjs +0 -15
  452. package/Toast/package.json +0 -7
  453. package/Toast/toast.constants.d.ts +0 -6
  454. package/Toast/toast.constants.mjs +0 -9
  455. package/Toast/toastVariants.d.ts +0 -3
  456. package/Toast/toastVariants.mjs +0 -21
  457. package/Toast/useToast.d.ts +0 -16
  458. package/Toast/useToast.mjs +0 -101
  459. package/Toaster/Toaster.d.ts +0 -1
  460. package/Toaster/Toaster.mjs +0 -22
  461. package/Toaster/index.d.ts +0 -1
  462. package/Toaster/index.mjs +0 -4
  463. package/Toaster/package.json +0 -7
  464. package/Toggle/Toggle.d.ts +0 -12
  465. package/Toggle/Toggle.mjs +0 -37
  466. package/Toggle/index.d.ts +0 -1
  467. package/Toggle/index.mjs +0 -5
  468. package/Toggle/package.json +0 -7
  469. package/ToggleGroup/ToggleGroup.d.ts +0 -12
  470. package/ToggleGroup/ToggleGroup.mjs +0 -41
  471. package/ToggleGroup/index.d.ts +0 -1
  472. package/ToggleGroup/index.mjs +0 -5
  473. package/ToggleGroup/package.json +0 -7
  474. package/Tooltip/package.json +0 -7
  475. package/index.css +0 -1
  476. package/index.d.ts +0 -68
  477. package/index.mjs +0 -367
  478. package/tailwind.config.mjs +0 -148
  479. /package/{Tooltip/TooltipRoot.mjs → dist/Tooltip/TooltipRoot.js} +0 -0
@@ -1,152 +0,0 @@
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
- };
@@ -1,42 +0,0 @@
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
- }
@@ -1,4 +0,0 @@
1
- import { FilePreviewProps } from './Dropzone.types';
2
- import { FC } from 'react';
3
-
4
- export declare const FilePreview: FC<FilePreviewProps>;
@@ -1,9 +0,0 @@
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
- };
@@ -1,10 +0,0 @@
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 {};
@@ -1,41 +0,0 @@
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
- };
@@ -1,5 +0,0 @@
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;
@@ -1,24 +0,0 @@
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
- };
@@ -1,2 +0,0 @@
1
- export * from './Dropzone';
2
- export * from './Dropzone.types';
@@ -1,7 +0,0 @@
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
- };
@@ -1,7 +0,0 @@
1
- {
2
- "sideEffects": false,
3
- "main": "./index.mjs",
4
- "module": "./index.mjs",
5
- "default": "./index.mjs",
6
- "types": "./index.d.ts"
7
- }
@@ -1,67 +0,0 @@
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 DELETED
@@ -1,23 +0,0 @@
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 DELETED
@@ -1,98 +0,0 @@
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
- };
@@ -1,4 +0,0 @@
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;
@@ -1,21 +0,0 @@
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
- };
@@ -1,16 +0,0 @@
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'>;
package/Form/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from './Form';
2
- export * from './FormRenderControl';
3
- export type * from './FormRenderControl.types';
package/Form/index.mjs DELETED
@@ -1,13 +0,0 @@
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
- };
package/Form/package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "sideEffects": false,
3
- "main": "./index.mjs",
4
- "module": "./index.mjs",
5
- "default": "./index.mjs",
6
- "types": "./index.d.ts"
7
- }
@@ -1,4 +0,0 @@
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;
@@ -1,30 +0,0 @@
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
- };
@@ -1,7 +0,0 @@
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
- }
@@ -1,2 +0,0 @@
1
- export * from './FormCheckbox';
2
- export type * from './FormCheckbox.types';
@@ -1,4 +0,0 @@
1
- import { FormCheckbox as e } from "./FormCheckbox.mjs";
2
- export {
3
- e as FormCheckbox
4
- };
@@ -1,7 +0,0 @@
1
- {
2
- "sideEffects": false,
3
- "main": "./index.mjs",
4
- "module": "./index.mjs",
5
- "default": "./index.mjs",
6
- "types": "./index.d.ts"
7
- }
@@ -1,4 +0,0 @@
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;