@carbon/react 1.27.0-rc.0 → 1.28.0-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/es/_virtual/_rollupPluginBabelHelpers.js +1 -313
- package/es/components/Accordion/Accordion.Skeleton.js +28 -30
- package/es/components/Accordion/Accordion.js +18 -21
- package/es/components/Accordion/AccordionItem.js +37 -49
- package/es/components/AspectRatio/AspectRatio.js +10 -12
- package/es/components/Breadcrumb/Breadcrumb.Skeleton.js +10 -11
- package/es/components/Breadcrumb/Breadcrumb.js +14 -13
- package/es/components/Breadcrumb/BreadcrumbItem.js +24 -22
- package/es/components/Button/Button.Skeleton.js +25 -23
- package/es/components/Button/Button.js +77 -72
- package/es/components/ButtonSet/ButtonSet.js +12 -10
- package/es/components/Checkbox/Checkbox.Skeleton.js +10 -11
- package/es/components/Checkbox/Checkbox.js +55 -52
- package/es/components/CheckboxGroup/CheckboxGroup.js +33 -31
- package/es/components/ClassPrefix/index.js +4 -2
- package/es/components/CodeSnippet/CodeSnippet.Skeleton.js +15 -14
- package/es/components/CodeSnippet/CodeSnippet.js +199 -102
- package/es/components/ComboBox/ComboBox.js +349 -178
- package/es/components/ComboBox/tools/filter.js +6 -4
- package/es/components/ComboButton/index.js +38 -43
- package/es/components/ComposedModal/ComposedModal.js +187 -85
- package/es/components/ComposedModal/ModalFooter.js +54 -49
- package/es/components/ComposedModal/ModalHeader.js +39 -26
- package/es/components/ContainedList/ContainedList.js +18 -17
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +20 -18
- package/es/components/ContentSwitcher/ContentSwitcher.js +83 -98
- package/es/components/ContentSwitcher/index.js +1 -1
- package/es/components/ContextMenu/useContextMenu.js +12 -21
- package/es/components/Copy/Copy.js +24 -29
- package/es/components/CopyButton/CopyButton.js +10 -10
- package/es/components/DangerButton/DangerButton.js +3 -5
- package/es/components/DataTable/DataTable.js +334 -361
- package/es/components/DataTable/Table.js +29 -26
- package/es/components/DataTable/TableActionList.js +2 -4
- package/es/components/DataTable/TableBatchAction.js +2 -4
- package/es/components/DataTable/TableBatchActions.js +29 -30
- package/es/components/DataTable/TableBody.js +7 -8
- package/es/components/DataTable/TableCell.js +1 -1
- package/es/components/DataTable/TableContainer.js +23 -23
- package/es/components/DataTable/TableContext.js +1 -1
- package/es/components/DataTable/TableExpandHeader.js +19 -21
- package/es/components/DataTable/TableExpandRow.js +23 -23
- package/es/components/DataTable/TableExpandedRow.js +18 -23
- package/es/components/DataTable/TableHead.js +1 -1
- package/es/components/DataTable/TableHeader.js +45 -41
- package/es/components/DataTable/TableRow.js +7 -8
- package/es/components/DataTable/TableSelectAll.js +13 -11
- package/es/components/DataTable/TableSelectRow.js +29 -21
- package/es/components/DataTable/TableToolbar.js +19 -14
- package/es/components/DataTable/TableToolbarAction.js +6 -6
- package/es/components/DataTable/TableToolbarContent.js +2 -4
- package/es/components/DataTable/TableToolbarMenu.js +11 -12
- package/es/components/DataTable/TableToolbarSearch.js +52 -71
- package/es/components/DataTable/state/getDerivedStateFromProps.js +15 -15
- package/es/components/DataTable/state/sortStates.js +1 -1
- package/es/components/DataTable/state/sorting.js +28 -20
- package/es/components/DataTable/tools/cells.js +1 -3
- package/es/components/DataTable/tools/denormalize.js +4 -17
- package/es/components/DataTable/tools/filter.js +18 -16
- package/es/components/DataTable/tools/instanceId.js +2 -2
- package/es/components/DataTable/tools/normalize.js +28 -25
- package/es/components/DataTable/tools/sorting.js +28 -25
- package/es/components/DataTableSkeleton/DataTableSkeleton.js +36 -38
- package/es/components/DatePicker/DatePicker.Skeleton.js +17 -18
- package/es/components/DatePicker/DatePicker.js +206 -195
- package/es/components/DatePicker/plugins/appendToPlugin.js +45 -43
- package/es/components/DatePicker/plugins/fixEventsPlugin.js +117 -107
- package/es/components/DatePicker/plugins/rangePlugin.js +19 -11
- package/es/components/DatePickerInput/DatePickerInput.js +83 -74
- package/es/components/Dropdown/Dropdown.Skeleton.js +13 -12
- package/es/components/Dropdown/Dropdown.js +266 -109
- package/es/components/ErrorBoundary/ErrorBoundary.js +27 -48
- package/es/components/ErrorBoundary/ErrorBoundaryContext.js +3 -2
- package/es/components/ExpandableSearch/ExpandableSearch.d.ts +13 -0
- package/es/components/ExpandableSearch/ExpandableSearch.js +18 -25
- package/es/components/FeatureFlags/index.js +25 -43
- package/es/components/FileUploader/FileUploader.Skeleton.js +8 -9
- package/es/components/FileUploader/FileUploader.js +120 -147
- package/es/components/FileUploader/FileUploaderButton.js +36 -48
- package/es/components/FileUploader/FileUploaderDropContainer.js +49 -53
- package/es/components/FileUploader/FileUploaderItem.js +30 -30
- package/es/components/FileUploader/Filename.js +13 -14
- package/es/components/FluidComboBox/FluidComboBox.Skeleton.js +11 -12
- package/es/components/FluidComboBox/FluidComboBox.js +11 -9
- package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.js +18 -18
- package/es/components/FluidDatePicker/FluidDatePicker.js +19 -16
- package/es/components/FluidDatePickerInput/FluidDatePickerInput.js +3 -3
- package/es/components/FluidDropdown/FluidDropdown.Skeleton.js +11 -12
- package/es/components/FluidDropdown/FluidDropdown.js +11 -9
- package/es/components/FluidForm/FluidForm.js +9 -10
- package/es/components/FluidForm/FormContext.js +1 -1
- package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +11 -12
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +12 -10
- package/es/components/FluidSelect/FluidSelect.Skeleton.js +11 -12
- package/es/components/FluidSelect/FluidSelect.js +9 -9
- package/es/components/FluidTextArea/FluidTextArea.Skeleton.js +9 -10
- package/es/components/FluidTextArea/FluidTextArea.js +7 -8
- package/es/components/FluidTextInput/FluidTextInput.Skeleton.js +9 -10
- package/es/components/FluidTextInput/FluidTextInput.js +10 -9
- package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.js +11 -10
- package/es/components/FluidTimePicker/FluidTimePicker.js +30 -26
- package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +7 -7
- package/es/components/Form/Form.js +9 -10
- package/es/components/FormGroup/FormGroup.js +16 -17
- package/es/components/FormItem/FormItem.js +8 -9
- package/es/components/FormLabel/FormLabel.js +11 -10
- package/es/components/Grid/CSSGrid.js +38 -39
- package/es/components/Grid/Column.js +86 -79
- package/es/components/Grid/ColumnHang.js +12 -14
- package/es/components/Grid/FlexGrid.js +19 -21
- package/es/components/Grid/Grid.js +2 -2
- package/es/components/Grid/GridContext.js +12 -11
- package/es/components/Grid/Row.js +16 -18
- package/es/components/Heading/index.js +11 -13
- package/es/components/Icon/Icon.Skeleton.js +10 -12
- package/es/components/IconButton/index.js +19 -22
- package/es/components/IdPrefix/index.js +4 -2
- package/es/components/InlineCheckbox/InlineCheckbox.js +89 -36
- package/es/components/InlineLoading/InlineLoading.js +23 -25
- package/es/components/Layer/LayerContext.js +1 -1
- package/es/components/Layer/index.js +17 -18
- package/es/components/Layout/LayoutDirection.js +8 -10
- package/es/components/Layout/LayoutDirectionContext.js +1 -1
- package/es/components/Link/Link.js +25 -25
- package/es/components/ListBox/ListBox.js +38 -31
- package/es/components/ListBox/ListBoxField.js +9 -10
- package/es/components/ListBox/ListBoxMenu.js +9 -10
- package/es/components/ListBox/ListBoxMenuIcon.js +16 -14
- package/es/components/ListBox/ListBoxMenuItem.js +23 -26
- package/es/components/ListBox/ListBoxPropTypes.js +4 -4
- package/es/components/ListBox/ListBoxSelection.js +30 -25
- package/es/components/ListBox/index.js +1 -1
- package/es/components/ListBox/next/ListBoxSelection.js +27 -24
- package/es/components/ListBox/next/ListBoxTrigger.js +20 -19
- package/es/components/ListItem/ListItem.js +9 -10
- package/es/components/Loading/Loading.js +24 -24
- package/es/components/Menu/Menu.js +67 -80
- package/es/components/Menu/MenuContext.js +9 -12
- package/es/components/Menu/MenuItem.js +104 -128
- package/es/components/MenuButton/index.js +37 -41
- package/es/components/Modal/Modal.js +281 -120
- package/es/components/ModalWrapper/ModalWrapper.js +72 -96
- package/es/components/MultiSelect/FilterableMultiSelect.js +299 -163
- package/es/components/MultiSelect/MultiSelect.js +162 -174
- package/es/components/MultiSelect/MultiSelectPropTypes.js +1 -1
- package/es/components/MultiSelect/tools/itemToString.js +3 -4
- package/es/components/MultiSelect/tools/sorting.js +15 -13
- package/es/components/Notification/Notification.js +436 -164
- package/es/components/NumberInput/NumberInput.Skeleton.js +10 -11
- package/es/components/NumberInput/NumberInput.js +140 -139
- package/es/components/OrderedList/OrderedList.js +17 -15
- package/es/components/OverflowMenu/OverflowMenu.js +359 -227
- package/es/components/OverflowMenu/index.js +1 -1
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +32 -37
- package/es/components/OverflowMenuV2/index.js +26 -28
- package/es/components/Pagination/Pagination.Skeleton.js +9 -10
- package/es/components/Pagination/Pagination.js +98 -140
- package/es/components/Pagination/experimental/PageSelector.js +16 -16
- package/es/components/Pagination/experimental/Pagination.js +73 -94
- package/es/components/PaginationNav/PaginationNav.js +98 -117
- package/es/components/Popover/index.js +74 -80
- package/es/components/PrimaryButton/PrimaryButton.js +3 -5
- package/es/components/ProgressBar/ProgressBar.js +39 -37
- package/es/components/ProgressIndicator/ProgressIndicator.Skeleton.js +15 -14
- package/es/components/ProgressIndicator/ProgressIndicator.js +71 -71
- package/es/components/RadioButton/RadioButton.Skeleton.js +9 -10
- package/es/components/RadioButton/RadioButton.js +27 -27
- package/es/components/RadioButtonGroup/RadioButtonGroup.js +55 -65
- package/es/components/RadioTile/RadioTile.js +28 -26
- package/es/components/Search/Search.Skeleton.js +16 -16
- package/es/components/Search/Search.d.ts +83 -0
- package/es/components/Search/Search.js +65 -72
- package/es/components/Search/index.d.ts +11 -0
- package/es/components/SecondaryButton/SecondaryButton.js +3 -5
- package/es/components/Select/Select.Skeleton.js +12 -13
- package/es/components/Select/Select.js +79 -73
- package/es/components/SelectItem/SelectItem.js +17 -13
- package/es/components/SelectItemGroup/SelectItemGroup.js +11 -12
- package/es/components/SkeletonIcon/SkeletonIcon.js +11 -11
- package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +11 -11
- package/es/components/SkeletonText/SkeletonText.js +29 -29
- package/es/components/Slider/Slider.Skeleton.js +17 -18
- package/es/components/Slider/Slider.js +306 -329
- package/es/components/Slider/index.js +1 -1
- package/es/components/Stack/Stack.js +19 -20
- package/es/components/Stack/index.js +2 -2
- package/es/components/StructuredList/StructuredList.Skeleton.js +25 -24
- package/es/components/StructuredList/StructuredList.js +134 -106
- package/es/components/Switch/IconSwitch.js +48 -54
- package/es/components/Switch/Switch.js +33 -31
- package/es/components/Tab/Tab.js +77 -83
- package/es/components/Tab/index.js +1 -1
- package/es/components/TabContent/TabContent.js +16 -18
- package/es/components/Tabs/Tabs.Skeleton.js +14 -13
- package/es/components/Tabs/Tabs.js +211 -210
- package/es/components/Tabs/usePressable.js +27 -36
- package/es/components/Tag/Tag.Skeleton.js +10 -9
- package/es/components/Tag/Tag.js +34 -31
- package/es/components/Text/Text.js +20 -20
- package/es/components/Text/TextDirection.js +8 -7
- package/es/components/Text/TextDirectionContext.js +1 -1
- package/es/components/Text/index.js +1 -1
- package/es/components/TextArea/TextArea.Skeleton.js +11 -12
- package/es/components/TextArea/TextArea.js +89 -83
- package/es/components/TextInput/ControlledPasswordInput.js +79 -73
- package/es/components/TextInput/PasswordInput.js +101 -91
- package/es/components/TextInput/TextInput.Skeleton.js +11 -12
- package/es/components/TextInput/TextInput.js +104 -92
- package/es/components/TextInput/util.js +26 -28
- package/es/components/Theme/index.js +25 -20
- package/es/components/Tile/Tile.js +135 -176
- package/es/components/TileGroup/TileGroup.js +55 -70
- package/es/components/TileGroup/index.js +1 -1
- package/es/components/TimePicker/TimePicker.js +60 -67
- package/es/components/TimePickerSelect/TimePickerSelect.js +20 -18
- package/es/components/TimePickerSelect/index.js +1 -1
- package/es/components/Toggle/Toggle.Skeleton.js +63 -52
- package/es/components/Toggle/Toggle.js +44 -48
- package/es/components/ToggleSmall/ToggleSmall.Skeleton.js +56 -50
- package/es/components/Toggletip/index.js +52 -48
- package/es/components/Tooltip/DefinitionTooltip.js +24 -31
- package/es/components/Tooltip/Tooltip.js +35 -50
- package/es/components/TreeView/TreeNode.js +94 -74
- package/es/components/TreeView/TreeView.js +72 -83
- package/es/components/UIShell/Content.js +12 -14
- package/es/components/UIShell/Header.js +16 -12
- package/es/components/UIShell/HeaderContainer.js +8 -14
- package/es/components/UIShell/HeaderGlobalAction.js +26 -19
- package/es/components/UIShell/HeaderGlobalBar.js +1 -3
- package/es/components/UIShell/HeaderMenu.js +114 -129
- package/es/components/UIShell/HeaderMenuButton.js +31 -22
- package/es/components/UIShell/HeaderMenuItem.js +28 -20
- package/es/components/UIShell/HeaderName.js +19 -14
- package/es/components/UIShell/HeaderNavigation.js +19 -15
- package/es/components/UIShell/HeaderPanel.js +23 -17
- package/es/components/UIShell/HeaderSideNavItems.js +11 -9
- package/es/components/UIShell/Link.js +11 -11
- package/es/components/UIShell/SideNav.js +66 -62
- package/es/components/UIShell/SideNavDetails.js +11 -12
- package/es/components/UIShell/SideNavDivider.js +5 -3
- package/es/components/UIShell/SideNavFooter.js +12 -12
- package/es/components/UIShell/SideNavHeader.js +8 -6
- package/es/components/UIShell/SideNavIcon.js +11 -8
- package/es/components/UIShell/SideNavItem.js +11 -9
- package/es/components/UIShell/SideNavItems.js +13 -11
- package/es/components/UIShell/SideNavLink.js +19 -17
- package/es/components/UIShell/SideNavLinkText.js +8 -9
- package/es/components/UIShell/SideNavMenu.js +28 -35
- package/es/components/UIShell/SideNavMenuItem.js +14 -14
- package/es/components/UIShell/SideNavSwitcher.js +19 -19
- package/es/components/UIShell/SkipToContent.js +10 -11
- package/es/components/UIShell/Switcher.js +20 -11
- package/es/components/UIShell/SwitcherDivider.js +10 -9
- package/es/components/UIShell/SwitcherItem.js +26 -19
- package/es/components/UIShell/_utils.js +1 -1
- package/es/components/UnorderedList/UnorderedList.js +14 -14
- package/es/index.js +5 -5
- package/es/internal/ClickListener.js +49 -65
- package/es/internal/FloatingMenu.js +193 -200
- package/es/internal/OptimizedResize.js +9 -8
- package/es/internal/Selection.js +92 -111
- package/es/internal/createClassWrapper.js +2 -2
- package/es/internal/deprecateFieldOnObject.js +5 -3
- package/es/internal/environment.js +1 -1
- package/es/internal/focus/index.js +1 -1
- package/es/internal/keyboard/keys.js +11 -11
- package/es/internal/keyboard/match.js +7 -6
- package/es/internal/keyboard/navigation.js +15 -5
- package/es/internal/useAnnouncer.js +2 -2
- package/es/internal/useAttachedMenu.js +12 -20
- package/es/internal/useControllableState.js +11 -16
- package/es/internal/useDelayedState.js +9 -18
- package/es/internal/useEffectOnce.js +4 -4
- package/es/internal/useEvent.js +4 -4
- package/es/internal/useId.js +15 -19
- package/es/internal/useIdPrefix.js +1 -1
- package/es/internal/useIsomorphicEffect.js +1 -1
- package/es/internal/useMergedRefs.js +3 -3
- package/es/internal/useNoInteractiveChildren.js +8 -19
- package/es/internal/useNormalizedInputProps.js +16 -14
- package/es/internal/usePrefix.js +1 -1
- package/es/internal/useSavedCallback.js +3 -3
- package/es/internal/warning.js +4 -4
- package/es/internal/wrapFocus.js +16 -21
- package/es/prop-types/AriaPropTypes.js +1 -1
- package/es/prop-types/deprecate.js +6 -5
- package/es/prop-types/isRequiredOneOf.js +12 -25
- package/es/prop-types/requiredIfGivenPropIsTruthy.js +2 -2
- package/es/prop-types/types.js +1 -1
- package/es/tools/array.js +1 -1
- package/es/tools/events.js +21 -14
- package/es/tools/mergeRefs.js +3 -3
- package/es/tools/setupGetInstanceId.js +1 -1
- package/es/tools/uniqueId.js +3 -3
- package/es/tools/wrapComponent.js +14 -13
- package/lib/_virtual/_rollupPluginBabelHelpers.js +0 -336
- package/lib/components/Accordion/Accordion.Skeleton.js +27 -29
- package/lib/components/Accordion/Accordion.js +17 -20
- package/lib/components/Accordion/AccordionItem.js +36 -48
- package/lib/components/AspectRatio/AspectRatio.js +9 -11
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.js +9 -10
- package/lib/components/Breadcrumb/Breadcrumb.js +13 -12
- package/lib/components/Breadcrumb/BreadcrumbItem.js +23 -21
- package/lib/components/Button/Button.Skeleton.js +24 -22
- package/lib/components/Button/Button.js +76 -71
- package/lib/components/ButtonSet/ButtonSet.js +11 -9
- package/lib/components/Checkbox/Checkbox.Skeleton.js +9 -10
- package/lib/components/Checkbox/Checkbox.js +54 -51
- package/lib/components/CheckboxGroup/CheckboxGroup.js +32 -30
- package/lib/components/ClassPrefix/index.js +4 -2
- package/lib/components/CodeSnippet/CodeSnippet.Skeleton.js +14 -13
- package/lib/components/CodeSnippet/CodeSnippet.js +198 -101
- package/lib/components/ComboBox/ComboBox.js +348 -177
- package/lib/components/ComboBox/tools/filter.js +6 -4
- package/lib/components/ComboButton/index.js +37 -42
- package/lib/components/ComposedModal/ComposedModal.js +187 -85
- package/lib/components/ComposedModal/ModalFooter.js +53 -48
- package/lib/components/ComposedModal/ModalHeader.js +38 -25
- package/lib/components/ContainedList/ContainedList.js +18 -17
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +20 -18
- package/lib/components/ContentSwitcher/ContentSwitcher.js +82 -97
- package/lib/components/ContentSwitcher/index.js +1 -1
- package/lib/components/ContextMenu/useContextMenu.js +12 -21
- package/lib/components/Copy/Copy.js +23 -28
- package/lib/components/CopyButton/CopyButton.js +9 -9
- package/lib/components/DangerButton/DangerButton.js +3 -5
- package/lib/components/DataTable/DataTable.js +332 -359
- package/lib/components/DataTable/Table.js +28 -25
- package/lib/components/DataTable/TableActionList.js +2 -4
- package/lib/components/DataTable/TableBatchAction.js +2 -4
- package/lib/components/DataTable/TableBatchActions.js +28 -29
- package/lib/components/DataTable/TableBody.js +6 -7
- package/lib/components/DataTable/TableCell.js +1 -1
- package/lib/components/DataTable/TableContainer.js +22 -22
- package/lib/components/DataTable/TableContext.js +1 -1
- package/lib/components/DataTable/TableExpandHeader.js +18 -20
- package/lib/components/DataTable/TableExpandRow.js +22 -22
- package/lib/components/DataTable/TableExpandedRow.js +17 -22
- package/lib/components/DataTable/TableHead.js +1 -1
- package/lib/components/DataTable/TableHeader.js +43 -39
- package/lib/components/DataTable/TableRow.js +7 -8
- package/lib/components/DataTable/TableSelectAll.js +13 -11
- package/lib/components/DataTable/TableSelectRow.js +28 -20
- package/lib/components/DataTable/TableToolbar.js +18 -13
- package/lib/components/DataTable/TableToolbarAction.js +5 -5
- package/lib/components/DataTable/TableToolbarContent.js +2 -4
- package/lib/components/DataTable/TableToolbarMenu.js +10 -11
- package/lib/components/DataTable/TableToolbarSearch.js +51 -70
- package/lib/components/DataTable/state/getDerivedStateFromProps.js +15 -15
- package/lib/components/DataTable/state/sortStates.js +1 -1
- package/lib/components/DataTable/state/sorting.js +28 -20
- package/lib/components/DataTable/tools/cells.js +1 -3
- package/lib/components/DataTable/tools/denormalize.js +4 -17
- package/lib/components/DataTable/tools/filter.js +18 -16
- package/lib/components/DataTable/tools/instanceId.js +2 -2
- package/lib/components/DataTable/tools/normalize.js +28 -25
- package/lib/components/DataTable/tools/sorting.js +27 -24
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +35 -37
- package/lib/components/DatePicker/DatePicker.Skeleton.js +16 -17
- package/lib/components/DatePicker/DatePicker.js +205 -194
- package/lib/components/DatePicker/plugins/appendToPlugin.js +45 -43
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +117 -107
- package/lib/components/DatePicker/plugins/rangePlugin.js +19 -11
- package/lib/components/DatePickerInput/DatePickerInput.js +83 -74
- package/lib/components/Dropdown/Dropdown.Skeleton.js +12 -11
- package/lib/components/Dropdown/Dropdown.js +265 -108
- package/lib/components/ErrorBoundary/ErrorBoundary.js +27 -48
- package/lib/components/ErrorBoundary/ErrorBoundaryContext.js +3 -2
- package/lib/components/ExpandableSearch/ExpandableSearch.d.ts +13 -0
- package/lib/components/ExpandableSearch/ExpandableSearch.js +17 -24
- package/lib/components/FeatureFlags/index.js +25 -43
- package/lib/components/FileUploader/FileUploader.Skeleton.js +7 -8
- package/lib/components/FileUploader/FileUploader.js +119 -146
- package/lib/components/FileUploader/FileUploaderButton.js +35 -47
- package/lib/components/FileUploader/FileUploaderDropContainer.js +48 -52
- package/lib/components/FileUploader/FileUploaderItem.js +29 -29
- package/lib/components/FileUploader/Filename.js +12 -13
- package/lib/components/FluidComboBox/FluidComboBox.Skeleton.js +10 -11
- package/lib/components/FluidComboBox/FluidComboBox.js +10 -8
- package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.js +17 -17
- package/lib/components/FluidDatePicker/FluidDatePicker.js +18 -15
- package/lib/components/FluidDatePickerInput/FluidDatePickerInput.js +3 -3
- package/lib/components/FluidDropdown/FluidDropdown.Skeleton.js +10 -11
- package/lib/components/FluidDropdown/FluidDropdown.js +10 -8
- package/lib/components/FluidForm/FluidForm.js +8 -9
- package/lib/components/FluidForm/FormContext.js +1 -1
- package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +10 -11
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +11 -9
- package/lib/components/FluidSelect/FluidSelect.Skeleton.js +10 -11
- package/lib/components/FluidSelect/FluidSelect.js +8 -8
- package/lib/components/FluidTextArea/FluidTextArea.Skeleton.js +8 -9
- package/lib/components/FluidTextArea/FluidTextArea.js +6 -7
- package/lib/components/FluidTextInput/FluidTextInput.Skeleton.js +8 -9
- package/lib/components/FluidTextInput/FluidTextInput.js +9 -8
- package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +10 -9
- package/lib/components/FluidTimePicker/FluidTimePicker.js +30 -26
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +6 -6
- package/lib/components/Form/Form.js +8 -9
- package/lib/components/FormGroup/FormGroup.js +15 -16
- package/lib/components/FormItem/FormItem.js +7 -8
- package/lib/components/FormLabel/FormLabel.js +10 -9
- package/lib/components/Grid/CSSGrid.js +37 -38
- package/lib/components/Grid/Column.js +85 -78
- package/lib/components/Grid/ColumnHang.js +11 -13
- package/lib/components/Grid/FlexGrid.js +19 -21
- package/lib/components/Grid/Grid.js +2 -2
- package/lib/components/Grid/GridContext.js +12 -11
- package/lib/components/Grid/Row.js +16 -18
- package/lib/components/Heading/index.js +11 -13
- package/lib/components/Icon/Icon.Skeleton.js +9 -11
- package/lib/components/IconButton/index.js +18 -21
- package/lib/components/IdPrefix/index.js +4 -2
- package/lib/components/InlineCheckbox/InlineCheckbox.js +89 -36
- package/lib/components/InlineLoading/InlineLoading.js +22 -24
- package/lib/components/Layer/LayerContext.js +1 -1
- package/lib/components/Layer/index.js +16 -17
- package/lib/components/Layout/LayoutDirection.js +7 -9
- package/lib/components/Layout/LayoutDirectionContext.js +1 -1
- package/lib/components/Link/Link.js +24 -24
- package/lib/components/ListBox/ListBox.js +37 -30
- package/lib/components/ListBox/ListBoxField.js +8 -9
- package/lib/components/ListBox/ListBoxMenu.js +8 -9
- package/lib/components/ListBox/ListBoxMenuIcon.js +16 -14
- package/lib/components/ListBox/ListBoxMenuItem.js +22 -25
- package/lib/components/ListBox/ListBoxPropTypes.js +4 -4
- package/lib/components/ListBox/ListBoxSelection.js +30 -25
- package/lib/components/ListBox/index.js +1 -1
- package/lib/components/ListBox/next/ListBoxSelection.js +26 -23
- package/lib/components/ListBox/next/ListBoxTrigger.js +19 -18
- package/lib/components/ListItem/ListItem.js +8 -9
- package/lib/components/Loading/Loading.js +23 -23
- package/lib/components/Menu/Menu.js +66 -79
- package/lib/components/Menu/MenuContext.js +9 -12
- package/lib/components/Menu/MenuItem.js +103 -127
- package/lib/components/MenuButton/index.js +36 -40
- package/lib/components/Modal/Modal.js +280 -119
- package/lib/components/ModalWrapper/ModalWrapper.js +71 -95
- package/lib/components/MultiSelect/FilterableMultiSelect.js +298 -162
- package/lib/components/MultiSelect/MultiSelect.js +163 -175
- package/lib/components/MultiSelect/MultiSelectPropTypes.js +1 -1
- package/lib/components/MultiSelect/tools/itemToString.js +3 -4
- package/lib/components/MultiSelect/tools/sorting.js +15 -13
- package/lib/components/Notification/Notification.js +434 -162
- package/lib/components/NumberInput/NumberInput.Skeleton.js +9 -10
- package/lib/components/NumberInput/NumberInput.js +139 -138
- package/lib/components/OrderedList/OrderedList.js +16 -14
- package/lib/components/OverflowMenu/OverflowMenu.js +358 -226
- package/lib/components/OverflowMenu/index.js +1 -1
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +31 -36
- package/lib/components/OverflowMenuV2/index.js +25 -27
- package/lib/components/Pagination/Pagination.Skeleton.js +8 -9
- package/lib/components/Pagination/Pagination.js +97 -139
- package/lib/components/Pagination/experimental/PageSelector.js +17 -17
- package/lib/components/Pagination/experimental/Pagination.js +72 -93
- package/lib/components/PaginationNav/PaginationNav.js +97 -116
- package/lib/components/Popover/index.js +73 -79
- package/lib/components/PrimaryButton/PrimaryButton.js +3 -5
- package/lib/components/ProgressBar/ProgressBar.js +38 -36
- package/lib/components/ProgressIndicator/ProgressIndicator.Skeleton.js +14 -13
- package/lib/components/ProgressIndicator/ProgressIndicator.js +70 -70
- package/lib/components/RadioButton/RadioButton.Skeleton.js +8 -9
- package/lib/components/RadioButton/RadioButton.js +26 -26
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +54 -64
- package/lib/components/RadioTile/RadioTile.js +27 -25
- package/lib/components/Search/Search.Skeleton.js +15 -15
- package/lib/components/Search/Search.d.ts +83 -0
- package/lib/components/Search/Search.js +62 -69
- package/lib/components/Search/index.d.ts +11 -0
- package/lib/components/SecondaryButton/SecondaryButton.js +3 -5
- package/lib/components/Select/Select.Skeleton.js +11 -12
- package/lib/components/Select/Select.js +78 -72
- package/lib/components/SelectItem/SelectItem.js +16 -12
- package/lib/components/SelectItemGroup/SelectItemGroup.js +10 -11
- package/lib/components/SkeletonIcon/SkeletonIcon.js +10 -10
- package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +10 -10
- package/lib/components/SkeletonText/SkeletonText.js +28 -28
- package/lib/components/Slider/Slider.Skeleton.js +16 -17
- package/lib/components/Slider/Slider.js +305 -328
- package/lib/components/Slider/index.js +1 -1
- package/lib/components/Stack/Stack.js +18 -19
- package/lib/components/Stack/index.js +2 -2
- package/lib/components/StructuredList/StructuredList.Skeleton.js +24 -23
- package/lib/components/StructuredList/StructuredList.js +133 -105
- package/lib/components/Switch/IconSwitch.js +45 -51
- package/lib/components/Switch/Switch.js +33 -31
- package/lib/components/Tab/Tab.js +76 -82
- package/lib/components/Tab/index.js +1 -1
- package/lib/components/TabContent/TabContent.js +15 -17
- package/lib/components/Tabs/Tabs.Skeleton.js +13 -12
- package/lib/components/Tabs/Tabs.js +210 -209
- package/lib/components/Tabs/usePressable.js +27 -36
- package/lib/components/Tag/Tag.Skeleton.js +9 -8
- package/lib/components/Tag/Tag.js +33 -30
- package/lib/components/Text/Text.js +19 -19
- package/lib/components/Text/TextDirection.js +8 -7
- package/lib/components/Text/TextDirectionContext.js +1 -1
- package/lib/components/Text/index.js +1 -1
- package/lib/components/TextArea/TextArea.Skeleton.js +10 -11
- package/lib/components/TextArea/TextArea.js +88 -82
- package/lib/components/TextInput/ControlledPasswordInput.js +78 -72
- package/lib/components/TextInput/PasswordInput.js +100 -90
- package/lib/components/TextInput/TextInput.Skeleton.js +10 -11
- package/lib/components/TextInput/TextInput.js +104 -92
- package/lib/components/TextInput/util.js +28 -30
- package/lib/components/Theme/index.js +24 -19
- package/lib/components/Tile/Tile.js +134 -175
- package/lib/components/TileGroup/TileGroup.js +54 -69
- package/lib/components/TileGroup/index.js +1 -1
- package/lib/components/TimePicker/TimePicker.js +59 -66
- package/lib/components/TimePickerSelect/TimePickerSelect.js +19 -17
- package/lib/components/TimePickerSelect/index.js +1 -1
- package/lib/components/Toggle/Toggle.Skeleton.js +68 -57
- package/lib/components/Toggle/Toggle.js +43 -47
- package/lib/components/ToggleSmall/ToggleSmall.Skeleton.js +60 -54
- package/lib/components/Toggletip/index.js +51 -47
- package/lib/components/Tooltip/DefinitionTooltip.js +23 -30
- package/lib/components/Tooltip/Tooltip.js +34 -49
- package/lib/components/TreeView/TreeNode.js +93 -73
- package/lib/components/TreeView/TreeView.js +71 -82
- package/lib/components/UIShell/Content.js +12 -14
- package/lib/components/UIShell/Header.js +15 -11
- package/lib/components/UIShell/HeaderContainer.js +8 -14
- package/lib/components/UIShell/HeaderGlobalAction.js +25 -18
- package/lib/components/UIShell/HeaderGlobalBar.js +1 -3
- package/lib/components/UIShell/HeaderMenu.js +113 -128
- package/lib/components/UIShell/HeaderMenuButton.js +30 -21
- package/lib/components/UIShell/HeaderMenuItem.js +27 -19
- package/lib/components/UIShell/HeaderName.js +18 -13
- package/lib/components/UIShell/HeaderNavigation.js +18 -14
- package/lib/components/UIShell/HeaderPanel.js +22 -16
- package/lib/components/UIShell/HeaderSideNavItems.js +11 -9
- package/lib/components/UIShell/Link.js +11 -11
- package/lib/components/UIShell/SideNav.js +65 -61
- package/lib/components/UIShell/SideNavDetails.js +10 -11
- package/lib/components/UIShell/SideNavDivider.js +5 -3
- package/lib/components/UIShell/SideNavFooter.js +12 -12
- package/lib/components/UIShell/SideNavHeader.js +8 -6
- package/lib/components/UIShell/SideNavIcon.js +11 -8
- package/lib/components/UIShell/SideNavItem.js +11 -9
- package/lib/components/UIShell/SideNavItems.js +13 -11
- package/lib/components/UIShell/SideNavLink.js +18 -16
- package/lib/components/UIShell/SideNavLinkText.js +7 -8
- package/lib/components/UIShell/SideNavMenu.js +28 -35
- package/lib/components/UIShell/SideNavMenuItem.js +13 -13
- package/lib/components/UIShell/SideNavSwitcher.js +19 -19
- package/lib/components/UIShell/SkipToContent.js +9 -10
- package/lib/components/UIShell/Switcher.js +19 -10
- package/lib/components/UIShell/SwitcherDivider.js +9 -8
- package/lib/components/UIShell/SwitcherItem.js +25 -18
- package/lib/components/UIShell/_utils.js +1 -1
- package/lib/components/UnorderedList/UnorderedList.js +13 -13
- package/lib/index.js +10 -10
- package/lib/internal/ClickListener.js +49 -65
- package/lib/internal/FloatingMenu.js +192 -199
- package/lib/internal/OptimizedResize.js +9 -8
- package/lib/internal/Selection.js +91 -110
- package/lib/internal/createClassWrapper.js +2 -2
- package/lib/internal/deprecateFieldOnObject.js +5 -3
- package/lib/internal/environment.js +1 -1
- package/lib/internal/focus/index.js +1 -1
- package/lib/internal/keyboard/keys.js +11 -11
- package/lib/internal/keyboard/match.js +7 -6
- package/lib/internal/keyboard/navigation.js +15 -5
- package/lib/internal/useAnnouncer.js +2 -2
- package/lib/internal/useAttachedMenu.js +12 -20
- package/lib/internal/useControllableState.js +11 -16
- package/lib/internal/useDelayedState.js +9 -18
- package/lib/internal/useEffectOnce.js +4 -4
- package/lib/internal/useEvent.js +4 -4
- package/lib/internal/useId.js +14 -18
- package/lib/internal/useIdPrefix.js +1 -1
- package/lib/internal/useIsomorphicEffect.js +1 -1
- package/lib/internal/useMergedRefs.js +3 -3
- package/lib/internal/useNoInteractiveChildren.js +8 -19
- package/lib/internal/useNormalizedInputProps.js +16 -14
- package/lib/internal/usePrefix.js +1 -1
- package/lib/internal/useSavedCallback.js +3 -3
- package/lib/internal/warning.js +4 -4
- package/lib/internal/wrapFocus.js +16 -21
- package/lib/prop-types/AriaPropTypes.js +1 -1
- package/lib/prop-types/deprecate.js +6 -5
- package/lib/prop-types/isRequiredOneOf.js +15 -28
- package/lib/prop-types/requiredIfGivenPropIsTruthy.js +2 -2
- package/lib/prop-types/types.js +1 -1
- package/lib/tools/array.js +1 -1
- package/lib/tools/events.js +21 -14
- package/lib/tools/mergeRefs.js +3 -3
- package/lib/tools/setupGetInstanceId.js +1 -1
- package/lib/tools/uniqueId.js +3 -3
- package/lib/tools/wrapComponent.js +14 -13
- package/package.json +9 -9
|
@@ -5,34 +5,32 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import cx from 'classnames';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import React__default from 'react';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
13
|
import { GridSettings } from './GridContext.js';
|
|
14
14
|
|
|
15
|
-
var _excluded = ["as", "condensed", "narrow", "fullWidth", "className", "children"];
|
|
16
|
-
|
|
17
15
|
function FlexGrid(_ref) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
16
|
+
let {
|
|
17
|
+
as: BaseComponent = 'div',
|
|
18
|
+
condensed = false,
|
|
19
|
+
narrow = false,
|
|
20
|
+
fullWidth = false,
|
|
21
|
+
className: containerClassName,
|
|
22
|
+
children,
|
|
23
|
+
...rest
|
|
24
|
+
} = _ref;
|
|
25
|
+
const prefix = usePrefix();
|
|
26
|
+
const className = cx(containerClassName, {
|
|
27
|
+
[`${prefix}--grid`]: true,
|
|
28
|
+
[`${prefix}--grid--condensed`]: condensed,
|
|
29
|
+
[`${prefix}--grid--narrow`]: narrow,
|
|
30
|
+
[`${prefix}--grid--full-width`]: fullWidth
|
|
31
|
+
}); // cast as any to let TypeScript allow passing in attributes to base component
|
|
34
32
|
|
|
35
|
-
|
|
33
|
+
const BaseComponentAsAny = BaseComponent;
|
|
36
34
|
return /*#__PURE__*/React__default.createElement(GridSettings, {
|
|
37
35
|
mode: "flexbox",
|
|
38
36
|
subgrid: false
|
|
@@ -74,6 +72,6 @@ FlexGrid.propTypes = {
|
|
|
74
72
|
*/
|
|
75
73
|
narrow: PropTypes.bool
|
|
76
74
|
};
|
|
77
|
-
|
|
75
|
+
const FlexGridComponent = FlexGrid;
|
|
78
76
|
|
|
79
77
|
export { FlexGridComponent as FlexGrid };
|
|
@@ -12,7 +12,7 @@ import { CSSGrid as CSSGridComponent } from './CSSGrid.js';
|
|
|
12
12
|
import { FlexGrid as FlexGridComponent } from './FlexGrid.js';
|
|
13
13
|
|
|
14
14
|
function Grid(props) {
|
|
15
|
-
|
|
15
|
+
const enableCSSGrid = useFeatureFlag('enable-css-grid');
|
|
16
16
|
|
|
17
17
|
if (enableCSSGrid) {
|
|
18
18
|
return /*#__PURE__*/React__default.createElement(CSSGridComponent, props);
|
|
@@ -54,6 +54,6 @@ Grid.propTypes = {
|
|
|
54
54
|
*/
|
|
55
55
|
narrow: PropTypes.bool
|
|
56
56
|
};
|
|
57
|
-
|
|
57
|
+
const GridAsGridComponent = Grid;
|
|
58
58
|
|
|
59
59
|
export { GridAsGridComponent as Grid };
|
|
@@ -12,26 +12,27 @@ import * as React from 'react';
|
|
|
12
12
|
* Provides a grid context for communication the grid "mode" (flexbox or
|
|
13
13
|
* css-grid) along with subgrid information.
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
const GridSettingsContext = /*#__PURE__*/React.createContext({
|
|
16
16
|
mode: 'flexbox',
|
|
17
17
|
subgrid: false
|
|
18
18
|
});
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
const GridSettings = _ref => {
|
|
20
|
+
let {
|
|
21
|
+
children,
|
|
22
|
+
mode,
|
|
23
|
+
subgrid = false
|
|
24
|
+
} = _ref;
|
|
25
|
+
const value = React.useMemo(() => {
|
|
25
26
|
return {
|
|
26
|
-
mode
|
|
27
|
-
subgrid
|
|
27
|
+
mode,
|
|
28
|
+
subgrid
|
|
28
29
|
};
|
|
29
30
|
}, [mode, subgrid]);
|
|
30
31
|
return /*#__PURE__*/React.createElement(GridSettingsContext.Provider, {
|
|
31
32
|
value: value
|
|
32
33
|
}, children);
|
|
33
34
|
};
|
|
34
|
-
|
|
35
|
+
const gridModes = ['flexbox', 'css-grid'];
|
|
35
36
|
GridSettings.propTypes = {
|
|
36
37
|
/**
|
|
37
38
|
* Pass in components which will be rendered within the `GridSettings`
|
|
@@ -53,7 +54,7 @@ GridSettings.propTypes = {
|
|
|
53
54
|
* Helper function for accessing the GridContext value
|
|
54
55
|
*/
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
const useGridSettings = () => {
|
|
57
58
|
return React.useContext(GridSettingsContext);
|
|
58
59
|
};
|
|
59
60
|
|
|
@@ -5,31 +5,29 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import cx from 'classnames';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import React__default from 'react';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
13
|
|
|
14
|
-
var _excluded = ["as", "condensed", "narrow", "className", "children"];
|
|
15
|
-
|
|
16
14
|
function Row(_ref) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
15
|
+
let {
|
|
16
|
+
as: BaseComponent = 'div',
|
|
17
|
+
condensed = false,
|
|
18
|
+
narrow = false,
|
|
19
|
+
className: containerClassName,
|
|
20
|
+
children,
|
|
21
|
+
...rest
|
|
22
|
+
} = _ref;
|
|
23
|
+
const prefix = usePrefix();
|
|
24
|
+
const className = cx(containerClassName, {
|
|
25
|
+
[`${prefix}--row`]: true,
|
|
26
|
+
[`${prefix}--row--condensed`]: condensed,
|
|
27
|
+
[`${prefix}--row--narrow`]: narrow
|
|
28
|
+
}); // TypeScript type validation reports conflicts on different instances of keyof JSX.IntrinsicElements
|
|
31
29
|
|
|
32
|
-
|
|
30
|
+
const BaseComponentAsAny = BaseComponent;
|
|
33
31
|
return /*#__PURE__*/React__default.createElement(BaseComponentAsAny, _extends({
|
|
34
32
|
className: className
|
|
35
33
|
}, rest), children);
|
|
@@ -5,22 +5,20 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { objectWithoutProperties as _objectWithoutProperties } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
8
|
import PropTypes from 'prop-types';
|
|
10
9
|
import React__default from 'react';
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
var HeadingContext = /*#__PURE__*/React__default.createContext(1);
|
|
11
|
+
const HeadingContext = /*#__PURE__*/React__default.createContext(1);
|
|
14
12
|
|
|
15
13
|
function Section(_ref) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
14
|
+
let {
|
|
15
|
+
as: BaseComponent = 'section',
|
|
16
|
+
level: levelOverride,
|
|
17
|
+
children,
|
|
18
|
+
...rest
|
|
19
|
+
} = _ref;
|
|
20
|
+
const parentLevel = React__default.useContext(HeadingContext);
|
|
21
|
+
const level = typeof levelOverride !== 'undefined' ? levelOverride : parentLevel + 1;
|
|
24
22
|
return /*#__PURE__*/React__default.createElement(HeadingContext.Provider, {
|
|
25
23
|
value: Math.min(level, 6)
|
|
26
24
|
}, /*#__PURE__*/React__default.createElement(BaseComponent, rest, children));
|
|
@@ -50,8 +48,8 @@ Section.propTypes = {
|
|
|
50
48
|
};
|
|
51
49
|
|
|
52
50
|
function Heading(props) {
|
|
53
|
-
|
|
54
|
-
return /*#__PURE__*/React__default.createElement(
|
|
51
|
+
const level = React__default.useContext(HeadingContext);
|
|
52
|
+
return /*#__PURE__*/React__default.createElement(`h${level}`, props);
|
|
55
53
|
}
|
|
56
54
|
|
|
57
55
|
Heading.propTypes = {
|
|
@@ -5,24 +5,22 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
10
|
import React__default from 'react';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var props = _objectSpread2({}, rest);
|
|
23
|
-
|
|
14
|
+
const IconSkeleton = _ref => {
|
|
15
|
+
let {
|
|
16
|
+
className,
|
|
17
|
+
...rest
|
|
18
|
+
} = _ref;
|
|
19
|
+
const prefix = usePrefix();
|
|
20
|
+
const props = { ...rest
|
|
21
|
+
};
|
|
24
22
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
25
|
-
className: cx(
|
|
23
|
+
className: cx(`${prefix}--icon--skeleton`, className)
|
|
26
24
|
}, props));
|
|
27
25
|
};
|
|
28
26
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
10
|
import React__default from 'react';
|
|
11
11
|
import Button from '../Button/Button.js';
|
|
@@ -14,26 +14,23 @@ import '../Tooltip/DefinitionTooltip.js';
|
|
|
14
14
|
import { Tooltip } from '../Tooltip/Tooltip.js';
|
|
15
15
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
var prefix = usePrefix();
|
|
36
|
-
var tooltipClasses = cx(wrapperClasses, "".concat(prefix, "--icon-tooltip"));
|
|
17
|
+
const IconButton = /*#__PURE__*/React__default.forwardRef(function IconButton(props, ref) {
|
|
18
|
+
const {
|
|
19
|
+
align,
|
|
20
|
+
children,
|
|
21
|
+
className,
|
|
22
|
+
closeOnActivation = true,
|
|
23
|
+
defaultOpen = false,
|
|
24
|
+
enterDelayMs,
|
|
25
|
+
kind,
|
|
26
|
+
label,
|
|
27
|
+
leaveDelayMs,
|
|
28
|
+
wrapperClasses,
|
|
29
|
+
size = 'md',
|
|
30
|
+
...rest
|
|
31
|
+
} = props;
|
|
32
|
+
const prefix = usePrefix();
|
|
33
|
+
const tooltipClasses = cx(wrapperClasses, `${prefix}--icon-tooltip`);
|
|
37
34
|
return /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
38
35
|
align: align,
|
|
39
36
|
closeOnActivation: closeOnActivation,
|
|
@@ -46,7 +43,7 @@ var IconButton = /*#__PURE__*/React__default.forwardRef(function IconButton(prop
|
|
|
46
43
|
kind: kind,
|
|
47
44
|
ref: ref,
|
|
48
45
|
size: size,
|
|
49
|
-
className: cx(
|
|
46
|
+
className: cx(`${prefix}--btn--icon-only`, className)
|
|
50
47
|
}), children));
|
|
51
48
|
});
|
|
52
49
|
IconButton.propTypes = {
|
|
@@ -10,8 +10,10 @@ import React__default from 'react';
|
|
|
10
10
|
import { IdPrefixContext } from '../../internal/useIdPrefix.js';
|
|
11
11
|
|
|
12
12
|
function IdPrefix(_ref) {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
let {
|
|
14
|
+
children,
|
|
15
|
+
prefix
|
|
16
|
+
} = _ref;
|
|
15
17
|
return /*#__PURE__*/React__default.createElement(IdPrefixContext.Provider, {
|
|
16
18
|
value: prefix
|
|
17
19
|
}, children);
|
|
@@ -5,46 +5,43 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { defineProperty as _defineProperty } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
8
|
import PropTypes from 'prop-types';
|
|
10
9
|
import React__default, { useRef, useEffect } from 'react';
|
|
11
10
|
import deprecate from '../../prop-types/deprecate.js';
|
|
12
11
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
12
|
import { useMergedRefs } from '../../internal/useMergedRefs.js';
|
|
14
13
|
|
|
15
|
-
var _InlineCheckbox$propT;
|
|
16
14
|
/** @type any */
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
_onChange(evt.target.checked, id, evt);
|
|
16
|
+
const InlineCheckbox = /*#__PURE__*/React__default.forwardRef(function InlineCheckbox(props, forwardRef) {
|
|
17
|
+
const {
|
|
18
|
+
['aria-label']: ariaLabel,
|
|
19
|
+
ariaLabel: deprecatedAriaLabel,
|
|
20
|
+
checked = false,
|
|
21
|
+
disabled,
|
|
22
|
+
id,
|
|
23
|
+
indeterminate,
|
|
24
|
+
name,
|
|
25
|
+
onChange = () => {},
|
|
26
|
+
onClick,
|
|
27
|
+
onKeyDown,
|
|
28
|
+
title
|
|
29
|
+
} = props;
|
|
30
|
+
const prefix = usePrefix();
|
|
31
|
+
const inputRef = useRef(null);
|
|
32
|
+
const ref = useMergedRefs([inputRef, forwardRef]);
|
|
33
|
+
const inputProps = {
|
|
34
|
+
checked,
|
|
35
|
+
className: `${prefix}--checkbox`,
|
|
36
|
+
disabled,
|
|
37
|
+
id,
|
|
38
|
+
name,
|
|
39
|
+
onClick,
|
|
40
|
+
onChange: evt => {
|
|
41
|
+
onChange(evt.target.checked, id, evt);
|
|
45
42
|
},
|
|
46
|
-
onKeyDown
|
|
47
|
-
ref
|
|
43
|
+
onKeyDown,
|
|
44
|
+
ref,
|
|
48
45
|
type: 'checkbox'
|
|
49
46
|
};
|
|
50
47
|
|
|
@@ -52,26 +49,82 @@ var InlineCheckbox = /*#__PURE__*/React__default.forwardRef(function InlineCheck
|
|
|
52
49
|
inputProps.checked = false;
|
|
53
50
|
}
|
|
54
51
|
|
|
55
|
-
useEffect(
|
|
52
|
+
useEffect(() => {
|
|
56
53
|
inputRef.current.indeterminate = indeterminate;
|
|
57
54
|
}, [indeterminate]);
|
|
58
55
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
59
|
-
className:
|
|
56
|
+
className: `${prefix}--checkbox--inline`
|
|
60
57
|
}, /*#__PURE__*/React__default.createElement("input", inputProps),
|
|
61
58
|
/*#__PURE__*/
|
|
62
59
|
|
|
63
60
|
/* eslint-disable jsx-a11y/label-has-for,jsx-a11y/label-has-associated-control,jsx-a11y/click-events-have-key-events,jsx-a11y/no-noninteractive-element-interactions */
|
|
64
61
|
React__default.createElement("label", {
|
|
65
62
|
htmlFor: id,
|
|
66
|
-
className:
|
|
63
|
+
className: `${prefix}--checkbox-label`,
|
|
67
64
|
"aria-label": deprecatedAriaLabel || ariaLabel,
|
|
68
65
|
title: title,
|
|
69
|
-
onClick:
|
|
66
|
+
onClick: evt => {
|
|
70
67
|
evt.stopPropagation();
|
|
71
68
|
}
|
|
72
69
|
}));
|
|
73
70
|
});
|
|
74
|
-
InlineCheckbox.propTypes =
|
|
71
|
+
InlineCheckbox.propTypes = {
|
|
72
|
+
/**
|
|
73
|
+
* Specify the label for the control
|
|
74
|
+
*/
|
|
75
|
+
['aria-label']: PropTypes.string.isRequired,
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Deprecated, please use `aria-label` instead.
|
|
79
|
+
* Specify the label for the control
|
|
80
|
+
*/
|
|
81
|
+
ariaLabel: deprecate(PropTypes.string.isRequired, 'The `ariaLabel` prop has been deprecated in favor of `aria-label`. This prop will be removed in the next major release.'),
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Specify whether the underlying control is checked, or not
|
|
85
|
+
*/
|
|
86
|
+
checked: PropTypes.bool,
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Specify whether the underlying input control should be disabled
|
|
90
|
+
*/
|
|
91
|
+
disabled: PropTypes.bool,
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Provide an `id` for the underlying input control
|
|
95
|
+
*/
|
|
96
|
+
id: PropTypes.string.isRequired,
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Specify whether the control is in an indterminate state
|
|
100
|
+
*/
|
|
101
|
+
indeterminate: PropTypes.bool,
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Provide a `name` for the underlying input control
|
|
105
|
+
*/
|
|
106
|
+
name: PropTypes.string.isRequired,
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Provide an optional hook that is called each time the input is updated
|
|
110
|
+
*/
|
|
111
|
+
onChange: PropTypes.func,
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Provide a handler that is invoked when a user clicks on the control
|
|
115
|
+
*/
|
|
116
|
+
onClick: PropTypes.func,
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Provide a handler that is invoked on the key down event for the control
|
|
120
|
+
*/
|
|
121
|
+
onKeyDown: PropTypes.func,
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Provide an optional tooltip for the InlineCheckbox
|
|
125
|
+
*/
|
|
126
|
+
title: PropTypes.string
|
|
127
|
+
};
|
|
75
128
|
var InlineCheckbox$1 = InlineCheckbox;
|
|
76
129
|
|
|
77
130
|
export { InlineCheckbox$1 as default };
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import React__default from 'react';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import cx from 'classnames';
|
|
@@ -13,38 +13,36 @@ import { ErrorFilled, CheckmarkFilled } from '@carbon/icons-react';
|
|
|
13
13
|
import Loading from '../Loading/Loading.js';
|
|
14
14
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
15
15
|
|
|
16
|
-
var _excluded = ["className", "status", "iconDescription", "description", "onSuccess", "successDelay"];
|
|
17
16
|
function InlineLoading(_ref) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
var iconLabel = iconDescription ? iconDescription : status;
|
|
17
|
+
let {
|
|
18
|
+
className,
|
|
19
|
+
status = 'active',
|
|
20
|
+
iconDescription,
|
|
21
|
+
description,
|
|
22
|
+
onSuccess,
|
|
23
|
+
successDelay = 1500,
|
|
24
|
+
...other
|
|
25
|
+
} = _ref;
|
|
26
|
+
const prefix = usePrefix();
|
|
27
|
+
const loadingClasses = cx(`${prefix}--inline-loading`, className);
|
|
28
|
+
|
|
29
|
+
const getLoading = () => {
|
|
30
|
+
let iconLabel = iconDescription ? iconDescription : status;
|
|
33
31
|
|
|
34
32
|
if (status === 'error') {
|
|
35
33
|
return /*#__PURE__*/React__default.createElement(ErrorFilled, {
|
|
36
|
-
className:
|
|
34
|
+
className: `${prefix}--inline-loading--error`
|
|
37
35
|
}, /*#__PURE__*/React__default.createElement("title", null, iconLabel));
|
|
38
36
|
}
|
|
39
37
|
|
|
40
38
|
if (status === 'finished') {
|
|
41
|
-
setTimeout(
|
|
39
|
+
setTimeout(() => {
|
|
42
40
|
if (onSuccess) {
|
|
43
41
|
onSuccess();
|
|
44
42
|
}
|
|
45
43
|
}, successDelay);
|
|
46
44
|
return /*#__PURE__*/React__default.createElement(CheckmarkFilled, {
|
|
47
|
-
className:
|
|
45
|
+
className: `${prefix}--inline-loading__checkmark-container`
|
|
48
46
|
}, /*#__PURE__*/React__default.createElement("title", null, iconLabel));
|
|
49
47
|
}
|
|
50
48
|
|
|
@@ -64,12 +62,12 @@ function InlineLoading(_ref) {
|
|
|
64
62
|
return undefined;
|
|
65
63
|
};
|
|
66
64
|
|
|
67
|
-
|
|
68
|
-
className:
|
|
65
|
+
const loadingText = /*#__PURE__*/React__default.createElement("div", {
|
|
66
|
+
className: `${prefix}--inline-loading__text`
|
|
69
67
|
}, description);
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
className:
|
|
68
|
+
const loading = getLoading();
|
|
69
|
+
const loadingAnimation = loading && /*#__PURE__*/React__default.createElement("div", {
|
|
70
|
+
className: `${prefix}--inline-loading__animation`
|
|
73
71
|
}, loading);
|
|
74
72
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
75
73
|
className: loadingClasses
|
|
@@ -5,16 +5,15 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import React__default from 'react';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import cx from 'classnames';
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
13
|
import { LayerContext } from './LayerContext.js';
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
var MAX_LEVEL = levels.length - 1;
|
|
15
|
+
const levels = ['one', 'two', 'three'];
|
|
16
|
+
const MAX_LEVEL = levels.length - 1;
|
|
18
17
|
/**
|
|
19
18
|
* A custom hook that will return information about the current layer. A common
|
|
20
19
|
* field to pull from this is the `level` for the layer that the component that
|
|
@@ -22,25 +21,25 @@ var MAX_LEVEL = levels.length - 1;
|
|
|
22
21
|
*/
|
|
23
22
|
|
|
24
23
|
function useLayer() {
|
|
25
|
-
|
|
24
|
+
const level = React__default.useContext(LayerContext);
|
|
26
25
|
return {
|
|
27
|
-
level
|
|
26
|
+
level
|
|
28
27
|
};
|
|
29
28
|
}
|
|
30
29
|
function Layer(_ref) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
let {
|
|
31
|
+
as: BaseComponent = 'div',
|
|
32
|
+
className: customClassName,
|
|
33
|
+
children,
|
|
34
|
+
level: overrideLevel,
|
|
35
|
+
...rest
|
|
36
|
+
} = _ref;
|
|
37
|
+
const contextLevel = React__default.useContext(LayerContext);
|
|
38
|
+
const level = overrideLevel ?? contextLevel;
|
|
39
|
+
const prefix = usePrefix();
|
|
40
|
+
const className = cx(`${prefix}--layer-${levels[level]}`, customClassName); // The level should be between 0 and MAX_LEVEL
|
|
37
41
|
|
|
38
|
-
|
|
39
|
-
var level = overrideLevel !== null && overrideLevel !== void 0 ? overrideLevel : contextLevel;
|
|
40
|
-
var prefix = usePrefix();
|
|
41
|
-
var className = cx("".concat(prefix, "--layer-").concat(levels[level]), customClassName); // The level should be between 0 and MAX_LEVEL
|
|
42
|
-
|
|
43
|
-
var value = Math.max(0, Math.min(level + 1, MAX_LEVEL));
|
|
42
|
+
const value = Math.max(0, Math.min(level + 1, MAX_LEVEL));
|
|
44
43
|
return /*#__PURE__*/React__default.createElement(LayerContext.Provider, {
|
|
45
44
|
value: value
|
|
46
45
|
}, /*#__PURE__*/React__default.createElement(BaseComponent, _extends({}, rest, {
|