@itwin/itwinui-react 3.0.0-dev.8 → 3.0.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 +79 -762
- package/README.md +3 -5
- package/cjs/core/Alert/Alert.d.ts +1 -1
- package/cjs/core/Alert/Alert.js +4 -3
- package/cjs/core/Avatar/Avatar.js +2 -1
- package/cjs/core/Breadcrumbs/Breadcrumbs.js +23 -6
- package/cjs/core/ButtonGroup/ButtonGroup.js +6 -8
- package/cjs/core/Buttons/{Button/Button.d.ts → Button.d.ts} +2 -2
- package/cjs/core/Buttons/{Button/Button.js → Button.js} +1 -1
- package/{esm/core/Buttons/DropdownButton → cjs/core/Buttons}/DropdownButton.d.ts +3 -3
- package/cjs/core/Buttons/{DropdownButton/DropdownButton.js → DropdownButton.js} +14 -26
- package/{esm/core/Buttons/IconButton → cjs/core/Buttons}/IconButton.d.ts +2 -2
- package/cjs/core/Buttons/{IconButton/IconButton.js → IconButton.js} +6 -3
- package/{esm/core/Buttons/IdeasButton → cjs/core/Buttons}/IdeasButton.d.ts +1 -1
- package/cjs/core/Buttons/{IdeasButton/IdeasButton.js → IdeasButton.js} +3 -3
- package/{esm/core/Buttons/SplitButton → cjs/core/Buttons}/SplitButton.d.ts +6 -6
- package/cjs/core/Buttons/{SplitButton/SplitButton.js → SplitButton.js} +57 -34
- package/cjs/core/Carousel/Carousel.d.ts +14 -7
- package/cjs/core/Carousel/Carousel.js +9 -39
- package/cjs/core/Carousel/CarouselContext.d.ts +0 -4
- package/cjs/core/Carousel/CarouselDot.js +1 -1
- package/cjs/core/Carousel/CarouselDotsList.js +26 -2
- package/cjs/core/Carousel/CarouselNavigation.d.ts +3 -3
- package/cjs/core/Carousel/CarouselNavigation.js +13 -26
- package/cjs/core/Carousel/CarouselSlide.d.ts +1 -1
- package/cjs/core/Carousel/CarouselSlide.js +12 -2
- package/cjs/core/Carousel/CarouselSlider.d.ts +1 -1
- package/cjs/core/Carousel/CarouselSlider.js +2 -2
- package/cjs/core/Checkbox/Checkbox.js +7 -7
- package/cjs/core/ColorPicker/ColorBuilder.js +5 -3
- package/cjs/core/ColorPicker/ColorInputPanel.js +50 -30
- package/cjs/core/ColorPicker/ColorPalette.js +2 -80
- package/cjs/core/ColorPicker/ColorPicker.d.ts +9 -0
- package/cjs/core/ColorPicker/ColorPicker.js +6 -1
- package/cjs/core/ColorPicker/ColorSwatch.d.ts +1 -1
- package/cjs/core/ColorPicker/ColorSwatch.js +25 -15
- package/cjs/core/ComboBox/ComboBox.d.ts +8 -3
- package/cjs/core/ComboBox/ComboBox.js +48 -39
- package/cjs/core/ComboBox/ComboBoxEndIcon.js +2 -1
- package/cjs/core/ComboBox/ComboBoxInput.d.ts +1 -1
- package/cjs/core/ComboBox/ComboBoxInput.js +37 -29
- package/cjs/core/ComboBox/ComboBoxInputContainer.js +6 -6
- package/cjs/core/ComboBox/ComboBoxMenu.d.ts +1 -1
- package/cjs/core/ComboBox/ComboBoxMenu.js +74 -96
- package/cjs/core/ComboBox/helpers.d.ts +4 -1
- package/cjs/core/DatePicker/DatePicker.d.ts +9 -0
- package/cjs/core/DatePicker/DatePicker.js +13 -8
- package/cjs/core/Dialog/DialogBackdrop.js +4 -4
- package/cjs/core/Dialog/DialogTitleBar.js +2 -2
- package/cjs/core/{utils/components → Divider}/Divider.d.ts +1 -1
- package/cjs/core/{utils/components → Divider}/Divider.js +1 -1
- package/cjs/core/DropdownMenu/DropdownMenu.d.ts +6 -5
- package/cjs/core/DropdownMenu/DropdownMenu.js +61 -56
- package/cjs/core/ExpandableBlock/ExpandableBlock.d.ts +1 -1
- package/cjs/core/ExpandableBlock/ExpandableBlock.js +3 -2
- package/cjs/core/FileUpload/FileUploadCard.js +3 -2
- package/cjs/core/FileUpload/FileUploadTemplate.js +1 -1
- package/cjs/core/{utils/components → Flex}/Flex.d.ts +2 -2
- package/cjs/core/{utils/components → Flex}/Flex.js +1 -1
- package/cjs/core/Header/Header.js +11 -11
- package/cjs/core/Header/HeaderBasicButton.d.ts +1 -1
- package/cjs/core/Header/HeaderButton.d.ts +2 -2
- package/cjs/core/Header/HeaderDropdownButton.d.ts +1 -1
- package/cjs/core/Header/HeaderDropdownButton.js +7 -8
- package/cjs/core/Header/HeaderSplitButton.d.ts +1 -1
- package/cjs/core/Header/HeaderSplitButton.js +8 -9
- package/cjs/core/{utils/components → Icon}/Icon.d.ts +2 -2
- package/cjs/core/{utils/components → Icon}/Icon.js +1 -1
- package/cjs/core/InformationPanel/InformationPanelHeader.js +7 -7
- package/cjs/core/Input/Input.d.ts +0 -1
- package/cjs/core/Input/Input.js +0 -1
- package/cjs/core/InputGroup/InputGroup.d.ts +1 -1
- package/cjs/core/InputGroup/InputGroup.js +6 -6
- package/cjs/core/InputWithDecorations/InputWithDecorations.d.ts +1 -1
- package/cjs/core/InputWithDecorations/InputWithDecorations.js +2 -2
- package/cjs/core/LabeledInput/LabeledInput.d.ts +4 -4
- package/cjs/core/LabeledInput/LabeledInput.js +11 -13
- package/cjs/core/LabeledSelect/LabeledSelect.d.ts +2 -2
- package/cjs/core/LabeledSelect/LabeledSelect.js +10 -9
- package/cjs/core/LabeledTextarea/LabeledTextarea.d.ts +1 -1
- package/cjs/core/LabeledTextarea/LabeledTextarea.js +2 -2
- package/{esm/core/utils/components → cjs/core/LinkAction}/LinkAction.d.ts +2 -2
- package/cjs/core/{utils/components → LinkAction}/LinkAction.js +1 -1
- package/cjs/core/Menu/Menu.js +1 -1
- package/cjs/core/Menu/MenuItem.js +78 -55
- package/cjs/core/Menu/MenuItemSkeleton.js +2 -1
- package/cjs/core/Modal/Modal.js +5 -5
- package/cjs/core/NonIdealState/ErrorPage.js +17 -15
- package/cjs/core/Popover/Popover.d.ts +141 -0
- package/cjs/core/Popover/Popover.js +188 -0
- package/cjs/core/RadioTiles/RadioTileGroup.d.ts +1 -1
- package/cjs/core/RadioTiles/RadioTileGroup.js +4 -4
- package/cjs/core/SearchBox/SearchBox.d.ts +3 -2
- package/cjs/core/SearchBox/SearchBox.js +4 -3
- package/cjs/core/Select/Select.d.ts +6 -6
- package/cjs/core/Select/Select.js +95 -111
- package/cjs/core/Select/SelectTagContainer.js +2 -2
- package/cjs/core/SideNavigation/SideNavigation.js +5 -5
- package/cjs/core/SideNavigation/SidenavButton.d.ts +1 -1
- package/cjs/core/SideNavigation/SidenavButton.js +2 -2
- package/cjs/core/Slider/Slider.d.ts +3 -7
- package/cjs/core/Slider/Slider.js +8 -22
- package/cjs/core/Slider/Thumb.d.ts +2 -3
- package/cjs/core/Slider/Thumb.js +5 -9
- package/cjs/core/StatusMessage/StatusMessage.d.ts +1 -1
- package/cjs/core/StatusMessage/StatusMessage.js +2 -1
- package/cjs/core/Stepper/StepperStep.js +7 -7
- package/cjs/core/Stepper/WorkflowDiagramStep.js +5 -5
- package/cjs/core/Surface/Surface.d.ts +8 -0
- package/cjs/core/Surface/Surface.js +19 -1
- package/cjs/core/Table/SubRowExpander.d.ts +1 -1
- package/cjs/core/Table/SubRowExpander.js +2 -2
- package/cjs/core/Table/Table.d.ts +1 -1
- package/cjs/core/Table/Table.js +53 -60
- package/cjs/core/Table/TableCell.d.ts +1 -1
- package/cjs/core/Table/TablePaginator.js +27 -25
- package/cjs/core/Table/TableRowMemoized.d.ts +1 -1
- package/cjs/core/Table/actionHandlers/expandHandler.d.ts +1 -1
- package/cjs/core/Table/actionHandlers/filterHandler.d.ts +1 -1
- package/cjs/core/Table/actionHandlers/resizeHandler.d.ts +17 -17
- package/cjs/core/Table/actionHandlers/selectHandler.d.ts +8 -8
- package/cjs/core/Table/cells/DefaultCell.d.ts +1 -1
- package/cjs/core/Table/cells/EditableCell.d.ts +1 -1
- package/cjs/core/Table/columns/actionColumn.d.ts +2 -2
- package/cjs/core/Table/columns/actionColumn.js +13 -22
- package/cjs/core/Table/columns/expanderColumn.d.ts +1 -1
- package/cjs/core/Table/columns/expanderColumn.js +5 -4
- package/cjs/core/Table/columns/selectionColumn.d.ts +1 -1
- package/cjs/core/Table/columns/selectionColumn.js +5 -5
- package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.d.ts +1 -1
- package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.js +41 -40
- package/cjs/core/Table/filters/FilterButtonBar.js +3 -3
- package/cjs/core/Table/filters/FilterToggle.d.ts +1 -1
- package/cjs/core/Table/filters/FilterToggle.js +8 -5
- package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +3 -3
- package/cjs/core/Table/filters/TextFilter/TextFilter.js +2 -2
- package/cjs/core/Table/filters/customFilterFunctions.d.ts +1 -1
- package/cjs/core/Table/filters/defaultFilterFunctions.d.ts +1 -1
- package/cjs/core/Table/filters/types.d.ts +2 -19
- package/cjs/core/Table/hooks/useColumnDragAndDrop.d.ts +1 -1
- package/cjs/core/Table/hooks/useExpanderCell.d.ts +1 -1
- package/cjs/core/Table/hooks/useResizeColumns.d.ts +1 -1
- package/cjs/core/Table/hooks/useScrollToRow.d.ts +1 -1
- package/cjs/core/Table/hooks/useScrollToRow.js +1 -1
- package/cjs/core/Table/hooks/useSelectionCell.d.ts +1 -1
- package/cjs/core/Table/hooks/useStickyColumns.d.ts +1 -1
- package/cjs/core/Table/hooks/useSubRowFiltering.d.ts +1 -1
- package/cjs/core/Table/hooks/useSubRowSelection.d.ts +1 -1
- package/cjs/core/Table/index.d.ts +1 -1
- package/cjs/core/Table/utils.d.ts +1 -1
- package/cjs/core/Tabs/Tabs.d.ts +222 -52
- package/cjs/core/Tabs/Tabs.js +429 -375
- package/cjs/core/Tag/Tag.js +2 -2
- package/cjs/core/Textarea/Textarea.js +2 -2
- package/cjs/core/ThemeProvider/ThemeProvider.d.ts +3 -2
- package/cjs/core/ThemeProvider/ThemeProvider.js +17 -8
- package/cjs/core/Tile/Tile.d.ts +2 -2
- package/cjs/core/Tile/Tile.js +40 -39
- package/cjs/core/Toast/Toast.js +2 -2
- package/cjs/core/TransferList/TransferList.d.ts +1 -1
- package/cjs/core/TransferList/TransferList.js +6 -5
- package/cjs/core/Tree/TreeNodeExpander.d.ts +1 -1
- package/cjs/core/Tree/TreeNodeExpander.js +2 -2
- package/{esm/core/Typography/Anchor → cjs/core/Typography}/Anchor.d.ts +1 -1
- package/cjs/core/Typography/{Anchor/Anchor.js → Anchor.js} +1 -1
- package/{esm/core/Typography/Blockquote → cjs/core/Typography}/Blockquote.d.ts +1 -1
- package/cjs/core/Typography/{Blockquote/Blockquote.js → Blockquote.js} +1 -1
- package/cjs/core/Typography/{Code/Code.d.ts → Code.d.ts} +1 -1
- package/cjs/core/Typography/{Code/Code.js → Code.js} +1 -1
- package/{esm/core/Typography/Kbd → cjs/core/Typography}/Kbd.d.ts +1 -1
- package/cjs/core/Typography/{Kbd/Kbd.js → Kbd.js} +1 -1
- package/{esm/core/Typography/Text → cjs/core/Typography}/Text.d.ts +1 -1
- package/cjs/core/Typography/{Text/Text.js → Text.js} +1 -1
- package/{esm/core/utils/components → cjs/core/VisuallyHidden}/VisuallyHidden.d.ts +1 -1
- package/cjs/core/{utils/components → VisuallyHidden}/VisuallyHidden.js +1 -1
- package/cjs/core/utils/components/AutoclearingHiddenLiveRegion.js +1 -1
- package/cjs/core/utils/components/InputContainer.d.ts +4 -4
- package/cjs/core/utils/components/InputContainer.js +11 -7
- package/cjs/core/utils/components/WithCSSTransition.js +7 -1
- package/cjs/core/utils/components/index.d.ts +0 -6
- package/cjs/core/utils/components/index.js +0 -6
- package/cjs/core/utils/functions/dev.d.ts +11 -0
- package/cjs/core/utils/functions/dev.js +34 -0
- package/cjs/core/utils/functions/index.d.ts +1 -0
- package/cjs/core/utils/functions/index.js +1 -0
- package/cjs/core/utils/hooks/useGlobals.d.ts +1 -1
- package/cjs/core/utils/hooks/useGlobals.js +3 -7
- package/cjs/core/utils/hooks/useOverflow.js +3 -1
- package/cjs/index.d.ts +112 -2
- package/cjs/index.js +950 -5
- package/cjs/react-table/react-table.d.ts +745 -0
- package/cjs/{core/Badge/index.js → react-table/react-table.js} +5 -10
- package/cjs/styles.js +15 -18
- package/esm/core/Alert/Alert.d.ts +1 -1
- package/esm/core/Alert/Alert.js +2 -2
- package/esm/core/Avatar/Avatar.js +2 -6
- package/esm/core/Breadcrumbs/Breadcrumbs.js +24 -6
- package/esm/core/ButtonGroup/ButtonGroup.js +6 -8
- package/esm/core/Buttons/{Button/Button.d.ts → Button.d.ts} +2 -2
- package/esm/core/Buttons/{Button/Button.js → Button.js} +1 -1
- package/{cjs/core/Buttons/DropdownButton → esm/core/Buttons}/DropdownButton.d.ts +3 -3
- package/esm/core/Buttons/{DropdownButton/DropdownButton.js → DropdownButton.js} +10 -26
- package/{cjs/core/Buttons/IconButton → esm/core/Buttons}/IconButton.d.ts +2 -2
- package/esm/core/Buttons/{IconButton/IconButton.js → IconButton.js} +3 -2
- package/{cjs/core/Buttons/IdeasButton → esm/core/Buttons}/IdeasButton.d.ts +1 -1
- package/esm/core/Buttons/{IdeasButton/IdeasButton.js → IdeasButton.js} +2 -2
- package/{cjs/core/Buttons/SplitButton → esm/core/Buttons}/SplitButton.d.ts +6 -6
- package/esm/core/Buttons/{SplitButton/SplitButton.js → SplitButton.js} +56 -31
- package/esm/core/Carousel/Carousel.d.ts +14 -7
- package/esm/core/Carousel/Carousel.js +9 -39
- package/esm/core/Carousel/CarouselContext.d.ts +0 -4
- package/esm/core/Carousel/CarouselDot.js +1 -1
- package/esm/core/Carousel/CarouselDotsList.js +26 -2
- package/esm/core/Carousel/CarouselNavigation.d.ts +3 -3
- package/esm/core/Carousel/CarouselNavigation.js +6 -23
- package/esm/core/Carousel/CarouselSlide.d.ts +1 -1
- package/esm/core/Carousel/CarouselSlide.js +15 -3
- package/esm/core/Carousel/CarouselSlider.d.ts +1 -1
- package/esm/core/Carousel/CarouselSlider.js +2 -2
- package/esm/core/Checkbox/Checkbox.js +1 -1
- package/esm/core/ColorPicker/ColorBuilder.js +3 -1
- package/esm/core/ColorPicker/ColorInputPanel.js +27 -7
- package/esm/core/ColorPicker/ColorPalette.js +3 -83
- package/esm/core/ColorPicker/ColorPicker.d.ts +9 -0
- package/esm/core/ColorPicker/ColorPicker.js +6 -1
- package/esm/core/ColorPicker/ColorSwatch.d.ts +1 -1
- package/esm/core/ColorPicker/ColorSwatch.js +18 -12
- package/esm/core/ComboBox/ComboBox.d.ts +8 -3
- package/esm/core/ComboBox/ComboBox.js +38 -27
- package/esm/core/ComboBox/ComboBoxEndIcon.js +2 -1
- package/esm/core/ComboBox/ComboBoxInput.d.ts +1 -1
- package/esm/core/ComboBox/ComboBoxInput.js +23 -22
- package/esm/core/ComboBox/ComboBoxInputContainer.js +1 -1
- package/esm/core/ComboBox/ComboBoxMenu.d.ts +1 -1
- package/esm/core/ComboBox/ComboBoxMenu.js +68 -90
- package/esm/core/ComboBox/helpers.d.ts +4 -1
- package/esm/core/DatePicker/DatePicker.d.ts +9 -0
- package/esm/core/DatePicker/DatePicker.js +12 -3
- package/esm/core/Dialog/DialogBackdrop.js +1 -1
- package/esm/core/Dialog/DialogTitleBar.js +1 -1
- package/esm/core/{utils/components → Divider}/Divider.d.ts +1 -1
- package/esm/core/{utils/components → Divider}/Divider.js +1 -1
- package/esm/core/DropdownMenu/DropdownMenu.d.ts +6 -5
- package/esm/core/DropdownMenu/DropdownMenu.js +64 -57
- package/esm/core/ExpandableBlock/ExpandableBlock.d.ts +1 -1
- package/esm/core/ExpandableBlock/ExpandableBlock.js +1 -1
- package/esm/core/FileUpload/FileUploadCard.js +2 -2
- package/esm/core/FileUpload/FileUploadTemplate.js +1 -1
- package/esm/core/{utils/components → Flex}/Flex.d.ts +2 -2
- package/esm/core/{utils/components → Flex}/Flex.js +1 -1
- package/esm/core/Header/Header.js +2 -2
- package/esm/core/Header/HeaderBasicButton.d.ts +1 -1
- package/esm/core/Header/HeaderButton.d.ts +2 -2
- package/esm/core/Header/HeaderDropdownButton.d.ts +1 -1
- package/esm/core/Header/HeaderDropdownButton.js +2 -3
- package/esm/core/Header/HeaderSplitButton.d.ts +1 -1
- package/esm/core/Header/HeaderSplitButton.js +2 -3
- package/esm/core/{utils/components → Icon}/Icon.d.ts +2 -2
- package/esm/core/{utils/components → Icon}/Icon.js +1 -1
- package/esm/core/InformationPanel/InformationPanelHeader.js +1 -1
- package/esm/core/Input/Input.d.ts +0 -1
- package/esm/core/Input/Input.js +0 -1
- package/esm/core/InputGroup/InputGroup.d.ts +1 -1
- package/esm/core/InputGroup/InputGroup.js +3 -3
- package/esm/core/InputWithDecorations/InputWithDecorations.d.ts +1 -1
- package/esm/core/InputWithDecorations/InputWithDecorations.js +1 -1
- package/esm/core/LabeledInput/LabeledInput.d.ts +4 -4
- package/esm/core/LabeledInput/LabeledInput.js +5 -4
- package/esm/core/LabeledSelect/LabeledSelect.d.ts +2 -2
- package/esm/core/LabeledSelect/LabeledSelect.js +6 -4
- package/esm/core/LabeledTextarea/LabeledTextarea.d.ts +1 -1
- package/esm/core/LabeledTextarea/LabeledTextarea.js +2 -2
- package/{cjs/core/utils/components → esm/core/LinkAction}/LinkAction.d.ts +2 -2
- package/esm/core/{utils/components → LinkAction}/LinkAction.js +1 -1
- package/esm/core/Menu/Menu.js +7 -2
- package/esm/core/Menu/MenuItem.js +84 -52
- package/esm/core/Menu/MenuItemSkeleton.js +2 -1
- package/esm/core/Modal/Modal.js +1 -1
- package/esm/core/NonIdealState/ErrorPage.js +2 -2
- package/esm/core/Popover/Popover.d.ts +141 -0
- package/esm/core/Popover/Popover.js +205 -0
- package/esm/core/RadioTiles/RadioTileGroup.d.ts +1 -1
- package/esm/core/RadioTiles/RadioTileGroup.js +1 -1
- package/esm/core/SearchBox/SearchBox.d.ts +3 -2
- package/esm/core/SearchBox/SearchBox.js +2 -2
- package/esm/core/Select/Select.d.ts +6 -6
- package/esm/core/Select/Select.js +81 -96
- package/esm/core/Select/SelectTagContainer.js +1 -1
- package/esm/core/SideNavigation/SideNavigation.js +2 -2
- package/esm/core/SideNavigation/SidenavButton.d.ts +1 -1
- package/esm/core/SideNavigation/SidenavButton.js +1 -1
- package/esm/core/Slider/Slider.d.ts +3 -7
- package/esm/core/Slider/Slider.js +8 -19
- package/esm/core/Slider/Thumb.d.ts +2 -3
- package/esm/core/Slider/Thumb.js +2 -6
- package/esm/core/StatusMessage/StatusMessage.d.ts +1 -1
- package/esm/core/StatusMessage/StatusMessage.js +2 -1
- package/esm/core/Stepper/StepperStep.js +1 -1
- package/esm/core/Stepper/WorkflowDiagramStep.js +1 -1
- package/esm/core/Surface/Surface.d.ts +8 -0
- package/esm/core/Surface/Surface.js +19 -1
- package/esm/core/Table/SubRowExpander.d.ts +1 -1
- package/esm/core/Table/SubRowExpander.js +1 -1
- package/esm/core/Table/Table.d.ts +1 -1
- package/esm/core/Table/Table.js +7 -13
- package/esm/core/Table/TableCell.d.ts +1 -1
- package/esm/core/Table/TablePaginator.js +5 -3
- package/esm/core/Table/TableRowMemoized.d.ts +1 -1
- package/esm/core/Table/actionHandlers/expandHandler.d.ts +1 -1
- package/esm/core/Table/actionHandlers/filterHandler.d.ts +1 -1
- package/esm/core/Table/actionHandlers/resizeHandler.d.ts +17 -17
- package/esm/core/Table/actionHandlers/selectHandler.d.ts +8 -8
- package/esm/core/Table/cells/DefaultCell.d.ts +1 -1
- package/esm/core/Table/cells/EditableCell.d.ts +1 -1
- package/esm/core/Table/columns/actionColumn.d.ts +2 -2
- package/esm/core/Table/columns/actionColumn.js +7 -13
- package/esm/core/Table/columns/expanderColumn.d.ts +1 -1
- package/esm/core/Table/columns/expanderColumn.js +2 -1
- package/esm/core/Table/columns/selectionColumn.d.ts +1 -1
- package/esm/core/Table/columns/selectionColumn.js +1 -1
- package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.d.ts +1 -1
- package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.js +44 -46
- package/esm/core/Table/filters/FilterButtonBar.js +1 -1
- package/esm/core/Table/filters/FilterToggle.d.ts +1 -1
- package/esm/core/Table/filters/FilterToggle.js +7 -9
- package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +1 -1
- package/esm/core/Table/filters/TextFilter/TextFilter.js +1 -1
- package/esm/core/Table/filters/customFilterFunctions.d.ts +1 -1
- package/esm/core/Table/filters/defaultFilterFunctions.d.ts +1 -1
- package/esm/core/Table/filters/types.d.ts +2 -19
- package/esm/core/Table/hooks/useColumnDragAndDrop.d.ts +1 -1
- package/esm/core/Table/hooks/useExpanderCell.d.ts +1 -1
- package/esm/core/Table/hooks/useResizeColumns.d.ts +1 -1
- package/esm/core/Table/hooks/useScrollToRow.d.ts +1 -1
- package/esm/core/Table/hooks/useScrollToRow.js +1 -1
- package/esm/core/Table/hooks/useSelectionCell.d.ts +1 -1
- package/esm/core/Table/hooks/useStickyColumns.d.ts +1 -1
- package/esm/core/Table/hooks/useSubRowFiltering.d.ts +1 -1
- package/esm/core/Table/hooks/useSubRowSelection.d.ts +1 -1
- package/esm/core/Table/index.d.ts +1 -1
- package/esm/core/Table/utils.d.ts +1 -1
- package/esm/core/Tabs/Tabs.d.ts +222 -52
- package/esm/core/Tabs/Tabs.js +424 -368
- package/esm/core/Tag/Tag.js +1 -1
- package/esm/core/Textarea/Textarea.js +1 -1
- package/esm/core/ThemeProvider/ThemeProvider.d.ts +3 -2
- package/esm/core/ThemeProvider/ThemeProvider.js +17 -8
- package/esm/core/Tile/Tile.d.ts +2 -2
- package/esm/core/Tile/Tile.js +36 -36
- package/esm/core/Toast/Toast.js +1 -1
- package/esm/core/TransferList/TransferList.d.ts +1 -1
- package/esm/core/TransferList/TransferList.js +3 -2
- package/esm/core/Tree/TreeNodeExpander.d.ts +1 -1
- package/esm/core/Tree/TreeNodeExpander.js +1 -1
- package/{cjs/core/Typography/Anchor → esm/core/Typography}/Anchor.d.ts +1 -1
- package/esm/core/Typography/{Anchor/Anchor.js → Anchor.js} +1 -1
- package/{cjs/core/Typography/Blockquote → esm/core/Typography}/Blockquote.d.ts +1 -1
- package/esm/core/Typography/{Blockquote/Blockquote.js → Blockquote.js} +1 -1
- package/esm/core/Typography/{Code/Code.d.ts → Code.d.ts} +1 -1
- package/esm/core/Typography/{Code/Code.js → Code.js} +1 -1
- package/{cjs/core/Typography/Kbd → esm/core/Typography}/Kbd.d.ts +1 -1
- package/esm/core/Typography/{Kbd/Kbd.js → Kbd.js} +1 -1
- package/{cjs/core/Typography/Text → esm/core/Typography}/Text.d.ts +1 -1
- package/esm/core/Typography/{Text/Text.js → Text.js} +1 -1
- package/{cjs/core/utils/components → esm/core/VisuallyHidden}/VisuallyHidden.d.ts +1 -1
- package/esm/core/{utils/components → VisuallyHidden}/VisuallyHidden.js +1 -1
- package/esm/core/utils/components/AutoclearingHiddenLiveRegion.js +1 -1
- package/esm/core/utils/components/InputContainer.d.ts +4 -4
- package/esm/core/utils/components/InputContainer.js +9 -4
- package/esm/core/utils/components/WithCSSTransition.js +7 -1
- package/esm/core/utils/components/index.d.ts +0 -6
- package/esm/core/utils/components/index.js +0 -6
- package/esm/core/utils/functions/dev.d.ts +11 -0
- package/esm/core/utils/functions/dev.js +29 -0
- package/esm/core/utils/functions/index.d.ts +1 -0
- package/esm/core/utils/functions/index.js +1 -0
- package/esm/core/utils/hooks/useGlobals.d.ts +1 -1
- package/esm/core/utils/hooks/useGlobals.js +1 -5
- package/esm/core/utils/hooks/useOverflow.js +3 -1
- package/esm/index.d.ts +112 -2
- package/esm/index.js +123 -2
- package/esm/react-table/react-table.d.ts +745 -0
- package/esm/{core/Backdrop/index.js → react-table/react-table.js} +5 -1
- package/esm/styles.js +15 -18
- package/package.json +22 -23
- package/react-table.d.ts +745 -0
- package/styles.css +58 -67
- package/cjs/core/Alert/index.d.ts +0 -3
- package/cjs/core/Alert/index.js +0 -15
- package/cjs/core/Avatar/index.d.ts +0 -3
- package/cjs/core/Avatar/index.js +0 -15
- package/cjs/core/AvatarGroup/index.d.ts +0 -3
- package/cjs/core/AvatarGroup/index.js +0 -15
- package/cjs/core/Backdrop/index.d.ts +0 -1
- package/cjs/core/Backdrop/index.js +0 -14
- package/cjs/core/Badge/index.d.ts +0 -3
- package/cjs/core/Breadcrumbs/index.d.ts +0 -3
- package/cjs/core/Breadcrumbs/index.js +0 -15
- package/cjs/core/ButtonGroup/index.d.ts +0 -3
- package/cjs/core/ButtonGroup/index.js +0 -15
- package/cjs/core/Buttons/Button/index.d.ts +0 -3
- package/cjs/core/Buttons/Button/index.js +0 -15
- package/cjs/core/Buttons/DropdownButton/index.d.ts +0 -3
- package/cjs/core/Buttons/DropdownButton/index.js +0 -15
- package/cjs/core/Buttons/IconButton/index.d.ts +0 -3
- package/cjs/core/Buttons/IconButton/index.js +0 -15
- package/cjs/core/Buttons/IdeasButton/index.d.ts +0 -3
- package/cjs/core/Buttons/IdeasButton/index.js +0 -15
- package/cjs/core/Buttons/SplitButton/index.d.ts +0 -3
- package/cjs/core/Buttons/SplitButton/index.js +0 -15
- package/cjs/core/Buttons/index.d.ts +0 -5
- package/cjs/core/Buttons/index.js +0 -47
- package/cjs/core/Carousel/index.d.ts +0 -3
- package/cjs/core/Carousel/index.js +0 -15
- package/cjs/core/Checkbox/index.d.ts +0 -3
- package/cjs/core/Checkbox/index.js +0 -15
- package/cjs/core/ColorPicker/index.d.ts +0 -7
- package/cjs/core/ColorPicker/index.js +0 -48
- package/cjs/core/ComboBox/ComboBoxDropdown.d.ts +0 -7
- package/cjs/core/ComboBox/ComboBoxDropdown.js +0 -43
- package/cjs/core/ComboBox/index.d.ts +0 -3
- package/cjs/core/ComboBox/index.js +0 -15
- package/cjs/core/DatePicker/index.d.ts +0 -3
- package/cjs/core/DatePicker/index.js +0 -21
- package/cjs/core/Dialog/index.d.ts +0 -3
- package/cjs/core/Dialog/index.js +0 -15
- package/cjs/core/DropdownMenu/index.d.ts +0 -4
- package/cjs/core/DropdownMenu/index.js +0 -15
- package/cjs/core/ExpandableBlock/index.d.ts +0 -3
- package/cjs/core/ExpandableBlock/index.js +0 -15
- package/cjs/core/Fieldset/index.d.ts +0 -3
- package/cjs/core/Fieldset/index.js +0 -15
- package/cjs/core/FileUpload/index.d.ts +0 -6
- package/cjs/core/FileUpload/index.js +0 -40
- package/cjs/core/Footer/index.d.ts +0 -4
- package/cjs/core/Footer/index.js +0 -21
- package/cjs/core/Header/index.d.ts +0 -6
- package/cjs/core/Header/index.js +0 -40
- package/cjs/core/InformationPanel/index.d.ts +0 -7
- package/cjs/core/InformationPanel/index.js +0 -48
- package/cjs/core/Input/index.d.ts +0 -3
- package/cjs/core/Input/index.js +0 -15
- package/cjs/core/InputGrid/index.d.ts +0 -3
- package/cjs/core/InputGrid/index.js +0 -15
- package/cjs/core/InputGroup/index.d.ts +0 -3
- package/cjs/core/InputGroup/index.js +0 -15
- package/cjs/core/InputWithDecorations/index.d.ts +0 -3
- package/cjs/core/InputWithDecorations/index.js +0 -15
- package/cjs/core/Label/index.d.ts +0 -3
- package/cjs/core/Label/index.js +0 -15
- package/cjs/core/LabeledInput/index.d.ts +0 -3
- package/cjs/core/LabeledInput/index.js +0 -15
- package/cjs/core/LabeledSelect/index.d.ts +0 -3
- package/cjs/core/LabeledSelect/index.js +0 -15
- package/cjs/core/LabeledTextarea/index.d.ts +0 -3
- package/cjs/core/LabeledTextarea/index.js +0 -15
- package/cjs/core/List/index.d.ts +0 -2
- package/cjs/core/List/index.js +0 -21
- package/cjs/core/Menu/index.d.ts +0 -5
- package/cjs/core/Menu/index.js +0 -47
- package/cjs/core/Modal/index.d.ts +0 -5
- package/cjs/core/Modal/index.js +0 -29
- package/cjs/core/NonIdealState/index.d.ts +0 -5
- package/cjs/core/NonIdealState/index.js +0 -22
- package/cjs/core/NotificationMarker/index.d.ts +0 -3
- package/cjs/core/NotificationMarker/index.js +0 -15
- package/cjs/core/Overlay/index.d.ts +0 -1
- package/cjs/core/Overlay/index.js +0 -14
- package/cjs/core/ProgressIndicators/index.d.ts +0 -2
- package/cjs/core/ProgressIndicators/index.js +0 -21
- package/cjs/core/Radio/index.d.ts +0 -3
- package/cjs/core/Radio/index.js +0 -15
- package/cjs/core/RadioTiles/index.d.ts +0 -4
- package/cjs/core/RadioTiles/index.js +0 -22
- package/cjs/core/SearchBox/index.d.ts +0 -3
- package/cjs/core/SearchBox/index.js +0 -15
- package/cjs/core/Select/index.d.ts +0 -4
- package/cjs/core/Select/index.js +0 -15
- package/cjs/core/SideNavigation/index.d.ts +0 -6
- package/cjs/core/SideNavigation/index.js +0 -40
- package/cjs/core/SkipToContentLink/index.d.ts +0 -3
- package/cjs/core/SkipToContentLink/index.js +0 -15
- package/cjs/core/Slider/index.d.ts +0 -3
- package/cjs/core/Slider/index.js +0 -15
- package/cjs/core/StatusMessage/index.d.ts +0 -3
- package/cjs/core/StatusMessage/index.js +0 -15
- package/cjs/core/Stepper/index.d.ts +0 -3
- package/cjs/core/Stepper/index.js +0 -21
- package/cjs/core/Surface/index.d.ts +0 -3
- package/cjs/core/Surface/index.js +0 -15
- package/cjs/core/Tabs/Tab.d.ts +0 -40
- package/cjs/core/Tabs/Tab.js +0 -65
- package/cjs/core/Tabs/index.d.ts +0 -2
- package/cjs/core/Tabs/index.js +0 -21
- package/cjs/core/Tag/index.d.ts +0 -4
- package/cjs/core/Tag/index.js +0 -22
- package/cjs/core/Textarea/index.d.ts +0 -3
- package/cjs/core/Textarea/index.js +0 -15
- package/cjs/core/ThemeProvider/index.d.ts +0 -4
- package/cjs/core/ThemeProvider/index.js +0 -15
- package/cjs/core/Tile/index.d.ts +0 -3
- package/cjs/core/Tile/index.js +0 -15
- package/cjs/core/TimePicker/index.d.ts +0 -4
- package/cjs/core/TimePicker/index.js +0 -15
- package/cjs/core/Toast/index.d.ts +0 -1
- package/cjs/core/Toast/index.js +0 -14
- package/cjs/core/ToggleSwitch/index.d.ts +0 -3
- package/cjs/core/ToggleSwitch/index.js +0 -15
- package/cjs/core/Tooltip/index.d.ts +0 -3
- package/cjs/core/Tooltip/index.js +0 -15
- package/cjs/core/TransferList/index.d.ts +0 -3
- package/cjs/core/TransferList/index.js +0 -15
- package/cjs/core/Tree/index.d.ts +0 -4
- package/cjs/core/Tree/index.js +0 -28
- package/cjs/core/Typography/Anchor/index.d.ts +0 -3
- package/cjs/core/Typography/Anchor/index.js +0 -15
- package/cjs/core/Typography/Blockquote/index.d.ts +0 -3
- package/cjs/core/Typography/Blockquote/index.js +0 -15
- package/cjs/core/Typography/Code/index.d.ts +0 -3
- package/cjs/core/Typography/Code/index.js +0 -15
- package/cjs/core/Typography/Kbd/index.d.ts +0 -3
- package/cjs/core/Typography/Kbd/index.js +0 -21
- package/cjs/core/Typography/Text/index.d.ts +0 -3
- package/cjs/core/Typography/Text/index.js +0 -15
- package/cjs/core/Typography/index.d.ts +0 -5
- package/cjs/core/Typography/index.js +0 -54
- package/cjs/core/index.d.ts +0 -68
- package/cjs/core/index.js +0 -909
- package/cjs/core/utils/components/Popover.d.ts +0 -39
- package/cjs/core/utils/components/Popover.js +0 -132
- package/cjs/types/react-table-config.d.ts +0 -135
- package/cjs/types/react-table-config.js +0 -2
- package/esm/core/Alert/index.d.ts +0 -3
- package/esm/core/Alert/index.js +0 -6
- package/esm/core/Avatar/index.d.ts +0 -3
- package/esm/core/Avatar/index.js +0 -6
- package/esm/core/AvatarGroup/index.d.ts +0 -3
- package/esm/core/AvatarGroup/index.js +0 -6
- package/esm/core/Backdrop/index.d.ts +0 -1
- package/esm/core/Badge/index.d.ts +0 -3
- package/esm/core/Badge/index.js +0 -6
- package/esm/core/Breadcrumbs/index.d.ts +0 -3
- package/esm/core/Breadcrumbs/index.js +0 -6
- package/esm/core/ButtonGroup/index.d.ts +0 -3
- package/esm/core/ButtonGroup/index.js +0 -6
- package/esm/core/Buttons/Button/index.d.ts +0 -3
- package/esm/core/Buttons/Button/index.js +0 -6
- package/esm/core/Buttons/DropdownButton/index.d.ts +0 -3
- package/esm/core/Buttons/DropdownButton/index.js +0 -6
- package/esm/core/Buttons/IconButton/index.d.ts +0 -3
- package/esm/core/Buttons/IconButton/index.js +0 -6
- package/esm/core/Buttons/IdeasButton/index.d.ts +0 -3
- package/esm/core/Buttons/IdeasButton/index.js +0 -6
- package/esm/core/Buttons/SplitButton/index.d.ts +0 -3
- package/esm/core/Buttons/SplitButton/index.js +0 -6
- package/esm/core/Buttons/index.d.ts +0 -5
- package/esm/core/Buttons/index.js +0 -9
- package/esm/core/Carousel/index.d.ts +0 -3
- package/esm/core/Carousel/index.js +0 -6
- package/esm/core/Checkbox/index.d.ts +0 -3
- package/esm/core/Checkbox/index.js +0 -6
- package/esm/core/ColorPicker/index.d.ts +0 -7
- package/esm/core/ColorPicker/index.js +0 -10
- package/esm/core/ComboBox/ComboBoxDropdown.d.ts +0 -7
- package/esm/core/ComboBox/ComboBoxDropdown.js +0 -37
- package/esm/core/ComboBox/index.d.ts +0 -3
- package/esm/core/ComboBox/index.js +0 -6
- package/esm/core/DatePicker/index.d.ts +0 -3
- package/esm/core/DatePicker/index.js +0 -6
- package/esm/core/Dialog/index.d.ts +0 -3
- package/esm/core/Dialog/index.js +0 -6
- package/esm/core/DropdownMenu/index.d.ts +0 -4
- package/esm/core/DropdownMenu/index.js +0 -6
- package/esm/core/ExpandableBlock/index.d.ts +0 -3
- package/esm/core/ExpandableBlock/index.js +0 -6
- package/esm/core/Fieldset/index.d.ts +0 -3
- package/esm/core/Fieldset/index.js +0 -6
- package/esm/core/FileUpload/index.d.ts +0 -6
- package/esm/core/FileUpload/index.js +0 -9
- package/esm/core/Footer/index.d.ts +0 -4
- package/esm/core/Footer/index.js +0 -6
- package/esm/core/Header/index.d.ts +0 -6
- package/esm/core/Header/index.js +0 -9
- package/esm/core/InformationPanel/index.d.ts +0 -7
- package/esm/core/InformationPanel/index.js +0 -10
- package/esm/core/Input/index.d.ts +0 -3
- package/esm/core/Input/index.js +0 -6
- package/esm/core/InputGrid/index.d.ts +0 -3
- package/esm/core/InputGrid/index.js +0 -6
- package/esm/core/InputGroup/index.d.ts +0 -3
- package/esm/core/InputGroup/index.js +0 -6
- package/esm/core/InputWithDecorations/index.d.ts +0 -3
- package/esm/core/InputWithDecorations/index.js +0 -6
- package/esm/core/Label/index.d.ts +0 -3
- package/esm/core/Label/index.js +0 -6
- package/esm/core/LabeledInput/index.d.ts +0 -3
- package/esm/core/LabeledInput/index.js +0 -6
- package/esm/core/LabeledSelect/index.d.ts +0 -3
- package/esm/core/LabeledSelect/index.js +0 -6
- package/esm/core/LabeledTextarea/index.d.ts +0 -3
- package/esm/core/LabeledTextarea/index.js +0 -6
- package/esm/core/List/index.d.ts +0 -2
- package/esm/core/List/index.js +0 -6
- package/esm/core/Menu/index.d.ts +0 -5
- package/esm/core/Menu/index.js +0 -9
- package/esm/core/Modal/index.d.ts +0 -5
- package/esm/core/Modal/index.js +0 -8
- package/esm/core/NonIdealState/index.d.ts +0 -5
- package/esm/core/NonIdealState/index.js +0 -7
- package/esm/core/NotificationMarker/index.d.ts +0 -3
- package/esm/core/NotificationMarker/index.js +0 -6
- package/esm/core/Overlay/index.d.ts +0 -1
- package/esm/core/Overlay/index.js +0 -5
- package/esm/core/ProgressIndicators/index.d.ts +0 -2
- package/esm/core/ProgressIndicators/index.js +0 -6
- package/esm/core/Radio/index.d.ts +0 -3
- package/esm/core/Radio/index.js +0 -6
- package/esm/core/RadioTiles/index.d.ts +0 -4
- package/esm/core/RadioTiles/index.js +0 -7
- package/esm/core/SearchBox/index.d.ts +0 -3
- package/esm/core/SearchBox/index.js +0 -6
- package/esm/core/Select/index.d.ts +0 -4
- package/esm/core/Select/index.js +0 -6
- package/esm/core/SideNavigation/index.d.ts +0 -6
- package/esm/core/SideNavigation/index.js +0 -9
- package/esm/core/SkipToContentLink/index.d.ts +0 -3
- package/esm/core/SkipToContentLink/index.js +0 -6
- package/esm/core/Slider/index.d.ts +0 -3
- package/esm/core/Slider/index.js +0 -6
- package/esm/core/StatusMessage/index.d.ts +0 -3
- package/esm/core/StatusMessage/index.js +0 -6
- package/esm/core/Stepper/index.d.ts +0 -3
- package/esm/core/Stepper/index.js +0 -6
- package/esm/core/Surface/index.d.ts +0 -3
- package/esm/core/Surface/index.js +0 -6
- package/esm/core/Tabs/Tab.d.ts +0 -40
- package/esm/core/Tabs/Tab.js +0 -57
- package/esm/core/Tabs/index.d.ts +0 -2
- package/esm/core/Tabs/index.js +0 -6
- package/esm/core/Tag/index.d.ts +0 -4
- package/esm/core/Tag/index.js +0 -7
- package/esm/core/Textarea/index.d.ts +0 -3
- package/esm/core/Textarea/index.js +0 -6
- package/esm/core/ThemeProvider/index.d.ts +0 -4
- package/esm/core/ThemeProvider/index.js +0 -6
- package/esm/core/Tile/index.d.ts +0 -3
- package/esm/core/Tile/index.js +0 -6
- package/esm/core/TimePicker/index.d.ts +0 -4
- package/esm/core/TimePicker/index.js +0 -6
- package/esm/core/Toast/index.d.ts +0 -1
- package/esm/core/Toast/index.js +0 -5
- package/esm/core/ToggleSwitch/index.d.ts +0 -3
- package/esm/core/ToggleSwitch/index.js +0 -6
- package/esm/core/Tooltip/index.d.ts +0 -3
- package/esm/core/Tooltip/index.js +0 -6
- package/esm/core/TransferList/index.d.ts +0 -3
- package/esm/core/TransferList/index.js +0 -6
- package/esm/core/Tree/index.d.ts +0 -4
- package/esm/core/Tree/index.js +0 -7
- package/esm/core/Typography/Anchor/index.d.ts +0 -3
- package/esm/core/Typography/Anchor/index.js +0 -6
- package/esm/core/Typography/Blockquote/index.d.ts +0 -3
- package/esm/core/Typography/Blockquote/index.js +0 -6
- package/esm/core/Typography/Code/index.d.ts +0 -3
- package/esm/core/Typography/Code/index.js +0 -6
- package/esm/core/Typography/Kbd/index.d.ts +0 -3
- package/esm/core/Typography/Kbd/index.js +0 -6
- package/esm/core/Typography/Text/index.d.ts +0 -3
- package/esm/core/Typography/Text/index.js +0 -6
- package/esm/core/Typography/index.d.ts +0 -5
- package/esm/core/Typography/index.js +0 -9
- package/esm/core/index.d.ts +0 -68
- package/esm/core/index.js +0 -131
- package/esm/core/utils/components/Popover.d.ts +0 -39
- package/esm/core/utils/components/Popover.js +0 -128
- package/esm/types/react-table-config.d.ts +0 -135
- package/esm/types/react-table-config.js +0 -1
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
|
-
exports.Badge = void 0;
|
|
4
2
|
/*---------------------------------------------------------------------------------------------
|
|
5
3
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
6
4
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
7
5
|
*--------------------------------------------------------------------------------------------*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
exports.default = './Badge';
|
|
6
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
7
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
8
|
+
/* eslint-disable @typescript-eslint/no-empty-interface */
|
|
9
|
+
/* eslint-disable @typescript-eslint/ban-types */
|
|
10
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
package/cjs/styles.js
CHANGED
|
@@ -23,8 +23,6 @@ const styles = {
|
|
|
23
23
|
'iui-backdrop-fixed': '_iui3-backdrop-fixed',
|
|
24
24
|
'iui-badge': '_iui3-badge',
|
|
25
25
|
'iui-blockquote': '_iui3-blockquote',
|
|
26
|
-
'iui-surface-body': '_iui3-surface-body',
|
|
27
|
-
'iui-surface-header': '_iui3-surface-header',
|
|
28
26
|
'iui-breadcrumbs': '_iui3-breadcrumbs',
|
|
29
27
|
'iui-breadcrumbs-list': '_iui3-breadcrumbs-list',
|
|
30
28
|
'iui-breadcrumbs-item': '_iui3-breadcrumbs-item',
|
|
@@ -36,9 +34,7 @@ const styles = {
|
|
|
36
34
|
'iui-button-group': '_iui3-button-group',
|
|
37
35
|
'iui-input-flex-container': '_iui3-input-flex-container',
|
|
38
36
|
'iui-input': '_iui3-input',
|
|
39
|
-
'iui-input-grid': '_iui3-input-grid',
|
|
40
37
|
'iui-disabled': '_iui3-disabled',
|
|
41
|
-
'iui-button-group-vertical': '_iui3-button-group-vertical',
|
|
42
38
|
'iui-button-group-overflow-x': '_iui3-button-group-overflow-x',
|
|
43
39
|
'iui-carousel': '_iui3-carousel',
|
|
44
40
|
'iui-carousel-slider': '_iui3-carousel-slider',
|
|
@@ -76,9 +72,7 @@ const styles = {
|
|
|
76
72
|
'iui-color-selection-wrapper': '_iui3-color-selection-wrapper',
|
|
77
73
|
'iui-color-field': '_iui3-color-field',
|
|
78
74
|
'iui-hue-slider': '_iui3-hue-slider',
|
|
79
|
-
'iui-slider
|
|
80
|
-
'iui-slider-rail': '_iui3-slider-rail',
|
|
81
|
-
'iui-slider-thumb': '_iui3-slider-thumb',
|
|
75
|
+
'iui-slider': '_iui3-slider',
|
|
82
76
|
'iui-opacity-slider': '_iui3-opacity-slider',
|
|
83
77
|
'iui-color-dot': '_iui3-color-dot',
|
|
84
78
|
'iui-date-picker': '_iui3-date-picker',
|
|
@@ -183,6 +177,7 @@ const styles = {
|
|
|
183
177
|
'iui-select-tag-container': '_iui3-select-tag-container',
|
|
184
178
|
'iui-end-icon': '_iui3-end-icon',
|
|
185
179
|
'iui-open': '_iui3-open',
|
|
180
|
+
'iui-input-grid': '_iui3-input-grid',
|
|
186
181
|
'iui-required': '_iui3-required',
|
|
187
182
|
'iui-input-group': '_iui3-input-group',
|
|
188
183
|
'iui-status-message': '_iui3-status-message',
|
|
@@ -194,7 +189,6 @@ const styles = {
|
|
|
194
189
|
'iui-list': '_iui3-list',
|
|
195
190
|
'iui-menu': '_iui3-menu',
|
|
196
191
|
'iui-header-menu-icon': '_iui3-header-menu-icon',
|
|
197
|
-
'iui-scroll': '_iui3-scroll',
|
|
198
192
|
'iui-list-item': '_iui3-list-item',
|
|
199
193
|
'iui-menu-item-skeleton': '_iui3-menu-item-skeleton',
|
|
200
194
|
'iui-menu-item': '_iui3-menu-item',
|
|
@@ -219,10 +213,10 @@ const styles = {
|
|
|
219
213
|
'iui-overlay-exiting': '_iui3-overlay-exiting',
|
|
220
214
|
closeAnimation,
|
|
221
215
|
'iui-progress-indicator-radial': '_iui3-progress-indicator-radial',
|
|
222
|
-
'iui-
|
|
216
|
+
'iui-ufaqdr0': '_iui3-ufaqdr0',
|
|
223
217
|
'iui-progress-indicator-linear-label':
|
|
224
218
|
'_iui3-progress-indicator-linear-label',
|
|
225
|
-
'iui-
|
|
219
|
+
'iui-ufaqdry': '_iui3-ufaqdry',
|
|
226
220
|
'iui-radio': '_iui3-radio',
|
|
227
221
|
'iui-radio-tile': '_iui3-radio-tile',
|
|
228
222
|
'iui-radio-tile-icon': '_iui3-radio-tile-icon',
|
|
@@ -234,6 +228,7 @@ const styles = {
|
|
|
234
228
|
'iui-expandable-searchbox': '_iui3-expandable-searchbox',
|
|
235
229
|
'iui-searchbox-open-button': '_iui3-searchbox-open-button',
|
|
236
230
|
'iui-search-icon': '_iui3-search-icon',
|
|
231
|
+
'iui-search-input': '_iui3-search-input',
|
|
237
232
|
'iui-placeholder': '_iui3-placeholder',
|
|
238
233
|
'iui-select-tag': '_iui3-select-tag',
|
|
239
234
|
'iui-select-tag-label': '_iui3-select-tag-label',
|
|
@@ -261,15 +256,14 @@ const styles = {
|
|
|
261
256
|
'_iui3-side-navigation-submenu-header-actions',
|
|
262
257
|
'iui-side-navigation-wrapper': '_iui3-side-navigation-wrapper',
|
|
263
258
|
'iui-skip-to-content-link': '_iui3-skip-to-content-link',
|
|
264
|
-
'iui-slider-
|
|
265
|
-
'iui-slider-track': '_iui3-slider-track',
|
|
259
|
+
'iui-slider-container': '_iui3-slider-container',
|
|
266
260
|
'iui-slider-min': '_iui3-slider-min',
|
|
267
261
|
'iui-slider-max': '_iui3-slider-max',
|
|
262
|
+
'iui-slider-ticks': '_iui3-slider-ticks',
|
|
268
263
|
'iui-slider-tick': '_iui3-slider-tick',
|
|
264
|
+
'iui-slider-track': '_iui3-slider-track',
|
|
265
|
+
'iui-slider-thumb': '_iui3-slider-thumb',
|
|
269
266
|
'iui-grabbing': '_iui3-grabbing',
|
|
270
|
-
'iui-slider-ticks': '_iui3-slider-ticks',
|
|
271
|
-
'iui-slider-horizontal': '_iui3-slider-horizontal',
|
|
272
|
-
'iui-slider-vertical': '_iui3-slider-vertical',
|
|
273
267
|
'iui-stepper': '_iui3-stepper',
|
|
274
268
|
'iui-stepper-step': '_iui3-stepper-step',
|
|
275
269
|
'iui-current': '_iui3-current',
|
|
@@ -280,6 +274,9 @@ const styles = {
|
|
|
280
274
|
'iui-stepper-steps-label': '_iui3-stepper-steps-label',
|
|
281
275
|
'iui-stepper-steps-label-count': '_iui3-stepper-steps-label-count',
|
|
282
276
|
'iui-surface': '_iui3-surface',
|
|
277
|
+
'iui-surface-body': '_iui3-surface-body',
|
|
278
|
+
'iui-surface-header': '_iui3-surface-header',
|
|
279
|
+
'iui-popover-surface': '_iui3-popover-surface',
|
|
283
280
|
'iui-table': '_iui3-table',
|
|
284
281
|
'iui-table-cell-end-icon': '_iui3-table-cell-end-icon',
|
|
285
282
|
'iui-table-cell-start-icon': '_iui3-table-cell-start-icon',
|
|
@@ -327,9 +324,11 @@ const styles = {
|
|
|
327
324
|
'iui-tabs-wrapper': '_iui3-tabs-wrapper',
|
|
328
325
|
'iui-horizontal': '_iui3-horizontal',
|
|
329
326
|
'iui-tabs': '_iui3-tabs',
|
|
327
|
+
'scroll-shadow-inset-horizontal': '_iui3-scroll-shadow-inset-horizontal',
|
|
330
328
|
'iui-borderless': '_iui3-borderless',
|
|
331
329
|
'iui-tab': '_iui3-tab',
|
|
332
330
|
'iui-vertical': '_iui3-vertical',
|
|
331
|
+
'scroll-shadow-inset-vertical': '_iui3-scroll-shadow-inset-vertical',
|
|
333
332
|
'iui-tabs-content': '_iui3-tabs-content',
|
|
334
333
|
'iui-tabs-actions-wrapper': '_iui3-tabs-actions-wrapper',
|
|
335
334
|
'iui-default': '_iui3-default',
|
|
@@ -346,6 +345,7 @@ const styles = {
|
|
|
346
345
|
'iui-tag-button': '_iui3-tag-button',
|
|
347
346
|
'iui-tag-container': '_iui3-tag-container',
|
|
348
347
|
'iui-truncate': '_iui3-truncate',
|
|
348
|
+
'iui-scroll': '_iui3-scroll',
|
|
349
349
|
'iui-text-headline': '_iui3-text-headline',
|
|
350
350
|
'iui-text-title': '_iui3-text-title',
|
|
351
351
|
'iui-text-subheading': '_iui3-text-subheading',
|
|
@@ -417,9 +417,6 @@ const styles = {
|
|
|
417
417
|
'iui-svg-icon': '_iui3-svg-icon',
|
|
418
418
|
'iui-notification-marker': '_iui3-notification-marker',
|
|
419
419
|
pulse,
|
|
420
|
-
'iui-popover': '_iui3-popover',
|
|
421
|
-
'tippy-box': '_iui3-tippy-box',
|
|
422
|
-
'tippy-content': '_iui3-tippy-content',
|
|
423
420
|
'iui-divider': '_iui3-divider',
|
|
424
421
|
'iui-flex': '_iui3-flex',
|
|
425
422
|
'iui-flex-spacer': '_iui3-flex-spacer',
|
|
@@ -55,7 +55,7 @@ export declare const Alert: PolymorphicForwardRefComponent<"div", AlertOwnProps
|
|
|
55
55
|
Icon: PolymorphicForwardRefComponent<"span", Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
56
56
|
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
57
57
|
}, "fill" | "as" | "key" | "size" | keyof React.HTMLAttributes<HTMLSpanElement> | "padded"> & {
|
|
58
|
-
size?: "small" | "
|
|
58
|
+
size?: "small" | "auto" | "medium" | "large" | import("../utils/types.js").AnyString | undefined;
|
|
59
59
|
fill?: "default" | "informational" | "negative" | "positive" | "warning" | import("../utils/types.js").AnyString | undefined;
|
|
60
60
|
padded?: boolean | undefined;
|
|
61
61
|
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
package/esm/core/Alert/Alert.js
CHANGED
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import {
|
|
8
|
-
Icon,
|
|
9
8
|
useSafeContext,
|
|
10
9
|
polymorphic,
|
|
11
10
|
StatusIconMap,
|
|
@@ -13,7 +12,8 @@ import {
|
|
|
13
12
|
Box,
|
|
14
13
|
ButtonBase,
|
|
15
14
|
} from '../utils/index.js';
|
|
16
|
-
import { IconButton } from '../Buttons/
|
|
15
|
+
import { IconButton } from '../Buttons/IconButton.js';
|
|
16
|
+
import { Icon } from '../Icon/Icon.js';
|
|
17
17
|
const AlertContext = React.createContext(undefined);
|
|
18
18
|
// ----------------------------------------------------------------------------
|
|
19
19
|
// Alert component
|
|
@@ -4,12 +4,8 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
VisuallyHidden,
|
|
10
|
-
SoftBackgrounds,
|
|
11
|
-
isSoftBackground,
|
|
12
|
-
} from '../utils/index.js';
|
|
7
|
+
import { Box, SoftBackgrounds, isSoftBackground } from '../utils/index.js';
|
|
8
|
+
import { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden.js';
|
|
13
9
|
/**
|
|
14
10
|
* Helper function that returns one of the preset badge color values.
|
|
15
11
|
*/
|
|
@@ -9,7 +9,10 @@ import {
|
|
|
9
9
|
useOverflow,
|
|
10
10
|
SvgChevronRight,
|
|
11
11
|
Box,
|
|
12
|
+
createWarningLogger,
|
|
12
13
|
} from '../utils/index.js';
|
|
14
|
+
import { Button } from '../Buttons/Button.js';
|
|
15
|
+
const logWarningInDev = createWarningLogger();
|
|
13
16
|
/**
|
|
14
17
|
* A breadcrumb trail is used as a navigational aid to help users keep track
|
|
15
18
|
* of their place in the application. It is often placed before a page's main content.
|
|
@@ -105,24 +108,38 @@ const BreadcrumbsComponent = React.forwardRef((props, ref) => {
|
|
|
105
108
|
),
|
|
106
109
|
);
|
|
107
110
|
});
|
|
111
|
+
// ----------------------------------------------------------------------------
|
|
108
112
|
const ListItem = ({ item, isActive }) => {
|
|
113
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
114
|
+
let children = item;
|
|
115
|
+
if (
|
|
116
|
+
children?.type === 'span' ||
|
|
117
|
+
children?.type === 'a' ||
|
|
118
|
+
children?.type === Button
|
|
119
|
+
) {
|
|
120
|
+
logWarningInDev(
|
|
121
|
+
'Directly using Button/a/span as Breadcrumbs children is deprecated, please use `Breadcrumbs.Item` instead.',
|
|
122
|
+
);
|
|
123
|
+
children = React.createElement(BreadcrumbsItem, { ...children.props });
|
|
124
|
+
}
|
|
109
125
|
return React.createElement(
|
|
110
126
|
Box,
|
|
111
127
|
{ as: 'li', className: 'iui-breadcrumbs-item' },
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
: item,
|
|
128
|
+
children &&
|
|
129
|
+
React.cloneElement(children, {
|
|
130
|
+
'aria-current':
|
|
131
|
+
children.props['aria-current'] ?? isActive ? 'location' : undefined,
|
|
132
|
+
}),
|
|
118
133
|
);
|
|
119
134
|
};
|
|
135
|
+
// ----------------------------------------------------------------------------
|
|
120
136
|
const Separator = ({ separator }) =>
|
|
121
137
|
React.createElement(
|
|
122
138
|
Box,
|
|
123
139
|
{ as: 'li', className: 'iui-breadcrumbs-separator', 'aria-hidden': true },
|
|
124
140
|
separator ?? React.createElement(SvgChevronRight, null),
|
|
125
141
|
);
|
|
142
|
+
// ----------------------------------------------------------------------------
|
|
126
143
|
const BreadcrumbsItem = React.forwardRef((props, forwardedRef) => {
|
|
127
144
|
const { children: childrenProp, className, ...rest } = props;
|
|
128
145
|
const defaultAs = !!props.href ? 'a' : !!props.onClick ? 'button' : 'span';
|
|
@@ -142,6 +159,7 @@ const BreadcrumbsItem = React.forwardRef((props, forwardedRef) => {
|
|
|
142
159
|
);
|
|
143
160
|
});
|
|
144
161
|
BreadcrumbsItem.displayName = 'Breadcrumbs.Item';
|
|
162
|
+
// ----------------------------------------------------------------------------
|
|
145
163
|
export const Breadcrumbs = Object.assign(BreadcrumbsComponent, {
|
|
146
164
|
/**
|
|
147
165
|
* Breadcrumbs item subcomponent
|
|
@@ -44,10 +44,7 @@ export const ButtonGroup = React.forwardRef((props, ref) => {
|
|
|
44
44
|
...rest
|
|
45
45
|
} = props;
|
|
46
46
|
const items = React.useMemo(
|
|
47
|
-
() =>
|
|
48
|
-
React.Children.map(children, (child) =>
|
|
49
|
-
!!child ? React.createElement('div', null, child) : undefined,
|
|
50
|
-
)?.filter(Boolean) ?? [],
|
|
47
|
+
() => React.Children.toArray(children).filter(Boolean),
|
|
51
48
|
[children],
|
|
52
49
|
);
|
|
53
50
|
const [overflowRef, visibleCount] = useOverflow(
|
|
@@ -63,14 +60,15 @@ export const ButtonGroup = React.forwardRef((props, ref) => {
|
|
|
63
60
|
Box,
|
|
64
61
|
{
|
|
65
62
|
className: cx(
|
|
63
|
+
'iui-button-group',
|
|
66
64
|
{
|
|
67
|
-
'iui-button-group': orientation === 'horizontal',
|
|
68
|
-
'iui-button-group-vertical': orientation === 'vertical',
|
|
69
65
|
'iui-button-group-overflow-x':
|
|
70
66
|
!!overflowButton && orientation === 'horizontal',
|
|
71
67
|
},
|
|
72
68
|
className,
|
|
73
69
|
),
|
|
70
|
+
'data-iui-orientation':
|
|
71
|
+
orientation === 'vertical' ? orientation : undefined,
|
|
74
72
|
ref: refs,
|
|
75
73
|
...rest,
|
|
76
74
|
},
|
|
@@ -87,13 +85,13 @@ export const ButtonGroup = React.forwardRef((props, ref) => {
|
|
|
87
85
|
null,
|
|
88
86
|
overflowButton &&
|
|
89
87
|
overflowPlacement === 'start' &&
|
|
90
|
-
|
|
88
|
+
overflowButton(overflowStart),
|
|
91
89
|
overflowPlacement === 'start'
|
|
92
90
|
? items.slice(overflowStart + 1)
|
|
93
91
|
: items.slice(0, Math.max(0, overflowStart)),
|
|
94
92
|
overflowButton &&
|
|
95
93
|
overflowPlacement === 'end' &&
|
|
96
|
-
|
|
94
|
+
overflowButton(overflowStart),
|
|
97
95
|
);
|
|
98
96
|
})(),
|
|
99
97
|
),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ButtonBase } from '
|
|
3
|
-
import type { PolymorphicForwardRefComponent } from '
|
|
2
|
+
import { ButtonBase } from '../utils/index.js';
|
|
3
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
4
4
|
export type ButtonProps = {
|
|
5
5
|
/**
|
|
6
6
|
* Modify size of the button.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import { Box, ButtonBase } from '
|
|
7
|
+
import { Box, ButtonBase } from '../utils/index.js';
|
|
8
8
|
/**
|
|
9
9
|
* Generic button component
|
|
10
10
|
* @example
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { ButtonProps } from '
|
|
3
|
-
import type { DropdownMenuProps } from '
|
|
4
|
-
import type { PolymorphicForwardRefComponent } from '
|
|
2
|
+
import type { ButtonProps } from './Button.js';
|
|
3
|
+
import type { DropdownMenuProps } from '../DropdownMenu/DropdownMenu.js';
|
|
4
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
5
5
|
export type DropdownButtonProps = {
|
|
6
6
|
/**
|
|
7
7
|
* Items in the dropdown menu.
|
|
@@ -4,13 +4,9 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import cx from 'classnames';
|
|
7
|
-
import { Button } from '
|
|
8
|
-
import { DropdownMenu } from '
|
|
9
|
-
import {
|
|
10
|
-
SvgCaretDownSmall,
|
|
11
|
-
SvgCaretUpSmall,
|
|
12
|
-
useMergedRefs,
|
|
13
|
-
} from '../../utils/index.js';
|
|
7
|
+
import { Button } from './Button.js';
|
|
8
|
+
import { DropdownMenu } from '../DropdownMenu/DropdownMenu.js';
|
|
9
|
+
import { SvgCaretDownSmall, SvgCaretUpSmall } from '../utils/index.js';
|
|
14
10
|
/**
|
|
15
11
|
* Button that opens a DropdownMenu.
|
|
16
12
|
* @example
|
|
@@ -20,7 +16,7 @@ import {
|
|
|
20
16
|
* ];
|
|
21
17
|
* <DropdownButton menuItems={menuItems}>Default</DropdownButton>
|
|
22
18
|
*/
|
|
23
|
-
export const DropdownButton = React.forwardRef((props,
|
|
19
|
+
export const DropdownButton = React.forwardRef((props, forwardedRef) => {
|
|
24
20
|
const {
|
|
25
21
|
menuItems,
|
|
26
22
|
className,
|
|
@@ -31,28 +27,17 @@ export const DropdownButton = React.forwardRef((props, ref) => {
|
|
|
31
27
|
...rest
|
|
32
28
|
} = props;
|
|
33
29
|
const [isMenuOpen, setIsMenuOpen] = React.useState(false);
|
|
34
|
-
const [menuWidth, setMenuWidth] = React.useState(0);
|
|
35
|
-
const buttonRef = React.useRef(null);
|
|
36
|
-
const refs = useMergedRefs(ref, buttonRef);
|
|
37
|
-
React.useEffect(() => {
|
|
38
|
-
if (buttonRef.current) {
|
|
39
|
-
setMenuWidth(buttonRef.current.offsetWidth);
|
|
40
|
-
}
|
|
41
|
-
}, [children, size, styleType]);
|
|
42
30
|
return React.createElement(
|
|
43
31
|
DropdownMenu,
|
|
44
32
|
{
|
|
45
33
|
menuItems: menuItems,
|
|
34
|
+
matchWidth: true,
|
|
35
|
+
visible: isMenuOpen,
|
|
46
36
|
...dropdownMenuProps,
|
|
47
|
-
|
|
48
|
-
setIsMenuOpen(
|
|
49
|
-
dropdownMenuProps?.
|
|
37
|
+
onVisibleChange: (open) => {
|
|
38
|
+
setIsMenuOpen(open);
|
|
39
|
+
dropdownMenuProps?.onVisibleChange?.(open);
|
|
50
40
|
},
|
|
51
|
-
onHide: (i) => {
|
|
52
|
-
setIsMenuOpen(false);
|
|
53
|
-
dropdownMenuProps?.onHide?.(i);
|
|
54
|
-
},
|
|
55
|
-
style: { minInlineSize: menuWidth, ...dropdownMenuProps?.style },
|
|
56
41
|
},
|
|
57
42
|
React.createElement(
|
|
58
43
|
Button,
|
|
@@ -63,8 +48,7 @@ export const DropdownButton = React.forwardRef((props, ref) => {
|
|
|
63
48
|
endIcon: isMenuOpen
|
|
64
49
|
? React.createElement(SvgCaretUpSmall, { 'aria-hidden': true })
|
|
65
50
|
: React.createElement(SvgCaretDownSmall, { 'aria-hidden': true }),
|
|
66
|
-
ref:
|
|
67
|
-
'aria-label': 'Dropdown',
|
|
51
|
+
ref: forwardedRef,
|
|
68
52
|
...rest,
|
|
69
53
|
},
|
|
70
54
|
children,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { ButtonProps } from '
|
|
3
|
-
import type { PolymorphicForwardRefComponent } from '
|
|
2
|
+
import type { ButtonProps } from './Button.js';
|
|
3
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
4
4
|
export type IconButtonProps = {
|
|
5
5
|
/**
|
|
6
6
|
* Button gets active style.
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import {
|
|
8
|
-
import { Tooltip } from '
|
|
7
|
+
import { Box, ButtonBase } from '../utils/index.js';
|
|
8
|
+
import { Tooltip } from '../Tooltip/Tooltip.js';
|
|
9
|
+
import { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden.js';
|
|
9
10
|
/**
|
|
10
11
|
* Icon button
|
|
11
12
|
* @example
|
|
@@ -3,8 +3,8 @@
|
|
|
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 { SvgSmileyHappy } from '
|
|
7
|
-
import { Button } from '
|
|
6
|
+
import { SvgSmileyHappy } from '../utils/index.js';
|
|
7
|
+
import { Button } from './Button.js';
|
|
8
8
|
/**
|
|
9
9
|
* Ideas button
|
|
10
10
|
* @example
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type { ButtonProps } from '
|
|
3
|
-
import { IconButton } from '
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
2
|
+
import type { ButtonProps } from './Button.js';
|
|
3
|
+
import { IconButton } from './IconButton.js';
|
|
4
|
+
import type { PolymorphicForwardRefComponent, PortalProps } from '../utils/index.js';
|
|
5
|
+
import type { Placement } from '@floating-ui/react';
|
|
6
6
|
export type SplitButtonProps = ButtonProps & {
|
|
7
7
|
/**
|
|
8
8
|
* Items in the dropdown menu.
|
|
@@ -26,8 +26,8 @@ export type SplitButtonProps = ButtonProps & {
|
|
|
26
26
|
/**
|
|
27
27
|
* Passes props to SplitButton menu button.
|
|
28
28
|
*/
|
|
29
|
-
menuButtonProps?: React.ComponentProps<typeof IconButton>;
|
|
30
|
-
}
|
|
29
|
+
menuButtonProps?: Omit<React.ComponentProps<typeof IconButton>, 'label' | 'size'>;
|
|
30
|
+
} & Pick<PortalProps, 'portal'>;
|
|
31
31
|
/**
|
|
32
32
|
* Split button component with a DropdownMenu.
|
|
33
33
|
*
|
|
@@ -4,15 +4,18 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import { Button } from '
|
|
8
|
-
import { IconButton } from '
|
|
9
|
-
import { DropdownMenu } from '../../DropdownMenu/index.js';
|
|
7
|
+
import { Button } from './Button.js';
|
|
8
|
+
import { IconButton } from './IconButton.js';
|
|
10
9
|
import {
|
|
11
10
|
Box,
|
|
11
|
+
Portal,
|
|
12
12
|
SvgCaretDownSmall,
|
|
13
13
|
SvgCaretUpSmall,
|
|
14
14
|
useId,
|
|
15
|
-
|
|
15
|
+
useMergedRefs,
|
|
16
|
+
} from '../utils/index.js';
|
|
17
|
+
import { Menu } from '../Menu/Menu.js';
|
|
18
|
+
import { usePopover } from '../Popover/Popover.js';
|
|
16
19
|
/**
|
|
17
20
|
* Split button component with a DropdownMenu.
|
|
18
21
|
*
|
|
@@ -38,21 +41,33 @@ export const SplitButton = React.forwardRef((props, forwardedRef) => {
|
|
|
38
41
|
children,
|
|
39
42
|
wrapperProps,
|
|
40
43
|
menuButtonProps,
|
|
44
|
+
portal = true,
|
|
41
45
|
...rest
|
|
42
46
|
} = props;
|
|
43
|
-
const
|
|
44
|
-
const [
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
const buttonRef = React.useRef(null);
|
|
48
|
+
const [visible, setVisible] = React.useState(false);
|
|
49
|
+
const close = React.useCallback(() => {
|
|
50
|
+
setVisible(false);
|
|
51
|
+
buttonRef.current?.focus({ preventScroll: true });
|
|
52
|
+
}, []);
|
|
53
|
+
const menuContent = React.useMemo(() => {
|
|
54
|
+
if (typeof menuItems === 'function') {
|
|
55
|
+
return menuItems(close);
|
|
49
56
|
}
|
|
50
|
-
|
|
57
|
+
return menuItems;
|
|
58
|
+
}, [menuItems, close]);
|
|
59
|
+
const popover = usePopover({
|
|
60
|
+
visible,
|
|
61
|
+
onVisibleChange: (open) => (open ? setVisible(true) : close()),
|
|
62
|
+
placement: menuPlacement,
|
|
63
|
+
matchWidth: true,
|
|
64
|
+
});
|
|
51
65
|
const labelId = useId();
|
|
52
66
|
return React.createElement(
|
|
53
67
|
Box,
|
|
54
68
|
{
|
|
55
69
|
...wrapperProps,
|
|
70
|
+
ref: popover.refs.setPositionReference,
|
|
56
71
|
className: cx(
|
|
57
72
|
'iui-button-split',
|
|
58
73
|
{
|
|
@@ -60,7 +75,6 @@ export const SplitButton = React.forwardRef((props, forwardedRef) => {
|
|
|
60
75
|
},
|
|
61
76
|
wrapperProps?.className,
|
|
62
77
|
),
|
|
63
|
-
ref: wrapperRef,
|
|
64
78
|
},
|
|
65
79
|
React.createElement(
|
|
66
80
|
Button,
|
|
@@ -69,35 +83,46 @@ export const SplitButton = React.forwardRef((props, forwardedRef) => {
|
|
|
69
83
|
styleType: styleType,
|
|
70
84
|
size: size,
|
|
71
85
|
onClick: onClick,
|
|
72
|
-
ref: forwardedRef,
|
|
86
|
+
ref: useMergedRefs(buttonRef, forwardedRef),
|
|
73
87
|
...rest,
|
|
74
88
|
labelProps: { id: labelId, ...props.labelProps },
|
|
75
89
|
},
|
|
76
90
|
children,
|
|
77
91
|
),
|
|
78
92
|
React.createElement(
|
|
79
|
-
|
|
93
|
+
IconButton,
|
|
80
94
|
{
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
95
|
+
styleType: styleType,
|
|
96
|
+
size: size,
|
|
97
|
+
disabled: props.disabled,
|
|
98
|
+
'aria-labelledby': props.labelProps?.id || labelId,
|
|
99
|
+
'aria-expanded': popover.open,
|
|
100
|
+
ref: popover.refs.setReference,
|
|
101
|
+
...popover.getReferenceProps(menuButtonProps),
|
|
86
102
|
},
|
|
103
|
+
visible
|
|
104
|
+
? React.createElement(SvgCaretUpSmall, null)
|
|
105
|
+
: React.createElement(SvgCaretDownSmall, null),
|
|
106
|
+
),
|
|
107
|
+
popover.open &&
|
|
87
108
|
React.createElement(
|
|
88
|
-
|
|
89
|
-
{
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
109
|
+
Portal,
|
|
110
|
+
{ portal: portal },
|
|
111
|
+
React.createElement(
|
|
112
|
+
Menu,
|
|
113
|
+
{
|
|
114
|
+
...popover.getFloatingProps({
|
|
115
|
+
onKeyDown: ({ key }) => {
|
|
116
|
+
if (key === 'Tab') {
|
|
117
|
+
close();
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
}),
|
|
121
|
+
ref: popover.refs.setFloating,
|
|
122
|
+
},
|
|
123
|
+
menuContent,
|
|
124
|
+
),
|
|
99
125
|
),
|
|
100
|
-
),
|
|
101
126
|
);
|
|
102
127
|
});
|
|
103
128
|
export default SplitButton;
|