@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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
**All notable changes to `@qualtrics/ui-react` will be documented in this file. This project adheres to <a href="https://semver.org/spec/v2.0.0.html" target="_blank">Semantic Versioning</a>. To be notified of new releases, subscribe to the `design-system-changelog@qualtrics.com` email group in [Odo](https://odo.corp.qualtrics.com/)**
|
|
2
2
|
|
|
3
|
+
## 2.80.0 - May 27, 2026
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Add 1 new icon
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
- @qualtrics/component-styles@0.158.0
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 2.79.1 - May 11, 2026
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Fix `ConfigPane` header taking up space when no title and no pin button are present
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
3
24
|
## 2.79.0 - May 04, 2026
|
|
4
25
|
|
|
5
26
|
### Minor Changes
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// src/primitive.tsx
|
|
2
2
|
var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
3
3
|
function composeEventHandlers(originalEventHandler, ourEventHandler) {
|
|
4
|
-
let {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
let _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
5
|
+
_ref$checkForDefaultP = _ref.checkForDefaultPrevented,
|
|
6
|
+
checkForDefaultPrevented = _ref$checkForDefaultP === void 0 ? true : _ref$checkForDefaultP;
|
|
7
7
|
return function handleEvent(event) {
|
|
8
8
|
originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event);
|
|
9
9
|
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
@@ -27,9 +27,8 @@ function getOwnerDocument(element) {
|
|
|
27
27
|
}
|
|
28
28
|
function getActiveElement(node) {
|
|
29
29
|
let activeDescendant = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
30
|
-
const
|
|
31
|
-
activeElement
|
|
32
|
-
} = getOwnerDocument(node);
|
|
30
|
+
const _getOwnerDocument = getOwnerDocument(node),
|
|
31
|
+
activeElement = _getOwnerDocument.activeElement;
|
|
33
32
|
if (!(activeElement !== null && activeElement !== void 0 && activeElement.nodeName)) {
|
|
34
33
|
return null;
|
|
35
34
|
}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { Primitive } from '../../react-primitive/dist/index.js';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
const _excluded = ["children", "width", "height"];
|
|
5
6
|
var NAME = "Arrow";
|
|
6
7
|
var Arrow = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
width = 10,
|
|
10
|
-
height =
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
const children = props.children,
|
|
9
|
+
_props$width = props.width,
|
|
10
|
+
width = _props$width === void 0 ? 10 : _props$width,
|
|
11
|
+
_props$height = props.height,
|
|
12
|
+
height = _props$height === void 0 ? 5 : _props$height,
|
|
13
|
+
arrowProps = _objectWithoutProperties(props, _excluded);
|
|
13
14
|
return /* @__PURE__ */React.createElement(Primitive.svg, {
|
|
14
15
|
...arrowProps,
|
|
15
16
|
ref: forwardedRef,
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
2
|
+
import _slicedToArray from '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
1
3
|
import React__default from 'react';
|
|
2
4
|
import { createContextScope } from '../../react-context/dist/index.js';
|
|
3
5
|
import { useComposedRefs } from '../../react-compose-refs/dist/index.js';
|
|
4
6
|
import { createSlot } from '../../react-slot/dist/index.js';
|
|
5
7
|
|
|
6
8
|
"use client";
|
|
7
|
-
|
|
8
|
-
// src/collection-legacy.tsx
|
|
9
9
|
var _keys;
|
|
10
|
+
const _excluded = ["scope", "children"],
|
|
11
|
+
_excluded2 = ["state"],
|
|
12
|
+
_excluded3 = ["scope", "children"];
|
|
10
13
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
11
14
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
12
15
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
@@ -14,18 +17,22 @@ function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a),
|
|
|
14
17
|
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
15
18
|
function createCollection(name) {
|
|
16
19
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
const _createContextScope = createContextScope(PROVIDER_NAME),
|
|
21
|
+
_createContextScope2 = _slicedToArray(_createContextScope, 2),
|
|
22
|
+
createCollectionContext = _createContextScope2[0],
|
|
23
|
+
createCollectionScope = _createContextScope2[1];
|
|
24
|
+
const _createCollectionCont = createCollectionContext(PROVIDER_NAME, {
|
|
25
|
+
collectionRef: {
|
|
26
|
+
current: null
|
|
27
|
+
},
|
|
28
|
+
itemMap: /* @__PURE__ */new Map()
|
|
29
|
+
}),
|
|
30
|
+
_createCollectionCont2 = _slicedToArray(_createCollectionCont, 2),
|
|
31
|
+
CollectionProviderImpl = _createCollectionCont2[0],
|
|
32
|
+
useCollectionContext = _createCollectionCont2[1];
|
|
24
33
|
const CollectionProvider = props => {
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
children
|
|
28
|
-
} = props;
|
|
34
|
+
const scope = props.scope,
|
|
35
|
+
children = props.children;
|
|
29
36
|
const ref = React__default.useRef(null);
|
|
30
37
|
const itemMap = React__default.useRef(/* @__PURE__ */new Map()).current;
|
|
31
38
|
return /* @__PURE__ */React__default.createElement(CollectionProviderImpl, {
|
|
@@ -39,10 +46,8 @@ function createCollection(name) {
|
|
|
39
46
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
40
47
|
const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
|
|
41
48
|
const CollectionSlot = /*#__PURE__*/React__default.forwardRef((props, forwardedRef) => {
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
children
|
|
45
|
-
} = props;
|
|
49
|
+
const scope = props.scope,
|
|
50
|
+
children = props.children;
|
|
46
51
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
47
52
|
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
48
53
|
return /* @__PURE__ */React__default.createElement(CollectionSlotImpl, {
|
|
@@ -55,11 +60,9 @@ function createCollection(name) {
|
|
|
55
60
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
56
61
|
const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
|
|
57
62
|
const CollectionItemSlot = /*#__PURE__*/React__default.forwardRef((props, forwardedRef) => {
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
...itemData
|
|
62
|
-
} = props;
|
|
63
|
+
const scope = props.scope,
|
|
64
|
+
children = props.children,
|
|
65
|
+
itemData = _objectWithoutProperties(props, _excluded);
|
|
63
66
|
const ref = React__default.useRef(null);
|
|
64
67
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
65
68
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
@@ -305,7 +308,8 @@ var OrderedDict = (_keys = /*#__PURE__*/new WeakMap(), class _OrderedDict extend
|
|
|
305
308
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
306
309
|
args[_key] = arguments[_key];
|
|
307
310
|
}
|
|
308
|
-
const
|
|
311
|
+
const callbackfn = args[0],
|
|
312
|
+
initialValue = args[1];
|
|
309
313
|
let index = 0;
|
|
310
314
|
let accumulator = initialValue !== null && initialValue !== void 0 ? initialValue : this.at(0);
|
|
311
315
|
for (const entry of this) {
|
|
@@ -322,7 +326,8 @@ var OrderedDict = (_keys = /*#__PURE__*/new WeakMap(), class _OrderedDict extend
|
|
|
322
326
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
323
327
|
args[_key2] = arguments[_key2];
|
|
324
328
|
}
|
|
325
|
-
const
|
|
329
|
+
const callbackfn = args[0],
|
|
330
|
+
initialValue = args[1];
|
|
326
331
|
let accumulator = initialValue !== null && initialValue !== void 0 ? initialValue : this.at(-1);
|
|
327
332
|
for (let index = this.size - 1; index >= 0; index--) {
|
|
328
333
|
const entry = this.at(index);
|
|
@@ -413,23 +418,27 @@ function toSafeInteger(number) {
|
|
|
413
418
|
|
|
414
419
|
function createCollection2(name) {
|
|
415
420
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
416
|
-
const
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
421
|
+
const _createContextScope3 = createContextScope(PROVIDER_NAME),
|
|
422
|
+
_createContextScope4 = _slicedToArray(_createContextScope3, 2),
|
|
423
|
+
createCollectionContext = _createContextScope4[0],
|
|
424
|
+
createCollectionScope = _createContextScope4[1];
|
|
425
|
+
const _createCollectionCont3 = createCollectionContext(PROVIDER_NAME, {
|
|
426
|
+
collectionElement: null,
|
|
427
|
+
collectionRef: {
|
|
428
|
+
current: null
|
|
429
|
+
},
|
|
430
|
+
collectionRefObject: {
|
|
431
|
+
current: null
|
|
432
|
+
},
|
|
433
|
+
itemMap: new OrderedDict(),
|
|
434
|
+
setItemMap: () => void 0
|
|
435
|
+
}),
|
|
436
|
+
_createCollectionCont4 = _slicedToArray(_createCollectionCont3, 2),
|
|
437
|
+
CollectionContextProvider = _createCollectionCont4[0],
|
|
438
|
+
useCollectionContext = _createCollectionCont4[1];
|
|
428
439
|
const CollectionProvider = _ref => {
|
|
429
|
-
let
|
|
430
|
-
|
|
431
|
-
...props
|
|
432
|
-
} = _ref;
|
|
440
|
+
let state = _ref.state,
|
|
441
|
+
props = _objectWithoutProperties(_ref, _excluded2);
|
|
433
442
|
return state ? /* @__PURE__ */React__default.createElement(CollectionProviderImpl, {
|
|
434
443
|
...props,
|
|
435
444
|
state
|
|
@@ -447,15 +456,18 @@ function createCollection2(name) {
|
|
|
447
456
|
};
|
|
448
457
|
CollectionInit.displayName = PROVIDER_NAME + "Init";
|
|
449
458
|
const CollectionProviderImpl = props => {
|
|
450
|
-
const
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
state
|
|
454
|
-
} = props;
|
|
459
|
+
const scope = props.scope,
|
|
460
|
+
children = props.children,
|
|
461
|
+
state = props.state;
|
|
455
462
|
const ref = React__default.useRef(null);
|
|
456
|
-
const
|
|
463
|
+
const _React2$useState = React__default.useState(null),
|
|
464
|
+
_React2$useState2 = _slicedToArray(_React2$useState, 2),
|
|
465
|
+
collectionElement = _React2$useState2[0],
|
|
466
|
+
setCollectionElement = _React2$useState2[1];
|
|
457
467
|
const composeRefs = useComposedRefs(ref, setCollectionElement);
|
|
458
|
-
const
|
|
468
|
+
const _state = _slicedToArray(state, 2),
|
|
469
|
+
itemMap = _state[0],
|
|
470
|
+
setItemMap = _state[1];
|
|
459
471
|
React__default.useEffect(() => {
|
|
460
472
|
if (!collectionElement) return;
|
|
461
473
|
const observer = getChildListObserver(() => {});
|
|
@@ -481,10 +493,8 @@ function createCollection2(name) {
|
|
|
481
493
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
482
494
|
const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
|
|
483
495
|
const CollectionSlot = /*#__PURE__*/React__default.forwardRef((props, forwardedRef) => {
|
|
484
|
-
const
|
|
485
|
-
|
|
486
|
-
children
|
|
487
|
-
} = props;
|
|
496
|
+
const scope = props.scope,
|
|
497
|
+
children = props.children;
|
|
488
498
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
489
499
|
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
490
500
|
return /* @__PURE__ */React__default.createElement(CollectionSlotImpl, {
|
|
@@ -497,18 +507,17 @@ function createCollection2(name) {
|
|
|
497
507
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
498
508
|
const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
|
|
499
509
|
const CollectionItemSlot = /*#__PURE__*/React__default.forwardRef((props, forwardedRef) => {
|
|
500
|
-
const
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
...itemData
|
|
504
|
-
} = props;
|
|
510
|
+
const scope = props.scope,
|
|
511
|
+
children = props.children,
|
|
512
|
+
itemData = _objectWithoutProperties(props, _excluded3);
|
|
505
513
|
const ref = React__default.useRef(null);
|
|
506
|
-
const
|
|
514
|
+
const _React2$useState3 = React__default.useState(null),
|
|
515
|
+
_React2$useState4 = _slicedToArray(_React2$useState3, 2),
|
|
516
|
+
element = _React2$useState4[0],
|
|
517
|
+
setElement = _React2$useState4[1];
|
|
507
518
|
const composedRefs = useComposedRefs(forwardedRef, ref, setElement);
|
|
508
519
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
509
|
-
const
|
|
510
|
-
setItemMap
|
|
511
|
-
} = context;
|
|
520
|
+
const setItemMap = context.setItemMap;
|
|
512
521
|
const itemDataRef = React__default.useRef(itemData);
|
|
513
522
|
if (!shallowEqual(itemDataRef.current, itemData)) {
|
|
514
523
|
itemDataRef.current = itemData;
|
|
@@ -555,9 +564,8 @@ function createCollection2(name) {
|
|
|
555
564
|
return React__default.useState(new OrderedDict());
|
|
556
565
|
}
|
|
557
566
|
function useCollection(scope) {
|
|
558
|
-
const
|
|
559
|
-
itemMap
|
|
560
|
-
} = useCollectionContext(name + "CollectionConsumer", scope);
|
|
567
|
+
const _useCollectionContext = useCollectionContext(name + "CollectionConsumer", scope),
|
|
568
|
+
itemMap = _useCollectionContext.itemMap;
|
|
561
569
|
return itemMap;
|
|
562
570
|
}
|
|
563
571
|
const functions = {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
const _excluded = ["children"],
|
|
5
|
+
_excluded2 = ["scope", "children"];
|
|
4
6
|
function createContext2(rootComponentName, defaultContext) {
|
|
5
7
|
const Context = /*#__PURE__*/React.createContext(defaultContext);
|
|
6
8
|
const Provider = props => {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
...context
|
|
10
|
-
} = props;
|
|
9
|
+
const children = props.children,
|
|
10
|
+
context = _objectWithoutProperties(props, _excluded);
|
|
11
11
|
const value = React.useMemo(() => context, Object.values(context));
|
|
12
12
|
return /* @__PURE__ */React.createElement(Context.Provider, {
|
|
13
13
|
value,
|
|
@@ -32,11 +32,9 @@ function createContextScope(scopeName) {
|
|
|
32
32
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
33
33
|
const Provider = props => {
|
|
34
34
|
var _scope$scopeName;
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
...context
|
|
39
|
-
} = props;
|
|
35
|
+
const scope = props.scope,
|
|
36
|
+
children = props.children,
|
|
37
|
+
context = _objectWithoutProperties(props, _excluded2);
|
|
40
38
|
const Context = (scope === null || scope === void 0 || (_scope$scopeName = scope[scopeName]) === null || _scope$scopeName === void 0 ? void 0 : _scope$scopeName[index]) || BaseContext;
|
|
41
39
|
const value = React.useMemo(() => context, Object.values(context));
|
|
42
40
|
return /* @__PURE__ */React.createElement(Context.Provider, {
|
|
@@ -85,10 +83,8 @@ function composeContextScopes() {
|
|
|
85
83
|
}));
|
|
86
84
|
return function useComposedScopes(overrideScopes) {
|
|
87
85
|
const nextScopes = scopeHooks.reduce((nextScopes2, _ref) => {
|
|
88
|
-
let
|
|
89
|
-
|
|
90
|
-
scopeName
|
|
91
|
-
} = _ref;
|
|
86
|
+
let useScope = _ref.useScope,
|
|
87
|
+
scopeName = _ref.scopeName;
|
|
92
88
|
const scopeProps = useScope(overrideScopes);
|
|
93
89
|
const currentScope = scopeProps["__scope".concat(scopeName)];
|
|
94
90
|
return {
|
|
@@ -3,10 +3,8 @@ import * as React from 'react';
|
|
|
3
3
|
// packages/react/direction/src/direction.tsx
|
|
4
4
|
var DirectionContext = /*#__PURE__*/React.createContext(void 0);
|
|
5
5
|
var DirectionProvider = props => {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
children
|
|
9
|
-
} = props;
|
|
6
|
+
const dir = props.dir,
|
|
7
|
+
children = props.children;
|
|
10
8
|
return /* @__PURE__ */React.createElement(DirectionContext.Provider, {
|
|
11
9
|
value: dir,
|
|
12
10
|
children
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import _slicedToArray from '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
1
3
|
import * as React from 'react';
|
|
2
4
|
import { composeEventHandlers } from '../../primitive/dist/index.js';
|
|
3
5
|
import { Primitive, dispatchDiscreteCustomEvent } from '../../react-primitive/dist/index.js';
|
|
@@ -6,6 +8,7 @@ import { useCallbackRef } from '../../react-use-callback-ref/dist/index.js';
|
|
|
6
8
|
import { useEscapeKeydown } from '../../react-use-escape-keydown/dist/index.js';
|
|
7
9
|
|
|
8
10
|
"use client";
|
|
11
|
+
const _excluded = ["disableOutsidePointerEvents", "onEscapeKeyDown", "onPointerDownOutside", "onFocusOutside", "onInteractOutside", "onDismiss"];
|
|
9
12
|
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
10
13
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
11
14
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
@@ -18,22 +21,28 @@ var DismissableLayerContext = /*#__PURE__*/React.createContext({
|
|
|
18
21
|
});
|
|
19
22
|
var DismissableLayer = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
20
23
|
var _node$ownerDocument;
|
|
21
|
-
const
|
|
22
|
-
disableOutsidePointerEvents = false,
|
|
23
|
-
onEscapeKeyDown,
|
|
24
|
-
onPointerDownOutside,
|
|
25
|
-
onFocusOutside,
|
|
26
|
-
onInteractOutside,
|
|
27
|
-
onDismiss,
|
|
28
|
-
|
|
29
|
-
} = props;
|
|
24
|
+
const _props$disableOutside = props.disableOutsidePointerEvents,
|
|
25
|
+
disableOutsidePointerEvents = _props$disableOutside === void 0 ? false : _props$disableOutside,
|
|
26
|
+
onEscapeKeyDown = props.onEscapeKeyDown,
|
|
27
|
+
onPointerDownOutside = props.onPointerDownOutside,
|
|
28
|
+
onFocusOutside = props.onFocusOutside,
|
|
29
|
+
onInteractOutside = props.onInteractOutside,
|
|
30
|
+
onDismiss = props.onDismiss,
|
|
31
|
+
layerProps = _objectWithoutProperties(props, _excluded);
|
|
30
32
|
const context = React.useContext(DismissableLayerContext);
|
|
31
|
-
const
|
|
33
|
+
const _React$useState = React.useState(null),
|
|
34
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
35
|
+
node = _React$useState2[0],
|
|
36
|
+
setNode = _React$useState2[1];
|
|
32
37
|
const ownerDocument = (_node$ownerDocument = node === null || node === void 0 ? void 0 : node.ownerDocument) !== null && _node$ownerDocument !== void 0 ? _node$ownerDocument : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;
|
|
33
|
-
const
|
|
38
|
+
const _React$useState3 = React.useState({}),
|
|
39
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
40
|
+
force = _React$useState4[1];
|
|
34
41
|
const composedRefs = useComposedRefs(forwardedRef, node2 => setNode(node2));
|
|
35
42
|
const layers = Array.from(context.layers);
|
|
36
|
-
const
|
|
43
|
+
const _slice = [...context.layersWithOutsidePointerEventsDisabled].slice(-1),
|
|
44
|
+
_slice2 = _slicedToArray(_slice, 1),
|
|
45
|
+
highestLayerWithOutsidePointerEventsDisabled = _slice2[0];
|
|
37
46
|
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
38
47
|
const index = node ? layers.indexOf(node) : -1;
|
|
39
48
|
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
@@ -199,9 +208,7 @@ function dispatchUpdate() {
|
|
|
199
208
|
document.dispatchEvent(event);
|
|
200
209
|
}
|
|
201
210
|
function handleAndDispatchCustomEvent(name, handler, detail, _ref) {
|
|
202
|
-
let
|
|
203
|
-
discrete
|
|
204
|
-
} = _ref;
|
|
211
|
+
let discrete = _ref.discrete;
|
|
205
212
|
const target = detail.originalEvent.target;
|
|
206
213
|
const event = new CustomEvent(name, {
|
|
207
214
|
bubbles: false,
|