@qualtrics/ui-react 2.79.0 → 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 +21 -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-7181e053.js → index-807921ca.js} +2830 -2635
- package/dist/__shared/cjs/{index-b77d5870.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 +53 -37
- 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,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,6 +9,7 @@ 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 = ["data-testid", "id", "className", "aria-label", "aria-labelledby", "aria-describedby", "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.
|
|
@@ -18,43 +20,39 @@ import getSubDataTestId from '../../utils/getSubDataTestId/getSubDataTestId.js';
|
|
|
18
20
|
* ```
|
|
19
21
|
*/
|
|
20
22
|
const NumberStepperInput = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
'aria-
|
|
26
|
-
'aria-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
...rest
|
|
32
|
-
} = _ref;
|
|
23
|
+
let dataTestIdFromProps = _ref['data-testid'],
|
|
24
|
+
idFromProps = _ref.id,
|
|
25
|
+
className = _ref.className,
|
|
26
|
+
ariaLabelFromProps = _ref['aria-label'],
|
|
27
|
+
ariaLabelledByFromProps = _ref['aria-labelledby'],
|
|
28
|
+
ariaDescribedByFromProps = _ref['aria-describedby'],
|
|
29
|
+
onKeyDown = _ref.onKeyDown,
|
|
30
|
+
onFocus = _ref.onFocus,
|
|
31
|
+
onBlur = _ref.onBlur,
|
|
32
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
33
33
|
// Context from NumberStepper
|
|
34
|
-
const
|
|
35
|
-
isExternallyDisabled,
|
|
36
|
-
dataTestId,
|
|
37
|
-
inputId,
|
|
38
|
-
inputValue,
|
|
39
|
-
increment,
|
|
40
|
-
decrement,
|
|
41
|
-
increaseToMax,
|
|
42
|
-
decreaseToMin,
|
|
43
|
-
step
|
|
44
|
-
min
|
|
45
|
-
max
|
|
46
|
-
ariaLabel,
|
|
47
|
-
ariaLabelledBy,
|
|
48
|
-
ariaDescribedBy,
|
|
49
|
-
handleInputChange,
|
|
50
|
-
handleInputBlur
|
|
51
|
-
} = useNumberStepperContext();
|
|
34
|
+
const _useNumberStepperCont = useNumberStepperContext(),
|
|
35
|
+
isExternallyDisabled = _useNumberStepperCont.isExternallyDisabled,
|
|
36
|
+
dataTestId = _useNumberStepperCont.dataTestId,
|
|
37
|
+
inputId = _useNumberStepperCont.inputId,
|
|
38
|
+
inputValue = _useNumberStepperCont.inputValue,
|
|
39
|
+
increment = _useNumberStepperCont.increment,
|
|
40
|
+
decrement = _useNumberStepperCont.decrement,
|
|
41
|
+
increaseToMax = _useNumberStepperCont.increaseToMax,
|
|
42
|
+
decreaseToMin = _useNumberStepperCont.decreaseToMin,
|
|
43
|
+
inputStep = _useNumberStepperCont.step,
|
|
44
|
+
inputMin = _useNumberStepperCont.min,
|
|
45
|
+
inputMax = _useNumberStepperCont.max,
|
|
46
|
+
ariaLabel = _useNumberStepperCont.ariaLabel,
|
|
47
|
+
ariaLabelledBy = _useNumberStepperCont.ariaLabelledBy,
|
|
48
|
+
ariaDescribedBy = _useNumberStepperCont.ariaDescribedBy,
|
|
49
|
+
handleInputChange = _useNumberStepperCont.handleInputChange,
|
|
50
|
+
handleInputBlur = _useNumberStepperCont.handleInputBlur;
|
|
52
51
|
|
|
53
52
|
// TODO: Add proper styling for the form field label (this is a breaking change)
|
|
54
|
-
const
|
|
55
|
-
helperTextId
|
|
56
|
-
errorTextId
|
|
57
|
-
} = useFormFieldControl();
|
|
53
|
+
const _useFormFieldControl = useFormFieldControl(),
|
|
54
|
+
formFieldHelperTextId = _useFormFieldControl.helperTextId,
|
|
55
|
+
formFieldErrorTextId = _useFormFieldControl.errorTextId;
|
|
58
56
|
const internalAriaDescribedby = concatIds(ariaDescribedByFromProps !== null && ariaDescribedByFromProps !== void 0 ? ariaDescribedByFromProps : ariaDescribedBy, formFieldHelperTextId, formFieldErrorTextId);
|
|
59
57
|
|
|
60
58
|
// Indicates if the `inputValue` is invalid
|
|
@@ -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 './Tabs2.js';
|
|
@@ -6,6 +7,7 @@ import { useTabContext } from './TabContextProvider.js';
|
|
|
6
7
|
import '../../utils/index.js';
|
|
7
8
|
import Text from '../../utils/Text/Text.js';
|
|
8
9
|
|
|
10
|
+
const _excluded = ["className", "label"];
|
|
9
11
|
/**
|
|
10
12
|
* @deprecated Instead, use:
|
|
11
13
|
* ```
|
|
@@ -13,15 +15,12 @@ import Text from '../../utils/Text/Text.js';
|
|
|
13
15
|
* ```
|
|
14
16
|
*/
|
|
15
17
|
const Tab = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
active,
|
|
23
|
-
tabIndex
|
|
24
|
-
} = useTabContext();
|
|
18
|
+
let className = _ref.className,
|
|
19
|
+
label = _ref.label,
|
|
20
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
+
const _useTabContext = useTabContext(),
|
|
22
|
+
active = _useTabContext.active,
|
|
23
|
+
tabIndex = _useTabContext.tabIndex;
|
|
25
24
|
return /*#__PURE__*/React__default.createElement(Text, _extends({}, rest, {
|
|
26
25
|
lightTheme: true,
|
|
27
26
|
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();
|
|
4
|
+
const _createContextUtiliti = createContextUtilities(),
|
|
5
|
+
TabContextProvider = _createContextUtiliti.Provider,
|
|
6
|
+
useTabContext = _createContextUtiliti.useContext;
|
|
8
7
|
|
|
9
8
|
export { TabContextProvider, useTabContext };
|
|
@@ -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 } from 'react';
|
|
3
5
|
import classNames from 'classnames';
|
|
4
6
|
import styles from './Tabs2.js';
|
|
@@ -9,6 +11,7 @@ import useId from '../../hooks/useId/useId.js';
|
|
|
9
11
|
import wrapAround from '../../utils/wrapAround/wrapAround.js';
|
|
10
12
|
import mergeRefs from '../../utils/mergeRefs/mergeRefs.js';
|
|
11
13
|
|
|
14
|
+
const _excluded = ["activeKey", "children", "className", "onChange", "id"];
|
|
12
15
|
/**
|
|
13
16
|
* @deprecated Instead, use:
|
|
14
17
|
* ```
|
|
@@ -16,19 +19,20 @@ import mergeRefs from '../../utils/mergeRefs/mergeRefs.js';
|
|
|
16
19
|
* ```
|
|
17
20
|
*/
|
|
18
21
|
const Tabs = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
...rest
|
|
26
|
-
} = _ref;
|
|
22
|
+
let activeKey = _ref.activeKey,
|
|
23
|
+
children = _ref.children,
|
|
24
|
+
className = _ref.className,
|
|
25
|
+
onChange = _ref.onChange,
|
|
26
|
+
externalId = _ref.id,
|
|
27
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
27
28
|
const tabsId = useId(externalId);
|
|
28
29
|
const tabIdPrefix = "".concat(tabsId, "-tab-");
|
|
29
30
|
const tabPanelIdPrefix = "".concat(tabsId, "-tab-panel-");
|
|
30
31
|
const tabRefs = useRef({});
|
|
31
|
-
const
|
|
32
|
+
const _useState = useState(0),
|
|
33
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
34
|
+
tabIndexOfActiveTab = _useState2[0],
|
|
35
|
+
setTabIndexOfActiveTab = _useState2[1];
|
|
32
36
|
const focusOnIndex = index => {
|
|
33
37
|
const tabRefsLength = Object.keys(tabRefs.current).length;
|
|
34
38
|
const wrappedIndex = wrapAround(index, 0, tabRefsLength - 1);
|
|
@@ -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 = {"tabs":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._5Q-Yl{display:block}._iZZCC{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._mKD-j{color:#6a6d70;cursor:pointer;height:52px;padding:16px 12px;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border-bottom:1px solid transparent;border-radius:1px}._mKD-j:hover{color:#32363a}._mKD-j:focus{outline:none}._mKD-j._CPSOG{margin-bottom:-1px;border-bottom:2px solid #0b6ed0;color:#32363a;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._hMjqL{padding-top:32px}._hMjqL._B6tVE{display:none}._mKD-j.focus-visible,._mKD-j:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4
|
+
var styles = {"tabs":"_5Q-Yl","bar":"_iZZCC","tab":"_mKD-j","active":"_CPSOG","panel":"_hMjqL","inactive":"_B6tVE"};
|
|
5
|
+
var stylesheet="._5Q-Yl{display:block}._iZZCC{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._mKD-j{color:#6a6d70;cursor:pointer;height:52px;padding:16px 12px;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border-bottom:1px solid transparent;border-radius:1px}._mKD-j:hover{color:#32363a}._mKD-j:focus{outline:none}._mKD-j._CPSOG{margin-bottom:-1px;border-bottom:2px solid #0b6ed0;color:#32363a;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._hMjqL{padding-top:32px}._hMjqL._B6tVE{display:none}._mKD-j.focus-visible,._mKD-j:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
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,15 +1,15 @@
|
|
|
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 './Toolbar2.js';
|
|
5
6
|
|
|
7
|
+
const _excluded = ["icon", "label", "className"];
|
|
6
8
|
const IconButtonWithLabel = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
...rest
|
|
12
|
-
} = _ref;
|
|
9
|
+
let Icon = _ref.icon,
|
|
10
|
+
label = _ref.label,
|
|
11
|
+
className = _ref.className,
|
|
12
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
13
13
|
return /*#__PURE__*/React__default.createElement("button", _extends({}, rest, {
|
|
14
14
|
className: classNames(className, styles.iconButtonWithLabel),
|
|
15
15
|
type: "button",
|
|
@@ -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, { forwardRef } from 'react';
|
|
3
5
|
import classNames from 'classnames';
|
|
4
6
|
import styles from './Toolbar2.js';
|
|
@@ -7,6 +9,7 @@ import { ToolbarProvider } from './ToolbarContext.js';
|
|
|
7
9
|
import useControllableState from '../../hooks/useControllableState/useControllableState.js';
|
|
8
10
|
import useId from '../../hooks/useId/useId.js';
|
|
9
11
|
|
|
12
|
+
const _excluded = ["children", "defaultSelectedIndex", "selectedIndex", "onSelectedIndexChange", "className", "id", "data-testid"];
|
|
10
13
|
/**
|
|
11
14
|
* @deprecated Instead, use:
|
|
12
15
|
* ```
|
|
@@ -14,17 +17,19 @@ import useId from '../../hooks/useId/useId.js';
|
|
|
14
17
|
* ```
|
|
15
18
|
*/
|
|
16
19
|
const Toolbar = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
defaultSelectedIndex = 0,
|
|
20
|
-
selectedIndex
|
|
21
|
-
onSelectedIndexChange,
|
|
22
|
-
className,
|
|
23
|
-
id
|
|
24
|
-
'data-testid'
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
let children = _ref.children,
|
|
21
|
+
_ref$defaultSelectedI = _ref.defaultSelectedIndex,
|
|
22
|
+
defaultSelectedIndex = _ref$defaultSelectedI === void 0 ? 0 : _ref$defaultSelectedI,
|
|
23
|
+
externalSelectedIndex = _ref.selectedIndex,
|
|
24
|
+
onSelectedIndexChange = _ref.onSelectedIndexChange,
|
|
25
|
+
className = _ref.className,
|
|
26
|
+
externalId = _ref.id,
|
|
27
|
+
dataTestId = _ref['data-testid'],
|
|
28
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
29
|
+
const _useControllableState = useControllableState(defaultSelectedIndex, onSelectedIndexChange, externalSelectedIndex),
|
|
30
|
+
_useControllableState2 = _slicedToArray(_useControllableState, 2),
|
|
31
|
+
selectedIndex = _useControllableState2[0],
|
|
32
|
+
setSelectedIndex = _useControllableState2[1];
|
|
28
33
|
const toolbarId = useId(externalId);
|
|
29
34
|
return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
|
|
30
35
|
ref: ref,
|
|
@@ -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 = {"toolbar":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._-DQc-,._H6PaC{display:flex}._H6PaC{flex-direction:column;align-items:center;min-width:165px;max-width:240px;padding:12px 16px 16px;border-right:1px solid #898989;background-color:#fff}._nes6c{width:69px;min-width:auto;max-width:none}._IqnZE{width:100%}._qZxdJ{margin-bottom:12px;background-color:transparent!important}._qZxdJ:hover{background-color:rgba(11,110,208,.08)!important}._qZxdJ:hover>svg{fill:#085caf}._qZxdJ:hover>span{color:#085caf}._qZxdJ:active{background-color:rgba(11,110,208,.12)!important}._qZxdJ:active>svg{fill:#0854a1}._qZxdJ:active>span{color:#0854a1}._qZxdJ._umu0Z{background-color:rgba(11,110,208,.08)!important}._qZxdJ._umu0Z>svg{fill:#0b6ed0}._qZxdJ._umu0Z>span{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._qZxdJ._umu0Z:hover{background-color:rgba(11,110,208,.08)!important}._qZxdJ._umu0Z:hover>svg{fill:#085caf}._qZxdJ._umu0Z:hover>span{color:#085caf}._qZxdJ._umu0Z:active{background-color:rgba(11,110,208,.12)!important}._qZxdJ._umu0Z:active>svg{fill:#0854a1}._qZxdJ._umu0Z:active>span{color:#0854a1}._84KOQ{border-radius:6px}._84KOQ>._PRMhW{display:block;fill:#515559}._TjKMz{margin-top:auto;margin-bottom:0}._VUgaC{position:relative;width:295px;background-color:#fff;padding:2px 1px 2px 2px;border-right:1px solid #898989}._VUgaC:hover>._sAmRe{opacity:1}._Qnqm6{width:0;border-width:0;padding:0}._OZpK8{border-radius:4px;min-width:100%;min-height:100%;outline:none}._pQfm7{width:36px;height:36px;position:absolute;top:48px;right:-18px;display:flex;justify-content:center;align-items:center;padding:0;background-color:transparent;border:2px solid transparent;border-radius:6px;outline:none;cursor:pointer;z-index:10}._sAmRe{opacity:0}._HPDvd,._pQfm7._-WOYy._-WOYy,._sAmRe:hover{opacity:1}._pQfm7._U8udP._U8udP{opacity:0}._pQfm7>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._pQfm7>span:hover{background-color:#0b6ed0;border-color:#0b6ed0}._pQfm7>span:hover>svg{fill:#fff}._pQfm7>span:active{background-color:#0854a1;border-color:#0854a1}._pQfm7>span:active>svg{fill:#fff}._pQfm7>span>svg{fill:#515559;border-radius:50%}._OZpK8._-lfeb{display:none!important}._1198i{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 7px}._L7BJS{font-size:14px;color:#515559;justify-self:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._T5gNS{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 5px}._vpWHF{fill:#515559}._6-uds{font-size:14px;color:#515559;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:5px}._1198i.focus-visible,._1198i:focus-visible,._OZpK8.focus-visible,._OZpK8:focus-visible,._T5gNS.focus-visible,._T5gNS:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._pQfm7.focus-visible,._pQfm7:focus-visible{border-color:#0a3f88}._pQfm7:active>span{background-color:#0854a1;border-color:#0854a1}._pQfm7:active>span>svg{fill:#fff}._sAmRe.focus-visible,._sAmRe:focus-visible{opacity:1}";
|
|
4
|
+
var styles = {"toolbar":"_-DQc-","toolbarNav":"_H6PaC","toolbarNavCollapsed":"_nes6c","toolbarTabs":"_IqnZE","toolbarTab":"_qZxdJ","selected":"_umu0Z","toolbarTabIconButton":"_84KOQ","icon":"_PRMhW","tabsExpandCollapseButton":"_TjKMz","toolbarPanels":"_VUgaC","toolbarPanelExpandCollapseButtonDefaultHidden":"_sAmRe","toolbarPanelsCollapsed":"_Qnqm6","toolbarPanel":"_OZpK8","toolbarPanelExpandCollapseButton":"_pQfm7","toolbarPanelExpandCollapseButtonDefaultShown":"_HPDvd","overrideShow":"_-WOYy","overrideHide":"_U8udP","notSelected":"_-lfeb","buttonWithLabel":"_1198i","buttonWithLabelLabel":"_L7BJS","iconButtonWithLabel":"_T5gNS","iconButtonWithLabelIcon":"_vpWHF","iconButtonWithLabelLabel":"_6-uds"};
|
|
5
|
+
var stylesheet="._-DQc-,._H6PaC{display:flex}._H6PaC{flex-direction:column;align-items:center;min-width:165px;max-width:240px;padding:12px 16px 16px;border-right:1px solid #898989;background-color:#fff}._nes6c{width:69px;min-width:auto;max-width:none}._IqnZE{width:100%}._qZxdJ{margin-bottom:12px;background-color:transparent!important}._qZxdJ:hover{background-color:rgba(11,110,208,.08)!important}._qZxdJ:hover>svg{fill:#085caf}._qZxdJ:hover>span{color:#085caf}._qZxdJ:active{background-color:rgba(11,110,208,.12)!important}._qZxdJ:active>svg{fill:#0854a1}._qZxdJ:active>span{color:#0854a1}._qZxdJ._umu0Z{background-color:rgba(11,110,208,.08)!important}._qZxdJ._umu0Z>svg{fill:#0b6ed0}._qZxdJ._umu0Z>span{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._qZxdJ._umu0Z:hover{background-color:rgba(11,110,208,.08)!important}._qZxdJ._umu0Z:hover>svg{fill:#085caf}._qZxdJ._umu0Z:hover>span{color:#085caf}._qZxdJ._umu0Z:active{background-color:rgba(11,110,208,.12)!important}._qZxdJ._umu0Z:active>svg{fill:#0854a1}._qZxdJ._umu0Z:active>span{color:#0854a1}._84KOQ{border-radius:6px}._84KOQ>._PRMhW{display:block;fill:#515559}._TjKMz{margin-top:auto;margin-bottom:0}._VUgaC{position:relative;width:295px;background-color:#fff;padding:2px 1px 2px 2px;border-right:1px solid #898989}._VUgaC:hover>._sAmRe{opacity:1}._Qnqm6{width:0;border-width:0;padding:0}._OZpK8{border-radius:4px;min-width:100%;min-height:100%;outline:none}._pQfm7{width:36px;height:36px;position:absolute;top:48px;right:-18px;display:flex;justify-content:center;align-items:center;padding:0;background-color:transparent;border:2px solid transparent;border-radius:6px;outline:none;cursor:pointer;z-index:10}._sAmRe{opacity:0}._HPDvd,._pQfm7._-WOYy._-WOYy,._sAmRe:hover{opacity:1}._pQfm7._U8udP._U8udP{opacity:0}._pQfm7>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._pQfm7>span:hover{background-color:#0b6ed0;border-color:#0b6ed0}._pQfm7>span:hover>svg{fill:#fff}._pQfm7>span:active{background-color:#0854a1;border-color:#0854a1}._pQfm7>span:active>svg{fill:#fff}._pQfm7>span>svg{fill:#515559;border-radius:50%}._OZpK8._-lfeb{display:none!important}._1198i{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 7px}._L7BJS{font-size:14px;color:#515559;justify-self:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._T5gNS{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 5px}._vpWHF{fill:#515559}._6-uds{font-size:14px;color:#515559;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:5px}._1198i.focus-visible,._1198i:focus-visible,._OZpK8.focus-visible,._OZpK8:focus-visible,._T5gNS.focus-visible,._T5gNS:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._pQfm7.focus-visible,._pQfm7:focus-visible{border-color:#0a3f88}._pQfm7:active>span{background-color:#0854a1;border-color:#0854a1}._pQfm7:active>span>svg{fill:#fff}._sAmRe.focus-visible,._sAmRe:focus-visible{opacity:1}";
|
|
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
|
+
ToolbarProvider = _createContextUtiliti.Provider,
|
|
6
|
+
useToolbarContext = _createContextUtiliti.useContext;
|
|
8
7
|
|
|
9
8
|
export { ToolbarProvider, useToolbarContext };
|
|
@@ -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 './Toolbar2.js';
|
|
@@ -6,6 +7,7 @@ import { useToolbarContext } from './ToolbarContext.js';
|
|
|
6
7
|
import '../../utils/index.js';
|
|
7
8
|
import getSubDataTestId from '../../utils/getSubDataTestId/getSubDataTestId.js';
|
|
8
9
|
|
|
10
|
+
const _excluded = ["isContainerInTabOrder", "children", "className", "aria-labelledby", "id", "data-testid"];
|
|
9
11
|
/**
|
|
10
12
|
* @deprecated Instead, use:
|
|
11
13
|
* ```
|
|
@@ -13,22 +15,20 @@ import getSubDataTestId from '../../utils/getSubDataTestId/getSubDataTestId.js';
|
|
|
13
15
|
* ```
|
|
14
16
|
*/
|
|
15
17
|
const ToolbarPanel = _ref => {
|
|
16
|
-
let
|
|
17
|
-
isContainerInTabOrder = false,
|
|
18
|
-
children,
|
|
19
|
-
className,
|
|
20
|
-
'aria-labelledby'
|
|
21
|
-
id,
|
|
22
|
-
'data-testid'
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
rootDataTestId
|
|
31
|
-
} = useToolbarContext();
|
|
18
|
+
let _ref$isContainerInTab = _ref.isContainerInTabOrder,
|
|
19
|
+
isContainerInTabOrder = _ref$isContainerInTab === void 0 ? false : _ref$isContainerInTab,
|
|
20
|
+
children = _ref.children,
|
|
21
|
+
className = _ref.className,
|
|
22
|
+
ariaLabelledby = _ref['aria-labelledby'],
|
|
23
|
+
id = _ref.id,
|
|
24
|
+
dataTestId = _ref['data-testid'],
|
|
25
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
26
|
+
const _useToolbarContext = useToolbarContext(),
|
|
27
|
+
selectedIndex = _useToolbarContext.selectedIndex,
|
|
28
|
+
index = _useToolbarContext.index,
|
|
29
|
+
toolbarId = _useToolbarContext.toolbarId,
|
|
30
|
+
isCollapsed = _useToolbarContext.isCollapsed,
|
|
31
|
+
rootDataTestId = _useToolbarContext.rootDataTestId;
|
|
32
32
|
const isSelected = selectedIndex === index;
|
|
33
33
|
const isFocusable = isSelected && !isCollapsed;
|
|
34
34
|
return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
|
|
@@ -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, { forwardRef, useState, useEffect, useRef } from 'react';
|
|
3
5
|
import classNames from 'classnames';
|
|
4
6
|
import styles from './Toolbar2.js';
|
|
@@ -17,21 +19,26 @@ import useIsHovered from '../../hooks/useIsHovered/useIsHovered.js';
|
|
|
17
19
|
import mergeRefs from '../../utils/mergeRefs/mergeRefs.js';
|
|
18
20
|
import getSubDataTestId from '../../utils/getSubDataTestId/getSubDataTestId.js';
|
|
19
21
|
|
|
22
|
+
const _excluded = ["isCollapsed", "className", "selectedTabPanelId", "isContainerHovered"],
|
|
23
|
+
_excluded2 = ["isCollapsible", "defaultIsCollapsed", "isCollapsed", "onIsCollapsedChange", "children", "className"];
|
|
20
24
|
const ExpandCollapseButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const {
|
|
29
|
-
translate
|
|
30
|
-
} = useTranslation();
|
|
25
|
+
let isCollapsed = _ref.isCollapsed,
|
|
26
|
+
className = _ref.className,
|
|
27
|
+
selectedTabPanelId = _ref.selectedTabPanelId,
|
|
28
|
+
isContainerHovered = _ref.isContainerHovered,
|
|
29
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
30
|
+
const _useTranslation = useTranslation(),
|
|
31
|
+
translate = _useTranslation.translate;
|
|
31
32
|
const showPanelLabel = translate('showPanel');
|
|
32
33
|
const hidePanelLabel = translate('hidePanel');
|
|
33
|
-
const
|
|
34
|
-
|
|
34
|
+
const _useState = useState(false),
|
|
35
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
36
|
+
isTooltipVisible = _useState2[0],
|
|
37
|
+
setIsTooltipVisible = _useState2[1];
|
|
38
|
+
const _useState3 = useState(false),
|
|
39
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
40
|
+
isHiddenByEscape = _useState4[0],
|
|
41
|
+
setIsHiddenByEscape = _useState4[1];
|
|
35
42
|
const handleKeyDown = event => {
|
|
36
43
|
if (event.key === 'Escape' && !isCollapsed) {
|
|
37
44
|
// Prevent Safari from exiting full-screen mode
|
|
@@ -79,24 +86,32 @@ ExpandCollapseButton.displayName = 'ExpandCollapseButton';
|
|
|
79
86
|
*/
|
|
80
87
|
const ToolbarPanels = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
81
88
|
var _props$id, _React$Children$toArr;
|
|
82
|
-
let
|
|
83
|
-
isCollapsible = true,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
let _ref2$isCollapsible = _ref2.isCollapsible,
|
|
90
|
+
isCollapsible = _ref2$isCollapsible === void 0 ? true : _ref2$isCollapsible,
|
|
91
|
+
_ref2$defaultIsCollap = _ref2.defaultIsCollapsed,
|
|
92
|
+
defaultIsCollapsed = _ref2$defaultIsCollap === void 0 ? false : _ref2$defaultIsCollap,
|
|
93
|
+
externalIsCollapsed = _ref2.isCollapsed,
|
|
94
|
+
onIsCollapsedChange = _ref2.onIsCollapsedChange,
|
|
95
|
+
children = _ref2.children,
|
|
96
|
+
className = _ref2.className,
|
|
97
|
+
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
91
98
|
const expandCollapseButtonRef = useRef(null);
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
99
|
+
const _useState5 = useState(false),
|
|
100
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
101
|
+
wasExpandCollapseButtonClicked = _useState6[0],
|
|
102
|
+
setWasExpandCollapseButtonClicked = _useState6[1];
|
|
103
|
+
const _useControllableState = useControllableState(isCollapsible && defaultIsCollapsed, isCollapsible ? onIsCollapsedChange : undefined, isCollapsible && externalIsCollapsed),
|
|
104
|
+
_useControllableState2 = _slicedToArray(_useControllableState, 2),
|
|
105
|
+
isCollapsed = _useControllableState2[0],
|
|
106
|
+
setIsCollapsed = _useControllableState2[1];
|
|
107
|
+
const _useToolbarContext = useToolbarContext(),
|
|
108
|
+
selectedIndex = _useToolbarContext.selectedIndex,
|
|
109
|
+
toolbarId = _useToolbarContext.id,
|
|
110
|
+
rootDataTestId = _useToolbarContext.rootDataTestId;
|
|
111
|
+
const _useIsHovered = useIsHovered(),
|
|
112
|
+
_useIsHovered2 = _slicedToArray(_useIsHovered, 2),
|
|
113
|
+
isToolbarPanelsContainerHoveredRef = _useIsHovered2[0],
|
|
114
|
+
isToolbarPanelsContainerHovered = _useIsHovered2[1];
|
|
100
115
|
useEffect(() => {
|
|
101
116
|
/*
|
|
102
117
|
* The expand/collapse button is re-rendered when the `isCollapsed` value changes.
|
|
@@ -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, { forwardRef } from 'react';
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import styles from './Toolbar2.js';
|
|
@@ -11,6 +12,7 @@ import getSubDataTestId from '../../utils/getSubDataTestId/getSubDataTestId.js';
|
|
|
11
12
|
import IconButton from '../IconButton/IconButton.js';
|
|
12
13
|
import ExcludeIcon from '../../icons/components/ExcludeIcon.js';
|
|
13
14
|
|
|
15
|
+
const _excluded = ["icon", "label", "className", "aria-controls", "id", "data-testid"];
|
|
14
16
|
const getPrevIndex = (currentIndex, numItems) => (currentIndex - 1 + numItems) % numItems;
|
|
15
17
|
const getNextIndex = (currentIndex, numItems) => (currentIndex + 1) % numItems;
|
|
16
18
|
/**
|
|
@@ -20,26 +22,23 @@ const getNextIndex = (currentIndex, numItems) => (currentIndex + 1) % numItems;
|
|
|
20
22
|
* ```
|
|
21
23
|
*/
|
|
22
24
|
const ToolbarTab = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
id: toolbarId,
|
|
41
|
-
rootDataTestId
|
|
42
|
-
} = useToolbarContext();
|
|
25
|
+
let Icon = _ref.icon,
|
|
26
|
+
label = _ref.label,
|
|
27
|
+
className = _ref.className,
|
|
28
|
+
ariaControls = _ref['aria-controls'],
|
|
29
|
+
id = _ref.id,
|
|
30
|
+
dataTestId = _ref['data-testid'],
|
|
31
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
+
const _useToolbarContext = useToolbarContext(),
|
|
33
|
+
focusedIndex = _useToolbarContext.focusedIndex,
|
|
34
|
+
selectedIndex = _useToolbarContext.selectedIndex,
|
|
35
|
+
setSelectedIndex = _useToolbarContext.setSelectedIndex,
|
|
36
|
+
focusTab = _useToolbarContext.focusTab,
|
|
37
|
+
isCollapsed = _useToolbarContext.isCollapsed,
|
|
38
|
+
numTabs = _useToolbarContext.numTabs,
|
|
39
|
+
index = _useToolbarContext.index,
|
|
40
|
+
toolbarId = _useToolbarContext.id,
|
|
41
|
+
rootDataTestId = _useToolbarContext.rootDataTestId;
|
|
43
42
|
const isFocused = focusedIndex === index;
|
|
44
43
|
const isSelected = selectedIndex === index;
|
|
45
44
|
const handleSelect = () => {
|
|
@@ -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, { forwardRef, useRef, useState, useEffect } from 'react';
|
|
3
5
|
import classNames from 'classnames';
|
|
4
6
|
import styles from './Toolbar2.js';
|
|
@@ -16,6 +18,7 @@ import ChevronRightIcon from '../../icons/components/ChevronRightIcon.js';
|
|
|
16
18
|
import ChevronLeftIcon from '../../icons/components/ChevronLeftIcon.js';
|
|
17
19
|
import mergeRefs from '../../utils/mergeRefs/mergeRefs.js';
|
|
18
20
|
|
|
21
|
+
const _excluded = ["isCollapsible", "defaultIsCollapsed", "isCollapsed", "onIsCollapsedChange", "children", "className", "aria-label", "aria-labelledby", "aria-describedby"];
|
|
19
22
|
/**
|
|
20
23
|
* @deprecated Instead, use:
|
|
21
24
|
* ```
|
|
@@ -23,26 +26,31 @@ import mergeRefs from '../../utils/mergeRefs/mergeRefs.js';
|
|
|
23
26
|
* ```
|
|
24
27
|
*/
|
|
25
28
|
const ToolbarTabs = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
26
|
-
let
|
|
27
|
-
isCollapsible = true,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
'aria-
|
|
35
|
-
'aria-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
translate
|
|
40
|
-
} = useTranslation();
|
|
29
|
+
let _ref$isCollapsible = _ref.isCollapsible,
|
|
30
|
+
isCollapsible = _ref$isCollapsible === void 0 ? true : _ref$isCollapsible,
|
|
31
|
+
_ref$defaultIsCollaps = _ref.defaultIsCollapsed,
|
|
32
|
+
defaultIsCollapsed = _ref$defaultIsCollaps === void 0 ? false : _ref$defaultIsCollaps,
|
|
33
|
+
externalIsCollapsed = _ref.isCollapsed,
|
|
34
|
+
onIsCollapsedChange = _ref.onIsCollapsedChange,
|
|
35
|
+
children = _ref.children,
|
|
36
|
+
className = _ref.className,
|
|
37
|
+
ariaLabel = _ref['aria-label'],
|
|
38
|
+
ariaLabelledBy = _ref['aria-labelledby'],
|
|
39
|
+
ariaDescribedBy = _ref['aria-describedby'],
|
|
40
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
41
|
+
const _useTranslation = useTranslation(),
|
|
42
|
+
translate = _useTranslation.translate;
|
|
41
43
|
const tabRefs = useRef({});
|
|
42
44
|
const expandToolbarTabsIconButtonRef = useRef(null);
|
|
43
45
|
const collapseToolbarTabsIconButtonWithLabelRef = useRef(null);
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
+
const _useState = useState(false),
|
|
47
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
48
|
+
isExpandCollapseButtonFocused = _useState2[0],
|
|
49
|
+
setIsExpandCollapseButtonFocused = _useState2[1];
|
|
50
|
+
const _useControllableState = useControllableState(isCollapsible && defaultIsCollapsed, isCollapsible ? onIsCollapsedChange : undefined, isCollapsible && externalIsCollapsed),
|
|
51
|
+
_useControllableState2 = _slicedToArray(_useControllableState, 2),
|
|
52
|
+
isCollapsed = _useControllableState2[0],
|
|
53
|
+
setIsCollapsed = _useControllableState2[1];
|
|
46
54
|
|
|
47
55
|
/*
|
|
48
56
|
* Focuses the new expand/collapse button when the tabs expand/collapse and the old expand/collapse button was focused.
|
|
@@ -59,13 +67,15 @@ const ToolbarTabs = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
59
67
|
}
|
|
60
68
|
}
|
|
61
69
|
}, [isCollapsed, isExpandCollapseButtonFocused]);
|
|
62
|
-
const
|
|
63
|
-
selectedIndex,
|
|
64
|
-
setSelectedIndex,
|
|
65
|
-
id,
|
|
66
|
-
rootDataTestId
|
|
67
|
-
|
|
68
|
-
|
|
70
|
+
const _useToolbarContext = useToolbarContext(),
|
|
71
|
+
selectedIndex = _useToolbarContext.selectedIndex,
|
|
72
|
+
setSelectedIndex = _useToolbarContext.setSelectedIndex,
|
|
73
|
+
id = _useToolbarContext.id,
|
|
74
|
+
rootDataTestId = _useToolbarContext.rootDataTestId;
|
|
75
|
+
const _useState3 = useState(selectedIndex),
|
|
76
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
77
|
+
focusedIndex = _useState4[0],
|
|
78
|
+
setFocusedIndex = _useState4[1];
|
|
69
79
|
const numTabs = React__default.Children.count(children);
|
|
70
80
|
const focusTab = index => {
|
|
71
81
|
var _tabRefs$current;
|