@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
|
@@ -7,7 +7,6 @@ import { DialogContext } from './DialogContext.js';
|
|
|
7
7
|
import { DialogButtonBar } from './DialogButtonBar.js';
|
|
8
8
|
import { DialogMain } from './DialogMain.js';
|
|
9
9
|
import { useMergedRefs, Box, Portal } from '../../utils/index.js';
|
|
10
|
-
import { Transition } from 'react-transition-group';
|
|
11
10
|
let DialogComponent = React.forwardRef((props, ref) => {
|
|
12
11
|
let {
|
|
13
12
|
trapFocus = false,
|
|
@@ -27,49 +26,40 @@ let DialogComponent = React.forwardRef((props, ref) => {
|
|
|
27
26
|
...rest
|
|
28
27
|
} = props;
|
|
29
28
|
let dialogRootRef = React.useRef(null);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
timeout: {
|
|
35
|
-
exit: 600,
|
|
36
|
-
},
|
|
37
|
-
mountOnEnter: true,
|
|
38
|
-
unmountOnExit: true,
|
|
39
|
-
},
|
|
40
|
-
React.createElement(
|
|
41
|
-
DialogContext.Provider,
|
|
42
|
-
{
|
|
43
|
-
value: {
|
|
44
|
-
isOpen,
|
|
45
|
-
onClose,
|
|
46
|
-
closeOnEsc,
|
|
47
|
-
closeOnExternalClick,
|
|
48
|
-
isDismissible,
|
|
49
|
-
preventDocumentScroll,
|
|
50
|
-
trapFocus,
|
|
51
|
-
setFocus,
|
|
52
|
-
isDraggable,
|
|
53
|
-
isResizable,
|
|
54
|
-
relativeTo,
|
|
55
|
-
dialogRootRef,
|
|
56
|
-
placement,
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
React.createElement(
|
|
60
|
-
Portal,
|
|
29
|
+
let mergedRefs = useMergedRefs(ref, dialogRootRef);
|
|
30
|
+
return isOpen
|
|
31
|
+
? React.createElement(
|
|
32
|
+
DialogContext.Provider,
|
|
61
33
|
{
|
|
62
|
-
|
|
34
|
+
value: {
|
|
35
|
+
isOpen,
|
|
36
|
+
onClose,
|
|
37
|
+
closeOnEsc,
|
|
38
|
+
closeOnExternalClick,
|
|
39
|
+
isDismissible,
|
|
40
|
+
preventDocumentScroll,
|
|
41
|
+
trapFocus,
|
|
42
|
+
setFocus,
|
|
43
|
+
isDraggable,
|
|
44
|
+
isResizable,
|
|
45
|
+
relativeTo,
|
|
46
|
+
placement,
|
|
47
|
+
},
|
|
63
48
|
},
|
|
64
|
-
React.createElement(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
49
|
+
React.createElement(
|
|
50
|
+
Portal,
|
|
51
|
+
{
|
|
52
|
+
portal: portal,
|
|
53
|
+
},
|
|
54
|
+
React.createElement(Box, {
|
|
55
|
+
className: cx('iui-dialog-wrapper', className),
|
|
56
|
+
'data-iui-relative': 'container' === relativeTo,
|
|
57
|
+
ref: mergedRefs,
|
|
58
|
+
...rest,
|
|
59
|
+
}),
|
|
60
|
+
),
|
|
61
|
+
)
|
|
62
|
+
: null;
|
|
73
63
|
});
|
|
74
64
|
export const Dialog = Object.assign(DialogComponent, {
|
|
75
65
|
Backdrop: DialogBackdrop,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BackdropProps } from '../Backdrop/Backdrop.js';
|
|
2
2
|
import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
|
|
3
|
-
import type
|
|
3
|
+
import { type DialogContextProps } from './DialogContext.js';
|
|
4
4
|
type DialogBackdropProps = BackdropProps & Pick<DialogContextProps, 'onClose' | 'isDismissible' | 'closeOnExternalClick' | 'relativeTo'>;
|
|
5
5
|
/**
|
|
6
6
|
* Backdrop component for dialog. Recommended to be used with `Dialog`
|
|
@@ -2,9 +2,11 @@ import * as React from 'react';
|
|
|
2
2
|
import { Backdrop } from '../Backdrop/Backdrop.js';
|
|
3
3
|
import { useMergedRefs } from '../../utils/index.js';
|
|
4
4
|
import { useDialogContext } from './DialogContext.js';
|
|
5
|
+
import { useDialogMainContext } from './DialogMainContext.js';
|
|
5
6
|
import cx from 'classnames';
|
|
6
7
|
export const DialogBackdrop = React.forwardRef((props, ref) => {
|
|
7
8
|
let dialogContext = useDialogContext();
|
|
9
|
+
let dialogMainContext = useDialogMainContext();
|
|
8
10
|
let {
|
|
9
11
|
isVisible = dialogContext.isOpen,
|
|
10
12
|
isDismissible = dialogContext.isDismissible,
|
|
@@ -21,7 +23,10 @@ export const DialogBackdrop = React.forwardRef((props, ref) => {
|
|
|
21
23
|
let handleMouseDown = (event) => {
|
|
22
24
|
event.persist();
|
|
23
25
|
if (event.target !== backdropRef.current) return;
|
|
24
|
-
if (isDismissible && closeOnExternalClick && onClose)
|
|
26
|
+
if (isDismissible && closeOnExternalClick && onClose) {
|
|
27
|
+
dialogMainContext?.beforeClose();
|
|
28
|
+
onClose(event);
|
|
29
|
+
}
|
|
25
30
|
onMouseDown?.(event);
|
|
26
31
|
};
|
|
27
32
|
return React.createElement(Backdrop, {
|
|
@@ -83,7 +83,7 @@ export type DialogContextProps = {
|
|
|
83
83
|
/**
|
|
84
84
|
* Dialog root ref. For internal use.
|
|
85
85
|
*/
|
|
86
|
-
dialogRootRef?: React.RefObject<HTMLDivElement>;
|
|
86
|
+
dialogRootRef?: React.RefObject<HTMLDivElement | null>;
|
|
87
87
|
/**
|
|
88
88
|
* Determines the positioning of Dialog on page.
|
|
89
89
|
*/
|
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
ShadowRoot,
|
|
11
11
|
} from '../../utils/index.js';
|
|
12
12
|
import { useDialogContext } from './DialogContext.js';
|
|
13
|
-
import { Transition } from 'react-transition-group';
|
|
14
13
|
import { DialogDragContext } from './DialogDragContext.js';
|
|
15
14
|
import { useDragAndDrop } from '../../utils/hooks/useDragAndDrop.js';
|
|
15
|
+
import { DialogMainContext } from './DialogMainContext.js';
|
|
16
16
|
export const DialogMain = React.forwardRef((props, ref) => {
|
|
17
17
|
let dialogContext = useDialogContext();
|
|
18
18
|
let {
|
|
@@ -33,12 +33,13 @@ export const DialogMain = React.forwardRef((props, ref) => {
|
|
|
33
33
|
placement = dialogContext.placement,
|
|
34
34
|
...rest
|
|
35
35
|
} = props;
|
|
36
|
-
let
|
|
36
|
+
let { dialogRootRef } = dialogContext;
|
|
37
37
|
let dialogRef = React.useRef(null);
|
|
38
|
+
let previousFocusedElement = React.useRef(null);
|
|
39
|
+
let [style, setStyle] = React.useState();
|
|
38
40
|
let hasBeenResized = React.useRef(false);
|
|
39
|
-
let previousFocusedElement = React.useRef();
|
|
40
41
|
let originalBodyOverflow = React.useRef('');
|
|
41
|
-
|
|
42
|
+
useLayoutEffect(() => {
|
|
42
43
|
if (isOpen) originalBodyOverflow.current = document.body.style.overflow;
|
|
43
44
|
}, [isOpen]);
|
|
44
45
|
React.useEffect(() => {
|
|
@@ -54,17 +55,19 @@ export const DialogMain = React.forwardRef((props, ref) => {
|
|
|
54
55
|
return () => {
|
|
55
56
|
ownerDocument.body.style.overflow = originalBodyOverflow.current;
|
|
56
57
|
};
|
|
57
|
-
}, [isOpen, preventDocumentScroll]);
|
|
58
|
+
}, [dialogRef, isOpen, preventDocumentScroll]);
|
|
58
59
|
let handleKeyDown = (event) => {
|
|
59
60
|
if (event.altKey) return;
|
|
60
61
|
event.persist();
|
|
61
|
-
if (isDismissible && closeOnEsc && 'Escape' === event.key && onClose)
|
|
62
|
+
if (isDismissible && closeOnEsc && 'Escape' === event.key && onClose) {
|
|
63
|
+
beforeClose();
|
|
62
64
|
onClose(event);
|
|
65
|
+
}
|
|
63
66
|
onKeyDown?.(event);
|
|
64
67
|
};
|
|
65
68
|
let { onPointerDown, transform } = useDragAndDrop(
|
|
66
69
|
dialogRef,
|
|
67
|
-
|
|
70
|
+
dialogRootRef,
|
|
68
71
|
isDraggable,
|
|
69
72
|
);
|
|
70
73
|
let handlePointerDown = React.useCallback(
|
|
@@ -84,13 +87,35 @@ export const DialogMain = React.forwardRef((props, ref) => {
|
|
|
84
87
|
insetBlockStart: dialogRef.current?.offsetTop,
|
|
85
88
|
transform: `translate(${translateX}px,${translateY}px)`,
|
|
86
89
|
}));
|
|
87
|
-
}, [isDraggable, isOpen]);
|
|
90
|
+
}, [dialogRef, isDraggable, isOpen]);
|
|
88
91
|
let setResizeStyle = React.useCallback((newStyle) => {
|
|
89
92
|
setStyle((oldStyle) => ({
|
|
90
93
|
...oldStyle,
|
|
91
94
|
...newStyle,
|
|
92
95
|
}));
|
|
93
96
|
}, []);
|
|
97
|
+
let onEnter = React.useCallback(() => {
|
|
98
|
+
previousFocusedElement.current =
|
|
99
|
+
dialogRef.current?.ownerDocument.activeElement;
|
|
100
|
+
if (setFocus)
|
|
101
|
+
dialogRef.current?.focus({
|
|
102
|
+
preventScroll: true,
|
|
103
|
+
});
|
|
104
|
+
}, [dialogRef, previousFocusedElement, setFocus]);
|
|
105
|
+
let beforeClose = React.useCallback(() => {
|
|
106
|
+
if (
|
|
107
|
+
dialogRef.current?.contains(
|
|
108
|
+
dialogRef.current?.ownerDocument.activeElement,
|
|
109
|
+
)
|
|
110
|
+
)
|
|
111
|
+
previousFocusedElement.current?.focus();
|
|
112
|
+
}, [dialogRef, previousFocusedElement]);
|
|
113
|
+
let mountRef = React.useCallback(
|
|
114
|
+
(element) => {
|
|
115
|
+
if (element) onEnter();
|
|
116
|
+
},
|
|
117
|
+
[onEnter],
|
|
118
|
+
);
|
|
94
119
|
let content = React.createElement(
|
|
95
120
|
Box,
|
|
96
121
|
{
|
|
@@ -105,7 +130,7 @@ export const DialogMain = React.forwardRef((props, ref) => {
|
|
|
105
130
|
className,
|
|
106
131
|
),
|
|
107
132
|
role: 'dialog',
|
|
108
|
-
ref: useMergedRefs(dialogRef, ref),
|
|
133
|
+
ref: useMergedRefs(dialogRef, mountRef, ref),
|
|
109
134
|
onKeyDown: handleKeyDown,
|
|
110
135
|
tabIndex: -1,
|
|
111
136
|
'data-iui-placement': placement,
|
|
@@ -123,7 +148,7 @@ export const DialogMain = React.forwardRef((props, ref) => {
|
|
|
123
148
|
isResizable &&
|
|
124
149
|
React.createElement(Resizer, {
|
|
125
150
|
elementRef: dialogRef,
|
|
126
|
-
containerRef:
|
|
151
|
+
containerRef: dialogRootRef,
|
|
127
152
|
onResizeStart: () => {
|
|
128
153
|
if (!hasBeenResized.current) {
|
|
129
154
|
hasBeenResized.current = true;
|
|
@@ -138,31 +163,14 @@ export const DialogMain = React.forwardRef((props, ref) => {
|
|
|
138
163
|
children,
|
|
139
164
|
);
|
|
140
165
|
return React.createElement(
|
|
141
|
-
|
|
166
|
+
DialogMainContext.Provider,
|
|
142
167
|
{
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
previousFocusedElement.current =
|
|
150
|
-
dialogRef.current?.ownerDocument.activeElement;
|
|
151
|
-
setFocus &&
|
|
152
|
-
dialogRef.current?.focus({
|
|
153
|
-
preventScroll: true,
|
|
154
|
-
});
|
|
155
|
-
},
|
|
156
|
-
onExit: () => {
|
|
157
|
-
if (
|
|
158
|
-
dialogRef.current?.contains(
|
|
159
|
-
dialogRef.current?.ownerDocument.activeElement,
|
|
160
|
-
)
|
|
161
|
-
)
|
|
162
|
-
previousFocusedElement.current?.focus();
|
|
163
|
-
},
|
|
164
|
-
unmountOnExit: true,
|
|
165
|
-
nodeRef: dialogRef,
|
|
168
|
+
value: React.useMemo(
|
|
169
|
+
() => ({
|
|
170
|
+
beforeClose,
|
|
171
|
+
}),
|
|
172
|
+
[beforeClose],
|
|
173
|
+
),
|
|
166
174
|
},
|
|
167
175
|
React.createElement(
|
|
168
176
|
DialogDragContext.Provider,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type DialogMainContextProps = {
|
|
3
|
+
beforeClose: () => void;
|
|
4
|
+
};
|
|
5
|
+
export declare const DialogMainContext: React.Context<DialogMainContextProps | null>;
|
|
6
|
+
export declare const useDialogMainContext: () => DialogMainContextProps | null;
|
|
7
|
+
export {};
|
|
@@ -3,11 +3,13 @@ import cx from 'classnames';
|
|
|
3
3
|
import { SvgClose, mergeEventHandlers, Box } from '../../utils/index.js';
|
|
4
4
|
import { IconButton } from '../Buttons/IconButton.js';
|
|
5
5
|
import { useDialogContext } from './DialogContext.js';
|
|
6
|
+
import { useDialogMainContext } from './DialogMainContext.js';
|
|
6
7
|
import { DialogTitleBarTitle } from './DialogTitleBarTitle.js';
|
|
7
8
|
import { useDialogDragContext } from './DialogDragContext.js';
|
|
8
9
|
export const DialogTitleBar = Object.assign(
|
|
9
10
|
React.forwardRef((props, ref) => {
|
|
10
11
|
let dialogContext = useDialogContext();
|
|
12
|
+
let dialogMainContext = useDialogMainContext();
|
|
11
13
|
let {
|
|
12
14
|
children,
|
|
13
15
|
titleText,
|
|
@@ -19,6 +21,13 @@ export const DialogTitleBar = Object.assign(
|
|
|
19
21
|
...rest
|
|
20
22
|
} = props;
|
|
21
23
|
let { onPointerDown } = useDialogDragContext();
|
|
24
|
+
let onClick = React.useCallback(
|
|
25
|
+
(e) => {
|
|
26
|
+
dialogMainContext?.beforeClose();
|
|
27
|
+
onClose?.(e);
|
|
28
|
+
},
|
|
29
|
+
[dialogMainContext, onClose],
|
|
30
|
+
);
|
|
22
31
|
return React.createElement(
|
|
23
32
|
Box,
|
|
24
33
|
{
|
|
@@ -41,7 +50,7 @@ export const DialogTitleBar = Object.assign(
|
|
|
41
50
|
{
|
|
42
51
|
size: 'small',
|
|
43
52
|
styleType: 'borderless',
|
|
44
|
-
onClick:
|
|
53
|
+
onClick: onClick,
|
|
45
54
|
'aria-label': 'Close',
|
|
46
55
|
'data-iui-shift': 'right',
|
|
47
56
|
},
|
|
@@ -6,7 +6,7 @@ export type DropdownMenuProps = {
|
|
|
6
6
|
* List of menu items. Recommended to use MenuItem component.
|
|
7
7
|
* You can pass function that takes argument `close` that closes the dropdown menu, or a list of MenuItems.
|
|
8
8
|
*/
|
|
9
|
-
menuItems: ((close: () => void) => JSX.Element[]) | JSX.Element[] | JSX.Element;
|
|
9
|
+
menuItems: ((close: () => void) => React.JSX.Element[]) | React.JSX.Element[] | React.JSX.Element;
|
|
10
10
|
/**
|
|
11
11
|
* ARIA role. Role of menu. For menu use 'menu', for select use 'listbox'.
|
|
12
12
|
* @default 'menu'
|
|
@@ -103,9 +103,7 @@ export declare const ExpandableBlock: PolymorphicForwardRefComponent<"div", Expa
|
|
|
103
103
|
* <ExpandableBlock.EndIcon> <SvgIcon/> </ExpandableBlock.EndIcon>
|
|
104
104
|
* <ExpandableBlock.Trigger/>
|
|
105
105
|
*/
|
|
106
|
-
EndIcon: PolymorphicForwardRefComponent<"span", Omit<Omit<
|
|
107
|
-
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
108
|
-
}, "fill" | "as" | "key" | "size" | keyof React.HTMLAttributes<HTMLSpanElement> | "padded"> & {
|
|
106
|
+
EndIcon: PolymorphicForwardRefComponent<"span", Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "fill" | "as" | "key" | "size" | keyof React.HTMLAttributes<HTMLSpanElement> | "padded"> & {
|
|
109
107
|
size?: "auto" | "small" | "medium" | "large" | import("../../utils/types.js").AnyString;
|
|
110
108
|
fill?: "default" | "positive" | "informational" | "negative" | "warning" | import("../../utils/types.js").AnyString;
|
|
111
109
|
padded?: boolean;
|
|
@@ -53,7 +53,7 @@ type HeaderProps = {
|
|
|
53
53
|
* Pass a function that takes the `close` argument (to close the menu),
|
|
54
54
|
* and returns a list of `MenuItem` components.
|
|
55
55
|
*/
|
|
56
|
-
menuItems?: (close: () => void) => JSX.Element[];
|
|
56
|
+
menuItems?: (close: () => void) => React.JSX.Element[];
|
|
57
57
|
/**
|
|
58
58
|
* If true, the header height is reduced, typically used when viewing 3D content.
|
|
59
59
|
* @default false
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
|
|
2
3
|
type HeaderLogoOwnProps = {
|
|
3
4
|
/**
|
|
4
5
|
* Logo shown before the main content.
|
|
5
6
|
*/
|
|
6
|
-
logo: JSX.Element;
|
|
7
|
+
logo: React.JSX.Element;
|
|
7
8
|
/**
|
|
8
9
|
* Click event handler.
|
|
9
10
|
* If passed, the component will be rendered as a `<button>` rather than `<div>`.
|
|
@@ -15,9 +15,7 @@ import type { InputProps } from '../Input/Input.js';
|
|
|
15
15
|
* </InputWithDecorations.Icon>
|
|
16
16
|
* </InputWithDecorations>
|
|
17
17
|
*/
|
|
18
|
-
export declare const InputWithDecorations: PolymorphicForwardRefComponent<"div", Omit<
|
|
19
|
-
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
20
|
-
}, "as" | keyof import("../../utils/index.js").InputFlexContainerProps> & import("../../utils/index.js").InputFlexContainerProps & {
|
|
18
|
+
export declare const InputWithDecorations: PolymorphicForwardRefComponent<"div", Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "as" | keyof import("../../utils/index.js").InputFlexContainerProps> & import("../../utils/index.js").InputFlexContainerProps & {
|
|
21
19
|
as?: "div" | undefined;
|
|
22
20
|
}> & {
|
|
23
21
|
/**
|
|
@@ -30,9 +28,7 @@ export declare const InputWithDecorations: PolymorphicForwardRefComponent<"div",
|
|
|
30
28
|
* Although similar to `IconButton`, this subcomponent additionally collapses the padding between the button and the input/textarea
|
|
31
29
|
* in `InputWithDecorations`.
|
|
32
30
|
*/
|
|
33
|
-
Button: PolymorphicForwardRefComponent<"button", Omit<
|
|
34
|
-
ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
|
|
35
|
-
}, "label" | "title" | "as" | "size" | "htmlDisabled" | "styleType" | "labelProps" | "stretched" | "isActive" | "iconProps"> & Omit<import("../Buttons/IconButton.js").IconButtonProps, "styleType"> & {
|
|
31
|
+
Button: PolymorphicForwardRefComponent<"button", Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "label" | "title" | "as" | "size" | "htmlDisabled" | "styleType" | "labelProps" | "stretched" | "isActive" | "iconProps"> & Omit<import("../Buttons/IconButton.js").IconButtonProps, "styleType"> & {
|
|
36
32
|
styleType?: import("../Buttons/IconButton.js").IconButtonProps["styleType"];
|
|
37
33
|
} & {
|
|
38
34
|
as?: "button" | undefined;
|
package/esm/core/Label/Label.js
CHANGED
|
@@ -38,7 +38,7 @@ export type LabeledSelectProps<T> = {
|
|
|
38
38
|
*
|
|
39
39
|
* Custom svg icon. Will override status icon if specified.
|
|
40
40
|
*/
|
|
41
|
-
svgIcon?: JSX.Element;
|
|
41
|
+
svgIcon?: React.JSX.Element;
|
|
42
42
|
/**
|
|
43
43
|
* If true, shows a red asterisk.
|
|
44
44
|
*
|
|
@@ -104,4 +104,4 @@ export type LabeledSelectProps<T> = {
|
|
|
104
104
|
*/
|
|
105
105
|
export declare const LabeledSelect: <T>(props: LabeledSelectProps<T> & {
|
|
106
106
|
ref?: React.ForwardedRef<HTMLElement>;
|
|
107
|
-
}) => JSX.Element;
|
|
107
|
+
}) => React.JSX.Element;
|
package/esm/core/List/List.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { type PolymorphicForwardRefComponent } from '../../utils/index.js';
|
|
2
|
+
export declare const List: PolymorphicForwardRefComponent<"div">;
|
package/esm/core/List/List.js
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
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
|
});
|
|
@@ -32,21 +32,21 @@ export type MenuItemProps = {
|
|
|
32
32
|
/**
|
|
33
33
|
* SVG icon component shown on the left.
|
|
34
34
|
*/
|
|
35
|
-
startIcon?: JSX.Element;
|
|
35
|
+
startIcon?: React.JSX.Element;
|
|
36
36
|
/**
|
|
37
37
|
* @deprecated Use startIcon.
|
|
38
38
|
* SVG icon component shown on the left.
|
|
39
39
|
*/
|
|
40
|
-
icon?: JSX.Element;
|
|
40
|
+
icon?: React.JSX.Element;
|
|
41
41
|
/**
|
|
42
42
|
* SVG icon component shown on the right.
|
|
43
43
|
*/
|
|
44
|
-
endIcon?: JSX.Element;
|
|
44
|
+
endIcon?: React.JSX.Element;
|
|
45
45
|
/**
|
|
46
46
|
* @deprecated Use endIcon.
|
|
47
47
|
* SVG icon component shown on the right.
|
|
48
48
|
*/
|
|
49
|
-
badge?: JSX.Element;
|
|
49
|
+
badge?: React.JSX.Element;
|
|
50
50
|
/**
|
|
51
51
|
* ARIA role. For menu item use 'menuitem', for select item use 'option'.
|
|
52
52
|
* @default 'menuitem'
|
|
@@ -55,7 +55,7 @@ export type MenuItemProps = {
|
|
|
55
55
|
/**
|
|
56
56
|
* Items to be shown in the submenu when hovered over the item.
|
|
57
57
|
*/
|
|
58
|
-
subMenuItems?: JSX.Element[];
|
|
58
|
+
subMenuItems?: React.JSX.Element[];
|
|
59
59
|
/**
|
|
60
60
|
* Content of the menu item.
|
|
61
61
|
*/
|
|
@@ -46,7 +46,7 @@ type PanelProps = {
|
|
|
46
46
|
};
|
|
47
47
|
type PanelTriggerProps = {
|
|
48
48
|
for: string;
|
|
49
|
-
children: React.ReactElement
|
|
49
|
+
children: React.ReactElement<any>;
|
|
50
50
|
};
|
|
51
51
|
type PanelHeaderProps = {
|
|
52
52
|
titleProps?: React.ComponentProps<typeof Text>;
|
|
@@ -134,7 +134,7 @@ export declare const Panels: {
|
|
|
134
134
|
* </ListItem>
|
|
135
135
|
*/
|
|
136
136
|
Trigger: {
|
|
137
|
-
(props: PanelTriggerProps): string | number | true | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null;
|
|
137
|
+
(props: PanelTriggerProps): 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;
|
|
138
138
|
displayName: string;
|
|
139
139
|
};
|
|
140
140
|
/**
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
useWarningLogger,
|
|
13
13
|
useLayoutEffect,
|
|
14
14
|
useLatestRef,
|
|
15
|
+
useId,
|
|
15
16
|
} from '../../utils/index.js';
|
|
16
17
|
import { IconButton } from '../Buttons/IconButton.js';
|
|
17
18
|
import { Flex } from '../Flex/Flex.js';
|
|
@@ -131,7 +132,7 @@ let Panel = React.forwardRef((props, forwardedRef) => {
|
|
|
131
132
|
className: cx('iui-panel', className),
|
|
132
133
|
'aria-labelledby': `${id}-header-title`,
|
|
133
134
|
role: 'group',
|
|
134
|
-
inert: isInert ? '' : void 0,
|
|
135
|
+
inert: isInert ? 'true' : void 0,
|
|
135
136
|
'data-iui-transitioning': isTransitioning ? 'true' : void 0,
|
|
136
137
|
...rest,
|
|
137
138
|
},
|
|
@@ -152,7 +153,7 @@ let PanelTrigger = (props) => {
|
|
|
152
153
|
panels,
|
|
153
154
|
} = useSafeContext(PanelsWrapperContext);
|
|
154
155
|
let { id: panelId } = useSafeContext(PanelContext);
|
|
155
|
-
let fallbackId =
|
|
156
|
+
let fallbackId = useId();
|
|
156
157
|
let triggerId = children.props.id || fallbackId;
|
|
157
158
|
let onClick = React.useCallback(() => {
|
|
158
159
|
if (null == activePanel) return;
|
|
@@ -142,7 +142,7 @@ export declare const usePopover: (options: PopoverOptions & PopoverInternalProps
|
|
|
142
142
|
events: import("@floating-ui/react").FloatingEvents;
|
|
143
143
|
dataRef: React.MutableRefObject<import("@floating-ui/react").ContextData>;
|
|
144
144
|
nodeId: string | undefined;
|
|
145
|
-
floatingId: string;
|
|
145
|
+
floatingId: string | undefined;
|
|
146
146
|
refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
|
|
147
147
|
elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
|
|
148
148
|
};
|
|
@@ -68,7 +68,7 @@ import { usePopover } from '../Popover/Popover.js';
|
|
|
68
68
|
*/
|
|
69
69
|
export declare const Select: <T>(props: SelectProps<T> & {
|
|
70
70
|
ref?: React.ForwardedRef<HTMLElement>;
|
|
71
|
-
}) => JSX.Element;
|
|
71
|
+
}) => React.JSX.Element;
|
|
72
72
|
export type SelectProps<T> = Omit<React.ComponentPropsWithoutRef<'div'>, 'onChange' | 'placeholder' | 'value' | 'defaultValue'> & (({
|
|
73
73
|
/**
|
|
74
74
|
* If true, the native `<select>` element will be rendered.
|
|
@@ -170,7 +170,7 @@ export type CustomSelectProps<T> = SelectCommonProps & {
|
|
|
170
170
|
/**
|
|
171
171
|
* Custom renderer for an item in the dropdown list. `MenuItem` item props are going to be populated if not provided.
|
|
172
172
|
*/
|
|
173
|
-
itemRenderer?: (option: SelectOption<T>, itemProps: ItemRendererProps) => JSX.Element;
|
|
173
|
+
itemRenderer?: (option: SelectOption<T>, itemProps: ItemRendererProps) => React.JSX.Element;
|
|
174
174
|
/**
|
|
175
175
|
* Custom class for menu.
|
|
176
176
|
*/
|
|
@@ -211,7 +211,7 @@ export type SelectMultipleTypeProps<T> = {
|
|
|
211
211
|
* Custom renderer for the selected item in select.
|
|
212
212
|
* If `multiple` is enabled, it will give array of options to render.
|
|
213
213
|
*/
|
|
214
|
-
selectedItemRenderer?: (option: SelectOption<T>) => JSX.Element;
|
|
214
|
+
selectedItemRenderer?: (option: SelectOption<T>) => React.JSX.Element;
|
|
215
215
|
/**
|
|
216
216
|
* Selected option value.
|
|
217
217
|
* If `multiple` is enabled, it is an array of values.
|
|
@@ -225,7 +225,7 @@ export type SelectMultipleTypeProps<T> = {
|
|
|
225
225
|
onChange?: (value: T) => void;
|
|
226
226
|
} | {
|
|
227
227
|
multiple: true;
|
|
228
|
-
selectedItemRenderer?: (options: SelectOption<T>[]) => JSX.Element;
|
|
228
|
+
selectedItemRenderer?: (options: SelectOption<T>[]) => React.JSX.Element;
|
|
229
229
|
value?: T[];
|
|
230
230
|
onChange?: (value: T, event: SelectValueChangeEvent) => void;
|
|
231
231
|
};
|
|
@@ -263,11 +263,11 @@ export type SelectOption<T> = {
|
|
|
263
263
|
* @deprecated Use startIcon
|
|
264
264
|
* SVG icon component shown on the left.
|
|
265
265
|
*/
|
|
266
|
-
icon?: JSX.Element;
|
|
266
|
+
icon?: React.JSX.Element;
|
|
267
267
|
/**
|
|
268
268
|
* SVG icon component shown on the left.
|
|
269
269
|
*/
|
|
270
|
-
startIcon?: JSX.Element;
|
|
270
|
+
startIcon?: React.JSX.Element;
|
|
271
271
|
/**
|
|
272
272
|
* Item is disabled.
|
|
273
273
|
*/
|
|
@@ -25,12 +25,12 @@ type SideNavigationProps = {
|
|
|
25
25
|
*/
|
|
26
26
|
onExpanderClick?: () => void;
|
|
27
27
|
/**
|
|
28
|
-
* Submenu to show supplemental info
|
|
28
|
+
* Submenu to show supplemental info associated to the main item.
|
|
29
29
|
*
|
|
30
30
|
* Should be used with the `isSubmenuOpen` props from both `SideNavigation` and `SidenavButton`.
|
|
31
31
|
* @example
|
|
32
32
|
* <SideNavigation
|
|
33
|
-
* //
|
|
33
|
+
* // …
|
|
34
34
|
* submenu={(
|
|
35
35
|
* <SidenavSubmenu>
|
|
36
36
|
* <SidenavSubmenuHeader>Documents</SidenavSubmenuHeader>
|
|
@@ -40,7 +40,7 @@ type SideNavigationProps = {
|
|
|
40
40
|
* isSubmenuOpen={true}
|
|
41
41
|
* />
|
|
42
42
|
*/
|
|
43
|
-
submenu?: JSX.Element;
|
|
43
|
+
submenu?: React.JSX.Element;
|
|
44
44
|
/**
|
|
45
45
|
* Set to true to display the provided `submenu`.
|
|
46
46
|
*
|