@qualtrics/ui-react 2.18.0 → 2.19.1

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 (267) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/__shared/cjs/{index-00992312.js → index-384184bd.js} +994 -1872
  3. package/dist/__shared/cjs/{index-615ed9b2.js → index-4a5425cc.js} +10 -7
  4. package/dist/components/Accordion/Accordion.js +1 -5
  5. package/dist/components/Accordion/Accordion2.js +3 -3
  6. package/dist/components/Accordion/AccordionHeader.js +4 -8
  7. package/dist/components/Accordion/AccordionPanel.js +3 -3
  8. package/dist/components/BreakpointSwitch/Breakpoint.js +0 -2
  9. package/dist/components/BreakpointSwitch/BreakpointSwitch.js +0 -3
  10. package/dist/components/Button/Button.js +3 -3
  11. package/dist/components/Button/Button2.js +2 -7
  12. package/dist/components/ButtonGroup/ButtonGroup.js +1 -2
  13. package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
  14. package/dist/components/Checkbox/Checkbox.js +11 -11
  15. package/dist/components/Checkbox/Checkbox2.js +3 -3
  16. package/dist/components/Checkbox/VisualCheckbox.js +1 -1
  17. package/dist/components/Checkbox/VisualCheckbox2.js +3 -3
  18. package/dist/components/ColorPicker/Alpha.js +9 -30
  19. package/dist/components/ColorPicker/ColorPicker.js +33 -42
  20. package/dist/components/ColorPicker/ColorPicker2.js +3 -3
  21. package/dist/components/ColorPicker/ColorPickerFlyout.js +2 -1
  22. package/dist/components/ColorPicker/ColorPickerFlyoutInputs.js +20 -23
  23. package/dist/components/ColorPicker/Hue.js +2 -19
  24. package/dist/components/ColorPicker/Palette.js +7 -27
  25. package/dist/components/ColorPicker/Saturation.js +8 -29
  26. package/dist/components/ColorPicker/utils/calculateTargetId.js +10 -20
  27. package/dist/components/ColorPicker/utils/getMousePosition.js +4 -3
  28. package/dist/components/ColorPicker/utils/hexToHsv.js +0 -5
  29. package/dist/components/ColorPicker/utils/hexToRgbaString.js +2 -4
  30. package/dist/components/ColorPicker/utils/hsvToHex.js +0 -3
  31. package/dist/components/ColorPicker/utils/rgbToHex.js +1 -1
  32. package/dist/components/ColorPicker/utils/validateHex.js +12 -19
  33. package/dist/components/Combobox/Combobox.js +57 -127
  34. package/dist/components/Combobox/Combobox2.js +3 -3
  35. package/dist/components/Combobox/ComboboxHeader.js +1 -1
  36. package/dist/components/Combobox/ComboboxIcon.js +2 -4
  37. package/dist/components/Combobox/ComboboxInput.js +4 -5
  38. package/dist/components/Combobox/ComboboxList.js +2 -2
  39. package/dist/components/ConfigPane/ConfigPane.js +0 -7
  40. package/dist/components/ConfigPane/ConfigPane2.js +3 -3
  41. package/dist/components/Divider/Divider2.js +3 -3
  42. package/dist/components/Dropdown/ChildIndexContext/index.js +0 -1
  43. package/dist/components/Dropdown/ChildIndexContext/reach-descendants.js +34 -30
  44. package/dist/components/Dropdown/Dropdown.js +17 -68
  45. package/dist/components/Dropdown/Dropdown2.js +3 -3
  46. package/dist/components/Dropdown/DropdownButton.js +23 -33
  47. package/dist/components/Dropdown/DropdownHeader.js +2 -1
  48. package/dist/components/Dropdown/DropdownList.js +8 -7
  49. package/dist/components/Dropdown/DropdownOption.js +3 -10
  50. package/dist/components/Dropdown/DropdownSearch.js +6 -24
  51. package/dist/components/FilePicker/FilePicker.js +15 -26
  52. package/dist/components/FilePicker/FilePicker2.js +3 -3
  53. package/dist/components/FormField/Caption.js +3 -3
  54. package/dist/components/FormField/FormField.js +2 -2
  55. package/dist/components/FormField/FormField2.js +3 -3
  56. package/dist/components/FormField/FormFieldContext.js +3 -6
  57. package/dist/components/FormField/ReadOnlyText.js +2 -1
  58. package/dist/components/FullScreenTakeover/FullScreenTakeover.js +5 -11
  59. package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
  60. package/dist/components/Icon/Icon.js +3 -6
  61. package/dist/components/Icon/IconTypes.js +1 -0
  62. package/dist/components/IconButton/IconButton.js +1 -6
  63. package/dist/components/IconButton/IconButton2.js +3 -3
  64. package/dist/components/InlineInput/InlineInput.js +16 -33
  65. package/dist/components/InlineInput/InlineInput2.js +3 -3
  66. package/dist/components/Input/Input.js +3 -2
  67. package/dist/components/Input/Input2.js +3 -3
  68. package/dist/components/Input/InputField.js +2 -5
  69. package/dist/components/InputGroup/InputGroup2.js +3 -3
  70. package/dist/components/InputGroup/InputGroupProvider.js +0 -2
  71. package/dist/components/Label/Label2.js +3 -3
  72. package/dist/components/Link/Link2.js +3 -3
  73. package/dist/components/LoadingSpinner/LoadingSpinner.js +1 -1
  74. package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
  75. package/dist/components/LogicEditor/ConditionContainer.js +0 -2
  76. package/dist/components/LogicEditor/ConditionSet.js +8 -25
  77. package/dist/components/LogicEditor/Controls.js +2 -2
  78. package/dist/components/LogicEditor/LogicEditor.js +3 -12
  79. package/dist/components/LogicEditor/LogicEditor2.js +3 -3
  80. package/dist/components/LogicEditor/utils.js +9 -34
  81. package/dist/components/Modal/Modal.js +22 -35
  82. package/dist/components/Modal/Modal2.js +3 -3
  83. package/dist/components/NewMenu/BaseMenu.js +43 -108
  84. package/dist/components/NewMenu/NewMenu.js +3 -3
  85. package/dist/components/NewMenu/SelectMenu/SelectMenu.js +2 -3
  86. package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +20 -32
  87. package/dist/components/NewMenu/parts/MenuItem.js +2 -3
  88. package/dist/components/NewMenu/parts/MenuSearchBox.js +2 -1
  89. package/dist/components/NumberStepper/NumberStepper.js +29 -44
  90. package/dist/components/NumberStepper/NumberStepper2.js +3 -3
  91. package/dist/components/NumberStepper/NumberStepperDecrement.js +6 -5
  92. package/dist/components/NumberStepper/NumberStepperIncrement.js +6 -5
  93. package/dist/components/NumberStepper/NumberStepperInput.js +10 -12
  94. package/dist/components/PageLayout/PageLayout.js +3 -3
  95. package/dist/components/Pagination/Pagination.js +10 -6
  96. package/dist/components/Pagination/Pagination2.js +3 -3
  97. package/dist/components/Pagination/PaginationNextButton.js +8 -8
  98. package/dist/components/Pagination/PaginationPageInput.js +17 -22
  99. package/dist/components/Pagination/PaginationPreviousButton.js +8 -8
  100. package/dist/components/Popover/Popover.js +9 -18
  101. package/dist/components/Popover/Popover2.js +3 -3
  102. package/dist/components/QuickSearch/QuickSearch.js +3 -5
  103. package/dist/components/QuickSearch/QuickSearch2.js +3 -3
  104. package/dist/components/QuickSearch/QuickSearchInput.js +6 -23
  105. package/dist/components/Radio/Radio.js +11 -13
  106. package/dist/components/Radio/Radio2.js +3 -3
  107. package/dist/components/SearchInput/SearchInput.js +5 -11
  108. package/dist/components/SearchInput/SearchInput2.js +3 -3
  109. package/dist/components/SidebarNav/ExpandCollapseButton.js +0 -2
  110. package/dist/components/SidebarNav/SidebarNav.js +5 -4
  111. package/dist/components/SidebarNav/SidebarNav2.js +3 -3
  112. package/dist/components/SidebarNav/SidebarNavLink.js +1 -4
  113. package/dist/components/Slider/RangeSlider.js +8 -22
  114. package/dist/components/Slider/Slider.js +7 -26
  115. package/dist/components/Slider/Slider2.js +3 -3
  116. package/dist/components/Slider/SliderButton.js +7 -9
  117. package/dist/components/Switch/Switch.js +11 -11
  118. package/dist/components/Switch/Switch2.js +3 -3
  119. package/dist/components/Table/Table2.js +3 -3
  120. package/dist/components/Tabs/Tab.js +3 -3
  121. package/dist/components/Tabs/TabContextProvider.js +1 -1
  122. package/dist/components/Tabs/TabList.js +9 -17
  123. package/dist/components/Tabs/TabPanel.js +3 -3
  124. package/dist/components/Tabs/TabPanels.js +0 -2
  125. package/dist/components/Tabs/Tabs2.js +3 -3
  126. package/dist/components/Tooltip/Tooltip.js +12 -41
  127. package/dist/components/Tooltip/Tooltip2.js +3 -3
  128. package/dist/components/UIProvider/PortalTargetContext.js +0 -1
  129. package/dist/components/UIProvider/UIProvider.js +2 -2
  130. package/dist/components/deprecated_ColorPicker/Alpha.js +4 -11
  131. package/dist/components/deprecated_ColorPicker/Color.js +9 -66
  132. package/dist/components/deprecated_ColorPicker/ColorPicker.js +2 -8
  133. package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
  134. package/dist/components/deprecated_ColorPicker/HexInput.js +1 -7
  135. package/dist/components/deprecated_ColorPicker/Hue.js +3 -10
  136. package/dist/components/deprecated_ColorPicker/Saturation.js +7 -14
  137. package/dist/components/deprecated_ColorPicker/Swatch.js +2 -6
  138. package/dist/components/deprecated_ColorPicker/useMouseDrag.js +0 -3
  139. package/dist/components/deprecated_NumberStepper/NumberStepper.js +14 -20
  140. package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
  141. package/dist/components/deprecated_NumberStepper/NumberStepperDecrement.js +7 -6
  142. package/dist/components/deprecated_NumberStepper/NumberStepperIncrement.js +7 -6
  143. package/dist/components/deprecated_NumberStepper/NumberStepperInput.js +16 -17
  144. package/dist/components/deprecated_Tabs/Tabs.js +9 -25
  145. package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
  146. package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
  147. package/dist/components/deprecated_Toolbar/ToolbarPanel.js +3 -3
  148. package/dist/components/deprecated_Toolbar/ToolbarPanels.js +3 -17
  149. package/dist/components/deprecated_Toolbar/ToolbarTab.js +10 -26
  150. package/dist/components/deprecated_Toolbar/ToolbarTabs.js +6 -18
  151. package/dist/hooks/useBreakpoints/useBreakpoints.js +3 -4
  152. package/dist/hooks/useClickOutside/useClickOutside.js +2 -7
  153. package/dist/hooks/useClickOutsidePortals/useClickOutsidePortals.js +3 -6
  154. package/dist/hooks/useControllableState/useControllableState.js +5 -10
  155. package/dist/hooks/useDidUpdate/useDidUpdate.js +2 -4
  156. package/dist/hooks/useEventCallback/useEventCallback.js +2 -1
  157. package/dist/hooks/useEventListener/useEventListener.js +1 -4
  158. package/dist/hooks/useFocusSequence/useFocusSequence.js +10 -17
  159. package/dist/hooks/useId/useId.js +1 -2
  160. package/dist/hooks/useIsFocused/useIsFocused.js +0 -1
  161. package/dist/hooks/useIsHovered/useIsHovered.js +0 -1
  162. package/dist/hooks/useIsTruncated/useIsTruncated.js +4 -3
  163. package/dist/hooks/useLatest/useLatest.js +0 -1
  164. package/dist/hooks/useMounted/useMounted.js +0 -1
  165. package/dist/hooks/useMouseDrag/useMouseDrag.js +0 -4
  166. package/dist/hooks/useOverlay/useOverlay.js +4 -10
  167. package/dist/hooks/useOverlay/useOverlay2.js +3 -3
  168. package/dist/hooks/usePrevious/usePrevious.js +0 -1
  169. package/dist/hooks/useResponsiveValue/useResponsiveValue.js +1 -4
  170. package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement.js +11 -16
  171. package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
  172. package/dist/icons/Icon.js +3 -3
  173. package/dist/icons/components/HeadsetIcon.js +6 -0
  174. package/dist/icons/components/PauseCircleIcon.js +1 -1
  175. package/dist/icons/createIconComponent.js +2 -3
  176. package/dist/icons/index.d.ts +2 -0
  177. package/dist/icons/index.es.js +1 -0
  178. package/dist/icons/index.js +2 -1
  179. package/dist/index.d.ts +1 -0
  180. package/dist/index.es.js +4 -3
  181. package/dist/index.js +6 -5
  182. package/dist/next/AdvancedTable/AdvancedTable.js +82 -188
  183. package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
  184. package/dist/next/AdvancedTable/AdvancedTableCell.js +4 -14
  185. package/dist/next/AdvancedTable/AdvancedTableCheckbox.js +0 -1
  186. package/dist/next/AdvancedTable/AdvancedTableColumnHeader.js +11 -41
  187. package/dist/next/AdvancedTable/AdvancedTableColumnHeaderMenu.js +8 -14
  188. package/dist/next/AdvancedTable/AdvancedTableDragPreview.js +4 -6
  189. package/dist/next/AdvancedTable/AdvancedTablePagination.js +1 -4
  190. package/dist/next/AdvancedTable/AdvancedTableRowExpandButton.js +0 -1
  191. package/dist/next/AdvancedTable/AdvancedTableTypes.js +1 -3
  192. package/dist/next/AdvancedTable/useAdvancedTableDragAndDrop.js +8 -13
  193. package/dist/next/AdvancedTable/useComputedWidth.js +1 -1
  194. package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput.js +5 -20
  195. package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
  196. package/dist/next/CollapsibleSearchInput/CollapsibleSearchInputIconButton.js +1 -1
  197. package/dist/next/Combobox/Combobox2.js +3 -3
  198. package/dist/next/Combobox/ComboboxFlyout.js +3 -3
  199. package/dist/next/Combobox/ComboboxGroup.js +1 -1
  200. package/dist/next/Combobox/ComboboxInput.js +7 -20
  201. package/dist/next/Combobox/ComboboxOption.js +5 -6
  202. package/dist/next/Combobox/hooks/useComboboxFilteredGroup/useComboboxFilteredGroup.js +4 -5
  203. package/dist/next/Combobox/hooks/useComboboxFocusSequence/useComboboxFocusSequence.js +37 -54
  204. package/dist/next/Combobox/hooks/useComboboxLoadingState/useComboboxLoadingState.js +4 -5
  205. package/dist/next/Combobox/hooks/useComboboxValue/useComboboxValue.js +5 -3
  206. package/dist/next/Combobox/hooks/useListboxFlyoutDimensions/useListboxFlyoutDimensions.js +10 -10
  207. package/dist/next/Combobox/hooks/useSelectedOptionScroll/useSelectedOptionScroll.js +1 -6
  208. package/dist/next/Combobox/hooks/useShouldRenderGroupHeader/useShouldRenderGroupHeader.js +6 -6
  209. package/dist/next/Combobox/utils/nodeRegistration/nodeRegistration.js +4 -6
  210. package/dist/next/Drawer/Drawer.js +5 -16
  211. package/dist/next/Drawer/Drawer2.js +3 -3
  212. package/dist/next/FilterAnchor/FilterAnchor.js +7 -5
  213. package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
  214. package/dist/next/Input/Input.js +5 -8
  215. package/dist/next/Input/Input2.js +3 -3
  216. package/dist/next/Menu/Menu.js +10 -23
  217. package/dist/next/Menu/Menu2.js +3 -3
  218. package/dist/next/Menu/MenuContext.js +0 -2
  219. package/dist/next/Menu/MenuItem.js +11 -15
  220. package/dist/next/Menu/MenuPane.js +11 -25
  221. package/dist/next/Menu/MenuSearch.js +15 -22
  222. package/dist/next/Menu/SubMenu.js +10 -27
  223. package/dist/next/Menu/usePaneSearch.js +2 -1
  224. package/dist/next/PhoneNumberInput/PhoneNumberInput.js +12 -19
  225. package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
  226. package/dist/next/SplitButton/SplitButton.js +6 -12
  227. package/dist/next/SplitButton/SplitButton2.js +3 -3
  228. package/dist/next/Stack/HStack.js +11 -0
  229. package/dist/next/Stack/Stack.js +95 -0
  230. package/dist/next/Stack/StackItem.js +37 -0
  231. package/dist/next/Stack/VStack.js +11 -0
  232. package/dist/next/Stack/index.js +3 -0
  233. package/dist/next/TimePicker/TimeDropdown.js +4 -5
  234. package/dist/next/TimePicker/TimeInput.js +4 -5
  235. package/dist/next/TimePicker/TimePicker.js +12 -30
  236. package/dist/next/TimePicker/TimePicker2.js +3 -3
  237. package/dist/next/TimePicker/TimePickerIcon.js +1 -3
  238. package/dist/next/TimePicker/utils.js +12 -52
  239. package/dist/next/ToggleButton/ToggleButton.js +0 -5
  240. package/dist/next/ToggleButton/ToggleButtonGroup.js +2 -1
  241. package/dist/next/ToggleButton/styles.js +3 -3
  242. package/dist/next/index.d.ts +82 -4
  243. package/dist/next/index.es.js +4 -0
  244. package/dist/next/index.js +514 -745
  245. package/dist/utils/Flyout/Flyout.js +4 -5
  246. package/dist/utils/Flyout/Flyout2.js +3 -3
  247. package/dist/utils/Popper/Popper.js +18 -25
  248. package/dist/utils/Portal/Portal.js +2 -1
  249. package/dist/utils/TextOverflowTooltip/TextOverflowTooltip.js +4 -4
  250. package/dist/utils/Translation/Translate.js +0 -4
  251. package/dist/utils/Translation/TranslationProvider.js +0 -1
  252. package/dist/utils/Translation/containsComponentOrElement.js +1 -5
  253. package/dist/utils/Translation/insertPlaceholders.js +0 -1
  254. package/dist/utils/Translation/useTranslation.js +7 -14
  255. package/dist/utils/concatIds/concatIds.js +0 -1
  256. package/dist/utils/constants.js +2 -2
  257. package/dist/utils/createContextUtilities/createContextUtilities.js +0 -4
  258. package/dist/utils/filterChildren/filterChildren.js +8 -17
  259. package/dist/utils/getSubDataTestId/getSubDataTestId.js +1 -2
  260. package/dist/utils/keyboardUser/keyboardUser.js +0 -1
  261. package/dist/utils/mediaQueryManager/mediaQueryManager.js +1 -12
  262. package/dist/utils/mergeRefs/mergeRefs.js +1 -2
  263. package/dist/utils/wrapAround/wrapAround.js +1 -2
  264. package/dist/utils/wrapEvent/wrapEvent.js +2 -4
  265. package/icons/package.json +3 -2
  266. package/next/package.json +6 -2
  267. package/package.json +10 -5
@@ -46,17 +46,14 @@ const DropdownOption = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
46
46
  } = useDropdownHeaderContext();
47
47
  const isVisible = useMemo(() => {
48
48
  var _context;
49
-
50
49
  return isSearchFilteringDisabled || !label || !searchValue || typeof label === 'string' && _includesInstanceProperty(_context = label.toLowerCase()).call(_context, searchValue.toLowerCase());
51
50
  }, [isSearchFilteringDisabled, label, searchValue]);
52
51
  useEffect(() => {
53
- setVisibleChildIds === null || setVisibleChildIds === void 0 ? void 0 : setVisibleChildIds(visibleChildIds => {
52
+ setVisibleChildIds?.(visibleChildIds => {
54
53
  const duplicateSet = new Set(visibleChildIds);
55
-
56
54
  if (isVisible) {
57
55
  return duplicateSet.add(value);
58
56
  }
59
-
60
57
  duplicateSet.delete(value);
61
58
  return duplicateSet;
62
59
  });
@@ -79,20 +76,16 @@ const DropdownOption = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
79
76
  const isHighlighted = highlightedIndex === myIndex && myIndex !== -1;
80
77
  useEffect(() => {
81
78
  if (isHighlighted) {
82
- var _listRef$current, _listRef$current2, _internalRef$current;
83
-
84
- if (isKeyboardUser && isOpen && internalRef !== null && internalRef !== void 0 && internalRef.current && listRef !== null && listRef !== void 0 && listRef.current && ((_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.scrollHeight) > ((_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.clientHeight)) {
79
+ if (isKeyboardUser && isOpen && internalRef?.current && listRef?.current && listRef.current?.scrollHeight > listRef.current?.clientHeight) {
85
80
  const scrollBottom = listRef.current.clientHeight + listRef.current.scrollTop;
86
81
  const elementBottom = internalRef.current.offsetTop + internalRef.current.offsetHeight;
87
-
88
82
  if (elementBottom > scrollBottom) {
89
83
  listRef.current.scrollTop = elementBottom - listRef.current.clientHeight;
90
84
  } else if (internalRef.current.offsetTop < listRef.current.scrollTop + (isSearchable ? searchHeight : 0)) {
91
85
  listRef.current.scrollTop = internalRef.current.offsetTop - (isSearchable ? searchHeight : 0);
92
86
  }
93
87
  }
94
-
95
- (_internalRef$current = internalRef.current) === null || _internalRef$current === void 0 ? void 0 : _internalRef$current.focus({
88
+ internalRef.current?.focus({
96
89
  preventScroll: true
97
90
  });
98
91
  }
@@ -31,13 +31,7 @@ const DropdownSearch = /*#__PURE__*/React__default.forwardRef((_, ref) => {
31
31
  dataTestId,
32
32
  listboxId
33
33
  } = useDropdownContext();
34
-
35
- const handleSelect = () => {
36
- var _inputRef$current;
37
-
38
- return (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
39
- };
40
-
34
+ const handleSelect = () => inputRef.current?.focus();
41
35
  const myIndex = useChildIndex({
42
36
  element: internalRef.current,
43
37
  isVisible: true
@@ -46,52 +40,40 @@ const DropdownSearch = /*#__PURE__*/React__default.forwardRef((_, ref) => {
46
40
  useEffect(() => {
47
41
  // for keyboard navigation
48
42
  if (isHighlighted && isKeyboardUser) {
49
- var _inputRef$current2;
50
-
51
- (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.focus();
43
+ inputRef.current?.focus();
52
44
  }
53
45
  }, [isHighlighted, isKeyboardUser]);
54
46
  useEffect(() => {
55
47
  // for initial open with mouse
56
48
  if (isHighlighted && isOpen) {
57
- var _inputRef$current3;
58
-
59
- (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.focus();
60
- } // Omitted `isHighlighted` because we don't want to focus the input on mouse enter.
49
+ inputRef.current?.focus();
50
+ }
51
+ // Omitted `isHighlighted` because we don't want to focus the input on mouse enter.
61
52
  // eslint-disable-next-line react-hooks/exhaustive-deps
62
-
63
53
  }, [isOpen]);
64
54
  useEffect(() => {
65
55
  if (isOpen) {
66
- var _internalRef$current;
67
-
68
- setSearchHeight((_internalRef$current = internalRef.current) === null || _internalRef$current === void 0 ? void 0 : _internalRef$current.offsetHeight);
56
+ setSearchHeight(internalRef.current?.offsetHeight);
69
57
  }
70
58
  }, [isOpen, setSearchHeight]);
71
-
72
59
  const handleKeyDown = e => {
73
60
  const keysToAllow = ['ArrowDown', 'Escape', 'Tab', 'PageUp', 'Home', 'PageDown', 'End'];
74
-
75
61
  if (!_includesInstanceProperty(keysToAllow).call(keysToAllow, e.key)) {
76
62
  // `Dropdown` component listens for keystrokes to highlight options with matching labels. We want the focus to remain in the search bar.
77
63
  e.stopPropagation();
78
64
  }
79
65
  };
80
-
81
66
  const handleSearch = e => {
82
67
  const searchVal = e.currentTarget.value;
83
68
  setSearchValue(searchVal);
84
69
  };
85
-
86
70
  const handleMouseEnter = () => {
87
71
  setHighlightedIndex(myIndex);
88
72
  setIsKeyboardUser(false);
89
73
  };
90
-
91
74
  const handleMouseLeave = () => {
92
75
  setHighlightedIndex(-1);
93
76
  };
94
-
95
77
  return isOpen ? /*#__PURE__*/React__default.createElement("div", {
96
78
  className: styles.search,
97
79
  ref: mergeRefs(internalRef, ref),
@@ -20,7 +20,6 @@ const FileDetails = _ref => {
20
20
  files,
21
21
  id
22
22
  } = _ref;
23
-
24
23
  if (files) {
25
24
  return /*#__PURE__*/React__default.createElement("span", {
26
25
  className: filePickerStyles.fileDetails,
@@ -30,10 +29,8 @@ const FileDetails = _ref => {
30
29
  key: file.name
31
30
  }, file.name)));
32
31
  }
33
-
34
32
  return null;
35
33
  };
36
-
37
34
  const FilePicker = /*#__PURE__*/React__default.forwardRef((_ref2, ref) => {
38
35
  let {
39
36
  className,
@@ -54,35 +51,35 @@ const FilePicker = /*#__PURE__*/React__default.forwardRef((_ref2, ref) => {
54
51
  const [filesChanged, setFilesChanged] = useState(false);
55
52
  const [files, setFiles] = useControllableState(undefined, undefined, externalFiles);
56
53
  const fileInputId = useId(externalId);
57
- const fileDetailsId = "".concat(fileInputId, "-fileDetails");
58
- const buttonId = "".concat(fileInputId, "-button");
54
+ const fileDetailsId = `${fileInputId}-fileDetails`;
55
+ const buttonId = `${fileInputId}-button`;
59
56
  const fileInputRef = useRef(null);
60
- const buttonRef = useRef(null); // TODO: Replace this with `useFormFieldControl` and add proper styling (this is a breaking change)
57
+ const buttonRef = useRef(null);
61
58
 
59
+ // TODO: Replace this with `useFormFieldControl` and add proper styling (this is a breaking change)
62
60
  const {
63
61
  helperTextId: formFieldHelperTextId,
64
62
  errorTextId: formFieldErrorTextId
65
- } = useFormFieldContext(); // returns focus to input after closing system dialog
63
+ } = useFormFieldContext();
66
64
 
65
+ // returns focus to input after closing system dialog
67
66
  useDidUpdate(() => {
68
- var _fileInputRef$current;
69
-
70
- (_fileInputRef$current = fileInputRef.current) === null || _fileInputRef$current === void 0 ? void 0 : _fileInputRef$current.focus();
67
+ fileInputRef.current?.focus();
71
68
  }, [filesChanged]);
72
69
  const internalAriaDescribedby = concatIds(externalAriaDescribedBy, formFieldHelperTextId, formFieldErrorTextId);
73
-
74
70
  const handleChange = e => {
75
71
  setFiles(e.target.files, e);
76
- onChange === null || onChange === void 0 ? void 0 : onChange(e); // This is needed due to CFE-508
77
-
72
+ onChange?.(e);
73
+ // This is needed due to CFE-508
78
74
  setFilesChanged(val => !val);
79
75
  };
80
-
81
76
  const messageKey = multiple ? 'filePicker.multiple' : 'filePicker.single';
82
77
  const buttonLabel = translate(messageKey);
83
- const fileNameLabel = files && // eslint-disable-next-line compat/compat
84
- Array.from(files).map(file => file.name).join(' ').trim(); // `|| undefined` prevents an empty string from being added as the aria-label.
78
+ const fileNameLabel = files &&
79
+ // eslint-disable-next-line compat/compat
80
+ Array.from(files).map(file => file.name).join(' ').trim();
85
81
 
82
+ // `|| undefined` prevents an empty string from being added as the aria-label.
86
83
  const ariaLabel = [externalAriaLabel, fileNameLabel].join(' ').trim() || undefined;
87
84
  const ariaLabelledBy = [externalAriaLabelledBy, buttonId, ariaLabel ? fileInputId : undefined].join(' ').trim();
88
85
  return /*#__PURE__*/React__default.createElement("span", {
@@ -90,21 +87,13 @@ const FilePicker = /*#__PURE__*/React__default.forwardRef((_ref2, ref) => {
90
87
  }, /*#__PURE__*/React__default.createElement(Button, {
91
88
  disabled: disabled,
92
89
  kind: "secondary",
93
- onClick: () => {
94
- var _fileInputRef$current2;
95
-
96
- return (_fileInputRef$current2 = fileInputRef.current) === null || _fileInputRef$current2 === void 0 ? void 0 : _fileInputRef$current2.click();
97
- },
90
+ onClick: () => fileInputRef.current?.click(),
98
91
  tabIndex: -1,
99
92
  className: classNames({
100
93
  [buttonStyles.keyboardFocused]: isInputFocused
101
94
  }),
102
95
  ref: buttonRef,
103
- onFocus: () => {
104
- var _fileInputRef$current3;
105
-
106
- return (_fileInputRef$current3 = fileInputRef.current) === null || _fileInputRef$current3 === void 0 ? void 0 : _fileInputRef$current3.focus();
107
- },
96
+ onFocus: () => fileInputRef.current?.focus(),
108
97
  id: buttonId,
109
98
  "aria-hidden": true
110
99
  }, buttonLabel), /*#__PURE__*/React__default.createElement("input", _extends({}, rest, {
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._3BTs4{position:relative}._3hF4c{opacity:0;position:absolute;height:36px;width:100%;left:0;z-index:-1}._2z_5i{margin-left:16px;font-size:14px;color:#32363a}._2z_5i ._5_O7d{margin-right:16px}";
4
- var filePickerStyles = {"container":"_3BTs4","fileInput":"_3hF4c","fileDetails":"_2z_5i","fileName":"_5_O7d"};
5
- var stylesheet="._3BTs4{position:relative}._3hF4c{opacity:0;position:absolute;height:36px;width:100%;left:0;z-index:-1}._2z_5i{margin-left:16px;font-size:14px;color:#32363a}._2z_5i ._5_O7d{margin-right:16px}";
3
+ var css_248z = "._rwNds{position:relative}._U2ClI{opacity:0;position:absolute;height:36px;width:100%;left:0;z-index:-1}._76Om6{margin-left:16px;font-size:14px;color:#32363a}._76Om6 ._YwTdK{margin-right:16px}";
4
+ var filePickerStyles = {"container":"_rwNds","fileInput":"_U2ClI","fileDetails":"_76Om6","fileName":"_YwTdK"};
5
+ var stylesheet="._rwNds{position:relative}._U2ClI{opacity:0;position:absolute;height:36px;width:100%;left:0;z-index:-1}._76Om6{margin-left:16px;font-size:14px;color:#32363a}._76Om6 ._YwTdK{margin-right:16px}";
6
6
  styleInject(css_248z);
7
7
 
8
8
  export { filePickerStyles as default, stylesheet };
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._2z_Wt{display:flex;align-items:center;font-size:12px;line-height:16px;min-height:16px}._1pkfg{color:#74777a;fill:#74777a}._10JUk{color:#b00;fill:#b00}._1LpJv,._2ofux{margin-left:-2px;margin-right:3px}";
4
- var styles = {"caption":"_2z_Wt","helperText":"_1pkfg","errorText":"_10JUk","errorIcon":"_1LpJv","readOnlyIcon":"_2ofux"};
5
- var stylesheet="._2z_Wt{display:flex;align-items:center;font-size:12px;line-height:16px;min-height:16px}._1pkfg{color:#74777a;fill:#74777a}._10JUk{color:#b00;fill:#b00}._1LpJv,._2ofux{margin-left:-2px;margin-right:3px}";
3
+ var css_248z = "._6l5qx{display:flex;align-items:center;font-size:12px;line-height:16px;min-height:16px}._4lT2z{color:#74777a;fill:#74777a}._Q--57{color:#b00;fill:#b00}._eC4s6,._enQRC{margin-left:-2px;margin-right:3px}";
4
+ var styles = {"caption":"_6l5qx","helperText":"_4lT2z","errorText":"_Q--57","errorIcon":"_enQRC","readOnlyIcon":"_eC4s6"};
5
+ var stylesheet="._6l5qx{display:flex;align-items:center;font-size:12px;line-height:16px;min-height:16px}._4lT2z{color:#74777a;fill:#74777a}._Q--57{color:#b00;fill:#b00}._eC4s6,._enQRC{margin-left:-2px;margin-right:3px}";
6
6
  styleInject(css_248z);
7
7
 
8
8
  export { styles as default, stylesheet };
@@ -29,8 +29,8 @@ const FormField = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
29
29
  const [hasLabel, setHasLabel] = useState(false);
30
30
  const [formFieldType, setFormFieldType] = useState('');
31
31
  const containerId = useId(externalId);
32
- const helperTextId = helperText ? "".concat(containerId, "-helper-text") : undefined;
33
- const errorTextId = errorText ? "".concat(containerId, "-error-text") : undefined;
32
+ const helperTextId = helperText ? `${containerId}-helper-text` : undefined;
33
+ const errorTextId = errorText ? `${containerId}-error-text` : undefined;
34
34
  return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
35
35
  ref: mergeRefs(ref, focusRef),
36
36
  className: classNames(className, {
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._3hvVt{display:flex;flex-direction:column;align-items:flex-start}._3Ijno{margin-top:6px;max-width:100%}._3Ijno *+*{margin-top:4px}";
4
- var styles = {"formField":"_3hvVt","captionContainer":"_3Ijno"};
5
- var stylesheet="._3hvVt{display:flex;flex-direction:column;align-items:flex-start}._3Ijno{margin-top:6px;max-width:100%}._3Ijno *+*{margin-top:4px}";
3
+ var css_248z = "._6MkrF{display:flex;flex-direction:column;align-items:flex-start}._3SJkV{margin-top:6px;max-width:100%}._3SJkV *+*{margin-top:4px}";
4
+ var styles = {"formField":"_6MkrF","captionContainer":"_3SJkV"};
5
+ var stylesheet="._6MkrF{display:flex;flex-direction:column;align-items:flex-start}._3SJkV{margin-top:6px;max-width:100%}._3SJkV *+*{margin-top:4px}";
6
6
  styleInject(css_248z);
7
7
 
8
8
  export { styles as default, stylesheet };
@@ -6,36 +6,33 @@ const {
6
6
  Provider: FormFieldProvider,
7
7
  useContext: useFormFieldContext
8
8
  } = createContextUtilities({});
9
-
10
9
  const useFormFieldControl = () => {
11
10
  const context = useFormFieldContext();
12
11
  const {
13
12
  setHasControl
14
13
  } = context;
15
14
  useEffect(() => {
16
- setHasControl === null || setHasControl === void 0 ? void 0 : setHasControl(true);
15
+ setHasControl?.(true);
17
16
  }, [setHasControl]);
18
17
  return context;
19
18
  };
20
-
21
19
  const useFormFieldLabel = () => {
22
20
  const context = useFormFieldContext();
23
21
  const {
24
22
  setHasLabel
25
23
  } = context;
26
24
  useEffect(() => {
27
- setHasLabel === null || setHasLabel === void 0 ? void 0 : setHasLabel(true);
25
+ setHasLabel?.(true);
28
26
  }, [setHasLabel]);
29
27
  return context;
30
28
  };
31
-
32
29
  const useFormFieldType = type => {
33
30
  const context = useFormFieldContext();
34
31
  const {
35
32
  setFormFieldType
36
33
  } = context;
37
34
  useEffect(() => {
38
- setFormFieldType === null || setFormFieldType === void 0 ? void 0 : setFormFieldType(type);
35
+ setFormFieldType?.(type);
39
36
  }, [setFormFieldType, type]);
40
37
  return context;
41
38
  };
@@ -8,7 +8,8 @@ import useTranslation from '../../utils/Translation/useTranslation.js';
8
8
  import LockIcon from '../../icons/components/LockIcon.js';
9
9
 
10
10
  const ReadOnlyText = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
11
- let { ...rest
11
+ let {
12
+ ...rest
12
13
  } = _ref;
13
14
  const classes = classNames(styles.caption, styles.helperText);
14
15
  const {
@@ -38,24 +38,18 @@ const FullScreenTakeover = /*#__PURE__*/forwardRef((_ref, ref) => {
38
38
  useEffect(() => {
39
39
  // If `focusedElementWhenDialogOpened` has been set, then we know that the element has been opened at least once. Without this check, the component will focus `elementRefToFocusOnClose` on page load.
40
40
  if (!isInDOM && focusedElementWhenDialogOpened) {
41
- var _elementRefToFocusOnC;
42
-
43
- const elementToFocus = (_elementRefToFocusOnC = elementRefToFocusOnClose === null || elementRefToFocusOnClose === void 0 ? void 0 : elementRefToFocusOnClose.current) !== null && _elementRefToFocusOnC !== void 0 ? _elementRefToFocusOnC : focusedElementWhenDialogOpened;
44
- elementToFocus === null || elementToFocus === void 0 ? void 0 : elementToFocus.focus();
45
- } // eslint-disable-next-line react-hooks/exhaustive-deps
46
-
41
+ const elementToFocus = elementRefToFocusOnClose?.current ?? focusedElementWhenDialogOpened;
42
+ elementToFocus?.focus();
43
+ }
44
+ // eslint-disable-next-line react-hooks/exhaustive-deps
47
45
  }, [isInDOM, focusedElementWhenDialogOpened]);
48
-
49
46
  const handleAnimationEnd = () => {
50
47
  if (isOpen) {
51
- var _ref2, _elementRefToFocusOnO;
52
-
53
- (_ref2 = (_elementRefToFocusOnO = elementRefToFocusOnOpen === null || elementRefToFocusOnOpen === void 0 ? void 0 : elementRefToFocusOnOpen.current) !== null && _elementRefToFocusOnO !== void 0 ? _elementRefToFocusOnO : dialogRef === null || dialogRef === void 0 ? void 0 : dialogRef.current) === null || _ref2 === void 0 ? void 0 : _ref2.focus();
48
+ (elementRefToFocusOnOpen?.current ?? dialogRef?.current)?.focus();
54
49
  } else {
55
50
  setIsInDOM(false);
56
51
  }
57
52
  };
58
-
59
53
  return isInDOM ? /*#__PURE__*/React__default.createElement(Portal, null, /*#__PURE__*/React__default.createElement(ReactFocusLock, {
60
54
  autoFocus: false
61
55
  }, /*#__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 = "._2FtWn{position:fixed;left:0;top:0;width:100vw;height:100vh;background-color:#fff;overflow:auto}@-webkit-keyframes _2lkAV{0%{transform:scale3d(.7,.7,.7);opacity:0}}@keyframes _2lkAV{0%{transform:scale3d(.7,.7,.7);opacity:0}}._1_Vem{-webkit-animation:_2lkAV both;animation:_2lkAV both;-webkit-animation-duration:.2s;animation-duration:.2s}@-webkit-keyframes _uxwgW{to{transform:scale3d(.7,.7,.7);opacity:0}}@keyframes _uxwgW{to{transform:scale3d(.7,.7,.7);opacity:0}}._jV0gA{-webkit-animation:_uxwgW both;animation:_uxwgW both;-webkit-animation-duration:.2s;animation-duration:.2s}";
4
- var styles = {"dialog":"_2FtWn","transitionIn":"_1_Vem","showAnimation":"_2lkAV","transitionOut":"_jV0gA","hideAnimation":"_uxwgW"};
5
- var stylesheet="._2FtWn{position:fixed;left:0;top:0;width:100vw;height:100vh;background-color:#fff;overflow:auto}@-webkit-keyframes _2lkAV{0%{transform:scale3d(.7,.7,.7);opacity:0}}@keyframes _2lkAV{0%{transform:scale3d(.7,.7,.7);opacity:0}}._1_Vem{-webkit-animation:_2lkAV both;animation:_2lkAV both;-webkit-animation-duration:.2s;animation-duration:.2s}@-webkit-keyframes _uxwgW{to{transform:scale3d(.7,.7,.7);opacity:0}}@keyframes _uxwgW{to{transform:scale3d(.7,.7,.7);opacity:0}}._jV0gA{-webkit-animation:_uxwgW both;animation:_uxwgW both;-webkit-animation-duration:.2s;animation-duration:.2s}";
3
+ var css_248z = "._Wrt6X{position:fixed;left:0;top:0;width:100vw;height:100vh;background-color:#fff;overflow:auto}@keyframes _e3rQn{0%{transform:scale3d(.7,.7,.7);opacity:0}}._NgcBI{animation:_e3rQn both;animation-duration:.2s}@keyframes _AuLP5{to{transform:scale3d(.7,.7,.7);opacity:0}}._mKJEw{animation:_AuLP5 both;animation-duration:.2s}";
4
+ var styles = {"dialog":"_Wrt6X","transitionIn":"_NgcBI","showAnimation":"_e3rQn","transitionOut":"_mKJEw","hideAnimation":"_AuLP5"};
5
+ var stylesheet="._Wrt6X{position:fixed;left:0;top:0;width:100vw;height:100vh;background-color:#fff;overflow:auto}@keyframes _e3rQn{0%{transform:scale3d(.7,.7,.7);opacity:0}}._NgcBI{animation:_e3rQn both;animation-duration:.2s}@keyframes _AuLP5{to{transform:scale3d(.7,.7,.7);opacity:0}}._mKJEw{animation:_AuLP5 both;animation-duration:.2s}";
6
6
  styleInject(css_248z);
7
7
 
8
8
  export { styles as default, stylesheet };
@@ -7,10 +7,10 @@ const IconSizes = {
7
7
  medium: 24,
8
8
  large: 32
9
9
  };
10
+
10
11
  /*
11
12
  * Value should be the replacement
12
13
  */
13
-
14
14
  const deprecated = {
15
15
  Contact: 'User',
16
16
  EmptyBox: 'Folder',
@@ -18,14 +18,12 @@ const deprecated = {
18
18
  ParticipantInviteAutomation: 'UserGroup',
19
19
  Slider: 'SliderOptions'
20
20
  };
21
-
22
21
  function deprecationWarning(type) {
23
22
  if (deprecated[type]) {
24
23
  // eslint-disable-next-line no-console
25
- console.warn("\"IconTypes.".concat(type, "\" has been deprecated! Use \"IconTypes.").concat(deprecated[type], "\" instead."));
24
+ console.warn(`"IconTypes.${type}" has been deprecated! Use "IconTypes.${deprecated[type]}" instead.`);
26
25
  }
27
26
  }
28
-
29
27
  const Icon = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
30
28
  let {
31
29
  type,
@@ -33,7 +31,7 @@ const Icon = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
33
31
  ...rest
34
32
  } = _ref;
35
33
  // eslint-disable-next-line no-console
36
- console.warn("<Icon> component is deprecated! Use individual icon components from the @qualtrics/ui-react/icons import path instead", type);
34
+ console.warn(`<Icon> component is deprecated! Use individual icon components from the @qualtrics/ui-react/icons import path instead`, type);
37
35
  deprecationWarning(type);
38
36
  const svgContent = IconData[deprecated[type] || type];
39
37
  const pixels = IconSizes[size];
@@ -48,7 +46,6 @@ const Icon = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
48
46
  dangerouslySetInnerHTML: {
49
47
  __html: svgContent
50
48
  } // eslint-disable-line react/no-danger
51
-
52
49
  }));
53
50
  });
54
51
 
@@ -201,6 +201,7 @@ var IconTypes = {
201
201
  GridView: 'GridView',
202
202
  HamburgerMenu: 'HamburgerMenu',
203
203
  Headphones: 'Headphones',
204
+ Headset: 'Headset',
204
205
  HealthWellness: 'HealthWellness',
205
206
  HeatMap: 'HeatMap',
206
207
  Help: 'Help',
@@ -23,15 +23,12 @@ const IconButton = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
23
23
  const classes = classNames(className, styles.button, {
24
24
  [styles.disabled]: disabled
25
25
  });
26
-
27
26
  if (children.props.size) {
28
27
  // eslint-disable-next-line no-console
29
28
  console.error(sizePropInIconErrorMessage);
30
29
  }
31
-
32
30
  const iconButtonComponent =
33
31
  /*#__PURE__*/
34
-
35
32
  /* eslint-disable react/button-has-type */
36
33
  React__default.createElement("button", _extends({}, rest, {
37
34
  type: type,
@@ -44,8 +41,7 @@ const IconButton = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
44
41
  size: 'medium',
45
42
  'aria-hidden': true
46
43
  }))
47
- /* eslint-enable react/button-has-type */
48
- ;
44
+ /* eslint-enable react/button-has-type */;
49
45
 
50
46
  if (tooltipContent) {
51
47
  return /*#__PURE__*/React__default.createElement(Tooltip, {
@@ -55,7 +51,6 @@ const IconButton = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
55
51
  "aria-hidden": isTooltipADescription ? undefined : true
56
52
  }, iconButtonComponent);
57
53
  }
58
-
59
54
  return iconButtonComponent;
60
55
  });
61
56
 
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._1IcB_{border-radius:4px;border:none;height:36px;width:36px;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:0;cursor:pointer;fill:#515559;background-color:transparent;transition:background .2s,color .2s}._1IcB_:focus{outline:none}._1IcB_:hover:not(._3MnNf){background-color:rgba(50,54,58,.08)}._1IcB_:active:not(._3MnNf){background-color:rgba(50,54,58,.11);stroke-width:2}._1IcB_._3MnNf{cursor:not-allowed;fill:rgba(81,85,89,.6)}body.keyboard-user ._1IcB_:focus{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
4
- var styles = {"button":"_1IcB_","disabled":"_3MnNf"};
5
- var stylesheet="._1IcB_{border-radius:4px;border:none;height:36px;width:36px;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:0;cursor:pointer;fill:#515559;background-color:transparent;transition:background .2s,color .2s}._1IcB_:focus{outline:none}._1IcB_:hover:not(._3MnNf){background-color:rgba(50,54,58,.08)}._1IcB_:active:not(._3MnNf){background-color:rgba(50,54,58,.11);stroke-width:2}._1IcB_._3MnNf{cursor:not-allowed;fill:rgba(81,85,89,.6)}body.keyboard-user ._1IcB_:focus{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
3
+ var css_248z = "._mpDbl{border-radius:4px;border:none;height:36px;width:36px;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:0;cursor:pointer;fill:#515559;background-color:transparent;transition:background .2s,color .2s}._mpDbl:focus{outline:none}._mpDbl:hover:not(._BqyiW){background-color:rgba(50,54,58,.08)}._mpDbl:active:not(._BqyiW){background-color:rgba(50,54,58,.11);stroke-width:2}._mpDbl._BqyiW{cursor:not-allowed;fill:rgba(81,85,89,.6)}body.keyboard-user ._mpDbl:focus{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
4
+ var styles = {"button":"_mpDbl","disabled":"_BqyiW"};
5
+ var stylesheet="._mpDbl{border-radius:4px;border:none;height:36px;width:36px;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:0;cursor:pointer;fill:#515559;background-color:transparent;transition:background .2s,color .2s}._mpDbl:focus{outline:none}._mpDbl:hover:not(._BqyiW){background-color:rgba(50,54,58,.08)}._mpDbl:active:not(._BqyiW){background-color:rgba(50,54,58,.11);stroke-width:2}._mpDbl._BqyiW{cursor:not-allowed;fill:rgba(81,85,89,.6)}body.keyboard-user ._mpDbl:focus{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
6
6
  styleInject(css_248z);
7
7
 
8
8
  export { styles as default, stylesheet };
@@ -28,61 +28,48 @@ const InlineInput = /*#__PURE__*/forwardRef((_ref, ref) => {
28
28
  const [focusRef, isFocused] = useIsFocused();
29
29
  const handleChange = useEventCallback(e => {
30
30
  const newVal = e.target.innerText;
31
-
32
31
  if (newVal !== lastVal) {
33
32
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
34
33
  // @ts-ignore: Property 'value' does not exist on type 'HTMLSpanElement'
35
34
  e.target.value = newVal;
36
- onChange === null || onChange === void 0 ? void 0 : onChange(e);
35
+ onChange?.(e);
37
36
  setLastVal(newVal);
38
37
  }
39
38
  });
40
-
41
39
  const handleBlur = e => {
42
40
  setIsEditing(false);
43
41
  e.target.value = e.target.innerText;
44
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
42
+ onBlur?.(e);
45
43
  };
46
-
47
44
  const handleFocus = e => {
48
45
  setIsEditing(true);
49
46
  e.target.value = e.target.innerText;
50
- onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
47
+ onFocus?.(e);
51
48
  };
52
-
53
49
  const handleKeyDown = e => {
54
50
  if (e.key === 'Enter') {
55
51
  e.preventDefault(); // Prevent form submission
56
-
57
52
  setIsEditing(v => !v);
58
53
  } else if (e.key === 'Escape' && isEditing) {
59
54
  e.preventDefault(); // Prevent clearing the text in some browsers
60
-
61
55
  e.stopPropagation(); // prevent event from closing modals or popovers
62
-
63
56
  setIsEditing(false);
64
57
  }
65
-
66
- onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
58
+ onKeyDown?.(e);
67
59
  };
68
-
69
60
  const handleMouseDown = e => {
70
61
  if (isFocused) {
71
62
  setIsEditing(true);
72
63
  }
73
-
74
- onMouseDown === null || onMouseDown === void 0 ? void 0 : onMouseDown(e);
64
+ onMouseDown?.(e);
75
65
  };
76
-
77
66
  const handlePaste = e => {
78
67
  // Strip formatting and newlines from pasted data
79
68
  if (typeof window !== 'undefined') {
80
69
  e.preventDefault(); // prevent paste and manually insert text after stripping formatting
81
-
82
70
  const text = e.clipboardData.getData('text').replace(/[\n\r]/g, ' ');
83
71
  const selection = window.getSelection();
84
- const range = selection === null || selection === void 0 ? void 0 : selection.getRangeAt(0);
85
-
72
+ const range = selection?.getRangeAt(0);
86
73
  if (range && selection) {
87
74
  range.deleteContents();
88
75
  const textNode = document.createTextNode(text);
@@ -95,31 +82,27 @@ const InlineInput = /*#__PURE__*/forwardRef((_ref, ref) => {
95
82
  }
96
83
  }
97
84
  };
98
-
99
85
  useDidUpdate(() => {
100
86
  if (typeof window !== 'undefined') {
101
- var _window$getSelection2;
102
-
103
87
  if (isEditing && isFocused && internalRef.current) {
104
- var _window$getSelection;
105
-
106
- (_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 ? void 0 : _window$getSelection.selectAllChildren(internalRef.current);
107
- } // Clear window selection only if it is on the InlineInput. Without this check, we would mistakenly clear the
88
+ window.getSelection()?.selectAllChildren(internalRef.current);
89
+ }
90
+ // Clear window selection only if it is on the InlineInput. Without this check, we would mistakenly clear the
108
91
  // selection after focus moves from this component to an Input or another component that sets the window selection.
109
- else if (internalRef.current && (_window$getSelection2 = window.getSelection()) !== null && _window$getSelection2 !== void 0 && _window$getSelection2.containsNode(internalRef.current, true)) {
110
- var _window$getSelection3;
111
-
112
- (_window$getSelection3 = window.getSelection()) === null || _window$getSelection3 === void 0 ? void 0 : _window$getSelection3.removeAllRanges();
92
+ else if (internalRef.current && window.getSelection()?.containsNode(internalRef.current, true)) {
93
+ window.getSelection()?.removeAllRanges();
113
94
  }
114
95
  }
115
- }, [isEditing, isFocused]); // The event listener only triggers the change handler in IE 11. In IE 11, `onInput` does not trigger the change handler.
96
+ }, [isEditing, isFocused]);
97
+
98
+ // The event listener only triggers the change handler in IE 11. In IE 11, `onInput` does not trigger the change handler.
116
99
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
117
100
  // @ts-ignore: `textinput` is a non-standard IE only event so TS doesn't recognize it
101
+ useEventListener(internalRef, 'textinput', handleChange);
118
102
 
119
- useEventListener(internalRef, 'textinput', handleChange); // Need additional wrapper div to prevent focus from being sent to contentEditable span unintentionally
103
+ // Need additional wrapper div to prevent focus from being sent to contentEditable span unintentionally
120
104
  // stack overflow:
121
105
  // https://stackoverflow.com/questions/34354085/clicking-outside-a-contenteditable-div-stills-give-focus-to-it
122
-
123
106
  return /*#__PURE__*/React__default.createElement("div", {
124
107
  className: styles.container
125
108
  }, /*#__PURE__*/React__default.createElement("span", _extends({}, rest, {
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._1MmFR{display:inline-block}._1qxpQ{color:#085caf;cursor:pointer;font-size:14px;box-sizing:border-box;padding:4px;margin:-5px;outline:0;border:1px solid transparent;border-radius:4px;background-clip:padding-box;display:block}._1qxpQ::-moz-selection{background-color:rgba(11,110,208,.11)}._1qxpQ::selection{background-color:rgba(11,110,208,.11)}._1qxpQ:focus,._1qxpQ:hover{background-color:#f5f5f5}._1qxpQ:focus{border:2px solid #0a3f88;padding:3px}._1qxpQ:focus._1nmX4{background-color:#fafafa;cursor:text;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 1px 8px hsla(0,0%,66.7%,.5)}";
4
- var styles = {"container":"_1MmFR","inlineInput":"_1qxpQ","isEditing":"_1nmX4"};
5
- var stylesheet="._1MmFR{display:inline-block}._1qxpQ{color:#085caf;cursor:pointer;font-size:14px;box-sizing:border-box;padding:4px;margin:-5px;outline:0;border:1px solid transparent;border-radius:4px;background-clip:padding-box;display:block}._1qxpQ::-moz-selection{background-color:rgba(11,110,208,.11)}._1qxpQ::selection{background-color:rgba(11,110,208,.11)}._1qxpQ:focus,._1qxpQ:hover{background-color:#f5f5f5}._1qxpQ:focus{border:2px solid #0a3f88;padding:3px}._1qxpQ:focus._1nmX4{background-color:#fafafa;cursor:text;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 1px 8px hsla(0,0%,66.7%,.5)}";
3
+ var css_248z = "._QI5gC{display:inline-block}._Opi4s{color:#085caf;cursor:pointer;font-size:14px;box-sizing:border-box;padding:4px;margin:-5px;outline:0;border:1px solid transparent;border-radius:4px;background-clip:padding-box;display:block}._Opi4s::-moz-selection{background-color:rgba(11,110,208,.11)}._Opi4s::selection{background-color:rgba(11,110,208,.11)}._Opi4s:focus,._Opi4s:hover{background-color:#f5f5f5}._Opi4s:focus{border:2px solid #0a3f88;padding:3px}._Opi4s:focus._znsQr{background-color:#fafafa;cursor:text;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 1px 8px hsla(0,0%,66.7%,.5)}";
4
+ var styles = {"container":"_QI5gC","inlineInput":"_Opi4s","isEditing":"_znsQr"};
5
+ var stylesheet="._QI5gC{display:inline-block}._Opi4s{color:#085caf;cursor:pointer;font-size:14px;box-sizing:border-box;padding:4px;margin:-5px;outline:0;border:1px solid transparent;border-radius:4px;background-clip:padding-box;display:block}._Opi4s::-moz-selection{background-color:rgba(11,110,208,.11)}._Opi4s::selection{background-color:rgba(11,110,208,.11)}._Opi4s:focus,._Opi4s:hover{background-color:#f5f5f5}._Opi4s:focus{border:2px solid #0a3f88;padding:3px}._Opi4s:focus._znsQr{background-color:#fafafa;cursor:text;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 1px 8px hsla(0,0%,66.7%,.5)}";
6
6
  styleInject(css_248z);
7
7
 
8
8
  export { styles as default, stylesheet };
@@ -37,7 +37,8 @@ const Input = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
37
37
  [styles.small]: inputGroupContext.applySmall(small),
38
38
  [styles.multiline]: multiline
39
39
  }, className);
40
- const commonProps = { ...rest,
40
+ const commonProps = {
41
+ ...rest,
41
42
  ref,
42
43
  className: classes,
43
44
  disabled,
@@ -46,7 +47,7 @@ const Input = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
46
47
  onChange: disabled ? null : onChange,
47
48
  value,
48
49
  'aria-describedby': internalAriaDescribedby,
49
- readOnly: readOnly !== null && readOnly !== void 0 ? readOnly : formFieldIsReadOnly
50
+ readOnly: readOnly ?? formFieldIsReadOnly
50
51
  };
51
52
  return multiline ? /*#__PURE__*/React__default.createElement("textarea", _extends({}, commonProps, {
52
53
  rows: rows