@povio/ui 2.3.3 → 3.0.0-rc.1
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/dist/assets/icons/AlignCenter.js +26 -11
- package/dist/assets/icons/AlignLeft.js +26 -11
- package/dist/assets/icons/AlignLeftRight.js +26 -11
- package/dist/assets/icons/AlignRight.js +26 -11
- package/dist/assets/icons/ArrowDropDown.js +26 -11
- package/dist/assets/icons/ArrowDropUp.js +26 -11
- package/dist/assets/icons/ArrowLeft.js +26 -11
- package/dist/assets/icons/ArrowRight.js +26 -11
- package/dist/assets/icons/Bold.js +26 -11
- package/dist/assets/icons/BulletedList.js +26 -11
- package/dist/assets/icons/Calendar.js +28 -13
- package/dist/assets/icons/Check.js +28 -13
- package/dist/assets/icons/CheckCircle.js +26 -11
- package/dist/assets/icons/CheckboxCheckmark.js +29 -14
- package/dist/assets/icons/CheckboxIndeterminate.js +29 -14
- package/dist/assets/icons/ChevronDown.js +28 -13
- package/dist/assets/icons/ChevronLeft.js +28 -13
- package/dist/assets/icons/ChevronRight.js +28 -13
- package/dist/assets/icons/ChevronUp.js +28 -13
- package/dist/assets/icons/ChevronsLeft.js +28 -13
- package/dist/assets/icons/ChevronsRight.js +28 -13
- package/dist/assets/icons/Clock.js +26 -11
- package/dist/assets/icons/Close.js +26 -11
- package/dist/assets/icons/DateTime.js +35 -14
- package/dist/assets/icons/DragIndicator.js +26 -11
- package/dist/assets/icons/File.js +28 -13
- package/dist/assets/icons/Highlight.js +26 -11
- package/dist/assets/icons/HighlightOn.js +49 -15
- package/dist/assets/icons/Home.js +26 -11
- package/dist/assets/icons/Info.js +37 -16
- package/dist/assets/icons/Italic.js +26 -11
- package/dist/assets/icons/Link.js +26 -11
- package/dist/assets/icons/Menu.js +26 -11
- package/dist/assets/icons/NumberedList.js +26 -11
- package/dist/assets/icons/PointerHorizontal.js +26 -11
- package/dist/assets/icons/PointerVertical.js +26 -11
- package/dist/assets/icons/Search.js +26 -11
- package/dist/assets/icons/Send.js +28 -13
- package/dist/assets/icons/Strikethrough.js +26 -11
- package/dist/assets/icons/TextColor.js +48 -14
- package/dist/assets/icons/Today.js +26 -11
- package/dist/assets/icons/Underlined.js +28 -13
- package/dist/assets/icons/Upload.js +35 -14
- package/dist/assets/icons/Visibility.js +26 -11
- package/dist/assets/icons/VisibilityOff.js +26 -11
- package/dist/assets/icons/WarningFilled.js +28 -13
- package/dist/components/Breadcrumbs/Breadcrumbs.js +215 -64
- package/dist/components/Breadcrumbs/breadcrumbs.cva.d.ts +40 -14
- package/dist/components/Breadcrumbs/breadcrumbs.cva.js +21 -18
- package/dist/components/Menu/Menu.js +18 -2
- package/dist/components/Menu/MenuDesktop.js +41 -7
- package/dist/components/Menu/MenuItem.js +35 -12
- package/dist/components/Menu/MenuMobile.js +103 -44
- package/dist/components/Menu/MenuPopover.js +110 -34
- package/dist/components/Menu/menu.cva.d.ts +35 -13
- package/dist/components/Menu/menu.cva.js +30 -24
- package/dist/components/buttons/Button/Button.js +7 -7
- package/dist/components/buttons/Button/button.cva.d.ts +95 -26
- package/dist/components/buttons/Button/button.cva.js +601 -589
- package/dist/components/buttons/IconButton/IconButton.js +40 -8
- package/dist/components/buttons/InlineIconButton/InlineIconButton.d.ts +2 -1
- package/dist/components/buttons/InlineIconButton/InlineIconButton.js +34 -9
- package/dist/components/buttons/PillButton/PillButton.js +59 -21
- package/dist/components/buttons/PillButton/pillButton.cva.d.ts +33 -9
- package/dist/components/buttons/PillButton/pillButton.cva.js +247 -239
- package/dist/components/buttons/SplitButton/SplitButton.js +103 -18
- package/dist/components/buttons/TextButton/TextButton.js +30 -8
- package/dist/components/buttons/ToggleButton/ToggleButton.js +28 -8
- package/dist/components/buttons/shared/ButtonContent.js +83 -25
- package/dist/components/buttons/shared/buttonContent.cva.d.ts +3 -5
- package/dist/components/buttons/shared/buttonContent.cva.js +1 -8
- package/dist/components/inputs/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/inputs/Checkbox/Checkbox.js +203 -37
- package/dist/components/inputs/Checkbox/CheckboxCheckmark.js +28 -14
- package/dist/components/inputs/Checkbox/checkbox.cva.d.ts +26 -10
- package/dist/components/inputs/Checkbox/checkbox.cva.js +47 -40
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DatePicker/DatePicker.js +371 -75
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.d.ts +12 -5
- package/dist/components/inputs/DateTime/DateRangePicker/DateRangePicker.js +482 -186
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.d.ts +13 -5
- package/dist/components/inputs/DateTime/DateTimePicker/DateTimePicker.js +267 -47
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.d.ts +7 -3
- package/dist/components/inputs/DateTime/TimePicker/TimePicker.js +611 -121
- package/dist/components/inputs/DateTime/shared/Calendar.d.ts +5 -2
- package/dist/components/inputs/DateTime/shared/Calendar.js +338 -119
- package/dist/components/inputs/DateTime/shared/CalendarCell.d.ts +4 -2
- package/dist/components/inputs/DateTime/shared/CalendarCell.js +310 -103
- package/dist/components/inputs/DateTime/shared/CalendarGrid.d.ts +4 -2
- package/dist/components/inputs/DateTime/shared/CalendarGrid.js +150 -33
- package/dist/components/inputs/DateTime/shared/CalendarHeader.js +249 -93
- package/dist/components/inputs/DateTime/shared/CalendarSelectHeader.js +318 -137
- package/dist/components/inputs/DateTime/shared/DateField.js +286 -112
- package/dist/components/inputs/DateTime/shared/DatePickerInput.d.ts +13 -3
- package/dist/components/inputs/DateTime/shared/DatePickerInput.js +387 -143
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.d.ts +15 -0
- package/dist/components/inputs/DateTime/shared/DateSegmentItem.js +96 -11
- package/dist/components/inputs/DateTime/shared/DateTimeDialog.js +84 -30
- package/dist/components/inputs/DateTime/shared/DateTimeDialogFooter.js +59 -10
- package/dist/components/inputs/DateTime/shared/MonthPicker.js +103 -58
- package/dist/components/inputs/DateTime/shared/RangeCalendar.js +193 -82
- package/dist/components/inputs/DateTime/shared/TimeField.js +27 -8
- package/dist/components/inputs/DateTime/shared/TimePickerForm.js +279 -110
- package/dist/components/inputs/DateTime/shared/TimePickerInput.d.ts +4 -1
- package/dist/components/inputs/DateTime/shared/TimePickerInput.js +214 -69
- package/dist/components/inputs/DateTime/shared/YearPicker.js +119 -68
- package/dist/components/inputs/DateTime/shared/datePicker.types.d.ts +5 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.d.ts +27 -0
- package/dist/components/inputs/DateTime/shared/datePickerInput.cva.js +15 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.d.ts +15 -0
- package/dist/components/inputs/DateTime/shared/datePickerTodayIcon.js +32 -0
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.d.ts +2 -0
- package/dist/components/inputs/DateTime/shared/dateSegment.utils.spec.d.ts +1 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.d.ts +40 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.js +85 -0
- package/dist/components/inputs/DateTime/shared/staticDateTimeSegments.spec.d.ts +1 -0
- package/dist/components/inputs/File/FileUpload.js +87 -44
- package/dist/components/inputs/File/FileUploadContainer.js +15 -7
- package/dist/components/inputs/File/InputUpload.js +317 -79
- package/dist/components/inputs/File/shared/FileCard.js +104 -41
- package/dist/components/inputs/File/shared/FileCardList.js +47 -12
- package/dist/components/inputs/File/shared/FileUploadContent.js +175 -44
- package/dist/components/inputs/File/shared/FileUploadContentEmpty.js +149 -46
- package/dist/components/inputs/File/shared/FileUploadContentError.js +234 -93
- package/dist/components/inputs/File/shared/FileUploadContentFilled.js +230 -97
- package/dist/components/inputs/File/shared/FileUploadContentLoading.js +199 -55
- package/dist/components/inputs/File/shared/InputUploadContent.js +151 -37
- package/dist/components/inputs/File/shared/InputUploadFilled.js +51 -10
- package/dist/components/inputs/File/shared/ProgressBar.js +48 -9
- package/dist/components/inputs/File/shared/fileUpload.cva.d.ts +26 -9
- package/dist/components/inputs/File/shared/fileUpload.cva.js +48 -40
- package/dist/components/inputs/File/shared/inputUploadButton.cva.d.ts +23 -6
- package/dist/components/inputs/File/shared/inputUploadButton.cva.js +29 -20
- package/dist/components/inputs/FormField/FormField.d.ts +3 -3
- package/dist/components/inputs/FormField/FormField.js +119 -37
- package/dist/components/inputs/FormField/FormFieldError.js +27 -7
- package/dist/components/inputs/FormField/FormFieldHeader.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldHeader.js +81 -22
- package/dist/components/inputs/FormField/FormFieldHeaderClose.js +31 -7
- package/dist/components/inputs/FormField/FormFieldHelper.js +28 -8
- package/dist/components/inputs/FormField/FormFieldLabel.d.ts +2 -2
- package/dist/components/inputs/FormField/FormFieldLabel.js +46 -15
- package/dist/components/inputs/FormField/formFieldError.cva.d.ts +12 -5
- package/dist/components/inputs/FormField/formFieldError.cva.js +11 -8
- package/dist/components/inputs/FormField/formFieldHeader.cva.d.ts +22 -0
- package/dist/components/inputs/FormField/formFieldHeader.cva.js +13 -0
- package/dist/components/inputs/FormField/formFieldHelper.cva.d.ts +12 -5
- package/dist/components/inputs/FormField/formFieldHelper.cva.js +11 -8
- package/dist/components/inputs/Input/NumberInput/NumberInput.d.ts +5 -2
- package/dist/components/inputs/Input/NumberInput/NumberInput.js +450 -100
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.d.ts +45 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeField.js +571 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.d.ts +35 -0
- package/dist/components/inputs/Input/NumberRangeInput/NumberRangeInput.js +575 -0
- package/dist/components/inputs/Input/PasswordInput/PasswordInput.js +48 -9
- package/dist/components/inputs/Input/TextArea/TextArea.cva.d.ts +12 -0
- package/dist/components/inputs/Input/TextArea/TextArea.cva.js +4 -0
- package/dist/components/inputs/Input/TextArea/TextArea.js +309 -94
- package/dist/components/inputs/Input/TextInput/TextInput.d.ts +3 -1
- package/dist/components/inputs/Input/TextInput/TextInput.js +422 -93
- package/dist/components/inputs/Input/shared/InputContent.js +196 -63
- package/dist/components/inputs/Input/shared/numberStatic.utils.d.ts +1 -0
- package/dist/components/inputs/Input/shared/numberStatic.utils.js +7 -0
- package/dist/components/inputs/Inputs/Form.js +40 -11
- package/dist/components/inputs/Inputs/InputItem.d.ts +15 -21
- package/dist/components/inputs/Inputs/InputItem.js +69 -14
- package/dist/components/inputs/Inputs/Inputs.js +37 -11
- package/dist/components/inputs/RadioGroup/RadioGroup.d.ts +3 -1
- package/dist/components/inputs/RadioGroup/RadioGroup.js +356 -64
- package/dist/components/inputs/RadioGroup/radio.cva.d.ts +101 -6
- package/dist/components/inputs/RadioGroup/radio.cva.js +74 -24
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.d.ts +6 -2
- package/dist/components/inputs/Selection/Autocomplete/Autocomplete.js +214 -22
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts +3 -18
- package/dist/components/inputs/Selection/Autocomplete/QueryAutocomplete.js +104 -8
- package/dist/components/inputs/Selection/Autocomplete/queryAutocomplete.types.d.ts +36 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.d.ts +14 -0
- package/dist/components/inputs/Selection/Select/QuerySelect.js +173 -0
- package/dist/components/inputs/Selection/Select/Select.d.ts +7 -3
- package/dist/components/inputs/Selection/Select/Select.js +225 -18
- package/dist/components/inputs/Selection/shared/SelectBase.d.ts +8 -1
- package/dist/components/inputs/Selection/shared/SelectBase.js +69 -18
- package/dist/components/inputs/Selection/shared/SelectDesktop.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectDesktop.js +396 -141
- package/dist/components/inputs/Selection/shared/SelectInput.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectInput.js +398 -119
- package/dist/components/inputs/Selection/shared/SelectInputTags.js +99 -25
- package/dist/components/inputs/Selection/shared/SelectListBox.d.ts +2 -2
- package/dist/components/inputs/Selection/shared/SelectListBox.js +164 -52
- package/dist/components/inputs/Selection/shared/SelectListBoxItem.js +88 -38
- package/dist/components/inputs/Selection/shared/SelectListBoxItemSelectAll.js +72 -19
- package/dist/components/inputs/Selection/shared/SelectListBoxLoadingItem.js +73 -24
- package/dist/components/inputs/Selection/shared/SelectListBoxSelectionBar.js +58 -9
- package/dist/components/inputs/Selection/shared/SelectMobile.d.ts +1 -1
- package/dist/components/inputs/Selection/shared/SelectMobile.js +9 -3
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.d.ts +9 -0
- package/dist/components/inputs/Selection/shared/StaticSelectTrailingContent.js +47 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.d.ts +12 -0
- package/dist/components/inputs/Selection/shared/querySelect.utils.js +36 -0
- package/dist/components/inputs/Selection/shared/select.context.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/select.context.js +67 -36
- package/dist/components/inputs/Selection/shared/select.types.d.ts +3 -2
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.d.ts +10 -0
- package/dist/components/inputs/Selection/shared/selectDesktop.cva.js +4 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.d.ts +5 -0
- package/dist/components/inputs/Selection/shared/selectInput.cva.js +5 -0
- package/dist/components/inputs/Selection/shared/selectItem.cva.d.ts +16 -6
- package/dist/components/inputs/Selection/shared/selectItem.cva.js +21 -18
- package/dist/components/inputs/Selection/shared/staticSelect.utils.d.ts +23 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.js +37 -0
- package/dist/components/inputs/Selection/shared/staticSelect.utils.spec.d.ts +1 -0
- package/dist/components/inputs/Selection/shared/useSelectItems.js +109 -49
- package/dist/components/inputs/Skeleton/InputFrame.d.ts +82 -0
- package/dist/components/inputs/Skeleton/InputFrame.js +548 -0
- package/dist/components/inputs/Slider/Slider.d.ts +2 -1
- package/dist/components/inputs/Slider/Slider.js +265 -76
- package/dist/components/inputs/TextEditor/TextEditor.d.ts +1 -0
- package/dist/components/inputs/TextEditor/TextEditor.js +450 -101
- package/dist/components/inputs/TextEditor/Toolbar/ColorPicker.js +37 -11
- package/dist/components/inputs/TextEditor/Toolbar/ColorPickerDropdown.js +105 -33
- package/dist/components/inputs/TextEditor/Toolbar/HyperlinkAction.js +194 -45
- package/dist/components/inputs/TextEditor/Toolbar/TextAlignSelect.js +88 -28
- package/dist/components/inputs/TextEditor/Toolbar/TextColorSelect.js +48 -14
- package/dist/components/inputs/TextEditor/Toolbar/TextEditorToolbar.js +66 -19
- package/dist/components/inputs/TextEditor/Toolbar/TextHighlightSelect.js +49 -15
- package/dist/components/inputs/TextEditor/Toolbar/TextListActions.js +92 -32
- package/dist/components/inputs/TextEditor/Toolbar/TextMarksActions.js +126 -54
- package/dist/components/inputs/TextEditor/Toolbar/TextStyleSelect.js +141 -38
- package/dist/components/inputs/Toggle/Toggle.d.ts +1 -0
- package/dist/components/inputs/Toggle/Toggle.js +217 -40
- package/dist/components/inputs/Toggle/toggle.cva.d.ts +15 -6
- package/dist/components/inputs/Toggle/toggle.cva.js +25 -21
- package/dist/components/inputs/shared/CheckContent.d.ts +2 -1
- package/dist/components/inputs/shared/CheckContent.js +23 -13
- package/dist/components/inputs/shared/InputClear.d.ts +2 -1
- package/dist/components/inputs/shared/InputClear.js +88 -12
- package/dist/components/inputs/shared/TooltipWrapper.js +50 -11
- package/dist/components/inputs/shared/input.cva.d.ts +137 -16
- package/dist/components/inputs/shared/input.cva.js +317 -273
- package/dist/components/inputs/shared/label.cva.d.ts +15 -6
- package/dist/components/inputs/shared/label.cva.js +28 -25
- package/dist/components/inputs/shared/tooltipWrapper.cva.d.ts +12 -0
- package/dist/components/inputs/shared/tooltipWrapper.cva.js +4 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.d.ts +14 -0
- package/dist/components/inputs/shared/useStaticInputHandoff.js +100 -0
- package/dist/components/navigation/Accordion/Accordion.js +71 -24
- package/dist/components/navigation/Accordion/AccordionItem.js +97 -52
- package/dist/components/navigation/Accordion/accordion.cva.d.ts +109 -44
- package/dist/components/navigation/Accordion/accordion.cva.js +114 -84
- package/dist/components/navigation/Stepper/Stepper.js +69 -24
- package/dist/components/navigation/Stepper/StepperItem.js +112 -39
- package/dist/components/navigation/Stepper/StepperSeparator.js +25 -7
- package/dist/components/navigation/Stepper/stepper.cva.d.ts +86 -30
- package/dist/components/navigation/Stepper/stepper.cva.js +104 -83
- package/dist/components/overlays/ActionModal/ActionModal.js +169 -35
- package/dist/components/overlays/BottomSheet/BottomSheet.js +96 -23
- package/dist/components/overlays/BottomSheet/BottomSheetHeader.js +48 -8
- package/dist/components/overlays/Drawer/Drawer.js +62 -20
- package/dist/components/overlays/Modal/Modal.js +5 -5
- package/dist/components/overlays/Modal/modal.cva.d.ts +34 -9
- package/dist/components/overlays/Modal/modal.cva.js +38 -27
- package/dist/components/overlays/ResponsivePopover/ResponsivePopover.js +86 -30
- package/dist/components/overlays/Tooltip/Tooltip.js +143 -34
- package/dist/components/overlays/Tooltip/TooltipEllipsis.js +37 -12
- package/dist/components/overlays/Tooltip/tooltip.cva.d.ts +45 -17
- package/dist/components/overlays/Tooltip/tooltip.cva.js +38 -26
- package/dist/components/segment/Segment.js +221 -60
- package/dist/components/segment/SegmentItem.js +70 -13
- package/dist/components/segment/segment.cva.d.ts +18 -7
- package/dist/components/segment/segment.cva.js +24 -21
- package/dist/components/shared/pagination/Pagination.js +108 -22
- package/dist/components/shared/pagination/PaginationList.js +167 -64
- package/dist/components/shared/popover.cva.d.ts +7 -3
- package/dist/components/shared/popover.cva.js +3 -3
- package/dist/components/status/Alert/Alert.js +103 -36
- package/dist/components/status/Alert/alert.cva.d.ts +18 -6
- package/dist/components/status/Alert/alert.cva.js +60 -57
- package/dist/components/status/Loader/Loader.js +77 -22
- package/dist/components/status/Loader/loader.cva.d.ts +23 -4
- package/dist/components/status/Loader/loader.cva.js +22 -13
- package/dist/components/status/Toast/Toast.js +27 -20
- package/dist/components/status/Toast/toast.cva.d.ts +61 -10
- package/dist/components/status/Toast/toast.cva.js +129 -64
- package/dist/components/status/Toast/useToast.js +62 -57
- package/dist/components/status/shared/status.cva.d.ts +30 -8
- package/dist/components/status/shared/status.cva.js +56 -50
- package/dist/components/table/CellText.js +3 -3
- package/dist/components/table/ColumnConfig.js +158 -54
- package/dist/components/table/HeaderText.js +3 -3
- package/dist/components/table/InfiniteTable.js +67 -16
- package/dist/components/table/PaginatedTable.js +84 -18
- package/dist/components/table/Table.js +34 -33
- package/dist/components/table/table.cva.d.ts +52 -19
- package/dist/components/table/table.cva.js +44 -35
- package/dist/components/text/Link/Link.js +22 -10
- package/dist/components/text/Link/link.cva.d.ts +11 -5
- package/dist/components/text/Link/link.cva.js +8 -5
- package/dist/components/text/Tag/Tag.js +3 -3
- package/dist/components/text/Tag/tag.cva.d.ts +15 -5
- package/dist/components/text/Tag/tag.cva.js +51 -48
- package/dist/components/text/Typography/Typography.js +25 -10
- package/dist/components/text/Typography/typography.cva.d.ts +93 -7
- package/dist/components/text/Typography/typography.cva.js +126 -122
- package/dist/config/confirmation.context.js +1 -1
- package/dist/config/link.context.js +23 -9
- package/dist/config/router.context.js +42 -16
- package/dist/config/theme.context.js +98 -45
- package/dist/config/uiConfig.context.d.ts +20 -6
- package/dist/config/uiConfig.context.js +68 -14
- package/dist/config/uiOverrides.context.d.ts +192 -0
- package/dist/config/uiOverrides.context.js +113 -0
- package/dist/helpers/dynamicInputs.d.ts +5 -5
- package/dist/helpers/dynamicInputs.js +3 -0
- package/dist/hooks/useAutosave.d.ts +2 -1
- package/dist/hooks/useAutosave.js +12 -4
- package/dist/hooks/useAutosave.spec.d.ts +1 -0
- package/dist/hooks/useBreakpoint.js +16 -3
- package/dist/hooks/useDebounceCallback.js +51 -17
- package/dist/hooks/useFilters.js +125 -64
- package/dist/hooks/useForm.js +42 -8
- package/dist/hooks/useFormAutosave.d.ts +3 -1
- package/dist/hooks/useFormAutosave.js +122 -30
- package/dist/hooks/useFormAutosave.spec.d.ts +1 -0
- package/dist/hooks/useIntersectionObserver.d.ts +1 -1
- package/dist/hooks/useIntersectionObserver.js +91 -24
- package/dist/hooks/useKeyInteractions.d.ts +20 -0
- package/dist/hooks/useKeyInteractions.js +54 -0
- package/dist/hooks/useKeyInteractions.spec.d.ts +1 -0
- package/dist/hooks/useLocalStorage.js +43 -10
- package/dist/hooks/useLongPressRepeat.js +55 -20
- package/dist/hooks/usePagination.js +49 -19
- package/dist/hooks/useQueryAutocomplete.d.ts +14 -0
- package/dist/hooks/useQueryAutocomplete.js +57 -0
- package/dist/hooks/useScrollableListBox.js +37 -16
- package/dist/hooks/useSorting.js +69 -28
- package/dist/hooks/useStateAndRef.js +21 -7
- package/dist/hooks/useTableColumnConfig.js +124 -31
- package/dist/hooks/useTranslationMemo.js +25 -5
- package/dist/index.d.ts +37 -1
- package/dist/index.js +34 -3
- package/dist/tw-ui-plugin.js +6 -0
- package/dist/utils/date-time.utils.d.ts +38 -10
- package/dist/utils/date-time.utils.js +136 -22
- package/dist/utils/query.utils.d.ts +4 -0
- package/dist/utils/query.utils.js +8 -0
- package/dist/utils/style-merge.util.d.ts +43 -0
- package/dist/utils/style-merge.util.js +233 -0
- package/dist/utils/style-merge.util.spec.d.ts +1 -0
- package/package.json +1 -1
- package/dist/config/uiStyle.context.d.ts +0 -162
- package/dist/config/uiStyle.context.js +0 -30
|
@@ -2,16 +2,31 @@ import { Typography } from "../../text/Typography/Typography.js";
|
|
|
2
2
|
import "../../../config/i18n.js";
|
|
3
3
|
import { NumberInput } from "../../inputs/Input/NumberInput/NumberInput.js";
|
|
4
4
|
import { PaginationList } from "./PaginationList.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { clsx } from "clsx";
|
|
7
8
|
import { useTranslation } from "react-i18next";
|
|
8
9
|
//#region src/components/shared/pagination/Pagination.tsx
|
|
9
|
-
var Pagination = (
|
|
10
|
+
var Pagination = (t0) => {
|
|
11
|
+
const $ = c(34);
|
|
12
|
+
const { size: t1, variant: t2, color: t3, page, totalItems, totalPages, pageSize, hideText: t4, hideFirstLast: t5, hidePrevNext: t6, hideNumbers: t7, className, onPageChange, onPageSizeChange } = t0;
|
|
13
|
+
const size = t1 === void 0 ? "s" : t1;
|
|
14
|
+
const variant = t2 === void 0 ? "subtle" : t2;
|
|
15
|
+
const color = t3 === void 0 ? "secondary" : t3;
|
|
16
|
+
const hideText = t4 === void 0 ? true : t4;
|
|
17
|
+
const hideFirstLast = t5 === void 0 ? true : t5;
|
|
18
|
+
const hidePrevNext = t6 === void 0 ? false : t6;
|
|
19
|
+
const hideNumbers = t7 === void 0 ? false : t7;
|
|
10
20
|
const { t } = useTranslation("ui");
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
21
|
+
let t8;
|
|
22
|
+
if ($[0] !== className) {
|
|
23
|
+
t8 = clsx("flex items-center gap-2", className);
|
|
24
|
+
$[0] = className;
|
|
25
|
+
$[1] = t8;
|
|
26
|
+
} else t8 = $[1];
|
|
27
|
+
let t9;
|
|
28
|
+
if ($[2] !== color || $[3] !== hideFirstLast || $[4] !== hideNumbers || $[5] !== hidePrevNext || $[6] !== hideText || $[7] !== onPageChange || $[8] !== page || $[9] !== pageSize || $[10] !== size || $[11] !== totalItems || $[12] !== totalPages || $[13] !== variant) {
|
|
29
|
+
t9 = totalItems > pageSize && /* @__PURE__ */ jsx(PaginationList, {
|
|
15
30
|
page,
|
|
16
31
|
size,
|
|
17
32
|
color,
|
|
@@ -22,24 +37,95 @@ var Pagination = ({ size = "s", variant = "subtle", color = "secondary", page, t
|
|
|
22
37
|
hideNumbers,
|
|
23
38
|
totalPages: totalPages ?? Math.ceil(totalItems / pageSize),
|
|
24
39
|
onPageChange
|
|
25
|
-
})
|
|
40
|
+
});
|
|
41
|
+
$[2] = color;
|
|
42
|
+
$[3] = hideFirstLast;
|
|
43
|
+
$[4] = hideNumbers;
|
|
44
|
+
$[5] = hidePrevNext;
|
|
45
|
+
$[6] = hideText;
|
|
46
|
+
$[7] = onPageChange;
|
|
47
|
+
$[8] = page;
|
|
48
|
+
$[9] = pageSize;
|
|
49
|
+
$[10] = size;
|
|
50
|
+
$[11] = totalItems;
|
|
51
|
+
$[12] = totalPages;
|
|
52
|
+
$[13] = variant;
|
|
53
|
+
$[14] = t9;
|
|
54
|
+
} else t9 = $[14];
|
|
55
|
+
let t10;
|
|
56
|
+
if ($[15] !== t) {
|
|
57
|
+
t10 = t(_temp);
|
|
58
|
+
$[15] = t;
|
|
59
|
+
$[16] = t10;
|
|
60
|
+
} else t10 = $[16];
|
|
61
|
+
let t11;
|
|
62
|
+
if ($[17] !== t10) {
|
|
63
|
+
t11 = /* @__PURE__ */ jsx(Typography, {
|
|
64
|
+
variant: "default",
|
|
65
|
+
size: "label-2",
|
|
66
|
+
as: "span",
|
|
67
|
+
className: "whitespace-nowrap text-text-default-1",
|
|
68
|
+
children: t10
|
|
69
|
+
});
|
|
70
|
+
$[17] = t10;
|
|
71
|
+
$[18] = t11;
|
|
72
|
+
} else t11 = $[18];
|
|
73
|
+
let t12;
|
|
74
|
+
if ($[19] !== onPageSizeChange) {
|
|
75
|
+
t12 = (value) => onPageSizeChange?.(Number(value));
|
|
76
|
+
$[19] = onPageSizeChange;
|
|
77
|
+
$[20] = t12;
|
|
78
|
+
} else t12 = $[20];
|
|
79
|
+
let t13;
|
|
80
|
+
if ($[21] !== t) {
|
|
81
|
+
t13 = t(_temp2);
|
|
82
|
+
$[21] = t;
|
|
83
|
+
$[22] = t13;
|
|
84
|
+
} else t13 = $[22];
|
|
85
|
+
let t14;
|
|
86
|
+
if ($[23] !== pageSize || $[24] !== t12 || $[25] !== t13) {
|
|
87
|
+
t14 = /* @__PURE__ */ jsx(NumberInput, {
|
|
88
|
+
value: pageSize,
|
|
89
|
+
onChange: t12,
|
|
90
|
+
label: t13,
|
|
91
|
+
hideLabel: true,
|
|
92
|
+
className: "w-min",
|
|
93
|
+
inputClassName: "min-w-12 !px-3 !py-0-5"
|
|
94
|
+
});
|
|
95
|
+
$[23] = pageSize;
|
|
96
|
+
$[24] = t12;
|
|
97
|
+
$[25] = t13;
|
|
98
|
+
$[26] = t14;
|
|
99
|
+
} else t14 = $[26];
|
|
100
|
+
let t15;
|
|
101
|
+
if ($[27] !== t11 || $[28] !== t14) {
|
|
102
|
+
t15 = /* @__PURE__ */ jsxs("div", {
|
|
26
103
|
className: "flex items-center gap-2",
|
|
27
|
-
children: [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
104
|
+
children: [t11, t14]
|
|
105
|
+
});
|
|
106
|
+
$[27] = t11;
|
|
107
|
+
$[28] = t14;
|
|
108
|
+
$[29] = t15;
|
|
109
|
+
} else t15 = $[29];
|
|
110
|
+
let t16;
|
|
111
|
+
if ($[30] !== t15 || $[31] !== t8 || $[32] !== t9) {
|
|
112
|
+
t16 = /* @__PURE__ */ jsxs("nav", {
|
|
113
|
+
id: "pagination",
|
|
114
|
+
className: t8,
|
|
115
|
+
children: [t9, t15]
|
|
116
|
+
});
|
|
117
|
+
$[30] = t15;
|
|
118
|
+
$[31] = t8;
|
|
119
|
+
$[32] = t9;
|
|
120
|
+
$[33] = t16;
|
|
121
|
+
} else t16 = $[33];
|
|
122
|
+
return t16;
|
|
43
123
|
};
|
|
124
|
+
function _temp($) {
|
|
125
|
+
return $.ui.pagination.resultsPerPage;
|
|
126
|
+
}
|
|
127
|
+
function _temp2($_0) {
|
|
128
|
+
return $_0.ui.pagination.resultsPerPage;
|
|
129
|
+
}
|
|
44
130
|
//#endregion
|
|
45
131
|
export { Pagination };
|
|
@@ -5,23 +5,26 @@ import { ChevronsRightIcon } from "../../../assets/icons/ChevronsRight.js";
|
|
|
5
5
|
import { Button } from "../../buttons/Button/Button.js";
|
|
6
6
|
import "../../../config/i18n.js";
|
|
7
7
|
import { minWidth } from "./minWidth.cva.js";
|
|
8
|
+
import { c } from "react/compiler-runtime";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
10
|
import { clsx } from "clsx";
|
|
10
|
-
import { useMemo } from "react";
|
|
11
11
|
import { useTranslation } from "react-i18next";
|
|
12
12
|
//#region src/components/shared/pagination/PaginationList.tsx
|
|
13
|
-
var PaginationList = (
|
|
13
|
+
var PaginationList = (t0) => {
|
|
14
|
+
const $ = c(61);
|
|
15
|
+
const { page, totalPages, size, color, variant, hideText, hideFirstLast, hidePrevNext, hideNumbers, className, onPageChange } = t0;
|
|
14
16
|
const { t } = useTranslation("ui");
|
|
15
17
|
const isPrevDisabled = page <= 1;
|
|
16
18
|
const isNextDisabled = page >= totalPages;
|
|
17
|
-
|
|
19
|
+
let t1;
|
|
20
|
+
if ($[0] !== color || $[1] !== onPageChange || $[2] !== page || $[3] !== size || $[4] !== totalPages || $[5] !== variant) {
|
|
18
21
|
const pagesToShow = [];
|
|
19
22
|
pagesToShow.push(1);
|
|
20
23
|
if (page > 3) pagesToShow.push("ellipsis");
|
|
21
24
|
for (let i = Math.max(2, page - 1); i <= Math.min(totalPages - 1, page + 1); i++) pagesToShow.push(i);
|
|
22
25
|
if (page < totalPages - 2) pagesToShow.push("ellipsis");
|
|
23
26
|
if (totalPages > 1 && !pagesToShow.includes(totalPages)) pagesToShow.push(totalPages);
|
|
24
|
-
|
|
27
|
+
t1 = pagesToShow.map((p, index) => {
|
|
25
28
|
if (p === "ellipsis") return /* @__PURE__ */ jsx(Button, {
|
|
26
29
|
variant,
|
|
27
30
|
color,
|
|
@@ -41,67 +44,167 @@ var PaginationList = ({ page, totalPages, size, color, variant, hideText, hideFi
|
|
|
41
44
|
children: p.toString()
|
|
42
45
|
}, `page-${p}`);
|
|
43
46
|
});
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
size
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
]
|
|
47
|
+
$[0] = color;
|
|
48
|
+
$[1] = onPageChange;
|
|
49
|
+
$[2] = page;
|
|
50
|
+
$[3] = size;
|
|
51
|
+
$[4] = totalPages;
|
|
52
|
+
$[5] = variant;
|
|
53
|
+
$[6] = t1;
|
|
54
|
+
} else t1 = $[6];
|
|
55
|
+
const renderPageNumbers = t1;
|
|
52
56
|
if (totalPages <= 1) return null;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
57
|
+
let t2;
|
|
58
|
+
if ($[7] !== isNextDisabled || $[8] !== onPageChange || $[9] !== page) {
|
|
59
|
+
t2 = () => {
|
|
60
|
+
if (!isNextDisabled) onPageChange?.(page + 1);
|
|
61
|
+
};
|
|
62
|
+
$[7] = isNextDisabled;
|
|
63
|
+
$[8] = onPageChange;
|
|
64
|
+
$[9] = page;
|
|
65
|
+
$[10] = t2;
|
|
66
|
+
} else t2 = $[10];
|
|
67
|
+
const onNext = t2;
|
|
68
|
+
let t3;
|
|
69
|
+
if ($[11] !== isPrevDisabled || $[12] !== onPageChange || $[13] !== page) {
|
|
70
|
+
t3 = () => {
|
|
71
|
+
if (!isPrevDisabled) onPageChange?.(page - 1);
|
|
72
|
+
};
|
|
73
|
+
$[11] = isPrevDisabled;
|
|
74
|
+
$[12] = onPageChange;
|
|
75
|
+
$[13] = page;
|
|
76
|
+
$[14] = t3;
|
|
77
|
+
} else t3 = $[14];
|
|
78
|
+
const onPrevious = t3;
|
|
79
|
+
let t4;
|
|
80
|
+
if ($[15] !== className) {
|
|
81
|
+
t4 = clsx("flex items-center gap-pagination-button-to-button", className);
|
|
82
|
+
$[15] = className;
|
|
83
|
+
$[16] = t4;
|
|
84
|
+
} else t4 = $[16];
|
|
85
|
+
let t5;
|
|
86
|
+
if ($[17] !== color || $[18] !== hideFirstLast || $[19] !== hideText || $[20] !== isPrevDisabled || $[21] !== onPageChange || $[22] !== size || $[23] !== t || $[24] !== variant) {
|
|
87
|
+
t5 = !hideFirstLast && /* @__PURE__ */ jsx(Button, {
|
|
88
|
+
onClick: () => onPageChange?.(1),
|
|
89
|
+
isDisabled: isPrevDisabled,
|
|
90
|
+
size,
|
|
91
|
+
color,
|
|
92
|
+
variant,
|
|
93
|
+
iconOnly: hideText,
|
|
94
|
+
icon: ChevronsLeftIcon,
|
|
95
|
+
children: t(_temp)
|
|
96
|
+
});
|
|
97
|
+
$[17] = color;
|
|
98
|
+
$[18] = hideFirstLast;
|
|
99
|
+
$[19] = hideText;
|
|
100
|
+
$[20] = isPrevDisabled;
|
|
101
|
+
$[21] = onPageChange;
|
|
102
|
+
$[22] = size;
|
|
103
|
+
$[23] = t;
|
|
104
|
+
$[24] = variant;
|
|
105
|
+
$[25] = t5;
|
|
106
|
+
} else t5 = $[25];
|
|
107
|
+
let t6;
|
|
108
|
+
if ($[26] !== color || $[27] !== hidePrevNext || $[28] !== hideText || $[29] !== isPrevDisabled || $[30] !== onPrevious || $[31] !== size || $[32] !== t || $[33] !== variant) {
|
|
109
|
+
t6 = !hidePrevNext && /* @__PURE__ */ jsx(Button, {
|
|
110
|
+
onClick: onPrevious,
|
|
111
|
+
isDisabled: isPrevDisabled,
|
|
112
|
+
size,
|
|
113
|
+
color,
|
|
114
|
+
variant,
|
|
115
|
+
iconOnly: hideText,
|
|
116
|
+
icon: ChevronLeftIcon,
|
|
117
|
+
children: t(_temp2)
|
|
118
|
+
});
|
|
119
|
+
$[26] = color;
|
|
120
|
+
$[27] = hidePrevNext;
|
|
121
|
+
$[28] = hideText;
|
|
122
|
+
$[29] = isPrevDisabled;
|
|
123
|
+
$[30] = onPrevious;
|
|
124
|
+
$[31] = size;
|
|
125
|
+
$[32] = t;
|
|
126
|
+
$[33] = variant;
|
|
127
|
+
$[34] = t6;
|
|
128
|
+
} else t6 = $[34];
|
|
129
|
+
const t7 = !hideNumbers && renderPageNumbers;
|
|
130
|
+
let t8;
|
|
131
|
+
if ($[35] !== color || $[36] !== hidePrevNext || $[37] !== hideText || $[38] !== isNextDisabled || $[39] !== onNext || $[40] !== size || $[41] !== t || $[42] !== variant) {
|
|
132
|
+
t8 = !hidePrevNext && /* @__PURE__ */ jsx(Button, {
|
|
133
|
+
onClick: onNext,
|
|
134
|
+
isDisabled: isNextDisabled,
|
|
135
|
+
size,
|
|
136
|
+
color,
|
|
137
|
+
variant,
|
|
138
|
+
iconOnly: hideText,
|
|
139
|
+
icon: ChevronRightIcon,
|
|
140
|
+
children: t(_temp3)
|
|
141
|
+
});
|
|
142
|
+
$[35] = color;
|
|
143
|
+
$[36] = hidePrevNext;
|
|
144
|
+
$[37] = hideText;
|
|
145
|
+
$[38] = isNextDisabled;
|
|
146
|
+
$[39] = onNext;
|
|
147
|
+
$[40] = size;
|
|
148
|
+
$[41] = t;
|
|
149
|
+
$[42] = variant;
|
|
150
|
+
$[43] = t8;
|
|
151
|
+
} else t8 = $[43];
|
|
152
|
+
let t9;
|
|
153
|
+
if ($[44] !== color || $[45] !== hideFirstLast || $[46] !== hideText || $[47] !== isNextDisabled || $[48] !== onPageChange || $[49] !== size || $[50] !== t || $[51] !== totalPages || $[52] !== variant) {
|
|
154
|
+
t9 = !hideFirstLast && /* @__PURE__ */ jsx(Button, {
|
|
155
|
+
onClick: () => onPageChange?.(totalPages),
|
|
156
|
+
isDisabled: isNextDisabled,
|
|
157
|
+
size,
|
|
158
|
+
color,
|
|
159
|
+
variant,
|
|
160
|
+
iconOnly: hideText,
|
|
161
|
+
icon: ChevronsRightIcon,
|
|
162
|
+
children: t(_temp4)
|
|
163
|
+
});
|
|
164
|
+
$[44] = color;
|
|
165
|
+
$[45] = hideFirstLast;
|
|
166
|
+
$[46] = hideText;
|
|
167
|
+
$[47] = isNextDisabled;
|
|
168
|
+
$[48] = onPageChange;
|
|
169
|
+
$[49] = size;
|
|
170
|
+
$[50] = t;
|
|
171
|
+
$[51] = totalPages;
|
|
172
|
+
$[52] = variant;
|
|
173
|
+
$[53] = t9;
|
|
174
|
+
} else t9 = $[53];
|
|
175
|
+
let t10;
|
|
176
|
+
if ($[54] !== t4 || $[55] !== t5 || $[56] !== t6 || $[57] !== t7 || $[58] !== t8 || $[59] !== t9) {
|
|
177
|
+
t10 = /* @__PURE__ */ jsxs("nav", {
|
|
178
|
+
className: t4,
|
|
179
|
+
children: [
|
|
180
|
+
t5,
|
|
181
|
+
t6,
|
|
182
|
+
t7,
|
|
183
|
+
t8,
|
|
184
|
+
t9
|
|
185
|
+
]
|
|
186
|
+
});
|
|
187
|
+
$[54] = t4;
|
|
188
|
+
$[55] = t5;
|
|
189
|
+
$[56] = t6;
|
|
190
|
+
$[57] = t7;
|
|
191
|
+
$[58] = t8;
|
|
192
|
+
$[59] = t9;
|
|
193
|
+
$[60] = t10;
|
|
194
|
+
} else t10 = $[60];
|
|
195
|
+
return t10;
|
|
105
196
|
};
|
|
197
|
+
function _temp($) {
|
|
198
|
+
return $.ui.pagination.firstBtn;
|
|
199
|
+
}
|
|
200
|
+
function _temp2($_0) {
|
|
201
|
+
return $_0.ui.pagination.backBtn;
|
|
202
|
+
}
|
|
203
|
+
function _temp3($_1) {
|
|
204
|
+
return $_1.ui.pagination.nextBtn;
|
|
205
|
+
}
|
|
206
|
+
function _temp4($_2) {
|
|
207
|
+
return $_2.ui.pagination.lastBtn;
|
|
208
|
+
}
|
|
106
209
|
//#endregion
|
|
107
210
|
export { PaginationList };
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
1
|
+
import { UIOverrides } from '../../config/uiOverrides.context';
|
|
2
|
+
export declare const popoverDefinition: {
|
|
3
|
+
base: string[];
|
|
4
|
+
config?: import("../../utils/style-merge.util").StyleMergeUtils.Config<Record<never, never>>;
|
|
5
|
+
};
|
|
6
|
+
export type PopoverConfig = NonNullable<typeof popoverDefinition.config>;
|
|
7
|
+
export interface PopoverVariantProps extends UIOverrides.VariantProps<PopoverConfig> {
|
|
4
8
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../config/uiOverrides.context.js";
|
|
2
2
|
//#region src/components/shared/popover.cva.ts
|
|
3
|
-
var
|
|
3
|
+
var popoverDefinition = UIOverrides.defineConfig({ base: ["rounded-list-rounding-dropdown border border-elevation-outline-default-1 border-solid bg-elevation-fill-default-1 shadow-5 outline-none"] });
|
|
4
4
|
//#endregion
|
|
5
|
-
export {
|
|
5
|
+
export { popoverDefinition };
|
|
@@ -1,47 +1,114 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
import { Typography } from "../../text/Typography/Typography.js";
|
|
3
3
|
import { Loader } from "../Loader/Loader.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { alertDefinition } from "./alert.cva.js";
|
|
5
|
+
import { statusIconDefinition, statusSeparatorDefinition } from "../shared/status.cva.js";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
6
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
//#region src/components/status/Alert/Alert.tsx
|
|
8
|
-
var Alert = (
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
var 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({
|
|
14
19
|
variant,
|
|
15
20
|
color,
|
|
16
21
|
className
|
|
17
|
-
})
|
|
18
|
-
|
|
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", {
|
|
19
94
|
className: "flex w-auto flex-col items-center md:flex-row",
|
|
20
|
-
children: [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
variant,
|
|
38
|
-
color
|
|
39
|
-
}) }), /* @__PURE__ */ jsx("div", {
|
|
40
|
-
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",
|
|
41
|
-
children: rightContent
|
|
42
|
-
})] })]
|
|
43
|
-
})
|
|
44
|
-
});
|
|
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;
|
|
45
112
|
};
|
|
46
113
|
//#endregion
|
|
47
114
|
export { Alert };
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { UIOverrides } from '../../../config/uiOverrides.context';
|
|
2
|
+
export declare const alertDefinition: {
|
|
3
|
+
base: string[];
|
|
4
|
+
config: import("../../../utils/style-merge.util").StyleMergeUtils.Config<{
|
|
5
|
+
readonly variant: {
|
|
6
|
+
readonly outlined: "border bg-elevation-fill-default-1 text-text-default-1";
|
|
7
|
+
readonly contained: "text-text-inverted-1";
|
|
8
|
+
};
|
|
9
|
+
readonly color: {
|
|
10
|
+
readonly neutral: "";
|
|
11
|
+
readonly success: "";
|
|
12
|
+
readonly warning: "";
|
|
13
|
+
readonly error: "";
|
|
14
|
+
};
|
|
15
|
+
}>;
|
|
16
|
+
};
|
|
17
|
+
export type AlertConfig = NonNullable<typeof alertDefinition.config>;
|
|
18
|
+
export interface AlertVariantProps extends UIOverrides.VariantProps<AlertConfig> {
|
|
7
19
|
}
|