@carbon/react 1.86.0 → 1.87.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 +871 -871
- package/es/_virtual/_rollupPluginBabelHelpers.js +4 -4
- package/es/components/Button/Button.Skeleton.js +2 -1
- package/es/components/Button/Button.d.ts +1 -1
- package/es/components/Button/Button.js +3 -3
- package/es/components/Button/ButtonBase.js +2 -0
- package/es/components/Button/index.js +5 -1
- package/es/components/ButtonSet/index.js +4 -1
- package/es/components/Checkbox/index.js +4 -1
- package/es/components/CodeSnippet/CodeSnippet.js +1 -0
- package/es/components/ComboBox/ComboBox.d.ts +7 -0
- package/es/components/ComboBox/ComboBox.js +11 -2
- package/es/components/ComboBox/index.js +4 -1
- package/es/components/ComposedModal/ComposedModal.js +18 -8
- package/es/components/ContainedList/ContainedList.d.ts +1 -1
- package/es/components/ContainedList/ContainedList.js +3 -3
- package/es/components/ContainedList/ContainedListItem/index.js +4 -1
- package/es/components/ContainedList/index.js +2 -2
- package/es/components/Copy/Copy.js +1 -1
- package/es/components/Copy/index.js +4 -1
- package/es/components/CopyButton/index.js +4 -1
- package/es/components/DataTable/Table.js +1 -1
- package/es/components/DataTable/state/getDerivedStateFromProps.d.ts +19 -0
- package/es/components/DataTable/state/getDerivedStateFromProps.js +1 -2
- package/es/components/DataTable/state/sorting.d.ts +15 -0
- package/es/components/DataTable/state/sorting.js +1 -2
- package/es/components/DataTable/tools/denormalize.d.ts +22 -0
- package/es/components/DataTable/tools/denormalize.js +1 -2
- package/es/components/DataTable/tools/normalize.d.ts +9 -0
- package/es/components/DataTable/tools/normalize.js +1 -2
- package/es/components/DatePicker/DatePicker.js +18 -11
- package/es/components/DatePicker/index.js +4 -1
- package/es/components/DatePicker/plugins/fixEventsPlugin.d.ts +2 -0
- package/es/components/DatePicker/plugins/rangePlugin.d.ts +2 -0
- package/es/components/DatePickerInput/DatePickerInput.js +6 -0
- package/es/components/DatePickerInput/index.js +4 -1
- package/es/components/Dialog/index.js +2 -2
- package/es/components/Dropdown/Dropdown.Skeleton.js +4 -4
- package/es/components/Dropdown/Dropdown.js +2 -2
- package/es/components/Dropdown/index.js +4 -1
- package/es/components/FeatureFlags/index.js +2 -2
- package/es/components/FluidNumberInput/FluidNumberInput.d.ts +3 -2
- package/es/components/FluidNumberInput/FluidNumberInput.js +3 -2
- package/es/components/FluidSelect/index.js +4 -1
- package/es/components/FluidTextInput/index.js +4 -1
- package/es/components/IconButton/index.d.ts +1 -1
- package/es/components/IconIndicator/index.js +1 -1
- package/es/components/InlineCheckbox/index.js +4 -1
- package/es/components/InlineLoading/index.js +4 -1
- package/es/components/LayoutDirection/LayoutDirection.js +1 -2
- package/es/components/Link/index.js +4 -1
- package/es/components/ListBox/ListBox.js +1 -1
- package/es/components/Loading/index.js +4 -1
- package/es/components/Menu/Menu.d.ts +3 -1
- package/es/components/Menu/Menu.js +3 -1
- package/es/components/Menu/MenuItem.js +1 -1
- package/es/components/Modal/Modal.js +16 -5
- package/es/components/Modal/index.js +4 -1
- package/es/components/MultiSelect/FilterableMultiSelect.d.ts +7 -0
- package/es/components/MultiSelect/FilterableMultiSelect.js +20 -10
- package/es/components/MultiSelect/MultiSelect.js +2 -2
- package/es/components/MultiSelect/filter.js +0 -4
- package/es/components/MultiSelect/tools/itemToString.d.ts +1 -0
- package/es/components/MultiSelect/tools/sorting.d.ts +9 -0
- package/es/components/Notification/Notification.js +2 -2
- package/es/components/NumberInput/NumberInput.d.ts +3 -2
- package/es/components/NumberInput/NumberInput.js +5 -4
- package/es/components/OverflowMenu/next/index.js +1 -1
- package/es/components/OverflowMenuItem/index.js +4 -1
- package/es/components/OverflowMenuV2/index.d.ts +1 -0
- package/es/components/PageHeader/PageHeader.js +1 -1
- package/es/components/Pagination/experimental/PageSelector.d.ts +19 -0
- package/es/components/Pagination/experimental/Pagination.d.ts +43 -0
- package/es/components/Pagination/experimental/index.d.ts +3 -0
- package/es/components/Popover/index.js +26 -8
- package/es/components/RadioButton/index.js +4 -1
- package/es/components/RadioTile/index.js +4 -1
- package/es/components/Search/Search.js +1 -1
- package/es/components/Search/index.js +4 -1
- package/es/components/Select/index.js +4 -1
- package/es/components/SelectItem/index.js +4 -1
- package/es/components/ShapeIndicator/index.js +1 -1
- package/es/components/SkeletonText/index.js +4 -1
- package/es/components/Slider/Slider.js +1 -1
- package/es/components/Switch/IconSwitch.d.ts +3 -0
- package/es/components/Switch/IconSwitch.js +1 -2
- package/es/components/TabContent/TabContent.js +2 -22
- package/es/components/Tabs/Tabs.js +5 -5
- package/es/components/Tag/DismissibleTag.js +1 -1
- package/es/components/TextArea/TextArea.js +1 -1
- package/es/components/TextArea/index.js +4 -1
- package/es/components/TextInput/index.js +4 -1
- package/es/components/TextInput/util.d.ts +9 -0
- package/es/components/Toggletip/index.d.ts +1 -1
- package/es/components/Toggletip/index.js +3 -3
- package/es/components/UIShell/HeaderMenu.js +2 -2
- package/es/components/UIShell/SideNav.js +1 -1
- package/es/components/UIShell/_utils.d.ts +7 -0
- package/es/feature-flags.d.ts +1 -0
- package/es/internal/FloatingMenu.js +1 -1
- package/es/internal/deprecateFieldOnObject.js +1 -1
- package/es/internal/useEvent.d.ts +2 -2
- package/es/internal/useEvent.js +4 -3
- package/es/internal/useId.d.ts +21 -0
- package/es/internal/useId.js +27 -1
- package/es/internal/useOverflowItems.js +0 -6
- package/es/node_modules/es-toolkit/dist/compat/function/{debounce.mjs.js → debounce.js} +1 -1
- package/es/node_modules/es-toolkit/dist/compat/function/{throttle.mjs.js → throttle.js} +1 -1
- package/es/prop-types/deprecateComponent.d.ts +1 -0
- package/es/prop-types/deprecateComponent.js +1 -4
- package/es/prop-types/deprecateValuesWithin.d.ts +1 -0
- package/es/prop-types/requiredIfGivenPropIsTruthy.d.ts +14 -0
- package/es/tools/mergeRefs.d.ts +12 -0
- package/es/tools/mergeRefs.js +1 -2
- package/icons/index.js +1 -3
- package/lib/_virtual/_rollupPluginBabelHelpers.js +5 -7
- package/lib/components/AILabel/index.js +35 -43
- package/lib/components/AISkeleton/AISkeletonIcon.js +5 -11
- package/lib/components/AISkeleton/AISkeletonPlaceholder.js +4 -10
- package/lib/components/AISkeleton/AISkeletonText.js +8 -14
- package/lib/components/Accordion/Accordion.Skeleton.js +21 -27
- package/lib/components/Accordion/Accordion.js +11 -17
- package/lib/components/Accordion/AccordionItem.js +19 -25
- package/lib/components/Accordion/AccordionProvider.js +1 -7
- package/lib/components/AspectRatio/AspectRatio.js +7 -13
- package/lib/components/BadgeIndicator/index.js +7 -13
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.js +7 -13
- package/lib/components/Breadcrumb/Breadcrumb.js +9 -15
- package/lib/components/Breadcrumb/BreadcrumbItem.js +16 -22
- package/lib/components/Button/Button.Skeleton.js +9 -14
- package/lib/components/Button/Button.d.ts +1 -1
- package/lib/components/Button/Button.js +32 -37
- package/lib/components/Button/ButtonBase.js +8 -11
- package/lib/components/Button/index.js +3 -3
- package/lib/components/ButtonSet/ButtonSet.js +6 -12
- package/lib/components/ButtonSet/index.js +2 -2
- package/lib/components/ChatButton/ChatButton.Skeleton.js +5 -11
- package/lib/components/ChatButton/ChatButton.js +12 -18
- package/lib/components/Checkbox/Checkbox.Skeleton.js +6 -12
- package/lib/components/Checkbox/Checkbox.js +33 -39
- package/lib/components/Checkbox/index.js +3 -3
- package/lib/components/CheckboxGroup/CheckboxGroup.js +24 -30
- package/lib/components/ClassPrefix/index.js +3 -10
- package/lib/components/CodeSnippet/CodeSnippet.Skeleton.js +10 -16
- package/lib/components/CodeSnippet/CodeSnippet.js +40 -46
- package/lib/components/ComboBox/ComboBox.d.ts +7 -0
- package/lib/components/ComboBox/ComboBox.js +65 -63
- package/lib/components/ComboBox/index.js +2 -2
- package/lib/components/ComboButton/index.js +20 -28
- package/lib/components/ComposedModal/ComposedModal.js +61 -57
- package/lib/components/ComposedModal/ModalFooter.js +37 -45
- package/lib/components/ComposedModal/ModalHeader.js +23 -31
- package/lib/components/ContainedList/ContainedList.d.ts +1 -1
- package/lib/components/ContainedList/ContainedList.js +19 -25
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +14 -20
- package/lib/components/ContainedList/ContainedListItem/index.js +2 -2
- package/lib/components/ContainedList/index.js +5 -5
- package/lib/components/ContentSwitcher/ContentSwitcher.js +11 -19
- package/lib/components/ContextMenu/useContextMenu.js +1 -1
- package/lib/components/Copy/Copy.js +12 -18
- package/lib/components/Copy/index.js +2 -2
- package/lib/components/CopyButton/CopyButton.js +12 -18
- package/lib/components/CopyButton/index.js +2 -2
- package/lib/components/DangerButton/DangerButton.js +2 -6
- package/lib/components/DataTable/DataTable.js +48 -55
- package/lib/components/DataTable/Table.js +18 -24
- package/lib/components/DataTable/TableActionList.js +2 -2
- package/lib/components/DataTable/TableBatchAction.js +4 -9
- package/lib/components/DataTable/TableBatchActions.js +19 -25
- package/lib/components/DataTable/TableBody.js +5 -10
- package/lib/components/DataTable/TableCell.js +8 -14
- package/lib/components/DataTable/TableContainer.js +14 -20
- package/lib/components/DataTable/TableContext.js +0 -2
- package/lib/components/DataTable/TableDecoratorRow.js +5 -11
- package/lib/components/DataTable/TableExpandHeader.js +16 -22
- package/lib/components/DataTable/TableExpandRow.js +20 -26
- package/lib/components/DataTable/TableExpandedRow.js +8 -14
- package/lib/components/DataTable/TableHead.js +2 -2
- package/lib/components/DataTable/TableHeader.js +26 -32
- package/lib/components/DataTable/TableRow.js +8 -14
- package/lib/components/DataTable/TableSelectAll.js +13 -19
- package/lib/components/DataTable/TableSelectRow.js +15 -21
- package/lib/components/DataTable/TableSlugRow.js +7 -13
- package/lib/components/DataTable/TableToolbar.js +7 -13
- package/lib/components/DataTable/TableToolbarAction.js +5 -10
- package/lib/components/DataTable/TableToolbarContent.js +2 -2
- package/lib/components/DataTable/TableToolbarMenu.js +9 -15
- package/lib/components/DataTable/TableToolbarSearch.js +22 -28
- package/lib/components/DataTable/state/getDerivedStateFromProps.d.ts +19 -0
- package/lib/components/DataTable/state/getDerivedStateFromProps.js +2 -3
- package/lib/components/DataTable/state/sortStates.js +0 -2
- package/lib/components/DataTable/state/sorting.d.ts +15 -0
- package/lib/components/DataTable/state/sorting.js +0 -2
- package/lib/components/DataTable/tools/cells.js +0 -2
- package/lib/components/DataTable/tools/denormalize.d.ts +22 -0
- package/lib/components/DataTable/tools/denormalize.js +1 -2
- package/lib/components/DataTable/tools/filter.js +0 -2
- package/lib/components/DataTable/tools/normalize.d.ts +9 -0
- package/lib/components/DataTable/tools/normalize.js +1 -2
- package/lib/components/DataTable/tools/sorting.js +0 -2
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +25 -31
- package/lib/components/DatePicker/DatePicker.Skeleton.js +14 -20
- package/lib/components/DatePicker/DatePicker.js +65 -66
- package/lib/components/DatePicker/index.js +3 -3
- package/lib/components/DatePicker/plugins/appendToPlugin.js +0 -2
- package/lib/components/DatePicker/plugins/fixEventsPlugin.d.ts +2 -0
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +1 -1
- package/lib/components/DatePicker/plugins/rangePlugin.d.ts +2 -0
- package/lib/components/DatePicker/plugins/rangePlugin.js +2 -6
- package/lib/components/DatePickerInput/DatePickerInput.js +49 -49
- package/lib/components/DatePickerInput/index.js +2 -2
- package/lib/components/Dialog/index.js +72 -80
- package/lib/components/Dropdown/Dropdown.Skeleton.js +10 -16
- package/lib/components/Dropdown/Dropdown.js +49 -55
- package/lib/components/Dropdown/index.js +3 -3
- package/lib/components/ErrorBoundary/ErrorBoundary.js +4 -9
- package/lib/components/ErrorBoundary/ErrorBoundaryContext.js +0 -2
- package/lib/components/ExpandableSearch/ExpandableSearch.js +6 -11
- package/lib/components/FeatureFlags/index.js +10 -17
- package/lib/components/FileUploader/FileUploader.Skeleton.js +7 -13
- package/lib/components/FileUploader/FileUploader.js +30 -36
- package/lib/components/FileUploader/FileUploaderButton.js +19 -25
- package/lib/components/FileUploader/FileUploaderDropContainer.js +18 -24
- package/lib/components/FileUploader/FileUploaderItem.js +23 -29
- package/lib/components/FileUploader/Filename.js +13 -18
- package/lib/components/FluidComboBox/FluidComboBox.Skeleton.js +7 -13
- package/lib/components/FluidComboBox/FluidComboBox.js +24 -30
- package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.js +14 -20
- package/lib/components/FluidDatePicker/FluidDatePicker.js +12 -18
- package/lib/components/FluidDatePickerInput/FluidDatePickerInput.js +4 -8
- package/lib/components/FluidDropdown/FluidDropdown.Skeleton.js +7 -13
- package/lib/components/FluidDropdown/FluidDropdown.js +24 -30
- package/lib/components/FluidForm/FluidForm.js +6 -12
- package/lib/components/FluidForm/FormContext.js +0 -2
- package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +7 -13
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +36 -42
- package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.js +7 -13
- package/lib/components/FluidNumberInput/FluidNumberInput.d.ts +3 -2
- package/lib/components/FluidNumberInput/FluidNumberInput.js +33 -38
- package/lib/components/FluidSearch/FluidSearch.Skeleton.js +7 -13
- package/lib/components/FluidSearch/FluidSearch.js +19 -25
- package/lib/components/FluidSelect/FluidSelect.Skeleton.js +7 -13
- package/lib/components/FluidSelect/FluidSelect.js +17 -23
- package/lib/components/FluidSelect/index.js +3 -3
- package/lib/components/FluidTextArea/FluidTextArea.Skeleton.js +7 -13
- package/lib/components/FluidTextArea/FluidTextArea.js +25 -31
- package/lib/components/FluidTextInput/FluidPasswordInput.js +18 -22
- package/lib/components/FluidTextInput/FluidTextInput.Skeleton.js +7 -13
- package/lib/components/FluidTextInput/FluidTextInput.js +23 -29
- package/lib/components/FluidTextInput/index.js +3 -3
- package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +6 -12
- package/lib/components/FluidTimePicker/FluidTimePicker.js +23 -29
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +10 -15
- package/lib/components/Form/Form.js +5 -11
- package/lib/components/FormGroup/FormGroup.js +13 -19
- package/lib/components/FormItem/FormItem.js +5 -11
- package/lib/components/FormLabel/FormLabel.js +6 -12
- package/lib/components/Grid/CSSGrid.js +20 -28
- package/lib/components/Grid/Column.js +31 -37
- package/lib/components/Grid/ColumnHang.js +5 -13
- package/lib/components/Grid/FlexGrid.js +10 -18
- package/lib/components/Grid/Grid.js +9 -16
- package/lib/components/Grid/GridContext.js +7 -14
- package/lib/components/Grid/Row.js +8 -14
- package/lib/components/Heading/index.js +14 -21
- package/lib/components/Icon/Icon.Skeleton.js +4 -10
- package/lib/components/IconButton/index.d.ts +1 -1
- package/lib/components/IconButton/index.js +25 -33
- package/lib/components/IconIndicator/index.js +9 -15
- package/lib/components/IdPrefix/index.js +3 -10
- package/lib/components/InlineCheckbox/InlineCheckbox.js +17 -22
- package/lib/components/InlineCheckbox/index.js +2 -2
- package/lib/components/InlineLoading/InlineLoading.js +17 -23
- package/lib/components/InlineLoading/index.js +2 -2
- package/lib/components/Layer/LayerContext.js +1 -7
- package/lib/components/Layer/LayerLevel.js +0 -2
- package/lib/components/Layer/index.js +11 -19
- package/lib/components/Layout/index.js +22 -30
- package/lib/components/LayoutDirection/LayoutDirection.js +6 -13
- package/lib/components/LayoutDirection/LayoutDirectionContext.js +1 -7
- package/lib/components/LayoutDirection/useLayoutDirection.js +0 -2
- package/lib/components/Link/Link.js +15 -21
- package/lib/components/Link/index.js +2 -2
- package/lib/components/ListBox/ListBox.js +17 -23
- package/lib/components/ListBox/ListBoxField.js +7 -12
- package/lib/components/ListBox/ListBoxMenu.js +7 -12
- package/lib/components/ListBox/ListBoxMenuIcon.js +7 -13
- package/lib/components/ListBox/ListBoxMenuItem.js +9 -15
- package/lib/components/ListBox/ListBoxPropTypes.js +2 -8
- package/lib/components/ListBox/ListBoxSelection.js +14 -20
- package/lib/components/ListBox/index.js +7 -7
- package/lib/components/ListBox/next/ListBoxSelection.js +18 -24
- package/lib/components/ListBox/next/ListBoxTrigger.js +7 -13
- package/lib/components/ListItem/ListItem.js +5 -11
- package/lib/components/Loading/Loading.js +14 -20
- package/lib/components/Loading/index.js +2 -2
- package/lib/components/Menu/Menu.d.ts +3 -1
- package/lib/components/Menu/Menu.js +18 -24
- package/lib/components/Menu/MenuContext.js +0 -2
- package/lib/components/Menu/MenuItem.js +44 -52
- package/lib/components/MenuButton/index.js +16 -24
- package/lib/components/Modal/Modal.js +91 -86
- package/lib/components/Modal/index.js +2 -2
- package/lib/components/ModalWrapper/ModalWrapper.js +30 -35
- package/lib/components/MultiSelect/FilterableMultiSelect.d.ts +7 -0
- package/lib/components/MultiSelect/FilterableMultiSelect.js +71 -71
- package/lib/components/MultiSelect/MultiSelect.js +61 -70
- package/lib/components/MultiSelect/MultiSelectPropTypes.js +2 -8
- package/lib/components/MultiSelect/filter.js +0 -6
- package/lib/components/MultiSelect/tools/itemToString.d.ts +1 -0
- package/lib/components/MultiSelect/tools/itemToString.js +1 -7
- package/lib/components/MultiSelect/tools/sorting.d.ts +9 -0
- package/lib/components/MultiSelect/tools/sorting.js +0 -2
- package/lib/components/Notification/Notification.js +118 -126
- package/lib/components/NumberInput/NumberFormatPropTypes.js +21 -27
- package/lib/components/NumberInput/NumberInput.Skeleton.js +8 -14
- package/lib/components/NumberInput/NumberInput.d.ts +3 -2
- package/lib/components/NumberInput/NumberInput.js +70 -77
- package/lib/components/OrderedList/OrderedList.js +8 -14
- package/lib/components/OverflowMenu/OverflowMenu.js +42 -49
- package/lib/components/OverflowMenu/index.js +3 -7
- package/lib/components/OverflowMenu/next/index.js +18 -26
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +27 -33
- package/lib/components/OverflowMenuItem/index.js +2 -2
- package/lib/components/OverflowMenuV2/index.d.ts +1 -0
- package/lib/components/OverflowMenuV2/index.js +2 -8
- package/lib/components/PageHeader/PageHeader.js +70 -78
- package/lib/components/PageHeader/index.js +0 -2
- package/lib/components/Pagination/Pagination.Skeleton.js +10 -16
- package/lib/components/Pagination/Pagination.js +44 -51
- package/lib/components/Pagination/experimental/PageSelector.d.ts +19 -0
- package/lib/components/Pagination/experimental/PageSelector.js +9 -15
- package/lib/components/Pagination/experimental/Pagination.d.ts +43 -0
- package/lib/components/Pagination/experimental/Pagination.js +34 -40
- package/lib/components/Pagination/experimental/index.d.ts +3 -0
- package/lib/components/PaginationNav/PaginationNav.js +54 -60
- package/lib/components/Popover/index.js +60 -50
- package/lib/components/PrimaryButton/PrimaryButton.js +2 -6
- package/lib/components/ProgressBar/ProgressBar.js +25 -31
- package/lib/components/ProgressIndicator/ProgressIndicator.Skeleton.js +10 -16
- package/lib/components/ProgressIndicator/ProgressIndicator.js +41 -49
- package/lib/components/RadioButton/RadioButton.Skeleton.js +6 -12
- package/lib/components/RadioButton/RadioButton.js +26 -32
- package/lib/components/RadioButton/index.js +2 -2
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +37 -43
- package/lib/components/RadioTile/RadioTile.js +25 -31
- package/lib/components/RadioTile/index.js +2 -2
- package/lib/components/Search/Search.Skeleton.js +7 -13
- package/lib/components/Search/Search.js +33 -39
- package/lib/components/Search/index.js +3 -3
- package/lib/components/SecondaryButton/SecondaryButton.js +2 -6
- package/lib/components/Select/Select.Skeleton.js +8 -14
- package/lib/components/Select/Select.js +42 -48
- package/lib/components/Select/index.js +3 -3
- package/lib/components/SelectItem/SelectItem.js +8 -14
- package/lib/components/SelectItem/index.js +2 -2
- package/lib/components/SelectItemGroup/SelectItemGroup.js +7 -13
- package/lib/components/ShapeIndicator/index.js +12 -18
- package/lib/components/SkeletonIcon/SkeletonIcon.js +4 -10
- package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +4 -10
- package/lib/components/SkeletonText/SkeletonText.js +11 -17
- package/lib/components/SkeletonText/index.js +2 -2
- package/lib/components/Slider/Slider.Skeleton.js +29 -35
- package/lib/components/Slider/Slider.js +84 -90
- package/lib/components/Slider/SliderHandles.js +18 -24
- package/lib/components/Slider/index.js +3 -3
- package/lib/components/Stack/HStack.js +1 -7
- package/lib/components/Stack/Stack.js +7 -15
- package/lib/components/Stack/VStack.js +1 -7
- package/lib/components/StructuredList/StructuredList.Skeleton.js +15 -21
- package/lib/components/StructuredList/StructuredList.js +60 -68
- package/lib/components/Switch/IconSwitch.d.ts +3 -0
- package/lib/components/Switch/IconSwitch.js +18 -25
- package/lib/components/Switch/Switch.js +14 -20
- package/lib/components/TabContent/TabContent.js +7 -33
- package/lib/components/Tabs/Tabs.Skeleton.js +10 -16
- package/lib/components/Tabs/Tabs.js +121 -129
- package/lib/components/Tabs/usePressable.js +0 -2
- package/lib/components/Tag/DismissibleTag.js +24 -30
- package/lib/components/Tag/OperationalTag.js +16 -22
- package/lib/components/Tag/SelectableTag.js +19 -25
- package/lib/components/Tag/Tag.Skeleton.js +5 -11
- package/lib/components/Tag/Tag.js +28 -34
- package/lib/components/Tag/isEllipsisActive.js +0 -2
- package/lib/components/Text/Text.js +6 -13
- package/lib/components/Text/TextDirection.js +4 -11
- package/lib/components/Text/TextDirectionContext.js +0 -2
- package/lib/components/Text/createTextComponent.js +1 -7
- package/lib/components/Text/index.js +0 -2
- package/lib/components/TextArea/TextArea.Skeleton.js +7 -13
- package/lib/components/TextArea/TextArea.js +49 -55
- package/lib/components/TextArea/index.js +3 -3
- package/lib/components/TextInput/ControlledPasswordInput.js +36 -42
- package/lib/components/TextInput/PasswordInput.js +48 -54
- package/lib/components/TextInput/TextInput.Skeleton.js +7 -13
- package/lib/components/TextInput/TextInput.js +47 -53
- package/lib/components/TextInput/index.js +3 -3
- package/lib/components/TextInput/util.d.ts +9 -0
- package/lib/components/TextInput/util.js +0 -2
- package/lib/components/Theme/index.js +16 -24
- package/lib/components/Tile/Tile.js +92 -100
- package/lib/components/TileGroup/TileGroup.js +15 -22
- package/lib/components/TimePicker/TimePicker.js +39 -45
- package/lib/components/TimePickerSelect/TimePickerSelect.js +10 -16
- package/lib/components/Toggle/Toggle.Skeleton.js +7 -13
- package/lib/components/Toggle/Toggle.js +28 -34
- package/lib/components/ToggleSmall/ToggleSmall.Skeleton.js +12 -20
- package/lib/components/Toggletip/index.d.ts +1 -1
- package/lib/components/Toggletip/index.js +33 -41
- package/lib/components/Tooltip/DefinitionTooltip.js +14 -22
- package/lib/components/Tooltip/Tooltip.js +19 -27
- package/lib/components/TreeView/TreeContext.js +0 -2
- package/lib/components/TreeView/TreeNode.js +41 -47
- package/lib/components/TreeView/TreeView.js +17 -23
- package/lib/components/UIShell/Content.js +6 -12
- package/lib/components/UIShell/Header.js +4 -10
- package/lib/components/UIShell/HeaderContainer.js +4 -9
- package/lib/components/UIShell/HeaderGlobalAction.js +11 -17
- package/lib/components/UIShell/HeaderGlobalBar.js +2 -2
- package/lib/components/UIShell/HeaderMenu.js +17 -23
- package/lib/components/UIShell/HeaderMenuButton.js +9 -15
- package/lib/components/UIShell/HeaderMenuItem.js +11 -17
- package/lib/components/UIShell/HeaderName.js +8 -14
- package/lib/components/UIShell/HeaderNavigation.js +6 -12
- package/lib/components/UIShell/HeaderPanel.js +11 -17
- package/lib/components/UIShell/HeaderSideNavItems.js +6 -12
- package/lib/components/UIShell/Link.js +6 -11
- package/lib/components/UIShell/SideNav.js +23 -29
- package/lib/components/UIShell/SideNavDetails.js +7 -13
- package/lib/components/UIShell/SideNavDivider.js +5 -11
- package/lib/components/UIShell/SideNavFooter.js +12 -18
- package/lib/components/UIShell/SideNavHeader.js +8 -14
- package/lib/components/UIShell/SideNavIcon.js +6 -12
- package/lib/components/UIShell/SideNavItem.js +6 -12
- package/lib/components/UIShell/SideNavItems.js +9 -15
- package/lib/components/UIShell/SideNavLink.js +13 -19
- package/lib/components/UIShell/SideNavLinkText.js +5 -11
- package/lib/components/UIShell/SideNavMenu.js +20 -26
- package/lib/components/UIShell/SideNavMenuItem.js +13 -19
- package/lib/components/UIShell/SideNavSwitcher.js +13 -19
- package/lib/components/UIShell/SkipToContent.js +7 -13
- package/lib/components/UIShell/Switcher.js +9 -15
- package/lib/components/UIShell/SwitcherDivider.js +4 -10
- package/lib/components/UIShell/SwitcherItem.js +15 -21
- package/lib/components/UIShell/_utils.d.ts +7 -0
- package/lib/components/UIShell/_utils.js +0 -2
- package/lib/components/UnorderedList/UnorderedList.js +7 -13
- package/lib/feature-flags.d.ts +1 -0
- package/lib/feature-flags.js +3 -4
- package/lib/index.js +180 -182
- package/lib/internal/FloatingMenu.js +10 -18
- package/lib/internal/OptimizedResize.js +2 -8
- package/lib/internal/Selection.js +1 -7
- package/lib/internal/clamp.js +0 -2
- package/lib/internal/createClassWrapper.js +1 -7
- package/lib/internal/deprecateFieldOnObject.js +1 -3
- package/lib/internal/environment.js +0 -2
- package/lib/internal/getAnnouncement.js +0 -2
- package/lib/internal/keyboard/keys.js +0 -2
- package/lib/internal/keyboard/match.js +0 -2
- package/lib/internal/keyboard/navigation.js +0 -2
- package/lib/internal/noopFn.js +0 -2
- package/lib/internal/useAttachedMenu.js +0 -2
- package/lib/internal/useControllableState.js +0 -2
- package/lib/internal/useDelayedState.js +0 -2
- package/lib/internal/useEvent.d.ts +2 -2
- package/lib/internal/useEvent.js +4 -5
- package/lib/internal/useId.d.ts +21 -0
- package/lib/internal/useId.js +27 -7
- package/lib/internal/useIdPrefix.js +2 -8
- package/lib/internal/useIsomorphicEffect.js +1 -1
- package/lib/internal/useMatchMedia.js +0 -2
- package/lib/internal/useMergedRefs.js +0 -2
- package/lib/internal/useNoInteractiveChildren.js +0 -2
- package/lib/internal/useNormalizedInputProps.js +2 -8
- package/lib/internal/useOutsideClick.js +0 -2
- package/lib/internal/useOverflowItems.js +1 -7
- package/lib/internal/usePrefix.js +2 -8
- package/lib/internal/usePreviousValue.js +0 -2
- package/lib/internal/useResizeObserver.js +0 -2
- package/lib/internal/useSavedCallback.js +0 -2
- package/lib/internal/utils.js +0 -2
- package/lib/internal/warning.js +0 -2
- package/lib/internal/wrapFocus.js +0 -2
- package/lib/node_modules/es-toolkit/dist/compat/function/{debounce.mjs.js → debounce.js} +1 -3
- package/lib/node_modules/es-toolkit/dist/compat/function/{throttle.mjs.js → throttle.js} +1 -3
- package/lib/node_modules/es-toolkit/dist/function/{debounce.mjs.js → debounce.js} +0 -2
- package/lib/prop-types/AriaPropTypes.js +2 -8
- package/lib/prop-types/deprecate.js +0 -2
- package/lib/prop-types/deprecateComponent.d.ts +1 -0
- package/lib/prop-types/deprecateComponent.js +2 -5
- package/lib/prop-types/deprecateValuesWithin.d.ts +1 -0
- package/lib/prop-types/deprecateValuesWithin.js +1 -1
- package/lib/prop-types/isRequiredOneOf.js +0 -2
- package/lib/prop-types/requiredIfGivenPropIsTruthy.d.ts +14 -0
- package/lib/prop-types/requiredIfGivenPropIsTruthy.js +1 -1
- package/lib/tools/events.js +0 -2
- package/lib/tools/mapPopoverAlign.js +0 -2
- package/lib/tools/mergeRefs.d.ts +12 -0
- package/lib/tools/mergeRefs.js +1 -2
- package/lib/tools/setupGetInstanceId.js +0 -2
- package/lib/tools/toggleClass.js +0 -2
- package/lib/tools/wrapComponent.js +4 -10
- package/package.json +12 -12
- package/telemetry.yml +1 -0
- /package/es/node_modules/es-toolkit/dist/function/{debounce.mjs.js → debounce.js} +0 -0
|
@@ -7,14 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
-
|
|
12
10
|
var React = require('react');
|
|
13
11
|
|
|
14
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
15
|
-
|
|
16
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
17
|
-
|
|
18
12
|
const AccordionContext = /*#__PURE__*/React.createContext({
|
|
19
13
|
disabled: false
|
|
20
14
|
});
|
|
@@ -22,7 +16,7 @@ const AccordionProvider = ({
|
|
|
22
16
|
disabled,
|
|
23
17
|
children
|
|
24
18
|
}) => {
|
|
25
|
-
return /*#__PURE__*/
|
|
19
|
+
return /*#__PURE__*/React.createElement(AccordionContext.Provider, {
|
|
26
20
|
value: {
|
|
27
21
|
disabled
|
|
28
22
|
}
|
|
@@ -15,12 +15,6 @@ var PropTypes = require('prop-types');
|
|
|
15
15
|
var React = require('react');
|
|
16
16
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
17
|
|
|
18
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
|
-
|
|
20
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
21
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
22
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
23
|
-
|
|
24
18
|
/**
|
|
25
19
|
* The AspectRatio component provides a `ratio` prop that will be used to
|
|
26
20
|
* specify the aspect ratio that the children you provide will be displayed in.
|
|
@@ -35,8 +29,8 @@ const AspectRatio = ({
|
|
|
35
29
|
...rest
|
|
36
30
|
}) => {
|
|
37
31
|
const prefix = usePrefix.usePrefix();
|
|
38
|
-
const className =
|
|
39
|
-
return /*#__PURE__*/
|
|
32
|
+
const className = cx(containerClassName, `${prefix}--aspect-ratio`, `${prefix}--aspect-ratio--${ratio}`);
|
|
33
|
+
return /*#__PURE__*/React.createElement(BaseComponent, _rollupPluginBabelHelpers.extends({
|
|
40
34
|
className: className
|
|
41
35
|
}, rest), children);
|
|
42
36
|
};
|
|
@@ -50,20 +44,20 @@ AspectRatio.propTypes = {
|
|
|
50
44
|
* <AspectRatio as="article">My content</AspectRatio>
|
|
51
45
|
* ```
|
|
52
46
|
*/
|
|
53
|
-
as:
|
|
47
|
+
as: PropTypes.elementType,
|
|
54
48
|
/**
|
|
55
49
|
* Specify the content that will be placed in the aspect ratio
|
|
56
50
|
*/
|
|
57
|
-
children:
|
|
51
|
+
children: PropTypes.node,
|
|
58
52
|
/**
|
|
59
53
|
* Specify a class name for the outermost node of the component
|
|
60
54
|
*/
|
|
61
|
-
className:
|
|
55
|
+
className: PropTypes.string,
|
|
62
56
|
/**
|
|
63
57
|
* Specify the ratio to be used by the aspect ratio container. This will
|
|
64
58
|
* determine what aspect ratio your content will be displayed in.
|
|
65
59
|
*/
|
|
66
|
-
ratio:
|
|
60
|
+
ratio: PropTypes.oneOf(['16x9', '9x16', '2x1', '1x2', '4x3', '3x4', '3x2', '2x3', '1x1'])
|
|
67
61
|
};
|
|
68
62
|
|
|
69
|
-
exports
|
|
63
|
+
exports.default = AspectRatio;
|
|
@@ -15,23 +15,17 @@ var React = require('react');
|
|
|
15
15
|
var cx = require('classnames');
|
|
16
16
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
21
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
23
|
-
|
|
24
|
-
const BadgeIndicator = /*#__PURE__*/React__default["default"].forwardRef(function BadgeIndicatorContent({
|
|
18
|
+
const BadgeIndicator = /*#__PURE__*/React.forwardRef(function BadgeIndicatorContent({
|
|
25
19
|
className: customClassName,
|
|
26
20
|
count,
|
|
27
21
|
...rest
|
|
28
22
|
}, ref) {
|
|
29
23
|
const prefix = usePrefix.usePrefix();
|
|
30
|
-
const classNames =
|
|
24
|
+
const classNames = cx(`${prefix}--badge-indicator`, customClassName, {
|
|
31
25
|
[`${prefix}--badge-indicator--count`]: count
|
|
32
26
|
});
|
|
33
27
|
const displayCount = count && count > 999 ? '999+' : count;
|
|
34
|
-
return /*#__PURE__*/
|
|
28
|
+
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
|
35
29
|
className: classNames,
|
|
36
30
|
ref: ref
|
|
37
31
|
}, rest), displayCount);
|
|
@@ -40,16 +34,16 @@ BadgeIndicator.propTypes = {
|
|
|
40
34
|
/**
|
|
41
35
|
* Specify an optional className to add.
|
|
42
36
|
*/
|
|
43
|
-
className:
|
|
37
|
+
className: PropTypes.string,
|
|
44
38
|
/**
|
|
45
39
|
* Count of badge indicator
|
|
46
40
|
*/
|
|
47
|
-
count:
|
|
41
|
+
count: PropTypes.number,
|
|
48
42
|
/**
|
|
49
43
|
* Provide an `id` to uniquely identify the BadgeIndidcator
|
|
50
44
|
*/
|
|
51
|
-
id:
|
|
45
|
+
id: PropTypes.string
|
|
52
46
|
};
|
|
53
47
|
|
|
54
48
|
exports.BadgeIndicator = BadgeIndicator;
|
|
55
|
-
exports
|
|
49
|
+
exports.default = BadgeIndicator;
|
|
@@ -15,18 +15,12 @@ var React = require('react');
|
|
|
15
15
|
var cx = require('classnames');
|
|
16
16
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
17
|
|
|
18
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
|
-
|
|
20
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
21
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
23
|
-
|
|
24
18
|
var _Item, _Item2, _Item3;
|
|
25
19
|
function Item() {
|
|
26
20
|
const prefix = usePrefix.usePrefix();
|
|
27
|
-
return /*#__PURE__*/
|
|
21
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
28
22
|
className: `${prefix}--breadcrumb-item`
|
|
29
|
-
}, /*#__PURE__*/
|
|
23
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
30
24
|
className: `${prefix}--link`
|
|
31
25
|
}, "\xA0"));
|
|
32
26
|
}
|
|
@@ -35,17 +29,17 @@ function BreadcrumbSkeleton({
|
|
|
35
29
|
...rest
|
|
36
30
|
}) {
|
|
37
31
|
const prefix = usePrefix.usePrefix();
|
|
38
|
-
const classes =
|
|
39
|
-
return /*#__PURE__*/
|
|
32
|
+
const classes = cx(`${prefix}--breadcrumb`, `${prefix}--skeleton`, className);
|
|
33
|
+
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
|
40
34
|
className: classes
|
|
41
|
-
}, rest), _Item || (_Item = /*#__PURE__*/
|
|
35
|
+
}, rest), _Item || (_Item = /*#__PURE__*/React.createElement(Item, null)), _Item2 || (_Item2 = /*#__PURE__*/React.createElement(Item, null)), _Item3 || (_Item3 = /*#__PURE__*/React.createElement(Item, null)));
|
|
42
36
|
}
|
|
43
37
|
BreadcrumbSkeleton.propTypes = {
|
|
44
38
|
/**
|
|
45
39
|
* Specify an optional className to add.
|
|
46
40
|
*/
|
|
47
|
-
className:
|
|
41
|
+
className: PropTypes.string
|
|
48
42
|
};
|
|
49
43
|
|
|
50
44
|
exports.BreadcrumbSkeleton = BreadcrumbSkeleton;
|
|
51
|
-
exports
|
|
45
|
+
exports.default = BreadcrumbSkeleton;
|
|
@@ -15,12 +15,6 @@ var React = require('react');
|
|
|
15
15
|
var cx = require('classnames');
|
|
16
16
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
17
|
|
|
18
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
|
-
|
|
20
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
21
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
23
|
-
|
|
24
18
|
const Breadcrumb = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
25
19
|
const {
|
|
26
20
|
'aria-label': ariaLabel,
|
|
@@ -31,16 +25,16 @@ const Breadcrumb = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
31
25
|
...rest
|
|
32
26
|
} = props;
|
|
33
27
|
const prefix = usePrefix.usePrefix();
|
|
34
|
-
const className =
|
|
28
|
+
const className = cx({
|
|
35
29
|
[`${prefix}--breadcrumb`]: true,
|
|
36
30
|
[`${prefix}--breadcrumb--no-trailing-slash`]: noTrailingSlash,
|
|
37
31
|
[`${prefix}--breadcrumb--sm`]: size === 'sm'
|
|
38
32
|
});
|
|
39
|
-
return /*#__PURE__*/
|
|
33
|
+
return /*#__PURE__*/React.createElement("nav", _rollupPluginBabelHelpers.extends({
|
|
40
34
|
className: customClassNameNav,
|
|
41
35
|
"aria-label": ariaLabel ? ariaLabel : 'Breadcrumb',
|
|
42
36
|
ref: ref
|
|
43
|
-
}, rest), /*#__PURE__*/
|
|
37
|
+
}, rest), /*#__PURE__*/React.createElement("ol", {
|
|
44
38
|
className: className
|
|
45
39
|
}, children));
|
|
46
40
|
});
|
|
@@ -49,23 +43,23 @@ Breadcrumb.propTypes = {
|
|
|
49
43
|
/**
|
|
50
44
|
* Specify the label for the breadcrumb container
|
|
51
45
|
*/
|
|
52
|
-
'aria-label':
|
|
46
|
+
'aria-label': PropTypes.string,
|
|
53
47
|
/**
|
|
54
48
|
* Pass in the BreadcrumbItem's for your Breadcrumb
|
|
55
49
|
*/
|
|
56
|
-
children:
|
|
50
|
+
children: PropTypes.node,
|
|
57
51
|
/**
|
|
58
52
|
* Specify an optional className to be applied to the container node
|
|
59
53
|
*/
|
|
60
|
-
className:
|
|
54
|
+
className: PropTypes.string,
|
|
61
55
|
/**
|
|
62
56
|
* Optional prop to omit the trailing slash for the breadcrumbs
|
|
63
57
|
*/
|
|
64
|
-
noTrailingSlash:
|
|
58
|
+
noTrailingSlash: PropTypes.bool,
|
|
65
59
|
/**
|
|
66
60
|
* Specify the size of the Breadcrumb. Currently supports the following:
|
|
67
61
|
*/
|
|
68
|
-
size:
|
|
62
|
+
size: PropTypes.oneOf(['sm', 'md'])
|
|
69
63
|
};
|
|
70
64
|
|
|
71
|
-
exports
|
|
65
|
+
exports.default = Breadcrumb;
|
|
@@ -19,12 +19,6 @@ var usePrefix = require('../../internal/usePrefix.js');
|
|
|
19
19
|
require('../Text/index.js');
|
|
20
20
|
var Text = require('../Text/Text.js');
|
|
21
21
|
|
|
22
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
23
|
-
|
|
24
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
25
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
26
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
27
|
-
|
|
28
22
|
const frFn = React.forwardRef;
|
|
29
23
|
const BreadcrumbItem = frFn((props, ref) => {
|
|
30
24
|
const {
|
|
@@ -36,7 +30,7 @@ const BreadcrumbItem = frFn((props, ref) => {
|
|
|
36
30
|
...rest
|
|
37
31
|
} = props;
|
|
38
32
|
const prefix = usePrefix.usePrefix();
|
|
39
|
-
const className =
|
|
33
|
+
const className = cx({
|
|
40
34
|
[`${prefix}--breadcrumb-item`]: true,
|
|
41
35
|
// We set the current class only if `isCurrentPage` is passed in and we do
|
|
42
36
|
// not have an `aria-current="page"` set for the breadcrumb item
|
|
@@ -45,12 +39,12 @@ const BreadcrumbItem = frFn((props, ref) => {
|
|
|
45
39
|
});
|
|
46
40
|
const child = children;
|
|
47
41
|
if (child.type && child.type.displayName !== undefined && child.type.displayName.includes('OverflowMenu')) {
|
|
48
|
-
const horizontalOverflowIcon = /*#__PURE__*/
|
|
42
|
+
const horizontalOverflowIcon = /*#__PURE__*/React.createElement(iconsReact.OverflowMenuHorizontal, {
|
|
49
43
|
className: `${prefix}--overflow-menu__icon`
|
|
50
44
|
});
|
|
51
|
-
return /*#__PURE__*/
|
|
45
|
+
return /*#__PURE__*/React.createElement("li", _rollupPluginBabelHelpers.extends({
|
|
52
46
|
className: className
|
|
53
|
-
}, rest), /*#__PURE__*/
|
|
47
|
+
}, rest), /*#__PURE__*/React.cloneElement(child, {
|
|
54
48
|
menuOptionsClass: `${prefix}--breadcrumb-menu-options`,
|
|
55
49
|
menuOffset: {
|
|
56
50
|
top: 10,
|
|
@@ -60,44 +54,44 @@ const BreadcrumbItem = frFn((props, ref) => {
|
|
|
60
54
|
}));
|
|
61
55
|
}
|
|
62
56
|
if (typeof children === 'string') {
|
|
63
|
-
return /*#__PURE__*/
|
|
57
|
+
return /*#__PURE__*/React.createElement("li", _rollupPluginBabelHelpers.extends({
|
|
64
58
|
className: className,
|
|
65
59
|
ref: ref
|
|
66
|
-
}, rest), href ? /*#__PURE__*/
|
|
60
|
+
}, rest), href ? /*#__PURE__*/React.createElement(Link.default, {
|
|
67
61
|
href: href,
|
|
68
62
|
"aria-current": ariaCurrent || isCurrentPage
|
|
69
|
-
}, children) : /*#__PURE__*/
|
|
63
|
+
}, children) : /*#__PURE__*/React.createElement(Text.Text, {
|
|
70
64
|
"aria-current": ariaCurrent || isCurrentPage,
|
|
71
65
|
className: `${prefix}--link`
|
|
72
66
|
}, children));
|
|
73
67
|
}
|
|
74
|
-
return /*#__PURE__*/
|
|
68
|
+
return /*#__PURE__*/React.createElement("li", _rollupPluginBabelHelpers.extends({
|
|
75
69
|
className: className,
|
|
76
70
|
ref: ref
|
|
77
|
-
}, rest), /*#__PURE__*/
|
|
71
|
+
}, rest), /*#__PURE__*/React.cloneElement(child, {
|
|
78
72
|
'aria-current': ariaCurrent,
|
|
79
|
-
className:
|
|
73
|
+
className: cx(`${prefix}--link`, child.props.className)
|
|
80
74
|
}));
|
|
81
75
|
});
|
|
82
76
|
BreadcrumbItem.displayName = 'BreadcrumbItem';
|
|
83
77
|
BreadcrumbItem.propTypes = {
|
|
84
|
-
'aria-current':
|
|
78
|
+
'aria-current': PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['false', 'true', 'page', 'step', 'location', 'date', 'time'])]),
|
|
85
79
|
/**
|
|
86
80
|
* Pass in content that will be inside of the BreadcrumbItem
|
|
87
81
|
*/
|
|
88
|
-
children:
|
|
82
|
+
children: PropTypes.node,
|
|
89
83
|
/**
|
|
90
84
|
* Specify an optional className to be applied to the container node
|
|
91
85
|
*/
|
|
92
|
-
className:
|
|
86
|
+
className: PropTypes.string,
|
|
93
87
|
/**
|
|
94
88
|
* Optional string representing the link location for the BreadcrumbItem
|
|
95
89
|
*/
|
|
96
|
-
href:
|
|
90
|
+
href: PropTypes.string,
|
|
97
91
|
/**
|
|
98
92
|
* Provide if this breadcrumb item represents the current page
|
|
99
93
|
*/
|
|
100
|
-
isCurrentPage:
|
|
94
|
+
isCurrentPage: PropTypes.bool
|
|
101
95
|
};
|
|
102
96
|
|
|
103
|
-
exports
|
|
97
|
+
exports.default = BreadcrumbItem;
|
|
@@ -15,12 +15,6 @@ var React = require('react');
|
|
|
15
15
|
var cx = require('classnames');
|
|
16
16
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
17
|
|
|
18
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
|
-
|
|
20
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
21
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
23
|
-
|
|
24
18
|
const ButtonSkeleton = ({
|
|
25
19
|
className,
|
|
26
20
|
small = false,
|
|
@@ -29,9 +23,10 @@ const ButtonSkeleton = ({
|
|
|
29
23
|
...rest
|
|
30
24
|
}) => {
|
|
31
25
|
const prefix = usePrefix.usePrefix();
|
|
32
|
-
const buttonClasses =
|
|
26
|
+
const buttonClasses = cx(className, {
|
|
33
27
|
[`${prefix}--skeleton`]: true,
|
|
34
28
|
[`${prefix}--btn`]: true,
|
|
29
|
+
[`${prefix}--btn--xs`]: size === 'xs',
|
|
35
30
|
[`${prefix}--btn--sm`]: small || size === 'sm',
|
|
36
31
|
[`${prefix}--btn--md`]: size === 'md',
|
|
37
32
|
[`${prefix}--btn--lg`]: size === 'lg',
|
|
@@ -42,8 +37,8 @@ const ButtonSkeleton = ({
|
|
|
42
37
|
className: buttonClasses,
|
|
43
38
|
...rest
|
|
44
39
|
};
|
|
45
|
-
const button = /*#__PURE__*/
|
|
46
|
-
const anchor = /*#__PURE__*/
|
|
40
|
+
const button = /*#__PURE__*/React.createElement("div", commonProps);
|
|
41
|
+
const anchor = /*#__PURE__*/React.createElement("a", _rollupPluginBabelHelpers.extends({}, commonProps, {
|
|
47
42
|
href: href,
|
|
48
43
|
role: "button"
|
|
49
44
|
})); // eslint-disable-line
|
|
@@ -54,25 +49,25 @@ ButtonSkeleton.propTypes = {
|
|
|
54
49
|
/**
|
|
55
50
|
* Specify an optional className to add.
|
|
56
51
|
*/
|
|
57
|
-
className:
|
|
52
|
+
className: PropTypes.string,
|
|
58
53
|
/**
|
|
59
54
|
* Optionally specify an href for your Button to become an `<a>` element
|
|
60
55
|
*/
|
|
61
|
-
href:
|
|
56
|
+
href: PropTypes.string,
|
|
62
57
|
/**
|
|
63
58
|
* Specify the size of the button, from a list of available sizes.
|
|
64
59
|
* For `default` buttons, this prop can remain unspecified or use `default`.
|
|
65
60
|
* In the next major release of Carbon, `default`, `field`, and `small` will be removed
|
|
66
61
|
*/
|
|
67
|
-
size:
|
|
62
|
+
size: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl', '2xl']),
|
|
68
63
|
/**
|
|
69
64
|
* @deprecated This property will be removed in the next major Carbon version,
|
|
70
65
|
* use size={sm} instead.
|
|
71
66
|
*
|
|
72
67
|
* Specify whether the Button should be a small variant
|
|
73
68
|
*/
|
|
74
|
-
small:
|
|
69
|
+
small: PropTypes.bool
|
|
75
70
|
};
|
|
76
71
|
|
|
77
72
|
exports.ButtonSkeleton = ButtonSkeleton;
|
|
78
|
-
exports
|
|
73
|
+
exports.default = ButtonSkeleton;
|
|
@@ -9,7 +9,7 @@ import { IconButtonKind } from '../IconButton';
|
|
|
9
9
|
import { PolymorphicComponentPropWithRef } from '../../internal/PolymorphicProps';
|
|
10
10
|
export declare const ButtonKinds: readonly ["primary", "secondary", "danger", "ghost", "danger--primary", "danger--ghost", "danger--tertiary", "tertiary"];
|
|
11
11
|
export type ButtonKind = (typeof ButtonKinds)[number];
|
|
12
|
-
export declare const ButtonSizes: readonly ["sm", "md", "lg", "xl", "2xl"];
|
|
12
|
+
export declare const ButtonSizes: readonly ["xs", "sm", "md", "lg", "xl", "2xl"];
|
|
13
13
|
export type ButtonSize = (typeof ButtonSizes)[number];
|
|
14
14
|
export declare const ButtonTooltipAlignments: readonly ["start", "center", "end"];
|
|
15
15
|
export type ButtonTooltipAlignment = (typeof ButtonTooltipAlignments)[number];
|
|
@@ -15,13 +15,8 @@ var React = require('react');
|
|
|
15
15
|
var index = require('../IconButton/index.js');
|
|
16
16
|
var ButtonBase = require('./ButtonBase.js');
|
|
17
17
|
|
|
18
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
|
-
|
|
20
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
21
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
|
-
|
|
23
18
|
const ButtonKinds = ['primary', 'secondary', 'danger', 'ghost', 'danger--primary', 'danger--ghost', 'danger--tertiary', 'tertiary'];
|
|
24
|
-
const ButtonSizes = ['sm', 'md', 'lg', 'xl', '2xl'];
|
|
19
|
+
const ButtonSizes = ['xs', 'sm', 'md', 'lg', 'xl', '2xl'];
|
|
25
20
|
const ButtonTooltipAlignments = ['start', 'center', 'end'];
|
|
26
21
|
const ButtonTooltipPositions = ['top', 'right', 'bottom', 'left'];
|
|
27
22
|
function isIconOnlyButton(hasIconOnly, _kind) {
|
|
@@ -30,7 +25,7 @@ function isIconOnlyButton(hasIconOnly, _kind) {
|
|
|
30
25
|
}
|
|
31
26
|
return false;
|
|
32
27
|
}
|
|
33
|
-
const Button = /*#__PURE__*/
|
|
28
|
+
const Button = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
34
29
|
const {
|
|
35
30
|
as,
|
|
36
31
|
autoAlign = false,
|
|
@@ -54,14 +49,14 @@ const Button = /*#__PURE__*/React__default["default"].forwardRef((props, ref) =>
|
|
|
54
49
|
if (ButtonImageElement && !children && !iconDescription) {
|
|
55
50
|
console.error('Button: renderIcon property specified without also providing an iconDescription property. ' + 'This may impact accessibility for screen reader users.');
|
|
56
51
|
}
|
|
57
|
-
const iconOnlyImage = !ButtonImageElement ? null : /*#__PURE__*/
|
|
52
|
+
const iconOnlyImage = !ButtonImageElement ? null : /*#__PURE__*/React.createElement(ButtonImageElement, null);
|
|
58
53
|
if (!isIconOnlyButton(hasIconOnly)) {
|
|
59
54
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
60
55
|
const {
|
|
61
56
|
tooltipAlignment,
|
|
62
57
|
...propsWithoutTooltipAlignment
|
|
63
58
|
} = props;
|
|
64
|
-
return /*#__PURE__*/
|
|
59
|
+
return /*#__PURE__*/React.createElement(ButtonBase.default, _rollupPluginBabelHelpers.extends({
|
|
65
60
|
ref: ref
|
|
66
61
|
}, propsWithoutTooltipAlignment));
|
|
67
62
|
} else {
|
|
@@ -90,7 +85,7 @@ const Button = /*#__PURE__*/React__default["default"].forwardRef((props, ref) =>
|
|
|
90
85
|
// supported?
|
|
91
86
|
// 2. Should an error be thrown?
|
|
92
87
|
// 3. Something else?
|
|
93
|
-
|
|
88
|
+
React.createElement(index.IconButton, _rollupPluginBabelHelpers.extends({}, rest, {
|
|
94
89
|
ref: ref,
|
|
95
90
|
as: as,
|
|
96
91
|
align: align,
|
|
@@ -116,35 +111,35 @@ Button.propTypes = {
|
|
|
116
111
|
* Specify how the button itself should be rendered.
|
|
117
112
|
* Make sure to apply all props to the root node and render children appropriately
|
|
118
113
|
*/
|
|
119
|
-
as:
|
|
114
|
+
as: PropTypes.oneOfType([PropTypes.func, PropTypes.string, PropTypes.elementType]),
|
|
120
115
|
/**
|
|
121
116
|
* **Experimental**: Will attempt to automatically align the tooltip
|
|
122
117
|
*/
|
|
123
|
-
autoAlign:
|
|
118
|
+
autoAlign: PropTypes.bool,
|
|
124
119
|
/**
|
|
125
120
|
* Specify the content of your Button
|
|
126
121
|
*/
|
|
127
|
-
children:
|
|
122
|
+
children: PropTypes.node,
|
|
128
123
|
/**
|
|
129
124
|
* Specify an optional className to be added to your Button
|
|
130
125
|
*/
|
|
131
|
-
className:
|
|
126
|
+
className: PropTypes.string,
|
|
132
127
|
/**
|
|
133
128
|
* Specify the message read by screen readers for the danger button variant
|
|
134
129
|
*/
|
|
135
|
-
dangerDescription:
|
|
130
|
+
dangerDescription: PropTypes.string,
|
|
136
131
|
/**
|
|
137
132
|
* Specify whether the Button should be disabled, or not
|
|
138
133
|
*/
|
|
139
|
-
disabled:
|
|
134
|
+
disabled: PropTypes.bool,
|
|
140
135
|
/**
|
|
141
136
|
* Specify if the button is an icon-only button
|
|
142
137
|
*/
|
|
143
|
-
hasIconOnly:
|
|
138
|
+
hasIconOnly: PropTypes.bool,
|
|
144
139
|
/**
|
|
145
140
|
* Optionally specify an href for your Button to become an `<a>` element
|
|
146
141
|
*/
|
|
147
|
-
href:
|
|
142
|
+
href: PropTypes.string,
|
|
148
143
|
/**
|
|
149
144
|
* If specifying the `renderIcon` prop, provide a description for that icon that can
|
|
150
145
|
* be read by screen readers
|
|
@@ -158,11 +153,11 @@ Button.propTypes = {
|
|
|
158
153
|
/**
|
|
159
154
|
* Specify whether the Button is expressive, or not
|
|
160
155
|
*/
|
|
161
|
-
isExpressive:
|
|
156
|
+
isExpressive: PropTypes.bool,
|
|
162
157
|
/**
|
|
163
158
|
* Specify whether the Button is currently selected. Only applies to the Ghost variant.
|
|
164
159
|
*/
|
|
165
|
-
isSelected:
|
|
160
|
+
isSelected: PropTypes.bool,
|
|
166
161
|
/**
|
|
167
162
|
* Specify the kind of Button you want to create
|
|
168
163
|
*/
|
|
@@ -183,78 +178,78 @@ Button.propTypes = {
|
|
|
183
178
|
* Provide an optional function to be called when the button element
|
|
184
179
|
* loses focus
|
|
185
180
|
*/
|
|
186
|
-
onBlur:
|
|
181
|
+
onBlur: PropTypes.func,
|
|
187
182
|
/**
|
|
188
183
|
* Provide an optional function to be called when the button element
|
|
189
184
|
* is clicked
|
|
190
185
|
*/
|
|
191
|
-
onClick:
|
|
186
|
+
onClick: PropTypes.func,
|
|
192
187
|
/**
|
|
193
188
|
* Provide an optional function to be called when the button element
|
|
194
189
|
* receives focus
|
|
195
190
|
*/
|
|
196
|
-
onFocus:
|
|
191
|
+
onFocus: PropTypes.func,
|
|
197
192
|
/**
|
|
198
193
|
* Provide an optional function to be called when the mouse
|
|
199
194
|
* enters the button element
|
|
200
195
|
*/
|
|
201
|
-
onMouseEnter:
|
|
196
|
+
onMouseEnter: PropTypes.func,
|
|
202
197
|
/**
|
|
203
198
|
* Provide an optional function to be called when the mouse
|
|
204
199
|
* leaves the button element
|
|
205
200
|
*/
|
|
206
|
-
onMouseLeave:
|
|
201
|
+
onMouseLeave: PropTypes.func,
|
|
207
202
|
/**
|
|
208
203
|
* Optionally specify a `rel` when using an `<a>` element.
|
|
209
204
|
*/
|
|
210
|
-
rel:
|
|
205
|
+
rel: PropTypes.string,
|
|
211
206
|
/**
|
|
212
207
|
* A component used to render an icon.
|
|
213
208
|
*/
|
|
214
|
-
renderIcon:
|
|
209
|
+
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
215
210
|
/**
|
|
216
211
|
* Optional prop to specify the role of the Button
|
|
217
212
|
*/
|
|
218
|
-
role:
|
|
213
|
+
role: PropTypes.string,
|
|
219
214
|
/**
|
|
220
215
|
* Specify the size of the button, from the following list of sizes:
|
|
221
216
|
*/
|
|
222
|
-
size:
|
|
217
|
+
size: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl', '2xl']),
|
|
223
218
|
/**
|
|
224
219
|
* Optional prop to specify the tabIndex of the Button
|
|
225
220
|
*/
|
|
226
|
-
tabIndex:
|
|
221
|
+
tabIndex: PropTypes.number,
|
|
227
222
|
/**
|
|
228
223
|
* Optionally specify a `target` when using an `<a>` element.
|
|
229
224
|
*/
|
|
230
|
-
target:
|
|
225
|
+
target: PropTypes.string,
|
|
231
226
|
/**
|
|
232
227
|
* Specify the alignment of the tooltip to the icon-only button.
|
|
233
228
|
* Can be one of: start, center, or end.
|
|
234
229
|
*/
|
|
235
|
-
tooltipAlignment:
|
|
230
|
+
tooltipAlignment: PropTypes.oneOf(['start', 'center', 'end']),
|
|
236
231
|
/**
|
|
237
232
|
* Enable drop shadow for tooltips for icon-only buttons.
|
|
238
233
|
*/
|
|
239
|
-
tooltipDropShadow:
|
|
234
|
+
tooltipDropShadow: PropTypes.bool,
|
|
240
235
|
/**
|
|
241
236
|
* Enable high-contrast theme for tooltips for icon-only buttons.
|
|
242
237
|
* Defaults to true.
|
|
243
238
|
*/
|
|
244
|
-
tooltipHighContrast:
|
|
239
|
+
tooltipHighContrast: PropTypes.bool,
|
|
245
240
|
/**
|
|
246
241
|
* Specify the direction of the tooltip for icon-only buttons.
|
|
247
242
|
* Can be either top, right, bottom, or left.
|
|
248
243
|
*/
|
|
249
|
-
tooltipPosition:
|
|
244
|
+
tooltipPosition: PropTypes.oneOf(['top', 'right', 'bottom', 'left']),
|
|
250
245
|
/**
|
|
251
246
|
* Optional prop to specify the type of the Button
|
|
252
247
|
*/
|
|
253
|
-
type:
|
|
248
|
+
type: PropTypes.oneOf(['button', 'reset', 'submit'])
|
|
254
249
|
};
|
|
255
250
|
|
|
256
251
|
exports.ButtonKinds = ButtonKinds;
|
|
257
252
|
exports.ButtonSizes = ButtonSizes;
|
|
258
253
|
exports.ButtonTooltipAlignments = ButtonTooltipAlignments;
|
|
259
254
|
exports.ButtonTooltipPositions = ButtonTooltipPositions;
|
|
260
|
-
exports
|
|
255
|
+
exports.default = Button;
|