@krak-stack/registry 0.1.3 → 0.1.5
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/ui/app-brand.js +20 -20
- package/dist/components/ui/code-block.js +38 -38
- package/dist/components/ui/copy-button.js +16 -16
- package/dist/components/ui/data-table.js +687 -687
- package/dist/components/ui/editing-locale-switcher.js +54 -54
- package/dist/components/ui/effect-form.js +492 -492
- package/dist/components/ui/file-picker.js +96 -96
- package/dist/components/ui/form.js +418 -418
- package/dist/components/ui/google-map.js +27 -27
- package/dist/components/ui/icon-input.js +93 -93
- package/dist/components/ui/loading.js +5 -5
- package/dist/components/ui/locale-switcher.js +48 -48
- package/dist/components/ui/pagination.js +92 -92
- package/dist/components/ui/search-menu.js +93 -93
- package/dist/components/ui/sidebar-layout.js +156 -156
- package/dist/components/ui/stats-card.js +28 -28
- package/dist/components/ui/theme-switcher.js +64 -64
- package/dist/components/ui/virtualized-combobox.js +66 -66
- package/dist/lib/docs-ai.js +14 -14
- package/dist/lib/docs-core.js +396 -396
- package/dist/services/agent/client/index.js +364 -364
- package/package.json +2 -2
|
@@ -10,22 +10,22 @@ function cn(...inputs) {
|
|
|
10
10
|
|
|
11
11
|
// ../../src/components/ui/select.tsx
|
|
12
12
|
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
|
|
13
|
-
import {
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
"use client";
|
|
15
15
|
var Select = SelectPrimitive.Root;
|
|
16
16
|
function SelectGroup({ className, ...props }) {
|
|
17
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Group, {
|
|
18
18
|
"data-slot": "select-group",
|
|
19
19
|
className: cn("scroll-my-1 p-1", className),
|
|
20
20
|
...props
|
|
21
|
-
}
|
|
21
|
+
});
|
|
22
22
|
}
|
|
23
23
|
function SelectValue({ className, ...props }) {
|
|
24
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Value, {
|
|
25
25
|
"data-slot": "select-value",
|
|
26
26
|
className: cn("flex flex-1 text-left", className),
|
|
27
27
|
...props
|
|
28
|
-
}
|
|
28
|
+
});
|
|
29
29
|
}
|
|
30
30
|
function SelectTrigger({
|
|
31
31
|
className,
|
|
@@ -33,20 +33,20 @@ function SelectTrigger({
|
|
|
33
33
|
children,
|
|
34
34
|
...props
|
|
35
35
|
}) {
|
|
36
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ jsxs(SelectPrimitive.Trigger, {
|
|
37
37
|
"data-slot": "select-trigger",
|
|
38
38
|
"data-size": size,
|
|
39
39
|
className: cn("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
40
40
|
...props,
|
|
41
41
|
children: [
|
|
42
42
|
children,
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
render: /* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, {
|
|
44
|
+
render: /* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
45
45
|
className: "text-muted-foreground pointer-events-none size-4"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
46
|
+
})
|
|
47
|
+
})
|
|
48
48
|
]
|
|
49
|
-
}
|
|
49
|
+
});
|
|
50
50
|
}
|
|
51
51
|
function SelectContent({
|
|
52
52
|
className,
|
|
@@ -58,76 +58,76 @@ function SelectContent({
|
|
|
58
58
|
alignItemWithTrigger = true,
|
|
59
59
|
...props
|
|
60
60
|
}) {
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
-
children: /* @__PURE__ */
|
|
61
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, {
|
|
62
|
+
children: /* @__PURE__ */ jsx(SelectPrimitive.Positioner, {
|
|
63
63
|
side,
|
|
64
64
|
sideOffset,
|
|
65
65
|
align,
|
|
66
66
|
alignOffset,
|
|
67
67
|
alignItemWithTrigger,
|
|
68
68
|
className: "isolate z-50",
|
|
69
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ jsxs(SelectPrimitive.Popup, {
|
|
70
70
|
"data-slot": "select-content",
|
|
71
71
|
"data-align-trigger": alignItemWithTrigger,
|
|
72
72
|
className: cn("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
73
73
|
...props,
|
|
74
74
|
children: [
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
76
|
+
/* @__PURE__ */ jsx(SelectPrimitive.List, {
|
|
77
77
|
children
|
|
78
|
-
}
|
|
79
|
-
/* @__PURE__ */
|
|
78
|
+
}),
|
|
79
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
80
80
|
]
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
81
|
+
})
|
|
82
|
+
})
|
|
83
|
+
});
|
|
84
84
|
}
|
|
85
85
|
function SelectItem({
|
|
86
86
|
className,
|
|
87
87
|
children,
|
|
88
88
|
...props
|
|
89
89
|
}) {
|
|
90
|
-
return /* @__PURE__ */
|
|
90
|
+
return /* @__PURE__ */ jsxs(SelectPrimitive.Item, {
|
|
91
91
|
"data-slot": "select-item",
|
|
92
92
|
className: cn("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
93
93
|
...props,
|
|
94
94
|
children: [
|
|
95
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, {
|
|
96
96
|
className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap",
|
|
97
97
|
children
|
|
98
|
-
}
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
render: /* @__PURE__ */
|
|
98
|
+
}),
|
|
99
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, {
|
|
100
|
+
render: /* @__PURE__ */ jsx("span", {
|
|
101
101
|
className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center"
|
|
102
|
-
}
|
|
103
|
-
children: /* @__PURE__ */
|
|
102
|
+
}),
|
|
103
|
+
children: /* @__PURE__ */ jsx(CheckIcon, {
|
|
104
104
|
className: "pointer-events-none"
|
|
105
|
-
}
|
|
106
|
-
}
|
|
105
|
+
})
|
|
106
|
+
})
|
|
107
107
|
]
|
|
108
|
-
}
|
|
108
|
+
});
|
|
109
109
|
}
|
|
110
110
|
function SelectScrollUpButton({
|
|
111
111
|
className,
|
|
112
112
|
...props
|
|
113
113
|
}) {
|
|
114
|
-
return /* @__PURE__ */
|
|
114
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.ScrollUpArrow, {
|
|
115
115
|
"data-slot": "select-scroll-up-button",
|
|
116
116
|
className: cn("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
117
117
|
...props,
|
|
118
|
-
children: /* @__PURE__ */
|
|
119
|
-
}
|
|
118
|
+
children: /* @__PURE__ */ jsx(ChevronUpIcon, {})
|
|
119
|
+
});
|
|
120
120
|
}
|
|
121
121
|
function SelectScrollDownButton({
|
|
122
122
|
className,
|
|
123
123
|
...props
|
|
124
124
|
}) {
|
|
125
|
-
return /* @__PURE__ */
|
|
125
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.ScrollDownArrow, {
|
|
126
126
|
"data-slot": "select-scroll-down-button",
|
|
127
127
|
className: cn("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
128
128
|
...props,
|
|
129
|
-
children: /* @__PURE__ */
|
|
130
|
-
}
|
|
129
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, {})
|
|
130
|
+
});
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
// ../../src/components/ui/form.tsx
|
|
@@ -145,7 +145,7 @@ import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog
|
|
|
145
145
|
// ../../src/components/ui/button.tsx
|
|
146
146
|
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
147
147
|
import { cva } from "class-variance-authority";
|
|
148
|
-
import {
|
|
148
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
149
149
|
var buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
150
150
|
variants: {
|
|
151
151
|
variant: {
|
|
@@ -178,104 +178,104 @@ function Button({
|
|
|
178
178
|
size = "default",
|
|
179
179
|
...props
|
|
180
180
|
}) {
|
|
181
|
-
return /* @__PURE__ */
|
|
181
|
+
return /* @__PURE__ */ jsx2(ButtonPrimitive, {
|
|
182
182
|
"data-slot": "button",
|
|
183
183
|
className: cn(buttonVariants({ variant, size, className })),
|
|
184
184
|
...props
|
|
185
|
-
}
|
|
185
|
+
});
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
// ../../src/components/ui/alert-dialog.tsx
|
|
189
|
-
import {
|
|
189
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
190
190
|
"use client";
|
|
191
191
|
function AlertDialog({ ...props }) {
|
|
192
|
-
return /* @__PURE__ */
|
|
192
|
+
return /* @__PURE__ */ jsx3(AlertDialogPrimitive.Root, {
|
|
193
193
|
"data-slot": "alert-dialog",
|
|
194
194
|
...props
|
|
195
|
-
}
|
|
195
|
+
});
|
|
196
196
|
}
|
|
197
197
|
function AlertDialogPortal({ ...props }) {
|
|
198
|
-
return /* @__PURE__ */
|
|
198
|
+
return /* @__PURE__ */ jsx3(AlertDialogPrimitive.Portal, {
|
|
199
199
|
"data-slot": "alert-dialog-portal",
|
|
200
200
|
...props
|
|
201
|
-
}
|
|
201
|
+
});
|
|
202
202
|
}
|
|
203
203
|
function AlertDialogOverlay({
|
|
204
204
|
className,
|
|
205
205
|
...props
|
|
206
206
|
}) {
|
|
207
|
-
return /* @__PURE__ */
|
|
207
|
+
return /* @__PURE__ */ jsx3(AlertDialogPrimitive.Backdrop, {
|
|
208
208
|
"data-slot": "alert-dialog-overlay",
|
|
209
209
|
className: cn("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
|
|
210
210
|
...props
|
|
211
|
-
}
|
|
211
|
+
});
|
|
212
212
|
}
|
|
213
213
|
function AlertDialogContent({
|
|
214
214
|
className,
|
|
215
215
|
size = "default",
|
|
216
216
|
...props
|
|
217
217
|
}) {
|
|
218
|
-
return /* @__PURE__ */
|
|
218
|
+
return /* @__PURE__ */ jsxs2(AlertDialogPortal, {
|
|
219
219
|
children: [
|
|
220
|
-
/* @__PURE__ */
|
|
221
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ jsx3(AlertDialogOverlay, {}),
|
|
221
|
+
/* @__PURE__ */ jsx3(AlertDialogPrimitive.Popup, {
|
|
222
222
|
"data-slot": "alert-dialog-content",
|
|
223
223
|
"data-size": size,
|
|
224
224
|
className: cn("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl bg-popover p-6 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
225
225
|
...props
|
|
226
|
-
}
|
|
226
|
+
})
|
|
227
227
|
]
|
|
228
|
-
}
|
|
228
|
+
});
|
|
229
229
|
}
|
|
230
230
|
function AlertDialogHeader({
|
|
231
231
|
className,
|
|
232
232
|
...props
|
|
233
233
|
}) {
|
|
234
|
-
return /* @__PURE__ */
|
|
234
|
+
return /* @__PURE__ */ jsx3("div", {
|
|
235
235
|
"data-slot": "alert-dialog-header",
|
|
236
236
|
className: cn("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className),
|
|
237
237
|
...props
|
|
238
|
-
}
|
|
238
|
+
});
|
|
239
239
|
}
|
|
240
240
|
function AlertDialogFooter({
|
|
241
241
|
className,
|
|
242
242
|
...props
|
|
243
243
|
}) {
|
|
244
|
-
return /* @__PURE__ */
|
|
244
|
+
return /* @__PURE__ */ jsx3("div", {
|
|
245
245
|
"data-slot": "alert-dialog-footer",
|
|
246
246
|
className: cn("flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", className),
|
|
247
247
|
...props
|
|
248
|
-
}
|
|
248
|
+
});
|
|
249
249
|
}
|
|
250
250
|
function AlertDialogTitle({
|
|
251
251
|
className,
|
|
252
252
|
...props
|
|
253
253
|
}) {
|
|
254
|
-
return /* @__PURE__ */
|
|
254
|
+
return /* @__PURE__ */ jsx3(AlertDialogPrimitive.Title, {
|
|
255
255
|
"data-slot": "alert-dialog-title",
|
|
256
256
|
className: cn("text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className),
|
|
257
257
|
...props
|
|
258
|
-
}
|
|
258
|
+
});
|
|
259
259
|
}
|
|
260
260
|
function AlertDialogDescription({
|
|
261
261
|
className,
|
|
262
262
|
...props
|
|
263
263
|
}) {
|
|
264
|
-
return /* @__PURE__ */
|
|
264
|
+
return /* @__PURE__ */ jsx3(AlertDialogPrimitive.Description, {
|
|
265
265
|
"data-slot": "alert-dialog-description",
|
|
266
266
|
className: cn("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
|
|
267
267
|
...props
|
|
268
|
-
}
|
|
268
|
+
});
|
|
269
269
|
}
|
|
270
270
|
function AlertDialogAction({
|
|
271
271
|
className,
|
|
272
272
|
...props
|
|
273
273
|
}) {
|
|
274
|
-
return /* @__PURE__ */
|
|
274
|
+
return /* @__PURE__ */ jsx3(Button, {
|
|
275
275
|
"data-slot": "alert-dialog-action",
|
|
276
276
|
className: cn(className),
|
|
277
277
|
...props
|
|
278
|
-
}
|
|
278
|
+
});
|
|
279
279
|
}
|
|
280
280
|
function AlertDialogCancel({
|
|
281
281
|
className,
|
|
@@ -283,45 +283,45 @@ function AlertDialogCancel({
|
|
|
283
283
|
size = "default",
|
|
284
284
|
...props
|
|
285
285
|
}) {
|
|
286
|
-
return /* @__PURE__ */
|
|
286
|
+
return /* @__PURE__ */ jsx3(AlertDialogPrimitive.Close, {
|
|
287
287
|
"data-slot": "alert-dialog-cancel",
|
|
288
288
|
className: cn(className),
|
|
289
|
-
render: /* @__PURE__ */
|
|
289
|
+
render: /* @__PURE__ */ jsx3(Button, {
|
|
290
290
|
variant,
|
|
291
291
|
size
|
|
292
|
-
}
|
|
292
|
+
}),
|
|
293
293
|
...props
|
|
294
|
-
}
|
|
294
|
+
});
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
// ../../src/components/ui/checkbox.tsx
|
|
298
298
|
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
|
|
299
299
|
import { CheckIcon as CheckIcon2 } from "lucide-react";
|
|
300
|
-
import {
|
|
300
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
301
301
|
"use client";
|
|
302
302
|
function Checkbox({ className, ...props }) {
|
|
303
|
-
return /* @__PURE__ */
|
|
303
|
+
return /* @__PURE__ */ jsx4(CheckboxPrimitive.Root, {
|
|
304
304
|
"data-slot": "checkbox",
|
|
305
305
|
className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary", className),
|
|
306
306
|
...props,
|
|
307
|
-
children: /* @__PURE__ */
|
|
307
|
+
children: /* @__PURE__ */ jsx4(CheckboxPrimitive.Indicator, {
|
|
308
308
|
"data-slot": "checkbox-indicator",
|
|
309
309
|
className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
|
|
310
|
-
children: /* @__PURE__ */
|
|
311
|
-
}
|
|
312
|
-
}
|
|
310
|
+
children: /* @__PURE__ */ jsx4(CheckIcon2, {})
|
|
311
|
+
})
|
|
312
|
+
});
|
|
313
313
|
}
|
|
314
314
|
|
|
315
315
|
// ../../src/components/ui/input.tsx
|
|
316
316
|
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
317
|
-
import {
|
|
317
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
318
318
|
function Input({ className, type, ...props }) {
|
|
319
|
-
return /* @__PURE__ */
|
|
319
|
+
return /* @__PURE__ */ jsx5(InputPrimitive, {
|
|
320
320
|
type,
|
|
321
321
|
"data-slot": "input",
|
|
322
322
|
className: cn("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
|
|
323
323
|
...props
|
|
324
|
-
}
|
|
324
|
+
});
|
|
325
325
|
}
|
|
326
326
|
|
|
327
327
|
// ../../src/components/ui/file-picker.tsx
|
|
@@ -337,7 +337,7 @@ import { CloudUpload, FileIcon, FileUp, RefreshCw, Trash2 } from "lucide-react";
|
|
|
337
337
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
338
338
|
import { useRender } from "@base-ui/react/use-render";
|
|
339
339
|
import { cva as cva2 } from "class-variance-authority";
|
|
340
|
-
import {
|
|
340
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
341
341
|
var attachmentVariants = cva2("group/attachment relative flex w-fit max-w-full min-w-0 shrink-0 flex-wrap rounded-xl border bg-card text-card-foreground transition-colors focus-within:ring-1 focus-within:ring-ring/50 has-[>a,>button]:hover:bg-muted/50 data-[state=error]:border-destructive/30 data-[state=idle]:border-dashed", {
|
|
342
342
|
variants: {
|
|
343
343
|
size: {
|
|
@@ -358,14 +358,14 @@ function Attachment({
|
|
|
358
358
|
orientation = "horizontal",
|
|
359
359
|
...props
|
|
360
360
|
}) {
|
|
361
|
-
return /* @__PURE__ */
|
|
361
|
+
return /* @__PURE__ */ jsx6("div", {
|
|
362
362
|
"data-slot": "attachment",
|
|
363
363
|
"data-state": state,
|
|
364
364
|
"data-size": size,
|
|
365
365
|
"data-orientation": orientation,
|
|
366
366
|
className: cn(attachmentVariants({ size, orientation }), className),
|
|
367
367
|
...props
|
|
368
|
-
}
|
|
368
|
+
});
|
|
369
369
|
}
|
|
370
370
|
var attachmentMediaVariants = cva2("relative flex aspect-square w-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted text-foreground group-data-[orientation=vertical]/attachment:w-full group-data-[size=sm]/attachment:w-8 group-data-[size=xs]/attachment:w-7 group-data-[size=xs]/attachment:rounded-md group-data-[state=error]/attachment:bg-destructive/10 group-data-[state=error]/attachment:text-destructive group-data-[orientation=vertical]/attachment:*:data-[slot=spinner]:size-6! [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 group-data-[orientation=vertical]/attachment:[&_svg:not([class*='size-'])]:size-6 group-data-[size=xs]/attachment:[&_svg:not([class*='size-'])]:size-3.5", {
|
|
371
371
|
variants: {
|
|
@@ -383,52 +383,52 @@ function AttachmentMedia({
|
|
|
383
383
|
variant = "icon",
|
|
384
384
|
...props
|
|
385
385
|
}) {
|
|
386
|
-
return /* @__PURE__ */
|
|
386
|
+
return /* @__PURE__ */ jsx6("div", {
|
|
387
387
|
"data-slot": "attachment-media",
|
|
388
388
|
"data-variant": variant,
|
|
389
389
|
className: cn(attachmentMediaVariants({ variant }), className),
|
|
390
390
|
...props
|
|
391
|
-
}
|
|
391
|
+
});
|
|
392
392
|
}
|
|
393
393
|
function AttachmentContent({
|
|
394
394
|
className,
|
|
395
395
|
...props
|
|
396
396
|
}) {
|
|
397
|
-
return /* @__PURE__ */
|
|
397
|
+
return /* @__PURE__ */ jsx6("div", {
|
|
398
398
|
"data-slot": "attachment-content",
|
|
399
399
|
className: cn("max-w-full min-w-0 flex-1 leading-tight group-data-[orientation=vertical]/attachment:px-1", className),
|
|
400
400
|
...props
|
|
401
|
-
}
|
|
401
|
+
});
|
|
402
402
|
}
|
|
403
403
|
function AttachmentTitle({
|
|
404
404
|
className,
|
|
405
405
|
...props
|
|
406
406
|
}) {
|
|
407
|
-
return /* @__PURE__ */
|
|
407
|
+
return /* @__PURE__ */ jsx6("span", {
|
|
408
408
|
"data-slot": "attachment-title",
|
|
409
409
|
className: cn("block max-w-full min-w-0 truncate font-medium group-data-[state=processing]/attachment:shimmer group-data-[state=uploading]/attachment:shimmer", className),
|
|
410
410
|
...props
|
|
411
|
-
}
|
|
411
|
+
});
|
|
412
412
|
}
|
|
413
413
|
function AttachmentDescription({
|
|
414
414
|
className,
|
|
415
415
|
...props
|
|
416
416
|
}) {
|
|
417
|
-
return /* @__PURE__ */
|
|
417
|
+
return /* @__PURE__ */ jsx6("span", {
|
|
418
418
|
"data-slot": "attachment-description",
|
|
419
419
|
className: cn("mt-0.5 block min-w-0 truncate text-xs text-muted-foreground group-data-[state=error]/attachment:text-destructive/80", "max-w-full", className),
|
|
420
420
|
...props
|
|
421
|
-
}
|
|
421
|
+
});
|
|
422
422
|
}
|
|
423
423
|
function AttachmentActions({
|
|
424
424
|
className,
|
|
425
425
|
...props
|
|
426
426
|
}) {
|
|
427
|
-
return /* @__PURE__ */
|
|
427
|
+
return /* @__PURE__ */ jsx6("div", {
|
|
428
428
|
"data-slot": "attachment-actions",
|
|
429
429
|
className: cn("relative z-20 flex shrink-0 items-center group-data-[orientation=vertical]/attachment:absolute group-data-[orientation=vertical]/attachment:top-3 group-data-[orientation=vertical]/attachment:right-3 group-data-[orientation=vertical]/attachment:gap-1", className),
|
|
430
430
|
...props
|
|
431
|
-
}
|
|
431
|
+
});
|
|
432
432
|
}
|
|
433
433
|
function AttachmentAction({
|
|
434
434
|
className,
|
|
@@ -436,20 +436,20 @@ function AttachmentAction({
|
|
|
436
436
|
size = "icon-xs",
|
|
437
437
|
...props
|
|
438
438
|
}) {
|
|
439
|
-
return /* @__PURE__ */
|
|
439
|
+
return /* @__PURE__ */ jsx6(Button, {
|
|
440
440
|
"data-slot": "attachment-action",
|
|
441
441
|
variant: variant ?? "ghost",
|
|
442
442
|
size,
|
|
443
443
|
className: cn(className),
|
|
444
444
|
...props
|
|
445
|
-
}
|
|
445
|
+
});
|
|
446
446
|
}
|
|
447
447
|
function AttachmentGroup({ className, ...props }) {
|
|
448
|
-
return /* @__PURE__ */
|
|
448
|
+
return /* @__PURE__ */ jsx6("div", {
|
|
449
449
|
"data-slot": "attachment-group",
|
|
450
450
|
className: cn("flex min-w-0 scroll-fade-x snap-x snap-mandatory scroll-px-1 scrollbar-none gap-3 overflow-x-auto overscroll-x-contain py-1 *:data-[slot=attachment]:flex-none *:data-[slot=attachment]:snap-start", className),
|
|
451
451
|
...props
|
|
452
|
-
}
|
|
452
|
+
});
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
// ../../src/paraglide/runtime.js
|
|
@@ -881,7 +881,7 @@ function isCustomStrategy(strategy2) {
|
|
|
881
881
|
}
|
|
882
882
|
|
|
883
883
|
// ../../src/components/ui/file-picker.tsx
|
|
884
|
-
import {
|
|
884
|
+
import { jsx as jsx7, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
|
|
885
885
|
"use client";
|
|
886
886
|
var messages = {
|
|
887
887
|
en: {
|
|
@@ -974,7 +974,7 @@ var FilePicker = ({
|
|
|
974
974
|
if (inputRef.current)
|
|
975
975
|
inputRef.current.value = "";
|
|
976
976
|
};
|
|
977
|
-
const input = /* @__PURE__ */
|
|
977
|
+
const input = /* @__PURE__ */ jsx7(Input, {
|
|
978
978
|
ref: inputRef,
|
|
979
979
|
className: "sr-only",
|
|
980
980
|
id,
|
|
@@ -991,12 +991,12 @@ var FilePicker = ({
|
|
|
991
991
|
event.target.value = "";
|
|
992
992
|
},
|
|
993
993
|
"aria-invalid": invalid
|
|
994
|
-
}
|
|
994
|
+
});
|
|
995
995
|
if (multiple) {
|
|
996
|
-
return /* @__PURE__ */
|
|
996
|
+
return /* @__PURE__ */ jsxs3("div", {
|
|
997
997
|
className: "grid min-w-0 gap-3",
|
|
998
998
|
children: [
|
|
999
|
-
/* @__PURE__ */
|
|
999
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
1000
1000
|
className: "bg-muted/30 data-[dragging=true]:bg-muted flex min-h-32 min-w-0 flex-col items-center justify-center gap-3 rounded-xl border border-dashed p-6 text-center transition-colors",
|
|
1001
1001
|
"data-dragging": dragging,
|
|
1002
1002
|
onDragEnter: (event) => {
|
|
@@ -1015,69 +1015,69 @@ var FilePicker = ({
|
|
|
1015
1015
|
onDragOver: (event) => event.preventDefault(),
|
|
1016
1016
|
onDrop: handleDrop,
|
|
1017
1017
|
children: [
|
|
1018
|
-
/* @__PURE__ */
|
|
1018
|
+
/* @__PURE__ */ jsx7(CloudUpload, {
|
|
1019
1019
|
className: "text-muted-foreground size-6"
|
|
1020
|
-
}
|
|
1021
|
-
/* @__PURE__ */
|
|
1020
|
+
}),
|
|
1021
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
1022
1022
|
className: "max-w-full min-w-0",
|
|
1023
1023
|
children: [
|
|
1024
|
-
/* @__PURE__ */
|
|
1024
|
+
/* @__PURE__ */ jsx7("p", {
|
|
1025
1025
|
className: "text-sm font-medium",
|
|
1026
1026
|
children: labels.dropFiles
|
|
1027
|
-
}
|
|
1028
|
-
/* @__PURE__ */
|
|
1027
|
+
}),
|
|
1028
|
+
/* @__PURE__ */ jsx7("p", {
|
|
1029
1029
|
className: "text-muted-foreground max-w-full text-xs [overflow-wrap:anywhere]",
|
|
1030
1030
|
children: labels.accepts(accept)
|
|
1031
|
-
}
|
|
1031
|
+
})
|
|
1032
1032
|
]
|
|
1033
|
-
}
|
|
1034
|
-
/* @__PURE__ */
|
|
1033
|
+
}),
|
|
1034
|
+
/* @__PURE__ */ jsxs3(Button, {
|
|
1035
1035
|
type: "button",
|
|
1036
1036
|
variant: "outline",
|
|
1037
1037
|
onClick: () => inputRef.current?.click(),
|
|
1038
1038
|
children: [
|
|
1039
|
-
/* @__PURE__ */
|
|
1039
|
+
/* @__PURE__ */ jsx7(FileUp, {
|
|
1040
1040
|
"data-icon": "inline-start"
|
|
1041
|
-
}
|
|
1041
|
+
}),
|
|
1042
1042
|
labels.chooseFiles
|
|
1043
1043
|
]
|
|
1044
|
-
}
|
|
1044
|
+
}),
|
|
1045
1045
|
input
|
|
1046
1046
|
]
|
|
1047
|
-
}
|
|
1048
|
-
files.length > 0 ? /* @__PURE__ */
|
|
1049
|
-
children: files.map((selectedFile) => /* @__PURE__ */
|
|
1047
|
+
}),
|
|
1048
|
+
files.length > 0 ? /* @__PURE__ */ jsx7(AttachmentGroup, {
|
|
1049
|
+
children: files.map((selectedFile) => /* @__PURE__ */ jsxs3(Attachment, {
|
|
1050
1050
|
state: invalid ? "error" : "idle",
|
|
1051
1051
|
children: [
|
|
1052
|
-
/* @__PURE__ */
|
|
1053
|
-
children: /* @__PURE__ */
|
|
1054
|
-
}
|
|
1055
|
-
/* @__PURE__ */
|
|
1052
|
+
/* @__PURE__ */ jsx7(AttachmentMedia, {
|
|
1053
|
+
children: /* @__PURE__ */ jsx7(FileIcon, {})
|
|
1054
|
+
}),
|
|
1055
|
+
/* @__PURE__ */ jsxs3(AttachmentContent, {
|
|
1056
1056
|
children: [
|
|
1057
|
-
/* @__PURE__ */
|
|
1057
|
+
/* @__PURE__ */ jsx7(AttachmentTitle, {
|
|
1058
1058
|
children: selectedFile.name
|
|
1059
|
-
}
|
|
1060
|
-
/* @__PURE__ */
|
|
1059
|
+
}),
|
|
1060
|
+
/* @__PURE__ */ jsx7(AttachmentDescription, {
|
|
1061
1061
|
children: fileDescription(selectedFile)
|
|
1062
|
-
}
|
|
1062
|
+
})
|
|
1063
1063
|
]
|
|
1064
|
-
}
|
|
1065
|
-
/* @__PURE__ */
|
|
1066
|
-
children: /* @__PURE__ */
|
|
1064
|
+
}),
|
|
1065
|
+
/* @__PURE__ */ jsx7(AttachmentActions, {
|
|
1066
|
+
children: /* @__PURE__ */ jsx7(AttachmentAction, {
|
|
1067
1067
|
type: "button",
|
|
1068
1068
|
"aria-label": `${labels.deleteFile} ${selectedFile.name}`,
|
|
1069
1069
|
onClick: () => onFilesChange?.(files.filter((candidate) => candidate !== selectedFile)),
|
|
1070
|
-
children: /* @__PURE__ */
|
|
1071
|
-
}
|
|
1072
|
-
}
|
|
1070
|
+
children: /* @__PURE__ */ jsx7(Trash2, {})
|
|
1071
|
+
})
|
|
1072
|
+
})
|
|
1073
1073
|
]
|
|
1074
|
-
}, `${selectedFile.name}:${selectedFile.size}:${selectedFile.lastModified}
|
|
1075
|
-
}
|
|
1074
|
+
}, `${selectedFile.name}:${selectedFile.size}:${selectedFile.lastModified}`))
|
|
1075
|
+
}) : null
|
|
1076
1076
|
]
|
|
1077
|
-
}
|
|
1077
|
+
});
|
|
1078
1078
|
}
|
|
1079
1079
|
if (!selected) {
|
|
1080
|
-
return /* @__PURE__ */
|
|
1080
|
+
return /* @__PURE__ */ jsxs3("div", {
|
|
1081
1081
|
className: "bg-muted/30 data-[dragging=true]:bg-muted flex min-h-32 flex-col items-center justify-center gap-3 rounded-xl border border-dashed p-6 text-center transition-colors",
|
|
1082
1082
|
"data-dragging": dragging,
|
|
1083
1083
|
onDragEnter: (event) => {
|
|
@@ -1096,87 +1096,87 @@ var FilePicker = ({
|
|
|
1096
1096
|
onDragOver: (event) => event.preventDefault(),
|
|
1097
1097
|
onDrop: handleDrop,
|
|
1098
1098
|
children: [
|
|
1099
|
-
/* @__PURE__ */
|
|
1099
|
+
/* @__PURE__ */ jsx7(CloudUpload, {
|
|
1100
1100
|
className: "text-muted-foreground size-6"
|
|
1101
|
-
}
|
|
1102
|
-
/* @__PURE__ */
|
|
1101
|
+
}),
|
|
1102
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
1103
1103
|
children: [
|
|
1104
|
-
/* @__PURE__ */
|
|
1104
|
+
/* @__PURE__ */ jsx7("p", {
|
|
1105
1105
|
className: "text-sm font-medium",
|
|
1106
1106
|
children: labels.dropFile
|
|
1107
|
-
}
|
|
1108
|
-
/* @__PURE__ */
|
|
1107
|
+
}),
|
|
1108
|
+
/* @__PURE__ */ jsx7("p", {
|
|
1109
1109
|
className: "text-muted-foreground text-xs",
|
|
1110
1110
|
children: labels.accepts(accept)
|
|
1111
|
-
}
|
|
1111
|
+
})
|
|
1112
1112
|
]
|
|
1113
|
-
}
|
|
1114
|
-
/* @__PURE__ */
|
|
1113
|
+
}),
|
|
1114
|
+
/* @__PURE__ */ jsxs3(Button, {
|
|
1115
1115
|
type: "button",
|
|
1116
1116
|
variant: "outline",
|
|
1117
1117
|
onClick: () => inputRef.current?.click(),
|
|
1118
1118
|
children: [
|
|
1119
|
-
/* @__PURE__ */
|
|
1119
|
+
/* @__PURE__ */ jsx7(FileUp, {
|
|
1120
1120
|
"data-icon": "inline-start"
|
|
1121
|
-
}
|
|
1121
|
+
}),
|
|
1122
1122
|
labels.chooseFile
|
|
1123
1123
|
]
|
|
1124
|
-
}
|
|
1124
|
+
}),
|
|
1125
1125
|
input
|
|
1126
1126
|
]
|
|
1127
|
-
}
|
|
1127
|
+
});
|
|
1128
1128
|
}
|
|
1129
|
-
return /* @__PURE__ */
|
|
1129
|
+
return /* @__PURE__ */ jsxs3(Fragment, {
|
|
1130
1130
|
children: [
|
|
1131
|
-
/* @__PURE__ */
|
|
1131
|
+
/* @__PURE__ */ jsxs3(Attachment, {
|
|
1132
1132
|
className: image ? "w-fit max-w-full" : "w-full",
|
|
1133
1133
|
orientation: image ? "vertical" : "horizontal",
|
|
1134
1134
|
state: invalid ? "error" : "done",
|
|
1135
1135
|
children: [
|
|
1136
|
-
/* @__PURE__ */
|
|
1136
|
+
/* @__PURE__ */ jsx7(AttachmentMedia, {
|
|
1137
1137
|
variant: image ? "image" : "icon",
|
|
1138
1138
|
className: image ? "aspect-auto w-full max-w-full [&_img]:aspect-auto! [&_img]:object-contain!" : undefined,
|
|
1139
|
-
children: image && imageUrl ? /* @__PURE__ */
|
|
1139
|
+
children: image && imageUrl ? /* @__PURE__ */ jsx7("img", {
|
|
1140
1140
|
src: imageUrl,
|
|
1141
1141
|
alt: image.alt,
|
|
1142
1142
|
width: image.width,
|
|
1143
1143
|
height: image.height,
|
|
1144
1144
|
className: "h-auto max-w-full object-contain",
|
|
1145
1145
|
style: { maxHeight: image.height }
|
|
1146
|
-
}
|
|
1147
|
-
}
|
|
1148
|
-
/* @__PURE__ */
|
|
1146
|
+
}) : /* @__PURE__ */ jsx7(FileIcon, {})
|
|
1147
|
+
}),
|
|
1148
|
+
/* @__PURE__ */ jsxs3(AttachmentContent, {
|
|
1149
1149
|
className: image ? "w-full" : undefined,
|
|
1150
1150
|
children: [
|
|
1151
|
-
/* @__PURE__ */
|
|
1151
|
+
/* @__PURE__ */ jsx7(AttachmentTitle, {
|
|
1152
1152
|
children: title
|
|
1153
|
-
}
|
|
1154
|
-
file ? /* @__PURE__ */
|
|
1153
|
+
}),
|
|
1154
|
+
file ? /* @__PURE__ */ jsx7(AttachmentDescription, {
|
|
1155
1155
|
children: fileDescription(file)
|
|
1156
|
-
}
|
|
1156
|
+
}) : null
|
|
1157
1157
|
]
|
|
1158
|
-
}
|
|
1159
|
-
/* @__PURE__ */
|
|
1158
|
+
}),
|
|
1159
|
+
/* @__PURE__ */ jsxs3(AttachmentActions, {
|
|
1160
1160
|
children: [
|
|
1161
|
-
/* @__PURE__ */
|
|
1161
|
+
/* @__PURE__ */ jsx7(AttachmentAction, {
|
|
1162
1162
|
type: "button",
|
|
1163
1163
|
"aria-label": labels.replaceFile,
|
|
1164
1164
|
onClick: () => inputRef.current?.click(),
|
|
1165
|
-
children: /* @__PURE__ */
|
|
1166
|
-
}
|
|
1167
|
-
canClear ? /* @__PURE__ */
|
|
1165
|
+
children: /* @__PURE__ */ jsx7(RefreshCw, {})
|
|
1166
|
+
}),
|
|
1167
|
+
canClear ? /* @__PURE__ */ jsx7(AttachmentAction, {
|
|
1168
1168
|
type: "button",
|
|
1169
1169
|
"aria-label": `${labels.deleteFile} ${typeof title === "string" ? title : ""}`,
|
|
1170
1170
|
onClick: clear,
|
|
1171
|
-
children: /* @__PURE__ */
|
|
1172
|
-
}
|
|
1171
|
+
children: /* @__PURE__ */ jsx7(Trash2, {})
|
|
1172
|
+
}) : null
|
|
1173
1173
|
]
|
|
1174
|
-
}
|
|
1174
|
+
})
|
|
1175
1175
|
]
|
|
1176
|
-
}
|
|
1176
|
+
}),
|
|
1177
1177
|
input
|
|
1178
1178
|
]
|
|
1179
|
-
}
|
|
1179
|
+
});
|
|
1180
1180
|
};
|
|
1181
1181
|
|
|
1182
1182
|
// ../../src/components/ui/field.tsx
|
|
@@ -1184,47 +1184,47 @@ import { useMemo as useMemo2 } from "react";
|
|
|
1184
1184
|
import { cva as cva3 } from "class-variance-authority";
|
|
1185
1185
|
|
|
1186
1186
|
// ../../src/components/ui/label.tsx
|
|
1187
|
-
import {
|
|
1187
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
1188
1188
|
"use client";
|
|
1189
1189
|
function Label({ className, ...props }) {
|
|
1190
|
-
return /* @__PURE__ */
|
|
1190
|
+
return /* @__PURE__ */ jsx8("label", {
|
|
1191
1191
|
"data-slot": "label",
|
|
1192
1192
|
className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
|
|
1193
1193
|
...props
|
|
1194
|
-
}
|
|
1194
|
+
});
|
|
1195
1195
|
}
|
|
1196
1196
|
|
|
1197
1197
|
// ../../src/components/ui/separator.tsx
|
|
1198
1198
|
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
1199
|
-
import {
|
|
1199
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
1200
1200
|
|
|
1201
1201
|
// ../../src/components/ui/field.tsx
|
|
1202
|
-
import {
|
|
1202
|
+
import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1203
1203
|
function FieldSet({ className, ...props }) {
|
|
1204
|
-
return /* @__PURE__ */
|
|
1204
|
+
return /* @__PURE__ */ jsx10("fieldset", {
|
|
1205
1205
|
"data-slot": "field-set",
|
|
1206
1206
|
className: cn("flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", className),
|
|
1207
1207
|
...props
|
|
1208
|
-
}
|
|
1208
|
+
});
|
|
1209
1209
|
}
|
|
1210
1210
|
function FieldLegend({
|
|
1211
1211
|
className,
|
|
1212
1212
|
variant = "legend",
|
|
1213
1213
|
...props
|
|
1214
1214
|
}) {
|
|
1215
|
-
return /* @__PURE__ */
|
|
1215
|
+
return /* @__PURE__ */ jsx10("legend", {
|
|
1216
1216
|
"data-slot": "field-legend",
|
|
1217
1217
|
"data-variant": variant,
|
|
1218
1218
|
className: cn("mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base", className),
|
|
1219
1219
|
...props
|
|
1220
|
-
}
|
|
1220
|
+
});
|
|
1221
1221
|
}
|
|
1222
1222
|
function FieldGroup({ className, ...props }) {
|
|
1223
|
-
return /* @__PURE__ */
|
|
1223
|
+
return /* @__PURE__ */ jsx10("div", {
|
|
1224
1224
|
"data-slot": "field-group",
|
|
1225
1225
|
className: cn("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4", className),
|
|
1226
1226
|
...props
|
|
1227
|
-
}
|
|
1227
|
+
});
|
|
1228
1228
|
}
|
|
1229
1229
|
var fieldVariants = cva3("group/field flex w-full gap-3 data-[invalid=true]:text-destructive", {
|
|
1230
1230
|
variants: {
|
|
@@ -1243,40 +1243,40 @@ function Field({
|
|
|
1243
1243
|
orientation = "vertical",
|
|
1244
1244
|
...props
|
|
1245
1245
|
}) {
|
|
1246
|
-
return /* @__PURE__ */
|
|
1246
|
+
return /* @__PURE__ */ jsx10("div", {
|
|
1247
1247
|
role: "group",
|
|
1248
1248
|
"data-slot": "field",
|
|
1249
1249
|
"data-orientation": orientation,
|
|
1250
1250
|
className: cn(fieldVariants({ orientation }), className),
|
|
1251
1251
|
...props
|
|
1252
|
-
}
|
|
1252
|
+
});
|
|
1253
1253
|
}
|
|
1254
1254
|
function FieldLabel({
|
|
1255
1255
|
className,
|
|
1256
1256
|
...props
|
|
1257
1257
|
}) {
|
|
1258
|
-
return /* @__PURE__ */
|
|
1258
|
+
return /* @__PURE__ */ jsx10(Label, {
|
|
1259
1259
|
"data-slot": "field-label",
|
|
1260
1260
|
className: cn("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border *:data-[slot=field]:p-3 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", className),
|
|
1261
1261
|
...props
|
|
1262
|
-
}
|
|
1262
|
+
});
|
|
1263
1263
|
}
|
|
1264
1264
|
function FieldDescription({ className, ...props }) {
|
|
1265
|
-
return /* @__PURE__ */
|
|
1265
|
+
return /* @__PURE__ */ jsx10("p", {
|
|
1266
1266
|
"data-slot": "field-description",
|
|
1267
1267
|
className: cn("text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5", "last:mt-0 nth-last-2:-mt-1", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
|
|
1268
1268
|
...props
|
|
1269
|
-
}
|
|
1269
|
+
});
|
|
1270
1270
|
}
|
|
1271
1271
|
|
|
1272
1272
|
// ../../src/components/ui/textarea.tsx
|
|
1273
|
-
import {
|
|
1273
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1274
1274
|
function Textarea({ className, ...props }) {
|
|
1275
|
-
return /* @__PURE__ */
|
|
1275
|
+
return /* @__PURE__ */ jsx11("textarea", {
|
|
1276
1276
|
"data-slot": "textarea",
|
|
1277
1277
|
className: cn("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
|
|
1278
1278
|
...props
|
|
1279
|
-
}
|
|
1279
|
+
});
|
|
1280
1280
|
}
|
|
1281
1281
|
|
|
1282
1282
|
// ../../src/components/ui/badge.tsx
|
|
@@ -1329,14 +1329,14 @@ import {
|
|
|
1329
1329
|
|
|
1330
1330
|
// ../../src/components/ui/input-group.tsx
|
|
1331
1331
|
import { cva as cva5 } from "class-variance-authority";
|
|
1332
|
-
import {
|
|
1332
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1333
1333
|
function InputGroup({ className, ...props }) {
|
|
1334
|
-
return /* @__PURE__ */
|
|
1334
|
+
return /* @__PURE__ */ jsx12("div", {
|
|
1335
1335
|
"data-slot": "input-group",
|
|
1336
1336
|
role: "group",
|
|
1337
1337
|
className: cn("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", className),
|
|
1338
1338
|
...props
|
|
1339
|
-
}
|
|
1339
|
+
});
|
|
1340
1340
|
}
|
|
1341
1341
|
var inputGroupAddonVariants = cva5("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
|
|
1342
1342
|
variants: {
|
|
@@ -1364,15 +1364,15 @@ function InputGroupInput({
|
|
|
1364
1364
|
className,
|
|
1365
1365
|
...props
|
|
1366
1366
|
}) {
|
|
1367
|
-
return /* @__PURE__ */
|
|
1367
|
+
return /* @__PURE__ */ jsx12(Input, {
|
|
1368
1368
|
"data-slot": "input-group-control",
|
|
1369
1369
|
className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent", className),
|
|
1370
1370
|
...props
|
|
1371
|
-
}
|
|
1371
|
+
});
|
|
1372
1372
|
}
|
|
1373
1373
|
|
|
1374
1374
|
// ../../src/components/ui/virtualized-combobox.tsx
|
|
1375
|
-
import {
|
|
1375
|
+
import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1376
1376
|
"use client";
|
|
1377
1377
|
var messages2 = {
|
|
1378
1378
|
en: {
|
|
@@ -1435,19 +1435,19 @@ var VirtualizedComboboxList = ({
|
|
|
1435
1435
|
virtualizer.measure();
|
|
1436
1436
|
}, [virtualizer]);
|
|
1437
1437
|
if (filteredItems.length === 0) {
|
|
1438
|
-
return /* @__PURE__ */
|
|
1438
|
+
return /* @__PURE__ */ jsx13("div", {
|
|
1439
1439
|
className: "text-muted-foreground py-6 text-center text-sm",
|
|
1440
1440
|
children: emptyLabel
|
|
1441
|
-
}
|
|
1441
|
+
});
|
|
1442
1442
|
}
|
|
1443
|
-
return /* @__PURE__ */
|
|
1443
|
+
return /* @__PURE__ */ jsx13(ComboboxPrimitive.List, {
|
|
1444
1444
|
className: "scroll-py-1 overflow-auto overscroll-contain p-1",
|
|
1445
1445
|
ref: handleScrollElementRef,
|
|
1446
1446
|
style: {
|
|
1447
1447
|
height: Math.min(virtualizer.getTotalSize() + 8, 288),
|
|
1448
1448
|
maxHeight: "var(--available-height)"
|
|
1449
1449
|
},
|
|
1450
|
-
children: /* @__PURE__ */
|
|
1450
|
+
children: /* @__PURE__ */ jsx13("div", {
|
|
1451
1451
|
className: "relative w-full",
|
|
1452
1452
|
role: "presentation",
|
|
1453
1453
|
style: { height: virtualizer.getTotalSize() },
|
|
@@ -1460,18 +1460,18 @@ var VirtualizedComboboxList = ({
|
|
|
1460
1460
|
transform: `translateY(${virtualItem.start}px)`
|
|
1461
1461
|
};
|
|
1462
1462
|
if (entry.kind === "group") {
|
|
1463
|
-
return /* @__PURE__ */
|
|
1463
|
+
return /* @__PURE__ */ jsx13(ComboboxPrimitive.Group, {
|
|
1464
1464
|
className: "contents",
|
|
1465
|
-
children: /* @__PURE__ */
|
|
1465
|
+
children: /* @__PURE__ */ jsx13(ComboboxPrimitive.GroupLabel, {
|
|
1466
1466
|
className: "text-muted-foreground absolute top-0 left-0 w-full px-2 pt-3 pb-1 text-xs",
|
|
1467
1467
|
"data-index": virtualItem.index,
|
|
1468
1468
|
ref: virtualizer.measureElement,
|
|
1469
1469
|
style,
|
|
1470
1470
|
children: entry.label
|
|
1471
|
-
}
|
|
1472
|
-
}, entry.key
|
|
1471
|
+
})
|
|
1472
|
+
}, entry.key);
|
|
1473
1473
|
}
|
|
1474
|
-
return /* @__PURE__ */
|
|
1474
|
+
return /* @__PURE__ */ jsxs5(ComboboxPrimitive.Item, {
|
|
1475
1475
|
"aria-posinset": entry.index + 1,
|
|
1476
1476
|
"aria-setsize": filteredItems.length,
|
|
1477
1477
|
className: "data-highlighted:bg-accent data-highlighted:text-accent-foreground absolute top-0 left-0 flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
@@ -1481,19 +1481,19 @@ var VirtualizedComboboxList = ({
|
|
|
1481
1481
|
style,
|
|
1482
1482
|
value: entry.item,
|
|
1483
1483
|
children: [
|
|
1484
|
-
renderItem?.(entry.item) ?? /* @__PURE__ */
|
|
1484
|
+
renderItem?.(entry.item) ?? /* @__PURE__ */ jsx13("span", {
|
|
1485
1485
|
className: "min-w-0 truncate",
|
|
1486
1486
|
children: entry.item.label
|
|
1487
|
-
}
|
|
1488
|
-
/* @__PURE__ */
|
|
1487
|
+
}),
|
|
1488
|
+
/* @__PURE__ */ jsx13(ComboboxPrimitive.ItemIndicator, {
|
|
1489
1489
|
className: "absolute right-2 flex size-4 items-center justify-center",
|
|
1490
|
-
children: /* @__PURE__ */
|
|
1491
|
-
}
|
|
1490
|
+
children: /* @__PURE__ */ jsx13(Check, {})
|
|
1491
|
+
})
|
|
1492
1492
|
]
|
|
1493
|
-
}, entry.item.value
|
|
1493
|
+
}, entry.item.value);
|
|
1494
1494
|
})
|
|
1495
|
-
}
|
|
1496
|
-
}
|
|
1495
|
+
})
|
|
1496
|
+
});
|
|
1497
1497
|
};
|
|
1498
1498
|
var VirtualizedComboboxContent = ({
|
|
1499
1499
|
contentClassName,
|
|
@@ -1505,39 +1505,39 @@ var VirtualizedComboboxContent = ({
|
|
|
1505
1505
|
virtualizerRef
|
|
1506
1506
|
}) => {
|
|
1507
1507
|
const labels = virtualizedComboboxMessages(messageOverrides);
|
|
1508
|
-
return /* @__PURE__ */
|
|
1509
|
-
children: /* @__PURE__ */
|
|
1508
|
+
return /* @__PURE__ */ jsx13(ComboboxPrimitive.Portal, {
|
|
1509
|
+
children: /* @__PURE__ */ jsx13(ComboboxPrimitive.Positioner, {
|
|
1510
1510
|
align: "start",
|
|
1511
1511
|
className: "isolate z-50",
|
|
1512
1512
|
side: "bottom",
|
|
1513
1513
|
sideOffset: 6,
|
|
1514
|
-
children: /* @__PURE__ */
|
|
1514
|
+
children: /* @__PURE__ */ jsxs5(ComboboxPrimitive.Popup, {
|
|
1515
1515
|
className: cn("relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-0 origin-(--transform-origin) overflow-hidden rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-in-95", contentClassName),
|
|
1516
1516
|
children: [
|
|
1517
|
-
/* @__PURE__ */
|
|
1517
|
+
/* @__PURE__ */ jsx13("div", {
|
|
1518
1518
|
className: "min-w-0 p-1 pb-0",
|
|
1519
|
-
children: /* @__PURE__ */
|
|
1519
|
+
children: /* @__PURE__ */ jsx13(InputGroup, {
|
|
1520
1520
|
className: "border-input/30 bg-input/30 h-8 w-full min-w-0 shadow-none",
|
|
1521
|
-
children: /* @__PURE__ */
|
|
1521
|
+
children: /* @__PURE__ */ jsx13(ComboboxPrimitive.Input, {
|
|
1522
1522
|
placeholder: labels.search,
|
|
1523
|
-
render: /* @__PURE__ */
|
|
1524
|
-
}
|
|
1525
|
-
}
|
|
1526
|
-
}
|
|
1527
|
-
/* @__PURE__ */
|
|
1523
|
+
render: /* @__PURE__ */ jsx13(InputGroupInput, {})
|
|
1524
|
+
})
|
|
1525
|
+
})
|
|
1526
|
+
}),
|
|
1527
|
+
/* @__PURE__ */ jsx13(VirtualizedComboboxList, {
|
|
1528
1528
|
emptyLabel,
|
|
1529
1529
|
groupSelections,
|
|
1530
1530
|
messages: messageOverrides,
|
|
1531
1531
|
renderItem,
|
|
1532
1532
|
selectedValues,
|
|
1533
1533
|
virtualizerRef
|
|
1534
|
-
}
|
|
1534
|
+
})
|
|
1535
1535
|
]
|
|
1536
|
-
}
|
|
1537
|
-
}
|
|
1538
|
-
}
|
|
1536
|
+
})
|
|
1537
|
+
})
|
|
1538
|
+
});
|
|
1539
1539
|
};
|
|
1540
|
-
var defaultTrigger = (ariaLabel, ariaInvalid, disabled, label, triggerId) => /* @__PURE__ */
|
|
1540
|
+
var defaultTrigger = (ariaLabel, ariaInvalid, disabled, label, triggerId) => /* @__PURE__ */ jsxs5(Button, {
|
|
1541
1541
|
"aria-label": ariaLabel,
|
|
1542
1542
|
"aria-invalid": ariaInvalid,
|
|
1543
1543
|
className: "w-full max-w-full min-w-0 justify-between overflow-hidden",
|
|
@@ -1546,15 +1546,15 @@ var defaultTrigger = (ariaLabel, ariaInvalid, disabled, label, triggerId) => /*
|
|
|
1546
1546
|
type: "button",
|
|
1547
1547
|
variant: "outline",
|
|
1548
1548
|
children: [
|
|
1549
|
-
/* @__PURE__ */
|
|
1549
|
+
/* @__PURE__ */ jsx13("span", {
|
|
1550
1550
|
className: "min-w-0 truncate text-left",
|
|
1551
1551
|
children: label
|
|
1552
|
-
}
|
|
1553
|
-
/* @__PURE__ */
|
|
1552
|
+
}),
|
|
1553
|
+
/* @__PURE__ */ jsx13(ChevronsUpDown, {
|
|
1554
1554
|
className: "text-muted-foreground shrink-0 opacity-70"
|
|
1555
|
-
}
|
|
1555
|
+
})
|
|
1556
1556
|
]
|
|
1557
|
-
}
|
|
1557
|
+
});
|
|
1558
1558
|
var selectedLabel = (value, placeholder) => {
|
|
1559
1559
|
if (Array.isArray(value)) {
|
|
1560
1560
|
return value.length > 0 ? value.map(({ label }) => label).join(", ") : placeholder;
|
|
@@ -1567,7 +1567,7 @@ var useComboboxVirtualizerRef = (providedRef) => {
|
|
|
1567
1567
|
};
|
|
1568
1568
|
var VirtualizedComboboxSingle = (props) => {
|
|
1569
1569
|
const virtualizerRef = useComboboxVirtualizerRef(props.virtualizerRef);
|
|
1570
|
-
return /* @__PURE__ */
|
|
1570
|
+
return /* @__PURE__ */ jsxs5(ComboboxPrimitive.Root, {
|
|
1571
1571
|
disabled: props.disabled,
|
|
1572
1572
|
inputValue: props.searchValue,
|
|
1573
1573
|
items: [...props.items],
|
|
@@ -1585,21 +1585,21 @@ var VirtualizedComboboxSingle = (props) => {
|
|
|
1585
1585
|
value: props.value,
|
|
1586
1586
|
virtualized: true,
|
|
1587
1587
|
children: [
|
|
1588
|
-
/* @__PURE__ */
|
|
1588
|
+
/* @__PURE__ */ jsx13(ComboboxPrimitive.Trigger, {
|
|
1589
1589
|
render: props.trigger ?? defaultTrigger(props.ariaLabel, props.ariaInvalid, props.disabled, selectedLabel(props.value, props.placeholder), props.triggerId)
|
|
1590
|
-
}
|
|
1591
|
-
/* @__PURE__ */
|
|
1590
|
+
}),
|
|
1591
|
+
/* @__PURE__ */ jsx13(VirtualizedComboboxContent, {
|
|
1592
1592
|
...props,
|
|
1593
1593
|
groupSelections: false,
|
|
1594
1594
|
selectedValues: new Set(props.value ? [props.value.value] : []),
|
|
1595
1595
|
virtualizerRef
|
|
1596
|
-
}
|
|
1596
|
+
})
|
|
1597
1597
|
]
|
|
1598
|
-
}
|
|
1598
|
+
});
|
|
1599
1599
|
};
|
|
1600
1600
|
var VirtualizedComboboxMultiple = (props) => {
|
|
1601
1601
|
const virtualizerRef = useComboboxVirtualizerRef(props.virtualizerRef);
|
|
1602
|
-
return /* @__PURE__ */
|
|
1602
|
+
return /* @__PURE__ */ jsxs5(ComboboxPrimitive.Root, {
|
|
1603
1603
|
disabled: props.disabled,
|
|
1604
1604
|
inputValue: props.searchValue,
|
|
1605
1605
|
items: [...props.items],
|
|
@@ -1618,28 +1618,28 @@ var VirtualizedComboboxMultiple = (props) => {
|
|
|
1618
1618
|
value: [...props.value],
|
|
1619
1619
|
virtualized: true,
|
|
1620
1620
|
children: [
|
|
1621
|
-
/* @__PURE__ */
|
|
1621
|
+
/* @__PURE__ */ jsx13(ComboboxPrimitive.Trigger, {
|
|
1622
1622
|
render: props.trigger ?? defaultTrigger(props.ariaLabel, props.ariaInvalid, props.disabled, selectedLabel(props.value, props.placeholder), props.triggerId)
|
|
1623
|
-
}
|
|
1624
|
-
/* @__PURE__ */
|
|
1623
|
+
}),
|
|
1624
|
+
/* @__PURE__ */ jsx13(VirtualizedComboboxContent, {
|
|
1625
1625
|
...props,
|
|
1626
1626
|
groupSelections: true,
|
|
1627
1627
|
selectedValues: new Set(props.value.map(({ value }) => value)),
|
|
1628
1628
|
virtualizerRef
|
|
1629
|
-
}
|
|
1629
|
+
})
|
|
1630
1630
|
]
|
|
1631
|
-
}
|
|
1631
|
+
});
|
|
1632
1632
|
};
|
|
1633
1633
|
function VirtualizedCombobox(props) {
|
|
1634
|
-
return props.multiple ? /* @__PURE__ */
|
|
1634
|
+
return props.multiple ? /* @__PURE__ */ jsx13(VirtualizedComboboxMultiple, {
|
|
1635
1635
|
...props
|
|
1636
|
-
}
|
|
1636
|
+
}) : /* @__PURE__ */ jsx13(VirtualizedComboboxSingle, {
|
|
1637
1637
|
...props
|
|
1638
|
-
}
|
|
1638
|
+
});
|
|
1639
1639
|
}
|
|
1640
1640
|
|
|
1641
1641
|
// ../../src/components/ui/form.tsx
|
|
1642
|
-
import {
|
|
1642
|
+
import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1643
1643
|
var messages3 = {
|
|
1644
1644
|
en: {
|
|
1645
1645
|
keyValueKey: "Key",
|
|
@@ -1677,14 +1677,14 @@ var formMessages = (overrides) => ({
|
|
|
1677
1677
|
...overrides
|
|
1678
1678
|
});
|
|
1679
1679
|
var ErrorMessage = ({ text }) => {
|
|
1680
|
-
return /* @__PURE__ */
|
|
1680
|
+
return /* @__PURE__ */ jsx14("em", {
|
|
1681
1681
|
role: "alert",
|
|
1682
1682
|
className: "text-destructive text-sm",
|
|
1683
1683
|
children: text
|
|
1684
|
-
}
|
|
1684
|
+
});
|
|
1685
1685
|
};
|
|
1686
1686
|
function FieldError({ errors = [] }) {
|
|
1687
|
-
return errors?.length > 0 ? /* @__PURE__ */
|
|
1687
|
+
return errors?.length > 0 ? /* @__PURE__ */ jsx14(ErrorMessage, {
|
|
1688
1688
|
text: errors.map((error) => {
|
|
1689
1689
|
return error.message?.toString().split(" ").map((word) => {
|
|
1690
1690
|
if (word.startsWith("t:"))
|
|
@@ -1692,7 +1692,7 @@ function FieldError({ errors = [] }) {
|
|
|
1692
1692
|
return word;
|
|
1693
1693
|
}).join(" ");
|
|
1694
1694
|
}).join(", ")
|
|
1695
|
-
}
|
|
1695
|
+
}) : null;
|
|
1696
1696
|
}
|
|
1697
1697
|
var { fieldContext, useFieldContext, formContext, useFormContext } = createFormHookContexts();
|
|
1698
1698
|
var TextField = ({
|
|
@@ -1701,35 +1701,35 @@ var TextField = ({
|
|
|
1701
1701
|
}) => {
|
|
1702
1702
|
const field = useFieldContext();
|
|
1703
1703
|
const invalid = !field.state.meta.isValid;
|
|
1704
|
-
return /* @__PURE__ */
|
|
1704
|
+
return /* @__PURE__ */ jsxs6(Field, {
|
|
1705
1705
|
className: "min-w-0",
|
|
1706
1706
|
"data-invalid": invalid,
|
|
1707
1707
|
children: [
|
|
1708
|
-
/* @__PURE__ */
|
|
1708
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1709
1709
|
className: "flex w-full items-center gap-2",
|
|
1710
1710
|
children: [
|
|
1711
|
-
/* @__PURE__ */
|
|
1711
|
+
/* @__PURE__ */ jsx14(FieldLabel, {
|
|
1712
1712
|
htmlFor: field.name,
|
|
1713
1713
|
children: props.label
|
|
1714
|
-
}
|
|
1714
|
+
}),
|
|
1715
1715
|
children
|
|
1716
1716
|
]
|
|
1717
|
-
}
|
|
1718
|
-
/* @__PURE__ */
|
|
1717
|
+
}),
|
|
1718
|
+
/* @__PURE__ */ jsx14(Input, {
|
|
1719
1719
|
id: field.name,
|
|
1720
1720
|
value: field.state.value ?? "",
|
|
1721
1721
|
onChange: (e) => field.handleChange(e.target.value),
|
|
1722
1722
|
...props,
|
|
1723
1723
|
"aria-invalid": invalid
|
|
1724
|
-
}
|
|
1725
|
-
props.description && /* @__PURE__ */
|
|
1724
|
+
}),
|
|
1725
|
+
props.description && /* @__PURE__ */ jsx14(FieldDescription, {
|
|
1726
1726
|
children: props.description
|
|
1727
|
-
}
|
|
1728
|
-
/* @__PURE__ */
|
|
1727
|
+
}),
|
|
1728
|
+
/* @__PURE__ */ jsx14(FieldError, {
|
|
1729
1729
|
errors: field.getMeta().errors
|
|
1730
|
-
}
|
|
1730
|
+
})
|
|
1731
1731
|
]
|
|
1732
|
-
}
|
|
1732
|
+
});
|
|
1733
1733
|
};
|
|
1734
1734
|
var TextAreaField = ({
|
|
1735
1735
|
children,
|
|
@@ -1737,67 +1737,67 @@ var TextAreaField = ({
|
|
|
1737
1737
|
}) => {
|
|
1738
1738
|
const field = useFieldContext();
|
|
1739
1739
|
const invalid = !field.state.meta.isValid;
|
|
1740
|
-
return /* @__PURE__ */
|
|
1740
|
+
return /* @__PURE__ */ jsxs6(Field, {
|
|
1741
1741
|
className: "min-w-0",
|
|
1742
1742
|
"data-invalid": invalid,
|
|
1743
1743
|
children: [
|
|
1744
|
-
/* @__PURE__ */
|
|
1744
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1745
1745
|
className: "flex w-full items-center gap-2",
|
|
1746
1746
|
children: [
|
|
1747
|
-
/* @__PURE__ */
|
|
1747
|
+
/* @__PURE__ */ jsx14(FieldLabel, {
|
|
1748
1748
|
htmlFor: field.name,
|
|
1749
1749
|
children: props.label
|
|
1750
|
-
}
|
|
1750
|
+
}),
|
|
1751
1751
|
children
|
|
1752
1752
|
]
|
|
1753
|
-
}
|
|
1754
|
-
/* @__PURE__ */
|
|
1753
|
+
}),
|
|
1754
|
+
/* @__PURE__ */ jsx14(Textarea, {
|
|
1755
1755
|
id: field.name,
|
|
1756
1756
|
value: field.state.value ?? "",
|
|
1757
1757
|
onChange: (e) => field.handleChange(e.target.value),
|
|
1758
1758
|
...props,
|
|
1759
1759
|
"aria-invalid": invalid
|
|
1760
|
-
}
|
|
1761
|
-
props.description && /* @__PURE__ */
|
|
1760
|
+
}),
|
|
1761
|
+
props.description && /* @__PURE__ */ jsx14(FieldDescription, {
|
|
1762
1762
|
children: props.description
|
|
1763
|
-
}
|
|
1764
|
-
/* @__PURE__ */
|
|
1763
|
+
}),
|
|
1764
|
+
/* @__PURE__ */ jsx14(FieldError, {
|
|
1765
1765
|
errors: field.getMeta().errors
|
|
1766
|
-
}
|
|
1766
|
+
})
|
|
1767
1767
|
]
|
|
1768
|
-
}
|
|
1768
|
+
});
|
|
1769
1769
|
};
|
|
1770
1770
|
var CheckboxField = (props) => {
|
|
1771
1771
|
const field = useFieldContext();
|
|
1772
1772
|
const invalid = !field.state.meta.isValid;
|
|
1773
|
-
return /* @__PURE__ */
|
|
1773
|
+
return /* @__PURE__ */ jsxs6(Field, {
|
|
1774
1774
|
"data-invalid": invalid,
|
|
1775
1775
|
children: [
|
|
1776
|
-
/* @__PURE__ */
|
|
1776
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
1777
1777
|
className: "flex flex-row items-center gap-2",
|
|
1778
1778
|
children: [
|
|
1779
|
-
/* @__PURE__ */
|
|
1779
|
+
/* @__PURE__ */ jsx14(Checkbox, {
|
|
1780
1780
|
id: field.name,
|
|
1781
1781
|
name: field.name,
|
|
1782
1782
|
checked: field.state.value ?? false,
|
|
1783
1783
|
onBlur: field.handleBlur,
|
|
1784
1784
|
onCheckedChange: (checked) => field.handleChange(checked),
|
|
1785
1785
|
"aria-invalid": invalid
|
|
1786
|
-
}
|
|
1787
|
-
/* @__PURE__ */
|
|
1786
|
+
}),
|
|
1787
|
+
/* @__PURE__ */ jsx14(FieldLabel, {
|
|
1788
1788
|
htmlFor: field.name,
|
|
1789
1789
|
children: props.label
|
|
1790
|
-
}
|
|
1790
|
+
})
|
|
1791
1791
|
]
|
|
1792
|
-
}
|
|
1793
|
-
props.description && /* @__PURE__ */
|
|
1792
|
+
}),
|
|
1793
|
+
props.description && /* @__PURE__ */ jsx14(FieldDescription, {
|
|
1794
1794
|
children: props.description
|
|
1795
|
-
}
|
|
1796
|
-
/* @__PURE__ */
|
|
1795
|
+
}),
|
|
1796
|
+
/* @__PURE__ */ jsx14(FieldError, {
|
|
1797
1797
|
errors: field.getMeta().errors
|
|
1798
|
-
}
|
|
1798
|
+
})
|
|
1799
1799
|
]
|
|
1800
|
-
}
|
|
1800
|
+
});
|
|
1801
1801
|
};
|
|
1802
1802
|
var SingleSelectControl = ({
|
|
1803
1803
|
invalid,
|
|
@@ -1805,25 +1805,25 @@ var SingleSelectControl = ({
|
|
|
1805
1805
|
placeholder
|
|
1806
1806
|
}) => {
|
|
1807
1807
|
const field = useFieldContext();
|
|
1808
|
-
return /* @__PURE__ */
|
|
1808
|
+
return /* @__PURE__ */ jsxs6(Select, {
|
|
1809
1809
|
items: [...options],
|
|
1810
1810
|
required: true,
|
|
1811
1811
|
onValueChange: (value) => field.handleChange(value ?? ""),
|
|
1812
1812
|
defaultValue: field.state.value,
|
|
1813
1813
|
children: [
|
|
1814
|
-
/* @__PURE__ */
|
|
1814
|
+
/* @__PURE__ */ jsx14(SelectTrigger, {
|
|
1815
1815
|
className: "gap-1",
|
|
1816
1816
|
id: field.name,
|
|
1817
1817
|
"aria-invalid": invalid,
|
|
1818
|
-
children: /* @__PURE__ */
|
|
1818
|
+
children: /* @__PURE__ */ jsx14(SelectValue, {
|
|
1819
1819
|
placeholder
|
|
1820
|
-
}
|
|
1821
|
-
}
|
|
1822
|
-
/* @__PURE__ */
|
|
1820
|
+
})
|
|
1821
|
+
}),
|
|
1822
|
+
/* @__PURE__ */ jsx14(SelectOptions, {
|
|
1823
1823
|
options
|
|
1824
|
-
}
|
|
1824
|
+
})
|
|
1825
1825
|
]
|
|
1826
|
-
}
|
|
1826
|
+
});
|
|
1827
1827
|
};
|
|
1828
1828
|
var MultipleSelectControl = ({
|
|
1829
1829
|
invalid,
|
|
@@ -1831,36 +1831,36 @@ var MultipleSelectControl = ({
|
|
|
1831
1831
|
placeholder
|
|
1832
1832
|
}) => {
|
|
1833
1833
|
const field = useFieldContext();
|
|
1834
|
-
return /* @__PURE__ */
|
|
1834
|
+
return /* @__PURE__ */ jsxs6(Select, {
|
|
1835
1835
|
items: [...options],
|
|
1836
1836
|
onValueChange: (value) => field.handleChange(value ?? []),
|
|
1837
1837
|
multiple: true,
|
|
1838
1838
|
value: field.state.value ?? [],
|
|
1839
1839
|
children: [
|
|
1840
|
-
/* @__PURE__ */
|
|
1840
|
+
/* @__PURE__ */ jsx14(SelectTrigger, {
|
|
1841
1841
|
className: "gap-1",
|
|
1842
1842
|
id: field.name,
|
|
1843
1843
|
"aria-invalid": invalid,
|
|
1844
|
-
children: /* @__PURE__ */
|
|
1844
|
+
children: /* @__PURE__ */ jsx14(SelectValue, {
|
|
1845
1845
|
placeholder
|
|
1846
|
-
}
|
|
1847
|
-
}
|
|
1848
|
-
/* @__PURE__ */
|
|
1846
|
+
})
|
|
1847
|
+
}),
|
|
1848
|
+
/* @__PURE__ */ jsx14(SelectOptions, {
|
|
1849
1849
|
options
|
|
1850
|
-
}
|
|
1850
|
+
})
|
|
1851
1851
|
]
|
|
1852
|
-
}
|
|
1852
|
+
});
|
|
1853
1853
|
};
|
|
1854
1854
|
var SelectOptions = ({
|
|
1855
1855
|
options
|
|
1856
|
-
}) => /* @__PURE__ */
|
|
1857
|
-
children: /* @__PURE__ */
|
|
1858
|
-
children: options.map((option) => /* @__PURE__ */
|
|
1856
|
+
}) => /* @__PURE__ */ jsx14(SelectContent, {
|
|
1857
|
+
children: /* @__PURE__ */ jsx14(SelectGroup, {
|
|
1858
|
+
children: options.map((option) => /* @__PURE__ */ jsx14(SelectItem, {
|
|
1859
1859
|
value: option.value,
|
|
1860
1860
|
children: option.label
|
|
1861
|
-
}, option.label
|
|
1862
|
-
}
|
|
1863
|
-
}
|
|
1861
|
+
}, option.label))
|
|
1862
|
+
})
|
|
1863
|
+
});
|
|
1864
1864
|
var SelectField = ({
|
|
1865
1865
|
description,
|
|
1866
1866
|
label,
|
|
@@ -1870,30 +1870,30 @@ var SelectField = ({
|
|
|
1870
1870
|
}) => {
|
|
1871
1871
|
const field = useFieldContext();
|
|
1872
1872
|
const invalid = !field.state.meta.isValid;
|
|
1873
|
-
return /* @__PURE__ */
|
|
1873
|
+
return /* @__PURE__ */ jsxs6(Field, {
|
|
1874
1874
|
"data-invalid": invalid,
|
|
1875
1875
|
children: [
|
|
1876
|
-
/* @__PURE__ */
|
|
1876
|
+
/* @__PURE__ */ jsx14(FieldLabel, {
|
|
1877
1877
|
htmlFor: field.name,
|
|
1878
1878
|
children: label
|
|
1879
|
-
}
|
|
1880
|
-
multiple ? /* @__PURE__ */
|
|
1879
|
+
}),
|
|
1880
|
+
multiple ? /* @__PURE__ */ jsx14(MultipleSelectControl, {
|
|
1881
1881
|
invalid,
|
|
1882
1882
|
options,
|
|
1883
1883
|
placeholder
|
|
1884
|
-
}
|
|
1884
|
+
}) : /* @__PURE__ */ jsx14(SingleSelectControl, {
|
|
1885
1885
|
invalid,
|
|
1886
1886
|
options,
|
|
1887
1887
|
placeholder
|
|
1888
|
-
}
|
|
1889
|
-
description ? /* @__PURE__ */
|
|
1888
|
+
}),
|
|
1889
|
+
description ? /* @__PURE__ */ jsx14(FieldDescription, {
|
|
1890
1890
|
children: description
|
|
1891
|
-
}
|
|
1892
|
-
/* @__PURE__ */
|
|
1891
|
+
}) : null,
|
|
1892
|
+
/* @__PURE__ */ jsx14(FieldError, {
|
|
1893
1893
|
errors: field.getMeta().errors
|
|
1894
|
-
}
|
|
1894
|
+
})
|
|
1895
1895
|
]
|
|
1896
|
-
}
|
|
1896
|
+
});
|
|
1897
1897
|
};
|
|
1898
1898
|
var KeyValueField = (props) => {
|
|
1899
1899
|
const labels = formMessages(props.messages);
|
|
@@ -1916,17 +1916,17 @@ var KeyValueField = (props) => {
|
|
|
1916
1916
|
return true;
|
|
1917
1917
|
}));
|
|
1918
1918
|
};
|
|
1919
|
-
return /* @__PURE__ */
|
|
1919
|
+
return /* @__PURE__ */ jsxs6(Field, {
|
|
1920
1920
|
"data-invalid": invalid,
|
|
1921
1921
|
children: [
|
|
1922
|
-
/* @__PURE__ */
|
|
1922
|
+
/* @__PURE__ */ jsx14(FieldLabel, {
|
|
1923
1923
|
htmlFor: field.name,
|
|
1924
1924
|
children: props.label
|
|
1925
|
-
}
|
|
1926
|
-
keyValues.map(([key, value], index) => /* @__PURE__ */
|
|
1925
|
+
}),
|
|
1926
|
+
keyValues.map(([key, value], index) => /* @__PURE__ */ jsxs6("div", {
|
|
1927
1927
|
className: "flex w-full flex-row items-center gap-2",
|
|
1928
1928
|
children: [
|
|
1929
|
-
/* @__PURE__ */
|
|
1929
|
+
/* @__PURE__ */ jsx14(Input, {
|
|
1930
1930
|
id: field.name,
|
|
1931
1931
|
placeholder: labels.keyValueKey,
|
|
1932
1932
|
name: field.name,
|
|
@@ -1936,8 +1936,8 @@ var KeyValueField = (props) => {
|
|
|
1936
1936
|
onChange: (e) => {
|
|
1937
1937
|
field.handleChange(updateKeyValue(e.target.value, value, index));
|
|
1938
1938
|
}
|
|
1939
|
-
}
|
|
1940
|
-
/* @__PURE__ */
|
|
1939
|
+
}),
|
|
1940
|
+
/* @__PURE__ */ jsx14(Input, {
|
|
1941
1941
|
id: field.name,
|
|
1942
1942
|
name: field.name,
|
|
1943
1943
|
type: "text",
|
|
@@ -1947,8 +1947,8 @@ var KeyValueField = (props) => {
|
|
|
1947
1947
|
onChange: (e) => {
|
|
1948
1948
|
field.handleChange(updateKeyValue(key, e.target.value, index));
|
|
1949
1949
|
}
|
|
1950
|
-
}
|
|
1951
|
-
/* @__PURE__ */
|
|
1950
|
+
}),
|
|
1951
|
+
/* @__PURE__ */ jsxs6(Button, {
|
|
1952
1952
|
type: "button",
|
|
1953
1953
|
variant: "secondary",
|
|
1954
1954
|
onClick: (e) => {
|
|
@@ -1956,15 +1956,15 @@ var KeyValueField = (props) => {
|
|
|
1956
1956
|
field.handleChange(deleteKeyValue(index));
|
|
1957
1957
|
},
|
|
1958
1958
|
children: [
|
|
1959
|
-
/* @__PURE__ */
|
|
1959
|
+
/* @__PURE__ */ jsx14(Trash, {}),
|
|
1960
1960
|
labels.keyValueDelete
|
|
1961
1961
|
]
|
|
1962
|
-
}
|
|
1962
|
+
})
|
|
1963
1963
|
]
|
|
1964
|
-
}, index
|
|
1965
|
-
/* @__PURE__ */
|
|
1964
|
+
}, index)),
|
|
1965
|
+
/* @__PURE__ */ jsx14("div", {
|
|
1966
1966
|
className: "flex flex-row items-center gap-2",
|
|
1967
|
-
children: /* @__PURE__ */
|
|
1967
|
+
children: /* @__PURE__ */ jsxs6(Button, {
|
|
1968
1968
|
size: "sm",
|
|
1969
1969
|
className: "mt-2",
|
|
1970
1970
|
onClick: (e) => {
|
|
@@ -1975,24 +1975,24 @@ var KeyValueField = (props) => {
|
|
|
1975
1975
|
});
|
|
1976
1976
|
},
|
|
1977
1977
|
children: [
|
|
1978
|
-
/* @__PURE__ */
|
|
1978
|
+
/* @__PURE__ */ jsx14(Plus, {}),
|
|
1979
1979
|
labels.keyValueAdd
|
|
1980
1980
|
]
|
|
1981
|
-
}
|
|
1982
|
-
}
|
|
1983
|
-
props.description && /* @__PURE__ */
|
|
1981
|
+
})
|
|
1982
|
+
}),
|
|
1983
|
+
props.description && /* @__PURE__ */ jsx14(FieldDescription, {
|
|
1984
1984
|
children: props.description
|
|
1985
|
-
}
|
|
1986
|
-
/* @__PURE__ */
|
|
1985
|
+
}),
|
|
1986
|
+
/* @__PURE__ */ jsx14(FieldError, {
|
|
1987
1987
|
errors: field.getMeta().errors
|
|
1988
|
-
}
|
|
1988
|
+
})
|
|
1989
1989
|
]
|
|
1990
|
-
}
|
|
1990
|
+
});
|
|
1991
1991
|
};
|
|
1992
|
-
var MultiSelectField = (props) => /* @__PURE__ */
|
|
1992
|
+
var MultiSelectField = (props) => /* @__PURE__ */ jsx14(SelectField, {
|
|
1993
1993
|
...props,
|
|
1994
1994
|
multiple: true
|
|
1995
|
-
}
|
|
1995
|
+
});
|
|
1996
1996
|
var getSearchableSelectItems = (values, initialItems, items) => {
|
|
1997
1997
|
const itemsByValue = new Map([...initialItems, ...items].map((item) => [item.value, item]));
|
|
1998
1998
|
const selectedItems = values.map((value) => itemsByValue.get(value) ?? { value, label: value });
|
|
@@ -2020,7 +2020,7 @@ var SingleSearchableSelectControl = ({
|
|
|
2020
2020
|
}) => {
|
|
2021
2021
|
const field = useFieldContext();
|
|
2022
2022
|
const { selectedItems, mergedItems } = getSearchableSelectItems(field.state.value ? [field.state.value] : [], initialItems, items);
|
|
2023
|
-
return /* @__PURE__ */
|
|
2023
|
+
return /* @__PURE__ */ jsx14(VirtualizedCombobox, {
|
|
2024
2024
|
ariaInvalid: invalid,
|
|
2025
2025
|
ariaLabel,
|
|
2026
2026
|
emptyLabel,
|
|
@@ -2033,7 +2033,7 @@ var SingleSearchableSelectControl = ({
|
|
|
2033
2033
|
...onSearchValueChange ? { onSearchValueChange } : {},
|
|
2034
2034
|
...renderItem ? { renderItem } : {},
|
|
2035
2035
|
...searchValue === undefined ? {} : { searchValue }
|
|
2036
|
-
}
|
|
2036
|
+
});
|
|
2037
2037
|
};
|
|
2038
2038
|
var MultipleSearchableSelectControl = ({
|
|
2039
2039
|
ariaLabel,
|
|
@@ -2050,7 +2050,7 @@ var MultipleSearchableSelectControl = ({
|
|
|
2050
2050
|
}) => {
|
|
2051
2051
|
const field = useFieldContext();
|
|
2052
2052
|
const { selectedItems, mergedItems } = getSearchableSelectItems(field.state.value ?? [], initialItems, items);
|
|
2053
|
-
return /* @__PURE__ */
|
|
2053
|
+
return /* @__PURE__ */ jsx14(VirtualizedCombobox, {
|
|
2054
2054
|
ariaInvalid: invalid,
|
|
2055
2055
|
ariaLabel,
|
|
2056
2056
|
emptyLabel,
|
|
@@ -2064,7 +2064,7 @@ var MultipleSearchableSelectControl = ({
|
|
|
2064
2064
|
...onSearchValueChange ? { onSearchValueChange } : {},
|
|
2065
2065
|
...renderItem ? { renderItem } : {},
|
|
2066
2066
|
...searchValue === undefined ? {} : { searchValue }
|
|
2067
|
-
}
|
|
2067
|
+
});
|
|
2068
2068
|
};
|
|
2069
2069
|
var SearchableSelectField = ({
|
|
2070
2070
|
description,
|
|
@@ -2082,27 +2082,27 @@ var SearchableSelectField = ({
|
|
|
2082
2082
|
invalid,
|
|
2083
2083
|
name: field.name
|
|
2084
2084
|
};
|
|
2085
|
-
return /* @__PURE__ */
|
|
2085
|
+
return /* @__PURE__ */ jsxs6(Field, {
|
|
2086
2086
|
className: "min-w-0",
|
|
2087
2087
|
"data-invalid": invalid,
|
|
2088
2088
|
children: [
|
|
2089
|
-
/* @__PURE__ */
|
|
2089
|
+
/* @__PURE__ */ jsx14(FieldLabel, {
|
|
2090
2090
|
htmlFor: field.name,
|
|
2091
2091
|
children: label
|
|
2092
|
-
}
|
|
2093
|
-
multiple ? /* @__PURE__ */
|
|
2092
|
+
}),
|
|
2093
|
+
multiple ? /* @__PURE__ */ jsx14(MultipleSearchableSelectControl, {
|
|
2094
2094
|
...controlProps
|
|
2095
|
-
}
|
|
2095
|
+
}) : /* @__PURE__ */ jsx14(SingleSearchableSelectControl, {
|
|
2096
2096
|
...controlProps
|
|
2097
|
-
}
|
|
2098
|
-
description ? /* @__PURE__ */
|
|
2097
|
+
}),
|
|
2098
|
+
description ? /* @__PURE__ */ jsx14(FieldDescription, {
|
|
2099
2099
|
children: description
|
|
2100
|
-
}
|
|
2101
|
-
/* @__PURE__ */
|
|
2100
|
+
}) : null,
|
|
2101
|
+
/* @__PURE__ */ jsx14(FieldError, {
|
|
2102
2102
|
errors: field.getMeta().errors
|
|
2103
|
-
}
|
|
2103
|
+
})
|
|
2104
2104
|
]
|
|
2105
|
-
}
|
|
2105
|
+
});
|
|
2106
2106
|
};
|
|
2107
2107
|
var FileField = ({
|
|
2108
2108
|
label,
|
|
@@ -2114,14 +2114,14 @@ var FileField = ({
|
|
|
2114
2114
|
const labels = formMessages(messages4);
|
|
2115
2115
|
const field = useFieldContext();
|
|
2116
2116
|
const invalid = !field.state.meta.isValid;
|
|
2117
|
-
return /* @__PURE__ */
|
|
2117
|
+
return /* @__PURE__ */ jsxs6(Field, {
|
|
2118
2118
|
"data-invalid": invalid,
|
|
2119
2119
|
children: [
|
|
2120
|
-
/* @__PURE__ */
|
|
2120
|
+
/* @__PURE__ */ jsx14(FieldLabel, {
|
|
2121
2121
|
htmlFor: field.name,
|
|
2122
2122
|
children: label
|
|
2123
|
-
}
|
|
2124
|
-
/* @__PURE__ */
|
|
2123
|
+
}),
|
|
2124
|
+
/* @__PURE__ */ jsx14(FilePicker, {
|
|
2125
2125
|
accept,
|
|
2126
2126
|
canClear: field.state.value instanceof File,
|
|
2127
2127
|
...field.state.value instanceof File ? { file: field.state.value } : {},
|
|
@@ -2140,12 +2140,12 @@ var FileField = ({
|
|
|
2140
2140
|
},
|
|
2141
2141
|
required,
|
|
2142
2142
|
title: field.state.value instanceof File ? field.state.value.name : label
|
|
2143
|
-
}
|
|
2144
|
-
/* @__PURE__ */
|
|
2143
|
+
}),
|
|
2144
|
+
/* @__PURE__ */ jsx14(FieldError, {
|
|
2145
2145
|
errors: field.getMeta().errors
|
|
2146
|
-
}
|
|
2146
|
+
})
|
|
2147
2147
|
]
|
|
2148
|
-
}
|
|
2148
|
+
});
|
|
2149
2149
|
};
|
|
2150
2150
|
var ImageField = ({
|
|
2151
2151
|
label,
|
|
@@ -2156,14 +2156,14 @@ var ImageField = ({
|
|
|
2156
2156
|
const field = useFieldContext();
|
|
2157
2157
|
const invalid = !field.state.meta.isValid;
|
|
2158
2158
|
const imageUrl = typeof field.state.value === "string" ? field.state.value : undefined;
|
|
2159
|
-
return /* @__PURE__ */
|
|
2159
|
+
return /* @__PURE__ */ jsxs6(Field, {
|
|
2160
2160
|
"data-invalid": invalid,
|
|
2161
2161
|
children: [
|
|
2162
|
-
/* @__PURE__ */
|
|
2162
|
+
/* @__PURE__ */ jsx14(FieldLabel, {
|
|
2163
2163
|
htmlFor: field.name,
|
|
2164
2164
|
children: label
|
|
2165
|
-
}
|
|
2166
|
-
/* @__PURE__ */
|
|
2165
|
+
}),
|
|
2166
|
+
/* @__PURE__ */ jsx14(FilePicker, {
|
|
2167
2167
|
accept: "image/*",
|
|
2168
2168
|
canClear: Boolean(field.state.value),
|
|
2169
2169
|
...field.state.value instanceof File ? { file: field.state.value } : {},
|
|
@@ -2181,15 +2181,15 @@ var ImageField = ({
|
|
|
2181
2181
|
onChange: field.handleChange,
|
|
2182
2182
|
onClear: () => field.handleChange(null),
|
|
2183
2183
|
title: field.state.value instanceof File ? field.state.value.name : label
|
|
2184
|
-
}
|
|
2185
|
-
size.suggestedWidth && size.suggestedHeight && /* @__PURE__ */
|
|
2184
|
+
}),
|
|
2185
|
+
size.suggestedWidth && size.suggestedHeight && /* @__PURE__ */ jsx14(FieldDescription, {
|
|
2186
2186
|
children: labels.suggestedImageSize(String(size.suggestedWidth), String(size.suggestedHeight))
|
|
2187
|
-
}
|
|
2188
|
-
/* @__PURE__ */
|
|
2187
|
+
}),
|
|
2188
|
+
/* @__PURE__ */ jsx14(FieldError, {
|
|
2189
2189
|
errors: field.getMeta().errors
|
|
2190
|
-
}
|
|
2190
|
+
})
|
|
2191
2191
|
]
|
|
2192
|
-
}
|
|
2192
|
+
});
|
|
2193
2193
|
};
|
|
2194
2194
|
var BlockNavigation = ({
|
|
2195
2195
|
messages: messages4
|
|
@@ -2197,40 +2197,40 @@ var BlockNavigation = ({
|
|
|
2197
2197
|
const labels = formMessages(messages4);
|
|
2198
2198
|
const form = useFormContext();
|
|
2199
2199
|
const shouldBlock = useStore(form.store, (formState) => formState.isDirty && !(formState.isSubmitting || formState.isSubmitted));
|
|
2200
|
-
return /* @__PURE__ */
|
|
2200
|
+
return /* @__PURE__ */ jsx14(Block, {
|
|
2201
2201
|
enableBeforeUnload: () => shouldBlock,
|
|
2202
2202
|
shouldBlockFn: () => shouldBlock,
|
|
2203
2203
|
withResolver: true,
|
|
2204
|
-
children: ({ status, proceed, reset }) => /* @__PURE__ */
|
|
2204
|
+
children: ({ status, proceed, reset }) => /* @__PURE__ */ jsx14(AlertDialog, {
|
|
2205
2205
|
open: status === "blocked",
|
|
2206
|
-
children: /* @__PURE__ */
|
|
2206
|
+
children: /* @__PURE__ */ jsxs6(AlertDialogContent, {
|
|
2207
2207
|
children: [
|
|
2208
|
-
/* @__PURE__ */
|
|
2208
|
+
/* @__PURE__ */ jsxs6(AlertDialogHeader, {
|
|
2209
2209
|
children: [
|
|
2210
|
-
/* @__PURE__ */
|
|
2210
|
+
/* @__PURE__ */ jsx14(AlertDialogTitle, {
|
|
2211
2211
|
children: labels.blockNavigationTitle
|
|
2212
|
-
}
|
|
2213
|
-
/* @__PURE__ */
|
|
2212
|
+
}),
|
|
2213
|
+
/* @__PURE__ */ jsx14(AlertDialogDescription, {
|
|
2214
2214
|
children: labels.blockNavigationDescription
|
|
2215
|
-
}
|
|
2215
|
+
})
|
|
2216
2216
|
]
|
|
2217
|
-
}
|
|
2218
|
-
/* @__PURE__ */
|
|
2217
|
+
}),
|
|
2218
|
+
/* @__PURE__ */ jsxs6(AlertDialogFooter, {
|
|
2219
2219
|
children: [
|
|
2220
|
-
/* @__PURE__ */
|
|
2220
|
+
/* @__PURE__ */ jsx14(AlertDialogCancel, {
|
|
2221
2221
|
onClick: reset,
|
|
2222
2222
|
children: labels.blockNavigationCancel
|
|
2223
|
-
}
|
|
2224
|
-
/* @__PURE__ */
|
|
2223
|
+
}),
|
|
2224
|
+
/* @__PURE__ */ jsx14(AlertDialogAction, {
|
|
2225
2225
|
onClick: proceed,
|
|
2226
2226
|
children: labels.blockNavigationConfirm
|
|
2227
|
-
}
|
|
2227
|
+
})
|
|
2228
2228
|
]
|
|
2229
|
-
}
|
|
2229
|
+
})
|
|
2230
2230
|
]
|
|
2231
|
-
}
|
|
2232
|
-
}
|
|
2233
|
-
}
|
|
2231
|
+
})
|
|
2232
|
+
})
|
|
2233
|
+
});
|
|
2234
2234
|
};
|
|
2235
2235
|
var SubmitButton = ({
|
|
2236
2236
|
children,
|
|
@@ -2238,20 +2238,20 @@ var SubmitButton = ({
|
|
|
2238
2238
|
}) => {
|
|
2239
2239
|
const labels = formMessages(messages4);
|
|
2240
2240
|
const form = useFormContext();
|
|
2241
|
-
return /* @__PURE__ */
|
|
2241
|
+
return /* @__PURE__ */ jsx14(form.Subscribe, {
|
|
2242
2242
|
selector: (formState) => [formState.isSubmitting],
|
|
2243
|
-
children: ([isSubmitting]) => /* @__PURE__ */
|
|
2243
|
+
children: ([isSubmitting]) => /* @__PURE__ */ jsxs6(Button, {
|
|
2244
2244
|
type: "submit",
|
|
2245
2245
|
disabled: isSubmitting,
|
|
2246
2246
|
className: "self-start",
|
|
2247
2247
|
children: [
|
|
2248
|
-
isSubmitting && /* @__PURE__ */
|
|
2248
|
+
isSubmitting && /* @__PURE__ */ jsx14(Loader2, {
|
|
2249
2249
|
className: "animate-spin"
|
|
2250
|
-
}
|
|
2250
|
+
}),
|
|
2251
2251
|
children ?? labels.submit
|
|
2252
2252
|
]
|
|
2253
|
-
}
|
|
2254
|
-
}
|
|
2253
|
+
})
|
|
2254
|
+
});
|
|
2255
2255
|
};
|
|
2256
2256
|
var getFormErrorText = (error) => {
|
|
2257
2257
|
if (!error)
|
|
@@ -2264,12 +2264,12 @@ var getFormErrorText = (error) => {
|
|
|
2264
2264
|
};
|
|
2265
2265
|
var FormError = () => {
|
|
2266
2266
|
const form = useFormContext();
|
|
2267
|
-
return /* @__PURE__ */
|
|
2267
|
+
return /* @__PURE__ */ jsx14(form.Subscribe, {
|
|
2268
2268
|
selector: (formState) => getFormErrorText(formState.errorMap.onSubmit),
|
|
2269
|
-
children: (error) => error ? /* @__PURE__ */
|
|
2269
|
+
children: (error) => error ? /* @__PURE__ */ jsx14(ErrorMessage, {
|
|
2270
2270
|
text: error
|
|
2271
|
-
}
|
|
2272
|
-
}
|
|
2271
|
+
}) : null
|
|
2272
|
+
});
|
|
2273
2273
|
};
|
|
2274
2274
|
var FieldWrapper = ({
|
|
2275
2275
|
children,
|
|
@@ -2279,29 +2279,29 @@ var FieldWrapper = ({
|
|
|
2279
2279
|
locales: locales2,
|
|
2280
2280
|
editingLocale
|
|
2281
2281
|
}) => {
|
|
2282
|
-
return /* @__PURE__ */
|
|
2282
|
+
return /* @__PURE__ */ jsxs6(FieldSet, {
|
|
2283
2283
|
children: [
|
|
2284
|
-
legend && /* @__PURE__ */
|
|
2284
|
+
legend && /* @__PURE__ */ jsxs6(FieldLegend, {
|
|
2285
2285
|
className: "flex items-center gap-2",
|
|
2286
2286
|
children: [
|
|
2287
2287
|
legend,
|
|
2288
|
-
localized && editingLocale && locales2 && /* @__PURE__ */
|
|
2288
|
+
localized && editingLocale && locales2 && /* @__PURE__ */ jsxs6(Badge, {
|
|
2289
2289
|
variant: "outline",
|
|
2290
2290
|
children: [
|
|
2291
|
-
/* @__PURE__ */
|
|
2291
|
+
/* @__PURE__ */ jsx14(Languages, {}),
|
|
2292
2292
|
locales2.find((l) => l.value === editingLocale).label
|
|
2293
2293
|
]
|
|
2294
|
-
}
|
|
2294
|
+
})
|
|
2295
2295
|
]
|
|
2296
|
-
}
|
|
2297
|
-
description && /* @__PURE__ */
|
|
2296
|
+
}),
|
|
2297
|
+
description && /* @__PURE__ */ jsx14(FieldDescription, {
|
|
2298
2298
|
children: description
|
|
2299
|
-
}
|
|
2300
|
-
/* @__PURE__ */
|
|
2299
|
+
}),
|
|
2300
|
+
/* @__PURE__ */ jsx14(FieldGroup, {
|
|
2301
2301
|
children
|
|
2302
|
-
}
|
|
2302
|
+
})
|
|
2303
2303
|
]
|
|
2304
|
-
}
|
|
2304
|
+
});
|
|
2305
2305
|
};
|
|
2306
2306
|
var RevertButton = ({
|
|
2307
2307
|
messages: messages4,
|
|
@@ -2310,15 +2310,15 @@ var RevertButton = ({
|
|
|
2310
2310
|
const labels = formMessages(messages4);
|
|
2311
2311
|
const field = useFieldContext();
|
|
2312
2312
|
if (field.state.value !== original) {
|
|
2313
|
-
return /* @__PURE__ */
|
|
2313
|
+
return /* @__PURE__ */ jsx14("div", {
|
|
2314
2314
|
className: "flex flex-1 justify-end",
|
|
2315
|
-
children: /* @__PURE__ */
|
|
2315
|
+
children: /* @__PURE__ */ jsx14(Button, {
|
|
2316
2316
|
variant: "link",
|
|
2317
2317
|
className: "-mr-4 h-auto py-0",
|
|
2318
2318
|
onClick: () => field.handleChange(original),
|
|
2319
2319
|
children: labels.revert
|
|
2320
|
-
}
|
|
2321
|
-
}
|
|
2320
|
+
})
|
|
2321
|
+
});
|
|
2322
2322
|
}
|
|
2323
2323
|
};
|
|
2324
2324
|
var { useAppForm, withForm, withFieldGroup } = createFormHook({
|