@carbon/react 1.29.1 → 1.30.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/es/_virtual/_rollupPluginBabelHelpers.js +16 -5
- package/es/components/Accordion/Accordion.Skeleton.js +0 -7
- package/es/components/Accordion/Accordion.js +1 -8
- package/es/components/Accordion/AccordionItem.js +5 -19
- package/es/components/AspectRatio/AspectRatio.js +0 -5
- package/es/components/Breadcrumb/Breadcrumb.Skeleton.js +0 -3
- package/es/components/Breadcrumb/Breadcrumb.js +0 -3
- package/es/components/Breadcrumb/BreadcrumbItem.js +0 -7
- package/es/components/Button/Button.Skeleton.js +2 -7
- package/es/components/Button/Button.js +2 -36
- package/es/components/ButtonSet/ButtonSet.js +0 -2
- package/es/components/Checkbox/Checkbox.Skeleton.js +0 -1
- package/es/components/Checkbox/Checkbox.js +4 -20
- package/es/components/CheckboxGroup/CheckboxGroup.js +0 -11
- package/es/components/ClassPrefix/index.d.ts +26 -0
- package/es/components/ClassPrefix/index.js +0 -2
- package/es/components/CodeSnippet/CodeSnippet.Skeleton.js +0 -5
- package/es/components/CodeSnippet/CodeSnippet.js +6 -45
- package/es/components/ComboBox/ComboBox.js +12 -79
- package/es/components/ComboBox/tools/filter.js +0 -1
- package/es/components/ComboButton/index.js +0 -14
- package/es/components/ComposedModal/ComposedModal.js +2 -32
- package/es/components/ComposedModal/ModalFooter.js +0 -21
- package/es/components/ComposedModal/ModalHeader.js +0 -12
- package/es/components/ContainedList/ContainedList.js +5 -32
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +0 -6
- package/es/components/ContentSwitcher/ContentSwitcher.js +11 -23
- package/es/components/ContextMenu/useContextMenu.js +1 -6
- package/es/components/Copy/Copy.js +8 -31
- package/es/components/CopyButton/CopyButton.js +0 -4
- package/es/components/DangerButton/DangerButton.js +0 -1
- package/es/components/DataTable/DataTable.js +171 -91
- package/es/components/DataTable/Table.js +0 -6
- package/es/components/DataTable/TableBatchAction.js +0 -4
- package/es/components/DataTable/TableBatchActions.js +0 -8
- package/es/components/DataTable/TableBody.js +0 -1
- package/es/components/DataTable/TableContainer.js +0 -5
- package/es/components/DataTable/TableExpandHeader.js +0 -7
- package/es/components/DataTable/TableExpandRow.js +0 -6
- package/es/components/DataTable/TableExpandedRow.js +0 -6
- package/es/components/DataTable/TableHeader.d.ts +1 -1
- package/es/components/DataTable/TableHeader.js +3 -19
- package/es/components/DataTable/TableRow.js +4 -5
- package/es/components/DataTable/TableSelectAll.js +0 -8
- package/es/components/DataTable/TableSelectRow.js +2 -10
- package/es/components/DataTable/TableToolbar.js +0 -3
- package/es/components/DataTable/TableToolbarMenu.d.ts +1 -1
- package/es/components/DataTable/TableToolbarMenu.js +3 -6
- package/es/components/DataTable/TableToolbarSearch.js +2 -30
- package/es/components/DataTable/state/getDerivedStateFromProps.js +0 -4
- package/es/components/DataTable/state/sorting.js +5 -8
- package/es/components/DataTable/tools/denormalize.js +2 -2
- package/es/components/DataTable/tools/filter.js +0 -2
- package/es/components/DataTable/tools/instanceId.js +0 -1
- package/es/components/DataTable/tools/normalize.js +10 -10
- package/es/components/DataTable/tools/sorting.js +5 -13
- package/es/components/DataTableSkeleton/DataTableSkeleton.js +5 -20
- package/es/components/DatePicker/DatePicker.Skeleton.js +0 -6
- package/es/components/DatePicker/DatePicker.js +153 -175
- package/es/components/DatePicker/plugins/appendToPlugin.js +3 -7
- package/es/components/DatePicker/plugins/fixEventsPlugin.js +14 -25
- package/es/components/DatePicker/plugins/rangePlugin.js +2 -7
- package/es/components/DatePickerInput/DatePickerInput.js +2 -28
- package/es/components/Dropdown/Dropdown.Skeleton.js +0 -2
- package/es/components/Dropdown/Dropdown.js +43 -52
- package/es/components/ErrorBoundary/ErrorBoundary.js +0 -10
- package/es/components/ErrorBoundary/ErrorBoundaryContext.js +0 -1
- package/es/components/ExpandableSearch/ExpandableSearch.js +1 -10
- package/es/components/FeatureFlags/index.js +8 -20
- package/es/components/FileUploader/FileUploader.Skeleton.js +0 -2
- package/es/components/FileUploader/FileUploader.js +3 -38
- package/es/components/FileUploader/FileUploaderButton.js +3 -24
- package/es/components/FileUploader/FileUploaderDropContainer.js +1 -28
- package/es/components/FileUploader/FileUploaderItem.js +5 -12
- package/es/components/FileUploader/Filename.js +6 -10
- package/es/components/FluidComboBox/FluidComboBox.Skeleton.js +0 -1
- package/es/components/FluidComboBox/FluidComboBox.js +0 -18
- package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.js +0 -2
- package/es/components/FluidDatePicker/FluidDatePicker.js +0 -6
- package/es/components/FluidDatePickerInput/FluidDatePickerInput.js +2 -1
- package/es/components/FluidDropdown/FluidDropdown.Skeleton.js +0 -1
- package/es/components/FluidDropdown/FluidDropdown.js +0 -18
- package/es/components/FluidForm/FluidForm.js +0 -2
- package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +0 -1
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +0 -19
- package/es/components/FluidSelect/FluidSelect.Skeleton.js +0 -1
- package/es/components/FluidSelect/FluidSelect.js +0 -10
- package/es/components/FluidTextArea/FluidTextArea.Skeleton.js +0 -1
- package/es/components/FluidTextArea/FluidTextArea.js +0 -20
- package/es/components/FluidTextInput/FluidTextInput.Skeleton.js +0 -1
- package/es/components/FluidTextInput/FluidTextInput.js +0 -14
- package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.js +0 -3
- package/es/components/FluidTimePicker/FluidTimePicker.js +1 -11
- package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +0 -6
- package/es/components/Form/Form.d.ts +23 -0
- package/es/components/Form/Form.js +3 -6
- package/es/components/Form/index.d.ts +7 -0
- package/es/components/FormGroup/FormGroup.js +0 -7
- package/es/components/FormItem/FormItem.js +0 -2
- package/es/components/FormLabel/FormLabel.js +1 -7
- package/es/components/Grid/CSSGrid.js +2 -15
- package/es/components/Grid/Column.js +18 -59
- package/es/components/Grid/ColumnHang.js +2 -5
- package/es/components/Grid/FlexGrid.js +2 -8
- package/es/components/Grid/Grid.js +0 -8
- package/es/components/Grid/GridContext.js +1 -3
- package/es/components/Grid/Row.js +2 -7
- package/es/components/Heading/index.js +0 -4
- package/es/components/Icon/Icon.Skeleton.js +2 -2
- package/es/components/IconButton/index.js +0 -10
- package/es/components/IdPrefix/index.js +0 -2
- package/es/components/InlineCheckbox/InlineCheckbox.js +0 -14
- package/es/components/InlineLoading/InlineLoading.js +0 -12
- package/es/components/Layer/index.js +3 -6
- package/es/components/Layout/LayoutDirection.js +0 -3
- package/es/components/Layout/useLayoutDirection.js +0 -1
- package/es/components/Link/Link.js +3 -10
- package/es/components/ListBox/ListBox.js +2 -13
- package/es/components/ListBox/ListBoxField.js +0 -5
- package/es/components/ListBox/ListBoxMenuIcon.js +0 -4
- package/es/components/ListBox/ListBoxMenuItem.js +2 -6
- package/es/components/ListBox/ListBoxPropTypes.d.ts +2 -2
- package/es/components/ListBox/ListBoxSelection.js +1 -13
- package/es/components/ListBox/next/ListBoxSelection.js +1 -14
- package/es/components/ListBox/next/ListBoxTrigger.js +1 -3
- package/es/components/ListItem/ListItem.d.ts +23 -0
- package/es/components/ListItem/ListItem.js +4 -8
- package/es/components/ListItem/index.d.ts +7 -0
- package/es/components/Loading/Loading.js +0 -6
- package/es/components/Menu/Menu.js +22 -40
- package/es/components/Menu/MenuContext.js +4 -5
- package/es/components/Menu/MenuItem.js +5 -39
- package/es/components/MenuButton/index.js +0 -9
- package/es/components/Modal/Modal.js +1 -46
- package/es/components/ModalWrapper/ModalWrapper.js +2 -15
- package/es/components/MultiSelect/FilterableMultiSelect.js +2 -60
- package/es/components/MultiSelect/MultiSelect.js +22 -70
- package/es/components/MultiSelect/MultiSelectPropTypes.js +0 -1
- package/es/components/MultiSelect/index.js +0 -1
- package/es/components/MultiSelect/tools/itemToString.js +0 -2
- package/es/components/MultiSelect/tools/sorting.js +3 -4
- package/es/components/Notification/Notification.js +0 -78
- package/es/components/NumberInput/NumberInput.Skeleton.js +0 -2
- package/es/components/NumberInput/NumberInput.js +3 -60
- package/es/components/OrderedList/OrderedList.d.ts +39 -0
- package/es/components/OrderedList/OrderedList.js +7 -19
- package/es/components/{Form/index.js → OrderedList/index.d.ts} +1 -3
- package/es/components/OverflowMenu/OverflowMenu.js +65 -86
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +6 -23
- package/es/components/OverflowMenuV2/index.js +0 -5
- package/es/components/Pagination/Pagination.Skeleton.js +0 -2
- package/es/components/Pagination/Pagination.js +11 -47
- package/es/components/Pagination/experimental/PageSelector.js +0 -10
- package/es/components/Pagination/experimental/Pagination.js +2 -48
- package/es/components/PaginationNav/PaginationNav.js +15 -59
- package/es/components/Popover/index.d.ts +14 -8
- package/es/components/Popover/index.js +44 -48
- package/es/components/PrimaryButton/PrimaryButton.js +0 -1
- package/es/components/ProgressBar/ProgressBar.js +0 -15
- package/es/components/ProgressIndicator/ProgressIndicator.Skeleton.js +0 -4
- package/es/components/ProgressIndicator/ProgressIndicator.js +2 -40
- package/es/components/RadioButton/RadioButton.Skeleton.js +0 -1
- package/es/components/RadioButton/RadioButton.js +0 -13
- package/es/components/RadioButtonGroup/RadioButtonGroup.js +3 -23
- package/es/components/RadioTile/RadioTile.js +0 -12
- package/es/components/Search/Search.Skeleton.js +0 -2
- package/es/components/Search/Search.js +1 -28
- package/es/components/SecondaryButton/SecondaryButton.js +0 -1
- package/es/components/Select/Select.Skeleton.js +0 -2
- package/es/components/Select/Select.d.ts +1 -1
- package/es/components/Select/Select.js +6 -33
- package/es/components/SelectItem/SelectItem.js +0 -5
- package/es/components/SelectItemGroup/SelectItemGroup.d.ts +0 -1
- package/es/components/SelectItemGroup/SelectItemGroup.js +1 -7
- package/es/components/SkeletonIcon/SkeletonIcon.js +0 -2
- package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +0 -1
- package/es/components/SkeletonText/SkeletonText.js +0 -12
- package/es/components/Slider/Slider.Skeleton.js +0 -2
- package/es/components/Slider/Slider.d.ts +0 -1
- package/es/components/Slider/Slider.js +112 -135
- package/es/components/Stack/Stack.js +1 -8
- package/es/components/StructuredList/StructuredList.Skeleton.js +0 -5
- package/es/components/StructuredList/StructuredList.js +1 -25
- package/es/components/Switch/IconSwitch.js +0 -18
- package/es/components/Switch/Switch.js +0 -11
- package/es/components/TabContent/TabContent.js +2 -6
- package/es/components/Tabs/Tabs.Skeleton.js +0 -4
- package/es/components/Tabs/Tabs.js +135 -104
- package/es/components/Tabs/usePressable.js +18 -31
- package/es/components/Tag/Tag.Skeleton.js +0 -2
- package/es/components/Tag/Tag.js +0 -15
- package/es/components/Text/Text.js +5 -18
- package/es/components/Text/TextDirection.js +0 -3
- package/es/components/Text/TextDirectionContext.js +0 -1
- package/es/components/Text/createTextComponent.js +0 -3
- package/es/components/TextArea/TextArea.Skeleton.js +0 -2
- package/es/components/TextArea/TextArea.js +11 -33
- package/es/components/TextInput/ControlledPasswordInput.js +0 -20
- package/es/components/TextInput/PasswordInput.js +0 -25
- package/es/components/TextInput/TextInput.Skeleton.js +0 -2
- package/es/components/TextInput/TextInput.d.ts +1 -1
- package/es/components/TextInput/TextInput.js +5 -33
- package/es/components/TextInput/util.js +3 -5
- package/es/components/Theme/index.js +1 -6
- package/es/components/Tile/Tile.js +32 -59
- package/es/components/TileGroup/TileGroup.js +1 -22
- package/es/components/TimePicker/TimePicker.js +6 -32
- package/es/components/TimePickerSelect/TimePickerSelect.js +2 -5
- package/es/components/Toggle/Toggle.Skeleton.js +0 -8
- package/es/components/Toggle/Toggle.js +0 -16
- package/es/components/ToggleSmall/ToggleSmall.Skeleton.js +0 -7
- package/es/components/Toggletip/index.d.ts +148 -0
- package/es/components/Toggletip/index.js +20 -44
- package/es/components/Tooltip/DefinitionTooltip.js +0 -11
- package/es/components/Tooltip/Tooltip.d.ts +1 -1
- package/es/components/Tooltip/Tooltip.js +4 -21
- package/es/components/TreeView/TreeNode.js +21 -66
- package/es/components/TreeView/TreeView.js +11 -67
- package/es/components/UIShell/Content.js +2 -4
- package/es/components/UIShell/Header.js +0 -2
- package/es/components/UIShell/HeaderContainer.d.ts +33 -0
- package/es/components/UIShell/HeaderContainer.js +13 -11
- package/es/components/UIShell/HeaderGlobalAction.js +0 -6
- package/es/components/UIShell/HeaderGlobalBar.js +0 -1
- package/es/components/UIShell/HeaderMenu.js +32 -31
- package/es/components/UIShell/HeaderMenuButton.js +2 -4
- package/es/components/UIShell/HeaderMenuItem.js +0 -8
- package/es/components/UIShell/HeaderName.js +0 -5
- package/es/components/UIShell/HeaderNavigation.js +0 -2
- package/es/components/UIShell/HeaderPanel.js +0 -2
- package/es/components/UIShell/HeaderSideNavItems.js +0 -2
- package/es/components/UIShell/Link.js +2 -3
- package/es/components/UIShell/SideNav.d.ts +3 -1
- package/es/components/UIShell/SideNav.js +44 -36
- package/es/components/UIShell/SideNavDetails.js +0 -3
- package/es/components/UIShell/SideNavDivider.js +0 -1
- package/es/components/UIShell/SideNavFooter.js +1 -4
- package/es/components/UIShell/SideNavHeader.js +0 -4
- package/es/components/UIShell/SideNavIcon.js +0 -3
- package/es/components/UIShell/SideNavItem.js +0 -3
- package/es/components/UIShell/SideNavItems.js +2 -6
- package/es/components/UIShell/SideNavLink.js +3 -7
- package/es/components/UIShell/SideNavLinkText.js +0 -2
- package/es/components/UIShell/SideNavMenu.js +0 -16
- package/es/components/UIShell/SideNavMenuItem.js +0 -2
- package/es/components/UIShell/SideNavSwitcher.js +2 -5
- package/es/components/UIShell/SkipToContent.d.ts +32 -0
- package/es/components/UIShell/SkipToContent.js +8 -15
- package/es/components/UIShell/Switcher.js +0 -2
- package/es/components/UIShell/SwitcherDivider.js +0 -1
- package/es/components/UIShell/SwitcherItem.js +0 -3
- package/es/components/UnorderedList/UnorderedList.d.ts +34 -0
- package/es/components/UnorderedList/UnorderedList.js +6 -16
- package/es/components/UnorderedList/index.d.ts +7 -0
- package/es/index.js +7 -8
- package/es/internal/ClickListener.js +3 -13
- package/es/internal/FloatingMenu.js +57 -63
- package/es/internal/OptimizedResize.js +6 -12
- package/es/internal/Selection.js +2 -25
- package/es/internal/createClassWrapper.js +0 -2
- package/es/internal/deprecateFieldOnObject.js +0 -4
- package/es/internal/focus/index.js +0 -1
- package/es/internal/keyboard/keys.js +2 -1
- package/es/internal/keyboard/match.js +1 -6
- package/es/internal/keyboard/navigation.js +8 -7
- package/es/internal/useAnnouncer.js +0 -1
- package/es/internal/useAttachedMenu.js +1 -9
- package/es/internal/useControllableState.js +6 -13
- package/es/internal/useDelayedState.js +2 -4
- package/es/internal/useEffectOnce.js +0 -1
- package/es/internal/useEvent.js +61 -3
- package/es/internal/useId.js +2 -5
- package/es/internal/useIsomorphicEffect.js +1 -0
- package/es/internal/useMergedRefs.js +2 -2
- package/es/internal/useNoInteractiveChildren.js +2 -13
- package/es/internal/useNormalizedInputProps.js +0 -3
- package/es/internal/useSavedCallback.js +0 -1
- package/es/internal/warning.js +0 -3
- package/es/internal/wrapFocus.js +1 -8
- package/es/prop-types/deprecate.js +2 -5
- package/es/prop-types/isRequiredOneOf.js +2 -5
- package/es/prop-types/requiredIfGivenPropIsTruthy.js +0 -2
- package/es/tools/array.js +0 -3
- package/es/tools/events.js +0 -3
- package/es/tools/mergeRefs.js +0 -2
- package/es/tools/wrapComponent.js +2 -5
- package/lib/_virtual/_rollupPluginBabelHelpers.js +17 -4
- package/lib/components/Accordion/Accordion.Skeleton.js +0 -7
- package/lib/components/Accordion/Accordion.js +1 -27
- package/lib/components/Accordion/AccordionItem.js +5 -19
- package/lib/components/AspectRatio/AspectRatio.js +0 -5
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.js +0 -3
- package/lib/components/Breadcrumb/Breadcrumb.js +0 -3
- package/lib/components/Breadcrumb/BreadcrumbItem.js +0 -7
- package/lib/components/Button/Button.Skeleton.js +2 -26
- package/lib/components/Button/Button.js +2 -36
- package/lib/components/ButtonSet/ButtonSet.js +0 -2
- package/lib/components/Checkbox/Checkbox.Skeleton.js +0 -1
- package/lib/components/Checkbox/Checkbox.js +4 -20
- package/lib/components/CheckboxGroup/CheckboxGroup.js +0 -11
- package/lib/components/ClassPrefix/index.d.ts +26 -0
- package/lib/components/ClassPrefix/index.js +0 -2
- package/lib/components/CodeSnippet/CodeSnippet.Skeleton.js +0 -5
- package/lib/components/CodeSnippet/CodeSnippet.js +6 -45
- package/lib/components/ComboBox/ComboBox.js +19 -86
- package/lib/components/ComboBox/tools/filter.js +0 -1
- package/lib/components/ComboButton/index.js +0 -14
- package/lib/components/ComposedModal/ComposedModal.js +2 -32
- package/lib/components/ComposedModal/ModalFooter.js +0 -21
- package/lib/components/ComposedModal/ModalHeader.js +0 -12
- package/lib/components/ContainedList/ContainedList.js +5 -32
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +0 -6
- package/lib/components/ContentSwitcher/ContentSwitcher.js +11 -23
- package/lib/components/ContextMenu/useContextMenu.js +1 -6
- package/lib/components/Copy/Copy.js +8 -50
- package/lib/components/CopyButton/CopyButton.js +0 -4
- package/lib/components/DangerButton/DangerButton.js +0 -1
- package/lib/components/DataTable/DataTable.js +171 -91
- package/lib/components/DataTable/Table.js +0 -6
- package/lib/components/DataTable/TableBatchAction.js +0 -4
- package/lib/components/DataTable/TableBatchActions.js +0 -8
- package/lib/components/DataTable/TableBody.js +0 -1
- package/lib/components/DataTable/TableContainer.js +0 -5
- package/lib/components/DataTable/TableExpandHeader.js +0 -7
- package/lib/components/DataTable/TableExpandRow.js +0 -6
- package/lib/components/DataTable/TableExpandedRow.js +0 -6
- package/lib/components/DataTable/TableHeader.d.ts +1 -1
- package/lib/components/DataTable/TableHeader.js +3 -19
- package/lib/components/DataTable/TableRow.js +4 -5
- package/lib/components/DataTable/TableSelectAll.js +0 -8
- package/lib/components/DataTable/TableSelectRow.js +2 -10
- package/lib/components/DataTable/TableToolbar.js +0 -3
- package/lib/components/DataTable/TableToolbarMenu.d.ts +1 -1
- package/lib/components/DataTable/TableToolbarMenu.js +3 -6
- package/lib/components/DataTable/TableToolbarSearch.js +2 -30
- package/lib/components/DataTable/state/getDerivedStateFromProps.js +0 -4
- package/lib/components/DataTable/state/sorting.js +5 -8
- package/lib/components/DataTable/tools/denormalize.js +2 -2
- package/lib/components/DataTable/tools/filter.js +0 -2
- package/lib/components/DataTable/tools/instanceId.js +0 -1
- package/lib/components/DataTable/tools/normalize.js +10 -10
- package/lib/components/DataTable/tools/sorting.js +5 -13
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +5 -20
- package/lib/components/DatePicker/DatePicker.Skeleton.js +0 -6
- package/lib/components/DatePicker/DatePicker.js +153 -175
- package/lib/components/DatePicker/plugins/appendToPlugin.js +3 -7
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +14 -25
- package/lib/components/DatePicker/plugins/rangePlugin.js +2 -7
- package/lib/components/DatePickerInput/DatePickerInput.js +2 -28
- package/lib/components/Dropdown/Dropdown.Skeleton.js +0 -2
- package/lib/components/Dropdown/Dropdown.js +50 -59
- package/lib/components/ErrorBoundary/ErrorBoundary.js +0 -10
- package/lib/components/ErrorBoundary/ErrorBoundaryContext.js +0 -1
- package/lib/components/ExpandableSearch/ExpandableSearch.js +1 -10
- package/lib/components/FeatureFlags/index.js +8 -20
- package/lib/components/FileUploader/FileUploader.Skeleton.js +0 -2
- package/lib/components/FileUploader/FileUploader.js +3 -57
- package/lib/components/FileUploader/FileUploaderButton.js +3 -43
- package/lib/components/FileUploader/FileUploaderDropContainer.js +1 -28
- package/lib/components/FileUploader/FileUploaderItem.js +5 -31
- package/lib/components/FileUploader/Filename.js +6 -10
- package/lib/components/FluidComboBox/FluidComboBox.Skeleton.js +0 -1
- package/lib/components/FluidComboBox/FluidComboBox.js +0 -18
- package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.js +0 -2
- package/lib/components/FluidDatePicker/FluidDatePicker.js +0 -6
- package/lib/components/FluidDatePickerInput/FluidDatePickerInput.js +2 -1
- package/lib/components/FluidDropdown/FluidDropdown.Skeleton.js +0 -1
- package/lib/components/FluidDropdown/FluidDropdown.js +0 -18
- package/lib/components/FluidForm/FluidForm.js +0 -2
- package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +0 -1
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +0 -19
- package/lib/components/FluidSelect/FluidSelect.Skeleton.js +0 -1
- package/lib/components/FluidSelect/FluidSelect.js +0 -10
- package/lib/components/FluidTextArea/FluidTextArea.Skeleton.js +0 -1
- package/lib/components/FluidTextArea/FluidTextArea.js +0 -20
- package/lib/components/FluidTextInput/FluidTextInput.Skeleton.js +0 -1
- package/lib/components/FluidTextInput/FluidTextInput.js +0 -14
- package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +0 -3
- package/lib/components/FluidTimePicker/FluidTimePicker.js +1 -11
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +0 -6
- package/lib/components/Form/Form.d.ts +23 -0
- package/lib/components/Form/Form.js +3 -6
- package/lib/components/Form/index.d.ts +7 -0
- package/lib/components/FormGroup/FormGroup.js +0 -7
- package/lib/components/FormItem/FormItem.js +0 -2
- package/lib/components/FormLabel/FormLabel.js +1 -26
- package/lib/components/Grid/CSSGrid.js +2 -15
- package/lib/components/Grid/Column.js +18 -59
- package/lib/components/Grid/ColumnHang.js +2 -5
- package/lib/components/Grid/FlexGrid.js +2 -8
- package/lib/components/Grid/Grid.js +0 -8
- package/lib/components/Grid/GridContext.js +1 -3
- package/lib/components/Grid/Row.js +2 -7
- package/lib/components/Heading/index.js +0 -4
- package/lib/components/Icon/Icon.Skeleton.js +2 -2
- package/lib/components/IconButton/index.js +0 -10
- package/lib/components/IdPrefix/index.js +0 -2
- package/lib/components/InlineCheckbox/InlineCheckbox.js +0 -14
- package/lib/components/InlineLoading/InlineLoading.js +0 -12
- package/lib/components/Layer/index.js +3 -6
- package/lib/components/Layout/LayoutDirection.js +0 -3
- package/lib/components/Layout/useLayoutDirection.js +0 -1
- package/lib/components/Link/Link.js +3 -10
- package/lib/components/ListBox/ListBox.js +2 -13
- package/lib/components/ListBox/ListBoxField.js +0 -5
- package/lib/components/ListBox/ListBoxMenuIcon.js +0 -4
- package/lib/components/ListBox/ListBoxMenuItem.js +2 -6
- package/lib/components/ListBox/ListBoxPropTypes.d.ts +2 -2
- package/lib/components/ListBox/ListBoxSelection.js +1 -13
- package/lib/components/ListBox/next/ListBoxSelection.js +1 -14
- package/lib/components/ListBox/next/ListBoxTrigger.js +1 -3
- package/lib/components/ListItem/ListItem.d.ts +23 -0
- package/lib/components/ListItem/ListItem.js +4 -8
- package/lib/components/ListItem/index.d.ts +7 -0
- package/lib/components/Loading/Loading.js +0 -6
- package/lib/components/Menu/Menu.js +22 -40
- package/lib/components/Menu/MenuContext.js +4 -5
- package/lib/components/Menu/MenuItem.js +5 -39
- package/lib/components/MenuButton/index.js +0 -9
- package/lib/components/Modal/Modal.js +1 -46
- package/lib/components/ModalWrapper/ModalWrapper.js +2 -15
- package/lib/components/MultiSelect/FilterableMultiSelect.js +8 -66
- package/lib/components/MultiSelect/MultiSelect.js +30 -78
- package/lib/components/MultiSelect/MultiSelectPropTypes.js +0 -1
- package/lib/components/MultiSelect/index.js +0 -1
- package/lib/components/MultiSelect/tools/itemToString.js +0 -2
- package/lib/components/MultiSelect/tools/sorting.js +3 -4
- package/lib/components/Notification/Notification.js +0 -78
- package/lib/components/NumberInput/NumberInput.Skeleton.js +0 -2
- package/lib/components/NumberInput/NumberInput.js +3 -60
- package/lib/components/OrderedList/OrderedList.d.ts +39 -0
- package/lib/components/OrderedList/OrderedList.js +7 -19
- package/lib/components/OrderedList/index.d.ts +7 -0
- package/lib/components/OverflowMenu/OverflowMenu.js +65 -86
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +6 -23
- package/lib/components/OverflowMenuV2/index.js +0 -5
- package/lib/components/Pagination/Pagination.Skeleton.js +0 -2
- package/lib/components/Pagination/Pagination.js +11 -47
- package/lib/components/Pagination/experimental/PageSelector.js +0 -10
- package/lib/components/Pagination/experimental/Pagination.js +2 -67
- package/lib/components/PaginationNav/PaginationNav.js +15 -78
- package/lib/components/Popover/index.d.ts +14 -8
- package/lib/components/Popover/index.js +44 -48
- package/lib/components/PrimaryButton/PrimaryButton.js +0 -1
- package/lib/components/ProgressBar/ProgressBar.js +0 -15
- package/lib/components/ProgressIndicator/ProgressIndicator.Skeleton.js +0 -4
- package/lib/components/ProgressIndicator/ProgressIndicator.js +2 -40
- package/lib/components/RadioButton/RadioButton.Skeleton.js +0 -1
- package/lib/components/RadioButton/RadioButton.js +0 -13
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +3 -23
- package/lib/components/RadioTile/RadioTile.js +0 -12
- package/lib/components/Search/Search.Skeleton.js +0 -2
- package/lib/components/Search/Search.js +1 -28
- package/lib/components/SecondaryButton/SecondaryButton.js +0 -1
- package/lib/components/Select/Select.Skeleton.js +0 -2
- package/lib/components/Select/Select.d.ts +1 -1
- package/lib/components/Select/Select.js +6 -33
- package/lib/components/SelectItem/SelectItem.js +0 -5
- package/lib/components/SelectItemGroup/SelectItemGroup.d.ts +0 -1
- package/lib/components/SelectItemGroup/SelectItemGroup.js +1 -26
- package/lib/components/SkeletonIcon/SkeletonIcon.js +0 -2
- package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +0 -1
- package/lib/components/SkeletonText/SkeletonText.js +0 -12
- package/lib/components/Slider/Slider.Skeleton.js +0 -2
- package/lib/components/Slider/Slider.d.ts +0 -1
- package/lib/components/Slider/Slider.js +112 -154
- package/lib/components/Stack/Stack.js +1 -8
- package/lib/components/StructuredList/StructuredList.Skeleton.js +0 -5
- package/lib/components/StructuredList/StructuredList.js +1 -25
- package/lib/components/Switch/IconSwitch.js +0 -18
- package/lib/components/Switch/Switch.js +0 -11
- package/lib/components/TabContent/TabContent.js +2 -6
- package/lib/components/Tabs/Tabs.Skeleton.js +0 -4
- package/lib/components/Tabs/Tabs.js +133 -102
- package/lib/components/Tabs/usePressable.js +18 -31
- package/lib/components/Tag/Tag.Skeleton.js +0 -2
- package/lib/components/Tag/Tag.js +0 -15
- package/lib/components/Text/Text.js +5 -18
- package/lib/components/Text/TextDirection.js +0 -3
- package/lib/components/Text/TextDirectionContext.js +0 -1
- package/lib/components/Text/createTextComponent.js +0 -3
- package/lib/components/TextArea/TextArea.Skeleton.js +0 -2
- package/lib/components/TextArea/TextArea.js +10 -32
- package/lib/components/TextInput/ControlledPasswordInput.js +0 -20
- package/lib/components/TextInput/PasswordInput.js +0 -25
- package/lib/components/TextInput/TextInput.Skeleton.js +0 -2
- package/lib/components/TextInput/TextInput.d.ts +1 -1
- package/lib/components/TextInput/TextInput.js +5 -52
- package/lib/components/TextInput/util.js +3 -5
- package/lib/components/Theme/index.js +1 -6
- package/lib/components/Tile/Tile.js +31 -58
- package/lib/components/TileGroup/TileGroup.js +1 -22
- package/lib/components/TimePicker/TimePicker.js +6 -32
- package/lib/components/TimePickerSelect/TimePickerSelect.js +2 -5
- package/lib/components/Toggle/Toggle.Skeleton.js +0 -8
- package/lib/components/Toggle/Toggle.js +0 -16
- package/lib/components/ToggleSmall/ToggleSmall.Skeleton.js +0 -7
- package/lib/components/Toggletip/index.d.ts +148 -0
- package/lib/components/Toggletip/index.js +20 -44
- package/lib/components/Tooltip/DefinitionTooltip.js +0 -11
- package/lib/components/Tooltip/Tooltip.d.ts +1 -1
- package/lib/components/Tooltip/Tooltip.js +4 -21
- package/lib/components/TreeView/TreeNode.js +21 -66
- package/lib/components/TreeView/TreeView.js +11 -67
- package/lib/components/UIShell/Content.js +2 -4
- package/lib/components/UIShell/Header.js +0 -2
- package/lib/components/UIShell/HeaderContainer.d.ts +33 -0
- package/lib/components/UIShell/HeaderContainer.js +13 -11
- package/lib/components/UIShell/HeaderGlobalAction.js +0 -6
- package/lib/components/UIShell/HeaderGlobalBar.js +0 -1
- package/lib/components/UIShell/HeaderMenu.js +32 -31
- package/lib/components/UIShell/HeaderMenuButton.js +2 -4
- package/lib/components/UIShell/HeaderMenuItem.js +0 -8
- package/lib/components/UIShell/HeaderName.js +0 -5
- package/lib/components/UIShell/HeaderNavigation.js +0 -2
- package/lib/components/UIShell/HeaderPanel.js +0 -2
- package/lib/components/UIShell/HeaderSideNavItems.js +0 -2
- package/lib/components/UIShell/Link.js +2 -3
- package/lib/components/UIShell/SideNav.d.ts +3 -1
- package/lib/components/UIShell/SideNav.js +43 -35
- package/lib/components/UIShell/SideNavDetails.js +0 -3
- package/lib/components/UIShell/SideNavDivider.js +0 -1
- package/lib/components/UIShell/SideNavFooter.js +1 -4
- package/lib/components/UIShell/SideNavHeader.js +0 -4
- package/lib/components/UIShell/SideNavIcon.js +0 -3
- package/lib/components/UIShell/SideNavItem.js +0 -3
- package/lib/components/UIShell/SideNavItems.js +2 -6
- package/lib/components/UIShell/SideNavLink.js +3 -7
- package/lib/components/UIShell/SideNavLinkText.js +0 -2
- package/lib/components/UIShell/SideNavMenu.js +0 -16
- package/lib/components/UIShell/SideNavMenuItem.js +0 -2
- package/lib/components/UIShell/SideNavSwitcher.js +2 -5
- package/lib/components/UIShell/SkipToContent.d.ts +32 -0
- package/lib/components/UIShell/SkipToContent.js +8 -15
- package/lib/components/UIShell/Switcher.js +0 -2
- package/lib/components/UIShell/SwitcherDivider.js +0 -1
- package/lib/components/UIShell/SwitcherItem.js +0 -3
- package/lib/components/UnorderedList/UnorderedList.d.ts +34 -0
- package/lib/components/UnorderedList/UnorderedList.js +6 -16
- package/lib/components/UnorderedList/index.d.ts +7 -0
- package/lib/index.js +42 -43
- package/lib/internal/ClickListener.js +3 -13
- package/lib/internal/FloatingMenu.js +57 -63
- package/lib/internal/OptimizedResize.js +6 -12
- package/lib/internal/Selection.js +2 -25
- package/lib/internal/createClassWrapper.js +0 -2
- package/lib/internal/deprecateFieldOnObject.js +0 -4
- package/lib/internal/focus/index.js +0 -1
- package/lib/internal/keyboard/keys.js +2 -1
- package/lib/internal/keyboard/match.js +1 -6
- package/lib/internal/keyboard/navigation.js +8 -7
- package/lib/internal/useAnnouncer.js +0 -1
- package/lib/internal/useAttachedMenu.js +1 -9
- package/lib/internal/useControllableState.js +6 -13
- package/lib/internal/useDelayedState.js +2 -4
- package/lib/internal/useEffectOnce.js +0 -1
- package/lib/internal/useEvent.js +61 -2
- package/lib/internal/useId.js +2 -5
- package/lib/internal/useIsomorphicEffect.js +1 -0
- package/lib/internal/useMergedRefs.js +2 -2
- package/lib/internal/useNoInteractiveChildren.js +2 -13
- package/lib/internal/useNormalizedInputProps.js +0 -3
- package/lib/internal/useSavedCallback.js +0 -1
- package/lib/internal/warning.js +0 -3
- package/lib/internal/wrapFocus.js +1 -8
- package/lib/prop-types/deprecate.js +2 -5
- package/lib/prop-types/isRequiredOneOf.js +2 -5
- package/lib/prop-types/requiredIfGivenPropIsTruthy.js +0 -2
- package/lib/tools/array.js +0 -3
- package/lib/tools/events.js +0 -3
- package/lib/tools/mergeRefs.js +0 -2
- package/lib/tools/wrapComponent.js +2 -5
- package/package.json +9 -9
- package/es/components/Tab/Tab.js +0 -185
- package/es/components/Tab/index.js +0 -14
- package/es/components/TimePickerSelect/index.js +0 -13
- package/lib/components/Form/index.js +0 -17
- package/lib/components/Tab/Tab.js +0 -214
- package/lib/components/Tab/index.js +0 -39
- package/lib/components/TimePickerSelect/index.js +0 -38
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
function _defineProperty(obj, key, value) {
|
|
9
|
+
key = _toPropertyKey(key);
|
|
9
10
|
if (key in obj) {
|
|
10
11
|
Object.defineProperty(obj, key, {
|
|
11
12
|
value: value,
|
|
@@ -16,25 +17,35 @@ function _defineProperty(obj, key, value) {
|
|
|
16
17
|
} else {
|
|
17
18
|
obj[key] = value;
|
|
18
19
|
}
|
|
19
|
-
|
|
20
20
|
return obj;
|
|
21
21
|
}
|
|
22
|
-
|
|
23
22
|
function _extends() {
|
|
24
23
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
25
24
|
for (var i = 1; i < arguments.length; i++) {
|
|
26
25
|
var source = arguments[i];
|
|
27
|
-
|
|
28
26
|
for (var key in source) {
|
|
29
27
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
30
28
|
target[key] = source[key];
|
|
31
29
|
}
|
|
32
30
|
}
|
|
33
31
|
}
|
|
34
|
-
|
|
35
32
|
return target;
|
|
36
33
|
};
|
|
37
34
|
return _extends.apply(this, arguments);
|
|
38
35
|
}
|
|
36
|
+
function _toPrimitive(input, hint) {
|
|
37
|
+
if (typeof input !== "object" || input === null) return input;
|
|
38
|
+
var prim = input[Symbol.toPrimitive];
|
|
39
|
+
if (prim !== undefined) {
|
|
40
|
+
var res = prim.call(input, hint || "default");
|
|
41
|
+
if (typeof res !== "object") return res;
|
|
42
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
43
|
+
}
|
|
44
|
+
return (hint === "string" ? String : Number)(input);
|
|
45
|
+
}
|
|
46
|
+
function _toPropertyKey(arg) {
|
|
47
|
+
var key = _toPrimitive(arg, "string");
|
|
48
|
+
return typeof key === "symbol" ? key : String(key);
|
|
49
|
+
}
|
|
39
50
|
|
|
40
|
-
export { _defineProperty as defineProperty, _extends as extends };
|
|
51
|
+
export { _defineProperty as defineProperty, _extends as extends, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey };
|
|
@@ -14,7 +14,6 @@ import SkeletonText from '../SkeletonText/SkeletonText.js';
|
|
|
14
14
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
15
15
|
|
|
16
16
|
var _SkeletonText, _SkeletonText2, _SkeletonText3;
|
|
17
|
-
|
|
18
17
|
function AccordionSkeleton(_ref) {
|
|
19
18
|
let {
|
|
20
19
|
align,
|
|
@@ -54,28 +53,23 @@ function AccordionSkeleton(_ref) {
|
|
|
54
53
|
key: i
|
|
55
54
|
})));
|
|
56
55
|
}
|
|
57
|
-
|
|
58
56
|
AccordionSkeleton.propTypes = {
|
|
59
57
|
/**
|
|
60
58
|
* Specify the alignment of the accordion heading title and chevron.
|
|
61
59
|
*/
|
|
62
60
|
align: PropTypes.oneOf(['start', 'end']),
|
|
63
|
-
|
|
64
61
|
/**
|
|
65
62
|
* Specify an optional className to add.
|
|
66
63
|
*/
|
|
67
64
|
className: PropTypes.string,
|
|
68
|
-
|
|
69
65
|
/**
|
|
70
66
|
* Set number of items to render
|
|
71
67
|
*/
|
|
72
68
|
count: PropTypes.number,
|
|
73
|
-
|
|
74
69
|
/**
|
|
75
70
|
* Specify whether an individual AccordionItem should be flush, default is false
|
|
76
71
|
*/
|
|
77
72
|
isFlush: PropTypes.bool,
|
|
78
|
-
|
|
79
73
|
/**
|
|
80
74
|
* `false` to not display the first item opened
|
|
81
75
|
*/
|
|
@@ -86,7 +80,6 @@ AccordionSkeleton.defaultProps = {
|
|
|
86
80
|
count: 4,
|
|
87
81
|
align: 'end'
|
|
88
82
|
};
|
|
89
|
-
|
|
90
83
|
function AccordionSkeletonItem() {
|
|
91
84
|
const prefix = usePrefix();
|
|
92
85
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
@@ -10,7 +10,6 @@ import cx from 'classnames';
|
|
|
10
10
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
12
|
import React__default from 'react';
|
|
13
|
-
import * as FeatureFlags from '@carbon/feature-flags';
|
|
14
13
|
|
|
15
14
|
function Accordion(_ref) {
|
|
16
15
|
let {
|
|
@@ -36,37 +35,31 @@ function Accordion(_ref) {
|
|
|
36
35
|
});
|
|
37
36
|
}) : children);
|
|
38
37
|
}
|
|
39
|
-
|
|
40
38
|
Accordion.propTypes = {
|
|
41
39
|
/**
|
|
42
40
|
* Specify the alignment of the accordion heading title and chevron.
|
|
43
41
|
*/
|
|
44
42
|
align: PropTypes.oneOf(['start', 'end']),
|
|
45
|
-
|
|
46
43
|
/**
|
|
47
44
|
* Pass in the children that will be rendered within the Accordion
|
|
48
45
|
*/
|
|
49
46
|
children: PropTypes.node,
|
|
50
|
-
|
|
51
47
|
/**
|
|
52
48
|
* Specify an optional className to be applied to the container node
|
|
53
49
|
*/
|
|
54
50
|
className: PropTypes.string,
|
|
55
|
-
|
|
56
51
|
/**
|
|
57
52
|
* Specify whether an individual AccordionItem should be disabled
|
|
58
53
|
*/
|
|
59
54
|
disabled: PropTypes.bool,
|
|
60
|
-
|
|
61
55
|
/**
|
|
62
56
|
* Specify whether Accordion text should be flush, default is false, does not work with align="start"
|
|
63
57
|
*/
|
|
64
58
|
isFlush: PropTypes.bool,
|
|
65
|
-
|
|
66
59
|
/**
|
|
67
60
|
* Specify the size of the Accordion. Currently supports the following:
|
|
68
61
|
*/
|
|
69
|
-
size:
|
|
62
|
+
size: PropTypes.oneOf(['sm', 'md', 'lg'])
|
|
70
63
|
};
|
|
71
64
|
|
|
72
65
|
export { Accordion as default };
|
|
@@ -21,7 +21,6 @@ import { Escape } from '../../internal/keyboard/keys.js';
|
|
|
21
21
|
const defaultRenderToggle = props => /*#__PURE__*/React__default.createElement("button", _extends({
|
|
22
22
|
type: "button"
|
|
23
23
|
}, props));
|
|
24
|
-
|
|
25
24
|
function AccordionItem(_ref) {
|
|
26
25
|
let {
|
|
27
26
|
children,
|
|
@@ -55,15 +54,14 @@ function AccordionItem(_ref) {
|
|
|
55
54
|
setAnimation(isOpen ? 'collapsing' : 'expanding');
|
|
56
55
|
setIsOpen(open);
|
|
57
56
|
setPrevIsOpen(open);
|
|
58
|
-
}
|
|
59
|
-
// panel
|
|
60
|
-
|
|
57
|
+
}
|
|
61
58
|
|
|
59
|
+
// When the AccordionItem heading is clicked, toggle the open state of the
|
|
60
|
+
// panel
|
|
62
61
|
function onClick(event) {
|
|
63
62
|
const nextValue = !isOpen;
|
|
64
63
|
setAnimation(isOpen ? 'collapsing' : 'expanding');
|
|
65
64
|
setIsOpen(nextValue);
|
|
66
|
-
|
|
67
65
|
if (onHeadingClick) {
|
|
68
66
|
// TODO: normalize signature, potentially:
|
|
69
67
|
// onHeadingClick :: (event: Event, state: { isOpen: Boolean }) => any
|
|
@@ -72,23 +70,20 @@ function AccordionItem(_ref) {
|
|
|
72
70
|
event
|
|
73
71
|
});
|
|
74
72
|
}
|
|
75
|
-
}
|
|
76
|
-
|
|
73
|
+
}
|
|
77
74
|
|
|
75
|
+
// If the AccordionItem is open, and the user hits the ESC key, then close it
|
|
78
76
|
function onKeyDown(event) {
|
|
79
77
|
if (isOpen && match(event, Escape)) {
|
|
80
78
|
setIsOpen(false);
|
|
81
79
|
}
|
|
82
80
|
}
|
|
83
|
-
|
|
84
81
|
function handleAnimationEnd(event) {
|
|
85
82
|
if (rest.handleAnimationEnd) {
|
|
86
83
|
rest.handleAnimationEnd(event);
|
|
87
84
|
}
|
|
88
|
-
|
|
89
85
|
setAnimation('');
|
|
90
86
|
}
|
|
91
|
-
|
|
92
87
|
return /*#__PURE__*/React__default.createElement("li", _extends({
|
|
93
88
|
className: className
|
|
94
89
|
}, rest, {
|
|
@@ -111,50 +106,41 @@ function AccordionItem(_ref) {
|
|
|
111
106
|
className: `${prefix}--accordion__content`
|
|
112
107
|
}, children));
|
|
113
108
|
}
|
|
114
|
-
|
|
115
109
|
AccordionItem.propTypes = {
|
|
116
110
|
/**
|
|
117
111
|
* Provide the contents of your AccordionItem
|
|
118
112
|
*/
|
|
119
113
|
children: PropTypes.node,
|
|
120
|
-
|
|
121
114
|
/**
|
|
122
115
|
* Specify an optional className to be applied to the container node
|
|
123
116
|
*/
|
|
124
117
|
className: PropTypes.string,
|
|
125
|
-
|
|
126
118
|
/**
|
|
127
119
|
* Specify whether an individual AccordionItem should be disabled
|
|
128
120
|
*/
|
|
129
121
|
disabled: PropTypes.bool,
|
|
130
|
-
|
|
131
122
|
/**
|
|
132
123
|
* The handler of the massaged `click` event.
|
|
133
124
|
*/
|
|
134
125
|
onClick: PropTypes.func,
|
|
135
|
-
|
|
136
126
|
/**
|
|
137
127
|
* The handler of the massaged `click` event on the heading.
|
|
138
128
|
*/
|
|
139
129
|
onHeadingClick: PropTypes.func,
|
|
140
|
-
|
|
141
130
|
/**
|
|
142
131
|
* `true` to open the expand.
|
|
143
132
|
*/
|
|
144
133
|
open: PropTypes.bool,
|
|
145
|
-
|
|
146
134
|
/**
|
|
147
135
|
* The callback function to render the expand button.
|
|
148
136
|
* Can be a React component class.
|
|
149
137
|
*/
|
|
150
138
|
renderExpando: deprecate(PropTypes.func, 'The `renderExpando` prop has been deprecated and will be removed in the next major release of Carbon. Use the `renderToggle` prop instead.'),
|
|
151
|
-
|
|
152
139
|
/**
|
|
153
140
|
* The callback function to render the expand button.
|
|
154
141
|
* Can be a React component class.
|
|
155
142
|
*/
|
|
156
143
|
renderToggle: PropTypes.func,
|
|
157
|
-
|
|
158
144
|
/**
|
|
159
145
|
* The accordion title.
|
|
160
146
|
*/
|
|
@@ -17,7 +17,6 @@ import { usePrefix } from '../../internal/usePrefix.js';
|
|
|
17
17
|
* This is often useful alongside our grid components, or for media assets like
|
|
18
18
|
* images or videos.
|
|
19
19
|
*/
|
|
20
|
-
|
|
21
20
|
function AspectRatio(_ref) {
|
|
22
21
|
let {
|
|
23
22
|
as: BaseComponent = 'div',
|
|
@@ -32,7 +31,6 @@ function AspectRatio(_ref) {
|
|
|
32
31
|
className: className
|
|
33
32
|
}, rest), children);
|
|
34
33
|
}
|
|
35
|
-
|
|
36
34
|
AspectRatio.propTypes = {
|
|
37
35
|
/**
|
|
38
36
|
* Provide a custom component or string to be rendered as the outermost node
|
|
@@ -44,17 +42,14 @@ AspectRatio.propTypes = {
|
|
|
44
42
|
* ```
|
|
45
43
|
*/
|
|
46
44
|
as: PropTypes.elementType,
|
|
47
|
-
|
|
48
45
|
/**
|
|
49
46
|
* Specify the content that will be placed in the aspect ratio
|
|
50
47
|
*/
|
|
51
48
|
children: PropTypes.node,
|
|
52
|
-
|
|
53
49
|
/**
|
|
54
50
|
* Specify a class name for the outermost node of the component
|
|
55
51
|
*/
|
|
56
52
|
className: PropTypes.string,
|
|
57
|
-
|
|
58
53
|
/**
|
|
59
54
|
* Specify the ratio to be used by the aspect ratio container. This will
|
|
60
55
|
* determine what aspect ratio your content will be displayed in.
|
|
@@ -12,7 +12,6 @@ import cx from 'classnames';
|
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
13
|
|
|
14
14
|
var _Item, _Item2, _Item3;
|
|
15
|
-
|
|
16
15
|
function Item() {
|
|
17
16
|
const prefix = usePrefix();
|
|
18
17
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -21,7 +20,6 @@ function Item() {
|
|
|
21
20
|
className: `${prefix}--link`
|
|
22
21
|
}, "\xA0"));
|
|
23
22
|
}
|
|
24
|
-
|
|
25
23
|
function BreadcrumbSkeleton(_ref) {
|
|
26
24
|
let {
|
|
27
25
|
className,
|
|
@@ -33,7 +31,6 @@ function BreadcrumbSkeleton(_ref) {
|
|
|
33
31
|
className: classes
|
|
34
32
|
}, rest), _Item || (_Item = /*#__PURE__*/React__default.createElement(Item, null)), _Item2 || (_Item2 = /*#__PURE__*/React__default.createElement(Item, null)), _Item3 || (_Item3 = /*#__PURE__*/React__default.createElement(Item, null)));
|
|
35
33
|
}
|
|
36
|
-
|
|
37
34
|
BreadcrumbSkeleton.propTypes = {
|
|
38
35
|
/**
|
|
39
36
|
* Specify an optional className to add.
|
|
@@ -38,17 +38,14 @@ Breadcrumb.propTypes = {
|
|
|
38
38
|
* Specify the label for the breadcrumb container
|
|
39
39
|
*/
|
|
40
40
|
'aria-label': PropTypes.string,
|
|
41
|
-
|
|
42
41
|
/**
|
|
43
42
|
* Pass in the BreadcrumbItem's for your Breadcrumb
|
|
44
43
|
*/
|
|
45
44
|
children: PropTypes.node,
|
|
46
|
-
|
|
47
45
|
/**
|
|
48
46
|
* Specify an optional className to be applied to the container node
|
|
49
47
|
*/
|
|
50
48
|
className: PropTypes.string,
|
|
51
|
-
|
|
52
49
|
/**
|
|
53
50
|
* Optional prop to omit the trailing slash for the breadcrumbs
|
|
54
51
|
*/
|
|
@@ -30,7 +30,6 @@ const BreadcrumbItem = /*#__PURE__*/React__default.forwardRef(function Breadcrum
|
|
|
30
30
|
[`${prefix}--breadcrumb-item--current`]: isCurrentPage && ariaCurrent !== 'page',
|
|
31
31
|
[customClassName]: !!customClassName
|
|
32
32
|
});
|
|
33
|
-
|
|
34
33
|
if (children.type && children.type.displayName !== undefined && children.type.displayName.includes('OverflowMenu')) {
|
|
35
34
|
const horizontalOverflowIcon = /*#__PURE__*/React__default.createElement(OverflowMenuHorizontal, {
|
|
36
35
|
className: `${prefix}--overflow-menu__icon`
|
|
@@ -46,7 +45,6 @@ const BreadcrumbItem = /*#__PURE__*/React__default.forwardRef(function Breadcrum
|
|
|
46
45
|
renderIcon: () => horizontalOverflowIcon
|
|
47
46
|
}));
|
|
48
47
|
}
|
|
49
|
-
|
|
50
48
|
if (typeof children === 'string') {
|
|
51
49
|
return /*#__PURE__*/React__default.createElement("li", _extends({
|
|
52
50
|
className: className,
|
|
@@ -58,7 +56,6 @@ const BreadcrumbItem = /*#__PURE__*/React__default.forwardRef(function Breadcrum
|
|
|
58
56
|
className: `${prefix}--link`
|
|
59
57
|
}, children));
|
|
60
58
|
}
|
|
61
|
-
|
|
62
59
|
return /*#__PURE__*/React__default.createElement("li", _extends({
|
|
63
60
|
className: className,
|
|
64
61
|
ref: ref
|
|
@@ -70,22 +67,18 @@ const BreadcrumbItem = /*#__PURE__*/React__default.forwardRef(function Breadcrum
|
|
|
70
67
|
BreadcrumbItem.displayName = 'BreadcrumbItem';
|
|
71
68
|
BreadcrumbItem.propTypes = {
|
|
72
69
|
'aria-current': PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
73
|
-
|
|
74
70
|
/**
|
|
75
71
|
* Pass in content that will be inside of the BreadcrumbItem
|
|
76
72
|
*/
|
|
77
73
|
children: PropTypes.node,
|
|
78
|
-
|
|
79
74
|
/**
|
|
80
75
|
* Specify an optional className to be applied to the container node
|
|
81
76
|
*/
|
|
82
77
|
className: PropTypes.string,
|
|
83
|
-
|
|
84
78
|
/**
|
|
85
79
|
* Optional string representing the link location for the BreadcrumbItem
|
|
86
80
|
*/
|
|
87
81
|
href: PropTypes.string,
|
|
88
|
-
|
|
89
82
|
/**
|
|
90
83
|
* Provide if this breadcrumb item represents the current page
|
|
91
84
|
*/
|
|
@@ -10,14 +10,13 @@ import PropTypes from 'prop-types';
|
|
|
10
10
|
import React__default from 'react';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
|
-
import * as FeatureFlags from '@carbon/feature-flags';
|
|
14
13
|
|
|
15
14
|
const ButtonSkeleton = _ref => {
|
|
16
15
|
let {
|
|
17
16
|
className,
|
|
18
17
|
small = false,
|
|
19
18
|
href,
|
|
20
|
-
size =
|
|
19
|
+
size = 'lg',
|
|
21
20
|
...rest
|
|
22
21
|
} = _ref;
|
|
23
22
|
const prefix = usePrefix();
|
|
@@ -42,25 +41,21 @@ const ButtonSkeleton = _ref => {
|
|
|
42
41
|
|
|
43
42
|
return href ? anchor : button;
|
|
44
43
|
};
|
|
45
|
-
|
|
46
44
|
ButtonSkeleton.propTypes = {
|
|
47
45
|
/**
|
|
48
46
|
* Specify an optional className to add.
|
|
49
47
|
*/
|
|
50
48
|
className: PropTypes.string,
|
|
51
|
-
|
|
52
49
|
/**
|
|
53
50
|
* Optionally specify an href for your Button to become an `<a>` element
|
|
54
51
|
*/
|
|
55
52
|
href: PropTypes.string,
|
|
56
|
-
|
|
57
53
|
/**
|
|
58
54
|
* Specify the size of the button, from a list of available sizes.
|
|
59
55
|
* For `default` buttons, this prop can remain unspecified or use `default`.
|
|
60
56
|
* In the next major release of Carbon, `default`, `field`, and `small` will be removed
|
|
61
57
|
*/
|
|
62
|
-
size:
|
|
63
|
-
|
|
58
|
+
size: PropTypes.oneOf(['sm', 'md', 'lg', 'xl', '2xl']),
|
|
64
59
|
/**
|
|
65
60
|
* Specify whether the Button should be a small variant
|
|
66
61
|
*/
|
|
@@ -43,7 +43,6 @@ const Button = /*#__PURE__*/React__default.forwardRef(function Button(_ref, ref)
|
|
|
43
43
|
} = _ref;
|
|
44
44
|
const tooltipRef = useRef(null);
|
|
45
45
|
const prefix = usePrefix();
|
|
46
|
-
|
|
47
46
|
const handleClick = evt => {
|
|
48
47
|
// Prevent clicks on the tooltip from triggering the button click event
|
|
49
48
|
if (evt.target === tooltipRef.current) {
|
|
@@ -51,7 +50,6 @@ const Button = /*#__PURE__*/React__default.forwardRef(function Button(_ref, ref)
|
|
|
51
50
|
return;
|
|
52
51
|
}
|
|
53
52
|
};
|
|
54
|
-
|
|
55
53
|
const buttonClasses = cx(className, {
|
|
56
54
|
[`${prefix}--btn`]: true,
|
|
57
55
|
[`${prefix}--btn--sm`]: size === 'sm' && !isExpressive,
|
|
@@ -88,7 +86,6 @@ const Button = /*#__PURE__*/React__default.forwardRef(function Button(_ref, ref)
|
|
|
88
86
|
href
|
|
89
87
|
};
|
|
90
88
|
let assistiveText;
|
|
91
|
-
|
|
92
89
|
if (dangerButtonVariants.includes(kind)) {
|
|
93
90
|
assistiveText = /*#__PURE__*/React__default.createElement("span", {
|
|
94
91
|
id: assistiveId,
|
|
@@ -97,17 +94,16 @@ const Button = /*#__PURE__*/React__default.forwardRef(function Button(_ref, ref)
|
|
|
97
94
|
} else {
|
|
98
95
|
assistiveText = null;
|
|
99
96
|
}
|
|
100
|
-
|
|
101
97
|
if (as) {
|
|
102
98
|
component = as;
|
|
103
|
-
otherProps = {
|
|
99
|
+
otherProps = {
|
|
100
|
+
...otherProps,
|
|
104
101
|
...anchorProps
|
|
105
102
|
};
|
|
106
103
|
} else if (href && !disabled) {
|
|
107
104
|
component = 'a';
|
|
108
105
|
otherProps = anchorProps;
|
|
109
106
|
}
|
|
110
|
-
|
|
111
107
|
const Button = /*#__PURE__*/React__default.createElement(component, {
|
|
112
108
|
onMouseEnter,
|
|
113
109
|
onMouseLeave,
|
|
@@ -118,28 +114,22 @@ const Button = /*#__PURE__*/React__default.forwardRef(function Button(_ref, ref)
|
|
|
118
114
|
...commonProps,
|
|
119
115
|
...otherProps
|
|
120
116
|
}, assistiveText, children, buttonImage);
|
|
121
|
-
|
|
122
117
|
if (hasIconOnly) {
|
|
123
118
|
let align;
|
|
124
|
-
|
|
125
119
|
if (tooltipPosition === 'top' || tooltipPosition === 'bottom') {
|
|
126
120
|
if (tooltipAlignment === 'center') {
|
|
127
121
|
align = tooltipPosition;
|
|
128
122
|
}
|
|
129
|
-
|
|
130
123
|
if (tooltipAlignment === 'end') {
|
|
131
124
|
align = `${tooltipPosition}-right`;
|
|
132
125
|
}
|
|
133
|
-
|
|
134
126
|
if (tooltipAlignment === 'start') {
|
|
135
127
|
align = `${tooltipPosition}-left`;
|
|
136
128
|
}
|
|
137
129
|
}
|
|
138
|
-
|
|
139
130
|
if (tooltipPosition === 'right' || tooltipPosition === 'left') {
|
|
140
131
|
align = tooltipPosition;
|
|
141
132
|
}
|
|
142
|
-
|
|
143
133
|
return /*#__PURE__*/React__default.createElement(IconButton, _extends({
|
|
144
134
|
as: as,
|
|
145
135
|
align: align,
|
|
@@ -153,7 +143,6 @@ const Button = /*#__PURE__*/React__default.forwardRef(function Button(_ref, ref)
|
|
|
153
143
|
onClick: composeEventHandlers([onClick, handleClick])
|
|
154
144
|
}, rest, commonProps, otherProps), iconOnlyImage ? iconOnlyImage : children);
|
|
155
145
|
}
|
|
156
|
-
|
|
157
146
|
return Button;
|
|
158
147
|
});
|
|
159
148
|
Button.displayName = 'Button';
|
|
@@ -163,37 +152,30 @@ Button.propTypes = {
|
|
|
163
152
|
* Make sure to apply all props to the root node and render children appropriately
|
|
164
153
|
*/
|
|
165
154
|
as: PropTypes.oneOfType([PropTypes.func, PropTypes.string, PropTypes.elementType]),
|
|
166
|
-
|
|
167
155
|
/**
|
|
168
156
|
* Specify the content of your Button
|
|
169
157
|
*/
|
|
170
158
|
children: PropTypes.node,
|
|
171
|
-
|
|
172
159
|
/**
|
|
173
160
|
* Specify an optional className to be added to your Button
|
|
174
161
|
*/
|
|
175
162
|
className: PropTypes.string,
|
|
176
|
-
|
|
177
163
|
/**
|
|
178
164
|
* Specify the message read by screen readers for the danger button variant
|
|
179
165
|
*/
|
|
180
166
|
dangerDescription: PropTypes.string,
|
|
181
|
-
|
|
182
167
|
/**
|
|
183
168
|
* Specify whether the Button should be disabled, or not
|
|
184
169
|
*/
|
|
185
170
|
disabled: PropTypes.bool,
|
|
186
|
-
|
|
187
171
|
/**
|
|
188
172
|
* Specify if the button is an icon-only button
|
|
189
173
|
*/
|
|
190
174
|
hasIconOnly: PropTypes.bool,
|
|
191
|
-
|
|
192
175
|
/**
|
|
193
176
|
* Optionally specify an href for your Button to become an `<a>` element
|
|
194
177
|
*/
|
|
195
178
|
href: PropTypes.string,
|
|
196
|
-
|
|
197
179
|
/**
|
|
198
180
|
* If specifying the `renderIcon` prop, provide a description for that icon that can
|
|
199
181
|
* be read by screen readers
|
|
@@ -202,88 +184,72 @@ Button.propTypes = {
|
|
|
202
184
|
if (props.renderIcon && !props.children && !props.iconDescription) {
|
|
203
185
|
return new Error('renderIcon property specified without also providing an iconDescription property.');
|
|
204
186
|
}
|
|
205
|
-
|
|
206
187
|
return undefined;
|
|
207
188
|
},
|
|
208
|
-
|
|
209
189
|
/**
|
|
210
190
|
* Specify whether the Button is expressive, or not
|
|
211
191
|
*/
|
|
212
192
|
isExpressive: PropTypes.bool,
|
|
213
|
-
|
|
214
193
|
/**
|
|
215
194
|
* Specify whether the Button is currently selected. Only applies to the Ghost variant.
|
|
216
195
|
*/
|
|
217
196
|
isSelected: PropTypes.bool,
|
|
218
|
-
|
|
219
197
|
/**
|
|
220
198
|
* Specify the kind of Button you want to create
|
|
221
199
|
*/
|
|
222
200
|
kind: PropTypes.oneOf(ButtonKinds),
|
|
223
|
-
|
|
224
201
|
/**
|
|
225
202
|
* Provide an optional function to be called when the button element
|
|
226
203
|
* loses focus
|
|
227
204
|
*/
|
|
228
205
|
onBlur: PropTypes.func,
|
|
229
|
-
|
|
230
206
|
/**
|
|
231
207
|
* Provide an optional function to be called when the button element
|
|
232
208
|
* is clicked
|
|
233
209
|
*/
|
|
234
210
|
onClick: PropTypes.func,
|
|
235
|
-
|
|
236
211
|
/**
|
|
237
212
|
* Provide an optional function to be called when the button element
|
|
238
213
|
* receives focus
|
|
239
214
|
*/
|
|
240
215
|
onFocus: PropTypes.func,
|
|
241
|
-
|
|
242
216
|
/**
|
|
243
217
|
* Provide an optional function to be called when the mouse
|
|
244
218
|
* enters the button element
|
|
245
219
|
*/
|
|
246
220
|
onMouseEnter: PropTypes.func,
|
|
247
|
-
|
|
248
221
|
/**
|
|
249
222
|
* Provide an optional function to be called when the mouse
|
|
250
223
|
* leaves the button element
|
|
251
224
|
*/
|
|
252
225
|
onMouseLeave: PropTypes.func,
|
|
253
|
-
|
|
254
226
|
/**
|
|
255
227
|
* Optional prop to allow overriding the icon rendering.
|
|
256
228
|
* Can be a React component class
|
|
257
229
|
*/
|
|
258
230
|
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
259
|
-
|
|
260
231
|
/**
|
|
261
232
|
* Optional prop to specify the role of the Button
|
|
262
233
|
*/
|
|
263
234
|
role: PropTypes.string,
|
|
264
|
-
|
|
265
235
|
/**
|
|
266
236
|
* Specify the size of the button, from the following list of sizes:
|
|
267
237
|
*/
|
|
268
238
|
size: PropTypes.oneOf(['sm', 'md', 'lg', 'xl', '2xl']),
|
|
269
|
-
|
|
270
239
|
/**
|
|
271
240
|
* Optional prop to specify the tabIndex of the Button
|
|
272
241
|
*/
|
|
273
242
|
tabIndex: PropTypes.number,
|
|
274
|
-
|
|
275
243
|
/**
|
|
276
244
|
* Specify the alignment of the tooltip to the icon-only button.
|
|
277
245
|
* Can be one of: start, center, or end.
|
|
278
246
|
*/
|
|
279
247
|
tooltipAlignment: PropTypes.oneOf(['start', 'center', 'end']),
|
|
280
|
-
|
|
281
248
|
/**
|
|
282
249
|
* Specify the direction of the tooltip for icon-only buttons.
|
|
283
250
|
* Can be either top, right, bottom, or left.
|
|
284
251
|
*/
|
|
285
252
|
tooltipPosition: PropTypes.oneOf(['top', 'right', 'bottom', 'left']),
|
|
286
|
-
|
|
287
253
|
/**
|
|
288
254
|
* Optional prop to specify the type of the Button
|
|
289
255
|
*/
|
|
@@ -33,12 +33,10 @@ ButtonSet.propTypes = {
|
|
|
33
33
|
* Specify the content of your ButtonSet
|
|
34
34
|
*/
|
|
35
35
|
children: PropTypes.node,
|
|
36
|
-
|
|
37
36
|
/**
|
|
38
37
|
* Specify an optional className to be added to your ButtonSet
|
|
39
38
|
*/
|
|
40
39
|
className: PropTypes.string,
|
|
41
|
-
|
|
42
40
|
/**
|
|
43
41
|
* Specify the button arrangement of the set (vertically stacked or
|
|
44
42
|
* horizontal)
|