@qualtrics/ui-react 2.79.0 → 2.80.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/dist/__node_modules/@radix-ui/primitive/dist/index.js +5 -6
- package/dist/__node_modules/@radix-ui/react-arrow/dist/index.js +8 -7
- package/dist/__node_modules/@radix-ui/react-collection/dist/index.js +71 -63
- package/dist/__node_modules/@radix-ui/react-context/dist/index.js +10 -14
- package/dist/__node_modules/@radix-ui/react-direction/dist/index.js +2 -4
- package/dist/__node_modules/@radix-ui/react-dismissable-layer/dist/index.js +22 -15
- package/dist/__node_modules/@radix-ui/react-dropdown-menu/dist/index.js +89 -89
- package/dist/__node_modules/@radix-ui/react-focus-scope/dist/index.js +26 -19
- package/dist/__node_modules/@radix-ui/react-id/dist/index.js +5 -2
- package/dist/__node_modules/@radix-ui/react-menu/dist/index.js +165 -129
- package/dist/__node_modules/@radix-ui/react-popper/dist/index.js +139 -106
- package/dist/__node_modules/@radix-ui/react-portal/dist/index.js +9 -5
- package/dist/__node_modules/@radix-ui/react-presence/dist/index.js +27 -20
- package/dist/__node_modules/@radix-ui/react-primitive/dist/index.js +4 -5
- package/dist/__node_modules/@radix-ui/react-roving-focus/dist/index.js +61 -38
- package/dist/__node_modules/@radix-ui/react-slot/dist/index.js +8 -12
- package/dist/__node_modules/@radix-ui/react-use-controllable-state/dist/index.js +40 -35
- package/dist/__node_modules/@radix-ui/react-use-size/dist/index.js +5 -2
- package/dist/__shared/cjs/{index-7181e053.js → index-807921ca.js} +2830 -2635
- package/dist/__shared/cjs/{index-b77d5870.js → index-8c77a9ef.js} +15 -9
- package/dist/components/Accordion/Accordion.js +27 -21
- package/dist/components/Accordion/Accordion2.js +3 -3
- package/dist/components/Accordion/AccordionContext.js +6 -8
- package/dist/components/Accordion/AccordionHeader.js +13 -17
- package/dist/components/Accordion/AccordionPanel.js +7 -11
- package/dist/components/Accordion/AccordionSection.js +14 -11
- package/dist/components/Banner/Banner.js +10 -11
- package/dist/components/Banner/BannerBody.js +1 -3
- package/dist/components/Banner/BannerFooter.js +1 -3
- package/dist/components/Banner/BannerTitle.js +1 -3
- package/dist/components/BreakpointSwitch/Breakpoint.js +2 -5
- package/dist/components/BreakpointSwitch/BreakpointContext.js +3 -4
- package/dist/components/BreakpointSwitch/BreakpointSwitch.js +1 -3
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/Button/Button2.js +19 -13
- package/dist/components/ButtonGroup/ButtonGroup.js +7 -7
- package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
- package/dist/components/Checkbox/Check.js +8 -6
- package/dist/components/Checkbox/Checkbox.js +31 -28
- package/dist/components/Checkbox/Checkbox2.js +3 -3
- package/dist/components/Checkbox/CheckboxField.js +14 -13
- package/dist/components/ColorPicker/Alpha.js +8 -12
- package/dist/components/ColorPicker/ColorPicker.js +67 -48
- package/dist/components/ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/ColorPicker/ColorPickerFlyout.js +23 -24
- package/dist/components/ColorPicker/ColorPickerFlyoutInputs.js +27 -22
- package/dist/components/ColorPicker/ColorPickerWIthNoColor.js +11 -7
- package/dist/components/ColorPicker/Hue.js +9 -13
- package/dist/components/ColorPicker/Palette.js +23 -21
- package/dist/components/ColorPicker/Saturation.js +11 -15
- package/dist/components/ColorPicker/utils/hexToHsv.js +4 -5
- package/dist/components/ColorPicker/utils/hsvToHex.js +3 -5
- package/dist/components/ColorPicker/utils/rgbToHex.js +3 -5
- package/dist/components/Combobox/Combobox.js +166 -133
- package/dist/components/Combobox/Combobox2.js +3 -3
- package/dist/components/Combobox/ComboboxContext.js +3 -4
- package/dist/components/Combobox/ComboboxHeader.js +6 -6
- package/dist/components/Combobox/ComboboxIcon.js +14 -14
- package/dist/components/Combobox/ComboboxInput.js +41 -43
- package/dist/components/Combobox/ComboboxList.js +20 -20
- package/dist/components/Combobox/ComboboxOption.js +9 -10
- package/dist/components/ConfigPane/ConfigPane.js +53 -37
- package/dist/components/ConfigPane/ConfigPane2.js +3 -3
- package/dist/components/Divider/Divider.js +4 -4
- package/dist/components/Divider/Divider2.js +3 -3
- package/dist/components/Dropdown/ChildIndexContext/index.js +7 -9
- package/dist/components/Dropdown/ChildIndexContext/reach-descendants.js +18 -21
- package/dist/components/Dropdown/Dropdown.js +68 -43
- package/dist/components/Dropdown/Dropdown2.js +3 -3
- package/dist/components/Dropdown/DropdownButton.js +53 -47
- package/dist/components/Dropdown/DropdownContext.js +3 -4
- package/dist/components/Dropdown/DropdownHeader.js +12 -9
- package/dist/components/Dropdown/DropdownHeaderContext.js +3 -4
- package/dist/components/Dropdown/DropdownList.js +32 -32
- package/dist/components/Dropdown/DropdownOption.js +32 -30
- package/dist/components/Dropdown/DropdownSearch.js +12 -14
- package/dist/components/FilePicker/FilePicker.js +30 -25
- package/dist/components/FilePicker/FilePicker2.js +3 -3
- package/dist/components/FormField/Caption.js +3 -3
- package/dist/components/FormField/ErrorText.js +5 -5
- package/dist/components/FormField/FormField.js +27 -14
- package/dist/components/FormField/FormField2.js +3 -3
- package/dist/components/FormField/FormFieldContext.js +6 -13
- package/dist/components/FormField/HelperText.js +5 -5
- package/dist/components/FormField/ReadOnlyText.js +4 -6
- package/dist/components/FullScreenTakeover/FullScreenTakeover.js +22 -15
- package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
- package/dist/components/Icon/Icon.js +6 -5
- package/dist/components/Icon/IconTypes.js +1 -0
- package/dist/components/IconButton/IconButton.js +25 -16
- package/dist/components/IconButton/IconButton2.js +3 -3
- package/dist/components/InlineInput/InlineInput.js +25 -14
- package/dist/components/InlineInput/InlineInput2.js +3 -3
- package/dist/components/Input/Input.js +42 -29
- package/dist/components/Input/Input2.js +3 -3
- package/dist/components/Input/InputField.js +26 -21
- package/dist/components/InputGroup/InputGroup.js +7 -7
- package/dist/components/InputGroup/InputGroup2.js +3 -3
- package/dist/components/InputGroup/InputGroupAddon.js +7 -6
- package/dist/components/InputGroup/InputGroupProvider.js +5 -8
- package/dist/components/Label/Label.js +8 -9
- package/dist/components/Label/Label2.js +3 -3
- package/dist/components/Link/Link.js +9 -7
- package/dist/components/Link/Link2.js +3 -3
- package/dist/components/LoadingSpinner/LoadingSpinner.js +22 -17
- package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
- package/dist/components/LogicEditor/ConditionContainer.js +8 -10
- package/dist/components/LogicEditor/ConditionSet.js +16 -21
- package/dist/components/LogicEditor/Controls.js +17 -20
- package/dist/components/LogicEditor/LogicEditor.js +33 -24
- package/dist/components/LogicEditor/LogicEditor2.js +3 -3
- package/dist/components/LogicEditor/LogicEditorContext.js +3 -4
- package/dist/components/LogicEditor/utils.js +5 -9
- package/dist/components/Modal/Modal.js +63 -49
- package/dist/components/Modal/Modal2.js +3 -3
- package/dist/components/Modal/ModalBody.js +5 -5
- package/dist/components/Modal/ModalContext.js +3 -4
- package/dist/components/Modal/ModalFooter.js +5 -5
- package/dist/components/Modal/ModalHeader.js +10 -12
- package/dist/components/NewMenu/BaseMenu.js +83 -54
- package/dist/components/NewMenu/Menu/Menu.js +10 -12
- package/dist/components/NewMenu/NewMenu.js +3 -3
- package/dist/components/NewMenu/SelectMenu/SelectMenu.js +6 -7
- package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +35 -30
- package/dist/components/NewMenu/parts/MenuAnchor.js +15 -16
- package/dist/components/NewMenu/parts/MenuContext.js +3 -4
- package/dist/components/NewMenu/parts/MenuItem.js +23 -17
- package/dist/components/NewMenu/parts/MenuSearchBox.js +4 -6
- package/dist/components/NewMenu/parts/SubmenuAnchor.js +5 -5
- package/dist/components/NumberStepper/NumberStepper.js +42 -37
- package/dist/components/NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/NumberStepper/NumberStepperContext.js +3 -4
- package/dist/components/NumberStepper/NumberStepperDecrement.js +13 -15
- package/dist/components/NumberStepper/NumberStepperIncrement.js +13 -15
- package/dist/components/NumberStepper/NumberStepperInput.js +28 -30
- package/dist/components/PageLayout/MainContent.js +4 -4
- package/dist/components/PageLayout/PageContainer.js +4 -4
- package/dist/components/PageLayout/PageHeader.js +4 -4
- package/dist/components/PageLayout/PageLayout.js +3 -3
- package/dist/components/Pagination/Pagination.js +20 -16
- package/dist/components/Pagination/Pagination2.js +3 -3
- package/dist/components/Pagination/PaginationContext.js +3 -4
- package/dist/components/Pagination/PaginationNextButton.js +15 -17
- package/dist/components/Pagination/PaginationPageInput.js +24 -24
- package/dist/components/Pagination/PaginationPreviousButton.js +14 -16
- package/dist/components/Popover/Popover.js +27 -18
- package/dist/components/Popover/Popover2.js +3 -3
- package/dist/components/QuickSearch/QuickSearch.js +23 -16
- package/dist/components/QuickSearch/QuickSearch2.js +3 -3
- package/dist/components/QuickSearch/QuickSearchInput.js +33 -23
- package/dist/components/Radio/Radio.js +26 -28
- package/dist/components/Radio/Radio2.js +3 -3
- package/dist/components/Radio/RadioGroup.js +15 -16
- package/dist/components/Radio/RadioGroupContext.js +3 -4
- package/dist/components/Radio/RadioOption.js +11 -10
- package/dist/components/SearchInput/SearchInput.js +32 -25
- package/dist/components/SearchInput/SearchInput2.js +3 -3
- package/dist/components/SidebarNav/ExpandCollapseButton.js +4 -6
- package/dist/components/SidebarNav/SidebarNav.js +19 -13
- package/dist/components/SidebarNav/SidebarNav2.js +3 -3
- package/dist/components/SidebarNav/SidebarNavContext.js +3 -4
- package/dist/components/SidebarNav/SidebarNavLink.js +7 -10
- package/dist/components/Slider/RangeSlider.js +36 -24
- package/dist/components/Slider/Slider.js +29 -20
- package/dist/components/Slider/Slider2.js +3 -3
- package/dist/components/Slider/SliderButton.js +26 -17
- package/dist/components/Switch/Switch.js +19 -19
- package/dist/components/Switch/Switch2.js +3 -3
- package/dist/components/Switch/SwitchField.js +13 -13
- package/dist/components/Table/Table.js +5 -5
- package/dist/components/Table/Table2.js +3 -3
- package/dist/components/Table/TableBody.js +5 -5
- package/dist/components/Table/TableCell.js +5 -5
- package/dist/components/Table/TableHead.js +5 -5
- package/dist/components/Table/TableHeaderCell.js +5 -5
- package/dist/components/Table/TableRow.js +5 -5
- package/dist/components/Tabs/Tab.js +12 -13
- package/dist/components/Tabs/TabContextProvider.js +10 -13
- package/dist/components/Tabs/TabList.js +17 -13
- package/dist/components/Tabs/TabPanel.js +10 -11
- package/dist/components/Tabs/TabPanels.js +1 -3
- package/dist/components/Tabs/Tabs.js +20 -12
- package/dist/components/Tabs/Tabs2.js +3 -3
- package/dist/components/Tooltip/Tooltip.js +51 -29
- package/dist/components/Tooltip/Tooltip2.js +3 -3
- package/dist/components/UIProvider/A11yHelpersContext.js +3 -9
- package/dist/components/UIProvider/PortalTargetContext.js +6 -8
- package/dist/components/UIProvider/UIProvider.js +4 -5
- package/dist/components/deprecated_ColorPicker/Alpha.js +7 -7
- package/dist/components/deprecated_ColorPicker/ColorPicker.js +24 -13
- package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/deprecated_ColorPicker/HexInput.js +16 -9
- package/dist/components/deprecated_ColorPicker/Hue.js +6 -6
- package/dist/components/deprecated_ColorPicker/Saturation.js +14 -16
- package/dist/components/deprecated_ColorPicker/Swatch.js +7 -6
- package/dist/components/deprecated_ColorPicker/useMouseDrag.js +5 -1
- package/dist/components/deprecated_NumberStepper/NumberStepper.js +34 -25
- package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/deprecated_NumberStepper/NumberStepperContext.js +3 -4
- package/dist/components/deprecated_NumberStepper/NumberStepperDecrement.js +14 -16
- package/dist/components/deprecated_NumberStepper/NumberStepperIncrement.js +14 -16
- package/dist/components/deprecated_NumberStepper/NumberStepperInput.js +32 -34
- package/dist/components/deprecated_Tabs/Tab.js +8 -9
- package/dist/components/deprecated_Tabs/TabContextProvider.js +3 -4
- package/dist/components/deprecated_Tabs/Tabs.js +13 -9
- package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
- package/dist/components/deprecated_Toolbar/IconButtonWithLabel.js +6 -6
- package/dist/components/deprecated_Toolbar/Toolbar.js +16 -11
- package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
- package/dist/components/deprecated_Toolbar/ToolbarContext.js +3 -4
- package/dist/components/deprecated_Toolbar/ToolbarPanel.js +16 -16
- package/dist/components/deprecated_Toolbar/ToolbarPanels.js +44 -29
- package/dist/components/deprecated_Toolbar/ToolbarTab.js +19 -20
- package/dist/components/deprecated_Toolbar/ToolbarTabs.js +34 -24
- package/dist/design-tokens/less/typography.js +3 -3
- package/dist/hooks/useBreakpoints/useBreakpoints.js +12 -4
- package/dist/hooks/useClickOutside/useClickOutside.js +1 -3
- package/dist/hooks/useClickOutsidePortals/useClickOutsidePortals.js +3 -3
- package/dist/hooks/useControllableState/useControllableState.js +5 -2
- package/dist/hooks/useEventListener/useEventListener.js +6 -5
- package/dist/hooks/useFocusSequence/useFocusSequence.js +12 -12
- package/dist/hooks/useId/useId.js +4 -1
- package/dist/hooks/useIsFocused/useIsFocused.js +5 -1
- package/dist/hooks/useIsHovered/useIsHovered.js +5 -1
- package/dist/hooks/useIsTruncated/useIsTruncated.js +11 -16
- package/dist/hooks/useMouseDrag/useMouseDrag.js +5 -1
- package/dist/hooks/useOverlay/useOverlay.js +10 -10
- package/dist/hooks/useOverlay/useOverlay2.js +3 -3
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement.js +9 -2
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
- package/dist/icons/Icon.js +3 -3
- package/dist/icons/components/FrontlineEmployeeVoiceIcon.js +6 -0
- package/dist/icons/createIconComponent.js +7 -6
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.es.js +1 -0
- package/dist/icons/index.js +3 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +1 -1
- package/dist/index.js +7 -3
- package/dist/next/AdvancedTable/AdvancedTable.js +192 -173
- package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTableCell.js +30 -25
- package/dist/next/AdvancedTable/AdvancedTableCheckbox.js +12 -15
- package/dist/next/AdvancedTable/AdvancedTableColumnHeader.js +83 -65
- package/dist/next/AdvancedTable/AdvancedTableColumnHeaderMenu.js +25 -30
- package/dist/next/AdvancedTable/AdvancedTableColumnHeaders.js +10 -9
- package/dist/next/AdvancedTable/AdvancedTableDnDContext.js +12 -10
- package/dist/next/AdvancedTable/AdvancedTableDragPreview.js +4 -7
- package/dist/next/AdvancedTable/AdvancedTableHiddenDescription.js +4 -7
- package/dist/next/AdvancedTable/AdvancedTablePagination.js +9 -13
- package/dist/next/AdvancedTable/AdvancedTableRow.js +16 -16
- package/dist/next/AdvancedTable/AdvancedTableRowExpandButton.js +7 -11
- package/dist/next/AdvancedTable/useAdvancedTableDragAndDrop.js +32 -36
- package/dist/next/AdvancedTable/useDragAndDropConfig.js +44 -53
- package/dist/next/Chat/Chat.js +5 -6
- package/dist/next/Chat/ChatContext.js +3 -4
- package/dist/next/Chat/ChatInput.js +24 -20
- package/dist/next/Chat/ChatMessage.js +16 -20
- package/dist/next/Chat/ChatMessageList.js +11 -10
- package/dist/next/Chat/ChatMessageText.js +1 -3
- package/dist/next/Chat/Loader.js +6 -9
- package/dist/next/Chat/MessageContext.js +3 -4
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput.js +28 -18
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInputIconButton.js +8 -8
- package/dist/next/CollectionGrid/CollectionGrid.js +14 -12
- package/dist/next/CollectionGrid/CollectionGridItem.js +4 -5
- package/dist/next/Combobox/Combobox.js +48 -37
- package/dist/next/Combobox/Combobox2.js +3 -3
- package/dist/next/Combobox/ComboboxContext.js +3 -4
- package/dist/next/Combobox/ComboboxFlyout.js +12 -15
- package/dist/next/Combobox/ComboboxGroup.js +10 -14
- package/dist/next/Combobox/ComboboxGroupContext.js +9 -10
- package/dist/next/Combobox/ComboboxInput.js +37 -39
- package/dist/next/Combobox/ComboboxOption.js +15 -19
- package/dist/next/Combobox/hooks/useComboboxFocusSequence/useComboboxFocusSequence.js +9 -4
- package/dist/next/Combobox/hooks/useComboboxLoadingState/useComboboxLoadingState.js +2 -3
- package/dist/next/Combobox/hooks/useComboboxValue/useComboboxValue.js +10 -5
- package/dist/next/Combobox/hooks/useListboxFlyoutDimensions/useListboxFlyoutDimensions.js +12 -5
- package/dist/next/Combobox/hooks/useShouldRenderGroupHeader/useShouldRenderGroupHeader.js +5 -1
- package/dist/next/Drawer/Drawer.js +38 -23
- package/dist/next/Drawer/Drawer2.js +3 -3
- package/dist/next/FilterAnchor/FilterAnchor.js +21 -19
- package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
- package/dist/next/Form/FormFields/FormFieldWrapper.js +11 -11
- package/dist/next/Form/FormFields/InputField.js +3 -3
- package/dist/next/Form/useForm.js +25 -30
- package/dist/next/Form/useFormField.js +3 -4
- package/dist/next/Form/utils/createFormInstance.js +7 -9
- package/dist/next/Form/utils/useFormContext.js +3 -4
- package/dist/next/Indicator/Indicator.js +12 -8
- package/dist/next/Indicator/Indicator2.js +3 -3
- package/dist/next/Input/Input.js +49 -35
- package/dist/next/Input/Input2.js +3 -3
- package/dist/next/LayoutGrid/LayoutGrid.js +11 -12
- package/dist/next/LayoutGrid/LayoutGridItem.js +5 -6
- package/dist/next/LoadingSpinner/LoadingSpinner.js +22 -17
- package/dist/next/LoadingSpinner/LoadingSpinner2.js +3 -3
- package/dist/next/Menu/Hooks/useFocusVirtualBoundary.js +7 -4
- package/dist/next/Menu/Hooks/useMaskDimensions.js +6 -7
- package/dist/next/Menu/Hooks/usePaneSearch.js +50 -39
- package/dist/next/Menu/Menu.js +28 -15
- package/dist/next/Menu/Menu2.js +3 -3
- package/dist/next/Menu/MenuButton.js +17 -18
- package/dist/next/Menu/MenuContext.js +13 -18
- package/dist/next/Menu/MenuItem.js +28 -29
- package/dist/next/Menu/MenuPane.js +74 -61
- package/dist/next/Menu/MenuSearch.js +10 -10
- package/dist/next/Menu/PaneChildren.js +10 -15
- package/dist/next/Menu/SubMenu.js +91 -76
- package/dist/next/Pagination/Pagination.js +40 -31
- package/dist/next/Pagination/RowDisplayCount.js +6 -7
- package/dist/next/PhoneNumberInput/PhoneNumberInput.js +49 -47
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
- package/dist/next/Select/Select.js +27 -30
- package/dist/next/Select/Select2.js +3 -3
- package/dist/next/Select/SelectButton.js +16 -15
- package/dist/next/Select/SelectContext.js +3 -4
- package/dist/next/Select/SelectItem.js +12 -13
- package/dist/next/Select/SelectPane.js +13 -14
- package/dist/next/Select/SelectedItems.js +16 -10
- package/dist/next/Select/SubSelect.js +21 -18
- package/dist/next/SplitButton/SplitButton.js +28 -21
- package/dist/next/SplitButton/SplitButton2.js +3 -3
- package/dist/next/SplitButton/SplitButtonOption.js +3 -5
- package/dist/next/Stack/Stack.js +26 -26
- package/dist/next/Stack/StackItem.js +12 -14
- package/dist/next/TimePicker/TimeDropdown.js +18 -18
- package/dist/next/TimePicker/TimeInput.js +38 -42
- package/dist/next/TimePicker/TimePicker.js +46 -25
- package/dist/next/TimePicker/TimePicker2.js +3 -3
- package/dist/next/TimePicker/TimePickerIcon.js +5 -7
- package/dist/next/TimePicker/utils.js +34 -13
- package/dist/next/ToggleButton/ToggleButton.js +14 -13
- package/dist/next/ToggleButton/ToggleButtonGroup.js +8 -10
- package/dist/next/ToggleButton/ToggleButtonGroupContext.js +3 -4
- package/dist/next/ToggleButton/styles.js +3 -3
- package/dist/next/Tooltip/Tooltip.js +5 -4
- package/dist/next/Typography/Typography.js +8 -7
- package/dist/next/index.js +2377 -2193
- package/dist/utils/Flyout/Flyout.js +14 -13
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/dist/utils/Flyout/FlyoutHeader.js +6 -6
- package/dist/utils/Flyout/FlyoutOption.js +11 -8
- package/dist/utils/GridChildrenWrapper/GridChildrenWrapper.js +4 -6
- package/dist/utils/Popper/Popper.js +71 -61
- package/dist/utils/Popper/PopperContext.js +5 -6
- package/dist/utils/Portal/Portal.js +7 -5
- package/dist/utils/Text/Text.js +10 -8
- package/dist/utils/TextOverflowTooltip/TextOverflowTooltip.js +10 -6
- package/dist/utils/Translation/Translate.js +4 -7
- package/dist/utils/Translation/TranslationProvider.js +10 -14
- package/dist/utils/Translation/containsComponentOrElement.js +3 -1
- package/dist/utils/Translation/useTranslation.js +2 -3
- package/dist/utils/VirtuosoTestWrapper/VirtuosoTestWrapper.js +1 -3
- package/dist/utils/filterChildren/filterChildren.js +4 -4
- package/icons/package.json +1 -1
- package/next/package.json +2 -2
- package/package.json +4 -4
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
2
3
|
import React__default, { forwardRef } from 'react';
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import styles from './Flyout2.js';
|
|
@@ -8,20 +9,20 @@ import '../Translation/index.js';
|
|
|
8
9
|
import useTranslation from '../Translation/useTranslation.js';
|
|
9
10
|
import LoadingSpinner from '../../components/LoadingSpinner/LoadingSpinner.js';
|
|
10
11
|
|
|
12
|
+
const _excluded = ["children", "anchorRef", "className", "isLoading", "style", "id", "role"];
|
|
11
13
|
const Flyout = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
isLoading = false,
|
|
17
|
-
style,
|
|
18
|
-
id,
|
|
19
|
-
role =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
translate
|
|
24
|
-
} = useTranslation();
|
|
14
|
+
let children = _ref.children,
|
|
15
|
+
anchorRef = _ref.anchorRef,
|
|
16
|
+
className = _ref.className,
|
|
17
|
+
_ref$isLoading = _ref.isLoading,
|
|
18
|
+
isLoading = _ref$isLoading === void 0 ? false : _ref$isLoading,
|
|
19
|
+
style = _ref.style,
|
|
20
|
+
id = _ref.id,
|
|
21
|
+
_ref$role = _ref.role,
|
|
22
|
+
role = _ref$role === void 0 ? 'listbox' : _ref$role,
|
|
23
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
24
|
+
const _useTranslation = useTranslation(),
|
|
25
|
+
translate = _useTranslation.translate;
|
|
25
26
|
let content;
|
|
26
27
|
if (isLoading) {
|
|
27
28
|
content = /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -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 = {"flyout":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._hmA2k{background-color:#fff;border-radius:4px;border:4px solid transparent;border-right:none;border-left:none;box-shadow:0 0 0 1px #eee,0 8px 20px rgba(0,0,0,.1),0 4px 6px rgba(0,0,0,.05);z-index:1000;max-width:500px;overflow-x:hidden;overflow-y:auto;overflow:hidden auto}._t2dtA{min-height:40px;padding:10px 12px;display:flex;flex-direction:row;align-items:center;cursor:pointer;font-size:14px;color:#32363a;word-break:break-word;outline:none}._t2dtA._JJXi-._t2dtA:hover,._t2dtA._X6aRN{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._t2dtA._VHyFV{background-color:#ebf3fb;font-weight:500;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif}._t2dtA._VHyFV._JJXi-._t2dtA._VHyFV:hover,._t2dtA._VHyFV._X6aRN{background-color:#e4effa}._t2dtA:active:not(._VHyFV):not([aria-disabled=true]){background-color:#e8e9e9}._1diQe ._MCGBx{min-height:40px;padding:10px 12px;display:flex;flex-direction:row;align-items:center;font-size:12px;color:#32363a;font-weight:700;word-break:break-word}._1diQe ._ZC9Lq{display:none}._1diQe:not(:first-child) ._ZC9Lq{display:block;margin:3.5px 0}._gwa7e{width:100%;height:40px}";
|
|
4
|
+
var styles = {"flyout":"_hmA2k","flyoutOption":"_t2dtA","highlighted":"_X6aRN","hoverHighlight":"_JJXi-","selected":"_VHyFV","flyoutHeader":"_1diQe","headerContent":"_MCGBx","headerDivider":"_ZC9Lq","flyoutSpinner":"_gwa7e"};
|
|
5
|
+
var stylesheet="._hmA2k{background-color:#fff;border-radius:4px;border:4px solid transparent;border-right:none;border-left:none;box-shadow:0 0 0 1px #eee,0 8px 20px rgba(0,0,0,.1),0 4px 6px rgba(0,0,0,.05);z-index:1000;max-width:500px;overflow-x:hidden;overflow-y:auto;overflow:hidden auto}._t2dtA{min-height:40px;padding:10px 12px;display:flex;flex-direction:row;align-items:center;cursor:pointer;font-size:14px;color:#32363a;word-break:break-word;outline:none}._t2dtA._JJXi-._t2dtA:hover,._t2dtA._X6aRN{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._t2dtA._VHyFV{background-color:#ebf3fb;font-weight:500;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif}._t2dtA._VHyFV._JJXi-._t2dtA._VHyFV:hover,._t2dtA._VHyFV._X6aRN{background-color:#e4effa}._t2dtA:active:not(._VHyFV):not([aria-disabled=true]){background-color:#e8e9e9}._1diQe ._MCGBx{min-height:40px;padding:10px 12px;display:flex;flex-direction:row;align-items:center;font-size:12px;color:#32363a;font-weight:700;word-break:break-word}._1diQe ._ZC9Lq{display:none}._1diQe:not(:first-child) ._ZC9Lq{display:block;margin:3.5px 0}._gwa7e{width:100%;height:40px}";
|
|
6
6
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){styleInject(css_248z);}
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
2
3
|
import React__default, { forwardRef } from 'react';
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import styles from './Flyout2.js';
|
|
5
6
|
|
|
7
|
+
const _excluded = ["children", "title", "className"];
|
|
6
8
|
const FlyoutHeader = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
...rest
|
|
12
|
-
} = _ref;
|
|
9
|
+
let children = _ref.children,
|
|
10
|
+
title = _ref.title,
|
|
11
|
+
className = _ref.className,
|
|
12
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
13
13
|
return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
|
|
14
14
|
ref: ref,
|
|
15
15
|
className: classNames(className, styles.flyoutHeader),
|
|
@@ -1,17 +1,20 @@
|
|
|
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 './Flyout2.js';
|
|
5
6
|
|
|
7
|
+
const _excluded = ["children", "className", "isSelected", "isHighlightedOnHover", "isHighlighted"];
|
|
6
8
|
const FlyoutOption = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
isSelected = false,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
let children = _ref.children,
|
|
10
|
+
className = _ref.className,
|
|
11
|
+
_ref$isSelected = _ref.isSelected,
|
|
12
|
+
isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
|
|
13
|
+
_ref$isHighlightedOnH = _ref.isHighlightedOnHover,
|
|
14
|
+
isHighlightedOnHover = _ref$isHighlightedOnH === void 0 ? false : _ref$isHighlightedOnH,
|
|
15
|
+
_ref$isHighlighted = _ref.isHighlighted,
|
|
16
|
+
isHighlighted = _ref$isHighlighted === void 0 ? false : _ref$isHighlighted,
|
|
17
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
15
18
|
return (
|
|
16
19
|
/*#__PURE__*/
|
|
17
20
|
// eslint-disable-next-line jsx-a11y/interactive-supports-focus
|
|
@@ -3,12 +3,10 @@ import '../mergeRefs/index.js';
|
|
|
3
3
|
import mergeRefs from '../mergeRefs/mergeRefs.js';
|
|
4
4
|
|
|
5
5
|
const GridChildrenWrapper = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
6
|
-
let
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
children
|
|
11
|
-
} = _ref;
|
|
6
|
+
let asChild = _ref.asChild,
|
|
7
|
+
style = _ref.style,
|
|
8
|
+
dataTestId = _ref['data-testid'],
|
|
9
|
+
children = _ref.children;
|
|
12
10
|
if (asChild && /*#__PURE__*/isValidElement(children)) {
|
|
13
11
|
const childProps = children.props;
|
|
14
12
|
return /*#__PURE__*/cloneElement(children, {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
|
+
import _slicedToArray from '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
2
3
|
import React__default, { useState, useEffect, useMemo, useCallback } from 'react';
|
|
3
4
|
import { flip, shift, hide, arrow, useFloating, autoUpdate } from '@floating-ui/react-dom';
|
|
4
5
|
import ReactFocusLock from 'react-focus-lock';
|
|
@@ -21,10 +22,11 @@ const top = 'top';
|
|
|
21
22
|
const left = 'left';
|
|
22
23
|
const right = 'right';
|
|
23
24
|
function useMockedFloating(_ref) {
|
|
24
|
-
let
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
let placement = _ref.placement;
|
|
26
|
+
const _useState = useState(false),
|
|
27
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
28
|
+
isReady = _useState2[0],
|
|
29
|
+
setIsReady = _useState2[1];
|
|
28
30
|
useEffect(() => {
|
|
29
31
|
setIsReady(true);
|
|
30
32
|
}, []);
|
|
@@ -46,14 +48,12 @@ function useMockedFloating(_ref) {
|
|
|
46
48
|
}
|
|
47
49
|
function useFloatingPopper(_ref2) {
|
|
48
50
|
var _middlewareData$hide;
|
|
49
|
-
let
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
isFocusLocked
|
|
56
|
-
} = _ref2;
|
|
51
|
+
let placement = _ref2.placement,
|
|
52
|
+
middleware = _ref2.middleware,
|
|
53
|
+
open = _ref2.open,
|
|
54
|
+
isDisabled = _ref2.isDisabled,
|
|
55
|
+
arrowElement = _ref2.arrowElement,
|
|
56
|
+
isFocusLocked = _ref2.isFocusLocked;
|
|
57
57
|
// Build middleware array with arrow if provided
|
|
58
58
|
const fullMiddleware = useMemo(() => {
|
|
59
59
|
const result = [flip({
|
|
@@ -73,20 +73,19 @@ function useFloatingPopper(_ref2) {
|
|
|
73
73
|
}
|
|
74
74
|
return result;
|
|
75
75
|
}, [middleware, arrowElement]);
|
|
76
|
-
const {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
});
|
|
76
|
+
const _useFloating = useFloating({
|
|
77
|
+
placement,
|
|
78
|
+
middleware: fullMiddleware,
|
|
79
|
+
open,
|
|
80
|
+
transform: !isFocusLocked,
|
|
81
|
+
whileElementsMounted: open && !isDisabled ? autoUpdate : undefined
|
|
82
|
+
}),
|
|
83
|
+
refs = _useFloating.refs,
|
|
84
|
+
floatingStyles = _useFloating.floatingStyles,
|
|
85
|
+
middlewareData = _useFloating.middlewareData,
|
|
86
|
+
update = _useFloating.update,
|
|
87
|
+
resolvedPlacement = _useFloating.placement,
|
|
88
|
+
isReady = _useFloating.isPositioned;
|
|
90
89
|
|
|
91
90
|
// Manual update trigger for edge cases
|
|
92
91
|
const handleUpdate = useCallback(() => {
|
|
@@ -105,43 +104,55 @@ function useFloatingPopper(_ref2) {
|
|
|
105
104
|
}
|
|
106
105
|
const usePopper = typeof process !== 'undefined' && ((_process$env = process.env) === null || _process$env === void 0 ? void 0 : _process$env.NODE_ENV) === 'test' ? useMockedFloating : useFloatingPopper;
|
|
107
106
|
const Popper = _ref3 => {
|
|
108
|
-
let
|
|
109
|
-
open = false,
|
|
110
|
-
alwaysInDOM =
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
107
|
+
let _ref3$open = _ref3.open,
|
|
108
|
+
open = _ref3$open === void 0 ? false : _ref3$open,
|
|
109
|
+
_ref3$alwaysInDOM = _ref3.alwaysInDOM,
|
|
110
|
+
alwaysInDOM = _ref3$alwaysInDOM === void 0 ? false : _ref3$alwaysInDOM,
|
|
111
|
+
_ref3$placement = _ref3.placement,
|
|
112
|
+
placement = _ref3$placement === void 0 ? bottom : _ref3$placement,
|
|
113
|
+
anchorElement = _ref3.anchor,
|
|
114
|
+
popperElement = _ref3.popper,
|
|
115
|
+
arrowElement = _ref3.arrow,
|
|
116
|
+
externalAnchorNode = _ref3.anchorNode,
|
|
117
|
+
portalTarget = _ref3.portalTarget,
|
|
118
|
+
_ref3$middleware = _ref3.middleware,
|
|
119
|
+
externalMiddleware = _ref3$middleware === void 0 ? [] : _ref3$middleware,
|
|
120
|
+
_ref3$isDisabled = _ref3.isDisabled,
|
|
121
|
+
isDisabled = _ref3$isDisabled === void 0 ? false : _ref3$isDisabled,
|
|
122
|
+
_ref3$isFocusLocked = _ref3.isFocusLocked,
|
|
123
|
+
isFocusLocked = _ref3$isFocusLocked === void 0 ? false : _ref3$isFocusLocked,
|
|
124
|
+
focusLockProps = _ref3.focusLockProps;
|
|
125
|
+
const _useState3 = useState(externalAnchorNode !== null && externalAnchorNode !== void 0 ? externalAnchorNode : null),
|
|
126
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
127
|
+
anchorNode = _useState4[0],
|
|
128
|
+
setAnchorNode = _useState4[1];
|
|
129
|
+
const _useState5 = useState(null),
|
|
130
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
131
|
+
popperNode = _useState6[0],
|
|
132
|
+
setPopperNode = _useState6[1];
|
|
133
|
+
const _useState7 = useState(null),
|
|
134
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
135
|
+
arrowNode = _useState8[0],
|
|
136
|
+
setArrowNode = _useState8[1];
|
|
125
137
|
useEffect(() => {
|
|
126
138
|
if (externalAnchorNode) {
|
|
127
139
|
setAnchorNode(externalAnchorNode);
|
|
128
140
|
}
|
|
129
141
|
}, [externalAnchorNode]);
|
|
130
|
-
const {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
});
|
|
142
|
+
const _usePopper = usePopper({
|
|
143
|
+
placement,
|
|
144
|
+
middleware: externalMiddleware,
|
|
145
|
+
open,
|
|
146
|
+
isDisabled,
|
|
147
|
+
arrowElement: arrowNode,
|
|
148
|
+
isFocusLocked
|
|
149
|
+
}),
|
|
150
|
+
refs = _usePopper.refs,
|
|
151
|
+
floatingStyles = _usePopper.floatingStyles,
|
|
152
|
+
middlewareData = _usePopper.middlewareData,
|
|
153
|
+
isReady = _usePopper.isReady,
|
|
154
|
+
isReferenceHidden = _usePopper.isReferenceHidden,
|
|
155
|
+
resolvedPlacement = _usePopper.placement;
|
|
145
156
|
const computedPlacement = resolvedPlacement !== null && resolvedPlacement !== void 0 ? resolvedPlacement : placement;
|
|
146
157
|
|
|
147
158
|
// Sync external anchor node with floating-ui refs
|
|
@@ -157,9 +168,8 @@ const Popper = _ref3 => {
|
|
|
157
168
|
refs.setFloating(popperNode);
|
|
158
169
|
}
|
|
159
170
|
}, [popperNode, refs]);
|
|
160
|
-
const
|
|
161
|
-
isParentAnchorHidden
|
|
162
|
-
} = usePopperContext();
|
|
171
|
+
const _usePopperContext = usePopperContext(),
|
|
172
|
+
isParentAnchorHidden = _usePopperContext.isParentAnchorHidden;
|
|
163
173
|
|
|
164
174
|
/*
|
|
165
175
|
* If the parent anchor is hidden via CSS opacity, Popper will not consider it to be hidden.
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import '../createContextUtilities/index.js';
|
|
2
2
|
import createContextUtilities from '../createContextUtilities/createContextUtilities.js';
|
|
3
3
|
|
|
4
|
-
const {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
});
|
|
4
|
+
const _createContextUtiliti = createContextUtilities({
|
|
5
|
+
isParentAnchorHidden: false
|
|
6
|
+
}),
|
|
7
|
+
PopperContextProvider = _createContextUtiliti.Provider,
|
|
8
|
+
usePopperContext = _createContextUtiliti.useContext;
|
|
10
9
|
|
|
11
10
|
export { PopperContextProvider, usePopperContext as default };
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
import _slicedToArray from '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
1
2
|
import { useState, useEffect } from 'react';
|
|
2
3
|
import ReactDOM__default from 'react-dom';
|
|
3
4
|
import { usePortalTarget } from '../../components/UIProvider/PortalTargetContext.js';
|
|
4
5
|
|
|
5
6
|
const Portal = _ref => {
|
|
6
|
-
let
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
let children = _ref.children,
|
|
8
|
+
portalTarget = _ref.portalTarget;
|
|
9
|
+
const _useState = useState(),
|
|
10
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
11
|
+
container = _useState2[0],
|
|
12
|
+
setContainer = _useState2[1];
|
|
11
13
|
const globalPortalTarget = usePortalTarget();
|
|
12
14
|
useEffect(() => {
|
|
13
15
|
const element = document.createElement('div');
|
package/dist/utils/Text/Text.js
CHANGED
|
@@ -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, useRef } from 'react';
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import '../mergeRefs/index.js';
|
|
@@ -8,15 +9,16 @@ import useIsTruncated from '../../hooks/useIsTruncated/useIsTruncated.js';
|
|
|
8
9
|
import Tooltip from '../../components/Tooltip/Tooltip.js';
|
|
9
10
|
import mergeRefs from '../mergeRefs/mergeRefs.js';
|
|
10
11
|
|
|
12
|
+
const _excluded = ["children", "lightTheme", "delayMs", "className", "asChild"];
|
|
11
13
|
const Text = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
delayMs = 500,
|
|
16
|
-
className,
|
|
17
|
-
asChild =
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
let children = _ref.children,
|
|
15
|
+
lightTheme = _ref.lightTheme,
|
|
16
|
+
_ref$delayMs = _ref.delayMs,
|
|
17
|
+
delayMs = _ref$delayMs === void 0 ? 500 : _ref$delayMs,
|
|
18
|
+
className = _ref.className,
|
|
19
|
+
_ref$asChild = _ref.asChild,
|
|
20
|
+
asChild = _ref$asChild === void 0 ? false : _ref$asChild,
|
|
21
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
20
22
|
const internalRef = useRef(null);
|
|
21
23
|
const isTruncated = useIsTruncated(internalRef);
|
|
22
24
|
const willClone = asChild && /*#__PURE__*/React__default.isValidElement(children) && typeof children !== 'string' && typeof children !== 'number';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _slicedToArray from '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
1
2
|
import React__default, { useState, useRef, cloneElement, useEffect } from 'react';
|
|
2
3
|
import '../../components/Tooltip/index.js';
|
|
3
4
|
import '../mergeRefs/index.js';
|
|
@@ -19,12 +20,15 @@ import Tooltip from '../../components/Tooltip/Tooltip.js';
|
|
|
19
20
|
*/
|
|
20
21
|
const TextOverflowTooltip = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
21
22
|
var _textParentHTMLElemen;
|
|
22
|
-
let
|
|
23
|
-
lightTheme = false,
|
|
24
|
-
delayMs =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const
|
|
23
|
+
let _ref$lightTheme = _ref.lightTheme,
|
|
24
|
+
lightTheme = _ref$lightTheme === void 0 ? false : _ref$lightTheme,
|
|
25
|
+
_ref$delayMs = _ref.delayMs,
|
|
26
|
+
delayMs = _ref$delayMs === void 0 ? 500 : _ref$delayMs,
|
|
27
|
+
children = _ref.children;
|
|
28
|
+
const _useState = useState(false),
|
|
29
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
30
|
+
isTextOverflowing = _useState2[0],
|
|
31
|
+
setIsTextOverflowing = _useState2[1];
|
|
28
32
|
const textParentHTMLElementRef = useRef(null);
|
|
29
33
|
const textParentReactElement = /*#__PURE__*/cloneElement(children, {
|
|
30
34
|
ref: mergeRefs(children.ref, textParentHTMLElementRef)
|
|
@@ -44,13 +44,10 @@ import containsComponentOrElement from './containsComponentOrElement.js';
|
|
|
44
44
|
* [<span>2</span>, ' of ', '5']
|
|
45
45
|
*/
|
|
46
46
|
const Translate = _ref => {
|
|
47
|
-
let
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const {
|
|
52
|
-
translate
|
|
53
|
-
} = useTranslation();
|
|
47
|
+
let messageKey = _ref.messageKey,
|
|
48
|
+
placeholders = _ref.placeholders;
|
|
49
|
+
const _useTranslation = useTranslation(),
|
|
50
|
+
translate = _useTranslation.translate;
|
|
54
51
|
const text = translate(messageKey);
|
|
55
52
|
if (placeholders) {
|
|
56
53
|
const compiledMessage = insertPlaceholders(text, placeholders);
|
|
@@ -5,17 +5,14 @@ import createContextUtilities from '../createContextUtilities/createContextUtili
|
|
|
5
5
|
|
|
6
6
|
const fallbackLocalizedText = FALLBACK_LOCALIZED_TEXT;
|
|
7
7
|
const createTranslationProvider = () => {
|
|
8
|
-
const {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
8
|
+
const _createContextUtiliti = createContextUtilities({
|
|
9
|
+
localizedText: {}
|
|
10
|
+
}),
|
|
11
|
+
TranslationContextProvider = _createContextUtiliti.Provider,
|
|
12
|
+
useTranslationContext = _createContextUtiliti.useContext;
|
|
14
13
|
const TranslationProvider = _ref => {
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
children
|
|
18
|
-
} = _ref;
|
|
14
|
+
let localizedText = _ref.localizedText,
|
|
15
|
+
children = _ref.children;
|
|
19
16
|
const translationContext = useMemo(() => ({
|
|
20
17
|
localizedText
|
|
21
18
|
}), [localizedText]);
|
|
@@ -28,9 +25,8 @@ const createTranslationProvider = () => {
|
|
|
28
25
|
useTranslationContext
|
|
29
26
|
};
|
|
30
27
|
};
|
|
31
|
-
const
|
|
32
|
-
TranslationProvider,
|
|
33
|
-
useTranslationContext
|
|
34
|
-
} = createTranslationProvider();
|
|
28
|
+
const _createTranslationPro = createTranslationProvider(),
|
|
29
|
+
TranslationProvider = _createTranslationPro.TranslationProvider,
|
|
30
|
+
useTranslationContext = _createTranslationPro.useTranslationContext;
|
|
35
31
|
|
|
36
32
|
export { TranslationProvider, createTranslationProvider, fallbackLocalizedText, useTranslationContext };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
1
2
|
import { isValidElement } from 'react';
|
|
2
3
|
|
|
3
4
|
function isClassComponent(component) {
|
|
@@ -7,7 +8,8 @@ function isClassComponent(component) {
|
|
|
7
8
|
!!component.prototype.isReactComponent;
|
|
8
9
|
}
|
|
9
10
|
function isFunctionComponent(component) {
|
|
10
|
-
|
|
11
|
+
var _context;
|
|
12
|
+
return typeof component === 'function' && _includesInstanceProperty(_context = String(component)).call(_context, 'return React.createElement');
|
|
11
13
|
}
|
|
12
14
|
function isReactComponent(component) {
|
|
13
15
|
return isClassComponent(component) || isFunctionComponent(component);
|
|
@@ -15,9 +15,8 @@ const HAS_ERROR_BEEN_LOGGED_FOR_KEY = new Set();
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
const useTranslationFactory = (fallback, useTranslationContextHook) => {
|
|
18
|
-
const
|
|
19
|
-
localizedText
|
|
20
|
-
} = useTranslationContextHook();
|
|
18
|
+
const _useTranslationContex = useTranslationContextHook(),
|
|
19
|
+
localizedText = _useTranslationContex.localizedText;
|
|
21
20
|
|
|
22
21
|
/**
|
|
23
22
|
* Returns a translated string given a key and placeholders.
|
|
@@ -2,9 +2,7 @@ import { VirtuosoMockContext } from 'react-virtuoso';
|
|
|
2
2
|
import React__default, { useMemo } from 'react';
|
|
3
3
|
|
|
4
4
|
function VirtuosoWrapper(_ref) {
|
|
5
|
-
let
|
|
6
|
-
children
|
|
7
|
-
} = _ref;
|
|
5
|
+
let children = _ref.children;
|
|
8
6
|
const contextValue = useMemo(() => ({
|
|
9
7
|
viewportHeight: 350,
|
|
10
8
|
itemHeight: 40
|
|
@@ -20,10 +20,10 @@ function _findMatch(child, queries, matchesList) {
|
|
|
20
20
|
let foundMatch = false;
|
|
21
21
|
let i;
|
|
22
22
|
for (i = 0; i < queries.length; i += 1) {
|
|
23
|
-
const
|
|
24
|
-
matcher,
|
|
25
|
-
modifier =
|
|
26
|
-
|
|
23
|
+
const _queries$i = queries[i],
|
|
24
|
+
matcher = _queries$i.matcher,
|
|
25
|
+
_queries$i$modifier = _queries$i.modifier,
|
|
26
|
+
modifier = _queries$i$modifier === void 0 ? c => c : _queries$i$modifier;
|
|
27
27
|
if (matcher(child)) {
|
|
28
28
|
newChild = modifier(child, matchesList[i].length, matchesList);
|
|
29
29
|
foundMatch = true;
|
package/icons/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@dnd-kit/modifiers": "7.0.0",
|
|
9
9
|
"@juggle/resize-observer": "^3.4.0",
|
|
10
10
|
"@floating-ui/react-dom": "^2.1.2",
|
|
11
|
-
"@qualtrics/component-styles": "0.
|
|
11
|
+
"@qualtrics/component-styles": "0.158.0",
|
|
12
12
|
"@radix-ui/react-dropdown-menu": "2.1.16",
|
|
13
13
|
"@react-aria/interactions": "^3.21.3",
|
|
14
14
|
"@react-hook/resize-observer": "^1.2.6",
|
package/next/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@dnd-kit/modifiers": "7.0.0",
|
|
9
9
|
"@juggle/resize-observer": "^3.4.0",
|
|
10
10
|
"@floating-ui/react-dom": "^2.1.2",
|
|
11
|
-
"@qualtrics/component-styles": "0.
|
|
11
|
+
"@qualtrics/component-styles": "0.158.0",
|
|
12
12
|
"@radix-ui/react-dropdown-menu": "2.1.16",
|
|
13
13
|
"@react-aria/interactions": "^3.21.3",
|
|
14
14
|
"@react-hook/resize-observer": "^1.2.6",
|
|
@@ -24,6 +24,6 @@
|
|
|
24
24
|
"uuid": "^8.3.2"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@qualtrics/ui-react": "2.
|
|
27
|
+
"@qualtrics/ui-react": "2.80.0"
|
|
28
28
|
}
|
|
29
29
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qualtrics/ui-react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.80.0",
|
|
4
4
|
"description": "Official Qualtrics UI component library designed for React",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"@dnd-kit/modifiers": "7.0.0",
|
|
103
103
|
"@juggle/resize-observer": "^3.4.0",
|
|
104
104
|
"@floating-ui/react-dom": "^2.1.2",
|
|
105
|
-
"@qualtrics/component-styles": "0.
|
|
105
|
+
"@qualtrics/component-styles": "0.158.0",
|
|
106
106
|
"@radix-ui/react-dropdown-menu": "2.1.16",
|
|
107
107
|
"@react-aria/interactions": "^3.21.3",
|
|
108
108
|
"@react-hook/resize-observer": "^1.2.6",
|
|
@@ -126,8 +126,8 @@
|
|
|
126
126
|
"@babel/preset-react": "^7.24.7",
|
|
127
127
|
"@babel/preset-typescript": "^7.24.7",
|
|
128
128
|
"@microsoft/api-extractor": "^7.48.1",
|
|
129
|
-
"@playwright/experimental-ct-react": "1.
|
|
130
|
-
"@playwright/test": "1.
|
|
129
|
+
"@playwright/experimental-ct-react": "1.60.0",
|
|
130
|
+
"@playwright/test": "1.60.0",
|
|
131
131
|
"@qualtrics/base-styles": "0.4.1",
|
|
132
132
|
"@qualtrics/translations-qualtricsdesignsystemui": "^0.6.39377",
|
|
133
133
|
"@qualtrics/translations-qualtricsdesignsystemuicountries": "^0.6.37430",
|