@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
|
@@ -5,230 +5,70 @@ import { FormFieldError } from "../FormField/FormFieldError.js";
|
|
|
5
5
|
import { CheckContent } from "../shared/CheckContent.js";
|
|
6
6
|
import { toggleContentClassName, toggleDefinition, toggleTypography } from "./toggle.cva.js";
|
|
7
7
|
import { clsx } from "clsx";
|
|
8
|
+
import { memo } from "react";
|
|
8
9
|
import { Switch } from "react-aria-components";
|
|
9
|
-
import {
|
|
10
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import { mergeRefs } from "@react-aria/utils";
|
|
12
12
|
//#region src/components/inputs/Toggle/Toggle.tsx
|
|
13
|
-
|
|
14
|
-
const $ = c(48);
|
|
13
|
+
const ToggleBase = (props) => {
|
|
15
14
|
const ui = UIConfig.useConfig();
|
|
16
15
|
const toggleCva = UIOverrides.useCva("toggle.cva", toggleDefinition);
|
|
17
16
|
const toggleTypographyMap = UIOverrides.useMapper("toggle.typography", toggleTypography);
|
|
18
17
|
const toggleContentClassNameMap = UIOverrides.useMapper("toggle.contentClassName", toggleContentClassName);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
let t11;
|
|
38
|
-
if ($[19] !== error || $[20] !== isDisabled) {
|
|
39
|
-
t11 = {
|
|
40
|
-
error,
|
|
41
|
-
isDisabled
|
|
42
|
-
};
|
|
43
|
-
$[19] = error;
|
|
44
|
-
$[20] = isDisabled;
|
|
45
|
-
$[21] = t11;
|
|
46
|
-
} else t11 = $[21];
|
|
47
|
-
formFieldErrorProps = t11;
|
|
48
|
-
let t12;
|
|
49
|
-
if ($[22] !== onChange) {
|
|
50
|
-
t12 = (isSelected) => {
|
|
51
|
-
onChange?.(isSelected);
|
|
52
|
-
};
|
|
53
|
-
$[22] = onChange;
|
|
54
|
-
$[23] = t12;
|
|
55
|
-
} else t12 = $[23];
|
|
56
|
-
const handleChange = t12;
|
|
57
|
-
T1 = Switch;
|
|
58
|
-
t2 = rest;
|
|
59
|
-
t3 = props.isDirty || void 0;
|
|
60
|
-
t4 = props.isRequired || void 0;
|
|
61
|
-
t5 = isDisabled;
|
|
62
|
-
t6 = handleChange;
|
|
63
|
-
t7 = onBlur;
|
|
64
|
-
const t13 = !isDisabled && "cursor-pointer";
|
|
65
|
-
if ($[24] !== className || $[25] !== t13) {
|
|
66
|
-
t8 = clsx("group flex items-center gap-2", t13, className);
|
|
67
|
-
$[24] = className;
|
|
68
|
-
$[25] = t13;
|
|
69
|
-
$[26] = t8;
|
|
70
|
-
} else t8 = $[26];
|
|
71
|
-
t9 = /* @__PURE__ */ jsx("div", { className: toggleCva({
|
|
18
|
+
const { className, children, isDisabled, error, variant: variantProp, onChange, onBlur, ...rest } = props;
|
|
19
|
+
const variant = variantProp ?? ui.toggle.variant;
|
|
20
|
+
const formFieldErrorProps = {
|
|
21
|
+
error,
|
|
22
|
+
isDisabled
|
|
23
|
+
};
|
|
24
|
+
const handleChange = (isSelected) => {
|
|
25
|
+
onChange?.(isSelected);
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Switch, {
|
|
28
|
+
...rest,
|
|
29
|
+
"data-is-dirty": props.isDirty || void 0,
|
|
30
|
+
"data-is-required": props.isRequired || void 0,
|
|
31
|
+
isDisabled,
|
|
32
|
+
onChange: handleChange,
|
|
33
|
+
onBlur,
|
|
34
|
+
className: clsx("group flex items-center gap-2", !isDisabled && "cursor-pointer", className),
|
|
35
|
+
children: [/* @__PURE__ */ jsx("div", { className: toggleCva({
|
|
72
36
|
variant,
|
|
73
37
|
...rest
|
|
74
|
-
}) })
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
});
|
|
84
|
-
$[0] = props;
|
|
85
|
-
$[1] = toggleContentClassNameMap;
|
|
86
|
-
$[2] = toggleCva;
|
|
87
|
-
$[3] = toggleTypographyMap;
|
|
88
|
-
$[4] = ui;
|
|
89
|
-
$[5] = T0;
|
|
90
|
-
$[6] = T1;
|
|
91
|
-
$[7] = children;
|
|
92
|
-
$[8] = formFieldErrorProps;
|
|
93
|
-
$[9] = t0;
|
|
94
|
-
$[10] = t1;
|
|
95
|
-
$[11] = t2;
|
|
96
|
-
$[12] = t3;
|
|
97
|
-
$[13] = t4;
|
|
98
|
-
$[14] = t5;
|
|
99
|
-
$[15] = t6;
|
|
100
|
-
$[16] = t7;
|
|
101
|
-
$[17] = t8;
|
|
102
|
-
$[18] = t9;
|
|
103
|
-
} else {
|
|
104
|
-
T0 = $[5];
|
|
105
|
-
T1 = $[6];
|
|
106
|
-
children = $[7];
|
|
107
|
-
formFieldErrorProps = $[8];
|
|
108
|
-
t0 = $[9];
|
|
109
|
-
t1 = $[10];
|
|
110
|
-
t2 = $[11];
|
|
111
|
-
t3 = $[12];
|
|
112
|
-
t4 = $[13];
|
|
113
|
-
t5 = $[14];
|
|
114
|
-
t6 = $[15];
|
|
115
|
-
t7 = $[16];
|
|
116
|
-
t8 = $[17];
|
|
117
|
-
t9 = $[18];
|
|
118
|
-
}
|
|
119
|
-
let t10;
|
|
120
|
-
if ($[27] !== T0 || $[28] !== children || $[29] !== t0 || $[30] !== t1) {
|
|
121
|
-
t10 = /* @__PURE__ */ jsx(T0, {
|
|
122
|
-
typography: t0,
|
|
123
|
-
contentClassName: t1,
|
|
38
|
+
}) }), /* @__PURE__ */ jsx(CheckContent, {
|
|
39
|
+
typography: toggleTypographyMap({
|
|
40
|
+
variant,
|
|
41
|
+
...rest
|
|
42
|
+
}),
|
|
43
|
+
contentClassName: toggleContentClassNameMap({
|
|
44
|
+
variant,
|
|
45
|
+
...rest
|
|
46
|
+
}),
|
|
124
47
|
children
|
|
125
|
-
})
|
|
126
|
-
|
|
127
|
-
$[28] = children;
|
|
128
|
-
$[29] = t0;
|
|
129
|
-
$[30] = t1;
|
|
130
|
-
$[31] = t10;
|
|
131
|
-
} else t10 = $[31];
|
|
132
|
-
let t11;
|
|
133
|
-
if ($[32] !== T1 || $[33] !== t10 || $[34] !== t2 || $[35] !== t3 || $[36] !== t4 || $[37] !== t5 || $[38] !== t6 || $[39] !== t7 || $[40] !== t8 || $[41] !== t9) {
|
|
134
|
-
t11 = /* @__PURE__ */ jsxs(T1, {
|
|
135
|
-
...t2,
|
|
136
|
-
"data-is-dirty": t3,
|
|
137
|
-
"data-is-required": t4,
|
|
138
|
-
isDisabled: t5,
|
|
139
|
-
onChange: t6,
|
|
140
|
-
onBlur: t7,
|
|
141
|
-
className: t8,
|
|
142
|
-
children: [t9, t10]
|
|
143
|
-
});
|
|
144
|
-
$[32] = T1;
|
|
145
|
-
$[33] = t10;
|
|
146
|
-
$[34] = t2;
|
|
147
|
-
$[35] = t3;
|
|
148
|
-
$[36] = t4;
|
|
149
|
-
$[37] = t5;
|
|
150
|
-
$[38] = t6;
|
|
151
|
-
$[39] = t7;
|
|
152
|
-
$[40] = t8;
|
|
153
|
-
$[41] = t9;
|
|
154
|
-
$[42] = t11;
|
|
155
|
-
} else t11 = $[42];
|
|
156
|
-
let t12;
|
|
157
|
-
if ($[43] !== formFieldErrorProps) {
|
|
158
|
-
t12 = /* @__PURE__ */ jsx(FormFieldError, { ...formFieldErrorProps });
|
|
159
|
-
$[43] = formFieldErrorProps;
|
|
160
|
-
$[44] = t12;
|
|
161
|
-
} else t12 = $[44];
|
|
162
|
-
let t13;
|
|
163
|
-
if ($[45] !== t11 || $[46] !== t12) {
|
|
164
|
-
t13 = /* @__PURE__ */ jsxs(Fragment, { children: [t11, t12] });
|
|
165
|
-
$[45] = t11;
|
|
166
|
-
$[46] = t12;
|
|
167
|
-
$[47] = t13;
|
|
168
|
-
} else t13 = $[47];
|
|
169
|
-
return t13;
|
|
48
|
+
})]
|
|
49
|
+
}), /* @__PURE__ */ jsx(FormFieldError, { ...formFieldErrorProps })] });
|
|
170
50
|
};
|
|
171
|
-
|
|
172
|
-
const $ = c(15);
|
|
51
|
+
const ToggleComponent = (props) => {
|
|
173
52
|
if ("field" in props && props.field) {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
({field,
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
field = $[1];
|
|
185
|
-
innerProps = $[2];
|
|
186
|
-
ref = $[3];
|
|
187
|
-
}
|
|
188
|
-
let t0;
|
|
189
|
-
if ($[4] !== innerProps || $[5] !== props.error || $[6] !== props.isDisabled || $[7] !== ref) {
|
|
190
|
-
t0 = (t1) => {
|
|
191
|
-
const { field: field_0, fieldState: t2 } = t1;
|
|
192
|
-
const { error, isDirty } = t2;
|
|
193
|
-
return /* @__PURE__ */ jsx(ToggleBase, {
|
|
194
|
-
...innerProps,
|
|
195
|
-
ref: mergeRefs(ref, field_0.ref),
|
|
196
|
-
isSelected: field_0.value,
|
|
197
|
-
onChange: field_0.onChange,
|
|
198
|
-
onBlur: field_0.onBlur,
|
|
199
|
-
name: field_0.name,
|
|
200
|
-
isDirty,
|
|
201
|
-
isDisabled: field_0.disabled || props.isDisabled,
|
|
202
|
-
error: props.error ?? error?.message
|
|
203
|
-
});
|
|
204
|
-
};
|
|
205
|
-
$[4] = innerProps;
|
|
206
|
-
$[5] = props.error;
|
|
207
|
-
$[6] = props.isDisabled;
|
|
208
|
-
$[7] = ref;
|
|
209
|
-
$[8] = t0;
|
|
210
|
-
} else t0 = $[8];
|
|
211
|
-
let t1;
|
|
212
|
-
if ($[9] !== field.form || $[10] !== field.name || $[11] !== t0) {
|
|
213
|
-
t1 = /* @__PURE__ */ jsx(FieldController, {
|
|
214
|
-
control: field.form,
|
|
53
|
+
const { field, ref, ...innerProps } = props;
|
|
54
|
+
return /* @__PURE__ */ jsx(FieldController, {
|
|
55
|
+
control: field.form,
|
|
56
|
+
name: field.name,
|
|
57
|
+
render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(ToggleBase, {
|
|
58
|
+
...innerProps,
|
|
59
|
+
ref: mergeRefs(ref, field.ref),
|
|
60
|
+
isSelected: field.value,
|
|
61
|
+
onChange: field.onChange,
|
|
62
|
+
onBlur: field.onBlur,
|
|
215
63
|
name: field.name,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
$[12] = t1;
|
|
222
|
-
} else t1 = $[12];
|
|
223
|
-
return t1;
|
|
64
|
+
isDirty,
|
|
65
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
66
|
+
error: props.error ?? error?.message
|
|
67
|
+
})
|
|
68
|
+
});
|
|
224
69
|
}
|
|
225
|
-
|
|
226
|
-
if ($[13] !== props) {
|
|
227
|
-
t0 = /* @__PURE__ */ jsx(ToggleBase, { ...props });
|
|
228
|
-
$[13] = props;
|
|
229
|
-
$[14] = t0;
|
|
230
|
-
} else t0 = $[14];
|
|
231
|
-
return t0;
|
|
70
|
+
return /* @__PURE__ */ jsx(ToggleBase, { ...props });
|
|
232
71
|
};
|
|
72
|
+
const Toggle = memo(ToggleComponent);
|
|
233
73
|
//#endregion
|
|
234
74
|
export { Toggle };
|
|
@@ -1,19 +1,16 @@
|
|
|
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/Toggle/toggle.cva.d.ts
|
|
5
|
+
declare const toggleDefinition: {
|
|
6
|
+
base: string[];
|
|
7
|
+
config: StyleMergeUtils.Config<{
|
|
8
|
+
readonly variant: {
|
|
9
|
+
default: ["bg-interactive-contained-secondary-idle", "group-disabled:bg-interactive-contained-secondary-disabled", "group-hover:bg-interactive-contained-secondary-hover", "group-pressed:bg-interactive-contained-secondary-pressed", "group-selected:bg-interactive-contained-primary-idle", "group-selected:group-hover:bg-interactive-contained-primary-hover", "group-selected:group-pressed:bg-interactive-contained-primary-pressed", "group-focus-visible:outline-interactive-text-secondary-focus", "before:bg-interactive-contained-secondary-on-idle", "group-hover:before:bg-interactive-contained-secondary-on-hover", "group-disabled:before:bg-interactive-contained-secondary-on-disabled", "group-selected:before:bg-interactive-contained-primary-on-idle", "group-selected:group-hover:before:bg-interactive-contained-primary-on-hover", "group-selected:group-pressed:before:bg-interactive-contained-primary-on-pressed", "group-selected:group-disabled:bg-interactive-contained-primary-disabled"];
|
|
10
|
+
};
|
|
11
|
+
}>;
|
|
10
12
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export
|
|
15
|
-
readonly variant?: "default" | null | undefined;
|
|
16
|
-
}) => TypographyVariantProps | undefined;
|
|
17
|
-
export declare const toggleContentClassName: (props: {
|
|
18
|
-
readonly variant?: "default" | null | undefined;
|
|
19
|
-
}) => string | undefined;
|
|
13
|
+
type ToggleConfig = NonNullable<typeof toggleDefinition.config>;
|
|
14
|
+
interface ToggleVariantProps extends UIOverrides.VariantProps<ToggleConfig> {}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { ToggleConfig, ToggleVariantProps, toggleDefinition };
|
|
@@ -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/Toggle/toggle.cva.ts
|
|
5
|
-
|
|
5
|
+
const toggleDefinition = UIOverrides.defineConfig({
|
|
6
6
|
base: ["h-6 w-10 rounded-full before:m-0-5 before:block before:aspect-square before:h-5 before:rounded-full before:transition-transform before:content-[''] group-selected:before:translate-x-4", uiGroupOutlineClass],
|
|
7
7
|
config: {
|
|
8
8
|
variants: { variant: { default: [
|
|
@@ -25,11 +25,11 @@ var toggleDefinition = UIOverrides.defineConfig({
|
|
|
25
25
|
defaultVariants: { variant: "default" }
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
|
-
|
|
28
|
+
const toggleTypography = compoundMapper({ default: {
|
|
29
29
|
size: "label-1",
|
|
30
30
|
sizeMobile: "label-1",
|
|
31
31
|
variant: "default"
|
|
32
32
|
} });
|
|
33
|
-
|
|
33
|
+
const toggleContentClassName = compoundMapper({ default: "text-text-default-2" });
|
|
34
34
|
//#endregion
|
|
35
35
|
export { toggleContentClassName, toggleDefinition, toggleTypography };
|
|
@@ -1,29 +1,19 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
import { typographyDefinition } from "../../text/Typography/typography.cva.js";
|
|
3
3
|
import clsx$1 from "clsx";
|
|
4
|
-
import { c } from "react/compiler-runtime";
|
|
5
4
|
import { jsx } from "react/jsx-runtime";
|
|
6
5
|
//#region src/components/inputs/shared/CheckContent.tsx
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
t2 = /* @__PURE__ */ jsx("div", {
|
|
19
|
-
className: t1,
|
|
20
|
-
children
|
|
21
|
-
});
|
|
22
|
-
$[0] = children;
|
|
23
|
-
$[1] = t1;
|
|
24
|
-
$[2] = t2;
|
|
25
|
-
} else t2 = $[2];
|
|
26
|
-
return t2;
|
|
6
|
+
const CheckContent = ({ children, className, contentClassName, ...props }) => {
|
|
7
|
+
const typographyCva = UIOverrides.useCva("typography.cva", typographyDefinition);
|
|
8
|
+
return /* @__PURE__ */ jsx("div", {
|
|
9
|
+
className: clsx$1(typographyCva({
|
|
10
|
+
size: "label-1",
|
|
11
|
+
sizeMobile: "label-1",
|
|
12
|
+
variant: "default",
|
|
13
|
+
...props.typography
|
|
14
|
+
}), contentClassName, className),
|
|
15
|
+
children
|
|
16
|
+
});
|
|
27
17
|
};
|
|
28
18
|
//#endregion
|
|
29
19
|
export { CheckContent };
|
|
@@ -3,116 +3,44 @@ import { InlineIconButton } from "../../buttons/InlineIconButton/InlineIconButto
|
|
|
3
3
|
import "../../../config/i18n.js";
|
|
4
4
|
import { X } from "lucide-react";
|
|
5
5
|
import { clsx } from "clsx";
|
|
6
|
-
import { c } from "react/compiler-runtime";
|
|
7
6
|
import { jsx } from "react/jsx-runtime";
|
|
8
7
|
import { useTranslation } from "react-i18next";
|
|
9
8
|
//#region src/components/inputs/shared/InputClear.tsx
|
|
10
|
-
|
|
11
|
-
const $ = c(17);
|
|
12
|
-
const { onClear, className, style, show, renderStatic } = t0;
|
|
9
|
+
const InputClear = ({ onClear, className, style, show, renderStatic }) => {
|
|
13
10
|
const ui = UIConfig.useConfig();
|
|
14
11
|
const { t } = useTranslation("ui");
|
|
15
12
|
const alwaysShowClear = ui.input.alwaysShowClear;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
$[12] = t3;
|
|
34
|
-
} else t3 = $[12];
|
|
35
|
-
t1 = /* @__PURE__ */ jsx("button", {
|
|
36
|
-
type: "button",
|
|
37
|
-
"aria-hidden": !show,
|
|
38
|
-
"aria-label": t2,
|
|
39
|
-
"data-static-clear-action": true,
|
|
40
|
-
tabIndex: -1,
|
|
41
|
-
onClick: onClear,
|
|
42
|
-
className: clsx("group inline-flex items-center justify-center border border-solid border-support-transparent-outline", "rounded-button-rounding-s p-0 text-interactive-text-secondary-idle", clearClassName),
|
|
43
|
-
style,
|
|
44
|
-
children: t3
|
|
45
|
-
});
|
|
46
|
-
break bb0;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
$[0] = alwaysShowClear;
|
|
50
|
-
$[1] = className;
|
|
51
|
-
$[2] = onClear;
|
|
52
|
-
$[3] = renderStatic;
|
|
53
|
-
$[4] = show;
|
|
54
|
-
$[5] = style;
|
|
55
|
-
$[6] = t;
|
|
56
|
-
$[7] = clearClassName;
|
|
57
|
-
$[8] = t1;
|
|
58
|
-
} else {
|
|
59
|
-
clearClassName = $[7];
|
|
60
|
-
t1 = $[8];
|
|
61
|
-
}
|
|
62
|
-
if (t1 !== Symbol.for("react.early_return_sentinel")) return t1;
|
|
63
|
-
let t2;
|
|
64
|
-
if ($[13] !== clearClassName || $[14] !== onClear || $[15] !== style) {
|
|
65
|
-
t2 = /* @__PURE__ */ jsx(InputClearButton, {
|
|
66
|
-
onClear,
|
|
67
|
-
className: clearClassName,
|
|
68
|
-
style
|
|
69
|
-
});
|
|
70
|
-
$[13] = clearClassName;
|
|
71
|
-
$[14] = onClear;
|
|
72
|
-
$[15] = style;
|
|
73
|
-
$[16] = t2;
|
|
74
|
-
} else t2 = $[16];
|
|
75
|
-
return t2;
|
|
13
|
+
const clearClassName = clsx("relative z-raised flex items-center", !alwaysShowClear && "md:invisible group-focus-within:visible group-hover/date-picker-content:visible group-hover/select-content:visible group-hover/text-area:visible group-hover:visible", "border-0!", !show && "invisible!", className);
|
|
14
|
+
if (renderStatic) return /* @__PURE__ */ jsx("button", {
|
|
15
|
+
type: "button",
|
|
16
|
+
"aria-hidden": !show,
|
|
17
|
+
"aria-label": show ? t(($) => $.ui.clearAlt) : void 0,
|
|
18
|
+
"data-static-clear-action": true,
|
|
19
|
+
tabIndex: -1,
|
|
20
|
+
onClick: onClear,
|
|
21
|
+
className: clsx("group inline-flex items-center justify-center border border-solid border-support-transparent-outline", "rounded-button-rounding-s p-0 text-interactive-text-secondary-idle", clearClassName),
|
|
22
|
+
style,
|
|
23
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-6 w-6 shrink-0" })
|
|
24
|
+
});
|
|
25
|
+
return /* @__PURE__ */ jsx(InputClearButton, {
|
|
26
|
+
onClear,
|
|
27
|
+
className: clearClassName,
|
|
28
|
+
style
|
|
29
|
+
});
|
|
76
30
|
};
|
|
77
|
-
|
|
78
|
-
const $ = c(7);
|
|
79
|
-
const { onClear, className, style } = t0;
|
|
31
|
+
const InputClearButton = ({ onClear, className, style }) => {
|
|
80
32
|
const { t } = useTranslation("ui");
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
$
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
label: t1,
|
|
93
|
-
icon: X,
|
|
94
|
-
onPress: onClear,
|
|
95
|
-
isDisabled: false,
|
|
96
|
-
onMouseDown: _temp3,
|
|
97
|
-
excludeFromTabOrder: true,
|
|
98
|
-
style
|
|
99
|
-
});
|
|
100
|
-
$[2] = className;
|
|
101
|
-
$[3] = onClear;
|
|
102
|
-
$[4] = style;
|
|
103
|
-
$[5] = t1;
|
|
104
|
-
$[6] = t2;
|
|
105
|
-
} else t2 = $[6];
|
|
106
|
-
return t2;
|
|
33
|
+
return /* @__PURE__ */ jsx(InlineIconButton, {
|
|
34
|
+
color: "secondary",
|
|
35
|
+
className,
|
|
36
|
+
label: t(($) => $.ui.clearAlt),
|
|
37
|
+
icon: X,
|
|
38
|
+
onPress: onClear,
|
|
39
|
+
isDisabled: false,
|
|
40
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
41
|
+
excludeFromTabOrder: true,
|
|
42
|
+
style
|
|
43
|
+
});
|
|
107
44
|
};
|
|
108
|
-
function _temp($) {
|
|
109
|
-
return $.ui.clearAlt;
|
|
110
|
-
}
|
|
111
|
-
function _temp2($) {
|
|
112
|
-
return $.ui.clearAlt;
|
|
113
|
-
}
|
|
114
|
-
function _temp3(e) {
|
|
115
|
-
return e.preventDefault();
|
|
116
|
-
}
|
|
117
45
|
//#endregion
|
|
118
46
|
export { InputClear };
|
|
@@ -1,60 +1,25 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
import { Tooltip } from "../../overlays/Tooltip/Tooltip.js";
|
|
3
3
|
import { tooltipWrapperTriggerDefinition } from "./tooltipWrapper.cva.js";
|
|
4
|
-
import { c } from "react/compiler-runtime";
|
|
5
4
|
import { jsx } from "react/jsx-runtime";
|
|
6
5
|
//#region src/components/inputs/shared/TooltipWrapper.tsx
|
|
7
|
-
|
|
8
|
-
const $ = c(14);
|
|
6
|
+
const TooltipWrapper = (props) => {
|
|
9
7
|
const tooltipWrapperTriggerCva = UIOverrides.useCva("tooltipWrapper.triggerCva", tooltipWrapperTriggerDefinition);
|
|
10
8
|
if (props.as !== "inline") return props.children;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const t3 = props.triggerTabIndex;
|
|
21
|
-
let t4;
|
|
22
|
-
if ($[3] !== tooltipWrapperTriggerCva) {
|
|
23
|
-
t4 = tooltipWrapperTriggerCva({});
|
|
24
|
-
$[3] = tooltipWrapperTriggerCva;
|
|
25
|
-
$[4] = t4;
|
|
26
|
-
} else t4 = $[4];
|
|
27
|
-
let t5;
|
|
28
|
-
if ($[5] !== props.children || $[6] !== t4) {
|
|
29
|
-
t5 = /* @__PURE__ */ jsx("div", {
|
|
9
|
+
return /* @__PURE__ */ jsx(Tooltip, {
|
|
10
|
+
text: props.error || void 0,
|
|
11
|
+
placement: "bottom",
|
|
12
|
+
color: "error",
|
|
13
|
+
hidden: !props.error,
|
|
14
|
+
isNonInteractiveTrigger: true,
|
|
15
|
+
triggerClassName: tooltipWrapperTriggerCva({ className: props.triggerClassName }),
|
|
16
|
+
triggerTabIndex: props.triggerTabIndex,
|
|
17
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
30
18
|
tabIndex: -1,
|
|
31
|
-
className:
|
|
19
|
+
className: tooltipWrapperTriggerCva({}),
|
|
32
20
|
children: props.children
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
$[6] = t4;
|
|
36
|
-
$[7] = t5;
|
|
37
|
-
} else t5 = $[7];
|
|
38
|
-
let t6;
|
|
39
|
-
if ($[8] !== props.triggerTabIndex || $[9] !== t0 || $[10] !== t1 || $[11] !== t2 || $[12] !== t5) {
|
|
40
|
-
t6 = /* @__PURE__ */ jsx(Tooltip, {
|
|
41
|
-
text: t0,
|
|
42
|
-
placement: "bottom",
|
|
43
|
-
color: "error",
|
|
44
|
-
hidden: t1,
|
|
45
|
-
isNonInteractiveTrigger: true,
|
|
46
|
-
triggerClassName: t2,
|
|
47
|
-
triggerTabIndex: t3,
|
|
48
|
-
children: t5
|
|
49
|
-
});
|
|
50
|
-
$[8] = props.triggerTabIndex;
|
|
51
|
-
$[9] = t0;
|
|
52
|
-
$[10] = t1;
|
|
53
|
-
$[11] = t2;
|
|
54
|
-
$[12] = t5;
|
|
55
|
-
$[13] = t6;
|
|
56
|
-
} else t6 = $[13];
|
|
57
|
-
return t6;
|
|
21
|
+
})
|
|
22
|
+
});
|
|
58
23
|
};
|
|
59
24
|
//#endregion
|
|
60
25
|
export { TooltipWrapper };
|
|
@@ -1,27 +1,7 @@
|
|
|
1
|
-
import { DeepKeys,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
name: DeepKeys<TFieldValues>;
|
|
9
|
-
render: (props: {
|
|
10
|
-
field: {
|
|
11
|
-
disabled: boolean;
|
|
12
|
-
name: string;
|
|
13
|
-
onBlur: () => void;
|
|
14
|
-
onChange: (value: any) => void;
|
|
15
|
-
ref: () => void;
|
|
16
|
-
value: any;
|
|
17
|
-
};
|
|
18
|
-
fieldState: {
|
|
19
|
-
error?: {
|
|
20
|
-
message: string;
|
|
21
|
-
};
|
|
22
|
-
isDirty: boolean;
|
|
23
|
-
};
|
|
24
|
-
}) => React.ReactNode;
|
|
25
|
-
}
|
|
26
|
-
export declare function FieldController<TFieldValues extends FieldValues>({ control: form, name, render, }: FieldControllerProps<TFieldValues>): import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
export {};
|
|
1
|
+
import { DeepKeys, UIForm } from "../../../hooks/useForm.js";
|
|
2
|
+
//#region src/components/inputs/shared/form.binding.d.ts
|
|
3
|
+
type FieldValues = Record<string, any>;
|
|
4
|
+
type FieldPath<TFieldValues extends FieldValues> = DeepKeys<TFieldValues>;
|
|
5
|
+
type FormInstance<TFieldValues extends FieldValues> = UIForm<TFieldValues>;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { FieldPath, FieldValues, FormInstance };
|