@carbon/react 1.83.0 → 1.84.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +980 -945
- package/README.md +1 -1
- package/es/components/AILabel/index.js +27 -30
- package/es/components/AISkeleton/AISkeletonIcon.js +4 -5
- package/es/components/AISkeleton/AISkeletonPlaceholder.js +4 -5
- package/es/components/AISkeleton/AISkeletonText.js +4 -5
- package/es/components/Accordion/Accordion.Skeleton.js +9 -10
- package/es/components/Accordion/Accordion.js +10 -11
- package/es/components/Accordion/AccordionItem.js +13 -14
- package/es/components/Accordion/AccordionProvider.js +4 -5
- package/es/components/AspectRatio/AspectRatio.js +7 -8
- package/es/components/BadgeIndicator/index.js +5 -6
- package/es/components/Breadcrumb/Breadcrumb.Skeleton.js +4 -5
- package/es/components/Button/Button.Skeleton.js +7 -8
- package/es/components/Button/ButtonBase.js +23 -24
- package/es/components/ChatButton/ChatButton.Skeleton.js +5 -6
- package/es/components/ChatButton/ChatButton.js +11 -12
- package/es/components/Checkbox/Checkbox.Skeleton.js +4 -5
- package/es/components/Checkbox/Checkbox.js +19 -20
- package/es/components/CheckboxGroup/CheckboxGroup.js +16 -17
- package/es/components/ClassPrefix/index.js +4 -5
- package/es/components/CodeSnippet/CodeSnippet.Skeleton.js +5 -6
- package/es/components/CodeSnippet/CodeSnippet.js +25 -26
- package/es/components/ComboBox/ComboBox.js +24 -30
- package/es/components/ComboBox/tools/filter.js +9 -12
- package/es/components/ComboButton/index.js +16 -18
- package/es/components/ComposedModal/ComposedModal.js +31 -34
- package/es/components/ComposedModal/ModalFooter.js +37 -42
- package/es/components/ComposedModal/ModalHeader.js +14 -15
- package/es/components/ContainedList/ContainedList.js +10 -11
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +9 -10
- package/es/components/ContentSwitcher/ContentSwitcher.d.ts +9 -29
- package/es/components/ContentSwitcher/ContentSwitcher.js +96 -128
- package/es/components/ContentSwitcher/index.d.ts +3 -4
- package/es/components/ContextMenu/useContextMenu.js +1 -2
- package/es/components/Copy/Copy.js +11 -12
- package/es/components/CopyButton/CopyButton.js +10 -11
- package/es/components/DataTable/DataTable.js +45 -53
- package/es/components/DataTable/Table.js +15 -18
- package/es/components/DataTable/TableBatchAction.js +8 -11
- package/es/components/DataTable/TableBatchActions.js +18 -20
- package/es/components/DataTable/TableBody.js +8 -11
- package/es/components/DataTable/TableContainer.js +9 -10
- package/es/components/DataTable/TableDecoratorRow.js +4 -5
- package/es/components/DataTable/TableExpandHeader.js +14 -15
- package/es/components/DataTable/TableExpandRow.js +13 -14
- package/es/components/DataTable/TableExpandedRow.js +6 -7
- package/es/components/DataTable/TableHeader.js +15 -16
- package/es/components/DataTable/TableSelectAll.js +11 -12
- package/es/components/DataTable/TableSelectRow.js +12 -13
- package/es/components/DataTable/TableSlugRow.js +4 -5
- package/es/components/DataTable/TableToolbar.js +7 -8
- package/es/components/DataTable/TableToolbarMenu.js +8 -9
- package/es/components/DataTable/TableToolbarSearch.js +22 -24
- package/es/components/DataTable/state/sorting.js +3 -4
- package/es/components/DataTable/tools/filter.js +10 -12
- package/es/components/DataTable/tools/normalize.js +6 -8
- package/es/components/DataTable/tools/sorting.js +24 -30
- package/es/components/DataTableSkeleton/DataTableSkeleton.js +11 -12
- package/es/components/DatePicker/DatePicker.Skeleton.js +7 -8
- package/es/components/DatePicker/DatePicker.js +88 -65
- package/es/components/DatePickerInput/DatePickerInput.js +5 -6
- package/es/components/Dialog/index.d.ts +193 -8
- package/es/components/Dialog/index.js +454 -35
- package/es/components/Dropdown/Dropdown.Skeleton.js +6 -7
- package/es/components/Dropdown/Dropdown.js +40 -43
- package/es/components/ErrorBoundary/ErrorBoundary.js +2 -2
- package/es/components/ExpandableSearch/ExpandableSearch.js +9 -10
- package/es/components/FeatureFlags/index.js +11 -12
- package/es/components/FileUploader/FileUploader.Skeleton.js +4 -5
- package/es/components/FileUploader/FileUploader.js +22 -24
- package/es/components/FileUploader/FileUploaderButton.js +16 -17
- package/es/components/FileUploader/FileUploaderDropContainer.js +15 -16
- package/es/components/FileUploader/FileUploaderItem.js +13 -14
- package/es/components/FileUploader/Filename.js +9 -10
- package/es/components/FluidComboBox/FluidComboBox.Skeleton.js +4 -5
- package/es/components/FluidComboBox/FluidComboBox.js +5 -6
- package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.js +5 -6
- package/es/components/FluidDatePicker/FluidDatePicker.js +10 -11
- package/es/components/FluidDropdown/FluidDropdown.Skeleton.js +4 -5
- package/es/components/FluidDropdown/FluidDropdown.js +5 -6
- package/es/components/FluidForm/FluidForm.js +5 -6
- package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +4 -5
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +6 -7
- package/es/components/FluidNumberInput/FluidNumberInput.Skeleton.js +4 -5
- package/es/components/FluidNumberInput/FluidNumberInput.d.ts +40 -1
- package/es/components/FluidNumberInput/FluidNumberInput.js +38 -5
- package/es/components/FluidSearch/FluidSearch.Skeleton.js +4 -5
- package/es/components/FluidSearch/FluidSearch.js +4 -5
- package/es/components/FluidSelect/FluidSelect.Skeleton.js +4 -5
- package/es/components/FluidSelect/FluidSelect.js +5 -6
- package/es/components/FluidTextArea/FluidTextArea.Skeleton.js +4 -5
- package/es/components/FluidTextArea/FluidTextArea.js +4 -5
- package/es/components/FluidTextInput/FluidTextInput.Skeleton.js +4 -5
- package/es/components/FluidTextInput/FluidTextInput.js +5 -6
- package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.js +5 -6
- package/es/components/FluidTimePicker/FluidTimePicker.js +11 -12
- package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +5 -6
- package/es/components/Form/Form.js +5 -6
- package/es/components/FormGroup/FormGroup.js +11 -12
- package/es/components/FormItem/FormItem.js +5 -6
- package/es/components/FormLabel/FormLabel.js +6 -7
- package/es/components/Grid/CSSGrid.js +17 -19
- package/es/components/Grid/Column.js +28 -27
- package/es/components/Grid/ColumnHang.js +6 -7
- package/es/components/Grid/FlexGrid.js +9 -10
- package/es/components/Grid/GridContext.js +5 -6
- package/es/components/Grid/Row.js +8 -9
- package/es/components/Heading/index.js +5 -6
- package/es/components/Icon/Icon.Skeleton.js +4 -5
- package/es/components/IconButton/index.js +20 -21
- package/es/components/IconIndicator/index.js +7 -8
- package/es/components/IdPrefix/index.js +4 -5
- package/es/components/InlineLoading/InlineLoading.js +9 -10
- package/es/components/Layer/index.js +8 -9
- package/es/components/Layout/index.js +21 -26
- package/es/components/LayoutDirection/LayoutDirection.js +6 -7
- package/es/components/Link/Link.d.ts +1 -1
- package/es/components/Link/Link.js +14 -15
- package/es/components/ListBox/ListBoxField.js +6 -7
- package/es/components/ListBox/ListBoxMenu.js +5 -6
- package/es/components/ListBox/ListBoxMenuIcon.js +4 -5
- package/es/components/ListBox/ListBoxMenuItem.js +8 -10
- package/es/components/ListBox/ListBoxSelection.js +8 -9
- package/es/components/ListBox/next/ListBoxSelection.js +9 -10
- package/es/components/ListBox/next/ListBoxTrigger.js +5 -6
- package/es/components/ListItem/ListItem.js +5 -6
- package/es/components/Loading/Loading.js +8 -9
- package/es/components/Menu/Menu.js +23 -24
- package/es/components/Menu/MenuItem.js +39 -44
- package/es/components/MenuButton/index.js +16 -18
- package/es/components/Modal/Modal.js +55 -63
- package/es/components/ModalWrapper/ModalWrapper.js +2 -2
- package/es/components/MultiSelect/FilterableMultiSelect.js +46 -48
- package/es/components/MultiSelect/MultiSelect.js +43 -45
- package/es/components/MultiSelect/tools/sorting.js +11 -15
- package/es/components/Notification/Notification.js +96 -105
- package/es/components/NumberInput/NumberFormatPropTypes.d.ts +29 -0
- package/es/components/NumberInput/NumberFormatPropTypes.js +40 -0
- package/es/components/NumberInput/NumberInput.Skeleton.js +6 -7
- package/es/components/NumberInput/NumberInput.d.ts +39 -3
- package/es/components/NumberInput/NumberInput.js +174 -44
- package/es/components/OrderedList/OrderedList.js +7 -8
- package/es/components/OverflowMenu/OverflowMenu.d.ts +1 -1
- package/es/components/OverflowMenu/OverflowMenu.js +35 -41
- package/es/components/OverflowMenu/next/index.js +12 -13
- package/es/components/PageHeader/PageHeader.d.ts +29 -5
- package/es/components/PageHeader/PageHeader.js +119 -73
- package/es/components/Pagination/Pagination.Skeleton.js +4 -5
- package/es/components/Pagination/Pagination.js +24 -25
- package/es/components/Pagination/experimental/PageSelector.js +8 -9
- package/es/components/Pagination/experimental/Pagination.js +20 -21
- package/es/components/PaginationNav/PaginationNav.js +33 -38
- package/es/components/Popover/index.js +26 -28
- package/es/components/ProgressBar/ProgressBar.js +11 -12
- package/es/components/ProgressIndicator/ProgressIndicator.Skeleton.js +5 -6
- package/es/components/ProgressIndicator/ProgressIndicator.js +29 -32
- package/es/components/RadioTile/RadioTile.js +17 -18
- package/es/components/Search/Search.Skeleton.js +5 -6
- package/es/components/Search/Search.js +26 -28
- package/es/components/Select/Select.Skeleton.js +5 -6
- package/es/components/Select/Select.js +24 -25
- package/es/components/SelectItem/SelectItem.js +8 -9
- package/es/components/SelectItemGroup/SelectItemGroup.js +7 -8
- package/es/components/ShapeIndicator/index.js +7 -8
- package/es/components/SkeletonIcon/SkeletonIcon.js +4 -5
- package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +4 -5
- package/es/components/SkeletonText/SkeletonText.js +8 -9
- package/es/components/Slider/Slider.Skeleton.js +8 -9
- package/es/components/Slider/Slider.js +69 -83
- package/es/components/Slider/SliderHandles.js +6 -6
- package/es/components/StructuredList/StructuredList.Skeleton.js +5 -6
- package/es/components/Tabs/Tabs.Skeleton.js +5 -6
- package/es/components/Tabs/Tabs.js +83 -98
- package/es/components/Tabs/usePressable.js +7 -8
- package/es/components/Tag/DismissibleTag.js +16 -17
- package/es/components/Tag/OperationalTag.js +10 -11
- package/es/components/Tag/SelectableTag.js +13 -14
- package/es/components/Tag/Tag.Skeleton.js +5 -6
- package/es/components/Tag/Tag.js +19 -20
- package/es/components/Text/Text.js +6 -7
- package/es/components/Text/TextDirection.js +5 -6
- package/es/components/TextArea/TextArea.js +3 -3
- package/es/components/TextInput/ControlledPasswordInput.js +24 -25
- package/es/components/TextInput/PasswordInput.js +26 -27
- package/es/components/TextInput/TextInput.Skeleton.js +5 -6
- package/es/components/TextInput/TextInput.js +27 -28
- package/es/components/TextInput/util.js +14 -17
- package/es/components/Theme/index.js +10 -12
- package/es/components/Tile/Tile.js +68 -74
- package/es/components/Toggle/Toggle.Skeleton.js +4 -5
- package/es/components/Toggle/Toggle.js +17 -18
- package/es/components/ToggleSmall/ToggleSmall.Skeleton.js +6 -7
- package/es/components/Toggletip/index.js +33 -39
- package/es/components/Tooltip/DefinitionTooltip.js +13 -14
- package/es/components/Tooltip/Tooltip.js +15 -16
- package/es/components/TreeView/TreeNode.js +20 -21
- package/es/components/TreeView/TreeView.js +14 -16
- package/es/components/UIShell/Content.js +6 -7
- package/es/components/UIShell/Header.js +5 -6
- package/es/components/UIShell/HeaderContainer.js +5 -6
- package/es/components/UIShell/HeaderGlobalAction.js +12 -13
- package/es/components/UIShell/HeaderMenu.d.ts +10 -112
- package/es/components/UIShell/HeaderMenu.js +154 -201
- package/es/components/UIShell/HeaderMenuButton.js +10 -11
- package/es/components/UIShell/HeaderMenuItem.js +10 -11
- package/es/components/UIShell/HeaderName.js +6 -7
- package/es/components/UIShell/HeaderNavigation.js +7 -8
- package/es/components/UIShell/HeaderPanel.js +9 -10
- package/es/components/UIShell/HeaderSideNavItems.js +5 -6
- package/es/components/UIShell/Link.js +8 -9
- package/es/components/UIShell/SideNav.js +23 -25
- package/es/components/UIShell/SideNavDetails.js +6 -7
- package/es/components/UIShell/SideNavDivider.js +3 -4
- package/es/components/UIShell/SideNavFooter.js +6 -7
- package/es/components/UIShell/SideNavHeader.js +5 -6
- package/es/components/UIShell/SideNavIcon.js +5 -6
- package/es/components/UIShell/SideNavItem.js +5 -6
- package/es/components/UIShell/SideNavItems.js +5 -6
- package/es/components/UIShell/SideNavLink.js +10 -11
- package/es/components/UIShell/SideNavLinkText.js +5 -6
- package/es/components/UIShell/SideNavMenu.js +11 -12
- package/es/components/UIShell/SkipToContent.js +7 -8
- package/es/components/UIShell/Switcher.js +4 -5
- package/es/components/UIShell/SwitcherDivider.js +4 -5
- package/es/components/UnorderedList/UnorderedList.js +6 -7
- package/es/index.js +2 -2
- package/es/internal/FloatingMenu.js +26 -28
- package/es/internal/Selection.js +15 -17
- package/es/internal/getAnnouncement.d.ts +8 -0
- package/es/internal/getAnnouncement.js +22 -0
- package/es/internal/keyboard/match.js +6 -7
- package/es/internal/useControllableState.d.ts +1 -1
- package/es/internal/useControllableState.js +8 -9
- package/es/internal/useDelayedState.js +1 -2
- package/es/internal/useDocumentLang.d.ts +12 -0
- package/es/internal/useId.js +2 -4
- package/es/internal/useMatchMedia.js +1 -2
- package/es/internal/useMergedRefs.d.ts +1 -1
- package/es/internal/useNoInteractiveChildren.js +2 -4
- package/es/internal/useNormalizedInputProps.js +9 -10
- package/es/internal/useResizeObserver.js +4 -5
- package/es/internal/useSavedCallback.js +1 -3
- package/es/internal/wrapFocus.js +20 -29
- package/es/prop-types/deprecate.js +1 -4
- package/es/prop-types/deprecateValuesWithin.js +1 -4
- package/es/prop-types/isRequiredOneOf.js +1 -4
- package/es/prop-types/requiredIfGivenPropIsTruthy.js +1 -4
- package/es/tools/events.js +1 -4
- package/es/tools/mergeRefs.js +9 -14
- package/es/tools/uniqueId.js +1 -2
- package/es/tools/wrapComponent.js +9 -11
- package/lib/components/AILabel/index.js +27 -30
- package/lib/components/AISkeleton/AISkeletonIcon.js +4 -5
- package/lib/components/AISkeleton/AISkeletonPlaceholder.js +4 -5
- package/lib/components/AISkeleton/AISkeletonText.js +4 -5
- package/lib/components/Accordion/Accordion.Skeleton.js +9 -10
- package/lib/components/Accordion/Accordion.js +10 -11
- package/lib/components/Accordion/AccordionItem.js +13 -14
- package/lib/components/Accordion/AccordionProvider.js +4 -5
- package/lib/components/AspectRatio/AspectRatio.js +7 -8
- package/lib/components/BadgeIndicator/index.js +5 -6
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.js +4 -5
- package/lib/components/Button/Button.Skeleton.js +7 -8
- package/lib/components/Button/ButtonBase.js +23 -24
- package/lib/components/ChatButton/ChatButton.Skeleton.js +5 -6
- package/lib/components/ChatButton/ChatButton.js +11 -12
- package/lib/components/Checkbox/Checkbox.Skeleton.js +4 -5
- package/lib/components/Checkbox/Checkbox.js +19 -20
- package/lib/components/CheckboxGroup/CheckboxGroup.js +16 -17
- package/lib/components/ClassPrefix/index.js +4 -5
- package/lib/components/CodeSnippet/CodeSnippet.Skeleton.js +5 -6
- package/lib/components/CodeSnippet/CodeSnippet.js +25 -26
- package/lib/components/ComboBox/ComboBox.js +24 -30
- package/lib/components/ComboBox/tools/filter.js +9 -12
- package/lib/components/ComboButton/index.js +16 -18
- package/lib/components/ComposedModal/ComposedModal.js +31 -34
- package/lib/components/ComposedModal/ModalFooter.js +37 -42
- package/lib/components/ComposedModal/ModalHeader.js +14 -15
- package/lib/components/ContainedList/ContainedList.js +10 -11
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +9 -10
- package/lib/components/ContentSwitcher/ContentSwitcher.d.ts +9 -29
- package/lib/components/ContentSwitcher/ContentSwitcher.js +94 -126
- package/lib/components/ContentSwitcher/index.d.ts +3 -4
- package/lib/components/ContextMenu/useContextMenu.js +1 -2
- package/lib/components/Copy/Copy.js +11 -12
- package/lib/components/CopyButton/CopyButton.js +10 -11
- package/lib/components/DataTable/DataTable.js +45 -53
- package/lib/components/DataTable/Table.js +15 -18
- package/lib/components/DataTable/TableBatchAction.js +8 -11
- package/lib/components/DataTable/TableBatchActions.js +18 -20
- package/lib/components/DataTable/TableBody.js +8 -11
- package/lib/components/DataTable/TableContainer.js +9 -10
- package/lib/components/DataTable/TableDecoratorRow.js +4 -5
- package/lib/components/DataTable/TableExpandHeader.js +14 -15
- package/lib/components/DataTable/TableExpandRow.js +13 -14
- package/lib/components/DataTable/TableExpandedRow.js +6 -7
- package/lib/components/DataTable/TableHeader.js +15 -16
- package/lib/components/DataTable/TableSelectAll.js +11 -12
- package/lib/components/DataTable/TableSelectRow.js +12 -13
- package/lib/components/DataTable/TableSlugRow.js +4 -5
- package/lib/components/DataTable/TableToolbar.js +7 -8
- package/lib/components/DataTable/TableToolbarMenu.js +8 -9
- package/lib/components/DataTable/TableToolbarSearch.js +22 -24
- package/lib/components/DataTable/state/sorting.js +3 -4
- package/lib/components/DataTable/tools/filter.js +10 -12
- package/lib/components/DataTable/tools/normalize.js +6 -8
- package/lib/components/DataTable/tools/sorting.js +24 -30
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +11 -12
- package/lib/components/DatePicker/DatePicker.Skeleton.js +7 -8
- package/lib/components/DatePicker/DatePicker.js +87 -64
- package/lib/components/DatePickerInput/DatePickerInput.js +5 -6
- package/lib/components/Dialog/index.d.ts +193 -8
- package/lib/components/Dialog/index.js +457 -33
- package/lib/components/Dropdown/Dropdown.Skeleton.js +6 -7
- package/lib/components/Dropdown/Dropdown.js +40 -43
- package/lib/components/ErrorBoundary/ErrorBoundary.js +2 -2
- package/lib/components/ExpandableSearch/ExpandableSearch.js +9 -10
- package/lib/components/FeatureFlags/index.js +11 -12
- package/lib/components/FileUploader/FileUploader.Skeleton.js +4 -5
- package/lib/components/FileUploader/FileUploader.js +22 -24
- package/lib/components/FileUploader/FileUploaderButton.js +16 -17
- package/lib/components/FileUploader/FileUploaderDropContainer.js +15 -16
- package/lib/components/FileUploader/FileUploaderItem.js +13 -14
- package/lib/components/FileUploader/Filename.js +9 -10
- package/lib/components/FluidComboBox/FluidComboBox.Skeleton.js +4 -5
- package/lib/components/FluidComboBox/FluidComboBox.js +5 -6
- package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.js +5 -6
- package/lib/components/FluidDatePicker/FluidDatePicker.js +10 -11
- package/lib/components/FluidDropdown/FluidDropdown.Skeleton.js +4 -5
- package/lib/components/FluidDropdown/FluidDropdown.js +5 -6
- package/lib/components/FluidForm/FluidForm.js +5 -6
- package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +4 -5
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +6 -7
- package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.js +4 -5
- package/lib/components/FluidNumberInput/FluidNumberInput.d.ts +40 -1
- package/lib/components/FluidNumberInput/FluidNumberInput.js +38 -5
- package/lib/components/FluidSearch/FluidSearch.Skeleton.js +4 -5
- package/lib/components/FluidSearch/FluidSearch.js +4 -5
- package/lib/components/FluidSelect/FluidSelect.Skeleton.js +4 -5
- package/lib/components/FluidSelect/FluidSelect.js +5 -6
- package/lib/components/FluidTextArea/FluidTextArea.Skeleton.js +4 -5
- package/lib/components/FluidTextArea/FluidTextArea.js +4 -5
- package/lib/components/FluidTextInput/FluidTextInput.Skeleton.js +4 -5
- package/lib/components/FluidTextInput/FluidTextInput.js +5 -6
- package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +5 -6
- package/lib/components/FluidTimePicker/FluidTimePicker.js +11 -12
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +5 -6
- package/lib/components/Form/Form.js +5 -6
- package/lib/components/FormGroup/FormGroup.js +11 -12
- package/lib/components/FormItem/FormItem.js +5 -6
- package/lib/components/FormLabel/FormLabel.js +6 -7
- package/lib/components/Grid/CSSGrid.js +17 -19
- package/lib/components/Grid/Column.js +28 -27
- package/lib/components/Grid/ColumnHang.js +6 -7
- package/lib/components/Grid/FlexGrid.js +9 -10
- package/lib/components/Grid/GridContext.js +5 -6
- package/lib/components/Grid/Row.js +8 -9
- package/lib/components/Heading/index.js +5 -6
- package/lib/components/Icon/Icon.Skeleton.js +4 -5
- package/lib/components/IconButton/index.js +20 -21
- package/lib/components/IconIndicator/index.js +7 -8
- package/lib/components/IdPrefix/index.js +4 -5
- package/lib/components/InlineLoading/InlineLoading.js +9 -10
- package/lib/components/Layer/index.js +8 -9
- package/lib/components/Layout/index.js +21 -26
- package/lib/components/LayoutDirection/LayoutDirection.js +6 -7
- package/lib/components/Link/Link.d.ts +1 -1
- package/lib/components/Link/Link.js +14 -15
- package/lib/components/ListBox/ListBoxField.js +6 -7
- package/lib/components/ListBox/ListBoxMenu.js +5 -6
- package/lib/components/ListBox/ListBoxMenuIcon.js +4 -5
- package/lib/components/ListBox/ListBoxMenuItem.js +8 -10
- package/lib/components/ListBox/ListBoxSelection.js +8 -9
- package/lib/components/ListBox/next/ListBoxSelection.js +9 -10
- package/lib/components/ListBox/next/ListBoxTrigger.js +5 -6
- package/lib/components/ListItem/ListItem.js +5 -6
- package/lib/components/Loading/Loading.js +8 -9
- package/lib/components/Menu/Menu.js +23 -24
- package/lib/components/Menu/MenuItem.js +39 -44
- package/lib/components/MenuButton/index.js +16 -18
- package/lib/components/Modal/Modal.js +55 -63
- package/lib/components/ModalWrapper/ModalWrapper.js +2 -2
- package/lib/components/MultiSelect/FilterableMultiSelect.js +45 -47
- package/lib/components/MultiSelect/MultiSelect.js +43 -45
- package/lib/components/MultiSelect/tools/sorting.js +11 -15
- package/lib/components/Notification/Notification.js +96 -105
- package/lib/components/NumberInput/NumberFormatPropTypes.d.ts +29 -0
- package/lib/components/NumberInput/NumberFormatPropTypes.js +48 -0
- package/lib/components/NumberInput/NumberInput.Skeleton.js +6 -7
- package/lib/components/NumberInput/NumberInput.d.ts +39 -3
- package/lib/components/NumberInput/NumberInput.js +173 -43
- package/lib/components/OrderedList/OrderedList.js +7 -8
- package/lib/components/OverflowMenu/OverflowMenu.d.ts +1 -1
- package/lib/components/OverflowMenu/OverflowMenu.js +35 -41
- package/lib/components/OverflowMenu/next/index.js +12 -13
- package/lib/components/PageHeader/PageHeader.d.ts +29 -5
- package/lib/components/PageHeader/PageHeader.js +119 -73
- package/lib/components/Pagination/Pagination.Skeleton.js +4 -5
- package/lib/components/Pagination/Pagination.js +24 -25
- package/lib/components/Pagination/experimental/PageSelector.js +8 -9
- package/lib/components/Pagination/experimental/Pagination.js +20 -21
- package/lib/components/PaginationNav/PaginationNav.js +33 -38
- package/lib/components/Popover/index.js +26 -28
- package/lib/components/ProgressBar/ProgressBar.js +11 -12
- package/lib/components/ProgressIndicator/ProgressIndicator.Skeleton.js +5 -6
- package/lib/components/ProgressIndicator/ProgressIndicator.js +29 -32
- package/lib/components/RadioTile/RadioTile.js +17 -18
- package/lib/components/Search/Search.Skeleton.js +5 -6
- package/lib/components/Search/Search.js +26 -28
- package/lib/components/Select/Select.Skeleton.js +5 -6
- package/lib/components/Select/Select.js +24 -25
- package/lib/components/SelectItem/SelectItem.js +8 -9
- package/lib/components/SelectItemGroup/SelectItemGroup.js +7 -8
- package/lib/components/ShapeIndicator/index.js +7 -8
- package/lib/components/SkeletonIcon/SkeletonIcon.js +4 -5
- package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +4 -5
- package/lib/components/SkeletonText/SkeletonText.js +8 -9
- package/lib/components/Slider/Slider.Skeleton.js +8 -9
- package/lib/components/Slider/Slider.js +69 -83
- package/lib/components/Slider/SliderHandles.js +6 -6
- package/lib/components/StructuredList/StructuredList.Skeleton.js +5 -6
- package/lib/components/Tabs/Tabs.Skeleton.js +5 -6
- package/lib/components/Tabs/Tabs.js +83 -98
- package/lib/components/Tabs/usePressable.js +7 -8
- package/lib/components/Tag/DismissibleTag.js +16 -17
- package/lib/components/Tag/OperationalTag.js +10 -11
- package/lib/components/Tag/SelectableTag.js +13 -14
- package/lib/components/Tag/Tag.Skeleton.js +5 -6
- package/lib/components/Tag/Tag.js +19 -20
- package/lib/components/Text/Text.js +6 -7
- package/lib/components/Text/TextDirection.js +5 -6
- package/lib/components/TextArea/TextArea.js +3 -3
- package/lib/components/TextInput/ControlledPasswordInput.js +24 -25
- package/lib/components/TextInput/PasswordInput.js +26 -27
- package/lib/components/TextInput/TextInput.Skeleton.js +5 -6
- package/lib/components/TextInput/TextInput.js +27 -28
- package/lib/components/TextInput/util.js +14 -17
- package/lib/components/Theme/index.js +10 -12
- package/lib/components/Tile/Tile.js +68 -74
- package/lib/components/Toggle/Toggle.Skeleton.js +4 -5
- package/lib/components/Toggle/Toggle.js +17 -18
- package/lib/components/ToggleSmall/ToggleSmall.Skeleton.js +6 -7
- package/lib/components/Toggletip/index.js +33 -39
- package/lib/components/Tooltip/DefinitionTooltip.js +13 -14
- package/lib/components/Tooltip/Tooltip.js +15 -16
- package/lib/components/TreeView/TreeNode.js +20 -21
- package/lib/components/TreeView/TreeView.js +14 -16
- package/lib/components/UIShell/Content.js +6 -7
- package/lib/components/UIShell/Header.js +5 -6
- package/lib/components/UIShell/HeaderContainer.js +5 -6
- package/lib/components/UIShell/HeaderGlobalAction.js +12 -13
- package/lib/components/UIShell/HeaderMenu.d.ts +10 -112
- package/lib/components/UIShell/HeaderMenu.js +152 -199
- package/lib/components/UIShell/HeaderMenuButton.js +10 -11
- package/lib/components/UIShell/HeaderMenuItem.js +10 -11
- package/lib/components/UIShell/HeaderName.js +6 -7
- package/lib/components/UIShell/HeaderNavigation.js +7 -8
- package/lib/components/UIShell/HeaderPanel.js +9 -10
- package/lib/components/UIShell/HeaderSideNavItems.js +5 -6
- package/lib/components/UIShell/Link.js +8 -9
- package/lib/components/UIShell/SideNav.js +23 -25
- package/lib/components/UIShell/SideNavDetails.js +6 -7
- package/lib/components/UIShell/SideNavDivider.js +3 -4
- package/lib/components/UIShell/SideNavFooter.js +6 -7
- package/lib/components/UIShell/SideNavHeader.js +5 -6
- package/lib/components/UIShell/SideNavIcon.js +5 -6
- package/lib/components/UIShell/SideNavItem.js +5 -6
- package/lib/components/UIShell/SideNavItems.js +5 -6
- package/lib/components/UIShell/SideNavLink.js +10 -11
- package/lib/components/UIShell/SideNavLinkText.js +5 -6
- package/lib/components/UIShell/SideNavMenu.js +11 -12
- package/lib/components/UIShell/SkipToContent.js +7 -8
- package/lib/components/UIShell/Switcher.js +4 -5
- package/lib/components/UIShell/SwitcherDivider.js +4 -5
- package/lib/components/UnorderedList/UnorderedList.js +6 -7
- package/lib/index.js +35 -35
- package/lib/internal/FloatingMenu.js +26 -28
- package/lib/internal/Selection.js +15 -17
- package/lib/internal/getAnnouncement.d.ts +8 -0
- package/lib/internal/getAnnouncement.js +26 -0
- package/lib/internal/keyboard/match.js +6 -7
- package/lib/internal/useControllableState.d.ts +1 -1
- package/lib/internal/useControllableState.js +8 -9
- package/lib/internal/useDelayedState.js +1 -2
- package/lib/internal/useDocumentLang.d.ts +12 -0
- package/lib/internal/useId.js +2 -4
- package/lib/internal/useMatchMedia.js +1 -2
- package/lib/internal/useMergedRefs.d.ts +1 -1
- package/lib/internal/useNoInteractiveChildren.js +2 -4
- package/lib/internal/useNormalizedInputProps.js +9 -10
- package/lib/internal/useResizeObserver.js +4 -5
- package/lib/internal/useSavedCallback.js +1 -3
- package/lib/internal/wrapFocus.js +20 -29
- package/lib/prop-types/deprecate.js +1 -4
- package/lib/prop-types/deprecateValuesWithin.js +1 -4
- package/lib/prop-types/isRequiredOneOf.js +1 -4
- package/lib/prop-types/requiredIfGivenPropIsTruthy.js +1 -4
- package/lib/tools/events.js +1 -4
- package/lib/tools/mergeRefs.js +9 -14
- package/lib/tools/uniqueId.js +1 -2
- package/lib/tools/wrapComponent.js +9 -11
- package/package.json +21 -19
- package/telemetry.yml +23 -1
- package/es/components/ContentSwitcher/index.js +0 -13
- package/es/feature-flags.d.ts +0 -7
- package/es/internal/useAnnouncer.js +0 -21
- package/lib/components/ContentSwitcher/index.js +0 -18
- package/lib/feature-flags.d.ts +0 -7
- package/lib/internal/useAnnouncer.js +0 -25
|
@@ -17,27 +17,26 @@ import { IconButton } from '../../IconButton/index.js';
|
|
|
17
17
|
import { usePrefix } from '../../../internal/usePrefix.js';
|
|
18
18
|
|
|
19
19
|
var _CaretLeft, _CaretRight;
|
|
20
|
-
function Pagination(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
} = _ref;
|
|
20
|
+
function Pagination({
|
|
21
|
+
backwardText = 'Previous page',
|
|
22
|
+
children = undefined,
|
|
23
|
+
className = null,
|
|
24
|
+
disabled = false,
|
|
25
|
+
forwardText = 'Next page',
|
|
26
|
+
id = 1,
|
|
27
|
+
initialPage = 1,
|
|
28
|
+
itemsPerPageText = 'Items per page:',
|
|
29
|
+
itemRangeText = (min, max, total) => `${min}–${max} of ${total} items`,
|
|
30
|
+
itemText = (min, max) => `${min}–${max} items`,
|
|
31
|
+
onChange,
|
|
32
|
+
pageRangeText = (current, total) => `${current} of ${total} pages`,
|
|
33
|
+
pageSize = 10,
|
|
34
|
+
pageSizes = undefined,
|
|
35
|
+
pageText = page => `page ${page}`,
|
|
36
|
+
pagesUnknown = false,
|
|
37
|
+
totalItems = undefined,
|
|
38
|
+
...other
|
|
39
|
+
}) {
|
|
41
40
|
const [currentPage, setCurrentPage] = useState(initialPage);
|
|
42
41
|
const [currentPageSize, setCurrentPageSize] = useState(pageSize);
|
|
43
42
|
const prefix = usePrefix();
|
|
@@ -41,8 +41,7 @@ function usePrevious(value) {
|
|
|
41
41
|
});
|
|
42
42
|
return ref.current;
|
|
43
43
|
}
|
|
44
|
-
function calculateCuts(page, totalItems, itemsDisplayedOnPage) {
|
|
45
|
-
let splitPoint = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
44
|
+
function calculateCuts(page, totalItems, itemsDisplayedOnPage, splitPoint = null) {
|
|
46
45
|
if (itemsDisplayedOnPage >= totalItems) {
|
|
47
46
|
return {
|
|
48
47
|
front: 0,
|
|
@@ -65,13 +64,12 @@ function calculateCuts(page, totalItems, itemsDisplayedOnPage) {
|
|
|
65
64
|
back: backHidden
|
|
66
65
|
};
|
|
67
66
|
}
|
|
68
|
-
function DirectionButton(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
} = _ref;
|
|
67
|
+
function DirectionButton({
|
|
68
|
+
direction,
|
|
69
|
+
label,
|
|
70
|
+
disabled,
|
|
71
|
+
onClick
|
|
72
|
+
}) {
|
|
75
73
|
const prefix = usePrefix();
|
|
76
74
|
return /*#__PURE__*/React.createElement("li", {
|
|
77
75
|
className: `${prefix}--pagination-nav__list-item`
|
|
@@ -83,13 +81,12 @@ function DirectionButton(_ref) {
|
|
|
83
81
|
onClick: onClick
|
|
84
82
|
}, direction === 'forward' ? _CaretRight || (_CaretRight = /*#__PURE__*/React.createElement(CaretRight, null)) : _CaretLeft || (_CaretLeft = /*#__PURE__*/React.createElement(CaretLeft, null))));
|
|
85
83
|
}
|
|
86
|
-
function PaginationItem(
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
} = _ref2;
|
|
84
|
+
function PaginationItem({
|
|
85
|
+
page,
|
|
86
|
+
isActive,
|
|
87
|
+
onClick,
|
|
88
|
+
translateWithId: t = translateWithId
|
|
89
|
+
}) {
|
|
93
90
|
const prefix = usePrefix();
|
|
94
91
|
const itemLabel = t('carbon.pagination-nav.item');
|
|
95
92
|
return /*#__PURE__*/React.createElement("li", {
|
|
@@ -106,15 +103,14 @@ function PaginationItem(_ref2) {
|
|
|
106
103
|
className: `${prefix}--pagination-nav__accessibility-label`
|
|
107
104
|
}, isActive ? `${t('carbon.pagination-nav.active')}, ${itemLabel}` : itemLabel), page));
|
|
108
105
|
}
|
|
109
|
-
function PaginationOverflow(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
} = _ref3;
|
|
106
|
+
function PaginationOverflow({
|
|
107
|
+
fromIndex = NaN,
|
|
108
|
+
count = NaN,
|
|
109
|
+
onSelect,
|
|
110
|
+
// eslint-disable-next-line react/prop-types
|
|
111
|
+
disableOverflow,
|
|
112
|
+
translateWithId: t = translateWithId
|
|
113
|
+
}) {
|
|
118
114
|
const prefix = usePrefix();
|
|
119
115
|
|
|
120
116
|
//If overflow is disabled, return a select tag with no select options
|
|
@@ -169,19 +165,18 @@ function PaginationOverflow(_ref3) {
|
|
|
169
165
|
}
|
|
170
166
|
return null;
|
|
171
167
|
}
|
|
172
|
-
const PaginationNav = /*#__PURE__*/React.forwardRef(function PaginationNav(
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
} = _ref4;
|
|
168
|
+
const PaginationNav = /*#__PURE__*/React.forwardRef(function PaginationNav({
|
|
169
|
+
className,
|
|
170
|
+
onChange = () => {},
|
|
171
|
+
totalItems = NaN,
|
|
172
|
+
disableOverflow,
|
|
173
|
+
itemsShown = 10,
|
|
174
|
+
page = 0,
|
|
175
|
+
loop = false,
|
|
176
|
+
size = 'lg',
|
|
177
|
+
translateWithId: t = translateWithId,
|
|
178
|
+
...rest
|
|
179
|
+
}, ref) {
|
|
185
180
|
const smMediaQuery = `(max-width: ${breakpoints.sm.width})`;
|
|
186
181
|
const isSm = useMatchMedia(smMediaQuery);
|
|
187
182
|
let numberOfPages;
|
|
@@ -33,25 +33,24 @@ const PopoverContext = /*#__PURE__*/React.createContext({
|
|
|
33
33
|
* @deprecated Use NewPopoverAlignment instead.
|
|
34
34
|
*/
|
|
35
35
|
|
|
36
|
-
const Popover = /*#__PURE__*/React.forwardRef(function PopoverRenderFunction(
|
|
36
|
+
const Popover = /*#__PURE__*/React.forwardRef(function PopoverRenderFunction({
|
|
37
|
+
isTabTip,
|
|
38
|
+
align: initialAlign = isTabTip ? 'bottom-start' : 'bottom',
|
|
39
|
+
as: BaseComponent = 'span',
|
|
40
|
+
autoAlign = false,
|
|
41
|
+
autoAlignBoundary,
|
|
42
|
+
caret = isTabTip ? false : true,
|
|
43
|
+
className: customClassName,
|
|
44
|
+
children,
|
|
45
|
+
dropShadow = true,
|
|
46
|
+
highContrast = false,
|
|
47
|
+
onRequestClose,
|
|
48
|
+
open,
|
|
49
|
+
alignmentAxisOffset,
|
|
50
|
+
...rest
|
|
51
|
+
},
|
|
37
52
|
//this is a workaround, have to come back and fix this.
|
|
38
53
|
forwardRef) {
|
|
39
|
-
let {
|
|
40
|
-
isTabTip,
|
|
41
|
-
align: initialAlign = isTabTip ? 'bottom-start' : 'bottom',
|
|
42
|
-
as: BaseComponent = 'span',
|
|
43
|
-
autoAlign = false,
|
|
44
|
-
autoAlignBoundary,
|
|
45
|
-
caret = isTabTip ? false : true,
|
|
46
|
-
className: customClassName,
|
|
47
|
-
children,
|
|
48
|
-
dropShadow = true,
|
|
49
|
-
highContrast = false,
|
|
50
|
-
onRequestClose,
|
|
51
|
-
open,
|
|
52
|
-
alignmentAxisOffset,
|
|
53
|
-
...rest
|
|
54
|
-
} = _ref;
|
|
55
54
|
const prefix = usePrefix();
|
|
56
55
|
const floating = useRef(null);
|
|
57
56
|
const caretRef = useRef(null);
|
|
@@ -65,10 +64,9 @@ forwardRef) {
|
|
|
65
64
|
onRequestClose?.();
|
|
66
65
|
}
|
|
67
66
|
});
|
|
68
|
-
useWindowEvent('click',
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
} = _ref2;
|
|
67
|
+
useWindowEvent('click', ({
|
|
68
|
+
target
|
|
69
|
+
}) => {
|
|
72
70
|
if (open && target instanceof Node && !popover.current?.contains(target)) {
|
|
73
71
|
onRequestClose?.();
|
|
74
72
|
}
|
|
@@ -338,13 +336,13 @@ Popover.propTypes = {
|
|
|
338
336
|
*/
|
|
339
337
|
open: PropTypes.bool.isRequired
|
|
340
338
|
};
|
|
341
|
-
function PopoverContentRenderFunction(
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
339
|
+
function PopoverContentRenderFunction(
|
|
340
|
+
// eslint-disable-next-line react/prop-types
|
|
341
|
+
{
|
|
342
|
+
className,
|
|
343
|
+
children,
|
|
344
|
+
...rest
|
|
345
|
+
}, forwardRef) {
|
|
348
346
|
const prefix = usePrefix();
|
|
349
347
|
const {
|
|
350
348
|
setFloating,
|
|
@@ -14,18 +14,17 @@ import { useId } from '../../internal/useId.js';
|
|
|
14
14
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
15
15
|
import useIsomorphicEffect from '../../internal/useIsomorphicEffect.js';
|
|
16
16
|
|
|
17
|
-
function ProgressBar(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
} = _ref;
|
|
17
|
+
function ProgressBar({
|
|
18
|
+
className,
|
|
19
|
+
helperText,
|
|
20
|
+
hideLabel,
|
|
21
|
+
label,
|
|
22
|
+
max = 100,
|
|
23
|
+
size = 'big',
|
|
24
|
+
status = 'active',
|
|
25
|
+
type = 'default',
|
|
26
|
+
value
|
|
27
|
+
}) {
|
|
29
28
|
const labelId = useId('progress-bar');
|
|
30
29
|
const helperId = useId('progress-bar-helper');
|
|
31
30
|
const helperTextId = useId('progress-bar-helper-text');
|
|
@@ -25,12 +25,11 @@ function Step() {
|
|
|
25
25
|
className: `${prefix}--progress-line`
|
|
26
26
|
})));
|
|
27
27
|
}
|
|
28
|
-
function ProgressIndicatorSkeleton(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} = _ref;
|
|
28
|
+
function ProgressIndicatorSkeleton({
|
|
29
|
+
className,
|
|
30
|
+
vertical,
|
|
31
|
+
...rest
|
|
32
|
+
}) {
|
|
34
33
|
const prefix = usePrefix();
|
|
35
34
|
return /*#__PURE__*/React.createElement("ul", _extends({
|
|
36
35
|
className: cx(`${prefix}--progress`, `${prefix}--skeleton`, {
|
|
@@ -30,16 +30,15 @@ const defaultTranslations = {
|
|
|
30
30
|
function translateWithId(messageId) {
|
|
31
31
|
return defaultTranslations[messageId];
|
|
32
32
|
}
|
|
33
|
-
function ProgressIndicator(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
} = _ref;
|
|
33
|
+
function ProgressIndicator({
|
|
34
|
+
children,
|
|
35
|
+
className: customClassName,
|
|
36
|
+
currentIndex: controlledIndex = 0,
|
|
37
|
+
onChange,
|
|
38
|
+
spaceEqually,
|
|
39
|
+
vertical,
|
|
40
|
+
...rest
|
|
41
|
+
}) {
|
|
43
42
|
const prefix = usePrefix();
|
|
44
43
|
const [currentIndex, setCurrentIndex] = useState(controlledIndex);
|
|
45
44
|
const [prevControlledIndex, setPrevControlledIndex] = useState(controlledIndex);
|
|
@@ -114,20 +113,19 @@ ProgressIndicator.propTypes = {
|
|
|
114
113
|
*/
|
|
115
114
|
vertical: PropTypes.bool
|
|
116
115
|
};
|
|
117
|
-
function ProgressStep(
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
} = _ref2;
|
|
116
|
+
function ProgressStep({
|
|
117
|
+
label,
|
|
118
|
+
description,
|
|
119
|
+
className,
|
|
120
|
+
current,
|
|
121
|
+
complete,
|
|
122
|
+
invalid,
|
|
123
|
+
secondaryLabel,
|
|
124
|
+
disabled,
|
|
125
|
+
onClick,
|
|
126
|
+
translateWithId: t = translateWithId,
|
|
127
|
+
...rest
|
|
128
|
+
}) {
|
|
131
129
|
const prefix = usePrefix();
|
|
132
130
|
const classes = cx({
|
|
133
131
|
[`${prefix}--progress-step`]: true,
|
|
@@ -142,14 +140,13 @@ function ProgressStep(_ref2) {
|
|
|
142
140
|
onClick(e);
|
|
143
141
|
}
|
|
144
142
|
};
|
|
145
|
-
const SVGIcon =
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
} = _ref3;
|
|
143
|
+
const SVGIcon = ({
|
|
144
|
+
complete,
|
|
145
|
+
current,
|
|
146
|
+
description,
|
|
147
|
+
invalid,
|
|
148
|
+
prefix
|
|
149
|
+
}) => {
|
|
153
150
|
if (invalid) {
|
|
154
151
|
return /*#__PURE__*/React.createElement(Warning, {
|
|
155
152
|
className: `${prefix}--progress__warning`
|
|
@@ -21,24 +21,23 @@ import { useFeatureFlag } from '../FeatureFlags/index.js';
|
|
|
21
21
|
import { Text } from '../Text/Text.js';
|
|
22
22
|
|
|
23
23
|
var _RadioButtonChecked, _RadioButton, _CheckmarkFilled;
|
|
24
|
-
const RadioTile = /*#__PURE__*/React.forwardRef(function RadioTile(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
} = _ref;
|
|
24
|
+
const RadioTile = /*#__PURE__*/React.forwardRef(function RadioTile({
|
|
25
|
+
children,
|
|
26
|
+
className: customClassName,
|
|
27
|
+
decorator,
|
|
28
|
+
disabled,
|
|
29
|
+
light,
|
|
30
|
+
checked,
|
|
31
|
+
name,
|
|
32
|
+
value,
|
|
33
|
+
id,
|
|
34
|
+
onChange = noopFn,
|
|
35
|
+
tabIndex = 0,
|
|
36
|
+
hasRoundedCorners,
|
|
37
|
+
slug,
|
|
38
|
+
required,
|
|
39
|
+
...rest
|
|
40
|
+
}, ref) {
|
|
42
41
|
const prefix = usePrefix();
|
|
43
42
|
const inputId = useFallbackId(id);
|
|
44
43
|
const className = cx(customClassName, `${prefix}--tile`, `${prefix}--tile--selectable`, `${prefix}--tile--radio`, {
|
|
@@ -11,12 +11,11 @@ import React from 'react';
|
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
13
|
|
|
14
|
-
const SearchSkeleton =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} = _ref;
|
|
14
|
+
const SearchSkeleton = ({
|
|
15
|
+
small = false,
|
|
16
|
+
className,
|
|
17
|
+
...rest
|
|
18
|
+
}) => {
|
|
20
19
|
const prefix = usePrefix();
|
|
21
20
|
const searchClasses = cx(className, {
|
|
22
21
|
[`${prefix}--skeleton`]: true,
|
|
@@ -22,30 +22,29 @@ import { FormContext } from '../FluidForm/FormContext.js';
|
|
|
22
22
|
import { noopFn } from '../../internal/noopFn.js';
|
|
23
23
|
|
|
24
24
|
var _Close;
|
|
25
|
-
const Search = /*#__PURE__*/React.forwardRef(function Search(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
} = _ref;
|
|
25
|
+
const Search = /*#__PURE__*/React.forwardRef(function Search({
|
|
26
|
+
autoComplete = 'off',
|
|
27
|
+
className,
|
|
28
|
+
closeButtonLabelText = 'Clear search input',
|
|
29
|
+
defaultValue,
|
|
30
|
+
disabled,
|
|
31
|
+
isExpanded = true,
|
|
32
|
+
id,
|
|
33
|
+
labelText,
|
|
34
|
+
// @ts-expect-error: deprecated prop
|
|
35
|
+
light,
|
|
36
|
+
onChange = () => {},
|
|
37
|
+
onClear = () => {},
|
|
38
|
+
onKeyDown,
|
|
39
|
+
onExpand,
|
|
40
|
+
placeholder = 'Search',
|
|
41
|
+
renderIcon,
|
|
42
|
+
role = 'searchbox',
|
|
43
|
+
size = 'md',
|
|
44
|
+
type = 'text',
|
|
45
|
+
value,
|
|
46
|
+
...rest
|
|
47
|
+
}, forwardRef) {
|
|
49
48
|
const hasPropValue = value || defaultValue ? true : false;
|
|
50
49
|
const prefix = usePrefix();
|
|
51
50
|
const {
|
|
@@ -256,10 +255,9 @@ Search.propTypes = {
|
|
|
256
255
|
*/
|
|
257
256
|
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
258
257
|
};
|
|
259
|
-
function CustomSearchIcon(
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
} = _ref2;
|
|
258
|
+
function CustomSearchIcon({
|
|
259
|
+
icon: Icon
|
|
260
|
+
}) {
|
|
263
261
|
const prefix = usePrefix();
|
|
264
262
|
if (Icon) {
|
|
265
263
|
return /*#__PURE__*/React.createElement(Icon, {
|
|
@@ -11,12 +11,11 @@ import React from 'react';
|
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
13
|
|
|
14
|
-
const SelectSkeleton =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} = _ref;
|
|
14
|
+
const SelectSkeleton = ({
|
|
15
|
+
hideLabel,
|
|
16
|
+
className,
|
|
17
|
+
...rest
|
|
18
|
+
}) => {
|
|
20
19
|
const prefix = usePrefix();
|
|
21
20
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
22
21
|
className: cx(`${prefix}--form-item`, className)
|
|
@@ -19,31 +19,30 @@ import { composeEventHandlers } from '../../tools/events.js';
|
|
|
19
19
|
import '../Text/index.js';
|
|
20
20
|
import { Text } from '../Text/Text.js';
|
|
21
21
|
|
|
22
|
-
const Select = /*#__PURE__*/React.forwardRef(function Select(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
} = _ref;
|
|
22
|
+
const Select = /*#__PURE__*/React.forwardRef(function Select({
|
|
23
|
+
className,
|
|
24
|
+
decorator,
|
|
25
|
+
id,
|
|
26
|
+
inline = false,
|
|
27
|
+
labelText = 'Select',
|
|
28
|
+
disabled = false,
|
|
29
|
+
children,
|
|
30
|
+
// reserved for use with Pagination component
|
|
31
|
+
noLabel = false,
|
|
32
|
+
// eslint-disable-next-line no-unused-vars
|
|
33
|
+
hideLabel = false,
|
|
34
|
+
invalid = false,
|
|
35
|
+
invalidText = '',
|
|
36
|
+
helperText = '',
|
|
37
|
+
light = false,
|
|
38
|
+
readOnly,
|
|
39
|
+
size,
|
|
40
|
+
warn = false,
|
|
41
|
+
warnText,
|
|
42
|
+
onChange,
|
|
43
|
+
slug,
|
|
44
|
+
...other
|
|
45
|
+
}, ref) {
|
|
47
46
|
const prefix = usePrefix();
|
|
48
47
|
const {
|
|
49
48
|
isFluid
|
|
@@ -11,15 +11,14 @@ import React from 'react';
|
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
13
|
|
|
14
|
-
const SelectItem =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} = _ref;
|
|
14
|
+
const SelectItem = ({
|
|
15
|
+
className,
|
|
16
|
+
value = '',
|
|
17
|
+
disabled = false,
|
|
18
|
+
hidden = false,
|
|
19
|
+
text = '',
|
|
20
|
+
...other
|
|
21
|
+
}) => {
|
|
23
22
|
const prefix = usePrefix();
|
|
24
23
|
const selectItemClasses = cx({
|
|
25
24
|
[`${prefix}--select-option`]: true,
|
|
@@ -11,14 +11,13 @@ import React from 'react';
|
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
13
|
|
|
14
|
-
const SelectItemGroup =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} = _ref;
|
|
14
|
+
const SelectItemGroup = ({
|
|
15
|
+
children,
|
|
16
|
+
className,
|
|
17
|
+
disabled = false,
|
|
18
|
+
label,
|
|
19
|
+
...other
|
|
20
|
+
}) => {
|
|
22
21
|
const prefix = usePrefix();
|
|
23
22
|
const classNames = cx(`${prefix}--select-optgroup`, className);
|
|
24
23
|
return /*#__PURE__*/React.createElement("optgroup", _extends({
|
|
@@ -46,14 +46,13 @@ const shapeTypes = {
|
|
|
46
46
|
incomplete: incompleteIcon,
|
|
47
47
|
draft: CircleStroke
|
|
48
48
|
};
|
|
49
|
-
const ShapeIndicator = /*#__PURE__*/React.forwardRef(function ShapeIndicatorContent(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
} = _ref;
|
|
49
|
+
const ShapeIndicator = /*#__PURE__*/React.forwardRef(function ShapeIndicatorContent({
|
|
50
|
+
className: customClassName,
|
|
51
|
+
kind,
|
|
52
|
+
label,
|
|
53
|
+
textSize = 12,
|
|
54
|
+
...rest
|
|
55
|
+
}, ref) {
|
|
57
56
|
const prefix = usePrefix();
|
|
58
57
|
const classNames = cx(`${prefix}--shape-indicator`, customClassName, {
|
|
59
58
|
[`${prefix}--shape-indicator--14`]: textSize == 14
|
|
@@ -11,11 +11,10 @@ import React from 'react';
|
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
13
|
|
|
14
|
-
const SkeletonIcon =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} = _ref;
|
|
14
|
+
const SkeletonIcon = ({
|
|
15
|
+
className,
|
|
16
|
+
...other
|
|
17
|
+
}) => {
|
|
19
18
|
const prefix = usePrefix();
|
|
20
19
|
const skeletonIconClasses = cx(className, {
|
|
21
20
|
[`${prefix}--icon--skeleton`]: true
|