@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
package/esm/core/Tag/Tag.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { SvgCloseSmall, Box } from '../utils/index.js';
|
|
8
|
-
import { IconButton } from '../Buttons/
|
|
8
|
+
import { IconButton } from '../Buttons/IconButton.js';
|
|
9
9
|
/**
|
|
10
10
|
* Tag for showing categories, filters etc.
|
|
11
11
|
* @example
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as React from 'react';
|
|
6
|
-
import { Input } from '../Input/
|
|
6
|
+
import { Input } from '../Input/Input.js';
|
|
7
7
|
/**
|
|
8
8
|
* Basic textarea component
|
|
9
9
|
* @example
|
|
@@ -17,9 +17,10 @@ type RootProps = {
|
|
|
17
17
|
* This can cause a flash of incorrect theme on first render.
|
|
18
18
|
*
|
|
19
19
|
* The 'inherit' option is intended to be used by packages, to enable incremental adoption
|
|
20
|
-
* of iTwinUI
|
|
20
|
+
* of iTwinUI while respecting the theme set by the consuming app. It will fall back to 'light'
|
|
21
|
+
* if no parent theme is found. Additionally, it will attempt to inherit the `portalContainer` if possible.
|
|
21
22
|
*
|
|
22
|
-
* @default '
|
|
23
|
+
* @default 'inherit'
|
|
23
24
|
*/
|
|
24
25
|
theme?: ThemeType | 'inherit';
|
|
25
26
|
themeOptions?: Pick<ThemeOptions, 'highContrast'> & {
|
|
@@ -50,16 +50,25 @@ export const ThemeProvider = React.forwardRef((props, forwardedRef) => {
|
|
|
50
50
|
portalContainer: portalContainerProp,
|
|
51
51
|
...rest
|
|
52
52
|
} = props;
|
|
53
|
+
const [parentTheme, rootRef, parentContext] = useParentTheme();
|
|
54
|
+
const theme = themeProp === 'inherit' ? parentTheme || 'light' : themeProp;
|
|
55
|
+
/**
|
|
56
|
+
* We will portal our portal container into `portalContainer` prop (if specified),
|
|
57
|
+
* or inherit `portalContainer` from context (if also inheriting theme).
|
|
58
|
+
*/
|
|
59
|
+
const portaledPortalContainer =
|
|
60
|
+
portalContainerProp ||
|
|
61
|
+
(themeProp === 'inherit' ? parentContext?.portalContainer : undefined);
|
|
53
62
|
const [portalContainer, setPortalContainer] = useControlledState(
|
|
54
63
|
null,
|
|
55
|
-
|
|
64
|
+
portaledPortalContainer,
|
|
56
65
|
);
|
|
57
|
-
const [parentTheme, rootRef] = useParentTheme();
|
|
58
|
-
const theme = themeProp === 'inherit' ? parentTheme || 'light' : themeProp;
|
|
59
66
|
const shouldApplyBackground = themeOptions?.applyBackground ?? !parentTheme;
|
|
60
67
|
const contextValue = React.useMemo(
|
|
61
68
|
() => ({ theme, themeOptions, portalContainer }),
|
|
62
|
-
|
|
69
|
+
// we do include all dependencies below, but we want to stringify the objects as they could be different on each render
|
|
70
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
71
|
+
[theme, JSON.stringify(themeOptions), portalContainer],
|
|
63
72
|
);
|
|
64
73
|
return React.createElement(
|
|
65
74
|
ThemeContext.Provider,
|
|
@@ -77,14 +86,14 @@ export const ThemeProvider = React.forwardRef((props, forwardedRef) => {
|
|
|
77
86
|
ToastProvider,
|
|
78
87
|
null,
|
|
79
88
|
children,
|
|
80
|
-
|
|
89
|
+
portaledPortalContainer
|
|
81
90
|
? ReactDOM.createPortal(
|
|
82
91
|
React.createElement(Toaster, null),
|
|
83
|
-
|
|
92
|
+
portaledPortalContainer,
|
|
84
93
|
)
|
|
85
94
|
: React.createElement(
|
|
86
95
|
'div',
|
|
87
|
-
{ ref: setPortalContainer },
|
|
96
|
+
{ ref: setPortalContainer, style: { display: 'contents' } },
|
|
88
97
|
React.createElement(Toaster, null),
|
|
89
98
|
),
|
|
90
99
|
),
|
|
@@ -142,5 +151,5 @@ const useParentTheme = () => {
|
|
|
142
151
|
?.getAttribute('data-iui-theme'),
|
|
143
152
|
);
|
|
144
153
|
}, []);
|
|
145
|
-
return [parentContext?.theme ?? parentThemeState, rootRef];
|
|
154
|
+
return [parentContext?.theme ?? parentThemeState, rootRef, parentContext];
|
|
146
155
|
};
|
package/esm/core/Tile/Tile.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
|
-
import { IconButton } from '../Buttons/
|
|
3
|
+
import { IconButton } from '../Buttons/IconButton.js';
|
|
4
4
|
type TileWrapperOwnProps = {
|
|
5
5
|
/**
|
|
6
6
|
* Status of the tile.
|
|
@@ -253,7 +253,7 @@ export declare const Tile: PolymorphicForwardRefComponent<"div", TileLegacyProps
|
|
|
253
253
|
isActive?: boolean | undefined;
|
|
254
254
|
label?: React.ReactNode;
|
|
255
255
|
iconProps?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement> | undefined;
|
|
256
|
-
} & Omit<import("../Buttons/Button
|
|
256
|
+
} & Omit<import("../Buttons/Button.js").ButtonProps, "startIcon" | "endIcon" | "labelProps" | "startIconProps" | "endIconProps"> & {
|
|
257
257
|
as?: "button" | undefined;
|
|
258
258
|
}, "ref">>;
|
|
259
259
|
/**
|
package/esm/core/Tile/Tile.js
CHANGED
|
@@ -9,15 +9,15 @@ import {
|
|
|
9
9
|
SvgMore,
|
|
10
10
|
SvgNew,
|
|
11
11
|
SvgCheckmark,
|
|
12
|
-
LinkAction,
|
|
13
12
|
useSafeContext,
|
|
14
13
|
supportsHas,
|
|
15
14
|
polymorphic,
|
|
16
15
|
Box,
|
|
17
16
|
} from '../utils/index.js';
|
|
18
|
-
import { DropdownMenu } from '../DropdownMenu/
|
|
19
|
-
import { IconButton } from '../Buttons/
|
|
20
|
-
import { ProgressRadial } from '../ProgressIndicators/
|
|
17
|
+
import { DropdownMenu } from '../DropdownMenu/DropdownMenu.js';
|
|
18
|
+
import { IconButton } from '../Buttons/IconButton.js';
|
|
19
|
+
import { ProgressRadial } from '../ProgressIndicators/ProgressRadial.js';
|
|
20
|
+
import { LinkAction } from '../LinkAction/LinkAction.js';
|
|
21
21
|
const TileContext = React.createContext(undefined);
|
|
22
22
|
TileContext.displayName = 'TileContext';
|
|
23
23
|
const TileWrapper = React.forwardRef((props, forwardedRef) => {
|
|
@@ -212,32 +212,31 @@ const TileMoreOptions = React.forwardRef((props, forwardedRef) => {
|
|
|
212
212
|
const { className, children = [], buttonProps, ...rest } = props;
|
|
213
213
|
const [isMenuVisible, setIsMenuVisible] = React.useState(false);
|
|
214
214
|
return React.createElement(
|
|
215
|
-
|
|
215
|
+
Box,
|
|
216
216
|
{
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
}),
|
|
227
|
-
),
|
|
217
|
+
className: cx(
|
|
218
|
+
'iui-tile-more-options',
|
|
219
|
+
{
|
|
220
|
+
'iui-visible': isMenuVisible,
|
|
221
|
+
},
|
|
222
|
+
className,
|
|
223
|
+
),
|
|
224
|
+
ref: forwardedRef,
|
|
225
|
+
...rest,
|
|
228
226
|
},
|
|
229
227
|
React.createElement(
|
|
230
|
-
|
|
228
|
+
DropdownMenu,
|
|
231
229
|
{
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
230
|
+
onVisibleChange: setIsMenuVisible,
|
|
231
|
+
menuItems: (close) =>
|
|
232
|
+
children?.map((option) =>
|
|
233
|
+
React.cloneElement(option, {
|
|
234
|
+
onClick: (value) => {
|
|
235
|
+
close();
|
|
236
|
+
option.props.onClick?.(value);
|
|
237
|
+
},
|
|
238
|
+
}),
|
|
239
|
+
),
|
|
241
240
|
},
|
|
242
241
|
React.createElement(
|
|
243
242
|
IconButton,
|
|
@@ -309,16 +308,17 @@ const TileComponent = React.forwardRef((props, forwardedRef) => {
|
|
|
309
308
|
: name,
|
|
310
309
|
),
|
|
311
310
|
),
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
311
|
+
thumbnail &&
|
|
312
|
+
React.createElement(
|
|
313
|
+
TileThumbnailArea,
|
|
314
|
+
null,
|
|
315
|
+
typeof thumbnail !== 'string'
|
|
316
|
+
? React.createElement(TileThumbnailPicture, null, thumbnail)
|
|
317
|
+
: React.createElement(TileThumbnailPicture, { url: thumbnail }),
|
|
318
|
+
badge && React.createElement(TileBadgeContainer, null, badge),
|
|
319
|
+
leftIcon && React.createElement(TileTypeIndicator, null, leftIcon),
|
|
320
|
+
rightIcon && React.createElement(TileQuickAction, null, rightIcon),
|
|
321
|
+
),
|
|
322
322
|
React.createElement(
|
|
323
323
|
TileContentArea,
|
|
324
324
|
null,
|
package/esm/core/Toast/Toast.js
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
useSafeContext,
|
|
14
14
|
ButtonBase,
|
|
15
15
|
} from '../utils/index.js';
|
|
16
|
-
import { IconButton } from '../Buttons/
|
|
16
|
+
import { IconButton } from '../Buttons/IconButton.js';
|
|
17
17
|
import { ToasterStateContext } from './Toaster.js';
|
|
18
18
|
const isMotionOk = () =>
|
|
19
19
|
getWindow()?.matchMedia?.('(prefers-reduced-motion: no-preference)')?.matches;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
|
-
import { ListItem } from '../List/
|
|
3
|
+
import { ListItem } from '../List/ListItem.js';
|
|
4
4
|
type TransferListListboxWrapperOwnProps = {};
|
|
5
5
|
type TransferListItemOwnProps = {
|
|
6
6
|
/**
|
|
@@ -12,8 +12,9 @@ import {
|
|
|
12
12
|
Box,
|
|
13
13
|
polymorphic,
|
|
14
14
|
} from '../utils/index.js';
|
|
15
|
-
import { List
|
|
16
|
-
import {
|
|
15
|
+
import { List } from '../List/List.js';
|
|
16
|
+
import { ListItem } from '../List/ListItem.js';
|
|
17
|
+
import { Label } from '../Label/Label.js';
|
|
17
18
|
// ----------------------------------------------------------------------------
|
|
18
19
|
// TransferListComponent
|
|
19
20
|
const TransferListComponent = polymorphic('iui-transfer-list-wrapper');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
2
|
-
import type { IconButtonProps } from '../Buttons/IconButton
|
|
2
|
+
import type { IconButtonProps } from '../Buttons/IconButton.js';
|
|
3
3
|
type TreeNodeExpanderProps = {
|
|
4
4
|
isExpanded?: boolean;
|
|
5
5
|
} & IconButtonProps;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import cx from 'classnames';
|
|
7
7
|
import { SvgChevronRight } from '../utils/index.js';
|
|
8
|
-
import { IconButton } from '../Buttons/IconButton
|
|
8
|
+
import { IconButton } from '../Buttons/IconButton.js';
|
|
9
9
|
export const TreeNodeExpander = React.forwardRef((props, ref) => {
|
|
10
10
|
const { isExpanded, ...rest } = props;
|
|
11
11
|
return React.createElement(
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
* <Anchor as={Link} to='/'>Home</Anchor>
|
|
13
13
|
* <Anchor as='button' onClick={() => {}}>click me</Anchor>
|
|
14
14
|
*/
|
|
15
|
-
export declare const Anchor: import("
|
|
15
|
+
export declare const Anchor: import("../utils/props.js").PolymorphicForwardRefComponent<"a", {}>;
|
|
16
16
|
export default Anchor;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { polymorphic } from '
|
|
5
|
+
import { polymorphic } from '../utils/index.js';
|
|
6
6
|
/**
|
|
7
7
|
* A consistently styled anchor component.
|
|
8
8
|
*
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import { Box } from '
|
|
7
|
+
import { Box } from '../utils/index.js';
|
|
8
8
|
/**
|
|
9
9
|
* Basic blockquote component
|
|
10
10
|
* @example
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* @example
|
|
4
4
|
* <p>Some <Code>inline code</Code> in a paragraph</p>
|
|
5
5
|
*/
|
|
6
|
-
export declare const Code: import("
|
|
6
|
+
export declare const Code: import("../utils/props.js").PolymorphicForwardRefComponent<"code", {}>;
|
|
7
7
|
export default Code;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { polymorphic } from '
|
|
5
|
+
import { polymorphic } from '../utils/index.js';
|
|
6
6
|
/**
|
|
7
7
|
* Inline code element.
|
|
8
8
|
* @example
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import { Box } from '
|
|
7
|
+
import { Box } from '../utils/index.js';
|
|
8
8
|
/**
|
|
9
9
|
* Some predefined strings for common keyboard keys.
|
|
10
10
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import { Box } from '
|
|
7
|
+
import { Box } from '../utils/index.js';
|
|
8
8
|
/**
|
|
9
9
|
* Polymorphic typography component to render any kind of text as any kind of element.
|
|
10
10
|
* Users should decide which element to render based on the context of their app. Link to heading levels docs: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements#accessibility_concerns
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import cx from 'classnames';
|
|
7
|
-
import { Box } from '
|
|
7
|
+
import { Box } from '../utils/components/Box.js';
|
|
8
8
|
/**
|
|
9
9
|
* Hides content visually but keeps it still accessible to screen readers
|
|
10
10
|
* and other assistive technologies.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as React from 'react';
|
|
6
|
-
import { VisuallyHidden } from '
|
|
6
|
+
import { VisuallyHidden } from '../../VisuallyHidden/VisuallyHidden.js';
|
|
7
7
|
import { getWindow } from '../functions/index.js';
|
|
8
8
|
/**
|
|
9
9
|
* Visually-hidden polite live region that automatically clears itself after 5 seconds.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import type { PolymorphicForwardRefComponent } from '../props.js';
|
|
3
|
+
export type InputContainerProps = {
|
|
4
4
|
label?: React.ReactNode;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
required?: boolean;
|
|
@@ -11,9 +11,9 @@ export type InputContainerProps<T extends React.ElementType = 'div'> = {
|
|
|
11
11
|
statusMessage?: React.ReactNode;
|
|
12
12
|
inputId?: string;
|
|
13
13
|
labelId?: string;
|
|
14
|
-
}
|
|
14
|
+
};
|
|
15
15
|
/**
|
|
16
16
|
* Input container to wrap inputs with label, and add optional message and icon.
|
|
17
17
|
* @private
|
|
18
18
|
*/
|
|
19
|
-
export declare const InputContainer: <
|
|
19
|
+
export declare const InputContainer: PolymorphicForwardRefComponent<"div", InputContainerProps>;
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import cx from 'classnames';
|
|
7
7
|
import { Box } from './Box.js';
|
|
8
|
-
import { Label } from '../../Label/
|
|
9
|
-
import { StatusMessage } from '../../StatusMessage/
|
|
8
|
+
import { Label } from '../../Label/Label.js';
|
|
9
|
+
import { StatusMessage } from '../../StatusMessage/StatusMessage.js';
|
|
10
10
|
/**
|
|
11
11
|
* Input container to wrap inputs with label, and add optional message and icon.
|
|
12
12
|
* @private
|
|
13
13
|
*/
|
|
14
|
-
export const InputContainer = (props) => {
|
|
14
|
+
export const InputContainer = React.forwardRef((props, forwardedRef) => {
|
|
15
15
|
const {
|
|
16
16
|
label,
|
|
17
17
|
disabled,
|
|
@@ -35,12 +35,17 @@ export const InputContainer = (props) => {
|
|
|
35
35
|
'data-iui-status': status,
|
|
36
36
|
'data-iui-label-placement': isLabelInline ? 'inline' : undefined,
|
|
37
37
|
style: style,
|
|
38
|
+
ref: forwardedRef,
|
|
38
39
|
...rest,
|
|
39
40
|
},
|
|
40
41
|
label &&
|
|
41
42
|
React.createElement(
|
|
42
43
|
Label,
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
45
|
+
// @ts-ignore
|
|
43
46
|
{
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
48
|
+
// @ts-ignore
|
|
44
49
|
as: inputId && props.as !== 'label' ? 'label' : 'div',
|
|
45
50
|
required: required,
|
|
46
51
|
disabled: disabled,
|
|
@@ -59,4 +64,4 @@ export const InputContainer = (props) => {
|
|
|
59
64
|
message,
|
|
60
65
|
),
|
|
61
66
|
);
|
|
62
|
-
};
|
|
67
|
+
});
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { CSSTransition } from 'react-transition-group';
|
|
7
|
+
import styles from '../../../styles.js';
|
|
7
8
|
export const WithCSSTransition = (props) => {
|
|
8
9
|
const { in: visible, dimension = 'height', children, ...rest } = props;
|
|
9
10
|
const expandedSize = React.useRef(0);
|
|
@@ -32,7 +33,12 @@ export const WithCSSTransition = (props) => {
|
|
|
32
33
|
node.style[`min${dimensionCamelCase}`] = 'initial';
|
|
33
34
|
node.style[dimension] = '0px';
|
|
34
35
|
},
|
|
35
|
-
classNames:
|
|
36
|
+
classNames: {
|
|
37
|
+
enter: styles['iui-enter'],
|
|
38
|
+
enterActive: styles['iui-enter-active'],
|
|
39
|
+
exit: styles['iui-exit'],
|
|
40
|
+
exitActive: styles['iui-exit-active'],
|
|
41
|
+
},
|
|
36
42
|
...rest,
|
|
37
43
|
},
|
|
38
44
|
React.isValidElement(children)
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from './Popover.js';
|
|
2
1
|
export * from './Resizer.js';
|
|
3
2
|
export * from './FocusTrap.js';
|
|
4
3
|
export * from './InputContainer.js';
|
|
@@ -6,11 +5,6 @@ export * from './InputFlexContainer.js';
|
|
|
6
5
|
export * from './WithCSSTransition.js';
|
|
7
6
|
export * from './MiddleTextTruncation.js';
|
|
8
7
|
export * from './VirtualScroll.js';
|
|
9
|
-
export * from './VisuallyHidden.js';
|
|
10
|
-
export * from './Icon.js';
|
|
11
|
-
export * from './Flex.js';
|
|
12
|
-
export * from './Divider.js';
|
|
13
|
-
export * from './LinkAction.js';
|
|
14
8
|
export * from './AutoclearingHiddenLiveRegion.js';
|
|
15
9
|
export * from './Box.js';
|
|
16
10
|
export * from './ButtonBase.js';
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
export * from './Popover.js';
|
|
6
5
|
export * from './Resizer.js';
|
|
7
6
|
export * from './FocusTrap.js';
|
|
8
7
|
export * from './InputContainer.js';
|
|
@@ -10,11 +9,6 @@ export * from './InputFlexContainer.js';
|
|
|
10
9
|
export * from './WithCSSTransition.js';
|
|
11
10
|
export * from './MiddleTextTruncation.js';
|
|
12
11
|
export * from './VirtualScroll.js';
|
|
13
|
-
export * from './VisuallyHidden.js';
|
|
14
|
-
export * from './Icon.js';
|
|
15
|
-
export * from './Flex.js';
|
|
16
|
-
export * from './Divider.js';
|
|
17
|
-
export * from './LinkAction.js';
|
|
18
12
|
export * from './AutoclearingHiddenLiveRegion.js';
|
|
19
13
|
export * from './Box.js';
|
|
20
14
|
export * from './ButtonBase.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare const isJest: boolean;
|
|
2
|
+
declare let isDev: boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Logs message one time only in dev environments.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* const logWarningInDev = createWarningLogger();
|
|
8
|
+
* logWarningInDev("please don't use this")
|
|
9
|
+
*/
|
|
10
|
+
declare const createWarningLogger: () => (message: string) => void;
|
|
11
|
+
export { isJest, isDev, createWarningLogger };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
const isJest = typeof jest !== 'undefined';
|
|
6
|
+
let isDev = false;
|
|
7
|
+
// wrapping in try-catch because process might be undefined
|
|
8
|
+
try {
|
|
9
|
+
isDev = process.env.NODE_ENV !== 'production' && !isJest;
|
|
10
|
+
} catch {}
|
|
11
|
+
/**
|
|
12
|
+
* Logs message one time only in dev environments.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* const logWarningInDev = createWarningLogger();
|
|
16
|
+
* logWarningInDev("please don't use this")
|
|
17
|
+
*/
|
|
18
|
+
const createWarningLogger = !isDev
|
|
19
|
+
? () => () => {}
|
|
20
|
+
: () => {
|
|
21
|
+
let logged = false;
|
|
22
|
+
return (message) => {
|
|
23
|
+
if (!logged) {
|
|
24
|
+
console.warn(message);
|
|
25
|
+
logged = true;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export { isJest, isDev, createWarningLogger };
|
|
@@ -7,7 +7,7 @@ import { ThemeContext } from '../../ThemeProvider/ThemeContext.js';
|
|
|
7
7
|
* @private
|
|
8
8
|
*/
|
|
9
9
|
export declare const useGlobals: () => {
|
|
10
|
-
theme?: import("../../
|
|
10
|
+
theme?: import("../../ThemeProvider/ThemeProvider.js").ThemeType | undefined;
|
|
11
11
|
themeOptions?: import("../../ThemeProvider/ThemeProvider.js").ThemeOptions | undefined;
|
|
12
12
|
portalContainer?: HTMLElement | null | undefined;
|
|
13
13
|
} | undefined;
|
|
@@ -4,11 +4,7 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { ThemeContext } from '../../ThemeProvider/ThemeContext.js';
|
|
7
|
-
|
|
8
|
-
// wrapping in try-catch because process might be undefined
|
|
9
|
-
try {
|
|
10
|
-
isDev = process.env.NODE_ENV !== 'production';
|
|
11
|
-
} catch {}
|
|
7
|
+
import { isDev } from '../functions/dev.js';
|
|
12
8
|
const didLogWarning = {
|
|
13
9
|
fontSize: false,
|
|
14
10
|
themeProvider: false,
|
|
@@ -68,7 +68,9 @@ export const useOverflow = (
|
|
|
68
68
|
if (availableSize < requiredSize) {
|
|
69
69
|
const avgItemSize = requiredSize / visibleCount;
|
|
70
70
|
const visibleItems = Math.floor(availableSize / avgItemSize);
|
|
71
|
-
|
|
71
|
+
/* When first item is larger than the container - visibleItems count is 0,
|
|
72
|
+
We can assume that at least some part of the first item is visible and return 1. */
|
|
73
|
+
setVisibleCount(visibleItems > 0 ? visibleItems : 1);
|
|
72
74
|
} else if (needsFullRerender.current) {
|
|
73
75
|
const childrenSize = Array.from(containerRef.current.children).reduce(
|
|
74
76
|
(sum, child) => sum + child[`offset${dimension}`],
|