@carbon/react 1.87.0-rc.0 → 1.87.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +739 -739
- package/es/_virtual/_rollupPluginBabelHelpers.js +4 -4
- package/es/components/Button/Button.js +1 -1
- 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/ComboBox/ComboBox.js +1 -1
- package/es/components/ComboBox/index.js +4 -1
- package/es/components/ComposedModal/ComposedModal.js +18 -8
- 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.js +2 -2
- package/es/components/Dropdown/index.js +4 -1
- package/es/components/FeatureFlags/index.js +2 -2
- package/es/components/FluidSelect/index.js +4 -1
- package/es/components/FluidTextInput/index.js +4 -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.js +3 -3
- 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.js +1 -1
- 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 +21 -4
- 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.js +2 -2
- 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/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 +8 -14
- package/lib/components/Button/Button.js +31 -36
- package/lib/components/Button/ButtonBase.js +6 -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 +39 -46
- package/lib/components/ComboBox/ComboBox.js +57 -64
- 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.js +18 -24
- 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 +8 -14
- 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.js +30 -36
- 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.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.js +57 -67
- 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.js +66 -74
- 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 +56 -47
- 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.js +32 -40
- 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.js +0 -2
- 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 +11 -11
- /package/es/node_modules/es-toolkit/dist/function/{debounce.mjs.js → debounce.js} +0 -0
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
-
|
|
12
10
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
13
11
|
var React = require('react');
|
|
14
12
|
var PropTypes = require('prop-types');
|
|
@@ -17,13 +15,7 @@ var iconsReact = require('@carbon/icons-react');
|
|
|
17
15
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
18
16
|
var index = require('../IconButton/index.js');
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
23
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
24
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
25
|
-
|
|
26
|
-
const ModalHeader = /*#__PURE__*/React__default["default"].forwardRef(function ModalHeader({
|
|
18
|
+
const ModalHeader = /*#__PURE__*/React.forwardRef(function ModalHeader({
|
|
27
19
|
buttonOnClick,
|
|
28
20
|
children,
|
|
29
21
|
className: customClassName,
|
|
@@ -42,28 +34,28 @@ const ModalHeader = /*#__PURE__*/React__default["default"].forwardRef(function M
|
|
|
42
34
|
closeModal?.(evt);
|
|
43
35
|
buttonOnClick?.(evt);
|
|
44
36
|
}
|
|
45
|
-
const headerClass =
|
|
46
|
-
const labelClass =
|
|
47
|
-
const titleClass =
|
|
48
|
-
const closeClass =
|
|
49
|
-
const closeIconClass =
|
|
50
|
-
return /*#__PURE__*/
|
|
37
|
+
const headerClass = cx(`${prefix}--modal-header`, customClassName);
|
|
38
|
+
const labelClass = cx(`${prefix}--modal-header__label ${prefix}--type-delta`, labelClassName);
|
|
39
|
+
const titleClass = cx(`${prefix}--modal-header__heading ${prefix}--type-beta`, titleClassName);
|
|
40
|
+
const closeClass = cx(`${prefix}--modal-close`, closeClassName);
|
|
41
|
+
const closeIconClass = cx(`${prefix}--modal-close__icon`, closeIconClassName);
|
|
42
|
+
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
|
51
43
|
className: headerClass
|
|
52
44
|
}, rest, {
|
|
53
45
|
ref: ref
|
|
54
|
-
}), label && /*#__PURE__*/
|
|
46
|
+
}), label && /*#__PURE__*/React.createElement("h2", {
|
|
55
47
|
className: labelClass
|
|
56
|
-
}, label), title && /*#__PURE__*/
|
|
48
|
+
}, label), title && /*#__PURE__*/React.createElement("h2", {
|
|
57
49
|
className: titleClass
|
|
58
|
-
}, title), children, /*#__PURE__*/
|
|
50
|
+
}, title), children, /*#__PURE__*/React.createElement("div", {
|
|
59
51
|
className: `${prefix}--modal-close-button`
|
|
60
|
-
}, /*#__PURE__*/
|
|
52
|
+
}, /*#__PURE__*/React.createElement(index.IconButton, {
|
|
61
53
|
className: closeClass,
|
|
62
54
|
label: iconDescription,
|
|
63
55
|
onClick: handleCloseButtonClick,
|
|
64
56
|
"aria-label": iconDescription,
|
|
65
57
|
align: "left"
|
|
66
|
-
}, /*#__PURE__*/
|
|
58
|
+
}, /*#__PURE__*/React.createElement(iconsReact.Close, {
|
|
67
59
|
size: 20,
|
|
68
60
|
"aria-hidden": "true",
|
|
69
61
|
tabIndex: "-1",
|
|
@@ -75,48 +67,48 @@ ModalHeader.propTypes = {
|
|
|
75
67
|
* Provide an optional function to be called when the close button is
|
|
76
68
|
* clicked
|
|
77
69
|
*/
|
|
78
|
-
buttonOnClick:
|
|
70
|
+
buttonOnClick: PropTypes.func,
|
|
79
71
|
/**
|
|
80
72
|
* Specify the content to be placed in the ModalHeader
|
|
81
73
|
*/
|
|
82
|
-
children:
|
|
74
|
+
children: PropTypes.node,
|
|
83
75
|
/**
|
|
84
76
|
* Specify an optional className to be applied to the modal header
|
|
85
77
|
*/
|
|
86
|
-
className:
|
|
78
|
+
className: PropTypes.string,
|
|
87
79
|
/**
|
|
88
80
|
* Specify an optional className to be applied to the modal close node
|
|
89
81
|
*/
|
|
90
|
-
closeClassName:
|
|
82
|
+
closeClassName: PropTypes.string,
|
|
91
83
|
/**
|
|
92
84
|
* Specify an optional className to be applied to the modal close icon node
|
|
93
85
|
*/
|
|
94
|
-
closeIconClassName:
|
|
86
|
+
closeIconClassName: PropTypes.string,
|
|
95
87
|
/**
|
|
96
88
|
* Provide an optional function to be called when the modal is closed
|
|
97
89
|
*/
|
|
98
|
-
closeModal:
|
|
90
|
+
closeModal: PropTypes.func,
|
|
99
91
|
/**
|
|
100
92
|
* Specify a description for the close icon that can be read by screen
|
|
101
93
|
* readers
|
|
102
94
|
*/
|
|
103
|
-
iconDescription:
|
|
95
|
+
iconDescription: PropTypes.string,
|
|
104
96
|
/**
|
|
105
97
|
* Specify an optional label to be displayed
|
|
106
98
|
*/
|
|
107
|
-
label:
|
|
99
|
+
label: PropTypes.node,
|
|
108
100
|
/**
|
|
109
101
|
* Specify an optional className to be applied to the modal header label
|
|
110
102
|
*/
|
|
111
|
-
labelClassName:
|
|
103
|
+
labelClassName: PropTypes.string,
|
|
112
104
|
/**
|
|
113
105
|
* Specify an optional title to be displayed
|
|
114
106
|
*/
|
|
115
|
-
title:
|
|
107
|
+
title: PropTypes.node,
|
|
116
108
|
/**
|
|
117
109
|
* Specify an optional className to be applied to the modal heading
|
|
118
110
|
*/
|
|
119
|
-
titleClassName:
|
|
111
|
+
titleClassName: PropTypes.string
|
|
120
112
|
};
|
|
121
113
|
|
|
122
114
|
exports.ModalHeader = ModalHeader;
|
|
@@ -20,12 +20,6 @@ var ContainedListItem = require('./ContainedListItem/ContainedListItem.js');
|
|
|
20
20
|
var Search = require('../Search/Search.js');
|
|
21
21
|
require('../Search/Search.Skeleton.js');
|
|
22
22
|
|
|
23
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
24
|
-
|
|
25
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
26
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
27
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
28
|
-
|
|
29
23
|
const variants = ['on-page', 'disclosed'];
|
|
30
24
|
function filterChildren(children) {
|
|
31
25
|
if (Array.isArray(children)) {
|
|
@@ -39,13 +33,13 @@ function filterChildren(children) {
|
|
|
39
33
|
function renderChildren(children) {
|
|
40
34
|
if (Array.isArray(children)) {
|
|
41
35
|
children.map((child, index) => {
|
|
42
|
-
if (index === 0 && child.type === Search
|
|
36
|
+
if (index === 0 && child.type === Search.default) {
|
|
43
37
|
return child;
|
|
44
38
|
}
|
|
45
39
|
return child;
|
|
46
40
|
});
|
|
47
41
|
}
|
|
48
|
-
if (children && children.type === Search
|
|
42
|
+
if (children && children.type === Search.default) {
|
|
49
43
|
return children;
|
|
50
44
|
}
|
|
51
45
|
return children;
|
|
@@ -62,7 +56,7 @@ const ContainedList = ({
|
|
|
62
56
|
}) => {
|
|
63
57
|
const labelId = `${useId.useId('contained-list')}-header`;
|
|
64
58
|
const prefix = usePrefix.usePrefix();
|
|
65
|
-
const classes =
|
|
59
|
+
const classes = cx(`${prefix}--contained-list`, {
|
|
66
60
|
[`${prefix}--contained-list--inset-rulers`]: isInset,
|
|
67
61
|
[`${prefix}--contained-list--${size}`]: size,
|
|
68
62
|
// TODO: V12 - Remove this class
|
|
@@ -70,7 +64,7 @@ const ContainedList = ({
|
|
|
70
64
|
}, `${prefix}--contained-list--${kind}`, className);
|
|
71
65
|
const filteredChildren = filterChildren(children);
|
|
72
66
|
function isSearchAction(action) {
|
|
73
|
-
if (! /*#__PURE__*/
|
|
67
|
+
if (! /*#__PURE__*/React.isValidElement(action)) {
|
|
74
68
|
return false;
|
|
75
69
|
}
|
|
76
70
|
const actionTypes = ['Search', 'ExpandableSearch'];
|
|
@@ -84,14 +78,14 @@ const ContainedList = ({
|
|
|
84
78
|
}
|
|
85
79
|
const isActionSearch = isSearchAction(action);
|
|
86
80
|
const renderedChildren = renderChildren(children);
|
|
87
|
-
return /*#__PURE__*/
|
|
81
|
+
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
|
88
82
|
className: classes
|
|
89
|
-
}, rest), label && /*#__PURE__*/
|
|
83
|
+
}, rest), label && /*#__PURE__*/React.createElement("div", {
|
|
90
84
|
className: `${prefix}--contained-list__header`
|
|
91
|
-
}, /*#__PURE__*/
|
|
85
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
92
86
|
id: labelId,
|
|
93
87
|
className: `${prefix}--contained-list__label`
|
|
94
|
-
}, label), /*#__PURE__*/
|
|
88
|
+
}, label), /*#__PURE__*/React.createElement(index.LayoutConstraint, {
|
|
95
89
|
size: {
|
|
96
90
|
min: 'sm',
|
|
97
91
|
max: 'xl'
|
|
@@ -107,7 +101,7 @@ const ContainedList = ({
|
|
|
107
101
|
* Ref https://bugs.webkit.org/show_bug.cgi?id=170179#c1
|
|
108
102
|
*/
|
|
109
103
|
// eslint-disable-next-line jsx-a11y/no-redundant-roles
|
|
110
|
-
|
|
104
|
+
React.createElement("ul", {
|
|
111
105
|
role: "list",
|
|
112
106
|
"aria-labelledby": label ? labelId : undefined
|
|
113
107
|
}, isActionSearch ? filteredChildren : renderedChildren));
|
|
@@ -116,32 +110,32 @@ ContainedList.propTypes = {
|
|
|
116
110
|
/**
|
|
117
111
|
* A slot for a possible interactive element to render.
|
|
118
112
|
*/
|
|
119
|
-
action:
|
|
113
|
+
action: PropTypes.node,
|
|
120
114
|
/**
|
|
121
115
|
* A collection of ContainedListItems to be rendered in the ContainedList
|
|
122
116
|
*/
|
|
123
|
-
children:
|
|
117
|
+
children: PropTypes.node,
|
|
124
118
|
/**
|
|
125
119
|
* Additional CSS class names.
|
|
126
120
|
*/
|
|
127
|
-
className:
|
|
121
|
+
className: PropTypes.string,
|
|
128
122
|
/**
|
|
129
123
|
* Specify whether the dividing lines in between list items should be inset.
|
|
130
124
|
*/
|
|
131
|
-
isInset:
|
|
125
|
+
isInset: PropTypes.bool,
|
|
132
126
|
/**
|
|
133
127
|
* The kind of ContainedList you want to display
|
|
134
128
|
*/
|
|
135
|
-
kind:
|
|
129
|
+
kind: PropTypes.oneOf(variants),
|
|
136
130
|
/**
|
|
137
131
|
* A label describing the contained list.
|
|
138
132
|
*/
|
|
139
|
-
label:
|
|
133
|
+
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
140
134
|
/**
|
|
141
135
|
* Specify the size of the contained list.
|
|
142
136
|
*/
|
|
143
|
-
size:
|
|
137
|
+
size: PropTypes.oneOf(['sm', 'md', 'lg', 'xl'])
|
|
144
138
|
};
|
|
145
|
-
ContainedList.ContainedListItem = ContainedListItem
|
|
139
|
+
ContainedList.ContainedListItem = ContainedListItem.default;
|
|
146
140
|
|
|
147
|
-
exports
|
|
141
|
+
exports.default = ContainedList;
|
|
@@ -16,12 +16,6 @@ var cx = require('classnames');
|
|
|
16
16
|
var index = require('../../Layout/index.js');
|
|
17
17
|
var usePrefix = require('../../../internal/usePrefix.js');
|
|
18
18
|
|
|
19
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
20
|
-
|
|
21
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
23
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
24
|
-
|
|
25
19
|
const ContainedListItem = ({
|
|
26
20
|
action,
|
|
27
21
|
children,
|
|
@@ -33,24 +27,24 @@ const ContainedListItem = ({
|
|
|
33
27
|
}) => {
|
|
34
28
|
const prefix = usePrefix.usePrefix();
|
|
35
29
|
const isClickable = onClick !== undefined;
|
|
36
|
-
const classes =
|
|
30
|
+
const classes = cx(`${prefix}--contained-list-item`, className, {
|
|
37
31
|
[`${prefix}--contained-list-item--clickable`]: isClickable,
|
|
38
32
|
[`${prefix}--contained-list-item--with-icon`]: IconElement,
|
|
39
33
|
[`${prefix}--contained-list-item--with-action`]: action
|
|
40
34
|
});
|
|
41
|
-
const content = /*#__PURE__*/
|
|
35
|
+
const content = /*#__PURE__*/React.createElement(React.Fragment, null, IconElement && /*#__PURE__*/React.createElement("div", {
|
|
42
36
|
className: `${prefix}--contained-list-item__icon`
|
|
43
|
-
}, /*#__PURE__*/
|
|
44
|
-
return /*#__PURE__*/
|
|
37
|
+
}, /*#__PURE__*/React.createElement(IconElement, null)), /*#__PURE__*/React.createElement("div", null, children));
|
|
38
|
+
return /*#__PURE__*/React.createElement("li", _rollupPluginBabelHelpers.extends({
|
|
45
39
|
className: classes
|
|
46
|
-
}, rest), isClickable ? /*#__PURE__*/
|
|
40
|
+
}, rest), isClickable ? /*#__PURE__*/React.createElement("button", {
|
|
47
41
|
className: `${prefix}--contained-list-item__content`,
|
|
48
42
|
type: "button",
|
|
49
43
|
disabled: disabled,
|
|
50
44
|
onClick: onClick
|
|
51
|
-
}, content) : /*#__PURE__*/
|
|
45
|
+
}, content) : /*#__PURE__*/React.createElement("div", {
|
|
52
46
|
className: `${prefix}--contained-list-item__content`
|
|
53
|
-
}, content), action && /*#__PURE__*/
|
|
47
|
+
}, content), action && /*#__PURE__*/React.createElement(index.LayoutConstraint, {
|
|
54
48
|
size: {
|
|
55
49
|
min: 'sm',
|
|
56
50
|
max: 'lg'
|
|
@@ -62,27 +56,27 @@ ContainedListItem.propTypes = {
|
|
|
62
56
|
/**
|
|
63
57
|
* A slot for a possible interactive element to render within the item.
|
|
64
58
|
*/
|
|
65
|
-
action:
|
|
59
|
+
action: PropTypes.node,
|
|
66
60
|
/**
|
|
67
61
|
* The content of this item. Must not contain any interactive elements. Use props.action to include those.
|
|
68
62
|
*/
|
|
69
|
-
children:
|
|
63
|
+
children: PropTypes.node,
|
|
70
64
|
/**
|
|
71
65
|
* Additional CSS class names.
|
|
72
66
|
*/
|
|
73
|
-
className:
|
|
67
|
+
className: PropTypes.string,
|
|
74
68
|
/**
|
|
75
69
|
* Whether this item is disabled.
|
|
76
70
|
*/
|
|
77
|
-
disabled:
|
|
71
|
+
disabled: PropTypes.bool,
|
|
78
72
|
/**
|
|
79
73
|
* Provide an optional function to be called when the item is clicked.
|
|
80
74
|
*/
|
|
81
|
-
onClick:
|
|
75
|
+
onClick: PropTypes.func,
|
|
82
76
|
/**
|
|
83
77
|
* A component used to render an icon.
|
|
84
78
|
*/
|
|
85
|
-
renderIcon:
|
|
79
|
+
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
86
80
|
};
|
|
87
81
|
|
|
88
|
-
exports
|
|
82
|
+
exports.default = ContainedListItem;
|
|
@@ -13,5 +13,5 @@ var ContainedListItem = require('./ContainedListItem.js');
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
exports.ContainedListItem = ContainedListItem
|
|
17
|
-
exports
|
|
16
|
+
exports.ContainedListItem = ContainedListItem.default;
|
|
17
|
+
exports.default = ContainedListItem.default;
|
|
@@ -13,11 +13,11 @@ var deprecateFieldOnObject = require('../../internal/deprecateFieldOnObject.js')
|
|
|
13
13
|
var ContainedList = require('./ContainedList.js');
|
|
14
14
|
var ContainedListItem = require('./ContainedListItem/ContainedListItem.js');
|
|
15
15
|
|
|
16
|
-
ContainedList
|
|
16
|
+
ContainedList.default.ContainedListItem = ContainedListItem.default;
|
|
17
17
|
if (process.env.NODE_ENV !== 'production') {
|
|
18
|
-
deprecateFieldOnObject.deprecateFieldOnObject(ContainedList
|
|
18
|
+
deprecateFieldOnObject.deprecateFieldOnObject(ContainedList.default, 'ContainedListItem', ContainedListItem.default);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
exports.ContainedList = ContainedList
|
|
22
|
-
exports
|
|
23
|
-
exports.ContainedListItem = ContainedListItem
|
|
21
|
+
exports.ContainedList = ContainedList.default;
|
|
22
|
+
exports.default = ContainedList.default;
|
|
23
|
+
exports.ContainedListItem = ContainedListItem.default;
|
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
-
|
|
12
10
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
13
11
|
var PropTypes = require('prop-types');
|
|
14
12
|
var React = require('react');
|
|
@@ -24,12 +22,6 @@ var noopFn = require('../../internal/noopFn.js');
|
|
|
24
22
|
require('../Switch/Switch.js');
|
|
25
23
|
var IconSwitch = require('../Switch/IconSwitch.js');
|
|
26
24
|
|
|
27
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
28
|
-
|
|
29
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
30
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
31
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
32
|
-
|
|
33
25
|
const ContentSwitcher = ({
|
|
34
26
|
children,
|
|
35
27
|
className,
|
|
@@ -92,9 +84,9 @@ const ContentSwitcher = ({
|
|
|
92
84
|
}
|
|
93
85
|
};
|
|
94
86
|
const isIconOnly = React.Children.map(children, child => {
|
|
95
|
-
return /*#__PURE__*/React.isValidElement(child) ? child.type === IconSwitch
|
|
87
|
+
return /*#__PURE__*/React.isValidElement(child) ? child.type === IconSwitch.default : null;
|
|
96
88
|
})?.every(val => val === true);
|
|
97
|
-
const classes =
|
|
89
|
+
const classes = cx(`${prefix}--content-switcher`, className, {
|
|
98
90
|
[`${prefix}--content-switcher--light`]: light,
|
|
99
91
|
[`${prefix}--content-switcher--${size}`]: size,
|
|
100
92
|
// TODO: V12 - Remove this class
|
|
@@ -102,7 +94,7 @@ const ContentSwitcher = ({
|
|
|
102
94
|
[`${prefix}--content-switcher--icon-only`]: isIconOnly,
|
|
103
95
|
[`${prefix}--content-switcher--low-contrast`]: lowContrast
|
|
104
96
|
});
|
|
105
|
-
return /*#__PURE__*/
|
|
97
|
+
return /*#__PURE__*/React.createElement(index.LayoutConstraint, _rollupPluginBabelHelpers.extends({
|
|
106
98
|
size: {
|
|
107
99
|
default: 'md',
|
|
108
100
|
min: 'sm',
|
|
@@ -126,36 +118,36 @@ ContentSwitcher.propTypes = {
|
|
|
126
118
|
/**
|
|
127
119
|
* Pass in Switch components to be rendered in the ContentSwitcher
|
|
128
120
|
*/
|
|
129
|
-
children:
|
|
121
|
+
children: PropTypes.node,
|
|
130
122
|
/**
|
|
131
123
|
* Specify an optional className to be added to the container node
|
|
132
124
|
*/
|
|
133
|
-
className:
|
|
125
|
+
className: PropTypes.string,
|
|
134
126
|
/**
|
|
135
127
|
* `true` to use the light variant.
|
|
136
128
|
*/
|
|
137
|
-
light: deprecate.deprecate(
|
|
129
|
+
light: deprecate.deprecate(PropTypes.bool, 'The `light` prop for `ContentSwitcher` is no longer needed and has ' + 'been deprecated. It will be removed in the next major release.'),
|
|
138
130
|
/**
|
|
139
131
|
* `true` to use the low contrast version.
|
|
140
132
|
*/
|
|
141
|
-
lowContrast:
|
|
133
|
+
lowContrast: PropTypes.bool,
|
|
142
134
|
/**
|
|
143
135
|
* Specify an `onChange` handler that is called whenever the ContentSwitcher
|
|
144
136
|
* changes which item is selected
|
|
145
137
|
*/
|
|
146
|
-
onChange:
|
|
138
|
+
onChange: PropTypes.func.isRequired,
|
|
147
139
|
/**
|
|
148
140
|
* Specify a selected index for the initially selected content
|
|
149
141
|
*/
|
|
150
|
-
selectedIndex:
|
|
142
|
+
selectedIndex: PropTypes.number,
|
|
151
143
|
/**
|
|
152
144
|
* Choose whether or not to automatically change selection on focus when left/right arrow pressed. Defaults to 'automatic'
|
|
153
145
|
*/
|
|
154
|
-
selectionMode:
|
|
146
|
+
selectionMode: PropTypes.oneOf(['automatic', 'manual']),
|
|
155
147
|
/**
|
|
156
148
|
* Specify the size of the Content Switcher. Currently supports either `sm`, `md` (default) or `lg` as an option.
|
|
157
149
|
*/
|
|
158
|
-
size:
|
|
150
|
+
size: PropTypes.oneOf(['sm', 'md', 'lg'])
|
|
159
151
|
};
|
|
160
152
|
|
|
161
153
|
exports.ContentSwitcher = ContentSwitcher;
|
|
@@ -19,13 +19,7 @@ var index = require('../IconButton/index.js');
|
|
|
19
19
|
var noopFn = require('../../internal/noopFn.js');
|
|
20
20
|
var deprecateValuesWithin = require('../../prop-types/deprecateValuesWithin.js');
|
|
21
21
|
var mapPopoverAlign = require('../../tools/mapPopoverAlign.js');
|
|
22
|
-
var debounce = require('../../node_modules/es-toolkit/dist/compat/function/debounce.
|
|
23
|
-
|
|
24
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
25
|
-
|
|
26
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
27
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
28
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
22
|
+
var debounce = require('../../node_modules/es-toolkit/dist/compat/function/debounce.js');
|
|
29
23
|
|
|
30
24
|
function Copy({
|
|
31
25
|
align = 'bottom',
|
|
@@ -40,7 +34,7 @@ function Copy({
|
|
|
40
34
|
}) {
|
|
41
35
|
const [animation, setAnimation] = React.useState('');
|
|
42
36
|
const prefix = usePrefix.usePrefix();
|
|
43
|
-
const classNames =
|
|
37
|
+
const classNames = cx(className, `${prefix}--copy`, {
|
|
44
38
|
[`${prefix}--copy-btn--animating`]: animation,
|
|
45
39
|
[`${prefix}--copy-btn--${animation}`]: animation
|
|
46
40
|
});
|
|
@@ -61,7 +55,7 @@ function Copy({
|
|
|
61
55
|
handleFadeOut.cancel();
|
|
62
56
|
}, [handleFadeOut]);
|
|
63
57
|
const initialLabel = other['aria-label'] ?? '';
|
|
64
|
-
return /*#__PURE__*/
|
|
58
|
+
return /*#__PURE__*/React.createElement(index.IconButton, _rollupPluginBabelHelpers.extends({
|
|
65
59
|
closeOnActivation: false,
|
|
66
60
|
align: align,
|
|
67
61
|
autoAlign: autoAlign,
|
|
@@ -77,7 +71,7 @@ Copy.propTypes = {
|
|
|
77
71
|
/**
|
|
78
72
|
* Specify how the trigger should align with the tooltip
|
|
79
73
|
*/
|
|
80
|
-
align: deprecateValuesWithin
|
|
74
|
+
align: deprecateValuesWithin.default(PropTypes.oneOf(['top', 'top-left',
|
|
81
75
|
// deprecated use top-start instead
|
|
82
76
|
'top-right',
|
|
83
77
|
// deprecated use top-end instead
|
|
@@ -102,34 +96,34 @@ Copy.propTypes = {
|
|
|
102
96
|
/**
|
|
103
97
|
* **Experimental**: Will attempt to automatically align the tooltip
|
|
104
98
|
*/
|
|
105
|
-
autoAlign:
|
|
99
|
+
autoAlign: PropTypes.bool,
|
|
106
100
|
/**
|
|
107
101
|
* Pass in content to be rendered in the underlying `<button>`
|
|
108
102
|
*/
|
|
109
|
-
children:
|
|
103
|
+
children: PropTypes.node,
|
|
110
104
|
/**
|
|
111
105
|
* Specify an optional className to be applied to the underlying `<button>`
|
|
112
106
|
*/
|
|
113
|
-
className:
|
|
107
|
+
className: PropTypes.string,
|
|
114
108
|
/**
|
|
115
109
|
* Specify the string that is displayed when the button is clicked and the
|
|
116
110
|
* content is copied
|
|
117
111
|
*/
|
|
118
|
-
feedback:
|
|
112
|
+
feedback: PropTypes.string,
|
|
119
113
|
/**
|
|
120
114
|
* Specify the time it takes for the feedback message to timeout
|
|
121
115
|
*/
|
|
122
|
-
feedbackTimeout:
|
|
116
|
+
feedbackTimeout: PropTypes.number,
|
|
123
117
|
/**
|
|
124
118
|
* Specify an optional `onAnimationEnd` handler that is called when the underlying
|
|
125
119
|
* animation ends
|
|
126
120
|
*/
|
|
127
|
-
onAnimationEnd:
|
|
121
|
+
onAnimationEnd: PropTypes.func,
|
|
128
122
|
/**
|
|
129
123
|
* Specify an optional `onClick` handler that is called when the underlying
|
|
130
124
|
* `<button>` is clicked
|
|
131
125
|
*/
|
|
132
|
-
onClick:
|
|
126
|
+
onClick: PropTypes.func
|
|
133
127
|
};
|
|
134
128
|
|
|
135
|
-
exports
|
|
129
|
+
exports.default = Copy;
|
|
@@ -21,12 +21,6 @@ var noopFn = require('../../internal/noopFn.js');
|
|
|
21
21
|
var deprecateValuesWithin = require('../../prop-types/deprecateValuesWithin.js');
|
|
22
22
|
var mapPopoverAlign = require('../../tools/mapPopoverAlign.js');
|
|
23
23
|
|
|
24
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
25
|
-
|
|
26
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
27
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
28
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
29
|
-
|
|
30
24
|
function CopyButton({
|
|
31
25
|
align = 'bottom',
|
|
32
26
|
autoAlign = false,
|
|
@@ -38,20 +32,20 @@ function CopyButton({
|
|
|
38
32
|
...other
|
|
39
33
|
}) {
|
|
40
34
|
const prefix = usePrefix.usePrefix();
|
|
41
|
-
return /*#__PURE__*/
|
|
35
|
+
return /*#__PURE__*/React.createElement(index.LayoutConstraint, {
|
|
42
36
|
size: {
|
|
43
37
|
default: 'md',
|
|
44
38
|
max: 'lg'
|
|
45
39
|
}
|
|
46
|
-
}, /*#__PURE__*/
|
|
40
|
+
}, /*#__PURE__*/React.createElement(Copy.default, _rollupPluginBabelHelpers.extends({
|
|
47
41
|
feedback: feedback,
|
|
48
42
|
feedbackTimeout: feedbackTimeout,
|
|
49
43
|
onClick: onClick,
|
|
50
44
|
align: align,
|
|
51
45
|
autoAlign: autoAlign,
|
|
52
|
-
className:
|
|
46
|
+
className: cx(className, `${prefix}--copy-btn`),
|
|
53
47
|
"aria-label": iconDescription
|
|
54
|
-
}, other), /*#__PURE__*/
|
|
48
|
+
}, other), /*#__PURE__*/React.createElement(iconsReact.Copy, {
|
|
55
49
|
className: `${prefix}--snippet__icon`
|
|
56
50
|
})));
|
|
57
51
|
}
|
|
@@ -59,7 +53,7 @@ CopyButton.propTypes = {
|
|
|
59
53
|
/**
|
|
60
54
|
* Specify how the trigger should align with the tooltip
|
|
61
55
|
*/
|
|
62
|
-
align: deprecateValuesWithin
|
|
56
|
+
align: deprecateValuesWithin.default(PropTypes.oneOf(['top', 'top-left',
|
|
63
57
|
// deprecated use top-start instead
|
|
64
58
|
'top-right',
|
|
65
59
|
// deprecated use top-end instead
|
|
@@ -84,30 +78,30 @@ CopyButton.propTypes = {
|
|
|
84
78
|
/**
|
|
85
79
|
* **Experimental**: Will attempt to automatically align the tooltip
|
|
86
80
|
*/
|
|
87
|
-
autoAlign:
|
|
81
|
+
autoAlign: PropTypes.bool,
|
|
88
82
|
/**
|
|
89
83
|
* Specify an optional className to be applied to the underlying `<button>`
|
|
90
84
|
*/
|
|
91
|
-
className:
|
|
85
|
+
className: PropTypes.string,
|
|
92
86
|
/**
|
|
93
87
|
* Specify the string that is displayed when the button is clicked and the
|
|
94
88
|
* content is copied
|
|
95
89
|
*/
|
|
96
|
-
feedback:
|
|
90
|
+
feedback: PropTypes.string,
|
|
97
91
|
/**
|
|
98
92
|
* Specify the time it takes for the feedback message to timeout
|
|
99
93
|
*/
|
|
100
|
-
feedbackTimeout:
|
|
94
|
+
feedbackTimeout: PropTypes.number,
|
|
101
95
|
/**
|
|
102
96
|
* Provide a description for the icon representing the copy action that can
|
|
103
97
|
* be read by screen readers
|
|
104
98
|
*/
|
|
105
|
-
iconDescription:
|
|
99
|
+
iconDescription: PropTypes.string,
|
|
106
100
|
/**
|
|
107
101
|
* Specify an optional `onClick` handler that is called when the underlying
|
|
108
102
|
* `<button>` is clicked
|
|
109
103
|
*/
|
|
110
|
-
onClick:
|
|
104
|
+
onClick: PropTypes.func
|
|
111
105
|
};
|
|
112
106
|
|
|
113
|
-
exports
|
|
107
|
+
exports.default = CopyButton;
|
|
@@ -14,12 +14,8 @@ var React = require('react');
|
|
|
14
14
|
var Button = require('../Button/Button.js');
|
|
15
15
|
require('../Button/Button.Skeleton.js');
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
20
|
-
|
|
21
|
-
const DangerButton = props => /*#__PURE__*/React__default["default"].createElement(Button["default"], _rollupPluginBabelHelpers["extends"]({}, props, {
|
|
17
|
+
const DangerButton = props => /*#__PURE__*/React.createElement(Button.default, _rollupPluginBabelHelpers.extends({}, props, {
|
|
22
18
|
kind: "danger"
|
|
23
19
|
}));
|
|
24
20
|
|
|
25
|
-
exports
|
|
21
|
+
exports.default = DangerButton;
|