@itwin/itwinui-react 3.0.0-dev.0 → 3.0.0-dev.2
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 +38 -0
- package/README.md +28 -22
- package/cjs/core/Alert/Alert.d.ts +47 -29
- package/cjs/core/Alert/Alert.js +73 -22
- package/cjs/core/Avatar/Avatar.d.ts +0 -1
- package/cjs/core/Avatar/Avatar.js +1 -2
- package/cjs/core/AvatarGroup/AvatarGroup.d.ts +0 -1
- package/cjs/core/AvatarGroup/AvatarGroup.js +1 -2
- package/cjs/core/Backdrop/Backdrop.d.ts +0 -1
- package/cjs/core/Backdrop/Backdrop.js +0 -1
- package/cjs/core/Badge/Badge.d.ts +0 -1
- package/cjs/core/Badge/Badge.js +0 -1
- package/cjs/core/Breadcrumbs/Breadcrumbs.d.ts +0 -1
- package/cjs/core/Breadcrumbs/Breadcrumbs.js +2 -4
- package/cjs/core/ButtonGroup/ButtonGroup.d.ts +0 -1
- package/cjs/core/ButtonGroup/ButtonGroup.js +1 -5
- package/cjs/core/Buttons/Button/Button.d.ts +0 -1
- package/cjs/core/Buttons/Button/Button.js +0 -1
- package/cjs/core/Buttons/DropdownButton/DropdownButton.d.ts +0 -1
- package/cjs/core/Buttons/DropdownButton/DropdownButton.js +3 -6
- package/cjs/core/Buttons/IconButton/IconButton.d.ts +0 -2
- package/cjs/core/Buttons/IconButton/IconButton.js +0 -2
- package/cjs/core/Buttons/SplitButton/SplitButton.d.ts +0 -1
- package/cjs/core/Buttons/SplitButton/SplitButton.js +0 -1
- package/cjs/core/Carousel/Carousel.d.ts +2 -3
- package/cjs/core/Carousel/Carousel.js +3 -6
- package/cjs/core/Carousel/CarouselDotsList.d.ts +0 -1
- package/cjs/core/Carousel/CarouselDotsList.js +8 -11
- package/cjs/core/Carousel/CarouselNavigation.d.ts +2 -2
- package/cjs/core/Carousel/CarouselNavigation.js +3 -5
- package/cjs/core/Carousel/CarouselSlider.js +10 -15
- package/cjs/core/Checkbox/Checkbox.d.ts +0 -1
- package/cjs/core/Checkbox/Checkbox.js +0 -1
- package/cjs/core/ColorPicker/ColorBuilder.d.ts +0 -1
- package/cjs/core/ColorPicker/ColorBuilder.js +7 -11
- package/cjs/core/ColorPicker/ColorInputPanel.d.ts +0 -1
- package/cjs/core/ColorPicker/ColorInputPanel.js +12 -16
- package/cjs/core/ColorPicker/ColorPalette.d.ts +0 -1
- package/cjs/core/ColorPicker/ColorPalette.js +4 -7
- package/cjs/core/ColorPicker/ColorPicker.d.ts +0 -1
- package/cjs/core/ColorPicker/ColorPicker.js +3 -4
- package/cjs/core/ColorPicker/ColorSwatch.d.ts +0 -1
- package/cjs/core/ColorPicker/ColorSwatch.js +0 -1
- package/cjs/core/ComboBox/ComboBox.d.ts +0 -1
- package/cjs/core/ComboBox/ComboBox.js +25 -33
- package/cjs/core/ComboBox/ComboBoxDropdown.js +1 -2
- package/cjs/core/ComboBox/ComboBoxEndIcon.js +1 -1
- package/cjs/core/ComboBox/ComboBoxInput.js +21 -20
- package/cjs/core/ComboBox/ComboBoxMenu.js +3 -4
- package/cjs/core/ComboBox/ComboBoxMenuItem.js +2 -2
- package/cjs/core/ComboBox/helpers.js +4 -5
- package/cjs/core/DatePicker/DatePicker.d.ts +0 -1
- package/cjs/core/DatePicker/DatePicker.js +32 -33
- package/cjs/core/Dialog/Dialog.d.ts +0 -1
- package/cjs/core/Dialog/Dialog.js +12 -5
- package/cjs/core/Dialog/DialogBackdrop.js +1 -1
- package/cjs/core/Dialog/DialogButtonBar.d.ts +0 -1
- package/cjs/core/Dialog/DialogButtonBar.js +0 -1
- package/cjs/core/Dialog/DialogContent.d.ts +0 -1
- package/cjs/core/Dialog/DialogContent.js +0 -1
- package/cjs/core/Dialog/DialogContext.d.ts +15 -0
- package/cjs/core/Dialog/DialogMain.d.ts +0 -1
- package/cjs/core/Dialog/DialogMain.js +18 -25
- package/cjs/core/Dialog/DialogTitleBar.d.ts +0 -1
- package/cjs/core/Dialog/DialogTitleBar.js +0 -1
- package/cjs/core/Dialog/DialogTitleBarTitle.d.ts +0 -1
- package/cjs/core/Dialog/DialogTitleBarTitle.js +0 -1
- package/cjs/core/DropdownMenu/DropdownMenu.js +6 -8
- package/cjs/core/ExpandableBlock/ExpandableBlock.d.ts +5 -1
- package/cjs/core/ExpandableBlock/ExpandableBlock.js +8 -6
- package/cjs/core/Fieldset/Fieldset.d.ts +0 -1
- package/cjs/core/Fieldset/Fieldset.js +0 -1
- package/cjs/core/FileUpload/FileEmptyCard.js +1 -1
- package/cjs/core/FileUpload/FileUpload.d.ts +0 -1
- package/cjs/core/FileUpload/FileUpload.js +3 -7
- package/cjs/core/FileUpload/FileUploadCard.d.ts +0 -1
- package/cjs/core/FileUpload/FileUploadCard.js +10 -12
- package/cjs/core/FileUpload/FileUploadTemplate.d.ts +0 -1
- package/cjs/core/FileUpload/FileUploadTemplate.js +0 -1
- package/cjs/core/Footer/Footer.d.ts +0 -1
- package/cjs/core/Footer/Footer.js +0 -1
- package/cjs/core/Footer/FooterItem.d.ts +0 -1
- package/cjs/core/Footer/FooterItem.js +0 -1
- package/cjs/core/Footer/FooterList.d.ts +0 -1
- package/cjs/core/Footer/FooterList.js +0 -1
- package/cjs/core/Footer/FooterSeparator.d.ts +0 -1
- package/cjs/core/Footer/FooterSeparator.js +0 -1
- package/cjs/core/Header/Header.d.ts +0 -1
- package/cjs/core/Header/Header.js +0 -1
- package/cjs/core/Header/HeaderBreadcrumbs.d.ts +0 -1
- package/cjs/core/Header/HeaderBreadcrumbs.js +0 -1
- package/cjs/core/Header/HeaderButton.d.ts +0 -1
- package/cjs/core/Header/HeaderButton.js +0 -1
- package/cjs/core/Header/HeaderLogo.d.ts +0 -1
- package/cjs/core/Header/HeaderLogo.js +0 -1
- package/cjs/core/InformationPanel/InformationPanel.d.ts +0 -1
- package/cjs/core/InformationPanel/InformationPanel.js +1 -5
- package/cjs/core/InformationPanel/InformationPanelBody.d.ts +0 -1
- package/cjs/core/InformationPanel/InformationPanelBody.js +0 -1
- package/cjs/core/InformationPanel/InformationPanelContent.d.ts +0 -1
- package/cjs/core/InformationPanel/InformationPanelContent.js +0 -1
- package/cjs/core/InformationPanel/InformationPanelHeader.d.ts +0 -1
- package/cjs/core/InformationPanel/InformationPanelHeader.js +0 -1
- package/cjs/core/InformationPanel/InformationPanelWrapper.d.ts +0 -1
- package/cjs/core/InformationPanel/InformationPanelWrapper.js +0 -1
- package/cjs/core/Input/Input.d.ts +0 -1
- package/cjs/core/Input/Input.js +0 -1
- package/cjs/core/InputGroup/InputGroup.d.ts +0 -1
- package/cjs/core/InputGroup/InputGroup.js +0 -1
- package/cjs/core/Label/Label.d.ts +0 -1
- package/cjs/core/Label/Label.js +0 -1
- package/cjs/core/LabeledInput/LabeledInput.d.ts +0 -1
- package/cjs/core/LabeledInput/LabeledInput.js +1 -2
- package/cjs/core/LabeledSelect/LabeledSelect.d.ts +0 -1
- package/cjs/core/LabeledSelect/LabeledSelect.js +0 -1
- package/cjs/core/LabeledTextarea/LabeledTextarea.d.ts +0 -1
- package/cjs/core/LabeledTextarea/LabeledTextarea.js +1 -2
- package/cjs/core/List/List.d.ts +0 -1
- package/cjs/core/List/List.js +0 -1
- package/cjs/core/List/ListItem.d.ts +0 -1
- package/cjs/core/List/ListItem.js +0 -1
- package/cjs/core/Menu/Menu.d.ts +0 -1
- package/cjs/core/Menu/Menu.js +3 -5
- package/cjs/core/Menu/MenuDivider.d.ts +0 -1
- package/cjs/core/Menu/MenuDivider.js +0 -1
- package/cjs/core/Menu/MenuExtraContent.d.ts +0 -1
- package/cjs/core/Menu/MenuExtraContent.js +0 -1
- package/cjs/core/Menu/MenuItem.d.ts +0 -1
- package/cjs/core/Menu/MenuItem.js +8 -12
- package/cjs/core/Menu/MenuItemSkeleton.d.ts +0 -1
- package/cjs/core/Menu/MenuItemSkeleton.js +0 -1
- package/cjs/core/Modal/Modal.d.ts +8 -10
- package/cjs/core/Modal/Modal.js +7 -18
- package/cjs/core/NonIdealState/NonIdealState.d.ts +0 -1
- package/cjs/core/NonIdealState/NonIdealState.js +0 -1
- package/cjs/core/NotificationMarker/NotificationMarker.d.ts +0 -1
- package/cjs/core/NotificationMarker/NotificationMarker.js +0 -1
- package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.d.ts +0 -1
- package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +0 -1
- package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.d.ts +0 -1
- package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +0 -1
- package/cjs/core/Radio/Radio.d.ts +0 -1
- package/cjs/core/Radio/Radio.js +0 -1
- package/cjs/core/RadioTiles/RadioTile.d.ts +0 -1
- package/cjs/core/RadioTiles/RadioTile.js +0 -1
- package/cjs/core/RadioTiles/RadioTileGroup.d.ts +0 -1
- package/cjs/core/RadioTiles/RadioTileGroup.js +0 -1
- package/cjs/core/SearchBox/SearchBox.d.ts +0 -1
- package/cjs/core/SearchBox/SearchBox.js +12 -13
- package/cjs/core/Select/Select.d.ts +0 -1
- package/cjs/core/Select/Select.js +12 -18
- package/cjs/core/Select/SelectTag.d.ts +0 -1
- package/cjs/core/Select/SelectTag.js +0 -1
- package/cjs/core/SideNavigation/SideNavigation.d.ts +0 -1
- package/cjs/core/SideNavigation/SideNavigation.js +2 -3
- package/cjs/core/SideNavigation/SidenavButton.d.ts +0 -1
- package/cjs/core/SideNavigation/SidenavButton.js +0 -1
- package/cjs/core/SideNavigation/SidenavSubmenu.d.ts +0 -1
- package/cjs/core/SideNavigation/SidenavSubmenu.js +0 -1
- package/cjs/core/SideNavigation/SidenavSubmenuHeader.d.ts +0 -1
- package/cjs/core/SideNavigation/SidenavSubmenuHeader.js +0 -1
- package/cjs/core/SkipToContentLink/SkipToContentLink.d.ts +0 -1
- package/cjs/core/SkipToContentLink/SkipToContentLink.js +0 -1
- package/cjs/core/Slider/Slider.d.ts +0 -1
- package/cjs/core/Slider/Slider.js +16 -20
- package/cjs/core/Slider/Thumb.js +1 -1
- package/cjs/core/Slider/Track.js +2 -1
- package/cjs/core/StatusMessage/StatusMessage.js +1 -1
- package/cjs/core/Stepper/Stepper.d.ts +0 -1
- package/cjs/core/Stepper/Stepper.js +1 -2
- package/cjs/core/Stepper/StepperStep.js +1 -1
- package/cjs/core/Stepper/WorkflowDiagram.d.ts +0 -1
- package/cjs/core/Stepper/WorkflowDiagram.js +0 -1
- package/cjs/core/Surface/Surface.d.ts +0 -1
- package/cjs/core/Surface/Surface.js +0 -1
- package/cjs/core/Table/Table.d.ts +0 -1
- package/cjs/core/Table/Table.js +33 -34
- package/cjs/core/Table/TableCell.js +3 -2
- package/cjs/core/Table/TablePaginator.d.ts +0 -1
- package/cjs/core/Table/TablePaginator.js +10 -12
- package/cjs/core/Table/TableRowMemoized.js +40 -47
- package/cjs/core/Table/actionHandlers/expandHandler.js +3 -3
- package/cjs/core/Table/actionHandlers/filterHandler.js +4 -5
- package/cjs/core/Table/actionHandlers/selectHandler.js +6 -6
- package/cjs/core/Table/cells/DefaultCell.js +4 -3
- package/cjs/core/Table/cells/EditableCell.js +7 -13
- package/cjs/core/Table/columns/actionColumn.js +3 -6
- package/cjs/core/Table/columns/expanderColumn.js +3 -3
- package/cjs/core/Table/columns/selectionColumn.js +4 -4
- package/cjs/core/Table/filters/BaseFilter.d.ts +0 -1
- package/cjs/core/Table/filters/BaseFilter.js +1 -2
- package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.js +2 -4
- package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.d.ts +0 -1
- package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +2 -4
- package/cjs/core/Table/filters/FilterButtonBar.d.ts +0 -1
- package/cjs/core/Table/filters/FilterButtonBar.js +1 -2
- package/cjs/core/Table/filters/FilterToggle.d.ts +0 -1
- package/cjs/core/Table/filters/FilterToggle.js +0 -1
- package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.d.ts +0 -1
- package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +2 -4
- package/cjs/core/Table/filters/TextFilter/TextFilter.d.ts +0 -1
- package/cjs/core/Table/filters/TextFilter/TextFilter.js +1 -3
- package/cjs/core/Table/hooks/useColumnDragAndDrop.js +8 -4
- package/cjs/core/Table/hooks/useResizeColumns.js +16 -22
- package/cjs/core/Table/hooks/useScrollToRow.js +1 -2
- package/cjs/core/Table/hooks/useStickyColumns.js +3 -5
- package/cjs/core/Table/hooks/useSubRowFiltering.js +2 -4
- package/cjs/core/Tabs/Tab.d.ts +0 -1
- package/cjs/core/Tabs/Tab.js +0 -1
- package/cjs/core/Tabs/Tabs.d.ts +0 -1
- package/cjs/core/Tabs/Tabs.js +16 -19
- package/cjs/core/Tag/Tag.d.ts +0 -1
- package/cjs/core/Tag/Tag.js +0 -1
- package/cjs/core/Tag/TagContainer.d.ts +0 -1
- package/cjs/core/Tag/TagContainer.js +0 -1
- package/cjs/core/Textarea/Textarea.d.ts +0 -1
- package/cjs/core/Textarea/Textarea.js +0 -1
- package/cjs/core/ThemeProvider/ThemeContext.d.ts +1 -1
- package/cjs/core/ThemeProvider/ThemeProvider.d.ts +2 -5
- package/cjs/core/ThemeProvider/ThemeProvider.js +11 -15
- package/cjs/core/Tile/Tile.d.ts +0 -1
- package/cjs/core/Tile/Tile.js +3 -7
- package/cjs/core/TimePicker/TimePicker.d.ts +0 -1
- package/cjs/core/TimePicker/TimePicker.js +13 -14
- package/cjs/core/Toast/Toast.d.ts +0 -1
- package/cjs/core/Toast/Toast.js +2 -4
- package/cjs/core/Toast/ToastWrapper.d.ts +0 -1
- package/cjs/core/Toast/ToastWrapper.js +0 -1
- package/cjs/core/Toast/Toaster.js +6 -11
- package/cjs/core/ToggleSwitch/ToggleSwitch.d.ts +0 -1
- package/cjs/core/ToggleSwitch/ToggleSwitch.js +1 -3
- package/cjs/core/Tooltip/Tooltip.d.ts +0 -1
- package/cjs/core/Tooltip/Tooltip.js +0 -1
- package/cjs/core/TransferList/TransferList.d.ts +69 -0
- package/cjs/core/TransferList/TransferList.js +147 -0
- package/cjs/core/TransferList/index.d.ts +3 -0
- package/cjs/core/TransferList/index.js +10 -0
- package/cjs/core/Tree/Tree.d.ts +0 -1
- package/cjs/core/Tree/Tree.js +9 -14
- package/cjs/core/Tree/TreeNode.d.ts +0 -1
- package/cjs/core/Tree/TreeNode.js +9 -11
- package/cjs/core/Tree/TreeNodeExpander.d.ts +0 -1
- package/cjs/core/Tree/TreeNodeExpander.js +0 -1
- package/cjs/core/Typography/Anchor/Anchor.d.ts +0 -1
- package/cjs/core/Typography/Anchor/Anchor.js +0 -1
- package/cjs/core/Typography/Blockquote/Blockquote.d.ts +0 -1
- package/cjs/core/Typography/Blockquote/Blockquote.js +0 -1
- package/cjs/core/Typography/Code/Code.d.ts +0 -1
- package/cjs/core/Typography/Code/Code.js +0 -1
- package/cjs/core/Typography/Kbd/Kbd.d.ts +0 -1
- package/cjs/core/Typography/Kbd/Kbd.js +0 -1
- package/cjs/core/Typography/Text/Text.d.ts +0 -1
- package/cjs/core/Typography/Text/Text.js +0 -1
- package/cjs/core/index.d.ts +1 -0
- package/cjs/core/index.js +118 -116
- package/cjs/core/utils/color/ColorValue.js +9 -15
- package/cjs/core/utils/components/AutoclearingHiddenLiveRegion.js +2 -3
- package/cjs/core/utils/components/Divider.d.ts +0 -1
- package/cjs/core/utils/components/Divider.js +0 -1
- package/cjs/core/utils/components/Flex.d.ts +0 -1
- package/cjs/core/utils/components/Flex.js +0 -1
- package/cjs/core/utils/components/FocusTrap.js +4 -4
- package/cjs/core/utils/components/Icon.d.ts +0 -1
- package/cjs/core/utils/components/Icon.js +0 -1
- package/cjs/core/utils/components/InputContainer.d.ts +0 -1
- package/cjs/core/utils/components/InputContainer.js +0 -1
- package/cjs/core/utils/components/InputFlexContainer.d.ts +0 -1
- package/cjs/core/utils/components/InputFlexContainer.js +0 -1
- package/cjs/core/utils/components/LinkAction.d.ts +0 -1
- package/cjs/core/utils/components/LinkAction.js +0 -1
- package/cjs/core/utils/components/MiddleTextTruncation.js +1 -2
- package/cjs/core/utils/components/Popover.d.ts +0 -1
- package/cjs/core/utils/components/Popover.js +5 -9
- package/cjs/core/utils/components/Resizer.js +7 -6
- package/cjs/core/utils/components/VirtualScroll.js +14 -21
- package/cjs/core/utils/components/VisuallyHidden.d.ts +0 -1
- package/cjs/core/utils/components/VisuallyHidden.js +0 -1
- package/cjs/core/utils/functions/dom.d.ts +6 -0
- package/cjs/core/utils/functions/dom.js +24 -6
- package/cjs/core/utils/functions/index.d.ts +0 -1
- package/cjs/core/utils/functions/index.js +0 -1
- package/cjs/core/utils/functions/polymorphic.js +9 -1
- package/cjs/core/utils/functions/supports.js +1 -1
- package/cjs/core/utils/hooks/index.d.ts +0 -1
- package/cjs/core/utils/hooks/index.js +0 -1
- package/cjs/core/utils/hooks/useContainerWidth.js +1 -1
- package/cjs/core/utils/hooks/useDragAndDrop.js +8 -10
- package/cjs/core/utils/hooks/useEventListener.js +1 -1
- package/cjs/core/utils/hooks/useGlobals.d.ts +9 -4
- package/cjs/core/utils/hooks/useGlobals.js +6 -6
- package/cjs/core/utils/hooks/useId.js +1 -2
- package/cjs/core/utils/hooks/useIntersection.js +2 -3
- package/cjs/core/utils/hooks/useMediaQuery.js +6 -8
- package/cjs/core/utils/hooks/useOverflow.js +1 -2
- package/cjs/core/utils/hooks/useResizeObserver.js +3 -4
- package/cjs/styles.d.ts +5 -0
- package/cjs/styles.js +450 -0
- package/esm/core/Alert/Alert.d.ts +47 -29
- package/esm/core/Alert/Alert.js +74 -23
- package/esm/core/Avatar/Avatar.d.ts +0 -1
- package/esm/core/Avatar/Avatar.js +1 -2
- package/esm/core/AvatarGroup/AvatarGroup.d.ts +0 -1
- package/esm/core/AvatarGroup/AvatarGroup.js +1 -2
- package/esm/core/Backdrop/Backdrop.d.ts +0 -1
- package/esm/core/Backdrop/Backdrop.js +0 -1
- package/esm/core/Badge/Badge.d.ts +0 -1
- package/esm/core/Badge/Badge.js +0 -1
- package/esm/core/Breadcrumbs/Breadcrumbs.d.ts +0 -1
- package/esm/core/Breadcrumbs/Breadcrumbs.js +2 -4
- package/esm/core/ButtonGroup/ButtonGroup.d.ts +0 -1
- package/esm/core/ButtonGroup/ButtonGroup.js +1 -5
- package/esm/core/Buttons/Button/Button.d.ts +0 -1
- package/esm/core/Buttons/Button/Button.js +0 -1
- package/esm/core/Buttons/DropdownButton/DropdownButton.d.ts +0 -1
- package/esm/core/Buttons/DropdownButton/DropdownButton.js +3 -6
- package/esm/core/Buttons/IconButton/IconButton.d.ts +0 -2
- package/esm/core/Buttons/IconButton/IconButton.js +0 -2
- package/esm/core/Buttons/SplitButton/SplitButton.d.ts +0 -1
- package/esm/core/Buttons/SplitButton/SplitButton.js +0 -1
- package/esm/core/Carousel/Carousel.d.ts +2 -3
- package/esm/core/Carousel/Carousel.js +3 -6
- package/esm/core/Carousel/CarouselDotsList.d.ts +0 -1
- package/esm/core/Carousel/CarouselDotsList.js +8 -11
- package/esm/core/Carousel/CarouselNavigation.d.ts +2 -2
- package/esm/core/Carousel/CarouselNavigation.js +3 -5
- package/esm/core/Carousel/CarouselSlider.js +10 -15
- package/esm/core/Checkbox/Checkbox.d.ts +0 -1
- package/esm/core/Checkbox/Checkbox.js +0 -1
- package/esm/core/ColorPicker/ColorBuilder.d.ts +0 -1
- package/esm/core/ColorPicker/ColorBuilder.js +7 -11
- package/esm/core/ColorPicker/ColorInputPanel.d.ts +0 -1
- package/esm/core/ColorPicker/ColorInputPanel.js +12 -16
- package/esm/core/ColorPicker/ColorPalette.d.ts +0 -1
- package/esm/core/ColorPicker/ColorPalette.js +4 -7
- package/esm/core/ColorPicker/ColorPicker.d.ts +0 -1
- package/esm/core/ColorPicker/ColorPicker.js +3 -4
- package/esm/core/ColorPicker/ColorSwatch.d.ts +0 -1
- package/esm/core/ColorPicker/ColorSwatch.js +0 -1
- package/esm/core/ComboBox/ComboBox.d.ts +0 -1
- package/esm/core/ComboBox/ComboBox.js +25 -33
- package/esm/core/ComboBox/ComboBoxDropdown.js +1 -2
- package/esm/core/ComboBox/ComboBoxEndIcon.js +1 -1
- package/esm/core/ComboBox/ComboBoxInput.js +21 -20
- package/esm/core/ComboBox/ComboBoxMenu.js +3 -4
- package/esm/core/ComboBox/ComboBoxMenuItem.js +2 -2
- package/esm/core/ComboBox/helpers.js +4 -5
- package/esm/core/DatePicker/DatePicker.d.ts +0 -1
- package/esm/core/DatePicker/DatePicker.js +32 -33
- package/esm/core/Dialog/Dialog.d.ts +0 -1
- package/esm/core/Dialog/Dialog.js +13 -6
- package/esm/core/Dialog/DialogBackdrop.js +1 -1
- package/esm/core/Dialog/DialogButtonBar.d.ts +0 -1
- package/esm/core/Dialog/DialogButtonBar.js +0 -1
- package/esm/core/Dialog/DialogContent.d.ts +0 -1
- package/esm/core/Dialog/DialogContent.js +0 -1
- package/esm/core/Dialog/DialogContext.d.ts +15 -0
- package/esm/core/Dialog/DialogMain.d.ts +0 -1
- package/esm/core/Dialog/DialogMain.js +18 -25
- package/esm/core/Dialog/DialogTitleBar.d.ts +0 -1
- package/esm/core/Dialog/DialogTitleBar.js +0 -1
- package/esm/core/Dialog/DialogTitleBarTitle.d.ts +0 -1
- package/esm/core/Dialog/DialogTitleBarTitle.js +0 -1
- package/esm/core/DropdownMenu/DropdownMenu.js +6 -8
- package/esm/core/ExpandableBlock/ExpandableBlock.d.ts +5 -1
- package/esm/core/ExpandableBlock/ExpandableBlock.js +8 -6
- package/esm/core/Fieldset/Fieldset.d.ts +0 -1
- package/esm/core/Fieldset/Fieldset.js +0 -1
- package/esm/core/FileUpload/FileEmptyCard.js +1 -1
- package/esm/core/FileUpload/FileUpload.d.ts +0 -1
- package/esm/core/FileUpload/FileUpload.js +3 -7
- package/esm/core/FileUpload/FileUploadCard.d.ts +0 -1
- package/esm/core/FileUpload/FileUploadCard.js +10 -12
- package/esm/core/FileUpload/FileUploadTemplate.d.ts +0 -1
- package/esm/core/FileUpload/FileUploadTemplate.js +0 -1
- package/esm/core/Footer/Footer.d.ts +0 -1
- package/esm/core/Footer/Footer.js +0 -1
- package/esm/core/Footer/FooterItem.d.ts +0 -1
- package/esm/core/Footer/FooterItem.js +0 -1
- package/esm/core/Footer/FooterList.d.ts +0 -1
- package/esm/core/Footer/FooterList.js +0 -1
- package/esm/core/Footer/FooterSeparator.d.ts +0 -1
- package/esm/core/Footer/FooterSeparator.js +0 -1
- package/esm/core/Header/Header.d.ts +0 -1
- package/esm/core/Header/Header.js +0 -1
- package/esm/core/Header/HeaderBreadcrumbs.d.ts +0 -1
- package/esm/core/Header/HeaderBreadcrumbs.js +0 -1
- package/esm/core/Header/HeaderButton.d.ts +0 -1
- package/esm/core/Header/HeaderButton.js +0 -1
- package/esm/core/Header/HeaderLogo.d.ts +0 -1
- package/esm/core/Header/HeaderLogo.js +0 -1
- package/esm/core/InformationPanel/InformationPanel.d.ts +0 -1
- package/esm/core/InformationPanel/InformationPanel.js +1 -5
- package/esm/core/InformationPanel/InformationPanelBody.d.ts +0 -1
- package/esm/core/InformationPanel/InformationPanelBody.js +0 -1
- package/esm/core/InformationPanel/InformationPanelContent.d.ts +0 -1
- package/esm/core/InformationPanel/InformationPanelContent.js +0 -1
- package/esm/core/InformationPanel/InformationPanelHeader.d.ts +0 -1
- package/esm/core/InformationPanel/InformationPanelHeader.js +0 -1
- package/esm/core/InformationPanel/InformationPanelWrapper.d.ts +0 -1
- package/esm/core/InformationPanel/InformationPanelWrapper.js +0 -1
- package/esm/core/Input/Input.d.ts +0 -1
- package/esm/core/Input/Input.js +0 -1
- package/esm/core/InputGroup/InputGroup.d.ts +0 -1
- package/esm/core/InputGroup/InputGroup.js +0 -1
- package/esm/core/Label/Label.d.ts +0 -1
- package/esm/core/Label/Label.js +0 -1
- package/esm/core/LabeledInput/LabeledInput.d.ts +0 -1
- package/esm/core/LabeledInput/LabeledInput.js +1 -2
- package/esm/core/LabeledSelect/LabeledSelect.d.ts +0 -1
- package/esm/core/LabeledSelect/LabeledSelect.js +0 -1
- package/esm/core/LabeledTextarea/LabeledTextarea.d.ts +0 -1
- package/esm/core/LabeledTextarea/LabeledTextarea.js +1 -2
- package/esm/core/List/List.d.ts +0 -1
- package/esm/core/List/List.js +0 -1
- package/esm/core/List/ListItem.d.ts +0 -1
- package/esm/core/List/ListItem.js +0 -1
- package/esm/core/Menu/Menu.d.ts +0 -1
- package/esm/core/Menu/Menu.js +3 -5
- package/esm/core/Menu/MenuDivider.d.ts +0 -1
- package/esm/core/Menu/MenuDivider.js +0 -1
- package/esm/core/Menu/MenuExtraContent.d.ts +0 -1
- package/esm/core/Menu/MenuExtraContent.js +0 -1
- package/esm/core/Menu/MenuItem.d.ts +0 -1
- package/esm/core/Menu/MenuItem.js +8 -12
- package/esm/core/Menu/MenuItemSkeleton.d.ts +0 -1
- package/esm/core/Menu/MenuItemSkeleton.js +0 -1
- package/esm/core/Modal/Modal.d.ts +8 -10
- package/esm/core/Modal/Modal.js +3 -11
- package/esm/core/NonIdealState/NonIdealState.d.ts +0 -1
- package/esm/core/NonIdealState/NonIdealState.js +0 -1
- package/esm/core/NotificationMarker/NotificationMarker.d.ts +0 -1
- package/esm/core/NotificationMarker/NotificationMarker.js +0 -1
- package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.d.ts +0 -1
- package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +0 -1
- package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.d.ts +0 -1
- package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +0 -1
- package/esm/core/Radio/Radio.d.ts +0 -1
- package/esm/core/Radio/Radio.js +0 -1
- package/esm/core/RadioTiles/RadioTile.d.ts +0 -1
- package/esm/core/RadioTiles/RadioTile.js +0 -1
- package/esm/core/RadioTiles/RadioTileGroup.d.ts +0 -1
- package/esm/core/RadioTiles/RadioTileGroup.js +0 -1
- package/esm/core/SearchBox/SearchBox.d.ts +0 -1
- package/esm/core/SearchBox/SearchBox.js +12 -13
- package/esm/core/Select/Select.d.ts +0 -1
- package/esm/core/Select/Select.js +12 -18
- package/esm/core/Select/SelectTag.d.ts +0 -1
- package/esm/core/Select/SelectTag.js +0 -1
- package/esm/core/SideNavigation/SideNavigation.d.ts +0 -1
- package/esm/core/SideNavigation/SideNavigation.js +2 -3
- package/esm/core/SideNavigation/SidenavButton.d.ts +0 -1
- package/esm/core/SideNavigation/SidenavButton.js +0 -1
- package/esm/core/SideNavigation/SidenavSubmenu.d.ts +0 -1
- package/esm/core/SideNavigation/SidenavSubmenu.js +0 -1
- package/esm/core/SideNavigation/SidenavSubmenuHeader.d.ts +0 -1
- package/esm/core/SideNavigation/SidenavSubmenuHeader.js +0 -1
- package/esm/core/SkipToContentLink/SkipToContentLink.d.ts +0 -1
- package/esm/core/SkipToContentLink/SkipToContentLink.js +0 -1
- package/esm/core/Slider/Slider.d.ts +0 -1
- package/esm/core/Slider/Slider.js +16 -20
- package/esm/core/Slider/Thumb.js +1 -1
- package/esm/core/Slider/Track.js +2 -1
- package/esm/core/StatusMessage/StatusMessage.js +1 -1
- package/esm/core/Stepper/Stepper.d.ts +0 -1
- package/esm/core/Stepper/Stepper.js +1 -2
- package/esm/core/Stepper/StepperStep.js +1 -1
- package/esm/core/Stepper/WorkflowDiagram.d.ts +0 -1
- package/esm/core/Stepper/WorkflowDiagram.js +0 -1
- package/esm/core/Surface/Surface.d.ts +0 -1
- package/esm/core/Surface/Surface.js +0 -1
- package/esm/core/Table/Table.d.ts +0 -1
- package/esm/core/Table/Table.js +34 -35
- package/esm/core/Table/TableCell.js +3 -2
- package/esm/core/Table/TablePaginator.d.ts +0 -1
- package/esm/core/Table/TablePaginator.js +11 -13
- package/esm/core/Table/TableRowMemoized.js +41 -48
- package/esm/core/Table/actionHandlers/expandHandler.js +3 -3
- package/esm/core/Table/actionHandlers/filterHandler.js +4 -5
- package/esm/core/Table/actionHandlers/selectHandler.js +6 -6
- package/esm/core/Table/cells/DefaultCell.js +4 -3
- package/esm/core/Table/cells/EditableCell.js +8 -14
- package/esm/core/Table/columns/actionColumn.js +3 -6
- package/esm/core/Table/columns/expanderColumn.js +3 -3
- package/esm/core/Table/columns/selectionColumn.js +4 -4
- package/esm/core/Table/filters/BaseFilter.d.ts +0 -1
- package/esm/core/Table/filters/BaseFilter.js +2 -3
- package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.js +2 -4
- package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.d.ts +0 -1
- package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.js +2 -4
- package/esm/core/Table/filters/FilterButtonBar.d.ts +0 -1
- package/esm/core/Table/filters/FilterButtonBar.js +2 -3
- package/esm/core/Table/filters/FilterToggle.d.ts +0 -1
- package/esm/core/Table/filters/FilterToggle.js +0 -1
- package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.d.ts +0 -1
- package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +2 -4
- package/esm/core/Table/filters/TextFilter/TextFilter.d.ts +0 -1
- package/esm/core/Table/filters/TextFilter/TextFilter.js +1 -3
- package/esm/core/Table/hooks/useColumnDragAndDrop.js +5 -4
- package/esm/core/Table/hooks/useResizeColumns.js +16 -22
- package/esm/core/Table/hooks/useScrollToRow.js +1 -2
- package/esm/core/Table/hooks/useStickyColumns.js +3 -5
- package/esm/core/Table/hooks/useSubRowFiltering.js +2 -4
- package/esm/core/Tabs/Tab.d.ts +0 -1
- package/esm/core/Tabs/Tab.js +0 -1
- package/esm/core/Tabs/Tabs.d.ts +0 -1
- package/esm/core/Tabs/Tabs.js +16 -19
- package/esm/core/Tag/Tag.d.ts +0 -1
- package/esm/core/Tag/Tag.js +0 -1
- package/esm/core/Tag/TagContainer.d.ts +0 -1
- package/esm/core/Tag/TagContainer.js +0 -1
- package/esm/core/Textarea/Textarea.d.ts +0 -1
- package/esm/core/Textarea/Textarea.js +0 -1
- package/esm/core/ThemeProvider/ThemeContext.d.ts +1 -1
- package/esm/core/ThemeProvider/ThemeProvider.d.ts +2 -5
- package/esm/core/ThemeProvider/ThemeProvider.js +12 -16
- package/esm/core/Tile/Tile.d.ts +0 -1
- package/esm/core/Tile/Tile.js +3 -7
- package/esm/core/TimePicker/TimePicker.d.ts +0 -1
- package/esm/core/TimePicker/TimePicker.js +13 -14
- package/esm/core/Toast/Toast.d.ts +0 -1
- package/esm/core/Toast/Toast.js +2 -4
- package/esm/core/Toast/ToastWrapper.d.ts +0 -1
- package/esm/core/Toast/ToastWrapper.js +0 -1
- package/esm/core/Toast/Toaster.js +6 -11
- package/esm/core/ToggleSwitch/ToggleSwitch.d.ts +0 -1
- package/esm/core/ToggleSwitch/ToggleSwitch.js +1 -3
- package/esm/core/Tooltip/Tooltip.d.ts +0 -1
- package/esm/core/Tooltip/Tooltip.js +0 -1
- package/esm/core/TransferList/TransferList.d.ts +69 -0
- package/esm/core/TransferList/TransferList.js +141 -0
- package/esm/core/TransferList/index.d.ts +3 -0
- package/esm/core/TransferList/index.js +6 -0
- package/esm/core/Tree/Tree.d.ts +0 -1
- package/esm/core/Tree/Tree.js +9 -14
- package/esm/core/Tree/TreeNode.d.ts +0 -1
- package/esm/core/Tree/TreeNode.js +9 -11
- package/esm/core/Tree/TreeNodeExpander.d.ts +0 -1
- package/esm/core/Tree/TreeNodeExpander.js +0 -1
- package/esm/core/Typography/Anchor/Anchor.d.ts +0 -1
- package/esm/core/Typography/Anchor/Anchor.js +0 -1
- package/esm/core/Typography/Blockquote/Blockquote.d.ts +0 -1
- package/esm/core/Typography/Blockquote/Blockquote.js +0 -1
- package/esm/core/Typography/Code/Code.d.ts +0 -1
- package/esm/core/Typography/Code/Code.js +0 -1
- package/esm/core/Typography/Kbd/Kbd.d.ts +0 -1
- package/esm/core/Typography/Kbd/Kbd.js +0 -1
- package/esm/core/Typography/Text/Text.d.ts +0 -1
- package/esm/core/Typography/Text/Text.js +0 -1
- package/esm/core/index.d.ts +1 -0
- package/esm/core/index.js +1 -0
- package/esm/core/utils/color/ColorValue.js +9 -15
- package/esm/core/utils/components/AutoclearingHiddenLiveRegion.js +2 -3
- package/esm/core/utils/components/Divider.d.ts +0 -1
- package/esm/core/utils/components/Divider.js +0 -1
- package/esm/core/utils/components/Flex.d.ts +0 -1
- package/esm/core/utils/components/Flex.js +0 -1
- package/esm/core/utils/components/FocusTrap.js +4 -4
- package/esm/core/utils/components/Icon.d.ts +0 -1
- package/esm/core/utils/components/Icon.js +0 -1
- package/esm/core/utils/components/InputContainer.d.ts +0 -1
- package/esm/core/utils/components/InputContainer.js +0 -1
- package/esm/core/utils/components/InputFlexContainer.d.ts +0 -1
- package/esm/core/utils/components/InputFlexContainer.js +0 -1
- package/esm/core/utils/components/LinkAction.d.ts +0 -1
- package/esm/core/utils/components/LinkAction.js +0 -1
- package/esm/core/utils/components/MiddleTextTruncation.js +1 -2
- package/esm/core/utils/components/Popover.d.ts +0 -1
- package/esm/core/utils/components/Popover.js +5 -9
- package/esm/core/utils/components/Resizer.js +7 -6
- package/esm/core/utils/components/VirtualScroll.js +14 -21
- package/esm/core/utils/components/VisuallyHidden.d.ts +0 -1
- package/esm/core/utils/components/VisuallyHidden.js +0 -1
- package/esm/core/utils/functions/dom.d.ts +6 -0
- package/esm/core/utils/functions/dom.js +19 -5
- package/esm/core/utils/functions/index.d.ts +0 -1
- package/esm/core/utils/functions/index.js +0 -1
- package/esm/core/utils/functions/polymorphic.js +9 -1
- package/esm/core/utils/functions/supports.js +1 -1
- package/esm/core/utils/hooks/index.d.ts +0 -1
- package/esm/core/utils/hooks/index.js +0 -1
- package/esm/core/utils/hooks/useContainerWidth.js +1 -1
- package/esm/core/utils/hooks/useDragAndDrop.js +8 -10
- package/esm/core/utils/hooks/useEventListener.js +1 -1
- package/esm/core/utils/hooks/useGlobals.d.ts +9 -4
- package/esm/core/utils/hooks/useGlobals.js +6 -6
- package/esm/core/utils/hooks/useId.js +1 -2
- package/esm/core/utils/hooks/useIntersection.js +2 -3
- package/esm/core/utils/hooks/useMediaQuery.js +6 -8
- package/esm/core/utils/hooks/useOverflow.js +1 -2
- package/esm/core/utils/hooks/useResizeObserver.js +3 -4
- package/esm/styles.d.ts +5 -0
- package/esm/styles.js +451 -0
- package/package.json +14 -11
- package/styles.css +1940 -0
- package/cjs/core/utils/functions/styles.d.ts +0 -6
- package/cjs/core/utils/functions/styles.js +0 -21
- package/cjs/core/utils/hooks/useIsThemeAlreadySet.d.ts +0 -7
- package/cjs/core/utils/hooks/useIsThemeAlreadySet.js +0 -54
- package/esm/core/utils/functions/styles.d.ts +0 -6
- package/esm/core/utils/functions/styles.js +0 -17
- package/esm/core/utils/hooks/useIsThemeAlreadySet.d.ts +0 -7
- package/esm/core/utils/hooks/useIsThemeAlreadySet.js +0 -27
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { Popover, useMergedRefs, SvgCaretRightSmall } from '../utils/index.js';
|
|
7
|
-
import '@itwin/itwinui-css/css/menu.css';
|
|
8
7
|
import { Menu } from './Menu.js';
|
|
9
8
|
import { ListItem } from '../List/ListItem.js';
|
|
10
9
|
/**
|
|
@@ -21,10 +20,9 @@ export const MenuItem = React.forwardRef((props, ref) => {
|
|
|
21
20
|
const { ref: parentMenuItemRef } = React.useContext(MenuItemContext);
|
|
22
21
|
const subMenuRef = React.useRef(null);
|
|
23
22
|
const [isSubmenuVisible, setIsSubmenuVisible] = React.useState(false);
|
|
24
|
-
const startIcon = startIconProp
|
|
25
|
-
const endIcon = endIconProp
|
|
23
|
+
const startIcon = startIconProp ?? icon;
|
|
24
|
+
const endIcon = endIconProp ?? badge;
|
|
26
25
|
const onKeyDown = (event) => {
|
|
27
|
-
var _a;
|
|
28
26
|
if (event.altKey) {
|
|
29
27
|
return;
|
|
30
28
|
}
|
|
@@ -32,7 +30,7 @@ export const MenuItem = React.forwardRef((props, ref) => {
|
|
|
32
30
|
case 'Enter':
|
|
33
31
|
case ' ':
|
|
34
32
|
case 'Spacebar': {
|
|
35
|
-
!disabled &&
|
|
33
|
+
!disabled && onClick?.(value);
|
|
36
34
|
event.preventDefault();
|
|
37
35
|
break;
|
|
38
36
|
}
|
|
@@ -45,7 +43,7 @@ export const MenuItem = React.forwardRef((props, ref) => {
|
|
|
45
43
|
break;
|
|
46
44
|
}
|
|
47
45
|
case 'ArrowLeft': {
|
|
48
|
-
|
|
46
|
+
parentMenuItemRef?.current?.focus();
|
|
49
47
|
event.stopPropagation();
|
|
50
48
|
event.preventDefault();
|
|
51
49
|
break;
|
|
@@ -54,10 +52,9 @@ export const MenuItem = React.forwardRef((props, ref) => {
|
|
|
54
52
|
break;
|
|
55
53
|
}
|
|
56
54
|
};
|
|
57
|
-
const listItem = (React.createElement(ListItem, { actionable: true, size: size, active: isSelected, disabled: disabled, onClick: () => !disabled &&
|
|
58
|
-
var _a;
|
|
55
|
+
const listItem = (React.createElement(ListItem, { actionable: true, size: size, active: isSelected, disabled: disabled, onClick: () => !disabled && onClick?.(value), ref: refs, role: role, tabIndex: disabled || role === 'presentation' ? undefined : -1, "aria-selected": isSelected, "aria-haspopup": subMenuItems.length > 0, "aria-disabled": disabled, onKeyDown: onKeyDown, onMouseEnter: () => setIsSubmenuVisible(true), onMouseLeave: (e) => {
|
|
59
56
|
if (!(e.relatedTarget instanceof Node) ||
|
|
60
|
-
!
|
|
57
|
+
!subMenuRef.current?.contains(e.relatedTarget)) {
|
|
61
58
|
setIsSubmenuVisible(false);
|
|
62
59
|
}
|
|
63
60
|
}, ...rest },
|
|
@@ -70,10 +67,9 @@ export const MenuItem = React.forwardRef((props, ref) => {
|
|
|
70
67
|
endIcon && (React.createElement(ListItem.Icon, { as: 'span', "aria-hidden": true }, endIcon))));
|
|
71
68
|
return subMenuItems.length === 0 ? (listItem) : (React.createElement(MenuItemContext.Provider, { value: { ref: menuItemRef } },
|
|
72
69
|
React.createElement(Popover, { placement: 'right-start', visible: isSubmenuVisible, appendTo: 'parent', content: React.createElement("div", { onMouseLeave: () => setIsSubmenuVisible(false), onBlur: (e) => {
|
|
73
|
-
var _a, _b;
|
|
74
70
|
!!(e.relatedTarget instanceof Node) &&
|
|
75
|
-
!
|
|
76
|
-
!
|
|
71
|
+
!subMenuRef.current?.contains(e.relatedTarget) &&
|
|
72
|
+
!subMenuRef.current?.isEqualNode(e.relatedTarget) &&
|
|
77
73
|
setIsSubmenuVisible(false);
|
|
78
74
|
} },
|
|
79
75
|
React.createElement(Menu, { ref: subMenuRef }, subMenuItems)) }, listItem)));
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
|
-
import '@itwin/itwinui-css/css/dialog.css';
|
|
4
3
|
import type { DialogMainProps } from '../Dialog/DialogMain.js';
|
|
5
4
|
declare type ModalProps = {
|
|
6
5
|
/**
|
|
@@ -31,16 +30,15 @@ declare type ModalProps = {
|
|
|
31
30
|
*/
|
|
32
31
|
onKeyDown?: React.KeyboardEventHandler;
|
|
33
32
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
* Document where the modal will be rendered.
|
|
40
|
-
* Can be specified to render in a different document (e.g. a popup window).
|
|
41
|
-
* @default document
|
|
33
|
+
* If true, the dialog will be portaled into a <div> inside the nearest `ThemeProvider`.
|
|
34
|
+
*
|
|
35
|
+
* Can be set to an object with a `to` property to portal into a specific element.
|
|
36
|
+
*
|
|
37
|
+
* @default true
|
|
42
38
|
*/
|
|
43
|
-
|
|
39
|
+
portal?: boolean | {
|
|
40
|
+
to: HTMLElement;
|
|
41
|
+
};
|
|
44
42
|
/**
|
|
45
43
|
* Content of the modal.
|
|
46
44
|
*/
|
package/esm/core/Modal/Modal.js
CHANGED
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as React from 'react';
|
|
6
|
-
import ReactDOM from 'react-dom';
|
|
7
|
-
import { getContainer, getDocument } from '../utils/index.js';
|
|
8
|
-
import '@itwin/itwinui-css/css/dialog.css';
|
|
9
6
|
import { Dialog } from '../Dialog/index.js';
|
|
10
7
|
/**
|
|
11
8
|
* Modal component which can wrap any content.
|
|
@@ -29,16 +26,11 @@ import { Dialog } from '../Dialog/index.js';
|
|
|
29
26
|
* </Modal>
|
|
30
27
|
*/
|
|
31
28
|
export const Modal = React.forwardRef((props, forwardedRef) => {
|
|
32
|
-
const { isOpen = false, isDismissible = true, closeOnEsc = true, closeOnExternalClick = true, onClose, title, children,
|
|
33
|
-
|
|
34
|
-
React.useEffect(() => {
|
|
35
|
-
setContainer(getContainer(modalRootId, ownerDocument));
|
|
36
|
-
return () => setContainer(undefined);
|
|
37
|
-
}, [ownerDocument, modalRootId]);
|
|
38
|
-
return !!container ? (ReactDOM.createPortal(React.createElement(Dialog, { isOpen: isOpen, closeOnEsc: closeOnEsc, closeOnExternalClick: closeOnExternalClick, isDismissible: isDismissible, onClose: onClose, preventDocumentScroll: true, trapFocus: true, setFocus: true, ref: forwardedRef },
|
|
29
|
+
const { isOpen = false, isDismissible = true, closeOnEsc = true, closeOnExternalClick = true, onClose, title, children, portal = true, ...rest } = props;
|
|
30
|
+
return (React.createElement(Dialog, { isOpen: isOpen, closeOnEsc: closeOnEsc, closeOnExternalClick: closeOnExternalClick, isDismissible: isDismissible, onClose: onClose, preventDocumentScroll: true, trapFocus: true, setFocus: true, ref: forwardedRef, portal: portal },
|
|
39
31
|
React.createElement(Dialog.Backdrop, null),
|
|
40
32
|
React.createElement(Dialog.Main, { "aria-modal": true, ...rest },
|
|
41
33
|
React.createElement(Dialog.TitleBar, { titleText: title }),
|
|
42
|
-
children))
|
|
34
|
+
children)));
|
|
43
35
|
});
|
|
44
36
|
export default Modal;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
|
-
import '@itwin/itwinui-css/css/non-ideal-state.css';
|
|
4
3
|
declare type NonIdealStateProps = {
|
|
5
4
|
/**
|
|
6
5
|
* An svg component, preferably from @itwin/itwinui-illustrations-react.
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { Box } from '../utils/index.js';
|
|
7
7
|
import cx from 'classnames';
|
|
8
|
-
import '@itwin/itwinui-css/css/non-ideal-state.css';
|
|
9
8
|
/**
|
|
10
9
|
* A stylized display to communicate common http errors and other non-ideal states.
|
|
11
10
|
* Works well with svgs from @itwin/itwinui-illustrations-react.
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { Box } from '../utils/index.js';
|
|
7
7
|
import cx from 'classnames';
|
|
8
|
-
import '@itwin/itwinui-css/css/utils.css';
|
|
9
8
|
/**
|
|
10
9
|
* A small notification circle to the top-right of the passed children prop.
|
|
11
10
|
* This can be applied to almost anything but mostly intended for icons within buttons with `styleType = default / borderless`.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
|
|
3
|
-
import '@itwin/itwinui-css/css/progress-indicator.css';
|
|
4
3
|
declare type ProgressLinearProps = {
|
|
5
4
|
/**
|
|
6
5
|
* Progress percentage. Should be a number between 0 and 100.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
|
|
3
|
-
import '@itwin/itwinui-css/css/progress-indicator.css';
|
|
4
3
|
declare type ProgressRadialProps = {
|
|
5
4
|
/**
|
|
6
5
|
* Progress percentage. Should be a number between 0 and 100.
|
package/esm/core/Radio/Radio.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { InputGroup } from '../InputGroup/index.js';
|
|
3
|
-
import '@itwin/itwinui-css/css/radio-tile.css';
|
|
4
3
|
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
5
4
|
declare type RadioTileGroupProps = Omit<React.ComponentProps<typeof InputGroup>, 'displayStyle' | 'disabled'>;
|
|
6
5
|
/**
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { InputGroup } from '../InputGroup/index.js';
|
|
7
|
-
import '@itwin/itwinui-css/css/radio-tile.css';
|
|
8
7
|
import { Box } from '../utils/index.js';
|
|
9
8
|
/**
|
|
10
9
|
* RadioTileGroup component to group RadioTile components together
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { IconProps, PolymorphicForwardRefComponent, InputFlexContainerProps } from '../utils/index.js';
|
|
3
3
|
import type { IconButtonProps } from '../Buttons/IconButton/IconButton.js';
|
|
4
|
-
import '@itwin/itwinui-css/css/searchbox.css';
|
|
5
4
|
declare type SearchBoxOwnProps = {
|
|
6
5
|
/**
|
|
7
6
|
* Whether the searchbox is expandable.
|
|
@@ -6,7 +6,6 @@ import * as React from 'react';
|
|
|
6
6
|
import cx from 'classnames';
|
|
7
7
|
import { InputFlexContainer, SvgSearch, SvgCloseSmall, useSafeContext, useId, Icon, useMergedRefs, mergeEventHandlers, Box, } from '../utils/index.js';
|
|
8
8
|
import { IconButton } from '../Buttons/IconButton/index.js';
|
|
9
|
-
import '@itwin/itwinui-css/css/searchbox.css';
|
|
10
9
|
const SearchBoxContext = React.createContext(undefined);
|
|
11
10
|
const SearchBoxComponent = React.forwardRef((props, ref) => {
|
|
12
11
|
const { size, expandable = false, isDisabled = false, onCollapse: onCollapseProp, onExpand: onExpandProp, isExpanded: isExpandedProp, children, inputProps, className, ...rest } = props;
|
|
@@ -15,16 +14,16 @@ const SearchBoxComponent = React.forwardRef((props, ref) => {
|
|
|
15
14
|
const inputRef = React.useRef(null);
|
|
16
15
|
const openButtonRef = React.useRef(null);
|
|
17
16
|
const [localExpanded, setLocalExpanded] = React.useState(isExpandedProp);
|
|
18
|
-
const isExpanded = isExpandedProp
|
|
17
|
+
const isExpanded = isExpandedProp ?? localExpanded;
|
|
19
18
|
const onCollapse = () => {
|
|
20
19
|
setLocalExpanded(false);
|
|
21
|
-
onCollapseProp
|
|
22
|
-
queueMicrotask(() =>
|
|
20
|
+
onCollapseProp?.();
|
|
21
|
+
queueMicrotask(() => openButtonRef.current?.focus({ preventScroll: true }));
|
|
23
22
|
};
|
|
24
23
|
const onExpand = () => {
|
|
25
24
|
setLocalExpanded(true);
|
|
26
|
-
onExpandProp
|
|
27
|
-
queueMicrotask(() =>
|
|
25
|
+
onExpandProp?.();
|
|
26
|
+
queueMicrotask(() => inputRef.current?.focus({ preventScroll: true }));
|
|
28
27
|
};
|
|
29
28
|
return (React.createElement(SearchBoxContext.Provider, { value: {
|
|
30
29
|
size,
|
|
@@ -38,7 +37,7 @@ const SearchBoxComponent = React.forwardRef((props, ref) => {
|
|
|
38
37
|
isExpanded,
|
|
39
38
|
expandable,
|
|
40
39
|
} },
|
|
41
|
-
React.createElement(InputFlexContainer, { ref: ref, className: cx('iui-searchbox', { 'iui-expandable-searchbox': expandable }, className), "data-iui-size": size, isDisabled: isDisabled, "data-iui-expanded": isExpanded, ...rest }, children
|
|
40
|
+
React.createElement(InputFlexContainer, { ref: ref, className: cx('iui-searchbox', { 'iui-expandable-searchbox': expandable }, className), "data-iui-size": size, isDisabled: isDisabled, "data-iui-expanded": isExpanded, ...rest }, children ?? (React.createElement(React.Fragment, null,
|
|
42
41
|
React.createElement(SearchBoxCollapsedState, null,
|
|
43
42
|
React.createElement(SearchBoxExpandButton, null)),
|
|
44
43
|
React.createElement(SearchBoxExpandedState, null,
|
|
@@ -52,7 +51,7 @@ const SearchBoxCollapsedState = ({ children, }) => {
|
|
|
52
51
|
if (!expandable || isExpanded) {
|
|
53
52
|
return null;
|
|
54
53
|
}
|
|
55
|
-
return React.createElement(React.Fragment, null, children
|
|
54
|
+
return React.createElement(React.Fragment, null, children ?? React.createElement(SearchBoxExpandButton, null));
|
|
56
55
|
};
|
|
57
56
|
SearchBoxCollapsedState.displayName = 'SearchBox.CollapsedState';
|
|
58
57
|
// ----------------------------------------------------------------------------
|
|
@@ -67,7 +66,7 @@ SearchBoxExpandedState.displayName = 'SearchBox.ExpandedState';
|
|
|
67
66
|
// ----------------------------------------------------------------------------
|
|
68
67
|
const SearchBoxIcon = React.forwardRef((props, ref) => {
|
|
69
68
|
const { className, children, ...rest } = props;
|
|
70
|
-
return (React.createElement(Icon, { "aria-hidden": true, className: cx('iui-search-icon', className), ref: ref, ...rest }, children
|
|
69
|
+
return (React.createElement(Icon, { "aria-hidden": true, className: cx('iui-search-icon', className), ref: ref, ...rest }, children ?? React.createElement(SvgSearch, null)));
|
|
71
70
|
});
|
|
72
71
|
SearchBoxIcon.displayName = 'SearchBox.Icon';
|
|
73
72
|
// ----------------------------------------------------------------------------
|
|
@@ -79,28 +78,28 @@ const SearchBoxInput = React.forwardRef((props, ref) => {
|
|
|
79
78
|
setInputId(idProp);
|
|
80
79
|
}
|
|
81
80
|
}, [idProp, inputId, setInputId]);
|
|
82
|
-
return (React.createElement(Box, { as: 'input', id: idProp
|
|
81
|
+
return (React.createElement(Box, { as: 'input', id: idProp ?? inputId, ref: useMergedRefs(ref, inputRef), role: 'searchbox', type: 'text', className: cx('iui-search-input', className), disabled: isDisabled, ...rest }));
|
|
83
82
|
});
|
|
84
83
|
SearchBoxInput.displayName = 'SearchBox.Input';
|
|
85
84
|
// ----------------------------------------------------------------------------
|
|
86
85
|
const SearchBoxButton = React.forwardRef((props, ref) => {
|
|
87
86
|
const { children, ...rest } = props;
|
|
88
87
|
const { size: sizeContext, isDisabled } = useSafeContext(SearchBoxContext);
|
|
89
|
-
return (React.createElement(IconButton, { styleType: 'borderless', size: sizeContext, ref: ref, disabled: isDisabled, ...rest }, children
|
|
88
|
+
return (React.createElement(IconButton, { styleType: 'borderless', size: sizeContext, ref: ref, disabled: isDisabled, ...rest }, children ?? React.createElement(SvgSearch, null)));
|
|
90
89
|
});
|
|
91
90
|
SearchBoxButton.displayName = 'SearchBox.Button';
|
|
92
91
|
// ----------------------------------------------------------------------------
|
|
93
92
|
const SearchBoxCollapseButton = React.forwardRef((props, ref) => {
|
|
94
93
|
const { children, onClick: onClickProp, ...rest } = props;
|
|
95
94
|
const { onCollapse, size: sizeContext, isDisabled, } = useSafeContext(SearchBoxContext);
|
|
96
|
-
return (React.createElement(SearchBoxButton, { ref: ref, "aria-label": 'Close searchbox', size: sizeContext, disabled: isDisabled, onClick: mergeEventHandlers(onClickProp, onCollapse), ...rest }, children
|
|
95
|
+
return (React.createElement(SearchBoxButton, { ref: ref, "aria-label": 'Close searchbox', size: sizeContext, disabled: isDisabled, onClick: mergeEventHandlers(onClickProp, onCollapse), ...rest }, children ?? React.createElement(SvgCloseSmall, null)));
|
|
97
96
|
});
|
|
98
97
|
SearchBoxCollapseButton.displayName = 'SearchBox.CollapseButton';
|
|
99
98
|
// ----------------------------------------------------------------------------
|
|
100
99
|
const SearchBoxExpandButton = React.forwardRef((props, ref) => {
|
|
101
100
|
const { children, className, onClick: onClickProp, ...rest } = props;
|
|
102
101
|
const { onExpand, size: sizeContext, isDisabled, openButtonRef, } = useSafeContext(SearchBoxContext);
|
|
103
|
-
return (React.createElement(SearchBoxButton, { ref: useMergedRefs(ref, openButtonRef), className: cx('iui-searchbox-open-button', className), "aria-label": 'Expand searchbox', size: sizeContext, disabled: isDisabled, onClick: mergeEventHandlers(onClickProp, onExpand), ...rest }, children
|
|
102
|
+
return (React.createElement(SearchBoxButton, { ref: useMergedRefs(ref, openButtonRef), className: cx('iui-searchbox-open-button', className), "aria-label": 'Expand searchbox', size: sizeContext, disabled: isDisabled, onClick: mergeEventHandlers(onClickProp, onExpand), ...rest }, children ?? React.createElement(SvgSearch, null)));
|
|
104
103
|
});
|
|
105
104
|
SearchBoxExpandButton.displayName = 'SearchBox.ExpandButton';
|
|
106
105
|
// ----------------------------------------------------------------------------
|
|
@@ -6,7 +6,6 @@ import * as React from 'react';
|
|
|
6
6
|
import cx from 'classnames';
|
|
7
7
|
import { Menu, MenuItem } from '../Menu/index.js';
|
|
8
8
|
import { SvgCaretDownSmall, Popover, useId, AutoclearingHiddenLiveRegion, Box, } from '../utils/index.js';
|
|
9
|
-
import '@itwin/itwinui-css/css/select.css';
|
|
10
9
|
import SelectTag from './SelectTag.js';
|
|
11
10
|
import SelectTagContainer from './SelectTagContainer.js';
|
|
12
11
|
const isMultipleEnabled = (variable, multiple) => {
|
|
@@ -66,24 +65,22 @@ const isSingleOnChange = (onChange, multiple) => {
|
|
|
66
65
|
* />
|
|
67
66
|
*/
|
|
68
67
|
export const Select = (props) => {
|
|
69
|
-
var _a;
|
|
70
68
|
const uid = useId();
|
|
71
69
|
const { options, value, onChange, placeholder, disabled = false, size, setFocus = false, itemRenderer, selectedItemRenderer, className, style, menuClassName, menuStyle, onShow, onHide, popoverProps, multiple = false, triggerProps, ...rest } = props;
|
|
72
70
|
const [isOpenState, setIsOpen] = React.useState(false);
|
|
73
|
-
const isOpen =
|
|
71
|
+
const isOpen = popoverProps?.visible ?? isOpenState;
|
|
74
72
|
const [minWidth, setMinWidth] = React.useState(0);
|
|
75
73
|
const [liveRegionSelection, setLiveRegionSelection] = React.useState('');
|
|
76
74
|
const selectRef = React.useRef(null);
|
|
77
75
|
const toggleButtonRef = React.useRef(null);
|
|
78
76
|
const onShowHandler = React.useCallback((instance) => {
|
|
79
77
|
setIsOpen(true);
|
|
80
|
-
onShow
|
|
78
|
+
onShow?.(instance);
|
|
81
79
|
}, [onShow]);
|
|
82
80
|
const onHideHandler = React.useCallback((instance) => {
|
|
83
|
-
var _a;
|
|
84
81
|
setIsOpen(false);
|
|
85
|
-
|
|
86
|
-
onHide
|
|
82
|
+
selectRef.current?.focus({ preventScroll: true }); // move focus back to select button
|
|
83
|
+
onHide?.(instance);
|
|
87
84
|
}, [onHide]);
|
|
88
85
|
React.useEffect(() => {
|
|
89
86
|
if (selectRef.current && !disabled && setFocus) {
|
|
@@ -113,13 +110,12 @@ export const Select = (props) => {
|
|
|
113
110
|
};
|
|
114
111
|
const menuItems = React.useMemo(() => {
|
|
115
112
|
return options.map((option, index) => {
|
|
116
|
-
var _a;
|
|
117
113
|
const isSelected = isMultipleEnabled(value, multiple)
|
|
118
|
-
?
|
|
114
|
+
? value?.includes(option.value) ?? false
|
|
119
115
|
: value === option.value;
|
|
120
116
|
const menuItem = itemRenderer ? (itemRenderer(option, { close: () => setIsOpen(false), isSelected })) : (React.createElement(MenuItem, null, option.label));
|
|
121
117
|
const { label, icon, startIcon: startIconProp, ...restOption } = option;
|
|
122
|
-
const startIcon = startIconProp
|
|
118
|
+
const startIcon = startIconProp ?? icon;
|
|
123
119
|
return React.cloneElement(menuItem, {
|
|
124
120
|
key: `${label}-${index}`,
|
|
125
121
|
isSelected,
|
|
@@ -129,11 +125,11 @@ export const Select = (props) => {
|
|
|
129
125
|
return;
|
|
130
126
|
}
|
|
131
127
|
if (isSingleOnChange(onChange, multiple)) {
|
|
132
|
-
onChange
|
|
128
|
+
onChange?.(option.value);
|
|
133
129
|
setIsOpen(false);
|
|
134
130
|
}
|
|
135
131
|
else {
|
|
136
|
-
onChange
|
|
132
|
+
onChange?.(option.value, isSelected ? 'removed' : 'added');
|
|
137
133
|
}
|
|
138
134
|
// update live region
|
|
139
135
|
if (isMultipleEnabled(value, multiple)) {
|
|
@@ -150,7 +146,7 @@ export const Select = (props) => {
|
|
|
150
146
|
},
|
|
151
147
|
ref: (el) => {
|
|
152
148
|
if (isSelected && !multiple) {
|
|
153
|
-
el
|
|
149
|
+
el?.scrollIntoView({ block: 'nearest' });
|
|
154
150
|
}
|
|
155
151
|
},
|
|
156
152
|
role: 'option',
|
|
@@ -176,15 +172,14 @@ export const Select = (props) => {
|
|
|
176
172
|
maxWidth: `min(${minWidth * 2}px, 90vw)`,
|
|
177
173
|
...menuStyle,
|
|
178
174
|
}, id: `${uid}-menu`, key: `${uid}-menu` }, menuItems), placement: 'bottom-start', aria: { content: null }, onShow: onShowHandler, onHide: onHideHandler, ...popoverProps, visible: isOpen, onClickOutside: (_, { target }) => {
|
|
179
|
-
|
|
180
|
-
if (!((_a = toggleButtonRef.current) === null || _a === void 0 ? void 0 : _a.contains(target))) {
|
|
175
|
+
if (!toggleButtonRef.current?.contains(target)) {
|
|
181
176
|
setIsOpen(false);
|
|
182
177
|
}
|
|
183
178
|
} },
|
|
184
179
|
React.createElement(Box, { tabIndex: 0, role: 'combobox', ref: selectRef, "data-iui-size": size, onClick: () => !disabled && setIsOpen((o) => !o), onKeyDown: (e) => !disabled && onKeyDown(e), "aria-disabled": disabled, "aria-autocomplete": 'none', "aria-expanded": isOpen, "aria-haspopup": 'listbox', "aria-controls": `${uid}-menu`, ...triggerProps, className: cx('iui-select-button', {
|
|
185
180
|
'iui-placeholder': (!selectedItems || selectedItems.length === 0) && !!placeholder,
|
|
186
181
|
'iui-disabled': disabled,
|
|
187
|
-
}, triggerProps
|
|
182
|
+
}, triggerProps?.className) },
|
|
188
183
|
(!selectedItems || selectedItems.length === 0) && (React.createElement(Box, { as: 'span', className: 'iui-content' }, placeholder)),
|
|
189
184
|
isMultipleEnabled(selectedItems, multiple) ? (React.createElement(MultipleSelectButton, { selectedItems: selectedItems, selectedItemsRenderer: selectedItemRenderer, tagRenderer: tagRenderer })) : (React.createElement(SingleSelectButton, { selectedItem: selectedItems, selectedItemRenderer: selectedItemRenderer })))),
|
|
190
185
|
React.createElement(Box, { as: 'span', "aria-hidden": true, ref: toggleButtonRef, className: cx('iui-end-icon', {
|
|
@@ -196,8 +191,7 @@ export const Select = (props) => {
|
|
|
196
191
|
multiple ? (React.createElement(AutoclearingHiddenLiveRegion, { text: liveRegionSelection })) : null));
|
|
197
192
|
};
|
|
198
193
|
const SingleSelectButton = ({ selectedItem, selectedItemRenderer, }) => {
|
|
199
|
-
|
|
200
|
-
const startIcon = (_a = selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.startIcon) !== null && _a !== void 0 ? _a : selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.icon;
|
|
194
|
+
const startIcon = selectedItem?.startIcon ?? selectedItem?.icon;
|
|
201
195
|
return (React.createElement(React.Fragment, null,
|
|
202
196
|
selectedItem &&
|
|
203
197
|
selectedItemRenderer &&
|
|
@@ -7,7 +7,6 @@ import cx from 'classnames';
|
|
|
7
7
|
import { WithCSSTransition, SvgChevronRight, Box } from '../utils/index.js';
|
|
8
8
|
import { IconButton } from '../Buttons/index.js';
|
|
9
9
|
import { Tooltip } from '../Tooltip/index.js';
|
|
10
|
-
import '@itwin/itwinui-css/css/side-navigation.css';
|
|
11
10
|
/**
|
|
12
11
|
* Left side navigation menu component.
|
|
13
12
|
* @example
|
|
@@ -30,7 +29,7 @@ export const SideNavigation = React.forwardRef((props, forwardedRef) => {
|
|
|
30
29
|
}, [isExpanded]);
|
|
31
30
|
const ExpandButton = (React.createElement(IconButton, { className: 'iui-sidenav-button iui-expand', onClick: React.useCallback(() => {
|
|
32
31
|
_setIsExpanded((expanded) => !expanded);
|
|
33
|
-
onExpanderClick
|
|
32
|
+
onExpanderClick?.();
|
|
34
33
|
}, [onExpanderClick]) },
|
|
35
34
|
React.createElement(SvgChevronRight, null)));
|
|
36
35
|
return (React.createElement(Box, { className: cx('iui-side-navigation-wrapper', className), ref: forwardedRef, ...rest },
|
|
@@ -41,7 +40,7 @@ export const SideNavigation = React.forwardRef((props, forwardedRef) => {
|
|
|
41
40
|
expanderPlacement === 'top' && ExpandButton,
|
|
42
41
|
React.createElement(Box, { className: 'iui-sidenav-content' },
|
|
43
42
|
React.createElement(Box, { className: 'iui-top' }, items.map((sidenavButton, index) => !_isExpanded ? (React.createElement(Tooltip, { content: sidenavButton.props.children, placement: 'right', key: index }, sidenavButton)) : (sidenavButton))),
|
|
44
|
-
React.createElement(Box, { className: 'iui-bottom' }, secondaryItems
|
|
43
|
+
React.createElement(Box, { className: 'iui-bottom' }, secondaryItems?.map((sidenavButton, index) => !_isExpanded ? (React.createElement(Tooltip, { content: sidenavButton.props.children, placement: 'right', key: index }, sidenavButton)) : (sidenavButton)))),
|
|
45
44
|
expanderPlacement === 'bottom' && ExpandButton),
|
|
46
45
|
submenu && (React.createElement(WithCSSTransition, { in: isSubmenuOpen, dimension: 'width', timeout: 200, classNames: 'iui' }, submenu))));
|
|
47
46
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
2
2
|
import type { ButtonProps } from '../Buttons/Button/Button.js';
|
|
3
|
-
import '@itwin/itwinui-css/css/side-navigation.css';
|
|
4
3
|
declare type SidenavButtonProps = {
|
|
5
4
|
/**
|
|
6
5
|
* Whether the sidenav button is active,
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { Button } from '../Buttons/index.js';
|
|
8
|
-
import '@itwin/itwinui-css/css/side-navigation.css';
|
|
9
8
|
/**
|
|
10
9
|
* Wrapper around Button to be used as SideNavigation items.
|
|
11
10
|
* Label is hidden when sidenav is collapsed.
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { Box } from '../utils/index.js';
|
|
8
|
-
import '@itwin/itwinui-css/css/side-navigation.css';
|
|
9
8
|
/**
|
|
10
9
|
* Header content for `SidenavSubmenu`. Supports truncated label and actions buttons.
|
|
11
10
|
* @example
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
|
-
import '@itwin/itwinui-css/css/skip-to-content.css';
|
|
4
3
|
declare type SkipToContentLinkProps = {
|
|
5
4
|
/**
|
|
6
5
|
* The id of the main content that the link directs to. Don't forget the #!
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import cx from 'classnames';
|
|
7
7
|
import { Box } from '../utils/index.js';
|
|
8
|
-
import '@itwin/itwinui-css/css/skip-to-content.css';
|
|
9
8
|
/**
|
|
10
9
|
* `SkipToContentLink` is for screen reader and keyboard users and will not be visible unless tabbed to.
|
|
11
10
|
* Provides a shortcut to the main content of the page without navigating through the header, etc.
|