@qualtrics/ui-react 2.79.1 → 2.81.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 +25 -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-91d2f6f8.js → index-2272eaad.js} +15 -9
- package/dist/__shared/cjs/{index-d4ec6b6f.js → index-7fd3ddfe.js} +2829 -2634
- 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 +52 -27
- 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 +30 -22
- package/dist/next/SplitButton/SplitButton2.js +3 -3
- package/dist/next/SplitButton/SplitButtonOption.js +6 -6
- 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.d.ts +12 -2
- package/dist/next/index.js +2395 -2199
- 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,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 = "._W0cYO,._XZT-5{display:flex}._XZT-5{flex-direction:column;align-items:center;min-width:165px;max-width:240px;padding:12px 16px 16px;border-right:1px solid #898989;background-color:#fff}._XaSnf{width:69px;min-width:auto;max-width:none}._0oO-E{width:100%}._ElM-l{margin-bottom:12px;background-color:transparent!important}._ElM-l:hover{background-color:rgba(11,110,208,.08)!important}._ElM-l:hover>svg{fill:#085caf}._ElM-l:hover>span{color:#085caf}._ElM-l:active{background-color:rgba(11,110,208,.12)!important}._ElM-l:active>svg{fill:#0854a1}._ElM-l:active>span{color:#0854a1}._ElM-l._WRwGU{background-color:rgba(11,110,208,.08)!important}._ElM-l._WRwGU>svg{fill:#0b6ed0}._ElM-l._WRwGU>span{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._ElM-l._WRwGU:hover{background-color:rgba(11,110,208,.08)!important}._ElM-l._WRwGU:hover>svg{fill:#085caf}._ElM-l._WRwGU:hover>span{color:#085caf}._ElM-l._WRwGU:active{background-color:rgba(11,110,208,.12)!important}._ElM-l._WRwGU:active>svg{fill:#0854a1}._ElM-l._WRwGU:active>span{color:#0854a1}._GRUtg{border-radius:6px}._GRUtg>._9RtzU{display:block;fill:#515559}._bvqR9{margin-top:auto;margin-bottom:0}._MNRK5{position:relative;width:295px;background-color:#fff;padding:2px 1px 2px 2px;border-right:1px solid #898989}._MNRK5:hover>._uqOuL{opacity:1}._1rj2B{width:0;border-width:0;padding:0}._-ZRdo{border-radius:4px;min-width:100%;min-height:100%;outline:none}._FlCM7{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}._uqOuL{opacity:0}._FlCM7._xeE7-._xeE7-,._goGcm,._uqOuL:hover{opacity:1}._FlCM7._fg69P._fg69P{opacity:0}._FlCM7>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._FlCM7>span:hover{background-color:#0b6ed0;border-color:#0b6ed0}._FlCM7>span:hover>svg{fill:#fff}._FlCM7>span:active{background-color:#0854a1;border-color:#0854a1}._FlCM7>span:active>svg{fill:#fff}._FlCM7>span>svg{fill:#515559;border-radius:50%}._-ZRdo._mUAtk{display:none!important}._LSfGx{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 7px}._hFgcI{font-size:14px;color:#515559;justify-self:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._3B2gC{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 5px}._6-m97{fill:#515559}._geaH-{font-size:14px;color:#515559;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:5px}._3B2gC.focus-visible,._3B2gC:focus-visible,._-ZRdo.focus-visible,._-ZRdo:focus-visible,._LSfGx.focus-visible,._LSfGx:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._FlCM7.focus-visible,._FlCM7:focus-visible{border-color:#0a3f88}._FlCM7:active>span{background-color:#0854a1;border-color:#0854a1}._FlCM7:active>span>svg{fill:#fff}._uqOuL.focus-visible,._uqOuL:focus-visible{opacity:1}";
|
|
4
|
+
var styles = {"toolbar":"_W0cYO","toolbarNav":"_XZT-5","toolbarNavCollapsed":"_XaSnf","toolbarTabs":"_0oO-E","toolbarTab":"_ElM-l","selected":"_WRwGU","toolbarTabIconButton":"_GRUtg","icon":"_9RtzU","tabsExpandCollapseButton":"_bvqR9","toolbarPanels":"_MNRK5","toolbarPanelExpandCollapseButtonDefaultHidden":"_uqOuL","toolbarPanelsCollapsed":"_1rj2B","toolbarPanel":"_-ZRdo","toolbarPanelExpandCollapseButton":"_FlCM7","toolbarPanelExpandCollapseButtonDefaultShown":"_goGcm","overrideShow":"_xeE7-","overrideHide":"_fg69P","notSelected":"_mUAtk","buttonWithLabel":"_LSfGx","buttonWithLabelLabel":"_hFgcI","iconButtonWithLabel":"_3B2gC","iconButtonWithLabelIcon":"_6-m97","iconButtonWithLabelLabel":"_geaH-"};
|
|
5
|
+
var stylesheet="._W0cYO,._XZT-5{display:flex}._XZT-5{flex-direction:column;align-items:center;min-width:165px;max-width:240px;padding:12px 16px 16px;border-right:1px solid #898989;background-color:#fff}._XaSnf{width:69px;min-width:auto;max-width:none}._0oO-E{width:100%}._ElM-l{margin-bottom:12px;background-color:transparent!important}._ElM-l:hover{background-color:rgba(11,110,208,.08)!important}._ElM-l:hover>svg{fill:#085caf}._ElM-l:hover>span{color:#085caf}._ElM-l:active{background-color:rgba(11,110,208,.12)!important}._ElM-l:active>svg{fill:#0854a1}._ElM-l:active>span{color:#0854a1}._ElM-l._WRwGU{background-color:rgba(11,110,208,.08)!important}._ElM-l._WRwGU>svg{fill:#0b6ed0}._ElM-l._WRwGU>span{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._ElM-l._WRwGU:hover{background-color:rgba(11,110,208,.08)!important}._ElM-l._WRwGU:hover>svg{fill:#085caf}._ElM-l._WRwGU:hover>span{color:#085caf}._ElM-l._WRwGU:active{background-color:rgba(11,110,208,.12)!important}._ElM-l._WRwGU:active>svg{fill:#0854a1}._ElM-l._WRwGU:active>span{color:#0854a1}._GRUtg{border-radius:6px}._GRUtg>._9RtzU{display:block;fill:#515559}._bvqR9{margin-top:auto;margin-bottom:0}._MNRK5{position:relative;width:295px;background-color:#fff;padding:2px 1px 2px 2px;border-right:1px solid #898989}._MNRK5:hover>._uqOuL{opacity:1}._1rj2B{width:0;border-width:0;padding:0}._-ZRdo{border-radius:4px;min-width:100%;min-height:100%;outline:none}._FlCM7{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}._uqOuL{opacity:0}._FlCM7._xeE7-._xeE7-,._goGcm,._uqOuL:hover{opacity:1}._FlCM7._fg69P._fg69P{opacity:0}._FlCM7>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._FlCM7>span:hover{background-color:#0b6ed0;border-color:#0b6ed0}._FlCM7>span:hover>svg{fill:#fff}._FlCM7>span:active{background-color:#0854a1;border-color:#0854a1}._FlCM7>span:active>svg{fill:#fff}._FlCM7>span>svg{fill:#515559;border-radius:50%}._-ZRdo._mUAtk{display:none!important}._LSfGx{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 7px}._hFgcI{font-size:14px;color:#515559;justify-self:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._3B2gC{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 5px}._6-m97{fill:#515559}._geaH-{font-size:14px;color:#515559;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:5px}._3B2gC.focus-visible,._3B2gC:focus-visible,._-ZRdo.focus-visible,._-ZRdo:focus-visible,._LSfGx.focus-visible,._LSfGx:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._FlCM7.focus-visible,._FlCM7:focus-visible{border-color:#0a3f88}._FlCM7:active>span{background-color:#0854a1;border-color:#0854a1}._FlCM7:active>span>svg{fill:#fff}._uqOuL.focus-visible,._uqOuL: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;
|
|
@@ -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 = {"font-size-12":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._A3peL{font-size:.75rem!important}._0WoWz{font-size:.875rem!important}._GDoSV{font-size:1rem!important}._C94jZ{font-size:1.125rem!important}._bqttZ{font-size:1.25rem!important}._XHjnB{font-size:1.5rem!important}._fRCsT{font-size:1.75rem!important}._PRkIo{font-size:2.25rem!important}._QrMfI{font-size:2.5rem!important}._aS3oy{font-size:3rem!important}._fVOoi{font-size:4rem!important}._dxMXo{font-size:4.5rem!important}._O53jc{line-height:1rem!important}._mZoIZ{line-height:1.25rem!important}._q7i1I{line-height:1.5rem!important}._9dpZl{line-height:1.75rem!important}._wFrw0{line-height:2rem!important}._i86T8{line-height:2.188rem!important}._BSfsi{line-height:2.5rem!important}._BhXGu{line-height:2.75rem!important}._Xg6yx{line-height:3.125rem!important}._vF5SM{line-height:4.25rem!important}._fYirs{line-height:4.5rem!important}._KyDxw{font-weight:100!important}._9f0pf{font-weight:200!important}._-739o{font-weight:300!important}._tQAIj{font-weight:400!important}._0Fz8S{font-weight:500!important}._TOBBj{font-weight:600!important}._q-7T1{font-weight:700!important}._8v1Lo{font-weight:800!important}._BDs-8{font-weight:900!important}._ZiM7u{font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important}._VfMRv{font-family:\"72Duplex\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important}._lnWRJ{font-family:\"72Condensed\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important}._tQwQb{font-family:\"72Mono\",monospace!important}._HJUpz{font-weight:700!important}._61BR4,._HJUpz{font-size:1rem!important;line-height:1.25rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._61BR4{font-weight:400!important}._Bn7kg{font-weight:300!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important}._Bn7kg,._LJg0p{font-size:4.5rem!important;line-height:4.5rem!important;color:#2a2a2a!important}._LJg0p{font-weight:700!important;font-family:\"72Duplex\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important}._rZ3S4{font-weight:400!important}._rZ3S4,._wkXCg{font-size:4rem!important;line-height:4.25rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._wkXCg{font-weight:700!important}._Bm2CN{font-weight:400!important}._8ZW-z,._Bm2CN{font-size:3rem!important;line-height:3.125rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._8ZW-z{font-weight:700!important}._V-39K{font-weight:400!important}._7tL4J,._V-39K{font-size:2.5rem!important;line-height:2.5rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._7tL4J{font-weight:700!important}._ah9eF{font-weight:400!important}._ah9eF,._lu7dF{font-size:4rem!important;line-height:4.25rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._lu7dF{font-weight:700!important}._roNQ7{font-weight:400!important}._IoSOa,._roNQ7{font-size:3rem!important;line-height:3.125rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._IoSOa{font-weight:700!important}._ZeCPI{font-weight:400!important}._V9dDj,._ZeCPI{font-size:2.5rem!important;line-height:2.5rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._V9dDj{font-weight:700!important}._X1Oxa{font-weight:400!important}._C1QjP,._X1Oxa{font-size:2.25rem!important;line-height:2.5rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._C1QjP{font-weight:700!important}._wCiTN{font-weight:400!important}._GgOph,._wCiTN{font-size:1.75rem!important;line-height:2.188rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._GgOph{font-weight:700!important}._KBqLx{font-weight:400!important}._KBqLx,._W96fC{font-size:1.5rem!important;line-height:2rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._W96fC{font-weight:700!important}._74U5w{font-weight:400!important}._74U5w,._CZMpF{font-size:1.25rem!important;line-height:1.75rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._CZMpF{font-weight:700!important}._M6Xxl{font-weight:400!important}._iPDgo,._M6Xxl{font-size:1.125rem!important;line-height:1.5rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._iPDgo{font-weight:700!important}._w72N7{font-weight:400!important}._DlzoL,._w72N7{font-size:1rem!important;line-height:1.25rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._DlzoL{font-weight:700!important}._HLWYO{font-weight:400!important}._HLWYO,._yIAZB{font-size:.75rem!important;line-height:1rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#595959!important}._fKkch,._yIAZB{font-weight:700!important}._fKkch{font-size:.875rem!important;font-family:\"72Duplex\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important}._fKkch,._XvlhY{line-height:1.25rem!important;color:#2a2a2a!important}._XvlhY{font-size:1rem!important;font-weight:400!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important}._kct2h{color:#ba4f0d!important}._39x2q,._kct2h{font-size:.75rem!important;font-weight:400!important;line-height:1rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important}._39x2q{color:#da1c3d!important}";
|
|
4
|
+
var styles = {"font-size-12":"_A3peL","font-size-14":"_0WoWz","font-size-16":"_GDoSV","font-size-18":"_C94jZ","font-size-20":"_bqttZ","font-size-24":"_XHjnB","font-size-28":"_fRCsT","font-size-36":"_PRkIo","font-size-40":"_QrMfI","font-size-48":"_aS3oy","font-size-64":"_fVOoi","font-size-72":"_dxMXo","line-height-16":"_O53jc","line-height-20":"_mZoIZ","line-height-24":"_q7i1I","line-height-28":"_9dpZl","line-height-32":"_wFrw0","line-height-35":"_i86T8","line-height-40":"_BSfsi","line-height-44":"_BhXGu","line-height-50":"_Xg6yx","line-height-68":"_vF5SM","line-height-72":"_fYirs","font-weight-thin":"_KyDxw","font-weight-extralight":"_9f0pf","font-weight-light":"_-739o","font-weight-regular":"_tQAIj","font-weight-medium":"_0Fz8S","font-weight-demibold":"_TOBBj","font-weight-bold":"_q-7T1","font-weight-extrabold":"_8v1Lo","font-weight-black":"_BDs-8","font-family-default":"_ZiM7u","font-family-default-duplex":"_VfMRv","font-family-default-condensed":"_lnWRJ","font-family-code":"_tQwQb","body-text-bold":"_HJUpz","body-text-regular":"_61BR4","data-viz-large-number-light":"_Bn7kg","data-viz-large-number-semibold":"_LJg0p","display-body-primary-regular":"_rZ3S4","display-body-primary-bold":"_wkXCg","display-body-secondary-regular":"_Bm2CN","display-body-secondary-bold":"_8ZW-z","display-body-tertiary-regular":"_V-39K","display-body-tertiary-bold":"_7tL4J","display-heading-primary-regular":"_ah9eF","display-heading-primary-bold":"_lu7dF","display-heading-secondary-regular":"_roNQ7","display-heading-secondary-bold":"_IoSOa","display-heading-tertiary-regular":"_ZeCPI","display-heading-tertiary-bold":"_V9dDj","heading-1-regular":"_X1Oxa","heading-1-bold":"_C1QjP","heading-2-regular":"_wCiTN","heading-2-bold":"_GgOph","heading-3-regular":"_KBqLx","heading-3-bold":"_W96fC","heading-4-regular":"_74U5w","heading-4-bold":"_CZMpF","heading-5-regular":"_M6Xxl","heading-5-bold":"_iPDgo","heading-6-regular":"_w72N7","heading-6-bold":"_DlzoL","helper-text-regular":"_HLWYO","helper-text-bold":"_yIAZB","input-label-bold":"_fKkch","input-label-regular":"_XvlhY","warning-text-regular":"_kct2h","error-text-regular":"_39x2q"};
|
|
5
|
+
var stylesheet="._A3peL{font-size:.75rem!important}._0WoWz{font-size:.875rem!important}._GDoSV{font-size:1rem!important}._C94jZ{font-size:1.125rem!important}._bqttZ{font-size:1.25rem!important}._XHjnB{font-size:1.5rem!important}._fRCsT{font-size:1.75rem!important}._PRkIo{font-size:2.25rem!important}._QrMfI{font-size:2.5rem!important}._aS3oy{font-size:3rem!important}._fVOoi{font-size:4rem!important}._dxMXo{font-size:4.5rem!important}._O53jc{line-height:1rem!important}._mZoIZ{line-height:1.25rem!important}._q7i1I{line-height:1.5rem!important}._9dpZl{line-height:1.75rem!important}._wFrw0{line-height:2rem!important}._i86T8{line-height:2.188rem!important}._BSfsi{line-height:2.5rem!important}._BhXGu{line-height:2.75rem!important}._Xg6yx{line-height:3.125rem!important}._vF5SM{line-height:4.25rem!important}._fYirs{line-height:4.5rem!important}._KyDxw{font-weight:100!important}._9f0pf{font-weight:200!important}._-739o{font-weight:300!important}._tQAIj{font-weight:400!important}._0Fz8S{font-weight:500!important}._TOBBj{font-weight:600!important}._q-7T1{font-weight:700!important}._8v1Lo{font-weight:800!important}._BDs-8{font-weight:900!important}._ZiM7u{font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important}._VfMRv{font-family:\"72Duplex\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important}._lnWRJ{font-family:\"72Condensed\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important}._tQwQb{font-family:\"72Mono\",monospace!important}._HJUpz{font-weight:700!important}._61BR4,._HJUpz{font-size:1rem!important;line-height:1.25rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._61BR4{font-weight:400!important}._Bn7kg{font-weight:300!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important}._Bn7kg,._LJg0p{font-size:4.5rem!important;line-height:4.5rem!important;color:#2a2a2a!important}._LJg0p{font-weight:700!important;font-family:\"72Duplex\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important}._rZ3S4{font-weight:400!important}._rZ3S4,._wkXCg{font-size:4rem!important;line-height:4.25rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._wkXCg{font-weight:700!important}._Bm2CN{font-weight:400!important}._8ZW-z,._Bm2CN{font-size:3rem!important;line-height:3.125rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._8ZW-z{font-weight:700!important}._V-39K{font-weight:400!important}._7tL4J,._V-39K{font-size:2.5rem!important;line-height:2.5rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._7tL4J{font-weight:700!important}._ah9eF{font-weight:400!important}._ah9eF,._lu7dF{font-size:4rem!important;line-height:4.25rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._lu7dF{font-weight:700!important}._roNQ7{font-weight:400!important}._IoSOa,._roNQ7{font-size:3rem!important;line-height:3.125rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._IoSOa{font-weight:700!important}._ZeCPI{font-weight:400!important}._V9dDj,._ZeCPI{font-size:2.5rem!important;line-height:2.5rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._V9dDj{font-weight:700!important}._X1Oxa{font-weight:400!important}._C1QjP,._X1Oxa{font-size:2.25rem!important;line-height:2.5rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._C1QjP{font-weight:700!important}._wCiTN{font-weight:400!important}._GgOph,._wCiTN{font-size:1.75rem!important;line-height:2.188rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._GgOph{font-weight:700!important}._KBqLx{font-weight:400!important}._KBqLx,._W96fC{font-size:1.5rem!important;line-height:2rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._W96fC{font-weight:700!important}._74U5w{font-weight:400!important}._74U5w,._CZMpF{font-size:1.25rem!important;line-height:1.75rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._CZMpF{font-weight:700!important}._M6Xxl{font-weight:400!important}._iPDgo,._M6Xxl{font-size:1.125rem!important;line-height:1.5rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._iPDgo{font-weight:700!important}._w72N7{font-weight:400!important}._DlzoL,._w72N7{font-size:1rem!important;line-height:1.25rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#2a2a2a!important}._DlzoL{font-weight:700!important}._HLWYO{font-weight:400!important}._HLWYO,._yIAZB{font-size:.75rem!important;line-height:1rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important;color:#595959!important}._fKkch,._yIAZB{font-weight:700!important}._fKkch{font-size:.875rem!important;font-family:\"72Duplex\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important}._fKkch,._XvlhY{line-height:1.25rem!important;color:#2a2a2a!important}._XvlhY{font-size:1rem!important;font-weight:400!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important}._kct2h{color:#ba4f0d!important}._39x2q,._kct2h{font-size:.75rem!important;font-weight:400!important;line-height:1rem!important;font-family:\"72\",Helvetica Neue,Helvetica,Arial,sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans!important}._39x2q{color:#da1c3d!important}";
|
|
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,3 +1,4 @@
|
|
|
1
|
+
import _slicedToArray from '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
1
2
|
import { useState, useEffect } from 'react';
|
|
2
3
|
import '../../utils/mediaQueryManager/index.js';
|
|
3
4
|
import { DEFAULT_BREAKPOINTS } from '../../utils/constants.js';
|
|
@@ -11,7 +12,9 @@ function getMinWidthQuery(length, unit) {
|
|
|
11
12
|
function getInitialValues(breakpointsConfig, unit) {
|
|
12
13
|
const initialValues = {};
|
|
13
14
|
Object.entries(breakpointsConfig).forEach(_ref => {
|
|
14
|
-
let
|
|
15
|
+
let _ref2 = _slicedToArray(_ref, 2),
|
|
16
|
+
breakpointName = _ref2[0],
|
|
17
|
+
breakpointValue = _ref2[1];
|
|
15
18
|
const query = getMinWidthQuery(breakpointValue, unit);
|
|
16
19
|
initialValues[breakpointName] = getMediaQueryValue(query);
|
|
17
20
|
});
|
|
@@ -20,13 +23,18 @@ function getInitialValues(breakpointsConfig, unit) {
|
|
|
20
23
|
function useBreakpoints() {
|
|
21
24
|
let breakpoints = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_BREAKPOINTS;
|
|
22
25
|
let unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'em';
|
|
23
|
-
const
|
|
26
|
+
const _useState = useState(() => getInitialValues(breakpoints, unit)),
|
|
27
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
28
|
+
matches = _useState2[0],
|
|
29
|
+
setMatches = _useState2[1];
|
|
24
30
|
const breakpointsRef = useLatest(breakpoints);
|
|
25
31
|
const unitRef = useLatest(unit);
|
|
26
32
|
useEffect(() => {
|
|
27
33
|
const unsubscribeFns = [];
|
|
28
|
-
Object.entries(breakpointsRef.current).forEach(
|
|
29
|
-
let
|
|
34
|
+
Object.entries(breakpointsRef.current).forEach(_ref3 => {
|
|
35
|
+
let _ref4 = _slicedToArray(_ref3, 2),
|
|
36
|
+
breakpointName = _ref4[0],
|
|
37
|
+
breakpointValue = _ref4[1];
|
|
30
38
|
const query = getMinWidthQuery(breakpointValue, unitRef.current);
|
|
31
39
|
const unsubscribe = subscribe(query, event => {
|
|
32
40
|
setMatches(prevValue => ({
|
|
@@ -14,9 +14,7 @@ function useClickOutside(refs, onClickOutside) {
|
|
|
14
14
|
const handler = event => {
|
|
15
15
|
const isInside = allRefs.some(ref => {
|
|
16
16
|
var _el$contains;
|
|
17
|
-
const
|
|
18
|
-
current: el
|
|
19
|
-
} = ref;
|
|
17
|
+
const el = ref.current;
|
|
20
18
|
return el === null || el === void 0 || (_el$contains = el.contains) === null || _el$contains === void 0 ? void 0 : _el$contains.call(el, event.target);
|
|
21
19
|
});
|
|
22
20
|
if (!isInside) {
|
|
@@ -11,9 +11,9 @@ import useEventListener from '../useEventListener/useEventListener.js';
|
|
|
11
11
|
* @returns A function that, when called, ignores the current outside click if one exists.
|
|
12
12
|
*/
|
|
13
13
|
function useClickOutsidePortals(onClickOutside) {
|
|
14
|
-
let {
|
|
15
|
-
disabled =
|
|
16
|
-
|
|
14
|
+
let _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
15
|
+
_ref$disabled = _ref.disabled,
|
|
16
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
|
17
17
|
const wasClickedInside = useRef(false);
|
|
18
18
|
const handleClick = e => {
|
|
19
19
|
if (!wasClickedInside.current) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import _slicedToArray from '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
1
2
|
import { useState, useEffect, useCallback, useRef } from 'react';
|
|
2
3
|
import '../useLatest/index.js';
|
|
3
4
|
import useLatest from '../useLatest/useLatest.js';
|
|
4
5
|
|
|
5
|
-
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
6
6
|
const BECAME_CONTROLLED_WARNING = 'WARNING: A component is changing from being uncontrolled to controlled. Components should not switch from being uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled component for the lifetime of the component. More info: https://fb.me/react-controlled-components';
|
|
7
7
|
const BECAME_UNCONTROLLED_WARNING = 'WARNING: A component is changing from being controlled to uncontrolled. Components should not switch from being controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled component for the lifetime of the component. More info: https://fb.me/react-controlled-components';
|
|
8
8
|
|
|
@@ -14,7 +14,10 @@ const BECAME_UNCONTROLLED_WARNING = 'WARNING: A component is changing from being
|
|
|
14
14
|
* @returns An array where the first item is the current state and the second item is the state updater.
|
|
15
15
|
*/
|
|
16
16
|
function useControllableState(initialState, onChange, externalState) {
|
|
17
|
-
const
|
|
17
|
+
const _useState = useState(initialState),
|
|
18
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
19
|
+
state = _useState2[0],
|
|
20
|
+
replaceState = _useState2[1];
|
|
18
21
|
const onChangeRef = useLatest(onChange);
|
|
19
22
|
const externalStateRef = useLatest(externalState);
|
|
20
23
|
const internalStateRef = useLatest(state);
|
|
@@ -19,11 +19,12 @@ function isEventTarget(target) {
|
|
|
19
19
|
function useEventListener(targetOrRef, event, handler) {
|
|
20
20
|
let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
21
21
|
const listener = useEventCallback(handler);
|
|
22
|
-
const
|
|
23
|
-
isCaptureEvent = false,
|
|
24
|
-
isDisabled =
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
const _options$isCaptureEve = options.isCaptureEvent,
|
|
23
|
+
isCaptureEvent = _options$isCaptureEve === void 0 ? false : _options$isCaptureEve,
|
|
24
|
+
_options$isDisabled = options.isDisabled,
|
|
25
|
+
isDisabled = _options$isDisabled === void 0 ? false : _options$isDisabled,
|
|
26
|
+
_options$additionalDe = options.additionalDependencies,
|
|
27
|
+
additionalDependencies = _options$additionalDe === void 0 ? [] : _options$additionalDe;
|
|
27
28
|
useEffect(() => {
|
|
28
29
|
if (!targetOrRef) {
|
|
29
30
|
return undefined;
|
|
@@ -36,9 +36,9 @@ function useFocusSequence() {
|
|
|
36
36
|
* @param config.wrap - Allows focus to loop from last element to first
|
|
37
37
|
*/
|
|
38
38
|
const focusNext = useCallback(function () {
|
|
39
|
-
let {
|
|
40
|
-
wrap =
|
|
41
|
-
|
|
39
|
+
let _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
40
|
+
_ref$wrap = _ref.wrap,
|
|
41
|
+
wrap = _ref$wrap === void 0 ? true : _ref$wrap;
|
|
42
42
|
const sorted = sortNodes(nodesMap.current.values());
|
|
43
43
|
const focusedNodeIndex = sorted.findIndex(n => n === document.activeElement);
|
|
44
44
|
const nextIndex = getNextIndex(focusedNodeIndex, sorted.length, {
|
|
@@ -53,9 +53,9 @@ function useFocusSequence() {
|
|
|
53
53
|
* @param config.wrap - Allows focus to loop from first element to last
|
|
54
54
|
*/
|
|
55
55
|
const focusPrevious = useCallback(function () {
|
|
56
|
-
let {
|
|
57
|
-
wrap =
|
|
58
|
-
|
|
56
|
+
let _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
57
|
+
_ref2$wrap = _ref2.wrap,
|
|
58
|
+
wrap = _ref2$wrap === void 0 ? true : _ref2$wrap;
|
|
59
59
|
const sorted = sortNodes(nodesMap.current.values());
|
|
60
60
|
const focusedNodeIndex = sorted.findIndex(n => n === document.activeElement);
|
|
61
61
|
const previousIndex = getPreviousIndex(focusedNodeIndex, sorted.length, {
|
|
@@ -96,9 +96,9 @@ function sortNodes(nodes) {
|
|
|
96
96
|
return copy;
|
|
97
97
|
}
|
|
98
98
|
function getNextIndex(index, numItems) {
|
|
99
|
-
let {
|
|
100
|
-
wrap =
|
|
101
|
-
|
|
99
|
+
let _ref3 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
100
|
+
_ref3$wrap = _ref3.wrap,
|
|
101
|
+
wrap = _ref3$wrap === void 0 ? true : _ref3$wrap;
|
|
102
102
|
if (index === -1) {
|
|
103
103
|
return 0;
|
|
104
104
|
}
|
|
@@ -108,9 +108,9 @@ function getNextIndex(index, numItems) {
|
|
|
108
108
|
return index < numItems - 1 ? index + 1 : numItems - 1;
|
|
109
109
|
}
|
|
110
110
|
function getPreviousIndex(index, numItems) {
|
|
111
|
-
let {
|
|
112
|
-
wrap =
|
|
113
|
-
|
|
111
|
+
let _ref4 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
112
|
+
_ref4$wrap = _ref4.wrap,
|
|
113
|
+
wrap = _ref4$wrap === void 0 ? true : _ref4$wrap;
|
|
114
114
|
if (index === -1) {
|
|
115
115
|
return numItems - 1;
|
|
116
116
|
}
|