dgz-ui-shared 1.2.25 → 1.2.26

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 (31) hide show
  1. package/dist/chunks/{MyInput-D7YcKmAW.cjs.js → MyInput-5ir4eN2m.cjs.js} +2 -2
  2. package/dist/chunks/{MyInput-D7YcKmAW.cjs.js.map → MyInput-5ir4eN2m.cjs.js.map} +1 -1
  3. package/dist/chunks/{MyInput-hXxWHsU8.es.js → MyInput-Cb0FlVxQ.es.js} +5 -5
  4. package/dist/chunks/{MyInput-hXxWHsU8.es.js.map → MyInput-Cb0FlVxQ.es.js.map} +1 -1
  5. package/dist/chunks/{MySelect-eb1yHL0a.es.js → MySelect-5DHBVlKZ.es.js} +5 -5
  6. package/dist/chunks/{MySelect-eb1yHL0a.es.js.map → MySelect-5DHBVlKZ.es.js.map} +1 -1
  7. package/dist/chunks/{MySelect-u4r_aMVc.cjs.js → MySelect-Dl3jKf5s.cjs.js} +2 -2
  8. package/dist/chunks/{MySelect-u4r_aMVc.cjs.js.map → MySelect-Dl3jKf5s.cjs.js.map} +1 -1
  9. package/dist/chunks/{PasswordConfirm-C3Xvi3EE.es.js → PasswordConfirm-Dj97U7O9.es.js} +2 -2
  10. package/dist/chunks/{PasswordConfirm-C3Xvi3EE.es.js.map → PasswordConfirm-Dj97U7O9.es.js.map} +1 -1
  11. package/dist/chunks/{PasswordConfirm-BmPW7K7v.cjs.js → PasswordConfirm-Uc4pncGw.cjs.js} +2 -2
  12. package/dist/chunks/{PasswordConfirm-BmPW7K7v.cjs.js.map → PasswordConfirm-Uc4pncGw.cjs.js.map} +1 -1
  13. package/dist/chunks/{Search-Ce5VAKq7.cjs.js → Search-CV30eaCb.cjs.js} +2 -2
  14. package/dist/chunks/{Search-Ce5VAKq7.cjs.js.map → Search-CV30eaCb.cjs.js.map} +1 -1
  15. package/dist/chunks/{Search-CMQLM3fQ.es.js → Search-RNMpIN4r.es.js} +3 -3
  16. package/dist/chunks/{Search-CMQLM3fQ.es.js.map → Search-RNMpIN4r.es.js.map} +1 -1
  17. package/dist/components/confirm/index.cjs.js +1 -1
  18. package/dist/components/confirm/index.es.js +1 -1
  19. package/dist/components/datatable/index.cjs.js +1 -1
  20. package/dist/components/datatable/index.es.js +1 -1
  21. package/dist/components/filters/index.cjs.js +1 -1
  22. package/dist/components/filters/index.es.js +1 -1
  23. package/dist/components/form/index.cjs.js +1 -1
  24. package/dist/components/form/index.cjs.js.map +1 -1
  25. package/dist/components/form/index.es.js +52 -51
  26. package/dist/components/form/index.es.js.map +1 -1
  27. package/dist/hooks/index.cjs.js +1 -1
  28. package/dist/hooks/index.es.js +1 -1
  29. package/dist/types/components/form/MyHtmlEditor.d.ts +1 -1
  30. package/dist/types/components/form/MyHtmlEditor.d.ts.map +1 -1
  31. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
- import { FormField as m, FormLabel as u, FormItem as N, FormControl as g, Checkbox as I, Input as w, FormMessage as p, HtmlEditor as C, MaskInput as S, RadioGroupItem as T, Switch as D, Textarea as R } from "dgz-ui/form";
1
+ import { FormField as m, FormLabel as u, FormItem as N, FormControl as g, Checkbox as P, Input as I, FormMessage as k, HtmlEditor as w, MaskInput as S, RadioGroupItem as T, Switch as D, Textarea as R } from "dgz-ui/form";
2
2
  export * from "dgz-ui/form";
3
3
  import { jsx as e, jsxs as t } from "react/jsx-runtime";
4
4
  import { useId as y } from "react";
5
- import { DATE as E, Calendar as $, TimePicker as f } from "dgz-ui/calendar";
5
+ import { DATE as E, Calendar as $, TimePicker as C } from "dgz-ui/calendar";
6
6
  import { Popover as j, PopoverTrigger as z, PopoverContent as A } from "dgz-ui/popover";
7
7
  import { cn as h, dayjs as H } from "dgz-ui/utils";
8
8
  import { l as x } from "../../chunks/lodash-CRDOWzbs.es.js";
9
9
  import { Calendar1 as G } from "lucide-react";
10
10
  import { D as L } from "../../chunks/DateRangePicker-DeoV3xqL.es.js";
11
- import { M as ie } from "../../chunks/MyInput-hXxWHsU8.es.js";
12
- import { M as oe } from "../../chunks/MySelect-eb1yHL0a.es.js";
11
+ import { M as ie } from "../../chunks/MyInput-Cb0FlVxQ.es.js";
12
+ import { M as oe } from "../../chunks/MySelect-5DHBVlKZ.es.js";
13
13
  const W = ({
14
14
  control: a,
15
15
  name: r,
@@ -26,7 +26,7 @@ const W = ({
26
26
  rules: i,
27
27
  render: ({ field: n }) => /* @__PURE__ */ e(u, { className: "block", htmlFor: c.id || l, children: /* @__PURE__ */ t(N, { className: "flex flex-row items-start gap-3", children: [
28
28
  /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(
29
- I,
29
+ P,
30
30
  {
31
31
  id: c.id || l,
32
32
  checked: n.value,
@@ -48,37 +48,37 @@ const W = ({
48
48
  floatingError: n,
49
49
  placeholder: d,
50
50
  disabled: o,
51
- register: k,
52
- className: M,
53
- inputProps: b,
54
- ...F
51
+ register: p,
52
+ className: f,
53
+ inputProps: M,
54
+ ...b
55
55
  }) => r && a && /* @__PURE__ */ e(
56
56
  m,
57
57
  {
58
58
  control: a,
59
59
  name: r,
60
60
  rules: c,
61
- render: ({ field: v, formState: P }) => /* @__PURE__ */ t(N, { children: [
61
+ render: ({ field: v, formState: F }) => /* @__PURE__ */ t(N, { children: [
62
62
  s && /* @__PURE__ */ t(u, { className: "block", children: [
63
63
  s,
64
64
  " ",
65
65
  i && /* @__PURE__ */ e("span", { className: "text-red-600", children: "*" })
66
66
  ] }),
67
67
  /* @__PURE__ */ t(j, { children: [
68
- /* @__PURE__ */ e(z, { asChild: !0, children: /* @__PURE__ */ e(g, { children: /* @__PURE__ */ t("div", { className: "relative", children: [
69
- /* @__PURE__ */ e(
70
- w,
68
+ /* @__PURE__ */ e(z, { asChild: !0, children: /* @__PURE__ */ t("div", { className: "relative", children: [
69
+ /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(
70
+ I,
71
71
  {
72
- ...b,
73
- variant: x.get(P.errors, `${r}.message`) ? "failure" : "default",
72
+ ...M,
73
+ variant: x.get(F.errors, `${r}.message`) ? "failure" : "default",
74
74
  disabled: o,
75
75
  ...v,
76
76
  readOnly: !0,
77
77
  placeholder: d || "Pick a date",
78
78
  value: H(v.value).format(l),
79
- className: h("m-0 text-start", M)
79
+ className: h("m-0 text-start", f)
80
80
  }
81
- ),
81
+ ) }),
82
82
  /* @__PURE__ */ e(
83
83
  G,
84
84
  {
@@ -89,16 +89,16 @@ const W = ({
89
89
  }
90
90
  ),
91
91
  /* @__PURE__ */ e(
92
- p,
92
+ k,
93
93
  {
94
94
  className: h(n && "absolute -bottom-5")
95
95
  }
96
96
  )
97
- ] }) }) }),
97
+ ] }) }),
98
98
  !o && /* @__PURE__ */ e(A, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ e(
99
99
  $,
100
100
  {
101
- ...F,
101
+ ...b,
102
102
  mode: "single",
103
103
  selected: v.value,
104
104
  onSelect: v.onChange
@@ -122,30 +122,30 @@ const W = ({
122
122
  control: a,
123
123
  name: r,
124
124
  rules: c,
125
- render: ({ field: o, formState: k }) => /* @__PURE__ */ t(N, { children: [
125
+ render: ({ field: o, formState: p }) => /* @__PURE__ */ t(N, { children: [
126
126
  s && /* @__PURE__ */ t(u, { className: "block", children: [
127
127
  s,
128
128
  " ",
129
129
  i && /* @__PURE__ */ e("span", { className: "text-red-600", children: "*" })
130
130
  ] }),
131
- /* @__PURE__ */ e(g, { children: /* @__PURE__ */ t("div", { children: [
132
- /* @__PURE__ */ e(
131
+ /* @__PURE__ */ t("div", { children: [
132
+ /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(
133
133
  L,
134
134
  {
135
135
  ...d,
136
- error: `${x.get(k.errors, r, "")}`,
136
+ error: `${x.get(p.errors, r, "")}`,
137
137
  selected: o.value,
138
138
  onRangeSelected: o.onChange,
139
139
  placeholder: l
140
140
  }
141
- ),
141
+ ) }),
142
142
  /* @__PURE__ */ e(
143
- p,
143
+ k,
144
144
  {
145
145
  className: h(n && "absolute -bottom-5")
146
146
  }
147
147
  )
148
- ] }) })
148
+ ] })
149
149
  ] })
150
150
  }
151
151
  ) || null, Z = ({
@@ -156,7 +156,7 @@ const W = ({
156
156
  required: c,
157
157
  floatingError: l,
158
158
  ...n
159
- }) => r && a ? /* @__PURE__ */ e(
159
+ }) => r && a && /* @__PURE__ */ e(
160
160
  m,
161
161
  {
162
162
  control: a,
@@ -168,18 +168,18 @@ const W = ({
168
168
  " ",
169
169
  c && /* @__PURE__ */ e("span", { className: "text-red-600", children: "*" })
170
170
  ] }),
171
- /* @__PURE__ */ e(g, { children: /* @__PURE__ */ t("div", { children: [
172
- /* @__PURE__ */ e(C, { ...d, ...n }),
171
+ /* @__PURE__ */ t("div", { children: [
172
+ /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(w, { ...d, ...n }) }),
173
173
  /* @__PURE__ */ e(
174
- p,
174
+ k,
175
175
  {
176
176
  className: h(l && "absolute -bottom-5")
177
177
  }
178
178
  )
179
- ] }) })
179
+ ] })
180
180
  ] })
181
181
  }
182
- ) : /* @__PURE__ */ e(C, { ...n }), ee = ({
182
+ ) || null, ee = ({
183
183
  control: a,
184
184
  name: r,
185
185
  label: s,
@@ -199,8 +199,8 @@ const W = ({
199
199
  " ",
200
200
  c && /* @__PURE__ */ e("span", { className: "text-red-600", children: "*" })
201
201
  ] }),
202
- /* @__PURE__ */ e(g, { children: /* @__PURE__ */ t("div", { children: [
203
- /* @__PURE__ */ e(
202
+ /* @__PURE__ */ t("div", { children: [
203
+ /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(
204
204
  S,
205
205
  {
206
206
  thousandsSeparator: " ",
@@ -210,16 +210,16 @@ const W = ({
210
210
  ...d,
211
211
  ...n,
212
212
  variant: x.get(o.errors, `${r}.message`) ? "failure" : "default",
213
- onAccept: (k) => d.onChange(k)
213
+ onAccept: (p) => d.onChange(p)
214
214
  }
215
- ),
215
+ ) }),
216
216
  /* @__PURE__ */ e(
217
- p,
217
+ k,
218
218
  {
219
219
  className: h(l && "absolute -bottom-5")
220
220
  }
221
221
  )
222
- ] }) })
222
+ ] })
223
223
  ] })
224
224
  }
225
225
  ) || null, re = ({
@@ -298,29 +298,29 @@ const W = ({
298
298
  control: a,
299
299
  name: r,
300
300
  rules: c,
301
- render: ({ field: o, formState: k }) => /* @__PURE__ */ t(N, { children: [
301
+ render: ({ field: o, formState: p }) => /* @__PURE__ */ t(N, { children: [
302
302
  s && /* @__PURE__ */ t(u, { className: "block", children: [
303
303
  s,
304
304
  " ",
305
305
  i && /* @__PURE__ */ e("span", { className: "text-red-600", children: "*" })
306
306
  ] }),
307
- /* @__PURE__ */ e(g, { children: /* @__PURE__ */ t("div", { children: [
308
- /* @__PURE__ */ e(
307
+ /* @__PURE__ */ t("div", { children: [
308
+ /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(
309
309
  R,
310
310
  {
311
- variant: x.get(k.errors, `${r}.message`) ? "failure" : "default",
311
+ variant: x.get(p.errors, `${r}.message`) ? "failure" : "default",
312
312
  ...d,
313
313
  ...o,
314
314
  className: h(l)
315
315
  }
316
- ),
316
+ ) }),
317
317
  /* @__PURE__ */ e(
318
- p,
318
+ k,
319
319
  {
320
320
  className: h(n && "absolute -bottom-5")
321
321
  }
322
322
  )
323
- ] }) })
323
+ ] })
324
324
  ] })
325
325
  }
326
326
  ) || null, ce = ({
@@ -344,18 +344,19 @@ const W = ({
344
344
  " ",
345
345
  i && /* @__PURE__ */ e("span", { className: "text-red-600", children: "*" })
346
346
  ] }),
347
- /* @__PURE__ */ e(g, { children: /* @__PURE__ */ t("div", { children: [
348
- /* @__PURE__ */ e(f, { ...o, ...d }),
347
+ " ",
348
+ /* @__PURE__ */ t("div", { children: [
349
+ /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(C, { ...o, ...d }) }),
349
350
  /* @__PURE__ */ e(
350
- p,
351
+ k,
351
352
  {
352
353
  className: h(n && "absolute -bottom-5")
353
354
  }
354
355
  )
355
- ] }) })
356
+ ] })
356
357
  ] })
357
358
  }
358
- ) : /* @__PURE__ */ e(f, { className: "mt-2", ...d });
359
+ ) : /* @__PURE__ */ e(C, { className: "mt-2", ...d });
359
360
  export {
360
361
  W as MyCheckbox,
361
362
  X as MyDatePicker,
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../../../src/components/form/MyCheckbox.tsx","../../../src/components/form/MyDatePicker.tsx","../../../src/components/form/MyDateRangePicker.tsx","../../../src/components/form/MyHtmlEditor.tsx","../../../src/components/form/MyMaskInput.tsx","../../../src/components/form/MyRadio.tsx","../../../src/components/form/MySwitch.tsx","../../../src/components/form/MyTextarea.tsx","../../../src/components/form/MyTimePicker.tsx"],"sourcesContent":["import {\n Checkbox,\n type CheckboxProps,\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n} from 'dgz-ui/form';\nimport { useId } from 'react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyCheckbox component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyCheckboxProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & CheckboxProps;\n\n/**\n * MyCheckbox is a checkbox component with optional react-hook-form integration.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the checkbox.\n * @param rules - The `react-hook-form` validation rules.\n * @param props - Checkbox and form item props.\n * @returns A checkbox component wrapped with form handling logic.\n */\nexport const MyCheckbox = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n ...props\n}: MyCheckboxProps<TFieldValues>) => {\n const id = useId();\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormLabel className={'block'} htmlFor={props.id || id}>\n <FormItem className=\"flex flex-row items-start gap-3\">\n <FormControl>\n <Checkbox\n id={props.id || id}\n checked={field.value}\n onCheckedChange={field.onChange}\n {...props}\n />\n </FormControl>\n <div className=\"space-y-1 leading-none\">\n {label && <div>{label}</div>}\n </div>\n </FormItem>\n </FormLabel>\n )}\n />\n )) ||\n null\n );\n};\n","import { Calendar, type CalendarProps, DATE } from 'dgz-ui/calendar';\nimport {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n Input,\n type InputProps,\n} from 'dgz-ui/form';\nimport { Popover, PopoverContent, PopoverTrigger } from 'dgz-ui/popover';\nimport { cn, dayjs } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport { Calendar1 } from 'lucide-react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyDatePicker component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyDatePickerProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n Omit<CalendarProps, 'mode' | 'disabled'> & {\n /** Date format string for display. */\n format?: string;\n inputProps?: Omit<InputProps, 'onSelect'>;\n placeholder?: string;\n disabled?: boolean;\n };\n\n/**\n * MyDatePicker shows a calendar popover to pick a single date, integrated with react-hook-form.\n * Can also be used standalone when no control/name are provided.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the date picker.\n * @param required - Whether the field is required.\n * @param rules - The `react-hook-form` validation rules.\n * @param format - The date format for display.\n * @param placeholder - The placeholder text when no date selected.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param register - The `react-hook-form` register function.\n * @param disabled - Whether the date picker is disabled.\n * @param className - Additional CSS classes.\n * @param inputProps - Props passed to the underlying Input component.\n * @param props - Calendar, button and form item props.\n * @returns A date picker component integrated with react-hook-form.\n */\nexport const MyDatePicker = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n rules,\n format = DATE,\n floatingError,\n placeholder,\n disabled,\n register,\n className,\n inputProps,\n ...props\n}: MyDatePickerProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <Popover>\n <PopoverTrigger asChild>\n <FormControl>\n <div className={'relative'}>\n <Input\n {...inputProps}\n variant={\n get(formState.errors, `${name}.message`)\n ? 'failure'\n : 'default'\n }\n disabled={disabled}\n {...field}\n readOnly\n placeholder={placeholder || 'Pick a date'}\n value={dayjs(field.value).format(format)}\n className={cn('m-0 text-start', className)}\n />\n <Calendar1\n className={cn(\n 'text-secondary absolute top-2.5 right-2 size-5',\n disabled && 'pointer-events-none opacity-50'\n )}\n />\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </FormControl>\n </PopoverTrigger>\n {!disabled && (\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\n <Calendar\n {...props}\n mode=\"single\"\n selected={field.value}\n onSelect={field.onChange}\n />\n </PopoverContent>\n )}\n </Popover>\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\nimport { DateRangePicker, type DateRangePickerProps } from '../datepicker';\n\n/**\n * Props for the MyDateRangePicker component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyDateRangePickerProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n Omit<DateRangePickerProps, 'required'> & {\n required?: boolean;\n };\n\n/**\n * MyDateRangePicker renders a date range selector integrated with react-hook-form.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the date range picker.\n * @param required - Whether the field is required.\n * @param rules - The `react-hook-form` validation rules.\n * @param format - The date format for display.\n * @param placeholder - The placeholder text when no date is selected.\n * @param props - DateRangePicker props and form item props.\n * @returns A date range picker integrated with react-hook-form.\n */\nexport const MyDateRangePicker = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n rules,\n placeholder,\n floatingError,\n ...props\n}: MyDateRangePickerProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <FormControl>\n <div>\n <DateRangePicker\n {...props}\n error={`${get(formState.errors, name, '')}`}\n selected={field.value}\n onRangeSelected={field.onChange}\n placeholder={placeholder}\n />\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </FormControl>\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n HtmlEditor,\n type HtmlEditorProps,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyHtmlEditor component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyHtmlEditorProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n HtmlEditorProps & {\n /** Whether the field is required. */\n required?: boolean;\n };\n\n/**\n * MyHtmlEditor is a rich-text HTML editor with optional react-hook-form integration.\n * Works in both controlled (with control/name) and uncontrolled modes.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the HTML editor.\n * @param rules - The `react-hook-form` validation rules.\n * @param required - Whether the field is required.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - HtmlEditor and form item props.\n * @returns React element rendering an HtmlEditor with label, helper text, and validation message.\n */\nexport const MyHtmlEditor = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n required,\n floatingError,\n ...props\n}: MyHtmlEditorProps<TFieldValues>) => {\n return name && control ? (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <FormControl>\n <div>\n <HtmlEditor {...field} {...props} />\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </FormControl>\n </FormItem>\n )}\n />\n ) : (\n <HtmlEditor {...props} />\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n MaskInput,\n type MaskInputProps,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyMaskInput component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyMaskInputProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n MaskInputProps & {\n /** Whether the field is required. */\n required?: boolean;\n };\n\n/**\n * MyMaskInput is an input component with masking support and optional react-hook-form integration.\n * Works in both controlled (with control/name) and uncontrolled modes. By default it uses a space as\n * thousands separator, underscores as placeholder characters, lazy formatting disabled, and returns\n * unmasked value on change.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the mask input.\n * @param rules - The `react-hook-form` validation rules.\n * @param required - Whether the field is required.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - MaskInput and form item props.\n * @returns React element rendering a masked input with label, helper text, and validation message.\n */\nexport const MyMaskInput = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n required,\n floatingError,\n ...props\n}: MyMaskInputProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <FormControl>\n <div>\n <MaskInput\n thousandsSeparator={' '}\n lazy={false}\n placeholderChar=\"_\"\n unmask\n {...field}\n {...props}\n variant={\n get(formState.errors, `${name}.message`)\n ? 'failure'\n : 'default'\n }\n onAccept={(value) => field.onChange(value)}\n />\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </FormControl>\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n RadioGroupItem,\n} from 'dgz-ui/form';\nimport React, { useId } from 'react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\ntype RadioItemProps = React.ComponentPropsWithoutRef<typeof RadioGroupItem>;\n\n/**\n * Props for the MyRadio component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyRadioProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & RadioItemProps;\n\n/**\n * MyRadio is a radio input that can integrate with react-hook-form when control and name are provided.\n * Falls back to an uncontrolled radio item when not used inside a form.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the radio input.\n * @param rules - The `react-hook-form` validation rules.\n * @param value - The value of the radio input.\n * @param props - Radio item and form item props.\n * @returns A radio button item.\n */\nconst MyRadio = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n value,\n ...props\n}: MyRadioProps<TFieldValues>) => {\n const id = useId();\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormLabel className={'block'} htmlFor={props.id || id}>\n <FormItem className=\"flex flex-row items-start gap-3\">\n <FormControl>\n <RadioGroupItem\n id={props.id || id}\n value={value}\n checked={field.value === value}\n onClick={() => {\n if (field.value !== value) {\n field.onChange(value);\n }\n }}\n {...props}\n />\n </FormControl>\n <div className=\"space-y-1 leading-none\">\n {label && <div>{label}</div>}\n </div>\n </FormItem>\n </FormLabel>\n )}\n />\n )) ||\n null\n );\n};\n\nexport { MyRadio };\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n Switch,\n type SwitchProps,\n} from 'dgz-ui/form';\nimport { useId } from 'react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MySwitch component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MySwitchProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & SwitchProps;\n\n/**\n * MySwitch is a toggle switch with optional react-hook-form integration.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the switch.\n * @param rules - The `react-hook-form` validation rules.\n * @param props - Switch and form item props.\n * @returns A toggle switch component, or null if name or control are missing.\n */\nexport const MySwitch = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n ...props\n}: MySwitchProps<TFieldValues>) => {\n const id = useId();\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormLabel className={'block'} htmlFor={props.id || id}>\n <FormItem className=\"flex flex-row items-start gap-3\">\n <FormControl>\n <Switch\n id={props.id || id}\n className={'m-0'}\n checked={field.value}\n onCheckedChange={field.onChange}\n {...props}\n />\n </FormControl>\n <div className=\"space-y-1 leading-none\">\n {label && <div>{label}</div>}\n </div>\n </FormItem>\n </FormLabel>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n Textarea,\n type TextareaProps,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyTextarea component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyTextareaProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & TextareaProps;\n\n/**\n * MyTextarea is a textarea component with optional react-hook-form integration.\n * Supports floating error message styling.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the textarea.\n * @param required - Whether the field is required.\n * @param rules - The `react-hook-form` validation rules.\n * @param className - Custom CSS class name.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - Textarea and form item props.\n * @returns A textarea component integrated with react-hook-form.\n */\nexport const MyTextarea = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n rules,\n className,\n floatingError,\n ...props\n}: MyTextareaProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <FormControl>\n <div>\n <Textarea\n variant={\n get(formState.errors, `${name}.message`)\n ? 'failure'\n : 'default'\n }\n {...props}\n {...field}\n className={cn(className)}\n />\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </FormControl>\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import { TimePicker, type TimePickerProps } from 'dgz-ui/calendar';\nimport {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyTimePicker component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyTimePickerProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n TimePickerProps & {\n /** Whether the field is required. */\n required?: boolean;\n /** Custom CSS class name. */\n className?: string;\n };\n\n/**\n * MyTimePicker is a time selection input with optional react-hook-form integration.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the time picker.\n * @param required - Whether the field is required.\n * @param className - Custom CSS class name.\n * @param rules - The `react-hook-form` validation rules.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - TimePicker and form item props.\n * @returns A time picker component integrated with react-hook-form.\n */\nexport const MyTimePicker = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n className,\n rules,\n floatingError,\n ...props\n}: MyTimePickerProps<TFieldValues>) => {\n return name && control ? (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <FormControl>\n <div>\n <TimePicker {...field} {...props} />\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </FormControl>\n </FormItem>\n )}\n />\n ) : (\n <TimePicker className={'mt-2'} {...props} />\n );\n};\n"],"names":["MyCheckbox","control","name","label","rules","props","id","useId","jsx","FormField","field","FormLabel","jsxs","FormItem","FormControl","Checkbox","MyDatePicker","required","format","DATE","floatingError","placeholder","disabled","register","className","inputProps","formState","Popover","PopoverTrigger","Input","get","dayjs","cn","Calendar1","FormMessage","PopoverContent","Calendar","MyDateRangePicker","DateRangePicker","MyHtmlEditor","HtmlEditor","MyMaskInput","MaskInput","value","MyRadio","RadioGroupItem","MySwitch","Switch","MyTextarea","Textarea","MyTimePicker","TimePicker"],"mappings":";;;;;;;;;;;;AA8BO,MAAMA,IAAa,CAAmC;AAAA,EAC3D,SAAAC;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC;AAAA,E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AAA,EAAU,WAAW,SACnB,UAAA;AAAA,QAAAR;AAAA,QAAM;AAAA,QAAEc,KAAY,gBAAAT,EAAC,QAAA,EAAK,WAAW,gBAAgB,UAAA,IAAA,CAAC;AAAA,MAAA,GACzD;AAAA,MAEF,gBAAAA,EAACM,GAAA,EACC,UAAA,gBAAAF,EAAC,OAAA,EACC,UAAA;AAAA,QAAA,gBAAAJ,EAAC2C,GAAA,EAAY,GAAGzC,GAAQ,GAAGL,EAAA,CAAO;AAAA,QAClC,gBAAAG;AAAA,UAAC0B;AAAA,UAAA;AAAA,YACC,WAAWF,EAAGZ,KAAiB,oBAAoB;AAAA,UAAA;AAAA,QAAA;AAAA,MACrD,EAAA,CACF,EAAA,CACF;AAAA,IAAA,EAAA,CACF;AAAA,EAAA;AAAA,IAIJ,gBAAAZ,EAAC2C,GAAA,EAAW,WAAW,QAAS,GAAG9C,GAAO;"}
1
+ {"version":3,"file":"index.es.js","sources":["../../../src/components/form/MyCheckbox.tsx","../../../src/components/form/MyDatePicker.tsx","../../../src/components/form/MyDateRangePicker.tsx","../../../src/components/form/MyHtmlEditor.tsx","../../../src/components/form/MyMaskInput.tsx","../../../src/components/form/MyRadio.tsx","../../../src/components/form/MySwitch.tsx","../../../src/components/form/MyTextarea.tsx","../../../src/components/form/MyTimePicker.tsx"],"sourcesContent":["import {\n Checkbox,\n type CheckboxProps,\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n} from 'dgz-ui/form';\nimport { useId } from 'react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyCheckbox component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyCheckboxProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & CheckboxProps;\n\n/**\n * MyCheckbox is a checkbox component with optional react-hook-form integration.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the checkbox.\n * @param rules - The `react-hook-form` validation rules.\n * @param props - Checkbox and form item props.\n * @returns A checkbox component wrapped with form handling logic.\n */\nexport const MyCheckbox = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n ...props\n}: MyCheckboxProps<TFieldValues>) => {\n const id = useId();\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormLabel className={'block'} htmlFor={props.id || id}>\n <FormItem className=\"flex flex-row items-start gap-3\">\n <FormControl>\n <Checkbox\n id={props.id || id}\n checked={field.value}\n onCheckedChange={field.onChange}\n {...props}\n />\n </FormControl>\n <div className=\"space-y-1 leading-none\">\n {label && <div>{label}</div>}\n </div>\n </FormItem>\n </FormLabel>\n )}\n />\n )) ||\n null\n );\n};\n","import { Calendar, type CalendarProps, DATE } from 'dgz-ui/calendar';\nimport {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n Input,\n type InputProps,\n} from 'dgz-ui/form';\nimport { Popover, PopoverContent, PopoverTrigger } from 'dgz-ui/popover';\nimport { cn, dayjs } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport { Calendar1 } from 'lucide-react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyDatePicker component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyDatePickerProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n Omit<CalendarProps, 'mode' | 'disabled'> & {\n /** Date format string for display. */\n format?: string;\n inputProps?: Omit<InputProps, 'onSelect'>;\n placeholder?: string;\n disabled?: boolean;\n };\n\n/**\n * MyDatePicker shows a calendar popover to pick a single date, integrated with react-hook-form.\n * Can also be used standalone when no control/name are provided.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the date picker.\n * @param required - Whether the field is required.\n * @param rules - The `react-hook-form` validation rules.\n * @param format - The date format for display.\n * @param placeholder - The placeholder text when no date selected.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param register - The `react-hook-form` register function.\n * @param disabled - Whether the date picker is disabled.\n * @param className - Additional CSS classes.\n * @param inputProps - Props passed to the underlying Input component.\n * @param props - Calendar, button and form item props.\n * @returns A date picker component integrated with react-hook-form.\n */\nexport const MyDatePicker = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n rules,\n format = DATE,\n floatingError,\n placeholder,\n disabled,\n register,\n className,\n inputProps,\n ...props\n}: MyDatePickerProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <Popover>\n <PopoverTrigger asChild>\n <div className={'relative'}>\n <FormControl>\n <Input\n {...inputProps}\n variant={\n get(formState.errors, `${name}.message`)\n ? 'failure'\n : 'default'\n }\n disabled={disabled}\n {...field}\n readOnly\n placeholder={placeholder || 'Pick a date'}\n value={dayjs(field.value).format(format)}\n className={cn('m-0 text-start', className)}\n />\n </FormControl>\n <Calendar1\n className={cn(\n 'text-secondary absolute top-2.5 right-2 size-5',\n disabled && 'pointer-events-none opacity-50'\n )}\n />\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </PopoverTrigger>\n {!disabled && (\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\n <Calendar\n {...props}\n mode=\"single\"\n selected={field.value}\n onSelect={field.onChange}\n />\n </PopoverContent>\n )}\n </Popover>\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\nimport { DateRangePicker, type DateRangePickerProps } from '../datepicker';\n\n/**\n * Props for the MyDateRangePicker component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyDateRangePickerProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n Omit<DateRangePickerProps, 'required'> & {\n required?: boolean;\n };\n\n/**\n * MyDateRangePicker renders a date range selector integrated with react-hook-form.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the date range picker.\n * @param required - Whether the field is required.\n * @param rules - The `react-hook-form` validation rules.\n * @param format - The date format for display.\n * @param placeholder - The placeholder text when no date is selected.\n * @param props - DateRangePicker props and form item props.\n * @returns A date range picker integrated with react-hook-form.\n */\nexport const MyDateRangePicker = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n rules,\n placeholder,\n floatingError,\n ...props\n}: MyDateRangePickerProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <div>\n <FormControl>\n <DateRangePicker\n {...props}\n error={`${get(formState.errors, name, '')}`}\n selected={field.value}\n onRangeSelected={field.onChange}\n placeholder={placeholder}\n />\n </FormControl>\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n HtmlEditor,\n type HtmlEditorProps,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyHtmlEditor component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyHtmlEditorProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n HtmlEditorProps & {\n /** Whether the field is required. */\n required?: boolean;\n };\n\n/**\n * MyHtmlEditor is a rich-text HTML editor with optional react-hook-form integration.\n * Works in both controlled (with control/name) and uncontrolled modes.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the HTML editor.\n * @param rules - The `react-hook-form` validation rules.\n * @param required - Whether the field is required.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - HtmlEditor and form item props.\n * @returns React element rendering an HtmlEditor with label, helper text, and validation message.\n */\nexport const MyHtmlEditor = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n required,\n floatingError,\n ...props\n}: MyHtmlEditorProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <div>\n <FormControl>\n <HtmlEditor {...field} {...props} />\n </FormControl>\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n MaskInput,\n type MaskInputProps,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyMaskInput component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyMaskInputProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n MaskInputProps & {\n /** Whether the field is required. */\n required?: boolean;\n };\n\n/**\n * MyMaskInput is an input component with masking support and optional react-hook-form integration.\n * Works in both controlled (with control/name) and uncontrolled modes. By default it uses a space as\n * thousands separator, underscores as placeholder characters, lazy formatting disabled, and returns\n * unmasked value on change.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the mask input.\n * @param rules - The `react-hook-form` validation rules.\n * @param required - Whether the field is required.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - MaskInput and form item props.\n * @returns React element rendering a masked input with label, helper text, and validation message.\n */\nexport const MyMaskInput = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n required,\n floatingError,\n ...props\n}: MyMaskInputProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <div>\n <FormControl>\n <MaskInput\n thousandsSeparator={' '}\n lazy={false}\n placeholderChar=\"_\"\n unmask\n {...field}\n {...props}\n variant={\n get(formState.errors, `${name}.message`)\n ? 'failure'\n : 'default'\n }\n onAccept={(value) => field.onChange(value)}\n />\n </FormControl>\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n RadioGroupItem,\n} from 'dgz-ui/form';\nimport React, { useId } from 'react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\ntype RadioItemProps = React.ComponentPropsWithoutRef<typeof RadioGroupItem>;\n\n/**\n * Props for the MyRadio component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyRadioProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & RadioItemProps;\n\n/**\n * MyRadio is a radio input that can integrate with react-hook-form when control and name are provided.\n * Falls back to an uncontrolled radio item when not used inside a form.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the radio input.\n * @param rules - The `react-hook-form` validation rules.\n * @param value - The value of the radio input.\n * @param props - Radio item and form item props.\n * @returns A radio button item.\n */\nconst MyRadio = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n value,\n ...props\n}: MyRadioProps<TFieldValues>) => {\n const id = useId();\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormLabel className={'block'} htmlFor={props.id || id}>\n <FormItem className=\"flex flex-row items-start gap-3\">\n <FormControl>\n <RadioGroupItem\n id={props.id || id}\n value={value}\n checked={field.value === value}\n onClick={() => {\n if (field.value !== value) {\n field.onChange(value);\n }\n }}\n {...props}\n />\n </FormControl>\n <div className=\"space-y-1 leading-none\">\n {label && <div>{label}</div>}\n </div>\n </FormItem>\n </FormLabel>\n )}\n />\n )) ||\n null\n );\n};\n\nexport { MyRadio };\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n Switch,\n type SwitchProps,\n} from 'dgz-ui/form';\nimport { useId } from 'react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MySwitch component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MySwitchProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & SwitchProps;\n\n/**\n * MySwitch is a toggle switch with optional react-hook-form integration.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the switch.\n * @param rules - The `react-hook-form` validation rules.\n * @param props - Switch and form item props.\n * @returns A toggle switch component, or null if name or control are missing.\n */\nexport const MySwitch = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n ...props\n}: MySwitchProps<TFieldValues>) => {\n const id = useId();\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormLabel className={'block'} htmlFor={props.id || id}>\n <FormItem className=\"flex flex-row items-start gap-3\">\n <FormControl>\n <Switch\n id={props.id || id}\n className={'m-0'}\n checked={field.value}\n onCheckedChange={field.onChange}\n {...props}\n />\n </FormControl>\n <div className=\"space-y-1 leading-none\">\n {label && <div>{label}</div>}\n </div>\n </FormItem>\n </FormLabel>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n Textarea,\n type TextareaProps,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyTextarea component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyTextareaProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & TextareaProps;\n\n/**\n * MyTextarea is a textarea component with optional react-hook-form integration.\n * Supports floating error message styling.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the textarea.\n * @param required - Whether the field is required.\n * @param rules - The `react-hook-form` validation rules.\n * @param className - Custom CSS class name.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - Textarea and form item props.\n * @returns A textarea component integrated with react-hook-form.\n */\nexport const MyTextarea = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n rules,\n className,\n floatingError,\n ...props\n}: MyTextareaProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <div>\n <FormControl>\n <Textarea\n variant={\n get(formState.errors, `${name}.message`)\n ? 'failure'\n : 'default'\n }\n {...props}\n {...field}\n className={cn(className)}\n />\n </FormControl>\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import { TimePicker, type TimePickerProps } from 'dgz-ui/calendar';\nimport {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyTimePicker component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyTimePickerProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n TimePickerProps & {\n /** Whether the field is required. */\n required?: boolean;\n /** Custom CSS class name. */\n className?: string;\n };\n\n/**\n * MyTimePicker is a time selection input with optional react-hook-form integration.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the time picker.\n * @param required - Whether the field is required.\n * @param className - Custom CSS class name.\n * @param rules - The `react-hook-form` validation rules.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - TimePicker and form item props.\n * @returns A time picker component integrated with react-hook-form.\n */\nexport const MyTimePicker = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n className,\n rules,\n floatingError,\n ...props\n}: MyTimePickerProps<TFieldValues>) => {\n return name && control ? (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}{' '}\n <div>\n <FormControl>\n <TimePicker {...field} {...props} />\n </FormControl>\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </FormItem>\n )}\n />\n ) : (\n <TimePicker className={'mt-2'} {...props} />\n );\n};\n"],"names":["MyCheckbox","control","name","label","rules","props","id","useId","jsx","FormField","field","FormLabel","jsxs","FormItem","FormControl","Checkbox","MyDatePicker","required","format","DATE","floatingError","placeholder","disabled","register","className","inputProps","formState","Popover","PopoverTrigger","Input","get","dayjs","cn","Calendar1","FormMessage","PopoverContent","Calendar","MyDateRangePicker","DateRangePicker","MyHtmlEditor","HtmlEditor","MyMaskInput","MaskInput","value","MyRadio","RadioGroupItem","MySwitch","Switch","MyTextarea","Textarea","MyTimePicker","TimePicker"],"mappings":";;;;;;;;;;;;AA8BO,MAAMA,IAAa,CAAmC;AAAA,EAC3D,SAAAC;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,MAAqC;AACnC,QAAMC,IAAKC,EAAA;AACX,SACGL,KAAQD,KACP,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAAR;AAAA,MACA,MAAAC;AAAA,MACA,OAAAE;AAAA,MACA,QAAQ,CAAC,EAAE,OAAAM,0BACRC,GAAA,EAAU,WAAW,SAAS,SAASN,EAAM,MAAMC,GAClD,UAAA,gBAAAM,EAACC,GAAA,EAAS,WAAU,mCAClB,UAAA;AAAA,QAAA,gBAAAL,EAACM,GAAA,EACC,UAAA,gBAAAN;AAAA,UAACO;AAAA,UAAA;AAAA,YACC,IAAIV,EAAM,MAAMC;AAAA,YAChB,SAASI,EAAM;AAAA,YACf,iBAAiBA,EAAM;AAAA,YACtB,GAAGL;AAAA,UAAA;AAAA,QAAA,GAER;AAAA,QACA,gBAAAG,EAAC,SAAI,WAAU,0BACZ,eAAS,gBAAAA,EAAC,OAAA,EAAK,aAAM,EAAA,CACxB;AAAA,MAAA,EAAA,CACF,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,KAIN;AAEJ,GCdaQ,IAAe,CAAmC;AAAA,EAC7D,SAAAf;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAc;AAAA,EACA,OAAAb;AAAA,EACA,QAAAc,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AAAA,EACA,OAAApB;AAAA,EACA,eAAAgB;AAAA,EACA,GAAGf;AACL,MACSH,KAAQD,IACb,gBAAAO;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,SAAAR;AAAA,IACA,MAAAC;AAAA,IACA,OAAAE;AAAA,IACA,QAAQ,CAAC,EAAE,OAAAM,EAAA,wBACRG,GAAA,EACE,UAAA;AAAA,MAAAV,KACC,gBAAAS,EAACD,GAAA,EAAU,WAAW,SACnB,UAAA;AAAA,QAAAR;AAAA,QAAM;AAAA,QAAEc,KAAY,gBAAAT,EAAC,QAAA,EAAK,WAAW,gBAAgB,UAAA,IAAA,CAAC;AAAA,MAAA,GACzD;AAAA,MACC;AAAA,wBACF,OAAA,EACC,UAAA;AAAA,QAAA,gBAAAA,EAACM,KACC,UAAA,gBAAAN,EAAC2C,GAAA,EAAY,GAAGzC,GAAQ,GAAGL,GAAO,GACpC;AAAA,QACA,gBAAAG;AAAA,UAAC0B;AAAA,UAAA;AAAA,YACC,WAAWF,EAAGZ,KAAiB,oBAAoB;AAAA,UAAA;AAAA,QAAA;AAAA,MACrD,EAAA,CACF;AAAA,IAAA,EAAA,CACF;AAAA,EAAA;AAAA,IAIJ,gBAAAZ,EAAC2C,GAAA,EAAW,WAAW,QAAS,GAAG9C,GAAO;"}
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("../chunks/useSortable-B3LF1tg8.cjs.js"),V=require("react/jsx-runtime"),ee=require("../chunks/lodash-BjH0kD7j.cjs.js"),$=require("react"),U=require("../chunks/PasswordConfirm-BmPW7K7v.cjs.js"),Le=require("../chunks/useFilter-CsOF1_hM.cjs.js"),Ye=require("../chunks/useTheme-hjEZ-FC3.cjs.js"),We=()=>{const e=$.useCallback(({onConfirm:a})=>{const n=ee.lodashExports.uniqueId();U.y.warning(V.jsx(V.Fragment,{}),{toastId:n,autoClose:!1}),U.y.update(n,{position:"bottom-left",render:V.jsx(U.Confirm,{defaultOpen:!0,onConfirm:()=>{a(),U.y.dismiss(n)}})})},[]),o=$.useCallback(({onSubmit:a})=>{const n=ee.lodashExports.uniqueId();U.y.warning(V.jsx(V.Fragment,{}),{position:"bottom-left",toastId:n,autoClose:!1}),U.y.update(n,{render:V.jsx(U.PasswordConfirm,{defaultOpen:!0,onSubmit:f=>{a(f),U.y.dismiss(n)}})})},[]);return{confirm:e,confirmPassword:o}},Fe=(e,o=!1)=>{const a=$.useRef(document.title);$.useEffect(()=>(o&&a.current===document.title&&(a.current=document.title),document.title=e,()=>{o&&(document.title=a.current)}),[e,o])};var G={},Te;function Ue(){if(Te)return G;Te=1,G.match=c,G.parse=l;var e=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,o=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,a=/^(?:(min|max)-)?(.+)/,n=/(em|rem|px|cm|mm|in|pt|pc)?$/,f=/(dpi|dpcm|dppx)?$/;function c(d,u){return l(d).some(function(m){var g=m.inverse,j=m.type==="all"||u.type===m.type;if(j&&g||!(j||g))return!1;var A=m.expressions.every(function(q){var D=q.feature,Y=q.modifier,x=q.value,S=u[D];if(!S)return!1;switch(D){case"orientation":case"scan":return S.toLowerCase()===x.toLowerCase();case"width":case"height":case"device-width":case"device-height":x=C(x),S=C(S);break;case"resolution":x=v(x),S=v(S);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":x=p(x),S=p(S);break;case"grid":case"color":case"color-index":case"monochrome":x=parseInt(x,10)||1,S=parseInt(S,10)||0;break}switch(Y){case"min":return S>=x;case"max":return S<=x;default:return S===x}});return A&&!g||!A&&g})}function l(d){return d.split(",").map(function(u){u=u.trim();var m=u.match(e),g=m[1],j=m[2],A=m[3]||"",q={};return q.inverse=!!g&&g.toLowerCase()==="not",q.type=j?j.toLowerCase():"all",A=A.match(/\([^\)]+\)/g)||[],q.expressions=A.map(function(D){var Y=D.match(o),x=Y[1].toLowerCase().match(a);return{modifier:x[1],feature:x[2],value:Y[2]}}),q})}function p(d){var u=Number(d),m;return u||(m=d.match(/^(\d+)\s*\/\s*(\d+)$/),u=m[1]/m[2]),u}function v(d){var u=parseFloat(d),m=String(d).match(f)[1];switch(m){case"dpcm":return u/2.54;case"dppx":return u*96;default:return u}}function C(d){var u=parseFloat(d),m=String(d).match(n)[1];switch(m){case"em":return u*16;case"rem":return u*16;case"cm":return u*96/2.54;case"mm":return u*96/2.54/10;case"in":return u*96;case"pt":return u*72;case"pc":return u*72/12;default:return u}}return G}var ue,ge;function ze(){if(ge)return ue;ge=1;var e=Ue().match,o=typeof window<"u"?window.matchMedia:null;function a(f,c,l){var p=this,v;o&&!l&&(v=o.call(window,f)),v?(this.matches=v.matches,this.media=v.media,v.addListener(u)):(this.matches=e(f,c),this.media=f),this.addListener=C,this.removeListener=d,this.dispose=m;function C(g){v&&v.addListener(g)}function d(g){v&&v.removeListener(g)}function u(g){p.matches=g.matches,p.media=g.media}function m(){v&&v.removeListener(u)}}function n(f,c,l){return new a(f,c,l)}return ue=n,ue}var Ne=ze();const Qe=ee.getDefaultExportFromCjs(Ne);var He=/[A-Z]/g,Ve=/^ms-/,fe={};function Ke(e){return"-"+e.toLowerCase()}function qe(e){if(fe.hasOwnProperty(e))return fe[e];var o=e.replace(He,Ke);return fe[e]=Ve.test(o)?"-"+o:o}function Je(e,o){if(e===o)return!0;if(!e||!o)return!1;const a=Object.keys(e),n=Object.keys(o),f=a.length;if(n.length!==f)return!1;for(let c=0;c<f;c++){const l=a[c];if(e[l]!==o[l]||!Object.prototype.hasOwnProperty.call(o,l))return!1}return!0}var Z={exports:{}},B={exports:{}},_={};/** @license React v16.13.1
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("../chunks/useSortable-B3LF1tg8.cjs.js"),V=require("react/jsx-runtime"),ee=require("../chunks/lodash-BjH0kD7j.cjs.js"),$=require("react"),U=require("../chunks/PasswordConfirm-Uc4pncGw.cjs.js"),Le=require("../chunks/useFilter-CsOF1_hM.cjs.js"),Ye=require("../chunks/useTheme-hjEZ-FC3.cjs.js"),We=()=>{const e=$.useCallback(({onConfirm:a})=>{const n=ee.lodashExports.uniqueId();U.y.warning(V.jsx(V.Fragment,{}),{toastId:n,autoClose:!1}),U.y.update(n,{position:"bottom-left",render:V.jsx(U.Confirm,{defaultOpen:!0,onConfirm:()=>{a(),U.y.dismiss(n)}})})},[]),o=$.useCallback(({onSubmit:a})=>{const n=ee.lodashExports.uniqueId();U.y.warning(V.jsx(V.Fragment,{}),{position:"bottom-left",toastId:n,autoClose:!1}),U.y.update(n,{render:V.jsx(U.PasswordConfirm,{defaultOpen:!0,onSubmit:f=>{a(f),U.y.dismiss(n)}})})},[]);return{confirm:e,confirmPassword:o}},Fe=(e,o=!1)=>{const a=$.useRef(document.title);$.useEffect(()=>(o&&a.current===document.title&&(a.current=document.title),document.title=e,()=>{o&&(document.title=a.current)}),[e,o])};var G={},Te;function Ue(){if(Te)return G;Te=1,G.match=c,G.parse=l;var e=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,o=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,a=/^(?:(min|max)-)?(.+)/,n=/(em|rem|px|cm|mm|in|pt|pc)?$/,f=/(dpi|dpcm|dppx)?$/;function c(d,u){return l(d).some(function(m){var g=m.inverse,j=m.type==="all"||u.type===m.type;if(j&&g||!(j||g))return!1;var A=m.expressions.every(function(q){var D=q.feature,Y=q.modifier,x=q.value,S=u[D];if(!S)return!1;switch(D){case"orientation":case"scan":return S.toLowerCase()===x.toLowerCase();case"width":case"height":case"device-width":case"device-height":x=C(x),S=C(S);break;case"resolution":x=v(x),S=v(S);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":x=p(x),S=p(S);break;case"grid":case"color":case"color-index":case"monochrome":x=parseInt(x,10)||1,S=parseInt(S,10)||0;break}switch(Y){case"min":return S>=x;case"max":return S<=x;default:return S===x}});return A&&!g||!A&&g})}function l(d){return d.split(",").map(function(u){u=u.trim();var m=u.match(e),g=m[1],j=m[2],A=m[3]||"",q={};return q.inverse=!!g&&g.toLowerCase()==="not",q.type=j?j.toLowerCase():"all",A=A.match(/\([^\)]+\)/g)||[],q.expressions=A.map(function(D){var Y=D.match(o),x=Y[1].toLowerCase().match(a);return{modifier:x[1],feature:x[2],value:Y[2]}}),q})}function p(d){var u=Number(d),m;return u||(m=d.match(/^(\d+)\s*\/\s*(\d+)$/),u=m[1]/m[2]),u}function v(d){var u=parseFloat(d),m=String(d).match(f)[1];switch(m){case"dpcm":return u/2.54;case"dppx":return u*96;default:return u}}function C(d){var u=parseFloat(d),m=String(d).match(n)[1];switch(m){case"em":return u*16;case"rem":return u*16;case"cm":return u*96/2.54;case"mm":return u*96/2.54/10;case"in":return u*96;case"pt":return u*72;case"pc":return u*72/12;default:return u}}return G}var ue,ge;function ze(){if(ge)return ue;ge=1;var e=Ue().match,o=typeof window<"u"?window.matchMedia:null;function a(f,c,l){var p=this,v;o&&!l&&(v=o.call(window,f)),v?(this.matches=v.matches,this.media=v.media,v.addListener(u)):(this.matches=e(f,c),this.media=f),this.addListener=C,this.removeListener=d,this.dispose=m;function C(g){v&&v.addListener(g)}function d(g){v&&v.removeListener(g)}function u(g){p.matches=g.matches,p.media=g.media}function m(){v&&v.removeListener(u)}}function n(f,c,l){return new a(f,c,l)}return ue=n,ue}var Ne=ze();const Qe=ee.getDefaultExportFromCjs(Ne);var He=/[A-Z]/g,Ve=/^ms-/,fe={};function Ke(e){return"-"+e.toLowerCase()}function qe(e){if(fe.hasOwnProperty(e))return fe[e];var o=e.replace(He,Ke);return fe[e]=Ve.test(o)?"-"+o:o}function Je(e,o){if(e===o)return!0;if(!e||!o)return!1;const a=Object.keys(e),n=Object.keys(o),f=a.length;if(n.length!==f)return!1;for(let c=0;c<f;c++){const l=a[c];if(e[l]!==o[l]||!Object.prototype.hasOwnProperty.call(o,l))return!1}return!0}var Z={exports:{}},B={exports:{}},_={};/** @license React v16.13.1
2
2
  * react-is.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -2,7 +2,7 @@ import { b as qr, a as $r, u as jr } from "../chunks/useSortable-BXNk8Wth.es.js"
2
2
  import { jsx as X, Fragment as Ee } from "react/jsx-runtime";
3
3
  import { l as Te, g as je } from "../chunks/lodash-CRDOWzbs.es.js";
4
4
  import { useCallback as ge, useRef as De, useEffect as F, useContext as Ue, useState as ee, createContext as Ne } from "react";
5
- import { y as Q, C as ze, P as He } from "../chunks/PasswordConfirm-C3Xvi3EE.es.js";
5
+ import { y as Q, C as ze, P as He } from "../chunks/PasswordConfirm-Dj97U7O9.es.js";
6
6
  import { u as Lr } from "../chunks/useFilter-C_K_3fQu.es.js";
7
7
  import { u as Yr } from "../chunks/useTheme-iKF3BEvj.es.js";
8
8
  const Cr = () => {
@@ -22,5 +22,5 @@ export type MyHtmlEditorProps<TFieldValues extends FieldValues> = FormItemProps<
22
22
  * @param props - HtmlEditor and form item props.
23
23
  * @returns React element rendering an HtmlEditor with label, helper text, and validation message.
24
24
  */
25
- export declare const MyHtmlEditor: <TFieldValues extends FieldValues>({ control, name, label, rules, required, floatingError, ...props }: MyHtmlEditorProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
25
+ export declare const MyHtmlEditor: <TFieldValues extends FieldValues>({ control, name, label, rules, required, floatingError, ...props }: MyHtmlEditorProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element | null;
26
26
  //# sourceMappingURL=MyHtmlEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MyHtmlEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/form/MyHtmlEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,aAAa,EAIlB,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9D;;;GAGG;AACH,MAAM,MAAM,iBAAiB,CAAC,YAAY,SAAS,WAAW,IAC5D,aAAa,CAAC,YAAY,CAAC,GACzB,eAAe,GAAG;IAChB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEN;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,GAAI,YAAY,SAAS,WAAW,EAAE,oEAQ5D,iBAAiB,CAAC,YAAY,CAAC,4CA2BjC,CAAC"}
1
+ {"version":3,"file":"MyHtmlEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/form/MyHtmlEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,aAAa,EAIlB,KAAK,eAAe,EACrB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9D;;;GAGG;AACH,MAAM,MAAM,iBAAiB,CAAC,YAAY,SAAS,WAAW,IAC5D,aAAa,CAAC,YAAY,CAAC,GACzB,eAAe,GAAG;IAChB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEN;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,GAAI,YAAY,SAAS,WAAW,EAAE,oEAQ5D,iBAAiB,CAAC,YAAY,CAAC,mDA4BjC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dgz-ui-shared",
3
- "version": "1.2.25",
3
+ "version": "1.2.26",
4
4
  "description": "Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript, dgz-ui library",
5
5
  "keywords": [
6
6
  "dgz-ui",