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