@algodomain/smart-forms 0.1.10 → 0.1.12
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/{SmartFormProvider-BdyRQakk.d.cts → SmartFormProvider-DtK3qRsV.d.cts} +8 -2
- package/dist/{SmartFormProvider-BdyRQakk.d.ts → SmartFormProvider-DtK3qRsV.d.ts} +8 -2
- package/dist/{chunk-WUYS7DMR.cjs → chunk-AEN4A4ST.cjs} +49 -12
- package/dist/chunk-AEN4A4ST.cjs.map +1 -0
- package/dist/{chunk-6VKQ7EMR.js → chunk-DYTQTHGE.js} +50 -13
- package/dist/chunk-DYTQTHGE.js.map +1 -0
- package/dist/{chunk-4XK6HAJ2.js → chunk-N3SIQIJR.js} +48 -18
- package/dist/chunk-N3SIQIJR.js.map +1 -0
- package/dist/{chunk-DRMVY7TX.cjs → chunk-TX7JD2XS.cjs} +135 -105
- package/dist/chunk-TX7JD2XS.cjs.map +1 -0
- package/dist/fields.cjs +124 -114
- package/dist/fields.cjs.map +1 -1
- package/dist/fields.d.cts +1 -1
- package/dist/fields.d.ts +1 -1
- package/dist/fields.js +27 -17
- package/dist/fields.js.map +1 -1
- package/dist/index.cjs +79 -70
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +32 -23
- package/dist/index.js.map +1 -1
- package/dist/opinionated.cjs +18 -18
- package/dist/opinionated.d.cts +1 -1
- package/dist/opinionated.d.ts +1 -1
- package/dist/opinionated.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-4XK6HAJ2.js.map +0 -1
- package/dist/chunk-6VKQ7EMR.js.map +0 -1
- package/dist/chunk-DRMVY7TX.cjs.map +0 -1
- package/dist/chunk-WUYS7DMR.cjs.map +0 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkAEN4A4ST_cjs = require('./chunk-AEN4A4ST.cjs');
|
|
4
4
|
var React6 = require('react');
|
|
5
|
+
var zod = require('zod');
|
|
5
6
|
var CheckboxPrimitive = require('@radix-ui/react-checkbox');
|
|
6
7
|
var lucideReact = require('lucide-react');
|
|
7
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -50,7 +51,7 @@ function Checkbox({
|
|
|
50
51
|
CheckboxPrimitive__namespace.Root,
|
|
51
52
|
{
|
|
52
53
|
"data-slot": "checkbox",
|
|
53
|
-
className:
|
|
54
|
+
className: chunkAEN4A4ST_cjs.cn(
|
|
54
55
|
"peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
55
56
|
className
|
|
56
57
|
),
|
|
@@ -78,20 +79,27 @@ var SmartCheckbox = ({
|
|
|
78
79
|
disabled,
|
|
79
80
|
hidden
|
|
80
81
|
}) => {
|
|
81
|
-
const { formData } =
|
|
82
|
-
const { value, error, onChange, fieldRef, registerValidation } =
|
|
83
|
-
const fieldDetection =
|
|
82
|
+
const { formData } = chunkAEN4A4ST_cjs.useSmartForm();
|
|
83
|
+
const { value, error, onChange, fieldRef, registerValidation } = chunkAEN4A4ST_cjs.useFormField(field);
|
|
84
|
+
const fieldDetection = chunkAEN4A4ST_cjs.useFieldDetection();
|
|
84
85
|
const hasRegistered = React6.useRef(false);
|
|
85
86
|
const hasSetDefault = React6.useRef(false);
|
|
86
87
|
const isDisabled = typeof disabled === "function" ? disabled(formData) : disabled || false;
|
|
87
88
|
const isHidden = typeof hidden === "function" ? hidden(formData) : hidden || false;
|
|
88
89
|
if (isHidden) return null;
|
|
90
|
+
const displayName = label || field;
|
|
91
|
+
const builtinValidation = React6.useMemo(() => {
|
|
92
|
+
if (validation || !required) return void 0;
|
|
93
|
+
const preprocess = (v) => v === true || v === false ? v : false;
|
|
94
|
+
return zod.z.preprocess(preprocess, zod.z.boolean().refine((v) => v === true, `${displayName} is required`));
|
|
95
|
+
}, [validation, required, displayName]);
|
|
96
|
+
const schemaToRegister = validation ?? builtinValidation;
|
|
89
97
|
React6.useEffect(() => {
|
|
90
|
-
if (
|
|
98
|
+
if (schemaToRegister && !hasRegistered.current) {
|
|
91
99
|
hasRegistered.current = true;
|
|
92
|
-
registerValidation(field,
|
|
100
|
+
registerValidation(field, schemaToRegister, { label: displayName });
|
|
93
101
|
}
|
|
94
|
-
}, [
|
|
102
|
+
}, [schemaToRegister, field, registerValidation, displayName]);
|
|
95
103
|
React6.useEffect(() => {
|
|
96
104
|
if (fieldDetection?.registerField) {
|
|
97
105
|
fieldDetection.registerField(field);
|
|
@@ -119,15 +127,15 @@ var SmartCheckbox = ({
|
|
|
119
127
|
disabled: isDisabled
|
|
120
128
|
}
|
|
121
129
|
),
|
|
122
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
130
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkAEN4A4ST_cjs.Label, { htmlFor: `${field}-checkbox`, className: "text-sm font-normal cursor-pointer", children: [
|
|
123
131
|
label || field,
|
|
124
132
|
" ",
|
|
125
133
|
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: "*" })
|
|
126
134
|
] })
|
|
127
135
|
] }),
|
|
128
|
-
info && /* @__PURE__ */ jsxRuntime.jsx(
|
|
129
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
130
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
136
|
+
info && /* @__PURE__ */ jsxRuntime.jsx(chunkAEN4A4ST_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkAEN4A4ST_cjs.Tooltip, { children: [
|
|
137
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkAEN4A4ST_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4 text-muted-foreground cursor-pointer mr-2" }) }),
|
|
138
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkAEN4A4ST_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs", children: info }) })
|
|
131
139
|
] }) })
|
|
132
140
|
] }),
|
|
133
141
|
subLabel && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground ml-6", children: subLabel })
|
|
@@ -143,7 +151,7 @@ function RadioGroup({
|
|
|
143
151
|
RadioGroupPrimitive__namespace.Root,
|
|
144
152
|
{
|
|
145
153
|
"data-slot": "radio-group",
|
|
146
|
-
className:
|
|
154
|
+
className: chunkAEN4A4ST_cjs.cn("grid gap-3", className),
|
|
147
155
|
...props
|
|
148
156
|
}
|
|
149
157
|
);
|
|
@@ -156,7 +164,7 @@ function RadioGroupItem({
|
|
|
156
164
|
RadioGroupPrimitive__namespace.Item,
|
|
157
165
|
{
|
|
158
166
|
"data-slot": "radio-group-item",
|
|
159
|
-
className:
|
|
167
|
+
className: chunkAEN4A4ST_cjs.cn(
|
|
160
168
|
"border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
161
169
|
className
|
|
162
170
|
),
|
|
@@ -187,20 +195,27 @@ var SmartRadioGroup = ({
|
|
|
187
195
|
disabled,
|
|
188
196
|
hidden
|
|
189
197
|
}) => {
|
|
190
|
-
const { formData } =
|
|
191
|
-
const { value, error, onChange, fieldRef, registerValidation } =
|
|
192
|
-
const fieldDetection =
|
|
198
|
+
const { formData } = chunkAEN4A4ST_cjs.useSmartForm();
|
|
199
|
+
const { value, error, onChange, fieldRef, registerValidation } = chunkAEN4A4ST_cjs.useFormField(field);
|
|
200
|
+
const fieldDetection = chunkAEN4A4ST_cjs.useFieldDetection();
|
|
193
201
|
const hasRegistered = React6.useRef(false);
|
|
194
202
|
const hasSetDefault = React6.useRef(false);
|
|
195
203
|
const isDisabled = typeof disabled === "function" ? disabled(formData) : disabled || false;
|
|
196
204
|
const isHidden = typeof hidden === "function" ? hidden(formData) : hidden || false;
|
|
197
205
|
if (isHidden) return null;
|
|
206
|
+
const displayName = label || field;
|
|
207
|
+
const builtinValidation = React6.useMemo(() => {
|
|
208
|
+
if (validation || !required) return void 0;
|
|
209
|
+
const preprocess = (v) => v === void 0 || v === null ? "" : v;
|
|
210
|
+
return zod.z.preprocess(preprocess, zod.z.string().min(1, `${displayName} is required`));
|
|
211
|
+
}, [validation, required, displayName]);
|
|
212
|
+
const schemaToRegister = validation ?? builtinValidation;
|
|
198
213
|
React6.useEffect(() => {
|
|
199
|
-
if (
|
|
214
|
+
if (schemaToRegister && !hasRegistered.current) {
|
|
200
215
|
hasRegistered.current = true;
|
|
201
|
-
registerValidation(field,
|
|
216
|
+
registerValidation(field, schemaToRegister, { label: displayName });
|
|
202
217
|
}
|
|
203
|
-
}, [
|
|
218
|
+
}, [schemaToRegister, field, registerValidation, displayName]);
|
|
204
219
|
React6.useEffect(() => {
|
|
205
220
|
if (fieldDetection?.registerField) {
|
|
206
221
|
fieldDetection.registerField(field);
|
|
@@ -215,14 +230,14 @@ var SmartRadioGroup = ({
|
|
|
215
230
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-1 min-w-0 ${className}`, children: [
|
|
216
231
|
label && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2", children: [
|
|
217
232
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
218
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
233
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkAEN4A4ST_cjs.Label, { className: "text-sm font-medium text-foreground", children: [
|
|
219
234
|
label,
|
|
220
235
|
" ",
|
|
221
236
|
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: "*" })
|
|
222
237
|
] }),
|
|
223
|
-
info && /* @__PURE__ */ jsxRuntime.jsx(
|
|
224
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
225
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
238
|
+
info && /* @__PURE__ */ jsxRuntime.jsx(chunkAEN4A4ST_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkAEN4A4ST_cjs.Tooltip, { children: [
|
|
239
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkAEN4A4ST_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4 text-muted-foreground cursor-pointer mr-2" }) }),
|
|
240
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkAEN4A4ST_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs", children: info }) })
|
|
226
241
|
] }) })
|
|
227
242
|
] }),
|
|
228
243
|
subLabel && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-1", children: subLabel })
|
|
@@ -246,7 +261,7 @@ var SmartRadioGroup = ({
|
|
|
246
261
|
}
|
|
247
262
|
),
|
|
248
263
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
249
|
-
|
|
264
|
+
chunkAEN4A4ST_cjs.Label,
|
|
250
265
|
{
|
|
251
266
|
htmlFor: `${field}-${option.value}`,
|
|
252
267
|
className: "text-sm font-normal cursor-pointer",
|
|
@@ -280,7 +295,7 @@ function SelectTrigger({
|
|
|
280
295
|
{
|
|
281
296
|
"data-slot": "select-trigger",
|
|
282
297
|
"data-size": size,
|
|
283
|
-
className:
|
|
298
|
+
className: chunkAEN4A4ST_cjs.cn(
|
|
284
299
|
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 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-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
285
300
|
className
|
|
286
301
|
),
|
|
@@ -302,7 +317,7 @@ function SelectContent({
|
|
|
302
317
|
SelectPrimitive__namespace.Content,
|
|
303
318
|
{
|
|
304
319
|
"data-slot": "select-content",
|
|
305
|
-
className:
|
|
320
|
+
className: chunkAEN4A4ST_cjs.cn(
|
|
306
321
|
"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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
307
322
|
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
308
323
|
className
|
|
@@ -314,7 +329,7 @@ function SelectContent({
|
|
|
314
329
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
315
330
|
SelectPrimitive__namespace.Viewport,
|
|
316
331
|
{
|
|
317
|
-
className:
|
|
332
|
+
className: chunkAEN4A4ST_cjs.cn(
|
|
318
333
|
"p-1",
|
|
319
334
|
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
320
335
|
),
|
|
@@ -335,7 +350,7 @@ function SelectItem({
|
|
|
335
350
|
SelectPrimitive__namespace.Item,
|
|
336
351
|
{
|
|
337
352
|
"data-slot": "select-item",
|
|
338
|
-
className:
|
|
353
|
+
className: chunkAEN4A4ST_cjs.cn(
|
|
339
354
|
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground 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 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",
|
|
340
355
|
className
|
|
341
356
|
),
|
|
@@ -355,7 +370,7 @@ function SelectScrollUpButton({
|
|
|
355
370
|
SelectPrimitive__namespace.ScrollUpButton,
|
|
356
371
|
{
|
|
357
372
|
"data-slot": "select-scroll-up-button",
|
|
358
|
-
className:
|
|
373
|
+
className: chunkAEN4A4ST_cjs.cn(
|
|
359
374
|
"flex cursor-default items-center justify-center py-1",
|
|
360
375
|
className
|
|
361
376
|
),
|
|
@@ -372,7 +387,7 @@ function SelectScrollDownButton({
|
|
|
372
387
|
SelectPrimitive__namespace.ScrollDownButton,
|
|
373
388
|
{
|
|
374
389
|
"data-slot": "select-scroll-down-button",
|
|
375
|
-
className:
|
|
390
|
+
className: chunkAEN4A4ST_cjs.cn(
|
|
376
391
|
"flex cursor-default items-center justify-center py-1",
|
|
377
392
|
className
|
|
378
393
|
),
|
|
@@ -395,20 +410,27 @@ var SmartSelect = ({
|
|
|
395
410
|
disabled,
|
|
396
411
|
hidden
|
|
397
412
|
}) => {
|
|
398
|
-
const { formData } =
|
|
399
|
-
const { value, error, onChange, fieldRef, registerValidation } =
|
|
400
|
-
const fieldDetection =
|
|
413
|
+
const { formData } = chunkAEN4A4ST_cjs.useSmartForm();
|
|
414
|
+
const { value, error, onChange, fieldRef, registerValidation } = chunkAEN4A4ST_cjs.useFormField(field);
|
|
415
|
+
const fieldDetection = chunkAEN4A4ST_cjs.useFieldDetection();
|
|
401
416
|
const hasRegistered = React6.useRef(false);
|
|
402
417
|
const hasSetDefault = React6.useRef(false);
|
|
403
418
|
const isDisabled = typeof disabled === "function" ? disabled(formData) : disabled || false;
|
|
404
419
|
const isHidden = typeof hidden === "function" ? hidden(formData) : hidden || false;
|
|
405
420
|
if (isHidden) return null;
|
|
421
|
+
const displayName = label || field;
|
|
422
|
+
const builtinValidation = React6.useMemo(() => {
|
|
423
|
+
if (validation || !required) return void 0;
|
|
424
|
+
const preprocess = (v) => v === void 0 || v === null ? "" : v;
|
|
425
|
+
return zod.z.preprocess(preprocess, zod.z.string().min(1, `${displayName} is required`));
|
|
426
|
+
}, [validation, required, displayName]);
|
|
427
|
+
const schemaToRegister = validation ?? builtinValidation;
|
|
406
428
|
React6.useEffect(() => {
|
|
407
|
-
if (
|
|
429
|
+
if (schemaToRegister && !hasRegistered.current) {
|
|
408
430
|
hasRegistered.current = true;
|
|
409
|
-
registerValidation(field,
|
|
431
|
+
registerValidation(field, schemaToRegister, { label: displayName });
|
|
410
432
|
}
|
|
411
|
-
}, [
|
|
433
|
+
}, [schemaToRegister, field, registerValidation, displayName]);
|
|
412
434
|
React6.useEffect(() => {
|
|
413
435
|
if (fieldDetection?.registerField) {
|
|
414
436
|
fieldDetection.registerField(field);
|
|
@@ -423,14 +445,14 @@ var SmartSelect = ({
|
|
|
423
445
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-1 min-w-0 ${className}`, children: [
|
|
424
446
|
label && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2", children: [
|
|
425
447
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
426
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
448
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkAEN4A4ST_cjs.Label, { className: "text-sm font-medium text-foreground", children: [
|
|
427
449
|
label,
|
|
428
450
|
" ",
|
|
429
451
|
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: "*" })
|
|
430
452
|
] }),
|
|
431
|
-
info && /* @__PURE__ */ jsxRuntime.jsx(
|
|
432
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
433
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
453
|
+
info && /* @__PURE__ */ jsxRuntime.jsx(chunkAEN4A4ST_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkAEN4A4ST_cjs.Tooltip, { children: [
|
|
454
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkAEN4A4ST_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4 text-muted-foreground cursor-pointer mr-2" }) }),
|
|
455
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkAEN4A4ST_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs", children: info }) })
|
|
434
456
|
] }) })
|
|
435
457
|
] }),
|
|
436
458
|
subLabel && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-1", children: subLabel })
|
|
@@ -480,7 +502,7 @@ function PopoverContent({
|
|
|
480
502
|
"data-slot": "popover-content",
|
|
481
503
|
align,
|
|
482
504
|
sideOffset,
|
|
483
|
-
className:
|
|
505
|
+
className: chunkAEN4A4ST_cjs.cn(
|
|
484
506
|
"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 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",
|
|
485
507
|
className
|
|
486
508
|
),
|
|
@@ -525,7 +547,7 @@ function Button({
|
|
|
525
547
|
Comp,
|
|
526
548
|
{
|
|
527
549
|
"data-slot": "button",
|
|
528
|
-
className:
|
|
550
|
+
className: chunkAEN4A4ST_cjs.cn(buttonVariants({ variant, size, className })),
|
|
529
551
|
...props
|
|
530
552
|
}
|
|
531
553
|
);
|
|
@@ -538,7 +560,7 @@ function Command({
|
|
|
538
560
|
cmdk.Command,
|
|
539
561
|
{
|
|
540
562
|
"data-slot": "command",
|
|
541
|
-
className:
|
|
563
|
+
className: chunkAEN4A4ST_cjs.cn(
|
|
542
564
|
"bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
|
|
543
565
|
className
|
|
544
566
|
),
|
|
@@ -561,7 +583,7 @@ function CommandInput({
|
|
|
561
583
|
cmdk.Command.Input,
|
|
562
584
|
{
|
|
563
585
|
"data-slot": "command-input",
|
|
564
|
-
className:
|
|
586
|
+
className: chunkAEN4A4ST_cjs.cn(
|
|
565
587
|
"placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
566
588
|
className
|
|
567
589
|
),
|
|
@@ -580,7 +602,7 @@ function CommandList({
|
|
|
580
602
|
cmdk.Command.List,
|
|
581
603
|
{
|
|
582
604
|
"data-slot": "command-list",
|
|
583
|
-
className:
|
|
605
|
+
className: chunkAEN4A4ST_cjs.cn(
|
|
584
606
|
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
585
607
|
className
|
|
586
608
|
),
|
|
@@ -608,7 +630,7 @@ function CommandGroup({
|
|
|
608
630
|
cmdk.Command.Group,
|
|
609
631
|
{
|
|
610
632
|
"data-slot": "command-group",
|
|
611
|
-
className:
|
|
633
|
+
className: chunkAEN4A4ST_cjs.cn(
|
|
612
634
|
"text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",
|
|
613
635
|
className
|
|
614
636
|
),
|
|
@@ -624,7 +646,7 @@ function CommandItem({
|
|
|
624
646
|
cmdk.Command.Item,
|
|
625
647
|
{
|
|
626
648
|
"data-slot": "command-item",
|
|
627
|
-
className:
|
|
649
|
+
className: chunkAEN4A4ST_cjs.cn(
|
|
628
650
|
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
629
651
|
className
|
|
630
652
|
),
|
|
@@ -659,7 +681,7 @@ function Badge({
|
|
|
659
681
|
Comp,
|
|
660
682
|
{
|
|
661
683
|
"data-slot": "badge",
|
|
662
|
-
className:
|
|
684
|
+
className: chunkAEN4A4ST_cjs.cn(badgeVariants({ variant }), className),
|
|
663
685
|
...props
|
|
664
686
|
}
|
|
665
687
|
);
|
|
@@ -793,20 +815,27 @@ var SmartCombobox = ({
|
|
|
793
815
|
disabled,
|
|
794
816
|
hidden
|
|
795
817
|
}) => {
|
|
796
|
-
const { formData } =
|
|
797
|
-
const { value, error, onChange, fieldRef, registerValidation } =
|
|
798
|
-
const fieldDetection =
|
|
818
|
+
const { formData } = chunkAEN4A4ST_cjs.useSmartForm();
|
|
819
|
+
const { value, error, onChange, fieldRef, registerValidation } = chunkAEN4A4ST_cjs.useFormField(field);
|
|
820
|
+
const fieldDetection = chunkAEN4A4ST_cjs.useFieldDetection();
|
|
799
821
|
const hasRegistered = React6.useRef(false);
|
|
800
822
|
const hasSetDefault = React6.useRef(false);
|
|
801
823
|
const isDisabled = typeof disabled === "function" ? disabled(formData) : disabled || false;
|
|
802
824
|
const isHidden = typeof hidden === "function" ? hidden(formData) : hidden || false;
|
|
803
825
|
if (isHidden) return null;
|
|
826
|
+
const displayName = label || field;
|
|
827
|
+
const builtinValidation = React6.useMemo(() => {
|
|
828
|
+
if (validation || !required) return void 0;
|
|
829
|
+
const preprocess = (v) => v === void 0 || v === null ? "" : v;
|
|
830
|
+
return zod.z.preprocess(preprocess, zod.z.string().min(1, `${displayName} is required`));
|
|
831
|
+
}, [validation, required, displayName]);
|
|
832
|
+
const schemaToRegister = validation ?? builtinValidation;
|
|
804
833
|
React6.useEffect(() => {
|
|
805
|
-
if (
|
|
834
|
+
if (schemaToRegister && !hasRegistered.current) {
|
|
806
835
|
hasRegistered.current = true;
|
|
807
|
-
registerValidation(field,
|
|
836
|
+
registerValidation(field, schemaToRegister, { label: displayName });
|
|
808
837
|
}
|
|
809
|
-
}, [
|
|
838
|
+
}, [schemaToRegister, field, registerValidation, displayName]);
|
|
810
839
|
React6.useEffect(() => {
|
|
811
840
|
if (fieldDetection?.registerField) {
|
|
812
841
|
fieldDetection.registerField(field);
|
|
@@ -821,14 +850,14 @@ var SmartCombobox = ({
|
|
|
821
850
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-1 min-w-0 ${className}`, children: [
|
|
822
851
|
label && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2", children: [
|
|
823
852
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
824
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
853
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkAEN4A4ST_cjs.Label, { className: "text-sm font-medium text-foreground", children: [
|
|
825
854
|
label,
|
|
826
855
|
" ",
|
|
827
856
|
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: "*" })
|
|
828
857
|
] }),
|
|
829
|
-
info && /* @__PURE__ */ jsxRuntime.jsx(
|
|
830
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
831
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
858
|
+
info && /* @__PURE__ */ jsxRuntime.jsx(chunkAEN4A4ST_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkAEN4A4ST_cjs.Tooltip, { children: [
|
|
859
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkAEN4A4ST_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4 text-muted-foreground cursor-pointer mr-2" }) }),
|
|
860
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkAEN4A4ST_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs", children: info }) })
|
|
832
861
|
] }) })
|
|
833
862
|
] }),
|
|
834
863
|
subLabel && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-1", children: subLabel })
|
|
@@ -862,7 +891,7 @@ function Calendar({
|
|
|
862
891
|
reactDayPicker.DayPicker,
|
|
863
892
|
{
|
|
864
893
|
showOutsideDays,
|
|
865
|
-
className:
|
|
894
|
+
className: chunkAEN4A4ST_cjs.cn(
|
|
866
895
|
"bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
867
896
|
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
868
897
|
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
@@ -874,85 +903,85 @@ function Calendar({
|
|
|
874
903
|
...formatters
|
|
875
904
|
},
|
|
876
905
|
classNames: {
|
|
877
|
-
root:
|
|
878
|
-
months:
|
|
906
|
+
root: chunkAEN4A4ST_cjs.cn("w-fit", defaultClassNames.root),
|
|
907
|
+
months: chunkAEN4A4ST_cjs.cn(
|
|
879
908
|
"flex gap-4 flex-col md:flex-row relative",
|
|
880
909
|
defaultClassNames.months
|
|
881
910
|
),
|
|
882
|
-
month:
|
|
883
|
-
nav:
|
|
911
|
+
month: chunkAEN4A4ST_cjs.cn("flex flex-col w-full gap-4", defaultClassNames.month),
|
|
912
|
+
nav: chunkAEN4A4ST_cjs.cn(
|
|
884
913
|
"flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",
|
|
885
914
|
defaultClassNames.nav
|
|
886
915
|
),
|
|
887
|
-
button_previous:
|
|
916
|
+
button_previous: chunkAEN4A4ST_cjs.cn(
|
|
888
917
|
buttonVariants({ variant: buttonVariant }),
|
|
889
918
|
"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
|
|
890
919
|
defaultClassNames.button_previous
|
|
891
920
|
),
|
|
892
|
-
button_next:
|
|
921
|
+
button_next: chunkAEN4A4ST_cjs.cn(
|
|
893
922
|
buttonVariants({ variant: buttonVariant }),
|
|
894
923
|
"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",
|
|
895
924
|
defaultClassNames.button_next
|
|
896
925
|
),
|
|
897
|
-
month_caption:
|
|
926
|
+
month_caption: chunkAEN4A4ST_cjs.cn(
|
|
898
927
|
"flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",
|
|
899
928
|
defaultClassNames.month_caption
|
|
900
929
|
),
|
|
901
|
-
dropdowns:
|
|
930
|
+
dropdowns: chunkAEN4A4ST_cjs.cn(
|
|
902
931
|
"w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",
|
|
903
932
|
defaultClassNames.dropdowns
|
|
904
933
|
),
|
|
905
|
-
dropdown_root:
|
|
934
|
+
dropdown_root: chunkAEN4A4ST_cjs.cn(
|
|
906
935
|
"relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",
|
|
907
936
|
defaultClassNames.dropdown_root
|
|
908
937
|
),
|
|
909
|
-
dropdown:
|
|
938
|
+
dropdown: chunkAEN4A4ST_cjs.cn(
|
|
910
939
|
"absolute bg-popover inset-0 opacity-0",
|
|
911
940
|
defaultClassNames.dropdown
|
|
912
941
|
),
|
|
913
|
-
caption_label:
|
|
942
|
+
caption_label: chunkAEN4A4ST_cjs.cn(
|
|
914
943
|
"select-none font-medium",
|
|
915
944
|
captionLayout === "label" ? "text-sm" : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",
|
|
916
945
|
defaultClassNames.caption_label
|
|
917
946
|
),
|
|
918
947
|
table: "w-full border-collapse",
|
|
919
|
-
weekdays:
|
|
920
|
-
weekday:
|
|
948
|
+
weekdays: chunkAEN4A4ST_cjs.cn("flex", defaultClassNames.weekdays),
|
|
949
|
+
weekday: chunkAEN4A4ST_cjs.cn(
|
|
921
950
|
"text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",
|
|
922
951
|
defaultClassNames.weekday
|
|
923
952
|
),
|
|
924
|
-
week:
|
|
925
|
-
week_number_header:
|
|
953
|
+
week: chunkAEN4A4ST_cjs.cn("flex w-full mt-2", defaultClassNames.week),
|
|
954
|
+
week_number_header: chunkAEN4A4ST_cjs.cn(
|
|
926
955
|
"select-none w-(--cell-size)",
|
|
927
956
|
defaultClassNames.week_number_header
|
|
928
957
|
),
|
|
929
|
-
week_number:
|
|
958
|
+
week_number: chunkAEN4A4ST_cjs.cn(
|
|
930
959
|
"text-[0.8rem] select-none text-muted-foreground",
|
|
931
960
|
defaultClassNames.week_number
|
|
932
961
|
),
|
|
933
|
-
day:
|
|
962
|
+
day: chunkAEN4A4ST_cjs.cn(
|
|
934
963
|
"relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",
|
|
935
964
|
defaultClassNames.day
|
|
936
965
|
),
|
|
937
|
-
range_start:
|
|
966
|
+
range_start: chunkAEN4A4ST_cjs.cn(
|
|
938
967
|
"rounded-l-md bg-accent",
|
|
939
968
|
defaultClassNames.range_start
|
|
940
969
|
),
|
|
941
|
-
range_middle:
|
|
942
|
-
range_end:
|
|
943
|
-
today:
|
|
970
|
+
range_middle: chunkAEN4A4ST_cjs.cn("rounded-none", defaultClassNames.range_middle),
|
|
971
|
+
range_end: chunkAEN4A4ST_cjs.cn("rounded-r-md bg-accent", defaultClassNames.range_end),
|
|
972
|
+
today: chunkAEN4A4ST_cjs.cn(
|
|
944
973
|
"bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",
|
|
945
974
|
defaultClassNames.today
|
|
946
975
|
),
|
|
947
|
-
outside:
|
|
976
|
+
outside: chunkAEN4A4ST_cjs.cn(
|
|
948
977
|
"text-muted-foreground aria-selected:text-muted-foreground",
|
|
949
978
|
defaultClassNames.outside
|
|
950
979
|
),
|
|
951
|
-
disabled:
|
|
980
|
+
disabled: chunkAEN4A4ST_cjs.cn(
|
|
952
981
|
"text-muted-foreground opacity-50",
|
|
953
982
|
defaultClassNames.disabled
|
|
954
983
|
),
|
|
955
|
-
hidden:
|
|
984
|
+
hidden: chunkAEN4A4ST_cjs.cn("invisible", defaultClassNames.hidden),
|
|
956
985
|
...classNames
|
|
957
986
|
},
|
|
958
987
|
components: {
|
|
@@ -962,25 +991,25 @@ function Calendar({
|
|
|
962
991
|
{
|
|
963
992
|
"data-slot": "calendar",
|
|
964
993
|
ref: rootRef,
|
|
965
|
-
className:
|
|
994
|
+
className: chunkAEN4A4ST_cjs.cn(className2),
|
|
966
995
|
...props2
|
|
967
996
|
}
|
|
968
997
|
);
|
|
969
998
|
},
|
|
970
999
|
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
971
1000
|
if (orientation === "left") {
|
|
972
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeftIcon, { className:
|
|
1001
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeftIcon, { className: chunkAEN4A4ST_cjs.cn("size-4", className2), ...props2 });
|
|
973
1002
|
}
|
|
974
1003
|
if (orientation === "right") {
|
|
975
1004
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
976
1005
|
lucideReact.ChevronRightIcon,
|
|
977
1006
|
{
|
|
978
|
-
className:
|
|
1007
|
+
className: chunkAEN4A4ST_cjs.cn("size-4", className2),
|
|
979
1008
|
...props2
|
|
980
1009
|
}
|
|
981
1010
|
);
|
|
982
1011
|
}
|
|
983
|
-
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className:
|
|
1012
|
+
return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: chunkAEN4A4ST_cjs.cn("size-4", className2), ...props2 });
|
|
984
1013
|
},
|
|
985
1014
|
DayButton: CalendarDayButton,
|
|
986
1015
|
WeekNumber: ({ children, ...props2 }) => {
|
|
@@ -1014,7 +1043,7 @@ function CalendarDayButton({
|
|
|
1014
1043
|
"data-range-start": modifiers.range_start,
|
|
1015
1044
|
"data-range-end": modifiers.range_end,
|
|
1016
1045
|
"data-range-middle": modifiers.range_middle,
|
|
1017
|
-
className:
|
|
1046
|
+
className: chunkAEN4A4ST_cjs.cn(
|
|
1018
1047
|
"data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
|
|
1019
1048
|
defaultClassNames.day,
|
|
1020
1049
|
className
|
|
@@ -1059,7 +1088,7 @@ function ScrollArea({
|
|
|
1059
1088
|
ScrollAreaPrimitive__namespace.Root,
|
|
1060
1089
|
{
|
|
1061
1090
|
"data-slot": "scroll-area",
|
|
1062
|
-
className:
|
|
1091
|
+
className: chunkAEN4A4ST_cjs.cn("relative", className),
|
|
1063
1092
|
...props,
|
|
1064
1093
|
children: [
|
|
1065
1094
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1086,7 +1115,7 @@ function ScrollBar({
|
|
|
1086
1115
|
{
|
|
1087
1116
|
"data-slot": "scroll-area-scrollbar",
|
|
1088
1117
|
orientation,
|
|
1089
|
-
className:
|
|
1118
|
+
className: chunkAEN4A4ST_cjs.cn(
|
|
1090
1119
|
"flex touch-none p-px transition-colors select-none",
|
|
1091
1120
|
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
1092
1121
|
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
@@ -1129,7 +1158,7 @@ var SmartDatePicker = ({
|
|
|
1129
1158
|
};
|
|
1130
1159
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[280px]", children: /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open: isOpen, onOpenChange: setIsOpen, children: [
|
|
1131
1160
|
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1132
|
-
|
|
1161
|
+
chunkAEN4A4ST_cjs.SmartInput,
|
|
1133
1162
|
{
|
|
1134
1163
|
field,
|
|
1135
1164
|
label,
|
|
@@ -1331,9 +1360,9 @@ var SmartTags = ({
|
|
|
1331
1360
|
info,
|
|
1332
1361
|
subLabel
|
|
1333
1362
|
}) => {
|
|
1334
|
-
const { formData } =
|
|
1335
|
-
const { value, error, onChange, fieldRef, registerValidation } =
|
|
1336
|
-
const fieldDetection =
|
|
1363
|
+
const { formData } = chunkAEN4A4ST_cjs.useSmartForm();
|
|
1364
|
+
const { value, error, onChange, fieldRef, registerValidation } = chunkAEN4A4ST_cjs.useFormField(field);
|
|
1365
|
+
const fieldDetection = chunkAEN4A4ST_cjs.useFieldDetection();
|
|
1337
1366
|
const hasRegistered = React6.useRef(false);
|
|
1338
1367
|
const hasSetDefault = React6.useRef(false);
|
|
1339
1368
|
const isDisabled = typeof disabled === "function" ? disabled(formData) : disabled || false;
|
|
@@ -1342,12 +1371,13 @@ var SmartTags = ({
|
|
|
1342
1371
|
const [tags, setTags] = React6.useState([]);
|
|
1343
1372
|
const [inputValue, setInputValue] = React6.useState("");
|
|
1344
1373
|
const inputRef = React6.useRef(null);
|
|
1374
|
+
const displayName = label || field;
|
|
1345
1375
|
React6.useEffect(() => {
|
|
1346
1376
|
if (validation && !hasRegistered.current) {
|
|
1347
1377
|
hasRegistered.current = true;
|
|
1348
|
-
registerValidation(field, validation);
|
|
1378
|
+
registerValidation(field, validation, { label: displayName });
|
|
1349
1379
|
}
|
|
1350
|
-
}, [validation, field, registerValidation]);
|
|
1380
|
+
}, [validation, field, registerValidation, displayName]);
|
|
1351
1381
|
React6.useEffect(() => {
|
|
1352
1382
|
if (fieldDetection?.registerField) {
|
|
1353
1383
|
fieldDetection.registerField(field);
|
|
@@ -1405,7 +1435,7 @@ var SmartTags = ({
|
|
|
1405
1435
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-1 min-w-0 ${className}`, children: [
|
|
1406
1436
|
label && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2", children: [
|
|
1407
1437
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
1408
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1438
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkAEN4A4ST_cjs.Label, { className: "text-sm font-medium text-foreground", children: [
|
|
1409
1439
|
label,
|
|
1410
1440
|
" ",
|
|
1411
1441
|
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: "*" }),
|
|
@@ -1417,9 +1447,9 @@ var SmartTags = ({
|
|
|
1417
1447
|
")"
|
|
1418
1448
|
] })
|
|
1419
1449
|
] }),
|
|
1420
|
-
info && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1421
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1422
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1450
|
+
info && /* @__PURE__ */ jsxRuntime.jsx(chunkAEN4A4ST_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkAEN4A4ST_cjs.Tooltip, { children: [
|
|
1451
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkAEN4A4ST_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4 text-muted-foreground cursor-pointer mr-2" }) }),
|
|
1452
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkAEN4A4ST_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs", children: info }) })
|
|
1423
1453
|
] }) })
|
|
1424
1454
|
] }),
|
|
1425
1455
|
subLabel && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-1", children: subLabel })
|
|
@@ -1428,7 +1458,7 @@ var SmartTags = ({
|
|
|
1428
1458
|
"div",
|
|
1429
1459
|
{
|
|
1430
1460
|
ref: fieldRef,
|
|
1431
|
-
className:
|
|
1461
|
+
className: chunkAEN4A4ST_cjs.cn(
|
|
1432
1462
|
"min-h-[40px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background",
|
|
1433
1463
|
"focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",
|
|
1434
1464
|
"flex flex-wrap items-center gap-2 cursor-text",
|
|
@@ -1464,7 +1494,7 @@ var SmartTags = ({
|
|
|
1464
1494
|
`${tagText}-${index}`
|
|
1465
1495
|
)),
|
|
1466
1496
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1467
|
-
|
|
1497
|
+
chunkAEN4A4ST_cjs.Input,
|
|
1468
1498
|
{
|
|
1469
1499
|
ref: inputRef,
|
|
1470
1500
|
type: "text",
|
|
@@ -1501,5 +1531,5 @@ exports.SmartDatePicker = SmartDatePicker;
|
|
|
1501
1531
|
exports.SmartRadioGroup = SmartRadioGroup;
|
|
1502
1532
|
exports.SmartSelect = SmartSelect;
|
|
1503
1533
|
exports.SmartTags = SmartTags;
|
|
1504
|
-
//# sourceMappingURL=chunk-
|
|
1505
|
-
//# sourceMappingURL=chunk-
|
|
1534
|
+
//# sourceMappingURL=chunk-TX7JD2XS.cjs.map
|
|
1535
|
+
//# sourceMappingURL=chunk-TX7JD2XS.cjs.map
|