dgz-ui-shared 1.2.21 → 1.2.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/chunks/MyInput-DOJNbPnV.cjs.js +2 -0
  2. package/dist/chunks/MyInput-DOJNbPnV.cjs.js.map +1 -0
  3. package/dist/chunks/MyInput-VyzguJnO.es.js +51 -0
  4. package/dist/chunks/MyInput-VyzguJnO.es.js.map +1 -0
  5. package/dist/chunks/MySelect-C7tnOKUF.cjs.js +2 -0
  6. package/dist/chunks/{MySelect-Ovb1pK5c.cjs.js.map → MySelect-C7tnOKUF.cjs.js.map} +1 -1
  7. package/dist/chunks/MySelect-DzvUAkVs.es.js +56 -0
  8. package/dist/chunks/MySelect-DzvUAkVs.es.js.map +1 -0
  9. package/dist/chunks/{PasswordConfirm-maMQqARK.cjs.js → PasswordConfirm-C8_4iAeF.cjs.js} +2 -2
  10. package/dist/chunks/{PasswordConfirm-maMQqARK.cjs.js.map → PasswordConfirm-C8_4iAeF.cjs.js.map} +1 -1
  11. package/dist/chunks/{PasswordConfirm-15FLlQ8Y.es.js → PasswordConfirm-CU25xH0G.es.js} +2 -2
  12. package/dist/chunks/{PasswordConfirm-15FLlQ8Y.es.js.map → PasswordConfirm-CU25xH0G.es.js.map} +1 -1
  13. package/dist/chunks/{Search-BDXQ3bSp.cjs.js → Search-6BG3dnM9.cjs.js} +2 -2
  14. package/dist/chunks/{Search-BDXQ3bSp.cjs.js.map → Search-6BG3dnM9.cjs.js.map} +1 -1
  15. package/dist/chunks/{Search-I3lwE0J6.es.js → Search-Y51oT-uZ.es.js} +3 -3
  16. package/dist/chunks/{Search-I3lwE0J6.es.js.map → Search-Y51oT-uZ.es.js.map} +1 -1
  17. package/dist/components/confirm/index.cjs.js +1 -1
  18. package/dist/components/confirm/index.es.js +1 -1
  19. package/dist/components/datatable/index.cjs.js +1 -1
  20. package/dist/components/datatable/index.es.js +1 -1
  21. package/dist/components/filters/index.cjs.js +1 -1
  22. package/dist/components/filters/index.es.js +1 -1
  23. package/dist/components/form/index.cjs.js +1 -1
  24. package/dist/components/form/index.cjs.js.map +1 -1
  25. package/dist/components/form/index.es.js +188 -187
  26. package/dist/components/form/index.es.js.map +1 -1
  27. package/dist/hooks/index.cjs.js +1 -1
  28. package/dist/hooks/index.cjs.js.map +1 -1
  29. package/dist/hooks/index.es.js +1 -1
  30. package/dist/hooks/index.es.js.map +1 -1
  31. package/dist/styles.css +1 -1
  32. package/dist/types/App.d.ts.map +1 -1
  33. package/dist/types/components/form/MyDatePicker.d.ts +1 -0
  34. package/dist/types/components/form/MyDatePicker.d.ts.map +1 -1
  35. package/dist/types/components/form/MyMaskInput.d.ts.map +1 -1
  36. package/package.json +7 -5
  37. package/dist/chunks/MyInput-C9PNyYby.cjs.js +0 -2
  38. package/dist/chunks/MyInput-C9PNyYby.cjs.js.map +0 -1
  39. package/dist/chunks/MyInput-Wb0DSWo_.es.js +0 -51
  40. package/dist/chunks/MyInput-Wb0DSWo_.es.js.map +0 -1
  41. package/dist/chunks/MySelect-D8ML7nhM.es.js +0 -56
  42. package/dist/chunks/MySelect-D8ML7nhM.es.js.map +0 -1
  43. package/dist/chunks/MySelect-Ovb1pK5c.cjs.js +0 -2
@@ -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 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 className={cn(floatingError && 'space-y-0')}>\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 className={cn(floatingError && 'space-y-0')}>\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 className={cn(floatingError && 'space-y-0')}>\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 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 }) => (\n <FormItem className={cn(floatingError && 'space-y-0')}>\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 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 className={cn(floatingError && 'space-y-0')}>\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 className={cn(floatingError && 'space-y-0')}>\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","cn","Popover","PopoverTrigger","Input","get","dayjs","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;AAAA,QAAA,gBAAAL,EAACM,GAAA,EACC,UAAA,gBAAAN;AAAA,UAACO;AAAA,UAAA;AAAA,YACC,IAAIV,EAAM,MAAMC;AAAA,YAChB,SAASI,EAAM;AAAA,YACf,iBAAiBA,EAAM;AAAA,YACtB,GAAGL;AAAA,UAAA;AAAA,QAAA,GAER;AAAA,QACA,gBAAAG,EAAC,SAAI,WAAU,0BACZ,eAAS,gBAAAA,EAAC,OAAA,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vCS8B,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,MACT,gBAAAE,EAACC,GAAA,EAAS,WAAWc,EAAGP,KAAiB,WAAW,GACjD,UAAA;AAAA,MAAAjB,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,WAAWT,EAAGP,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 <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,OAAAE;AAAA,MACA,QAAQ,CAAC,EAAE,OAAAM,0BACRC,GAAA,EAAU,WAAW,SAAS,SAASN,EAAM,MAAMC,GAClD,UAAA,gBAAAM,EAACC,GAAA,EAAS,WAAU,mCAClB,UAAA;AAAA,QAAA,gBAAAL,EAACM,GAAA,EACC,UAAA,gBAAAN;AAAA,UAACO;AAAA,UAAA;AAAA,YACC,IAAIV,EAAM,MAAMC;AAAA,YAChB,SAASI,EAAM;AAAA,YACf,iBAAiBA,EAAM;AAAA,YACtB,GAAGL;AAAA,UAAA;AAAA,QAAA,GAER;AAAA,QACA,gBAAAG,EAAC,SAAI,WAAU,0BACZ,eAAS,gBAAAA,EA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ACA,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,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("../chunks/useSortable-B3LF1tg8.cjs.js"),V=require("react/jsx-runtime"),ee=require("../chunks/lodash-BjH0kD7j.cjs.js"),$=require("react"),U=require("../chunks/PasswordConfirm-maMQqARK.cjs.js"),Le=require("../chunks/useFilter-CsOF1_hM.cjs.js"),Ye=require("../chunks/useTheme-hjEZ-FC3.cjs.js"),We=()=>{const e=$.useCallback(({onConfirm:a})=>{const n=ee.lodashExports.uniqueId();U.y.warning(V.jsx(V.Fragment,{}),{toastId:n,autoClose:!1}),U.y.update(n,{position:"bottom-left",render:V.jsx(U.Confirm,{defaultOpen:!0,onConfirm:()=>{a(),U.y.dismiss(n)}})})},[]),o=$.useCallback(({onSubmit:a})=>{const n=ee.lodashExports.uniqueId();U.y.warning(V.jsx(V.Fragment,{}),{position:"bottom-left",toastId:n,autoClose:!1}),U.y.update(n,{render:V.jsx(U.PasswordConfirm,{defaultOpen:!0,onSubmit:f=>{a(f),U.y.dismiss(n)}})})},[]);return{confirm:e,confirmPassword:o}},Fe=(e,o=!1)=>{const a=$.useRef(document.title);$.useEffect(()=>(o&&a.current===document.title&&(a.current=document.title),document.title=e,()=>{o&&(document.title=a.current)}),[e,o])};var G={},Te;function Ue(){if(Te)return G;Te=1,G.match=c,G.parse=l;var e=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,o=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,a=/^(?:(min|max)-)?(.+)/,n=/(em|rem|px|cm|mm|in|pt|pc)?$/,f=/(dpi|dpcm|dppx)?$/;function c(d,u){return l(d).some(function(m){var g=m.inverse,j=m.type==="all"||u.type===m.type;if(j&&g||!(j||g))return!1;var A=m.expressions.every(function(q){var D=q.feature,Y=q.modifier,x=q.value,S=u[D];if(!S)return!1;switch(D){case"orientation":case"scan":return S.toLowerCase()===x.toLowerCase();case"width":case"height":case"device-width":case"device-height":x=C(x),S=C(S);break;case"resolution":x=v(x),S=v(S);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":x=p(x),S=p(S);break;case"grid":case"color":case"color-index":case"monochrome":x=parseInt(x,10)||1,S=parseInt(S,10)||0;break}switch(Y){case"min":return S>=x;case"max":return S<=x;default:return S===x}});return A&&!g||!A&&g})}function l(d){return d.split(",").map(function(u){u=u.trim();var m=u.match(e),g=m[1],j=m[2],A=m[3]||"",q={};return q.inverse=!!g&&g.toLowerCase()==="not",q.type=j?j.toLowerCase():"all",A=A.match(/\([^\)]+\)/g)||[],q.expressions=A.map(function(D){var Y=D.match(o),x=Y[1].toLowerCase().match(a);return{modifier:x[1],feature:x[2],value:Y[2]}}),q})}function p(d){var u=Number(d),m;return u||(m=d.match(/^(\d+)\s*\/\s*(\d+)$/),u=m[1]/m[2]),u}function v(d){var u=parseFloat(d),m=String(d).match(f)[1];switch(m){case"dpcm":return u/2.54;case"dppx":return u*96;default:return u}}function C(d){var u=parseFloat(d),m=String(d).match(n)[1];switch(m){case"em":return u*16;case"rem":return u*16;case"cm":return u*96/2.54;case"mm":return u*96/2.54/10;case"in":return u*96;case"pt":return u*72;case"pc":return u*72/12;default:return u}}return G}var ue,ge;function ze(){if(ge)return ue;ge=1;var e=Ue().match,o=typeof window<"u"?window.matchMedia:null;function a(f,c,l){var p=this,v;o&&!l&&(v=o.call(window,f)),v?(this.matches=v.matches,this.media=v.media,v.addListener(u)):(this.matches=e(f,c),this.media=f),this.addListener=C,this.removeListener=d,this.dispose=m;function C(g){v&&v.addListener(g)}function d(g){v&&v.removeListener(g)}function u(g){p.matches=g.matches,p.media=g.media}function m(){v&&v.removeListener(u)}}function n(f,c,l){return new a(f,c,l)}return ue=n,ue}var Ne=ze();const Qe=ee.getDefaultExportFromCjs(Ne);var He=/[A-Z]/g,Ve=/^ms-/,fe={};function Ke(e){return"-"+e.toLowerCase()}function qe(e){if(fe.hasOwnProperty(e))return fe[e];var o=e.replace(He,Ke);return fe[e]=Ve.test(o)?"-"+o:o}function Je(e,o){if(e===o)return!0;if(!e||!o)return!1;const a=Object.keys(e),n=Object.keys(o),f=a.length;if(n.length!==f)return!1;for(let c=0;c<f;c++){const l=a[c];if(e[l]!==o[l]||!Object.prototype.hasOwnProperty.call(o,l))return!1}return!0}var Z={exports:{}},B={exports:{}},_={};/** @license React v16.13.1
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("../chunks/useSortable-B3LF1tg8.cjs.js"),V=require("react/jsx-runtime"),ee=require("../chunks/lodash-BjH0kD7j.cjs.js"),$=require("react"),U=require("../chunks/PasswordConfirm-C8_4iAeF.cjs.js"),Le=require("../chunks/useFilter-CsOF1_hM.cjs.js"),Ye=require("../chunks/useTheme-hjEZ-FC3.cjs.js"),We=()=>{const e=$.useCallback(({onConfirm:a})=>{const n=ee.lodashExports.uniqueId();U.y.warning(V.jsx(V.Fragment,{}),{toastId:n,autoClose:!1}),U.y.update(n,{position:"bottom-left",render:V.jsx(U.Confirm,{defaultOpen:!0,onConfirm:()=>{a(),U.y.dismiss(n)}})})},[]),o=$.useCallback(({onSubmit:a})=>{const n=ee.lodashExports.uniqueId();U.y.warning(V.jsx(V.Fragment,{}),{position:"bottom-left",toastId:n,autoClose:!1}),U.y.update(n,{render:V.jsx(U.PasswordConfirm,{defaultOpen:!0,onSubmit:f=>{a(f),U.y.dismiss(n)}})})},[]);return{confirm:e,confirmPassword:o}},Fe=(e,o=!1)=>{const a=$.useRef(document.title);$.useEffect(()=>(o&&a.current===document.title&&(a.current=document.title),document.title=e,()=>{o&&(document.title=a.current)}),[e,o])};var G={},Te;function Ue(){if(Te)return G;Te=1,G.match=c,G.parse=l;var e=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,o=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,a=/^(?:(min|max)-)?(.+)/,n=/(em|rem|px|cm|mm|in|pt|pc)?$/,f=/(dpi|dpcm|dppx)?$/;function c(d,u){return l(d).some(function(m){var g=m.inverse,j=m.type==="all"||u.type===m.type;if(j&&g||!(j||g))return!1;var A=m.expressions.every(function(q){var D=q.feature,Y=q.modifier,x=q.value,S=u[D];if(!S)return!1;switch(D){case"orientation":case"scan":return S.toLowerCase()===x.toLowerCase();case"width":case"height":case"device-width":case"device-height":x=C(x),S=C(S);break;case"resolution":x=v(x),S=v(S);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":x=p(x),S=p(S);break;case"grid":case"color":case"color-index":case"monochrome":x=parseInt(x,10)||1,S=parseInt(S,10)||0;break}switch(Y){case"min":return S>=x;case"max":return S<=x;default:return S===x}});return A&&!g||!A&&g})}function l(d){return d.split(",").map(function(u){u=u.trim();var m=u.match(e),g=m[1],j=m[2],A=m[3]||"",q={};return q.inverse=!!g&&g.toLowerCase()==="not",q.type=j?j.toLowerCase():"all",A=A.match(/\([^\)]+\)/g)||[],q.expressions=A.map(function(D){var Y=D.match(o),x=Y[1].toLowerCase().match(a);return{modifier:x[1],feature:x[2],value:Y[2]}}),q})}function p(d){var u=Number(d),m;return u||(m=d.match(/^(\d+)\s*\/\s*(\d+)$/),u=m[1]/m[2]),u}function v(d){var u=parseFloat(d),m=String(d).match(f)[1];switch(m){case"dpcm":return u/2.54;case"dppx":return u*96;default:return u}}function C(d){var u=parseFloat(d),m=String(d).match(n)[1];switch(m){case"em":return u*16;case"rem":return u*16;case"cm":return u*96/2.54;case"mm":return u*96/2.54/10;case"in":return u*96;case"pt":return u*72;case"pc":return u*72/12;default:return u}}return G}var ue,ge;function ze(){if(ge)return ue;ge=1;var e=Ue().match,o=typeof window<"u"?window.matchMedia:null;function a(f,c,l){var p=this,v;o&&!l&&(v=o.call(window,f)),v?(this.matches=v.matches,this.media=v.media,v.addListener(u)):(this.matches=e(f,c),this.media=f),this.addListener=C,this.removeListener=d,this.dispose=m;function C(g){v&&v.addListener(g)}function d(g){v&&v.removeListener(g)}function u(g){p.matches=g.matches,p.media=g.media}function m(){v&&v.removeListener(u)}}function n(f,c,l){return new a(f,c,l)}return ue=n,ue}var Ne=ze();const Qe=ee.getDefaultExportFromCjs(Ne);var He=/[A-Z]/g,Ve=/^ms-/,fe={};function Ke(e){return"-"+e.toLowerCase()}function qe(e){if(fe.hasOwnProperty(e))return fe[e];var o=e.replace(He,Ke);return fe[e]=Ve.test(o)?"-"+o:o}function Je(e,o){if(e===o)return!0;if(!e||!o)return!1;const a=Object.keys(e),n=Object.keys(o),f=a.length;if(n.length!==f)return!1;for(let c=0;c<f;c++){const l=a[c];if(e[l]!==o[l]||!Object.prototype.hasOwnProperty.call(o,l))return!1}return!0}var Z={exports:{}},B={exports:{}},_={};/** @license React v16.13.1
2
2
  * react-is.production.min.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.