@itwin/itwinui-react 2.11.4 → 3.0.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/README.md +2 -2
- package/cjs/core/Alert/Alert.d.ts +4 -4
- package/cjs/core/Alert/Alert.js +8 -10
- package/cjs/core/Alert/index.d.ts +0 -1
- package/cjs/core/Avatar/Avatar.d.ts +6 -14
- package/cjs/core/Avatar/Avatar.js +6 -8
- package/cjs/core/Avatar/index.d.ts +0 -1
- package/cjs/core/AvatarGroup/AvatarGroup.d.ts +5 -9
- package/cjs/core/AvatarGroup/AvatarGroup.js +14 -17
- package/cjs/core/AvatarGroup/index.d.ts +0 -1
- package/cjs/core/Backdrop/Backdrop.d.ts +3 -3
- package/cjs/core/Backdrop/Backdrop.js +1 -2
- package/cjs/core/Backdrop/index.d.ts +0 -1
- package/cjs/core/Badge/Badge.d.ts +4 -6
- package/cjs/core/Badge/Badge.js +3 -5
- package/cjs/core/Badge/index.d.ts +0 -1
- package/cjs/core/Breadcrumbs/Breadcrumbs.d.ts +4 -77
- package/cjs/core/Breadcrumbs/Breadcrumbs.js +5 -6
- package/cjs/core/Breadcrumbs/index.d.ts +0 -1
- package/cjs/core/ButtonGroup/ButtonGroup.d.ts +4 -3
- package/cjs/core/ButtonGroup/ButtonGroup.js +15 -13
- package/cjs/core/ButtonGroup/index.d.ts +0 -1
- package/cjs/core/Buttons/Button/Button.d.ts +4 -10
- package/cjs/core/Buttons/Button/Button.js +4 -5
- package/cjs/core/Buttons/Button/index.d.ts +0 -1
- package/cjs/core/Buttons/DropdownButton/DropdownButton.d.ts +5 -21
- package/cjs/core/Buttons/DropdownButton/DropdownButton.js +0 -1
- package/cjs/core/Buttons/DropdownButton/index.d.ts +0 -1
- package/cjs/core/Buttons/IconButton/IconButton.d.ts +2 -3
- package/cjs/core/Buttons/IconButton/IconButton.js +4 -5
- package/cjs/core/Buttons/IconButton/index.d.ts +0 -1
- package/cjs/core/Buttons/IdeasButton/IdeasButton.d.ts +3 -3
- package/cjs/core/Buttons/IdeasButton/IdeasButton.js +0 -1
- package/cjs/core/Buttons/IdeasButton/index.d.ts +0 -1
- package/cjs/core/Buttons/SplitButton/SplitButton.d.ts +2 -3
- package/cjs/core/Buttons/SplitButton/SplitButton.js +1 -2
- package/cjs/core/Buttons/SplitButton/index.d.ts +0 -1
- package/cjs/core/Buttons/index.d.ts +0 -5
- package/cjs/core/Carousel/Carousel.d.ts +24 -26
- package/cjs/core/Carousel/Carousel.js +22 -22
- package/cjs/core/Carousel/CarouselDot.d.ts +11 -9
- package/cjs/core/Carousel/CarouselDot.js +2 -1
- package/cjs/core/Carousel/CarouselDotsList.d.ts +11 -9
- package/cjs/core/Carousel/CarouselDotsList.js +1 -2
- package/cjs/core/Carousel/CarouselNavigation.d.ts +14 -5
- package/cjs/core/Carousel/CarouselNavigation.js +13 -9
- package/cjs/core/Carousel/CarouselSlide.d.ts +10 -8
- package/cjs/core/Carousel/CarouselSlide.js +1 -1
- package/cjs/core/Carousel/CarouselSlider.d.ts +2 -2
- package/cjs/core/Carousel/CarouselSlider.js +1 -1
- package/cjs/core/Carousel/index.d.ts +0 -1
- package/cjs/core/Checkbox/Checkbox.d.ts +4 -31
- package/cjs/core/Checkbox/Checkbox.js +3 -4
- package/cjs/core/Checkbox/index.d.ts +0 -1
- package/cjs/core/ColorPicker/ColorBuilder.d.ts +2 -4
- package/cjs/core/ColorPicker/ColorBuilder.js +3 -4
- package/cjs/core/ColorPicker/ColorInputPanel.d.ts +4 -18
- package/cjs/core/ColorPicker/ColorInputPanel.js +4 -5
- package/cjs/core/ColorPicker/ColorPalette.d.ts +3 -16
- package/cjs/core/ColorPicker/ColorPalette.js +3 -4
- package/cjs/core/ColorPicker/ColorPicker.d.ts +4 -4
- package/cjs/core/ColorPicker/ColorPicker.js +3 -5
- package/cjs/core/ColorPicker/ColorSwatch.d.ts +4 -5
- package/cjs/core/ColorPicker/ColorSwatch.js +1 -2
- package/cjs/core/ColorPicker/index.d.ts +0 -5
- package/cjs/core/ComboBox/ComboBox.d.ts +4 -4
- package/cjs/core/ComboBox/ComboBox.js +5 -7
- package/cjs/core/ComboBox/ComboBoxDropdown.d.ts +3 -3
- package/cjs/core/ComboBox/ComboBoxEndIcon.d.ts +7 -5
- package/cjs/core/ComboBox/ComboBoxEndIcon.js +1 -1
- package/cjs/core/ComboBox/ComboBoxInput.d.ts +7 -6
- package/cjs/core/ComboBox/ComboBoxInputContainer.d.ts +3 -7
- package/cjs/core/ComboBox/ComboBoxInputContainer.js +4 -5
- package/cjs/core/ComboBox/ComboBoxMenu.d.ts +5 -2
- package/cjs/core/ComboBox/ComboBoxMenu.js +2 -2
- package/cjs/core/ComboBox/ComboBoxMenuItem.d.ts +6 -19
- package/cjs/core/ComboBox/ComboBoxMenuItem.js +8 -22
- package/cjs/core/ComboBox/ComboBoxMultipleContainer.d.ts +6 -3
- package/cjs/core/ComboBox/index.d.ts +0 -1
- package/cjs/core/DatePicker/DatePicker.d.ts +4 -4
- package/cjs/core/DatePicker/DatePicker.js +9 -11
- package/cjs/core/DatePicker/index.d.ts +0 -1
- package/cjs/core/Dialog/Dialog.d.ts +13 -9
- package/cjs/core/Dialog/Dialog.js +21 -22
- package/cjs/core/Dialog/DialogBackdrop.d.ts +4 -4
- package/cjs/core/Dialog/DialogBackdrop.js +1 -3
- package/cjs/core/Dialog/DialogButtonBar.d.ts +1 -8
- package/cjs/core/Dialog/DialogButtonBar.js +1 -33
- package/cjs/core/Dialog/DialogContent.d.ts +1 -8
- package/cjs/core/Dialog/DialogContent.js +1 -33
- package/cjs/core/Dialog/DialogMain.d.ts +3 -2
- package/cjs/core/Dialog/DialogMain.js +1 -2
- package/cjs/core/Dialog/DialogTitleBar.d.ts +5 -4
- package/cjs/core/Dialog/DialogTitleBar.js +1 -2
- package/cjs/core/Dialog/DialogTitleBarTitle.d.ts +1 -8
- package/cjs/core/Dialog/DialogTitleBarTitle.js +1 -33
- package/cjs/core/Dialog/index.d.ts +0 -5
- package/cjs/core/DropdownMenu/DropdownMenu.js +0 -1
- package/cjs/core/ExpandableBlock/ExpandableBlock.d.ts +4 -4
- package/cjs/core/ExpandableBlock/ExpandableBlock.js +9 -11
- package/cjs/core/ExpandableBlock/index.d.ts +0 -1
- package/cjs/core/Fieldset/Fieldset.d.ts +4 -3
- package/cjs/core/Fieldset/Fieldset.js +3 -5
- package/cjs/core/Fieldset/index.d.ts +0 -1
- package/cjs/core/FileUpload/FileEmptyCard.d.ts +4 -11
- package/cjs/core/FileUpload/FileEmptyCard.js +16 -13
- package/cjs/core/FileUpload/FileUpload.d.ts +4 -25
- package/cjs/core/FileUpload/FileUpload.js +3 -4
- package/cjs/core/FileUpload/FileUploadCard.d.ts +11 -51
- package/cjs/core/FileUpload/FileUploadCard.js +43 -35
- package/cjs/core/FileUpload/FileUploadTemplate.d.ts +4 -3
- package/cjs/core/FileUpload/FileUploadTemplate.js +5 -7
- package/cjs/core/FileUpload/index.d.ts +0 -4
- package/cjs/core/Footer/Footer.d.ts +6 -10
- package/cjs/core/Footer/Footer.js +1 -2
- package/cjs/core/Footer/FooterItem.d.ts +1 -3
- package/cjs/core/Footer/FooterItem.js +1 -34
- package/cjs/core/Footer/FooterList.d.ts +1 -3
- package/cjs/core/Footer/FooterList.js +1 -34
- package/cjs/core/Footer/FooterSeparator.d.ts +1 -3
- package/cjs/core/Footer/FooterSeparator.js +3 -34
- package/cjs/core/Footer/index.d.ts +1 -1
- package/cjs/core/Header/Header.d.ts +5 -5
- package/cjs/core/Header/Header.js +7 -9
- package/cjs/core/Header/HeaderBasicButton.d.ts +2 -4
- package/cjs/core/Header/HeaderBasicButton.js +4 -11
- package/cjs/core/Header/HeaderBreadcrumbs.d.ts +3 -2
- package/cjs/core/Header/HeaderBreadcrumbs.js +10 -8
- package/cjs/core/Header/HeaderButton.d.ts +5 -6
- package/cjs/core/Header/HeaderButton.js +8 -24
- package/cjs/core/Header/HeaderDropdownButton.d.ts +2 -4
- package/cjs/core/Header/HeaderDropdownButton.js +0 -1
- package/cjs/core/Header/HeaderLogo.d.ts +1 -2
- package/cjs/core/Header/HeaderLogo.js +5 -12
- package/cjs/core/Header/HeaderSplitButton.d.ts +2 -4
- package/cjs/core/Header/HeaderSplitButton.js +3 -4
- package/cjs/core/Header/index.d.ts +0 -4
- package/cjs/core/InformationPanel/InformationPanel.d.ts +4 -24
- package/cjs/core/InformationPanel/InformationPanel.js +3 -4
- package/cjs/core/InformationPanel/InformationPanelBody.d.ts +1 -9
- package/cjs/core/InformationPanel/InformationPanelBody.js +1 -34
- package/cjs/core/InformationPanel/InformationPanelContent.d.ts +4 -4
- package/cjs/core/InformationPanel/InformationPanelContent.js +3 -5
- package/cjs/core/InformationPanel/InformationPanelHeader.d.ts +4 -4
- package/cjs/core/InformationPanel/InformationPanelHeader.js +5 -7
- package/cjs/core/InformationPanel/InformationPanelWrapper.d.ts +1 -6
- package/cjs/core/InformationPanel/InformationPanelWrapper.js +1 -34
- package/cjs/core/InformationPanel/index.d.ts +0 -5
- package/cjs/core/Input/Input.d.ts +3 -13
- package/cjs/core/Input/Input.js +1 -2
- package/cjs/core/Input/index.d.ts +0 -1
- package/cjs/core/InputGroup/InputGroup.d.ts +4 -4
- package/cjs/core/InputGroup/InputGroup.js +5 -7
- package/cjs/core/InputGroup/index.d.ts +0 -1
- package/cjs/core/Label/Label.d.ts +3 -9
- package/cjs/core/Label/Label.js +5 -7
- package/cjs/core/Label/index.d.ts +0 -1
- package/cjs/core/LabeledInput/LabeledInput.d.ts +2 -46
- package/cjs/core/LabeledInput/LabeledInput.js +0 -1
- package/cjs/core/LabeledInput/index.d.ts +0 -1
- package/cjs/core/LabeledSelect/LabeledSelect.d.ts +1 -1
- package/cjs/core/LabeledSelect/LabeledSelect.js +0 -1
- package/cjs/core/LabeledSelect/index.d.ts +0 -1
- package/cjs/core/LabeledTextarea/LabeledTextarea.d.ts +4 -26
- package/cjs/core/LabeledTextarea/LabeledTextarea.js +0 -1
- package/cjs/core/LabeledTextarea/index.d.ts +0 -1
- package/cjs/core/List/List.d.ts +1 -5
- package/cjs/core/List/List.js +2 -33
- package/cjs/core/List/ListItem.d.ts +6 -13
- package/cjs/core/List/ListItem.js +9 -15
- package/cjs/core/List/index.d.ts +0 -2
- package/cjs/core/Menu/Menu.d.ts +4 -27
- package/cjs/core/Menu/Menu.js +2 -3
- package/cjs/core/Menu/MenuDivider.d.ts +1 -4
- package/cjs/core/Menu/MenuDivider.js +3 -34
- package/cjs/core/Menu/MenuExtraContent.d.ts +1 -6
- package/cjs/core/Menu/MenuExtraContent.js +3 -34
- package/cjs/core/Menu/MenuItem.d.ts +14 -60
- package/cjs/core/Menu/MenuItem.js +12 -23
- package/cjs/core/Menu/MenuItemSkeleton.d.ts +4 -5
- package/cjs/core/Menu/MenuItemSkeleton.js +8 -10
- package/cjs/core/Menu/index.d.ts +0 -5
- package/cjs/core/Modal/Modal.d.ts +5 -5
- package/cjs/core/Modal/Modal.js +3 -5
- package/cjs/core/Modal/ModalButtonBar.d.ts +1 -9
- package/cjs/core/Modal/ModalButtonBar.js +1 -26
- package/cjs/core/Modal/ModalContent.d.ts +1 -9
- package/cjs/core/Modal/ModalContent.js +1 -26
- package/cjs/core/Modal/index.d.ts +0 -3
- package/cjs/core/NonIdealState/NonIdealState.d.ts +4 -3
- package/cjs/core/NonIdealState/NonIdealState.js +7 -9
- package/cjs/core/NonIdealState/index.d.ts +1 -2
- package/cjs/core/NotificationMarker/NotificationMarker.d.ts +4 -3
- package/cjs/core/NotificationMarker/NotificationMarker.js +1 -2
- package/cjs/core/NotificationMarker/index.d.ts +0 -1
- package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.d.ts +4 -4
- package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +8 -10
- package/cjs/core/ProgressIndicators/ProgressLinear/index.d.ts +0 -1
- package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.d.ts +4 -4
- package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +10 -12
- package/cjs/core/ProgressIndicators/ProgressRadial/index.d.ts +0 -1
- package/cjs/core/ProgressIndicators/index.d.ts +0 -2
- package/cjs/core/Radio/Radio.d.ts +4 -17
- package/cjs/core/Radio/Radio.js +3 -4
- package/cjs/core/Radio/index.d.ts +0 -1
- package/cjs/core/RadioTiles/RadioTile.d.ts +4 -21
- package/cjs/core/RadioTiles/RadioTile.js +6 -10
- package/cjs/core/RadioTiles/RadioTileGroup.d.ts +5 -4
- package/cjs/core/RadioTiles/RadioTileGroup.js +4 -6
- package/cjs/core/RadioTiles/index.d.ts +0 -2
- package/cjs/core/SearchBox/SearchBox.d.ts +4 -16
- package/cjs/core/SearchBox/SearchBox.js +1 -2
- package/cjs/core/SearchBox/index.d.ts +0 -1
- package/cjs/core/Select/Select.d.ts +6 -1
- package/cjs/core/Select/Select.js +12 -12
- package/cjs/core/Select/SelectTag.d.ts +4 -5
- package/cjs/core/Select/SelectTag.js +4 -6
- package/cjs/core/Select/SelectTagContainer.d.ts +4 -8
- package/cjs/core/Select/SelectTagContainer.js +1 -2
- package/cjs/core/Select/index.d.ts +1 -1
- package/cjs/core/SideNavigation/SideNavigation.d.ts +4 -4
- package/cjs/core/SideNavigation/SideNavigation.js +7 -9
- package/cjs/core/SideNavigation/SidenavButton.d.ts +3 -4
- package/cjs/core/SideNavigation/SidenavButton.js +2 -6
- package/cjs/core/SideNavigation/SidenavSubmenu.d.ts +2 -14
- package/cjs/core/SideNavigation/SidenavSubmenu.js +2 -3
- package/cjs/core/SideNavigation/SidenavSubmenuHeader.d.ts +4 -8
- package/cjs/core/SideNavigation/SidenavSubmenuHeader.js +5 -7
- package/cjs/core/SideNavigation/index.d.ts +0 -4
- package/cjs/core/SkipToContentLink/SkipToContentLink.d.ts +4 -13
- package/cjs/core/SkipToContentLink/SkipToContentLink.js +1 -2
- package/cjs/core/SkipToContentLink/index.d.ts +0 -1
- package/cjs/core/Slider/Slider.d.ts +4 -99
- package/cjs/core/Slider/Slider.js +6 -7
- package/cjs/core/Slider/Thumb.d.ts +3 -2
- package/cjs/core/Slider/Thumb.js +2 -1
- package/cjs/core/Slider/index.d.ts +0 -1
- package/cjs/core/StatusMessage/StatusMessage.d.ts +1 -1
- package/cjs/core/StatusMessage/StatusMessage.js +3 -18
- package/cjs/core/StatusMessage/index.d.ts +0 -1
- package/cjs/core/Stepper/Stepper.d.ts +2 -2
- package/cjs/core/Stepper/Stepper.js +3 -4
- package/cjs/core/Stepper/StepperStep.d.ts +3 -4
- package/cjs/core/Stepper/StepperStep.js +8 -8
- package/cjs/core/Stepper/Wizard.js +3 -1
- package/cjs/core/Stepper/WorkflowDiagram.d.ts +3 -3
- package/cjs/core/Stepper/WorkflowDiagram.js +5 -4
- package/cjs/core/Stepper/WorkflowDiagramStep.d.ts +2 -2
- package/cjs/core/Stepper/WorkflowDiagramStep.js +3 -2
- package/cjs/core/Stepper/index.d.ts +2 -3
- package/cjs/core/Surface/Surface.d.ts +5 -17
- package/cjs/core/Surface/Surface.js +7 -6
- package/cjs/core/Surface/index.d.ts +0 -1
- package/cjs/core/Table/Table.js +1 -1
- package/cjs/core/Table/TablePaginator.js +1 -1
- package/cjs/core/Table/columns/actionColumn.js +1 -1
- package/cjs/core/Table/columns/expanderColumn.d.ts +1 -1
- package/cjs/core/Table/columns/expanderColumn.js +1 -1
- package/cjs/core/Table/filters/BaseFilter.js +1 -1
- package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.d.ts +3 -3
- package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +1 -1
- package/cjs/core/Table/filters/FilterButtonBar.js +1 -1
- package/cjs/core/Table/filters/FilterToggle.d.ts +2 -2
- package/cjs/core/Table/filters/FilterToggle.js +1 -1
- package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +1 -1
- package/cjs/core/Table/filters/TextFilter/TextFilter.js +1 -1
- package/cjs/core/Tabs/Tab.d.ts +10 -3
- package/cjs/core/Tabs/Tab.js +7 -13
- package/cjs/core/Tabs/Tabs.d.ts +2 -2
- package/cjs/core/Tabs/Tabs.js +6 -9
- package/cjs/core/Tabs/index.d.ts +0 -2
- package/cjs/core/Tag/Tag.d.ts +4 -4
- package/cjs/core/Tag/Tag.js +5 -7
- package/cjs/core/Tag/TagContainer.d.ts +4 -4
- package/cjs/core/Tag/TagContainer.js +4 -6
- package/cjs/core/Tag/index.d.ts +0 -2
- package/cjs/core/Textarea/Textarea.d.ts +3 -9
- package/cjs/core/Textarea/Textarea.js +1 -2
- package/cjs/core/Textarea/index.d.ts +0 -1
- package/cjs/core/ThemeProvider/ThemeContext.d.ts +7 -0
- package/cjs/core/{Typography/Small/Small.js → ThemeProvider/ThemeContext.js} +2 -18
- package/cjs/core/ThemeProvider/ThemeProvider.d.ts +11 -12
- package/cjs/core/ThemeProvider/ThemeProvider.js +6 -16
- package/cjs/core/ThemeProvider/index.d.ts +1 -1
- package/cjs/core/Tile/Tile.d.ts +6 -7
- package/cjs/core/Tile/Tile.js +17 -19
- package/cjs/core/Tile/index.d.ts +0 -1
- package/cjs/core/TimePicker/TimePicker.d.ts +3 -3
- package/cjs/core/TimePicker/TimePicker.js +5 -7
- package/cjs/core/TimePicker/index.d.ts +1 -1
- package/cjs/core/Toast/Toast.js +5 -5
- package/cjs/core/Toast/ToastWrapper.js +2 -1
- package/cjs/core/ToggleSwitch/ToggleSwitch.d.ts +4 -3
- package/cjs/core/ToggleSwitch/ToggleSwitch.js +3 -9
- package/cjs/core/ToggleSwitch/index.d.ts +0 -1
- package/cjs/core/Tooltip/Tooltip.js +1 -2
- package/cjs/core/Tooltip/index.d.ts +0 -1
- package/cjs/core/Tree/Tree.d.ts +1 -1
- package/cjs/core/Tree/Tree.js +4 -4
- package/cjs/core/Tree/TreeNode.d.ts +1 -1
- package/cjs/core/Tree/TreeNode.js +10 -15
- package/cjs/core/Tree/TreeNodeExpander.d.ts +4 -4
- package/cjs/core/Tree/TreeNodeExpander.js +3 -4
- package/cjs/core/Tree/index.d.ts +1 -3
- package/cjs/core/Typography/Anchor/Anchor.d.ts +1 -5
- package/cjs/core/Typography/Anchor/Anchor.js +1 -33
- package/cjs/core/Typography/Anchor/index.d.ts +0 -1
- package/cjs/core/Typography/Blockquote/Blockquote.d.ts +4 -8
- package/cjs/core/Typography/Blockquote/Blockquote.js +1 -2
- package/cjs/core/Typography/Blockquote/index.d.ts +0 -1
- package/cjs/core/Typography/Code/Code.d.ts +1 -9
- package/cjs/core/Typography/Code/Code.js +1 -34
- package/cjs/core/Typography/Code/index.d.ts +0 -1
- package/cjs/core/Typography/Kbd/Kbd.d.ts +4 -5
- package/cjs/core/Typography/Kbd/Kbd.js +3 -5
- package/cjs/core/Typography/Kbd/index.d.ts +0 -1
- package/cjs/core/Typography/Text/Text.d.ts +3 -6
- package/cjs/core/Typography/Text/Text.js +2 -3
- package/cjs/core/Typography/Text/index.d.ts +0 -1
- package/cjs/core/Typography/index.d.ts +0 -17
- package/cjs/core/Typography/index.js +10 -22
- package/cjs/core/index.d.ts +10 -57
- package/cjs/core/index.js +1 -8
- package/cjs/core/utils/components/Box.d.ts +6 -0
- package/cjs/core/{Typography/Leading/index.js → utils/components/Box.js} +8 -4
- package/cjs/core/utils/components/Divider.d.ts +4 -4
- package/cjs/core/utils/components/Divider.js +2 -3
- package/cjs/core/utils/components/Flex.d.ts +1 -4
- package/cjs/core/utils/components/Flex.js +10 -6
- package/cjs/core/utils/components/Icon.d.ts +2 -24
- package/cjs/core/utils/components/Icon.js +2 -1
- package/cjs/core/utils/components/InputContainer.js +6 -10
- package/cjs/core/utils/components/InputFlexContainer.d.ts +3 -5
- package/cjs/core/utils/components/InputFlexContainer.js +3 -2
- package/cjs/core/utils/components/LinkAction.d.ts +2 -8
- package/cjs/core/utils/components/LinkAction.js +3 -36
- package/cjs/core/utils/components/Popover.d.ts +1 -1
- package/cjs/core/utils/components/Popover.js +2 -2
- package/cjs/core/utils/components/VisuallyHidden.d.ts +1 -2
- package/cjs/core/utils/components/VisuallyHidden.js +3 -4
- package/cjs/core/utils/components/index.d.ts +1 -0
- package/cjs/core/utils/components/index.js +1 -0
- package/cjs/core/utils/functions/index.d.ts +1 -0
- package/cjs/core/utils/functions/index.js +1 -0
- package/cjs/core/utils/functions/polymorphic.d.ts +198 -0
- package/cjs/core/utils/functions/polymorphic.js +81 -0
- package/cjs/core/utils/hooks/index.d.ts +1 -1
- package/cjs/core/utils/hooks/index.js +1 -1
- package/cjs/core/utils/hooks/useGlobals.d.ts +10 -0
- package/cjs/core/utils/hooks/useGlobals.js +79 -0
- package/cjs/core/utils/hooks/useIsThemeAlreadySet.js +2 -2
- package/cjs/core/utils/icons/Svg.d.ts +1 -0
- package/cjs/core/{Typography/Body/index.js → utils/icons/Svg.js} +3 -4
- package/cjs/core/utils/icons/SvgCalendar.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCalendar.js +2 -1
- package/cjs/core/utils/icons/SvgCaretDownSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCaretDownSmall.js +2 -1
- package/cjs/core/utils/icons/SvgCaretRightSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCaretRightSmall.js +2 -1
- package/cjs/core/utils/icons/SvgCaretUpSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCaretUpSmall.js +2 -1
- package/cjs/core/utils/icons/SvgCheckmark.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCheckmark.js +2 -1
- package/cjs/core/utils/icons/SvgCheckmarkSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCheckmarkSmall.js +2 -1
- package/cjs/core/utils/icons/SvgChevronLeft.d.ts +1 -1
- package/cjs/core/utils/icons/SvgChevronLeft.js +2 -1
- package/cjs/core/utils/icons/SvgChevronLeftDouble.d.ts +1 -1
- package/cjs/core/utils/icons/SvgChevronLeftDouble.js +2 -1
- package/cjs/core/utils/icons/SvgChevronRight.d.ts +1 -1
- package/cjs/core/utils/icons/SvgChevronRight.js +2 -1
- package/cjs/core/utils/icons/SvgChevronRightDouble.d.ts +1 -1
- package/cjs/core/utils/icons/SvgChevronRightDouble.js +2 -1
- package/cjs/core/utils/icons/SvgClose.d.ts +1 -1
- package/cjs/core/utils/icons/SvgClose.js +2 -1
- package/cjs/core/utils/icons/SvgCloseSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCloseSmall.js +2 -1
- package/cjs/core/utils/icons/SvgColumnManager.d.ts +1 -1
- package/cjs/core/utils/icons/SvgColumnManager.js +2 -1
- package/cjs/core/utils/icons/SvgDocument.d.ts +1 -1
- package/cjs/core/utils/icons/SvgDocument.js +2 -1
- package/cjs/core/utils/icons/SvgFilter.d.ts +1 -1
- package/cjs/core/utils/icons/SvgFilter.js +2 -1
- package/cjs/core/utils/icons/SvgFilterHollow.d.ts +1 -1
- package/cjs/core/utils/icons/SvgFilterHollow.js +2 -1
- package/cjs/core/utils/icons/SvgImportantSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgImportantSmall.js +2 -1
- package/cjs/core/utils/icons/SvgInfoCircular.d.ts +1 -1
- package/cjs/core/utils/icons/SvgInfoCircular.js +2 -1
- package/cjs/core/utils/icons/SvgMore.d.ts +1 -1
- package/cjs/core/utils/icons/SvgMore.js +2 -1
- package/cjs/core/utils/icons/SvgMoreVertical.d.ts +1 -1
- package/cjs/core/utils/icons/SvgMoreVertical.js +2 -1
- package/cjs/core/utils/icons/SvgNew.d.ts +1 -1
- package/cjs/core/utils/icons/SvgNew.js +2 -1
- package/cjs/core/utils/icons/SvgSearch.d.ts +1 -1
- package/cjs/core/utils/icons/SvgSearch.js +2 -1
- package/cjs/core/utils/icons/SvgSmileyHappy.d.ts +1 -1
- package/cjs/core/utils/icons/SvgSmileyHappy.js +2 -1
- package/cjs/core/utils/icons/SvgSortDown.d.ts +1 -1
- package/cjs/core/utils/icons/SvgSortDown.js +2 -1
- package/cjs/core/utils/icons/SvgSortUp.d.ts +1 -1
- package/cjs/core/utils/icons/SvgSortUp.js +2 -1
- package/cjs/core/utils/icons/SvgStatusError.d.ts +1 -1
- package/cjs/core/utils/icons/SvgStatusError.js +2 -1
- package/cjs/core/utils/icons/SvgStatusSuccess.d.ts +1 -1
- package/cjs/core/utils/icons/SvgStatusSuccess.js +2 -1
- package/cjs/core/utils/icons/SvgStatusWarning.d.ts +1 -1
- package/cjs/core/utils/icons/SvgStatusWarning.js +2 -1
- package/cjs/core/utils/icons/SvgSwap.d.ts +1 -1
- package/cjs/core/utils/icons/SvgSwap.js +2 -1
- package/cjs/core/utils/icons/SvgUpload.d.ts +1 -1
- package/cjs/core/utils/icons/SvgUpload.js +2 -1
- package/cjs/core/utils/props.d.ts +10 -33
- package/cjs/types/react-table-config.d.ts +1 -1
- package/esm/core/Alert/Alert.d.ts +4 -4
- package/esm/core/Alert/Alert.js +9 -10
- package/esm/core/Alert/index.d.ts +0 -1
- package/esm/core/Avatar/Avatar.d.ts +6 -14
- package/esm/core/Avatar/Avatar.js +7 -8
- package/esm/core/Avatar/index.d.ts +0 -1
- package/esm/core/AvatarGroup/AvatarGroup.d.ts +5 -9
- package/esm/core/AvatarGroup/AvatarGroup.js +15 -17
- package/esm/core/AvatarGroup/index.d.ts +0 -1
- package/esm/core/Backdrop/Backdrop.d.ts +3 -3
- package/esm/core/Backdrop/Backdrop.js +2 -3
- package/esm/core/Backdrop/index.d.ts +0 -1
- package/esm/core/Badge/Badge.d.ts +4 -6
- package/esm/core/Badge/Badge.js +4 -5
- package/esm/core/Badge/index.d.ts +0 -1
- package/esm/core/Breadcrumbs/Breadcrumbs.d.ts +4 -77
- package/esm/core/Breadcrumbs/Breadcrumbs.js +6 -7
- package/esm/core/Breadcrumbs/index.d.ts +0 -1
- package/esm/core/ButtonGroup/ButtonGroup.d.ts +4 -3
- package/esm/core/ButtonGroup/ButtonGroup.js +16 -14
- package/esm/core/ButtonGroup/index.d.ts +0 -1
- package/esm/core/Buttons/Button/Button.d.ts +4 -10
- package/esm/core/Buttons/Button/Button.js +5 -6
- package/esm/core/Buttons/Button/index.d.ts +0 -1
- package/esm/core/Buttons/DropdownButton/DropdownButton.d.ts +5 -21
- package/esm/core/Buttons/DropdownButton/DropdownButton.js +1 -2
- package/esm/core/Buttons/DropdownButton/index.d.ts +0 -1
- package/esm/core/Buttons/IconButton/IconButton.d.ts +2 -3
- package/esm/core/Buttons/IconButton/IconButton.js +5 -6
- package/esm/core/Buttons/IconButton/index.d.ts +0 -1
- package/esm/core/Buttons/IdeasButton/IdeasButton.d.ts +3 -3
- package/esm/core/Buttons/IdeasButton/IdeasButton.js +1 -2
- package/esm/core/Buttons/IdeasButton/index.d.ts +0 -1
- package/esm/core/Buttons/SplitButton/SplitButton.d.ts +2 -3
- package/esm/core/Buttons/SplitButton/SplitButton.js +2 -3
- package/esm/core/Buttons/SplitButton/index.d.ts +0 -1
- package/esm/core/Buttons/index.d.ts +0 -5
- package/esm/core/Carousel/Carousel.d.ts +24 -26
- package/esm/core/Carousel/Carousel.js +23 -23
- package/esm/core/Carousel/CarouselDot.d.ts +11 -9
- package/esm/core/Carousel/CarouselDot.js +2 -1
- package/esm/core/Carousel/CarouselDotsList.d.ts +11 -9
- package/esm/core/Carousel/CarouselDotsList.js +2 -3
- package/esm/core/Carousel/CarouselNavigation.d.ts +14 -5
- package/esm/core/Carousel/CarouselNavigation.js +14 -10
- package/esm/core/Carousel/CarouselSlide.d.ts +10 -8
- package/esm/core/Carousel/CarouselSlide.js +2 -2
- package/esm/core/Carousel/CarouselSlider.d.ts +2 -2
- package/esm/core/Carousel/CarouselSlider.js +2 -2
- package/esm/core/Carousel/index.d.ts +0 -1
- package/esm/core/Checkbox/Checkbox.d.ts +4 -31
- package/esm/core/Checkbox/Checkbox.js +4 -5
- package/esm/core/Checkbox/index.d.ts +0 -1
- package/esm/core/ColorPicker/ColorBuilder.d.ts +2 -4
- package/esm/core/ColorPicker/ColorBuilder.js +4 -5
- package/esm/core/ColorPicker/ColorInputPanel.d.ts +4 -18
- package/esm/core/ColorPicker/ColorInputPanel.js +5 -6
- package/esm/core/ColorPicker/ColorPalette.d.ts +3 -16
- package/esm/core/ColorPicker/ColorPalette.js +4 -5
- package/esm/core/ColorPicker/ColorPicker.d.ts +4 -4
- package/esm/core/ColorPicker/ColorPicker.js +4 -5
- package/esm/core/ColorPicker/ColorSwatch.d.ts +4 -5
- package/esm/core/ColorPicker/ColorSwatch.js +2 -3
- package/esm/core/ColorPicker/index.d.ts +0 -5
- package/esm/core/ComboBox/ComboBox.d.ts +4 -4
- package/esm/core/ComboBox/ComboBox.js +6 -8
- package/esm/core/ComboBox/ComboBoxDropdown.d.ts +3 -3
- package/esm/core/ComboBox/ComboBoxEndIcon.d.ts +7 -5
- package/esm/core/ComboBox/ComboBoxEndIcon.js +2 -2
- package/esm/core/ComboBox/ComboBoxInput.d.ts +7 -6
- package/esm/core/ComboBox/ComboBoxInputContainer.d.ts +3 -7
- package/esm/core/ComboBox/ComboBoxInputContainer.js +5 -5
- package/esm/core/ComboBox/ComboBoxMenu.d.ts +5 -2
- package/esm/core/ComboBox/ComboBoxMenu.js +2 -2
- package/esm/core/ComboBox/ComboBoxMenuItem.d.ts +6 -19
- package/esm/core/ComboBox/ComboBoxMenuItem.js +8 -19
- package/esm/core/ComboBox/ComboBoxMultipleContainer.d.ts +6 -3
- package/esm/core/ComboBox/index.d.ts +0 -1
- package/esm/core/DatePicker/DatePicker.d.ts +4 -4
- package/esm/core/DatePicker/DatePicker.js +10 -11
- package/esm/core/DatePicker/index.d.ts +0 -1
- package/esm/core/Dialog/Dialog.d.ts +13 -9
- package/esm/core/Dialog/Dialog.js +22 -23
- package/esm/core/Dialog/DialogBackdrop.d.ts +4 -4
- package/esm/core/Dialog/DialogBackdrop.js +1 -3
- package/esm/core/Dialog/DialogButtonBar.d.ts +1 -8
- package/esm/core/Dialog/DialogButtonBar.js +2 -8
- package/esm/core/Dialog/DialogContent.d.ts +1 -8
- package/esm/core/Dialog/DialogContent.js +2 -8
- package/esm/core/Dialog/DialogMain.d.ts +3 -2
- package/esm/core/Dialog/DialogMain.js +2 -3
- package/esm/core/Dialog/DialogTitleBar.d.ts +5 -4
- package/esm/core/Dialog/DialogTitleBar.js +2 -3
- package/esm/core/Dialog/DialogTitleBarTitle.d.ts +1 -8
- package/esm/core/Dialog/DialogTitleBarTitle.js +2 -8
- package/esm/core/Dialog/index.d.ts +0 -5
- package/esm/core/DropdownMenu/DropdownMenu.js +1 -2
- package/esm/core/ExpandableBlock/ExpandableBlock.d.ts +4 -4
- package/esm/core/ExpandableBlock/ExpandableBlock.js +10 -11
- package/esm/core/ExpandableBlock/index.d.ts +0 -1
- package/esm/core/Fieldset/Fieldset.d.ts +4 -3
- package/esm/core/Fieldset/Fieldset.js +4 -5
- package/esm/core/Fieldset/index.d.ts +0 -1
- package/esm/core/FileUpload/FileEmptyCard.d.ts +4 -11
- package/esm/core/FileUpload/FileEmptyCard.js +17 -14
- package/esm/core/FileUpload/FileUpload.d.ts +4 -25
- package/esm/core/FileUpload/FileUpload.js +4 -5
- package/esm/core/FileUpload/FileUploadCard.d.ts +11 -51
- package/esm/core/FileUpload/FileUploadCard.js +44 -36
- package/esm/core/FileUpload/FileUploadTemplate.d.ts +4 -3
- package/esm/core/FileUpload/FileUploadTemplate.js +6 -7
- package/esm/core/FileUpload/index.d.ts +0 -4
- package/esm/core/Footer/Footer.d.ts +6 -10
- package/esm/core/Footer/Footer.js +2 -3
- package/esm/core/Footer/FooterItem.d.ts +1 -3
- package/esm/core/Footer/FooterItem.js +2 -8
- package/esm/core/Footer/FooterList.d.ts +1 -3
- package/esm/core/Footer/FooterList.js +2 -8
- package/esm/core/Footer/FooterSeparator.d.ts +1 -3
- package/esm/core/Footer/FooterSeparator.js +4 -8
- package/esm/core/Footer/index.d.ts +1 -1
- package/esm/core/Header/Header.d.ts +5 -5
- package/esm/core/Header/Header.js +8 -9
- package/esm/core/Header/HeaderBasicButton.d.ts +2 -4
- package/esm/core/Header/HeaderBasicButton.js +5 -12
- package/esm/core/Header/HeaderBreadcrumbs.d.ts +3 -2
- package/esm/core/Header/HeaderBreadcrumbs.js +8 -8
- package/esm/core/Header/HeaderButton.d.ts +5 -6
- package/esm/core/Header/HeaderButton.js +9 -22
- package/esm/core/Header/HeaderDropdownButton.d.ts +2 -4
- package/esm/core/Header/HeaderDropdownButton.js +1 -2
- package/esm/core/Header/HeaderLogo.d.ts +1 -2
- package/esm/core/Header/HeaderLogo.js +6 -13
- package/esm/core/Header/HeaderSplitButton.d.ts +2 -4
- package/esm/core/Header/HeaderSplitButton.js +4 -5
- package/esm/core/Header/index.d.ts +0 -4
- package/esm/core/InformationPanel/InformationPanel.d.ts +4 -24
- package/esm/core/InformationPanel/InformationPanel.js +4 -5
- package/esm/core/InformationPanel/InformationPanelBody.d.ts +1 -9
- package/esm/core/InformationPanel/InformationPanelBody.js +2 -8
- package/esm/core/InformationPanel/InformationPanelContent.d.ts +4 -4
- package/esm/core/InformationPanel/InformationPanelContent.js +4 -5
- package/esm/core/InformationPanel/InformationPanelHeader.d.ts +4 -4
- package/esm/core/InformationPanel/InformationPanelHeader.js +6 -7
- package/esm/core/InformationPanel/InformationPanelWrapper.d.ts +1 -6
- package/esm/core/InformationPanel/InformationPanelWrapper.js +2 -8
- package/esm/core/InformationPanel/index.d.ts +0 -5
- package/esm/core/Input/Input.d.ts +3 -13
- package/esm/core/Input/Input.js +2 -3
- package/esm/core/Input/index.d.ts +0 -1
- package/esm/core/InputGroup/InputGroup.d.ts +4 -4
- package/esm/core/InputGroup/InputGroup.js +6 -7
- package/esm/core/InputGroup/index.d.ts +0 -1
- package/esm/core/Label/Label.d.ts +3 -9
- package/esm/core/Label/Label.js +6 -7
- package/esm/core/Label/index.d.ts +0 -1
- package/esm/core/LabeledInput/LabeledInput.d.ts +2 -46
- package/esm/core/LabeledInput/LabeledInput.js +1 -2
- package/esm/core/LabeledInput/index.d.ts +0 -1
- package/esm/core/LabeledSelect/LabeledSelect.d.ts +1 -1
- package/esm/core/LabeledSelect/LabeledSelect.js +1 -2
- package/esm/core/LabeledSelect/index.d.ts +0 -1
- package/esm/core/LabeledTextarea/LabeledTextarea.d.ts +4 -26
- package/esm/core/LabeledTextarea/LabeledTextarea.js +1 -2
- package/esm/core/LabeledTextarea/index.d.ts +0 -1
- package/esm/core/List/List.d.ts +1 -5
- package/esm/core/List/List.js +3 -8
- package/esm/core/List/ListItem.d.ts +6 -13
- package/esm/core/List/ListItem.js +10 -16
- package/esm/core/List/index.d.ts +0 -2
- package/esm/core/Menu/Menu.d.ts +4 -27
- package/esm/core/Menu/Menu.js +3 -4
- package/esm/core/Menu/MenuDivider.d.ts +1 -4
- package/esm/core/Menu/MenuDivider.js +4 -8
- package/esm/core/Menu/MenuExtraContent.d.ts +1 -6
- package/esm/core/Menu/MenuExtraContent.js +4 -8
- package/esm/core/Menu/MenuItem.d.ts +14 -60
- package/esm/core/Menu/MenuItem.js +13 -21
- package/esm/core/Menu/MenuItemSkeleton.d.ts +4 -5
- package/esm/core/Menu/MenuItemSkeleton.js +9 -10
- package/esm/core/Menu/index.d.ts +0 -5
- package/esm/core/Modal/Modal.d.ts +5 -5
- package/esm/core/Modal/Modal.js +4 -5
- package/esm/core/Modal/ModalButtonBar.d.ts +1 -9
- package/esm/core/Modal/ModalButtonBar.js +1 -2
- package/esm/core/Modal/ModalContent.d.ts +1 -9
- package/esm/core/Modal/ModalContent.js +1 -2
- package/esm/core/Modal/index.d.ts +0 -3
- package/esm/core/NonIdealState/NonIdealState.d.ts +4 -3
- package/esm/core/NonIdealState/NonIdealState.js +8 -9
- package/esm/core/NonIdealState/index.d.ts +1 -2
- package/esm/core/NotificationMarker/NotificationMarker.d.ts +4 -3
- package/esm/core/NotificationMarker/NotificationMarker.js +2 -3
- package/esm/core/NotificationMarker/index.d.ts +0 -1
- package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.d.ts +4 -4
- package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +9 -10
- package/esm/core/ProgressIndicators/ProgressLinear/index.d.ts +0 -1
- package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.d.ts +4 -4
- package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +11 -12
- package/esm/core/ProgressIndicators/ProgressRadial/index.d.ts +0 -1
- package/esm/core/ProgressIndicators/index.d.ts +0 -2
- package/esm/core/Radio/Radio.d.ts +4 -17
- package/esm/core/Radio/Radio.js +4 -5
- package/esm/core/Radio/index.d.ts +0 -1
- package/esm/core/RadioTiles/RadioTile.d.ts +4 -21
- package/esm/core/RadioTiles/RadioTile.js +7 -11
- package/esm/core/RadioTiles/RadioTileGroup.d.ts +5 -4
- package/esm/core/RadioTiles/RadioTileGroup.js +5 -6
- package/esm/core/RadioTiles/index.d.ts +0 -2
- package/esm/core/SearchBox/SearchBox.d.ts +4 -16
- package/esm/core/SearchBox/SearchBox.js +2 -3
- package/esm/core/SearchBox/index.d.ts +0 -1
- package/esm/core/Select/Select.d.ts +6 -1
- package/esm/core/Select/Select.js +13 -13
- package/esm/core/Select/SelectTag.d.ts +4 -5
- package/esm/core/Select/SelectTag.js +5 -6
- package/esm/core/Select/SelectTagContainer.d.ts +4 -8
- package/esm/core/Select/SelectTagContainer.js +2 -3
- package/esm/core/Select/index.d.ts +1 -1
- package/esm/core/SideNavigation/SideNavigation.d.ts +4 -4
- package/esm/core/SideNavigation/SideNavigation.js +8 -9
- package/esm/core/SideNavigation/SidenavButton.d.ts +3 -4
- package/esm/core/SideNavigation/SidenavButton.js +1 -5
- package/esm/core/SideNavigation/SidenavSubmenu.d.ts +2 -14
- package/esm/core/SideNavigation/SidenavSubmenu.js +3 -4
- package/esm/core/SideNavigation/SidenavSubmenuHeader.d.ts +4 -8
- package/esm/core/SideNavigation/SidenavSubmenuHeader.js +6 -7
- package/esm/core/SideNavigation/index.d.ts +0 -4
- package/esm/core/SkipToContentLink/SkipToContentLink.d.ts +4 -13
- package/esm/core/SkipToContentLink/SkipToContentLink.js +2 -3
- package/esm/core/SkipToContentLink/index.d.ts +0 -1
- package/esm/core/Slider/Slider.d.ts +4 -99
- package/esm/core/Slider/Slider.js +7 -8
- package/esm/core/Slider/Thumb.d.ts +3 -2
- package/esm/core/Slider/Thumb.js +2 -1
- package/esm/core/Slider/index.d.ts +0 -1
- package/esm/core/StatusMessage/StatusMessage.d.ts +1 -1
- package/esm/core/StatusMessage/StatusMessage.js +4 -16
- package/esm/core/StatusMessage/index.d.ts +0 -1
- package/esm/core/Stepper/Stepper.d.ts +2 -2
- package/esm/core/Stepper/Stepper.js +4 -5
- package/esm/core/Stepper/StepperStep.d.ts +3 -4
- package/esm/core/Stepper/StepperStep.js +8 -7
- package/esm/core/Stepper/Wizard.js +3 -1
- package/esm/core/Stepper/WorkflowDiagram.d.ts +3 -3
- package/esm/core/Stepper/WorkflowDiagram.js +6 -5
- package/esm/core/Stepper/WorkflowDiagramStep.d.ts +2 -2
- package/esm/core/Stepper/WorkflowDiagramStep.js +3 -2
- package/esm/core/Stepper/index.d.ts +2 -3
- package/esm/core/Surface/Surface.d.ts +5 -17
- package/esm/core/Surface/Surface.js +8 -7
- package/esm/core/Surface/index.d.ts +0 -1
- package/esm/core/Table/Table.js +2 -2
- package/esm/core/Table/TablePaginator.js +2 -2
- package/esm/core/Table/columns/actionColumn.js +1 -1
- package/esm/core/Table/columns/expanderColumn.d.ts +1 -1
- package/esm/core/Table/columns/expanderColumn.js +1 -1
- package/esm/core/Table/filters/BaseFilter.js +2 -2
- package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.d.ts +3 -3
- package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.js +2 -2
- package/esm/core/Table/filters/FilterButtonBar.js +2 -2
- package/esm/core/Table/filters/FilterToggle.d.ts +2 -2
- package/esm/core/Table/filters/FilterToggle.js +2 -2
- package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +2 -2
- package/esm/core/Table/filters/TextFilter/TextFilter.js +2 -2
- package/esm/core/Tabs/Tab.d.ts +10 -3
- package/esm/core/Tabs/Tab.js +8 -13
- package/esm/core/Tabs/Tabs.d.ts +2 -2
- package/esm/core/Tabs/Tabs.js +7 -10
- package/esm/core/Tabs/index.d.ts +0 -2
- package/esm/core/Tag/Tag.d.ts +4 -4
- package/esm/core/Tag/Tag.js +6 -7
- package/esm/core/Tag/TagContainer.d.ts +4 -4
- package/esm/core/Tag/TagContainer.js +5 -6
- package/esm/core/Tag/index.d.ts +0 -2
- package/esm/core/Textarea/Textarea.d.ts +3 -9
- package/esm/core/Textarea/Textarea.js +2 -3
- package/esm/core/Textarea/index.d.ts +0 -1
- package/esm/core/ThemeProvider/ThemeContext.d.ts +7 -0
- package/esm/core/{Typography/Body/index.js → ThemeProvider/ThemeContext.js} +2 -2
- package/esm/core/ThemeProvider/ThemeProvider.d.ts +11 -12
- package/esm/core/ThemeProvider/ThemeProvider.js +4 -14
- package/esm/core/ThemeProvider/index.d.ts +1 -1
- package/esm/core/Tile/Tile.d.ts +6 -7
- package/esm/core/Tile/Tile.js +18 -19
- package/esm/core/Tile/index.d.ts +0 -1
- package/esm/core/TimePicker/TimePicker.d.ts +3 -3
- package/esm/core/TimePicker/TimePicker.js +6 -7
- package/esm/core/TimePicker/index.d.ts +1 -1
- package/esm/core/Toast/Toast.js +6 -6
- package/esm/core/Toast/ToastWrapper.js +2 -1
- package/esm/core/ToggleSwitch/ToggleSwitch.d.ts +4 -3
- package/esm/core/ToggleSwitch/ToggleSwitch.js +4 -10
- package/esm/core/ToggleSwitch/index.d.ts +0 -1
- package/esm/core/Tooltip/Tooltip.js +2 -3
- package/esm/core/Tooltip/index.d.ts +0 -1
- package/esm/core/Tree/Tree.d.ts +1 -1
- package/esm/core/Tree/Tree.js +5 -5
- package/esm/core/Tree/TreeNode.d.ts +1 -1
- package/esm/core/Tree/TreeNode.js +11 -16
- package/esm/core/Tree/TreeNodeExpander.d.ts +4 -4
- package/esm/core/Tree/TreeNodeExpander.js +3 -3
- package/esm/core/Tree/index.d.ts +1 -3
- package/esm/core/Typography/Anchor/Anchor.d.ts +1 -5
- package/esm/core/Typography/Anchor/Anchor.js +2 -8
- package/esm/core/Typography/Anchor/index.d.ts +0 -1
- package/esm/core/Typography/Blockquote/Blockquote.d.ts +4 -8
- package/esm/core/Typography/Blockquote/Blockquote.js +2 -3
- package/esm/core/Typography/Blockquote/index.d.ts +0 -1
- package/esm/core/Typography/Code/Code.d.ts +1 -9
- package/esm/core/Typography/Code/Code.js +2 -8
- package/esm/core/Typography/Code/index.d.ts +0 -1
- package/esm/core/Typography/Kbd/Kbd.d.ts +4 -5
- package/esm/core/Typography/Kbd/Kbd.js +4 -5
- package/esm/core/Typography/Kbd/index.d.ts +0 -1
- package/esm/core/Typography/Text/Text.d.ts +3 -6
- package/esm/core/Typography/Text/Text.js +3 -4
- package/esm/core/Typography/Text/index.d.ts +0 -1
- package/esm/core/Typography/index.d.ts +0 -17
- package/esm/core/Typography/index.js +0 -6
- package/esm/core/index.d.ts +10 -57
- package/esm/core/index.js +2 -2
- package/esm/core/utils/components/Box.d.ts +6 -0
- package/esm/core/{Typography/Leading/index.js → utils/components/Box.js} +7 -2
- package/esm/core/utils/components/Divider.d.ts +4 -4
- package/esm/core/utils/components/Divider.js +2 -3
- package/esm/core/utils/components/Flex.d.ts +1 -4
- package/esm/core/utils/components/Flex.js +10 -6
- package/esm/core/utils/components/Icon.d.ts +2 -24
- package/esm/core/utils/components/Icon.js +2 -1
- package/esm/core/utils/components/InputContainer.js +6 -10
- package/esm/core/utils/components/InputFlexContainer.d.ts +3 -5
- package/esm/core/utils/components/InputFlexContainer.js +3 -2
- package/esm/core/utils/components/LinkAction.d.ts +2 -8
- package/esm/core/utils/components/LinkAction.js +3 -10
- package/esm/core/utils/components/Popover.d.ts +1 -1
- package/esm/core/utils/components/Popover.js +1 -1
- package/esm/core/utils/components/VisuallyHidden.d.ts +1 -2
- package/esm/core/utils/components/VisuallyHidden.js +3 -4
- package/esm/core/utils/components/index.d.ts +1 -0
- package/esm/core/utils/components/index.js +1 -0
- package/esm/core/utils/functions/index.d.ts +1 -0
- package/esm/core/utils/functions/index.js +1 -0
- package/esm/core/utils/functions/polymorphic.d.ts +198 -0
- package/esm/core/utils/functions/polymorphic.js +52 -0
- package/esm/core/utils/hooks/index.d.ts +1 -1
- package/esm/core/utils/hooks/index.js +1 -1
- package/esm/core/utils/hooks/useGlobals.d.ts +10 -0
- package/esm/core/utils/hooks/useGlobals.js +51 -0
- package/esm/core/utils/hooks/useIsThemeAlreadySet.js +1 -1
- package/esm/core/utils/icons/Svg.d.ts +1 -0
- package/esm/core/{Typography/Headline/index.js → utils/icons/Svg.js} +2 -2
- package/esm/core/utils/icons/SvgCalendar.d.ts +1 -1
- package/esm/core/utils/icons/SvgCalendar.js +2 -1
- package/esm/core/utils/icons/SvgCaretDownSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgCaretDownSmall.js +2 -1
- package/esm/core/utils/icons/SvgCaretRightSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgCaretRightSmall.js +2 -1
- package/esm/core/utils/icons/SvgCaretUpSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgCaretUpSmall.js +2 -1
- package/esm/core/utils/icons/SvgCheckmark.d.ts +1 -1
- package/esm/core/utils/icons/SvgCheckmark.js +2 -1
- package/esm/core/utils/icons/SvgCheckmarkSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgCheckmarkSmall.js +2 -1
- package/esm/core/utils/icons/SvgChevronLeft.d.ts +1 -1
- package/esm/core/utils/icons/SvgChevronLeft.js +2 -1
- package/esm/core/utils/icons/SvgChevronLeftDouble.d.ts +1 -1
- package/esm/core/utils/icons/SvgChevronLeftDouble.js +2 -1
- package/esm/core/utils/icons/SvgChevronRight.d.ts +1 -1
- package/esm/core/utils/icons/SvgChevronRight.js +2 -1
- package/esm/core/utils/icons/SvgChevronRightDouble.d.ts +1 -1
- package/esm/core/utils/icons/SvgChevronRightDouble.js +2 -1
- package/esm/core/utils/icons/SvgClose.d.ts +1 -1
- package/esm/core/utils/icons/SvgClose.js +2 -1
- package/esm/core/utils/icons/SvgCloseSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgCloseSmall.js +2 -1
- package/esm/core/utils/icons/SvgColumnManager.d.ts +1 -1
- package/esm/core/utils/icons/SvgColumnManager.js +2 -1
- package/esm/core/utils/icons/SvgDocument.d.ts +1 -1
- package/esm/core/utils/icons/SvgDocument.js +2 -1
- package/esm/core/utils/icons/SvgFilter.d.ts +1 -1
- package/esm/core/utils/icons/SvgFilter.js +2 -1
- package/esm/core/utils/icons/SvgFilterHollow.d.ts +1 -1
- package/esm/core/utils/icons/SvgFilterHollow.js +2 -1
- package/esm/core/utils/icons/SvgImportantSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgImportantSmall.js +2 -1
- package/esm/core/utils/icons/SvgInfoCircular.d.ts +1 -1
- package/esm/core/utils/icons/SvgInfoCircular.js +2 -1
- package/esm/core/utils/icons/SvgMore.d.ts +1 -1
- package/esm/core/utils/icons/SvgMore.js +2 -1
- package/esm/core/utils/icons/SvgMoreVertical.d.ts +1 -1
- package/esm/core/utils/icons/SvgMoreVertical.js +2 -1
- package/esm/core/utils/icons/SvgNew.d.ts +1 -1
- package/esm/core/utils/icons/SvgNew.js +2 -1
- package/esm/core/utils/icons/SvgSearch.d.ts +1 -1
- package/esm/core/utils/icons/SvgSearch.js +2 -1
- package/esm/core/utils/icons/SvgSmileyHappy.d.ts +1 -1
- package/esm/core/utils/icons/SvgSmileyHappy.js +2 -1
- package/esm/core/utils/icons/SvgSortDown.d.ts +1 -1
- package/esm/core/utils/icons/SvgSortDown.js +2 -1
- package/esm/core/utils/icons/SvgSortUp.d.ts +1 -1
- package/esm/core/utils/icons/SvgSortUp.js +2 -1
- package/esm/core/utils/icons/SvgStatusError.d.ts +1 -1
- package/esm/core/utils/icons/SvgStatusError.js +2 -1
- package/esm/core/utils/icons/SvgStatusSuccess.d.ts +1 -1
- package/esm/core/utils/icons/SvgStatusSuccess.js +2 -1
- package/esm/core/utils/icons/SvgStatusWarning.d.ts +1 -1
- package/esm/core/utils/icons/SvgStatusWarning.js +2 -1
- package/esm/core/utils/icons/SvgSwap.d.ts +1 -1
- package/esm/core/utils/icons/SvgSwap.js +2 -1
- package/esm/core/utils/icons/SvgUpload.d.ts +1 -1
- package/esm/core/utils/icons/SvgUpload.js +2 -1
- package/esm/core/utils/props.d.ts +10 -33
- package/esm/types/react-table-config.d.ts +1 -1
- package/package.json +2 -2
- package/cjs/core/Typography/Body/Body.d.ts +0 -35
- package/cjs/core/Typography/Body/Body.js +0 -51
- package/cjs/core/Typography/Body/index.d.ts +0 -4
- package/cjs/core/Typography/Headline/Headline.d.ts +0 -22
- package/cjs/core/Typography/Headline/Headline.js +0 -48
- package/cjs/core/Typography/Headline/index.d.ts +0 -4
- package/cjs/core/Typography/Headline/index.js +0 -10
- package/cjs/core/Typography/Leading/Leading.d.ts +0 -22
- package/cjs/core/Typography/Leading/Leading.js +0 -48
- package/cjs/core/Typography/Leading/index.d.ts +0 -4
- package/cjs/core/Typography/Small/Small.d.ts +0 -22
- package/cjs/core/Typography/Small/index.d.ts +0 -4
- package/cjs/core/Typography/Small/index.js +0 -10
- package/cjs/core/Typography/Subheading/Subheading.d.ts +0 -22
- package/cjs/core/Typography/Subheading/Subheading.js +0 -48
- package/cjs/core/Typography/Subheading/index.d.ts +0 -4
- package/cjs/core/Typography/Subheading/index.js +0 -10
- package/cjs/core/Typography/Title/Title.d.ts +0 -22
- package/cjs/core/Typography/Title/Title.js +0 -48
- package/cjs/core/Typography/Title/index.d.ts +0 -4
- package/cjs/core/Typography/Title/index.js +0 -10
- package/cjs/core/utils/hooks/useTheme.d.ts +0 -39
- package/cjs/core/utils/hooks/useTheme.js +0 -127
- package/esm/core/Typography/Body/Body.d.ts +0 -35
- package/esm/core/Typography/Body/Body.js +0 -22
- package/esm/core/Typography/Body/index.d.ts +0 -4
- package/esm/core/Typography/Headline/Headline.d.ts +0 -22
- package/esm/core/Typography/Headline/Headline.js +0 -19
- package/esm/core/Typography/Headline/index.d.ts +0 -4
- package/esm/core/Typography/Leading/Leading.d.ts +0 -22
- package/esm/core/Typography/Leading/Leading.js +0 -19
- package/esm/core/Typography/Leading/index.d.ts +0 -4
- package/esm/core/Typography/Small/Small.d.ts +0 -22
- package/esm/core/Typography/Small/Small.js +0 -19
- package/esm/core/Typography/Small/index.d.ts +0 -4
- package/esm/core/Typography/Small/index.js +0 -6
- package/esm/core/Typography/Subheading/Subheading.d.ts +0 -22
- package/esm/core/Typography/Subheading/Subheading.js +0 -19
- package/esm/core/Typography/Subheading/index.d.ts +0 -4
- package/esm/core/Typography/Subheading/index.js +0 -6
- package/esm/core/Typography/Title/Title.d.ts +0 -22
- package/esm/core/Typography/Title/Title.js +0 -19
- package/esm/core/Typography/Title/index.d.ts +0 -4
- package/esm/core/Typography/Title/index.js +0 -6
- package/esm/core/utils/hooks/useTheme.d.ts +0 -39
- package/esm/core/utils/hooks/useTheme.js +0 -100
|
@@ -50,7 +50,6 @@ require("@itwin/itwinui-css/css/checkbox.css");
|
|
|
50
50
|
*/
|
|
51
51
|
exports.Checkbox = React.forwardRef((props, ref) => {
|
|
52
52
|
const { className, disabled = false, indeterminate = false, label, status, variant = 'default', setFocus, isLoading = false, style, ...rest } = props;
|
|
53
|
-
(0, index_js_2.useTheme)();
|
|
54
53
|
const inputElementRef = React.useRef(null);
|
|
55
54
|
const refs = (0, index_js_2.useMergedRefs)(inputElementRef, ref);
|
|
56
55
|
React.useEffect(() => {
|
|
@@ -67,17 +66,17 @@ exports.Checkbox = React.forwardRef((props, ref) => {
|
|
|
67
66
|
}
|
|
68
67
|
});
|
|
69
68
|
const checkbox = (React.createElement(React.Fragment, null,
|
|
70
|
-
React.createElement(
|
|
69
|
+
React.createElement(index_js_2.Box, { as: 'input', className: (0, classnames_1.default)('iui-checkbox', {
|
|
71
70
|
'iui-checkbox-visibility': variant === 'eyeball',
|
|
72
71
|
'iui-loading': isLoading,
|
|
73
72
|
}, className && { [className]: !label }), style: !label ? style : undefined, disabled: disabled || isLoading, type: 'checkbox', ref: refs, ...rest }),
|
|
74
73
|
isLoading && React.createElement(index_js_1.ProgressRadial, { size: 'x-small', indeterminate: true })));
|
|
75
|
-
return !label ? (checkbox) : (React.createElement(
|
|
74
|
+
return !label ? (checkbox) : (React.createElement(index_js_2.Box, { as: 'label', className: (0, classnames_1.default)('iui-checkbox-wrapper', {
|
|
76
75
|
'iui-disabled': disabled,
|
|
77
76
|
[`iui-${status}`]: !!status,
|
|
78
77
|
'iui-loading': isLoading,
|
|
79
78
|
}, className), style: style },
|
|
80
79
|
checkbox,
|
|
81
|
-
label && React.createElement(
|
|
80
|
+
label && (React.createElement(index_js_2.Box, { as: 'span', className: 'iui-checkbox-label' }, label))));
|
|
82
81
|
});
|
|
83
82
|
exports.default = exports.Checkbox;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { CommonProps } from '../utils/index.js';
|
|
1
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
2
|
import '@itwin/itwinui-css/css/color-picker.css';
|
|
4
|
-
export declare type ColorBuilderProps = Omit<CommonProps, 'title'>;
|
|
5
3
|
/**
|
|
6
4
|
* `ColorBuilder` consists of two parts:
|
|
7
5
|
* a color canvas to adjust saturation and lightness values,
|
|
8
6
|
* and a set of sliders to adjust hue and alpha values.
|
|
9
7
|
*/
|
|
10
|
-
export declare const ColorBuilder:
|
|
8
|
+
export declare const ColorBuilder: PolymorphicForwardRefComponent<"div", {}>;
|
|
@@ -55,7 +55,6 @@ exports.ColorBuilder = React.forwardRef((props, ref) => {
|
|
|
55
55
|
const { className, ...rest } = props;
|
|
56
56
|
const builderRef = React.useRef();
|
|
57
57
|
const refs = (0, index_js_1.useMergedRefs)(builderRef, ref);
|
|
58
|
-
(0, index_js_1.useTheme)();
|
|
59
58
|
const { activeColor, hsvColor, onChangeComplete, applyHsvColorChange, showAlpha, } = (0, ColorPickerContext_js_1.useColorPickerContext)();
|
|
60
59
|
// Set values for slider
|
|
61
60
|
const hueSliderColor = React.useMemo(() => index_js_1.ColorValue.create({ h: hsvColor.h, s: 100, v: 100 }), [hsvColor.h]);
|
|
@@ -188,8 +187,8 @@ exports.ColorBuilder = React.forwardRef((props, ref) => {
|
|
|
188
187
|
break;
|
|
189
188
|
}
|
|
190
189
|
};
|
|
191
|
-
return (React.createElement(
|
|
192
|
-
React.createElement(
|
|
190
|
+
return (React.createElement(index_js_1.Box, { className: (0, classnames_1.default)('iui-color-selection-wrapper', className), ref: refs, ...rest },
|
|
191
|
+
React.createElement(index_js_1.Box, { className: 'iui-color-field', style: {
|
|
193
192
|
'--iui-color-field-hue': hueColorString,
|
|
194
193
|
'--iui-color-picker-selected-color': dotColorString,
|
|
195
194
|
}, ref: squareRef, onPointerDown: (event) => {
|
|
@@ -199,7 +198,7 @@ exports.ColorBuilder = React.forwardRef((props, ref) => {
|
|
|
199
198
|
setColorDotActive(true);
|
|
200
199
|
(_a = colorDotRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
201
200
|
} },
|
|
202
|
-
React.createElement(
|
|
201
|
+
React.createElement(index_js_1.Box, { className: 'iui-color-dot', style: {
|
|
203
202
|
'--iui-color-dot-inset': `${squareTop.toString()}% auto auto ${squareLeft.toString()}%`,
|
|
204
203
|
}, onPointerDown: () => {
|
|
205
204
|
var _a;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { CommonProps } from '../utils/index.js';
|
|
1
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
2
|
import '@itwin/itwinui-css/css/color-picker.css';
|
|
4
|
-
|
|
3
|
+
declare type ColorInputPanelProps = {
|
|
5
4
|
/**
|
|
6
5
|
* The default color format to be inputted in the panel.
|
|
7
6
|
*/
|
|
@@ -14,7 +13,7 @@ export declare type ColorInputPanelProps = {
|
|
|
14
13
|
* @default ['hsl', 'rgb', 'hex']
|
|
15
14
|
*/
|
|
16
15
|
allowedColorFormats?: ('hsl' | 'rgb' | 'hex')[];
|
|
17
|
-
}
|
|
16
|
+
};
|
|
18
17
|
/**
|
|
19
18
|
* `ColorInputPanel` shows input fields to enter precise color values in the specified format.
|
|
20
19
|
* It also allows switching between the specified formats using a swap button.
|
|
@@ -24,18 +23,5 @@ export declare type ColorInputPanelProps = {
|
|
|
24
23
|
* <ColorInputPanel defaultColorFormat='hsl' />
|
|
25
24
|
* </ColorPicker>
|
|
26
25
|
*/
|
|
27
|
-
export declare const ColorInputPanel:
|
|
28
|
-
/**
|
|
29
|
-
* The default color format to be inputted in the panel.
|
|
30
|
-
*/
|
|
31
|
-
defaultColorFormat: 'hsl' | 'rgb' | 'hex';
|
|
32
|
-
/**
|
|
33
|
-
* Color formats to switch between. The swap button will cycle between these formats.
|
|
34
|
-
*
|
|
35
|
-
* If array only has one option, then swap button will not be shown.
|
|
36
|
-
*
|
|
37
|
-
* @default ['hsl', 'rgb', 'hex']
|
|
38
|
-
*/
|
|
39
|
-
allowedColorFormats?: ("rgb" | "hsl" | "hex")[] | undefined;
|
|
40
|
-
} & Omit<CommonProps, "title"> & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
export declare const ColorInputPanel: PolymorphicForwardRefComponent<"div", ColorInputPanelProps>;
|
|
41
27
|
export default ColorInputPanel;
|
|
@@ -50,7 +50,6 @@ require("@itwin/itwinui-css/css/color-picker.css");
|
|
|
50
50
|
exports.ColorInputPanel = React.forwardRef((props, ref) => {
|
|
51
51
|
var _a, _b, _c, _d, _f, _g, _h, _j;
|
|
52
52
|
const { defaultColorFormat, allowedColorFormats = ['hsl', 'rgb', 'hex'], className, ...rest } = props;
|
|
53
|
-
(0, index_js_3.useTheme)();
|
|
54
53
|
const inputsContainerRef = React.useRef(null);
|
|
55
54
|
const { activeColor, applyHsvColorChange, hsvColor, showAlpha } = (0, ColorPickerContext_js_1.useColorPickerContext)();
|
|
56
55
|
const [currentFormat, setCurrentFormat] = React.useState(defaultColorFormat);
|
|
@@ -295,14 +294,14 @@ exports.ColorInputPanel = React.forwardRef((props, ref) => {
|
|
|
295
294
|
handleColorInputChange();
|
|
296
295
|
}
|
|
297
296
|
} })))));
|
|
298
|
-
return (React.createElement(
|
|
299
|
-
React.createElement(
|
|
297
|
+
return (React.createElement(index_js_3.Box, { className: (0, classnames_1.default)('iui-color-input-wrapper', className), ref: ref, ...rest },
|
|
298
|
+
React.createElement(index_js_3.Box, { className: 'iui-color-picker-section-label' }, showAlpha && currentFormat != 'hex'
|
|
300
299
|
? currentFormat.toUpperCase() + 'A'
|
|
301
300
|
: currentFormat.toUpperCase()),
|
|
302
|
-
React.createElement(
|
|
301
|
+
React.createElement(index_js_3.Box, { className: 'iui-color-input' },
|
|
303
302
|
allowedColorFormats.length > 1 && (React.createElement(index_js_1.IconButton, { styleType: 'borderless', onClick: swapColorFormat, size: 'small' },
|
|
304
303
|
React.createElement(index_js_3.SvgSwap, null))),
|
|
305
|
-
React.createElement(
|
|
304
|
+
React.createElement(index_js_3.Box, { ref: inputsContainerRef, className: 'iui-color-input-fields' },
|
|
306
305
|
currentFormat === 'hex' && hexInputField,
|
|
307
306
|
currentFormat === 'rgb' && rgbInputs,
|
|
308
307
|
currentFormat === 'hsl' && hslInputs))));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ColorValue } from '../utils/index.js';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ColorType, PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
4
4
|
import '@itwin/itwinui-css/css/color-picker.css';
|
|
5
5
|
export declare type ColorPaletteProps = {
|
|
6
6
|
/**
|
|
@@ -15,7 +15,7 @@ export declare type ColorPaletteProps = {
|
|
|
15
15
|
* Pass any custom swatches as children.
|
|
16
16
|
*/
|
|
17
17
|
children?: React.ReactNode;
|
|
18
|
-
}
|
|
18
|
+
};
|
|
19
19
|
/**
|
|
20
20
|
* `ColorPalette` is used to show a group of `ColorSwatch` components.
|
|
21
21
|
* @example
|
|
@@ -27,18 +27,5 @@ export declare type ColorPaletteProps = {
|
|
|
27
27
|
* // ...
|
|
28
28
|
* </ColorPalette>
|
|
29
29
|
*/
|
|
30
|
-
export declare const ColorPalette:
|
|
31
|
-
/**
|
|
32
|
-
* Label shown above the palette.
|
|
33
|
-
*/
|
|
34
|
-
label?: React.ReactNode;
|
|
35
|
-
/**
|
|
36
|
-
* List of colors shown as swatches in the palette.
|
|
37
|
-
*/
|
|
38
|
-
colors?: (ColorType | ColorValue)[] | undefined;
|
|
39
|
-
/**
|
|
40
|
-
* Pass any custom swatches as children.
|
|
41
|
-
*/
|
|
42
|
-
children?: React.ReactNode;
|
|
43
|
-
} & Omit<CommonProps, "title"> & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
export declare const ColorPalette: PolymorphicForwardRefComponent<"div", ColorPaletteProps>;
|
|
44
31
|
export default ColorPalette;
|
|
@@ -51,7 +51,6 @@ require("@itwin/itwinui-css/css/color-picker.css");
|
|
|
51
51
|
*/
|
|
52
52
|
exports.ColorPalette = React.forwardRef((props, ref) => {
|
|
53
53
|
const { colors, label, className, children, ...rest } = props;
|
|
54
|
-
(0, index_js_1.useTheme)();
|
|
55
54
|
const { activeColor, setActiveColor, onChangeComplete } = (0, ColorPickerContext_js_1.useColorPickerContext)();
|
|
56
55
|
const [focusedIndex, setFocusedIndex] = React.useState();
|
|
57
56
|
// callback ref to set tabindex=0 on first child if none of the swatches are tabbable
|
|
@@ -120,9 +119,9 @@ exports.ColorPalette = React.forwardRef((props, ref) => {
|
|
|
120
119
|
(_a = swatches[focusedIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
121
120
|
}
|
|
122
121
|
}, [focusedIndex]);
|
|
123
|
-
return (React.createElement(
|
|
124
|
-
label && React.createElement(
|
|
125
|
-
React.createElement(
|
|
122
|
+
return (React.createElement(index_js_1.Box, { className: (0, classnames_1.default)('iui-color-palette-wrapper', className), ref: ref, ...rest },
|
|
123
|
+
label && React.createElement(index_js_1.Box, { className: 'iui-color-picker-section-label' }, label),
|
|
124
|
+
React.createElement(index_js_1.Box, { className: 'iui-color-palette', onKeyDown: handleKeyDown, ref: paletteRefs },
|
|
126
125
|
children,
|
|
127
126
|
colors &&
|
|
128
127
|
colors.map((_color, index) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import '@itwin/itwinui-css/css/color-picker.css';
|
|
3
3
|
import { ColorValue } from '../utils/index.js';
|
|
4
|
-
import type {
|
|
4
|
+
import type { ColorType, PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
5
5
|
export declare const getColorValue: (color: ColorType | ColorValue | undefined) => ColorValue;
|
|
6
|
-
|
|
6
|
+
declare type ColorPickerProps = {
|
|
7
7
|
/**
|
|
8
8
|
* Content of the color palette.
|
|
9
9
|
*
|
|
@@ -36,7 +36,7 @@ export declare type ColorPickerProps = {
|
|
|
36
36
|
* @default false
|
|
37
37
|
*/
|
|
38
38
|
showAlpha?: boolean;
|
|
39
|
-
}
|
|
39
|
+
};
|
|
40
40
|
/**
|
|
41
41
|
* ColorPicker to display color builder options, color inputs, and a palette of ColorSwatches.
|
|
42
42
|
* @example
|
|
@@ -50,5 +50,5 @@ export declare type ColorPickerProps = {
|
|
|
50
50
|
* <ColorPalette label='Saved colors' colors={['#FFFFFF', '#5A6973']} />
|
|
51
51
|
* </ColorPicker>
|
|
52
52
|
*/
|
|
53
|
-
export declare const ColorPicker:
|
|
53
|
+
export declare const ColorPicker: PolymorphicForwardRefComponent<"div", ColorPickerProps>;
|
|
54
54
|
export default ColorPicker;
|
|
@@ -56,9 +56,8 @@ exports.getColorValue = getColorValue;
|
|
|
56
56
|
* <ColorPalette label='Saved colors' colors={['#FFFFFF', '#5A6973']} />
|
|
57
57
|
* </ColorPicker>
|
|
58
58
|
*/
|
|
59
|
-
|
|
59
|
+
exports.ColorPicker = React.forwardRef((props, forwardedRef) => {
|
|
60
60
|
const { children, className, selectedColor, onChange, onChangeComplete, setFocus = false, showAlpha = false, ...rest } = props;
|
|
61
|
-
(0, index_js_1.useTheme)();
|
|
62
61
|
const ref = React.useRef(null);
|
|
63
62
|
// set focus on the first tabbable element
|
|
64
63
|
React.useEffect(() => {
|
|
@@ -98,7 +97,7 @@ const ColorPicker = (props) => {
|
|
|
98
97
|
// this converts it to store in tbgr
|
|
99
98
|
setActiveColor(newActiveColor);
|
|
100
99
|
}, [onChange, onChangeComplete]);
|
|
101
|
-
return (React.createElement(
|
|
100
|
+
return (React.createElement(index_js_1.Box, { className: (0, classnames_1.default)('iui-color-picker', className), ref: (0, index_js_1.useMergedRefs)(ref, forwardedRef), ...rest },
|
|
102
101
|
React.createElement(ColorPickerContext_js_1.ColorPickerContext.Provider, { value: {
|
|
103
102
|
activeColor,
|
|
104
103
|
setActiveColor,
|
|
@@ -107,6 +106,5 @@ const ColorPicker = (props) => {
|
|
|
107
106
|
onChangeComplete,
|
|
108
107
|
showAlpha,
|
|
109
108
|
} }, children)));
|
|
110
|
-
};
|
|
111
|
-
exports.ColorPicker = ColorPicker;
|
|
109
|
+
});
|
|
112
110
|
exports.default = exports.ColorPicker;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import '@itwin/itwinui-css/css/color-picker.css';
|
|
3
2
|
import { ColorValue } from '../utils/index.js';
|
|
4
|
-
import type { ColorType } from '../utils/index.js';
|
|
5
|
-
|
|
3
|
+
import type { ColorType, PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
4
|
+
declare type ColorSwatchProps = {
|
|
6
5
|
/**
|
|
7
6
|
* Color code.
|
|
8
7
|
*/
|
|
@@ -11,12 +10,12 @@ export declare type ColorSwatchProps = {
|
|
|
11
10
|
* Is color selected.
|
|
12
11
|
*/
|
|
13
12
|
isActive?: boolean;
|
|
14
|
-
}
|
|
13
|
+
};
|
|
15
14
|
/**
|
|
16
15
|
* ColorSwatch component to display within a color palette.
|
|
17
16
|
* @example
|
|
18
17
|
* <ColorSwatch color='#23450b' onClick={onClick}/>
|
|
19
18
|
* <ColorSwatch color={{ r: 255, g: 255, b: 0 }} onClick={onClick}/>
|
|
20
19
|
*/
|
|
21
|
-
export declare const ColorSwatch:
|
|
20
|
+
export declare const ColorSwatch: PolymorphicForwardRefComponent<"div", ColorSwatchProps>;
|
|
22
21
|
export default ColorSwatch;
|
|
@@ -44,11 +44,10 @@ const ColorPicker_js_1 = require("./ColorPicker.js");
|
|
|
44
44
|
*/
|
|
45
45
|
exports.ColorSwatch = React.forwardRef((props, ref) => {
|
|
46
46
|
const { color, style, onClick, isActive, className, ...rest } = props;
|
|
47
|
-
(0, index_js_1.useTheme)();
|
|
48
47
|
const colorString = React.useMemo(() => typeof color === 'string'
|
|
49
48
|
? color
|
|
50
49
|
: (0, ColorPicker_js_1.getColorValue)(color).toHslString(true), [color]);
|
|
51
|
-
return (React.createElement(
|
|
50
|
+
return (React.createElement(index_js_1.Box, { className: (0, classnames_1.default)('iui-color-swatch', { 'iui-active': isActive }, className), style: {
|
|
52
51
|
'--iui-color-swatch-background': colorString,
|
|
53
52
|
...style,
|
|
54
53
|
}, onClick: onClick, tabIndex: isActive ? 0 : -1, "aria-selected": isActive, ref: ref, ...rest }));
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
export { ColorPicker } from './ColorPicker.js';
|
|
2
|
-
export type { ColorPickerProps } from './ColorPicker.js';
|
|
3
2
|
declare const _default: "./ColorPicker";
|
|
4
3
|
export default _default;
|
|
5
4
|
export { ColorSwatch } from './ColorSwatch.js';
|
|
6
|
-
export type { ColorSwatchProps } from './ColorSwatch.js';
|
|
7
5
|
export { ColorPalette } from './ColorPalette.js';
|
|
8
|
-
export type { ColorPaletteProps } from './ColorPalette.js';
|
|
9
6
|
export { ColorBuilder } from './ColorBuilder.js';
|
|
10
|
-
export type { ColorBuilderProps } from './ColorBuilder.js';
|
|
11
7
|
export { ColorInputPanel } from './ColorInputPanel.js';
|
|
12
|
-
export type { ColorInputPanelProps } from './ColorInputPanel.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { InputProps } from '../Input/index.js';
|
|
3
2
|
import type { SelectOption } from '../Select/index.js';
|
|
4
|
-
import type {
|
|
3
|
+
import type { Input } from '../Input/Input.js';
|
|
4
|
+
import type { PopoverProps, InputContainerProps, CommonProps } from '../utils/index.js';
|
|
5
5
|
import 'tippy.js/animations/shift-away.css';
|
|
6
6
|
declare type ActionType = 'added' | 'removed';
|
|
7
7
|
declare type MultipleOnChangeProps<T> = {
|
|
@@ -45,7 +45,7 @@ export declare type ComboBoxProps<T> = {
|
|
|
45
45
|
/**
|
|
46
46
|
* Native input element props.
|
|
47
47
|
*/
|
|
48
|
-
inputProps?: Omit<
|
|
48
|
+
inputProps?: Omit<React.ComponentProps<typeof Input>, 'setFocus'>;
|
|
49
49
|
/**
|
|
50
50
|
* Props to customize dropdown menu behavior.
|
|
51
51
|
*/
|
|
@@ -84,7 +84,7 @@ export declare type ComboBoxProps<T> = {
|
|
|
84
84
|
* Callback fired when dropdown menu is closed.
|
|
85
85
|
*/
|
|
86
86
|
onHide?: () => void;
|
|
87
|
-
} & ComboboxMultipleTypeProps<T> & Pick<InputContainerProps, 'status'> &
|
|
87
|
+
} & ComboboxMultipleTypeProps<T> & Pick<InputContainerProps, 'status'> & CommonProps;
|
|
88
88
|
/**
|
|
89
89
|
* ComboBox component that allows typing a value to filter the options in dropdown list.
|
|
90
90
|
* Values can be selected either using mouse clicks or using the Enter key.
|
|
@@ -32,7 +32,6 @@ exports.ComboBox = void 0;
|
|
|
32
32
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
33
33
|
*--------------------------------------------------------------------------------------------*/
|
|
34
34
|
const React = __importStar(require("react"));
|
|
35
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
36
35
|
const index_js_1 = require("../Menu/index.js");
|
|
37
36
|
const SelectTag_js_1 = __importDefault(require("../Select/SelectTag.js"));
|
|
38
37
|
const index_js_2 = require("../Typography/index.js");
|
|
@@ -79,7 +78,6 @@ const ComboBox = (props) => {
|
|
|
79
78
|
var _a, _b;
|
|
80
79
|
return (_b = (_a = props.id) !== null && _a !== void 0 ? _a : ((inputProps === null || inputProps === void 0 ? void 0 : inputProps.id) && `${inputProps.id}-cb`)) !== null && _b !== void 0 ? _b : `iui-cb-${(0, index_js_3.getRandomValue)(10)}`;
|
|
81
80
|
});
|
|
82
|
-
(0, index_js_3.useTheme)();
|
|
83
81
|
// Refs get set in subcomponents
|
|
84
82
|
const inputRef = React.useRef(null);
|
|
85
83
|
const menuRef = React.useRef(null);
|
|
@@ -276,6 +274,8 @@ const ComboBox = (props) => {
|
|
|
276
274
|
const getMenuItem = React.useCallback((option, filteredIndex) => {
|
|
277
275
|
const optionId = getOptionId(option, id);
|
|
278
276
|
const { __originalIndex } = optionsExtraInfoRef.current[optionId];
|
|
277
|
+
const { icon, startIcon: startIconProp, ...restOptions } = option;
|
|
278
|
+
const startIcon = startIconProp !== null && startIconProp !== void 0 ? startIconProp : icon;
|
|
279
279
|
const customItem = itemRenderer
|
|
280
280
|
? itemRenderer(option, {
|
|
281
281
|
isFocused: focusedIndex === __originalIndex,
|
|
@@ -290,11 +290,9 @@ const ComboBox = (props) => {
|
|
|
290
290
|
onClickHandler(__originalIndex);
|
|
291
291
|
(_b = (_a = customItem.props).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
292
292
|
},
|
|
293
|
-
// ComboBox.MenuItem handles scrollIntoView, data-iui-index and
|
|
293
|
+
// ComboBox.MenuItem handles scrollIntoView, data-iui-index and focused through context
|
|
294
294
|
// but we still need to pass them here for backwards compatibility with MenuItem
|
|
295
|
-
|
|
296
|
-
'iui-focused': focusedIndex === __originalIndex,
|
|
297
|
-
}),
|
|
295
|
+
focused: focusedIndex === __originalIndex,
|
|
298
296
|
'data-iui-index': __originalIndex,
|
|
299
297
|
'data-iui-filtered-index': filteredIndex,
|
|
300
298
|
ref: (0, index_js_3.mergeRefs)(customItem.props.ref, (el) => {
|
|
@@ -302,7 +300,7 @@ const ComboBox = (props) => {
|
|
|
302
300
|
el === null || el === void 0 ? void 0 : el.scrollIntoView({ block: 'nearest' });
|
|
303
301
|
}
|
|
304
302
|
}),
|
|
305
|
-
})) : (React.createElement(ComboBoxMenuItem_js_1.ComboBoxMenuItem, { key: optionId, id: optionId, ...
|
|
303
|
+
})) : (React.createElement(ComboBoxMenuItem_js_1.ComboBoxMenuItem, { key: optionId, id: optionId, startIcon: startIcon, ...restOptions, isSelected: isMenuItemSelected(__originalIndex), onClick: () => {
|
|
306
304
|
onClickHandler(__originalIndex);
|
|
307
305
|
}, index: __originalIndex, "data-iui-filtered-index": filteredIndex }, option.label));
|
|
308
306
|
}, [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type { PopoverProps } from '../utils/index.js';
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { PopoverProps, PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
3
|
declare type ComboBoxDropdownProps = PopoverProps & {
|
|
4
4
|
children: JSX.Element;
|
|
5
5
|
};
|
|
6
|
-
export declare const ComboBoxDropdown:
|
|
6
|
+
export declare const ComboBoxDropdown: PolymorphicForwardRefComponent<"div", ComboBoxDropdownProps>;
|
|
7
7
|
export {};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
disabled?: boolean
|
|
4
|
-
isOpen?: boolean
|
|
5
|
-
}
|
|
1
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
2
|
+
declare type ComboBoxEndIconProps = {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
isOpen?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const ComboBoxEndIcon: PolymorphicForwardRefComponent<"span", ComboBoxEndIconProps>;
|
|
7
|
+
export {};
|
|
@@ -40,7 +40,7 @@ exports.ComboBoxEndIcon = React.forwardRef((props, forwardedRef) => {
|
|
|
40
40
|
const dispatch = (0, index_js_1.useSafeContext)(helpers_js_1.ComboBoxActionContext);
|
|
41
41
|
const { toggleButtonRef } = (0, index_js_1.useSafeContext)(helpers_js_1.ComboBoxRefsContext);
|
|
42
42
|
const refs = (0, index_js_1.useMergedRefs)(toggleButtonRef, forwardedRef);
|
|
43
|
-
return (React.createElement(
|
|
43
|
+
return (React.createElement(index_js_1.Box, { as: 'span', ref: refs, className: (0, classnames_1.default)('iui-end-icon', {
|
|
44
44
|
'iui-actionable': !disabled,
|
|
45
45
|
'iui-disabled': disabled,
|
|
46
46
|
'iui-open': isOpen,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { Input } from '../Input/index.js';
|
|
3
|
+
import { type PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
4
|
+
declare type ComboBoxInputProps = {
|
|
5
|
+
selectTags?: JSX.Element[];
|
|
6
|
+
} & React.ComponentProps<typeof Input>;
|
|
7
|
+
export declare const ComboBoxInput: PolymorphicForwardRefComponent<"input", ComboBoxInputProps>;
|
|
8
|
+
export {};
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
declare
|
|
4
|
-
export declare const ComboBoxInputContainer: {
|
|
5
|
-
(props: ComboBoxInputContainerProps): JSX.Element;
|
|
6
|
-
displayName: string;
|
|
7
|
-
};
|
|
1
|
+
import type { InputContainerProps, PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
2
|
+
declare type ComboBoxInputContainerProps = Pick<InputContainerProps, 'status' | 'message' | 'disabled'>;
|
|
3
|
+
export declare const ComboBoxInputContainer: PolymorphicForwardRefComponent<"div", ComboBoxInputContainerProps>;
|
|
8
4
|
export {};
|
|
@@ -32,12 +32,11 @@ const React = __importStar(require("react"));
|
|
|
32
32
|
const index_js_1 = require("../StatusMessage/index.js");
|
|
33
33
|
const index_js_2 = require("../utils/index.js");
|
|
34
34
|
const helpers_js_1 = require("./helpers.js");
|
|
35
|
-
|
|
35
|
+
exports.ComboBoxInputContainer = React.forwardRef((props, forwardedRef) => {
|
|
36
36
|
const { className, status, message, children, ...rest } = props;
|
|
37
37
|
const { id } = (0, index_js_2.useSafeContext)(helpers_js_1.ComboBoxStateContext);
|
|
38
38
|
return (React.createElement(index_js_2.InputContainer, { className: className, status: status, statusMessage: typeof message === 'string' ? (React.createElement(index_js_1.StatusMessage, { status: status }, message)) : (React.isValidElement(message) &&
|
|
39
|
-
React.cloneElement(message, { status })), ...rest, id: id },
|
|
40
|
-
React.createElement(
|
|
41
|
-
};
|
|
42
|
-
exports.ComboBoxInputContainer = ComboBoxInputContainer;
|
|
39
|
+
React.cloneElement(message, { status })), ref: forwardedRef, ...rest, id: id },
|
|
40
|
+
React.createElement(index_js_2.Box, { className: 'iui-input-with-icon' }, children)));
|
|
41
|
+
});
|
|
43
42
|
exports.ComboBoxInputContainer.displayName = 'ComboBoxInputContainer';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
2
|
+
import { Menu } from '../Menu/index.js';
|
|
3
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
4
|
+
declare type ComboBoxMenuProps = Omit<React.ComponentPropsWithoutRef<typeof Menu>, 'onClick'> & React.ComponentPropsWithoutRef<'ul'>;
|
|
5
|
+
export declare const ComboBoxMenu: PolymorphicForwardRefComponent<"ul", ComboBoxMenuProps>;
|
|
6
|
+
export {};
|
|
@@ -69,9 +69,9 @@ const VirtualizedComboBoxMenu = React.forwardRef(({ children, className, style,
|
|
|
69
69
|
overflowY: isOverflowOverlaySupported() ? 'overlay' : 'auto',
|
|
70
70
|
...style,
|
|
71
71
|
};
|
|
72
|
-
return (React.createElement(index_js_2.Surface, { style: surfaceStyles
|
|
72
|
+
return (React.createElement(index_js_2.Surface, { style: surfaceStyles },
|
|
73
73
|
React.createElement("div", { ...outerProps },
|
|
74
|
-
React.createElement(index_js_1.Menu, { id: `${id}-list`, setFocus: false, role: 'listbox', ref: (0, index_js_3.mergeRefs)(menuRef, innerProps.ref, forwardedRef), className: className, style: innerProps.style }, visibleChildren))));
|
|
74
|
+
React.createElement(index_js_1.Menu, { id: `${id}-list`, setFocus: false, role: 'listbox', ref: (0, index_js_3.mergeRefs)(menuRef, innerProps.ref, forwardedRef), className: className, style: innerProps.style, ...rest }, visibleChildren))));
|
|
75
75
|
});
|
|
76
76
|
exports.ComboBoxMenu = React.forwardRef((props, forwardedRef) => {
|
|
77
77
|
const { className, style, ...rest } = props;
|
|
@@ -1,21 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
value?: unknown;
|
|
6
|
-
onClick?: ((value?: unknown) => void) | undefined;
|
|
7
|
-
size?: "default" | "large" | undefined;
|
|
8
|
-
sublabel?: React.ReactNode;
|
|
9
|
-
icon?: JSX.Element | undefined;
|
|
10
|
-
badge?: JSX.Element | undefined;
|
|
11
|
-
role?: string | undefined;
|
|
12
|
-
subMenuItems?: JSX.Element[] | undefined;
|
|
13
|
-
children?: React.ReactNode;
|
|
14
|
-
} & {
|
|
15
|
-
title?: string | undefined;
|
|
16
|
-
id?: string | undefined;
|
|
17
|
-
} & {
|
|
18
|
-
style?: React.CSSProperties | undefined;
|
|
19
|
-
} & import("../utils/props.js").ClassNameProps & {
|
|
2
|
+
import type { MenuItemProps } from '../Menu/MenuItem.js';
|
|
3
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
4
|
+
declare type ComboBoxMenuItemProps = MenuItemProps & {
|
|
20
5
|
index: number;
|
|
21
|
-
}
|
|
6
|
+
};
|
|
7
|
+
export declare const ComboBoxMenuItem: React.MemoExoticComponent<PolymorphicForwardRefComponent<"li", ComboBoxMenuItemProps>>;
|
|
8
|
+
export {};
|
|
@@ -22,21 +22,18 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
26
|
exports.ComboBoxMenuItem = void 0;
|
|
30
27
|
/*---------------------------------------------------------------------------------------------
|
|
31
28
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
32
29
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
33
30
|
*--------------------------------------------------------------------------------------------*/
|
|
34
|
-
const classnames_1 = __importDefault(require("classnames"));
|
|
35
31
|
const React = __importStar(require("react"));
|
|
36
32
|
const index_js_1 = require("../utils/index.js");
|
|
37
33
|
const helpers_js_1 = require("./helpers.js");
|
|
34
|
+
const ListItem_js_1 = require("../List/ListItem.js");
|
|
38
35
|
exports.ComboBoxMenuItem = React.memo(React.forwardRef((props, forwardedRef) => {
|
|
39
|
-
const { children, isSelected, disabled, value, onClick, sublabel, size = !!sublabel ? 'large' : 'default',
|
|
36
|
+
const { children, isSelected, disabled, value, onClick, sublabel, size = !!sublabel ? 'large' : 'default', startIcon, endIcon, role = 'option', index, ...rest } = props;
|
|
40
37
|
const { focusedIndex, enableVirtualization } = (0, index_js_1.useSafeContext)(helpers_js_1.ComboBoxStateContext);
|
|
41
38
|
const focusRef = (el) => {
|
|
42
39
|
if (!enableVirtualization && focusedIndex === index) {
|
|
@@ -44,22 +41,11 @@ exports.ComboBoxMenuItem = React.memo(React.forwardRef((props, forwardedRef) =>
|
|
|
44
41
|
}
|
|
45
42
|
};
|
|
46
43
|
const refs = (0, index_js_1.useMergedRefs)(forwardedRef, focusRef);
|
|
47
|
-
return (React.createElement(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
icon &&
|
|
54
|
-
React.cloneElement(icon, {
|
|
55
|
-
className: (0, classnames_1.default)(icon.props.className, 'iui-icon'),
|
|
56
|
-
}),
|
|
57
|
-
React.createElement("span", { className: 'iui-content' },
|
|
58
|
-
React.createElement("div", { className: 'iui-menu-label' }, children),
|
|
59
|
-
sublabel && React.createElement("div", { className: 'iui-menu-description' }, sublabel)),
|
|
60
|
-
badge &&
|
|
61
|
-
React.cloneElement(badge, {
|
|
62
|
-
className: (0, classnames_1.default)(badge.props.className, 'iui-icon'),
|
|
63
|
-
})));
|
|
44
|
+
return (React.createElement(ListItem_js_1.ListItem, { actionable: true, size: size, active: isSelected, disabled: disabled, focused: focusedIndex === index, ref: refs, onClick: () => onClick === null || onClick === void 0 ? void 0 : onClick(value), role: role, tabIndex: role === 'presentation' ? undefined : -1, "aria-selected": isSelected, "aria-disabled": disabled, "data-iui-index": index, ...rest },
|
|
45
|
+
startIcon && (React.createElement(ListItem_js_1.ListItem.Icon, { as: 'span', "aria-hidden": true }, startIcon)),
|
|
46
|
+
React.createElement(ListItem_js_1.ListItem.Content, null,
|
|
47
|
+
children,
|
|
48
|
+
sublabel && React.createElement(ListItem_js_1.ListItem.Description, null, sublabel)),
|
|
49
|
+
endIcon && (React.createElement(ListItem_js_1.ListItem.Icon, { as: 'span', "aria-hidden": true }, endIcon))));
|
|
64
50
|
}));
|
|
65
51
|
exports.ComboBoxMenuItem.displayName = 'ComboBoxMenuItem';
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
|
+
declare type ComboBoxMultipleContainerProps = {
|
|
4
|
+
selectedItems?: React.ReactNode[];
|
|
5
|
+
};
|
|
6
|
+
export declare const ComboBoxMultipleContainer: PolymorphicForwardRefComponent<"div", ComboBoxMultipleContainerProps>;
|
|
7
|
+
export {};
|