@carbon/react 1.23.1 → 1.24.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 -1
- package/es/components/Accordion/Accordion.Skeleton.js +1 -1
- package/es/components/Accordion/Accordion.js +1 -1
- package/es/components/Accordion/AccordionItem.js +1 -1
- package/es/components/AspectRatio/AspectRatio.js +1 -1
- package/es/components/Breadcrumb/Breadcrumb.Skeleton.js +1 -1
- package/es/components/Breadcrumb/Breadcrumb.js +1 -1
- package/es/components/Breadcrumb/BreadcrumbItem.js +1 -1
- package/es/components/Button/Button.Skeleton.js +1 -1
- package/es/components/Button/Button.js +2 -3
- package/es/components/Button/index.js +1 -1
- package/es/components/ButtonSet/ButtonSet.js +1 -1
- package/es/components/ButtonSet/index.js +1 -1
- package/es/components/Checkbox/Checkbox.Skeleton.d.ts +1 -1
- package/es/components/Checkbox/Checkbox.Skeleton.js +1 -1
- package/es/components/Checkbox/Checkbox.d.ts +1 -1
- package/es/components/Checkbox/Checkbox.js +1 -1
- package/es/components/Checkbox/index.d.ts +1 -1
- package/es/components/ClassPrefix/index.js +1 -1
- package/es/components/CodeSnippet/CodeSnippet.Skeleton.js +1 -1
- package/es/components/CodeSnippet/CodeSnippet.js +1 -1
- package/es/components/ComboBox/ComboBox.d.ts +1 -1
- package/es/components/ComboBox/ComboBox.js +1 -1
- package/es/components/ComboBox/index.js +1 -1
- package/es/components/ComboBox/tools/filter.js +1 -1
- package/es/components/ComposedModal/ComposedModal.js +1 -1
- package/es/components/ComposedModal/ModalFooter.js +1 -1
- package/es/components/ComposedModal/ModalHeader.js +1 -1
- package/es/components/ContainedList/ContainedList.js +1 -1
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +1 -1
- package/es/components/ContainedList/ContainedListItem/index.js +1 -1
- package/es/components/ContentSwitcher/ContentSwitcher.js +1 -1
- package/es/components/ContentSwitcher/index.js +1 -1
- package/es/components/ContextMenu/useContextMenu.js +9 -5
- package/es/components/Copy/Copy.js +1 -1
- package/es/components/Copy/index.js +1 -1
- package/es/components/CopyButton/CopyButton.js +1 -1
- package/es/components/CopyButton/index.js +1 -1
- package/es/components/DangerButton/DangerButton.js +1 -1
- package/es/components/DataTable/DataTable.js +1 -1
- package/es/components/DataTable/Table.js +1 -1
- package/es/components/DataTable/TableActionList.js +1 -1
- package/es/components/DataTable/TableBatchAction.js +1 -1
- package/es/components/DataTable/TableBatchActions.js +1 -1
- package/es/components/DataTable/TableBody.js +1 -1
- package/es/components/DataTable/TableCell.js +1 -1
- package/es/components/DataTable/TableContainer.js +1 -1
- package/es/components/DataTable/TableContext.js +1 -1
- package/es/components/DataTable/TableExpandHeader.js +1 -1
- package/es/components/DataTable/TableExpandRow.js +1 -1
- package/es/components/DataTable/TableExpandedRow.js +1 -1
- package/es/components/DataTable/TableHead.js +1 -1
- package/es/components/DataTable/TableHeader.js +1 -1
- package/es/components/DataTable/TableRow.js +1 -1
- package/es/components/DataTable/TableSelectAll.d.ts +1 -1
- package/es/components/DataTable/TableSelectAll.js +1 -1
- package/es/components/DataTable/TableSelectRow.d.ts +1 -1
- package/es/components/DataTable/TableSelectRow.js +1 -1
- package/es/components/DataTable/TableToolbar.js +1 -1
- package/es/components/DataTable/TableToolbarAction.js +1 -1
- package/es/components/DataTable/TableToolbarContent.js +1 -1
- package/es/components/DataTable/TableToolbarMenu.js +1 -1
- package/es/components/DataTable/TableToolbarSearch.js +1 -1
- package/es/components/DataTable/state/getDerivedStateFromProps.js +1 -1
- package/es/components/DataTable/state/sortStates.js +1 -1
- package/es/components/DataTable/state/sorting.js +1 -1
- package/es/components/DataTable/tools/cells.js +1 -1
- package/es/components/DataTable/tools/denormalize.js +2 -2
- package/es/components/DataTable/tools/filter.js +1 -1
- package/es/components/DataTable/tools/instanceId.js +1 -1
- package/es/components/DataTable/tools/normalize.js +1 -1
- package/es/components/DataTable/tools/sorting.js +1 -1
- package/es/components/DataTableSkeleton/DataTableSkeleton.js +1 -1
- package/es/components/DatePicker/DatePicker.Skeleton.js +1 -1
- package/es/components/DatePicker/DatePicker.js +13 -1
- package/es/components/DatePicker/index.js +1 -1
- package/es/components/DatePicker/plugins/appendToPlugin.js +1 -1
- package/es/components/DatePicker/plugins/fixEventsPlugin.js +3 -3
- package/es/components/DatePicker/plugins/rangePlugin.js +1 -1
- package/es/components/DatePickerInput/DatePickerInput.js +1 -1
- package/es/components/DatePickerInput/index.js +1 -1
- package/es/components/Dropdown/Dropdown.Skeleton.js +1 -1
- package/es/components/Dropdown/Dropdown.js +1 -1
- package/es/components/Dropdown/index.d.ts +1 -1
- package/es/components/Dropdown/index.js +1 -1
- package/es/components/ErrorBoundary/ErrorBoundary.js +1 -1
- package/es/components/ErrorBoundary/ErrorBoundaryContext.js +1 -1
- package/es/components/ExpandableSearch/ExpandableSearch.js +1 -1
- package/es/components/FeatureFlags/index.js +1 -1
- package/es/components/FileUploader/FileUploader.Skeleton.js +1 -1
- package/es/components/FileUploader/FileUploader.js +1 -1
- package/es/components/FileUploader/FileUploaderButton.js +1 -1
- package/es/components/FileUploader/FileUploaderDropContainer.js +1 -1
- package/es/components/FileUploader/FileUploaderItem.js +1 -1
- package/es/components/FileUploader/Filename.js +1 -1
- package/es/components/FluidComboBox/FluidComboBox.Skeleton.js +1 -1
- package/es/components/FluidComboBox/FluidComboBox.js +1 -1
- package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.js +1 -1
- package/es/components/FluidDatePicker/FluidDatePicker.js +1 -1
- package/es/components/FluidDatePickerInput/FluidDatePickerInput.js +1 -1
- package/es/components/FluidDropdown/FluidDropdown.Skeleton.js +1 -1
- package/es/components/FluidDropdown/FluidDropdown.js +1 -1
- package/es/components/FluidForm/FluidForm.js +1 -1
- package/es/components/FluidForm/FormContext.js +1 -1
- package/es/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +1 -1
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +1 -1
- package/es/components/FluidSelect/FluidSelect.Skeleton.js +1 -1
- package/es/components/FluidSelect/FluidSelect.js +1 -1
- package/es/components/FluidSelect/index.js +1 -1
- package/es/components/FluidTextArea/FluidTextArea.Skeleton.js +1 -1
- package/es/components/FluidTextArea/FluidTextArea.js +1 -1
- package/es/components/FluidTextInput/FluidTextInput.Skeleton.js +1 -1
- package/es/components/FluidTextInput/FluidTextInput.js +1 -1
- package/es/components/FluidTextInput/index.js +1 -1
- package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.js +1 -1
- package/es/components/FluidTimePicker/FluidTimePicker.js +1 -1
- package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +1 -1
- package/es/components/Form/Form.js +1 -1
- package/es/components/Form/index.js +1 -1
- package/es/components/FormGroup/FormGroup.js +1 -1
- package/es/components/FormItem/FormItem.js +1 -1
- package/es/components/FormLabel/FormLabel.js +1 -1
- package/es/components/Grid/CSSGrid.js +1 -1
- package/es/components/Grid/Column.js +1 -1
- package/es/components/Grid/ColumnHang.js +1 -1
- package/es/components/Grid/FlexGrid.js +1 -1
- package/es/components/Grid/Grid.js +1 -1
- package/es/components/Grid/GridContext.js +1 -1
- package/es/components/Grid/Row.js +1 -1
- package/es/components/Heading/index.js +1 -1
- package/es/components/Icon/Icon.Skeleton.js +1 -1
- package/es/components/IconButton/index.js +1 -1
- package/es/components/IdPrefix/index.js +1 -1
- package/es/components/InlineCheckbox/InlineCheckbox.js +1 -1
- package/es/components/InlineCheckbox/index.js +1 -1
- package/es/components/InlineLoading/InlineLoading.js +1 -1
- package/es/components/Layer/LayerContext.js +1 -1
- package/es/components/Layer/index.js +1 -1
- package/es/components/Layout/LayoutDirection.js +1 -1
- package/es/components/Layout/LayoutDirectionContext.js +1 -1
- package/es/components/Layout/useLayoutDirection.js +1 -1
- package/es/components/Link/Link.js +1 -1
- package/es/components/Link/index.js +1 -1
- package/es/components/ListBox/ListBox.js +1 -1
- package/es/components/ListBox/ListBoxField.js +1 -1
- package/es/components/ListBox/ListBoxMenu.js +1 -1
- package/es/components/ListBox/ListBoxMenuIcon.js +1 -1
- package/es/components/ListBox/ListBoxMenuItem.d.ts +2 -2
- package/es/components/ListBox/ListBoxMenuItem.js +1 -1
- package/es/components/ListBox/ListBoxPropTypes.js +1 -1
- package/es/components/ListBox/ListBoxSelection.js +1 -1
- package/es/components/ListBox/index.js +1 -1
- package/es/components/ListBox/next/ListBoxSelection.js +1 -1
- package/es/components/ListBox/next/ListBoxTrigger.js +1 -1
- package/es/components/ListItem/ListItem.js +1 -1
- package/es/components/Loading/Loading.js +1 -1
- package/es/components/Loading/index.js +1 -1
- package/es/components/Menu/Menu.js +5 -5
- package/es/components/Menu/MenuContext.js +4 -7
- package/es/components/Menu/MenuItem.js +15 -11
- package/es/components/Modal/Modal.js +1 -1
- package/es/components/Modal/index.js +1 -1
- package/es/components/ModalWrapper/ModalWrapper.js +1 -1
- package/es/components/MultiSelect/FilterableMultiSelect.js +1 -1
- package/es/components/MultiSelect/MultiSelect.d.ts +170 -0
- package/es/components/MultiSelect/MultiSelect.js +110 -72
- package/es/components/MultiSelect/MultiSelectPropTypes.js +1 -1
- package/es/components/MultiSelect/index.js +1 -1
- package/es/components/MultiSelect/tools/itemToString.js +1 -1
- package/es/components/MultiSelect/tools/sorting.js +1 -1
- package/es/components/Notification/Notification.js +1 -6
- package/es/components/NumberInput/NumberInput.Skeleton.d.ts +1 -1
- package/es/components/NumberInput/NumberInput.Skeleton.js +1 -1
- package/es/components/NumberInput/NumberInput.d.ts +1 -1
- package/es/components/NumberInput/NumberInput.js +3 -5
- package/es/components/OrderedList/OrderedList.js +1 -1
- package/es/components/OverflowMenu/OverflowMenu.js +1 -1
- package/es/components/OverflowMenu/index.js +1 -1
- package/es/components/OverflowMenuItem/OverflowMenuItem.js +1 -1
- package/es/components/OverflowMenuItem/index.js +1 -1
- package/es/components/OverflowMenuV2/index.js +1 -1
- package/es/components/Pagination/Pagination.Skeleton.js +1 -1
- package/es/components/Pagination/Pagination.js +1 -1
- package/es/components/Pagination/experimental/PageSelector.js +1 -1
- package/es/components/Pagination/experimental/Pagination.js +1 -1
- package/es/components/PaginationNav/PaginationNav.js +1 -1
- package/es/components/Popover/index.d.ts +51 -0
- package/es/components/Popover/index.js +29 -25
- package/es/components/PrimaryButton/PrimaryButton.js +1 -1
- package/es/components/ProgressBar/ProgressBar.js +1 -1
- package/es/components/ProgressIndicator/ProgressIndicator.Skeleton.js +1 -1
- package/es/components/ProgressIndicator/ProgressIndicator.js +1 -1
- package/es/components/RadioButton/RadioButton.Skeleton.js +1 -1
- package/es/components/RadioButton/RadioButton.js +1 -1
- package/es/components/RadioButton/index.js +1 -1
- package/es/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/es/components/RadioTile/RadioTile.js +1 -1
- package/es/components/RadioTile/index.js +1 -1
- package/es/components/Search/Search.Skeleton.js +1 -1
- package/es/components/Search/Search.js +1 -1
- package/es/components/Search/index.js +1 -1
- package/es/components/SecondaryButton/SecondaryButton.js +1 -1
- package/es/components/Select/Select.Skeleton.d.ts +1 -1
- package/es/components/Select/Select.Skeleton.js +1 -1
- package/es/components/Select/Select.js +1 -1
- package/es/components/Select/index.js +1 -1
- package/es/components/SelectItem/SelectItem.js +1 -1
- package/es/components/SelectItem/index.js +1 -1
- package/es/components/SelectItemGroup/SelectItemGroup.js +1 -1
- package/es/components/SkeletonIcon/SkeletonIcon.js +1 -1
- package/es/components/SkeletonPlaceholder/SkeletonPlaceholder.js +1 -1
- package/es/components/SkeletonText/SkeletonText.js +1 -1
- package/es/components/SkeletonText/index.js +1 -1
- package/es/components/Slider/Slider.Skeleton.d.ts +3 -3
- package/es/components/Slider/Slider.Skeleton.js +1 -1
- package/es/components/Slider/Slider.d.ts +355 -0
- package/es/components/Slider/Slider.js +64 -36
- package/es/components/Slider/index.js +1 -1
- package/es/components/Stack/Stack.js +1 -1
- package/es/components/Stack/index.js +1 -1
- package/es/components/StructuredList/StructuredList.Skeleton.js +1 -1
- package/es/components/StructuredList/StructuredList.js +1 -1
- package/es/components/Switch/Switch.js +1 -1
- package/es/components/Tab/Tab.js +1 -1
- package/es/components/Tab/index.js +1 -1
- package/es/components/TabContent/TabContent.js +1 -1
- package/es/components/Tabs/Tabs.Skeleton.js +1 -1
- package/es/components/Tabs/Tabs.js +1 -1
- package/es/components/Tabs/usePressable.js +1 -1
- package/es/components/Tag/Tag.Skeleton.js +1 -1
- package/es/components/Tag/Tag.js +1 -1
- package/es/components/Text/Text.d.ts +1 -1
- package/es/components/Text/Text.js +1 -1
- package/es/components/Text/TextDirection.d.ts +1 -1
- package/es/components/Text/TextDirection.js +1 -1
- package/es/components/Text/TextDirectionContext.js +1 -1
- package/es/components/Text/createTextComponent.d.ts +1 -1
- package/es/components/Text/createTextComponent.js +1 -1
- package/es/components/Text/index.d.ts +1 -1
- package/es/components/Text/index.js +1 -1
- package/es/components/TextArea/TextArea.Skeleton.js +1 -1
- package/es/components/TextArea/TextArea.d.ts +95 -0
- package/es/components/TextArea/TextArea.js +27 -28
- package/es/components/TextArea/index.js +1 -1
- package/es/components/TextInput/ControlledPasswordInput.js +1 -1
- package/es/components/TextInput/PasswordInput.js +1 -1
- package/es/components/TextInput/TextInput.Skeleton.js +1 -1
- package/es/components/TextInput/TextInput.d.ts +106 -0
- package/es/components/TextInput/TextInput.js +4 -3
- package/es/components/TextInput/index.js +1 -1
- package/es/components/TextInput/util.js +1 -1
- package/es/components/Theme/index.js +1 -1
- package/es/components/Tile/Tile.js +1 -1
- package/es/components/TileGroup/TileGroup.js +1 -1
- package/es/components/TileGroup/index.js +1 -1
- package/es/components/TimePicker/TimePicker.d.ts +96 -0
- package/es/components/TimePicker/TimePicker.js +8 -7
- package/es/components/TimePickerSelect/TimePickerSelect.d.ts +33 -0
- package/es/components/TimePickerSelect/TimePickerSelect.js +7 -8
- package/es/components/TimePickerSelect/index.js +3 -3
- package/es/components/Toggle/Toggle.Skeleton.js +1 -1
- package/es/components/Toggle/Toggle.js +1 -1
- package/es/components/ToggleSmall/ToggleSmall.Skeleton.js +1 -1
- package/es/components/Toggletip/index.js +1 -1
- package/es/components/Tooltip/DefinitionTooltip.js +1 -1
- package/es/components/Tooltip/Tooltip.js +1 -1
- package/es/components/TreeView/TreeNode.js +1 -1
- package/es/components/TreeView/TreeView.js +1 -1
- package/es/components/UIShell/Content.js +1 -1
- package/es/components/UIShell/Header.js +1 -1
- package/es/components/UIShell/HeaderContainer.js +1 -1
- package/es/components/UIShell/HeaderGlobalAction.js +1 -1
- package/es/components/UIShell/HeaderGlobalBar.js +1 -1
- package/es/components/UIShell/HeaderMenu.js +1 -1
- package/es/components/UIShell/HeaderMenuButton.js +1 -1
- package/es/components/UIShell/HeaderMenuItem.js +1 -1
- package/es/components/UIShell/HeaderName.js +1 -1
- package/es/components/UIShell/HeaderNavigation.js +1 -1
- package/es/components/UIShell/HeaderPanel.js +1 -1
- package/es/components/UIShell/HeaderSideNavItems.js +1 -1
- package/es/components/UIShell/Link.js +1 -1
- package/es/components/UIShell/SideNav.js +1 -1
- package/es/components/UIShell/SideNavDetails.js +1 -1
- package/es/components/UIShell/SideNavDivider.js +1 -1
- package/es/components/UIShell/SideNavFooter.js +1 -1
- package/es/components/UIShell/SideNavHeader.js +1 -1
- package/es/components/UIShell/SideNavIcon.js +1 -1
- package/es/components/UIShell/SideNavItem.js +1 -1
- package/es/components/UIShell/SideNavItems.js +1 -1
- package/es/components/UIShell/SideNavLink.js +1 -1
- package/es/components/UIShell/SideNavLinkText.js +1 -1
- package/es/components/UIShell/SideNavMenu.js +1 -1
- package/es/components/UIShell/SideNavMenuItem.js +1 -1
- package/es/components/UIShell/SideNavSwitcher.js +1 -1
- package/es/components/UIShell/SkipToContent.js +1 -1
- package/es/components/UIShell/Switcher.js +1 -1
- package/es/components/UIShell/SwitcherDivider.js +1 -1
- package/es/components/UIShell/SwitcherItem.js +1 -1
- package/es/components/UIShell/_utils.js +1 -1
- package/es/components/UnorderedList/UnorderedList.js +1 -1
- package/es/feature-flags.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/internal/ClickListener.js +1 -1
- package/es/internal/FloatingMenu.js +1 -1
- package/es/internal/OptimizedResize.js +1 -1
- package/es/internal/Selection.js +1 -1
- package/es/internal/createClassWrapper.js +1 -1
- package/es/internal/deprecateFieldOnObject.js +1 -1
- package/es/internal/environment.js +1 -1
- package/es/internal/focus/index.js +1 -1
- package/es/internal/keyboard/keys.js +1 -1
- package/es/internal/keyboard/match.js +1 -1
- package/es/internal/keyboard/navigation.js +1 -1
- package/es/internal/useAnnouncer.js +1 -1
- package/es/internal/useControllableState.js +1 -1
- package/es/internal/useDelayedState.js +1 -1
- package/es/internal/useEffectOnce.js +1 -1
- package/es/internal/useEvent.js +1 -1
- package/es/internal/useId.js +1 -1
- package/es/internal/useIdPrefix.js +1 -1
- package/es/internal/useIsomorphicEffect.js +1 -1
- package/es/internal/useMergedRefs.d.ts +13 -0
- package/es/internal/useMergedRefs.js +3 -6
- package/es/internal/useNoInteractiveChildren.js +1 -1
- package/es/internal/useNormalizedInputProps.js +2 -1
- package/es/internal/usePrefix.d.ts +1 -1
- package/es/internal/usePrefix.js +1 -1
- package/es/internal/useSavedCallback.js +1 -1
- package/es/internal/warning.js +1 -1
- package/es/internal/wrapFocus.js +1 -1
- package/es/prop-types/AriaPropTypes.js +1 -1
- package/es/prop-types/deprecate.js +1 -1
- package/es/prop-types/isRequiredOneOf.js +2 -2
- package/es/prop-types/requiredIfGivenPropIsTruthy.js +1 -1
- package/es/prop-types/types.js +1 -1
- package/es/tools/array.js +1 -1
- package/es/tools/events.js +1 -1
- package/es/tools/mergeRefs.js +1 -1
- package/es/tools/setupGetInstanceId.js +1 -1
- package/es/tools/toggleClass.js +1 -1
- package/es/tools/uniqueId.js +1 -1
- package/es/tools/wrapComponent.js +1 -1
- package/icons/index.esm.js +1 -1
- package/icons/index.js +1 -1
- package/index.scss +1 -1
- package/lib/_virtual/_rollupPluginBabelHelpers.js +1 -1
- package/lib/components/Accordion/Accordion.Skeleton.js +1 -1
- package/lib/components/Accordion/Accordion.js +1 -1
- package/lib/components/Accordion/AccordionItem.js +1 -1
- package/lib/components/AspectRatio/AspectRatio.js +1 -1
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.js +1 -1
- package/lib/components/Breadcrumb/Breadcrumb.js +1 -1
- package/lib/components/Breadcrumb/BreadcrumbItem.js +1 -1
- package/lib/components/Button/Button.Skeleton.js +1 -1
- package/lib/components/Button/Button.js +2 -3
- package/lib/components/Button/index.js +1 -1
- package/lib/components/ButtonSet/ButtonSet.js +1 -1
- package/lib/components/ButtonSet/index.js +1 -1
- package/lib/components/Checkbox/Checkbox.Skeleton.d.ts +1 -1
- package/lib/components/Checkbox/Checkbox.Skeleton.js +1 -1
- package/lib/components/Checkbox/Checkbox.d.ts +1 -1
- package/lib/components/Checkbox/Checkbox.js +1 -1
- package/lib/components/Checkbox/index.d.ts +1 -1
- package/lib/components/ClassPrefix/index.js +1 -1
- package/lib/components/CodeSnippet/CodeSnippet.Skeleton.js +1 -1
- package/lib/components/CodeSnippet/CodeSnippet.js +1 -1
- package/lib/components/ComboBox/ComboBox.d.ts +1 -1
- package/lib/components/ComboBox/ComboBox.js +1 -1
- package/lib/components/ComboBox/index.js +1 -1
- package/lib/components/ComboBox/tools/filter.js +1 -1
- package/lib/components/ComposedModal/ComposedModal.js +1 -1
- package/lib/components/ComposedModal/ModalFooter.js +1 -1
- package/lib/components/ComposedModal/ModalHeader.js +1 -1
- package/lib/components/ContainedList/ContainedList.js +1 -1
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +1 -1
- package/lib/components/ContainedList/ContainedListItem/index.js +1 -1
- package/lib/components/ContentSwitcher/ContentSwitcher.js +1 -1
- package/lib/components/ContentSwitcher/index.js +1 -1
- package/lib/components/ContextMenu/useContextMenu.js +9 -5
- package/lib/components/Copy/Copy.js +1 -1
- package/lib/components/Copy/index.js +1 -1
- package/lib/components/CopyButton/CopyButton.js +1 -1
- package/lib/components/CopyButton/index.js +1 -1
- package/lib/components/DangerButton/DangerButton.js +1 -1
- package/lib/components/DataTable/DataTable.js +1 -1
- package/lib/components/DataTable/Table.js +1 -1
- package/lib/components/DataTable/TableActionList.js +1 -1
- package/lib/components/DataTable/TableBatchAction.js +1 -1
- package/lib/components/DataTable/TableBatchActions.js +1 -1
- package/lib/components/DataTable/TableBody.js +1 -1
- package/lib/components/DataTable/TableCell.js +1 -1
- package/lib/components/DataTable/TableContainer.js +1 -1
- package/lib/components/DataTable/TableContext.js +1 -1
- package/lib/components/DataTable/TableExpandHeader.js +1 -1
- package/lib/components/DataTable/TableExpandRow.js +1 -1
- package/lib/components/DataTable/TableExpandedRow.js +1 -1
- package/lib/components/DataTable/TableHead.js +1 -1
- package/lib/components/DataTable/TableHeader.js +1 -1
- package/lib/components/DataTable/TableRow.js +1 -1
- package/lib/components/DataTable/TableSelectAll.d.ts +1 -1
- package/lib/components/DataTable/TableSelectAll.js +1 -1
- package/lib/components/DataTable/TableSelectRow.d.ts +1 -1
- package/lib/components/DataTable/TableSelectRow.js +1 -1
- package/lib/components/DataTable/TableToolbar.js +1 -1
- package/lib/components/DataTable/TableToolbarAction.js +1 -1
- package/lib/components/DataTable/TableToolbarContent.js +1 -1
- package/lib/components/DataTable/TableToolbarMenu.js +1 -1
- package/lib/components/DataTable/TableToolbarSearch.js +1 -1
- package/lib/components/DataTable/state/getDerivedStateFromProps.js +1 -1
- package/lib/components/DataTable/state/sortStates.js +1 -1
- package/lib/components/DataTable/state/sorting.js +1 -1
- package/lib/components/DataTable/tools/cells.js +1 -1
- package/lib/components/DataTable/tools/denormalize.js +2 -2
- package/lib/components/DataTable/tools/filter.js +1 -1
- package/lib/components/DataTable/tools/instanceId.js +1 -1
- package/lib/components/DataTable/tools/normalize.js +1 -1
- package/lib/components/DataTable/tools/sorting.js +1 -1
- package/lib/components/DataTableSkeleton/DataTableSkeleton.js +1 -1
- package/lib/components/DatePicker/DatePicker.Skeleton.js +1 -1
- package/lib/components/DatePicker/DatePicker.js +13 -1
- package/lib/components/DatePicker/index.js +1 -1
- package/lib/components/DatePicker/plugins/appendToPlugin.js +1 -1
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +3 -3
- package/lib/components/DatePicker/plugins/rangePlugin.js +1 -1
- package/lib/components/DatePickerInput/DatePickerInput.js +1 -1
- package/lib/components/DatePickerInput/index.js +1 -1
- package/lib/components/Dropdown/Dropdown.Skeleton.js +1 -1
- package/lib/components/Dropdown/Dropdown.js +1 -1
- package/lib/components/Dropdown/index.d.ts +1 -1
- package/lib/components/Dropdown/index.js +1 -1
- package/lib/components/ErrorBoundary/ErrorBoundary.js +1 -1
- package/lib/components/ErrorBoundary/ErrorBoundaryContext.js +1 -1
- package/lib/components/ExpandableSearch/ExpandableSearch.js +1 -1
- package/lib/components/FeatureFlags/index.js +1 -1
- package/lib/components/FileUploader/FileUploader.Skeleton.js +1 -1
- package/lib/components/FileUploader/FileUploader.js +1 -1
- package/lib/components/FileUploader/FileUploaderButton.js +1 -1
- package/lib/components/FileUploader/FileUploaderDropContainer.js +1 -1
- package/lib/components/FileUploader/FileUploaderItem.js +1 -1
- package/lib/components/FileUploader/Filename.js +1 -1
- package/lib/components/FluidComboBox/FluidComboBox.Skeleton.js +1 -1
- package/lib/components/FluidComboBox/FluidComboBox.js +1 -1
- package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.js +1 -1
- package/lib/components/FluidDatePicker/FluidDatePicker.js +1 -1
- package/lib/components/FluidDatePickerInput/FluidDatePickerInput.js +1 -1
- package/lib/components/FluidDropdown/FluidDropdown.Skeleton.js +1 -1
- package/lib/components/FluidDropdown/FluidDropdown.js +1 -1
- package/lib/components/FluidForm/FluidForm.js +1 -1
- package/lib/components/FluidForm/FormContext.js +1 -1
- package/lib/components/FluidMultiSelect/FluidMultiSelect.Skeleton.js +1 -1
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +1 -1
- package/lib/components/FluidSelect/FluidSelect.Skeleton.js +1 -1
- package/lib/components/FluidSelect/FluidSelect.js +1 -1
- package/lib/components/FluidSelect/index.js +1 -1
- package/lib/components/FluidTextArea/FluidTextArea.Skeleton.js +1 -1
- package/lib/components/FluidTextArea/FluidTextArea.js +1 -1
- package/lib/components/FluidTextInput/FluidTextInput.Skeleton.js +1 -1
- package/lib/components/FluidTextInput/FluidTextInput.js +1 -1
- package/lib/components/FluidTextInput/index.js +1 -1
- package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +1 -1
- package/lib/components/FluidTimePicker/FluidTimePicker.js +1 -1
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +1 -1
- package/lib/components/Form/Form.js +1 -1
- package/lib/components/Form/index.js +1 -1
- package/lib/components/FormGroup/FormGroup.js +1 -1
- package/lib/components/FormItem/FormItem.js +1 -1
- package/lib/components/FormLabel/FormLabel.js +1 -1
- package/lib/components/Grid/CSSGrid.js +1 -1
- package/lib/components/Grid/Column.js +1 -1
- package/lib/components/Grid/ColumnHang.js +1 -1
- package/lib/components/Grid/FlexGrid.js +1 -1
- package/lib/components/Grid/Grid.js +1 -1
- package/lib/components/Grid/GridContext.js +1 -1
- package/lib/components/Grid/Row.js +1 -1
- package/lib/components/Heading/index.js +1 -1
- package/lib/components/Icon/Icon.Skeleton.js +1 -1
- package/lib/components/IconButton/index.js +1 -1
- package/lib/components/IdPrefix/index.js +1 -1
- package/lib/components/InlineCheckbox/InlineCheckbox.js +1 -1
- package/lib/components/InlineCheckbox/index.js +1 -1
- package/lib/components/InlineLoading/InlineLoading.js +1 -1
- package/lib/components/Layer/LayerContext.js +1 -1
- package/lib/components/Layer/index.js +1 -1
- package/lib/components/Layout/LayoutDirection.js +1 -1
- package/lib/components/Layout/LayoutDirectionContext.js +1 -1
- package/lib/components/Layout/useLayoutDirection.js +1 -1
- package/lib/components/Link/Link.js +1 -1
- package/lib/components/Link/index.js +1 -1
- package/lib/components/ListBox/ListBox.js +1 -1
- package/lib/components/ListBox/ListBoxField.js +1 -1
- package/lib/components/ListBox/ListBoxMenu.js +1 -1
- package/lib/components/ListBox/ListBoxMenuIcon.js +1 -1
- package/lib/components/ListBox/ListBoxMenuItem.d.ts +2 -2
- package/lib/components/ListBox/ListBoxMenuItem.js +1 -1
- package/lib/components/ListBox/ListBoxPropTypes.js +1 -1
- package/lib/components/ListBox/ListBoxSelection.js +1 -1
- package/lib/components/ListBox/index.js +1 -1
- package/lib/components/ListBox/next/ListBoxSelection.js +1 -1
- package/lib/components/ListBox/next/ListBoxTrigger.js +1 -1
- package/lib/components/ListItem/ListItem.js +1 -1
- package/lib/components/Loading/Loading.js +1 -1
- package/lib/components/Loading/index.js +1 -1
- package/lib/components/Menu/Menu.js +5 -5
- package/lib/components/Menu/MenuContext.js +4 -7
- package/lib/components/Menu/MenuItem.js +15 -11
- package/lib/components/Modal/Modal.js +1 -1
- package/lib/components/Modal/index.js +1 -1
- package/lib/components/ModalWrapper/ModalWrapper.js +1 -1
- package/lib/components/MultiSelect/FilterableMultiSelect.js +1 -1
- package/lib/components/MultiSelect/MultiSelect.d.ts +170 -0
- package/lib/components/MultiSelect/MultiSelect.js +110 -72
- package/lib/components/MultiSelect/MultiSelectPropTypes.js +1 -1
- package/lib/components/MultiSelect/index.js +1 -1
- package/lib/components/MultiSelect/tools/itemToString.js +1 -1
- package/lib/components/MultiSelect/tools/sorting.js +1 -1
- package/lib/components/Notification/Notification.js +1 -6
- package/lib/components/NumberInput/NumberInput.Skeleton.d.ts +1 -1
- package/lib/components/NumberInput/NumberInput.Skeleton.js +1 -1
- package/lib/components/NumberInput/NumberInput.d.ts +1 -1
- package/lib/components/NumberInput/NumberInput.js +3 -5
- package/lib/components/OrderedList/OrderedList.js +1 -1
- package/lib/components/OverflowMenu/OverflowMenu.js +1 -1
- package/lib/components/OverflowMenu/index.js +1 -1
- package/lib/components/OverflowMenuItem/OverflowMenuItem.js +1 -1
- package/lib/components/OverflowMenuItem/index.js +1 -1
- package/lib/components/OverflowMenuV2/index.js +1 -1
- package/lib/components/Pagination/Pagination.Skeleton.js +1 -1
- package/lib/components/Pagination/Pagination.js +1 -1
- package/lib/components/Pagination/experimental/PageSelector.js +1 -1
- package/lib/components/Pagination/experimental/Pagination.js +1 -1
- package/lib/components/PaginationNav/PaginationNav.js +1 -1
- package/lib/components/Popover/index.d.ts +51 -0
- package/lib/components/Popover/index.js +29 -25
- package/lib/components/PrimaryButton/PrimaryButton.js +1 -1
- package/lib/components/ProgressBar/ProgressBar.js +1 -1
- package/lib/components/ProgressIndicator/ProgressIndicator.Skeleton.js +1 -1
- package/lib/components/ProgressIndicator/ProgressIndicator.js +1 -1
- package/lib/components/RadioButton/RadioButton.Skeleton.js +1 -1
- package/lib/components/RadioButton/RadioButton.js +1 -1
- package/lib/components/RadioButton/index.js +1 -1
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/lib/components/RadioTile/RadioTile.js +1 -1
- package/lib/components/RadioTile/index.js +1 -1
- package/lib/components/Search/Search.Skeleton.js +1 -1
- package/lib/components/Search/Search.js +1 -1
- package/lib/components/Search/index.js +1 -1
- package/lib/components/SecondaryButton/SecondaryButton.js +1 -1
- package/lib/components/Select/Select.Skeleton.d.ts +1 -1
- package/lib/components/Select/Select.Skeleton.js +1 -1
- package/lib/components/Select/Select.js +1 -1
- package/lib/components/Select/index.js +1 -1
- package/lib/components/SelectItem/SelectItem.js +1 -1
- package/lib/components/SelectItem/index.js +1 -1
- package/lib/components/SelectItemGroup/SelectItemGroup.js +1 -1
- package/lib/components/SkeletonIcon/SkeletonIcon.js +1 -1
- package/lib/components/SkeletonPlaceholder/SkeletonPlaceholder.js +1 -1
- package/lib/components/SkeletonText/SkeletonText.js +1 -1
- package/lib/components/SkeletonText/index.js +1 -1
- package/lib/components/Slider/Slider.Skeleton.d.ts +3 -3
- package/lib/components/Slider/Slider.Skeleton.js +1 -1
- package/lib/components/Slider/Slider.d.ts +355 -0
- package/lib/components/Slider/Slider.js +63 -35
- package/lib/components/Slider/index.js +1 -1
- package/lib/components/Stack/Stack.js +1 -1
- package/lib/components/Stack/index.js +1 -1
- package/lib/components/StructuredList/StructuredList.Skeleton.js +1 -1
- package/lib/components/StructuredList/StructuredList.js +1 -1
- package/lib/components/Switch/Switch.js +1 -1
- package/lib/components/Tab/Tab.js +1 -1
- package/lib/components/Tab/index.js +1 -1
- package/lib/components/TabContent/TabContent.js +1 -1
- package/lib/components/Tabs/Tabs.Skeleton.js +1 -1
- package/lib/components/Tabs/Tabs.js +1 -1
- package/lib/components/Tabs/usePressable.js +1 -1
- package/lib/components/Tag/Tag.Skeleton.js +1 -1
- package/lib/components/Tag/Tag.js +1 -1
- package/lib/components/Text/Text.d.ts +1 -1
- package/lib/components/Text/Text.js +1 -1
- package/lib/components/Text/TextDirection.d.ts +1 -1
- package/lib/components/Text/TextDirection.js +1 -1
- package/lib/components/Text/TextDirectionContext.js +1 -1
- package/lib/components/Text/createTextComponent.d.ts +1 -1
- package/lib/components/Text/createTextComponent.js +1 -1
- package/lib/components/Text/index.d.ts +1 -1
- package/lib/components/Text/index.js +1 -1
- package/lib/components/TextArea/TextArea.Skeleton.js +1 -1
- package/lib/components/TextArea/TextArea.d.ts +95 -0
- package/lib/components/TextArea/TextArea.js +27 -28
- package/lib/components/TextArea/index.js +1 -1
- package/lib/components/TextInput/ControlledPasswordInput.js +1 -1
- package/lib/components/TextInput/PasswordInput.js +1 -1
- package/lib/components/TextInput/TextInput.Skeleton.js +1 -1
- package/lib/components/TextInput/TextInput.d.ts +106 -0
- package/lib/components/TextInput/TextInput.js +4 -3
- package/lib/components/TextInput/index.js +1 -1
- package/lib/components/TextInput/util.js +1 -1
- package/lib/components/Theme/index.js +1 -1
- package/lib/components/Tile/Tile.js +1 -1
- package/lib/components/TileGroup/TileGroup.js +1 -1
- package/lib/components/TileGroup/index.js +1 -1
- package/lib/components/TimePicker/TimePicker.d.ts +96 -0
- package/lib/components/TimePicker/TimePicker.js +8 -7
- package/lib/components/TimePickerSelect/TimePickerSelect.d.ts +33 -0
- package/lib/components/TimePickerSelect/TimePickerSelect.js +7 -8
- package/lib/components/TimePickerSelect/index.js +1 -1
- package/lib/components/Toggle/Toggle.Skeleton.js +1 -1
- package/lib/components/Toggle/Toggle.js +1 -1
- package/lib/components/ToggleSmall/ToggleSmall.Skeleton.js +1 -1
- package/lib/components/Toggletip/index.js +1 -1
- package/lib/components/Tooltip/DefinitionTooltip.js +1 -1
- package/lib/components/Tooltip/Tooltip.js +1 -1
- package/lib/components/TreeView/TreeNode.js +1 -1
- package/lib/components/TreeView/TreeView.js +1 -1
- package/lib/components/UIShell/Content.js +1 -1
- package/lib/components/UIShell/Header.js +1 -1
- package/lib/components/UIShell/HeaderContainer.js +1 -1
- package/lib/components/UIShell/HeaderGlobalAction.js +1 -1
- package/lib/components/UIShell/HeaderGlobalBar.js +1 -1
- package/lib/components/UIShell/HeaderMenu.js +1 -1
- package/lib/components/UIShell/HeaderMenuButton.js +1 -1
- package/lib/components/UIShell/HeaderMenuItem.js +1 -1
- package/lib/components/UIShell/HeaderName.js +1 -1
- package/lib/components/UIShell/HeaderNavigation.js +1 -1
- package/lib/components/UIShell/HeaderPanel.js +1 -1
- package/lib/components/UIShell/HeaderSideNavItems.js +1 -1
- package/lib/components/UIShell/Link.js +1 -1
- package/lib/components/UIShell/SideNav.js +1 -1
- package/lib/components/UIShell/SideNavDetails.js +1 -1
- package/lib/components/UIShell/SideNavDivider.js +1 -1
- package/lib/components/UIShell/SideNavFooter.js +1 -1
- package/lib/components/UIShell/SideNavHeader.js +1 -1
- package/lib/components/UIShell/SideNavIcon.js +1 -1
- package/lib/components/UIShell/SideNavItem.js +1 -1
- package/lib/components/UIShell/SideNavItems.js +1 -1
- package/lib/components/UIShell/SideNavLink.js +1 -1
- package/lib/components/UIShell/SideNavLinkText.js +1 -1
- package/lib/components/UIShell/SideNavMenu.js +1 -1
- package/lib/components/UIShell/SideNavMenuItem.js +1 -1
- package/lib/components/UIShell/SideNavSwitcher.js +1 -1
- package/lib/components/UIShell/SkipToContent.js +1 -1
- package/lib/components/UIShell/Switcher.js +1 -1
- package/lib/components/UIShell/SwitcherDivider.js +1 -1
- package/lib/components/UIShell/SwitcherItem.js +1 -1
- package/lib/components/UIShell/_utils.js +1 -1
- package/lib/components/UnorderedList/UnorderedList.js +1 -1
- package/lib/feature-flags.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/internal/ClickListener.js +1 -1
- package/lib/internal/FloatingMenu.js +1 -1
- package/lib/internal/OptimizedResize.js +1 -1
- package/lib/internal/Selection.js +1 -1
- package/lib/internal/createClassWrapper.js +1 -1
- package/lib/internal/deprecateFieldOnObject.js +1 -1
- package/lib/internal/environment.js +1 -1
- package/lib/internal/focus/index.js +1 -1
- package/lib/internal/keyboard/keys.js +1 -1
- package/lib/internal/keyboard/match.js +1 -1
- package/lib/internal/keyboard/navigation.js +1 -1
- package/lib/internal/useAnnouncer.js +1 -1
- package/lib/internal/useControllableState.js +1 -1
- package/lib/internal/useDelayedState.js +1 -1
- package/lib/internal/useEffectOnce.js +1 -1
- package/lib/internal/useEvent.js +1 -1
- package/lib/internal/useId.js +1 -1
- package/lib/internal/useIdPrefix.js +1 -1
- package/lib/internal/useIsomorphicEffect.js +1 -1
- package/lib/internal/useMergedRefs.d.ts +13 -0
- package/lib/internal/useMergedRefs.js +3 -6
- package/lib/internal/useNoInteractiveChildren.js +1 -1
- package/lib/internal/useNormalizedInputProps.js +2 -1
- package/lib/internal/usePrefix.d.ts +1 -1
- package/lib/internal/usePrefix.js +1 -1
- package/lib/internal/useSavedCallback.js +1 -1
- package/lib/internal/warning.js +1 -1
- package/lib/internal/wrapFocus.js +1 -1
- package/lib/prop-types/AriaPropTypes.js +1 -1
- package/lib/prop-types/deprecate.js +1 -1
- package/lib/prop-types/isRequiredOneOf.js +2 -2
- package/lib/prop-types/requiredIfGivenPropIsTruthy.js +1 -1
- package/lib/prop-types/types.js +1 -1
- package/lib/tools/array.js +1 -1
- package/lib/tools/events.js +1 -1
- package/lib/tools/mergeRefs.js +1 -1
- package/lib/tools/setupGetInstanceId.js +1 -1
- package/lib/tools/toggleClass.js +1 -1
- package/lib/tools/uniqueId.js +1 -1
- package/lib/tools/wrapComponent.js +1 -1
- package/package.json +10 -10
- package/scss/_breakpoint.scss +1 -1
- package/scss/_colors.scss +1 -1
- package/scss/_config.scss +1 -1
- package/scss/_feature-flags.scss +1 -1
- package/scss/_layer.scss +1 -1
- package/scss/_motion.scss +1 -1
- package/scss/_reset.scss +1 -1
- package/scss/_spacing.scss +1 -1
- package/scss/_theme.scss +1 -1
- package/scss/_themes.scss +1 -1
- package/scss/_zone.scss +1 -1
- package/scss/compat/_theme.scss +1 -1
- package/scss/compat/_themes.scss +1 -1
- package/scss/components/_index.scss +1 -1
- package/scss/components/accordion/_accordion.scss +1 -1
- package/scss/components/accordion/_index.scss +1 -1
- package/scss/components/aspect-ratio/_aspect-ratio.scss +1 -1
- package/scss/components/aspect-ratio/_index.scss +1 -1
- package/scss/components/breadcrumb/_breadcrumb.scss +1 -1
- package/scss/components/breadcrumb/_index.scss +1 -1
- package/scss/components/button/_button.scss +1 -1
- package/scss/components/button/_index.scss +1 -1
- package/scss/components/button/_tokens.scss +1 -1
- package/scss/components/checkbox/_checkbox.scss +1 -1
- package/scss/components/checkbox/_index.scss +1 -1
- package/scss/components/code-snippet/_code-snippet.scss +1 -1
- package/scss/components/code-snippet/_index.scss +1 -1
- package/scss/components/combo-box/_combo-box.scss +1 -1
- package/scss/components/combo-box/_index.scss +1 -1
- package/scss/components/content-switcher/_content-switcher.scss +1 -1
- package/scss/components/content-switcher/_index.scss +1 -1
- package/scss/components/copy-button/_copy-button.scss +1 -1
- package/scss/components/copy-button/_index.scss +1 -1
- package/scss/components/data-table/_data-table.scss +1 -1
- package/scss/components/data-table/_index.scss +1 -1
- package/scss/components/data-table/action/_data-table-action.scss +1 -1
- package/scss/components/data-table/action/_index.scss +1 -1
- package/scss/components/data-table/expandable/_data-table-expandable.scss +1 -1
- package/scss/components/data-table/expandable/_index.scss +1 -1
- package/scss/components/data-table/skeleton/_data-table-skeleton.scss +1 -1
- package/scss/components/data-table/skeleton/_index.scss +1 -1
- package/scss/components/data-table/sort/_data-table-sort.scss +1 -1
- package/scss/components/data-table/sort/_index.scss +1 -1
- package/scss/components/date-picker/_date-picker.scss +1 -1
- package/scss/components/date-picker/_index.scss +1 -1
- package/scss/components/dropdown/_dropdown.scss +1 -1
- package/scss/components/dropdown/_index.scss +1 -1
- package/scss/components/file-uploader/_file-uploader.scss +1 -1
- package/scss/components/file-uploader/_index.scss +1 -1
- package/scss/components/fluid-combo-box/_fluid-combo-box.scss +1 -1
- package/scss/components/fluid-combo-box/_index.scss +1 -1
- package/scss/components/fluid-date-picker/_fluid-date-picker.scss +1 -1
- package/scss/components/fluid-date-picker/_index.scss +1 -1
- package/scss/components/fluid-dropdown/_fluid-dropdown.scss +1 -1
- package/scss/components/fluid-dropdown/_index.scss +1 -1
- package/scss/components/fluid-list-box/_fluid-list-box.scss +1 -1
- package/scss/components/fluid-list-box/_index.scss +1 -1
- package/scss/components/fluid-multiselect/_fluid-multiselect.scss +1 -1
- package/scss/components/fluid-multiselect/_index.scss +1 -1
- package/scss/components/fluid-number-input/_fluid-number-input.scss +1 -1
- package/scss/components/fluid-number-input/_index.scss +1 -1
- package/scss/components/fluid-search/_fluid-search.scss +1 -1
- package/scss/components/fluid-search/_index.scss +1 -1
- package/scss/components/fluid-select/_fluid-select.scss +1 -1
- package/scss/components/fluid-select/_index.scss +1 -1
- package/scss/components/fluid-text-area/_fluid-text-area.scss +1 -1
- package/scss/components/fluid-text-area/_index.scss +1 -1
- package/scss/components/fluid-text-input/_fluid-text-input.scss +1 -1
- package/scss/components/fluid-text-input/_index.scss +1 -1
- package/scss/components/fluid-time-picker/_fluid-time-picker.scss +1 -1
- package/scss/components/fluid-time-picker/_index.scss +1 -1
- package/scss/components/form/_form.scss +1 -1
- package/scss/components/form/_index.scss +1 -1
- package/scss/components/inline-loading/_index.scss +1 -1
- package/scss/components/inline-loading/_inline-loading.scss +1 -1
- package/scss/components/link/_index.scss +1 -1
- package/scss/components/link/_link.scss +1 -1
- package/scss/components/list/_index.scss +1 -1
- package/scss/components/list/_list.scss +1 -1
- package/scss/components/list-box/_index.scss +1 -1
- package/scss/components/list-box/_list-box.scss +1 -1
- package/scss/components/loading/_index.scss +1 -1
- package/scss/components/loading/_loading.scss +1 -1
- package/scss/components/menu/_index.scss +1 -1
- package/scss/components/menu/_menu.scss +1 -1
- package/scss/components/modal/_index.scss +1 -1
- package/scss/components/modal/_modal.scss +1 -1
- package/scss/components/multiselect/_index.scss +1 -1
- package/scss/components/multiselect/_multiselect.scss +1 -1
- package/scss/components/notification/_actionable-notification.scss +1 -1
- package/scss/components/notification/_index.scss +1 -1
- package/scss/components/notification/_inline-notification.scss +1 -1
- package/scss/components/notification/_toast-notification.scss +1 -1
- package/scss/components/notification/_tokens.scss +1 -1
- package/scss/components/number-input/_index.scss +1 -1
- package/scss/components/number-input/_number-input.scss +1 -1
- package/scss/components/overflow-menu/_index.scss +1 -1
- package/scss/components/overflow-menu/_overflow-menu.scss +1 -1
- package/scss/components/pagination/_index.scss +1 -1
- package/scss/components/pagination/_pagination.scss +1 -1
- package/scss/components/pagination/_unstable_pagination.scss +1 -1
- package/scss/components/pagination-nav/_index.scss +1 -1
- package/scss/components/pagination-nav/_pagination-nav.scss +1 -1
- package/scss/components/popover/_index.scss +1 -1
- package/scss/components/popover/_popover.scss +1 -1
- package/scss/components/progress-bar/_index.scss +1 -1
- package/scss/components/progress-bar/_progress-bar.scss +1 -1
- package/scss/components/progress-indicator/_index.scss +1 -1
- package/scss/components/progress-indicator/_progress-indicator.scss +1 -1
- package/scss/components/radio-button/_index.scss +1 -1
- package/scss/components/radio-button/_radio-button.scss +1 -1
- package/scss/components/search/_index.scss +1 -1
- package/scss/components/search/_search.scss +1 -1
- package/scss/components/select/_index.scss +1 -1
- package/scss/components/select/_select.scss +1 -1
- package/scss/components/skeleton-styles/_index.scss +1 -1
- package/scss/components/skeleton-styles/_skeleton-styles.scss +1 -1
- package/scss/components/slider/_index.scss +1 -1
- package/scss/components/slider/_slider.scss +1 -1
- package/scss/components/stack/_index.scss +1 -1
- package/scss/components/stack/_stack.scss +1 -1
- package/scss/components/structured-list/_index.scss +1 -1
- package/scss/components/structured-list/_structured-list.scss +1 -1
- package/scss/components/tabs/_index.scss +1 -1
- package/scss/components/tabs/_tabs.scss +1 -1
- package/scss/components/tag/_index.scss +1 -1
- package/scss/components/tag/_tag.scss +1 -1
- package/scss/components/tag/_tokens.scss +1 -1
- package/scss/components/text-area/_index.scss +1 -1
- package/scss/components/text-area/_text-area.scss +1 -1
- package/scss/components/text-input/_index.scss +1 -1
- package/scss/components/text-input/_text-input.scss +1 -1
- package/scss/components/tile/_index.scss +1 -1
- package/scss/components/tile/_tile.scss +1 -1
- package/scss/components/time-picker/_index.scss +1 -1
- package/scss/components/time-picker/_time-picker.scss +1 -1
- package/scss/components/toggle/_index.scss +1 -1
- package/scss/components/toggle/_toggle.scss +1 -1
- package/scss/components/toggletip/_index.scss +1 -1
- package/scss/components/toggletip/_toggletip.scss +1 -1
- package/scss/components/tooltip/_index.scss +1 -1
- package/scss/components/tooltip/_tooltip.scss +1 -1
- package/scss/components/treeview/_index.scss +1 -1
- package/scss/components/treeview/_treeview.scss +1 -1
- package/scss/components/ui-shell/_index.scss +1 -1
- package/scss/components/ui-shell/_ui-shell.scss +1 -1
- package/scss/components/ui-shell/content/_content.scss +1 -1
- package/scss/components/ui-shell/content/_index.scss +1 -1
- package/scss/components/ui-shell/header/_header.scss +1 -1
- package/scss/components/ui-shell/header/_index.scss +1 -1
- package/scss/components/ui-shell/header-panel/_header-panel.scss +1 -1
- package/scss/components/ui-shell/header-panel/_index.scss +1 -1
- package/scss/components/ui-shell/side-nav/_index.scss +1 -1
- package/scss/components/ui-shell/side-nav/_side-nav.scss +1 -1
- package/scss/components/ui-shell/switcher/_index.scss +1 -1
- package/scss/components/ui-shell/switcher/_switcher.scss +1 -1
- package/scss/fonts/_index.scss +1 -1
- package/scss/fonts/_mono.scss +1 -1
- package/scss/fonts/_sans-arabic.scss +1 -1
- package/scss/fonts/_sans-devanagari.scss +1 -1
- package/scss/fonts/_sans-hebrew.scss +1 -1
- package/scss/fonts/_sans-thai-looped.scss +1 -1
- package/scss/fonts/_sans-thai.scss +1 -1
- package/scss/fonts/_sans.scss +1 -1
- package/scss/fonts/_serif.scss +1 -1
- package/scss/fonts/_src.scss +1 -1
- package/scss/grid/_css-grid.scss +1 -1
- package/scss/grid/_flexbox.scss +1 -1
- package/scss/grid/_index.scss +1 -1
- package/scss/grid/_mixins.scss +1 -1
- package/scss/type/_index.scss +1 -1
- package/scss/type/_reset.scss +1 -1
- package/scss/utilities/_box-shadow.scss +1 -1
- package/scss/utilities/_button-reset.scss +1 -1
- package/scss/utilities/_component-reset.scss +1 -1
- package/scss/utilities/_component-tokens.scss +1 -1
- package/scss/utilities/_convert.scss +1 -1
- package/scss/utilities/_custom-property.scss +1 -1
- package/scss/utilities/_focus-outline.scss +1 -1
- package/scss/utilities/_hide-at-breakpoint.scss +1 -1
- package/scss/utilities/_high-contrast-mode.scss +1 -1
- package/scss/utilities/_index.scss +1 -1
- package/scss/utilities/_keyframes.scss +1 -1
- package/scss/utilities/_placeholder-colors.scss +1 -1
- package/scss/utilities/_rotate.scss +1 -1
- package/scss/utilities/_skeleton.scss +1 -1
- package/scss/utilities/_text-overflow.scss +1 -1
- package/scss/utilities/_text-truncate.scss +1 -1
- package/scss/utilities/_visually-hidden.scss +1 -1
- package/scss/utilities/_z-index.scss +1 -1
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React, { KeyboardEventHandler, PureComponent } from 'react';
|
|
8
|
+
import PropTypes, { ReactNodeLike } from 'prop-types';
|
|
9
|
+
type ExcludedAttributes = 'onChange' | 'onBlur';
|
|
10
|
+
export interface SliderProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, ExcludedAttributes> {
|
|
11
|
+
/**
|
|
12
|
+
* The `ariaLabel` for the `<input>`.
|
|
13
|
+
*/
|
|
14
|
+
ariaLabelInput?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The child nodes.
|
|
17
|
+
*/
|
|
18
|
+
children?: ReactNodeLike;
|
|
19
|
+
/**
|
|
20
|
+
* The CSS class name for the slider.
|
|
21
|
+
*/
|
|
22
|
+
className?: string;
|
|
23
|
+
/**
|
|
24
|
+
* `true` to disable this slider.
|
|
25
|
+
*/
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The callback to format the label associated with the minimum/maximum value.
|
|
29
|
+
*/
|
|
30
|
+
formatLabel?: (value: number, label: string | undefined) => string;
|
|
31
|
+
/**
|
|
32
|
+
* `true` to hide the number input box.
|
|
33
|
+
*/
|
|
34
|
+
hideTextInput?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* The ID of the `<input>`.
|
|
37
|
+
*/
|
|
38
|
+
id?: string;
|
|
39
|
+
/**
|
|
40
|
+
* The `type` attribute of the `<input>`.
|
|
41
|
+
*/
|
|
42
|
+
inputType?: string;
|
|
43
|
+
/**
|
|
44
|
+
* `true` to specify if the control is invalid.
|
|
45
|
+
*/
|
|
46
|
+
invalid?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* The label for the slider.
|
|
49
|
+
*/
|
|
50
|
+
labelText?: ReactNodeLike;
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated
|
|
53
|
+
* `true` to use the light version.
|
|
54
|
+
*/
|
|
55
|
+
light?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* The maximum value.
|
|
58
|
+
*/
|
|
59
|
+
max: number;
|
|
60
|
+
/**
|
|
61
|
+
* The label associated with the maximum value.
|
|
62
|
+
*/
|
|
63
|
+
maxLabel?: string;
|
|
64
|
+
/**
|
|
65
|
+
* The minimum value.
|
|
66
|
+
*/
|
|
67
|
+
min: number;
|
|
68
|
+
/**
|
|
69
|
+
* The label associated with the minimum value.
|
|
70
|
+
*/
|
|
71
|
+
minLabel?: string;
|
|
72
|
+
/**
|
|
73
|
+
* The `name` attribute of the `<input>`.
|
|
74
|
+
*/
|
|
75
|
+
name?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Provide an optional function to be called when the input element
|
|
78
|
+
* loses focus
|
|
79
|
+
*/
|
|
80
|
+
onBlur?: (data: {
|
|
81
|
+
value: string;
|
|
82
|
+
}) => void;
|
|
83
|
+
/**
|
|
84
|
+
* The callback to get notified of change in value.
|
|
85
|
+
* `({ value}) => void`
|
|
86
|
+
// * @param {{ value }}
|
|
87
|
+
*/
|
|
88
|
+
onChange?: (data: {
|
|
89
|
+
value: SliderProps['value'];
|
|
90
|
+
}) => void;
|
|
91
|
+
/**
|
|
92
|
+
* Provide an optional function to be called when a key is pressed in the number input
|
|
93
|
+
*/
|
|
94
|
+
onInputKeyUp?: KeyboardEventHandler<HTMLInputElement>;
|
|
95
|
+
/**
|
|
96
|
+
* The callback to get notified of value on handle release.
|
|
97
|
+
*/
|
|
98
|
+
onRelease?: (data: {
|
|
99
|
+
value: SliderProps['value'];
|
|
100
|
+
}) => void;
|
|
101
|
+
/**
|
|
102
|
+
* Whether the slider should be read-only
|
|
103
|
+
*/
|
|
104
|
+
readOnly?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* `true` to specify if the control is required.
|
|
107
|
+
*/
|
|
108
|
+
required?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* A value determining how much the value should increase/decrease by moving the thumb by mouse. If a value other than 1 is provided and the input is *not* hidden, the new step requirement should be added to a visible label. Values outside of the `step` increment will be considered invalid.
|
|
111
|
+
*/
|
|
112
|
+
step?: number;
|
|
113
|
+
/**
|
|
114
|
+
* A value determining how much the value should increase/decrease by Shift+arrow keys,
|
|
115
|
+
* which will be `(max - min) / stepMultiplier`.
|
|
116
|
+
*/
|
|
117
|
+
stepMultiplier?: number;
|
|
118
|
+
/**
|
|
119
|
+
* The value.
|
|
120
|
+
*/
|
|
121
|
+
value: number;
|
|
122
|
+
}
|
|
123
|
+
interface CalcValueProps {
|
|
124
|
+
clientX?: number;
|
|
125
|
+
value?: number;
|
|
126
|
+
useRawValue?: boolean;
|
|
127
|
+
}
|
|
128
|
+
export default class Slider extends PureComponent<SliderProps> {
|
|
129
|
+
static propTypes: {
|
|
130
|
+
/**
|
|
131
|
+
* The `ariaLabel` for the `<input>`.
|
|
132
|
+
*/
|
|
133
|
+
ariaLabelInput: PropTypes.Requireable<string>;
|
|
134
|
+
/**
|
|
135
|
+
* The child nodes.
|
|
136
|
+
*/
|
|
137
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
138
|
+
/**
|
|
139
|
+
* The CSS class name for the slider.
|
|
140
|
+
*/
|
|
141
|
+
className: PropTypes.Requireable<string>;
|
|
142
|
+
/**
|
|
143
|
+
* `true` to disable this slider.
|
|
144
|
+
*/
|
|
145
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
146
|
+
/**
|
|
147
|
+
* The callback to format the label associated with the minimum/maximum value.
|
|
148
|
+
*/
|
|
149
|
+
formatLabel: PropTypes.Requireable<(...args: any[]) => any>;
|
|
150
|
+
/**
|
|
151
|
+
* `true` to hide the number input box.
|
|
152
|
+
*/
|
|
153
|
+
hideTextInput: PropTypes.Requireable<boolean>;
|
|
154
|
+
/**
|
|
155
|
+
* The ID of the `<input>`.
|
|
156
|
+
*/
|
|
157
|
+
id: PropTypes.Requireable<string>;
|
|
158
|
+
/**
|
|
159
|
+
* The `type` attribute of the `<input>`.
|
|
160
|
+
*/
|
|
161
|
+
inputType: PropTypes.Requireable<string>;
|
|
162
|
+
/**
|
|
163
|
+
* `true` to specify if the control is invalid.
|
|
164
|
+
*/
|
|
165
|
+
invalid: PropTypes.Requireable<boolean>;
|
|
166
|
+
/**
|
|
167
|
+
* The label for the slider.
|
|
168
|
+
*/
|
|
169
|
+
labelText: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
170
|
+
/**
|
|
171
|
+
* `true` to use the light version.
|
|
172
|
+
*/
|
|
173
|
+
light: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
|
|
174
|
+
/**
|
|
175
|
+
* The maximum value.
|
|
176
|
+
*/
|
|
177
|
+
max: PropTypes.Validator<number>;
|
|
178
|
+
/**
|
|
179
|
+
* The label associated with the maximum value.
|
|
180
|
+
*/
|
|
181
|
+
maxLabel: PropTypes.Requireable<string>;
|
|
182
|
+
/**
|
|
183
|
+
* The minimum value.
|
|
184
|
+
*/
|
|
185
|
+
min: PropTypes.Validator<number>;
|
|
186
|
+
/**
|
|
187
|
+
* The label associated with the minimum value.
|
|
188
|
+
*/
|
|
189
|
+
minLabel: PropTypes.Requireable<string>;
|
|
190
|
+
/**
|
|
191
|
+
* The `name` attribute of the `<input>`.
|
|
192
|
+
*/
|
|
193
|
+
name: PropTypes.Requireable<string>;
|
|
194
|
+
/**
|
|
195
|
+
* Provide an optional function to be called when the input element
|
|
196
|
+
* loses focus
|
|
197
|
+
*/
|
|
198
|
+
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
199
|
+
/**
|
|
200
|
+
* The callback to get notified of change in value.
|
|
201
|
+
*/
|
|
202
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
203
|
+
/**
|
|
204
|
+
* Provide an optional function to be called when a key is pressed in the number input
|
|
205
|
+
*/
|
|
206
|
+
onInputKeyUp: PropTypes.Requireable<(...args: any[]) => any>;
|
|
207
|
+
/**
|
|
208
|
+
* The callback to get notified of value on handle release.
|
|
209
|
+
*/
|
|
210
|
+
onRelease: PropTypes.Requireable<(...args: any[]) => any>;
|
|
211
|
+
/**
|
|
212
|
+
* Whether the slider should be read-only
|
|
213
|
+
*/
|
|
214
|
+
readOnly: PropTypes.Requireable<boolean>;
|
|
215
|
+
/**
|
|
216
|
+
* `true` to specify if the control is required.
|
|
217
|
+
*/
|
|
218
|
+
required: PropTypes.Requireable<boolean>;
|
|
219
|
+
/**
|
|
220
|
+
* A value determining how much the value should increase/decrease by moving the thumb by mouse. If a value other than 1 is provided and the input is *not* hidden, the new step requirement should be added to a visible label. Values outside of the `step` increment will be considered invalid.
|
|
221
|
+
*/
|
|
222
|
+
step: PropTypes.Requireable<number>;
|
|
223
|
+
/**
|
|
224
|
+
* A value determining how much the value should increase/decrease by Shift+arrow keys,
|
|
225
|
+
* which will be `(max - min) / stepMultiplier`.
|
|
226
|
+
*/
|
|
227
|
+
stepMultiplier: PropTypes.Requireable<number>;
|
|
228
|
+
/**
|
|
229
|
+
* The value.
|
|
230
|
+
*/
|
|
231
|
+
value: PropTypes.Validator<number>;
|
|
232
|
+
};
|
|
233
|
+
static defaultProps: {
|
|
234
|
+
hideTextInput: boolean;
|
|
235
|
+
step: number;
|
|
236
|
+
stepMultiplier: number;
|
|
237
|
+
disabled: boolean;
|
|
238
|
+
minLabel: string;
|
|
239
|
+
maxLabel: string;
|
|
240
|
+
inputType: string;
|
|
241
|
+
ariaLabelInput: string | undefined;
|
|
242
|
+
readOnly: boolean;
|
|
243
|
+
};
|
|
244
|
+
static contextType: React.Context<any>;
|
|
245
|
+
state: {
|
|
246
|
+
value: number;
|
|
247
|
+
left: number;
|
|
248
|
+
needsOnRelease: boolean;
|
|
249
|
+
isValid: boolean;
|
|
250
|
+
};
|
|
251
|
+
thumbRef: React.RefObject<HTMLDivElement>;
|
|
252
|
+
filledTrackRef: React.RefObject<HTMLDivElement>;
|
|
253
|
+
element: HTMLDivElement | null;
|
|
254
|
+
inputId: string;
|
|
255
|
+
track: HTMLDivElement | null | undefined;
|
|
256
|
+
constructor(props: any);
|
|
257
|
+
/**
|
|
258
|
+
* Sets up initial slider position and value in response to component mount.
|
|
259
|
+
*/
|
|
260
|
+
componentDidMount(): void;
|
|
261
|
+
/**
|
|
262
|
+
* Handles firing of `onChange` and `onRelease` callbacks to parent in
|
|
263
|
+
* response to state changes.
|
|
264
|
+
*
|
|
265
|
+
* @param {*} prevProps prevProps
|
|
266
|
+
* @param {*} prevState The previous Slider state, used to see if callbacks
|
|
267
|
+
* should be called.
|
|
268
|
+
*/
|
|
269
|
+
componentDidUpdate(prevProps: any, prevState: any): void;
|
|
270
|
+
/**
|
|
271
|
+
* Synonymous to ECMA2017+ `Math.clamp`.
|
|
272
|
+
*
|
|
273
|
+
* @param {number} val
|
|
274
|
+
* @param {number} min
|
|
275
|
+
* @param {number} max
|
|
276
|
+
*
|
|
277
|
+
* @returns `val` if `max>=val>=min`; `min` if `val<min`; `max` if `val>max`.
|
|
278
|
+
*/
|
|
279
|
+
clamp(val: any, min: any, max: any): number;
|
|
280
|
+
/**
|
|
281
|
+
* Sets up "drag" event handlers and calls `this.onDrag` in case dragging
|
|
282
|
+
* started on somewhere other than the thumb without a corresponding "move"
|
|
283
|
+
* event.
|
|
284
|
+
*
|
|
285
|
+
* @param {Event} evt The event.
|
|
286
|
+
*/
|
|
287
|
+
onDragStart: (evt: any) => void;
|
|
288
|
+
/**
|
|
289
|
+
* Unregisters "drag" and "drag stop" event handlers and calls sets the flag
|
|
290
|
+
* indicating that the `onRelease` callback should be called.
|
|
291
|
+
*/
|
|
292
|
+
onDragStop: () => void;
|
|
293
|
+
/**
|
|
294
|
+
* Handles a "drag" event by recalculating the value/thumb and setting state
|
|
295
|
+
* accordingly.
|
|
296
|
+
*
|
|
297
|
+
* @param {Event} evt The event.
|
|
298
|
+
*/
|
|
299
|
+
_onDrag: (evt: any) => void;
|
|
300
|
+
/**
|
|
301
|
+
* Throttles calls to `this._onDrag` by limiting events to being processed at
|
|
302
|
+
* most once every `EVENT_THROTTLE` milliseconds.
|
|
303
|
+
*/
|
|
304
|
+
onDrag: any;
|
|
305
|
+
/**
|
|
306
|
+
* Handles a `keydown` event by recalculating the value/thumb and setting
|
|
307
|
+
* state accordingly.
|
|
308
|
+
*
|
|
309
|
+
* @param {Event} evt The event.
|
|
310
|
+
*/
|
|
311
|
+
onKeyDown: (evt: any) => void;
|
|
312
|
+
/**
|
|
313
|
+
* Provides the two-way binding for the input field of the Slider. It also
|
|
314
|
+
* Handles a change to the input field by recalculating the value/thumb and
|
|
315
|
+
* setting state accordingly.
|
|
316
|
+
*
|
|
317
|
+
* @param {Event} evt The event.
|
|
318
|
+
*/
|
|
319
|
+
onChange: (evt: any) => void;
|
|
320
|
+
/**
|
|
321
|
+
* Checks for validity of input value after clicking out of the input. It also
|
|
322
|
+
* Handles state change to isValid state.
|
|
323
|
+
*
|
|
324
|
+
* @param {Event} evt The event.
|
|
325
|
+
*/
|
|
326
|
+
onBlur: (evt: React.FocusEvent<HTMLInputElement>) => void;
|
|
327
|
+
/**
|
|
328
|
+
* Calculates a new Slider `value` and `left` (thumb offset) given a `clientX`,
|
|
329
|
+
* `value`, or neither of those.
|
|
330
|
+
* - If `clientX` is specified, it will be used in
|
|
331
|
+
* conjunction with the Slider's bounding rectangle to calculate the new
|
|
332
|
+
* values.
|
|
333
|
+
* - If `clientX` is not specified and `value` is, it will be used to
|
|
334
|
+
* calculate new values as though it were the current value of the Slider.
|
|
335
|
+
* - If neither `clientX` nor `value` are specified, `this.props.value` will
|
|
336
|
+
* be used to calculate the new values as though it were the current value
|
|
337
|
+
* of the Slider.
|
|
338
|
+
*
|
|
339
|
+
* @param {object} params
|
|
340
|
+
* @param {number} [params.clientX] Optional clientX value expected to be from
|
|
341
|
+
* an event fired by one of the Slider's `DRAG_EVENT_TYPES` events.
|
|
342
|
+
* @param {number} [params.value] Optional value use during calculations if
|
|
343
|
+
* clientX is not provided.
|
|
344
|
+
* @param {boolean} [params.useRawValue=false] `true` to use the given value as-is.
|
|
345
|
+
*/
|
|
346
|
+
calcValue: ({ clientX, value, useRawValue }: CalcValueProps) => {
|
|
347
|
+
value: number | undefined;
|
|
348
|
+
left: number;
|
|
349
|
+
};
|
|
350
|
+
static getDerivedStateFromProps(props: any, state: any): {
|
|
351
|
+
isValid: boolean;
|
|
352
|
+
} | null;
|
|
353
|
+
render(): JSX.Element;
|
|
354
|
+
}
|
|
355
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2023
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -89,6 +89,16 @@ var Slider = /*#__PURE__*/function (_PureComponent) {
|
|
|
89
89
|
isValid: true
|
|
90
90
|
});
|
|
91
91
|
|
|
92
|
+
_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.assertThisInitialized(_this), "thumbRef", void 0);
|
|
93
|
+
|
|
94
|
+
_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.assertThisInitialized(_this), "filledTrackRef", void 0);
|
|
95
|
+
|
|
96
|
+
_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.assertThisInitialized(_this), "element", null);
|
|
97
|
+
|
|
98
|
+
_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.assertThisInitialized(_this), "inputId", '');
|
|
99
|
+
|
|
100
|
+
_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.assertThisInitialized(_this), "track", void 0);
|
|
101
|
+
|
|
92
102
|
_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.assertThisInitialized(_this), "onDragStart", function (evt) {
|
|
93
103
|
// Do nothing if component is disabled
|
|
94
104
|
if (_this.props.disabled || _this.props.readOnly) {
|
|
@@ -97,11 +107,15 @@ var Slider = /*#__PURE__*/function (_PureComponent) {
|
|
|
97
107
|
|
|
98
108
|
|
|
99
109
|
DRAG_STOP_EVENT_TYPES.forEach(function (element) {
|
|
100
|
-
_this
|
|
110
|
+
var _this$element;
|
|
111
|
+
|
|
112
|
+
(_this$element = _this.element) === null || _this$element === void 0 ? void 0 : _this$element.ownerDocument.addEventListener(element, _this.onDragStop);
|
|
101
113
|
}); // Register drag handlers
|
|
102
114
|
|
|
103
115
|
DRAG_EVENT_TYPES.forEach(function (element) {
|
|
104
|
-
|
|
116
|
+
var _this$element2;
|
|
117
|
+
|
|
118
|
+
(_this$element2 = _this.element) === null || _this$element2 === void 0 ? void 0 : _this$element2.ownerDocument.addEventListener(element, _this.onDrag);
|
|
105
119
|
}); // Perform first recalculation since we probably didn't click exactly in the
|
|
106
120
|
// middle of the thumb
|
|
107
121
|
|
|
@@ -116,11 +130,15 @@ var Slider = /*#__PURE__*/function (_PureComponent) {
|
|
|
116
130
|
|
|
117
131
|
|
|
118
132
|
DRAG_STOP_EVENT_TYPES.forEach(function (element) {
|
|
119
|
-
|
|
133
|
+
var _this$element3;
|
|
134
|
+
|
|
135
|
+
(_this$element3 = _this.element) === null || _this$element3 === void 0 ? void 0 : _this$element3.ownerDocument.removeEventListener(element, _this.onDragStop);
|
|
120
136
|
}); // Remove drag handlers
|
|
121
137
|
|
|
122
138
|
DRAG_EVENT_TYPES.forEach(function (element) {
|
|
123
|
-
|
|
139
|
+
var _this$element4;
|
|
140
|
+
|
|
141
|
+
(_this$element4 = _this.element) === null || _this$element4 === void 0 ? void 0 : _this$element4.ownerDocument.removeEventListener(element, _this.onDrag);
|
|
124
142
|
}); // Set needsOnRelease flag so event fires on next update
|
|
125
143
|
|
|
126
144
|
_this.setState({
|
|
@@ -165,18 +183,23 @@ var Slider = /*#__PURE__*/function (_PureComponent) {
|
|
|
165
183
|
}));
|
|
166
184
|
|
|
167
185
|
_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.assertThisInitialized(_this), "onKeyDown", function (evt) {
|
|
186
|
+
var _this$props$step3, _this$props$step4, _this$props$step5, _this$props$step6;
|
|
187
|
+
|
|
168
188
|
// Do nothing if component is disabled or we don't have a valid event
|
|
169
189
|
if (_this.props.disabled || _this.props.readOnly || !('which' in evt)) {
|
|
170
190
|
return;
|
|
171
191
|
}
|
|
172
192
|
|
|
173
|
-
var which = Number.parseInt(evt.which);
|
|
174
193
|
var delta = 0;
|
|
175
194
|
|
|
176
|
-
if (match.matches(which, [keys.ArrowDown, keys.ArrowLeft])) {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
delta = _this.props.step;
|
|
195
|
+
if (match.matches(evt.which, [keys.ArrowDown, keys.ArrowLeft])) {
|
|
196
|
+
var _this$props$step;
|
|
197
|
+
|
|
198
|
+
delta = -((_this$props$step = _this.props.step) !== null && _this$props$step !== void 0 ? _this$props$step : Slider.defaultProps.step);
|
|
199
|
+
} else if (match.matches(evt.which, [keys.ArrowUp, keys.ArrowRight])) {
|
|
200
|
+
var _this$props$step2;
|
|
201
|
+
|
|
202
|
+
delta = (_this$props$step2 = _this.props.step) !== null && _this$props$step2 !== void 0 ? _this$props$step2 : Slider.defaultProps.step;
|
|
180
203
|
} else {
|
|
181
204
|
// Ignore keys we don't want to handle
|
|
182
205
|
return;
|
|
@@ -185,15 +208,15 @@ var Slider = /*#__PURE__*/function (_PureComponent) {
|
|
|
185
208
|
|
|
186
209
|
if (evt.shiftKey) {
|
|
187
210
|
var stepMultiplier = _this.props.stepMultiplier;
|
|
188
|
-
delta *= stepMultiplier;
|
|
211
|
+
delta *= stepMultiplier !== null && stepMultiplier !== void 0 ? stepMultiplier : Slider.defaultProps.stepMultiplier;
|
|
189
212
|
}
|
|
190
213
|
|
|
191
|
-
Math.floor(_this.state.value / _this.props.step) * _this.props.step;
|
|
214
|
+
Math.floor(_this.state.value / ((_this$props$step3 = _this.props.step) !== null && _this$props$step3 !== void 0 ? _this$props$step3 : Slider.defaultProps.step)) * ((_this$props$step4 = _this.props.step) !== null && _this$props$step4 !== void 0 ? _this$props$step4 : Slider.defaultProps.step);
|
|
192
215
|
|
|
193
216
|
var _this$calcValue2 = _this.calcValue({
|
|
194
217
|
// Ensures custom value from `<input>` won't cause skipping next stepping point with right arrow key,
|
|
195
218
|
// e.g. Typing 51 in `<input>`, moving focus onto the thumb and the hitting right arrow key should yield 52 instead of 54
|
|
196
|
-
value: (delta > 0 ? Math.floor(_this.state.value / _this.props.step) * _this.props.step : _this.state.value) + delta
|
|
219
|
+
value: (delta > 0 ? Math.floor(_this.state.value / ((_this$props$step5 = _this.props.step) !== null && _this$props$step5 !== void 0 ? _this$props$step5 : Slider.defaultProps.step)) * ((_this$props$step6 = _this.props.step) !== null && _this$props$step6 !== void 0 ? _this$props$step6 : Slider.defaultProps.step) : _this.state.value) + delta
|
|
197
220
|
}),
|
|
198
221
|
value = _this$calcValue2.value,
|
|
199
222
|
left = _this$calcValue2.left;
|
|
@@ -227,11 +250,11 @@ var Slider = /*#__PURE__*/function (_PureComponent) {
|
|
|
227
250
|
value: targetValue,
|
|
228
251
|
useRawValue: true
|
|
229
252
|
}),
|
|
230
|
-
|
|
253
|
+
_value = _this$calcValue3.value,
|
|
231
254
|
left = _this$calcValue3.left;
|
|
232
255
|
|
|
233
256
|
_this.setState({
|
|
234
|
-
value:
|
|
257
|
+
value: _value,
|
|
235
258
|
left: left
|
|
236
259
|
});
|
|
237
260
|
}
|
|
@@ -259,18 +282,16 @@ var Slider = /*#__PURE__*/function (_PureComponent) {
|
|
|
259
282
|
});
|
|
260
283
|
|
|
261
284
|
_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.assertThisInitialized(_this), "calcValue", function (_ref) {
|
|
262
|
-
var
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
value = _ref
|
|
285
|
+
var _this$element5, _this$element5$getBou, _this$props$step7, _this$props$step8;
|
|
286
|
+
|
|
287
|
+
var clientX = _ref.clientX,
|
|
288
|
+
value = _ref.value,
|
|
266
289
|
_ref$useRawValue = _ref.useRawValue,
|
|
267
290
|
useRawValue = _ref$useRawValue === void 0 ? false : _ref$useRawValue;
|
|
268
291
|
var range = _this.props.max - _this.props.min;
|
|
269
|
-
|
|
270
|
-
var
|
|
271
|
-
|
|
272
|
-
var totalSteps = range / _this.props.step;
|
|
273
|
-
var width = boundingRect.right - boundingRect.left; // Enforce a minimum width of at least 1 for calculations
|
|
292
|
+
var boundingRect = (_this$element5 = _this.element) === null || _this$element5 === void 0 ? void 0 : (_this$element5$getBou = _this$element5.getBoundingClientRect) === null || _this$element5$getBou === void 0 ? void 0 : _this$element5$getBou.call(_this$element5);
|
|
293
|
+
var totalSteps = range / ((_this$props$step7 = _this.props.step) !== null && _this$props$step7 !== void 0 ? _this$props$step7 : Slider.defaultProps.step);
|
|
294
|
+
var width = boundingRect ? boundingRect.right - boundingRect.left : 0; // Enforce a minimum width of at least 1 for calculations
|
|
274
295
|
|
|
275
296
|
if (width <= 0) {
|
|
276
297
|
width = 1;
|
|
@@ -281,7 +302,9 @@ var Slider = /*#__PURE__*/function (_PureComponent) {
|
|
|
281
302
|
var leftPercent;
|
|
282
303
|
|
|
283
304
|
if (clientX != null) {
|
|
284
|
-
var
|
|
305
|
+
var _boundingRect$left;
|
|
306
|
+
|
|
307
|
+
var leftOffset = clientX - ((_boundingRect$left = boundingRect === null || boundingRect === void 0 ? void 0 : boundingRect.left) !== null && _boundingRect$left !== void 0 ? _boundingRect$left : 0);
|
|
285
308
|
leftPercent = leftOffset / width;
|
|
286
309
|
} else {
|
|
287
310
|
if (value == null) {
|
|
@@ -300,7 +323,7 @@ var Slider = /*#__PURE__*/function (_PureComponent) {
|
|
|
300
323
|
};
|
|
301
324
|
}
|
|
302
325
|
|
|
303
|
-
var steppedValue = Math.round(leftPercent * totalSteps) * _this.props.step;
|
|
326
|
+
var steppedValue = Math.round(leftPercent * totalSteps) * ((_this$props$step8 = _this.props.step) !== null && _this$props$step8 !== void 0 ? _this$props$step8 : Slider.defaultProps.step);
|
|
304
327
|
|
|
305
328
|
var steppedPercent = _this.clamp(steppedValue / range, 0, 1);
|
|
306
329
|
|
|
@@ -327,11 +350,11 @@ var Slider = /*#__PURE__*/function (_PureComponent) {
|
|
|
327
350
|
var _this$calcValue4 = this.calcValue({
|
|
328
351
|
useRawValue: true
|
|
329
352
|
}),
|
|
330
|
-
|
|
353
|
+
_value2 = _this$calcValue4.value,
|
|
331
354
|
left = _this$calcValue4.left;
|
|
332
355
|
|
|
333
356
|
this.setState({
|
|
334
|
-
value:
|
|
357
|
+
value: _value2,
|
|
335
358
|
left: left
|
|
336
359
|
});
|
|
337
360
|
}
|
|
@@ -350,10 +373,15 @@ var Slider = /*#__PURE__*/function (_PureComponent) {
|
|
|
350
373
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
351
374
|
// Fire onChange event handler if present, if there's a usable value, and
|
|
352
375
|
// if the value is different from the last one
|
|
353
|
-
this.thumbRef.current
|
|
354
|
-
|
|
376
|
+
if (this.thumbRef.current) {
|
|
377
|
+
this.thumbRef.current.style.left = "".concat(this.state.left, "%");
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
if (this.filledTrackRef.current) {
|
|
381
|
+
this.filledTrackRef.current.style.transform = "translate(0%, -50%) scaleX(".concat(this.state.left / 100, ")");
|
|
382
|
+
}
|
|
355
383
|
|
|
356
|
-
if (
|
|
384
|
+
if (prevState.value !== this.state.value && typeof this.props.onChange === 'function') {
|
|
357
385
|
this.props.onChange({
|
|
358
386
|
value: this.state.value
|
|
359
387
|
});
|
|
@@ -498,8 +526,8 @@ var Slider = /*#__PURE__*/function (_PureComponent) {
|
|
|
498
526
|
name: name,
|
|
499
527
|
className: inputClasses,
|
|
500
528
|
value: value,
|
|
501
|
-
"aria-labelledby": !ariaLabelInput ? labelId :
|
|
502
|
-
"aria-label": ariaLabelInput ? ariaLabelInput :
|
|
529
|
+
"aria-labelledby": !ariaLabelInput ? labelId : undefined,
|
|
530
|
+
"aria-label": ariaLabelInput ? ariaLabelInput : undefined,
|
|
503
531
|
disabled: disabled,
|
|
504
532
|
required: required,
|
|
505
533
|
min: min,
|
|
@@ -507,9 +535,9 @@ var Slider = /*#__PURE__*/function (_PureComponent) {
|
|
|
507
535
|
step: step,
|
|
508
536
|
onChange: _this2.onChange,
|
|
509
537
|
onBlur: _this2.onBlur,
|
|
510
|
-
onKeyUp: _this2.onInputKeyUp,
|
|
538
|
+
onKeyUp: _this2.props.onInputKeyUp,
|
|
511
539
|
"data-invalid": isValid ? null : true,
|
|
512
|
-
"aria-invalid": isValid ?
|
|
540
|
+
"aria-invalid": isValid ? undefined : true,
|
|
513
541
|
readOnly: readOnly
|
|
514
542
|
})));
|
|
515
543
|
});
|