dgz-ui-shared 1.2.33 → 1.2.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/form/index.cjs.js +1 -1
- package/dist/components/form/index.cjs.js.map +1 -1
- package/dist/components/form/index.es.js +263 -186
- package/dist/components/form/index.es.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/components/form/MyDatePicker.d.ts +7 -1
- package/dist/types/components/form/MyDatePicker.d.ts.map +1 -1
- package/dist/types/components/form/MyShadcnSelect.d.ts +39 -0
- package/dist/types/components/form/MyShadcnSelect.d.ts.map +1 -0
- package/dist/types/components/form/index.d.ts +1 -0
- package/dist/types/components/form/index.d.ts.map +1 -1
- package/package.json +3 -2
|
@@ -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"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("dgz-ui/form"),e=require("react/jsx-runtime"),b=require("react"),F=require("dgz-ui/calendar"),M=require("dgz-ui/popover"),x=require("dgz-ui/utils"),g=require("../../chunks/lodash-BjH0kD7j.cjs.js"),S=require("lucide-react"),I=require("../../chunks/DateRangePicker-CUv-qznZ.cjs.js"),P=require("../../chunks/MyInput-5ir4eN2m.cjs.js"),f=require("../../chunks/MySelect-Dl3jKf5s.cjs.js"),T=({control:r,name:t,label:a,rules:o,...l})=>{const c=b.useId();return t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:o,render:({field:n})=>e.jsx(s.FormLabel,{className:"block",htmlFor:l.id||c,children:e.jsxs(s.FormItem,{className:"flex flex-row items-start gap-3",children:[e.jsx(s.FormControl,{children:e.jsx(s.Checkbox,{id:l.id||c,checked:n.value,onCheckedChange:n.onChange,...l})}),e.jsx("div",{className:"space-y-1 leading-none",children:a&&e.jsx("div",{children:a})})]})})})||null},q=({control:r,name:t,label:a,required:o,rules:l,format:c=F.DATE,floatingError:n,placeholder:i,disabled:m,register:h,className:j,showTime:y,inputProps:N,...v})=>t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:l,render:({field:d,formState:u})=>e.jsxs(s.FormItem,{children:[a&&e.jsxs(s.FormLabel,{className:"block",children:[a," ",o&&e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs(M.Popover,{children:[e.jsx(M.PopoverTrigger,{asChild:!0,children:e.jsxs("div",{className:"relative",children:[e.jsx(s.FormControl,{children:e.jsx(s.Input,{...N,variant:g.lodashExports.get(u.errors,`${t}.message`)?"failure":"default",disabled:m,...d,readOnly:!0,placeholder:i||"Pick a date",value:x.dayjs(d.value).format(c),className:x.cn("m-0 text-start",j)})}),e.jsx(S.Calendar1,{className:x.cn("text-secondary absolute top-2.5 right-2 size-5",m&&"pointer-events-none opacity-50")}),e.jsx(s.FormMessage,{className:x.cn(n&&"absolute -bottom-5")})]})}),!m&&e.jsxs(M.PopoverContent,{className:"w-auto p-0",align:"start",children:[e.jsx(F.Calendar,{...v,mode:"single",selected:d.value,onSelect:d.onChange}),y&&e.jsx("div",{className:"px-4 pb-3",children:e.jsx(F.TimePicker,{value:x.dayjs(d.value).format("HH:mm"),onChange:p=>{const[k,C]=p.split(":");d.onChange(x.dayjs(d.value).set("hour",Number(k)).set("minute",Number(C)).toDate())}})})]})]})]})})||null,E=({control:r,name:t,label:a,required:o,rules:l,placeholder:c,floatingError:n,...i})=>t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:l,render:({field:m,formState:h})=>e.jsxs(s.FormItem,{children:[a&&e.jsxs(s.FormLabel,{className:"block",children:[a," ",o&&e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{children:[e.jsx(s.FormControl,{children:e.jsx(I.DateRangePicker,{...i,error:`${g.lodashExports.get(h.errors,t,"")}`,selected:m.value,onRangeSelected:m.onChange,placeholder:c})}),e.jsx(s.FormMessage,{className:x.cn(n&&"absolute -bottom-5")})]})]})})||null,L=({control:r,name:t,label:a,rules:o,required:l,floatingError:c,...n})=>t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:o,render:({field:i})=>e.jsxs(s.FormItem,{children:[a&&e.jsxs(s.FormLabel,{className:"block",children:[a," ",l&&e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{children:[e.jsx(s.FormControl,{children:e.jsx(s.HtmlEditor,{...i,...n})}),e.jsx(s.FormMessage,{className:x.cn(c&&"absolute -bottom-5")})]})]})})||null,R=({control:r,name:t,label:a,rules:o,required:l,floatingError:c,...n})=>t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:o,render:({field:i,formState:m})=>e.jsxs(s.FormItem,{children:[a&&e.jsxs(s.FormLabel,{className:"block",children:[a," ",l&&e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{children:[e.jsx(s.FormControl,{children:e.jsx(s.MaskInput,{thousandsSeparator:" ",lazy:!1,placeholderChar:"_",unmask:!0,...i,...n,variant:g.lodashExports.get(m.errors,`${t}.message`)?"failure":"default",onAccept:h=>i.onChange(h)})}),e.jsx(s.FormMessage,{className:x.cn(c&&"absolute -bottom-5")})]})]})})||null,w=({control:r,name:t,label:a,rules:o,value:l,...c})=>{const n=b.useId();return t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:o,render:({field:i})=>e.jsx(s.FormLabel,{className:"block",htmlFor:c.id||n,children:e.jsxs(s.FormItem,{className:"flex flex-row items-start gap-3",children:[e.jsx(s.FormControl,{children:e.jsx(s.RadioGroupItem,{id:c.id||n,value:l,checked:i.value===l,onClick:()=>{i.value!==l&&i.onChange(l)},...c})}),e.jsx("div",{className:"space-y-1 leading-none",children:a&&e.jsx("div",{children:a})})]})})})||null},D=({control:r,name:t,label:a,required:o,className:l,rules:c,options:n=[],placeholder:i="Select an option",disabled:m,onChange:h})=>t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:c,render:({field:j,formState:y})=>{const N=!!g.lodashExports.get(y.errors,`${t}`),v=d=>{const u=Number(d)?Number(d):d;u&&j.value!==u&&(j.onChange(u),h==null||h(u))};return e.jsxs(s.FormItem,{children:[a&&e.jsxs(s.FormLabel,{children:[a," ",o&&e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{children:[e.jsx(s.FormControl,{children:e.jsxs(s.Select,{value:`${j.value||""}`,onValueChange:v,disabled:m,children:[e.jsx(s.SelectTrigger,{ref:j.ref,variant:N?"failure":"default",className:x.cn(l),children:e.jsx(s.SelectValue,{placeholder:i})}),e.jsx(s.SelectContent,{children:n.map(d=>e.jsx(s.SelectItem,{value:String(d.value),children:d.label},String(d.value)))})]})}),e.jsx(s.FormMessage,{})]})]})}}),O=({control:r,name:t,label:a,rules:o,...l})=>{const c=b.useId();return t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:o,render:({field:n})=>e.jsx(s.FormLabel,{className:"block",htmlFor:l.id||c,children:e.jsxs(s.FormItem,{className:"flex flex-row items-start gap-3",children:[e.jsx(s.FormControl,{children:e.jsx(s.Switch,{id:l.id||c,className:"m-0",checked:n.value,onCheckedChange:n.onChange,...l})}),e.jsx("div",{className:"space-y-1 leading-none",children:a&&e.jsx("div",{children:a})})]})})})||null},$=({control:r,name:t,label:a,required:o,rules:l,className:c,floatingError:n,...i})=>t&&r&&e.jsx(s.FormField,{control:r,name:t,rules:l,render:({field:m,formState:h})=>e.jsxs(s.FormItem,{children:[a&&e.jsxs(s.FormLabel,{className:"block",children:[a," ",o&&e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsxs("div",{children:[e.jsx(s.FormControl,{children:e.jsx(s.Textarea,{variant:g.lodashExports.get(h.errors,`${t}.message`)?"failure":"default",...i,...m,className:x.cn(c)})}),e.jsx(s.FormMessage,{className:x.cn(n&&"absolute -bottom-5")})]})]})})||null,H=({control:r,name:t,label:a,required:o,className:l,rules:c,floatingError:n,...i})=>t&&r?e.jsx(s.FormField,{control:r,name:t,rules:c,render:({field:m})=>e.jsxs(s.FormItem,{children:[a&&e.jsxs(s.FormLabel,{className:"block",children:[a," ",o&&e.jsx("span",{className:"text-red-600",children:"*"})]})," ",e.jsxs("div",{children:[e.jsx(s.FormControl,{children:e.jsx(F.TimePicker,{...m,...i})}),e.jsx(s.FormMessage,{className:x.cn(n&&"absolute -bottom-5")})]})]})}):e.jsx(F.TimePicker,{className:"mt-2",...i});exports.MyInput=P.MyInput;exports.MySelect=f.MySelect;exports.MyCheckbox=T;exports.MyDatePicker=q;exports.MyDateRangePicker=E;exports.MyHtmlEditor=L;exports.MyMaskInput=R;exports.MyRadio=w;exports.MyShadcnSelect=D;exports.MySwitch=O;exports.MyTextarea=$;exports.MyTimePicker=H;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 <div className={'relative'}>\n <FormControl>\n <Input\n {...inputProps}\n variant={\n get(formState.errors, `${name}.message`)\n ? 'failure'\n : 'default'\n }\n disabled={disabled}\n {...field}\n readOnly\n placeholder={placeholder || 'Pick a date'}\n value={dayjs(field.value).format(format)}\n className={cn('m-0 text-start', className)}\n />\n </FormControl>\n <Calendar1\n className={cn(\n 'text-secondary absolute top-2.5 right-2 size-5',\n disabled && 'pointer-events-none opacity-50'\n )}\n />\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </PopoverTrigger>\n {!disabled && (\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\n <Calendar\n {...props}\n mode=\"single\"\n selected={field.value}\n onSelect={field.onChange}\n />\n </PopoverContent>\n )}\n </Popover>\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\nimport { DateRangePicker, type DateRangePickerProps } from '../datepicker';\n\n/**\n * Props for the MyDateRangePicker component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyDateRangePickerProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n Omit<DateRangePickerProps, 'required'> & {\n required?: boolean;\n };\n\n/**\n * MyDateRangePicker renders a date range selector integrated with react-hook-form.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the date range picker.\n * @param required - Whether the field is required.\n * @param rules - The `react-hook-form` validation rules.\n * @param format - The date format for display.\n * @param placeholder - The placeholder text when no date is selected.\n * @param props - DateRangePicker props and form item props.\n * @returns A date range picker integrated with react-hook-form.\n */\nexport const MyDateRangePicker = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n rules,\n placeholder,\n floatingError,\n ...props\n}: MyDateRangePickerProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <div>\n <FormControl>\n <DateRangePicker\n {...props}\n error={`${get(formState.errors, name, '')}`}\n selected={field.value}\n onRangeSelected={field.onChange}\n placeholder={placeholder}\n />\n </FormControl>\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n HtmlEditor,\n type HtmlEditorProps,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyHtmlEditor component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyHtmlEditorProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n HtmlEditorProps & {\n /** Whether the field is required. */\n required?: boolean;\n };\n\n/**\n * MyHtmlEditor is a rich-text HTML editor with optional react-hook-form integration.\n * Works in both controlled (with control/name) and uncontrolled modes.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the HTML editor.\n * @param rules - The `react-hook-form` validation rules.\n * @param required - Whether the field is required.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - HtmlEditor and form item props.\n * @returns React element rendering an HtmlEditor with label, helper text, and validation message.\n */\nexport const MyHtmlEditor = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n required,\n floatingError,\n ...props\n}: MyHtmlEditorProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <div>\n <FormControl>\n <HtmlEditor {...field} {...props} />\n </FormControl>\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n MaskInput,\n type MaskInputProps,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyMaskInput component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyMaskInputProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n MaskInputProps & {\n /** Whether the field is required. */\n required?: boolean;\n };\n\n/**\n * MyMaskInput is an input component with masking support and optional react-hook-form integration.\n * Works in both controlled (with control/name) and uncontrolled modes. By default it uses a space as\n * thousands separator, underscores as placeholder characters, lazy formatting disabled, and returns\n * unmasked value on change.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the mask input.\n * @param rules - The `react-hook-form` validation rules.\n * @param required - Whether the field is required.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - MaskInput and form item props.\n * @returns React element rendering a masked input with label, helper text, and validation message.\n */\nexport const MyMaskInput = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n required,\n floatingError,\n ...props\n}: MyMaskInputProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <div>\n <FormControl>\n <MaskInput\n thousandsSeparator={' '}\n lazy={false}\n placeholderChar=\"_\"\n unmask\n {...field}\n {...props}\n variant={\n get(formState.errors, `${name}.message`)\n ? 'failure'\n : 'default'\n }\n onAccept={(value) => field.onChange(value)}\n />\n </FormControl>\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n RadioGroupItem,\n} from 'dgz-ui/form';\nimport React, { useId } from 'react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\ntype RadioItemProps = React.ComponentPropsWithoutRef<typeof RadioGroupItem>;\n\n/**\n * Props for the MyRadio component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyRadioProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & RadioItemProps;\n\n/**\n * MyRadio is a radio input that can integrate with react-hook-form when control and name are provided.\n * Falls back to an uncontrolled radio item when not used inside a form.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the radio input.\n * @param rules - The `react-hook-form` validation rules.\n * @param value - The value of the radio input.\n * @param props - Radio item and form item props.\n * @returns A radio button item.\n */\nconst MyRadio = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n value,\n ...props\n}: MyRadioProps<TFieldValues>) => {\n const id = useId();\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormLabel className={'block'} htmlFor={props.id || id}>\n <FormItem className=\"flex flex-row items-start gap-3\">\n <FormControl>\n <RadioGroupItem\n id={props.id || id}\n value={value}\n checked={field.value === value}\n onClick={() => {\n if (field.value !== value) {\n field.onChange(value);\n }\n }}\n {...props}\n />\n </FormControl>\n <div className=\"space-y-1 leading-none\">\n {label && <div>{label}</div>}\n </div>\n </FormItem>\n </FormLabel>\n )}\n />\n )) ||\n null\n );\n};\n\nexport { MyRadio };\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n Switch,\n type SwitchProps,\n} from 'dgz-ui/form';\nimport { useId } from 'react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MySwitch component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MySwitchProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & SwitchProps;\n\n/**\n * MySwitch is a toggle switch with optional react-hook-form integration.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the switch.\n * @param rules - The `react-hook-form` validation rules.\n * @param props - Switch and form item props.\n * @returns A toggle switch component, or null if name or control are missing.\n */\nexport const MySwitch = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n ...props\n}: MySwitchProps<TFieldValues>) => {\n const id = useId();\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormLabel className={'block'} htmlFor={props.id || id}>\n <FormItem className=\"flex flex-row items-start gap-3\">\n <FormControl>\n <Switch\n id={props.id || id}\n className={'m-0'}\n checked={field.value}\n onCheckedChange={field.onChange}\n {...props}\n />\n </FormControl>\n <div className=\"space-y-1 leading-none\">\n {label && <div>{label}</div>}\n </div>\n </FormItem>\n </FormLabel>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n Textarea,\n type TextareaProps,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyTextarea component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyTextareaProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & TextareaProps;\n\n/**\n * MyTextarea is a textarea component with optional react-hook-form integration.\n * Supports floating error message styling.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the textarea.\n * @param required - Whether the field is required.\n * @param rules - The `react-hook-form` validation rules.\n * @param className - Custom CSS class name.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - Textarea and form item props.\n * @returns A textarea component integrated with react-hook-form.\n */\nexport const MyTextarea = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n rules,\n className,\n floatingError,\n ...props\n}: MyTextareaProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <div>\n <FormControl>\n <Textarea\n variant={\n get(formState.errors, `${name}.message`)\n ? 'failure'\n : 'default'\n }\n {...props}\n {...field}\n className={cn(className)}\n />\n </FormControl>\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import { TimePicker, type TimePickerProps } from 'dgz-ui/calendar';\nimport {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyTimePicker component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyTimePickerProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n TimePickerProps & {\n /** Whether the field is required. */\n required?: boolean;\n /** Custom CSS class name. */\n className?: string;\n };\n\n/**\n * MyTimePicker is a time selection input with optional react-hook-form integration.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the time picker.\n * @param required - Whether the field is required.\n * @param className - Custom CSS class name.\n * @param rules - The `react-hook-form` validation rules.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - TimePicker and form item props.\n * @returns A time picker component integrated with react-hook-form.\n */\nexport const MyTimePicker = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n className,\n rules,\n floatingError,\n ...props\n}: MyTimePickerProps<TFieldValues>) => {\n return name && control ? (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}{' '}\n <div>\n <FormControl>\n <TimePicker {...field} {...props} />\n </FormControl>\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </FormItem>\n )}\n />\n ) : (\n <TimePicker className={'mt-2'} {...props} />\n );\n};\n"],"names":["MyCheckbox","control","name","label","rules","props","id","useId","jsx","FormField","field","FormLabel","jsxs","FormItem","FormControl","Checkbox","MyDatePicker","required","format","DATE","floatingError","placeholder","disabled","register","className","inputProps","formState","Popover","PopoverTrigger","Input","get","dayjs","cn","Calendar1","FormMessage","PopoverContent","Calendar","MyDateRangePicker","DateRangePicker","MyHtmlEditor","HtmlEditor","MyMaskInput","MaskInput","value","MyRadio","RadioGroupItem","MySwitch","Switch","MyTextarea","Textarea","MyTimePicker","TimePicker"],"mappings":"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,I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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,EACC,WACF,MAAA,CACC,SAAA,CAAAA,EAAAA,IAACM,EAAAA,aACC,SAAAN,MAAC2C,EAAAA,WAAA,CAAY,GAAGzC,EAAQ,GAAGL,EAAO,EACpC,EACAG,EAAAA,IAAC0B,EAAAA,YAAA,CACC,UAAWF,EAAAA,GAAGZ,GAAiB,oBAAoB,CAAA,CAAA,CACrD,CAAA,CACF,CAAA,CAAA,CACF,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/MyShadcnSelect.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 {\n Calendar,\n type CalendarProps,\n DATE,\n TimePicker,\n} 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 /** Props passed to the underlying Input component. */\n inputProps?: Omit<InputProps, 'onSelect'>;\n /** Placeholder text when no date is selected. */\n placeholder?: string;\n /** Whether the date picker is disabled. */\n disabled?: boolean;\n /** When true, shows a TimePicker below the calendar for time selection. */\n showTime?: true;\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 showTime - When true, shows a TimePicker below the calendar for time selection.\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 showTime,\n inputProps,\n ...props\n}: MyDatePickerProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <Popover>\n <PopoverTrigger asChild>\n <div className={'relative'}>\n <FormControl>\n <Input\n {...inputProps}\n variant={\n get(formState.errors, `${name}.message`)\n ? 'failure'\n : 'default'\n }\n disabled={disabled}\n {...field}\n readOnly\n placeholder={placeholder || 'Pick a date'}\n value={dayjs(field.value).format(format)}\n className={cn('m-0 text-start', className)}\n />\n </FormControl>\n <Calendar1\n className={cn(\n 'text-secondary absolute top-2.5 right-2 size-5',\n disabled && 'pointer-events-none opacity-50'\n )}\n />\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </PopoverTrigger>\n {!disabled && (\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\n <Calendar\n {...props}\n mode=\"single\"\n selected={field.value}\n onSelect={field.onChange}\n />\n {showTime && (\n <div className={'px-4 pb-3'}>\n <TimePicker\n value={dayjs(field.value as Date).format('HH:mm')}\n onChange={(time) => {\n const [hour, minute] = time.split(':');\n field.onChange(\n dayjs(field.value)\n .set('hour', Number(hour))\n .set('minute', Number(minute))\n .toDate()\n );\n }}\n />\n </div>\n )}\n </PopoverContent>\n )}\n </Popover>\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\nimport { DateRangePicker, type DateRangePickerProps } from '../datepicker';\n\n/**\n * Props for the MyDateRangePicker component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyDateRangePickerProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n Omit<DateRangePickerProps, 'required'> & {\n required?: boolean;\n };\n\n/**\n * MyDateRangePicker renders a date range selector integrated with react-hook-form.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the date range picker.\n * @param required - Whether the field is required.\n * @param rules - The `react-hook-form` validation rules.\n * @param format - The date format for display.\n * @param placeholder - The placeholder text when no date is selected.\n * @param props - DateRangePicker props and form item props.\n * @returns A date range picker integrated with react-hook-form.\n */\nexport const MyDateRangePicker = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n rules,\n placeholder,\n floatingError,\n ...props\n}: MyDateRangePickerProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <div>\n <FormControl>\n <DateRangePicker\n {...props}\n error={`${get(formState.errors, name, '')}`}\n selected={field.value}\n onRangeSelected={field.onChange}\n placeholder={placeholder}\n />\n </FormControl>\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n HtmlEditor,\n type HtmlEditorProps,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyHtmlEditor component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyHtmlEditorProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n HtmlEditorProps & {\n /** Whether the field is required. */\n required?: boolean;\n };\n\n/**\n * MyHtmlEditor is a rich-text HTML editor with optional react-hook-form integration.\n * Works in both controlled (with control/name) and uncontrolled modes.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the HTML editor.\n * @param rules - The `react-hook-form` validation rules.\n * @param required - Whether the field is required.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - HtmlEditor and form item props.\n * @returns React element rendering an HtmlEditor with label, helper text, and validation message.\n */\nexport const MyHtmlEditor = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n required,\n floatingError,\n ...props\n}: MyHtmlEditorProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <div>\n <FormControl>\n <HtmlEditor {...field} {...props} />\n </FormControl>\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n MaskInput,\n type MaskInputProps,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyMaskInput component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyMaskInputProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n MaskInputProps & {\n /** Whether the field is required. */\n required?: boolean;\n };\n\n/**\n * MyMaskInput is an input component with masking support and optional react-hook-form integration.\n * Works in both controlled (with control/name) and uncontrolled modes. By default it uses a space as\n * thousands separator, underscores as placeholder characters, lazy formatting disabled, and returns\n * unmasked value on change.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the mask input.\n * @param rules - The `react-hook-form` validation rules.\n * @param required - Whether the field is required.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - MaskInput and form item props.\n * @returns React element rendering a masked input with label, helper text, and validation message.\n */\nexport const MyMaskInput = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n required,\n floatingError,\n ...props\n}: MyMaskInputProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <div>\n <FormControl>\n <MaskInput\n thousandsSeparator={' '}\n lazy={false}\n placeholderChar=\"_\"\n unmask\n {...field}\n {...props}\n variant={\n get(formState.errors, `${name}.message`)\n ? 'failure'\n : 'default'\n }\n onAccept={(value) => field.onChange(value)}\n />\n </FormControl>\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n RadioGroupItem,\n} from 'dgz-ui/form';\nimport React, { useId } from 'react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\ntype RadioItemProps = React.ComponentPropsWithoutRef<typeof RadioGroupItem>;\n\n/**\n * Props for the MyRadio component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyRadioProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & RadioItemProps;\n\n/**\n * MyRadio is a radio input that can integrate with react-hook-form when control and name are provided.\n * Falls back to an uncontrolled radio item when not used inside a form.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the radio input.\n * @param rules - The `react-hook-form` validation rules.\n * @param value - The value of the radio input.\n * @param props - Radio item and form item props.\n * @returns A radio button item.\n */\nconst MyRadio = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n value,\n ...props\n}: MyRadioProps<TFieldValues>) => {\n const id = useId();\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormLabel className={'block'} htmlFor={props.id || id}>\n <FormItem className=\"flex flex-row items-start gap-3\">\n <FormControl>\n <RadioGroupItem\n id={props.id || id}\n value={value}\n checked={field.value === value}\n onClick={() => {\n if (field.value !== value) {\n field.onChange(value);\n }\n }}\n {...props}\n />\n </FormControl>\n <div className=\"space-y-1 leading-none\">\n {label && <div>{label}</div>}\n </div>\n </FormItem>\n </FormLabel>\n )}\n />\n )) ||\n null\n );\n};\n\nexport { MyRadio };\n","import {\n FormControl,\n FormField,\n FormItem,\n FormLabel,\n FormMessage,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n type FormItemProps,\n type Option,\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 MyShadcnSelect component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyShadcnSelectProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & {\n /** Array of options to display in the select dropdown. */\n options?: Option[];\n /** Placeholder text when no option is selected. */\n placeholder?: string;\n /** Additional CSS classes. */\n className?: string;\n /** Whether the select is disabled. */\n disabled?: boolean;\n /** Callback fired when the selected value changes. */\n onChange?: (value: string | number) => void;\n /** Whether the field is required. */\n required?: boolean;\n };\n\n/**\n * MyShadcnSelect is a native Shadcn select component integrated with react-hook-form.\n * Renders a dropdown select with customizable options and validation support.\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 select.\n * @param required - Whether the field is required.\n * @param className - Additional CSS classes.\n * @param rules - The `react-hook-form` validation rules.\n * @param options - Array of options to display in the select dropdown.\n * @param placeholder - Placeholder text when no option is selected.\n * @param disabled - Whether the select is disabled.\n * @param onChange - Callback fired when the selected value changes.\n * @returns A select component integrated with react-hook-form.\n */\nexport const MyShadcnSelect = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n className,\n rules,\n options = [],\n placeholder = 'Select an option',\n disabled,\n onChange,\n}: MyShadcnSelectProps<TFieldValues>) => {\n return (\n name &&\n control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => {\n const hasError = !!get(formState.errors, `${name}`);\n\n const handleChange = (value: string) => {\n const val = Number(value) ? Number(value) : value;\n if (val && field.value !== val) {\n field.onChange(val);\n onChange?.(val);\n }\n };\n\n return (\n <FormItem>\n {label && (\n <FormLabel>\n {label} {required && <span className=\"text-red-600\">*</span>}\n </FormLabel>\n )}\n <div>\n <FormControl>\n <Select\n value={`${field.value || ''}`}\n onValueChange={handleChange}\n disabled={disabled}\n >\n <SelectTrigger\n ref={field.ref}\n variant={hasError ? 'failure' : 'default'}\n className={cn(className)}\n >\n <SelectValue placeholder={placeholder} />\n </SelectTrigger>\n\n <SelectContent>\n {options.map((option) => (\n <SelectItem\n key={String(option.value)}\n value={String(option.value)}\n >\n {option.label}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </FormControl>\n <FormMessage />\n </div>\n </FormItem>\n );\n }}\n />\n )\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n Switch,\n type SwitchProps,\n} from 'dgz-ui/form';\nimport { useId } from 'react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MySwitch component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MySwitchProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & SwitchProps;\n\n/**\n * MySwitch is a toggle switch with optional react-hook-form integration.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the switch.\n * @param rules - The `react-hook-form` validation rules.\n * @param props - Switch and form item props.\n * @returns A toggle switch component, or null if name or control are missing.\n */\nexport const MySwitch = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n ...props\n}: MySwitchProps<TFieldValues>) => {\n const id = useId();\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormLabel className={'block'} htmlFor={props.id || id}>\n <FormItem className=\"flex flex-row items-start gap-3\">\n <FormControl>\n <Switch\n id={props.id || id}\n className={'m-0'}\n checked={field.value}\n onCheckedChange={field.onChange}\n {...props}\n />\n </FormControl>\n <div className=\"space-y-1 leading-none\">\n {label && <div>{label}</div>}\n </div>\n </FormItem>\n </FormLabel>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n Textarea,\n type TextareaProps,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyTextarea component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyTextareaProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & TextareaProps;\n\n/**\n * MyTextarea is a textarea component with optional react-hook-form integration.\n * Supports floating error message styling.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the textarea.\n * @param required - Whether the field is required.\n * @param rules - The `react-hook-form` validation rules.\n * @param className - Custom CSS class name.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - Textarea and form item props.\n * @returns A textarea component integrated with react-hook-form.\n */\nexport const MyTextarea = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n rules,\n className,\n floatingError,\n ...props\n}: MyTextareaProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <div>\n <FormControl>\n <Textarea\n variant={\n get(formState.errors, `${name}.message`)\n ? 'failure'\n : 'default'\n }\n {...props}\n {...field}\n className={cn(className)}\n />\n </FormControl>\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import { TimePicker, type TimePickerProps } from 'dgz-ui/calendar';\nimport {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyTimePicker component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyTimePickerProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n TimePickerProps & {\n /** Whether the field is required. */\n required?: boolean;\n /** Custom CSS class name. */\n className?: string;\n };\n\n/**\n * MyTimePicker is a time selection input with optional react-hook-form integration.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the time picker.\n * @param required - Whether the field is required.\n * @param className - Custom CSS class name.\n * @param rules - The `react-hook-form` validation rules.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - TimePicker and form item props.\n * @returns A time picker component integrated with react-hook-form.\n */\nexport const MyTimePicker = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n className,\n rules,\n floatingError,\n ...props\n}: MyTimePickerProps<TFieldValues>) => {\n return name && control ? (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}{' '}\n <div>\n <FormControl>\n <TimePicker {...field} {...props} />\n </FormControl>\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </div>\n </FormItem>\n )}\n />\n ) : (\n <TimePicker className={'mt-2'} {...props} />\n );\n};\n"],"names":["MyCheckbox","control","name","label","rules","props","id","useId","jsx","FormField","field","FormLabel","jsxs","FormItem","FormControl","Checkbox","MyDatePicker","required","format","DATE","floatingError","placeholder","disabled","register","className","showTime","inputProps","formState","Popover","PopoverTrigger","Input","get","dayjs","cn","Calendar1","FormMessage","PopoverContent","Calendar","TimePicker","time","hour","minute","MyDateRangePicker","DateRangePicker","MyHtmlEditor","HtmlEditor","MyMaskInput","MaskInput","value","MyRadio","RadioGroupItem","MyShadcnSelect","options","onChange","hasError","handleChange","val","Select","SelectTrigger","SelectValue","SelectContent","option","SelectItem","MySwitch","Switch","MyTextarea","Textarea","MyTimePicker"],"mappings":"8dA8BaA,EAAa,CAAmC,CAC3D,QAAAC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