@qualtrics/ui-react 2.79.1 → 2.80.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/CHANGELOG.md +13 -0
- package/dist/__node_modules/@radix-ui/primitive/dist/index.js +5 -6
- package/dist/__node_modules/@radix-ui/react-arrow/dist/index.js +8 -7
- package/dist/__node_modules/@radix-ui/react-collection/dist/index.js +71 -63
- package/dist/__node_modules/@radix-ui/react-context/dist/index.js +10 -14
- package/dist/__node_modules/@radix-ui/react-direction/dist/index.js +2 -4
- package/dist/__node_modules/@radix-ui/react-dismissable-layer/dist/index.js +22 -15
- package/dist/__node_modules/@radix-ui/react-dropdown-menu/dist/index.js +89 -89
- package/dist/__node_modules/@radix-ui/react-focus-scope/dist/index.js +26 -19
- package/dist/__node_modules/@radix-ui/react-id/dist/index.js +5 -2
- package/dist/__node_modules/@radix-ui/react-menu/dist/index.js +165 -129
- package/dist/__node_modules/@radix-ui/react-popper/dist/index.js +139 -106
- package/dist/__node_modules/@radix-ui/react-portal/dist/index.js +9 -5
- package/dist/__node_modules/@radix-ui/react-presence/dist/index.js +27 -20
- package/dist/__node_modules/@radix-ui/react-primitive/dist/index.js +4 -5
- package/dist/__node_modules/@radix-ui/react-roving-focus/dist/index.js +61 -38
- package/dist/__node_modules/@radix-ui/react-slot/dist/index.js +8 -12
- package/dist/__node_modules/@radix-ui/react-use-controllable-state/dist/index.js +40 -35
- package/dist/__node_modules/@radix-ui/react-use-size/dist/index.js +5 -2
- package/dist/__shared/cjs/{index-d4ec6b6f.js → index-807921ca.js} +2829 -2634
- package/dist/__shared/cjs/{index-91d2f6f8.js → index-8c77a9ef.js} +15 -9
- package/dist/components/Accordion/Accordion.js +27 -21
- package/dist/components/Accordion/Accordion2.js +3 -3
- package/dist/components/Accordion/AccordionContext.js +6 -8
- package/dist/components/Accordion/AccordionHeader.js +13 -17
- package/dist/components/Accordion/AccordionPanel.js +7 -11
- package/dist/components/Accordion/AccordionSection.js +14 -11
- package/dist/components/Banner/Banner.js +10 -11
- package/dist/components/Banner/BannerBody.js +1 -3
- package/dist/components/Banner/BannerFooter.js +1 -3
- package/dist/components/Banner/BannerTitle.js +1 -3
- package/dist/components/BreakpointSwitch/Breakpoint.js +2 -5
- package/dist/components/BreakpointSwitch/BreakpointContext.js +3 -4
- package/dist/components/BreakpointSwitch/BreakpointSwitch.js +1 -3
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/Button/Button2.js +19 -13
- package/dist/components/ButtonGroup/ButtonGroup.js +7 -7
- package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
- package/dist/components/Checkbox/Check.js +8 -6
- package/dist/components/Checkbox/Checkbox.js +31 -28
- package/dist/components/Checkbox/Checkbox2.js +3 -3
- package/dist/components/Checkbox/CheckboxField.js +14 -13
- package/dist/components/ColorPicker/Alpha.js +8 -12
- package/dist/components/ColorPicker/ColorPicker.js +67 -48
- package/dist/components/ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/ColorPicker/ColorPickerFlyout.js +23 -24
- package/dist/components/ColorPicker/ColorPickerFlyoutInputs.js +27 -22
- package/dist/components/ColorPicker/ColorPickerWIthNoColor.js +11 -7
- package/dist/components/ColorPicker/Hue.js +9 -13
- package/dist/components/ColorPicker/Palette.js +23 -21
- package/dist/components/ColorPicker/Saturation.js +11 -15
- package/dist/components/ColorPicker/utils/hexToHsv.js +4 -5
- package/dist/components/ColorPicker/utils/hsvToHex.js +3 -5
- package/dist/components/ColorPicker/utils/rgbToHex.js +3 -5
- package/dist/components/Combobox/Combobox.js +166 -133
- package/dist/components/Combobox/Combobox2.js +3 -3
- package/dist/components/Combobox/ComboboxContext.js +3 -4
- package/dist/components/Combobox/ComboboxHeader.js +6 -6
- package/dist/components/Combobox/ComboboxIcon.js +14 -14
- package/dist/components/Combobox/ComboboxInput.js +41 -43
- package/dist/components/Combobox/ComboboxList.js +20 -20
- package/dist/components/Combobox/ComboboxOption.js +9 -10
- package/dist/components/ConfigPane/ConfigPane.js +52 -36
- package/dist/components/ConfigPane/ConfigPane2.js +3 -3
- package/dist/components/Divider/Divider.js +4 -4
- package/dist/components/Divider/Divider2.js +3 -3
- package/dist/components/Dropdown/ChildIndexContext/index.js +7 -9
- package/dist/components/Dropdown/ChildIndexContext/reach-descendants.js +18 -21
- package/dist/components/Dropdown/Dropdown.js +68 -43
- package/dist/components/Dropdown/Dropdown2.js +3 -3
- package/dist/components/Dropdown/DropdownButton.js +53 -47
- package/dist/components/Dropdown/DropdownContext.js +3 -4
- package/dist/components/Dropdown/DropdownHeader.js +12 -9
- package/dist/components/Dropdown/DropdownHeaderContext.js +3 -4
- package/dist/components/Dropdown/DropdownList.js +32 -32
- package/dist/components/Dropdown/DropdownOption.js +32 -30
- package/dist/components/Dropdown/DropdownSearch.js +12 -14
- package/dist/components/FilePicker/FilePicker.js +30 -25
- package/dist/components/FilePicker/FilePicker2.js +3 -3
- package/dist/components/FormField/Caption.js +3 -3
- package/dist/components/FormField/ErrorText.js +5 -5
- package/dist/components/FormField/FormField.js +27 -14
- package/dist/components/FormField/FormField2.js +3 -3
- package/dist/components/FormField/FormFieldContext.js +6 -13
- package/dist/components/FormField/HelperText.js +5 -5
- package/dist/components/FormField/ReadOnlyText.js +4 -6
- package/dist/components/FullScreenTakeover/FullScreenTakeover.js +22 -15
- package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
- package/dist/components/Icon/Icon.js +6 -5
- package/dist/components/Icon/IconTypes.js +1 -0
- package/dist/components/IconButton/IconButton.js +25 -16
- package/dist/components/IconButton/IconButton2.js +3 -3
- package/dist/components/InlineInput/InlineInput.js +25 -14
- package/dist/components/InlineInput/InlineInput2.js +3 -3
- package/dist/components/Input/Input.js +42 -29
- package/dist/components/Input/Input2.js +3 -3
- package/dist/components/Input/InputField.js +26 -21
- package/dist/components/InputGroup/InputGroup.js +7 -7
- package/dist/components/InputGroup/InputGroup2.js +3 -3
- package/dist/components/InputGroup/InputGroupAddon.js +7 -6
- package/dist/components/InputGroup/InputGroupProvider.js +5 -8
- package/dist/components/Label/Label.js +8 -9
- package/dist/components/Label/Label2.js +3 -3
- package/dist/components/Link/Link.js +9 -7
- package/dist/components/Link/Link2.js +3 -3
- package/dist/components/LoadingSpinner/LoadingSpinner.js +22 -17
- package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
- package/dist/components/LogicEditor/ConditionContainer.js +8 -10
- package/dist/components/LogicEditor/ConditionSet.js +16 -21
- package/dist/components/LogicEditor/Controls.js +17 -20
- package/dist/components/LogicEditor/LogicEditor.js +33 -24
- package/dist/components/LogicEditor/LogicEditor2.js +3 -3
- package/dist/components/LogicEditor/LogicEditorContext.js +3 -4
- package/dist/components/LogicEditor/utils.js +5 -9
- package/dist/components/Modal/Modal.js +63 -49
- package/dist/components/Modal/Modal2.js +3 -3
- package/dist/components/Modal/ModalBody.js +5 -5
- package/dist/components/Modal/ModalContext.js +3 -4
- package/dist/components/Modal/ModalFooter.js +5 -5
- package/dist/components/Modal/ModalHeader.js +10 -12
- package/dist/components/NewMenu/BaseMenu.js +83 -54
- package/dist/components/NewMenu/Menu/Menu.js +10 -12
- package/dist/components/NewMenu/NewMenu.js +3 -3
- package/dist/components/NewMenu/SelectMenu/SelectMenu.js +6 -7
- package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +35 -30
- package/dist/components/NewMenu/parts/MenuAnchor.js +15 -16
- package/dist/components/NewMenu/parts/MenuContext.js +3 -4
- package/dist/components/NewMenu/parts/MenuItem.js +23 -17
- package/dist/components/NewMenu/parts/MenuSearchBox.js +4 -6
- package/dist/components/NewMenu/parts/SubmenuAnchor.js +5 -5
- package/dist/components/NumberStepper/NumberStepper.js +42 -37
- package/dist/components/NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/NumberStepper/NumberStepperContext.js +3 -4
- package/dist/components/NumberStepper/NumberStepperDecrement.js +13 -15
- package/dist/components/NumberStepper/NumberStepperIncrement.js +13 -15
- package/dist/components/NumberStepper/NumberStepperInput.js +28 -30
- package/dist/components/PageLayout/MainContent.js +4 -4
- package/dist/components/PageLayout/PageContainer.js +4 -4
- package/dist/components/PageLayout/PageHeader.js +4 -4
- package/dist/components/PageLayout/PageLayout.js +3 -3
- package/dist/components/Pagination/Pagination.js +20 -16
- package/dist/components/Pagination/Pagination2.js +3 -3
- package/dist/components/Pagination/PaginationContext.js +3 -4
- package/dist/components/Pagination/PaginationNextButton.js +15 -17
- package/dist/components/Pagination/PaginationPageInput.js +24 -24
- package/dist/components/Pagination/PaginationPreviousButton.js +14 -16
- package/dist/components/Popover/Popover.js +27 -18
- package/dist/components/Popover/Popover2.js +3 -3
- package/dist/components/QuickSearch/QuickSearch.js +23 -16
- package/dist/components/QuickSearch/QuickSearch2.js +3 -3
- package/dist/components/QuickSearch/QuickSearchInput.js +33 -23
- package/dist/components/Radio/Radio.js +26 -28
- package/dist/components/Radio/Radio2.js +3 -3
- package/dist/components/Radio/RadioGroup.js +15 -16
- package/dist/components/Radio/RadioGroupContext.js +3 -4
- package/dist/components/Radio/RadioOption.js +11 -10
- package/dist/components/SearchInput/SearchInput.js +32 -25
- package/dist/components/SearchInput/SearchInput2.js +3 -3
- package/dist/components/SidebarNav/ExpandCollapseButton.js +4 -6
- package/dist/components/SidebarNav/SidebarNav.js +19 -13
- package/dist/components/SidebarNav/SidebarNav2.js +3 -3
- package/dist/components/SidebarNav/SidebarNavContext.js +3 -4
- package/dist/components/SidebarNav/SidebarNavLink.js +7 -10
- package/dist/components/Slider/RangeSlider.js +36 -24
- package/dist/components/Slider/Slider.js +29 -20
- package/dist/components/Slider/Slider2.js +3 -3
- package/dist/components/Slider/SliderButton.js +26 -17
- package/dist/components/Switch/Switch.js +19 -19
- package/dist/components/Switch/Switch2.js +3 -3
- package/dist/components/Switch/SwitchField.js +13 -13
- package/dist/components/Table/Table.js +5 -5
- package/dist/components/Table/Table2.js +3 -3
- package/dist/components/Table/TableBody.js +5 -5
- package/dist/components/Table/TableCell.js +5 -5
- package/dist/components/Table/TableHead.js +5 -5
- package/dist/components/Table/TableHeaderCell.js +5 -5
- package/dist/components/Table/TableRow.js +5 -5
- package/dist/components/Tabs/Tab.js +12 -13
- package/dist/components/Tabs/TabContextProvider.js +10 -13
- package/dist/components/Tabs/TabList.js +17 -13
- package/dist/components/Tabs/TabPanel.js +10 -11
- package/dist/components/Tabs/TabPanels.js +1 -3
- package/dist/components/Tabs/Tabs.js +20 -12
- package/dist/components/Tabs/Tabs2.js +3 -3
- package/dist/components/Tooltip/Tooltip.js +51 -29
- package/dist/components/Tooltip/Tooltip2.js +3 -3
- package/dist/components/UIProvider/A11yHelpersContext.js +3 -9
- package/dist/components/UIProvider/PortalTargetContext.js +6 -8
- package/dist/components/UIProvider/UIProvider.js +4 -5
- package/dist/components/deprecated_ColorPicker/Alpha.js +7 -7
- package/dist/components/deprecated_ColorPicker/ColorPicker.js +24 -13
- package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/deprecated_ColorPicker/HexInput.js +16 -9
- package/dist/components/deprecated_ColorPicker/Hue.js +6 -6
- package/dist/components/deprecated_ColorPicker/Saturation.js +14 -16
- package/dist/components/deprecated_ColorPicker/Swatch.js +7 -6
- package/dist/components/deprecated_ColorPicker/useMouseDrag.js +5 -1
- package/dist/components/deprecated_NumberStepper/NumberStepper.js +34 -25
- package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/deprecated_NumberStepper/NumberStepperContext.js +3 -4
- package/dist/components/deprecated_NumberStepper/NumberStepperDecrement.js +14 -16
- package/dist/components/deprecated_NumberStepper/NumberStepperIncrement.js +14 -16
- package/dist/components/deprecated_NumberStepper/NumberStepperInput.js +32 -34
- package/dist/components/deprecated_Tabs/Tab.js +8 -9
- package/dist/components/deprecated_Tabs/TabContextProvider.js +3 -4
- package/dist/components/deprecated_Tabs/Tabs.js +13 -9
- package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
- package/dist/components/deprecated_Toolbar/IconButtonWithLabel.js +6 -6
- package/dist/components/deprecated_Toolbar/Toolbar.js +16 -11
- package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
- package/dist/components/deprecated_Toolbar/ToolbarContext.js +3 -4
- package/dist/components/deprecated_Toolbar/ToolbarPanel.js +16 -16
- package/dist/components/deprecated_Toolbar/ToolbarPanels.js +44 -29
- package/dist/components/deprecated_Toolbar/ToolbarTab.js +19 -20
- package/dist/components/deprecated_Toolbar/ToolbarTabs.js +34 -24
- package/dist/design-tokens/less/typography.js +3 -3
- package/dist/hooks/useBreakpoints/useBreakpoints.js +12 -4
- package/dist/hooks/useClickOutside/useClickOutside.js +1 -3
- package/dist/hooks/useClickOutsidePortals/useClickOutsidePortals.js +3 -3
- package/dist/hooks/useControllableState/useControllableState.js +5 -2
- package/dist/hooks/useEventListener/useEventListener.js +6 -5
- package/dist/hooks/useFocusSequence/useFocusSequence.js +12 -12
- package/dist/hooks/useId/useId.js +4 -1
- package/dist/hooks/useIsFocused/useIsFocused.js +5 -1
- package/dist/hooks/useIsHovered/useIsHovered.js +5 -1
- package/dist/hooks/useIsTruncated/useIsTruncated.js +11 -16
- package/dist/hooks/useMouseDrag/useMouseDrag.js +5 -1
- package/dist/hooks/useOverlay/useOverlay.js +10 -10
- package/dist/hooks/useOverlay/useOverlay2.js +3 -3
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement.js +9 -2
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
- package/dist/icons/Icon.js +3 -3
- package/dist/icons/components/FrontlineEmployeeVoiceIcon.js +6 -0
- package/dist/icons/createIconComponent.js +7 -6
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.es.js +1 -0
- package/dist/icons/index.js +3 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +1 -1
- package/dist/index.js +7 -3
- package/dist/next/AdvancedTable/AdvancedTable.js +192 -173
- package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTableCell.js +30 -25
- package/dist/next/AdvancedTable/AdvancedTableCheckbox.js +12 -15
- package/dist/next/AdvancedTable/AdvancedTableColumnHeader.js +83 -65
- package/dist/next/AdvancedTable/AdvancedTableColumnHeaderMenu.js +25 -30
- package/dist/next/AdvancedTable/AdvancedTableColumnHeaders.js +10 -9
- package/dist/next/AdvancedTable/AdvancedTableDnDContext.js +12 -10
- package/dist/next/AdvancedTable/AdvancedTableDragPreview.js +4 -7
- package/dist/next/AdvancedTable/AdvancedTableHiddenDescription.js +4 -7
- package/dist/next/AdvancedTable/AdvancedTablePagination.js +9 -13
- package/dist/next/AdvancedTable/AdvancedTableRow.js +16 -16
- package/dist/next/AdvancedTable/AdvancedTableRowExpandButton.js +7 -11
- package/dist/next/AdvancedTable/useAdvancedTableDragAndDrop.js +32 -36
- package/dist/next/AdvancedTable/useDragAndDropConfig.js +44 -53
- package/dist/next/Chat/Chat.js +5 -6
- package/dist/next/Chat/ChatContext.js +3 -4
- package/dist/next/Chat/ChatInput.js +24 -20
- package/dist/next/Chat/ChatMessage.js +16 -20
- package/dist/next/Chat/ChatMessageList.js +11 -10
- package/dist/next/Chat/ChatMessageText.js +1 -3
- package/dist/next/Chat/Loader.js +6 -9
- package/dist/next/Chat/MessageContext.js +3 -4
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput.js +28 -18
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInputIconButton.js +8 -8
- package/dist/next/CollectionGrid/CollectionGrid.js +14 -12
- package/dist/next/CollectionGrid/CollectionGridItem.js +4 -5
- package/dist/next/Combobox/Combobox.js +48 -37
- package/dist/next/Combobox/Combobox2.js +3 -3
- package/dist/next/Combobox/ComboboxContext.js +3 -4
- package/dist/next/Combobox/ComboboxFlyout.js +12 -15
- package/dist/next/Combobox/ComboboxGroup.js +10 -14
- package/dist/next/Combobox/ComboboxGroupContext.js +9 -10
- package/dist/next/Combobox/ComboboxInput.js +37 -39
- package/dist/next/Combobox/ComboboxOption.js +15 -19
- package/dist/next/Combobox/hooks/useComboboxFocusSequence/useComboboxFocusSequence.js +9 -4
- package/dist/next/Combobox/hooks/useComboboxLoadingState/useComboboxLoadingState.js +2 -3
- package/dist/next/Combobox/hooks/useComboboxValue/useComboboxValue.js +10 -5
- package/dist/next/Combobox/hooks/useListboxFlyoutDimensions/useListboxFlyoutDimensions.js +12 -5
- package/dist/next/Combobox/hooks/useShouldRenderGroupHeader/useShouldRenderGroupHeader.js +5 -1
- package/dist/next/Drawer/Drawer.js +38 -23
- package/dist/next/Drawer/Drawer2.js +3 -3
- package/dist/next/FilterAnchor/FilterAnchor.js +21 -19
- package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
- package/dist/next/Form/FormFields/FormFieldWrapper.js +11 -11
- package/dist/next/Form/FormFields/InputField.js +3 -3
- package/dist/next/Form/useForm.js +25 -30
- package/dist/next/Form/useFormField.js +3 -4
- package/dist/next/Form/utils/createFormInstance.js +7 -9
- package/dist/next/Form/utils/useFormContext.js +3 -4
- package/dist/next/Indicator/Indicator.js +12 -8
- package/dist/next/Indicator/Indicator2.js +3 -3
- package/dist/next/Input/Input.js +49 -35
- package/dist/next/Input/Input2.js +3 -3
- package/dist/next/LayoutGrid/LayoutGrid.js +11 -12
- package/dist/next/LayoutGrid/LayoutGridItem.js +5 -6
- package/dist/next/LoadingSpinner/LoadingSpinner.js +22 -17
- package/dist/next/LoadingSpinner/LoadingSpinner2.js +3 -3
- package/dist/next/Menu/Hooks/useFocusVirtualBoundary.js +7 -4
- package/dist/next/Menu/Hooks/useMaskDimensions.js +6 -7
- package/dist/next/Menu/Hooks/usePaneSearch.js +50 -39
- package/dist/next/Menu/Menu.js +28 -15
- package/dist/next/Menu/Menu2.js +3 -3
- package/dist/next/Menu/MenuButton.js +17 -18
- package/dist/next/Menu/MenuContext.js +13 -18
- package/dist/next/Menu/MenuItem.js +28 -29
- package/dist/next/Menu/MenuPane.js +74 -61
- package/dist/next/Menu/MenuSearch.js +10 -10
- package/dist/next/Menu/PaneChildren.js +10 -15
- package/dist/next/Menu/SubMenu.js +91 -76
- package/dist/next/Pagination/Pagination.js +40 -31
- package/dist/next/Pagination/RowDisplayCount.js +6 -7
- package/dist/next/PhoneNumberInput/PhoneNumberInput.js +49 -47
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
- package/dist/next/Select/Select.js +27 -30
- package/dist/next/Select/Select2.js +3 -3
- package/dist/next/Select/SelectButton.js +16 -15
- package/dist/next/Select/SelectContext.js +3 -4
- package/dist/next/Select/SelectItem.js +12 -13
- package/dist/next/Select/SelectPane.js +13 -14
- package/dist/next/Select/SelectedItems.js +16 -10
- package/dist/next/Select/SubSelect.js +21 -18
- package/dist/next/SplitButton/SplitButton.js +28 -21
- package/dist/next/SplitButton/SplitButton2.js +3 -3
- package/dist/next/SplitButton/SplitButtonOption.js +3 -5
- package/dist/next/Stack/Stack.js +26 -26
- package/dist/next/Stack/StackItem.js +12 -14
- package/dist/next/TimePicker/TimeDropdown.js +18 -18
- package/dist/next/TimePicker/TimeInput.js +38 -42
- package/dist/next/TimePicker/TimePicker.js +46 -25
- package/dist/next/TimePicker/TimePicker2.js +3 -3
- package/dist/next/TimePicker/TimePickerIcon.js +5 -7
- package/dist/next/TimePicker/utils.js +34 -13
- package/dist/next/ToggleButton/ToggleButton.js +14 -13
- package/dist/next/ToggleButton/ToggleButtonGroup.js +8 -10
- package/dist/next/ToggleButton/ToggleButtonGroupContext.js +3 -4
- package/dist/next/ToggleButton/styles.js +3 -3
- package/dist/next/Tooltip/Tooltip.js +5 -4
- package/dist/next/Typography/Typography.js +8 -7
- package/dist/next/index.js +2377 -2193
- package/dist/utils/Flyout/Flyout.js +14 -13
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/dist/utils/Flyout/FlyoutHeader.js +6 -6
- package/dist/utils/Flyout/FlyoutOption.js +11 -8
- package/dist/utils/GridChildrenWrapper/GridChildrenWrapper.js +4 -6
- package/dist/utils/Popper/Popper.js +71 -61
- package/dist/utils/Popper/PopperContext.js +5 -6
- package/dist/utils/Portal/Portal.js +7 -5
- package/dist/utils/Text/Text.js +10 -8
- package/dist/utils/TextOverflowTooltip/TextOverflowTooltip.js +10 -6
- package/dist/utils/Translation/Translate.js +4 -7
- package/dist/utils/Translation/TranslationProvider.js +10 -14
- package/dist/utils/Translation/containsComponentOrElement.js +3 -1
- package/dist/utils/Translation/useTranslation.js +2 -3
- package/dist/utils/VirtuosoTestWrapper/VirtuosoTestWrapper.js +1 -3
- package/dist/utils/filterChildren/filterChildren.js +4 -4
- package/icons/package.json +1 -1
- package/next/package.json +2 -2
- package/package.json +4 -4
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
|
+
import _slicedToArray from '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
3
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
2
4
|
import React__default, { useRef, useState, useCallback, useMemo, useEffect } from 'react';
|
|
3
5
|
import { Virtuoso } from 'react-virtuoso';
|
|
4
6
|
import { ResizeObserver } from '@juggle/resize-observer';
|
|
@@ -12,42 +14,45 @@ import wrapEvent from '../../../../utils/wrapEvent/wrapEvent.js';
|
|
|
12
14
|
import mergeRefs from '../../../../utils/mergeRefs/mergeRefs.js';
|
|
13
15
|
import { SUBMENU_POPPER_OFFSET, FLYOUT_POPPER_OFFSET } from '../../../../utils/constants.js';
|
|
14
16
|
|
|
17
|
+
const _excluded = ["role", "tabIndex", "highlightedIndex", "onHighlightedIndexChange", "children", "searchBoxRef", "anchorRef", "isSubmenu", "onKeyDown", "isNavItem", "maxHeight", "minWidth", "searchable", "searchTerm", "setSearchTerm", "isVirtualized", "data-popper-ready", "style", "aria-labelledby"];
|
|
15
18
|
const ArrowNav = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
16
19
|
var _process$env, _childRefs$current$le, _containerRef$current3;
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
tabIndex = -1,
|
|
20
|
-
highlightedIndex,
|
|
21
|
-
onHighlightedIndexChange,
|
|
22
|
-
children,
|
|
23
|
-
searchBoxRef,
|
|
24
|
-
anchorRef,
|
|
25
|
-
isSubmenu,
|
|
26
|
-
onKeyDown,
|
|
27
|
-
isNavItem =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
20
|
+
let role = _ref.role,
|
|
21
|
+
_ref$tabIndex = _ref.tabIndex,
|
|
22
|
+
tabIndex = _ref$tabIndex === void 0 ? -1 : _ref$tabIndex,
|
|
23
|
+
highlightedIndex = _ref.highlightedIndex,
|
|
24
|
+
onHighlightedIndexChange = _ref.onHighlightedIndexChange,
|
|
25
|
+
children = _ref.children,
|
|
26
|
+
searchBoxRef = _ref.searchBoxRef,
|
|
27
|
+
anchorRef = _ref.anchorRef,
|
|
28
|
+
isSubmenu = _ref.isSubmenu,
|
|
29
|
+
onKeyDown = _ref.onKeyDown,
|
|
30
|
+
_ref$isNavItem = _ref.isNavItem,
|
|
31
|
+
isNavItem = _ref$isNavItem === void 0 ? () => true : _ref$isNavItem,
|
|
32
|
+
maxHeight = _ref.maxHeight,
|
|
33
|
+
minWidth = _ref.minWidth,
|
|
34
|
+
searchable = _ref.searchable,
|
|
35
|
+
searchTerm = _ref.searchTerm,
|
|
36
|
+
setSearchTerm = _ref.setSearchTerm,
|
|
37
|
+
_ref$isVirtualized = _ref.isVirtualized,
|
|
38
|
+
isVirtualized = _ref$isVirtualized === void 0 ? false : _ref$isVirtualized,
|
|
39
|
+
isPopperReady = _ref['data-popper-ready'],
|
|
40
|
+
style = _ref.style,
|
|
41
|
+
ariaLabelledBy = _ref['aria-labelledby'],
|
|
42
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
40
43
|
const containerRef = useRef(null);
|
|
41
44
|
const virtuosoRef = useRef(null);
|
|
42
45
|
const childRefs = useRef({});
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
const _useState = useState({
|
|
47
|
+
startIndex: -1,
|
|
48
|
+
endIndex: -1
|
|
49
|
+
}),
|
|
50
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
51
|
+
virtualRange = _useState2[0],
|
|
52
|
+
setVirtualRange = _useState2[1];
|
|
47
53
|
const menuId = useId();
|
|
48
|
-
const
|
|
49
|
-
isFocusVisible
|
|
50
|
-
} = useIsFocusVisible();
|
|
54
|
+
const _useIsFocusVisible = useIsFocusVisible(),
|
|
55
|
+
isFocusVisible = _useIsFocusVisible.isFocusVisible;
|
|
51
56
|
const getAdditionalProps = useCallback((child, index) => ({
|
|
52
57
|
tabIndex: 0,
|
|
53
58
|
onMouseEnter: wrapEvent(child.props.onMouseEnter, () => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
2
3
|
import React__default from 'react';
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import menuStyles from '../NewMenu.js';
|
|
@@ -9,24 +10,22 @@ import '../../../utils/index.js';
|
|
|
9
10
|
import concatIds from '../../../utils/concatIds/concatIds.js';
|
|
10
11
|
import ChevronDownIcon from '../../../icons/components/ChevronDownIcon.js';
|
|
11
12
|
|
|
13
|
+
const _excluded = ["label", "className", "small", "isOpen", "disabled", "onClick", "onKeyDown", "aria-describedby"];
|
|
12
14
|
const MenuAnchor = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
...rest
|
|
23
|
-
} = _ref;
|
|
15
|
+
let label = _ref.label,
|
|
16
|
+
className = _ref.className,
|
|
17
|
+
small = _ref.small,
|
|
18
|
+
isOpen = _ref.isOpen,
|
|
19
|
+
disabled = _ref.disabled,
|
|
20
|
+
onClick = _ref.onClick,
|
|
21
|
+
onKeyDown = _ref.onKeyDown,
|
|
22
|
+
externalAriaDescribedBy = _ref['aria-describedby'],
|
|
23
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
24
24
|
const inputGroupContext = useInputGroupContext();
|
|
25
|
-
const
|
|
26
|
-
hasLabel
|
|
27
|
-
helperTextId
|
|
28
|
-
errorTextId
|
|
29
|
-
} = useFormFieldControl();
|
|
25
|
+
const _useFormFieldControl = useFormFieldControl(),
|
|
26
|
+
hasFormLabel = _useFormFieldControl.hasLabel,
|
|
27
|
+
formFieldHelperTextId = _useFormFieldControl.helperTextId,
|
|
28
|
+
formFieldErrorTextId = _useFormFieldControl.errorTextId;
|
|
30
29
|
const internalAriaDescribedby = concatIds(externalAriaDescribedBy, formFieldHelperTextId, formFieldErrorTextId);
|
|
31
30
|
return /*#__PURE__*/React__default.createElement("button", _extends({}, rest, {
|
|
32
31
|
ref: ref,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import '../../../utils/index.js';
|
|
2
2
|
import createContextUtilities from '../../../utils/createContextUtilities/createContextUtilities.js';
|
|
3
3
|
|
|
4
|
-
const
|
|
5
|
-
Provider
|
|
6
|
-
useContext
|
|
7
|
-
} = createContextUtilities(null);
|
|
4
|
+
const _createContextUtiliti = createContextUtilities(null),
|
|
5
|
+
MenuContextProvider = _createContextUtiliti.Provider,
|
|
6
|
+
useMenuContext = _createContextUtiliti.useContext;
|
|
8
7
|
|
|
9
8
|
export { MenuContextProvider, useMenuContext };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
2
3
|
import React__default, { useRef, useCallback, useEffect } from 'react';
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import menuStyles from '../NewMenu.js';
|
|
@@ -7,24 +8,29 @@ import Check from '../../Checkbox/Check.js';
|
|
|
7
8
|
import mergeRefs from '../../../utils/mergeRefs/mergeRefs.js';
|
|
8
9
|
import wrapEvent from '../../../utils/wrapEvent/wrapEvent.js';
|
|
9
10
|
|
|
11
|
+
const _excluded = ["role", "tabIndex", "children", "className", "disabled", "onSelect", "onKeyDown", "onClick", "isSelected", "isHighlighted", "isFocused", "isMultiSelect", "isSelectable", "aria-checked"];
|
|
10
12
|
const MenuItem = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
tabIndex = 0,
|
|
14
|
-
children
|
|
15
|
-
className,
|
|
16
|
-
disabled,
|
|
17
|
-
onSelect,
|
|
18
|
-
onKeyDown,
|
|
19
|
-
onClick,
|
|
20
|
-
isSelected =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
13
|
+
let role = _ref.role,
|
|
14
|
+
_ref$tabIndex = _ref.tabIndex,
|
|
15
|
+
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex,
|
|
16
|
+
label = _ref.children,
|
|
17
|
+
className = _ref.className,
|
|
18
|
+
disabled = _ref.disabled,
|
|
19
|
+
onSelect = _ref.onSelect,
|
|
20
|
+
onKeyDown = _ref.onKeyDown,
|
|
21
|
+
onClick = _ref.onClick,
|
|
22
|
+
_ref$isSelected = _ref.isSelected,
|
|
23
|
+
isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
|
|
24
|
+
_ref$isHighlighted = _ref.isHighlighted,
|
|
25
|
+
isHighlighted = _ref$isHighlighted === void 0 ? false : _ref$isHighlighted,
|
|
26
|
+
_ref$isFocused = _ref.isFocused,
|
|
27
|
+
isFocused = _ref$isFocused === void 0 ? isHighlighted : _ref$isFocused,
|
|
28
|
+
_ref$isMultiSelect = _ref.isMultiSelect,
|
|
29
|
+
isMultiSelect = _ref$isMultiSelect === void 0 ? false : _ref$isMultiSelect,
|
|
30
|
+
_ref$isSelectable = _ref.isSelectable,
|
|
31
|
+
isSelectable = _ref$isSelectable === void 0 ? false : _ref$isSelectable,
|
|
32
|
+
ariaChecked = _ref['aria-checked'],
|
|
33
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
28
34
|
const itemRef = useRef(null);
|
|
29
35
|
const defaultRole = isSelectable ? isMultiSelect ? 'menuitemcheckbox' : 'menuitemradio' : 'menuitem';
|
|
30
36
|
const handleSelect = useCallback(e => {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _objectDestructuringEmpty from '@babel/runtime-corejs3/helpers/objectDestructuringEmpty';
|
|
1
2
|
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
3
|
import React__default from 'react';
|
|
3
4
|
import menuStyles from '../NewMenu.js';
|
|
@@ -9,12 +10,9 @@ import SearchIcon from '../../../icons/components/SearchIcon.js';
|
|
|
9
10
|
import Input from '../../Input/Input.js';
|
|
10
11
|
|
|
11
12
|
const MenuSearchBox = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
12
|
-
let {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const {
|
|
16
|
-
translate
|
|
17
|
-
} = useTranslation();
|
|
13
|
+
let rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
14
|
+
const _useTranslation = useTranslation(),
|
|
15
|
+
translate = _useTranslation.translate;
|
|
18
16
|
const searchText = translate('searchText');
|
|
19
17
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
20
18
|
className: menuStyles.searchBox
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
2
3
|
import React__default from 'react';
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import menuStyles from '../NewMenu.js';
|
|
@@ -6,12 +7,11 @@ import MenuItem from './MenuItem.js';
|
|
|
6
7
|
import '../../../icons/index.es.js';
|
|
7
8
|
import ChevronRightIcon from '../../../icons/components/ChevronRightIcon.js';
|
|
8
9
|
|
|
10
|
+
const _excluded = ["label", "className"];
|
|
9
11
|
const SubmenuAnchor = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
...rest
|
|
14
|
-
} = _ref;
|
|
12
|
+
let label = _ref.label,
|
|
13
|
+
className = _ref.className,
|
|
14
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
15
15
|
return /*#__PURE__*/React__default.createElement(MenuItem, _extends({
|
|
16
16
|
"aria-haspopup": "menu",
|
|
17
17
|
className: classNames(className, menuStyles.subMenu),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _slicedToArray from '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
1
2
|
import React__default, { useRef, useCallback, useState, useMemo, useEffect } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import NumberStepperIncrement from './NumberStepperIncrement.js';
|
|
@@ -9,32 +10,33 @@ import styles from './NumberStepper2.js';
|
|
|
9
10
|
import useScreenReaderAnnouncement from '../../hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement.js';
|
|
10
11
|
import useControllableState from '../../hooks/useControllableState/useControllableState.js';
|
|
11
12
|
|
|
12
|
-
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
13
13
|
/**
|
|
14
14
|
* Renders the NumberStepper component.
|
|
15
15
|
* This component is offered as a "default" (aka simple) component or an "advanced" (aka composite) component.
|
|
16
16
|
*/
|
|
17
17
|
const NumberStepper = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
initialValue = 0,
|
|
23
|
-
value
|
|
24
|
-
step =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
18
|
+
let isExternallyDisabled = _ref.isDisabled,
|
|
19
|
+
dataTestId = _ref['data-testid'],
|
|
20
|
+
inputId = _ref.inputId,
|
|
21
|
+
_ref$initialValue = _ref.initialValue,
|
|
22
|
+
initialValue = _ref$initialValue === void 0 ? 0 : _ref$initialValue,
|
|
23
|
+
externalValue = _ref.value,
|
|
24
|
+
_ref$step = _ref.step,
|
|
25
|
+
step = _ref$step === void 0 ? 1 : _ref$step,
|
|
26
|
+
min = _ref.min,
|
|
27
|
+
max = _ref.max,
|
|
28
|
+
_ref$decimalSeparator = _ref.decimalSeparator,
|
|
29
|
+
decimalSeparator = _ref$decimalSeparator === void 0 ? 'both' : _ref$decimalSeparator,
|
|
30
|
+
_ref$allowDecimalNumb = _ref.allowDecimalNumbers,
|
|
31
|
+
allowDecimalNumbers = _ref$allowDecimalNumb === void 0 ? true : _ref$allowDecimalNumb,
|
|
32
|
+
className = _ref.className,
|
|
33
|
+
ariaLabel = _ref['aria-label'],
|
|
34
|
+
ariaLabelledBy = _ref['aria-labelledby'],
|
|
35
|
+
ariaDescribedBy = _ref['aria-describedby'],
|
|
36
|
+
children = _ref.children,
|
|
37
|
+
onChange = _ref.onChange,
|
|
38
|
+
onFocus = _ref.onFocus,
|
|
39
|
+
onBlur = _ref.onBlur;
|
|
38
40
|
const latestDecimalSeparator = useRef(decimalSeparator === 'comma' ? ',' : '.');
|
|
39
41
|
const announceToScreenReader = useScreenReaderAnnouncement('assertive');
|
|
40
42
|
const componentHasFocus = useRef(false);
|
|
@@ -46,13 +48,22 @@ const NumberStepper = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
46
48
|
* (2) Internal state (if `externalValue` is undefined).
|
|
47
49
|
*/
|
|
48
50
|
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
const _useControllableState = useControllableState(clampMinMax(initialValue, {
|
|
52
|
+
min,
|
|
53
|
+
max
|
|
54
|
+
}), onChange, externalValue),
|
|
55
|
+
_useControllableState2 = _slicedToArray(_useControllableState, 2),
|
|
56
|
+
internalValue = _useControllableState2[0],
|
|
57
|
+
setInternalValue = _useControllableState2[1];
|
|
58
|
+
const _useState = useState(localizeNumber(internalValue, isSeparatedByComma(initialValue))),
|
|
59
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
60
|
+
inputValue = _useState2[0],
|
|
61
|
+
setInputValue = _useState2[1];
|
|
54
62
|
const componentIsControlled = useMemo(() => externalValue !== undefined && externalValue !== null, [externalValue]);
|
|
55
|
-
const
|
|
63
|
+
const _useState3 = useState(false),
|
|
64
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
65
|
+
forceInternalValueUpdate = _useState4[0],
|
|
66
|
+
setForceInternalValueUpdate = _useState4[1];
|
|
56
67
|
useEffect(() => {
|
|
57
68
|
['.', ','].forEach(separator => {
|
|
58
69
|
if (String(inputValue).indexOf(separator) !== -1) {
|
|
@@ -214,18 +225,14 @@ const NumberStepper = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
214
225
|
ref: ref,
|
|
215
226
|
className: classNames(styles.numberStepperContainer, className),
|
|
216
227
|
onFocus: e => {
|
|
217
|
-
const
|
|
218
|
-
currentTarget
|
|
219
|
-
} = e;
|
|
228
|
+
const currentTarget = e.currentTarget;
|
|
220
229
|
if (!componentHasFocus.current && currentTarget.contains(document.activeElement)) {
|
|
221
230
|
componentHasFocus.current = true;
|
|
222
231
|
onFocus === null || onFocus === void 0 || onFocus(e);
|
|
223
232
|
}
|
|
224
233
|
},
|
|
225
234
|
onBlur: e => {
|
|
226
|
-
const
|
|
227
|
-
currentTarget
|
|
228
|
-
} = e;
|
|
235
|
+
const currentTarget = e.currentTarget;
|
|
229
236
|
|
|
230
237
|
// Give browser time to focus the next element
|
|
231
238
|
requestAnimationFrame(() => {
|
|
@@ -269,10 +276,8 @@ function roundToTwoDecimalPlaces(value) {
|
|
|
269
276
|
* Compares the given `value` to min and/or max
|
|
270
277
|
*/
|
|
271
278
|
function clampMinMax(value, _ref2) {
|
|
272
|
-
let
|
|
273
|
-
|
|
274
|
-
max
|
|
275
|
-
} = _ref2;
|
|
279
|
+
let min = _ref2.min,
|
|
280
|
+
max = _ref2.max;
|
|
276
281
|
if (typeof max === 'number' && value > max) {
|
|
277
282
|
return max;
|
|
278
283
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var styles = {"numberStepperContainer":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._NsZd7{display:inline-flex;width:127px}._JHor-{color:#32363a;background:#fafafa;outline:none;text-align:center;padding:0 12px;min-width:55px;width:100%;font-size:14px;border:1px solid #898989;border-radius:0;-moz-appearance:textfield}._JHor-:hover:not(._Ki39e){cursor:pointer;background:#f5f5f5}._JHor-._Fn7HB{border:1px solid #da1c3d}._JHor-._Fn7HB:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000}._JHor-._Ki39e{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._JHor-._Ki39e>svg{opacity:.4}._JHor-::-webkit-inner-spin-button,._JHor-::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._JHor-:focus{z-index:0;border:none;border-radius:4px}._JHor-:focus:not(._Fn7HB){box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._coO6k,._JHor-:focus:not(._Ki39e){background:#fafafa}._coO6k{padding:0;display:flex;justify-content:center;align-items:center;flex-shrink:0;width:36px;height:36px;fill:#515559;outline:none;border-radius:4px 0 0 4px;border:1px solid #898989;border-right-width:0}._coO6k:hover:not(._Ki39e){cursor:pointer;background:#f5f5f5}._coO6k:active:not(._Ki39e){background:#e5e5e5}._coO6k._Ki39e{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._coO6k._Ki39e>svg{opacity:.4}._be9cg{padding:0;display:flex;justify-content:center;align-items:center;flex-shrink:0;width:36px;height:36px;background:#fafafa;fill:#515559;outline:none;border-radius:0 4px 4px 0;border:1px solid #898989;border-left-width:0}._be9cg:hover:not(._Ki39e){cursor:pointer;background:#f5f5f5}._be9cg:active:not(._Ki39e){background:#e5e5e5}._be9cg._Ki39e{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._be9cg._Ki39e>svg{opacity:.4}";
|
|
4
|
+
var styles = {"numberStepperContainer":"_NsZd7","numberStepperInput":"_JHor-","disabled":"_Ki39e","invalid":"_Fn7HB","decrementBtn":"_coO6k","incrementBtn":"_be9cg"};
|
|
5
|
+
var stylesheet="._NsZd7{display:inline-flex;width:127px}._JHor-{color:#32363a;background:#fafafa;outline:none;text-align:center;padding:0 12px;min-width:55px;width:100%;font-size:14px;border:1px solid #898989;border-radius:0;-moz-appearance:textfield}._JHor-:hover:not(._Ki39e){cursor:pointer;background:#f5f5f5}._JHor-._Fn7HB{border:1px solid #da1c3d}._JHor-._Fn7HB:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000}._JHor-._Ki39e{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._JHor-._Ki39e>svg{opacity:.4}._JHor-::-webkit-inner-spin-button,._JHor-::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._JHor-:focus{z-index:0;border:none;border-radius:4px}._JHor-:focus:not(._Fn7HB){box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._coO6k,._JHor-:focus:not(._Ki39e){background:#fafafa}._coO6k{padding:0;display:flex;justify-content:center;align-items:center;flex-shrink:0;width:36px;height:36px;fill:#515559;outline:none;border-radius:4px 0 0 4px;border:1px solid #898989;border-right-width:0}._coO6k:hover:not(._Ki39e){cursor:pointer;background:#f5f5f5}._coO6k:active:not(._Ki39e){background:#e5e5e5}._coO6k._Ki39e{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._coO6k._Ki39e>svg{opacity:.4}._be9cg{padding:0;display:flex;justify-content:center;align-items:center;flex-shrink:0;width:36px;height:36px;background:#fafafa;fill:#515559;outline:none;border-radius:0 4px 4px 0;border:1px solid #898989;border-left-width:0}._be9cg:hover:not(._Ki39e){cursor:pointer;background:#f5f5f5}._be9cg:active:not(._Ki39e){background:#e5e5e5}._be9cg._Ki39e{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._be9cg._Ki39e>svg{opacity:.4}";
|
|
6
6
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){styleInject(css_248z);}
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import '../../utils/index.js';
|
|
2
2
|
import createContextUtilities from '../../utils/createContextUtilities/createContextUtilities.js';
|
|
3
3
|
|
|
4
|
-
const
|
|
5
|
-
Provider
|
|
6
|
-
useContext
|
|
7
|
-
} = createContextUtilities();
|
|
4
|
+
const _createContextUtiliti = createContextUtilities(),
|
|
5
|
+
NumberStepperContextProvider = _createContextUtiliti.Provider,
|
|
6
|
+
useNumberStepperContext = _createContextUtiliti.useContext;
|
|
8
7
|
|
|
9
8
|
export { NumberStepperContextProvider, useNumberStepperContext };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
2
3
|
import React__default from 'react';
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import styles from './NumberStepper2.js';
|
|
@@ -9,28 +10,25 @@ import useTranslation from '../../utils/Translation/useTranslation.js';
|
|
|
9
10
|
import getSubDataTestId from '../../utils/getSubDataTestId/getSubDataTestId.js';
|
|
10
11
|
import SubtractIcon from '../../icons/components/SubtractIcon.js';
|
|
11
12
|
|
|
13
|
+
const _excluded = ["className", "onClick"];
|
|
12
14
|
/**
|
|
13
15
|
* Renders the NumberStepperDecrement component.
|
|
14
16
|
* Either `NumberStepper` renders this component automatically or the consumer renders this component explicitly.
|
|
15
17
|
*/
|
|
16
18
|
const NumberStepperDecrement = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const {
|
|
23
|
-
translate
|
|
24
|
-
} = useTranslation();
|
|
19
|
+
let className = _ref.className,
|
|
20
|
+
onClick = _ref.onClick,
|
|
21
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
22
|
+
const _useTranslation = useTranslation(),
|
|
23
|
+
translate = _useTranslation.translate;
|
|
25
24
|
|
|
26
25
|
// Context from NumberStepper
|
|
27
|
-
const
|
|
28
|
-
isExternallyDisabled,
|
|
29
|
-
dataTestId,
|
|
30
|
-
decrement,
|
|
31
|
-
internalValue,
|
|
32
|
-
min
|
|
33
|
-
} = useNumberStepperContext();
|
|
26
|
+
const _useNumberStepperCont = useNumberStepperContext(),
|
|
27
|
+
isExternallyDisabled = _useNumberStepperCont.isExternallyDisabled,
|
|
28
|
+
dataTestId = _useNumberStepperCont.dataTestId,
|
|
29
|
+
decrement = _useNumberStepperCont.decrement,
|
|
30
|
+
internalValue = _useNumberStepperCont.internalValue,
|
|
31
|
+
min = _useNumberStepperCont.min;
|
|
34
32
|
|
|
35
33
|
// Indicates if the button is disabled
|
|
36
34
|
const isDisabled = internalValue <= min || isExternallyDisabled;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
2
3
|
import React__default from 'react';
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import styles from './NumberStepper2.js';
|
|
@@ -9,28 +10,25 @@ import useTranslation from '../../utils/Translation/useTranslation.js';
|
|
|
9
10
|
import getSubDataTestId from '../../utils/getSubDataTestId/getSubDataTestId.js';
|
|
10
11
|
import AddIcon from '../../icons/components/AddIcon.js';
|
|
11
12
|
|
|
13
|
+
const _excluded = ["className", "onClick"];
|
|
12
14
|
/**
|
|
13
15
|
* Renders the NumberStepperIncrement component.
|
|
14
16
|
* Either `NumberStepper` renders this component automatically or the consumer renders this component explicitly.
|
|
15
17
|
*/
|
|
16
18
|
const NumberStepperIncrement = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const {
|
|
23
|
-
translate
|
|
24
|
-
} = useTranslation();
|
|
19
|
+
let className = _ref.className,
|
|
20
|
+
onClick = _ref.onClick,
|
|
21
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
22
|
+
const _useTranslation = useTranslation(),
|
|
23
|
+
translate = _useTranslation.translate;
|
|
25
24
|
|
|
26
25
|
// Context from NumberStepper
|
|
27
|
-
const
|
|
28
|
-
isExternallyDisabled,
|
|
29
|
-
dataTestId,
|
|
30
|
-
increment,
|
|
31
|
-
internalValue,
|
|
32
|
-
max
|
|
33
|
-
} = useNumberStepperContext();
|
|
26
|
+
const _useNumberStepperCont = useNumberStepperContext(),
|
|
27
|
+
isExternallyDisabled = _useNumberStepperCont.isExternallyDisabled,
|
|
28
|
+
dataTestId = _useNumberStepperCont.dataTestId,
|
|
29
|
+
increment = _useNumberStepperCont.increment,
|
|
30
|
+
internalValue = _useNumberStepperCont.internalValue,
|
|
31
|
+
max = _useNumberStepperCont.max;
|
|
34
32
|
|
|
35
33
|
// Indicates if the button is disabled
|
|
36
34
|
const isDisabled = internalValue >= max || isExternallyDisabled;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
2
3
|
import React__default from 'react';
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import styles from './NumberStepper2.js';
|
|
@@ -8,44 +9,41 @@ import { useFormFieldControl } from '../FormField/FormFieldContext.js';
|
|
|
8
9
|
import concatIds from '../../utils/concatIds/concatIds.js';
|
|
9
10
|
import getSubDataTestId from '../../utils/getSubDataTestId/getSubDataTestId.js';
|
|
10
11
|
|
|
12
|
+
const _excluded = ["className", "onKeyDown", "onFocus", "onBlur"];
|
|
11
13
|
/**
|
|
12
14
|
* Renders the NumberStepperInput component.
|
|
13
15
|
* Either `NumberStepper` renders this component automatically or the consumer renders this component explicitly.
|
|
14
16
|
*/
|
|
15
17
|
const NumberStepperInput = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
...rest
|
|
22
|
-
} = _ref;
|
|
18
|
+
let className = _ref.className,
|
|
19
|
+
onKeyDown = _ref.onKeyDown,
|
|
20
|
+
onFocus = _ref.onFocus,
|
|
21
|
+
onBlur = _ref.onBlur,
|
|
22
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
23
23
|
// Context from NumberStepper
|
|
24
|
-
const
|
|
25
|
-
isExternallyDisabled,
|
|
26
|
-
dataTestId,
|
|
27
|
-
inputId,
|
|
28
|
-
inputValue,
|
|
29
|
-
increment,
|
|
30
|
-
decrement,
|
|
31
|
-
increaseToMax,
|
|
32
|
-
decreaseToMin,
|
|
33
|
-
step
|
|
34
|
-
min
|
|
35
|
-
max
|
|
36
|
-
ariaLabel,
|
|
37
|
-
ariaLabelledBy,
|
|
38
|
-
ariaDescribedBy,
|
|
39
|
-
handleInputChange,
|
|
40
|
-
handleInputBlur,
|
|
41
|
-
internalValue
|
|
42
|
-
} = useNumberStepperContext();
|
|
24
|
+
const _useNumberStepperCont = useNumberStepperContext(),
|
|
25
|
+
isExternallyDisabled = _useNumberStepperCont.isExternallyDisabled,
|
|
26
|
+
dataTestId = _useNumberStepperCont.dataTestId,
|
|
27
|
+
inputId = _useNumberStepperCont.inputId,
|
|
28
|
+
inputValue = _useNumberStepperCont.inputValue,
|
|
29
|
+
increment = _useNumberStepperCont.increment,
|
|
30
|
+
decrement = _useNumberStepperCont.decrement,
|
|
31
|
+
increaseToMax = _useNumberStepperCont.increaseToMax,
|
|
32
|
+
decreaseToMin = _useNumberStepperCont.decreaseToMin,
|
|
33
|
+
inputStep = _useNumberStepperCont.step,
|
|
34
|
+
inputMin = _useNumberStepperCont.min,
|
|
35
|
+
inputMax = _useNumberStepperCont.max,
|
|
36
|
+
ariaLabel = _useNumberStepperCont.ariaLabel,
|
|
37
|
+
ariaLabelledBy = _useNumberStepperCont.ariaLabelledBy,
|
|
38
|
+
ariaDescribedBy = _useNumberStepperCont.ariaDescribedBy,
|
|
39
|
+
handleInputChange = _useNumberStepperCont.handleInputChange,
|
|
40
|
+
handleInputBlur = _useNumberStepperCont.handleInputBlur,
|
|
41
|
+
internalValue = _useNumberStepperCont.internalValue;
|
|
43
42
|
|
|
44
43
|
// TODO: Add proper styling for the form field label (this is a breaking change)
|
|
45
|
-
const
|
|
46
|
-
helperTextId
|
|
47
|
-
errorTextId
|
|
48
|
-
} = useFormFieldControl();
|
|
44
|
+
const _useFormFieldControl = useFormFieldControl(),
|
|
45
|
+
formFieldHelperTextId = _useFormFieldControl.helperTextId,
|
|
46
|
+
formFieldErrorTextId = _useFormFieldControl.errorTextId;
|
|
49
47
|
const internalAriaDescribedby = concatIds(ariaDescribedBy, formFieldHelperTextId, formFieldErrorTextId);
|
|
50
48
|
const isInvalid = internalValue > inputMax || internalValue < inputMin;
|
|
51
49
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
2
3
|
import React__default, { forwardRef } from 'react';
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import styles from './PageLayout.js';
|
|
5
6
|
|
|
7
|
+
const _excluded = ["className"];
|
|
6
8
|
const MainContent = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
...rest
|
|
10
|
-
} = _ref;
|
|
9
|
+
let className = _ref.className,
|
|
10
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
11
11
|
return /*#__PURE__*/React__default.createElement("main", _extends({}, rest, {
|
|
12
12
|
className: classNames(styles.mainContent, className),
|
|
13
13
|
ref: ref
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
2
3
|
import React__default, { forwardRef } from 'react';
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import styles from './PageLayout.js';
|
|
5
6
|
|
|
7
|
+
const _excluded = ["className"];
|
|
6
8
|
const PageContainer = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
...rest
|
|
10
|
-
} = _ref;
|
|
9
|
+
let className = _ref.className,
|
|
10
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
11
11
|
return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
|
|
12
12
|
className: classNames(styles.pageContainer, className),
|
|
13
13
|
ref: ref
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
2
3
|
import React__default, { forwardRef } from 'react';
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import styles from './PageLayout.js';
|
|
5
6
|
|
|
7
|
+
const _excluded = ["className"];
|
|
6
8
|
const PageHeader = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
...rest
|
|
10
|
-
} = _ref;
|
|
9
|
+
let className = _ref.className,
|
|
10
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
11
11
|
return /*#__PURE__*/React__default.createElement("header", _extends({}, rest, {
|
|
12
12
|
className: classNames(styles.pageHeader, className),
|
|
13
13
|
ref: ref
|