@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
|
@@ -1,94 +1,78 @@
|
|
|
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/Checkbox/checkbox.cva.d.ts
|
|
5
|
+
declare const checkboxDefinition: {
|
|
6
|
+
base: string[];
|
|
7
|
+
config: StyleMergeUtils.Config<{
|
|
8
|
+
readonly variant: {
|
|
9
|
+
default: ["m-1 border-interactive-outlined-secondary-on-idle", "text-interactive-contained-primary-on-idle", "group-hover:text-interactive-contained-primary-on-hover", "group-pressed:text-interactive-contained-primary-on-pressed", "group-disabled:text-interactive-contained-primary-on-disabled", "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-hover:bg-interactive-contained-primary-hover", "group-selected:group-hover:border-interactive-contained-primary-hover", "group-selected:group-pressed:bg-interactive-contained-primary-pressed", "group-selected:group-pressed:border-interactive-contained-primary-pressed", "group-selected:group-disabled:bg-interactive-contained-primary-disabled", "group-selected:group-disabled:border-interactive-contained-primary-disabled", "group-indeterminate:border-interactive-contained-primary-idle", "group-indeterminate:bg-interactive-contained-primary-idle", "group-indeterminate:group-hover:bg-interactive-contained-primary-hover", "group-indeterminate:group-hover:border-interactive-contained-primary-hover", "group-indeterminate:group-pressed:bg-interactive-contained-primary-pressed", "group-indeterminate:group-pressed:border-interactive-contained-primary-pressed", "group-invalid:border-interactive-outlined-error-on-idle", "group-focus-visible:outline-interactive-contained-primary-focus"];
|
|
10
|
+
};
|
|
11
|
+
}>;
|
|
10
12
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
readonly variant
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
readonly
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
readonly filter: "flex-row flex-wrap items-center gap-2";
|
|
37
|
-
readonly inline: "flex-row flex-wrap items-center gap-2";
|
|
38
|
-
};
|
|
39
|
-
readonly hasInputFrame: {
|
|
40
|
-
readonly true: "gap-2";
|
|
41
|
-
readonly false: "";
|
|
42
|
-
};
|
|
43
|
-
}>;
|
|
13
|
+
type CheckboxConfig = NonNullable<typeof checkboxDefinition.config>;
|
|
14
|
+
interface CheckboxVariantProps extends UIOverrides.VariantProps<CheckboxConfig> {}
|
|
15
|
+
declare const checkboxContentWrapperDefinition: {
|
|
16
|
+
base: string[];
|
|
17
|
+
config: StyleMergeUtils.Config<{
|
|
18
|
+
readonly variant: {
|
|
19
|
+
readonly default: "";
|
|
20
|
+
};
|
|
21
|
+
readonly size: {
|
|
22
|
+
readonly "extra-small": "";
|
|
23
|
+
readonly small: "";
|
|
24
|
+
readonly default: "";
|
|
25
|
+
readonly large: "";
|
|
26
|
+
};
|
|
27
|
+
readonly as: {
|
|
28
|
+
readonly default: "flex-col";
|
|
29
|
+
readonly floating: "flex-col";
|
|
30
|
+
readonly filter: "flex-row flex-wrap items-center gap-2";
|
|
31
|
+
readonly inline: "flex-row flex-wrap items-center gap-2";
|
|
32
|
+
};
|
|
33
|
+
readonly hasInputFrame: {
|
|
34
|
+
readonly true: "gap-2";
|
|
35
|
+
readonly false: "";
|
|
36
|
+
};
|
|
37
|
+
}>;
|
|
44
38
|
};
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
readonly inline: "";
|
|
56
|
-
};
|
|
57
|
-
}>;
|
|
39
|
+
declare const checkboxGroupLabelDefinition: {
|
|
40
|
+
base: string[];
|
|
41
|
+
config: StyleMergeUtils.Config<{
|
|
42
|
+
readonly as: {
|
|
43
|
+
readonly default: "";
|
|
44
|
+
readonly floating: ["pointer-events-none absolute", "top-[calc(var(--spacing-floating-label-input-height-filled)+var(--spacing-floating-label-input-offset-top))]", "text-text-default-1", "font-semibold!", "text-label-3!"];
|
|
45
|
+
readonly filter: "";
|
|
46
|
+
readonly inline: "";
|
|
47
|
+
};
|
|
48
|
+
}>;
|
|
58
49
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
readonly false: "";
|
|
77
|
-
};
|
|
78
|
-
}>;
|
|
50
|
+
declare const checkboxContentRowDefinition: {
|
|
51
|
+
base: string[];
|
|
52
|
+
config: StyleMergeUtils.Config<{
|
|
53
|
+
readonly variant: {
|
|
54
|
+
readonly default: "";
|
|
55
|
+
};
|
|
56
|
+
readonly as: {
|
|
57
|
+
readonly default: "flex-col";
|
|
58
|
+
readonly floating: "flex-col";
|
|
59
|
+
readonly filter: "flex-row flex-wrap items-center gap-2";
|
|
60
|
+
readonly inline: "flex-row flex-wrap items-center gap-2";
|
|
61
|
+
};
|
|
62
|
+
readonly hasInputFrame: {
|
|
63
|
+
readonly true: "gap-2";
|
|
64
|
+
readonly false: "";
|
|
65
|
+
};
|
|
66
|
+
}>;
|
|
79
67
|
};
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
readonly indeterminate: ["group-indeterminate:block"];
|
|
89
|
-
};
|
|
90
|
-
}>;
|
|
68
|
+
declare const checkboxIconDefinition: {
|
|
69
|
+
base: string[];
|
|
70
|
+
config: StyleMergeUtils.Config<{
|
|
71
|
+
readonly iconVariant: {
|
|
72
|
+
selected: ["group-selected:block"];
|
|
73
|
+
indeterminate: ["group-indeterminate:block"];
|
|
74
|
+
};
|
|
75
|
+
}>;
|
|
91
76
|
};
|
|
92
|
-
|
|
93
|
-
export
|
|
94
|
-
}
|
|
77
|
+
//#endregion
|
|
78
|
+
export { CheckboxConfig, CheckboxVariantProps, checkboxContentRowDefinition, checkboxContentWrapperDefinition, checkboxDefinition, checkboxGroupLabelDefinition, checkboxIconDefinition };
|
|
@@ -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/Checkbox/checkbox.cva.ts
|
|
5
|
-
|
|
5
|
+
const checkboxDefinition = UIOverrides.defineConfig({
|
|
6
6
|
base: [
|
|
7
7
|
"flex items-center justify-center border-2",
|
|
8
8
|
"relative size-4 shrink-0 rounded-xs p-1",
|
|
@@ -38,14 +38,14 @@ var checkboxDefinition = UIOverrides.defineConfig({
|
|
|
38
38
|
defaultVariants: { variant: "default" }
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
const checkboxIndicatorClass = "group flex items-center gap-2";
|
|
42
|
+
const checkboxTypography = compoundMapper({ default: {
|
|
43
43
|
size: "label-1",
|
|
44
44
|
sizeMobile: "label-1",
|
|
45
45
|
variant: "default"
|
|
46
46
|
} });
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
const checkboxContentClassName = compoundMapper({ default: "text-text-default-2" });
|
|
48
|
+
const checkboxContentWrapperDefinition = UIOverrides.defineConfig({
|
|
49
49
|
base: ["relative flex"],
|
|
50
50
|
config: {
|
|
51
51
|
variants: {
|
|
@@ -106,7 +106,7 @@ var checkboxContentWrapperDefinition = UIOverrides.defineConfig({
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
|
-
|
|
109
|
+
const checkboxGroupLabelDefinition = UIOverrides.defineConfig({
|
|
110
110
|
base: [""],
|
|
111
111
|
config: {
|
|
112
112
|
variants: { as: {
|
|
@@ -124,7 +124,7 @@ var checkboxGroupLabelDefinition = UIOverrides.defineConfig({
|
|
|
124
124
|
defaultVariants: { as: "default" }
|
|
125
125
|
}
|
|
126
126
|
});
|
|
127
|
-
|
|
127
|
+
const checkboxContentRowDefinition = UIOverrides.defineConfig({
|
|
128
128
|
base: ["flex"],
|
|
129
129
|
config: {
|
|
130
130
|
variants: {
|
|
@@ -147,7 +147,7 @@ var checkboxContentRowDefinition = UIOverrides.defineConfig({
|
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
});
|
|
150
|
-
|
|
150
|
+
const checkboxIconDefinition = UIOverrides.defineConfig({
|
|
151
151
|
base: ["absolute hidden size-3"],
|
|
152
152
|
config: {
|
|
153
153
|
variants: { iconVariant: {
|
|
@@ -1,41 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { FieldValues } from "../../shared/form.binding.js";
|
|
2
|
+
import { ControlProps } from "../../shared/form.types.js";
|
|
3
|
+
import { InputVariantProps } from "../../shared/input.cva.js";
|
|
4
|
+
import { FormFieldProps } from "../../FormField/FormField.js";
|
|
5
|
+
import { DatePickerTodayIcon, DatePickerTodayIconButtonComponent, DatePickerTodayIconButtonSize, DatePickerTodayIconPlacement } from "../shared/datePicker.types.js";
|
|
6
|
+
import { DatePickerInputHandle } from "../shared/DatePickerInput.js";
|
|
7
|
+
import { FocusEvent, Ref } from "react";
|
|
8
|
+
import { CalendarDate, DateValue } from "@internationalized/date";
|
|
9
|
+
import { DatePickerStateOptions } from "react-stately";
|
|
10
|
+
//#region src/components/inputs/DateTime/DatePicker/DatePicker.d.ts
|
|
10
11
|
type DatePickerGranularity = "day" | "month" | "year";
|
|
11
12
|
interface DatePickerBaseProps extends FormFieldProps, InputVariantProps, Omit<DatePickerStateOptions<CalendarDate>, "granularity" | "shouldCloseOnSelect" | "label" | "onBlur"> {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
ref?: Ref<DatePickerInputHandle & HTMLDivElement>;
|
|
14
|
+
disableDropdown?: boolean;
|
|
15
|
+
isClearable?: boolean;
|
|
16
|
+
isClearableIfDisabled?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
todayIcon?: DatePickerTodayIcon;
|
|
19
|
+
todayIconButtonSize?: DatePickerTodayIconButtonSize;
|
|
20
|
+
todayIconButtonComponent?: DatePickerTodayIconButtonComponent;
|
|
21
|
+
todayIconPlacement?: DatePickerTodayIconPlacement;
|
|
22
|
+
isDirty?: boolean;
|
|
23
|
+
disableManualEntry?: boolean;
|
|
24
|
+
autoFixYear?: boolean;
|
|
25
|
+
placeholder?: string;
|
|
26
|
+
inputClassName?: string;
|
|
27
|
+
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
28
|
+
shouldUpdateDateOnMonthYearChange?: boolean;
|
|
29
|
+
granularity?: DatePickerGranularity;
|
|
30
|
+
format?: string;
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
interface DatePickerProps extends Omit<DatePickerBaseProps, "value" | "onChange" | "minValue" | "maxValue"> {
|
|
33
|
+
value?: string | null;
|
|
34
|
+
onChange?: (value: string | null) => void;
|
|
35
|
+
fullIso?: boolean;
|
|
36
|
+
minValue?: DateValue | string;
|
|
37
|
+
maxValue?: DateValue | string;
|
|
38
|
+
renderStaticInput?: boolean;
|
|
38
39
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
type ControlledDatePickerProps<TFieldValues extends FieldValues> = ControlProps<DatePickerProps, TFieldValues>;
|
|
41
|
+
declare const DatePickerComponent: <TFieldValues extends FieldValues>({ fullIso, granularity, minValue, maxValue, renderStaticInput, ...props }: ControlledDatePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
declare const DatePicker: typeof DatePickerComponent;
|
|
43
|
+
//#endregion
|
|
44
|
+
export { ControlledDatePickerProps, DatePicker, DatePickerProps };
|
|
@@ -7,6 +7,7 @@ import { DateTimeUtils } from "../../../../utils/date-time.utils.js";
|
|
|
7
7
|
import { datePickerInputContentRowDefinition } from "../shared/datePickerInput.cva.js";
|
|
8
8
|
import { renderDatePickerTodayIcon } from "../shared/datePickerTodayIcon.js";
|
|
9
9
|
import { DatePickerInput } from "../shared/DatePickerInput.js";
|
|
10
|
+
import { normalizeDatePickerValue } from "../shared/datePickerValue.utils.js";
|
|
10
11
|
import { DateTimeDialog } from "../shared/DateTimeDialog.js";
|
|
11
12
|
import { DateTimeDialogFooter } from "../shared/DateTimeDialogFooter.js";
|
|
12
13
|
import { getStaticCalendarDateSegments, getStaticDateTimeFocusTarget } from "../shared/staticDateTimeSegments.js";
|
|
@@ -14,15 +15,14 @@ import { TooltipWrapper } from "../../shared/TooltipWrapper.js";
|
|
|
14
15
|
import { InputFrame } from "../../Skeleton/InputFrame.js";
|
|
15
16
|
import { useStaticInputHandoff } from "../../shared/useStaticInputHandoff.js";
|
|
16
17
|
import { clsx } from "clsx";
|
|
17
|
-
import { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
18
|
+
import { memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
18
19
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
20
|
import { useDatePicker, useLocale } from "react-aria";
|
|
20
21
|
import { mergeRefs } from "@react-aria/utils";
|
|
21
22
|
import { createCalendar, getLocalTimeZone, toCalendarDate, today } from "@internationalized/date";
|
|
22
|
-
import { DateTime } from "luxon";
|
|
23
23
|
import { useCalendarState, useDatePickerState } from "react-stately";
|
|
24
24
|
//#region src/components/inputs/DateTime/DatePicker/DatePicker.tsx
|
|
25
|
-
|
|
25
|
+
const DatePickerBase = (props) => {
|
|
26
26
|
const ui = UIConfig.useConfig();
|
|
27
27
|
const { ref, label, tooltipText, helperText, isRequired, rightContent, isDirty, isDisabled, headerClassName, errorClassName, isHeaderHidden, error, onChange, onBlur, value, disableDropdown, className, placeholder, inputClassName, as: asProp, hideLabel: hideLabelProp, variant: variantProp, size: sizeProp, isClearable: isClearableProp, isClearableIfDisabled, todayIcon: todayIconProp, todayIconButtonSize: todayIconButtonSizeProp, todayIconButtonComponent: todayIconButtonComponentProp, todayIconPlacement: todayIconPlacementProp, shouldForceLeadingZeros: shouldForceLeadingZerosProp, disableManualEntry: disableManualEntryProp, shouldUpdateDateOnMonthYearChange: shouldUpdateDateOnMonthYearChangeProp, granularity: granularityProp, autoFixYear: autoFixYearProp, format, ...rest } = props;
|
|
28
28
|
const as = asProp ?? ui.input.as;
|
|
@@ -87,17 +87,17 @@ var DatePickerBase = (props) => {
|
|
|
87
87
|
...rest,
|
|
88
88
|
shouldForceLeadingZeros,
|
|
89
89
|
value: normalizedValue,
|
|
90
|
-
onChange: (
|
|
91
|
-
let
|
|
92
|
-
if (
|
|
93
|
-
if (
|
|
90
|
+
onChange: (val) => {
|
|
91
|
+
let normalizedValue = normalizeDatePickerValue(val);
|
|
92
|
+
if (val) normalizedValue = normalizeByGranularity(val);
|
|
93
|
+
if (normalizedValue && (rest.minValue && normalizedValue < rest?.minValue || rest?.maxValue && normalizedValue > rest?.maxValue)) {
|
|
94
94
|
state.setValue(state.value);
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
97
|
-
onChange?.(
|
|
98
|
-
dialogState.setValue(
|
|
99
|
-
if (
|
|
100
|
-
calendarState.setFocusedDate(
|
|
97
|
+
onChange?.(normalizedValue);
|
|
98
|
+
dialogState.setValue(normalizedValue);
|
|
99
|
+
if (normalizedValue) {
|
|
100
|
+
calendarState.setFocusedDate(normalizedValue);
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
103
|
calendarState.setFocusedDate(today(effectiveTimeZone));
|
|
@@ -138,7 +138,8 @@ var DatePickerBase = (props) => {
|
|
|
138
138
|
};
|
|
139
139
|
const onMonthYearChange = (selectedDate) => {
|
|
140
140
|
if (!(shouldUpdateDateOnMonthYearChange || granularity !== "day")) return;
|
|
141
|
-
const
|
|
141
|
+
const baseDate = dialogState.value || state.value || today(effectiveTimeZone);
|
|
142
|
+
const updatedDate = normalizeByGranularity(baseDate.set({
|
|
142
143
|
year: selectedDate.year,
|
|
143
144
|
month: selectedDate.month
|
|
144
145
|
}));
|
|
@@ -265,7 +266,7 @@ var DatePickerBase = (props) => {
|
|
|
265
266
|
})
|
|
266
267
|
});
|
|
267
268
|
};
|
|
268
|
-
|
|
269
|
+
const DatePickerInner = ({ fullIso = true, granularity = "day", minValue, maxValue, renderStaticInput, isFormControlDisabled, ...props }) => {
|
|
269
270
|
const ui = UIConfig.useConfig();
|
|
270
271
|
const datePickerInputContentRowCva = UIOverrides.useCva("datePickerInput.contentRowCva", datePickerInputContentRowDefinition);
|
|
271
272
|
const { locale } = useLocale();
|
|
@@ -280,38 +281,45 @@ var DatePickerInner = ({ fullIso = true, granularity = "day", minValue, maxValue
|
|
|
280
281
|
const container = input.getContainer?.() ?? input;
|
|
281
282
|
return container instanceof HTMLElement ? getStaticDateTimeFocusTarget(container, staticTarget) : null;
|
|
282
283
|
},
|
|
283
|
-
getPressTarget: (
|
|
284
|
-
const
|
|
285
|
-
if (!(
|
|
286
|
-
return
|
|
284
|
+
getPressTarget: (input) => {
|
|
285
|
+
const container = input.getContainer?.() ?? input;
|
|
286
|
+
if (!(container instanceof HTMLElement)) return null;
|
|
287
|
+
return container.querySelector("[data-static-press-action]");
|
|
287
288
|
}
|
|
288
289
|
});
|
|
289
290
|
const normalizedValue = props.value ?? null;
|
|
290
|
-
const normalizeByGranularity = (date) => {
|
|
291
|
+
const normalizeByGranularity = useCallback((date) => {
|
|
291
292
|
if (granularity === "year") return date.set({
|
|
292
293
|
month: 1,
|
|
293
294
|
day: 1
|
|
294
295
|
});
|
|
295
296
|
if (granularity === "month") return date.set({ day: 1 });
|
|
296
297
|
return date;
|
|
297
|
-
};
|
|
298
|
+
}, [granularity]);
|
|
298
299
|
const formatCalendarDate = (calendarDate) => {
|
|
299
300
|
if (calendarDate === null) return null;
|
|
300
301
|
const normalizedDate = normalizeByGranularity(calendarDate);
|
|
301
302
|
if (fullIso) return DateTimeUtils.fromCalendarDateToUTCISO(normalizedDate);
|
|
302
|
-
|
|
303
|
-
return DateTime.fromJSDate(date_0, { zone: "UTC" }).toISODate();
|
|
303
|
+
return DateTimeUtils.fromDateValueToLocal(normalizedDate, "UTC").toISOString().slice(0, 10);
|
|
304
304
|
};
|
|
305
|
-
const parseCalendarDate = (formattedDate) => {
|
|
305
|
+
const parseCalendarDate = useCallback((formattedDate) => {
|
|
306
306
|
if (formattedDate == null) return null;
|
|
307
|
-
if (fullIso)
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
307
|
+
if (fullIso) {
|
|
308
|
+
const parsedDate = DateTimeUtils.fromUTCISOToCalendarDate(formattedDate);
|
|
309
|
+
return normalizeByGranularity(parsedDate);
|
|
310
|
+
}
|
|
311
|
+
const date = /* @__PURE__ */ new Date(`${formattedDate}T00:00:00.000Z`);
|
|
312
|
+
const zonedDateTime = DateTimeUtils.fromLocalToZonedDateTime(date, "UTC");
|
|
313
|
+
return normalizeByGranularity(toCalendarDate(zonedDateTime));
|
|
314
|
+
}, [fullIso, normalizeByGranularity]);
|
|
315
|
+
const dateLimits = useMemo(() => ({
|
|
312
316
|
minValue: typeof minValue === "string" ? parseCalendarDate(minValue) : minValue,
|
|
313
317
|
maxValue: typeof maxValue === "string" ? parseCalendarDate(maxValue) : maxValue
|
|
314
|
-
}
|
|
318
|
+
}), [
|
|
319
|
+
minValue,
|
|
320
|
+
maxValue,
|
|
321
|
+
parseCalendarDate
|
|
322
|
+
]);
|
|
315
323
|
if (!renderInput) {
|
|
316
324
|
const dateValue = normalizedValue ? parseCalendarDate(normalizedValue) : null;
|
|
317
325
|
const as = props.as ?? ui.input.as;
|
|
@@ -385,21 +393,21 @@ var DatePickerInner = ({ fullIso = true, granularity = "day", minValue, maxValue
|
|
|
385
393
|
onChange: (value) => props.onChange?.(formatCalendarDate(value))
|
|
386
394
|
});
|
|
387
395
|
};
|
|
388
|
-
|
|
396
|
+
const DatePickerComponent = ({ fullIso = true, granularity = "day", minValue, maxValue, renderStaticInput, ...props }) => {
|
|
389
397
|
if ("field" in props && props.field) {
|
|
390
398
|
const { field, ref, ...innerProps } = props;
|
|
391
399
|
const controlWithOptions = field.form;
|
|
392
400
|
return /* @__PURE__ */ jsx(FieldController, {
|
|
393
401
|
control: field.form,
|
|
394
402
|
name: field.name,
|
|
395
|
-
render: ({ field
|
|
403
|
+
render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(DatePickerInner, {
|
|
396
404
|
...innerProps,
|
|
397
|
-
ref: mergeRefs(ref,
|
|
398
|
-
value:
|
|
399
|
-
onChange: (value) =>
|
|
400
|
-
onBlur:
|
|
405
|
+
ref: mergeRefs(ref, field.ref),
|
|
406
|
+
value: field.value ?? null,
|
|
407
|
+
onChange: (value) => field.onChange(value ?? null),
|
|
408
|
+
onBlur: field.onBlur,
|
|
401
409
|
isDirty,
|
|
402
|
-
isDisabled:
|
|
410
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
403
411
|
isFormControlDisabled: !!controlWithOptions._options?.disabled,
|
|
404
412
|
error: props.error ?? error?.message,
|
|
405
413
|
fullIso,
|
|
@@ -419,5 +427,6 @@ var DatePicker = ({ fullIso = true, granularity = "day", minValue, maxValue, ren
|
|
|
419
427
|
renderStaticInput
|
|
420
428
|
});
|
|
421
429
|
};
|
|
430
|
+
const DatePicker = memo(DatePickerComponent);
|
|
422
431
|
//#endregion
|
|
423
432
|
export { DatePicker };
|
|
@@ -1,46 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { DatePickerInputHandle } from
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { FieldValues } from "../../shared/form.binding.js";
|
|
2
|
+
import { ControlProps } from "../../shared/form.types.js";
|
|
3
|
+
import { InputVariantProps } from "../../shared/input.cva.js";
|
|
4
|
+
import { FormFieldProps } from "../../FormField/FormField.js";
|
|
5
|
+
import { DatePickerTodayIcon, DatePickerTodayIconButtonComponent, DatePickerTodayIconButtonSize, DatePickerTodayIconPlacement } from "../shared/datePicker.types.js";
|
|
6
|
+
import { DatePickerInputHandle } from "../shared/DatePickerInput.js";
|
|
7
|
+
import { FocusEvent, Ref } from "react";
|
|
8
|
+
import { DateValue } from "react-aria";
|
|
9
|
+
import { CalendarDate } from "@internationalized/date";
|
|
10
|
+
import { DateRangePickerStateOptions } from "react-stately";
|
|
11
|
+
//#region src/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts
|
|
11
12
|
interface DateRangePickerBaseProps extends FormFieldProps, InputVariantProps, Omit<DateRangePickerStateOptions<CalendarDate>, "granularity" | "shouldCloseOnSelect" | "label" | "onBlur"> {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
13
|
+
ref?: Ref<DatePickerInputHandle & HTMLDivElement>;
|
|
14
|
+
disableDropdown?: boolean;
|
|
15
|
+
isClearable?: boolean;
|
|
16
|
+
isClearableIfDisabled?: boolean;
|
|
17
|
+
hideSidebar?: boolean;
|
|
18
|
+
className?: string;
|
|
19
|
+
todayIcon?: DatePickerTodayIcon;
|
|
20
|
+
todayIconButtonSize?: DatePickerTodayIconButtonSize;
|
|
21
|
+
todayIconButtonComponent?: DatePickerTodayIconButtonComponent;
|
|
22
|
+
todayIconPlacement?: DatePickerTodayIconPlacement;
|
|
23
|
+
isDirty?: boolean;
|
|
24
|
+
disableManualEntry?: boolean;
|
|
25
|
+
autoFixYear?: boolean;
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
inputClassName?: string;
|
|
28
|
+
onBlur?: (e: FocusEvent<HTMLInputElement>) => void;
|
|
29
|
+
allowPartialRange?: boolean;
|
|
29
30
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
31
|
+
interface DateRangePickerProps extends Omit<DateRangePickerBaseProps, "value" | "onChange" | "minValue" | "maxValue"> {
|
|
32
|
+
value?: {
|
|
33
|
+
start: string | null;
|
|
34
|
+
end: string | null;
|
|
35
|
+
} | null;
|
|
36
|
+
onChange?: (value: {
|
|
37
|
+
start: string | null;
|
|
38
|
+
end: string | null;
|
|
39
|
+
} | null) => void;
|
|
40
|
+
fullIso?: boolean;
|
|
41
|
+
minValue?: DateValue | string;
|
|
42
|
+
maxValue?: DateValue | string;
|
|
43
|
+
renderStaticInput?: boolean;
|
|
43
44
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
type ControlledDateRangePickerProps<TFieldValues extends FieldValues> = ControlProps<DateRangePickerProps, TFieldValues>;
|
|
46
|
+
declare const DateRangePickerComponent: <TFieldValues extends FieldValues>({ fullIso, minValue, maxValue, renderStaticInput, ...props }: ControlledDateRangePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
declare const DateRangePicker: typeof DateRangePickerComponent;
|
|
48
|
+
//#endregion
|
|
49
|
+
export { ControlledDateRangePickerProps, DateRangePicker, DateRangePickerProps };
|