@oneplatformdev/ui 0.1.10-3 → 0.1.10-4

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 (217) hide show
  1. package/Accordion/index.js +7 -0
  2. package/{ui4.js → Alert/Alert.js} +1 -1
  3. package/Alert/index.js +6 -0
  4. package/{ui6.js → AlertDialog/AlertDialog.js} +1 -1
  5. package/AlertDialog/AlertDialog.stories.js +121 -0
  6. package/AlertDialog/AlertDialog.types.js +1 -0
  7. package/{ui5.js → AlertDialog/AlertDialogRoot.js} +33 -32
  8. package/AlertDialog/index.js +16 -0
  9. package/{ui7.js → AreaChart/AreaChart.js} +1 -1
  10. package/AreaChart/AreaChart.types.js +1 -0
  11. package/AreaChart/index.js +4 -0
  12. package/{ui8.js → Aside/Aside.js} +1 -1
  13. package/Aside/Aside.types.js +1 -0
  14. package/{ui9.js → Aside/AsideSidebar.js} +1 -1
  15. package/Aside/index.js +7 -0
  16. package/AspectRatio/index.js +5 -0
  17. package/Avatar/index.js +6 -0
  18. package/{ui12.js → Badge/Badge.js} +1 -1
  19. package/Badge/Badge.types.js +1 -0
  20. package/Badge/index.js +6 -0
  21. package/Breadcrumb/index.js +10 -0
  22. package/{ui15.js → Button/Button.js} +6 -5
  23. package/Button/Button.stories.js +20 -0
  24. package/Button/Button.types.js +1 -0
  25. package/Button/index.js +7 -0
  26. package/{ui17.js → ButtonIcon/ButtonIcon.js} +5 -4
  27. package/ButtonIcon/ButtonIcon.stories.js +126 -0
  28. package/ButtonIcon/ButtonIcon.types.js +1 -0
  29. package/ButtonIcon/index.js +7 -0
  30. package/CHANGELOG.md +8 -0
  31. package/{ui19.js → Calendar/Calendar.js} +2 -1
  32. package/Calendar/index.js +4 -0
  33. package/Card/index.js +9 -0
  34. package/{ui21.js → Carousel/Carousel.js} +7 -6
  35. package/Carousel/index.js +8 -0
  36. package/Chart/index.js +9 -0
  37. package/{ui23.js → Checkbox/Checkbox.js} +19 -18
  38. package/Checkbox/Checkbox.types.js +1 -0
  39. package/Checkbox/index.js +5 -0
  40. package/Collapsible/index.js +6 -0
  41. package/{ui25.js → Combobox/Combobox.js} +38 -36
  42. package/Combobox/Combobox.types.js +1 -0
  43. package/Combobox/ComboboxOptionItem.d.ts +1 -1
  44. package/Combobox/ComboboxOptionItem.d.ts.map +1 -1
  45. package/{ui98.js → Combobox/ComboboxOptionItem.js} +16 -17
  46. package/Combobox/ComboboxOptions.js +64 -0
  47. package/Combobox/index.js +4 -0
  48. package/{ui26.js → Command/Command.js} +20 -19
  49. package/Command/index.js +12 -0
  50. package/{ui27.js → DataTable/DataTable.js} +13 -12
  51. package/DataTable/DataTable.types.js +1 -0
  52. package/DataTable/DataTableColumnFilter.js +31 -0
  53. package/DataTable/index.js +4 -0
  54. package/DataTable/useDataTable.js +30 -0
  55. package/{ui28.js → DatePicker/DatePicker.js} +15 -14
  56. package/DatePicker/DatePicker.types.js +1 -0
  57. package/DatePicker/index.js +5 -0
  58. package/{ui29.js → Dialog/Dialog.js} +1 -1
  59. package/Dialog/index.js +17 -0
  60. package/Drawer/index.js +13 -0
  61. package/{ui32.js → DropdownMenu/DropdownMenu.js} +5 -5
  62. package/DropdownMenu/index.js +18 -0
  63. package/{ui85.js → Dropzone/Dropzone.js} +5 -5
  64. package/{ui93.js → Dropzone/DropzoneFilePreview.js} +2 -2
  65. package/{ui94.js → Dropzone/DropzoneSinglePickPreview.js} +1 -1
  66. package/Dropzone/index.js +7 -0
  67. package/{ui33.js → Form/Form.js} +9 -8
  68. package/{ui34.js → Form/FormRenderControl.js} +1 -1
  69. package/Form/FormRenderControl.types.js +1 -0
  70. package/Form/index.js +13 -0
  71. package/{ui35.js → FormCheckbox/FormCheckbox.js} +5 -5
  72. package/FormCheckbox/FormCheckbox.types.js +1 -0
  73. package/FormCheckbox/index.js +4 -0
  74. package/{ui36.js → FormCombobox/FormCombobox.js} +5 -5
  75. package/FormCombobox/FormCombobox.types.js +1 -0
  76. package/FormCombobox/index.js +4 -0
  77. package/{ui37.js → FormDatePicker/FormDatePicker.js} +5 -5
  78. package/FormDatePicker/FormDatePicker.types.js +1 -0
  79. package/FormDatePicker/index.js +5 -0
  80. package/FormDropzone/FormDropzone.js +19 -0
  81. package/FormDropzone/FormDropzone.types.js +1 -0
  82. package/FormDropzone/index.js +4 -0
  83. package/{ui38.js → FormInput/FormInput.js} +7 -7
  84. package/FormInput/FormInput.types.js +1 -0
  85. package/FormInput/index.js +4 -0
  86. package/FormRadio/FormRadio.js +40 -0
  87. package/FormRadio/FormRadio.types.d.ts +1 -1
  88. package/FormRadio/FormRadio.types.js +1 -0
  89. package/FormRadio/index.js +4 -0
  90. package/FormSelect/FormSelect.js +40 -0
  91. package/FormSelect/FormSelect.types.js +1 -0
  92. package/FormSelect/index.js +4 -0
  93. package/{ui40.js → FormTextarea/FormTextarea.js} +5 -5
  94. package/FormTextarea/FormTextarea.types.js +1 -0
  95. package/FormTextarea/index.js +4 -0
  96. package/{ui41.js → Header/Header.js} +2 -2
  97. package/Header/Header.types.js +1 -0
  98. package/Header/index.js +5 -0
  99. package/HoverCard/index.js +6 -0
  100. package/{ui43.js → Input/Input.js} +1 -1
  101. package/Input/Input.types.js +1 -0
  102. package/Input/index.js +7 -0
  103. package/InputOTP/index.js +7 -0
  104. package/{ui45.js → Label/Label.js} +1 -1
  105. package/Label/index.js +6 -0
  106. package/LazyLoader/LazyLoader.js +8 -0
  107. package/LazyLoader/index.js +5 -0
  108. package/LoadedIcon/index.js +4 -0
  109. package/{ui49.js → LoadingMask/LoadingMask.js} +1 -1
  110. package/LoadingMask/LoadingMask.types.js +1 -0
  111. package/LoadingMask/index.js +6 -0
  112. package/{ui51.js → LoadingProgress/LoadingProgress.js} +1 -1
  113. package/LoadingProgress/LoadingProgress.types.js +1 -0
  114. package/LoadingProgress/index.js +6 -0
  115. package/{ui53.js → Menubar/Menubar.js} +4 -4
  116. package/Menubar/index.js +19 -0
  117. package/{ui54.js → NavigationMenu/NavigationMenu.js} +1 -1
  118. package/NavigationMenu/index.js +13 -0
  119. package/{ui56.js → Pagination/Pagination.js} +2 -1
  120. package/Pagination/index.js +10 -0
  121. package/{ui57.js → Popover/Popover.js} +1 -1
  122. package/Popover/index.js +7 -0
  123. package/Progress/index.js +4 -0
  124. package/Radio/Radio.js +12 -0
  125. package/Radio/Radio.types.js +1 -0
  126. package/Radio/index.js +4 -0
  127. package/{ui59.js → RadioGroup/RadioGroup.js} +1 -1
  128. package/RadioGroup/index.js +6 -0
  129. package/Resizable/index.js +6 -0
  130. package/ScrollArea/index.js +5 -0
  131. package/{ui62.js → Search/Search.js} +9 -9
  132. package/Search/Search.types.js +1 -0
  133. package/Search/index.js +5 -0
  134. package/{ui64.js → Select/Select.js} +25 -24
  135. package/Select/Select.stories.js +41 -0
  136. package/Select/Select.types.js +1 -0
  137. package/{ui63.js → Select/SelectRoot.js} +3 -3
  138. package/Select/index.js +15 -0
  139. package/Separator/index.js +4 -0
  140. package/Sheet/index.js +13 -0
  141. package/{ui67.js → Sidebar/Sidebar.js} +16 -15
  142. package/Sidebar/index.js +27 -0
  143. package/Skeleton/index.js +4 -0
  144. package/Slider/index.js +4 -0
  145. package/Sonner/index.js +4 -0
  146. package/Switch/index.js +4 -0
  147. package/Table/index.js +11 -0
  148. package/{ui88.js → TablePagination/TablePagination.js} +16 -14
  149. package/TablePagination/index.js +4 -0
  150. package/{ui74.js → Tabs/Tabs.js} +1 -1
  151. package/Tabs/Tabs.types.js +1 -0
  152. package/Tabs/index.js +10 -0
  153. package/{ui75.js → Textarea/Textarea.js} +1 -1
  154. package/Textarea/Textarea.types.js +1 -0
  155. package/Textarea/index.js +4 -0
  156. package/Textarea/useAutosizeTextArea.d.ts +1 -1
  157. package/{ui77.js → Theme/ThemeModeToggle.js} +6 -5
  158. package/Theme/index.js +6 -0
  159. package/{ui78.js → Toast/Toast.js} +1 -1
  160. package/Toast/Toast.types.js +1 -0
  161. package/Toast/index.js +15 -0
  162. package/Toast/toast.constants.js +9 -0
  163. package/{ui80.js → Toaster/Toaster.js} +2 -2
  164. package/Toaster/index.js +4 -0
  165. package/Toggle/index.js +5 -0
  166. package/{ui82.js → ToggleGroup/ToggleGroup.js} +1 -1
  167. package/ToggleGroup/index.js +5 -0
  168. package/{ui84.js → Tooltip/Tooltip.js} +1 -1
  169. package/Tooltip/Tooltip.types.js +1 -0
  170. package/Tooltip/index.js +9 -0
  171. package/{ui97.js → hooks/dist/useIsMobile/useIsMobile.js} +5 -5
  172. package/{ui.js → index.js} +87 -87
  173. package/package.json +6 -16
  174. package/ui39.js +0 -39
  175. package/ui47.js +0 -7
  176. package/ui87.js +0 -19
  177. package/ui91.js +0 -63
  178. /package/{ui3.js → Accordion/Accordion.js} +0 -0
  179. /package/{ui89.js → Alert/alertVariants.js} +0 -0
  180. /package/{ui10.js → AspectRatio/AspectRatio.js} +0 -0
  181. /package/{ui11.js → Avatar/Avatar.js} +0 -0
  182. /package/{ui13.js → Badge/badgeVariants.js} +0 -0
  183. /package/{ui14.js → Breadcrumb/Breadcrumb.js} +0 -0
  184. /package/{ui16.js → Button/buttonVariants.js} +0 -0
  185. /package/{ui18.js → ButtonIcon/buttonIconVariants.js} +0 -0
  186. /package/{ui20.js → Card/Card.js} +0 -0
  187. /package/{ui22.js → Chart/Chart.js} +0 -0
  188. /package/{ui24.js → Collapsible/Collapsible.js} +0 -0
  189. /package/{ui30.js → Dialog/DialogOverlayScope.js} +0 -0
  190. /package/{ui31.js → Drawer/Drawer.js} +0 -0
  191. /package/{ui86.js → Dropzone/Dropzone.types.js} +0 -0
  192. /package/{ui95.js → Dropzone/DropzoneUtils.js} +0 -0
  193. /package/{ui42.js → HoverCard/HoverCard.js} +0 -0
  194. /package/{ui90.js → Input/inputVariants.js} +0 -0
  195. /package/{ui44.js → InputOTP/InputOTP.js} +0 -0
  196. /package/{ui46.js → Label/labelVariants.js} +0 -0
  197. /package/{ui48.js → LoadedIcon/LoadedIcon.js} +0 -0
  198. /package/{ui50.js → LoadingMask/RenderLoadingMask.js} +0 -0
  199. /package/{ui52.js → LoadingProgress/loadingProgressVariants.js} +0 -0
  200. /package/{ui55.js → NavigationMenu/navigationMenuVariants.js} +0 -0
  201. /package/{ui58.js → Progress/Progress.js} +0 -0
  202. /package/{ui60.js → Resizable/Resizable.js} +0 -0
  203. /package/{ui61.js → ScrollArea/ScrollArea.js} +0 -0
  204. /package/{ui65.js → Separator/Separator.js} +0 -0
  205. /package/{ui66.js → Sheet/Sheet.js} +0 -0
  206. /package/{ui68.js → Skeleton/Skeleton.js} +0 -0
  207. /package/{ui69.js → Slider/Slider.js} +0 -0
  208. /package/{ui70.js → Sonner/Sonner.js} +0 -0
  209. /package/{ui71.js → Switch/Switch.js} +0 -0
  210. /package/{ui72.js → Table/Table.js} +0 -0
  211. /package/{ui73.js → Tabs/TabsRoot.js} +0 -0
  212. /package/{ui96.js → Textarea/useAutosizeTextArea.js} +0 -0
  213. /package/{ui76.js → Theme/ThemeProvider.js} +0 -0
  214. /package/{ui92.js → Toast/toastVariants.js} +0 -0
  215. /package/{ui79.js → Toast/useToast.js} +0 -0
  216. /package/{ui81.js → Toggle/Toggle.js} +0 -0
  217. /package/{ui83.js → Tooltip/TooltipRoot.js} +0 -0
@@ -1,10 +1,11 @@
1
1
  import { jsxs as i, jsx as l } from "react/jsx-runtime";
2
+ import { Button as m } from "../Button/Button.js";
3
+ import "../Button/buttonVariants.js";
4
+ import { DropdownMenu as h, DropdownMenuTrigger as p, DropdownMenuContent as g, DropdownMenuCheckboxItem as u } from "../DropdownMenu/DropdownMenu.js";
5
+ import { Table as C, TableHeader as f, TableRow as t, TableHead as w, TableBody as x, TableCell as o } from "../Table/Table.js";
2
6
  import { flexRender as d } from "@tanstack/react-table";
3
- import { ChevronDown as m } from "lucide-react";
4
- import { DropdownMenu as h, DropdownMenuTrigger as g, DropdownMenuContent as p, DropdownMenuCheckboxItem as u } from "./ui32.js";
5
- import { Button as C } from "./ui15.js";
6
- import { Table as f, TableHeader as w, TableRow as t, TableHead as x, TableBody as b, TableCell as o } from "./ui72.js";
7
- const R = ({
7
+ import { ChevronDown as b } from "lucide-react";
8
+ const k = ({
8
9
  table: r,
9
10
  ToolBar: a,
10
11
  tColumns: s = "Columns",
@@ -13,12 +14,12 @@ const R = ({
13
14
  /* @__PURE__ */ i("div", { className: "flex items-center py-4", children: [
14
15
  a,
15
16
  /* @__PURE__ */ i(h, { children: [
16
- /* @__PURE__ */ l(g, { asChild: !0, children: /* @__PURE__ */ i(C, { variant: "outline", className: "ml-auto", children: [
17
+ /* @__PURE__ */ l(p, { asChild: !0, children: /* @__PURE__ */ i(m, { variant: "outline", className: "ml-auto", children: [
17
18
  s,
18
19
  " ",
19
- /* @__PURE__ */ l(m, { className: "ml-2 h-4 w-4" })
20
+ /* @__PURE__ */ l(b, { className: "ml-2 h-4 w-4" })
20
21
  ] }) }),
21
- /* @__PURE__ */ l(p, { align: "end", children: r.getAllColumns().filter((e) => e.getCanHide()).map((e) => /* @__PURE__ */ l(
22
+ /* @__PURE__ */ l(g, { align: "end", children: r.getAllColumns().filter((e) => e.getCanHide()).map((e) => /* @__PURE__ */ l(
22
23
  u,
23
24
  {
24
25
  className: "capitalize",
@@ -30,12 +31,12 @@ const R = ({
30
31
  )) })
31
32
  ] })
32
33
  ] }),
33
- /* @__PURE__ */ l("div", { className: "rounded-md border", children: /* @__PURE__ */ i(f, { children: [
34
- /* @__PURE__ */ l(w, { children: r.getHeaderGroups().map((e) => /* @__PURE__ */ l(t, { children: e.headers.map((n) => /* @__PURE__ */ l(x, { children: n.isPlaceholder ? null : d(
34
+ /* @__PURE__ */ l("div", { className: "rounded-md border", children: /* @__PURE__ */ i(C, { children: [
35
+ /* @__PURE__ */ l(f, { children: r.getHeaderGroups().map((e) => /* @__PURE__ */ l(t, { children: e.headers.map((n) => /* @__PURE__ */ l(w, { children: n.isPlaceholder ? null : d(
35
36
  n.column.columnDef.header,
36
37
  n.getContext()
37
38
  ) }, n.id)) }, e.id)) }),
38
- /* @__PURE__ */ l(b, { children: r.getRowModel().rows?.length ? r.getRowModel().rows.map((e) => /* @__PURE__ */ l(
39
+ /* @__PURE__ */ l(x, { children: r.getRowModel().rows?.length ? r.getRowModel().rows.map((e) => /* @__PURE__ */ l(
39
40
  t,
40
41
  {
41
42
  "data-state": e.getIsSelected() && "selected",
@@ -56,5 +57,5 @@ const R = ({
56
57
  ] }) })
57
58
  ] });
58
59
  export {
59
- R as DataTable
60
+ k as DataTable
60
61
  };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,31 @@
1
+ import { jsx as n, jsxs as t } from "react/jsx-runtime";
2
+ import { ChevronDown as m } from "lucide-react";
3
+ import { useMemo as s } from "react";
4
+ import { Button as d } from "../Button/Button.js";
5
+ import "../Button/buttonVariants.js";
6
+ import { DropdownMenuCheckboxItem as c, DropdownMenu as u, DropdownMenuTrigger as h, DropdownMenuContent as p } from "../DropdownMenu/DropdownMenu.js";
7
+ const x = (i) => {
8
+ const {
9
+ table: r,
10
+ columnsLabel: l = "Columns"
11
+ } = i, o = s(() => r.getAllColumns().filter((e) => e.getCanHide()).map((e) => /* @__PURE__ */ n(
12
+ c,
13
+ {
14
+ className: "capitalize",
15
+ checked: e.getIsVisible(),
16
+ onCheckedChange: (a) => e.toggleVisibility(!!a),
17
+ children: e.id
18
+ },
19
+ e.id
20
+ )), [r]);
21
+ return o.length ? /* @__PURE__ */ t(u, { children: [
22
+ /* @__PURE__ */ n(h, { asChild: !0, children: /* @__PURE__ */ t(d, { variant: "outline", className: "ml-auto", children: [
23
+ l,
24
+ /* @__PURE__ */ n(m, { className: "ml-2 h-4 w-4" })
25
+ ] }) }),
26
+ /* @__PURE__ */ n(p, { align: "end", children: o })
27
+ ] }) : null;
28
+ };
29
+ export {
30
+ x as DataTableColumnFilter
31
+ };
@@ -0,0 +1,4 @@
1
+ import { DataTable as o } from "./DataTable.js";
2
+ export {
3
+ o as DataTable
4
+ };
@@ -0,0 +1,30 @@
1
+ import e from "react";
2
+ import { useReactTable as u, getFilteredRowModel as g, getSortedRowModel as d, getPaginationRowModel as m, getCoreRowModel as R } from "@tanstack/react-table";
3
+ const S = (t, o) => {
4
+ const [n, l] = e.useState([]), [i, a] = e.useState(
5
+ []
6
+ ), [r, s] = e.useState({});
7
+ return { table: u({
8
+ data: t,
9
+ columns: o,
10
+ onSortingChange: l,
11
+ onColumnFiltersChange: a,
12
+ getCoreRowModel: R(),
13
+ getPaginationRowModel: m(),
14
+ getSortedRowModel: d(),
15
+ getFilteredRowModel: g(),
16
+ onColumnVisibilityChange: s,
17
+ enableRowSelection: !0,
18
+ manualPagination: !0,
19
+ manualSorting: !0,
20
+ manualFiltering: !0,
21
+ state: {
22
+ sorting: n,
23
+ columnFilters: i,
24
+ columnVisibility: r
25
+ }
26
+ }) };
27
+ };
28
+ export {
29
+ S as useDataTable
30
+ };
@@ -1,32 +1,33 @@
1
- import { jsxs as o, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as e, jsx as r } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
3
  import { format as d } from "date-fns";
4
4
  import { Calendar as s } from "lucide-react";
5
5
  import { cn as c } from "@oneplatformdev/utils";
6
+ import { Button as f } from "../Button/Button.js";
7
+ import "../Button/buttonVariants.js";
8
+ import { Calendar as p } from "../Calendar/Calendar.js";
9
+ import { Popover as u, PopoverTrigger as h, PopoverContent as y } from "../Popover/Popover.js";
6
10
  import { uk as t } from "date-fns/locale";
7
- import { Button as f } from "./ui15.js";
8
- import { Calendar as p } from "./ui19.js";
9
- import { Popover as u, PopoverTrigger as h, PopoverContent as y } from "./ui57.js";
10
11
  const g = i.forwardRef(
11
- (a, l) => {
12
+ (a, m) => {
12
13
  const {
13
- selectedDate: e,
14
- onDateChange: m,
14
+ selectedDate: o,
15
+ onDateChange: l,
15
16
  disabled: n = !1
16
17
  } = a;
17
- return /* @__PURE__ */ o(u, { children: [
18
- /* @__PURE__ */ r(h, { asChild: !0, children: /* @__PURE__ */ o(
18
+ return /* @__PURE__ */ e(u, { children: [
19
+ /* @__PURE__ */ r(h, { asChild: !0, children: /* @__PURE__ */ e(
19
20
  f,
20
21
  {
21
- ref: l,
22
+ ref: m,
22
23
  disabled: n,
23
24
  variant: "outline-solid",
24
25
  className: c(
25
26
  "w-full justify-start text-left font-normal border h-10",
26
- !e && "text-muted-foreground"
27
+ !o && "text-muted-foreground"
27
28
  ),
28
29
  children: [
29
- e ? d(e, "LLL dd, y", { locale: t }) : /* @__PURE__ */ r("span", { children: "dd/mm/yyyy" }),
30
+ o ? d(o, "LLL dd, y", { locale: t }) : /* @__PURE__ */ r("span", { children: "dd/mm/yyyy" }),
30
31
  /* @__PURE__ */ r(s, { className: "mr-2 h-4 w-4 ml-auto" })
31
32
  ]
32
33
  }
@@ -36,8 +37,8 @@ const g = i.forwardRef(
36
37
  {
37
38
  mode: "single",
38
39
  captionLayout: "dropdown-buttons",
39
- selected: e,
40
- onSelect: m,
40
+ selected: o,
41
+ onSelect: l,
41
42
  fromYear: 1960,
42
43
  toYear: 2030,
43
44
  locale: t
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,5 @@
1
+ import { DatePicker as r, DatePicker as t } from "./DatePicker.js";
2
+ export {
3
+ r as DatePicker,
4
+ t as default
5
+ };
@@ -3,7 +3,7 @@ import i, { useState as y, useRef as N } from "react";
3
3
  import * as a from "@radix-ui/react-dialog";
4
4
  import { XIcon as D } from "lucide-react";
5
5
  import { cn as l, composeRefs as h } from "@oneplatformdev/utils";
6
- import { DialogOverlayScope as b } from "./ui30.js";
6
+ import { DialogOverlayScope as b } from "./DialogOverlayScope.js";
7
7
  const P = (e) => {
8
8
  const { modal: t, ...s } = e;
9
9
  return /* @__PURE__ */ o(a.Root, { modal: t, ...s });
@@ -0,0 +1,17 @@
1
+ import { Dialog as l, DialogClose as e, DialogContent as i, DialogDescription as r, DialogFooter as g, DialogHeader as D, DialogOverlay as t, DialogPortal as n, DialogTitle as C, DialogTrigger as p } from "./Dialog.js";
2
+ import { DialogOverlayContainerContext as y, DialogOverlayScope as O, useDialogOverlayContainer as s } from "./DialogOverlayScope.js";
3
+ export {
4
+ l as Dialog,
5
+ e as DialogClose,
6
+ i as DialogContent,
7
+ r as DialogDescription,
8
+ g as DialogFooter,
9
+ D as DialogHeader,
10
+ t as DialogOverlay,
11
+ y as DialogOverlayContainerContext,
12
+ O as DialogOverlayScope,
13
+ n as DialogPortal,
14
+ C as DialogTitle,
15
+ p as DialogTrigger,
16
+ s as useDialogOverlayContainer
17
+ };
@@ -0,0 +1,13 @@
1
+ import { Drawer as a, DrawerClose as D, DrawerContent as w, DrawerDescription as o, DrawerFooter as t, DrawerHeader as i, DrawerOverlay as l, DrawerPortal as n, DrawerTitle as g, DrawerTrigger as p } from "./Drawer.js";
2
+ export {
3
+ a as Drawer,
4
+ D as DrawerClose,
5
+ w as DrawerContent,
6
+ o as DrawerDescription,
7
+ t as DrawerFooter,
8
+ i as DrawerHeader,
9
+ l as DrawerOverlay,
10
+ n as DrawerPortal,
11
+ g as DrawerTitle,
12
+ p as DrawerTrigger
13
+ };
@@ -1,7 +1,7 @@
1
- import { jsx as n, jsxs as l } from "react/jsx-runtime";
1
+ import { jsxs as l, jsx as n } from "react/jsx-runtime";
2
2
  import * as d from "react";
3
3
  import * as e from "@radix-ui/react-dropdown-menu";
4
- import { Check as m, Circle as c, ChevronRight as p } from "lucide-react";
4
+ import { ChevronRight as m, Check as c, Circle as p } from "lucide-react";
5
5
  import { cn as s } from "@oneplatformdev/utils";
6
6
  const R = e.Root, I = e.Trigger, S = e.Group, C = e.Portal, z = e.Sub, k = e.RadioGroup, u = d.forwardRef(({ className: o, inset: t, children: a, ...r }, i) => /* @__PURE__ */ l(
7
7
  e.SubTrigger,
@@ -15,7 +15,7 @@ const R = e.Root, I = e.Trigger, S = e.Group, C = e.Portal, z = e.Sub, k = e.Rad
15
15
  ...r,
16
16
  children: [
17
17
  a,
18
- /* @__PURE__ */ n(p, { className: "ml-auto" })
18
+ /* @__PURE__ */ n(m, { className: "ml-auto" })
19
19
  ]
20
20
  }
21
21
  ));
@@ -70,7 +70,7 @@ const b = d.forwardRef(({ className: o, children: t, checked: a, ...r }, i) => /
70
70
  checked: a,
71
71
  ...r,
72
72
  children: [
73
- /* @__PURE__ */ n("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n(e.ItemIndicator, { children: /* @__PURE__ */ n(m, { className: "h-4 w-4" }) }) }),
73
+ /* @__PURE__ */ n("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n(e.ItemIndicator, { children: /* @__PURE__ */ n(c, { className: "h-4 w-4" }) }) }),
74
74
  t
75
75
  ]
76
76
  }
@@ -86,7 +86,7 @@ const h = d.forwardRef(({ className: o, children: t, ...a }, r) => /* @__PURE__
86
86
  ),
87
87
  ...a,
88
88
  children: [
89
- /* @__PURE__ */ n("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n(e.ItemIndicator, { children: /* @__PURE__ */ n(c, { className: "h-2 w-2 fill-current" }) }) }),
89
+ /* @__PURE__ */ n("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n(e.ItemIndicator, { children: /* @__PURE__ */ n(p, { className: "h-2 w-2 fill-current" }) }) }),
90
90
  t
91
91
  ]
92
92
  }
@@ -0,0 +1,18 @@
1
+ import { DropdownMenu as r, DropdownMenuCheckboxItem as e, DropdownMenuContent as u, DropdownMenuGroup as p, DropdownMenuItem as d, DropdownMenuLabel as w, DropdownMenuPortal as D, DropdownMenuRadioGroup as M, DropdownMenuRadioItem as t, DropdownMenuSeparator as a, DropdownMenuShortcut as b, DropdownMenuSub as S, DropdownMenuSubContent as g, DropdownMenuSubTrigger as i, DropdownMenuTrigger as m } from "./DropdownMenu.js";
2
+ export {
3
+ r as DropdownMenu,
4
+ e as DropdownMenuCheckboxItem,
5
+ u as DropdownMenuContent,
6
+ p as DropdownMenuGroup,
7
+ d as DropdownMenuItem,
8
+ w as DropdownMenuLabel,
9
+ D as DropdownMenuPortal,
10
+ M as DropdownMenuRadioGroup,
11
+ t as DropdownMenuRadioItem,
12
+ a as DropdownMenuSeparator,
13
+ b as DropdownMenuShortcut,
14
+ S as DropdownMenuSub,
15
+ g as DropdownMenuSubContent,
16
+ i as DropdownMenuSubTrigger,
17
+ m as DropdownMenuTrigger
18
+ };
@@ -3,11 +3,11 @@ import { X as H } from "lucide-react";
3
3
  import { forwardRef as O, useState as g, useImperativeHandle as X } from "react";
4
4
  import { useDropzone as Y } from "react-dropzone";
5
5
  import { cn as n } from "@oneplatformdev/utils";
6
- import { Card as q } from "./ui20.js";
7
- import { DEFAULT_FILE_TYPES as G } from "./ui86.js";
8
- import { FilePreview as J } from "./ui93.js";
9
- import { DropzoneSinglePickPreview as K } from "./ui94.js";
10
- import { DefaultFileIcon as Q, isFile as v, extractName as R } from "./ui95.js";
6
+ import { Card as q } from "../Card/Card.js";
7
+ import { DEFAULT_FILE_TYPES as G } from "./Dropzone.types.js";
8
+ import { FilePreview as J } from "./DropzoneFilePreview.js";
9
+ import { DropzoneSinglePickPreview as K } from "./DropzoneSinglePickPreview.js";
10
+ import { DefaultFileIcon as Q, isFile as v, extractName as R } from "./DropzoneUtils.js";
11
11
  const Z = O(
12
12
  ({
13
13
  acceptTypes: w = G,
@@ -1,8 +1,8 @@
1
1
  import { jsx as n, jsxs as d } from "react/jsx-runtime";
2
2
  import { useState as u, useEffect as f } from "react";
3
3
  import { File as m } from "lucide-react";
4
- import { DEFAULT_IMAGES_TYPES as p } from "./ui86.js";
5
- import { isFile as a } from "./ui95.js";
4
+ import { DEFAULT_IMAGES_TYPES as p } from "./Dropzone.types.js";
5
+ import { isFile as a } from "./DropzoneUtils.js";
6
6
  import { cn as t } from "@oneplatformdev/utils";
7
7
  const N = ({ item: e, styles: s }) => {
8
8
  const [c, r] = u(null), i = a(e) && p.includes(e.type);
@@ -1,6 +1,6 @@
1
1
  import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
2
  import { useMemo as c } from "react";
3
- import { isFile as u } from "./ui95.js";
3
+ import { isFile as u } from "./DropzoneUtils.js";
4
4
  import { X as f, FileIcon as d } from "lucide-react";
5
5
  const m = (e) => {
6
6
  if (!e) return "";
@@ -0,0 +1,7 @@
1
+ import { Dropzone as r } from "./Dropzone.js";
2
+ import { DEFAULT_FILE_TYPES as _, DEFAULT_IMAGES_TYPES as e } from "./Dropzone.types.js";
3
+ export {
4
+ _ as DEFAULT_FILE_TYPES,
5
+ e as DEFAULT_IMAGES_TYPES,
6
+ r as Dropzone
7
+ };
@@ -1,15 +1,16 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import * as m from "react";
3
3
  import { Slot as F } from "@radix-ui/react-slot";
4
- import { FormProvider as u, useFormContext as p, Controller as x } from "react-hook-form";
4
+ import { useFormContext as u, Controller as p, FormProvider as x } from "react-hook-form";
5
5
  import { cn as a } from "@oneplatformdev/utils";
6
- import { Label as I } from "./ui45.js";
7
- const D = u, l = m.createContext(
6
+ import { Label as I } from "../Label/Label.js";
7
+ import "../Label/labelVariants.js";
8
+ const M = x, l = m.createContext(
8
9
  {}
9
- ), M = ({
10
+ ), S = ({
10
11
  ...e
11
- }) => /* @__PURE__ */ n(l.Provider, { value: { name: e.name }, children: /* @__PURE__ */ n(x, { ...e }) }), c = () => {
12
- const e = m.useContext(l), t = m.useContext(f), { getFieldState: o, formState: r } = p(), i = o(e.name, r);
12
+ }) => /* @__PURE__ */ n(l.Provider, { value: { name: e.name }, children: /* @__PURE__ */ n(p, { ...e }) }), c = () => {
13
+ const e = m.useContext(l), t = m.useContext(f), { getFieldState: o, formState: r } = u(), i = o(e.name, r);
13
14
  if (!e)
14
15
  throw new Error("useFormField should be used within <FormField>");
15
16
  const { id: s } = t;
@@ -86,10 +87,10 @@ const w = m.forwardRef(({ className: e, children: t, ...o }, r) => {
86
87
  });
87
88
  w.displayName = "FormMessage";
88
89
  export {
89
- D as Form,
90
+ M as Form,
90
91
  g as FormControl,
91
92
  N as FormDescription,
92
- M as FormField,
93
+ S as FormField,
93
94
  v as FormItem,
94
95
  C as FormLabel,
95
96
  w as FormMessage,
@@ -1,5 +1,5 @@
1
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 "./ui33.js";
2
+ import { FormField as d, FormItem as i, FormLabel as F, FormMessage as p } from "./Form.js";
3
3
  const b = (e) => {
4
4
  const { form: n, name: m, label: o, render: t, containerProps: l = {}, ...s } = e;
5
5
  return /* @__PURE__ */ r(
@@ -0,0 +1 @@
1
+
package/Form/index.js 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.js";
2
+ import { FormRenderControl as p } from "./FormRenderControl.js";
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
+ };
@@ -1,15 +1,15 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { FormRenderControl as a } from "./ui34.js";
3
- import { FormControl as l } from "./ui33.js";
4
- import { CheckboxLabel as k } from "./ui23.js";
2
+ import { FormControl as a } from "../Form/Form.js";
3
+ import { FormRenderControl as l } from "../Form/FormRenderControl.js";
4
+ import { CheckboxLabel as k } from "../Checkbox/Checkbox.js";
5
5
  const f = (m) => {
6
6
  const { form: t, label: c, name: h, onCheckedChange: C, ...r } = m;
7
7
  return /* @__PURE__ */ e(
8
- a,
8
+ l,
9
9
  {
10
10
  form: t,
11
11
  name: h,
12
- render: ({ field: o }) => /* @__PURE__ */ e(l, { children: /* @__PURE__ */ e(
12
+ render: ({ field: o }) => /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(
13
13
  k,
14
14
  {
15
15
  ...o,
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,4 @@
1
+ import { FormCheckbox as e } from "./FormCheckbox.js";
2
+ export {
3
+ e as FormCheckbox
4
+ };
@@ -1,7 +1,7 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { Combobox as b } from "./ui25.js";
3
- import { FormRenderControl as p } from "./ui34.js";
4
- import { FormControl as a } from "./ui33.js";
2
+ import { FormControl as b } from "../Form/Form.js";
3
+ import { FormRenderControl as p } from "../Form/FormRenderControl.js";
4
+ import { Combobox as a } from "../Combobox/Combobox.js";
5
5
  const x = (m) => {
6
6
  const { form: n, label: e, name: t, ...C } = m;
7
7
  return /* @__PURE__ */ o(
@@ -10,8 +10,8 @@ const x = (m) => {
10
10
  form: n,
11
11
  label: e,
12
12
  name: t,
13
- render: ({ field: r }) => /* @__PURE__ */ o(a, { children: /* @__PURE__ */ o(
14
- b,
13
+ render: ({ field: r }) => /* @__PURE__ */ o(b, { children: /* @__PURE__ */ o(
14
+ a,
15
15
  {
16
16
  ...C,
17
17
  ...r,
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,4 @@
1
+ import { FormCombobox as r } from "./FormCombobox.js";
2
+ export {
3
+ r as FormCombobox
4
+ };
@@ -1,16 +1,16 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { DatePicker as l } from "./ui28.js";
3
- import { FormRenderControl as p } from "./ui34.js";
4
- import { FormControl as s } from "./ui33.js";
2
+ import { DatePicker as l } from "../DatePicker/DatePicker.js";
3
+ import { FormControl as p } from "../Form/Form.js";
4
+ import { FormRenderControl as s } from "../Form/FormRenderControl.js";
5
5
  const g = (t) => {
6
6
  const { form: n, name: m, label: a, onDateChange: c, ...i } = t;
7
7
  return /* @__PURE__ */ o(
8
- p,
8
+ s,
9
9
  {
10
10
  form: n,
11
11
  name: m,
12
12
  label: a,
13
- render: ({ field: r }) => /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(
13
+ render: ({ field: r }) => /* @__PURE__ */ o(p, { children: /* @__PURE__ */ o(
14
14
  l,
15
15
  {
16
16
  ...r,
@@ -0,0 +1,5 @@
1
+ import { FormDatePicker as a, FormDatePicker as o } from "./FormDatePicker.js";
2
+ export {
3
+ a as FormDatePicker,
4
+ o as default
5
+ };
@@ -0,0 +1,19 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { FormControl as a } from "../Form/Form.js";
3
+ import { FormRenderControl as l } from "../Form/FormRenderControl.js";
4
+ import { Dropzone as f } from "../Dropzone/Dropzone.js";
5
+ const h = (n) => {
6
+ const { form: e, label: m, name: t, ...p } = n;
7
+ return /* @__PURE__ */ o(
8
+ l,
9
+ {
10
+ form: e,
11
+ label: m,
12
+ name: t,
13
+ render: ({ field: r }) => /* @__PURE__ */ o(a, { children: /* @__PURE__ */ o(f, { ...p, ...r, onChangeValue: r.onChange }) })
14
+ }
15
+ );
16
+ };
17
+ export {
18
+ h as FormDropzone
19
+ };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,4 @@
1
+ import { FormDropzone as e } from "./FormDropzone.js";
2
+ export {
3
+ e as FormDropzone
4
+ };
@@ -1,8 +1,8 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as x } from "react";
3
- import { FormRenderControl as C } from "./ui34.js";
4
- import { FormControl as D } from "./ui33.js";
5
- import { Input as F } from "./ui43.js";
2
+ import { FormControl as x } from "../Form/Form.js";
3
+ import { FormRenderControl as C } from "../Form/FormRenderControl.js";
4
+ import { Input as D } from "../Input/Input.js";
5
+ import { forwardRef as F } from "react";
6
6
  function I(l, e) {
7
7
  const { form: a, label: s, name: u, onChange: c, onBlur: m, onPaste: p, style: i, ...f } = l;
8
8
  return /* @__PURE__ */ r(
@@ -11,8 +11,8 @@ function I(l, e) {
11
11
  form: a,
12
12
  name: u,
13
13
  label: s,
14
- render: ({ field: o }) => /* @__PURE__ */ r(D, { children: /* @__PURE__ */ r(
15
- F,
14
+ render: ({ field: o }) => /* @__PURE__ */ r(x, { children: /* @__PURE__ */ r(
15
+ D,
16
16
  {
17
17
  ...o,
18
18
  ...f,
@@ -39,7 +39,7 @@ function I(l, e) {
39
39
  }
40
40
  );
41
41
  }
42
- const j = x(I);
42
+ const j = F(I);
43
43
  export {
44
44
  j as FormInput
45
45
  };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,4 @@
1
+ import { FormInput as m } from "./FormInput.js";
2
+ export {
3
+ m as FormInput
4
+ };
@@ -0,0 +1,40 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { FormControl as a, FormItem as v } from "../Form/Form.js";
3
+ import { FormRenderControl as C } from "../Form/FormRenderControl.js";
4
+ import { Radio as F } from "../Radio/Radio.js";
5
+ const R = (m) => {
6
+ const {
7
+ form: l,
8
+ name: t,
9
+ label: u,
10
+ onValueChange: d,
11
+ value: h,
12
+ defaultValue: c,
13
+ renderOption: i,
14
+ ...s
15
+ } = m;
16
+ return /* @__PURE__ */ e(
17
+ C,
18
+ {
19
+ form: l,
20
+ name: t,
21
+ label: u,
22
+ render: ({ field: o }) => /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(
23
+ F,
24
+ {
25
+ ...o,
26
+ ...s,
27
+ defaultValue: c || o.value,
28
+ value: h || o.value,
29
+ onValueChange: (r) => {
30
+ o.onChange(r), d?.(r);
31
+ },
32
+ renderOption: (r, n) => /* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(a, { children: i?.(r, n) || /* @__PURE__ */ e(n, { ...r }) }) }, r.value)
33
+ }
34
+ ) })
35
+ }
36
+ );
37
+ };
38
+ export {
39
+ R as FormRadio
40
+ };
@@ -1,5 +1,5 @@
1
1
  import { FieldValues } from 'react-hook-form';
2
- import { FormRenderControlExtendProps } from '../Form';
2
+ import { FormRenderControlExtendProps } from '@oneplatformdev/ui/Form';
3
3
  import { RadioProps } from '../Radio';
4
4
  export interface FormRadioGroupProps<Data extends FieldValues> extends FormRenderControlExtendProps<Data>, Partial<Omit<RadioProps, 'name'>> {
5
5
  }
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,4 @@
1
+ import { FormRadio as m } from "./FormRadio.js";
2
+ export {
3
+ m as FormRadio
4
+ };