@itwin/itwinui-react 2.11.3 → 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 +27 -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 +13 -31
- 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 +14 -31
- 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
|
@@ -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 '@itwin/itwinui-css/css/stepper.css';
|
|
8
8
|
import { StepperStep } from './StepperStep.js';
|
|
9
9
|
const defaultStepperLocalization = {
|
|
@@ -12,11 +12,10 @@ const defaultStepperLocalization = {
|
|
|
12
12
|
export const Stepper = React.forwardRef((props, ref) => {
|
|
13
13
|
const { currentStep, steps, type = 'default', localization = defaultStepperLocalization, onStepClick, ...rest } = props;
|
|
14
14
|
const boundedCurrentStep = Math.min(Math.max(0, currentStep !== null && currentStep !== void 0 ? currentStep : 0), steps.length - 1);
|
|
15
|
-
|
|
16
|
-
return (React.createElement("div", { className: 'iui-stepper', ref: ref, ...rest },
|
|
15
|
+
return (React.createElement(Box, { className: 'iui-stepper', ref: ref, ...rest },
|
|
17
16
|
React.createElement("ol", null, steps.map((s, index) => (React.createElement(StepperStep, { key: index, index: index, title: type === 'long' ? '' : s.name, currentStepNumber: boundedCurrentStep, totalSteps: steps.length, type: type, onClick: onStepClick, description: s.description })))),
|
|
18
|
-
type === 'long' && (React.createElement(
|
|
19
|
-
React.createElement(
|
|
17
|
+
type === 'long' && (React.createElement(Box, { className: 'iui-stepper-steps-label' },
|
|
18
|
+
React.createElement(Box, { as: 'span', className: 'iui-stepper-steps-label-count' }, localization.stepsCountLabel(boundedCurrentStep + 1, steps.length)),
|
|
20
19
|
steps[boundedCurrentStep].name))));
|
|
21
20
|
});
|
|
22
21
|
export default Stepper;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import type { StylingProps } from '../utils/index.js';
|
|
1
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
2
|
export declare type StepperStepProps = {
|
|
4
3
|
/**
|
|
5
4
|
* The title/label of the step.
|
|
@@ -29,5 +28,5 @@ export declare type StepperStepProps = {
|
|
|
29
28
|
* A tooltip giving detailed description to this step.
|
|
30
29
|
*/
|
|
31
30
|
description?: string;
|
|
32
|
-
}
|
|
33
|
-
export declare const StepperStep:
|
|
31
|
+
};
|
|
32
|
+
export declare const StepperStep: PolymorphicForwardRefComponent<"li", StepperStepProps>;
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { Tooltip } from '../Tooltip/index.js';
|
|
8
|
-
|
|
8
|
+
import { Box } from '../utils/index.js';
|
|
9
|
+
export const StepperStep = React.forwardRef((props, forwardedRef) => {
|
|
9
10
|
const { title, index, currentStepNumber, totalSteps, type, onClick, description, className, style, ...rest } = props;
|
|
10
11
|
const isPast = currentStepNumber > index;
|
|
11
12
|
const isActive = currentStepNumber === index;
|
|
@@ -26,15 +27,15 @@ export const StepperStep = (props) => {
|
|
|
26
27
|
onCompletedClick();
|
|
27
28
|
}
|
|
28
29
|
};
|
|
29
|
-
const stepShape = (React.createElement(
|
|
30
|
+
const stepShape = (React.createElement(Box, { as: 'li', className: cx('iui-stepper-step', {
|
|
30
31
|
'iui-current': isActive,
|
|
31
32
|
'iui-clickable': isClickable,
|
|
32
33
|
}, className), style: {
|
|
33
34
|
width: type === 'default' ? `${100 / totalSteps}%` : undefined,
|
|
34
35
|
...style,
|
|
35
|
-
}, onClick: onCompletedClick, onKeyDown: onKeyDown, "aria-current": isActive ? 'step' : undefined, tabIndex: isClickable ? 0 : undefined, ...rest },
|
|
36
|
-
React.createElement(
|
|
37
|
-
React.createElement(
|
|
38
|
-
type === 'default' && (React.createElement(
|
|
36
|
+
}, onClick: onCompletedClick, onKeyDown: onKeyDown, "aria-current": isActive ? 'step' : undefined, tabIndex: isClickable ? 0 : undefined, ref: forwardedRef, ...rest },
|
|
37
|
+
React.createElement(Box, { className: 'iui-stepper-track-content' },
|
|
38
|
+
React.createElement(Box, { as: 'span', className: 'iui-stepper-circle' }, index + 1)),
|
|
39
|
+
type === 'default' && (React.createElement(Box, { as: 'span', className: 'iui-stepper-step-name' }, title))));
|
|
39
40
|
return description ? (React.createElement(Tooltip, { content: description }, stepShape)) : (stepShape);
|
|
40
|
-
};
|
|
41
|
+
});
|
|
@@ -20,7 +20,9 @@ import { WorkflowDiagram } from './WorkflowDiagram.js';
|
|
|
20
20
|
* type='long'
|
|
21
21
|
* />
|
|
22
22
|
*/
|
|
23
|
-
export const Wizard = React.forwardRef(
|
|
23
|
+
export const Wizard = React.forwardRef(
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25
|
+
(props, ref) => {
|
|
24
26
|
const { currentStep, steps, type = 'default', localization, onStepClick, ...rest } = props;
|
|
25
27
|
return type !== 'workflow' ? (React.createElement(Stepper, { type: type, currentStep: currentStep, steps: steps, localization: localization, onStepClick: onStepClick, ref: ref, ...rest })) : (React.createElement(WorkflowDiagram, { steps: steps, ref: ref, ...rest }));
|
|
26
28
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
2
2
|
import '@itwin/itwinui-css/css/workflow-diagram.css';
|
|
3
3
|
import type { StepperProps } from './Stepper.js';
|
|
4
|
-
|
|
5
|
-
export declare const WorkflowDiagram:
|
|
4
|
+
declare type WorkflowDiagramProps = Pick<StepperProps, 'steps'>;
|
|
5
|
+
export declare const WorkflowDiagram: PolymorphicForwardRefComponent<"ol", WorkflowDiagramProps>;
|
|
6
6
|
export default WorkflowDiagram;
|
|
@@ -3,13 +3,14 @@
|
|
|
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 '@itwin/itwinui-css/css/workflow-diagram.css';
|
|
8
8
|
import { WorkflowDiagramStep } from './WorkflowDiagramStep.js';
|
|
9
|
-
export const WorkflowDiagram = React.forwardRef(
|
|
9
|
+
export const WorkflowDiagram = React.forwardRef(
|
|
10
|
+
// TODO: Remove this ref cast. ref and rest props should be applied on the same element
|
|
11
|
+
(props, ref) => {
|
|
10
12
|
const { steps, ...rest } = props;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
React.createElement("ol", { className: 'iui-workflow-diagram', ...rest }, steps.map((s, index) => (React.createElement(WorkflowDiagramStep, { key: index, title: s.name, description: s.description }))))));
|
|
13
|
+
return (React.createElement(Box, { ref: ref },
|
|
14
|
+
React.createElement(Box, { as: 'ol', className: 'iui-workflow-diagram', ...rest }, steps.map((s, index) => (React.createElement(WorkflowDiagramStep, { key: index, title: s.name, description: s.description }))))));
|
|
14
15
|
});
|
|
15
16
|
export default WorkflowDiagram;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type
|
|
2
|
+
import { type CommonProps } from '../utils/index.js';
|
|
3
3
|
import type { StepperStepProps } from './StepperStep.js';
|
|
4
|
-
export declare type WorkflowDiagramStepProps = Pick<StepperStepProps, 'title' | 'description'> &
|
|
4
|
+
export declare type WorkflowDiagramStepProps = Pick<StepperStepProps, 'title' | 'description'> & Omit<CommonProps, 'title'>;
|
|
5
5
|
export declare const WorkflowDiagramStep: (props: WorkflowDiagramStepProps) => JSX.Element;
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { Tooltip } from '../Tooltip/index.js';
|
|
8
|
+
import { Box } from '../utils/index.js';
|
|
8
9
|
export const WorkflowDiagramStep = (props) => {
|
|
9
10
|
const { title, description, className, style, ...rest } = props;
|
|
10
|
-
const stepShape = (React.createElement(
|
|
11
|
-
React.createElement(
|
|
11
|
+
const stepShape = (React.createElement(Box, { as: 'li', className: cx('iui-workflow-diagram-step', className), style: style, ...rest },
|
|
12
|
+
React.createElement(Box, { as: 'span', className: 'iui-workflow-diagram-content' }, title)));
|
|
12
13
|
return description ? (React.createElement(Tooltip, { content: description }, stepShape)) : (stepShape);
|
|
13
14
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export { Wizard } from './Wizard.js';
|
|
2
2
|
export { Stepper } from './Stepper.js';
|
|
3
3
|
export { WorkflowDiagram } from './WorkflowDiagram.js';
|
|
4
|
-
export type {
|
|
5
|
-
export type {
|
|
6
|
-
export type { WorkflowDiagramProps } from './WorkflowDiagram.js';
|
|
4
|
+
export type { WizardType, WizardLocalization } from './Wizard.js';
|
|
5
|
+
export type { StepProperties, StepperLocalization } from './Stepper.js';
|
|
7
6
|
declare const _default: "./Wizard";
|
|
8
7
|
export default _default;
|
|
@@ -1,16 +1,13 @@
|
|
|
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/surface.css';
|
|
4
|
-
declare type SurfaceHeaderOwnProps = {};
|
|
5
|
-
export declare type SurfaceHeaderProps<T extends React.ElementType = 'div'> = PolymorphicComponentProps<T, SurfaceHeaderOwnProps>;
|
|
6
4
|
declare type SurfaceBodyOwnProps = {
|
|
7
5
|
/**
|
|
8
6
|
* Gives padding to the surface body
|
|
9
7
|
*/
|
|
10
8
|
isPadded?: boolean;
|
|
11
9
|
};
|
|
12
|
-
|
|
13
|
-
export declare type SurfaceProps = {
|
|
10
|
+
declare type SurfaceProps = {
|
|
14
11
|
/**
|
|
15
12
|
* Sets the elevation of the surface
|
|
16
13
|
*/
|
|
@@ -19,7 +16,7 @@ export declare type SurfaceProps = {
|
|
|
19
16
|
* Content in the surface.
|
|
20
17
|
*/
|
|
21
18
|
children: React.ReactNode;
|
|
22
|
-
}
|
|
19
|
+
};
|
|
23
20
|
/**
|
|
24
21
|
* The Surface container allows content to appear elevated through the use of a drop shadow
|
|
25
22
|
* @example
|
|
@@ -30,20 +27,11 @@ export declare type SurfaceProps = {
|
|
|
30
27
|
* <Surface.Body isPadded={true}>Surface Body Content</Surface.Body>
|
|
31
28
|
* </Surface>
|
|
32
29
|
*/
|
|
33
|
-
export declare const Surface:
|
|
34
|
-
/**
|
|
35
|
-
* Sets the elevation of the surface
|
|
36
|
-
*/
|
|
37
|
-
elevation?: 0 | 1 | 2 | 3 | 4 | 5 | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* Content in the surface.
|
|
40
|
-
*/
|
|
41
|
-
children: React.ReactNode;
|
|
42
|
-
} & Omit<CommonProps, "title"> & React.RefAttributes<HTMLDivElement>> & {
|
|
30
|
+
export declare const Surface: PolymorphicForwardRefComponent<"div", SurfaceProps> & {
|
|
43
31
|
/**
|
|
44
32
|
* Surface header subcomponent
|
|
45
33
|
*/
|
|
46
|
-
Header: PolymorphicForwardRefComponent<"div",
|
|
34
|
+
Header: PolymorphicForwardRefComponent<"div", {}>;
|
|
47
35
|
/**
|
|
48
36
|
* Surface body subcomponent. Additional padding can be added to the body through the 'isPadded' prop
|
|
49
37
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import cx from 'classnames';
|
|
7
|
-
import { useSafeContext,
|
|
7
|
+
import { useSafeContext, supportsHas, Box } from '../utils/index.js';
|
|
8
8
|
import '@itwin/itwinui-css/css/surface.css';
|
|
9
9
|
/**
|
|
10
10
|
* Helper function that returns one of the preset surface elevation values.
|
|
@@ -27,25 +27,27 @@ const getSurfaceElevationValue = (elevation) => {
|
|
|
27
27
|
return '';
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
+
// ----------------------------------------------------------------------------
|
|
31
|
+
// Surface.Header component
|
|
30
32
|
const SurfaceHeader = React.forwardRef((props, ref) => {
|
|
31
|
-
const {
|
|
33
|
+
const { children, className, ...rest } = props;
|
|
32
34
|
const { setHasLayout } = useSafeContext(SurfaceContext);
|
|
33
35
|
React.useEffect(() => {
|
|
34
36
|
if (!supportsHas()) {
|
|
35
37
|
setHasLayout(true);
|
|
36
38
|
}
|
|
37
39
|
}, [setHasLayout]);
|
|
38
|
-
return (React.createElement(
|
|
40
|
+
return (React.createElement(Box, { className: cx('iui-surface-header', className), ref: ref, ...rest }, children));
|
|
39
41
|
});
|
|
40
42
|
const SurfaceBody = React.forwardRef((props, ref) => {
|
|
41
|
-
const {
|
|
43
|
+
const { children, className, isPadded, ...rest } = props;
|
|
42
44
|
const { setHasLayout } = useSafeContext(SurfaceContext);
|
|
43
45
|
React.useEffect(() => {
|
|
44
46
|
if (!supportsHas()) {
|
|
45
47
|
setHasLayout(true);
|
|
46
48
|
}
|
|
47
49
|
}, [setHasLayout]);
|
|
48
|
-
return (React.createElement(
|
|
50
|
+
return (React.createElement(Box, { className: cx('iui-surface-body', className), ref: ref, "data-iui-padded": isPadded ? 'true' : undefined, ...rest }, children));
|
|
49
51
|
});
|
|
50
52
|
/**
|
|
51
53
|
* The Surface container allows content to appear elevated through the use of a drop shadow
|
|
@@ -59,13 +61,12 @@ const SurfaceBody = React.forwardRef((props, ref) => {
|
|
|
59
61
|
*/
|
|
60
62
|
export const Surface = Object.assign(React.forwardRef((props, ref) => {
|
|
61
63
|
const { elevation, className, style, children, ...rest } = props;
|
|
62
|
-
useTheme();
|
|
63
64
|
const [hasLayout, setHasLayout] = React.useState(false);
|
|
64
65
|
const _style = {
|
|
65
66
|
'--iui-surface-elevation': getSurfaceElevationValue(elevation),
|
|
66
67
|
...style,
|
|
67
68
|
};
|
|
68
|
-
return (React.createElement(
|
|
69
|
+
return (React.createElement(Box, { className: cx('iui-surface', className), style: _style, ref: ref, "data-iui-layout": hasLayout ? 'true' : undefined, ...rest },
|
|
69
70
|
React.createElement(SurfaceContext.Provider, { value: { setHasLayout } }, children)));
|
|
70
71
|
}), {
|
|
71
72
|
/**
|
package/esm/core/Table/Table.js
CHANGED
|
@@ -6,7 +6,7 @@ import * as React from 'react';
|
|
|
6
6
|
import cx from 'classnames';
|
|
7
7
|
import { actions as TableActions, useFlexLayout, useFilters, useRowSelect, useSortBy, useTable, useExpanded, usePagination, useColumnOrder, useGlobalFilter, } from 'react-table';
|
|
8
8
|
import { ProgressRadial } from '../ProgressIndicators/index.js';
|
|
9
|
-
import {
|
|
9
|
+
import { useGlobals, useResizeObserver, SvgSortDown, SvgSortUp, useIsomorphicLayoutEffect, } from '../utils/index.js';
|
|
10
10
|
import '@itwin/itwinui-css/css/table.css';
|
|
11
11
|
import { getCellStyle, getStickyStyle } from './utils.js';
|
|
12
12
|
import { TableRowMemoized } from './TableRowMemoized.js';
|
|
@@ -76,7 +76,7 @@ const flattenColumns = (columns) => {
|
|
|
76
76
|
*/
|
|
77
77
|
export const Table = (props) => {
|
|
78
78
|
const { data, columns, isLoading = false, emptyTableContent, className, style, id, isSelectable = false, onSelect, onRowClick, selectionMode = 'multi', isSortable = false, onSort, stateReducer, onBottomReached, onRowInViewport, intersectionMargin = 300, subComponent, onExpand, onFilter, globalFilterValue, emptyFilteredTableContent, filterTypes: filterFunctions, expanderCell, isRowDisabled, rowProps, density = 'default', selectSubRows = true, getSubRows, selectRowOnClick = true, paginatorRenderer, pageSize = 25, isResizable = false, columnResizeMode = 'fit', styleType = 'default', enableVirtualization = false, enableColumnReordering = false, ...rest } = props;
|
|
79
|
-
|
|
79
|
+
useGlobals();
|
|
80
80
|
const ownerDocument = React.useRef();
|
|
81
81
|
const defaultColumn = React.useMemo(() => ({
|
|
82
82
|
maxWidth: 0,
|
|
@@ -8,7 +8,7 @@ import '@itwin/itwinui-css/css/table.css';
|
|
|
8
8
|
import { IconButton, Button, DropdownButton } from '../Buttons/index.js';
|
|
9
9
|
import { ProgressRadial } from '../ProgressIndicators/index.js';
|
|
10
10
|
import { MenuItem } from '../Menu/index.js';
|
|
11
|
-
import { getBoundedValue,
|
|
11
|
+
import { getBoundedValue, useGlobals, useOverflow, useContainerWidth, SvgChevronLeft, SvgChevronRight, } from '../utils/index.js';
|
|
12
12
|
const defaultLocalization = {
|
|
13
13
|
pageSizeLabel: (size) => `${size} per page`,
|
|
14
14
|
rangeLabel: (startIndex, endIndex, totalRows, isLoading) => isLoading
|
|
@@ -31,7 +31,7 @@ const defaultLocalization = {
|
|
|
31
31
|
*/
|
|
32
32
|
export const TablePaginator = (props) => {
|
|
33
33
|
const { currentPage, totalRowsCount, pageSize, onPageChange, totalSelectedRowsCount = 0, focusActivationMode = 'manual', isLoading = false, size = 'default', pageSizeList, onPageSizeChange, localization: userLocalization, className, ...rest } = props;
|
|
34
|
-
|
|
34
|
+
useGlobals();
|
|
35
35
|
const localization = React.useMemo(() => ({ ...defaultLocalization, ...userLocalization }), [userLocalization]);
|
|
36
36
|
const pageListRef = React.useRef(null);
|
|
37
37
|
const [focusedIndex, setFocusedIndex] = React.useState(currentPage);
|
|
@@ -75,7 +75,7 @@ export const ActionColumn = ({ columnManager = false, } = {}) => {
|
|
|
75
75
|
(_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.scrollIntoView();
|
|
76
76
|
});
|
|
77
77
|
};
|
|
78
|
-
return (React.createElement(MenuItem, { key: column.id,
|
|
78
|
+
return (React.createElement(MenuItem, { key: column.id, startIcon: React.createElement(Checkbox, { checked: checked, disabled: column.disableToggleVisibility, onClick: (e) => e.stopPropagation(), onChange: onClick, "aria-labelledby": `iui-column-${column.id}` }), onClick: onClick, disabled: column.disableToggleVisibility },
|
|
79
79
|
React.createElement("div", { id: `iui-column-${column.id}` }, column.render('Header'))));
|
|
80
80
|
});
|
|
81
81
|
const dropdownMenuProps = typeof columnManager !== 'boolean'
|
|
@@ -8,7 +8,7 @@ export declare const EXPANDER_CELL_ID = "iui-table-expander";
|
|
|
8
8
|
* const subComponent = useCallback(
|
|
9
9
|
* (row: Row) => (
|
|
10
10
|
* <div style={{ padding: 16 }}>
|
|
11
|
-
* <
|
|
11
|
+
* <Text variant='leading'>Extra information</Text>
|
|
12
12
|
* <pre>
|
|
13
13
|
* <code>{JSON.stringify({ values: row.values }, null, 2)}</code>
|
|
14
14
|
* </pre>
|
|
@@ -14,7 +14,7 @@ export const EXPANDER_CELL_ID = 'iui-table-expander';
|
|
|
14
14
|
* const subComponent = useCallback(
|
|
15
15
|
* (row: Row) => (
|
|
16
16
|
* <div style={{ padding: 16 }}>
|
|
17
|
-
* <
|
|
17
|
+
* <Text variant='leading'>Extra information</Text>
|
|
18
18
|
* <pre>
|
|
19
19
|
* <code>{JSON.stringify({ values: row.values }, null, 2)}</code>
|
|
20
20
|
* </pre>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import cx from 'classnames';
|
|
7
7
|
import '@itwin/itwinui-css/css/table.css';
|
|
8
|
-
import {
|
|
8
|
+
import { useGlobals } from '../../utils/index.js';
|
|
9
9
|
/**
|
|
10
10
|
* Filter wrapper that should be used when creating custom filters.
|
|
11
11
|
* @example
|
|
@@ -22,7 +22,7 @@ import { useTheme } from '../../utils/index.js';
|
|
|
22
22
|
*/
|
|
23
23
|
export const BaseFilter = (props) => {
|
|
24
24
|
const { children, className, style, id } = props;
|
|
25
|
-
|
|
25
|
+
useGlobals();
|
|
26
26
|
return (React.createElement("div", { className: cx('iui-table-column-filter', className), style: style,
|
|
27
27
|
// Prevents from triggering sort
|
|
28
28
|
onClick: (e) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { LabeledInput } from '../../../LabeledInput/index.js';
|
|
3
3
|
export declare type DatePickerInputProps = {
|
|
4
4
|
date?: Date;
|
|
5
5
|
onChange: (date?: Date) => void;
|
|
@@ -13,6 +13,6 @@ export declare type DatePickerInputProps = {
|
|
|
13
13
|
* The 'to' date for the 'from' DatePickerInput or the 'from' date for the 'to' DatePickerInput
|
|
14
14
|
*/
|
|
15
15
|
selectedDate?: Date;
|
|
16
|
-
} & Omit<
|
|
16
|
+
} & Omit<React.ComponentProps<typeof LabeledInput>, 'value' | 'onChange' | 'svgIcon' | 'displayStyle'>;
|
|
17
17
|
declare const DatePickerInput: (props: DatePickerInputProps) => JSX.Element;
|
|
18
18
|
export default DatePickerInput;
|
|
@@ -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 { useGlobals } from '../../../utils/index.js';
|
|
7
7
|
import { FilterButtonBar } from '../FilterButtonBar.js';
|
|
8
8
|
import { BaseFilter } from '../BaseFilter.js';
|
|
9
9
|
import '@itwin/itwinui-css/css/table.css';
|
|
@@ -30,7 +30,7 @@ const defaultParseInput = (text) => {
|
|
|
30
30
|
export const DateRangeFilter = (props) => {
|
|
31
31
|
var _a, _b, _c, _d;
|
|
32
32
|
const { column, translatedLabels, setFilter, clearFilter, formatDate = defaultFormatDate, parseInput = defaultParseInput, placeholder = 'MMM dd, yyyy', } = props;
|
|
33
|
-
|
|
33
|
+
useGlobals();
|
|
34
34
|
const translatedStrings = { ...defaultStrings, ...translatedLabels };
|
|
35
35
|
const [from, setFrom] = React.useState(((_a = column.filterValue) === null || _a === void 0 ? void 0 : _a[0]) ? new Date((_b = column.filterValue) === null || _b === void 0 ? void 0 : _b[0]) : undefined);
|
|
36
36
|
const onFromChange = React.useCallback((date) => {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import cx from 'classnames';
|
|
7
7
|
import '@itwin/itwinui-css/css/table.css';
|
|
8
|
-
import {
|
|
8
|
+
import { useGlobals } from '../../utils/index.js';
|
|
9
9
|
import { Button } from '../../Buttons/index.js';
|
|
10
10
|
const defaultStrings = {
|
|
11
11
|
filter: 'Filter',
|
|
@@ -19,7 +19,7 @@ const defaultStrings = {
|
|
|
19
19
|
export const FilterButtonBar = (props) => {
|
|
20
20
|
const { children, setFilter, clearFilter, translatedLabels, className, style, id, } = props;
|
|
21
21
|
const translatedStrings = { ...defaultStrings, ...translatedLabels };
|
|
22
|
-
|
|
22
|
+
useGlobals();
|
|
23
23
|
return (React.createElement("div", { className: cx('iui-button-bar', className), style: style, id: id },
|
|
24
24
|
children,
|
|
25
25
|
React.createElement(Button, { styleType: 'high-visibility', onClick: setFilter }, translatedStrings.filter),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { HeaderGroup } from 'react-table';
|
|
3
3
|
import '@itwin/itwinui-css/css/table.css';
|
|
4
|
-
import type {
|
|
4
|
+
import type { CommonProps } from '../../utils/index.js';
|
|
5
5
|
export declare type FilterToggleProps<T extends Record<string, unknown>> = {
|
|
6
6
|
column: HeaderGroup<T>;
|
|
7
|
-
} &
|
|
7
|
+
} & CommonProps;
|
|
8
8
|
/**
|
|
9
9
|
* Handles showing filter icon and opening filter component.
|
|
10
10
|
*/
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import cx from 'classnames';
|
|
7
7
|
import '@itwin/itwinui-css/css/table.css';
|
|
8
|
-
import {
|
|
8
|
+
import { useGlobals, Popover, SvgFilterHollow, SvgFilter, } from '../../utils/index.js';
|
|
9
9
|
import { IconButton } from '../../Buttons/index.js';
|
|
10
10
|
/**
|
|
11
11
|
* Handles showing filter icon and opening filter component.
|
|
12
12
|
*/
|
|
13
13
|
export const FilterToggle = (props) => {
|
|
14
14
|
const { column, className, ...rest } = props;
|
|
15
|
-
|
|
15
|
+
useGlobals();
|
|
16
16
|
const [isVisible, setIsVisible] = React.useState(false);
|
|
17
17
|
const close = React.useCallback(() => setIsVisible(false), []);
|
|
18
18
|
const setFilter = React.useCallback((filterValue) => {
|
|
@@ -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 { useGlobals } from '../../../utils/index.js';
|
|
7
7
|
import { FilterButtonBar } from '../FilterButtonBar.js';
|
|
8
8
|
import { BaseFilter } from '../BaseFilter.js';
|
|
9
9
|
import '@itwin/itwinui-css/css/table.css';
|
|
@@ -15,7 +15,7 @@ const defaultStrings = {
|
|
|
15
15
|
export const NumberRangeFilter = (props) => {
|
|
16
16
|
var _a, _b, _c, _d;
|
|
17
17
|
const { column, translatedLabels, setFilter, clearFilter } = props;
|
|
18
|
-
|
|
18
|
+
useGlobals();
|
|
19
19
|
const translatedStrings = { ...defaultStrings, ...translatedLabels };
|
|
20
20
|
const [from, setFrom] = React.useState((_b = (_a = column.filterValue) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : '');
|
|
21
21
|
const [to, setTo] = React.useState((_d = (_c = column.filterValue) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : '');
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import '@itwin/itwinui-css/css/table.css';
|
|
7
|
-
import {
|
|
7
|
+
import { useGlobals } from '../../../utils/index.js';
|
|
8
8
|
import { Input } from '../../../Input/index.js';
|
|
9
9
|
import { FilterButtonBar } from '../FilterButtonBar.js';
|
|
10
10
|
import { BaseFilter } from '../BaseFilter.js';
|
|
11
11
|
export const TextFilter = (props) => {
|
|
12
12
|
var _a;
|
|
13
13
|
const { column, translatedLabels, setFilter, clearFilter } = props;
|
|
14
|
-
|
|
14
|
+
useGlobals();
|
|
15
15
|
const [text, setText] = React.useState((_a = column.filterValue) !== null && _a !== void 0 ? _a : '');
|
|
16
16
|
const onKeyDown = (event) => {
|
|
17
17
|
if (event.altKey) {
|
package/esm/core/Tabs/Tab.d.ts
CHANGED
|
@@ -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/tabs.css';
|
|
3
|
-
|
|
4
|
+
declare type TabProps = {
|
|
4
5
|
/**
|
|
5
6
|
* The main label shown in the tab.
|
|
6
7
|
*/
|
|
@@ -21,7 +22,13 @@ export declare type TabProps = {
|
|
|
21
22
|
* Custom content appended to the tab.
|
|
22
23
|
*/
|
|
23
24
|
children?: React.ReactNode;
|
|
24
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Whether the tab has active styling.
|
|
27
|
+
*
|
|
28
|
+
* This will be automatically set by the parent `Tabs` component.
|
|
29
|
+
*/
|
|
30
|
+
active?: boolean;
|
|
31
|
+
};
|
|
25
32
|
/**
|
|
26
33
|
* Individual tab component to be used in the `labels` prop of `Tabs`.
|
|
27
34
|
* @example
|
|
@@ -30,5 +37,5 @@ export declare type TabProps = {
|
|
|
30
37
|
* <Tab label='Label 2' startIcon={<SvgPlaceholder />} />,
|
|
31
38
|
* ];
|
|
32
39
|
*/
|
|
33
|
-
export declare const Tab:
|
|
40
|
+
export declare const Tab: PolymorphicForwardRefComponent<"button", TabProps>;
|
|
34
41
|
export default TabProps;
|
package/esm/core/Tabs/Tab.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import {
|
|
7
|
+
import { Box } from '../utils/index.js';
|
|
8
8
|
import '@itwin/itwinui-css/css/tabs.css';
|
|
9
9
|
/**
|
|
10
10
|
* Individual tab component to be used in the `labels` prop of `Tabs`.
|
|
@@ -14,17 +14,12 @@ import '@itwin/itwinui-css/css/tabs.css';
|
|
|
14
14
|
* <Tab label='Label 2' startIcon={<SvgPlaceholder />} />,
|
|
15
15
|
* ];
|
|
16
16
|
*/
|
|
17
|
-
export const Tab = (props) => {
|
|
18
|
-
const { label, sublabel, startIcon, children, className, ...rest } = props;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
React.cloneElement(startIcon, {
|
|
23
|
-
className: 'iui-tab-icon',
|
|
24
|
-
'aria-hidden': true,
|
|
25
|
-
}),
|
|
26
|
-
label && (React.createElement("span", { className: 'iui-tab-label' },
|
|
17
|
+
export const Tab = React.forwardRef((props, forwardedRef) => {
|
|
18
|
+
const { label, sublabel, startIcon, children, active = false, className, ...rest } = props;
|
|
19
|
+
return (React.createElement(Box, { as: 'button', className: cx('iui-tab', { 'iui-active': active }, className), role: 'tab', tabIndex: -1, ref: forwardedRef, ...rest },
|
|
20
|
+
!!startIcon ? (React.createElement(Box, { as: 'span', className: 'iui-tab-icon', "aria-hidden": true }, startIcon)) : null,
|
|
21
|
+
label && (React.createElement(Box, { as: 'span', className: 'iui-tab-label' },
|
|
27
22
|
React.createElement("div", null, label),
|
|
28
|
-
sublabel && React.createElement(
|
|
23
|
+
sublabel && React.createElement(Box, { className: 'iui-tab-description' }, sublabel))),
|
|
29
24
|
children));
|
|
30
|
-
};
|
|
25
|
+
});
|
package/esm/core/Tabs/Tabs.d.ts
CHANGED
|
@@ -103,11 +103,11 @@ export declare type TabsProps = {
|
|
|
103
103
|
/**
|
|
104
104
|
* @deprecated Since v2, use `TabProps` with `Tabs`
|
|
105
105
|
*/
|
|
106
|
-
|
|
106
|
+
declare type HorizontalTabsProps = Omit<TabsProps, 'orientation'>;
|
|
107
107
|
/**
|
|
108
108
|
* @deprecated Since v2, use `TabProps` with `Tabs`
|
|
109
109
|
*/
|
|
110
|
-
|
|
110
|
+
declare type VerticalTabsProps = Omit<TabsProps, 'orientation' | 'type'> & {
|
|
111
111
|
type?: 'default' | 'borderless';
|
|
112
112
|
};
|
|
113
113
|
/**
|
package/esm/core/Tabs/Tabs.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import {
|
|
7
|
+
import { useMergedRefs, getBoundedValue, useContainerWidth, useIsomorphicLayoutEffect, useIsClient, useResizeObserver, Box, } from '../utils/index.js';
|
|
8
8
|
import '@itwin/itwinui-css/css/tabs.css';
|
|
9
9
|
import { Tab } from './Tab.js';
|
|
10
10
|
/**
|
|
@@ -52,7 +52,6 @@ export const Tabs = (props) => {
|
|
|
52
52
|
delete props.overflowOptions;
|
|
53
53
|
}
|
|
54
54
|
const { labels, activeIndex, onTabSelected, focusActivationMode = 'auto', type = 'default', color = 'blue', orientation = 'horizontal', tabsClassName, contentClassName, wrapperClassName, children, ...rest } = props;
|
|
55
|
-
useTheme();
|
|
56
55
|
const isClient = useIsClient();
|
|
57
56
|
const tablistRef = React.useRef(null);
|
|
58
57
|
const [tablistSizeRef, tabsWidth] = useContainerWidth(type !== 'default');
|
|
@@ -336,9 +335,7 @@ export const Tabs = (props) => {
|
|
|
336
335
|
return (React.createElement("li", { key: index }, !React.isValidElement(label) ? (React.createElement(Tab, { label: label, className: cx({
|
|
337
336
|
'iui-active': index === currentActiveIndex,
|
|
338
337
|
}), tabIndex: index === currentActiveIndex ? 0 : -1, onClick: onClick, "aria-selected": index === currentActiveIndex })) : (React.cloneElement(label, {
|
|
339
|
-
|
|
340
|
-
'iui-active': index === currentActiveIndex,
|
|
341
|
-
}),
|
|
338
|
+
active: index === currentActiveIndex,
|
|
342
339
|
'aria-selected': index === currentActiveIndex,
|
|
343
340
|
tabIndex: index === currentActiveIndex ? 0 : -1,
|
|
344
341
|
onClick: (args) => {
|
|
@@ -348,16 +345,16 @@ export const Tabs = (props) => {
|
|
|
348
345
|
},
|
|
349
346
|
}))));
|
|
350
347
|
}, [currentActiveIndex, onTabClick]);
|
|
351
|
-
return (React.createElement(
|
|
352
|
-
React.createElement(
|
|
348
|
+
return (React.createElement(Box, { className: cx('iui-tabs-wrapper', `iui-${orientation}`, wrapperClassName), style: stripeProperties },
|
|
349
|
+
React.createElement(Box, { as: 'ul', className: cx('iui-tabs', `iui-${type}`, {
|
|
353
350
|
'iui-green': color === 'green',
|
|
354
351
|
'iui-animated': type !== 'default' && isClient,
|
|
355
352
|
'iui-not-animated': type !== 'default' && !isClient,
|
|
356
353
|
'iui-large': hasSublabel,
|
|
357
354
|
}, tabsClassName), "data-iui-overflow": overflowOptions === null || overflowOptions === void 0 ? void 0 : overflowOptions.useOverflow, "data-iui-scroll-placement": scrollingPlacement, role: 'tablist', ref: refs, onKeyDown: onKeyDown, ...rest }, labels.map((label, index) => createTab(label, index))),
|
|
358
|
-
actions && (React.createElement(
|
|
359
|
-
React.createElement(
|
|
360
|
-
children && (React.createElement(
|
|
355
|
+
actions && (React.createElement(Box, { className: 'iui-tabs-actions-wrapper' },
|
|
356
|
+
React.createElement(Box, { className: 'iui-tabs-actions' }, actions))),
|
|
357
|
+
children && (React.createElement(Box, { className: cx('iui-tabs-content', contentClassName), role: 'tabpanel' }, children))));
|
|
361
358
|
};
|
|
362
359
|
/**
|
|
363
360
|
* @deprecated Since v2, directly use `Tabs` with `orientation: 'horizontal'`
|
package/esm/core/Tabs/index.d.ts
CHANGED