@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
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { UIOverrides } from "../config/uiOverrides.context.js";
|
|
2
|
+
import { Typography } from "./typography.js";
|
|
3
|
+
import { Loader } from "./loader.js";
|
|
4
|
+
import { alertDefinition } from "./status/Alert/alert.cva.js";
|
|
5
|
+
import { statusIconDefinition, statusSeparatorDefinition } from "./status/shared/status.cva.js";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
7
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/status/Alert/Alert.tsx
|
|
9
|
+
const Alert = (t0) => {
|
|
10
|
+
const $ = c(31);
|
|
11
|
+
const { variant, color, text, isLoading: t1, rightContent, hasSeparator, icon: Icon, className } = t0;
|
|
12
|
+
const isLoading = t1 === void 0 ? false : t1;
|
|
13
|
+
const alertCva = UIOverrides.useCva("alert.cva", alertDefinition);
|
|
14
|
+
const iconCva = UIOverrides.useCva("status.iconCva", statusIconDefinition);
|
|
15
|
+
const separatorCva = UIOverrides.useCva("status.separatorCva", statusSeparatorDefinition);
|
|
16
|
+
let t2;
|
|
17
|
+
if ($[0] !== alertCva || $[1] !== className || $[2] !== color || $[3] !== variant) {
|
|
18
|
+
t2 = alertCva({
|
|
19
|
+
variant,
|
|
20
|
+
color,
|
|
21
|
+
className
|
|
22
|
+
});
|
|
23
|
+
$[0] = alertCva;
|
|
24
|
+
$[1] = className;
|
|
25
|
+
$[2] = color;
|
|
26
|
+
$[3] = variant;
|
|
27
|
+
$[4] = t2;
|
|
28
|
+
} else t2 = $[4];
|
|
29
|
+
let t3;
|
|
30
|
+
if ($[5] !== isLoading) {
|
|
31
|
+
t3 = isLoading && /* @__PURE__ */ jsx(Loader, {
|
|
32
|
+
size: "default",
|
|
33
|
+
className: "shrink-0"
|
|
34
|
+
});
|
|
35
|
+
$[5] = isLoading;
|
|
36
|
+
$[6] = t3;
|
|
37
|
+
} else t3 = $[6];
|
|
38
|
+
let t4;
|
|
39
|
+
if ($[7] !== Icon || $[8] !== color || $[9] !== iconCva || $[10] !== isLoading || $[11] !== variant) {
|
|
40
|
+
t4 = !isLoading && Icon && /* @__PURE__ */ jsx(Icon, { className: iconCva({
|
|
41
|
+
variant,
|
|
42
|
+
color
|
|
43
|
+
}) });
|
|
44
|
+
$[7] = Icon;
|
|
45
|
+
$[8] = color;
|
|
46
|
+
$[9] = iconCva;
|
|
47
|
+
$[10] = isLoading;
|
|
48
|
+
$[11] = variant;
|
|
49
|
+
$[12] = t4;
|
|
50
|
+
} else t4 = $[12];
|
|
51
|
+
let t5;
|
|
52
|
+
if ($[13] !== text) {
|
|
53
|
+
t5 = /* @__PURE__ */ jsx(Typography, {
|
|
54
|
+
size: "label-2",
|
|
55
|
+
children: text
|
|
56
|
+
});
|
|
57
|
+
$[13] = text;
|
|
58
|
+
$[14] = t5;
|
|
59
|
+
} else t5 = $[14];
|
|
60
|
+
let t6;
|
|
61
|
+
if ($[15] !== t3 || $[16] !== t4 || $[17] !== t5) {
|
|
62
|
+
t6 = /* @__PURE__ */ jsxs("div", {
|
|
63
|
+
className: "flex w-full items-start gap-alert-gap-icon-to-text px-alert-side-default py-alert-height-content",
|
|
64
|
+
children: [
|
|
65
|
+
t3,
|
|
66
|
+
t4,
|
|
67
|
+
t5
|
|
68
|
+
]
|
|
69
|
+
});
|
|
70
|
+
$[15] = t3;
|
|
71
|
+
$[16] = t4;
|
|
72
|
+
$[17] = t5;
|
|
73
|
+
$[18] = t6;
|
|
74
|
+
} else t6 = $[18];
|
|
75
|
+
let t7;
|
|
76
|
+
if ($[19] !== color || $[20] !== hasSeparator || $[21] !== rightContent || $[22] !== separatorCva || $[23] !== variant) {
|
|
77
|
+
t7 = !!rightContent && /* @__PURE__ */ jsxs(Fragment, { children: [hasSeparator && /* @__PURE__ */ jsx("div", { className: separatorCva({
|
|
78
|
+
variant,
|
|
79
|
+
color
|
|
80
|
+
}) }), /* @__PURE__ */ jsx("div", {
|
|
81
|
+
className: "flex w-full shrink-0 flex-wrap items-center justify-end gap-alert-gap-action px-alert-side-default py-alert-height-actions-mobile md:w-auto md:justify-center md:py-alert-height-actions-desktop",
|
|
82
|
+
children: rightContent
|
|
83
|
+
})] });
|
|
84
|
+
$[19] = color;
|
|
85
|
+
$[20] = hasSeparator;
|
|
86
|
+
$[21] = rightContent;
|
|
87
|
+
$[22] = separatorCva;
|
|
88
|
+
$[23] = variant;
|
|
89
|
+
$[24] = t7;
|
|
90
|
+
} else t7 = $[24];
|
|
91
|
+
let t8;
|
|
92
|
+
if ($[25] !== t6 || $[26] !== t7) {
|
|
93
|
+
t8 = /* @__PURE__ */ jsxs("div", {
|
|
94
|
+
className: "flex w-auto flex-col items-center md:flex-row",
|
|
95
|
+
children: [t6, t7]
|
|
96
|
+
});
|
|
97
|
+
$[25] = t6;
|
|
98
|
+
$[26] = t7;
|
|
99
|
+
$[27] = t8;
|
|
100
|
+
} else t8 = $[27];
|
|
101
|
+
let t9;
|
|
102
|
+
if ($[28] !== t2 || $[29] !== t8) {
|
|
103
|
+
t9 = /* @__PURE__ */ jsx("div", {
|
|
104
|
+
className: t2,
|
|
105
|
+
children: t8
|
|
106
|
+
});
|
|
107
|
+
$[28] = t2;
|
|
108
|
+
$[29] = t8;
|
|
109
|
+
$[30] = t9;
|
|
110
|
+
} else t9 = $[30];
|
|
111
|
+
return t9;
|
|
112
|
+
};
|
|
113
|
+
//#endregion
|
|
114
|
+
export { Alert };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FieldValues } from "./inputs/shared/form.binding.js";
|
|
2
|
+
import { DefaultInitialSelectItem, GroupedSelectControlProps, GroupedSelectProps } from "./inputs/Selection/shared/select.types.js";
|
|
3
|
+
import { SelectBaseProps } from "./inputs/Selection/shared/SelectBase.js";
|
|
4
|
+
import { OmitDiscriminatedUnion } from "../types/common.js";
|
|
5
|
+
import { ReactElement } from "react";
|
|
6
|
+
import { Key } from "react-aria-components";
|
|
7
|
+
//#region src/components/inputs/Selection/Autocomplete/Autocomplete.d.ts
|
|
8
|
+
type AutocompleteProps<TKey extends Key = Key, TInitialSelectItem = DefaultInitialSelectItem<TKey>> = OmitDiscriminatedUnion<SelectBaseProps<TKey, TInitialSelectItem>, "isSearchable"> & {
|
|
9
|
+
renderStaticInput?: boolean;
|
|
10
|
+
};
|
|
11
|
+
type ControlledAutocompleteProps<TFieldValues extends FieldValues, TKey extends Key = Key, TInitialSelectItem = DefaultInitialSelectItem<TKey>> = Omit<AutocompleteProps<TKey, TInitialSelectItem>, keyof GroupedSelectProps> & GroupedSelectControlProps<TFieldValues, TKey, TInitialSelectItem>;
|
|
12
|
+
declare function AutocompleteComponent<TKey extends Key = Key, TInitialSelectItem = DefaultInitialSelectItem<TKey>>(props: AutocompleteProps<TKey, TInitialSelectItem>): ReactElement;
|
|
13
|
+
declare function AutocompleteComponent<TFieldValues extends FieldValues, TKey extends Key = Key, TInitialSelectItem = DefaultInitialSelectItem<TKey>>(props: ControlledAutocompleteProps<TFieldValues, TKey, TInitialSelectItem>): ReactElement;
|
|
14
|
+
declare const Autocomplete: typeof AutocompleteComponent;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { Autocomplete, AutocompleteProps, ControlledAutocompleteProps };
|
|
@@ -1,37 +1,28 @@
|
|
|
1
|
-
import { UIOverrides } from "
|
|
2
|
-
import { UIConfig } from "
|
|
3
|
-
import { FieldController } from "
|
|
4
|
-
import { InputFrame } from "
|
|
5
|
-
import { useStaticInputHandoff } from "
|
|
6
|
-
import { selectInputTagsContentWrapperDefinition } from "
|
|
7
|
-
import { SelectBase } from "
|
|
8
|
-
import { StaticSelectTrailingContent } from "
|
|
9
|
-
import { getStaticSelectValue } from "
|
|
1
|
+
import { UIOverrides } from "../config/uiOverrides.context.js";
|
|
2
|
+
import { UIConfig } from "../config/uiConfig.context.js";
|
|
3
|
+
import { FieldController } from "./inputs/shared/form.binding.js";
|
|
4
|
+
import { InputFrame } from "./inputs/Skeleton/InputFrame.js";
|
|
5
|
+
import { useStaticInputHandoff } from "./inputs/shared/useStaticInputHandoff.js";
|
|
6
|
+
import { selectInputTagsContentWrapperDefinition } from "./inputs/Selection/shared/selectInput.cva.js";
|
|
7
|
+
import { SelectBase } from "./inputs/Selection/shared/SelectBase.js";
|
|
8
|
+
import { StaticSelectTrailingContent } from "./inputs/Selection/shared/StaticSelectTrailingContent.js";
|
|
9
|
+
import { getStaticSelectValue } from "./inputs/Selection/shared/staticSelect.utils.js";
|
|
10
10
|
import { clsx } from "clsx";
|
|
11
|
-
import { useRef, useState } from "react";
|
|
12
|
-
import { c } from "react/compiler-runtime";
|
|
11
|
+
import { memo, useRef, useState } from "react";
|
|
13
12
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
14
13
|
import { mergeRefs } from "@react-aria/utils";
|
|
15
14
|
//#region src/components/inputs/Selection/Autocomplete/Autocomplete.tsx
|
|
16
|
-
function AutocompleteInner(
|
|
17
|
-
const $ = c(8);
|
|
18
|
-
const { renderStaticInput, isFormControlDisabled, ...props } = t0;
|
|
15
|
+
function AutocompleteInner({ renderStaticInput, isFormControlDisabled, ...props }) {
|
|
19
16
|
const ui = UIConfig.useConfig();
|
|
20
17
|
const selectInputTagsContentWrapperCva = UIOverrides.useCva("select.tagsContentWrapperCva", selectInputTagsContentWrapperDefinition);
|
|
21
18
|
const [renderInput, setRenderInput] = useState(!(renderStaticInput ?? ui.renderStaticInput));
|
|
22
19
|
const rootRef = useRef(null);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
getFocusTarget: _temp
|
|
30
|
-
};
|
|
31
|
-
$[0] = renderInput;
|
|
32
|
-
$[1] = t1;
|
|
33
|
-
} else t1 = $[1];
|
|
34
|
-
const { renderRealInput, replayStaticInputChange, replayStaticInputPress } = useStaticInputHandoff(t1);
|
|
20
|
+
const { renderRealInput, replayStaticInputChange, replayStaticInputPress } = useStaticInputHandoff({
|
|
21
|
+
inputRef: rootRef,
|
|
22
|
+
renderInput,
|
|
23
|
+
setRenderInput,
|
|
24
|
+
getFocusTarget: (root) => root.querySelector("input, [data-type='select-trigger'], button, [tabindex]")
|
|
25
|
+
});
|
|
35
26
|
const currentValue = props.value;
|
|
36
27
|
if (!renderInput && !!props.customTrigger) setRenderInput(true);
|
|
37
28
|
if (!renderInput) {
|
|
@@ -72,22 +63,13 @@ function AutocompleteInner(t0) {
|
|
|
72
63
|
dataHasSelection: !isEmpty,
|
|
73
64
|
dataHasSearch: false
|
|
74
65
|
};
|
|
75
|
-
const t2 = isDisabled;
|
|
76
|
-
const t3 = clsx("w-full", props.containerClassName);
|
|
77
|
-
const t4 = clsx(props.className, props.inputClassName);
|
|
78
|
-
let t5;
|
|
79
|
-
if ($[2] !== selectInputTagsContentWrapperCva) {
|
|
80
|
-
t5 = selectInputTagsContentWrapperCva({ isSearchable: true });
|
|
81
|
-
$[2] = selectInputTagsContentWrapperCva;
|
|
82
|
-
$[3] = t5;
|
|
83
|
-
} else t5 = $[3];
|
|
84
66
|
return /* @__PURE__ */ jsx(InputFrame, {
|
|
85
67
|
...props,
|
|
86
|
-
isDisabled
|
|
68
|
+
isDisabled,
|
|
87
69
|
isLoading: false,
|
|
88
|
-
className:
|
|
89
|
-
inputClassName:
|
|
90
|
-
contentWrapperClassName:
|
|
70
|
+
className: clsx("w-full", props.containerClassName),
|
|
71
|
+
inputClassName: clsx(props.className, props.inputClassName),
|
|
72
|
+
contentWrapperClassName: selectInputTagsContentWrapperCva({ isSearchable: true }),
|
|
91
73
|
contentGroup: "select",
|
|
92
74
|
labelPlacement: "content-row",
|
|
93
75
|
dataAttributes,
|
|
@@ -115,40 +97,27 @@ function AutocompleteInner(t0) {
|
|
|
115
97
|
})] })
|
|
116
98
|
});
|
|
117
99
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
...props,
|
|
124
|
-
ref: t2,
|
|
125
|
-
isSearchable: true
|
|
126
|
-
});
|
|
127
|
-
$[4] = T0;
|
|
128
|
-
$[5] = props;
|
|
129
|
-
$[6] = t2;
|
|
130
|
-
$[7] = t3;
|
|
131
|
-
} else t3 = $[7];
|
|
132
|
-
return t3;
|
|
133
|
-
}
|
|
134
|
-
function _temp(root) {
|
|
135
|
-
return root.querySelector("input, [data-type='select-trigger'], button, [tabindex]");
|
|
100
|
+
return /* @__PURE__ */ jsx(SelectBase, {
|
|
101
|
+
...props,
|
|
102
|
+
ref: mergeRefs(props.ref, rootRef),
|
|
103
|
+
isSearchable: true
|
|
104
|
+
});
|
|
136
105
|
}
|
|
137
|
-
function
|
|
106
|
+
function AutocompleteComponent({ renderStaticInput, ...props }) {
|
|
138
107
|
if ("field" in props && props.field) {
|
|
139
108
|
const { ignoreInputValueFiltering = true, field, ref, ...innerProps } = props;
|
|
140
109
|
const controlWithOptions = field.form;
|
|
141
110
|
return /* @__PURE__ */ jsx(FieldController, {
|
|
142
111
|
control: field.form,
|
|
143
112
|
name: field.name,
|
|
144
|
-
render: ({ field
|
|
113
|
+
render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(AutocompleteInner, {
|
|
145
114
|
...innerProps,
|
|
146
|
-
ref: mergeRefs(ref,
|
|
147
|
-
value:
|
|
148
|
-
onChange:
|
|
149
|
-
onBlur:
|
|
115
|
+
ref: mergeRefs(ref, field.ref),
|
|
116
|
+
value: field.value,
|
|
117
|
+
onChange: field.onChange,
|
|
118
|
+
onBlur: field.onBlur,
|
|
150
119
|
isDirty,
|
|
151
|
-
isDisabled:
|
|
120
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
152
121
|
isFormControlDisabled: !!controlWithOptions._options?.disabled,
|
|
153
122
|
error: props.error ?? error?.message,
|
|
154
123
|
ignoreInputValueFiltering,
|
|
@@ -161,5 +130,6 @@ function Autocomplete({ renderStaticInput, ...props }) {
|
|
|
161
130
|
renderStaticInput
|
|
162
131
|
});
|
|
163
132
|
}
|
|
133
|
+
const Autocomplete = memo(AutocompleteComponent);
|
|
164
134
|
//#endregion
|
|
165
135
|
export { Autocomplete };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { TypographyVariantProps } from "./text/Typography/typography.cva.js";
|
|
2
|
+
import { ReactNode, RefObject } from "react";
|
|
3
|
+
//#region src/components/overlays/BottomSheet/BottomSheet.d.ts
|
|
4
|
+
type BottomSheetState = "closed" | "opening" | "opened" | "closing";
|
|
5
|
+
interface BottomSheetBaseProps {
|
|
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;
|
|
28
|
+
}
|
|
29
|
+
interface BottomSheetProps extends BottomSheetBaseProps {
|
|
30
|
+
trigger?: ReactNode;
|
|
31
|
+
}
|
|
32
|
+
declare const BottomSheet: ({ isOpen, portalContainerRef, onOpenChange, trigger, children, ...rest }: BottomSheetProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
//#endregion
|
|
34
|
+
export { BottomSheet, BottomSheetProps };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { UIConfig } from "
|
|
2
|
-
import { BottomSheetHeader } from "./BottomSheetHeader.js";
|
|
3
|
-
import { useStateAndRef } from "
|
|
4
|
-
import { DomUtils } from "
|
|
1
|
+
import { UIConfig } from "../config/uiConfig.context.js";
|
|
2
|
+
import { BottomSheetHeader } from "./overlays/BottomSheet/BottomSheetHeader.js";
|
|
3
|
+
import { useStateAndRef } from "../hooks/useStateAndRef.js";
|
|
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;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LinkNavigationProps } from "./link.js";
|
|
2
|
+
import { FC, SVGProps } from "react";
|
|
3
|
+
import { Key } from "react-aria-components";
|
|
4
|
+
//#region src/components/Breadcrumbs/Breadcrumbs.d.ts
|
|
5
|
+
interface BreadcrumbItem {
|
|
6
|
+
id: Key;
|
|
7
|
+
label: string;
|
|
8
|
+
link?: LinkNavigationProps;
|
|
9
|
+
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
10
|
+
}
|
|
11
|
+
interface BreadcrumbsProps {
|
|
12
|
+
items: BreadcrumbItem[];
|
|
13
|
+
className?: string;
|
|
14
|
+
onAction?: (id: Key) => void;
|
|
15
|
+
iconOnly?: boolean;
|
|
16
|
+
}
|
|
17
|
+
declare const Breadcrumbs: ({ items, className, onAction, iconOnly }: BreadcrumbsProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { BreadcrumbItem, Breadcrumbs, BreadcrumbsProps };
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { UIOverrides } from "../config/uiOverrides.context.js";
|
|
2
|
+
import { breadcrumbChevronDefinition, breadcrumbIconDefinition, breadcrumbItemDefinition, breadcrumbSegmentDefinition, breadcrumbsDefinition } from "./Breadcrumbs/breadcrumbs.cva.js";
|
|
3
|
+
import { MenuDesktop } from "./Menu/MenuDesktop.js";
|
|
4
|
+
import { Typography } from "./typography.js";
|
|
5
|
+
import { Tooltip as Tooltip$1 } from "./tooltip.js";
|
|
6
|
+
import { LinkContext } from "../config/link.context.js";
|
|
7
|
+
import { ChevronRight } from "lucide-react";
|
|
8
|
+
import { c } from "react/compiler-runtime";
|
|
9
|
+
import { clsx } from "clsx";
|
|
10
|
+
import { useLayoutEffect, useRef, useState } from "react";
|
|
11
|
+
import { Breadcrumb, Breadcrumbs as Breadcrumbs$1, Button, Link as Link$1 } from "react-aria-components";
|
|
12
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
//#region src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
14
|
+
const Breadcrumbs = (t0) => {
|
|
15
|
+
const $ = c(58);
|
|
16
|
+
const { items, className, onAction, iconOnly: t1 } = t0;
|
|
17
|
+
const iconOnly = t1 === void 0 ? false : t1;
|
|
18
|
+
const breadcrumbsCva = UIOverrides.useCva("breadcrumbs.cva", breadcrumbsDefinition);
|
|
19
|
+
const breadcrumbItem = UIOverrides.useCva("breadcrumbs.itemCva", breadcrumbItemDefinition);
|
|
20
|
+
const breadcrumbSegmentCva = UIOverrides.useCva("breadcrumbs.segmentCva", breadcrumbSegmentDefinition);
|
|
21
|
+
const breadcrumbChevronCva = UIOverrides.useCva("breadcrumbs.chevronCva", breadcrumbChevronDefinition);
|
|
22
|
+
const breadcrumbIconCva = UIOverrides.useCva("breadcrumbs.iconCva", breadcrumbIconDefinition);
|
|
23
|
+
const containerRef = useRef(null);
|
|
24
|
+
const [isOverflowing, setIsOverflowing] = useState(items.length <= 2 ? false : null);
|
|
25
|
+
let t2;
|
|
26
|
+
if ($[0] !== items.length) {
|
|
27
|
+
t2 = () => {
|
|
28
|
+
if (items.length <= 2) {
|
|
29
|
+
setIsOverflowing(false);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const container = containerRef.current;
|
|
33
|
+
if (!container) return;
|
|
34
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
35
|
+
setIsOverflowing(container.scrollWidth > container.clientWidth);
|
|
36
|
+
});
|
|
37
|
+
resizeObserver.observe(container);
|
|
38
|
+
return () => resizeObserver.disconnect();
|
|
39
|
+
};
|
|
40
|
+
$[0] = items.length;
|
|
41
|
+
$[1] = t2;
|
|
42
|
+
} else t2 = $[1];
|
|
43
|
+
let t3;
|
|
44
|
+
if ($[2] !== items) {
|
|
45
|
+
t3 = [items];
|
|
46
|
+
$[2] = items;
|
|
47
|
+
$[3] = t3;
|
|
48
|
+
} else t3 = $[3];
|
|
49
|
+
useLayoutEffect(t2, t3);
|
|
50
|
+
const isReady = isOverflowing !== null;
|
|
51
|
+
const hiddenItems = items.length > 2 ? items.slice(1, -1) : [];
|
|
52
|
+
const firstItem = items[0];
|
|
53
|
+
const lastItem = items[items.length - 1];
|
|
54
|
+
const LinkComponent = LinkContext.useLinkContext()?.LinkComponent ?? Link$1;
|
|
55
|
+
let t4;
|
|
56
|
+
if ($[4] !== LinkComponent || $[5] !== breadcrumbIconCva || $[6] !== breadcrumbItem) {
|
|
57
|
+
t4 = (item, isCurrent, iconOnly_0) => /* @__PURE__ */ jsxs(LinkComponent, {
|
|
58
|
+
...item.link,
|
|
59
|
+
className: breadcrumbItem({ isCurrent }),
|
|
60
|
+
children: [item.icon && /* @__PURE__ */ jsx(item.icon, {
|
|
61
|
+
className: breadcrumbIconCva({}),
|
|
62
|
+
"aria-label": item.label
|
|
63
|
+
}), !iconOnly_0 && /* @__PURE__ */ jsx(Typography, {
|
|
64
|
+
variant: "default",
|
|
65
|
+
size: "label-3",
|
|
66
|
+
children: item.label
|
|
67
|
+
})]
|
|
68
|
+
});
|
|
69
|
+
$[4] = LinkComponent;
|
|
70
|
+
$[5] = breadcrumbIconCva;
|
|
71
|
+
$[6] = breadcrumbItem;
|
|
72
|
+
$[7] = t4;
|
|
73
|
+
} else t4 = $[7];
|
|
74
|
+
const renderBreadcrumbLink = t4;
|
|
75
|
+
if (isOverflowing === true && items.length > 2) {
|
|
76
|
+
const menuItems = hiddenItems.map(_temp);
|
|
77
|
+
const renderEllipsis = () => /* @__PURE__ */ jsx(MenuDesktop, {
|
|
78
|
+
trigger: /* @__PURE__ */ jsx(Tooltip$1, {
|
|
79
|
+
text: hiddenItems.map(_temp2).join(", "),
|
|
80
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
81
|
+
"aria-label": "Show hidden breadcrumbs",
|
|
82
|
+
className: breadcrumbItem({
|
|
83
|
+
isCurrent: false,
|
|
84
|
+
isEllipsis: true
|
|
85
|
+
}),
|
|
86
|
+
children: /* @__PURE__ */ jsx(Typography, {
|
|
87
|
+
variant: "default",
|
|
88
|
+
size: "label-3",
|
|
89
|
+
children: "..."
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
}),
|
|
93
|
+
items: menuItems,
|
|
94
|
+
onAction: onAction ? (key) => onAction(key) : void 0
|
|
95
|
+
});
|
|
96
|
+
let t5;
|
|
97
|
+
if ($[8] !== breadcrumbsCva || $[9] !== className) {
|
|
98
|
+
t5 = clsx(breadcrumbsCva({}), className);
|
|
99
|
+
$[8] = breadcrumbsCva;
|
|
100
|
+
$[9] = className;
|
|
101
|
+
$[10] = t5;
|
|
102
|
+
} else t5 = $[10];
|
|
103
|
+
const t6 = firstItem.id;
|
|
104
|
+
let t7;
|
|
105
|
+
if ($[11] !== breadcrumbSegmentCva) {
|
|
106
|
+
t7 = breadcrumbSegmentCva({});
|
|
107
|
+
$[11] = breadcrumbSegmentCva;
|
|
108
|
+
$[12] = t7;
|
|
109
|
+
} else t7 = $[12];
|
|
110
|
+
let t8;
|
|
111
|
+
if ($[13] !== firstItem || $[14] !== iconOnly || $[15] !== renderBreadcrumbLink) {
|
|
112
|
+
t8 = renderBreadcrumbLink(firstItem, false, iconOnly);
|
|
113
|
+
$[13] = firstItem;
|
|
114
|
+
$[14] = iconOnly;
|
|
115
|
+
$[15] = renderBreadcrumbLink;
|
|
116
|
+
$[16] = t8;
|
|
117
|
+
} else t8 = $[16];
|
|
118
|
+
let t9;
|
|
119
|
+
if ($[17] !== breadcrumbChevronCva) {
|
|
120
|
+
t9 = breadcrumbChevronCva({});
|
|
121
|
+
$[17] = breadcrumbChevronCva;
|
|
122
|
+
$[18] = t9;
|
|
123
|
+
} else t9 = $[18];
|
|
124
|
+
let t10;
|
|
125
|
+
if ($[19] !== t9) {
|
|
126
|
+
t10 = /* @__PURE__ */ jsx(ChevronRight, { className: t9 });
|
|
127
|
+
$[19] = t9;
|
|
128
|
+
$[20] = t10;
|
|
129
|
+
} else t10 = $[20];
|
|
130
|
+
let t11;
|
|
131
|
+
if ($[21] !== firstItem.id || $[22] !== t10 || $[23] !== t7 || $[24] !== t8) {
|
|
132
|
+
t11 = /* @__PURE__ */ jsxs(Breadcrumb, {
|
|
133
|
+
id: t6,
|
|
134
|
+
className: t7,
|
|
135
|
+
children: [t8, t10]
|
|
136
|
+
});
|
|
137
|
+
$[21] = firstItem.id;
|
|
138
|
+
$[22] = t10;
|
|
139
|
+
$[23] = t7;
|
|
140
|
+
$[24] = t8;
|
|
141
|
+
$[25] = t11;
|
|
142
|
+
} else t11 = $[25];
|
|
143
|
+
let t12;
|
|
144
|
+
if ($[26] !== breadcrumbSegmentCva) {
|
|
145
|
+
t12 = breadcrumbSegmentCva({});
|
|
146
|
+
$[26] = breadcrumbSegmentCva;
|
|
147
|
+
$[27] = t12;
|
|
148
|
+
} else t12 = $[27];
|
|
149
|
+
const t13 = renderEllipsis();
|
|
150
|
+
let t14;
|
|
151
|
+
if ($[28] !== breadcrumbChevronCva) {
|
|
152
|
+
t14 = breadcrumbChevronCva({});
|
|
153
|
+
$[28] = breadcrumbChevronCva;
|
|
154
|
+
$[29] = t14;
|
|
155
|
+
} else t14 = $[29];
|
|
156
|
+
let t15;
|
|
157
|
+
if ($[30] !== t14) {
|
|
158
|
+
t15 = /* @__PURE__ */ jsx(ChevronRight, { className: t14 });
|
|
159
|
+
$[30] = t14;
|
|
160
|
+
$[31] = t15;
|
|
161
|
+
} else t15 = $[31];
|
|
162
|
+
const t16 = lastItem.id;
|
|
163
|
+
let t17;
|
|
164
|
+
if ($[32] !== breadcrumbSegmentCva) {
|
|
165
|
+
t17 = breadcrumbSegmentCva({});
|
|
166
|
+
$[32] = breadcrumbSegmentCva;
|
|
167
|
+
$[33] = t17;
|
|
168
|
+
} else t17 = $[33];
|
|
169
|
+
let t18;
|
|
170
|
+
if ($[34] !== lastItem || $[35] !== renderBreadcrumbLink) {
|
|
171
|
+
t18 = renderBreadcrumbLink(lastItem, true);
|
|
172
|
+
$[34] = lastItem;
|
|
173
|
+
$[35] = renderBreadcrumbLink;
|
|
174
|
+
$[36] = t18;
|
|
175
|
+
} else t18 = $[36];
|
|
176
|
+
let t19;
|
|
177
|
+
if ($[37] !== lastItem.id || $[38] !== t17 || $[39] !== t18) {
|
|
178
|
+
t19 = /* @__PURE__ */ jsx(Breadcrumb, {
|
|
179
|
+
id: t16,
|
|
180
|
+
className: t17,
|
|
181
|
+
children: t18
|
|
182
|
+
});
|
|
183
|
+
$[37] = lastItem.id;
|
|
184
|
+
$[38] = t17;
|
|
185
|
+
$[39] = t18;
|
|
186
|
+
$[40] = t19;
|
|
187
|
+
} else t19 = $[40];
|
|
188
|
+
return /* @__PURE__ */ jsxs(Breadcrumbs$1, {
|
|
189
|
+
onAction,
|
|
190
|
+
className: t5,
|
|
191
|
+
children: [
|
|
192
|
+
t11,
|
|
193
|
+
/* @__PURE__ */ jsxs(Breadcrumb, {
|
|
194
|
+
id: "ellipsis",
|
|
195
|
+
className: t12,
|
|
196
|
+
children: [t13, t15]
|
|
197
|
+
}),
|
|
198
|
+
t19
|
|
199
|
+
]
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
let t5;
|
|
203
|
+
if ($[41] !== breadcrumbsCva || $[42] !== className) {
|
|
204
|
+
t5 = clsx(breadcrumbsCva({}), className);
|
|
205
|
+
$[41] = breadcrumbsCva;
|
|
206
|
+
$[42] = className;
|
|
207
|
+
$[43] = t5;
|
|
208
|
+
} else t5 = $[43];
|
|
209
|
+
const t6 = isReady ? "visible" : "hidden";
|
|
210
|
+
let t7;
|
|
211
|
+
if ($[44] !== t6) {
|
|
212
|
+
t7 = { visibility: t6 };
|
|
213
|
+
$[44] = t6;
|
|
214
|
+
$[45] = t7;
|
|
215
|
+
} else t7 = $[45];
|
|
216
|
+
let t8;
|
|
217
|
+
if ($[46] !== breadcrumbChevronCva || $[47] !== breadcrumbSegmentCva || $[48] !== iconOnly || $[49] !== items[0] || $[50] !== renderBreadcrumbLink) {
|
|
218
|
+
t8 = (item_1) => /* @__PURE__ */ jsx(Breadcrumb, {
|
|
219
|
+
id: item_1.id,
|
|
220
|
+
className: breadcrumbSegmentCva({}),
|
|
221
|
+
children: (t9) => {
|
|
222
|
+
const { isCurrent: isCurrent_0 } = t9;
|
|
223
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [renderBreadcrumbLink(item_1, isCurrent_0, iconOnly && item_1 === items[0]), !isCurrent_0 && /* @__PURE__ */ jsx(ChevronRight, { className: breadcrumbChevronCva({}) })] });
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
$[46] = breadcrumbChevronCva;
|
|
227
|
+
$[47] = breadcrumbSegmentCva;
|
|
228
|
+
$[48] = iconOnly;
|
|
229
|
+
$[49] = items[0];
|
|
230
|
+
$[50] = renderBreadcrumbLink;
|
|
231
|
+
$[51] = t8;
|
|
232
|
+
} else t8 = $[51];
|
|
233
|
+
let t9;
|
|
234
|
+
if ($[52] !== items || $[53] !== onAction || $[54] !== t5 || $[55] !== t7 || $[56] !== t8) {
|
|
235
|
+
t9 = /* @__PURE__ */ jsx(Breadcrumbs$1, {
|
|
236
|
+
ref: containerRef,
|
|
237
|
+
items,
|
|
238
|
+
onAction,
|
|
239
|
+
className: t5,
|
|
240
|
+
style: t7,
|
|
241
|
+
children: t8
|
|
242
|
+
});
|
|
243
|
+
$[52] = items;
|
|
244
|
+
$[53] = onAction;
|
|
245
|
+
$[54] = t5;
|
|
246
|
+
$[55] = t7;
|
|
247
|
+
$[56] = t8;
|
|
248
|
+
$[57] = t9;
|
|
249
|
+
} else t9 = $[57];
|
|
250
|
+
return t9;
|
|
251
|
+
};
|
|
252
|
+
function _temp(item_0) {
|
|
253
|
+
return {
|
|
254
|
+
id: item_0.id,
|
|
255
|
+
label: item_0.label,
|
|
256
|
+
link: item_0.link
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
function _temp2(i) {
|
|
260
|
+
return i.label;
|
|
261
|
+
}
|
|
262
|
+
//#endregion
|
|
263
|
+
export { Breadcrumbs };
|