@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.
- package/Alert/Alert.mjs +7 -6
- package/AreaChart/AreaChart.mjs +5 -4
- package/Badge/Badge.mjs +7 -6
- package/Calendar/Calendar.mjs +1 -0
- package/Checkbox/Checkbox.d.ts +1 -1
- package/Checkbox/Checkbox.types.d.ts +3 -3
- package/Command/Command.mjs +3 -2
- package/DataTable/DataTable.mjs +16 -15
- package/Dropzone/Dropzone.mjs +1 -1
- package/Dropzone/DropzoneFilePreview.mjs +1 -1
- package/Dropzone/index.mjs +1 -1
- package/{DropzoneFilePreview-Dhtv8F4u.js → DropzoneFilePreview-C-SoCoO0.js} +16 -15
- package/Form/Form.mjs +5 -4
- package/Form/FormRenderControl.mjs +7 -6
- package/FormCheckbox/FormCheckbox.mjs +10 -9
- package/FormCombobox/FormCombobox.mjs +13 -12
- package/FormDatePicker/FormDatePicker.mjs +7 -6
- package/FormDropzone/FormDropzone.mjs +7 -6
- package/FormInput/FormInput.mjs +7 -6
- package/FormRadio/FormRadio.mjs +11 -10
- package/FormSelect/FormSelect.mjs +6 -5
- package/FormTextarea/FormTextarea.mjs +10 -9
- package/Header/Header.mjs +7 -6
- package/Label/Label.mjs +7 -6
- package/LoadingMask/LoadingMask.mjs +7 -6
- package/LoadingProgress/LoadingProgress.mjs +3 -2
- package/Radio/Radio.mjs +8 -7
- package/Skeleton/Skeleton.mjs +9 -8
- package/TablePagination/TablePagination.mjs +9 -8
- package/Textarea/Textarea.mjs +5 -72
- package/Textarea/index.mjs +2 -2
- package/Textarea/useAutosizeTextArea.mjs +65 -18
- package/Textarea-D1CCXy7E.js +149 -0
- package/Theme/ThemeProvider.mjs +14 -13
- package/Toast/Toast.mjs +3 -2
- package/ToggleGroup/ToggleGroup.mjs +7 -6
- package/Tooltip/Tooltip.mjs +3 -2
- package/index.mjs +2 -2
- 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
|
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 },
|
6
|
+
const s = i.forwardRef(({ className: e, variant: r, ...t }, l) => /* @__PURE__ */ a(
|
6
7
|
"div",
|
7
8
|
{
|
8
|
-
ref:
|
9
|
+
ref: l,
|
9
10
|
role: "alert",
|
10
|
-
className:
|
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:
|
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:
|
29
|
+
className: o("text-sm [&_p]:leading-relaxed", e),
|
29
30
|
...r
|
30
31
|
}
|
31
32
|
));
|
package/AreaChart/AreaChart.mjs
CHANGED
@@ -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
|
4
|
-
const
|
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(
|
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
|
-
|
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
|
3
|
-
import {
|
4
|
-
|
5
|
-
|
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
|
-
|
9
|
-
|
9
|
+
s as Badge,
|
10
|
+
a as badgeVariants
|
10
11
|
};
|
package/Calendar/Calendar.mjs
CHANGED
package/Checkbox/Checkbox.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { CheckboxLabelProps, CheckboxProps } from './Checkbox.types.ts';
|
2
|
-
import * as React from
|
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
|
2
|
-
import * as CheckboxPrimitive from
|
3
|
-
import * as React from
|
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
|
}
|
package/Command/Command.mjs
CHANGED
@@ -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
|
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
|
-
|
102
|
+
b as CommandDialog,
|
102
103
|
f as CommandEmpty,
|
103
104
|
g as CommandGroup,
|
104
105
|
l as CommandInput,
|
package/DataTable/DataTable.mjs
CHANGED
@@ -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
|
-
|
9
|
-
|
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:
|
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: (
|
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:
|
38
|
-
|
39
|
-
|
40
|
-
) },
|
41
|
-
/* @__PURE__ */ l(b, { children: (o =
|
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((
|
46
|
-
|
47
|
-
|
48
|
-
) },
|
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:
|
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
|
-
|
64
|
+
I as DataTable
|
64
65
|
};
|
package/Dropzone/Dropzone.mjs
CHANGED
@@ -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-
|
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(
|
package/Dropzone/index.mjs
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { useState as
|
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
|
4
|
+
import "react-dropzone";
|
5
|
+
import { isFile as l } from "./Dropzone/DropzoneUtils.mjs";
|
5
6
|
import { cn as c } from "@oneplatformdev/utils";
|
6
|
-
const
|
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
|
-
],
|
19
|
-
const [t, a] =
|
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 (
|
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__ */
|
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__ */
|
41
|
+
children: t ? /* @__PURE__ */ o(
|
41
42
|
"img",
|
42
43
|
{
|
43
44
|
src: t,
|
44
|
-
alt:
|
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__ */
|
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__ */
|
56
|
-
|
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
|
-
|
65
|
-
|
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
|
9
|
+
const S = u, f = s.createContext(
|
9
10
|
{}
|
10
|
-
),
|
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
|
-
|
88
|
+
S as Form,
|
88
89
|
v as FormControl,
|
89
90
|
N as FormDescription,
|
90
|
-
|
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
|
2
|
-
import { FormField as
|
3
|
-
|
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
|
-
|
7
|
+
a,
|
7
8
|
{
|
8
9
|
control: n.control,
|
9
10
|
name: m,
|
10
|
-
render: (c) => /* @__PURE__ */
|
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
|
-
|
21
|
+
h as FormRenderControl
|
21
22
|
};
|
@@ -1,23 +1,24 @@
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
2
|
-
import
|
3
|
-
import {
|
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
|
6
|
-
const { form: c, label: a, name: l, onCheckedChange: o, ...m } =
|
6
|
+
const k = (n) => {
|
7
|
+
const { form: c, label: a, name: l, onCheckedChange: o, ...m } = n;
|
7
8
|
return /* @__PURE__ */ e(
|
8
|
-
|
9
|
+
h,
|
9
10
|
{
|
10
11
|
form: c,
|
11
12
|
name: l,
|
12
|
-
render: ({ field: r }) => /* @__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: (
|
20
|
-
r.onChange(
|
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
|
-
|
30
|
+
k as FormCheckbox
|
30
31
|
};
|
@@ -1,19 +1,20 @@
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
2
|
-
import { FormControl as
|
3
|
-
import { FormRenderControl as
|
4
|
-
import { Combobox as
|
5
|
-
|
6
|
-
|
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
|
-
|
9
|
+
b,
|
9
10
|
{
|
10
11
|
form: n,
|
11
|
-
label:
|
12
|
-
name:
|
13
|
-
render: ({ field: r }) => /* @__PURE__ */ o(
|
14
|
-
|
12
|
+
label: t,
|
13
|
+
name: e,
|
14
|
+
render: ({ field: r }) => /* @__PURE__ */ o(C, { children: /* @__PURE__ */ o(
|
15
|
+
i,
|
15
16
|
{
|
16
|
-
...
|
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
|
-
|
26
|
+
c as FormCombobox
|
26
27
|
};
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
2
|
-
import { DatePicker as
|
3
|
-
import { FormControl as
|
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
|
-
|
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(
|
14
|
-
|
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
|
-
|
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
|
4
|
-
import { Dropzone as
|
5
|
-
|
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
|
-
|
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(
|
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
|
-
|
19
|
+
F as FormDropzone
|
19
20
|
};
|
package/FormInput/FormInput.mjs
CHANGED
@@ -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
|
4
|
-
import { Input as
|
5
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
26
|
+
d as FormInput
|
26
27
|
};
|
package/FormRadio/FormRadio.mjs
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
2
|
-
import
|
3
|
-
import {
|
4
|
-
import {
|
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:
|
13
|
+
defaultValue: i,
|
13
14
|
renderOption: a,
|
14
|
-
...
|
15
|
+
...s
|
15
16
|
} = n;
|
16
17
|
return /* @__PURE__ */ e(
|
17
|
-
|
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
|
-
|
24
|
+
f,
|
24
25
|
{
|
25
26
|
...o,
|
26
|
-
...
|
27
|
-
defaultValue:
|
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(
|
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
|
-
|
6
|
+
import "react-hook-form";
|
7
|
+
const b = (m) => {
|
7
8
|
const {
|
8
|
-
form:
|
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
|
-
} =
|
16
|
+
} = m;
|
16
17
|
return /* @__PURE__ */ e(
|
17
18
|
d,
|
18
19
|
{
|
19
|
-
form:
|
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
|
-
|
40
|
+
b as FormSelect
|
40
41
|
};
|