@oneplatformdev/ui 0.0.1-beta.64 → 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/Button/buttonVariants.mjs +3 -3
- package/Calendar/Calendar.mjs +1 -0
- package/Checkbox/Checkbox.d.ts +5 -4
- package/Checkbox/Checkbox.mjs +48 -21
- package/Checkbox/Checkbox.types.d.ts +10 -0
- package/Checkbox/index.d.ts +2 -1
- package/Checkbox/index.mjs +3 -2
- package/Combobox/Combobox.d.ts +2 -2
- package/Combobox/Combobox.mjs +55 -53
- package/Command/Command.mjs +3 -2
- package/DataTable/DataTable.mjs +16 -15
- package/Dialog/Dialog.d.ts +2 -2
- package/Dialog/Dialog.mjs +14 -12
- 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.d.ts +1 -1
- package/FormCheckbox/FormCheckbox.mjs +24 -23
- package/FormCheckbox/FormCheckbox.types.d.ts +3 -2
- 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.d.ts +2 -2
- package/Label/Label.mjs +7 -6
- package/Label/labelVariants.mjs +1 -1
- package/LazyLoader/LazyLoader.mjs +5 -4
- package/LoadingMask/LoadingMask.d.ts +4 -1
- package/LoadingMask/LoadingMask.mjs +19 -56
- package/LoadingMask/LoadingMask.types.d.ts +5 -0
- package/LoadingMask/RenderLoadingMask.d.ts +3 -0
- package/LoadingMask/RenderLoadingMask.mjs +108 -0
- package/LoadingMask/index.d.ts +2 -0
- package/LoadingMask/index.mjs +4 -2
- package/LoadingProgress/LoadingProgress.mjs +3 -2
- package/Radio/Radio.mjs +8 -7
- package/ScrollArea/ScrollArea.d.ts +2 -2
- package/ScrollArea/ScrollArea.mjs +26 -13
- 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.css +1 -1
- package/index.mjs +287 -284
- package/package.json +1 -1
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,4 +1,4 @@
|
|
1
|
-
import { FieldValues } from 'react-hook-form';
|
2
1
|
import { FormCheckboxProps } from './FormCheckbox.types';
|
2
|
+
import { FieldValues } from 'react-hook-form';
|
3
3
|
|
4
4
|
export declare const FormCheckbox: <Data extends FieldValues>(props: FormCheckboxProps<Data>) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,30 +1,31 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import
|
3
|
-
import {
|
4
|
-
import { FormRenderControl as
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
2
|
+
import "react-hook-form";
|
3
|
+
import { FormControl as p } from "../Form/Form.mjs";
|
4
|
+
import { FormRenderControl as h } from "../Form/FormRenderControl.mjs";
|
5
|
+
import { CheckboxLabel as s } from "../Checkbox/Checkbox.mjs";
|
6
|
+
const k = (n) => {
|
7
|
+
const { form: c, label: a, name: l, onCheckedChange: o, ...m } = n;
|
8
|
+
return /* @__PURE__ */ e(
|
9
|
+
h,
|
9
10
|
{
|
10
|
-
form:
|
11
|
-
name:
|
12
|
-
render: ({ field:
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
11
|
+
form: c,
|
12
|
+
name: l,
|
13
|
+
render: ({ field: r }) => /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(
|
14
|
+
s,
|
15
|
+
{
|
16
|
+
...r,
|
17
|
+
...m,
|
18
|
+
label: a,
|
19
|
+
checked: r.value || !1,
|
20
|
+
onCheckedChange: (t) => {
|
21
|
+
r.onChange(t), o == null || o(t);
|
20
22
|
}
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
...c
|
23
|
+
}
|
24
|
+
) }),
|
25
|
+
...m
|
25
26
|
}
|
26
27
|
);
|
27
28
|
};
|
28
29
|
export {
|
29
|
-
|
30
|
+
k as FormCheckbox
|
30
31
|
};
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import { FieldValues } from 'react-hook-form';
|
2
1
|
import { FormRenderControlExtendProps } from '../Form';
|
2
|
+
import { FieldValues } from 'react-hook-form';
|
3
|
+
import { CheckboxProps } from '../Checkbox';
|
3
4
|
|
4
|
-
export interface FormCheckboxProps<Data extends FieldValues> extends FormRenderControlExtendProps<Data> {
|
5
|
+
export interface FormCheckboxProps<Data extends FieldValues> extends FormRenderControlExtendProps<Data>, Omit<CheckboxProps, 'form' | 'name' | 'label'> {
|
5
6
|
disabled?: boolean;
|
6
7
|
}
|
@@ -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
|
};
|
@@ -1,27 +1,28 @@
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
2
|
-
import { FormControl as
|
3
|
-
import { FormRenderControl as
|
4
|
-
import
|
5
|
-
|
6
|
-
|
2
|
+
import { FormControl as i } from "../Form/Form.mjs";
|
3
|
+
import { FormRenderControl as l } from "../Form/FormRenderControl.mjs";
|
4
|
+
import "react-hook-form";
|
5
|
+
import { T as s } from "../Textarea-D1CCXy7E.js";
|
6
|
+
const T = (e) => {
|
7
|
+
const { form: t, label: m, name: n, containerProps: a, ...p } = e;
|
7
8
|
return /* @__PURE__ */ r(
|
8
|
-
|
9
|
+
l,
|
9
10
|
{
|
10
11
|
form: t,
|
11
12
|
name: n,
|
12
13
|
label: m,
|
13
14
|
containerProps: a,
|
14
|
-
render: ({ field: o }) => /* @__PURE__ */ r(
|
15
|
+
render: ({ field: o }) => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(
|
15
16
|
s,
|
16
17
|
{
|
17
18
|
...o,
|
18
19
|
value: o.value || "",
|
19
|
-
...
|
20
|
+
...p
|
20
21
|
}
|
21
22
|
) })
|
22
23
|
}
|
23
24
|
);
|
24
25
|
};
|
25
26
|
export {
|
26
|
-
|
27
|
+
T as FormTextarea
|
27
28
|
};
|
package/Header/Header.mjs
CHANGED
@@ -1,18 +1,19 @@
|
|
1
1
|
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
2
|
-
import
|
2
|
+
import "react";
|
3
|
+
import { SidebarTrigger as s } from "../Sidebar/Sidebar.mjs";
|
3
4
|
import { Separator as l } from "../Separator/Separator.mjs";
|
4
|
-
const
|
5
|
+
const h = (t) => {
|
5
6
|
const {
|
6
7
|
children: r,
|
7
8
|
hideTrigger: a = !1
|
8
|
-
} =
|
9
|
+
} = t;
|
9
10
|
return /* @__PURE__ */ i(
|
10
11
|
"header",
|
11
12
|
{
|
12
13
|
className: "flex h-16 shrink-0 items-center justify-between gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12",
|
13
14
|
children: [
|
14
15
|
!a && /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
|
15
|
-
/* @__PURE__ */ e(
|
16
|
+
/* @__PURE__ */ e(s, { className: "ml-1" }),
|
16
17
|
/* @__PURE__ */ e(l, { orientation: "vertical", className: "mr-2 h-4" })
|
17
18
|
] }),
|
18
19
|
a ? r : /* @__PURE__ */ e("div", { className: "flex-1 text-right pr-6", children: r })
|
@@ -21,6 +22,6 @@ const m = (s) => {
|
|
21
22
|
);
|
22
23
|
};
|
23
24
|
export {
|
24
|
-
|
25
|
-
|
25
|
+
h as Header,
|
26
|
+
h as default
|
26
27
|
};
|
package/Label/Label.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
2
|
-
import * as React from
|
3
|
-
import * as LabelPrimitive from
|
2
|
+
import * as React from 'react';
|
3
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
4
4
|
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import('class-variance-authority/dist/types').ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
5
5
|
export { Label };
|
package/Label/Label.mjs
CHANGED
@@ -1,17 +1,18 @@
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
2
2
|
import * as i from "react";
|
3
3
|
import * as o from "@radix-ui/react-label";
|
4
|
+
import "class-variance-authority";
|
4
5
|
import { cn as e } from "@oneplatformdev/utils";
|
5
|
-
import { labelVariants as
|
6
|
-
const
|
6
|
+
import { labelVariants as p } from "./labelVariants.mjs";
|
7
|
+
const s = i.forwardRef(({ className: r, ...a }, m) => /* @__PURE__ */ t(
|
7
8
|
o.Root,
|
8
9
|
{
|
9
10
|
ref: m,
|
10
|
-
className: e(
|
11
|
-
...
|
11
|
+
className: e(p(), r),
|
12
|
+
...a
|
12
13
|
}
|
13
14
|
));
|
14
|
-
|
15
|
+
s.displayName = o.Root.displayName;
|
15
16
|
export {
|
16
|
-
|
17
|
+
s as Label
|
17
18
|
};
|
package/Label/labelVariants.mjs
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { cva as e } from "class-variance-authority";
|
2
2
|
const a = e(
|
3
|
-
"text-
|
3
|
+
"text-md text-[#363B4E] font-medium leading-[150%] peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
4
4
|
);
|
5
5
|
export {
|
6
6
|
a as labelVariants
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
2
|
-
import { Suspense as
|
3
|
-
import { LoadingMask as
|
4
|
-
|
2
|
+
import { Suspense as a } from "react";
|
3
|
+
import { LoadingMask as e } from "../LoadingMask/LoadingMask.mjs";
|
4
|
+
import "../LoadingMask/RenderLoadingMask.mjs";
|
5
|
+
const s = (r, m = !0) => (t) => /* @__PURE__ */ o(a, { fallback: m ? /* @__PURE__ */ o(e, {}) : null, children: /* @__PURE__ */ o(r, { ...t }) });
|
5
6
|
export {
|
6
|
-
|
7
|
+
s as LazyLoader
|
7
8
|
};
|
@@ -1,59 +1,22 @@
|
|
1
|
-
import { jsx as
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
"
|
13
|
-
|
14
|
-
|
15
|
-
stroke: "currentColor",
|
16
|
-
strokeWidth: "2",
|
17
|
-
strokeLinecap: "round",
|
18
|
-
strokeLinejoin: "round"
|
19
|
-
}
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
2
|
+
import "react";
|
3
|
+
import { RenderLoadingMask as r } from "./RenderLoadingMask.mjs";
|
4
|
+
import { cn as n } from "@oneplatformdev/utils";
|
5
|
+
const l = (t) => {
|
6
|
+
const { fullWidth: s = !1, className: i, ...o } = t;
|
7
|
+
return s ? /* @__PURE__ */ e(
|
8
|
+
"div",
|
9
|
+
{
|
10
|
+
...o,
|
11
|
+
className: n(
|
12
|
+
"absolute inset-0",
|
13
|
+
"flex items-center justify-center",
|
14
|
+
i
|
20
15
|
),
|
21
|
-
/* @__PURE__ */ r
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
d: "M17.1475 17.1475L16.0625 16.0625",
|
26
|
-
stroke: "currentColor",
|
27
|
-
strokeWidth: "2",
|
28
|
-
strokeLinecap: "round",
|
29
|
-
strokeLinejoin: "round"
|
30
|
-
}
|
31
|
-
),
|
32
|
-
/* @__PURE__ */ r("path", { d: "M12 17.75V19.25", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
33
|
-
/* @__PURE__ */ r(
|
34
|
-
"path",
|
35
|
-
{
|
36
|
-
d: "M6.8525 17.1475L7.9375 16.0625",
|
37
|
-
stroke: "currentColor",
|
38
|
-
strokeWidth: "2",
|
39
|
-
strokeLinecap: "round",
|
40
|
-
strokeLinejoin: "round"
|
41
|
-
}
|
42
|
-
),
|
43
|
-
/* @__PURE__ */ r("path", { d: "M4.75 12H6.25", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
44
|
-
/* @__PURE__ */ r(
|
45
|
-
"path",
|
46
|
-
{
|
47
|
-
d: "M6.8525 6.8525L7.9375 7.9375",
|
48
|
-
stroke: "currentColor",
|
49
|
-
strokeWidth: "2",
|
50
|
-
strokeLinecap: "round",
|
51
|
-
strokeLinejoin: "round"
|
52
|
-
}
|
53
|
-
)
|
54
|
-
]
|
55
|
-
}
|
56
|
-
) });
|
16
|
+
children: /* @__PURE__ */ e(r, {})
|
17
|
+
}
|
18
|
+
) : /* @__PURE__ */ e(r, {});
|
19
|
+
};
|
57
20
|
export {
|
58
|
-
|
21
|
+
l as LoadingMask
|
59
22
|
};
|