@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
|
@@ -10,235 +10,92 @@ import { TimeField } from "./TimeField.js";
|
|
|
10
10
|
import { clsx } from "clsx";
|
|
11
11
|
import { useRef, useState } from "react";
|
|
12
12
|
import { Button } from "react-aria-components";
|
|
13
|
-
import { c } from "react/compiler-runtime";
|
|
14
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
14
|
import { useFocusVisible, useFocusWithin, useHover } from "react-aria";
|
|
16
15
|
import { mergeRefs } from "@react-aria/utils";
|
|
17
16
|
//#region src/components/inputs/DateTime/shared/TimePickerInput.tsx
|
|
18
|
-
|
|
19
|
-
const $ = c(69);
|
|
20
|
-
const { ref, as, fieldProps, state, isDisabled, isDirty, isRequired, isInvalid, disableDropdown, variant, size, isClearable, isClearableIfDisabled, headerProps, disableManualEntry, placeholder, className, onPress, onClear, ...props } = t0;
|
|
17
|
+
const TimePickerInput = ({ ref, as, fieldProps, state, isDisabled, isDirty, isRequired, isInvalid, disableDropdown, variant, size, isClearable, isClearableIfDisabled, headerProps, disableManualEntry, placeholder, className, onPress, onClear, ...props }) => {
|
|
21
18
|
const uiConfig = UIConfig.useConfig();
|
|
22
19
|
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
23
20
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
24
|
-
|
|
25
|
-
if ($[0] !== isDisabled) {
|
|
26
|
-
t1 = { isDisabled };
|
|
27
|
-
$[0] = isDisabled;
|
|
28
|
-
$[1] = t1;
|
|
29
|
-
} else t1 = $[1];
|
|
30
|
-
const { hoverProps, isHovered } = useHover(t1);
|
|
21
|
+
const { hoverProps, isHovered } = useHover({ isDisabled });
|
|
31
22
|
const [isFocused, setIsFocused] = useState(false);
|
|
32
|
-
|
|
33
|
-
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
34
|
-
t2 = { onFocusWithinChange: setIsFocused };
|
|
35
|
-
$[2] = t2;
|
|
36
|
-
} else t2 = $[2];
|
|
37
|
-
const { focusWithinProps } = useFocusWithin(t2);
|
|
23
|
+
const { focusWithinProps } = useFocusWithin({ onFocusWithinChange: setIsFocused });
|
|
38
24
|
const { isFocusVisible } = useFocusVisible();
|
|
39
25
|
const containerRef = useRef(null);
|
|
40
26
|
useFirefoxDateSegmentSelectionGuard(containerRef);
|
|
41
27
|
const hidePlaceholder = as === "floating" && !state.value && !isFocused;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
} else t3 = $[4];
|
|
48
|
-
const canClear = t3;
|
|
49
|
-
let t4;
|
|
50
|
-
if ($[5] !== ref) {
|
|
51
|
-
t4 = mergeRefs(ref, containerRef);
|
|
52
|
-
$[5] = ref;
|
|
53
|
-
$[6] = t4;
|
|
54
|
-
} else t4 = $[6];
|
|
55
|
-
const t5 = clsx(inputBaseCva({
|
|
56
|
-
variant,
|
|
57
|
-
as,
|
|
58
|
-
...props
|
|
59
|
-
}), "group/date-picker-content relative min-w-input-width-min-width", "flex items-center justify-between gap-input-gap-input-text-to-elements", className);
|
|
60
|
-
const t6 = isHovered || void 0;
|
|
61
|
-
const t7 = isDisabled || void 0;
|
|
62
|
-
const t8 = isDisabled || void 0;
|
|
63
|
-
const t9 = isInvalid || void 0;
|
|
64
|
-
const t10 = state.value === null || void 0;
|
|
65
|
-
const t11 = isFocused || void 0;
|
|
66
|
-
const t12 = isFocused && isFocusVisible || void 0;
|
|
67
|
-
const t13 = state.value !== null || void 0;
|
|
68
|
-
const t14 = isDirty || void 0;
|
|
69
|
-
const t15 = isRequired || void 0;
|
|
70
|
-
const t16 = state.value !== null || void 0;
|
|
71
|
-
let t17;
|
|
72
|
-
if ($[7] !== as || $[8] !== inputSizeCva || $[9] !== size) {
|
|
73
|
-
t17 = clsx(inputSizeCva({
|
|
74
|
-
size,
|
|
75
|
-
as
|
|
76
|
-
}), "flex w-full items-center gap-input-gap-input-text-to-elements pr-0!");
|
|
77
|
-
$[7] = as;
|
|
78
|
-
$[8] = inputSizeCva;
|
|
79
|
-
$[9] = size;
|
|
80
|
-
$[10] = t17;
|
|
81
|
-
} else t17 = $[10];
|
|
82
|
-
let t18;
|
|
83
|
-
if ($[11] !== disableManualEntry || $[12] !== onPress) {
|
|
84
|
-
t18 = disableManualEntry && /* @__PURE__ */ jsx(Button, {
|
|
85
|
-
onPress,
|
|
86
|
-
className: "absolute inset-0 z-base"
|
|
87
|
-
});
|
|
88
|
-
$[11] = disableManualEntry;
|
|
89
|
-
$[12] = onPress;
|
|
90
|
-
$[13] = t18;
|
|
91
|
-
} else t18 = $[13];
|
|
92
|
-
let t19;
|
|
93
|
-
if ($[14] !== as || $[15] !== headerProps) {
|
|
94
|
-
t19 = as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
28
|
+
const canClear = state.segments.some((segment) => segment.type !== "literal" && segment.isPlaceholder === false);
|
|
29
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
30
|
+
ref: mergeRefs(ref, containerRef),
|
|
31
|
+
className: clsx(inputBaseCva({
|
|
32
|
+
variant,
|
|
95
33
|
as,
|
|
96
|
-
...
|
|
97
|
-
})
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
$[22] = state;
|
|
120
|
-
$[23] = t20;
|
|
121
|
-
} else t20 = $[23];
|
|
122
|
-
let t21;
|
|
123
|
-
if ($[24] !== t17 || $[25] !== t18 || $[26] !== t19 || $[27] !== t20) {
|
|
124
|
-
t21 = /* @__PURE__ */ jsxs("div", {
|
|
125
|
-
className: t17,
|
|
34
|
+
...props
|
|
35
|
+
}), "group/date-picker-content relative min-w-input-width-min-width", "flex items-center justify-between gap-input-gap-input-text-to-elements", className),
|
|
36
|
+
"data-rac": "",
|
|
37
|
+
"data-datetime-input": "",
|
|
38
|
+
"data-hovered": isHovered || void 0,
|
|
39
|
+
"data-disabled": isDisabled || void 0,
|
|
40
|
+
"data-is-disabled": isDisabled || void 0,
|
|
41
|
+
"data-invalid": isInvalid || void 0,
|
|
42
|
+
"data-is-empty": state.value === null || void 0,
|
|
43
|
+
"data-focus-within": isFocused || void 0,
|
|
44
|
+
"data-focus-visible": isFocused && isFocusVisible || void 0,
|
|
45
|
+
"data-has-selection": state.value !== null || void 0,
|
|
46
|
+
"data-is-dirty": isDirty || void 0,
|
|
47
|
+
"data-is-required": isRequired || void 0,
|
|
48
|
+
"data-is-filled": state.value !== null || void 0,
|
|
49
|
+
...fieldProps,
|
|
50
|
+
...focusWithinProps,
|
|
51
|
+
...hoverProps,
|
|
52
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
53
|
+
className: clsx(inputSizeCva({
|
|
54
|
+
size,
|
|
55
|
+
as
|
|
56
|
+
}), "flex w-full items-center gap-input-gap-input-text-to-elements pr-0!"),
|
|
126
57
|
children: [
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
58
|
+
disableManualEntry && /* @__PURE__ */ jsx(Button, {
|
|
59
|
+
onPress,
|
|
60
|
+
className: "absolute inset-0 z-base"
|
|
61
|
+
}),
|
|
62
|
+
as && ["filter", "floating"].includes(as) && headerProps && /* @__PURE__ */ jsx(FormFieldLabel, {
|
|
63
|
+
as,
|
|
64
|
+
...headerProps
|
|
65
|
+
}),
|
|
66
|
+
/* @__PURE__ */ jsx("div", { children: disableManualEntry && placeholder && !state.value ? /* @__PURE__ */ jsx(Typography, {
|
|
67
|
+
size: "label-1",
|
|
68
|
+
className: "text-text-default-3",
|
|
69
|
+
children: placeholder
|
|
70
|
+
}) : /* @__PURE__ */ jsx(TimeField, {
|
|
71
|
+
fieldProps,
|
|
72
|
+
state,
|
|
73
|
+
isDisabled,
|
|
74
|
+
hidePlaceholder
|
|
75
|
+
}) })
|
|
130
76
|
]
|
|
131
|
-
})
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
if (onClear) onClear();
|
|
154
|
-
else state.setValue(null);
|
|
155
|
-
},
|
|
156
|
-
show: canClear && (!isDisabled || isClearableIfDisabled === true)
|
|
157
|
-
});
|
|
158
|
-
$[33] = canClear;
|
|
159
|
-
$[34] = isClearable;
|
|
160
|
-
$[35] = isClearableIfDisabled;
|
|
161
|
-
$[36] = isDisabled;
|
|
162
|
-
$[37] = onClear;
|
|
163
|
-
$[38] = state;
|
|
164
|
-
$[39] = t23;
|
|
165
|
-
} else t23 = $[39];
|
|
166
|
-
let t24;
|
|
167
|
-
if ($[40] !== disableDropdown || $[41] !== disableManualEntry || $[42] !== isDisabled || $[43] !== onPress || $[44] !== uiConfig) {
|
|
168
|
-
t24 = (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(InlineIconButton, {
|
|
169
|
-
label: "",
|
|
170
|
-
color: "secondary",
|
|
171
|
-
onPress,
|
|
172
|
-
icon: uiConfig.dateInput.timeIcon,
|
|
173
|
-
isDisabled,
|
|
174
|
-
className: "border-0!",
|
|
175
|
-
"data-static-press-action": ""
|
|
176
|
-
});
|
|
177
|
-
$[40] = disableDropdown;
|
|
178
|
-
$[41] = disableManualEntry;
|
|
179
|
-
$[42] = isDisabled;
|
|
180
|
-
$[43] = onPress;
|
|
181
|
-
$[44] = uiConfig;
|
|
182
|
-
$[45] = t24;
|
|
183
|
-
} else t24 = $[45];
|
|
184
|
-
let t25;
|
|
185
|
-
if ($[46] !== t22 || $[47] !== t23 || $[48] !== t24) {
|
|
186
|
-
t25 = /* @__PURE__ */ jsxs("div", {
|
|
187
|
-
className: t22,
|
|
188
|
-
children: [t23, t24]
|
|
189
|
-
});
|
|
190
|
-
$[46] = t22;
|
|
191
|
-
$[47] = t23;
|
|
192
|
-
$[48] = t24;
|
|
193
|
-
$[49] = t25;
|
|
194
|
-
} else t25 = $[49];
|
|
195
|
-
let t26;
|
|
196
|
-
if ($[50] !== fieldProps || $[51] !== focusWithinProps || $[52] !== hoverProps || $[53] !== t10 || $[54] !== t11 || $[55] !== t12 || $[56] !== t13 || $[57] !== t14 || $[58] !== t15 || $[59] !== t16 || $[60] !== t21 || $[61] !== t25 || $[62] !== t4 || $[63] !== t5 || $[64] !== t6 || $[65] !== t7 || $[66] !== t8 || $[67] !== t9) {
|
|
197
|
-
t26 = /* @__PURE__ */ jsxs("div", {
|
|
198
|
-
ref: t4,
|
|
199
|
-
className: t5,
|
|
200
|
-
"data-rac": "",
|
|
201
|
-
"data-datetime-input": "",
|
|
202
|
-
"data-hovered": t6,
|
|
203
|
-
"data-disabled": t7,
|
|
204
|
-
"data-is-disabled": t8,
|
|
205
|
-
"data-invalid": t9,
|
|
206
|
-
"data-is-empty": t10,
|
|
207
|
-
"data-focus-within": t11,
|
|
208
|
-
"data-focus-visible": t12,
|
|
209
|
-
"data-has-selection": t13,
|
|
210
|
-
"data-is-dirty": t14,
|
|
211
|
-
"data-is-required": t15,
|
|
212
|
-
"data-is-filled": t16,
|
|
213
|
-
...fieldProps,
|
|
214
|
-
...focusWithinProps,
|
|
215
|
-
...hoverProps,
|
|
216
|
-
children: [t21, t25]
|
|
217
|
-
});
|
|
218
|
-
$[50] = fieldProps;
|
|
219
|
-
$[51] = focusWithinProps;
|
|
220
|
-
$[52] = hoverProps;
|
|
221
|
-
$[53] = t10;
|
|
222
|
-
$[54] = t11;
|
|
223
|
-
$[55] = t12;
|
|
224
|
-
$[56] = t13;
|
|
225
|
-
$[57] = t14;
|
|
226
|
-
$[58] = t15;
|
|
227
|
-
$[59] = t16;
|
|
228
|
-
$[60] = t21;
|
|
229
|
-
$[61] = t25;
|
|
230
|
-
$[62] = t4;
|
|
231
|
-
$[63] = t5;
|
|
232
|
-
$[64] = t6;
|
|
233
|
-
$[65] = t7;
|
|
234
|
-
$[66] = t8;
|
|
235
|
-
$[67] = t9;
|
|
236
|
-
$[68] = t26;
|
|
237
|
-
} else t26 = $[68];
|
|
238
|
-
return t26;
|
|
77
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
78
|
+
className: clsx(inputSizeCva({
|
|
79
|
+
size,
|
|
80
|
+
as
|
|
81
|
+
}), "flex items-center gap-input-gap-trailing-elements py-0! pl-0!"),
|
|
82
|
+
children: [isClearable && /* @__PURE__ */ jsx(InputClear, {
|
|
83
|
+
onClear: () => {
|
|
84
|
+
if (onClear) onClear();
|
|
85
|
+
else state.setValue(null);
|
|
86
|
+
},
|
|
87
|
+
show: canClear && (!isDisabled || isClearableIfDisabled === true)
|
|
88
|
+
}), (!disableDropdown || disableManualEntry) && /* @__PURE__ */ jsx(InlineIconButton, {
|
|
89
|
+
label: "",
|
|
90
|
+
color: "secondary",
|
|
91
|
+
onPress,
|
|
92
|
+
icon: uiConfig.dateInput.timeIcon,
|
|
93
|
+
isDisabled,
|
|
94
|
+
className: "border-0!",
|
|
95
|
+
"data-static-press-action": ""
|
|
96
|
+
})]
|
|
97
|
+
})]
|
|
98
|
+
});
|
|
239
99
|
};
|
|
240
|
-
function _temp(segment) {
|
|
241
|
-
return segment.type !== "literal" && segment.isPlaceholder === false;
|
|
242
|
-
}
|
|
243
100
|
//#endregion
|
|
244
101
|
export { TimePickerInput };
|
|
@@ -1,29 +1,19 @@
|
|
|
1
1
|
import { Typography } from "../../../text/Typography/Typography.js";
|
|
2
2
|
import { useScrollableListBox } from "../../../../hooks/useScrollableListBox.js";
|
|
3
3
|
import { clsx } from "clsx";
|
|
4
|
-
import { useRef } from "react";
|
|
4
|
+
import { useMemo, useRef } from "react";
|
|
5
5
|
import { ListBox, ListBoxItem } from "react-aria-components";
|
|
6
|
-
import { c } from "react/compiler-runtime";
|
|
7
6
|
import { jsx } from "react/jsx-runtime";
|
|
8
7
|
import { today } from "@internationalized/date";
|
|
9
8
|
import { useDateFormatter } from "@react-aria/i18n";
|
|
10
9
|
//#region src/components/inputs/DateTime/shared/YearPicker.tsx
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
timeZone: state.timeZone
|
|
19
|
-
};
|
|
20
|
-
$[0] = state.timeZone;
|
|
21
|
-
$[1] = t1;
|
|
22
|
-
} else t1 = $[1];
|
|
23
|
-
const formatter = useDateFormatter(t1);
|
|
24
|
-
let arr;
|
|
25
|
-
if ($[2] !== formatter || $[3] !== state.timeZone) {
|
|
26
|
-
arr = [];
|
|
10
|
+
const YearPicker = ({ state, onSelectionChange, onDateChange, onCommit, selectedDate }) => {
|
|
11
|
+
const formatter = useDateFormatter({
|
|
12
|
+
year: "numeric",
|
|
13
|
+
timeZone: state.timeZone
|
|
14
|
+
});
|
|
15
|
+
const years = useMemo(() => {
|
|
16
|
+
const arr = [];
|
|
27
17
|
for (let i = -100; i <= 100; i++) {
|
|
28
18
|
const date = today(state.timeZone).add({ years: i });
|
|
29
19
|
arr.push({
|
|
@@ -31,121 +21,80 @@ var YearPicker = (t0) => {
|
|
|
31
21
|
formatted: formatter.format(date.toDate(state.timeZone))
|
|
32
22
|
});
|
|
33
23
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
$[4] = arr;
|
|
37
|
-
} else arr = $[4];
|
|
38
|
-
const years = arr;
|
|
24
|
+
return arr;
|
|
25
|
+
}, [state.timeZone, formatter]);
|
|
39
26
|
const isYearDisabled = (year) => {
|
|
40
27
|
if (state.minValue && year < state.minValue.year) return true;
|
|
41
28
|
if (state.maxValue && year > state.maxValue.year) return true;
|
|
42
29
|
return false;
|
|
43
30
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
if (
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
};
|
|
55
|
-
$[5] = selectedDate;
|
|
56
|
-
$[6] = state.focusedDate;
|
|
57
|
-
$[7] = years;
|
|
58
|
-
$[8] = t2;
|
|
59
|
-
} else t2 = $[8];
|
|
60
|
-
const selectedYearIndex = t2();
|
|
31
|
+
const getSelectedYearIndex = () => {
|
|
32
|
+
if (selectedDate) {
|
|
33
|
+
const selectedIndexFromValue = years.findIndex((year) => year.value === selectedDate.year);
|
|
34
|
+
if (selectedIndexFromValue >= 0) return selectedIndexFromValue;
|
|
35
|
+
}
|
|
36
|
+
const focusedYearIndex = years.findIndex((year) => year.value === state.focusedDate.year);
|
|
37
|
+
if (focusedYearIndex < 0) return null;
|
|
38
|
+
return focusedYearIndex;
|
|
39
|
+
};
|
|
40
|
+
const selectedYearIndex = getSelectedYearIndex();
|
|
61
41
|
const lastPressedYearIndexRef = useRef(null);
|
|
62
|
-
|
|
63
|
-
if (
|
|
64
|
-
|
|
65
|
-
if (
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
42
|
+
const listBoxSelectionProps = {};
|
|
43
|
+
if (selectedYearIndex !== null) listBoxSelectionProps.selectedKeys = [selectedYearIndex];
|
|
44
|
+
const parseYearIndexFromKey = (key) => {
|
|
45
|
+
if (typeof key === "number") return key;
|
|
46
|
+
if (typeof key === "string") {
|
|
47
|
+
const parsedIndex = Number.parseInt(key, 10);
|
|
48
|
+
if (!Number.isNaN(parsedIndex)) return parsedIndex;
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
};
|
|
70
52
|
const { ref } = useScrollableListBox();
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (
|
|
79
|
-
const selectedKey = [...
|
|
53
|
+
return /* @__PURE__ */ jsx(ListBox, {
|
|
54
|
+
ref,
|
|
55
|
+
autoFocus: true,
|
|
56
|
+
"aria-label": "Year",
|
|
57
|
+
selectionMode: "single",
|
|
58
|
+
...listBoxSelectionProps,
|
|
59
|
+
onSelectionChange: (key) => {
|
|
60
|
+
if (key === "all") return;
|
|
61
|
+
const selectedKey = [...key][0];
|
|
80
62
|
const selectedYearIndexValue = parseYearIndexFromKey(selectedKey);
|
|
81
63
|
if (selectedYearIndexValue !== null && years[selectedYearIndexValue]) {
|
|
82
64
|
const nextSelectedDate = state.focusedDate.set({ year: years[selectedYearIndexValue].value });
|
|
83
65
|
state.setFocusedDate(nextSelectedDate);
|
|
84
66
|
onDateChange?.(nextSelectedDate);
|
|
85
67
|
}
|
|
86
|
-
onSelectionChange(
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
as: "span",
|
|
116
|
-
size: "label-2",
|
|
117
|
-
children: year_2.formatted
|
|
118
|
-
})
|
|
119
|
-
}, index);
|
|
68
|
+
onSelectionChange(key);
|
|
69
|
+
},
|
|
70
|
+
className: "h-80 max-h-full min-h-0 w-full shrink-0 overflow-y-auto md:h-72 md:w-80",
|
|
71
|
+
children: years.map((year, index) => {
|
|
72
|
+
const isDisabled = isYearDisabled(year.value);
|
|
73
|
+
return /* @__PURE__ */ jsx(ListBoxItem, {
|
|
74
|
+
id: index,
|
|
75
|
+
textValue: year.formatted,
|
|
76
|
+
isDisabled,
|
|
77
|
+
onPress: () => {
|
|
78
|
+
const isSecondConsecutivePress = lastPressedYearIndexRef.current === index;
|
|
79
|
+
lastPressedYearIndexRef.current = index;
|
|
80
|
+
const nextSelectedDate = state.focusedDate.set({ year: year.value });
|
|
81
|
+
state.setFocusedDate(nextSelectedDate);
|
|
82
|
+
onDateChange?.(nextSelectedDate);
|
|
83
|
+
if (!isSecondConsecutivePress) return;
|
|
84
|
+
if (!selectedDate) return;
|
|
85
|
+
if (selectedYearIndex === null) return;
|
|
86
|
+
if (index !== selectedYearIndex) return;
|
|
87
|
+
onCommit?.();
|
|
88
|
+
},
|
|
89
|
+
className: clsx("flex px-4 py-2 text-interactive-text-secondary-idle outline-none", "border-elevation-outline-default-1 border-b border-solid bg-elevation-fill-default-1 last:border-b-0", "hover:text-interactive-text-secondary-hover", "selected:bg-interactive-contained-primary-idle selected:text-interactive-text-secondary-idle-inverted", "focus-visible:bg-interactive-contained-primary-focus focus-visible:text-interactive-text-secondary-idle-inverted", isDisabled ? "cursor-default opacity-50" : "cursor-pointer"),
|
|
90
|
+
children: /* @__PURE__ */ jsx(Typography, {
|
|
91
|
+
as: "span",
|
|
92
|
+
size: "label-2",
|
|
93
|
+
children: year.formatted
|
|
94
|
+
})
|
|
95
|
+
}, index);
|
|
96
|
+
})
|
|
120
97
|
});
|
|
121
|
-
let t9;
|
|
122
|
-
if ($[16] !== T0 || $[17] !== listBoxSelectionProps || $[18] !== ref || $[19] !== t6 || $[20] !== t8) {
|
|
123
|
-
t9 = /* @__PURE__ */ jsx(T0, {
|
|
124
|
-
ref,
|
|
125
|
-
autoFocus: t3,
|
|
126
|
-
"aria-label": t4,
|
|
127
|
-
selectionMode: t5,
|
|
128
|
-
...listBoxSelectionProps,
|
|
129
|
-
onSelectionChange: t6,
|
|
130
|
-
className: t7,
|
|
131
|
-
children: t8
|
|
132
|
-
});
|
|
133
|
-
$[16] = T0;
|
|
134
|
-
$[17] = listBoxSelectionProps;
|
|
135
|
-
$[18] = ref;
|
|
136
|
-
$[19] = t6;
|
|
137
|
-
$[20] = t8;
|
|
138
|
-
$[21] = t9;
|
|
139
|
-
} else t9 = $[21];
|
|
140
|
-
return t9;
|
|
141
98
|
};
|
|
142
|
-
function _temp(key) {
|
|
143
|
-
if (typeof key === "number") return key;
|
|
144
|
-
if (typeof key === "string") {
|
|
145
|
-
const parsedIndex = Number.parseInt(key, 10);
|
|
146
|
-
if (!Number.isNaN(parsedIndex)) return parsedIndex;
|
|
147
|
-
}
|
|
148
|
-
return null;
|
|
149
|
-
}
|
|
150
99
|
//#endregion
|
|
151
100
|
export { YearPicker };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { IconButtonProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { IconButtonProps } from "../../../buttons/IconButton/IconButton.js";
|
|
2
|
+
//#region src/components/inputs/DateTime/shared/datePicker.types.d.ts
|
|
3
|
+
type DatePickerTodayIcon = boolean | IconButtonProps["icon"];
|
|
4
|
+
type DatePickerTodayIconButtonSize = IconButtonProps["size"];
|
|
5
|
+
type DatePickerTodayIconButtonComponent = "iconButton" | "inlineIconButton";
|
|
6
|
+
type DatePickerTodayIconPlacement = "content" | "fieldLabel";
|
|
7
|
+
//#endregion
|
|
8
|
+
export { DatePickerTodayIcon, DatePickerTodayIconButtonComponent, DatePickerTodayIconButtonSize, DatePickerTodayIconPlacement };
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { StyleMergeUtils } from "../../../../utils/style-merge.util.js";
|
|
2
|
+
import "../../../../config/uiOverrides.context.js";
|
|
3
|
+
import "../../shared/input.cva.js";
|
|
4
|
+
//#region src/components/inputs/DateTime/shared/datePickerInput.cva.d.ts
|
|
5
|
+
declare const datePickerInputContentRowDefinition: {
|
|
6
|
+
base: string[];
|
|
7
|
+
config: StyleMergeUtils.Config<{
|
|
8
|
+
readonly size: {
|
|
9
|
+
readonly "extra-small": "";
|
|
10
|
+
readonly small: "";
|
|
11
|
+
readonly default: "";
|
|
12
|
+
readonly large: "";
|
|
13
|
+
};
|
|
14
|
+
}>;
|
|
13
15
|
};
|
|
14
|
-
|
|
15
|
-
export
|
|
16
|
-
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { datePickerInputContentRowDefinition };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../../config/uiOverrides.context.js";
|
|
2
2
|
//#region src/components/inputs/DateTime/shared/datePickerInput.cva.ts
|
|
3
|
-
|
|
3
|
+
const datePickerInputContentRowDefinition = UIOverrides.defineConfig({
|
|
4
4
|
base: ["flex items-center gap-input-gap-input-text-to-elements"],
|
|
5
5
|
config: {
|
|
6
6
|
variants: { size: {
|
|
@@ -1,58 +1,19 @@
|
|
|
1
1
|
import { IconButton } from "../../../buttons/IconButton/IconButton.js";
|
|
2
2
|
import { InlineIconButton } from "../../../buttons/InlineIconButton/InlineIconButton.js";
|
|
3
|
-
import {
|
|
3
|
+
import { Type } from "lucide-react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/inputs/DateTime/shared/datePickerTodayIcon.tsx
|
|
6
|
-
|
|
7
|
-
const $ = c(9);
|
|
8
|
-
let className;
|
|
9
|
-
let props;
|
|
10
|
-
if ($[0] !== t0) {
|
|
11
|
-
({className, ...props} = t0);
|
|
12
|
-
$[0] = t0;
|
|
13
|
-
$[1] = className;
|
|
14
|
-
$[2] = props;
|
|
15
|
-
} else {
|
|
16
|
-
className = $[1];
|
|
17
|
-
props = $[2];
|
|
18
|
-
}
|
|
19
|
-
let t1;
|
|
20
|
-
if ($[3] !== className) {
|
|
21
|
-
t1 = ["fill-current", className].filter(Boolean);
|
|
22
|
-
$[3] = className;
|
|
23
|
-
$[4] = t1;
|
|
24
|
-
} else t1 = $[4];
|
|
25
|
-
const t2 = t1.join(" ");
|
|
26
|
-
let t3;
|
|
27
|
-
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
28
|
-
t3 = /* @__PURE__ */ jsx("path", {
|
|
29
|
-
fill: "currentColor",
|
|
30
|
-
d: "M9.184 9.672v-.945h5.628v.945h-2.27V16H11.45V9.672z",
|
|
31
|
-
transform: "translate(12 12) scale(1.65) translate(-12 -12)"
|
|
32
|
-
});
|
|
33
|
-
$[5] = t3;
|
|
34
|
-
} else t3 = $[5];
|
|
35
|
-
let t4;
|
|
36
|
-
if ($[6] !== props || $[7] !== t2) {
|
|
37
|
-
t4 = /* @__PURE__ */ jsx("svg", {
|
|
38
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
39
|
-
fill: "none",
|
|
40
|
-
viewBox: "0 0 24 24",
|
|
41
|
-
...props,
|
|
42
|
-
className: t2,
|
|
43
|
-
children: t3
|
|
44
|
-
});
|
|
45
|
-
$[6] = props;
|
|
46
|
-
$[7] = t2;
|
|
47
|
-
$[8] = t4;
|
|
48
|
-
} else t4 = $[8];
|
|
49
|
-
return t4;
|
|
50
|
-
};
|
|
51
|
-
var getDatePickerTodayIcon = (todayIcon) => {
|
|
6
|
+
const getDatePickerTodayIcon = (todayIcon) => {
|
|
52
7
|
if (!todayIcon) return null;
|
|
53
|
-
return todayIcon === true ?
|
|
8
|
+
return todayIcon === true ? /* @__PURE__ */ jsx("span", {
|
|
9
|
+
className: "grid size-6 shrink-0 place-items-center",
|
|
10
|
+
children: /* @__PURE__ */ jsx(Type, {
|
|
11
|
+
className: "size-4",
|
|
12
|
+
strokeWidth: 2.5
|
|
13
|
+
})
|
|
14
|
+
}) : todayIcon;
|
|
54
15
|
};
|
|
55
|
-
|
|
16
|
+
const renderDatePickerTodayIcon = (todayIcon, options) => {
|
|
56
17
|
const icon = getDatePickerTodayIcon(todayIcon);
|
|
57
18
|
if (!icon) return;
|
|
58
19
|
const { className, isDisabled, onPress, renderStatic, size = "none", todayIconButtonComponent = "iconButton" } = options ?? {};
|
|
@@ -74,4 +35,4 @@ var renderDatePickerTodayIcon = (todayIcon, options) => {
|
|
|
74
35
|
});
|
|
75
36
|
};
|
|
76
37
|
//#endregion
|
|
77
|
-
export { renderDatePickerTodayIcon };
|
|
38
|
+
export { getDatePickerTodayIcon, renderDatePickerTodayIcon };
|