@carbon/react 1.83.0-rc.0 → 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 +1008 -938
- 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/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.js +17 -17
- 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 +2 -3
- package/es/components/FileUploader/FileUploaderButton.js +4 -4
- 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.js +5 -5
- 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/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 +3 -3
- package/es/components/Menu/MenuItem.js +16 -16
- package/es/components/MenuButton/index.js +4 -4
- package/es/components/Modal/Modal.d.ts +2 -3
- package/es/components/Modal/Modal.js +35 -35
- 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.js +38 -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 +60 -60
- package/es/components/Tag/DismissibleTag.js +10 -10
- package/es/components/Tag/OperationalTag.js +6 -6
- package/es/components/Tag/SelectableTag.js +6 -6
- 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 +8 -8
- 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/index.js +23 -24
- 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/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/useResizeObserver.d.ts +14 -0
- package/es/internal/useResizeObserver.js +74 -0
- package/es/internal/wrapFocus.js +3 -6
- 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/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/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 +2 -3
- 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/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/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/Modal/Modal.d.ts +2 -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/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/index.js +46 -47
- package/lib/internal/__mocks__/mockHTMLElement.d.ts +9 -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/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 +4 -1
- package/es/components/DataTable/index.js +0 -76
- package/lib/components/DataTable/index.js +0 -82
|
@@ -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
|
*/
|
|
@@ -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
|
*/
|
|
@@ -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;
|
|
@@ -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
|
*/
|
|
@@ -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.
|
|
@@ -555,11 +555,7 @@ const FilterableMultiSelect = /*#__PURE__*/React.forwardRef(function FilterableM
|
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
} : {};
|
|
558
|
-
const clearSelectionContent = controlledSelectedItems.length > 0 ?
|
|
559
|
-
className: `${prefix}--visually-hidden`
|
|
560
|
-
}, clearSelectionDescription, " ", controlledSelectedItems.length, ",", clearSelectionText) : /*#__PURE__*/React__default["default"].createElement("span", {
|
|
561
|
-
className: `${prefix}--visually-hidden`
|
|
562
|
-
}, clearSelectionDescription, ": 0");
|
|
558
|
+
const clearSelectionContent = controlledSelectedItems.length > 0 ? `${clearSelectionDescription} ${controlledSelectedItems.length}. ${clearSelectionText}.` : `${clearSelectionDescription} 0.`;
|
|
563
559
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
564
560
|
className: wrapperClasses
|
|
565
561
|
}, titleText ? /*#__PURE__*/React__default["default"].createElement("label", _rollupPluginBabelHelpers["extends"]({
|
|
@@ -4,10 +4,6 @@ export interface SkeletonIconProps {
|
|
|
4
4
|
* Specify an optional className to add.
|
|
5
5
|
*/
|
|
6
6
|
className?: string;
|
|
7
|
-
/**
|
|
8
|
-
* The CSS styles.
|
|
9
|
-
*/
|
|
10
|
-
style?: React.CSSProperties;
|
|
11
7
|
}
|
|
12
8
|
declare const SkeletonIcon: React.FC<SkeletonIconProps>;
|
|
13
9
|
export default SkeletonIcon;
|
|
@@ -38,11 +38,7 @@ SkeletonIcon.propTypes = {
|
|
|
38
38
|
/**
|
|
39
39
|
* Specify an optional className to add.
|
|
40
40
|
*/
|
|
41
|
-
className: PropTypes__default["default"].string
|
|
42
|
-
/**
|
|
43
|
-
* The CSS styles.
|
|
44
|
-
*/
|
|
45
|
-
style: PropTypes__default["default"].object
|
|
41
|
+
className: PropTypes__default["default"].string
|
|
46
42
|
};
|
|
47
43
|
|
|
48
44
|
exports["default"] = SkeletonIcon;
|
|
@@ -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 ControlledPasswordInputProps extends ReactAttr<HTMLInputElement> {
|
|
7
|
+
import React, { type HTMLAttributes } from 'react';
|
|
8
|
+
export interface ControlledPasswordInputProps extends HTMLAttributes<HTMLInputElement> {
|
|
10
9
|
/**
|
|
11
10
|
* Provide a custom className that is applied directly to the underlying
|
|
12
11
|
* `<input>` node
|
|
@@ -1,14 +1,13 @@
|
|
|
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 { ReactNode } from 'react';
|
|
9
|
-
import { ReactAttr } from '../../types/common';
|
|
8
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
10
9
|
type ExcludedAttributes = 'onChange';
|
|
11
|
-
export interface TileGroupProps extends Omit<
|
|
10
|
+
export interface TileGroupProps extends Omit<HTMLAttributes<HTMLFieldSetElement>, ExcludedAttributes> {
|
|
12
11
|
/**
|
|
13
12
|
* Provide a collection of <RadioTile> components to render in the group
|
|
14
13
|
*/
|
|
@@ -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' | 'value';
|
|
10
|
-
export interface TimePickerProps extends Omit<
|
|
9
|
+
export interface TimePickerProps extends Omit<HTMLAttributes<HTMLInputElement>, ExcludedAttributes> {
|
|
11
10
|
/**
|
|
12
11
|
* Pass in the children that will be rendered next to the form control
|
|
13
12
|
*/
|
|
@@ -54,6 +54,9 @@ interface TooltipBaseProps {
|
|
|
54
54
|
/**
|
|
55
55
|
* Provide the label to be rendered inside of the Tooltip. The label will use
|
|
56
56
|
* `aria-labelledby` and will fully describe the child node that is provided.
|
|
57
|
+
* If the child already has an `aria-label`, the tooltip will not apply
|
|
58
|
+
* `aria-labelledby`. If the child has its own `aria-labelledby`, that value
|
|
59
|
+
* will be kept. Otherwise, the tooltip will use its own ID to label the child.
|
|
57
60
|
* This means that if you have text in the child node, that it will not be
|
|
58
61
|
* announced to the screen reader.
|
|
59
62
|
*
|
|
@@ -56,6 +56,21 @@ const Tooltip = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
56
56
|
const id = useId.useId('tooltip');
|
|
57
57
|
const prefix = usePrefix.usePrefix();
|
|
58
58
|
const child = React__default["default"].Children.only(children);
|
|
59
|
+
const {
|
|
60
|
+
'aria-label': ariaLabel,
|
|
61
|
+
'aria-labelledby': ariaLabelledBy,
|
|
62
|
+
'aria-describedby': ariaDescribedBy
|
|
63
|
+
} = child?.props ?? {};
|
|
64
|
+
const hasLabel = !!label;
|
|
65
|
+
const hasAriaLabel = typeof ariaLabel === 'string' ? ariaLabel.trim() !== '' : false;
|
|
66
|
+
|
|
67
|
+
// An `aria-label` takes precedence over `aria-describedby`, but when it's
|
|
68
|
+
// needed and the user doesn't specify one, the fallback `id` is used.
|
|
69
|
+
const labelledBy = hasAriaLabel ? null : hasLabel ? ariaLabelledBy ?? id : undefined;
|
|
70
|
+
|
|
71
|
+
// If `aria-label` is present, use any provided `aria-describedby`.
|
|
72
|
+
// If not, fallback to child's `aria-describedby` or the tooltip `id` if needed.
|
|
73
|
+
const describedBy = hasAriaLabel ? ariaDescribedBy : ariaDescribedBy ?? (!hasLabel && !ariaLabelledBy ? id : undefined);
|
|
59
74
|
const triggerProps = {
|
|
60
75
|
onFocus: () => !focusByMouse && setOpen(true),
|
|
61
76
|
onBlur: () => {
|
|
@@ -68,7 +83,9 @@ const Tooltip = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
68
83
|
onMouseLeave,
|
|
69
84
|
onMouseDown,
|
|
70
85
|
onMouseMove: onMouseMove,
|
|
71
|
-
onTouchStart: onDragStart
|
|
86
|
+
onTouchStart: onDragStart,
|
|
87
|
+
'aria-labelledby': labelledBy,
|
|
88
|
+
'aria-describedby': describedBy
|
|
72
89
|
};
|
|
73
90
|
function getChildEventHandlers(childProps) {
|
|
74
91
|
const eventHandlerFunctions = Object.keys(triggerProps).filter(prop => prop.startsWith('on'));
|
|
@@ -83,11 +100,6 @@ const Tooltip = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
83
100
|
});
|
|
84
101
|
return eventHandlers;
|
|
85
102
|
}
|
|
86
|
-
if (label) {
|
|
87
|
-
triggerProps['aria-labelledby'] = id;
|
|
88
|
-
} else {
|
|
89
|
-
triggerProps['aria-describedby'] = id;
|
|
90
|
-
}
|
|
91
103
|
const onKeyDown = React.useCallback(event => {
|
|
92
104
|
if (open && match.match(event, keys.Escape)) {
|
|
93
105
|
event.stopPropagation();
|
|
@@ -80,19 +80,28 @@ const TreeNode = /*#__PURE__*/React__default["default"].forwardRef((_ref, forwar
|
|
|
80
80
|
forwardedRef.current = element;
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
function enhanceTreeNodes(children) {
|
|
84
|
+
return React__default["default"].Children.map(children, node => {
|
|
85
|
+
if (! /*#__PURE__*/React__default["default"].isValidElement(node)) return node;
|
|
86
|
+
const isTreeNode = node.type.displayName === 'TreeNode';
|
|
87
|
+
if (isTreeNode) {
|
|
88
|
+
return /*#__PURE__*/React__default["default"].cloneElement(node, {
|
|
89
|
+
active,
|
|
90
|
+
depth: depth + 1,
|
|
91
|
+
disabled: disabled || node.props.disabled,
|
|
92
|
+
onTreeSelect,
|
|
93
|
+
onNodeFocusEvent,
|
|
94
|
+
selected,
|
|
95
|
+
tabIndex: node.props.disabled ? null : -1
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
const newChildren = enhanceTreeNodes(node.props.children);
|
|
85
99
|
return /*#__PURE__*/React__default["default"].cloneElement(node, {
|
|
86
|
-
|
|
87
|
-
depth: depth + 1,
|
|
88
|
-
disabled: disabled || node.props.disabled,
|
|
89
|
-
onTreeSelect,
|
|
90
|
-
onNodeFocusEvent,
|
|
91
|
-
selected,
|
|
92
|
-
tabIndex: !node.props.disabled && -1 || null
|
|
100
|
+
children: newChildren
|
|
93
101
|
});
|
|
94
|
-
}
|
|
95
|
-
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
const nodesWithProps = enhanceTreeNodes(children);
|
|
96
105
|
const isActive = active === id;
|
|
97
106
|
const isSelected = selected.includes(id);
|
|
98
107
|
const treeNodeClasses = cx__default["default"](className, `${prefix}--tree-node`, {
|
|
@@ -121,24 +121,33 @@ const TreeView = _ref => {
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
let focusTarget = false;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
124
|
+
function enhanceTreeNodes(children) {
|
|
125
|
+
return React__default["default"].Children.map(children, child => {
|
|
126
|
+
if (! /*#__PURE__*/React__default["default"].isValidElement(child)) return child;
|
|
127
|
+
const isTreeNode = child.type.displayName === 'TreeNode';
|
|
128
|
+
if (isTreeNode) {
|
|
129
|
+
const node = child;
|
|
130
|
+
const sharedNodeProps = {
|
|
131
|
+
active,
|
|
132
|
+
depth: 0,
|
|
133
|
+
onNodeFocusEvent: handleFocusEvent,
|
|
134
|
+
onTreeSelect: handleTreeSelect,
|
|
135
|
+
selected,
|
|
136
|
+
tabIndex: node.props.disabled ? undefined : -1
|
|
137
|
+
};
|
|
138
|
+
if (!focusTarget && !node.props.disabled) {
|
|
139
|
+
sharedNodeProps.tabIndex = 0;
|
|
140
|
+
focusTarget = true;
|
|
141
|
+
}
|
|
142
|
+
return /*#__PURE__*/React__default["default"].cloneElement(child, sharedNodeProps);
|
|
143
|
+
}
|
|
144
|
+
const newChildren = enhanceTreeNodes(child.props.children);
|
|
145
|
+
return /*#__PURE__*/React__default["default"].cloneElement(child, {
|
|
146
|
+
children: newChildren
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
const nodesWithProps = enhanceTreeNodes(children);
|
|
142
151
|
function handleKeyDown(event) {
|
|
143
152
|
event.stopPropagation();
|
|
144
153
|
if (match.matches(event, [keys.ArrowUp, keys.ArrowDown, keys.Home, keys.End])) {
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
/**
|
|
8
8
|
* Generic container for `HeaderGlobalAction` components
|
|
9
9
|
*/
|
|
10
|
-
declare const HeaderGlobalBar: (props: import("
|
|
10
|
+
declare const HeaderGlobalBar: (props: import("react").HTMLAttributes<"div">) => React.ReactElement<any>;
|
|
11
11
|
export default HeaderGlobalBar;
|