@algodomain/smart-forms 0.1.1 → 0.1.3
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/LICENSE +3 -0
- package/README.md +243 -0
- package/dist/{SmartFormProvider-DyJoDBjQ.d.cts → SmartFormProvider-BdyRQakk.d.cts} +1 -0
- package/dist/{SmartFormProvider-DyJoDBjQ.d.ts → SmartFormProvider-BdyRQakk.d.ts} +1 -0
- package/dist/{SmartTags-HmvmCJPT.d.cts → SmartTags-DPqw9PG1.d.cts} +12 -1
- package/dist/{SmartTags-HmvmCJPT.d.ts → SmartTags-DPqw9PG1.d.ts} +12 -1
- package/dist/{chunk-EE6VZXWC.js → chunk-3L7TKJIB.js} +58 -45
- package/dist/chunk-3L7TKJIB.js.map +1 -0
- package/dist/{chunk-5A5WAAED.js → chunk-CT6GW6PK.js} +44 -11
- package/dist/chunk-CT6GW6PK.js.map +1 -0
- package/dist/{chunk-LRMJP5OJ.cjs → chunk-MBC5TYXA.cjs} +58 -45
- package/dist/chunk-MBC5TYXA.cjs.map +1 -0
- package/dist/{chunk-Y3H6MI5D.cjs → chunk-TJ6EFR2O.cjs} +120 -87
- package/dist/chunk-TJ6EFR2O.cjs.map +1 -0
- package/dist/fields.cjs +172 -124
- package/dist/fields.cjs.map +1 -1
- package/dist/fields.d.cts +14 -2
- package/dist/fields.d.ts +14 -2
- package/dist/fields.js +70 -22
- package/dist/fields.js.map +1 -1
- package/dist/index.cjs +36 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +14 -8
- 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-5A5WAAED.js.map +0 -1
- package/dist/chunk-EE6VZXWC.js.map +0 -1
- package/dist/chunk-LRMJP5OJ.cjs.map +0 -1
- package/dist/chunk-Y3H6MI5D.cjs.map +0 -1
package/dist/fields.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkTJ6EFR2O_cjs = require('./chunk-TJ6EFR2O.cjs');
|
|
4
|
+
var chunkMBC5TYXA_cjs = require('./chunk-MBC5TYXA.cjs');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var lucideReact = require('lucide-react');
|
|
7
7
|
var cmdk = require('cmdk');
|
|
@@ -39,7 +39,7 @@ function Command({
|
|
|
39
39
|
cmdk.Command,
|
|
40
40
|
{
|
|
41
41
|
"data-slot": "command",
|
|
42
|
-
className:
|
|
42
|
+
className: chunkMBC5TYXA_cjs.cn(
|
|
43
43
|
"bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
|
|
44
44
|
className
|
|
45
45
|
),
|
|
@@ -62,7 +62,7 @@ function CommandInput({
|
|
|
62
62
|
cmdk.Command.Input,
|
|
63
63
|
{
|
|
64
64
|
"data-slot": "command-input",
|
|
65
|
-
className:
|
|
65
|
+
className: chunkMBC5TYXA_cjs.cn(
|
|
66
66
|
"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",
|
|
67
67
|
className
|
|
68
68
|
),
|
|
@@ -81,7 +81,7 @@ function CommandList({
|
|
|
81
81
|
cmdk.Command.List,
|
|
82
82
|
{
|
|
83
83
|
"data-slot": "command-list",
|
|
84
|
-
className:
|
|
84
|
+
className: chunkMBC5TYXA_cjs.cn(
|
|
85
85
|
"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
|
|
86
86
|
className
|
|
87
87
|
),
|
|
@@ -109,7 +109,7 @@ function CommandGroup({
|
|
|
109
109
|
cmdk.Command.Group,
|
|
110
110
|
{
|
|
111
111
|
"data-slot": "command-group",
|
|
112
|
-
className:
|
|
112
|
+
className: chunkMBC5TYXA_cjs.cn(
|
|
113
113
|
"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",
|
|
114
114
|
className
|
|
115
115
|
),
|
|
@@ -125,7 +125,7 @@ function CommandItem({
|
|
|
125
125
|
cmdk.Command.Item,
|
|
126
126
|
{
|
|
127
127
|
"data-slot": "command-item",
|
|
128
|
-
className:
|
|
128
|
+
className: chunkMBC5TYXA_cjs.cn(
|
|
129
129
|
"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",
|
|
130
130
|
className
|
|
131
131
|
),
|
|
@@ -160,7 +160,7 @@ function Badge({
|
|
|
160
160
|
Comp,
|
|
161
161
|
{
|
|
162
162
|
"data-slot": "badge",
|
|
163
|
-
className:
|
|
163
|
+
className: chunkMBC5TYXA_cjs.cn(badgeVariants({ variant }), className),
|
|
164
164
|
...props
|
|
165
165
|
}
|
|
166
166
|
);
|
|
@@ -195,9 +195,9 @@ function Combobox({
|
|
|
195
195
|
const filteredOptions = combinedOptions.filter(
|
|
196
196
|
(option) => option.label.toLowerCase().includes(searchValue.toLowerCase())
|
|
197
197
|
);
|
|
198
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: containerStyles, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
199
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
200
|
-
|
|
198
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: containerStyles, children: /* @__PURE__ */ jsxRuntime.jsxs(chunkTJ6EFR2O_cjs.Popover, { open, onOpenChange: setOpen, children: [
|
|
199
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTJ6EFR2O_cjs.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
200
|
+
chunkTJ6EFR2O_cjs.Button,
|
|
201
201
|
{
|
|
202
202
|
variant: "outline",
|
|
203
203
|
role: "combobox",
|
|
@@ -211,7 +211,7 @@ function Combobox({
|
|
|
211
211
|
]
|
|
212
212
|
}
|
|
213
213
|
) }),
|
|
214
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
214
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTJ6EFR2O_cjs.PopoverContent, { className: "w-[var(--radix-popover-trigger-width)] p-0", children: /* @__PURE__ */ jsxRuntime.jsxs(Command, { className: "w-full", children: [
|
|
215
215
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
216
216
|
CommandInput,
|
|
217
217
|
{
|
|
@@ -255,7 +255,7 @@ function Combobox({
|
|
|
255
255
|
option.value
|
|
256
256
|
)) }) : /* @__PURE__ */ jsxRuntime.jsxs(CommandEmpty, { children: [
|
|
257
257
|
allowCustom && searchValue && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
258
|
-
|
|
258
|
+
chunkTJ6EFR2O_cjs.Button,
|
|
259
259
|
{
|
|
260
260
|
variant: "ghost",
|
|
261
261
|
className: "w-full justify-start",
|
|
@@ -290,12 +290,18 @@ var SmartCombobox = ({
|
|
|
290
290
|
required = false,
|
|
291
291
|
defaultValue,
|
|
292
292
|
info,
|
|
293
|
-
subLabel
|
|
293
|
+
subLabel,
|
|
294
|
+
disabled,
|
|
295
|
+
hidden
|
|
294
296
|
}) => {
|
|
295
|
-
const {
|
|
296
|
-
const
|
|
297
|
+
const { formData } = chunkMBC5TYXA_cjs.useSmartForm();
|
|
298
|
+
const { value, error, onChange, fieldRef, registerValidation } = chunkMBC5TYXA_cjs.useFormField(field);
|
|
299
|
+
const fieldDetection = chunkMBC5TYXA_cjs.useFieldDetection();
|
|
297
300
|
const hasRegistered = React.useRef(false);
|
|
298
301
|
const hasSetDefault = React.useRef(false);
|
|
302
|
+
const isDisabled = typeof disabled === "function" ? disabled(formData) : disabled || false;
|
|
303
|
+
const isHidden = typeof hidden === "function" ? hidden(formData) : hidden || false;
|
|
304
|
+
if (isHidden) return null;
|
|
299
305
|
React.useEffect(() => {
|
|
300
306
|
if (validation && !hasRegistered.current) {
|
|
301
307
|
hasRegistered.current = true;
|
|
@@ -316,14 +322,14 @@ var SmartCombobox = ({
|
|
|
316
322
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-1 min-w-0 ${className}`, children: [
|
|
317
323
|
label && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2", children: [
|
|
318
324
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
319
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
325
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkMBC5TYXA_cjs.Label, { className: "text-sm font-medium text-foreground", children: [
|
|
320
326
|
label,
|
|
321
327
|
" ",
|
|
322
328
|
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: "*" })
|
|
323
329
|
] }),
|
|
324
|
-
info && /* @__PURE__ */ jsxRuntime.jsx(
|
|
325
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
326
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
330
|
+
info && /* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkMBC5TYXA_cjs.Tooltip, { children: [
|
|
331
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4 text-muted-foreground cursor-pointer mr-2" }) }),
|
|
332
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs", children: info }) })
|
|
327
333
|
] }) })
|
|
328
334
|
] }),
|
|
329
335
|
subLabel && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-1", children: subLabel })
|
|
@@ -335,7 +341,8 @@ var SmartCombobox = ({
|
|
|
335
341
|
value: value || "",
|
|
336
342
|
onChange: (newValue) => onChange(newValue),
|
|
337
343
|
placeholder: placeholder || (label ? `Select ${label.toLowerCase()}` : `Select ${field}`),
|
|
338
|
-
allowCustom
|
|
344
|
+
allowCustom,
|
|
345
|
+
isDisabled
|
|
339
346
|
}
|
|
340
347
|
) }),
|
|
341
348
|
error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-destructive text-sm mt-1", children: error })
|
|
@@ -357,14 +364,19 @@ var SmartFileUpload = ({
|
|
|
357
364
|
onError,
|
|
358
365
|
defaultValue,
|
|
359
366
|
info,
|
|
360
|
-
subLabel
|
|
367
|
+
subLabel,
|
|
368
|
+
disabled,
|
|
369
|
+
hidden
|
|
361
370
|
}) => {
|
|
362
|
-
const {
|
|
363
|
-
const {
|
|
364
|
-
const fieldDetection =
|
|
371
|
+
const { formData, registerSubmitHook, unregisterSubmitHook } = chunkMBC5TYXA_cjs.useSmartForm();
|
|
372
|
+
const { value, error, onChange, fieldRef, registerValidation } = chunkMBC5TYXA_cjs.useFormField(field);
|
|
373
|
+
const fieldDetection = chunkMBC5TYXA_cjs.useFieldDetection();
|
|
365
374
|
const hasRegistered = React.useRef(false);
|
|
366
375
|
const hasSetDefault = React.useRef(false);
|
|
367
376
|
const inputRef = React.useRef(null);
|
|
377
|
+
const isDisabled = typeof disabled === "function" ? disabled(formData) : disabled || false;
|
|
378
|
+
const isHidden = typeof hidden === "function" ? hidden(formData) : hidden || false;
|
|
379
|
+
if (isHidden) return null;
|
|
368
380
|
React.useEffect(() => {
|
|
369
381
|
if (validation && !hasRegistered.current) {
|
|
370
382
|
hasRegistered.current = true;
|
|
@@ -494,24 +506,24 @@ var SmartFileUpload = ({
|
|
|
494
506
|
}
|
|
495
507
|
return () => unregisterSubmitHook(key);
|
|
496
508
|
}, [field, uploadApi, uploadOnSelect, registerSubmitHook, unregisterSubmitHook, value, multiple]);
|
|
497
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
509
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkMBC5TYXA_cjs.cn("flex-1 min-w-0", className), children: [
|
|
498
510
|
label && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2", children: [
|
|
499
511
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
500
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
512
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkMBC5TYXA_cjs.Label, { className: "text-sm font-medium text-foreground", children: [
|
|
501
513
|
label,
|
|
502
514
|
" ",
|
|
503
515
|
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: "*" })
|
|
504
516
|
] }),
|
|
505
|
-
info && /* @__PURE__ */ jsxRuntime.jsx(
|
|
506
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
507
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
517
|
+
info && /* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkMBC5TYXA_cjs.Tooltip, { children: [
|
|
518
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4 text-muted-foreground cursor-pointer mr-2" }) }),
|
|
519
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs", children: info }) })
|
|
508
520
|
] }) })
|
|
509
521
|
] }),
|
|
510
522
|
subLabel && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-1", children: subLabel })
|
|
511
523
|
] }),
|
|
512
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
524
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkMBC5TYXA_cjs.cn("flex items-center gap-2", error && "text-destructive"), children: [
|
|
513
525
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
514
|
-
|
|
526
|
+
chunkMBC5TYXA_cjs.Input,
|
|
515
527
|
{
|
|
516
528
|
ref: (el) => {
|
|
517
529
|
inputRef.current = el;
|
|
@@ -521,11 +533,12 @@ var SmartFileUpload = ({
|
|
|
521
533
|
accept,
|
|
522
534
|
multiple,
|
|
523
535
|
onChange: onInputChange,
|
|
524
|
-
className:
|
|
525
|
-
"data-field": field
|
|
536
|
+
className: chunkMBC5TYXA_cjs.cn(error && "border-destructive"),
|
|
537
|
+
"data-field": field,
|
|
538
|
+
disabled: isDisabled
|
|
526
539
|
}
|
|
527
540
|
),
|
|
528
|
-
(Array.isArray(value) ? value.length > 0 : !!value) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
541
|
+
(Array.isArray(value) ? value.length > 0 : !!value) && /* @__PURE__ */ jsxRuntime.jsx(chunkTJ6EFR2O_cjs.Button, { type: "button", variant: "secondary", onClick: clearSelection, disabled: isDisabled, children: "Clear" })
|
|
529
542
|
] }),
|
|
530
543
|
normalizedFiles.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 text-sm text-muted-foreground", children: "No file selected" }) : /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "mt-2 space-y-1", children: normalizedFiles.map((f, idx) => {
|
|
531
544
|
const isImage = f.type.startsWith("image/");
|
|
@@ -550,13 +563,14 @@ var SmartFileUpload = ({
|
|
|
550
563
|
] })
|
|
551
564
|
] }),
|
|
552
565
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
553
|
-
|
|
566
|
+
chunkTJ6EFR2O_cjs.Button,
|
|
554
567
|
{
|
|
555
568
|
type: "button",
|
|
556
569
|
variant: "ghost",
|
|
557
570
|
size: "sm",
|
|
558
571
|
onClick: () => removeFileAt(idx),
|
|
559
572
|
"aria-label": `Remove ${f.name}`,
|
|
573
|
+
disabled: isDisabled,
|
|
560
574
|
children: "\u2715"
|
|
561
575
|
}
|
|
562
576
|
)
|
|
@@ -585,7 +599,7 @@ function Slider({
|
|
|
585
599
|
value,
|
|
586
600
|
min,
|
|
587
601
|
max,
|
|
588
|
-
className:
|
|
602
|
+
className: chunkMBC5TYXA_cjs.cn(
|
|
589
603
|
"relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",
|
|
590
604
|
className
|
|
591
605
|
),
|
|
@@ -595,14 +609,14 @@ function Slider({
|
|
|
595
609
|
SliderPrimitive__namespace.Track,
|
|
596
610
|
{
|
|
597
611
|
"data-slot": "slider-track",
|
|
598
|
-
className:
|
|
612
|
+
className: chunkMBC5TYXA_cjs.cn(
|
|
599
613
|
"bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
600
614
|
),
|
|
601
615
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
602
616
|
SliderPrimitive__namespace.Range,
|
|
603
617
|
{
|
|
604
618
|
"data-slot": "slider-range",
|
|
605
|
-
className:
|
|
619
|
+
className: chunkMBC5TYXA_cjs.cn(
|
|
606
620
|
"bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
|
|
607
621
|
)
|
|
608
622
|
}
|
|
@@ -634,12 +648,18 @@ var SmartSlider = ({
|
|
|
634
648
|
valueFormatter = (value) => value.toString(),
|
|
635
649
|
defaultValue,
|
|
636
650
|
info,
|
|
637
|
-
subLabel
|
|
651
|
+
subLabel,
|
|
652
|
+
disabled,
|
|
653
|
+
hidden
|
|
638
654
|
}) => {
|
|
639
|
-
const {
|
|
640
|
-
const
|
|
655
|
+
const { formData } = chunkMBC5TYXA_cjs.useSmartForm();
|
|
656
|
+
const { value, error, onChange, fieldRef, registerValidation } = chunkMBC5TYXA_cjs.useFormField(field);
|
|
657
|
+
const fieldDetection = chunkMBC5TYXA_cjs.useFieldDetection();
|
|
641
658
|
const hasRegistered = React.useRef(false);
|
|
642
659
|
const hasSetDefault = React.useRef(false);
|
|
660
|
+
const isDisabled = typeof disabled === "function" ? disabled(formData) : disabled || false;
|
|
661
|
+
const isHidden = typeof hidden === "function" ? hidden(formData) : hidden || false;
|
|
662
|
+
if (isHidden) return null;
|
|
643
663
|
React.useEffect(() => {
|
|
644
664
|
if (validation && !hasRegistered.current) {
|
|
645
665
|
hasRegistered.current = true;
|
|
@@ -665,7 +685,7 @@ var SmartSlider = ({
|
|
|
665
685
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-1 min-w-0 ${className}`, children: [
|
|
666
686
|
label && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2", children: [
|
|
667
687
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
668
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
688
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkMBC5TYXA_cjs.Label, { className: "text-sm font-medium text-foreground", children: [
|
|
669
689
|
label,
|
|
670
690
|
" ",
|
|
671
691
|
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: "*" }),
|
|
@@ -675,9 +695,9 @@ var SmartSlider = ({
|
|
|
675
695
|
")"
|
|
676
696
|
] })
|
|
677
697
|
] }),
|
|
678
|
-
info && /* @__PURE__ */ jsxRuntime.jsx(
|
|
679
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
680
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
698
|
+
info && /* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkMBC5TYXA_cjs.Tooltip, { children: [
|
|
699
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4 text-muted-foreground cursor-pointer mr-2" }) }),
|
|
700
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs", children: info }) })
|
|
681
701
|
] }) })
|
|
682
702
|
] }),
|
|
683
703
|
subLabel && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-1", children: subLabel })
|
|
@@ -693,7 +713,8 @@ var SmartSlider = ({
|
|
|
693
713
|
max,
|
|
694
714
|
step,
|
|
695
715
|
className: `w-full ${error ? "border-destructive" : ""}`,
|
|
696
|
-
"data-field": field
|
|
716
|
+
"data-field": field,
|
|
717
|
+
disabled: isDisabled
|
|
697
718
|
}
|
|
698
719
|
),
|
|
699
720
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between text-sm text-muted-foreground", children: [
|
|
@@ -722,15 +743,21 @@ var SmartDualRangeSlider = ({
|
|
|
722
743
|
defaultMinValue,
|
|
723
744
|
defaultMaxValue,
|
|
724
745
|
info,
|
|
725
|
-
subLabel
|
|
746
|
+
subLabel,
|
|
747
|
+
disabled,
|
|
748
|
+
hidden
|
|
726
749
|
}) => {
|
|
727
|
-
const
|
|
728
|
-
const
|
|
729
|
-
const
|
|
750
|
+
const { formData } = chunkMBC5TYXA_cjs.useSmartForm();
|
|
751
|
+
const minFormField = chunkMBC5TYXA_cjs.useFormField(minField);
|
|
752
|
+
const maxFormField = chunkMBC5TYXA_cjs.useFormField(maxField);
|
|
753
|
+
const fieldDetection = chunkMBC5TYXA_cjs.useFieldDetection();
|
|
730
754
|
const hasRegisteredMin = React.useRef(false);
|
|
731
755
|
const hasRegisteredMax = React.useRef(false);
|
|
732
756
|
const hasSetDefaultMin = React.useRef(false);
|
|
733
757
|
const hasSetDefaultMax = React.useRef(false);
|
|
758
|
+
const isDisabled = typeof disabled === "function" ? disabled(formData) : disabled || false;
|
|
759
|
+
const isHidden = typeof hidden === "function" ? hidden(formData) : hidden || false;
|
|
760
|
+
if (isHidden) return null;
|
|
734
761
|
React.useEffect(() => {
|
|
735
762
|
if (minValidation && !hasRegisteredMin.current) {
|
|
736
763
|
hasRegisteredMin.current = true;
|
|
@@ -772,14 +799,14 @@ var SmartDualRangeSlider = ({
|
|
|
772
799
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-1 min-w-0 ${className}`, children: [
|
|
773
800
|
label && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2", children: [
|
|
774
801
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
775
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
802
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkMBC5TYXA_cjs.Label, { className: "text-sm font-medium text-foreground", children: [
|
|
776
803
|
label,
|
|
777
804
|
" ",
|
|
778
805
|
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: "*" })
|
|
779
806
|
] }),
|
|
780
|
-
info && /* @__PURE__ */ jsxRuntime.jsx(
|
|
781
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
782
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
807
|
+
info && /* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkMBC5TYXA_cjs.Tooltip, { children: [
|
|
808
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4 text-muted-foreground cursor-pointer mr-2" }) }),
|
|
809
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs", children: info }) })
|
|
783
810
|
] }) })
|
|
784
811
|
] }),
|
|
785
812
|
subLabel && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-1", children: subLabel })
|
|
@@ -796,7 +823,8 @@ var SmartDualRangeSlider = ({
|
|
|
796
823
|
step,
|
|
797
824
|
className: `w-full ${combinedError ? "border-destructive" : ""}`,
|
|
798
825
|
"data-min-field": minField,
|
|
799
|
-
"data-max-field": maxField
|
|
826
|
+
"data-max-field": maxField,
|
|
827
|
+
disabled: isDisabled
|
|
800
828
|
}
|
|
801
829
|
),
|
|
802
830
|
showValues && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center text-sm", children: [
|
|
@@ -860,7 +888,7 @@ var Tags = ({
|
|
|
860
888
|
TagsContext.Provider,
|
|
861
889
|
{
|
|
862
890
|
value: { value, setValue, open, onOpenChange, width, setWidth },
|
|
863
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
891
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkTJ6EFR2O_cjs.Popover, { onOpenChange, open, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkMBC5TYXA_cjs.cn("relative w-full", className), ref, children }) })
|
|
864
892
|
}
|
|
865
893
|
);
|
|
866
894
|
};
|
|
@@ -868,10 +896,10 @@ var TagsTrigger = ({
|
|
|
868
896
|
className,
|
|
869
897
|
children,
|
|
870
898
|
...props
|
|
871
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
872
|
-
|
|
899
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(chunkTJ6EFR2O_cjs.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
900
|
+
chunkTJ6EFR2O_cjs.Button,
|
|
873
901
|
{
|
|
874
|
-
className:
|
|
902
|
+
className: chunkMBC5TYXA_cjs.cn("h-auto w-full justify-between p-2", className),
|
|
875
903
|
role: "combobox",
|
|
876
904
|
variant: "outline",
|
|
877
905
|
...props,
|
|
@@ -892,7 +920,7 @@ var TagsValue = ({
|
|
|
892
920
|
event.stopPropagation();
|
|
893
921
|
onRemove?.();
|
|
894
922
|
};
|
|
895
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Badge, { className:
|
|
923
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Badge, { className: chunkMBC5TYXA_cjs.cn("flex items-center gap-2", className), ...props, children: [
|
|
896
924
|
children,
|
|
897
925
|
onRemove && // biome-ignore lint/a11y/noStaticElementInteractions: "This is a clickable badge"
|
|
898
926
|
// biome-ignore lint/a11y/useKeyWithClickEvents: "This is a clickable badge"
|
|
@@ -913,17 +941,17 @@ var TagsContent = ({
|
|
|
913
941
|
}) => {
|
|
914
942
|
const { width } = useTagsContext();
|
|
915
943
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
916
|
-
|
|
944
|
+
chunkTJ6EFR2O_cjs.PopoverContent,
|
|
917
945
|
{
|
|
918
|
-
className:
|
|
946
|
+
className: chunkMBC5TYXA_cjs.cn("p-0", className),
|
|
919
947
|
style: { width },
|
|
920
948
|
...props,
|
|
921
949
|
children: /* @__PURE__ */ jsxRuntime.jsx(Command, { children })
|
|
922
950
|
}
|
|
923
951
|
);
|
|
924
952
|
};
|
|
925
|
-
var TagsInput = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(CommandInput, { className:
|
|
926
|
-
var TagsList = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(CommandList, { className:
|
|
953
|
+
var TagsInput = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(CommandInput, { className: chunkMBC5TYXA_cjs.cn("h-9", className), ...props });
|
|
954
|
+
var TagsList = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(CommandList, { className: chunkMBC5TYXA_cjs.cn("max-h-[200px]", className), ...props });
|
|
927
955
|
var TagsEmpty = ({
|
|
928
956
|
children,
|
|
929
957
|
className,
|
|
@@ -933,7 +961,7 @@ var TagsGroup = CommandGroup;
|
|
|
933
961
|
var TagsItem = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
934
962
|
CommandItem,
|
|
935
963
|
{
|
|
936
|
-
className:
|
|
964
|
+
className: chunkMBC5TYXA_cjs.cn("cursor-pointer items-center justify-between", className),
|
|
937
965
|
...props
|
|
938
966
|
}
|
|
939
967
|
);
|
|
@@ -950,12 +978,18 @@ var SmartAutoSuggestTags = ({
|
|
|
950
978
|
defaultValue,
|
|
951
979
|
onTagCreate,
|
|
952
980
|
info,
|
|
953
|
-
subLabel
|
|
981
|
+
subLabel,
|
|
982
|
+
disabled,
|
|
983
|
+
hidden
|
|
954
984
|
}) => {
|
|
955
|
-
const {
|
|
956
|
-
const
|
|
985
|
+
const { formData } = chunkMBC5TYXA_cjs.useSmartForm();
|
|
986
|
+
const { value, error, onChange, fieldRef, registerValidation } = chunkMBC5TYXA_cjs.useFormField(field);
|
|
987
|
+
const fieldDetection = chunkMBC5TYXA_cjs.useFieldDetection();
|
|
957
988
|
const hasRegistered = React.useRef(false);
|
|
958
989
|
const hasSetDefault = React.useRef(false);
|
|
990
|
+
const isDisabled = typeof disabled === "function" ? disabled(formData) : disabled || false;
|
|
991
|
+
const isHidden = typeof hidden === "function" ? hidden(formData) : hidden || false;
|
|
992
|
+
if (isHidden) return null;
|
|
959
993
|
const [tags, setTags] = React.useState(initialOptions);
|
|
960
994
|
const [newTag, setNewTag] = React.useState("");
|
|
961
995
|
const selected = Array.isArray(value) ? value : [];
|
|
@@ -1019,7 +1053,7 @@ var SmartAutoSuggestTags = ({
|
|
|
1019
1053
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-1 min-w-0 ${className}`, children: [
|
|
1020
1054
|
label && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2", children: [
|
|
1021
1055
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
1022
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1056
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkMBC5TYXA_cjs.Label, { className: "text-sm font-medium text-foreground", children: [
|
|
1023
1057
|
label,
|
|
1024
1058
|
" ",
|
|
1025
1059
|
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: "*" }),
|
|
@@ -1031,19 +1065,20 @@ var SmartAutoSuggestTags = ({
|
|
|
1031
1065
|
")"
|
|
1032
1066
|
] })
|
|
1033
1067
|
] }),
|
|
1034
|
-
info && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1035
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1036
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1068
|
+
info && /* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkMBC5TYXA_cjs.Tooltip, { children: [
|
|
1069
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4 text-muted-foreground cursor-pointer mr-2" }) }),
|
|
1070
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs", children: info }) })
|
|
1037
1071
|
] }) })
|
|
1038
1072
|
] }),
|
|
1039
1073
|
subLabel && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-1", children: subLabel })
|
|
1040
1074
|
] }),
|
|
1041
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: fieldRef, "data-field": field, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1075
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: fieldRef, "data-field": field, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkMBC5TYXA_cjs.cn(
|
|
1042
1076
|
"w-full rounded-md border border-input bg-background text-sm ring-offset-background",
|
|
1043
1077
|
"focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",
|
|
1044
|
-
error && "border-destructive focus-within:ring-destructive"
|
|
1078
|
+
error && "border-destructive focus-within:ring-destructive",
|
|
1079
|
+
isDisabled && "cursor-not-allowed opacity-50"
|
|
1045
1080
|
), children: /* @__PURE__ */ jsxRuntime.jsxs(Tags, { className: "w-full", children: [
|
|
1046
|
-
/* @__PURE__ */ jsxRuntime.jsxs(TagsTrigger, { className: "w-full px-3 py-2 border-0 bg-transparent", children: [
|
|
1081
|
+
/* @__PURE__ */ jsxRuntime.jsxs(TagsTrigger, { className: "w-full px-3 py-2 border-0 bg-transparent", disabled: isDisabled, children: [
|
|
1047
1082
|
selected.length === 0 && placeholder && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-sm", children: placeholder }),
|
|
1048
1083
|
selected.map((tagId) => {
|
|
1049
1084
|
const tag = tags.find((t) => t.id === tagId);
|
|
@@ -1064,7 +1099,8 @@ var SmartAutoSuggestTags = ({
|
|
|
1064
1099
|
{
|
|
1065
1100
|
onValueChange: setNewTag,
|
|
1066
1101
|
placeholder: `Search ${placeholder.toLowerCase()}...`,
|
|
1067
|
-
value: newTag
|
|
1102
|
+
value: newTag,
|
|
1103
|
+
disabled: isDisabled
|
|
1068
1104
|
}
|
|
1069
1105
|
),
|
|
1070
1106
|
/* @__PURE__ */ jsxRuntime.jsxs(TagsList, { children: [
|
|
@@ -1155,14 +1191,20 @@ var SmartBasicRichTextbox = ({
|
|
|
1155
1191
|
minHeight = "150px",
|
|
1156
1192
|
maxHeight = "400px",
|
|
1157
1193
|
info,
|
|
1158
|
-
subLabel
|
|
1194
|
+
subLabel,
|
|
1195
|
+
disabled,
|
|
1196
|
+
hidden
|
|
1159
1197
|
}) => {
|
|
1160
|
-
const {
|
|
1161
|
-
const
|
|
1198
|
+
const { formData } = chunkMBC5TYXA_cjs.useSmartForm();
|
|
1199
|
+
const { value, error, onChange, fieldRef, registerValidation } = chunkMBC5TYXA_cjs.useFormField(field);
|
|
1200
|
+
const fieldDetection = chunkMBC5TYXA_cjs.useFieldDetection();
|
|
1162
1201
|
const hasRegistered = React.useRef(false);
|
|
1163
1202
|
const hasSetDefault = React.useRef(false);
|
|
1164
1203
|
const editorRef = React.useRef(null);
|
|
1165
1204
|
const [isFocused, setIsFocused] = React.useState(false);
|
|
1205
|
+
const isDisabled = typeof disabled === "function" ? disabled(formData) : disabled || false;
|
|
1206
|
+
const isHidden = typeof hidden === "function" ? hidden(formData) : hidden || false;
|
|
1207
|
+
if (isHidden) return null;
|
|
1166
1208
|
React.useEffect(() => {
|
|
1167
1209
|
if (validation && !hasRegistered.current) {
|
|
1168
1210
|
hasRegistered.current = true;
|
|
@@ -1246,17 +1288,17 @@ var SmartBasicRichTextbox = ({
|
|
|
1246
1288
|
const handleBlur = () => {
|
|
1247
1289
|
setIsFocused(false);
|
|
1248
1290
|
};
|
|
1249
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className:
|
|
1291
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkMBC5TYXA_cjs.cn("flex-1 min-w-0", className), children: [
|
|
1250
1292
|
label && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2", children: [
|
|
1251
1293
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
1252
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1294
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkMBC5TYXA_cjs.Label, { className: "text-sm font-medium text-foreground", children: [
|
|
1253
1295
|
label,
|
|
1254
1296
|
" ",
|
|
1255
1297
|
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: "*" })
|
|
1256
1298
|
] }),
|
|
1257
|
-
info && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1258
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1259
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1299
|
+
info && /* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkMBC5TYXA_cjs.Tooltip, { children: [
|
|
1300
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4 text-muted-foreground cursor-pointer mr-2" }) }),
|
|
1301
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs", children: info }) })
|
|
1260
1302
|
] }) })
|
|
1261
1303
|
] }),
|
|
1262
1304
|
subLabel && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-1", children: subLabel })
|
|
@@ -1266,110 +1308,116 @@ var SmartBasicRichTextbox = ({
|
|
|
1266
1308
|
{
|
|
1267
1309
|
ref: fieldRef,
|
|
1268
1310
|
"data-field": field,
|
|
1269
|
-
className:
|
|
1311
|
+
className: chunkMBC5TYXA_cjs.cn(
|
|
1270
1312
|
"w-full rounded-md border border-input bg-background",
|
|
1271
1313
|
"focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",
|
|
1272
|
-
error && "border-destructive focus-within:ring-destructive"
|
|
1314
|
+
error && "border-destructive focus-within:ring-destructive",
|
|
1315
|
+
isDisabled && "cursor-not-allowed opacity-50"
|
|
1273
1316
|
),
|
|
1274
1317
|
children: [
|
|
1275
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-0.5 p-1.5 border-b border-border bg-muted/30", children: [
|
|
1276
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1277
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1278
|
-
|
|
1318
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkMBC5TYXA_cjs.cn("flex items-center gap-0.5 p-1.5 border-b border-border bg-muted/30", isDisabled && "pointer-events-none"), children: [
|
|
1319
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkMBC5TYXA_cjs.Tooltip, { children: [
|
|
1320
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1321
|
+
chunkTJ6EFR2O_cjs.Button,
|
|
1279
1322
|
{
|
|
1280
1323
|
type: "button",
|
|
1281
1324
|
variant: "ghost",
|
|
1282
1325
|
size: "sm",
|
|
1283
|
-
className:
|
|
1326
|
+
className: chunkMBC5TYXA_cjs.cn(
|
|
1284
1327
|
"h-8 w-8 p-0 hover:bg-accent hover:text-accent-foreground",
|
|
1285
1328
|
activeFormats.bold && "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
1286
1329
|
),
|
|
1287
1330
|
onClick: toggleBold,
|
|
1331
|
+
disabled: isDisabled,
|
|
1288
1332
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bold, { className: "h-4 w-4" })
|
|
1289
1333
|
}
|
|
1290
1334
|
) }),
|
|
1291
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1335
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Bold (Ctrl+B)" }) })
|
|
1292
1336
|
] }) }),
|
|
1293
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1294
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1295
|
-
|
|
1337
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkMBC5TYXA_cjs.Tooltip, { children: [
|
|
1338
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1339
|
+
chunkTJ6EFR2O_cjs.Button,
|
|
1296
1340
|
{
|
|
1297
1341
|
type: "button",
|
|
1298
1342
|
variant: "ghost",
|
|
1299
1343
|
size: "sm",
|
|
1300
|
-
className:
|
|
1344
|
+
className: chunkMBC5TYXA_cjs.cn(
|
|
1301
1345
|
"h-8 w-8 p-0 hover:bg-accent hover:text-accent-foreground",
|
|
1302
1346
|
activeFormats.italic && "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
1303
1347
|
),
|
|
1304
1348
|
onClick: toggleItalic,
|
|
1349
|
+
disabled: isDisabled,
|
|
1305
1350
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Italic, { className: "h-4 w-4" })
|
|
1306
1351
|
}
|
|
1307
1352
|
) }),
|
|
1308
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1353
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Italic (Ctrl+I)" }) })
|
|
1309
1354
|
] }) }),
|
|
1310
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1311
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1312
|
-
|
|
1355
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkMBC5TYXA_cjs.Tooltip, { children: [
|
|
1356
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1357
|
+
chunkTJ6EFR2O_cjs.Button,
|
|
1313
1358
|
{
|
|
1314
1359
|
type: "button",
|
|
1315
1360
|
variant: "ghost",
|
|
1316
1361
|
size: "sm",
|
|
1317
|
-
className:
|
|
1362
|
+
className: chunkMBC5TYXA_cjs.cn(
|
|
1318
1363
|
"h-8 w-8 p-0 hover:bg-accent hover:text-accent-foreground",
|
|
1319
1364
|
activeFormats.underline && "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
1320
1365
|
),
|
|
1321
1366
|
onClick: toggleUnderline,
|
|
1367
|
+
disabled: isDisabled,
|
|
1322
1368
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Underline, { className: "h-4 w-4" })
|
|
1323
1369
|
}
|
|
1324
1370
|
) }),
|
|
1325
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1371
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Underline (Ctrl+U)" }) })
|
|
1326
1372
|
] }) }),
|
|
1327
1373
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-5 bg-border mx-1" }),
|
|
1328
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1329
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1330
|
-
|
|
1374
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkMBC5TYXA_cjs.Tooltip, { children: [
|
|
1375
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1376
|
+
chunkTJ6EFR2O_cjs.Button,
|
|
1331
1377
|
{
|
|
1332
1378
|
type: "button",
|
|
1333
1379
|
variant: "ghost",
|
|
1334
1380
|
size: "sm",
|
|
1335
|
-
className:
|
|
1381
|
+
className: chunkMBC5TYXA_cjs.cn(
|
|
1336
1382
|
"h-8 w-8 p-0 hover:bg-accent hover:text-accent-foreground",
|
|
1337
1383
|
activeFormats.bulletList && "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
1338
1384
|
),
|
|
1339
1385
|
onClick: toggleBulletList,
|
|
1386
|
+
disabled: isDisabled,
|
|
1340
1387
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.List, { className: "h-4 w-4" })
|
|
1341
1388
|
}
|
|
1342
1389
|
) }),
|
|
1343
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1390
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Bullet List" }) })
|
|
1344
1391
|
] }) }),
|
|
1345
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1346
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1347
|
-
|
|
1392
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkMBC5TYXA_cjs.Tooltip, { children: [
|
|
1393
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1394
|
+
chunkTJ6EFR2O_cjs.Button,
|
|
1348
1395
|
{
|
|
1349
1396
|
type: "button",
|
|
1350
1397
|
variant: "ghost",
|
|
1351
1398
|
size: "sm",
|
|
1352
|
-
className:
|
|
1399
|
+
className: chunkMBC5TYXA_cjs.cn(
|
|
1353
1400
|
"h-8 w-8 p-0 hover:bg-accent hover:text-accent-foreground",
|
|
1354
1401
|
activeFormats.numberedList && "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
1355
1402
|
),
|
|
1356
1403
|
onClick: toggleNumberedList,
|
|
1404
|
+
disabled: isDisabled,
|
|
1357
1405
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ListOrdered, { className: "h-4 w-4" })
|
|
1358
1406
|
}
|
|
1359
1407
|
) }),
|
|
1360
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1408
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkMBC5TYXA_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Numbered List" }) })
|
|
1361
1409
|
] }) })
|
|
1362
1410
|
] }),
|
|
1363
1411
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1364
1412
|
"div",
|
|
1365
1413
|
{
|
|
1366
1414
|
ref: editorRef,
|
|
1367
|
-
contentEditable:
|
|
1415
|
+
contentEditable: !isDisabled,
|
|
1368
1416
|
onInput: handleInput,
|
|
1369
1417
|
onKeyDown: handleKeyDown,
|
|
1370
1418
|
onFocus: handleFocus,
|
|
1371
1419
|
onBlur: handleBlur,
|
|
1372
|
-
className:
|
|
1420
|
+
className: chunkMBC5TYXA_cjs.cn(
|
|
1373
1421
|
"w-full px-3 py-2 text-sm text-foreground",
|
|
1374
1422
|
"bg-background",
|
|
1375
1423
|
"focus:outline-none",
|
|
@@ -1401,39 +1449,39 @@ var SmartBasicRichTextbox = ({
|
|
|
1401
1449
|
|
|
1402
1450
|
Object.defineProperty(exports, "SmartCheckbox", {
|
|
1403
1451
|
enumerable: true,
|
|
1404
|
-
get: function () { return
|
|
1452
|
+
get: function () { return chunkTJ6EFR2O_cjs.SmartCheckbox; }
|
|
1405
1453
|
});
|
|
1406
1454
|
Object.defineProperty(exports, "SmartDatePicker", {
|
|
1407
1455
|
enumerable: true,
|
|
1408
|
-
get: function () { return
|
|
1456
|
+
get: function () { return chunkTJ6EFR2O_cjs.SmartDatePicker; }
|
|
1409
1457
|
});
|
|
1410
1458
|
Object.defineProperty(exports, "SmartRadioGroup", {
|
|
1411
1459
|
enumerable: true,
|
|
1412
|
-
get: function () { return
|
|
1460
|
+
get: function () { return chunkTJ6EFR2O_cjs.SmartRadioGroup; }
|
|
1413
1461
|
});
|
|
1414
1462
|
Object.defineProperty(exports, "SmartSelect", {
|
|
1415
1463
|
enumerable: true,
|
|
1416
|
-
get: function () { return
|
|
1464
|
+
get: function () { return chunkTJ6EFR2O_cjs.SmartSelect; }
|
|
1417
1465
|
});
|
|
1418
1466
|
Object.defineProperty(exports, "SmartTags", {
|
|
1419
1467
|
enumerable: true,
|
|
1420
|
-
get: function () { return
|
|
1468
|
+
get: function () { return chunkTJ6EFR2O_cjs.SmartTags; }
|
|
1421
1469
|
});
|
|
1422
1470
|
Object.defineProperty(exports, "SmartFormProvider", {
|
|
1423
1471
|
enumerable: true,
|
|
1424
|
-
get: function () { return
|
|
1472
|
+
get: function () { return chunkMBC5TYXA_cjs.SmartFormProvider; }
|
|
1425
1473
|
});
|
|
1426
1474
|
Object.defineProperty(exports, "SmartInput", {
|
|
1427
1475
|
enumerable: true,
|
|
1428
|
-
get: function () { return
|
|
1476
|
+
get: function () { return chunkMBC5TYXA_cjs.SmartInput; }
|
|
1429
1477
|
});
|
|
1430
1478
|
Object.defineProperty(exports, "useFormField", {
|
|
1431
1479
|
enumerable: true,
|
|
1432
|
-
get: function () { return
|
|
1480
|
+
get: function () { return chunkMBC5TYXA_cjs.useFormField; }
|
|
1433
1481
|
});
|
|
1434
1482
|
Object.defineProperty(exports, "useSmartForm", {
|
|
1435
1483
|
enumerable: true,
|
|
1436
|
-
get: function () { return
|
|
1484
|
+
get: function () { return chunkMBC5TYXA_cjs.useSmartForm; }
|
|
1437
1485
|
});
|
|
1438
1486
|
exports.SmartAutoSuggestTags = SmartAutoSuggestTags;
|
|
1439
1487
|
exports.SmartBasicRichTextbox = SmartBasicRichTextbox;
|