@itwin/itwinui-react 3.17.0-dev.2 → 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 +27 -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 +4 -2
- package/DEV-cjs/core/Dialog/DialogBackdrop.js +4 -2
- 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 +5 -3
- package/DEV-cjs/core/Dialog/DialogMainContext.js +1 -1
- package/DEV-cjs/core/Dialog/DialogTitleBar.js +4 -2
- 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 +8 -4
- 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 +44 -34
- 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/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 +6 -4
- 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 +11 -5
- 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 +4 -2
- package/DEV-cjs/core/Toast/Toaster.js +4 -2
- 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/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/DialogMain.js +1 -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 +1 -1
- package/DEV-esm/core/Popover/Popover.js +1 -1
- package/DEV-esm/core/SideNavigation/SideNavigation.js +35 -27
- 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/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 +2 -2
- package/DEV-esm/core/ThemeProvider/ThemeProvider.js +1 -1
- 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/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/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.js +4 -2
- package/cjs/core/Dialog/DialogBackdrop.js +4 -2
- 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 +5 -3
- package/cjs/core/Dialog/DialogMainContext.js +1 -1
- package/cjs/core/Dialog/DialogTitleBar.js +4 -2
- 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 +8 -4
- 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 +1 -1
- package/cjs/core/SideNavigation/SideNavigation.js +44 -34
- 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/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 +6 -4
- 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 +5 -2
- package/cjs/core/ThemeProvider/ThemeProvider.js +11 -5
- 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.js +4 -2
- package/cjs/core/Toast/Toaster.js +4 -2
- 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/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/DialogContext.d.ts +1 -1
- package/esm/core/Dialog/DialogMain.js +1 -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 +1 -1
- 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 +1 -1
- package/esm/core/SideNavigation/SideNavigation.js +35 -27
- 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/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 +2 -2
- package/esm/core/ThemeProvider/ThemeProvider.d.ts +5 -2
- package/esm/core/ThemeProvider/ThemeProvider.js +1 -1
- package/esm/core/Tile/Tile.d.ts +1 -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/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 +42 -42
- package/styles.css +9 -9
|
@@ -1,5 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Box } from '../../utils/index.js';
|
|
3
|
+
import { FloatingDelayGroup } from '@floating-ui/react';
|
|
4
|
+
import { defaultTooltipDelay } from '../Tooltip/Tooltip.js';
|
|
5
|
+
import cx from 'classnames';
|
|
6
|
+
export const List = React.forwardRef((props, ref) => {
|
|
7
|
+
let { className, ...rest } = props;
|
|
8
|
+
return React.createElement(
|
|
9
|
+
FloatingDelayGroup,
|
|
10
|
+
{
|
|
11
|
+
delay: defaultTooltipDelay,
|
|
12
|
+
},
|
|
13
|
+
React.createElement(Box, {
|
|
14
|
+
as: 'div',
|
|
15
|
+
ref: ref,
|
|
16
|
+
role: 'list',
|
|
17
|
+
...rest,
|
|
18
|
+
className: cx('iui-list', className),
|
|
19
|
+
}),
|
|
20
|
+
);
|
|
4
21
|
});
|
|
5
22
|
List.displayName = 'List';
|
|
@@ -134,7 +134,7 @@ let Panel = React.forwardRef((props, forwardedRef) => {
|
|
|
134
134
|
className: cx('iui-panel', className),
|
|
135
135
|
'aria-labelledby': `${id}-header-title`,
|
|
136
136
|
role: 'group',
|
|
137
|
-
inert: isInert ? '' : void 0,
|
|
137
|
+
inert: isInert ? 'true' : void 0,
|
|
138
138
|
'data-iui-transitioning': isTransitioning ? 'true' : void 0,
|
|
139
139
|
...rest,
|
|
140
140
|
},
|
|
@@ -2,6 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
import { SvgChevronRight, Box, useControlledState } from '../../utils/index.js';
|
|
4
4
|
import { IconButton } from '../Buttons/IconButton.js';
|
|
5
|
+
import { FloatingDelayGroup } from '@floating-ui/react';
|
|
6
|
+
import { defaultTooltipDelay } from '../Tooltip/Tooltip.js';
|
|
5
7
|
export const SidenavExpandedContext = React.createContext(void 0);
|
|
6
8
|
export const SideNavigation = React.forwardRef((props, forwardedRef) => {
|
|
7
9
|
let {
|
|
@@ -47,47 +49,53 @@ export const SideNavigation = React.forwardRef((props, forwardedRef) => {
|
|
|
47
49
|
ref: forwardedRef,
|
|
48
50
|
},
|
|
49
51
|
React.createElement(
|
|
50
|
-
|
|
52
|
+
FloatingDelayGroup,
|
|
51
53
|
{
|
|
52
|
-
|
|
53
|
-
className: cx(
|
|
54
|
-
'iui-side-navigation',
|
|
55
|
-
{
|
|
56
|
-
'iui-expanded': isExpanded,
|
|
57
|
-
'iui-collapsed': !isExpanded,
|
|
58
|
-
},
|
|
59
|
-
className,
|
|
60
|
-
),
|
|
61
|
-
...rest,
|
|
54
|
+
delay: defaultTooltipDelay,
|
|
62
55
|
},
|
|
63
|
-
'top' === expanderPlacement && ExpandButton,
|
|
64
56
|
React.createElement(
|
|
65
57
|
Box,
|
|
66
58
|
{
|
|
67
59
|
as: 'div',
|
|
68
|
-
|
|
69
|
-
|
|
60
|
+
className: cx(
|
|
61
|
+
'iui-side-navigation',
|
|
62
|
+
{
|
|
63
|
+
'iui-expanded': isExpanded,
|
|
64
|
+
'iui-collapsed': !isExpanded,
|
|
65
|
+
},
|
|
66
|
+
className,
|
|
67
|
+
),
|
|
68
|
+
...rest,
|
|
70
69
|
},
|
|
70
|
+
'top' === expanderPlacement && ExpandButton,
|
|
71
71
|
React.createElement(
|
|
72
72
|
Box,
|
|
73
73
|
{
|
|
74
74
|
as: 'div',
|
|
75
|
-
...
|
|
76
|
-
className: cx('iui-
|
|
77
|
-
},
|
|
78
|
-
items,
|
|
79
|
-
),
|
|
80
|
-
React.createElement(
|
|
81
|
-
Box,
|
|
82
|
-
{
|
|
83
|
-
as: 'div',
|
|
84
|
-
...bottomProps,
|
|
85
|
-
className: cx('iui-bottom', bottomProps?.className),
|
|
75
|
+
...contentProps,
|
|
76
|
+
className: cx('iui-sidenav-content', contentProps?.className),
|
|
86
77
|
},
|
|
87
|
-
|
|
78
|
+
React.createElement(
|
|
79
|
+
Box,
|
|
80
|
+
{
|
|
81
|
+
as: 'div',
|
|
82
|
+
...topProps,
|
|
83
|
+
className: cx('iui-top', topProps?.className),
|
|
84
|
+
},
|
|
85
|
+
items,
|
|
86
|
+
),
|
|
87
|
+
React.createElement(
|
|
88
|
+
Box,
|
|
89
|
+
{
|
|
90
|
+
as: 'div',
|
|
91
|
+
...bottomProps,
|
|
92
|
+
className: cx('iui-bottom', bottomProps?.className),
|
|
93
|
+
},
|
|
94
|
+
secondaryItems,
|
|
95
|
+
),
|
|
88
96
|
),
|
|
97
|
+
'bottom' === expanderPlacement && ExpandButton,
|
|
89
98
|
),
|
|
90
|
-
'bottom' === expanderPlacement && ExpandButton,
|
|
91
99
|
),
|
|
92
100
|
submenu && isSubmenuOpen ? submenu : null,
|
|
93
101
|
),
|
|
@@ -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, {
|
|
@@ -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(() => {
|
|
@@ -295,7 +295,7 @@ let TabsPanel = React.forwardRef((props, ref) => {
|
|
|
295
295
|
className: cx('iui-tabs-content', className),
|
|
296
296
|
'aria-labelledby': `${idPrefix}-tab-${value.replaceAll(' ', '-')}`,
|
|
297
297
|
role: 'tabpanel',
|
|
298
|
-
hidden: activeValue !== value
|
|
298
|
+
hidden: activeValue !== value ? true : void 0,
|
|
299
299
|
ref: ref,
|
|
300
300
|
...rest,
|
|
301
301
|
id: `${idPrefix}-panel-${value.replaceAll(' ', '-')}`,
|
|
@@ -132,7 +132,7 @@ let Root = React.forwardRef((props, forwardedRef) => {
|
|
|
132
132
|
),
|
|
133
133
|
'data-iui-theme': shouldApplyDark ? 'dark' : 'light',
|
|
134
134
|
'data-iui-contrast': shouldApplyHC ? 'high' : 'default',
|
|
135
|
-
'data-iui-bridge':
|
|
135
|
+
'data-iui-bridge': future?.themeBridge ? true : void 0,
|
|
136
136
|
ref: forwardedRef,
|
|
137
137
|
...rest,
|
|
138
138
|
},
|
|
@@ -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
|
}),
|
|
@@ -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
|
},
|
|
@@ -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/DEV-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,
|
|
@@ -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();
|
|
@@ -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,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,
|
|
@@ -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;
|