@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
|
@@ -2,53 +2,187 @@ import { Typography } from "../../text/Typography/Typography.js";
|
|
|
2
2
|
import { UIConfig } from "../../../config/uiConfig.context.js";
|
|
3
3
|
import { Button } from "../../buttons/Button/Button.js";
|
|
4
4
|
import { Modal } from "../Modal/Modal.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
5
6
|
import { clsx } from "clsx";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
//#region src/components/overlays/ActionModal/ActionModal.tsx
|
|
8
|
-
|
|
9
|
+
const textAlignClassMap = {
|
|
9
10
|
left: "text-left",
|
|
10
11
|
center: "text-center",
|
|
11
12
|
right: "text-right"
|
|
12
13
|
};
|
|
13
|
-
|
|
14
|
+
const ActionModal = (t0) => {
|
|
15
|
+
const $ = c(52);
|
|
16
|
+
let description;
|
|
17
|
+
let descriptionClassName;
|
|
18
|
+
let descriptionTypography;
|
|
19
|
+
let heading;
|
|
20
|
+
let modalClassName;
|
|
21
|
+
let modalProps;
|
|
22
|
+
let primaryAction;
|
|
23
|
+
let secondaryAction;
|
|
24
|
+
let t1;
|
|
25
|
+
let t2;
|
|
26
|
+
let titleClassName;
|
|
27
|
+
let titleTypography;
|
|
28
|
+
if ($[0] !== t0) {
|
|
29
|
+
({heading, description, primaryAction, secondaryAction, buttonSize: t1, textAlign: t2, modalClassName, titleTypography, titleClassName, descriptionTypography, descriptionClassName, ...modalProps} = t0);
|
|
30
|
+
$[0] = t0;
|
|
31
|
+
$[1] = description;
|
|
32
|
+
$[2] = descriptionClassName;
|
|
33
|
+
$[3] = descriptionTypography;
|
|
34
|
+
$[4] = heading;
|
|
35
|
+
$[5] = modalClassName;
|
|
36
|
+
$[6] = modalProps;
|
|
37
|
+
$[7] = primaryAction;
|
|
38
|
+
$[8] = secondaryAction;
|
|
39
|
+
$[9] = t1;
|
|
40
|
+
$[10] = t2;
|
|
41
|
+
$[11] = titleClassName;
|
|
42
|
+
$[12] = titleTypography;
|
|
43
|
+
} else {
|
|
44
|
+
description = $[1];
|
|
45
|
+
descriptionClassName = $[2];
|
|
46
|
+
descriptionTypography = $[3];
|
|
47
|
+
heading = $[4];
|
|
48
|
+
modalClassName = $[5];
|
|
49
|
+
modalProps = $[6];
|
|
50
|
+
primaryAction = $[7];
|
|
51
|
+
secondaryAction = $[8];
|
|
52
|
+
t1 = $[9];
|
|
53
|
+
t2 = $[10];
|
|
54
|
+
titleClassName = $[11];
|
|
55
|
+
titleTypography = $[12];
|
|
56
|
+
}
|
|
57
|
+
const buttonSize = t1 === void 0 ? "m" : t1;
|
|
58
|
+
const textAlign = t2 === void 0 ? "left" : t2;
|
|
14
59
|
const ui = UIConfig.useConfig();
|
|
15
60
|
const textAlignClass = textAlignClassMap[textAlign];
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
61
|
+
let t3;
|
|
62
|
+
if ($[13] !== modalClassName) {
|
|
63
|
+
t3 = clsx("w-modal", modalClassName);
|
|
64
|
+
$[13] = modalClassName;
|
|
65
|
+
$[14] = t3;
|
|
66
|
+
} else t3 = $[14];
|
|
67
|
+
const t4 = titleTypography ?? ui.actionModal.titleTypography;
|
|
68
|
+
let t5;
|
|
69
|
+
if ($[15] !== textAlignClass || $[16] !== titleClassName) {
|
|
70
|
+
t5 = clsx("text-text-default-1", textAlignClass, titleClassName);
|
|
71
|
+
$[15] = textAlignClass;
|
|
72
|
+
$[16] = titleClassName;
|
|
73
|
+
$[17] = t5;
|
|
74
|
+
} else t5 = $[17];
|
|
75
|
+
let t6;
|
|
76
|
+
if ($[18] !== heading || $[19] !== t4 || $[20] !== t5) {
|
|
77
|
+
t6 = /* @__PURE__ */ jsx(Typography, {
|
|
78
|
+
...t4,
|
|
79
|
+
as: "h2",
|
|
80
|
+
className: t5,
|
|
81
|
+
children: heading
|
|
82
|
+
});
|
|
83
|
+
$[18] = heading;
|
|
84
|
+
$[19] = t4;
|
|
85
|
+
$[20] = t5;
|
|
86
|
+
$[21] = t6;
|
|
87
|
+
} else t6 = $[21];
|
|
88
|
+
const t7 = descriptionTypography ?? ui.actionModal.descriptionTypography;
|
|
89
|
+
let t8;
|
|
90
|
+
if ($[22] !== descriptionClassName || $[23] !== textAlignClass) {
|
|
91
|
+
t8 = clsx("text-text-default-1", textAlignClass, descriptionClassName);
|
|
92
|
+
$[22] = descriptionClassName;
|
|
93
|
+
$[23] = textAlignClass;
|
|
94
|
+
$[24] = t8;
|
|
95
|
+
} else t8 = $[24];
|
|
96
|
+
let t9;
|
|
97
|
+
if ($[25] !== description || $[26] !== t7 || $[27] !== t8) {
|
|
98
|
+
t9 = /* @__PURE__ */ jsx(Typography, {
|
|
99
|
+
...t7,
|
|
100
|
+
className: t8,
|
|
101
|
+
children: description
|
|
102
|
+
});
|
|
103
|
+
$[25] = description;
|
|
104
|
+
$[26] = t7;
|
|
105
|
+
$[27] = t8;
|
|
106
|
+
$[28] = t9;
|
|
107
|
+
} else t9 = $[28];
|
|
108
|
+
let t10;
|
|
109
|
+
if ($[29] !== t6 || $[30] !== t9) {
|
|
110
|
+
t10 = /* @__PURE__ */ jsxs("div", {
|
|
20
111
|
className: "flex flex-col gap-modal-gap-text",
|
|
21
|
-
children: [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
112
|
+
children: [t6, t9]
|
|
113
|
+
});
|
|
114
|
+
$[29] = t6;
|
|
115
|
+
$[30] = t9;
|
|
116
|
+
$[31] = t10;
|
|
117
|
+
} else t10 = $[31];
|
|
118
|
+
let t11;
|
|
119
|
+
if ($[32] !== buttonSize || $[33] !== secondaryAction) {
|
|
120
|
+
t11 = secondaryAction && /* @__PURE__ */ jsx(Button, {
|
|
121
|
+
variant: secondaryAction?.variant ?? "contained",
|
|
122
|
+
size: buttonSize,
|
|
123
|
+
color: secondaryAction?.color ?? "secondary",
|
|
124
|
+
width: "fill",
|
|
125
|
+
onPress: secondaryAction?.onPress,
|
|
126
|
+
className: clsx("min-w-40 flex-1 shrink-0", secondaryAction?.className),
|
|
127
|
+
children: secondaryAction?.label
|
|
128
|
+
});
|
|
129
|
+
$[32] = buttonSize;
|
|
130
|
+
$[33] = secondaryAction;
|
|
131
|
+
$[34] = t11;
|
|
132
|
+
} else t11 = $[34];
|
|
133
|
+
const t12 = primaryAction?.variant ?? "contained";
|
|
134
|
+
const t13 = primaryAction?.color ?? "primary";
|
|
135
|
+
const t14 = primaryAction.onPress;
|
|
136
|
+
const t15 = primaryAction?.className;
|
|
137
|
+
let t16;
|
|
138
|
+
if ($[35] !== t15) {
|
|
139
|
+
t16 = clsx("min-w-40 flex-1 shrink-0", t15);
|
|
140
|
+
$[35] = t15;
|
|
141
|
+
$[36] = t16;
|
|
142
|
+
} else t16 = $[36];
|
|
143
|
+
let t17;
|
|
144
|
+
if ($[37] !== buttonSize || $[38] !== primaryAction.label || $[39] !== primaryAction.onPress || $[40] !== t12 || $[41] !== t13 || $[42] !== t16) {
|
|
145
|
+
t17 = /* @__PURE__ */ jsx(Button, {
|
|
146
|
+
variant: t12,
|
|
147
|
+
size: buttonSize,
|
|
148
|
+
color: t13,
|
|
149
|
+
width: "fill",
|
|
150
|
+
onPress: t14,
|
|
151
|
+
className: t16,
|
|
152
|
+
children: primaryAction.label
|
|
153
|
+
});
|
|
154
|
+
$[37] = buttonSize;
|
|
155
|
+
$[38] = primaryAction.label;
|
|
156
|
+
$[39] = primaryAction.onPress;
|
|
157
|
+
$[40] = t12;
|
|
158
|
+
$[41] = t13;
|
|
159
|
+
$[42] = t16;
|
|
160
|
+
$[43] = t17;
|
|
161
|
+
} else t17 = $[43];
|
|
162
|
+
let t18;
|
|
163
|
+
if ($[44] !== t11 || $[45] !== t17) {
|
|
164
|
+
t18 = /* @__PURE__ */ jsxs("div", {
|
|
32
165
|
className: "flex w-full flex-wrap gap-modal-gap-buttons pt-1",
|
|
33
|
-
children: [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
166
|
+
children: [t11, t17]
|
|
167
|
+
});
|
|
168
|
+
$[44] = t11;
|
|
169
|
+
$[45] = t17;
|
|
170
|
+
$[46] = t18;
|
|
171
|
+
} else t18 = $[46];
|
|
172
|
+
let t19;
|
|
173
|
+
if ($[47] !== modalProps || $[48] !== t10 || $[49] !== t18 || $[50] !== t3) {
|
|
174
|
+
t19 = /* @__PURE__ */ jsxs(Modal, {
|
|
175
|
+
modalClassName: t3,
|
|
176
|
+
...modalProps,
|
|
177
|
+
children: [t10, t18]
|
|
178
|
+
});
|
|
179
|
+
$[47] = modalProps;
|
|
180
|
+
$[48] = t10;
|
|
181
|
+
$[49] = t18;
|
|
182
|
+
$[50] = t3;
|
|
183
|
+
$[51] = t19;
|
|
184
|
+
} else t19 = $[51];
|
|
185
|
+
return t19;
|
|
52
186
|
};
|
|
53
187
|
//#endregion
|
|
54
188
|
export { ActionModal };
|
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { TypographyVariantProps } from "../../text/Typography/typography.cva.js";
|
|
2
|
+
import { ReactNode, RefObject } from "react";
|
|
3
|
+
//#region src/components/overlays/BottomSheet/BottomSheet.d.ts
|
|
3
4
|
type BottomSheetState = "closed" | "opening" | "opened" | "closing";
|
|
4
5
|
interface BottomSheetBaseProps {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
6
|
+
isOpen?: boolean;
|
|
7
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
8
|
+
onStateChange?: (state: BottomSheetState) => void;
|
|
9
|
+
isDismissable?: boolean;
|
|
10
|
+
isScrollable?: boolean;
|
|
11
|
+
hideHeader?: boolean;
|
|
12
|
+
hideThumb?: boolean;
|
|
13
|
+
height?: "auto" | "full";
|
|
14
|
+
label?: string;
|
|
15
|
+
portalContainerRef?: RefObject<HTMLElement>;
|
|
16
|
+
children: ReactNode | ((close: () => void) => ReactNode);
|
|
17
|
+
footer?: ReactNode;
|
|
18
|
+
sheetMarginTop?: number;
|
|
19
|
+
sheetMarginBottom?: number;
|
|
20
|
+
/** Min downward drag distance (px) to allow close on release. Increase to require a longer drag. */
|
|
21
|
+
closeDragThreshold?: number;
|
|
22
|
+
/** Min downward velocity to close on flick. Increase to require a more intentional swipe. */
|
|
23
|
+
closeVelocityThreshold?: number;
|
|
24
|
+
shouldCloseOnInteractOutside?: () => boolean;
|
|
25
|
+
containerClassName?: string;
|
|
26
|
+
overlayClassName?: string;
|
|
27
|
+
headerTypography?: TypographyVariantProps;
|
|
27
28
|
}
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
interface BottomSheetProps extends BottomSheetBaseProps {
|
|
30
|
+
trigger?: ReactNode;
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
declare const BottomSheet: ({ isOpen, portalContainerRef, onOpenChange, trigger, children, ...rest }: BottomSheetProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
//#endregion
|
|
34
|
+
export { BottomSheet, BottomSheetProps };
|
|
@@ -2,23 +2,23 @@ import { UIConfig } from "../../../config/uiConfig.context.js";
|
|
|
2
2
|
import { BottomSheetHeader } from "./BottomSheetHeader.js";
|
|
3
3
|
import { useStateAndRef } from "../../../hooks/useStateAndRef.js";
|
|
4
4
|
import { DomUtils } from "../../../utils/dom.utils.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
5
6
|
import { clsx } from "clsx";
|
|
6
7
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
7
8
|
import { Dialog, DialogTrigger, Modal, ModalOverlay } from "react-aria-components";
|
|
8
|
-
import { c } from "react/compiler-runtime";
|
|
9
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { useResizeObserver, useViewportSize } from "@react-aria/utils";
|
|
11
11
|
import { AnimatePresence, animate, motion, useDragControls, useMotionValue } from "motion/react";
|
|
12
12
|
//#region src/components/overlays/BottomSheet/BottomSheet.tsx
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
const MotionModal = motion.create(Modal);
|
|
14
|
+
const MotionModalOverlay = motion.create(ModalOverlay);
|
|
15
|
+
const inertiaTransition = {
|
|
16
16
|
type: "inertia",
|
|
17
17
|
bounceStiffness: 300,
|
|
18
18
|
bounceDamping: 40,
|
|
19
19
|
timeConstant: 300
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
const staticTransition = {
|
|
22
22
|
duration: .5,
|
|
23
23
|
ease: [
|
|
24
24
|
.32,
|
|
@@ -27,8 +27,8 @@ var staticTransition = {
|
|
|
27
27
|
1
|
|
28
28
|
]
|
|
29
29
|
};
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
const KEYBOARD_INSET_THRESHOLD = 48;
|
|
31
|
+
const BottomSheetBase = ({ isOpen, onOpenChange, onStateChange, isDismissable = true, isScrollable = true, height = "full", label, portalContainerRef, children, footer, hideHeader, hideThumb: hideThumbProp, sheetMarginTop = 96, sheetMarginBottom = 128, closeDragThreshold: closeDragThresholdProp, closeVelocityThreshold: closeVelocityThresholdProp, shouldCloseOnInteractOutside, containerClassName, overlayClassName, headerTypography: headerTypographyProp }) => {
|
|
32
32
|
const uiConfig = UIConfig.useConfig();
|
|
33
33
|
const closeDragThreshold = closeDragThresholdProp ?? uiConfig.bottomSheet.closeDragThreshold;
|
|
34
34
|
const closeVelocityThreshold = closeVelocityThresholdProp ?? uiConfig.bottomSheet.closeVelocityThreshold;
|
|
@@ -36,9 +36,11 @@ var BottomSheetBase = ({ isOpen, onOpenChange, onStateChange, isDismissable = tr
|
|
|
36
36
|
const headerTypography = headerTypographyProp ?? uiConfig.bottomSheet.headerTypography;
|
|
37
37
|
const viewport = useViewportSize();
|
|
38
38
|
const { sheetHeight, windowHeight } = useMemo(() => {
|
|
39
|
+
const sh = viewport.height - sheetMarginTop;
|
|
40
|
+
const browserHeight = typeof window === "undefined" ? viewport.height : window.innerHeight;
|
|
39
41
|
return {
|
|
40
|
-
sheetHeight:
|
|
41
|
-
windowHeight: Math.max(
|
|
42
|
+
sheetHeight: sh,
|
|
43
|
+
windowHeight: Math.max(browserHeight, viewport.height) - sheetMarginTop
|
|
42
44
|
};
|
|
43
45
|
}, [viewport.height, sheetMarginTop]);
|
|
44
46
|
const y = useMotionValue(sheetHeight);
|
|
@@ -56,6 +58,7 @@ var BottomSheetBase = ({ isOpen, onOpenChange, onStateChange, isDismissable = tr
|
|
|
56
58
|
setKeyboardInset(0);
|
|
57
59
|
return;
|
|
58
60
|
}
|
|
61
|
+
if (typeof window === "undefined") return;
|
|
59
62
|
const vv = window.visualViewport;
|
|
60
63
|
if (!vv) return;
|
|
61
64
|
const update = () => {
|
|
@@ -221,7 +224,7 @@ var BottomSheetBase = ({ isOpen, onOpenChange, onStateChange, isDismissable = tr
|
|
|
221
224
|
})]
|
|
222
225
|
}) });
|
|
223
226
|
};
|
|
224
|
-
|
|
227
|
+
const BottomSheet = (t0) => {
|
|
225
228
|
const $ = c(30);
|
|
226
229
|
let children;
|
|
227
230
|
let isOpen;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Typography } from "../../text/Typography/Typography.js";
|
|
2
2
|
import "../../../config/i18n.js";
|
|
3
3
|
import { X } from "lucide-react";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
4
5
|
import { clsx } from "clsx";
|
|
5
6
|
import { Button } from "react-aria-components";
|
|
6
|
-
import { c } from "react/compiler-runtime";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { useTranslation } from "react-i18next";
|
|
9
9
|
//#region src/components/overlays/BottomSheet/BottomSheetHeader.tsx
|
|
10
|
-
|
|
10
|
+
const BottomSheetHeader = (t0) => {
|
|
11
11
|
const $ = c(17);
|
|
12
12
|
const { label, dragControls, isDismissable, hideThumb, hideHeader, headerTypography, onClose } = t0;
|
|
13
13
|
const { t } = useTranslation("ui");
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { ReactNode, RefObject } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { ReactNode, RefObject } from "react";
|
|
2
|
+
//#region src/components/overlays/Drawer/Drawer.d.ts
|
|
3
|
+
interface DrawerProps {
|
|
4
|
+
label: string;
|
|
5
|
+
isOpen?: boolean;
|
|
6
|
+
portalContainerRef?: RefObject<HTMLElement>;
|
|
7
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
8
|
+
trigger?: ReactNode;
|
|
9
|
+
children: (close: () => void) => ReactNode;
|
|
10
|
+
isDismissable?: boolean;
|
|
11
|
+
overlayClassName?: string;
|
|
12
|
+
dialogClassName?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
shouldCloseOnInteractOutside?: () => boolean;
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
+
declare const Drawer: ({ label, isOpen, portalContainerRef, onOpenChange, trigger, children, isDismissable, overlayClassName, dialogClassName, className, shouldCloseOnInteractOutside }: DrawerProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Drawer, DrawerProps };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { modalOverlay } from "../Modal/modal.cva.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
2
3
|
import { clsx } from "clsx";
|
|
3
4
|
import { Dialog, DialogTrigger, Modal, ModalOverlay } from "react-aria-components";
|
|
4
|
-
import { c } from "react/compiler-runtime";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/overlays/Drawer/Drawer.tsx
|
|
7
|
-
|
|
7
|
+
const Drawer = (t0) => {
|
|
8
8
|
const $ = c(25);
|
|
9
9
|
const { label, isOpen, portalContainerRef, onOpenChange, trigger, children, isDismissable, overlayClassName, dialogClassName, className, shouldCloseOnInteractOutside } = t0;
|
|
10
10
|
if (trigger) {
|
|
@@ -73,7 +73,7 @@ var Drawer = (t0) => {
|
|
|
73
73
|
} else t1 = $[24];
|
|
74
74
|
return t1;
|
|
75
75
|
};
|
|
76
|
-
|
|
76
|
+
const DrawerOverlay = ({ label, isOpen, onOpenChange, portalContainerRef, children, isDismissable, overlayClassName, dialogClassName, className, shouldCloseOnInteractOutside }) => {
|
|
77
77
|
return /* @__PURE__ */ jsx(ModalOverlay, {
|
|
78
78
|
isOpen,
|
|
79
79
|
onOpenChange,
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { ModalVariantProps } from "./modal.cva.js";
|
|
2
|
+
import { PropsWithChildren, RefObject } from "react";
|
|
3
|
+
import { DialogProps } from "react-aria-components";
|
|
4
|
+
//#region src/components/overlays/Modal/Modal.d.ts
|
|
5
|
+
interface ModalProps extends ModalVariantProps, Pick<DialogProps, "aria-label" | "aria-labelledby"> {
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
portalContainerRef?: RefObject<HTMLElement>;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
modalClassName?: string;
|
|
10
|
+
closeIconClassName?: string;
|
|
11
|
+
overlayClassName?: string;
|
|
12
|
+
showCloseIcon?: boolean;
|
|
13
|
+
isDismissable?: boolean;
|
|
14
|
+
isKeyboardDismissable?: boolean;
|
|
15
|
+
shouldCloseOnInteractOutside?: () => boolean;
|
|
14
16
|
}
|
|
15
|
-
|
|
17
|
+
declare const Modal$1: ({ isOpen, portalContainerRef, onClose, aside, children, modalClassName, closeIconClassName, overlayClassName, showCloseIcon, isDismissable, isKeyboardDismissable, shouldCloseOnInteractOutside, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy }: PropsWithChildren<ModalProps>) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { Modal$1 as Modal, ModalProps };
|
|
@@ -8,7 +8,7 @@ import { Dialog, Modal, ModalOverlay } from "react-aria-components";
|
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { useTranslation } from "react-i18next";
|
|
10
10
|
//#region src/components/overlays/Modal/Modal.tsx
|
|
11
|
-
|
|
11
|
+
const Modal$1 = ({ isOpen, portalContainerRef, onClose, aside, children, modalClassName, closeIconClassName, overlayClassName, showCloseIcon, isDismissable = true, isKeyboardDismissable, shouldCloseOnInteractOutside, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy }) => {
|
|
12
12
|
const { t } = useTranslation("ui");
|
|
13
13
|
const modalMainCva = UIOverrides.useCva("modal.mainCva", modalMainDefinition);
|
|
14
14
|
const modalContentCva = UIOverrides.useCva("modal.contentCva", modalContentDefinition);
|
|
@@ -35,6 +35,8 @@ var Modal$1 = ({ isOpen, portalContainerRef, onClose, aside, children, modalClas
|
|
|
35
35
|
children: /* @__PURE__ */ jsx(Modal, {
|
|
36
36
|
className: modalMainCva({ aside }),
|
|
37
37
|
children: /* @__PURE__ */ jsxs(Dialog, {
|
|
38
|
+
"aria-label": ariaLabel,
|
|
39
|
+
"aria-labelledby": ariaLabelledBy,
|
|
38
40
|
className: modalContentCva({
|
|
39
41
|
aside,
|
|
40
42
|
className: modalClassName
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { StyleMergeUtils } from "../../../utils/style-merge.util.js";
|
|
2
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
3
|
+
//#region src/components/overlays/Modal/modal.cva.d.ts
|
|
4
|
+
declare const modalContentDefinition: {
|
|
5
|
+
base: string[];
|
|
6
|
+
config: StyleMergeUtils.Config<{
|
|
7
|
+
readonly aside: {
|
|
8
|
+
readonly left: "h-screen rounded-none border-r";
|
|
9
|
+
readonly right: "h-screen rounded-none border-l";
|
|
10
|
+
readonly center: "rounded-modal-rounding-default border";
|
|
11
|
+
};
|
|
12
|
+
}>;
|
|
11
13
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}>;
|
|
14
|
+
type ModalConfig = NonNullable<typeof modalContentDefinition.config>;
|
|
15
|
+
interface ModalVariantProps extends UIOverrides.VariantProps<ModalConfig> {}
|
|
16
|
+
declare const modalOverlayDefinition: {
|
|
17
|
+
base: string[];
|
|
18
|
+
config: StyleMergeUtils.Config<{
|
|
19
|
+
readonly aside: {
|
|
20
|
+
readonly left: "p-0";
|
|
21
|
+
readonly right: "p-0";
|
|
22
|
+
readonly center: "p-4";
|
|
23
|
+
};
|
|
24
|
+
}>;
|
|
24
25
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
readonly center: "justify-center";
|
|
35
|
-
};
|
|
36
|
-
}>;
|
|
26
|
+
declare const modalMainDefinition: {
|
|
27
|
+
base: string[];
|
|
28
|
+
config: StyleMergeUtils.Config<{
|
|
29
|
+
readonly aside: {
|
|
30
|
+
readonly left: "entering:animate-drawer-enter-left exiting:animate-drawer-exit-left justify-start";
|
|
31
|
+
readonly right: "entering:animate-drawer-enter-right exiting:animate-drawer-exit-right justify-end";
|
|
32
|
+
readonly center: "justify-center";
|
|
33
|
+
};
|
|
34
|
+
}>;
|
|
37
35
|
};
|
|
36
|
+
//#endregion
|
|
37
|
+
export { ModalConfig, ModalVariantProps, modalContentDefinition, modalMainDefinition, modalOverlayDefinition };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
3
|
//#region src/components/overlays/Modal/modal.cva.ts
|
|
4
|
-
|
|
4
|
+
const modalContentDefinition = UIOverrides.defineConfig({
|
|
5
5
|
base: [
|
|
6
6
|
"relative flex flex-col items-center gap-modal-gap-content px-modal-side-mobile py-modal-height-mobile md:px-modal-side-desktop md:py-modal-height-desktop",
|
|
7
7
|
"w-fit max-w-full [&>*]:max-w-full",
|
|
@@ -17,7 +17,7 @@ var modalContentDefinition = UIOverrides.defineConfig({
|
|
|
17
17
|
defaultVariants: { aside: "center" }
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
|
-
|
|
20
|
+
const modalOverlayDefinition = UIOverrides.defineConfig({
|
|
21
21
|
base: ["fixed inset-0 z-modal flex h-(--visual-viewport-height) w-screen overflow-y-auto bg-support-overlay"],
|
|
22
22
|
config: {
|
|
23
23
|
variants: { aside: {
|
|
@@ -28,8 +28,8 @@ var modalOverlayDefinition = UIOverrides.defineConfig({
|
|
|
28
28
|
defaultVariants: { aside: "center" }
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
const modalOverlay = cva(modalOverlayDefinition.base, modalOverlayDefinition.config);
|
|
32
|
+
const modalMainDefinition = UIOverrides.defineConfig({
|
|
33
33
|
base: ["pointer-events-none my-auto flex w-full"],
|
|
34
34
|
config: {
|
|
35
35
|
variants: { aside: {
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { BottomSheetProps } from "../BottomSheet/BottomSheet.js";
|
|
2
|
+
import { ReactElement, ReactNode } from "react";
|
|
3
|
+
import { PopoverProps } from "react-aria-components";
|
|
4
|
+
//#region src/components/overlays/ResponsivePopover/ResponsivePopover.d.ts
|
|
4
5
|
type ResponsivePopoverBottomSheetProps = Partial<Omit<BottomSheetProps, "children" | "isOpen" | "onOpenChange" | "trigger">>;
|
|
5
6
|
type ResponsivePopoverPopoverProps = Partial<Omit<PopoverProps, "children" | "className">>;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
interface ResponsivePopoverProps {
|
|
8
|
+
trigger: ReactElement;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
isOpen: boolean;
|
|
11
|
+
onOpenChange: (isOpen: boolean) => void;
|
|
12
|
+
popoverClassName?: string;
|
|
13
|
+
sheetLabel: string;
|
|
14
|
+
bottomSheetProps?: ResponsivePopoverBottomSheetProps;
|
|
15
|
+
popoverProps?: ResponsivePopoverPopoverProps;
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
declare const ResponsivePopover: ({ trigger, isOpen, onOpenChange, children, popoverClassName, sheetLabel, bottomSheetProps, popoverProps }: ResponsivePopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { ResponsivePopover, ResponsivePopoverProps };
|