@itwin/itwinui-react 2.11.4 → 3.0.0-dev.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 +21 -0
- package/README.md +2 -2
- package/cjs/core/Alert/Alert.d.ts +4 -4
- package/cjs/core/Alert/Alert.js +8 -10
- package/cjs/core/Alert/index.d.ts +0 -1
- package/cjs/core/Avatar/Avatar.d.ts +6 -14
- package/cjs/core/Avatar/Avatar.js +6 -8
- package/cjs/core/Avatar/index.d.ts +0 -1
- package/cjs/core/AvatarGroup/AvatarGroup.d.ts +5 -9
- package/cjs/core/AvatarGroup/AvatarGroup.js +14 -17
- package/cjs/core/AvatarGroup/index.d.ts +0 -1
- package/cjs/core/Backdrop/Backdrop.d.ts +3 -3
- package/cjs/core/Backdrop/Backdrop.js +1 -2
- package/cjs/core/Backdrop/index.d.ts +0 -1
- package/cjs/core/Badge/Badge.d.ts +4 -6
- package/cjs/core/Badge/Badge.js +3 -5
- package/cjs/core/Badge/index.d.ts +0 -1
- package/cjs/core/Breadcrumbs/Breadcrumbs.d.ts +4 -77
- package/cjs/core/Breadcrumbs/Breadcrumbs.js +5 -6
- package/cjs/core/Breadcrumbs/index.d.ts +0 -1
- package/cjs/core/ButtonGroup/ButtonGroup.d.ts +4 -3
- package/cjs/core/ButtonGroup/ButtonGroup.js +15 -13
- package/cjs/core/ButtonGroup/index.d.ts +0 -1
- package/cjs/core/Buttons/Button/Button.d.ts +4 -10
- package/cjs/core/Buttons/Button/Button.js +4 -5
- package/cjs/core/Buttons/Button/index.d.ts +0 -1
- package/cjs/core/Buttons/DropdownButton/DropdownButton.d.ts +5 -21
- package/cjs/core/Buttons/DropdownButton/DropdownButton.js +0 -1
- package/cjs/core/Buttons/DropdownButton/index.d.ts +0 -1
- package/cjs/core/Buttons/IconButton/IconButton.d.ts +2 -3
- package/cjs/core/Buttons/IconButton/IconButton.js +4 -5
- package/cjs/core/Buttons/IconButton/index.d.ts +0 -1
- package/cjs/core/Buttons/IdeasButton/IdeasButton.d.ts +3 -3
- package/cjs/core/Buttons/IdeasButton/IdeasButton.js +0 -1
- package/cjs/core/Buttons/IdeasButton/index.d.ts +0 -1
- package/cjs/core/Buttons/SplitButton/SplitButton.d.ts +2 -3
- package/cjs/core/Buttons/SplitButton/SplitButton.js +1 -2
- package/cjs/core/Buttons/SplitButton/index.d.ts +0 -1
- package/cjs/core/Buttons/index.d.ts +0 -5
- package/cjs/core/Carousel/Carousel.d.ts +24 -26
- package/cjs/core/Carousel/Carousel.js +22 -22
- package/cjs/core/Carousel/CarouselDot.d.ts +11 -9
- package/cjs/core/Carousel/CarouselDot.js +2 -1
- package/cjs/core/Carousel/CarouselDotsList.d.ts +11 -9
- package/cjs/core/Carousel/CarouselDotsList.js +1 -2
- package/cjs/core/Carousel/CarouselNavigation.d.ts +14 -5
- package/cjs/core/Carousel/CarouselNavigation.js +13 -9
- package/cjs/core/Carousel/CarouselSlide.d.ts +10 -8
- package/cjs/core/Carousel/CarouselSlide.js +1 -1
- package/cjs/core/Carousel/CarouselSlider.d.ts +2 -2
- package/cjs/core/Carousel/CarouselSlider.js +1 -1
- package/cjs/core/Carousel/index.d.ts +0 -1
- package/cjs/core/Checkbox/Checkbox.d.ts +4 -31
- package/cjs/core/Checkbox/Checkbox.js +3 -4
- package/cjs/core/Checkbox/index.d.ts +0 -1
- package/cjs/core/ColorPicker/ColorBuilder.d.ts +2 -4
- package/cjs/core/ColorPicker/ColorBuilder.js +3 -4
- package/cjs/core/ColorPicker/ColorInputPanel.d.ts +4 -18
- package/cjs/core/ColorPicker/ColorInputPanel.js +4 -5
- package/cjs/core/ColorPicker/ColorPalette.d.ts +3 -16
- package/cjs/core/ColorPicker/ColorPalette.js +3 -4
- package/cjs/core/ColorPicker/ColorPicker.d.ts +4 -4
- package/cjs/core/ColorPicker/ColorPicker.js +3 -5
- package/cjs/core/ColorPicker/ColorSwatch.d.ts +4 -5
- package/cjs/core/ColorPicker/ColorSwatch.js +1 -2
- package/cjs/core/ColorPicker/index.d.ts +0 -5
- package/cjs/core/ComboBox/ComboBox.d.ts +4 -4
- package/cjs/core/ComboBox/ComboBox.js +5 -7
- package/cjs/core/ComboBox/ComboBoxDropdown.d.ts +3 -3
- package/cjs/core/ComboBox/ComboBoxEndIcon.d.ts +7 -5
- package/cjs/core/ComboBox/ComboBoxEndIcon.js +1 -1
- package/cjs/core/ComboBox/ComboBoxInput.d.ts +7 -6
- package/cjs/core/ComboBox/ComboBoxInputContainer.d.ts +3 -7
- package/cjs/core/ComboBox/ComboBoxInputContainer.js +4 -5
- package/cjs/core/ComboBox/ComboBoxMenu.d.ts +5 -2
- package/cjs/core/ComboBox/ComboBoxMenu.js +2 -2
- package/cjs/core/ComboBox/ComboBoxMenuItem.d.ts +6 -19
- package/cjs/core/ComboBox/ComboBoxMenuItem.js +8 -22
- package/cjs/core/ComboBox/ComboBoxMultipleContainer.d.ts +6 -3
- package/cjs/core/ComboBox/index.d.ts +0 -1
- package/cjs/core/DatePicker/DatePicker.d.ts +4 -4
- package/cjs/core/DatePicker/DatePicker.js +9 -11
- package/cjs/core/DatePicker/index.d.ts +0 -1
- package/cjs/core/Dialog/Dialog.d.ts +13 -9
- package/cjs/core/Dialog/Dialog.js +21 -22
- package/cjs/core/Dialog/DialogBackdrop.d.ts +4 -4
- package/cjs/core/Dialog/DialogBackdrop.js +1 -3
- package/cjs/core/Dialog/DialogButtonBar.d.ts +1 -8
- package/cjs/core/Dialog/DialogButtonBar.js +1 -33
- package/cjs/core/Dialog/DialogContent.d.ts +1 -8
- package/cjs/core/Dialog/DialogContent.js +1 -33
- package/cjs/core/Dialog/DialogMain.d.ts +3 -2
- package/cjs/core/Dialog/DialogMain.js +1 -2
- package/cjs/core/Dialog/DialogTitleBar.d.ts +5 -4
- package/cjs/core/Dialog/DialogTitleBar.js +1 -2
- package/cjs/core/Dialog/DialogTitleBarTitle.d.ts +1 -8
- package/cjs/core/Dialog/DialogTitleBarTitle.js +1 -33
- package/cjs/core/Dialog/index.d.ts +0 -5
- package/cjs/core/DropdownMenu/DropdownMenu.js +0 -1
- package/cjs/core/ExpandableBlock/ExpandableBlock.d.ts +4 -4
- package/cjs/core/ExpandableBlock/ExpandableBlock.js +9 -11
- package/cjs/core/ExpandableBlock/index.d.ts +0 -1
- package/cjs/core/Fieldset/Fieldset.d.ts +4 -3
- package/cjs/core/Fieldset/Fieldset.js +3 -5
- package/cjs/core/Fieldset/index.d.ts +0 -1
- package/cjs/core/FileUpload/FileEmptyCard.d.ts +4 -11
- package/cjs/core/FileUpload/FileEmptyCard.js +16 -13
- package/cjs/core/FileUpload/FileUpload.d.ts +4 -25
- package/cjs/core/FileUpload/FileUpload.js +3 -4
- package/cjs/core/FileUpload/FileUploadCard.d.ts +11 -51
- package/cjs/core/FileUpload/FileUploadCard.js +43 -35
- package/cjs/core/FileUpload/FileUploadTemplate.d.ts +4 -3
- package/cjs/core/FileUpload/FileUploadTemplate.js +5 -7
- package/cjs/core/FileUpload/index.d.ts +0 -4
- package/cjs/core/Footer/Footer.d.ts +6 -10
- package/cjs/core/Footer/Footer.js +1 -2
- package/cjs/core/Footer/FooterItem.d.ts +1 -3
- package/cjs/core/Footer/FooterItem.js +1 -34
- package/cjs/core/Footer/FooterList.d.ts +1 -3
- package/cjs/core/Footer/FooterList.js +1 -34
- package/cjs/core/Footer/FooterSeparator.d.ts +1 -3
- package/cjs/core/Footer/FooterSeparator.js +3 -34
- package/cjs/core/Footer/index.d.ts +1 -1
- package/cjs/core/Header/Header.d.ts +5 -5
- package/cjs/core/Header/Header.js +7 -9
- package/cjs/core/Header/HeaderBasicButton.d.ts +2 -4
- package/cjs/core/Header/HeaderBasicButton.js +4 -11
- package/cjs/core/Header/HeaderBreadcrumbs.d.ts +3 -2
- package/cjs/core/Header/HeaderBreadcrumbs.js +10 -8
- package/cjs/core/Header/HeaderButton.d.ts +5 -6
- package/cjs/core/Header/HeaderButton.js +8 -24
- package/cjs/core/Header/HeaderDropdownButton.d.ts +2 -4
- package/cjs/core/Header/HeaderDropdownButton.js +0 -1
- package/cjs/core/Header/HeaderLogo.d.ts +1 -2
- package/cjs/core/Header/HeaderLogo.js +5 -12
- package/cjs/core/Header/HeaderSplitButton.d.ts +2 -4
- package/cjs/core/Header/HeaderSplitButton.js +3 -4
- package/cjs/core/Header/index.d.ts +0 -4
- package/cjs/core/InformationPanel/InformationPanel.d.ts +4 -24
- package/cjs/core/InformationPanel/InformationPanel.js +3 -4
- package/cjs/core/InformationPanel/InformationPanelBody.d.ts +1 -9
- package/cjs/core/InformationPanel/InformationPanelBody.js +1 -34
- package/cjs/core/InformationPanel/InformationPanelContent.d.ts +4 -4
- package/cjs/core/InformationPanel/InformationPanelContent.js +3 -5
- package/cjs/core/InformationPanel/InformationPanelHeader.d.ts +4 -4
- package/cjs/core/InformationPanel/InformationPanelHeader.js +5 -7
- package/cjs/core/InformationPanel/InformationPanelWrapper.d.ts +1 -6
- package/cjs/core/InformationPanel/InformationPanelWrapper.js +1 -34
- package/cjs/core/InformationPanel/index.d.ts +0 -5
- package/cjs/core/Input/Input.d.ts +3 -13
- package/cjs/core/Input/Input.js +1 -2
- package/cjs/core/Input/index.d.ts +0 -1
- package/cjs/core/InputGroup/InputGroup.d.ts +4 -4
- package/cjs/core/InputGroup/InputGroup.js +5 -7
- package/cjs/core/InputGroup/index.d.ts +0 -1
- package/cjs/core/Label/Label.d.ts +3 -9
- package/cjs/core/Label/Label.js +5 -7
- package/cjs/core/Label/index.d.ts +0 -1
- package/cjs/core/LabeledInput/LabeledInput.d.ts +2 -46
- package/cjs/core/LabeledInput/LabeledInput.js +0 -1
- package/cjs/core/LabeledInput/index.d.ts +0 -1
- package/cjs/core/LabeledSelect/LabeledSelect.d.ts +1 -1
- package/cjs/core/LabeledSelect/LabeledSelect.js +0 -1
- package/cjs/core/LabeledSelect/index.d.ts +0 -1
- package/cjs/core/LabeledTextarea/LabeledTextarea.d.ts +4 -26
- package/cjs/core/LabeledTextarea/LabeledTextarea.js +0 -1
- package/cjs/core/LabeledTextarea/index.d.ts +0 -1
- package/cjs/core/List/List.d.ts +1 -5
- package/cjs/core/List/List.js +2 -33
- package/cjs/core/List/ListItem.d.ts +6 -13
- package/cjs/core/List/ListItem.js +9 -15
- package/cjs/core/List/index.d.ts +0 -2
- package/cjs/core/Menu/Menu.d.ts +4 -27
- package/cjs/core/Menu/Menu.js +2 -3
- package/cjs/core/Menu/MenuDivider.d.ts +1 -4
- package/cjs/core/Menu/MenuDivider.js +3 -34
- package/cjs/core/Menu/MenuExtraContent.d.ts +1 -6
- package/cjs/core/Menu/MenuExtraContent.js +3 -34
- package/cjs/core/Menu/MenuItem.d.ts +14 -60
- package/cjs/core/Menu/MenuItem.js +12 -23
- package/cjs/core/Menu/MenuItemSkeleton.d.ts +4 -5
- package/cjs/core/Menu/MenuItemSkeleton.js +8 -10
- package/cjs/core/Menu/index.d.ts +0 -5
- package/cjs/core/Modal/Modal.d.ts +5 -5
- package/cjs/core/Modal/Modal.js +3 -5
- package/cjs/core/Modal/ModalButtonBar.d.ts +1 -9
- package/cjs/core/Modal/ModalButtonBar.js +1 -26
- package/cjs/core/Modal/ModalContent.d.ts +1 -9
- package/cjs/core/Modal/ModalContent.js +1 -26
- package/cjs/core/Modal/index.d.ts +0 -3
- package/cjs/core/NonIdealState/NonIdealState.d.ts +4 -3
- package/cjs/core/NonIdealState/NonIdealState.js +7 -9
- package/cjs/core/NonIdealState/index.d.ts +1 -2
- package/cjs/core/NotificationMarker/NotificationMarker.d.ts +4 -3
- package/cjs/core/NotificationMarker/NotificationMarker.js +1 -2
- package/cjs/core/NotificationMarker/index.d.ts +0 -1
- package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.d.ts +4 -4
- package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +8 -10
- package/cjs/core/ProgressIndicators/ProgressLinear/index.d.ts +0 -1
- package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.d.ts +4 -4
- package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +10 -12
- package/cjs/core/ProgressIndicators/ProgressRadial/index.d.ts +0 -1
- package/cjs/core/ProgressIndicators/index.d.ts +0 -2
- package/cjs/core/Radio/Radio.d.ts +4 -17
- package/cjs/core/Radio/Radio.js +3 -4
- package/cjs/core/Radio/index.d.ts +0 -1
- package/cjs/core/RadioTiles/RadioTile.d.ts +4 -21
- package/cjs/core/RadioTiles/RadioTile.js +6 -10
- package/cjs/core/RadioTiles/RadioTileGroup.d.ts +5 -4
- package/cjs/core/RadioTiles/RadioTileGroup.js +4 -6
- package/cjs/core/RadioTiles/index.d.ts +0 -2
- package/cjs/core/SearchBox/SearchBox.d.ts +4 -16
- package/cjs/core/SearchBox/SearchBox.js +1 -2
- package/cjs/core/SearchBox/index.d.ts +0 -1
- package/cjs/core/Select/Select.d.ts +6 -1
- package/cjs/core/Select/Select.js +12 -12
- package/cjs/core/Select/SelectTag.d.ts +4 -5
- package/cjs/core/Select/SelectTag.js +4 -6
- package/cjs/core/Select/SelectTagContainer.d.ts +4 -8
- package/cjs/core/Select/SelectTagContainer.js +1 -2
- package/cjs/core/Select/index.d.ts +1 -1
- package/cjs/core/SideNavigation/SideNavigation.d.ts +4 -4
- package/cjs/core/SideNavigation/SideNavigation.js +7 -9
- package/cjs/core/SideNavigation/SidenavButton.d.ts +3 -4
- package/cjs/core/SideNavigation/SidenavButton.js +2 -6
- package/cjs/core/SideNavigation/SidenavSubmenu.d.ts +2 -14
- package/cjs/core/SideNavigation/SidenavSubmenu.js +2 -3
- package/cjs/core/SideNavigation/SidenavSubmenuHeader.d.ts +4 -8
- package/cjs/core/SideNavigation/SidenavSubmenuHeader.js +5 -7
- package/cjs/core/SideNavigation/index.d.ts +0 -4
- package/cjs/core/SkipToContentLink/SkipToContentLink.d.ts +4 -13
- package/cjs/core/SkipToContentLink/SkipToContentLink.js +1 -2
- package/cjs/core/SkipToContentLink/index.d.ts +0 -1
- package/cjs/core/Slider/Slider.d.ts +4 -99
- package/cjs/core/Slider/Slider.js +6 -7
- package/cjs/core/Slider/Thumb.d.ts +3 -2
- package/cjs/core/Slider/Thumb.js +2 -1
- package/cjs/core/Slider/index.d.ts +0 -1
- package/cjs/core/StatusMessage/StatusMessage.d.ts +1 -1
- package/cjs/core/StatusMessage/StatusMessage.js +3 -18
- package/cjs/core/StatusMessage/index.d.ts +0 -1
- package/cjs/core/Stepper/Stepper.d.ts +2 -2
- package/cjs/core/Stepper/Stepper.js +3 -4
- package/cjs/core/Stepper/StepperStep.d.ts +3 -4
- package/cjs/core/Stepper/StepperStep.js +8 -8
- package/cjs/core/Stepper/Wizard.js +3 -1
- package/cjs/core/Stepper/WorkflowDiagram.d.ts +3 -3
- package/cjs/core/Stepper/WorkflowDiagram.js +5 -4
- package/cjs/core/Stepper/WorkflowDiagramStep.d.ts +2 -2
- package/cjs/core/Stepper/WorkflowDiagramStep.js +3 -2
- package/cjs/core/Stepper/index.d.ts +2 -3
- package/cjs/core/Surface/Surface.d.ts +5 -17
- package/cjs/core/Surface/Surface.js +7 -6
- package/cjs/core/Surface/index.d.ts +0 -1
- package/cjs/core/Table/Table.js +1 -1
- package/cjs/core/Table/TablePaginator.js +1 -1
- package/cjs/core/Table/columns/actionColumn.js +1 -1
- package/cjs/core/Table/columns/expanderColumn.d.ts +1 -1
- package/cjs/core/Table/columns/expanderColumn.js +1 -1
- package/cjs/core/Table/filters/BaseFilter.js +1 -1
- package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.d.ts +3 -3
- package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +1 -1
- package/cjs/core/Table/filters/FilterButtonBar.js +1 -1
- package/cjs/core/Table/filters/FilterToggle.d.ts +2 -2
- package/cjs/core/Table/filters/FilterToggle.js +1 -1
- package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +1 -1
- package/cjs/core/Table/filters/TextFilter/TextFilter.js +1 -1
- package/cjs/core/Tabs/Tab.d.ts +10 -3
- package/cjs/core/Tabs/Tab.js +7 -13
- package/cjs/core/Tabs/Tabs.d.ts +2 -2
- package/cjs/core/Tabs/Tabs.js +6 -9
- package/cjs/core/Tabs/index.d.ts +0 -2
- package/cjs/core/Tag/Tag.d.ts +4 -4
- package/cjs/core/Tag/Tag.js +5 -7
- package/cjs/core/Tag/TagContainer.d.ts +4 -4
- package/cjs/core/Tag/TagContainer.js +4 -6
- package/cjs/core/Tag/index.d.ts +0 -2
- package/cjs/core/Textarea/Textarea.d.ts +3 -9
- package/cjs/core/Textarea/Textarea.js +1 -2
- package/cjs/core/Textarea/index.d.ts +0 -1
- package/cjs/core/ThemeProvider/ThemeContext.d.ts +7 -0
- package/cjs/core/{Typography/Small/Small.js → ThemeProvider/ThemeContext.js} +2 -18
- package/cjs/core/ThemeProvider/ThemeProvider.d.ts +11 -12
- package/cjs/core/ThemeProvider/ThemeProvider.js +6 -16
- package/cjs/core/ThemeProvider/index.d.ts +1 -1
- package/cjs/core/Tile/Tile.d.ts +6 -7
- package/cjs/core/Tile/Tile.js +17 -19
- package/cjs/core/Tile/index.d.ts +0 -1
- package/cjs/core/TimePicker/TimePicker.d.ts +3 -3
- package/cjs/core/TimePicker/TimePicker.js +5 -7
- package/cjs/core/TimePicker/index.d.ts +1 -1
- package/cjs/core/Toast/Toast.js +5 -5
- package/cjs/core/Toast/ToastWrapper.js +2 -1
- package/cjs/core/ToggleSwitch/ToggleSwitch.d.ts +4 -3
- package/cjs/core/ToggleSwitch/ToggleSwitch.js +3 -9
- package/cjs/core/ToggleSwitch/index.d.ts +0 -1
- package/cjs/core/Tooltip/Tooltip.js +1 -2
- package/cjs/core/Tooltip/index.d.ts +0 -1
- package/cjs/core/Tree/Tree.d.ts +1 -1
- package/cjs/core/Tree/Tree.js +4 -4
- package/cjs/core/Tree/TreeNode.d.ts +1 -1
- package/cjs/core/Tree/TreeNode.js +10 -15
- package/cjs/core/Tree/TreeNodeExpander.d.ts +4 -4
- package/cjs/core/Tree/TreeNodeExpander.js +3 -4
- package/cjs/core/Tree/index.d.ts +1 -3
- package/cjs/core/Typography/Anchor/Anchor.d.ts +1 -5
- package/cjs/core/Typography/Anchor/Anchor.js +1 -33
- package/cjs/core/Typography/Anchor/index.d.ts +0 -1
- package/cjs/core/Typography/Blockquote/Blockquote.d.ts +4 -8
- package/cjs/core/Typography/Blockquote/Blockquote.js +1 -2
- package/cjs/core/Typography/Blockquote/index.d.ts +0 -1
- package/cjs/core/Typography/Code/Code.d.ts +1 -9
- package/cjs/core/Typography/Code/Code.js +1 -34
- package/cjs/core/Typography/Code/index.d.ts +0 -1
- package/cjs/core/Typography/Kbd/Kbd.d.ts +4 -5
- package/cjs/core/Typography/Kbd/Kbd.js +3 -5
- package/cjs/core/Typography/Kbd/index.d.ts +0 -1
- package/cjs/core/Typography/Text/Text.d.ts +3 -6
- package/cjs/core/Typography/Text/Text.js +2 -3
- package/cjs/core/Typography/Text/index.d.ts +0 -1
- package/cjs/core/Typography/index.d.ts +0 -17
- package/cjs/core/Typography/index.js +10 -22
- package/cjs/core/index.d.ts +10 -57
- package/cjs/core/index.js +1 -8
- package/cjs/core/utils/components/Box.d.ts +6 -0
- package/cjs/core/{Typography/Leading/index.js → utils/components/Box.js} +8 -4
- package/cjs/core/utils/components/Divider.d.ts +4 -4
- package/cjs/core/utils/components/Divider.js +2 -3
- package/cjs/core/utils/components/Flex.d.ts +1 -4
- package/cjs/core/utils/components/Flex.js +10 -6
- package/cjs/core/utils/components/Icon.d.ts +2 -24
- package/cjs/core/utils/components/Icon.js +2 -1
- package/cjs/core/utils/components/InputContainer.js +6 -10
- package/cjs/core/utils/components/InputFlexContainer.d.ts +3 -5
- package/cjs/core/utils/components/InputFlexContainer.js +3 -2
- package/cjs/core/utils/components/LinkAction.d.ts +2 -8
- package/cjs/core/utils/components/LinkAction.js +3 -36
- package/cjs/core/utils/components/Popover.d.ts +1 -1
- package/cjs/core/utils/components/Popover.js +2 -2
- package/cjs/core/utils/components/VisuallyHidden.d.ts +1 -2
- package/cjs/core/utils/components/VisuallyHidden.js +3 -4
- package/cjs/core/utils/components/index.d.ts +1 -0
- package/cjs/core/utils/components/index.js +1 -0
- package/cjs/core/utils/functions/index.d.ts +1 -0
- package/cjs/core/utils/functions/index.js +1 -0
- package/cjs/core/utils/functions/polymorphic.d.ts +198 -0
- package/cjs/core/utils/functions/polymorphic.js +81 -0
- package/cjs/core/utils/hooks/index.d.ts +1 -1
- package/cjs/core/utils/hooks/index.js +1 -1
- package/cjs/core/utils/hooks/useGlobals.d.ts +10 -0
- package/cjs/core/utils/hooks/useGlobals.js +79 -0
- package/cjs/core/utils/hooks/useIsThemeAlreadySet.js +2 -2
- package/cjs/core/utils/icons/Svg.d.ts +1 -0
- package/cjs/core/{Typography/Body/index.js → utils/icons/Svg.js} +3 -4
- package/cjs/core/utils/icons/SvgCalendar.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCalendar.js +2 -1
- package/cjs/core/utils/icons/SvgCaretDownSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCaretDownSmall.js +2 -1
- package/cjs/core/utils/icons/SvgCaretRightSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCaretRightSmall.js +2 -1
- package/cjs/core/utils/icons/SvgCaretUpSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCaretUpSmall.js +2 -1
- package/cjs/core/utils/icons/SvgCheckmark.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCheckmark.js +2 -1
- package/cjs/core/utils/icons/SvgCheckmarkSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCheckmarkSmall.js +2 -1
- package/cjs/core/utils/icons/SvgChevronLeft.d.ts +1 -1
- package/cjs/core/utils/icons/SvgChevronLeft.js +2 -1
- package/cjs/core/utils/icons/SvgChevronLeftDouble.d.ts +1 -1
- package/cjs/core/utils/icons/SvgChevronLeftDouble.js +2 -1
- package/cjs/core/utils/icons/SvgChevronRight.d.ts +1 -1
- package/cjs/core/utils/icons/SvgChevronRight.js +2 -1
- package/cjs/core/utils/icons/SvgChevronRightDouble.d.ts +1 -1
- package/cjs/core/utils/icons/SvgChevronRightDouble.js +2 -1
- package/cjs/core/utils/icons/SvgClose.d.ts +1 -1
- package/cjs/core/utils/icons/SvgClose.js +2 -1
- package/cjs/core/utils/icons/SvgCloseSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCloseSmall.js +2 -1
- package/cjs/core/utils/icons/SvgColumnManager.d.ts +1 -1
- package/cjs/core/utils/icons/SvgColumnManager.js +2 -1
- package/cjs/core/utils/icons/SvgDocument.d.ts +1 -1
- package/cjs/core/utils/icons/SvgDocument.js +2 -1
- package/cjs/core/utils/icons/SvgFilter.d.ts +1 -1
- package/cjs/core/utils/icons/SvgFilter.js +2 -1
- package/cjs/core/utils/icons/SvgFilterHollow.d.ts +1 -1
- package/cjs/core/utils/icons/SvgFilterHollow.js +2 -1
- package/cjs/core/utils/icons/SvgImportantSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgImportantSmall.js +2 -1
- package/cjs/core/utils/icons/SvgInfoCircular.d.ts +1 -1
- package/cjs/core/utils/icons/SvgInfoCircular.js +2 -1
- package/cjs/core/utils/icons/SvgMore.d.ts +1 -1
- package/cjs/core/utils/icons/SvgMore.js +2 -1
- package/cjs/core/utils/icons/SvgMoreVertical.d.ts +1 -1
- package/cjs/core/utils/icons/SvgMoreVertical.js +2 -1
- package/cjs/core/utils/icons/SvgNew.d.ts +1 -1
- package/cjs/core/utils/icons/SvgNew.js +2 -1
- package/cjs/core/utils/icons/SvgSearch.d.ts +1 -1
- package/cjs/core/utils/icons/SvgSearch.js +2 -1
- package/cjs/core/utils/icons/SvgSmileyHappy.d.ts +1 -1
- package/cjs/core/utils/icons/SvgSmileyHappy.js +2 -1
- package/cjs/core/utils/icons/SvgSortDown.d.ts +1 -1
- package/cjs/core/utils/icons/SvgSortDown.js +2 -1
- package/cjs/core/utils/icons/SvgSortUp.d.ts +1 -1
- package/cjs/core/utils/icons/SvgSortUp.js +2 -1
- package/cjs/core/utils/icons/SvgStatusError.d.ts +1 -1
- package/cjs/core/utils/icons/SvgStatusError.js +2 -1
- package/cjs/core/utils/icons/SvgStatusSuccess.d.ts +1 -1
- package/cjs/core/utils/icons/SvgStatusSuccess.js +2 -1
- package/cjs/core/utils/icons/SvgStatusWarning.d.ts +1 -1
- package/cjs/core/utils/icons/SvgStatusWarning.js +2 -1
- package/cjs/core/utils/icons/SvgSwap.d.ts +1 -1
- package/cjs/core/utils/icons/SvgSwap.js +2 -1
- package/cjs/core/utils/icons/SvgUpload.d.ts +1 -1
- package/cjs/core/utils/icons/SvgUpload.js +2 -1
- package/cjs/core/utils/props.d.ts +10 -33
- package/cjs/types/react-table-config.d.ts +1 -1
- package/esm/core/Alert/Alert.d.ts +4 -4
- package/esm/core/Alert/Alert.js +9 -10
- package/esm/core/Alert/index.d.ts +0 -1
- package/esm/core/Avatar/Avatar.d.ts +6 -14
- package/esm/core/Avatar/Avatar.js +7 -8
- package/esm/core/Avatar/index.d.ts +0 -1
- package/esm/core/AvatarGroup/AvatarGroup.d.ts +5 -9
- package/esm/core/AvatarGroup/AvatarGroup.js +15 -17
- package/esm/core/AvatarGroup/index.d.ts +0 -1
- package/esm/core/Backdrop/Backdrop.d.ts +3 -3
- package/esm/core/Backdrop/Backdrop.js +2 -3
- package/esm/core/Backdrop/index.d.ts +0 -1
- package/esm/core/Badge/Badge.d.ts +4 -6
- package/esm/core/Badge/Badge.js +4 -5
- package/esm/core/Badge/index.d.ts +0 -1
- package/esm/core/Breadcrumbs/Breadcrumbs.d.ts +4 -77
- package/esm/core/Breadcrumbs/Breadcrumbs.js +6 -7
- package/esm/core/Breadcrumbs/index.d.ts +0 -1
- package/esm/core/ButtonGroup/ButtonGroup.d.ts +4 -3
- package/esm/core/ButtonGroup/ButtonGroup.js +16 -14
- package/esm/core/ButtonGroup/index.d.ts +0 -1
- package/esm/core/Buttons/Button/Button.d.ts +4 -10
- package/esm/core/Buttons/Button/Button.js +5 -6
- package/esm/core/Buttons/Button/index.d.ts +0 -1
- package/esm/core/Buttons/DropdownButton/DropdownButton.d.ts +5 -21
- package/esm/core/Buttons/DropdownButton/DropdownButton.js +1 -2
- package/esm/core/Buttons/DropdownButton/index.d.ts +0 -1
- package/esm/core/Buttons/IconButton/IconButton.d.ts +2 -3
- package/esm/core/Buttons/IconButton/IconButton.js +5 -6
- package/esm/core/Buttons/IconButton/index.d.ts +0 -1
- package/esm/core/Buttons/IdeasButton/IdeasButton.d.ts +3 -3
- package/esm/core/Buttons/IdeasButton/IdeasButton.js +1 -2
- package/esm/core/Buttons/IdeasButton/index.d.ts +0 -1
- package/esm/core/Buttons/SplitButton/SplitButton.d.ts +2 -3
- package/esm/core/Buttons/SplitButton/SplitButton.js +2 -3
- package/esm/core/Buttons/SplitButton/index.d.ts +0 -1
- package/esm/core/Buttons/index.d.ts +0 -5
- package/esm/core/Carousel/Carousel.d.ts +24 -26
- package/esm/core/Carousel/Carousel.js +23 -23
- package/esm/core/Carousel/CarouselDot.d.ts +11 -9
- package/esm/core/Carousel/CarouselDot.js +2 -1
- package/esm/core/Carousel/CarouselDotsList.d.ts +11 -9
- package/esm/core/Carousel/CarouselDotsList.js +2 -3
- package/esm/core/Carousel/CarouselNavigation.d.ts +14 -5
- package/esm/core/Carousel/CarouselNavigation.js +14 -10
- package/esm/core/Carousel/CarouselSlide.d.ts +10 -8
- package/esm/core/Carousel/CarouselSlide.js +2 -2
- package/esm/core/Carousel/CarouselSlider.d.ts +2 -2
- package/esm/core/Carousel/CarouselSlider.js +2 -2
- package/esm/core/Carousel/index.d.ts +0 -1
- package/esm/core/Checkbox/Checkbox.d.ts +4 -31
- package/esm/core/Checkbox/Checkbox.js +4 -5
- package/esm/core/Checkbox/index.d.ts +0 -1
- package/esm/core/ColorPicker/ColorBuilder.d.ts +2 -4
- package/esm/core/ColorPicker/ColorBuilder.js +4 -5
- package/esm/core/ColorPicker/ColorInputPanel.d.ts +4 -18
- package/esm/core/ColorPicker/ColorInputPanel.js +5 -6
- package/esm/core/ColorPicker/ColorPalette.d.ts +3 -16
- package/esm/core/ColorPicker/ColorPalette.js +4 -5
- package/esm/core/ColorPicker/ColorPicker.d.ts +4 -4
- package/esm/core/ColorPicker/ColorPicker.js +4 -5
- package/esm/core/ColorPicker/ColorSwatch.d.ts +4 -5
- package/esm/core/ColorPicker/ColorSwatch.js +2 -3
- package/esm/core/ColorPicker/index.d.ts +0 -5
- package/esm/core/ComboBox/ComboBox.d.ts +4 -4
- package/esm/core/ComboBox/ComboBox.js +6 -8
- package/esm/core/ComboBox/ComboBoxDropdown.d.ts +3 -3
- package/esm/core/ComboBox/ComboBoxEndIcon.d.ts +7 -5
- package/esm/core/ComboBox/ComboBoxEndIcon.js +2 -2
- package/esm/core/ComboBox/ComboBoxInput.d.ts +7 -6
- package/esm/core/ComboBox/ComboBoxInputContainer.d.ts +3 -7
- package/esm/core/ComboBox/ComboBoxInputContainer.js +5 -5
- package/esm/core/ComboBox/ComboBoxMenu.d.ts +5 -2
- package/esm/core/ComboBox/ComboBoxMenu.js +2 -2
- package/esm/core/ComboBox/ComboBoxMenuItem.d.ts +6 -19
- package/esm/core/ComboBox/ComboBoxMenuItem.js +8 -19
- package/esm/core/ComboBox/ComboBoxMultipleContainer.d.ts +6 -3
- package/esm/core/ComboBox/index.d.ts +0 -1
- package/esm/core/DatePicker/DatePicker.d.ts +4 -4
- package/esm/core/DatePicker/DatePicker.js +10 -11
- package/esm/core/DatePicker/index.d.ts +0 -1
- package/esm/core/Dialog/Dialog.d.ts +13 -9
- package/esm/core/Dialog/Dialog.js +22 -23
- package/esm/core/Dialog/DialogBackdrop.d.ts +4 -4
- package/esm/core/Dialog/DialogBackdrop.js +1 -3
- package/esm/core/Dialog/DialogButtonBar.d.ts +1 -8
- package/esm/core/Dialog/DialogButtonBar.js +2 -8
- package/esm/core/Dialog/DialogContent.d.ts +1 -8
- package/esm/core/Dialog/DialogContent.js +2 -8
- package/esm/core/Dialog/DialogMain.d.ts +3 -2
- package/esm/core/Dialog/DialogMain.js +2 -3
- package/esm/core/Dialog/DialogTitleBar.d.ts +5 -4
- package/esm/core/Dialog/DialogTitleBar.js +2 -3
- package/esm/core/Dialog/DialogTitleBarTitle.d.ts +1 -8
- package/esm/core/Dialog/DialogTitleBarTitle.js +2 -8
- package/esm/core/Dialog/index.d.ts +0 -5
- package/esm/core/DropdownMenu/DropdownMenu.js +1 -2
- package/esm/core/ExpandableBlock/ExpandableBlock.d.ts +4 -4
- package/esm/core/ExpandableBlock/ExpandableBlock.js +10 -11
- package/esm/core/ExpandableBlock/index.d.ts +0 -1
- package/esm/core/Fieldset/Fieldset.d.ts +4 -3
- package/esm/core/Fieldset/Fieldset.js +4 -5
- package/esm/core/Fieldset/index.d.ts +0 -1
- package/esm/core/FileUpload/FileEmptyCard.d.ts +4 -11
- package/esm/core/FileUpload/FileEmptyCard.js +17 -14
- package/esm/core/FileUpload/FileUpload.d.ts +4 -25
- package/esm/core/FileUpload/FileUpload.js +4 -5
- package/esm/core/FileUpload/FileUploadCard.d.ts +11 -51
- package/esm/core/FileUpload/FileUploadCard.js +44 -36
- package/esm/core/FileUpload/FileUploadTemplate.d.ts +4 -3
- package/esm/core/FileUpload/FileUploadTemplate.js +6 -7
- package/esm/core/FileUpload/index.d.ts +0 -4
- package/esm/core/Footer/Footer.d.ts +6 -10
- package/esm/core/Footer/Footer.js +2 -3
- package/esm/core/Footer/FooterItem.d.ts +1 -3
- package/esm/core/Footer/FooterItem.js +2 -8
- package/esm/core/Footer/FooterList.d.ts +1 -3
- package/esm/core/Footer/FooterList.js +2 -8
- package/esm/core/Footer/FooterSeparator.d.ts +1 -3
- package/esm/core/Footer/FooterSeparator.js +4 -8
- package/esm/core/Footer/index.d.ts +1 -1
- package/esm/core/Header/Header.d.ts +5 -5
- package/esm/core/Header/Header.js +8 -9
- package/esm/core/Header/HeaderBasicButton.d.ts +2 -4
- package/esm/core/Header/HeaderBasicButton.js +5 -12
- package/esm/core/Header/HeaderBreadcrumbs.d.ts +3 -2
- package/esm/core/Header/HeaderBreadcrumbs.js +8 -8
- package/esm/core/Header/HeaderButton.d.ts +5 -6
- package/esm/core/Header/HeaderButton.js +9 -22
- package/esm/core/Header/HeaderDropdownButton.d.ts +2 -4
- package/esm/core/Header/HeaderDropdownButton.js +1 -2
- package/esm/core/Header/HeaderLogo.d.ts +1 -2
- package/esm/core/Header/HeaderLogo.js +6 -13
- package/esm/core/Header/HeaderSplitButton.d.ts +2 -4
- package/esm/core/Header/HeaderSplitButton.js +4 -5
- package/esm/core/Header/index.d.ts +0 -4
- package/esm/core/InformationPanel/InformationPanel.d.ts +4 -24
- package/esm/core/InformationPanel/InformationPanel.js +4 -5
- package/esm/core/InformationPanel/InformationPanelBody.d.ts +1 -9
- package/esm/core/InformationPanel/InformationPanelBody.js +2 -8
- package/esm/core/InformationPanel/InformationPanelContent.d.ts +4 -4
- package/esm/core/InformationPanel/InformationPanelContent.js +4 -5
- package/esm/core/InformationPanel/InformationPanelHeader.d.ts +4 -4
- package/esm/core/InformationPanel/InformationPanelHeader.js +6 -7
- package/esm/core/InformationPanel/InformationPanelWrapper.d.ts +1 -6
- package/esm/core/InformationPanel/InformationPanelWrapper.js +2 -8
- package/esm/core/InformationPanel/index.d.ts +0 -5
- package/esm/core/Input/Input.d.ts +3 -13
- package/esm/core/Input/Input.js +2 -3
- package/esm/core/Input/index.d.ts +0 -1
- package/esm/core/InputGroup/InputGroup.d.ts +4 -4
- package/esm/core/InputGroup/InputGroup.js +6 -7
- package/esm/core/InputGroup/index.d.ts +0 -1
- package/esm/core/Label/Label.d.ts +3 -9
- package/esm/core/Label/Label.js +6 -7
- package/esm/core/Label/index.d.ts +0 -1
- package/esm/core/LabeledInput/LabeledInput.d.ts +2 -46
- package/esm/core/LabeledInput/LabeledInput.js +1 -2
- package/esm/core/LabeledInput/index.d.ts +0 -1
- package/esm/core/LabeledSelect/LabeledSelect.d.ts +1 -1
- package/esm/core/LabeledSelect/LabeledSelect.js +1 -2
- package/esm/core/LabeledSelect/index.d.ts +0 -1
- package/esm/core/LabeledTextarea/LabeledTextarea.d.ts +4 -26
- package/esm/core/LabeledTextarea/LabeledTextarea.js +1 -2
- package/esm/core/LabeledTextarea/index.d.ts +0 -1
- package/esm/core/List/List.d.ts +1 -5
- package/esm/core/List/List.js +3 -8
- package/esm/core/List/ListItem.d.ts +6 -13
- package/esm/core/List/ListItem.js +10 -16
- package/esm/core/List/index.d.ts +0 -2
- package/esm/core/Menu/Menu.d.ts +4 -27
- package/esm/core/Menu/Menu.js +3 -4
- package/esm/core/Menu/MenuDivider.d.ts +1 -4
- package/esm/core/Menu/MenuDivider.js +4 -8
- package/esm/core/Menu/MenuExtraContent.d.ts +1 -6
- package/esm/core/Menu/MenuExtraContent.js +4 -8
- package/esm/core/Menu/MenuItem.d.ts +14 -60
- package/esm/core/Menu/MenuItem.js +13 -21
- package/esm/core/Menu/MenuItemSkeleton.d.ts +4 -5
- package/esm/core/Menu/MenuItemSkeleton.js +9 -10
- package/esm/core/Menu/index.d.ts +0 -5
- package/esm/core/Modal/Modal.d.ts +5 -5
- package/esm/core/Modal/Modal.js +4 -5
- package/esm/core/Modal/ModalButtonBar.d.ts +1 -9
- package/esm/core/Modal/ModalButtonBar.js +1 -2
- package/esm/core/Modal/ModalContent.d.ts +1 -9
- package/esm/core/Modal/ModalContent.js +1 -2
- package/esm/core/Modal/index.d.ts +0 -3
- package/esm/core/NonIdealState/NonIdealState.d.ts +4 -3
- package/esm/core/NonIdealState/NonIdealState.js +8 -9
- package/esm/core/NonIdealState/index.d.ts +1 -2
- package/esm/core/NotificationMarker/NotificationMarker.d.ts +4 -3
- package/esm/core/NotificationMarker/NotificationMarker.js +2 -3
- package/esm/core/NotificationMarker/index.d.ts +0 -1
- package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.d.ts +4 -4
- package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +9 -10
- package/esm/core/ProgressIndicators/ProgressLinear/index.d.ts +0 -1
- package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.d.ts +4 -4
- package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +11 -12
- package/esm/core/ProgressIndicators/ProgressRadial/index.d.ts +0 -1
- package/esm/core/ProgressIndicators/index.d.ts +0 -2
- package/esm/core/Radio/Radio.d.ts +4 -17
- package/esm/core/Radio/Radio.js +4 -5
- package/esm/core/Radio/index.d.ts +0 -1
- package/esm/core/RadioTiles/RadioTile.d.ts +4 -21
- package/esm/core/RadioTiles/RadioTile.js +7 -11
- package/esm/core/RadioTiles/RadioTileGroup.d.ts +5 -4
- package/esm/core/RadioTiles/RadioTileGroup.js +5 -6
- package/esm/core/RadioTiles/index.d.ts +0 -2
- package/esm/core/SearchBox/SearchBox.d.ts +4 -16
- package/esm/core/SearchBox/SearchBox.js +2 -3
- package/esm/core/SearchBox/index.d.ts +0 -1
- package/esm/core/Select/Select.d.ts +6 -1
- package/esm/core/Select/Select.js +13 -13
- package/esm/core/Select/SelectTag.d.ts +4 -5
- package/esm/core/Select/SelectTag.js +5 -6
- package/esm/core/Select/SelectTagContainer.d.ts +4 -8
- package/esm/core/Select/SelectTagContainer.js +2 -3
- package/esm/core/Select/index.d.ts +1 -1
- package/esm/core/SideNavigation/SideNavigation.d.ts +4 -4
- package/esm/core/SideNavigation/SideNavigation.js +8 -9
- package/esm/core/SideNavigation/SidenavButton.d.ts +3 -4
- package/esm/core/SideNavigation/SidenavButton.js +1 -5
- package/esm/core/SideNavigation/SidenavSubmenu.d.ts +2 -14
- package/esm/core/SideNavigation/SidenavSubmenu.js +3 -4
- package/esm/core/SideNavigation/SidenavSubmenuHeader.d.ts +4 -8
- package/esm/core/SideNavigation/SidenavSubmenuHeader.js +6 -7
- package/esm/core/SideNavigation/index.d.ts +0 -4
- package/esm/core/SkipToContentLink/SkipToContentLink.d.ts +4 -13
- package/esm/core/SkipToContentLink/SkipToContentLink.js +2 -3
- package/esm/core/SkipToContentLink/index.d.ts +0 -1
- package/esm/core/Slider/Slider.d.ts +4 -99
- package/esm/core/Slider/Slider.js +7 -8
- package/esm/core/Slider/Thumb.d.ts +3 -2
- package/esm/core/Slider/Thumb.js +2 -1
- package/esm/core/Slider/index.d.ts +0 -1
- package/esm/core/StatusMessage/StatusMessage.d.ts +1 -1
- package/esm/core/StatusMessage/StatusMessage.js +4 -16
- package/esm/core/StatusMessage/index.d.ts +0 -1
- package/esm/core/Stepper/Stepper.d.ts +2 -2
- package/esm/core/Stepper/Stepper.js +4 -5
- package/esm/core/Stepper/StepperStep.d.ts +3 -4
- package/esm/core/Stepper/StepperStep.js +8 -7
- package/esm/core/Stepper/Wizard.js +3 -1
- package/esm/core/Stepper/WorkflowDiagram.d.ts +3 -3
- package/esm/core/Stepper/WorkflowDiagram.js +6 -5
- package/esm/core/Stepper/WorkflowDiagramStep.d.ts +2 -2
- package/esm/core/Stepper/WorkflowDiagramStep.js +3 -2
- package/esm/core/Stepper/index.d.ts +2 -3
- package/esm/core/Surface/Surface.d.ts +5 -17
- package/esm/core/Surface/Surface.js +8 -7
- package/esm/core/Surface/index.d.ts +0 -1
- package/esm/core/Table/Table.js +2 -2
- package/esm/core/Table/TablePaginator.js +2 -2
- package/esm/core/Table/columns/actionColumn.js +1 -1
- package/esm/core/Table/columns/expanderColumn.d.ts +1 -1
- package/esm/core/Table/columns/expanderColumn.js +1 -1
- package/esm/core/Table/filters/BaseFilter.js +2 -2
- package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.d.ts +3 -3
- package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.js +2 -2
- package/esm/core/Table/filters/FilterButtonBar.js +2 -2
- package/esm/core/Table/filters/FilterToggle.d.ts +2 -2
- package/esm/core/Table/filters/FilterToggle.js +2 -2
- package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +2 -2
- package/esm/core/Table/filters/TextFilter/TextFilter.js +2 -2
- package/esm/core/Tabs/Tab.d.ts +10 -3
- package/esm/core/Tabs/Tab.js +8 -13
- package/esm/core/Tabs/Tabs.d.ts +2 -2
- package/esm/core/Tabs/Tabs.js +7 -10
- package/esm/core/Tabs/index.d.ts +0 -2
- package/esm/core/Tag/Tag.d.ts +4 -4
- package/esm/core/Tag/Tag.js +6 -7
- package/esm/core/Tag/TagContainer.d.ts +4 -4
- package/esm/core/Tag/TagContainer.js +5 -6
- package/esm/core/Tag/index.d.ts +0 -2
- package/esm/core/Textarea/Textarea.d.ts +3 -9
- package/esm/core/Textarea/Textarea.js +2 -3
- package/esm/core/Textarea/index.d.ts +0 -1
- package/esm/core/ThemeProvider/ThemeContext.d.ts +7 -0
- package/esm/core/{Typography/Body/index.js → ThemeProvider/ThemeContext.js} +2 -2
- package/esm/core/ThemeProvider/ThemeProvider.d.ts +11 -12
- package/esm/core/ThemeProvider/ThemeProvider.js +4 -14
- package/esm/core/ThemeProvider/index.d.ts +1 -1
- package/esm/core/Tile/Tile.d.ts +6 -7
- package/esm/core/Tile/Tile.js +18 -19
- package/esm/core/Tile/index.d.ts +0 -1
- package/esm/core/TimePicker/TimePicker.d.ts +3 -3
- package/esm/core/TimePicker/TimePicker.js +6 -7
- package/esm/core/TimePicker/index.d.ts +1 -1
- package/esm/core/Toast/Toast.js +6 -6
- package/esm/core/Toast/ToastWrapper.js +2 -1
- package/esm/core/ToggleSwitch/ToggleSwitch.d.ts +4 -3
- package/esm/core/ToggleSwitch/ToggleSwitch.js +4 -10
- package/esm/core/ToggleSwitch/index.d.ts +0 -1
- package/esm/core/Tooltip/Tooltip.js +2 -3
- package/esm/core/Tooltip/index.d.ts +0 -1
- package/esm/core/Tree/Tree.d.ts +1 -1
- package/esm/core/Tree/Tree.js +5 -5
- package/esm/core/Tree/TreeNode.d.ts +1 -1
- package/esm/core/Tree/TreeNode.js +11 -16
- package/esm/core/Tree/TreeNodeExpander.d.ts +4 -4
- package/esm/core/Tree/TreeNodeExpander.js +3 -3
- package/esm/core/Tree/index.d.ts +1 -3
- package/esm/core/Typography/Anchor/Anchor.d.ts +1 -5
- package/esm/core/Typography/Anchor/Anchor.js +2 -8
- package/esm/core/Typography/Anchor/index.d.ts +0 -1
- package/esm/core/Typography/Blockquote/Blockquote.d.ts +4 -8
- package/esm/core/Typography/Blockquote/Blockquote.js +2 -3
- package/esm/core/Typography/Blockquote/index.d.ts +0 -1
- package/esm/core/Typography/Code/Code.d.ts +1 -9
- package/esm/core/Typography/Code/Code.js +2 -8
- package/esm/core/Typography/Code/index.d.ts +0 -1
- package/esm/core/Typography/Kbd/Kbd.d.ts +4 -5
- package/esm/core/Typography/Kbd/Kbd.js +4 -5
- package/esm/core/Typography/Kbd/index.d.ts +0 -1
- package/esm/core/Typography/Text/Text.d.ts +3 -6
- package/esm/core/Typography/Text/Text.js +3 -4
- package/esm/core/Typography/Text/index.d.ts +0 -1
- package/esm/core/Typography/index.d.ts +0 -17
- package/esm/core/Typography/index.js +0 -6
- package/esm/core/index.d.ts +10 -57
- package/esm/core/index.js +2 -2
- package/esm/core/utils/components/Box.d.ts +6 -0
- package/esm/core/{Typography/Leading/index.js → utils/components/Box.js} +7 -2
- package/esm/core/utils/components/Divider.d.ts +4 -4
- package/esm/core/utils/components/Divider.js +2 -3
- package/esm/core/utils/components/Flex.d.ts +1 -4
- package/esm/core/utils/components/Flex.js +10 -6
- package/esm/core/utils/components/Icon.d.ts +2 -24
- package/esm/core/utils/components/Icon.js +2 -1
- package/esm/core/utils/components/InputContainer.js +6 -10
- package/esm/core/utils/components/InputFlexContainer.d.ts +3 -5
- package/esm/core/utils/components/InputFlexContainer.js +3 -2
- package/esm/core/utils/components/LinkAction.d.ts +2 -8
- package/esm/core/utils/components/LinkAction.js +3 -10
- package/esm/core/utils/components/Popover.d.ts +1 -1
- package/esm/core/utils/components/Popover.js +1 -1
- package/esm/core/utils/components/VisuallyHidden.d.ts +1 -2
- package/esm/core/utils/components/VisuallyHidden.js +3 -4
- package/esm/core/utils/components/index.d.ts +1 -0
- package/esm/core/utils/components/index.js +1 -0
- package/esm/core/utils/functions/index.d.ts +1 -0
- package/esm/core/utils/functions/index.js +1 -0
- package/esm/core/utils/functions/polymorphic.d.ts +198 -0
- package/esm/core/utils/functions/polymorphic.js +52 -0
- package/esm/core/utils/hooks/index.d.ts +1 -1
- package/esm/core/utils/hooks/index.js +1 -1
- package/esm/core/utils/hooks/useGlobals.d.ts +10 -0
- package/esm/core/utils/hooks/useGlobals.js +51 -0
- package/esm/core/utils/hooks/useIsThemeAlreadySet.js +1 -1
- package/esm/core/utils/icons/Svg.d.ts +1 -0
- package/esm/core/{Typography/Headline/index.js → utils/icons/Svg.js} +2 -2
- package/esm/core/utils/icons/SvgCalendar.d.ts +1 -1
- package/esm/core/utils/icons/SvgCalendar.js +2 -1
- package/esm/core/utils/icons/SvgCaretDownSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgCaretDownSmall.js +2 -1
- package/esm/core/utils/icons/SvgCaretRightSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgCaretRightSmall.js +2 -1
- package/esm/core/utils/icons/SvgCaretUpSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgCaretUpSmall.js +2 -1
- package/esm/core/utils/icons/SvgCheckmark.d.ts +1 -1
- package/esm/core/utils/icons/SvgCheckmark.js +2 -1
- package/esm/core/utils/icons/SvgCheckmarkSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgCheckmarkSmall.js +2 -1
- package/esm/core/utils/icons/SvgChevronLeft.d.ts +1 -1
- package/esm/core/utils/icons/SvgChevronLeft.js +2 -1
- package/esm/core/utils/icons/SvgChevronLeftDouble.d.ts +1 -1
- package/esm/core/utils/icons/SvgChevronLeftDouble.js +2 -1
- package/esm/core/utils/icons/SvgChevronRight.d.ts +1 -1
- package/esm/core/utils/icons/SvgChevronRight.js +2 -1
- package/esm/core/utils/icons/SvgChevronRightDouble.d.ts +1 -1
- package/esm/core/utils/icons/SvgChevronRightDouble.js +2 -1
- package/esm/core/utils/icons/SvgClose.d.ts +1 -1
- package/esm/core/utils/icons/SvgClose.js +2 -1
- package/esm/core/utils/icons/SvgCloseSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgCloseSmall.js +2 -1
- package/esm/core/utils/icons/SvgColumnManager.d.ts +1 -1
- package/esm/core/utils/icons/SvgColumnManager.js +2 -1
- package/esm/core/utils/icons/SvgDocument.d.ts +1 -1
- package/esm/core/utils/icons/SvgDocument.js +2 -1
- package/esm/core/utils/icons/SvgFilter.d.ts +1 -1
- package/esm/core/utils/icons/SvgFilter.js +2 -1
- package/esm/core/utils/icons/SvgFilterHollow.d.ts +1 -1
- package/esm/core/utils/icons/SvgFilterHollow.js +2 -1
- package/esm/core/utils/icons/SvgImportantSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgImportantSmall.js +2 -1
- package/esm/core/utils/icons/SvgInfoCircular.d.ts +1 -1
- package/esm/core/utils/icons/SvgInfoCircular.js +2 -1
- package/esm/core/utils/icons/SvgMore.d.ts +1 -1
- package/esm/core/utils/icons/SvgMore.js +2 -1
- package/esm/core/utils/icons/SvgMoreVertical.d.ts +1 -1
- package/esm/core/utils/icons/SvgMoreVertical.js +2 -1
- package/esm/core/utils/icons/SvgNew.d.ts +1 -1
- package/esm/core/utils/icons/SvgNew.js +2 -1
- package/esm/core/utils/icons/SvgSearch.d.ts +1 -1
- package/esm/core/utils/icons/SvgSearch.js +2 -1
- package/esm/core/utils/icons/SvgSmileyHappy.d.ts +1 -1
- package/esm/core/utils/icons/SvgSmileyHappy.js +2 -1
- package/esm/core/utils/icons/SvgSortDown.d.ts +1 -1
- package/esm/core/utils/icons/SvgSortDown.js +2 -1
- package/esm/core/utils/icons/SvgSortUp.d.ts +1 -1
- package/esm/core/utils/icons/SvgSortUp.js +2 -1
- package/esm/core/utils/icons/SvgStatusError.d.ts +1 -1
- package/esm/core/utils/icons/SvgStatusError.js +2 -1
- package/esm/core/utils/icons/SvgStatusSuccess.d.ts +1 -1
- package/esm/core/utils/icons/SvgStatusSuccess.js +2 -1
- package/esm/core/utils/icons/SvgStatusWarning.d.ts +1 -1
- package/esm/core/utils/icons/SvgStatusWarning.js +2 -1
- package/esm/core/utils/icons/SvgSwap.d.ts +1 -1
- package/esm/core/utils/icons/SvgSwap.js +2 -1
- package/esm/core/utils/icons/SvgUpload.d.ts +1 -1
- package/esm/core/utils/icons/SvgUpload.js +2 -1
- package/esm/core/utils/props.d.ts +10 -33
- package/esm/types/react-table-config.d.ts +1 -1
- package/package.json +2 -2
- package/cjs/core/Typography/Body/Body.d.ts +0 -35
- package/cjs/core/Typography/Body/Body.js +0 -51
- package/cjs/core/Typography/Body/index.d.ts +0 -4
- package/cjs/core/Typography/Headline/Headline.d.ts +0 -22
- package/cjs/core/Typography/Headline/Headline.js +0 -48
- package/cjs/core/Typography/Headline/index.d.ts +0 -4
- package/cjs/core/Typography/Headline/index.js +0 -10
- package/cjs/core/Typography/Leading/Leading.d.ts +0 -22
- package/cjs/core/Typography/Leading/Leading.js +0 -48
- package/cjs/core/Typography/Leading/index.d.ts +0 -4
- package/cjs/core/Typography/Small/Small.d.ts +0 -22
- package/cjs/core/Typography/Small/index.d.ts +0 -4
- package/cjs/core/Typography/Small/index.js +0 -10
- package/cjs/core/Typography/Subheading/Subheading.d.ts +0 -22
- package/cjs/core/Typography/Subheading/Subheading.js +0 -48
- package/cjs/core/Typography/Subheading/index.d.ts +0 -4
- package/cjs/core/Typography/Subheading/index.js +0 -10
- package/cjs/core/Typography/Title/Title.d.ts +0 -22
- package/cjs/core/Typography/Title/Title.js +0 -48
- package/cjs/core/Typography/Title/index.d.ts +0 -4
- package/cjs/core/Typography/Title/index.js +0 -10
- package/cjs/core/utils/hooks/useTheme.d.ts +0 -39
- package/cjs/core/utils/hooks/useTheme.js +0 -127
- package/esm/core/Typography/Body/Body.d.ts +0 -35
- package/esm/core/Typography/Body/Body.js +0 -22
- package/esm/core/Typography/Body/index.d.ts +0 -4
- package/esm/core/Typography/Headline/Headline.d.ts +0 -22
- package/esm/core/Typography/Headline/Headline.js +0 -19
- package/esm/core/Typography/Headline/index.d.ts +0 -4
- package/esm/core/Typography/Leading/Leading.d.ts +0 -22
- package/esm/core/Typography/Leading/Leading.js +0 -19
- package/esm/core/Typography/Leading/index.d.ts +0 -4
- package/esm/core/Typography/Small/Small.d.ts +0 -22
- package/esm/core/Typography/Small/Small.js +0 -19
- package/esm/core/Typography/Small/index.d.ts +0 -4
- package/esm/core/Typography/Small/index.js +0 -6
- package/esm/core/Typography/Subheading/Subheading.d.ts +0 -22
- package/esm/core/Typography/Subheading/Subheading.js +0 -19
- package/esm/core/Typography/Subheading/index.d.ts +0 -4
- package/esm/core/Typography/Subheading/index.js +0 -6
- package/esm/core/Typography/Title/Title.d.ts +0 -22
- package/esm/core/Typography/Title/Title.js +0 -19
- package/esm/core/Typography/Title/index.d.ts +0 -4
- package/esm/core/Typography/Title/index.js +0 -6
- package/esm/core/utils/hooks/useTheme.d.ts +0 -39
- package/esm/core/utils/hooks/useTheme.js +0 -100
package/esm/core/Menu/Menu.d.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
3
|
import '@itwin/itwinui-css/css/menu.css';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* ARIA role. For menu use 'menu', for select use 'listbox'.
|
|
7
|
-
* @default 'menu'
|
|
8
|
-
*/
|
|
9
|
-
role?: string;
|
|
4
|
+
declare type MenuProps = {
|
|
10
5
|
/**
|
|
11
6
|
* Menu items. Recommended to use `MenuItem` components.
|
|
12
7
|
*
|
|
@@ -19,27 +14,9 @@ export declare type MenuProps = {
|
|
|
19
14
|
* @default true
|
|
20
15
|
*/
|
|
21
16
|
setFocus?: boolean;
|
|
22
|
-
}
|
|
17
|
+
};
|
|
23
18
|
/**
|
|
24
19
|
* Basic menu component. Can be used for select or dropdown components.
|
|
25
20
|
*/
|
|
26
|
-
export declare const Menu:
|
|
27
|
-
/**
|
|
28
|
-
* ARIA role. For menu use 'menu', for select use 'listbox'.
|
|
29
|
-
* @default 'menu'
|
|
30
|
-
*/
|
|
31
|
-
role?: string | undefined;
|
|
32
|
-
/**
|
|
33
|
-
* Menu items. Recommended to use `MenuItem` components.
|
|
34
|
-
*
|
|
35
|
-
* If you have custom actionable items, they should have `tabIndex={-1}` for better keyboard navigation support
|
|
36
|
-
* and selected item should have `aria-selected={true}`.
|
|
37
|
-
*/
|
|
38
|
-
children: React.ReactNode;
|
|
39
|
-
/**
|
|
40
|
-
* If true, the first selected or enabled menu item will be focused automatically.
|
|
41
|
-
* @default true
|
|
42
|
-
*/
|
|
43
|
-
setFocus?: boolean | undefined;
|
|
44
|
-
} & Omit<CommonProps, "title"> & React.RefAttributes<HTMLUListElement>>;
|
|
21
|
+
export declare const Menu: PolymorphicForwardRefComponent<"ul", MenuProps>;
|
|
45
22
|
export default Menu;
|
package/esm/core/Menu/Menu.js
CHANGED
|
@@ -4,14 +4,13 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import cx from 'classnames';
|
|
7
|
-
import {
|
|
7
|
+
import { useMergedRefs, getFocusableElements, Box } from '../utils/index.js';
|
|
8
8
|
import '@itwin/itwinui-css/css/menu.css';
|
|
9
9
|
/**
|
|
10
10
|
* Basic menu component. Can be used for select or dropdown components.
|
|
11
11
|
*/
|
|
12
12
|
export const Menu = React.forwardRef((props, ref) => {
|
|
13
|
-
const {
|
|
14
|
-
useTheme();
|
|
13
|
+
const { setFocus = true, className, ...rest } = props;
|
|
15
14
|
const [focusedIndex, setFocusedIndex] = React.useState();
|
|
16
15
|
const menuRef = React.useRef(null);
|
|
17
16
|
const refs = useMergedRefs(menuRef, ref);
|
|
@@ -58,6 +57,6 @@ export const Menu = React.forwardRef((props, ref) => {
|
|
|
58
57
|
break;
|
|
59
58
|
}
|
|
60
59
|
};
|
|
61
|
-
return (React.createElement(
|
|
60
|
+
return (React.createElement(Box, { as: 'ul', className: cx('iui-menu', className), role: 'menu', onKeyDown: onKeyDown, ref: refs, ...rest }));
|
|
62
61
|
});
|
|
63
62
|
export default Menu;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { CommonProps } from '../utils/index.js';
|
|
3
1
|
import '@itwin/itwinui-css/css/menu.css';
|
|
4
|
-
export declare type MenuDividerProps = Omit<CommonProps, 'title'>;
|
|
5
2
|
/**
|
|
6
3
|
* Divider between menu items. Should be used inside `Menu`.
|
|
7
4
|
* @example
|
|
@@ -17,5 +14,5 @@ export declare type MenuDividerProps = Omit<CommonProps, 'title'>;
|
|
|
17
14
|
* ]}
|
|
18
15
|
* </Menu>
|
|
19
16
|
*/
|
|
20
|
-
export declare const MenuDivider: (props
|
|
17
|
+
export declare const MenuDivider: import("../utils/props.js").PolymorphicForwardRefComponent<"li", {}>;
|
|
21
18
|
export default MenuDivider;
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import
|
|
6
|
-
import cx from 'classnames';
|
|
7
|
-
import { useTheme } from '../utils/index.js';
|
|
5
|
+
import { polymorphic } from '../utils/index.js';
|
|
8
6
|
import '@itwin/itwinui-css/css/menu.css';
|
|
9
7
|
/**
|
|
10
8
|
* Divider between menu items. Should be used inside `Menu`.
|
|
@@ -21,9 +19,7 @@ import '@itwin/itwinui-css/css/menu.css';
|
|
|
21
19
|
* ]}
|
|
22
20
|
* </Menu>
|
|
23
21
|
*/
|
|
24
|
-
export const MenuDivider = (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return (React.createElement("li", { role: 'separator', className: cx('iui-menu-divider', className), ...rest }));
|
|
28
|
-
};
|
|
22
|
+
export const MenuDivider = polymorphic.li('iui-menu-divider', {
|
|
23
|
+
role: 'separator',
|
|
24
|
+
});
|
|
29
25
|
export default MenuDivider;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { CommonProps } from '../utils/index.js';
|
|
3
1
|
import '@itwin/itwinui-css/css/menu.css';
|
|
4
|
-
export declare type MenuExtraContentProps = {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
} & Omit<CommonProps, 'title'>;
|
|
7
2
|
/**
|
|
8
3
|
* Component that allows to have any additional content inside `Menu`.
|
|
9
4
|
* @example
|
|
@@ -24,5 +19,5 @@ export declare type MenuExtraContentProps = {
|
|
|
24
19
|
* ]}
|
|
25
20
|
* </Menu>
|
|
26
21
|
*/
|
|
27
|
-
export declare const MenuExtraContent: (props
|
|
22
|
+
export declare const MenuExtraContent: import("../utils/props.js").PolymorphicForwardRefComponent<"li", {}>;
|
|
28
23
|
export default MenuExtraContent;
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import
|
|
6
|
-
import cx from 'classnames';
|
|
7
|
-
import { useTheme } from '../utils/index.js';
|
|
5
|
+
import { polymorphic } from '../utils/index.js';
|
|
8
6
|
import '@itwin/itwinui-css/css/menu.css';
|
|
9
7
|
/**
|
|
10
8
|
* Component that allows to have any additional content inside `Menu`.
|
|
@@ -26,9 +24,7 @@ import '@itwin/itwinui-css/css/menu.css';
|
|
|
26
24
|
* ]}
|
|
27
25
|
* </Menu>
|
|
28
26
|
*/
|
|
29
|
-
export const MenuExtraContent = (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return (React.createElement("li", { className: cx('iui-menu-content', className), role: 'presentation', ...rest }, children));
|
|
33
|
-
};
|
|
27
|
+
export const MenuExtraContent = polymorphic.li('iui-menu-content', {
|
|
28
|
+
role: 'presentation',
|
|
29
|
+
});
|
|
34
30
|
export default MenuExtraContent;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
3
|
import '@itwin/itwinui-css/css/menu.css';
|
|
4
|
+
import type { ListItemOwnProps } from '../List/ListItem.js';
|
|
4
5
|
export declare type MenuItemProps = {
|
|
5
6
|
/**
|
|
6
7
|
* Item is selected.
|
|
@@ -32,10 +33,20 @@ export declare type MenuItemProps = {
|
|
|
32
33
|
/**
|
|
33
34
|
* SVG icon component shown on the left.
|
|
34
35
|
*/
|
|
36
|
+
startIcon?: JSX.Element;
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated Use startIcon.
|
|
39
|
+
* SVG icon component shown on the left.
|
|
40
|
+
*/
|
|
35
41
|
icon?: JSX.Element;
|
|
36
42
|
/**
|
|
37
43
|
* SVG icon component shown on the right.
|
|
38
44
|
*/
|
|
45
|
+
endIcon?: JSX.Element;
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated Use endIcon
|
|
48
|
+
* SVG icon component shown on the right.
|
|
49
|
+
*/
|
|
39
50
|
badge?: JSX.Element;
|
|
40
51
|
/**
|
|
41
52
|
* ARIA role. For menu item use 'menuitem', for select item use 'option'.
|
|
@@ -50,66 +61,9 @@ export declare type MenuItemProps = {
|
|
|
50
61
|
* Content of the menu item.
|
|
51
62
|
*/
|
|
52
63
|
children?: React.ReactNode;
|
|
53
|
-
} &
|
|
64
|
+
} & Pick<ListItemOwnProps, 'focused'>;
|
|
54
65
|
/**
|
|
55
66
|
* Basic menu item component. Should be used inside `Menu` component for each item.
|
|
56
67
|
*/
|
|
57
|
-
export declare const MenuItem:
|
|
58
|
-
/**
|
|
59
|
-
* Item is selected.
|
|
60
|
-
*/
|
|
61
|
-
isSelected?: boolean | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* Item is disabled.
|
|
64
|
-
*/
|
|
65
|
-
disabled?: boolean | undefined;
|
|
66
|
-
/**
|
|
67
|
-
* Value of the item.
|
|
68
|
-
*/
|
|
69
|
-
value?: unknown;
|
|
70
|
-
/**
|
|
71
|
-
* Callback function that handles click and keyboard submit actions.
|
|
72
|
-
*/
|
|
73
|
-
onClick?: ((value?: unknown) => void) | undefined;
|
|
74
|
-
/**
|
|
75
|
-
* Modify height of the item.
|
|
76
|
-
* Use 'large' when any of the sibling items have `sublabel`.
|
|
77
|
-
*
|
|
78
|
-
* Defaults to 'large' if `sublabel` provided, otherwise 'default'.
|
|
79
|
-
*/
|
|
80
|
-
size?: "default" | "large" | undefined;
|
|
81
|
-
/**
|
|
82
|
-
* Sub label shown below the main content of the item.
|
|
83
|
-
*/
|
|
84
|
-
sublabel?: React.ReactNode;
|
|
85
|
-
/**
|
|
86
|
-
* SVG icon component shown on the left.
|
|
87
|
-
*/
|
|
88
|
-
icon?: JSX.Element | undefined;
|
|
89
|
-
/**
|
|
90
|
-
* SVG icon component shown on the right.
|
|
91
|
-
*/
|
|
92
|
-
badge?: JSX.Element | undefined;
|
|
93
|
-
/**
|
|
94
|
-
* ARIA role. For menu item use 'menuitem', for select item use 'option'.
|
|
95
|
-
* @default 'menuitem'
|
|
96
|
-
*/
|
|
97
|
-
role?: string | undefined;
|
|
98
|
-
/**
|
|
99
|
-
* Items to be shown in the submenu when hovered over the item.
|
|
100
|
-
*/
|
|
101
|
-
subMenuItems?: JSX.Element[] | undefined;
|
|
102
|
-
/**
|
|
103
|
-
* Content of the menu item.
|
|
104
|
-
*/
|
|
105
|
-
children?: React.ReactNode;
|
|
106
|
-
} & {
|
|
107
|
-
/**
|
|
108
|
-
* Context used to provide menu item ref to sub-menu items.
|
|
109
|
-
*/
|
|
110
|
-
title?: string | undefined;
|
|
111
|
-
id?: string | undefined;
|
|
112
|
-
} & {
|
|
113
|
-
style?: React.CSSProperties | undefined;
|
|
114
|
-
} & import("../utils/props.js").ClassNameProps & React.RefAttributes<HTMLLIElement>>;
|
|
68
|
+
export declare const MenuItem: PolymorphicForwardRefComponent<"li", MenuItemProps>;
|
|
115
69
|
export default MenuItem;
|
|
@@ -3,10 +3,10 @@
|
|
|
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
|
|
7
|
-
import { useTheme, Popover, useMergedRefs, SvgCaretRightSmall, } from '../utils/index.js';
|
|
6
|
+
import { Popover, useMergedRefs, SvgCaretRightSmall } from '../utils/index.js';
|
|
8
7
|
import '@itwin/itwinui-css/css/menu.css';
|
|
9
8
|
import { Menu } from './Menu.js';
|
|
9
|
+
import { ListItem } from '../List/ListItem.js';
|
|
10
10
|
/**
|
|
11
11
|
* Context used to provide menu item ref to sub-menu items.
|
|
12
12
|
*/
|
|
@@ -15,13 +15,14 @@ const MenuItemContext = React.createContext({ ref: undefined });
|
|
|
15
15
|
* Basic menu item component. Should be used inside `Menu` component for each item.
|
|
16
16
|
*/
|
|
17
17
|
export const MenuItem = React.forwardRef((props, ref) => {
|
|
18
|
-
const { children, isSelected, disabled, value, onClick, sublabel, size = !!sublabel ? 'large' : 'default',
|
|
19
|
-
useTheme();
|
|
18
|
+
const { children, isSelected, disabled, value, onClick, sublabel, size = !!sublabel ? 'large' : 'default', startIcon: startIconProp, icon, endIcon: endIconProp, badge, role = 'menuitem', subMenuItems = [], ...rest } = props;
|
|
20
19
|
const menuItemRef = React.useRef(null);
|
|
21
20
|
const refs = useMergedRefs(menuItemRef, ref);
|
|
22
21
|
const { ref: parentMenuItemRef } = React.useContext(MenuItemContext);
|
|
23
22
|
const subMenuRef = React.useRef(null);
|
|
24
23
|
const [isSubmenuVisible, setIsSubmenuVisible] = React.useState(false);
|
|
24
|
+
const startIcon = startIconProp !== null && startIconProp !== void 0 ? startIconProp : icon;
|
|
25
|
+
const endIcon = endIconProp !== null && endIconProp !== void 0 ? endIconProp : badge;
|
|
25
26
|
const onKeyDown = (event) => {
|
|
26
27
|
var _a;
|
|
27
28
|
if (event.altKey) {
|
|
@@ -53,29 +54,20 @@ export const MenuItem = React.forwardRef((props, ref) => {
|
|
|
53
54
|
break;
|
|
54
55
|
}
|
|
55
56
|
};
|
|
56
|
-
const listItem = (React.createElement(
|
|
57
|
-
'iui-large': size === 'large',
|
|
58
|
-
'iui-active': isSelected,
|
|
59
|
-
'iui-disabled': disabled,
|
|
60
|
-
}, className), onClick: () => !disabled && (onClick === null || onClick === void 0 ? void 0 : onClick(value)), ref: refs, style: style, 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) => {
|
|
57
|
+
const listItem = (React.createElement(ListItem, { actionable: true, size: size, active: isSelected, disabled: disabled, onClick: () => !disabled && (onClick === null || onClick === void 0 ? void 0 : 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) => {
|
|
61
58
|
var _a;
|
|
62
59
|
if (!(e.relatedTarget instanceof Node) ||
|
|
63
60
|
!((_a = subMenuRef.current) === null || _a === void 0 ? void 0 : _a.contains(e.relatedTarget))) {
|
|
64
61
|
setIsSubmenuVisible(false);
|
|
65
62
|
}
|
|
66
63
|
}, ...rest },
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
React.createElement(
|
|
72
|
-
React.createElement(
|
|
73
|
-
|
|
74
|
-
!badge && subMenuItems.length > 0 && (React.createElement(SvgCaretRightSmall, { className: 'iui-icon' })),
|
|
75
|
-
badge &&
|
|
76
|
-
React.cloneElement(badge, {
|
|
77
|
-
className: cx(badge.props.className, 'iui-icon'),
|
|
78
|
-
})));
|
|
64
|
+
startIcon && (React.createElement(ListItem.Icon, { as: 'span', "aria-hidden": true }, startIcon)),
|
|
65
|
+
React.createElement(ListItem.Content, null,
|
|
66
|
+
React.createElement("div", null, children),
|
|
67
|
+
sublabel && React.createElement(ListItem.Description, null, sublabel)),
|
|
68
|
+
!endIcon && subMenuItems.length > 0 && (React.createElement(ListItem.Icon, { as: 'span', "aria-hidden": true },
|
|
69
|
+
React.createElement(SvgCaretRightSmall, null))),
|
|
70
|
+
endIcon && (React.createElement(ListItem.Icon, { as: 'span', "aria-hidden": true }, endIcon))));
|
|
79
71
|
return subMenuItems.length === 0 ? (listItem) : (React.createElement(MenuItemContext.Provider, { value: { ref: menuItemRef } },
|
|
80
72
|
React.createElement(Popover, { placement: 'right-start', visible: isSubmenuVisible, appendTo: 'parent', content: React.createElement("div", { onMouseLeave: () => setIsSubmenuVisible(false), onBlur: (e) => {
|
|
81
73
|
var _a, _b;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import type { CommonProps } from '../utils/index.js';
|
|
1
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
2
|
import '@itwin/itwinui-css/css/menu.css';
|
|
4
|
-
|
|
3
|
+
declare type MenuItemSkeletonProps = {
|
|
5
4
|
/**
|
|
6
5
|
* Flag whether to show skeleton for sub-label.
|
|
7
6
|
*/
|
|
@@ -24,9 +23,9 @@ export declare type MenuItemSkeletonProps = {
|
|
|
24
23
|
*/
|
|
25
24
|
loading: string;
|
|
26
25
|
};
|
|
27
|
-
}
|
|
26
|
+
};
|
|
28
27
|
/**
|
|
29
28
|
* Menu item that uses skeletons to indicate loading state.
|
|
30
29
|
*/
|
|
31
|
-
export declare const MenuItemSkeleton:
|
|
30
|
+
export declare const MenuItemSkeleton: PolymorphicForwardRefComponent<"li", MenuItemSkeletonProps>;
|
|
32
31
|
export default MenuItemSkeleton;
|
|
@@ -4,24 +4,23 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import cx from 'classnames';
|
|
7
|
-
import {
|
|
7
|
+
import { Box, VisuallyHidden } from '../utils/index.js';
|
|
8
8
|
import '@itwin/itwinui-css/css/menu.css';
|
|
9
9
|
/**
|
|
10
10
|
* Menu item that uses skeletons to indicate loading state.
|
|
11
11
|
*/
|
|
12
|
-
export const MenuItemSkeleton = (props) => {
|
|
12
|
+
export const MenuItemSkeleton = React.forwardRef((props, forwardedRef) => {
|
|
13
13
|
const { hasSublabel, hasIcon, contentWidth, translatedStrings = { loading: 'Loading…' }, className, style, ...rest } = props;
|
|
14
|
-
|
|
15
|
-
return (React.createElement("li", { className: cx('iui-menu-item', 'iui-menu-item-skeleton', { 'iui-large': hasSublabel }, className), style: {
|
|
14
|
+
return (React.createElement(Box, { as: 'li', className: cx('iui-menu-item-skeleton', className), "data-iui-size": hasSublabel && 'large', style: {
|
|
16
15
|
...{
|
|
17
16
|
'--iui-menu-item-content-skeleton-max-width': contentWidth,
|
|
18
17
|
},
|
|
19
18
|
...style,
|
|
20
|
-
}, ...rest },
|
|
21
|
-
hasIcon && React.createElement(
|
|
22
|
-
React.createElement(
|
|
23
|
-
React.createElement(
|
|
24
|
-
hasSublabel && (React.createElement(
|
|
19
|
+
}, ref: forwardedRef, ...rest },
|
|
20
|
+
hasIcon && React.createElement(Box, { className: 'iui-icon iui-skeleton', "aria-hidden": true }),
|
|
21
|
+
React.createElement(Box, { as: 'span', className: 'iui-content' },
|
|
22
|
+
React.createElement(Box, { className: 'iui-menu-label iui-skeleton', "aria-hidden": true }),
|
|
23
|
+
hasSublabel && (React.createElement(Box, { className: 'iui-menu-description iui-skeleton', "aria-hidden": true })),
|
|
25
24
|
React.createElement(VisuallyHidden, null, translatedStrings.loading))));
|
|
26
|
-
};
|
|
25
|
+
});
|
|
27
26
|
export default MenuItemSkeleton;
|
package/esm/core/Menu/index.d.ts
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
export { Menu } from './Menu.js';
|
|
2
|
-
export type { MenuProps } from './Menu.js';
|
|
3
2
|
export { MenuItem } from './MenuItem.js';
|
|
4
|
-
export type { MenuItemProps } from './MenuItem.js';
|
|
5
3
|
export { MenuDivider } from './MenuDivider.js';
|
|
6
|
-
export type { MenuDividerProps } from './MenuDivider.js';
|
|
7
4
|
export { MenuExtraContent } from './MenuExtraContent.js';
|
|
8
|
-
export type { MenuExtraContentProps } from './MenuExtraContent.js';
|
|
9
5
|
export { MenuItemSkeleton } from './MenuItemSkeleton.js';
|
|
10
|
-
export type { MenuItemSkeletonProps } from './MenuItemSkeleton.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
3
|
import '@itwin/itwinui-css/css/dialog.css';
|
|
4
|
-
import type { DialogMainProps } from '../Dialog/
|
|
5
|
-
|
|
4
|
+
import type { DialogMainProps } from '../Dialog/DialogMain.js';
|
|
5
|
+
declare type ModalProps = {
|
|
6
6
|
/**
|
|
7
7
|
* Modal title.
|
|
8
8
|
*/
|
|
@@ -45,7 +45,7 @@ export declare type ModalProps = {
|
|
|
45
45
|
* Content of the modal.
|
|
46
46
|
*/
|
|
47
47
|
children: React.ReactNode;
|
|
48
|
-
} & Pick<DialogMainProps, 'isOpen' | 'styleType'
|
|
48
|
+
} & Pick<DialogMainProps, 'isOpen' | 'styleType'>;
|
|
49
49
|
/**
|
|
50
50
|
* Modal component which can wrap any content.
|
|
51
51
|
* @example
|
|
@@ -67,5 +67,5 @@ export declare type ModalProps = {
|
|
|
67
67
|
* </ModalButtonBar>
|
|
68
68
|
* </Modal>
|
|
69
69
|
*/
|
|
70
|
-
export declare const Modal:
|
|
70
|
+
export declare const Modal: PolymorphicForwardRefComponent<"div", ModalProps>;
|
|
71
71
|
export default Modal;
|
package/esm/core/Modal/Modal.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import ReactDOM from 'react-dom';
|
|
7
|
-
import {
|
|
7
|
+
import { getContainer, getDocument } from '../utils/index.js';
|
|
8
8
|
import '@itwin/itwinui-css/css/dialog.css';
|
|
9
9
|
import { Dialog } from '../Dialog/index.js';
|
|
10
10
|
/**
|
|
@@ -28,18 +28,17 @@ import { Dialog } from '../Dialog/index.js';
|
|
|
28
28
|
* </ModalButtonBar>
|
|
29
29
|
* </Modal>
|
|
30
30
|
*/
|
|
31
|
-
export const Modal = (props) => {
|
|
31
|
+
export const Modal = React.forwardRef((props, forwardedRef) => {
|
|
32
32
|
const { isOpen = false, isDismissible = true, closeOnEsc = true, closeOnExternalClick = true, onClose, title, children, modalRootId = 'iui-react-portal-container', ownerDocument = getDocument(), ...rest } = props;
|
|
33
|
-
useTheme();
|
|
34
33
|
const [container, setContainer] = React.useState();
|
|
35
34
|
React.useEffect(() => {
|
|
36
35
|
setContainer(getContainer(modalRootId, ownerDocument));
|
|
37
36
|
return () => setContainer(undefined);
|
|
38
37
|
}, [ownerDocument, modalRootId]);
|
|
39
|
-
return !!container ? (ReactDOM.createPortal(React.createElement(Dialog, { isOpen: isOpen, closeOnEsc: closeOnEsc, closeOnExternalClick: closeOnExternalClick, isDismissible: isDismissible, onClose: onClose, preventDocumentScroll: true, trapFocus: true, setFocus: true },
|
|
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 },
|
|
40
39
|
React.createElement(Dialog.Backdrop, null),
|
|
41
40
|
React.createElement(Dialog.Main, { "aria-modal": true, ...rest },
|
|
42
41
|
React.createElement(Dialog.TitleBar, { titleText: title }),
|
|
43
42
|
children)), container)) : (React.createElement(React.Fragment, null));
|
|
44
|
-
};
|
|
43
|
+
});
|
|
45
44
|
export default Modal;
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { CommonProps } from '../utils/index.js';
|
|
3
|
-
export declare type ModalButtonBarProps = {
|
|
4
|
-
/**
|
|
5
|
-
* Buttons in the modal bar.
|
|
6
|
-
*/
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
} & Omit<CommonProps, 'title'>;
|
|
9
1
|
/**
|
|
10
2
|
* Container for Buttons in modal.
|
|
11
3
|
*/
|
|
12
|
-
export declare const ModalButtonBar: (props
|
|
4
|
+
export declare const ModalButtonBar: import("../utils/props.js").PolymorphicForwardRefComponent<"div", {}>;
|
|
13
5
|
export default ModalButtonBar;
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as React from 'react';
|
|
6
5
|
import { DialogButtonBar } from '../Dialog/DialogButtonBar.js';
|
|
7
6
|
/**
|
|
8
7
|
* Container for Buttons in modal.
|
|
9
8
|
*/
|
|
10
|
-
export const ModalButtonBar =
|
|
9
|
+
export const ModalButtonBar = Object.assign({}, DialogButtonBar);
|
|
11
10
|
export default ModalButtonBar;
|
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { CommonProps } from '../utils/index.js';
|
|
3
|
-
export declare type ModalContentProps = {
|
|
4
|
-
/**
|
|
5
|
-
* Main content in the `Modal`.
|
|
6
|
-
*/
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
} & Omit<CommonProps, 'title'>;
|
|
9
1
|
/**
|
|
10
2
|
* Container for content in `Modal`.
|
|
11
3
|
*/
|
|
12
|
-
export declare const ModalContent: (props
|
|
4
|
+
export declare const ModalContent: import("../utils/props.js").PolymorphicForwardRefComponent<"div", {}>;
|
|
13
5
|
export default ModalContent;
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import * as React from 'react';
|
|
6
5
|
import { DialogContent } from '../Dialog/DialogContent.js';
|
|
7
6
|
/**
|
|
8
7
|
* Container for content in `Modal`.
|
|
9
8
|
*/
|
|
10
|
-
export const ModalContent =
|
|
9
|
+
export const ModalContent = Object.assign({}, DialogContent);
|
|
11
10
|
export default ModalContent;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
export { Modal } from './Modal.js';
|
|
2
|
-
export type { ModalProps } from './Modal.js';
|
|
3
2
|
export { ModalButtonBar } from './ModalButtonBar.js';
|
|
4
|
-
export type { ModalButtonBarProps } from './ModalButtonBar.js';
|
|
5
3
|
export { ModalContent } from './ModalContent.js';
|
|
6
|
-
export type { ModalContentProps } from './ModalContent.js';
|
|
7
4
|
declare const _default: "./Modal";
|
|
8
5
|
export default _default;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
2
3
|
import '@itwin/itwinui-css/css/non-ideal-state.css';
|
|
3
|
-
|
|
4
|
+
declare type NonIdealStateProps = {
|
|
4
5
|
/**
|
|
5
6
|
* An svg component, preferably from @itwin/itwinui-illustrations-react.
|
|
6
7
|
*
|
|
@@ -34,7 +35,7 @@ export declare type NonIdealStateProps = {
|
|
|
34
35
|
* />
|
|
35
36
|
*/
|
|
36
37
|
actions?: React.ReactNode;
|
|
37
|
-
}
|
|
38
|
+
};
|
|
38
39
|
/**
|
|
39
40
|
* A stylized display to communicate common http errors and other non-ideal states.
|
|
40
41
|
* Works well with svgs from @itwin/itwinui-illustrations-react.
|
|
@@ -42,5 +43,5 @@ export declare type NonIdealStateProps = {
|
|
|
42
43
|
* @example
|
|
43
44
|
* <NonIdealState svg={<Svg404 />} heading='Not found' />
|
|
44
45
|
*/
|
|
45
|
-
export declare const NonIdealState:
|
|
46
|
+
export declare const NonIdealState: PolymorphicForwardRefComponent<"div", NonIdealStateProps>;
|
|
46
47
|
export default NonIdealState;
|
|
@@ -3,7 +3,7 @@
|
|
|
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 {
|
|
6
|
+
import { Box } from '../utils/index.js';
|
|
7
7
|
import cx from 'classnames';
|
|
8
8
|
import '@itwin/itwinui-css/css/non-ideal-state.css';
|
|
9
9
|
/**
|
|
@@ -13,13 +13,12 @@ import '@itwin/itwinui-css/css/non-ideal-state.css';
|
|
|
13
13
|
* @example
|
|
14
14
|
* <NonIdealState svg={<Svg404 />} heading='Not found' />
|
|
15
15
|
*/
|
|
16
|
-
export const NonIdealState = (props) => {
|
|
16
|
+
export const NonIdealState = React.forwardRef((props, forwardedRef) => {
|
|
17
17
|
const { className, svg, heading, description, actions, ...rest } = props;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
React.createElement(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
return (React.createElement(Box, { className: cx('iui-non-ideal-state', className), ref: forwardedRef, ...rest },
|
|
19
|
+
React.createElement(Box, { className: 'iui-non-ideal-state-illustration' }, svg),
|
|
20
|
+
heading && React.createElement(Box, { className: 'iui-non-ideal-state-title' }, heading),
|
|
21
|
+
description && (React.createElement(Box, { className: 'iui-non-ideal-state-description' }, description)),
|
|
22
|
+
actions && React.createElement(Box, { className: 'iui-non-ideal-state-actions' }, actions)));
|
|
23
|
+
});
|
|
25
24
|
export default NonIdealState;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { ErrorPage } from './ErrorPage.js';
|
|
2
|
-
export type {
|
|
2
|
+
export type { ErrorPageType, ErrorTypeTranslations } from './ErrorPage.js';
|
|
3
3
|
export { NonIdealState } from './NonIdealState.js';
|
|
4
|
-
export type { NonIdealStateProps } from './NonIdealState.js';
|
|
5
4
|
declare const _default: "./NonIdealState";
|
|
6
5
|
export default _default;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
2
3
|
import '@itwin/itwinui-css/css/utils.css';
|
|
3
|
-
|
|
4
|
+
declare type NotificationMarkerProps = {
|
|
4
5
|
/**
|
|
5
6
|
* Content of the NotificationMarker.
|
|
6
7
|
*/
|
|
@@ -34,7 +35,7 @@ export declare type NotificationMarkerProps = {
|
|
|
34
35
|
* </NotificationMarker>
|
|
35
36
|
*/
|
|
36
37
|
enabled?: boolean;
|
|
37
|
-
}
|
|
38
|
+
};
|
|
38
39
|
/**
|
|
39
40
|
* A small notification circle to the top-right of the passed children prop.
|
|
40
41
|
* This can be applied to almost anything but mostly intended for icons within buttons with `styleType = default / borderless`.
|
|
@@ -47,5 +48,5 @@ export declare type NotificationMarkerProps = {
|
|
|
47
48
|
* @example
|
|
48
49
|
* <NotificationMarker status='positive' pulsing={true}>Live</NotificationMarker>
|
|
49
50
|
*/
|
|
50
|
-
export declare const NotificationMarker:
|
|
51
|
+
export declare const NotificationMarker: PolymorphicForwardRefComponent<"span", NotificationMarkerProps>;
|
|
51
52
|
export default NotificationMarker;
|
|
@@ -3,7 +3,7 @@
|
|
|
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 {
|
|
6
|
+
import { Box } from '../utils/index.js';
|
|
7
7
|
import cx from 'classnames';
|
|
8
8
|
import '@itwin/itwinui-css/css/utils.css';
|
|
9
9
|
/**
|
|
@@ -20,7 +20,6 @@ import '@itwin/itwinui-css/css/utils.css';
|
|
|
20
20
|
*/
|
|
21
21
|
export const NotificationMarker = React.forwardRef((props, ref) => {
|
|
22
22
|
const { className, children, status = 'primary', pulsing = false, enabled = true, ...rest } = props;
|
|
23
|
-
|
|
24
|
-
return (React.createElement("span", { ref: ref, className: cx({ 'iui-notification-marker': enabled }, className), "data-iui-variant": enabled ? status : null, "data-iui-urgent": enabled ? pulsing : null, ...rest }, children));
|
|
23
|
+
return (React.createElement(Box, { as: 'span', ref: ref, className: cx({ 'iui-notification-marker': enabled }, className), "data-iui-variant": enabled ? status : null, "data-iui-urgent": enabled ? pulsing : null, ...rest }, children));
|
|
25
24
|
});
|
|
26
25
|
export default NotificationMarker;
|