@carbon/react 1.27.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 +27 -25
- 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 +195 -206
- 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 +26 -24
- 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 +194 -205
- 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 +6 -6
|
@@ -5,67 +5,6 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
function ownKeys(object, enumerableOnly) {
|
|
9
|
-
var keys = Object.keys(object);
|
|
10
|
-
|
|
11
|
-
if (Object.getOwnPropertySymbols) {
|
|
12
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
13
|
-
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
14
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
15
|
-
})), keys.push.apply(keys, symbols);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return keys;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function _objectSpread2(target) {
|
|
22
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
23
|
-
var source = null != arguments[i] ? arguments[i] : {};
|
|
24
|
-
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
25
|
-
_defineProperty(target, key, source[key]);
|
|
26
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
27
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return target;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function _typeof(obj) {
|
|
35
|
-
"@babel/helpers - typeof";
|
|
36
|
-
|
|
37
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
38
|
-
return typeof obj;
|
|
39
|
-
} : function (obj) {
|
|
40
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
41
|
-
}, _typeof(obj);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function _classCallCheck(instance, Constructor) {
|
|
45
|
-
if (!(instance instanceof Constructor)) {
|
|
46
|
-
throw new TypeError("Cannot call a class as a function");
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function _defineProperties(target, props) {
|
|
51
|
-
for (var i = 0; i < props.length; i++) {
|
|
52
|
-
var descriptor = props[i];
|
|
53
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
54
|
-
descriptor.configurable = true;
|
|
55
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
56
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
61
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
62
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
63
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
64
|
-
writable: false
|
|
65
|
-
});
|
|
66
|
-
return Constructor;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
8
|
function _defineProperty(obj, key, value) {
|
|
70
9
|
if (key in obj) {
|
|
71
10
|
Object.defineProperty(obj, key, {
|
|
@@ -98,255 +37,4 @@ function _extends() {
|
|
|
98
37
|
return _extends.apply(this, arguments);
|
|
99
38
|
}
|
|
100
39
|
|
|
101
|
-
|
|
102
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
103
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
107
|
-
constructor: {
|
|
108
|
-
value: subClass,
|
|
109
|
-
writable: true,
|
|
110
|
-
configurable: true
|
|
111
|
-
}
|
|
112
|
-
});
|
|
113
|
-
Object.defineProperty(subClass, "prototype", {
|
|
114
|
-
writable: false
|
|
115
|
-
});
|
|
116
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function _getPrototypeOf(o) {
|
|
120
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
121
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
122
|
-
};
|
|
123
|
-
return _getPrototypeOf(o);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
function _setPrototypeOf(o, p) {
|
|
127
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
128
|
-
o.__proto__ = p;
|
|
129
|
-
return o;
|
|
130
|
-
};
|
|
131
|
-
return _setPrototypeOf(o, p);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
function _isNativeReflectConstruct() {
|
|
135
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
136
|
-
if (Reflect.construct.sham) return false;
|
|
137
|
-
if (typeof Proxy === "function") return true;
|
|
138
|
-
|
|
139
|
-
try {
|
|
140
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
141
|
-
return true;
|
|
142
|
-
} catch (e) {
|
|
143
|
-
return false;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
148
|
-
if (source == null) return {};
|
|
149
|
-
var target = {};
|
|
150
|
-
var sourceKeys = Object.keys(source);
|
|
151
|
-
var key, i;
|
|
152
|
-
|
|
153
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
154
|
-
key = sourceKeys[i];
|
|
155
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
156
|
-
target[key] = source[key];
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
return target;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
function _objectWithoutProperties(source, excluded) {
|
|
163
|
-
if (source == null) return {};
|
|
164
|
-
|
|
165
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
166
|
-
|
|
167
|
-
var key, i;
|
|
168
|
-
|
|
169
|
-
if (Object.getOwnPropertySymbols) {
|
|
170
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
171
|
-
|
|
172
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
173
|
-
key = sourceSymbolKeys[i];
|
|
174
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
175
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
176
|
-
target[key] = source[key];
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
return target;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
function _assertThisInitialized(self) {
|
|
184
|
-
if (self === void 0) {
|
|
185
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
return self;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
function _possibleConstructorReturn(self, call) {
|
|
192
|
-
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
193
|
-
return call;
|
|
194
|
-
} else if (call !== void 0) {
|
|
195
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
return _assertThisInitialized(self);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
function _createSuper(Derived) {
|
|
202
|
-
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
203
|
-
|
|
204
|
-
return function _createSuperInternal() {
|
|
205
|
-
var Super = _getPrototypeOf(Derived),
|
|
206
|
-
result;
|
|
207
|
-
|
|
208
|
-
if (hasNativeReflectConstruct) {
|
|
209
|
-
var NewTarget = _getPrototypeOf(this).constructor;
|
|
210
|
-
|
|
211
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
212
|
-
} else {
|
|
213
|
-
result = Super.apply(this, arguments);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
return _possibleConstructorReturn(this, result);
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
function _slicedToArray(arr, i) {
|
|
221
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
function _toConsumableArray(arr) {
|
|
225
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
function _arrayWithoutHoles(arr) {
|
|
229
|
-
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
function _arrayWithHoles(arr) {
|
|
233
|
-
if (Array.isArray(arr)) return arr;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
function _iterableToArray(iter) {
|
|
237
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
function _iterableToArrayLimit(arr, i) {
|
|
241
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
242
|
-
|
|
243
|
-
if (_i == null) return;
|
|
244
|
-
var _arr = [];
|
|
245
|
-
var _n = true;
|
|
246
|
-
var _d = false;
|
|
247
|
-
|
|
248
|
-
var _s, _e;
|
|
249
|
-
|
|
250
|
-
try {
|
|
251
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
252
|
-
_arr.push(_s.value);
|
|
253
|
-
|
|
254
|
-
if (i && _arr.length === i) break;
|
|
255
|
-
}
|
|
256
|
-
} catch (err) {
|
|
257
|
-
_d = true;
|
|
258
|
-
_e = err;
|
|
259
|
-
} finally {
|
|
260
|
-
try {
|
|
261
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
262
|
-
} finally {
|
|
263
|
-
if (_d) throw _e;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
return _arr;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
271
|
-
if (!o) return;
|
|
272
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
273
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
274
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
275
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
276
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
function _arrayLikeToArray(arr, len) {
|
|
280
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
281
|
-
|
|
282
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
283
|
-
|
|
284
|
-
return arr2;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
function _nonIterableSpread() {
|
|
288
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
function _nonIterableRest() {
|
|
292
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
function _createForOfIteratorHelper(o, allowArrayLike) {
|
|
296
|
-
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
297
|
-
|
|
298
|
-
if (!it) {
|
|
299
|
-
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
300
|
-
if (it) o = it;
|
|
301
|
-
var i = 0;
|
|
302
|
-
|
|
303
|
-
var F = function () {};
|
|
304
|
-
|
|
305
|
-
return {
|
|
306
|
-
s: F,
|
|
307
|
-
n: function () {
|
|
308
|
-
if (i >= o.length) return {
|
|
309
|
-
done: true
|
|
310
|
-
};
|
|
311
|
-
return {
|
|
312
|
-
done: false,
|
|
313
|
-
value: o[i++]
|
|
314
|
-
};
|
|
315
|
-
},
|
|
316
|
-
e: function (e) {
|
|
317
|
-
throw e;
|
|
318
|
-
},
|
|
319
|
-
f: F
|
|
320
|
-
};
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
var normalCompletion = true,
|
|
327
|
-
didErr = false,
|
|
328
|
-
err;
|
|
329
|
-
return {
|
|
330
|
-
s: function () {
|
|
331
|
-
it = it.call(o);
|
|
332
|
-
},
|
|
333
|
-
n: function () {
|
|
334
|
-
var step = it.next();
|
|
335
|
-
normalCompletion = step.done;
|
|
336
|
-
return step;
|
|
337
|
-
},
|
|
338
|
-
e: function (e) {
|
|
339
|
-
didErr = true;
|
|
340
|
-
err = e;
|
|
341
|
-
},
|
|
342
|
-
f: function () {
|
|
343
|
-
try {
|
|
344
|
-
if (!normalCompletion && it.return != null) it.return();
|
|
345
|
-
} finally {
|
|
346
|
-
if (didErr) throw err;
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
};
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
export { _arrayLikeToArray as arrayLikeToArray, _arrayWithHoles as arrayWithHoles, _arrayWithoutHoles as arrayWithoutHoles, _assertThisInitialized as assertThisInitialized, _classCallCheck as classCallCheck, _createClass as createClass, _createForOfIteratorHelper as createForOfIteratorHelper, _createSuper as createSuper, _defineProperty as defineProperty, _extends as extends, _getPrototypeOf as getPrototypeOf, _inherits as inherits, _isNativeReflectConstruct as isNativeReflectConstruct, _iterableToArray as iterableToArray, _iterableToArrayLimit as iterableToArrayLimit, _nonIterableRest as nonIterableRest, _nonIterableSpread as nonIterableSpread, _objectSpread2 as objectSpread2, _objectWithoutProperties as objectWithoutProperties, _objectWithoutPropertiesLoose as objectWithoutPropertiesLoose, _possibleConstructorReturn as possibleConstructorReturn, _setPrototypeOf as setPrototypeOf, _slicedToArray as slicedToArray, _toConsumableArray as toConsumableArray, _typeof as typeof, _unsupportedIterableToArray as unsupportedIterableToArray };
|
|
40
|
+
export { _defineProperty as defineProperty, _extends as extends };
|
|
@@ -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 cx from 'classnames';
|
|
@@ -15,33 +15,33 @@ import { usePrefix } from '../../internal/usePrefix.js';
|
|
|
15
15
|
|
|
16
16
|
var _SkeletonText, _SkeletonText2, _SkeletonText3;
|
|
17
17
|
|
|
18
|
-
var _excluded = ["align", "className", "count", "isFlush", "open"];
|
|
19
|
-
|
|
20
18
|
function AccordionSkeleton(_ref) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
19
|
+
let {
|
|
20
|
+
align,
|
|
21
|
+
className,
|
|
22
|
+
count,
|
|
23
|
+
isFlush,
|
|
24
|
+
open,
|
|
25
|
+
...rest
|
|
26
|
+
} = _ref;
|
|
27
|
+
const prefix = usePrefix();
|
|
28
|
+
const classes = cx(`${prefix}--accordion`, `${prefix}--skeleton`, className, {
|
|
29
|
+
[`${prefix}--accordion--${align}`]: align,
|
|
30
|
+
[`${prefix}--accordion--flush`]: isFlush && align !== 'start'
|
|
31
|
+
});
|
|
32
|
+
const numSkeletonItems = open ? count - 1 : count;
|
|
33
33
|
return /*#__PURE__*/React__default.createElement("ul", _extends({
|
|
34
34
|
className: classes
|
|
35
35
|
}, rest), open && /*#__PURE__*/React__default.createElement("li", {
|
|
36
|
-
className:
|
|
36
|
+
className: `${prefix}--accordion__item ${prefix}--accordion__item--active`
|
|
37
37
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
38
|
-
className:
|
|
38
|
+
className: `${prefix}--accordion__heading`
|
|
39
39
|
}, /*#__PURE__*/React__default.createElement(ChevronRight, {
|
|
40
|
-
className:
|
|
40
|
+
className: `${prefix}--accordion__arrow`
|
|
41
41
|
}), /*#__PURE__*/React__default.createElement(SkeletonText, {
|
|
42
|
-
className:
|
|
42
|
+
className: `${prefix}--accordion__title`
|
|
43
43
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
44
|
-
className:
|
|
44
|
+
className: `${prefix}--accordion__content`
|
|
45
45
|
}, _SkeletonText || (_SkeletonText = /*#__PURE__*/React__default.createElement(SkeletonText, {
|
|
46
46
|
width: "90%"
|
|
47
47
|
})), _SkeletonText2 || (_SkeletonText2 = /*#__PURE__*/React__default.createElement(SkeletonText, {
|
|
@@ -50,11 +50,9 @@ function AccordionSkeleton(_ref) {
|
|
|
50
50
|
width: "95%"
|
|
51
51
|
})))), Array.from({
|
|
52
52
|
length: numSkeletonItems
|
|
53
|
-
}).map(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
});
|
|
57
|
-
}));
|
|
53
|
+
}).map((_, i) => /*#__PURE__*/React__default.createElement(AccordionSkeletonItem, {
|
|
54
|
+
key: i
|
|
55
|
+
})));
|
|
58
56
|
}
|
|
59
57
|
|
|
60
58
|
AccordionSkeleton.propTypes = {
|
|
@@ -90,15 +88,15 @@ AccordionSkeleton.defaultProps = {
|
|
|
90
88
|
};
|
|
91
89
|
|
|
92
90
|
function AccordionSkeletonItem() {
|
|
93
|
-
|
|
91
|
+
const prefix = usePrefix();
|
|
94
92
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
95
|
-
className:
|
|
93
|
+
className: `${prefix}--accordion__item`
|
|
96
94
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
97
|
-
className:
|
|
95
|
+
className: `${prefix}--accordion__heading`
|
|
98
96
|
}, /*#__PURE__*/React__default.createElement(ChevronRight, {
|
|
99
|
-
className:
|
|
97
|
+
className: `${prefix}--accordion__arrow`
|
|
100
98
|
}), /*#__PURE__*/React__default.createElement(SkeletonText, {
|
|
101
|
-
className:
|
|
99
|
+
className: `${prefix}--accordion__title`
|
|
102
100
|
})));
|
|
103
101
|
}
|
|
104
102
|
|
|
@@ -5,37 +5,34 @@
|
|
|
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 { usePrefix } from '../../internal/usePrefix.js';
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
12
|
import React__default from 'react';
|
|
13
13
|
import * as FeatureFlags from '@carbon/feature-flags';
|
|
14
14
|
|
|
15
|
-
var _excluded = ["align", "children", "className", "disabled", "isFlush", "size"];
|
|
16
|
-
|
|
17
15
|
function Accordion(_ref) {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
var className = cx("".concat(prefix, "--accordion"), customClassName, (_cx = {}, _defineProperty(_cx, "".concat(prefix, "--accordion--").concat(align), align), _defineProperty(_cx, "".concat(prefix, "--accordion--").concat(size), size), _defineProperty(_cx, "".concat(prefix, "--accordion--flush"), isFlush && align !== 'start'), _cx));
|
|
16
|
+
let {
|
|
17
|
+
align = 'end',
|
|
18
|
+
children,
|
|
19
|
+
className: customClassName,
|
|
20
|
+
disabled = false,
|
|
21
|
+
isFlush = false,
|
|
22
|
+
size = 'md',
|
|
23
|
+
...rest
|
|
24
|
+
} = _ref;
|
|
25
|
+
const prefix = usePrefix();
|
|
26
|
+
const className = cx(`${prefix}--accordion`, customClassName, {
|
|
27
|
+
[`${prefix}--accordion--${align}`]: align,
|
|
28
|
+
[`${prefix}--accordion--${size}`]: size,
|
|
29
|
+
[`${prefix}--accordion--flush`]: isFlush && align !== 'start'
|
|
30
|
+
});
|
|
34
31
|
return /*#__PURE__*/React__default.createElement("ul", _extends({
|
|
35
32
|
className: className
|
|
36
|
-
}, rest), disabled ? React__default.Children.toArray(children).map(
|
|
33
|
+
}, rest), disabled ? React__default.Children.toArray(children).map(child => {
|
|
37
34
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
38
|
-
disabled
|
|
35
|
+
disabled
|
|
39
36
|
});
|
|
40
37
|
}) : children);
|
|
41
38
|
}
|
|
@@ -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 { ChevronRight } from '@carbon/icons-react';
|
|
10
10
|
import cx from 'classnames';
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
@@ -18,50 +18,38 @@ import { Text } from '../Text/Text.js';
|
|
|
18
18
|
import { match } from '../../internal/keyboard/match.js';
|
|
19
19
|
import { Escape } from '../../internal/keyboard/keys.js';
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
return /*#__PURE__*/React__default.createElement("button", _extends({
|
|
25
|
-
type: "button"
|
|
26
|
-
}, props));
|
|
27
|
-
};
|
|
21
|
+
const defaultRenderToggle = props => /*#__PURE__*/React__default.createElement("button", _extends({
|
|
22
|
+
type: "button"
|
|
23
|
+
}, props));
|
|
28
24
|
|
|
29
25
|
function AccordionItem(_ref) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
58
|
-
animation = _useState6[0],
|
|
59
|
-
setAnimation = _useState6[1];
|
|
60
|
-
|
|
61
|
-
var id = useId('accordion-item');
|
|
62
|
-
var prefix = usePrefix();
|
|
63
|
-
var className = cx((_cx = {}, _defineProperty(_cx, "".concat(prefix, "--accordion__item"), true), _defineProperty(_cx, "".concat(prefix, "--accordion__item--active"), isOpen), _defineProperty(_cx, "".concat(prefix, "--accordion__item--").concat(animation), animation), _defineProperty(_cx, "".concat(prefix, "--accordion__item--disabled"), disabled), _defineProperty(_cx, customClassName, !!customClassName), _cx));
|
|
64
|
-
var Toggle = renderToggle || renderExpando; // remove renderExpando in next major release
|
|
26
|
+
let {
|
|
27
|
+
children,
|
|
28
|
+
className: customClassName,
|
|
29
|
+
iconDescription,
|
|
30
|
+
// eslint-disable-line
|
|
31
|
+
open = false,
|
|
32
|
+
onHeadingClick,
|
|
33
|
+
renderExpando = defaultRenderToggle,
|
|
34
|
+
// remove renderExpando in next major release
|
|
35
|
+
renderToggle,
|
|
36
|
+
title = 'title',
|
|
37
|
+
disabled,
|
|
38
|
+
...rest
|
|
39
|
+
} = _ref;
|
|
40
|
+
const [isOpen, setIsOpen] = useState(open);
|
|
41
|
+
const [prevIsOpen, setPrevIsOpen] = useState(open);
|
|
42
|
+
const [animation, setAnimation] = useState('');
|
|
43
|
+
const id = useId('accordion-item');
|
|
44
|
+
const prefix = usePrefix();
|
|
45
|
+
const className = cx({
|
|
46
|
+
[`${prefix}--accordion__item`]: true,
|
|
47
|
+
[`${prefix}--accordion__item--active`]: isOpen,
|
|
48
|
+
[`${prefix}--accordion__item--${animation}`]: animation,
|
|
49
|
+
[`${prefix}--accordion__item--disabled`]: disabled,
|
|
50
|
+
[customClassName]: !!customClassName
|
|
51
|
+
});
|
|
52
|
+
const Toggle = renderToggle || renderExpando; // remove renderExpando in next major release
|
|
65
53
|
|
|
66
54
|
if (open !== prevIsOpen) {
|
|
67
55
|
setAnimation(isOpen ? 'collapsing' : 'expanding');
|
|
@@ -72,7 +60,7 @@ function AccordionItem(_ref) {
|
|
|
72
60
|
|
|
73
61
|
|
|
74
62
|
function onClick(event) {
|
|
75
|
-
|
|
63
|
+
const nextValue = !isOpen;
|
|
76
64
|
setAnimation(isOpen ? 'collapsing' : 'expanding');
|
|
77
65
|
setIsOpen(nextValue);
|
|
78
66
|
|
|
@@ -81,7 +69,7 @@ function AccordionItem(_ref) {
|
|
|
81
69
|
// onHeadingClick :: (event: Event, state: { isOpen: Boolean }) => any
|
|
82
70
|
onHeadingClick({
|
|
83
71
|
isOpen: nextValue,
|
|
84
|
-
event
|
|
72
|
+
event
|
|
85
73
|
});
|
|
86
74
|
}
|
|
87
75
|
} // If the AccordionItem is open, and the user hits the ESC key, then close it
|
|
@@ -109,18 +97,18 @@ function AccordionItem(_ref) {
|
|
|
109
97
|
disabled: disabled,
|
|
110
98
|
"aria-controls": id,
|
|
111
99
|
"aria-expanded": isOpen,
|
|
112
|
-
className:
|
|
100
|
+
className: `${prefix}--accordion__heading`,
|
|
113
101
|
onClick: onClick,
|
|
114
102
|
onKeyDown: onKeyDown,
|
|
115
103
|
type: "button"
|
|
116
104
|
}, /*#__PURE__*/React__default.createElement(ChevronRight, {
|
|
117
|
-
className:
|
|
105
|
+
className: `${prefix}--accordion__arrow`
|
|
118
106
|
}), /*#__PURE__*/React__default.createElement(Text, {
|
|
119
107
|
as: "div",
|
|
120
|
-
className:
|
|
108
|
+
className: `${prefix}--accordion__title`
|
|
121
109
|
}, title)), /*#__PURE__*/React__default.createElement("div", {
|
|
122
110
|
id: id,
|
|
123
|
-
className:
|
|
111
|
+
className: `${prefix}--accordion__content`
|
|
124
112
|
}, children));
|
|
125
113
|
}
|
|
126
114
|
|
|
@@ -5,13 +5,12 @@
|
|
|
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", "className", "children", "ratio"];
|
|
15
14
|
/**
|
|
16
15
|
* The AspectRatio component provides a `ratio` prop that will be used to
|
|
17
16
|
* specify the aspect ratio that the children you provide will be displayed in.
|
|
@@ -20,16 +19,15 @@ var _excluded = ["as", "className", "children", "ratio"];
|
|
|
20
19
|
*/
|
|
21
20
|
|
|
22
21
|
function AspectRatio(_ref) {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
var className = cx(containerClassName, "".concat(prefix, "--aspect-ratio"), "".concat(prefix, "--aspect-ratio--").concat(ratio));
|
|
22
|
+
let {
|
|
23
|
+
as: BaseComponent = 'div',
|
|
24
|
+
className: containerClassName,
|
|
25
|
+
children,
|
|
26
|
+
ratio = '1x1',
|
|
27
|
+
...rest
|
|
28
|
+
} = _ref;
|
|
29
|
+
const prefix = usePrefix();
|
|
30
|
+
const className = cx(containerClassName, `${prefix}--aspect-ratio`, `${prefix}--aspect-ratio--${ratio}`);
|
|
33
31
|
return /*#__PURE__*/React__default.createElement(BaseComponent, _extends({
|
|
34
32
|
className: className
|
|
35
33
|
}, rest), children);
|