@oneplatformdev/ui 0.0.1-beta.64 → 0.0.1-beta.67
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/Button/buttonVariants.mjs +3 -3
- package/Checkbox/Checkbox.d.ts +4 -3
- 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/Dialog/Dialog.d.ts +2 -2
- package/Dialog/Dialog.mjs +14 -12
- package/FormCheckbox/FormCheckbox.d.ts +1 -1
- package/FormCheckbox/FormCheckbox.mjs +23 -23
- package/FormCheckbox/FormCheckbox.types.d.ts +3 -2
- package/Label/Label.d.ts +2 -2
- package/Label/labelVariants.mjs +1 -1
- package/LazyLoader/LazyLoader.mjs +5 -4
- package/LoadingMask/LoadingMask.d.ts +4 -1
- package/LoadingMask/LoadingMask.mjs +18 -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/ScrollArea/ScrollArea.d.ts +2 -2
- package/ScrollArea/ScrollArea.mjs +26 -13
- package/index.css +1 -1
- package/index.mjs +287 -284
- package/package.json +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
import { cva as e } from "class-variance-authority";
|
2
|
-
const
|
2
|
+
const t = e(
|
3
3
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
4
4
|
{
|
5
5
|
variants: {
|
@@ -20,10 +20,10 @@ const r = e(
|
|
20
20
|
},
|
21
21
|
defaultVariants: {
|
22
22
|
variant: "default",
|
23
|
-
size: "
|
23
|
+
size: "lg"
|
24
24
|
}
|
25
25
|
}
|
26
26
|
);
|
27
27
|
export {
|
28
|
-
|
28
|
+
t as buttonVariants
|
29
29
|
};
|
package/Checkbox/Checkbox.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
+
import { CheckboxLabelProps, CheckboxProps } from './Checkbox.types.ts';
|
1
2
|
import * as React from "react";
|
2
|
-
|
3
|
-
declare const
|
4
|
-
export { Checkbox };
|
3
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
4
|
+
declare const CheckboxLabel: React.ForwardRefExoticComponent<CheckboxLabelProps & React.RefAttributes<HTMLLabelElement>>;
|
5
|
+
export { Checkbox, CheckboxLabel };
|
package/Checkbox/Checkbox.mjs
CHANGED
@@ -1,27 +1,54 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import * as s from "react";
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import { cn as
|
6
|
-
|
7
|
-
|
1
|
+
import { jsx as r, jsxs as n } from "react/jsx-runtime";
|
2
|
+
import * as s from "@radix-ui/react-checkbox";
|
3
|
+
import { MinusIcon as l, CheckIcon as h } from "lucide-react";
|
4
|
+
import * as m from "react";
|
5
|
+
import { cn as a } from "@oneplatformdev/utils";
|
6
|
+
import { Label as u } from "../Label/Label.mjs";
|
7
|
+
import "../Label/labelVariants.mjs";
|
8
|
+
const d = m.forwardRef(({ className: t, checked: c, indeterminate: e, ...i }, o) => {
|
9
|
+
const f = e ? l : h;
|
10
|
+
return /* @__PURE__ */ r(
|
11
|
+
s.Root,
|
12
|
+
{
|
13
|
+
ref: o,
|
14
|
+
className: a(
|
15
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
16
|
+
t
|
17
|
+
),
|
18
|
+
...i,
|
19
|
+
checked: c || e,
|
20
|
+
children: /* @__PURE__ */ r(
|
21
|
+
s.Indicator,
|
22
|
+
{
|
23
|
+
className: a("flex items-center justify-center text-current"),
|
24
|
+
children: /* @__PURE__ */ r(f, { className: "h-4 w-4" })
|
25
|
+
}
|
26
|
+
)
|
27
|
+
}
|
28
|
+
);
|
29
|
+
});
|
30
|
+
d.displayName = s.Root.displayName;
|
31
|
+
const x = m.forwardRef(({ label: t = "", children: c, labelProps: e, ...i }, o) => /* @__PURE__ */ n(
|
32
|
+
u,
|
8
33
|
{
|
9
|
-
ref:
|
10
|
-
|
11
|
-
|
12
|
-
|
34
|
+
ref: o,
|
35
|
+
...e,
|
36
|
+
className: a(
|
37
|
+
"flex w-full items-start gap-3 font-normal py-3 cursor-pointer",
|
38
|
+
e == null ? void 0 : e.className
|
13
39
|
),
|
14
|
-
|
15
|
-
children:
|
16
|
-
r
|
17
|
-
{
|
18
|
-
className:
|
19
|
-
|
20
|
-
}
|
21
|
-
|
40
|
+
style: e == null ? void 0 : e.style,
|
41
|
+
children: [
|
42
|
+
/* @__PURE__ */ r(d, { ...i }),
|
43
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col w-full gap-3", children: [
|
44
|
+
/* @__PURE__ */ r("span", { className: "flex flex-col justify-start leading-[16px]", children: t }),
|
45
|
+
c
|
46
|
+
] })
|
47
|
+
]
|
22
48
|
}
|
23
49
|
));
|
24
|
-
|
50
|
+
x.displayName = "CheckboxLabel";
|
25
51
|
export {
|
26
|
-
d as Checkbox
|
52
|
+
d as Checkbox,
|
53
|
+
x as CheckboxLabel
|
27
54
|
};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Label } from '../Label/Label';
|
2
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
3
|
+
import * as React from "react";
|
4
|
+
export interface CheckboxProps extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> {
|
5
|
+
indeterminate?: boolean;
|
6
|
+
}
|
7
|
+
export interface CheckboxLabelProps extends CheckboxProps {
|
8
|
+
label?: string;
|
9
|
+
labelProps?: React.ComponentPropsWithoutRef<typeof Label>;
|
10
|
+
}
|
package/Checkbox/index.d.ts
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
export * from './Checkbox';
|
1
|
+
export * from './Checkbox.tsx';
|
2
|
+
export type * from './Checkbox.types.ts';
|
package/Checkbox/index.mjs
CHANGED
package/Combobox/Combobox.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
import { ComboboxProps } from './Combobox.types';
|
2
|
-
import {
|
2
|
+
import { default as React } from 'react';
|
3
3
|
|
4
|
-
export declare const Combobox:
|
4
|
+
export declare const Combobox: React.ForwardRefExoticComponent<ComboboxProps & React.RefAttributes<HTMLDivElement>>;
|
package/Combobox/Combobox.mjs
CHANGED
@@ -1,86 +1,88 @@
|
|
1
|
-
import { jsx as a, jsxs as
|
2
|
-
import s, { useRef as
|
3
|
-
import { LoadingMask as
|
4
|
-
import
|
5
|
-
import {
|
1
|
+
import { jsx as a, jsxs as r, Fragment as G } from "react/jsx-runtime";
|
2
|
+
import s, { forwardRef as I, useRef as U, useEffect as q, useCallback as c, useLayoutEffect as A } from "react";
|
3
|
+
import { LoadingMask as V } from "../LoadingMask/LoadingMask.mjs";
|
4
|
+
import "../LoadingMask/RenderLoadingMask.mjs";
|
5
|
+
import { Popover as X, PopoverTrigger as H, PopoverContent as J } from "../Popover/Popover.mjs";
|
6
|
+
import { Button as K } from "../Button/Button.mjs";
|
6
7
|
import "../Button/buttonVariants.mjs";
|
7
|
-
import { Command as
|
8
|
+
import { Command as Q, CommandInput as W, CommandList as Y, CommandGroup as Z, CommandEmpty as j, CommandItem as $ } from "../Command/Command.mjs";
|
8
9
|
import { cn as h } from "@oneplatformdev/utils";
|
9
|
-
import { useDebounceCallback as
|
10
|
-
import { X as
|
11
|
-
const
|
12
|
-
var
|
10
|
+
import { useDebounceCallback as ee } from "@oneplatformdev/hooks";
|
11
|
+
import { X as ae, ChevronsUpDown as te, Check as re } from "lucide-react";
|
12
|
+
const fe = I((k, O) => {
|
13
|
+
var L;
|
13
14
|
const {
|
14
|
-
value:
|
15
|
+
value: o,
|
15
16
|
onChange: P,
|
16
17
|
placeholder: D,
|
17
18
|
disabled: T,
|
18
19
|
searchLabel: B = "Type to search...",
|
19
20
|
fetchOptions: E,
|
20
|
-
options:
|
21
|
+
options: n,
|
21
22
|
emptyLabel: C = "No options",
|
22
23
|
emptyAction: i,
|
23
24
|
onMount: x
|
24
|
-
} =
|
25
|
-
|
26
|
-
|
27
|
-
}, [
|
25
|
+
} = k, f = U(!1), [t, d] = s.useState(!1), [m, w] = s.useState(""), [p, u] = s.useState([]), [b, N] = s.useState(), [g, l] = s.useState(!1);
|
26
|
+
q(() => {
|
27
|
+
n != null && n.length && u(n);
|
28
|
+
}, [n]);
|
28
29
|
const M = async () => {
|
29
30
|
t || (S(), w(""));
|
30
31
|
}, S = c(async (e) => {
|
31
32
|
l(!0);
|
32
33
|
try {
|
33
34
|
const y = await E(e);
|
34
|
-
|
35
|
+
u(y);
|
35
36
|
} catch (y) {
|
36
37
|
console.error("Unexpected error while get option:", y);
|
37
38
|
} finally {
|
38
39
|
l(!1);
|
39
40
|
}
|
40
|
-
}, []),
|
41
|
+
}, []), R = ee(S, 1e3, {
|
41
42
|
leading: !1,
|
42
43
|
trailing: !0
|
43
|
-
}),
|
44
|
-
l(!0), w(e),
|
44
|
+
}), _ = c((e) => {
|
45
|
+
l(!0), w(e), R(e);
|
45
46
|
}, []), v = c((e) => {
|
46
47
|
P(e.value), N(e), l(!1);
|
47
|
-
}, []),
|
48
|
-
|
49
|
-
}, []),
|
48
|
+
}, []), z = c(() => {
|
49
|
+
v({ value: "", label: "" }), N(void 0), l(!1);
|
50
|
+
}, []), F = c(() => {
|
50
51
|
if (!x) {
|
51
52
|
f.current = !0;
|
52
53
|
return;
|
53
54
|
}
|
54
|
-
x({ setOptions:
|
55
|
+
x({ setOptions: u, search: m || "", open: t, setOpen: d }).finally(
|
55
56
|
() => {
|
56
57
|
f.current = !0;
|
57
58
|
}
|
58
59
|
);
|
59
60
|
}, []);
|
60
|
-
return
|
61
|
+
return A(() => (F(), () => {
|
61
62
|
f.current = !1;
|
62
|
-
}), []), /* @__PURE__ */ a("div", { className: "w-full", children: /* @__PURE__ */
|
63
|
-
|
63
|
+
}), []), /* @__PURE__ */ a("div", { className: "w-full", ref: O, children: /* @__PURE__ */ r(
|
64
|
+
X,
|
64
65
|
{
|
65
66
|
open: t,
|
66
67
|
onOpenChange: (e) => {
|
67
68
|
d(e), e && M();
|
68
69
|
},
|
69
70
|
children: [
|
70
|
-
/* @__PURE__ */ a(
|
71
|
-
|
71
|
+
/* @__PURE__ */ a(H, { asChild: !0, className: "border-input", children: /* @__PURE__ */ r(
|
72
|
+
K,
|
72
73
|
{
|
73
74
|
variant: "outline",
|
74
75
|
role: "combobox",
|
76
|
+
size: "lg",
|
75
77
|
"aria-expanded": t,
|
76
78
|
className: h(
|
77
|
-
"w-full justify-between font-normal text-sm border bg-transparent relative",
|
79
|
+
"w-full justify-between font-normal text-sm border bg-transparent relative p-3",
|
78
80
|
t ? "border-2 border-sidebar-accent" : "border-border"
|
79
81
|
),
|
80
82
|
disabled: T,
|
81
83
|
children: [
|
82
|
-
/* @__PURE__ */ a("span", { className: "truncate max-w-[calc(100%-1.5rem)] overflow-hidden whitespace-nowrap", children:
|
83
|
-
|
84
|
+
/* @__PURE__ */ a("span", { className: "truncate max-w-[calc(100%-1.5rem)] overflow-hidden whitespace-nowrap", children: o ? ((L = p.find((e) => e.value === o)) == null ? void 0 : L.label) || (b == null ? void 0 : b.label) : /* @__PURE__ */ a("span", { className: "text-gray-400", children: D }) }),
|
85
|
+
o ? /* @__PURE__ */ a(
|
84
86
|
"div",
|
85
87
|
{
|
86
88
|
className: h(
|
@@ -90,58 +92,58 @@ const ue = (O) => {
|
|
90
92
|
"opacity-50 cursor-pointer hover:opacity-100"
|
91
93
|
),
|
92
94
|
onClick: (e) => {
|
93
|
-
e.stopPropagation(),
|
95
|
+
e.stopPropagation(), z();
|
94
96
|
},
|
95
|
-
children: /* @__PURE__ */ a(
|
97
|
+
children: /* @__PURE__ */ a(ae, {})
|
96
98
|
}
|
97
|
-
) : /* @__PURE__ */ a(
|
99
|
+
) : /* @__PURE__ */ a(te, { className: "opacity-50 w-4 h-4" })
|
98
100
|
]
|
99
101
|
}
|
100
102
|
) }),
|
101
103
|
/* @__PURE__ */ a(
|
102
|
-
|
104
|
+
J,
|
103
105
|
{
|
104
106
|
className: "w-[var(--radix-popper-anchor-width)] max-w-none p-0",
|
105
107
|
align: "start",
|
106
|
-
children: /* @__PURE__ */
|
108
|
+
children: /* @__PURE__ */ r(Q, { shouldFilter: !1, children: [
|
107
109
|
/* @__PURE__ */ a(
|
108
|
-
|
110
|
+
W,
|
109
111
|
{
|
110
112
|
placeholder: B,
|
111
113
|
value: m,
|
112
|
-
onValueChange:
|
114
|
+
onValueChange: _
|
113
115
|
}
|
114
116
|
),
|
115
|
-
/* @__PURE__ */ a(
|
116
|
-
|
117
|
+
/* @__PURE__ */ a(Y, { children: /* @__PURE__ */ r(
|
118
|
+
Z,
|
117
119
|
{
|
118
|
-
className: h(!
|
120
|
+
className: h(!p.length && "p-0 shadow-none"),
|
119
121
|
children: [
|
120
|
-
g && /* @__PURE__ */ a("div", { className: "flex justify-center", children: /* @__PURE__ */ a(
|
121
|
-
!g && !!m && /* @__PURE__ */ a(
|
122
|
+
g && /* @__PURE__ */ a("div", { className: "flex justify-center", children: /* @__PURE__ */ a(V, {}) }),
|
123
|
+
!g && !!m && /* @__PURE__ */ a(G, { children: i ? /* @__PURE__ */ r(j, { className: "flex flex-col gap-3 py-5 px-3 items-center", children: [
|
122
124
|
/* @__PURE__ */ a("span", { children: C }),
|
123
125
|
typeof i == "function" ? i({
|
124
|
-
setOptions:
|
126
|
+
setOptions: u,
|
125
127
|
search: m || "",
|
126
128
|
open: t,
|
127
129
|
setOpen: d
|
128
130
|
}) : i
|
129
|
-
] }) : /* @__PURE__ */ a(
|
130
|
-
!g && !!
|
131
|
-
|
131
|
+
] }) : /* @__PURE__ */ a(j, { children: C }) }),
|
132
|
+
!g && !!p.length && p.map((e) => /* @__PURE__ */ r(
|
133
|
+
$,
|
132
134
|
{
|
133
135
|
value: e.value,
|
134
136
|
onSelect: () => {
|
135
|
-
|
137
|
+
o === e.value ? v({ value: "", label: "" }) : v(e), d(!1);
|
136
138
|
},
|
137
139
|
children: [
|
138
140
|
e.label,
|
139
141
|
/* @__PURE__ */ a(
|
140
|
-
|
142
|
+
re,
|
141
143
|
{
|
142
144
|
className: h(
|
143
145
|
"ml-auto",
|
144
|
-
|
146
|
+
o === e.value ? "opacity-100" : "opacity-0"
|
145
147
|
)
|
146
148
|
}
|
147
149
|
)
|
@@ -158,7 +160,7 @@ const ue = (O) => {
|
|
158
160
|
]
|
159
161
|
}
|
160
162
|
) });
|
161
|
-
};
|
163
|
+
});
|
162
164
|
export {
|
163
|
-
|
165
|
+
fe as Combobox
|
164
166
|
};
|
package/Dialog/Dialog.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as React from
|
2
|
-
import * as DialogPrimitive from
|
1
|
+
import * as React from 'react';
|
2
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
3
3
|
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
4
4
|
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
5
5
|
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
package/Dialog/Dialog.mjs
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
import { jsx as o, jsxs as
|
1
|
+
import { jsx as o, jsxs as d } from "react/jsx-runtime";
|
2
2
|
import * as l from "react";
|
3
3
|
import * as e from "@radix-ui/react-dialog";
|
4
4
|
import { X as c } from "lucide-react";
|
5
5
|
import { cn as i } from "@oneplatformdev/utils";
|
6
|
-
const b = e.Root, h = e.Trigger, m = e.Portal,
|
6
|
+
const b = e.Root, h = e.Trigger, m = e.Portal, w = e.Close, n = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
7
7
|
e.Overlay,
|
8
8
|
{
|
9
9
|
ref: s,
|
@@ -14,21 +14,23 @@ const b = e.Root, h = e.Trigger, m = e.Portal, v = e.Close, d = l.forwardRef(({
|
|
14
14
|
...t
|
15
15
|
}
|
16
16
|
));
|
17
|
-
|
18
|
-
const f = l.forwardRef(({ className: a, children: t, ...s }, r) => /* @__PURE__ */
|
19
|
-
/* @__PURE__ */ o(
|
20
|
-
/* @__PURE__ */
|
17
|
+
n.displayName = e.Overlay.displayName;
|
18
|
+
const f = l.forwardRef(({ className: a, children: t, ...s }, r) => /* @__PURE__ */ d(m, { children: [
|
19
|
+
/* @__PURE__ */ o(n, {}),
|
20
|
+
/* @__PURE__ */ d(
|
21
21
|
e.Content,
|
22
22
|
{
|
23
23
|
ref: r,
|
24
24
|
className: i(
|
25
25
|
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
26
|
+
"max-w-[90%] max-h-[90%] overflow-hidden",
|
27
|
+
"bg-[#FCFCFC] border border-[#E8E9EB] rounded-[16px]",
|
26
28
|
a
|
27
29
|
),
|
28
30
|
...s,
|
29
31
|
children: [
|
30
32
|
t,
|
31
|
-
/* @__PURE__ */
|
33
|
+
/* @__PURE__ */ d(e.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
32
34
|
/* @__PURE__ */ o(c, { className: "h-4 w-4" }),
|
33
35
|
/* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
|
34
36
|
] })
|
@@ -77,7 +79,7 @@ const u = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
|
77
79
|
}
|
78
80
|
));
|
79
81
|
u.displayName = e.Title.displayName;
|
80
|
-
const
|
82
|
+
const x = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
81
83
|
e.Description,
|
82
84
|
{
|
83
85
|
ref: s,
|
@@ -85,15 +87,15 @@ const y = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
|
|
85
87
|
...t
|
86
88
|
}
|
87
89
|
));
|
88
|
-
|
90
|
+
x.displayName = e.Description.displayName;
|
89
91
|
export {
|
90
92
|
b as Dialog,
|
91
|
-
|
93
|
+
w as DialogClose,
|
92
94
|
f as DialogContent,
|
93
|
-
|
95
|
+
x as DialogDescription,
|
94
96
|
g as DialogFooter,
|
95
97
|
p as DialogHeader,
|
96
|
-
|
98
|
+
n as DialogOverlay,
|
97
99
|
m as DialogPortal,
|
98
100
|
u as DialogTitle,
|
99
101
|
h as DialogTrigger
|
@@ -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,30 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
const
|
6
|
-
const { form:
|
7
|
-
return /* @__PURE__ */
|
8
|
-
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
2
|
+
import { FormControl as h } from "../Form/Form.mjs";
|
3
|
+
import { FormRenderControl as p } from "../Form/FormRenderControl.mjs";
|
4
|
+
import { CheckboxLabel as s } from "../Checkbox/Checkbox.mjs";
|
5
|
+
const i = (t) => {
|
6
|
+
const { form: c, label: a, name: l, onCheckedChange: o, ...m } = t;
|
7
|
+
return /* @__PURE__ */ e(
|
8
|
+
p,
|
9
9
|
{
|
10
|
-
form:
|
11
|
-
name:
|
12
|
-
render: ({ field:
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
10
|
+
form: c,
|
11
|
+
name: l,
|
12
|
+
render: ({ field: r }) => /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(
|
13
|
+
s,
|
14
|
+
{
|
15
|
+
...r,
|
16
|
+
...m,
|
17
|
+
label: a,
|
18
|
+
checked: r.value || !1,
|
19
|
+
onCheckedChange: (n) => {
|
20
|
+
r.onChange(n), o == null || o(n);
|
20
21
|
}
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
...c
|
22
|
+
}
|
23
|
+
) }),
|
24
|
+
...m
|
25
25
|
}
|
26
26
|
);
|
27
27
|
};
|
28
28
|
export {
|
29
|
-
|
29
|
+
i as FormCheckbox
|
30
30
|
};
|
@@ -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
|
}
|
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/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,21 @@
|
|
1
|
-
import { jsx as
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
"
|
13
|
-
|
14
|
-
d: "M17.1475 6.8525L16.0625 7.9375",
|
15
|
-
stroke: "currentColor",
|
16
|
-
strokeWidth: "2",
|
17
|
-
strokeLinecap: "round",
|
18
|
-
strokeLinejoin: "round"
|
19
|
-
}
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
2
|
+
import { RenderLoadingMask as r } from "./RenderLoadingMask.mjs";
|
3
|
+
import { cn as o } from "@oneplatformdev/utils";
|
4
|
+
const f = (t) => {
|
5
|
+
const { fullWidth: s = !1, className: i, ...n } = t;
|
6
|
+
return s ? /* @__PURE__ */ e(
|
7
|
+
"div",
|
8
|
+
{
|
9
|
+
...n,
|
10
|
+
className: o(
|
11
|
+
"absolute inset-0",
|
12
|
+
"flex items-center justify-center",
|
13
|
+
i
|
20
14
|
),
|
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
|
-
) });
|
15
|
+
children: /* @__PURE__ */ e(r, {})
|
16
|
+
}
|
17
|
+
) : /* @__PURE__ */ e(r, {});
|
18
|
+
};
|
57
19
|
export {
|
58
|
-
|
20
|
+
f as LoadingMask
|
59
21
|
};
|