@carbon/react 1.83.0 → 1.84.0-rc.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/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +980 -945
- package/README.md +1 -1
- package/es/components/AILabel/index.js +27 -30
- package/es/components/AISkeleton/AISkeletonIcon.js +4 -5
- package/es/components/AISkeleton/AISkeletonPlaceholder.js +4 -5
- package/es/components/AISkeleton/AISkeletonText.js +4 -5
- package/es/components/Accordion/Accordion.Skeleton.js +9 -10
- package/es/components/Accordion/Accordion.js +10 -11
- package/es/components/Accordion/AccordionItem.js +13 -14
- package/es/components/Accordion/AccordionProvider.js +4 -5
- package/es/components/AspectRatio/AspectRatio.js +7 -8
- package/es/components/BadgeIndicator/index.js +5 -6
- package/es/components/Breadcrumb/Breadcrumb.Skeleton.js +4 -5
- package/es/components/Button/Button.Skeleton.js +7 -8
- package/es/components/Button/ButtonBase.js +23 -24
- package/es/components/ChatButton/ChatButton.Skeleton.js +5 -6
- package/es/components/ChatButton/ChatButton.js +11 -12
- package/es/components/Checkbox/Checkbox.Skeleton.js +4 -5
- package/es/components/Checkbox/Checkbox.js +19 -20
- package/es/components/CheckboxGroup/CheckboxGroup.js +16 -17
- package/es/components/ClassPrefix/index.js +4 -5
- package/es/components/CodeSnippet/CodeSnippet.Skeleton.js +5 -6
- package/es/components/CodeSnippet/CodeSnippet.js +25 -26
- package/es/components/ComboBox/ComboBox.js +24 -30
- package/es/components/ComboBox/tools/filter.js +9 -12
- package/es/components/ComboButton/index.js +16 -18
- package/es/components/ComposedModal/ComposedModal.js +31 -34
- package/es/components/ComposedModal/ModalFooter.js +37 -42
- package/es/components/ComposedModal/ModalHeader.js +14 -15
- package/es/components/ContainedList/ContainedList.js +10 -11
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +9 -10
- package/es/components/ContentSwitcher/ContentSwitcher.d.ts +9 -29
- package/es/components/ContentSwitcher/ContentSwitcher.js +96 -128
- package/es/components/ContentSwitcher/index.d.ts +3 -4
- package/es/components/ContextMenu/useContextMenu.js +1 -2
- package/es/components/Copy/Copy.js +11 -12
- package/es/components/CopyButton/CopyButton.js +10 -11
- package/es/components/DataTable/DataTable.js +45 -53
- package/es/components/DataTable/Table.js +15 -18
- package/es/components/DataTable/TableBatchAction.js +8 -11
- package/es/components/DataTable/TableBatchActions.js +18 -20
- package/es/components/DataTable/TableBody.js +8 -11
- package/es/components/DataTable/TableContainer.js +9 -10
- package/es/components/DataTable/TableDecoratorRow.js +4 -5
- package/es/components/DataTable/TableExpandHeader.js +14 -15
- package/es/components/DataTable/TableExpandRow.js +13 -14
- package/es/components/DataTable/TableExpandedRow.js +6 -7
- package/es/components/DataTable/TableHeader.js +15 -16
- package/es/components/DataTable/TableSelectAll.js +11 -12
- package/es/components/DataTable/TableSelectRow.js +12 -13
- package/es/components/DataTable/TableSlugRow.js +4 -5
- package/es/components/DataTable/TableToolbar.js +7 -8
- package/es/components/DataTable/TableToolbarMenu.js +8 -9
- package/es/components/DataTable/TableToolbarSearch.js +22 -24
- package/es/components/DataTable/state/sorting.js +3 -4
- package/es/components/DataTable/tools/filter.js +10 -12
- package/es/components/DataTable/tools/normalize.js +6 -8
- package/es/components/DataTable/tools/sorting.js +24 -30
- package/es/components/DataTableSkeleton/DataTableSkeleton.js +11 -12
- package/es/components/DatePicker/DatePicker.Skeleton.js +7 -8
- package/es/components/DatePicker/DatePicker.js +88 -65
- package/es/components/DatePickerInput/DatePickerInput.js +5 -6
- package/es/components/Dialog/index.d.ts +193 -8
- package/es/components/Dialog/index.js +454 -35
- package/es/components/Dropdown/Dropdown.Skeleton.js +6 -7
- package/es/components/Dropdown/Dropdown.js +40 -43
- package/es/components/ErrorBoundary/ErrorBoundary.js +2 -2
- package/es/components/ExpandableSearch/ExpandableSearch.js +9 -10
- package/es/components/FeatureFlags/index.js +11 -12
- package/es/components/FileUploader/FileUploader.Skeleton.js +4 -5
- package/es/components/FileUploader/FileUploader.js +22 -24
- package/es/components/FileUploader/FileUploaderButton.js +16 -17
- package/es/components/FileUploader/FileUploaderDropContainer.js +15 -16
- package/es/components/FileUploader/FileUploaderItem.js +13 -14
- package/es/components/FileUploader/Filename.js +9 -10
- package/es/components/FluidComboBox/FluidComboBox.Skeleton.js +4 -5
- package/es/components/FluidComboBox/FluidComboBox.js +5 -6
- package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.js +5 -6
- package/es/components/FluidDatePicker/FluidDatePicker.js +10 -11
- package/es/components/FluidDropdown/FluidDropdown.Skeleton.js +4 -5
- package/es/components/FluidDropdown/FluidDropdown.js +5 -6
- package/es/components/FluidForm/FluidForm.js +5 -6
- package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +4 -5
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +6 -7
- package/es/components/FluidNumberInput/FluidNumberInput.Skeleton.js +4 -5
- package/es/components/FluidNumberInput/FluidNumberInput.d.ts +40 -1
- package/es/components/FluidNumberInput/FluidNumberInput.js +38 -5
- package/es/components/FluidSearch/FluidSearch.Skeleton.js +4 -5
- package/es/components/FluidSearch/FluidSearch.js +4 -5
- package/es/components/FluidSelect/FluidSelect.Skeleton.js +4 -5
- package/es/components/FluidSelect/FluidSelect.js +5 -6
- package/es/components/FluidTextArea/FluidTextArea.Skeleton.js +4 -5
- package/es/components/FluidTextArea/FluidTextArea.js +4 -5
- package/es/components/FluidTextInput/FluidTextInput.Skeleton.js +4 -5
- package/es/components/FluidTextInput/FluidTextInput.js +5 -6
- package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.js +5 -6
- package/es/components/FluidTimePicker/FluidTimePicker.js +11 -12
- package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +5 -6
- package/es/components/Form/Form.js +5 -6
- package/es/components/FormGroup/FormGroup.js +11 -12
- package/es/components/FormItem/FormItem.js +5 -6
- package/es/components/FormLabel/FormLabel.js +6 -7
- package/es/components/Grid/CSSGrid.js +17 -19
- package/es/components/Grid/Column.js +28 -27
- package/es/components/Grid/ColumnHang.js +6 -7
- package/es/components/Grid/FlexGrid.js +9 -10
- package/es/components/Grid/GridContext.js +5 -6
- package/es/components/Grid/Row.js +8 -9
- package/es/components/Heading/index.js +5 -6
- package/es/components/Icon/Icon.Skeleton.js +4 -5
- package/es/components/IconButton/index.js +20 -21
- package/es/components/IconIndicator/index.js +7 -8
- package/es/components/IdPrefix/index.js +4 -5
- package/es/components/InlineLoading/InlineLoading.js +9 -10
- package/es/components/Layer/index.js +8 -9
- package/es/components/Layout/index.js +21 -26
- package/es/components/LayoutDirection/LayoutDirection.js +6 -7
- package/es/components/Link/Link.d.ts +1 -1
- package/es/components/Link/Link.js +14 -15
- package/es/components/ListBox/ListBoxField.js +6 -7
- package/es/components/ListBox/ListBoxMenu.js +5 -6
- package/es/components/ListBox/ListBoxMenuIcon.js +4 -5
- package/es/components/ListBox/ListBoxMenuItem.js +8 -10
- package/es/components/ListBox/ListBoxSelection.js +8 -9
- package/es/components/ListBox/next/ListBoxSelection.js +9 -10
- package/es/components/ListBox/next/ListBoxTrigger.js +5 -6
- package/es/components/ListItem/ListItem.js +5 -6
- package/es/components/Loading/Loading.js +8 -9
- package/es/components/Menu/Menu.js +23 -24
- package/es/components/Menu/MenuItem.js +39 -44
- package/es/components/MenuButton/index.js +16 -18
- package/es/components/Modal/Modal.js +55 -63
- package/es/components/ModalWrapper/ModalWrapper.js +2 -2
- package/es/components/MultiSelect/FilterableMultiSelect.js +46 -48
- package/es/components/MultiSelect/MultiSelect.js +43 -45
- package/es/components/MultiSelect/tools/sorting.js +11 -15
- package/es/components/Notification/Notification.js +96 -105
- package/es/components/NumberInput/NumberFormatPropTypes.d.ts +29 -0
- package/es/components/NumberInput/NumberFormatPropTypes.js +40 -0
- package/es/components/NumberInput/NumberInput.Skeleton.js +6 -7
- package/es/components/NumberInput/NumberInput.d.ts +39 -3
- package/es/components/NumberInput/NumberInput.js +174 -44
- package/es/components/OrderedList/OrderedList.js +7 -8
- package/es/components/OverflowMenu/OverflowMenu.d.ts +1 -1
- package/es/components/OverflowMenu/OverflowMenu.js +35 -41
- package/es/components/OverflowMenu/next/index.js +12 -13
- package/es/components/PageHeader/PageHeader.d.ts +29 -5
- package/es/components/PageHeader/PageHeader.js +119 -73
- package/es/components/Pagination/Pagination.Skeleton.js +4 -5
- package/es/components/Pagination/Pagination.js +24 -25
- package/es/components/Pagination/experimental/PageSelector.js +8 -9
- package/es/components/Pagination/experimental/Pagination.js +20 -21
- package/es/components/PaginationNav/PaginationNav.js +33 -38
- package/es/components/Popover/index.js +26 -28
- package/es/components/ProgressBar/ProgressBar.js +11 -12
- package/es/components/ProgressIndicator/ProgressIndicator.Skeleton.js +5 -6
- package/es/components/ProgressIndicator/ProgressIndicator.js +29 -32
- package/es/components/RadioTile/RadioTile.js +17 -18
- package/es/components/Search/Search.Skeleton.js +5 -6
- package/es/components/Search/Search.js +26 -28
- package/es/components/Select/Select.Skeleton.js +5 -6
- package/es/components/Select/Select.js +24 -25
- package/es/components/SelectItem/SelectItem.js +8 -9
- package/es/components/SelectItemGroup/SelectItemGroup.js +7 -8
- package/es/components/ShapeIndicator/index.js +7 -8
- package/es/components/SkeletonIcon/SkeletonIcon.js +4 -5
- package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +4 -5
- package/es/components/SkeletonText/SkeletonText.js +8 -9
- package/es/components/Slider/Slider.Skeleton.js +8 -9
- package/es/components/Slider/Slider.js +69 -83
- package/es/components/Slider/SliderHandles.js +6 -6
- package/es/components/StructuredList/StructuredList.Skeleton.js +5 -6
- package/es/components/Tabs/Tabs.Skeleton.js +5 -6
- package/es/components/Tabs/Tabs.js +83 -98
- package/es/components/Tabs/usePressable.js +7 -8
- package/es/components/Tag/DismissibleTag.js +16 -17
- package/es/components/Tag/OperationalTag.js +10 -11
- package/es/components/Tag/SelectableTag.js +13 -14
- package/es/components/Tag/Tag.Skeleton.js +5 -6
- package/es/components/Tag/Tag.js +19 -20
- package/es/components/Text/Text.js +6 -7
- package/es/components/Text/TextDirection.js +5 -6
- package/es/components/TextArea/TextArea.js +3 -3
- package/es/components/TextInput/ControlledPasswordInput.js +24 -25
- package/es/components/TextInput/PasswordInput.js +26 -27
- package/es/components/TextInput/TextInput.Skeleton.js +5 -6
- package/es/components/TextInput/TextInput.js +27 -28
- package/es/components/TextInput/util.js +14 -17
- package/es/components/Theme/index.js +10 -12
- package/es/components/Tile/Tile.js +68 -74
- package/es/components/Toggle/Toggle.Skeleton.js +4 -5
- package/es/components/Toggle/Toggle.js +17 -18
- package/es/components/ToggleSmall/ToggleSmall.Skeleton.js +6 -7
- package/es/components/Toggletip/index.js +33 -39
- package/es/components/Tooltip/DefinitionTooltip.js +13 -14
- package/es/components/Tooltip/Tooltip.js +15 -16
- package/es/components/TreeView/TreeNode.js +20 -21
- package/es/components/TreeView/TreeView.js +14 -16
- package/es/components/UIShell/Content.js +6 -7
- package/es/components/UIShell/Header.js +5 -6
- package/es/components/UIShell/HeaderContainer.js +5 -6
- package/es/components/UIShell/HeaderGlobalAction.js +12 -13
- package/es/components/UIShell/HeaderMenu.d.ts +10 -112
- package/es/components/UIShell/HeaderMenu.js +154 -201
- package/es/components/UIShell/HeaderMenuButton.js +10 -11
- package/es/components/UIShell/HeaderMenuItem.js +10 -11
- package/es/components/UIShell/HeaderName.js +6 -7
- package/es/components/UIShell/HeaderNavigation.js +7 -8
- package/es/components/UIShell/HeaderPanel.js +9 -10
- package/es/components/UIShell/HeaderSideNavItems.js +5 -6
- package/es/components/UIShell/Link.js +8 -9
- package/es/components/UIShell/SideNav.js +23 -25
- package/es/components/UIShell/SideNavDetails.js +6 -7
- package/es/components/UIShell/SideNavDivider.js +3 -4
- package/es/components/UIShell/SideNavFooter.js +6 -7
- package/es/components/UIShell/SideNavHeader.js +5 -6
- package/es/components/UIShell/SideNavIcon.js +5 -6
- package/es/components/UIShell/SideNavItem.js +5 -6
- package/es/components/UIShell/SideNavItems.js +5 -6
- package/es/components/UIShell/SideNavLink.js +10 -11
- package/es/components/UIShell/SideNavLinkText.js +5 -6
- package/es/components/UIShell/SideNavMenu.js +11 -12
- package/es/components/UIShell/SkipToContent.js +7 -8
- package/es/components/UIShell/Switcher.js +4 -5
- package/es/components/UIShell/SwitcherDivider.js +4 -5
- package/es/components/UnorderedList/UnorderedList.js +6 -7
- package/es/index.js +2 -2
- package/es/internal/FloatingMenu.js +26 -28
- package/es/internal/Selection.js +15 -17
- package/es/internal/getAnnouncement.d.ts +8 -0
- package/es/internal/getAnnouncement.js +22 -0
- package/es/internal/keyboard/match.js +6 -7
- package/es/internal/useControllableState.d.ts +1 -1
- package/es/internal/useControllableState.js +8 -9
- package/es/internal/useDelayedState.js +1 -2
- package/es/internal/useDocumentLang.d.ts +12 -0
- package/es/internal/useId.js +2 -4
- package/es/internal/useMatchMedia.js +1 -2
- package/es/internal/useMergedRefs.d.ts +1 -1
- package/es/internal/useNoInteractiveChildren.js +2 -4
- package/es/internal/useNormalizedInputProps.js +9 -10
- package/es/internal/useResizeObserver.js +4 -5
- package/es/internal/useSavedCallback.js +1 -3
- package/es/internal/wrapFocus.js +20 -29
- package/es/prop-types/deprecate.js +1 -4
- package/es/prop-types/deprecateValuesWithin.js +1 -4
- package/es/prop-types/isRequiredOneOf.js +1 -4
- package/es/prop-types/requiredIfGivenPropIsTruthy.js +1 -4
- package/es/tools/events.js +1 -4
- package/es/tools/mergeRefs.js +9 -14
- package/es/tools/uniqueId.js +1 -2
- package/es/tools/wrapComponent.js +9 -11
- package/lib/components/AILabel/index.js +27 -30
- package/lib/components/AISkeleton/AISkeletonIcon.js +4 -5
- package/lib/components/AISkeleton/AISkeletonPlaceholder.js +4 -5
- package/lib/components/AISkeleton/AISkeletonText.js +4 -5
- package/lib/components/Accordion/Accordion.Skeleton.js +9 -10
- package/lib/components/Accordion/Accordion.js +10 -11
- package/lib/components/Accordion/AccordionItem.js +13 -14
- package/lib/components/Accordion/AccordionProvider.js +4 -5
- package/lib/components/AspectRatio/AspectRatio.js +7 -8
- package/lib/components/BadgeIndicator/index.js +5 -6
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.js +4 -5
- package/lib/components/Button/Button.Skeleton.js +7 -8
- package/lib/components/Button/ButtonBase.js +23 -24
- package/lib/components/ChatButton/ChatButton.Skeleton.js +5 -6
- package/lib/components/ChatButton/ChatButton.js +11 -12
- package/lib/components/Checkbox/Checkbox.Skeleton.js +4 -5
- package/lib/components/Checkbox/Checkbox.js +19 -20
- package/lib/components/CheckboxGroup/CheckboxGroup.js +16 -17
- package/lib/components/ClassPrefix/index.js +4 -5
- package/lib/components/CodeSnippet/CodeSnippet.Skeleton.js +5 -6
- package/lib/components/CodeSnippet/CodeSnippet.js +25 -26
- package/lib/components/ComboBox/ComboBox.js +24 -30
- package/lib/components/ComboBox/tools/filter.js +9 -12
- package/lib/components/ComboButton/index.js +16 -18
- package/lib/components/ComposedModal/ComposedModal.js +31 -34
- package/lib/components/ComposedModal/ModalFooter.js +37 -42
- package/lib/components/ComposedModal/ModalHeader.js +14 -15
- package/lib/components/ContainedList/ContainedList.js +10 -11
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +9 -10
- package/lib/components/ContentSwitcher/ContentSwitcher.d.ts +9 -29
- package/lib/components/ContentSwitcher/ContentSwitcher.js +94 -126
- package/lib/components/ContentSwitcher/index.d.ts +3 -4
- package/lib/components/ContextMenu/useContextMenu.js +1 -2
- package/lib/components/Copy/Copy.js +11 -12
- package/lib/components/CopyButton/CopyButton.js +10 -11
- package/lib/components/DataTable/DataTable.js +45 -53
- package/lib/components/DataTable/Table.js +15 -18
- package/lib/components/DataTable/TableBatchAction.js +8 -11
- package/lib/components/DataTable/TableBatchActions.js +18 -20
- package/lib/components/DataTable/TableBody.js +8 -11
- package/lib/components/DataTable/TableContainer.js +9 -10
- package/lib/components/DataTable/TableDecoratorRow.js +4 -5
- package/lib/components/DataTable/TableExpandHeader.js +14 -15
- package/lib/components/DataTable/TableExpandRow.js +13 -14
- package/lib/components/DataTable/TableExpandedRow.js +6 -7
- package/lib/components/DataTable/TableHeader.js +15 -16
- package/lib/components/DataTable/TableSelectAll.js +11 -12
- package/lib/components/DataTable/TableSelectRow.js +12 -13
- package/lib/components/DataTable/TableSlugRow.js +4 -5
- package/lib/components/DataTable/TableToolbar.js +7 -8
- package/lib/components/DataTable/TableToolbarMenu.js +8 -9
- package/lib/components/DataTable/TableToolbarSearch.js +22 -24
- package/lib/components/DataTable/state/sorting.js +3 -4
- package/lib/components/DataTable/tools/filter.js +10 -12
- package/lib/components/DataTable/tools/normalize.js +6 -8
- package/lib/components/DataTable/tools/sorting.js +24 -30
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +11 -12
- package/lib/components/DatePicker/DatePicker.Skeleton.js +7 -8
- package/lib/components/DatePicker/DatePicker.js +87 -64
- package/lib/components/DatePickerInput/DatePickerInput.js +5 -6
- package/lib/components/Dialog/index.d.ts +193 -8
- package/lib/components/Dialog/index.js +457 -33
- package/lib/components/Dropdown/Dropdown.Skeleton.js +6 -7
- package/lib/components/Dropdown/Dropdown.js +40 -43
- package/lib/components/ErrorBoundary/ErrorBoundary.js +2 -2
- package/lib/components/ExpandableSearch/ExpandableSearch.js +9 -10
- package/lib/components/FeatureFlags/index.js +11 -12
- package/lib/components/FileUploader/FileUploader.Skeleton.js +4 -5
- package/lib/components/FileUploader/FileUploader.js +22 -24
- package/lib/components/FileUploader/FileUploaderButton.js +16 -17
- package/lib/components/FileUploader/FileUploaderDropContainer.js +15 -16
- package/lib/components/FileUploader/FileUploaderItem.js +13 -14
- package/lib/components/FileUploader/Filename.js +9 -10
- package/lib/components/FluidComboBox/FluidComboBox.Skeleton.js +4 -5
- package/lib/components/FluidComboBox/FluidComboBox.js +5 -6
- package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.js +5 -6
- package/lib/components/FluidDatePicker/FluidDatePicker.js +10 -11
- package/lib/components/FluidDropdown/FluidDropdown.Skeleton.js +4 -5
- package/lib/components/FluidDropdown/FluidDropdown.js +5 -6
- package/lib/components/FluidForm/FluidForm.js +5 -6
- package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +4 -5
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +6 -7
- package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.js +4 -5
- package/lib/components/FluidNumberInput/FluidNumberInput.d.ts +40 -1
- package/lib/components/FluidNumberInput/FluidNumberInput.js +38 -5
- package/lib/components/FluidSearch/FluidSearch.Skeleton.js +4 -5
- package/lib/components/FluidSearch/FluidSearch.js +4 -5
- package/lib/components/FluidSelect/FluidSelect.Skeleton.js +4 -5
- package/lib/components/FluidSelect/FluidSelect.js +5 -6
- package/lib/components/FluidTextArea/FluidTextArea.Skeleton.js +4 -5
- package/lib/components/FluidTextArea/FluidTextArea.js +4 -5
- package/lib/components/FluidTextInput/FluidTextInput.Skeleton.js +4 -5
- package/lib/components/FluidTextInput/FluidTextInput.js +5 -6
- package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +5 -6
- package/lib/components/FluidTimePicker/FluidTimePicker.js +11 -12
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +5 -6
- package/lib/components/Form/Form.js +5 -6
- package/lib/components/FormGroup/FormGroup.js +11 -12
- package/lib/components/FormItem/FormItem.js +5 -6
- package/lib/components/FormLabel/FormLabel.js +6 -7
- package/lib/components/Grid/CSSGrid.js +17 -19
- package/lib/components/Grid/Column.js +28 -27
- package/lib/components/Grid/ColumnHang.js +6 -7
- package/lib/components/Grid/FlexGrid.js +9 -10
- package/lib/components/Grid/GridContext.js +5 -6
- package/lib/components/Grid/Row.js +8 -9
- package/lib/components/Heading/index.js +5 -6
- package/lib/components/Icon/Icon.Skeleton.js +4 -5
- package/lib/components/IconButton/index.js +20 -21
- package/lib/components/IconIndicator/index.js +7 -8
- package/lib/components/IdPrefix/index.js +4 -5
- package/lib/components/InlineLoading/InlineLoading.js +9 -10
- package/lib/components/Layer/index.js +8 -9
- package/lib/components/Layout/index.js +21 -26
- package/lib/components/LayoutDirection/LayoutDirection.js +6 -7
- package/lib/components/Link/Link.d.ts +1 -1
- package/lib/components/Link/Link.js +14 -15
- package/lib/components/ListBox/ListBoxField.js +6 -7
- package/lib/components/ListBox/ListBoxMenu.js +5 -6
- package/lib/components/ListBox/ListBoxMenuIcon.js +4 -5
- package/lib/components/ListBox/ListBoxMenuItem.js +8 -10
- package/lib/components/ListBox/ListBoxSelection.js +8 -9
- package/lib/components/ListBox/next/ListBoxSelection.js +9 -10
- package/lib/components/ListBox/next/ListBoxTrigger.js +5 -6
- package/lib/components/ListItem/ListItem.js +5 -6
- package/lib/components/Loading/Loading.js +8 -9
- package/lib/components/Menu/Menu.js +23 -24
- package/lib/components/Menu/MenuItem.js +39 -44
- package/lib/components/MenuButton/index.js +16 -18
- package/lib/components/Modal/Modal.js +55 -63
- package/lib/components/ModalWrapper/ModalWrapper.js +2 -2
- package/lib/components/MultiSelect/FilterableMultiSelect.js +45 -47
- package/lib/components/MultiSelect/MultiSelect.js +43 -45
- package/lib/components/MultiSelect/tools/sorting.js +11 -15
- package/lib/components/Notification/Notification.js +96 -105
- package/lib/components/NumberInput/NumberFormatPropTypes.d.ts +29 -0
- package/lib/components/NumberInput/NumberFormatPropTypes.js +48 -0
- package/lib/components/NumberInput/NumberInput.Skeleton.js +6 -7
- package/lib/components/NumberInput/NumberInput.d.ts +39 -3
- package/lib/components/NumberInput/NumberInput.js +173 -43
- package/lib/components/OrderedList/OrderedList.js +7 -8
- package/lib/components/OverflowMenu/OverflowMenu.d.ts +1 -1
- package/lib/components/OverflowMenu/OverflowMenu.js +35 -41
- package/lib/components/OverflowMenu/next/index.js +12 -13
- package/lib/components/PageHeader/PageHeader.d.ts +29 -5
- package/lib/components/PageHeader/PageHeader.js +119 -73
- package/lib/components/Pagination/Pagination.Skeleton.js +4 -5
- package/lib/components/Pagination/Pagination.js +24 -25
- package/lib/components/Pagination/experimental/PageSelector.js +8 -9
- package/lib/components/Pagination/experimental/Pagination.js +20 -21
- package/lib/components/PaginationNav/PaginationNav.js +33 -38
- package/lib/components/Popover/index.js +26 -28
- package/lib/components/ProgressBar/ProgressBar.js +11 -12
- package/lib/components/ProgressIndicator/ProgressIndicator.Skeleton.js +5 -6
- package/lib/components/ProgressIndicator/ProgressIndicator.js +29 -32
- package/lib/components/RadioTile/RadioTile.js +17 -18
- package/lib/components/Search/Search.Skeleton.js +5 -6
- package/lib/components/Search/Search.js +26 -28
- package/lib/components/Select/Select.Skeleton.js +5 -6
- package/lib/components/Select/Select.js +24 -25
- package/lib/components/SelectItem/SelectItem.js +8 -9
- package/lib/components/SelectItemGroup/SelectItemGroup.js +7 -8
- package/lib/components/ShapeIndicator/index.js +7 -8
- package/lib/components/SkeletonIcon/SkeletonIcon.js +4 -5
- package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +4 -5
- package/lib/components/SkeletonText/SkeletonText.js +8 -9
- package/lib/components/Slider/Slider.Skeleton.js +8 -9
- package/lib/components/Slider/Slider.js +69 -83
- package/lib/components/Slider/SliderHandles.js +6 -6
- package/lib/components/StructuredList/StructuredList.Skeleton.js +5 -6
- package/lib/components/Tabs/Tabs.Skeleton.js +5 -6
- package/lib/components/Tabs/Tabs.js +83 -98
- package/lib/components/Tabs/usePressable.js +7 -8
- package/lib/components/Tag/DismissibleTag.js +16 -17
- package/lib/components/Tag/OperationalTag.js +10 -11
- package/lib/components/Tag/SelectableTag.js +13 -14
- package/lib/components/Tag/Tag.Skeleton.js +5 -6
- package/lib/components/Tag/Tag.js +19 -20
- package/lib/components/Text/Text.js +6 -7
- package/lib/components/Text/TextDirection.js +5 -6
- package/lib/components/TextArea/TextArea.js +3 -3
- package/lib/components/TextInput/ControlledPasswordInput.js +24 -25
- package/lib/components/TextInput/PasswordInput.js +26 -27
- package/lib/components/TextInput/TextInput.Skeleton.js +5 -6
- package/lib/components/TextInput/TextInput.js +27 -28
- package/lib/components/TextInput/util.js +14 -17
- package/lib/components/Theme/index.js +10 -12
- package/lib/components/Tile/Tile.js +68 -74
- package/lib/components/Toggle/Toggle.Skeleton.js +4 -5
- package/lib/components/Toggle/Toggle.js +17 -18
- package/lib/components/ToggleSmall/ToggleSmall.Skeleton.js +6 -7
- package/lib/components/Toggletip/index.js +33 -39
- package/lib/components/Tooltip/DefinitionTooltip.js +13 -14
- package/lib/components/Tooltip/Tooltip.js +15 -16
- package/lib/components/TreeView/TreeNode.js +20 -21
- package/lib/components/TreeView/TreeView.js +14 -16
- package/lib/components/UIShell/Content.js +6 -7
- package/lib/components/UIShell/Header.js +5 -6
- package/lib/components/UIShell/HeaderContainer.js +5 -6
- package/lib/components/UIShell/HeaderGlobalAction.js +12 -13
- package/lib/components/UIShell/HeaderMenu.d.ts +10 -112
- package/lib/components/UIShell/HeaderMenu.js +152 -199
- package/lib/components/UIShell/HeaderMenuButton.js +10 -11
- package/lib/components/UIShell/HeaderMenuItem.js +10 -11
- package/lib/components/UIShell/HeaderName.js +6 -7
- package/lib/components/UIShell/HeaderNavigation.js +7 -8
- package/lib/components/UIShell/HeaderPanel.js +9 -10
- package/lib/components/UIShell/HeaderSideNavItems.js +5 -6
- package/lib/components/UIShell/Link.js +8 -9
- package/lib/components/UIShell/SideNav.js +23 -25
- package/lib/components/UIShell/SideNavDetails.js +6 -7
- package/lib/components/UIShell/SideNavDivider.js +3 -4
- package/lib/components/UIShell/SideNavFooter.js +6 -7
- package/lib/components/UIShell/SideNavHeader.js +5 -6
- package/lib/components/UIShell/SideNavIcon.js +5 -6
- package/lib/components/UIShell/SideNavItem.js +5 -6
- package/lib/components/UIShell/SideNavItems.js +5 -6
- package/lib/components/UIShell/SideNavLink.js +10 -11
- package/lib/components/UIShell/SideNavLinkText.js +5 -6
- package/lib/components/UIShell/SideNavMenu.js +11 -12
- package/lib/components/UIShell/SkipToContent.js +7 -8
- package/lib/components/UIShell/Switcher.js +4 -5
- package/lib/components/UIShell/SwitcherDivider.js +4 -5
- package/lib/components/UnorderedList/UnorderedList.js +6 -7
- package/lib/index.js +35 -35
- package/lib/internal/FloatingMenu.js +26 -28
- package/lib/internal/Selection.js +15 -17
- package/lib/internal/getAnnouncement.d.ts +8 -0
- package/lib/internal/getAnnouncement.js +26 -0
- package/lib/internal/keyboard/match.js +6 -7
- package/lib/internal/useControllableState.d.ts +1 -1
- package/lib/internal/useControllableState.js +8 -9
- package/lib/internal/useDelayedState.js +1 -2
- package/lib/internal/useDocumentLang.d.ts +12 -0
- package/lib/internal/useId.js +2 -4
- package/lib/internal/useMatchMedia.js +1 -2
- package/lib/internal/useMergedRefs.d.ts +1 -1
- package/lib/internal/useNoInteractiveChildren.js +2 -4
- package/lib/internal/useNormalizedInputProps.js +9 -10
- package/lib/internal/useResizeObserver.js +4 -5
- package/lib/internal/useSavedCallback.js +1 -3
- package/lib/internal/wrapFocus.js +20 -29
- package/lib/prop-types/deprecate.js +1 -4
- package/lib/prop-types/deprecateValuesWithin.js +1 -4
- package/lib/prop-types/isRequiredOneOf.js +1 -4
- package/lib/prop-types/requiredIfGivenPropIsTruthy.js +1 -4
- package/lib/tools/events.js +1 -4
- package/lib/tools/mergeRefs.js +9 -14
- package/lib/tools/uniqueId.js +1 -2
- package/lib/tools/wrapComponent.js +9 -11
- package/package.json +21 -19
- package/telemetry.yml +23 -1
- package/es/components/ContentSwitcher/index.js +0 -13
- package/es/feature-flags.d.ts +0 -7
- package/es/internal/useAnnouncer.js +0 -21
- package/lib/components/ContentSwitcher/index.js +0 -18
- package/lib/feature-flags.d.ts +0 -7
- package/lib/internal/useAnnouncer.js +0 -25
|
@@ -17,20 +17,19 @@ import { uniqueId } from '../../tools/uniqueId.js';
|
|
|
17
17
|
import { useFeatureFlag } from '../FeatureFlags/index.js';
|
|
18
18
|
import TreeNode from './TreeNode.js';
|
|
19
19
|
|
|
20
|
-
const TreeView =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} = _ref;
|
|
20
|
+
const TreeView = ({
|
|
21
|
+
active: prespecifiedActive,
|
|
22
|
+
children,
|
|
23
|
+
className,
|
|
24
|
+
hideLabel = false,
|
|
25
|
+
label,
|
|
26
|
+
multiselect = false,
|
|
27
|
+
onActivate,
|
|
28
|
+
onSelect,
|
|
29
|
+
selected: preselected,
|
|
30
|
+
size = 'sm',
|
|
31
|
+
...rest
|
|
32
|
+
}) => {
|
|
34
33
|
const enableTreeviewControllable = useFeatureFlag('enable-treeview-controllable');
|
|
35
34
|
const {
|
|
36
35
|
current: treeId
|
|
@@ -65,8 +64,7 @@ const TreeView = _ref => {
|
|
|
65
64
|
item.tabIndex = -1;
|
|
66
65
|
});
|
|
67
66
|
}
|
|
68
|
-
function handleTreeSelect(event) {
|
|
69
|
-
let node = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
67
|
+
function handleTreeSelect(event, node = {}) {
|
|
70
68
|
const nodeId = node.id;
|
|
71
69
|
if (multiselect && (event.metaKey || event.ctrlKey)) {
|
|
72
70
|
if (!selected.includes(nodeId)) {
|
|
@@ -10,13 +10,12 @@ import PropTypes from 'prop-types';
|
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
12
12
|
|
|
13
|
-
const Content =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} = _ref;
|
|
13
|
+
const Content = ({
|
|
14
|
+
className: customClassName,
|
|
15
|
+
children,
|
|
16
|
+
tagName = 'main',
|
|
17
|
+
...rest
|
|
18
|
+
}) => {
|
|
20
19
|
const prefix = usePrefix();
|
|
21
20
|
const className = cx(`${prefix}--content`, customClassName);
|
|
22
21
|
return /*#__PURE__*/React.createElement(tagName, {
|
|
@@ -12,12 +12,11 @@ import React from 'react';
|
|
|
12
12
|
import { AriaLabelPropType } from '../../prop-types/AriaPropTypes.js';
|
|
13
13
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
14
14
|
|
|
15
|
-
const Header =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} = _ref;
|
|
15
|
+
const Header = ({
|
|
16
|
+
className: customClassName,
|
|
17
|
+
children,
|
|
18
|
+
...rest
|
|
19
|
+
}) => {
|
|
21
20
|
const prefix = usePrefix();
|
|
22
21
|
const className = cx(`${prefix}--header`, customClassName);
|
|
23
22
|
return /*#__PURE__*/React.createElement("header", _extends({}, rest, {
|
|
@@ -12,12 +12,11 @@ import { Escape } from '../../internal/keyboard/keys.js';
|
|
|
12
12
|
import { match } from '../../internal/keyboard/match.js';
|
|
13
13
|
import { useWindowEvent } from '../../internal/useEvent.js';
|
|
14
14
|
|
|
15
|
-
function HeaderContainer(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} = _ref;
|
|
15
|
+
function HeaderContainer({
|
|
16
|
+
render: Children,
|
|
17
|
+
isSideNavExpanded = false,
|
|
18
|
+
...rest
|
|
19
|
+
}) {
|
|
21
20
|
//state for expandable sidenav
|
|
22
21
|
const [isSideNavExpandedState, setIsSideNavExpandedState] = useState(isSideNavExpanded);
|
|
23
22
|
useWindowEvent('keydown', event => {
|
|
@@ -22,19 +22,18 @@ import { usePrefix } from '../../internal/usePrefix.js';
|
|
|
22
22
|
*
|
|
23
23
|
* Note: children passed to this component should be an Icon.
|
|
24
24
|
*/
|
|
25
|
-
const HeaderGlobalAction = /*#__PURE__*/React.forwardRef(function HeaderGlobalAction(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
} = _ref;
|
|
25
|
+
const HeaderGlobalAction = /*#__PURE__*/React.forwardRef(function HeaderGlobalAction({
|
|
26
|
+
'aria-label': ariaLabel,
|
|
27
|
+
'aria-labelledby': ariaLabelledBy,
|
|
28
|
+
children,
|
|
29
|
+
className: customClassName,
|
|
30
|
+
onClick,
|
|
31
|
+
tooltipHighContrast = true,
|
|
32
|
+
tooltipDropShadow,
|
|
33
|
+
isActive,
|
|
34
|
+
tooltipAlignment,
|
|
35
|
+
...rest
|
|
36
|
+
}, ref) {
|
|
38
37
|
const prefix = usePrefix();
|
|
39
38
|
const className = cx({
|
|
40
39
|
[customClassName]: !!customClassName,
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
import React, { type
|
|
8
|
-
import PropTypes from 'prop-types';
|
|
9
|
-
/**
|
|
10
|
-
* `HeaderMenu` is used to render submenu's in the `Header`. Most often children
|
|
11
|
-
* will be a `HeaderMenuItem`. It handles certain keyboard events to help
|
|
12
|
-
* with managing focus. It also passes along refs to each child so that it can
|
|
13
|
-
* help manage focus state of its children.
|
|
14
|
-
*/
|
|
7
|
+
import React, { type FocusEvent, type KeyboardEvent, type MouseEvent, type ReactNode, type Ref } from 'react';
|
|
15
8
|
export interface HeaderMenuProps {
|
|
16
9
|
/**
|
|
17
10
|
* Required props for the accessibility label of the menu
|
|
@@ -25,7 +18,7 @@ export interface HeaderMenuProps {
|
|
|
25
18
|
/**
|
|
26
19
|
* Provide a custom ref handler for the menu button
|
|
27
20
|
*/
|
|
28
|
-
focusRef?:
|
|
21
|
+
focusRef?: Ref<any>;
|
|
29
22
|
/**
|
|
30
23
|
* Applies selected styles to the item if a user sets this to true and `aria-current !== 'page'`.
|
|
31
24
|
*/
|
|
@@ -43,21 +36,21 @@ export interface HeaderMenuProps {
|
|
|
43
36
|
* Optionally provide an onBlur handler that is called when the underlying
|
|
44
37
|
* button fires it's onblur event
|
|
45
38
|
*/
|
|
46
|
-
onBlur?: (event:
|
|
39
|
+
onBlur?: (event: FocusEvent<HTMLLIElement>) => void;
|
|
47
40
|
/**
|
|
48
41
|
* Optionally provide an onClick handler that is called when the underlying
|
|
49
42
|
* button fires it's onclick event
|
|
50
43
|
*/
|
|
51
|
-
onClick?: (event:
|
|
44
|
+
onClick?: (event: MouseEvent<HTMLLIElement>) => void;
|
|
52
45
|
/**
|
|
53
46
|
* Optionally provide an onKeyDown handler that is called when the underlying
|
|
54
47
|
* button fires it's onkeydown event
|
|
55
48
|
*/
|
|
56
|
-
onKeyDown?: (event:
|
|
49
|
+
onKeyDown?: (event: KeyboardEvent<HTMLLIElement>) => void;
|
|
57
50
|
/**
|
|
58
51
|
* Optional component to render instead of string
|
|
59
52
|
*/
|
|
60
|
-
renderMenuContent?: () =>
|
|
53
|
+
renderMenuContent?: () => ReactNode;
|
|
61
54
|
/**
|
|
62
55
|
* Optionally provide a tabIndex for the underlying menu button
|
|
63
56
|
*/
|
|
@@ -65,102 +58,7 @@ export interface HeaderMenuProps {
|
|
|
65
58
|
/**
|
|
66
59
|
* The children should be a series of `HeaderMenuItem` components.
|
|
67
60
|
*/
|
|
68
|
-
children?:
|
|
69
|
-
}
|
|
70
|
-
interface HeaderMenuState {
|
|
71
|
-
expanded: boolean;
|
|
72
|
-
selectedIndex: number | null;
|
|
73
|
-
}
|
|
74
|
-
declare class HeaderMenu extends React.Component<HeaderMenuProps, HeaderMenuState> {
|
|
75
|
-
static propTypes: {
|
|
76
|
-
/**
|
|
77
|
-
* Optionally provide a custom class to apply to the underlying `<li>` node
|
|
78
|
-
*/
|
|
79
|
-
className: PropTypes.Requireable<string>;
|
|
80
|
-
/**
|
|
81
|
-
* Provide a custom ref handler for the menu button
|
|
82
|
-
*/
|
|
83
|
-
focusRef: PropTypes.Requireable<(...args: any[]) => any>;
|
|
84
|
-
/**
|
|
85
|
-
* Applies selected styles to the item if a user sets this to true and `aria-current !== 'page'`.
|
|
86
|
-
*/
|
|
87
|
-
isActive: PropTypes.Requireable<boolean>;
|
|
88
|
-
/**
|
|
89
|
-
* Applies selected styles to the item if a user sets this to true and `aria-current !== 'page'`.
|
|
90
|
-
* @deprecated Please use `isActive` instead. This will be removed in the next major release.
|
|
91
|
-
*/
|
|
92
|
-
isCurrentPage: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
|
|
93
|
-
/**
|
|
94
|
-
* Provide a label for the link text
|
|
95
|
-
*/
|
|
96
|
-
menuLinkName: PropTypes.Validator<string>;
|
|
97
|
-
/**
|
|
98
|
-
* Optionally provide an onBlur handler that is called when the underlying
|
|
99
|
-
* button fires it's onblur event
|
|
100
|
-
*/
|
|
101
|
-
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
102
|
-
/**
|
|
103
|
-
* Optionally provide an onClick handler that is called when the underlying
|
|
104
|
-
* button fires it's onclick event
|
|
105
|
-
*/
|
|
106
|
-
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
107
|
-
/**
|
|
108
|
-
* Optionally provide an onKeyDown handler that is called when the underlying
|
|
109
|
-
* button fires it's onkeydown event
|
|
110
|
-
*/
|
|
111
|
-
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
112
|
-
/**
|
|
113
|
-
* Optional component to render instead of string
|
|
114
|
-
*/
|
|
115
|
-
renderMenuContent: PropTypes.Requireable<(...args: any[]) => any>;
|
|
116
|
-
/**
|
|
117
|
-
* Optionally provide a tabIndex for the underlying menu button
|
|
118
|
-
*/
|
|
119
|
-
tabIndex: PropTypes.Requireable<number>;
|
|
120
|
-
};
|
|
121
|
-
static contextType: React.Context<string>;
|
|
122
|
-
_subMenus: React.RefObject<HTMLUListElement | null>;
|
|
123
|
-
private items;
|
|
124
|
-
private menuButtonRef;
|
|
125
|
-
constructor(props: any);
|
|
126
|
-
/**
|
|
127
|
-
* Toggle the expanded state of the menu on click.
|
|
128
|
-
*/
|
|
129
|
-
handleOnClick: (e: any) => void;
|
|
130
|
-
/**
|
|
131
|
-
* Keyboard event handler for the entire menu.
|
|
132
|
-
*/
|
|
133
|
-
handleOnKeyDown: (event: any) => void;
|
|
134
|
-
/**
|
|
135
|
-
* Handle our blur event from our underlying menuitems. Will mostly be used
|
|
136
|
-
* for closing our menu in response to a user clicking off or tabbing out of
|
|
137
|
-
* the menu or menubar.
|
|
138
|
-
*/
|
|
139
|
-
handleOnBlur: (event: any) => void;
|
|
140
|
-
/**
|
|
141
|
-
* ref handler for our menu button. If we are supplied a `focusRef` prop, we also
|
|
142
|
-
* forward along the node.
|
|
143
|
-
*
|
|
144
|
-
* This is useful when this component is a child in a
|
|
145
|
-
* menu or menubar as it will allow the parent to explicitly focus the menu
|
|
146
|
-
* button node when that child should receive focus.
|
|
147
|
-
*/
|
|
148
|
-
handleMenuButtonRef: (node: any) => void;
|
|
149
|
-
/**
|
|
150
|
-
* Handles individual menuitem refs. We assign them to a class instance
|
|
151
|
-
* property so that we can properly manage focus of our children.
|
|
152
|
-
*/
|
|
153
|
-
handleItemRef: (index: any) => (node: any) => void;
|
|
154
|
-
handleMenuClose: (event: any) => void;
|
|
155
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
156
|
-
/**
|
|
157
|
-
* We capture the `ref` for each child inside of `this.items` to properly
|
|
158
|
-
* manage focus. In addition to this focus management, all items receive a
|
|
159
|
-
* `tabIndex: -1` so the user won't hit a large number of items in their tab
|
|
160
|
-
* sequence when they might not want to go through all the items.
|
|
161
|
-
*/
|
|
162
|
-
_renderMenuItem: (item: React.ReactNode, index: number) => React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
61
|
+
children?: ReactNode;
|
|
163
62
|
}
|
|
164
|
-
declare const
|
|
165
|
-
export
|
|
166
|
-
export default HeaderMenuForwardRef;
|
|
63
|
+
export declare const HeaderMenu: React.ForwardRefExoticComponent<HeaderMenuProps & React.RefAttributes<HTMLLIElement>>;
|
|
64
|
+
export default HeaderMenu;
|