@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
|
@@ -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,7 +23,7 @@ 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,
|
|
35
29
|
[`${prefix}--btn--xs`]: size === 'xs',
|
|
@@ -43,8 +37,8 @@ const ButtonSkeleton = ({
|
|
|
43
37
|
className: buttonClasses,
|
|
44
38
|
...rest
|
|
45
39
|
};
|
|
46
|
-
const button = /*#__PURE__*/
|
|
47
|
-
const anchor = /*#__PURE__*/
|
|
40
|
+
const button = /*#__PURE__*/React.createElement("div", commonProps);
|
|
41
|
+
const anchor = /*#__PURE__*/React.createElement("a", _rollupPluginBabelHelpers.extends({}, commonProps, {
|
|
48
42
|
href: href,
|
|
49
43
|
role: "button"
|
|
50
44
|
})); // eslint-disable-line
|
|
@@ -55,25 +49,25 @@ ButtonSkeleton.propTypes = {
|
|
|
55
49
|
/**
|
|
56
50
|
* Specify an optional className to add.
|
|
57
51
|
*/
|
|
58
|
-
className:
|
|
52
|
+
className: PropTypes.string,
|
|
59
53
|
/**
|
|
60
54
|
* Optionally specify an href for your Button to become an `<a>` element
|
|
61
55
|
*/
|
|
62
|
-
href:
|
|
56
|
+
href: PropTypes.string,
|
|
63
57
|
/**
|
|
64
58
|
* Specify the size of the button, from a list of available sizes.
|
|
65
59
|
* For `default` buttons, this prop can remain unspecified or use `default`.
|
|
66
60
|
* In the next major release of Carbon, `default`, `field`, and `small` will be removed
|
|
67
61
|
*/
|
|
68
|
-
size:
|
|
62
|
+
size: PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl', '2xl']),
|
|
69
63
|
/**
|
|
70
64
|
* @deprecated This property will be removed in the next major Carbon version,
|
|
71
65
|
* use size={sm} instead.
|
|
72
66
|
*
|
|
73
67
|
* Specify whether the Button should be a small variant
|
|
74
68
|
*/
|
|
75
|
-
small:
|
|
69
|
+
small: PropTypes.bool
|
|
76
70
|
};
|
|
77
71
|
|
|
78
72
|
exports.ButtonSkeleton = ButtonSkeleton;
|
|
79
|
-
exports
|
|
73
|
+
exports.default = ButtonSkeleton;
|
|
@@ -15,11 +15,6 @@ 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
19
|
const ButtonSizes = ['xs', 'sm', 'md', 'lg', 'xl', '2xl'];
|
|
25
20
|
const ButtonTooltipAlignments = ['start', 'center', 'end'];
|
|
@@ -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;
|
|
@@ -14,12 +14,7 @@ var cx = require('classnames');
|
|
|
14
14
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
15
15
|
var useId = require('../../internal/useId.js');
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
20
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
21
|
-
|
|
22
|
-
const ButtonBase = /*#__PURE__*/React__default["default"].forwardRef(function ButtonBase({
|
|
17
|
+
const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase({
|
|
23
18
|
as,
|
|
24
19
|
children,
|
|
25
20
|
className,
|
|
@@ -43,7 +38,7 @@ const ButtonBase = /*#__PURE__*/React__default["default"].forwardRef(function Bu
|
|
|
43
38
|
...rest
|
|
44
39
|
}, ref) {
|
|
45
40
|
const prefix = usePrefix.usePrefix();
|
|
46
|
-
const buttonClasses =
|
|
41
|
+
const buttonClasses = cx(className, {
|
|
47
42
|
[`${prefix}--btn`]: true,
|
|
48
43
|
[`${prefix}--btn--xs`]: size === 'xs' && !isExpressive,
|
|
49
44
|
// TODO: V12 - Remove this class
|
|
@@ -69,7 +64,7 @@ const ButtonBase = /*#__PURE__*/React__default["default"].forwardRef(function Bu
|
|
|
69
64
|
className: buttonClasses,
|
|
70
65
|
ref
|
|
71
66
|
};
|
|
72
|
-
const buttonImage = !ButtonImageElement ? null : /*#__PURE__*/
|
|
67
|
+
const buttonImage = !ButtonImageElement ? null : /*#__PURE__*/React.createElement(ButtonImageElement, {
|
|
73
68
|
"aria-label": iconDescription,
|
|
74
69
|
className: `${prefix}--btn__icon`,
|
|
75
70
|
"aria-hidden": "true"
|
|
@@ -92,7 +87,7 @@ const ButtonBase = /*#__PURE__*/React__default["default"].forwardRef(function Bu
|
|
|
92
87
|
};
|
|
93
88
|
let assistiveText = null;
|
|
94
89
|
if (dangerButtonVariants.includes(kind)) {
|
|
95
|
-
assistiveText = /*#__PURE__*/
|
|
90
|
+
assistiveText = /*#__PURE__*/React.createElement("span", {
|
|
96
91
|
id: assistiveId,
|
|
97
92
|
className: `${prefix}--visually-hidden`
|
|
98
93
|
}, dangerDescription);
|
|
@@ -107,7 +102,7 @@ const ButtonBase = /*#__PURE__*/React__default["default"].forwardRef(function Bu
|
|
|
107
102
|
component = 'a';
|
|
108
103
|
otherProps = anchorProps;
|
|
109
104
|
}
|
|
110
|
-
return /*#__PURE__*/
|
|
105
|
+
return /*#__PURE__*/React.createElement(component, {
|
|
111
106
|
onMouseEnter,
|
|
112
107
|
onMouseLeave,
|
|
113
108
|
onFocus,
|
|
@@ -119,4 +114,4 @@ const ButtonBase = /*#__PURE__*/React__default["default"].forwardRef(function Bu
|
|
|
119
114
|
}, assistiveText, children, buttonImage);
|
|
120
115
|
});
|
|
121
116
|
|
|
122
|
-
exports
|
|
117
|
+
exports.default = ButtonBase;
|
|
@@ -14,10 +14,10 @@ var Button_Skeleton = require('./Button.Skeleton.js');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
exports.Button = Button
|
|
17
|
+
exports.Button = Button.default;
|
|
18
18
|
exports.ButtonKinds = Button.ButtonKinds;
|
|
19
19
|
exports.ButtonSizes = Button.ButtonSizes;
|
|
20
20
|
exports.ButtonTooltipAlignments = Button.ButtonTooltipAlignments;
|
|
21
21
|
exports.ButtonTooltipPositions = Button.ButtonTooltipPositions;
|
|
22
|
-
exports
|
|
23
|
-
exports.ButtonSkeleton = Button_Skeleton
|
|
22
|
+
exports.default = Button.default;
|
|
23
|
+
exports.ButtonSkeleton = Button_Skeleton.default;
|
|
@@ -15,12 +15,6 @@ var PropTypes = require('prop-types');
|
|
|
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 React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
21
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
22
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
23
|
-
|
|
24
18
|
const ButtonSet = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
25
19
|
const {
|
|
26
20
|
children,
|
|
@@ -29,10 +23,10 @@ const ButtonSet = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
29
23
|
...rest
|
|
30
24
|
} = props;
|
|
31
25
|
const prefix = usePrefix.usePrefix();
|
|
32
|
-
const buttonSetClasses =
|
|
26
|
+
const buttonSetClasses = cx(className, `${prefix}--btn-set`, {
|
|
33
27
|
[`${prefix}--btn-set--stacked`]: stacked
|
|
34
28
|
});
|
|
35
|
-
return /*#__PURE__*/
|
|
29
|
+
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({}, rest, {
|
|
36
30
|
className: buttonSetClasses,
|
|
37
31
|
ref: ref
|
|
38
32
|
}), children);
|
|
@@ -42,16 +36,16 @@ ButtonSet.propTypes = {
|
|
|
42
36
|
/**
|
|
43
37
|
* Specify the content of your ButtonSet
|
|
44
38
|
*/
|
|
45
|
-
children:
|
|
39
|
+
children: PropTypes.node,
|
|
46
40
|
/**
|
|
47
41
|
* Specify an optional className to be added to your ButtonSet
|
|
48
42
|
*/
|
|
49
|
-
className:
|
|
43
|
+
className: PropTypes.string,
|
|
50
44
|
/**
|
|
51
45
|
* Specify the button arrangement of the set (vertically stacked or
|
|
52
46
|
* horizontal)
|
|
53
47
|
*/
|
|
54
|
-
stacked:
|
|
48
|
+
stacked: PropTypes.bool
|
|
55
49
|
};
|
|
56
50
|
|
|
57
|
-
exports
|
|
51
|
+
exports.default = ButtonSet;
|
|
@@ -15,22 +15,16 @@ 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 ChatButtonSkeleton = ({
|
|
25
19
|
className,
|
|
26
20
|
size,
|
|
27
21
|
...rest
|
|
28
22
|
}) => {
|
|
29
23
|
const prefix = usePrefix.usePrefix();
|
|
30
|
-
const skeletonClasses =
|
|
24
|
+
const skeletonClasses = cx(className, `${prefix}--skeleton`, `${prefix}--btn`, `${prefix}--chat-btn`, {
|
|
31
25
|
[`${prefix}--layout--size-${size}`]: size
|
|
32
26
|
});
|
|
33
|
-
return /*#__PURE__*/
|
|
27
|
+
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
|
34
28
|
className: skeletonClasses
|
|
35
29
|
}, rest));
|
|
36
30
|
};
|
|
@@ -38,11 +32,11 @@ ChatButtonSkeleton.propTypes = {
|
|
|
38
32
|
/**
|
|
39
33
|
* Specify an optional className to add.
|
|
40
34
|
*/
|
|
41
|
-
className:
|
|
35
|
+
className: PropTypes.string,
|
|
42
36
|
/**
|
|
43
37
|
* Specify the size of the `ChatButtonSkeleton`, from the following list of sizes:
|
|
44
38
|
*/
|
|
45
|
-
size:
|
|
39
|
+
size: PropTypes.oneOf(['sm', 'md', 'lg'])
|
|
46
40
|
};
|
|
47
41
|
|
|
48
|
-
exports
|
|
42
|
+
exports.default = ChatButtonSkeleton;
|
|
@@ -17,13 +17,7 @@ var Button = require('../Button/Button.js');
|
|
|
17
17
|
require('../Button/Button.Skeleton.js');
|
|
18
18
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
19
19
|
|
|
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 ChatButton = /*#__PURE__*/React__default["default"].forwardRef(function ChatButton({
|
|
20
|
+
const ChatButton = /*#__PURE__*/React.forwardRef(function ChatButton({
|
|
27
21
|
className,
|
|
28
22
|
children,
|
|
29
23
|
disabled,
|
|
@@ -35,7 +29,7 @@ const ChatButton = /*#__PURE__*/React__default["default"].forwardRef(function Ch
|
|
|
35
29
|
...other
|
|
36
30
|
}, ref) {
|
|
37
31
|
const prefix = usePrefix.usePrefix();
|
|
38
|
-
const classNames =
|
|
32
|
+
const classNames = cx(className, {
|
|
39
33
|
[`${prefix}--chat-btn`]: true,
|
|
40
34
|
[`${prefix}--chat-btn--with-icon`]: renderIcon,
|
|
41
35
|
[`${prefix}--chat-btn--quick-action`]: isQuickAction,
|
|
@@ -52,7 +46,7 @@ const ChatButton = /*#__PURE__*/React__default["default"].forwardRef(function Ch
|
|
|
52
46
|
size = 'lg';
|
|
53
47
|
}
|
|
54
48
|
}
|
|
55
|
-
return /*#__PURE__*/
|
|
49
|
+
return /*#__PURE__*/React.createElement(Button.default, _rollupPluginBabelHelpers.extends({
|
|
56
50
|
disabled: disabled,
|
|
57
51
|
className: classNames,
|
|
58
52
|
kind: kind,
|
|
@@ -65,35 +59,35 @@ ChatButton.propTypes = {
|
|
|
65
59
|
/**
|
|
66
60
|
* Provide the contents of your Select
|
|
67
61
|
*/
|
|
68
|
-
children:
|
|
62
|
+
children: PropTypes.node,
|
|
69
63
|
/**
|
|
70
64
|
* Specify an optional className to be applied to the node containing the label and the select box
|
|
71
65
|
*/
|
|
72
|
-
className:
|
|
66
|
+
className: PropTypes.string,
|
|
73
67
|
/**
|
|
74
68
|
* Specify whether the `ChatButton` should be disabled
|
|
75
69
|
*/
|
|
76
|
-
disabled:
|
|
70
|
+
disabled: PropTypes.bool,
|
|
77
71
|
/**
|
|
78
72
|
* Specify whether the `ChatButton` should be rendered as a quick action button
|
|
79
73
|
*/
|
|
80
|
-
isQuickAction:
|
|
74
|
+
isQuickAction: PropTypes.bool,
|
|
81
75
|
/**
|
|
82
76
|
* Specify whether the quick action `ChatButton` should be rendered as selected. This disables the input
|
|
83
77
|
*/
|
|
84
|
-
isSelected:
|
|
78
|
+
isSelected: PropTypes.bool,
|
|
85
79
|
/**
|
|
86
80
|
* Specify the kind of `ChatButton` you want to create
|
|
87
81
|
*/
|
|
88
|
-
kind:
|
|
82
|
+
kind: PropTypes.oneOf(['primary', 'secondary', 'danger', 'ghost', 'tertiary']),
|
|
89
83
|
/**
|
|
90
84
|
* A component used to render an icon.
|
|
91
85
|
*/
|
|
92
|
-
renderIcon:
|
|
86
|
+
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
93
87
|
/**
|
|
94
88
|
* Specify the size of the `ChatButton`, from the following list of sizes:
|
|
95
89
|
*/
|
|
96
|
-
size:
|
|
90
|
+
size: PropTypes.oneOf(['sm', 'md', 'lg'])
|
|
97
91
|
};
|
|
98
92
|
|
|
99
|
-
exports
|
|
93
|
+
exports.default = ChatButton;
|
|
@@ -15,22 +15,16 @@ 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 CheckboxSkeleton = ({
|
|
25
19
|
className,
|
|
26
20
|
...rest
|
|
27
21
|
}) => {
|
|
28
22
|
const prefix = usePrefix.usePrefix();
|
|
29
|
-
return /*#__PURE__*/
|
|
30
|
-
className:
|
|
31
|
-
}, rest), /*#__PURE__*/
|
|
23
|
+
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
|
24
|
+
className: cx(`${prefix}--form-item`, `${prefix}--checkbox-wrapper`, `${prefix}--checkbox-skeleton`, className)
|
|
25
|
+
}, rest), /*#__PURE__*/React.createElement("div", {
|
|
32
26
|
className: `${prefix}--checkbox-label`
|
|
33
|
-
}, /*#__PURE__*/
|
|
27
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
34
28
|
className: `${prefix}--checkbox-label-text ${prefix}--skeleton`
|
|
35
29
|
})));
|
|
36
30
|
};
|
|
@@ -38,8 +32,8 @@ CheckboxSkeleton.propTypes = {
|
|
|
38
32
|
/**
|
|
39
33
|
* Specify an optional className to add.
|
|
40
34
|
*/
|
|
41
|
-
className:
|
|
35
|
+
className: PropTypes.string
|
|
42
36
|
};
|
|
43
37
|
|
|
44
38
|
exports.CheckboxSkeleton = CheckboxSkeleton;
|
|
45
|
-
exports
|
|
39
|
+
exports.default = CheckboxSkeleton;
|