@itwin/itwinui-react 1.48.1 → 2.0.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -22
- package/cjs/core/Alert/Alert.d.ts +7 -6
- package/cjs/core/Alert/Alert.js +13 -8
- package/cjs/core/Avatar/Avatar.d.ts +69 -0
- package/cjs/core/{UserIcon/UserIcon.js → Avatar/Avatar.js} +15 -11
- package/cjs/core/Avatar/index.d.ts +4 -0
- package/cjs/core/{UserIcon → Avatar}/index.js +5 -4
- package/cjs/core/AvatarGroup/AvatarGroup.d.ts +70 -0
- package/cjs/core/{UserIconGroup/UserIconGroup.js → AvatarGroup/AvatarGroup.js} +23 -19
- package/cjs/core/AvatarGroup/index.d.ts +4 -0
- package/cjs/core/{UserIconGroup → AvatarGroup}/index.js +5 -4
- package/cjs/core/Badge/Badge.js +2 -4
- package/cjs/core/Breadcrumbs/Breadcrumbs.js +1 -2
- package/cjs/core/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/cjs/core/Buttons/Button/Button.js +5 -14
- package/cjs/core/Buttons/DropdownButton/DropdownButton.js +1 -3
- package/cjs/core/Buttons/IconButton/IconButton.js +3 -9
- package/cjs/core/Buttons/IdeasButton/IdeasButton.js +1 -2
- package/cjs/core/Buttons/SplitButton/SplitButton.js +4 -8
- package/cjs/core/Carousel/CarouselNavigation.js +3 -4
- package/cjs/core/Checkbox/Checkbox.d.ts +1 -29
- package/cjs/core/Checkbox/Checkbox.js +3 -3
- package/cjs/core/ColorPicker/ColorBuilder.js +16 -27
- package/cjs/core/ColorPicker/ColorInputPanel.js +1 -2
- package/cjs/core/ColorPicker/ColorSwatch.d.ts +1 -1
- package/cjs/core/ColorPicker/ColorSwatch.js +1 -6
- package/cjs/core/ComboBox/ComboBoxDropdown.d.ts +1 -1
- package/cjs/core/ComboBox/ComboBoxEndIcon.js +1 -2
- package/cjs/core/ComboBox/ComboBoxMenu.js +2 -4
- package/cjs/core/DatePicker/DatePicker.js +4 -8
- package/cjs/core/Dialog/Dialog.d.ts +4 -4
- package/cjs/core/Dialog/Dialog.js +1 -1
- package/cjs/core/Dialog/DialogBackdrop.d.ts +1 -1
- package/cjs/core/Dialog/DialogBackdrop.js +5 -2
- package/cjs/core/Dialog/DialogMain.d.ts +1 -1
- package/cjs/core/Dialog/DialogMain.js +7 -1
- package/cjs/core/Dialog/DialogTitleBar.d.ts +1 -1
- package/cjs/core/Dialog/DialogTitleBar.js +1 -2
- package/cjs/core/ExpandableBlock/ExpandableBlock.js +5 -6
- package/cjs/core/FileUpload/FileUploadTemplate.js +1 -2
- package/cjs/core/Header/Header.d.ts +16 -6
- package/cjs/core/Header/Header.js +9 -12
- package/cjs/core/Header/HeaderBasicButton.d.ts +6 -0
- package/cjs/core/Header/HeaderBasicButton.js +52 -0
- package/cjs/core/Header/HeaderBreadcrumbs.js +6 -5
- package/cjs/core/Header/HeaderButton.d.ts +3 -2
- package/cjs/core/Header/HeaderButton.js +10 -18
- package/cjs/core/Header/HeaderDropdownButton.d.ts +6 -0
- package/cjs/core/Header/HeaderDropdownButton.js +53 -0
- package/cjs/core/Header/HeaderLogo.js +3 -3
- package/cjs/core/Header/HeaderSplitButton.d.ts +6 -0
- package/cjs/core/Header/HeaderSplitButton.js +54 -0
- package/cjs/core/InformationPanel/InformationPanelHeader.js +1 -2
- package/cjs/core/Input/Input.d.ts +1 -1
- package/cjs/core/Input/Input.js +3 -4
- package/cjs/core/InputGroup/InputGroup.d.ts +1 -1
- package/cjs/core/InputGroup/InputGroup.js +1 -1
- package/cjs/core/Label/Label.d.ts +1 -1
- package/cjs/core/Label/Label.js +1 -1
- package/cjs/core/LabeledInput/LabeledInput.d.ts +2 -2
- package/cjs/core/LabeledInput/LabeledInput.js +1 -1
- package/cjs/core/LabeledSelect/LabeledSelect.d.ts +1 -1
- package/cjs/core/LabeledSelect/LabeledSelect.js +1 -1
- package/cjs/core/LabeledTextarea/LabeledTextarea.d.ts +1 -1
- package/cjs/core/LabeledTextarea/LabeledTextarea.js +1 -1
- package/cjs/core/Menu/MenuItem.js +1 -2
- package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +2 -4
- package/cjs/core/Radio/Radio.d.ts +1 -29
- package/cjs/core/Radio/Radio.js +3 -3
- package/cjs/core/RadioTiles/RadioTileGroup.d.ts +1 -1
- package/cjs/core/RadioTiles/RadioTileGroup.js +1 -1
- package/cjs/core/Select/Select.d.ts +1 -1
- package/cjs/core/Select/Select.js +10 -14
- package/cjs/core/Select/SelectTag.d.ts +1 -1
- package/cjs/core/Select/SelectTag.js +1 -1
- package/cjs/core/SideNavigation/SideNavigation.js +1 -2
- package/cjs/core/SideNavigation/SidenavButton.js +1 -2
- package/cjs/core/Stepper/Stepper.d.ts +40 -0
- package/cjs/core/{Wizard/Wizard.js → Stepper/Stepper.js} +11 -28
- package/cjs/core/{Wizard/Step.d.ts → Stepper/StepperStep.d.ts} +6 -7
- package/cjs/core/{Wizard/Step.js → Stepper/StepperStep.js} +10 -10
- package/cjs/core/Stepper/Wizard.d.ts +46 -0
- package/cjs/core/Stepper/Wizard.js +55 -0
- package/cjs/core/Stepper/WorkflowDiagram.d.ts +6 -0
- package/cjs/core/Stepper/WorkflowDiagram.js +43 -0
- package/cjs/core/Stepper/WorkflowDiagramStep.d.ts +5 -0
- package/cjs/core/Stepper/WorkflowDiagramStep.js +42 -0
- package/cjs/core/Stepper/index.d.ts +8 -0
- package/cjs/core/{Wizard → Stepper}/index.js +5 -1
- package/cjs/core/Surface/Surface.d.ts +0 -2
- package/cjs/core/Surface/Surface.js +10 -10
- package/cjs/core/Table/SubRowExpander.js +3 -3
- package/cjs/core/Table/Table.d.ts +5 -4
- package/cjs/core/Table/Table.js +30 -23
- package/cjs/core/Table/TableCell.js +4 -4
- package/cjs/core/Table/TablePaginator.js +16 -19
- package/cjs/core/Table/TableRowMemoized.d.ts +2 -0
- package/cjs/core/Table/TableRowMemoized.js +10 -13
- package/cjs/core/Table/cells/DefaultCell.js +4 -9
- package/cjs/core/Table/columns/actionColumn.js +3 -3
- package/cjs/core/Table/columns/expanderColumn.js +3 -3
- package/cjs/core/Table/filters/BaseFilter.js +1 -1
- package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.js +1 -2
- package/cjs/core/Table/filters/FilterToggle.js +2 -4
- package/cjs/core/Table/hooks/useColumnDragAndDrop.js +4 -4
- package/cjs/core/Table/hooks/useResizeColumns.js +110 -106
- package/cjs/core/Tabs/Tab.d.ts +0 -8
- package/cjs/core/Tabs/Tab.js +1 -5
- package/cjs/core/Tabs/Tabs.d.ts +32 -12
- package/cjs/core/Tabs/Tabs.js +16 -12
- package/cjs/core/Tabs/index.d.ts +4 -4
- package/cjs/core/Tabs/index.js +2 -2
- package/cjs/core/Tag/Tag.js +1 -2
- package/cjs/core/Textarea/Textarea.d.ts +1 -1
- package/cjs/core/Textarea/Textarea.js +2 -2
- package/cjs/core/ThemeProvider/ThemeProvider.d.ts +27 -17
- package/cjs/core/ThemeProvider/ThemeProvider.js +64 -7
- package/cjs/core/Tile/Tile.d.ts +19 -1
- package/cjs/core/Tile/Tile.js +36 -16
- package/cjs/core/Toast/Toast.d.ts +3 -3
- package/cjs/core/Toast/Toast.js +4 -5
- package/cjs/core/Toast/ToastWrapper.d.ts +1 -1
- package/cjs/core/Toast/ToastWrapper.js +1 -1
- package/cjs/core/Tree/TreeNode.js +1 -7
- package/cjs/core/Tree/TreeNodeExpander.js +2 -2
- package/cjs/core/Typography/Body/Body.d.ts +5 -3
- package/cjs/core/Typography/Body/Body.js +2 -3
- package/cjs/core/Typography/Headline/Headline.d.ts +2 -3
- package/cjs/core/Typography/Headline/Headline.js +2 -3
- package/cjs/core/Typography/Leading/Leading.d.ts +2 -3
- package/cjs/core/Typography/Leading/Leading.js +2 -3
- package/cjs/core/Typography/Small/Small.d.ts +2 -3
- package/cjs/core/Typography/Small/Small.js +2 -3
- package/cjs/core/Typography/Subheading/Subheading.d.ts +2 -3
- package/cjs/core/Typography/Subheading/Subheading.js +2 -3
- package/cjs/core/Typography/Text/Text.d.ts +2 -0
- package/cjs/core/Typography/Text/Text.js +2 -0
- package/cjs/core/Typography/Title/Title.d.ts +2 -3
- package/cjs/core/Typography/Title/Title.js +2 -3
- package/cjs/core/index.d.ts +8 -8
- package/cjs/core/index.js +14 -10
- package/cjs/core/utils/components/Popover.d.ts +2 -2
- package/cjs/core/utils/components/Popover.js +1 -1
- package/cjs/core/utils/components/Resizer.d.ts +5 -0
- package/cjs/core/utils/components/Resizer.js +7 -1
- package/cjs/core/utils/components/VisuallyHidden.d.ts +1 -0
- package/cjs/core/utils/components/VisuallyHidden.js +1 -0
- package/cjs/core/utils/components/index.d.ts +0 -1
- package/cjs/core/utils/components/index.js +0 -1
- package/cjs/core/utils/functions/colors.d.ts +12 -12
- package/cjs/core/utils/functions/colors.js +12 -12
- package/cjs/core/utils/hooks/index.d.ts +1 -0
- package/cjs/core/utils/hooks/index.js +1 -0
- package/cjs/core/utils/hooks/useIsomorphicLayoutEffect.d.ts +7 -0
- package/cjs/core/utils/hooks/useIsomorphicLayoutEffect.js +17 -0
- package/cjs/core/utils/hooks/useMediaQuery.js +2 -1
- package/cjs/core/utils/hooks/useTheme.d.ts +20 -3
- package/cjs/core/utils/hooks/useTheme.js +57 -58
- package/cjs/core/utils/{components/icons.d.ts → icons/StatusIconMap.d.ts} +1 -1
- package/cjs/core/utils/icons/StatusIconMap.js +52 -0
- package/cjs/core/utils/icons/SvgCalendar.d.ts +2 -0
- package/cjs/core/utils/icons/SvgCalendar.js +47 -0
- package/cjs/core/utils/icons/SvgCaretDownSmall.d.ts +2 -0
- package/cjs/core/utils/icons/SvgCaretDownSmall.js +47 -0
- package/cjs/core/utils/icons/SvgCaretRightSmall.d.ts +2 -0
- package/cjs/core/utils/icons/SvgCaretRightSmall.js +47 -0
- package/cjs/core/utils/icons/SvgCaretUpSmall.d.ts +2 -0
- package/cjs/core/utils/icons/SvgCaretUpSmall.js +47 -0
- package/cjs/core/utils/icons/SvgCheckmark.d.ts +2 -0
- package/cjs/core/utils/icons/SvgCheckmark.js +47 -0
- package/cjs/core/utils/icons/SvgCheckmarkSmall.d.ts +2 -0
- package/cjs/core/utils/icons/SvgCheckmarkSmall.js +47 -0
- package/cjs/core/utils/icons/SvgChevronLeft.d.ts +2 -0
- package/cjs/core/utils/icons/SvgChevronLeft.js +47 -0
- package/cjs/core/utils/icons/SvgChevronLeftDouble.d.ts +2 -0
- package/cjs/core/utils/icons/SvgChevronLeftDouble.js +47 -0
- package/cjs/core/utils/icons/SvgChevronRight.d.ts +2 -0
- package/cjs/core/utils/icons/SvgChevronRight.js +47 -0
- package/cjs/core/utils/icons/SvgChevronRightDouble.d.ts +2 -0
- package/cjs/core/utils/icons/SvgChevronRightDouble.js +47 -0
- package/cjs/core/utils/icons/SvgClose.d.ts +2 -0
- package/cjs/core/utils/icons/SvgClose.js +47 -0
- package/cjs/core/utils/icons/SvgCloseSmall.d.ts +2 -0
- package/cjs/core/utils/icons/SvgCloseSmall.js +47 -0
- package/cjs/core/utils/icons/SvgColumnManager.d.ts +2 -0
- package/cjs/core/utils/icons/SvgColumnManager.js +47 -0
- package/cjs/core/utils/icons/SvgFilter.d.ts +2 -0
- package/cjs/core/utils/icons/SvgFilter.js +47 -0
- package/cjs/core/utils/icons/SvgFilterHollow.d.ts +2 -0
- package/cjs/core/utils/icons/SvgFilterHollow.js +47 -0
- package/cjs/core/utils/icons/SvgImportantSmall.d.ts +2 -0
- package/cjs/core/utils/icons/SvgImportantSmall.js +47 -0
- package/cjs/core/utils/icons/SvgInfoCircular.d.ts +2 -0
- package/cjs/core/utils/icons/SvgInfoCircular.js +47 -0
- package/cjs/core/utils/icons/SvgMore.d.ts +2 -0
- package/cjs/core/utils/icons/SvgMore.js +47 -0
- package/cjs/core/utils/icons/SvgMoreVertical.d.ts +2 -0
- package/cjs/core/utils/icons/SvgMoreVertical.js +47 -0
- package/cjs/core/utils/icons/SvgNew.d.ts +2 -0
- package/cjs/core/utils/icons/SvgNew.js +47 -0
- package/cjs/core/utils/icons/SvgSmileyHappy.d.ts +2 -0
- package/cjs/core/utils/icons/SvgSmileyHappy.js +47 -0
- package/cjs/core/utils/icons/SvgSortDown.d.ts +2 -0
- package/cjs/core/utils/icons/SvgSortDown.js +47 -0
- package/cjs/core/utils/icons/SvgSortUp.d.ts +2 -0
- package/cjs/core/utils/icons/SvgSortUp.js +47 -0
- package/cjs/core/utils/icons/SvgStatusError.d.ts +2 -0
- package/cjs/core/utils/icons/SvgStatusError.js +47 -0
- package/cjs/core/utils/icons/SvgStatusSuccess.d.ts +2 -0
- package/cjs/core/utils/icons/SvgStatusSuccess.js +47 -0
- package/cjs/core/utils/icons/SvgStatusWarning.d.ts +2 -0
- package/cjs/core/utils/icons/SvgStatusWarning.js +47 -0
- package/cjs/core/utils/icons/SvgSwap.d.ts +2 -0
- package/cjs/core/utils/icons/SvgSwap.js +47 -0
- package/cjs/core/utils/icons/SvgUpload.d.ts +2 -0
- package/cjs/core/utils/icons/SvgUpload.js +47 -0
- package/cjs/core/utils/icons/index.d.ts +29 -0
- package/cjs/core/utils/icons/index.js +49 -0
- package/cjs/core/utils/index.d.ts +1 -0
- package/cjs/core/utils/index.js +1 -0
- package/esm/core/Alert/Alert.d.ts +7 -6
- package/esm/core/Alert/Alert.js +14 -9
- package/esm/core/Avatar/Avatar.d.ts +69 -0
- package/esm/core/{UserIcon/UserIcon.js → Avatar/Avatar.js} +13 -9
- package/esm/core/Avatar/index.d.ts +4 -0
- package/esm/core/{UserIcon → Avatar}/index.js +2 -2
- package/esm/core/AvatarGroup/AvatarGroup.d.ts +70 -0
- package/esm/core/{UserIconGroup/UserIconGroup.js → AvatarGroup/AvatarGroup.js} +21 -17
- package/esm/core/AvatarGroup/index.d.ts +4 -0
- package/esm/core/{UserIconGroup → AvatarGroup}/index.js +2 -2
- package/esm/core/Badge/Badge.js +3 -5
- package/esm/core/Breadcrumbs/Breadcrumbs.js +1 -2
- package/esm/core/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/esm/core/Buttons/Button/Button.js +5 -14
- package/esm/core/Buttons/DropdownButton/DropdownButton.js +2 -4
- package/esm/core/Buttons/IconButton/IconButton.js +3 -9
- package/esm/core/Buttons/IdeasButton/IdeasButton.js +2 -3
- package/esm/core/Buttons/SplitButton/SplitButton.js +5 -9
- package/esm/core/Carousel/CarouselNavigation.js +1 -2
- package/esm/core/Checkbox/Checkbox.d.ts +1 -29
- package/esm/core/Checkbox/Checkbox.js +3 -3
- package/esm/core/ColorPicker/ColorBuilder.js +17 -28
- package/esm/core/ColorPicker/ColorInputPanel.js +1 -2
- package/esm/core/ColorPicker/ColorSwatch.d.ts +1 -1
- package/esm/core/ColorPicker/ColorSwatch.js +2 -7
- package/esm/core/ComboBox/ComboBoxDropdown.d.ts +1 -1
- package/esm/core/ComboBox/ComboBoxEndIcon.js +1 -2
- package/esm/core/ComboBox/ComboBoxMenu.js +2 -4
- package/esm/core/DatePicker/DatePicker.js +1 -5
- package/esm/core/Dialog/Dialog.d.ts +4 -4
- package/esm/core/Dialog/Dialog.js +1 -1
- package/esm/core/Dialog/DialogBackdrop.d.ts +1 -1
- package/esm/core/Dialog/DialogBackdrop.js +5 -2
- package/esm/core/Dialog/DialogMain.d.ts +1 -1
- package/esm/core/Dialog/DialogMain.js +7 -1
- package/esm/core/Dialog/DialogTitleBar.d.ts +1 -1
- package/esm/core/Dialog/DialogTitleBar.js +1 -2
- package/esm/core/ExpandableBlock/ExpandableBlock.js +5 -6
- package/esm/core/FileUpload/FileUploadTemplate.js +1 -2
- package/esm/core/Header/Header.d.ts +16 -6
- package/esm/core/Header/Header.js +9 -12
- package/esm/core/Header/HeaderBasicButton.d.ts +6 -0
- package/esm/core/Header/HeaderBasicButton.js +46 -0
- package/esm/core/Header/HeaderBreadcrumbs.js +7 -6
- package/esm/core/Header/HeaderButton.d.ts +3 -2
- package/esm/core/Header/HeaderButton.js +10 -18
- package/esm/core/Header/HeaderDropdownButton.d.ts +6 -0
- package/esm/core/Header/HeaderDropdownButton.js +47 -0
- package/esm/core/Header/HeaderLogo.js +3 -3
- package/esm/core/Header/HeaderSplitButton.d.ts +6 -0
- package/esm/core/Header/HeaderSplitButton.js +48 -0
- package/esm/core/InformationPanel/InformationPanelHeader.js +1 -2
- package/esm/core/Input/Input.d.ts +1 -1
- package/esm/core/Input/Input.js +3 -4
- package/esm/core/InputGroup/InputGroup.d.ts +1 -1
- package/esm/core/InputGroup/InputGroup.js +1 -1
- package/esm/core/Label/Label.d.ts +1 -1
- package/esm/core/Label/Label.js +1 -1
- package/esm/core/LabeledInput/LabeledInput.d.ts +2 -2
- package/esm/core/LabeledInput/LabeledInput.js +1 -1
- package/esm/core/LabeledSelect/LabeledSelect.d.ts +1 -1
- package/esm/core/LabeledSelect/LabeledSelect.js +1 -1
- package/esm/core/LabeledTextarea/LabeledTextarea.d.ts +1 -1
- package/esm/core/LabeledTextarea/LabeledTextarea.js +1 -1
- package/esm/core/Menu/MenuItem.js +1 -2
- package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +3 -5
- package/esm/core/Radio/Radio.d.ts +1 -29
- package/esm/core/Radio/Radio.js +3 -3
- package/esm/core/RadioTiles/RadioTileGroup.d.ts +1 -1
- package/esm/core/RadioTiles/RadioTileGroup.js +1 -1
- package/esm/core/Select/Select.d.ts +1 -1
- package/esm/core/Select/Select.js +10 -14
- package/esm/core/Select/SelectTag.d.ts +1 -1
- package/esm/core/Select/SelectTag.js +1 -1
- package/esm/core/SideNavigation/SideNavigation.js +1 -2
- package/esm/core/SideNavigation/SidenavButton.js +1 -2
- package/esm/core/Stepper/Stepper.d.ts +40 -0
- package/esm/core/{Wizard/Wizard.js → Stepper/Stepper.js} +10 -27
- package/esm/core/{Wizard/Step.d.ts → Stepper/StepperStep.d.ts} +6 -7
- package/esm/core/{Wizard/Step.js → Stepper/StepperStep.js} +8 -8
- package/esm/core/Stepper/Wizard.d.ts +46 -0
- package/esm/core/Stepper/Wizard.js +49 -0
- package/esm/core/Stepper/WorkflowDiagram.d.ts +6 -0
- package/esm/core/Stepper/WorkflowDiagram.js +37 -0
- package/esm/core/Stepper/WorkflowDiagramStep.d.ts +5 -0
- package/esm/core/Stepper/WorkflowDiagramStep.js +35 -0
- package/esm/core/Stepper/index.d.ts +8 -0
- package/esm/core/{Wizard → Stepper}/index.js +2 -0
- package/esm/core/Surface/Surface.d.ts +0 -2
- package/esm/core/Surface/Surface.js +11 -11
- package/esm/core/Table/SubRowExpander.js +2 -2
- package/esm/core/Table/Table.d.ts +5 -4
- package/esm/core/Table/Table.js +31 -24
- package/esm/core/Table/TableCell.js +4 -4
- package/esm/core/Table/TablePaginator.js +15 -18
- package/esm/core/Table/TableRowMemoized.d.ts +2 -0
- package/esm/core/Table/TableRowMemoized.js +10 -13
- package/esm/core/Table/cells/DefaultCell.js +4 -9
- package/esm/core/Table/columns/actionColumn.js +2 -2
- package/esm/core/Table/columns/expanderColumn.js +2 -2
- package/esm/core/Table/filters/BaseFilter.js +1 -1
- package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.js +1 -2
- package/esm/core/Table/filters/FilterToggle.js +2 -4
- package/esm/core/Table/hooks/useColumnDragAndDrop.js +4 -4
- package/esm/core/Table/hooks/useResizeColumns.js +110 -106
- package/esm/core/Tabs/Tab.d.ts +0 -8
- package/esm/core/Tabs/Tab.js +0 -4
- package/esm/core/Tabs/Tabs.d.ts +32 -12
- package/esm/core/Tabs/Tabs.js +17 -13
- package/esm/core/Tabs/index.d.ts +4 -4
- package/esm/core/Tabs/index.js +2 -2
- package/esm/core/Tag/Tag.js +1 -2
- package/esm/core/Textarea/Textarea.d.ts +1 -1
- package/esm/core/Textarea/Textarea.js +2 -2
- package/esm/core/ThemeProvider/ThemeProvider.d.ts +27 -17
- package/esm/core/ThemeProvider/ThemeProvider.js +64 -6
- package/esm/core/Tile/Tile.d.ts +19 -1
- package/esm/core/Tile/Tile.js +36 -16
- package/esm/core/Toast/Toast.d.ts +3 -3
- package/esm/core/Toast/Toast.js +4 -5
- package/esm/core/Toast/ToastWrapper.d.ts +1 -1
- package/esm/core/Toast/ToastWrapper.js +1 -1
- package/esm/core/Tree/TreeNode.js +2 -8
- package/esm/core/Tree/TreeNodeExpander.js +1 -1
- package/esm/core/Typography/Body/Body.d.ts +5 -3
- package/esm/core/Typography/Body/Body.js +2 -3
- package/esm/core/Typography/Headline/Headline.d.ts +2 -3
- package/esm/core/Typography/Headline/Headline.js +2 -3
- package/esm/core/Typography/Leading/Leading.d.ts +2 -3
- package/esm/core/Typography/Leading/Leading.js +2 -3
- package/esm/core/Typography/Small/Small.d.ts +2 -3
- package/esm/core/Typography/Small/Small.js +2 -3
- package/esm/core/Typography/Subheading/Subheading.d.ts +2 -3
- package/esm/core/Typography/Subheading/Subheading.js +2 -3
- package/esm/core/Typography/Text/Text.d.ts +2 -0
- package/esm/core/Typography/Text/Text.js +2 -0
- package/esm/core/Typography/Title/Title.d.ts +2 -3
- package/esm/core/Typography/Title/Title.js +2 -3
- package/esm/core/index.d.ts +8 -8
- package/esm/core/index.js +4 -4
- package/esm/core/utils/components/Popover.d.ts +2 -2
- package/esm/core/utils/components/Popover.js +1 -1
- package/esm/core/utils/components/Resizer.d.ts +5 -0
- package/esm/core/utils/components/Resizer.js +7 -1
- package/esm/core/utils/components/VisuallyHidden.d.ts +1 -0
- package/esm/core/utils/components/VisuallyHidden.js +1 -0
- package/esm/core/utils/components/index.d.ts +0 -1
- package/esm/core/utils/components/index.js +0 -1
- package/esm/core/utils/functions/colors.d.ts +12 -12
- package/esm/core/utils/functions/colors.js +12 -12
- package/esm/core/utils/hooks/index.d.ts +1 -0
- package/esm/core/utils/hooks/index.js +1 -0
- package/esm/core/utils/hooks/useIsomorphicLayoutEffect.d.ts +7 -0
- package/esm/core/utils/hooks/useIsomorphicLayoutEffect.js +11 -0
- package/esm/core/utils/hooks/useMediaQuery.js +2 -1
- package/esm/core/utils/hooks/useTheme.d.ts +20 -3
- package/esm/core/utils/hooks/useTheme.js +56 -57
- package/esm/core/utils/{components/icons.d.ts → icons/StatusIconMap.d.ts} +1 -1
- package/esm/core/utils/{components/icons.js → icons/StatusIconMap.js} +5 -5
- package/esm/core/utils/icons/SvgCalendar.d.ts +2 -0
- package/esm/core/utils/icons/SvgCalendar.js +20 -0
- package/esm/core/utils/icons/SvgCaretDownSmall.d.ts +2 -0
- package/esm/core/utils/icons/SvgCaretDownSmall.js +20 -0
- package/esm/core/utils/icons/SvgCaretRightSmall.d.ts +2 -0
- package/esm/core/utils/icons/SvgCaretRightSmall.js +20 -0
- package/esm/core/utils/icons/SvgCaretUpSmall.d.ts +2 -0
- package/esm/core/utils/icons/SvgCaretUpSmall.js +20 -0
- package/esm/core/utils/icons/SvgCheckmark.d.ts +2 -0
- package/esm/core/utils/icons/SvgCheckmark.js +20 -0
- package/esm/core/utils/icons/SvgCheckmarkSmall.d.ts +2 -0
- package/esm/core/utils/icons/SvgCheckmarkSmall.js +20 -0
- package/esm/core/utils/icons/SvgChevronLeft.d.ts +2 -0
- package/esm/core/utils/icons/SvgChevronLeft.js +20 -0
- package/esm/core/utils/icons/SvgChevronLeftDouble.d.ts +2 -0
- package/esm/core/utils/icons/SvgChevronLeftDouble.js +20 -0
- package/esm/core/utils/icons/SvgChevronRight.d.ts +2 -0
- package/esm/core/utils/icons/SvgChevronRight.js +20 -0
- package/esm/core/utils/icons/SvgChevronRightDouble.d.ts +2 -0
- package/esm/core/utils/icons/SvgChevronRightDouble.js +20 -0
- package/esm/core/utils/icons/SvgClose.d.ts +2 -0
- package/esm/core/utils/icons/SvgClose.js +20 -0
- package/esm/core/utils/icons/SvgCloseSmall.d.ts +2 -0
- package/esm/core/utils/icons/SvgCloseSmall.js +20 -0
- package/esm/core/utils/icons/SvgColumnManager.d.ts +2 -0
- package/esm/core/utils/icons/SvgColumnManager.js +20 -0
- package/esm/core/utils/icons/SvgFilter.d.ts +2 -0
- package/esm/core/utils/icons/SvgFilter.js +20 -0
- package/esm/core/utils/icons/SvgFilterHollow.d.ts +2 -0
- package/esm/core/utils/icons/SvgFilterHollow.js +20 -0
- package/esm/core/utils/icons/SvgImportantSmall.d.ts +2 -0
- package/esm/core/utils/icons/SvgImportantSmall.js +20 -0
- package/esm/core/utils/icons/SvgInfoCircular.d.ts +2 -0
- package/esm/core/utils/icons/SvgInfoCircular.js +20 -0
- package/esm/core/utils/icons/SvgMore.d.ts +2 -0
- package/esm/core/utils/icons/SvgMore.js +20 -0
- package/esm/core/utils/icons/SvgMoreVertical.d.ts +2 -0
- package/esm/core/utils/icons/SvgMoreVertical.js +20 -0
- package/esm/core/utils/icons/SvgNew.d.ts +2 -0
- package/esm/core/utils/icons/SvgNew.js +20 -0
- package/esm/core/utils/icons/SvgSmileyHappy.d.ts +2 -0
- package/esm/core/utils/icons/SvgSmileyHappy.js +20 -0
- package/esm/core/utils/icons/SvgSortDown.d.ts +2 -0
- package/esm/core/utils/icons/SvgSortDown.js +20 -0
- package/esm/core/utils/icons/SvgSortUp.d.ts +2 -0
- package/esm/core/utils/icons/SvgSortUp.js +20 -0
- package/esm/core/utils/icons/SvgStatusError.d.ts +2 -0
- package/esm/core/utils/icons/SvgStatusError.js +20 -0
- package/esm/core/utils/icons/SvgStatusSuccess.d.ts +2 -0
- package/esm/core/utils/icons/SvgStatusSuccess.js +20 -0
- package/esm/core/utils/icons/SvgStatusWarning.d.ts +2 -0
- package/esm/core/utils/icons/SvgStatusWarning.js +20 -0
- package/esm/core/utils/icons/SvgSwap.d.ts +2 -0
- package/esm/core/utils/icons/SvgSwap.js +20 -0
- package/esm/core/utils/icons/SvgUpload.d.ts +2 -0
- package/esm/core/utils/icons/SvgUpload.js +20 -0
- package/esm/core/utils/icons/index.d.ts +29 -0
- package/esm/core/utils/icons/index.js +33 -0
- package/esm/core/utils/index.d.ts +1 -0
- package/esm/core/utils/index.js +1 -0
- package/package.json +3 -3
- package/cjs/core/UserIcon/UserIcon.d.ts +0 -57
- package/cjs/core/UserIcon/index.d.ts +0 -4
- package/cjs/core/UserIconGroup/UserIconGroup.d.ts +0 -62
- package/cjs/core/UserIconGroup/index.d.ts +0 -4
- package/cjs/core/Wizard/Wizard.d.ts +0 -54
- package/cjs/core/Wizard/index.d.ts +0 -4
- package/cjs/core/utils/components/icons.js +0 -32
- package/esm/core/UserIcon/UserIcon.d.ts +0 -57
- package/esm/core/UserIcon/index.d.ts +0 -4
- package/esm/core/UserIconGroup/UserIconGroup.d.ts +0 -62
- package/esm/core/UserIconGroup/index.d.ts +0 -4
- package/esm/core/Wizard/Wizard.d.ts +0 -54
- package/esm/core/Wizard/index.d.ts +0 -4
|
@@ -45,13 +45,13 @@ var defaultGetDragAndDropProps = function (isEnabled) { return function (props,
|
|
|
45
45
|
};
|
|
46
46
|
var setOnDragColumnStyle = function (event, position) {
|
|
47
47
|
var columnElement = event.currentTarget;
|
|
48
|
-
columnElement.classList.remove('iui-reorder-column-right');
|
|
49
|
-
columnElement.classList.remove('iui-reorder-column-left');
|
|
48
|
+
columnElement.classList.remove('iui-table-reorder-column-right');
|
|
49
|
+
columnElement.classList.remove('iui-table-reorder-column-left');
|
|
50
50
|
if (position === 'left') {
|
|
51
|
-
columnElement.classList.add('iui-reorder-column-left');
|
|
51
|
+
columnElement.classList.add('iui-table-reorder-column-left');
|
|
52
52
|
}
|
|
53
53
|
else if (position === 'right') {
|
|
54
|
-
columnElement.classList.add('iui-reorder-column-right');
|
|
54
|
+
columnElement.classList.add('iui-table-reorder-column-right');
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
var reorderColumns = function (tableColumns, srcIndex, dstIndex) {
|
|
@@ -22,123 +22,127 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
23
|
exports.useResizeColumns = void 0;
|
|
24
24
|
var react_table_1 = require("react-table");
|
|
25
|
-
var useResizeColumns = function (ownerDocument) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
var useResizeColumns = function (ownerDocument) {
|
|
26
|
+
return function (hooks) {
|
|
27
|
+
hooks.getResizerProps = [defaultGetResizerProps(ownerDocument)];
|
|
28
|
+
hooks.stateReducers.push(reducer);
|
|
29
|
+
hooks.useInstanceBeforeDimensions.push(useInstanceBeforeDimensions);
|
|
30
|
+
};
|
|
31
|
+
};
|
|
30
32
|
exports.useResizeColumns = useResizeColumns;
|
|
31
33
|
var isTouchEvent = function (event) {
|
|
32
34
|
return event.type === 'touchstart';
|
|
33
35
|
};
|
|
34
|
-
var defaultGetResizerProps = function (ownerDocument) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
d
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
36
|
+
var defaultGetResizerProps = function (ownerDocument) {
|
|
37
|
+
return function (props, _a) {
|
|
38
|
+
var instance = _a.instance, header = _a.header, nextHeader = _a.nextHeader;
|
|
39
|
+
var dispatch = instance.dispatch;
|
|
40
|
+
var onResizeStart = function (e, header) {
|
|
41
|
+
var _a, _b, _c;
|
|
42
|
+
// lets not respond to multiple touches (e.g. 2 or 3 fingers)
|
|
43
|
+
if (isTouchEvent(e) && e.touches && e.touches.length > 1) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
var headerIdWidths = getLeafHeaders(header).map(function (d) { return [
|
|
47
|
+
d.id,
|
|
48
|
+
getHeaderWidth(d),
|
|
49
|
+
]; });
|
|
50
|
+
var nextHeaderIdWidths = nextHeader
|
|
51
|
+
? getLeafHeaders(nextHeader).map(function (d) { return [d.id, getHeaderWidth(d)]; })
|
|
52
|
+
: [];
|
|
53
|
+
var clientX = isTouchEvent(e)
|
|
54
|
+
? Math.round(e.touches[0].clientX)
|
|
55
|
+
: e.clientX;
|
|
56
|
+
var dispatchMove = function (clientXPos) {
|
|
57
|
+
return dispatch({ type: react_table_1.actions.columnResizing, clientX: clientXPos });
|
|
58
|
+
};
|
|
59
|
+
var dispatchEnd = function () {
|
|
60
|
+
return dispatch({
|
|
61
|
+
type: react_table_1.actions.columnDoneResizing,
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
var handlersAndEvents = {
|
|
65
|
+
mouse: {
|
|
66
|
+
moveEvent: 'mousemove',
|
|
67
|
+
moveHandler: function (e) { return dispatchMove(e.clientX); },
|
|
68
|
+
upEvent: 'mouseup',
|
|
69
|
+
upHandler: function () {
|
|
70
|
+
var _a, _b, _c;
|
|
71
|
+
(_a = ownerDocument.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('mousemove', handlersAndEvents.mouse.moveHandler);
|
|
72
|
+
(_b = ownerDocument.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('mouseup', handlersAndEvents.mouse.upHandler);
|
|
73
|
+
(_c = ownerDocument.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('mouseleave', handlersAndEvents.mouse.upHandler);
|
|
74
|
+
dispatchEnd();
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
touch: {
|
|
78
|
+
moveEvent: 'touchmove',
|
|
79
|
+
moveHandler: function (e) {
|
|
80
|
+
if (e.cancelable) {
|
|
81
|
+
e.preventDefault();
|
|
82
|
+
e.stopPropagation();
|
|
83
|
+
}
|
|
84
|
+
dispatchMove(e.touches[0].clientX);
|
|
85
|
+
},
|
|
86
|
+
upEvent: 'touchend',
|
|
87
|
+
upHandler: function () {
|
|
88
|
+
var _a, _b;
|
|
89
|
+
(_a = ownerDocument.current) === null || _a === void 0 ? void 0 : _a.removeEventListener(handlersAndEvents.touch.moveEvent, handlersAndEvents.touch.moveHandler);
|
|
90
|
+
(_b = ownerDocument.current) === null || _b === void 0 ? void 0 : _b.removeEventListener(handlersAndEvents.touch.upEvent, handlersAndEvents.touch.moveHandler);
|
|
91
|
+
dispatchEnd();
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
var events = isTouchEvent(e)
|
|
96
|
+
? handlersAndEvents.touch
|
|
97
|
+
: handlersAndEvents.mouse;
|
|
98
|
+
var passiveIfSupported = passiveEventSupported()
|
|
99
|
+
? { passive: false }
|
|
100
|
+
: false;
|
|
101
|
+
(_a = ownerDocument.current) === null || _a === void 0 ? void 0 : _a.addEventListener(events.moveEvent, events.moveHandler, passiveIfSupported);
|
|
102
|
+
(_b = ownerDocument.current) === null || _b === void 0 ? void 0 : _b.addEventListener(events.upEvent, events.upHandler, passiveIfSupported);
|
|
103
|
+
if (!isTouchEvent(e)) {
|
|
104
|
+
(_c = ownerDocument.current) === null || _c === void 0 ? void 0 : _c.addEventListener('mouseleave', handlersAndEvents.mouse.upHandler, passiveIfSupported);
|
|
105
|
+
}
|
|
106
|
+
dispatch({
|
|
107
|
+
type: react_table_1.actions.columnStartResizing,
|
|
108
|
+
columnId: header.id,
|
|
109
|
+
columnWidth: getHeaderWidth(header),
|
|
110
|
+
nextColumnWidth: getHeaderWidth(nextHeader),
|
|
111
|
+
headerIdWidths: headerIdWidths,
|
|
112
|
+
nextHeaderIdWidths: nextHeaderIdWidths,
|
|
113
|
+
clientX: clientX,
|
|
59
114
|
});
|
|
60
115
|
};
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
var _a, _b, _c;
|
|
68
|
-
(_a = ownerDocument.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('mousemove', handlersAndEvents.mouse.moveHandler);
|
|
69
|
-
(_b = ownerDocument.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('mouseup', handlersAndEvents.mouse.upHandler);
|
|
70
|
-
(_c = ownerDocument.current) === null || _c === void 0 ? void 0 : _c.removeEventListener('mouseleave', handlersAndEvents.mouse.upHandler);
|
|
71
|
-
dispatchEnd();
|
|
116
|
+
return [
|
|
117
|
+
props,
|
|
118
|
+
{
|
|
119
|
+
onClick: function (e) {
|
|
120
|
+
// Prevents from triggering sort
|
|
121
|
+
e.stopPropagation();
|
|
72
122
|
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
dispatchMove(e.touches[0].clientX);
|
|
123
|
+
onMouseDown: function (e) {
|
|
124
|
+
e.persist();
|
|
125
|
+
// Prevents from triggering drag'n'drop
|
|
126
|
+
e.preventDefault();
|
|
127
|
+
// Prevents from triggering sort
|
|
128
|
+
e.stopPropagation();
|
|
129
|
+
onResizeStart(e, header);
|
|
82
130
|
},
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
(
|
|
88
|
-
dispatchEnd();
|
|
131
|
+
onTouchStart: function (e) {
|
|
132
|
+
e.persist();
|
|
133
|
+
// Prevents from triggering drag'n'drop
|
|
134
|
+
e.preventDefault();
|
|
135
|
+
onResizeStart(e, header);
|
|
89
136
|
},
|
|
137
|
+
style: {
|
|
138
|
+
cursor: 'col-resize',
|
|
139
|
+
},
|
|
140
|
+
draggable: false,
|
|
141
|
+
role: 'separator',
|
|
90
142
|
},
|
|
91
|
-
|
|
92
|
-
var events = isTouchEvent(e)
|
|
93
|
-
? handlersAndEvents.touch
|
|
94
|
-
: handlersAndEvents.mouse;
|
|
95
|
-
var passiveIfSupported = passiveEventSupported()
|
|
96
|
-
? { passive: false }
|
|
97
|
-
: false;
|
|
98
|
-
(_a = ownerDocument.current) === null || _a === void 0 ? void 0 : _a.addEventListener(events.moveEvent, events.moveHandler, passiveIfSupported);
|
|
99
|
-
(_b = ownerDocument.current) === null || _b === void 0 ? void 0 : _b.addEventListener(events.upEvent, events.upHandler, passiveIfSupported);
|
|
100
|
-
if (!isTouchEvent(e)) {
|
|
101
|
-
(_c = ownerDocument.current) === null || _c === void 0 ? void 0 : _c.addEventListener('mouseleave', handlersAndEvents.mouse.upHandler, passiveIfSupported);
|
|
102
|
-
}
|
|
103
|
-
dispatch({
|
|
104
|
-
type: react_table_1.actions.columnStartResizing,
|
|
105
|
-
columnId: header.id,
|
|
106
|
-
columnWidth: getHeaderWidth(header),
|
|
107
|
-
nextColumnWidth: getHeaderWidth(nextHeader),
|
|
108
|
-
headerIdWidths: headerIdWidths,
|
|
109
|
-
nextHeaderIdWidths: nextHeaderIdWidths,
|
|
110
|
-
clientX: clientX,
|
|
111
|
-
});
|
|
143
|
+
];
|
|
112
144
|
};
|
|
113
|
-
|
|
114
|
-
props,
|
|
115
|
-
{
|
|
116
|
-
onClick: function (e) {
|
|
117
|
-
// Prevents from triggering sort
|
|
118
|
-
e.stopPropagation();
|
|
119
|
-
},
|
|
120
|
-
onMouseDown: function (e) {
|
|
121
|
-
e.persist();
|
|
122
|
-
// Prevents from triggering drag'n'drop
|
|
123
|
-
e.preventDefault();
|
|
124
|
-
// Prevents from triggering sort
|
|
125
|
-
e.stopPropagation();
|
|
126
|
-
onResizeStart(e, header);
|
|
127
|
-
},
|
|
128
|
-
onTouchStart: function (e) {
|
|
129
|
-
e.persist();
|
|
130
|
-
// Prevents from triggering drag'n'drop
|
|
131
|
-
e.preventDefault();
|
|
132
|
-
onResizeStart(e, header);
|
|
133
|
-
},
|
|
134
|
-
style: {
|
|
135
|
-
cursor: 'col-resize',
|
|
136
|
-
},
|
|
137
|
-
draggable: false,
|
|
138
|
-
role: 'separator',
|
|
139
|
-
},
|
|
140
|
-
];
|
|
141
|
-
}; };
|
|
145
|
+
};
|
|
142
146
|
exports.useResizeColumns.pluginName = 'useResizeColumns';
|
|
143
147
|
var reducer = function (newState, action, previousState, instance) {
|
|
144
148
|
if (action.type === react_table_1.actions.init) {
|
package/cjs/core/Tabs/Tab.d.ts
CHANGED
|
@@ -22,10 +22,6 @@ export declare type TabProps = {
|
|
|
22
22
|
*/
|
|
23
23
|
children?: React.ReactNode;
|
|
24
24
|
} & React.HTMLAttributes<HTMLButtonElement>;
|
|
25
|
-
/**
|
|
26
|
-
* @deprecated Use `TabProps` instead.
|
|
27
|
-
*/
|
|
28
|
-
export declare type HorizontalTabProps = TabProps;
|
|
29
25
|
/**
|
|
30
26
|
* Individual tab component to be used in the `labels` prop of `Tabs`.
|
|
31
27
|
* @example
|
|
@@ -35,8 +31,4 @@ export declare type HorizontalTabProps = TabProps;
|
|
|
35
31
|
* ];
|
|
36
32
|
*/
|
|
37
33
|
export declare const Tab: (props: TabProps) => JSX.Element;
|
|
38
|
-
/**
|
|
39
|
-
* @deprecated Use `Tab` instead.
|
|
40
|
-
*/
|
|
41
|
-
export declare const HorizontalTab: (props: TabProps) => JSX.Element;
|
|
42
34
|
export default TabProps;
|
package/cjs/core/Tabs/Tab.js
CHANGED
|
@@ -25,7 +25,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
25
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.
|
|
28
|
+
exports.Tab = void 0;
|
|
29
29
|
/*---------------------------------------------------------------------------------------------
|
|
30
30
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
31
31
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -57,7 +57,3 @@ var Tab = function (props) {
|
|
|
57
57
|
children));
|
|
58
58
|
};
|
|
59
59
|
exports.Tab = Tab;
|
|
60
|
-
/**
|
|
61
|
-
* @deprecated Use `Tab` instead.
|
|
62
|
-
*/
|
|
63
|
-
exports.HorizontalTab = exports.Tab;
|
package/cjs/core/Tabs/Tabs.d.ts
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import '@itwin/itwinui-css/css/tabs.css';
|
|
3
|
+
declare type TabsOrientationProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Orientation of the tabs.
|
|
6
|
+
* @default 'horizontal'
|
|
7
|
+
*/
|
|
8
|
+
orientation?: 'horizontal';
|
|
9
|
+
/**
|
|
10
|
+
* Type of the tabs.
|
|
11
|
+
*
|
|
12
|
+
* If `orientation = 'vertical'`, `pill` is not applicable.
|
|
13
|
+
* @default 'default'
|
|
14
|
+
*/
|
|
15
|
+
type?: 'default' | 'borderless' | 'pill';
|
|
16
|
+
} | {
|
|
17
|
+
orientation: 'vertical';
|
|
18
|
+
type?: 'default' | 'borderless';
|
|
19
|
+
};
|
|
3
20
|
export declare type TabsProps = {
|
|
4
21
|
/**
|
|
5
22
|
* Elements shown for each tab.
|
|
@@ -25,16 +42,6 @@ export declare type TabsProps = {
|
|
|
25
42
|
* @default 'blue'
|
|
26
43
|
*/
|
|
27
44
|
color?: 'blue' | 'green';
|
|
28
|
-
/**
|
|
29
|
-
* Type of the tabs.
|
|
30
|
-
* @default 'default'
|
|
31
|
-
*/
|
|
32
|
-
type?: 'default' | 'borderless' | 'pill';
|
|
33
|
-
/**
|
|
34
|
-
* Orientation of the tabs.
|
|
35
|
-
* @default 'horizontal'
|
|
36
|
-
*/
|
|
37
|
-
orientation?: 'horizontal' | 'vertical';
|
|
38
45
|
/**
|
|
39
46
|
* Custom CSS class name for tabs.
|
|
40
47
|
*/
|
|
@@ -51,8 +58,14 @@ export declare type TabsProps = {
|
|
|
51
58
|
* Content inside the tab panel.
|
|
52
59
|
*/
|
|
53
60
|
children?: React.ReactNode;
|
|
54
|
-
};
|
|
61
|
+
} & TabsOrientationProps;
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated Since v2, use `TabProps` with `Tabs`
|
|
64
|
+
*/
|
|
55
65
|
export declare type HorizontalTabsProps = Omit<TabsProps, 'orientation'>;
|
|
66
|
+
/**
|
|
67
|
+
* @deprecated Since v2, use `TabProps` with `Tabs`
|
|
68
|
+
*/
|
|
56
69
|
export declare type VerticalTabsProps = Omit<TabsProps, 'orientation' | 'type'> & {
|
|
57
70
|
type?: 'default' | 'borderless';
|
|
58
71
|
};
|
|
@@ -67,6 +80,9 @@ export declare type VerticalTabsProps = Omit<TabsProps, 'orientation' | 'type'>
|
|
|
67
80
|
* <Tabs labels={tabs} />
|
|
68
81
|
*
|
|
69
82
|
* @example
|
|
83
|
+
* <Tabs orientation='vertical' labels={tabs} />
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
70
86
|
* const tabsWithSublabels = [
|
|
71
87
|
* <Tab label='Label 1' sublabel='First tab' />,
|
|
72
88
|
* <Tab label='Label 2' sublabel='Active tab' />,
|
|
@@ -82,6 +98,8 @@ export declare type VerticalTabsProps = Omit<TabsProps, 'orientation' | 'type'>
|
|
|
82
98
|
*/
|
|
83
99
|
export declare const Tabs: (props: TabsProps) => JSX.Element;
|
|
84
100
|
/**
|
|
101
|
+
* @deprecated Since v2, directly use `Tabs` with `orientation: 'horizontal'`
|
|
102
|
+
*
|
|
85
103
|
* Tabs organize and allow navigation between groups of content that are related and at the same level of hierarchy.
|
|
86
104
|
* @example
|
|
87
105
|
* const tabs = [
|
|
@@ -93,12 +111,14 @@ export declare const Tabs: (props: TabsProps) => JSX.Element;
|
|
|
93
111
|
*/
|
|
94
112
|
export declare const HorizontalTabs: (props: HorizontalTabsProps) => JSX.Element;
|
|
95
113
|
/**
|
|
114
|
+
* @deprecated Since v2, directly use `Tabs` with `orientation: 'vertical'`
|
|
115
|
+
*
|
|
96
116
|
* Tabs organize and allow navigation between groups of content that are related and at the same level of hierarchy.
|
|
97
117
|
* @example
|
|
98
118
|
* const tabs = [
|
|
99
119
|
* <Tab label='Label 1' sublabel='First tab' />,
|
|
100
120
|
* <Tab label='Label 2' sublabel='Active tab' />,
|
|
101
|
-
* <Tab label='Label 3'
|
|
121
|
+
* <Tab label='Label 3' sublabel='Disabled tab' disabled icon={<SvgPlaceholder />} />,
|
|
102
122
|
* ];
|
|
103
123
|
* <VerticalTabs labels={tabs} activeIndex={1}>Tabpanel content</VerticalTabs>
|
|
104
124
|
*/
|
package/cjs/core/Tabs/Tabs.js
CHANGED
|
@@ -46,6 +46,9 @@ var Tab_1 = require("./Tab");
|
|
|
46
46
|
* <Tabs labels={tabs} />
|
|
47
47
|
*
|
|
48
48
|
* @example
|
|
49
|
+
* <Tabs orientation='vertical' labels={tabs} />
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
49
52
|
* const tabsWithSublabels = [
|
|
50
53
|
* <Tab label='Label 1' sublabel='First tab' />,
|
|
51
54
|
* <Tab label='Label 2' sublabel='Active tab' />,
|
|
@@ -60,24 +63,23 @@ var Tab_1 = require("./Tab");
|
|
|
60
63
|
* <Tabs labels={tabsWithIcons} type='pill' />
|
|
61
64
|
*/
|
|
62
65
|
var Tabs = function (props) {
|
|
63
|
-
var _a, _b, _c;
|
|
64
|
-
var labels = props.labels, activeIndex = props.activeIndex, onTabSelected = props.onTabSelected, _d = props.focusActivationMode, focusActivationMode = _d === void 0 ? 'auto' : _d, _e = props.type, type = _e === void 0 ? 'default' : _e, _f = props.color, color = _f === void 0 ? 'blue' : _f, _g = props.orientation, orientation = _g === void 0 ? 'horizontal' : _g, tabsClassName = props.tabsClassName, contentClassName = props.contentClassName, wrapperClassName = props.wrapperClassName, children = props.children, rest = __rest(props, ["labels", "activeIndex", "onTabSelected", "focusActivationMode", "type", "color", "orientation", "tabsClassName", "contentClassName", "wrapperClassName", "children"]);
|
|
66
|
+
var labels = props.labels, activeIndex = props.activeIndex, onTabSelected = props.onTabSelected, _a = props.focusActivationMode, focusActivationMode = _a === void 0 ? 'auto' : _a, _b = props.type, type = _b === void 0 ? 'default' : _b, _c = props.color, color = _c === void 0 ? 'blue' : _c, _d = props.orientation, orientation = _d === void 0 ? 'horizontal' : _d, tabsClassName = props.tabsClassName, contentClassName = props.contentClassName, wrapperClassName = props.wrapperClassName, children = props.children, rest = __rest(props, ["labels", "activeIndex", "onTabSelected", "focusActivationMode", "type", "color", "orientation", "tabsClassName", "contentClassName", "wrapperClassName", "children"]);
|
|
65
67
|
(0, utils_1.useTheme)();
|
|
66
68
|
var tablistRef = react_1.default.useRef(null);
|
|
67
|
-
var
|
|
69
|
+
var _e = (0, utils_1.useContainerWidth)(type !== 'default'), tablistSizeRef = _e[0], tabsWidth = _e[1];
|
|
68
70
|
var refs = (0, utils_1.useMergedRefs)(tablistRef, tablistSizeRef);
|
|
69
|
-
var
|
|
71
|
+
var _f = react_1.default.useState(function () {
|
|
70
72
|
return activeIndex != null
|
|
71
73
|
? (0, utils_1.getBoundedValue)(activeIndex, 0, labels.length - 1)
|
|
72
74
|
: 0;
|
|
73
|
-
}), currentActiveIndex =
|
|
75
|
+
}), currentActiveIndex = _f[0], setCurrentActiveIndex = _f[1];
|
|
74
76
|
react_1.default.useLayoutEffect(function () {
|
|
75
77
|
if (activeIndex != null && currentActiveIndex !== activeIndex) {
|
|
76
78
|
setCurrentActiveIndex((0, utils_1.getBoundedValue)(activeIndex, 0, labels.length - 1));
|
|
77
79
|
}
|
|
78
80
|
}, [activeIndex, currentActiveIndex, labels.length]);
|
|
79
81
|
// CSS custom properties to place the active stripe
|
|
80
|
-
var
|
|
82
|
+
var _g = react_1.default.useState({}), stripeProperties = _g[0], setStripeProperties = _g[1];
|
|
81
83
|
react_1.default.useLayoutEffect(function () {
|
|
82
84
|
if (type !== 'default' && tablistRef.current != undefined) {
|
|
83
85
|
var activeTab = tablistRef.current.children[currentActiveIndex];
|
|
@@ -91,14 +93,14 @@ var Tabs = function (props) {
|
|
|
91
93
|
})));
|
|
92
94
|
}
|
|
93
95
|
}, [currentActiveIndex, type, orientation, tabsWidth]);
|
|
94
|
-
var
|
|
96
|
+
var _h = react_1.default.useState(), focusedIndex = _h[0], setFocusedIndex = _h[1];
|
|
95
97
|
react_1.default.useEffect(function () {
|
|
96
98
|
if (tablistRef.current && focusedIndex !== undefined) {
|
|
97
99
|
var tab = tablistRef.current.querySelectorAll('.iui-tab')[focusedIndex];
|
|
98
100
|
tab === null || tab === void 0 ? void 0 : tab.focus();
|
|
99
101
|
}
|
|
100
102
|
}, [focusedIndex]);
|
|
101
|
-
var
|
|
103
|
+
var _j = react_1.default.useState(false), hasSublabel = _j[0], setHasSublabel = _j[1]; // used for setting size
|
|
102
104
|
react_1.default.useLayoutEffect(function () {
|
|
103
105
|
var _a;
|
|
104
106
|
setHasSublabel(type !== 'pill' && // pill tabs should never have sublabels
|
|
@@ -171,12 +173,10 @@ var Tabs = function (props) {
|
|
|
171
173
|
break;
|
|
172
174
|
}
|
|
173
175
|
};
|
|
174
|
-
var isIE = !((_c = (_b = (_a = (0, utils_1.getWindow)()) === null || _a === void 0 ? void 0 : _a.CSS) === null || _b === void 0 ? void 0 : _b.supports) === null || _c === void 0 ? void 0 : _c.call(_b, '--stripe-width', '100px'));
|
|
175
176
|
return (react_1.default.createElement("div", { className: (0, classnames_1.default)('iui-tabs-wrapper', "iui-".concat(orientation), wrapperClassName), style: stripeProperties },
|
|
176
177
|
react_1.default.createElement("ul", __assign({ className: (0, classnames_1.default)('iui-tabs', "iui-".concat(type), {
|
|
177
178
|
'iui-green': color === 'green',
|
|
178
|
-
'iui-animated': type !== 'default'
|
|
179
|
-
'iui-not-animated': isIE,
|
|
179
|
+
'iui-animated': type !== 'default',
|
|
180
180
|
'iui-large': hasSublabel,
|
|
181
181
|
}, tabsClassName), role: 'tablist', ref: refs, onKeyDown: onKeyDown }, rest), labels.map(function (label, index) {
|
|
182
182
|
var onClick = function () {
|
|
@@ -202,6 +202,8 @@ var Tabs = function (props) {
|
|
|
202
202
|
};
|
|
203
203
|
exports.Tabs = Tabs;
|
|
204
204
|
/**
|
|
205
|
+
* @deprecated Since v2, directly use `Tabs` with `orientation: 'horizontal'`
|
|
206
|
+
*
|
|
205
207
|
* Tabs organize and allow navigation between groups of content that are related and at the same level of hierarchy.
|
|
206
208
|
* @example
|
|
207
209
|
* const tabs = [
|
|
@@ -214,12 +216,14 @@ exports.Tabs = Tabs;
|
|
|
214
216
|
var HorizontalTabs = function (props) { return (react_1.default.createElement(exports.Tabs, __assign({ orientation: 'horizontal' }, props))); };
|
|
215
217
|
exports.HorizontalTabs = HorizontalTabs;
|
|
216
218
|
/**
|
|
219
|
+
* @deprecated Since v2, directly use `Tabs` with `orientation: 'vertical'`
|
|
220
|
+
*
|
|
217
221
|
* Tabs organize and allow navigation between groups of content that are related and at the same level of hierarchy.
|
|
218
222
|
* @example
|
|
219
223
|
* const tabs = [
|
|
220
224
|
* <Tab label='Label 1' sublabel='First tab' />,
|
|
221
225
|
* <Tab label='Label 2' sublabel='Active tab' />,
|
|
222
|
-
* <Tab label='Label 3'
|
|
226
|
+
* <Tab label='Label 3' sublabel='Disabled tab' disabled icon={<SvgPlaceholder />} />,
|
|
223
227
|
* ];
|
|
224
228
|
* <VerticalTabs labels={tabs} activeIndex={1}>Tabpanel content</VerticalTabs>
|
|
225
229
|
*/
|
package/cjs/core/Tabs/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { VerticalTabs, HorizontalTabs } from './Tabs';
|
|
2
|
-
export type { VerticalTabsProps, HorizontalTabsProps } from './Tabs';
|
|
3
|
-
export { Tab
|
|
4
|
-
export type { TabProps
|
|
1
|
+
export { Tabs, VerticalTabs, HorizontalTabs } from './Tabs';
|
|
2
|
+
export type { TabsProps, VerticalTabsProps, HorizontalTabsProps } from './Tabs';
|
|
3
|
+
export { Tab } from './Tab';
|
|
4
|
+
export type { TabProps } from './Tab';
|
package/cjs/core/Tabs/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Tab = exports.HorizontalTabs = exports.VerticalTabs = exports.Tabs = void 0;
|
|
4
4
|
/*---------------------------------------------------------------------------------------------
|
|
5
5
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
6
6
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
7
7
|
*--------------------------------------------------------------------------------------------*/
|
|
8
8
|
var Tabs_1 = require("./Tabs");
|
|
9
|
+
Object.defineProperty(exports, "Tabs", { enumerable: true, get: function () { return Tabs_1.Tabs; } });
|
|
9
10
|
Object.defineProperty(exports, "VerticalTabs", { enumerable: true, get: function () { return Tabs_1.VerticalTabs; } });
|
|
10
11
|
Object.defineProperty(exports, "HorizontalTabs", { enumerable: true, get: function () { return Tabs_1.HorizontalTabs; } });
|
|
11
12
|
var Tab_1 = require("./Tab");
|
|
12
13
|
Object.defineProperty(exports, "Tab", { enumerable: true, get: function () { return Tab_1.Tab; } });
|
|
13
|
-
Object.defineProperty(exports, "HorizontalTab", { enumerable: true, get: function () { return Tab_1.HorizontalTab; } });
|
package/cjs/core/Tag/Tag.js
CHANGED
|
@@ -32,7 +32,6 @@ exports.Tag = void 0;
|
|
|
32
32
|
*--------------------------------------------------------------------------------------------*/
|
|
33
33
|
var classnames_1 = __importDefault(require("classnames"));
|
|
34
34
|
var react_1 = __importDefault(require("react"));
|
|
35
|
-
var CloseSmall_1 = __importDefault(require("@itwin/itwinui-icons-react/cjs/icons/CloseSmall"));
|
|
36
35
|
var utils_1 = require("../utils");
|
|
37
36
|
require("@itwin/itwinui-css/css/tag.css");
|
|
38
37
|
var Buttons_1 = require("../Buttons");
|
|
@@ -51,7 +50,7 @@ var Tag = function (props) {
|
|
|
51
50
|
}, className) }, rest),
|
|
52
51
|
variant === 'default' ? (react_1.default.createElement("span", { className: 'iui-tag-label' }, children)) : (children),
|
|
53
52
|
onRemove && (react_1.default.createElement(Buttons_1.IconButton, { styleType: 'borderless', size: 'small', onClick: onRemove, "aria-label": 'Delete tag', className: 'iui-tag-button' },
|
|
54
|
-
react_1.default.createElement(
|
|
53
|
+
react_1.default.createElement(utils_1.SvgCloseSmall, { "aria-hidden": true })))));
|
|
55
54
|
};
|
|
56
55
|
exports.Tag = Tag;
|
|
57
56
|
exports.default = exports.Tag;
|
|
@@ -33,7 +33,7 @@ exports.Textarea = void 0;
|
|
|
33
33
|
var classnames_1 = __importDefault(require("classnames"));
|
|
34
34
|
var react_1 = __importDefault(require("react"));
|
|
35
35
|
var utils_1 = require("../utils");
|
|
36
|
-
require("@itwin/itwinui-css/css/
|
|
36
|
+
require("@itwin/itwinui-css/css/input.css");
|
|
37
37
|
/**
|
|
38
38
|
* Basic textarea component
|
|
39
39
|
* @example
|
|
@@ -50,6 +50,6 @@ exports.Textarea = react_1.default.forwardRef(function (props, ref) {
|
|
|
50
50
|
textAreaRef.current.focus();
|
|
51
51
|
}
|
|
52
52
|
}, [setFocus]);
|
|
53
|
-
return (react_1.default.createElement("textarea", __assign({ className: (0, classnames_1.default)('iui-
|
|
53
|
+
return (react_1.default.createElement("textarea", __assign({ className: (0, classnames_1.default)('iui-input', className), rows: rows, ref: refs }, rest)));
|
|
54
54
|
});
|
|
55
55
|
exports.default = exports.Textarea;
|
|
@@ -1,21 +1,31 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ThemeOptions, ThemeType } from '../utils';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*/
|
|
7
|
-
theme?: ThemeType;
|
|
8
|
-
/**
|
|
9
|
-
* Optional children.
|
|
10
|
-
*/
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
/**
|
|
13
|
-
* Options that can be specified to override default theming behavior.
|
|
14
|
-
*/
|
|
15
|
-
themeOptions?: ThemeOptions;
|
|
16
|
-
};
|
|
2
|
+
import type { PolymorphicComponentProps, PolymorphicForwardRefComponent, ThemeOptions, ThemeType, UseThemeProps } from '../utils';
|
|
3
|
+
import '@itwin/itwinui-css/css/global.css';
|
|
4
|
+
import '@itwin/itwinui-variables/index.css';
|
|
5
|
+
export declare type ThemeProviderProps<T extends React.ElementType = 'div'> = PolymorphicComponentProps<T, UseThemeProps>;
|
|
17
6
|
/**
|
|
18
|
-
*
|
|
7
|
+
* This component provides global styles and applies theme to the entire tree
|
|
8
|
+
* that it is wrapping around. The `theme` prop is optional and defaults to the
|
|
9
|
+
* light theme.
|
|
10
|
+
*
|
|
11
|
+
* If you want to theme the entire app, you should use this component at the root.
|
|
12
|
+
* The `as` prop can be used to render a `<body>` element instead of a `<div>`.
|
|
13
|
+
*
|
|
14
|
+
* You can also use this component to apply a different theme to only a part of the tree.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <ThemeProvider theme='os'>
|
|
18
|
+
* <App />
|
|
19
|
+
* </ThemeProvider>
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* <ThemeProvider as='body'>
|
|
23
|
+
* <App />
|
|
24
|
+
* </ThemeProvider>
|
|
19
25
|
*/
|
|
20
|
-
export declare const ThemeProvider:
|
|
26
|
+
export declare const ThemeProvider: PolymorphicForwardRefComponent<"div", UseThemeProps>;
|
|
21
27
|
export default ThemeProvider;
|
|
28
|
+
export declare const ThemeContext: React.Context<{
|
|
29
|
+
theme?: ThemeType | undefined;
|
|
30
|
+
themeOptions?: ThemeOptions | undefined;
|
|
31
|
+
} | undefined>;
|