@carbon/react 1.86.0 → 1.87.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +871 -871
- package/es/_virtual/_rollupPluginBabelHelpers.js +4 -4
- package/es/components/Button/Button.Skeleton.js +2 -1
- package/es/components/Button/Button.d.ts +1 -1
- package/es/components/Button/Button.js +3 -3
- package/es/components/Button/ButtonBase.js +2 -0
- package/es/components/Button/index.js +5 -1
- package/es/components/ButtonSet/index.js +4 -1
- package/es/components/Checkbox/index.js +4 -1
- package/es/components/CodeSnippet/CodeSnippet.js +1 -0
- package/es/components/ComboBox/ComboBox.d.ts +7 -0
- package/es/components/ComboBox/ComboBox.js +11 -2
- package/es/components/ComboBox/index.js +4 -1
- package/es/components/ComposedModal/ComposedModal.js +18 -8
- package/es/components/ContainedList/ContainedList.d.ts +1 -1
- package/es/components/ContainedList/ContainedList.js +3 -3
- package/es/components/ContainedList/ContainedListItem/index.js +4 -1
- package/es/components/ContainedList/index.js +2 -2
- package/es/components/Copy/Copy.js +1 -1
- package/es/components/Copy/index.js +4 -1
- package/es/components/CopyButton/index.js +4 -1
- package/es/components/DataTable/Table.js +1 -1
- package/es/components/DataTable/state/getDerivedStateFromProps.d.ts +19 -0
- package/es/components/DataTable/state/getDerivedStateFromProps.js +1 -2
- package/es/components/DataTable/state/sorting.d.ts +15 -0
- package/es/components/DataTable/state/sorting.js +1 -2
- package/es/components/DataTable/tools/denormalize.d.ts +22 -0
- package/es/components/DataTable/tools/denormalize.js +1 -2
- package/es/components/DataTable/tools/normalize.d.ts +9 -0
- package/es/components/DataTable/tools/normalize.js +1 -2
- package/es/components/DatePicker/DatePicker.js +18 -11
- package/es/components/DatePicker/index.js +4 -1
- package/es/components/DatePicker/plugins/fixEventsPlugin.d.ts +2 -0
- package/es/components/DatePicker/plugins/rangePlugin.d.ts +2 -0
- package/es/components/DatePickerInput/DatePickerInput.js +6 -0
- package/es/components/DatePickerInput/index.js +4 -1
- package/es/components/Dialog/index.js +2 -2
- package/es/components/Dropdown/Dropdown.Skeleton.js +4 -4
- package/es/components/Dropdown/Dropdown.js +2 -2
- package/es/components/Dropdown/index.js +4 -1
- package/es/components/FeatureFlags/index.js +2 -2
- package/es/components/FluidNumberInput/FluidNumberInput.d.ts +3 -2
- package/es/components/FluidNumberInput/FluidNumberInput.js +3 -2
- package/es/components/FluidSelect/index.js +4 -1
- package/es/components/FluidTextInput/index.js +4 -1
- package/es/components/IconButton/index.d.ts +1 -1
- package/es/components/IconIndicator/index.js +1 -1
- package/es/components/InlineCheckbox/index.js +4 -1
- package/es/components/InlineLoading/index.js +4 -1
- package/es/components/LayoutDirection/LayoutDirection.js +1 -2
- package/es/components/Link/index.js +4 -1
- package/es/components/ListBox/ListBox.js +1 -1
- package/es/components/Loading/index.js +4 -1
- package/es/components/Menu/Menu.d.ts +3 -1
- package/es/components/Menu/Menu.js +3 -1
- package/es/components/Menu/MenuItem.js +1 -1
- package/es/components/Modal/Modal.js +16 -5
- package/es/components/Modal/index.js +4 -1
- package/es/components/MultiSelect/FilterableMultiSelect.d.ts +7 -0
- package/es/components/MultiSelect/FilterableMultiSelect.js +20 -10
- package/es/components/MultiSelect/MultiSelect.js +2 -2
- package/es/components/MultiSelect/filter.js +0 -4
- package/es/components/MultiSelect/tools/itemToString.d.ts +1 -0
- package/es/components/MultiSelect/tools/sorting.d.ts +9 -0
- package/es/components/Notification/Notification.js +2 -2
- package/es/components/NumberInput/NumberInput.d.ts +3 -2
- package/es/components/NumberInput/NumberInput.js +5 -4
- package/es/components/OverflowMenu/next/index.js +1 -1
- package/es/components/OverflowMenuItem/index.js +4 -1
- package/es/components/OverflowMenuV2/index.d.ts +1 -0
- package/es/components/PageHeader/PageHeader.js +1 -1
- package/es/components/Pagination/experimental/PageSelector.d.ts +19 -0
- package/es/components/Pagination/experimental/Pagination.d.ts +43 -0
- package/es/components/Pagination/experimental/index.d.ts +3 -0
- package/es/components/Popover/index.js +26 -8
- package/es/components/RadioButton/index.js +4 -1
- package/es/components/RadioTile/index.js +4 -1
- package/es/components/Search/Search.js +1 -1
- package/es/components/Search/index.js +4 -1
- package/es/components/Select/index.js +4 -1
- package/es/components/SelectItem/index.js +4 -1
- package/es/components/ShapeIndicator/index.js +1 -1
- package/es/components/SkeletonText/index.js +4 -1
- package/es/components/Slider/Slider.js +1 -1
- package/es/components/Switch/IconSwitch.d.ts +3 -0
- package/es/components/Switch/IconSwitch.js +1 -2
- package/es/components/TabContent/TabContent.js +2 -22
- package/es/components/Tabs/Tabs.js +5 -5
- package/es/components/Tag/DismissibleTag.js +1 -1
- package/es/components/TextArea/TextArea.js +1 -1
- package/es/components/TextArea/index.js +4 -1
- package/es/components/TextInput/index.js +4 -1
- package/es/components/TextInput/util.d.ts +9 -0
- package/es/components/Toggletip/index.d.ts +1 -1
- package/es/components/Toggletip/index.js +3 -3
- package/es/components/UIShell/HeaderMenu.js +2 -2
- package/es/components/UIShell/SideNav.js +1 -1
- package/es/components/UIShell/_utils.d.ts +7 -0
- package/es/feature-flags.d.ts +1 -0
- package/es/internal/FloatingMenu.js +1 -1
- package/es/internal/deprecateFieldOnObject.js +1 -1
- package/es/internal/useEvent.d.ts +2 -2
- package/es/internal/useEvent.js +4 -3
- package/es/internal/useId.d.ts +21 -0
- package/es/internal/useId.js +27 -1
- package/es/internal/useOverflowItems.js +0 -6
- package/es/node_modules/es-toolkit/dist/compat/function/{debounce.mjs.js → debounce.js} +1 -1
- package/es/node_modules/es-toolkit/dist/compat/function/{throttle.mjs.js → throttle.js} +1 -1
- package/es/prop-types/deprecateComponent.d.ts +1 -0
- package/es/prop-types/deprecateComponent.js +1 -4
- package/es/prop-types/deprecateValuesWithin.d.ts +1 -0
- package/es/prop-types/requiredIfGivenPropIsTruthy.d.ts +14 -0
- package/es/tools/mergeRefs.d.ts +12 -0
- package/es/tools/mergeRefs.js +1 -2
- package/icons/index.js +1 -3
- package/lib/_virtual/_rollupPluginBabelHelpers.js +5 -7
- package/lib/components/AILabel/index.js +35 -43
- package/lib/components/AISkeleton/AISkeletonIcon.js +5 -11
- package/lib/components/AISkeleton/AISkeletonPlaceholder.js +4 -10
- package/lib/components/AISkeleton/AISkeletonText.js +8 -14
- package/lib/components/Accordion/Accordion.Skeleton.js +21 -27
- package/lib/components/Accordion/Accordion.js +11 -17
- package/lib/components/Accordion/AccordionItem.js +19 -25
- package/lib/components/Accordion/AccordionProvider.js +1 -7
- package/lib/components/AspectRatio/AspectRatio.js +7 -13
- package/lib/components/BadgeIndicator/index.js +7 -13
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.js +7 -13
- package/lib/components/Breadcrumb/Breadcrumb.js +9 -15
- package/lib/components/Breadcrumb/BreadcrumbItem.js +16 -22
- package/lib/components/Button/Button.Skeleton.js +9 -14
- package/lib/components/Button/Button.d.ts +1 -1
- package/lib/components/Button/Button.js +32 -37
- package/lib/components/Button/ButtonBase.js +8 -11
- package/lib/components/Button/index.js +3 -3
- package/lib/components/ButtonSet/ButtonSet.js +6 -12
- package/lib/components/ButtonSet/index.js +2 -2
- package/lib/components/ChatButton/ChatButton.Skeleton.js +5 -11
- package/lib/components/ChatButton/ChatButton.js +12 -18
- package/lib/components/Checkbox/Checkbox.Skeleton.js +6 -12
- package/lib/components/Checkbox/Checkbox.js +33 -39
- package/lib/components/Checkbox/index.js +3 -3
- package/lib/components/CheckboxGroup/CheckboxGroup.js +24 -30
- package/lib/components/ClassPrefix/index.js +3 -10
- package/lib/components/CodeSnippet/CodeSnippet.Skeleton.js +10 -16
- package/lib/components/CodeSnippet/CodeSnippet.js +40 -46
- package/lib/components/ComboBox/ComboBox.d.ts +7 -0
- package/lib/components/ComboBox/ComboBox.js +65 -63
- package/lib/components/ComboBox/index.js +2 -2
- package/lib/components/ComboButton/index.js +20 -28
- package/lib/components/ComposedModal/ComposedModal.js +61 -57
- package/lib/components/ComposedModal/ModalFooter.js +37 -45
- package/lib/components/ComposedModal/ModalHeader.js +23 -31
- package/lib/components/ContainedList/ContainedList.d.ts +1 -1
- package/lib/components/ContainedList/ContainedList.js +19 -25
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +14 -20
- package/lib/components/ContainedList/ContainedListItem/index.js +2 -2
- package/lib/components/ContainedList/index.js +5 -5
- package/lib/components/ContentSwitcher/ContentSwitcher.js +11 -19
- package/lib/components/ContextMenu/useContextMenu.js +1 -1
- package/lib/components/Copy/Copy.js +12 -18
- package/lib/components/Copy/index.js +2 -2
- package/lib/components/CopyButton/CopyButton.js +12 -18
- package/lib/components/CopyButton/index.js +2 -2
- package/lib/components/DangerButton/DangerButton.js +2 -6
- package/lib/components/DataTable/DataTable.js +48 -55
- package/lib/components/DataTable/Table.js +18 -24
- package/lib/components/DataTable/TableActionList.js +2 -2
- package/lib/components/DataTable/TableBatchAction.js +4 -9
- package/lib/components/DataTable/TableBatchActions.js +19 -25
- package/lib/components/DataTable/TableBody.js +5 -10
- package/lib/components/DataTable/TableCell.js +8 -14
- package/lib/components/DataTable/TableContainer.js +14 -20
- package/lib/components/DataTable/TableContext.js +0 -2
- package/lib/components/DataTable/TableDecoratorRow.js +5 -11
- package/lib/components/DataTable/TableExpandHeader.js +16 -22
- package/lib/components/DataTable/TableExpandRow.js +20 -26
- package/lib/components/DataTable/TableExpandedRow.js +8 -14
- package/lib/components/DataTable/TableHead.js +2 -2
- package/lib/components/DataTable/TableHeader.js +26 -32
- package/lib/components/DataTable/TableRow.js +8 -14
- package/lib/components/DataTable/TableSelectAll.js +13 -19
- package/lib/components/DataTable/TableSelectRow.js +15 -21
- package/lib/components/DataTable/TableSlugRow.js +7 -13
- package/lib/components/DataTable/TableToolbar.js +7 -13
- package/lib/components/DataTable/TableToolbarAction.js +5 -10
- package/lib/components/DataTable/TableToolbarContent.js +2 -2
- package/lib/components/DataTable/TableToolbarMenu.js +9 -15
- package/lib/components/DataTable/TableToolbarSearch.js +22 -28
- package/lib/components/DataTable/state/getDerivedStateFromProps.d.ts +19 -0
- package/lib/components/DataTable/state/getDerivedStateFromProps.js +2 -3
- package/lib/components/DataTable/state/sortStates.js +0 -2
- package/lib/components/DataTable/state/sorting.d.ts +15 -0
- package/lib/components/DataTable/state/sorting.js +0 -2
- package/lib/components/DataTable/tools/cells.js +0 -2
- package/lib/components/DataTable/tools/denormalize.d.ts +22 -0
- package/lib/components/DataTable/tools/denormalize.js +1 -2
- package/lib/components/DataTable/tools/filter.js +0 -2
- package/lib/components/DataTable/tools/normalize.d.ts +9 -0
- package/lib/components/DataTable/tools/normalize.js +1 -2
- package/lib/components/DataTable/tools/sorting.js +0 -2
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +25 -31
- package/lib/components/DatePicker/DatePicker.Skeleton.js +14 -20
- package/lib/components/DatePicker/DatePicker.js +65 -66
- package/lib/components/DatePicker/index.js +3 -3
- package/lib/components/DatePicker/plugins/appendToPlugin.js +0 -2
- package/lib/components/DatePicker/plugins/fixEventsPlugin.d.ts +2 -0
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +1 -1
- package/lib/components/DatePicker/plugins/rangePlugin.d.ts +2 -0
- package/lib/components/DatePicker/plugins/rangePlugin.js +2 -6
- package/lib/components/DatePickerInput/DatePickerInput.js +49 -49
- package/lib/components/DatePickerInput/index.js +2 -2
- package/lib/components/Dialog/index.js +72 -80
- package/lib/components/Dropdown/Dropdown.Skeleton.js +10 -16
- package/lib/components/Dropdown/Dropdown.js +49 -55
- package/lib/components/Dropdown/index.js +3 -3
- package/lib/components/ErrorBoundary/ErrorBoundary.js +4 -9
- package/lib/components/ErrorBoundary/ErrorBoundaryContext.js +0 -2
- package/lib/components/ExpandableSearch/ExpandableSearch.js +6 -11
- package/lib/components/FeatureFlags/index.js +10 -17
- package/lib/components/FileUploader/FileUploader.Skeleton.js +7 -13
- package/lib/components/FileUploader/FileUploader.js +30 -36
- package/lib/components/FileUploader/FileUploaderButton.js +19 -25
- package/lib/components/FileUploader/FileUploaderDropContainer.js +18 -24
- package/lib/components/FileUploader/FileUploaderItem.js +23 -29
- package/lib/components/FileUploader/Filename.js +13 -18
- package/lib/components/FluidComboBox/FluidComboBox.Skeleton.js +7 -13
- package/lib/components/FluidComboBox/FluidComboBox.js +24 -30
- package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.js +14 -20
- package/lib/components/FluidDatePicker/FluidDatePicker.js +12 -18
- package/lib/components/FluidDatePickerInput/FluidDatePickerInput.js +4 -8
- package/lib/components/FluidDropdown/FluidDropdown.Skeleton.js +7 -13
- package/lib/components/FluidDropdown/FluidDropdown.js +24 -30
- package/lib/components/FluidForm/FluidForm.js +6 -12
- package/lib/components/FluidForm/FormContext.js +0 -2
- package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +7 -13
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +36 -42
- package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.js +7 -13
- package/lib/components/FluidNumberInput/FluidNumberInput.d.ts +3 -2
- package/lib/components/FluidNumberInput/FluidNumberInput.js +33 -38
- package/lib/components/FluidSearch/FluidSearch.Skeleton.js +7 -13
- package/lib/components/FluidSearch/FluidSearch.js +19 -25
- package/lib/components/FluidSelect/FluidSelect.Skeleton.js +7 -13
- package/lib/components/FluidSelect/FluidSelect.js +17 -23
- package/lib/components/FluidSelect/index.js +3 -3
- package/lib/components/FluidTextArea/FluidTextArea.Skeleton.js +7 -13
- package/lib/components/FluidTextArea/FluidTextArea.js +25 -31
- package/lib/components/FluidTextInput/FluidPasswordInput.js +18 -22
- package/lib/components/FluidTextInput/FluidTextInput.Skeleton.js +7 -13
- package/lib/components/FluidTextInput/FluidTextInput.js +23 -29
- package/lib/components/FluidTextInput/index.js +3 -3
- package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +6 -12
- package/lib/components/FluidTimePicker/FluidTimePicker.js +23 -29
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +10 -15
- package/lib/components/Form/Form.js +5 -11
- package/lib/components/FormGroup/FormGroup.js +13 -19
- package/lib/components/FormItem/FormItem.js +5 -11
- package/lib/components/FormLabel/FormLabel.js +6 -12
- package/lib/components/Grid/CSSGrid.js +20 -28
- package/lib/components/Grid/Column.js +31 -37
- package/lib/components/Grid/ColumnHang.js +5 -13
- package/lib/components/Grid/FlexGrid.js +10 -18
- package/lib/components/Grid/Grid.js +9 -16
- package/lib/components/Grid/GridContext.js +7 -14
- package/lib/components/Grid/Row.js +8 -14
- package/lib/components/Heading/index.js +14 -21
- package/lib/components/Icon/Icon.Skeleton.js +4 -10
- package/lib/components/IconButton/index.d.ts +1 -1
- package/lib/components/IconButton/index.js +25 -33
- package/lib/components/IconIndicator/index.js +9 -15
- package/lib/components/IdPrefix/index.js +3 -10
- package/lib/components/InlineCheckbox/InlineCheckbox.js +17 -22
- package/lib/components/InlineCheckbox/index.js +2 -2
- package/lib/components/InlineLoading/InlineLoading.js +17 -23
- package/lib/components/InlineLoading/index.js +2 -2
- package/lib/components/Layer/LayerContext.js +1 -7
- package/lib/components/Layer/LayerLevel.js +0 -2
- package/lib/components/Layer/index.js +11 -19
- package/lib/components/Layout/index.js +22 -30
- package/lib/components/LayoutDirection/LayoutDirection.js +6 -13
- package/lib/components/LayoutDirection/LayoutDirectionContext.js +1 -7
- package/lib/components/LayoutDirection/useLayoutDirection.js +0 -2
- package/lib/components/Link/Link.js +15 -21
- package/lib/components/Link/index.js +2 -2
- package/lib/components/ListBox/ListBox.js +17 -23
- package/lib/components/ListBox/ListBoxField.js +7 -12
- package/lib/components/ListBox/ListBoxMenu.js +7 -12
- package/lib/components/ListBox/ListBoxMenuIcon.js +7 -13
- package/lib/components/ListBox/ListBoxMenuItem.js +9 -15
- package/lib/components/ListBox/ListBoxPropTypes.js +2 -8
- package/lib/components/ListBox/ListBoxSelection.js +14 -20
- package/lib/components/ListBox/index.js +7 -7
- package/lib/components/ListBox/next/ListBoxSelection.js +18 -24
- package/lib/components/ListBox/next/ListBoxTrigger.js +7 -13
- package/lib/components/ListItem/ListItem.js +5 -11
- package/lib/components/Loading/Loading.js +14 -20
- package/lib/components/Loading/index.js +2 -2
- package/lib/components/Menu/Menu.d.ts +3 -1
- package/lib/components/Menu/Menu.js +18 -24
- package/lib/components/Menu/MenuContext.js +0 -2
- package/lib/components/Menu/MenuItem.js +44 -52
- package/lib/components/MenuButton/index.js +16 -24
- package/lib/components/Modal/Modal.js +91 -86
- package/lib/components/Modal/index.js +2 -2
- package/lib/components/ModalWrapper/ModalWrapper.js +30 -35
- package/lib/components/MultiSelect/FilterableMultiSelect.d.ts +7 -0
- package/lib/components/MultiSelect/FilterableMultiSelect.js +71 -71
- package/lib/components/MultiSelect/MultiSelect.js +61 -70
- package/lib/components/MultiSelect/MultiSelectPropTypes.js +2 -8
- package/lib/components/MultiSelect/filter.js +0 -6
- package/lib/components/MultiSelect/tools/itemToString.d.ts +1 -0
- package/lib/components/MultiSelect/tools/itemToString.js +1 -7
- package/lib/components/MultiSelect/tools/sorting.d.ts +9 -0
- package/lib/components/MultiSelect/tools/sorting.js +0 -2
- package/lib/components/Notification/Notification.js +118 -126
- package/lib/components/NumberInput/NumberFormatPropTypes.js +21 -27
- package/lib/components/NumberInput/NumberInput.Skeleton.js +8 -14
- package/lib/components/NumberInput/NumberInput.d.ts +3 -2
- package/lib/components/NumberInput/NumberInput.js +70 -77
- package/lib/components/OrderedList/OrderedList.js +8 -14
- package/lib/components/OverflowMenu/OverflowMenu.js +42 -49
- package/lib/components/OverflowMenu/index.js +3 -7
- package/lib/components/OverflowMenu/next/index.js +18 -26
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +27 -33
- package/lib/components/OverflowMenuItem/index.js +2 -2
- package/lib/components/OverflowMenuV2/index.d.ts +1 -0
- package/lib/components/OverflowMenuV2/index.js +2 -8
- package/lib/components/PageHeader/PageHeader.js +70 -78
- package/lib/components/PageHeader/index.js +0 -2
- package/lib/components/Pagination/Pagination.Skeleton.js +10 -16
- package/lib/components/Pagination/Pagination.js +44 -51
- package/lib/components/Pagination/experimental/PageSelector.d.ts +19 -0
- package/lib/components/Pagination/experimental/PageSelector.js +9 -15
- package/lib/components/Pagination/experimental/Pagination.d.ts +43 -0
- package/lib/components/Pagination/experimental/Pagination.js +34 -40
- package/lib/components/Pagination/experimental/index.d.ts +3 -0
- package/lib/components/PaginationNav/PaginationNav.js +54 -60
- package/lib/components/Popover/index.js +60 -50
- package/lib/components/PrimaryButton/PrimaryButton.js +2 -6
- package/lib/components/ProgressBar/ProgressBar.js +25 -31
- package/lib/components/ProgressIndicator/ProgressIndicator.Skeleton.js +10 -16
- package/lib/components/ProgressIndicator/ProgressIndicator.js +41 -49
- package/lib/components/RadioButton/RadioButton.Skeleton.js +6 -12
- package/lib/components/RadioButton/RadioButton.js +26 -32
- package/lib/components/RadioButton/index.js +2 -2
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +37 -43
- package/lib/components/RadioTile/RadioTile.js +25 -31
- package/lib/components/RadioTile/index.js +2 -2
- package/lib/components/Search/Search.Skeleton.js +7 -13
- package/lib/components/Search/Search.js +33 -39
- package/lib/components/Search/index.js +3 -3
- package/lib/components/SecondaryButton/SecondaryButton.js +2 -6
- package/lib/components/Select/Select.Skeleton.js +8 -14
- package/lib/components/Select/Select.js +42 -48
- package/lib/components/Select/index.js +3 -3
- package/lib/components/SelectItem/SelectItem.js +8 -14
- package/lib/components/SelectItem/index.js +2 -2
- package/lib/components/SelectItemGroup/SelectItemGroup.js +7 -13
- package/lib/components/ShapeIndicator/index.js +12 -18
- package/lib/components/SkeletonIcon/SkeletonIcon.js +4 -10
- package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +4 -10
- package/lib/components/SkeletonText/SkeletonText.js +11 -17
- package/lib/components/SkeletonText/index.js +2 -2
- package/lib/components/Slider/Slider.Skeleton.js +29 -35
- package/lib/components/Slider/Slider.js +84 -90
- package/lib/components/Slider/SliderHandles.js +18 -24
- package/lib/components/Slider/index.js +3 -3
- package/lib/components/Stack/HStack.js +1 -7
- package/lib/components/Stack/Stack.js +7 -15
- package/lib/components/Stack/VStack.js +1 -7
- package/lib/components/StructuredList/StructuredList.Skeleton.js +15 -21
- package/lib/components/StructuredList/StructuredList.js +60 -68
- package/lib/components/Switch/IconSwitch.d.ts +3 -0
- package/lib/components/Switch/IconSwitch.js +18 -25
- package/lib/components/Switch/Switch.js +14 -20
- package/lib/components/TabContent/TabContent.js +7 -33
- package/lib/components/Tabs/Tabs.Skeleton.js +10 -16
- package/lib/components/Tabs/Tabs.js +121 -129
- package/lib/components/Tabs/usePressable.js +0 -2
- package/lib/components/Tag/DismissibleTag.js +24 -30
- package/lib/components/Tag/OperationalTag.js +16 -22
- package/lib/components/Tag/SelectableTag.js +19 -25
- package/lib/components/Tag/Tag.Skeleton.js +5 -11
- package/lib/components/Tag/Tag.js +28 -34
- package/lib/components/Tag/isEllipsisActive.js +0 -2
- package/lib/components/Text/Text.js +6 -13
- package/lib/components/Text/TextDirection.js +4 -11
- package/lib/components/Text/TextDirectionContext.js +0 -2
- package/lib/components/Text/createTextComponent.js +1 -7
- package/lib/components/Text/index.js +0 -2
- package/lib/components/TextArea/TextArea.Skeleton.js +7 -13
- package/lib/components/TextArea/TextArea.js +49 -55
- package/lib/components/TextArea/index.js +3 -3
- package/lib/components/TextInput/ControlledPasswordInput.js +36 -42
- package/lib/components/TextInput/PasswordInput.js +48 -54
- package/lib/components/TextInput/TextInput.Skeleton.js +7 -13
- package/lib/components/TextInput/TextInput.js +47 -53
- package/lib/components/TextInput/index.js +3 -3
- package/lib/components/TextInput/util.d.ts +9 -0
- package/lib/components/TextInput/util.js +0 -2
- package/lib/components/Theme/index.js +16 -24
- package/lib/components/Tile/Tile.js +92 -100
- package/lib/components/TileGroup/TileGroup.js +15 -22
- package/lib/components/TimePicker/TimePicker.js +39 -45
- package/lib/components/TimePickerSelect/TimePickerSelect.js +10 -16
- package/lib/components/Toggle/Toggle.Skeleton.js +7 -13
- package/lib/components/Toggle/Toggle.js +28 -34
- package/lib/components/ToggleSmall/ToggleSmall.Skeleton.js +12 -20
- package/lib/components/Toggletip/index.d.ts +1 -1
- package/lib/components/Toggletip/index.js +33 -41
- package/lib/components/Tooltip/DefinitionTooltip.js +14 -22
- package/lib/components/Tooltip/Tooltip.js +19 -27
- package/lib/components/TreeView/TreeContext.js +0 -2
- package/lib/components/TreeView/TreeNode.js +41 -47
- package/lib/components/TreeView/TreeView.js +17 -23
- package/lib/components/UIShell/Content.js +6 -12
- package/lib/components/UIShell/Header.js +4 -10
- package/lib/components/UIShell/HeaderContainer.js +4 -9
- package/lib/components/UIShell/HeaderGlobalAction.js +11 -17
- package/lib/components/UIShell/HeaderGlobalBar.js +2 -2
- package/lib/components/UIShell/HeaderMenu.js +17 -23
- package/lib/components/UIShell/HeaderMenuButton.js +9 -15
- package/lib/components/UIShell/HeaderMenuItem.js +11 -17
- package/lib/components/UIShell/HeaderName.js +8 -14
- package/lib/components/UIShell/HeaderNavigation.js +6 -12
- package/lib/components/UIShell/HeaderPanel.js +11 -17
- package/lib/components/UIShell/HeaderSideNavItems.js +6 -12
- package/lib/components/UIShell/Link.js +6 -11
- package/lib/components/UIShell/SideNav.js +23 -29
- package/lib/components/UIShell/SideNavDetails.js +7 -13
- package/lib/components/UIShell/SideNavDivider.js +5 -11
- package/lib/components/UIShell/SideNavFooter.js +12 -18
- package/lib/components/UIShell/SideNavHeader.js +8 -14
- package/lib/components/UIShell/SideNavIcon.js +6 -12
- package/lib/components/UIShell/SideNavItem.js +6 -12
- package/lib/components/UIShell/SideNavItems.js +9 -15
- package/lib/components/UIShell/SideNavLink.js +13 -19
- package/lib/components/UIShell/SideNavLinkText.js +5 -11
- package/lib/components/UIShell/SideNavMenu.js +20 -26
- package/lib/components/UIShell/SideNavMenuItem.js +13 -19
- package/lib/components/UIShell/SideNavSwitcher.js +13 -19
- package/lib/components/UIShell/SkipToContent.js +7 -13
- package/lib/components/UIShell/Switcher.js +9 -15
- package/lib/components/UIShell/SwitcherDivider.js +4 -10
- package/lib/components/UIShell/SwitcherItem.js +15 -21
- package/lib/components/UIShell/_utils.d.ts +7 -0
- package/lib/components/UIShell/_utils.js +0 -2
- package/lib/components/UnorderedList/UnorderedList.js +7 -13
- package/lib/feature-flags.d.ts +1 -0
- package/lib/feature-flags.js +3 -4
- package/lib/index.js +180 -182
- package/lib/internal/FloatingMenu.js +10 -18
- package/lib/internal/OptimizedResize.js +2 -8
- package/lib/internal/Selection.js +1 -7
- package/lib/internal/clamp.js +0 -2
- package/lib/internal/createClassWrapper.js +1 -7
- package/lib/internal/deprecateFieldOnObject.js +1 -3
- package/lib/internal/environment.js +0 -2
- package/lib/internal/getAnnouncement.js +0 -2
- package/lib/internal/keyboard/keys.js +0 -2
- package/lib/internal/keyboard/match.js +0 -2
- package/lib/internal/keyboard/navigation.js +0 -2
- package/lib/internal/noopFn.js +0 -2
- package/lib/internal/useAttachedMenu.js +0 -2
- package/lib/internal/useControllableState.js +0 -2
- package/lib/internal/useDelayedState.js +0 -2
- package/lib/internal/useEvent.d.ts +2 -2
- package/lib/internal/useEvent.js +4 -5
- package/lib/internal/useId.d.ts +21 -0
- package/lib/internal/useId.js +27 -7
- package/lib/internal/useIdPrefix.js +2 -8
- package/lib/internal/useIsomorphicEffect.js +1 -1
- package/lib/internal/useMatchMedia.js +0 -2
- package/lib/internal/useMergedRefs.js +0 -2
- package/lib/internal/useNoInteractiveChildren.js +0 -2
- package/lib/internal/useNormalizedInputProps.js +2 -8
- package/lib/internal/useOutsideClick.js +0 -2
- package/lib/internal/useOverflowItems.js +1 -7
- package/lib/internal/usePrefix.js +2 -8
- package/lib/internal/usePreviousValue.js +0 -2
- package/lib/internal/useResizeObserver.js +0 -2
- package/lib/internal/useSavedCallback.js +0 -2
- package/lib/internal/utils.js +0 -2
- package/lib/internal/warning.js +0 -2
- package/lib/internal/wrapFocus.js +0 -2
- package/lib/node_modules/es-toolkit/dist/compat/function/{debounce.mjs.js → debounce.js} +1 -3
- package/lib/node_modules/es-toolkit/dist/compat/function/{throttle.mjs.js → throttle.js} +1 -3
- package/lib/node_modules/es-toolkit/dist/function/{debounce.mjs.js → debounce.js} +0 -2
- package/lib/prop-types/AriaPropTypes.js +2 -8
- package/lib/prop-types/deprecate.js +0 -2
- package/lib/prop-types/deprecateComponent.d.ts +1 -0
- package/lib/prop-types/deprecateComponent.js +2 -5
- package/lib/prop-types/deprecateValuesWithin.d.ts +1 -0
- package/lib/prop-types/deprecateValuesWithin.js +1 -1
- package/lib/prop-types/isRequiredOneOf.js +0 -2
- package/lib/prop-types/requiredIfGivenPropIsTruthy.d.ts +14 -0
- package/lib/prop-types/requiredIfGivenPropIsTruthy.js +1 -1
- package/lib/tools/events.js +0 -2
- package/lib/tools/mapPopoverAlign.js +0 -2
- package/lib/tools/mergeRefs.d.ts +12 -0
- package/lib/tools/mergeRefs.js +1 -2
- package/lib/tools/setupGetInstanceId.js +0 -2
- package/lib/tools/toggleClass.js +0 -2
- package/lib/tools/wrapComponent.js +4 -10
- package/package.json +12 -12
- package/telemetry.yml +1 -0
- /package/es/node_modules/es-toolkit/dist/function/{debounce.mjs.js → debounce.js} +0 -0
|
@@ -22,13 +22,7 @@ var useId = require('../../internal/useId.js');
|
|
|
22
22
|
var index = require('../AILabel/index.js');
|
|
23
23
|
var utils = require('../../internal/utils.js');
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
28
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
29
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
30
|
-
|
|
31
|
-
const RadioButtonGroup = /*#__PURE__*/React__default["default"].forwardRef((props, ref) => {
|
|
25
|
+
const RadioButtonGroup = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
32
26
|
const {
|
|
33
27
|
children,
|
|
34
28
|
className,
|
|
@@ -65,7 +59,7 @@ const RadioButtonGroup = /*#__PURE__*/React__default["default"].forwardRef((prop
|
|
|
65
59
|
setPrevValueSelected(valueSelected);
|
|
66
60
|
}
|
|
67
61
|
function getRadioButtons() {
|
|
68
|
-
const mappedChildren =
|
|
62
|
+
const mappedChildren = React.Children.map(children, radioButton => {
|
|
69
63
|
if (!radioButton) {
|
|
70
64
|
return;
|
|
71
65
|
}
|
|
@@ -80,7 +74,7 @@ const RadioButtonGroup = /*#__PURE__*/React__default["default"].forwardRef((prop
|
|
|
80
74
|
if (!selected && radioButton.props.checked) {
|
|
81
75
|
newProps.checked = true;
|
|
82
76
|
}
|
|
83
|
-
return /*#__PURE__*/
|
|
77
|
+
return /*#__PURE__*/React.cloneElement(radioButton, newProps);
|
|
84
78
|
});
|
|
85
79
|
return mappedChildren;
|
|
86
80
|
}
|
|
@@ -94,8 +88,8 @@ const RadioButtonGroup = /*#__PURE__*/React__default["default"].forwardRef((prop
|
|
|
94
88
|
}
|
|
95
89
|
const showWarning = !readOnly && !invalid && warn;
|
|
96
90
|
const showHelper = !invalid && !disabled && !warn;
|
|
97
|
-
const wrapperClasses =
|
|
98
|
-
const fieldsetClasses =
|
|
91
|
+
const wrapperClasses = cx(`${prefix}--form-item`, className);
|
|
92
|
+
const fieldsetClasses = cx(`${prefix}--radio-button-group`, {
|
|
99
93
|
[`${prefix}--radio-button-group--${orientation}`]: orientation === 'vertical',
|
|
100
94
|
[`${prefix}--radio-button-group--label-${labelPosition}`]: labelPosition,
|
|
101
95
|
[`${prefix}--radio-button-group--readonly`]: readOnly,
|
|
@@ -104,11 +98,11 @@ const RadioButtonGroup = /*#__PURE__*/React__default["default"].forwardRef((prop
|
|
|
104
98
|
[`${prefix}--radio-button-group--slug`]: slug,
|
|
105
99
|
[`${prefix}--radio-button-group--decorator`]: decorator
|
|
106
100
|
});
|
|
107
|
-
const helperClasses =
|
|
101
|
+
const helperClasses = cx(`${prefix}--form__helper-text`, {
|
|
108
102
|
[`${prefix}--form__helper-text--disabled`]: disabled
|
|
109
103
|
});
|
|
110
104
|
const helperId = !helperText ? undefined : `radio-button-group-helper-text-${radioButtonGroupInstanceId}`;
|
|
111
|
-
const helper = helperText ? /*#__PURE__*/
|
|
105
|
+
const helper = helperText ? /*#__PURE__*/React.createElement("div", {
|
|
112
106
|
id: helperId,
|
|
113
107
|
className: helperClasses
|
|
114
108
|
}, helperText) : null;
|
|
@@ -121,27 +115,27 @@ const RadioButtonGroup = /*#__PURE__*/React__default["default"].forwardRef((prop
|
|
|
121
115
|
size: 'mini',
|
|
122
116
|
kind: 'default'
|
|
123
117
|
}) : null;
|
|
124
|
-
return /*#__PURE__*/
|
|
118
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
125
119
|
className: wrapperClasses,
|
|
126
|
-
ref: mergeRefs
|
|
127
|
-
}, /*#__PURE__*/
|
|
120
|
+
ref: mergeRefs.default(divRef, ref)
|
|
121
|
+
}, /*#__PURE__*/React.createElement("fieldset", _rollupPluginBabelHelpers.extends({
|
|
128
122
|
className: fieldsetClasses,
|
|
129
123
|
disabled: disabled,
|
|
130
124
|
"data-invalid": invalid ? true : undefined,
|
|
131
125
|
"aria-describedby": showHelper && helperText ? helperId : undefined
|
|
132
|
-
}, rest), legendText && /*#__PURE__*/
|
|
126
|
+
}, rest), legendText && /*#__PURE__*/React.createElement(index$1.Legend, {
|
|
133
127
|
className: `${prefix}--label`
|
|
134
|
-
}, legendText, slug ? normalizedDecorator : decorator ? /*#__PURE__*/
|
|
128
|
+
}, legendText, slug ? normalizedDecorator : decorator ? /*#__PURE__*/React.createElement("div", {
|
|
135
129
|
className: `${prefix}--radio-button-group-inner--decorator`
|
|
136
|
-
}, normalizedDecorator) : ''), getRadioButtons()), /*#__PURE__*/
|
|
130
|
+
}, normalizedDecorator) : ''), getRadioButtons()), /*#__PURE__*/React.createElement("div", {
|
|
137
131
|
className: `${prefix}--radio-button__validation-msg`
|
|
138
|
-
}, !readOnly && invalid && /*#__PURE__*/
|
|
132
|
+
}, !readOnly && invalid && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(iconsReact.WarningFilled, {
|
|
139
133
|
className: `${prefix}--radio-button__invalid-icon`
|
|
140
|
-
}), /*#__PURE__*/
|
|
134
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
141
135
|
className: `${prefix}--form-requirement`
|
|
142
|
-
}, invalidText)), showWarning && /*#__PURE__*/
|
|
136
|
+
}, invalidText)), showWarning && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(iconsReact.WarningAltFilled, {
|
|
143
137
|
className: `${prefix}--radio-button__invalid-icon ${prefix}--radio-button__invalid-icon--warning`
|
|
144
|
-
}), /*#__PURE__*/
|
|
138
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
145
139
|
className: `${prefix}--form-requirement`
|
|
146
140
|
}, warnText))), showHelper && helper);
|
|
147
141
|
});
|
|
@@ -149,82 +143,82 @@ RadioButtonGroup.propTypes = {
|
|
|
149
143
|
/**
|
|
150
144
|
* Provide a collection of `<RadioButton>` components to render in the group
|
|
151
145
|
*/
|
|
152
|
-
children:
|
|
146
|
+
children: PropTypes.node,
|
|
153
147
|
/**
|
|
154
148
|
* Provide an optional className to be applied to the container node
|
|
155
149
|
*/
|
|
156
|
-
className:
|
|
150
|
+
className: PropTypes.string,
|
|
157
151
|
/**
|
|
158
152
|
* **Experimental**: Provide a decorator component to be rendered inside the `RadioButtonGroup` component
|
|
159
153
|
*/
|
|
160
|
-
decorator:
|
|
154
|
+
decorator: PropTypes.node,
|
|
161
155
|
/**
|
|
162
156
|
* Specify the `<RadioButton>` to be selected by default
|
|
163
157
|
*/
|
|
164
|
-
defaultSelected:
|
|
158
|
+
defaultSelected: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
165
159
|
/**
|
|
166
160
|
* Specify whether the group is disabled
|
|
167
161
|
*/
|
|
168
|
-
disabled:
|
|
162
|
+
disabled: PropTypes.bool,
|
|
169
163
|
/**
|
|
170
164
|
* Provide text that is used alongside the control label for additional help
|
|
171
165
|
*/
|
|
172
|
-
helperText:
|
|
166
|
+
helperText: PropTypes.node,
|
|
173
167
|
/**
|
|
174
168
|
* Specify whether the control is currently invalid
|
|
175
169
|
*/
|
|
176
|
-
invalid:
|
|
170
|
+
invalid: PropTypes.bool,
|
|
177
171
|
/**
|
|
178
172
|
* Provide the text that is displayed when the control is in an invalid state
|
|
179
173
|
*/
|
|
180
|
-
invalidText:
|
|
174
|
+
invalidText: PropTypes.node,
|
|
181
175
|
/**
|
|
182
176
|
* Provide where label text should be placed
|
|
183
177
|
*/
|
|
184
|
-
labelPosition:
|
|
178
|
+
labelPosition: PropTypes.oneOf(['left', 'right']),
|
|
185
179
|
/**
|
|
186
180
|
* Provide a legend to the RadioButtonGroup input that you are
|
|
187
181
|
* exposing to the user
|
|
188
182
|
*/
|
|
189
|
-
legendText:
|
|
183
|
+
legendText: PropTypes.node,
|
|
190
184
|
/**
|
|
191
185
|
* Specify the name of the underlying `<input>` nodes
|
|
192
186
|
*/
|
|
193
|
-
name:
|
|
187
|
+
name: PropTypes.string.isRequired,
|
|
194
188
|
/**
|
|
195
189
|
* Provide an optional `onChange` hook that is called whenever the value of
|
|
196
190
|
* the group changes
|
|
197
191
|
*/
|
|
198
|
-
onChange:
|
|
192
|
+
onChange: PropTypes.func,
|
|
199
193
|
/**
|
|
200
194
|
* Provide where radio buttons should be placed
|
|
201
195
|
*/
|
|
202
|
-
orientation:
|
|
196
|
+
orientation: PropTypes.oneOf(['horizontal', 'vertical']),
|
|
203
197
|
/**
|
|
204
198
|
* Whether the RadioButtonGroup should be read-only
|
|
205
199
|
*/
|
|
206
|
-
readOnly:
|
|
200
|
+
readOnly: PropTypes.bool,
|
|
207
201
|
/**
|
|
208
202
|
* `true` to specify if radio selection in group is required.
|
|
209
203
|
*/
|
|
210
|
-
required:
|
|
204
|
+
required: PropTypes.bool,
|
|
211
205
|
/**
|
|
212
206
|
* **Experimental**: Provide a `Slug` component to be rendered inside the `RadioButtonGroup` component
|
|
213
207
|
*/
|
|
214
|
-
slug: deprecate.deprecate(
|
|
208
|
+
slug: deprecate.deprecate(PropTypes.node, 'The `slug` prop has been deprecated and will be removed in the next major version. Use the decorator prop instead.'),
|
|
215
209
|
/**
|
|
216
210
|
* Specify the value that is currently selected in the group
|
|
217
211
|
*/
|
|
218
|
-
valueSelected:
|
|
212
|
+
valueSelected: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
219
213
|
/**
|
|
220
214
|
* Specify whether the control is currently in warning state
|
|
221
215
|
*/
|
|
222
|
-
warn:
|
|
216
|
+
warn: PropTypes.bool,
|
|
223
217
|
/**
|
|
224
218
|
* Provide the text that is displayed when the control is in warning state
|
|
225
219
|
*/
|
|
226
|
-
warnText:
|
|
220
|
+
warnText: PropTypes.node
|
|
227
221
|
};
|
|
228
222
|
RadioButtonGroup.displayName = 'RadioButtonGroup';
|
|
229
223
|
|
|
230
|
-
exports
|
|
224
|
+
exports.default = RadioButtonGroup;
|
|
@@ -26,14 +26,8 @@ var index$1 = require('../AILabel/index.js');
|
|
|
26
26
|
var utils = require('../../internal/utils.js');
|
|
27
27
|
var Text = require('../Text/Text.js');
|
|
28
28
|
|
|
29
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
30
|
-
|
|
31
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
32
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
33
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
34
|
-
|
|
35
29
|
var _RadioButtonChecked, _RadioButton, _CheckmarkFilled;
|
|
36
|
-
const RadioTile = /*#__PURE__*/
|
|
30
|
+
const RadioTile = /*#__PURE__*/React.forwardRef(function RadioTile({
|
|
37
31
|
children,
|
|
38
32
|
className: customClassName,
|
|
39
33
|
decorator,
|
|
@@ -52,7 +46,7 @@ const RadioTile = /*#__PURE__*/React__default["default"].forwardRef(function Rad
|
|
|
52
46
|
}, ref) {
|
|
53
47
|
const prefix = usePrefix.usePrefix();
|
|
54
48
|
const inputId = useId.useFallbackId(id);
|
|
55
|
-
const className =
|
|
49
|
+
const className = cx(customClassName, `${prefix}--tile`, `${prefix}--tile--selectable`, `${prefix}--tile--radio`, {
|
|
56
50
|
[`${prefix}--tile--is-selected`]: checked,
|
|
57
51
|
[`${prefix}--tile--light`]: light,
|
|
58
52
|
[`${prefix}--tile--disabled`]: disabled,
|
|
@@ -65,12 +59,12 @@ const RadioTile = /*#__PURE__*/React__default["default"].forwardRef(function Rad
|
|
|
65
59
|
function icon() {
|
|
66
60
|
if (v12TileRadioIcons) {
|
|
67
61
|
if (checked) {
|
|
68
|
-
return _RadioButtonChecked || (_RadioButtonChecked = /*#__PURE__*/
|
|
62
|
+
return _RadioButtonChecked || (_RadioButtonChecked = /*#__PURE__*/React.createElement(iconsReact.RadioButtonChecked, null));
|
|
69
63
|
} else {
|
|
70
|
-
return _RadioButton || (_RadioButton = /*#__PURE__*/
|
|
64
|
+
return _RadioButton || (_RadioButton = /*#__PURE__*/React.createElement(iconsReact.RadioButton, null));
|
|
71
65
|
}
|
|
72
66
|
} else {
|
|
73
|
-
return _CheckmarkFilled || (_CheckmarkFilled = /*#__PURE__*/
|
|
67
|
+
return _CheckmarkFilled || (_CheckmarkFilled = /*#__PURE__*/React.createElement(iconsReact.CheckmarkFilled, null));
|
|
74
68
|
}
|
|
75
69
|
}
|
|
76
70
|
function handleOnChange(evt) {
|
|
@@ -89,7 +83,7 @@ const RadioTile = /*#__PURE__*/React__default["default"].forwardRef(function Rad
|
|
|
89
83
|
const normalizedDecorator = candidateIsAILabel ? /*#__PURE__*/React.cloneElement(candidate, {
|
|
90
84
|
size: 'xs'
|
|
91
85
|
}) : null;
|
|
92
|
-
return /*#__PURE__*/
|
|
86
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("input", {
|
|
93
87
|
checked: checked,
|
|
94
88
|
className: `${prefix}--tile-input`,
|
|
95
89
|
disabled: disabled,
|
|
@@ -102,14 +96,14 @@ const RadioTile = /*#__PURE__*/React__default["default"].forwardRef(function Rad
|
|
|
102
96
|
value: value,
|
|
103
97
|
ref: ref,
|
|
104
98
|
required: required
|
|
105
|
-
}), /*#__PURE__*/
|
|
99
|
+
}), /*#__PURE__*/React.createElement("label", _rollupPluginBabelHelpers.extends({}, rest, {
|
|
106
100
|
htmlFor: inputId,
|
|
107
101
|
className: className
|
|
108
|
-
}), /*#__PURE__*/
|
|
102
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
109
103
|
className: `${prefix}--tile__checkmark`
|
|
110
|
-
}, icon()), /*#__PURE__*/
|
|
104
|
+
}, icon()), /*#__PURE__*/React.createElement(Text.Text, {
|
|
111
105
|
className: `${prefix}--tile-content`
|
|
112
|
-
}, children), slug ? normalizedDecorator : decorator ? /*#__PURE__*/
|
|
106
|
+
}, children), slug ? normalizedDecorator : decorator ? /*#__PURE__*/React.createElement("div", {
|
|
113
107
|
className: `${prefix}--tile--inner-decorator`
|
|
114
108
|
}, normalizedDecorator) : ''));
|
|
115
109
|
});
|
|
@@ -118,62 +112,62 @@ RadioTile.propTypes = {
|
|
|
118
112
|
/**
|
|
119
113
|
* Specify whether the `RadioTile` should be checked.
|
|
120
114
|
*/
|
|
121
|
-
checked:
|
|
115
|
+
checked: PropTypes.bool,
|
|
122
116
|
/**
|
|
123
117
|
* The `RadioTile` content.
|
|
124
118
|
*/
|
|
125
|
-
children:
|
|
119
|
+
children: PropTypes.node,
|
|
126
120
|
/**
|
|
127
121
|
* Provide an optional `className` to be applied to the underlying `<label>`.
|
|
128
122
|
*/
|
|
129
|
-
className:
|
|
123
|
+
className: PropTypes.string,
|
|
130
124
|
/**
|
|
131
125
|
* **Experimental**: Provide a `decorator` component to be rendered inside the `RadioTile` component
|
|
132
126
|
*/
|
|
133
|
-
decorator:
|
|
127
|
+
decorator: PropTypes.node,
|
|
134
128
|
/**
|
|
135
129
|
* Specify whether the `RadioTile` should be disabled.
|
|
136
130
|
*/
|
|
137
|
-
disabled:
|
|
131
|
+
disabled: PropTypes.bool,
|
|
138
132
|
/**
|
|
139
133
|
* Specify if the `ExpandableTile` component should be rendered with rounded corners.
|
|
140
134
|
* Only valid when `slug` prop is present
|
|
141
135
|
*/
|
|
142
|
-
hasRoundedCorners:
|
|
136
|
+
hasRoundedCorners: PropTypes.bool,
|
|
143
137
|
/**
|
|
144
138
|
* Provide a unique id for the underlying `<input>`.
|
|
145
139
|
*/
|
|
146
|
-
id:
|
|
140
|
+
id: PropTypes.string,
|
|
147
141
|
/**
|
|
148
142
|
* `true` to use the light version. For use on `$layer-01` backgrounds only.
|
|
149
143
|
* Don't use this to make tile background color same as container background color.
|
|
150
144
|
*/
|
|
151
|
-
light: deprecate.deprecate(
|
|
145
|
+
light: deprecate.deprecate(PropTypes.bool, 'The `light` prop for `RadioTile` is no longer needed and has ' + 'been deprecated in v11 in favor of the new `Layer` component. It will be removed in the next major release.'),
|
|
152
146
|
/**
|
|
153
147
|
* Provide a `name` for the underlying `<input>`.
|
|
154
148
|
*/
|
|
155
|
-
name:
|
|
149
|
+
name: PropTypes.string,
|
|
156
150
|
/**
|
|
157
151
|
* Provide an optional `onChange` hook that is called each time the value of
|
|
158
152
|
* the underlying `<input>` changes.
|
|
159
153
|
*/
|
|
160
|
-
onChange:
|
|
154
|
+
onChange: PropTypes.func,
|
|
161
155
|
/**
|
|
162
156
|
* `true` to specify if the control is required.
|
|
163
157
|
*/
|
|
164
|
-
required:
|
|
158
|
+
required: PropTypes.bool,
|
|
165
159
|
/**
|
|
166
160
|
* **Experimental**: Provide a `Slug` component to be rendered inside the `RadioTile` component
|
|
167
161
|
*/
|
|
168
|
-
slug: deprecate.deprecate(
|
|
162
|
+
slug: deprecate.deprecate(PropTypes.node, 'The `slug` prop for `RadioTile` has ' + 'been deprecated in favor of the new `decorator` prop. It will be removed in the next major release.'),
|
|
169
163
|
/**
|
|
170
164
|
* Specify the tab index of the underlying `<input>`.
|
|
171
165
|
*/
|
|
172
|
-
tabIndex:
|
|
166
|
+
tabIndex: PropTypes.number,
|
|
173
167
|
/**
|
|
174
168
|
* Specify the value of the underlying `<input>`.
|
|
175
169
|
*/
|
|
176
|
-
value:
|
|
170
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired
|
|
177
171
|
};
|
|
178
172
|
|
|
179
|
-
exports
|
|
173
|
+
exports.default = RadioTile;
|
|
@@ -15,28 +15,22 @@ 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 SearchSkeleton = ({
|
|
25
19
|
small = false,
|
|
26
20
|
className,
|
|
27
21
|
...rest
|
|
28
22
|
}) => {
|
|
29
23
|
const prefix = usePrefix.usePrefix();
|
|
30
|
-
const searchClasses =
|
|
24
|
+
const searchClasses = cx(className, {
|
|
31
25
|
[`${prefix}--skeleton`]: true,
|
|
32
26
|
[`${prefix}--search--xl`]: !small,
|
|
33
27
|
[`${prefix}--search--sm`]: small
|
|
34
28
|
});
|
|
35
|
-
return /*#__PURE__*/
|
|
29
|
+
return /*#__PURE__*/React.createElement("div", _rollupPluginBabelHelpers.extends({
|
|
36
30
|
className: searchClasses
|
|
37
|
-
}, rest), /*#__PURE__*/
|
|
31
|
+
}, rest), /*#__PURE__*/React.createElement("span", {
|
|
38
32
|
className: `${prefix}--label`
|
|
39
|
-
}), /*#__PURE__*/
|
|
33
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
40
34
|
className: `${prefix}--search-input`
|
|
41
35
|
}));
|
|
42
36
|
};
|
|
@@ -44,12 +38,12 @@ SearchSkeleton.propTypes = {
|
|
|
44
38
|
/**
|
|
45
39
|
* Specify an optional className to add.
|
|
46
40
|
*/
|
|
47
|
-
className:
|
|
41
|
+
className: PropTypes.string,
|
|
48
42
|
/**
|
|
49
43
|
* Specify whether the Search should be a small variant
|
|
50
44
|
*/
|
|
51
|
-
small:
|
|
45
|
+
small: PropTypes.bool
|
|
52
46
|
};
|
|
53
47
|
|
|
54
48
|
exports.SearchSkeleton = SearchSkeleton;
|
|
55
|
-
exports
|
|
49
|
+
exports.default = SearchSkeleton;
|
|
@@ -25,14 +25,8 @@ require('../FluidForm/FluidForm.js');
|
|
|
25
25
|
var FormContext = require('../FluidForm/FormContext.js');
|
|
26
26
|
var noopFn = require('../../internal/noopFn.js');
|
|
27
27
|
|
|
28
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
29
|
-
|
|
30
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
31
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
32
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
33
|
-
|
|
34
28
|
var _Close;
|
|
35
|
-
const Search = /*#__PURE__*/
|
|
29
|
+
const Search = /*#__PURE__*/React.forwardRef(function Search({
|
|
36
30
|
autoComplete = 'off',
|
|
37
31
|
className,
|
|
38
32
|
closeButtonLabelText = 'Clear search input',
|
|
@@ -68,7 +62,7 @@ const Search = /*#__PURE__*/React__default["default"].forwardRef(function Search
|
|
|
68
62
|
const searchId = `${uniqueId}-search`;
|
|
69
63
|
const [hasContent, setHasContent] = React.useState(hasPropValue || false);
|
|
70
64
|
const [prevValue, setPrevValue] = React.useState(value);
|
|
71
|
-
const searchClasses =
|
|
65
|
+
const searchClasses = cx({
|
|
72
66
|
[`${prefix}--search`]: true,
|
|
73
67
|
[`${prefix}--search--sm`]: size === 'sm',
|
|
74
68
|
[`${prefix}--search--md`]: size === 'md',
|
|
@@ -77,7 +71,7 @@ const Search = /*#__PURE__*/React__default["default"].forwardRef(function Search
|
|
|
77
71
|
[`${prefix}--search--disabled`]: disabled,
|
|
78
72
|
[`${prefix}--search--fluid`]: isFluid
|
|
79
73
|
}, className);
|
|
80
|
-
const clearClasses =
|
|
74
|
+
const clearClasses = cx({
|
|
81
75
|
[`${prefix}--search-close`]: true,
|
|
82
76
|
[`${prefix}--search-close--hidden`]: !hasContent || !isExpanded
|
|
83
77
|
});
|
|
@@ -139,11 +133,11 @@ const Search = /*#__PURE__*/React__default["default"].forwardRef(function Search
|
|
|
139
133
|
}
|
|
140
134
|
}
|
|
141
135
|
}
|
|
142
|
-
return /*#__PURE__*/
|
|
136
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
143
137
|
role: "search",
|
|
144
138
|
"aria-label": placeholder,
|
|
145
139
|
className: searchClasses
|
|
146
|
-
}, /*#__PURE__*/
|
|
140
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
147
141
|
"aria-labelledby": onExpand ? searchId : undefined,
|
|
148
142
|
role: onExpand ? 'button' : undefined,
|
|
149
143
|
className: `${prefix}--search-magnifier`,
|
|
@@ -153,13 +147,13 @@ const Search = /*#__PURE__*/React__default["default"].forwardRef(function Search
|
|
|
153
147
|
ref: expandButtonRef,
|
|
154
148
|
"aria-expanded": onExpand && isExpanded ? true : onExpand && !isExpanded ? false : undefined,
|
|
155
149
|
"aria-controls": onExpand ? uniqueId : undefined
|
|
156
|
-
}, /*#__PURE__*/
|
|
150
|
+
}, /*#__PURE__*/React.createElement(CustomSearchIcon, {
|
|
157
151
|
icon: renderIcon
|
|
158
|
-
})), /*#__PURE__*/
|
|
152
|
+
})), /*#__PURE__*/React.createElement("label", {
|
|
159
153
|
id: searchId,
|
|
160
154
|
htmlFor: uniqueId,
|
|
161
155
|
className: `${prefix}--label`
|
|
162
|
-
}, labelText), /*#__PURE__*/
|
|
156
|
+
}, labelText), /*#__PURE__*/React.createElement("input", _rollupPluginBabelHelpers.extends({
|
|
163
157
|
autoComplete: autoComplete,
|
|
164
158
|
className: `${prefix}--search-input`,
|
|
165
159
|
defaultValue: defaultValue,
|
|
@@ -173,14 +167,14 @@ const Search = /*#__PURE__*/React__default["default"].forwardRef(function Search
|
|
|
173
167
|
type: type,
|
|
174
168
|
value: value,
|
|
175
169
|
tabIndex: onExpand && !isExpanded ? -1 : undefined
|
|
176
|
-
}, rest)), /*#__PURE__*/
|
|
170
|
+
}, rest)), /*#__PURE__*/React.createElement("button", {
|
|
177
171
|
"aria-label": closeButtonLabelText,
|
|
178
172
|
className: clearClasses,
|
|
179
173
|
disabled: disabled,
|
|
180
174
|
onClick: clearInput,
|
|
181
175
|
title: closeButtonLabelText,
|
|
182
176
|
type: "button"
|
|
183
|
-
}, _Close || (_Close = /*#__PURE__*/
|
|
177
|
+
}, _Close || (_Close = /*#__PURE__*/React.createElement(iconsReact.Close, null))));
|
|
184
178
|
});
|
|
185
179
|
Search.displayName = 'Search';
|
|
186
180
|
Search.propTypes = {
|
|
@@ -188,92 +182,92 @@ Search.propTypes = {
|
|
|
188
182
|
* Specify an optional value for the `autocomplete` property on the underlying
|
|
189
183
|
* `<input>`, defaults to "off"
|
|
190
184
|
*/
|
|
191
|
-
autoComplete:
|
|
185
|
+
autoComplete: PropTypes.string,
|
|
192
186
|
/**
|
|
193
187
|
* Specify an optional className to be applied to the container node
|
|
194
188
|
*/
|
|
195
|
-
className:
|
|
189
|
+
className: PropTypes.string,
|
|
196
190
|
/**
|
|
197
191
|
* Specify a label to be read by screen readers on the "close" button
|
|
198
192
|
*/
|
|
199
|
-
closeButtonLabelText:
|
|
193
|
+
closeButtonLabelText: PropTypes.string,
|
|
200
194
|
/**
|
|
201
195
|
* Optionally provide the default value of the `<input>`
|
|
202
196
|
*/
|
|
203
|
-
defaultValue:
|
|
197
|
+
defaultValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
204
198
|
/**
|
|
205
199
|
* Specify whether the `<input>` should be disabled
|
|
206
200
|
*/
|
|
207
|
-
disabled:
|
|
201
|
+
disabled: PropTypes.bool,
|
|
208
202
|
/**
|
|
209
203
|
* Specify a custom `id` for the input
|
|
210
204
|
*/
|
|
211
|
-
id:
|
|
205
|
+
id: PropTypes.string,
|
|
212
206
|
/**
|
|
213
207
|
* Specify whether or not ExpandableSearch should render expanded or not
|
|
214
208
|
*/
|
|
215
|
-
isExpanded:
|
|
209
|
+
isExpanded: PropTypes.bool,
|
|
216
210
|
/**
|
|
217
211
|
* Provide the label text for the Search icon
|
|
218
212
|
*/
|
|
219
|
-
labelText:
|
|
213
|
+
labelText: PropTypes.node.isRequired,
|
|
220
214
|
/**
|
|
221
215
|
* Specify light version or default version of this control
|
|
222
216
|
*/
|
|
223
|
-
light: deprecate.deprecate(
|
|
217
|
+
light: deprecate.deprecate(PropTypes.bool, 'The `light` prop for `Search` is no longer needed and has ' + 'been deprecated in v11 in favor of the new `Layer` component. It will be moved in the next major release.'),
|
|
224
218
|
/**
|
|
225
219
|
* Optional callback called when the search value changes.
|
|
226
220
|
*/
|
|
227
|
-
onChange:
|
|
221
|
+
onChange: PropTypes.func,
|
|
228
222
|
/**
|
|
229
223
|
* Optional callback called when the search value is cleared.
|
|
230
224
|
*/
|
|
231
|
-
onClear:
|
|
225
|
+
onClear: PropTypes.func,
|
|
232
226
|
/**
|
|
233
227
|
* Optional callback called when the magnifier icon is clicked in ExpandableSearch.
|
|
234
228
|
*/
|
|
235
|
-
onExpand:
|
|
229
|
+
onExpand: PropTypes.func,
|
|
236
230
|
/**
|
|
237
231
|
* Provide a handler that is invoked on the key down event for the input
|
|
238
232
|
*/
|
|
239
|
-
onKeyDown:
|
|
233
|
+
onKeyDown: PropTypes.func,
|
|
240
234
|
/**
|
|
241
235
|
* Provide an optional placeholder text for the Search.
|
|
242
236
|
* Note: if the label and placeholder differ,
|
|
243
237
|
* VoiceOver on Mac will read both
|
|
244
238
|
*/
|
|
245
|
-
placeholder:
|
|
239
|
+
placeholder: PropTypes.string,
|
|
246
240
|
/**
|
|
247
241
|
* A component used to render an icon.
|
|
248
242
|
*/
|
|
249
|
-
renderIcon:
|
|
243
|
+
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
250
244
|
/**
|
|
251
245
|
* Specify the role for the underlying `<input>`, defaults to `searchbox`
|
|
252
246
|
*/
|
|
253
|
-
role:
|
|
247
|
+
role: PropTypes.string,
|
|
254
248
|
/**
|
|
255
249
|
* Specify the size of the Search
|
|
256
250
|
*/
|
|
257
|
-
size:
|
|
251
|
+
size: PropTypes.oneOf(['sm', 'md', 'lg']),
|
|
258
252
|
/**
|
|
259
253
|
* Optional prop to specify the type of the `<input>`
|
|
260
254
|
*/
|
|
261
|
-
type:
|
|
255
|
+
type: PropTypes.string,
|
|
262
256
|
/**
|
|
263
257
|
* Specify the value of the `<input>`
|
|
264
258
|
*/
|
|
265
|
-
value:
|
|
259
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
266
260
|
};
|
|
267
261
|
function CustomSearchIcon({
|
|
268
262
|
icon: Icon
|
|
269
263
|
}) {
|
|
270
264
|
const prefix = usePrefix.usePrefix();
|
|
271
265
|
if (Icon) {
|
|
272
|
-
return /*#__PURE__*/
|
|
266
|
+
return /*#__PURE__*/React.createElement(Icon, {
|
|
273
267
|
className: `${prefix}--search-magnifier-icon`
|
|
274
268
|
});
|
|
275
269
|
}
|
|
276
|
-
return /*#__PURE__*/
|
|
270
|
+
return /*#__PURE__*/React.createElement(iconsReact.Search, {
|
|
277
271
|
className: `${prefix}--search-magnifier-icon`
|
|
278
272
|
});
|
|
279
273
|
}
|
|
@@ -281,7 +275,7 @@ CustomSearchIcon.propTypes = {
|
|
|
281
275
|
/**
|
|
282
276
|
* Rendered icon for the Search. Can be a React component class
|
|
283
277
|
*/
|
|
284
|
-
icon:
|
|
278
|
+
icon: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
285
279
|
};
|
|
286
280
|
|
|
287
|
-
exports
|
|
281
|
+
exports.default = Search;
|
|
@@ -14,6 +14,6 @@ var Search_Skeleton = require('./Search.Skeleton.js');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
exports.Search = Search
|
|
18
|
-
exports
|
|
19
|
-
exports.SearchSkeleton = Search_Skeleton
|
|
17
|
+
exports.Search = Search.default;
|
|
18
|
+
exports.default = Search.default;
|
|
19
|
+
exports.SearchSkeleton = Search_Skeleton.default;
|
|
@@ -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 SecondaryButton = props => /*#__PURE__*/React__default["default"].createElement(Button["default"], _rollupPluginBabelHelpers["extends"]({
|
|
17
|
+
const SecondaryButton = props => /*#__PURE__*/React.createElement(Button.default, _rollupPluginBabelHelpers.extends({
|
|
22
18
|
kind: "secondary"
|
|
23
19
|
}, props));
|
|
24
20
|
|
|
25
|
-
exports
|
|
21
|
+
exports.default = SecondaryButton;
|