dgz-ui-shared 1.2.22 → 1.2.23

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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("dgz-ui/form"),e=require("react/jsx-runtime"),g=require("react"),j=require("dgz-ui/calendar"),F=require("dgz-ui/popover"),m=require("dgz-ui/utils"),u=require("../../chunks/lodash-BjH0kD7j.cjs.js"),b=require("lucide-react"),C=require("../../chunks/DateRangePicker-CUv-qznZ.cjs.js"),p=require("../../chunks/MyInput-DOJNbPnV.cjs.js"),v=require("../../chunks/MySelect-C7tnOKUF.cjs.js"),I=({control:r,name:t,label:a,rules:n,...c})=>{const o=g.useId();return t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:n,render:({field:l})=>e.jsx(s.FormLabel,{className:"block",htmlFor:c.id||o,children:e.jsxs(s.FormItem,{className:"flex flex-row items-start gap-3",children:[e.jsx(s.FormControl,{children:e.jsx(s.Checkbox,{id:c.id||o,checked:l.value,onCheckedChange:l.onChange,...c})}),e.jsx("div",{className:"space-y-1 leading-none",children:a&&e.jsx("div",{children:a})})]})})})||null},P=({control:r,name:t,label:a,required:n,rules:c,format:o=j.DATE,floatingError:l,placeholder:i,disabled:d,register:x,className:y,inputProps:N,...M})=>t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:c,render:({field:h,formState:k})=>e.jsxs(s.FormItem,{children:[a&&e.jsxs(s.FormLabel,{className:"block",children:[a," ",n&&e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs(F.Popover,{children:[e.jsx(F.PopoverTrigger,{asChild:!0,children:e.jsx(s.FormControl,{children:e.jsxs("div",{className:"relative",children:[e.jsx(s.Input,{...N,variant:u.lodashExports.get(k.errors,`${t}.message`)?"failure":"default",disabled:d,...h,readOnly:!0,placeholder:i||"Pick a date",value:m.dayjs(h.value).format(o),className:m.cn("m-0 text-start",y)}),e.jsx(b.Calendar1,{className:m.cn("text-secondary absolute top-2.5 right-2 size-5",d&&"pointer-events-none opacity-50")})]})})}),!d&&e.jsx(F.PopoverContent,{className:"w-auto p-0",align:"start",children:e.jsx(j.Calendar,{...M,mode:"single",selected:h.value,onSelect:h.onChange})})]}),e.jsx(s.FormMessage,{className:m.cn(l&&"absolute -bottom-5")})]})})||null,f=({control:r,name:t,label:a,required:n,rules:c,placeholder:o,floatingError:l,...i})=>t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:c,render:({field:d,formState:x})=>e.jsxs(s.FormItem,{children:[a&&e.jsxs(s.FormLabel,{className:"block",children:[a," ",n&&e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx(s.FormControl,{children:e.jsx(C.DateRangePicker,{...i,error:`${u.lodashExports.get(x.errors,t,"")}`,selected:d.value,onRangeSelected:d.onChange,placeholder:o})}),e.jsx(s.FormMessage,{className:m.cn(l&&"absolute -bottom-5")})]})})||null,q=({control:r,name:t,label:a,rules:n,required:c,floatingError:o,...l})=>t&&r?e.jsx(s.FormField,{control:r,name:t,rules:n,render:({field:i})=>e.jsxs(s.FormItem,{children:[a&&e.jsxs(s.FormLabel,{className:"block",children:[a," ",c&&e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx(s.FormControl,{children:e.jsx(s.HtmlEditor,{...i,...l})}),e.jsx(s.FormMessage,{className:m.cn(o&&"absolute -bottom-5")})]})}):e.jsx(s.HtmlEditor,{...l}),S=({control:r,name:t,label:a,rules:n,required:c,floatingError:o,...l})=>t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:n,render:({field:i,formState:d})=>e.jsxs(s.FormItem,{children:[a&&e.jsxs(s.FormLabel,{className:"block",children:[a," ",c&&e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx(s.FormControl,{children:e.jsx(s.MaskInput,{thousandsSeparator:" ",lazy:!1,placeholderChar:"_",unmask:!0,...i,...l,variant:u.lodashExports.get(d.errors,`${t}.message`)?"failure":"default",onAccept:x=>i.onChange(x)})}),e.jsx(s.FormMessage,{className:m.cn(o&&"absolute -bottom-5")})]})})||null,E=({control:r,name:t,label:a,rules:n,value:c,...o})=>{const l=g.useId();return t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:n,render:({field:i})=>e.jsx(s.FormLabel,{className:"block",htmlFor:o.id||l,children:e.jsxs(s.FormItem,{className:"flex flex-row items-start gap-3",children:[e.jsx(s.FormControl,{children:e.jsx(s.RadioGroupItem,{id:o.id||l,value:c,checked:i.value===c,onClick:()=>{i.value!==c&&i.onChange(c)},...o})}),e.jsx("div",{className:"space-y-1 leading-none",children:a&&e.jsx("div",{children:a})})]})})})||null},R=({control:r,name:t,label:a,rules:n,...c})=>{const o=g.useId();return t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:n,render:({field:l})=>e.jsx(s.FormLabel,{className:"block",htmlFor:c.id||o,children:e.jsxs(s.FormItem,{className:"flex flex-row items-start gap-3",children:[e.jsx(s.FormControl,{children:e.jsx(s.Switch,{id:c.id||o,className:"m-0",checked:l.value,onCheckedChange:l.onChange,...c})}),e.jsx("div",{className:"space-y-1 leading-none",children:a&&e.jsx("div",{children:a})})]})})})||null},T=({control:r,name:t,label:a,required:n,rules:c,className:o,floatingError:l,...i})=>t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:c,render:({field:d,formState:x})=>e.jsxs(s.FormItem,{children:[a&&e.jsxs(s.FormLabel,{className:"block",children:[a," ",n&&e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx(s.FormControl,{children:e.jsx(s.Textarea,{variant:u.lodashExports.get(x.errors,`${t}.message`)?"failure":"default",...i,...d,className:m.cn(o)})}),e.jsx(s.FormMessage,{className:m.cn(l&&"absolute -bottom-5")})]})})||null,L=({control:r,name:t,label:a,required:n,className:c,rules:o,floatingError:l,...i})=>t&&r?e.jsx(s.FormField,{control:r,name:t,rules:o,render:({field:d})=>e.jsxs(s.FormItem,{children:[a&&e.jsxs(s.FormLabel,{className:"block",children:[a," ",n&&e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx(s.FormControl,{children:e.jsx(j.TimePicker,{...d,...i})}),e.jsx(s.FormMessage,{className:m.cn(l&&"absolute -bottom-5")})]})}):e.jsx(j.TimePicker,{className:"mt-2",...i});exports.MyInput=p.MyInput;exports.MySelect=v.MySelect;exports.MyCheckbox=I;exports.MyDatePicker=P;exports.MyDateRangePicker=f;exports.MyHtmlEditor=q;exports.MyMaskInput=S;exports.MyRadio=E;exports.MySwitch=R;exports.MyTextarea=T;exports.MyTimePicker=L;Object.keys(s).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(exports,r)&&Object.defineProperty(exports,r,{enumerable:!0,get:()=>s[r]})});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("dgz-ui/form"),e=require("react/jsx-runtime"),g=require("react"),j=require("dgz-ui/calendar"),F=require("dgz-ui/popover"),m=require("dgz-ui/utils"),u=require("../../chunks/lodash-BjH0kD7j.cjs.js"),b=require("lucide-react"),C=require("../../chunks/DateRangePicker-CUv-qznZ.cjs.js"),p=require("../../chunks/MyInput-DOJNbPnV.cjs.js"),v=require("../../chunks/MySelect-C7tnOKUF.cjs.js"),I=({control:r,name:t,label:a,rules:n,...c})=>{const o=g.useId();return t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:n,render:({field:l})=>e.jsx(s.FormLabel,{className:"block",htmlFor:c.id||o,children:e.jsxs(s.FormItem,{className:"flex flex-row items-start gap-3",children:[e.jsx(s.FormControl,{children:e.jsx(s.Checkbox,{id:c.id||o,checked:l.value,onCheckedChange:l.onChange,...c})}),e.jsx("div",{className:"space-y-1 leading-none",children:a&&e.jsx("div",{children:a})})]})})})||null},P=({control:r,name:t,label:a,required:n,rules:c,format:o=j.DATE,floatingError:l,placeholder:i,disabled:d,register:x,className:y,inputProps:N,...M})=>t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:c,render:({field:h,formState:k})=>e.jsxs(s.FormItem,{children:[a&&e.jsxs(s.FormLabel,{className:"block",children:[a," ",n&&e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs(F.Popover,{children:[e.jsx(F.PopoverTrigger,{asChild:!0,children:e.jsx(s.FormControl,{children:e.jsxs("div",{className:"relative",children:[e.jsx(s.Input,{...N,variant:u.lodashExports.get(k.errors,`${t}.message`)?"failure":"default",disabled:d,...h,readOnly:!0,placeholder:i||"Pick a date",value:m.dayjs(h.value).format(o),className:m.cn("m-0 text-start",y)}),e.jsx(b.Calendar1,{className:m.cn("text-secondary absolute top-2.5 right-2 size-5",d&&"pointer-events-none opacity-50")})]})})}),!d&&e.jsx(F.PopoverContent,{className:"w-auto p-0",align:"start",children:e.jsx(j.Calendar,{...M,mode:"single",selected:h.value,onSelect:h.onChange})})]}),e.jsx(s.FormMessage,{className:m.cn(l&&"absolute -bottom-5")})]})})||null,f=({control:r,name:t,label:a,required:n,rules:c,placeholder:o,floatingError:l,...i})=>t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:c,render:({field:d,formState:x})=>e.jsxs(s.FormItem,{children:[a&&e.jsxs(s.FormLabel,{className:"block",children:[a," ",n&&e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx(s.FormControl,{children:e.jsx("div",{children:e.jsx(C.DateRangePicker,{...i,error:`${u.lodashExports.get(x.errors,t,"")}`,selected:d.value,onRangeSelected:d.onChange,placeholder:o})})}),e.jsx(s.FormMessage,{className:m.cn(l&&"absolute -bottom-5")})]})})||null,q=({control:r,name:t,label:a,rules:n,required:c,floatingError:o,...l})=>t&&r?e.jsx(s.FormField,{control:r,name:t,rules:n,render:({field:i})=>e.jsxs(s.FormItem,{children:[a&&e.jsxs(s.FormLabel,{className:"block",children:[a," ",c&&e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx(s.FormControl,{children:e.jsx(s.HtmlEditor,{...i,...l})}),e.jsx(s.FormMessage,{className:m.cn(o&&"absolute -bottom-5")})]})}):e.jsx(s.HtmlEditor,{...l}),S=({control:r,name:t,label:a,rules:n,required:c,floatingError:o,...l})=>t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:n,render:({field:i,formState:d})=>e.jsxs(s.FormItem,{children:[a&&e.jsxs(s.FormLabel,{className:"block",children:[a," ",c&&e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx(s.FormControl,{children:e.jsx(s.MaskInput,{thousandsSeparator:" ",lazy:!1,placeholderChar:"_",unmask:!0,...i,...l,variant:u.lodashExports.get(d.errors,`${t}.message`)?"failure":"default",onAccept:x=>i.onChange(x)})}),e.jsx(s.FormMessage,{className:m.cn(o&&"absolute -bottom-5")})]})})||null,E=({control:r,name:t,label:a,rules:n,value:c,...o})=>{const l=g.useId();return t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:n,render:({field:i})=>e.jsx(s.FormLabel,{className:"block",htmlFor:o.id||l,children:e.jsxs(s.FormItem,{className:"flex flex-row items-start gap-3",children:[e.jsx(s.FormControl,{children:e.jsx(s.RadioGroupItem,{id:o.id||l,value:c,checked:i.value===c,onClick:()=>{i.value!==c&&i.onChange(c)},...o})}),e.jsx("div",{className:"space-y-1 leading-none",children:a&&e.jsx("div",{children:a})})]})})})||null},R=({control:r,name:t,label:a,rules:n,...c})=>{const o=g.useId();return t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:n,render:({field:l})=>e.jsx(s.FormLabel,{className:"block",htmlFor:c.id||o,children:e.jsxs(s.FormItem,{className:"flex flex-row items-start gap-3",children:[e.jsx(s.FormControl,{children:e.jsx(s.Switch,{id:c.id||o,className:"m-0",checked:l.value,onCheckedChange:l.onChange,...c})}),e.jsx("div",{className:"space-y-1 leading-none",children:a&&e.jsx("div",{children:a})})]})})})||null},T=({control:r,name:t,label:a,required:n,rules:c,className:o,floatingError:l,...i})=>t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:c,render:({field:d,formState:x})=>e.jsxs(s.FormItem,{children:[a&&e.jsxs(s.FormLabel,{className:"block",children:[a," ",n&&e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx(s.FormControl,{children:e.jsx(s.Textarea,{variant:u.lodashExports.get(x.errors,`${t}.message`)?"failure":"default",...i,...d,className:m.cn(o)})}),e.jsx(s.FormMessage,{className:m.cn(l&&"absolute -bottom-5")})]})})||null,L=({control:r,name:t,label:a,required:n,className:c,rules:o,floatingError:l,...i})=>t&&r?e.jsx(s.FormField,{control:r,name:t,rules:o,render:({field:d})=>e.jsxs(s.FormItem,{children:[a&&e.jsxs(s.FormLabel,{className:"block",children:[a," ",n&&e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx(s.FormControl,{children:e.jsx(j.TimePicker,{...d,...i})}),e.jsx(s.FormMessage,{className:m.cn(l&&"absolute -bottom-5")})]})}):e.jsx(j.TimePicker,{className:"mt-2",...i});exports.MyInput=p.MyInput;exports.MySelect=v.MySelect;exports.MyCheckbox=I;exports.MyDatePicker=P;exports.MyDateRangePicker=f;exports.MyHtmlEditor=q;exports.MyMaskInput=S;exports.MyRadio=E;exports.MySwitch=R;exports.MyTextarea=T;exports.MyTimePicker=L;Object.keys(s).forEach(r=>{r!=="default"&&!Object.prototype.hasOwnProperty.call(exports,r)&&Object.defineProperty(exports,r,{enumerable:!0,get:()=>s[r]})});
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.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 </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 <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\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 <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 </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 <HtmlEditor {...field} {...props} />\n </FormControl>\n <FormMessage className={cn(floatingError && 'absolute -bottom-5')} />\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 <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 </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 <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 </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 <TimePicker {...field} {...props} />\n </FormControl>\n <FormMessage className={cn(floatingError && 'absolute -bottom-5')} />\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","PopoverContent","Calendar","FormMessage","MyDateRangePicker","DateRangePicker","MyHtmlEditor","HtmlEditor","MyMaskInput","MaskInput","value","MyRadio","RadioGroupItem","MySwitch","Switch","MyTextarea","Textarea","MyTimePicker","TimePicker"],"mappings":"8dA8BaA,EAAa,CAAmC,CAC3D,QAAAC,EACA,KAAAC,EACA,MAAAC,EACA,MAAAC,EACA,GAAGC,CACL,IAAqC,CACnC,MAAMC,EAAKC,EAAAA,MAAA,EACX,OACGL,GAAQD,GACPO,EAAAA,IAACC,EAAAA,UAAA,CACC,QAAAR,EACA,KAAAC,EACA,MAAAE,EACA,OAAQ,CAAC,CAAE,MAAAM,WACRC,EAAAA,UAAA,CAAU,UAAW,QAAS,QAASN,EAAM,IAAMC,EAClD,SAAAM,EAAAA,KAACC,EAAAA,SAAA,CAAS,UAAU,kCAClB,SAAA,CAAAL,MAACM,EAAAA,YAAA,CACC,SAAAN,EAAAA,IAACO,EAAAA,SAAA,CACC,GAAIV,EAAM,IAAMC,EAChB,QAASI,EAAM,MACf,gBAAiBA,EAAM,SACtB,GAAGL,CAAA,CAAA,EAER,EACAG,EAAAA,IAAC,OAAI,UAAU,yBACZ,YAASA,EAAAA,IAAC,MAAA,CAAK,WAAM,CAAA,CACxB,CAAA,CAAA,CACF,CAAA,CACF,CAAA,CAAA,GAIN,IAEJ,ECdaQ,EAAe,CAAmC,CAC7D,QAAAf,EACA,KAAAC,EACA,MAAAC,EACA,SAAA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OAAQ,CAAC,CAAE,MAAAM,CAAA,WACRG,EAAAA,SAAA,CACE,SAAA,CAAAV,GACCS,EAAAA,KAACD,EAAAA,UAAA,CAAU,UAAW,QACnB,SAAA,CAAAR,EAAM,IAAEc,GAAYT,EAAAA,IAAC,OAAA,CAAK,UAAW,eAAgB,SAAA,GAAA,CAAC,CAAA,EACzD,EAEFA,EAAAA,IAACM,EAAAA,aACC,SAAAN,MAAC2C,EAAAA,WAAA,CAAY,GAAGzC,EAAQ,GAAGL,EAAO,EACpC,QACC+B,EAAAA,YAAA,CAAY,UAAWJ,EAAAA,GAAGZ,GAAiB,oBAAoB,CAAA,CAAG,CAAA,CAAA,CACrE,CAAA,CAAA,EAIJZ,EAAAA,IAAC2C,EAAAA,WAAA,CAAW,UAAW,OAAS,GAAG9C,EAAO"}
1
+ {"version":3,"file":"index.cjs.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 </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 <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\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 </div>\n </FormControl>\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\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 <HtmlEditor {...field} {...props} />\n </FormControl>\n <FormMessage className={cn(floatingError && 'absolute -bottom-5')} />\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 <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 </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 <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 </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 <TimePicker {...field} {...props} />\n </FormControl>\n <FormMessage className={cn(floatingError && 'absolute -bottom-5')} />\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","PopoverContent","Calendar","FormMessage","MyDateRangePicker","DateRangePicker","MyHtmlEditor","HtmlEditor","MyMaskInput","MaskInput","value","MyRadio","RadioGroupItem","MySwitch","Switch","MyTextarea","Textarea","MyTimePicker","TimePicker"],"mappings":"8dA8BaA,EAAa,CAAmC,CAC3D,QAAAC,EACA,KAAAC,EACA,MAAAC,EACA,MAAAC,EACA,GAAGC,CACL,IAAqC,CACnC,MAAMC,EAAKC,EAAAA,MAAA,EACX,OACGL,GAAQD,GACPO,EAAAA,IAACC,EAAAA,UAAA,CACC,QAAAR,EACA,KAAAC,EACA,MAAAE,EACA,OAAQ,CAAC,CAAE,MAAAM,WACRC,EAAAA,UAAA,CAAU,UAAW,QAAS,QAASN,EAAM,IAAMC,EAClD,SAAAM,EAAAA,KAACC,EAAAA,SAAA,CAAS,UAAU,kCAClB,SAAA,CAAAL,MAACM,EAAAA,YAAA,CACC,SAAAN,EAAAA,IAACO,EAAAA,SAAA,CACC,GAAIV,EAAM,IAAMC,EAChB,QAASI,EAAM,MACf,gBAAiBA,EAAM,SACtB,GAAGL,CAAA,CAAA,EAER,EACAG,EAAAA,IAAC,OAAI,UAAU,yBACZ,YAASA,EAAAA,IAAC,MAAA,CAAK,WAAM,CAAA,CACxB,CAAA,CAAA,CACF,CAAA,CACF,CAAA,CAAA,GAIN,IAEJ,ECdaQ,EAAe,CAAmC,CAC7D,QAAAf,EACA,KAAAC,EACA,MAAAC,EACA,SAAAc,EACA,MAAAb,EACA,OAAAc,EAASC,EAAAA,KACT,cAAAC,EACA,YAAAC,EACA,SAAAC,EACA,SAAAC,EACA,UAAAC,EACA,WAAAC,EACA,GAAGpB,CACL,IAEKH,GAAQD,GACPO,EAAAA,IAACC,EAAAA,UAAA,CACC,QAAAR,EACA,KAAAC,EACA,MAAAE,EACA,OAAQ,CAAC,CAAE,MAAAM,EAAO,UAAAgB,CAAA,WACfb,EAAAA,SAAA,CACE,SAA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IAACM,EAAAA,aACC,SAAAN,MAAC2C,EAAAA,WAAA,CAAY,GAAGzC,EAAQ,GAAGL,EAAO,EACpC,QACC+B,EAAAA,YAAA,CAAY,UAAWJ,EAAAA,GAAGZ,GAAiB,oBAAoB,CAAA,CAAG,CAAA,CAAA,CACrE,CAAA,CAAA,EAIJZ,EAAAA,IAAC2C,EAAAA,WAAA,CAAW,UAAW,OAAS,GAAG9C,EAAO"}
@@ -1,6 +1,6 @@
1
1
  import { FormField as h, 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";
2
2
  export * from "dgz-ui/form";
3
- import { jsx as e, jsxs as i } from "react/jsx-runtime";
3
+ import { jsx as e, jsxs as o } from "react/jsx-runtime";
4
4
  import { useId as y } from "react";
5
5
  import { DATE as E, Calendar as $, TimePicker as f } from "dgz-ui/calendar";
6
6
  import { Popover as j, PopoverTrigger as z, PopoverContent as A } from "dgz-ui/popover";
@@ -8,7 +8,7 @@ import { cn as m, dayjs as H } from "dgz-ui/utils";
8
8
  import { l as v } 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 oe } from "../../chunks/MyInput-VyzguJnO.es.js";
11
+ import { M as ie } from "../../chunks/MyInput-VyzguJnO.es.js";
12
12
  import { M as de } from "../../chunks/MySelect-DzvUAkVs.es.js";
13
13
  const W = ({
14
14
  control: a,
@@ -24,7 +24,7 @@ const W = ({
24
24
  control: a,
25
25
  name: r,
26
26
  rules: n,
27
- render: ({ field: l }) => /* @__PURE__ */ e(u, { className: "block", htmlFor: t.id || c, children: /* @__PURE__ */ i(N, { className: "flex flex-row items-start gap-3", children: [
27
+ render: ({ field: l }) => /* @__PURE__ */ e(u, { className: "block", htmlFor: t.id || c, children: /* @__PURE__ */ o(N, { className: "flex flex-row items-start gap-3", children: [
28
28
  /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(
29
29
  I,
30
30
  {
@@ -46,7 +46,7 @@ const W = ({
46
46
  rules: t,
47
47
  format: c = E,
48
48
  floatingError: l,
49
- placeholder: o,
49
+ placeholder: i,
50
50
  disabled: d,
51
51
  register: k,
52
52
  className: M,
@@ -58,14 +58,14 @@ const W = ({
58
58
  control: a,
59
59
  name: r,
60
60
  rules: t,
61
- render: ({ field: x, formState: P }) => /* @__PURE__ */ i(N, { children: [
62
- s && /* @__PURE__ */ i(u, { className: "block", children: [
61
+ render: ({ field: x, formState: P }) => /* @__PURE__ */ o(N, { children: [
62
+ s && /* @__PURE__ */ o(u, { className: "block", children: [
63
63
  s,
64
64
  " ",
65
65
  n && /* @__PURE__ */ e("span", { className: "text-red-600", children: "*" })
66
66
  ] }),
67
- /* @__PURE__ */ i(j, { children: [
68
- /* @__PURE__ */ e(z, { asChild: !0, children: /* @__PURE__ */ e(g, { children: /* @__PURE__ */ i("div", { className: "relative", children: [
67
+ /* @__PURE__ */ o(j, { children: [
68
+ /* @__PURE__ */ e(z, { asChild: !0, children: /* @__PURE__ */ e(g, { children: /* @__PURE__ */ o("div", { className: "relative", children: [
69
69
  /* @__PURE__ */ e(
70
70
  w,
71
71
  {
@@ -74,7 +74,7 @@ const W = ({
74
74
  disabled: d,
75
75
  ...x,
76
76
  readOnly: !0,
77
- placeholder: o || "Pick a date",
77
+ placeholder: i || "Pick a date",
78
78
  value: H(x.value).format(c),
79
79
  className: m("m-0 text-start", M)
80
80
  }
@@ -115,29 +115,29 @@ const W = ({
115
115
  rules: t,
116
116
  placeholder: c,
117
117
  floatingError: l,
118
- ...o
118
+ ...i
119
119
  }) => r && a && /* @__PURE__ */ e(
120
120
  h,
121
121
  {
122
122
  control: a,
123
123
  name: r,
124
124
  rules: t,
125
- render: ({ field: d, formState: k }) => /* @__PURE__ */ i(N, { children: [
126
- s && /* @__PURE__ */ i(u, { className: "block", children: [
125
+ render: ({ field: d, formState: k }) => /* @__PURE__ */ o(N, { children: [
126
+ s && /* @__PURE__ */ o(u, { className: "block", children: [
127
127
  s,
128
128
  " ",
129
129
  n && /* @__PURE__ */ e("span", { className: "text-red-600", children: "*" })
130
130
  ] }),
131
- /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(
131
+ /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
132
132
  L,
133
133
  {
134
- ...o,
134
+ ...i,
135
135
  error: `${v.get(k.errors, r, "")}`,
136
136
  selected: d.value,
137
137
  onRangeSelected: d.onChange,
138
138
  placeholder: c
139
139
  }
140
- ) }),
140
+ ) }) }),
141
141
  /* @__PURE__ */ e(
142
142
  p,
143
143
  {
@@ -160,13 +160,13 @@ const W = ({
160
160
  control: a,
161
161
  name: r,
162
162
  rules: n,
163
- render: ({ field: o }) => /* @__PURE__ */ i(N, { children: [
164
- s && /* @__PURE__ */ i(u, { className: "block", children: [
163
+ render: ({ field: i }) => /* @__PURE__ */ o(N, { children: [
164
+ s && /* @__PURE__ */ o(u, { className: "block", children: [
165
165
  s,
166
166
  " ",
167
167
  t && /* @__PURE__ */ e("span", { className: "text-red-600", children: "*" })
168
168
  ] }),
169
- /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(C, { ...o, ...l }) }),
169
+ /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(C, { ...i, ...l }) }),
170
170
  /* @__PURE__ */ e(p, { className: m(c && "absolute -bottom-5") })
171
171
  ] })
172
172
  }
@@ -184,8 +184,8 @@ const W = ({
184
184
  control: a,
185
185
  name: r,
186
186
  rules: n,
187
- render: ({ field: o, formState: d }) => /* @__PURE__ */ i(N, { children: [
188
- s && /* @__PURE__ */ i(u, { className: "block", children: [
187
+ render: ({ field: i, formState: d }) => /* @__PURE__ */ o(N, { children: [
188
+ s && /* @__PURE__ */ o(u, { className: "block", children: [
189
189
  s,
190
190
  " ",
191
191
  t && /* @__PURE__ */ e("span", { className: "text-red-600", children: "*" })
@@ -197,10 +197,10 @@ const W = ({
197
197
  lazy: !1,
198
198
  placeholderChar: "_",
199
199
  unmask: !0,
200
- ...o,
200
+ ...i,
201
201
  ...l,
202
202
  variant: v.get(d.errors, `${r}.message`) ? "failure" : "default",
203
- onAccept: (k) => o.onChange(k)
203
+ onAccept: (k) => i.onChange(k)
204
204
  }
205
205
  ) }),
206
206
  /* @__PURE__ */ e(
@@ -226,15 +226,15 @@ const W = ({
226
226
  control: a,
227
227
  name: r,
228
228
  rules: n,
229
- render: ({ field: o }) => /* @__PURE__ */ e(u, { className: "block", htmlFor: c.id || l, children: /* @__PURE__ */ i(N, { className: "flex flex-row items-start gap-3", children: [
229
+ render: ({ field: i }) => /* @__PURE__ */ e(u, { className: "block", htmlFor: c.id || l, children: /* @__PURE__ */ o(N, { className: "flex flex-row items-start gap-3", children: [
230
230
  /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(
231
231
  T,
232
232
  {
233
233
  id: c.id || l,
234
234
  value: t,
235
- checked: o.value === t,
235
+ checked: i.value === t,
236
236
  onClick: () => {
237
- o.value !== t && o.onChange(t);
237
+ i.value !== t && i.onChange(t);
238
238
  },
239
239
  ...c
240
240
  }
@@ -257,7 +257,7 @@ const W = ({
257
257
  control: a,
258
258
  name: r,
259
259
  rules: n,
260
- render: ({ field: l }) => /* @__PURE__ */ e(u, { className: "block", htmlFor: t.id || c, children: /* @__PURE__ */ i(N, { className: "flex flex-row items-start gap-3", children: [
260
+ render: ({ field: l }) => /* @__PURE__ */ e(u, { className: "block", htmlFor: t.id || c, children: /* @__PURE__ */ o(N, { className: "flex flex-row items-start gap-3", children: [
261
261
  /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(
262
262
  D,
263
263
  {
@@ -280,15 +280,15 @@ const W = ({
280
280
  rules: t,
281
281
  className: c,
282
282
  floatingError: l,
283
- ...o
283
+ ...i
284
284
  }) => r && a && /* @__PURE__ */ e(
285
285
  h,
286
286
  {
287
287
  control: a,
288
288
  name: r,
289
289
  rules: t,
290
- render: ({ field: d, formState: k }) => /* @__PURE__ */ i(N, { children: [
291
- s && /* @__PURE__ */ i(u, { className: "block", children: [
290
+ render: ({ field: d, formState: k }) => /* @__PURE__ */ o(N, { children: [
291
+ s && /* @__PURE__ */ o(u, { className: "block", children: [
292
292
  s,
293
293
  " ",
294
294
  n && /* @__PURE__ */ e("span", { className: "text-red-600", children: "*" })
@@ -297,7 +297,7 @@ const W = ({
297
297
  R,
298
298
  {
299
299
  variant: v.get(k.errors, `${r}.message`) ? "failure" : "default",
300
- ...o,
300
+ ...i,
301
301
  ...d,
302
302
  className: m(c)
303
303
  }
@@ -318,30 +318,30 @@ const W = ({
318
318
  className: t,
319
319
  rules: c,
320
320
  floatingError: l,
321
- ...o
321
+ ...i
322
322
  }) => r && a ? /* @__PURE__ */ e(
323
323
  h,
324
324
  {
325
325
  control: a,
326
326
  name: r,
327
327
  rules: c,
328
- render: ({ field: d }) => /* @__PURE__ */ i(N, { children: [
329
- s && /* @__PURE__ */ i(u, { className: "block", children: [
328
+ render: ({ field: d }) => /* @__PURE__ */ o(N, { children: [
329
+ s && /* @__PURE__ */ o(u, { className: "block", children: [
330
330
  s,
331
331
  " ",
332
332
  n && /* @__PURE__ */ e("span", { className: "text-red-600", children: "*" })
333
333
  ] }),
334
- /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(f, { ...d, ...o }) }),
334
+ /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(f, { ...d, ...i }) }),
335
335
  /* @__PURE__ */ e(p, { className: m(l && "absolute -bottom-5") })
336
336
  ] })
337
337
  }
338
- ) : /* @__PURE__ */ e(f, { className: "mt-2", ...o });
338
+ ) : /* @__PURE__ */ e(f, { className: "mt-2", ...i });
339
339
  export {
340
340
  W as MyCheckbox,
341
341
  X as MyDatePicker,
342
342
  Y as MyDateRangePicker,
343
343
  Z as MyHtmlEditor,
344
- oe as MyInput,
344
+ ie as MyInput,
345
345
  ee as MyMaskInput,
346
346
  re as MyRadio,
347
347
  de as MySelect,
@@ -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 </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 <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\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 <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 </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 <HtmlEditor {...field} {...props} />\n </FormControl>\n <FormMessage className={cn(floatingError && 'absolute -bottom-5')} />\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 <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 </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 <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 </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 <TimePicker {...field} {...props} />\n </FormControl>\n <FormMessage className={cn(floatingError && 'absolute -bottom-5')} />\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","PopoverContent","Calendar","FormMessage","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,O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GAAGxB,CAAI,UAAU,IACnC,YACA;AAAA,UAEL,GAAGG;AAAA,UACH,GAAGK;AAAA,UACJ,WAAWsB,EAAGR,CAAS;AAAA,QAAA;AAAA,MAAA,GAE3B;AAAA,MACA,gBAAAhB;AAAA,QAAC4B;AAAA,QAAA;AAAA,UACC,WAAWJ,EAAGZ,KAAiB,oBAAoB;AAAA,QAAA;AAAA,MAAA;AAAA,IACrD,EAAA,CACF;AAAA,EAAA;AAAA,KAIN,MCvCS8B,KAAe,CAAmC;AAAA,EAC7D,SAAAjD;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAc;AAAA,EACA,WAAAO;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,MAEF,gBAAAA,EAACM,KACC,UAAA,gBAAAN,EAAC2C,GAAA,EAAY,GAAGzC,GAAQ,GAAGL,GAAO,GACpC;AAAA,wBACC+B,GAAA,EAAY,WAAWJ,EAAGZ,KAAiB,oBAAoB,EAAA,CAAG;AAAA,IAAA,EAAA,CACrE;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 <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 </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 <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\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 </div>\n </FormControl>\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\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 <HtmlEditor {...field} {...props} />\n </FormControl>\n <FormMessage className={cn(floatingError && 'absolute -bottom-5')} />\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 <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 </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 <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 </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 <TimePicker {...field} {...props} />\n </FormControl>\n <FormMessage className={cn(floatingError && 'absolute -bottom-5')} />\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","PopoverContent","Calendar","FormMessage","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;AAA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;AAAA,QAAA;AAAA,MAAA,GAE3B;AAAA,MACA,gBAAAhB;AAAA,QAAC4B;AAAA,QAAA;AAAA,UACC,WAAWJ,EAAGZ,KAAiB,oBAAoB;AAAA,QAAA;AAAA,MAAA;AAAA,IACrD,EAAA,CACF;AAAA,EAAA;AAAA,KAIN,MCvCS8B,KAAe,CAAmC;AAAA,EAC7D,SAAAjD;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAc;AAAA,EACA,WAAAO;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,MAEF,gBAAAA,EAACM,KACC,UAAA,gBAAAN,EAAC2C,GAAA,EAAY,GAAGzC,GAAQ,GAAGL,GAAO,GACpC;AAAA,wBACC+B,GAAA,EAAY,WAAWJ,EAAGZ,KAAiB,oBAAoB,EAAA,CAAG;AAAA,IAAA,EAAA,CACrE;AAAA,EAAA;AAAA,IAIJ,gBAAAZ,EAAC2C,GAAA,EAAW,WAAW,QAAS,GAAG9C,GAAO;"}
@@ -1 +1 @@
1
- {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/App.tsx"],"names":[],"mappings":"AAiBA,iBAAS,GAAG,4CAuLX;AAED,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/App.tsx"],"names":[],"mappings":"AAiBA,iBAAS,GAAG,4CAwLX;AAED,eAAe,GAAG,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MyDateRangePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/form/MyDateRangePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,aAAa,EAGnB,MAAM,aAAa,CAAC;AAGrB,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAE3E;;;GAGG;AACH,MAAM,MAAM,sBAAsB,CAAC,YAAY,SAAS,WAAW,IACjE,aAAa,CAAC,YAAY,CAAC,GACzB,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC,GAAG;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEN;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,GAAI,YAAY,SAAS,WAAW,EAAE,iFASjE,sBAAsB,CAAC,YAAY,CAAC,mDAgCtC,CAAC"}
1
+ {"version":3,"file":"MyDateRangePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/form/MyDateRangePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,aAAa,EAGnB,MAAM,aAAa,CAAC;AAGrB,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAE3E;;;GAGG;AACH,MAAM,MAAM,sBAAsB,CAAC,YAAY,SAAS,WAAW,IACjE,aAAa,CAAC,YAAY,CAAC,GACzB,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC,GAAG;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEN;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,GAAI,YAAY,SAAS,WAAW,EAAE,iFASjE,sBAAsB,CAAC,YAAY,CAAC,mDAkCtC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dgz-ui-shared",
3
- "version": "1.2.22",
3
+ "version": "1.2.23",
4
4
  "description": "Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript, dgz-ui library",
5
5
  "keywords": [
6
6
  "dgz-ui",
@@ -179,7 +179,7 @@
179
179
  },
180
180
  "dependencies": {
181
181
  "@hookform/resolvers": "^5.0.1",
182
- "dgz-ui": "^1.4.13",
182
+ "dgz-ui": "^1.4.14",
183
183
  "file-saver": "^2.0.5",
184
184
  "lodash": "^4.17.21",
185
185
  "lucide-react": "^0.563.0",