@itwin/itwinui-react 3.17.0-dev.1 → 3.17.0
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/CHANGELOG.md +48 -0
- package/DEV-cjs/core/Alert/Alert.js +4 -2
- package/DEV-cjs/core/Avatar/Avatar.js +4 -2
- package/DEV-cjs/core/AvatarGroup/AvatarGroup.js +4 -2
- package/DEV-cjs/core/Backdrop/Backdrop.js +4 -2
- package/DEV-cjs/core/Badge/Badge.js +4 -2
- package/DEV-cjs/core/Breadcrumbs/Breadcrumbs.js +4 -2
- package/DEV-cjs/core/ButtonGroup/ButtonGroup.js +6 -6
- package/DEV-cjs/core/Buttons/Button.js +4 -2
- package/DEV-cjs/core/Buttons/DropdownButton.js +4 -2
- package/DEV-cjs/core/Buttons/IconButton.js +4 -2
- package/DEV-cjs/core/Buttons/IdeasButton.js +4 -2
- package/DEV-cjs/core/Buttons/SplitButton.js +4 -2
- package/DEV-cjs/core/Carousel/Carousel.js +4 -2
- package/DEV-cjs/core/Carousel/CarouselContext.js +1 -1
- package/DEV-cjs/core/Carousel/CarouselDot.js +4 -2
- package/DEV-cjs/core/Carousel/CarouselDotsList.js +4 -2
- package/DEV-cjs/core/Carousel/CarouselNavigation.js +4 -2
- package/DEV-cjs/core/Carousel/CarouselSlide.js +5 -3
- package/DEV-cjs/core/Carousel/CarouselSlider.js +5 -3
- package/DEV-cjs/core/Checkbox/Checkbox.js +7 -4
- package/DEV-cjs/core/ColorPicker/ColorBuilder.js +5 -3
- package/DEV-cjs/core/ColorPicker/ColorInputPanel.js +4 -2
- package/DEV-cjs/core/ColorPicker/ColorPalette.js +4 -2
- package/DEV-cjs/core/ColorPicker/ColorPicker.js +4 -2
- package/DEV-cjs/core/ColorPicker/ColorPickerContext.js +1 -1
- package/DEV-cjs/core/ColorPicker/ColorSwatch.js +4 -2
- package/DEV-cjs/core/ComboBox/ComboBox.js +1 -1
- package/DEV-cjs/core/ComboBox/ComboBoxEndIcon.js +4 -2
- package/DEV-cjs/core/ComboBox/ComboBoxInput.js +1 -1
- package/DEV-cjs/core/ComboBox/ComboBoxInputContainer.js +1 -1
- package/DEV-cjs/core/ComboBox/ComboBoxMenu.js +4 -2
- package/DEV-cjs/core/ComboBox/ComboBoxMenuItem.js +1 -1
- package/DEV-cjs/core/ComboBox/ComboBoxMultipleContainer.js +1 -1
- package/DEV-cjs/core/ComboBox/helpers.js +1 -1
- package/DEV-cjs/core/DatePicker/DatePicker.js +4 -2
- package/DEV-cjs/core/Dialog/Dialog.js +39 -44
- package/DEV-cjs/core/Dialog/DialogBackdrop.js +10 -3
- package/DEV-cjs/core/Dialog/DialogContext.js +1 -1
- package/DEV-cjs/core/Dialog/DialogDragContext.js +1 -1
- package/DEV-cjs/core/Dialog/DialogMain.js +46 -36
- package/DEV-cjs/core/Dialog/DialogMainContext.js +23 -0
- package/DEV-cjs/core/Dialog/DialogTitleBar.js +14 -3
- package/DEV-cjs/core/Divider/Divider.js +4 -2
- package/DEV-cjs/core/DropdownMenu/DropdownMenu.js +1 -1
- package/DEV-cjs/core/ExpandableBlock/ExpandableBlock.js +4 -2
- package/DEV-cjs/core/Fieldset/Fieldset.js +4 -2
- package/DEV-cjs/core/FileUpload/FileEmptyCard.js +4 -2
- package/DEV-cjs/core/FileUpload/FileUpload.js +4 -2
- package/DEV-cjs/core/FileUpload/FileUploadCard.js +4 -2
- package/DEV-cjs/core/FileUpload/FileUploadTemplate.js +4 -2
- package/DEV-cjs/core/Flex/Flex.js +4 -2
- package/DEV-cjs/core/Footer/Footer.js +4 -2
- package/DEV-cjs/core/Header/Header.js +4 -2
- package/DEV-cjs/core/Header/HeaderBasicButton.js +4 -2
- package/DEV-cjs/core/Header/HeaderBreadcrumbs.js +4 -2
- package/DEV-cjs/core/Header/HeaderButton.js +1 -1
- package/DEV-cjs/core/Header/HeaderDropdownButton.js +1 -1
- package/DEV-cjs/core/Header/HeaderLogo.js +4 -2
- package/DEV-cjs/core/Header/HeaderSplitButton.js +4 -2
- package/DEV-cjs/core/Icon/Icon.js +4 -2
- package/DEV-cjs/core/InformationPanel/InformationPanel.js +4 -2
- package/DEV-cjs/core/InformationPanel/InformationPanelContent.js +4 -2
- package/DEV-cjs/core/InformationPanel/InformationPanelHeader.js +4 -2
- package/DEV-cjs/core/Input/Input.js +4 -2
- package/DEV-cjs/core/InputGrid/InputGrid.js +4 -2
- package/DEV-cjs/core/InputGroup/InputGroup.js +4 -2
- package/DEV-cjs/core/InputWithDecorations/InputWithDecorations.js +1 -1
- package/DEV-cjs/core/Label/Label.js +5 -3
- package/DEV-cjs/core/LabeledInput/LabeledInput.js +4 -2
- package/DEV-cjs/core/LabeledSelect/LabeledSelect.js +1 -1
- package/DEV-cjs/core/LabeledTextarea/LabeledTextarea.js +1 -1
- package/DEV-cjs/core/LinkAction/LinkAction.js +4 -2
- package/DEV-cjs/core/List/List.js +23 -2
- package/DEV-cjs/core/List/ListItem.js +4 -2
- package/DEV-cjs/core/Menu/Menu.js +4 -2
- package/DEV-cjs/core/Menu/MenuItem.js +4 -2
- package/DEV-cjs/core/Menu/MenuItemSkeleton.js +4 -2
- package/DEV-cjs/core/Modal/Modal.js +1 -1
- package/DEV-cjs/core/NonIdealState/ErrorPage.js +10 -10
- package/DEV-cjs/core/NonIdealState/NonIdealState.js +4 -2
- package/DEV-cjs/core/NotificationMarker/NotificationMarker.js +4 -2
- package/DEV-cjs/core/Overlay/Overlay.js +2 -2
- package/DEV-cjs/core/Panels/Panels.js +9 -5
- package/DEV-cjs/core/Panels/helpers.js +1 -1
- package/DEV-cjs/core/Popover/Popover.js +5 -3
- package/DEV-cjs/core/ProgressIndicators/ProgressLinear.js +4 -2
- package/DEV-cjs/core/ProgressIndicators/ProgressRadial.js +4 -2
- package/DEV-cjs/core/Radio/Radio.js +4 -2
- package/DEV-cjs/core/RadioTiles/RadioTile.js +4 -2
- package/DEV-cjs/core/RadioTiles/RadioTileGroup.js +4 -2
- package/DEV-cjs/core/SearchBox/SearchBox.js +4 -2
- package/DEV-cjs/core/Select/Select.js +4 -2
- package/DEV-cjs/core/Select/SelectTag.js +4 -2
- package/DEV-cjs/core/Select/SelectTagContainer.js +4 -2
- package/DEV-cjs/core/SideNavigation/SideNavigation.js +45 -45
- package/DEV-cjs/core/SideNavigation/SidenavButton.js +4 -2
- package/DEV-cjs/core/SideNavigation/SidenavSubmenu.js +4 -2
- package/DEV-cjs/core/SideNavigation/SidenavSubmenuHeader.js +4 -2
- package/DEV-cjs/core/SkipToContentLink/SkipToContentLink.js +4 -2
- package/DEV-cjs/core/Slider/Slider.js +49 -39
- package/DEV-cjs/core/Slider/Thumb.js +4 -2
- package/DEV-cjs/core/Slider/Track.js +4 -2
- package/DEV-cjs/core/StatusMessage/StatusMessage.js +4 -2
- package/DEV-cjs/core/Stepper/Stepper.js +35 -25
- package/DEV-cjs/core/Stepper/StepperStep.js +4 -2
- package/DEV-cjs/core/Stepper/WorkflowDiagram.js +4 -2
- package/DEV-cjs/core/Stepper/WorkflowDiagramStep.js +4 -2
- package/DEV-cjs/core/Surface/Surface.js +4 -2
- package/DEV-cjs/core/Table/ColumnHeader.js +4 -2
- package/DEV-cjs/core/Table/SubRowExpander.js +1 -1
- package/DEV-cjs/core/Table/Table.js +9 -4
- package/DEV-cjs/core/Table/TableCell.js +4 -2
- package/DEV-cjs/core/Table/TableExpandableContentMemoized.js +4 -2
- package/DEV-cjs/core/Table/TablePaginator.js +4 -2
- package/DEV-cjs/core/Table/TableRowMemoized.js +5 -2
- package/DEV-cjs/core/Table/actionHandlers/selectHandler.js +7 -8
- package/DEV-cjs/core/Table/cells/DefaultCell.js +21 -6
- package/DEV-cjs/core/Table/cells/EditableCell.js +4 -2
- package/DEV-cjs/core/Table/columns/actionColumn.js +1 -1
- package/DEV-cjs/core/Table/columns/expanderColumn.js +1 -1
- package/DEV-cjs/core/Table/columns/selectionColumn.js +1 -1
- package/DEV-cjs/core/Table/filters/BaseFilter.js +4 -2
- package/DEV-cjs/core/Table/filters/DateRangeFilter/DatePickerInput.js +1 -1
- package/DEV-cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +1 -1
- package/DEV-cjs/core/Table/filters/FilterButtonBar.js +4 -2
- package/DEV-cjs/core/Table/filters/FilterToggle.js +4 -2
- package/DEV-cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +1 -1
- package/DEV-cjs/core/Table/filters/TextFilter/TextFilter.js +1 -1
- package/DEV-cjs/core/Table/filters/defaultFilterFunctions.js +6 -5
- package/DEV-cjs/core/Table/filters/tableFilters.js +1 -1
- package/DEV-cjs/core/Table/hooks/useExpanderCell.js +1 -1
- package/DEV-cjs/core/Table/hooks/useResizeColumns.js +6 -4
- package/DEV-cjs/core/Table/hooks/useScrollToRow.js +1 -1
- package/DEV-cjs/core/Table/hooks/useSubRowFiltering.js +1 -1
- package/DEV-cjs/core/Table/hooks/useSubRowSelection.js +1 -1
- package/DEV-cjs/core/Table/utils.js +1 -1
- package/DEV-cjs/core/Tabs/Tabs.js +15 -5
- package/DEV-cjs/core/Tag/Tag.js +4 -2
- package/DEV-cjs/core/Tag/TagContainer.js +4 -2
- package/DEV-cjs/core/Textarea/Textarea.js +1 -1
- package/DEV-cjs/core/ThemeProvider/ThemeContext.js +1 -1
- package/DEV-cjs/core/ThemeProvider/ThemeProvider.js +12 -7
- package/DEV-cjs/core/Tile/Tile.js +4 -2
- package/DEV-cjs/core/TimePicker/TimePicker.js +4 -2
- package/DEV-cjs/core/Toast/Toast.js +136 -79
- package/DEV-cjs/core/Toast/Toaster.js +15 -5
- package/DEV-cjs/core/ToggleSwitch/ToggleSwitch.js +4 -2
- package/DEV-cjs/core/Tooltip/Tooltip.js +21 -12
- package/DEV-cjs/core/TransferList/TransferList.js +4 -2
- package/DEV-cjs/core/Tree/Tree.js +1 -1
- package/DEV-cjs/core/Tree/TreeContext.js +1 -1
- package/DEV-cjs/core/Tree/TreeNode.js +4 -2
- package/DEV-cjs/core/Tree/TreeNodeExpander.js +4 -2
- package/DEV-cjs/core/Typography/Anchor.js +4 -2
- package/DEV-cjs/core/Typography/Blockquote.js +4 -2
- package/DEV-cjs/core/Typography/Kbd.js +4 -2
- package/DEV-cjs/core/Typography/Text.js +4 -2
- package/DEV-cjs/core/VisuallyHidden/VisuallyHidden.js +5 -3
- package/DEV-cjs/react-table/react-table.types-test.js +2 -2
- package/DEV-cjs/styles.js +1 -1
- package/DEV-cjs/utils/components/AutoclearingHiddenLiveRegion.js +1 -1
- package/DEV-cjs/utils/components/ButtonBase.js +8 -4
- package/DEV-cjs/utils/components/FocusTrap.js +6 -6
- package/DEV-cjs/utils/components/InputContainer.js +4 -2
- package/DEV-cjs/utils/components/InputFlexContainer.js +4 -2
- package/DEV-cjs/utils/components/LineClamp.js +1 -1
- package/DEV-cjs/utils/components/MiddleTextTruncation.js +1 -1
- package/DEV-cjs/utils/components/OverflowContainer.js +1 -1
- package/DEV-cjs/utils/components/Portal.js +5 -3
- package/DEV-cjs/utils/components/Resizer.js +1 -1
- package/DEV-cjs/utils/components/ShadowRoot.js +5 -3
- package/DEV-cjs/utils/components/index.js +0 -1
- package/DEV-cjs/utils/functions/focusable.js +1 -1
- package/DEV-cjs/utils/functions/polymorphic.js +4 -2
- package/DEV-cjs/utils/functions/react.js +3 -5
- package/DEV-cjs/utils/hooks/useContainerWidth.js +1 -1
- package/DEV-cjs/utils/hooks/useControlledState.js +1 -1
- package/DEV-cjs/utils/hooks/useDragAndDrop.js +3 -3
- package/DEV-cjs/utils/hooks/useEventListener.js +2 -2
- package/DEV-cjs/utils/hooks/useGlobals.js +1 -1
- package/DEV-cjs/utils/hooks/useId.js +1 -1
- package/DEV-cjs/utils/hooks/useInstance.js +1 -1
- package/DEV-cjs/utils/hooks/useIntersection.js +1 -1
- package/DEV-cjs/utils/hooks/useIsClient.js +1 -1
- package/DEV-cjs/utils/hooks/useIsomorphicLayoutEffect.js +1 -1
- package/DEV-cjs/utils/hooks/useLatestRef.js +1 -1
- package/DEV-cjs/utils/hooks/useMediaQuery.js +1 -1
- package/DEV-cjs/utils/hooks/useMergedRefs.js +1 -1
- package/DEV-cjs/utils/hooks/useResizeObserver.js +2 -2
- package/DEV-cjs/utils/hooks/useSafeContext.js +1 -1
- package/DEV-cjs/utils/hooks/useSyncExternalStore.js +1 -1
- package/DEV-cjs/utils/hooks/useVirtualScroll.js +1 -1
- package/DEV-cjs/utils/hooks/useWarningLogger.js +1 -1
- package/DEV-cjs/utils/icons/StatusIconMap.js +1 -1
- package/DEV-cjs/utils/icons/SvgCalendar.js +1 -1
- package/DEV-cjs/utils/icons/SvgCaretDownSmall.js +1 -1
- package/DEV-cjs/utils/icons/SvgCaretRightSmall.js +1 -1
- package/DEV-cjs/utils/icons/SvgCaretUpSmall.js +1 -1
- package/DEV-cjs/utils/icons/SvgCheckmark.js +1 -1
- package/DEV-cjs/utils/icons/SvgCheckmarkSmall.js +1 -1
- package/DEV-cjs/utils/icons/SvgChevronLeft.js +1 -1
- package/DEV-cjs/utils/icons/SvgChevronLeftDouble.js +1 -1
- package/DEV-cjs/utils/icons/SvgChevronRight.js +1 -1
- package/DEV-cjs/utils/icons/SvgChevronRightDouble.js +1 -1
- package/DEV-cjs/utils/icons/SvgChevronRightSmall.js +1 -1
- package/DEV-cjs/utils/icons/SvgClose.js +1 -1
- package/DEV-cjs/utils/icons/SvgCloseSmall.js +1 -1
- package/DEV-cjs/utils/icons/SvgColumnManager.js +1 -1
- package/DEV-cjs/utils/icons/SvgDocument.js +1 -1
- package/DEV-cjs/utils/icons/SvgFilter.js +1 -1
- package/DEV-cjs/utils/icons/SvgFilterHollow.js +1 -1
- package/DEV-cjs/utils/icons/SvgImportantSmall.js +1 -1
- package/DEV-cjs/utils/icons/SvgInfoCircular.js +1 -1
- package/DEV-cjs/utils/icons/SvgMore.js +1 -1
- package/DEV-cjs/utils/icons/SvgMoreVertical.js +1 -1
- package/DEV-cjs/utils/icons/SvgNew.js +1 -1
- package/DEV-cjs/utils/icons/SvgSearch.js +1 -1
- package/DEV-cjs/utils/icons/SvgSmileyHappy.js +1 -1
- package/DEV-cjs/utils/icons/SvgSortDown.js +1 -1
- package/DEV-cjs/utils/icons/SvgSortUp.js +1 -1
- package/DEV-cjs/utils/icons/SvgStatusError.js +1 -1
- package/DEV-cjs/utils/icons/SvgStatusSuccess.js +1 -1
- package/DEV-cjs/utils/icons/SvgStatusWarning.js +1 -1
- package/DEV-cjs/utils/icons/SvgSwap.js +1 -1
- package/DEV-cjs/utils/icons/SvgUpload.js +1 -1
- package/DEV-cjs/utils/providers/HydrationProvider.js +1 -1
- package/DEV-cjs/utils/providers/ScopeProvider.js +1 -1
- package/DEV-esm/core/ButtonGroup/ButtonGroup.js +2 -4
- package/DEV-esm/core/Carousel/CarouselSlide.js +1 -1
- package/DEV-esm/core/Carousel/CarouselSlider.js +1 -1
- package/DEV-esm/core/Checkbox/Checkbox.js +3 -2
- package/DEV-esm/core/ColorPicker/ColorBuilder.js +1 -1
- package/DEV-esm/core/Dialog/Dialog.js +32 -42
- package/DEV-esm/core/Dialog/DialogBackdrop.js +6 -1
- package/DEV-esm/core/Dialog/DialogMain.js +42 -34
- package/DEV-esm/core/Dialog/DialogMainContext.js +3 -0
- package/DEV-esm/core/Dialog/DialogTitleBar.js +10 -1
- package/DEV-esm/core/Label/Label.js +1 -1
- package/DEV-esm/core/List/List.js +20 -3
- package/DEV-esm/core/Overlay/Overlay.js +1 -1
- package/DEV-esm/core/Panels/Panels.js +3 -2
- package/DEV-esm/core/Popover/Popover.js +1 -1
- package/DEV-esm/core/SideNavigation/SideNavigation.js +37 -44
- package/DEV-esm/core/Slider/Slider.js +45 -37
- package/DEV-esm/core/Stepper/Stepper.js +31 -23
- package/DEV-esm/core/Table/Table.js +5 -2
- package/DEV-esm/core/Table/TableRowMemoized.js +1 -0
- package/DEV-esm/core/Table/actionHandlers/selectHandler.js +7 -8
- package/DEV-esm/core/Table/cells/DefaultCell.js +17 -4
- package/DEV-esm/core/Table/filters/defaultFilterFunctions.js +6 -5
- package/DEV-esm/core/Table/hooks/useResizeColumns.js +6 -4
- package/DEV-esm/core/Tabs/Tabs.js +11 -3
- package/DEV-esm/core/ThemeProvider/ThemeProvider.js +2 -3
- package/DEV-esm/core/Toast/Toast.js +131 -75
- package/DEV-esm/core/Toast/Toaster.js +11 -3
- package/DEV-esm/core/Tooltip/Tooltip.js +5 -7
- package/DEV-esm/core/VisuallyHidden/VisuallyHidden.js +1 -1
- package/DEV-esm/react-table/react-table.types-test.js +1 -1
- package/DEV-esm/styles.js +1 -1
- package/DEV-esm/utils/components/ButtonBase.js +4 -2
- package/DEV-esm/utils/components/FocusTrap.js +5 -5
- package/DEV-esm/utils/components/Portal.js +1 -1
- package/DEV-esm/utils/components/ShadowRoot.js +1 -1
- package/DEV-esm/utils/components/index.js +0 -1
- package/DEV-esm/utils/functions/react.js +2 -4
- package/DEV-esm/utils/hooks/useDragAndDrop.js +2 -2
- package/DEV-esm/utils/hooks/useEventListener.js +1 -1
- package/DEV-esm/utils/hooks/useResizeObserver.js +1 -1
- package/LICENSE.md +1 -1
- package/cjs/core/Alert/Alert.d.ts +1 -3
- package/cjs/core/Alert/Alert.js +4 -2
- package/cjs/core/Avatar/Avatar.d.ts +2 -1
- package/cjs/core/Avatar/Avatar.js +4 -2
- package/cjs/core/AvatarGroup/AvatarGroup.js +4 -2
- package/cjs/core/Backdrop/Backdrop.js +4 -2
- package/cjs/core/Badge/Badge.js +4 -2
- package/cjs/core/Breadcrumbs/Breadcrumbs.js +4 -2
- package/cjs/core/ButtonGroup/ButtonGroup.js +6 -6
- package/cjs/core/Buttons/Button.d.ts +2 -2
- package/cjs/core/Buttons/Button.js +4 -2
- package/cjs/core/Buttons/DropdownButton.d.ts +2 -1
- package/cjs/core/Buttons/DropdownButton.js +4 -2
- package/cjs/core/Buttons/IconButton.js +4 -2
- package/cjs/core/Buttons/IdeasButton.js +4 -2
- package/cjs/core/Buttons/SplitButton.d.ts +1 -1
- package/cjs/core/Buttons/SplitButton.js +4 -2
- package/cjs/core/Carousel/Carousel.d.ts +2 -6
- package/cjs/core/Carousel/Carousel.js +4 -2
- package/cjs/core/Carousel/CarouselContext.js +1 -1
- package/cjs/core/Carousel/CarouselDot.js +4 -2
- package/cjs/core/Carousel/CarouselDotsList.js +4 -2
- package/cjs/core/Carousel/CarouselNavigation.d.ts +2 -6
- package/cjs/core/Carousel/CarouselNavigation.js +4 -2
- package/cjs/core/Carousel/CarouselSlide.js +5 -3
- package/cjs/core/Carousel/CarouselSlider.js +5 -3
- package/cjs/core/Checkbox/Checkbox.js +7 -4
- package/cjs/core/ColorPicker/ColorBuilder.js +5 -3
- package/cjs/core/ColorPicker/ColorInputPanel.js +4 -2
- package/cjs/core/ColorPicker/ColorPalette.js +4 -2
- package/cjs/core/ColorPicker/ColorPicker.js +4 -2
- package/cjs/core/ColorPicker/ColorPickerContext.js +1 -1
- package/cjs/core/ColorPicker/ColorSwatch.js +4 -2
- package/cjs/core/ComboBox/ComboBox.d.ts +3 -3
- package/cjs/core/ComboBox/ComboBox.js +1 -1
- package/cjs/core/ComboBox/ComboBoxEndIcon.js +4 -2
- package/cjs/core/ComboBox/ComboBoxInput.d.ts +1 -1
- package/cjs/core/ComboBox/ComboBoxInput.js +1 -1
- package/cjs/core/ComboBox/ComboBoxInputContainer.js +1 -1
- package/cjs/core/ComboBox/ComboBoxMenu.js +4 -2
- package/cjs/core/ComboBox/ComboBoxMenuItem.d.ts +18 -6
- package/cjs/core/ComboBox/ComboBoxMenuItem.js +1 -1
- package/cjs/core/ComboBox/ComboBoxMultipleContainer.js +1 -1
- package/cjs/core/ComboBox/helpers.d.ts +3 -3
- package/cjs/core/ComboBox/helpers.js +1 -1
- package/cjs/core/DatePicker/DatePicker.js +4 -2
- package/cjs/core/Dialog/Dialog.d.ts +1 -1
- package/cjs/core/Dialog/Dialog.js +39 -44
- package/cjs/core/Dialog/DialogBackdrop.d.ts +1 -1
- package/cjs/core/Dialog/DialogBackdrop.js +10 -3
- package/cjs/core/Dialog/DialogContext.d.ts +1 -1
- package/cjs/core/Dialog/DialogContext.js +1 -1
- package/cjs/core/Dialog/DialogDragContext.js +1 -1
- package/cjs/core/Dialog/DialogMain.js +46 -36
- package/cjs/core/Dialog/DialogMainContext.d.ts +7 -0
- package/cjs/core/Dialog/DialogMainContext.js +23 -0
- package/cjs/core/Dialog/DialogTitleBar.js +14 -3
- package/cjs/core/Divider/Divider.js +4 -2
- package/cjs/core/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/cjs/core/DropdownMenu/DropdownMenu.js +1 -1
- package/cjs/core/ExpandableBlock/ExpandableBlock.d.ts +1 -3
- package/cjs/core/ExpandableBlock/ExpandableBlock.js +4 -2
- package/cjs/core/Fieldset/Fieldset.js +4 -2
- package/cjs/core/FileUpload/FileEmptyCard.js +4 -2
- package/cjs/core/FileUpload/FileUpload.js +4 -2
- package/cjs/core/FileUpload/FileUploadCard.js +4 -2
- package/cjs/core/FileUpload/FileUploadTemplate.js +4 -2
- package/cjs/core/Flex/Flex.js +4 -2
- package/cjs/core/Footer/Footer.js +4 -2
- package/cjs/core/Header/Header.d.ts +1 -1
- package/cjs/core/Header/Header.js +4 -2
- package/cjs/core/Header/HeaderBasicButton.js +4 -2
- package/cjs/core/Header/HeaderBreadcrumbs.js +4 -2
- package/cjs/core/Header/HeaderButton.js +1 -1
- package/cjs/core/Header/HeaderDropdownButton.js +1 -1
- package/cjs/core/Header/HeaderLogo.d.ts +2 -1
- package/cjs/core/Header/HeaderLogo.js +4 -2
- package/cjs/core/Header/HeaderSplitButton.js +4 -2
- package/cjs/core/Icon/Icon.js +4 -2
- package/cjs/core/InformationPanel/InformationPanel.js +4 -2
- package/cjs/core/InformationPanel/InformationPanelContent.js +4 -2
- package/cjs/core/InformationPanel/InformationPanelHeader.js +4 -2
- package/cjs/core/Input/Input.js +4 -2
- package/cjs/core/InputGrid/InputGrid.js +4 -2
- package/cjs/core/InputGroup/InputGroup.js +4 -2
- package/cjs/core/InputWithDecorations/InputWithDecorations.d.ts +2 -6
- package/cjs/core/InputWithDecorations/InputWithDecorations.js +1 -1
- package/cjs/core/Label/Label.js +5 -3
- package/cjs/core/LabeledInput/LabeledInput.d.ts +1 -1
- package/cjs/core/LabeledInput/LabeledInput.js +4 -2
- package/cjs/core/LabeledSelect/LabeledSelect.d.ts +2 -2
- package/cjs/core/LabeledSelect/LabeledSelect.js +1 -1
- package/cjs/core/LabeledTextarea/LabeledTextarea.js +1 -1
- package/cjs/core/LinkAction/LinkAction.js +4 -2
- package/cjs/core/List/List.d.ts +2 -1
- package/cjs/core/List/List.js +23 -2
- package/cjs/core/List/ListItem.js +4 -2
- package/cjs/core/Menu/Menu.js +4 -2
- package/cjs/core/Menu/MenuItem.d.ts +5 -5
- package/cjs/core/Menu/MenuItem.js +4 -2
- package/cjs/core/Menu/MenuItemSkeleton.js +4 -2
- package/cjs/core/Modal/Modal.js +1 -1
- package/cjs/core/NonIdealState/ErrorPage.js +10 -10
- package/cjs/core/NonIdealState/NonIdealState.js +4 -2
- package/cjs/core/NotificationMarker/NotificationMarker.js +4 -2
- package/cjs/core/Overlay/Overlay.js +2 -2
- package/cjs/core/Panels/Panels.d.ts +2 -2
- package/cjs/core/Panels/Panels.js +9 -5
- package/cjs/core/Panels/helpers.js +1 -1
- package/cjs/core/Popover/Popover.d.ts +1 -1
- package/cjs/core/Popover/Popover.js +5 -3
- package/cjs/core/ProgressIndicators/ProgressLinear.js +4 -2
- package/cjs/core/ProgressIndicators/ProgressRadial.js +4 -2
- package/cjs/core/Radio/Radio.js +4 -2
- package/cjs/core/RadioTiles/RadioTile.d.ts +1 -1
- package/cjs/core/RadioTiles/RadioTile.js +4 -2
- package/cjs/core/RadioTiles/RadioTileGroup.js +4 -2
- package/cjs/core/SearchBox/SearchBox.js +4 -2
- package/cjs/core/Select/Select.d.ts +6 -6
- package/cjs/core/Select/Select.js +4 -2
- package/cjs/core/Select/SelectTag.js +4 -2
- package/cjs/core/Select/SelectTagContainer.js +4 -2
- package/cjs/core/SideNavigation/SideNavigation.d.ts +3 -3
- package/cjs/core/SideNavigation/SideNavigation.js +45 -45
- package/cjs/core/SideNavigation/SidenavButton.js +4 -2
- package/cjs/core/SideNavigation/SidenavSubmenu.js +4 -2
- package/cjs/core/SideNavigation/SidenavSubmenuHeader.js +4 -2
- package/cjs/core/SkipToContentLink/SkipToContentLink.js +4 -2
- package/cjs/core/Slider/Slider.js +49 -39
- package/cjs/core/Slider/Thumb.js +4 -2
- package/cjs/core/Slider/Track.js +4 -2
- package/cjs/core/StatusMessage/StatusMessage.d.ts +1 -1
- package/cjs/core/StatusMessage/StatusMessage.js +4 -2
- package/cjs/core/Stepper/Stepper.js +35 -25
- package/cjs/core/Stepper/StepperStep.js +4 -2
- package/cjs/core/Stepper/WorkflowDiagram.js +4 -2
- package/cjs/core/Stepper/WorkflowDiagramStep.js +4 -2
- package/cjs/core/Surface/Surface.js +4 -2
- package/cjs/core/Table/ColumnHeader.js +4 -2
- package/cjs/core/Table/SubRowExpander.js +1 -1
- package/cjs/core/Table/Table.d.ts +1 -1
- package/cjs/core/Table/Table.js +9 -4
- package/cjs/core/Table/TableCell.js +4 -2
- package/cjs/core/Table/TableExpandableContentMemoized.d.ts +4 -3
- package/cjs/core/Table/TableExpandableContentMemoized.js +4 -2
- package/cjs/core/Table/TablePaginator.js +4 -2
- package/cjs/core/Table/TableRowMemoized.d.ts +1 -1
- package/cjs/core/Table/TableRowMemoized.js +5 -2
- package/cjs/core/Table/actionHandlers/selectHandler.js +7 -8
- package/cjs/core/Table/cells/DefaultCell.d.ts +2 -2
- package/cjs/core/Table/cells/DefaultCell.js +21 -6
- package/cjs/core/Table/cells/EditableCell.js +4 -2
- package/cjs/core/Table/columns/actionColumn.js +1 -1
- package/cjs/core/Table/columns/expanderColumn.js +1 -1
- package/cjs/core/Table/columns/selectionColumn.js +1 -1
- package/cjs/core/Table/filters/BaseFilter.js +4 -2
- package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.js +1 -1
- package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +1 -1
- package/cjs/core/Table/filters/FilterButtonBar.js +4 -2
- package/cjs/core/Table/filters/FilterToggle.js +4 -2
- package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +1 -1
- package/cjs/core/Table/filters/TextFilter/TextFilter.js +1 -1
- package/cjs/core/Table/filters/defaultFilterFunctions.js +6 -5
- package/cjs/core/Table/filters/tableFilters.js +1 -1
- package/cjs/core/Table/hooks/useExpanderCell.js +1 -1
- package/cjs/core/Table/hooks/useResizeColumns.d.ts +1 -1
- package/cjs/core/Table/hooks/useResizeColumns.js +6 -4
- package/cjs/core/Table/hooks/useScrollToRow.js +1 -1
- package/cjs/core/Table/hooks/useSubRowFiltering.js +1 -1
- package/cjs/core/Table/hooks/useSubRowSelection.js +1 -1
- package/cjs/core/Table/utils.js +1 -1
- package/cjs/core/Tabs/Tabs.d.ts +2 -4
- package/cjs/core/Tabs/Tabs.js +15 -5
- package/cjs/core/Tag/Tag.js +4 -2
- package/cjs/core/Tag/TagContainer.js +4 -2
- package/cjs/core/Textarea/Textarea.js +1 -1
- package/cjs/core/ThemeProvider/ThemeContext.js +1 -1
- package/cjs/core/ThemeProvider/ThemeProvider.d.ts +7 -2
- package/cjs/core/ThemeProvider/ThemeProvider.js +12 -7
- package/cjs/core/Tile/Tile.d.ts +1 -3
- package/cjs/core/Tile/Tile.js +4 -2
- package/cjs/core/TimePicker/TimePicker.js +4 -2
- package/cjs/core/Toast/Toast.d.ts +1 -1
- package/cjs/core/Toast/Toast.js +136 -79
- package/cjs/core/Toast/Toaster.d.ts +1 -1
- package/cjs/core/Toast/Toaster.js +15 -5
- package/cjs/core/ToggleSwitch/ToggleSwitch.d.ts +1 -1
- package/cjs/core/ToggleSwitch/ToggleSwitch.js +4 -2
- package/cjs/core/Tooltip/Tooltip.d.ts +2 -1
- package/cjs/core/Tooltip/Tooltip.js +21 -12
- package/cjs/core/TransferList/TransferList.d.ts +1 -3
- package/cjs/core/TransferList/TransferList.js +4 -2
- package/cjs/core/Tree/Tree.d.ts +1 -1
- package/cjs/core/Tree/Tree.js +1 -1
- package/cjs/core/Tree/TreeContext.js +1 -1
- package/cjs/core/Tree/TreeNode.d.ts +1 -1
- package/cjs/core/Tree/TreeNode.js +4 -2
- package/cjs/core/Tree/TreeNodeExpander.js +4 -2
- package/cjs/core/Typography/Anchor.js +4 -2
- package/cjs/core/Typography/Blockquote.js +4 -2
- package/cjs/core/Typography/Kbd.js +4 -2
- package/cjs/core/Typography/Text.js +4 -2
- package/cjs/core/VisuallyHidden/VisuallyHidden.js +5 -3
- package/cjs/react-table/react-table.d.ts +3 -3
- package/cjs/react-table/react-table.types-test.js +2 -2
- package/cjs/styles.js +1 -1
- package/cjs/utils/components/AutoclearingHiddenLiveRegion.js +1 -1
- package/cjs/utils/components/ButtonBase.js +8 -4
- package/cjs/utils/components/FocusTrap.d.ts +1 -1
- package/cjs/utils/components/FocusTrap.js +6 -6
- package/cjs/utils/components/InputContainer.d.ts +1 -1
- package/cjs/utils/components/InputContainer.js +4 -2
- package/cjs/utils/components/InputFlexContainer.js +4 -2
- package/cjs/utils/components/LineClamp.js +1 -1
- package/cjs/utils/components/MiddleTextTruncation.js +1 -1
- package/cjs/utils/components/OverflowContainer.js +1 -1
- package/cjs/utils/components/Portal.d.ts +3 -3
- package/cjs/utils/components/Portal.js +5 -3
- package/cjs/utils/components/Resizer.d.ts +2 -2
- package/cjs/utils/components/Resizer.js +1 -1
- package/cjs/utils/components/ShadowRoot.js +5 -3
- package/cjs/utils/components/index.d.ts +0 -1
- package/cjs/utils/components/index.js +0 -1
- package/cjs/utils/functions/focusable.d.ts +1 -1
- package/cjs/utils/functions/focusable.js +1 -1
- package/cjs/utils/functions/polymorphic.d.ts +3 -2
- package/cjs/utils/functions/polymorphic.js +4 -2
- package/cjs/utils/functions/react.d.ts +1 -1
- package/cjs/utils/functions/react.js +3 -5
- package/cjs/utils/hooks/useContainerWidth.js +1 -1
- package/cjs/utils/hooks/useControlledState.js +1 -1
- package/cjs/utils/hooks/useDragAndDrop.d.ts +1 -1
- package/cjs/utils/hooks/useDragAndDrop.js +3 -3
- package/cjs/utils/hooks/useEventListener.js +2 -2
- package/cjs/utils/hooks/useGlobals.js +1 -1
- package/cjs/utils/hooks/useId.js +1 -1
- package/cjs/utils/hooks/useInstance.js +1 -1
- package/cjs/utils/hooks/useIntersection.js +1 -1
- package/cjs/utils/hooks/useIsClient.js +1 -1
- package/cjs/utils/hooks/useIsomorphicLayoutEffect.js +1 -1
- package/cjs/utils/hooks/useLatestRef.d.ts +1 -1
- package/cjs/utils/hooks/useLatestRef.js +1 -1
- package/cjs/utils/hooks/useMediaQuery.js +1 -1
- package/cjs/utils/hooks/useMergedRefs.d.ts +2 -2
- package/cjs/utils/hooks/useMergedRefs.js +1 -1
- package/cjs/utils/hooks/useResizeObserver.js +2 -2
- package/cjs/utils/hooks/useSafeContext.js +1 -1
- package/cjs/utils/hooks/useSyncExternalStore.js +1 -1
- package/cjs/utils/hooks/useVirtualScroll.js +1 -1
- package/cjs/utils/hooks/useWarningLogger.js +1 -1
- package/cjs/utils/icons/StatusIconMap.js +1 -1
- package/cjs/utils/icons/SvgCalendar.js +1 -1
- package/cjs/utils/icons/SvgCaretDownSmall.js +1 -1
- package/cjs/utils/icons/SvgCaretRightSmall.js +1 -1
- package/cjs/utils/icons/SvgCaretUpSmall.js +1 -1
- package/cjs/utils/icons/SvgCheckmark.js +1 -1
- package/cjs/utils/icons/SvgCheckmarkSmall.js +1 -1
- package/cjs/utils/icons/SvgChevronLeft.js +1 -1
- package/cjs/utils/icons/SvgChevronLeftDouble.js +1 -1
- package/cjs/utils/icons/SvgChevronRight.js +1 -1
- package/cjs/utils/icons/SvgChevronRightDouble.js +1 -1
- package/cjs/utils/icons/SvgChevronRightSmall.js +1 -1
- package/cjs/utils/icons/SvgClose.js +1 -1
- package/cjs/utils/icons/SvgCloseSmall.js +1 -1
- package/cjs/utils/icons/SvgColumnManager.js +1 -1
- package/cjs/utils/icons/SvgDocument.js +1 -1
- package/cjs/utils/icons/SvgFilter.js +1 -1
- package/cjs/utils/icons/SvgFilterHollow.js +1 -1
- package/cjs/utils/icons/SvgImportantSmall.js +1 -1
- package/cjs/utils/icons/SvgInfoCircular.js +1 -1
- package/cjs/utils/icons/SvgMore.js +1 -1
- package/cjs/utils/icons/SvgMoreVertical.js +1 -1
- package/cjs/utils/icons/SvgNew.js +1 -1
- package/cjs/utils/icons/SvgSearch.js +1 -1
- package/cjs/utils/icons/SvgSmileyHappy.js +1 -1
- package/cjs/utils/icons/SvgSortDown.js +1 -1
- package/cjs/utils/icons/SvgSortUp.js +1 -1
- package/cjs/utils/icons/SvgStatusError.js +1 -1
- package/cjs/utils/icons/SvgStatusSuccess.js +1 -1
- package/cjs/utils/icons/SvgStatusWarning.js +1 -1
- package/cjs/utils/icons/SvgSwap.js +1 -1
- package/cjs/utils/icons/SvgUpload.js +1 -1
- package/cjs/utils/props.d.ts +3 -3
- package/cjs/utils/providers/HydrationProvider.js +1 -1
- package/cjs/utils/providers/ScopeProvider.d.ts +2 -2
- package/cjs/utils/providers/ScopeProvider.js +1 -1
- package/esm/core/Alert/Alert.d.ts +1 -3
- package/esm/core/Avatar/Avatar.d.ts +2 -1
- package/esm/core/ButtonGroup/ButtonGroup.js +2 -4
- package/esm/core/Buttons/Button.d.ts +2 -2
- package/esm/core/Buttons/DropdownButton.d.ts +2 -1
- package/esm/core/Buttons/SplitButton.d.ts +1 -1
- package/esm/core/Carousel/Carousel.d.ts +2 -6
- package/esm/core/Carousel/CarouselNavigation.d.ts +2 -6
- package/esm/core/Carousel/CarouselSlide.js +1 -1
- package/esm/core/Carousel/CarouselSlider.js +1 -1
- package/esm/core/Checkbox/Checkbox.js +3 -2
- package/esm/core/ColorPicker/ColorBuilder.js +1 -1
- package/esm/core/ComboBox/ComboBox.d.ts +3 -3
- package/esm/core/ComboBox/ComboBoxInput.d.ts +1 -1
- package/esm/core/ComboBox/ComboBoxMenuItem.d.ts +18 -6
- package/esm/core/ComboBox/helpers.d.ts +3 -3
- package/esm/core/Dialog/Dialog.d.ts +1 -1
- package/esm/core/Dialog/Dialog.js +32 -42
- package/esm/core/Dialog/DialogBackdrop.d.ts +1 -1
- package/esm/core/Dialog/DialogBackdrop.js +6 -1
- package/esm/core/Dialog/DialogContext.d.ts +1 -1
- package/esm/core/Dialog/DialogMain.js +42 -34
- package/esm/core/Dialog/DialogMainContext.d.ts +7 -0
- package/esm/core/Dialog/DialogMainContext.js +3 -0
- package/esm/core/Dialog/DialogTitleBar.js +10 -1
- package/esm/core/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/esm/core/ExpandableBlock/ExpandableBlock.d.ts +1 -3
- package/esm/core/Header/Header.d.ts +1 -1
- package/esm/core/Header/HeaderLogo.d.ts +2 -1
- package/esm/core/InputWithDecorations/InputWithDecorations.d.ts +2 -6
- package/esm/core/Label/Label.js +1 -1
- package/esm/core/LabeledInput/LabeledInput.d.ts +1 -1
- package/esm/core/LabeledSelect/LabeledSelect.d.ts +2 -2
- package/esm/core/List/List.d.ts +2 -1
- package/esm/core/List/List.js +20 -3
- package/esm/core/Menu/MenuItem.d.ts +5 -5
- package/esm/core/Overlay/Overlay.js +1 -1
- package/esm/core/Panels/Panels.d.ts +2 -2
- package/esm/core/Panels/Panels.js +3 -2
- package/esm/core/Popover/Popover.d.ts +1 -1
- package/esm/core/Popover/Popover.js +1 -1
- package/esm/core/RadioTiles/RadioTile.d.ts +1 -1
- package/esm/core/Select/Select.d.ts +6 -6
- package/esm/core/SideNavigation/SideNavigation.d.ts +3 -3
- package/esm/core/SideNavigation/SideNavigation.js +37 -44
- package/esm/core/Slider/Slider.js +45 -37
- package/esm/core/StatusMessage/StatusMessage.d.ts +1 -1
- package/esm/core/Stepper/Stepper.js +31 -23
- package/esm/core/Table/Table.d.ts +1 -1
- package/esm/core/Table/Table.js +5 -2
- package/esm/core/Table/TableExpandableContentMemoized.d.ts +4 -3
- package/esm/core/Table/TableRowMemoized.d.ts +1 -1
- package/esm/core/Table/TableRowMemoized.js +1 -0
- package/esm/core/Table/actionHandlers/selectHandler.js +7 -8
- package/esm/core/Table/cells/DefaultCell.d.ts +2 -2
- package/esm/core/Table/cells/DefaultCell.js +17 -4
- package/esm/core/Table/filters/defaultFilterFunctions.js +6 -5
- package/esm/core/Table/hooks/useResizeColumns.d.ts +1 -1
- package/esm/core/Table/hooks/useResizeColumns.js +6 -4
- package/esm/core/Tabs/Tabs.d.ts +2 -4
- package/esm/core/Tabs/Tabs.js +11 -3
- package/esm/core/ThemeProvider/ThemeProvider.d.ts +7 -2
- package/esm/core/ThemeProvider/ThemeProvider.js +2 -3
- package/esm/core/Tile/Tile.d.ts +1 -3
- package/esm/core/Toast/Toast.d.ts +1 -1
- package/esm/core/Toast/Toast.js +131 -75
- package/esm/core/Toast/Toaster.d.ts +1 -1
- package/esm/core/Toast/Toaster.js +11 -3
- package/esm/core/ToggleSwitch/ToggleSwitch.d.ts +1 -1
- package/esm/core/Tooltip/Tooltip.d.ts +2 -1
- package/esm/core/Tooltip/Tooltip.js +5 -7
- package/esm/core/TransferList/TransferList.d.ts +1 -3
- package/esm/core/Tree/Tree.d.ts +1 -1
- package/esm/core/Tree/TreeNode.d.ts +1 -1
- package/esm/core/VisuallyHidden/VisuallyHidden.js +1 -1
- package/esm/react-table/react-table.d.ts +3 -3
- package/esm/react-table/react-table.types-test.js +1 -1
- package/esm/styles.js +1 -1
- package/esm/utils/components/ButtonBase.js +4 -2
- package/esm/utils/components/FocusTrap.d.ts +1 -1
- package/esm/utils/components/FocusTrap.js +5 -5
- package/esm/utils/components/InputContainer.d.ts +1 -1
- package/esm/utils/components/Portal.d.ts +3 -3
- package/esm/utils/components/Portal.js +1 -1
- package/esm/utils/components/Resizer.d.ts +2 -2
- package/esm/utils/components/ShadowRoot.js +1 -1
- package/esm/utils/components/index.d.ts +0 -1
- package/esm/utils/components/index.js +0 -1
- package/esm/utils/functions/focusable.d.ts +1 -1
- package/esm/utils/functions/polymorphic.d.ts +3 -2
- package/esm/utils/functions/react.d.ts +1 -1
- package/esm/utils/functions/react.js +2 -4
- package/esm/utils/hooks/useDragAndDrop.d.ts +1 -1
- package/esm/utils/hooks/useDragAndDrop.js +2 -2
- package/esm/utils/hooks/useEventListener.js +1 -1
- package/esm/utils/hooks/useLatestRef.d.ts +1 -1
- package/esm/utils/hooks/useMergedRefs.d.ts +2 -2
- package/esm/utils/hooks/useResizeObserver.js +1 -1
- package/esm/utils/props.d.ts +3 -3
- package/esm/utils/providers/ScopeProvider.d.ts +2 -2
- package/package.json +44 -46
- package/styles.css +10 -10
- package/DEV-cjs/utils/components/WithCSSTransition.js +0 -60
- package/DEV-esm/utils/components/WithCSSTransition.js +0 -49
- package/cjs/utils/components/WithCSSTransition.d.ts +0 -6
- package/cjs/utils/components/WithCSSTransition.js +0 -60
- package/esm/utils/components/WithCSSTransition.d.ts +0 -6
- package/esm/utils/components/WithCSSTransition.js +0 -49
|
@@ -3,6 +3,8 @@ import * as React from 'react';
|
|
|
3
3
|
import { getBoundedValue, useEventListener, Box } from '../../utils/index.js';
|
|
4
4
|
import { Track } from './Track.js';
|
|
5
5
|
import { Thumb } from './Thumb.js';
|
|
6
|
+
import { FloatingDelayGroup } from '@floating-ui/react';
|
|
7
|
+
import { defaultTooltipDelay } from '../Tooltip/Tooltip.js';
|
|
6
8
|
let getPercentageOfRectangle = (rect, pointerX, pointerY, orientation) => {
|
|
7
9
|
if ('horizontal' === orientation) {
|
|
8
10
|
let position = getBoundedValue(pointerX, rect.left, rect.right);
|
|
@@ -284,47 +286,53 @@ export const Slider = React.forwardRef((props, ref) => {
|
|
|
284
286
|
minValueLabel,
|
|
285
287
|
),
|
|
286
288
|
React.createElement(
|
|
287
|
-
|
|
289
|
+
FloatingDelayGroup,
|
|
288
290
|
{
|
|
289
|
-
|
|
290
|
-
...trackContainerProps,
|
|
291
|
-
className: cx(
|
|
292
|
-
'iui-slider',
|
|
293
|
-
{
|
|
294
|
-
'iui-grabbing': void 0 !== activeThumbIndex,
|
|
295
|
-
},
|
|
296
|
-
trackContainerProps?.className,
|
|
297
|
-
),
|
|
298
|
-
onPointerDown: handlePointerDownOnSlider,
|
|
291
|
+
delay: defaultTooltipDelay,
|
|
299
292
|
},
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
293
|
+
React.createElement(
|
|
294
|
+
Box,
|
|
295
|
+
{
|
|
296
|
+
ref: containerRef,
|
|
297
|
+
...trackContainerProps,
|
|
298
|
+
className: cx(
|
|
299
|
+
'iui-slider',
|
|
300
|
+
{
|
|
301
|
+
'iui-grabbing': void 0 !== activeThumbIndex,
|
|
302
|
+
},
|
|
303
|
+
trackContainerProps?.className,
|
|
304
|
+
),
|
|
305
|
+
onPointerDown: handlePointerDownOnSlider,
|
|
306
|
+
},
|
|
307
|
+
currentValues.map((thumbValue, index) => {
|
|
308
|
+
let [minVal, maxVal] = getAllowableThumbRange(index);
|
|
309
|
+
let thisThumbProps = thumbProps?.(index);
|
|
310
|
+
return React.createElement(Thumb, {
|
|
311
|
+
key: thisThumbProps?.id ?? index,
|
|
312
|
+
index: index,
|
|
313
|
+
disabled: disabled,
|
|
314
|
+
isActive: activeThumbIndex === index,
|
|
315
|
+
onThumbActivated: onThumbActivated,
|
|
316
|
+
onThumbValueChanged: onThumbValueChanged,
|
|
317
|
+
minVal: minVal,
|
|
318
|
+
maxVal: maxVal,
|
|
319
|
+
value: thumbValue,
|
|
320
|
+
tooltipProps: generateTooltipProps(index, thumbValue),
|
|
321
|
+
thumbProps: thisThumbProps,
|
|
322
|
+
step: step,
|
|
323
|
+
sliderMin: min,
|
|
324
|
+
sliderMax: max,
|
|
325
|
+
});
|
|
326
|
+
}),
|
|
327
|
+
React.createElement(Track, {
|
|
328
|
+
trackDisplayMode: trackDisplay,
|
|
316
329
|
sliderMin: min,
|
|
317
330
|
sliderMax: max,
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
sliderMax: max,
|
|
324
|
-
values: currentValues,
|
|
325
|
-
orientation: orientation,
|
|
326
|
-
...trackProps,
|
|
327
|
-
}),
|
|
331
|
+
values: currentValues,
|
|
332
|
+
orientation: orientation,
|
|
333
|
+
...trackProps,
|
|
334
|
+
}),
|
|
335
|
+
),
|
|
328
336
|
),
|
|
329
337
|
tickMarkArea,
|
|
330
338
|
maxValueLabel &&
|
|
@@ -2,6 +2,8 @@ import cx from 'classnames';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { Box } from '../../utils/index.js';
|
|
4
4
|
import { StepperStep } from './StepperStep.js';
|
|
5
|
+
import { FloatingDelayGroup } from '@floating-ui/react';
|
|
6
|
+
import { defaultTooltipDelay } from '../Tooltip/Tooltip.js';
|
|
5
7
|
let defaultStepperLocalization = {
|
|
6
8
|
stepsCountLabel: (currentStep, totalSteps) =>
|
|
7
9
|
`Step ${currentStep} of ${totalSteps}:`,
|
|
@@ -33,29 +35,35 @@ export const Stepper = React.forwardRef((props, ref) => {
|
|
|
33
35
|
...rest,
|
|
34
36
|
},
|
|
35
37
|
React.createElement(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
38
|
+
FloatingDelayGroup,
|
|
39
|
+
{
|
|
40
|
+
delay: defaultTooltipDelay,
|
|
41
|
+
},
|
|
42
|
+
React.createElement(
|
|
43
|
+
'ol',
|
|
44
|
+
null,
|
|
45
|
+
steps.map((s, index) => {
|
|
46
|
+
let thisStepProps = stepProps?.(index);
|
|
47
|
+
let thisTrackContentProps = trackContentProps?.(index);
|
|
48
|
+
let thisCircleProps = circleProps?.(index);
|
|
49
|
+
let thisNameProps = nameProps?.(index);
|
|
50
|
+
return React.createElement(StepperStep, {
|
|
51
|
+
stepProps: thisStepProps,
|
|
52
|
+
trackContentProps: thisTrackContentProps,
|
|
53
|
+
circleProps: thisCircleProps,
|
|
54
|
+
nameProps: thisNameProps,
|
|
55
|
+
key: index,
|
|
56
|
+
index: index,
|
|
57
|
+
title: 'long' === type ? '' : s.name,
|
|
58
|
+
currentStepNumber: boundedCurrentStep,
|
|
59
|
+
totalSteps: steps.length,
|
|
60
|
+
type: type,
|
|
61
|
+
onClick: onStepClick,
|
|
62
|
+
description: s.description,
|
|
63
|
+
stepContent: s.stepContent,
|
|
64
|
+
});
|
|
65
|
+
}),
|
|
66
|
+
),
|
|
59
67
|
),
|
|
60
68
|
'long' === type &&
|
|
61
69
|
React.createElement(
|
|
@@ -110,7 +110,7 @@ export const Table = (props) => {
|
|
|
110
110
|
...rest
|
|
111
111
|
} = props;
|
|
112
112
|
useGlobals();
|
|
113
|
-
let ownerDocument = React.useRef();
|
|
113
|
+
let ownerDocument = React.useRef(void 0);
|
|
114
114
|
let defaultColumn = React.useMemo(
|
|
115
115
|
() => ({
|
|
116
116
|
maxWidth: 0,
|
|
@@ -623,7 +623,10 @@ export const Table = (props) => {
|
|
|
623
623
|
},
|
|
624
624
|
React.createElement(
|
|
625
625
|
Box,
|
|
626
|
-
|
|
626
|
+
{
|
|
627
|
+
...headerGroupProps,
|
|
628
|
+
key: headerGroupProps.key,
|
|
629
|
+
},
|
|
627
630
|
headerGroup.headers.map((column, index) => {
|
|
628
631
|
let dragAndDropProps = column.getDragAndDropProps();
|
|
629
632
|
return React.createElement(ColumnHeader, {
|
|
@@ -7,19 +7,18 @@ let onSelectHandler = (newState, instance, onSelect, isRowDisabled) => {
|
|
|
7
7
|
let newSelectedRowIds = {};
|
|
8
8
|
let handleRow = (row) => {
|
|
9
9
|
if (isRowDisabled?.(row.original)) return false;
|
|
10
|
+
let hasSubComponents = !!row.initialSubRows[0]?.original[iuiId];
|
|
11
|
+
let hasSubRows = row.subRows.length > 0 && !hasSubComponents;
|
|
10
12
|
let isAllSubSelected = true;
|
|
11
|
-
if (
|
|
13
|
+
if (hasSubRows)
|
|
12
14
|
row.initialSubRows.forEach((subRow) => {
|
|
13
15
|
let result = handleRow(subRow);
|
|
14
16
|
if (!result) isAllSubSelected = false;
|
|
15
17
|
});
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
isAllSubSelected)
|
|
21
|
-
)
|
|
22
|
-
newSelectedRowIds[row.id] = true;
|
|
18
|
+
let isRowSelected = newState.selectedRowIds[row.id];
|
|
19
|
+
let case1 = isRowSelected && (!instance.selectSubRows || !hasSubRows);
|
|
20
|
+
let case2 = hasSubRows && isAllSubSelected;
|
|
21
|
+
if (case1 || case2) newSelectedRowIds[row.id] = true;
|
|
23
22
|
return !!newSelectedRowIds[row.id];
|
|
24
23
|
};
|
|
25
24
|
instance.initialRows.forEach((row) => handleRow(row));
|
|
@@ -28,10 +28,12 @@ export const DefaultCell = (props) => {
|
|
|
28
28
|
clamp = 'string' == typeof cellProps.value && !isCustomCell,
|
|
29
29
|
...rest
|
|
30
30
|
} = props;
|
|
31
|
+
let { key: cellElementKey, ...cellElementPropsRest } = cellElementProps;
|
|
31
32
|
return React.createElement(
|
|
32
33
|
Box,
|
|
33
34
|
{
|
|
34
|
-
...
|
|
35
|
+
...cellElementPropsRest,
|
|
36
|
+
key: cellElementKey,
|
|
35
37
|
...rest,
|
|
36
38
|
className: cx(cellElementClassName, className),
|
|
37
39
|
'aria-disabled': isDisabled?.(cellProps.row.original) || void 0,
|
|
@@ -43,22 +45,31 @@ export const DefaultCell = (props) => {
|
|
|
43
45
|
},
|
|
44
46
|
React.createElement(
|
|
45
47
|
ShadowRoot,
|
|
46
|
-
|
|
48
|
+
{
|
|
49
|
+
key: `${cellElementKey}-shadow-root`,
|
|
50
|
+
},
|
|
47
51
|
React.createElement('slot', {
|
|
48
52
|
name: 'start',
|
|
53
|
+
key: `${cellElementKey}-shadow-root-start`,
|
|
49
54
|
}),
|
|
50
55
|
clamp
|
|
51
56
|
? React.createElement(
|
|
52
57
|
LineClamp,
|
|
53
|
-
|
|
58
|
+
{
|
|
59
|
+
key: `${cellElementKey}-shadow-root-slot`,
|
|
60
|
+
},
|
|
54
61
|
React.createElement('slot', null),
|
|
55
62
|
)
|
|
56
|
-
: React.createElement('slot',
|
|
63
|
+
: React.createElement('slot', {
|
|
64
|
+
key: `${cellElementKey}-shadow-root-slot`,
|
|
65
|
+
}),
|
|
57
66
|
React.createElement('slot', {
|
|
58
67
|
name: 'end',
|
|
68
|
+
key: `${cellElementKey}-shadow-root-end`,
|
|
59
69
|
}),
|
|
60
70
|
React.createElement('slot', {
|
|
61
71
|
name: 'shadows',
|
|
72
|
+
key: `${cellElementKey}-shadow-root-shadows`,
|
|
62
73
|
}),
|
|
63
74
|
),
|
|
64
75
|
startIcon &&
|
|
@@ -67,6 +78,7 @@ export const DefaultCell = (props) => {
|
|
|
67
78
|
{
|
|
68
79
|
className: 'iui-table-cell-start-icon',
|
|
69
80
|
slot: 'start',
|
|
81
|
+
key: `${cellElementKey}-start`,
|
|
70
82
|
},
|
|
71
83
|
startIcon,
|
|
72
84
|
),
|
|
@@ -77,6 +89,7 @@ export const DefaultCell = (props) => {
|
|
|
77
89
|
{
|
|
78
90
|
className: 'iui-table-cell-end-icon',
|
|
79
91
|
slot: 'end',
|
|
92
|
+
key: `${cellElementKey}-end`,
|
|
80
93
|
},
|
|
81
94
|
endIcon,
|
|
82
95
|
),
|
|
@@ -14,10 +14,9 @@ let exactText = (rows, ids, filterValue) =>
|
|
|
14
14
|
rows.filter((row) =>
|
|
15
15
|
ids.some((id) => {
|
|
16
16
|
let rowValue = row.values[id];
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
);
|
|
17
|
+
return void 0 !== rowValue
|
|
18
|
+
? String(rowValue).toLowerCase() === String(filterValue).toLowerCase()
|
|
19
|
+
: true;
|
|
21
20
|
}),
|
|
22
21
|
);
|
|
23
22
|
exactText.autoRemove = (val) => !val;
|
|
@@ -25,7 +24,9 @@ let exactTextCase = (rows, ids, filterValue) =>
|
|
|
25
24
|
rows.filter((row) =>
|
|
26
25
|
ids.some((id) => {
|
|
27
26
|
let rowValue = row.values[id];
|
|
28
|
-
return void 0
|
|
27
|
+
return void 0 !== rowValue
|
|
28
|
+
? String(rowValue) === String(filterValue)
|
|
29
|
+
: true;
|
|
29
30
|
}),
|
|
30
31
|
);
|
|
31
32
|
exactTextCase.autoRemove = (val) => !val;
|
|
@@ -77,9 +77,11 @@ let defaultGetResizerProps =
|
|
|
77
77
|
let events = isTouchEvent(e)
|
|
78
78
|
? handlersAndEvents.touch
|
|
79
79
|
: handlersAndEvents.mouse;
|
|
80
|
-
let passiveIfSupported =
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
let passiveIfSupported = passiveEventSupported()
|
|
81
|
+
? {
|
|
82
|
+
passive: false,
|
|
83
|
+
}
|
|
84
|
+
: false;
|
|
83
85
|
ownerDocument.current?.addEventListener(
|
|
84
86
|
events.moveEvent,
|
|
85
87
|
events.moveHandler,
|
|
@@ -279,7 +281,7 @@ let useInstanceBeforeDimensions = (instance) => {
|
|
|
279
281
|
? getPreviousResizableHeader(header, instance)
|
|
280
282
|
: getNextResizableHeader(header, instance);
|
|
281
283
|
header.canResize =
|
|
282
|
-
null
|
|
284
|
+
null != header.disableResizing ? !header.disableResizing : true;
|
|
283
285
|
if ('fit' === columnResizeMode)
|
|
284
286
|
header.isResizerVisible =
|
|
285
287
|
(header.canResize && !!nextResizableHeader) ||
|
|
@@ -123,7 +123,7 @@ let Tab = React.forwardRef((props, forwardedRef) => {
|
|
|
123
123
|
focusActivationMode,
|
|
124
124
|
} = useSafeContext(TabsContext);
|
|
125
125
|
let { tabsWidth, tablistRef } = useSafeContext(TabListContext);
|
|
126
|
-
let tabRef = React.useRef();
|
|
126
|
+
let tabRef = React.useRef(void 0);
|
|
127
127
|
let isActive = activeValue === value;
|
|
128
128
|
let isActiveRef = useLatestRef(isActive);
|
|
129
129
|
useLayoutEffect(() => {
|
|
@@ -162,7 +162,15 @@ let Tab = React.forwardRef((props, forwardedRef) => {
|
|
|
162
162
|
});
|
|
163
163
|
};
|
|
164
164
|
if ('default' !== type && isActive) updateStripe();
|
|
165
|
-
}, [
|
|
165
|
+
}, [
|
|
166
|
+
type,
|
|
167
|
+
orientation,
|
|
168
|
+
isActive,
|
|
169
|
+
tabsWidth,
|
|
170
|
+
setStripeProperties,
|
|
171
|
+
tablistRef,
|
|
172
|
+
value,
|
|
173
|
+
]);
|
|
166
174
|
let onKeyDown = (event) => {
|
|
167
175
|
if (event.altKey) return;
|
|
168
176
|
let allTabs = Array.from(event.currentTarget.parentElement?.children ?? []);
|
|
@@ -287,7 +295,7 @@ let TabsPanel = React.forwardRef((props, ref) => {
|
|
|
287
295
|
className: cx('iui-tabs-content', className),
|
|
288
296
|
'aria-labelledby': `${idPrefix}-tab-${value.replaceAll(' ', '-')}`,
|
|
289
297
|
role: 'tabpanel',
|
|
290
|
-
hidden: activeValue !== value
|
|
298
|
+
hidden: activeValue !== value ? true : void 0,
|
|
291
299
|
ref: ref,
|
|
292
300
|
...rest,
|
|
293
301
|
id: `${idPrefix}-panel-${value.replaceAll(' ', '-')}`,
|
|
@@ -43,8 +43,7 @@ export const ThemeProvider = React.forwardRef((props, forwardedRef) => {
|
|
|
43
43
|
(_themeOptions1.highContrast =
|
|
44
44
|
'inherit' === themeProp ? parent.highContrast : void 0);
|
|
45
45
|
(_future = future).themeBridge ??
|
|
46
|
-
(_future.themeBridge =
|
|
47
|
-
'inherit' === themeProp ? parent.context?.future?.themeBridge : void 0);
|
|
46
|
+
(_future.themeBridge = parent.context?.future?.themeBridge);
|
|
48
47
|
let [portalContainerFromParent] = useScopedAtom(portalContainerAtom);
|
|
49
48
|
let contextValue = React.useMemo(
|
|
50
49
|
() => ({
|
|
@@ -133,7 +132,7 @@ let Root = React.forwardRef((props, forwardedRef) => {
|
|
|
133
132
|
),
|
|
134
133
|
'data-iui-theme': shouldApplyDark ? 'dark' : 'light',
|
|
135
134
|
'data-iui-contrast': shouldApplyHC ? 'high' : 'default',
|
|
136
|
-
'data-iui-bridge':
|
|
135
|
+
'data-iui-bridge': future?.themeBridge ? true : void 0,
|
|
137
136
|
ref: forwardedRef,
|
|
138
137
|
...rest,
|
|
139
138
|
},
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Transition } from 'react-transition-group';
|
|
3
2
|
import cx from 'classnames';
|
|
4
3
|
import {
|
|
5
4
|
getWindow,
|
|
@@ -9,6 +8,7 @@ import {
|
|
|
9
8
|
useSafeContext,
|
|
10
9
|
ButtonBase,
|
|
11
10
|
useMediaQuery,
|
|
11
|
+
useLatestRef,
|
|
12
12
|
} from '../../utils/index.js';
|
|
13
13
|
import { IconButton } from '../Buttons/IconButton.js';
|
|
14
14
|
import { ToasterStateContext } from './Toaster.js';
|
|
@@ -33,7 +33,6 @@ export const Toast = (props) => {
|
|
|
33
33
|
let [height, setHeight] = React.useState(0);
|
|
34
34
|
let thisElement = React.useRef(null);
|
|
35
35
|
let [margin, setMargin] = React.useState(0);
|
|
36
|
-
let motionOk = useMediaQuery('(prefers-reduced-motion: no-preference)');
|
|
37
36
|
let marginStyle = () => {
|
|
38
37
|
if ('top' === placementPosition)
|
|
39
38
|
return {
|
|
@@ -73,81 +72,41 @@ export const Toast = (props) => {
|
|
|
73
72
|
setHeight(height);
|
|
74
73
|
}
|
|
75
74
|
};
|
|
76
|
-
let
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
return {
|
|
86
|
-
translateX,
|
|
87
|
-
translateY,
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
return React.createElement(
|
|
91
|
-
Transition,
|
|
92
|
-
{
|
|
93
|
-
timeout: {
|
|
94
|
-
enter: 240,
|
|
95
|
-
exit: animateOutTo ? 400 : 120,
|
|
96
|
-
},
|
|
97
|
-
in: isVisible,
|
|
98
|
-
appear: true,
|
|
99
|
-
unmountOnExit: true,
|
|
100
|
-
onEnter: (node) => {
|
|
101
|
-
if (motionOk) {
|
|
102
|
-
node.style.transform = 'translateY(15%)';
|
|
103
|
-
node.style.transitionTimingFunction = 'ease';
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
onEntered: (node) => {
|
|
107
|
-
if (motionOk) node.style.transform = 'translateY(0)';
|
|
108
|
-
},
|
|
109
|
-
onExiting: (node) => {
|
|
110
|
-
if (motionOk) {
|
|
111
|
-
let { translateX, translateY } = calculateOutAnimation(node);
|
|
112
|
-
node.style.transform = animateOutTo
|
|
113
|
-
? `scale(0.9) translate(${translateX}px,${translateY}px)`
|
|
114
|
-
: 'scale(0.9)';
|
|
115
|
-
node.style.opacity = '0';
|
|
116
|
-
node.style.transitionDuration = animateOutTo ? '400ms' : '120ms';
|
|
117
|
-
node.style.transitionTimingFunction = 'cubic-bezier(0.4, 0, 1, 1)';
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
onExited: onRemove,
|
|
121
|
-
},
|
|
122
|
-
React.createElement(
|
|
123
|
-
Box,
|
|
124
|
-
{
|
|
125
|
-
ref: thisElement,
|
|
126
|
-
className: 'iui-toast-all',
|
|
127
|
-
style: {
|
|
128
|
-
height,
|
|
129
|
-
...marginStyle(),
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
React.createElement(
|
|
133
|
-
'div',
|
|
75
|
+
let shouldBeMounted = useAnimateToastBasedOnVisibility(isVisible, {
|
|
76
|
+
thisElement,
|
|
77
|
+
animateOutTo,
|
|
78
|
+
onRemove,
|
|
79
|
+
});
|
|
80
|
+
return shouldBeMounted
|
|
81
|
+
? React.createElement(
|
|
82
|
+
Box,
|
|
134
83
|
{
|
|
135
|
-
ref:
|
|
84
|
+
ref: thisElement,
|
|
85
|
+
className: 'iui-toast-all',
|
|
86
|
+
style: {
|
|
87
|
+
height,
|
|
88
|
+
...marginStyle(),
|
|
89
|
+
},
|
|
136
90
|
},
|
|
137
|
-
React.createElement(
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
91
|
+
React.createElement(
|
|
92
|
+
'div',
|
|
93
|
+
{
|
|
94
|
+
ref: onRef,
|
|
95
|
+
},
|
|
96
|
+
React.createElement(ToastPresentation, {
|
|
97
|
+
as: 'div',
|
|
98
|
+
category: category,
|
|
99
|
+
content: content,
|
|
100
|
+
link: link,
|
|
101
|
+
type: type,
|
|
102
|
+
hasCloseButton: hasCloseButton,
|
|
103
|
+
onClose: close,
|
|
104
|
+
...domProps?.toastProps,
|
|
105
|
+
contentProps: domProps?.contentProps,
|
|
106
|
+
}),
|
|
107
|
+
),
|
|
108
|
+
)
|
|
109
|
+
: null;
|
|
151
110
|
};
|
|
152
111
|
export const ToastPresentation = React.forwardRef((props, forwardedRef) => {
|
|
153
112
|
let {
|
|
@@ -212,3 +171,100 @@ export const ToastPresentation = React.forwardRef((props, forwardedRef) => {
|
|
|
212
171
|
),
|
|
213
172
|
);
|
|
214
173
|
});
|
|
174
|
+
let useAnimateToastBasedOnVisibility = (isVisible, args) => {
|
|
175
|
+
let { thisElement, animateOutTo, onRemove } = args;
|
|
176
|
+
let [shouldBeMounted, setShouldBeMounted] = React.useState(isVisible);
|
|
177
|
+
let motionOk = useMediaQuery('(prefers-reduced-motion: no-preference)');
|
|
178
|
+
let onRemoveRef = useLatestRef(onRemove);
|
|
179
|
+
let [prevIsVisible, setPrevIsVisible] = React.useState(void 0);
|
|
180
|
+
React.useEffect(() => {
|
|
181
|
+
if (prevIsVisible !== isVisible) {
|
|
182
|
+
setPrevIsVisible(isVisible);
|
|
183
|
+
if (isVisible) safeAnimateIn();
|
|
184
|
+
else safeAnimateOut();
|
|
185
|
+
}
|
|
186
|
+
function calculateOutAnimation(node) {
|
|
187
|
+
let translateX = 0;
|
|
188
|
+
let translateY = 0;
|
|
189
|
+
if (animateOutTo && node) {
|
|
190
|
+
let { x: startX, y: startY } = node.getBoundingClientRect();
|
|
191
|
+
let { x: endX, y: endY } = animateOutTo.getBoundingClientRect();
|
|
192
|
+
translateX = endX - startX;
|
|
193
|
+
translateY = endY - startY;
|
|
194
|
+
}
|
|
195
|
+
return {
|
|
196
|
+
translateX,
|
|
197
|
+
translateY,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
function safeAnimateIn() {
|
|
201
|
+
setShouldBeMounted(true);
|
|
202
|
+
queueMicrotask(() => {
|
|
203
|
+
animateIn();
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
function safeAnimateOut() {
|
|
207
|
+
if (motionOk) {
|
|
208
|
+
let animation = animateOut();
|
|
209
|
+
animation?.addEventListener('finish', () => {
|
|
210
|
+
setShouldBeMounted(false);
|
|
211
|
+
onRemoveRef.current?.();
|
|
212
|
+
});
|
|
213
|
+
} else {
|
|
214
|
+
setShouldBeMounted(false);
|
|
215
|
+
onRemoveRef.current?.();
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
function animateIn() {
|
|
219
|
+
if (!motionOk) return;
|
|
220
|
+
thisElement.current?.animate?.(
|
|
221
|
+
[
|
|
222
|
+
{
|
|
223
|
+
transform: 'translateY(15%)',
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
transform: 'translateY(0)',
|
|
227
|
+
},
|
|
228
|
+
],
|
|
229
|
+
{
|
|
230
|
+
duration: 240,
|
|
231
|
+
fill: 'forwards',
|
|
232
|
+
},
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
function animateOut() {
|
|
236
|
+
if (null == thisElement.current || !motionOk) return;
|
|
237
|
+
let { translateX, translateY } = calculateOutAnimation(
|
|
238
|
+
thisElement.current,
|
|
239
|
+
);
|
|
240
|
+
let animationDuration = animateOutTo ? 400 : 120;
|
|
241
|
+
let animation = thisElement.current?.animate?.(
|
|
242
|
+
[
|
|
243
|
+
{
|
|
244
|
+
transform: animateOutTo
|
|
245
|
+
? `scale(0.9) translate(${translateX}px,${translateY}px)`
|
|
246
|
+
: 'scale(0.9)',
|
|
247
|
+
opacity: 0,
|
|
248
|
+
transitionDuration: `${animationDuration}ms`,
|
|
249
|
+
transitionTimingFunction: 'cubic-bezier(0.4, 0, 1, 1)',
|
|
250
|
+
},
|
|
251
|
+
],
|
|
252
|
+
{
|
|
253
|
+
duration: animationDuration,
|
|
254
|
+
iterations: 1,
|
|
255
|
+
fill: 'forwards',
|
|
256
|
+
},
|
|
257
|
+
);
|
|
258
|
+
return animation;
|
|
259
|
+
}
|
|
260
|
+
}, [
|
|
261
|
+
isVisible,
|
|
262
|
+
prevIsVisible,
|
|
263
|
+
animateOutTo,
|
|
264
|
+
motionOk,
|
|
265
|
+
thisElement,
|
|
266
|
+
setShouldBeMounted,
|
|
267
|
+
onRemoveRef,
|
|
268
|
+
]);
|
|
269
|
+
return shouldBeMounted;
|
|
270
|
+
};
|
|
@@ -66,16 +66,24 @@ export const ToastProvider = ({ children, inherit = false }) => {
|
|
|
66
66
|
placement: 'top',
|
|
67
67
|
},
|
|
68
68
|
});
|
|
69
|
-
|
|
69
|
+
let toasterDispatchContext = React.useContext(ToasterDispatchContext);
|
|
70
|
+
let toasterStateContext = React.useContext(ToasterStateContext);
|
|
71
|
+
let shouldReuse = toasterStateContext && inherit;
|
|
72
|
+
let toasterDispatchContextValue = shouldReuse
|
|
73
|
+
? toasterDispatchContext
|
|
74
|
+
: dispatch;
|
|
75
|
+
let toasterStateContextValue = shouldReuse
|
|
76
|
+
? toasterStateContext
|
|
77
|
+
: toasterState;
|
|
70
78
|
return React.createElement(
|
|
71
79
|
ToasterDispatchContext.Provider,
|
|
72
80
|
{
|
|
73
|
-
value:
|
|
81
|
+
value: toasterDispatchContextValue,
|
|
74
82
|
},
|
|
75
83
|
React.createElement(
|
|
76
84
|
ToasterStateContext.Provider,
|
|
77
85
|
{
|
|
78
|
-
value:
|
|
86
|
+
value: toasterStateContextValue,
|
|
79
87
|
},
|
|
80
88
|
children,
|
|
81
89
|
),
|