@povio/ui 3.4.0-rc.10 → 3.4.0-rc.11
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/assets/icons/Account.d.ts +2 -0
- package/dist/assets/icons/AlignCenter.d.ts +2 -0
- package/dist/assets/icons/AlignCenter.js +30 -0
- package/dist/assets/icons/AlignLeft.d.ts +2 -0
- package/dist/assets/icons/AlignLeft.js +30 -0
- package/dist/assets/icons/AlignLeftRight.d.ts +2 -0
- package/dist/assets/icons/AlignLeftRight.js +30 -0
- package/dist/assets/icons/AlignRight.d.ts +2 -0
- package/dist/assets/icons/AlignRight.js +30 -0
- package/dist/assets/icons/ArrowDropDown.d.ts +2 -0
- package/dist/assets/icons/ArrowDropDown.js +30 -0
- package/dist/assets/icons/ArrowDropUp.d.ts +2 -0
- package/dist/assets/icons/ArrowDropUp.js +30 -0
- package/dist/assets/icons/ArrowLeft.d.ts +2 -0
- package/dist/assets/icons/ArrowLeft.js +30 -0
- package/dist/assets/icons/ArrowRight.d.ts +2 -0
- package/dist/assets/icons/ArrowRight.js +30 -0
- package/dist/assets/icons/Board.d.ts +2 -0
- package/dist/assets/icons/Bold.d.ts +2 -0
- package/dist/assets/icons/Bold.js +30 -0
- package/dist/assets/icons/BulletedList.d.ts +2 -0
- package/dist/assets/icons/BulletedList.js +30 -0
- package/dist/assets/icons/Calendar.d.ts +2 -0
- package/dist/assets/icons/Calendar.js +32 -0
- package/dist/assets/icons/Check.d.ts +2 -0
- package/dist/assets/icons/Check.js +32 -0
- package/dist/assets/icons/CheckCircle.d.ts +2 -0
- package/dist/assets/icons/CheckCircle.js +30 -0
- package/dist/assets/icons/CheckboxCheckmark.d.ts +2 -0
- package/dist/assets/icons/CheckboxCheckmark.js +33 -0
- package/dist/assets/icons/CheckboxIndeterminate.d.ts +2 -0
- package/dist/assets/icons/CheckboxIndeterminate.js +33 -0
- package/dist/assets/icons/ChevronDown.d.ts +2 -0
- package/dist/assets/icons/ChevronDown.js +32 -0
- package/dist/assets/icons/ChevronLeft.d.ts +2 -0
- package/dist/assets/icons/ChevronLeft.js +32 -0
- package/dist/assets/icons/ChevronRight.d.ts +2 -0
- package/dist/assets/icons/ChevronRight.js +32 -0
- package/dist/assets/icons/ChevronUp.d.ts +2 -0
- package/dist/assets/icons/ChevronUp.js +32 -0
- package/dist/assets/icons/ChevronsLeft.d.ts +2 -0
- package/dist/assets/icons/ChevronsLeft.js +32 -0
- package/dist/assets/icons/ChevronsRight.d.ts +2 -0
- package/dist/assets/icons/ChevronsRight.js +32 -0
- package/dist/assets/icons/Clock.d.ts +2 -0
- package/dist/assets/icons/Clock.js +30 -0
- package/dist/assets/icons/Close.d.ts +2 -0
- package/dist/assets/icons/Close.js +30 -0
- package/dist/assets/icons/DateTime.d.ts +2 -0
- package/dist/assets/icons/DateTime.js +39 -0
- package/dist/assets/icons/DragIndicator.d.ts +2 -0
- package/dist/assets/icons/DragIndicator.js +30 -0
- package/dist/assets/icons/Edit.d.ts +2 -0
- package/dist/assets/icons/Emoji.d.ts +2 -0
- package/dist/assets/icons/File.d.ts +2 -0
- package/dist/assets/icons/File.js +32 -0
- package/dist/assets/icons/Grid.d.ts +2 -0
- package/dist/assets/icons/Highlight.d.ts +2 -0
- package/dist/assets/icons/Highlight.js +30 -0
- package/dist/assets/icons/HighlightOn.d.ts +6 -0
- package/dist/assets/icons/HighlightOn.js +55 -0
- package/dist/assets/icons/Home.d.ts +2 -0
- package/dist/assets/icons/Home.js +30 -0
- package/dist/assets/icons/Image.d.ts +2 -0
- package/dist/assets/icons/ImageError.d.ts +2 -0
- package/dist/assets/icons/Info.d.ts +2 -0
- package/dist/assets/icons/Info.js +41 -0
- package/dist/assets/icons/Italic.d.ts +2 -0
- package/dist/assets/icons/Italic.js +30 -0
- package/dist/assets/icons/Link.d.ts +2 -0
- package/dist/assets/icons/Link.js +30 -0
- package/dist/assets/icons/Loader.d.ts +2 -0
- package/dist/assets/icons/MapPin.d.ts +2 -0
- package/dist/assets/icons/Menu.d.ts +2 -0
- package/dist/assets/icons/Menu.js +30 -0
- package/dist/assets/icons/Minus.d.ts +2 -0
- package/dist/assets/icons/MoreHoriz.d.ts +2 -0
- package/dist/assets/icons/NumberedList.d.ts +2 -0
- package/dist/assets/icons/NumberedList.js +30 -0
- package/dist/assets/icons/Pause.d.ts +2 -0
- package/dist/assets/icons/Plus.d.ts +2 -0
- package/dist/assets/icons/PointerHorizontal.d.ts +2 -0
- package/dist/assets/icons/PointerHorizontal.js +30 -0
- package/dist/assets/icons/PointerVertical.d.ts +2 -0
- package/dist/assets/icons/PointerVertical.js +30 -0
- package/dist/assets/icons/Retry.d.ts +2 -0
- package/dist/assets/icons/Search.d.ts +2 -0
- package/dist/assets/icons/Search.js +30 -0
- package/dist/assets/icons/Send.d.ts +2 -0
- package/dist/assets/icons/Send.js +32 -0
- package/dist/assets/icons/Share.d.ts +2 -0
- package/dist/assets/icons/Slash.d.ts +2 -0
- package/dist/assets/icons/Strikethrough.d.ts +2 -0
- package/dist/assets/icons/Strikethrough.js +30 -0
- package/dist/assets/icons/TextColor.d.ts +6 -0
- package/dist/assets/icons/TextColor.js +52 -0
- package/dist/assets/icons/Today.d.ts +2 -0
- package/dist/assets/icons/Today.js +30 -0
- package/dist/assets/icons/Trash.d.ts +2 -0
- package/dist/assets/icons/Underlined.d.ts +2 -0
- package/dist/assets/icons/Underlined.js +32 -0
- package/dist/assets/icons/Upload.d.ts +2 -0
- package/dist/assets/icons/Upload.js +39 -0
- package/dist/assets/icons/User.d.ts +2 -0
- package/dist/assets/icons/Visibility.d.ts +2 -0
- package/dist/assets/icons/Visibility.js +30 -0
- package/dist/assets/icons/VisibilityOff.d.ts +2 -0
- package/dist/assets/icons/VisibilityOff.js +30 -0
- package/dist/assets/icons/WarningFilled.d.ts +2 -0
- package/dist/assets/icons/WarningFilled.js +32 -0
- package/dist/assets/icons/WarningOutlined.d.ts +2 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +7 -7
- package/dist/components/Menu/MenuDesktop.js +1 -1
- package/dist/components/Menu/MenuItem.js +4 -4
- package/dist/components/Menu/MenuMobile.js +5 -5
- package/dist/components/Menu/MenuPopover.js +2 -2
- package/dist/components/buttons/Button/Button.js +1 -1
- package/dist/components/buttons/PillButton/PillButton.js +4 -4
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +1 -1
- package/dist/components/buttons/SplitButton/SplitButton.js +3 -3
- package/dist/components/buttons/shared/ButtonContent.js +2 -2
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +1 -1
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +2 -1
- package/dist/components/inputs/Checkbox/Checkbox.js +102 -95
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +3 -2
- package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +2 -1
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +115 -111
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +22 -17
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +23 -17
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +25 -21
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +2 -2
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +238 -225
- package/dist/components/inputs/DateTime/shared/Calendar.js +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +1 -1
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +10 -7
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +12 -8
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +1 -2
- package/dist/components/inputs/DateTime/shared/DateField.js +4 -4
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +2 -2
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +16 -8
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +3 -3
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +2 -2
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +1 -1
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +2 -2
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +2 -2
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +5 -4
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +2 -2
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +11 -10
- package/dist/components/inputs/DateTime/shared/YearPicker.js +2 -2
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +1 -46
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.js +1 -1
- package/dist/components/inputs/File/FileUpload.d.ts +1 -1
- package/dist/components/inputs/File/FileUpload.js +20 -20
- package/dist/components/inputs/File/InputUpload.d.ts +1 -1
- package/dist/components/inputs/File/InputUpload.js +19 -19
- package/dist/components/inputs/File/fileUpload.types.d.ts +1 -1
- package/dist/components/inputs/File/inputUpload.types.d.ts +1 -1
- package/dist/components/inputs/File/shared/FileCard.js +1 -1
- package/dist/components/inputs/File/shared/FileCardList.js +1 -1
- package/dist/components/inputs/File/shared/FileUploadContent.js +1 -1
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +3 -3
- package/dist/components/inputs/File/shared/FileUploadContentError.js +6 -5
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +6 -5
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +5 -4
- package/dist/components/inputs/File/shared/InputUploadContent.js +4 -4
- package/dist/components/inputs/File/shared/InputUploadFilled.js +3 -3
- package/dist/components/inputs/FormField/FormFieldError.js +1 -1
- package/dist/components/inputs/FormField/FormFieldHeader.js +4 -4
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +3 -3
- package/dist/components/inputs/FormField/FormFieldHelper.js +1 -1
- package/dist/components/inputs/FormField/FormFieldLabel.js +2 -2
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +1 -1
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +107 -109
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +1 -2
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +254 -265
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +1 -2
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +24 -25
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +4 -3
- package/dist/components/inputs/Input/TextArea/TextArea.d.ts +1 -2
- package/dist/components/inputs/Input/TextArea/TextArea.js +117 -118
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +2 -2
- package/dist/components/inputs/Input/TextInput/TextInput.js +129 -129
- package/dist/components/inputs/Input/shared/InputContent.d.ts +1 -2
- package/dist/components/inputs/Input/shared/InputContent.js +48 -50
- package/dist/components/inputs/Inputs/Form.d.ts +4 -4
- package/dist/components/inputs/Inputs/Form.js +1 -1
- package/dist/components/inputs/Inputs/InputItem.d.ts +22 -22
- package/dist/components/inputs/Inputs/InputItem.js +37 -36
- package/dist/components/inputs/Inputs/Inputs.d.ts +2 -2
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +2 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.js +113 -109
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +1 -1
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +16 -16
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +1 -1
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +20 -20
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/QuerySelect.js +20 -20
- package/dist/components/inputs/Selection/Select/Select.d.ts +1 -1
- package/dist/components/inputs/Selection/Select/Select.js +23 -23
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectBase.js +37 -34
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +56 -58
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +56 -57
- package/dist/components/inputs/Selection/shared/SelectListBox.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +4 -5
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +3 -3
- package/dist/components/inputs/Selection/shared/select.context.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/select.context.js +9 -5
- package/dist/components/inputs/Selection/shared/select.types.d.ts +1 -1
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -1
- package/dist/components/inputs/Skeleton/InputFrame.js +7 -10
- package/dist/components/inputs/Slider/Slider.d.ts +1 -1
- package/dist/components/inputs/Slider/Slider.js +20 -20
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -1
- package/dist/components/inputs/TextEditor/TextEditor.js +20 -20
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +2 -2
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +4 -4
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +4 -4
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +8 -5
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +3 -3
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +5 -4
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +5 -4
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +9 -6
- package/dist/components/inputs/Toggle/Toggle.d.ts +2 -1
- package/dist/components/inputs/Toggle/Toggle.js +65 -61
- package/dist/components/inputs/shared/CheckContent.js +1 -1
- package/dist/components/inputs/shared/InputClear.js +28 -45
- package/dist/components/inputs/shared/TooltipWrapper.d.ts +1 -1
- package/dist/components/inputs/shared/form.types.d.ts +8 -9
- package/dist/components/inputs/shared/input.cva.js +1 -1
- package/dist/components/inputs/shared/useStaticInputHandoff.js +38 -64
- package/dist/components/navigation/Accordion/Accordion.js +1 -1
- package/dist/components/navigation/Accordion/AccordionItem.js +3 -3
- package/dist/components/navigation/Stepper/Stepper.js +2 -2
- package/dist/components/navigation/Stepper/StepperItem.js +4 -4
- package/dist/components/overlays/ActionModal/ActionModal.js +1 -1
- package/dist/components/overlays/BottomSheet/BottomSheet.js +3 -3
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +4 -4
- package/dist/components/overlays/Drawer/Drawer.js +2 -2
- package/dist/components/overlays/Modal/Modal.js +3 -3
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +1 -1
- package/dist/components/overlays/Tooltip/Tooltip.js +8 -15
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +1 -1
- package/dist/components/segment/Segment.d.ts +1 -1
- package/dist/components/segment/Segment.js +21 -21
- package/dist/components/segment/SegmentItem.js +1 -1
- package/dist/components/segment/segment.types.d.ts +1 -1
- package/dist/components/shared/pagination/Pagination.js +1 -1
- package/dist/components/shared/pagination/PaginationList.js +9 -6
- package/dist/components/table/ColumnConfig.js +1 -1
- package/dist/components/table/InfiniteTable.js +1 -1
- package/dist/components/table/Table.js +8 -6
- package/dist/components/text/Link/Link.js +1 -1
- package/dist/components/text/Pill/Pill.js +3 -3
- package/dist/components/text/Tag/Tag.js +3 -3
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +1 -1
- package/dist/config/router.context.js +1 -1
- package/dist/config/theme.context.js +1 -1
- package/dist/config/uiConfig.context.d.ts +5 -14
- package/dist/config/uiConfig.context.js +11 -9
- package/dist/config/uiOverrides.context.js +2 -2
- package/dist/helpers/dynamicColumns.d.ts +1 -1
- package/dist/helpers/dynamicInputs.d.ts +7 -7
- package/dist/hooks/useAutosave.d.ts +4 -4
- package/dist/hooks/useAutosave.js +49 -64
- package/dist/hooks/useFilters.js +1 -1
- package/dist/hooks/useForm.d.ts +15 -39
- package/dist/hooks/useForm.js +43 -96
- package/dist/hooks/useFormAutosave.d.ts +9 -8
- package/dist/hooks/useFormAutosave.js +9 -23
- package/dist/hooks/useIntersectionObserver.js +1 -1
- package/dist/hooks/useLocalStorage.js +1 -1
- package/dist/hooks/usePagination.js +1 -1
- package/dist/hooks/useScrollableListBox.js +1 -1
- package/dist/hooks/useSorting.js +1 -1
- package/dist/hooks/useStateAndRef.js +1 -1
- package/dist/hooks/useTableColumnConfig.js +1 -1
- package/dist/index.d.ts +263 -1
- package/dist/index.js +71 -11
- package/package.json +3 -15
- package/dist/assets/locales/en/translation.json.d.ts +0 -158
- package/dist/assets/locales/sl/translation.json.d.ts +0 -154
- package/dist/components/inputs/shared/form.binding.d.ts +0 -27
- package/dist/components/inputs/shared/form.binding.js +0 -57
- package/dist/components/inputs/shared/form.types.js +0 -8
- package/dist/rhf/Inputs.d.ts +0 -60
- package/dist/rhf/Inputs.js +0 -148
- package/dist/rhf/components.d.ts +0 -80
- package/dist/rhf/components.js +0 -101
- package/dist/rhf/dynamicInputs.d.ts +0 -18
- package/dist/rhf/dynamicInputs.js +0 -5
- package/dist/rhf/fieldAdapter.d.ts +0 -7
- package/dist/rhf/fieldAdapter.js +0 -40
- package/dist/rhf/form.types.d.ts +0 -12
- package/dist/rhf/useAutosave.d.ts +0 -10
- package/dist/rhf/useAutosave.js +0 -71
- package/dist/rhf/useForm.d.ts +0 -18
- package/dist/rhf/useForm.js +0 -48
- package/dist/rhf/useFormAutosave.d.ts +0 -15
- package/dist/rhf/useFormAutosave.js +0 -59
- package/dist/rhf.d.ts +0 -225
- package/dist/tanstack.d.ts +0 -224
- package/dist/tanstack.js +0 -141
- /package/dist/{rhf/entrypoints.type-test.d.ts → hooks/useAutosave.spec.d.ts} +0 -0
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { ComponentProps, JSXElementConstructor, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { Control, UseFormReturn } from 'react-hook-form';
|
|
2
3
|
import { z } from 'zod';
|
|
3
4
|
import { Autocomplete } from '../Selection/Autocomplete/Autocomplete';
|
|
4
5
|
import { Select } from '../Selection/Select/Select';
|
|
5
6
|
import { HasRequiredProperty } from '../../../types/common';
|
|
6
|
-
import { UIForm } from '../../../hooks/useForm';
|
|
7
7
|
declare const componentRegistry: {
|
|
8
|
-
readonly toggle: <TFieldValues extends import('
|
|
9
|
-
readonly checkbox: <TFieldValues extends import('
|
|
10
|
-
readonly checkboxGroup: <TFieldValues extends import('
|
|
11
|
-
readonly numberInput: <TFieldValues extends import('
|
|
12
|
-
readonly numberRangeInput: <TFieldValues extends import('
|
|
13
|
-
readonly slider: <TFieldValues extends import('
|
|
14
|
-
readonly textInput: <TFieldValues extends import('
|
|
15
|
-
readonly passwordInput: <TFieldValues extends import('
|
|
16
|
-
readonly textArea: <TFieldValues extends import('
|
|
8
|
+
readonly toggle: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('../Toggle/Toggle').ControlledToggleProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
readonly checkbox: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('../Checkbox/Checkbox').ControlledCheckboxProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
readonly checkboxGroup: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('../Checkbox/CheckboxGroup').ControlledCheckboxGroupProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
readonly numberInput: <TFieldValues extends import('react-hook-form').FieldValues>({ renderStaticInput, ...props }: import('../Input/NumberInput/NumberInput').ControlledNumberInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
readonly numberRangeInput: <TFieldValues extends import('react-hook-form').FieldValues>({ renderStaticInput, ...props }: import('../Input/NumberRangeInput/NumberRangeInput').ControlledNumberRangeInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
readonly slider: <TFieldValues extends import('react-hook-form').FieldValues, IsRange extends boolean = false>(props: import('../Slider/Slider').ControlledSliderProps<TFieldValues, IsRange>) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
readonly textInput: <TFieldValues extends import('react-hook-form').FieldValues>({ renderStaticInput, ...props }: import('../Input/TextInput/TextInput').ControlledTextInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
readonly passwordInput: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('../Input/PasswordInput/PasswordInput').ControlledPasswordInputProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
readonly textArea: <TFieldValues extends import('react-hook-form').FieldValues>(props: import('../Input/TextArea/TextArea').ControlledTextAreaProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
17
17
|
readonly select: typeof Select;
|
|
18
|
-
readonly querySelect: <TFieldValues extends import('
|
|
18
|
+
readonly querySelect: <TFieldValues extends import('react-hook-form').FieldValues, TQueryFn extends import('../Selection/shared/querySelect.utils').QueryFn, TKey extends import('react-aria').Key = import('react-aria').Key, TInitialSelectItem = import('../../..').DefaultInitialSelectItem<TKey>>(props: import('../Selection/Select/QuerySelect').QuerySelectProps<TFieldValues, TQueryFn, TKey, TInitialSelectItem>) => import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
readonly autocomplete: typeof Autocomplete;
|
|
20
|
-
readonly queryAutocomplete: <TFieldValues extends import('
|
|
21
|
-
readonly segment: <TFieldValues extends import('
|
|
22
|
-
readonly datePicker: <TFieldValues extends import('
|
|
23
|
-
readonly dateTimePicker: <TFieldValues extends import('
|
|
24
|
-
readonly timePicker: <TFieldValues extends import('
|
|
25
|
-
readonly dateRangePicker: <TFieldValues extends import('
|
|
20
|
+
readonly queryAutocomplete: <TFieldValues extends import('react-hook-form').FieldValues, TSelectItem extends import('../../..').SelectItem<any>, TQueryFn extends import('../Selection/Autocomplete/queryAutocomplete.types').QueryFn>(props: import('../Selection/Autocomplete/queryAutocomplete.types').QueryAutocompleteProps<TFieldValues, TSelectItem, TQueryFn>) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
readonly segment: <TFieldValues extends import('react-hook-form').FieldValues, TKey extends import('react-aria').Key = import('react-aria').Key>(props: import('../../..').ControlledSegmentProps<TFieldValues, TKey>) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
readonly datePicker: <TFieldValues extends import('react-hook-form').FieldValues>({ fullIso, granularity, minValue, maxValue, renderStaticInput, ...props }: import('../DateTime/DatePicker/DatePicker').ControlledDatePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
readonly dateTimePicker: <TFieldValues extends import('react-hook-form').FieldValues>({ fullIso, renderStaticInput, ...props }: import('../DateTime/DateTimePicker/DateTimePicker').ControlledDateTimePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
readonly timePicker: <TFieldValues extends import('react-hook-form').FieldValues>({ renderStaticInput, ...props }: import('../DateTime/TimePicker/TimePicker').ControlledTimePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
readonly dateRangePicker: <TFieldValues extends import('react-hook-form').FieldValues>({ fullIso, minValue, maxValue, renderStaticInput, ...props }: import('../DateTime/DateRangePicker/DateRangePicker').ControlledDateRangePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
26
26
|
readonly unknown: null;
|
|
27
27
|
};
|
|
28
28
|
export type InputComponentRegistry = typeof componentRegistry;
|
|
29
29
|
export type InputComponentType = keyof InputComponentRegistry;
|
|
30
30
|
interface InputItemProps<TSchema extends z.ZodObject<any>, TSchemaType extends Record<string, any> = z.infer<TSchema>> {
|
|
31
|
-
form:
|
|
31
|
+
form: UseFormReturn<TSchemaType>;
|
|
32
32
|
inputDef: InputDef<TSchemaType>;
|
|
33
33
|
}
|
|
34
34
|
export type InputDef<TSchemaType extends Record<string, any>> = {
|
|
@@ -55,13 +55,13 @@ interface RenderBasedInputDef<TSchemaType extends Record<string, any>, K extends
|
|
|
55
55
|
placeholder?: string;
|
|
56
56
|
props?: never;
|
|
57
57
|
inputWrapper?: never;
|
|
58
|
-
render: (
|
|
59
|
-
|
|
58
|
+
render: (formControl: {
|
|
59
|
+
control: Control<TSchemaType>;
|
|
60
60
|
name: K;
|
|
61
|
-
}, form:
|
|
61
|
+
}, form: UseFormReturn<TSchemaType>) => ReactElement;
|
|
62
62
|
}
|
|
63
63
|
export type InputWrapperType = (children: ReactNode, label: string) => ReactElement;
|
|
64
64
|
export type InputComponentProps<T extends InputComponentType> = InputComponentRegistry[T] extends keyof React.JSX.IntrinsicElements | JSXElementConstructor<any> ? ComponentProps<InputComponentRegistry[T]> : null;
|
|
65
|
-
export type InputDefBaseProps<TProps> = Omit<TProps, "
|
|
65
|
+
export type InputDefBaseProps<TProps> = Omit<TProps, "formControl" | "label" | "placeholder" | "children">;
|
|
66
66
|
export declare function InputItem<TSchema extends z.ZodObject<any>, TSchemaType extends Record<string, any> = z.infer<TSchema>>({ form, inputDef }: InputItemProps<TSchema, TSchemaType>): import("react/jsx-runtime").JSX.Element | null;
|
|
67
67
|
export {};
|
|
@@ -12,10 +12,10 @@ import { PasswordInput } from "../Input/PasswordInput/PasswordInput.js";
|
|
|
12
12
|
import { TextArea } from "../Input/TextArea/TextArea.js";
|
|
13
13
|
import { Autocomplete } from "../Selection/Autocomplete/Autocomplete.js";
|
|
14
14
|
import { QueryAutocomplete } from "../Selection/Autocomplete/QueryAutocomplete.js";
|
|
15
|
-
import { QuerySelect } from "../Selection/Select/QuerySelect.js";
|
|
16
15
|
import { Slider } from "../Slider/Slider.js";
|
|
17
16
|
import { Toggle } from "../Toggle/Toggle.js";
|
|
18
17
|
import { Segment } from "../../segment/Segment.js";
|
|
18
|
+
import { QuerySelect } from "../Selection/Select/QuerySelect.js";
|
|
19
19
|
import { c } from "react/compiler-runtime";
|
|
20
20
|
import { jsx } from "react/jsx-runtime";
|
|
21
21
|
//#region src/components/inputs/Inputs/InputItem.tsx
|
|
@@ -44,69 +44,70 @@ function InputItem(t0) {
|
|
|
44
44
|
const $ = c(18);
|
|
45
45
|
const { form, inputDef } = t0;
|
|
46
46
|
const { name, label, placeholder, props, inputWrapper, render, type } = inputDef;
|
|
47
|
-
|
|
48
|
-
let
|
|
47
|
+
const t1 = form.control;
|
|
48
|
+
let formControl;
|
|
49
|
+
let t2;
|
|
49
50
|
if ($[0] !== form || $[1] !== name || $[2] !== render) {
|
|
50
|
-
|
|
51
|
+
t2 = Symbol.for("react.early_return_sentinel");
|
|
51
52
|
bb0: {
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
formControl = {
|
|
54
|
+
control: t1,
|
|
54
55
|
name
|
|
55
56
|
};
|
|
56
57
|
if (render) {
|
|
57
|
-
|
|
58
|
+
t2 = render(formControl, form);
|
|
58
59
|
break bb0;
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
$[0] = form;
|
|
62
63
|
$[1] = name;
|
|
63
64
|
$[2] = render;
|
|
64
|
-
$[3] =
|
|
65
|
-
$[4] =
|
|
65
|
+
$[3] = formControl;
|
|
66
|
+
$[4] = t2;
|
|
66
67
|
} else {
|
|
67
|
-
|
|
68
|
-
|
|
68
|
+
formControl = $[3];
|
|
69
|
+
t2 = $[4];
|
|
69
70
|
}
|
|
70
|
-
if (
|
|
71
|
+
if (t2 !== Symbol.for("react.early_return_sentinel")) return t2;
|
|
71
72
|
if (!type) return null;
|
|
72
73
|
const Component = componentRegistry[type];
|
|
73
74
|
const usesChildrenAsLabel = ["toggle", "checkbox"].includes(type);
|
|
74
|
-
let
|
|
75
|
+
let t3;
|
|
75
76
|
if ($[5] !== props) {
|
|
76
|
-
|
|
77
|
+
t3 = props ?? {};
|
|
77
78
|
$[5] = props;
|
|
78
|
-
$[6] =
|
|
79
|
-
} else
|
|
80
|
-
const inputProps =
|
|
81
|
-
const
|
|
82
|
-
const
|
|
83
|
-
let
|
|
84
|
-
if ($[7] !== Component || $[8] !==
|
|
85
|
-
|
|
79
|
+
$[6] = t3;
|
|
80
|
+
} else t3 = $[6];
|
|
81
|
+
const inputProps = t3;
|
|
82
|
+
const t4 = usesChildrenAsLabel ? void 0 : label;
|
|
83
|
+
const t5 = usesChildrenAsLabel ? label : void 0;
|
|
84
|
+
let t6;
|
|
85
|
+
if ($[7] !== Component || $[8] !== formControl || $[9] !== inputProps || $[10] !== placeholder || $[11] !== t4 || $[12] !== t5) {
|
|
86
|
+
t6 = /* @__PURE__ */ jsx(Component, {
|
|
86
87
|
...inputProps,
|
|
87
|
-
label:
|
|
88
|
+
label: t4,
|
|
88
89
|
placeholder,
|
|
89
|
-
|
|
90
|
-
children:
|
|
90
|
+
formControl,
|
|
91
|
+
children: t5
|
|
91
92
|
});
|
|
92
93
|
$[7] = Component;
|
|
93
|
-
$[8] =
|
|
94
|
+
$[8] = formControl;
|
|
94
95
|
$[9] = inputProps;
|
|
95
96
|
$[10] = placeholder;
|
|
96
|
-
$[11] =
|
|
97
|
-
$[12] =
|
|
98
|
-
$[13] =
|
|
99
|
-
} else
|
|
100
|
-
const inputComponent =
|
|
101
|
-
let
|
|
97
|
+
$[11] = t4;
|
|
98
|
+
$[12] = t5;
|
|
99
|
+
$[13] = t6;
|
|
100
|
+
} else t6 = $[13];
|
|
101
|
+
const inputComponent = t6;
|
|
102
|
+
let t7;
|
|
102
103
|
if ($[14] !== inputComponent || $[15] !== inputWrapper || $[16] !== label) {
|
|
103
|
-
|
|
104
|
+
t7 = inputWrapper ? inputWrapper(inputComponent, label) : inputComponent;
|
|
104
105
|
$[14] = inputComponent;
|
|
105
106
|
$[15] = inputWrapper;
|
|
106
107
|
$[16] = label;
|
|
107
|
-
$[17] =
|
|
108
|
-
} else
|
|
109
|
-
return
|
|
108
|
+
$[17] = t7;
|
|
109
|
+
} else t7 = $[17];
|
|
110
|
+
return t7;
|
|
110
111
|
}
|
|
111
112
|
//#endregion
|
|
112
113
|
export { InputItem };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
2
3
|
import { z } from 'zod';
|
|
3
|
-
import { UIForm } from '../../../hooks/useForm';
|
|
4
4
|
import { InputDef } from './InputItem';
|
|
5
5
|
export interface InputsProps<TSchema extends z.ZodObject<any>, TSchemaType extends Record<string, any> = z.infer<TSchema>> {
|
|
6
|
-
form:
|
|
6
|
+
form: UseFormReturn<TSchemaType>;
|
|
7
7
|
inputDefs: Array<InputDef<TSchemaType>>;
|
|
8
8
|
children?: (inputs: Record<keyof TSchemaType, ReactNode>) => ReactNode;
|
|
9
9
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement, Ref } from 'react';
|
|
2
2
|
import { RadioGroupProps as AriaRadioGroupProps } from 'react-aria-components';
|
|
3
|
-
import { FieldValues } from '
|
|
3
|
+
import { FieldValues } from 'react-hook-form';
|
|
4
4
|
import { FormFieldProps } from '../FormField/FormField';
|
|
5
5
|
import { RadioVariantProps } from './radio.cva';
|
|
6
6
|
import { ControlProps } from '../shared/form.types';
|
|
@@ -14,6 +14,7 @@ interface RadioGroupBaseProps extends Omit<FormFieldProps, "variant">, RadioVari
|
|
|
14
14
|
isDirty?: boolean;
|
|
15
15
|
inputClassName?: string;
|
|
16
16
|
labelClassName?: string;
|
|
17
|
+
fireBlurOnChange?: boolean;
|
|
17
18
|
}
|
|
18
19
|
export interface RadioGroupProps extends RadioGroupBaseProps {
|
|
19
20
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
import { UIConfig } from "../../../config/uiConfig.context.js";
|
|
3
|
-
import { FieldController } from "../shared/form.binding.js";
|
|
4
3
|
import { CheckContent } from "../shared/CheckContent.js";
|
|
5
4
|
import { FormFieldLabel } from "../FormField/FormFieldLabel.js";
|
|
6
5
|
import { FormField } from "../FormField/FormField.js";
|
|
7
6
|
import { inputBaseDefinition, inputSizeDefinition } from "../shared/input.cva.js";
|
|
8
7
|
import { radioContentClassName, radioContentRowDefinition, radioContentWrapperDefinition, radioDefinition, radioIndicatorClass, radioTypography } from "./radio.cva.js";
|
|
9
|
-
import { clsx } from "clsx";
|
|
10
|
-
import { Radio, RadioGroup } from "react-aria-components";
|
|
11
8
|
import { c } from "react/compiler-runtime";
|
|
12
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { clsx } from "clsx";
|
|
11
|
+
import { Radio, RadioGroup } from "react-aria-components";
|
|
13
12
|
import { useLabel } from "react-aria";
|
|
14
13
|
import { mergeRefs } from "@react-aria/utils";
|
|
14
|
+
import { Controller } from "react-hook-form";
|
|
15
15
|
//#region src/components/inputs/RadioGroup/RadioGroup.tsx
|
|
16
16
|
var RadioGroupBase = (props) => {
|
|
17
|
-
const $ = c(
|
|
17
|
+
const $ = c(91);
|
|
18
18
|
const ui = UIConfig.useConfig();
|
|
19
19
|
const radioCva = UIOverrides.useCva("radio.cva", radioDefinition);
|
|
20
20
|
const radioTypographyMap = UIOverrides.useMapper("radio.typography", radioTypography);
|
|
@@ -23,11 +23,12 @@ var RadioGroupBase = (props) => {
|
|
|
23
23
|
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
24
24
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
25
25
|
const radioContentClassNameMap = UIOverrides.useMapper("radio.contentClassName", radioContentClassName);
|
|
26
|
-
const { ref, label, tooltipText, helperText, isDirty, isRequired, rightContent, isDisabled, headerClassName, errorClassName, labelClassName, inputClassName, isHeaderHidden, error, className, options, value, defaultValue, onChange, onBlur, as: asProp, size: sizeProp, variant: variantProp, hideLabel: hideLabelProp, ...rest } = props;
|
|
26
|
+
const { ref, label, tooltipText, helperText, isDirty, isRequired, rightContent, isDisabled, headerClassName, errorClassName, labelClassName, inputClassName, isHeaderHidden, error, className, options, value, defaultValue, onChange, onBlur, fireBlurOnChange: fireBlurOnChangeProp, as: asProp, size: sizeProp, variant: variantProp, hideLabel: hideLabelProp, ...rest } = props;
|
|
27
27
|
const as = asProp ?? ui.input.as;
|
|
28
28
|
const size = sizeProp ?? ui.input.size;
|
|
29
29
|
const variant = variantProp ?? ui.radioGroup.variant;
|
|
30
30
|
const hideLabel = hideLabelProp ?? ui.radioGroup.hideLabel;
|
|
31
|
+
const fireBlurOnChange = fireBlurOnChangeProp ?? ui.radioGroup.fireBlurOnChange;
|
|
31
32
|
const radioClassName = radioCva({
|
|
32
33
|
variant,
|
|
33
34
|
...rest
|
|
@@ -108,13 +109,16 @@ var RadioGroupBase = (props) => {
|
|
|
108
109
|
const selectedValue = value ?? defaultValue;
|
|
109
110
|
const shouldRenderInputFrame = as !== "default";
|
|
110
111
|
let t5;
|
|
111
|
-
if ($[25] !== onChange) {
|
|
112
|
+
if ($[25] !== fireBlurOnChange || $[26] !== onBlur || $[27] !== onChange) {
|
|
112
113
|
t5 = (nextValue) => {
|
|
113
114
|
onChange?.(nextValue);
|
|
115
|
+
if (fireBlurOnChange) onBlur?.({});
|
|
114
116
|
};
|
|
115
|
-
$[25] =
|
|
116
|
-
$[26] =
|
|
117
|
-
|
|
117
|
+
$[25] = fireBlurOnChange;
|
|
118
|
+
$[26] = onBlur;
|
|
119
|
+
$[27] = onChange;
|
|
120
|
+
$[28] = t5;
|
|
121
|
+
} else t5 = $[28];
|
|
118
122
|
const handleChange = t5;
|
|
119
123
|
const T0 = RadioGroup;
|
|
120
124
|
const t6 = !!error;
|
|
@@ -124,26 +128,26 @@ var RadioGroupBase = (props) => {
|
|
|
124
128
|
const T1 = FormField;
|
|
125
129
|
const t10 = as === "inline" && "h-full";
|
|
126
130
|
let t11;
|
|
127
|
-
if ($[
|
|
131
|
+
if ($[29] !== className || $[30] !== t10) {
|
|
128
132
|
t11 = clsx("w-full", t10, className);
|
|
129
|
-
$[
|
|
130
|
-
$[
|
|
131
|
-
$[
|
|
132
|
-
} else t11 = $[
|
|
133
|
+
$[29] = className;
|
|
134
|
+
$[30] = t10;
|
|
135
|
+
$[31] = t11;
|
|
136
|
+
} else t11 = $[31];
|
|
133
137
|
const t12 = as === "inline" ? -1 : void 0;
|
|
134
138
|
let t13;
|
|
135
|
-
if ($[
|
|
139
|
+
if ($[32] !== as || $[33] !== inputBaseCva || $[34] !== inputClassName || $[35] !== shouldRenderInputFrame || $[36] !== ui) {
|
|
136
140
|
t13 = clsx("group/radio-group-content relative", shouldRenderInputFrame && inputBaseCva({
|
|
137
141
|
variant: ui.input.variant,
|
|
138
142
|
as
|
|
139
143
|
}), inputClassName);
|
|
140
|
-
$[
|
|
141
|
-
$[
|
|
142
|
-
$[
|
|
143
|
-
$[
|
|
144
|
-
$[
|
|
145
|
-
$[
|
|
146
|
-
} else t13 = $[
|
|
144
|
+
$[32] = as;
|
|
145
|
+
$[33] = inputBaseCva;
|
|
146
|
+
$[34] = inputClassName;
|
|
147
|
+
$[35] = shouldRenderInputFrame;
|
|
148
|
+
$[36] = ui;
|
|
149
|
+
$[37] = t13;
|
|
150
|
+
} else t13 = $[37];
|
|
147
151
|
const t14 = "";
|
|
148
152
|
const t15 = isDisabled || void 0;
|
|
149
153
|
const t16 = isDisabled || void 0;
|
|
@@ -162,17 +166,17 @@ var RadioGroupBase = (props) => {
|
|
|
162
166
|
const t21 = isDirty || void 0;
|
|
163
167
|
const t22 = isRequired || void 0;
|
|
164
168
|
let t23;
|
|
165
|
-
if ($[
|
|
169
|
+
if ($[38] !== as || $[39] !== headerProps || $[40] !== size) {
|
|
166
170
|
t23 = as && ["filter", "floating"].includes(as) && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
167
171
|
as,
|
|
168
172
|
size,
|
|
169
173
|
...headerProps
|
|
170
174
|
});
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
} else t23 = $[
|
|
175
|
+
$[38] = as;
|
|
176
|
+
$[39] = headerProps;
|
|
177
|
+
$[40] = size;
|
|
178
|
+
$[41] = t23;
|
|
179
|
+
} else t23 = $[41];
|
|
176
180
|
const t24 = radioContentRowCva({
|
|
177
181
|
variant,
|
|
178
182
|
as,
|
|
@@ -180,9 +184,9 @@ var RadioGroupBase = (props) => {
|
|
|
180
184
|
...rest
|
|
181
185
|
});
|
|
182
186
|
let t25;
|
|
183
|
-
if ($[
|
|
187
|
+
if ($[42] !== labelClassName || $[43] !== options || $[44] !== radioClassName || $[45] !== radioContentClassNameValue || $[46] !== radioTypographyProps) {
|
|
184
188
|
let t26;
|
|
185
|
-
if ($[
|
|
189
|
+
if ($[48] !== labelClassName || $[49] !== radioClassName || $[50] !== radioContentClassNameValue || $[51] !== radioTypographyProps) {
|
|
186
190
|
t26 = (option) => /* @__PURE__ */ jsxs(Radio, {
|
|
187
191
|
value: option.value,
|
|
188
192
|
className: clsx("relative", radioIndicatorClass),
|
|
@@ -193,47 +197,47 @@ var RadioGroupBase = (props) => {
|
|
|
193
197
|
children: option.label
|
|
194
198
|
})]
|
|
195
199
|
}, option.value);
|
|
196
|
-
$[
|
|
197
|
-
$[
|
|
198
|
-
$[
|
|
199
|
-
$[
|
|
200
|
-
$[
|
|
201
|
-
} else t26 = $[
|
|
200
|
+
$[48] = labelClassName;
|
|
201
|
+
$[49] = radioClassName;
|
|
202
|
+
$[50] = radioContentClassNameValue;
|
|
203
|
+
$[51] = radioTypographyProps;
|
|
204
|
+
$[52] = t26;
|
|
205
|
+
} else t26 = $[52];
|
|
202
206
|
t25 = options.map(t26);
|
|
203
|
-
$[
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
209
|
-
} else t25 = $[
|
|
207
|
+
$[42] = labelClassName;
|
|
208
|
+
$[43] = options;
|
|
209
|
+
$[44] = radioClassName;
|
|
210
|
+
$[45] = radioContentClassNameValue;
|
|
211
|
+
$[46] = radioTypographyProps;
|
|
212
|
+
$[47] = t25;
|
|
213
|
+
} else t25 = $[47];
|
|
210
214
|
let t26;
|
|
211
|
-
if ($[
|
|
215
|
+
if ($[53] !== t24 || $[54] !== t25) {
|
|
212
216
|
t26 = /* @__PURE__ */ jsx("div", {
|
|
213
217
|
className: t24,
|
|
214
218
|
children: t25
|
|
215
219
|
});
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
} else t26 = $[
|
|
220
|
+
$[53] = t24;
|
|
221
|
+
$[54] = t25;
|
|
222
|
+
$[55] = t26;
|
|
223
|
+
} else t26 = $[55];
|
|
220
224
|
let t27;
|
|
221
|
-
if ($[
|
|
225
|
+
if ($[56] !== t20 || $[57] !== t21 || $[58] !== t22 || $[59] !== t23 || $[60] !== t26) {
|
|
222
226
|
t27 = /* @__PURE__ */ jsxs("div", {
|
|
223
227
|
className: t20,
|
|
224
228
|
"data-is-dirty": t21,
|
|
225
229
|
"data-is-required": t22,
|
|
226
230
|
children: [t23, t26]
|
|
227
231
|
});
|
|
228
|
-
$[
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
} else t27 = $[
|
|
232
|
+
$[56] = t20;
|
|
233
|
+
$[57] = t21;
|
|
234
|
+
$[58] = t22;
|
|
235
|
+
$[59] = t23;
|
|
236
|
+
$[60] = t26;
|
|
237
|
+
$[61] = t27;
|
|
238
|
+
} else t27 = $[61];
|
|
235
239
|
let t28;
|
|
236
|
-
if ($[
|
|
240
|
+
if ($[62] !== t13 || $[63] !== t15 || $[64] !== t16 || $[65] !== t17 || $[66] !== t18 || $[67] !== t27) {
|
|
237
241
|
t28 = /* @__PURE__ */ jsx("div", {
|
|
238
242
|
className: t13,
|
|
239
243
|
"data-rac": t14,
|
|
@@ -244,16 +248,16 @@ var RadioGroupBase = (props) => {
|
|
|
244
248
|
"data-radio-group-content": t19,
|
|
245
249
|
children: t27
|
|
246
250
|
});
|
|
247
|
-
$[
|
|
248
|
-
$[
|
|
249
|
-
$[
|
|
250
|
-
$[
|
|
251
|
-
$[
|
|
252
|
-
$[
|
|
253
|
-
$[
|
|
254
|
-
} else t28 = $[
|
|
251
|
+
$[62] = t13;
|
|
252
|
+
$[63] = t15;
|
|
253
|
+
$[64] = t16;
|
|
254
|
+
$[65] = t17;
|
|
255
|
+
$[66] = t18;
|
|
256
|
+
$[67] = t27;
|
|
257
|
+
$[68] = t28;
|
|
258
|
+
} else t28 = $[68];
|
|
255
259
|
let t29;
|
|
256
|
-
if ($[
|
|
260
|
+
if ($[69] !== T1 || $[70] !== as || $[71] !== formFieldProps || $[72] !== labelProps || $[73] !== t11 || $[74] !== t12 || $[75] !== t28) {
|
|
257
261
|
t29 = /* @__PURE__ */ jsx(T1, {
|
|
258
262
|
...formFieldProps,
|
|
259
263
|
as,
|
|
@@ -262,17 +266,17 @@ var RadioGroupBase = (props) => {
|
|
|
262
266
|
tabIndex: t12,
|
|
263
267
|
children: t28
|
|
264
268
|
});
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
268
|
-
$[
|
|
269
|
-
$[
|
|
270
|
-
$[
|
|
271
|
-
$[
|
|
272
|
-
$[
|
|
273
|
-
} else t29 = $[
|
|
269
|
+
$[69] = T1;
|
|
270
|
+
$[70] = as;
|
|
271
|
+
$[71] = formFieldProps;
|
|
272
|
+
$[72] = labelProps;
|
|
273
|
+
$[73] = t11;
|
|
274
|
+
$[74] = t12;
|
|
275
|
+
$[75] = t28;
|
|
276
|
+
$[76] = t29;
|
|
277
|
+
} else t29 = $[76];
|
|
274
278
|
let t30;
|
|
275
|
-
if ($[
|
|
279
|
+
if ($[77] !== T0 || $[78] !== defaultValue || $[79] !== fieldProps || $[80] !== handleChange || $[81] !== isDisabled || $[82] !== onBlur || $[83] !== ref || $[84] !== rest || $[85] !== t29 || $[86] !== t6 || $[87] !== t7 || $[88] !== t8 || $[89] !== value) {
|
|
276
280
|
t30 = /* @__PURE__ */ jsx(T0, {
|
|
277
281
|
...rest,
|
|
278
282
|
...fieldProps,
|
|
@@ -288,54 +292,54 @@ var RadioGroupBase = (props) => {
|
|
|
288
292
|
className: t9,
|
|
289
293
|
children: t29
|
|
290
294
|
});
|
|
291
|
-
$[
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
294
|
-
$[
|
|
295
|
-
$[
|
|
296
|
-
$[
|
|
297
|
-
$[
|
|
298
|
-
$[
|
|
299
|
-
$[
|
|
300
|
-
$[
|
|
301
|
-
$[
|
|
302
|
-
$[
|
|
303
|
-
$[
|
|
304
|
-
$[
|
|
305
|
-
} else t30 = $[
|
|
295
|
+
$[77] = T0;
|
|
296
|
+
$[78] = defaultValue;
|
|
297
|
+
$[79] = fieldProps;
|
|
298
|
+
$[80] = handleChange;
|
|
299
|
+
$[81] = isDisabled;
|
|
300
|
+
$[82] = onBlur;
|
|
301
|
+
$[83] = ref;
|
|
302
|
+
$[84] = rest;
|
|
303
|
+
$[85] = t29;
|
|
304
|
+
$[86] = t6;
|
|
305
|
+
$[87] = t7;
|
|
306
|
+
$[88] = t8;
|
|
307
|
+
$[89] = value;
|
|
308
|
+
$[90] = t30;
|
|
309
|
+
} else t30 = $[90];
|
|
306
310
|
return t30;
|
|
307
311
|
};
|
|
308
312
|
var RadioGroup$1 = (props) => {
|
|
309
313
|
const $ = c(15);
|
|
310
|
-
if ("
|
|
311
|
-
let
|
|
314
|
+
if ("formControl" in props && props.formControl) {
|
|
315
|
+
let formControl;
|
|
312
316
|
let innerProps;
|
|
313
317
|
let ref;
|
|
314
318
|
if ($[0] !== props) {
|
|
315
|
-
({
|
|
319
|
+
({formControl, ref, ...innerProps} = props);
|
|
316
320
|
$[0] = props;
|
|
317
|
-
$[1] =
|
|
321
|
+
$[1] = formControl;
|
|
318
322
|
$[2] = innerProps;
|
|
319
323
|
$[3] = ref;
|
|
320
324
|
} else {
|
|
321
|
-
|
|
325
|
+
formControl = $[1];
|
|
322
326
|
innerProps = $[2];
|
|
323
327
|
ref = $[3];
|
|
324
328
|
}
|
|
325
329
|
let t0;
|
|
326
330
|
if ($[4] !== innerProps || $[5] !== props.error || $[6] !== props.isDisabled || $[7] !== ref) {
|
|
327
331
|
t0 = (t1) => {
|
|
328
|
-
const { field
|
|
332
|
+
const { field, fieldState: t2 } = t1;
|
|
329
333
|
const { error, isDirty } = t2;
|
|
330
334
|
return /* @__PURE__ */ jsx(RadioGroupBase, {
|
|
331
335
|
...innerProps,
|
|
332
|
-
ref: mergeRefs(ref,
|
|
333
|
-
value:
|
|
334
|
-
onChange:
|
|
335
|
-
onBlur:
|
|
336
|
-
name:
|
|
336
|
+
ref: mergeRefs(ref, field.ref),
|
|
337
|
+
value: field.value,
|
|
338
|
+
onChange: field.onChange,
|
|
339
|
+
onBlur: field.onBlur,
|
|
340
|
+
name: field.name,
|
|
337
341
|
isDirty,
|
|
338
|
-
isDisabled:
|
|
342
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
339
343
|
error: props.error ?? error?.message
|
|
340
344
|
});
|
|
341
345
|
};
|
|
@@ -346,14 +350,14 @@ var RadioGroup$1 = (props) => {
|
|
|
346
350
|
$[8] = t0;
|
|
347
351
|
} else t0 = $[8];
|
|
348
352
|
let t1;
|
|
349
|
-
if ($[9] !==
|
|
350
|
-
t1 = /* @__PURE__ */ jsx(
|
|
351
|
-
control:
|
|
352
|
-
name:
|
|
353
|
+
if ($[9] !== formControl.control || $[10] !== formControl.name || $[11] !== t0) {
|
|
354
|
+
t1 = /* @__PURE__ */ jsx(Controller, {
|
|
355
|
+
control: formControl.control,
|
|
356
|
+
name: formControl.name,
|
|
353
357
|
render: t0
|
|
354
358
|
});
|
|
355
|
-
$[9] =
|
|
356
|
-
$[10] =
|
|
359
|
+
$[9] = formControl.control;
|
|
360
|
+
$[10] = formControl.name;
|
|
357
361
|
$[11] = t0;
|
|
358
362
|
$[12] = t1;
|
|
359
363
|
} else t1 = $[12];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { Key } from 'react-aria-components';
|
|
3
|
-
import { FieldValues } from '
|
|
3
|
+
import { FieldValues } from 'react-hook-form';
|
|
4
4
|
import { SelectBaseProps } from '../shared/SelectBase';
|
|
5
5
|
import { DefaultInitialSelectItem, GroupedSelectControlProps, GroupedSelectProps } from '../shared/select.types';
|
|
6
6
|
import { OmitDiscriminatedUnion } from '../../../../types/common';
|