@oneplatformdev/ui 0.0.1-beta.67 → 0.0.1-beta.68

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 (39) hide show
  1. package/Alert/Alert.mjs +7 -6
  2. package/AreaChart/AreaChart.mjs +5 -4
  3. package/Badge/Badge.mjs +7 -6
  4. package/Calendar/Calendar.mjs +1 -0
  5. package/Checkbox/Checkbox.d.ts +1 -1
  6. package/Checkbox/Checkbox.types.d.ts +3 -3
  7. package/Command/Command.mjs +3 -2
  8. package/DataTable/DataTable.mjs +16 -15
  9. package/Dropzone/Dropzone.mjs +1 -1
  10. package/Dropzone/DropzoneFilePreview.mjs +1 -1
  11. package/Dropzone/index.mjs +1 -1
  12. package/{DropzoneFilePreview-Dhtv8F4u.js → DropzoneFilePreview-C-SoCoO0.js} +16 -15
  13. package/Form/Form.mjs +5 -4
  14. package/Form/FormRenderControl.mjs +7 -6
  15. package/FormCheckbox/FormCheckbox.mjs +10 -9
  16. package/FormCombobox/FormCombobox.mjs +13 -12
  17. package/FormDatePicker/FormDatePicker.mjs +7 -6
  18. package/FormDropzone/FormDropzone.mjs +7 -6
  19. package/FormInput/FormInput.mjs +7 -6
  20. package/FormRadio/FormRadio.mjs +11 -10
  21. package/FormSelect/FormSelect.mjs +6 -5
  22. package/FormTextarea/FormTextarea.mjs +10 -9
  23. package/Header/Header.mjs +7 -6
  24. package/Label/Label.mjs +7 -6
  25. package/LoadingMask/LoadingMask.mjs +7 -6
  26. package/LoadingProgress/LoadingProgress.mjs +3 -2
  27. package/Radio/Radio.mjs +8 -7
  28. package/Skeleton/Skeleton.mjs +9 -8
  29. package/TablePagination/TablePagination.mjs +9 -8
  30. package/Textarea/Textarea.mjs +5 -72
  31. package/Textarea/index.mjs +2 -2
  32. package/Textarea/useAutosizeTextArea.mjs +65 -18
  33. package/Textarea-D1CCXy7E.js +149 -0
  34. package/Theme/ThemeProvider.mjs +14 -13
  35. package/Toast/Toast.mjs +3 -2
  36. package/ToggleGroup/ToggleGroup.mjs +7 -6
  37. package/Tooltip/Tooltip.mjs +3 -2
  38. package/index.mjs +2 -2
  39. package/package.json +1 -1
package/Alert/Alert.mjs CHANGED
@@ -1,13 +1,14 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
- import { cn as l } from "@oneplatformdev/utils";
3
+ import "class-variance-authority";
4
+ import { cn as o } from "@oneplatformdev/utils";
4
5
  import { alertVariants as m } from "./alertVariants.mjs";
5
- const s = i.forwardRef(({ className: e, variant: r, ...t }, o) => /* @__PURE__ */ a(
6
+ const s = i.forwardRef(({ className: e, variant: r, ...t }, l) => /* @__PURE__ */ a(
6
7
  "div",
7
8
  {
8
- ref: o,
9
+ ref: l,
9
10
  role: "alert",
10
- className: l(m({ variant: r }), e),
11
+ className: o(m({ variant: r }), e),
11
12
  ...t
12
13
  }
13
14
  ));
@@ -16,7 +17,7 @@ const n = i.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a(
16
17
  "h5",
17
18
  {
18
19
  ref: t,
19
- className: l("mb-1 font-medium leading-none tracking-tight", e),
20
+ className: o("mb-1 font-medium leading-none tracking-tight", e),
20
21
  ...r
21
22
  }
22
23
  ));
@@ -25,7 +26,7 @@ const d = i.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ a(
25
26
  "div",
26
27
  {
27
28
  ref: t,
28
- className: l("text-sm [&_p]:leading-relaxed", e),
29
+ className: o("text-sm [&_p]:leading-relaxed", e),
29
30
  ...r
30
31
  }
31
32
  ));
@@ -1,7 +1,8 @@
1
1
  import { jsx as t, jsxs as a } from "react/jsx-runtime";
2
+ import "react";
2
3
  import { AreaChart as s, CartesianGrid as n, XAxis as l, YAxis as h, Area as p } from "recharts";
3
- import { ChartContainer as d, ChartTooltip as f, ChartTooltipContent as c } from "../Chart/Chart.mjs";
4
- const k = ({ data: o, config: i }) => /* @__PURE__ */ t(d, { config: i, className: "h-[350px] w-full", children: /* @__PURE__ */ a(s, { data: o, width: 808, height: 350, margin: { top: 10, right: 10, left: 0, bottom: 0 }, children: [
4
+ import { ChartContainer as d, ChartTooltip as f, ChartTooltipContent as m } from "../Chart/Chart.mjs";
5
+ const y = ({ data: o, config: i }) => /* @__PURE__ */ t(d, { config: i, className: "h-[350px] w-full", children: /* @__PURE__ */ a(s, { data: o, width: 808, height: 350, margin: { top: 10, right: 10, left: 0, bottom: 0 }, children: [
5
6
  /* @__PURE__ */ t("defs", { children: Object.entries(i).map(([e, { color: r }]) => /* @__PURE__ */ a("linearGradient", { id: `${e}Gradient`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
6
7
  /* @__PURE__ */ t("stop", { offset: "5%", stopColor: r, stopOpacity: 0.8 }),
7
8
  /* @__PURE__ */ t("stop", { offset: "95%", stopColor: r, stopOpacity: 0.1 })
@@ -9,7 +10,7 @@ const k = ({ data: o, config: i }) => /* @__PURE__ */ t(d, { config: i, classNam
9
10
  /* @__PURE__ */ t(n, { strokeDasharray: "none", stroke: "gray", strokeWidth: 0.5, vertical: !0, horizontal: !0 }),
10
11
  /* @__PURE__ */ t(l, { dataKey: "month", axisLine: !1, tickLine: !1, tick: { fontSize: 12 } }),
11
12
  /* @__PURE__ */ t(h, { axisLine: !1, tickLine: !1, tick: { fontSize: 12 } }),
12
- /* @__PURE__ */ t(f, { content: /* @__PURE__ */ t(c, {}) }),
13
+ /* @__PURE__ */ t(f, { content: /* @__PURE__ */ t(m, {}) }),
13
14
  Object.entries(i).map(([e, { color: r }]) => /* @__PURE__ */ t(
14
15
  p,
15
16
  {
@@ -23,5 +24,5 @@ const k = ({ data: o, config: i }) => /* @__PURE__ */ t(d, { config: i, classNam
23
24
  ))
24
25
  ] }) });
25
26
  export {
26
- k as AreaChart
27
+ y as AreaChart
27
28
  };
package/Badge/Badge.mjs CHANGED
@@ -1,10 +1,11 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { cn as a } from "@oneplatformdev/utils";
3
- import { badgeVariants as i } from "./badgeVariants.mjs";
4
- function p({ className: r, variant: o, ...m }) {
5
- return /* @__PURE__ */ t("div", { className: a(i({ variant: o }), r), ...m });
2
+ import "react";
3
+ import { cn as i } from "@oneplatformdev/utils";
4
+ import { badgeVariants as a } from "./badgeVariants.mjs";
5
+ function s({ className: r, variant: o, ...m }) {
6
+ return /* @__PURE__ */ t("div", { className: i(a({ variant: o }), r), ...m });
6
7
  }
7
8
  export {
8
- p as Badge,
9
- i as badgeVariants
9
+ s as Badge,
10
+ a as badgeVariants
10
11
  };
@@ -1,4 +1,5 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
+ import "react";
2
3
  import { ChevronLeft as i, ChevronRight as l } from "lucide-react";
3
4
  import { DayPicker as m } from "react-day-picker";
4
5
  import { cn as e } from "@oneplatformdev/utils";
@@ -1,5 +1,5 @@
1
1
  import { CheckboxLabelProps, CheckboxProps } from './Checkbox.types.ts';
2
- import * as React from "react";
2
+ import * as React from 'react';
3
3
  declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
4
4
  declare const CheckboxLabel: React.ForwardRefExoticComponent<CheckboxLabelProps & React.RefAttributes<HTMLLabelElement>>;
5
5
  export { Checkbox, CheckboxLabel };
@@ -1,6 +1,6 @@
1
- import { Label } from '../Label/Label';
2
- import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
3
- import * as React from "react";
1
+ import { Label } from '../Label';
2
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
+ import * as React from 'react';
4
4
  export interface CheckboxProps extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> {
5
5
  indeterminate?: boolean;
6
6
  }
@@ -1,5 +1,6 @@
1
1
  import { jsx as t, jsxs as s } from "react/jsx-runtime";
2
2
  import * as m from "react";
3
+ import "@radix-ui/react-dialog";
3
4
  import { Command as o } from "cmdk";
4
5
  import { Search as p } from "lucide-react";
5
6
  import { cn as r } from "@oneplatformdev/utils";
@@ -16,7 +17,7 @@ const n = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ t(
16
17
  }
17
18
  ));
18
19
  n.displayName = o.displayName;
19
- const C = ({ children: e, ...a }) => /* @__PURE__ */ t(i, { ...a, children: /* @__PURE__ */ t(c, { className: "overflow-hidden p-0", children: /* @__PURE__ */ t(n, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: e }) }) }), l = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ s("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
20
+ const b = ({ children: e, ...a }) => /* @__PURE__ */ t(i, { ...a, children: /* @__PURE__ */ t(c, { className: "overflow-hidden p-0", children: /* @__PURE__ */ t(n, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: e }) }) }), l = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ s("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
20
21
  /* @__PURE__ */ t(p, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
21
22
  /* @__PURE__ */ t(
22
23
  o.Input,
@@ -98,7 +99,7 @@ const y = ({
98
99
  y.displayName = "CommandShortcut";
99
100
  export {
100
101
  n as Command,
101
- C as CommandDialog,
102
+ b as CommandDialog,
102
103
  f as CommandEmpty,
103
104
  g as CommandGroup,
104
105
  l as CommandInput,
@@ -5,8 +5,9 @@ import { DropdownMenu as p, DropdownMenuTrigger as g, DropdownMenuContent as u,
5
5
  import { Table as f, TableHeader as w, TableRow as t, TableHead as x, TableBody as b, TableCell as d } from "../Table/Table.mjs";
6
6
  import { flexRender as a } from "@tanstack/react-table";
7
7
  import { ChevronDown as D } from "lucide-react";
8
- const y = ({
9
- table: r,
8
+ import "react";
9
+ const I = ({
10
+ table: n,
10
11
  ToolBar: s,
11
12
  tColumns: c = "Columns",
12
13
  tNoResults: m = "No results"
@@ -21,12 +22,12 @@ const y = ({
21
22
  " ",
22
23
  /* @__PURE__ */ l(D, { className: "ml-2 h-4 w-4" })
23
24
  ] }) }),
24
- /* @__PURE__ */ l(u, { align: "end", children: r.getAllColumns().filter((e) => e.getCanHide()).map((e) => /* @__PURE__ */ l(
25
+ /* @__PURE__ */ l(u, { align: "end", children: n.getAllColumns().filter((e) => e.getCanHide()).map((e) => /* @__PURE__ */ l(
25
26
  C,
26
27
  {
27
28
  className: "capitalize",
28
29
  checked: e.getIsVisible(),
29
- onCheckedChange: (n) => e.toggleVisibility(!!n),
30
+ onCheckedChange: (r) => e.toggleVisibility(!!r),
30
31
  children: e.id
31
32
  },
32
33
  e.id
@@ -34,24 +35,24 @@ const y = ({
34
35
  ] })
35
36
  ] }),
36
37
  /* @__PURE__ */ l("div", { className: "rounded-md border", children: /* @__PURE__ */ i(f, { children: [
37
- /* @__PURE__ */ l(w, { children: r.getHeaderGroups().map((e) => /* @__PURE__ */ l(t, { children: e.headers.map((n) => /* @__PURE__ */ l(x, { children: n.isPlaceholder ? null : a(
38
- n.column.columnDef.header,
39
- n.getContext()
40
- ) }, n.id)) }, e.id)) }),
41
- /* @__PURE__ */ l(b, { children: (o = r.getRowModel().rows) != null && o.length ? r.getRowModel().rows.map((e) => /* @__PURE__ */ l(
38
+ /* @__PURE__ */ l(w, { children: n.getHeaderGroups().map((e) => /* @__PURE__ */ l(t, { children: e.headers.map((r) => /* @__PURE__ */ l(x, { children: r.isPlaceholder ? null : a(
39
+ r.column.columnDef.header,
40
+ r.getContext()
41
+ ) }, r.id)) }, e.id)) }),
42
+ /* @__PURE__ */ l(b, { children: (o = n.getRowModel().rows) != null && o.length ? n.getRowModel().rows.map((e) => /* @__PURE__ */ l(
42
43
  t,
43
44
  {
44
45
  "data-state": e.getIsSelected() && "selected",
45
- children: e.getVisibleCells().map((n) => /* @__PURE__ */ l(d, { children: a(
46
- n.column.columnDef.cell,
47
- n.getContext()
48
- ) }, n.id))
46
+ children: e.getVisibleCells().map((r) => /* @__PURE__ */ l(d, { children: a(
47
+ r.column.columnDef.cell,
48
+ r.getContext()
49
+ ) }, r.id))
49
50
  },
50
51
  e.id
51
52
  )) : /* @__PURE__ */ l(t, { children: /* @__PURE__ */ l(
52
53
  d,
53
54
  {
54
- colSpan: r.getAllColumns().length,
55
+ colSpan: n.getAllColumns().length,
55
56
  className: "h-24 text-center",
56
57
  children: m
57
58
  }
@@ -60,5 +61,5 @@ const y = ({
60
61
  ] });
61
62
  };
62
63
  export {
63
- y as DataTable
64
+ I as DataTable
64
65
  };
@@ -4,7 +4,7 @@ import { useDropzone as O } from "react-dropzone";
4
4
  import { Card as X } from "../Card/Card.mjs";
5
5
  import { X as Y } from "lucide-react";
6
6
  import { cn as f } from "@oneplatformdev/utils";
7
- import { F as q, D as G } from "../DropzoneFilePreview-Dhtv8F4u.js";
7
+ import { F as q, D as G } from "../DropzoneFilePreview-C-SoCoO0.js";
8
8
  import { DefaultFileIcon as H, isFile as u, extractName as J } from "./DropzoneUtils.mjs";
9
9
  import { DropzoneSinglePickPreview as K } from "./DropzoneSinglePickPreview.mjs";
10
10
  const Q = j(
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
3
  import "lucide-react";
4
- import { F } from "../DropzoneFilePreview-Dhtv8F4u.js";
4
+ import { F } from "../DropzoneFilePreview-C-SoCoO0.js";
5
5
  import "./DropzoneUtils.mjs";
6
6
  import "@oneplatformdev/utils";
7
7
  export {
@@ -1,5 +1,5 @@
1
1
  import { Dropzone as r } from "./Dropzone.mjs";
2
- import { D as T, a as _ } from "../DropzoneFilePreview-Dhtv8F4u.js";
2
+ import { D as T, a as _ } from "../DropzoneFilePreview-C-SoCoO0.js";
3
3
  export {
4
4
  T as DEFAULT_FILE_TYPES,
5
5
  _ as DEFAULT_IMAGES_TYPES,
@@ -1,9 +1,10 @@
1
- import { jsx as l, jsxs as d } from "react/jsx-runtime";
2
- import { useState as m, useEffect as f } from "react";
1
+ import { jsx as o, jsxs as m } from "react/jsx-runtime";
2
+ import { useState as d, useEffect as f } from "react";
3
3
  import { File as s } from "lucide-react";
4
- import { isFile as o } from "./Dropzone/DropzoneUtils.mjs";
4
+ import "react-dropzone";
5
+ import { isFile as l } from "./Dropzone/DropzoneUtils.mjs";
5
6
  import { cn as c } from "@oneplatformdev/utils";
6
- const h = [
7
+ const j = [
7
8
  "application/msword",
8
9
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
9
10
  "text/csv",
@@ -15,11 +16,11 @@ const h = [
15
16
  "image/jpg",
16
17
  "image/webp",
17
18
  "image/gif"
18
- ], j = ({ item: e, styles: r }) => {
19
- const [t, a] = m(null), p = o(e) && u.includes(e.type);
19
+ ], E = ({ item: e, styles: r }) => {
20
+ const [t, a] = d(null), p = l(e) && u.includes(e.type);
20
21
  return f(() => {
21
22
  let n = null;
22
- if (o(e) && p) {
23
+ if (l(e) && p) {
23
24
  const i = new FileReader();
24
25
  return i.onloadend = () => a(i.result), i.readAsDataURL(e), () => a(null);
25
26
  } else {
@@ -30,21 +31,21 @@ const h = [
30
31
  a(null);
31
32
  }
32
33
  return () => a(null);
33
- }, [e, p]), /* @__PURE__ */ l(
34
+ }, [e, p]), /* @__PURE__ */ o(
34
35
  "div",
35
36
  {
36
37
  className: c(
37
38
  "w-32 h-32 border border-gray-300 rounded-md overflow-hidden flex items-center justify-center",
38
39
  r == null ? void 0 : r.previewWraper
39
40
  ),
40
- children: t ? /* @__PURE__ */ l(
41
+ children: t ? /* @__PURE__ */ o(
41
42
  "img",
42
43
  {
43
44
  src: t,
44
- alt: o(e) ? e.name : "external-image",
45
+ alt: l(e) ? e.name : "external-image",
45
46
  className: c("w-full h-full object-cover", r == null ? void 0 : r.previewImage)
46
47
  }
47
- ) : /* @__PURE__ */ d(
48
+ ) : /* @__PURE__ */ m(
48
49
  "div",
49
50
  {
50
51
  className: c(
@@ -52,8 +53,8 @@ const h = [
52
53
  r == null ? void 0 : r.previewFile
53
54
  ),
54
55
  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 })
56
+ /* @__PURE__ */ o(s, { className: "w-6 h-6" }),
57
+ l(e) ? /* @__PURE__ */ o("span", { className: "text-xs break-all", children: e.name }) : /* @__PURE__ */ o("span", { className: "text-xs break-all", children: e })
57
58
  ]
58
59
  }
59
60
  )
@@ -61,7 +62,7 @@ const h = [
61
62
  );
62
63
  };
63
64
  export {
64
- h as D,
65
- j as F,
65
+ j as D,
66
+ E as F,
66
67
  u as a
67
68
  };
package/Form/Form.mjs CHANGED
@@ -1,13 +1,14 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
+ import "@radix-ui/react-label";
3
4
  import { Slot as F } from "@radix-ui/react-slot";
4
5
  import { FormProvider as u, Controller as p, useFormContext as x } from "react-hook-form";
5
6
  import { cn as a } from "@oneplatformdev/utils";
6
7
  import { Label as I } from "../Label/Label.mjs";
7
8
  import "../Label/labelVariants.mjs";
8
- const M = u, f = s.createContext(
9
+ const S = u, f = s.createContext(
9
10
  {}
10
- ), S = ({
11
+ ), L = ({
11
12
  ...e
12
13
  }) => /* @__PURE__ */ i(f.Provider, { value: { name: e.name }, children: /* @__PURE__ */ i(p, { ...e }) }), d = () => {
13
14
  const e = s.useContext(f), o = s.useContext(l), { getFieldState: r, formState: t } = x(), m = r(e.name, t);
@@ -84,10 +85,10 @@ const w = s.forwardRef(({ className: e, children: o, ...r }, t) => {
84
85
  });
85
86
  w.displayName = "FormMessage";
86
87
  export {
87
- M as Form,
88
+ S as Form,
88
89
  v as FormControl,
89
90
  N as FormDescription,
90
- S as FormField,
91
+ L as FormField,
91
92
  C as FormItem,
92
93
  g as FormLabel,
93
94
  w as FormMessage,
@@ -1,13 +1,14 @@
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) => {
1
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
2
+ import { FormField as a, FormItem as d, FormLabel as F, FormMessage as p } from "./Form.mjs";
3
+ import "react-hook-form";
4
+ const h = (e) => {
4
5
  const { form: n, name: m, label: o, render: t, containerProps: l = {}, ...s } = e;
5
6
  return /* @__PURE__ */ r(
6
- d,
7
+ a,
7
8
  {
8
9
  control: n.control,
9
10
  name: m,
10
- render: (c) => /* @__PURE__ */ a(i, { ...l, children: [
11
+ render: (c) => /* @__PURE__ */ i(d, { ...l, children: [
11
12
  !!o && /* @__PURE__ */ r(F, { children: o }),
12
13
  t(c),
13
14
  /* @__PURE__ */ r(p, {})
@@ -17,5 +18,5 @@ const b = (e) => {
17
18
  );
18
19
  };
19
20
  export {
20
- b as FormRenderControl
21
+ h as FormRenderControl
21
22
  };
@@ -1,23 +1,24 @@
1
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";
2
+ import "react-hook-form";
3
+ import { FormControl as p } from "../Form/Form.mjs";
4
+ import { FormRenderControl as h } from "../Form/FormRenderControl.mjs";
4
5
  import { CheckboxLabel as s } from "../Checkbox/Checkbox.mjs";
5
- const i = (t) => {
6
- const { form: c, label: a, name: l, onCheckedChange: o, ...m } = t;
6
+ const k = (n) => {
7
+ const { form: c, label: a, name: l, onCheckedChange: o, ...m } = n;
7
8
  return /* @__PURE__ */ e(
8
- p,
9
+ h,
9
10
  {
10
11
  form: c,
11
12
  name: l,
12
- render: ({ field: r }) => /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(
13
+ render: ({ field: r }) => /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(
13
14
  s,
14
15
  {
15
16
  ...r,
16
17
  ...m,
17
18
  label: a,
18
19
  checked: r.value || !1,
19
- onCheckedChange: (n) => {
20
- r.onChange(n), o == null || o(n);
20
+ onCheckedChange: (t) => {
21
+ r.onChange(t), o == null || o(t);
21
22
  }
22
23
  }
23
24
  ) }),
@@ -26,5 +27,5 @@ const i = (t) => {
26
27
  );
27
28
  };
28
29
  export {
29
- i as FormCheckbox
30
+ k as FormCheckbox
30
31
  };
@@ -1,19 +1,20 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { FormControl as b } from "../Form/Form.mjs";
3
- import { FormRenderControl as p } from "../Form/FormRenderControl.mjs";
4
- import { Combobox as a } from "../Combobox/Combobox.mjs";
5
- const x = (m) => {
6
- const { form: n, label: e, name: t, ...C } = m;
2
+ import { FormControl as C } from "../Form/Form.mjs";
3
+ import { FormRenderControl as b } from "../Form/FormRenderControl.mjs";
4
+ import { Combobox as i } from "../Combobox/Combobox.mjs";
5
+ import "react-hook-form";
6
+ const c = (m) => {
7
+ const { form: n, label: t, name: e, ...p } = m;
7
8
  return /* @__PURE__ */ o(
8
- p,
9
+ b,
9
10
  {
10
11
  form: n,
11
- label: e,
12
- name: t,
13
- render: ({ field: r }) => /* @__PURE__ */ o(b, { children: /* @__PURE__ */ o(
14
- a,
12
+ label: t,
13
+ name: e,
14
+ render: ({ field: r }) => /* @__PURE__ */ o(C, { children: /* @__PURE__ */ o(
15
+ i,
15
16
  {
16
- ...C,
17
+ ...p,
17
18
  ...r,
18
19
  onChange: r.onChange
19
20
  }
@@ -22,5 +23,5 @@ const x = (m) => {
22
23
  );
23
24
  };
24
25
  export {
25
- x as FormCombobox
26
+ c as FormCombobox
26
27
  };
@@ -1,8 +1,9 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { DatePicker as l } from "../DatePicker/DatePicker.mjs";
3
- import { FormControl as p } from "../Form/Form.mjs";
2
+ import { DatePicker as p } from "../DatePicker/DatePicker.mjs";
3
+ import { FormControl as l } from "../Form/Form.mjs";
4
4
  import { FormRenderControl as s } from "../Form/FormRenderControl.mjs";
5
- const h = (m) => {
5
+ import "react-hook-form";
6
+ const k = (m) => {
6
7
  const { form: n, name: a, label: c, onDateChange: r, ...i } = m;
7
8
  return /* @__PURE__ */ e(
8
9
  s,
@@ -10,8 +11,8 @@ const h = (m) => {
10
11
  form: n,
11
12
  name: a,
12
13
  label: c,
13
- render: ({ field: o }) => /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(
14
- l,
14
+ render: ({ field: o }) => /* @__PURE__ */ e(l, { children: /* @__PURE__ */ e(
15
+ p,
15
16
  {
16
17
  ...o,
17
18
  ...i,
@@ -25,5 +26,5 @@ const h = (m) => {
25
26
  );
26
27
  };
27
28
  export {
28
- h as FormDatePicker
29
+ k as FormDatePicker
29
30
  };
@@ -1,19 +1,20 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { FormControl as a } from "../Form/Form.mjs";
3
- import { FormRenderControl as l } from "../Form/FormRenderControl.mjs";
4
- import { Dropzone as f } from "../Dropzone/Dropzone.mjs";
5
- const h = (n) => {
3
+ import { FormRenderControl as i } from "../Form/FormRenderControl.mjs";
4
+ import { Dropzone as l } from "../Dropzone/Dropzone.mjs";
5
+ import "react-hook-form";
6
+ const F = (n) => {
6
7
  const { form: e, label: m, name: t, ...p } = n;
7
8
  return /* @__PURE__ */ o(
8
- l,
9
+ i,
9
10
  {
10
11
  form: e,
11
12
  label: m,
12
13
  name: t,
13
- render: ({ field: r }) => /* @__PURE__ */ o(a, { children: /* @__PURE__ */ o(f, { ...p, ...r, onChangeValue: r.onChange }) })
14
+ render: ({ field: r }) => /* @__PURE__ */ o(a, { children: /* @__PURE__ */ o(l, { ...p, ...r, onChangeValue: r.onChange }) })
14
15
  }
15
16
  );
16
17
  };
17
18
  export {
18
- h as FormDropzone
19
+ F as FormDropzone
19
20
  };
@@ -1,17 +1,18 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { FormControl as l } from "../Form/Form.mjs";
3
- import { FormRenderControl as u } from "../Form/FormRenderControl.mjs";
4
- import { Input as a } from "../Input/Input.mjs";
5
- const F = (m) => {
3
+ import { FormRenderControl as i } from "../Form/FormRenderControl.mjs";
4
+ import { Input as u } from "../Input/Input.mjs";
5
+ import "react-hook-form";
6
+ const d = (m) => {
6
7
  const { form: t, label: e, name: n, ...p } = m;
7
8
  return /* @__PURE__ */ r(
8
- u,
9
+ i,
9
10
  {
10
11
  form: t,
11
12
  name: n,
12
13
  label: e,
13
14
  render: ({ field: o }) => /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(
14
- a,
15
+ u,
15
16
  {
16
17
  ...o,
17
18
  value: o.value || "",
@@ -22,5 +23,5 @@ const F = (m) => {
22
23
  );
23
24
  };
24
25
  export {
25
- F as FormInput
26
+ d as FormInput
26
27
  };
@@ -1,7 +1,8 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { FormControl as t, FormItem as F } from "../Form/Form.mjs";
3
- import { FormRenderControl as f } from "../Form/FormRenderControl.mjs";
4
- import { Radio as i } from "../Radio/Radio.mjs";
2
+ import "react-hook-form";
3
+ import { FormControl as t, FormItem as v } from "../Form/Form.mjs";
4
+ import { FormRenderControl as F } from "../Form/FormRenderControl.mjs";
5
+ import { Radio as f } from "../Radio/Radio.mjs";
5
6
  const b = (n) => {
6
7
  const {
7
8
  form: u,
@@ -9,27 +10,27 @@ const b = (n) => {
9
10
  label: c,
10
11
  onValueChange: m,
11
12
  value: h,
12
- defaultValue: s,
13
+ defaultValue: i,
13
14
  renderOption: a,
14
- ...v
15
+ ...s
15
16
  } = n;
16
17
  return /* @__PURE__ */ e(
17
- f,
18
+ F,
18
19
  {
19
20
  form: u,
20
21
  name: d,
21
22
  label: c,
22
23
  render: ({ field: o }) => /* @__PURE__ */ e(t, { children: /* @__PURE__ */ e(
23
- i,
24
+ f,
24
25
  {
25
26
  ...o,
26
- ...v,
27
- defaultValue: s || o.value,
27
+ ...s,
28
+ defaultValue: i || o.value,
28
29
  value: h || o.value,
29
30
  onValueChange: (r) => {
30
31
  o.onChange(r), m == null || m(r);
31
32
  },
32
- renderOption: (r, l) => /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(t, { children: (a == null ? void 0 : a(r, l)) || /* @__PURE__ */ e(l, { ...r }) }) }, r.value)
33
+ renderOption: (r, l) => /* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(t, { children: (a == null ? void 0 : a(r, l)) || /* @__PURE__ */ e(l, { ...r }) }) }, r.value)
33
34
  }
34
35
  ) })
35
36
  }
@@ -3,20 +3,21 @@ import { FormControl as f } from "../Form/Form.mjs";
3
3
  import { FormRenderControl as d } from "../Form/FormRenderControl.mjs";
4
4
  import "../Select/SelectRoot.mjs";
5
5
  import { Select as g } from "../Select/Select.mjs";
6
- const S = (n) => {
6
+ import "react-hook-form";
7
+ const b = (m) => {
7
8
  const {
8
- form: m,
9
+ form: n,
9
10
  label: i,
10
11
  name: p,
11
12
  options: l = [],
12
13
  onChange: r,
13
14
  containerProps: c,
14
15
  ...s
15
- } = n;
16
+ } = m;
16
17
  return /* @__PURE__ */ e(
17
18
  d,
18
19
  {
19
- form: m,
20
+ form: n,
20
21
  name: p,
21
22
  label: i,
22
23
  containerProps: c,
@@ -36,5 +37,5 @@ const S = (n) => {
36
37
  );
37
38
  };
38
39
  export {
39
- S as FormSelect
40
+ b as FormSelect
40
41
  };