@yuno-payments/dashboard-design-system 0.0.81 → 0.0.83
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/dist/components/atoms/checkbox/checkbox.d.ts +3 -2
- package/dist/components/atoms/checkbox/checkbox.js +45 -23
- package/dist/components/atoms/multi-select/multi-select.d.ts +1 -1
- package/dist/components/atoms/multi-select/multi-select.js +6 -6
- package/dist/components/atoms/radio-group/radio-group.d.ts +2 -1
- package/dist/components/atoms/radio-group/radio-group.js +13 -12
- package/dist/components/atoms/select/search-select.d.ts +1 -1
- package/dist/components/atoms/select/search-select.js +28 -28
- package/dist/components/atoms/select/select.d.ts +1 -1
- package/dist/components/atoms/select/select.js +21 -21
- package/dist/components/atoms/switch/switch.d.ts +2 -1
- package/dist/components/atoms/switch/switch.js +14 -12
- package/dist/components/atoms/time-picker/time-picker.d.ts +1 -1
- package/dist/components/atoms/time-picker/time-picker.js +1 -1
- package/dist/components/atoms/toggle-group/toggle-group.d.ts +2 -1
- package/dist/components/atoms/toggle-group/toggle-group.js +15 -14
- package/dist/vendor/shadcn/date-picker.d.ts +2 -2
- package/dist/vendor/shadcn/date-picker.js +1 -1
- package/dist/vendor/shadcn/date-range-picker.d.ts +2 -2
- package/dist/vendor/shadcn/date-range-picker.js +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
1
|
+
import { ComponentProps, ChangeEvent } from 'react';
|
|
2
2
|
import { Checkbox as ShadcnCheckbox } from '../../../vendor/shadcn/checkbox';
|
|
3
|
-
export interface CheckboxProps extends Omit<ComponentProps<typeof ShadcnCheckbox>, "children"> {
|
|
3
|
+
export interface CheckboxProps extends Omit<ComponentProps<typeof ShadcnCheckbox>, "children" | "onCheckedChange"> {
|
|
4
4
|
label?: string;
|
|
5
5
|
description?: string;
|
|
6
|
+
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
6
7
|
}
|
|
7
8
|
declare const Checkbox: import('react').ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
8
9
|
export { Checkbox };
|
|
@@ -1,49 +1,71 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Checkbox as
|
|
2
|
+
import { forwardRef as u, useId as d } from "react";
|
|
3
|
+
import { Checkbox as g } from "../../../vendor/shadcn/checkbox.js";
|
|
4
4
|
import { cn as m } from "../../../lib/utils.js";
|
|
5
|
-
import { Label as
|
|
6
|
-
const
|
|
7
|
-
({ label:
|
|
8
|
-
const
|
|
9
|
-
|
|
5
|
+
import { Label as C } from "../../../vendor/shadcn/label.js";
|
|
6
|
+
const j = u(
|
|
7
|
+
({ label: n, description: c, id: i, name: t, disabled: s, onChange: a, ...l }, f) => {
|
|
8
|
+
const p = d(), o = i || t || p, h = (r) => {
|
|
9
|
+
if (!a) return;
|
|
10
|
+
a({
|
|
11
|
+
target: {
|
|
12
|
+
name: t || o,
|
|
13
|
+
checked: r,
|
|
14
|
+
type: "checkbox",
|
|
15
|
+
value: r ? "on" : "off"
|
|
16
|
+
},
|
|
17
|
+
currentTarget: {
|
|
18
|
+
name: t || o,
|
|
19
|
+
checked: r,
|
|
20
|
+
type: "checkbox",
|
|
21
|
+
value: r ? "on" : "off"
|
|
22
|
+
},
|
|
23
|
+
preventDefault: () => {
|
|
24
|
+
},
|
|
25
|
+
stopPropagation: () => {
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}, x = /* @__PURE__ */ e.jsx(
|
|
29
|
+
g,
|
|
10
30
|
{
|
|
11
|
-
ref:
|
|
12
|
-
id:
|
|
13
|
-
|
|
14
|
-
|
|
31
|
+
ref: f,
|
|
32
|
+
id: o,
|
|
33
|
+
name: t,
|
|
34
|
+
disabled: s,
|
|
35
|
+
onCheckedChange: h,
|
|
36
|
+
...l,
|
|
15
37
|
className: "size-3.5 cursor-pointer"
|
|
16
38
|
}
|
|
17
39
|
);
|
|
18
|
-
return
|
|
19
|
-
|
|
40
|
+
return n ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
|
|
41
|
+
x,
|
|
20
42
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
21
43
|
/* @__PURE__ */ e.jsx(
|
|
22
|
-
|
|
44
|
+
C,
|
|
23
45
|
{
|
|
24
|
-
htmlFor:
|
|
46
|
+
htmlFor: o,
|
|
25
47
|
className: m(
|
|
26
48
|
"text-sm leading-none cursor-pointer",
|
|
27
|
-
|
|
49
|
+
s && "text-muted-foreground"
|
|
28
50
|
),
|
|
29
|
-
children:
|
|
51
|
+
children: n
|
|
30
52
|
}
|
|
31
53
|
),
|
|
32
|
-
|
|
54
|
+
c && /* @__PURE__ */ e.jsx(
|
|
33
55
|
"p",
|
|
34
56
|
{
|
|
35
57
|
className: m(
|
|
36
58
|
"text-sm text-neutral-500",
|
|
37
|
-
|
|
59
|
+
s && "opacity-50"
|
|
38
60
|
),
|
|
39
|
-
children:
|
|
61
|
+
children: c
|
|
40
62
|
}
|
|
41
63
|
)
|
|
42
64
|
] })
|
|
43
|
-
] }) :
|
|
65
|
+
] }) : x;
|
|
44
66
|
}
|
|
45
67
|
);
|
|
46
|
-
|
|
68
|
+
j.displayName = "Checkbox";
|
|
47
69
|
export {
|
|
48
|
-
|
|
70
|
+
j as Checkbox
|
|
49
71
|
};
|
|
@@ -10,7 +10,7 @@ const D = c.forwardRef(
|
|
|
10
10
|
({
|
|
11
11
|
options: m,
|
|
12
12
|
value: s = [],
|
|
13
|
-
|
|
13
|
+
onChange: l,
|
|
14
14
|
placeholder: b = "Select items...",
|
|
15
15
|
searchPlaceholder: w = "Search...",
|
|
16
16
|
emptyMessage: N = "No results found.",
|
|
@@ -23,10 +23,10 @@ const D = c.forwardRef(
|
|
|
23
23
|
showBadges: x = !0,
|
|
24
24
|
allowClear: y = !0
|
|
25
25
|
}, k) => {
|
|
26
|
-
const [h, S] = c.useState(!1), [p,
|
|
26
|
+
const [h, S] = c.useState(!1), [p, V] = c.useState(""), L = (t) => {
|
|
27
27
|
const r = s.includes(t) ? s.filter((d) => d !== t) : [...s, t];
|
|
28
28
|
l?.(r);
|
|
29
|
-
},
|
|
29
|
+
}, P = (t, r) => {
|
|
30
30
|
r?.preventDefault(), r?.stopPropagation();
|
|
31
31
|
const d = s.filter((R) => R !== t);
|
|
32
32
|
l?.(d);
|
|
@@ -64,7 +64,7 @@ const D = c.forwardRef(
|
|
|
64
64
|
{
|
|
65
65
|
type: "button",
|
|
66
66
|
className: "ml-1 rounded-full outline-hidden hover:bg-muted-foreground/20",
|
|
67
|
-
onClick: (r) =>
|
|
67
|
+
onClick: (r) => P(t.value, r),
|
|
68
68
|
children: /* @__PURE__ */ e.jsx(g, { className: "h-3 w-3" })
|
|
69
69
|
}
|
|
70
70
|
)
|
|
@@ -120,7 +120,7 @@ const D = c.forwardRef(
|
|
|
120
120
|
{
|
|
121
121
|
placeholder: w,
|
|
122
122
|
value: p,
|
|
123
|
-
onValueChange:
|
|
123
|
+
onValueChange: V
|
|
124
124
|
}
|
|
125
125
|
),
|
|
126
126
|
/* @__PURE__ */ e.jsx(I, { children: N }),
|
|
@@ -131,7 +131,7 @@ const D = c.forwardRef(
|
|
|
131
131
|
{
|
|
132
132
|
value: t.value,
|
|
133
133
|
onSelect: () => {
|
|
134
|
-
|
|
134
|
+
L(t.value);
|
|
135
135
|
},
|
|
136
136
|
children: [
|
|
137
137
|
/* @__PURE__ */ e.jsx(
|
|
@@ -6,10 +6,11 @@ interface RadioOption {
|
|
|
6
6
|
description?: string;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
}
|
|
9
|
-
interface RadioGroupProps extends Omit<ComponentProps<typeof ShadcnRadioGroup>, "children"> {
|
|
9
|
+
interface RadioGroupProps extends Omit<ComponentProps<typeof ShadcnRadioGroup>, "children" | "onValueChange"> {
|
|
10
10
|
options: RadioOption[];
|
|
11
11
|
orientation?: "vertical" | "horizontal";
|
|
12
12
|
layout?: "stacked" | "inline";
|
|
13
|
+
onChange?: (value: string) => void;
|
|
13
14
|
}
|
|
14
15
|
declare const RadioGroup: import('react').ForwardRefExoticComponent<Omit<RadioGroupProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
15
16
|
export { RadioGroup, type RadioGroupProps, type RadioOption };
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { j as r } from "../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import { forwardRef as d } from "react";
|
|
3
3
|
import { RadioGroup as f } from "../../../vendor/shadcn/radio-group.js";
|
|
4
|
-
import { RadioGroupOption as
|
|
5
|
-
const
|
|
6
|
-
({ options: a, name:
|
|
7
|
-
const
|
|
4
|
+
import { RadioGroupOption as x } from "./radio-group-option.js";
|
|
5
|
+
const c = d(
|
|
6
|
+
({ options: a, name: e, orientation: i = "vertical", layout: t = "stacked", onChange: l, ...n }, s) => {
|
|
7
|
+
const p = t === "inline", m = i === "horizontal";
|
|
8
8
|
return /* @__PURE__ */ r.jsx(
|
|
9
9
|
f,
|
|
10
10
|
{
|
|
11
11
|
ref: s,
|
|
12
|
-
className:
|
|
13
|
-
|
|
12
|
+
className: m ? "flex flex-row flex-wrap gap-6" : "flex flex-col gap-3",
|
|
13
|
+
onValueChange: l,
|
|
14
|
+
...n,
|
|
14
15
|
children: a.map((o) => {
|
|
15
|
-
const
|
|
16
|
+
const u = `${e}-${o.value}`;
|
|
16
17
|
return /* @__PURE__ */ r.jsx(
|
|
17
|
-
|
|
18
|
+
x,
|
|
18
19
|
{
|
|
19
20
|
option: o,
|
|
20
|
-
radioId:
|
|
21
|
-
isInlineLayout:
|
|
21
|
+
radioId: u,
|
|
22
|
+
isInlineLayout: p
|
|
22
23
|
},
|
|
23
24
|
o.value
|
|
24
25
|
);
|
|
@@ -27,7 +28,7 @@ const x = d(
|
|
|
27
28
|
);
|
|
28
29
|
}
|
|
29
30
|
);
|
|
30
|
-
|
|
31
|
+
c.displayName = "RadioGroup";
|
|
31
32
|
export {
|
|
32
|
-
|
|
33
|
+
c as RadioGroup
|
|
33
34
|
};
|
|
@@ -8,7 +8,7 @@ export interface SearchSelectProps {
|
|
|
8
8
|
placeholder?: string;
|
|
9
9
|
value?: string;
|
|
10
10
|
defaultValue?: string;
|
|
11
|
-
|
|
11
|
+
onChange?: (value: string) => void;
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
options?: SelectOption[];
|
|
14
14
|
groups?: SelectOptionGroup[];
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as n from "react";
|
|
3
3
|
import { cn as a } from "../../../lib/utils.js";
|
|
4
|
-
import { FieldLabel as
|
|
5
|
-
import { Combobox as
|
|
6
|
-
import { Command as
|
|
4
|
+
import { FieldLabel as A } from "../../../vendor/shadcn/field.js";
|
|
5
|
+
import { Combobox as B, ComboboxTrigger as H, ComboboxContent as J } from "../../../vendor/shadcn/combobox.js";
|
|
6
|
+
import { Command as K, CommandInput as M, CommandList as P, CommandEmpty as Q, CommandGroup as U, CommandItem as k } from "../../../vendor/shadcn/command.js";
|
|
7
7
|
import { Typography as x } from "../typography/typography.js";
|
|
8
8
|
import { Icon as b } from "../icon/icon.js";
|
|
9
|
-
const
|
|
9
|
+
const W = n.forwardRef(
|
|
10
10
|
({
|
|
11
11
|
label: j,
|
|
12
12
|
description: N,
|
|
@@ -15,7 +15,7 @@ const X = l.forwardRef(
|
|
|
15
15
|
placeholder: L = "Select an option",
|
|
16
16
|
value: r,
|
|
17
17
|
defaultValue: p,
|
|
18
|
-
|
|
18
|
+
onChange: h,
|
|
19
19
|
disabled: f = !1,
|
|
20
20
|
options: c = [],
|
|
21
21
|
groups: o = [],
|
|
@@ -24,47 +24,47 @@ const X = l.forwardRef(
|
|
|
24
24
|
searchPlaceholder: z = "Search...",
|
|
25
25
|
maxHeight: F = 300
|
|
26
26
|
}, I) => {
|
|
27
|
-
const [i, C] =
|
|
27
|
+
const [i, C] = n.useState(!1), [v, S] = n.useState(""), d = o.length > 0, w = c.length > 0, R = n.useCallback(() => {
|
|
28
28
|
if (!r) return null;
|
|
29
29
|
if (d)
|
|
30
30
|
for (const s of o) {
|
|
31
|
-
const
|
|
32
|
-
if (
|
|
31
|
+
const l = s.options.find((t) => t.value === r);
|
|
32
|
+
if (l) return l.label;
|
|
33
33
|
}
|
|
34
34
|
else if (w) {
|
|
35
|
-
const s = c.find((
|
|
35
|
+
const s = c.find((l) => l.value === r);
|
|
36
36
|
if (s) return s.label;
|
|
37
37
|
}
|
|
38
38
|
return null;
|
|
39
|
-
}, [r, o, c, d, w]), T =
|
|
39
|
+
}, [r, o, c, d, w]), T = n.useCallback(
|
|
40
40
|
(s) => {
|
|
41
41
|
if (!s)
|
|
42
42
|
return { filteredOptions: c, filteredGroups: o };
|
|
43
|
-
const
|
|
43
|
+
const l = s.toLowerCase();
|
|
44
44
|
if (d) {
|
|
45
45
|
const t = o.map((m) => ({
|
|
46
46
|
...m,
|
|
47
47
|
options: m.options.filter(
|
|
48
|
-
(
|
|
48
|
+
(V) => V.label.toLowerCase().includes(l)
|
|
49
49
|
)
|
|
50
50
|
})).filter((m) => m.options.length > 0);
|
|
51
51
|
return { filteredOptions: [], filteredGroups: t };
|
|
52
52
|
} else
|
|
53
53
|
return { filteredOptions: c.filter(
|
|
54
|
-
(m) => m.label.toLowerCase().includes(
|
|
54
|
+
(m) => m.label.toLowerCase().includes(l)
|
|
55
55
|
), filteredGroups: [] };
|
|
56
56
|
},
|
|
57
57
|
[c, o, d]
|
|
58
58
|
), { filteredOptions: q, filteredGroups: D } = T(v);
|
|
59
|
-
|
|
59
|
+
n.useEffect(() => {
|
|
60
60
|
i && setTimeout(() => {
|
|
61
61
|
document.querySelector(
|
|
62
62
|
'[data-slot="command-input"]'
|
|
63
63
|
)?.focus();
|
|
64
64
|
}, 0);
|
|
65
|
-
}, [i]),
|
|
65
|
+
}, [i]), n.useEffect(() => {
|
|
66
66
|
i || S("");
|
|
67
|
-
}, [i]),
|
|
67
|
+
}, [i]), n.useEffect(() => {
|
|
68
68
|
p && !r && h?.(p);
|
|
69
69
|
}, [p, r, h]);
|
|
70
70
|
const y = (s) => {
|
|
@@ -72,7 +72,7 @@ const X = l.forwardRef(
|
|
|
72
72
|
}, O = R();
|
|
73
73
|
return /* @__PURE__ */ e.jsxs("div", { className: a("w-full", E), children: [
|
|
74
74
|
j && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 mb-2", children: [
|
|
75
|
-
/* @__PURE__ */ e.jsx(
|
|
75
|
+
/* @__PURE__ */ e.jsx(A, { htmlFor: g, className: a(f && "text-muted-foreground"), children: j }),
|
|
76
76
|
G && /* @__PURE__ */ e.jsx(x, { variant: "sm", className: "text-muted-foreground", children: "(Optional)" })
|
|
77
77
|
] }),
|
|
78
78
|
N && !u && /* @__PURE__ */ e.jsx(
|
|
@@ -86,8 +86,8 @@ const X = l.forwardRef(
|
|
|
86
86
|
children: N
|
|
87
87
|
}
|
|
88
88
|
),
|
|
89
|
-
/* @__PURE__ */ e.jsxs(
|
|
90
|
-
/* @__PURE__ */ e.jsx(
|
|
89
|
+
/* @__PURE__ */ e.jsxs(B, { open: i, onOpenChange: C, children: [
|
|
90
|
+
/* @__PURE__ */ e.jsx(H, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
91
91
|
"button",
|
|
92
92
|
{
|
|
93
93
|
ref: I,
|
|
@@ -123,17 +123,17 @@ const X = l.forwardRef(
|
|
|
123
123
|
]
|
|
124
124
|
}
|
|
125
125
|
) }),
|
|
126
|
-
/* @__PURE__ */ e.jsx(
|
|
126
|
+
/* @__PURE__ */ e.jsx(J, { className: "p-0", align: "start", children: /* @__PURE__ */ e.jsxs(K, { shouldFilter: !1, children: [
|
|
127
127
|
/* @__PURE__ */ e.jsx(
|
|
128
|
-
|
|
128
|
+
M,
|
|
129
129
|
{
|
|
130
130
|
placeholder: z,
|
|
131
131
|
value: v,
|
|
132
132
|
onValueChange: S
|
|
133
133
|
}
|
|
134
134
|
),
|
|
135
|
-
/* @__PURE__ */ e.jsxs(
|
|
136
|
-
/* @__PURE__ */ e.jsx(
|
|
135
|
+
/* @__PURE__ */ e.jsxs(P, { style: { maxHeight: F }, children: [
|
|
136
|
+
/* @__PURE__ */ e.jsx(Q, { children: /* @__PURE__ */ e.jsx(
|
|
137
137
|
x,
|
|
138
138
|
{
|
|
139
139
|
variant: "sm",
|
|
@@ -141,7 +141,7 @@ const X = l.forwardRef(
|
|
|
141
141
|
children: "No results found."
|
|
142
142
|
}
|
|
143
143
|
) }),
|
|
144
|
-
d ? D.map((s,
|
|
144
|
+
d ? D.map((s, l) => /* @__PURE__ */ e.jsxs(U, { children: [
|
|
145
145
|
s.label && /* @__PURE__ */ e.jsx("div", { className: "px-2 py-1.5 text-xs font-medium text-muted-foreground", children: s.label }),
|
|
146
146
|
s.options.map((t) => /* @__PURE__ */ e.jsxs(
|
|
147
147
|
k,
|
|
@@ -169,7 +169,7 @@ const X = l.forwardRef(
|
|
|
169
169
|
},
|
|
170
170
|
t.value
|
|
171
171
|
))
|
|
172
|
-
] },
|
|
172
|
+
] }, l)) : q.map((s) => /* @__PURE__ */ e.jsxs(
|
|
173
173
|
k,
|
|
174
174
|
{
|
|
175
175
|
value: s.value,
|
|
@@ -195,7 +195,7 @@ const X = l.forwardRef(
|
|
|
195
195
|
] });
|
|
196
196
|
}
|
|
197
197
|
);
|
|
198
|
-
|
|
198
|
+
W.displayName = "SearchSelect";
|
|
199
199
|
export {
|
|
200
|
-
|
|
200
|
+
W as SearchSelect
|
|
201
201
|
};
|
|
@@ -16,7 +16,7 @@ export interface SelectProps {
|
|
|
16
16
|
placeholder?: string;
|
|
17
17
|
value?: string;
|
|
18
18
|
defaultValue?: string;
|
|
19
|
-
|
|
19
|
+
onChange?: (value: string) => void;
|
|
20
20
|
disabled?: boolean;
|
|
21
21
|
options?: SelectOption[];
|
|
22
22
|
groups?: SelectOptionGroup[];
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import * as y from "react";
|
|
3
3
|
import { cn as c } from "../../../lib/utils.js";
|
|
4
|
-
import { Select as w, SelectTrigger as
|
|
5
|
-
import { Label as
|
|
6
|
-
import { Typography as
|
|
7
|
-
const
|
|
4
|
+
import { Select as w, SelectTrigger as C, SelectValue as G, SelectContent as L, SelectGroup as O, SelectLabel as R, SelectItem as d } from "../../../vendor/shadcn/select.js";
|
|
5
|
+
import { Label as T } from "../../../vendor/shadcn/label.js";
|
|
6
|
+
import { Typography as n } from "../typography/typography.js";
|
|
7
|
+
const V = y.forwardRef(
|
|
8
8
|
({
|
|
9
|
-
label:
|
|
10
|
-
description:
|
|
9
|
+
label: r,
|
|
10
|
+
description: m,
|
|
11
11
|
error: a,
|
|
12
12
|
optional: j = !1,
|
|
13
13
|
placeholder: f = "Select an option",
|
|
14
14
|
value: u,
|
|
15
15
|
defaultValue: o,
|
|
16
|
-
|
|
16
|
+
onChange: p,
|
|
17
17
|
disabled: t = !1,
|
|
18
18
|
options: i = [],
|
|
19
19
|
groups: x = [],
|
|
@@ -22,19 +22,19 @@ const E = y.forwardRef(
|
|
|
22
22
|
}, N) => {
|
|
23
23
|
const S = x.length > 0, b = i.length > 0;
|
|
24
24
|
return /* @__PURE__ */ e.jsxs("div", { className: c("w-full", v), children: [
|
|
25
|
-
|
|
26
|
-
/* @__PURE__ */ e.jsx(
|
|
27
|
-
j && /* @__PURE__ */ e.jsx(
|
|
25
|
+
r && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 mb-2", children: [
|
|
26
|
+
/* @__PURE__ */ e.jsx(T, { htmlFor: h, className: c(t && "opacity-50"), children: r }),
|
|
27
|
+
j && /* @__PURE__ */ e.jsx(n, { variant: "sm", className: "text-muted-foreground", children: "(Optional)" })
|
|
28
28
|
] }),
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
m && !a && /* @__PURE__ */ e.jsx(
|
|
30
|
+
n,
|
|
31
31
|
{
|
|
32
32
|
variant: "sm",
|
|
33
33
|
className: c(
|
|
34
34
|
"text-muted-foreground mb-2",
|
|
35
35
|
t && "opacity-50"
|
|
36
36
|
),
|
|
37
|
-
children:
|
|
37
|
+
children: m
|
|
38
38
|
}
|
|
39
39
|
),
|
|
40
40
|
/* @__PURE__ */ e.jsxs(
|
|
@@ -46,18 +46,18 @@ const E = y.forwardRef(
|
|
|
46
46
|
disabled: t,
|
|
47
47
|
children: [
|
|
48
48
|
/* @__PURE__ */ e.jsx(
|
|
49
|
-
|
|
49
|
+
C,
|
|
50
50
|
{
|
|
51
51
|
ref: N,
|
|
52
52
|
id: h,
|
|
53
53
|
className: c(a && "border-destructive"),
|
|
54
|
-
children: /* @__PURE__ */ e.jsx(
|
|
54
|
+
children: /* @__PURE__ */ e.jsx(G, { placeholder: f })
|
|
55
55
|
}
|
|
56
56
|
),
|
|
57
|
-
/* @__PURE__ */ e.jsx(
|
|
57
|
+
/* @__PURE__ */ e.jsx(L, { children: S ? (
|
|
58
58
|
// Render grouped options
|
|
59
|
-
x.map((l, g) => /* @__PURE__ */ e.jsxs(
|
|
60
|
-
l.label && /* @__PURE__ */ e.jsx(
|
|
59
|
+
x.map((l, g) => /* @__PURE__ */ e.jsxs(O, { children: [
|
|
60
|
+
l.label && /* @__PURE__ */ e.jsx(R, { children: l.label }),
|
|
61
61
|
l.options.map((s) => /* @__PURE__ */ e.jsxs(d, { value: s.value, children: [
|
|
62
62
|
s.icon && /* @__PURE__ */ e.jsx("span", { className: "mr-2 inline-flex items-center", children: s.icon }),
|
|
63
63
|
s.label
|
|
@@ -73,11 +73,11 @@ const E = y.forwardRef(
|
|
|
73
73
|
]
|
|
74
74
|
}
|
|
75
75
|
),
|
|
76
|
-
a && /* @__PURE__ */ e.jsx(
|
|
76
|
+
a && /* @__PURE__ */ e.jsx(n, { variant: "sm", className: "text-destructive mt-2", children: a })
|
|
77
77
|
] });
|
|
78
78
|
}
|
|
79
79
|
);
|
|
80
|
-
|
|
80
|
+
V.displayName = "Select";
|
|
81
81
|
export {
|
|
82
|
-
|
|
82
|
+
V as Select
|
|
83
83
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Switch as ShadcnSwitch } from '../../../vendor/shadcn/switch';
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
|
-
export interface SwitchProps extends Omit<ComponentProps<typeof ShadcnSwitch>, "children"> {
|
|
3
|
+
export interface SwitchProps extends Omit<ComponentProps<typeof ShadcnSwitch>, "children" | "onCheckedChange"> {
|
|
4
4
|
label: string;
|
|
5
5
|
description?: string;
|
|
6
6
|
side?: "left" | "right";
|
|
7
7
|
variant?: "default" | "box";
|
|
8
|
+
onChange?: (checked: boolean) => void;
|
|
8
9
|
}
|
|
9
10
|
declare const Switch: import('react').ForwardRefExoticComponent<Omit<SwitchProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
10
11
|
export { Switch };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as e } from "../../../_virtual/jsx-runtime.js";
|
|
2
2
|
import { Switch as p } from "../../../vendor/shadcn/switch.js";
|
|
3
|
-
import { forwardRef as f, useId as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { Label as
|
|
3
|
+
import { forwardRef as f, useId as w } from "react";
|
|
4
|
+
import { cn as u } from "../../../lib/utils.js";
|
|
5
|
+
import { Label as g } from "../../../vendor/shadcn/label.js";
|
|
6
6
|
const j = f(
|
|
7
7
|
({
|
|
8
8
|
label: t,
|
|
@@ -11,25 +11,27 @@ const j = f(
|
|
|
11
11
|
variant: a = "default",
|
|
12
12
|
id: i,
|
|
13
13
|
name: l,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
onChange: c,
|
|
15
|
+
...m
|
|
16
|
+
}, d) => {
|
|
17
|
+
const n = w(), r = i || l || n, x = /* @__PURE__ */ e.jsx(
|
|
17
18
|
p,
|
|
18
19
|
{
|
|
19
|
-
ref:
|
|
20
|
+
ref: d,
|
|
20
21
|
id: r,
|
|
21
22
|
className: "cursor-pointer",
|
|
22
|
-
|
|
23
|
+
onCheckedChange: c,
|
|
24
|
+
...m
|
|
23
25
|
}
|
|
24
|
-
),
|
|
26
|
+
), h = u("flex gap-3 items-start", {
|
|
25
27
|
"flex-row-reverse": o === "right",
|
|
26
28
|
"bg-white box-border justify-start p-4 rounded-lg border shadow-xs": a === "box"
|
|
27
29
|
});
|
|
28
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
29
|
-
|
|
30
|
+
return /* @__PURE__ */ e.jsxs("div", { className: h, children: [
|
|
31
|
+
x,
|
|
30
32
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2 flex-1", children: [
|
|
31
33
|
/* @__PURE__ */ e.jsx(
|
|
32
|
-
|
|
34
|
+
g,
|
|
33
35
|
{
|
|
34
36
|
htmlFor: r,
|
|
35
37
|
className: "text-sm leading-[18.39px] cursor-pointer",
|
|
@@ -5,7 +5,7 @@ export interface TimePickerProps extends Omit<TimePickerPrimitiveProps, "onChang
|
|
|
5
5
|
error?: string;
|
|
6
6
|
description?: string;
|
|
7
7
|
orientation?: "vertical" | "horizontal" | "responsive";
|
|
8
|
-
|
|
8
|
+
onChange?: (value: string) => void;
|
|
9
9
|
}
|
|
10
10
|
declare const TimePicker: React.ForwardRefExoticComponent<TimePickerProps & React.RefAttributes<HTMLInputElement>>;
|
|
11
11
|
export { TimePicker };
|
|
@@ -2,7 +2,8 @@ import { ToggleGroup as ShadcnToggleGroup, ToggleGroupItem as ShadcnToggleGroupI
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import { toggleVariants } from '../../../vendor/shadcn/toggle';
|
|
4
4
|
import * as React from "react";
|
|
5
|
-
export interface ToggleGroupProps extends React.ComponentPropsWithoutRef<typeof ShadcnToggleGroup>, VariantProps<typeof toggleVariants> {
|
|
5
|
+
export interface ToggleGroupProps extends Omit<React.ComponentPropsWithoutRef<typeof ShadcnToggleGroup>, "onValueChange">, VariantProps<typeof toggleVariants> {
|
|
6
|
+
onChange?: (value: string) => void;
|
|
6
7
|
}
|
|
7
8
|
export interface ToggleGroupItemProps extends React.ComponentPropsWithoutRef<typeof ShadcnToggleGroupItem>, VariantProps<typeof toggleVariants> {
|
|
8
9
|
}
|
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import * as
|
|
3
|
-
import { ToggleGroup as
|
|
1
|
+
import { j as p } from "../../../_virtual/jsx-runtime.js";
|
|
2
|
+
import * as s from "react";
|
|
3
|
+
import { ToggleGroup as u, ToggleGroupItem as f } from "../../../vendor/shadcn/toggle-group.js";
|
|
4
4
|
import { cn as t } from "../../../lib/utils.js";
|
|
5
|
-
const
|
|
6
|
-
|
|
5
|
+
const n = s.forwardRef(({ className: o, variant: r, size: e, children: a, onChange: g, ...m }, l) => /* @__PURE__ */ p.jsx(
|
|
6
|
+
u,
|
|
7
7
|
{
|
|
8
|
-
ref:
|
|
8
|
+
ref: l,
|
|
9
9
|
className: t(o),
|
|
10
10
|
variant: r,
|
|
11
11
|
size: e,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
onValueChange: g,
|
|
13
|
+
...m,
|
|
14
|
+
children: a
|
|
14
15
|
}
|
|
15
16
|
));
|
|
16
|
-
|
|
17
|
-
const G =
|
|
18
|
-
|
|
17
|
+
n.displayName = "ToggleGroup";
|
|
18
|
+
const G = s.forwardRef(({ className: o, variant: r, size: e, children: a, ...g }, m) => /* @__PURE__ */ p.jsx(
|
|
19
|
+
f,
|
|
19
20
|
{
|
|
20
|
-
ref:
|
|
21
|
+
ref: m,
|
|
21
22
|
className: t(o),
|
|
22
23
|
variant: r,
|
|
23
24
|
size: e,
|
|
24
25
|
...g,
|
|
25
|
-
children:
|
|
26
|
+
children: a
|
|
26
27
|
}
|
|
27
28
|
));
|
|
28
29
|
G.displayName = "ToggleGroupItem";
|
|
29
30
|
export {
|
|
30
|
-
|
|
31
|
+
n as ToggleGroup,
|
|
31
32
|
G as ToggleGroupItem
|
|
32
33
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface DatePickerProps {
|
|
2
2
|
date?: Date;
|
|
3
|
-
|
|
3
|
+
onChange?: (date: Date | undefined) => void;
|
|
4
4
|
placeholder?: string;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
className?: string;
|
|
@@ -14,4 +14,4 @@ export interface DatePickerProps {
|
|
|
14
14
|
orientation?: "vertical" | "horizontal" | "responsive";
|
|
15
15
|
id?: string;
|
|
16
16
|
}
|
|
17
|
-
export declare function DatePicker({ date,
|
|
17
|
+
export declare function DatePicker({ date, onChange, placeholder, disabled, className, iconPosition, minDate, maxDate, dateFormat, label, error, description, orientation, id, }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,7 +10,7 @@ import B from "../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
|
|
|
10
10
|
import { formatDate as S } from "../../node_modules/date-fns/format.js";
|
|
11
11
|
function O({
|
|
12
12
|
date: s,
|
|
13
|
-
|
|
13
|
+
onChange: f,
|
|
14
14
|
placeholder: x = "Pick a date",
|
|
15
15
|
disabled: p = !1,
|
|
16
16
|
className: n,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { DateRange } from 'react-day-picker';
|
|
2
2
|
export interface DateRangePickerProps {
|
|
3
3
|
dateRange?: DateRange;
|
|
4
|
-
|
|
4
|
+
onChange?: (range: DateRange | undefined) => void;
|
|
5
5
|
placeholder?: string;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare function DateRangePicker({ dateRange,
|
|
9
|
+
export declare function DateRangePicker({ dateRange, onChange, placeholder, disabled, className, }: DateRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,7 +8,7 @@ import p from "../../node_modules/lucide-react/dist/esm/icons/calendar.js";
|
|
|
8
8
|
import { formatDate as t } from "../../node_modules/date-fns/format.js";
|
|
9
9
|
function v({
|
|
10
10
|
dateRange: o,
|
|
11
|
-
|
|
11
|
+
onChange: e,
|
|
12
12
|
placeholder: s = "Pick a date range",
|
|
13
13
|
disabled: m = !1,
|
|
14
14
|
className: i
|