fina-react-ds 1.0.40 → 1.0.43
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/alert-dialog.js +1 -166
- package/dist/components/alert.js +1 -73
- package/dist/components/avatar.js +1 -58
- package/dist/components/badge.js +1 -44
- package/dist/components/button.js +1 -153
- package/dist/components/calendar.js +1 -205
- package/dist/components/card.js +1 -99
- package/dist/components/checkbox.js +1 -34
- package/dist/components/data-loader.js +1 -24
- package/dist/components/date-picker.js +1 -64
- package/dist/components/dialog.js +1 -145
- package/dist/components/dropdown-menu.js +1 -248
- package/dist/components/file-uploader.js +1 -108
- package/dist/components/form-color-picker.js +1 -29
- package/dist/components/form-date.js +1 -30
- package/dist/components/form-file-uploader.js +1 -32
- package/dist/components/form-image-uploader.js +1 -40
- package/dist/components/form-input.js +1 -35
- package/dist/components/form-select.js +1 -51
- package/dist/components/form-switch.js +1 -35
- package/dist/components/form-textarea.js +1 -35
- package/dist/components/form.js +1 -110
- package/dist/components/hover-card.js +1 -43
- package/dist/components/image-uploader.js +1 -130
- package/dist/components/index.js +1 -200
- package/dist/components/input.js +1 -26
- package/dist/components/label.js +1 -32
- package/dist/components/mode-toggle.js +1 -26
- package/dist/components/pagination.js +1 -128
- package/dist/components/password-rules-checker.js +1 -44
- package/dist/components/popover.js +1 -50
- package/dist/components/select.js +1 -53
- package/dist/components/separator.js +1 -29
- package/dist/components/sheet.js +1 -160
- package/dist/components/sidebar.js +1 -624
- package/dist/components/simple-pagination.js +1 -34
- package/dist/components/simple-tooltip.js +1 -17
- package/dist/components/skeleton.js +1 -18
- package/dist/components/sonner.js +1 -24
- package/dist/components/switch.js +1 -34
- package/dist/components/table.js +1 -124
- package/dist/components/tabs.js +1 -73
- package/dist/components/textarea.js +1 -23
- package/dist/components/tooltip.js +1 -61
- package/dist/hooks/index.js +1 -4
- package/dist/hooks/use-mobile.js +1 -17
- package/dist/lib/arrays.js +1 -7
- package/dist/lib/dates.js +1 -21
- package/dist/lib/http.js +1 -56
- package/dist/lib/index.js +1 -27
- package/dist/lib/strings.js +1 -6
- package/dist/lib/utils.js +2 -31
- package/dist/lib/yup.js +1 -88
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +1 -12
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +1 -21
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +1 -36
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +1 -18
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatDistance.js +1 -72
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatLong.js +1 -33
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatRelative.js +1 -13
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/localize.js +1 -123
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/match.js +1 -112
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr.js +1 -21
- package/dist/providers/loader-provider.js +1 -34
- package/dist/providers/theme-provider.js +1 -45
- package/package.json +15 -9
- package/dist/index.js +0 -225
|
@@ -1,248 +1 @@
|
|
|
1
|
-
var u
|
|
2
|
-
var a = (e, o) => u(e, "name", { value: o, configurable: !0 });
|
|
3
|
-
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
4
|
-
import { DropdownMenu as n } from "radix-ui";
|
|
5
|
-
import { CheckIcon as c, CircleIcon as l, ChevronRightIcon as p } from "lucide-react";
|
|
6
|
-
import { cn as d } from "../lib/utils.js";
|
|
7
|
-
function x({
|
|
8
|
-
...e
|
|
9
|
-
}) {
|
|
10
|
-
return /* @__PURE__ */ t(n.Root, { "data-slot": "dropdown-menu", ...e });
|
|
11
|
-
}
|
|
12
|
-
a(x, "DropdownMenu");
|
|
13
|
-
function b({
|
|
14
|
-
...e
|
|
15
|
-
}) {
|
|
16
|
-
return /* @__PURE__ */ t(n.Portal, { "data-slot": "dropdown-menu-portal", ...e });
|
|
17
|
-
}
|
|
18
|
-
a(b, "DropdownMenuPortal");
|
|
19
|
-
function h({
|
|
20
|
-
...e
|
|
21
|
-
}) {
|
|
22
|
-
return /* @__PURE__ */ t(
|
|
23
|
-
n.Trigger,
|
|
24
|
-
{
|
|
25
|
-
"data-slot": "dropdown-menu-trigger",
|
|
26
|
-
...e
|
|
27
|
-
}
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
a(h, "DropdownMenuTrigger");
|
|
31
|
-
function z({
|
|
32
|
-
className: e,
|
|
33
|
-
sideOffset: o = 4,
|
|
34
|
-
...r
|
|
35
|
-
}) {
|
|
36
|
-
return /* @__PURE__ */ t(n.Portal, { children: /* @__PURE__ */ t(
|
|
37
|
-
n.Content,
|
|
38
|
-
{
|
|
39
|
-
"data-slot": "dropdown-menu-content",
|
|
40
|
-
sideOffset: o,
|
|
41
|
-
className: d(
|
|
42
|
-
"bg-popover text-popover-foreground 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
43
|
-
e
|
|
44
|
-
),
|
|
45
|
-
...r
|
|
46
|
-
}
|
|
47
|
-
) });
|
|
48
|
-
}
|
|
49
|
-
a(z, "DropdownMenuContent");
|
|
50
|
-
function D({
|
|
51
|
-
...e
|
|
52
|
-
}) {
|
|
53
|
-
return /* @__PURE__ */ t(n.Group, { "data-slot": "dropdown-menu-group", ...e });
|
|
54
|
-
}
|
|
55
|
-
a(D, "DropdownMenuGroup");
|
|
56
|
-
function M({
|
|
57
|
-
className: e,
|
|
58
|
-
inset: o,
|
|
59
|
-
variant: r = "default",
|
|
60
|
-
...s
|
|
61
|
-
}) {
|
|
62
|
-
return /* @__PURE__ */ t(
|
|
63
|
-
n.Item,
|
|
64
|
-
{
|
|
65
|
-
"data-slot": "dropdown-menu-item",
|
|
66
|
-
"data-inset": o,
|
|
67
|
-
"data-variant": r,
|
|
68
|
-
className: d(
|
|
69
|
-
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
70
|
-
e
|
|
71
|
-
),
|
|
72
|
-
...s
|
|
73
|
-
}
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
a(M, "DropdownMenuItem");
|
|
77
|
-
function N({
|
|
78
|
-
className: e,
|
|
79
|
-
children: o,
|
|
80
|
-
checked: r,
|
|
81
|
-
...s
|
|
82
|
-
}) {
|
|
83
|
-
return /* @__PURE__ */ i(
|
|
84
|
-
n.CheckboxItem,
|
|
85
|
-
{
|
|
86
|
-
"data-slot": "dropdown-menu-checkbox-item",
|
|
87
|
-
className: d(
|
|
88
|
-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
89
|
-
e
|
|
90
|
-
),
|
|
91
|
-
checked: r,
|
|
92
|
-
...s,
|
|
93
|
-
children: [
|
|
94
|
-
/* @__PURE__ */ t("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t(n.ItemIndicator, { children: /* @__PURE__ */ t(c, { className: "size-4" }) }) }),
|
|
95
|
-
o
|
|
96
|
-
]
|
|
97
|
-
}
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
a(N, "DropdownMenuCheckboxItem");
|
|
101
|
-
function I({
|
|
102
|
-
...e
|
|
103
|
-
}) {
|
|
104
|
-
return /* @__PURE__ */ t(
|
|
105
|
-
n.RadioGroup,
|
|
106
|
-
{
|
|
107
|
-
"data-slot": "dropdown-menu-radio-group",
|
|
108
|
-
...e
|
|
109
|
-
}
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
a(I, "DropdownMenuRadioGroup");
|
|
113
|
-
function y({
|
|
114
|
-
className: e,
|
|
115
|
-
children: o,
|
|
116
|
-
...r
|
|
117
|
-
}) {
|
|
118
|
-
return /* @__PURE__ */ i(
|
|
119
|
-
n.RadioItem,
|
|
120
|
-
{
|
|
121
|
-
"data-slot": "dropdown-menu-radio-item",
|
|
122
|
-
className: d(
|
|
123
|
-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
124
|
-
e
|
|
125
|
-
),
|
|
126
|
-
...r,
|
|
127
|
-
children: [
|
|
128
|
-
/* @__PURE__ */ t("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t(n.ItemIndicator, { children: /* @__PURE__ */ t(l, { className: "size-2 fill-current" }) }) }),
|
|
129
|
-
o
|
|
130
|
-
]
|
|
131
|
-
}
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
a(y, "DropdownMenuRadioItem");
|
|
135
|
-
function _({
|
|
136
|
-
className: e,
|
|
137
|
-
inset: o,
|
|
138
|
-
...r
|
|
139
|
-
}) {
|
|
140
|
-
return /* @__PURE__ */ t(
|
|
141
|
-
n.Label,
|
|
142
|
-
{
|
|
143
|
-
"data-slot": "dropdown-menu-label",
|
|
144
|
-
"data-inset": o,
|
|
145
|
-
className: d(
|
|
146
|
-
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
147
|
-
e
|
|
148
|
-
),
|
|
149
|
-
...r
|
|
150
|
-
}
|
|
151
|
-
);
|
|
152
|
-
}
|
|
153
|
-
a(_, "DropdownMenuLabel");
|
|
154
|
-
function k({
|
|
155
|
-
className: e,
|
|
156
|
-
...o
|
|
157
|
-
}) {
|
|
158
|
-
return /* @__PURE__ */ t(
|
|
159
|
-
n.Separator,
|
|
160
|
-
{
|
|
161
|
-
"data-slot": "dropdown-menu-separator",
|
|
162
|
-
className: d("bg-border -mx-1 my-1 h-px", e),
|
|
163
|
-
...o
|
|
164
|
-
}
|
|
165
|
-
);
|
|
166
|
-
}
|
|
167
|
-
a(k, "DropdownMenuSeparator");
|
|
168
|
-
function C({
|
|
169
|
-
className: e,
|
|
170
|
-
...o
|
|
171
|
-
}) {
|
|
172
|
-
return /* @__PURE__ */ t(
|
|
173
|
-
"span",
|
|
174
|
-
{
|
|
175
|
-
"data-slot": "dropdown-menu-shortcut",
|
|
176
|
-
className: d(
|
|
177
|
-
"text-muted ml-auto text-xs tracking-widest",
|
|
178
|
-
e
|
|
179
|
-
),
|
|
180
|
-
...o
|
|
181
|
-
}
|
|
182
|
-
);
|
|
183
|
-
}
|
|
184
|
-
a(C, "DropdownMenuShortcut");
|
|
185
|
-
function S({
|
|
186
|
-
...e
|
|
187
|
-
}) {
|
|
188
|
-
return /* @__PURE__ */ t(n.Sub, { "data-slot": "dropdown-menu-sub", ...e });
|
|
189
|
-
}
|
|
190
|
-
a(S, "DropdownMenuSub");
|
|
191
|
-
function R({
|
|
192
|
-
className: e,
|
|
193
|
-
inset: o,
|
|
194
|
-
children: r,
|
|
195
|
-
...s
|
|
196
|
-
}) {
|
|
197
|
-
return /* @__PURE__ */ i(
|
|
198
|
-
n.SubTrigger,
|
|
199
|
-
{
|
|
200
|
-
"data-slot": "dropdown-menu-sub-trigger",
|
|
201
|
-
"data-inset": o,
|
|
202
|
-
className: d(
|
|
203
|
-
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",
|
|
204
|
-
e
|
|
205
|
-
),
|
|
206
|
-
...s,
|
|
207
|
-
children: [
|
|
208
|
-
r,
|
|
209
|
-
/* @__PURE__ */ t(p, { className: "ml-auto size-4" })
|
|
210
|
-
]
|
|
211
|
-
}
|
|
212
|
-
);
|
|
213
|
-
}
|
|
214
|
-
a(R, "DropdownMenuSubTrigger");
|
|
215
|
-
function j({
|
|
216
|
-
className: e,
|
|
217
|
-
...o
|
|
218
|
-
}) {
|
|
219
|
-
return /* @__PURE__ */ t(
|
|
220
|
-
n.SubContent,
|
|
221
|
-
{
|
|
222
|
-
"data-slot": "dropdown-menu-sub-content",
|
|
223
|
-
className: d(
|
|
224
|
-
"bg-popover text-popover-foreground 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
225
|
-
e
|
|
226
|
-
),
|
|
227
|
-
...o
|
|
228
|
-
}
|
|
229
|
-
);
|
|
230
|
-
}
|
|
231
|
-
a(j, "DropdownMenuSubContent");
|
|
232
|
-
export {
|
|
233
|
-
x as DropdownMenu,
|
|
234
|
-
N as DropdownMenuCheckboxItem,
|
|
235
|
-
z as DropdownMenuContent,
|
|
236
|
-
D as DropdownMenuGroup,
|
|
237
|
-
M as DropdownMenuItem,
|
|
238
|
-
_ as DropdownMenuLabel,
|
|
239
|
-
b as DropdownMenuPortal,
|
|
240
|
-
I as DropdownMenuRadioGroup,
|
|
241
|
-
y as DropdownMenuRadioItem,
|
|
242
|
-
k as DropdownMenuSeparator,
|
|
243
|
-
C as DropdownMenuShortcut,
|
|
244
|
-
S as DropdownMenuSub,
|
|
245
|
-
j as DropdownMenuSubContent,
|
|
246
|
-
R as DropdownMenuSubTrigger,
|
|
247
|
-
h as DropdownMenuTrigger
|
|
248
|
-
};
|
|
1
|
+
var u=Object.defineProperty;var a=(e,o)=>u(e,"name",{value:o,configurable:!0});import{jsx as t,jsxs as i}from"react/jsx-runtime";import{DropdownMenu as n}from"radix-ui";import{CheckIcon as c,CircleIcon as l,ChevronRightIcon as p}from"lucide-react";import{cn as d}from"../lib/utils.js";function x({...e}){return t(n.Root,{"data-slot":"dropdown-menu",...e})}a(x,"DropdownMenu");function b({...e}){return t(n.Portal,{"data-slot":"dropdown-menu-portal",...e})}a(b,"DropdownMenuPortal");function h({...e}){return t(n.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}a(h,"DropdownMenuTrigger");function z({className:e,sideOffset:o=4,...r}){return t(n.Portal,{children:t(n.Content,{"data-slot":"dropdown-menu-content",sideOffset:o,className:d("bg-popover text-popover-foreground 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...r})})}a(z,"DropdownMenuContent");function D({...e}){return t(n.Group,{"data-slot":"dropdown-menu-group",...e})}a(D,"DropdownMenuGroup");function M({className:e,inset:o,variant:r="default",...s}){return t(n.Item,{"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":r,className:d("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...s})}a(M,"DropdownMenuItem");function N({className:e,children:o,checked:r,...s}){return i(n.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item",className:d("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:r,...s,children:[t("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:t(n.ItemIndicator,{children:t(c,{className:"size-4"})})}),o]})}a(N,"DropdownMenuCheckboxItem");function I({...e}){return t(n.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...e})}a(I,"DropdownMenuRadioGroup");function y({className:e,children:o,...r}){return i(n.RadioItem,{"data-slot":"dropdown-menu-radio-item",className:d("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[t("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:t(n.ItemIndicator,{children:t(l,{className:"size-2 fill-current"})})}),o]})}a(y,"DropdownMenuRadioItem");function _({className:e,inset:o,...r}){return t(n.Label,{"data-slot":"dropdown-menu-label","data-inset":o,className:d("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...r})}a(_,"DropdownMenuLabel");function k({className:e,...o}){return t(n.Separator,{"data-slot":"dropdown-menu-separator",className:d("bg-border -mx-1 my-1 h-px",e),...o})}a(k,"DropdownMenuSeparator");function C({className:e,...o}){return t("span",{"data-slot":"dropdown-menu-shortcut",className:d("text-muted ml-auto text-xs tracking-widest",e),...o})}a(C,"DropdownMenuShortcut");function S({...e}){return t(n.Sub,{"data-slot":"dropdown-menu-sub",...e})}a(S,"DropdownMenuSub");function R({className:e,inset:o,children:r,...s}){return i(n.SubTrigger,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:d("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",e),...s,children:[r,t(p,{className:"ml-auto size-4"})]})}a(R,"DropdownMenuSubTrigger");function j({className:e,...o}){return t(n.SubContent,{"data-slot":"dropdown-menu-sub-content",className:d("bg-popover text-popover-foreground 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",e),...o})}a(j,"DropdownMenuSubContent");export{x as DropdownMenu,N as DropdownMenuCheckboxItem,z as DropdownMenuContent,D as DropdownMenuGroup,M as DropdownMenuItem,_ as DropdownMenuLabel,b as DropdownMenuPortal,I as DropdownMenuRadioGroup,y as DropdownMenuRadioItem,k as DropdownMenuSeparator,C as DropdownMenuShortcut,S as DropdownMenuSub,j as DropdownMenuSubContent,R as DropdownMenuSubTrigger,h as DropdownMenuTrigger};
|
|
@@ -1,108 +1 @@
|
|
|
1
|
-
var F = Object.
|
|
2
|
-
var o = (i, l) => F(i, "name", { value: l, configurable: !0 });
|
|
3
|
-
import { jsxs as r, jsx as e, Fragment as f } from "react/jsx-runtime";
|
|
4
|
-
import { useState as j, useImperativeHandle as k, useCallback as p } from "react";
|
|
5
|
-
import { FileIcon as C, UploadIcon as D } from "lucide-react";
|
|
6
|
-
import { useDropzone as I } from "react-dropzone";
|
|
7
|
-
import { cn as c } from "../lib/utils.js";
|
|
8
|
-
import { Button as S } from "./button.js";
|
|
9
|
-
function M({
|
|
10
|
-
onChange: i,
|
|
11
|
-
"aria-invalid": l,
|
|
12
|
-
fileTypes: b,
|
|
13
|
-
ref: x
|
|
14
|
-
}) {
|
|
15
|
-
const [a, d] = j([]);
|
|
16
|
-
k(x, () => ({
|
|
17
|
-
focus: /* @__PURE__ */ o(() => {
|
|
18
|
-
t?.current && t.current.focus();
|
|
19
|
-
}, "focus")
|
|
20
|
-
}));
|
|
21
|
-
const v = p(
|
|
22
|
-
(n) => {
|
|
23
|
-
d(n), i?.(n.length > 0 ? n[0] : null);
|
|
24
|
-
},
|
|
25
|
-
[i]
|
|
26
|
-
), g = /* @__PURE__ */ o(() => {
|
|
27
|
-
t?.current && t.current.focus();
|
|
28
|
-
}, "handleFileDialogCancel"), { getRootProps: h, getInputProps: y, acceptedFiles: u, open: N, rootRef: t } = I({
|
|
29
|
-
maxFiles: 1,
|
|
30
|
-
noClick: !0,
|
|
31
|
-
onDrop: v,
|
|
32
|
-
onFileDialogCancel: g
|
|
33
|
-
}), z = p((n) => {
|
|
34
|
-
let s = 0, m = "ko";
|
|
35
|
-
return s = n.size / 1e3, s > 1e3 && (s /= 1e3, m = "mo"), s.toFixed(2) + " " + m;
|
|
36
|
-
}, []);
|
|
37
|
-
return /* @__PURE__ */ r(
|
|
38
|
-
"div",
|
|
39
|
-
{
|
|
40
|
-
...h(),
|
|
41
|
-
className: c(
|
|
42
|
-
"bg-input border border-input-border flex flex-col h-50 w-full rounded-md px-3 py-1 text-base shadow-xs items-center justify-center md:text-sm outline-none",
|
|
43
|
-
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
44
|
-
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
|
|
45
|
-
),
|
|
46
|
-
"aria-invalid": l,
|
|
47
|
-
children: [
|
|
48
|
-
a.length > 0 && /* @__PURE__ */ r(f, { children: [
|
|
49
|
-
/* @__PURE__ */ e(
|
|
50
|
-
"div",
|
|
51
|
-
{
|
|
52
|
-
className: c(
|
|
53
|
-
"bg-primary text-primary-foreground flex items-center justify-center rounded-full size-10 mb-4"
|
|
54
|
-
),
|
|
55
|
-
children: /* @__PURE__ */ e(C, { className: "size-4" })
|
|
56
|
-
}
|
|
57
|
-
),
|
|
58
|
-
/* @__PURE__ */ r("div", { className: "mb-4 text-center", children: [
|
|
59
|
-
u[0].name,
|
|
60
|
-
/* @__PURE__ */ e("br", {}),
|
|
61
|
-
z(u[0])
|
|
62
|
-
] }),
|
|
63
|
-
/* @__PURE__ */ e(
|
|
64
|
-
S,
|
|
65
|
-
{
|
|
66
|
-
type: "button",
|
|
67
|
-
color: "destructive",
|
|
68
|
-
variant: "ghost",
|
|
69
|
-
onClick: /* @__PURE__ */ o(() => {
|
|
70
|
-
d([]), i?.(null), t?.current?.focus();
|
|
71
|
-
}, "onClick"),
|
|
72
|
-
children: "Supprimer"
|
|
73
|
-
}
|
|
74
|
-
)
|
|
75
|
-
] }),
|
|
76
|
-
a.length === 0 && /* @__PURE__ */ r(f, { children: [
|
|
77
|
-
/* @__PURE__ */ e(
|
|
78
|
-
"div",
|
|
79
|
-
{
|
|
80
|
-
className: c(
|
|
81
|
-
"bg-primary text-primary-foreground flex items-center justify-center rounded-full size-10 mb-4"
|
|
82
|
-
),
|
|
83
|
-
children: /* @__PURE__ */ e(D, { className: "size-4" })
|
|
84
|
-
}
|
|
85
|
-
),
|
|
86
|
-
/* @__PURE__ */ r("div", { className: "mb-4", children: [
|
|
87
|
-
"Glisser-déposer ou",
|
|
88
|
-
" ",
|
|
89
|
-
/* @__PURE__ */ e("span", { className: "font-bold underline cursor-pointer", onClick: N, children: "Choisir un fichier" }),
|
|
90
|
-
" ",
|
|
91
|
-
"à uploader"
|
|
92
|
-
] }),
|
|
93
|
-
/* @__PURE__ */ r("div", { className: "text-center text-sm md:text-xs", children: [
|
|
94
|
-
"Formats acceptés : ",
|
|
95
|
-
Object.keys(b).join(", "),
|
|
96
|
-
/* @__PURE__ */ e("br", {}),
|
|
97
|
-
"Taille max : 5Mo"
|
|
98
|
-
] })
|
|
99
|
-
] }),
|
|
100
|
-
/* @__PURE__ */ e("input", { ...y() })
|
|
101
|
-
]
|
|
102
|
-
}
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
o(M, "FileUploader");
|
|
106
|
-
export {
|
|
107
|
-
M as FileUploader
|
|
108
|
-
};
|
|
1
|
+
var F=Object.defineProperty;var o=(i,l)=>F(i,"name",{value:l,configurable:!0});import{jsxs as r,jsx as e,Fragment as f}from"react/jsx-runtime";import{useState as j,useImperativeHandle as k,useCallback as p}from"react";import{FileIcon as C,UploadIcon as D}from"lucide-react";import{useDropzone as I}from"react-dropzone";import{cn as c}from"../lib/utils.js";import{Button as S}from"./button.js";function M({onChange:i,"aria-invalid":l,fileTypes:b,ref:x}){const[a,d]=j([]);k(x,()=>({focus:o(()=>{t?.current&&t.current.focus()},"focus")}));const v=p(n=>{d(n),i?.(n.length>0?n[0]:null)},[i]),g=o(()=>{t?.current&&t.current.focus()},"handleFileDialogCancel"),{getRootProps:h,getInputProps:y,acceptedFiles:u,open:N,rootRef:t}=I({maxFiles:1,noClick:!0,onDrop:v,onFileDialogCancel:g}),z=p(n=>{let s=0,m="ko";return s=n.size/1e3,s>1e3&&(s/=1e3,m="mo"),s.toFixed(2)+" "+m},[]);return r("div",{...h(),className:c("bg-input border border-input-border flex flex-col h-50 w-full rounded-md px-3 py-1 text-base shadow-xs items-center justify-center md:text-sm outline-none","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"),"aria-invalid":l,children:[a.length>0&&r(f,{children:[e("div",{className:c("bg-primary text-primary-foreground flex items-center justify-center rounded-full size-10 mb-4"),children:e(C,{className:"size-4"})}),r("div",{className:"mb-4 text-center",children:[u[0].name,e("br",{}),z(u[0])]}),e(S,{type:"button",color:"destructive",variant:"ghost",onClick:o(()=>{d([]),i?.(null),t?.current?.focus()},"onClick"),children:"Supprimer"})]}),a.length===0&&r(f,{children:[e("div",{className:c("bg-primary text-primary-foreground flex items-center justify-center rounded-full size-10 mb-4"),children:e(D,{className:"size-4"})}),r("div",{className:"mb-4",children:["Glisser-déposer ou"," ",e("span",{className:"font-bold underline cursor-pointer",onClick:N,children:"Choisir un fichier"})," ","à uploader"]}),r("div",{className:"text-center text-sm md:text-xs",children:["Formats acceptés : ",Object.keys(b).join(", "),e("br",{}),"Taille max : 5Mo"]})]}),e("input",{...y()})]})}o(M,"FileUploader");export{M as FileUploader};
|
|
@@ -1,29 +1 @@
|
|
|
1
|
-
var i
|
|
2
|
-
var m = (o, e) => i(o, "name", { value: e, configurable: !0 });
|
|
3
|
-
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
4
|
-
import { HexColorPicker as s } from "react-colorful";
|
|
5
|
-
import { useFormContext as F } from "react-hook-form";
|
|
6
|
-
import { FormField as f, FormItem as p, FormLabel as x, FormControl as a, FormMessage as d } from "./form.js";
|
|
7
|
-
function P({
|
|
8
|
-
name: o,
|
|
9
|
-
label: e,
|
|
10
|
-
required: l = !1
|
|
11
|
-
}) {
|
|
12
|
-
const { control: n } = F();
|
|
13
|
-
return /* @__PURE__ */ r(
|
|
14
|
-
f,
|
|
15
|
-
{
|
|
16
|
-
control: n,
|
|
17
|
-
name: o,
|
|
18
|
-
render: /* @__PURE__ */ m(({ field: t }) => /* @__PURE__ */ c(p, { children: [
|
|
19
|
-
/* @__PURE__ */ r(x, { required: l, children: e }),
|
|
20
|
-
/* @__PURE__ */ r(a, { children: /* @__PURE__ */ r(s, { color: t.value ?? "", ...t }) }),
|
|
21
|
-
/* @__PURE__ */ r(d, {})
|
|
22
|
-
] }), "render")
|
|
23
|
-
}
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
m(P, "FormColorPicker");
|
|
27
|
-
export {
|
|
28
|
-
P as FormColorPicker
|
|
29
|
-
};
|
|
1
|
+
var i=Object.defineProperty;var m=(o,e)=>i(o,"name",{value:e,configurable:!0});import{jsx as r,jsxs as c}from"react/jsx-runtime";import{HexColorPicker as s}from"react-colorful";import{useFormContext as F}from"react-hook-form";import{FormField as f,FormItem as p,FormLabel as x,FormControl as a,FormMessage as d}from"./form.js";function P({name:o,label:e,required:l=!1}){const{control:n}=F();return r(f,{control:n,name:o,render:m(({field:t})=>c(p,{children:[r(x,{required:l,children:e}),r(a,{children:r(s,{color:t.value??"",...t})}),r(d,{})]}),"render")})}m(P,"FormColorPicker");export{P as FormColorPicker};
|
|
@@ -1,30 +1 @@
|
|
|
1
|
-
var s
|
|
2
|
-
var m = (o, e) => s(o, "name", { value: e, configurable: !0 });
|
|
3
|
-
import { jsx as r, jsxs as F } from "react/jsx-runtime";
|
|
4
|
-
import { useFormContext as a } from "react-hook-form";
|
|
5
|
-
import { FormField as c, FormItem as f, FormLabel as d, FormControl as p, FormMessage as u } from "./form.js";
|
|
6
|
-
import { DatePicker as x } from "./date-picker.js";
|
|
7
|
-
function g({
|
|
8
|
-
name: o,
|
|
9
|
-
label: e,
|
|
10
|
-
required: t = !1,
|
|
11
|
-
...i
|
|
12
|
-
}) {
|
|
13
|
-
const { control: n } = a();
|
|
14
|
-
return /* @__PURE__ */ r(
|
|
15
|
-
c,
|
|
16
|
-
{
|
|
17
|
-
control: n,
|
|
18
|
-
name: o,
|
|
19
|
-
render: /* @__PURE__ */ m(({ field: l }) => /* @__PURE__ */ F(f, { children: [
|
|
20
|
-
/* @__PURE__ */ r(d, { required: t, children: e }),
|
|
21
|
-
/* @__PURE__ */ r(p, { children: /* @__PURE__ */ r(x, { ...l, ...i, isClearable: !0 }) }),
|
|
22
|
-
/* @__PURE__ */ r(u, {})
|
|
23
|
-
] }), "render")
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
m(g, "FormDate");
|
|
28
|
-
export {
|
|
29
|
-
g as FormDate
|
|
30
|
-
};
|
|
1
|
+
var s=Object.defineProperty;var m=(o,e)=>s(o,"name",{value:e,configurable:!0});import{jsx as r,jsxs as F}from"react/jsx-runtime";import{useFormContext as a}from"react-hook-form";import{FormField as c,FormItem as f,FormLabel as d,FormControl as p,FormMessage as u}from"./form.js";import{DatePicker as x}from"./date-picker.js";function g({name:o,label:e,required:t=!1,...i}){const{control:n}=a();return r(c,{control:n,name:o,render:m(({field:l})=>F(f,{children:[r(d,{required:t,children:e}),r(p,{children:r(x,{...l,...i,isClearable:!0})}),r(u,{})]}),"render")})}m(g,"FormDate");export{g as FormDate};
|
|
@@ -1,32 +1 @@
|
|
|
1
|
-
var d
|
|
2
|
-
var m = (o, e) => d(o, "name", { value: e, configurable: !0 });
|
|
3
|
-
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
4
|
-
import { useFormContext as c } from "react-hook-form";
|
|
5
|
-
import { FormField as f, FormItem as p, FormLabel as a, FormControl as h, FormDescription as u, FormMessage as x } from "./form.js";
|
|
6
|
-
import { FileUploader as j } from "./file-uploader.js";
|
|
7
|
-
function I({
|
|
8
|
-
name: o,
|
|
9
|
-
label: e,
|
|
10
|
-
description: l,
|
|
11
|
-
required: i = !1,
|
|
12
|
-
...t
|
|
13
|
-
}) {
|
|
14
|
-
const { control: n } = c();
|
|
15
|
-
return /* @__PURE__ */ r(
|
|
16
|
-
f,
|
|
17
|
-
{
|
|
18
|
-
control: n,
|
|
19
|
-
name: o,
|
|
20
|
-
render: /* @__PURE__ */ m(({ field: { value: C, ...F } }) => /* @__PURE__ */ s(p, { children: [
|
|
21
|
-
/* @__PURE__ */ r(a, { required: i, children: e }),
|
|
22
|
-
/* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(j, { ...F, ...t }) }),
|
|
23
|
-
l && /* @__PURE__ */ r(u, { children: l }),
|
|
24
|
-
/* @__PURE__ */ r(x, {})
|
|
25
|
-
] }), "render")
|
|
26
|
-
}
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
m(I, "FormFileUploader");
|
|
30
|
-
export {
|
|
31
|
-
I as FormFileUploader
|
|
32
|
-
};
|
|
1
|
+
var d=Object.defineProperty;var m=(o,e)=>d(o,"name",{value:e,configurable:!0});import{jsx as r,jsxs as s}from"react/jsx-runtime";import{useFormContext as c}from"react-hook-form";import{FormField as f,FormItem as p,FormLabel as a,FormControl as h,FormDescription as u,FormMessage as x}from"./form.js";import{FileUploader as j}from"./file-uploader.js";function I({name:o,label:e,description:l,required:i=!1,...t}){const{control:n}=c();return r(f,{control:n,name:o,render:m(({field:{value:C,...F}})=>s(p,{children:[r(a,{required:i,children:e}),r(h,{children:r(j,{...F,...t})}),l&&r(u,{children:l}),r(x,{})]}),"render")})}m(I,"FormFileUploader");export{I as FormFileUploader};
|
|
@@ -1,40 +1 @@
|
|
|
1
|
-
var d
|
|
2
|
-
var m = (o, e) => d(o, "name", { value: e, configurable: !0 });
|
|
3
|
-
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
4
|
-
import { useFormContext as c } from "react-hook-form";
|
|
5
|
-
import { FormField as f, FormItem as p, FormLabel as h, FormControl as u, FormDescription as x, FormMessage as g } from "./form.js";
|
|
6
|
-
import { ImageUploader as I } from "./image-uploader.js";
|
|
7
|
-
function L({
|
|
8
|
-
name: o,
|
|
9
|
-
label: e,
|
|
10
|
-
description: l,
|
|
11
|
-
required: t = !1,
|
|
12
|
-
actualImageUrl: n = "",
|
|
13
|
-
...i
|
|
14
|
-
}) {
|
|
15
|
-
const { control: F } = c();
|
|
16
|
-
return /* @__PURE__ */ r(
|
|
17
|
-
f,
|
|
18
|
-
{
|
|
19
|
-
control: F,
|
|
20
|
-
name: o,
|
|
21
|
-
render: /* @__PURE__ */ m(({ field: { value: j, ...a } }) => /* @__PURE__ */ s(p, { children: [
|
|
22
|
-
/* @__PURE__ */ r(h, { required: t, children: e }),
|
|
23
|
-
/* @__PURE__ */ r(u, { children: /* @__PURE__ */ r(
|
|
24
|
-
I,
|
|
25
|
-
{
|
|
26
|
-
actualImageUrl: n,
|
|
27
|
-
...a,
|
|
28
|
-
...i
|
|
29
|
-
}
|
|
30
|
-
) }),
|
|
31
|
-
l && /* @__PURE__ */ r(x, { children: l }),
|
|
32
|
-
/* @__PURE__ */ r(g, {})
|
|
33
|
-
] }), "render")
|
|
34
|
-
}
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
m(L, "FormImageUploader");
|
|
38
|
-
export {
|
|
39
|
-
L as FormImageUploader
|
|
40
|
-
};
|
|
1
|
+
var d=Object.defineProperty;var m=(o,e)=>d(o,"name",{value:e,configurable:!0});import{jsx as r,jsxs as s}from"react/jsx-runtime";import{useFormContext as c}from"react-hook-form";import{FormField as f,FormItem as p,FormLabel as h,FormControl as u,FormDescription as x,FormMessage as g}from"./form.js";import{ImageUploader as I}from"./image-uploader.js";function L({name:o,label:e,description:l,required:t=!1,actualImageUrl:n="",...i}){const{control:F}=c();return r(f,{control:F,name:o,render:m(({field:{value:j,...a}})=>s(p,{children:[r(h,{required:t,children:e}),r(u,{children:r(I,{actualImageUrl:n,...a,...i})}),l&&r(x,{children:l}),r(g,{})]}),"render")})}m(L,"FormImageUploader");export{L as FormImageUploader};
|
|
@@ -1,35 +1 @@
|
|
|
1
|
-
var p
|
|
2
|
-
var m = (o, e) => p(o, "name", { value: e, configurable: !0 });
|
|
3
|
-
import { jsx as r, jsxs as u } from "react/jsx-runtime";
|
|
4
|
-
import { useFormContext as f } from "react-hook-form";
|
|
5
|
-
import { FormField as d, FormItem as a, FormLabel as h, FormControl as x, FormDescription as I, FormMessage as j } from "./form.js";
|
|
6
|
-
import { Input as v } from "./input.js";
|
|
7
|
-
function M({
|
|
8
|
-
name: o,
|
|
9
|
-
label: e,
|
|
10
|
-
description: t,
|
|
11
|
-
required: n = !1,
|
|
12
|
-
...l
|
|
13
|
-
}) {
|
|
14
|
-
const { control: i } = f();
|
|
15
|
-
return /* @__PURE__ */ r(
|
|
16
|
-
d,
|
|
17
|
-
{
|
|
18
|
-
control: i,
|
|
19
|
-
name: o,
|
|
20
|
-
render: /* @__PURE__ */ m(({ field: s }) => {
|
|
21
|
-
const { value: F, ...c } = s;
|
|
22
|
-
return /* @__PURE__ */ u(a, { children: [
|
|
23
|
-
/* @__PURE__ */ r(h, { required: n, children: e }),
|
|
24
|
-
/* @__PURE__ */ r(x, { children: /* @__PURE__ */ r(v, { value: F ?? "", ...c, ...l }) }),
|
|
25
|
-
t && /* @__PURE__ */ r(I, { children: t }),
|
|
26
|
-
/* @__PURE__ */ r(j, {})
|
|
27
|
-
] });
|
|
28
|
-
}, "render")
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
m(M, "FormInput");
|
|
33
|
-
export {
|
|
34
|
-
M as FormInput
|
|
35
|
-
};
|
|
1
|
+
var p=Object.defineProperty;var m=(o,e)=>p(o,"name",{value:e,configurable:!0});import{jsx as r,jsxs as u}from"react/jsx-runtime";import{useFormContext as f}from"react-hook-form";import{FormField as d,FormItem as a,FormLabel as h,FormControl as x,FormDescription as I,FormMessage as j}from"./form.js";import{Input as v}from"./input.js";function M({name:o,label:e,description:t,required:n=!1,...l}){const{control:i}=f();return r(d,{control:i,name:o,render:m(({field:s})=>{const{value:F,...c}=s;return u(a,{children:[r(h,{required:n,children:e}),r(x,{children:r(v,{value:F??"",...c,...l})}),t&&r(I,{children:t}),r(j,{})]})},"render")})}m(M,"FormInput");export{M as FormInput};
|
|
@@ -1,51 +1 @@
|
|
|
1
|
-
var x
|
|
2
|
-
var o = (e, n) => x(e, "name", { value: n, configurable: !0 });
|
|
3
|
-
import { jsx as r, jsxs as C } from "react/jsx-runtime";
|
|
4
|
-
import { useFormContext as g } from "react-hook-form";
|
|
5
|
-
import { FormField as u, FormItem as j, FormLabel as S, FormControl as b, FormDescription as D, FormMessage as I } from "./form.js";
|
|
6
|
-
import { Select as L } from "./select.js";
|
|
7
|
-
function v({
|
|
8
|
-
name: e,
|
|
9
|
-
label: n,
|
|
10
|
-
description: m,
|
|
11
|
-
required: l = !1,
|
|
12
|
-
options: s,
|
|
13
|
-
isMulti: f = !1,
|
|
14
|
-
isClearable: c = !1,
|
|
15
|
-
onChange: t = void 0,
|
|
16
|
-
...F
|
|
17
|
-
}) {
|
|
18
|
-
const { control: d } = g();
|
|
19
|
-
return /* @__PURE__ */ r(
|
|
20
|
-
u,
|
|
21
|
-
{
|
|
22
|
-
control: d,
|
|
23
|
-
name: e,
|
|
24
|
-
render: /* @__PURE__ */ o(({ field: a }) => {
|
|
25
|
-
const { onChange: h, ...p } = a;
|
|
26
|
-
return /* @__PURE__ */ C(j, { children: [
|
|
27
|
-
/* @__PURE__ */ r(S, { required: l, children: n }),
|
|
28
|
-
/* @__PURE__ */ r(b, { children: /* @__PURE__ */ r(
|
|
29
|
-
L,
|
|
30
|
-
{
|
|
31
|
-
onChange: /* @__PURE__ */ o((i) => {
|
|
32
|
-
h(i), t && t(i);
|
|
33
|
-
}, "onChange"),
|
|
34
|
-
...p,
|
|
35
|
-
options: s,
|
|
36
|
-
isMulti: f,
|
|
37
|
-
isClearable: c,
|
|
38
|
-
...F
|
|
39
|
-
}
|
|
40
|
-
) }),
|
|
41
|
-
m && /* @__PURE__ */ r(D, { children: m }),
|
|
42
|
-
/* @__PURE__ */ r(I, {})
|
|
43
|
-
] });
|
|
44
|
-
}, "render")
|
|
45
|
-
}
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
o(v, "FormSelect");
|
|
49
|
-
export {
|
|
50
|
-
v as FormSelect
|
|
51
|
-
};
|
|
1
|
+
var x=Object.defineProperty;var o=(e,n)=>x(e,"name",{value:n,configurable:!0});import{jsx as r,jsxs as C}from"react/jsx-runtime";import{useFormContext as g}from"react-hook-form";import{FormField as u,FormItem as j,FormLabel as S,FormControl as b,FormDescription as D,FormMessage as I}from"./form.js";import{Select as L}from"./select.js";function v({name:e,label:n,description:m,required:l=!1,options:s,isMulti:f=!1,isClearable:c=!1,onChange:t=void 0,...F}){const{control:d}=g();return r(u,{control:d,name:e,render:o(({field:a})=>{const{onChange:h,...p}=a;return C(j,{children:[r(S,{required:l,children:n}),r(b,{children:r(L,{onChange:o(i=>{h(i),t&&t(i)},"onChange"),...p,options:s,isMulti:f,isClearable:c,...F})}),m&&r(D,{children:m}),r(I,{})]})},"render")})}o(v,"FormSelect");export{v as FormSelect};
|
|
@@ -1,35 +1 @@
|
|
|
1
|
-
var s
|
|
2
|
-
var o = (r, e) => s(r, "name", { value: e, configurable: !0 });
|
|
3
|
-
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
4
|
-
import { useId as l } from "react";
|
|
5
|
-
import { FormField as d, FormItem as f } from "./form.js";
|
|
6
|
-
import { Switch as p } from "./switch.js";
|
|
7
|
-
import { Label as a } from "./label.js";
|
|
8
|
-
import { useFormContext as F } from "react-hook-form";
|
|
9
|
-
function I({ name: r, label: e }) {
|
|
10
|
-
const { control: c } = F(), t = l();
|
|
11
|
-
return /* @__PURE__ */ m(
|
|
12
|
-
d,
|
|
13
|
-
{
|
|
14
|
-
control: c,
|
|
15
|
-
name: r,
|
|
16
|
-
render: /* @__PURE__ */ o(({ field: n }) => /* @__PURE__ */ h(f, { className: "flex items-center", children: [
|
|
17
|
-
/* @__PURE__ */ m(
|
|
18
|
-
p,
|
|
19
|
-
{
|
|
20
|
-
id: t,
|
|
21
|
-
checked: n.value,
|
|
22
|
-
onCheckedChange: /* @__PURE__ */ o((i) => {
|
|
23
|
-
n.onChange(i);
|
|
24
|
-
}, "onCheckedChange")
|
|
25
|
-
}
|
|
26
|
-
),
|
|
27
|
-
/* @__PURE__ */ m(a, { htmlFor: t, children: e })
|
|
28
|
-
] }), "render")
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
o(I, "FormSwitch");
|
|
33
|
-
export {
|
|
34
|
-
I as FormSwitch
|
|
35
|
-
};
|
|
1
|
+
var s=Object.defineProperty;var o=(r,e)=>s(r,"name",{value:e,configurable:!0});import{jsx as m,jsxs as h}from"react/jsx-runtime";import{useId as l}from"react";import{FormField as d,FormItem as f}from"./form.js";import{Switch as p}from"./switch.js";import{Label as a}from"./label.js";import{useFormContext as F}from"react-hook-form";function I({name:r,label:e}){const{control:c}=F(),t=l();return m(d,{control:c,name:r,render:o(({field:n})=>h(f,{className:"flex items-center",children:[m(p,{id:t,checked:n.value,onCheckedChange:o(i=>{n.onChange(i)},"onCheckedChange")}),m(a,{htmlFor:t,children:e})]}),"render")})}o(I,"FormSwitch");export{I as FormSwitch};
|