@povio/ui 3.4.0-rc.14 → 3.4.0-rc.16
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/README.md +1 -1
- package/dist/assets/locales/en/{translation.json.js → translation.js} +1 -0
- package/dist/assets/locales/sl/{translation.json.js → translation.js} +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +17 -14
- package/dist/components/Breadcrumbs/Breadcrumbs.js +206 -55
- package/dist/components/Breadcrumbs/breadcrumbs.cva.d.ts +39 -40
- package/dist/components/Breadcrumbs/breadcrumbs.cva.js +5 -5
- package/dist/components/Menu/Menu.d.ts +20 -18
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/MenuDesktop.js +2 -2
- package/dist/components/Menu/MenuItem.d.ts +6 -3
- package/dist/components/Menu/MenuItem.js +2 -2
- package/dist/components/Menu/MenuMobile.js +2 -2
- package/dist/components/Menu/MenuPopover.d.ts +7 -5
- package/dist/components/Menu/MenuPopover.js +2 -2
- package/dist/components/Menu/menu.cva.d.ts +35 -35
- package/dist/components/Menu/menu.cva.js +4 -4
- package/dist/components/buttons/Button/Button.d.ts +25 -23
- package/dist/components/buttons/Button/Button.js +1 -1
- package/dist/components/buttons/Button/button.cva.d.ts +89 -95
- package/dist/components/buttons/Button/button.cva.js +8 -44
- package/dist/components/buttons/IconButton/IconButton.d.ts +13 -10
- package/dist/components/buttons/IconButton/IconButton.js +1 -1
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +15 -12
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
- package/dist/components/buttons/PillButton/PillButton.d.ts +14 -11
- package/dist/components/buttons/PillButton/PillButton.js +2 -2
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +33 -38
- package/dist/components/buttons/PillButton/pillButton.cva.js +5 -5
- package/dist/components/buttons/SplitButton/SplitButton.d.ts +14 -11
- package/dist/components/buttons/SplitButton/SplitButton.js +2 -2
- package/dist/components/buttons/TextButton/TextButton.d.ts +14 -11
- package/dist/components/buttons/TextButton/TextButton.js +1 -1
- package/dist/components/buttons/ToggleButton/ToggleButton.d.ts +11 -8
- package/dist/components/buttons/ToggleButton/ToggleButton.js +1 -1
- package/dist/components/buttons/shared/ButtonContent.js +80 -22
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +6 -8
- package/dist/components/buttons/shared/buttonContent.cva.js +1 -1
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +22 -19
- package/dist/components/inputs/Checkbox/Checkbox.js +45 -201
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +1 -1
- package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +27 -25
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +126 -355
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +73 -89
- package/dist/components/inputs/Checkbox/checkbox.cva.js +8 -8
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +40 -37
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +44 -35
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +46 -43
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +172 -168
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +41 -38
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +21 -18
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +29 -26
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +166 -541
- package/dist/components/inputs/DateTime/shared/Calendar.js +17 -14
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +17 -17
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +5 -4
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +8 -7
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +43 -43
- package/dist/components/inputs/DateTime/shared/DateField.js +19 -20
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +11 -45
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +1 -1
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +26 -102
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +28 -83
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +2 -2
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +58 -103
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +82 -193
- package/dist/components/inputs/DateTime/shared/TimeField.js +8 -27
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +111 -281
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +71 -214
- package/dist/components/inputs/DateTime/shared/YearPicker.js +68 -119
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +8 -5
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +16 -15
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +1 -1
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +11 -50
- package/dist/components/inputs/DateTime/shared/datePickerValue.utils.js +4 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +12 -11
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.js +12 -26
- package/dist/components/inputs/File/FileUpload.d.ts +7 -4
- package/dist/components/inputs/File/FileUpload.js +49 -88
- package/dist/components/inputs/File/FileUploadContainer.d.ts +5 -3
- package/dist/components/inputs/File/FileUploadContainer.js +10 -17
- package/dist/components/inputs/File/InputUpload.d.ts +7 -4
- package/dist/components/inputs/File/InputUpload.js +26 -65
- package/dist/components/inputs/File/fileUpload.types.d.ts +87 -84
- package/dist/components/inputs/File/inputUpload.types.d.ts +34 -32
- package/dist/components/inputs/File/inputUpload.types.js +1 -1
- package/dist/components/inputs/File/shared/FileCard.js +47 -110
- package/dist/components/inputs/File/shared/FileCardList.js +16 -54
- package/dist/components/inputs/File/shared/FileUploadContent.js +47 -188
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +1 -1
- package/dist/components/inputs/File/shared/FileUploadContentError.js +3 -3
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +3 -3
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +1 -1
- package/dist/components/inputs/File/shared/InputUploadContent.js +36 -149
- package/dist/components/inputs/File/shared/InputUploadFilled.js +8 -48
- package/dist/components/inputs/File/shared/ProgressBar.d.ts +6 -4
- package/dist/components/inputs/File/shared/ProgressBar.js +1 -1
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +17 -16
- package/dist/components/inputs/File/shared/fileUpload.cva.js +1 -1
- package/dist/components/inputs/File/shared/inputUploadButton.cva.d.ts +24 -25
- package/dist/components/inputs/File/shared/inputUploadButton.cva.js +5 -5
- package/dist/components/inputs/File/shared/progressBar.cva.d.ts +34 -33
- package/dist/components/inputs/File/shared/progressBar.cva.js +5 -5
- package/dist/components/inputs/FormField/FormField.d.ts +21 -17
- package/dist/components/inputs/FormField/FormField.js +39 -119
- package/dist/components/inputs/FormField/FormFieldError.d.ts +9 -6
- package/dist/components/inputs/FormField/FormFieldError.js +6 -24
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +15 -13
- package/dist/components/inputs/FormField/FormFieldHeader.js +22 -78
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +7 -31
- package/dist/components/inputs/FormField/FormFieldHelper.js +7 -25
- package/dist/components/inputs/FormField/FormFieldLabel.js +9 -40
- package/dist/components/inputs/FormField/formFieldError.cva.d.ts +13 -12
- package/dist/components/inputs/FormField/formFieldError.cva.js +1 -1
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +13 -12
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +1 -1
- package/dist/components/inputs/FormField/formFieldHelper.cva.d.ts +13 -12
- package/dist/components/inputs/FormField/formFieldHelper.cva.js +1 -1
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +25 -21
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +145 -394
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +11 -45
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +120 -553
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +37 -34
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +93 -164
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +10 -7
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +12 -50
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +8 -7
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +1 -1
- package/dist/components/inputs/Input/TextArea/TextArea.d.ts +20 -18
- package/dist/components/inputs/Input/TextArea/TextArea.js +96 -304
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +24 -20
- package/dist/components/inputs/Input/TextInput/TextInput.js +151 -380
- package/dist/components/inputs/Input/shared/InputContent.d.ts +25 -27
- package/dist/components/inputs/Input/shared/InputContent.js +59 -193
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +1 -1
- package/dist/components/inputs/Inputs/Form.d.ts +19 -19
- package/dist/components/inputs/Inputs/Form.js +23 -51
- package/dist/components/inputs/Inputs/InputItem.d.ts +77 -58
- package/dist/components/inputs/Inputs/InputItem.js +16 -65
- package/dist/components/inputs/Inputs/Inputs.d.ts +12 -9
- package/dist/components/inputs/Inputs/Inputs.js +11 -37
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +23 -21
- package/dist/components/inputs/RadioGroup/RadioGroup.js +114 -320
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +49 -59
- package/dist/components/inputs/RadioGroup/radio.cva.js +6 -6
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +15 -11
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +25 -55
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +8 -4
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +46 -117
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +25 -38
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +18 -14
- package/dist/components/inputs/Selection/Select/QuerySelect.js +58 -115
- package/dist/components/inputs/Selection/Select/Select.d.ts +15 -11
- package/dist/components/inputs/Selection/Select/Select.js +35 -111
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +39 -37
- package/dist/components/inputs/Selection/shared/SelectBase.js +26 -70
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +144 -392
- package/dist/components/inputs/Selection/shared/SelectInput.js +161 -428
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +26 -100
- package/dist/components/inputs/Selection/shared/SelectListBox.js +1 -1
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +35 -85
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +16 -69
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +23 -71
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +9 -58
- package/dist/components/inputs/Selection/shared/SelectMobile.js +1 -1
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +14 -39
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +8 -15
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +6 -6
- package/dist/components/inputs/Selection/shared/select.context.js +52 -52
- package/dist/components/inputs/Selection/shared/select.types.d.ts +60 -62
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +8 -5
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +1 -1
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +12 -11
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +1 -1
- package/dist/components/inputs/Selection/shared/selectItem.cva.d.ts +16 -15
- package/dist/components/inputs/Selection/shared/selectItem.cva.js +1 -1
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +3 -3
- package/dist/components/inputs/Selection/shared/useSelectItems.js +12 -12
- package/dist/components/inputs/Skeleton/InputFrame.js +27 -27
- package/dist/components/inputs/Slider/Slider.d.ts +20 -17
- package/dist/components/inputs/Slider/Slider.js +86 -268
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +24 -20
- package/dist/components/inputs/TextEditor/TextEditor.js +21 -62
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +11 -37
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +30 -102
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +45 -194
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +28 -88
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +14 -48
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +19 -66
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +15 -49
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +32 -92
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +54 -126
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +38 -141
- package/dist/components/inputs/TextEditor/textEditor.types.js +1 -1
- package/dist/components/inputs/Toggle/Toggle.d.ts +18 -15
- package/dist/components/inputs/Toggle/Toggle.js +50 -210
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +15 -18
- package/dist/components/inputs/Toggle/toggle.cva.js +3 -3
- package/dist/components/inputs/shared/CheckContent.js +11 -21
- package/dist/components/inputs/shared/InputClear.js +30 -102
- package/dist/components/inputs/shared/TooltipWrapper.js +13 -48
- package/dist/components/inputs/shared/form.binding.d.ts +7 -27
- package/dist/components/inputs/shared/form.binding.js +8 -37
- package/dist/components/inputs/shared/form.types.d.ts +11 -11
- package/dist/components/inputs/shared/form.types.js +1 -1
- package/dist/components/inputs/shared/input.cva.d.ts +76 -85
- package/dist/components/inputs/shared/input.cva.js +9 -19
- package/dist/components/inputs/shared/label.cva.d.ts +18 -18
- package/dist/components/inputs/shared/label.cva.js +2 -2
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +10 -7
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +1 -1
- package/dist/components/inputs/shared/useFieldAccessibility.js +19 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.js +50 -105
- package/dist/components/navigation/Accordion/Accordion.d.ts +5 -3
- package/dist/components/navigation/Accordion/Accordion.js +69 -22
- package/dist/components/navigation/Accordion/AccordionItem.js +86 -41
- package/dist/components/navigation/Accordion/accordion.cva.d.ts +76 -100
- package/dist/components/navigation/Accordion/accordion.cva.js +10 -10
- package/dist/components/navigation/Accordion/accordion.types.d.ts +52 -49
- package/dist/components/navigation/Stepper/Stepper.d.ts +5 -2
- package/dist/components/navigation/Stepper/Stepper.js +67 -22
- package/dist/components/navigation/Stepper/StepperItem.js +2 -2
- package/dist/components/navigation/Stepper/StepperSeparator.js +1 -1
- package/dist/components/navigation/Stepper/stepper.cva.d.ts +73 -86
- package/dist/components/navigation/Stepper/stepper.cva.js +7 -7
- package/dist/components/navigation/Stepper/stepper.types.d.ts +29 -37
- package/dist/components/outline.clsx.d.ts +4 -2
- package/dist/components/outline.clsx.js +2 -2
- package/dist/components/overlays/ActionModal/ActionModal.d.ts +23 -21
- package/dist/components/overlays/ActionModal/ActionModal.js +170 -36
- package/dist/components/overlays/BottomSheet/BottomSheet.d.ts +30 -28
- package/dist/components/overlays/BottomSheet/BottomSheet.js +13 -10
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +2 -2
- package/dist/components/overlays/Drawer/Drawer.d.ts +17 -14
- package/dist/components/overlays/Drawer/Drawer.js +3 -3
- package/dist/components/overlays/Modal/Modal.d.ts +18 -14
- package/dist/components/overlays/Modal/Modal.js +3 -1
- package/dist/components/overlays/Modal/modal.cva.d.ts +34 -34
- package/dist/components/overlays/Modal/modal.cva.js +4 -4
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.d.ts +16 -14
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +110 -29
- package/dist/components/overlays/Tooltip/Tooltip.d.ts +15 -12
- package/dist/components/overlays/Tooltip/Tooltip.js +3 -3
- package/dist/components/overlays/Tooltip/TooltipEllipsis.d.ts +10 -7
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +2 -2
- package/dist/components/overlays/Tooltip/tooltip.cva.d.ts +39 -45
- package/dist/components/overlays/Tooltip/tooltip.cva.js +4 -4
- package/dist/components/segment/Segment.d.ts +7 -4
- package/dist/components/segment/Segment.js +3 -3
- package/dist/components/segment/SegmentItem.js +2 -2
- package/dist/components/segment/segment.cva.d.ts +20 -18
- package/dist/components/segment/segment.cva.js +2 -2
- package/dist/components/segment/segment.types.d.ts +33 -30
- package/dist/components/shared/pagination/Pagination.d.ts +11 -8
- package/dist/components/shared/pagination/Pagination.js +108 -22
- package/dist/components/shared/pagination/PaginationList.d.ts +17 -14
- package/dist/components/shared/pagination/PaginationList.js +2 -2
- package/dist/components/shared/pagination/minWidth.cva.js +1 -1
- package/dist/components/shared/popover.cva.d.ts +8 -7
- package/dist/components/shared/popover.cva.js +1 -1
- package/dist/components/status/Alert/Alert.d.ts +13 -10
- package/dist/components/status/Alert/Alert.js +97 -30
- package/dist/components/status/Alert/alert.cva.d.ts +21 -18
- package/dist/components/status/Alert/alert.cva.js +1 -1
- package/dist/components/status/Loader/Loader.d.ts +7 -5
- package/dist/components/status/Loader/Loader.js +1 -1
- package/dist/components/status/Loader/loader.cva.d.ts +23 -26
- package/dist/components/status/Loader/loader.cva.js +4 -4
- package/dist/components/status/Toast/Toast.d.ts +15 -12
- package/dist/components/status/Toast/Toast.js +2 -2
- package/dist/components/status/Toast/toast.cva.d.ts +58 -77
- package/dist/components/status/Toast/toast.cva.js +6 -6
- package/dist/components/status/Toast/useToast.d.ts +14 -11
- package/dist/components/status/Toast/useToast.js +1 -1
- package/dist/components/status/shared/status.cva.d.ts +32 -28
- package/dist/components/status/shared/status.cva.js +2 -2
- package/dist/components/table/CellText.d.ts +10 -7
- package/dist/components/table/CellText.js +3 -2
- package/dist/components/table/ColumnConfig.d.ts +12 -9
- package/dist/components/table/ColumnConfig.js +6 -5
- package/dist/components/table/HeaderText.d.ts +10 -7
- package/dist/components/table/HeaderText.js +3 -2
- package/dist/components/table/InfiniteTable.d.ts +10 -8
- package/dist/components/table/InfiniteTable.js +67 -16
- package/dist/components/table/PaginatedTable.d.ts +12 -10
- package/dist/components/table/PaginatedTable.js +1 -1
- package/dist/components/table/Table.d.ts +34 -35
- package/dist/components/table/Table.js +18 -16
- package/dist/components/table/table.cva.d.ts +40 -59
- package/dist/components/table/table.cva.js +7 -7
- package/dist/components/text/Link/Link.d.ts +10 -8
- package/dist/components/text/Link/Link.js +2 -2
- package/dist/components/text/Link/link.cva.d.ts +14 -11
- package/dist/components/text/Link/link.cva.js +1 -1
- package/dist/components/text/Pill/Pill.d.ts +17 -14
- package/dist/components/text/Pill/Pill.js +1 -1
- package/dist/components/text/Tag/Tag.d.ts +17 -14
- package/dist/components/text/Tag/Tag.js +1 -1
- package/dist/components/text/Tag/tag.cva.d.ts +18 -15
- package/dist/components/text/Tag/tag.cva.js +1 -1
- package/dist/components/text/Typography/Typography.d.ts +10 -9
- package/dist/components/text/Typography/Typography.js +23 -8
- package/dist/components/text/Typography/typography.cva.d.ts +51 -48
- package/dist/components/text/Typography/typography.cva.js +1 -1
- package/dist/config/confirmation.context.d.ts +22 -19
- package/dist/config/confirmation.context.js +2 -2
- package/dist/config/i18n.d.ts +311 -308
- package/dist/config/i18n.js +4 -4
- package/dist/config/link.context.d.ts +9 -7
- package/dist/config/link.context.js +2 -2
- package/dist/config/router.context.d.ts +11 -9
- package/dist/config/router.context.js +2 -2
- package/dist/config/theme.context.d.ts +19 -16
- package/dist/config/theme.context.js +99 -46
- package/dist/config/uiConfig.context.d.ts +80 -75
- package/dist/config/uiConfig.context.js +46 -9
- package/dist/config/uiOverrides.context.d.ts +205 -204
- package/dist/config/uiOverrides.context.js +2 -2
- package/dist/helpers/dynamicColumns.d.ts +27 -28
- package/dist/helpers/dynamicColumns.js +32 -31
- package/dist/helpers/dynamicInputs.d.ts +66 -74
- package/dist/helpers/dynamicInputs.js +21 -20
- package/dist/hooks/useAutosave.d.ts +12 -9
- package/dist/hooks/useAutosave.js +1 -1
- package/dist/hooks/useBreakpoint.d.ts +4 -2
- package/dist/hooks/useBreakpoint.js +37 -10
- package/dist/hooks/useDebounceCallback.d.ts +7 -4
- package/dist/hooks/useDebounceCallback.js +51 -17
- package/dist/hooks/useDeepCompare.d.ts +7 -4
- package/dist/hooks/useDeepCompare.js +4 -4
- package/dist/hooks/useFilters.d.ts +10 -7
- package/dist/hooks/useFilters.js +8 -6
- package/dist/hooks/useForm.d.ts +35 -35
- package/dist/hooks/useForm.js +6 -6
- package/dist/hooks/useFormAutosave.d.ts +16 -13
- package/dist/hooks/useFormAutosave.js +18 -17
- package/dist/hooks/useIntersectionObserver.d.ts +7 -5
- package/dist/hooks/useIntersectionObserver.js +2 -2
- package/dist/hooks/useKeyInteractions.d.ts +19 -16
- package/dist/hooks/useKeyInteractions.js +5 -5
- package/dist/hooks/useLocalStorage.d.ts +10 -8
- package/dist/hooks/useLocalStorage.js +3 -3
- package/dist/hooks/useLongPressRepeat.d.ts +10 -7
- package/dist/hooks/useLongPressRepeat.js +55 -20
- package/dist/hooks/usePagination.d.ts +9 -6
- package/dist/hooks/usePagination.js +2 -2
- package/dist/hooks/useQueryAutocomplete.js +2 -2
- package/dist/hooks/useScrollableListBox.d.ts +5 -2
- package/dist/hooks/useScrollableListBox.js +1 -1
- package/dist/hooks/useSorting.d.ts +8 -5
- package/dist/hooks/useSorting.js +1 -1
- package/dist/hooks/useStateAndRef.d.ts +5 -3
- package/dist/hooks/useStateAndRef.js +2 -2
- package/dist/hooks/useTableColumnConfig.d.ts +15 -13
- package/dist/hooks/useTableColumnConfig.js +1 -1
- package/dist/hooks/useTableNav.d.ts +79 -77
- package/dist/hooks/useTableNav.js +19 -37
- package/dist/hooks/useTranslationMemo.d.ts +5 -3
- package/dist/index.d.ts +145 -1
- package/dist/index.js +3 -3
- package/dist/rhf/Inputs.d.ts +55 -54
- package/dist/rhf/Inputs.js +62 -17
- package/dist/rhf/components.d.ts +77 -75
- package/dist/rhf/components.js +27 -27
- package/dist/rhf/dynamicInputs.d.ts +16 -14
- package/dist/rhf/dynamicInputs.js +1 -1
- package/dist/rhf/fieldAdapter.d.ts +8 -6
- package/dist/rhf/form.types.d.ts +11 -10
- package/dist/rhf/useAutosave.d.ts +12 -9
- package/dist/rhf/useForm.d.ts +13 -13
- package/dist/rhf/useFormAutosave.d.ts +17 -14
- package/dist/rhf/useFormAutosave.js +121 -34
- package/dist/rhf.d.ts +146 -225
- package/dist/rhf.js +120 -0
- package/dist/tanstack.d.ts +151 -224
- package/dist/tanstack.js +3 -3
- package/dist/text-editor.d.ts +2 -2
- package/dist/tw-ui-plugin.d.ts +4 -2
- package/dist/tw-ui-plugin.js +1 -1
- package/dist/types/common.d.ts +11 -12
- package/dist/types/error-handling.d.ts +8 -5
- package/dist/utils/array.utils.d.ts +5 -2
- package/dist/utils/array.utils.js +1 -1
- package/dist/utils/compoundMapper.d.ts +12 -14
- package/dist/utils/compoundMapper.js +1 -1
- package/dist/utils/date-time.utils.d.ts +44 -41
- package/dist/utils/date-time.utils.js +7 -9
- package/dist/utils/date.utils.d.ts +6 -4
- package/dist/utils/date.utils.js +29 -6
- package/dist/utils/dom.utils.d.ts +7 -4
- package/dist/utils/dom.utils.js +2 -2
- package/dist/utils/file.utils.d.ts +20 -12
- package/dist/utils/file.utils.js +19 -8
- package/dist/utils/intl.utils.d.ts +7 -5
- package/dist/utils/intl.utils.js +2 -2
- package/dist/utils/isEqual.d.ts +4 -1
- package/dist/utils/isEqual.js +3 -3
- package/dist/utils/logger.d.ts +9 -6
- package/dist/utils/logger.js +1 -1
- package/dist/utils/object.utils.d.ts +12 -9
- package/dist/utils/object.utils.js +1 -1
- package/dist/utils/queries.utils.d.ts +6 -3
- package/dist/utils/queries.utils.js +1 -1
- package/dist/utils/query.utils.js +1 -1
- package/dist/utils/routing.utils.d.ts +6 -3
- package/dist/utils/routing.utils.js +1 -1
- package/dist/utils/string.utils.d.ts +6 -3
- package/dist/utils/string.utils.js +1 -1
- package/dist/utils/style-merge.util.d.ts +38 -41
- package/dist/utils/style-merge.util.js +7 -4
- package/dist/utils/zod.utils.d.ts +22 -19
- package/dist/utils/zod.utils.js +1 -1
- package/package.json +30 -8
- 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/Menu/MenuDesktop.d.ts +0 -2
- package/dist/components/Menu/MenuMobile.d.ts +0 -2
- package/dist/components/buttons/shared/ButtonContent.d.ts +0 -14
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.d.ts +0 -9
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +0 -29
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +0 -22
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +0 -27
- package/dist/components/inputs/DateTime/shared/CalendarHeader.d.ts +0 -18
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.d.ts +0 -17
- package/dist/components/inputs/DateTime/shared/DateField.d.ts +0 -21
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +0 -28
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.d.ts +0 -18
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.d.ts +0 -8
- package/dist/components/inputs/DateTime/shared/MonthPicker.d.ts +0 -11
- package/dist/components/inputs/DateTime/shared/RangeCalendar.d.ts +0 -26
- package/dist/components/inputs/DateTime/shared/TimeField.d.ts +0 -12
- package/dist/components/inputs/DateTime/shared/TimePickerForm.d.ts +0 -10
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +0 -25
- package/dist/components/inputs/DateTime/shared/YearPicker.d.ts +0 -12
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +0 -15
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +0 -2
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +0 -41
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.d.ts +0 -2
- package/dist/components/inputs/File/index.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileCard.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileCardList.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileUploadContent.d.ts +0 -10
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.d.ts +0 -9
- package/dist/components/inputs/File/shared/FileUploadContentError.d.ts +0 -11
- package/dist/components/inputs/File/shared/FileUploadContentFilled.d.ts +0 -11
- package/dist/components/inputs/File/shared/FileUploadContentLoading.d.ts +0 -9
- package/dist/components/inputs/File/shared/InputUploadContent.d.ts +0 -9
- package/dist/components/inputs/File/shared/InputUploadFilled.d.ts +0 -8
- package/dist/components/inputs/FormField/FormFieldHeaderClose.d.ts +0 -5
- package/dist/components/inputs/FormField/FormFieldHelper.d.ts +0 -8
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +0 -13
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +0 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +0 -15
- package/dist/components/inputs/Selection/shared/SelectInputTags.d.ts +0 -12
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.d.ts +0 -7
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.d.ts +0 -4
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.d.ts +0 -6
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +0 -5
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +0 -9
- package/dist/components/inputs/Selection/shared/select.context.d.ts +0 -32
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +0 -23
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +0 -1
- package/dist/components/inputs/Selection/shared/useSelectItems.d.ts +0 -23
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +0 -84
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.d.ts +0 -7
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.d.ts +0 -10
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.d.ts +0 -6
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.d.ts +0 -2
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.d.ts +0 -2
- package/dist/components/inputs/TextEditor/textEditor.types.d.ts +0 -5
- package/dist/components/inputs/shared/CheckContent.d.ts +0 -9
- package/dist/components/inputs/shared/InputClear.d.ts +0 -10
- package/dist/components/inputs/shared/TooltipWrapper.d.ts +0 -10
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +0 -15
- package/dist/components/navigation/Accordion/AccordionItem.d.ts +0 -2
- package/dist/components/navigation/Stepper/StepperItem.d.ts +0 -2
- package/dist/components/navigation/Stepper/StepperSeparator.d.ts +0 -5
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.d.ts +0 -13
- package/dist/components/segment/SegmentItem.d.ts +0 -2
- package/dist/components/shared/pagination/minWidth.cva.d.ts +0 -3
- package/dist/hooks/useFormAutosave.spec.d.ts +0 -1
- package/dist/hooks/useKeyInteractions.spec.d.ts +0 -1
- package/dist/hooks/useQueryAutocomplete.d.ts +0 -13
- package/dist/rhf/entrypoints.type-test.d.ts +0 -1
- package/dist/types/react-query.d.ts +0 -6
- package/dist/utils/array.utils.spec.d.ts +0 -1
- package/dist/utils/compoundMapper.spec.d.ts +0 -1
- package/dist/utils/date-time.utils.spec.d.ts +0 -1
- package/dist/utils/date.utils.spec.d.ts +0 -1
- package/dist/utils/intl.utils.spec.d.ts +0 -1
- package/dist/utils/query.utils.d.ts +0 -4
- package/dist/utils/rest.utils.d.ts +0 -10
- package/dist/utils/rest.utils.js +0 -33
- package/dist/utils/style-merge.util.spec.d.ts +0 -1
|
@@ -7,14 +7,13 @@ import { FormField } from "../FormField/FormField.js";
|
|
|
7
7
|
import { inputBaseDefinition, inputSizeDefinition } from "../shared/input.cva.js";
|
|
8
8
|
import { radioContentClassName, radioContentRowDefinition, radioContentWrapperDefinition, radioDefinition, radioIndicatorClass, radioTypography } from "./radio.cva.js";
|
|
9
9
|
import { clsx } from "clsx";
|
|
10
|
+
import { memo } from "react";
|
|
10
11
|
import { Radio, RadioGroup } from "react-aria-components";
|
|
11
|
-
import { c } from "react/compiler-runtime";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { useLabel } from "react-aria";
|
|
14
14
|
import { mergeRefs } from "@react-aria/utils";
|
|
15
15
|
//#region src/components/inputs/RadioGroup/RadioGroup.tsx
|
|
16
|
-
|
|
17
|
-
const $ = c(89);
|
|
16
|
+
const RadioGroupBase = (props) => {
|
|
18
17
|
const ui = UIConfig.useConfig();
|
|
19
18
|
const radioCva = UIOverrides.useCva("radio.cva", radioDefinition);
|
|
20
19
|
const radioTypographyMap = UIOverrides.useMapper("radio.typography", radioTypography);
|
|
@@ -40,332 +39,127 @@ var RadioGroupBase = (props) => {
|
|
|
40
39
|
variant,
|
|
41
40
|
...rest
|
|
42
41
|
});
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
$[9] = rightContent;
|
|
70
|
-
$[10] = t0;
|
|
71
|
-
$[11] = tooltipText;
|
|
72
|
-
$[12] = t1;
|
|
73
|
-
} else t1 = $[12];
|
|
74
|
-
const formFieldProps = t1;
|
|
75
|
-
let t2;
|
|
76
|
-
if ($[13] !== label) {
|
|
77
|
-
t2 = { label };
|
|
78
|
-
$[13] = label;
|
|
79
|
-
$[14] = t2;
|
|
80
|
-
} else t2 = $[14];
|
|
81
|
-
const { labelProps, fieldProps } = useLabel(t2);
|
|
82
|
-
const t3 = hideLabel || isHeaderHidden;
|
|
83
|
-
let t4;
|
|
84
|
-
if ($[15] !== headerClassName || $[16] !== helperText || $[17] !== isDisabled || $[18] !== isRequired || $[19] !== label || $[20] !== labelProps || $[21] !== rightContent || $[22] !== t3 || $[23] !== tooltipText) {
|
|
85
|
-
t4 = {
|
|
86
|
-
label,
|
|
87
|
-
tooltipText,
|
|
88
|
-
helperText,
|
|
89
|
-
isRequired,
|
|
90
|
-
rightContent,
|
|
91
|
-
isHeaderHidden: t3,
|
|
92
|
-
isDisabled,
|
|
93
|
-
className: headerClassName,
|
|
94
|
-
labelProps
|
|
95
|
-
};
|
|
96
|
-
$[15] = headerClassName;
|
|
97
|
-
$[16] = helperText;
|
|
98
|
-
$[17] = isDisabled;
|
|
99
|
-
$[18] = isRequired;
|
|
100
|
-
$[19] = label;
|
|
101
|
-
$[20] = labelProps;
|
|
102
|
-
$[21] = rightContent;
|
|
103
|
-
$[22] = t3;
|
|
104
|
-
$[23] = tooltipText;
|
|
105
|
-
$[24] = t4;
|
|
106
|
-
} else t4 = $[24];
|
|
107
|
-
const headerProps = t4;
|
|
42
|
+
const formFieldProps = {
|
|
43
|
+
className,
|
|
44
|
+
error,
|
|
45
|
+
label,
|
|
46
|
+
tooltipText,
|
|
47
|
+
helperText,
|
|
48
|
+
isRequired,
|
|
49
|
+
rightContent,
|
|
50
|
+
isHeaderHidden: isHeaderHidden || as === "inline" || as === "filter" || as === "floating",
|
|
51
|
+
hideLabel,
|
|
52
|
+
isDisabled,
|
|
53
|
+
headerClassName,
|
|
54
|
+
errorClassName
|
|
55
|
+
};
|
|
56
|
+
const { labelProps, fieldProps } = useLabel({ label });
|
|
57
|
+
const headerProps = {
|
|
58
|
+
label,
|
|
59
|
+
tooltipText,
|
|
60
|
+
helperText,
|
|
61
|
+
isRequired,
|
|
62
|
+
rightContent,
|
|
63
|
+
isHeaderHidden: hideLabel || isHeaderHidden,
|
|
64
|
+
isDisabled,
|
|
65
|
+
className: headerClassName,
|
|
66
|
+
labelProps
|
|
67
|
+
};
|
|
108
68
|
const selectedValue = value ?? defaultValue;
|
|
109
69
|
const shouldRenderInputFrame = as !== "default";
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
if ($[27] !== className || $[28] !== t10) {
|
|
128
|
-
t11 = clsx("w-full", t10, className);
|
|
129
|
-
$[27] = className;
|
|
130
|
-
$[28] = t10;
|
|
131
|
-
$[29] = t11;
|
|
132
|
-
} else t11 = $[29];
|
|
133
|
-
const t12 = as === "inline" ? -1 : void 0;
|
|
134
|
-
let t13;
|
|
135
|
-
if ($[30] !== as || $[31] !== inputBaseCva || $[32] !== inputClassName || $[33] !== shouldRenderInputFrame || $[34] !== ui) {
|
|
136
|
-
t13 = clsx("group/radio-group-content relative", shouldRenderInputFrame && inputBaseCva({
|
|
137
|
-
variant: ui.input.variant,
|
|
138
|
-
as
|
|
139
|
-
}), inputClassName);
|
|
140
|
-
$[30] = as;
|
|
141
|
-
$[31] = inputBaseCva;
|
|
142
|
-
$[32] = inputClassName;
|
|
143
|
-
$[33] = shouldRenderInputFrame;
|
|
144
|
-
$[34] = ui;
|
|
145
|
-
$[35] = t13;
|
|
146
|
-
} else t13 = $[35];
|
|
147
|
-
const t14 = "";
|
|
148
|
-
const t15 = isDisabled || void 0;
|
|
149
|
-
const t16 = isDisabled || void 0;
|
|
150
|
-
const t17 = !!error || void 0;
|
|
151
|
-
const t18 = selectedValue != null && selectedValue !== "" ? true : void 0;
|
|
152
|
-
const t19 = "";
|
|
153
|
-
const t20 = clsx(radioContentWrapperCva({
|
|
154
|
-
variant,
|
|
155
|
-
as,
|
|
156
|
-
hasInputFrame: shouldRenderInputFrame,
|
|
157
|
-
...rest
|
|
158
|
-
}), shouldRenderInputFrame && inputSizeCva({
|
|
159
|
-
as,
|
|
160
|
-
size
|
|
161
|
-
}));
|
|
162
|
-
const t21 = isDirty || void 0;
|
|
163
|
-
const t22 = isRequired || void 0;
|
|
164
|
-
let t23;
|
|
165
|
-
if ($[36] !== as || $[37] !== headerProps || $[38] !== size) {
|
|
166
|
-
t23 = as && ["filter", "floating"].includes(as) && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
167
|
-
as,
|
|
168
|
-
size,
|
|
169
|
-
...headerProps
|
|
170
|
-
});
|
|
171
|
-
$[36] = as;
|
|
172
|
-
$[37] = headerProps;
|
|
173
|
-
$[38] = size;
|
|
174
|
-
$[39] = t23;
|
|
175
|
-
} else t23 = $[39];
|
|
176
|
-
const t24 = radioContentRowCva({
|
|
177
|
-
variant,
|
|
178
|
-
as,
|
|
179
|
-
hasInputFrame: shouldRenderInputFrame,
|
|
180
|
-
...rest
|
|
181
|
-
});
|
|
182
|
-
let t25;
|
|
183
|
-
if ($[40] !== labelClassName || $[41] !== options || $[42] !== radioClassName || $[43] !== radioContentClassNameValue || $[44] !== radioTypographyProps) {
|
|
184
|
-
let t26;
|
|
185
|
-
if ($[46] !== labelClassName || $[47] !== radioClassName || $[48] !== radioContentClassNameValue || $[49] !== radioTypographyProps) {
|
|
186
|
-
t26 = (option) => /* @__PURE__ */ jsxs(Radio, {
|
|
187
|
-
value: option.value,
|
|
188
|
-
className: clsx("relative", radioIndicatorClass),
|
|
189
|
-
children: [/* @__PURE__ */ jsx("div", { className: radioClassName }), /* @__PURE__ */ jsx(CheckContent, {
|
|
190
|
-
typography: radioTypographyProps,
|
|
191
|
-
contentClassName: radioContentClassNameValue,
|
|
192
|
-
className: labelClassName,
|
|
193
|
-
children: option.label
|
|
194
|
-
})]
|
|
195
|
-
}, option.value);
|
|
196
|
-
$[46] = labelClassName;
|
|
197
|
-
$[47] = radioClassName;
|
|
198
|
-
$[48] = radioContentClassNameValue;
|
|
199
|
-
$[49] = radioTypographyProps;
|
|
200
|
-
$[50] = t26;
|
|
201
|
-
} else t26 = $[50];
|
|
202
|
-
t25 = options.map(t26);
|
|
203
|
-
$[40] = labelClassName;
|
|
204
|
-
$[41] = options;
|
|
205
|
-
$[42] = radioClassName;
|
|
206
|
-
$[43] = radioContentClassNameValue;
|
|
207
|
-
$[44] = radioTypographyProps;
|
|
208
|
-
$[45] = t25;
|
|
209
|
-
} else t25 = $[45];
|
|
210
|
-
let t26;
|
|
211
|
-
if ($[51] !== t24 || $[52] !== t25) {
|
|
212
|
-
t26 = /* @__PURE__ */ jsx("div", {
|
|
213
|
-
className: t24,
|
|
214
|
-
children: t25
|
|
215
|
-
});
|
|
216
|
-
$[51] = t24;
|
|
217
|
-
$[52] = t25;
|
|
218
|
-
$[53] = t26;
|
|
219
|
-
} else t26 = $[53];
|
|
220
|
-
let t27;
|
|
221
|
-
if ($[54] !== t20 || $[55] !== t21 || $[56] !== t22 || $[57] !== t23 || $[58] !== t26) {
|
|
222
|
-
t27 = /* @__PURE__ */ jsxs("div", {
|
|
223
|
-
className: t20,
|
|
224
|
-
"data-is-dirty": t21,
|
|
225
|
-
"data-is-required": t22,
|
|
226
|
-
children: [t23, t26]
|
|
227
|
-
});
|
|
228
|
-
$[54] = t20;
|
|
229
|
-
$[55] = t21;
|
|
230
|
-
$[56] = t22;
|
|
231
|
-
$[57] = t23;
|
|
232
|
-
$[58] = t26;
|
|
233
|
-
$[59] = t27;
|
|
234
|
-
} else t27 = $[59];
|
|
235
|
-
let t28;
|
|
236
|
-
if ($[60] !== t13 || $[61] !== t15 || $[62] !== t16 || $[63] !== t17 || $[64] !== t18 || $[65] !== t27) {
|
|
237
|
-
t28 = /* @__PURE__ */ jsx("div", {
|
|
238
|
-
className: t13,
|
|
239
|
-
"data-rac": t14,
|
|
240
|
-
"data-disabled": t15,
|
|
241
|
-
"data-is-disabled": t16,
|
|
242
|
-
"data-invalid": t17,
|
|
243
|
-
"data-has-selection": t18,
|
|
244
|
-
"data-radio-group-content": t19,
|
|
245
|
-
children: t27
|
|
246
|
-
});
|
|
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];
|
|
255
|
-
let t29;
|
|
256
|
-
if ($[67] !== T1 || $[68] !== as || $[69] !== formFieldProps || $[70] !== labelProps || $[71] !== t11 || $[72] !== t12 || $[73] !== t28) {
|
|
257
|
-
t29 = /* @__PURE__ */ jsx(T1, {
|
|
70
|
+
const handleChange = (nextValue) => {
|
|
71
|
+
onChange?.(nextValue);
|
|
72
|
+
};
|
|
73
|
+
return /* @__PURE__ */ jsx(RadioGroup, {
|
|
74
|
+
...rest,
|
|
75
|
+
...fieldProps,
|
|
76
|
+
ref,
|
|
77
|
+
value,
|
|
78
|
+
defaultValue,
|
|
79
|
+
onChange: handleChange,
|
|
80
|
+
onBlur,
|
|
81
|
+
isDisabled,
|
|
82
|
+
isInvalid: !!error,
|
|
83
|
+
"data-is-dirty": isDirty || void 0,
|
|
84
|
+
"data-is-required": isRequired || void 0,
|
|
85
|
+
className: "group",
|
|
86
|
+
children: /* @__PURE__ */ jsx(FormField, {
|
|
258
87
|
...formFieldProps,
|
|
259
88
|
as,
|
|
260
89
|
labelProps,
|
|
261
|
-
className:
|
|
262
|
-
tabIndex:
|
|
263
|
-
children:
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
90
|
+
className: clsx("w-full", as === "inline" && "h-full", className),
|
|
91
|
+
tabIndex: as === "inline" ? -1 : void 0,
|
|
92
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
93
|
+
className: clsx("group/radio-group-content relative", shouldRenderInputFrame && inputBaseCva({
|
|
94
|
+
variant: ui.input.variant,
|
|
95
|
+
as
|
|
96
|
+
}), inputClassName),
|
|
97
|
+
"data-rac": "",
|
|
98
|
+
"data-disabled": isDisabled || void 0,
|
|
99
|
+
"data-is-disabled": isDisabled || void 0,
|
|
100
|
+
"data-invalid": !!error || void 0,
|
|
101
|
+
"data-has-selection": selectedValue != null && selectedValue !== "" ? true : void 0,
|
|
102
|
+
"data-radio-group-content": "",
|
|
103
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
104
|
+
className: clsx(radioContentWrapperCva({
|
|
105
|
+
variant,
|
|
106
|
+
as,
|
|
107
|
+
hasInputFrame: shouldRenderInputFrame,
|
|
108
|
+
...rest
|
|
109
|
+
}), shouldRenderInputFrame && inputSizeCva({
|
|
110
|
+
as,
|
|
111
|
+
size
|
|
112
|
+
})),
|
|
113
|
+
"data-is-dirty": isDirty || void 0,
|
|
114
|
+
"data-is-required": isRequired || void 0,
|
|
115
|
+
children: [as && ["filter", "floating"].includes(as) && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
116
|
+
as,
|
|
117
|
+
size,
|
|
118
|
+
...headerProps
|
|
119
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
120
|
+
className: radioContentRowCva({
|
|
121
|
+
variant,
|
|
122
|
+
as,
|
|
123
|
+
hasInputFrame: shouldRenderInputFrame,
|
|
124
|
+
...rest
|
|
125
|
+
}),
|
|
126
|
+
children: options.map((option) => /* @__PURE__ */ jsxs(Radio, {
|
|
127
|
+
value: option.value,
|
|
128
|
+
className: clsx("relative", radioIndicatorClass),
|
|
129
|
+
children: [/* @__PURE__ */ jsx("div", { className: radioClassName }), /* @__PURE__ */ jsx(CheckContent, {
|
|
130
|
+
typography: radioTypographyProps,
|
|
131
|
+
contentClassName: radioContentClassNameValue,
|
|
132
|
+
className: labelClassName,
|
|
133
|
+
children: option.label
|
|
134
|
+
})]
|
|
135
|
+
}, option.value))
|
|
136
|
+
})]
|
|
137
|
+
})
|
|
138
|
+
})
|
|
139
|
+
})
|
|
140
|
+
});
|
|
307
141
|
};
|
|
308
|
-
|
|
309
|
-
const $ = c(15);
|
|
142
|
+
const RadioGroupComponent = (props) => {
|
|
310
143
|
if ("field" in props && props.field) {
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
({field,
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
field = $[1];
|
|
322
|
-
innerProps = $[2];
|
|
323
|
-
ref = $[3];
|
|
324
|
-
}
|
|
325
|
-
let t0;
|
|
326
|
-
if ($[4] !== innerProps || $[5] !== props.error || $[6] !== props.isDisabled || $[7] !== ref) {
|
|
327
|
-
t0 = (t1) => {
|
|
328
|
-
const { field: field_0, fieldState: t2 } = t1;
|
|
329
|
-
const { error, isDirty } = t2;
|
|
330
|
-
return /* @__PURE__ */ jsx(RadioGroupBase, {
|
|
331
|
-
...innerProps,
|
|
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,
|
|
337
|
-
isDirty,
|
|
338
|
-
isDisabled: field_0.disabled || props.isDisabled,
|
|
339
|
-
error: props.error ?? error?.message
|
|
340
|
-
});
|
|
341
|
-
};
|
|
342
|
-
$[4] = innerProps;
|
|
343
|
-
$[5] = props.error;
|
|
344
|
-
$[6] = props.isDisabled;
|
|
345
|
-
$[7] = ref;
|
|
346
|
-
$[8] = t0;
|
|
347
|
-
} else t0 = $[8];
|
|
348
|
-
let t1;
|
|
349
|
-
if ($[9] !== field.form || $[10] !== field.name || $[11] !== t0) {
|
|
350
|
-
t1 = /* @__PURE__ */ jsx(FieldController, {
|
|
351
|
-
control: field.form,
|
|
144
|
+
const { field, ref, ...innerProps } = props;
|
|
145
|
+
return /* @__PURE__ */ jsx(FieldController, {
|
|
146
|
+
control: field.form,
|
|
147
|
+
name: field.name,
|
|
148
|
+
render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(RadioGroupBase, {
|
|
149
|
+
...innerProps,
|
|
150
|
+
ref: mergeRefs(ref, field.ref),
|
|
151
|
+
value: field.value,
|
|
152
|
+
onChange: field.onChange,
|
|
153
|
+
onBlur: field.onBlur,
|
|
352
154
|
name: field.name,
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
$[12] = t1;
|
|
359
|
-
} else t1 = $[12];
|
|
360
|
-
return t1;
|
|
155
|
+
isDirty,
|
|
156
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
157
|
+
error: props.error ?? error?.message
|
|
158
|
+
})
|
|
159
|
+
});
|
|
361
160
|
}
|
|
362
|
-
|
|
363
|
-
if ($[13] !== props) {
|
|
364
|
-
t0 = /* @__PURE__ */ jsx(RadioGroupBase, { ...props });
|
|
365
|
-
$[13] = props;
|
|
366
|
-
$[14] = t0;
|
|
367
|
-
} else t0 = $[14];
|
|
368
|
-
return t0;
|
|
161
|
+
return /* @__PURE__ */ jsx(RadioGroupBase, { ...props });
|
|
369
162
|
};
|
|
163
|
+
const RadioGroup$1 = memo(RadioGroupComponent);
|
|
370
164
|
//#endregion
|
|
371
165
|
export { RadioGroup$1 as RadioGroup };
|
|
@@ -1,62 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { UIOverrides } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { StyleMergeUtils } from "../../../utils/style-merge.util.js";
|
|
2
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
3
|
+
import "../../text/Typography/typography.cva.js";
|
|
4
|
+
//#region src/components/inputs/RadioGroup/radio.cva.d.ts
|
|
5
|
+
declare const radioDefinition: {
|
|
6
|
+
base: string[];
|
|
7
|
+
config: StyleMergeUtils.Config<{
|
|
8
|
+
readonly variant: {
|
|
9
|
+
default: ["border-interactive-outlined-secondary-on-idle", "group-disabled:border-interactive-outlined-secondary-on-disabled", "group-hover:border-interactive-outlined-secondary-on-hover", "group-pressed:border-interactive-outlined-secondary-on-pressed", "group-selected:border-interactive-contained-primary-idle", "group-selected:bg-interactive-contained-primary-idle", "group-selected:group-disabled:bg-interactive-contained-primary-disabled", "group-selected:group-disabled:border-interactive-contained-primary-disabled", "group-invalid:border-interactive-outlined-error-on-idle", "group-focus-visible:outline-interactive-contained-primary-focus", "before:bg-interactive-contained-primary-on-idle", "group-hover:before:bg-interactive-contained-primary-on-hover", "group-selected:before:block"];
|
|
10
|
+
};
|
|
11
|
+
}>;
|
|
10
12
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}>;
|
|
13
|
+
type RadioConfig = NonNullable<typeof radioDefinition.config>;
|
|
14
|
+
interface RadioVariantProps extends UIOverrides.VariantProps<RadioConfig> {}
|
|
15
|
+
declare const radioContentWrapperDefinition: {
|
|
16
|
+
base: string[];
|
|
17
|
+
config: StyleMergeUtils.Config<{
|
|
18
|
+
readonly variant: {
|
|
19
|
+
readonly default: "";
|
|
20
|
+
};
|
|
21
|
+
readonly as: {
|
|
22
|
+
readonly default: "flex-col";
|
|
23
|
+
readonly floating: "flex-col";
|
|
24
|
+
readonly filter: "flex-row flex-wrap items-center gap-2";
|
|
25
|
+
readonly inline: "flex-row flex-wrap items-center gap-2";
|
|
26
|
+
};
|
|
27
|
+
readonly hasInputFrame: {
|
|
28
|
+
readonly true: "gap-2";
|
|
29
|
+
readonly false: "";
|
|
30
|
+
};
|
|
31
|
+
}>;
|
|
31
32
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
readonly false: "";
|
|
50
|
-
};
|
|
51
|
-
}>;
|
|
33
|
+
declare const radioContentRowDefinition: {
|
|
34
|
+
base: string[];
|
|
35
|
+
config: StyleMergeUtils.Config<{
|
|
36
|
+
readonly variant: {
|
|
37
|
+
readonly default: "";
|
|
38
|
+
};
|
|
39
|
+
readonly as: {
|
|
40
|
+
readonly default: "flex-col";
|
|
41
|
+
readonly floating: "flex-col";
|
|
42
|
+
readonly filter: "flex-row flex-wrap items-center gap-2";
|
|
43
|
+
readonly inline: "flex-row flex-wrap items-center gap-2";
|
|
44
|
+
};
|
|
45
|
+
readonly hasInputFrame: {
|
|
46
|
+
readonly true: "gap-2";
|
|
47
|
+
readonly false: "";
|
|
48
|
+
};
|
|
49
|
+
}>;
|
|
52
50
|
};
|
|
53
|
-
|
|
54
|
-
export
|
|
55
|
-
}
|
|
56
|
-
export declare const radioIndicatorClass = "group flex items-center gap-2";
|
|
57
|
-
export declare const radioTypography: (props: {
|
|
58
|
-
readonly variant?: "default" | null | undefined;
|
|
59
|
-
}) => TypographyVariantProps | undefined;
|
|
60
|
-
export declare const radioContentClassName: (props: {
|
|
61
|
-
readonly variant?: "default" | null | undefined;
|
|
62
|
-
}) => string | undefined;
|
|
51
|
+
//#endregion
|
|
52
|
+
export { RadioConfig, RadioVariantProps, radioContentRowDefinition, radioContentWrapperDefinition, radioDefinition };
|
|
@@ -2,7 +2,7 @@ import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
|
2
2
|
import { uiGroupOutlineClass } from "../../outline.clsx.js";
|
|
3
3
|
import { compoundMapper } from "../../../utils/compoundMapper.js";
|
|
4
4
|
//#region src/components/inputs/RadioGroup/radio.cva.ts
|
|
5
|
-
|
|
5
|
+
const radioDefinition = UIOverrides.defineConfig({
|
|
6
6
|
base: [
|
|
7
7
|
"flex items-center justify-center border-2",
|
|
8
8
|
"relative size-3-5 rounded-full p-1-5",
|
|
@@ -28,7 +28,7 @@ var radioDefinition = UIOverrides.defineConfig({
|
|
|
28
28
|
defaultVariants: { variant: "default" }
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
|
|
31
|
+
const radioContentWrapperDefinition = UIOverrides.defineConfig({
|
|
32
32
|
base: ["relative flex"],
|
|
33
33
|
config: {
|
|
34
34
|
variants: {
|
|
@@ -51,7 +51,7 @@ var radioContentWrapperDefinition = UIOverrides.defineConfig({
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
-
|
|
54
|
+
const radioContentRowDefinition = UIOverrides.defineConfig({
|
|
55
55
|
base: ["flex"],
|
|
56
56
|
config: {
|
|
57
57
|
variants: {
|
|
@@ -74,12 +74,12 @@ var radioContentRowDefinition = UIOverrides.defineConfig({
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
const radioIndicatorClass = "group flex items-center gap-2";
|
|
78
|
+
const radioTypography = compoundMapper({ default: {
|
|
79
79
|
size: "label-1",
|
|
80
80
|
sizeMobile: "label-1",
|
|
81
81
|
variant: "default"
|
|
82
82
|
} });
|
|
83
|
-
|
|
83
|
+
const radioContentClassName = compoundMapper({ default: "text-text-default-2" });
|
|
84
84
|
//#endregion
|
|
85
85
|
export { radioContentClassName, radioContentRowDefinition, radioContentWrapperDefinition, radioDefinition, radioIndicatorClass, radioTypography };
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { FieldValues } from "../../shared/form.binding.js";
|
|
2
|
+
import { DefaultInitialSelectItem, GroupedSelectControlProps, GroupedSelectProps } from "../shared/select.types.js";
|
|
3
|
+
import { SelectBaseProps } from "../shared/SelectBase.js";
|
|
4
|
+
import { OmitDiscriminatedUnion } from "../../../../types/common.js";
|
|
5
|
+
import { ReactElement } from "react";
|
|
6
|
+
import { Key } from "react-aria-components";
|
|
7
|
+
//#region src/components/inputs/Selection/Autocomplete/Autocomplete.d.ts
|
|
8
|
+
type AutocompleteProps<TKey extends Key = Key, TInitialSelectItem = DefaultInitialSelectItem<TKey>> = OmitDiscriminatedUnion<SelectBaseProps<TKey, TInitialSelectItem>, "isSearchable"> & {
|
|
9
|
+
renderStaticInput?: boolean;
|
|
9
10
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
type ControlledAutocompleteProps<TFieldValues extends FieldValues, TKey extends Key = Key, TInitialSelectItem = DefaultInitialSelectItem<TKey>> = Omit<AutocompleteProps<TKey, TInitialSelectItem>, keyof GroupedSelectProps> & GroupedSelectControlProps<TFieldValues, TKey, TInitialSelectItem>;
|
|
12
|
+
declare function AutocompleteComponent<TKey extends Key = Key, TInitialSelectItem = DefaultInitialSelectItem<TKey>>(props: AutocompleteProps<TKey, TInitialSelectItem>): ReactElement;
|
|
13
|
+
declare function AutocompleteComponent<TFieldValues extends FieldValues, TKey extends Key = Key, TInitialSelectItem = DefaultInitialSelectItem<TKey>>(props: ControlledAutocompleteProps<TFieldValues, TKey, TInitialSelectItem>): ReactElement;
|
|
14
|
+
declare const Autocomplete: typeof AutocompleteComponent;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Autocomplete, AutocompleteProps, ControlledAutocompleteProps };
|