@algodomain/smart-forms 0.1.2 → 0.1.4

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.
Files changed (35) hide show
  1. package/LICENSE +3 -0
  2. package/README.md +243 -0
  3. package/dist/{SmartFormProvider-DyJoDBjQ.d.cts → SmartFormProvider-BdyRQakk.d.cts} +1 -0
  4. package/dist/{SmartFormProvider-DyJoDBjQ.d.ts → SmartFormProvider-BdyRQakk.d.ts} +1 -0
  5. package/dist/{SmartTags-HmvmCJPT.d.cts → SmartTags-DEpmTDF5.d.cts} +42 -18
  6. package/dist/{SmartTags-HmvmCJPT.d.ts → SmartTags-DEpmTDF5.d.ts} +42 -18
  7. package/dist/{chunk-KDPN4CHW.js → chunk-BNQNL7GF.js} +658 -145
  8. package/dist/chunk-BNQNL7GF.js.map +1 -0
  9. package/dist/{chunk-5LRBJEZW.js → chunk-RHECLW3K.js} +80 -7
  10. package/dist/chunk-RHECLW3K.js.map +1 -0
  11. package/dist/{chunk-CJ55WKPC.cjs → chunk-VGP3HY5Y.cjs} +758 -235
  12. package/dist/chunk-VGP3HY5Y.cjs.map +1 -0
  13. package/dist/{chunk-4H5U5IHH.cjs → chunk-WIBCOQPP.cjs} +80 -7
  14. package/dist/chunk-WIBCOQPP.cjs.map +1 -0
  15. package/dist/fields.cjs +212 -481
  16. package/dist/fields.cjs.map +1 -1
  17. package/dist/fields.d.cts +14 -22
  18. package/dist/fields.d.ts +14 -22
  19. package/dist/fields.js +66 -338
  20. package/dist/fields.js.map +1 -1
  21. package/dist/index.cjs +42 -30
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.cts +7 -3
  24. package/dist/index.d.ts +7 -3
  25. package/dist/index.js +17 -9
  26. package/dist/index.js.map +1 -1
  27. package/dist/opinionated.cjs +18 -18
  28. package/dist/opinionated.d.cts +1 -1
  29. package/dist/opinionated.d.ts +1 -1
  30. package/dist/opinionated.js +2 -2
  31. package/package.json +4 -2
  32. package/dist/chunk-4H5U5IHH.cjs.map +0 -1
  33. package/dist/chunk-5LRBJEZW.js.map +0 -1
  34. package/dist/chunk-CJ55WKPC.cjs.map +0 -1
  35. package/dist/chunk-KDPN4CHW.js.map +0 -1
package/dist/fields.cjs CHANGED
@@ -1,13 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkCJ55WKPC_cjs = require('./chunk-CJ55WKPC.cjs');
4
- var chunk4H5U5IHH_cjs = require('./chunk-4H5U5IHH.cjs');
5
- var React = require('react');
3
+ var chunkVGP3HY5Y_cjs = require('./chunk-VGP3HY5Y.cjs');
4
+ var chunkWIBCOQPP_cjs = require('./chunk-WIBCOQPP.cjs');
5
+ var React2 = require('react');
6
6
  var lucideReact = require('lucide-react');
7
- var cmdk = require('cmdk');
8
7
  var jsxRuntime = require('react/jsx-runtime');
9
- var reactSlot = require('@radix-ui/react-slot');
10
- var classVarianceAuthority = require('class-variance-authority');
11
8
  var SliderPrimitive = require('@radix-ui/react-slider');
12
9
 
13
10
  function _interopNamespace(e) {
@@ -28,319 +25,9 @@ function _interopNamespace(e) {
28
25
  return Object.freeze(n);
29
26
  }
30
27
 
31
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
28
+ var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
32
29
  var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
33
30
 
34
- function Command({
35
- className,
36
- ...props
37
- }) {
38
- return /* @__PURE__ */ jsxRuntime.jsx(
39
- cmdk.Command,
40
- {
41
- "data-slot": "command",
42
- className: chunk4H5U5IHH_cjs.cn(
43
- "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",
44
- className
45
- ),
46
- ...props
47
- }
48
- );
49
- }
50
- function CommandInput({
51
- className,
52
- ...props
53
- }) {
54
- return /* @__PURE__ */ jsxRuntime.jsxs(
55
- "div",
56
- {
57
- "data-slot": "command-input-wrapper",
58
- className: "flex h-9 items-center gap-2 border-b px-3",
59
- children: [
60
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
61
- /* @__PURE__ */ jsxRuntime.jsx(
62
- cmdk.Command.Input,
63
- {
64
- "data-slot": "command-input",
65
- className: chunk4H5U5IHH_cjs.cn(
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
- className
68
- ),
69
- ...props
70
- }
71
- )
72
- ]
73
- }
74
- );
75
- }
76
- function CommandList({
77
- className,
78
- ...props
79
- }) {
80
- return /* @__PURE__ */ jsxRuntime.jsx(
81
- cmdk.Command.List,
82
- {
83
- "data-slot": "command-list",
84
- className: chunk4H5U5IHH_cjs.cn(
85
- "max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",
86
- className
87
- ),
88
- ...props
89
- }
90
- );
91
- }
92
- function CommandEmpty({
93
- ...props
94
- }) {
95
- return /* @__PURE__ */ jsxRuntime.jsx(
96
- cmdk.Command.Empty,
97
- {
98
- "data-slot": "command-empty",
99
- className: "py-6 text-center text-sm",
100
- ...props
101
- }
102
- );
103
- }
104
- function CommandGroup({
105
- className,
106
- ...props
107
- }) {
108
- return /* @__PURE__ */ jsxRuntime.jsx(
109
- cmdk.Command.Group,
110
- {
111
- "data-slot": "command-group",
112
- className: chunk4H5U5IHH_cjs.cn(
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
- className
115
- ),
116
- ...props
117
- }
118
- );
119
- }
120
- function CommandItem({
121
- className,
122
- ...props
123
- }) {
124
- return /* @__PURE__ */ jsxRuntime.jsx(
125
- cmdk.Command.Item,
126
- {
127
- "data-slot": "command-item",
128
- className: chunk4H5U5IHH_cjs.cn(
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
- className
131
- ),
132
- ...props
133
- }
134
- );
135
- }
136
- var badgeVariants = classVarianceAuthority.cva(
137
- "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
138
- {
139
- variants: {
140
- variant: {
141
- default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
142
- secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
143
- destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
144
- outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
145
- }
146
- },
147
- defaultVariants: {
148
- variant: "default"
149
- }
150
- }
151
- );
152
- function Badge({
153
- className,
154
- variant,
155
- asChild = false,
156
- ...props
157
- }) {
158
- const Comp = asChild ? reactSlot.Slot : "span";
159
- return /* @__PURE__ */ jsxRuntime.jsx(
160
- Comp,
161
- {
162
- "data-slot": "badge",
163
- className: chunk4H5U5IHH_cjs.cn(badgeVariants({ variant }), className),
164
- ...props
165
- }
166
- );
167
- }
168
- function Combobox({
169
- options,
170
- value = "",
171
- onChange,
172
- placeholder = "Select option...",
173
- searchPlaceholder = "Search...",
174
- noResultsText = "No results found.",
175
- width = "100%",
176
- isDisabled = false,
177
- allowCustom = false
178
- }) {
179
- const [open, setOpen] = React__namespace.default.useState(false);
180
- const [searchValue, setSearchValue] = React.useState("");
181
- const containerStyles = {
182
- width
183
- };
184
- const combinedOptions = allowCustom ? [
185
- ...options,
186
- ...searchValue && !options.some(
187
- (opt) => opt.label.toLowerCase() === searchValue.toLowerCase()
188
- ) ? [
189
- {
190
- value: searchValue.toLowerCase().replace(/\s+/g, "-"),
191
- label: searchValue
192
- }
193
- ] : []
194
- ] : options;
195
- const filteredOptions = combinedOptions.filter(
196
- (option) => option.label.toLowerCase().includes(searchValue.toLowerCase())
197
- );
198
- return /* @__PURE__ */ jsxRuntime.jsx("div", { style: containerStyles, children: /* @__PURE__ */ jsxRuntime.jsxs(chunkCJ55WKPC_cjs.Popover, { open, onOpenChange: setOpen, children: [
199
- /* @__PURE__ */ jsxRuntime.jsx(chunkCJ55WKPC_cjs.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
200
- chunkCJ55WKPC_cjs.Button,
201
- {
202
- variant: "outline",
203
- role: "combobox",
204
- "aria-expanded": open,
205
- style: containerStyles,
206
- className: `flex items-center justify-between relative ${isDisabled ? "cursor-not-allowed opacity-50" : ""}`,
207
- disabled: isDisabled,
208
- children: [
209
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-w-0 text-left", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "truncate", children: value ? combinedOptions.find((option) => option.value === value)?.label || value : placeholder }) }),
210
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronsUpDown, { className: "ml-2 h-4 w-4 flex-shrink-0 opacity-50" })
211
- ]
212
- }
213
- ) }),
214
- /* @__PURE__ */ jsxRuntime.jsx(chunkCJ55WKPC_cjs.PopoverContent, { className: "w-[var(--radix-popover-trigger-width)] p-0", children: /* @__PURE__ */ jsxRuntime.jsxs(Command, { className: "w-full", children: [
215
- /* @__PURE__ */ jsxRuntime.jsx(
216
- CommandInput,
217
- {
218
- value: searchValue,
219
- onValueChange: setSearchValue,
220
- placeholder: searchPlaceholder,
221
- className: "h-9"
222
- }
223
- ),
224
- /* @__PURE__ */ jsxRuntime.jsx(CommandList, { children: filteredOptions.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(CommandGroup, { className: "max-h-[200px] overflow-y-auto", children: filteredOptions.map((option) => /* @__PURE__ */ jsxRuntime.jsxs(
225
- CommandItem,
226
- {
227
- value: option.value,
228
- onSelect: (currentValue) => {
229
- onChange(currentValue === value ? "" : currentValue);
230
- setOpen(false);
231
- setSearchValue("");
232
- },
233
- className: "flex items-center",
234
- style: { width: "100%" },
235
- children: [
236
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center w-full min-w-0", children: [
237
- /* @__PURE__ */ jsxRuntime.jsx(
238
- lucideReact.Check,
239
- {
240
- className: `mr-2 h-4 w-4 flex-shrink-0 ${value === option.value ? "opacity-100" : "opacity-0"}`
241
- }
242
- ),
243
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate flex-1", children: option.label })
244
- ] }),
245
- option.badge && /* @__PURE__ */ jsxRuntime.jsx(
246
- Badge,
247
- {
248
- variant: "outline",
249
- className: "ml-2 text-[10px] px-2 py-0 h-5 font-normal",
250
- children: option.badge
251
- }
252
- )
253
- ]
254
- },
255
- option.value
256
- )) }) : /* @__PURE__ */ jsxRuntime.jsxs(CommandEmpty, { children: [
257
- allowCustom && searchValue && /* @__PURE__ */ jsxRuntime.jsxs(
258
- chunkCJ55WKPC_cjs.Button,
259
- {
260
- variant: "ghost",
261
- className: "w-full justify-start",
262
- onClick: () => {
263
- const newOption = {
264
- value: searchValue.toLowerCase().replace(/\s+/g, "-")};
265
- onChange(newOption.value);
266
- setOpen(false);
267
- setSearchValue("");
268
- },
269
- children: [
270
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "mr-2 h-4 w-4" }),
271
- 'Add "',
272
- searchValue,
273
- '" as a new option'
274
- ]
275
- }
276
- ),
277
- !searchValue && noResultsText
278
- ] }) })
279
- ] }) })
280
- ] }) });
281
- }
282
- var SmartCombobox = ({
283
- field,
284
- label,
285
- options,
286
- className = "",
287
- placeholder,
288
- allowCustom = false,
289
- validation,
290
- required = false,
291
- defaultValue,
292
- info,
293
- subLabel
294
- }) => {
295
- const { value, error, onChange, fieldRef, registerValidation } = chunk4H5U5IHH_cjs.useFormField(field);
296
- const fieldDetection = chunk4H5U5IHH_cjs.useFieldDetection();
297
- const hasRegistered = React.useRef(false);
298
- const hasSetDefault = React.useRef(false);
299
- React.useEffect(() => {
300
- if (validation && !hasRegistered.current) {
301
- hasRegistered.current = true;
302
- registerValidation(field, validation);
303
- }
304
- }, [validation, field, registerValidation]);
305
- React.useEffect(() => {
306
- if (fieldDetection?.registerField) {
307
- fieldDetection.registerField(field);
308
- }
309
- }, [field, fieldDetection]);
310
- React.useEffect(() => {
311
- if (defaultValue !== void 0 && !hasSetDefault.current && (value === void 0 || value === null || value === "")) {
312
- onChange(defaultValue);
313
- hasSetDefault.current = true;
314
- }
315
- }, [defaultValue, value, onChange]);
316
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-1 min-w-0 ${className}`, children: [
317
- label && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2", children: [
318
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
319
- /* @__PURE__ */ jsxRuntime.jsxs(chunk4H5U5IHH_cjs.Label, { className: "text-sm font-medium text-foreground", children: [
320
- label,
321
- " ",
322
- required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: "*" })
323
- ] }),
324
- info && /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunk4H5U5IHH_cjs.Tooltip, { children: [
325
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4 text-muted-foreground cursor-pointer mr-2" }) }),
326
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs", children: info }) })
327
- ] }) })
328
- ] }),
329
- subLabel && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-1", children: subLabel })
330
- ] }),
331
- /* @__PURE__ */ jsxRuntime.jsx("div", { ref: fieldRef, "data-field": field, children: /* @__PURE__ */ jsxRuntime.jsx(
332
- Combobox,
333
- {
334
- options: (options || []).map((o) => ({ value: o.value, label: o.label })),
335
- value: value || "",
336
- onChange: (newValue) => onChange(newValue),
337
- placeholder: placeholder || (label ? `Select ${label.toLowerCase()}` : `Select ${field}`),
338
- allowCustom
339
- }
340
- ) }),
341
- error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-destructive text-sm mt-1", children: error })
342
- ] });
343
- };
344
31
  var SmartFileUpload = ({
345
32
  field,
346
33
  label,
@@ -357,37 +44,42 @@ var SmartFileUpload = ({
357
44
  onError,
358
45
  defaultValue,
359
46
  info,
360
- subLabel
47
+ subLabel,
48
+ disabled,
49
+ hidden
361
50
  }) => {
362
- const { value, error, onChange, fieldRef, registerValidation } = chunk4H5U5IHH_cjs.useFormField(field);
363
- const { registerSubmitHook, unregisterSubmitHook } = chunk4H5U5IHH_cjs.useSmartForm();
364
- const fieldDetection = chunk4H5U5IHH_cjs.useFieldDetection();
365
- const hasRegistered = React.useRef(false);
366
- const hasSetDefault = React.useRef(false);
367
- const inputRef = React.useRef(null);
368
- React.useEffect(() => {
51
+ const { formData, registerSubmitHook, unregisterSubmitHook } = chunkWIBCOQPP_cjs.useSmartForm();
52
+ const { value, error, onChange, fieldRef, registerValidation } = chunkWIBCOQPP_cjs.useFormField(field);
53
+ const fieldDetection = chunkWIBCOQPP_cjs.useFieldDetection();
54
+ const hasRegistered = React2.useRef(false);
55
+ const hasSetDefault = React2.useRef(false);
56
+ const inputRef = React2.useRef(null);
57
+ const isDisabled = typeof disabled === "function" ? disabled(formData) : disabled || false;
58
+ const isHidden = typeof hidden === "function" ? hidden(formData) : hidden || false;
59
+ if (isHidden) return null;
60
+ React2.useEffect(() => {
369
61
  if (validation && !hasRegistered.current) {
370
62
  hasRegistered.current = true;
371
63
  registerValidation(field, validation);
372
64
  }
373
65
  }, [validation, field, registerValidation]);
374
- React.useEffect(() => {
66
+ React2.useEffect(() => {
375
67
  if (fieldDetection?.registerField) {
376
68
  fieldDetection.registerField(field);
377
69
  }
378
70
  }, [field, fieldDetection]);
379
- React.useEffect(() => {
71
+ React2.useEffect(() => {
380
72
  if (defaultValue !== void 0 && !hasSetDefault.current && (value === void 0 || value === null || value === "")) {
381
73
  onChange(defaultValue);
382
74
  hasSetDefault.current = true;
383
75
  }
384
76
  }, [defaultValue, value, onChange]);
385
- const normalizedFiles = React.useMemo(() => {
77
+ const normalizedFiles = React2.useMemo(() => {
386
78
  const filesAny = Array.isArray(value) ? value : value ? [value] : [];
387
79
  return filesAny.filter((f) => f instanceof File);
388
80
  }, [value]);
389
- const [previewUrls, setPreviewUrls] = React.useState(/* @__PURE__ */ new Map());
390
- React.useEffect(() => {
81
+ const [previewUrls, setPreviewUrls] = React2.useState(/* @__PURE__ */ new Map());
82
+ React2.useEffect(() => {
391
83
  const newUrls = /* @__PURE__ */ new Map();
392
84
  normalizedFiles.forEach((file) => {
393
85
  if (file.type.startsWith("image/")) {
@@ -406,7 +98,7 @@ var SmartFileUpload = ({
406
98
  });
407
99
  setPreviewUrls(newUrls);
408
100
  }, [normalizedFiles]);
409
- React.useEffect(() => {
101
+ React2.useEffect(() => {
410
102
  return () => {
411
103
  previewUrls.forEach((url) => URL.revokeObjectURL(url));
412
104
  };
@@ -478,7 +170,7 @@ var SmartFileUpload = ({
478
170
  if (onError) onError(err);
479
171
  }
480
172
  };
481
- React.useEffect(() => {
173
+ React2.useEffect(() => {
482
174
  if (!uploadOnSelect || !uploadApi) return;
483
175
  const filesAny = Array.isArray(value) ? value : value ? [value] : [];
484
176
  const files = filesAny.filter((f) => f instanceof File);
@@ -486,7 +178,7 @@ var SmartFileUpload = ({
486
178
  void performUpload();
487
179
  }
488
180
  }, [value, uploadOnSelect, uploadApi]);
489
- React.useEffect(() => {
181
+ React2.useEffect(() => {
490
182
  const key = `smart-file-upload:${field}`;
491
183
  if (uploadApi && !uploadOnSelect) {
492
184
  registerSubmitHook(key, performUpload);
@@ -494,24 +186,24 @@ var SmartFileUpload = ({
494
186
  }
495
187
  return () => unregisterSubmitHook(key);
496
188
  }, [field, uploadApi, uploadOnSelect, registerSubmitHook, unregisterSubmitHook, value, multiple]);
497
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk4H5U5IHH_cjs.cn("flex-1 min-w-0", className), children: [
189
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWIBCOQPP_cjs.cn("flex-1 min-w-0", className), children: [
498
190
  label && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2", children: [
499
191
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
500
- /* @__PURE__ */ jsxRuntime.jsxs(chunk4H5U5IHH_cjs.Label, { className: "text-sm font-medium text-foreground", children: [
192
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkWIBCOQPP_cjs.Label, { className: "text-sm font-medium text-foreground", children: [
501
193
  label,
502
194
  " ",
503
195
  required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: "*" })
504
196
  ] }),
505
- info && /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunk4H5U5IHH_cjs.Tooltip, { children: [
506
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4 text-muted-foreground cursor-pointer mr-2" }) }),
507
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs", children: info }) })
197
+ info && /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkWIBCOQPP_cjs.Tooltip, { children: [
198
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4 text-muted-foreground cursor-pointer mr-2" }) }),
199
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs", children: info }) })
508
200
  ] }) })
509
201
  ] }),
510
202
  subLabel && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-1", children: subLabel })
511
203
  ] }),
512
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk4H5U5IHH_cjs.cn("flex items-center gap-2", error && "text-destructive"), children: [
204
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWIBCOQPP_cjs.cn("flex items-center gap-2", error && "text-destructive"), children: [
513
205
  /* @__PURE__ */ jsxRuntime.jsx(
514
- chunk4H5U5IHH_cjs.Input,
206
+ chunkWIBCOQPP_cjs.Input,
515
207
  {
516
208
  ref: (el) => {
517
209
  inputRef.current = el;
@@ -521,11 +213,12 @@ var SmartFileUpload = ({
521
213
  accept,
522
214
  multiple,
523
215
  onChange: onInputChange,
524
- className: chunk4H5U5IHH_cjs.cn(error && "border-destructive"),
525
- "data-field": field
216
+ className: chunkWIBCOQPP_cjs.cn(error && "border-destructive"),
217
+ "data-field": field,
218
+ disabled: isDisabled
526
219
  }
527
220
  ),
528
- (Array.isArray(value) ? value.length > 0 : !!value) && /* @__PURE__ */ jsxRuntime.jsx(chunkCJ55WKPC_cjs.Button, { type: "button", variant: "secondary", onClick: clearSelection, children: "Clear" })
221
+ (Array.isArray(value) ? value.length > 0 : !!value) && /* @__PURE__ */ jsxRuntime.jsx(chunkVGP3HY5Y_cjs.Button, { type: "button", variant: "secondary", onClick: clearSelection, disabled: isDisabled, children: "Clear" })
529
222
  ] }),
530
223
  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
224
  const isImage = f.type.startsWith("image/");
@@ -550,13 +243,14 @@ var SmartFileUpload = ({
550
243
  ] })
551
244
  ] }),
552
245
  /* @__PURE__ */ jsxRuntime.jsx(
553
- chunkCJ55WKPC_cjs.Button,
246
+ chunkVGP3HY5Y_cjs.Button,
554
247
  {
555
248
  type: "button",
556
249
  variant: "ghost",
557
250
  size: "sm",
558
251
  onClick: () => removeFileAt(idx),
559
252
  "aria-label": `Remove ${f.name}`,
253
+ disabled: isDisabled,
560
254
  children: "\u2715"
561
255
  }
562
256
  )
@@ -573,7 +267,7 @@ function Slider({
573
267
  max = 100,
574
268
  ...props
575
269
  }) {
576
- const _values = React__namespace.useMemo(
270
+ const _values = React2__namespace.useMemo(
577
271
  () => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
578
272
  [value, defaultValue, min, max]
579
273
  );
@@ -585,7 +279,7 @@ function Slider({
585
279
  value,
586
280
  min,
587
281
  max,
588
- className: chunk4H5U5IHH_cjs.cn(
282
+ className: chunkWIBCOQPP_cjs.cn(
589
283
  "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
284
  className
591
285
  ),
@@ -595,14 +289,14 @@ function Slider({
595
289
  SliderPrimitive__namespace.Track,
596
290
  {
597
291
  "data-slot": "slider-track",
598
- className: chunk4H5U5IHH_cjs.cn(
292
+ className: chunkWIBCOQPP_cjs.cn(
599
293
  "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
294
  ),
601
295
  children: /* @__PURE__ */ jsxRuntime.jsx(
602
296
  SliderPrimitive__namespace.Range,
603
297
  {
604
298
  "data-slot": "slider-range",
605
- className: chunk4H5U5IHH_cjs.cn(
299
+ className: chunkWIBCOQPP_cjs.cn(
606
300
  "bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full"
607
301
  )
608
302
  }
@@ -634,24 +328,30 @@ var SmartSlider = ({
634
328
  valueFormatter = (value) => value.toString(),
635
329
  defaultValue,
636
330
  info,
637
- subLabel
331
+ subLabel,
332
+ disabled,
333
+ hidden
638
334
  }) => {
639
- const { value, error, onChange, fieldRef, registerValidation } = chunk4H5U5IHH_cjs.useFormField(field);
640
- const fieldDetection = chunk4H5U5IHH_cjs.useFieldDetection();
641
- const hasRegistered = React.useRef(false);
642
- const hasSetDefault = React.useRef(false);
643
- React.useEffect(() => {
335
+ const { formData } = chunkWIBCOQPP_cjs.useSmartForm();
336
+ const { value, error, onChange, fieldRef, registerValidation } = chunkWIBCOQPP_cjs.useFormField(field);
337
+ const fieldDetection = chunkWIBCOQPP_cjs.useFieldDetection();
338
+ const hasRegistered = React2.useRef(false);
339
+ const hasSetDefault = React2.useRef(false);
340
+ const isDisabled = typeof disabled === "function" ? disabled(formData) : disabled || false;
341
+ const isHidden = typeof hidden === "function" ? hidden(formData) : hidden || false;
342
+ if (isHidden) return null;
343
+ React2.useEffect(() => {
644
344
  if (validation && !hasRegistered.current) {
645
345
  hasRegistered.current = true;
646
346
  registerValidation(field, validation);
647
347
  }
648
348
  }, [validation, field, registerValidation]);
649
- React.useEffect(() => {
349
+ React2.useEffect(() => {
650
350
  if (fieldDetection?.registerField) {
651
351
  fieldDetection.registerField(field);
652
352
  }
653
353
  }, [field, fieldDetection]);
654
- React.useEffect(() => {
354
+ React2.useEffect(() => {
655
355
  if (defaultValue !== void 0 && !hasSetDefault.current && (value === void 0 || value === null || value === "")) {
656
356
  onChange(defaultValue);
657
357
  hasSetDefault.current = true;
@@ -665,7 +365,7 @@ var SmartSlider = ({
665
365
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-1 min-w-0 ${className}`, children: [
666
366
  label && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2", children: [
667
367
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
668
- /* @__PURE__ */ jsxRuntime.jsxs(chunk4H5U5IHH_cjs.Label, { className: "text-sm font-medium text-foreground", children: [
368
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkWIBCOQPP_cjs.Label, { className: "text-sm font-medium text-foreground", children: [
669
369
  label,
670
370
  " ",
671
371
  required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: "*" }),
@@ -675,9 +375,9 @@ var SmartSlider = ({
675
375
  ")"
676
376
  ] })
677
377
  ] }),
678
- info && /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunk4H5U5IHH_cjs.Tooltip, { children: [
679
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4 text-muted-foreground cursor-pointer mr-2" }) }),
680
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs", children: info }) })
378
+ info && /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkWIBCOQPP_cjs.Tooltip, { children: [
379
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4 text-muted-foreground cursor-pointer mr-2" }) }),
380
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs", children: info }) })
681
381
  ] }) })
682
382
  ] }),
683
383
  subLabel && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-1", children: subLabel })
@@ -693,7 +393,8 @@ var SmartSlider = ({
693
393
  max,
694
394
  step,
695
395
  className: `w-full ${error ? "border-destructive" : ""}`,
696
- "data-field": field
396
+ "data-field": field,
397
+ disabled: isDisabled
697
398
  }
698
399
  ),
699
400
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between text-sm text-muted-foreground", children: [
@@ -722,40 +423,46 @@ var SmartDualRangeSlider = ({
722
423
  defaultMinValue,
723
424
  defaultMaxValue,
724
425
  info,
725
- subLabel
426
+ subLabel,
427
+ disabled,
428
+ hidden
726
429
  }) => {
727
- const minFormField = chunk4H5U5IHH_cjs.useFormField(minField);
728
- const maxFormField = chunk4H5U5IHH_cjs.useFormField(maxField);
729
- const fieldDetection = chunk4H5U5IHH_cjs.useFieldDetection();
730
- const hasRegisteredMin = React.useRef(false);
731
- const hasRegisteredMax = React.useRef(false);
732
- const hasSetDefaultMin = React.useRef(false);
733
- const hasSetDefaultMax = React.useRef(false);
734
- React.useEffect(() => {
430
+ const { formData } = chunkWIBCOQPP_cjs.useSmartForm();
431
+ const minFormField = chunkWIBCOQPP_cjs.useFormField(minField);
432
+ const maxFormField = chunkWIBCOQPP_cjs.useFormField(maxField);
433
+ const fieldDetection = chunkWIBCOQPP_cjs.useFieldDetection();
434
+ const hasRegisteredMin = React2.useRef(false);
435
+ const hasRegisteredMax = React2.useRef(false);
436
+ const hasSetDefaultMin = React2.useRef(false);
437
+ const hasSetDefaultMax = React2.useRef(false);
438
+ const isDisabled = typeof disabled === "function" ? disabled(formData) : disabled || false;
439
+ const isHidden = typeof hidden === "function" ? hidden(formData) : hidden || false;
440
+ if (isHidden) return null;
441
+ React2.useEffect(() => {
735
442
  if (minValidation && !hasRegisteredMin.current) {
736
443
  hasRegisteredMin.current = true;
737
444
  minFormField.registerValidation(minField, minValidation);
738
445
  }
739
446
  }, [minValidation, minField, minFormField]);
740
- React.useEffect(() => {
447
+ React2.useEffect(() => {
741
448
  if (maxValidation && !hasRegisteredMax.current) {
742
449
  hasRegisteredMax.current = true;
743
450
  maxFormField.registerValidation(maxField, maxValidation);
744
451
  }
745
452
  }, [maxValidation, maxField, maxFormField]);
746
- React.useEffect(() => {
453
+ React2.useEffect(() => {
747
454
  if (fieldDetection?.registerField) {
748
455
  fieldDetection.registerField(minField);
749
456
  fieldDetection.registerField(maxField);
750
457
  }
751
458
  }, [minField, maxField, fieldDetection]);
752
- React.useEffect(() => {
459
+ React2.useEffect(() => {
753
460
  if (defaultMinValue !== void 0 && !hasSetDefaultMin.current && (minFormField.value === void 0 || minFormField.value === null || minFormField.value === "")) {
754
461
  minFormField.onChange(defaultMinValue);
755
462
  hasSetDefaultMin.current = true;
756
463
  }
757
464
  }, [defaultMinValue, minFormField.value]);
758
- React.useEffect(() => {
465
+ React2.useEffect(() => {
759
466
  if (defaultMaxValue !== void 0 && !hasSetDefaultMax.current && (maxFormField.value === void 0 || maxFormField.value === null || maxFormField.value === "")) {
760
467
  maxFormField.onChange(defaultMaxValue);
761
468
  hasSetDefaultMax.current = true;
@@ -772,14 +479,14 @@ var SmartDualRangeSlider = ({
772
479
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-1 min-w-0 ${className}`, children: [
773
480
  label && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2", children: [
774
481
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
775
- /* @__PURE__ */ jsxRuntime.jsxs(chunk4H5U5IHH_cjs.Label, { className: "text-sm font-medium text-foreground", children: [
482
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkWIBCOQPP_cjs.Label, { className: "text-sm font-medium text-foreground", children: [
776
483
  label,
777
484
  " ",
778
485
  required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: "*" })
779
486
  ] }),
780
- info && /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunk4H5U5IHH_cjs.Tooltip, { children: [
781
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4 text-muted-foreground cursor-pointer mr-2" }) }),
782
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs", children: info }) })
487
+ info && /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkWIBCOQPP_cjs.Tooltip, { children: [
488
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4 text-muted-foreground cursor-pointer mr-2" }) }),
489
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs", children: info }) })
783
490
  ] }) })
784
491
  ] }),
785
492
  subLabel && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-1", children: subLabel })
@@ -796,7 +503,8 @@ var SmartDualRangeSlider = ({
796
503
  step,
797
504
  className: `w-full ${combinedError ? "border-destructive" : ""}`,
798
505
  "data-min-field": minField,
799
- "data-max-field": maxField
506
+ "data-max-field": maxField,
507
+ disabled: isDisabled
800
508
  }
801
509
  ),
802
510
  showValues && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center text-sm", children: [
@@ -815,7 +523,7 @@ var SmartDualRangeSlider = ({
815
523
  combinedError && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-destructive text-sm mt-1", children: combinedError })
816
524
  ] });
817
525
  };
818
- var TagsContext = React.createContext({
526
+ var TagsContext = React2.createContext({
819
527
  value: void 0,
820
528
  setValue: void 0,
821
529
  open: false,
@@ -825,7 +533,7 @@ var TagsContext = React.createContext({
825
533
  setWidth: void 0
826
534
  });
827
535
  var useTagsContext = () => {
828
- const context = React.useContext(TagsContext);
536
+ const context = React2.useContext(TagsContext);
829
537
  if (!context) {
830
538
  throw new Error("useTagsContext must be used within a TagsProvider");
831
539
  }
@@ -839,12 +547,12 @@ var Tags = ({
839
547
  children,
840
548
  className
841
549
  }) => {
842
- const [uncontrolledOpen, setUncontrolledOpen] = React.useState(false);
843
- const [width, setWidth] = React.useState();
844
- const ref = React.useRef(null);
550
+ const [uncontrolledOpen, setUncontrolledOpen] = React2.useState(false);
551
+ const [width, setWidth] = React2.useState();
552
+ const ref = React2.useRef(null);
845
553
  const open = controlledOpen ?? uncontrolledOpen;
846
554
  const onOpenChange = controlledOnOpenChange ?? setUncontrolledOpen;
847
- React.useEffect(() => {
555
+ React2.useEffect(() => {
848
556
  if (!ref.current) {
849
557
  return;
850
558
  }
@@ -860,7 +568,7 @@ var Tags = ({
860
568
  TagsContext.Provider,
861
569
  {
862
570
  value: { value, setValue, open, onOpenChange, width, setWidth },
863
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkCJ55WKPC_cjs.Popover, { onOpenChange, open, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk4H5U5IHH_cjs.cn("relative w-full", className), ref, children }) })
571
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkVGP3HY5Y_cjs.Popover, { onOpenChange, open, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkWIBCOQPP_cjs.cn("relative w-full", className), ref, children }) })
864
572
  }
865
573
  );
866
574
  };
@@ -868,10 +576,10 @@ var TagsTrigger = ({
868
576
  className,
869
577
  children,
870
578
  ...props
871
- }) => /* @__PURE__ */ jsxRuntime.jsx(chunkCJ55WKPC_cjs.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
872
- chunkCJ55WKPC_cjs.Button,
579
+ }) => /* @__PURE__ */ jsxRuntime.jsx(chunkVGP3HY5Y_cjs.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
580
+ chunkVGP3HY5Y_cjs.Button,
873
581
  {
874
- className: chunk4H5U5IHH_cjs.cn("h-auto w-full justify-between p-2", className),
582
+ className: chunkWIBCOQPP_cjs.cn("h-auto w-full justify-between p-2", className),
875
583
  role: "combobox",
876
584
  variant: "outline",
877
585
  ...props,
@@ -892,7 +600,7 @@ var TagsValue = ({
892
600
  event.stopPropagation();
893
601
  onRemove?.();
894
602
  };
895
- return /* @__PURE__ */ jsxRuntime.jsxs(Badge, { className: chunk4H5U5IHH_cjs.cn("flex items-center gap-2", className), ...props, children: [
603
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkVGP3HY5Y_cjs.Badge, { className: chunkWIBCOQPP_cjs.cn("flex items-center gap-2", className), ...props, children: [
896
604
  children,
897
605
  onRemove && // biome-ignore lint/a11y/noStaticElementInteractions: "This is a clickable badge"
898
606
  // biome-ignore lint/a11y/useKeyWithClickEvents: "This is a clickable badge"
@@ -913,27 +621,27 @@ var TagsContent = ({
913
621
  }) => {
914
622
  const { width } = useTagsContext();
915
623
  return /* @__PURE__ */ jsxRuntime.jsx(
916
- chunkCJ55WKPC_cjs.PopoverContent,
624
+ chunkVGP3HY5Y_cjs.PopoverContent,
917
625
  {
918
- className: chunk4H5U5IHH_cjs.cn("p-0", className),
626
+ className: chunkWIBCOQPP_cjs.cn("p-0", className),
919
627
  style: { width },
920
628
  ...props,
921
- children: /* @__PURE__ */ jsxRuntime.jsx(Command, { children })
629
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkVGP3HY5Y_cjs.Command, { children })
922
630
  }
923
631
  );
924
632
  };
925
- var TagsInput = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(CommandInput, { className: chunk4H5U5IHH_cjs.cn("h-9", className), ...props });
926
- var TagsList = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(CommandList, { className: chunk4H5U5IHH_cjs.cn("max-h-[200px]", className), ...props });
633
+ var TagsInput = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(chunkVGP3HY5Y_cjs.CommandInput, { className: chunkWIBCOQPP_cjs.cn("h-9", className), ...props });
634
+ var TagsList = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(chunkVGP3HY5Y_cjs.CommandList, { className: chunkWIBCOQPP_cjs.cn("max-h-[200px]", className), ...props });
927
635
  var TagsEmpty = ({
928
636
  children,
929
637
  className,
930
638
  ...props
931
- }) => /* @__PURE__ */ jsxRuntime.jsx(CommandEmpty, { ...props, children: children ?? "No tags found." });
932
- var TagsGroup = CommandGroup;
639
+ }) => /* @__PURE__ */ jsxRuntime.jsx(chunkVGP3HY5Y_cjs.CommandEmpty, { ...props, children: children ?? "No tags found." });
640
+ var TagsGroup = chunkVGP3HY5Y_cjs.CommandGroup;
933
641
  var TagsItem = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
934
- CommandItem,
642
+ chunkVGP3HY5Y_cjs.CommandItem,
935
643
  {
936
- className: chunk4H5U5IHH_cjs.cn("cursor-pointer items-center justify-between", className),
644
+ className: chunkWIBCOQPP_cjs.cn("cursor-pointer items-center justify-between", className),
937
645
  ...props
938
646
  }
939
647
  );
@@ -950,33 +658,39 @@ var SmartAutoSuggestTags = ({
950
658
  defaultValue,
951
659
  onTagCreate,
952
660
  info,
953
- subLabel
661
+ subLabel,
662
+ disabled,
663
+ hidden
954
664
  }) => {
955
- const { value, error, onChange, fieldRef, registerValidation } = chunk4H5U5IHH_cjs.useFormField(field);
956
- const fieldDetection = chunk4H5U5IHH_cjs.useFieldDetection();
957
- const hasRegistered = React.useRef(false);
958
- const hasSetDefault = React.useRef(false);
959
- const [tags, setTags] = React.useState(initialOptions);
960
- const [newTag, setNewTag] = React.useState("");
665
+ const { formData } = chunkWIBCOQPP_cjs.useSmartForm();
666
+ const { value, error, onChange, fieldRef, registerValidation } = chunkWIBCOQPP_cjs.useFormField(field);
667
+ const fieldDetection = chunkWIBCOQPP_cjs.useFieldDetection();
668
+ const hasRegistered = React2.useRef(false);
669
+ const hasSetDefault = React2.useRef(false);
670
+ const isDisabled = typeof disabled === "function" ? disabled(formData) : disabled || false;
671
+ const isHidden = typeof hidden === "function" ? hidden(formData) : hidden || false;
672
+ if (isHidden) return null;
673
+ const [tags, setTags] = React2.useState(initialOptions);
674
+ const [newTag, setNewTag] = React2.useState("");
961
675
  const selected = Array.isArray(value) ? value : [];
962
- React.useEffect(() => {
676
+ React2.useEffect(() => {
963
677
  if (validation && !hasRegistered.current) {
964
678
  hasRegistered.current = true;
965
679
  registerValidation(field, validation);
966
680
  }
967
681
  }, [validation, field, registerValidation]);
968
- React.useEffect(() => {
682
+ React2.useEffect(() => {
969
683
  if (fieldDetection?.registerField) {
970
684
  fieldDetection.registerField(field);
971
685
  }
972
686
  }, [field, fieldDetection]);
973
- React.useEffect(() => {
687
+ React2.useEffect(() => {
974
688
  if (defaultValue !== void 0 && !hasSetDefault.current && (!value || Array.isArray(value) && value.length === 0)) {
975
689
  onChange(defaultValue);
976
690
  hasSetDefault.current = true;
977
691
  }
978
692
  }, [defaultValue, value, onChange]);
979
- React.useEffect(() => {
693
+ React2.useEffect(() => {
980
694
  setTags(initialOptions);
981
695
  }, [initialOptions]);
982
696
  const handleRemove = (tagId) => {
@@ -1019,7 +733,7 @@ var SmartAutoSuggestTags = ({
1019
733
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-1 min-w-0 ${className}`, children: [
1020
734
  label && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2", children: [
1021
735
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
1022
- /* @__PURE__ */ jsxRuntime.jsxs(chunk4H5U5IHH_cjs.Label, { className: "text-sm font-medium text-foreground", children: [
736
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkWIBCOQPP_cjs.Label, { className: "text-sm font-medium text-foreground", children: [
1023
737
  label,
1024
738
  " ",
1025
739
  required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: "*" }),
@@ -1031,19 +745,20 @@ var SmartAutoSuggestTags = ({
1031
745
  ")"
1032
746
  ] })
1033
747
  ] }),
1034
- info && /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunk4H5U5IHH_cjs.Tooltip, { children: [
1035
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4 text-muted-foreground cursor-pointer mr-2" }) }),
1036
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs", children: info }) })
748
+ info && /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkWIBCOQPP_cjs.Tooltip, { children: [
749
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4 text-muted-foreground cursor-pointer mr-2" }) }),
750
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs", children: info }) })
1037
751
  ] }) })
1038
752
  ] }),
1039
753
  subLabel && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-1", children: subLabel })
1040
754
  ] }),
1041
- /* @__PURE__ */ jsxRuntime.jsx("div", { ref: fieldRef, "data-field": field, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunk4H5U5IHH_cjs.cn(
755
+ /* @__PURE__ */ jsxRuntime.jsx("div", { ref: fieldRef, "data-field": field, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: chunkWIBCOQPP_cjs.cn(
1042
756
  "w-full rounded-md border border-input bg-background text-sm ring-offset-background",
1043
757
  "focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",
1044
- error && "border-destructive focus-within:ring-destructive"
758
+ error && "border-destructive focus-within:ring-destructive",
759
+ isDisabled && "cursor-not-allowed opacity-50"
1045
760
  ), 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: [
761
+ /* @__PURE__ */ jsxRuntime.jsxs(TagsTrigger, { className: "w-full px-3 py-2 border-0 bg-transparent", disabled: isDisabled, children: [
1047
762
  selected.length === 0 && placeholder && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-sm", children: placeholder }),
1048
763
  selected.map((tagId) => {
1049
764
  const tag = tags.find((t) => t.id === tagId);
@@ -1064,7 +779,8 @@ var SmartAutoSuggestTags = ({
1064
779
  {
1065
780
  onValueChange: setNewTag,
1066
781
  placeholder: `Search ${placeholder.toLowerCase()}...`,
1067
- value: newTag
782
+ value: newTag,
783
+ disabled: isDisabled
1068
784
  }
1069
785
  ),
1070
786
  /* @__PURE__ */ jsxRuntime.jsxs(TagsList, { children: [
@@ -1155,32 +871,38 @@ var SmartBasicRichTextbox = ({
1155
871
  minHeight = "150px",
1156
872
  maxHeight = "400px",
1157
873
  info,
1158
- subLabel
874
+ subLabel,
875
+ disabled,
876
+ hidden
1159
877
  }) => {
1160
- const { value, error, onChange, fieldRef, registerValidation } = chunk4H5U5IHH_cjs.useFormField(field);
1161
- const fieldDetection = chunk4H5U5IHH_cjs.useFieldDetection();
1162
- const hasRegistered = React.useRef(false);
1163
- const hasSetDefault = React.useRef(false);
1164
- const editorRef = React.useRef(null);
1165
- const [isFocused, setIsFocused] = React.useState(false);
1166
- React.useEffect(() => {
878
+ const { formData } = chunkWIBCOQPP_cjs.useSmartForm();
879
+ const { value, error, onChange, fieldRef, registerValidation } = chunkWIBCOQPP_cjs.useFormField(field);
880
+ const fieldDetection = chunkWIBCOQPP_cjs.useFieldDetection();
881
+ const hasRegistered = React2.useRef(false);
882
+ const hasSetDefault = React2.useRef(false);
883
+ const editorRef = React2.useRef(null);
884
+ const [isFocused, setIsFocused] = React2.useState(false);
885
+ const isDisabled = typeof disabled === "function" ? disabled(formData) : disabled || false;
886
+ const isHidden = typeof hidden === "function" ? hidden(formData) : hidden || false;
887
+ if (isHidden) return null;
888
+ React2.useEffect(() => {
1167
889
  if (validation && !hasRegistered.current) {
1168
890
  hasRegistered.current = true;
1169
891
  registerValidation(field, validation);
1170
892
  }
1171
893
  }, [validation, field, registerValidation]);
1172
- React.useEffect(() => {
894
+ React2.useEffect(() => {
1173
895
  if (fieldDetection?.registerField) {
1174
896
  fieldDetection.registerField(field);
1175
897
  }
1176
898
  }, [field, fieldDetection]);
1177
- React.useEffect(() => {
899
+ React2.useEffect(() => {
1178
900
  if (defaultValue !== void 0 && !hasSetDefault.current && (value === void 0 || value === null || value === "")) {
1179
901
  onChange(defaultValue);
1180
902
  hasSetDefault.current = true;
1181
903
  }
1182
904
  }, [defaultValue, value, onChange]);
1183
- React.useEffect(() => {
905
+ React2.useEffect(() => {
1184
906
  if (editorRef.current && value !== void 0) {
1185
907
  const sanitized = sanitizeHtml(value || "");
1186
908
  if (editorRef.current.innerHTML !== sanitized) {
@@ -1188,21 +910,21 @@ var SmartBasicRichTextbox = ({
1188
910
  }
1189
911
  }
1190
912
  }, [value]);
1191
- const handleInput = React.useCallback(() => {
913
+ const handleInput = React2.useCallback(() => {
1192
914
  if (editorRef.current) {
1193
915
  const html = editorRef.current.innerHTML;
1194
916
  const sanitized = sanitizeHtml(html);
1195
917
  onChange(sanitized);
1196
918
  }
1197
919
  }, [onChange]);
1198
- const handleKeyDown = React.useCallback((e) => {
920
+ const handleKeyDown = React2.useCallback((e) => {
1199
921
  if (e.key === "Enter" && !e.shiftKey) {
1200
922
  e.preventDefault();
1201
923
  document.execCommand("insertParagraph", false);
1202
924
  return;
1203
925
  }
1204
926
  }, []);
1205
- const execCommand = React.useCallback((command, value2) => {
927
+ const execCommand = React2.useCallback((command, value2) => {
1206
928
  document.execCommand(command, false, value2);
1207
929
  editorRef.current?.focus();
1208
930
  handleInput();
@@ -1212,17 +934,17 @@ var SmartBasicRichTextbox = ({
1212
934
  const toggleUnderline = () => execCommand("underline");
1213
935
  const toggleBulletList = () => execCommand("insertUnorderedList");
1214
936
  const toggleNumberedList = () => execCommand("insertOrderedList");
1215
- const isFormatActive = React.useCallback((format) => {
937
+ const isFormatActive = React2.useCallback((format) => {
1216
938
  return document.queryCommandState(format);
1217
939
  }, []);
1218
- const [activeFormats, setActiveFormats] = React.useState({
940
+ const [activeFormats, setActiveFormats] = React2.useState({
1219
941
  bold: false,
1220
942
  italic: false,
1221
943
  underline: false,
1222
944
  bulletList: false,
1223
945
  numberedList: false
1224
946
  });
1225
- const updateActiveFormats = React.useCallback(() => {
947
+ const updateActiveFormats = React2.useCallback(() => {
1226
948
  if (isFocused) {
1227
949
  setActiveFormats({
1228
950
  bold: isFormatActive("bold"),
@@ -1233,7 +955,7 @@ var SmartBasicRichTextbox = ({
1233
955
  });
1234
956
  }
1235
957
  }, [isFocused, isFormatActive]);
1236
- React.useEffect(() => {
958
+ React2.useEffect(() => {
1237
959
  if (isFocused) {
1238
960
  document.addEventListener("selectionchange", updateActiveFormats);
1239
961
  return () => document.removeEventListener("selectionchange", updateActiveFormats);
@@ -1246,17 +968,17 @@ var SmartBasicRichTextbox = ({
1246
968
  const handleBlur = () => {
1247
969
  setIsFocused(false);
1248
970
  };
1249
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunk4H5U5IHH_cjs.cn("flex-1 min-w-0", className), children: [
971
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWIBCOQPP_cjs.cn("flex-1 min-w-0", className), children: [
1250
972
  label && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-2", children: [
1251
973
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
1252
- /* @__PURE__ */ jsxRuntime.jsxs(chunk4H5U5IHH_cjs.Label, { className: "text-sm font-medium text-foreground", children: [
974
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkWIBCOQPP_cjs.Label, { className: "text-sm font-medium text-foreground", children: [
1253
975
  label,
1254
976
  " ",
1255
977
  required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-destructive", children: "*" })
1256
978
  ] }),
1257
- info && /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunk4H5U5IHH_cjs.Tooltip, { children: [
1258
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4 text-muted-foreground cursor-pointer mr-2" }) }),
1259
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs", children: info }) })
979
+ info && /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkWIBCOQPP_cjs.Tooltip, { children: [
980
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4 text-muted-foreground cursor-pointer mr-2" }) }),
981
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs", children: info }) })
1260
982
  ] }) })
1261
983
  ] }),
1262
984
  subLabel && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-1", children: subLabel })
@@ -1266,110 +988,116 @@ var SmartBasicRichTextbox = ({
1266
988
  {
1267
989
  ref: fieldRef,
1268
990
  "data-field": field,
1269
- className: chunk4H5U5IHH_cjs.cn(
991
+ className: chunkWIBCOQPP_cjs.cn(
1270
992
  "w-full rounded-md border border-input bg-background",
1271
993
  "focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",
1272
- error && "border-destructive focus-within:ring-destructive"
994
+ error && "border-destructive focus-within:ring-destructive",
995
+ isDisabled && "cursor-not-allowed opacity-50"
1273
996
  ),
1274
997
  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(chunk4H5U5IHH_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunk4H5U5IHH_cjs.Tooltip, { children: [
1277
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1278
- chunkCJ55WKPC_cjs.Button,
998
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: chunkWIBCOQPP_cjs.cn("flex items-center gap-0.5 p-1.5 border-b border-border bg-muted/30", isDisabled && "pointer-events-none"), children: [
999
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkWIBCOQPP_cjs.Tooltip, { children: [
1000
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1001
+ chunkVGP3HY5Y_cjs.Button,
1279
1002
  {
1280
1003
  type: "button",
1281
1004
  variant: "ghost",
1282
1005
  size: "sm",
1283
- className: chunk4H5U5IHH_cjs.cn(
1006
+ className: chunkWIBCOQPP_cjs.cn(
1284
1007
  "h-8 w-8 p-0 hover:bg-accent hover:text-accent-foreground",
1285
1008
  activeFormats.bold && "bg-primary text-primary-foreground hover:bg-primary/90"
1286
1009
  ),
1287
1010
  onClick: toggleBold,
1011
+ disabled: isDisabled,
1288
1012
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bold, { className: "h-4 w-4" })
1289
1013
  }
1290
1014
  ) }),
1291
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Bold (Ctrl+B)" }) })
1015
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Bold (Ctrl+B)" }) })
1292
1016
  ] }) }),
1293
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunk4H5U5IHH_cjs.Tooltip, { children: [
1294
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1295
- chunkCJ55WKPC_cjs.Button,
1017
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkWIBCOQPP_cjs.Tooltip, { children: [
1018
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1019
+ chunkVGP3HY5Y_cjs.Button,
1296
1020
  {
1297
1021
  type: "button",
1298
1022
  variant: "ghost",
1299
1023
  size: "sm",
1300
- className: chunk4H5U5IHH_cjs.cn(
1024
+ className: chunkWIBCOQPP_cjs.cn(
1301
1025
  "h-8 w-8 p-0 hover:bg-accent hover:text-accent-foreground",
1302
1026
  activeFormats.italic && "bg-primary text-primary-foreground hover:bg-primary/90"
1303
1027
  ),
1304
1028
  onClick: toggleItalic,
1029
+ disabled: isDisabled,
1305
1030
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Italic, { className: "h-4 w-4" })
1306
1031
  }
1307
1032
  ) }),
1308
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Italic (Ctrl+I)" }) })
1033
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Italic (Ctrl+I)" }) })
1309
1034
  ] }) }),
1310
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunk4H5U5IHH_cjs.Tooltip, { children: [
1311
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1312
- chunkCJ55WKPC_cjs.Button,
1035
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkWIBCOQPP_cjs.Tooltip, { children: [
1036
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1037
+ chunkVGP3HY5Y_cjs.Button,
1313
1038
  {
1314
1039
  type: "button",
1315
1040
  variant: "ghost",
1316
1041
  size: "sm",
1317
- className: chunk4H5U5IHH_cjs.cn(
1042
+ className: chunkWIBCOQPP_cjs.cn(
1318
1043
  "h-8 w-8 p-0 hover:bg-accent hover:text-accent-foreground",
1319
1044
  activeFormats.underline && "bg-primary text-primary-foreground hover:bg-primary/90"
1320
1045
  ),
1321
1046
  onClick: toggleUnderline,
1047
+ disabled: isDisabled,
1322
1048
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Underline, { className: "h-4 w-4" })
1323
1049
  }
1324
1050
  ) }),
1325
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Underline (Ctrl+U)" }) })
1051
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Underline (Ctrl+U)" }) })
1326
1052
  ] }) }),
1327
1053
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-px h-5 bg-border mx-1" }),
1328
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunk4H5U5IHH_cjs.Tooltip, { children: [
1329
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1330
- chunkCJ55WKPC_cjs.Button,
1054
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkWIBCOQPP_cjs.Tooltip, { children: [
1055
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1056
+ chunkVGP3HY5Y_cjs.Button,
1331
1057
  {
1332
1058
  type: "button",
1333
1059
  variant: "ghost",
1334
1060
  size: "sm",
1335
- className: chunk4H5U5IHH_cjs.cn(
1061
+ className: chunkWIBCOQPP_cjs.cn(
1336
1062
  "h-8 w-8 p-0 hover:bg-accent hover:text-accent-foreground",
1337
1063
  activeFormats.bulletList && "bg-primary text-primary-foreground hover:bg-primary/90"
1338
1064
  ),
1339
1065
  onClick: toggleBulletList,
1066
+ disabled: isDisabled,
1340
1067
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.List, { className: "h-4 w-4" })
1341
1068
  }
1342
1069
  ) }),
1343
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Bullet List" }) })
1070
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Bullet List" }) })
1344
1071
  ] }) }),
1345
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunk4H5U5IHH_cjs.Tooltip, { children: [
1346
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1347
- chunkCJ55WKPC_cjs.Button,
1072
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(chunkWIBCOQPP_cjs.Tooltip, { children: [
1073
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1074
+ chunkVGP3HY5Y_cjs.Button,
1348
1075
  {
1349
1076
  type: "button",
1350
1077
  variant: "ghost",
1351
1078
  size: "sm",
1352
- className: chunk4H5U5IHH_cjs.cn(
1079
+ className: chunkWIBCOQPP_cjs.cn(
1353
1080
  "h-8 w-8 p-0 hover:bg-accent hover:text-accent-foreground",
1354
1081
  activeFormats.numberedList && "bg-primary text-primary-foreground hover:bg-primary/90"
1355
1082
  ),
1356
1083
  onClick: toggleNumberedList,
1084
+ disabled: isDisabled,
1357
1085
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ListOrdered, { className: "h-4 w-4" })
1358
1086
  }
1359
1087
  ) }),
1360
- /* @__PURE__ */ jsxRuntime.jsx(chunk4H5U5IHH_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Numbered List" }) })
1088
+ /* @__PURE__ */ jsxRuntime.jsx(chunkWIBCOQPP_cjs.TooltipContent, { children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Numbered List" }) })
1361
1089
  ] }) })
1362
1090
  ] }),
1363
1091
  /* @__PURE__ */ jsxRuntime.jsx(
1364
1092
  "div",
1365
1093
  {
1366
1094
  ref: editorRef,
1367
- contentEditable: true,
1095
+ contentEditable: !isDisabled,
1368
1096
  onInput: handleInput,
1369
1097
  onKeyDown: handleKeyDown,
1370
1098
  onFocus: handleFocus,
1371
1099
  onBlur: handleBlur,
1372
- className: chunk4H5U5IHH_cjs.cn(
1100
+ className: chunkWIBCOQPP_cjs.cn(
1373
1101
  "w-full px-3 py-2 text-sm text-foreground",
1374
1102
  "bg-background",
1375
1103
  "focus:outline-none",
@@ -1401,43 +1129,46 @@ var SmartBasicRichTextbox = ({
1401
1129
 
1402
1130
  Object.defineProperty(exports, "SmartCheckbox", {
1403
1131
  enumerable: true,
1404
- get: function () { return chunkCJ55WKPC_cjs.SmartCheckbox; }
1132
+ get: function () { return chunkVGP3HY5Y_cjs.SmartCheckbox; }
1133
+ });
1134
+ Object.defineProperty(exports, "SmartCombobox", {
1135
+ enumerable: true,
1136
+ get: function () { return chunkVGP3HY5Y_cjs.SmartCombobox; }
1405
1137
  });
1406
1138
  Object.defineProperty(exports, "SmartDatePicker", {
1407
1139
  enumerable: true,
1408
- get: function () { return chunkCJ55WKPC_cjs.SmartDatePicker; }
1140
+ get: function () { return chunkVGP3HY5Y_cjs.SmartDatePicker; }
1409
1141
  });
1410
1142
  Object.defineProperty(exports, "SmartRadioGroup", {
1411
1143
  enumerable: true,
1412
- get: function () { return chunkCJ55WKPC_cjs.SmartRadioGroup; }
1144
+ get: function () { return chunkVGP3HY5Y_cjs.SmartRadioGroup; }
1413
1145
  });
1414
1146
  Object.defineProperty(exports, "SmartSelect", {
1415
1147
  enumerable: true,
1416
- get: function () { return chunkCJ55WKPC_cjs.SmartSelect; }
1148
+ get: function () { return chunkVGP3HY5Y_cjs.SmartSelect; }
1417
1149
  });
1418
1150
  Object.defineProperty(exports, "SmartTags", {
1419
1151
  enumerable: true,
1420
- get: function () { return chunkCJ55WKPC_cjs.SmartTags; }
1152
+ get: function () { return chunkVGP3HY5Y_cjs.SmartTags; }
1421
1153
  });
1422
1154
  Object.defineProperty(exports, "SmartFormProvider", {
1423
1155
  enumerable: true,
1424
- get: function () { return chunk4H5U5IHH_cjs.SmartFormProvider; }
1156
+ get: function () { return chunkWIBCOQPP_cjs.SmartFormProvider; }
1425
1157
  });
1426
1158
  Object.defineProperty(exports, "SmartInput", {
1427
1159
  enumerable: true,
1428
- get: function () { return chunk4H5U5IHH_cjs.SmartInput; }
1160
+ get: function () { return chunkWIBCOQPP_cjs.SmartInput; }
1429
1161
  });
1430
1162
  Object.defineProperty(exports, "useFormField", {
1431
1163
  enumerable: true,
1432
- get: function () { return chunk4H5U5IHH_cjs.useFormField; }
1164
+ get: function () { return chunkWIBCOQPP_cjs.useFormField; }
1433
1165
  });
1434
1166
  Object.defineProperty(exports, "useSmartForm", {
1435
1167
  enumerable: true,
1436
- get: function () { return chunk4H5U5IHH_cjs.useSmartForm; }
1168
+ get: function () { return chunkWIBCOQPP_cjs.useSmartForm; }
1437
1169
  });
1438
1170
  exports.SmartAutoSuggestTags = SmartAutoSuggestTags;
1439
1171
  exports.SmartBasicRichTextbox = SmartBasicRichTextbox;
1440
- exports.SmartCombobox = SmartCombobox;
1441
1172
  exports.SmartDualRangeSlider = SmartDualRangeSlider;
1442
1173
  exports.SmartFileUpload = SmartFileUpload;
1443
1174
  exports.SmartSlider = SmartSlider;