@carbon/react 1.83.0-rc.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 +895 -790
- package/README.md +1 -1
- package/es/components/AILabel/index.js +37 -40
- package/es/components/AISkeleton/AISkeletonIcon.js +6 -7
- package/es/components/AISkeleton/AISkeletonPlaceholder.js +6 -7
- package/es/components/AISkeleton/AISkeletonText.js +6 -7
- package/es/components/Accordion/Accordion.Skeleton.js +24 -25
- package/es/components/Accordion/Accordion.js +13 -14
- package/es/components/Accordion/AccordionItem.js +22 -23
- package/es/components/Accordion/AccordionProvider.js +6 -7
- package/es/components/AspectRatio/AspectRatio.js +9 -10
- package/es/components/BadgeIndicator/index.js +7 -8
- package/es/components/Breadcrumb/Breadcrumb.Skeleton.js +9 -10
- package/es/components/Breadcrumb/Breadcrumb.js +3 -3
- package/es/components/Breadcrumb/BreadcrumbItem.js +9 -9
- package/es/components/Button/Button.Skeleton.js +10 -11
- package/es/components/Button/Button.js +5 -5
- package/es/components/Button/ButtonBase.js +27 -28
- package/es/components/ButtonSet/ButtonSet.js +2 -2
- package/es/components/ChatButton/ChatButton.Skeleton.js +7 -8
- package/es/components/ChatButton/ChatButton.js +13 -14
- package/es/components/Checkbox/Checkbox.Skeleton.js +8 -9
- package/es/components/Checkbox/Checkbox.js +33 -34
- package/es/components/CheckboxGroup/CheckboxGroup.js +28 -29
- package/es/components/ClassPrefix/index.js +6 -7
- package/es/components/CodeSnippet/CodeSnippet.Skeleton.js +12 -13
- package/es/components/CodeSnippet/CodeSnippet.js +41 -42
- package/es/components/ComboBox/ComboBox.js +42 -48
- package/es/components/ComboBox/tools/filter.js +9 -12
- package/es/components/ComboButton/index.js +22 -24
- package/es/components/ComposedModal/ComposedModal.js +49 -52
- package/es/components/ComposedModal/ModalFooter.js +42 -47
- package/es/components/ComposedModal/ModalHeader.js +21 -22
- package/es/components/ContainedList/ContainedList.js +17 -18
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +16 -17
- package/es/components/ContentSwitcher/ContentSwitcher.d.ts +17 -29
- package/es/components/ContentSwitcher/ContentSwitcher.js +100 -126
- package/es/components/ContentSwitcher/index.d.ts +3 -4
- package/es/components/ContextMenu/useContextMenu.js +1 -2
- package/es/components/Copy/Copy.js +13 -14
- package/es/components/CopyButton/CopyButton.js +14 -15
- package/es/components/DangerButton/DangerButton.js +2 -2
- package/es/components/DataTable/DataTable.d.ts +81 -283
- package/es/components/DataTable/DataTable.js +124 -172
- package/es/components/DataTable/Table.d.ts +2 -2
- package/es/components/DataTable/Table.js +19 -22
- package/es/components/DataTable/TableActionList.d.ts +1 -1
- package/es/components/DataTable/TableBatchAction.js +9 -12
- package/es/components/DataTable/TableBatchActions.js +27 -29
- package/es/components/DataTable/TableBody.d.ts +3 -3
- package/es/components/DataTable/TableBody.js +9 -12
- package/es/components/DataTable/TableCell.d.ts +3 -4
- package/es/components/DataTable/TableCell.js +2 -2
- package/es/components/DataTable/TableContainer.d.ts +2 -3
- package/es/components/DataTable/TableContainer.js +15 -16
- package/es/components/DataTable/TableDecoratorRow.js +8 -9
- package/es/components/DataTable/TableExpandHeader.d.ts +2 -3
- package/es/components/DataTable/TableExpandHeader.js +18 -19
- package/es/components/DataTable/TableExpandRow.js +20 -21
- package/es/components/DataTable/TableExpandedRow.d.ts +3 -3
- package/es/components/DataTable/TableExpandedRow.js +10 -11
- package/es/components/DataTable/TableHead.d.ts +1 -1
- package/es/components/DataTable/TableHeader.d.ts +4 -4
- package/es/components/DataTable/TableHeader.js +29 -30
- package/es/components/DataTable/TableRow.d.ts +3 -4
- package/es/components/DataTable/TableRow.js +4 -4
- package/es/components/DataTable/TableSelectAll.js +14 -15
- package/es/components/DataTable/TableSelectRow.js +16 -17
- package/es/components/DataTable/TableSlugRow.js +7 -8
- package/es/components/DataTable/TableToolbar.js +9 -10
- package/es/components/DataTable/TableToolbarAction.js +2 -2
- package/es/components/DataTable/TableToolbarContent.d.ts +1 -1
- package/es/components/DataTable/TableToolbarMenu.js +10 -11
- package/es/components/DataTable/TableToolbarSearch.js +24 -26
- package/es/components/DataTable/index.d.ts +1 -1
- 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 +26 -27
- package/es/components/DatePicker/DatePicker.Skeleton.js +15 -16
- package/es/components/DatePicker/DatePicker.js +104 -81
- package/es/components/DatePickerInput/DatePickerInput.d.ts +3 -4
- package/es/components/DatePickerInput/DatePickerInput.js +24 -25
- package/es/components/Dialog/index.d.ts +194 -10
- package/es/components/Dialog/index.js +458 -39
- package/es/components/Dropdown/Dropdown.Skeleton.d.ts +2 -3
- package/es/components/Dropdown/Dropdown.Skeleton.js +10 -11
- package/es/components/Dropdown/Dropdown.d.ts +3 -3
- package/es/components/Dropdown/Dropdown.js +57 -60
- package/es/components/ErrorBoundary/ErrorBoundary.js +4 -4
- package/es/components/ExpandableSearch/ExpandableSearch.js +11 -12
- package/es/components/FeatureFlags/index.js +13 -14
- package/es/components/FileUploader/FileUploader.Skeleton.d.ts +3 -3
- package/es/components/FileUploader/FileUploader.Skeleton.js +9 -10
- package/es/components/FileUploader/FileUploader.d.ts +2 -3
- package/es/components/FileUploader/FileUploader.js +33 -35
- package/es/components/FileUploader/FileUploaderButton.d.ts +2 -3
- package/es/components/FileUploader/FileUploaderButton.js +20 -21
- package/es/components/FileUploader/FileUploaderDropContainer.d.ts +2 -3
- package/es/components/FileUploader/FileUploaderDropContainer.js +20 -21
- package/es/components/FileUploader/FileUploaderItem.d.ts +2 -3
- package/es/components/FileUploader/FileUploaderItem.js +26 -27
- package/es/components/FileUploader/Filename.d.ts +3 -4
- package/es/components/FileUploader/Filename.js +16 -17
- package/es/components/FluidComboBox/FluidComboBox.Skeleton.js +9 -10
- package/es/components/FluidComboBox/FluidComboBox.js +8 -9
- package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.js +16 -17
- package/es/components/FluidDatePicker/FluidDatePicker.js +13 -14
- package/es/components/FluidDatePickerInput/FluidDatePickerInput.js +3 -3
- package/es/components/FluidDropdown/FluidDropdown.Skeleton.js +9 -10
- package/es/components/FluidDropdown/FluidDropdown.js +8 -9
- package/es/components/FluidForm/FluidForm.d.ts +3 -4
- package/es/components/FluidForm/FluidForm.js +8 -9
- package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +9 -10
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +10 -11
- package/es/components/FluidNumberInput/FluidNumberInput.Skeleton.js +9 -10
- package/es/components/FluidNumberInput/FluidNumberInput.d.ts +40 -1
- package/es/components/FluidNumberInput/FluidNumberInput.js +41 -8
- package/es/components/FluidSearch/FluidSearch.Skeleton.js +9 -10
- package/es/components/FluidSearch/FluidSearch.js +7 -8
- package/es/components/FluidSelect/FluidSelect.Skeleton.js +9 -10
- package/es/components/FluidSelect/FluidSelect.js +8 -9
- package/es/components/FluidTextArea/FluidTextArea.Skeleton.js +9 -10
- package/es/components/FluidTextArea/FluidTextArea.js +7 -8
- package/es/components/FluidTextInput/FluidTextInput.Skeleton.js +9 -10
- package/es/components/FluidTextInput/FluidTextInput.js +9 -10
- package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.js +8 -9
- package/es/components/FluidTimePicker/FluidTimePicker.js +23 -24
- package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +7 -8
- package/es/components/Form/Form.js +7 -8
- package/es/components/FormGroup/FormGroup.d.ts +3 -4
- package/es/components/FormGroup/FormGroup.js +15 -16
- package/es/components/FormItem/FormItem.js +7 -8
- package/es/components/FormLabel/FormLabel.js +8 -9
- package/es/components/Grid/CSSGrid.js +23 -25
- package/es/components/Grid/Column.js +32 -31
- package/es/components/Grid/ColumnHang.js +8 -9
- package/es/components/Grid/FlexGrid.js +12 -13
- package/es/components/Grid/Grid.js +3 -3
- package/es/components/Grid/GridContext.d.ts +2 -2
- package/es/components/Grid/GridContext.js +6 -7
- package/es/components/Grid/Row.js +10 -11
- package/es/components/Heading/index.js +13 -14
- package/es/components/Icon/Icon.Skeleton.js +6 -7
- package/es/components/IconButton/index.js +30 -26
- package/es/components/IconIndicator/index.js +10 -11
- package/es/components/IdPrefix/index.js +6 -7
- package/es/components/InlineCheckbox/InlineCheckbox.js +6 -6
- package/es/components/InlineLoading/InlineLoading.js +19 -20
- package/es/components/Layer/LayerContext.js +2 -2
- package/es/components/Layer/index.d.ts +4 -0
- package/es/components/Layer/index.js +21 -15
- package/es/components/Layout/index.js +24 -29
- package/es/components/LayoutDirection/LayoutDirection.js +10 -11
- package/es/components/LayoutDirection/LayoutDirectionContext.js +2 -2
- package/es/components/Link/Link.d.ts +1 -1
- package/es/components/Link/Link.js +19 -20
- package/es/components/ListBox/ListBox.d.ts +2 -3
- package/es/components/ListBox/ListBox.js +5 -5
- package/es/components/ListBox/ListBoxField.d.ts +3 -4
- package/es/components/ListBox/ListBoxField.js +8 -9
- package/es/components/ListBox/ListBoxMenu.d.ts +2 -3
- package/es/components/ListBox/ListBoxMenu.js +7 -8
- package/es/components/ListBox/ListBoxMenuIcon.js +8 -9
- package/es/components/ListBox/ListBoxMenuItem.d.ts +2 -3
- package/es/components/ListBox/ListBoxMenuItem.js +11 -13
- package/es/components/ListBox/ListBoxSelection.js +14 -15
- package/es/components/ListBox/next/ListBoxSelection.js +16 -17
- package/es/components/ListBox/next/ListBoxTrigger.js +8 -9
- package/es/components/ListItem/ListItem.js +7 -8
- package/es/components/Loading/Loading.d.ts +3 -3
- package/es/components/Loading/Loading.js +14 -15
- package/es/components/Menu/Menu.js +26 -27
- package/es/components/Menu/MenuItem.js +55 -60
- package/es/components/MenuButton/index.js +20 -22
- package/es/components/Modal/Modal.d.ts +2 -3
- package/es/components/Modal/Modal.js +85 -93
- package/es/components/ModalWrapper/ModalWrapper.js +9 -9
- package/es/components/MultiSelect/FilterableMultiSelect.js +68 -74
- package/es/components/MultiSelect/MultiSelect.js +65 -67
- package/es/components/MultiSelect/tools/sorting.js +11 -15
- package/es/components/Notification/Notification.js +137 -146
- package/es/components/NumberInput/NumberFormatPropTypes.d.ts +29 -0
- package/es/components/NumberInput/NumberFormatPropTypes.js +40 -0
- package/es/components/NumberInput/NumberInput.Skeleton.js +10 -11
- package/es/components/NumberInput/NumberInput.d.ts +39 -3
- package/es/components/NumberInput/NumberInput.js +195 -65
- package/es/components/OrderedList/OrderedList.js +9 -10
- package/es/components/OverflowMenu/OverflowMenu.d.ts +1 -1
- package/es/components/OverflowMenu/OverflowMenu.js +42 -48
- package/es/components/OverflowMenu/index.js +3 -3
- package/es/components/OverflowMenu/next/index.js +17 -18
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +4 -4
- package/es/components/OverflowMenuV2/index.js +3 -3
- package/es/components/PageHeader/PageHeader.d.ts +29 -5
- package/es/components/PageHeader/PageHeader.js +136 -90
- package/es/components/Pagination/Pagination.Skeleton.js +12 -13
- package/es/components/Pagination/Pagination.js +40 -41
- package/es/components/Pagination/experimental/PageSelector.js +11 -12
- package/es/components/Pagination/experimental/Pagination.js +34 -35
- package/es/components/PaginationNav/PaginationNav.js +63 -68
- package/es/components/Popover/index.js +40 -42
- package/es/components/PrimaryButton/PrimaryButton.js +2 -2
- package/es/components/ProgressBar/ProgressBar.js +24 -25
- package/es/components/ProgressIndicator/ProgressIndicator.Skeleton.js +12 -13
- package/es/components/ProgressIndicator/ProgressIndicator.js +49 -52
- package/es/components/RadioButton/RadioButton.Skeleton.js +4 -4
- package/es/components/RadioButton/RadioButton.js +10 -10
- package/es/components/RadioButtonGroup/RadioButtonGroup.js +16 -16
- package/es/components/RadioTile/RadioTile.js +28 -29
- package/es/components/Search/Search.Skeleton.js +9 -10
- package/es/components/Search/Search.js +36 -38
- package/es/components/SecondaryButton/SecondaryButton.js +2 -2
- package/es/components/Select/Select.Skeleton.js +10 -11
- package/es/components/Select/Select.js +42 -43
- package/es/components/SelectItem/SelectItem.js +10 -11
- package/es/components/SelectItemGroup/SelectItemGroup.js +9 -10
- package/es/components/ShapeIndicator/index.js +13 -14
- package/es/components/SkeletonIcon/SkeletonIcon.d.ts +0 -4
- package/es/components/SkeletonIcon/SkeletonIcon.js +7 -12
- package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +6 -7
- package/es/components/SkeletonText/SkeletonText.js +12 -13
- package/es/components/Slider/Slider.Skeleton.js +25 -26
- package/es/components/Slider/Slider.js +99 -113
- package/es/components/Slider/SliderHandles.js +20 -20
- package/es/components/Stack/HStack.js +2 -2
- package/es/components/Stack/Stack.js +2 -2
- package/es/components/Stack/VStack.js +2 -2
- package/es/components/StructuredList/StructuredList.Skeleton.js +17 -18
- package/es/components/StructuredList/StructuredList.js +24 -24
- package/es/components/Switch/IconSwitch.js +3 -3
- package/es/components/Switch/Switch.js +4 -4
- package/es/components/TabContent/TabContent.js +2 -2
- package/es/components/Tabs/Tabs.Skeleton.js +12 -13
- package/es/components/Tabs/Tabs.js +141 -156
- package/es/components/Tabs/usePressable.js +7 -8
- package/es/components/Tag/DismissibleTag.js +26 -27
- package/es/components/Tag/OperationalTag.js +16 -17
- package/es/components/Tag/SelectableTag.js +19 -20
- package/es/components/Tag/Tag.Skeleton.js +7 -8
- package/es/components/Tag/Tag.js +33 -34
- package/es/components/Text/Text.js +9 -10
- package/es/components/Text/TextDirection.js +7 -8
- package/es/components/Text/createTextComponent.js +2 -2
- package/es/components/TextArea/TextArea.Skeleton.js +4 -4
- package/es/components/TextArea/TextArea.js +22 -22
- package/es/components/TextInput/ControlledPasswordInput.d.ts +2 -3
- package/es/components/TextInput/ControlledPasswordInput.js +36 -37
- package/es/components/TextInput/PasswordInput.js +40 -41
- package/es/components/TextInput/TextInput.Skeleton.js +9 -10
- package/es/components/TextInput/TextInput.js +43 -44
- package/es/components/TextInput/util.js +14 -17
- package/es/components/Theme/index.js +19 -21
- package/es/components/Tile/Tile.js +98 -104
- package/es/components/TileGroup/TileGroup.d.ts +3 -4
- package/es/components/TileGroup/TileGroup.js +8 -8
- package/es/components/TimePicker/TimePicker.d.ts +2 -3
- package/es/components/TimePicker/TimePicker.js +14 -14
- package/es/components/TimePickerSelect/TimePickerSelect.js +4 -4
- package/es/components/Toggle/Toggle.Skeleton.js +8 -9
- package/es/components/Toggle/Toggle.js +27 -28
- package/es/components/ToggleSmall/ToggleSmall.Skeleton.js +14 -15
- package/es/components/Toggletip/index.js +43 -49
- package/es/components/Tooltip/DefinitionTooltip.js +17 -18
- package/es/components/Tooltip/Tooltip.d.ts +3 -0
- package/es/components/Tooltip/Tooltip.js +39 -28
- package/es/components/TreeView/TreeNode.js +64 -56
- package/es/components/TreeView/TreeView.js +44 -37
- package/es/components/UIShell/Content.js +8 -9
- package/es/components/UIShell/Header.js +7 -8
- package/es/components/UIShell/HeaderContainer.js +7 -8
- package/es/components/UIShell/HeaderGlobalAction.js +14 -15
- package/es/components/UIShell/HeaderGlobalBar.d.ts +1 -1
- package/es/components/UIShell/HeaderMenu.d.ts +10 -112
- package/es/components/UIShell/HeaderMenu.js +154 -201
- package/es/components/UIShell/HeaderMenuButton.js +14 -15
- package/es/components/UIShell/HeaderMenuItem.js +21 -20
- package/es/components/UIShell/HeaderName.js +9 -10
- package/es/components/UIShell/HeaderNavigation.js +10 -11
- package/es/components/UIShell/HeaderPanel.js +11 -12
- package/es/components/UIShell/HeaderSideNavItems.js +7 -8
- package/es/components/UIShell/Link.js +11 -12
- package/es/components/UIShell/SideNav.js +30 -32
- package/es/components/UIShell/SideNavDetails.js +9 -10
- package/es/components/UIShell/SideNavDivider.js +6 -7
- package/es/components/UIShell/SideNavFooter.js +13 -14
- package/es/components/UIShell/SideNavHeader.js +8 -9
- package/es/components/UIShell/SideNavIcon.js +7 -8
- package/es/components/UIShell/SideNavItem.js +7 -8
- package/es/components/UIShell/SideNavItems.js +10 -11
- package/es/components/UIShell/SideNavLink.js +15 -16
- package/es/components/UIShell/SideNavLinkText.js +7 -8
- package/es/components/UIShell/SideNavMenu.js +20 -21
- package/es/components/UIShell/SideNavMenuItem.js +5 -5
- package/es/components/UIShell/SideNavSwitcher.js +8 -8
- package/es/components/UIShell/SkipToContent.js +9 -10
- package/es/components/UIShell/Switcher.js +12 -13
- package/es/components/UIShell/SwitcherDivider.js +6 -7
- package/es/components/UIShell/SwitcherItem.js +3 -3
- package/es/components/UnorderedList/UnorderedList.js +8 -9
- package/es/index.js +25 -26
- package/es/internal/FloatingMenu.js +30 -32
- package/es/internal/Selection.js +15 -17
- package/{lib/feature-flags.d.ts → es/internal/__mocks__/mockHTMLElement.d.ts} +4 -2
- package/es/internal/createClassWrapper.js +2 -2
- 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 +4 -6
- package/es/internal/useIdPrefix.js +3 -3
- 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 +12 -13
- package/es/internal/usePrefix.js +3 -3
- package/es/internal/useResizeObserver.d.ts +14 -0
- package/es/internal/useResizeObserver.js +73 -0
- package/es/internal/useSavedCallback.js +1 -3
- package/es/internal/wrapFocus.js +23 -35
- 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.d.ts +3 -4
- package/es/tools/wrapComponent.js +11 -13
- package/es/types/common.d.ts +0 -2
- 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 +27 -29
- 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 +17 -29
- package/lib/components/ContentSwitcher/ContentSwitcher.js +98 -124
- 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.d.ts +81 -283
- package/lib/components/DataTable/DataTable.js +123 -172
- package/lib/components/DataTable/Table.d.ts +2 -2
- package/lib/components/DataTable/Table.js +15 -18
- package/lib/components/DataTable/TableActionList.d.ts +1 -1
- package/lib/components/DataTable/TableBatchAction.js +8 -11
- package/lib/components/DataTable/TableBatchActions.js +18 -20
- package/lib/components/DataTable/TableBody.d.ts +3 -3
- package/lib/components/DataTable/TableBody.js +8 -11
- package/lib/components/DataTable/TableCell.d.ts +3 -4
- package/lib/components/DataTable/TableContainer.d.ts +2 -3
- package/lib/components/DataTable/TableContainer.js +9 -10
- package/lib/components/DataTable/TableDecoratorRow.js +4 -5
- package/lib/components/DataTable/TableExpandHeader.d.ts +2 -3
- package/lib/components/DataTable/TableExpandHeader.js +14 -15
- package/lib/components/DataTable/TableExpandRow.js +13 -14
- package/lib/components/DataTable/TableExpandedRow.d.ts +3 -3
- package/lib/components/DataTable/TableExpandedRow.js +6 -7
- package/lib/components/DataTable/TableHead.d.ts +1 -1
- package/lib/components/DataTable/TableHeader.d.ts +4 -4
- package/lib/components/DataTable/TableHeader.js +15 -16
- package/lib/components/DataTable/TableRow.d.ts +3 -4
- 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/TableToolbarContent.d.ts +1 -1
- package/lib/components/DataTable/TableToolbarMenu.js +8 -9
- package/lib/components/DataTable/TableToolbarSearch.js +22 -24
- package/lib/components/DataTable/index.d.ts +1 -1
- 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.d.ts +3 -4
- package/lib/components/DatePickerInput/DatePickerInput.js +5 -6
- package/lib/components/Dialog/index.d.ts +194 -10
- package/lib/components/Dialog/index.js +457 -33
- package/lib/components/Dropdown/Dropdown.Skeleton.d.ts +2 -3
- package/lib/components/Dropdown/Dropdown.Skeleton.js +6 -7
- package/lib/components/Dropdown/Dropdown.d.ts +3 -3
- 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.d.ts +3 -3
- package/lib/components/FileUploader/FileUploader.Skeleton.js +4 -5
- package/lib/components/FileUploader/FileUploader.d.ts +2 -3
- package/lib/components/FileUploader/FileUploader.js +22 -24
- package/lib/components/FileUploader/FileUploaderButton.d.ts +2 -3
- package/lib/components/FileUploader/FileUploaderButton.js +16 -17
- package/lib/components/FileUploader/FileUploaderDropContainer.d.ts +2 -3
- package/lib/components/FileUploader/FileUploaderDropContainer.js +15 -16
- package/lib/components/FileUploader/FileUploaderItem.d.ts +2 -3
- package/lib/components/FileUploader/FileUploaderItem.js +13 -14
- package/lib/components/FileUploader/Filename.d.ts +3 -4
- 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.d.ts +3 -4
- 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.d.ts +3 -4
- 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.d.ts +2 -2
- package/lib/components/Grid/GridContext.js +10 -29
- 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 +26 -22
- 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.d.ts +4 -0
- package/lib/components/Layer/index.js +16 -10
- 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 +15 -16
- package/lib/components/ListBox/ListBox.d.ts +2 -3
- package/lib/components/ListBox/ListBoxField.d.ts +3 -4
- package/lib/components/ListBox/ListBoxField.js +6 -7
- package/lib/components/ListBox/ListBoxMenu.d.ts +2 -3
- package/lib/components/ListBox/ListBoxMenu.js +5 -6
- package/lib/components/ListBox/ListBoxMenuIcon.js +4 -5
- package/lib/components/ListBox/ListBoxMenuItem.d.ts +2 -3
- 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.d.ts +3 -3
- 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.d.ts +2 -3
- package/lib/components/Modal/Modal.js +55 -63
- package/lib/components/ModalWrapper/ModalWrapper.js +2 -2
- package/lib/components/MultiSelect/FilterableMultiSelect.js +46 -52
- 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.d.ts +0 -4
- package/lib/components/SkeletonIcon/SkeletonIcon.js +5 -10
- 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.d.ts +2 -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/TileGroup/TileGroup.d.ts +3 -4
- package/lib/components/TimePicker/TimePicker.d.ts +2 -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.d.ts +3 -0
- package/lib/components/Tooltip/Tooltip.js +33 -22
- package/lib/components/TreeView/TreeNode.js +40 -32
- package/lib/components/TreeView/TreeView.js +41 -34
- 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/HeaderGlobalBar.d.ts +1 -1
- 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 +17 -16
- 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 +81 -82
- package/lib/internal/FloatingMenu.js +26 -28
- package/lib/internal/Selection.js +15 -17
- package/{es/feature-flags.d.ts → lib/internal/__mocks__/mockHTMLElement.d.ts} +4 -2
- 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.d.ts +14 -0
- package/lib/internal/useResizeObserver.js +77 -0
- package/lib/internal/useSavedCallback.js +1 -3
- package/lib/internal/wrapFocus.js +23 -35
- 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.d.ts +3 -4
- package/lib/tools/wrapComponent.js +9 -11
- package/lib/types/common.d.ts +0 -2
- package/package.json +21 -20
- package/scss/components/content-switcher/_tokens.scss +9 -0
- package/telemetry.yml +27 -2
- package/es/components/ContentSwitcher/index.js +0 -13
- package/es/components/DataTable/index.js +0 -76
- package/es/internal/useAnnouncer.js +0 -21
- package/lib/components/ContentSwitcher/index.js +0 -18
- package/lib/components/DataTable/index.js +0 -82
- package/lib/internal/useAnnouncer.js +0 -25
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
|
-
import
|
|
10
|
+
import React, { useState, useRef, useEffect } from 'react';
|
|
11
11
|
import deprecate from '../../prop-types/deprecate.js';
|
|
12
12
|
import cx from 'classnames';
|
|
13
13
|
import { Close, ErrorFilled, CheckmarkFilled, WarningFilled, WarningAltFilled, InformationFilled, InformationSquareFilled } from '@carbon/icons-react';
|
|
@@ -33,8 +33,7 @@ import { Text } from '../Text/Text.js';
|
|
|
33
33
|
* @param {func} callback - function to be called
|
|
34
34
|
* @param {bool} override - escape hatch to conditionally call the callback
|
|
35
35
|
*/
|
|
36
|
-
function useEscapeToClose(ref, callback) {
|
|
37
|
-
let override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
36
|
+
function useEscapeToClose(ref, callback, override = true) {
|
|
38
37
|
const handleKeyDown = event => {
|
|
39
38
|
// The callback should only be called when focus is on or within the container
|
|
40
39
|
const elementContainsFocus = ref.current && document.activeElement === ref.current || ref.current?.contains(document.activeElement);
|
|
@@ -49,19 +48,18 @@ function useEscapeToClose(ref, callback) {
|
|
|
49
48
|
return () => document.removeEventListener('keydown', handleKeyDown, false);
|
|
50
49
|
});
|
|
51
50
|
}
|
|
52
|
-
function NotificationActionButton(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
} = _ref;
|
|
51
|
+
function NotificationActionButton({
|
|
52
|
+
children,
|
|
53
|
+
className: customClassName,
|
|
54
|
+
onClick,
|
|
55
|
+
inline,
|
|
56
|
+
...rest
|
|
57
|
+
}) {
|
|
60
58
|
const prefix = usePrefix();
|
|
61
59
|
const className = cx(customClassName, {
|
|
62
60
|
[`${prefix}--actionable-notification__action-button`]: true
|
|
63
61
|
});
|
|
64
|
-
return /*#__PURE__*/
|
|
62
|
+
return /*#__PURE__*/React.createElement(Button, _extends({
|
|
65
63
|
className: className,
|
|
66
64
|
kind: inline ? 'ghost' : 'tertiary',
|
|
67
65
|
onClick: onClick,
|
|
@@ -92,17 +90,16 @@ NotificationActionButton.propTypes = {
|
|
|
92
90
|
* ==================
|
|
93
91
|
*/
|
|
94
92
|
|
|
95
|
-
function NotificationButton(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
} = _ref2;
|
|
93
|
+
function NotificationButton({
|
|
94
|
+
'aria-label': ariaLabel = 'close notification',
|
|
95
|
+
ariaLabel: deprecatedAriaLabel,
|
|
96
|
+
className,
|
|
97
|
+
type = 'button',
|
|
98
|
+
renderIcon: IconTag = Close,
|
|
99
|
+
name,
|
|
100
|
+
notificationType = 'toast',
|
|
101
|
+
...rest
|
|
102
|
+
}) {
|
|
106
103
|
const prefix = usePrefix();
|
|
107
104
|
const buttonClassName = cx(className, {
|
|
108
105
|
[`${prefix}--${notificationType}-notification__close-button`]: notificationType
|
|
@@ -110,13 +107,13 @@ function NotificationButton(_ref2) {
|
|
|
110
107
|
const iconClassName = cx({
|
|
111
108
|
[`${prefix}--${notificationType}-notification__close-icon`]: notificationType
|
|
112
109
|
});
|
|
113
|
-
return /*#__PURE__*/
|
|
110
|
+
return /*#__PURE__*/React.createElement("button", _extends({}, rest, {
|
|
114
111
|
// eslint-disable-next-line react/button-has-type
|
|
115
112
|
type: type,
|
|
116
113
|
"aria-label": deprecatedAriaLabel || ariaLabel,
|
|
117
114
|
title: deprecatedAriaLabel || ariaLabel,
|
|
118
115
|
className: buttonClassName
|
|
119
|
-
}), IconTag && /*#__PURE__*/
|
|
116
|
+
}), IconTag && /*#__PURE__*/React.createElement(IconTag, {
|
|
120
117
|
className: iconClassName,
|
|
121
118
|
name: name
|
|
122
119
|
}));
|
|
@@ -167,21 +164,20 @@ const iconTypes = {
|
|
|
167
164
|
info: InformationFilled,
|
|
168
165
|
['info-square']: InformationSquareFilled
|
|
169
166
|
};
|
|
170
|
-
function NotificationIcon(
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
} = _ref3;
|
|
167
|
+
function NotificationIcon({
|
|
168
|
+
iconDescription,
|
|
169
|
+
kind,
|
|
170
|
+
notificationType
|
|
171
|
+
}) {
|
|
176
172
|
const prefix = usePrefix();
|
|
177
173
|
const IconForKind = iconTypes[kind];
|
|
178
174
|
if (!IconForKind) {
|
|
179
175
|
return null;
|
|
180
176
|
}
|
|
181
|
-
return /*#__PURE__*/
|
|
177
|
+
return /*#__PURE__*/React.createElement(IconForKind, {
|
|
182
178
|
className: `${prefix}--${notificationType}-notification__icon`,
|
|
183
179
|
size: 20
|
|
184
|
-
}, /*#__PURE__*/
|
|
180
|
+
}, /*#__PURE__*/React.createElement("title", null, iconDescription));
|
|
185
181
|
}
|
|
186
182
|
NotificationIcon.propTypes = {
|
|
187
183
|
iconDescription: PropTypes.string.isRequired,
|
|
@@ -194,26 +190,25 @@ NotificationIcon.propTypes = {
|
|
|
194
190
|
* =================
|
|
195
191
|
*/
|
|
196
192
|
|
|
197
|
-
function ToastNotification(
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
} = _ref4;
|
|
193
|
+
function ToastNotification({
|
|
194
|
+
['aria-label']: ariaLabel,
|
|
195
|
+
// @ts-expect-error: deprecated prop
|
|
196
|
+
ariaLabel: deprecatedAriaLabel,
|
|
197
|
+
role = 'status',
|
|
198
|
+
onClose,
|
|
199
|
+
onCloseButtonClick = noopFn,
|
|
200
|
+
statusIconDescription,
|
|
201
|
+
className,
|
|
202
|
+
children,
|
|
203
|
+
kind = 'error',
|
|
204
|
+
lowContrast,
|
|
205
|
+
hideCloseButton = false,
|
|
206
|
+
timeout = 0,
|
|
207
|
+
title,
|
|
208
|
+
caption,
|
|
209
|
+
subtitle,
|
|
210
|
+
...rest
|
|
211
|
+
}) {
|
|
217
212
|
const [isOpen, setIsOpen] = useState(true);
|
|
218
213
|
const prefix = usePrefix();
|
|
219
214
|
const containerClassName = cx(className, {
|
|
@@ -254,28 +249,28 @@ function ToastNotification(_ref4) {
|
|
|
254
249
|
if (!isOpen) {
|
|
255
250
|
return null;
|
|
256
251
|
}
|
|
257
|
-
return /*#__PURE__*/
|
|
252
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
258
253
|
ref: ref
|
|
259
254
|
}, rest, {
|
|
260
255
|
role: role,
|
|
261
256
|
className: containerClassName
|
|
262
|
-
}), /*#__PURE__*/
|
|
257
|
+
}), /*#__PURE__*/React.createElement(NotificationIcon, {
|
|
263
258
|
notificationType: "toast",
|
|
264
259
|
kind: kind,
|
|
265
260
|
iconDescription: statusIconDescription || `${kind} icon`
|
|
266
|
-
}), /*#__PURE__*/
|
|
261
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
267
262
|
ref: contentRef,
|
|
268
263
|
className: `${prefix}--toast-notification__details`
|
|
269
|
-
}, title && /*#__PURE__*/
|
|
264
|
+
}, title && /*#__PURE__*/React.createElement(Text, {
|
|
270
265
|
as: "div",
|
|
271
266
|
className: `${prefix}--toast-notification__title`
|
|
272
|
-
}, title), subtitle && /*#__PURE__*/
|
|
267
|
+
}, title), subtitle && /*#__PURE__*/React.createElement(Text, {
|
|
273
268
|
as: "div",
|
|
274
269
|
className: `${prefix}--toast-notification__subtitle`
|
|
275
|
-
}, subtitle), caption && /*#__PURE__*/
|
|
270
|
+
}, subtitle), caption && /*#__PURE__*/React.createElement(Text, {
|
|
276
271
|
as: "div",
|
|
277
272
|
className: `${prefix}--toast-notification__caption`
|
|
278
|
-
}, caption), children), !hideCloseButton && /*#__PURE__*/
|
|
273
|
+
}, caption), children), !hideCloseButton && /*#__PURE__*/React.createElement(NotificationButton, {
|
|
279
274
|
notificationType: "toast",
|
|
280
275
|
onClick: handleCloseButtonClick,
|
|
281
276
|
"aria-label": deprecatedAriaLabel || ariaLabel
|
|
@@ -351,22 +346,21 @@ ToastNotification.propTypes = {
|
|
|
351
346
|
* ==================
|
|
352
347
|
*/
|
|
353
348
|
|
|
354
|
-
function InlineNotification(
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
} = _ref5;
|
|
349
|
+
function InlineNotification({
|
|
350
|
+
['aria-label']: ariaLabel,
|
|
351
|
+
children,
|
|
352
|
+
title,
|
|
353
|
+
subtitle,
|
|
354
|
+
role = 'status',
|
|
355
|
+
onClose,
|
|
356
|
+
onCloseButtonClick = noopFn,
|
|
357
|
+
statusIconDescription,
|
|
358
|
+
className,
|
|
359
|
+
kind = 'error',
|
|
360
|
+
lowContrast,
|
|
361
|
+
hideCloseButton = false,
|
|
362
|
+
...rest
|
|
363
|
+
}) {
|
|
370
364
|
const [isOpen, setIsOpen] = useState(true);
|
|
371
365
|
const prefix = usePrefix();
|
|
372
366
|
const containerClassName = cx(className, {
|
|
@@ -390,27 +384,27 @@ function InlineNotification(_ref5) {
|
|
|
390
384
|
if (!isOpen) {
|
|
391
385
|
return null;
|
|
392
386
|
}
|
|
393
|
-
return /*#__PURE__*/
|
|
387
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
394
388
|
ref: ref
|
|
395
389
|
}, rest, {
|
|
396
390
|
role: role,
|
|
397
391
|
className: containerClassName
|
|
398
|
-
}), /*#__PURE__*/
|
|
392
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
399
393
|
className: `${prefix}--inline-notification__details`
|
|
400
|
-
}, /*#__PURE__*/
|
|
394
|
+
}, /*#__PURE__*/React.createElement(NotificationIcon, {
|
|
401
395
|
notificationType: "inline",
|
|
402
396
|
kind: kind,
|
|
403
397
|
iconDescription: statusIconDescription || `${kind} icon`
|
|
404
|
-
}), /*#__PURE__*/
|
|
398
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
405
399
|
ref: contentRef,
|
|
406
400
|
className: `${prefix}--inline-notification__text-wrapper`
|
|
407
|
-
}, title && /*#__PURE__*/
|
|
401
|
+
}, title && /*#__PURE__*/React.createElement(Text, {
|
|
408
402
|
as: "div",
|
|
409
403
|
className: `${prefix}--inline-notification__title`
|
|
410
|
-
}, title), subtitle && /*#__PURE__*/
|
|
404
|
+
}, title), subtitle && /*#__PURE__*/React.createElement(Text, {
|
|
411
405
|
as: "div",
|
|
412
406
|
className: `${prefix}--inline-notification__subtitle`
|
|
413
|
-
}, subtitle), children)), !hideCloseButton && /*#__PURE__*/
|
|
407
|
+
}, subtitle), children)), !hideCloseButton && /*#__PURE__*/React.createElement(NotificationButton, {
|
|
414
408
|
notificationType: "inline",
|
|
415
409
|
onClick: handleCloseButtonClick,
|
|
416
410
|
"aria-label": ariaLabel
|
|
@@ -473,29 +467,28 @@ InlineNotification.propTypes = {
|
|
|
473
467
|
* ======================
|
|
474
468
|
*/
|
|
475
469
|
|
|
476
|
-
function ActionableNotification(
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
} = _ref6;
|
|
470
|
+
function ActionableNotification({
|
|
471
|
+
actionButtonLabel,
|
|
472
|
+
['aria-label']: ariaLabel,
|
|
473
|
+
// @ts-expect-error: deprecated prop
|
|
474
|
+
ariaLabel: deprecatedAriaLabel,
|
|
475
|
+
children,
|
|
476
|
+
role = 'alertdialog',
|
|
477
|
+
onActionButtonClick,
|
|
478
|
+
onClose,
|
|
479
|
+
onCloseButtonClick = noopFn,
|
|
480
|
+
statusIconDescription,
|
|
481
|
+
className,
|
|
482
|
+
inline = false,
|
|
483
|
+
kind = 'error',
|
|
484
|
+
lowContrast,
|
|
485
|
+
hideCloseButton = false,
|
|
486
|
+
hasFocus = true,
|
|
487
|
+
closeOnEscape = true,
|
|
488
|
+
title,
|
|
489
|
+
subtitle,
|
|
490
|
+
...rest
|
|
491
|
+
}) {
|
|
499
492
|
const [isOpen, setIsOpen] = useState(true);
|
|
500
493
|
const prefix = usePrefix();
|
|
501
494
|
const id = useId('actionable-notification');
|
|
@@ -518,11 +511,10 @@ function ActionableNotification(_ref6) {
|
|
|
518
511
|
button?.focus();
|
|
519
512
|
}
|
|
520
513
|
});
|
|
521
|
-
function handleBlur(
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
} = _ref7;
|
|
514
|
+
function handleBlur({
|
|
515
|
+
target: oldActiveNode,
|
|
516
|
+
relatedTarget: currentActiveNode
|
|
517
|
+
}) {
|
|
526
518
|
if (isOpen && currentActiveNode && oldActiveNode && role === 'alertdialog') {
|
|
527
519
|
const {
|
|
528
520
|
current: bodyNode
|
|
@@ -564,47 +556,47 @@ function ActionableNotification(_ref6) {
|
|
|
564
556
|
if (!isOpen) {
|
|
565
557
|
return null;
|
|
566
558
|
}
|
|
567
|
-
return /*#__PURE__*/
|
|
559
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
|
|
568
560
|
ref: ref,
|
|
569
561
|
role: role,
|
|
570
562
|
className: containerClassName,
|
|
571
563
|
"aria-labelledby": title ? id : subtitleId,
|
|
572
564
|
onBlur: !focusTrapWithoutSentinels ? handleBlur : () => {},
|
|
573
565
|
onKeyDown: focusTrapWithoutSentinels ? handleKeyDown : () => {}
|
|
574
|
-
}), !focusTrapWithoutSentinels && /*#__PURE__*/
|
|
566
|
+
}), !focusTrapWithoutSentinels && /*#__PURE__*/React.createElement("span", {
|
|
575
567
|
ref: startTrap,
|
|
576
568
|
tabIndex: 0,
|
|
577
569
|
role: "link",
|
|
578
570
|
className: `${prefix}--visually-hidden`
|
|
579
|
-
}, "Focus sentinel"), /*#__PURE__*/
|
|
571
|
+
}, "Focus sentinel"), /*#__PURE__*/React.createElement("div", {
|
|
580
572
|
className: `${prefix}--actionable-notification__details`
|
|
581
|
-
}, /*#__PURE__*/
|
|
573
|
+
}, /*#__PURE__*/React.createElement(NotificationIcon, {
|
|
582
574
|
notificationType: inline ? 'inline' : 'toast',
|
|
583
575
|
kind: kind,
|
|
584
576
|
iconDescription: statusIconDescription || `${kind} icon`
|
|
585
|
-
}), /*#__PURE__*/
|
|
577
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
586
578
|
className: `${prefix}--actionable-notification__text-wrapper`
|
|
587
|
-
}, /*#__PURE__*/
|
|
579
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
588
580
|
className: `${prefix}--actionable-notification__content`
|
|
589
|
-
}, title && /*#__PURE__*/
|
|
581
|
+
}, title && /*#__PURE__*/React.createElement(Text, {
|
|
590
582
|
as: "div",
|
|
591
583
|
className: `${prefix}--actionable-notification__title`,
|
|
592
584
|
id: id
|
|
593
|
-
}, title), subtitle && /*#__PURE__*/
|
|
585
|
+
}, title), subtitle && /*#__PURE__*/React.createElement(Text, {
|
|
594
586
|
as: "div",
|
|
595
587
|
className: `${prefix}--actionable-notification__subtitle`,
|
|
596
588
|
id: subtitleId
|
|
597
|
-
}, subtitle), children))), /*#__PURE__*/
|
|
589
|
+
}, subtitle), children))), /*#__PURE__*/React.createElement("div", {
|
|
598
590
|
className: `${prefix}--actionable-notification__button-wrapper`,
|
|
599
591
|
ref: innerModal
|
|
600
|
-
}, actionButtonLabel && /*#__PURE__*/
|
|
592
|
+
}, actionButtonLabel && /*#__PURE__*/React.createElement(NotificationActionButton, {
|
|
601
593
|
onClick: onActionButtonClick,
|
|
602
594
|
inline: inline
|
|
603
|
-
}, actionButtonLabel), !hideCloseButton && /*#__PURE__*/
|
|
595
|
+
}, actionButtonLabel), !hideCloseButton && /*#__PURE__*/React.createElement(NotificationButton, {
|
|
604
596
|
"aria-label": deprecatedAriaLabel || ariaLabel,
|
|
605
597
|
notificationType: "actionable",
|
|
606
598
|
onClick: handleCloseButtonClick
|
|
607
|
-
})), !focusTrapWithoutSentinels && /*#__PURE__*/
|
|
599
|
+
})), !focusTrapWithoutSentinels && /*#__PURE__*/React.createElement("span", {
|
|
608
600
|
ref: endTrap,
|
|
609
601
|
tabIndex: 0,
|
|
610
602
|
role: "link",
|
|
@@ -708,20 +700,19 @@ const propMappingFunction = deprecatedValue => {
|
|
|
708
700
|
};
|
|
709
701
|
return mapping[deprecatedValue];
|
|
710
702
|
};
|
|
711
|
-
function Callout(
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
} = _ref8;
|
|
703
|
+
function Callout({
|
|
704
|
+
actionButtonLabel,
|
|
705
|
+
children,
|
|
706
|
+
onActionButtonClick,
|
|
707
|
+
title,
|
|
708
|
+
titleId,
|
|
709
|
+
subtitle,
|
|
710
|
+
statusIconDescription,
|
|
711
|
+
className,
|
|
712
|
+
kind = 'info',
|
|
713
|
+
lowContrast,
|
|
714
|
+
...rest
|
|
715
|
+
}) {
|
|
725
716
|
const prefix = usePrefix();
|
|
726
717
|
const containerClassName = cx(className, {
|
|
727
718
|
[`${prefix}--actionable-notification`]: true,
|
|
@@ -731,27 +722,27 @@ function Callout(_ref8) {
|
|
|
731
722
|
});
|
|
732
723
|
const childrenContainer = useRef(null);
|
|
733
724
|
useInteractiveChildrenNeedDescription(childrenContainer, `interactive child node(s) should have an \`aria-describedby\` property with a value matching the value of \`titleId\``);
|
|
734
|
-
return /*#__PURE__*/
|
|
725
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
|
|
735
726
|
className: containerClassName
|
|
736
|
-
}), /*#__PURE__*/
|
|
727
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
737
728
|
className: `${prefix}--actionable-notification__details`
|
|
738
|
-
}, /*#__PURE__*/
|
|
729
|
+
}, /*#__PURE__*/React.createElement(NotificationIcon, {
|
|
739
730
|
notificationType: "inline",
|
|
740
731
|
kind: kind,
|
|
741
732
|
iconDescription: statusIconDescription || `${kind} icon`
|
|
742
|
-
}), /*#__PURE__*/
|
|
733
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
743
734
|
ref: childrenContainer,
|
|
744
735
|
className: `${prefix}--actionable-notification__text-wrapper`
|
|
745
|
-
}, title && /*#__PURE__*/
|
|
736
|
+
}, title && /*#__PURE__*/React.createElement(Text, {
|
|
746
737
|
as: "div",
|
|
747
738
|
id: titleId,
|
|
748
739
|
className: `${prefix}--actionable-notification__title`
|
|
749
|
-
}, title), subtitle && /*#__PURE__*/
|
|
740
|
+
}, title), subtitle && /*#__PURE__*/React.createElement(Text, {
|
|
750
741
|
as: "div",
|
|
751
742
|
className: `${prefix}--actionable-notification__subtitle`
|
|
752
|
-
}, subtitle), children)), /*#__PURE__*/
|
|
743
|
+
}, subtitle), children)), /*#__PURE__*/React.createElement("div", {
|
|
753
744
|
className: `${prefix}--actionable-notification__button-wrapper`
|
|
754
|
-
}, actionButtonLabel && /*#__PURE__*/
|
|
745
|
+
}, actionButtonLabel && /*#__PURE__*/React.createElement(NotificationActionButton, {
|
|
755
746
|
onClick: onActionButtonClick,
|
|
756
747
|
"aria-describedby": titleId,
|
|
757
748
|
inline: true
|
|
@@ -816,7 +807,7 @@ const StaticNotification = props => {
|
|
|
816
807
|
process.env.NODE_ENV !== "production" ? warning(didWarnAboutDeprecation, '`StaticNotification` has been renamed to `Callout`.' + 'Run the following codemod to automatically update usages in your' + 'project: `npx @carbon/upgrade migrate refactor-to-callout --write`') : void 0;
|
|
817
808
|
didWarnAboutDeprecation = true;
|
|
818
809
|
}
|
|
819
|
-
return /*#__PURE__*/
|
|
810
|
+
return /*#__PURE__*/React.createElement(Callout, props);
|
|
820
811
|
};
|
|
821
812
|
|
|
822
813
|
export { ActionableNotification, Callout, InlineNotification, NotificationActionButton, NotificationButton, StaticNotification, ToastNotification };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2025
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
export declare const NumberFormatOptionsPropType: PropTypes.Requireable<PropTypes.InferProps<{
|
|
9
|
+
localeMatcher: PropTypes.Requireable<string>;
|
|
10
|
+
style: PropTypes.Requireable<string>;
|
|
11
|
+
currency: PropTypes.Requireable<string>;
|
|
12
|
+
currencyDisplay: PropTypes.Requireable<string>;
|
|
13
|
+
currencySign: PropTypes.Requireable<string>;
|
|
14
|
+
unit: PropTypes.Requireable<string>;
|
|
15
|
+
unitDisplay: PropTypes.Requireable<string>;
|
|
16
|
+
notation: PropTypes.Requireable<string>;
|
|
17
|
+
compactDisplay: PropTypes.Requireable<string>;
|
|
18
|
+
signDisplay: PropTypes.Requireable<string>;
|
|
19
|
+
minimumIntegerDigits: PropTypes.Requireable<number>;
|
|
20
|
+
minimumFractionDigits: PropTypes.Requireable<number>;
|
|
21
|
+
maximumFractionDigits: PropTypes.Requireable<number>;
|
|
22
|
+
minimumSignificantDigits: PropTypes.Requireable<number>;
|
|
23
|
+
maximumSignificantDigits: PropTypes.Requireable<number>;
|
|
24
|
+
useGrouping: PropTypes.Requireable<NonNullable<string | boolean | null | undefined>>;
|
|
25
|
+
numberingSystem: PropTypes.Requireable<string>;
|
|
26
|
+
roundingIncrement: PropTypes.Requireable<number>;
|
|
27
|
+
roundingMode: PropTypes.Requireable<string>;
|
|
28
|
+
trailingZeroDisplay: PropTypes.Requireable<string>;
|
|
29
|
+
}>>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
|
|
10
|
+
const NumberFormatOptionsPropType = PropTypes.shape({
|
|
11
|
+
// Locale Options
|
|
12
|
+
localeMatcher: PropTypes.oneOf(['best fit', 'lookup']),
|
|
13
|
+
// Style Options
|
|
14
|
+
style: PropTypes.oneOf(['decimal', 'currency', 'percent', 'unit']),
|
|
15
|
+
currency: PropTypes.string,
|
|
16
|
+
// e.g., 'USD'
|
|
17
|
+
currencyDisplay: PropTypes.oneOf(['symbol', 'narrowSymbol', 'code', 'name']),
|
|
18
|
+
currencySign: PropTypes.oneOf(['standard', 'accounting']),
|
|
19
|
+
unit: PropTypes.string,
|
|
20
|
+
// e.g., 'liter', 'mile-per-hour'
|
|
21
|
+
unitDisplay: PropTypes.oneOf(['short', 'narrow', 'long']),
|
|
22
|
+
notation: PropTypes.oneOf(['standard', 'scientific', 'engineering', 'compact']),
|
|
23
|
+
compactDisplay: PropTypes.oneOf(['short', 'long']),
|
|
24
|
+
signDisplay: PropTypes.oneOf(['auto', 'never', 'always', 'exceptZero']),
|
|
25
|
+
// Digit Options
|
|
26
|
+
minimumIntegerDigits: PropTypes.number,
|
|
27
|
+
minimumFractionDigits: PropTypes.number,
|
|
28
|
+
maximumFractionDigits: PropTypes.number,
|
|
29
|
+
minimumSignificantDigits: PropTypes.number,
|
|
30
|
+
maximumSignificantDigits: PropTypes.number,
|
|
31
|
+
useGrouping: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['always', 'auto', 'min2'])]),
|
|
32
|
+
// Misc/Other Options
|
|
33
|
+
numberingSystem: PropTypes.string,
|
|
34
|
+
// e.g., 'latn', 'arab'
|
|
35
|
+
roundingIncrement: PropTypes.number,
|
|
36
|
+
roundingMode: PropTypes.oneOf(['ceil', 'floor', 'expand', 'trunc', 'halfCeil', 'halfFloor', 'halfExpand', 'halfTrunc', 'halfEven']),
|
|
37
|
+
trailingZeroDisplay: PropTypes.oneOf(['auto', 'stripIfInteger'])
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export { NumberFormatOptionsPropType };
|
|
@@ -7,23 +7,22 @@
|
|
|
7
7
|
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
|
-
import
|
|
10
|
+
import React from 'react';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
13
|
|
|
14
|
-
function NumberInputSkeleton(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} = _ref;
|
|
14
|
+
function NumberInputSkeleton({
|
|
15
|
+
hideLabel,
|
|
16
|
+
className,
|
|
17
|
+
size = 'md',
|
|
18
|
+
...rest
|
|
19
|
+
}) {
|
|
21
20
|
const prefix = usePrefix();
|
|
22
|
-
return /*#__PURE__*/
|
|
21
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
23
22
|
className: cx(`${prefix}--form-item`, className)
|
|
24
|
-
}, rest), !hideLabel && /*#__PURE__*/
|
|
23
|
+
}, rest), !hideLabel && /*#__PURE__*/React.createElement("span", {
|
|
25
24
|
className: `${prefix}--label ${prefix}--skeleton`
|
|
26
|
-
}), /*#__PURE__*/
|
|
25
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
27
26
|
className: `${prefix}--number ${prefix}--skeleton ${prefix}--number--${size}`
|
|
28
27
|
}));
|
|
29
28
|
}
|