@itwin/itwinui-react 2.11.3 → 3.0.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/README.md +2 -2
- package/cjs/core/Alert/Alert.d.ts +4 -4
- package/cjs/core/Alert/Alert.js +8 -10
- package/cjs/core/Alert/index.d.ts +0 -1
- package/cjs/core/Avatar/Avatar.d.ts +6 -14
- package/cjs/core/Avatar/Avatar.js +6 -8
- package/cjs/core/Avatar/index.d.ts +0 -1
- package/cjs/core/AvatarGroup/AvatarGroup.d.ts +5 -9
- package/cjs/core/AvatarGroup/AvatarGroup.js +14 -17
- package/cjs/core/AvatarGroup/index.d.ts +0 -1
- package/cjs/core/Backdrop/Backdrop.d.ts +3 -3
- package/cjs/core/Backdrop/Backdrop.js +1 -2
- package/cjs/core/Backdrop/index.d.ts +0 -1
- package/cjs/core/Badge/Badge.d.ts +4 -6
- package/cjs/core/Badge/Badge.js +3 -5
- package/cjs/core/Badge/index.d.ts +0 -1
- package/cjs/core/Breadcrumbs/Breadcrumbs.d.ts +4 -77
- package/cjs/core/Breadcrumbs/Breadcrumbs.js +5 -6
- package/cjs/core/Breadcrumbs/index.d.ts +0 -1
- package/cjs/core/ButtonGroup/ButtonGroup.d.ts +4 -3
- package/cjs/core/ButtonGroup/ButtonGroup.js +15 -13
- package/cjs/core/ButtonGroup/index.d.ts +0 -1
- package/cjs/core/Buttons/Button/Button.d.ts +4 -10
- package/cjs/core/Buttons/Button/Button.js +4 -5
- package/cjs/core/Buttons/Button/index.d.ts +0 -1
- package/cjs/core/Buttons/DropdownButton/DropdownButton.d.ts +5 -21
- package/cjs/core/Buttons/DropdownButton/DropdownButton.js +0 -1
- package/cjs/core/Buttons/DropdownButton/index.d.ts +0 -1
- package/cjs/core/Buttons/IconButton/IconButton.d.ts +2 -3
- package/cjs/core/Buttons/IconButton/IconButton.js +4 -5
- package/cjs/core/Buttons/IconButton/index.d.ts +0 -1
- package/cjs/core/Buttons/IdeasButton/IdeasButton.d.ts +3 -3
- package/cjs/core/Buttons/IdeasButton/IdeasButton.js +0 -1
- package/cjs/core/Buttons/IdeasButton/index.d.ts +0 -1
- package/cjs/core/Buttons/SplitButton/SplitButton.d.ts +2 -3
- package/cjs/core/Buttons/SplitButton/SplitButton.js +1 -2
- package/cjs/core/Buttons/SplitButton/index.d.ts +0 -1
- package/cjs/core/Buttons/index.d.ts +0 -5
- package/cjs/core/Carousel/Carousel.d.ts +24 -26
- package/cjs/core/Carousel/Carousel.js +22 -22
- package/cjs/core/Carousel/CarouselDot.d.ts +11 -9
- package/cjs/core/Carousel/CarouselDot.js +2 -1
- package/cjs/core/Carousel/CarouselDotsList.d.ts +11 -9
- package/cjs/core/Carousel/CarouselDotsList.js +1 -2
- package/cjs/core/Carousel/CarouselNavigation.d.ts +14 -5
- package/cjs/core/Carousel/CarouselNavigation.js +13 -9
- package/cjs/core/Carousel/CarouselSlide.d.ts +10 -8
- package/cjs/core/Carousel/CarouselSlide.js +1 -1
- package/cjs/core/Carousel/CarouselSlider.d.ts +2 -2
- package/cjs/core/Carousel/CarouselSlider.js +1 -1
- package/cjs/core/Carousel/index.d.ts +0 -1
- package/cjs/core/Checkbox/Checkbox.d.ts +4 -31
- package/cjs/core/Checkbox/Checkbox.js +3 -4
- package/cjs/core/Checkbox/index.d.ts +0 -1
- package/cjs/core/ColorPicker/ColorBuilder.d.ts +2 -4
- package/cjs/core/ColorPicker/ColorBuilder.js +3 -4
- package/cjs/core/ColorPicker/ColorInputPanel.d.ts +4 -18
- package/cjs/core/ColorPicker/ColorInputPanel.js +4 -5
- package/cjs/core/ColorPicker/ColorPalette.d.ts +3 -16
- package/cjs/core/ColorPicker/ColorPalette.js +3 -4
- package/cjs/core/ColorPicker/ColorPicker.d.ts +4 -4
- package/cjs/core/ColorPicker/ColorPicker.js +3 -5
- package/cjs/core/ColorPicker/ColorSwatch.d.ts +4 -5
- package/cjs/core/ColorPicker/ColorSwatch.js +1 -2
- package/cjs/core/ColorPicker/index.d.ts +0 -5
- package/cjs/core/ComboBox/ComboBox.d.ts +4 -4
- package/cjs/core/ComboBox/ComboBox.js +5 -7
- package/cjs/core/ComboBox/ComboBoxDropdown.d.ts +3 -3
- package/cjs/core/ComboBox/ComboBoxEndIcon.d.ts +7 -5
- package/cjs/core/ComboBox/ComboBoxEndIcon.js +1 -1
- package/cjs/core/ComboBox/ComboBoxInput.d.ts +7 -6
- package/cjs/core/ComboBox/ComboBoxInputContainer.d.ts +3 -7
- package/cjs/core/ComboBox/ComboBoxInputContainer.js +4 -5
- package/cjs/core/ComboBox/ComboBoxMenu.d.ts +5 -2
- package/cjs/core/ComboBox/ComboBoxMenu.js +2 -2
- package/cjs/core/ComboBox/ComboBoxMenuItem.d.ts +6 -19
- package/cjs/core/ComboBox/ComboBoxMenuItem.js +8 -22
- package/cjs/core/ComboBox/ComboBoxMultipleContainer.d.ts +6 -3
- package/cjs/core/ComboBox/index.d.ts +0 -1
- package/cjs/core/DatePicker/DatePicker.d.ts +4 -4
- package/cjs/core/DatePicker/DatePicker.js +13 -31
- package/cjs/core/DatePicker/index.d.ts +0 -1
- package/cjs/core/Dialog/Dialog.d.ts +13 -9
- package/cjs/core/Dialog/Dialog.js +21 -22
- package/cjs/core/Dialog/DialogBackdrop.d.ts +4 -4
- package/cjs/core/Dialog/DialogBackdrop.js +1 -3
- package/cjs/core/Dialog/DialogButtonBar.d.ts +1 -8
- package/cjs/core/Dialog/DialogButtonBar.js +1 -33
- package/cjs/core/Dialog/DialogContent.d.ts +1 -8
- package/cjs/core/Dialog/DialogContent.js +1 -33
- package/cjs/core/Dialog/DialogMain.d.ts +3 -2
- package/cjs/core/Dialog/DialogMain.js +1 -2
- package/cjs/core/Dialog/DialogTitleBar.d.ts +5 -4
- package/cjs/core/Dialog/DialogTitleBar.js +1 -2
- package/cjs/core/Dialog/DialogTitleBarTitle.d.ts +1 -8
- package/cjs/core/Dialog/DialogTitleBarTitle.js +1 -33
- package/cjs/core/Dialog/index.d.ts +0 -5
- package/cjs/core/DropdownMenu/DropdownMenu.js +0 -1
- package/cjs/core/ExpandableBlock/ExpandableBlock.d.ts +4 -4
- package/cjs/core/ExpandableBlock/ExpandableBlock.js +9 -11
- package/cjs/core/ExpandableBlock/index.d.ts +0 -1
- package/cjs/core/Fieldset/Fieldset.d.ts +4 -3
- package/cjs/core/Fieldset/Fieldset.js +3 -5
- package/cjs/core/Fieldset/index.d.ts +0 -1
- package/cjs/core/FileUpload/FileEmptyCard.d.ts +4 -11
- package/cjs/core/FileUpload/FileEmptyCard.js +16 -13
- package/cjs/core/FileUpload/FileUpload.d.ts +4 -25
- package/cjs/core/FileUpload/FileUpload.js +3 -4
- package/cjs/core/FileUpload/FileUploadCard.d.ts +11 -51
- package/cjs/core/FileUpload/FileUploadCard.js +43 -35
- package/cjs/core/FileUpload/FileUploadTemplate.d.ts +4 -3
- package/cjs/core/FileUpload/FileUploadTemplate.js +5 -7
- package/cjs/core/FileUpload/index.d.ts +0 -4
- package/cjs/core/Footer/Footer.d.ts +6 -10
- package/cjs/core/Footer/Footer.js +1 -2
- package/cjs/core/Footer/FooterItem.d.ts +1 -3
- package/cjs/core/Footer/FooterItem.js +1 -34
- package/cjs/core/Footer/FooterList.d.ts +1 -3
- package/cjs/core/Footer/FooterList.js +1 -34
- package/cjs/core/Footer/FooterSeparator.d.ts +1 -3
- package/cjs/core/Footer/FooterSeparator.js +3 -34
- package/cjs/core/Footer/index.d.ts +1 -1
- package/cjs/core/Header/Header.d.ts +5 -5
- package/cjs/core/Header/Header.js +7 -9
- package/cjs/core/Header/HeaderBasicButton.d.ts +2 -4
- package/cjs/core/Header/HeaderBasicButton.js +4 -11
- package/cjs/core/Header/HeaderBreadcrumbs.d.ts +3 -2
- package/cjs/core/Header/HeaderBreadcrumbs.js +10 -8
- package/cjs/core/Header/HeaderButton.d.ts +5 -6
- package/cjs/core/Header/HeaderButton.js +8 -24
- package/cjs/core/Header/HeaderDropdownButton.d.ts +2 -4
- package/cjs/core/Header/HeaderDropdownButton.js +0 -1
- package/cjs/core/Header/HeaderLogo.d.ts +1 -2
- package/cjs/core/Header/HeaderLogo.js +5 -12
- package/cjs/core/Header/HeaderSplitButton.d.ts +2 -4
- package/cjs/core/Header/HeaderSplitButton.js +3 -4
- package/cjs/core/Header/index.d.ts +0 -4
- package/cjs/core/InformationPanel/InformationPanel.d.ts +4 -24
- package/cjs/core/InformationPanel/InformationPanel.js +3 -4
- package/cjs/core/InformationPanel/InformationPanelBody.d.ts +1 -9
- package/cjs/core/InformationPanel/InformationPanelBody.js +1 -34
- package/cjs/core/InformationPanel/InformationPanelContent.d.ts +4 -4
- package/cjs/core/InformationPanel/InformationPanelContent.js +3 -5
- package/cjs/core/InformationPanel/InformationPanelHeader.d.ts +4 -4
- package/cjs/core/InformationPanel/InformationPanelHeader.js +5 -7
- package/cjs/core/InformationPanel/InformationPanelWrapper.d.ts +1 -6
- package/cjs/core/InformationPanel/InformationPanelWrapper.js +1 -34
- package/cjs/core/InformationPanel/index.d.ts +0 -5
- package/cjs/core/Input/Input.d.ts +3 -13
- package/cjs/core/Input/Input.js +1 -2
- package/cjs/core/Input/index.d.ts +0 -1
- package/cjs/core/InputGroup/InputGroup.d.ts +4 -4
- package/cjs/core/InputGroup/InputGroup.js +5 -7
- package/cjs/core/InputGroup/index.d.ts +0 -1
- package/cjs/core/Label/Label.d.ts +3 -9
- package/cjs/core/Label/Label.js +5 -7
- package/cjs/core/Label/index.d.ts +0 -1
- package/cjs/core/LabeledInput/LabeledInput.d.ts +2 -46
- package/cjs/core/LabeledInput/LabeledInput.js +0 -1
- package/cjs/core/LabeledInput/index.d.ts +0 -1
- package/cjs/core/LabeledSelect/LabeledSelect.d.ts +1 -1
- package/cjs/core/LabeledSelect/LabeledSelect.js +0 -1
- package/cjs/core/LabeledSelect/index.d.ts +0 -1
- package/cjs/core/LabeledTextarea/LabeledTextarea.d.ts +4 -26
- package/cjs/core/LabeledTextarea/LabeledTextarea.js +0 -1
- package/cjs/core/LabeledTextarea/index.d.ts +0 -1
- package/cjs/core/List/List.d.ts +1 -5
- package/cjs/core/List/List.js +2 -33
- package/cjs/core/List/ListItem.d.ts +6 -13
- package/cjs/core/List/ListItem.js +9 -15
- package/cjs/core/List/index.d.ts +0 -2
- package/cjs/core/Menu/Menu.d.ts +4 -27
- package/cjs/core/Menu/Menu.js +2 -3
- package/cjs/core/Menu/MenuDivider.d.ts +1 -4
- package/cjs/core/Menu/MenuDivider.js +3 -34
- package/cjs/core/Menu/MenuExtraContent.d.ts +1 -6
- package/cjs/core/Menu/MenuExtraContent.js +3 -34
- package/cjs/core/Menu/MenuItem.d.ts +14 -60
- package/cjs/core/Menu/MenuItem.js +12 -23
- package/cjs/core/Menu/MenuItemSkeleton.d.ts +4 -5
- package/cjs/core/Menu/MenuItemSkeleton.js +8 -10
- package/cjs/core/Menu/index.d.ts +0 -5
- package/cjs/core/Modal/Modal.d.ts +5 -5
- package/cjs/core/Modal/Modal.js +3 -5
- package/cjs/core/Modal/ModalButtonBar.d.ts +1 -9
- package/cjs/core/Modal/ModalButtonBar.js +1 -26
- package/cjs/core/Modal/ModalContent.d.ts +1 -9
- package/cjs/core/Modal/ModalContent.js +1 -26
- package/cjs/core/Modal/index.d.ts +0 -3
- package/cjs/core/NonIdealState/NonIdealState.d.ts +4 -3
- package/cjs/core/NonIdealState/NonIdealState.js +7 -9
- package/cjs/core/NonIdealState/index.d.ts +1 -2
- package/cjs/core/NotificationMarker/NotificationMarker.d.ts +4 -3
- package/cjs/core/NotificationMarker/NotificationMarker.js +1 -2
- package/cjs/core/NotificationMarker/index.d.ts +0 -1
- package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.d.ts +4 -4
- package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +8 -10
- package/cjs/core/ProgressIndicators/ProgressLinear/index.d.ts +0 -1
- package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.d.ts +4 -4
- package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +10 -12
- package/cjs/core/ProgressIndicators/ProgressRadial/index.d.ts +0 -1
- package/cjs/core/ProgressIndicators/index.d.ts +0 -2
- package/cjs/core/Radio/Radio.d.ts +4 -17
- package/cjs/core/Radio/Radio.js +3 -4
- package/cjs/core/Radio/index.d.ts +0 -1
- package/cjs/core/RadioTiles/RadioTile.d.ts +4 -21
- package/cjs/core/RadioTiles/RadioTile.js +6 -10
- package/cjs/core/RadioTiles/RadioTileGroup.d.ts +5 -4
- package/cjs/core/RadioTiles/RadioTileGroup.js +4 -6
- package/cjs/core/RadioTiles/index.d.ts +0 -2
- package/cjs/core/SearchBox/SearchBox.d.ts +4 -16
- package/cjs/core/SearchBox/SearchBox.js +1 -2
- package/cjs/core/SearchBox/index.d.ts +0 -1
- package/cjs/core/Select/Select.d.ts +6 -1
- package/cjs/core/Select/Select.js +12 -12
- package/cjs/core/Select/SelectTag.d.ts +4 -5
- package/cjs/core/Select/SelectTag.js +4 -6
- package/cjs/core/Select/SelectTagContainer.d.ts +4 -8
- package/cjs/core/Select/SelectTagContainer.js +1 -2
- package/cjs/core/Select/index.d.ts +1 -1
- package/cjs/core/SideNavigation/SideNavigation.d.ts +4 -4
- package/cjs/core/SideNavigation/SideNavigation.js +7 -9
- package/cjs/core/SideNavigation/SidenavButton.d.ts +3 -4
- package/cjs/core/SideNavigation/SidenavButton.js +2 -6
- package/cjs/core/SideNavigation/SidenavSubmenu.d.ts +2 -14
- package/cjs/core/SideNavigation/SidenavSubmenu.js +2 -3
- package/cjs/core/SideNavigation/SidenavSubmenuHeader.d.ts +4 -8
- package/cjs/core/SideNavigation/SidenavSubmenuHeader.js +5 -7
- package/cjs/core/SideNavigation/index.d.ts +0 -4
- package/cjs/core/SkipToContentLink/SkipToContentLink.d.ts +4 -13
- package/cjs/core/SkipToContentLink/SkipToContentLink.js +1 -2
- package/cjs/core/SkipToContentLink/index.d.ts +0 -1
- package/cjs/core/Slider/Slider.d.ts +4 -99
- package/cjs/core/Slider/Slider.js +6 -7
- package/cjs/core/Slider/Thumb.d.ts +3 -2
- package/cjs/core/Slider/Thumb.js +2 -1
- package/cjs/core/Slider/index.d.ts +0 -1
- package/cjs/core/StatusMessage/StatusMessage.d.ts +1 -1
- package/cjs/core/StatusMessage/StatusMessage.js +3 -18
- package/cjs/core/StatusMessage/index.d.ts +0 -1
- package/cjs/core/Stepper/Stepper.d.ts +2 -2
- package/cjs/core/Stepper/Stepper.js +3 -4
- package/cjs/core/Stepper/StepperStep.d.ts +3 -4
- package/cjs/core/Stepper/StepperStep.js +8 -8
- package/cjs/core/Stepper/Wizard.js +3 -1
- package/cjs/core/Stepper/WorkflowDiagram.d.ts +3 -3
- package/cjs/core/Stepper/WorkflowDiagram.js +5 -4
- package/cjs/core/Stepper/WorkflowDiagramStep.d.ts +2 -2
- package/cjs/core/Stepper/WorkflowDiagramStep.js +3 -2
- package/cjs/core/Stepper/index.d.ts +2 -3
- package/cjs/core/Surface/Surface.d.ts +5 -17
- package/cjs/core/Surface/Surface.js +7 -6
- package/cjs/core/Surface/index.d.ts +0 -1
- package/cjs/core/Table/Table.js +1 -1
- package/cjs/core/Table/TablePaginator.js +1 -1
- package/cjs/core/Table/columns/actionColumn.js +1 -1
- package/cjs/core/Table/columns/expanderColumn.d.ts +1 -1
- package/cjs/core/Table/columns/expanderColumn.js +1 -1
- package/cjs/core/Table/filters/BaseFilter.js +1 -1
- package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.d.ts +3 -3
- package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +1 -1
- package/cjs/core/Table/filters/FilterButtonBar.js +1 -1
- package/cjs/core/Table/filters/FilterToggle.d.ts +2 -2
- package/cjs/core/Table/filters/FilterToggle.js +1 -1
- package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +1 -1
- package/cjs/core/Table/filters/TextFilter/TextFilter.js +1 -1
- package/cjs/core/Tabs/Tab.d.ts +10 -3
- package/cjs/core/Tabs/Tab.js +7 -13
- package/cjs/core/Tabs/Tabs.d.ts +2 -2
- package/cjs/core/Tabs/Tabs.js +6 -9
- package/cjs/core/Tabs/index.d.ts +0 -2
- package/cjs/core/Tag/Tag.d.ts +4 -4
- package/cjs/core/Tag/Tag.js +5 -7
- package/cjs/core/Tag/TagContainer.d.ts +4 -4
- package/cjs/core/Tag/TagContainer.js +4 -6
- package/cjs/core/Tag/index.d.ts +0 -2
- package/cjs/core/Textarea/Textarea.d.ts +3 -9
- package/cjs/core/Textarea/Textarea.js +1 -2
- package/cjs/core/Textarea/index.d.ts +0 -1
- package/cjs/core/ThemeProvider/ThemeContext.d.ts +7 -0
- package/cjs/core/{Typography/Small/Small.js → ThemeProvider/ThemeContext.js} +2 -18
- package/cjs/core/ThemeProvider/ThemeProvider.d.ts +11 -12
- package/cjs/core/ThemeProvider/ThemeProvider.js +6 -16
- package/cjs/core/ThemeProvider/index.d.ts +1 -1
- package/cjs/core/Tile/Tile.d.ts +6 -7
- package/cjs/core/Tile/Tile.js +17 -19
- package/cjs/core/Tile/index.d.ts +0 -1
- package/cjs/core/TimePicker/TimePicker.d.ts +3 -3
- package/cjs/core/TimePicker/TimePicker.js +5 -7
- package/cjs/core/TimePicker/index.d.ts +1 -1
- package/cjs/core/Toast/Toast.js +5 -5
- package/cjs/core/Toast/ToastWrapper.js +2 -1
- package/cjs/core/ToggleSwitch/ToggleSwitch.d.ts +4 -3
- package/cjs/core/ToggleSwitch/ToggleSwitch.js +3 -9
- package/cjs/core/ToggleSwitch/index.d.ts +0 -1
- package/cjs/core/Tooltip/Tooltip.js +1 -2
- package/cjs/core/Tooltip/index.d.ts +0 -1
- package/cjs/core/Tree/Tree.d.ts +1 -1
- package/cjs/core/Tree/Tree.js +4 -4
- package/cjs/core/Tree/TreeNode.d.ts +1 -1
- package/cjs/core/Tree/TreeNode.js +10 -15
- package/cjs/core/Tree/TreeNodeExpander.d.ts +4 -4
- package/cjs/core/Tree/TreeNodeExpander.js +3 -4
- package/cjs/core/Tree/index.d.ts +1 -3
- package/cjs/core/Typography/Anchor/Anchor.d.ts +1 -5
- package/cjs/core/Typography/Anchor/Anchor.js +1 -33
- package/cjs/core/Typography/Anchor/index.d.ts +0 -1
- package/cjs/core/Typography/Blockquote/Blockquote.d.ts +4 -8
- package/cjs/core/Typography/Blockquote/Blockquote.js +1 -2
- package/cjs/core/Typography/Blockquote/index.d.ts +0 -1
- package/cjs/core/Typography/Code/Code.d.ts +1 -9
- package/cjs/core/Typography/Code/Code.js +1 -34
- package/cjs/core/Typography/Code/index.d.ts +0 -1
- package/cjs/core/Typography/Kbd/Kbd.d.ts +4 -5
- package/cjs/core/Typography/Kbd/Kbd.js +3 -5
- package/cjs/core/Typography/Kbd/index.d.ts +0 -1
- package/cjs/core/Typography/Text/Text.d.ts +3 -6
- package/cjs/core/Typography/Text/Text.js +2 -3
- package/cjs/core/Typography/Text/index.d.ts +0 -1
- package/cjs/core/Typography/index.d.ts +0 -17
- package/cjs/core/Typography/index.js +10 -22
- package/cjs/core/index.d.ts +10 -57
- package/cjs/core/index.js +1 -8
- package/cjs/core/utils/components/Box.d.ts +6 -0
- package/cjs/core/{Typography/Leading/index.js → utils/components/Box.js} +8 -4
- package/cjs/core/utils/components/Divider.d.ts +4 -4
- package/cjs/core/utils/components/Divider.js +2 -3
- package/cjs/core/utils/components/Flex.d.ts +1 -4
- package/cjs/core/utils/components/Flex.js +10 -6
- package/cjs/core/utils/components/Icon.d.ts +2 -24
- package/cjs/core/utils/components/Icon.js +2 -1
- package/cjs/core/utils/components/InputContainer.js +6 -10
- package/cjs/core/utils/components/InputFlexContainer.d.ts +3 -5
- package/cjs/core/utils/components/InputFlexContainer.js +3 -2
- package/cjs/core/utils/components/LinkAction.d.ts +2 -8
- package/cjs/core/utils/components/LinkAction.js +3 -36
- package/cjs/core/utils/components/Popover.d.ts +1 -1
- package/cjs/core/utils/components/Popover.js +2 -2
- package/cjs/core/utils/components/VisuallyHidden.d.ts +1 -2
- package/cjs/core/utils/components/VisuallyHidden.js +3 -4
- package/cjs/core/utils/components/index.d.ts +1 -0
- package/cjs/core/utils/components/index.js +1 -0
- package/cjs/core/utils/functions/index.d.ts +1 -0
- package/cjs/core/utils/functions/index.js +1 -0
- package/cjs/core/utils/functions/polymorphic.d.ts +198 -0
- package/cjs/core/utils/functions/polymorphic.js +81 -0
- package/cjs/core/utils/hooks/index.d.ts +1 -1
- package/cjs/core/utils/hooks/index.js +1 -1
- package/cjs/core/utils/hooks/useGlobals.d.ts +10 -0
- package/cjs/core/utils/hooks/useGlobals.js +79 -0
- package/cjs/core/utils/hooks/useIsThemeAlreadySet.js +2 -2
- package/cjs/core/utils/icons/Svg.d.ts +1 -0
- package/cjs/core/{Typography/Body/index.js → utils/icons/Svg.js} +3 -4
- package/cjs/core/utils/icons/SvgCalendar.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCalendar.js +2 -1
- package/cjs/core/utils/icons/SvgCaretDownSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCaretDownSmall.js +2 -1
- package/cjs/core/utils/icons/SvgCaretRightSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCaretRightSmall.js +2 -1
- package/cjs/core/utils/icons/SvgCaretUpSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCaretUpSmall.js +2 -1
- package/cjs/core/utils/icons/SvgCheckmark.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCheckmark.js +2 -1
- package/cjs/core/utils/icons/SvgCheckmarkSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCheckmarkSmall.js +2 -1
- package/cjs/core/utils/icons/SvgChevronLeft.d.ts +1 -1
- package/cjs/core/utils/icons/SvgChevronLeft.js +2 -1
- package/cjs/core/utils/icons/SvgChevronLeftDouble.d.ts +1 -1
- package/cjs/core/utils/icons/SvgChevronLeftDouble.js +2 -1
- package/cjs/core/utils/icons/SvgChevronRight.d.ts +1 -1
- package/cjs/core/utils/icons/SvgChevronRight.js +2 -1
- package/cjs/core/utils/icons/SvgChevronRightDouble.d.ts +1 -1
- package/cjs/core/utils/icons/SvgChevronRightDouble.js +2 -1
- package/cjs/core/utils/icons/SvgClose.d.ts +1 -1
- package/cjs/core/utils/icons/SvgClose.js +2 -1
- package/cjs/core/utils/icons/SvgCloseSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCloseSmall.js +2 -1
- package/cjs/core/utils/icons/SvgColumnManager.d.ts +1 -1
- package/cjs/core/utils/icons/SvgColumnManager.js +2 -1
- package/cjs/core/utils/icons/SvgDocument.d.ts +1 -1
- package/cjs/core/utils/icons/SvgDocument.js +2 -1
- package/cjs/core/utils/icons/SvgFilter.d.ts +1 -1
- package/cjs/core/utils/icons/SvgFilter.js +2 -1
- package/cjs/core/utils/icons/SvgFilterHollow.d.ts +1 -1
- package/cjs/core/utils/icons/SvgFilterHollow.js +2 -1
- package/cjs/core/utils/icons/SvgImportantSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgImportantSmall.js +2 -1
- package/cjs/core/utils/icons/SvgInfoCircular.d.ts +1 -1
- package/cjs/core/utils/icons/SvgInfoCircular.js +2 -1
- package/cjs/core/utils/icons/SvgMore.d.ts +1 -1
- package/cjs/core/utils/icons/SvgMore.js +2 -1
- package/cjs/core/utils/icons/SvgMoreVertical.d.ts +1 -1
- package/cjs/core/utils/icons/SvgMoreVertical.js +2 -1
- package/cjs/core/utils/icons/SvgNew.d.ts +1 -1
- package/cjs/core/utils/icons/SvgNew.js +2 -1
- package/cjs/core/utils/icons/SvgSearch.d.ts +1 -1
- package/cjs/core/utils/icons/SvgSearch.js +2 -1
- package/cjs/core/utils/icons/SvgSmileyHappy.d.ts +1 -1
- package/cjs/core/utils/icons/SvgSmileyHappy.js +2 -1
- package/cjs/core/utils/icons/SvgSortDown.d.ts +1 -1
- package/cjs/core/utils/icons/SvgSortDown.js +2 -1
- package/cjs/core/utils/icons/SvgSortUp.d.ts +1 -1
- package/cjs/core/utils/icons/SvgSortUp.js +2 -1
- package/cjs/core/utils/icons/SvgStatusError.d.ts +1 -1
- package/cjs/core/utils/icons/SvgStatusError.js +2 -1
- package/cjs/core/utils/icons/SvgStatusSuccess.d.ts +1 -1
- package/cjs/core/utils/icons/SvgStatusSuccess.js +2 -1
- package/cjs/core/utils/icons/SvgStatusWarning.d.ts +1 -1
- package/cjs/core/utils/icons/SvgStatusWarning.js +2 -1
- package/cjs/core/utils/icons/SvgSwap.d.ts +1 -1
- package/cjs/core/utils/icons/SvgSwap.js +2 -1
- package/cjs/core/utils/icons/SvgUpload.d.ts +1 -1
- package/cjs/core/utils/icons/SvgUpload.js +2 -1
- package/cjs/core/utils/props.d.ts +10 -33
- package/cjs/types/react-table-config.d.ts +1 -1
- package/esm/core/Alert/Alert.d.ts +4 -4
- package/esm/core/Alert/Alert.js +9 -10
- package/esm/core/Alert/index.d.ts +0 -1
- package/esm/core/Avatar/Avatar.d.ts +6 -14
- package/esm/core/Avatar/Avatar.js +7 -8
- package/esm/core/Avatar/index.d.ts +0 -1
- package/esm/core/AvatarGroup/AvatarGroup.d.ts +5 -9
- package/esm/core/AvatarGroup/AvatarGroup.js +15 -17
- package/esm/core/AvatarGroup/index.d.ts +0 -1
- package/esm/core/Backdrop/Backdrop.d.ts +3 -3
- package/esm/core/Backdrop/Backdrop.js +2 -3
- package/esm/core/Backdrop/index.d.ts +0 -1
- package/esm/core/Badge/Badge.d.ts +4 -6
- package/esm/core/Badge/Badge.js +4 -5
- package/esm/core/Badge/index.d.ts +0 -1
- package/esm/core/Breadcrumbs/Breadcrumbs.d.ts +4 -77
- package/esm/core/Breadcrumbs/Breadcrumbs.js +6 -7
- package/esm/core/Breadcrumbs/index.d.ts +0 -1
- package/esm/core/ButtonGroup/ButtonGroup.d.ts +4 -3
- package/esm/core/ButtonGroup/ButtonGroup.js +16 -14
- package/esm/core/ButtonGroup/index.d.ts +0 -1
- package/esm/core/Buttons/Button/Button.d.ts +4 -10
- package/esm/core/Buttons/Button/Button.js +5 -6
- package/esm/core/Buttons/Button/index.d.ts +0 -1
- package/esm/core/Buttons/DropdownButton/DropdownButton.d.ts +5 -21
- package/esm/core/Buttons/DropdownButton/DropdownButton.js +1 -2
- package/esm/core/Buttons/DropdownButton/index.d.ts +0 -1
- package/esm/core/Buttons/IconButton/IconButton.d.ts +2 -3
- package/esm/core/Buttons/IconButton/IconButton.js +5 -6
- package/esm/core/Buttons/IconButton/index.d.ts +0 -1
- package/esm/core/Buttons/IdeasButton/IdeasButton.d.ts +3 -3
- package/esm/core/Buttons/IdeasButton/IdeasButton.js +1 -2
- package/esm/core/Buttons/IdeasButton/index.d.ts +0 -1
- package/esm/core/Buttons/SplitButton/SplitButton.d.ts +2 -3
- package/esm/core/Buttons/SplitButton/SplitButton.js +2 -3
- package/esm/core/Buttons/SplitButton/index.d.ts +0 -1
- package/esm/core/Buttons/index.d.ts +0 -5
- package/esm/core/Carousel/Carousel.d.ts +24 -26
- package/esm/core/Carousel/Carousel.js +23 -23
- package/esm/core/Carousel/CarouselDot.d.ts +11 -9
- package/esm/core/Carousel/CarouselDot.js +2 -1
- package/esm/core/Carousel/CarouselDotsList.d.ts +11 -9
- package/esm/core/Carousel/CarouselDotsList.js +2 -3
- package/esm/core/Carousel/CarouselNavigation.d.ts +14 -5
- package/esm/core/Carousel/CarouselNavigation.js +14 -10
- package/esm/core/Carousel/CarouselSlide.d.ts +10 -8
- package/esm/core/Carousel/CarouselSlide.js +2 -2
- package/esm/core/Carousel/CarouselSlider.d.ts +2 -2
- package/esm/core/Carousel/CarouselSlider.js +2 -2
- package/esm/core/Carousel/index.d.ts +0 -1
- package/esm/core/Checkbox/Checkbox.d.ts +4 -31
- package/esm/core/Checkbox/Checkbox.js +4 -5
- package/esm/core/Checkbox/index.d.ts +0 -1
- package/esm/core/ColorPicker/ColorBuilder.d.ts +2 -4
- package/esm/core/ColorPicker/ColorBuilder.js +4 -5
- package/esm/core/ColorPicker/ColorInputPanel.d.ts +4 -18
- package/esm/core/ColorPicker/ColorInputPanel.js +5 -6
- package/esm/core/ColorPicker/ColorPalette.d.ts +3 -16
- package/esm/core/ColorPicker/ColorPalette.js +4 -5
- package/esm/core/ColorPicker/ColorPicker.d.ts +4 -4
- package/esm/core/ColorPicker/ColorPicker.js +4 -5
- package/esm/core/ColorPicker/ColorSwatch.d.ts +4 -5
- package/esm/core/ColorPicker/ColorSwatch.js +2 -3
- package/esm/core/ColorPicker/index.d.ts +0 -5
- package/esm/core/ComboBox/ComboBox.d.ts +4 -4
- package/esm/core/ComboBox/ComboBox.js +6 -8
- package/esm/core/ComboBox/ComboBoxDropdown.d.ts +3 -3
- package/esm/core/ComboBox/ComboBoxEndIcon.d.ts +7 -5
- package/esm/core/ComboBox/ComboBoxEndIcon.js +2 -2
- package/esm/core/ComboBox/ComboBoxInput.d.ts +7 -6
- package/esm/core/ComboBox/ComboBoxInputContainer.d.ts +3 -7
- package/esm/core/ComboBox/ComboBoxInputContainer.js +5 -5
- package/esm/core/ComboBox/ComboBoxMenu.d.ts +5 -2
- package/esm/core/ComboBox/ComboBoxMenu.js +2 -2
- package/esm/core/ComboBox/ComboBoxMenuItem.d.ts +6 -19
- package/esm/core/ComboBox/ComboBoxMenuItem.js +8 -19
- package/esm/core/ComboBox/ComboBoxMultipleContainer.d.ts +6 -3
- package/esm/core/ComboBox/index.d.ts +0 -1
- package/esm/core/DatePicker/DatePicker.d.ts +4 -4
- package/esm/core/DatePicker/DatePicker.js +14 -31
- package/esm/core/DatePicker/index.d.ts +0 -1
- package/esm/core/Dialog/Dialog.d.ts +13 -9
- package/esm/core/Dialog/Dialog.js +22 -23
- package/esm/core/Dialog/DialogBackdrop.d.ts +4 -4
- package/esm/core/Dialog/DialogBackdrop.js +1 -3
- package/esm/core/Dialog/DialogButtonBar.d.ts +1 -8
- package/esm/core/Dialog/DialogButtonBar.js +2 -8
- package/esm/core/Dialog/DialogContent.d.ts +1 -8
- package/esm/core/Dialog/DialogContent.js +2 -8
- package/esm/core/Dialog/DialogMain.d.ts +3 -2
- package/esm/core/Dialog/DialogMain.js +2 -3
- package/esm/core/Dialog/DialogTitleBar.d.ts +5 -4
- package/esm/core/Dialog/DialogTitleBar.js +2 -3
- package/esm/core/Dialog/DialogTitleBarTitle.d.ts +1 -8
- package/esm/core/Dialog/DialogTitleBarTitle.js +2 -8
- package/esm/core/Dialog/index.d.ts +0 -5
- package/esm/core/DropdownMenu/DropdownMenu.js +1 -2
- package/esm/core/ExpandableBlock/ExpandableBlock.d.ts +4 -4
- package/esm/core/ExpandableBlock/ExpandableBlock.js +10 -11
- package/esm/core/ExpandableBlock/index.d.ts +0 -1
- package/esm/core/Fieldset/Fieldset.d.ts +4 -3
- package/esm/core/Fieldset/Fieldset.js +4 -5
- package/esm/core/Fieldset/index.d.ts +0 -1
- package/esm/core/FileUpload/FileEmptyCard.d.ts +4 -11
- package/esm/core/FileUpload/FileEmptyCard.js +17 -14
- package/esm/core/FileUpload/FileUpload.d.ts +4 -25
- package/esm/core/FileUpload/FileUpload.js +4 -5
- package/esm/core/FileUpload/FileUploadCard.d.ts +11 -51
- package/esm/core/FileUpload/FileUploadCard.js +44 -36
- package/esm/core/FileUpload/FileUploadTemplate.d.ts +4 -3
- package/esm/core/FileUpload/FileUploadTemplate.js +6 -7
- package/esm/core/FileUpload/index.d.ts +0 -4
- package/esm/core/Footer/Footer.d.ts +6 -10
- package/esm/core/Footer/Footer.js +2 -3
- package/esm/core/Footer/FooterItem.d.ts +1 -3
- package/esm/core/Footer/FooterItem.js +2 -8
- package/esm/core/Footer/FooterList.d.ts +1 -3
- package/esm/core/Footer/FooterList.js +2 -8
- package/esm/core/Footer/FooterSeparator.d.ts +1 -3
- package/esm/core/Footer/FooterSeparator.js +4 -8
- package/esm/core/Footer/index.d.ts +1 -1
- package/esm/core/Header/Header.d.ts +5 -5
- package/esm/core/Header/Header.js +8 -9
- package/esm/core/Header/HeaderBasicButton.d.ts +2 -4
- package/esm/core/Header/HeaderBasicButton.js +5 -12
- package/esm/core/Header/HeaderBreadcrumbs.d.ts +3 -2
- package/esm/core/Header/HeaderBreadcrumbs.js +8 -8
- package/esm/core/Header/HeaderButton.d.ts +5 -6
- package/esm/core/Header/HeaderButton.js +9 -22
- package/esm/core/Header/HeaderDropdownButton.d.ts +2 -4
- package/esm/core/Header/HeaderDropdownButton.js +1 -2
- package/esm/core/Header/HeaderLogo.d.ts +1 -2
- package/esm/core/Header/HeaderLogo.js +6 -13
- package/esm/core/Header/HeaderSplitButton.d.ts +2 -4
- package/esm/core/Header/HeaderSplitButton.js +4 -5
- package/esm/core/Header/index.d.ts +0 -4
- package/esm/core/InformationPanel/InformationPanel.d.ts +4 -24
- package/esm/core/InformationPanel/InformationPanel.js +4 -5
- package/esm/core/InformationPanel/InformationPanelBody.d.ts +1 -9
- package/esm/core/InformationPanel/InformationPanelBody.js +2 -8
- package/esm/core/InformationPanel/InformationPanelContent.d.ts +4 -4
- package/esm/core/InformationPanel/InformationPanelContent.js +4 -5
- package/esm/core/InformationPanel/InformationPanelHeader.d.ts +4 -4
- package/esm/core/InformationPanel/InformationPanelHeader.js +6 -7
- package/esm/core/InformationPanel/InformationPanelWrapper.d.ts +1 -6
- package/esm/core/InformationPanel/InformationPanelWrapper.js +2 -8
- package/esm/core/InformationPanel/index.d.ts +0 -5
- package/esm/core/Input/Input.d.ts +3 -13
- package/esm/core/Input/Input.js +2 -3
- package/esm/core/Input/index.d.ts +0 -1
- package/esm/core/InputGroup/InputGroup.d.ts +4 -4
- package/esm/core/InputGroup/InputGroup.js +6 -7
- package/esm/core/InputGroup/index.d.ts +0 -1
- package/esm/core/Label/Label.d.ts +3 -9
- package/esm/core/Label/Label.js +6 -7
- package/esm/core/Label/index.d.ts +0 -1
- package/esm/core/LabeledInput/LabeledInput.d.ts +2 -46
- package/esm/core/LabeledInput/LabeledInput.js +1 -2
- package/esm/core/LabeledInput/index.d.ts +0 -1
- package/esm/core/LabeledSelect/LabeledSelect.d.ts +1 -1
- package/esm/core/LabeledSelect/LabeledSelect.js +1 -2
- package/esm/core/LabeledSelect/index.d.ts +0 -1
- package/esm/core/LabeledTextarea/LabeledTextarea.d.ts +4 -26
- package/esm/core/LabeledTextarea/LabeledTextarea.js +1 -2
- package/esm/core/LabeledTextarea/index.d.ts +0 -1
- package/esm/core/List/List.d.ts +1 -5
- package/esm/core/List/List.js +3 -8
- package/esm/core/List/ListItem.d.ts +6 -13
- package/esm/core/List/ListItem.js +10 -16
- package/esm/core/List/index.d.ts +0 -2
- package/esm/core/Menu/Menu.d.ts +4 -27
- package/esm/core/Menu/Menu.js +3 -4
- package/esm/core/Menu/MenuDivider.d.ts +1 -4
- package/esm/core/Menu/MenuDivider.js +4 -8
- package/esm/core/Menu/MenuExtraContent.d.ts +1 -6
- package/esm/core/Menu/MenuExtraContent.js +4 -8
- package/esm/core/Menu/MenuItem.d.ts +14 -60
- package/esm/core/Menu/MenuItem.js +13 -21
- package/esm/core/Menu/MenuItemSkeleton.d.ts +4 -5
- package/esm/core/Menu/MenuItemSkeleton.js +9 -10
- package/esm/core/Menu/index.d.ts +0 -5
- package/esm/core/Modal/Modal.d.ts +5 -5
- package/esm/core/Modal/Modal.js +4 -5
- package/esm/core/Modal/ModalButtonBar.d.ts +1 -9
- package/esm/core/Modal/ModalButtonBar.js +1 -2
- package/esm/core/Modal/ModalContent.d.ts +1 -9
- package/esm/core/Modal/ModalContent.js +1 -2
- package/esm/core/Modal/index.d.ts +0 -3
- package/esm/core/NonIdealState/NonIdealState.d.ts +4 -3
- package/esm/core/NonIdealState/NonIdealState.js +8 -9
- package/esm/core/NonIdealState/index.d.ts +1 -2
- package/esm/core/NotificationMarker/NotificationMarker.d.ts +4 -3
- package/esm/core/NotificationMarker/NotificationMarker.js +2 -3
- package/esm/core/NotificationMarker/index.d.ts +0 -1
- package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.d.ts +4 -4
- package/esm/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +9 -10
- package/esm/core/ProgressIndicators/ProgressLinear/index.d.ts +0 -1
- package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.d.ts +4 -4
- package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +11 -12
- package/esm/core/ProgressIndicators/ProgressRadial/index.d.ts +0 -1
- package/esm/core/ProgressIndicators/index.d.ts +0 -2
- package/esm/core/Radio/Radio.d.ts +4 -17
- package/esm/core/Radio/Radio.js +4 -5
- package/esm/core/Radio/index.d.ts +0 -1
- package/esm/core/RadioTiles/RadioTile.d.ts +4 -21
- package/esm/core/RadioTiles/RadioTile.js +7 -11
- package/esm/core/RadioTiles/RadioTileGroup.d.ts +5 -4
- package/esm/core/RadioTiles/RadioTileGroup.js +5 -6
- package/esm/core/RadioTiles/index.d.ts +0 -2
- package/esm/core/SearchBox/SearchBox.d.ts +4 -16
- package/esm/core/SearchBox/SearchBox.js +2 -3
- package/esm/core/SearchBox/index.d.ts +0 -1
- package/esm/core/Select/Select.d.ts +6 -1
- package/esm/core/Select/Select.js +13 -13
- package/esm/core/Select/SelectTag.d.ts +4 -5
- package/esm/core/Select/SelectTag.js +5 -6
- package/esm/core/Select/SelectTagContainer.d.ts +4 -8
- package/esm/core/Select/SelectTagContainer.js +2 -3
- package/esm/core/Select/index.d.ts +1 -1
- package/esm/core/SideNavigation/SideNavigation.d.ts +4 -4
- package/esm/core/SideNavigation/SideNavigation.js +8 -9
- package/esm/core/SideNavigation/SidenavButton.d.ts +3 -4
- package/esm/core/SideNavigation/SidenavButton.js +1 -5
- package/esm/core/SideNavigation/SidenavSubmenu.d.ts +2 -14
- package/esm/core/SideNavigation/SidenavSubmenu.js +3 -4
- package/esm/core/SideNavigation/SidenavSubmenuHeader.d.ts +4 -8
- package/esm/core/SideNavigation/SidenavSubmenuHeader.js +6 -7
- package/esm/core/SideNavigation/index.d.ts +0 -4
- package/esm/core/SkipToContentLink/SkipToContentLink.d.ts +4 -13
- package/esm/core/SkipToContentLink/SkipToContentLink.js +2 -3
- package/esm/core/SkipToContentLink/index.d.ts +0 -1
- package/esm/core/Slider/Slider.d.ts +4 -99
- package/esm/core/Slider/Slider.js +7 -8
- package/esm/core/Slider/Thumb.d.ts +3 -2
- package/esm/core/Slider/Thumb.js +2 -1
- package/esm/core/Slider/index.d.ts +0 -1
- package/esm/core/StatusMessage/StatusMessage.d.ts +1 -1
- package/esm/core/StatusMessage/StatusMessage.js +4 -16
- package/esm/core/StatusMessage/index.d.ts +0 -1
- package/esm/core/Stepper/Stepper.d.ts +2 -2
- package/esm/core/Stepper/Stepper.js +4 -5
- package/esm/core/Stepper/StepperStep.d.ts +3 -4
- package/esm/core/Stepper/StepperStep.js +8 -7
- package/esm/core/Stepper/Wizard.js +3 -1
- package/esm/core/Stepper/WorkflowDiagram.d.ts +3 -3
- package/esm/core/Stepper/WorkflowDiagram.js +6 -5
- package/esm/core/Stepper/WorkflowDiagramStep.d.ts +2 -2
- package/esm/core/Stepper/WorkflowDiagramStep.js +3 -2
- package/esm/core/Stepper/index.d.ts +2 -3
- package/esm/core/Surface/Surface.d.ts +5 -17
- package/esm/core/Surface/Surface.js +8 -7
- package/esm/core/Surface/index.d.ts +0 -1
- package/esm/core/Table/Table.js +2 -2
- package/esm/core/Table/TablePaginator.js +2 -2
- package/esm/core/Table/columns/actionColumn.js +1 -1
- package/esm/core/Table/columns/expanderColumn.d.ts +1 -1
- package/esm/core/Table/columns/expanderColumn.js +1 -1
- package/esm/core/Table/filters/BaseFilter.js +2 -2
- package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.d.ts +3 -3
- package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.js +2 -2
- package/esm/core/Table/filters/FilterButtonBar.js +2 -2
- package/esm/core/Table/filters/FilterToggle.d.ts +2 -2
- package/esm/core/Table/filters/FilterToggle.js +2 -2
- package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +2 -2
- package/esm/core/Table/filters/TextFilter/TextFilter.js +2 -2
- package/esm/core/Tabs/Tab.d.ts +10 -3
- package/esm/core/Tabs/Tab.js +8 -13
- package/esm/core/Tabs/Tabs.d.ts +2 -2
- package/esm/core/Tabs/Tabs.js +7 -10
- package/esm/core/Tabs/index.d.ts +0 -2
- package/esm/core/Tag/Tag.d.ts +4 -4
- package/esm/core/Tag/Tag.js +6 -7
- package/esm/core/Tag/TagContainer.d.ts +4 -4
- package/esm/core/Tag/TagContainer.js +5 -6
- package/esm/core/Tag/index.d.ts +0 -2
- package/esm/core/Textarea/Textarea.d.ts +3 -9
- package/esm/core/Textarea/Textarea.js +2 -3
- package/esm/core/Textarea/index.d.ts +0 -1
- package/esm/core/ThemeProvider/ThemeContext.d.ts +7 -0
- package/esm/core/{Typography/Body/index.js → ThemeProvider/ThemeContext.js} +2 -2
- package/esm/core/ThemeProvider/ThemeProvider.d.ts +11 -12
- package/esm/core/ThemeProvider/ThemeProvider.js +4 -14
- package/esm/core/ThemeProvider/index.d.ts +1 -1
- package/esm/core/Tile/Tile.d.ts +6 -7
- package/esm/core/Tile/Tile.js +18 -19
- package/esm/core/Tile/index.d.ts +0 -1
- package/esm/core/TimePicker/TimePicker.d.ts +3 -3
- package/esm/core/TimePicker/TimePicker.js +6 -7
- package/esm/core/TimePicker/index.d.ts +1 -1
- package/esm/core/Toast/Toast.js +6 -6
- package/esm/core/Toast/ToastWrapper.js +2 -1
- package/esm/core/ToggleSwitch/ToggleSwitch.d.ts +4 -3
- package/esm/core/ToggleSwitch/ToggleSwitch.js +4 -10
- package/esm/core/ToggleSwitch/index.d.ts +0 -1
- package/esm/core/Tooltip/Tooltip.js +2 -3
- package/esm/core/Tooltip/index.d.ts +0 -1
- package/esm/core/Tree/Tree.d.ts +1 -1
- package/esm/core/Tree/Tree.js +5 -5
- package/esm/core/Tree/TreeNode.d.ts +1 -1
- package/esm/core/Tree/TreeNode.js +11 -16
- package/esm/core/Tree/TreeNodeExpander.d.ts +4 -4
- package/esm/core/Tree/TreeNodeExpander.js +3 -3
- package/esm/core/Tree/index.d.ts +1 -3
- package/esm/core/Typography/Anchor/Anchor.d.ts +1 -5
- package/esm/core/Typography/Anchor/Anchor.js +2 -8
- package/esm/core/Typography/Anchor/index.d.ts +0 -1
- package/esm/core/Typography/Blockquote/Blockquote.d.ts +4 -8
- package/esm/core/Typography/Blockquote/Blockquote.js +2 -3
- package/esm/core/Typography/Blockquote/index.d.ts +0 -1
- package/esm/core/Typography/Code/Code.d.ts +1 -9
- package/esm/core/Typography/Code/Code.js +2 -8
- package/esm/core/Typography/Code/index.d.ts +0 -1
- package/esm/core/Typography/Kbd/Kbd.d.ts +4 -5
- package/esm/core/Typography/Kbd/Kbd.js +4 -5
- package/esm/core/Typography/Kbd/index.d.ts +0 -1
- package/esm/core/Typography/Text/Text.d.ts +3 -6
- package/esm/core/Typography/Text/Text.js +3 -4
- package/esm/core/Typography/Text/index.d.ts +0 -1
- package/esm/core/Typography/index.d.ts +0 -17
- package/esm/core/Typography/index.js +0 -6
- package/esm/core/index.d.ts +10 -57
- package/esm/core/index.js +2 -2
- package/esm/core/utils/components/Box.d.ts +6 -0
- package/esm/core/{Typography/Leading/index.js → utils/components/Box.js} +7 -2
- package/esm/core/utils/components/Divider.d.ts +4 -4
- package/esm/core/utils/components/Divider.js +2 -3
- package/esm/core/utils/components/Flex.d.ts +1 -4
- package/esm/core/utils/components/Flex.js +10 -6
- package/esm/core/utils/components/Icon.d.ts +2 -24
- package/esm/core/utils/components/Icon.js +2 -1
- package/esm/core/utils/components/InputContainer.js +6 -10
- package/esm/core/utils/components/InputFlexContainer.d.ts +3 -5
- package/esm/core/utils/components/InputFlexContainer.js +3 -2
- package/esm/core/utils/components/LinkAction.d.ts +2 -8
- package/esm/core/utils/components/LinkAction.js +3 -10
- package/esm/core/utils/components/Popover.d.ts +1 -1
- package/esm/core/utils/components/Popover.js +1 -1
- package/esm/core/utils/components/VisuallyHidden.d.ts +1 -2
- package/esm/core/utils/components/VisuallyHidden.js +3 -4
- package/esm/core/utils/components/index.d.ts +1 -0
- package/esm/core/utils/components/index.js +1 -0
- package/esm/core/utils/functions/index.d.ts +1 -0
- package/esm/core/utils/functions/index.js +1 -0
- package/esm/core/utils/functions/polymorphic.d.ts +198 -0
- package/esm/core/utils/functions/polymorphic.js +52 -0
- package/esm/core/utils/hooks/index.d.ts +1 -1
- package/esm/core/utils/hooks/index.js +1 -1
- package/esm/core/utils/hooks/useGlobals.d.ts +10 -0
- package/esm/core/utils/hooks/useGlobals.js +51 -0
- package/esm/core/utils/hooks/useIsThemeAlreadySet.js +1 -1
- package/esm/core/utils/icons/Svg.d.ts +1 -0
- package/esm/core/{Typography/Headline/index.js → utils/icons/Svg.js} +2 -2
- package/esm/core/utils/icons/SvgCalendar.d.ts +1 -1
- package/esm/core/utils/icons/SvgCalendar.js +2 -1
- package/esm/core/utils/icons/SvgCaretDownSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgCaretDownSmall.js +2 -1
- package/esm/core/utils/icons/SvgCaretRightSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgCaretRightSmall.js +2 -1
- package/esm/core/utils/icons/SvgCaretUpSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgCaretUpSmall.js +2 -1
- package/esm/core/utils/icons/SvgCheckmark.d.ts +1 -1
- package/esm/core/utils/icons/SvgCheckmark.js +2 -1
- package/esm/core/utils/icons/SvgCheckmarkSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgCheckmarkSmall.js +2 -1
- package/esm/core/utils/icons/SvgChevronLeft.d.ts +1 -1
- package/esm/core/utils/icons/SvgChevronLeft.js +2 -1
- package/esm/core/utils/icons/SvgChevronLeftDouble.d.ts +1 -1
- package/esm/core/utils/icons/SvgChevronLeftDouble.js +2 -1
- package/esm/core/utils/icons/SvgChevronRight.d.ts +1 -1
- package/esm/core/utils/icons/SvgChevronRight.js +2 -1
- package/esm/core/utils/icons/SvgChevronRightDouble.d.ts +1 -1
- package/esm/core/utils/icons/SvgChevronRightDouble.js +2 -1
- package/esm/core/utils/icons/SvgClose.d.ts +1 -1
- package/esm/core/utils/icons/SvgClose.js +2 -1
- package/esm/core/utils/icons/SvgCloseSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgCloseSmall.js +2 -1
- package/esm/core/utils/icons/SvgColumnManager.d.ts +1 -1
- package/esm/core/utils/icons/SvgColumnManager.js +2 -1
- package/esm/core/utils/icons/SvgDocument.d.ts +1 -1
- package/esm/core/utils/icons/SvgDocument.js +2 -1
- package/esm/core/utils/icons/SvgFilter.d.ts +1 -1
- package/esm/core/utils/icons/SvgFilter.js +2 -1
- package/esm/core/utils/icons/SvgFilterHollow.d.ts +1 -1
- package/esm/core/utils/icons/SvgFilterHollow.js +2 -1
- package/esm/core/utils/icons/SvgImportantSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgImportantSmall.js +2 -1
- package/esm/core/utils/icons/SvgInfoCircular.d.ts +1 -1
- package/esm/core/utils/icons/SvgInfoCircular.js +2 -1
- package/esm/core/utils/icons/SvgMore.d.ts +1 -1
- package/esm/core/utils/icons/SvgMore.js +2 -1
- package/esm/core/utils/icons/SvgMoreVertical.d.ts +1 -1
- package/esm/core/utils/icons/SvgMoreVertical.js +2 -1
- package/esm/core/utils/icons/SvgNew.d.ts +1 -1
- package/esm/core/utils/icons/SvgNew.js +2 -1
- package/esm/core/utils/icons/SvgSearch.d.ts +1 -1
- package/esm/core/utils/icons/SvgSearch.js +2 -1
- package/esm/core/utils/icons/SvgSmileyHappy.d.ts +1 -1
- package/esm/core/utils/icons/SvgSmileyHappy.js +2 -1
- package/esm/core/utils/icons/SvgSortDown.d.ts +1 -1
- package/esm/core/utils/icons/SvgSortDown.js +2 -1
- package/esm/core/utils/icons/SvgSortUp.d.ts +1 -1
- package/esm/core/utils/icons/SvgSortUp.js +2 -1
- package/esm/core/utils/icons/SvgStatusError.d.ts +1 -1
- package/esm/core/utils/icons/SvgStatusError.js +2 -1
- package/esm/core/utils/icons/SvgStatusSuccess.d.ts +1 -1
- package/esm/core/utils/icons/SvgStatusSuccess.js +2 -1
- package/esm/core/utils/icons/SvgStatusWarning.d.ts +1 -1
- package/esm/core/utils/icons/SvgStatusWarning.js +2 -1
- package/esm/core/utils/icons/SvgSwap.d.ts +1 -1
- package/esm/core/utils/icons/SvgSwap.js +2 -1
- package/esm/core/utils/icons/SvgUpload.d.ts +1 -1
- package/esm/core/utils/icons/SvgUpload.js +2 -1
- package/esm/core/utils/props.d.ts +10 -33
- package/esm/types/react-table-config.d.ts +1 -1
- package/package.json +2 -2
- package/cjs/core/Typography/Body/Body.d.ts +0 -35
- package/cjs/core/Typography/Body/Body.js +0 -51
- package/cjs/core/Typography/Body/index.d.ts +0 -4
- package/cjs/core/Typography/Headline/Headline.d.ts +0 -22
- package/cjs/core/Typography/Headline/Headline.js +0 -48
- package/cjs/core/Typography/Headline/index.d.ts +0 -4
- package/cjs/core/Typography/Headline/index.js +0 -10
- package/cjs/core/Typography/Leading/Leading.d.ts +0 -22
- package/cjs/core/Typography/Leading/Leading.js +0 -48
- package/cjs/core/Typography/Leading/index.d.ts +0 -4
- package/cjs/core/Typography/Small/Small.d.ts +0 -22
- package/cjs/core/Typography/Small/index.d.ts +0 -4
- package/cjs/core/Typography/Small/index.js +0 -10
- package/cjs/core/Typography/Subheading/Subheading.d.ts +0 -22
- package/cjs/core/Typography/Subheading/Subheading.js +0 -48
- package/cjs/core/Typography/Subheading/index.d.ts +0 -4
- package/cjs/core/Typography/Subheading/index.js +0 -10
- package/cjs/core/Typography/Title/Title.d.ts +0 -22
- package/cjs/core/Typography/Title/Title.js +0 -48
- package/cjs/core/Typography/Title/index.d.ts +0 -4
- package/cjs/core/Typography/Title/index.js +0 -10
- package/cjs/core/utils/hooks/useTheme.d.ts +0 -39
- package/cjs/core/utils/hooks/useTheme.js +0 -127
- package/esm/core/Typography/Body/Body.d.ts +0 -35
- package/esm/core/Typography/Body/Body.js +0 -22
- package/esm/core/Typography/Body/index.d.ts +0 -4
- package/esm/core/Typography/Headline/Headline.d.ts +0 -22
- package/esm/core/Typography/Headline/Headline.js +0 -19
- package/esm/core/Typography/Headline/index.d.ts +0 -4
- package/esm/core/Typography/Leading/Leading.d.ts +0 -22
- package/esm/core/Typography/Leading/Leading.js +0 -19
- package/esm/core/Typography/Leading/index.d.ts +0 -4
- package/esm/core/Typography/Small/Small.d.ts +0 -22
- package/esm/core/Typography/Small/Small.js +0 -19
- package/esm/core/Typography/Small/index.d.ts +0 -4
- package/esm/core/Typography/Small/index.js +0 -6
- package/esm/core/Typography/Subheading/Subheading.d.ts +0 -22
- package/esm/core/Typography/Subheading/Subheading.js +0 -19
- package/esm/core/Typography/Subheading/index.d.ts +0 -4
- package/esm/core/Typography/Subheading/index.js +0 -6
- package/esm/core/Typography/Title/Title.d.ts +0 -22
- package/esm/core/Typography/Title/Title.js +0 -19
- package/esm/core/Typography/Title/index.d.ts +0 -4
- package/esm/core/Typography/Title/index.js +0 -6
- package/esm/core/utils/hooks/useTheme.d.ts +0 -39
- package/esm/core/utils/hooks/useTheme.js +0 -100
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
3
|
import '@itwin/itwinui-css/css/expandable-block.css';
|
|
4
|
-
|
|
4
|
+
declare type ExpandableBlockProps = {
|
|
5
5
|
/**
|
|
6
6
|
* The main text displayed on the block, regardless of state.
|
|
7
7
|
*/
|
|
@@ -44,7 +44,7 @@ export declare type ExpandableBlockProps = {
|
|
|
44
44
|
* @default 'default'
|
|
45
45
|
*/
|
|
46
46
|
styleType?: 'default' | 'borderless';
|
|
47
|
-
}
|
|
47
|
+
};
|
|
48
48
|
/**
|
|
49
49
|
* Container that allows content to be hidden behind a brief title and a caption.
|
|
50
50
|
* @example
|
|
@@ -54,5 +54,5 @@ export declare type ExpandableBlockProps = {
|
|
|
54
54
|
* <ExpandableBlock title='Positive status' status='positive'>Content</ExpandableBlock>
|
|
55
55
|
* <ExpandableBlock title='Block with icon' endIcon={<SvgPlaceholder />}>Content</ExpandableBlock>
|
|
56
56
|
*/
|
|
57
|
-
export declare const ExpandableBlock:
|
|
57
|
+
export declare const ExpandableBlock: PolymorphicForwardRefComponent<"div", ExpandableBlockProps>;
|
|
58
58
|
export default ExpandableBlock;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import cx from 'classnames';
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import {
|
|
7
|
+
import { StatusIconMap, WithCSSTransition, SvgChevronRight, Icon, Box, } from '../utils/index.js';
|
|
8
8
|
import '@itwin/itwinui-css/css/expandable-block.css';
|
|
9
9
|
/**
|
|
10
10
|
* Container that allows content to be hidden behind a brief title and a caption.
|
|
@@ -15,9 +15,8 @@ import '@itwin/itwinui-css/css/expandable-block.css';
|
|
|
15
15
|
* <ExpandableBlock title='Positive status' status='positive'>Content</ExpandableBlock>
|
|
16
16
|
* <ExpandableBlock title='Block with icon' endIcon={<SvgPlaceholder />}>Content</ExpandableBlock>
|
|
17
17
|
*/
|
|
18
|
-
export const ExpandableBlock = (props) => {
|
|
18
|
+
export const ExpandableBlock = React.forwardRef((props, ref) => {
|
|
19
19
|
const { caption, children, className, title, onToggle, style, isExpanded = false, endIcon, status, size = 'default', styleType = 'default', ...rest } = props;
|
|
20
|
-
useTheme();
|
|
21
20
|
const icon = endIcon !== null && endIcon !== void 0 ? endIcon : (status && StatusIconMap[status]());
|
|
22
21
|
const [expanded, setExpanded] = React.useState(isExpanded);
|
|
23
22
|
React.useEffect(() => {
|
|
@@ -37,20 +36,20 @@ export const ExpandableBlock = (props) => {
|
|
|
37
36
|
handleToggle();
|
|
38
37
|
}
|
|
39
38
|
};
|
|
40
|
-
return (React.createElement(
|
|
39
|
+
return (React.createElement(Box, { className: cx('iui-expandable-block', {
|
|
41
40
|
'iui-with-caption': !!caption,
|
|
42
41
|
'iui-expanded': expanded,
|
|
43
42
|
'iui-small': size === 'small',
|
|
44
43
|
'iui-borderless': styleType === 'borderless',
|
|
45
|
-
}, className), style: style, ...rest },
|
|
46
|
-
React.createElement(
|
|
44
|
+
}, className), style: style, ref: ref, ...rest },
|
|
45
|
+
React.createElement(Box, { "aria-expanded": expanded, className: 'iui-header', tabIndex: 0, onClick: handleToggle, onKeyDown: onKeyDown },
|
|
47
46
|
React.createElement(SvgChevronRight, { className: 'iui-icon', "aria-hidden": true }),
|
|
48
|
-
React.createElement(
|
|
49
|
-
React.createElement(
|
|
50
|
-
caption && React.createElement(
|
|
47
|
+
React.createElement(Box, { as: 'span', className: 'iui-expandable-block-label' },
|
|
48
|
+
React.createElement(Box, { className: 'iui-title' }, title),
|
|
49
|
+
caption && React.createElement(Box, { className: 'iui-caption' }, caption)),
|
|
51
50
|
icon && React.createElement(Icon, { fill: status }, icon)),
|
|
52
51
|
React.createElement(WithCSSTransition, { in: expanded },
|
|
53
|
-
React.createElement(
|
|
52
|
+
React.createElement(Box, { className: 'iui-expandable-content' },
|
|
54
53
|
React.createElement("div", null, children)))));
|
|
55
|
-
};
|
|
54
|
+
});
|
|
56
55
|
export default ExpandableBlock;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
2
3
|
import '@itwin/itwinui-css/css/fieldset.css';
|
|
3
|
-
|
|
4
|
+
declare type FieldsetProps = {
|
|
4
5
|
/**
|
|
5
6
|
* The caption or title for the fieldset.
|
|
6
7
|
*/
|
|
7
8
|
legend?: React.ReactNode;
|
|
8
|
-
}
|
|
9
|
+
};
|
|
9
10
|
/**
|
|
10
11
|
* Fieldset component to group several inputs, controls and labels within a form.
|
|
11
12
|
* @example
|
|
@@ -17,5 +18,5 @@ export declare type FieldsetProps = {
|
|
|
17
18
|
* </InputGroup>
|
|
18
19
|
* </Fieldset>
|
|
19
20
|
*/
|
|
20
|
-
export declare const Fieldset:
|
|
21
|
+
export declare const Fieldset: PolymorphicForwardRefComponent<"fieldset", FieldsetProps>;
|
|
21
22
|
export default Fieldset;
|
|
@@ -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 {
|
|
6
|
+
import { Box } from '../utils/index.js';
|
|
7
7
|
import cx from 'classnames';
|
|
8
8
|
import '@itwin/itwinui-css/css/fieldset.css';
|
|
9
9
|
/**
|
|
@@ -17,15 +17,14 @@ import '@itwin/itwinui-css/css/fieldset.css';
|
|
|
17
17
|
* </InputGroup>
|
|
18
18
|
* </Fieldset>
|
|
19
19
|
*/
|
|
20
|
-
export const Fieldset = (props) => {
|
|
20
|
+
export const Fieldset = React.forwardRef((props, ref) => {
|
|
21
21
|
const { children, className, disabled, legend, ...rest } = props;
|
|
22
|
-
|
|
23
|
-
return (React.createElement("fieldset", { className: cx('iui-fieldset', className), disabled: disabled, ...rest },
|
|
22
|
+
return (React.createElement(Box, { as: 'fieldset', className: cx('iui-fieldset', className), disabled: disabled, ref: ref, ...rest },
|
|
24
23
|
legend && React.createElement("legend", null, legend),
|
|
25
24
|
disabled
|
|
26
25
|
? React.Children.map(children, (child) => React.isValidElement(child)
|
|
27
26
|
? React.cloneElement(child, { disabled: true })
|
|
28
27
|
: child)
|
|
29
28
|
: children));
|
|
30
|
-
};
|
|
29
|
+
});
|
|
31
30
|
export default Fieldset;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare type FileEmptyCardIconProps = React.ComponentPropsWithRef<'span'>;
|
|
3
|
-
export declare type FileEmptyCardTextProps = React.ComponentPropsWithRef<'span'>;
|
|
4
|
-
export declare type FileEmptyCardProps = React.ComponentPropsWithoutRef<'div'>;
|
|
1
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
5
2
|
/**
|
|
6
3
|
* Empty file card to be used with the `FileUploadCard` component when no file has been uploaded.
|
|
7
4
|
* @example
|
|
@@ -18,12 +15,8 @@ export declare type FileEmptyCardProps = React.ComponentPropsWithoutRef<'div'>;
|
|
|
18
15
|
* </FileEmptyCard.Text>
|
|
19
16
|
* </FileEmptyCard>
|
|
20
17
|
*/
|
|
21
|
-
export declare const FileEmptyCard:
|
|
22
|
-
Icon:
|
|
23
|
-
|
|
24
|
-
}, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & React.RefAttributes<HTMLSpanElement>>;
|
|
25
|
-
Text: React.ForwardRefExoticComponent<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
26
|
-
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
27
|
-
}, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & React.RefAttributes<HTMLSpanElement>>;
|
|
18
|
+
export declare const FileEmptyCard: PolymorphicForwardRefComponent<"div", {}> & {
|
|
19
|
+
Icon: PolymorphicForwardRefComponent<"span", {}>;
|
|
20
|
+
Text: PolymorphicForwardRefComponent<"span", {}>;
|
|
28
21
|
};
|
|
29
22
|
export default FileEmptyCard;
|
|
@@ -3,16 +3,26 @@
|
|
|
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 { SvgUpload } from '../utils/index.js';
|
|
6
|
+
import { Box, polymorphic, SvgUpload } from '../utils/index.js';
|
|
7
7
|
import cx from 'classnames';
|
|
8
8
|
import FileUploadCard from './FileUploadCard.js';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
// ----------------------------------------------------------------------------
|
|
10
|
+
// FileEmptyCard.Icon component
|
|
11
|
+
const FileEmptyCardIcon = polymorphic.span('iui-file-card-empty-icon', {
|
|
12
|
+
children: React.createElement(SvgUpload, null),
|
|
12
13
|
});
|
|
13
|
-
|
|
14
|
+
// ----------------------------------------------------------------------------
|
|
15
|
+
// FileEmptyCard.Text component
|
|
16
|
+
const FileEmptyCardText = polymorphic.span('iui-file-card-empty-action');
|
|
17
|
+
// ----------------------------------------------------------------------------
|
|
18
|
+
// FileEmptyCard component
|
|
19
|
+
const FileEmptyCardComponent = React.forwardRef((props, ref) => {
|
|
14
20
|
const { children, className, ...rest } = props;
|
|
15
|
-
return (React.createElement(
|
|
21
|
+
return (React.createElement(Box, { className: cx('iui-file-card-empty', className), ref: ref, ...rest }, children !== null && children !== void 0 ? children : (React.createElement(React.Fragment, null,
|
|
22
|
+
React.createElement(FileEmptyCard.Icon, null),
|
|
23
|
+
React.createElement(FileEmptyCard.Text, null,
|
|
24
|
+
React.createElement(FileUploadCard.InputLabel, null, "Choose a file"),
|
|
25
|
+
React.createElement("div", null, "to upload."))))));
|
|
16
26
|
});
|
|
17
27
|
/**
|
|
18
28
|
* Empty file card to be used with the `FileUploadCard` component when no file has been uploaded.
|
|
@@ -30,14 +40,7 @@ const FileEmptyCardText = React.forwardRef((props, ref) => {
|
|
|
30
40
|
* </FileEmptyCard.Text>
|
|
31
41
|
* </FileEmptyCard>
|
|
32
42
|
*/
|
|
33
|
-
export const FileEmptyCard = Object.assign(
|
|
34
|
-
const { children, className, ...rest } = props;
|
|
35
|
-
return (React.createElement("div", { className: cx('iui-file-card-empty', className), ref: ref, ...rest }, children !== null && children !== void 0 ? children : (React.createElement(React.Fragment, null,
|
|
36
|
-
React.createElement(FileEmptyCard.Icon, null),
|
|
37
|
-
React.createElement(FileEmptyCard.Text, null,
|
|
38
|
-
React.createElement(FileUploadCard.InputLabel, null, "Choose a file"),
|
|
39
|
-
React.createElement("div", null, "to upload."))))));
|
|
40
|
-
}), {
|
|
43
|
+
export const FileEmptyCard = Object.assign(FileEmptyCardComponent, {
|
|
41
44
|
Icon: FileEmptyCardIcon,
|
|
42
45
|
Text: FileEmptyCardText,
|
|
43
46
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
3
3
|
import '@itwin/itwinui-css/css/file-upload.css';
|
|
4
|
-
|
|
4
|
+
declare type FileUploadProps = {
|
|
5
5
|
/**
|
|
6
6
|
* Content shown over `children` when file is being dragged onto the component.
|
|
7
7
|
* Should always be used when drag content differs from `children` being wrapped.
|
|
@@ -17,7 +17,7 @@ export declare type FileUploadProps = {
|
|
|
17
17
|
* Either pass `FileUploadTemplate` (for default state) or a different component to wrap.
|
|
18
18
|
*/
|
|
19
19
|
children: React.ReactNode;
|
|
20
|
-
}
|
|
20
|
+
};
|
|
21
21
|
/**
|
|
22
22
|
* File upload component to be wrapped around `FileUploadTemplate` or any arbitrary component.
|
|
23
23
|
* Provides support for dragging and dropping multiple files.
|
|
@@ -25,26 +25,5 @@ export declare type FileUploadProps = {
|
|
|
25
25
|
* <FileUpload onFileDropped={console.log}><FileUploadTemplate /></FileUpload>
|
|
26
26
|
* <FileUpload dragContent='Drop file here' onFileDropped={console.log}><Textarea /></FileUpload>
|
|
27
27
|
*/
|
|
28
|
-
export declare const FileUpload:
|
|
29
|
-
/**
|
|
30
|
-
* Content shown over `children` when file is being dragged onto the component.
|
|
31
|
-
* Should always be used when drag content differs from `children` being wrapped.
|
|
32
|
-
* Can be skipped if wrapping `FileUploadTemplate`.
|
|
33
|
-
*/
|
|
34
|
-
dragContent?: React.ReactNode;
|
|
35
|
-
/**
|
|
36
|
-
* Callback fired when files are dropped onto the component.
|
|
37
|
-
*/
|
|
38
|
-
onFileDropped: (files: FileList) => void;
|
|
39
|
-
/**
|
|
40
|
-
* Component to wrap `FileUpload` around.
|
|
41
|
-
* Either pass `FileUploadTemplate` (for default state) or a different component to wrap.
|
|
42
|
-
*/
|
|
43
|
-
children: React.ReactNode;
|
|
44
|
-
} & {
|
|
45
|
-
title?: string | undefined;
|
|
46
|
-
id?: string | undefined;
|
|
47
|
-
} & {
|
|
48
|
-
style?: React.CSSProperties | undefined;
|
|
49
|
-
} & import("../utils/props.js").ClassNameProps & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
export declare const FileUpload: PolymorphicForwardRefComponent<"div", FileUploadProps>;
|
|
50
29
|
export default FileUpload;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import cx from 'classnames';
|
|
7
|
-
import {
|
|
7
|
+
import { Box, useMergedRefs } from '../utils/index.js';
|
|
8
8
|
import '@itwin/itwinui-css/css/file-upload.css';
|
|
9
9
|
/**
|
|
10
10
|
* File upload component to be wrapped around `FileUploadTemplate` or any arbitrary component.
|
|
@@ -15,7 +15,6 @@ import '@itwin/itwinui-css/css/file-upload.css';
|
|
|
15
15
|
*/
|
|
16
16
|
export const FileUpload = React.forwardRef((props, ref) => {
|
|
17
17
|
const { dragContent, children, onFileDropped, className, ...rest } = props;
|
|
18
|
-
useTheme();
|
|
19
18
|
const [isDragActive, setIsDragActive] = React.useState(false);
|
|
20
19
|
const fileUploadRef = React.useRef(null);
|
|
21
20
|
const refs = useMergedRefs(fileUploadRef, ref);
|
|
@@ -51,8 +50,8 @@ export const FileUpload = React.forwardRef((props, ref) => {
|
|
|
51
50
|
onFileDropped((_a = e.dataTransfer) === null || _a === void 0 ? void 0 : _a.files);
|
|
52
51
|
}
|
|
53
52
|
};
|
|
54
|
-
return (React.createElement(
|
|
55
|
-
dragContent ? children : React.createElement(
|
|
56
|
-
dragContent && React.createElement(
|
|
53
|
+
return (React.createElement(Box, { className: cx('iui-file-upload', { 'iui-drag': isDragActive }, className), onDragEnter: onDragEnterHandler, onDragOver: onDragOverHandler, onDragLeave: onDragLeaveHandler, onDrop: onDropHandler, ref: refs, ...rest },
|
|
54
|
+
dragContent ? children : React.createElement(Box, { className: 'iui-content' }, children),
|
|
55
|
+
dragContent && React.createElement(Box, { className: 'iui-content' }, dragContent)));
|
|
57
56
|
});
|
|
58
57
|
export default FileUpload;
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
2
3
|
import '@itwin/itwinui-css/css/file-upload.css';
|
|
3
|
-
|
|
4
|
-
export declare type FileUploadCardInfoProps = React.ComponentPropsWithRef<'span'>;
|
|
5
|
-
export declare type FileUploadCardTitleProps = React.ComponentPropsWithRef<'span'>;
|
|
6
|
-
export declare type FileUploadCardDescriptionProps = React.ComponentPropsWithRef<'span'>;
|
|
7
|
-
export declare type FileUploadCardActionProps = React.ComponentPropsWithRef<'div'>;
|
|
8
|
-
export declare type FileUploadCardInputLabelProps = React.ComponentPropsWithRef<'label'>;
|
|
9
|
-
export declare type FileUploadCardInputProps = React.ComponentPropsWithRef<'input'>;
|
|
10
|
-
export declare type FileUploadCardProps = {
|
|
4
|
+
declare type FileUploadCardProps = {
|
|
11
5
|
/**
|
|
12
6
|
* Files to pass (only needed when passing a custom action)
|
|
13
7
|
*/
|
|
@@ -27,7 +21,7 @@ export declare type FileUploadCardProps = {
|
|
|
27
21
|
* @default <FileUploadCard.Input />
|
|
28
22
|
*/
|
|
29
23
|
input?: React.ReactNode;
|
|
30
|
-
}
|
|
24
|
+
};
|
|
31
25
|
/**
|
|
32
26
|
* Default card to be used with the `FileUpload` wrapper component for single-file uploading.
|
|
33
27
|
* @example
|
|
@@ -52,48 +46,14 @@ export declare type FileUploadCardProps = {
|
|
|
52
46
|
* </FileUploadCard.Action>
|
|
53
47
|
* </FileUploadCard>
|
|
54
48
|
*/
|
|
55
|
-
export declare const FileUploadCard:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
onFilesChange?: ((files: File[]) => void) | undefined;
|
|
64
|
-
/**
|
|
65
|
-
* Node that is shown when there is no file uploaded
|
|
66
|
-
* Either pass `FileEmptyCard` (for default state) or a different component to show
|
|
67
|
-
* @default <FileEmptyCard />
|
|
68
|
-
*/
|
|
69
|
-
emptyCard?: React.ReactNode;
|
|
70
|
-
/**
|
|
71
|
-
* Input node
|
|
72
|
-
* @default <FileUploadCard.Input />
|
|
73
|
-
*/
|
|
74
|
-
input?: React.ReactNode;
|
|
75
|
-
} & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>> & {
|
|
76
|
-
Icon: React.ForwardRefExoticComponent<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
77
|
-
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
78
|
-
}, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & React.RefAttributes<HTMLSpanElement>>;
|
|
79
|
-
Info: React.ForwardRefExoticComponent<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
80
|
-
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
81
|
-
}, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & React.RefAttributes<HTMLSpanElement>>;
|
|
82
|
-
Title: React.ForwardRefExoticComponent<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
83
|
-
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
84
|
-
}, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & React.RefAttributes<HTMLSpanElement>>;
|
|
85
|
-
Description: React.ForwardRefExoticComponent<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & {
|
|
86
|
-
ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
87
|
-
}, "key" | keyof React.HTMLAttributes<HTMLSpanElement>> & React.RefAttributes<HTMLSpanElement>>;
|
|
88
|
-
Action: React.ForwardRefExoticComponent<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
89
|
-
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
90
|
-
}, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>>;
|
|
91
|
-
InputLabel: React.ForwardRefExoticComponent<Pick<Pick<React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "key" | keyof React.LabelHTMLAttributes<HTMLLabelElement>> & {
|
|
92
|
-
ref?: ((instance: HTMLLabelElement | null) => void) | React.RefObject<HTMLLabelElement> | null | undefined;
|
|
93
|
-
}, "key" | keyof React.LabelHTMLAttributes<HTMLLabelElement>> & React.RefAttributes<HTMLLabelElement>>;
|
|
94
|
-
Input: React.ForwardRefExoticComponent<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
|
|
95
|
-
ref?: ((instance: HTMLInputElement | null) => void) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
96
|
-
}, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & React.RefAttributes<HTMLInputElement>>;
|
|
49
|
+
export declare const FileUploadCard: PolymorphicForwardRefComponent<"div", FileUploadCardProps> & {
|
|
50
|
+
Icon: PolymorphicForwardRefComponent<"span", {}>;
|
|
51
|
+
Info: PolymorphicForwardRefComponent<"span", {}>;
|
|
52
|
+
Title: PolymorphicForwardRefComponent<"span", {}>;
|
|
53
|
+
Description: PolymorphicForwardRefComponent<"span", {}>;
|
|
54
|
+
Action: PolymorphicForwardRefComponent<"div", {}>;
|
|
55
|
+
InputLabel: PolymorphicForwardRefComponent<"label", {}>;
|
|
56
|
+
Input: PolymorphicForwardRefComponent<"input", {}>;
|
|
97
57
|
};
|
|
98
58
|
export default FileUploadCard;
|
|
99
59
|
export declare const FileUploadCardContext: React.Context<{
|
|
@@ -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 { getWindow, SvgDocument, useMergedRefs, useSafeContext, useId, mergeEventHandlers, VisuallyHidden, } from '../utils/index.js';
|
|
6
|
+
import { getWindow, SvgDocument, useMergedRefs, useSafeContext, useId, mergeEventHandlers, polymorphic, Box, VisuallyHidden, } from '../utils/index.js';
|
|
7
7
|
import cx from 'classnames';
|
|
8
8
|
import { FileEmptyCard } from './FileEmptyCard.js';
|
|
9
9
|
import { Anchor } from '../Typography/Anchor/Anchor.js';
|
|
@@ -20,23 +20,27 @@ const toDate = (dateNumber) => {
|
|
|
20
20
|
const date = new Date(dateNumber);
|
|
21
21
|
return date.toDateString() + ' ' + date.toLocaleTimeString();
|
|
22
22
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
// ----------------------------------------------------------------------------
|
|
24
|
+
// FileUploadCard.Icon component
|
|
25
|
+
const FileUploadCardIcon = polymorphic.span('iui-file-card-icon', {
|
|
26
|
+
children: React.createElement(SvgDocument, null),
|
|
26
27
|
});
|
|
27
28
|
FileUploadCardIcon.displayName = 'FileUploadCard.Icon';
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
});
|
|
29
|
+
// ----------------------------------------------------------------------------
|
|
30
|
+
// FileUploadCard.Info component
|
|
31
|
+
const FileUploadCardInfo = polymorphic.span('iui-file-card-text');
|
|
32
32
|
FileUploadCardInfo.displayName = 'FileUploadCard.Info';
|
|
33
|
+
// ----------------------------------------------------------------------------
|
|
34
|
+
// FileUploadCard.Title component
|
|
33
35
|
const FileUploadCardTitle = React.forwardRef((props, ref) => {
|
|
34
36
|
const { children, className, ...rest } = props;
|
|
35
37
|
const { files } = useSafeContext(FileUploadCardContext);
|
|
36
38
|
const title = files.length > 1 ? files.length + ' files selected' : files[0].name;
|
|
37
|
-
return (React.createElement(
|
|
39
|
+
return (React.createElement(Box, { as: 'span', className: cx('iui-file-card-title', className), ref: ref, ...rest }, children !== null && children !== void 0 ? children : title));
|
|
38
40
|
});
|
|
39
41
|
FileUploadCardTitle.displayName = 'FileUploadCard.Title';
|
|
42
|
+
// ----------------------------------------------------------------------------
|
|
43
|
+
// FileUploadCard.Description component
|
|
40
44
|
const FileUploadCardDescription = React.forwardRef((props, ref) => {
|
|
41
45
|
const { children, className, ...rest } = props;
|
|
42
46
|
const { files } = useSafeContext(FileUploadCardContext);
|
|
@@ -46,20 +50,23 @@ const FileUploadCardDescription = React.forwardRef((props, ref) => {
|
|
|
46
50
|
if (files.length > 2) {
|
|
47
51
|
description += ', and ' + (files.length - 2) + ' others';
|
|
48
52
|
}
|
|
49
|
-
return (React.createElement(
|
|
53
|
+
return (React.createElement(Box, { as: 'span', className: cx('iui-file-card-description', className), ref: ref, ...rest }, children !== null && children !== void 0 ? children : description));
|
|
50
54
|
});
|
|
51
55
|
FileUploadCardDescription.displayName = 'FileUploadCard.Description';
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
});
|
|
56
|
+
// ----------------------------------------------------------------------------
|
|
57
|
+
// FileUploadCard.Action component
|
|
58
|
+
const FileUploadCardAction = polymorphic.div('iui-file-card-action');
|
|
56
59
|
FileUploadCardAction.displayName = 'FileUploadCard.Action';
|
|
60
|
+
// ----------------------------------------------------------------------------
|
|
61
|
+
// FileUploadCard.InputLabel component
|
|
57
62
|
const FileUploadCardInputLabel = React.forwardRef((props, ref) => {
|
|
58
63
|
const { children, ...rest } = props;
|
|
59
64
|
const { inputId } = useSafeContext(FileUploadCardContext);
|
|
60
65
|
return (React.createElement(Anchor, { as: 'label', ref: ref, htmlFor: inputId, ...rest }, children));
|
|
61
66
|
});
|
|
62
67
|
FileUploadCardInputLabel.displayName = 'FileUploadCard.InputLabel';
|
|
68
|
+
// ----------------------------------------------------------------------------
|
|
69
|
+
// FileUploadCard.Input component
|
|
63
70
|
const FileUploadCardInput = React.forwardRef((props, ref) => {
|
|
64
71
|
const { children, onChange, id, ...rest } = props;
|
|
65
72
|
const { files, onFilesChange, setInternalFiles, inputId, setInputId } = useSafeContext(FileUploadCardContext);
|
|
@@ -88,6 +95,28 @@ const FileUploadCardInput = React.forwardRef((props, ref) => {
|
|
|
88
95
|
children));
|
|
89
96
|
});
|
|
90
97
|
FileUploadCardInput.displayName = 'FileUploadCard.Input';
|
|
98
|
+
const FileUploadCardComponent = React.forwardRef((props, ref) => {
|
|
99
|
+
var _a;
|
|
100
|
+
const { className, children, files: filesProp, onFilesChange, emptyCard = React.createElement(FileEmptyCard, null), input, ...rest } = props;
|
|
101
|
+
const [internalFiles, setInternalFiles] = React.useState();
|
|
102
|
+
const uid = useId();
|
|
103
|
+
const [inputId, setInputId] = React.useState(uid);
|
|
104
|
+
const files = (_a = filesProp !== null && filesProp !== void 0 ? filesProp : internalFiles) !== null && _a !== void 0 ? _a : [];
|
|
105
|
+
return (React.createElement(FileUploadCardContext.Provider, { value: {
|
|
106
|
+
files,
|
|
107
|
+
onFilesChange,
|
|
108
|
+
setInternalFiles,
|
|
109
|
+
inputId,
|
|
110
|
+
setInputId,
|
|
111
|
+
} },
|
|
112
|
+
(files === null || files === void 0 ? void 0 : files.length) ? (React.createElement(Box, { className: cx('iui-file-card', className), ref: ref, ...rest }, children !== null && children !== void 0 ? children : (React.createElement(React.Fragment, null,
|
|
113
|
+
React.createElement(FileUploadCard.Icon, null),
|
|
114
|
+
React.createElement(FileUploadCard.Info, null,
|
|
115
|
+
React.createElement(FileUploadCard.Title, null),
|
|
116
|
+
React.createElement(FileUploadCard.Description, null)),
|
|
117
|
+
React.createElement(FileUploadCard.Action, null,
|
|
118
|
+
React.createElement(FileUploadCard.InputLabel, null, "Replace")))))) : (emptyCard), input !== null && input !== void 0 ? input : React.createElement(FileUploadCard.Input, null)));
|
|
119
|
+
});
|
|
91
120
|
/**
|
|
92
121
|
* Default card to be used with the `FileUpload` wrapper component for single-file uploading.
|
|
93
122
|
* @example
|
|
@@ -112,28 +141,7 @@ FileUploadCardInput.displayName = 'FileUploadCard.Input';
|
|
|
112
141
|
* </FileUploadCard.Action>
|
|
113
142
|
* </FileUploadCard>
|
|
114
143
|
*/
|
|
115
|
-
export const FileUploadCard = Object.assign(
|
|
116
|
-
var _a;
|
|
117
|
-
const { className, children, files: filesProp, onFilesChange, emptyCard = React.createElement(FileEmptyCard, null), input, ...rest } = props;
|
|
118
|
-
const [internalFiles, setInternalFiles] = React.useState();
|
|
119
|
-
const uid = useId();
|
|
120
|
-
const [inputId, setInputId] = React.useState(uid);
|
|
121
|
-
const files = (_a = filesProp !== null && filesProp !== void 0 ? filesProp : internalFiles) !== null && _a !== void 0 ? _a : [];
|
|
122
|
-
return (React.createElement(FileUploadCardContext.Provider, { value: {
|
|
123
|
-
files,
|
|
124
|
-
onFilesChange,
|
|
125
|
-
setInternalFiles,
|
|
126
|
-
inputId,
|
|
127
|
-
setInputId,
|
|
128
|
-
} },
|
|
129
|
-
(files === null || files === void 0 ? void 0 : files.length) ? (React.createElement("div", { className: cx('iui-file-card', className), ref: ref, ...rest }, children !== null && children !== void 0 ? children : (React.createElement(React.Fragment, null,
|
|
130
|
-
React.createElement(FileUploadCard.Icon, null),
|
|
131
|
-
React.createElement(FileUploadCard.Info, null,
|
|
132
|
-
React.createElement(FileUploadCard.Title, null),
|
|
133
|
-
React.createElement(FileUploadCard.Description, null)),
|
|
134
|
-
React.createElement(FileUploadCard.Action, null,
|
|
135
|
-
React.createElement(FileUploadCard.InputLabel, null, "Replace")))))) : (emptyCard), input !== null && input !== void 0 ? input : React.createElement(FileUploadCard.Input, null)));
|
|
136
|
-
}), {
|
|
144
|
+
export const FileUploadCard = Object.assign(FileUploadCardComponent, {
|
|
137
145
|
Icon: FileUploadCardIcon,
|
|
138
146
|
Info: FileUploadCardInfo,
|
|
139
147
|
Title: FileUploadCardTitle,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import type { PolymorphicForwardRefComponent } from '../utils/index.js';
|
|
2
3
|
import '@itwin/itwinui-css/css/file-upload.css';
|
|
3
|
-
|
|
4
|
+
declare type FileUploadTemplateProps = {
|
|
4
5
|
/**
|
|
5
6
|
* Callback fired when a file is selected from the device.
|
|
6
7
|
*/
|
|
@@ -30,12 +31,12 @@ export declare type FileUploadTemplateProps = {
|
|
|
30
31
|
* Optional children appended to the template.
|
|
31
32
|
*/
|
|
32
33
|
children?: React.ReactNode;
|
|
33
|
-
}
|
|
34
|
+
};
|
|
34
35
|
/**
|
|
35
36
|
* Default template to be used with the `FileUpload` wrapper component.
|
|
36
37
|
* Contains a hidden input with styled labels (customizable).
|
|
37
38
|
* @example
|
|
38
39
|
* <FileUploadTemplate onChange={(e) => console.log(e.target.files)} />
|
|
39
40
|
*/
|
|
40
|
-
export declare const FileUploadTemplate:
|
|
41
|
+
export declare const FileUploadTemplate: PolymorphicForwardRefComponent<"div", FileUploadTemplateProps>;
|
|
41
42
|
export default FileUploadTemplate;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import cx from 'classnames';
|
|
7
|
-
import {
|
|
7
|
+
import { SvgUpload, Box } from '../utils/index.js';
|
|
8
8
|
import '@itwin/itwinui-css/css/file-upload.css';
|
|
9
9
|
import { Anchor } from '../Typography/Anchor/Anchor.js';
|
|
10
10
|
/**
|
|
@@ -13,16 +13,15 @@ import { Anchor } from '../Typography/Anchor/Anchor.js';
|
|
|
13
13
|
* @example
|
|
14
14
|
* <FileUploadTemplate onChange={(e) => console.log(e.target.files)} />
|
|
15
15
|
*/
|
|
16
|
-
export const FileUploadTemplate = (props) => {
|
|
16
|
+
export const FileUploadTemplate = React.forwardRef((props, ref) => {
|
|
17
17
|
const { onChange, acceptMultiple = true, acceptType, label = 'Choose a file', subtitle = 'or drag & drop it here.', children, className, ...rest } = props;
|
|
18
|
-
|
|
19
|
-
return (React.createElement("div", { className: cx('iui-file-upload-template', className), ...rest },
|
|
18
|
+
return (React.createElement(Box, { className: cx('iui-file-upload-template', className), ref: ref, ...rest },
|
|
20
19
|
React.createElement(SvgUpload, { className: 'iui-template-icon', "aria-hidden": true }),
|
|
21
|
-
React.createElement(
|
|
20
|
+
React.createElement(Box, { className: 'iui-template-text' },
|
|
22
21
|
React.createElement(Anchor, { as: 'label' },
|
|
23
|
-
React.createElement(
|
|
22
|
+
React.createElement(Box, { as: 'input', className: 'iui-browse-input', type: 'file', onChange: onChange, multiple: acceptMultiple, accept: acceptType }),
|
|
24
23
|
label),
|
|
25
24
|
React.createElement("div", null, subtitle),
|
|
26
25
|
children)));
|
|
27
|
-
};
|
|
26
|
+
});
|
|
28
27
|
export default FileUploadTemplate;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
export { FileUpload } from './FileUpload.js';
|
|
2
|
-
export type { FileUploadProps } from './FileUpload.js';
|
|
3
2
|
declare const _default: "./FileUpload";
|
|
4
3
|
export default _default;
|
|
5
4
|
export { FileUploadTemplate } from './FileUploadTemplate.js';
|
|
6
|
-
export type { FileUploadTemplateProps } from './FileUploadTemplate.js';
|
|
7
5
|
export { FileUploadCard } from './FileUploadCard.js';
|
|
8
|
-
export type { FileUploadCardProps, FileUploadCardIconProps, FileUploadCardInfoProps, FileUploadCardTitleProps, FileUploadCardDescriptionProps, FileUploadCardActionProps, FileUploadCardInputLabelProps, FileUploadCardInputProps, } from './FileUploadCard.js';
|
|
9
6
|
export { FileEmptyCard } from './FileEmptyCard.js';
|
|
10
|
-
export type { FileEmptyCardProps, FileEmptyCardIconProps, FileEmptyCardTextProps, } from './FileEmptyCard.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { CommonProps } from '../utils/index.js';
|
|
3
3
|
import '@itwin/itwinui-css/css/footer.css';
|
|
4
4
|
export declare type TitleTranslations = {
|
|
5
5
|
termsOfService: string;
|
|
@@ -8,7 +8,7 @@ export declare type TitleTranslations = {
|
|
|
8
8
|
cookies: string;
|
|
9
9
|
legalNotices: string;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
declare type FooterProps = {
|
|
12
12
|
/**
|
|
13
13
|
* Customize footer elements.
|
|
14
14
|
* Providing a `FooterElement[]` will append the custom elements to the end of the default elements.
|
|
@@ -24,7 +24,7 @@ export declare type FooterProps = {
|
|
|
24
24
|
* Use `defaultFooterElements` to get the default footer elements.
|
|
25
25
|
*/
|
|
26
26
|
children?: React.ReactNode;
|
|
27
|
-
} &
|
|
27
|
+
} & CommonProps;
|
|
28
28
|
export declare type FooterElement = {
|
|
29
29
|
/**
|
|
30
30
|
* Title of the footer element.
|
|
@@ -54,12 +54,8 @@ export declare const defaultFooterElements: FooterElement[];
|
|
|
54
54
|
* <Footer customElements={(defaultElements) => defaultElements.map(element => ({ ...element, url: element.key === 'privacy' ? customPrivacyUrl : element.url }))} />
|
|
55
55
|
*/
|
|
56
56
|
export declare const Footer: ((props: FooterProps) => JSX.Element) & {
|
|
57
|
-
List: (props
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
Item: (props: Pick<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "key" | keyof React.LiHTMLAttributes<HTMLLIElement>> & {
|
|
61
|
-
ref?: ((instance: HTMLLIElement | null) => void) | React.RefObject<HTMLLIElement> | null | undefined;
|
|
62
|
-
}) => JSX.Element;
|
|
63
|
-
Separator: (props: import("./FooterSeparator.js").FooterSeparatorProps) => JSX.Element;
|
|
57
|
+
List: import("../utils/props.js").PolymorphicForwardRefComponent<"ul", {}>;
|
|
58
|
+
Item: import("../utils/props.js").PolymorphicForwardRefComponent<"li", {}>;
|
|
59
|
+
Separator: import("../utils/props.js").PolymorphicForwardRefComponent<"li", {}>;
|
|
64
60
|
};
|
|
65
61
|
export default Footer;
|