@qualtrics/ui-react 2.75.0 → 2.77.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.
Files changed (175) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/__node_modules/@radix-ui/primitive/dist/index.js +54 -0
  3. package/dist/__node_modules/@radix-ui/react-arrow/dist/index.js +28 -0
  4. package/dist/__node_modules/@radix-ui/react-collection/dist/index.js +605 -0
  5. package/dist/__node_modules/@radix-ui/react-compose-refs/dist/index.js +45 -0
  6. package/dist/__node_modules/@radix-ui/react-context/dist/index.js +108 -0
  7. package/dist/__node_modules/@radix-ui/react-direction/dist/index.js +21 -0
  8. package/dist/__node_modules/@radix-ui/react-dismissable-layer/dist/index.js +223 -0
  9. package/dist/__node_modules/@radix-ui/react-dropdown-menu/dist/index.js +350 -0
  10. package/dist/__node_modules/@radix-ui/react-focus-guards/dist/index.js +35 -0
  11. package/dist/__node_modules/@radix-ui/react-focus-scope/dist/index.js +248 -0
  12. package/dist/__node_modules/@radix-ui/react-id/dist/index.js +15 -0
  13. package/dist/__node_modules/@radix-ui/react-menu/dist/index.js +911 -0
  14. package/dist/__node_modules/@radix-ui/react-popper/dist/index.js +325 -0
  15. package/dist/__node_modules/@radix-ui/react-portal/dist/index.js +25 -0
  16. package/dist/__node_modules/@radix-ui/react-presence/dist/index.js +141 -0
  17. package/dist/__node_modules/@radix-ui/react-primitive/dist/index.js +34 -0
  18. package/dist/__node_modules/@radix-ui/react-roving-focus/dist/index.js +216 -0
  19. package/dist/__node_modules/@radix-ui/react-slot/dist/index.js +127 -0
  20. package/dist/__node_modules/@radix-ui/react-use-callback-ref/dist/index.js +18 -0
  21. package/dist/__node_modules/@radix-ui/react-use-controllable-state/dist/index.js +141 -0
  22. package/dist/__node_modules/@radix-ui/react-use-effect-event/dist/index.js +32 -0
  23. package/dist/__node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +23 -0
  24. package/dist/__node_modules/@radix-ui/react-use-layout-effect/dist/index.js +6 -0
  25. package/dist/__node_modules/@radix-ui/react-use-size/dist/index.js +48 -0
  26. package/dist/__node_modules/aria-hidden/dist/es2015/index.js +169 -0
  27. package/dist/__node_modules/detect-node-es/esm/node.js +4 -0
  28. package/dist/__node_modules/get-nonce/dist/es2015/index.js +15 -0
  29. package/dist/__node_modules/react-remove-scroll/dist/es2015/Combination.js +9 -0
  30. package/dist/__node_modules/react-remove-scroll/dist/es2015/SideEffect.js +169 -0
  31. package/dist/__node_modules/react-remove-scroll/dist/es2015/UI.js +39 -0
  32. package/dist/__node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +21 -0
  33. package/dist/__node_modules/react-remove-scroll/dist/es2015/handleScroll.js +110 -0
  34. package/dist/__node_modules/react-remove-scroll/dist/es2015/index.js +1 -0
  35. package/dist/__node_modules/react-remove-scroll/dist/es2015/medium.js +6 -0
  36. package/dist/__node_modules/react-remove-scroll/dist/es2015/sidecar.js +8 -0
  37. package/dist/__node_modules/react-remove-scroll-bar/dist/es2015/component.js +57 -0
  38. package/dist/__node_modules/react-remove-scroll-bar/dist/es2015/constants.js +10 -0
  39. package/dist/__node_modules/react-remove-scroll-bar/dist/es2015/index.js +3 -0
  40. package/dist/__node_modules/react-remove-scroll-bar/dist/es2015/utils.js +31 -0
  41. package/dist/__node_modules/react-style-singleton/dist/es2015/component.js +19 -0
  42. package/dist/__node_modules/react-style-singleton/dist/es2015/hook.js +25 -0
  43. package/dist/__node_modules/react-style-singleton/dist/es2015/index.js +3 -0
  44. package/dist/__node_modules/react-style-singleton/dist/es2015/singleton.js +51 -0
  45. package/dist/__node_modules/tslib/tslib.es6.js +403 -0
  46. package/dist/__node_modules/use-callback-ref/dist/es2015/assignRef.js +24 -0
  47. package/dist/__node_modules/use-callback-ref/dist/es2015/createRef.js +25 -0
  48. package/dist/__node_modules/use-callback-ref/dist/es2015/index.js +8 -0
  49. package/dist/__node_modules/use-callback-ref/dist/es2015/mergeRef.js +21 -0
  50. package/dist/__node_modules/use-callback-ref/dist/es2015/refToCallback.js +50 -0
  51. package/dist/__node_modules/use-callback-ref/dist/es2015/transformRef.js +17 -0
  52. package/dist/__node_modules/use-callback-ref/dist/es2015/useMergeRef.js +48 -0
  53. package/dist/__node_modules/use-callback-ref/dist/es2015/useRef.js +42 -0
  54. package/dist/__node_modules/use-callback-ref/dist/es2015/useTransformRef.js +21 -0
  55. package/dist/__node_modules/use-sidecar/dist/es2015/config.js +8 -0
  56. package/dist/__node_modules/use-sidecar/dist/es2015/env.js +8 -0
  57. package/dist/__node_modules/use-sidecar/dist/es2015/exports.js +21 -0
  58. package/dist/__node_modules/use-sidecar/dist/es2015/hoc.js +18 -0
  59. package/dist/__node_modules/use-sidecar/dist/es2015/hook.js +44 -0
  60. package/dist/__node_modules/use-sidecar/dist/es2015/index.js +6 -0
  61. package/dist/__node_modules/use-sidecar/dist/es2015/medium.js +81 -0
  62. package/dist/__node_modules/use-sidecar/dist/es2015/renderProp.js +38 -0
  63. package/dist/__shared/cjs/{index-98bc748b.js → index-58d973dc.js} +3 -3
  64. package/dist/__shared/cjs/{index-9f6415a6.js → index-fd8ffec5.js} +409 -372
  65. package/dist/components/Accordion/Accordion2.js +3 -3
  66. package/dist/components/BreakpointSwitch/BreakpointSwitch.js +3 -2
  67. package/dist/components/Button/Button.js +3 -3
  68. package/dist/components/ButtonGroup/ButtonGroup.js +3 -2
  69. package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
  70. package/dist/components/Checkbox/Checkbox2.js +3 -3
  71. package/dist/components/ColorPicker/ColorPicker.js +7 -8
  72. package/dist/components/ColorPicker/ColorPicker2.js +3 -3
  73. package/dist/components/Combobox/Combobox.js +9 -8
  74. package/dist/components/Combobox/Combobox2.js +3 -3
  75. package/dist/components/Combobox/ComboboxList.js +5 -6
  76. package/dist/components/ConfigPane/ConfigPane2.js +3 -3
  77. package/dist/components/Divider/Divider2.js +3 -3
  78. package/dist/components/Dropdown/Dropdown.js +1 -1
  79. package/dist/components/Dropdown/Dropdown2.js +3 -3
  80. package/dist/components/Dropdown/DropdownButton.js +10 -9
  81. package/dist/components/Dropdown/DropdownList.js +6 -7
  82. package/dist/components/FilePicker/FilePicker2.js +3 -3
  83. package/dist/components/FormField/Caption.js +3 -3
  84. package/dist/components/FormField/FormField2.js +3 -3
  85. package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
  86. package/dist/components/IconButton/IconButton2.js +3 -3
  87. package/dist/components/InlineInput/InlineInput2.js +3 -3
  88. package/dist/components/Input/Input2.js +3 -3
  89. package/dist/components/InputGroup/InputGroup2.js +3 -3
  90. package/dist/components/Label/Label2.js +3 -3
  91. package/dist/components/Link/Link2.js +3 -3
  92. package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
  93. package/dist/components/LogicEditor/ConditionSet.js +2 -2
  94. package/dist/components/LogicEditor/LogicEditor2.js +3 -3
  95. package/dist/components/Modal/Modal.js +4 -2
  96. package/dist/components/Modal/Modal2.js +3 -3
  97. package/dist/components/NewMenu/BaseMenu.js +31 -25
  98. package/dist/components/NewMenu/Menu/Menu.js +1 -0
  99. package/dist/components/NewMenu/NewMenu.js +3 -3
  100. package/dist/components/NewMenu/SelectMenu/SelectMenu.js +3 -1
  101. package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +10 -4
  102. package/dist/components/NewMenu/parts/MenuItem.js +1 -1
  103. package/dist/components/NumberStepper/NumberStepper2.js +3 -3
  104. package/dist/components/PageLayout/PageLayout.js +3 -3
  105. package/dist/components/Pagination/Pagination2.js +3 -3
  106. package/dist/components/Popover/Popover.js +8 -14
  107. package/dist/components/Popover/Popover2.js +3 -3
  108. package/dist/components/QuickSearch/QuickSearch2.js +3 -3
  109. package/dist/components/Radio/Radio2.js +3 -3
  110. package/dist/components/SearchInput/SearchInput2.js +3 -3
  111. package/dist/components/SidebarNav/SidebarNav2.js +3 -3
  112. package/dist/components/Slider/Slider2.js +3 -3
  113. package/dist/components/Switch/Switch2.js +3 -3
  114. package/dist/components/Table/Table2.js +3 -3
  115. package/dist/components/Tabs/TabList.js +3 -2
  116. package/dist/components/Tabs/TabPanels.js +2 -1
  117. package/dist/components/Tabs/Tabs2.js +3 -3
  118. package/dist/components/Tooltip/Tooltip.js +6 -12
  119. package/dist/components/Tooltip/Tooltip2.js +3 -3
  120. package/dist/components/deprecated_ColorPicker/ColorPicker.js +5 -6
  121. package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
  122. package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
  123. package/dist/components/deprecated_Tabs/Tabs.js +3 -3
  124. package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
  125. package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
  126. package/dist/design-tokens/less/typography.js +3 -3
  127. package/dist/hooks/useOverlay/useOverlay2.js +3 -3
  128. package/dist/hooks/usePrevious/usePrevious.js +1 -1
  129. package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement.js +2 -2
  130. package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
  131. package/dist/icons/Icon.js +3 -3
  132. package/dist/icons/index.js +1 -1
  133. package/dist/index.d.ts +18 -17
  134. package/dist/index.es.js +1 -1
  135. package/dist/index.js +4 -5
  136. package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
  137. package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
  138. package/dist/next/Combobox/Combobox2.js +3 -3
  139. package/dist/next/Combobox/ComboboxFlyout.js +6 -6
  140. package/dist/next/Combobox/hooks/useComboboxFocusSequence/useComboboxFocusSequence.js +1 -1
  141. package/dist/next/Combobox/hooks/useComboboxLoadingState/useComboboxLoadingState.js +1 -1
  142. package/dist/next/Drawer/Drawer2.js +3 -3
  143. package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
  144. package/dist/next/Form/FormFields/InputField.js +3 -3
  145. package/dist/next/Indicator/Indicator2.js +3 -3
  146. package/dist/next/Input/Input2.js +3 -3
  147. package/dist/next/LoadingSpinner/LoadingSpinner2.js +3 -3
  148. package/dist/next/Menu/Hooks/usePaneSearch.js +1 -1
  149. package/dist/next/Menu/Menu.js +5 -3
  150. package/dist/next/Menu/Menu2.js +3 -3
  151. package/dist/next/Menu/MenuButton.js +1 -1
  152. package/dist/next/Menu/MenuItem.js +2 -2
  153. package/dist/next/Menu/MenuPane.js +14 -7
  154. package/dist/next/Menu/SubMenu.js +8 -6
  155. package/dist/next/PhoneNumberInput/PhoneNumberInput.js +90 -41
  156. package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
  157. package/dist/next/Select/Select.js +4 -2
  158. package/dist/next/Select/Select2.js +3 -3
  159. package/dist/next/SplitButton/SplitButton2.js +3 -3
  160. package/dist/next/TimePicker/TimeDropdown.js +5 -6
  161. package/dist/next/TimePicker/TimeInput.js +104 -37
  162. package/dist/next/TimePicker/TimePicker2.js +3 -3
  163. package/dist/next/ToggleButton/styles.js +3 -3
  164. package/dist/next/index.d.ts +19 -13
  165. package/dist/next/index.js +5617 -330
  166. package/dist/utils/Flyout/Flyout2.js +3 -3
  167. package/dist/utils/GridChildrenWrapper/GridChildrenWrapper.js +2 -1
  168. package/dist/utils/Popper/Popper.js +149 -115
  169. package/dist/utils/Portal/Portal.js +3 -2
  170. package/dist/utils/Text/Text.js +3 -2
  171. package/dist/utils/filterChildren/filterChildren.js +3 -2
  172. package/dist/utils/index.js +1 -0
  173. package/icons/package.json +3 -4
  174. package/next/package.json +4 -5
  175. package/package.json +15 -16
@@ -1,7 +1,6 @@
1
1
  import { AllHTMLAttributes } from 'react';
2
2
  import type { ChangeEvent } from 'react';
3
3
  import { ChangeEventHandler } from 'react';
4
- import { ComputedPlacement } from '@popperjs/core';
5
4
  import { CountryCode } from 'libphonenumber-js';
6
5
  import { CSSProperties } from 'react';
7
6
  import { E164Number } from 'libphonenumber-js';
@@ -10,6 +9,7 @@ import { FormEvent } from 'react';
10
9
  import { FunctionComponent } from 'react';
11
10
  import { HTMLAttributes } from 'react';
12
11
  import type { InputHTMLAttributes } from 'react';
12
+ import { JSX as JSX_2 } from 'react';
13
13
  import { MouseEventHandler } from 'react';
14
14
  import { MutableRefObject } from 'react';
15
15
  import { default as React_2 } from 'react';
@@ -425,7 +425,7 @@ export declare interface CollectionGridProps extends CollectionGridItemProps {
425
425
  gap?: React_2.CSSProperties['gap'];
426
426
  }
427
427
 
428
- export declare function Combobox({ initialValue, value, onChange, onSubmit, isDisabled, isInvalid, isRequired, isLoading, isOpen: externalIsOpen, onIsOpenChange: externalOnIsOpenChange, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'data-testid': dataTestId, children, }: ComboboxProps): JSX.Element;
428
+ export declare function Combobox({ initialValue, value, onChange, onSubmit, isDisabled, isInvalid, isRequired, isLoading, isOpen: externalIsOpen, onIsOpenChange: externalOnIsOpenChange, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'data-testid': dataTestId, children, }: ComboboxProps): React_2.ReactElement;
429
429
 
430
430
  export declare const ComboboxFlyout: FunctionComponent<ComboboxFlyoutProps>;
431
431
 
@@ -440,7 +440,7 @@ export declare interface ComboboxFlyoutProps {
440
440
  'aria-describedby'?: string;
441
441
  }
442
442
 
443
- export declare function ComboboxGroup({ label, 'aria-describedby': ariaDescribedBy, children, }: ComboboxGroupProps): JSX.Element;
443
+ export declare function ComboboxGroup({ label, 'aria-describedby': ariaDescribedBy, children, }: ComboboxGroupProps): React_2.ReactElement;
444
444
 
445
445
  export declare interface ComboboxGroupProps {
446
446
  /** The `ComboboxOption`s. */
@@ -477,7 +477,7 @@ export declare interface ComboboxInputProps {
477
477
  'aria-describedby'?: string;
478
478
  }
479
479
 
480
- export declare function ComboboxOption({ label }: ComboboxOptionProps): JSX.Element | null;
480
+ export declare function ComboboxOption({ label }: ComboboxOptionProps): React_2.ReactElement | null;
481
481
 
482
482
  export declare interface ComboboxOptionProps {
483
483
  /** Rendered as text that represents the name of the option. The label needs to be unique across all `ComboboxOption`s for a given `Combobox` instance. */
@@ -641,7 +641,7 @@ declare interface DropdownListProps extends React_2.AllHTMLAttributes<HTMLDivEle
641
641
  * Where to prioritize placement of the `DropdownList` relative to the `DropdownButton`.
642
642
  * @defaultValue 'bottom-start'
643
643
  */
644
- placement?: ComputedPlacement;
644
+ placement?: Placement;
645
645
  /** Handler to be called when a keyboard key is pressed down. */
646
646
  onKeyDown?: (event: React_2.KeyboardEvent<HTMLDivElement>) => void;
647
647
  /**
@@ -887,7 +887,7 @@ export declare interface LoadingSpinnerProps extends Omit<React_2.AllHTMLAttribu
887
887
  }
888
888
 
889
889
  export declare const Menu: {
890
- ({ "data-testid": dataTestId, isOpen, onIsOpenChange, isDisabled, children, isVirtualizationDisabled, }: MenuProps): JSX.Element;
890
+ ({ "data-testid": dataTestId, isOpen, onIsOpenChange, isDisabled, children, isVirtualizationDisabled, elementRefToFocusOnClose, }: MenuProps): React_2.ReactElement;
891
891
  displayName: string;
892
892
  };
893
893
 
@@ -927,7 +927,7 @@ export declare interface MenuPaneProps extends AllHTMLAttributes<HTMLDivElement>
927
927
  /** Defines where to prioritize placement of the pane. A demo of this behavior is available [here](https://popper.js.org/).
928
928
  * @defaultValue "bottom-start"
929
929
  */
930
- placement?: ComputedPlacement;
930
+ placement?: Placement;
931
931
  /** Determines whether or not to include search functionality.
932
932
  * @defaultValue false
933
933
  */
@@ -963,6 +963,8 @@ export declare interface MenuProps {
963
963
  * @defaultValue false
964
964
  */
965
965
  isVirtualizationDisabled?: boolean;
966
+ /** An element ref to focus when the menu closes. If this prop is not used, focus returns to the `MenuButton`. */
967
+ elementRefToFocusOnClose?: React_2.RefObject<HTMLElement | null>;
966
968
  /** Forwarded to all component parts with the following suffixes:
967
969
  * - `MenuButton`: `-menubutton`
968
970
  * - `MenuPane`: `-menupane`
@@ -988,7 +990,7 @@ declare type OnChange<V extends Values> = (fieldValue: V[keyof V]) => void;
988
990
  declare type OnSubmit = (values?: Values, event?: FormEvent<HTMLFormElement>) => Promise<void> | void;
989
991
 
990
992
  export declare const Pagination: {
991
- ({ hidePageNumber, hideFirstAndLastButtons, numPages, currentPage, onPageChange, isDisabled, "data-testid": dataTestId, }: PaginationProps): JSX.Element;
993
+ ({ hidePageNumber, hideFirstAndLastButtons, numPages, currentPage, onPageChange, isDisabled, "data-testid": dataTestId, }: PaginationProps): React_2.ReactElement;
992
994
  displayName: string;
993
995
  };
994
996
 
@@ -1063,6 +1065,8 @@ export declare interface PhoneNumberInputProps {
1063
1065
  inputId?: string;
1064
1066
  }
1065
1067
 
1068
+ declare type Placement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'right' | 'right-start' | 'right-end' | 'left' | 'left-start' | 'left-end';
1069
+
1066
1070
  declare interface RadioRegisterProps<V extends Values> {
1067
1071
  name: keyof V;
1068
1072
  type: 'radio';
@@ -1091,7 +1095,7 @@ declare type Register<V extends Values> = {
1091
1095
 
1092
1096
  declare type RenderCellContent = AdvancedTableColumnConfig['renderCellContent'];
1093
1097
 
1094
- export declare const RowDisplayCount: ({ "data-testid": dataTestId, displayCount, displayCountOptions, onDisplayCountChange, isDisabled, }: RowDisplayCountProps) => JSX.Element;
1098
+ export declare const RowDisplayCount: ({ "data-testid": dataTestId, displayCount, displayCountOptions, onDisplayCountChange, isDisabled, }: RowDisplayCountProps) => React_2.ReactElement;
1095
1099
 
1096
1100
  export declare interface RowDisplayCountProps {
1097
1101
  /** The number of rows to show in pagination. */
@@ -1111,7 +1115,7 @@ export declare interface RowDisplayCountProps {
1111
1115
  }
1112
1116
 
1113
1117
  export declare const Select: {
1114
- ({ multiselect, children, isDisabled, onChange, isOpen, onIsOpenChange, value, isInvalid, "data-testid": dataTestId, isVirtualizationDisabled, }: SelectProps): JSX.Element;
1118
+ ({ multiselect, children, isDisabled, onChange, isOpen, onIsOpenChange, value, isInvalid, "data-testid": dataTestId, isVirtualizationDisabled, elementRefToFocusOnClose, }: SelectProps): React_2.ReactElement;
1115
1119
  displayName: string;
1116
1120
  };
1117
1121
 
@@ -1147,7 +1151,7 @@ export declare interface SelectPaneProps extends AllHTMLAttributes<HTMLDivElemen
1147
1151
  /** Defines where to prioritize placement of the pane.
1148
1152
  * @defaultValue 'bottom-start'
1149
1153
  */
1150
- placement?: ComputedPlacement;
1154
+ placement?: Placement;
1151
1155
  /** Determines whether or not to include search functionality.
1152
1156
  * @defaultValue false
1153
1157
  */
@@ -1210,6 +1214,8 @@ export declare interface SelectProps {
1210
1214
  * @defaultValue false
1211
1215
  */
1212
1216
  isVirtualizationDisabled?: boolean;
1217
+ /** An element ref to focus when the select closes. If this prop is not used, focus returns to the `SelectButton`. */
1218
+ elementRefToFocusOnClose?: React_2.RefObject<HTMLElement | null>;
1213
1219
  }
1214
1220
 
1215
1221
  export declare const SplitButton: React_2.ForwardRefExoticComponent<SplitButtonProps & React_2.RefAttributes<HTMLDivElement>>;
@@ -1477,7 +1483,7 @@ declare interface TooltipProps_2 extends Omit<React_2.AllHTMLAttributes<HTMLDivE
1477
1483
  /** Dictates the position of the tooltip relative to its anchor.
1478
1484
  * @defaultValue 'top'
1479
1485
  */
1480
- placement?: ComputedPlacement;
1486
+ placement?: Placement;
1481
1487
  /** If true, removes the arrow from the tooltip.
1482
1488
  * @defaultValue false
1483
1489
  */
@@ -1542,7 +1548,7 @@ export declare interface TypographyProps extends HTMLAttributes<HTMLElement> {
1542
1548
  declare type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'body';
1543
1549
 
1544
1550
  export declare function useForm<V extends Values>({ initialValues, validateField, }: UseFormOptions<V>): {
1545
- Form: (props: FormProps) => JSX.Element;
1551
+ Form: (props: FormProps) => JSX_2.Element;
1546
1552
  register: {
1547
1553
  (name: keyof V, options: {
1548
1554
  type: "text" | "email" | "password";