@itwin/itwinui-react 2.11.5 → 3.0.0-dev.1
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 +35 -0
- package/README.md +30 -24
- package/cjs/core/Alert/Alert.d.ts +4 -5
- package/cjs/core/Alert/Alert.js +8 -11
- package/cjs/core/Alert/index.d.ts +0 -1
- package/cjs/core/Avatar/Avatar.d.ts +6 -15
- package/cjs/core/Avatar/Avatar.js +6 -9
- package/cjs/core/Avatar/index.d.ts +0 -1
- package/cjs/core/AvatarGroup/AvatarGroup.d.ts +5 -10
- package/cjs/core/AvatarGroup/AvatarGroup.js +14 -18
- package/cjs/core/AvatarGroup/index.d.ts +0 -1
- package/cjs/core/Backdrop/Backdrop.d.ts +3 -4
- package/cjs/core/Backdrop/Backdrop.js +1 -3
- package/cjs/core/Backdrop/index.d.ts +0 -1
- package/cjs/core/Badge/Badge.d.ts +4 -7
- package/cjs/core/Badge/Badge.js +3 -6
- package/cjs/core/Badge/index.d.ts +0 -1
- package/cjs/core/Breadcrumbs/Breadcrumbs.d.ts +4 -78
- package/cjs/core/Breadcrumbs/Breadcrumbs.js +5 -7
- package/cjs/core/Breadcrumbs/index.d.ts +0 -1
- package/cjs/core/ButtonGroup/ButtonGroup.d.ts +4 -4
- package/cjs/core/ButtonGroup/ButtonGroup.js +15 -14
- package/cjs/core/ButtonGroup/index.d.ts +0 -1
- package/cjs/core/Buttons/Button/Button.d.ts +4 -11
- package/cjs/core/Buttons/Button/Button.js +4 -6
- package/cjs/core/Buttons/Button/index.d.ts +0 -1
- package/cjs/core/Buttons/DropdownButton/DropdownButton.d.ts +5 -22
- package/cjs/core/Buttons/DropdownButton/DropdownButton.js +0 -2
- package/cjs/core/Buttons/DropdownButton/index.d.ts +0 -1
- package/cjs/core/Buttons/IconButton/IconButton.d.ts +2 -5
- package/cjs/core/Buttons/IconButton/IconButton.js +4 -7
- 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 -4
- package/cjs/core/Buttons/SplitButton/SplitButton.js +1 -3
- 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 -27
- package/cjs/core/Carousel/Carousel.js +22 -23
- 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 -10
- package/cjs/core/Carousel/CarouselDotsList.js +1 -3
- 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 -32
- package/cjs/core/Checkbox/Checkbox.js +3 -5
- package/cjs/core/Checkbox/index.d.ts +0 -1
- package/cjs/core/ColorPicker/ColorBuilder.d.ts +2 -5
- package/cjs/core/ColorPicker/ColorBuilder.js +3 -5
- package/cjs/core/ColorPicker/ColorInputPanel.d.ts +4 -19
- package/cjs/core/ColorPicker/ColorInputPanel.js +4 -6
- package/cjs/core/ColorPicker/ColorPalette.d.ts +3 -17
- package/cjs/core/ColorPicker/ColorPalette.js +3 -5
- package/cjs/core/ColorPicker/ColorPicker.d.ts +4 -5
- package/cjs/core/ColorPicker/ColorPicker.js +3 -6
- package/cjs/core/ColorPicker/ColorSwatch.d.ts +4 -6
- package/cjs/core/ColorPicker/ColorSwatch.js +1 -3
- package/cjs/core/ColorPicker/index.d.ts +0 -5
- package/cjs/core/ComboBox/ComboBox.d.ts +4 -5
- package/cjs/core/ComboBox/ComboBox.js +5 -8
- 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 -5
- package/cjs/core/DatePicker/DatePicker.js +9 -12
- package/cjs/core/DatePicker/index.d.ts +0 -1
- package/cjs/core/Dialog/Dialog.d.ts +13 -10
- package/cjs/core/Dialog/Dialog.js +22 -23
- 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 -9
- package/cjs/core/Dialog/DialogButtonBar.js +1 -34
- package/cjs/core/Dialog/DialogContent.d.ts +1 -9
- package/cjs/core/Dialog/DialogContent.js +1 -34
- package/cjs/core/Dialog/DialogContext.d.ts +4 -0
- package/cjs/core/Dialog/DialogMain.d.ts +3 -3
- package/cjs/core/Dialog/DialogMain.js +3 -5
- package/cjs/core/Dialog/DialogTitleBar.d.ts +5 -5
- package/cjs/core/Dialog/DialogTitleBar.js +1 -3
- package/cjs/core/Dialog/DialogTitleBarTitle.d.ts +1 -9
- package/cjs/core/Dialog/DialogTitleBarTitle.js +1 -34
- package/cjs/core/Dialog/index.d.ts +0 -5
- package/cjs/core/DropdownMenu/DropdownMenu.js +0 -1
- package/cjs/core/ExpandableBlock/ExpandableBlock.d.ts +9 -5
- package/cjs/core/ExpandableBlock/ExpandableBlock.js +14 -14
- package/cjs/core/ExpandableBlock/index.d.ts +0 -1
- package/cjs/core/Fieldset/Fieldset.d.ts +4 -4
- package/cjs/core/Fieldset/Fieldset.js +3 -6
- 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 -26
- package/cjs/core/FileUpload/FileUpload.js +3 -5
- package/cjs/core/FileUpload/FileUploadCard.d.ts +11 -52
- package/cjs/core/FileUpload/FileUploadCard.js +43 -36
- package/cjs/core/FileUpload/FileUploadTemplate.d.ts +4 -4
- package/cjs/core/FileUpload/FileUploadTemplate.js +5 -8
- package/cjs/core/FileUpload/index.d.ts +0 -4
- package/cjs/core/Footer/Footer.d.ts +6 -11
- package/cjs/core/Footer/Footer.js +1 -3
- package/cjs/core/Footer/FooterItem.d.ts +1 -4
- package/cjs/core/Footer/FooterItem.js +1 -35
- package/cjs/core/Footer/FooterList.d.ts +1 -4
- package/cjs/core/Footer/FooterList.js +1 -35
- package/cjs/core/Footer/FooterSeparator.d.ts +1 -4
- package/cjs/core/Footer/FooterSeparator.js +3 -35
- package/cjs/core/Footer/index.d.ts +1 -1
- package/cjs/core/Header/Header.d.ts +5 -6
- package/cjs/core/Header/Header.js +7 -10
- 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 -3
- package/cjs/core/Header/HeaderBreadcrumbs.js +10 -9
- package/cjs/core/Header/HeaderButton.d.ts +5 -7
- package/cjs/core/Header/HeaderButton.js +8 -25
- 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 -3
- package/cjs/core/Header/HeaderLogo.js +5 -13
- 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 -25
- package/cjs/core/InformationPanel/InformationPanel.js +3 -5
- package/cjs/core/InformationPanel/InformationPanelBody.d.ts +1 -10
- package/cjs/core/InformationPanel/InformationPanelBody.js +1 -35
- package/cjs/core/InformationPanel/InformationPanelContent.d.ts +4 -5
- package/cjs/core/InformationPanel/InformationPanelContent.js +3 -6
- package/cjs/core/InformationPanel/InformationPanelHeader.d.ts +4 -5
- package/cjs/core/InformationPanel/InformationPanelHeader.js +5 -8
- package/cjs/core/InformationPanel/InformationPanelWrapper.d.ts +1 -7
- package/cjs/core/InformationPanel/InformationPanelWrapper.js +1 -35
- package/cjs/core/InformationPanel/index.d.ts +0 -5
- package/cjs/core/Input/Input.d.ts +3 -14
- package/cjs/core/Input/Input.js +1 -3
- package/cjs/core/Input/index.d.ts +0 -1
- package/cjs/core/InputGroup/InputGroup.d.ts +4 -5
- package/cjs/core/InputGroup/InputGroup.js +5 -8
- package/cjs/core/InputGroup/index.d.ts +0 -1
- package/cjs/core/Label/Label.d.ts +3 -10
- package/cjs/core/Label/Label.js +5 -8
- package/cjs/core/Label/index.d.ts +0 -1
- package/cjs/core/LabeledInput/LabeledInput.d.ts +2 -47
- package/cjs/core/LabeledInput/LabeledInput.js +0 -2
- package/cjs/core/LabeledInput/index.d.ts +0 -1
- package/cjs/core/LabeledSelect/LabeledSelect.d.ts +1 -2
- package/cjs/core/LabeledSelect/LabeledSelect.js +0 -2
- package/cjs/core/LabeledSelect/index.d.ts +0 -1
- package/cjs/core/LabeledTextarea/LabeledTextarea.d.ts +4 -27
- package/cjs/core/LabeledTextarea/LabeledTextarea.js +0 -2
- package/cjs/core/LabeledTextarea/index.d.ts +0 -1
- package/cjs/core/List/List.d.ts +1 -6
- package/cjs/core/List/List.js +2 -34
- package/cjs/core/List/ListItem.d.ts +6 -14
- package/cjs/core/List/ListItem.js +9 -16
- package/cjs/core/List/index.d.ts +0 -2
- package/cjs/core/Menu/Menu.d.ts +4 -28
- package/cjs/core/Menu/Menu.js +2 -4
- package/cjs/core/Menu/MenuDivider.d.ts +1 -5
- package/cjs/core/Menu/MenuDivider.js +3 -35
- package/cjs/core/Menu/MenuExtraContent.d.ts +1 -7
- package/cjs/core/Menu/MenuExtraContent.js +3 -35
- package/cjs/core/Menu/MenuItem.d.ts +14 -61
- package/cjs/core/Menu/MenuItem.js +12 -24
- package/cjs/core/Menu/MenuItemSkeleton.d.ts +4 -6
- package/cjs/core/Menu/MenuItemSkeleton.js +8 -11
- package/cjs/core/Menu/index.d.ts +0 -5
- package/cjs/core/Modal/Modal.d.ts +5 -6
- package/cjs/core/Modal/Modal.js +3 -6
- 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 -4
- package/cjs/core/NonIdealState/NonIdealState.js +7 -10
- package/cjs/core/NonIdealState/index.d.ts +1 -2
- package/cjs/core/NotificationMarker/NotificationMarker.d.ts +4 -4
- package/cjs/core/NotificationMarker/NotificationMarker.js +1 -3
- package/cjs/core/NotificationMarker/index.d.ts +0 -1
- package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.d.ts +4 -5
- package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +8 -11
- package/cjs/core/ProgressIndicators/ProgressLinear/index.d.ts +0 -1
- package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.d.ts +4 -5
- package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +10 -13
- 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 -18
- package/cjs/core/Radio/Radio.js +3 -5
- package/cjs/core/Radio/index.d.ts +0 -1
- package/cjs/core/RadioTiles/RadioTile.d.ts +4 -22
- package/cjs/core/RadioTiles/RadioTile.js +6 -11
- package/cjs/core/RadioTiles/RadioTileGroup.d.ts +5 -5
- package/cjs/core/RadioTiles/RadioTileGroup.js +4 -7
- package/cjs/core/RadioTiles/index.d.ts +0 -2
- package/cjs/core/SearchBox/SearchBox.d.ts +4 -17
- package/cjs/core/SearchBox/SearchBox.js +1 -3
- package/cjs/core/SearchBox/index.d.ts +0 -1
- package/cjs/core/Select/Select.d.ts +6 -2
- package/cjs/core/Select/Select.js +12 -13
- package/cjs/core/Select/SelectTag.d.ts +4 -6
- package/cjs/core/Select/SelectTag.js +4 -7
- 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 -5
- package/cjs/core/SideNavigation/SideNavigation.js +7 -10
- package/cjs/core/SideNavigation/SidenavButton.d.ts +3 -5
- package/cjs/core/SideNavigation/SidenavButton.js +2 -7
- package/cjs/core/SideNavigation/SidenavSubmenu.d.ts +2 -15
- package/cjs/core/SideNavigation/SidenavSubmenu.js +2 -4
- package/cjs/core/SideNavigation/SidenavSubmenuHeader.d.ts +4 -9
- package/cjs/core/SideNavigation/SidenavSubmenuHeader.js +5 -8
- package/cjs/core/SideNavigation/index.d.ts +0 -4
- package/cjs/core/SkipToContentLink/SkipToContentLink.d.ts +4 -14
- package/cjs/core/SkipToContentLink/SkipToContentLink.js +1 -3
- package/cjs/core/SkipToContentLink/index.d.ts +0 -1
- package/cjs/core/Slider/Slider.d.ts +4 -100
- package/cjs/core/Slider/Slider.js +6 -8
- package/cjs/core/Slider/Thumb.d.ts +3 -2
- package/cjs/core/Slider/Thumb.js +2 -1
- package/cjs/core/Slider/Track.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 -3
- package/cjs/core/Stepper/Stepper.js +3 -5
- 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 -4
- package/cjs/core/Stepper/WorkflowDiagram.js +5 -5
- 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 -18
- package/cjs/core/Surface/Surface.js +7 -7
- package/cjs/core/Surface/index.d.ts +0 -1
- package/cjs/core/Table/Table.d.ts +0 -1
- package/cjs/core/Table/Table.js +19 -20
- package/cjs/core/Table/TableCell.js +3 -2
- package/cjs/core/Table/TablePaginator.d.ts +0 -1
- package/cjs/core/Table/TablePaginator.js +9 -10
- package/cjs/core/Table/TableRowMemoized.js +2 -2
- package/cjs/core/Table/cells/DefaultCell.js +4 -3
- package/cjs/core/Table/cells/EditableCell.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.d.ts +0 -1
- package/cjs/core/Table/filters/BaseFilter.js +2 -3
- package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.d.ts +3 -3
- package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.d.ts +0 -1
- package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +1 -2
- package/cjs/core/Table/filters/FilterButtonBar.d.ts +0 -1
- package/cjs/core/Table/filters/FilterButtonBar.js +2 -3
- package/cjs/core/Table/filters/FilterToggle.d.ts +2 -3
- package/cjs/core/Table/filters/FilterToggle.js +1 -2
- package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.d.ts +0 -1
- package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +1 -2
- package/cjs/core/Table/filters/TextFilter/TextFilter.d.ts +0 -1
- package/cjs/core/Table/filters/TextFilter/TextFilter.js +1 -2
- package/cjs/core/Table/hooks/useColumnDragAndDrop.js +8 -4
- package/cjs/core/Tabs/Tab.d.ts +10 -4
- package/cjs/core/Tabs/Tab.js +7 -14
- package/cjs/core/Tabs/Tabs.d.ts +2 -3
- package/cjs/core/Tabs/Tabs.js +10 -13
- package/cjs/core/Tabs/index.d.ts +0 -2
- package/cjs/core/Tag/Tag.d.ts +4 -5
- package/cjs/core/Tag/Tag.js +5 -8
- package/cjs/core/Tag/TagContainer.d.ts +4 -5
- package/cjs/core/Tag/TagContainer.js +4 -7
- package/cjs/core/Tag/index.d.ts +0 -2
- package/cjs/core/Textarea/Textarea.d.ts +3 -10
- package/cjs/core/Textarea/Textarea.js +1 -3
- 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 -14
- package/cjs/core/ThemeProvider/ThemeProvider.js +6 -18
- package/cjs/core/ThemeProvider/index.d.ts +1 -1
- package/cjs/core/Tile/Tile.d.ts +6 -8
- package/cjs/core/Tile/Tile.js +18 -23
- package/cjs/core/Tile/index.d.ts +0 -1
- package/cjs/core/TimePicker/TimePicker.d.ts +3 -4
- package/cjs/core/TimePicker/TimePicker.js +5 -8
- package/cjs/core/TimePicker/index.d.ts +1 -1
- package/cjs/core/Toast/Toast.d.ts +0 -1
- package/cjs/core/Toast/Toast.js +5 -6
- package/cjs/core/Toast/ToastWrapper.d.ts +0 -1
- package/cjs/core/Toast/ToastWrapper.js +2 -2
- package/cjs/core/ToggleSwitch/ToggleSwitch.d.ts +4 -4
- package/cjs/core/ToggleSwitch/ToggleSwitch.js +4 -12
- package/cjs/core/ToggleSwitch/index.d.ts +0 -1
- package/cjs/core/Tooltip/Tooltip.d.ts +0 -1
- package/cjs/core/Tooltip/Tooltip.js +1 -3
- package/cjs/core/Tooltip/index.d.ts +0 -1
- package/cjs/core/TransferList/TransferList.d.ts +69 -0
- package/cjs/core/TransferList/TransferList.js +148 -0
- package/cjs/core/TransferList/index.d.ts +3 -0
- package/cjs/core/{Typography/Headline → TransferList}/index.js +4 -4
- package/cjs/core/Tree/Tree.d.ts +1 -2
- package/cjs/core/Tree/Tree.js +4 -5
- package/cjs/core/Tree/TreeNode.d.ts +1 -2
- package/cjs/core/Tree/TreeNode.js +10 -16
- package/cjs/core/Tree/TreeNodeExpander.d.ts +4 -5
- package/cjs/core/Tree/TreeNodeExpander.js +3 -5
- package/cjs/core/Tree/index.d.ts +1 -3
- package/cjs/core/Typography/Anchor/Anchor.d.ts +1 -6
- package/cjs/core/Typography/Anchor/Anchor.js +1 -34
- package/cjs/core/Typography/Anchor/index.d.ts +0 -1
- package/cjs/core/Typography/Blockquote/Blockquote.d.ts +4 -9
- package/cjs/core/Typography/Blockquote/Blockquote.js +1 -3
- package/cjs/core/Typography/Blockquote/index.d.ts +0 -1
- package/cjs/core/Typography/Code/Code.d.ts +1 -10
- package/cjs/core/Typography/Code/Code.js +1 -35
- package/cjs/core/Typography/Code/index.d.ts +0 -1
- package/cjs/core/Typography/Kbd/Kbd.d.ts +4 -6
- package/cjs/core/Typography/Kbd/Kbd.js +3 -6
- package/cjs/core/Typography/Kbd/index.d.ts +0 -1
- package/cjs/core/Typography/Text/Text.d.ts +3 -7
- package/cjs/core/Typography/Text/Text.js +2 -4
- 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 +11 -57
- package/cjs/core/index.js +118 -123
- 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 -5
- package/cjs/core/utils/components/Divider.js +2 -4
- package/cjs/core/utils/components/Flex.d.ts +1 -5
- package/cjs/core/utils/components/Flex.js +10 -7
- package/cjs/core/utils/components/Icon.d.ts +2 -25
- package/cjs/core/utils/components/Icon.js +2 -2
- package/cjs/core/utils/components/InputContainer.d.ts +0 -1
- package/cjs/core/utils/components/InputContainer.js +6 -11
- package/cjs/core/utils/components/InputFlexContainer.d.ts +3 -6
- package/cjs/core/utils/components/InputFlexContainer.js +3 -3
- package/cjs/core/utils/components/LinkAction.d.ts +2 -9
- package/cjs/core/utils/components/LinkAction.js +3 -37
- package/cjs/core/utils/components/Popover.d.ts +1 -2
- package/cjs/core/utils/components/Popover.js +2 -3
- package/cjs/core/utils/components/VisuallyHidden.d.ts +1 -3
- package/cjs/core/utils/components/VisuallyHidden.js +3 -5
- package/cjs/core/utils/components/index.d.ts +1 -0
- package/cjs/core/utils/components/index.js +1 -0
- package/cjs/core/utils/functions/dom.d.ts +6 -0
- package/cjs/core/utils/functions/dom.js +20 -2
- package/cjs/core/utils/functions/index.d.ts +1 -1
- package/cjs/core/utils/functions/index.js +1 -1
- package/cjs/core/utils/functions/polymorphic.d.ts +198 -0
- package/cjs/core/utils/functions/polymorphic.js +89 -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 +8 -0
- package/cjs/core/utils/hooks/useGlobals.js +77 -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/{esm/core/Typography/Body/index.js → cjs/styles.d.ts} +1 -2
- package/cjs/styles.js +453 -0
- package/cjs/types/react-table-config.d.ts +1 -1
- package/esm/core/Alert/Alert.d.ts +4 -5
- package/esm/core/Alert/Alert.js +9 -11
- package/esm/core/Alert/index.d.ts +0 -1
- package/esm/core/Avatar/Avatar.d.ts +6 -15
- package/esm/core/Avatar/Avatar.js +7 -9
- package/esm/core/Avatar/index.d.ts +0 -1
- package/esm/core/AvatarGroup/AvatarGroup.d.ts +5 -10
- package/esm/core/AvatarGroup/AvatarGroup.js +15 -18
- package/esm/core/AvatarGroup/index.d.ts +0 -1
- package/esm/core/Backdrop/Backdrop.d.ts +3 -4
- package/esm/core/Backdrop/Backdrop.js +2 -4
- package/esm/core/Backdrop/index.d.ts +0 -1
- package/esm/core/Badge/Badge.d.ts +4 -7
- package/esm/core/Badge/Badge.js +4 -6
- package/esm/core/Badge/index.d.ts +0 -1
- package/esm/core/Breadcrumbs/Breadcrumbs.d.ts +4 -78
- package/esm/core/Breadcrumbs/Breadcrumbs.js +6 -8
- package/esm/core/Breadcrumbs/index.d.ts +0 -1
- package/esm/core/ButtonGroup/ButtonGroup.d.ts +4 -4
- package/esm/core/ButtonGroup/ButtonGroup.js +16 -15
- package/esm/core/ButtonGroup/index.d.ts +0 -1
- package/esm/core/Buttons/Button/Button.d.ts +4 -11
- package/esm/core/Buttons/Button/Button.js +5 -7
- package/esm/core/Buttons/Button/index.d.ts +0 -1
- package/esm/core/Buttons/DropdownButton/DropdownButton.d.ts +5 -22
- package/esm/core/Buttons/DropdownButton/DropdownButton.js +1 -3
- package/esm/core/Buttons/DropdownButton/index.d.ts +0 -1
- package/esm/core/Buttons/IconButton/IconButton.d.ts +2 -5
- package/esm/core/Buttons/IconButton/IconButton.js +5 -8
- 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 -4
- package/esm/core/Buttons/SplitButton/SplitButton.js +2 -4
- 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 -27
- package/esm/core/Carousel/Carousel.js +23 -24
- 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 -10
- package/esm/core/Carousel/CarouselDotsList.js +2 -4
- 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 -32
- package/esm/core/Checkbox/Checkbox.js +4 -6
- package/esm/core/Checkbox/index.d.ts +0 -1
- package/esm/core/ColorPicker/ColorBuilder.d.ts +2 -5
- package/esm/core/ColorPicker/ColorBuilder.js +4 -6
- package/esm/core/ColorPicker/ColorInputPanel.d.ts +4 -19
- package/esm/core/ColorPicker/ColorInputPanel.js +5 -7
- package/esm/core/ColorPicker/ColorPalette.d.ts +3 -17
- package/esm/core/ColorPicker/ColorPalette.js +4 -6
- package/esm/core/ColorPicker/ColorPicker.d.ts +4 -5
- package/esm/core/ColorPicker/ColorPicker.js +4 -6
- package/esm/core/ColorPicker/ColorSwatch.d.ts +4 -6
- package/esm/core/ColorPicker/ColorSwatch.js +2 -4
- package/esm/core/ColorPicker/index.d.ts +0 -5
- package/esm/core/ComboBox/ComboBox.d.ts +4 -5
- package/esm/core/ComboBox/ComboBox.js +6 -9
- 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 -5
- package/esm/core/DatePicker/DatePicker.js +10 -12
- package/esm/core/DatePicker/index.d.ts +0 -1
- package/esm/core/Dialog/Dialog.d.ts +13 -10
- package/esm/core/Dialog/Dialog.js +23 -24
- 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 -9
- package/esm/core/Dialog/DialogButtonBar.js +2 -9
- package/esm/core/Dialog/DialogContent.d.ts +1 -9
- package/esm/core/Dialog/DialogContent.js +2 -9
- package/esm/core/Dialog/DialogContext.d.ts +4 -0
- package/esm/core/Dialog/DialogMain.d.ts +3 -3
- package/esm/core/Dialog/DialogMain.js +4 -6
- package/esm/core/Dialog/DialogTitleBar.d.ts +5 -5
- package/esm/core/Dialog/DialogTitleBar.js +2 -4
- package/esm/core/Dialog/DialogTitleBarTitle.d.ts +1 -9
- package/esm/core/Dialog/DialogTitleBarTitle.js +2 -9
- package/esm/core/Dialog/index.d.ts +0 -5
- package/esm/core/DropdownMenu/DropdownMenu.js +1 -2
- package/esm/core/ExpandableBlock/ExpandableBlock.d.ts +9 -5
- package/esm/core/ExpandableBlock/ExpandableBlock.js +15 -14
- package/esm/core/ExpandableBlock/index.d.ts +0 -1
- package/esm/core/Fieldset/Fieldset.d.ts +4 -4
- package/esm/core/Fieldset/Fieldset.js +4 -6
- 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 -26
- package/esm/core/FileUpload/FileUpload.js +4 -6
- package/esm/core/FileUpload/FileUploadCard.d.ts +11 -52
- package/esm/core/FileUpload/FileUploadCard.js +44 -37
- package/esm/core/FileUpload/FileUploadTemplate.d.ts +4 -4
- package/esm/core/FileUpload/FileUploadTemplate.js +6 -8
- package/esm/core/FileUpload/index.d.ts +0 -4
- package/esm/core/Footer/Footer.d.ts +6 -11
- package/esm/core/Footer/Footer.js +2 -4
- package/esm/core/Footer/FooterItem.d.ts +1 -4
- package/esm/core/Footer/FooterItem.js +2 -9
- package/esm/core/Footer/FooterList.d.ts +1 -4
- package/esm/core/Footer/FooterList.js +2 -9
- package/esm/core/Footer/FooterSeparator.d.ts +1 -4
- package/esm/core/Footer/FooterSeparator.js +4 -9
- package/esm/core/Footer/index.d.ts +1 -1
- package/esm/core/Header/Header.d.ts +5 -6
- package/esm/core/Header/Header.js +8 -10
- 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 -3
- package/esm/core/Header/HeaderBreadcrumbs.js +8 -9
- package/esm/core/Header/HeaderButton.d.ts +5 -7
- package/esm/core/Header/HeaderButton.js +9 -23
- 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 -3
- package/esm/core/Header/HeaderLogo.js +6 -14
- 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 -25
- package/esm/core/InformationPanel/InformationPanel.js +4 -6
- package/esm/core/InformationPanel/InformationPanelBody.d.ts +1 -10
- package/esm/core/InformationPanel/InformationPanelBody.js +2 -9
- package/esm/core/InformationPanel/InformationPanelContent.d.ts +4 -5
- package/esm/core/InformationPanel/InformationPanelContent.js +4 -6
- package/esm/core/InformationPanel/InformationPanelHeader.d.ts +4 -5
- package/esm/core/InformationPanel/InformationPanelHeader.js +6 -8
- package/esm/core/InformationPanel/InformationPanelWrapper.d.ts +1 -7
- package/esm/core/InformationPanel/InformationPanelWrapper.js +2 -9
- package/esm/core/InformationPanel/index.d.ts +0 -5
- package/esm/core/Input/Input.d.ts +3 -14
- package/esm/core/Input/Input.js +2 -4
- package/esm/core/Input/index.d.ts +0 -1
- package/esm/core/InputGroup/InputGroup.d.ts +4 -5
- package/esm/core/InputGroup/InputGroup.js +6 -8
- package/esm/core/InputGroup/index.d.ts +0 -1
- package/esm/core/Label/Label.d.ts +3 -10
- package/esm/core/Label/Label.js +6 -8
- package/esm/core/Label/index.d.ts +0 -1
- package/esm/core/LabeledInput/LabeledInput.d.ts +2 -47
- package/esm/core/LabeledInput/LabeledInput.js +1 -3
- package/esm/core/LabeledInput/index.d.ts +0 -1
- package/esm/core/LabeledSelect/LabeledSelect.d.ts +1 -2
- package/esm/core/LabeledSelect/LabeledSelect.js +1 -3
- package/esm/core/LabeledSelect/index.d.ts +0 -1
- package/esm/core/LabeledTextarea/LabeledTextarea.d.ts +4 -27
- package/esm/core/LabeledTextarea/LabeledTextarea.js +1 -3
- package/esm/core/LabeledTextarea/index.d.ts +0 -1
- package/esm/core/List/List.d.ts +1 -6
- package/esm/core/List/List.js +3 -9
- package/esm/core/List/ListItem.d.ts +6 -14
- package/esm/core/List/ListItem.js +10 -17
- package/esm/core/List/index.d.ts +0 -2
- package/esm/core/Menu/Menu.d.ts +4 -28
- package/esm/core/Menu/Menu.js +3 -5
- package/esm/core/Menu/MenuDivider.d.ts +1 -5
- package/esm/core/Menu/MenuDivider.js +4 -9
- package/esm/core/Menu/MenuExtraContent.d.ts +1 -7
- package/esm/core/Menu/MenuExtraContent.js +4 -9
- package/esm/core/Menu/MenuItem.d.ts +14 -61
- package/esm/core/Menu/MenuItem.js +13 -22
- package/esm/core/Menu/MenuItemSkeleton.d.ts +4 -6
- package/esm/core/Menu/MenuItemSkeleton.js +9 -11
- package/esm/core/Menu/index.d.ts +0 -5
- package/esm/core/Modal/Modal.d.ts +5 -6
- package/esm/core/Modal/Modal.js +4 -6
- 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 -4
- package/esm/core/NonIdealState/NonIdealState.js +8 -10
- package/esm/core/NonIdealState/index.d.ts +1 -2
- package/esm/core/NotificationMarker/NotificationMarker.d.ts +4 -4
- package/esm/core/NotificationMarker/NotificationMarker.js +2 -4
- package/esm/core/NotificationMarker/index.d.ts +0 -1
- package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.d.ts +4 -5
- package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +9 -11
- package/esm/core/ProgressIndicators/ProgressLinear/index.d.ts +0 -1
- package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.d.ts +4 -5
- package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +11 -13
- 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 -18
- package/esm/core/Radio/Radio.js +4 -6
- package/esm/core/Radio/index.d.ts +0 -1
- package/esm/core/RadioTiles/RadioTile.d.ts +4 -22
- package/esm/core/RadioTiles/RadioTile.js +7 -12
- package/esm/core/RadioTiles/RadioTileGroup.d.ts +5 -5
- package/esm/core/RadioTiles/RadioTileGroup.js +5 -7
- package/esm/core/RadioTiles/index.d.ts +0 -2
- package/esm/core/SearchBox/SearchBox.d.ts +4 -17
- package/esm/core/SearchBox/SearchBox.js +2 -4
- package/esm/core/SearchBox/index.d.ts +0 -1
- package/esm/core/Select/Select.d.ts +6 -2
- package/esm/core/Select/Select.js +13 -14
- package/esm/core/Select/SelectTag.d.ts +4 -6
- package/esm/core/Select/SelectTag.js +5 -7
- 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 -5
- package/esm/core/SideNavigation/SideNavigation.js +8 -10
- package/esm/core/SideNavigation/SidenavButton.d.ts +3 -5
- package/esm/core/SideNavigation/SidenavButton.js +1 -6
- package/esm/core/SideNavigation/SidenavSubmenu.d.ts +2 -15
- package/esm/core/SideNavigation/SidenavSubmenu.js +3 -5
- package/esm/core/SideNavigation/SidenavSubmenuHeader.d.ts +4 -9
- package/esm/core/SideNavigation/SidenavSubmenuHeader.js +6 -8
- package/esm/core/SideNavigation/index.d.ts +0 -4
- package/esm/core/SkipToContentLink/SkipToContentLink.d.ts +4 -14
- package/esm/core/SkipToContentLink/SkipToContentLink.js +2 -4
- package/esm/core/SkipToContentLink/index.d.ts +0 -1
- package/esm/core/Slider/Slider.d.ts +4 -100
- package/esm/core/Slider/Slider.js +7 -9
- package/esm/core/Slider/Thumb.d.ts +3 -2
- package/esm/core/Slider/Thumb.js +2 -1
- package/esm/core/Slider/Track.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 -3
- package/esm/core/Stepper/Stepper.js +4 -6
- 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 -4
- package/esm/core/Stepper/WorkflowDiagram.js +6 -6
- 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 -18
- package/esm/core/Surface/Surface.js +8 -8
- package/esm/core/Surface/index.d.ts +0 -1
- package/esm/core/Table/Table.d.ts +0 -1
- package/esm/core/Table/Table.js +20 -21
- package/esm/core/Table/TableCell.js +3 -2
- package/esm/core/Table/TablePaginator.d.ts +0 -1
- package/esm/core/Table/TablePaginator.js +10 -11
- package/esm/core/Table/TableRowMemoized.js +3 -3
- package/esm/core/Table/cells/DefaultCell.js +4 -3
- package/esm/core/Table/cells/EditableCell.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.d.ts +0 -1
- package/esm/core/Table/filters/BaseFilter.js +3 -4
- package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.d.ts +3 -3
- package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.d.ts +0 -1
- package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.js +2 -3
- package/esm/core/Table/filters/FilterButtonBar.d.ts +0 -1
- package/esm/core/Table/filters/FilterButtonBar.js +3 -4
- package/esm/core/Table/filters/FilterToggle.d.ts +2 -3
- package/esm/core/Table/filters/FilterToggle.js +2 -3
- package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.d.ts +0 -1
- package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +2 -3
- package/esm/core/Table/filters/TextFilter/TextFilter.d.ts +0 -1
- package/esm/core/Table/filters/TextFilter/TextFilter.js +2 -3
- package/esm/core/Table/hooks/useColumnDragAndDrop.js +5 -4
- package/esm/core/Tabs/Tab.d.ts +10 -4
- package/esm/core/Tabs/Tab.js +8 -14
- package/esm/core/Tabs/Tabs.d.ts +2 -3
- package/esm/core/Tabs/Tabs.js +11 -14
- package/esm/core/Tabs/index.d.ts +0 -2
- package/esm/core/Tag/Tag.d.ts +4 -5
- package/esm/core/Tag/Tag.js +6 -8
- package/esm/core/Tag/TagContainer.d.ts +4 -5
- package/esm/core/Tag/TagContainer.js +5 -7
- package/esm/core/Tag/index.d.ts +0 -2
- package/esm/core/Textarea/Textarea.d.ts +3 -10
- package/esm/core/Textarea/Textarea.js +2 -4
- package/esm/core/Textarea/index.d.ts +0 -1
- package/esm/core/ThemeProvider/ThemeContext.d.ts +7 -0
- package/esm/core/{Typography/Leading/index.js → ThemeProvider/ThemeContext.js} +2 -2
- package/esm/core/ThemeProvider/ThemeProvider.d.ts +11 -14
- package/esm/core/ThemeProvider/ThemeProvider.js +4 -16
- package/esm/core/ThemeProvider/index.d.ts +1 -1
- package/esm/core/Tile/Tile.d.ts +6 -8
- package/esm/core/Tile/Tile.js +19 -23
- package/esm/core/Tile/index.d.ts +0 -1
- package/esm/core/TimePicker/TimePicker.d.ts +3 -4
- package/esm/core/TimePicker/TimePicker.js +6 -8
- package/esm/core/TimePicker/index.d.ts +1 -1
- package/esm/core/Toast/Toast.d.ts +0 -1
- package/esm/core/Toast/Toast.js +6 -7
- package/esm/core/Toast/ToastWrapper.d.ts +0 -1
- package/esm/core/Toast/ToastWrapper.js +2 -2
- package/esm/core/ToggleSwitch/ToggleSwitch.d.ts +4 -4
- package/esm/core/ToggleSwitch/ToggleSwitch.js +5 -13
- package/esm/core/ToggleSwitch/index.d.ts +0 -1
- package/esm/core/Tooltip/Tooltip.d.ts +0 -1
- package/esm/core/Tooltip/Tooltip.js +2 -4
- package/esm/core/Tooltip/index.d.ts +0 -1
- package/esm/core/TransferList/TransferList.d.ts +69 -0
- package/esm/core/TransferList/TransferList.js +142 -0
- package/esm/core/TransferList/index.d.ts +3 -0
- package/esm/core/{Typography/Headline → TransferList}/index.js +2 -2
- package/esm/core/Tree/Tree.d.ts +1 -2
- package/esm/core/Tree/Tree.js +5 -6
- package/esm/core/Tree/TreeNode.d.ts +1 -2
- package/esm/core/Tree/TreeNode.js +11 -17
- package/esm/core/Tree/TreeNodeExpander.d.ts +4 -5
- package/esm/core/Tree/TreeNodeExpander.js +3 -4
- package/esm/core/Tree/index.d.ts +1 -3
- package/esm/core/Typography/Anchor/Anchor.d.ts +1 -6
- package/esm/core/Typography/Anchor/Anchor.js +2 -9
- package/esm/core/Typography/Anchor/index.d.ts +0 -1
- package/esm/core/Typography/Blockquote/Blockquote.d.ts +4 -9
- package/esm/core/Typography/Blockquote/Blockquote.js +2 -4
- package/esm/core/Typography/Blockquote/index.d.ts +0 -1
- package/esm/core/Typography/Code/Code.d.ts +1 -10
- package/esm/core/Typography/Code/Code.js +2 -9
- package/esm/core/Typography/Code/index.d.ts +0 -1
- package/esm/core/Typography/Kbd/Kbd.d.ts +4 -6
- package/esm/core/Typography/Kbd/Kbd.js +4 -6
- package/esm/core/Typography/Kbd/index.d.ts +0 -1
- package/esm/core/Typography/Text/Text.d.ts +3 -7
- package/esm/core/Typography/Text/Text.js +3 -5
- 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 +11 -57
- package/esm/core/index.js +3 -2
- package/esm/core/utils/components/Box.d.ts +6 -0
- package/esm/core/utils/components/Box.js +11 -0
- package/esm/core/utils/components/Divider.d.ts +4 -5
- package/esm/core/utils/components/Divider.js +2 -4
- package/esm/core/utils/components/Flex.d.ts +1 -5
- package/esm/core/utils/components/Flex.js +10 -7
- package/esm/core/utils/components/Icon.d.ts +2 -25
- package/esm/core/utils/components/Icon.js +2 -2
- package/esm/core/utils/components/InputContainer.d.ts +0 -1
- package/esm/core/utils/components/InputContainer.js +6 -11
- package/esm/core/utils/components/InputFlexContainer.d.ts +3 -6
- package/esm/core/utils/components/InputFlexContainer.js +3 -3
- package/esm/core/utils/components/LinkAction.d.ts +2 -9
- package/esm/core/utils/components/LinkAction.js +3 -11
- package/esm/core/utils/components/Popover.d.ts +1 -2
- package/esm/core/utils/components/Popover.js +1 -2
- package/esm/core/utils/components/VisuallyHidden.d.ts +1 -3
- package/esm/core/utils/components/VisuallyHidden.js +3 -5
- package/esm/core/utils/components/index.d.ts +1 -0
- package/esm/core/utils/components/index.js +1 -0
- package/esm/core/utils/functions/dom.d.ts +6 -0
- package/esm/core/utils/functions/dom.js +15 -1
- package/esm/core/utils/functions/index.d.ts +1 -1
- package/esm/core/utils/functions/index.js +1 -1
- package/esm/core/utils/functions/polymorphic.d.ts +198 -0
- package/esm/core/utils/functions/polymorphic.js +60 -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 +8 -0
- package/esm/core/utils/hooks/useGlobals.js +49 -0
- package/esm/core/utils/hooks/useIsThemeAlreadySet.js +1 -1
- package/esm/core/utils/icons/Svg.d.ts +1 -0
- package/esm/core/{Typography/Small/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/{core/Typography/Title/index.js → styles.d.ts} +1 -2
- package/esm/styles.js +454 -0
- package/esm/types/react-table-config.d.ts +1 -1
- package/package.json +14 -11
- package/styles.css +1942 -0
- 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/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/functions/styles.d.ts +0 -6
- package/cjs/core/utils/functions/styles.js +0 -21
- 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/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/utils/functions/styles.d.ts +0 -6
- package/esm/core/utils/functions/styles.js +0 -17
- package/esm/core/utils/hooks/useTheme.d.ts +0 -39
- package/esm/core/utils/hooks/useTheme.js +0 -100
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.0.0-dev.1
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#1302](https://github.com/iTwin/iTwinUI/pull/1302): The dependencies on `@itwin/itwinui-css` and `@itwin/itwinui-variable` have been removed. This means `@itwin/itwinui-react` will bring its own stylesheet.
|
|
8
|
+
- [#1322](https://github.com/iTwin/iTwinUI/pull/1322): All css imports within components have been removed. `@itwin/itwinui-react/styles.css` must now be manually imported at the entrypoint.
|
|
9
|
+
- [#1302](https://github.com/iTwin/iTwinUI/pull/1302): All elements have had their class names changed to prevent conflict with older versions. It is strongly recommended to switch these internal classes with your own classes or data attributes.
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#1321](https://github.com/iTwin/iTwinUI/pull/1321): Added `disabled` prop to ExpandableBlock component. When activated, it triggers the "disabled" CSS styling for the ExpandableBlock and disables user interaction with it.
|
|
14
|
+
- [#1073](https://github.com/iTwin/iTwinUI/pull/1073): Added new `TransferList` component which is used to move one or more items between lists. Added the following subcomponents: `TransferList.ListWrapper`, `TransferList.ListboxWrapper`, `TransferList.ListboxLabel`, `TransferList.Listbox`, `TransferList.Item`, and `TransferList.Toolbar`
|
|
15
|
+
- [#1323](https://github.com/iTwin/iTwinUI/pull/1323): Added `placement` prop to `Dialog` to allow placing it at one of the corners.
|
|
16
|
+
|
|
17
|
+
## 3.0.0-dev.0
|
|
18
|
+
|
|
19
|
+
### Major Changes
|
|
20
|
+
|
|
21
|
+
- [#1296](https://github.com/iTwin/iTwinUI/pull/1296): Removed previously-deprecated typography components (`Body`, `Headline`, `Leading`, `Small`, `Subheading`, `Title`) which have been replaced by `Text`.
|
|
22
|
+
- [#1265](https://github.com/iTwin/iTwinUI/pull/1265): Removed the deprecated `useTheme` hook. `<ThemeProvider>` is now always required to be wrapped around all iTwinUI components.
|
|
23
|
+
- [#1278](https://github.com/iTwin/iTwinUI/pull/1278): Adjusted calculations in ButtonGroup's `overflowButton` callback, so that it respects `overflowPlacement` and considers the presence of the overflowButton itself.
|
|
24
|
+
- [#1295](https://github.com/iTwin/iTwinUI/pull/1295): Deprecated MenuItem's `icon` and `badge` props in favor of new `startIcon` and `endIcon` props. Also affects `Select` and `ComboBox` options.
|
|
25
|
+
- [#1298](https://github.com/iTwin/iTwinUI/pull/1298): `Props` types will no longer be exported for any component. Use `React.ComponentProps` instead.
|
|
26
|
+
- [#1304](https://github.com/iTwin/iTwinUI/pull/1304): Instead of cloning passed icons to set classes on them, the classes will now be set on a wrapping element. Affected components: `Header`, `Select`, `MenuItem`, `RadioTile`, `Tabs`, `ToggleSwitch`, `TreeNode`, `InputContainer` (and all input variants).
|
|
27
|
+
- [#1269](https://github.com/iTwin/iTwinUI/pull/1269): All dialog variants have `flex` applied by default. This means the content should be wrapped with `Dialog.Content` or `ModalContent` for optimal layout.
|
|
28
|
+
|
|
29
|
+
### Minor Changes
|
|
30
|
+
|
|
31
|
+
- [#1298](https://github.com/iTwin/iTwinUI/pull/1298): Most components are now polymorphic and forward their rest props and ref.
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- Updated dependencies:
|
|
36
|
+
- @itwin/itwinui-css@2.0.0-dev.0
|
|
37
|
+
|
|
3
38
|
## 2.11.5
|
|
4
39
|
|
|
5
40
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
<picture>
|
|
3
3
|
<source
|
|
4
4
|
media='(prefers-color-scheme: dark)'
|
|
5
|
-
|
|
5
|
+
srcset='https://itwin.github.io/iTwinUI/dev/logo-dark.svg'
|
|
6
6
|
/>
|
|
7
7
|
<img
|
|
8
|
-
src='https://
|
|
8
|
+
src='https://itwin.github.io/iTwinUI/dev/logo.svg'
|
|
9
9
|
alt='iTwinUI logo'
|
|
10
10
|
/>
|
|
11
11
|
</picture>
|
|
@@ -39,43 +39,49 @@ yarn add @itwin/itwinui-react
|
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
|
42
|
-
##
|
|
42
|
+
## Setup
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
Wrap your application entrypoint in `ThemeProvider` and import `styles.css`.
|
|
45
45
|
|
|
46
46
|
```jsx
|
|
47
|
-
import {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
import { ThemeProvider } from '@itwin/itwinui-react';
|
|
48
|
+
import '@itwin/itwinui-react/styles.css';
|
|
49
|
+
|
|
50
|
+
export default function App() {
|
|
51
|
+
return (
|
|
52
|
+
<>
|
|
53
|
+
<ThemeProvider>
|
|
54
|
+
{/* Your components go here. */}
|
|
55
|
+
</ThemeProvider>
|
|
56
|
+
</>
|
|
57
|
+
);
|
|
58
|
+
}
|
|
52
59
|
```
|
|
53
60
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
61
|
+
ThemeProvider has a `theme` prop which accepts one of the following values:
|
|
62
|
+
- `light` (default)
|
|
63
|
+
- `dark`
|
|
64
|
+
- `os` (respects the color scheme of the operating system)
|
|
65
|
+
- `inherit`
|
|
57
66
|
|
|
58
67
|
---
|
|
59
68
|
|
|
60
|
-
##
|
|
69
|
+
## Usage
|
|
61
70
|
|
|
62
|
-
|
|
63
|
-
- `light` (default)
|
|
64
|
-
- `dark`
|
|
65
|
-
- `os` (which respects the color scheme of the operating system)
|
|
71
|
+
After setting up ThemeProvider and styles, import the component you want and start using it!
|
|
66
72
|
|
|
67
73
|
```jsx
|
|
68
|
-
import {
|
|
74
|
+
import { Button } from '@itwin/itwinui-react';
|
|
69
75
|
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
<ThemeProvider theme='dark'>
|
|
73
|
-
{/* Your components go here. */}
|
|
74
|
-
</ThemeProvider>
|
|
75
|
-
</>
|
|
76
|
+
const Page = () => (
|
|
77
|
+
<Button>Hello!</Button>
|
|
76
78
|
);
|
|
77
79
|
```
|
|
78
80
|
|
|
81
|
+
Check out this template for a live interactive demo:
|
|
82
|
+
|
|
83
|
+
[](https://codesandbox.io/s/github/iTwin/iTwinUI/tree/main/cra-sandbox?file=/src/App.tsx)
|
|
84
|
+
|
|
79
85
|
---
|
|
80
86
|
|
|
81
87
|
## FAQ
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import '
|
|
3
|
-
|
|
4
|
-
export declare type AlertProps = {
|
|
2
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
|
+
declare type AlertProps = {
|
|
5
4
|
/**
|
|
6
5
|
* Type of the alert.
|
|
7
6
|
* @default 'informational'
|
|
@@ -28,7 +27,7 @@ export declare type AlertProps = {
|
|
|
28
27
|
* Alert message text.
|
|
29
28
|
*/
|
|
30
29
|
children: React.ReactNode;
|
|
31
|
-
}
|
|
30
|
+
};
|
|
32
31
|
/**
|
|
33
32
|
* A small box to quickly grab user attention and communicate a brief message
|
|
34
33
|
* @example
|
|
@@ -44,5 +43,5 @@ export declare type AlertProps = {
|
|
|
44
43
|
* This is a positive alert with a clickable text
|
|
45
44
|
* </Alert>
|
|
46
45
|
*/
|
|
47
|
-
export declare const Alert:
|
|
46
|
+
export declare const Alert: PolymorphicForwardRefComponent<"div", AlertProps>;
|
|
48
47
|
export default Alert;
|
package/cjs/core/Alert/Alert.js
CHANGED
|
@@ -33,7 +33,6 @@ exports.Alert = void 0;
|
|
|
33
33
|
*--------------------------------------------------------------------------------------------*/
|
|
34
34
|
const classnames_1 = __importDefault(require("classnames"));
|
|
35
35
|
const React = __importStar(require("react"));
|
|
36
|
-
require("@itwin/itwinui-css/css/alert.css");
|
|
37
36
|
const index_js_1 = require("../utils/index.js");
|
|
38
37
|
/**
|
|
39
38
|
* A small box to quickly grab user attention and communicate a brief message
|
|
@@ -50,18 +49,16 @@ const index_js_1 = require("../utils/index.js");
|
|
|
50
49
|
* This is a positive alert with a clickable text
|
|
51
50
|
* </Alert>
|
|
52
51
|
*/
|
|
53
|
-
|
|
54
|
-
const { children, className, type = 'informational', clickableText, clickableTextProps, onClose,
|
|
55
|
-
(0, index_js_1.useTheme)();
|
|
52
|
+
exports.Alert = React.forwardRef((props, ref) => {
|
|
53
|
+
const { children, className, type = 'informational', clickableText, clickableTextProps, onClose, isSticky = false, ...rest } = props;
|
|
56
54
|
const StatusIcon = index_js_1.StatusIconMap[type];
|
|
57
|
-
return (React.createElement(
|
|
55
|
+
return (React.createElement(index_js_1.Box, { className: (0, classnames_1.default)('iui-alert', className), "data-iui-status": type, "data-iui-variant": isSticky ? 'sticky' : undefined, ref: ref, ...rest },
|
|
58
56
|
React.createElement(StatusIcon, { className: 'iui-alert-icon' }),
|
|
59
|
-
React.createElement(
|
|
57
|
+
React.createElement(index_js_1.Box, { as: 'span', className: 'iui-alert-message' },
|
|
60
58
|
children,
|
|
61
|
-
clickableText && (React.createElement(
|
|
62
|
-
onClose && (React.createElement(
|
|
63
|
-
React.createElement(
|
|
59
|
+
clickableText && (React.createElement(index_js_1.Box, { as: 'a', ...clickableTextProps, className: (0, classnames_1.default)('iui-alert-link', clickableTextProps === null || clickableTextProps === void 0 ? void 0 : clickableTextProps.className) }, clickableText))),
|
|
60
|
+
onClose && (React.createElement(index_js_1.Box, { as: 'button', onClick: onClose, "aria-label": 'Close', type: 'button', className: 'iui-alert-button' },
|
|
61
|
+
React.createElement(index_js_1.Box, { as: 'span', className: 'iui-alert-button-icon', "aria-hidden": true },
|
|
64
62
|
React.createElement(index_js_1.SvgCloseSmall, null))))));
|
|
65
|
-
};
|
|
66
|
-
exports.Alert = Alert;
|
|
63
|
+
});
|
|
67
64
|
exports.default = exports.Alert;
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
3
|
-
import '@itwin/itwinui-css/css/avatar.css';
|
|
2
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
4
3
|
export declare type AvatarStatus = 'online' | 'busy' | 'away' | 'offline';
|
|
5
|
-
|
|
6
|
-
* @deprecated Since v2, this has been renamed to `AvatarStatus` (Use with `Avatar`)
|
|
7
|
-
*/
|
|
8
|
-
export declare type UserIconStatus = AvatarStatus;
|
|
9
|
-
export declare type StatusTitles = {
|
|
4
|
+
declare type StatusTitles = {
|
|
10
5
|
[key in Exclude<AvatarStatus, ''>]: string;
|
|
11
6
|
};
|
|
12
|
-
|
|
7
|
+
declare type AvatarProps = {
|
|
13
8
|
/**
|
|
14
9
|
* Size of an avatar.
|
|
15
10
|
* @default 'small'
|
|
@@ -39,11 +34,7 @@ export declare type AvatarProps = {
|
|
|
39
34
|
* Translated status messages shown on hover.
|
|
40
35
|
*/
|
|
41
36
|
translatedStatusTitles?: StatusTitles;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* @deprecated Since v2, this has been renamed to `AvatarProps` (Use with `Avatar`)
|
|
45
|
-
*/
|
|
46
|
-
export declare type UserIconProps = AvatarProps;
|
|
37
|
+
};
|
|
47
38
|
export declare const defaultStatusTitles: StatusTitles;
|
|
48
39
|
/**
|
|
49
40
|
* Basic avatar component
|
|
@@ -60,9 +51,9 @@ export declare const defaultStatusTitles: StatusTitles;
|
|
|
60
51
|
* <caption>X-large icon with image</caption>
|
|
61
52
|
* <Avatar size='x-large' title='Terry Rivers' abbreviation='TR' backgroundColor='green' image={<img src="https://cdn.example.com/user/profile/pic.png" />}/>
|
|
62
53
|
*/
|
|
63
|
-
export declare const Avatar:
|
|
54
|
+
export declare const Avatar: PolymorphicForwardRefComponent<"span", AvatarProps>;
|
|
64
55
|
/**
|
|
65
56
|
* @deprecated Since v2, this has been renamed to `Avatar`
|
|
66
57
|
*/
|
|
67
|
-
export declare const UserIcon:
|
|
58
|
+
export declare const UserIcon: PolymorphicForwardRefComponent<"span", AvatarProps>;
|
|
68
59
|
export default Avatar;
|
|
@@ -34,7 +34,6 @@ exports.UserIcon = exports.Avatar = exports.defaultStatusTitles = void 0;
|
|
|
34
34
|
const classnames_1 = __importDefault(require("classnames"));
|
|
35
35
|
const React = __importStar(require("react"));
|
|
36
36
|
const index_js_1 = require("../utils/index.js");
|
|
37
|
-
require("@itwin/itwinui-css/css/avatar.css");
|
|
38
37
|
exports.defaultStatusTitles = {
|
|
39
38
|
away: 'Away',
|
|
40
39
|
busy: 'Busy',
|
|
@@ -56,19 +55,17 @@ exports.defaultStatusTitles = {
|
|
|
56
55
|
* <caption>X-large icon with image</caption>
|
|
57
56
|
* <Avatar size='x-large' title='Terry Rivers' abbreviation='TR' backgroundColor='green' image={<img src="https://cdn.example.com/user/profile/pic.png" />}/>
|
|
58
57
|
*/
|
|
59
|
-
|
|
58
|
+
exports.Avatar = React.forwardRef((props, ref) => {
|
|
60
59
|
const { size = 'small', status, abbreviation, image, backgroundColor, title, translatedStatusTitles, className, style, ...rest } = props;
|
|
61
|
-
(0, index_js_1.useTheme)();
|
|
62
60
|
const statusTitles = { ...exports.defaultStatusTitles, ...translatedStatusTitles };
|
|
63
|
-
return (React.createElement(
|
|
64
|
-
!image && (React.createElement(
|
|
61
|
+
return (React.createElement(index_js_1.Box, { as: 'span', className: (0, classnames_1.default)('iui-avatar', { [`iui-${size}`]: size !== 'medium' }, className), title: title, style: { backgroundColor, ...style }, ref: ref, ...rest },
|
|
62
|
+
!image && (React.createElement(index_js_1.Box, { as: 'abbr', className: 'iui-initials' }, abbreviation === null || abbreviation === void 0 ? void 0 : abbreviation.substring(0, 2))),
|
|
65
63
|
image,
|
|
66
|
-
React.createElement(
|
|
67
|
-
status && (React.createElement(
|
|
64
|
+
React.createElement(index_js_1.Box, { as: 'span', className: 'iui-stroke' }),
|
|
65
|
+
status && (React.createElement(index_js_1.Box, { as: 'span', title: statusTitles[status], className: (0, classnames_1.default)('iui-status', {
|
|
68
66
|
[`iui-${status}`]: !!status,
|
|
69
67
|
}), "aria-label": statusTitles[status] }))));
|
|
70
|
-
};
|
|
71
|
-
exports.Avatar = Avatar;
|
|
68
|
+
});
|
|
72
69
|
/**
|
|
73
70
|
* @deprecated Since v2, this has been renamed to `Avatar`
|
|
74
71
|
*/
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
export declare type AvatarGroupProps = {
|
|
2
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
|
+
declare type AvatarGroupProps = {
|
|
5
4
|
/**
|
|
6
5
|
* Max number of avatars unstacked.
|
|
7
6
|
* @default 5
|
|
@@ -30,11 +29,7 @@ export declare type AvatarGroupProps = {
|
|
|
30
29
|
* Count Avatar props.
|
|
31
30
|
*/
|
|
32
31
|
countIconProps?: React.ComponentPropsWithRef<'div'>;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* @deprecated Since v2, this has been renamed to `AvatarGroupProps` (Use with `AvatarGroup`)
|
|
36
|
-
*/
|
|
37
|
-
export declare type UserIconGroupProps = AvatarGroupProps;
|
|
32
|
+
};
|
|
38
33
|
/**
|
|
39
34
|
* Group Avatars together.
|
|
40
35
|
*
|
|
@@ -62,9 +57,9 @@ export declare type UserIconGroupProps = AvatarGroupProps;
|
|
|
62
57
|
* />
|
|
63
58
|
* </AvatarGroup>
|
|
64
59
|
*/
|
|
65
|
-
export declare const AvatarGroup:
|
|
60
|
+
export declare const AvatarGroup: PolymorphicForwardRefComponent<"div", AvatarGroupProps>;
|
|
66
61
|
/**
|
|
67
62
|
* @deprecated Since v2, this has been renamed to `AvatarGroup`
|
|
68
63
|
*/
|
|
69
|
-
export declare const UserIconGroup:
|
|
64
|
+
export declare const UserIconGroup: PolymorphicForwardRefComponent<"div", AvatarGroupProps>;
|
|
70
65
|
export default AvatarGroup;
|
|
@@ -34,7 +34,6 @@ exports.UserIconGroup = exports.AvatarGroup = void 0;
|
|
|
34
34
|
const React = __importStar(require("react"));
|
|
35
35
|
const classnames_1 = __importDefault(require("classnames"));
|
|
36
36
|
const index_js_1 = require("../utils/index.js");
|
|
37
|
-
require("@itwin/itwinui-css/css/avatar.css");
|
|
38
37
|
/**
|
|
39
38
|
* Group Avatars together.
|
|
40
39
|
*
|
|
@@ -62,33 +61,30 @@ require("@itwin/itwinui-css/css/avatar.css");
|
|
|
62
61
|
* />
|
|
63
62
|
* </AvatarGroup>
|
|
64
63
|
*/
|
|
65
|
-
|
|
64
|
+
exports.AvatarGroup = React.forwardRef((props, ref) => {
|
|
66
65
|
const maxLength = 99;
|
|
67
66
|
const { children, animated = false, stacked = true, maxIcons = 5, iconSize = 'small', countIconProps, className, ...rest } = props;
|
|
68
67
|
const childrenArray = React.Children.toArray(children);
|
|
69
68
|
const childrenLength = childrenArray.length;
|
|
70
|
-
(0, index_js_1.useTheme)();
|
|
71
69
|
const getAvatarList = (count) => {
|
|
72
70
|
return childrenArray.slice(0, count).map((child) => React.cloneElement(child, {
|
|
73
71
|
status: undefined,
|
|
74
72
|
size: iconSize,
|
|
75
73
|
}));
|
|
76
74
|
};
|
|
77
|
-
return (React.createElement(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
React.createElement(
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
};
|
|
91
|
-
exports.AvatarGroup = AvatarGroup;
|
|
75
|
+
return (React.createElement(index_js_1.Box, { className: (0, classnames_1.default)('iui-avatar-list', {
|
|
76
|
+
'iui-animated': animated,
|
|
77
|
+
'iui-stacked': stacked,
|
|
78
|
+
}, className), ref: ref, ...rest },
|
|
79
|
+
childrenArray.length <= maxIcons + 1 && getAvatarList(maxIcons + 1),
|
|
80
|
+
childrenArray.length > maxIcons + 1 && (React.createElement(React.Fragment, null,
|
|
81
|
+
getAvatarList(maxIcons),
|
|
82
|
+
React.createElement(index_js_1.Box, { ...countIconProps, className: (0, classnames_1.default)('iui-avatar', { [`iui-${iconSize}`]: iconSize !== 'medium' }, 'iui-avatar-count', countIconProps === null || countIconProps === void 0 ? void 0 : countIconProps.className) },
|
|
83
|
+
React.createElement(index_js_1.Box, { as: 'abbr', className: 'iui-initials' }, childrenLength <= maxLength
|
|
84
|
+
? `${childrenLength - maxIcons}`
|
|
85
|
+
: `${maxLength}+`),
|
|
86
|
+
React.createElement(index_js_1.Box, { className: 'iui-stroke' }))))));
|
|
87
|
+
});
|
|
92
88
|
/**
|
|
93
89
|
* @deprecated Since v2, this has been renamed to `AvatarGroup`
|
|
94
90
|
*/
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import '@itwin/itwinui-css/css/backdrop.css';
|
|
1
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
2
|
export declare type BackdropProps = {
|
|
4
3
|
/**
|
|
5
4
|
* Flag whether backdrop should be shown.
|
|
6
5
|
* @default true
|
|
7
6
|
*/
|
|
8
7
|
isVisible?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare const Backdrop:
|
|
8
|
+
};
|
|
9
|
+
export declare const Backdrop: PolymorphicForwardRefComponent<"div", BackdropProps>;
|
|
@@ -34,9 +34,7 @@ exports.Backdrop = void 0;
|
|
|
34
34
|
const React = __importStar(require("react"));
|
|
35
35
|
const classnames_1 = __importDefault(require("classnames"));
|
|
36
36
|
const index_js_1 = require("../utils/index.js");
|
|
37
|
-
require("@itwin/itwinui-css/css/backdrop.css");
|
|
38
37
|
exports.Backdrop = React.forwardRef((props, ref) => {
|
|
39
38
|
const { isVisible = true, className, ...rest } = props;
|
|
40
|
-
(0,
|
|
41
|
-
return (React.createElement("div", { className: (0, classnames_1.default)('iui-backdrop', { 'iui-backdrop-visible': isVisible }, className), ref: ref, ...rest }));
|
|
39
|
+
return (React.createElement(index_js_1.Box, { className: (0, classnames_1.default)('iui-backdrop', { 'iui-backdrop-visible': isVisible }, className), ref: ref, ...rest }));
|
|
42
40
|
});
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { SoftBackgrounds } from '../utils/index.js';
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
import '@itwin/itwinui-css/css/badge.css';
|
|
6
|
-
export declare type BadgeProps = {
|
|
2
|
+
import type { AnyString, PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
|
+
declare type BadgeProps = {
|
|
7
4
|
/**
|
|
8
5
|
* Background color of the badge.
|
|
9
6
|
*
|
|
@@ -17,7 +14,7 @@ export declare type BadgeProps = {
|
|
|
17
14
|
* Always gets converted to uppercase, and truncated if too long.
|
|
18
15
|
*/
|
|
19
16
|
children: string;
|
|
20
|
-
}
|
|
17
|
+
};
|
|
21
18
|
/**
|
|
22
19
|
* A colorful visual indicator for categorizing items.
|
|
23
20
|
* @example
|
|
@@ -25,5 +22,5 @@ export declare type BadgeProps = {
|
|
|
25
22
|
* <Badge backgroundColor="sunglow">Label</Badge>
|
|
26
23
|
* <Badge backgroundColor="positive">Label</Badge>
|
|
27
24
|
*/
|
|
28
|
-
export declare const Badge:
|
|
25
|
+
export declare const Badge: PolymorphicForwardRefComponent<"span", BadgeProps>;
|
|
29
26
|
export default Badge;
|
package/cjs/core/Badge/Badge.js
CHANGED
|
@@ -34,7 +34,6 @@ exports.Badge = void 0;
|
|
|
34
34
|
const React = __importStar(require("react"));
|
|
35
35
|
const classnames_1 = __importDefault(require("classnames"));
|
|
36
36
|
const index_js_1 = require("../utils/index.js");
|
|
37
|
-
require("@itwin/itwinui-css/css/badge.css");
|
|
38
37
|
/**
|
|
39
38
|
* Helper function that returns one of the preset badge color values.
|
|
40
39
|
*/
|
|
@@ -58,9 +57,8 @@ const getStatusValue = (color) => {
|
|
|
58
57
|
* <Badge backgroundColor="sunglow">Label</Badge>
|
|
59
58
|
* <Badge backgroundColor="positive">Label</Badge>
|
|
60
59
|
*/
|
|
61
|
-
|
|
60
|
+
exports.Badge = React.forwardRef((props, forwardedRef) => {
|
|
62
61
|
const { backgroundColor, style, className, children, ...rest } = props;
|
|
63
|
-
(0, index_js_1.useTheme)();
|
|
64
62
|
// choosing 'primary' status should result in data-iui-status equaling 'informational'
|
|
65
63
|
const reducedBackgroundColor = backgroundColor === 'primary' ? 'informational' : backgroundColor;
|
|
66
64
|
const statusValue = getStatusValue(reducedBackgroundColor);
|
|
@@ -70,7 +68,6 @@ const Badge = (props) => {
|
|
|
70
68
|
...style,
|
|
71
69
|
}
|
|
72
70
|
: { ...style };
|
|
73
|
-
return (React.createElement(
|
|
74
|
-
};
|
|
75
|
-
exports.Badge = Badge;
|
|
71
|
+
return (React.createElement(index_js_1.Box, { as: 'span', className: (0, classnames_1.default)('iui-badge', className), style: _style, "data-iui-status": statusValue, ref: forwardedRef, ...rest }, children));
|
|
72
|
+
});
|
|
76
73
|
exports.default = exports.Badge;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
export declare type BreadcrumbsProps = {
|
|
2
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
|
+
declare type BreadcrumbsProps = {
|
|
5
4
|
/**
|
|
6
5
|
* Index of the currently active breadcrumb.
|
|
7
6
|
* Defaults to the index of the last breadcrumb item.
|
|
@@ -74,7 +73,7 @@ export declare type BreadcrumbsProps = {
|
|
|
74
73
|
* </Breadcrumbs>
|
|
75
74
|
*/
|
|
76
75
|
overflowButton?: (visibleCount: number) => React.ReactNode;
|
|
77
|
-
}
|
|
76
|
+
};
|
|
78
77
|
/**
|
|
79
78
|
* A breadcrumb trail is used as a navigational aid to help users keep track
|
|
80
79
|
* of their place in the application. It is often placed before a page's main content.
|
|
@@ -97,78 +96,5 @@ export declare type BreadcrumbsProps = {
|
|
|
97
96
|
* <span>Current level</span>
|
|
98
97
|
* </Breadcrumbs>
|
|
99
98
|
*/
|
|
100
|
-
export declare const Breadcrumbs:
|
|
101
|
-
/**
|
|
102
|
-
* Index of the currently active breadcrumb.
|
|
103
|
-
* Defaults to the index of the last breadcrumb item.
|
|
104
|
-
*/
|
|
105
|
-
currentIndex?: number | undefined;
|
|
106
|
-
/**
|
|
107
|
-
* Breadcrumb items.
|
|
108
|
-
*/
|
|
109
|
-
children: React.ReactNode[];
|
|
110
|
-
/**
|
|
111
|
-
* Specify a custom separator element to show between breadcrumb items.
|
|
112
|
-
* Defaults to the `SvgChevronRight` icon.
|
|
113
|
-
*/
|
|
114
|
-
separator?: React.ReactNode;
|
|
115
|
-
/**
|
|
116
|
-
* If specified, this prop will be used to show a custom button when overflow happens,
|
|
117
|
-
* i.e. when there is not enough space to fit all the breadcrumbs.
|
|
118
|
-
*
|
|
119
|
-
* Expects a function that takes the number of items that are visible
|
|
120
|
-
* and returns the `ReactNode` to render.
|
|
121
|
-
*
|
|
122
|
-
* @example <caption>Uses the overflow button to redirect to the previous breadcrumb</caption>
|
|
123
|
-
* <Breadcrumbs
|
|
124
|
-
* overflowButton={(visibleCount: number) => {
|
|
125
|
-
* const previousBreadcrumb = visibleCount > 1 ? items.length - visibleCount : items.length - 2;
|
|
126
|
-
* return (
|
|
127
|
-
* <Tooltip content={`Item ${previousBreadcrumb}`} placement='bottom'>
|
|
128
|
-
* <IconButton
|
|
129
|
-
* onClick={() => {
|
|
130
|
-
* // click on "previousBreadcrumb"
|
|
131
|
-
* }}
|
|
132
|
-
* >
|
|
133
|
-
* <SvgMoreSmall />
|
|
134
|
-
* </IconButton>
|
|
135
|
-
* </Tooltip>
|
|
136
|
-
* );
|
|
137
|
-
* }}
|
|
138
|
-
* >
|
|
139
|
-
* {items}
|
|
140
|
-
* </Breadcrumbs>
|
|
141
|
-
*
|
|
142
|
-
* @example <caption>Uses the overflow button to add a dropdown that contains hidden breadcrumbs</caption>
|
|
143
|
-
* <Breadcrumbs
|
|
144
|
-
* overflowButton={(visibleCount) => (
|
|
145
|
-
* <DropdownMenu
|
|
146
|
-
* menuItems={(close) =>
|
|
147
|
-
* Array(items.length - visibleCount)
|
|
148
|
-
* .fill(null)
|
|
149
|
-
* .map((_, _index) => {
|
|
150
|
-
* const index = visibleCount > 1 ? _index + 1 : _index;
|
|
151
|
-
* const onClick = () => {
|
|
152
|
-
* // click on "index" breadcrumb
|
|
153
|
-
* close();
|
|
154
|
-
* };
|
|
155
|
-
* return (
|
|
156
|
-
* <MenuItem key={index} onClick={onClick}>
|
|
157
|
-
* Item {index}
|
|
158
|
-
* </MenuItem>
|
|
159
|
-
* );
|
|
160
|
-
* })
|
|
161
|
-
* }
|
|
162
|
-
* >
|
|
163
|
-
* <IconButton>
|
|
164
|
-
* <SvgMoreSmall />
|
|
165
|
-
* </IconButton>
|
|
166
|
-
* </DropdownMenu>
|
|
167
|
-
* )}
|
|
168
|
-
* >
|
|
169
|
-
* {items}
|
|
170
|
-
* </Breadcrumbs>
|
|
171
|
-
*/
|
|
172
|
-
overflowButton?: ((visibleCount: number) => React.ReactNode) | undefined;
|
|
173
|
-
} & Omit<CommonProps, "title"> & React.RefAttributes<HTMLElement>>;
|
|
99
|
+
export declare const Breadcrumbs: PolymorphicForwardRefComponent<"nav", BreadcrumbsProps>;
|
|
174
100
|
export default Breadcrumbs;
|
|
@@ -34,7 +34,6 @@ exports.Breadcrumbs = void 0;
|
|
|
34
34
|
const React = __importStar(require("react"));
|
|
35
35
|
const classnames_1 = __importDefault(require("classnames"));
|
|
36
36
|
const index_js_1 = require("../utils/index.js");
|
|
37
|
-
require("@itwin/itwinui-css/css/breadcrumbs.css");
|
|
38
37
|
/**
|
|
39
38
|
* A breadcrumb trail is used as a navigational aid to help users keep track
|
|
40
39
|
* of their place in the application. It is often placed before a page's main content.
|
|
@@ -59,16 +58,15 @@ require("@itwin/itwinui-css/css/breadcrumbs.css");
|
|
|
59
58
|
*/
|
|
60
59
|
exports.Breadcrumbs = React.forwardRef((props, ref) => {
|
|
61
60
|
const { children: items, currentIndex = items.length - 1, separator, overflowButton, className, ...rest } = props;
|
|
62
|
-
(0, index_js_1.useTheme)();
|
|
63
61
|
const [overflowRef, visibleCount] = (0, index_js_1.useOverflow)(items);
|
|
64
62
|
const refs = (0, index_js_1.useMergedRefs)(overflowRef, ref);
|
|
65
|
-
return (React.createElement(
|
|
66
|
-
React.createElement(
|
|
63
|
+
return (React.createElement(index_js_1.Box, { as: 'nav', className: (0, classnames_1.default)('iui-breadcrumbs', className), ref: refs, "aria-label": 'Breadcrumb', ...rest },
|
|
64
|
+
React.createElement(index_js_1.Box, { as: 'ol', className: 'iui-breadcrumbs-list' },
|
|
67
65
|
visibleCount > 1 && (React.createElement(React.Fragment, null,
|
|
68
66
|
React.createElement(ListItem, { item: items[0], isActive: currentIndex === 0 }),
|
|
69
67
|
React.createElement(Separator, { separator: separator }))),
|
|
70
68
|
items.length - visibleCount > 0 && (React.createElement(React.Fragment, null,
|
|
71
|
-
React.createElement(
|
|
69
|
+
React.createElement(index_js_1.Box, { as: 'li', className: 'iui-breadcrumbs-item iui-breadcrumbs-item-overrides' }, overflowButton ? (overflowButton(visibleCount)) : (React.createElement(index_js_1.Box, { as: 'span', className: 'iui-breadcrumbs-text' }, "\u2026"))),
|
|
72
70
|
React.createElement(Separator, { separator: separator }))),
|
|
73
71
|
items
|
|
74
72
|
.slice(visibleCount > 1
|
|
@@ -85,11 +83,11 @@ exports.Breadcrumbs = React.forwardRef((props, ref) => {
|
|
|
85
83
|
});
|
|
86
84
|
const ListItem = ({ item, isActive, }) => {
|
|
87
85
|
var _a;
|
|
88
|
-
return (React.createElement(
|
|
86
|
+
return (React.createElement(index_js_1.Box, { as: 'li', className: 'iui-breadcrumbs-item iui-breadcrumbs-item-overrides' }, React.isValidElement(item)
|
|
89
87
|
? React.cloneElement(item, {
|
|
90
88
|
'aria-current': ((_a = item.props['aria-current']) !== null && _a !== void 0 ? _a : isActive) ? 'location' : undefined,
|
|
91
89
|
})
|
|
92
90
|
: item));
|
|
93
91
|
};
|
|
94
|
-
const Separator = ({ separator }) => (React.createElement(
|
|
92
|
+
const Separator = ({ separator }) => (React.createElement(index_js_1.Box, { as: 'li', className: 'iui-breadcrumbs-separator', "aria-hidden": true }, separator !== null && separator !== void 0 ? separator : React.createElement(index_js_1.SvgChevronRight, null)));
|
|
95
93
|
exports.default = exports.Breadcrumbs;
|