@itwin/itwinui-react 3.12.0 → 3.12.2
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 +15 -0
- package/cjs/core/Alert/Alert.js +76 -64
- package/cjs/core/Avatar/Avatar.js +24 -22
- package/cjs/core/AvatarGroup/AvatarGroup.js +37 -35
- package/cjs/core/Backdrop/Backdrop.js +1 -2
- package/cjs/core/Badge/Badge.js +12 -10
- package/cjs/core/Breadcrumbs/Breadcrumbs.js +95 -87
- package/cjs/core/ButtonGroup/ButtonGroup.js +75 -65
- package/cjs/core/Buttons/Button.js +43 -34
- package/cjs/core/Buttons/DropdownButton.js +30 -25
- package/cjs/core/Buttons/IconButton.js +32 -28
- package/cjs/core/Buttons/IdeasButton.js +14 -12
- package/cjs/core/Buttons/SplitButton.js +39 -30
- package/cjs/core/Carousel/Carousel.js +25 -20
- package/cjs/core/Carousel/CarouselDot.js +1 -2
- package/cjs/core/Carousel/CarouselDotsList.js +30 -29
- package/cjs/core/Carousel/CarouselNavigation.js +64 -51
- package/cjs/core/Carousel/CarouselSlide.js +21 -16
- package/cjs/core/Carousel/CarouselSlider.js +11 -9
- package/cjs/core/Checkbox/Checkbox.js +48 -45
- package/cjs/core/ColorPicker/ColorBuilder.js +63 -60
- package/cjs/core/ColorPicker/ColorInputPanel.js +226 -235
- package/cjs/core/ColorPicker/ColorPalette.js +37 -33
- package/cjs/core/ColorPicker/ColorPicker.js +16 -14
- package/cjs/core/ColorPicker/ColorSwatch.js +25 -22
- package/cjs/core/ComboBox/ComboBox.js +89 -77
- package/cjs/core/ComboBox/{ComboBox.test-types.js → ComboBox.types-test.js} +8 -7
- package/cjs/core/ComboBox/ComboBoxEndIcon.js +18 -17
- package/cjs/core/ComboBox/ComboBoxInput.js +46 -47
- package/cjs/core/ComboBox/ComboBoxInputContainer.js +24 -21
- package/cjs/core/ComboBox/ComboBoxMenu.js +43 -34
- package/cjs/core/ComboBox/ComboBoxMenuItem.js +41 -38
- package/cjs/core/ComboBox/ComboBoxMultipleContainer.js +1 -2
- package/cjs/core/DatePicker/DatePicker.js +199 -186
- package/cjs/core/Dialog/Dialog.js +36 -28
- package/cjs/core/Dialog/DialogBackdrop.js +1 -2
- package/cjs/core/Dialog/DialogMain.js +75 -77
- package/cjs/core/Dialog/DialogTitleBar.js +31 -24
- package/cjs/core/Divider/Divider.js +1 -2
- package/cjs/core/DropdownMenu/DropdownMenu.js +33 -27
- package/cjs/core/ExpandableBlock/ExpandableBlock.js +122 -111
- package/cjs/core/Fieldset/Fieldset.js +20 -23
- package/cjs/core/FileUpload/FileEmptyCard.js +25 -24
- package/cjs/core/FileUpload/FileUpload.js +42 -36
- package/cjs/core/FileUpload/FileUploadCard.js +92 -74
- package/cjs/core/FileUpload/FileUploadTemplate.js +37 -34
- package/cjs/core/Flex/Flex.js +3 -4
- package/cjs/core/Footer/Footer.d.ts +1 -1
- package/cjs/core/Footer/Footer.js +33 -29
- package/cjs/core/Header/Header.js +50 -39
- package/cjs/core/Header/HeaderBasicButton.js +14 -10
- package/cjs/core/Header/HeaderBreadcrumbs.js +30 -28
- package/cjs/core/Header/HeaderButton.js +48 -36
- package/cjs/core/Header/HeaderDropdownButton.js +31 -26
- package/cjs/core/Header/HeaderLogo.js +26 -20
- package/cjs/core/Header/HeaderSplitButton.js +35 -26
- package/cjs/core/Icon/Icon.js +1 -2
- package/cjs/core/InformationPanel/InformationPanel.js +28 -25
- package/cjs/core/InformationPanel/InformationPanelContent.js +15 -13
- package/cjs/core/InformationPanel/InformationPanelHeader.js +32 -25
- package/cjs/core/Input/Input.js +1 -2
- package/cjs/core/InputGrid/InputGrid.js +10 -8
- package/cjs/core/InputGroup/InputGroup.js +42 -33
- package/cjs/core/InputWithDecorations/InputWithDecorations.js +29 -21
- package/cjs/core/Label/Label.js +18 -16
- package/cjs/core/LabeledInput/LabeledInput.js +45 -37
- package/cjs/core/LabeledSelect/LabeledSelect.js +33 -27
- package/cjs/core/LabeledSelect/LabeledSelect.types-test.js +20 -13
- package/cjs/core/LabeledTextarea/LabeledTextarea.js +1 -2
- package/cjs/core/LinkAction/LinkAction.js +1 -2
- package/cjs/core/List/ListItem.js +1 -2
- package/cjs/core/Menu/Menu.js +47 -33
- package/cjs/core/Menu/MenuItem.js +67 -58
- package/cjs/core/Menu/MenuItemSkeleton.js +36 -33
- package/cjs/core/Modal/Modal.js +26 -27
- package/cjs/core/NonIdealState/ErrorPage.js +39 -28
- package/cjs/core/NonIdealState/NonIdealState.js +35 -23
- package/cjs/core/NotificationMarker/NotificationMarker.js +17 -15
- package/cjs/core/Overlay/Overlay.js +18 -19
- package/cjs/core/Popover/Popover.js +63 -47
- package/cjs/core/ProgressIndicators/ProgressLinear.js +37 -36
- package/cjs/core/ProgressIndicators/ProgressRadial.js +36 -38
- package/cjs/core/Radio/Radio.js +24 -21
- package/cjs/core/RadioTiles/RadioTile.js +41 -32
- package/cjs/core/RadioTiles/RadioTileGroup.js +15 -10
- package/cjs/core/SearchBox/SearchBox.d.ts +2 -2
- package/cjs/core/SearchBox/SearchBox.js +104 -88
- package/cjs/core/Select/Select.js +216 -204
- package/cjs/core/Select/Select.types-test.js +32 -25
- package/cjs/core/Select/SelectTag.js +16 -11
- package/cjs/core/Select/SelectTagContainer.js +20 -15
- package/cjs/core/SideNavigation/SideNavigation.js +77 -60
- package/cjs/core/SideNavigation/SidenavButton.js +27 -22
- package/cjs/core/SideNavigation/SidenavSubmenu.js +17 -12
- package/cjs/core/SideNavigation/SidenavSubmenuHeader.js +24 -18
- package/cjs/core/SkipToContentLink/SkipToContentLink.js +13 -8
- package/cjs/core/Slider/Slider.js +71 -64
- package/cjs/core/Slider/Thumb.d.ts +1 -1
- package/cjs/core/Slider/Thumb.js +11 -9
- package/cjs/core/Slider/Track.d.ts +1 -1
- package/cjs/core/Slider/Track.js +26 -26
- package/cjs/core/StatusMessage/StatusMessage.js +18 -18
- package/cjs/core/Stepper/Stepper.js +50 -50
- package/cjs/core/Stepper/StepperStep.js +50 -38
- package/cjs/core/Stepper/WorkflowDiagram.js +23 -21
- package/cjs/core/Stepper/WorkflowDiagramStep.d.ts +1 -1
- package/cjs/core/Stepper/WorkflowDiagramStep.js +29 -18
- package/cjs/core/Surface/Surface.js +37 -26
- package/cjs/core/Table/SubRowExpander.d.ts +1 -1
- package/cjs/core/Table/SubRowExpander.js +25 -21
- package/cjs/core/Table/Table.js +301 -280
- package/cjs/core/Table/TableCell.d.ts +1 -1
- package/cjs/core/Table/TableCell.js +39 -38
- package/cjs/core/Table/TablePaginator.d.ts +2 -1
- package/cjs/core/Table/TablePaginator.js +166 -133
- package/cjs/core/Table/TableRowMemoized.d.ts +1 -1
- package/cjs/core/Table/TableRowMemoized.js +32 -27
- package/cjs/core/Table/cells/DefaultCell.d.ts +1 -1
- package/cjs/core/Table/cells/DefaultCell.js +47 -39
- package/cjs/core/Table/cells/EditableCell.d.ts +1 -1
- package/cjs/core/Table/cells/EditableCell.js +1 -1
- package/cjs/core/Table/columns/actionColumn.d.ts +1 -1
- package/cjs/core/Table/columns/actionColumn.js +29 -21
- package/cjs/core/Table/columns/expanderColumn.d.ts +2 -2
- package/cjs/core/Table/columns/expanderColumn.js +15 -13
- package/cjs/core/Table/columns/selectionColumn.d.ts +4 -3
- package/cjs/core/Table/columns/selectionColumn.js +5 -4
- package/cjs/core/Table/filters/BaseFilter.d.ts +1 -1
- package/cjs/core/Table/filters/BaseFilter.js +11 -9
- package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.js +52 -50
- package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.d.ts +1 -1
- package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +36 -37
- package/cjs/core/Table/filters/FilterButtonBar.d.ts +1 -1
- package/cjs/core/Table/filters/FilterButtonBar.js +21 -15
- package/cjs/core/Table/filters/FilterToggle.d.ts +2 -1
- package/cjs/core/Table/filters/FilterToggle.js +39 -33
- package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.d.ts +2 -1
- package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +26 -28
- package/cjs/core/Table/filters/TextFilter/TextFilter.d.ts +2 -1
- package/cjs/core/Table/filters/TextFilter/TextFilter.js +15 -16
- package/cjs/core/Table/filters/tableFilters.d.ts +3 -3
- package/cjs/core/Table/filters/tableFilters.js +3 -4
- package/cjs/core/Table/hooks/useExpanderCell.js +5 -4
- package/cjs/core/Tabs/Tabs.js +178 -160
- package/cjs/core/Tag/Tag.js +36 -30
- package/cjs/core/Tag/TagContainer.js +16 -14
- package/cjs/core/Textarea/Textarea.js +1 -2
- package/cjs/core/ThemeProvider/ThemeProvider.js +67 -51
- package/cjs/core/Tile/Tile.js +165 -150
- package/cjs/core/TimePicker/TimePicker.js +84 -87
- package/cjs/core/Toast/Toast.d.ts +1 -1
- package/cjs/core/Toast/Toast.js +89 -65
- package/cjs/core/Toast/Toaster.d.ts +2 -2
- package/cjs/core/Toast/Toaster.js +27 -22
- package/cjs/core/ToggleSwitch/ToggleSwitch.js +40 -34
- package/cjs/core/Tooltip/Tooltip.js +21 -16
- package/cjs/core/TransferList/TransferList.js +65 -48
- package/cjs/core/Tree/Tree.d.ts +2 -1
- package/cjs/core/Tree/Tree.js +41 -31
- package/cjs/core/Tree/TreeNode.js +122 -107
- package/cjs/core/Tree/TreeNodeExpander.js +11 -9
- package/cjs/core/Typography/Anchor.js +23 -21
- package/cjs/core/Typography/Blockquote.js +11 -14
- package/cjs/core/Typography/Kbd.js +10 -8
- package/cjs/core/Typography/Text.js +7 -5
- package/cjs/core/VisuallyHidden/VisuallyHidden.js +22 -17
- package/cjs/react-table/react-table.types-test.js +173 -148
- package/cjs/styles.js +1 -1
- package/cjs/utils/components/AutoclearingHiddenLiveRegion.d.ts +2 -1
- package/cjs/utils/components/AutoclearingHiddenLiveRegion.js +9 -7
- package/cjs/utils/components/ButtonBase.js +1 -2
- package/cjs/utils/components/FocusTrap.d.ts +2 -1
- package/cjs/utils/components/FocusTrap.js +17 -18
- package/cjs/utils/components/InputContainer.js +30 -24
- package/cjs/utils/components/InputFlexContainer.js +18 -13
- package/cjs/utils/components/LineClamp.js +17 -14
- package/cjs/utils/components/MiddleTextTruncation.d.ts +1 -1
- package/cjs/utils/components/MiddleTextTruncation.js +14 -12
- package/cjs/utils/components/Resizer.d.ts +1 -1
- package/cjs/utils/components/Resizer.js +73 -77
- package/cjs/utils/components/ShadowRoot.d.ts +1 -1
- package/cjs/utils/components/ShadowRoot.js +18 -22
- package/cjs/utils/components/VirtualScroll.js +8 -9
- package/cjs/utils/components/WithCSSTransition.d.ts +1 -1
- package/cjs/utils/components/WithCSSTransition.js +34 -32
- package/cjs/utils/functions/polymorphic.js +1 -2
- package/cjs/utils/icons/StatusIconMap.d.ts +5 -5
- package/cjs/utils/icons/StatusIconMap.js +6 -5
- package/cjs/utils/icons/SvgCalendar.d.ts +1 -1
- package/cjs/utils/icons/SvgCalendar.js +5 -5
- package/cjs/utils/icons/SvgCaretDownSmall.d.ts +1 -1
- package/cjs/utils/icons/SvgCaretDownSmall.js +5 -5
- package/cjs/utils/icons/SvgCaretRightSmall.d.ts +1 -1
- package/cjs/utils/icons/SvgCaretRightSmall.js +5 -5
- package/cjs/utils/icons/SvgCaretUpSmall.d.ts +1 -1
- package/cjs/utils/icons/SvgCaretUpSmall.js +5 -5
- package/cjs/utils/icons/SvgCheckmark.d.ts +1 -1
- package/cjs/utils/icons/SvgCheckmark.js +5 -5
- package/cjs/utils/icons/SvgCheckmarkSmall.d.ts +1 -1
- package/cjs/utils/icons/SvgCheckmarkSmall.js +5 -5
- package/cjs/utils/icons/SvgChevronLeft.d.ts +1 -1
- package/cjs/utils/icons/SvgChevronLeft.js +5 -5
- package/cjs/utils/icons/SvgChevronLeftDouble.d.ts +1 -1
- package/cjs/utils/icons/SvgChevronLeftDouble.js +5 -5
- package/cjs/utils/icons/SvgChevronRight.d.ts +1 -1
- package/cjs/utils/icons/SvgChevronRight.js +5 -5
- package/cjs/utils/icons/SvgChevronRightDouble.d.ts +1 -1
- package/cjs/utils/icons/SvgChevronRightDouble.js +5 -5
- package/cjs/utils/icons/SvgChevronRightSmall.d.ts +1 -1
- package/cjs/utils/icons/SvgChevronRightSmall.js +5 -5
- package/cjs/utils/icons/SvgClose.d.ts +1 -1
- package/cjs/utils/icons/SvgClose.js +5 -5
- package/cjs/utils/icons/SvgCloseSmall.d.ts +1 -1
- package/cjs/utils/icons/SvgCloseSmall.js +5 -5
- package/cjs/utils/icons/SvgColumnManager.d.ts +1 -1
- package/cjs/utils/icons/SvgColumnManager.js +5 -5
- package/cjs/utils/icons/SvgDocument.d.ts +1 -1
- package/cjs/utils/icons/SvgDocument.js +5 -5
- package/cjs/utils/icons/SvgFilter.d.ts +1 -1
- package/cjs/utils/icons/SvgFilter.js +5 -5
- package/cjs/utils/icons/SvgFilterHollow.d.ts +1 -1
- package/cjs/utils/icons/SvgFilterHollow.js +5 -5
- package/cjs/utils/icons/SvgImportantSmall.d.ts +1 -1
- package/cjs/utils/icons/SvgImportantSmall.js +5 -5
- package/cjs/utils/icons/SvgInfoCircular.d.ts +1 -1
- package/cjs/utils/icons/SvgInfoCircular.js +5 -5
- package/cjs/utils/icons/SvgMore.d.ts +1 -1
- package/cjs/utils/icons/SvgMore.js +5 -5
- package/cjs/utils/icons/SvgMoreVertical.d.ts +1 -1
- package/cjs/utils/icons/SvgMoreVertical.js +5 -5
- package/cjs/utils/icons/SvgNew.d.ts +1 -1
- package/cjs/utils/icons/SvgNew.js +5 -5
- package/cjs/utils/icons/SvgSearch.d.ts +1 -1
- package/cjs/utils/icons/SvgSearch.js +5 -5
- package/cjs/utils/icons/SvgSmileyHappy.d.ts +1 -1
- package/cjs/utils/icons/SvgSmileyHappy.js +5 -5
- package/cjs/utils/icons/SvgSortDown.d.ts +1 -1
- package/cjs/utils/icons/SvgSortDown.js +5 -5
- package/cjs/utils/icons/SvgSortUp.d.ts +1 -1
- package/cjs/utils/icons/SvgSortUp.js +5 -5
- package/cjs/utils/icons/SvgStatusError.d.ts +1 -1
- package/cjs/utils/icons/SvgStatusError.js +5 -5
- package/cjs/utils/icons/SvgStatusSuccess.d.ts +1 -1
- package/cjs/utils/icons/SvgStatusSuccess.js +5 -5
- package/cjs/utils/icons/SvgStatusWarning.d.ts +1 -1
- package/cjs/utils/icons/SvgStatusWarning.js +5 -5
- package/cjs/utils/icons/SvgSwap.d.ts +1 -1
- package/cjs/utils/icons/SvgSwap.js +5 -5
- package/cjs/utils/icons/SvgUpload.d.ts +1 -1
- package/cjs/utils/icons/SvgUpload.js +5 -5
- package/cjs/utils/meta.js +2 -2
- package/cjs/utils/providers/HydrationProvider.d.ts +1 -1
- package/cjs/utils/providers/HydrationProvider.js +12 -12
- package/cjs/utils/providers/ScopeProvider.d.ts +1 -1
- package/cjs/utils/providers/ScopeProvider.js +13 -11
- package/esm/core/Alert/Alert.js +72 -60
- package/esm/core/Avatar/Avatar.js +20 -22
- package/esm/core/AvatarGroup/AvatarGroup.js +37 -39
- package/esm/core/Backdrop/Backdrop.js +1 -2
- package/esm/core/Badge/Badge.js +12 -10
- package/esm/core/Breadcrumbs/Breadcrumbs.js +95 -91
- package/esm/core/ButtonGroup/ButtonGroup.js +75 -69
- package/esm/core/Buttons/Button.js +43 -34
- package/esm/core/Buttons/DropdownButton.js +30 -25
- package/esm/core/Buttons/IconButton.js +30 -28
- package/esm/core/Buttons/IdeasButton.js +14 -12
- package/esm/core/Buttons/SplitButton.js +39 -28
- package/esm/core/Carousel/Carousel.js +25 -20
- package/esm/core/Carousel/CarouselDot.js +1 -2
- package/esm/core/Carousel/CarouselDotsList.js +27 -26
- package/esm/core/Carousel/CarouselNavigation.js +64 -55
- package/esm/core/Carousel/CarouselSlide.js +18 -16
- package/esm/core/Carousel/CarouselSlider.js +11 -9
- package/esm/core/Checkbox/Checkbox.js +48 -49
- package/esm/core/ColorPicker/ColorBuilder.js +60 -57
- package/esm/core/ColorPicker/ColorInputPanel.js +226 -239
- package/esm/core/ColorPicker/ColorPalette.js +34 -33
- package/esm/core/ColorPicker/ColorPicker.js +25 -20
- package/esm/core/ColorPicker/ColorSwatch.js +21 -22
- package/esm/core/ComboBox/ComboBox.js +89 -81
- package/esm/core/ComboBox/{ComboBox.test-types.js → ComboBox.types-test.js} +8 -7
- package/esm/core/ComboBox/ComboBoxEndIcon.js +18 -17
- package/esm/core/ComboBox/ComboBoxInput.js +40 -45
- package/esm/core/ComboBox/ComboBoxInputContainer.js +24 -21
- package/esm/core/ComboBox/ComboBoxMenu.js +43 -34
- package/esm/core/ComboBox/ComboBoxMenuItem.js +40 -37
- package/esm/core/ComboBox/ComboBoxMultipleContainer.js +1 -2
- package/esm/core/DatePicker/DatePicker.js +184 -171
- package/esm/core/Dialog/Dialog.js +36 -28
- package/esm/core/Dialog/DialogBackdrop.js +1 -2
- package/esm/core/Dialog/DialogMain.js +81 -80
- package/esm/core/Dialog/DialogTitleBar.js +24 -25
- package/esm/core/Divider/Divider.js +1 -2
- package/esm/core/DropdownMenu/DropdownMenu.js +33 -27
- package/esm/core/ExpandableBlock/ExpandableBlock.js +115 -111
- package/esm/core/Fieldset/Fieldset.js +20 -23
- package/esm/core/FileUpload/FileEmptyCard.js +21 -28
- package/esm/core/FileUpload/FileUpload.js +33 -27
- package/esm/core/FileUpload/FileUploadCard.js +85 -78
- package/esm/core/FileUpload/FileUploadTemplate.js +34 -34
- package/esm/core/Flex/Flex.js +3 -4
- package/esm/core/Footer/Footer.d.ts +1 -1
- package/esm/core/Footer/Footer.js +32 -25
- package/esm/core/Header/Header.js +50 -39
- package/esm/core/Header/HeaderBasicButton.js +11 -7
- package/esm/core/Header/HeaderBreadcrumbs.js +25 -23
- package/esm/core/Header/HeaderButton.js +42 -36
- package/esm/core/Header/HeaderDropdownButton.js +28 -23
- package/esm/core/Header/HeaderLogo.js +26 -20
- package/esm/core/Header/HeaderSplitButton.js +32 -23
- package/esm/core/Icon/Icon.js +1 -2
- package/esm/core/InformationPanel/InformationPanel.js +28 -25
- package/esm/core/InformationPanel/InformationPanelContent.js +15 -13
- package/esm/core/InformationPanel/InformationPanelHeader.js +32 -25
- package/esm/core/Input/Input.js +1 -2
- package/esm/core/InputGrid/InputGrid.js +10 -8
- package/esm/core/InputGroup/InputGroup.js +42 -33
- package/esm/core/InputWithDecorations/InputWithDecorations.js +29 -21
- package/esm/core/Label/Label.js +18 -16
- package/esm/core/LabeledInput/LabeledInput.js +42 -34
- package/esm/core/LabeledSelect/LabeledSelect.js +33 -27
- package/esm/core/LabeledSelect/LabeledSelect.types-test.js +20 -13
- package/esm/core/LabeledTextarea/LabeledTextarea.js +1 -2
- package/esm/core/LinkAction/LinkAction.js +1 -2
- package/esm/core/List/ListItem.js +1 -2
- package/esm/core/Menu/Menu.js +47 -37
- package/esm/core/Menu/MenuItem.js +66 -62
- package/esm/core/Menu/MenuItemSkeleton.js +32 -33
- package/esm/core/Modal/Modal.js +26 -27
- package/esm/core/NonIdealState/ErrorPage.js +39 -32
- package/esm/core/NonIdealState/NonIdealState.js +35 -23
- package/esm/core/NotificationMarker/NotificationMarker.js +17 -15
- package/esm/core/Overlay/Overlay.js +18 -19
- package/esm/core/Popover/Popover.js +63 -51
- package/esm/core/ProgressIndicators/ProgressLinear.js +33 -33
- package/esm/core/ProgressIndicators/ProgressRadial.js +28 -31
- package/esm/core/Radio/Radio.js +24 -21
- package/esm/core/RadioTiles/RadioTile.js +38 -29
- package/esm/core/RadioTiles/RadioTileGroup.js +15 -10
- package/esm/core/SearchBox/SearchBox.d.ts +2 -2
- package/esm/core/SearchBox/SearchBox.js +104 -90
- package/esm/core/Select/Select.js +213 -202
- package/esm/core/Select/Select.types-test.js +32 -29
- package/esm/core/Select/SelectTag.js +16 -11
- package/esm/core/Select/SelectTagContainer.js +17 -19
- package/esm/core/SideNavigation/SideNavigation.js +67 -50
- package/esm/core/SideNavigation/SidenavButton.js +27 -22
- package/esm/core/SideNavigation/SidenavSubmenu.js +15 -10
- package/esm/core/SideNavigation/SidenavSubmenuHeader.js +21 -15
- package/esm/core/SkipToContentLink/SkipToContentLink.js +10 -8
- package/esm/core/Slider/Slider.js +67 -61
- package/esm/core/Slider/Thumb.d.ts +1 -1
- package/esm/core/Slider/Thumb.js +11 -9
- package/esm/core/Slider/Track.d.ts +1 -1
- package/esm/core/Slider/Track.js +23 -23
- package/esm/core/StatusMessage/StatusMessage.js +18 -18
- package/esm/core/Stepper/Stepper.js +50 -50
- package/esm/core/Stepper/StepperStep.js +50 -38
- package/esm/core/Stepper/WorkflowDiagram.js +23 -21
- package/esm/core/Stepper/WorkflowDiagramStep.d.ts +1 -1
- package/esm/core/Stepper/WorkflowDiagramStep.js +25 -17
- package/esm/core/Surface/Surface.js +37 -26
- package/esm/core/Table/SubRowExpander.d.ts +1 -1
- package/esm/core/Table/SubRowExpander.js +25 -21
- package/esm/core/Table/Table.js +297 -278
- package/esm/core/Table/TableCell.d.ts +1 -1
- package/esm/core/Table/TableCell.js +39 -42
- package/esm/core/Table/TablePaginator.d.ts +2 -1
- package/esm/core/Table/TablePaginator.js +166 -137
- package/esm/core/Table/TableRowMemoized.d.ts +1 -1
- package/esm/core/Table/TableRowMemoized.js +32 -31
- package/esm/core/Table/cells/DefaultCell.d.ts +1 -1
- package/esm/core/Table/cells/DefaultCell.js +47 -39
- package/esm/core/Table/cells/EditableCell.d.ts +1 -1
- package/esm/core/Table/cells/EditableCell.js +1 -2
- package/esm/core/Table/columns/actionColumn.d.ts +1 -1
- package/esm/core/Table/columns/actionColumn.js +29 -21
- package/esm/core/Table/columns/expanderColumn.d.ts +2 -2
- package/esm/core/Table/columns/expanderColumn.js +15 -13
- package/esm/core/Table/columns/selectionColumn.d.ts +4 -3
- package/esm/core/Table/columns/selectionColumn.js +4 -4
- package/esm/core/Table/filters/BaseFilter.d.ts +1 -1
- package/esm/core/Table/filters/BaseFilter.js +11 -9
- package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.js +52 -44
- package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.d.ts +1 -1
- package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.js +36 -37
- package/esm/core/Table/filters/FilterButtonBar.d.ts +1 -1
- package/esm/core/Table/filters/FilterButtonBar.js +21 -15
- package/esm/core/Table/filters/FilterToggle.d.ts +2 -1
- package/esm/core/Table/filters/FilterToggle.js +36 -30
- package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.d.ts +2 -1
- package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +26 -28
- package/esm/core/Table/filters/TextFilter/TextFilter.d.ts +2 -1
- package/esm/core/Table/filters/TextFilter/TextFilter.js +15 -16
- package/esm/core/Table/filters/tableFilters.d.ts +3 -3
- package/esm/core/Table/filters/tableFilters.js +3 -4
- package/esm/core/Table/hooks/useExpanderCell.js +5 -4
- package/esm/core/Tabs/Tabs.js +170 -156
- package/esm/core/Tag/Tag.js +32 -26
- package/esm/core/Tag/TagContainer.js +16 -14
- package/esm/core/Textarea/Textarea.js +1 -2
- package/esm/core/ThemeProvider/ThemeProvider.js +66 -55
- package/esm/core/Tile/Tile.js +159 -150
- package/esm/core/TimePicker/TimePicker.js +84 -91
- package/esm/core/Toast/Toast.d.ts +1 -1
- package/esm/core/Toast/Toast.js +86 -65
- package/esm/core/Toast/Toaster.d.ts +2 -2
- package/esm/core/Toast/Toaster.js +24 -19
- package/esm/core/ToggleSwitch/ToggleSwitch.js +40 -34
- package/esm/core/Tooltip/Tooltip.js +21 -20
- package/esm/core/TransferList/TransferList.js +59 -45
- package/esm/core/Tree/Tree.d.ts +2 -1
- package/esm/core/Tree/Tree.js +41 -31
- package/esm/core/Tree/TreeNode.js +111 -102
- package/esm/core/Tree/TreeNodeExpander.js +11 -9
- package/esm/core/Typography/Anchor.js +19 -21
- package/esm/core/Typography/Blockquote.js +11 -14
- package/esm/core/Typography/Kbd.js +10 -8
- package/esm/core/Typography/Text.js +7 -5
- package/esm/core/VisuallyHidden/VisuallyHidden.js +22 -21
- package/esm/react-table/react-table.types-test.js +169 -152
- package/esm/styles.js +1 -1
- package/esm/utils/components/AutoclearingHiddenLiveRegion.d.ts +2 -1
- package/esm/utils/components/AutoclearingHiddenLiveRegion.js +9 -7
- package/esm/utils/components/ButtonBase.js +1 -2
- package/esm/utils/components/FocusTrap.d.ts +2 -1
- package/esm/utils/components/FocusTrap.js +17 -22
- package/esm/utils/components/InputContainer.js +30 -24
- package/esm/utils/components/InputFlexContainer.js +15 -13
- package/esm/utils/components/LineClamp.js +17 -14
- package/esm/utils/components/MiddleTextTruncation.d.ts +1 -1
- package/esm/utils/components/MiddleTextTruncation.js +14 -12
- package/esm/utils/components/Resizer.d.ts +1 -1
- package/esm/utils/components/Resizer.js +73 -81
- package/esm/utils/components/ShadowRoot.d.ts +1 -1
- package/esm/utils/components/ShadowRoot.js +18 -26
- package/esm/utils/components/VirtualScroll.js +8 -9
- package/esm/utils/components/WithCSSTransition.d.ts +1 -1
- package/esm/utils/components/WithCSSTransition.js +34 -32
- package/esm/utils/functions/polymorphic.js +1 -2
- package/esm/utils/icons/StatusIconMap.d.ts +5 -5
- package/esm/utils/icons/StatusIconMap.js +5 -5
- package/esm/utils/icons/SvgCalendar.d.ts +1 -1
- package/esm/utils/icons/SvgCalendar.js +5 -5
- package/esm/utils/icons/SvgCaretDownSmall.d.ts +1 -1
- package/esm/utils/icons/SvgCaretDownSmall.js +5 -5
- package/esm/utils/icons/SvgCaretRightSmall.d.ts +1 -1
- package/esm/utils/icons/SvgCaretRightSmall.js +5 -5
- package/esm/utils/icons/SvgCaretUpSmall.d.ts +1 -1
- package/esm/utils/icons/SvgCaretUpSmall.js +5 -5
- package/esm/utils/icons/SvgCheckmark.d.ts +1 -1
- package/esm/utils/icons/SvgCheckmark.js +5 -5
- package/esm/utils/icons/SvgCheckmarkSmall.d.ts +1 -1
- package/esm/utils/icons/SvgCheckmarkSmall.js +5 -5
- package/esm/utils/icons/SvgChevronLeft.d.ts +1 -1
- package/esm/utils/icons/SvgChevronLeft.js +5 -5
- package/esm/utils/icons/SvgChevronLeftDouble.d.ts +1 -1
- package/esm/utils/icons/SvgChevronLeftDouble.js +5 -5
- package/esm/utils/icons/SvgChevronRight.d.ts +1 -1
- package/esm/utils/icons/SvgChevronRight.js +5 -5
- package/esm/utils/icons/SvgChevronRightDouble.d.ts +1 -1
- package/esm/utils/icons/SvgChevronRightDouble.js +5 -5
- package/esm/utils/icons/SvgChevronRightSmall.d.ts +1 -1
- package/esm/utils/icons/SvgChevronRightSmall.js +5 -5
- package/esm/utils/icons/SvgClose.d.ts +1 -1
- package/esm/utils/icons/SvgClose.js +5 -5
- package/esm/utils/icons/SvgCloseSmall.d.ts +1 -1
- package/esm/utils/icons/SvgCloseSmall.js +5 -5
- package/esm/utils/icons/SvgColumnManager.d.ts +1 -1
- package/esm/utils/icons/SvgColumnManager.js +5 -5
- package/esm/utils/icons/SvgDocument.d.ts +1 -1
- package/esm/utils/icons/SvgDocument.js +5 -5
- package/esm/utils/icons/SvgFilter.d.ts +1 -1
- package/esm/utils/icons/SvgFilter.js +5 -5
- package/esm/utils/icons/SvgFilterHollow.d.ts +1 -1
- package/esm/utils/icons/SvgFilterHollow.js +5 -5
- package/esm/utils/icons/SvgImportantSmall.d.ts +1 -1
- package/esm/utils/icons/SvgImportantSmall.js +5 -5
- package/esm/utils/icons/SvgInfoCircular.d.ts +1 -1
- package/esm/utils/icons/SvgInfoCircular.js +5 -5
- package/esm/utils/icons/SvgMore.d.ts +1 -1
- package/esm/utils/icons/SvgMore.js +5 -5
- package/esm/utils/icons/SvgMoreVertical.d.ts +1 -1
- package/esm/utils/icons/SvgMoreVertical.js +5 -5
- package/esm/utils/icons/SvgNew.d.ts +1 -1
- package/esm/utils/icons/SvgNew.js +5 -5
- package/esm/utils/icons/SvgSearch.d.ts +1 -1
- package/esm/utils/icons/SvgSearch.js +5 -5
- package/esm/utils/icons/SvgSmileyHappy.d.ts +1 -1
- package/esm/utils/icons/SvgSmileyHappy.js +5 -5
- package/esm/utils/icons/SvgSortDown.d.ts +1 -1
- package/esm/utils/icons/SvgSortDown.js +5 -5
- package/esm/utils/icons/SvgSortUp.d.ts +1 -1
- package/esm/utils/icons/SvgSortUp.js +5 -5
- package/esm/utils/icons/SvgStatusError.d.ts +1 -1
- package/esm/utils/icons/SvgStatusError.js +5 -5
- package/esm/utils/icons/SvgStatusSuccess.d.ts +1 -1
- package/esm/utils/icons/SvgStatusSuccess.js +5 -5
- package/esm/utils/icons/SvgStatusWarning.d.ts +1 -1
- package/esm/utils/icons/SvgStatusWarning.js +5 -5
- package/esm/utils/icons/SvgSwap.d.ts +1 -1
- package/esm/utils/icons/SvgSwap.js +5 -5
- package/esm/utils/icons/SvgUpload.d.ts +1 -1
- package/esm/utils/icons/SvgUpload.js +5 -5
- package/esm/utils/meta.js +2 -2
- package/esm/utils/providers/HydrationProvider.d.ts +1 -1
- package/esm/utils/providers/HydrationProvider.js +12 -12
- package/esm/utils/providers/ScopeProvider.d.ts +1 -1
- package/esm/utils/providers/ScopeProvider.js +13 -11
- package/package.json +1 -1
- package/styles.css +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import cx from 'classnames';
|
|
4
3
|
import {
|
|
@@ -105,87 +104,89 @@ export const DialogMain = React.forwardRef((props, ref) => {
|
|
|
105
104
|
...newStyle,
|
|
106
105
|
}));
|
|
107
106
|
}, []);
|
|
108
|
-
const content =
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
'iui-dialog
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
107
|
+
const content = React.createElement(
|
|
108
|
+
Box,
|
|
109
|
+
{
|
|
110
|
+
className: cx(
|
|
111
|
+
'iui-dialog',
|
|
112
|
+
{
|
|
113
|
+
'iui-dialog-default': styleType === 'default',
|
|
114
|
+
'iui-dialog-full-page': styleType === 'fullPage',
|
|
115
|
+
'iui-dialog-visible': isOpen,
|
|
116
|
+
'iui-dialog-draggable': isDraggable,
|
|
117
|
+
},
|
|
118
|
+
className,
|
|
119
|
+
),
|
|
120
|
+
role: 'dialog',
|
|
121
|
+
ref: useMergedRefs(dialogRef, ref),
|
|
122
|
+
onKeyDown: handleKeyDown,
|
|
123
|
+
tabIndex: -1,
|
|
124
|
+
'data-iui-placement': placement,
|
|
125
|
+
style: {
|
|
126
|
+
transform,
|
|
127
|
+
...style,
|
|
128
|
+
...propStyle,
|
|
116
129
|
},
|
|
117
|
-
|
|
118
|
-
),
|
|
119
|
-
role: 'dialog',
|
|
120
|
-
ref: useMergedRefs(dialogRef, ref),
|
|
121
|
-
onKeyDown: handleKeyDown,
|
|
122
|
-
tabIndex: -1,
|
|
123
|
-
'data-iui-placement': placement,
|
|
124
|
-
style: {
|
|
125
|
-
transform,
|
|
126
|
-
...style,
|
|
127
|
-
...propStyle,
|
|
128
|
-
},
|
|
129
|
-
...rest,
|
|
130
|
-
children: [
|
|
131
|
-
_jsxs(ShadowRoot, {
|
|
132
|
-
children: [
|
|
133
|
-
_jsx('slot', {}),
|
|
134
|
-
isResizable &&
|
|
135
|
-
_jsx(Resizer, {
|
|
136
|
-
elementRef: dialogRef,
|
|
137
|
-
containerRef: dialogContext.dialogRootRef,
|
|
138
|
-
onResizeStart: () => {
|
|
139
|
-
if (!hasBeenResized.current) {
|
|
140
|
-
hasBeenResized.current = true;
|
|
141
|
-
setResizeStyle({
|
|
142
|
-
maxInlineSize: '100%',
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
onResizeEnd: setResizeStyle,
|
|
147
|
-
}),
|
|
148
|
-
],
|
|
149
|
-
}),
|
|
150
|
-
children,
|
|
151
|
-
],
|
|
152
|
-
});
|
|
153
|
-
return _jsx(Transition, {
|
|
154
|
-
in: isOpen,
|
|
155
|
-
appear: true,
|
|
156
|
-
timeout: {
|
|
157
|
-
exit: 600,
|
|
158
|
-
},
|
|
159
|
-
onEntered: () => {
|
|
160
|
-
previousFocusedElement.current =
|
|
161
|
-
dialogRef.current?.ownerDocument.activeElement;
|
|
162
|
-
setFocus &&
|
|
163
|
-
dialogRef.current?.focus({
|
|
164
|
-
preventScroll: true,
|
|
165
|
-
});
|
|
130
|
+
...rest,
|
|
166
131
|
},
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
132
|
+
React.createElement(
|
|
133
|
+
ShadowRoot,
|
|
134
|
+
null,
|
|
135
|
+
React.createElement('slot', null),
|
|
136
|
+
isResizable &&
|
|
137
|
+
React.createElement(Resizer, {
|
|
138
|
+
elementRef: dialogRef,
|
|
139
|
+
containerRef: dialogContext.dialogRootRef,
|
|
140
|
+
onResizeStart: () => {
|
|
141
|
+
if (!hasBeenResized.current) {
|
|
142
|
+
hasBeenResized.current = true;
|
|
143
|
+
setResizeStyle({
|
|
144
|
+
maxInlineSize: '100%',
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
onResizeEnd: setResizeStyle,
|
|
149
|
+
}),
|
|
150
|
+
),
|
|
151
|
+
children,
|
|
152
|
+
);
|
|
153
|
+
return React.createElement(
|
|
154
|
+
Transition,
|
|
155
|
+
{
|
|
156
|
+
in: isOpen,
|
|
157
|
+
appear: true,
|
|
158
|
+
timeout: {
|
|
159
|
+
exit: 600,
|
|
160
|
+
},
|
|
161
|
+
onEntered: () => {
|
|
162
|
+
previousFocusedElement.current =
|
|
163
|
+
dialogRef.current?.ownerDocument.activeElement;
|
|
164
|
+
setFocus &&
|
|
165
|
+
dialogRef.current?.focus({
|
|
166
|
+
preventScroll: true,
|
|
167
|
+
});
|
|
168
|
+
},
|
|
169
|
+
onExit: () => {
|
|
170
|
+
if (
|
|
171
|
+
dialogRef.current?.contains(
|
|
172
|
+
dialogRef.current?.ownerDocument.activeElement,
|
|
173
|
+
)
|
|
174
|
+
) {
|
|
175
|
+
previousFocusedElement.current?.focus();
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
unmountOnExit: true,
|
|
179
|
+
nodeRef: dialogRef,
|
|
175
180
|
},
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
+
React.createElement(
|
|
182
|
+
DialogDragContext.Provider,
|
|
183
|
+
{
|
|
184
|
+
value: {
|
|
185
|
+
onPointerDown: handlePointerDown,
|
|
186
|
+
},
|
|
181
187
|
},
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}),
|
|
187
|
-
!trapFocus && content,
|
|
188
|
-
],
|
|
189
|
-
}),
|
|
190
|
-
});
|
|
188
|
+
trapFocus && React.createElement(FocusTrap, null, content),
|
|
189
|
+
!trapFocus && content,
|
|
190
|
+
),
|
|
191
|
+
);
|
|
191
192
|
});
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
jsx as _jsx,
|
|
3
|
-
jsxs as _jsxs,
|
|
4
|
-
Fragment as _Fragment,
|
|
5
|
-
} from 'react/jsx-runtime';
|
|
6
1
|
import * as React from 'react';
|
|
7
2
|
import cx from 'classnames';
|
|
8
3
|
import { SvgClose, mergeEventHandlers, Box } from '../../utils/index.js';
|
|
@@ -24,32 +19,36 @@ export const DialogTitleBar = Object.assign(
|
|
|
24
19
|
...rest
|
|
25
20
|
} = props;
|
|
26
21
|
const { onPointerDown } = useDialogDragContext();
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
22
|
+
return React.createElement(
|
|
23
|
+
Box,
|
|
24
|
+
{
|
|
25
|
+
className: cx('iui-dialog-title-bar', className, {
|
|
26
|
+
'iui-dialog-title-bar-filled': isDraggable,
|
|
27
|
+
}),
|
|
28
|
+
ref: ref,
|
|
29
|
+
onPointerDown: mergeEventHandlers(onPointerDownProp, onPointerDown),
|
|
30
|
+
...rest,
|
|
31
|
+
},
|
|
32
|
+
children
|
|
35
33
|
? children
|
|
36
|
-
:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
: React.createElement(
|
|
35
|
+
React.Fragment,
|
|
36
|
+
null,
|
|
37
|
+
React.createElement(DialogTitleBarTitle, null, titleText),
|
|
38
|
+
isDismissible &&
|
|
39
|
+
React.createElement(
|
|
40
|
+
IconButton,
|
|
41
|
+
{
|
|
43
42
|
size: 'small',
|
|
44
43
|
styleType: 'borderless',
|
|
45
44
|
onClick: onClose,
|
|
46
45
|
'aria-label': 'Close',
|
|
47
46
|
'data-iui-shift': 'right',
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
},
|
|
48
|
+
React.createElement(SvgClose, null),
|
|
49
|
+
),
|
|
50
|
+
),
|
|
51
|
+
);
|
|
53
52
|
}),
|
|
54
53
|
{
|
|
55
54
|
Title: DialogTitleBarTitle,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx } from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import cx from 'classnames';
|
|
4
3
|
import { Box } from '../../utils/components/Box.js';
|
|
5
4
|
export const Divider = React.forwardRef((props, ref) => {
|
|
6
5
|
const { className, orientation = 'horizontal', ...rest } = props;
|
|
7
|
-
return
|
|
6
|
+
return React.createElement(Box, {
|
|
8
7
|
as: 'hr',
|
|
9
8
|
className: cx('iui-divider', className),
|
|
10
9
|
'aria-orientation': orientation === 'vertical' ? 'vertical' : undefined,
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment } from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { mergeEventHandlers, useControlledState } from '../../utils/index.js';
|
|
4
3
|
import { Menu } from '../Menu/Menu.js';
|
|
5
4
|
import { FloatingTree } from '@floating-ui/react';
|
|
6
5
|
export const DropdownMenu = React.forwardRef((props, forwardedRef) => {
|
|
7
|
-
return
|
|
8
|
-
|
|
6
|
+
return React.createElement(
|
|
7
|
+
FloatingTree,
|
|
8
|
+
null,
|
|
9
|
+
React.createElement(DropdownMenuContent, {
|
|
9
10
|
ref: forwardedRef,
|
|
10
11
|
...props,
|
|
11
12
|
}),
|
|
12
|
-
|
|
13
|
+
);
|
|
13
14
|
});
|
|
14
15
|
const DropdownMenuContent = React.forwardRef((props, forwardedRef) => {
|
|
15
16
|
const {
|
|
@@ -34,28 +35,33 @@ const DropdownMenuContent = React.forwardRef((props, forwardedRef) => {
|
|
|
34
35
|
}
|
|
35
36
|
return menuItems;
|
|
36
37
|
}, [menuItems, setVisible]);
|
|
37
|
-
return
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
38
|
+
return React.createElement(
|
|
39
|
+
React.Fragment,
|
|
40
|
+
null,
|
|
41
|
+
React.createElement(
|
|
42
|
+
Menu,
|
|
43
|
+
{
|
|
44
|
+
trigger: children,
|
|
45
|
+
onKeyDown: mergeEventHandlers(props.onKeyDown, (e) => {
|
|
46
|
+
if (e.defaultPrevented) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (e.key === 'Tab') {
|
|
50
|
+
setVisible(false);
|
|
51
|
+
}
|
|
52
|
+
}),
|
|
53
|
+
role: role,
|
|
54
|
+
ref: forwardedRef,
|
|
55
|
+
portal: portal,
|
|
56
|
+
popoverProps: {
|
|
57
|
+
placement,
|
|
58
|
+
matchWidth,
|
|
59
|
+
visible,
|
|
60
|
+
onVisibleChange: setVisible,
|
|
61
|
+
},
|
|
62
|
+
...rest,
|
|
56
63
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
});
|
|
64
|
+
menuContent,
|
|
65
|
+
),
|
|
66
|
+
);
|
|
61
67
|
});
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
jsx as _jsx,
|
|
3
|
-
jsxs as _jsxs,
|
|
4
|
-
Fragment as _Fragment,
|
|
5
|
-
} from 'react/jsx-runtime';
|
|
6
1
|
import cx from 'classnames';
|
|
7
2
|
import * as React from 'react';
|
|
8
3
|
import {
|
|
@@ -21,20 +16,19 @@ const ExpandableBlockContext = React.createContext(undefined);
|
|
|
21
16
|
ExpandableBlockContext.displayName = 'ExpandableBlockContext';
|
|
22
17
|
const ExpandableBlockComponent = React.forwardRef((props, forwardedRef) => {
|
|
23
18
|
const { children, title, caption, endIcon, ...rest } = props;
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
});
|
|
19
|
+
return React.createElement(
|
|
20
|
+
ExpandableBlock.Wrapper,
|
|
21
|
+
{
|
|
22
|
+
...rest,
|
|
23
|
+
ref: forwardedRef,
|
|
24
|
+
},
|
|
25
|
+
React.createElement(ExpandableBlock.Trigger, {
|
|
26
|
+
label: title,
|
|
27
|
+
caption: caption,
|
|
28
|
+
endIcon: endIcon,
|
|
29
|
+
}),
|
|
30
|
+
React.createElement(ExpandableBlock.Content, null, children),
|
|
31
|
+
);
|
|
38
32
|
});
|
|
39
33
|
ExpandableBlockComponent.displayName = 'ExpandableBlock';
|
|
40
34
|
const ExpandableBlockWrapper = React.forwardRef((props, forwardedRef) => {
|
|
@@ -53,79 +47,83 @@ const ExpandableBlockWrapper = React.forwardRef((props, forwardedRef) => {
|
|
|
53
47
|
const [expandedState, setExpanded] = React.useState(isExpanded ?? false);
|
|
54
48
|
const expanded = isExpanded ?? expandedState;
|
|
55
49
|
const [descriptionId, setDescriptionId] = React.useState(undefined);
|
|
56
|
-
return
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
50
|
+
return React.createElement(
|
|
51
|
+
ExpandableBlockContext.Provider,
|
|
52
|
+
{
|
|
53
|
+
value: {
|
|
54
|
+
status,
|
|
55
|
+
isExpanded: expanded,
|
|
56
|
+
onToggle,
|
|
57
|
+
size,
|
|
58
|
+
styleType,
|
|
59
|
+
disabled,
|
|
60
|
+
setExpanded,
|
|
61
|
+
children,
|
|
62
|
+
descriptionId,
|
|
63
|
+
setDescriptionId,
|
|
64
|
+
},
|
|
68
65
|
},
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
66
|
+
React.createElement(
|
|
67
|
+
Box,
|
|
68
|
+
{
|
|
69
|
+
className: cx('iui-expandable-block', className),
|
|
70
|
+
'data-iui-expanded': expanded,
|
|
71
|
+
'data-iui-size': size,
|
|
72
|
+
'data-iui-variant': styleType !== 'default' ? styleType : undefined,
|
|
73
|
+
style: style,
|
|
74
|
+
ref: forwardedRef,
|
|
75
|
+
...rest,
|
|
76
|
+
},
|
|
77
|
+
children,
|
|
78
|
+
),
|
|
79
|
+
);
|
|
80
80
|
});
|
|
81
81
|
ExpandableBlockWrapper.displayName = 'ExpandableBlock.Wrapper';
|
|
82
82
|
const ExpandableBlockTrigger = React.forwardRef((props, forwardedRef) => {
|
|
83
83
|
const { className, children, label, caption, expandIcon, endIcon, ...rest } =
|
|
84
84
|
props;
|
|
85
85
|
const { disabled, status } = useSafeContext(ExpandableBlockContext);
|
|
86
|
-
return
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
: null,
|
|
112
|
-
],
|
|
113
|
-
}),
|
|
114
|
-
});
|
|
86
|
+
return React.createElement(
|
|
87
|
+
LinkBox,
|
|
88
|
+
{
|
|
89
|
+
className: cx('iui-expandable-header', className),
|
|
90
|
+
'data-iui-disabled': disabled ? 'true' : undefined,
|
|
91
|
+
ref: forwardedRef,
|
|
92
|
+
...rest,
|
|
93
|
+
},
|
|
94
|
+
children ??
|
|
95
|
+
React.createElement(
|
|
96
|
+
React.Fragment,
|
|
97
|
+
null,
|
|
98
|
+
expandIcon ?? React.createElement(ExpandableBlock.ExpandIcon, null),
|
|
99
|
+
React.createElement(
|
|
100
|
+
ExpandableBlock.LabelArea,
|
|
101
|
+
null,
|
|
102
|
+
React.createElement(ExpandableBlock.Title, null, label),
|
|
103
|
+
caption &&
|
|
104
|
+
React.createElement(ExpandableBlock.Caption, null, caption),
|
|
105
|
+
),
|
|
106
|
+
endIcon || status
|
|
107
|
+
? React.createElement(ExpandableBlock.EndIcon, null, endIcon)
|
|
108
|
+
: null,
|
|
109
|
+
),
|
|
110
|
+
);
|
|
115
111
|
});
|
|
116
112
|
ExpandableBlockTrigger.displayName = 'ExpandableBlock.Trigger';
|
|
117
113
|
const ExpandableBlockExpandIcon = React.forwardRef((props, forwardedRef) => {
|
|
118
114
|
const { className, children, ...rest } = props;
|
|
119
|
-
return
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
115
|
+
return React.createElement(
|
|
116
|
+
Icon,
|
|
117
|
+
{
|
|
118
|
+
className: cx('iui-expandable-block-icon', className),
|
|
119
|
+
ref: forwardedRef,
|
|
120
|
+
...rest,
|
|
121
|
+
},
|
|
122
|
+
children ??
|
|
123
|
+
React.createElement(SvgChevronRight, {
|
|
126
124
|
'aria-hidden': true,
|
|
127
125
|
}),
|
|
128
|
-
|
|
126
|
+
);
|
|
129
127
|
});
|
|
130
128
|
ExpandableBlockExpandIcon.displayName = 'ExpandableBlock.ExpandIcon';
|
|
131
129
|
const ExpandableBlockLabelArea = polymorphic.span('iui-expandable-block-label');
|
|
@@ -134,22 +132,25 @@ const ExpandableBlockTitle = React.forwardRef((props, forwardedRef) => {
|
|
|
134
132
|
const { className, children, onClick: onClickProp, ...rest } = props;
|
|
135
133
|
const { isExpanded, setExpanded, disabled, onToggle, descriptionId } =
|
|
136
134
|
useSafeContext(ExpandableBlockContext);
|
|
137
|
-
return
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
135
|
+
return React.createElement(
|
|
136
|
+
ButtonBase,
|
|
137
|
+
{
|
|
138
|
+
className: cx('iui-expandable-block-title', 'iui-link-action', className),
|
|
139
|
+
'aria-expanded': isExpanded,
|
|
140
|
+
'aria-disabled': disabled,
|
|
141
|
+
onClick: mergeEventHandlers(onClickProp, () => {
|
|
142
|
+
if (disabled) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
setExpanded(!isExpanded);
|
|
146
|
+
onToggle?.(!isExpanded);
|
|
147
|
+
}),
|
|
148
|
+
ref: forwardedRef,
|
|
149
|
+
'aria-describedby': descriptionId,
|
|
150
|
+
...rest,
|
|
151
|
+
},
|
|
152
|
+
children,
|
|
153
|
+
);
|
|
153
154
|
});
|
|
154
155
|
ExpandableBlockTitle.displayName = 'ExpandableBlock.Title';
|
|
155
156
|
const ExpandableBlockCaption = React.forwardRef((props, forwardedRef) => {
|
|
@@ -159,7 +160,7 @@ const ExpandableBlockCaption = React.forwardRef((props, forwardedRef) => {
|
|
|
159
160
|
setDescriptionId(props.id || fallbackId);
|
|
160
161
|
return () => setDescriptionId(undefined);
|
|
161
162
|
}, [props.id, fallbackId, setDescriptionId]);
|
|
162
|
-
return
|
|
163
|
+
return React.createElement(Box, {
|
|
163
164
|
ref: forwardedRef,
|
|
164
165
|
id: fallbackId,
|
|
165
166
|
...props,
|
|
@@ -171,25 +172,28 @@ const ExpandableBlockEndIcon = React.forwardRef((props, forwardedRef) => {
|
|
|
171
172
|
const { children, ...rest } = props;
|
|
172
173
|
const { status } = useSafeContext(ExpandableBlockContext);
|
|
173
174
|
const icon = children ?? (status && StatusIconMap[status]());
|
|
174
|
-
return
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
175
|
+
return React.createElement(
|
|
176
|
+
Icon,
|
|
177
|
+
{
|
|
178
|
+
fill: status,
|
|
179
|
+
ref: forwardedRef,
|
|
180
|
+
...rest,
|
|
181
|
+
},
|
|
182
|
+
icon,
|
|
183
|
+
);
|
|
180
184
|
});
|
|
181
185
|
ExpandableBlockEndIcon.displayName = 'ExpandableBlock.EndIcon';
|
|
182
186
|
const ExpandableBlockContent = React.forwardRef((props, forwardedRef) => {
|
|
183
187
|
const { className, children, innerProps, ...rest } = props;
|
|
184
|
-
return
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
...
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
188
|
+
return React.createElement(
|
|
189
|
+
Box,
|
|
190
|
+
{
|
|
191
|
+
className: cx('iui-expandable-content', className),
|
|
192
|
+
ref: forwardedRef,
|
|
193
|
+
...rest,
|
|
194
|
+
},
|
|
195
|
+
React.createElement(Box, innerProps, children),
|
|
196
|
+
);
|
|
193
197
|
});
|
|
194
198
|
ExpandableBlockContent.displayName = 'ExpandableBlock.Content';
|
|
195
199
|
export const ExpandableBlock = Object.assign(ExpandableBlockComponent, {
|
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { Box } from '../../utils/index.js';
|
|
4
3
|
import cx from 'classnames';
|
|
5
4
|
export const Fieldset = React.forwardRef((props, ref) => {
|
|
6
5
|
const { children, className, disabled, legend, ...rest } = props;
|
|
7
|
-
return
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
React.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
],
|
|
28
|
-
});
|
|
6
|
+
return React.createElement(
|
|
7
|
+
Box,
|
|
8
|
+
{
|
|
9
|
+
as: 'fieldset',
|
|
10
|
+
className: cx('iui-fieldset', className),
|
|
11
|
+
disabled: disabled,
|
|
12
|
+
ref: ref,
|
|
13
|
+
...rest,
|
|
14
|
+
},
|
|
15
|
+
legend && React.createElement('legend', null, legend),
|
|
16
|
+
disabled
|
|
17
|
+
? React.Children.map(children, (child) =>
|
|
18
|
+
React.isValidElement(child)
|
|
19
|
+
? React.cloneElement(child, {
|
|
20
|
+
disabled: true,
|
|
21
|
+
})
|
|
22
|
+
: child,
|
|
23
|
+
)
|
|
24
|
+
: children,
|
|
25
|
+
);
|
|
29
26
|
});
|