@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,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 '../../utils/index.js';
|
|
4
5
|
import { useComboboxContext } from './ComboboxContext.js';
|
|
@@ -8,27 +9,26 @@ import { FLYOUT_POPPER_OFFSET } from '../../utils/constants.js';
|
|
|
8
9
|
import { Flyout } from '../../utils/Flyout/Flyout.js';
|
|
9
10
|
import mergeRefs from '../../utils/mergeRefs/mergeRefs.js';
|
|
10
11
|
|
|
12
|
+
const _excluded = ["children", "style", "placement", "portalTarget", "id", "aria-label", "aria-labelledby"];
|
|
11
13
|
const ComboboxList = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
style = {},
|
|
15
|
-
placement =
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
'aria-label'
|
|
20
|
-
'aria-labelledby'
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
ariaLabelledby
|
|
31
|
-
} = useComboboxContext();
|
|
14
|
+
let children = _ref.children,
|
|
15
|
+
_ref$style = _ref.style,
|
|
16
|
+
style = _ref$style === void 0 ? {} : _ref$style,
|
|
17
|
+
_ref$placement = _ref.placement,
|
|
18
|
+
placement = _ref$placement === void 0 ? 'bottom-start' : _ref$placement,
|
|
19
|
+
portalTarget = _ref.portalTarget,
|
|
20
|
+
externalId = _ref.id,
|
|
21
|
+
ariaLabelFromProps = _ref['aria-label'],
|
|
22
|
+
ariaLabelledbyFromProps = _ref['aria-labelledby'],
|
|
23
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
24
|
+
const _useComboboxContext = useComboboxContext(),
|
|
25
|
+
isOpen = _useComboboxContext.isOpen,
|
|
26
|
+
inputRef = _useComboboxContext.inputRef,
|
|
27
|
+
listRef = _useComboboxContext.listRef,
|
|
28
|
+
isLoading = _useComboboxContext.isLoading,
|
|
29
|
+
listContainerId = _useComboboxContext.listContainerId,
|
|
30
|
+
ariaLabel = _useComboboxContext.ariaLabel,
|
|
31
|
+
ariaLabelledby = _useComboboxContext.ariaLabelledby;
|
|
32
32
|
return /*#__PURE__*/React__default.createElement(Popper, {
|
|
33
33
|
open: isOpen,
|
|
34
34
|
placement: placement,
|
|
@@ -1,20 +1,19 @@
|
|
|
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 '../../utils/index.js';
|
|
4
5
|
import { FlyoutOption } from '../../utils/Flyout/FlyoutOption.js';
|
|
5
6
|
import wrapEvent from '../../utils/wrapEvent/wrapEvent.js';
|
|
6
7
|
|
|
8
|
+
const _excluded = ["children", "value", "label", "onSelect", "onClick", "onMouseDown"];
|
|
7
9
|
const ComboboxOption = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
onMouseDown,
|
|
16
|
-
...rest
|
|
17
|
-
} = _ref;
|
|
10
|
+
let children = _ref.children,
|
|
11
|
+
value = _ref.value,
|
|
12
|
+
label = _ref.label,
|
|
13
|
+
onSelect = _ref.onSelect,
|
|
14
|
+
onClick = _ref.onClick,
|
|
15
|
+
onMouseDown = _ref.onMouseDown,
|
|
16
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
18
17
|
return /*#__PURE__*/React__default.createElement(FlyoutOption, _extends({}, rest, {
|
|
19
18
|
onClick: wrapEvent(onClick, onSelect),
|
|
20
19
|
onMouseDown: wrapEvent(onMouseDown, e => e.preventDefault()),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _slicedToArray from '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
1
2
|
import React__default, { useState, useEffect } from 'react';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import styles from './ConfigPane2.js';
|
|
@@ -21,21 +22,24 @@ import UnpinIcon from '../../icons/components/UnpinIcon.js';
|
|
|
21
22
|
import PinIcon from '../../icons/components/PinIcon.js';
|
|
22
23
|
|
|
23
24
|
const ExpandCollapseButton = _ref => {
|
|
24
|
-
let
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const {
|
|
33
|
-
translate
|
|
34
|
-
} = useTranslation();
|
|
25
|
+
let isOpen = _ref.isOpen,
|
|
26
|
+
isTransitioning = _ref.isTransitioning,
|
|
27
|
+
onClick = _ref.onClick,
|
|
28
|
+
panelId = _ref.panelId,
|
|
29
|
+
isContainerHovered = _ref.isContainerHovered,
|
|
30
|
+
dataTestId = _ref['data-testid'];
|
|
31
|
+
const _useTranslation = useTranslation(),
|
|
32
|
+
translate = _useTranslation.translate;
|
|
35
33
|
const showPanelLabel = translate('configPane.showPanel');
|
|
36
34
|
const hidePanelLabel = translate('configPane.hidePanel');
|
|
37
|
-
const
|
|
38
|
-
|
|
35
|
+
const _useState = useState(false),
|
|
36
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
37
|
+
isTooltipVisible = _useState2[0],
|
|
38
|
+
setIsTooltipVisible = _useState2[1];
|
|
39
|
+
const _useState3 = useState(false),
|
|
40
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
41
|
+
isHiddenByEscape = _useState4[0],
|
|
42
|
+
setIsHiddenByEscape = _useState4[1];
|
|
39
43
|
const handleKeyDown = event => {
|
|
40
44
|
if (event.key === 'Escape' && isOpen) {
|
|
41
45
|
// Prevent Safari from exiting full-screen mode
|
|
@@ -73,36 +77,48 @@ const ExpandCollapseButton = _ref => {
|
|
|
73
77
|
}))));
|
|
74
78
|
};
|
|
75
79
|
const ConfigPane = _ref2 => {
|
|
76
|
-
let
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
shouldShowPanelPreview = false,
|
|
81
|
-
isOpen
|
|
82
|
-
onIsOpenChange,
|
|
83
|
-
hideOpenButton =
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
'aria-
|
|
90
|
-
'
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
const
|
|
94
|
-
|
|
80
|
+
let id = _ref2.id,
|
|
81
|
+
title = _ref2.title,
|
|
82
|
+
children = _ref2.children,
|
|
83
|
+
_ref2$shouldShowPanel = _ref2.shouldShowPanelPreview,
|
|
84
|
+
shouldShowPanelPreview = _ref2$shouldShowPanel === void 0 ? false : _ref2$shouldShowPanel,
|
|
85
|
+
externalIsOpen = _ref2.isOpen,
|
|
86
|
+
onIsOpenChange = _ref2.onIsOpenChange,
|
|
87
|
+
_ref2$hideOpenButton = _ref2.hideOpenButton,
|
|
88
|
+
hideOpenButton = _ref2$hideOpenButton === void 0 ? false : _ref2$hideOpenButton,
|
|
89
|
+
externalIsPinned = _ref2.isPinned,
|
|
90
|
+
onIsPinnedChange = _ref2.onIsPinnedChange,
|
|
91
|
+
_ref2$hidePinButton = _ref2.hidePinButton,
|
|
92
|
+
hidePinButton = _ref2$hidePinButton === void 0 ? false : _ref2$hidePinButton,
|
|
93
|
+
ariaLabel = _ref2['aria-label'],
|
|
94
|
+
ariaLabelledby = _ref2['aria-labelledby'],
|
|
95
|
+
ariaDescribedBy = _ref2['aria-describedby'],
|
|
96
|
+
dataTestId = _ref2['data-testid'];
|
|
97
|
+
const _useState5 = useState(false),
|
|
98
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
99
|
+
isTransitioning = _useState6[0],
|
|
100
|
+
setIsTransitioning = _useState6[1];
|
|
101
|
+
const _useControllableState = useControllableState(true, onIsOpenChange, externalIsOpen),
|
|
102
|
+
_useControllableState2 = _slicedToArray(_useControllableState, 2),
|
|
103
|
+
isOpen = _useControllableState2[0],
|
|
104
|
+
setIsOpen = _useControllableState2[1];
|
|
105
|
+
const _useControllableState3 = useControllableState(true, onIsPinnedChange, externalIsPinned),
|
|
106
|
+
_useControllableState4 = _slicedToArray(_useControllableState3, 2),
|
|
107
|
+
isPinned = _useControllableState4[0],
|
|
108
|
+
setIsPinned = _useControllableState4[1];
|
|
95
109
|
const panelId = useId(id);
|
|
96
|
-
const
|
|
97
|
-
translate
|
|
98
|
-
} = useTranslation();
|
|
110
|
+
const _useTranslation2 = useTranslation(),
|
|
111
|
+
translate = _useTranslation2.translate;
|
|
99
112
|
const pinPanelLabel = translate('configPane.pinPanel');
|
|
100
113
|
const unpinPanelLabel = translate('configPane.unpinPanel');
|
|
101
114
|
const toggleOpen = () => {
|
|
102
115
|
setIsTransitioning(true);
|
|
103
116
|
setIsOpen(currentIsOpen => !currentIsOpen);
|
|
104
117
|
};
|
|
105
|
-
const
|
|
118
|
+
const _useIsHovered = useIsHovered(),
|
|
119
|
+
_useIsHovered2 = _slicedToArray(_useIsHovered, 2),
|
|
120
|
+
isContainerHoveredRef = _useIsHovered2[0],
|
|
121
|
+
isContainerHovered = _useIsHovered2[1];
|
|
106
122
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
107
123
|
className: classNames(styles.paneContainer, {
|
|
108
124
|
[styles.hidden]: !isOpen,
|
|
@@ -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 = {"paneContainer":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._K1U9t{grid-area:configPane;position:relative;height:100%}._9yKR4{overflow:hidden;height:100%;position:absolute;background-color:#fff;top:0;transition:width .5s;width:292px;border-right:1px solid #eee;box-sizing:border-box}._9IK99._ERu-V ._9yKR4,._9IK99:not(._fTpEd) ._9yKR4{-webkit-clip-path:inset(0 -20px 0 0);clip-path:inset(0 -20px 0 0);box-shadow:0 8px 20px 0 rgba(0,0,0,.1),0 4px 6px 0 rgba(0,0,0,.05)}._fTpEd ._9yKR4{width:0}._ERu-V._fTpEd ._9yKR4{width:30px;cursor:pointer}._tsw9-{height:100%;position:relative;width:292px}._9IK99 ._tsw9-,._fTpEd ._tsw9-{width:0}._ERu-V._9IK99 ._tsw9-,._ERu-V._fTpEd ._tsw9-{width:30px}._TMTNB ._tsw9-{transition:width .5s}._UGozw{position:absolute;width:292px;height:100%;right:0;overflow:auto;padding:12px 0}._fTpEd ._UGozw{visibility:hidden}._TMTNB ._UGozw{visibility:visible}._UGozw ._nwvXB{width:252px;margin-left:20px}._yVj8m{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding-bottom:12px}._w6mF6{flex-grow:1;padding-right:8px;line-height:20px;margin:8px 0}._w6mF6 *{font-weight:400;font-size:16px;margin:0}._h9FXO{position:absolute;transition:left .5s;top:0;left:290px;width:12px;cursor:pointer;height:100%}._fTpEd ._h9FXO{left:0}._ERu-V._fTpEd ._h9FXO{left:30px}._h9FXO ._SZ6-U{width:4px;height:100%}._ERu-V._fTpEd ._9yKR4:hover+._h9FXO ._SZ6-U,._h9FXO:hover ._SZ6-U{background-color:#9dc5ed}._ERu-V._fTpEd ._9yKR4:hover+._h9FXO ._-0yWb>span,._h9FXO:hover ._-0yWb>span{background-color:#0b6ed0;border-color:#0b6ed0}._ERu-V._fTpEd ._9yKR4:hover+._h9FXO ._-0yWb>span>svg,._h9FXO:hover ._-0yWb>span>svg{fill:#fff}._ERu-V._fTpEd ._9yKR4:hover+._h9FXO ._-0yWb:active>span,._h9FXO:hover ._-0yWb:active>span{background-color:#0854a1;border-color:#0854a1}._ERu-V._fTpEd ._9yKR4:hover+._h9FXO ._-0yWb:active>span>svg,._h9FXO:hover ._-0yWb:active>span>svg{fill:#fff}._h9FXO ._-0yWb{left:-16px;width:36px;height:36px;position:absolute;top:48px;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}._h9FXO ._-0yWb:active>span{background-color:#0854a1;border-color:#0854a1}._h9FXO ._-0yWb:active>span>svg{fill:#fff}._h9FXO ._-0yWb>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._h9FXO ._-0yWb>span>svg{fill:#515559;border-radius:50%}._-0yWb.focus-visible,._-0yWb:focus-visible{border-color:#0a3f88}";
|
|
4
|
+
var styles = {"paneContainer":"_K1U9t","paneContentContainer":"_9yKR4","unpinned":"_9IK99","hidden":"_fTpEd","preview":"_ERu-V","spacer":"_tsw9-","transitioning":"_TMTNB","paneContent":"_UGozw","paneContentInner":"_nwvXB","header":"_yVj8m","title":"_w6mF6","clickableArea":"_h9FXO","hoverBorder":"_SZ6-U","toolbarPanelExpandCollapseButton":"_-0yWb"};
|
|
5
|
+
var stylesheet="._K1U9t{grid-area:configPane;position:relative;height:100%}._9yKR4{overflow:hidden;height:100%;position:absolute;background-color:#fff;top:0;transition:width .5s;width:292px;border-right:1px solid #eee;box-sizing:border-box}._9IK99._ERu-V ._9yKR4,._9IK99:not(._fTpEd) ._9yKR4{-webkit-clip-path:inset(0 -20px 0 0);clip-path:inset(0 -20px 0 0);box-shadow:0 8px 20px 0 rgba(0,0,0,.1),0 4px 6px 0 rgba(0,0,0,.05)}._fTpEd ._9yKR4{width:0}._ERu-V._fTpEd ._9yKR4{width:30px;cursor:pointer}._tsw9-{height:100%;position:relative;width:292px}._9IK99 ._tsw9-,._fTpEd ._tsw9-{width:0}._ERu-V._9IK99 ._tsw9-,._ERu-V._fTpEd ._tsw9-{width:30px}._TMTNB ._tsw9-{transition:width .5s}._UGozw{position:absolute;width:292px;height:100%;right:0;overflow:auto;padding:12px 0}._fTpEd ._UGozw{visibility:hidden}._TMTNB ._UGozw{visibility:visible}._UGozw ._nwvXB{width:252px;margin-left:20px}._yVj8m{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding-bottom:12px}._w6mF6{flex-grow:1;padding-right:8px;line-height:20px;margin:8px 0}._w6mF6 *{font-weight:400;font-size:16px;margin:0}._h9FXO{position:absolute;transition:left .5s;top:0;left:290px;width:12px;cursor:pointer;height:100%}._fTpEd ._h9FXO{left:0}._ERu-V._fTpEd ._h9FXO{left:30px}._h9FXO ._SZ6-U{width:4px;height:100%}._ERu-V._fTpEd ._9yKR4:hover+._h9FXO ._SZ6-U,._h9FXO:hover ._SZ6-U{background-color:#9dc5ed}._ERu-V._fTpEd ._9yKR4:hover+._h9FXO ._-0yWb>span,._h9FXO:hover ._-0yWb>span{background-color:#0b6ed0;border-color:#0b6ed0}._ERu-V._fTpEd ._9yKR4:hover+._h9FXO ._-0yWb>span>svg,._h9FXO:hover ._-0yWb>span>svg{fill:#fff}._ERu-V._fTpEd ._9yKR4:hover+._h9FXO ._-0yWb:active>span,._h9FXO:hover ._-0yWb:active>span{background-color:#0854a1;border-color:#0854a1}._ERu-V._fTpEd ._9yKR4:hover+._h9FXO ._-0yWb:active>span>svg,._h9FXO:hover ._-0yWb:active>span>svg{fill:#fff}._h9FXO ._-0yWb{left:-16px;width:36px;height:36px;position:absolute;top:48px;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}._h9FXO ._-0yWb:active>span{background-color:#0854a1;border-color:#0854a1}._h9FXO ._-0yWb:active>span>svg{fill:#fff}._h9FXO ._-0yWb>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._h9FXO ._-0yWb>span>svg{fill:#515559;border-radius:50%}._-0yWb.focus-visible,._-0yWb:focus-visible{border-color:#0a3f88}";
|
|
6
6
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){styleInject(css_248z);}
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
2
3
|
import React__default from 'react';
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import styles from './Divider2.js';
|
|
5
6
|
|
|
7
|
+
const _excluded = ["className"];
|
|
6
8
|
const Divider = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
...rest
|
|
10
|
-
} = _ref;
|
|
9
|
+
let className = _ref.className,
|
|
10
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
11
11
|
return /*#__PURE__*/React__default.createElement("hr", _extends({
|
|
12
12
|
ref: ref,
|
|
13
13
|
className: classNames(className, styles.divider),
|
|
@@ -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 = {"divider":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._Ky4TS{border:none;height:1px;margin:0;flex-shrink:0;background-color:#e5e5e5}";
|
|
4
|
+
var styles = {"divider":"_Ky4TS"};
|
|
5
|
+
var stylesheet="._Ky4TS{border:none;height:1px;margin:0;flex-shrink:0;background-color:#e5e5e5}";
|
|
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,6 +1,8 @@
|
|
|
1
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
1
2
|
import React__default, { createContext } from 'react';
|
|
2
3
|
import { DescendantProvider, useDescendant } from './reach-descendants.js';
|
|
3
4
|
|
|
5
|
+
const _excluded = ["element"];
|
|
4
6
|
const noop = param => {}; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
5
7
|
|
|
6
8
|
const ChildIndexContext = /*#__PURE__*/createContext({
|
|
@@ -9,11 +11,9 @@ const ChildIndexContext = /*#__PURE__*/createContext({
|
|
|
9
11
|
unregisterDescendant: noop
|
|
10
12
|
});
|
|
11
13
|
const ChildIndexProvider = _ref => {
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
children
|
|
16
|
-
} = _ref;
|
|
14
|
+
let items = _ref.items,
|
|
15
|
+
setItems = _ref.setItems,
|
|
16
|
+
children = _ref.children;
|
|
17
17
|
return /*#__PURE__*/React__default.createElement(DescendantProvider, {
|
|
18
18
|
context: ChildIndexContext,
|
|
19
19
|
items: items,
|
|
@@ -21,10 +21,8 @@ const ChildIndexProvider = _ref => {
|
|
|
21
21
|
}, children);
|
|
22
22
|
};
|
|
23
23
|
function useChildIndex(_ref2) {
|
|
24
|
-
let
|
|
25
|
-
|
|
26
|
-
...rest
|
|
27
|
-
} = _ref2;
|
|
24
|
+
let element = _ref2.element,
|
|
25
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
28
26
|
return useDescendant({
|
|
29
27
|
element,
|
|
30
28
|
...rest
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
2
|
+
import _slicedToArray from '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
1
3
|
import React__default, { useState, useContext, useCallback, useMemo } from 'react';
|
|
2
4
|
import '../../../hooks/index.js';
|
|
3
5
|
import usePrevious from '../../../hooks/usePrevious/usePrevious.js';
|
|
4
6
|
import useSSRLayoutEffect from '../../../hooks/useSSRLayoutEffect/useSSRLayoutEffect.js';
|
|
5
7
|
|
|
6
|
-
|
|
8
|
+
const _excluded = ["element", "index"];
|
|
7
9
|
/**
|
|
8
10
|
* This hook registers our descendant by passing it into an array. We can then
|
|
9
11
|
* search that array by to find its index when registering it in the component.
|
|
@@ -28,12 +30,13 @@ import useSSRLayoutEffect from '../../../hooks/useSSRLayoutEffect/useSSRLayoutEf
|
|
|
28
30
|
* this is not the case, we can require an explicit index from the app.
|
|
29
31
|
*/
|
|
30
32
|
function useDescendant(descendant, context, indexProp) {
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
const _useState = useState({}),
|
|
34
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
35
|
+
forceUpdate = _useState2[1];
|
|
36
|
+
const _useContext = useContext(context),
|
|
37
|
+
registerDescendant = _useContext.registerDescendant,
|
|
38
|
+
unregisterDescendant = _useContext.unregisterDescendant,
|
|
39
|
+
descendants = _useContext.descendants;
|
|
37
40
|
|
|
38
41
|
// This will initially return -1 because we haven't registered the descendant
|
|
39
42
|
// on the first render. After we register, this will then return the correct
|
|
@@ -68,9 +71,7 @@ function useDescendant(descendant, context, indexProp) {
|
|
|
68
71
|
|
|
69
72
|
// Unregister when the underlying DOM node changes or unmounts.
|
|
70
73
|
useSSRLayoutEffect(() => {
|
|
71
|
-
const
|
|
72
|
-
element
|
|
73
|
-
} = descendant;
|
|
74
|
+
const element = descendant.element;
|
|
74
75
|
return () => unregisterDescendant(element);
|
|
75
76
|
}, [descendant.element, unregisterDescendant]);
|
|
76
77
|
return index;
|
|
@@ -79,18 +80,14 @@ function useDescendants(ctx) {
|
|
|
79
80
|
return useContext(ctx).descendants;
|
|
80
81
|
}
|
|
81
82
|
function DescendantProvider(_ref) {
|
|
82
|
-
let
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
set
|
|
87
|
-
} = _ref;
|
|
83
|
+
let Ctx = _ref.context,
|
|
84
|
+
children = _ref.children,
|
|
85
|
+
items = _ref.items,
|
|
86
|
+
set = _ref.set;
|
|
88
87
|
const registerDescendant = useCallback(_ref2 => {
|
|
89
|
-
let
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
...rest
|
|
93
|
-
} = _ref2;
|
|
88
|
+
let element = _ref2.element,
|
|
89
|
+
explicitIndex = _ref2.index,
|
|
90
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
94
91
|
if (!element) {
|
|
95
92
|
return;
|
|
96
93
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
|
+
import _slicedToArray from '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
3
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
2
4
|
import React__default, { useRef, useState, useCallback, useEffect } from 'react';
|
|
3
5
|
import classNames from 'classnames';
|
|
4
6
|
import styles from './Dropdown2.js';
|
|
@@ -16,43 +18,42 @@ import useId from '../../hooks/useId/useId.js';
|
|
|
16
18
|
import useClickOutside from '../../hooks/useClickOutside/useClickOutside.js';
|
|
17
19
|
import mergeRefs from '../../utils/mergeRefs/mergeRefs.js';
|
|
18
20
|
|
|
21
|
+
const _excluded = ["className", "children", "label", "name", "disabled", "isInvalid", "isOpen", "private_highlightedIndex", "isMultiSelect", "onIsOpenChange", "private_onHighlightedIndexChange", "defaultValue", "value", "onChange", "onBlur", "id", "errorText", "helperText", "aria-labelledby", "aria-label", "aria-describedby", "isSearchable", "searchValue", "onSearchValueChange", "isSearchFilteringDisabled", "data-testid"];
|
|
19
22
|
const Dropdown = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
20
23
|
var _ref2, _dropdownButton$props, _dropdownButton$props2, _dropdownList$props$i, _dropdownList$props;
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
disabled = false,
|
|
27
|
-
isInvalid =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
isMultiSelect =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
defaultValue,
|
|
36
|
-
value
|
|
37
|
-
onChange
|
|
38
|
-
onBlur
|
|
39
|
-
id,
|
|
40
|
-
errorText,
|
|
41
|
-
helperText,
|
|
42
|
-
'aria-labelledby'
|
|
43
|
-
'aria-label'
|
|
44
|
-
'aria-describedby'
|
|
45
|
-
isSearchable,
|
|
46
|
-
searchValue
|
|
47
|
-
onSearchValueChange,
|
|
48
|
-
isSearchFilteringDisabled,
|
|
49
|
-
'data-testid'
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
fieldErrors
|
|
55
|
-
} = useFormField();
|
|
24
|
+
let className = _ref.className,
|
|
25
|
+
children = _ref.children,
|
|
26
|
+
label = _ref.label,
|
|
27
|
+
name = _ref.name,
|
|
28
|
+
_ref$disabled = _ref.disabled,
|
|
29
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
30
|
+
_ref$isInvalid = _ref.isInvalid,
|
|
31
|
+
isInvalid = _ref$isInvalid === void 0 ? false : _ref$isInvalid,
|
|
32
|
+
externalIsOpen = _ref.isOpen,
|
|
33
|
+
externalHighlightedIndex = _ref.private_highlightedIndex,
|
|
34
|
+
_ref$isMultiSelect = _ref.isMultiSelect,
|
|
35
|
+
isMultiSelect = _ref$isMultiSelect === void 0 ? false : _ref$isMultiSelect,
|
|
36
|
+
onIsOpenChange = _ref.onIsOpenChange,
|
|
37
|
+
onHighlightedIndexChange = _ref.private_onHighlightedIndexChange,
|
|
38
|
+
defaultValue = _ref.defaultValue,
|
|
39
|
+
externalValue = _ref.value,
|
|
40
|
+
externalOnChange = _ref.onChange,
|
|
41
|
+
externalOnBlur = _ref.onBlur,
|
|
42
|
+
id = _ref.id,
|
|
43
|
+
errorText = _ref.errorText,
|
|
44
|
+
helperText = _ref.helperText,
|
|
45
|
+
ariaLabelledBy = _ref['aria-labelledby'],
|
|
46
|
+
ariaLabel = _ref['aria-label'],
|
|
47
|
+
ariaDescribedby = _ref['aria-describedby'],
|
|
48
|
+
isSearchable = _ref.isSearchable,
|
|
49
|
+
externalSearchValue = _ref.searchValue,
|
|
50
|
+
onSearchValueChange = _ref.onSearchValueChange,
|
|
51
|
+
isSearchFilteringDisabled = _ref.isSearchFilteringDisabled,
|
|
52
|
+
dataTestId = _ref['data-testid'],
|
|
53
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
54
|
+
const _useFormField = useFormField(),
|
|
55
|
+
register = _useFormField.register,
|
|
56
|
+
fieldErrors = _useFormField.fieldErrors;
|
|
56
57
|
|
|
57
58
|
// generate props only if a name is passed and used inside a Form
|
|
58
59
|
const registerProps = name && register ? register(name, {
|
|
@@ -66,8 +67,14 @@ const Dropdown = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
66
67
|
const listRef = useRef(null);
|
|
67
68
|
let dropdownButton = /*#__PURE__*/React__default.createElement(DropdownButton, null);
|
|
68
69
|
let dropdownList = /*#__PURE__*/React__default.createElement(DropdownList, null);
|
|
69
|
-
const
|
|
70
|
-
|
|
70
|
+
const _useControllableState = useControllableState('', onSearchValueChange, externalSearchValue),
|
|
71
|
+
_useControllableState2 = _slicedToArray(_useControllableState, 2),
|
|
72
|
+
searchValue = _useControllableState2[0],
|
|
73
|
+
setSearchValue = _useControllableState2[1];
|
|
74
|
+
const _useState = useState(),
|
|
75
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
76
|
+
searchHeight = _useState2[0],
|
|
77
|
+
setSearchHeight = _useState2[1];
|
|
71
78
|
React__default.Children.forEach(children, child => {
|
|
72
79
|
if (/*#__PURE__*/React__default.isValidElement(child)) {
|
|
73
80
|
switch (child === null || child === void 0 ? void 0 : child.type) {
|
|
@@ -87,12 +94,30 @@ const Dropdown = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
87
94
|
const buttonLabelId = label ? "".concat(buttonId, "-label") : undefined;
|
|
88
95
|
const dialogId = (_dropdownList$props$i = (_dropdownList$props = dropdownList.props) === null || _dropdownList$props === void 0 ? void 0 : _dropdownList$props.id) !== null && _dropdownList$props$i !== void 0 ? _dropdownList$props$i : "".concat(containerId, "-list");
|
|
89
96
|
const listboxId = "".concat(containerId, "-listbox");
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
const
|
|
95
|
-
|
|
97
|
+
const _useControllableState3 = useControllableState(false, onIsOpenChange, externalIsOpen),
|
|
98
|
+
_useControllableState4 = _slicedToArray(_useControllableState3, 2),
|
|
99
|
+
isOpen = _useControllableState4[0],
|
|
100
|
+
setIsOpen = _useControllableState4[1];
|
|
101
|
+
const _useControllableState5 = useControllableState(defaultValue, onChange, externalValue !== null && externalValue !== void 0 ? externalValue : registerProps === null || registerProps === void 0 ? void 0 : registerProps.value),
|
|
102
|
+
_useControllableState6 = _slicedToArray(_useControllableState5, 2),
|
|
103
|
+
value = _useControllableState6[0],
|
|
104
|
+
setValue = _useControllableState6[1];
|
|
105
|
+
const _useState3 = useState(0),
|
|
106
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
107
|
+
selectedIndex = _useState4[0],
|
|
108
|
+
setSelectedIndex = _useState4[1];
|
|
109
|
+
const _useControllableState7 = useControllableState(-1, onHighlightedIndexChange, externalHighlightedIndex),
|
|
110
|
+
_useControllableState8 = _slicedToArray(_useControllableState7, 2),
|
|
111
|
+
highlightedIndex = _useControllableState8[0],
|
|
112
|
+
setHighlightedIndex = _useControllableState8[1];
|
|
113
|
+
const _useState5 = useState(),
|
|
114
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
115
|
+
minWidth = _useState6[0],
|
|
116
|
+
setMinWidth = _useState6[1];
|
|
117
|
+
const _useState7 = useState([]),
|
|
118
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
119
|
+
options = _useState8[0],
|
|
120
|
+
setOptions = _useState8[1];
|
|
96
121
|
useDidUpdate(() => {
|
|
97
122
|
if (!isOpen) {
|
|
98
123
|
setSearchValue('');
|
|
@@ -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 = {"container":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._4ZkMG{max-width:100%;position:relative;display:inline-block}._oEIv4{width:100%}._2IHmg{display:inline-flex;justify-content:space-between;align-items:center;background-color:#fafafa;border:1px solid #898989;border-radius:4px;height:36px;color:#515559;outline:none;cursor:pointer}._2IHmg:hover:not([aria-disabled=true]){cursor:pointer;background-color:#f5f5f5}._2IHmg:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88;background-color:#fafafa}._2IHmg:disabled,._2IHmg[aria-disabled=true]{color:#74777a;border-color:#e5e5e5;cursor:not-allowed}._2IHmg._UFGeN{border-color:#b00}._2IHmg._UFGeN:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000}._2IHmg._5R-lZ{min-width:120px;padding:0 4px 0 12px}._2IHmg._-ke7c{margin-top:4px}._2IHmg._OttER:not([aria-disabled=true]):not(:disabled){color:#32363a}._2IHmg ._TJQAu{min-height:10px}._2IHmg ._TJQAu._rnuJy{line-height:20px;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._2IHmg ._TJQAu._Aikuv{display:inline-flex;align-items:center}._2IHmg ._GOvhz{height:24px;width:24px;border-radius:4px;fill:#515559;flex-shrink:0;cursor:pointer}._2IHmg ._GOvhz._wPxoz{border-color:#e5e5e5;fill:#9d9fa1;opacity:.4;cursor:not-allowed}._2IHmg ._GOvhz._S2C8h{transform:rotate(-180deg)}._PBnEX[aria-disabled=true]{cursor:not-allowed;color:rgba(81,85,89,.65);fill:#9d9fa1}._R1g0D{position:-webkit-sticky;position:sticky;top:0;z-index:20;padding:4px 8px 8px!important;border-bottom:1px solid #e8e8e8;border-radius:4px 4px 0 0;background-color:#fff!important}._3iBeB{min-height:40px;padding:10px 12px;display:flex;flex-direction:row;align-items:center;background-color:#fff;font-size:14px;color:#32363a;word-break:break-word}._B5R4z{fill:#515559}._Dp3mk{margin:2px 12px 2px 0}._Dp3mk._nwEKs>svg{border-color:#0b6ed0}._Jk3bA{width:100%}";
|
|
4
|
+
var styles = {"container":"_4ZkMG","formFieldWrapper":"_oEIv4","button":"_2IHmg","invalid":"_UFGeN","hasText":"_5R-lZ","labelled":"_-ke7c","selected":"_OttER","buttonLabel":"_TJQAu","isString":"_rnuJy","isNode":"_Aikuv","icon":"_GOvhz","disabled":"_wPxoz","open":"_S2C8h","option":"_PBnEX","search":"_R1g0D","emptyOption":"_3iBeB","searchIcon":"_B5R4z","checkbox":"_Dp3mk","highlighted":"_nwEKs","searchInput":"_Jk3bA"};
|
|
5
|
+
var stylesheet="._4ZkMG{max-width:100%;position:relative;display:inline-block}._oEIv4{width:100%}._2IHmg{display:inline-flex;justify-content:space-between;align-items:center;background-color:#fafafa;border:1px solid #898989;border-radius:4px;height:36px;color:#515559;outline:none;cursor:pointer}._2IHmg:hover:not([aria-disabled=true]){cursor:pointer;background-color:#f5f5f5}._2IHmg:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88;background-color:#fafafa}._2IHmg:disabled,._2IHmg[aria-disabled=true]{color:#74777a;border-color:#e5e5e5;cursor:not-allowed}._2IHmg._UFGeN{border-color:#b00}._2IHmg._UFGeN:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000}._2IHmg._5R-lZ{min-width:120px;padding:0 4px 0 12px}._2IHmg._-ke7c{margin-top:4px}._2IHmg._OttER:not([aria-disabled=true]):not(:disabled){color:#32363a}._2IHmg ._TJQAu{min-height:10px}._2IHmg ._TJQAu._rnuJy{line-height:20px;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._2IHmg ._TJQAu._Aikuv{display:inline-flex;align-items:center}._2IHmg ._GOvhz{height:24px;width:24px;border-radius:4px;fill:#515559;flex-shrink:0;cursor:pointer}._2IHmg ._GOvhz._wPxoz{border-color:#e5e5e5;fill:#9d9fa1;opacity:.4;cursor:not-allowed}._2IHmg ._GOvhz._S2C8h{transform:rotate(-180deg)}._PBnEX[aria-disabled=true]{cursor:not-allowed;color:rgba(81,85,89,.65);fill:#9d9fa1}._R1g0D{position:-webkit-sticky;position:sticky;top:0;z-index:20;padding:4px 8px 8px!important;border-bottom:1px solid #e8e8e8;border-radius:4px 4px 0 0;background-color:#fff!important}._3iBeB{min-height:40px;padding:10px 12px;display:flex;flex-direction:row;align-items:center;background-color:#fff;font-size:14px;color:#32363a;word-break:break-word}._B5R4z{fill:#515559}._Dp3mk{margin:2px 12px 2px 0}._Dp3mk._nwEKs>svg{border-color:#0b6ed0}._Jk3bA{width:100%}";
|
|
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 };
|