@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
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import cx from 'classnames';
|
|
7
|
+
import { getFocusableElements, useMergedRefs, useId, useSafeContext, Box, polymorphic, } from '../utils/index.js';
|
|
8
|
+
import { List, ListItem } from '../List/index.js';
|
|
9
|
+
// ----------------------------------------------------------------------------
|
|
10
|
+
// TransferListComponent
|
|
11
|
+
const TransferListComponent = polymorphic('iui-transfer-list-wrapper');
|
|
12
|
+
TransferListComponent.displayName = 'TransferList';
|
|
13
|
+
const TransferListListboxWrapper = React.forwardRef((props, ref) => {
|
|
14
|
+
const { className, children, ...rest } = props;
|
|
15
|
+
const uid = useId();
|
|
16
|
+
const [labelId, setLabelId] = React.useState(uid);
|
|
17
|
+
return (React.createElement(Box, { as: 'div', className: cx('iui-transfer-list-listbox-wrapper', className), ref: ref, ...rest },
|
|
18
|
+
React.createElement(TransferListContext.Provider, { value: { labelId, setLabelId } }, children)));
|
|
19
|
+
});
|
|
20
|
+
TransferListListboxWrapper.displayName = 'TransferList.ListboxWrapper';
|
|
21
|
+
const TransferListListbox = React.forwardRef((props, ref) => {
|
|
22
|
+
const { children, className, ...rest } = props;
|
|
23
|
+
const { labelId } = useSafeContext(TransferListContext);
|
|
24
|
+
const [focusedIndex, setFocusedIndex] = React.useState();
|
|
25
|
+
const listRef = React.useRef(null);
|
|
26
|
+
const refs = useMergedRefs(listRef, ref);
|
|
27
|
+
const getFocusableNodes = React.useCallback(() => {
|
|
28
|
+
const focusableItems = getFocusableElements(listRef.current);
|
|
29
|
+
// Filter out focusable elements that are inside each list item, e.g. checkbox, anchor
|
|
30
|
+
return focusableItems.filter((i) => !focusableItems.some((p) => p.contains(i.parentElement)));
|
|
31
|
+
}, []);
|
|
32
|
+
React.useEffect(() => {
|
|
33
|
+
var _a;
|
|
34
|
+
const items = getFocusableNodes();
|
|
35
|
+
if (focusedIndex != null) {
|
|
36
|
+
(_a = items === null || items === void 0 ? void 0 : items[focusedIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
}, [focusedIndex, getFocusableNodes]);
|
|
40
|
+
const onKeyDown = (event) => {
|
|
41
|
+
if (event.altKey) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const items = getFocusableNodes();
|
|
45
|
+
if (!(items === null || items === void 0 ? void 0 : items.length)) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const currentIndex = focusedIndex !== null && focusedIndex !== void 0 ? focusedIndex : 0;
|
|
49
|
+
switch (event.key) {
|
|
50
|
+
case 'ArrowDown': {
|
|
51
|
+
setFocusedIndex(Math.min(currentIndex + 1, items.length - 1));
|
|
52
|
+
event.preventDefault();
|
|
53
|
+
event.stopPropagation();
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
case 'ArrowUp': {
|
|
57
|
+
setFocusedIndex(Math.max(currentIndex - 1, 0));
|
|
58
|
+
event.preventDefault();
|
|
59
|
+
event.stopPropagation();
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
default:
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
return (React.createElement(List, { className: cx('iui-transfer-list-listbox', className), onKeyDown: onKeyDown, role: 'listbox', "aria-multiselectable": true, "aria-labelledby": labelId, tabIndex: 0, ref: refs, ...rest }, children));
|
|
67
|
+
});
|
|
68
|
+
TransferListListbox.displayName = 'TransferList.Listbox';
|
|
69
|
+
const TransferListItem = React.forwardRef((props, ref) => {
|
|
70
|
+
const { actionable = true, disabled, onActiveChange, children, active, ...rest } = props;
|
|
71
|
+
const onClickEvents = () => actionable && onActiveChange && onActiveChange(!active);
|
|
72
|
+
const onKeyDown = (event) => {
|
|
73
|
+
if (event.altKey) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
if (event.key === 'Enter' ||
|
|
77
|
+
event.key === ' ' ||
|
|
78
|
+
event.key === 'Spacebar') {
|
|
79
|
+
!disabled && onClickEvents();
|
|
80
|
+
event.preventDefault();
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
return (React.createElement(ListItem, { ref: ref, onClick: onClickEvents, onKeyDown: onKeyDown, active: active, actionable: actionable, tabIndex: -1, role: 'option', "aria-disabled": disabled ? 'true' : undefined, "aria-selected": active ? 'true' : undefined, disabled: disabled, ...rest }, children));
|
|
84
|
+
});
|
|
85
|
+
TransferListItem.displayName = 'TransferList.Item';
|
|
86
|
+
const TransferListListboxLabel = React.forwardRef((props, ref) => {
|
|
87
|
+
const { children, className, id, ...rest } = props;
|
|
88
|
+
const { labelId, setLabelId } = useSafeContext(TransferListContext);
|
|
89
|
+
React.useEffect(() => {
|
|
90
|
+
if (id && id !== labelId) {
|
|
91
|
+
setLabelId(id);
|
|
92
|
+
}
|
|
93
|
+
}, [id, labelId, setLabelId]);
|
|
94
|
+
return (React.createElement(Box, { as: 'div', className: cx('iui-transfer-list-listbox-label', className), id: labelId, ref: ref, ...rest }, children));
|
|
95
|
+
});
|
|
96
|
+
TransferListListboxLabel.displayName = 'TransferList.ListboxLabel';
|
|
97
|
+
// ----------------------------------------------------------------------------
|
|
98
|
+
// TransferList.Toolbar component
|
|
99
|
+
const TransferListToolbar = polymorphic('iui-transfer-list-toolbar', {
|
|
100
|
+
role: 'toolbar',
|
|
101
|
+
});
|
|
102
|
+
TransferListToolbar.displayName = 'TransferList.Toolbar';
|
|
103
|
+
/**
|
|
104
|
+
* The TransferList component is used to display a list within a box
|
|
105
|
+
* @example
|
|
106
|
+
* <TransferList>
|
|
107
|
+
* <TransferList.ListboxWrapper>
|
|
108
|
+
* <TransferList.Listbox>
|
|
109
|
+
* <TransferList.Item>Item 1</TransferList.Item>
|
|
110
|
+
* <TransferList.Item>Item 2</TransferList.Item>
|
|
111
|
+
* <TransferList.Item>Item 3</TransferList.Item>
|
|
112
|
+
* <TransferList.Item>Item 4</TransferList.Item>
|
|
113
|
+
* <TransferList.Item>Item 5</TransferList.Item>
|
|
114
|
+
* <TransferList.Item>Item 6</TransferList.Item>
|
|
115
|
+
* </TransferList.Listbox>
|
|
116
|
+
* </TransferList.ListboxWrapper>
|
|
117
|
+
* </TransferList>
|
|
118
|
+
*/
|
|
119
|
+
export const TransferList = Object.assign(TransferListComponent, {
|
|
120
|
+
/**
|
|
121
|
+
* TransferList listbox wrapper subcomponent
|
|
122
|
+
*/
|
|
123
|
+
ListboxWrapper: TransferListListboxWrapper,
|
|
124
|
+
/**
|
|
125
|
+
* TransferList listbox subcomponent
|
|
126
|
+
*/
|
|
127
|
+
Listbox: TransferListListbox,
|
|
128
|
+
/**
|
|
129
|
+
* TransferList item subcomponent
|
|
130
|
+
*/
|
|
131
|
+
Item: TransferListItem,
|
|
132
|
+
/**
|
|
133
|
+
* TransferList listbox label subcomponent
|
|
134
|
+
*/
|
|
135
|
+
ListboxLabel: TransferListListboxLabel,
|
|
136
|
+
/**
|
|
137
|
+
* TransferList toolbar subcomponent
|
|
138
|
+
*/
|
|
139
|
+
Toolbar: TransferListToolbar,
|
|
140
|
+
});
|
|
141
|
+
export const TransferListContext = React.createContext(undefined);
|
|
142
|
+
export default TransferList;
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {
|
|
6
|
-
export default './
|
|
5
|
+
export { TransferList } from './TransferList.js';
|
|
6
|
+
export default './TransferList';
|
package/esm/core/Tree/Tree.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { CommonProps } from '../utils/index.js';
|
|
3
|
-
import '@itwin/itwinui-css/css/tree.css';
|
|
4
3
|
export declare type NodeData<T> = {
|
|
5
4
|
/**
|
|
6
5
|
* Array of the child nodes contained in the node.
|
|
@@ -77,7 +76,7 @@ export declare type TreeProps<T> = {
|
|
|
77
76
|
* @beta
|
|
78
77
|
*/
|
|
79
78
|
enableVirtualization?: boolean;
|
|
80
|
-
} &
|
|
79
|
+
} & CommonProps;
|
|
81
80
|
/**
|
|
82
81
|
* Tree component used to display a hierarchical structure of `TreeNodes`.
|
|
83
82
|
* User should control state of expanded, selected and disabled nodes using `getNode` prop.
|
package/esm/core/Tree/Tree.js
CHANGED
|
@@ -3,8 +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 {
|
|
7
|
-
import '@itwin/itwinui-css/css/tree.css';
|
|
6
|
+
import { getFocusableElements, useVirtualization, mergeRefs, Box, polymorphic, } from '../utils/index.js';
|
|
8
7
|
import cx from 'classnames';
|
|
9
8
|
import { TreeContext } from './TreeContext.js';
|
|
10
9
|
/**
|
|
@@ -59,7 +58,6 @@ import { TreeContext } from './TreeContext.js';
|
|
|
59
58
|
*/
|
|
60
59
|
export const Tree = (props) => {
|
|
61
60
|
const { data, className, nodeRenderer, getNode, enableVirtualization = false, style, ...rest } = props;
|
|
62
|
-
useTheme();
|
|
63
61
|
const treeRef = React.useRef(null);
|
|
64
62
|
const focusedIndex = React.useRef(0);
|
|
65
63
|
React.useEffect(() => {
|
|
@@ -179,8 +177,9 @@ export const Tree = (props) => {
|
|
|
179
177
|
};
|
|
180
178
|
return (React.createElement(React.Fragment, null, enableVirtualization ? (React.createElement(VirtualizedTree, { flatNodesList: flatNodesList, itemRenderer: itemRenderer, scrollToIndex: scrollToIndex, onFocus: handleFocus, onKeyDown: handleKeyDown, ref: treeRef, className: className, style: style, ...rest })) : (React.createElement(TreeElement, { onKeyDown: handleKeyDown, onFocus: handleFocus, className: className, style: style, ref: treeRef, ...rest }, flatNodesList.map((_, i) => itemRenderer(i))))));
|
|
181
179
|
};
|
|
182
|
-
const TreeElement =
|
|
183
|
-
|
|
180
|
+
const TreeElement = polymorphic.ul('iui-tree', {
|
|
181
|
+
role: 'tree',
|
|
182
|
+
tabIndex: 0,
|
|
184
183
|
});
|
|
185
184
|
// Having virtualized tree separately prevents from running all virtualization logic
|
|
186
185
|
const VirtualizedTree = React.forwardRef(({ flatNodesList, itemRenderer, scrollToIndex, className, style, ...rest }, ref) => {
|
|
@@ -189,7 +188,7 @@ const VirtualizedTree = React.forwardRef(({ flatNodesList, itemRenderer, scrollT
|
|
|
189
188
|
itemRenderer: itemRenderer,
|
|
190
189
|
scrollToIndex,
|
|
191
190
|
});
|
|
192
|
-
return (React.createElement(
|
|
191
|
+
return (React.createElement(Box, { ...{
|
|
193
192
|
...outerProps,
|
|
194
193
|
className: cx(className, outerProps.className),
|
|
195
194
|
style: { ...style, ...outerProps.style },
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { CommonProps } from '../utils/index.js';
|
|
3
|
-
|
|
4
|
-
export declare type TreeNodeProps = {
|
|
3
|
+
declare type TreeNodeProps = {
|
|
5
4
|
/**
|
|
6
5
|
* Unique id of the node.
|
|
7
6
|
* It has to be compatible with HTML id attribute.
|
|
@@ -3,8 +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 { getFocusableElements,
|
|
7
|
-
import '@itwin/itwinui-css/css/tree.css';
|
|
6
|
+
import { getFocusableElements, Box } from '../utils/index.js';
|
|
8
7
|
import cx from 'classnames';
|
|
9
8
|
import { TreeNodeExpander } from './TreeNodeExpander.js';
|
|
10
9
|
import { useTreeContext } from './TreeContext.js';
|
|
@@ -29,7 +28,6 @@ import { useTreeContext } from './TreeContext.js';
|
|
|
29
28
|
*/
|
|
30
29
|
export const TreeNode = (props) => {
|
|
31
30
|
const { nodeId, label, sublabel, children, className, icon, hasSubNodes = false, isDisabled = false, isExpanded = false, isSelected = false, onSelected, onExpanded, checkbox, expander, ...rest } = props;
|
|
32
|
-
useTheme();
|
|
33
31
|
const { nodeDepth, subNodeIds = [], parentNodeId, scrollToParent, groupSize, indexInGroup, } = useTreeContext();
|
|
34
32
|
const [isFocused, setIsFocused] = React.useState(false);
|
|
35
33
|
const nodeRef = React.useRef(null);
|
|
@@ -103,34 +101,30 @@ export const TreeNode = (props) => {
|
|
|
103
101
|
onExpanded(nodeId, !isExpanded);
|
|
104
102
|
event.stopPropagation();
|
|
105
103
|
}, [isExpanded, nodeId, onExpanded]);
|
|
106
|
-
return (React.createElement(
|
|
104
|
+
return (React.createElement(Box, { as: 'li', role: 'treeitem', className: cx('iui-tree-item', className), id: nodeId, "aria-expanded": hasSubNodes ? isExpanded : undefined, "aria-disabled": isDisabled, "aria-selected": isSelected, "aria-level": nodeDepth + 1, "aria-setsize": groupSize, "aria-posinset": indexInGroup + 1, tabIndex: -1, onFocus: (e) => {
|
|
107
105
|
setIsFocused(true);
|
|
108
106
|
// Prevents from triggering onFocus on parent Tree
|
|
109
107
|
e.stopPropagation();
|
|
110
108
|
}, onBlur: () => {
|
|
111
109
|
setIsFocused(false);
|
|
112
110
|
}, ref: nodeRef, onKeyDown: onKeyDown, ...rest },
|
|
113
|
-
React.createElement(
|
|
111
|
+
React.createElement(Box, { className: cx('iui-tree-node', {
|
|
114
112
|
'iui-active': isSelected,
|
|
115
113
|
'iui-disabled': isDisabled,
|
|
116
114
|
}), style: { '--level': nodeDepth }, onClick: () => !isDisabled && (onSelected === null || onSelected === void 0 ? void 0 : onSelected(nodeId, !isSelected)) },
|
|
117
|
-
checkbox && React.isValidElement(checkbox)
|
|
115
|
+
checkbox && (React.createElement(Box, { className: 'iui-tree-node-checkbox' }, React.isValidElement(checkbox)
|
|
118
116
|
? React.cloneElement(checkbox, {
|
|
119
|
-
className: cx('iui-tree-node-checkbox', checkbox.props.className),
|
|
120
117
|
tabIndex: isFocused ? 0 : -1,
|
|
121
118
|
})
|
|
122
|
-
: checkbox,
|
|
123
|
-
React.createElement(
|
|
119
|
+
: checkbox)),
|
|
120
|
+
React.createElement(Box, { className: 'iui-tree-node-content' },
|
|
124
121
|
hasSubNodes && expander,
|
|
125
122
|
hasSubNodes && !expander && (React.createElement(TreeNodeExpander, { isExpanded: isExpanded, disabled: isDisabled, onClick: onExpanderClick, tabIndex: isFocused ? 0 : -1 })),
|
|
126
|
-
icon &&
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}),
|
|
130
|
-
React.createElement("span", { className: 'iui-tree-node-content-label' },
|
|
131
|
-
React.createElement("div", { className: 'iui-tree-node-content-title' }, label),
|
|
132
|
-
sublabel && (React.createElement("div", { className: 'iui-tree-node-content-caption' }, sublabel))),
|
|
123
|
+
icon && (React.createElement(Box, { as: 'span', className: 'iui-tree-node-content-icon', "aria-hidden": true }, icon)),
|
|
124
|
+
React.createElement(Box, { className: 'iui-tree-node-content-label' },
|
|
125
|
+
React.createElement(Box, { className: 'iui-tree-node-content-title' }, label),
|
|
126
|
+
sublabel && (React.createElement(Box, { className: 'iui-tree-node-content-caption' }, sublabel))),
|
|
133
127
|
children)),
|
|
134
|
-
hasSubNodes && (React.createElement(
|
|
128
|
+
hasSubNodes && (React.createElement(Box, { as: 'ul', className: 'iui-sub-tree', role: 'group', "aria-owns": subNodeIds.join(',') }))));
|
|
135
129
|
};
|
|
136
130
|
export default TreeNode;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type { IconButtonProps } from '../Buttons/IconButton/
|
|
3
|
-
|
|
4
|
-
export declare type TreeNodeExpanderProps = {
|
|
1
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
2
|
+
import type { IconButtonProps } from '../Buttons/IconButton/IconButton.js';
|
|
3
|
+
declare type TreeNodeExpanderProps = {
|
|
5
4
|
isExpanded?: boolean;
|
|
6
5
|
} & IconButtonProps;
|
|
7
|
-
export declare const TreeNodeExpander:
|
|
6
|
+
export declare const TreeNodeExpander: PolymorphicForwardRefComponent<"button", TreeNodeExpanderProps>;
|
|
8
7
|
export default TreeNodeExpander;
|
|
@@ -6,12 +6,11 @@ import * as React from 'react';
|
|
|
6
6
|
import cx from 'classnames';
|
|
7
7
|
import { SvgChevronRight } from '../utils/index.js';
|
|
8
8
|
import { IconButton } from '../Buttons/IconButton/index.js';
|
|
9
|
-
|
|
10
|
-
export const TreeNodeExpander = (props) => {
|
|
9
|
+
export const TreeNodeExpander = React.forwardRef((props, ref) => {
|
|
11
10
|
const { isExpanded, ...rest } = props;
|
|
12
|
-
return (React.createElement(IconButton, { styleType: 'borderless', size: 'small', "aria-label": isExpanded ? 'Collapse' : 'Expand', ...rest },
|
|
11
|
+
return (React.createElement(IconButton, { styleType: 'borderless', size: 'small', "aria-label": isExpanded ? 'Collapse' : 'Expand', ref: ref, ...rest },
|
|
13
12
|
React.createElement(SvgChevronRight, { className: cx('iui-tree-node-content-expander-icon', {
|
|
14
13
|
'iui-tree-node-content-expander-icon-expanded': isExpanded,
|
|
15
14
|
}) })));
|
|
16
|
-
};
|
|
15
|
+
});
|
|
17
16
|
export default TreeNodeExpander;
|
package/esm/core/Tree/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export { Tree } from './Tree.js';
|
|
2
|
-
export type {
|
|
2
|
+
export type { NodeData, NodeRenderProps } from './Tree.js';
|
|
3
3
|
export { TreeNode } from './TreeNode.js';
|
|
4
|
-
export type { TreeNodeProps } from './TreeNode.js';
|
|
5
4
|
export { TreeNodeExpander } from './TreeNodeExpander.js';
|
|
6
|
-
export type { TreeNodeExpanderProps } from './TreeNodeExpander.js';
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { PolymorphicComponentProps, PolymorphicForwardRefComponent } from '../../utils/index.js';
|
|
3
|
-
import '@itwin/itwinui-css/css/anchor.css';
|
|
4
|
-
declare type AnchorOwnProps = Record<never, never>;
|
|
5
|
-
export declare type AnchorProps<T extends React.ElementType = 'a'> = PolymorphicComponentProps<T, AnchorOwnProps>;
|
|
6
1
|
/**
|
|
7
2
|
* A consistently styled anchor component.
|
|
8
3
|
*
|
|
@@ -17,5 +12,5 @@ export declare type AnchorProps<T extends React.ElementType = 'a'> = Polymorphic
|
|
|
17
12
|
* <Anchor as={Link} to='/'>Home</Anchor>
|
|
18
13
|
* <Anchor as='button' onClick={() => {}}>click me</Anchor>
|
|
19
14
|
*/
|
|
20
|
-
export declare const Anchor: PolymorphicForwardRefComponent<"a",
|
|
15
|
+
export declare const Anchor: import("../../utils/props.js").PolymorphicForwardRefComponent<"a", {}>;
|
|
21
16
|
export default Anchor;
|
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import
|
|
6
|
-
import cx from 'classnames';
|
|
7
|
-
import { useTheme } from '../../utils/index.js';
|
|
8
|
-
import '@itwin/itwinui-css/css/anchor.css';
|
|
5
|
+
import { polymorphic } from '../../utils/index.js';
|
|
9
6
|
/**
|
|
10
7
|
* A consistently styled anchor component.
|
|
11
8
|
*
|
|
@@ -20,9 +17,5 @@ import '@itwin/itwinui-css/css/anchor.css';
|
|
|
20
17
|
* <Anchor as={Link} to='/'>Home</Anchor>
|
|
21
18
|
* <Anchor as='button' onClick={() => {}}>click me</Anchor>
|
|
22
19
|
*/
|
|
23
|
-
export const Anchor =
|
|
24
|
-
const { as: Element = 'a', className, ...rest } = props;
|
|
25
|
-
useTheme();
|
|
26
|
-
return (React.createElement(Element, { className: cx('iui-anchor', className), ref: ref, ...rest }));
|
|
27
|
-
});
|
|
20
|
+
export const Anchor = polymorphic.a('iui-anchor');
|
|
28
21
|
export default Anchor;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import '
|
|
3
|
-
|
|
2
|
+
import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
|
|
3
|
+
declare type BlockquoteProps = {
|
|
4
4
|
/**
|
|
5
5
|
* Optional footer for any attribution/source.
|
|
6
6
|
*/
|
|
7
7
|
footer?: React.ReactNode;
|
|
8
|
-
}
|
|
8
|
+
};
|
|
9
9
|
/**
|
|
10
10
|
* Basic blockquote component
|
|
11
11
|
* @example
|
|
@@ -14,10 +14,5 @@ export declare type BlockquoteProps = {
|
|
|
14
14
|
* <p>This is a quote from someone</p>
|
|
15
15
|
* </Blockquote>
|
|
16
16
|
*/
|
|
17
|
-
export declare const Blockquote:
|
|
18
|
-
/**
|
|
19
|
-
* Optional footer for any attribution/source.
|
|
20
|
-
*/
|
|
21
|
-
footer?: React.ReactNode;
|
|
22
|
-
} & React.BlockquoteHTMLAttributes<HTMLQuoteElement> & React.RefAttributes<HTMLQuoteElement>>;
|
|
17
|
+
export declare const Blockquote: PolymorphicForwardRefComponent<"blockquote", BlockquoteProps>;
|
|
23
18
|
export default Blockquote;
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import {
|
|
8
|
-
import '@itwin/itwinui-css/css/blockquote.css';
|
|
7
|
+
import { Box } from '../../utils/index.js';
|
|
9
8
|
/**
|
|
10
9
|
* Basic blockquote component
|
|
11
10
|
* @example
|
|
@@ -16,8 +15,7 @@ import '@itwin/itwinui-css/css/blockquote.css';
|
|
|
16
15
|
*/
|
|
17
16
|
export const Blockquote = React.forwardRef((props, ref) => {
|
|
18
17
|
const { className, children, footer, ...rest } = props;
|
|
19
|
-
|
|
20
|
-
return (React.createElement("blockquote", { className: cx('iui-blockquote', className), ref: ref, ...rest },
|
|
18
|
+
return (React.createElement(Box, { as: 'blockquote', className: cx('iui-blockquote', className), ref: ref, ...rest },
|
|
21
19
|
children,
|
|
22
20
|
footer && React.createElement("footer", null, footer)));
|
|
23
21
|
});
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import type { CommonProps } from '../../utils/index.js';
|
|
3
|
-
import '@itwin/itwinui-css/css/code.css';
|
|
4
|
-
export declare type CodeProps = {
|
|
5
|
-
/**
|
|
6
|
-
* A piece of inline code.
|
|
7
|
-
*/
|
|
8
|
-
children: React.ReactNode;
|
|
9
|
-
} & CommonProps;
|
|
10
1
|
/**
|
|
11
2
|
* Inline code element.
|
|
12
3
|
* @example
|
|
13
4
|
* <p>Some <Code>inline code</Code> in a paragraph</p>
|
|
14
5
|
*/
|
|
15
|
-
export declare const Code: (props
|
|
6
|
+
export declare const Code: import("../../utils/props.js").PolymorphicForwardRefComponent<"code", {}>;
|
|
16
7
|
export default Code;
|
|
@@ -2,18 +2,11 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import
|
|
6
|
-
import * as React from 'react';
|
|
7
|
-
import { useTheme } from '../../utils/index.js';
|
|
8
|
-
import '@itwin/itwinui-css/css/code.css';
|
|
5
|
+
import { polymorphic } from '../../utils/index.js';
|
|
9
6
|
/**
|
|
10
7
|
* Inline code element.
|
|
11
8
|
* @example
|
|
12
9
|
* <p>Some <Code>inline code</Code> in a paragraph</p>
|
|
13
10
|
*/
|
|
14
|
-
export const Code = (
|
|
15
|
-
const { className, children, ...rest } = props;
|
|
16
|
-
useTheme();
|
|
17
|
-
return (React.createElement("code", { className: cx('iui-code', className), ...rest }, children));
|
|
18
|
-
};
|
|
11
|
+
export const Code = polymorphic.code('iui-code');
|
|
19
12
|
export default Code;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import type { CommonProps } from '../../utils/index.js';
|
|
3
|
-
import '@itwin/itwinui-css/css/keyboard.css';
|
|
1
|
+
import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
|
|
4
2
|
/**
|
|
5
3
|
* Some predefined strings for common keyboard keys.
|
|
6
4
|
*/
|
|
@@ -19,17 +17,17 @@ export declare const KbdKeys: {
|
|
|
19
17
|
readonly Right: "→";
|
|
20
18
|
readonly Down: "↓";
|
|
21
19
|
};
|
|
22
|
-
|
|
20
|
+
declare type KbdProps = {
|
|
23
21
|
/**
|
|
24
22
|
* Content of the key to be passed as children. Must be a string or one of the `KbdKeys`.
|
|
25
23
|
*/
|
|
26
24
|
children: string;
|
|
27
|
-
}
|
|
25
|
+
};
|
|
28
26
|
/**
|
|
29
27
|
* A keyboard key element.
|
|
30
28
|
* @example
|
|
31
29
|
* <Kbd>A</Kbd>
|
|
32
30
|
* <Kbd title='Enter'>{KbdKeys.Enter}</Kbd>
|
|
33
31
|
*/
|
|
34
|
-
export declare const Kbd:
|
|
32
|
+
export declare const Kbd: PolymorphicForwardRefComponent<"kbd", KbdProps>;
|
|
35
33
|
export default Kbd;
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import {
|
|
8
|
-
import '@itwin/itwinui-css/css/keyboard.css';
|
|
7
|
+
import { Box } from '../../utils/index.js';
|
|
9
8
|
/**
|
|
10
9
|
* Some predefined strings for common keyboard keys.
|
|
11
10
|
*/
|
|
@@ -30,9 +29,8 @@ export const KbdKeys = {
|
|
|
30
29
|
* <Kbd>A</Kbd>
|
|
31
30
|
* <Kbd title='Enter'>{KbdKeys.Enter}</Kbd>
|
|
32
31
|
*/
|
|
33
|
-
export const Kbd = (props) => {
|
|
32
|
+
export const Kbd = React.forwardRef((props, forwardedRef) => {
|
|
34
33
|
const { className, children, ...rest } = props;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
};
|
|
34
|
+
return (React.createElement(Box, { as: 'kbd', className: cx('iui-keyboard', className), ref: forwardedRef, ...rest }, children));
|
|
35
|
+
});
|
|
38
36
|
export default Kbd;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import '@itwin/itwinui-css/css/text.css';
|
|
4
|
-
declare type TextOwnProps = {
|
|
1
|
+
import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
|
|
2
|
+
declare type TextProps = {
|
|
5
3
|
/**
|
|
6
4
|
* Which typography variant/size should be used for the styling?
|
|
7
5
|
*
|
|
@@ -26,8 +24,6 @@ declare type TextOwnProps = {
|
|
|
26
24
|
*/
|
|
27
25
|
isSkeleton?: boolean;
|
|
28
26
|
};
|
|
29
|
-
export declare type TextProps<T extends React.ElementType = 'div'> = PolymorphicComponentProps<T, TextOwnProps>;
|
|
30
|
-
declare type TextComponent = PolymorphicForwardRefComponent<'div', TextOwnProps>;
|
|
31
27
|
/**
|
|
32
28
|
* Polymorphic typography component to render any kind of text as any kind of element.
|
|
33
29
|
* Users should decide which element to render based on the context of their app. Link to heading levels docs: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements#accessibility_concerns
|
|
@@ -40,5 +36,5 @@ declare type TextComponent = PolymorphicForwardRefComponent<'div', TextOwnProps>
|
|
|
40
36
|
* <Text isMuted>Some muted text.</Text>
|
|
41
37
|
* <Text isSkeleton>Skeleton text</Text>
|
|
42
38
|
*/
|
|
43
|
-
export declare const Text:
|
|
39
|
+
export declare const Text: PolymorphicForwardRefComponent<"div", TextProps>;
|
|
44
40
|
export default Text;
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import {
|
|
8
|
-
import '@itwin/itwinui-css/css/text.css';
|
|
7
|
+
import { Box } from '../../utils/index.js';
|
|
9
8
|
/**
|
|
10
9
|
* Polymorphic typography component to render any kind of text as any kind of element.
|
|
11
10
|
* Users should decide which element to render based on the context of their app. Link to heading levels docs: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements#accessibility_concerns
|
|
@@ -19,9 +18,8 @@ import '@itwin/itwinui-css/css/text.css';
|
|
|
19
18
|
* <Text isSkeleton>Skeleton text</Text>
|
|
20
19
|
*/
|
|
21
20
|
export const Text = React.forwardRef((props, ref) => {
|
|
22
|
-
const { variant = 'body',
|
|
23
|
-
|
|
24
|
-
return (React.createElement(Element, { className: cx({
|
|
21
|
+
const { variant = 'body', className, isMuted = false, isSkeleton = false, ...rest } = props;
|
|
22
|
+
return (React.createElement(Box, { className: cx({
|
|
25
23
|
[`iui-text-${variant}`]: variant !== 'body',
|
|
26
24
|
'iui-text-block': variant === 'body',
|
|
27
25
|
'iui-text-muted': isMuted,
|
|
@@ -1,22 +1,5 @@
|
|
|
1
1
|
export { Anchor } from './Anchor/index.js';
|
|
2
|
-
export type { AnchorProps } from './Anchor/index.js';
|
|
3
|
-
export { Headline } from './Headline/index.js';
|
|
4
|
-
export type { HeadlineProps } from './Headline/index.js';
|
|
5
|
-
export { Title } from './Title/index.js';
|
|
6
|
-
export type { TitleProps } from './Title/index.js';
|
|
7
|
-
export { Subheading } from './Subheading/index.js';
|
|
8
|
-
export type { SubheadingProps } from './Subheading/index.js';
|
|
9
|
-
export { Leading } from './Leading/index.js';
|
|
10
|
-
export type { LeadingProps } from './Leading/index.js';
|
|
11
|
-
export { Body } from './Body/index.js';
|
|
12
|
-
export type { BodyProps } from './Body/index.js';
|
|
13
|
-
export { Small } from './Small/index.js';
|
|
14
|
-
export type { SmallProps } from './Small/index.js';
|
|
15
2
|
export { Blockquote } from './Blockquote/index.js';
|
|
16
|
-
export type { BlockquoteProps } from './Blockquote/index.js';
|
|
17
3
|
export { Code } from './Code/index.js';
|
|
18
|
-
export type { CodeProps } from './Code/index.js';
|
|
19
4
|
export { Kbd, KbdKeys } from './Kbd/index.js';
|
|
20
|
-
export type { KbdProps } from './Kbd/index.js';
|
|
21
5
|
export { Text } from './Text/index.js';
|
|
22
|
-
export type { TextProps } from './Text/index.js';
|
|
@@ -3,12 +3,6 @@
|
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
export { Anchor } from './Anchor/index.js';
|
|
6
|
-
export { Headline } from './Headline/index.js';
|
|
7
|
-
export { Title } from './Title/index.js';
|
|
8
|
-
export { Subheading } from './Subheading/index.js';
|
|
9
|
-
export { Leading } from './Leading/index.js';
|
|
10
|
-
export { Body } from './Body/index.js';
|
|
11
|
-
export { Small } from './Small/index.js';
|
|
12
6
|
export { Blockquote } from './Blockquote/index.js';
|
|
13
7
|
export { Code } from './Code/index.js';
|
|
14
8
|
export { Kbd, KbdKeys } from './Kbd/index.js';
|