@carbon/react 1.82.1 → 1.83.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 +943 -828
- package/es/components/AILabel/index.js +13 -13
- package/es/components/AISkeleton/AISkeletonIcon.js +2 -2
- package/es/components/AISkeleton/AISkeletonPlaceholder.js +2 -2
- package/es/components/AISkeleton/AISkeletonText.js +2 -2
- package/es/components/Accordion/Accordion.Skeleton.js +15 -15
- package/es/components/Accordion/Accordion.js +3 -3
- package/es/components/Accordion/AccordionItem.js +9 -9
- package/es/components/Accordion/AccordionProvider.js +2 -2
- package/es/components/AccordionItem/index.d.ts +9 -0
- package/es/components/AspectRatio/AspectRatio.js +2 -2
- package/es/components/BadgeIndicator/index.js +3 -3
- package/es/components/Breadcrumb/Breadcrumb.Skeleton.js +5 -5
- package/es/components/Breadcrumb/Breadcrumb.js +3 -3
- package/es/components/Breadcrumb/BreadcrumbItem.js +9 -9
- package/es/components/Button/Button.Skeleton.js +3 -3
- package/es/components/Button/Button.js +5 -5
- package/es/components/Button/ButtonBase.js +5 -5
- package/es/components/ButtonSet/ButtonSet.js +2 -2
- package/es/components/ChatButton/ChatButton.Skeleton.js +2 -2
- package/es/components/ChatButton/ChatButton.js +3 -3
- package/es/components/Checkbox/Checkbox.Skeleton.js +4 -4
- package/es/components/Checkbox/Checkbox.js +15 -15
- package/es/components/CheckboxGroup/CheckboxGroup.js +12 -12
- package/es/components/ClassPrefix/index.js +2 -2
- package/es/components/CodeSnippet/CodeSnippet.Skeleton.js +7 -7
- package/es/components/CodeSnippet/CodeSnippet.js +16 -16
- package/es/components/ComboBox/ComboBox.js +18 -18
- package/es/components/ComboButton/index.js +7 -7
- package/es/components/ComposedModal/ComposedModal.js +20 -20
- package/es/components/ComposedModal/ModalFooter.js +8 -8
- package/es/components/ComposedModal/ModalHeader.js +8 -8
- package/es/components/ContainedList/ContainedList.js +7 -7
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +7 -7
- package/es/components/ContentSwitcher/ContentSwitcher.d.ts +8 -0
- package/es/components/ContentSwitcher/ContentSwitcher.js +13 -7
- package/es/components/Copy/Copy.js +2 -2
- package/es/components/CopyButton/CopyButton.js +4 -4
- package/es/components/DangerButton/DangerButton.js +2 -2
- package/es/components/DataTable/DataTable.d.ts +81 -283
- package/es/components/DataTable/DataTable.js +83 -123
- package/es/components/DataTable/Table.d.ts +2 -2
- package/es/components/DataTable/Table.js +4 -4
- package/es/components/DataTable/TableActionList.d.ts +1 -1
- package/es/components/DataTable/TableBatchAction.js +2 -2
- package/es/components/DataTable/TableBatchActions.js +9 -9
- package/es/components/DataTable/TableBody.d.ts +3 -3
- package/es/components/DataTable/TableBody.js +2 -2
- package/es/components/DataTable/TableCell.d.ts +3 -4
- package/es/components/DataTable/TableCell.js +2 -2
- package/es/components/DataTable/TableContainer.d.ts +2 -3
- package/es/components/DataTable/TableContainer.js +6 -6
- package/es/components/DataTable/TableDecoratorRow.js +4 -4
- package/es/components/DataTable/TableExpandHeader.d.ts +2 -3
- package/es/components/DataTable/TableExpandHeader.js +4 -4
- package/es/components/DataTable/TableExpandRow.js +8 -8
- package/es/components/DataTable/TableExpandedRow.d.ts +3 -3
- package/es/components/DataTable/TableExpandedRow.js +4 -4
- package/es/components/DataTable/TableHead.d.ts +1 -1
- package/es/components/DataTable/TableHeader.d.ts +4 -4
- package/es/components/DataTable/TableHeader.js +15 -15
- package/es/components/DataTable/TableRow.d.ts +3 -4
- package/es/components/DataTable/TableRow.js +4 -4
- package/es/components/DataTable/TableSelectAll.js +3 -3
- package/es/components/DataTable/TableSelectRow.js +4 -4
- package/es/components/DataTable/TableSlugRow.js +3 -3
- package/es/components/DataTable/TableToolbar.js +2 -2
- package/es/components/DataTable/TableToolbarAction.js +2 -2
- package/es/components/DataTable/TableToolbarContent.d.ts +1 -1
- package/es/components/DataTable/TableToolbarMenu.js +2 -2
- package/es/components/DataTable/TableToolbarSearch.js +2 -2
- package/es/components/DataTable/index.d.ts +1 -1
- package/es/components/DataTableSkeleton/DataTableSkeleton.js +15 -15
- package/es/components/DatePicker/DatePicker.Skeleton.js +8 -8
- package/es/components/DatePicker/DatePicker.d.ts +1 -1
- package/es/components/DatePicker/DatePicker.js +23 -20
- package/es/components/DatePickerInput/DatePickerInput.d.ts +3 -4
- package/es/components/DatePickerInput/DatePickerInput.js +19 -19
- package/es/components/Dialog/index.d.ts +5 -6
- package/es/components/Dialog/index.js +10 -10
- package/es/components/Dropdown/Dropdown.Skeleton.d.ts +2 -3
- package/es/components/Dropdown/Dropdown.Skeleton.js +4 -4
- package/es/components/Dropdown/Dropdown.d.ts +3 -3
- package/es/components/Dropdown/Dropdown.js +18 -18
- package/es/components/ErrorBoundary/ErrorBoundary.js +2 -2
- package/es/components/ExpandableSearch/ExpandableSearch.js +3 -3
- package/es/components/FeatureFlags/index.js +2 -2
- package/es/components/FileUploader/FileUploader.Skeleton.d.ts +3 -3
- package/es/components/FileUploader/FileUploader.Skeleton.js +5 -5
- package/es/components/FileUploader/FileUploader.d.ts +2 -3
- package/es/components/FileUploader/FileUploader.js +12 -12
- package/es/components/FileUploader/FileUploaderButton.d.ts +3 -4
- package/es/components/FileUploader/FileUploaderButton.js +6 -5
- package/es/components/FileUploader/FileUploaderDropContainer.d.ts +2 -3
- package/es/components/FileUploader/FileUploaderDropContainer.js +5 -5
- package/es/components/FileUploader/FileUploaderItem.d.ts +2 -3
- package/es/components/FileUploader/FileUploaderItem.js +13 -13
- package/es/components/FileUploader/Filename.d.ts +3 -4
- package/es/components/FileUploader/Filename.js +7 -7
- package/es/components/FluidComboBox/FluidComboBox.Skeleton.js +5 -5
- package/es/components/FluidComboBox/FluidComboBox.js +4 -4
- package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.js +11 -11
- package/es/components/FluidDatePicker/FluidDatePicker.js +4 -4
- package/es/components/FluidDatePickerInput/FluidDatePickerInput.js +3 -3
- package/es/components/FluidDropdown/FluidDropdown.Skeleton.js +5 -5
- package/es/components/FluidDropdown/FluidDropdown.js +4 -4
- package/es/components/FluidForm/FluidForm.d.ts +3 -4
- package/es/components/FluidForm/FluidForm.js +3 -3
- package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +5 -5
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +5 -5
- package/es/components/FluidNumberInput/FluidNumberInput.Skeleton.js +5 -5
- package/es/components/FluidNumberInput/FluidNumberInput.js +4 -4
- package/es/components/FluidSearch/FluidSearch.Skeleton.js +5 -5
- package/es/components/FluidSearch/FluidSearch.js +4 -4
- package/es/components/FluidSelect/FluidSelect.Skeleton.js +5 -5
- package/es/components/FluidSelect/FluidSelect.js +4 -4
- package/es/components/FluidTextArea/FluidTextArea.Skeleton.js +5 -5
- package/es/components/FluidTextArea/FluidTextArea.js +3 -3
- package/es/components/FluidTextInput/FluidTextInput.Skeleton.js +5 -5
- package/es/components/FluidTextInput/FluidTextInput.js +5 -5
- package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.js +3 -3
- package/es/components/FluidTimePicker/FluidTimePicker.js +13 -13
- package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +3 -3
- package/es/components/Form/Form.js +2 -2
- package/es/components/FormGroup/FormGroup.d.ts +3 -4
- package/es/components/FormGroup/FormGroup.js +4 -4
- package/es/components/FormItem/FormItem.js +2 -2
- package/es/components/FormLabel/FormLabel.js +2 -2
- package/es/components/Grid/CSSGrid.js +8 -8
- package/es/components/Grid/Column.d.ts +5 -5
- package/es/components/Grid/Column.js +15 -15
- package/es/components/Grid/ColumnHang.js +2 -2
- package/es/components/Grid/FlexGrid.js +4 -4
- package/es/components/Grid/Grid.js +3 -3
- package/es/components/Grid/GridContext.d.ts +2 -2
- package/es/components/Grid/GridContext.js +1 -1
- package/es/components/Grid/Row.js +2 -2
- package/es/components/Heading/index.js +9 -9
- package/es/components/Icon/Icon.Skeleton.js +2 -2
- package/es/components/IconButton/index.js +11 -6
- package/es/components/IconIndicator/index.js +4 -4
- package/es/components/IdPrefix/index.js +2 -2
- package/es/components/InlineCheckbox/InlineCheckbox.js +6 -6
- package/es/components/InlineLoading/InlineLoading.js +10 -10
- package/es/components/Layer/LayerContext.js +2 -2
- package/es/components/Layer/index.d.ts +4 -0
- package/es/components/Layer/index.js +15 -8
- package/es/components/Layout/index.js +5 -5
- package/es/components/LayoutDirection/LayoutDirection.js +4 -4
- package/es/components/LayoutDirection/LayoutDirectionContext.js +2 -2
- package/es/components/LayoutDirection/index.d.ts +8 -0
- package/es/components/Link/Link.js +6 -6
- package/es/components/ListBox/ListBox.d.ts +2 -3
- package/es/components/ListBox/ListBox.js +5 -5
- package/es/components/ListBox/ListBoxField.d.ts +3 -4
- package/es/components/ListBox/ListBoxField.js +2 -2
- package/es/components/ListBox/ListBoxMenu.d.ts +2 -3
- package/es/components/ListBox/ListBoxMenu.js +2 -2
- package/es/components/ListBox/ListBoxMenuIcon.js +4 -4
- package/es/components/ListBox/ListBoxMenuItem.d.ts +2 -3
- package/es/components/ListBox/ListBoxMenuItem.js +3 -3
- package/es/components/ListBox/ListBoxSelection.js +6 -6
- package/es/components/ListBox/next/ListBoxSelection.js +7 -7
- package/es/components/ListBox/next/ListBoxTrigger.js +4 -4
- package/es/components/ListItem/ListItem.js +2 -2
- package/es/components/Loading/Loading.d.ts +3 -3
- package/es/components/Loading/Loading.js +6 -6
- package/es/components/Menu/Menu.js +5 -4
- package/es/components/Menu/MenuItem.js +18 -17
- package/es/components/MenuButton/index.js +4 -4
- package/es/components/Modal/Modal.d.ts +3 -4
- package/es/components/Modal/Modal.js +40 -38
- package/es/components/ModalWrapper/ModalWrapper.js +7 -7
- package/es/components/MultiSelect/FilterableMultiSelect.js +22 -26
- package/es/components/MultiSelect/MultiSelect.js +23 -23
- package/es/components/Notification/Notification.js +41 -41
- package/es/components/NumberInput/NumberInput.Skeleton.js +4 -4
- package/es/components/NumberInput/NumberInput.js +22 -22
- package/es/components/OrderedList/OrderedList.js +2 -2
- package/es/components/OverflowMenu/OverflowMenu.js +7 -7
- package/es/components/OverflowMenu/index.js +3 -3
- package/es/components/OverflowMenu/next/index.js +6 -6
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +4 -4
- package/es/components/OverflowMenuV2/index.js +3 -3
- package/es/components/PageHeader/PageHeader.js +29 -29
- package/es/components/Pagination/Pagination.Skeleton.js +8 -8
- package/es/components/Pagination/Pagination.js +17 -17
- package/es/components/Pagination/experimental/PageSelector.js +3 -3
- package/es/components/Pagination/experimental/Pagination.js +14 -14
- package/es/components/PaginationNav/PaginationNav.js +31 -31
- package/es/components/Popover/index.js +15 -15
- package/es/components/PrimaryButton/PrimaryButton.js +2 -2
- package/es/components/ProgressBar/ProgressBar.js +13 -13
- package/es/components/ProgressIndicator/ProgressIndicator.Skeleton.js +7 -7
- package/es/components/ProgressIndicator/ProgressIndicator.js +20 -20
- package/es/components/RadioButton/RadioButton.Skeleton.js +4 -4
- package/es/components/RadioButton/RadioButton.js +10 -10
- package/es/components/RadioButtonGroup/RadioButtonGroup.js +16 -16
- package/es/components/RadioTile/RadioTile.js +12 -12
- package/es/components/Search/Search.Skeleton.js +4 -4
- package/es/components/Search/Search.js +11 -11
- package/es/components/SecondaryButton/SecondaryButton.js +2 -2
- package/es/components/Select/Select.Skeleton.js +5 -5
- package/es/components/Select/Select.js +19 -19
- package/es/components/SelectItem/SelectItem.js +2 -2
- package/es/components/SelectItemGroup/SelectItemGroup.js +2 -2
- package/es/components/ShapeIndicator/index.js +7 -7
- package/es/components/SkeletonIcon/SkeletonIcon.d.ts +0 -4
- package/es/components/SkeletonIcon/SkeletonIcon.js +3 -7
- package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +2 -2
- package/es/components/SkeletonText/SkeletonText.js +4 -4
- package/es/components/Slider/Slider.Skeleton.js +17 -17
- package/es/components/Slider/Slider.d.ts +8 -0
- package/es/components/Slider/Slider.js +44 -38
- package/es/components/Slider/SliderHandles.js +19 -19
- package/es/components/Stack/HStack.js +2 -2
- package/es/components/Stack/Stack.js +2 -2
- package/es/components/Stack/VStack.js +2 -2
- package/es/components/StructuredList/StructuredList.Skeleton.js +12 -12
- package/es/components/StructuredList/StructuredList.js +24 -24
- package/es/components/Switch/IconSwitch.js +3 -3
- package/es/components/Switch/Switch.js +4 -4
- package/es/components/TabContent/TabContent.js +2 -2
- package/es/components/Tabs/Tabs.Skeleton.js +7 -7
- package/es/components/Tabs/Tabs.js +65 -62
- package/es/components/Tag/DismissibleTag.d.ts +4 -0
- package/es/components/Tag/DismissibleTag.js +18 -13
- package/es/components/Tag/OperationalTag.js +6 -6
- package/es/components/Tag/SelectableTag.d.ts +4 -0
- package/es/components/Tag/SelectableTag.js +18 -9
- package/es/components/Tag/Tag.Skeleton.js +2 -2
- package/es/components/Tag/Tag.js +15 -15
- package/es/components/Text/Text.js +4 -4
- package/es/components/Text/TextDirection.js +2 -2
- package/es/components/Text/createTextComponent.js +2 -2
- package/es/components/TextArea/TextArea.Skeleton.js +4 -4
- package/es/components/TextArea/TextArea.js +19 -19
- package/es/components/TextInput/ControlledPasswordInput.d.ts +2 -3
- package/es/components/TextInput/ControlledPasswordInput.js +13 -13
- package/es/components/TextInput/PasswordInput.js +15 -15
- package/es/components/TextInput/TextInput.Skeleton.js +4 -4
- package/es/components/TextInput/TextInput.js +17 -17
- package/es/components/Theme/index.js +10 -10
- package/es/components/Tile/Tile.js +36 -36
- package/es/components/TileGroup/TileGroup.d.ts +3 -4
- package/es/components/TileGroup/TileGroup.js +8 -8
- package/es/components/TimePicker/TimePicker.d.ts +2 -3
- package/es/components/TimePicker/TimePicker.js +14 -14
- package/es/components/TimePickerSelect/TimePickerSelect.js +4 -4
- package/es/components/Toggle/Toggle.Skeleton.js +4 -4
- package/es/components/Toggle/Toggle.js +10 -10
- package/es/components/ToggleSmall/ToggleSmall.Skeleton.js +8 -8
- package/es/components/Toggletip/index.js +12 -12
- package/es/components/Tooltip/DefinitionTooltip.js +4 -4
- package/es/components/Tooltip/Tooltip.d.ts +3 -0
- package/es/components/Tooltip/Tooltip.js +25 -13
- package/es/components/TreeView/TreeNode.js +45 -36
- package/es/components/TreeView/TreeView.js +30 -21
- package/es/components/UIShell/Content.js +2 -2
- package/es/components/UIShell/Header.js +2 -2
- package/es/components/UIShell/HeaderContainer.js +2 -2
- package/es/components/UIShell/HeaderGlobalAction.js +3 -3
- package/es/components/UIShell/HeaderGlobalBar.d.ts +1 -1
- package/es/components/UIShell/HeaderMenu.js +14 -14
- package/es/components/UIShell/HeaderMenuButton.js +4 -4
- package/es/components/UIShell/HeaderMenuItem.js +11 -9
- package/es/components/UIShell/HeaderName.js +3 -3
- package/es/components/UIShell/HeaderNavigation.js +3 -3
- package/es/components/UIShell/HeaderPanel.js +3 -3
- package/es/components/UIShell/HeaderSideNavItems.js +2 -2
- package/es/components/UIShell/Link.js +3 -3
- package/es/components/UIShell/SideNav.js +7 -7
- package/es/components/UIShell/SideNavDetails.js +3 -3
- package/es/components/UIShell/SideNavDivider.js +3 -3
- package/es/components/UIShell/SideNavFooter.js +7 -7
- package/es/components/UIShell/SideNavHeader.js +3 -3
- package/es/components/UIShell/SideNavIcon.js +2 -2
- package/es/components/UIShell/SideNavItem.js +2 -2
- package/es/components/UIShell/SideNavItems.js +5 -5
- package/es/components/UIShell/SideNavLink.js +5 -5
- package/es/components/UIShell/SideNavLinkText.js +2 -2
- package/es/components/UIShell/SideNavMenu.js +10 -10
- package/es/components/UIShell/SideNavMenuItem.js +5 -5
- package/es/components/UIShell/SideNavSwitcher.js +8 -8
- package/es/components/UIShell/SkipToContent.js +2 -2
- package/es/components/UIShell/Switcher.js +9 -9
- package/es/components/UIShell/SwitcherDivider.js +2 -2
- package/es/components/UIShell/SwitcherItem.js +3 -3
- package/es/components/UnorderedList/UnorderedList.js +2 -2
- package/es/feature-flags.d.ts +7 -0
- package/es/index.js +25 -26
- package/es/internal/FloatingMenu.js +4 -4
- package/es/internal/__mocks__/mockHTMLElement.d.ts +9 -0
- package/es/internal/createClassWrapper.js +2 -2
- package/es/internal/debounce.d.ts +8 -0
- package/es/internal/environment.d.ts +12 -0
- package/es/internal/useId.js +2 -2
- package/es/internal/useIdPrefix.js +3 -3
- package/es/internal/useNormalizedInputProps.js +3 -3
- package/es/internal/usePrefix.js +3 -3
- package/es/internal/usePreviousValue.d.ts +17 -0
- package/es/internal/usePreviousValue.js +28 -0
- package/es/internal/useResizeObserver.d.ts +14 -0
- package/es/internal/useResizeObserver.js +74 -0
- package/es/internal/wrapFocus.js +3 -6
- package/es/prop-types/AriaPropTypes.d.ts +8 -0
- package/es/tools/wrapComponent.d.ts +3 -4
- package/es/tools/wrapComponent.js +2 -2
- package/es/types/common.d.ts +0 -2
- package/lib/components/AccordionItem/index.d.ts +9 -0
- package/lib/components/CodeSnippet/CodeSnippet.js +2 -3
- package/lib/components/ContentSwitcher/ContentSwitcher.d.ts +8 -0
- package/lib/components/ContentSwitcher/ContentSwitcher.js +7 -1
- package/lib/components/DataTable/DataTable.d.ts +81 -283
- package/lib/components/DataTable/DataTable.js +82 -123
- package/lib/components/DataTable/Table.d.ts +2 -2
- package/lib/components/DataTable/TableActionList.d.ts +1 -1
- package/lib/components/DataTable/TableBody.d.ts +3 -3
- package/lib/components/DataTable/TableCell.d.ts +3 -4
- package/lib/components/DataTable/TableContainer.d.ts +2 -3
- package/lib/components/DataTable/TableExpandHeader.d.ts +2 -3
- package/lib/components/DataTable/TableExpandedRow.d.ts +3 -3
- package/lib/components/DataTable/TableHead.d.ts +1 -1
- package/lib/components/DataTable/TableHeader.d.ts +4 -4
- package/lib/components/DataTable/TableRow.d.ts +3 -4
- package/lib/components/DataTable/TableToolbarContent.d.ts +1 -1
- package/lib/components/DataTable/index.d.ts +1 -1
- package/lib/components/DatePicker/DatePicker.d.ts +1 -1
- package/lib/components/DatePicker/DatePicker.js +6 -3
- package/lib/components/DatePickerInput/DatePickerInput.d.ts +3 -4
- package/lib/components/Dialog/index.d.ts +5 -6
- package/lib/components/Dropdown/Dropdown.Skeleton.d.ts +2 -3
- package/lib/components/Dropdown/Dropdown.d.ts +3 -3
- package/lib/components/FileUploader/FileUploader.Skeleton.d.ts +3 -3
- package/lib/components/FileUploader/FileUploader.d.ts +2 -3
- package/lib/components/FileUploader/FileUploaderButton.d.ts +3 -4
- package/lib/components/FileUploader/FileUploaderButton.js +3 -2
- package/lib/components/FileUploader/FileUploaderDropContainer.d.ts +2 -3
- package/lib/components/FileUploader/FileUploaderItem.d.ts +2 -3
- package/lib/components/FileUploader/Filename.d.ts +3 -4
- package/lib/components/FluidForm/FluidForm.d.ts +3 -4
- package/lib/components/FormGroup/FormGroup.d.ts +3 -4
- package/lib/components/Grid/Column.d.ts +5 -5
- package/lib/components/Grid/Column.js +10 -10
- package/lib/components/Grid/GridContext.d.ts +2 -2
- package/lib/components/Grid/GridContext.js +5 -23
- package/lib/components/IconButton/index.js +6 -1
- package/lib/components/Layer/index.d.ts +4 -0
- package/lib/components/Layer/index.js +9 -2
- package/lib/components/LayoutDirection/index.d.ts +8 -0
- package/lib/components/Link/Link.js +1 -1
- package/lib/components/ListBox/ListBox.d.ts +2 -3
- package/lib/components/ListBox/ListBoxField.d.ts +3 -4
- package/lib/components/ListBox/ListBoxMenu.d.ts +2 -3
- package/lib/components/ListBox/ListBoxMenuItem.d.ts +2 -3
- package/lib/components/Loading/Loading.d.ts +3 -3
- package/lib/components/Menu/Menu.js +2 -1
- package/lib/components/Menu/MenuItem.js +2 -1
- package/lib/components/Modal/Modal.d.ts +3 -4
- package/lib/components/Modal/Modal.js +5 -3
- package/lib/components/MultiSelect/FilterableMultiSelect.js +1 -5
- package/lib/components/SkeletonIcon/SkeletonIcon.d.ts +0 -4
- package/lib/components/SkeletonIcon/SkeletonIcon.js +1 -5
- package/lib/components/Slider/Slider.d.ts +8 -0
- package/lib/components/Slider/Slider.js +6 -0
- package/lib/components/Tabs/Tabs.js +5 -2
- package/lib/components/Tag/DismissibleTag.d.ts +4 -0
- package/lib/components/Tag/DismissibleTag.js +8 -3
- package/lib/components/Tag/SelectableTag.d.ts +4 -0
- package/lib/components/Tag/SelectableTag.js +12 -3
- package/lib/components/TextInput/ControlledPasswordInput.d.ts +2 -3
- package/lib/components/TileGroup/TileGroup.d.ts +3 -4
- package/lib/components/TimePicker/TimePicker.d.ts +2 -3
- package/lib/components/Tooltip/Tooltip.d.ts +3 -0
- package/lib/components/Tooltip/Tooltip.js +18 -6
- package/lib/components/TreeView/TreeNode.js +20 -11
- package/lib/components/TreeView/TreeView.js +27 -18
- package/lib/components/UIShell/HeaderGlobalBar.d.ts +1 -1
- package/lib/components/UIShell/HeaderMenuItem.js +7 -5
- package/lib/components/UIShell/Switcher.js +3 -3
- package/lib/feature-flags.d.ts +7 -0
- package/lib/index.js +50 -51
- package/lib/internal/__mocks__/mockHTMLElement.d.ts +9 -0
- package/lib/internal/debounce.d.ts +8 -0
- package/lib/internal/environment.d.ts +12 -0
- package/lib/internal/usePreviousValue.d.ts +17 -0
- package/lib/internal/usePreviousValue.js +32 -0
- package/lib/internal/useResizeObserver.d.ts +14 -0
- package/lib/internal/useResizeObserver.js +78 -0
- package/lib/internal/wrapFocus.js +3 -6
- package/lib/prop-types/AriaPropTypes.d.ts +8 -0
- package/lib/tools/wrapComponent.d.ts +3 -4
- package/lib/types/common.d.ts +0 -2
- package/package.json +5 -6
- package/scss/components/content-switcher/_tokens.scss +9 -0
- package/telemetry.yml +5 -1
- package/es/components/DataTable/index.js +0 -76
- package/es/prop-types/tools/getDisplayName.js +0 -34
- package/es/prop-types/types.js +0 -13
- package/lib/components/DataTable/index.js +0 -82
- package/lib/prop-types/tools/getDisplayName.js +0 -38
- package/lib/prop-types/types.js +0 -17
|
@@ -4,10 +4,9 @@
|
|
|
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 from 'react';
|
|
7
|
+
import React, { type HTMLAttributes } from 'react';
|
|
8
8
|
import { type ListBoxSize } from '../ListBox';
|
|
9
|
-
|
|
10
|
-
export interface DropdownSkeletonProps extends ReactAttr<HTMLDivElement> {
|
|
9
|
+
export interface DropdownSkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
11
10
|
/**
|
|
12
11
|
* Specify an optional className to add.
|
|
13
12
|
*/
|
|
@@ -4,15 +4,15 @@
|
|
|
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, {
|
|
7
|
+
import React, { Ref, type HTMLAttributes, type ReactNode } from 'react';
|
|
8
8
|
import { UseSelectProps } from 'downshift';
|
|
9
9
|
import { type ListBoxMenuIconTranslationKey, type ListBoxSize, type ListBoxType } from '../ListBox';
|
|
10
|
-
import { TranslateWithId
|
|
10
|
+
import { TranslateWithId } from '../../types/common';
|
|
11
11
|
type ExcludedAttributes = 'id' | 'onChange';
|
|
12
12
|
export interface OnChangeData<ItemType> {
|
|
13
13
|
selectedItem: ItemType | null;
|
|
14
14
|
}
|
|
15
|
-
export interface DropdownProps<ItemType> extends Omit<
|
|
15
|
+
export interface DropdownProps<ItemType> extends Omit<HTMLAttributes<HTMLDivElement>, ExcludedAttributes>, TranslateWithId<ListBoxMenuIconTranslationKey> {
|
|
16
16
|
/**
|
|
17
17
|
* Specify a label to be read by screen readers on the container node
|
|
18
18
|
* 'aria-label' of the ListBox component.
|
|
@@ -1,12 +1,12 @@
|
|
|
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
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import {
|
|
9
|
-
export interface FileUploaderSkeletonProps extends
|
|
8
|
+
import { type HTMLAttributes } from 'react';
|
|
9
|
+
export interface FileUploaderSkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
10
10
|
/**
|
|
11
11
|
* Specify an optional className to add.
|
|
12
12
|
*/
|
|
@@ -4,9 +4,8 @@
|
|
|
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 from 'react';
|
|
8
|
-
|
|
9
|
-
export interface FileUploaderProps extends ReactAttr<HTMLSpanElement> {
|
|
7
|
+
import React, { type HTMLAttributes } from 'react';
|
|
8
|
+
export interface FileUploaderProps extends HTMLAttributes<HTMLSpanElement> {
|
|
10
9
|
/**
|
|
11
10
|
* Specify the types of files that this input should be able to receive
|
|
12
11
|
*/
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import React from 'react';
|
|
9
|
-
|
|
10
|
-
export interface FileUploaderButtonProps extends Omit<ReactAttr<HTMLButtonElement>, 'onChange' | 'tabIndex'> {
|
|
8
|
+
import React, { type HTMLAttributes } from 'react';
|
|
9
|
+
export interface FileUploaderButtonProps extends Omit<HTMLAttributes<HTMLButtonElement>, 'onChange' | 'tabIndex'> {
|
|
11
10
|
/**
|
|
12
11
|
* Specify the types of files that this input should be able to receive
|
|
13
12
|
*/
|
|
@@ -81,7 +80,7 @@ declare namespace FileUploaderButton {
|
|
|
81
80
|
/**
|
|
82
81
|
* Specify the type of underlying button
|
|
83
82
|
*/
|
|
84
|
-
buttonKind: PropTypes.Requireable<
|
|
83
|
+
buttonKind: PropTypes.Requireable<"primary" | "secondary" | "danger" | "ghost" | "danger--primary" | "danger--ghost" | "danger--tertiary" | "tertiary">;
|
|
85
84
|
/**
|
|
86
85
|
* Provide a custom className to be applied to the container node
|
|
87
86
|
*/
|
|
@@ -15,11 +15,12 @@ var PropTypes = require('prop-types');
|
|
|
15
15
|
var React = require('react');
|
|
16
16
|
var keys = require('../../internal/keyboard/keys.js');
|
|
17
17
|
var match = require('../../internal/keyboard/match.js');
|
|
18
|
-
var types = require('../../prop-types/types.js');
|
|
19
18
|
var uniqueId = require('../../tools/uniqueId.js');
|
|
20
19
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
21
20
|
var deprecate = require('../../prop-types/deprecate.js');
|
|
22
21
|
var noopFn = require('../../internal/noopFn.js');
|
|
22
|
+
var Button = require('../Button/Button.js');
|
|
23
|
+
require('../Button/Button.Skeleton.js');
|
|
23
24
|
|
|
24
25
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
25
26
|
|
|
@@ -123,7 +124,7 @@ FileUploaderButton.propTypes = {
|
|
|
123
124
|
/**
|
|
124
125
|
* Specify the type of underlying button
|
|
125
126
|
*/
|
|
126
|
-
buttonKind: PropTypes__default["default"].oneOf(
|
|
127
|
+
buttonKind: PropTypes__default["default"].oneOf(Button.ButtonKinds),
|
|
127
128
|
/**
|
|
128
129
|
* Provide a custom className to be applied to the container node
|
|
129
130
|
*/
|
|
@@ -4,10 +4,9 @@
|
|
|
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 from 'react';
|
|
7
|
+
import React, { type HTMLAttributes } from 'react';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
|
-
|
|
10
|
-
export interface FileUploaderDropContainerProps extends Omit<ReactAttr<HTMLButtonElement>, 'tabIndex'> {
|
|
9
|
+
export interface FileUploaderDropContainerProps extends Omit<HTMLAttributes<HTMLButtonElement>, 'tabIndex'> {
|
|
11
10
|
/**
|
|
12
11
|
* Specify the types of files that this input should be able to receive
|
|
13
12
|
*/
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import React from 'react';
|
|
9
|
-
|
|
10
|
-
export interface FileUploaderItemProps extends ReactAttr<HTMLSpanElement> {
|
|
8
|
+
import React, { type HTMLAttributes } from 'react';
|
|
9
|
+
export interface FileUploaderItemProps extends HTMLAttributes<HTMLSpanElement> {
|
|
11
10
|
/**
|
|
12
11
|
* Error message body for an invalid file upload
|
|
13
12
|
*/
|
|
@@ -1,15 +1,14 @@
|
|
|
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
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import React from 'react';
|
|
9
|
-
import { ReactAttr } from '../../types/common';
|
|
8
|
+
import React, { type HTMLAttributes } from 'react';
|
|
10
9
|
export type FilenameStatus = 'edit' | 'complete' | 'uploading';
|
|
11
10
|
type SVGAttr = React.SVGAttributes<React.ReactSVGElement>;
|
|
12
|
-
export interface FilenameProps extends Omit<
|
|
11
|
+
export interface FilenameProps extends Omit<HTMLAttributes<HTMLElement> & SVGAttr, 'tabIndex' | 'type'> {
|
|
13
12
|
/**
|
|
14
13
|
* Specify an id that describes the error to be read by screen readers when the filename is invalid
|
|
15
14
|
*/
|
|
@@ -1,11 +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 from 'react';
|
|
8
|
-
|
|
9
|
-
export type FluidFormProps = ReactAttr<HTMLFormElement>;
|
|
7
|
+
import React, { type HTMLAttributes } from 'react';
|
|
8
|
+
export type FluidFormProps = HTMLAttributes<HTMLFormElement>;
|
|
10
9
|
declare const FluidForm: React.FC<FluidFormProps>;
|
|
11
10
|
export default FluidForm;
|
|
@@ -1,13 +1,12 @@
|
|
|
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
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import React from 'react';
|
|
9
|
-
|
|
10
|
-
export interface FormGroupProps extends ReactAttr<HTMLFieldSetElement> {
|
|
8
|
+
import React, { type HTMLAttributes } from 'react';
|
|
9
|
+
export interface FormGroupProps extends HTMLAttributes<HTMLFieldSetElement> {
|
|
11
10
|
/**
|
|
12
11
|
* Provide the children form elements to be rendered inside of the <fieldset>
|
|
13
12
|
*/
|
|
@@ -28,35 +28,35 @@ export interface ColumnBaseProps {
|
|
|
28
28
|
* Specify column span for the `lg` breakpoint (Default breakpoint up to 1312px)
|
|
29
29
|
* This breakpoint supports 16 columns by default.
|
|
30
30
|
*
|
|
31
|
-
* @see https://
|
|
31
|
+
* @see https://carbondesignsystem.com/elements/2x-grid/overview/#breakpoints
|
|
32
32
|
*/
|
|
33
33
|
lg?: ColumnSpan;
|
|
34
34
|
/**
|
|
35
35
|
* Specify column span for the `max` breakpoint. This breakpoint supports 16
|
|
36
36
|
* columns by default.
|
|
37
37
|
*
|
|
38
|
-
* @see https://
|
|
38
|
+
* @see https://carbondesignsystem.com/elements/2x-grid/overview/#breakpoints
|
|
39
39
|
*/
|
|
40
40
|
max?: ColumnSpan;
|
|
41
41
|
/**
|
|
42
42
|
* Specify column span for the `md` breakpoint (Default breakpoint up to 1056px)
|
|
43
43
|
* This breakpoint supports 8 columns by default.
|
|
44
44
|
*
|
|
45
|
-
* @see https://
|
|
45
|
+
* @see https://carbondesignsystem.com/elements/2x-grid/overview/#breakpoints
|
|
46
46
|
*/
|
|
47
47
|
md?: ColumnSpan;
|
|
48
48
|
/**
|
|
49
49
|
* Specify column span for the `sm` breakpoint (Default breakpoint up to 672px)
|
|
50
50
|
* This breakpoint supports 4 columns by default.
|
|
51
51
|
*
|
|
52
|
-
* @see https://
|
|
52
|
+
* @see https://carbondesignsystem.com/elements/2x-grid/overview/#breakpoints
|
|
53
53
|
*/
|
|
54
54
|
sm?: ColumnSpan;
|
|
55
55
|
/**
|
|
56
56
|
* Specify column span for the `xlg` breakpoint (Default breakpoint up to
|
|
57
57
|
* 1584px) This breakpoint supports 16 columns by default.
|
|
58
58
|
*
|
|
59
|
-
* @see https://
|
|
59
|
+
* @see https://carbondesignsystem.com/elements/2x-grid/overview/#breakpoints
|
|
60
60
|
*/
|
|
61
61
|
xlg?: ColumnSpan;
|
|
62
62
|
/**
|
|
@@ -106,28 +106,28 @@ Column.propTypes = {
|
|
|
106
106
|
* Specify column span for the `lg` breakpoint (Default breakpoint up to 1312px)
|
|
107
107
|
* This breakpoint supports 16 columns by default.
|
|
108
108
|
*
|
|
109
|
-
* @see https://
|
|
109
|
+
* @see https://carbondesignsystem.com/elements/2x-grid/overview/#breakpoints
|
|
110
110
|
*/
|
|
111
111
|
lg: spanPropType,
|
|
112
112
|
/**
|
|
113
113
|
* Specify column span for the `max` breakpoint. This breakpoint supports 16
|
|
114
114
|
* columns by default.
|
|
115
115
|
*
|
|
116
|
-
* @see https://
|
|
116
|
+
* @see https://carbondesignsystem.com/elements/2x-grid/overview/#breakpoints
|
|
117
117
|
*/
|
|
118
118
|
max: spanPropType,
|
|
119
119
|
/**
|
|
120
120
|
* Specify column span for the `md` breakpoint (Default breakpoint up to 1056px)
|
|
121
121
|
* This breakpoint supports 8 columns by default.
|
|
122
122
|
*
|
|
123
|
-
* @see https://
|
|
123
|
+
* @see https://carbondesignsystem.com/elements/2x-grid/overview/#breakpoints
|
|
124
124
|
*/
|
|
125
125
|
md: spanPropType,
|
|
126
126
|
/**
|
|
127
127
|
* Specify column span for the `sm` breakpoint (Default breakpoint up to 672px)
|
|
128
128
|
* This breakpoint supports 4 columns by default.
|
|
129
129
|
*
|
|
130
|
-
* @see https://
|
|
130
|
+
* @see https://carbondesignsystem.com/elements/2x-grid/overview/#breakpoints
|
|
131
131
|
*/
|
|
132
132
|
sm: spanPropType,
|
|
133
133
|
/**
|
|
@@ -139,7 +139,7 @@ Column.propTypes = {
|
|
|
139
139
|
* Specify column span for the `xlg` breakpoint (Default breakpoint up to
|
|
140
140
|
* 1584px) This breakpoint supports 16 columns by default.
|
|
141
141
|
*
|
|
142
|
-
* @see https://
|
|
142
|
+
* @see https://carbondesignsystem.com/elements/2x-grid/overview/#breakpoints
|
|
143
143
|
*/
|
|
144
144
|
xlg: spanPropType
|
|
145
145
|
};
|
|
@@ -183,28 +183,28 @@ CSSGridColumn.propTypes = {
|
|
|
183
183
|
* Specify column span for the `lg` breakpoint (Default breakpoint up to 1312px)
|
|
184
184
|
* This breakpoint supports 16 columns by default.
|
|
185
185
|
*
|
|
186
|
-
* @see https://
|
|
186
|
+
* @see https://carbondesignsystem.com/elements/2x-grid/overview/#breakpoints
|
|
187
187
|
*/
|
|
188
188
|
lg: spanPropType,
|
|
189
189
|
/**
|
|
190
190
|
* Specify column span for the `max` breakpoint. This breakpoint supports 16
|
|
191
191
|
* columns by default.
|
|
192
192
|
*
|
|
193
|
-
* @see https://
|
|
193
|
+
* @see https://carbondesignsystem.com/elements/2x-grid/overview/#breakpoints
|
|
194
194
|
*/
|
|
195
195
|
max: spanPropType,
|
|
196
196
|
/**
|
|
197
197
|
* Specify column span for the `md` breakpoint (Default breakpoint up to 1056px)
|
|
198
198
|
* This breakpoint supports 8 columns by default.
|
|
199
199
|
*
|
|
200
|
-
* @see https://
|
|
200
|
+
* @see https://carbondesignsystem.com/elements/2x-grid/overview/#breakpoints
|
|
201
201
|
*/
|
|
202
202
|
md: spanPropType,
|
|
203
203
|
/**
|
|
204
204
|
* Specify column span for the `sm` breakpoint (Default breakpoint up to 672px)
|
|
205
205
|
* This breakpoint supports 4 columns by default.
|
|
206
206
|
*
|
|
207
|
-
* @see https://
|
|
207
|
+
* @see https://carbondesignsystem.com/elements/2x-grid/overview/#breakpoints
|
|
208
208
|
*/
|
|
209
209
|
sm: spanPropType,
|
|
210
210
|
/**
|
|
@@ -220,7 +220,7 @@ CSSGridColumn.propTypes = {
|
|
|
220
220
|
* Specify column span for the `xlg` breakpoint (Default breakpoint up to
|
|
221
221
|
* 1584px) This breakpoint supports 16 columns by default.
|
|
222
222
|
*
|
|
223
|
-
* @see https://
|
|
223
|
+
* @see https://carbondesignsystem.com/elements/2x-grid/overview/#breakpoints
|
|
224
224
|
*/
|
|
225
225
|
xlg: spanPropType
|
|
226
226
|
};
|
|
@@ -1,10 +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
|
|
7
|
+
import React from 'react';
|
|
8
8
|
export type GridMode = 'flexbox' | 'css-grid';
|
|
9
9
|
export interface GridSettingContext {
|
|
10
10
|
/**
|
|
@@ -14,32 +14,14 @@ var React = require('react');
|
|
|
14
14
|
|
|
15
15
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
16
16
|
|
|
17
|
-
function _interopNamespace(e) {
|
|
18
|
-
if (e && e.__esModule) return e;
|
|
19
|
-
var n = Object.create(null);
|
|
20
|
-
if (e) {
|
|
21
|
-
Object.keys(e).forEach(function (k) {
|
|
22
|
-
if (k !== 'default') {
|
|
23
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
24
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () { return e[k]; }
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
n["default"] = e;
|
|
32
|
-
return Object.freeze(n);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
17
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
36
|
-
var
|
|
18
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
37
19
|
|
|
38
20
|
/**
|
|
39
21
|
* Provides a grid context for communication the grid "mode" (flexbox or
|
|
40
22
|
* css-grid) along with subgrid information.
|
|
41
23
|
*/
|
|
42
|
-
const GridSettingsContext = /*#__PURE__*/
|
|
24
|
+
const GridSettingsContext = /*#__PURE__*/React__default["default"].createContext({
|
|
43
25
|
mode: 'flexbox',
|
|
44
26
|
subgrid: false
|
|
45
27
|
});
|
|
@@ -49,13 +31,13 @@ const GridSettings = _ref => {
|
|
|
49
31
|
mode,
|
|
50
32
|
subgrid = false
|
|
51
33
|
} = _ref;
|
|
52
|
-
const value =
|
|
34
|
+
const value = React__default["default"].useMemo(() => {
|
|
53
35
|
return {
|
|
54
36
|
mode,
|
|
55
37
|
subgrid
|
|
56
38
|
};
|
|
57
39
|
}, [mode, subgrid]);
|
|
58
|
-
return /*#__PURE__*/
|
|
40
|
+
return /*#__PURE__*/React__default["default"].createElement(GridSettingsContext.Provider, {
|
|
59
41
|
value: value
|
|
60
42
|
}, children);
|
|
61
43
|
};
|
|
@@ -80,7 +62,7 @@ GridSettings.propTypes = {
|
|
|
80
62
|
* Helper function for accessing the GridContext value
|
|
81
63
|
*/
|
|
82
64
|
const useGridSettings = () => {
|
|
83
|
-
return
|
|
65
|
+
return React__default["default"].useContext(GridSettingsContext);
|
|
84
66
|
};
|
|
85
67
|
|
|
86
68
|
exports.GridSettings = GridSettings;
|
|
@@ -77,7 +77,7 @@ const IconButton = /*#__PURE__*/React__default["default"].forwardRef(function Ic
|
|
|
77
77
|
isSelected: isSelected,
|
|
78
78
|
hasIconOnly: true,
|
|
79
79
|
className: className,
|
|
80
|
-
"aria-describedby": badgeCount && badgeId
|
|
80
|
+
"aria-describedby": rest['aria-describedby'] || badgeCount && badgeId
|
|
81
81
|
}), children, !disabled && badgeCount !== undefined && /*#__PURE__*/React__default["default"].createElement(index.BadgeIndicator, {
|
|
82
82
|
id: badgeId,
|
|
83
83
|
count: badgeCount > 0 ? badgeCount : undefined
|
|
@@ -165,8 +165,13 @@ IconButton.propTypes = {
|
|
|
165
165
|
/**
|
|
166
166
|
* Provide the label to be rendered inside of the Tooltip. The label will use
|
|
167
167
|
* `aria-labelledby` and will fully describe the child node that is provided.
|
|
168
|
+
* If the child node already has an `aria-label`, the tooltip will not apply
|
|
169
|
+
* `aria-labelledby`. If the child node has `aria-labelledby`, that value will
|
|
170
|
+
* be used instead. Otherwise, the tooltip will use its own ID as the label.
|
|
168
171
|
* This means that if you have text in the child node it will not be
|
|
169
172
|
* announced to the screen reader.
|
|
173
|
+
* If using `badgeCount={0}`, make sure the label explains that there is a
|
|
174
|
+
* new notification.
|
|
170
175
|
*/
|
|
171
176
|
label: PropTypes__default["default"].node.isRequired,
|
|
172
177
|
/**
|
|
@@ -29,6 +29,10 @@ export interface LayerBaseProps {
|
|
|
29
29
|
* Specify the layer level and override any existing levels based on hierarchy
|
|
30
30
|
*/
|
|
31
31
|
level?: LayerLevel;
|
|
32
|
+
/**
|
|
33
|
+
* Applies a css background-color set to $layer-background
|
|
34
|
+
*/
|
|
35
|
+
withBackground?: boolean;
|
|
32
36
|
}
|
|
33
37
|
export type LayerProps<T extends React.ElementType> = PolymorphicComponentPropWithRef<T, LayerBaseProps>;
|
|
34
38
|
declare const Layer: React.ForwardRefExoticComponent<LayerBaseProps & {
|
|
@@ -41,12 +41,15 @@ const Layer = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
|
41
41
|
className: customClassName,
|
|
42
42
|
children,
|
|
43
43
|
level: overrideLevel,
|
|
44
|
+
withBackground = false,
|
|
44
45
|
...rest
|
|
45
46
|
} = _ref;
|
|
46
47
|
const contextLevel = React__default["default"].useContext(LayerContext.LayerContext);
|
|
47
48
|
const level = overrideLevel ?? contextLevel;
|
|
48
49
|
const prefix = usePrefix.usePrefix();
|
|
49
|
-
const className = cx__default["default"](`${prefix}--layer-${LayerLevel.levels[level]}`,
|
|
50
|
+
const className = cx__default["default"](`${prefix}--layer-${LayerLevel.levels[level]}`, {
|
|
51
|
+
[`${prefix}--layer__with-background`]: withBackground
|
|
52
|
+
}, customClassName);
|
|
50
53
|
// The level should be between MIN_LEVEL and MAX_LEVEL
|
|
51
54
|
const value = clamp.clamp(level + 1, LayerLevel.MIN_LEVEL, LayerLevel.MAX_LEVEL);
|
|
52
55
|
const BaseComponent = as || 'div';
|
|
@@ -77,7 +80,11 @@ Layer.propTypes = {
|
|
|
77
80
|
/**
|
|
78
81
|
* Specify the layer level and override any existing levels based on hierarchy
|
|
79
82
|
*/
|
|
80
|
-
level: PropTypes__default["default"].oneOf([0, 1, 2])
|
|
83
|
+
level: PropTypes__default["default"].oneOf([0, 1, 2]),
|
|
84
|
+
/**
|
|
85
|
+
* Applies a css background-color set to $layer-background
|
|
86
|
+
*/
|
|
87
|
+
withBackground: PropTypes__default["default"].bool
|
|
81
88
|
};
|
|
82
89
|
|
|
83
90
|
exports.Layer = Layer;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
export { LayoutDirection } from './LayoutDirection';
|
|
8
|
+
export { useLayoutDirection } from './useLayoutDirection';
|
|
@@ -45,7 +45,7 @@ const LinkBase = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
45
45
|
});
|
|
46
46
|
const rel = target === '_blank' ? 'noopener' : undefined;
|
|
47
47
|
const linkProps = {
|
|
48
|
-
className
|
|
48
|
+
className,
|
|
49
49
|
rel,
|
|
50
50
|
target
|
|
51
51
|
};
|
|
@@ -4,11 +4,10 @@
|
|
|
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 from 'react';
|
|
7
|
+
import React, { type HTMLAttributes } from 'react';
|
|
8
8
|
import { type ListBoxSize, type ListBoxType } from '.';
|
|
9
|
-
import { ReactAttr } from '../../types/common';
|
|
10
9
|
type ExcludedAttributes = 'onKeyDown' | 'onKeyPress' | 'ref';
|
|
11
|
-
export interface ListBoxProps extends Omit<
|
|
10
|
+
export interface ListBoxProps extends Omit<HTMLAttributes<HTMLDivElement>, ExcludedAttributes> {
|
|
12
11
|
/**
|
|
13
12
|
* Specify whether the ListBox is currently disabled
|
|
14
13
|
*/
|
|
@@ -1,13 +1,12 @@
|
|
|
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 from 'react';
|
|
8
|
-
import { ReactAttr } from '../../types/common';
|
|
7
|
+
import React, { type HTMLAttributes } from 'react';
|
|
9
8
|
export declare const translationIds: {};
|
|
10
|
-
export interface ListBoxFieldProps extends
|
|
9
|
+
export interface ListBoxFieldProps extends HTMLAttributes<HTMLDivElement> {
|
|
11
10
|
/**
|
|
12
11
|
* Specify if the parent <ListBox> is disabled
|
|
13
12
|
*/
|
|
@@ -4,10 +4,9 @@
|
|
|
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 from 'react';
|
|
8
|
-
import { ReactAttr } from '../../types/common';
|
|
7
|
+
import React, { type HTMLAttributes } from 'react';
|
|
9
8
|
type ExcludedAttributes = 'id';
|
|
10
|
-
export interface ListBoxMenuProps extends Omit<
|
|
9
|
+
export interface ListBoxMenuProps extends Omit<HTMLAttributes<HTMLUListElement>, ExcludedAttributes> {
|
|
11
10
|
children?: any;
|
|
12
11
|
/**
|
|
13
12
|
* Specify a custom `id`
|
|
@@ -4,9 +4,8 @@
|
|
|
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, { ReactNode } from 'react';
|
|
8
|
-
|
|
9
|
-
export interface ListBoxMenuItemProps extends ReactAttr<HTMLLIElement> {
|
|
7
|
+
import React, { type HTMLAttributes, type ReactNode } from 'react';
|
|
8
|
+
export interface ListBoxMenuItemProps extends HTMLAttributes<HTMLLIElement> {
|
|
10
9
|
/**
|
|
11
10
|
* Specify any children nodes that should be rendered inside of the ListBox
|
|
12
11
|
* Menu Item
|
|
@@ -1,12 +1,12 @@
|
|
|
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
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import {
|
|
9
|
-
export interface LoadingProps extends
|
|
8
|
+
import { type HTMLAttributes } from 'react';
|
|
9
|
+
export interface LoadingProps extends HTMLAttributes<HTMLDivElement> {
|
|
10
10
|
/**
|
|
11
11
|
* Specify whether you want the loading indicator to be spinning or not
|
|
12
12
|
*/
|
|
@@ -20,8 +20,9 @@ var useMergedRefs = require('../../internal/useMergedRefs.js');
|
|
|
20
20
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
21
21
|
var deprecate = require('../../prop-types/deprecate.js');
|
|
22
22
|
var MenuContext = require('./MenuContext.js');
|
|
23
|
-
|
|
23
|
+
require('../LayoutDirection/LayoutDirection.js');
|
|
24
24
|
var useLayoutDirection = require('../LayoutDirection/useLayoutDirection.js');
|
|
25
|
+
var environment = require('../../internal/environment.js');
|
|
25
26
|
|
|
26
27
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
27
28
|
|
|
@@ -22,8 +22,9 @@ var useMergedRefs = require('../../internal/useMergedRefs.js');
|
|
|
22
22
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
23
23
|
var Menu = require('./Menu.js');
|
|
24
24
|
var MenuContext = require('./MenuContext.js');
|
|
25
|
-
require('../
|
|
25
|
+
require('../LayoutDirection/LayoutDirection.js');
|
|
26
26
|
var useLayoutDirection = require('../LayoutDirection/useLayoutDirection.js');
|
|
27
|
+
require('../Text/index.js');
|
|
27
28
|
var Text = require('../Text/Text.js');
|
|
28
29
|
|
|
29
30
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -4,8 +4,7 @@
|
|
|
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 ReactNode, type Ref } from 'react';
|
|
8
|
-
import { ReactAttr } from '../../types/common';
|
|
7
|
+
import React, { type HTMLAttributes, type ReactNode, type Ref } from 'react';
|
|
9
8
|
import { InlineLoadingStatus } from '../InlineLoading/InlineLoading';
|
|
10
9
|
export declare const ModalSizes: readonly ["xs", "sm", "md", "lg"];
|
|
11
10
|
export type ModalSize = (typeof ModalSizes)[number];
|
|
@@ -13,7 +12,7 @@ export interface ModalSecondaryButton {
|
|
|
13
12
|
buttonText?: string | ReactNode;
|
|
14
13
|
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
15
14
|
}
|
|
16
|
-
export interface ModalProps extends
|
|
15
|
+
export interface ModalProps extends HTMLAttributes<HTMLDivElement> {
|
|
17
16
|
/**
|
|
18
17
|
* Specify whether the Modal is displaying an alert, error or warning
|
|
19
18
|
* Should go hand in hand with the danger prop.
|
|
@@ -32,7 +31,7 @@ export interface ModalProps extends ReactAttr<HTMLDivElement> {
|
|
|
32
31
|
*/
|
|
33
32
|
className?: string;
|
|
34
33
|
/**
|
|
35
|
-
* Specify
|
|
34
|
+
* Specify label for the close button of the modal; defaults to close
|
|
36
35
|
*/
|
|
37
36
|
closeButtonLabel?: string;
|
|
38
37
|
/**
|