@povio/ui 2.3.2 → 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/assets/locales/sl/translation.json.js +2 -2
- 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 +596 -218
- 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
|
@@ -1,95 +1,116 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UIOverrides } from "../../../config/uiOverrides.context.js";
|
|
2
2
|
//#region src/components/navigation/Stepper/stepper.cva.ts
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
var stepperDefinition = UIOverrides.defineConfig({
|
|
4
|
+
base: [""],
|
|
5
|
+
config: {
|
|
6
|
+
variants: { orientation: {
|
|
7
|
+
horizontal: "flex flex-row items-center gap-stepper-gap-step-to-line-horizontal",
|
|
8
|
+
vertical: "inline-flex flex-col gap-stepper-gap-step-to-line-vertical"
|
|
9
|
+
} },
|
|
10
|
+
defaultVariants: { orientation: "horizontal" }
|
|
11
|
+
}
|
|
9
12
|
});
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
var stepperItemDefinition = UIOverrides.defineConfig({
|
|
14
|
+
base: ["flex shrink-0"],
|
|
15
|
+
config: {
|
|
16
|
+
variants: { contentOrientation: {
|
|
17
|
+
horizontal: "flex-row items-center gap-stepper-gap-icon-to-text-horizontal text-left",
|
|
18
|
+
vertical: "flex-col items-center gap-stepper-gap-icon-to-text-vertical text-center"
|
|
19
|
+
} },
|
|
20
|
+
defaultVariants: { contentOrientation: "horizontal" }
|
|
21
|
+
}
|
|
16
22
|
});
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
var stepperIconDefinition = UIOverrides.defineConfig({
|
|
24
|
+
base: ["inline-flex size-5 shrink-0 items-center justify-center rounded-stepper-rounding-icon"],
|
|
25
|
+
config: {
|
|
26
|
+
variants: { status: {
|
|
27
|
+
completed: [
|
|
28
|
+
"border border-interactive-outlined-primary-outline-idle border-solid bg-interactive-contained-primary-idle",
|
|
29
|
+
"group-hover:border-interactive-outlined-primary-outline-hover group-hover:bg-interactive-contained-primary-hover",
|
|
30
|
+
"group-pressed:border-interactive-outlined-primary-outline-pressed group-pressed:bg-interactive-contained-primary-pressed"
|
|
31
|
+
],
|
|
32
|
+
active: "border border-interactive-outlined-primary-on-idle border-solid bg-interactive-outlined-primary-idle",
|
|
33
|
+
todo: "border border-interactive-outlined-primary-outline-disabled border-solid bg-interactive-outlined-primary-disabled"
|
|
34
|
+
} },
|
|
35
|
+
defaultVariants: { status: "todo" }
|
|
36
|
+
}
|
|
28
37
|
});
|
|
29
|
-
var
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
var stepperNumberDefinition = UIOverrides.defineConfig({
|
|
39
|
+
base: ["text-center align-middle"],
|
|
40
|
+
config: {
|
|
41
|
+
variants: { status: {
|
|
42
|
+
completed: "",
|
|
43
|
+
active: "text-interactive-outlined-primary-on-idle",
|
|
44
|
+
todo: "text-interactive-outlined-primary-on-disabled"
|
|
45
|
+
} },
|
|
46
|
+
defaultVariants: { status: "todo" }
|
|
47
|
+
}
|
|
36
48
|
});
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
var stepperTitleDefinition = UIOverrides.defineConfig({
|
|
50
|
+
base: [""],
|
|
51
|
+
config: {
|
|
52
|
+
variants: { status: {
|
|
53
|
+
completed: [
|
|
54
|
+
"text-interactive-text-secondary-idle",
|
|
55
|
+
"group-hover:text-interactive-text-secondary-hover",
|
|
56
|
+
"group-pressed:text-interactive-text-secondary-pressed"
|
|
57
|
+
],
|
|
58
|
+
active: "text-interactive-text-primary-idle",
|
|
59
|
+
todo: "text-interactive-text-secondary-disabled"
|
|
60
|
+
} },
|
|
61
|
+
defaultVariants: { status: "todo" }
|
|
62
|
+
}
|
|
48
63
|
});
|
|
49
|
-
var
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
64
|
+
var stepperSubtextDefinition = UIOverrides.defineConfig({
|
|
65
|
+
base: [""],
|
|
66
|
+
config: {
|
|
67
|
+
variants: { status: {
|
|
68
|
+
completed: [
|
|
69
|
+
"text-interactive-text-secondary-idle",
|
|
70
|
+
"group-hover:text-interactive-text-secondary-hover",
|
|
71
|
+
"group-pressed:text-interactive-text-secondary-pressed"
|
|
72
|
+
],
|
|
73
|
+
active: "text-interactive-text-secondary-idle",
|
|
74
|
+
todo: "text-interactive-text-secondary-disabled"
|
|
75
|
+
} },
|
|
76
|
+
defaultVariants: { status: "todo" }
|
|
77
|
+
}
|
|
60
78
|
});
|
|
61
|
-
var
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
79
|
+
var stepperSeparatorDefinition = UIOverrides.defineConfig({
|
|
80
|
+
base: ["bg-elevation-outline-default-1"],
|
|
81
|
+
config: {
|
|
82
|
+
variants: {
|
|
83
|
+
orientation: {
|
|
84
|
+
horizontal: "h-px min-w-4 flex-1",
|
|
85
|
+
vertical: "min-h-16 w-px"
|
|
86
|
+
},
|
|
87
|
+
contentOrientation: {
|
|
88
|
+
horizontal: "",
|
|
89
|
+
vertical: ""
|
|
90
|
+
}
|
|
66
91
|
},
|
|
67
|
-
|
|
68
|
-
horizontal: "",
|
|
69
|
-
vertical: ""
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
defaultVariants: {
|
|
73
|
-
orientation: "horizontal",
|
|
74
|
-
contentOrientation: "horizontal"
|
|
75
|
-
},
|
|
76
|
-
compoundVariants: [
|
|
77
|
-
{
|
|
92
|
+
defaultVariants: {
|
|
78
93
|
orientation: "horizontal",
|
|
79
|
-
contentOrientation: "
|
|
80
|
-
className: "mt-stepper-horizontal-line-top self-start"
|
|
94
|
+
contentOrientation: "horizontal"
|
|
81
95
|
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
96
|
+
compoundVariants: [
|
|
97
|
+
{
|
|
98
|
+
orientation: "horizontal",
|
|
99
|
+
contentOrientation: "vertical",
|
|
100
|
+
className: "mt-stepper-horizontal-line-top self-start"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
orientation: "vertical",
|
|
104
|
+
contentOrientation: "vertical",
|
|
105
|
+
className: "self-center"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
orientation: "vertical",
|
|
109
|
+
contentOrientation: "horizontal",
|
|
110
|
+
className: "ml-stepper-vertical-line-side"
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}
|
|
93
114
|
});
|
|
94
115
|
//#endregion
|
|
95
|
-
export {
|
|
116
|
+
export { stepperDefinition, stepperIconDefinition, stepperItemDefinition, stepperNumberDefinition, stepperSeparatorDefinition, stepperSubtextDefinition, stepperTitleDefinition };
|
|
@@ -2,6 +2,7 @@ import { Typography } from "../../text/Typography/Typography.js";
|
|
|
2
2
|
import { UIConfig } from "../../../config/uiConfig.context.js";
|
|
3
3
|
import { Button } from "../../buttons/Button/Button.js";
|
|
4
4
|
import { Modal } from "../Modal/Modal.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { clsx } from "clsx";
|
|
7
8
|
//#region src/components/overlays/ActionModal/ActionModal.tsx
|
|
@@ -10,45 +11,178 @@ var textAlignClassMap = {
|
|
|
10
11
|
center: "text-center",
|
|
11
12
|
right: "text-right"
|
|
12
13
|
};
|
|
13
|
-
var ActionModal = (
|
|
14
|
+
var ActionModal = (t0) => {
|
|
15
|
+
const $ = c(52);
|
|
16
|
+
let description;
|
|
17
|
+
let descriptionClassName;
|
|
18
|
+
let descriptionTypography;
|
|
19
|
+
let heading;
|
|
20
|
+
let modalClassName;
|
|
21
|
+
let modalProps;
|
|
22
|
+
let primaryAction;
|
|
23
|
+
let secondaryAction;
|
|
24
|
+
let t1;
|
|
25
|
+
let t2;
|
|
26
|
+
let titleClassName;
|
|
27
|
+
let titleTypography;
|
|
28
|
+
if ($[0] !== t0) {
|
|
29
|
+
({heading, description, primaryAction, secondaryAction, buttonSize: t1, textAlign: t2, modalClassName, titleTypography, titleClassName, descriptionTypography, descriptionClassName, ...modalProps} = t0);
|
|
30
|
+
$[0] = t0;
|
|
31
|
+
$[1] = description;
|
|
32
|
+
$[2] = descriptionClassName;
|
|
33
|
+
$[3] = descriptionTypography;
|
|
34
|
+
$[4] = heading;
|
|
35
|
+
$[5] = modalClassName;
|
|
36
|
+
$[6] = modalProps;
|
|
37
|
+
$[7] = primaryAction;
|
|
38
|
+
$[8] = secondaryAction;
|
|
39
|
+
$[9] = t1;
|
|
40
|
+
$[10] = t2;
|
|
41
|
+
$[11] = titleClassName;
|
|
42
|
+
$[12] = titleTypography;
|
|
43
|
+
} else {
|
|
44
|
+
description = $[1];
|
|
45
|
+
descriptionClassName = $[2];
|
|
46
|
+
descriptionTypography = $[3];
|
|
47
|
+
heading = $[4];
|
|
48
|
+
modalClassName = $[5];
|
|
49
|
+
modalProps = $[6];
|
|
50
|
+
primaryAction = $[7];
|
|
51
|
+
secondaryAction = $[8];
|
|
52
|
+
t1 = $[9];
|
|
53
|
+
t2 = $[10];
|
|
54
|
+
titleClassName = $[11];
|
|
55
|
+
titleTypography = $[12];
|
|
56
|
+
}
|
|
57
|
+
const buttonSize = t1 === void 0 ? "m" : t1;
|
|
58
|
+
const textAlign = t2 === void 0 ? "left" : t2;
|
|
14
59
|
const ui = UIConfig.useConfig();
|
|
15
60
|
const textAlignClass = textAlignClassMap[textAlign];
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
61
|
+
let t3;
|
|
62
|
+
if ($[13] !== modalClassName) {
|
|
63
|
+
t3 = clsx("w-modal", modalClassName);
|
|
64
|
+
$[13] = modalClassName;
|
|
65
|
+
$[14] = t3;
|
|
66
|
+
} else t3 = $[14];
|
|
67
|
+
const t4 = titleTypography ?? ui.actionModal.titleTypography;
|
|
68
|
+
let t5;
|
|
69
|
+
if ($[15] !== textAlignClass || $[16] !== titleClassName) {
|
|
70
|
+
t5 = clsx("text-text-default-1", textAlignClass, titleClassName);
|
|
71
|
+
$[15] = textAlignClass;
|
|
72
|
+
$[16] = titleClassName;
|
|
73
|
+
$[17] = t5;
|
|
74
|
+
} else t5 = $[17];
|
|
75
|
+
let t6;
|
|
76
|
+
if ($[18] !== heading || $[19] !== t4 || $[20] !== t5) {
|
|
77
|
+
t6 = /* @__PURE__ */ jsx(Typography, {
|
|
78
|
+
...t4,
|
|
79
|
+
as: "h2",
|
|
80
|
+
className: t5,
|
|
81
|
+
children: heading
|
|
82
|
+
});
|
|
83
|
+
$[18] = heading;
|
|
84
|
+
$[19] = t4;
|
|
85
|
+
$[20] = t5;
|
|
86
|
+
$[21] = t6;
|
|
87
|
+
} else t6 = $[21];
|
|
88
|
+
const t7 = descriptionTypography ?? ui.actionModal.descriptionTypography;
|
|
89
|
+
let t8;
|
|
90
|
+
if ($[22] !== descriptionClassName || $[23] !== textAlignClass) {
|
|
91
|
+
t8 = clsx("text-text-default-1", textAlignClass, descriptionClassName);
|
|
92
|
+
$[22] = descriptionClassName;
|
|
93
|
+
$[23] = textAlignClass;
|
|
94
|
+
$[24] = t8;
|
|
95
|
+
} else t8 = $[24];
|
|
96
|
+
let t9;
|
|
97
|
+
if ($[25] !== description || $[26] !== t7 || $[27] !== t8) {
|
|
98
|
+
t9 = /* @__PURE__ */ jsx(Typography, {
|
|
99
|
+
...t7,
|
|
100
|
+
className: t8,
|
|
101
|
+
children: description
|
|
102
|
+
});
|
|
103
|
+
$[25] = description;
|
|
104
|
+
$[26] = t7;
|
|
105
|
+
$[27] = t8;
|
|
106
|
+
$[28] = t9;
|
|
107
|
+
} else t9 = $[28];
|
|
108
|
+
let t10;
|
|
109
|
+
if ($[29] !== t6 || $[30] !== t9) {
|
|
110
|
+
t10 = /* @__PURE__ */ jsxs("div", {
|
|
20
111
|
className: "flex flex-col gap-modal-gap-text",
|
|
21
|
-
children: [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
112
|
+
children: [t6, t9]
|
|
113
|
+
});
|
|
114
|
+
$[29] = t6;
|
|
115
|
+
$[30] = t9;
|
|
116
|
+
$[31] = t10;
|
|
117
|
+
} else t10 = $[31];
|
|
118
|
+
let t11;
|
|
119
|
+
if ($[32] !== buttonSize || $[33] !== secondaryAction) {
|
|
120
|
+
t11 = secondaryAction && /* @__PURE__ */ jsx(Button, {
|
|
121
|
+
variant: secondaryAction?.variant ?? "contained",
|
|
122
|
+
size: buttonSize,
|
|
123
|
+
color: secondaryAction?.color ?? "secondary",
|
|
124
|
+
width: "fill",
|
|
125
|
+
onPress: secondaryAction?.onPress,
|
|
126
|
+
className: clsx("min-w-40 flex-1 shrink-0", secondaryAction?.className),
|
|
127
|
+
children: secondaryAction?.label
|
|
128
|
+
});
|
|
129
|
+
$[32] = buttonSize;
|
|
130
|
+
$[33] = secondaryAction;
|
|
131
|
+
$[34] = t11;
|
|
132
|
+
} else t11 = $[34];
|
|
133
|
+
const t12 = primaryAction?.variant ?? "contained";
|
|
134
|
+
const t13 = primaryAction?.color ?? "primary";
|
|
135
|
+
const t14 = primaryAction.onPress;
|
|
136
|
+
const t15 = primaryAction?.className;
|
|
137
|
+
let t16;
|
|
138
|
+
if ($[35] !== t15) {
|
|
139
|
+
t16 = clsx("min-w-40 flex-1 shrink-0", t15);
|
|
140
|
+
$[35] = t15;
|
|
141
|
+
$[36] = t16;
|
|
142
|
+
} else t16 = $[36];
|
|
143
|
+
let t17;
|
|
144
|
+
if ($[37] !== buttonSize || $[38] !== primaryAction.label || $[39] !== primaryAction.onPress || $[40] !== t12 || $[41] !== t13 || $[42] !== t16) {
|
|
145
|
+
t17 = /* @__PURE__ */ jsx(Button, {
|
|
146
|
+
variant: t12,
|
|
147
|
+
size: buttonSize,
|
|
148
|
+
color: t13,
|
|
149
|
+
width: "fill",
|
|
150
|
+
onPress: t14,
|
|
151
|
+
className: t16,
|
|
152
|
+
children: primaryAction.label
|
|
153
|
+
});
|
|
154
|
+
$[37] = buttonSize;
|
|
155
|
+
$[38] = primaryAction.label;
|
|
156
|
+
$[39] = primaryAction.onPress;
|
|
157
|
+
$[40] = t12;
|
|
158
|
+
$[41] = t13;
|
|
159
|
+
$[42] = t16;
|
|
160
|
+
$[43] = t17;
|
|
161
|
+
} else t17 = $[43];
|
|
162
|
+
let t18;
|
|
163
|
+
if ($[44] !== t11 || $[45] !== t17) {
|
|
164
|
+
t18 = /* @__PURE__ */ jsxs("div", {
|
|
32
165
|
className: "flex w-full flex-wrap gap-modal-gap-buttons pt-1",
|
|
33
|
-
children: [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
166
|
+
children: [t11, t17]
|
|
167
|
+
});
|
|
168
|
+
$[44] = t11;
|
|
169
|
+
$[45] = t17;
|
|
170
|
+
$[46] = t18;
|
|
171
|
+
} else t18 = $[46];
|
|
172
|
+
let t19;
|
|
173
|
+
if ($[47] !== modalProps || $[48] !== t10 || $[49] !== t18 || $[50] !== t3) {
|
|
174
|
+
t19 = /* @__PURE__ */ jsxs(Modal, {
|
|
175
|
+
modalClassName: t3,
|
|
176
|
+
...modalProps,
|
|
177
|
+
children: [t10, t18]
|
|
178
|
+
});
|
|
179
|
+
$[47] = modalProps;
|
|
180
|
+
$[48] = t10;
|
|
181
|
+
$[49] = t18;
|
|
182
|
+
$[50] = t3;
|
|
183
|
+
$[51] = t19;
|
|
184
|
+
} else t19 = $[51];
|
|
185
|
+
return t19;
|
|
52
186
|
};
|
|
53
187
|
//#endregion
|
|
54
188
|
export { ActionModal };
|
|
@@ -2,6 +2,7 @@ import { UIConfig } from "../../../config/uiConfig.context.js";
|
|
|
2
2
|
import { BottomSheetHeader } from "./BottomSheetHeader.js";
|
|
3
3
|
import { useStateAndRef } from "../../../hooks/useStateAndRef.js";
|
|
4
4
|
import { DomUtils } from "../../../utils/dom.utils.js";
|
|
5
|
+
import { c } from "react/compiler-runtime";
|
|
5
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { clsx } from "clsx";
|
|
7
8
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
@@ -127,8 +128,8 @@ var BottomSheetBase = ({ isOpen, onOpenChange, onStateChange, isDismissable = tr
|
|
|
127
128
|
onAnimationComplete: (data) => {
|
|
128
129
|
onStateChange?.(data.y === 0 ? "opened" : "closed");
|
|
129
130
|
},
|
|
130
|
-
onAnimationStart: (
|
|
131
|
-
onStateChange?.(
|
|
131
|
+
onAnimationStart: (data_0) => {
|
|
132
|
+
onStateChange?.(data_0.y === 0 ? "opening" : "closing");
|
|
132
133
|
},
|
|
133
134
|
transition: staticTransition,
|
|
134
135
|
style: {
|
|
@@ -220,36 +221,108 @@ var BottomSheetBase = ({ isOpen, onOpenChange, onStateChange, isDismissable = tr
|
|
|
220
221
|
})]
|
|
221
222
|
}) });
|
|
222
223
|
};
|
|
223
|
-
var BottomSheet = (
|
|
224
|
+
var BottomSheet = (t0) => {
|
|
225
|
+
const $ = c(30);
|
|
226
|
+
let children;
|
|
227
|
+
let isOpen;
|
|
228
|
+
let onOpenChange;
|
|
229
|
+
let portalContainerRef;
|
|
230
|
+
let rest;
|
|
231
|
+
let trigger;
|
|
232
|
+
if ($[0] !== t0) {
|
|
233
|
+
({isOpen, portalContainerRef, onOpenChange, trigger, children, ...rest} = t0);
|
|
234
|
+
$[0] = t0;
|
|
235
|
+
$[1] = children;
|
|
236
|
+
$[2] = isOpen;
|
|
237
|
+
$[3] = onOpenChange;
|
|
238
|
+
$[4] = portalContainerRef;
|
|
239
|
+
$[5] = rest;
|
|
240
|
+
$[6] = trigger;
|
|
241
|
+
} else {
|
|
242
|
+
children = $[1];
|
|
243
|
+
isOpen = $[2];
|
|
244
|
+
onOpenChange = $[3];
|
|
245
|
+
portalContainerRef = $[4];
|
|
246
|
+
rest = $[5];
|
|
247
|
+
trigger = $[6];
|
|
248
|
+
}
|
|
224
249
|
const [isSheetOpen, setIsSheetOpen] = useState(!!isOpen);
|
|
225
250
|
const hasTrigger = !!trigger;
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
setIsSheetOpen(open);
|
|
232
|
-
onOpenChange?.(open);
|
|
251
|
+
let t1;
|
|
252
|
+
let t2;
|
|
253
|
+
if ($[7] !== hasTrigger || $[8] !== isOpen) {
|
|
254
|
+
t1 = () => {
|
|
255
|
+
if (hasTrigger) setIsSheetOpen(!!isOpen);
|
|
233
256
|
};
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
257
|
+
t2 = [isOpen, hasTrigger];
|
|
258
|
+
$[7] = hasTrigger;
|
|
259
|
+
$[8] = isOpen;
|
|
260
|
+
$[9] = t1;
|
|
261
|
+
$[10] = t2;
|
|
262
|
+
} else {
|
|
263
|
+
t1 = $[9];
|
|
264
|
+
t2 = $[10];
|
|
265
|
+
}
|
|
266
|
+
useEffect(t1, t2);
|
|
267
|
+
if (trigger) {
|
|
268
|
+
let t3;
|
|
269
|
+
if ($[11] !== onOpenChange) {
|
|
270
|
+
t3 = (open) => {
|
|
271
|
+
setIsSheetOpen(open);
|
|
272
|
+
onOpenChange?.(open);
|
|
273
|
+
};
|
|
274
|
+
$[11] = onOpenChange;
|
|
275
|
+
$[12] = t3;
|
|
276
|
+
} else t3 = $[12];
|
|
277
|
+
const handleOpenChange = t3;
|
|
278
|
+
let t4;
|
|
279
|
+
if ($[13] !== children || $[14] !== handleOpenChange || $[15] !== isSheetOpen || $[16] !== portalContainerRef || $[17] !== rest) {
|
|
280
|
+
t4 = /* @__PURE__ */ jsx(BottomSheetBase, {
|
|
238
281
|
isOpen: isSheetOpen,
|
|
239
282
|
onOpenChange: handleOpenChange,
|
|
240
283
|
portalContainerRef,
|
|
241
284
|
...rest,
|
|
242
285
|
children
|
|
243
|
-
})
|
|
244
|
-
|
|
286
|
+
});
|
|
287
|
+
$[13] = children;
|
|
288
|
+
$[14] = handleOpenChange;
|
|
289
|
+
$[15] = isSheetOpen;
|
|
290
|
+
$[16] = portalContainerRef;
|
|
291
|
+
$[17] = rest;
|
|
292
|
+
$[18] = t4;
|
|
293
|
+
} else t4 = $[18];
|
|
294
|
+
let t5;
|
|
295
|
+
if ($[19] !== handleOpenChange || $[20] !== isSheetOpen || $[21] !== t4 || $[22] !== trigger) {
|
|
296
|
+
t5 = /* @__PURE__ */ jsxs(DialogTrigger, {
|
|
297
|
+
isOpen: isSheetOpen,
|
|
298
|
+
onOpenChange: handleOpenChange,
|
|
299
|
+
children: [trigger, t4]
|
|
300
|
+
});
|
|
301
|
+
$[19] = handleOpenChange;
|
|
302
|
+
$[20] = isSheetOpen;
|
|
303
|
+
$[21] = t4;
|
|
304
|
+
$[22] = trigger;
|
|
305
|
+
$[23] = t5;
|
|
306
|
+
} else t5 = $[23];
|
|
307
|
+
return t5;
|
|
245
308
|
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
309
|
+
let t3;
|
|
310
|
+
if ($[24] !== children || $[25] !== isOpen || $[26] !== onOpenChange || $[27] !== portalContainerRef || $[28] !== rest) {
|
|
311
|
+
t3 = /* @__PURE__ */ jsx(BottomSheetBase, {
|
|
312
|
+
isOpen,
|
|
313
|
+
onOpenChange,
|
|
314
|
+
portalContainerRef,
|
|
315
|
+
...rest,
|
|
316
|
+
children
|
|
317
|
+
});
|
|
318
|
+
$[24] = children;
|
|
319
|
+
$[25] = isOpen;
|
|
320
|
+
$[26] = onOpenChange;
|
|
321
|
+
$[27] = portalContainerRef;
|
|
322
|
+
$[28] = rest;
|
|
323
|
+
$[29] = t3;
|
|
324
|
+
} else t3 = $[29];
|
|
325
|
+
return t3;
|
|
253
326
|
};
|
|
254
327
|
//#endregion
|
|
255
328
|
export { BottomSheet };
|
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
import { CloseIcon } from "../../../assets/icons/Close.js";
|
|
2
2
|
import { Typography } from "../../text/Typography/Typography.js";
|
|
3
3
|
import "../../../config/i18n.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { clsx } from "clsx";
|
|
6
7
|
import { Button } from "react-aria-components";
|
|
7
8
|
import { useTranslation } from "react-i18next";
|
|
8
9
|
//#region src/components/overlays/BottomSheet/BottomSheetHeader.tsx
|
|
9
|
-
var BottomSheetHeader = (
|
|
10
|
+
var BottomSheetHeader = (t0) => {
|
|
11
|
+
const $ = c(17);
|
|
12
|
+
const { label, dragControls, isDismissable, hideThumb, hideHeader, headerTypography, onClose } = t0;
|
|
10
13
|
const { t } = useTranslation("ui");
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
const t1 = !isDismissable && "pt-list-height-title-top";
|
|
15
|
+
let t2;
|
|
16
|
+
if ($[0] !== t1) {
|
|
17
|
+
t2 = clsx("pb-list-height-title-bottom", t1);
|
|
18
|
+
$[0] = t1;
|
|
19
|
+
$[1] = t2;
|
|
20
|
+
} else t2 = $[1];
|
|
21
|
+
let t3;
|
|
22
|
+
if ($[2] !== dragControls || $[3] !== hideThumb || $[4] !== isDismissable) {
|
|
23
|
+
t3 = isDismissable && !hideThumb && /* @__PURE__ */ jsx("div", {
|
|
14
24
|
className: "flex shrink-0 cursor-grab touch-none justify-center px-list-side-title pt-list-height-title-top pb-2-5",
|
|
15
25
|
onPointerDown: (e) => {
|
|
16
26
|
e.preventDefault();
|
|
@@ -18,7 +28,15 @@ var BottomSheetHeader = ({ label, dragControls, isDismissable, hideThumb, hideHe
|
|
|
18
28
|
},
|
|
19
29
|
"aria-hidden": true,
|
|
20
30
|
children: /* @__PURE__ */ jsx("div", { className: "h-1 w-16 shrink-0 rounded-full bg-elevation-fill-default-3" })
|
|
21
|
-
})
|
|
31
|
+
});
|
|
32
|
+
$[2] = dragControls;
|
|
33
|
+
$[3] = hideThumb;
|
|
34
|
+
$[4] = isDismissable;
|
|
35
|
+
$[5] = t3;
|
|
36
|
+
} else t3 = $[5];
|
|
37
|
+
let t4;
|
|
38
|
+
if ($[6] !== headerTypography || $[7] !== hideHeader || $[8] !== isDismissable || $[9] !== label || $[10] !== onClose || $[11] !== t) {
|
|
39
|
+
t4 = !hideHeader && /* @__PURE__ */ jsxs("div", {
|
|
22
40
|
className: "flex justify-between px-list-side-title",
|
|
23
41
|
children: [/* @__PURE__ */ jsx(Typography, {
|
|
24
42
|
size: "label-2",
|
|
@@ -27,12 +45,34 @@ var BottomSheetHeader = ({ label, dragControls, isDismissable, hideThumb, hideHe
|
|
|
27
45
|
children: label
|
|
28
46
|
}), onClose && isDismissable && /* @__PURE__ */ jsx(Button, {
|
|
29
47
|
onPress: onClose,
|
|
30
|
-
"aria-label": t(
|
|
48
|
+
"aria-label": t(_temp),
|
|
31
49
|
className: "-m-2 shrink-0 p-2 text-interactive-text-secondary-idle focus-visible:outline-interactive-text-secondary-focus",
|
|
32
50
|
children: /* @__PURE__ */ jsx(CloseIcon, { className: "size-6" })
|
|
33
51
|
})]
|
|
34
|
-
})
|
|
35
|
-
|
|
52
|
+
});
|
|
53
|
+
$[6] = headerTypography;
|
|
54
|
+
$[7] = hideHeader;
|
|
55
|
+
$[8] = isDismissable;
|
|
56
|
+
$[9] = label;
|
|
57
|
+
$[10] = onClose;
|
|
58
|
+
$[11] = t;
|
|
59
|
+
$[12] = t4;
|
|
60
|
+
} else t4 = $[12];
|
|
61
|
+
let t5;
|
|
62
|
+
if ($[13] !== t2 || $[14] !== t3 || $[15] !== t4) {
|
|
63
|
+
t5 = /* @__PURE__ */ jsxs("div", {
|
|
64
|
+
className: t2,
|
|
65
|
+
children: [t3, t4]
|
|
66
|
+
});
|
|
67
|
+
$[13] = t2;
|
|
68
|
+
$[14] = t3;
|
|
69
|
+
$[15] = t4;
|
|
70
|
+
$[16] = t5;
|
|
71
|
+
} else t5 = $[16];
|
|
72
|
+
return t5;
|
|
36
73
|
};
|
|
74
|
+
function _temp($) {
|
|
75
|
+
return $.ui.closeAlt;
|
|
76
|
+
}
|
|
37
77
|
//#endregion
|
|
38
78
|
export { BottomSheetHeader };
|