@carbon/react 1.83.0 → 1.84.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 +909 -874
- package/README.md +1 -1
- package/es/components/AILabel/index.js +27 -30
- package/es/components/AISkeleton/AISkeletonIcon.js +4 -5
- package/es/components/AISkeleton/AISkeletonPlaceholder.js +4 -5
- package/es/components/AISkeleton/AISkeletonText.js +4 -5
- package/es/components/Accordion/Accordion.Skeleton.js +9 -10
- package/es/components/Accordion/Accordion.js +10 -11
- package/es/components/Accordion/AccordionItem.js +13 -14
- package/es/components/Accordion/AccordionProvider.js +4 -5
- package/es/components/AspectRatio/AspectRatio.js +7 -8
- package/es/components/BadgeIndicator/index.js +5 -6
- package/es/components/Breadcrumb/Breadcrumb.Skeleton.js +4 -5
- package/es/components/Button/Button.Skeleton.js +7 -8
- package/es/components/Button/ButtonBase.js +23 -24
- package/es/components/ChatButton/ChatButton.Skeleton.js +5 -6
- package/es/components/ChatButton/ChatButton.js +11 -12
- package/es/components/Checkbox/Checkbox.Skeleton.js +4 -5
- package/es/components/Checkbox/Checkbox.js +19 -20
- package/es/components/CheckboxGroup/CheckboxGroup.js +16 -17
- package/es/components/ClassPrefix/index.js +4 -5
- package/es/components/CodeSnippet/CodeSnippet.Skeleton.js +5 -6
- package/es/components/CodeSnippet/CodeSnippet.js +25 -26
- package/es/components/ComboBox/ComboBox.js +24 -30
- package/es/components/ComboBox/tools/filter.js +9 -12
- package/es/components/ComboButton/index.js +16 -18
- package/es/components/ComposedModal/ComposedModal.js +50 -36
- package/es/components/ComposedModal/ModalFooter.js +37 -42
- package/es/components/ComposedModal/ModalHeader.js +14 -15
- package/es/components/ContainedList/ContainedList.js +10 -11
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +9 -10
- package/es/components/ContentSwitcher/ContentSwitcher.d.ts +9 -29
- package/es/components/ContentSwitcher/ContentSwitcher.js +96 -128
- package/es/components/ContentSwitcher/index.d.ts +3 -4
- package/es/components/ContextMenu/useContextMenu.js +1 -2
- package/es/components/Copy/Copy.js +11 -12
- package/es/components/CopyButton/CopyButton.js +10 -11
- package/es/components/DataTable/DataTable.js +45 -53
- package/es/components/DataTable/Table.js +15 -18
- package/es/components/DataTable/TableBatchAction.js +8 -11
- package/es/components/DataTable/TableBatchActions.js +18 -20
- package/es/components/DataTable/TableBody.js +8 -11
- package/es/components/DataTable/TableContainer.js +9 -10
- package/es/components/DataTable/TableDecoratorRow.js +4 -5
- package/es/components/DataTable/TableExpandHeader.js +14 -15
- package/es/components/DataTable/TableExpandRow.js +13 -14
- package/es/components/DataTable/TableExpandedRow.js +6 -7
- package/es/components/DataTable/TableHeader.js +15 -16
- package/es/components/DataTable/TableSelectAll.js +11 -12
- package/es/components/DataTable/TableSelectRow.js +12 -13
- package/es/components/DataTable/TableSlugRow.js +4 -5
- package/es/components/DataTable/TableToolbar.js +7 -8
- package/es/components/DataTable/TableToolbarMenu.js +8 -9
- package/es/components/DataTable/TableToolbarSearch.js +22 -24
- package/es/components/DataTable/state/sorting.js +3 -4
- package/es/components/DataTable/tools/filter.js +10 -12
- package/es/components/DataTable/tools/normalize.js +6 -8
- package/es/components/DataTable/tools/sorting.js +24 -30
- package/es/components/DataTableSkeleton/DataTableSkeleton.js +11 -12
- package/es/components/DatePicker/DatePicker.Skeleton.js +7 -8
- package/es/components/DatePicker/DatePicker.js +88 -65
- package/es/components/DatePickerInput/DatePickerInput.js +5 -6
- package/es/components/Dialog/index.d.ts +193 -8
- package/es/components/Dialog/index.js +454 -35
- package/es/components/Dropdown/Dropdown.Skeleton.js +6 -7
- package/es/components/Dropdown/Dropdown.js +40 -43
- package/es/components/ErrorBoundary/ErrorBoundary.js +2 -2
- package/es/components/ExpandableSearch/ExpandableSearch.js +9 -10
- package/es/components/FeatureFlags/index.js +11 -12
- package/es/components/FileUploader/FileUploader.Skeleton.js +4 -5
- package/es/components/FileUploader/FileUploader.js +22 -24
- package/es/components/FileUploader/FileUploaderButton.js +16 -17
- package/es/components/FileUploader/FileUploaderDropContainer.js +15 -16
- package/es/components/FileUploader/FileUploaderItem.js +13 -14
- package/es/components/FileUploader/Filename.js +9 -10
- package/es/components/FluidComboBox/FluidComboBox.Skeleton.js +4 -5
- package/es/components/FluidComboBox/FluidComboBox.js +5 -6
- package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.js +5 -6
- package/es/components/FluidDatePicker/FluidDatePicker.js +10 -11
- package/es/components/FluidDropdown/FluidDropdown.Skeleton.js +4 -5
- package/es/components/FluidDropdown/FluidDropdown.js +5 -6
- package/es/components/FluidForm/FluidForm.js +5 -6
- package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +4 -5
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +6 -7
- package/es/components/FluidNumberInput/FluidNumberInput.Skeleton.js +4 -5
- package/es/components/FluidNumberInput/FluidNumberInput.d.ts +40 -1
- package/es/components/FluidNumberInput/FluidNumberInput.js +38 -5
- package/es/components/FluidSearch/FluidSearch.Skeleton.js +4 -5
- package/es/components/FluidSearch/FluidSearch.js +4 -5
- package/es/components/FluidSelect/FluidSelect.Skeleton.js +4 -5
- package/es/components/FluidSelect/FluidSelect.js +5 -6
- package/es/components/FluidTextArea/FluidTextArea.Skeleton.js +4 -5
- package/es/components/FluidTextArea/FluidTextArea.js +4 -5
- package/es/components/FluidTextInput/FluidTextInput.Skeleton.js +4 -5
- package/es/components/FluidTextInput/FluidTextInput.js +5 -6
- package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.js +5 -6
- package/es/components/FluidTimePicker/FluidTimePicker.js +11 -12
- package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +5 -6
- package/es/components/Form/Form.js +5 -6
- package/es/components/FormGroup/FormGroup.js +11 -12
- package/es/components/FormItem/FormItem.js +5 -6
- package/es/components/FormLabel/FormLabel.js +6 -7
- package/es/components/Grid/CSSGrid.js +17 -19
- package/es/components/Grid/Column.js +28 -27
- package/es/components/Grid/ColumnHang.js +6 -7
- package/es/components/Grid/FlexGrid.js +9 -10
- package/es/components/Grid/GridContext.js +5 -6
- package/es/components/Grid/Row.js +8 -9
- package/es/components/Heading/index.js +5 -6
- package/es/components/Icon/Icon.Skeleton.js +4 -5
- package/es/components/IconButton/index.js +20 -21
- package/es/components/IconIndicator/index.js +7 -8
- package/es/components/IdPrefix/index.js +4 -5
- package/es/components/InlineLoading/InlineLoading.js +9 -10
- package/es/components/Layer/index.js +8 -9
- package/es/components/Layout/index.js +21 -26
- package/es/components/LayoutDirection/LayoutDirection.js +6 -7
- package/es/components/Link/Link.d.ts +1 -1
- package/es/components/Link/Link.js +14 -15
- package/es/components/ListBox/ListBoxField.js +6 -7
- package/es/components/ListBox/ListBoxMenu.js +5 -6
- package/es/components/ListBox/ListBoxMenuIcon.js +4 -5
- package/es/components/ListBox/ListBoxMenuItem.js +8 -10
- package/es/components/ListBox/ListBoxSelection.js +8 -9
- package/es/components/ListBox/next/ListBoxSelection.js +9 -10
- package/es/components/ListBox/next/ListBoxTrigger.js +5 -6
- package/es/components/ListItem/ListItem.js +5 -6
- package/es/components/Loading/Loading.js +8 -9
- package/es/components/Menu/Menu.js +23 -24
- package/es/components/Menu/MenuItem.js +39 -44
- package/es/components/MenuButton/index.js +16 -18
- package/es/components/Modal/Modal.js +74 -65
- package/es/components/ModalWrapper/ModalWrapper.js +2 -2
- package/es/components/MultiSelect/FilterableMultiSelect.js +67 -48
- package/es/components/MultiSelect/MultiSelect.js +43 -45
- package/es/components/MultiSelect/tools/sorting.js +11 -15
- package/es/components/Notification/Notification.js +96 -105
- package/es/components/NumberInput/NumberFormatPropTypes.d.ts +29 -0
- package/es/components/NumberInput/NumberFormatPropTypes.js +40 -0
- package/es/components/NumberInput/NumberInput.Skeleton.js +6 -7
- package/es/components/NumberInput/NumberInput.d.ts +39 -3
- package/es/components/NumberInput/NumberInput.js +174 -44
- package/es/components/OrderedList/OrderedList.js +7 -8
- package/es/components/OverflowMenu/OverflowMenu.d.ts +1 -1
- package/es/components/OverflowMenu/OverflowMenu.js +39 -46
- package/es/components/OverflowMenu/next/index.js +12 -13
- package/es/components/PageHeader/PageHeader.d.ts +39 -14
- package/es/components/PageHeader/PageHeader.js +187 -81
- package/es/components/PageHeader/index.d.ts +2 -2
- package/es/components/PageHeader/index.js +1 -1
- package/es/components/Pagination/Pagination.Skeleton.js +4 -5
- package/es/components/Pagination/Pagination.js +24 -25
- package/es/components/Pagination/experimental/PageSelector.js +8 -9
- package/es/components/Pagination/experimental/Pagination.js +20 -21
- package/es/components/PaginationNav/PaginationNav.js +33 -38
- package/es/components/Popover/index.js +26 -28
- package/es/components/ProgressBar/ProgressBar.js +11 -12
- package/es/components/ProgressIndicator/ProgressIndicator.Skeleton.js +5 -6
- package/es/components/ProgressIndicator/ProgressIndicator.js +29 -32
- package/es/components/RadioTile/RadioTile.js +17 -18
- package/es/components/Search/Search.Skeleton.js +5 -6
- package/es/components/Search/Search.js +26 -29
- package/es/components/Select/Select.Skeleton.js +5 -6
- package/es/components/Select/Select.js +24 -25
- package/es/components/SelectItem/SelectItem.js +8 -9
- package/es/components/SelectItemGroup/SelectItemGroup.js +7 -8
- package/es/components/ShapeIndicator/index.js +7 -8
- package/es/components/SkeletonIcon/SkeletonIcon.js +4 -5
- package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +4 -5
- package/es/components/SkeletonText/SkeletonText.js +8 -9
- package/es/components/Slider/Slider.Skeleton.js +8 -9
- package/es/components/Slider/Slider.js +75 -83
- package/es/components/Slider/SliderHandles.js +6 -6
- package/es/components/StructuredList/StructuredList.Skeleton.js +5 -6
- package/es/components/Tabs/Tabs.Skeleton.js +5 -6
- package/es/components/Tabs/Tabs.js +83 -98
- package/es/components/Tabs/usePressable.js +7 -8
- package/es/components/Tag/DismissibleTag.js +16 -17
- package/es/components/Tag/OperationalTag.js +10 -11
- package/es/components/Tag/SelectableTag.js +13 -14
- package/es/components/Tag/Tag.Skeleton.js +5 -6
- package/es/components/Tag/Tag.js +19 -20
- package/es/components/Text/Text.js +6 -7
- package/es/components/Text/TextDirection.js +5 -6
- package/es/components/TextArea/TextArea.js +7 -7
- package/es/components/TextInput/ControlledPasswordInput.js +24 -25
- package/es/components/TextInput/PasswordInput.js +26 -27
- package/es/components/TextInput/TextInput.Skeleton.js +5 -6
- package/es/components/TextInput/TextInput.js +27 -28
- package/es/components/TextInput/util.js +14 -17
- package/es/components/Theme/index.js +10 -12
- package/es/components/Tile/Tile.js +68 -74
- package/es/components/TileGroup/TileGroup.d.ts +4 -4
- package/es/components/TileGroup/TileGroup.js +45 -53
- package/es/components/TileGroup/index.d.ts +3 -3
- package/es/components/Toggle/Toggle.Skeleton.js +4 -5
- package/es/components/Toggle/Toggle.js +17 -18
- package/es/components/ToggleSmall/ToggleSmall.Skeleton.js +6 -7
- package/es/components/Toggletip/index.js +33 -39
- package/es/components/Tooltip/DefinitionTooltip.js +13 -14
- package/es/components/Tooltip/Tooltip.js +15 -16
- package/es/components/TreeView/TreeNode.js +20 -21
- package/es/components/TreeView/TreeView.js +14 -16
- package/es/components/UIShell/Content.js +6 -7
- package/es/components/UIShell/Header.js +5 -6
- package/es/components/UIShell/HeaderContainer.js +5 -6
- package/es/components/UIShell/HeaderGlobalAction.js +12 -13
- package/es/components/UIShell/HeaderMenu.d.ts +10 -112
- package/es/components/UIShell/HeaderMenu.js +154 -201
- package/es/components/UIShell/HeaderMenuButton.js +10 -11
- package/es/components/UIShell/HeaderMenuItem.js +12 -12
- package/es/components/UIShell/HeaderName.js +6 -7
- package/es/components/UIShell/HeaderNavigation.js +7 -8
- package/es/components/UIShell/HeaderPanel.js +9 -10
- package/es/components/UIShell/HeaderSideNavItems.js +5 -6
- package/es/components/UIShell/Link.js +8 -9
- package/es/components/UIShell/SideNav.js +23 -25
- package/es/components/UIShell/SideNavDetails.js +6 -7
- package/es/components/UIShell/SideNavDivider.js +3 -4
- package/es/components/UIShell/SideNavFooter.js +6 -7
- package/es/components/UIShell/SideNavHeader.js +5 -6
- package/es/components/UIShell/SideNavIcon.js +5 -6
- package/es/components/UIShell/SideNavItem.js +5 -6
- package/es/components/UIShell/SideNavItems.js +5 -6
- package/es/components/UIShell/SideNavLink.js +10 -11
- package/es/components/UIShell/SideNavLinkText.js +5 -6
- package/es/components/UIShell/SideNavMenu.js +11 -12
- package/es/components/UIShell/SkipToContent.js +7 -8
- package/es/components/UIShell/Switcher.js +4 -5
- package/es/components/UIShell/SwitcherDivider.js +4 -5
- package/es/components/UnorderedList/UnorderedList.js +6 -7
- package/es/index.js +3 -3
- package/es/internal/FloatingMenu.js +26 -28
- package/es/internal/Selection.js +15 -17
- package/es/internal/getAnnouncement.d.ts +8 -0
- package/es/internal/getAnnouncement.js +22 -0
- package/es/internal/keyboard/match.js +6 -7
- package/es/internal/useControllableState.d.ts +1 -1
- package/es/internal/useControllableState.js +8 -9
- package/es/internal/useDelayedState.js +1 -2
- package/es/internal/useDocumentLang.d.ts +12 -0
- package/es/internal/useId.js +2 -4
- package/es/internal/useMatchMedia.js +1 -2
- package/es/internal/useMergedRefs.d.ts +1 -1
- package/es/internal/useNoInteractiveChildren.js +2 -4
- package/es/internal/useNormalizedInputProps.js +9 -10
- package/es/internal/useOverflowItems.d.ts +29 -0
- package/es/internal/useOverflowItems.js +122 -0
- package/es/internal/useResizeObserver.js +4 -5
- package/es/internal/useSavedCallback.js +1 -3
- package/es/internal/wrapFocus.js +20 -29
- package/es/prop-types/deprecate.js +1 -4
- package/es/prop-types/deprecateValuesWithin.js +1 -4
- package/es/prop-types/isRequiredOneOf.js +1 -4
- package/es/prop-types/requiredIfGivenPropIsTruthy.js +1 -4
- package/es/tools/events.js +1 -4
- package/es/tools/mergeRefs.js +9 -14
- package/es/tools/uniqueId.js +1 -2
- package/es/tools/wrapComponent.js +9 -11
- package/lib/components/AILabel/index.js +27 -30
- package/lib/components/AISkeleton/AISkeletonIcon.js +4 -5
- package/lib/components/AISkeleton/AISkeletonPlaceholder.js +4 -5
- package/lib/components/AISkeleton/AISkeletonText.js +4 -5
- package/lib/components/Accordion/Accordion.Skeleton.js +9 -10
- package/lib/components/Accordion/Accordion.js +10 -11
- package/lib/components/Accordion/AccordionItem.js +13 -14
- package/lib/components/Accordion/AccordionProvider.js +4 -5
- package/lib/components/AspectRatio/AspectRatio.js +7 -8
- package/lib/components/BadgeIndicator/index.js +5 -6
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.js +4 -5
- package/lib/components/Button/Button.Skeleton.js +7 -8
- package/lib/components/Button/ButtonBase.js +23 -24
- package/lib/components/ChatButton/ChatButton.Skeleton.js +5 -6
- package/lib/components/ChatButton/ChatButton.js +11 -12
- package/lib/components/Checkbox/Checkbox.Skeleton.js +4 -5
- package/lib/components/Checkbox/Checkbox.js +19 -20
- package/lib/components/CheckboxGroup/CheckboxGroup.js +16 -17
- package/lib/components/ClassPrefix/index.js +4 -5
- package/lib/components/CodeSnippet/CodeSnippet.Skeleton.js +5 -6
- package/lib/components/CodeSnippet/CodeSnippet.js +25 -26
- package/lib/components/ComboBox/ComboBox.js +24 -30
- package/lib/components/ComboBox/tools/filter.js +9 -12
- package/lib/components/ComboButton/index.js +16 -18
- package/lib/components/ComposedModal/ComposedModal.js +50 -36
- package/lib/components/ComposedModal/ModalFooter.js +37 -42
- package/lib/components/ComposedModal/ModalHeader.js +14 -15
- package/lib/components/ContainedList/ContainedList.js +10 -11
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +9 -10
- package/lib/components/ContentSwitcher/ContentSwitcher.d.ts +9 -29
- package/lib/components/ContentSwitcher/ContentSwitcher.js +94 -126
- package/lib/components/ContentSwitcher/index.d.ts +3 -4
- package/lib/components/ContextMenu/useContextMenu.js +1 -2
- package/lib/components/Copy/Copy.js +11 -12
- package/lib/components/CopyButton/CopyButton.js +10 -11
- package/lib/components/DataTable/DataTable.js +45 -53
- package/lib/components/DataTable/Table.js +15 -18
- package/lib/components/DataTable/TableBatchAction.js +8 -11
- package/lib/components/DataTable/TableBatchActions.js +18 -20
- package/lib/components/DataTable/TableBody.js +8 -11
- package/lib/components/DataTable/TableContainer.js +9 -10
- package/lib/components/DataTable/TableDecoratorRow.js +4 -5
- package/lib/components/DataTable/TableExpandHeader.js +14 -15
- package/lib/components/DataTable/TableExpandRow.js +13 -14
- package/lib/components/DataTable/TableExpandedRow.js +6 -7
- package/lib/components/DataTable/TableHeader.js +15 -16
- package/lib/components/DataTable/TableSelectAll.js +11 -12
- package/lib/components/DataTable/TableSelectRow.js +12 -13
- package/lib/components/DataTable/TableSlugRow.js +4 -5
- package/lib/components/DataTable/TableToolbar.js +7 -8
- package/lib/components/DataTable/TableToolbarMenu.js +8 -9
- package/lib/components/DataTable/TableToolbarSearch.js +22 -24
- package/lib/components/DataTable/state/sorting.js +3 -4
- package/lib/components/DataTable/tools/filter.js +10 -12
- package/lib/components/DataTable/tools/normalize.js +6 -8
- package/lib/components/DataTable/tools/sorting.js +24 -30
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +11 -12
- package/lib/components/DatePicker/DatePicker.Skeleton.js +7 -8
- package/lib/components/DatePicker/DatePicker.js +87 -64
- package/lib/components/DatePickerInput/DatePickerInput.js +5 -6
- package/lib/components/Dialog/index.d.ts +193 -8
- package/lib/components/Dialog/index.js +457 -33
- package/lib/components/Dropdown/Dropdown.Skeleton.js +6 -7
- package/lib/components/Dropdown/Dropdown.js +40 -43
- package/lib/components/ErrorBoundary/ErrorBoundary.js +2 -2
- package/lib/components/ExpandableSearch/ExpandableSearch.js +9 -10
- package/lib/components/FeatureFlags/index.js +11 -12
- package/lib/components/FileUploader/FileUploader.Skeleton.js +4 -5
- package/lib/components/FileUploader/FileUploader.js +22 -24
- package/lib/components/FileUploader/FileUploaderButton.js +16 -17
- package/lib/components/FileUploader/FileUploaderDropContainer.js +15 -16
- package/lib/components/FileUploader/FileUploaderItem.js +13 -14
- package/lib/components/FileUploader/Filename.js +9 -10
- package/lib/components/FluidComboBox/FluidComboBox.Skeleton.js +4 -5
- package/lib/components/FluidComboBox/FluidComboBox.js +5 -6
- package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.js +5 -6
- package/lib/components/FluidDatePicker/FluidDatePicker.js +10 -11
- package/lib/components/FluidDropdown/FluidDropdown.Skeleton.js +4 -5
- package/lib/components/FluidDropdown/FluidDropdown.js +5 -6
- package/lib/components/FluidForm/FluidForm.js +5 -6
- package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +4 -5
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +6 -7
- package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.js +4 -5
- package/lib/components/FluidNumberInput/FluidNumberInput.d.ts +40 -1
- package/lib/components/FluidNumberInput/FluidNumberInput.js +38 -5
- package/lib/components/FluidSearch/FluidSearch.Skeleton.js +4 -5
- package/lib/components/FluidSearch/FluidSearch.js +4 -5
- package/lib/components/FluidSelect/FluidSelect.Skeleton.js +4 -5
- package/lib/components/FluidSelect/FluidSelect.js +5 -6
- package/lib/components/FluidTextArea/FluidTextArea.Skeleton.js +4 -5
- package/lib/components/FluidTextArea/FluidTextArea.js +4 -5
- package/lib/components/FluidTextInput/FluidTextInput.Skeleton.js +4 -5
- package/lib/components/FluidTextInput/FluidTextInput.js +5 -6
- package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +5 -6
- package/lib/components/FluidTimePicker/FluidTimePicker.js +11 -12
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +5 -6
- package/lib/components/Form/Form.js +5 -6
- package/lib/components/FormGroup/FormGroup.js +11 -12
- package/lib/components/FormItem/FormItem.js +5 -6
- package/lib/components/FormLabel/FormLabel.js +6 -7
- package/lib/components/Grid/CSSGrid.js +17 -19
- package/lib/components/Grid/Column.js +28 -27
- package/lib/components/Grid/ColumnHang.js +6 -7
- package/lib/components/Grid/FlexGrid.js +9 -10
- package/lib/components/Grid/GridContext.js +5 -6
- package/lib/components/Grid/Row.js +8 -9
- package/lib/components/Heading/index.js +5 -6
- package/lib/components/Icon/Icon.Skeleton.js +4 -5
- package/lib/components/IconButton/index.js +20 -21
- package/lib/components/IconIndicator/index.js +7 -8
- package/lib/components/IdPrefix/index.js +4 -5
- package/lib/components/InlineLoading/InlineLoading.js +9 -10
- package/lib/components/Layer/index.js +8 -9
- package/lib/components/Layout/index.js +21 -26
- package/lib/components/LayoutDirection/LayoutDirection.js +6 -7
- package/lib/components/Link/Link.d.ts +1 -1
- package/lib/components/Link/Link.js +14 -15
- package/lib/components/ListBox/ListBoxField.js +6 -7
- package/lib/components/ListBox/ListBoxMenu.js +5 -6
- package/lib/components/ListBox/ListBoxMenuIcon.js +4 -5
- package/lib/components/ListBox/ListBoxMenuItem.js +8 -10
- package/lib/components/ListBox/ListBoxSelection.js +8 -9
- package/lib/components/ListBox/next/ListBoxSelection.js +9 -10
- package/lib/components/ListBox/next/ListBoxTrigger.js +5 -6
- package/lib/components/ListItem/ListItem.js +5 -6
- package/lib/components/Loading/Loading.js +8 -9
- package/lib/components/Menu/Menu.js +23 -24
- package/lib/components/Menu/MenuItem.js +39 -44
- package/lib/components/MenuButton/index.js +16 -18
- package/lib/components/Modal/Modal.js +74 -65
- package/lib/components/ModalWrapper/ModalWrapper.js +2 -2
- package/lib/components/MultiSelect/FilterableMultiSelect.js +66 -47
- package/lib/components/MultiSelect/MultiSelect.js +43 -45
- package/lib/components/MultiSelect/tools/sorting.js +11 -15
- package/lib/components/Notification/Notification.js +96 -105
- package/lib/components/NumberInput/NumberFormatPropTypes.d.ts +29 -0
- package/lib/components/NumberInput/NumberFormatPropTypes.js +48 -0
- package/lib/components/NumberInput/NumberInput.Skeleton.js +6 -7
- package/lib/components/NumberInput/NumberInput.d.ts +39 -3
- package/lib/components/NumberInput/NumberInput.js +173 -43
- package/lib/components/OrderedList/OrderedList.js +7 -8
- package/lib/components/OverflowMenu/OverflowMenu.d.ts +1 -1
- package/lib/components/OverflowMenu/OverflowMenu.js +39 -46
- package/lib/components/OverflowMenu/next/index.js +12 -13
- package/lib/components/PageHeader/PageHeader.d.ts +39 -14
- package/lib/components/PageHeader/PageHeader.js +185 -81
- package/lib/components/PageHeader/index.d.ts +2 -2
- package/lib/components/PageHeader/index.js +0 -2
- package/lib/components/Pagination/Pagination.Skeleton.js +4 -5
- package/lib/components/Pagination/Pagination.js +24 -25
- package/lib/components/Pagination/experimental/PageSelector.js +8 -9
- package/lib/components/Pagination/experimental/Pagination.js +20 -21
- package/lib/components/PaginationNav/PaginationNav.js +33 -38
- package/lib/components/Popover/index.js +26 -28
- package/lib/components/ProgressBar/ProgressBar.js +11 -12
- package/lib/components/ProgressIndicator/ProgressIndicator.Skeleton.js +5 -6
- package/lib/components/ProgressIndicator/ProgressIndicator.js +29 -32
- package/lib/components/RadioTile/RadioTile.js +17 -18
- package/lib/components/Search/Search.Skeleton.js +5 -6
- package/lib/components/Search/Search.js +26 -29
- package/lib/components/Select/Select.Skeleton.js +5 -6
- package/lib/components/Select/Select.js +24 -25
- package/lib/components/SelectItem/SelectItem.js +8 -9
- package/lib/components/SelectItemGroup/SelectItemGroup.js +7 -8
- package/lib/components/ShapeIndicator/index.js +7 -8
- package/lib/components/SkeletonIcon/SkeletonIcon.js +4 -5
- package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +4 -5
- package/lib/components/SkeletonText/SkeletonText.js +8 -9
- package/lib/components/Slider/Slider.Skeleton.js +8 -9
- package/lib/components/Slider/Slider.js +75 -83
- package/lib/components/Slider/SliderHandles.js +6 -6
- package/lib/components/StructuredList/StructuredList.Skeleton.js +5 -6
- package/lib/components/Tabs/Tabs.Skeleton.js +5 -6
- package/lib/components/Tabs/Tabs.js +83 -98
- package/lib/components/Tabs/usePressable.js +7 -8
- package/lib/components/Tag/DismissibleTag.js +16 -17
- package/lib/components/Tag/OperationalTag.js +10 -11
- package/lib/components/Tag/SelectableTag.js +13 -14
- package/lib/components/Tag/Tag.Skeleton.js +5 -6
- package/lib/components/Tag/Tag.js +19 -20
- package/lib/components/Text/Text.js +6 -7
- package/lib/components/Text/TextDirection.js +5 -6
- package/lib/components/TextArea/TextArea.js +7 -7
- package/lib/components/TextInput/ControlledPasswordInput.js +24 -25
- package/lib/components/TextInput/PasswordInput.js +26 -27
- package/lib/components/TextInput/TextInput.Skeleton.js +5 -6
- package/lib/components/TextInput/TextInput.js +27 -28
- package/lib/components/TextInput/util.js +14 -17
- package/lib/components/Theme/index.js +10 -12
- package/lib/components/Tile/Tile.js +68 -74
- package/lib/components/TileGroup/TileGroup.d.ts +4 -4
- package/lib/components/TileGroup/TileGroup.js +44 -52
- package/lib/components/TileGroup/index.d.ts +3 -3
- package/lib/components/Toggle/Toggle.Skeleton.js +4 -5
- package/lib/components/Toggle/Toggle.js +17 -18
- package/lib/components/ToggleSmall/ToggleSmall.Skeleton.js +6 -7
- package/lib/components/Toggletip/index.js +33 -39
- package/lib/components/Tooltip/DefinitionTooltip.js +13 -14
- package/lib/components/Tooltip/Tooltip.js +15 -16
- package/lib/components/TreeView/TreeNode.js +20 -21
- package/lib/components/TreeView/TreeView.js +14 -16
- package/lib/components/UIShell/Content.js +6 -7
- package/lib/components/UIShell/Header.js +5 -6
- package/lib/components/UIShell/HeaderContainer.js +5 -6
- package/lib/components/UIShell/HeaderGlobalAction.js +12 -13
- package/lib/components/UIShell/HeaderMenu.d.ts +10 -112
- package/lib/components/UIShell/HeaderMenu.js +152 -199
- package/lib/components/UIShell/HeaderMenuButton.js +10 -11
- package/lib/components/UIShell/HeaderMenuItem.js +12 -12
- package/lib/components/UIShell/HeaderName.js +6 -7
- package/lib/components/UIShell/HeaderNavigation.js +7 -8
- package/lib/components/UIShell/HeaderPanel.js +9 -10
- package/lib/components/UIShell/HeaderSideNavItems.js +5 -6
- package/lib/components/UIShell/Link.js +8 -9
- package/lib/components/UIShell/SideNav.js +23 -25
- package/lib/components/UIShell/SideNavDetails.js +6 -7
- package/lib/components/UIShell/SideNavDivider.js +3 -4
- package/lib/components/UIShell/SideNavFooter.js +6 -7
- package/lib/components/UIShell/SideNavHeader.js +5 -6
- package/lib/components/UIShell/SideNavIcon.js +5 -6
- package/lib/components/UIShell/SideNavItem.js +5 -6
- package/lib/components/UIShell/SideNavItems.js +5 -6
- package/lib/components/UIShell/SideNavLink.js +10 -11
- package/lib/components/UIShell/SideNavLinkText.js +5 -6
- package/lib/components/UIShell/SideNavMenu.js +11 -12
- package/lib/components/UIShell/SkipToContent.js +7 -8
- package/lib/components/UIShell/Switcher.js +4 -5
- package/lib/components/UIShell/SwitcherDivider.js +4 -5
- package/lib/components/UnorderedList/UnorderedList.js +6 -7
- package/lib/index.js +36 -36
- package/lib/internal/FloatingMenu.js +26 -28
- package/lib/internal/Selection.js +15 -17
- package/lib/internal/getAnnouncement.d.ts +8 -0
- package/lib/internal/getAnnouncement.js +26 -0
- package/lib/internal/keyboard/match.js +6 -7
- package/lib/internal/useControllableState.d.ts +1 -1
- package/lib/internal/useControllableState.js +8 -9
- package/lib/internal/useDelayedState.js +1 -2
- package/lib/internal/useDocumentLang.d.ts +12 -0
- package/lib/internal/useId.js +2 -4
- package/lib/internal/useMatchMedia.js +1 -2
- package/lib/internal/useMergedRefs.d.ts +1 -1
- package/lib/internal/useNoInteractiveChildren.js +2 -4
- package/lib/internal/useNormalizedInputProps.js +9 -10
- package/lib/internal/useOverflowItems.d.ts +29 -0
- package/lib/internal/useOverflowItems.js +126 -0
- package/lib/internal/useResizeObserver.js +4 -5
- package/lib/internal/useSavedCallback.js +1 -3
- package/lib/internal/wrapFocus.js +20 -29
- package/lib/prop-types/deprecate.js +1 -4
- package/lib/prop-types/deprecateValuesWithin.js +1 -4
- package/lib/prop-types/isRequiredOneOf.js +1 -4
- package/lib/prop-types/requiredIfGivenPropIsTruthy.js +1 -4
- package/lib/tools/events.js +1 -4
- package/lib/tools/mergeRefs.js +9 -14
- package/lib/tools/uniqueId.js +1 -2
- package/lib/tools/wrapComponent.js +9 -11
- package/package.json +21 -19
- package/telemetry.yml +25 -1
- package/es/components/ContentSwitcher/index.js +0 -13
- package/es/feature-flags.d.ts +0 -7
- package/es/internal/useAnnouncer.js +0 -21
- package/lib/components/ContentSwitcher/index.js +0 -18
- package/lib/feature-flags.d.ts +0 -7
- package/lib/internal/useAnnouncer.js +0 -25
|
@@ -78,15 +78,14 @@ const TabPanelContext = /*#__PURE__*/React__default["default"].createContext(0);
|
|
|
78
78
|
* Tabs
|
|
79
79
|
*/
|
|
80
80
|
|
|
81
|
-
function Tabs(
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
} = _ref;
|
|
81
|
+
function Tabs({
|
|
82
|
+
children,
|
|
83
|
+
defaultSelectedIndex = 0,
|
|
84
|
+
onChange,
|
|
85
|
+
selectedIndex: controlledSelectedIndex,
|
|
86
|
+
dismissable,
|
|
87
|
+
onTabCloseRequest
|
|
88
|
+
}) {
|
|
90
89
|
const baseId = useId.useId('ccs');
|
|
91
90
|
if (dismissable && !onTabCloseRequest) {
|
|
92
91
|
console.error('dismissable property specified without also providing an onTabCloseRequest property.');
|
|
@@ -151,15 +150,14 @@ Tabs.propTypes = {
|
|
|
151
150
|
*/
|
|
152
151
|
selectedIndex: PropTypes__default["default"].number
|
|
153
152
|
};
|
|
154
|
-
function TabsVertical(
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
} = _ref2;
|
|
153
|
+
function TabsVertical({
|
|
154
|
+
children,
|
|
155
|
+
height,
|
|
156
|
+
defaultSelectedIndex = 0,
|
|
157
|
+
onChange,
|
|
158
|
+
selectedIndex: controlledSelectedIndex,
|
|
159
|
+
...rest
|
|
160
|
+
}) {
|
|
163
161
|
const [selectedIndex, setSelectedIndex] = useControllableState.useControllableState({
|
|
164
162
|
value: controlledSelectedIndex,
|
|
165
163
|
defaultValue: defaultSelectedIndex,
|
|
@@ -170,12 +168,9 @@ function TabsVertical(_ref2) {
|
|
|
170
168
|
const props = {
|
|
171
169
|
...rest,
|
|
172
170
|
selectedIndex,
|
|
173
|
-
onChange:
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
} = _ref3;
|
|
177
|
-
return setSelectedIndex(selectedIndex);
|
|
178
|
-
}
|
|
171
|
+
onChange: ({
|
|
172
|
+
selectedIndex
|
|
173
|
+
}) => setSelectedIndex(selectedIndex)
|
|
179
174
|
};
|
|
180
175
|
const isSm = useMatchMedia.useMatchMedia(smMediaQuery);
|
|
181
176
|
if (!isSm) {
|
|
@@ -260,22 +255,21 @@ function getNextIndexVertical(event, total, index) {
|
|
|
260
255
|
* TabList
|
|
261
256
|
*/
|
|
262
257
|
|
|
263
|
-
function TabList(
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
} = _ref4;
|
|
258
|
+
function TabList({
|
|
259
|
+
activation = 'automatic',
|
|
260
|
+
'aria-label': label,
|
|
261
|
+
children,
|
|
262
|
+
className: customClassName,
|
|
263
|
+
contained = false,
|
|
264
|
+
fullWidth = false,
|
|
265
|
+
iconSize,
|
|
266
|
+
leftOverflowButtonProps,
|
|
267
|
+
light,
|
|
268
|
+
rightOverflowButtonProps,
|
|
269
|
+
scrollDebounceWait = 200,
|
|
270
|
+
scrollIntoView,
|
|
271
|
+
...rest
|
|
272
|
+
}) {
|
|
279
273
|
const {
|
|
280
274
|
activeIndex,
|
|
281
275
|
selectedIndex,
|
|
@@ -351,10 +345,9 @@ function TabList(_ref4) {
|
|
|
351
345
|
tabs.current[nextIndex]?.focus();
|
|
352
346
|
}
|
|
353
347
|
}
|
|
354
|
-
function handleBlur(
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
} = _ref5;
|
|
348
|
+
function handleBlur({
|
|
349
|
+
relatedTarget: currentActiveNode
|
|
350
|
+
}) {
|
|
358
351
|
if (ref.current?.contains(currentActiveNode)) {
|
|
359
352
|
return;
|
|
360
353
|
}
|
|
@@ -465,10 +458,9 @@ function TabList(_ref4) {
|
|
|
465
458
|
scrollTabIntoView(tab);
|
|
466
459
|
}, [selectedIndex, isScrollable, children]);
|
|
467
460
|
usePressable.usePressable(previousButton, {
|
|
468
|
-
onPress(
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
} = _ref6;
|
|
461
|
+
onPress({
|
|
462
|
+
longPress
|
|
463
|
+
}) {
|
|
472
464
|
if (!longPress && ref.current) {
|
|
473
465
|
setScrollLeft(Math.max(scrollLeft - ref.current.scrollWidth / tabs.current.length * 1.5, 0));
|
|
474
466
|
}
|
|
@@ -478,10 +470,9 @@ function TabList(_ref4) {
|
|
|
478
470
|
}
|
|
479
471
|
});
|
|
480
472
|
usePressable.usePressable(nextButton, {
|
|
481
|
-
onPress(
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
} = _ref7;
|
|
473
|
+
onPress({
|
|
474
|
+
longPress
|
|
475
|
+
}) {
|
|
485
476
|
if (!longPress && ref.current) {
|
|
486
477
|
setScrollLeft(Math.min(scrollLeft + ref.current.scrollWidth / tabs.current.length * 1.5, ref.current.scrollWidth - ref.current.clientWidth));
|
|
487
478
|
}
|
|
@@ -591,15 +582,14 @@ TabList.propTypes = {
|
|
|
591
582
|
|
|
592
583
|
// type TabElement = HTMLElement & { disabled?: boolean };
|
|
593
584
|
|
|
594
|
-
function TabListVertical(
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
} = _ref8;
|
|
585
|
+
function TabListVertical({
|
|
586
|
+
activation = 'automatic',
|
|
587
|
+
'aria-label': label,
|
|
588
|
+
children,
|
|
589
|
+
className: customClassName,
|
|
590
|
+
scrollIntoView,
|
|
591
|
+
...rest
|
|
592
|
+
}) {
|
|
603
593
|
const {
|
|
604
594
|
activeIndex,
|
|
605
595
|
selectedIndex,
|
|
@@ -628,10 +618,9 @@ function TabListVertical(_ref8) {
|
|
|
628
618
|
tabs.current[nextIndex]?.focus();
|
|
629
619
|
}
|
|
630
620
|
}
|
|
631
|
-
function handleBlur(
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
} = _ref9;
|
|
621
|
+
function handleBlur({
|
|
622
|
+
relatedTarget: currentActiveNode
|
|
623
|
+
}) {
|
|
635
624
|
if (ref.current?.contains(currentActiveNode)) {
|
|
636
625
|
return;
|
|
637
626
|
}
|
|
@@ -790,18 +779,17 @@ function createLongPressBehavior(ref, direction, setScrollLeft) {
|
|
|
790
779
|
* Tab
|
|
791
780
|
*/
|
|
792
781
|
|
|
793
|
-
const Tab = /*#__PURE__*/React.forwardRef(function Tab(
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
} = _ref10;
|
|
782
|
+
const Tab = /*#__PURE__*/React.forwardRef(function Tab({
|
|
783
|
+
as = 'button',
|
|
784
|
+
children,
|
|
785
|
+
className: customClassName,
|
|
786
|
+
disabled,
|
|
787
|
+
onClick,
|
|
788
|
+
onKeyDown,
|
|
789
|
+
secondaryLabel,
|
|
790
|
+
renderIcon: Icon,
|
|
791
|
+
...rest
|
|
792
|
+
}, forwardRef) {
|
|
805
793
|
const prefix = usePrefix.usePrefix();
|
|
806
794
|
const {
|
|
807
795
|
selectedIndex,
|
|
@@ -1044,17 +1032,16 @@ Tab.propTypes = {
|
|
|
1044
1032
|
*/
|
|
1045
1033
|
|
|
1046
1034
|
const IconTabContext = /*#__PURE__*/React.createContext(false);
|
|
1047
|
-
const IconTab = /*#__PURE__*/React__default["default"].forwardRef(function IconTab(
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
} = _ref11;
|
|
1035
|
+
const IconTab = /*#__PURE__*/React__default["default"].forwardRef(function IconTab({
|
|
1036
|
+
badgeIndicator,
|
|
1037
|
+
children,
|
|
1038
|
+
className: customClassName,
|
|
1039
|
+
defaultOpen = false,
|
|
1040
|
+
enterDelayMs,
|
|
1041
|
+
leaveDelayMs,
|
|
1042
|
+
label,
|
|
1043
|
+
...rest
|
|
1044
|
+
}, ref) {
|
|
1058
1045
|
const prefix = usePrefix.usePrefix();
|
|
1059
1046
|
const value = React.useMemo(() => ({
|
|
1060
1047
|
badgeIndicator
|
|
@@ -1116,12 +1103,11 @@ IconTab.propTypes = {
|
|
|
1116
1103
|
* TabPanel
|
|
1117
1104
|
*/
|
|
1118
1105
|
|
|
1119
|
-
const TabPanel = /*#__PURE__*/React__default["default"].forwardRef(function TabPanel(
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
} = _ref12;
|
|
1106
|
+
const TabPanel = /*#__PURE__*/React__default["default"].forwardRef(function TabPanel({
|
|
1107
|
+
children,
|
|
1108
|
+
className: customClassName,
|
|
1109
|
+
...rest
|
|
1110
|
+
}, forwardRef) {
|
|
1125
1111
|
const prefix = usePrefix.usePrefix();
|
|
1126
1112
|
const panel = React.useRef(null);
|
|
1127
1113
|
const ref = useMergedRefs.useMergedRefs([forwardRef, panel]);
|
|
@@ -1196,10 +1182,9 @@ TabPanel.propTypes = {
|
|
|
1196
1182
|
* TabPanels
|
|
1197
1183
|
*/
|
|
1198
1184
|
|
|
1199
|
-
function TabPanels(
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
} = _ref13;
|
|
1185
|
+
function TabPanels({
|
|
1186
|
+
children
|
|
1187
|
+
}) {
|
|
1203
1188
|
const prefix = usePrefix.usePrefix();
|
|
1204
1189
|
const refs = React.useRef([]);
|
|
1205
1190
|
const hiddenStates = React.useRef([]);
|
|
@@ -24,14 +24,13 @@ var React = require('react');
|
|
|
24
24
|
* delayLongPressMs?: number,
|
|
25
25
|
* }} options
|
|
26
26
|
*/
|
|
27
|
-
function usePressable(ref
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
27
|
+
function usePressable(ref, {
|
|
28
|
+
onPress,
|
|
29
|
+
onPressIn,
|
|
30
|
+
onPressOut,
|
|
31
|
+
onLongPress,
|
|
32
|
+
delayLongPressMs = 500
|
|
33
|
+
} = {}) {
|
|
35
34
|
const savedOnPress = React.useRef(onPress);
|
|
36
35
|
const savedOnPressIn = React.useRef(onPressIn);
|
|
37
36
|
const savedOnPressOut = React.useRef(onPressOut);
|
|
@@ -32,23 +32,22 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
32
32
|
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
33
33
|
|
|
34
34
|
var _Close;
|
|
35
|
-
const DismissibleTag = /*#__PURE__*/React.forwardRef((
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
} = _ref;
|
|
35
|
+
const DismissibleTag = /*#__PURE__*/React.forwardRef(({
|
|
36
|
+
className,
|
|
37
|
+
decorator,
|
|
38
|
+
disabled,
|
|
39
|
+
id,
|
|
40
|
+
renderIcon,
|
|
41
|
+
title = 'Dismiss',
|
|
42
|
+
onClose,
|
|
43
|
+
slug,
|
|
44
|
+
size,
|
|
45
|
+
text,
|
|
46
|
+
tagTitle,
|
|
47
|
+
type,
|
|
48
|
+
dismissTooltipLabel = 'Dismiss tag',
|
|
49
|
+
...other
|
|
50
|
+
}, forwardRef) => {
|
|
52
51
|
const prefix = usePrefix.usePrefix();
|
|
53
52
|
const tagLabelRef = React.useRef(null);
|
|
54
53
|
const tagId = id || `tag-${useId.useId()}`;
|
|
@@ -41,17 +41,16 @@ const TYPES = {
|
|
|
41
41
|
'cool-gray': 'Cool-Gray',
|
|
42
42
|
'warm-gray': 'Warm-Gray'
|
|
43
43
|
};
|
|
44
|
-
const OperationalTag = /*#__PURE__*/React.forwardRef((
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
} = _ref;
|
|
44
|
+
const OperationalTag = /*#__PURE__*/React.forwardRef(({
|
|
45
|
+
className,
|
|
46
|
+
disabled,
|
|
47
|
+
id,
|
|
48
|
+
renderIcon,
|
|
49
|
+
size,
|
|
50
|
+
text,
|
|
51
|
+
type = 'gray',
|
|
52
|
+
...other
|
|
53
|
+
}, forwardRef) => {
|
|
55
54
|
const prefix = usePrefix.usePrefix();
|
|
56
55
|
const tagRef = React.useRef(null);
|
|
57
56
|
const tagId = id || `tag-${useId.useId()}`;
|
|
@@ -30,20 +30,19 @@ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
|
30
30
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
31
31
|
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
32
32
|
|
|
33
|
-
const SelectableTag = /*#__PURE__*/React.forwardRef((
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
} = _ref;
|
|
33
|
+
const SelectableTag = /*#__PURE__*/React.forwardRef(({
|
|
34
|
+
className,
|
|
35
|
+
disabled,
|
|
36
|
+
id,
|
|
37
|
+
renderIcon,
|
|
38
|
+
onChange,
|
|
39
|
+
onClick,
|
|
40
|
+
selected,
|
|
41
|
+
size,
|
|
42
|
+
text,
|
|
43
|
+
defaultSelected = false,
|
|
44
|
+
...other
|
|
45
|
+
}, forwardRef) => {
|
|
47
46
|
const prefix = usePrefix.usePrefix();
|
|
48
47
|
const tagRef = React.useRef(null);
|
|
49
48
|
const tagId = id || `tag-${useId.useId()}`;
|
|
@@ -21,12 +21,11 @@ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
|
21
21
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
22
|
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
23
23
|
|
|
24
|
-
function TagSkeleton(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} = _ref;
|
|
24
|
+
function TagSkeleton({
|
|
25
|
+
className,
|
|
26
|
+
size,
|
|
27
|
+
...rest
|
|
28
|
+
}) {
|
|
30
29
|
const prefix = usePrefix.usePrefix();
|
|
31
30
|
const tagClasses = cx__default["default"](`${prefix}--tag`, `${prefix}--skeleton`, className, {
|
|
32
31
|
[`${prefix}--tag--${size}`]: size,
|
|
@@ -50,26 +50,25 @@ const SIZES = {
|
|
|
50
50
|
md: 'md',
|
|
51
51
|
lg: 'lg'
|
|
52
52
|
};
|
|
53
|
-
const TagBase = /*#__PURE__*/React__default["default"].forwardRef((
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
} = _ref;
|
|
53
|
+
const TagBase = /*#__PURE__*/React__default["default"].forwardRef(({
|
|
54
|
+
children,
|
|
55
|
+
className,
|
|
56
|
+
decorator,
|
|
57
|
+
id,
|
|
58
|
+
type,
|
|
59
|
+
filter,
|
|
60
|
+
// remove filter in next major release - V12
|
|
61
|
+
renderIcon: CustomIconElement,
|
|
62
|
+
title = 'Clear filter',
|
|
63
|
+
// remove title in next major release - V12
|
|
64
|
+
disabled,
|
|
65
|
+
onClose,
|
|
66
|
+
// remove onClose in next major release - V12
|
|
67
|
+
size,
|
|
68
|
+
as: BaseComponent,
|
|
69
|
+
slug,
|
|
70
|
+
...other
|
|
71
|
+
}, forwardRef) => {
|
|
73
72
|
const prefix = usePrefix.usePrefix();
|
|
74
73
|
const tagRef = React.useRef(null);
|
|
75
74
|
if (filter) {
|
|
@@ -20,13 +20,12 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
20
20
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
21
21
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
22
|
|
|
23
|
-
const TextBase = /*#__PURE__*/React__default["default"].forwardRef((
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} = _ref;
|
|
23
|
+
const TextBase = /*#__PURE__*/React__default["default"].forwardRef(({
|
|
24
|
+
as,
|
|
25
|
+
children,
|
|
26
|
+
dir = 'auto',
|
|
27
|
+
...rest
|
|
28
|
+
}, ref) => {
|
|
30
29
|
const context = React.useContext(TextDirectionContext.TextDirectionContext);
|
|
31
30
|
const textProps = {};
|
|
32
31
|
const BaseComponent = as ?? 'span';
|
|
@@ -19,12 +19,11 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
19
19
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
20
20
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
21
21
|
|
|
22
|
-
const TextDirection =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} = _ref;
|
|
22
|
+
const TextDirection = ({
|
|
23
|
+
children,
|
|
24
|
+
dir = 'auto',
|
|
25
|
+
getTextDirection
|
|
26
|
+
}) => {
|
|
28
27
|
const savedCallback = React.useRef(getTextDirection);
|
|
29
28
|
const value = React.useMemo(() => {
|
|
30
29
|
return {
|
|
@@ -18,7 +18,7 @@ var iconsReact = require('@carbon/icons-react');
|
|
|
18
18
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
19
19
|
require('../FluidForm/FluidForm.js');
|
|
20
20
|
var FormContext = require('../FluidForm/FormContext.js');
|
|
21
|
-
var
|
|
21
|
+
var getAnnouncement = require('../../internal/getAnnouncement.js');
|
|
22
22
|
var useIsomorphicEffect = require('../../internal/useIsomorphicEffect.js');
|
|
23
23
|
var useMergedRefs = require('../../internal/useMergedRefs.js');
|
|
24
24
|
var useId = require('../../internal/useId.js');
|
|
@@ -50,7 +50,7 @@ const TextArea = frFn((props, forwardRef) => {
|
|
|
50
50
|
light,
|
|
51
51
|
placeholder = '',
|
|
52
52
|
enableCounter = false,
|
|
53
|
-
maxCount
|
|
53
|
+
maxCount,
|
|
54
54
|
counterMode = 'character',
|
|
55
55
|
warn = false,
|
|
56
56
|
warnText = '',
|
|
@@ -75,7 +75,7 @@ const TextArea = frFn((props, forwardRef) => {
|
|
|
75
75
|
if (counterMode === 'character') {
|
|
76
76
|
return strValue.length;
|
|
77
77
|
} else {
|
|
78
|
-
return strValue.match(/\
|
|
78
|
+
return strValue.match(/\p{L}+/gu)?.length || 0;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
const [textCount, setTextCount] = React.useState(getInitialTextCount());
|
|
@@ -107,8 +107,8 @@ const TextArea = frFn((props, forwardRef) => {
|
|
|
107
107
|
onPaste: evt => {
|
|
108
108
|
if (!disabled) {
|
|
109
109
|
if (counterMode === 'word' && enableCounter && typeof maxCount !== 'undefined' && textareaRef.current !== null) {
|
|
110
|
-
const existingWords = textareaRef.current.value.match(/\
|
|
111
|
-
const pastedWords = evt.clipboardData.getData('Text').match(/\
|
|
110
|
+
const existingWords = textareaRef.current.value.match(/\p{L}+/gu) || [];
|
|
111
|
+
const pastedWords = evt.clipboardData.getData('Text').match(/\p{L}+/gu) || [];
|
|
112
112
|
const totalWords = existingWords.length + pastedWords.length;
|
|
113
113
|
if (totalWords > maxCount) {
|
|
114
114
|
evt.preventDefault();
|
|
@@ -137,7 +137,7 @@ const TextArea = frFn((props, forwardRef) => {
|
|
|
137
137
|
return;
|
|
138
138
|
}
|
|
139
139
|
if (enableCounter && typeof maxCount !== 'undefined' && textareaRef.current !== null) {
|
|
140
|
-
const matchedWords = evt.target?.value?.match(/\
|
|
140
|
+
const matchedWords = evt.target?.value?.match(/\p{L}+/gu);
|
|
141
141
|
if (matchedWords && matchedWords.length <= maxCount) {
|
|
142
142
|
textareaRef.current.removeAttribute('maxLength');
|
|
143
143
|
setTimeout(() => {
|
|
@@ -230,7 +230,7 @@ const TextArea = frFn((props, forwardRef) => {
|
|
|
230
230
|
}
|
|
231
231
|
const announcerRef = React.useRef(null);
|
|
232
232
|
const [prevAnnouncement, setPrevAnnouncement] = React.useState('');
|
|
233
|
-
const ariaAnnouncement =
|
|
233
|
+
const ariaAnnouncement = getAnnouncement.getAnnouncement(textCount, maxCount, counterMode === 'word' ? 'word' : undefined, counterMode === 'word' ? 'words' : undefined);
|
|
234
234
|
React.useEffect(() => {
|
|
235
235
|
if (ariaAnnouncement && ariaAnnouncement !== prevAnnouncement) {
|
|
236
236
|
const announcer = announcerRef.current;
|
|
@@ -26,31 +26,30 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
26
26
|
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
27
27
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
28
28
|
|
|
29
|
-
const ControlledPasswordInput = /*#__PURE__*/React__default["default"].forwardRef(function ControlledPasswordInput(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
} = _ref;
|
|
29
|
+
const ControlledPasswordInput = /*#__PURE__*/React__default["default"].forwardRef(function ControlledPasswordInput({
|
|
30
|
+
labelText,
|
|
31
|
+
className,
|
|
32
|
+
id,
|
|
33
|
+
placeholder,
|
|
34
|
+
onChange = noopFn.noopFn,
|
|
35
|
+
onClick = noopFn.noopFn,
|
|
36
|
+
disabled = false,
|
|
37
|
+
hideLabel,
|
|
38
|
+
invalid = false,
|
|
39
|
+
invalidText = '',
|
|
40
|
+
helperText = '',
|
|
41
|
+
light,
|
|
42
|
+
// eslint-disable-next-line react/prop-types
|
|
43
|
+
type = 'password',
|
|
44
|
+
// eslint-disable-next-line react/prop-types
|
|
45
|
+
togglePasswordVisibility,
|
|
46
|
+
tooltipPosition = 'bottom',
|
|
47
|
+
tooltipAlignment = 'center',
|
|
48
|
+
hidePasswordLabel = 'Hide password',
|
|
49
|
+
showPasswordLabel = 'Show password',
|
|
50
|
+
size = undefined,
|
|
51
|
+
...other
|
|
52
|
+
}, ref) {
|
|
54
53
|
const prefix = usePrefix.usePrefix();
|
|
55
54
|
const controlledPasswordInstanceId = useId.useId();
|
|
56
55
|
const errorId = id + '-error-msg';
|