@carbon/react 1.29.1 → 1.30.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 +16 -5
- package/es/components/Accordion/Accordion.Skeleton.js +0 -7
- package/es/components/Accordion/Accordion.js +1 -8
- package/es/components/Accordion/AccordionItem.js +5 -19
- package/es/components/AspectRatio/AspectRatio.js +0 -5
- package/es/components/Breadcrumb/Breadcrumb.Skeleton.js +0 -3
- package/es/components/Breadcrumb/Breadcrumb.js +0 -3
- package/es/components/Breadcrumb/BreadcrumbItem.js +0 -7
- package/es/components/Button/Button.Skeleton.js +2 -7
- package/es/components/Button/Button.js +2 -36
- package/es/components/ButtonSet/ButtonSet.js +0 -2
- package/es/components/Checkbox/Checkbox.Skeleton.js +0 -1
- package/es/components/Checkbox/Checkbox.js +4 -20
- package/es/components/CheckboxGroup/CheckboxGroup.js +0 -11
- package/es/components/ClassPrefix/index.d.ts +26 -0
- package/es/components/ClassPrefix/index.js +0 -2
- package/es/components/CodeSnippet/CodeSnippet.Skeleton.js +0 -5
- package/es/components/CodeSnippet/CodeSnippet.js +6 -45
- package/es/components/ComboBox/ComboBox.js +12 -79
- package/es/components/ComboBox/tools/filter.js +0 -1
- package/es/components/ComboButton/index.js +0 -14
- package/es/components/ComposedModal/ComposedModal.js +2 -32
- package/es/components/ComposedModal/ModalFooter.js +0 -21
- package/es/components/ComposedModal/ModalHeader.js +0 -12
- package/es/components/ContainedList/ContainedList.js +5 -32
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +0 -6
- package/es/components/ContentSwitcher/ContentSwitcher.js +11 -23
- package/es/components/ContextMenu/useContextMenu.js +1 -6
- package/es/components/Copy/Copy.js +8 -31
- package/es/components/CopyButton/CopyButton.js +0 -4
- package/es/components/DangerButton/DangerButton.js +0 -1
- package/es/components/DataTable/DataTable.js +171 -91
- package/es/components/DataTable/Table.js +0 -6
- package/es/components/DataTable/TableBatchAction.js +0 -4
- package/es/components/DataTable/TableBatchActions.js +0 -8
- package/es/components/DataTable/TableBody.js +0 -1
- package/es/components/DataTable/TableContainer.js +0 -5
- package/es/components/DataTable/TableExpandHeader.js +0 -7
- package/es/components/DataTable/TableExpandRow.js +0 -6
- package/es/components/DataTable/TableExpandedRow.js +0 -6
- package/es/components/DataTable/TableHeader.d.ts +1 -1
- package/es/components/DataTable/TableHeader.js +3 -19
- package/es/components/DataTable/TableRow.js +4 -5
- package/es/components/DataTable/TableSelectAll.js +0 -8
- package/es/components/DataTable/TableSelectRow.js +2 -10
- package/es/components/DataTable/TableToolbar.js +0 -3
- package/es/components/DataTable/TableToolbarMenu.d.ts +1 -1
- package/es/components/DataTable/TableToolbarMenu.js +3 -6
- package/es/components/DataTable/TableToolbarSearch.js +2 -30
- package/es/components/DataTable/state/getDerivedStateFromProps.js +0 -4
- package/es/components/DataTable/state/sorting.js +5 -8
- package/es/components/DataTable/tools/denormalize.js +2 -2
- package/es/components/DataTable/tools/filter.js +0 -2
- package/es/components/DataTable/tools/instanceId.js +0 -1
- package/es/components/DataTable/tools/normalize.js +10 -10
- package/es/components/DataTable/tools/sorting.js +5 -13
- package/es/components/DataTableSkeleton/DataTableSkeleton.js +5 -20
- package/es/components/DatePicker/DatePicker.Skeleton.js +0 -6
- package/es/components/DatePicker/DatePicker.js +153 -175
- package/es/components/DatePicker/plugins/appendToPlugin.js +3 -7
- package/es/components/DatePicker/plugins/fixEventsPlugin.js +14 -25
- package/es/components/DatePicker/plugins/rangePlugin.js +2 -7
- package/es/components/DatePickerInput/DatePickerInput.js +2 -28
- package/es/components/Dropdown/Dropdown.Skeleton.js +0 -2
- package/es/components/Dropdown/Dropdown.js +43 -52
- package/es/components/ErrorBoundary/ErrorBoundary.js +0 -10
- package/es/components/ErrorBoundary/ErrorBoundaryContext.js +0 -1
- package/es/components/ExpandableSearch/ExpandableSearch.js +1 -10
- package/es/components/FeatureFlags/index.js +8 -20
- package/es/components/FileUploader/FileUploader.Skeleton.js +0 -2
- package/es/components/FileUploader/FileUploader.js +3 -38
- package/es/components/FileUploader/FileUploaderButton.js +3 -24
- package/es/components/FileUploader/FileUploaderDropContainer.js +1 -28
- package/es/components/FileUploader/FileUploaderItem.js +5 -12
- package/es/components/FileUploader/Filename.js +6 -10
- package/es/components/FluidComboBox/FluidComboBox.Skeleton.js +0 -1
- package/es/components/FluidComboBox/FluidComboBox.js +0 -18
- package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.js +0 -2
- package/es/components/FluidDatePicker/FluidDatePicker.js +0 -6
- package/es/components/FluidDatePickerInput/FluidDatePickerInput.js +2 -1
- package/es/components/FluidDropdown/FluidDropdown.Skeleton.js +0 -1
- package/es/components/FluidDropdown/FluidDropdown.js +0 -18
- package/es/components/FluidForm/FluidForm.js +0 -2
- package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +0 -1
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +0 -19
- package/es/components/FluidSelect/FluidSelect.Skeleton.js +0 -1
- package/es/components/FluidSelect/FluidSelect.js +0 -10
- package/es/components/FluidTextArea/FluidTextArea.Skeleton.js +0 -1
- package/es/components/FluidTextArea/FluidTextArea.js +0 -20
- package/es/components/FluidTextInput/FluidTextInput.Skeleton.js +0 -1
- package/es/components/FluidTextInput/FluidTextInput.js +0 -14
- package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.js +0 -3
- package/es/components/FluidTimePicker/FluidTimePicker.js +1 -11
- package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +0 -6
- package/es/components/Form/Form.d.ts +23 -0
- package/es/components/Form/Form.js +3 -6
- package/es/components/Form/index.d.ts +7 -0
- package/es/components/FormGroup/FormGroup.js +0 -7
- package/es/components/FormItem/FormItem.js +0 -2
- package/es/components/FormLabel/FormLabel.js +1 -7
- package/es/components/Grid/CSSGrid.js +2 -15
- package/es/components/Grid/Column.js +18 -59
- package/es/components/Grid/ColumnHang.js +2 -5
- package/es/components/Grid/FlexGrid.js +2 -8
- package/es/components/Grid/Grid.js +0 -8
- package/es/components/Grid/GridContext.js +1 -3
- package/es/components/Grid/Row.js +2 -7
- package/es/components/Heading/index.js +0 -4
- package/es/components/Icon/Icon.Skeleton.js +2 -2
- package/es/components/IconButton/index.js +0 -10
- package/es/components/IdPrefix/index.js +0 -2
- package/es/components/InlineCheckbox/InlineCheckbox.js +0 -14
- package/es/components/InlineLoading/InlineLoading.js +0 -12
- package/es/components/Layer/index.js +3 -6
- package/es/components/Layout/LayoutDirection.js +0 -3
- package/es/components/Layout/useLayoutDirection.js +0 -1
- package/es/components/Link/Link.js +3 -10
- package/es/components/ListBox/ListBox.js +2 -13
- package/es/components/ListBox/ListBoxField.js +0 -5
- package/es/components/ListBox/ListBoxMenuIcon.js +0 -4
- package/es/components/ListBox/ListBoxMenuItem.js +2 -6
- package/es/components/ListBox/ListBoxPropTypes.d.ts +2 -2
- package/es/components/ListBox/ListBoxSelection.js +1 -13
- package/es/components/ListBox/next/ListBoxSelection.js +1 -14
- package/es/components/ListBox/next/ListBoxTrigger.js +1 -3
- package/es/components/ListItem/ListItem.d.ts +23 -0
- package/es/components/ListItem/ListItem.js +4 -8
- package/es/components/ListItem/index.d.ts +7 -0
- package/es/components/Loading/Loading.js +0 -6
- package/es/components/Menu/Menu.js +22 -40
- package/es/components/Menu/MenuContext.js +4 -5
- package/es/components/Menu/MenuItem.js +5 -39
- package/es/components/MenuButton/index.js +0 -9
- package/es/components/Modal/Modal.js +1 -46
- package/es/components/ModalWrapper/ModalWrapper.js +2 -15
- package/es/components/MultiSelect/FilterableMultiSelect.js +2 -60
- package/es/components/MultiSelect/MultiSelect.js +22 -70
- package/es/components/MultiSelect/MultiSelectPropTypes.js +0 -1
- package/es/components/MultiSelect/index.js +0 -1
- package/es/components/MultiSelect/tools/itemToString.js +0 -2
- package/es/components/MultiSelect/tools/sorting.js +3 -4
- package/es/components/Notification/Notification.js +0 -78
- package/es/components/NumberInput/NumberInput.Skeleton.js +0 -2
- package/es/components/NumberInput/NumberInput.js +3 -60
- package/es/components/OrderedList/OrderedList.d.ts +39 -0
- package/es/components/OrderedList/OrderedList.js +7 -19
- package/es/components/{Form/index.js → OrderedList/index.d.ts} +1 -3
- package/es/components/OverflowMenu/OverflowMenu.js +65 -86
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +6 -23
- package/es/components/OverflowMenuV2/index.js +0 -5
- package/es/components/Pagination/Pagination.Skeleton.js +0 -2
- package/es/components/Pagination/Pagination.js +11 -47
- package/es/components/Pagination/experimental/PageSelector.js +0 -10
- package/es/components/Pagination/experimental/Pagination.js +2 -48
- package/es/components/PaginationNav/PaginationNav.js +15 -59
- package/es/components/Popover/index.d.ts +14 -8
- package/es/components/Popover/index.js +44 -48
- package/es/components/PrimaryButton/PrimaryButton.js +0 -1
- package/es/components/ProgressBar/ProgressBar.js +0 -15
- package/es/components/ProgressIndicator/ProgressIndicator.Skeleton.js +0 -4
- package/es/components/ProgressIndicator/ProgressIndicator.js +2 -40
- package/es/components/RadioButton/RadioButton.Skeleton.js +0 -1
- package/es/components/RadioButton/RadioButton.js +0 -13
- package/es/components/RadioButtonGroup/RadioButtonGroup.js +3 -23
- package/es/components/RadioTile/RadioTile.js +0 -12
- package/es/components/Search/Search.Skeleton.js +0 -2
- package/es/components/Search/Search.js +1 -28
- package/es/components/SecondaryButton/SecondaryButton.js +0 -1
- package/es/components/Select/Select.Skeleton.js +0 -2
- package/es/components/Select/Select.d.ts +1 -1
- package/es/components/Select/Select.js +6 -33
- package/es/components/SelectItem/SelectItem.js +0 -5
- package/es/components/SelectItemGroup/SelectItemGroup.d.ts +0 -1
- package/es/components/SelectItemGroup/SelectItemGroup.js +1 -7
- package/es/components/SkeletonIcon/SkeletonIcon.js +0 -2
- package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +0 -1
- package/es/components/SkeletonText/SkeletonText.js +0 -12
- package/es/components/Slider/Slider.Skeleton.js +0 -2
- package/es/components/Slider/Slider.d.ts +0 -1
- package/es/components/Slider/Slider.js +112 -135
- package/es/components/Stack/Stack.js +1 -8
- package/es/components/StructuredList/StructuredList.Skeleton.js +0 -5
- package/es/components/StructuredList/StructuredList.js +1 -25
- package/es/components/Switch/IconSwitch.js +0 -18
- package/es/components/Switch/Switch.js +0 -11
- package/es/components/TabContent/TabContent.js +2 -6
- package/es/components/Tabs/Tabs.Skeleton.js +0 -4
- package/es/components/Tabs/Tabs.js +135 -104
- package/es/components/Tabs/usePressable.js +18 -31
- package/es/components/Tag/Tag.Skeleton.js +0 -2
- package/es/components/Tag/Tag.js +0 -15
- package/es/components/Text/Text.js +5 -18
- package/es/components/Text/TextDirection.js +0 -3
- package/es/components/Text/TextDirectionContext.js +0 -1
- package/es/components/Text/createTextComponent.js +0 -3
- package/es/components/TextArea/TextArea.Skeleton.js +0 -2
- package/es/components/TextArea/TextArea.js +11 -33
- package/es/components/TextInput/ControlledPasswordInput.js +0 -20
- package/es/components/TextInput/PasswordInput.js +0 -25
- package/es/components/TextInput/TextInput.Skeleton.js +0 -2
- package/es/components/TextInput/TextInput.d.ts +1 -1
- package/es/components/TextInput/TextInput.js +5 -33
- package/es/components/TextInput/util.js +3 -5
- package/es/components/Theme/index.js +1 -6
- package/es/components/Tile/Tile.js +32 -59
- package/es/components/TileGroup/TileGroup.js +1 -22
- package/es/components/TimePicker/TimePicker.js +6 -32
- package/es/components/TimePickerSelect/TimePickerSelect.js +2 -5
- package/es/components/Toggle/Toggle.Skeleton.js +0 -8
- package/es/components/Toggle/Toggle.js +0 -16
- package/es/components/ToggleSmall/ToggleSmall.Skeleton.js +0 -7
- package/es/components/Toggletip/index.d.ts +148 -0
- package/es/components/Toggletip/index.js +20 -44
- package/es/components/Tooltip/DefinitionTooltip.js +0 -11
- package/es/components/Tooltip/Tooltip.d.ts +1 -1
- package/es/components/Tooltip/Tooltip.js +4 -21
- package/es/components/TreeView/TreeNode.js +21 -66
- package/es/components/TreeView/TreeView.js +11 -67
- package/es/components/UIShell/Content.js +2 -4
- package/es/components/UIShell/Header.js +0 -2
- package/es/components/UIShell/HeaderContainer.d.ts +33 -0
- package/es/components/UIShell/HeaderContainer.js +13 -11
- package/es/components/UIShell/HeaderGlobalAction.js +0 -6
- package/es/components/UIShell/HeaderGlobalBar.js +0 -1
- package/es/components/UIShell/HeaderMenu.js +32 -31
- package/es/components/UIShell/HeaderMenuButton.js +2 -4
- package/es/components/UIShell/HeaderMenuItem.js +0 -8
- package/es/components/UIShell/HeaderName.js +0 -5
- package/es/components/UIShell/HeaderNavigation.js +0 -2
- package/es/components/UIShell/HeaderPanel.js +0 -2
- package/es/components/UIShell/HeaderSideNavItems.js +0 -2
- package/es/components/UIShell/Link.js +2 -3
- package/es/components/UIShell/SideNav.d.ts +3 -1
- package/es/components/UIShell/SideNav.js +44 -36
- package/es/components/UIShell/SideNavDetails.js +0 -3
- package/es/components/UIShell/SideNavDivider.js +0 -1
- package/es/components/UIShell/SideNavFooter.js +1 -4
- package/es/components/UIShell/SideNavHeader.js +0 -4
- package/es/components/UIShell/SideNavIcon.js +0 -3
- package/es/components/UIShell/SideNavItem.js +0 -3
- package/es/components/UIShell/SideNavItems.js +2 -6
- package/es/components/UIShell/SideNavLink.js +3 -7
- package/es/components/UIShell/SideNavLinkText.js +0 -2
- package/es/components/UIShell/SideNavMenu.js +0 -16
- package/es/components/UIShell/SideNavMenuItem.js +0 -2
- package/es/components/UIShell/SideNavSwitcher.js +2 -5
- package/es/components/UIShell/SkipToContent.d.ts +32 -0
- package/es/components/UIShell/SkipToContent.js +8 -15
- package/es/components/UIShell/Switcher.js +0 -2
- package/es/components/UIShell/SwitcherDivider.js +0 -1
- package/es/components/UIShell/SwitcherItem.js +0 -3
- package/es/components/UnorderedList/UnorderedList.d.ts +34 -0
- package/es/components/UnorderedList/UnorderedList.js +6 -16
- package/es/components/UnorderedList/index.d.ts +7 -0
- package/es/index.js +7 -8
- package/es/internal/ClickListener.js +3 -13
- package/es/internal/FloatingMenu.js +57 -63
- package/es/internal/OptimizedResize.js +6 -12
- package/es/internal/Selection.js +2 -25
- package/es/internal/createClassWrapper.js +0 -2
- package/es/internal/deprecateFieldOnObject.js +0 -4
- package/es/internal/focus/index.js +0 -1
- package/es/internal/keyboard/keys.js +2 -1
- package/es/internal/keyboard/match.js +1 -6
- package/es/internal/keyboard/navigation.js +8 -7
- package/es/internal/useAnnouncer.js +0 -1
- package/es/internal/useAttachedMenu.js +1 -9
- package/es/internal/useControllableState.js +6 -13
- package/es/internal/useDelayedState.js +2 -4
- package/es/internal/useEffectOnce.js +0 -1
- package/es/internal/useEvent.js +61 -3
- package/es/internal/useId.js +2 -5
- package/es/internal/useIsomorphicEffect.js +1 -0
- package/es/internal/useMergedRefs.js +2 -2
- package/es/internal/useNoInteractiveChildren.js +2 -13
- package/es/internal/useNormalizedInputProps.js +0 -3
- package/es/internal/useSavedCallback.js +0 -1
- package/es/internal/warning.js +0 -3
- package/es/internal/wrapFocus.js +1 -8
- package/es/prop-types/deprecate.js +2 -5
- package/es/prop-types/isRequiredOneOf.js +2 -5
- package/es/prop-types/requiredIfGivenPropIsTruthy.js +0 -2
- package/es/tools/array.js +0 -3
- package/es/tools/events.js +0 -3
- package/es/tools/mergeRefs.js +0 -2
- package/es/tools/wrapComponent.js +2 -5
- package/lib/_virtual/_rollupPluginBabelHelpers.js +17 -4
- package/lib/components/Accordion/Accordion.Skeleton.js +0 -7
- package/lib/components/Accordion/Accordion.js +1 -27
- package/lib/components/Accordion/AccordionItem.js +5 -19
- package/lib/components/AspectRatio/AspectRatio.js +0 -5
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.js +0 -3
- package/lib/components/Breadcrumb/Breadcrumb.js +0 -3
- package/lib/components/Breadcrumb/BreadcrumbItem.js +0 -7
- package/lib/components/Button/Button.Skeleton.js +2 -26
- package/lib/components/Button/Button.js +2 -36
- package/lib/components/ButtonSet/ButtonSet.js +0 -2
- package/lib/components/Checkbox/Checkbox.Skeleton.js +0 -1
- package/lib/components/Checkbox/Checkbox.js +4 -20
- package/lib/components/CheckboxGroup/CheckboxGroup.js +0 -11
- package/lib/components/ClassPrefix/index.d.ts +26 -0
- package/lib/components/ClassPrefix/index.js +0 -2
- package/lib/components/CodeSnippet/CodeSnippet.Skeleton.js +0 -5
- package/lib/components/CodeSnippet/CodeSnippet.js +6 -45
- package/lib/components/ComboBox/ComboBox.js +19 -86
- package/lib/components/ComboBox/tools/filter.js +0 -1
- package/lib/components/ComboButton/index.js +0 -14
- package/lib/components/ComposedModal/ComposedModal.js +2 -32
- package/lib/components/ComposedModal/ModalFooter.js +0 -21
- package/lib/components/ComposedModal/ModalHeader.js +0 -12
- package/lib/components/ContainedList/ContainedList.js +5 -32
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +0 -6
- package/lib/components/ContentSwitcher/ContentSwitcher.js +11 -23
- package/lib/components/ContextMenu/useContextMenu.js +1 -6
- package/lib/components/Copy/Copy.js +8 -50
- package/lib/components/CopyButton/CopyButton.js +0 -4
- package/lib/components/DangerButton/DangerButton.js +0 -1
- package/lib/components/DataTable/DataTable.js +171 -91
- package/lib/components/DataTable/Table.js +0 -6
- package/lib/components/DataTable/TableBatchAction.js +0 -4
- package/lib/components/DataTable/TableBatchActions.js +0 -8
- package/lib/components/DataTable/TableBody.js +0 -1
- package/lib/components/DataTable/TableContainer.js +0 -5
- package/lib/components/DataTable/TableExpandHeader.js +0 -7
- package/lib/components/DataTable/TableExpandRow.js +0 -6
- package/lib/components/DataTable/TableExpandedRow.js +0 -6
- package/lib/components/DataTable/TableHeader.d.ts +1 -1
- package/lib/components/DataTable/TableHeader.js +3 -19
- package/lib/components/DataTable/TableRow.js +4 -5
- package/lib/components/DataTable/TableSelectAll.js +0 -8
- package/lib/components/DataTable/TableSelectRow.js +2 -10
- package/lib/components/DataTable/TableToolbar.js +0 -3
- package/lib/components/DataTable/TableToolbarMenu.d.ts +1 -1
- package/lib/components/DataTable/TableToolbarMenu.js +3 -6
- package/lib/components/DataTable/TableToolbarSearch.js +2 -30
- package/lib/components/DataTable/state/getDerivedStateFromProps.js +0 -4
- package/lib/components/DataTable/state/sorting.js +5 -8
- package/lib/components/DataTable/tools/denormalize.js +2 -2
- package/lib/components/DataTable/tools/filter.js +0 -2
- package/lib/components/DataTable/tools/instanceId.js +0 -1
- package/lib/components/DataTable/tools/normalize.js +10 -10
- package/lib/components/DataTable/tools/sorting.js +5 -13
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +5 -20
- package/lib/components/DatePicker/DatePicker.Skeleton.js +0 -6
- package/lib/components/DatePicker/DatePicker.js +153 -175
- package/lib/components/DatePicker/plugins/appendToPlugin.js +3 -7
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +14 -25
- package/lib/components/DatePicker/plugins/rangePlugin.js +2 -7
- package/lib/components/DatePickerInput/DatePickerInput.js +2 -28
- package/lib/components/Dropdown/Dropdown.Skeleton.js +0 -2
- package/lib/components/Dropdown/Dropdown.js +50 -59
- package/lib/components/ErrorBoundary/ErrorBoundary.js +0 -10
- package/lib/components/ErrorBoundary/ErrorBoundaryContext.js +0 -1
- package/lib/components/ExpandableSearch/ExpandableSearch.js +1 -10
- package/lib/components/FeatureFlags/index.js +8 -20
- package/lib/components/FileUploader/FileUploader.Skeleton.js +0 -2
- package/lib/components/FileUploader/FileUploader.js +3 -57
- package/lib/components/FileUploader/FileUploaderButton.js +3 -43
- package/lib/components/FileUploader/FileUploaderDropContainer.js +1 -28
- package/lib/components/FileUploader/FileUploaderItem.js +5 -31
- package/lib/components/FileUploader/Filename.js +6 -10
- package/lib/components/FluidComboBox/FluidComboBox.Skeleton.js +0 -1
- package/lib/components/FluidComboBox/FluidComboBox.js +0 -18
- package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.js +0 -2
- package/lib/components/FluidDatePicker/FluidDatePicker.js +0 -6
- package/lib/components/FluidDatePickerInput/FluidDatePickerInput.js +2 -1
- package/lib/components/FluidDropdown/FluidDropdown.Skeleton.js +0 -1
- package/lib/components/FluidDropdown/FluidDropdown.js +0 -18
- package/lib/components/FluidForm/FluidForm.js +0 -2
- package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +0 -1
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +0 -19
- package/lib/components/FluidSelect/FluidSelect.Skeleton.js +0 -1
- package/lib/components/FluidSelect/FluidSelect.js +0 -10
- package/lib/components/FluidTextArea/FluidTextArea.Skeleton.js +0 -1
- package/lib/components/FluidTextArea/FluidTextArea.js +0 -20
- package/lib/components/FluidTextInput/FluidTextInput.Skeleton.js +0 -1
- package/lib/components/FluidTextInput/FluidTextInput.js +0 -14
- package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +0 -3
- package/lib/components/FluidTimePicker/FluidTimePicker.js +1 -11
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +0 -6
- package/lib/components/Form/Form.d.ts +23 -0
- package/lib/components/Form/Form.js +3 -6
- package/lib/components/Form/index.d.ts +7 -0
- package/lib/components/FormGroup/FormGroup.js +0 -7
- package/lib/components/FormItem/FormItem.js +0 -2
- package/lib/components/FormLabel/FormLabel.js +1 -26
- package/lib/components/Grid/CSSGrid.js +2 -15
- package/lib/components/Grid/Column.js +18 -59
- package/lib/components/Grid/ColumnHang.js +2 -5
- package/lib/components/Grid/FlexGrid.js +2 -8
- package/lib/components/Grid/Grid.js +0 -8
- package/lib/components/Grid/GridContext.js +1 -3
- package/lib/components/Grid/Row.js +2 -7
- package/lib/components/Heading/index.js +0 -4
- package/lib/components/Icon/Icon.Skeleton.js +2 -2
- package/lib/components/IconButton/index.js +0 -10
- package/lib/components/IdPrefix/index.js +0 -2
- package/lib/components/InlineCheckbox/InlineCheckbox.js +0 -14
- package/lib/components/InlineLoading/InlineLoading.js +0 -12
- package/lib/components/Layer/index.js +3 -6
- package/lib/components/Layout/LayoutDirection.js +0 -3
- package/lib/components/Layout/useLayoutDirection.js +0 -1
- package/lib/components/Link/Link.js +3 -10
- package/lib/components/ListBox/ListBox.js +2 -13
- package/lib/components/ListBox/ListBoxField.js +0 -5
- package/lib/components/ListBox/ListBoxMenuIcon.js +0 -4
- package/lib/components/ListBox/ListBoxMenuItem.js +2 -6
- package/lib/components/ListBox/ListBoxPropTypes.d.ts +2 -2
- package/lib/components/ListBox/ListBoxSelection.js +1 -13
- package/lib/components/ListBox/next/ListBoxSelection.js +1 -14
- package/lib/components/ListBox/next/ListBoxTrigger.js +1 -3
- package/lib/components/ListItem/ListItem.d.ts +23 -0
- package/lib/components/ListItem/ListItem.js +4 -8
- package/lib/components/ListItem/index.d.ts +7 -0
- package/lib/components/Loading/Loading.js +0 -6
- package/lib/components/Menu/Menu.js +22 -40
- package/lib/components/Menu/MenuContext.js +4 -5
- package/lib/components/Menu/MenuItem.js +5 -39
- package/lib/components/MenuButton/index.js +0 -9
- package/lib/components/Modal/Modal.js +1 -46
- package/lib/components/ModalWrapper/ModalWrapper.js +2 -15
- package/lib/components/MultiSelect/FilterableMultiSelect.js +8 -66
- package/lib/components/MultiSelect/MultiSelect.js +30 -78
- package/lib/components/MultiSelect/MultiSelectPropTypes.js +0 -1
- package/lib/components/MultiSelect/index.js +0 -1
- package/lib/components/MultiSelect/tools/itemToString.js +0 -2
- package/lib/components/MultiSelect/tools/sorting.js +3 -4
- package/lib/components/Notification/Notification.js +0 -78
- package/lib/components/NumberInput/NumberInput.Skeleton.js +0 -2
- package/lib/components/NumberInput/NumberInput.js +3 -60
- package/lib/components/OrderedList/OrderedList.d.ts +39 -0
- package/lib/components/OrderedList/OrderedList.js +7 -19
- package/lib/components/OrderedList/index.d.ts +7 -0
- package/lib/components/OverflowMenu/OverflowMenu.js +65 -86
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +6 -23
- package/lib/components/OverflowMenuV2/index.js +0 -5
- package/lib/components/Pagination/Pagination.Skeleton.js +0 -2
- package/lib/components/Pagination/Pagination.js +11 -47
- package/lib/components/Pagination/experimental/PageSelector.js +0 -10
- package/lib/components/Pagination/experimental/Pagination.js +2 -67
- package/lib/components/PaginationNav/PaginationNav.js +15 -78
- package/lib/components/Popover/index.d.ts +14 -8
- package/lib/components/Popover/index.js +44 -48
- package/lib/components/PrimaryButton/PrimaryButton.js +0 -1
- package/lib/components/ProgressBar/ProgressBar.js +0 -15
- package/lib/components/ProgressIndicator/ProgressIndicator.Skeleton.js +0 -4
- package/lib/components/ProgressIndicator/ProgressIndicator.js +2 -40
- package/lib/components/RadioButton/RadioButton.Skeleton.js +0 -1
- package/lib/components/RadioButton/RadioButton.js +0 -13
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +3 -23
- package/lib/components/RadioTile/RadioTile.js +0 -12
- package/lib/components/Search/Search.Skeleton.js +0 -2
- package/lib/components/Search/Search.js +1 -28
- package/lib/components/SecondaryButton/SecondaryButton.js +0 -1
- package/lib/components/Select/Select.Skeleton.js +0 -2
- package/lib/components/Select/Select.d.ts +1 -1
- package/lib/components/Select/Select.js +6 -33
- package/lib/components/SelectItem/SelectItem.js +0 -5
- package/lib/components/SelectItemGroup/SelectItemGroup.d.ts +0 -1
- package/lib/components/SelectItemGroup/SelectItemGroup.js +1 -26
- package/lib/components/SkeletonIcon/SkeletonIcon.js +0 -2
- package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +0 -1
- package/lib/components/SkeletonText/SkeletonText.js +0 -12
- package/lib/components/Slider/Slider.Skeleton.js +0 -2
- package/lib/components/Slider/Slider.d.ts +0 -1
- package/lib/components/Slider/Slider.js +112 -154
- package/lib/components/Stack/Stack.js +1 -8
- package/lib/components/StructuredList/StructuredList.Skeleton.js +0 -5
- package/lib/components/StructuredList/StructuredList.js +1 -25
- package/lib/components/Switch/IconSwitch.js +0 -18
- package/lib/components/Switch/Switch.js +0 -11
- package/lib/components/TabContent/TabContent.js +2 -6
- package/lib/components/Tabs/Tabs.Skeleton.js +0 -4
- package/lib/components/Tabs/Tabs.js +133 -102
- package/lib/components/Tabs/usePressable.js +18 -31
- package/lib/components/Tag/Tag.Skeleton.js +0 -2
- package/lib/components/Tag/Tag.js +0 -15
- package/lib/components/Text/Text.js +5 -18
- package/lib/components/Text/TextDirection.js +0 -3
- package/lib/components/Text/TextDirectionContext.js +0 -1
- package/lib/components/Text/createTextComponent.js +0 -3
- package/lib/components/TextArea/TextArea.Skeleton.js +0 -2
- package/lib/components/TextArea/TextArea.js +10 -32
- package/lib/components/TextInput/ControlledPasswordInput.js +0 -20
- package/lib/components/TextInput/PasswordInput.js +0 -25
- package/lib/components/TextInput/TextInput.Skeleton.js +0 -2
- package/lib/components/TextInput/TextInput.d.ts +1 -1
- package/lib/components/TextInput/TextInput.js +5 -52
- package/lib/components/TextInput/util.js +3 -5
- package/lib/components/Theme/index.js +1 -6
- package/lib/components/Tile/Tile.js +31 -58
- package/lib/components/TileGroup/TileGroup.js +1 -22
- package/lib/components/TimePicker/TimePicker.js +6 -32
- package/lib/components/TimePickerSelect/TimePickerSelect.js +2 -5
- package/lib/components/Toggle/Toggle.Skeleton.js +0 -8
- package/lib/components/Toggle/Toggle.js +0 -16
- package/lib/components/ToggleSmall/ToggleSmall.Skeleton.js +0 -7
- package/lib/components/Toggletip/index.d.ts +148 -0
- package/lib/components/Toggletip/index.js +20 -44
- package/lib/components/Tooltip/DefinitionTooltip.js +0 -11
- package/lib/components/Tooltip/Tooltip.d.ts +1 -1
- package/lib/components/Tooltip/Tooltip.js +4 -21
- package/lib/components/TreeView/TreeNode.js +21 -66
- package/lib/components/TreeView/TreeView.js +11 -67
- package/lib/components/UIShell/Content.js +2 -4
- package/lib/components/UIShell/Header.js +0 -2
- package/lib/components/UIShell/HeaderContainer.d.ts +33 -0
- package/lib/components/UIShell/HeaderContainer.js +13 -11
- package/lib/components/UIShell/HeaderGlobalAction.js +0 -6
- package/lib/components/UIShell/HeaderGlobalBar.js +0 -1
- package/lib/components/UIShell/HeaderMenu.js +32 -31
- package/lib/components/UIShell/HeaderMenuButton.js +2 -4
- package/lib/components/UIShell/HeaderMenuItem.js +0 -8
- package/lib/components/UIShell/HeaderName.js +0 -5
- package/lib/components/UIShell/HeaderNavigation.js +0 -2
- package/lib/components/UIShell/HeaderPanel.js +0 -2
- package/lib/components/UIShell/HeaderSideNavItems.js +0 -2
- package/lib/components/UIShell/Link.js +2 -3
- package/lib/components/UIShell/SideNav.d.ts +3 -1
- package/lib/components/UIShell/SideNav.js +43 -35
- package/lib/components/UIShell/SideNavDetails.js +0 -3
- package/lib/components/UIShell/SideNavDivider.js +0 -1
- package/lib/components/UIShell/SideNavFooter.js +1 -4
- package/lib/components/UIShell/SideNavHeader.js +0 -4
- package/lib/components/UIShell/SideNavIcon.js +0 -3
- package/lib/components/UIShell/SideNavItem.js +0 -3
- package/lib/components/UIShell/SideNavItems.js +2 -6
- package/lib/components/UIShell/SideNavLink.js +3 -7
- package/lib/components/UIShell/SideNavLinkText.js +0 -2
- package/lib/components/UIShell/SideNavMenu.js +0 -16
- package/lib/components/UIShell/SideNavMenuItem.js +0 -2
- package/lib/components/UIShell/SideNavSwitcher.js +2 -5
- package/lib/components/UIShell/SkipToContent.d.ts +32 -0
- package/lib/components/UIShell/SkipToContent.js +8 -15
- package/lib/components/UIShell/Switcher.js +0 -2
- package/lib/components/UIShell/SwitcherDivider.js +0 -1
- package/lib/components/UIShell/SwitcherItem.js +0 -3
- package/lib/components/UnorderedList/UnorderedList.d.ts +34 -0
- package/lib/components/UnorderedList/UnorderedList.js +6 -16
- package/lib/components/UnorderedList/index.d.ts +7 -0
- package/lib/index.js +42 -43
- package/lib/internal/ClickListener.js +3 -13
- package/lib/internal/FloatingMenu.js +57 -63
- package/lib/internal/OptimizedResize.js +6 -12
- package/lib/internal/Selection.js +2 -25
- package/lib/internal/createClassWrapper.js +0 -2
- package/lib/internal/deprecateFieldOnObject.js +0 -4
- package/lib/internal/focus/index.js +0 -1
- package/lib/internal/keyboard/keys.js +2 -1
- package/lib/internal/keyboard/match.js +1 -6
- package/lib/internal/keyboard/navigation.js +8 -7
- package/lib/internal/useAnnouncer.js +0 -1
- package/lib/internal/useAttachedMenu.js +1 -9
- package/lib/internal/useControllableState.js +6 -13
- package/lib/internal/useDelayedState.js +2 -4
- package/lib/internal/useEffectOnce.js +0 -1
- package/lib/internal/useEvent.js +61 -2
- package/lib/internal/useId.js +2 -5
- package/lib/internal/useIsomorphicEffect.js +1 -0
- package/lib/internal/useMergedRefs.js +2 -2
- package/lib/internal/useNoInteractiveChildren.js +2 -13
- package/lib/internal/useNormalizedInputProps.js +0 -3
- package/lib/internal/useSavedCallback.js +0 -1
- package/lib/internal/warning.js +0 -3
- package/lib/internal/wrapFocus.js +1 -8
- package/lib/prop-types/deprecate.js +2 -5
- package/lib/prop-types/isRequiredOneOf.js +2 -5
- package/lib/prop-types/requiredIfGivenPropIsTruthy.js +0 -2
- package/lib/tools/array.js +0 -3
- package/lib/tools/events.js +0 -3
- package/lib/tools/mergeRefs.js +0 -2
- package/lib/tools/wrapComponent.js +2 -5
- package/package.json +9 -9
- package/es/components/Tab/Tab.js +0 -185
- package/es/components/Tab/index.js +0 -14
- package/es/components/TimePickerSelect/index.js +0 -13
- package/lib/components/Form/index.js +0 -17
- package/lib/components/Tab/Tab.js +0 -214
- package/lib/components/Tab/index.js +0 -39
- package/lib/components/TimePickerSelect/index.js +0 -38
|
@@ -28,8 +28,8 @@ function FlexGrid(_ref) {
|
|
|
28
28
|
[`${prefix}--grid--condensed`]: condensed,
|
|
29
29
|
[`${prefix}--grid--narrow`]: narrow,
|
|
30
30
|
[`${prefix}--grid--full-width`]: fullWidth
|
|
31
|
-
});
|
|
32
|
-
|
|
31
|
+
});
|
|
32
|
+
// cast as any to let TypeScript allow passing in attributes to base component
|
|
33
33
|
const BaseComponentAsAny = BaseComponent;
|
|
34
34
|
return /*#__PURE__*/React__default.createElement(GridSettings, {
|
|
35
35
|
mode: "flexbox",
|
|
@@ -38,34 +38,28 @@ function FlexGrid(_ref) {
|
|
|
38
38
|
className: className
|
|
39
39
|
}, rest), children));
|
|
40
40
|
}
|
|
41
|
-
|
|
42
41
|
FlexGrid.propTypes = {
|
|
43
42
|
/**
|
|
44
43
|
* Provide a custom element to render instead of the default <div>
|
|
45
44
|
*/
|
|
46
45
|
as: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),
|
|
47
|
-
|
|
48
46
|
/**
|
|
49
47
|
* Pass in content that will be rendered within the `FlexGrid`
|
|
50
48
|
*/
|
|
51
49
|
children: PropTypes.node,
|
|
52
|
-
|
|
53
50
|
/**
|
|
54
51
|
* Specify a custom className to be applied to the `FlexGrid`
|
|
55
52
|
*/
|
|
56
53
|
className: PropTypes.string,
|
|
57
|
-
|
|
58
54
|
/**
|
|
59
55
|
* Collapse the gutter to 1px. Useful for fluid layouts.
|
|
60
56
|
* Rows have 1px of margin between them to match gutter.
|
|
61
57
|
*/
|
|
62
58
|
condensed: PropTypes.bool,
|
|
63
|
-
|
|
64
59
|
/**
|
|
65
60
|
* Remove the default max width that the grid has set
|
|
66
61
|
*/
|
|
67
62
|
fullWidth: PropTypes.bool,
|
|
68
|
-
|
|
69
63
|
/**
|
|
70
64
|
* Container hangs 16px into the gutter. Useful for
|
|
71
65
|
* typographic alignment with and without containers.
|
|
@@ -13,41 +13,33 @@ import { FlexGrid as FlexGridComponent } from './FlexGrid.js';
|
|
|
13
13
|
|
|
14
14
|
function Grid(props) {
|
|
15
15
|
const enableCSSGrid = useFeatureFlag('enable-css-grid');
|
|
16
|
-
|
|
17
16
|
if (enableCSSGrid) {
|
|
18
17
|
return /*#__PURE__*/React__default.createElement(CSSGridComponent, props);
|
|
19
18
|
}
|
|
20
|
-
|
|
21
19
|
return /*#__PURE__*/React__default.createElement(FlexGridComponent, props);
|
|
22
20
|
}
|
|
23
|
-
|
|
24
21
|
Grid.propTypes = {
|
|
25
22
|
/**
|
|
26
23
|
* Provide a custom element to render instead of the default <div>
|
|
27
24
|
*/
|
|
28
25
|
as: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),
|
|
29
|
-
|
|
30
26
|
/**
|
|
31
27
|
* Pass in content that will be rendered within the `Grid`
|
|
32
28
|
*/
|
|
33
29
|
children: PropTypes.node,
|
|
34
|
-
|
|
35
30
|
/**
|
|
36
31
|
* Specify a custom className to be applied to the `Grid`
|
|
37
32
|
*/
|
|
38
33
|
className: PropTypes.string,
|
|
39
|
-
|
|
40
34
|
/**
|
|
41
35
|
* Collapse the gutter to 1px. Useful for fluid layouts.
|
|
42
36
|
* Rows have 1px of margin between them to match gutter.
|
|
43
37
|
*/
|
|
44
38
|
condensed: PropTypes.bool,
|
|
45
|
-
|
|
46
39
|
/**
|
|
47
40
|
* Remove the default max width that the grid has set
|
|
48
41
|
*/
|
|
49
42
|
fullWidth: PropTypes.bool,
|
|
50
|
-
|
|
51
43
|
/**
|
|
52
44
|
* Container hangs 16px into the gutter. Useful for
|
|
53
45
|
* typographic alignment with and without containers.
|
|
@@ -39,21 +39,19 @@ GridSettings.propTypes = {
|
|
|
39
39
|
* component
|
|
40
40
|
*/
|
|
41
41
|
children: PropTypes.node,
|
|
42
|
-
|
|
43
42
|
/**
|
|
44
43
|
* Specify the grid mode for the GridContext
|
|
45
44
|
*/
|
|
46
45
|
mode: PropTypes.oneOf(gridModes).isRequired,
|
|
47
|
-
|
|
48
46
|
/**
|
|
49
47
|
* Specify whether subgrid should be enabled
|
|
50
48
|
*/
|
|
51
49
|
subgrid: PropTypes.bool
|
|
52
50
|
};
|
|
51
|
+
|
|
53
52
|
/**
|
|
54
53
|
* Helper function for accessing the GridContext value
|
|
55
54
|
*/
|
|
56
|
-
|
|
57
55
|
const useGridSettings = () => {
|
|
58
56
|
return React.useContext(GridSettingsContext);
|
|
59
57
|
};
|
|
@@ -25,36 +25,31 @@ function Row(_ref) {
|
|
|
25
25
|
[`${prefix}--row`]: true,
|
|
26
26
|
[`${prefix}--row--condensed`]: condensed,
|
|
27
27
|
[`${prefix}--row--narrow`]: narrow
|
|
28
|
-
});
|
|
29
|
-
|
|
28
|
+
});
|
|
29
|
+
// TypeScript type validation reports conflicts on different instances of keyof JSX.IntrinsicElements
|
|
30
30
|
const BaseComponentAsAny = BaseComponent;
|
|
31
31
|
return /*#__PURE__*/React__default.createElement(BaseComponentAsAny, _extends({
|
|
32
32
|
className: className
|
|
33
33
|
}, rest), children);
|
|
34
34
|
}
|
|
35
|
-
|
|
36
35
|
Row.propTypes = {
|
|
37
36
|
/**
|
|
38
37
|
* Provide a custom element to render instead of the default <div>
|
|
39
38
|
*/
|
|
40
39
|
as: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),
|
|
41
|
-
|
|
42
40
|
/**
|
|
43
41
|
* Pass in content that will be rendered within the `Row`
|
|
44
42
|
*/
|
|
45
43
|
children: PropTypes.node,
|
|
46
|
-
|
|
47
44
|
/**
|
|
48
45
|
* Specify a custom className to be applied to the `Row`
|
|
49
46
|
*/
|
|
50
47
|
className: PropTypes.string,
|
|
51
|
-
|
|
52
48
|
/**
|
|
53
49
|
* Specify a single row as condensed.Rows that are adjacent
|
|
54
50
|
* and are condensed will have 2px of margin between them to match gutter.
|
|
55
51
|
*/
|
|
56
52
|
condensed: PropTypes.bool,
|
|
57
|
-
|
|
58
53
|
/**
|
|
59
54
|
* Specify a single row as narrow. The container will hang
|
|
60
55
|
* 16px into the gutter.
|
|
@@ -28,17 +28,14 @@ Section.propTypes = {
|
|
|
28
28
|
* <section> element
|
|
29
29
|
*/
|
|
30
30
|
as: PropTypes.elementType,
|
|
31
|
-
|
|
32
31
|
/**
|
|
33
32
|
* Specify the content that will be placed in the component
|
|
34
33
|
*/
|
|
35
34
|
children: PropTypes.node,
|
|
36
|
-
|
|
37
35
|
/**
|
|
38
36
|
* Specify a class name for the outermost node of the component
|
|
39
37
|
*/
|
|
40
38
|
className: PropTypes.string,
|
|
41
|
-
|
|
42
39
|
/**
|
|
43
40
|
* Overrides the level of the section
|
|
44
41
|
*/
|
|
@@ -53,7 +50,6 @@ Heading.propTypes = {
|
|
|
53
50
|
* Specify the content that will be placed in the component
|
|
54
51
|
*/
|
|
55
52
|
children: PropTypes.node,
|
|
56
|
-
|
|
57
53
|
/**
|
|
58
54
|
* Specify a class name for the outermost node of the component
|
|
59
55
|
*/
|
|
@@ -17,13 +17,13 @@ const IconSkeleton = _ref => {
|
|
|
17
17
|
...rest
|
|
18
18
|
} = _ref;
|
|
19
19
|
const prefix = usePrefix();
|
|
20
|
-
const props = {
|
|
20
|
+
const props = {
|
|
21
|
+
...rest
|
|
21
22
|
};
|
|
22
23
|
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
23
24
|
className: cx(`${prefix}--icon--skeleton`, className)
|
|
24
25
|
}, props));
|
|
25
26
|
};
|
|
26
|
-
|
|
27
27
|
IconSkeleton.propTypes = {
|
|
28
28
|
/**
|
|
29
29
|
* Specify an optional className to add.
|
|
@@ -51,37 +51,30 @@ IconButton.propTypes = {
|
|
|
51
51
|
* Specify how the trigger should align with the tooltip
|
|
52
52
|
*/
|
|
53
53
|
align: PropTypes.oneOf(['top', 'top-left', 'top-right', 'bottom', 'bottom-left', 'bottom-right', 'left', 'right']),
|
|
54
|
-
|
|
55
54
|
/**
|
|
56
55
|
* Provide an icon or asset to be rendered inside of the IconButton
|
|
57
56
|
*/
|
|
58
57
|
children: PropTypes.node,
|
|
59
|
-
|
|
60
58
|
/**
|
|
61
59
|
* Specify an optional className to be added to your Button
|
|
62
60
|
*/
|
|
63
61
|
className: PropTypes.string,
|
|
64
|
-
|
|
65
62
|
/**
|
|
66
63
|
* Determines whether the tooltip should close when inner content is activated (click, Enter or Space)
|
|
67
64
|
*/
|
|
68
65
|
closeOnActivation: PropTypes.bool,
|
|
69
|
-
|
|
70
66
|
/**
|
|
71
67
|
* Specify whether the tooltip should be open when it first renders
|
|
72
68
|
*/
|
|
73
69
|
defaultOpen: PropTypes.bool,
|
|
74
|
-
|
|
75
70
|
/**
|
|
76
71
|
* Specify the duration in milliseconds to delay before displaying the tooltip
|
|
77
72
|
*/
|
|
78
73
|
enterDelayMs: PropTypes.number,
|
|
79
|
-
|
|
80
74
|
/**
|
|
81
75
|
* Specify the type of button to be used as the base for the IconButton
|
|
82
76
|
*/
|
|
83
77
|
kind: PropTypes.oneOf(['primary', 'secondary', 'ghost', 'tertiary']),
|
|
84
|
-
|
|
85
78
|
/**
|
|
86
79
|
* Provide the label to be rendered inside of the Tooltip. The label will use
|
|
87
80
|
* `aria-labelledby` and will fully describe the child node that is provided.
|
|
@@ -89,17 +82,14 @@ IconButton.propTypes = {
|
|
|
89
82
|
* announced to the screen reader.
|
|
90
83
|
*/
|
|
91
84
|
label: PropTypes.node.isRequired,
|
|
92
|
-
|
|
93
85
|
/**
|
|
94
86
|
* Specify the duration in milliseconds to delay before hiding the tooltip
|
|
95
87
|
*/
|
|
96
88
|
leaveDelayMs: PropTypes.number,
|
|
97
|
-
|
|
98
89
|
/**
|
|
99
90
|
* Specify the size of the Button. Defaults to `md`.
|
|
100
91
|
*/
|
|
101
92
|
size: PropTypes.oneOf(['sm', 'md', 'lg']),
|
|
102
|
-
|
|
103
93
|
/**
|
|
104
94
|
* Specify an optional className to be added to your Tooltip wrapper
|
|
105
95
|
*/
|
|
@@ -12,7 +12,6 @@ import { usePrefix } from '../../internal/usePrefix.js';
|
|
|
12
12
|
import { useMergedRefs } from '../../internal/useMergedRefs.js';
|
|
13
13
|
|
|
14
14
|
/** @type any */
|
|
15
|
-
|
|
16
15
|
const InlineCheckbox = /*#__PURE__*/React__default.forwardRef(function InlineCheckbox(props, forwardRef) {
|
|
17
16
|
const {
|
|
18
17
|
['aria-label']: ariaLabel,
|
|
@@ -44,11 +43,9 @@ const InlineCheckbox = /*#__PURE__*/React__default.forwardRef(function InlineChe
|
|
|
44
43
|
ref,
|
|
45
44
|
type: 'checkbox'
|
|
46
45
|
};
|
|
47
|
-
|
|
48
46
|
if (indeterminate) {
|
|
49
47
|
inputProps.checked = false;
|
|
50
48
|
}
|
|
51
|
-
|
|
52
49
|
useEffect(() => {
|
|
53
50
|
inputRef.current.indeterminate = indeterminate;
|
|
54
51
|
}, [indeterminate]);
|
|
@@ -56,7 +53,6 @@ const InlineCheckbox = /*#__PURE__*/React__default.forwardRef(function InlineChe
|
|
|
56
53
|
className: `${prefix}--checkbox--inline`
|
|
57
54
|
}, /*#__PURE__*/React__default.createElement("input", inputProps),
|
|
58
55
|
/*#__PURE__*/
|
|
59
|
-
|
|
60
56
|
/* 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 */
|
|
61
57
|
React__default.createElement("label", {
|
|
62
58
|
htmlFor: id,
|
|
@@ -73,53 +69,43 @@ InlineCheckbox.propTypes = {
|
|
|
73
69
|
* Specify the label for the control
|
|
74
70
|
*/
|
|
75
71
|
['aria-label']: PropTypes.string.isRequired,
|
|
76
|
-
|
|
77
72
|
/**
|
|
78
73
|
* Deprecated, please use `aria-label` instead.
|
|
79
74
|
* Specify the label for the control
|
|
80
75
|
*/
|
|
81
76
|
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
77
|
/**
|
|
84
78
|
* Specify whether the underlying control is checked, or not
|
|
85
79
|
*/
|
|
86
80
|
checked: PropTypes.bool,
|
|
87
|
-
|
|
88
81
|
/**
|
|
89
82
|
* Specify whether the underlying input control should be disabled
|
|
90
83
|
*/
|
|
91
84
|
disabled: PropTypes.bool,
|
|
92
|
-
|
|
93
85
|
/**
|
|
94
86
|
* Provide an `id` for the underlying input control
|
|
95
87
|
*/
|
|
96
88
|
id: PropTypes.string.isRequired,
|
|
97
|
-
|
|
98
89
|
/**
|
|
99
90
|
* Specify whether the control is in an indterminate state
|
|
100
91
|
*/
|
|
101
92
|
indeterminate: PropTypes.bool,
|
|
102
|
-
|
|
103
93
|
/**
|
|
104
94
|
* Provide a `name` for the underlying input control
|
|
105
95
|
*/
|
|
106
96
|
name: PropTypes.string.isRequired,
|
|
107
|
-
|
|
108
97
|
/**
|
|
109
98
|
* Provide an optional hook that is called each time the input is updated
|
|
110
99
|
*/
|
|
111
100
|
onChange: PropTypes.func,
|
|
112
|
-
|
|
113
101
|
/**
|
|
114
102
|
* Provide a handler that is invoked when a user clicks on the control
|
|
115
103
|
*/
|
|
116
104
|
onClick: PropTypes.func,
|
|
117
|
-
|
|
118
105
|
/**
|
|
119
106
|
* Provide a handler that is invoked on the key down event for the control
|
|
120
107
|
*/
|
|
121
108
|
onKeyDown: PropTypes.func,
|
|
122
|
-
|
|
123
109
|
/**
|
|
124
110
|
* Provide an optional tooltip for the InlineCheckbox
|
|
125
111
|
*/
|
|
@@ -25,16 +25,13 @@ function InlineLoading(_ref) {
|
|
|
25
25
|
} = _ref;
|
|
26
26
|
const prefix = usePrefix();
|
|
27
27
|
const loadingClasses = cx(`${prefix}--inline-loading`, className);
|
|
28
|
-
|
|
29
28
|
const getLoading = () => {
|
|
30
29
|
let iconLabel = iconDescription ? iconDescription : status;
|
|
31
|
-
|
|
32
30
|
if (status === 'error') {
|
|
33
31
|
return /*#__PURE__*/React__default.createElement(ErrorFilled, {
|
|
34
32
|
className: `${prefix}--inline-loading--error`
|
|
35
33
|
}, /*#__PURE__*/React__default.createElement("title", null, iconLabel));
|
|
36
34
|
}
|
|
37
|
-
|
|
38
35
|
if (status === 'finished') {
|
|
39
36
|
setTimeout(() => {
|
|
40
37
|
if (onSuccess) {
|
|
@@ -45,12 +42,10 @@ function InlineLoading(_ref) {
|
|
|
45
42
|
className: `${prefix}--inline-loading__checkmark-container`
|
|
46
43
|
}, /*#__PURE__*/React__default.createElement("title", null, iconLabel));
|
|
47
44
|
}
|
|
48
|
-
|
|
49
45
|
if (status === 'inactive' || status === 'active') {
|
|
50
46
|
if (!iconDescription) {
|
|
51
47
|
iconLabel = status === 'active' ? 'loading' : 'not loading';
|
|
52
48
|
}
|
|
53
|
-
|
|
54
49
|
return /*#__PURE__*/React__default.createElement(Loading, {
|
|
55
50
|
small: true,
|
|
56
51
|
description: iconLabel,
|
|
@@ -58,10 +53,8 @@ function InlineLoading(_ref) {
|
|
|
58
53
|
active: status === 'active'
|
|
59
54
|
});
|
|
60
55
|
}
|
|
61
|
-
|
|
62
56
|
return undefined;
|
|
63
57
|
};
|
|
64
|
-
|
|
65
58
|
const loadingText = /*#__PURE__*/React__default.createElement("div", {
|
|
66
59
|
className: `${prefix}--inline-loading__text`
|
|
67
60
|
}, description);
|
|
@@ -80,28 +73,23 @@ InlineLoading.propTypes = {
|
|
|
80
73
|
* Specify a custom className to be applied to the container node
|
|
81
74
|
*/
|
|
82
75
|
className: PropTypes.string,
|
|
83
|
-
|
|
84
76
|
/**
|
|
85
77
|
* Specify the description for the inline loading text
|
|
86
78
|
*/
|
|
87
79
|
description: PropTypes.node,
|
|
88
|
-
|
|
89
80
|
/**
|
|
90
81
|
* Specify the description for the inline loading text
|
|
91
82
|
*/
|
|
92
83
|
iconDescription: PropTypes.string,
|
|
93
|
-
|
|
94
84
|
/**
|
|
95
85
|
* Provide an optional handler to be invoked when <InlineLoading> is
|
|
96
86
|
* successful
|
|
97
87
|
*/
|
|
98
88
|
onSuccess: PropTypes.func,
|
|
99
|
-
|
|
100
89
|
/**
|
|
101
90
|
* Specify the loading status
|
|
102
91
|
*/
|
|
103
92
|
status: PropTypes.oneOf(['inactive', 'active', 'finished', 'error']),
|
|
104
|
-
|
|
105
93
|
/**
|
|
106
94
|
* Provide a delay for the `setTimeout` for success
|
|
107
95
|
*/
|
|
@@ -14,12 +14,12 @@ import { LayerContext } from './LayerContext.js';
|
|
|
14
14
|
|
|
15
15
|
const levels = ['one', 'two', 'three'];
|
|
16
16
|
const MAX_LEVEL = levels.length - 1;
|
|
17
|
+
|
|
17
18
|
/**
|
|
18
19
|
* A custom hook that will return information about the current layer. A common
|
|
19
20
|
* field to pull from this is the `level` for the layer that the component that
|
|
20
21
|
* calls this hook is currently in
|
|
21
22
|
*/
|
|
22
|
-
|
|
23
23
|
function useLayer() {
|
|
24
24
|
const level = React__default.useContext(LayerContext);
|
|
25
25
|
return {
|
|
@@ -37,8 +37,8 @@ function Layer(_ref) {
|
|
|
37
37
|
const contextLevel = React__default.useContext(LayerContext);
|
|
38
38
|
const level = overrideLevel ?? contextLevel;
|
|
39
39
|
const prefix = usePrefix();
|
|
40
|
-
const className = cx(`${prefix}--layer-${levels[level]}`, customClassName);
|
|
41
|
-
|
|
40
|
+
const className = cx(`${prefix}--layer-${levels[level]}`, customClassName);
|
|
41
|
+
// The level should be between 0 and MAX_LEVEL
|
|
42
42
|
const value = Math.max(0, Math.min(level + 1, MAX_LEVEL));
|
|
43
43
|
return /*#__PURE__*/React__default.createElement(LayerContext.Provider, {
|
|
44
44
|
value: value
|
|
@@ -52,18 +52,15 @@ Layer.propTypes = {
|
|
|
52
52
|
* element in the component
|
|
53
53
|
*/
|
|
54
54
|
as: PropTypes.oneOfType([PropTypes.func, PropTypes.string, PropTypes.elementType]),
|
|
55
|
-
|
|
56
55
|
/**
|
|
57
56
|
* Provide child elements to be rendered inside of `Theme`
|
|
58
57
|
*/
|
|
59
58
|
children: PropTypes.node,
|
|
60
|
-
|
|
61
59
|
/**
|
|
62
60
|
* Provide a custom class name to be used on the outermost element rendered by
|
|
63
61
|
* the component
|
|
64
62
|
*/
|
|
65
63
|
className: PropTypes.string,
|
|
66
|
-
|
|
67
64
|
/**
|
|
68
65
|
* Specify the layer level and override any existing levels based on hierarchy
|
|
69
66
|
*/
|
|
@@ -29,19 +29,16 @@ function LayoutDirection(_ref) {
|
|
|
29
29
|
dir: dir
|
|
30
30
|
}, rest), children));
|
|
31
31
|
}
|
|
32
|
-
|
|
33
32
|
LayoutDirection.propTypes = {
|
|
34
33
|
/**
|
|
35
34
|
* Customize the element type used to render the outermost node
|
|
36
35
|
*/
|
|
37
36
|
as: PropTypes.oneOfType([PropTypes.func, PropTypes.string, PropTypes.elementType]),
|
|
38
|
-
|
|
39
37
|
/**
|
|
40
38
|
* Provide child elements or components to be rendered inside of this
|
|
41
39
|
* component
|
|
42
40
|
*/
|
|
43
41
|
children: PropTypes.node,
|
|
44
|
-
|
|
45
42
|
/**
|
|
46
43
|
* Specify the layout direction of this part of the page
|
|
47
44
|
*/
|
|
@@ -34,16 +34,16 @@ const Link = /*#__PURE__*/React__default.forwardRef(function Link(_ref, ref) {
|
|
|
34
34
|
const linkProps = {
|
|
35
35
|
className,
|
|
36
36
|
rel
|
|
37
|
-
};
|
|
38
|
-
// https://www.scottohara.me/blog/2021/05/28/disabled-links.html
|
|
37
|
+
};
|
|
39
38
|
|
|
39
|
+
// Reference for disabled links:
|
|
40
|
+
// https://www.scottohara.me/blog/2021/05/28/disabled-links.html
|
|
40
41
|
if (!disabled) {
|
|
41
42
|
linkProps.href = href;
|
|
42
43
|
} else {
|
|
43
44
|
linkProps.role = 'link';
|
|
44
45
|
linkProps['aria-disabled'] = true;
|
|
45
46
|
}
|
|
46
|
-
|
|
47
47
|
return /*#__PURE__*/React__default.createElement("a", _extends({
|
|
48
48
|
ref: ref
|
|
49
49
|
}, linkProps, rest), children, !inline && Icon && /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -56,38 +56,31 @@ Link.propTypes = {
|
|
|
56
56
|
* Provide the content for the Link
|
|
57
57
|
*/
|
|
58
58
|
children: PropTypes.node,
|
|
59
|
-
|
|
60
59
|
/**
|
|
61
60
|
* Provide a custom className to be applied to the containing `<a>` node
|
|
62
61
|
*/
|
|
63
62
|
className: PropTypes.string,
|
|
64
|
-
|
|
65
63
|
/**
|
|
66
64
|
* Specify if the control should be disabled, or not
|
|
67
65
|
*/
|
|
68
66
|
disabled: PropTypes.bool,
|
|
69
|
-
|
|
70
67
|
/**
|
|
71
68
|
* Provide the `href` attribute for the `<a>` node
|
|
72
69
|
*/
|
|
73
70
|
href: PropTypes.string,
|
|
74
|
-
|
|
75
71
|
/**
|
|
76
72
|
* Specify whether you want the inline version of this control
|
|
77
73
|
*/
|
|
78
74
|
inline: PropTypes.bool,
|
|
79
|
-
|
|
80
75
|
/**
|
|
81
76
|
* Optional prop to render an icon next to the link.
|
|
82
77
|
* Can be a React component class
|
|
83
78
|
*/
|
|
84
79
|
renderIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
85
|
-
|
|
86
80
|
/**
|
|
87
81
|
* Specify the size of the Link. Currently supports either `sm`, 'md' (default) or 'lg` as an option.
|
|
88
82
|
*/
|
|
89
83
|
size: PropTypes.oneOf(['sm', 'md', 'lg']),
|
|
90
|
-
|
|
91
84
|
/**
|
|
92
85
|
* Specify whether you want the link to receive visited styles after the link has been clicked
|
|
93
86
|
*/
|
|
@@ -20,12 +20,10 @@ const handleOnKeyDown = event => {
|
|
|
20
20
|
event.stopPropagation();
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
|
-
|
|
24
23
|
const handleClick = event => {
|
|
25
24
|
event.preventDefault();
|
|
26
25
|
event.stopPropagation();
|
|
27
26
|
};
|
|
28
|
-
|
|
29
27
|
/**
|
|
30
28
|
* `ListBox` is a generic container component that handles creating the
|
|
31
29
|
* container class name in response to certain props.
|
|
@@ -50,7 +48,8 @@ const ListBox = /*#__PURE__*/React__default.forwardRef(function ListBox(_ref, re
|
|
|
50
48
|
isFluid
|
|
51
49
|
} = useContext(FormContext);
|
|
52
50
|
const showWarning = !invalid && warn;
|
|
53
|
-
const className = cx({
|
|
51
|
+
const className = cx({
|
|
52
|
+
...(containerClassName && {
|
|
54
53
|
[containerClassName]: true
|
|
55
54
|
}),
|
|
56
55
|
[`${prefix}--list-box`]: true,
|
|
@@ -82,54 +81,44 @@ ListBox.propTypes = {
|
|
|
82
81
|
* Provide the contents of your ListBox
|
|
83
82
|
*/
|
|
84
83
|
children: PropTypes.node,
|
|
85
|
-
|
|
86
84
|
/**
|
|
87
85
|
* Specify a class name to be applied on the containing list box node
|
|
88
86
|
*/
|
|
89
87
|
className: PropTypes.string,
|
|
90
|
-
|
|
91
88
|
/**
|
|
92
89
|
* Specify whether the ListBox is currently disabled
|
|
93
90
|
*/
|
|
94
91
|
disabled: PropTypes.bool.isRequired,
|
|
95
|
-
|
|
96
92
|
/**
|
|
97
93
|
* Specify whether the control is currently invalid
|
|
98
94
|
*/
|
|
99
95
|
invalid: PropTypes.bool,
|
|
100
|
-
|
|
101
96
|
/**
|
|
102
97
|
* Specify the text to be displayed when the control is invalid
|
|
103
98
|
*/
|
|
104
99
|
invalidText: PropTypes.node,
|
|
105
|
-
|
|
106
100
|
/**
|
|
107
101
|
* Specify if the control should render open
|
|
108
102
|
*/
|
|
109
103
|
isOpen: PropTypes.bool,
|
|
110
|
-
|
|
111
104
|
/**
|
|
112
105
|
* `true` to use the light version. For use on $ui-01 backgrounds only.
|
|
113
106
|
* Don't use this to make tile background color same as container background color.
|
|
114
107
|
*/
|
|
115
108
|
light: deprecate(PropTypes.bool, 'The `light` prop for `ListBox` has ' + 'been deprecated in favor of the new `Layer` component. It will be removed in the next major release.'),
|
|
116
|
-
|
|
117
109
|
/**
|
|
118
110
|
* Specify the size of the ListBox. Currently supports either `sm`, `md` or `lg` as an option.
|
|
119
111
|
*/
|
|
120
112
|
size: ListBoxSize,
|
|
121
|
-
|
|
122
113
|
/**
|
|
123
114
|
* Specify the "type" of the ListBox. Currently supports either `default` or
|
|
124
115
|
* `inline` as an option.
|
|
125
116
|
*/
|
|
126
117
|
type: ListBoxType.isRequired,
|
|
127
|
-
|
|
128
118
|
/**
|
|
129
119
|
* Specify whether the control is currently in warning state
|
|
130
120
|
*/
|
|
131
121
|
warn: PropTypes.bool,
|
|
132
|
-
|
|
133
122
|
/**
|
|
134
123
|
* Provide the text that is displayed when the control is in warning state
|
|
135
124
|
*/
|
|
@@ -28,30 +28,25 @@ function ListBoxField(_ref) {
|
|
|
28
28
|
tabIndex: !disabled && tabIndex || -1
|
|
29
29
|
}, rest), children);
|
|
30
30
|
}
|
|
31
|
-
|
|
32
31
|
ListBoxField.propTypes = {
|
|
33
32
|
/**
|
|
34
33
|
* Typically set by `getToggleButtonProps`, this should specify whether the
|
|
35
34
|
* field has a popup.
|
|
36
35
|
*/
|
|
37
36
|
'aria-haspopup': PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),
|
|
38
|
-
|
|
39
37
|
/**
|
|
40
38
|
* Provide the contents of your ListBoxField
|
|
41
39
|
*/
|
|
42
40
|
children: PropTypes.node,
|
|
43
|
-
|
|
44
41
|
/**
|
|
45
42
|
* Specify if the parent <ListBox> is disabled
|
|
46
43
|
*/
|
|
47
44
|
disabled: PropTypes.bool,
|
|
48
|
-
|
|
49
45
|
/**
|
|
50
46
|
* The role for the component, should be set by `getToggleButtonProps` coming
|
|
51
47
|
* from Downshift
|
|
52
48
|
*/
|
|
53
49
|
role: PropTypes.string,
|
|
54
|
-
|
|
55
50
|
/**
|
|
56
51
|
* Optional prop to specify the tabIndex of the <ListBox> trigger button
|
|
57
52
|
*/
|
|
@@ -19,9 +19,7 @@ const defaultTranslations = {
|
|
|
19
19
|
[translationIds['close.menu']]: 'Close menu',
|
|
20
20
|
[translationIds['open.menu']]: 'Open menu'
|
|
21
21
|
};
|
|
22
|
-
|
|
23
22
|
const defaultTranslateWithId = id => defaultTranslations[id];
|
|
24
|
-
|
|
25
23
|
/**
|
|
26
24
|
* `ListBoxMenuIcon` is used to orient the icon up or down depending on the
|
|
27
25
|
* state of the menu for a given `ListBox`
|
|
@@ -43,14 +41,12 @@ const ListBoxMenuIcon = _ref => {
|
|
|
43
41
|
"aria-label": description
|
|
44
42
|
}, /*#__PURE__*/React__default.createElement("title", null, description)));
|
|
45
43
|
};
|
|
46
|
-
|
|
47
44
|
ListBoxMenuIcon.propTypes = {
|
|
48
45
|
/**
|
|
49
46
|
* Specify whether the menu is currently open, which will influence the
|
|
50
47
|
* direction of the menu icon
|
|
51
48
|
*/
|
|
52
49
|
isOpen: PropTypes.bool.isRequired,
|
|
53
|
-
|
|
54
50
|
/**
|
|
55
51
|
* i18n hook used to provide the appropriate description for the given menu
|
|
56
52
|
* icon. This function takes in an id defined in `translationIds` and should
|