@povio/ui 3.4.0-rc.15 → 3.4.0-rc.17
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.cva.d.ts +39 -40
- package/dist/components/Breadcrumbs/breadcrumbs.cva.js +5 -5
- 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 +3 -3
- 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/accordion.d.ts +5 -0
- package/dist/components/accordion.js +81 -0
- package/dist/components/action-modal.d.ts +26 -0
- package/dist/components/action-modal.js +188 -0
- package/dist/components/alert.d.ts +14 -0
- package/dist/components/alert.js +114 -0
- package/dist/components/autocomplete.d.ts +16 -0
- package/dist/components/{inputs/Selection/Autocomplete/Autocomplete.js → autocomplete.js} +34 -64
- package/dist/components/bottom-sheet.d.ts +34 -0
- package/dist/components/{overlays/BottomSheet/BottomSheet.js → bottom-sheet.js} +17 -14
- package/dist/components/breadcrumbs.d.ts +19 -0
- package/dist/components/breadcrumbs.js +263 -0
- package/dist/components/button.d.ts +3 -0
- package/dist/components/button.js +2 -0
- 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/PillButton/pillButton.cva.d.ts +33 -38
- package/dist/components/buttons/PillButton/pillButton.cva.js +5 -5
- package/dist/components/buttons/shared/ButtonContent.js +81 -23
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +6 -8
- package/dist/components/buttons/shared/buttonContent.cva.js +1 -1
- package/dist/components/checkbox-group.d.ts +28 -0
- package/dist/components/checkbox-group.js +163 -0
- package/dist/components/checkbox.d.ts +24 -0
- package/dist/components/checkbox.js +80 -0
- package/dist/components/date-picker.d.ts +2 -0
- package/dist/components/date-picker.js +2 -0
- package/dist/components/date-range-picker.d.ts +2 -0
- package/dist/components/date-range-picker.js +2 -0
- package/dist/components/date-time-picker.d.ts +2 -0
- package/dist/components/date-time-picker.js +2 -0
- package/dist/components/drawer.d.ts +18 -0
- package/dist/components/{overlays/Drawer/Drawer.js → drawer.js} +4 -4
- package/dist/components/file-upload-container.d.ts +5 -0
- package/dist/components/file-upload-container.js +15 -0
- package/dist/components/file-upload.d.ts +7 -0
- package/dist/components/{inputs/File/FileUpload.js → file-upload.js} +59 -98
- package/dist/components/form-field.d.ts +24 -0
- package/dist/components/form-field.js +47 -0
- package/dist/components/icon-button.d.ts +14 -0
- package/dist/components/{buttons/IconButton/IconButton.js → icon-button.js} +3 -3
- package/dist/components/inline-icon-button.d.ts +16 -0
- package/dist/components/inline-icon-button.js +40 -0
- package/dist/components/input-upload.d.ts +7 -0
- package/dist/components/input-upload.js +118 -0
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +1 -1
- 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 -36
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +46 -43
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +174 -170
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +41 -38
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +21 -20
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +29 -26
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +166 -542
- package/dist/components/inputs/DateTime/shared/Calendar.js +17 -14
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +18 -18
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +6 -5
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +9 -8
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +45 -45
- 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 +3 -3
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +26 -102
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +29 -84
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +3 -3
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +59 -104
- 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 +113 -283
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +73 -216
- package/dist/components/inputs/DateTime/shared/YearPicker.js +69 -120
- 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 +13 -52
- package/dist/components/inputs/DateTime/shared/datePickerValue.utils.js +1 -1
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +13 -12
- package/dist/components/inputs/DateTime/shared/useFirefoxDateSegmentSelectionGuard.js +12 -26
- 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 +3 -3
- package/dist/components/inputs/File/shared/FileUploadContentError.js +6 -6
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +6 -6
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +3 -3
- package/dist/components/inputs/File/shared/InputUploadContent.js +38 -151
- package/dist/components/inputs/File/shared/InputUploadFilled.js +10 -50
- package/dist/components/inputs/File/shared/ProgressBar.d.ts +6 -4
- package/dist/components/inputs/File/shared/ProgressBar.js +2 -2
- 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/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 +24 -80
- 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/NumberRangeInput/NumberRangeField.d.ts +11 -45
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +121 -554
- 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/shared/InputContent.d.ts +25 -27
- package/dist/components/inputs/Input/shared/InputContent.js +61 -195
- 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 +29 -78
- package/dist/components/inputs/Inputs/Inputs.d.ts +12 -9
- package/dist/components/inputs/Inputs/Inputs.js +11 -37
- 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/queryAutocomplete.types.d.ts +25 -38
- package/dist/components/inputs/Selection/Select/Select.d.ts +15 -11
- package/dist/components/inputs/Selection/Select/Select.js +36 -112
- 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 +145 -393
- package/dist/components/inputs/Selection/shared/SelectInput.js +162 -429
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +27 -101
- 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 +24 -72
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +10 -59
- package/dist/components/inputs/Selection/shared/SelectMobile.js +4 -4
- 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 +30 -30
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +24 -20
- package/dist/components/inputs/TextEditor/TextEditor.js +22 -63
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +11 -37
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +31 -103
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +48 -197
- 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 +33 -93
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +55 -127
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +39 -142
- package/dist/components/inputs/TextEditor/textEditor.types.js +1 -1
- 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 +31 -103
- package/dist/components/inputs/shared/TooltipWrapper.js +14 -49
- 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/link.d.ts +11 -0
- package/dist/components/{text/Link/Link.js → link.js} +7 -7
- package/dist/components/loader.d.ts +7 -0
- package/dist/components/{status/Loader/Loader.js → loader.js} +2 -2
- package/dist/components/menu.d.ts +23 -0
- package/dist/components/{Menu/Menu.js → menu.js} +4 -4
- package/dist/components/modal.d.ts +2 -0
- package/dist/components/modal.js +2 -0
- package/dist/components/navigation/Accordion/AccordionItem.js +87 -42
- 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/StepperItem.js +3 -3
- 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/number-input.d.ts +27 -0
- package/dist/components/number-input.js +245 -0
- package/dist/components/number-range-input.d.ts +39 -0
- package/dist/components/number-range-input.js +267 -0
- package/dist/components/outline.clsx.d.ts +4 -2
- package/dist/components/outline.clsx.js +2 -2
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +3 -3
- package/dist/components/overlays/Modal/Modal.d.ts +18 -14
- package/dist/components/overlays/Modal/Modal.js +4 -2
- 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/Tooltip/tooltip.cva.d.ts +39 -45
- package/dist/components/overlays/Tooltip/tooltip.cva.js +4 -4
- package/dist/components/pagination.d.ts +12 -0
- package/dist/components/pagination.js +131 -0
- package/dist/components/password-input.d.ts +10 -0
- package/dist/components/password-input.js +23 -0
- package/dist/components/pill-button.d.ts +15 -0
- package/dist/components/{buttons/PillButton/PillButton.js → pill-button.js} +5 -5
- package/dist/components/pill.d.ts +18 -0
- package/dist/components/{text/Pill/Pill.js → pill.js} +6 -6
- package/dist/components/query-autocomplete.d.ts +8 -0
- package/dist/components/query-autocomplete.js +105 -0
- package/dist/components/query-select.d.ts +19 -0
- package/dist/components/query-select.js +115 -0
- package/dist/components/radio-group.d.ts +24 -0
- package/dist/components/radio-group.js +165 -0
- package/dist/components/responsive-popover.d.ts +19 -0
- package/dist/components/responsive-popover.js +126 -0
- package/dist/components/segment/SegmentItem.js +3 -3
- 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/segment.d.ts +7 -0
- package/dist/components/{segment/Segment.js → segment.js} +8 -8
- package/dist/components/select.d.ts +4 -0
- package/dist/components/select.js +2 -0
- 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/slider.d.ts +22 -0
- package/dist/components/slider.js +103 -0
- package/dist/components/split-button.d.ts +15 -0
- package/dist/components/{buttons/SplitButton/SplitButton.js → split-button.js} +5 -5
- 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.cva.d.ts +23 -26
- package/dist/components/status/Loader/loader.cva.js +4 -4
- 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 +2 -2
- package/dist/components/status/shared/status.cva.d.ts +32 -28
- package/dist/components/status/shared/status.cva.js +2 -2
- package/dist/components/stepper.d.ts +5 -0
- package/dist/components/stepper.js +79 -0
- package/dist/components/table/CellText.d.ts +10 -7
- package/dist/components/table/CellText.js +4 -3
- package/dist/components/table/ColumnConfig.d.ts +12 -9
- package/dist/components/table/ColumnConfig.js +8 -7
- package/dist/components/table/HeaderText.d.ts +10 -7
- package/dist/components/table/HeaderText.js +4 -3
- package/dist/components/table/InfiniteTable.d.ts +10 -8
- package/dist/components/table/InfiniteTable.js +68 -17
- package/dist/components/table/PaginatedTable.d.ts +12 -10
- package/dist/components/table/PaginatedTable.js +2 -2
- package/dist/components/table/Table.d.ts +34 -35
- package/dist/components/table/Table.js +19 -17
- package/dist/components/table/table.cva.d.ts +40 -59
- package/dist/components/table/table.cva.js +7 -7
- package/dist/components/tag.d.ts +18 -0
- package/dist/components/{text/Tag/Tag.js → tag.js} +6 -6
- 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/Tag/tag.cva.d.ts +18 -15
- package/dist/components/text/Tag/tag.cva.js +1 -1
- package/dist/components/text/Typography/typography.cva.d.ts +51 -48
- package/dist/components/text/Typography/typography.cva.js +1 -1
- package/dist/components/text-area.d.ts +21 -0
- package/dist/components/text-area.js +138 -0
- package/dist/components/text-button.d.ts +15 -0
- package/dist/components/{buttons/TextButton/TextButton.js → text-button.js} +2 -2
- package/dist/components/text-input.d.ts +27 -0
- package/dist/components/text-input.js +241 -0
- package/dist/components/time-picker.d.ts +2 -0
- package/dist/components/time-picker.js +2 -0
- package/dist/components/toast.d.ts +17 -0
- package/dist/components/{status/Toast/Toast.js → toast.js} +11 -11
- package/dist/components/toggle-button.d.ts +12 -0
- package/dist/components/{buttons/ToggleButton/ToggleButton.js → toggle-button.js} +2 -2
- package/dist/components/toggle.d.ts +19 -0
- package/dist/components/toggle.js +74 -0
- package/dist/components/tooltip-ellipsis.d.ts +11 -0
- package/dist/components/{overlays/Tooltip/TooltipEllipsis.js → tooltip-ellipsis.js} +3 -3
- package/dist/components/tooltip.d.ts +16 -0
- package/dist/components/{overlays/Tooltip/Tooltip.js → tooltip.js} +9 -9
- package/dist/components/typography.d.ts +12 -0
- package/dist/components/typography.js +31 -0
- package/dist/config/confirmation.context.d.ts +22 -19
- package/dist/config/confirmation.context.js +3 -3
- 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 +29 -29
- package/dist/rhf/Inputs.d.ts +55 -54
- package/dist/rhf/Inputs.js +62 -17
- package/dist/rhf/autocomplete.d.ts +3 -0
- package/dist/rhf/autocomplete.js +2 -0
- package/dist/rhf/checkbox-group.d.ts +3 -0
- package/dist/rhf/checkbox-group.js +2 -0
- package/dist/rhf/checkbox.d.ts +3 -0
- package/dist/rhf/checkbox.js +2 -0
- package/dist/rhf/components.d.ts +77 -75
- package/dist/rhf/components.js +43 -43
- package/dist/rhf/date-picker.d.ts +3 -0
- package/dist/rhf/date-picker.js +2 -0
- package/dist/rhf/date-range-picker.d.ts +3 -0
- package/dist/rhf/date-range-picker.js +2 -0
- package/dist/rhf/date-time-picker.d.ts +3 -0
- package/dist/rhf/date-time-picker.js +2 -0
- package/dist/rhf/dynamicInputs.d.ts +16 -14
- package/dist/rhf/dynamicInputs.js +1 -1
- package/dist/rhf/entry.utils.js +5 -0
- package/dist/rhf/fieldAdapter.d.ts +8 -6
- package/dist/rhf/form.types.d.ts +11 -10
- package/dist/rhf/number-input.d.ts +8 -0
- package/dist/rhf/number-input.js +7 -0
- package/dist/rhf/number-range-input.d.ts +8 -0
- package/dist/rhf/number-range-input.js +7 -0
- package/dist/rhf/password-input.d.ts +8 -0
- package/dist/rhf/password-input.js +7 -0
- package/dist/rhf/query-autocomplete.d.ts +2 -0
- package/dist/rhf/query-autocomplete.js +2 -0
- package/dist/rhf/query-select.d.ts +2 -0
- package/dist/rhf/query-select.js +2 -0
- package/dist/rhf/radio-group.d.ts +3 -0
- package/dist/rhf/radio-group.js +2 -0
- package/dist/rhf/segment.d.ts +3 -0
- package/dist/rhf/segment.js +2 -0
- package/dist/rhf/select.d.ts +3 -0
- package/dist/rhf/select.js +2 -0
- package/dist/rhf/slider.d.ts +3 -0
- package/dist/rhf/slider.js +2 -0
- package/dist/rhf/text-area.d.ts +8 -0
- package/dist/rhf/text-area.js +7 -0
- package/dist/rhf/text-input.d.ts +8 -0
- package/dist/rhf/text-input.js +7 -0
- package/dist/rhf/time-picker.d.ts +3 -0
- package/dist/rhf/time-picker.js +2 -0
- package/dist/rhf/toggle.d.ts +3 -0
- package/dist/rhf/toggle.js +2 -0
- 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/autocomplete.d.ts +2 -0
- package/dist/tanstack/autocomplete.js +2 -0
- package/dist/tanstack/checkbox-group.d.ts +2 -0
- package/dist/tanstack/checkbox-group.js +2 -0
- package/dist/tanstack/checkbox.d.ts +2 -0
- package/dist/tanstack/checkbox.js +2 -0
- package/dist/tanstack/date-picker.d.ts +2 -0
- package/dist/tanstack/date-picker.js +2 -0
- package/dist/tanstack/date-range-picker.d.ts +2 -0
- package/dist/tanstack/date-range-picker.js +2 -0
- package/dist/tanstack/date-time-picker.d.ts +2 -0
- package/dist/tanstack/date-time-picker.js +2 -0
- package/dist/tanstack/form.d.ts +3 -0
- package/dist/tanstack/form.js +3 -0
- package/dist/tanstack/number-input.d.ts +2 -0
- package/dist/tanstack/number-input.js +2 -0
- package/dist/tanstack/number-range-input.d.ts +3 -0
- package/dist/tanstack/number-range-input.js +2 -0
- package/dist/tanstack/password-input.d.ts +2 -0
- package/dist/tanstack/password-input.js +2 -0
- package/dist/tanstack/query-autocomplete.d.ts +2 -0
- package/dist/tanstack/query-autocomplete.js +2 -0
- package/dist/tanstack/query-select.d.ts +2 -0
- package/dist/tanstack/query-select.js +2 -0
- package/dist/tanstack/radio-group.d.ts +2 -0
- package/dist/tanstack/radio-group.js +2 -0
- package/dist/tanstack/segment.d.ts +3 -0
- package/dist/tanstack/segment.js +2 -0
- package/dist/tanstack/select.d.ts +2 -0
- package/dist/tanstack/select.js +2 -0
- package/dist/tanstack/slider.d.ts +2 -0
- package/dist/tanstack/slider.js +2 -0
- package/dist/tanstack/table.d.ts +12 -0
- package/dist/tanstack/table.js +11 -0
- package/dist/tanstack/text-area.d.ts +2 -0
- package/dist/tanstack/text-area.js +2 -0
- package/dist/tanstack/text-input.d.ts +2 -0
- package/dist/tanstack/text-input.js +2 -0
- package/dist/tanstack/time-picker.d.ts +2 -0
- package/dist/tanstack/time-picker.js +2 -0
- package/dist/tanstack/toggle.d.ts +2 -0
- package/dist/tanstack/toggle.js +2 -0
- package/dist/tanstack.d.ts +151 -224
- package/dist/tanstack.js +45 -45
- 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 +475 -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/Breadcrumbs/Breadcrumbs.d.ts +0 -16
- package/dist/components/Breadcrumbs/Breadcrumbs.js +0 -112
- package/dist/components/Menu/Menu.d.ts +0 -21
- package/dist/components/Menu/MenuDesktop.d.ts +0 -2
- package/dist/components/Menu/MenuMobile.d.ts +0 -2
- package/dist/components/buttons/IconButton/IconButton.d.ts +0 -11
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +0 -13
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +0 -15
- package/dist/components/buttons/PillButton/PillButton.d.ts +0 -12
- package/dist/components/buttons/SplitButton/SplitButton.d.ts +0 -12
- package/dist/components/buttons/TextButton/TextButton.d.ts +0 -12
- package/dist/components/buttons/ToggleButton/ToggleButton.d.ts +0 -9
- package/dist/components/buttons/shared/ButtonContent.d.ts +0 -14
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +0 -20
- package/dist/components/inputs/Checkbox/Checkbox.js +0 -236
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.d.ts +0 -9
- package/dist/components/inputs/Checkbox/CheckboxGroup.d.ts +0 -26
- package/dist/components/inputs/Checkbox/CheckboxGroup.js +0 -392
- 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/datePickerValue.utils.d.ts +0 -1
- package/dist/components/inputs/DateTime/shared/datePickerValue.utils.spec.d.ts +0 -1
- 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/FileUpload.d.ts +0 -4
- package/dist/components/inputs/File/FileUploadContainer.d.ts +0 -3
- package/dist/components/inputs/File/FileUploadContainer.js +0 -22
- package/dist/components/inputs/File/InputUpload.d.ts +0 -4
- package/dist/components/inputs/File/InputUpload.js +0 -157
- 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/FormField.d.ts +0 -20
- package/dist/components/inputs/FormField/FormField.js +0 -127
- 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/NumberInput/NumberInput.d.ts +0 -23
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +0 -494
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +0 -36
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +0 -338
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.d.ts +0 -7
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +0 -61
- package/dist/components/inputs/Input/TextArea/TextArea.d.ts +0 -19
- package/dist/components/inputs/Input/TextArea/TextArea.js +0 -346
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +0 -23
- package/dist/components/inputs/Input/TextInput/TextInput.js +0 -470
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +0 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +0 -22
- package/dist/components/inputs/RadioGroup/RadioGroup.js +0 -371
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +0 -12
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +0 -4
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +0 -176
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +0 -15
- package/dist/components/inputs/Selection/Select/QuerySelect.js +0 -172
- 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/Slider/Slider.d.ts +0 -19
- package/dist/components/inputs/Slider/Slider.js +0 -285
- 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/Toggle/Toggle.d.ts +0 -16
- package/dist/components/inputs/Toggle/Toggle.js +0 -234
- 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/Accordion.d.ts +0 -3
- package/dist/components/navigation/Accordion/Accordion.js +0 -34
- package/dist/components/navigation/Accordion/AccordionItem.d.ts +0 -2
- package/dist/components/navigation/Stepper/Stepper.d.ts +0 -2
- package/dist/components/navigation/Stepper/Stepper.js +0 -34
- package/dist/components/navigation/Stepper/StepperItem.d.ts +0 -2
- package/dist/components/navigation/Stepper/StepperSeparator.d.ts +0 -5
- package/dist/components/overlays/ActionModal/ActionModal.d.ts +0 -24
- package/dist/components/overlays/ActionModal/ActionModal.js +0 -54
- package/dist/components/overlays/BottomSheet/BottomSheet.d.ts +0 -32
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.d.ts +0 -13
- package/dist/components/overlays/Drawer/Drawer.d.ts +0 -15
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.d.ts +0 -17
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +0 -45
- package/dist/components/overlays/Tooltip/Tooltip.d.ts +0 -13
- package/dist/components/overlays/Tooltip/TooltipEllipsis.d.ts +0 -8
- package/dist/components/segment/Segment.d.ts +0 -4
- package/dist/components/segment/SegmentItem.d.ts +0 -2
- package/dist/components/shared/pagination/Pagination.d.ts +0 -9
- package/dist/components/shared/pagination/Pagination.js +0 -45
- package/dist/components/shared/pagination/minWidth.cva.d.ts +0 -3
- package/dist/components/status/Alert/Alert.d.ts +0 -11
- package/dist/components/status/Alert/Alert.js +0 -47
- package/dist/components/status/Loader/Loader.d.ts +0 -5
- package/dist/components/status/Toast/Toast.d.ts +0 -14
- package/dist/components/text/Link/Link.d.ts +0 -9
- package/dist/components/text/Pill/Pill.d.ts +0 -15
- package/dist/components/text/Tag/Tag.d.ts +0 -15
- package/dist/components/text/Typography/Typography.d.ts +0 -11
- package/dist/components/text/Typography/Typography.js +0 -16
- 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
package/dist/tanstack.js
CHANGED
|
@@ -5,12 +5,12 @@ import { MenuItem } from "./components/Menu/MenuItem.js";
|
|
|
5
5
|
import { MenuPopover } from "./components/Menu/MenuPopover.js";
|
|
6
6
|
import { tooltipDefinition, tooltipPointerHorizontalDefinition, tooltipPointerVerticalDefinition, tooltipTextDefinition } from "./components/overlays/Tooltip/tooltip.cva.js";
|
|
7
7
|
import { typographyDefinition } from "./components/text/Typography/typography.cva.js";
|
|
8
|
-
import { Typography } from "./components/
|
|
9
|
-
import { Tooltip } from "./components/
|
|
8
|
+
import { Typography } from "./components/typography.js";
|
|
9
|
+
import { Tooltip } from "./components/tooltip.js";
|
|
10
10
|
import { LinkContext } from "./config/link.context.js";
|
|
11
|
-
import { Breadcrumbs } from "./components/
|
|
11
|
+
import { Breadcrumbs } from "./components/breadcrumbs.js";
|
|
12
12
|
import { loaderDefinition, loaderWrapperDefinition } from "./components/status/Loader/loader.cva.js";
|
|
13
|
-
import { Loader } from "./components/
|
|
13
|
+
import { Loader } from "./components/loader.js";
|
|
14
14
|
import { ObjectUtils } from "./utils/object.utils.js";
|
|
15
15
|
import { isEqual } from "./utils/isEqual.js";
|
|
16
16
|
import { useDeepCompareEffect, useDeepCompareLayoutEffect, useDeepCompareMemo } from "./hooks/useDeepCompare.js";
|
|
@@ -19,92 +19,92 @@ import { uiOutlineClass } from "./components/outline.clsx.js";
|
|
|
19
19
|
import { compoundMapper } from "./utils/compoundMapper.js";
|
|
20
20
|
import { buttonContentDefinition, buttonDefinition, buttonIconSizeDefinition, buttonSizeDefinition } from "./components/buttons/Button/button.cva.js";
|
|
21
21
|
import { Button } from "./components/buttons/Button/Button.js";
|
|
22
|
-
import { IconButton } from "./components/
|
|
23
|
-
import { InlineIconButton } from "./components/
|
|
22
|
+
import { IconButton } from "./components/icon-button.js";
|
|
23
|
+
import { InlineIconButton } from "./components/inline-icon-button.js";
|
|
24
24
|
import { pillButtonContentDefinition, pillButtonDefinition } from "./components/buttons/PillButton/pillButton.cva.js";
|
|
25
|
-
import { PillButton } from "./components/
|
|
25
|
+
import { PillButton } from "./components/pill-button.js";
|
|
26
26
|
import { ns, resources } from "./config/i18n.js";
|
|
27
27
|
import { useStateAndRef } from "./hooks/useStateAndRef.js";
|
|
28
28
|
import { DomUtils } from "./utils/dom.utils.js";
|
|
29
|
-
import { BottomSheet } from "./components/
|
|
29
|
+
import { BottomSheet } from "./components/bottom-sheet.js";
|
|
30
30
|
import { useBreakpoint } from "./hooks/useBreakpoint.js";
|
|
31
|
-
import { Menu } from "./components/
|
|
32
|
-
import { SplitButton } from "./components/
|
|
33
|
-
import { TextButton } from "./components/
|
|
34
|
-
import { ToggleButton } from "./components/
|
|
31
|
+
import { Menu } from "./components/menu.js";
|
|
32
|
+
import { SplitButton } from "./components/split-button.js";
|
|
33
|
+
import { TextButton } from "./components/text-button.js";
|
|
34
|
+
import { ToggleButton } from "./components/toggle-button.js";
|
|
35
35
|
import { checkboxContentRowDefinition, checkboxContentWrapperDefinition, checkboxDefinition, checkboxGroupLabelDefinition, checkboxIconDefinition } from "./components/inputs/Checkbox/checkbox.cva.js";
|
|
36
36
|
import { formFieldErrorDefinition } from "./components/inputs/FormField/formFieldError.cva.js";
|
|
37
|
-
import { Checkbox } from "./components/
|
|
37
|
+
import { Checkbox } from "./components/checkbox.js";
|
|
38
38
|
import { formFieldHeaderDefinition } from "./components/inputs/FormField/formFieldHeader.cva.js";
|
|
39
39
|
import { labelDefinition } from "./components/inputs/shared/label.cva.js";
|
|
40
40
|
import { formFieldHelperDefinition } from "./components/inputs/FormField/formFieldHelper.cva.js";
|
|
41
|
-
import { FormField } from "./components/
|
|
41
|
+
import { FormField } from "./components/form-field.js";
|
|
42
42
|
import { inputBaseDefinition, inputClearClassDefinition, inputContentWrapperDefinition, inputSideDefinition, inputSizeDefinition } from "./components/inputs/shared/input.cva.js";
|
|
43
|
-
import { CheckboxGroup } from "./components/
|
|
43
|
+
import { CheckboxGroup } from "./components/checkbox-group.js";
|
|
44
44
|
import { useLongPressRepeat } from "./hooks/useLongPressRepeat.js";
|
|
45
45
|
import { useScrollableListBox } from "./hooks/useScrollableListBox.js";
|
|
46
46
|
import { IntlUtils } from "./utils/intl.utils.js";
|
|
47
47
|
import { DateTimeUtils } from "./utils/date-time.utils.js";
|
|
48
|
+
import { DateUtils } from "./utils/date.utils.js";
|
|
48
49
|
import { datePickerInputContentRowDefinition } from "./components/inputs/DateTime/shared/datePickerInput.cva.js";
|
|
49
50
|
import { popoverDefinition } from "./components/shared/popover.cva.js";
|
|
50
51
|
import { tooltipWrapperTriggerDefinition } from "./components/inputs/shared/tooltipWrapper.cva.js";
|
|
51
52
|
import { DatePicker } from "./components/inputs/DateTime/DatePicker/DatePicker.js";
|
|
52
53
|
import { tagDefinition } from "./components/text/Tag/tag.cva.js";
|
|
53
|
-
import { Tag } from "./components/
|
|
54
|
+
import { Tag } from "./components/tag.js";
|
|
54
55
|
import { useDebounceCallback } from "./hooks/useDebounceCallback.js";
|
|
55
56
|
import { selectInputTagsContentWrapperDefinition } from "./components/inputs/Selection/shared/selectInput.cva.js";
|
|
56
57
|
import { createKeyInteractionsHandler, getKeyInteractionAction, useKeyInteractions } from "./hooks/useKeyInteractions.js";
|
|
57
58
|
import { selectListBoxItemDefinition } from "./components/inputs/Selection/shared/selectItem.cva.js";
|
|
58
59
|
import { useIntersectionObserver } from "./hooks/useIntersectionObserver.js";
|
|
59
60
|
import { selectPopoverDefinition } from "./components/inputs/Selection/shared/selectDesktop.cva.js";
|
|
60
|
-
import { TextInput } from "./components/
|
|
61
|
+
import { TextInput } from "./components/text-input.js";
|
|
61
62
|
import { Select } from "./components/inputs/Selection/Select/Select.js";
|
|
62
63
|
import { DateRangePicker } from "./components/inputs/DateTime/DateRangePicker/DateRangePicker.js";
|
|
63
64
|
import { DateTimePicker } from "./components/inputs/DateTime/DateTimePicker/DateTimePicker.js";
|
|
64
65
|
import { TimePicker } from "./components/inputs/DateTime/TimePicker/TimePicker.js";
|
|
65
|
-
import { RestUtils } from "./utils/rest.utils.js";
|
|
66
66
|
import { FileUtils } from "./utils/file.utils.js";
|
|
67
67
|
import { progressBarDefinition, progressBarFillDefinition, progressBarTrackDefinition, progressBarTrackWrapperDefinition, progressBarValueDefinition } from "./components/inputs/File/shared/progressBar.cva.js";
|
|
68
68
|
import { ProgressBar } from "./components/inputs/File/shared/ProgressBar.js";
|
|
69
69
|
import { fileUploadDropZoneDefinition } from "./components/inputs/File/shared/fileUpload.cva.js";
|
|
70
|
-
import { FileUpload } from "./components/
|
|
70
|
+
import { FileUpload } from "./components/file-upload.js";
|
|
71
71
|
import { inputUploadButtonDefinition, inputUploadDropZoneDefinition } from "./components/inputs/File/shared/inputUploadButton.cva.js";
|
|
72
|
-
import { InputUpload } from "./components/
|
|
73
|
-
import { NumberInput } from "./components/
|
|
74
|
-
import { NumberRangeInput } from "./components/
|
|
75
|
-
import { PasswordInput } from "./components/
|
|
72
|
+
import { InputUpload } from "./components/input-upload.js";
|
|
73
|
+
import { NumberInput } from "./components/number-input.js";
|
|
74
|
+
import { NumberRangeInput } from "./components/number-range-input.js";
|
|
75
|
+
import { PasswordInput } from "./components/password-input.js";
|
|
76
76
|
import { textAreaWrapperDefinition } from "./components/inputs/Input/TextArea/TextArea.cva.js";
|
|
77
|
-
import { TextArea } from "./components/
|
|
77
|
+
import { TextArea } from "./components/text-area.js";
|
|
78
78
|
import { radioContentRowDefinition, radioContentWrapperDefinition, radioDefinition } from "./components/inputs/RadioGroup/radio.cva.js";
|
|
79
|
-
import { RadioGroup } from "./components/
|
|
80
|
-
import { Autocomplete } from "./components/
|
|
81
|
-
import { QueryAutocomplete } from "./components/
|
|
82
|
-
import { QuerySelect } from "./components/
|
|
83
|
-
import { Slider } from "./components/
|
|
79
|
+
import { RadioGroup } from "./components/radio-group.js";
|
|
80
|
+
import { Autocomplete } from "./components/autocomplete.js";
|
|
81
|
+
import { QueryAutocomplete } from "./components/query-autocomplete.js";
|
|
82
|
+
import { QuerySelect } from "./components/query-select.js";
|
|
83
|
+
import { Slider } from "./components/slider.js";
|
|
84
84
|
import { toggleDefinition } from "./components/inputs/Toggle/toggle.cva.js";
|
|
85
|
-
import { Toggle } from "./components/
|
|
86
|
-
import { ResponsivePopover } from "./components/
|
|
85
|
+
import { Toggle } from "./components/toggle.js";
|
|
86
|
+
import { ResponsivePopover } from "./components/responsive-popover.js";
|
|
87
87
|
import { segmentDefinition, segmentItemDefinition } from "./components/segment/segment.cva.js";
|
|
88
|
-
import { Segment } from "./components/segment
|
|
89
|
-
import { FileUploadContainer } from "./components/
|
|
88
|
+
import { Segment } from "./components/segment.js";
|
|
89
|
+
import { FileUploadContainer } from "./components/file-upload-container.js";
|
|
90
90
|
import { StringUtils } from "./utils/string.utils.js";
|
|
91
91
|
import { ZodUtils } from "./utils/zod.utils.js";
|
|
92
92
|
import { accordionChevronDefinition, accordionDefinition, accordionHeadingDefinition, accordionHeadingSubtitleDefinition, accordionHeadingTitleDefinition, accordionIconDefinition, accordionItemDefinition, accordionPanelContentDefinition, accordionPanelDefinition, accordionTriggerDefinition } from "./components/navigation/Accordion/accordion.cva.js";
|
|
93
|
-
import { Accordion } from "./components/
|
|
93
|
+
import { Accordion } from "./components/accordion.js";
|
|
94
94
|
import { stepperDefinition, stepperIconDefinition, stepperItemDefinition, stepperNumberDefinition, stepperSeparatorDefinition, stepperSubtextDefinition, stepperTitleDefinition } from "./components/navigation/Stepper/stepper.cva.js";
|
|
95
|
-
import { Stepper } from "./components/
|
|
95
|
+
import { Stepper } from "./components/stepper.js";
|
|
96
96
|
import { modalContentDefinition, modalMainDefinition, modalOverlayDefinition } from "./components/overlays/Modal/modal.cva.js";
|
|
97
97
|
import { Modal } from "./components/overlays/Modal/Modal.js";
|
|
98
|
-
import { ActionModal } from "./components/
|
|
99
|
-
import { Drawer } from "./components/
|
|
100
|
-
import { TooltipEllipsis } from "./components/
|
|
98
|
+
import { ActionModal } from "./components/action-modal.js";
|
|
99
|
+
import { Drawer } from "./components/drawer.js";
|
|
100
|
+
import { TooltipEllipsis } from "./components/tooltip-ellipsis.js";
|
|
101
101
|
import { PaginationList } from "./components/shared/pagination/PaginationList.js";
|
|
102
|
-
import { Pagination } from "./components/
|
|
102
|
+
import { Pagination } from "./components/pagination.js";
|
|
103
103
|
import { alertDefinition } from "./components/status/Alert/alert.cva.js";
|
|
104
104
|
import { statusIconDefinition, statusSeparatorDefinition } from "./components/status/shared/status.cva.js";
|
|
105
|
-
import { Alert } from "./components/
|
|
105
|
+
import { Alert } from "./components/alert.js";
|
|
106
106
|
import { statusIconDefinition as statusIconDefinition$1, statusSeparatorDefinition as statusSeparatorDefinition$1, toastDefinition } from "./components/status/Toast/toast.cva.js";
|
|
107
|
-
import { Toast, ToastContainer } from "./components/
|
|
107
|
+
import { Toast, ToastContainer } from "./components/toast.js";
|
|
108
108
|
import { useToast } from "./components/status/Toast/useToast.js";
|
|
109
109
|
import { tableCellTextDefinition, tableDataDefinition, tableHeadDataDefinition, tableHeadRowDefinition, tableHeaderTextDefinition, tableRowDefinition } from "./components/table/table.cva.js";
|
|
110
110
|
import { CellText } from "./components/table/CellText.js";
|
|
@@ -117,13 +117,12 @@ import { ColumnConfigModal } from "./components/table/ColumnConfig.js";
|
|
|
117
117
|
import { InfiniteTable } from "./components/table/InfiniteTable.js";
|
|
118
118
|
import { PaginatedTable } from "./components/table/PaginatedTable.js";
|
|
119
119
|
import { linkDefinition } from "./components/text/Link/link.cva.js";
|
|
120
|
-
import { Link } from "./components/
|
|
121
|
-
import { Pill } from "./components/
|
|
120
|
+
import { Link } from "./components/link.js";
|
|
121
|
+
import { Pill } from "./components/pill.js";
|
|
122
122
|
import { Confirmation } from "./config/confirmation.context.js";
|
|
123
123
|
import { UIRouter } from "./config/router.context.js";
|
|
124
124
|
import { useLocalStorage } from "./hooks/useLocalStorage.js";
|
|
125
125
|
import { ThemeContext } from "./config/theme.context.js";
|
|
126
|
-
import { DateUtils } from "./utils/date.utils.js";
|
|
127
126
|
import { dynamicColumns } from "./helpers/dynamicColumns.js";
|
|
128
127
|
import { dynamicInputs } from "./helpers/dynamicInputs.js";
|
|
129
128
|
import { RoutingUtils } from "./utils/routing.utils.js";
|
|
@@ -138,4 +137,5 @@ import { Inputs } from "./components/inputs/Inputs/Inputs.js";
|
|
|
138
137
|
import { useAutosave } from "./hooks/useAutosave.js";
|
|
139
138
|
import { useForm, useFormState, useFormValue } from "./hooks/useForm.js";
|
|
140
139
|
import { useFormAutosave } from "./hooks/useFormAutosave.js";
|
|
141
|
-
|
|
140
|
+
import { X as CloseIcon } from "lucide-react";
|
|
141
|
+
export { Accordion, ActionModal, Alert, ArrayUtils, Autocomplete, BottomSheet, Breadcrumbs, Button, CellText, Checkbox, CheckboxGroup, CloseIcon, ColumnConfigModal, Confirmation, DatePicker, DateRangePicker, DateTimePicker, DateTimeUtils, DateUtils, DomUtils, Drawer, FileUpload, FileUploadContainer, FileUtils, Form, FormField, HeaderText, IconButton, InfiniteTable, InlineIconButton, InputUpload, Inputs, IntlUtils, Link, LinkContext, Loader, Menu, MenuItem, MenuPopover, Modal, NumberInput, NumberRangeInput, ObjectUtils, PaginatedTable, Pagination, PaginationList, PasswordInput, Pill, PillButton, ProgressBar, QueriesUtils, QueryAutocomplete, QuerySelect, RadioGroup, ResponsivePopover, RoutingUtils, Segment, Select, Slider, SplitButton, Stepper, StringUtils, Table, Tag, TextArea, TextButton, TextInput, ThemeContext, TimePicker, Toast, ToastContainer, Toggle, ToggleButton, Tooltip, TooltipEllipsis, Typography, UIConfig, UIOverrides, UIRouter, ZodUtils, accordionChevronDefinition, accordionDefinition, accordionHeadingDefinition, accordionHeadingSubtitleDefinition, accordionHeadingTitleDefinition, accordionIconDefinition, accordionItemDefinition, accordionPanelContentDefinition, accordionPanelDefinition, accordionTriggerDefinition, alertDefinition, breadcrumbChevronDefinition, breadcrumbIconDefinition, breadcrumbItemDefinition, breadcrumbSegmentDefinition, breadcrumbsDefinition, buttonContentDefinition, buttonDefinition, buttonIconSizeDefinition, buttonSizeDefinition, checkboxContentRowDefinition, checkboxContentWrapperDefinition, checkboxDefinition, checkboxGroupLabelDefinition, checkboxIconDefinition, compoundMapper, createKeyInteractionsHandler, datePickerInputContentRowDefinition, dynamicColumns, dynamicInputs, fileUploadDropZoneDefinition, formFieldErrorDefinition, formFieldHeaderDefinition, formFieldHelperDefinition, getKeyInteractionAction, inputBaseDefinition, inputClearClassDefinition, inputContentWrapperDefinition, inputSideDefinition, inputSizeDefinition, inputUploadButtonDefinition, inputUploadDropZoneDefinition, isEqual, labelDefinition, linkDefinition, loaderDefinition, loaderWrapperDefinition, logger, menuDefinition, menuItemDefinition, menuPopoverDefinition, menuPopoverWrapperDefinition, modalContentDefinition, modalMainDefinition, modalOverlayDefinition, ns, pillButtonContentDefinition, pillButtonDefinition, popoverDefinition, progressBarDefinition, progressBarFillDefinition, progressBarTrackDefinition, progressBarTrackWrapperDefinition, progressBarValueDefinition, radioContentRowDefinition, radioContentWrapperDefinition, radioDefinition, resources, segmentDefinition, segmentItemDefinition, selectInputTagsContentWrapperDefinition, selectListBoxItemDefinition, selectPopoverDefinition, statusIconDefinition, statusSeparatorDefinition, stepperDefinition, stepperIconDefinition, stepperItemDefinition, stepperNumberDefinition, stepperSeparatorDefinition, stepperSubtextDefinition, stepperTitleDefinition, tableCellTextDefinition, tableDataDefinition, tableHeadDataDefinition, tableHeadRowDefinition, tableHeaderTextDefinition, tableRowDefinition, tagDefinition, textAreaWrapperDefinition, toastDefinition, statusIconDefinition$1 as toastStatusIconDefinition, statusSeparatorDefinition$1 as toastStatusSeparatorDefinition, toggleDefinition, tooltipDefinition, tooltipPointerHorizontalDefinition, tooltipPointerVerticalDefinition, tooltipTextDefinition, tooltipWrapperTriggerDefinition, typographyDefinition, uiOutlineClass, useAutosave, useBreakpoint, useDebounceCallback, useDeepCompareEffect, useDeepCompareLayoutEffect, useDeepCompareMemo, useFilters, useForm, useFormAutosave, useFormState, useFormValue, useIntersectionObserver, useKeyInteractions, useLocalStorage, useLongPressRepeat, usePagination, useScrollableListBox, useSorting, useStateAndRef, useTableColumnConfig, useTableNav, useToast, useTranslationMemo };
|
package/dist/text-editor.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export { TextEditor
|
|
1
|
+
import { ControlledTextEditorProps, TextEditor, TextEditorProps, TextEditorValue } from "./components/inputs/TextEditor/TextEditor.js";
|
|
2
|
+
export { type ControlledTextEditorProps, TextEditor, type TextEditorProps, type TextEditorValue };
|
package/dist/tw-ui-plugin.d.ts
CHANGED
package/dist/tw-ui-plugin.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import plugin from "tailwindcss/plugin";
|
|
2
2
|
//#region src/tw-ui-plugin.ts
|
|
3
|
-
|
|
3
|
+
const uiPlugin = plugin(({ addVariant }) => {
|
|
4
4
|
addVariant("input-filled", [
|
|
5
5
|
"&:has(input:not(:placeholder-shown))",
|
|
6
6
|
"&:is(:where(.group\\/input-content):has(:is(input:not(:placeholder-shown))) *)",
|
package/dist/types/common.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { ComponentProps, FC, PropsWithChildren } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
export type IsRequiredChildrenProperty<T extends FC<PropsWithChildren<any>>, Y, N> = HasRequiredProperty<Omit<ComponentProps<T>, "children">> extends never ? Y : N;
|
|
1
|
+
import { ComponentProps, FC, PropsWithChildren } from "react";
|
|
2
|
+
//#region src/types/common.d.ts
|
|
3
|
+
type Function = (...args: any) => any;
|
|
4
|
+
type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;
|
|
5
|
+
type IsAny<T> = IfAny<T, true, never>;
|
|
6
|
+
type IsUnknown<T, Y, N = T> = IsAny<T> extends never ? (unknown extends T ? Y : N) : N;
|
|
7
|
+
type OmitDiscriminatedUnion<T, K> = { [P in keyof T as Exclude<P, K & keyof any>]: T[P]; };
|
|
8
|
+
type HasRequiredProperty<T> = { [K in keyof T]-?: Record<string, never> extends Pick<T, K> ? never : K; }[keyof T];
|
|
9
|
+
type IsRequiredChildrenProperty<T extends FC<PropsWithChildren<any>>, Y, N> = HasRequiredProperty<Omit<ComponentProps<T>, "children">> extends never ? Y : N;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Function, HasRequiredProperty, IfAny, IsAny, IsRequiredChildrenProperty, IsUnknown, OmitDiscriminatedUnion };
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
//#region src/types/error-handling.d.ts
|
|
2
|
+
type GeneralErrorCodes = "DATA_VALIDATION_ERROR" | "NETWORK_ERROR" | "CANCELED_ERROR" | "INTERNAL_ERROR" | "UNKNOWN_ERROR";
|
|
3
|
+
declare class ApplicationException<CodeT> extends Error {
|
|
4
|
+
code: CodeT;
|
|
5
|
+
serverMessage: string | null;
|
|
6
|
+
constructor(message: string, code: CodeT, serverMessage: string | null);
|
|
6
7
|
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { ApplicationException, GeneralErrorCodes };
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/utils/array.utils.d.ts
|
|
2
|
+
declare namespace ArrayUtils {
|
|
3
|
+
const fromCommaSeparatedStr: (str: string | null | undefined) => string[];
|
|
3
4
|
}
|
|
5
|
+
//#endregion
|
|
6
|
+
export { ArrayUtils };
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
+
//#region src/utils/compoundMapper.d.ts
|
|
1
2
|
interface Prop<T> {
|
|
2
|
-
|
|
3
|
+
value: T;
|
|
3
4
|
}
|
|
4
|
-
|
|
5
|
-
type ConfigVariants<T extends ConfigSchema> = {
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
type ConfigVariantsMulti<T extends ConfigSchema> = {
|
|
9
|
-
[Variant in keyof T]?: T[Variant] | T[Variant][] | undefined;
|
|
10
|
-
};
|
|
5
|
+
type ConfigSchema = Record<string, any>;
|
|
6
|
+
type ConfigVariants<T extends ConfigSchema> = { [Variant in keyof T]?: T[Variant] | null | undefined; };
|
|
7
|
+
type ConfigVariantsMulti<T extends ConfigSchema> = { [Variant in keyof T]?: T[Variant] | T[Variant][] | undefined; };
|
|
11
8
|
interface Config<T, R> {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
default?: R;
|
|
10
|
+
compoundVariants?: (T extends ConfigSchema ? (ConfigVariants<T> | ConfigVariantsMulti<T>) & Prop<R> : Prop<R>)[];
|
|
11
|
+
defaultVariants?: Partial<T>;
|
|
15
12
|
}
|
|
16
13
|
type Props<T> = T extends ConfigSchema ? ConfigVariants<T> : never;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
type CompoundMapper<ReturnType, Variants extends ConfigSchema> = (props: Props<Variants>) => NonNullable<ReturnType> | undefined;
|
|
15
|
+
declare const compoundMapper: <ReturnType, Variants extends ConfigSchema>(config: Config<Variants, NonNullable<ReturnType>>) => (props: Props<Variants>) => NonNullable<ReturnType> | undefined;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { CompoundMapper, ConfigSchema, compoundMapper };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/utils/compoundMapper.ts
|
|
2
|
-
|
|
2
|
+
const compoundMapper = (config) => {
|
|
3
3
|
return (props) => {
|
|
4
4
|
return (config.compoundVariants?.find((v) => {
|
|
5
5
|
return Object.entries(v).filter(([key]) => key !== "value").every(([key, value]) => {
|
|
@@ -1,42 +1,45 @@
|
|
|
1
|
-
import { CalendarDate, CalendarDateTime, DateValue, ZonedDateTime } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
import { CalendarDate, CalendarDateTime, DateValue, ZonedDateTime } from "@internationalized/date";
|
|
2
|
+
//#region src/utils/date-time.utils.d.ts
|
|
3
|
+
declare namespace DateTimeUtils {
|
|
4
|
+
interface LocalizedDateFormatOptions {
|
|
5
|
+
shouldForceLeadingZeros?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface LocalizedDatePart {
|
|
8
|
+
type: Intl.DateTimeFormatPartTypes;
|
|
9
|
+
value: string;
|
|
10
|
+
placeholder: string;
|
|
11
|
+
isPlaceholder: boolean;
|
|
12
|
+
}
|
|
13
|
+
export function getDatePlaceholder(locale?: string, options?: LocalizedDateFormatOptions): string;
|
|
14
|
+
export function getTimePlaceholder(locale?: string): string;
|
|
15
|
+
export function getDateTimePlaceholder(locale?: string, options?: LocalizedDateFormatOptions): string;
|
|
16
|
+
export function getDateRangePlaceholder(locale?: string, options?: LocalizedDateFormatOptions): string;
|
|
17
|
+
export function formatCalendarDateLocalized(calendarDate: CalendarDate, locale?: string, options?: LocalizedDateFormatOptions): string;
|
|
18
|
+
export function formatCalendarDatePartsLocalized(calendarDate?: CalendarDate | null, locale?: string, options?: LocalizedDateFormatOptions): LocalizedDatePart[];
|
|
19
|
+
export function formatCalendarDateTimePartsLocalized(calendarDateTime?: Pick<CalendarDateTime, "day" | "month" | "year" | "hour" | "minute"> | null, locale?: string, options?: LocalizedDateFormatOptions): LocalizedDatePart[];
|
|
20
|
+
export function formatTimeLocalized(timeValue: {
|
|
21
|
+
hour: number;
|
|
22
|
+
minute: number;
|
|
23
|
+
}, locale?: string, options?: LocalizedDateFormatOptions): string;
|
|
24
|
+
export function formatTimePartsLocalized(timeValue?: {
|
|
25
|
+
hour: number;
|
|
26
|
+
minute: number;
|
|
27
|
+
} | null, locale?: string, options?: LocalizedDateFormatOptions): LocalizedDatePart[];
|
|
28
|
+
export function formatCalendarDateTimeLocalized(calendarDateTime: Pick<CalendarDateTime, "day" | "month" | "year" | "hour" | "minute">, locale?: string, options?: LocalizedDateFormatOptions): string;
|
|
29
|
+
export function fromISOtoZonedDateTime(isoString: string, timeZone?: string): ZonedDateTime;
|
|
30
|
+
export function fromDateValueToISO(dateValue: DateValue, timeZone?: string): string;
|
|
31
|
+
export function fromDateValueFieldsToUTCISO(dateValue: DateValue): string;
|
|
32
|
+
export function getCurrentWallClockCalendarDateTime(): CalendarDateTime;
|
|
33
|
+
export function fromDateValueToOffsetISO(dateValue: DateValue, timeZone?: string): string;
|
|
34
|
+
export function fromLocalToZonedDateTime(date: Date, timeZone?: string): ZonedDateTime;
|
|
35
|
+
export function fromDateValueToLocal(dateValue: DateValue, timeZone?: string): Date;
|
|
36
|
+
export function fromCalendarDateToUTCISO(calendarDate: CalendarDate, options?: {
|
|
37
|
+
endOfDay?: boolean;
|
|
38
|
+
}): string;
|
|
39
|
+
export function fromUTCISOToCalendarDate(isoString: string): CalendarDate;
|
|
40
|
+
export function fromCalendarDateTimeToUTCISO(calendarDateTime: CalendarDateTime): string;
|
|
41
|
+
export function fromUTCISOToCalendarDateTime(isoString: string, timeZone?: string): CalendarDateTime;
|
|
42
|
+
export {};
|
|
42
43
|
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { DateTimeUtils };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { IntlUtils } from "./intl.utils.js";
|
|
2
|
-
import { CalendarDate, CalendarDateTime, DateFormatter, fromDate, getLocalTimeZone, parseAbsolute } from "@internationalized/date";
|
|
3
|
-
import { DateTime } from "luxon";
|
|
2
|
+
import { CalendarDate, CalendarDateTime, DateFormatter, fromDate, getLocalTimeZone, parseAbsolute, toZoned } from "@internationalized/date";
|
|
4
3
|
//#region src/utils/date-time.utils.ts
|
|
5
|
-
|
|
4
|
+
let DateTimeUtils;
|
|
6
5
|
(function(_DateTimeUtils) {
|
|
7
6
|
const DATE_SAMPLE_DATE_UTC = new Date(Date.UTC(2e3, 10, 22));
|
|
8
7
|
const TIME_SAMPLE_DATE_UTC = new Date(Date.UTC(2e3, 10, 22, 6, 45));
|
|
@@ -133,7 +132,8 @@ var DateTimeUtils;
|
|
|
133
132
|
return getLocalTimeZone();
|
|
134
133
|
}
|
|
135
134
|
function fromISOtoZonedDateTime(isoString, timeZone) {
|
|
136
|
-
|
|
135
|
+
const resolvedTimeZone = resolveTimeZone(timeZone);
|
|
136
|
+
return parseAbsolute(isoString, resolvedTimeZone);
|
|
137
137
|
}
|
|
138
138
|
_DateTimeUtils.fromISOtoZonedDateTime = fromISOtoZonedDateTime;
|
|
139
139
|
function fromDateValueToISO(dateValue, timeZone) {
|
|
@@ -153,14 +153,12 @@ var DateTimeUtils;
|
|
|
153
153
|
_DateTimeUtils.getCurrentWallClockCalendarDateTime = getCurrentWallClockCalendarDateTime;
|
|
154
154
|
function fromDateValueToOffsetISO(dateValue, timeZone) {
|
|
155
155
|
const resolvedTimeZone = resolveTimeZone(timeZone);
|
|
156
|
-
|
|
157
|
-
const isoString = DateTime.fromJSDate(date, { zone: resolvedTimeZone }).toISO({ includeOffset: true });
|
|
158
|
-
if (isoString) return isoString;
|
|
159
|
-
return date.toISOString();
|
|
156
|
+
return toZoned(dateValue, resolvedTimeZone).toString().replace(/\[[^\]]+\]$/u, "");
|
|
160
157
|
}
|
|
161
158
|
_DateTimeUtils.fromDateValueToOffsetISO = fromDateValueToOffsetISO;
|
|
162
159
|
function fromLocalToZonedDateTime(date, timeZone) {
|
|
163
|
-
|
|
160
|
+
const resolvedTimeZone = resolveTimeZone(timeZone);
|
|
161
|
+
return fromDate(date, resolvedTimeZone);
|
|
164
162
|
}
|
|
165
163
|
_DateTimeUtils.fromLocalToZonedDateTime = fromLocalToZonedDateTime;
|
|
166
164
|
function fromDateValueToLocal(dateValue, timeZone) {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
//#region src/utils/date.utils.d.ts
|
|
2
|
+
declare namespace DateUtils {
|
|
3
|
+
function formatDate(date: Date, format?: string): string;
|
|
4
|
+
function formatRelativeTime(date: Date | string, options?: Intl.RelativeTimeFormatOptions): string;
|
|
5
5
|
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { DateUtils };
|
package/dist/utils/date.utils.js
CHANGED
|
@@ -1,17 +1,40 @@
|
|
|
1
|
-
import { DateTime } from "luxon";
|
|
2
1
|
//#region src/utils/date.utils.ts
|
|
3
|
-
|
|
2
|
+
let DateUtils;
|
|
4
3
|
(function(_DateUtils) {
|
|
5
4
|
const DATE_FORMAT = "dd/MM/yyyy";
|
|
6
5
|
const DATETIME_FORMAT = "dd/MM/yyyy HH:mm:ss";
|
|
7
6
|
function formatDate(date, format = DATE_FORMAT) {
|
|
8
|
-
|
|
7
|
+
if (Number.isNaN(date.getTime())) return "Invalid DateTime";
|
|
8
|
+
const monthShort = new Intl.DateTimeFormat(void 0, { month: "short" }).format(date);
|
|
9
|
+
const parts = {
|
|
10
|
+
yyyy: String(date.getFullYear()).padStart(4, "0"),
|
|
11
|
+
MMM: monthShort,
|
|
12
|
+
MM: String(date.getMonth() + 1).padStart(2, "0"),
|
|
13
|
+
M: String(date.getMonth() + 1),
|
|
14
|
+
dd: String(date.getDate()).padStart(2, "0"),
|
|
15
|
+
d: String(date.getDate()),
|
|
16
|
+
HH: String(date.getHours()).padStart(2, "0"),
|
|
17
|
+
mm: String(date.getMinutes()).padStart(2, "0"),
|
|
18
|
+
ss: String(date.getSeconds()).padStart(2, "0")
|
|
19
|
+
};
|
|
20
|
+
return format.replace(/yyyy|MMM|MM|dd|HH|mm|ss|M|d/gu, (token) => parts[token]);
|
|
9
21
|
}
|
|
10
22
|
_DateUtils.formatDate = formatDate;
|
|
11
23
|
function formatRelativeTime(date, options) {
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
14
|
-
|
|
24
|
+
const dateObject = typeof date === "string" ? new Date(date) : date;
|
|
25
|
+
if (Number.isNaN(dateObject.getTime())) return formatDate(dateObject, DATETIME_FORMAT);
|
|
26
|
+
const differenceSeconds = (dateObject.getTime() - Date.now()) / 1e3;
|
|
27
|
+
const units = [
|
|
28
|
+
["year", 31536e3],
|
|
29
|
+
["month", 2592e3],
|
|
30
|
+
["day", 86400],
|
|
31
|
+
["hour", 3600],
|
|
32
|
+
["minute", 60],
|
|
33
|
+
["second", 1]
|
|
34
|
+
];
|
|
35
|
+
const [unit, secondsPerUnit] = units.find(([, seconds]) => Math.abs(differenceSeconds) >= seconds) ?? units.at(-1);
|
|
36
|
+
const value = Math.round(differenceSeconds / secondsPerUnit);
|
|
37
|
+
return new Intl.RelativeTimeFormat(void 0, options).format(value, unit);
|
|
15
38
|
}
|
|
16
39
|
_DateUtils.formatRelativeTime = formatRelativeTime;
|
|
17
40
|
})(DateUtils || (DateUtils = {}));
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { KeyboardEvent, SyntheticEvent } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { KeyboardEvent, SyntheticEvent } from "react";
|
|
2
|
+
//#region src/utils/dom.utils.d.ts
|
|
3
|
+
declare namespace DomUtils {
|
|
4
|
+
const isKeyboardInput: (elem: Element) => boolean;
|
|
5
|
+
const isKeyboardEvent: (event: SyntheticEvent) => event is KeyboardEvent;
|
|
5
6
|
}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { DomUtils };
|
package/dist/utils/dom.utils.js
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
//#region src/utils/file.utils.d.ts
|
|
2
|
+
type ResponseHeaders = Headers | Record<string, unknown>;
|
|
3
|
+
type BlobResponse = {
|
|
4
|
+
data: Blob;
|
|
5
|
+
headers?: ResponseHeaders;
|
|
6
|
+
};
|
|
7
|
+
declare namespace FileUtils {
|
|
8
|
+
const extractContentDispositionFilename: (headers?: ResponseHeaders) => string | undefined;
|
|
9
|
+
const getObjectUrl: (data: Blob | BlobResponse, revokeTimeoutMs?: number) => string;
|
|
10
|
+
const openFile: (data: Blob | BlobResponse, target?: string, revokeTimeoutMs?: number) => void;
|
|
11
|
+
const downloadFile: (data: Blob | BlobResponse, fileName?: string, revokeTimeoutMs?: number) => void;
|
|
12
|
+
const isFileTypeAccepted: (file: File, fileTypes?: readonly string[] | string[]) => boolean;
|
|
13
|
+
const getCalculatedFileSize: (file?: File) => string;
|
|
14
|
+
const getFileDisplaySize: (state: {
|
|
15
|
+
file?: File;
|
|
16
|
+
displaySize?: number;
|
|
17
|
+
}) => string;
|
|
18
|
+
const formatBytes: (size: number, decimals?: number) => string;
|
|
13
19
|
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { FileUtils };
|