@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
package/esm/core/Toast/Toast.js
CHANGED
|
@@ -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
|
+
};
|
|
@@ -38,7 +38,7 @@ export declare const Toaster: () => React.JSX.Element;
|
|
|
38
38
|
export declare const ToastProvider: ({ children, inherit, }: {
|
|
39
39
|
children: React.ReactNode;
|
|
40
40
|
inherit?: boolean;
|
|
41
|
-
}) =>
|
|
41
|
+
}) => React.JSX.Element;
|
|
42
42
|
export declare const ToasterStateContext: React.Context<ToasterState | undefined>;
|
|
43
43
|
type ToasterState = {
|
|
44
44
|
toasts: ToastProps[];
|
|
@@ -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
|
),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { Placement } from '@floating-ui/react';
|
|
2
|
+
import type { FloatingDelayGroup, Placement } from '@floating-ui/react';
|
|
3
3
|
import type { PolymorphicForwardRefComponent, PortalProps } from '../../utils/index.js';
|
|
4
|
+
export declare const defaultTooltipDelay: React.ComponentPropsWithoutRef<typeof FloatingDelayGroup>['delay'];
|
|
4
5
|
type TooltipOptions = {
|
|
5
6
|
/**
|
|
6
7
|
* Placement of the Tooltip
|
|
@@ -25,6 +25,10 @@ import {
|
|
|
25
25
|
useId,
|
|
26
26
|
useMergedRefs,
|
|
27
27
|
} from '../../utils/index.js';
|
|
28
|
+
export const defaultTooltipDelay = {
|
|
29
|
+
open: 100,
|
|
30
|
+
close: 200,
|
|
31
|
+
};
|
|
28
32
|
let useTooltip = (options = {}) => {
|
|
29
33
|
let uniqueId = useId();
|
|
30
34
|
let {
|
|
@@ -118,13 +122,7 @@ let useTooltip = (options = {}) => {
|
|
|
118
122
|
});
|
|
119
123
|
let interactions = useInteractions([
|
|
120
124
|
useHover(floating.context, {
|
|
121
|
-
delay:
|
|
122
|
-
0 !== delay
|
|
123
|
-
? delay
|
|
124
|
-
: {
|
|
125
|
-
open: 50,
|
|
126
|
-
close: 250,
|
|
127
|
-
},
|
|
125
|
+
delay: 0 !== delay ? delay : defaultTooltipDelay,
|
|
128
126
|
handleClose: safePolygon({
|
|
129
127
|
buffer: -1 / 0,
|
|
130
128
|
}),
|
|
@@ -38,9 +38,7 @@ export declare const TransferList: PolymorphicForwardRefComponent<"div", {}> & {
|
|
|
38
38
|
/**
|
|
39
39
|
* TransferList listbox subcomponent
|
|
40
40
|
*/
|
|
41
|
-
Listbox: PolymorphicForwardRefComponent<"ul", Omit<
|
|
42
|
-
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
43
|
-
}, "as"> & {
|
|
41
|
+
Listbox: PolymorphicForwardRefComponent<"ul", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "as"> & {
|
|
44
42
|
as?: "div" | undefined;
|
|
45
43
|
}>;
|
|
46
44
|
/**
|
package/esm/core/Tree/Tree.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ export type TreeProps<T> = {
|
|
|
53
53
|
* />
|
|
54
54
|
* ), [onNodeExpanded])
|
|
55
55
|
*/
|
|
56
|
-
nodeRenderer: (props: NodeRenderProps<T>) => JSX.Element;
|
|
56
|
+
nodeRenderer: (props: NodeRenderProps<T>) => React.JSX.Element;
|
|
57
57
|
/**
|
|
58
58
|
* Array of custom data used for `TreeNodes` inside `Tree`.
|
|
59
59
|
*/
|
|
@@ -29,7 +29,7 @@ export const VisuallyHidden = React.forwardRef((props, ref) => {
|
|
|
29
29
|
{
|
|
30
30
|
as: asProp,
|
|
31
31
|
className: cx('iui-visually-hidden', className),
|
|
32
|
-
'data-iui-unhide-on-focus':
|
|
32
|
+
'data-iui-unhide-on-focus': unhideOnFocus ? true : void 0,
|
|
33
33
|
ref: ref,
|
|
34
34
|
...rest,
|
|
35
35
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChangeEvent, ComponentType, CSSProperties, DependencyList, EffectCallback, MouseEvent, ReactElement,
|
|
1
|
+
import type { ChangeEvent, ComponentType, CSSProperties, DependencyList, EffectCallback, MouseEvent, ReactElement, ReactNode } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* This allows custom strings and keeps intellisense for string unions.
|
|
4
4
|
* See https://github.com/Microsoft/TypeScript/issues/29729
|
|
@@ -732,7 +732,7 @@ export declare const defaultColumn: Partial<Column> & Record<string, any>;
|
|
|
732
732
|
export type StringKey<D> = Extract<keyof D, string>;
|
|
733
733
|
export type IdType<D> = StringKey<D> | string;
|
|
734
734
|
export type CellValue<V = any> = V;
|
|
735
|
-
export type Renderer<Props> = ComponentType<Props> | ReactElement | string | number |
|
|
735
|
+
export type Renderer<Props> = ComponentType<Props> | ReactElement<any> | string | number | Iterable<ReactNode>;
|
|
736
736
|
export interface PluginHook<D extends Record<string, unknown>> {
|
|
737
737
|
(hooks: Hooks<D>): void;
|
|
738
738
|
pluginName?: string | undefined;
|
|
@@ -749,5 +749,5 @@ export declare function useGetLatest<T>(obj: T): () => T;
|
|
|
749
749
|
export declare function safeUseLayoutEffect(effect: EffectCallback, deps?: DependencyList): void;
|
|
750
750
|
export declare function useMountedLayoutEffect(effect: EffectCallback, deps?: DependencyList): void;
|
|
751
751
|
export declare function useAsyncDebounce<F extends (...args: any[]) => any>(defaultFn: F, defaultWait?: number): F;
|
|
752
|
-
export declare function makeRenderer(instance: TableInstance, column: ColumnInstance, meta?: any): ReactElement
|
|
752
|
+
export declare function makeRenderer(instance: TableInstance, column: ColumnInstance, meta?: any): ReactElement<any>;
|
|
753
753
|
export {};
|
|
@@ -584,7 +584,7 @@ import {
|
|
|
584
584
|
[pageSizeList],
|
|
585
585
|
);
|
|
586
586
|
let [globalFilter, setGlobalFilter] = React.useState('');
|
|
587
|
-
let tableInstance = React.useRef();
|
|
587
|
+
let tableInstance = React.useRef(void 0);
|
|
588
588
|
let [hoveredRowIndex, setHoveredRowIndex] = React.useState(0);
|
|
589
589
|
let [rowRefMap, setRowRefMap] = React.useState({});
|
|
590
590
|
return React.createElement(
|
package/esm/styles.js
CHANGED
|
@@ -7,6 +7,7 @@ export const ButtonBase = React.forwardRef((props, forwardedRef) => {
|
|
|
7
7
|
as: asProp = 'button',
|
|
8
8
|
disabled: disabledProp,
|
|
9
9
|
htmlDisabled,
|
|
10
|
+
type: typeProp = 'button' === asProp ? 'button' : void 0,
|
|
10
11
|
...rest
|
|
11
12
|
} = props;
|
|
12
13
|
let isClient = useIsClient();
|
|
@@ -16,13 +17,14 @@ export const ButtonBase = React.forwardRef((props, forwardedRef) => {
|
|
|
16
17
|
if (disabledProp) return;
|
|
17
18
|
handler?.(e);
|
|
18
19
|
};
|
|
20
|
+
let type = 'button' === asProp && disabledProp ? 'button' : typeProp;
|
|
19
21
|
return React.createElement(Box, {
|
|
20
22
|
as: asProp,
|
|
21
|
-
type:
|
|
23
|
+
type: type,
|
|
22
24
|
ref: forwardedRef,
|
|
23
25
|
'aria-disabled': ariaDisabled ? 'true' : void 0,
|
|
24
26
|
'data-iui-disabled': disabledProp ? 'true' : void 0,
|
|
25
|
-
disabled:
|
|
27
|
+
disabled: htmlDisabled ?? (!isClient && disabledProp) ? true : void 0,
|
|
26
28
|
...rest,
|
|
27
29
|
className: cx('iui-button-base', props.className),
|
|
28
30
|
onClick: handleIfEnabled(props.onClick),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { getTabbableElements } from '../functions/focusable.js';
|
|
3
|
-
import {
|
|
3
|
+
import { cloneElementWithRef } from '../functions/react.js';
|
|
4
4
|
export const FocusTrap = (props) => {
|
|
5
5
|
let { children } = props;
|
|
6
|
-
let childRef = React.useRef();
|
|
6
|
+
let childRef = React.useRef(void 0);
|
|
7
7
|
let getFirstLastFocusables = () => {
|
|
8
8
|
let elements = getTabbableElements(childRef.current);
|
|
9
9
|
let firstElement = elements[0];
|
|
@@ -28,9 +28,9 @@ export const FocusTrap = (props) => {
|
|
|
28
28
|
onFocus: onFirstFocus,
|
|
29
29
|
'aria-hidden': true,
|
|
30
30
|
}),
|
|
31
|
-
|
|
32
|
-
ref:
|
|
33
|
-
}),
|
|
31
|
+
cloneElementWithRef(children, () => ({
|
|
32
|
+
ref: childRef,
|
|
33
|
+
})),
|
|
34
34
|
React.createElement('div', {
|
|
35
35
|
tabIndex: 0,
|
|
36
36
|
onFocus: onLastFocus,
|
|
@@ -6,7 +6,7 @@ export type InputContainerProps = {
|
|
|
6
6
|
required?: boolean;
|
|
7
7
|
status?: 'positive' | 'warning' | 'negative';
|
|
8
8
|
message?: React.ReactNode;
|
|
9
|
-
icon?: JSX.Element;
|
|
9
|
+
icon?: React.JSX.Element;
|
|
10
10
|
isLabelInline?: boolean;
|
|
11
11
|
statusMessage?: React.ReactNode;
|
|
12
12
|
inputId?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare const portalContainerAtom: import("jotai").PrimitiveAtom<HTMLElement |
|
|
3
|
-
init: HTMLElement |
|
|
2
|
+
export declare const portalContainerAtom: import("jotai").PrimitiveAtom<HTMLElement | null> & {
|
|
3
|
+
init: HTMLElement | null;
|
|
4
4
|
};
|
|
5
5
|
export type PortalProps = {
|
|
6
6
|
/**
|
|
@@ -32,4 +32,4 @@ export type PortalProps = {
|
|
|
32
32
|
* @private
|
|
33
33
|
*/
|
|
34
34
|
export declare const Portal: (props: React.PropsWithChildren<PortalProps>) => React.ReactNode;
|
|
35
|
-
export declare const usePortalTo: (portal: NonNullable<PortalProps["portal"]>) => HTMLElement | null
|
|
35
|
+
export declare const usePortalTo: (portal: NonNullable<PortalProps["portal"]>) => HTMLElement | null;
|
|
@@ -3,7 +3,7 @@ import * as ReactDOM from 'react-dom';
|
|
|
3
3
|
import { useIsClient } from '../hooks/useIsClient.js';
|
|
4
4
|
import { atom } from 'jotai';
|
|
5
5
|
import { useScopedAtom } from '../providers/ScopeProvider.js';
|
|
6
|
-
export const portalContainerAtom = atom(
|
|
6
|
+
export const portalContainerAtom = atom(null);
|
|
7
7
|
export const Portal = (props) => {
|
|
8
8
|
let { portal = true, children } = props;
|
|
9
9
|
let isClient = useIsClient();
|
|
@@ -3,12 +3,12 @@ export type ResizerProps = {
|
|
|
3
3
|
/**
|
|
4
4
|
* Ref of the element that is being resized.
|
|
5
5
|
*/
|
|
6
|
-
elementRef: React.RefObject<HTMLElement>;
|
|
6
|
+
elementRef: React.RefObject<HTMLElement | null>;
|
|
7
7
|
/**
|
|
8
8
|
* Ref of the container element in order to avoid resizing past container boundaries.
|
|
9
9
|
* If not passed, viewport will be used.
|
|
10
10
|
*/
|
|
11
|
-
containerRef?: React.RefObject<HTMLElement>;
|
|
11
|
+
containerRef?: React.RefObject<HTMLElement | null>;
|
|
12
12
|
/**
|
|
13
13
|
* Callback that is being called on resize start.
|
|
14
14
|
* Useful to set state, style, or other properties when resizing is started.
|
|
@@ -47,7 +47,7 @@ let ClientShadowRoot = ({ children, css }) => {
|
|
|
47
47
|
};
|
|
48
48
|
function useShadowRoot(templateRef, { css = '' }) {
|
|
49
49
|
let [shadowRoot, setShadowRoot] = React.useState(null);
|
|
50
|
-
let styleSheet = React.useRef();
|
|
50
|
+
let styleSheet = React.useRef(void 0);
|
|
51
51
|
let latestCss = useLatestRef(css);
|
|
52
52
|
let latestShadowRoot = useLatestRef(shadowRoot);
|
|
53
53
|
let createStyleSheet = React.useCallback(
|
|
@@ -3,7 +3,6 @@ export * from './FocusTrap.js';
|
|
|
3
3
|
export * from './InputContainer.js';
|
|
4
4
|
export * from './InputFlexContainer.js';
|
|
5
5
|
export * from './InputWithIcon.js';
|
|
6
|
-
export * from './WithCSSTransition.js';
|
|
7
6
|
export * from './MiddleTextTruncation.js';
|
|
8
7
|
export * from './AutoclearingHiddenLiveRegion.js';
|
|
9
8
|
export * from './Box.js';
|
|
@@ -3,7 +3,6 @@ export * from './FocusTrap.js';
|
|
|
3
3
|
export * from './InputContainer.js';
|
|
4
4
|
export * from './InputFlexContainer.js';
|
|
5
5
|
export * from './InputWithIcon.js';
|
|
6
|
-
export * from './WithCSSTransition.js';
|
|
7
6
|
export * from './MiddleTextTruncation.js';
|
|
8
7
|
export * from './AutoclearingHiddenLiveRegion.js';
|
|
9
8
|
export * from './Box.js';
|
|
@@ -26,6 +26,6 @@ export declare const getFocusableElements: (container: HTMLElement | undefined |
|
|
|
26
26
|
export declare function useFocusableElements(root: HTMLElement | null, extraOptions?: {
|
|
27
27
|
filter?: (elements: HTMLElement[]) => HTMLElement[];
|
|
28
28
|
}): {
|
|
29
|
-
focusableElementsRef: React.
|
|
29
|
+
focusableElementsRef: React.RefObject<HTMLElement[]>;
|
|
30
30
|
focusableElements: HTMLElement[];
|
|
31
31
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { PolymorphicForwardRefComponent } from '../props.js';
|
|
2
|
-
declare const _base: <As extends keyof JSX.IntrinsicElements = "div">(defaultElement: As) => (className: string, attrs?: JSX.IntrinsicElements[As]) => PolymorphicForwardRefComponent<As, {}>;
|
|
3
|
+
declare const _base: <As extends keyof React.JSX.IntrinsicElements = "div">(defaultElement: As) => (className: string, attrs?: React.JSX.IntrinsicElements[As]) => PolymorphicForwardRefComponent<As, {}>;
|
|
3
4
|
/**
|
|
4
5
|
* Utility to create a type-safe polymorphic component with a simple class.
|
|
5
6
|
*
|
|
@@ -17,5 +18,5 @@ declare const _base: <As extends keyof JSX.IntrinsicElements = "div">(defaultEle
|
|
|
17
18
|
*
|
|
18
19
|
* @private
|
|
19
20
|
*/
|
|
20
|
-
export declare const polymorphic: { [key in keyof JSX.IntrinsicElements]: ReturnType<typeof _base<key>>; };
|
|
21
|
+
export declare const polymorphic: { [key in keyof React.JSX.IntrinsicElements]: ReturnType<typeof _base<key>>; };
|
|
21
22
|
export {};
|
|
@@ -5,4 +5,4 @@ import * as React from 'react';
|
|
|
5
5
|
*
|
|
6
6
|
* @private
|
|
7
7
|
*/
|
|
8
|
-
export declare const cloneElementWithRef: (children: React.ReactNode, getProps: (children: JSX.Element) => Record<string, unknown>) => string | number | true | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null;
|
|
8
|
+
export declare const cloneElementWithRef: (children: React.ReactNode, getProps: (children: React.JSX.Element) => Record<string, unknown>) => string | number | bigint | true | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null;
|
|
@@ -3,12 +3,10 @@ import { mergeRefs } from '../hooks/useMergedRefs.js';
|
|
|
3
3
|
export const cloneElementWithRef = (children, getProps) => {
|
|
4
4
|
if (!children) return null;
|
|
5
5
|
if (!React.isValidElement(children)) return children;
|
|
6
|
+
let childrenRef = children.props?.ref || children?.ref;
|
|
6
7
|
let props = getProps(children);
|
|
7
8
|
let ref = mergeRefs(
|
|
8
|
-
...[
|
|
9
|
-
'ref' in children ? children.ref : null,
|
|
10
|
-
'ref' in props ? props.ref : null,
|
|
11
|
-
].filter(Boolean),
|
|
9
|
+
...[childrenRef, 'ref' in props ? props.ref : null].filter(Boolean),
|
|
12
10
|
);
|
|
13
11
|
return React.cloneElement(children, {
|
|
14
12
|
...props,
|
|
@@ -7,7 +7,7 @@ import * as React from 'react';
|
|
|
7
7
|
* `onPointerDown` - handler that is called when pointer is down and handles all the dragging logic.
|
|
8
8
|
* `transform` - current transform of the element, it is used to preserve drag position when element visibility is being toggled.
|
|
9
9
|
*/
|
|
10
|
-
export declare const useDragAndDrop: (elementRef: React.RefObject<HTMLElement>, containerRef?: React.RefObject<HTMLElement>, enabled?: boolean) => {
|
|
10
|
+
export declare const useDragAndDrop: (elementRef: React.RefObject<HTMLElement | null>, containerRef?: React.RefObject<HTMLElement | null>, enabled?: boolean) => {
|
|
11
11
|
onPointerDown: (e: React.PointerEvent<HTMLElement>) => void;
|
|
12
12
|
transform: string;
|
|
13
13
|
};
|
|
@@ -17,8 +17,8 @@ let getContainerRect = (containerRef) => {
|
|
|
17
17
|
export const useDragAndDrop = (elementRef, containerRef, enabled = true) => {
|
|
18
18
|
let grabOffsetX = React.useRef(0);
|
|
19
19
|
let grabOffsetY = React.useRef(0);
|
|
20
|
-
let translateX = React.useRef();
|
|
21
|
-
let translateY = React.useRef();
|
|
20
|
+
let translateX = React.useRef(void 0);
|
|
21
|
+
let translateY = React.useRef(void 0);
|
|
22
22
|
let containerRectRef = React.useRef(getContainerRect(containerRef));
|
|
23
23
|
let adjustTransform = React.useCallback(() => {
|
|
24
24
|
if (!elementRef.current || !enabled) return;
|
|
@@ -2,8 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
/**
|
|
3
3
|
* Function that merges the provided refs into one.
|
|
4
4
|
*/
|
|
5
|
-
export declare const mergeRefs: <T>(...refs: Array<React.Ref<T> | React.
|
|
5
|
+
export declare const mergeRefs: <T>(...refs: Array<React.Ref<T> | React.Ref<T> | undefined | null>) => (instance: T | null) => void;
|
|
6
6
|
/**
|
|
7
7
|
* Returns a ref callback that merges the provided refs using `mergeRefs`.
|
|
8
8
|
*/
|
|
9
|
-
export declare const useMergedRefs: <T>(...refs: ReadonlyArray<React.Ref<T> | React.
|
|
9
|
+
export declare const useMergedRefs: <T>(...refs: ReadonlyArray<React.Ref<T> | React.Ref<T> | undefined | null>) => (instance: T | null) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { getWindow } from '../functions/dom.js';
|
|
3
3
|
export const useResizeObserver = (onResize) => {
|
|
4
|
-
let resizeObserver = React.useRef();
|
|
4
|
+
let resizeObserver = React.useRef(void 0);
|
|
5
5
|
let elementRef = React.useCallback(
|
|
6
6
|
(element) => {
|
|
7
7
|
if (!getWindow()?.ResizeObserver) return;
|