@adobe/react-spectrum 3.47.0 → 3.47.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 (966) hide show
  1. package/dist/exports/Accordion.cjs.map +1 -1
  2. package/dist/exports/Accordion.js.map +1 -1
  3. package/dist/exports/Accordion.mjs.map +1 -1
  4. package/dist/exports/ProgressCircle.cjs.map +1 -1
  5. package/dist/exports/ProgressCircle.js.map +1 -1
  6. package/dist/exports/ProgressCircle.mjs.map +1 -1
  7. package/dist/exports/Provider.cjs.map +1 -1
  8. package/dist/exports/Provider.js.map +1 -1
  9. package/dist/exports/Provider.mjs.map +1 -1
  10. package/dist/exports/TableView.cjs.map +1 -1
  11. package/dist/exports/TableView.js.map +1 -1
  12. package/dist/exports/TableView.mjs.map +1 -1
  13. package/dist/exports/Tabs.cjs.map +1 -1
  14. package/dist/exports/Tabs.js.map +1 -1
  15. package/dist/exports/Tabs.mjs.map +1 -1
  16. package/dist/exports/Toast.cjs.map +1 -1
  17. package/dist/exports/Toast.js.map +1 -1
  18. package/dist/exports/Toast.mjs.map +1 -1
  19. package/dist/exports/TreeView.cjs.map +1 -1
  20. package/dist/exports/TreeView.js.map +1 -1
  21. package/dist/exports/TreeView.mjs.map +1 -1
  22. package/dist/exports/index.cjs.map +1 -1
  23. package/dist/exports/index.js.map +1 -1
  24. package/dist/exports/index.mjs.map +1 -1
  25. package/dist/exports/private/autocomplete/SearchAutocomplete.cjs.map +1 -1
  26. package/dist/exports/private/autocomplete/SearchAutocomplete.js.map +1 -1
  27. package/dist/exports/private/autocomplete/SearchAutocomplete.mjs.map +1 -1
  28. package/dist/exports/private/card/types.cjs.map +1 -1
  29. package/dist/exports/private/card/types.js.map +1 -1
  30. package/dist/exports/private/card/types.mjs.map +1 -1
  31. package/dist/exports/private/icon/Illustration.cjs.map +1 -1
  32. package/dist/exports/private/icon/Illustration.js.map +1 -1
  33. package/dist/exports/private/icon/Illustration.mjs.map +1 -1
  34. package/dist/exports/private/progress/ProgressBarBase.cjs.map +1 -1
  35. package/dist/exports/private/progress/ProgressBarBase.js.map +1 -1
  36. package/dist/exports/private/progress/ProgressBarBase.mjs.map +1 -1
  37. package/dist/exports/private/utils/BreakpointProvider.cjs.map +1 -1
  38. package/dist/exports/private/utils/BreakpointProvider.js.map +1 -1
  39. package/dist/exports/private/utils/BreakpointProvider.mjs.map +1 -1
  40. package/dist/exports/private/utils/classNames.cjs.map +1 -1
  41. package/dist/exports/private/utils/classNames.js.map +1 -1
  42. package/dist/exports/private/utils/classNames.mjs.map +1 -1
  43. package/dist/exports/private/utils/styleProps.cjs.map +1 -1
  44. package/dist/exports/private/utils/styleProps.js.map +1 -1
  45. package/dist/exports/private/utils/styleProps.mjs.map +1 -1
  46. package/dist/exports/private/utils/useDOMRef.cjs.map +1 -1
  47. package/dist/exports/private/utils/useDOMRef.js.map +1 -1
  48. package/dist/exports/private/utils/useDOMRef.mjs.map +1 -1
  49. package/dist/exports/useAsyncList.cjs.map +1 -1
  50. package/dist/exports/useAsyncList.js.map +1 -1
  51. package/dist/exports/useAsyncList.mjs.map +1 -1
  52. package/dist/exports/useDragAndDrop.cjs.map +1 -1
  53. package/dist/exports/useDragAndDrop.js.map +1 -1
  54. package/dist/exports/useDragAndDrop.mjs.map +1 -1
  55. package/dist/private/accordion/Accordion.cjs.map +1 -1
  56. package/dist/private/accordion/Accordion.js.map +1 -1
  57. package/dist/private/accordion/Accordion.mjs.map +1 -1
  58. package/dist/private/accordion_vars.css +26 -24
  59. package/dist/private/accordion_vars.css.map +1 -1
  60. package/dist/private/accordion_vars_css.cjs +13 -13
  61. package/dist/private/accordion_vars_css.mjs +13 -13
  62. package/dist/private/actionbar/ActionBar.cjs.map +1 -1
  63. package/dist/private/actionbar/ActionBar.js.map +1 -1
  64. package/dist/private/actionbar/ActionBar.mjs.map +1 -1
  65. package/dist/private/actionbar/ActionBarContainer.cjs.map +1 -1
  66. package/dist/private/actionbar/ActionBarContainer.js.map +1 -1
  67. package/dist/private/actionbar/ActionBarContainer.mjs.map +1 -1
  68. package/dist/private/actionbar/actionbar.css +17 -16
  69. package/dist/private/actionbar/actionbar.css.map +1 -1
  70. package/dist/private/actionbar/actionbar_css.cjs +10 -10
  71. package/dist/private/actionbar/actionbar_css.cjs.map +1 -1
  72. package/dist/private/actionbar/actionbar_css.mjs +10 -10
  73. package/dist/private/actionbar/actionbar_css.mjs.map +1 -1
  74. package/dist/private/actiongroup/ActionGroup.cjs +6 -3
  75. package/dist/private/actiongroup/ActionGroup.cjs.map +1 -1
  76. package/dist/private/actiongroup/ActionGroup.js +6 -3
  77. package/dist/private/actiongroup/ActionGroup.js.map +1 -1
  78. package/dist/private/actiongroup/ActionGroup.mjs +6 -3
  79. package/dist/private/actiongroup/ActionGroup.mjs.map +1 -1
  80. package/dist/private/actiongroup_vars.css +34 -34
  81. package/dist/private/actiongroup_vars.css.map +1 -1
  82. package/dist/private/actiongroup_vars_css.cjs +16 -16
  83. package/dist/private/actiongroup_vars_css.mjs +16 -16
  84. package/dist/private/autocomplete/MobileSearchAutocomplete.cjs.map +1 -1
  85. package/dist/private/autocomplete/MobileSearchAutocomplete.js.map +1 -1
  86. package/dist/private/autocomplete/MobileSearchAutocomplete.mjs.map +1 -1
  87. package/dist/private/autocomplete/SearchAutocomplete.cjs.map +1 -1
  88. package/dist/private/autocomplete/SearchAutocomplete.js.map +1 -1
  89. package/dist/private/autocomplete/SearchAutocomplete.mjs.map +1 -1
  90. package/dist/private/avatar/Avatar.cjs.map +1 -1
  91. package/dist/private/avatar/Avatar.js.map +1 -1
  92. package/dist/private/avatar/Avatar.mjs.map +1 -1
  93. package/dist/private/badge/Badge.cjs.map +1 -1
  94. package/dist/private/badge/Badge.js.map +1 -1
  95. package/dist/private/badge/Badge.mjs.map +1 -1
  96. package/dist/private/badge_vars.css +39 -38
  97. package/dist/private/badge_vars.css.map +1 -1
  98. package/dist/private/badge_vars_css.cjs +20 -20
  99. package/dist/private/badge_vars_css.mjs +20 -20
  100. package/dist/private/barloader_vars.css +55 -54
  101. package/dist/private/barloader_vars.css.map +1 -1
  102. package/dist/private/barloader_vars_css.cjs +21 -21
  103. package/dist/private/barloader_vars_css.cjs.map +1 -1
  104. package/dist/private/barloader_vars_css.mjs +21 -21
  105. package/dist/private/barloader_vars_css.mjs.map +1 -1
  106. package/dist/private/breadcrumb_vars.css +56 -55
  107. package/dist/private/breadcrumb_vars.css.map +1 -1
  108. package/dist/private/breadcrumb_vars_css.cjs +20 -20
  109. package/dist/private/breadcrumb_vars_css.mjs +20 -20
  110. package/dist/private/breadcrumbs/BreadcrumbItem.cjs.map +1 -1
  111. package/dist/private/breadcrumbs/BreadcrumbItem.js.map +1 -1
  112. package/dist/private/breadcrumbs/BreadcrumbItem.mjs.map +1 -1
  113. package/dist/private/breadcrumbs/Breadcrumbs.cjs.map +1 -1
  114. package/dist/private/breadcrumbs/Breadcrumbs.js.map +1 -1
  115. package/dist/private/breadcrumbs/Breadcrumbs.mjs.map +1 -1
  116. package/dist/private/button/ActionButton.cjs.map +1 -1
  117. package/dist/private/button/ActionButton.js.map +1 -1
  118. package/dist/private/button/ActionButton.mjs.map +1 -1
  119. package/dist/private/button/Button.cjs +1 -1
  120. package/dist/private/button/Button.cjs.map +1 -1
  121. package/dist/private/button/Button.js +1 -1
  122. package/dist/private/button/Button.js.map +1 -1
  123. package/dist/private/button/Button.mjs +1 -1
  124. package/dist/private/button/Button.mjs.map +1 -1
  125. package/dist/private/button/ClearButton.cjs.map +1 -1
  126. package/dist/private/button/ClearButton.js.map +1 -1
  127. package/dist/private/button/ClearButton.mjs.map +1 -1
  128. package/dist/private/button/FieldButton.cjs.map +1 -1
  129. package/dist/private/button/FieldButton.js.map +1 -1
  130. package/dist/private/button/FieldButton.mjs.map +1 -1
  131. package/dist/private/button/LogicButton.cjs.map +1 -1
  132. package/dist/private/button/LogicButton.js.map +1 -1
  133. package/dist/private/button/LogicButton.mjs.map +1 -1
  134. package/dist/private/button/ToggleButton.cjs.map +1 -1
  135. package/dist/private/button/ToggleButton.js.map +1 -1
  136. package/dist/private/button/ToggleButton.mjs.map +1 -1
  137. package/dist/private/button_vars.css +207 -205
  138. package/dist/private/button_vars.css.map +1 -1
  139. package/dist/private/button_vars_css.cjs +39 -39
  140. package/dist/private/button_vars_css.mjs +39 -39
  141. package/dist/private/buttongroup/ButtonGroup.cjs.map +1 -1
  142. package/dist/private/buttongroup/ButtonGroup.js.map +1 -1
  143. package/dist/private/buttongroup/ButtonGroup.mjs.map +1 -1
  144. package/dist/private/calendar/Calendar.cjs.map +1 -1
  145. package/dist/private/calendar/Calendar.js.map +1 -1
  146. package/dist/private/calendar/Calendar.mjs.map +1 -1
  147. package/dist/private/calendar/CalendarBase.cjs.map +1 -1
  148. package/dist/private/calendar/CalendarBase.js.map +1 -1
  149. package/dist/private/calendar/CalendarBase.mjs.map +1 -1
  150. package/dist/private/calendar/CalendarCell.cjs.map +1 -1
  151. package/dist/private/calendar/CalendarCell.js.map +1 -1
  152. package/dist/private/calendar/CalendarCell.mjs.map +1 -1
  153. package/dist/private/calendar/CalendarMonth.cjs.map +1 -1
  154. package/dist/private/calendar/CalendarMonth.js.map +1 -1
  155. package/dist/private/calendar/CalendarMonth.mjs.map +1 -1
  156. package/dist/private/calendar/RangeCalendar.cjs.map +1 -1
  157. package/dist/private/calendar/RangeCalendar.js.map +1 -1
  158. package/dist/private/calendar/RangeCalendar.mjs.map +1 -1
  159. package/dist/private/calendar_vars.css +90 -88
  160. package/dist/private/calendar_vars.css.map +1 -1
  161. package/dist/private/calendar_vars_css.cjs +36 -36
  162. package/dist/private/calendar_vars_css.cjs.map +1 -1
  163. package/dist/private/calendar_vars_css.mjs +36 -36
  164. package/dist/private/calendar_vars_css.mjs.map +1 -1
  165. package/dist/private/card/BaseLayout.cjs.map +1 -1
  166. package/dist/private/card/BaseLayout.js.map +1 -1
  167. package/dist/private/card/BaseLayout.mjs.map +1 -1
  168. package/dist/private/card/Card.cjs.map +1 -1
  169. package/dist/private/card/Card.js.map +1 -1
  170. package/dist/private/card/Card.mjs.map +1 -1
  171. package/dist/private/card/CardBase.cjs +2 -1
  172. package/dist/private/card/CardBase.cjs.map +1 -1
  173. package/dist/private/card/CardBase.js +2 -1
  174. package/dist/private/card/CardBase.js.map +1 -1
  175. package/dist/private/card/CardBase.mjs +2 -1
  176. package/dist/private/card/CardBase.mjs.map +1 -1
  177. package/dist/private/card/CardView.cjs.map +1 -1
  178. package/dist/private/card/CardView.js.map +1 -1
  179. package/dist/private/card/CardView.mjs.map +1 -1
  180. package/dist/private/card/CardViewContext.cjs.map +1 -1
  181. package/dist/private/card/CardViewContext.js.map +1 -1
  182. package/dist/private/card/CardViewContext.mjs.map +1 -1
  183. package/dist/private/card/GalleryLayout.cjs +6 -6
  184. package/dist/private/card/GalleryLayout.cjs.map +1 -1
  185. package/dist/private/card/GalleryLayout.js +6 -6
  186. package/dist/private/card/GalleryLayout.js.map +1 -1
  187. package/dist/private/card/GalleryLayout.mjs +6 -6
  188. package/dist/private/card/GalleryLayout.mjs.map +1 -1
  189. package/dist/private/card/GridLayout.cjs +9 -9
  190. package/dist/private/card/GridLayout.cjs.map +1 -1
  191. package/dist/private/card/GridLayout.js +9 -9
  192. package/dist/private/card/GridLayout.js.map +1 -1
  193. package/dist/private/card/GridLayout.mjs +9 -9
  194. package/dist/private/card/GridLayout.mjs.map +1 -1
  195. package/dist/private/card/WaterfallLayout.cjs +2 -2
  196. package/dist/private/card/WaterfallLayout.cjs.map +1 -1
  197. package/dist/private/card/WaterfallLayout.js +2 -2
  198. package/dist/private/card/WaterfallLayout.js.map +1 -1
  199. package/dist/private/card/WaterfallLayout.mjs +2 -2
  200. package/dist/private/card/WaterfallLayout.mjs.map +1 -1
  201. package/dist/private/card_vars.css +311 -287
  202. package/dist/private/card_vars.css.map +1 -1
  203. package/dist/private/card_vars_css.cjs +36 -36
  204. package/dist/private/card_vars_css.mjs +36 -36
  205. package/dist/private/checkbox/Checkbox.cjs +2 -1
  206. package/dist/private/checkbox/Checkbox.cjs.map +1 -1
  207. package/dist/private/checkbox/Checkbox.js +2 -1
  208. package/dist/private/checkbox/Checkbox.js.map +1 -1
  209. package/dist/private/checkbox/Checkbox.mjs +2 -1
  210. package/dist/private/checkbox/Checkbox.mjs.map +1 -1
  211. package/dist/private/checkbox/CheckboxGroup.cjs.map +1 -1
  212. package/dist/private/checkbox/CheckboxGroup.js.map +1 -1
  213. package/dist/private/checkbox/CheckboxGroup.mjs.map +1 -1
  214. package/dist/private/checkbox_vars.css +77 -73
  215. package/dist/private/checkbox_vars.css.map +1 -1
  216. package/dist/private/checkbox_vars_css.cjs +17 -17
  217. package/dist/private/checkbox_vars_css.cjs.map +1 -1
  218. package/dist/private/checkbox_vars_css.mjs +17 -17
  219. package/dist/private/checkbox_vars_css.mjs.map +1 -1
  220. package/dist/private/circleloader_vars.css +49 -48
  221. package/dist/private/circleloader_vars.css.map +1 -1
  222. package/dist/private/circleloader_vars_css.cjs +23 -23
  223. package/dist/private/circleloader_vars_css.mjs +23 -23
  224. package/dist/private/color/ColorArea.cjs.map +1 -1
  225. package/dist/private/color/ColorArea.js.map +1 -1
  226. package/dist/private/color/ColorArea.mjs.map +1 -1
  227. package/dist/private/color/ColorEditor.cjs.map +1 -1
  228. package/dist/private/color/ColorEditor.js.map +1 -1
  229. package/dist/private/color/ColorEditor.mjs.map +1 -1
  230. package/dist/private/color/ColorField.cjs.map +1 -1
  231. package/dist/private/color/ColorField.js.map +1 -1
  232. package/dist/private/color/ColorField.mjs.map +1 -1
  233. package/dist/private/color/ColorPicker.cjs.map +1 -1
  234. package/dist/private/color/ColorPicker.js.map +1 -1
  235. package/dist/private/color/ColorPicker.mjs.map +1 -1
  236. package/dist/private/color/ColorSlider.cjs.map +1 -1
  237. package/dist/private/color/ColorSlider.js.map +1 -1
  238. package/dist/private/color/ColorSlider.mjs.map +1 -1
  239. package/dist/private/color/ColorSwatch.cjs.map +1 -1
  240. package/dist/private/color/ColorSwatch.js.map +1 -1
  241. package/dist/private/color/ColorSwatch.mjs.map +1 -1
  242. package/dist/private/color/ColorSwatchPicker.cjs.map +1 -1
  243. package/dist/private/color/ColorSwatchPicker.js.map +1 -1
  244. package/dist/private/color/ColorSwatchPicker.mjs.map +1 -1
  245. package/dist/private/color/ColorThumb.cjs.map +1 -1
  246. package/dist/private/color/ColorThumb.js.map +1 -1
  247. package/dist/private/color/ColorThumb.mjs.map +1 -1
  248. package/dist/private/color/ColorWheel.cjs +2 -2
  249. package/dist/private/color/ColorWheel.cjs.map +1 -1
  250. package/dist/private/color/ColorWheel.js +2 -2
  251. package/dist/private/color/ColorWheel.js.map +1 -1
  252. package/dist/private/color/ColorWheel.mjs +2 -2
  253. package/dist/private/color/ColorWheel.mjs.map +1 -1
  254. package/dist/private/colorarea_vars.css +18 -16
  255. package/dist/private/colorarea_vars.css.map +1 -1
  256. package/dist/private/colorarea_vars_css.cjs +7 -7
  257. package/dist/private/colorarea_vars_css.mjs +7 -7
  258. package/dist/private/colorhandle_vars.css +35 -21
  259. package/dist/private/colorhandle_vars.css.map +1 -1
  260. package/dist/private/colorhandle_vars_css.cjs +6 -6
  261. package/dist/private/colorhandle_vars_css.mjs +6 -6
  262. package/dist/private/colorloupe_vars.css +10 -14
  263. package/dist/private/colorloupe_vars.css.map +1 -1
  264. package/dist/private/colorloupe_vars_css.cjs +5 -5
  265. package/dist/private/colorloupe_vars_css.mjs +5 -5
  266. package/dist/private/colorslider_vars.css +28 -25
  267. package/dist/private/colorslider_vars.css.map +1 -1
  268. package/dist/private/colorslider_vars_css.cjs +15 -15
  269. package/dist/private/colorslider_vars_css.mjs +15 -15
  270. package/dist/private/colorwheel_vars.css +15 -15
  271. package/dist/private/colorwheel_vars.css.map +1 -1
  272. package/dist/private/colorwheel_vars_css.cjs +9 -9
  273. package/dist/private/colorwheel_vars_css.mjs +9 -9
  274. package/dist/private/combobox/ComboBox.cjs.map +1 -1
  275. package/dist/private/combobox/ComboBox.js.map +1 -1
  276. package/dist/private/combobox/ComboBox.mjs.map +1 -1
  277. package/dist/private/combobox/MobileComboBox.cjs.map +1 -1
  278. package/dist/private/combobox/MobileComboBox.js.map +1 -1
  279. package/dist/private/combobox/MobileComboBox.mjs.map +1 -1
  280. package/dist/private/contextualhelp/ContextualHelp.cjs.map +1 -1
  281. package/dist/private/contextualhelp/ContextualHelp.js.map +1 -1
  282. package/dist/private/contextualhelp/ContextualHelp.mjs.map +1 -1
  283. package/dist/private/datepicker/DateField.cjs.map +1 -1
  284. package/dist/private/datepicker/DateField.js.map +1 -1
  285. package/dist/private/datepicker/DateField.mjs.map +1 -1
  286. package/dist/private/datepicker/DatePicker.cjs.map +1 -1
  287. package/dist/private/datepicker/DatePicker.js.map +1 -1
  288. package/dist/private/datepicker/DatePicker.mjs.map +1 -1
  289. package/dist/private/datepicker/DatePickerField.cjs.map +1 -1
  290. package/dist/private/datepicker/DatePickerField.js.map +1 -1
  291. package/dist/private/datepicker/DatePickerField.mjs.map +1 -1
  292. package/dist/private/datepicker/DatePickerSegment.cjs.map +1 -1
  293. package/dist/private/datepicker/DatePickerSegment.js.map +1 -1
  294. package/dist/private/datepicker/DatePickerSegment.mjs.map +1 -1
  295. package/dist/private/datepicker/DateRangePicker.cjs.map +1 -1
  296. package/dist/private/datepicker/DateRangePicker.js.map +1 -1
  297. package/dist/private/datepicker/DateRangePicker.mjs.map +1 -1
  298. package/dist/private/datepicker/Input.cjs.map +1 -1
  299. package/dist/private/datepicker/Input.js.map +1 -1
  300. package/dist/private/datepicker/Input.mjs.map +1 -1
  301. package/dist/private/datepicker/TimeField.cjs.map +1 -1
  302. package/dist/private/datepicker/TimeField.js.map +1 -1
  303. package/dist/private/datepicker/TimeField.mjs.map +1 -1
  304. package/dist/private/datepicker/styles.css +39 -37
  305. package/dist/private/datepicker/styles.css.map +1 -1
  306. package/dist/private/datepicker/styles_css.cjs +23 -23
  307. package/dist/private/datepicker/styles_css.cjs.map +1 -1
  308. package/dist/private/datepicker/styles_css.mjs +23 -23
  309. package/dist/private/datepicker/styles_css.mjs.map +1 -1
  310. package/dist/private/datepicker/utils.cjs.map +1 -1
  311. package/dist/private/datepicker/utils.js.map +1 -1
  312. package/dist/private/datepicker/utils.mjs.map +1 -1
  313. package/dist/private/dialog/AlertDialog.cjs.map +1 -1
  314. package/dist/private/dialog/AlertDialog.js.map +1 -1
  315. package/dist/private/dialog/AlertDialog.mjs.map +1 -1
  316. package/dist/private/dialog/Dialog.cjs +2 -1
  317. package/dist/private/dialog/Dialog.cjs.map +1 -1
  318. package/dist/private/dialog/Dialog.js +2 -1
  319. package/dist/private/dialog/Dialog.js.map +1 -1
  320. package/dist/private/dialog/Dialog.mjs +2 -1
  321. package/dist/private/dialog/Dialog.mjs.map +1 -1
  322. package/dist/private/dialog/DialogContainer.cjs.map +1 -1
  323. package/dist/private/dialog/DialogContainer.js.map +1 -1
  324. package/dist/private/dialog/DialogContainer.mjs.map +1 -1
  325. package/dist/private/dialog/DialogTrigger.cjs +3 -3
  326. package/dist/private/dialog/DialogTrigger.cjs.map +1 -1
  327. package/dist/private/dialog/DialogTrigger.js +3 -3
  328. package/dist/private/dialog/DialogTrigger.js.map +1 -1
  329. package/dist/private/dialog/DialogTrigger.mjs +3 -3
  330. package/dist/private/dialog/DialogTrigger.mjs.map +1 -1
  331. package/dist/private/dialog/context.cjs.map +1 -1
  332. package/dist/private/dialog/context.js.map +1 -1
  333. package/dist/private/dialog/context.mjs.map +1 -1
  334. package/dist/private/dialog/useDialogContainer.cjs.map +1 -1
  335. package/dist/private/dialog/useDialogContainer.js.map +1 -1
  336. package/dist/private/dialog/useDialogContainer.mjs.map +1 -1
  337. package/dist/private/dialog_vars.css +169 -164
  338. package/dist/private/dialog_vars.css.map +1 -1
  339. package/dist/private/dialog_vars_css.cjs +51 -51
  340. package/dist/private/dialog_vars_css.mjs +51 -51
  341. package/dist/private/divider/Divider.cjs.map +1 -1
  342. package/dist/private/divider/Divider.js.map +1 -1
  343. package/dist/private/divider/Divider.mjs.map +1 -1
  344. package/dist/private/dnd/useDragAndDrop.cjs.map +1 -1
  345. package/dist/private/dnd/useDragAndDrop.js.map +1 -1
  346. package/dist/private/dnd/useDragAndDrop.mjs.map +1 -1
  347. package/dist/private/dropdown_vars.css +66 -57
  348. package/dist/private/dropdown_vars.css.map +1 -1
  349. package/dist/private/dropdown_vars_css.cjs +23 -23
  350. package/dist/private/dropdown_vars_css.mjs +23 -23
  351. package/dist/private/dropzone/DropZone.cjs.map +1 -1
  352. package/dist/private/dropzone/DropZone.js.map +1 -1
  353. package/dist/private/dropzone/DropZone.mjs.map +1 -1
  354. package/dist/private/dropzone_vars.css +34 -33
  355. package/dist/private/dropzone_vars.css.map +1 -1
  356. package/dist/private/dropzone_vars_css.cjs +10 -10
  357. package/dist/private/dropzone_vars_css.mjs +10 -10
  358. package/dist/private/fieldgroup_vars.css +22 -21
  359. package/dist/private/fieldgroup_vars.css.map +1 -1
  360. package/dist/private/fieldgroup_vars_css.cjs +8 -8
  361. package/dist/private/fieldgroup_vars_css.mjs +8 -8
  362. package/dist/private/fieldlabel_vars.css +61 -60
  363. package/dist/private/fieldlabel_vars.css.map +1 -1
  364. package/dist/private/fieldlabel_vars_css.cjs +29 -29
  365. package/dist/private/fieldlabel_vars_css.cjs.map +1 -1
  366. package/dist/private/fieldlabel_vars_css.mjs +29 -29
  367. package/dist/private/fieldlabel_vars_css.mjs.map +1 -1
  368. package/dist/private/form/Form.cjs.map +1 -1
  369. package/dist/private/form/Form.js.map +1 -1
  370. package/dist/private/form/Form.mjs.map +1 -1
  371. package/dist/private/helptext_vars.css +30 -27
  372. package/dist/private/helptext_vars.css.map +1 -1
  373. package/dist/private/helptext_vars_css.cjs +11 -11
  374. package/dist/private/helptext_vars_css.mjs +11 -11
  375. package/dist/private/icon/Icon.cjs.map +1 -1
  376. package/dist/private/icon/Icon.js.map +1 -1
  377. package/dist/private/icon/Icon.mjs.map +1 -1
  378. package/dist/private/icon/Illustration.cjs.map +1 -1
  379. package/dist/private/icon/Illustration.js.map +1 -1
  380. package/dist/private/icon/Illustration.mjs.map +1 -1
  381. package/dist/private/icon/UIIcon.cjs.map +1 -1
  382. package/dist/private/icon/UIIcon.js.map +1 -1
  383. package/dist/private/icon/UIIcon.mjs.map +1 -1
  384. package/dist/private/illustratedmessage/IllustratedMessage.cjs.map +1 -1
  385. package/dist/private/illustratedmessage/IllustratedMessage.js.map +1 -1
  386. package/dist/private/illustratedmessage/IllustratedMessage.mjs.map +1 -1
  387. package/dist/private/image/Image.cjs +2 -1
  388. package/dist/private/image/Image.cjs.map +1 -1
  389. package/dist/private/image/Image.js +2 -1
  390. package/dist/private/image/Image.js.map +1 -1
  391. package/dist/private/image/Image.mjs +2 -1
  392. package/dist/private/image/Image.mjs.map +1 -1
  393. package/dist/private/image_vars.css +1 -1
  394. package/dist/private/image_vars.css.map +1 -1
  395. package/dist/private/image_vars_css.cjs +1 -1
  396. package/dist/private/image_vars_css.mjs +1 -1
  397. package/dist/private/inlinealert/InlineAlert.cjs.map +1 -1
  398. package/dist/private/inlinealert/InlineAlert.js.map +1 -1
  399. package/dist/private/inlinealert/InlineAlert.mjs.map +1 -1
  400. package/dist/private/inlinealert_vars.css +44 -43
  401. package/dist/private/inlinealert_vars.css.map +1 -1
  402. package/dist/private/inlinealert_vars_css.cjs +18 -18
  403. package/dist/private/inlinealert_vars_css.cjs.map +1 -1
  404. package/dist/private/inlinealert_vars_css.mjs +18 -18
  405. package/dist/private/inlinealert_vars_css.mjs.map +1 -1
  406. package/dist/private/inputgroup_vars.css +96 -93
  407. package/dist/private/inputgroup_vars.css.map +1 -1
  408. package/dist/private/inputgroup_vars_css.cjs +26 -26
  409. package/dist/private/inputgroup_vars_css.mjs +26 -26
  410. package/dist/private/intl/actionbar/en-US.cjs.map +1 -1
  411. package/dist/private/intl/actionbar/en-US.js.map +1 -1
  412. package/dist/private/intl/actionbar/en-US.mjs.map +1 -1
  413. package/dist/private/intl/combobox/en-US.cjs.map +1 -1
  414. package/dist/private/intl/combobox/en-US.js.map +1 -1
  415. package/dist/private/intl/combobox/en-US.mjs.map +1 -1
  416. package/dist/private/intl/menu/en-US.cjs.map +1 -1
  417. package/dist/private/intl/menu/en-US.js.map +1 -1
  418. package/dist/private/intl/menu/en-US.mjs.map +1 -1
  419. package/dist/private/label/Field.cjs.map +1 -1
  420. package/dist/private/label/Field.js.map +1 -1
  421. package/dist/private/label/Field.mjs.map +1 -1
  422. package/dist/private/label/HelpText.cjs.map +1 -1
  423. package/dist/private/label/HelpText.js.map +1 -1
  424. package/dist/private/label/HelpText.mjs.map +1 -1
  425. package/dist/private/label/Label.cjs.map +1 -1
  426. package/dist/private/label/Label.js.map +1 -1
  427. package/dist/private/label/Label.mjs.map +1 -1
  428. package/dist/private/labeledvalue/LabeledValue.cjs.map +1 -1
  429. package/dist/private/labeledvalue/LabeledValue.js.map +1 -1
  430. package/dist/private/labeledvalue/LabeledValue.mjs.map +1 -1
  431. package/dist/private/layout/Flex.cjs.map +1 -1
  432. package/dist/private/layout/Flex.js.map +1 -1
  433. package/dist/private/layout/Flex.mjs.map +1 -1
  434. package/dist/private/layout/Grid.cjs.map +1 -1
  435. package/dist/private/layout/Grid.js.map +1 -1
  436. package/dist/private/layout/Grid.mjs.map +1 -1
  437. package/dist/private/link/Link.cjs.map +1 -1
  438. package/dist/private/link/Link.js.map +1 -1
  439. package/dist/private/link/Link.mjs.map +1 -1
  440. package/dist/private/link_vars.css +38 -37
  441. package/dist/private/link_vars.css.map +1 -1
  442. package/dist/private/link_vars_css.cjs +11 -11
  443. package/dist/private/link_vars_css.mjs +11 -11
  444. package/dist/private/list/DragPreview.cjs.map +1 -1
  445. package/dist/private/list/DragPreview.js.map +1 -1
  446. package/dist/private/list/DragPreview.mjs.map +1 -1
  447. package/dist/private/list/InsertionIndicator.cjs.map +1 -1
  448. package/dist/private/list/InsertionIndicator.js.map +1 -1
  449. package/dist/private/list/InsertionIndicator.mjs.map +1 -1
  450. package/dist/private/list/ListView.cjs +2 -1
  451. package/dist/private/list/ListView.cjs.map +1 -1
  452. package/dist/private/list/ListView.js +2 -1
  453. package/dist/private/list/ListView.js.map +1 -1
  454. package/dist/private/list/ListView.mjs +2 -1
  455. package/dist/private/list/ListView.mjs.map +1 -1
  456. package/dist/private/list/ListViewItem.cjs.map +1 -1
  457. package/dist/private/list/ListViewItem.js.map +1 -1
  458. package/dist/private/list/ListViewItem.mjs.map +1 -1
  459. package/dist/private/list/ListViewLayout.cjs.map +1 -1
  460. package/dist/private/list/ListViewLayout.js.map +1 -1
  461. package/dist/private/list/ListViewLayout.mjs.map +1 -1
  462. package/dist/private/list/RootDropIndicator.cjs.map +1 -1
  463. package/dist/private/list/RootDropIndicator.js.map +1 -1
  464. package/dist/private/list/RootDropIndicator.mjs.map +1 -1
  465. package/dist/private/list/styles.css +108 -104
  466. package/dist/private/list/styles.css.map +1 -1
  467. package/dist/private/list/styles_css.cjs +63 -63
  468. package/dist/private/list/styles_css.cjs.map +1 -1
  469. package/dist/private/list/styles_css.mjs +63 -63
  470. package/dist/private/list/styles_css.mjs.map +1 -1
  471. package/dist/private/listbox/ListBox.cjs.map +1 -1
  472. package/dist/private/listbox/ListBox.js.map +1 -1
  473. package/dist/private/listbox/ListBox.mjs.map +1 -1
  474. package/dist/private/listbox/ListBoxBase.cjs +4 -2
  475. package/dist/private/listbox/ListBoxBase.cjs.map +1 -1
  476. package/dist/private/listbox/ListBoxBase.js +4 -2
  477. package/dist/private/listbox/ListBoxBase.js.map +1 -1
  478. package/dist/private/listbox/ListBoxBase.mjs +4 -2
  479. package/dist/private/listbox/ListBoxBase.mjs.map +1 -1
  480. package/dist/private/listbox/ListBoxContext.cjs.map +1 -1
  481. package/dist/private/listbox/ListBoxContext.js.map +1 -1
  482. package/dist/private/listbox/ListBoxContext.mjs.map +1 -1
  483. package/dist/private/listbox/ListBoxLayout.cjs.map +1 -1
  484. package/dist/private/listbox/ListBoxLayout.js.map +1 -1
  485. package/dist/private/listbox/ListBoxLayout.mjs.map +1 -1
  486. package/dist/private/listbox/ListBoxOption.cjs.map +1 -1
  487. package/dist/private/listbox/ListBoxOption.js.map +1 -1
  488. package/dist/private/listbox/ListBoxOption.mjs.map +1 -1
  489. package/dist/private/listbox/ListBoxSection.cjs.map +1 -1
  490. package/dist/private/listbox/ListBoxSection.js.map +1 -1
  491. package/dist/private/listbox/ListBoxSection.mjs.map +1 -1
  492. package/dist/private/menu/ActionMenu.cjs.map +1 -1
  493. package/dist/private/menu/ActionMenu.js.map +1 -1
  494. package/dist/private/menu/ActionMenu.mjs.map +1 -1
  495. package/dist/private/menu/ContextualHelpTrigger.cjs.map +1 -1
  496. package/dist/private/menu/ContextualHelpTrigger.js.map +1 -1
  497. package/dist/private/menu/ContextualHelpTrigger.mjs.map +1 -1
  498. package/dist/private/menu/Menu.cjs.map +1 -1
  499. package/dist/private/menu/Menu.js.map +1 -1
  500. package/dist/private/menu/Menu.mjs.map +1 -1
  501. package/dist/private/menu/MenuItem.cjs.map +1 -1
  502. package/dist/private/menu/MenuItem.js.map +1 -1
  503. package/dist/private/menu/MenuItem.mjs.map +1 -1
  504. package/dist/private/menu/MenuSection.cjs.map +1 -1
  505. package/dist/private/menu/MenuSection.js.map +1 -1
  506. package/dist/private/menu/MenuSection.mjs.map +1 -1
  507. package/dist/private/menu/MenuTrigger.cjs.map +1 -1
  508. package/dist/private/menu/MenuTrigger.js.map +1 -1
  509. package/dist/private/menu/MenuTrigger.mjs.map +1 -1
  510. package/dist/private/menu/SubmenuTrigger.cjs.map +1 -1
  511. package/dist/private/menu/SubmenuTrigger.js.map +1 -1
  512. package/dist/private/menu/SubmenuTrigger.mjs.map +1 -1
  513. package/dist/private/menu/context.cjs.map +1 -1
  514. package/dist/private/menu/context.js.map +1 -1
  515. package/dist/private/menu/context.mjs.map +1 -1
  516. package/dist/private/menu_vars.css +113 -104
  517. package/dist/private/menu_vars.css.map +1 -1
  518. package/dist/private/menu_vars_css.cjs +55 -55
  519. package/dist/private/menu_vars_css.mjs +55 -55
  520. package/dist/private/meter/Meter.cjs.map +1 -1
  521. package/dist/private/meter/Meter.js.map +1 -1
  522. package/dist/private/meter/Meter.mjs.map +1 -1
  523. package/dist/private/modal_vars.css +48 -42
  524. package/dist/private/modal_vars.css.map +1 -1
  525. package/dist/private/modal_vars_css.cjs +17 -17
  526. package/dist/private/modal_vars_css.cjs.map +1 -1
  527. package/dist/private/modal_vars_css.mjs +17 -17
  528. package/dist/private/modal_vars_css.mjs.map +1 -1
  529. package/dist/private/numberfield/NumberField.cjs.map +1 -1
  530. package/dist/private/numberfield/NumberField.js.map +1 -1
  531. package/dist/private/numberfield/NumberField.mjs.map +1 -1
  532. package/dist/private/numberfield/StepButton.cjs.map +1 -1
  533. package/dist/private/numberfield/StepButton.js.map +1 -1
  534. package/dist/private/numberfield/StepButton.mjs.map +1 -1
  535. package/dist/private/overlays/Modal.cjs.map +1 -1
  536. package/dist/private/overlays/Modal.js.map +1 -1
  537. package/dist/private/overlays/Modal.mjs.map +1 -1
  538. package/dist/private/overlays/OpenTransition.cjs.map +1 -1
  539. package/dist/private/overlays/OpenTransition.js.map +1 -1
  540. package/dist/private/overlays/OpenTransition.mjs.map +1 -1
  541. package/dist/private/overlays/Overlay.cjs.map +1 -1
  542. package/dist/private/overlays/Overlay.js.map +1 -1
  543. package/dist/private/overlays/Overlay.mjs.map +1 -1
  544. package/dist/private/overlays/Popover.cjs +15 -16
  545. package/dist/private/overlays/Popover.cjs.map +1 -1
  546. package/dist/private/overlays/Popover.js +15 -16
  547. package/dist/private/overlays/Popover.js.map +1 -1
  548. package/dist/private/overlays/Popover.mjs +15 -16
  549. package/dist/private/overlays/Popover.mjs.map +1 -1
  550. package/dist/private/overlays/Tray.cjs.map +1 -1
  551. package/dist/private/overlays/Tray.js.map +1 -1
  552. package/dist/private/overlays/Tray.mjs.map +1 -1
  553. package/dist/private/overlays/Underlay.cjs.map +1 -1
  554. package/dist/private/overlays/Underlay.js.map +1 -1
  555. package/dist/private/overlays/Underlay.mjs.map +1 -1
  556. package/dist/private/package.cjs +1 -1
  557. package/dist/private/package.cjs.map +1 -1
  558. package/dist/private/package.js +1 -1
  559. package/dist/private/package.js.map +1 -1
  560. package/dist/private/package.mjs +1 -1
  561. package/dist/private/package.mjs.map +1 -1
  562. package/dist/private/page_vars.css +20 -19
  563. package/dist/private/page_vars.css.map +1 -1
  564. package/dist/private/page_vars_css.cjs +6 -6
  565. package/dist/private/page_vars_css.mjs +6 -6
  566. package/dist/private/picker/Picker.cjs.map +1 -1
  567. package/dist/private/picker/Picker.js.map +1 -1
  568. package/dist/private/picker/Picker.mjs.map +1 -1
  569. package/dist/private/popover_vars.css +48 -46
  570. package/dist/private/popover_vars.css.map +1 -1
  571. package/dist/private/popover_vars_css.cjs +26 -26
  572. package/dist/private/popover_vars_css.mjs +26 -26
  573. package/dist/private/progress/ProgressBar.cjs.map +1 -1
  574. package/dist/private/progress/ProgressBar.js.map +1 -1
  575. package/dist/private/progress/ProgressBar.mjs.map +1 -1
  576. package/dist/private/progress/ProgressBarBase.cjs.map +1 -1
  577. package/dist/private/progress/ProgressBarBase.js.map +1 -1
  578. package/dist/private/progress/ProgressBarBase.mjs.map +1 -1
  579. package/dist/private/progress/ProgressCircle.cjs.map +1 -1
  580. package/dist/private/progress/ProgressCircle.js.map +1 -1
  581. package/dist/private/progress/ProgressCircle.mjs.map +1 -1
  582. package/dist/private/provider/Provider.cjs.map +1 -1
  583. package/dist/private/provider/Provider.js.map +1 -1
  584. package/dist/private/provider/Provider.mjs.map +1 -1
  585. package/dist/private/radio/Radio.cjs +2 -1
  586. package/dist/private/radio/Radio.cjs.map +1 -1
  587. package/dist/private/radio/Radio.js +2 -1
  588. package/dist/private/radio/Radio.js.map +1 -1
  589. package/dist/private/radio/Radio.mjs +2 -1
  590. package/dist/private/radio/Radio.mjs.map +1 -1
  591. package/dist/private/radio/RadioGroup.cjs.map +1 -1
  592. package/dist/private/radio/RadioGroup.js.map +1 -1
  593. package/dist/private/radio/RadioGroup.mjs.map +1 -1
  594. package/dist/private/radio/context.cjs.map +1 -1
  595. package/dist/private/radio/context.js.map +1 -1
  596. package/dist/private/radio/context.mjs.map +1 -1
  597. package/dist/private/radio_vars.css +65 -62
  598. package/dist/private/radio_vars.css.map +1 -1
  599. package/dist/private/radio_vars_css.cjs +13 -13
  600. package/dist/private/radio_vars_css.mjs +13 -13
  601. package/dist/private/rule_vars.css +34 -33
  602. package/dist/private/rule_vars.css.map +1 -1
  603. package/dist/private/rule_vars_css.cjs +11 -11
  604. package/dist/private/rule_vars_css.mjs +11 -11
  605. package/dist/private/search_vars.css +42 -36
  606. package/dist/private/search_vars.css.map +1 -1
  607. package/dist/private/search_vars_css.cjs +15 -15
  608. package/dist/private/search_vars_css.mjs +15 -15
  609. package/dist/private/searchfield/SearchField.cjs.map +1 -1
  610. package/dist/private/searchfield/SearchField.js.map +1 -1
  611. package/dist/private/searchfield/SearchField.mjs.map +1 -1
  612. package/dist/private/slider/RangeSlider.cjs.map +1 -1
  613. package/dist/private/slider/RangeSlider.js.map +1 -1
  614. package/dist/private/slider/RangeSlider.mjs.map +1 -1
  615. package/dist/private/slider/Slider.cjs +2 -2
  616. package/dist/private/slider/Slider.cjs.map +1 -1
  617. package/dist/private/slider/Slider.js +2 -2
  618. package/dist/private/slider/Slider.js.map +1 -1
  619. package/dist/private/slider/Slider.mjs +2 -2
  620. package/dist/private/slider/Slider.mjs.map +1 -1
  621. package/dist/private/slider/SliderBase.cjs.map +1 -1
  622. package/dist/private/slider/SliderBase.js.map +1 -1
  623. package/dist/private/slider/SliderBase.mjs.map +1 -1
  624. package/dist/private/slider/SliderThumb.cjs.map +1 -1
  625. package/dist/private/slider/SliderThumb.js.map +1 -1
  626. package/dist/private/slider/SliderThumb.mjs.map +1 -1
  627. package/dist/private/slider_vars.css +169 -155
  628. package/dist/private/slider_vars.css.map +1 -1
  629. package/dist/private/slider_vars_css.cjs +46 -46
  630. package/dist/private/slider_vars_css.cjs.map +1 -1
  631. package/dist/private/slider_vars_css.mjs +46 -46
  632. package/dist/private/slider_vars_css.mjs.map +1 -1
  633. package/dist/private/statuslight/StatusLight.cjs.map +1 -1
  634. package/dist/private/statuslight/StatusLight.js.map +1 -1
  635. package/dist/private/statuslight/StatusLight.mjs.map +1 -1
  636. package/dist/private/statuslight_vars.css +43 -41
  637. package/dist/private/statuslight_vars.css.map +1 -1
  638. package/dist/private/statuslight_vars_css.cjs +21 -21
  639. package/dist/private/statuslight_vars_css.mjs +21 -21
  640. package/dist/private/steplist/StepList.cjs.map +1 -1
  641. package/dist/private/steplist/StepList.js.map +1 -1
  642. package/dist/private/steplist/StepList.mjs.map +1 -1
  643. package/dist/private/steplist/StepListItem.cjs +6 -2
  644. package/dist/private/steplist/StepListItem.cjs.map +1 -1
  645. package/dist/private/steplist/StepListItem.js +6 -2
  646. package/dist/private/steplist/StepListItem.js.map +1 -1
  647. package/dist/private/steplist/StepListItem.mjs +6 -2
  648. package/dist/private/steplist/StepListItem.mjs.map +1 -1
  649. package/dist/private/steplist_vars.css +96 -94
  650. package/dist/private/steplist_vars.css.map +1 -1
  651. package/dist/private/steplist_vars_css.cjs +29 -29
  652. package/dist/private/steplist_vars_css.mjs +29 -29
  653. package/dist/private/stepper_vars.css +146 -143
  654. package/dist/private/stepper_vars.css.map +1 -1
  655. package/dist/private/stepper_vars_css.cjs +46 -46
  656. package/dist/private/stepper_vars_css.mjs +46 -46
  657. package/dist/private/switch/Switch.cjs +2 -1
  658. package/dist/private/switch/Switch.cjs.map +1 -1
  659. package/dist/private/switch/Switch.js +2 -1
  660. package/dist/private/switch/Switch.js.map +1 -1
  661. package/dist/private/switch/Switch.mjs +2 -1
  662. package/dist/private/switch/Switch.mjs.map +1 -1
  663. package/dist/private/table/DragPreview.cjs.map +1 -1
  664. package/dist/private/table/DragPreview.js.map +1 -1
  665. package/dist/private/table/DragPreview.mjs.map +1 -1
  666. package/dist/private/table/InsertionIndicator.cjs.map +1 -1
  667. package/dist/private/table/InsertionIndicator.js.map +1 -1
  668. package/dist/private/table/InsertionIndicator.mjs.map +1 -1
  669. package/dist/private/table/Nubbin.cjs.map +1 -1
  670. package/dist/private/table/Nubbin.js.map +1 -1
  671. package/dist/private/table/Nubbin.mjs.map +1 -1
  672. package/dist/private/table/Resizer.cjs.map +1 -1
  673. package/dist/private/table/Resizer.js.map +1 -1
  674. package/dist/private/table/Resizer.mjs.map +1 -1
  675. package/dist/private/table/RootDropIndicator.cjs.map +1 -1
  676. package/dist/private/table/RootDropIndicator.js.map +1 -1
  677. package/dist/private/table/RootDropIndicator.mjs.map +1 -1
  678. package/dist/private/table/TableView.cjs +2 -1
  679. package/dist/private/table/TableView.cjs.map +1 -1
  680. package/dist/private/table/TableView.js +2 -1
  681. package/dist/private/table/TableView.js.map +1 -1
  682. package/dist/private/table/TableView.mjs +2 -1
  683. package/dist/private/table/TableView.mjs.map +1 -1
  684. package/dist/private/table/TableViewBase.cjs.map +1 -1
  685. package/dist/private/table/TableViewBase.js.map +1 -1
  686. package/dist/private/table/TableViewBase.mjs.map +1 -1
  687. package/dist/private/table/TableViewLayout.cjs.map +1 -1
  688. package/dist/private/table/TableViewLayout.js.map +1 -1
  689. package/dist/private/table/TableViewLayout.mjs.map +1 -1
  690. package/dist/private/table/TableViewWithoutExpanding.cjs.map +1 -1
  691. package/dist/private/table/TableViewWithoutExpanding.js.map +1 -1
  692. package/dist/private/table/TableViewWithoutExpanding.mjs.map +1 -1
  693. package/dist/private/table/TreeGridTableView.cjs.map +1 -1
  694. package/dist/private/table/TreeGridTableView.js.map +1 -1
  695. package/dist/private/table/TreeGridTableView.mjs.map +1 -1
  696. package/dist/private/table/table.css +29 -28
  697. package/dist/private/table/table.css.map +1 -1
  698. package/dist/private/table/table_css.cjs +22 -22
  699. package/dist/private/table/table_css.cjs.map +1 -1
  700. package/dist/private/table/table_css.mjs +22 -22
  701. package/dist/private/table/table_css.mjs.map +1 -1
  702. package/dist/private/table_vars.css +159 -153
  703. package/dist/private/table_vars.css.map +1 -1
  704. package/dist/private/table_vars_css.cjs +63 -63
  705. package/dist/private/table_vars_css.mjs +63 -63
  706. package/dist/private/tabs/Tabs.cjs.map +1 -1
  707. package/dist/private/tabs/Tabs.js.map +1 -1
  708. package/dist/private/tabs/Tabs.mjs.map +1 -1
  709. package/dist/private/tabs_vars.css +108 -103
  710. package/dist/private/tabs_vars.css.map +1 -1
  711. package/dist/private/tabs_vars_css.cjs +26 -26
  712. package/dist/private/tabs_vars_css.mjs +26 -26
  713. package/dist/private/tag/Tag.cjs.map +1 -1
  714. package/dist/private/tag/Tag.js.map +1 -1
  715. package/dist/private/tag/Tag.mjs.map +1 -1
  716. package/dist/private/tag/TagGroup.cjs.map +1 -1
  717. package/dist/private/tag/TagGroup.js.map +1 -1
  718. package/dist/private/tag/TagGroup.mjs.map +1 -1
  719. package/dist/private/tags_vars.css +58 -54
  720. package/dist/private/tags_vars.css.map +1 -1
  721. package/dist/private/tags_vars_css.cjs +26 -26
  722. package/dist/private/tags_vars_css.mjs +26 -26
  723. package/dist/private/text/Heading.cjs.map +1 -1
  724. package/dist/private/text/Heading.js.map +1 -1
  725. package/dist/private/text/Heading.mjs.map +1 -1
  726. package/dist/private/text/Keyboard.cjs.map +1 -1
  727. package/dist/private/text/Keyboard.js.map +1 -1
  728. package/dist/private/text/Keyboard.mjs.map +1 -1
  729. package/dist/private/text/Text.cjs.map +1 -1
  730. package/dist/private/text/Text.js.map +1 -1
  731. package/dist/private/text/Text.mjs.map +1 -1
  732. package/dist/private/textfield/TextArea.cjs.map +1 -1
  733. package/dist/private/textfield/TextArea.js.map +1 -1
  734. package/dist/private/textfield/TextArea.mjs.map +1 -1
  735. package/dist/private/textfield/TextField.cjs.map +1 -1
  736. package/dist/private/textfield/TextField.js.map +1 -1
  737. package/dist/private/textfield/TextField.mjs.map +1 -1
  738. package/dist/private/textfield/TextFieldBase.cjs.map +1 -1
  739. package/dist/private/textfield/TextFieldBase.js.map +1 -1
  740. package/dist/private/textfield/TextFieldBase.mjs.map +1 -1
  741. package/dist/private/textfield_vars.css +109 -97
  742. package/dist/private/textfield_vars.css.map +1 -1
  743. package/dist/private/textfield_vars_css.cjs +22 -22
  744. package/dist/private/textfield_vars_css.mjs +22 -22
  745. package/dist/private/toast/Toast.cjs.map +1 -1
  746. package/dist/private/toast/Toast.js.map +1 -1
  747. package/dist/private/toast/Toast.mjs.map +1 -1
  748. package/dist/private/toast/ToastContainer.cjs +1 -1
  749. package/dist/private/toast/ToastContainer.cjs.map +1 -1
  750. package/dist/private/toast/ToastContainer.js +1 -1
  751. package/dist/private/toast/ToastContainer.js.map +1 -1
  752. package/dist/private/toast/ToastContainer.mjs +1 -1
  753. package/dist/private/toast/ToastContainer.mjs.map +1 -1
  754. package/dist/private/toast/Toaster.cjs.map +1 -1
  755. package/dist/private/toast/Toaster.js.map +1 -1
  756. package/dist/private/toast/Toaster.mjs.map +1 -1
  757. package/dist/private/toast/toastContainer.css +38 -37
  758. package/dist/private/toast/toastContainer.css.map +1 -1
  759. package/dist/private/toast/toastContainer_css.cjs +18 -18
  760. package/dist/private/toast/toastContainer_css.cjs.map +1 -1
  761. package/dist/private/toast/toastContainer_css.mjs +18 -18
  762. package/dist/private/toast/toastContainer_css.mjs.map +1 -1
  763. package/dist/private/toggle_vars.css +89 -83
  764. package/dist/private/toggle_vars.css.map +1 -1
  765. package/dist/private/toggle_vars_css.cjs +12 -12
  766. package/dist/private/toggle_vars_css.cjs.map +1 -1
  767. package/dist/private/toggle_vars_css.mjs +12 -12
  768. package/dist/private/toggle_vars_css.mjs.map +1 -1
  769. package/dist/private/tooltip/Tooltip.cjs.map +1 -1
  770. package/dist/private/tooltip/Tooltip.js.map +1 -1
  771. package/dist/private/tooltip/Tooltip.mjs.map +1 -1
  772. package/dist/private/tooltip/TooltipTrigger.cjs.map +1 -1
  773. package/dist/private/tooltip/TooltipTrigger.js.map +1 -1
  774. package/dist/private/tooltip/TooltipTrigger.mjs.map +1 -1
  775. package/dist/private/tooltip/context.cjs.map +1 -1
  776. package/dist/private/tooltip/context.js.map +1 -1
  777. package/dist/private/tooltip/context.mjs.map +1 -1
  778. package/dist/private/tooltip_vars.css +66 -65
  779. package/dist/private/tooltip_vars.css.map +1 -1
  780. package/dist/private/tooltip_vars_css.cjs +33 -33
  781. package/dist/private/tooltip_vars_css.cjs.map +1 -1
  782. package/dist/private/tooltip_vars_css.mjs +33 -33
  783. package/dist/private/tooltip_vars_css.mjs.map +1 -1
  784. package/dist/private/tray_vars.css +45 -38
  785. package/dist/private/tray_vars.css.map +1 -1
  786. package/dist/private/tray_vars_css.cjs +15 -15
  787. package/dist/private/tray_vars_css.mjs +15 -15
  788. package/dist/private/tree/TreeView.cjs +2 -1
  789. package/dist/private/tree/TreeView.cjs.map +1 -1
  790. package/dist/private/tree/TreeView.js +2 -1
  791. package/dist/private/tree/TreeView.js.map +1 -1
  792. package/dist/private/tree/TreeView.mjs +2 -1
  793. package/dist/private/tree/TreeView.mjs.map +1 -1
  794. package/dist/private/typography_index.css +22 -21
  795. package/dist/private/typography_index.css.map +1 -1
  796. package/dist/private/typography_index_css.cjs +8 -8
  797. package/dist/private/typography_index_css.mjs +8 -8
  798. package/dist/private/underlay_vars.css +40 -33
  799. package/dist/private/underlay_vars.css.map +1 -1
  800. package/dist/private/underlay_vars_css.cjs +14 -14
  801. package/dist/private/underlay_vars_css.mjs +14 -14
  802. package/dist/private/utils/BreakpointProvider.cjs.map +1 -1
  803. package/dist/private/utils/BreakpointProvider.js.map +1 -1
  804. package/dist/private/utils/BreakpointProvider.mjs.map +1 -1
  805. package/dist/private/utils/Slots.cjs +2 -1
  806. package/dist/private/utils/Slots.cjs.map +1 -1
  807. package/dist/private/utils/Slots.js +2 -1
  808. package/dist/private/utils/Slots.js.map +1 -1
  809. package/dist/private/utils/Slots.mjs +2 -1
  810. package/dist/private/utils/Slots.mjs.map +1 -1
  811. package/dist/private/utils/classNames.cjs.map +1 -1
  812. package/dist/private/utils/classNames.js.map +1 -1
  813. package/dist/private/utils/classNames.mjs.map +1 -1
  814. package/dist/private/utils/getWrappedElement.cjs.map +1 -1
  815. package/dist/private/utils/getWrappedElement.js.map +1 -1
  816. package/dist/private/utils/getWrappedElement.mjs.map +1 -1
  817. package/dist/private/utils/styleProps.cjs.map +1 -1
  818. package/dist/private/utils/styleProps.js.map +1 -1
  819. package/dist/private/utils/styleProps.mjs.map +1 -1
  820. package/dist/private/utils/useDOMRef.cjs.map +1 -1
  821. package/dist/private/utils/useDOMRef.js.map +1 -1
  822. package/dist/private/utils/useDOMRef.mjs.map +1 -1
  823. package/dist/private/utils/useMediaQuery.cjs.map +1 -1
  824. package/dist/private/utils/useMediaQuery.js.map +1 -1
  825. package/dist/private/utils/useMediaQuery.mjs.map +1 -1
  826. package/dist/private/vars_express.css +6 -5
  827. package/dist/private/vars_express.css.map +1 -1
  828. package/dist/private/vars_express_css.cjs +3 -3
  829. package/dist/private/vars_express_css.cjs.map +1 -1
  830. package/dist/private/vars_express_css.mjs +3 -3
  831. package/dist/private/vars_express_css.mjs.map +1 -1
  832. package/dist/private/vars_spectrum-dark.css +1 -1
  833. package/dist/private/vars_spectrum-dark.css.map +1 -1
  834. package/dist/private/vars_spectrum-dark_css.cjs +1 -1
  835. package/dist/private/vars_spectrum-dark_css.cjs.map +1 -1
  836. package/dist/private/vars_spectrum-dark_css.mjs +1 -1
  837. package/dist/private/vars_spectrum-dark_css.mjs.map +1 -1
  838. package/dist/private/vars_spectrum-darkest.css +1 -1
  839. package/dist/private/vars_spectrum-darkest.css.map +1 -1
  840. package/dist/private/vars_spectrum-darkest_css.cjs +1 -1
  841. package/dist/private/vars_spectrum-darkest_css.cjs.map +1 -1
  842. package/dist/private/vars_spectrum-darkest_css.mjs +1 -1
  843. package/dist/private/vars_spectrum-darkest_css.mjs.map +1 -1
  844. package/dist/private/vars_spectrum-global.css +5 -4
  845. package/dist/private/vars_spectrum-global.css.map +1 -1
  846. package/dist/private/vars_spectrum-global_css.cjs +7 -7
  847. package/dist/private/vars_spectrum-global_css.cjs.map +1 -1
  848. package/dist/private/vars_spectrum-global_css.mjs +7 -7
  849. package/dist/private/vars_spectrum-global_css.mjs.map +1 -1
  850. package/dist/private/vars_spectrum-large.css +1 -1
  851. package/dist/private/vars_spectrum-large.css.map +1 -1
  852. package/dist/private/vars_spectrum-large_css.cjs +1 -1
  853. package/dist/private/vars_spectrum-large_css.cjs.map +1 -1
  854. package/dist/private/vars_spectrum-large_css.mjs +1 -1
  855. package/dist/private/vars_spectrum-large_css.mjs.map +1 -1
  856. package/dist/private/vars_spectrum-light.css +1 -1
  857. package/dist/private/vars_spectrum-light.css.map +1 -1
  858. package/dist/private/vars_spectrum-light_css.cjs +1 -1
  859. package/dist/private/vars_spectrum-light_css.cjs.map +1 -1
  860. package/dist/private/vars_spectrum-light_css.mjs +1 -1
  861. package/dist/private/vars_spectrum-light_css.mjs.map +1 -1
  862. package/dist/private/vars_spectrum-lightest.css +1 -1
  863. package/dist/private/vars_spectrum-lightest.css.map +1 -1
  864. package/dist/private/vars_spectrum-lightest_css.cjs +1 -1
  865. package/dist/private/vars_spectrum-lightest_css.cjs.map +1 -1
  866. package/dist/private/vars_spectrum-lightest_css.mjs +1 -1
  867. package/dist/private/vars_spectrum-lightest_css.mjs.map +1 -1
  868. package/dist/private/vars_spectrum-medium.css +1 -1
  869. package/dist/private/vars_spectrum-medium.css.map +1 -1
  870. package/dist/private/vars_spectrum-medium_css.cjs +1 -1
  871. package/dist/private/vars_spectrum-medium_css.cjs.map +1 -1
  872. package/dist/private/vars_spectrum-medium_css.mjs +1 -1
  873. package/dist/private/vars_spectrum-medium_css.mjs.map +1 -1
  874. package/dist/private/view/Content.cjs.map +1 -1
  875. package/dist/private/view/Content.js.map +1 -1
  876. package/dist/private/view/Content.mjs.map +1 -1
  877. package/dist/private/view/Footer.cjs.map +1 -1
  878. package/dist/private/view/Footer.js.map +1 -1
  879. package/dist/private/view/Footer.mjs.map +1 -1
  880. package/dist/private/view/Header.cjs.map +1 -1
  881. package/dist/private/view/Header.js.map +1 -1
  882. package/dist/private/view/Header.mjs.map +1 -1
  883. package/dist/private/view/View.cjs.map +1 -1
  884. package/dist/private/view/View.js.map +1 -1
  885. package/dist/private/view/View.mjs.map +1 -1
  886. package/dist/private/well/Well.cjs.map +1 -1
  887. package/dist/private/well/Well.js.map +1 -1
  888. package/dist/private/well/Well.mjs.map +1 -1
  889. package/dist/private/well_vars.css +20 -19
  890. package/dist/private/well_vars.css.map +1 -1
  891. package/dist/private/well_vars_css.cjs +6 -6
  892. package/dist/private/well_vars_css.mjs +6 -6
  893. package/dist/types/src/accordion/Accordion.d.ts +5 -1
  894. package/dist/types/src/actionbar/ActionBar.d.ts +14 -6
  895. package/dist/types/src/actionbar/ActionBarContainer.d.ts +4 -1
  896. package/dist/types/src/actiongroup/ActionGroup.d.ts +14 -5
  897. package/dist/types/src/autocomplete/SearchAutocomplete.d.ts +16 -4
  898. package/dist/types/src/badge/Badge.d.ts +2 -1
  899. package/dist/types/src/breadcrumbs/Breadcrumbs.d.ts +1 -0
  900. package/dist/types/src/button/ActionButton.d.ts +7 -3
  901. package/dist/types/src/button/Button.d.ts +1 -0
  902. package/dist/types/src/button/ToggleButton.d.ts +4 -1
  903. package/dist/types/src/buttongroup/ButtonGroup.d.ts +2 -0
  904. package/dist/types/src/calendar/Calendar.d.ts +6 -4
  905. package/dist/types/src/calendar/RangeCalendar.d.ts +8 -5
  906. package/dist/types/src/card/BaseLayout.d.ts +1 -0
  907. package/dist/types/src/card/GalleryLayout.d.ts +11 -6
  908. package/dist/types/src/card/GridLayout.d.ts +8 -1
  909. package/dist/types/src/card/WaterfallLayout.d.ts +4 -0
  910. package/dist/types/src/checkbox/Checkbox.d.ts +4 -2
  911. package/dist/types/src/checkbox/CheckboxGroup.d.ts +1 -0
  912. package/dist/types/src/color/ColorArea.d.ts +2 -1
  913. package/dist/types/src/color/ColorPicker.d.ts +4 -2
  914. package/dist/types/src/color/ColorSlider.d.ts +4 -1
  915. package/dist/types/src/color/ColorSwatch.d.ts +4 -2
  916. package/dist/types/src/color/ColorSwatchPicker.d.ts +6 -3
  917. package/dist/types/src/combobox/ComboBox.d.ts +21 -7
  918. package/dist/types/src/contextualhelp/ContextualHelp.d.ts +4 -1
  919. package/dist/types/src/datepicker/DateField.d.ts +2 -0
  920. package/dist/types/src/datepicker/DatePicker.d.ts +9 -4
  921. package/dist/types/src/datepicker/TimeField.d.ts +1 -0
  922. package/dist/types/src/dialog/AlertDialog.d.ts +3 -2
  923. package/dist/types/src/dialog/Dialog.d.ts +3 -2
  924. package/dist/types/src/dialog/DialogContainer.d.ts +5 -1
  925. package/dist/types/src/dialog/DialogTrigger.d.ts +18 -7
  926. package/dist/types/src/divider/Divider.d.ts +3 -0
  927. package/dist/types/src/dnd/useDragAndDrop.d.ts +10 -4
  928. package/dist/types/src/form/Form.d.ts +4 -1
  929. package/dist/types/src/icon/Icon.d.ts +3 -1
  930. package/dist/types/src/icon/Illustration.d.ts +1 -0
  931. package/dist/types/src/image/Image.d.ts +5 -2
  932. package/dist/types/src/inlinealert/InlineAlert.d.ts +3 -2
  933. package/dist/types/src/label/HelpText.d.ts +2 -1
  934. package/dist/types/src/labeledvalue/LabeledValue.d.ts +2 -1
  935. package/dist/types/src/layout/Grid.d.ts +3 -0
  936. package/dist/types/src/link/Link.d.ts +1 -0
  937. package/dist/types/src/list/ListView.d.ts +12 -5
  938. package/dist/types/src/menu/ActionMenu.d.ts +4 -1
  939. package/dist/types/src/menu/Menu.d.ts +1 -1
  940. package/dist/types/src/menu/MenuTrigger.d.ts +4 -0
  941. package/dist/types/src/meter/Meter.d.ts +1 -0
  942. package/dist/types/src/numberfield/NumberField.d.ts +3 -1
  943. package/dist/types/src/overlays/Popover.d.ts +10 -11
  944. package/dist/types/src/picker/Picker.d.ts +11 -3
  945. package/dist/types/src/progress/ProgressBar.d.ts +2 -2
  946. package/dist/types/src/progress/ProgressBarBase.d.ts +9 -2
  947. package/dist/types/src/progress/ProgressCircle.d.ts +8 -3
  948. package/dist/types/src/provider/Provider.d.ts +2 -2
  949. package/dist/types/src/provider/types.d.ts +8 -4
  950. package/dist/types/src/slider/RangeSlider.d.ts +6 -3
  951. package/dist/types/src/slider/Slider.d.ts +13 -4
  952. package/dist/types/src/slider/SliderBase.d.ts +9 -2
  953. package/dist/types/src/steplist/StepList.d.ts +3 -0
  954. package/dist/types/src/table/TableView.d.ts +25 -11
  955. package/dist/types/src/table/types.d.ts +4 -3
  956. package/dist/types/src/tabs/Tabs.d.ts +20 -8
  957. package/dist/types/src/tag/TagGroup.d.ts +9 -3
  958. package/dist/types/src/text/Heading.d.ts +2 -0
  959. package/dist/types/src/text/Keyboard.d.ts +1 -0
  960. package/dist/types/src/text/Text.d.ts +1 -0
  961. package/dist/types/src/tooltip/Tooltip.d.ts +1 -0
  962. package/dist/types/src/tooltip/TooltipTrigger.d.ts +2 -0
  963. package/dist/types/src/tree/TreeView.d.ts +2 -2
  964. package/dist/types/src/view/View.d.ts +3 -2
  965. package/dist/types/src/well/Well.d.ts +3 -2
  966. package/package.json +12 -10
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiFM,MAAM,0DAAW,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,SAA2B,KAA+B,EAAE,GAA8B;IAC1I,QAAQ,CAAA,GAAA,yCAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,yCAAW,EAAE;IAErB,IAAI,YAAY,CAAA,GAAA,aAAK,EAAE;IACvB,CAAA,GAAA,gBAAQ,EAAE;QACR,IAAI,MAAM,WAAW,IAAI,CAAC,UAAU,OAAO,IAAI,QAAQ,GAAG,CAAC,QAAQ,KAAK,cAAc;YACpF,QAAQ,IAAI,CAAC;YACb,UAAU,OAAO,GAAG;QACtB;IACF,GAAG;QAAC,MAAM,WAAW;KAAC;IAEtB,IAAI,WAAW,CAAA,GAAA,yCAAgB;IAC/B,IAAI,UACF,0DAA0D;IAC1D,qBAAO,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EAAE,CAAA,GAAA,uDAAK,GAAG;QAC/B,gBAAgB,CAAA,GAAA,yCAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;QACnC,WAAW;qBACX,gCAAC;QACE,GAAG,UAAU;QACd,KAAK;QACL,OAAO;QACP,WACE,CAAA,GAAA,yCAAS,EACP,CAAA,GAAA,uDAAK,GACL,uBACA;YACE,8BAA8B;YAC9B,eAAe;YACf,gCAAgC,oBAAoB,aAAa,CAAC;YAClE,cAAc;QAChB,GACA;qBAGJ,gCAAC,CAAA,GAAA,yCAAY;QACX,YAAY;QACZ,UAAU;QACV,kBACE,CAAA,GAAA,yCAAS,EACP,CAAA,GAAA,uDAAK,GACL;QAGJ,gBACE,CAAA,GAAA,yCAAS,EACP,CAAA,GAAA,uDAAK,GACL;QAGJ,yBACE,CAAA,GAAA,yCAAS,EACP,CAAA,GAAA,uDAAK,GACL;QAGJ,YAAY;QACZ,SAAS;QACT,iBAAiB;QACjB,uKAAuK;QACvK,8DAA8D;QAC9D,WAAW,eAAgB,CAAA,UAAU,gBAAgB,YAAY,iBAAiB,SAAQ;QAC1F,kBAAkB,gBAAgB,OAAO,gBAAgB;QACzD,kBAAA;sBACF,gCAAC,CAAA,GAAA,qBAAa;QAAE,qBAAA;QAAoB,WAAW;qBAC7C,gCAAC,CAAA,GAAA,yCAAU;QACR,GAAG,YAAY;QAChB,KAAK;QACL,kBACE,CAAA,GAAA,yCAAS,EACP,CAAA,GAAA,uDAAK,GACL;QAGJ,SAAS;QACT,iBAAiB;qBACjB,gCAAC,CAAA,GAAA,uCAAgB;QAAE,kBAAkB,CAAA,GAAA,yCAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;;AAMpE","sources":["packages/@adobe/react-spectrum/src/combobox/ComboBox.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaButtonProps} from 'react-aria/useButton';\n\nimport {AriaComboBoxProps, useComboBox} from 'react-aria/useComboBox';\nimport {AsyncLoadable, DimensionValue, DOMRefValue, FocusableRef, FocusableRefValue, LoadingState, SingleSelection, SpectrumFieldValidation, SpectrumLabelableProps, SpectrumTextInputBase, StyleProps} from '@react-types/shared';\nimport ChevronDownMedium from '@spectrum-icons/ui/ChevronDownMedium';\nimport {classNames} from '../utils/classNames';\nimport comboboxStyles from './combobox.css';\nimport {ComboBoxValidationValue, MenuTriggerAction, useComboBoxState} from 'react-stately/useComboBoxState';\nimport {dimensionValue} from '../utils/styleProps';\nimport {Field} from '../label/Field';\nimport {FieldButton} from '../button/FieldButton';\nimport {FocusRing} from 'react-aria/FocusRing';\nimport intlMessages from '../../intl/combobox/*.json';\nimport {ListBoxBase, useListBoxLayout} from '../listbox/ListBoxBase';\nimport {MobileComboBox} from './MobileComboBox';\n// @ts-ignore\nimport {Popover} from '../overlays/Popover';\nimport {PressResponder} from 'react-aria/private/interactions/PressResponder';\nimport {ProgressCircle} from '../progress/ProgressCircle';\nimport React, {\n ForwardedRef,\n InputHTMLAttributes,\n ReactElement,\n RefObject,\n useCallback,\n useEffect,\n useRef,\n useState\n} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/inputgroup/vars.css';\nimport {TextFieldBase} from '../textfield/TextFieldBase';\nimport textfieldStyles from '@adobe/spectrum-css-temp/components/textfield/vars.css';\nimport {useFilter} from 'react-aria/useFilter';\nimport {useFocusableRef, useUnwrapDOMRef} from '../utils/useDOMRef';\nimport {useFormProps} from '../form/Form';\nimport {useHover} from 'react-aria/useHover';\nimport {useIsMobileDevice} from '../utils/useIsMobileDevice';\nimport {useLayoutEffect} from 'react-aria/private/utils/useLayoutEffect';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useProvider, useProviderProps} from '../provider/Provider';\nimport {useResizeObserver} from 'react-aria/private/utils/useResizeObserver';\n\nexport interface SpectrumComboBoxProps<T> extends SpectrumTextInputBase, Omit<AriaComboBoxProps<T>, 'menuTrigger' | 'isInvalid' | 'validationState' | 'selectionMode' | 'selectedKey' | 'defaultSelectedKey' | 'onSelectionChange' | 'value' | 'defaultValue' | 'onChange'>, Omit<SingleSelection, 'disallowEmptySelection'>, SpectrumFieldValidation<ComboBoxValidationValue>, SpectrumLabelableProps, StyleProps, Omit<AsyncLoadable, 'isLoading'> {\n /**\n * The interaction required to display the ComboBox menu. Note that this prop has no effect on the mobile ComboBox experience.\n * @default 'input'\n */\n menuTrigger?: MenuTriggerAction,\n /** Whether the ComboBox should be displayed with a quiet style. */\n isQuiet?: boolean,\n /** Alignment of the menu relative to the input target.\n * @default 'start'\n */\n align?: 'start' | 'end',\n /**\n * Direction the menu will render relative to the ComboBox.\n * @default 'bottom'\n */\n direction?: 'bottom' | 'top',\n /** The current loading state of the ComboBox. Determines whether or not the progress circle should be shown. */\n loadingState?: LoadingState,\n /**\n * Whether the menu should automatically flip direction when space is limited.\n * @default true\n */\n shouldFlip?: boolean,\n /** Width of the menu. By default, matches width of the combobox. Note that the minimum width of the dropdown is always equal to the combobox's width. */\n menuWidth?: DimensionValue,\n /**\n * Whether the text or key of the selected item is submitted as part of an HTML form.\n * When `allowsCustomValue` is `true`, this option does not apply and the text is always submitted.\n * @default 'text'\n */\n formValue?: 'text' | 'key'\n}\n\n/**\n * ComboBoxes combine a text entry with a picker menu, allowing users to filter longer lists to only the selections matching a query.\n */\nexport const ComboBox = React.forwardRef(function ComboBox<T extends object>(props: SpectrumComboBoxProps<T>, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n\n let hasWarned = useRef(false);\n useEffect(() => {\n if (props.placeholder && !hasWarned.current && process.env.NODE_ENV !== 'production') {\n console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/ComboBox.html#help-text');\n hasWarned.current = true;\n }\n }, [props.placeholder]);\n\n let isMobile = useIsMobileDevice();\n if (isMobile) {\n // menuTrigger=focus/manual don't apply to mobile combobox\n return <MobileComboBox {...props} menuTrigger=\"input\" ref={ref} />;\n } else {\n return <ComboBoxBase {...props} ref={ref} />;\n }\n}) as <T>(props: SpectrumComboBoxProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;\n\nconst ComboBoxBase = React.forwardRef(function ComboBoxBase(props: SpectrumComboBoxProps<any>, ref: FocusableRef<HTMLElement>) {\n let {\n menuTrigger = 'input',\n shouldFlip = true,\n direction = 'bottom',\n align = 'start',\n isQuiet,\n loadingState,\n onLoadMore,\n allowsCustomValue,\n menuWidth: customMenuWidth,\n name,\n formValue = 'text'\n } = props;\n if (allowsCustomValue) {\n formValue = 'text';\n }\n\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/combobox');\n let isAsync = loadingState != null;\n let popoverRef = useRef<DOMRefValue<HTMLDivElement>>(null);\n let unwrappedPopoverRef = useUnwrapDOMRef(popoverRef);\n let buttonRef = useRef<FocusableRefValue<HTMLElement>>(null);\n let unwrappedButtonRef = useUnwrapDOMRef(buttonRef);\n let listBoxRef = useRef(null);\n let inputRef = useRef<HTMLInputElement>(null);\n // serve as the new popover `triggerRef` instead of `unwrappedButtonRef` before for better positioning.\n let inputGroupRef = useRef<HTMLDivElement>(null);\n let domRef = useFocusableRef(ref, inputRef);\n\n let {contains} = useFilter({sensitivity: 'base'});\n let state = useComboBoxState(\n {\n ...props,\n defaultFilter: contains,\n allowsEmptyCollection: isAsync\n }\n );\n let layout = useListBoxLayout();\n\n let {buttonProps, inputProps, listBoxProps, labelProps, descriptionProps, errorMessageProps, isInvalid, validationErrors, validationDetails} = useComboBox(\n {\n ...props,\n layoutDelegate: layout,\n buttonRef: unwrappedButtonRef,\n popoverRef: unwrappedPopoverRef,\n listBoxRef,\n inputRef: inputRef,\n menuTrigger,\n name: formValue === 'text' ? name : undefined\n },\n state\n );\n\n // Measure the width of the inputfield and the button to inform the width of the menu (below).\n let [menuWidth, setMenuWidth] = useState<number | undefined>(undefined);\n let {scale} = useProvider();\n\n let onResize = useCallback(() => {\n if (unwrappedButtonRef.current && inputRef.current) {\n let buttonWidth = unwrappedButtonRef.current.offsetWidth;\n let inputWidth = inputRef.current.offsetWidth;\n setMenuWidth(buttonWidth + inputWidth);\n }\n }, [unwrappedButtonRef, inputRef, setMenuWidth]);\n\n useResizeObserver({\n ref: domRef,\n onResize: onResize\n });\n\n useLayoutEffect(onResize, [scale, onResize]);\n\n let width = isQuiet ? undefined : menuWidth;\n let style = {\n width: customMenuWidth ? dimensionValue(customMenuWidth) : width,\n minWidth: isQuiet ? `calc(${menuWidth}px + calc(2 * var(--spectrum-dropdown-quiet-offset)))` : menuWidth\n };\n let cbInputProps = {...props, children: null};\n\n return (\n <>\n <Field\n {...props}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n isInvalid={isInvalid}\n validationErrors={validationErrors}\n validationDetails={validationDetails}\n labelProps={labelProps}\n ref={domRef}>\n <ComboBoxInput\n {...cbInputProps}\n isOpen={state.isOpen}\n loadingState={loadingState}\n inputProps={inputProps}\n inputRef={inputRef}\n triggerProps={buttonProps}\n triggerRef={buttonRef}\n validationState={props.validationState || (isInvalid ? 'invalid' : undefined)}\n ref={inputGroupRef} />\n </Field>\n {name && formValue === 'key' && <input type=\"hidden\" name={name} form={props.form} value={state.selectedKey ?? ''} />}\n <Popover\n state={state}\n UNSAFE_style={style}\n UNSAFE_className={classNames(styles, 'spectrum-InputGroup-popover', {'spectrum-InputGroup-popover--quiet': isQuiet})}\n ref={popoverRef}\n triggerRef={inputGroupRef}\n scrollRef={listBoxRef}\n placement={`${direction} ${align}`}\n hideArrow\n isNonModal\n shouldFlip={shouldFlip}>\n <ListBoxBase\n {...listBoxProps}\n ref={listBoxRef}\n disallowEmptySelection\n shouldSelectOnPressUp\n focusOnPointerEnter\n layout={layout}\n state={state}\n shouldUseVirtualFocus\n isLoading={loadingState === 'loading' || loadingState === 'loadingMore'}\n showLoadingSpinner={loadingState === 'loadingMore'}\n onLoadMore={onLoadMore}\n renderEmptyState={() => isAsync && (\n <span className={classNames(comboboxStyles, 'no-results')}>\n {loadingState === 'loading' ? stringFormatter.format('loading') : stringFormatter.format('noResults')}\n </span>\n )} />\n </Popover>\n </>\n );\n});\n\ninterface ComboBoxInputProps extends SpectrumComboBoxProps<unknown> {\n inputProps: InputHTMLAttributes<HTMLInputElement>,\n inputRef: RefObject<HTMLInputElement | HTMLTextAreaElement | null>,\n triggerProps: AriaButtonProps,\n triggerRef: RefObject<FocusableRefValue<HTMLElement> | null>,\n style?: React.CSSProperties,\n className?: string,\n isOpen?: boolean\n}\n\nconst ComboBoxInput = React.forwardRef(function ComboBoxInput(props: ComboBoxInputProps, ref: ForwardedRef<HTMLElement | null>) {\n let {\n isQuiet,\n isDisabled,\n validationState,\n inputProps,\n inputRef,\n triggerProps,\n triggerRef,\n autoFocus,\n style,\n className,\n loadingState,\n isOpen,\n menuTrigger\n } = props;\n let {hoverProps, isHovered} = useHover({});\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/combobox');\n let timeout = useRef<ReturnType<typeof setTimeout> | null>(null);\n let [showLoading, setShowLoading] = useState(false);\n\n let loadingCircle = (\n <ProgressCircle\n aria-label={stringFormatter.format('loading')}\n size=\"S\"\n isIndeterminate\n UNSAFE_className={classNames(\n textfieldStyles,\n 'spectrum-Textfield-circleLoader',\n classNames(\n styles,\n 'spectrum-InputGroup-input-circleLoader'\n )\n )} />\n );\n\n let isLoading = loadingState === 'loading' || loadingState === 'filtering';\n let inputValue = inputProps.value;\n let lastInputValue = useRef(inputValue);\n useEffect(() => {\n if (isLoading && !showLoading) {\n if (timeout.current === null) {\n timeout.current = setTimeout(() => {\n setShowLoading(true);\n }, 500);\n }\n\n // If user is typing, clear the timer and restart since it is a new request\n if (inputValue !== lastInputValue.current) {\n clearTimeout(timeout.current);\n timeout.current = setTimeout(() => {\n setShowLoading(true);\n }, 500);\n }\n } else if (!isLoading) {\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n timeout.current = null;\n }\n\n lastInputValue.current = inputValue;\n }, [isLoading, showLoading, inputValue]);\n\n let [prevIsLoading, setPrevIsLoading] = useState(isLoading);\n if (prevIsLoading !== isLoading && !isLoading) {\n setShowLoading(false);\n setPrevIsLoading(isLoading);\n }\n\n useEffect(() => {\n return () => {\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n timeout.current = null;\n };\n }, []);\n\n return (\n (<FocusRing\n within\n isTextInput\n focusClass={classNames(styles, 'is-focused')}\n focusRingClass={classNames(styles, 'focus-ring')}\n autoFocus={autoFocus}>\n <div\n {...hoverProps}\n ref={ref as RefObject<HTMLDivElement | null>}\n style={style}\n className={\n classNames(\n styles,\n 'spectrum-InputGroup',\n {\n 'spectrum-InputGroup--quiet': isQuiet,\n 'is-disabled': isDisabled,\n 'spectrum-InputGroup--invalid': validationState === 'invalid' && !isDisabled,\n 'is-hovered': isHovered\n },\n className\n )\n }>\n <TextFieldBase\n inputProps={inputProps}\n inputRef={inputRef}\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-InputGroup-field'\n )\n }\n inputClassName={\n classNames(\n styles,\n 'spectrum-InputGroup-input'\n )\n }\n validationIconClassName={\n classNames(\n styles,\n 'spectrum-InputGroup-input-validationIcon'\n )\n }\n isDisabled={isDisabled}\n isQuiet={isQuiet}\n validationState={validationState}\n // loading circle should only be displayed if menu is open, if menuTrigger is \"manual\", or first time load (to stop circle from showing up when user selects an option)\n // TODO: add special case for completionMode: complete as well\n isLoading={showLoading && (isOpen || menuTrigger === 'manual' || loadingState === 'loading')}\n loadingIndicator={loadingState != null ? loadingCircle : undefined}\n disableFocusRing />\n <PressResponder preventFocusOnPress isPressed={isOpen}>\n <FieldButton\n {...triggerProps}\n ref={triggerRef}\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-FieldButton'\n )\n }\n isQuiet={isQuiet}\n validationState={validationState}>\n <ChevronDownMedium UNSAFE_className={classNames(styles, 'spectrum-Dropdown-chevron')} />\n </FieldButton>\n </PressResponder>\n </div>\n </FocusRing>)\n );\n});\n"],"names":[],"version":3,"file":"ComboBox.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmIM,MAAM,0DAAW,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,SAChD,KAA+B,EAC/B,GAA8B;IAE9B,QAAQ,CAAA,GAAA,yCAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,yCAAW,EAAE;IAErB,IAAI,YAAY,CAAA,GAAA,aAAK,EAAE;IACvB,CAAA,GAAA,gBAAQ,EAAE;QACR,IAAI,MAAM,WAAW,IAAI,CAAC,UAAU,OAAO,IAAI,QAAQ,GAAG,CAAC,QAAQ,KAAK,cAAc;YACpF,QAAQ,IAAI,CACV;YAEF,UAAU,OAAO,GAAG;QACtB;IACF,GAAG;QAAC,MAAM,WAAW;KAAC;IAEtB,IAAI,WAAW,CAAA,GAAA,yCAAgB;IAC/B,IAAI,UACF,0DAA0D;IAC1D,qBAAO,gCAAC,CAAA,GAAA,yCAAa;QAAG,GAAG,KAAK;QAAE,aAAY;QAAQ,KAAK;;SAE3D,qBAAO,gCAAC;QAAc,GAAG,KAAK;QAAE,KAAK;;AAEzC;AAEA,MAAM,mDAAe,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,aAC7C,KAAiC,EACjC,GAA8B;IAE9B,IAAI,eACF,cAAc,qBACd,aAAa,iBACb,YAAY,iBACZ,QAAQ,kBACR,OAAO,gBACP,YAAY,cACZ,UAAU,qBACV,iBAAiB,EACjB,WAAW,eAAe,QAC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,UAAU;QACV,kBAAkB,CAAA,GAAA,yCAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;QACrC,gBAAgB,CAAA,GAAA,yCAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;QACnC,yBAAyB,CAAA,GAAA,yCAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;QAC5C,YAAY;QACZ,SAAS;QACT,iBAAiB;QACjB,uKAAuK;QACvK,8DAA8D;QAC9D,WACE,eAAgB,CAAA,UAAU,gBAAgB,YAAY,iBAAiB,SAAQ;QAEjF,kBAAkB,gBAAgB,OAAO,gBAAgB;QACzD,kBAAA;sBAEF,gCAAC,CAAA,GAAA,qBAAa;QAAE,qBAAA;QAAoB,WAAW;qBAC7C,gCAAC,CAAA,GAAA,yCAAU;QACR,GAAG,YAAY;QAChB,KAAK;QACL,kBAAkB,CAAA,GAAA,yCAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;QACrC,SAAS;QACT,iBAAiB;qBACjB,gCAAC,CAAA,GAAA,uCAAgB;QAAE,kBAAkB,CAAA,GAAA,yCAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;;AAMpE","sources":["packages/@adobe/react-spectrum/src/combobox/ComboBox.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaButtonProps} from 'react-aria/useButton';\n\nimport {AriaComboBoxProps, useComboBox} from 'react-aria/useComboBox';\nimport {\n AsyncLoadable,\n DimensionValue,\n DOMRefValue,\n FocusableRef,\n FocusableRefValue,\n LoadingState,\n SingleSelection,\n SpectrumFieldValidation,\n SpectrumLabelableProps,\n SpectrumTextInputBase,\n StyleProps\n} from '@react-types/shared';\nimport ChevronDownMedium from '@spectrum-icons/ui/ChevronDownMedium';\nimport {classNames} from '../utils/classNames';\nimport comboboxStyles from './combobox.css';\nimport {\n ComboBoxValidationValue,\n MenuTriggerAction,\n useComboBoxState\n} from 'react-stately/useComboBoxState';\nimport {dimensionValue} from '../utils/styleProps';\nimport {Field} from '../label/Field';\nimport {FieldButton} from '../button/FieldButton';\nimport {FocusRing} from 'react-aria/FocusRing';\nimport intlMessages from '../../intl/combobox/*.json';\nimport {ListBoxBase, useListBoxLayout} from '../listbox/ListBoxBase';\nimport {MobileComboBox} from './MobileComboBox';\n// @ts-ignore\nimport {Popover} from '../overlays/Popover';\nimport {PressResponder} from 'react-aria/private/interactions/PressResponder';\nimport {ProgressCircle} from '../progress/ProgressCircle';\nimport React, {\n ForwardedRef,\n InputHTMLAttributes,\n ReactElement,\n RefObject,\n useCallback,\n useEffect,\n useRef,\n useState\n} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/inputgroup/vars.css';\nimport {TextFieldBase} from '../textfield/TextFieldBase';\nimport textfieldStyles from '@adobe/spectrum-css-temp/components/textfield/vars.css';\nimport {useFilter} from 'react-aria/useFilter';\nimport {useFocusableRef, useUnwrapDOMRef} from '../utils/useDOMRef';\nimport {useFormProps} from '../form/Form';\nimport {useHover} from 'react-aria/useHover';\nimport {useIsMobileDevice} from '../utils/useIsMobileDevice';\nimport {useLayoutEffect} from 'react-aria/private/utils/useLayoutEffect';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useProvider, useProviderProps} from '../provider/Provider';\nimport {useResizeObserver} from 'react-aria/private/utils/useResizeObserver';\n\nexport interface SpectrumComboBoxProps<T>\n extends\n SpectrumTextInputBase,\n Omit<\n AriaComboBoxProps<T>,\n | 'menuTrigger'\n | 'isInvalid'\n | 'validationState'\n | 'selectionMode'\n | 'selectedKey'\n | 'defaultSelectedKey'\n | 'onSelectionChange'\n | 'value'\n | 'defaultValue'\n | 'onChange'\n >,\n Omit<SingleSelection, 'disallowEmptySelection'>,\n SpectrumFieldValidation<ComboBoxValidationValue>,\n SpectrumLabelableProps,\n StyleProps,\n Omit<AsyncLoadable, 'isLoading'> {\n /**\n * The interaction required to display the ComboBox menu. Note that this prop has no effect on the\n * mobile ComboBox experience.\n *\n * @default 'input'\n */\n menuTrigger?: MenuTriggerAction;\n /** Whether the ComboBox should be displayed with a quiet style. */\n isQuiet?: boolean;\n /**\n * Alignment of the menu relative to the input target.\n *\n * @default 'start'\n */\n align?: 'start' | 'end';\n /**\n * Direction the menu will render relative to the ComboBox.\n *\n * @default 'bottom'\n */\n direction?: 'bottom' | 'top';\n /**\n * The current loading state of the ComboBox. Determines whether or not the progress circle should\n * be shown.\n */\n loadingState?: LoadingState;\n /**\n * Whether the menu should automatically flip direction when space is limited.\n *\n * @default true\n */\n shouldFlip?: boolean;\n /**\n * Width of the menu. By default, matches width of the combobox. Note that the minimum width of\n * the dropdown is always equal to the combobox's width.\n */\n menuWidth?: DimensionValue;\n /**\n * Whether the text or key of the selected item is submitted as part of an HTML form. When\n * `allowsCustomValue` is `true`, this option does not apply and the text is always submitted.\n *\n * @default 'text'\n */\n formValue?: 'text' | 'key';\n}\n\n/**\n * ComboBoxes combine a text entry with a picker menu, allowing users to filter longer lists to only\n * the selections matching a query.\n */\nexport const ComboBox = React.forwardRef(function ComboBox<T extends object>(\n props: SpectrumComboBoxProps<T>,\n ref: FocusableRef<HTMLElement>\n) {\n props = useProviderProps(props);\n props = useFormProps(props);\n\n let hasWarned = useRef(false);\n useEffect(() => {\n if (props.placeholder && !hasWarned.current && process.env.NODE_ENV !== 'production') {\n console.warn(\n 'Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/ComboBox.html#help-text'\n );\n hasWarned.current = true;\n }\n }, [props.placeholder]);\n\n let isMobile = useIsMobileDevice();\n if (isMobile) {\n // menuTrigger=focus/manual don't apply to mobile combobox\n return <MobileComboBox {...props} menuTrigger=\"input\" ref={ref} />;\n } else {\n return <ComboBoxBase {...props} ref={ref} />;\n }\n}) as <T>(props: SpectrumComboBoxProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;\n\nconst ComboBoxBase = React.forwardRef(function ComboBoxBase(\n props: SpectrumComboBoxProps<any>,\n ref: FocusableRef<HTMLElement>\n) {\n let {\n menuTrigger = 'input',\n shouldFlip = true,\n direction = 'bottom',\n align = 'start',\n isQuiet,\n loadingState,\n onLoadMore,\n allowsCustomValue,\n menuWidth: customMenuWidth,\n name,\n formValue = 'text'\n } = props;\n if (allowsCustomValue) {\n formValue = 'text';\n }\n\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/combobox');\n let isAsync = loadingState != null;\n let popoverRef = useRef<DOMRefValue<HTMLDivElement>>(null);\n let unwrappedPopoverRef = useUnwrapDOMRef(popoverRef);\n let buttonRef = useRef<FocusableRefValue<HTMLElement>>(null);\n let unwrappedButtonRef = useUnwrapDOMRef(buttonRef);\n let listBoxRef = useRef(null);\n let inputRef = useRef<HTMLInputElement>(null);\n // serve as the new popover `triggerRef` instead of `unwrappedButtonRef` before for better positioning.\n let inputGroupRef = useRef<HTMLDivElement>(null);\n let domRef = useFocusableRef(ref, inputRef);\n\n let {contains} = useFilter({sensitivity: 'base'});\n let state = useComboBoxState({\n ...props,\n defaultFilter: contains,\n allowsEmptyCollection: isAsync\n });\n let layout = useListBoxLayout();\n\n let {\n buttonProps,\n inputProps,\n listBoxProps,\n labelProps,\n descriptionProps,\n errorMessageProps,\n isInvalid,\n validationErrors,\n validationDetails\n } = useComboBox(\n {\n ...props,\n layoutDelegate: layout,\n buttonRef: unwrappedButtonRef,\n popoverRef: unwrappedPopoverRef,\n listBoxRef,\n inputRef: inputRef,\n menuTrigger,\n name: formValue === 'text' ? name : undefined\n },\n state\n );\n\n // Measure the width of the inputfield and the button to inform the width of the menu (below).\n let [menuWidth, setMenuWidth] = useState<number | undefined>(undefined);\n let {scale} = useProvider();\n\n let onResize = useCallback(() => {\n if (unwrappedButtonRef.current && inputRef.current) {\n let buttonWidth = unwrappedButtonRef.current.offsetWidth;\n let inputWidth = inputRef.current.offsetWidth;\n setMenuWidth(buttonWidth + inputWidth);\n }\n }, [unwrappedButtonRef, inputRef, setMenuWidth]);\n\n useResizeObserver({\n ref: domRef,\n onResize: onResize\n });\n\n useLayoutEffect(onResize, [scale, onResize]);\n\n let width = isQuiet ? undefined : menuWidth;\n let style = {\n width: customMenuWidth ? dimensionValue(customMenuWidth) : width,\n minWidth: isQuiet\n ? `calc(${menuWidth}px + calc(2 * var(--spectrum-dropdown-quiet-offset)))`\n : menuWidth\n };\n let cbInputProps = {...props, children: null};\n\n return (\n <>\n <Field\n {...props}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n isInvalid={isInvalid}\n validationErrors={validationErrors}\n validationDetails={validationDetails}\n labelProps={labelProps}\n ref={domRef}>\n <ComboBoxInput\n {...cbInputProps}\n isOpen={state.isOpen}\n loadingState={loadingState}\n inputProps={inputProps}\n inputRef={inputRef}\n triggerProps={buttonProps}\n triggerRef={buttonRef}\n validationState={props.validationState || (isInvalid ? 'invalid' : undefined)}\n ref={inputGroupRef}\n />\n </Field>\n {name && formValue === 'key' && (\n <input type=\"hidden\" name={name} form={props.form} value={state.selectedKey ?? ''} />\n )}\n <Popover\n state={state}\n UNSAFE_style={style}\n UNSAFE_className={classNames(styles, 'spectrum-InputGroup-popover', {\n 'spectrum-InputGroup-popover--quiet': isQuiet\n })}\n ref={popoverRef}\n triggerRef={inputGroupRef}\n scrollRef={listBoxRef}\n placement={`${direction} ${align}`}\n hideArrow\n isNonModal\n shouldFlip={shouldFlip}>\n <ListBoxBase\n {...listBoxProps}\n ref={listBoxRef}\n disallowEmptySelection\n shouldSelectOnPressUp\n focusOnPointerEnter\n layout={layout}\n state={state}\n shouldUseVirtualFocus\n isLoading={loadingState === 'loading' || loadingState === 'loadingMore'}\n showLoadingSpinner={loadingState === 'loadingMore'}\n onLoadMore={onLoadMore}\n renderEmptyState={() =>\n isAsync && (\n <span className={classNames(comboboxStyles, 'no-results')}>\n {loadingState === 'loading'\n ? stringFormatter.format('loading')\n : stringFormatter.format('noResults')}\n </span>\n )\n }\n />\n </Popover>\n </>\n );\n});\n\ninterface ComboBoxInputProps extends SpectrumComboBoxProps<unknown> {\n inputProps: InputHTMLAttributes<HTMLInputElement>;\n inputRef: RefObject<HTMLInputElement | HTMLTextAreaElement | null>;\n triggerProps: AriaButtonProps;\n triggerRef: RefObject<FocusableRefValue<HTMLElement> | null>;\n style?: React.CSSProperties;\n className?: string;\n isOpen?: boolean;\n}\n\nconst ComboBoxInput = React.forwardRef(function ComboBoxInput(\n props: ComboBoxInputProps,\n ref: ForwardedRef<HTMLElement | null>\n) {\n let {\n isQuiet,\n isDisabled,\n validationState,\n inputProps,\n inputRef,\n triggerProps,\n triggerRef,\n autoFocus,\n style,\n className,\n loadingState,\n isOpen,\n menuTrigger\n } = props;\n let {hoverProps, isHovered} = useHover({});\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/combobox');\n let timeout = useRef<ReturnType<typeof setTimeout> | null>(null);\n let [showLoading, setShowLoading] = useState(false);\n\n let loadingCircle = (\n <ProgressCircle\n aria-label={stringFormatter.format('loading')}\n size=\"S\"\n isIndeterminate\n UNSAFE_className={classNames(\n textfieldStyles,\n 'spectrum-Textfield-circleLoader',\n classNames(styles, 'spectrum-InputGroup-input-circleLoader')\n )}\n />\n );\n\n let isLoading = loadingState === 'loading' || loadingState === 'filtering';\n let inputValue = inputProps.value;\n let lastInputValue = useRef(inputValue);\n useEffect(() => {\n if (isLoading && !showLoading) {\n if (timeout.current === null) {\n timeout.current = setTimeout(() => {\n setShowLoading(true);\n }, 500);\n }\n\n // If user is typing, clear the timer and restart since it is a new request\n if (inputValue !== lastInputValue.current) {\n clearTimeout(timeout.current);\n timeout.current = setTimeout(() => {\n setShowLoading(true);\n }, 500);\n }\n } else if (!isLoading) {\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n timeout.current = null;\n }\n\n lastInputValue.current = inputValue;\n }, [isLoading, showLoading, inputValue]);\n\n let [prevIsLoading, setPrevIsLoading] = useState(isLoading);\n if (prevIsLoading !== isLoading && !isLoading) {\n setShowLoading(false);\n setPrevIsLoading(isLoading);\n }\n\n useEffect(() => {\n return () => {\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n timeout.current = null;\n };\n }, []);\n\n return (\n <FocusRing\n within\n isTextInput\n focusClass={classNames(styles, 'is-focused')}\n focusRingClass={classNames(styles, 'focus-ring')}\n autoFocus={autoFocus}>\n <div\n {...hoverProps}\n ref={ref as RefObject<HTMLDivElement | null>}\n style={style}\n className={classNames(\n styles,\n 'spectrum-InputGroup',\n {\n 'spectrum-InputGroup--quiet': isQuiet,\n 'is-disabled': isDisabled,\n 'spectrum-InputGroup--invalid': validationState === 'invalid' && !isDisabled,\n 'is-hovered': isHovered\n },\n className\n )}>\n <TextFieldBase\n inputProps={inputProps}\n inputRef={inputRef}\n UNSAFE_className={classNames(styles, 'spectrum-InputGroup-field')}\n inputClassName={classNames(styles, 'spectrum-InputGroup-input')}\n validationIconClassName={classNames(styles, 'spectrum-InputGroup-input-validationIcon')}\n isDisabled={isDisabled}\n isQuiet={isQuiet}\n validationState={validationState}\n // loading circle should only be displayed if menu is open, if menuTrigger is \"manual\", or first time load (to stop circle from showing up when user selects an option)\n // TODO: add special case for completionMode: complete as well\n isLoading={\n showLoading && (isOpen || menuTrigger === 'manual' || loadingState === 'loading')\n }\n loadingIndicator={loadingState != null ? loadingCircle : undefined}\n disableFocusRing\n />\n <PressResponder preventFocusOnPress isPressed={isOpen}>\n <FieldButton\n {...triggerProps}\n ref={triggerRef}\n UNSAFE_className={classNames(styles, 'spectrum-FieldButton')}\n isQuiet={isQuiet}\n validationState={validationState}>\n <ChevronDownMedium UNSAFE_className={classNames(styles, 'spectrum-Dropdown-chevron')} />\n </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,SAAS;QACT,iBAAiB;QACjB,uKAAuK;QACvK,8DAA8D;QAC9D,WAAW,eAAgB,CAAA,UAAU,gBAAgB,YAAY,iBAAiB,SAAQ;QAC1F,kBAAkB,gBAAgB,OAAO,gBAAgB;QACzD,kBAAA;sBACF,gCAAC,CAAA,GAAA,qBAAa;QAAE,qBAAA;QAAoB,WAAW;qBAC7C,gCAAC,CAAA,GAAA,yCAAU;QACR,GAAG,YAAY;QAChB,KAAK;QACL,kBACE,CAAA,GAAA,yCAAS,EACP,CAAA,GAAA,uDAAK,GACL;QAGJ,SAAS;QACT,iBAAiB;qBACjB,gCAAC,CAAA,GAAA,uCAAgB;QAAE,kBAAkB,CAAA,GAAA,yCAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;;AAMpE","sources":["packages/@adobe/react-spectrum/src/combobox/ComboBox.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaButtonProps} from 'react-aria/useButton';\n\nimport {AriaComboBoxProps, useComboBox} from 'react-aria/useComboBox';\nimport {AsyncLoadable, DimensionValue, DOMRefValue, FocusableRef, FocusableRefValue, LoadingState, SingleSelection, SpectrumFieldValidation, SpectrumLabelableProps, SpectrumTextInputBase, StyleProps} from '@react-types/shared';\nimport ChevronDownMedium from '@spectrum-icons/ui/ChevronDownMedium';\nimport {classNames} from '../utils/classNames';\nimport comboboxStyles from './combobox.css';\nimport {ComboBoxValidationValue, MenuTriggerAction, useComboBoxState} from 'react-stately/useComboBoxState';\nimport {dimensionValue} from '../utils/styleProps';\nimport {Field} from '../label/Field';\nimport {FieldButton} from '../button/FieldButton';\nimport {FocusRing} from 'react-aria/FocusRing';\nimport intlMessages from '../../intl/combobox/*.json';\nimport {ListBoxBase, useListBoxLayout} from '../listbox/ListBoxBase';\nimport {MobileComboBox} from './MobileComboBox';\n// @ts-ignore\nimport {Popover} from '../overlays/Popover';\nimport {PressResponder} from 'react-aria/private/interactions/PressResponder';\nimport {ProgressCircle} from '../progress/ProgressCircle';\nimport React, {\n ForwardedRef,\n InputHTMLAttributes,\n ReactElement,\n RefObject,\n useCallback,\n useEffect,\n useRef,\n useState\n} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/inputgroup/vars.css';\nimport {TextFieldBase} from '../textfield/TextFieldBase';\nimport textfieldStyles from '@adobe/spectrum-css-temp/components/textfield/vars.css';\nimport {useFilter} from 'react-aria/useFilter';\nimport {useFocusableRef, useUnwrapDOMRef} from '../utils/useDOMRef';\nimport {useFormProps} from '../form/Form';\nimport {useHover} from 'react-aria/useHover';\nimport {useIsMobileDevice} from '../utils/useIsMobileDevice';\nimport {useLayoutEffect} from 'react-aria/private/utils/useLayoutEffect';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useProvider, useProviderProps} from '../provider/Provider';\nimport {useResizeObserver} from 'react-aria/private/utils/useResizeObserver';\n\nexport interface SpectrumComboBoxProps<T> extends SpectrumTextInputBase, Omit<AriaComboBoxProps<T>, 'menuTrigger' | 'isInvalid' | 'validationState' | 'selectionMode' | 'selectedKey' | 'defaultSelectedKey' | 'onSelectionChange' | 'value' | 'defaultValue' | 'onChange'>, Omit<SingleSelection, 'disallowEmptySelection'>, SpectrumFieldValidation<ComboBoxValidationValue>, SpectrumLabelableProps, StyleProps, Omit<AsyncLoadable, 'isLoading'> {\n /**\n * The interaction required to display the ComboBox menu. Note that this prop has no effect on the mobile ComboBox experience.\n * @default 'input'\n */\n menuTrigger?: MenuTriggerAction,\n /** Whether the ComboBox should be displayed with a quiet style. */\n isQuiet?: boolean,\n /** Alignment of the menu relative to the input target.\n * @default 'start'\n */\n align?: 'start' | 'end',\n /**\n * Direction the menu will render relative to the ComboBox.\n * @default 'bottom'\n */\n direction?: 'bottom' | 'top',\n /** The current loading state of the ComboBox. Determines whether or not the progress circle should be shown. */\n loadingState?: LoadingState,\n /**\n * Whether the menu should automatically flip direction when space is limited.\n * @default true\n */\n shouldFlip?: boolean,\n /** Width of the menu. By default, matches width of the combobox. Note that the minimum width of the dropdown is always equal to the combobox's width. */\n menuWidth?: DimensionValue,\n /**\n * Whether the text or key of the selected item is submitted as part of an HTML form.\n * When `allowsCustomValue` is `true`, this option does not apply and the text is always submitted.\n * @default 'text'\n */\n formValue?: 'text' | 'key'\n}\n\n/**\n * ComboBoxes combine a text entry with a picker menu, allowing users to filter longer lists to only the selections matching a query.\n */\nexport const ComboBox = React.forwardRef(function ComboBox<T extends object>(props: SpectrumComboBoxProps<T>, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n\n let hasWarned = useRef(false);\n useEffect(() => {\n if (props.placeholder && !hasWarned.current && process.env.NODE_ENV !== 'production') {\n console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/ComboBox.html#help-text');\n hasWarned.current = true;\n }\n }, [props.placeholder]);\n\n let isMobile = useIsMobileDevice();\n if (isMobile) {\n // menuTrigger=focus/manual don't apply to mobile combobox\n return <MobileComboBox {...props} menuTrigger=\"input\" ref={ref} />;\n } else {\n return <ComboBoxBase {...props} ref={ref} />;\n }\n}) as <T>(props: SpectrumComboBoxProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;\n\nconst ComboBoxBase = React.forwardRef(function ComboBoxBase(props: SpectrumComboBoxProps<any>, ref: FocusableRef<HTMLElement>) {\n let {\n menuTrigger = 'input',\n shouldFlip = true,\n direction = 'bottom',\n align = 'start',\n isQuiet,\n loadingState,\n onLoadMore,\n allowsCustomValue,\n menuWidth: customMenuWidth,\n name,\n formValue = 'text'\n } = props;\n if (allowsCustomValue) {\n formValue = 'text';\n }\n\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/combobox');\n let isAsync = loadingState != null;\n let popoverRef = useRef<DOMRefValue<HTMLDivElement>>(null);\n let unwrappedPopoverRef = useUnwrapDOMRef(popoverRef);\n let buttonRef = useRef<FocusableRefValue<HTMLElement>>(null);\n let unwrappedButtonRef = useUnwrapDOMRef(buttonRef);\n let listBoxRef = useRef(null);\n let inputRef = useRef<HTMLInputElement>(null);\n // serve as the new popover `triggerRef` instead of `unwrappedButtonRef` before for better positioning.\n let inputGroupRef = useRef<HTMLDivElement>(null);\n let domRef = useFocusableRef(ref, inputRef);\n\n let {contains} = useFilter({sensitivity: 'base'});\n let state = useComboBoxState(\n {\n ...props,\n defaultFilter: contains,\n allowsEmptyCollection: isAsync\n }\n );\n let layout = useListBoxLayout();\n\n let {buttonProps, inputProps, listBoxProps, labelProps, descriptionProps, errorMessageProps, isInvalid, validationErrors, validationDetails} = useComboBox(\n {\n ...props,\n layoutDelegate: layout,\n buttonRef: unwrappedButtonRef,\n popoverRef: unwrappedPopoverRef,\n listBoxRef,\n inputRef: inputRef,\n menuTrigger,\n name: formValue === 'text' ? name : undefined\n },\n state\n );\n\n // Measure the width of the inputfield and the button to inform the width of the menu (below).\n let [menuWidth, setMenuWidth] = useState<number | undefined>(undefined);\n let {scale} = useProvider();\n\n let onResize = useCallback(() => {\n if (unwrappedButtonRef.current && inputRef.current) {\n let buttonWidth = unwrappedButtonRef.current.offsetWidth;\n let inputWidth = inputRef.current.offsetWidth;\n setMenuWidth(buttonWidth + inputWidth);\n }\n }, [unwrappedButtonRef, inputRef, setMenuWidth]);\n\n useResizeObserver({\n ref: domRef,\n onResize: onResize\n });\n\n useLayoutEffect(onResize, [scale, onResize]);\n\n let width = isQuiet ? undefined : menuWidth;\n let style = {\n width: customMenuWidth ? dimensionValue(customMenuWidth) : width,\n minWidth: isQuiet ? `calc(${menuWidth}px + calc(2 * var(--spectrum-dropdown-quiet-offset)))` : menuWidth\n };\n let cbInputProps = {...props, children: null};\n\n return (\n <>\n <Field\n {...props}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n isInvalid={isInvalid}\n validationErrors={validationErrors}\n validationDetails={validationDetails}\n labelProps={labelProps}\n ref={domRef}>\n <ComboBoxInput\n {...cbInputProps}\n isOpen={state.isOpen}\n loadingState={loadingState}\n inputProps={inputProps}\n inputRef={inputRef}\n triggerProps={buttonProps}\n triggerRef={buttonRef}\n validationState={props.validationState || (isInvalid ? 'invalid' : undefined)}\n ref={inputGroupRef} />\n </Field>\n {name && formValue === 'key' && <input type=\"hidden\" name={name} form={props.form} value={state.selectedKey ?? ''} />}\n <Popover\n state={state}\n UNSAFE_style={style}\n UNSAFE_className={classNames(styles, 'spectrum-InputGroup-popover', {'spectrum-InputGroup-popover--quiet': isQuiet})}\n ref={popoverRef}\n triggerRef={inputGroupRef}\n scrollRef={listBoxRef}\n placement={`${direction} ${align}`}\n hideArrow\n isNonModal\n shouldFlip={shouldFlip}>\n <ListBoxBase\n {...listBoxProps}\n ref={listBoxRef}\n disallowEmptySelection\n shouldSelectOnPressUp\n focusOnPointerEnter\n layout={layout}\n state={state}\n shouldUseVirtualFocus\n isLoading={loadingState === 'loading' || loadingState === 'loadingMore'}\n showLoadingSpinner={loadingState === 'loadingMore'}\n onLoadMore={onLoadMore}\n renderEmptyState={() => isAsync && (\n <span className={classNames(comboboxStyles, 'no-results')}>\n {loadingState === 'loading' ? stringFormatter.format('loading') : stringFormatter.format('noResults')}\n </span>\n )} />\n </Popover>\n </>\n );\n});\n\ninterface ComboBoxInputProps extends SpectrumComboBoxProps<unknown> {\n inputProps: InputHTMLAttributes<HTMLInputElement>,\n inputRef: RefObject<HTMLInputElement | HTMLTextAreaElement | null>,\n triggerProps: AriaButtonProps,\n triggerRef: RefObject<FocusableRefValue<HTMLElement> | null>,\n style?: React.CSSProperties,\n className?: string,\n isOpen?: boolean\n}\n\nconst ComboBoxInput = React.forwardRef(function ComboBoxInput(props: ComboBoxInputProps, ref: ForwardedRef<HTMLElement | null>) {\n let {\n isQuiet,\n isDisabled,\n validationState,\n inputProps,\n inputRef,\n triggerProps,\n triggerRef,\n autoFocus,\n style,\n className,\n loadingState,\n isOpen,\n menuTrigger\n } = props;\n let {hoverProps, isHovered} = useHover({});\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/combobox');\n let timeout = useRef<ReturnType<typeof setTimeout> | null>(null);\n let [showLoading, setShowLoading] = useState(false);\n\n let loadingCircle = (\n <ProgressCircle\n aria-label={stringFormatter.format('loading')}\n size=\"S\"\n isIndeterminate\n UNSAFE_className={classNames(\n textfieldStyles,\n 'spectrum-Textfield-circleLoader',\n classNames(\n styles,\n 'spectrum-InputGroup-input-circleLoader'\n )\n )} />\n );\n\n let isLoading = loadingState === 'loading' || loadingState === 'filtering';\n let inputValue = inputProps.value;\n let lastInputValue = useRef(inputValue);\n useEffect(() => {\n if (isLoading && !showLoading) {\n if (timeout.current === null) {\n timeout.current = setTimeout(() => {\n setShowLoading(true);\n }, 500);\n }\n\n // If user is typing, clear the timer and restart since it is a new request\n if (inputValue !== lastInputValue.current) {\n clearTimeout(timeout.current);\n timeout.current = setTimeout(() => {\n setShowLoading(true);\n }, 500);\n }\n } else if (!isLoading) {\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n timeout.current = null;\n }\n\n lastInputValue.current = inputValue;\n }, [isLoading, showLoading, inputValue]);\n\n let [prevIsLoading, setPrevIsLoading] = useState(isLoading);\n if (prevIsLoading !== isLoading && !isLoading) {\n setShowLoading(false);\n setPrevIsLoading(isLoading);\n }\n\n useEffect(() => {\n return () => {\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n timeout.current = null;\n };\n }, []);\n\n return (\n (<FocusRing\n within\n isTextInput\n focusClass={classNames(styles, 'is-focused')}\n focusRingClass={classNames(styles, 'focus-ring')}\n autoFocus={autoFocus}>\n <div\n {...hoverProps}\n ref={ref as RefObject<HTMLDivElement | null>}\n style={style}\n className={\n classNames(\n styles,\n 'spectrum-InputGroup',\n {\n 'spectrum-InputGroup--quiet': isQuiet,\n 'is-disabled': isDisabled,\n 'spectrum-InputGroup--invalid': validationState === 'invalid' && !isDisabled,\n 'is-hovered': isHovered\n },\n className\n )\n }>\n <TextFieldBase\n inputProps={inputProps}\n inputRef={inputRef}\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-InputGroup-field'\n )\n }\n inputClassName={\n classNames(\n styles,\n 'spectrum-InputGroup-input'\n )\n }\n validationIconClassName={\n classNames(\n styles,\n 'spectrum-InputGroup-input-validationIcon'\n )\n }\n isDisabled={isDisabled}\n isQuiet={isQuiet}\n validationState={validationState}\n // loading circle should only be displayed if menu is open, if menuTrigger is \"manual\", or first time load (to stop circle from showing up when user selects an option)\n // TODO: add special case for completionMode: complete as well\n isLoading={showLoading && (isOpen || menuTrigger === 'manual' || loadingState === 'loading')}\n loadingIndicator={loadingState != null ? loadingCircle : undefined}\n disableFocusRing />\n <PressResponder preventFocusOnPress isPressed={isOpen}>\n <FieldButton\n {...triggerProps}\n ref={triggerRef}\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-FieldButton'\n )\n }\n isQuiet={isQuiet}\n validationState={validationState}>\n <ChevronDownMedium UNSAFE_className={classNames(styles, 'spectrum-Dropdown-chevron')} />\n </FieldButton>\n </PressResponder>\n </div>\n </FocusRing>)\n );\n});\n"],"names":[],"version":3,"file":"ComboBox.mjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmIM,MAAM,0DAAW,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,SAChD,KAA+B,EAC/B,GAA8B;IAE9B,QAAQ,CAAA,GAAA,yCAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,yCAAW,EAAE;IAErB,IAAI,YAAY,CAA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CAAC,CAAA,GAAA,uCAAgB;QAAE,kBAAkB,CAAA,GAAA,yCAAS,EAAE,CAAA,GAAA,uDAAK,GAAG;;AAMpE","sources":["packages/@adobe/react-spectrum/src/combobox/ComboBox.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaButtonProps} from 'react-aria/useButton';\n\nimport {AriaComboBoxProps, useComboBox} from 'react-aria/useComboBox';\nimport {\n AsyncLoadable,\n DimensionValue,\n DOMRefValue,\n FocusableRef,\n FocusableRefValue,\n LoadingState,\n SingleSelection,\n SpectrumFieldValidation,\n SpectrumLabelableProps,\n SpectrumTextInputBase,\n StyleProps\n} from '@react-types/shared';\nimport ChevronDownMedium from '@spectrum-icons/ui/ChevronDownMedium';\nimport {classNames} from '../utils/classNames';\nimport comboboxStyles from './combobox.css';\nimport {\n ComboBoxValidationValue,\n MenuTriggerAction,\n useComboBoxState\n} from 'react-stately/useComboBoxState';\nimport {dimensionValue} from '../utils/styleProps';\nimport {Field} from '../label/Field';\nimport {FieldButton} from '../button/FieldButton';\nimport {FocusRing} from 'react-aria/FocusRing';\nimport intlMessages from '../../intl/combobox/*.json';\nimport {ListBoxBase, useListBoxLayout} from '../listbox/ListBoxBase';\nimport {MobileComboBox} from './MobileComboBox';\n// @ts-ignore\nimport {Popover} from '../overlays/Popover';\nimport {PressResponder} from 'react-aria/private/interactions/PressResponder';\nimport {ProgressCircle} from '../progress/ProgressCircle';\nimport React, {\n ForwardedRef,\n InputHTMLAttributes,\n ReactElement,\n RefObject,\n useCallback,\n useEffect,\n useRef,\n useState\n} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/inputgroup/vars.css';\nimport {TextFieldBase} from '../textfield/TextFieldBase';\nimport textfieldStyles from '@adobe/spectrum-css-temp/components/textfield/vars.css';\nimport {useFilter} from 'react-aria/useFilter';\nimport {useFocusableRef, useUnwrapDOMRef} from '../utils/useDOMRef';\nimport {useFormProps} from '../form/Form';\nimport {useHover} from 'react-aria/useHover';\nimport {useIsMobileDevice} from '../utils/useIsMobileDevice';\nimport {useLayoutEffect} from 'react-aria/private/utils/useLayoutEffect';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useProvider, useProviderProps} from '../provider/Provider';\nimport {useResizeObserver} from 'react-aria/private/utils/useResizeObserver';\n\nexport interface SpectrumComboBoxProps<T>\n extends\n SpectrumTextInputBase,\n Omit<\n AriaComboBoxProps<T>,\n | 'menuTrigger'\n | 'isInvalid'\n | 'validationState'\n | 'selectionMode'\n | 'selectedKey'\n | 'defaultSelectedKey'\n | 'onSelectionChange'\n | 'value'\n | 'defaultValue'\n | 'onChange'\n >,\n Omit<SingleSelection, 'disallowEmptySelection'>,\n SpectrumFieldValidation<ComboBoxValidationValue>,\n SpectrumLabelableProps,\n StyleProps,\n Omit<AsyncLoadable, 'isLoading'> {\n /**\n * The interaction required to display the ComboBox menu. Note that this prop has no effect on the\n * mobile ComboBox experience.\n *\n * @default 'input'\n */\n menuTrigger?: MenuTriggerAction;\n /** Whether the ComboBox should be displayed with a quiet style. */\n isQuiet?: boolean;\n /**\n * Alignment of the menu relative to the input target.\n *\n * @default 'start'\n */\n align?: 'start' | 'end';\n /**\n * Direction the menu will render relative to the ComboBox.\n *\n * @default 'bottom'\n */\n direction?: 'bottom' | 'top';\n /**\n * The current loading state of the ComboBox. Determines whether or not the progress circle should\n * be shown.\n */\n loadingState?: LoadingState;\n /**\n * Whether the menu should automatically flip direction when space is limited.\n *\n * @default true\n */\n shouldFlip?: boolean;\n /**\n * Width of the menu. By default, matches width of the combobox. Note that the minimum width of\n * the dropdown is always equal to the combobox's width.\n */\n menuWidth?: DimensionValue;\n /**\n * Whether the text or key of the selected item is submitted as part of an HTML form. When\n * `allowsCustomValue` is `true`, this option does not apply and the text is always submitted.\n *\n * @default 'text'\n */\n formValue?: 'text' | 'key';\n}\n\n/**\n * ComboBoxes combine a text entry with a picker menu, allowing users to filter longer lists to only\n * the selections matching a query.\n */\nexport const ComboBox = React.forwardRef(function ComboBox<T extends object>(\n props: SpectrumComboBoxProps<T>,\n ref: FocusableRef<HTMLElement>\n) {\n props = useProviderProps(props);\n props = useFormProps(props);\n\n let hasWarned = useRef(false);\n useEffect(() => {\n if (props.placeholder && !hasWarned.current && process.env.NODE_ENV !== 'production') {\n console.warn(\n 'Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/ComboBox.html#help-text'\n );\n hasWarned.current = true;\n }\n }, [props.placeholder]);\n\n let isMobile = useIsMobileDevice();\n if (isMobile) {\n // menuTrigger=focus/manual don't apply to mobile combobox\n return <MobileComboBox {...props} menuTrigger=\"input\" ref={ref} />;\n } else {\n return <ComboBoxBase {...props} ref={ref} />;\n }\n}) as <T>(props: SpectrumComboBoxProps<T> & {ref?: FocusableRef<HTMLElement>}) => ReactElement;\n\nconst ComboBoxBase = React.forwardRef(function ComboBoxBase(\n props: SpectrumComboBoxProps<any>,\n ref: FocusableRef<HTMLElement>\n) {\n let {\n menuTrigger = 'input',\n shouldFlip = true,\n direction = 'bottom',\n align = 'start',\n isQuiet,\n loadingState,\n onLoadMore,\n allowsCustomValue,\n menuWidth: customMenuWidth,\n name,\n formValue = 'text'\n } = props;\n if (allowsCustomValue) {\n formValue = 'text';\n }\n\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/combobox');\n let isAsync = loadingState != null;\n let popoverRef = useRef<DOMRefValue<HTMLDivElement>>(null);\n let unwrappedPopoverRef = useUnwrapDOMRef(popoverRef);\n let buttonRef = useRef<FocusableRefValue<HTMLElement>>(null);\n let unwrappedButtonRef = useUnwrapDOMRef(buttonRef);\n let listBoxRef = useRef(null);\n let inputRef = useRef<HTMLInputElement>(null);\n // serve as the new popover `triggerRef` instead of `unwrappedButtonRef` before for better positioning.\n let inputGroupRef = useRef<HTMLDivElement>(null);\n let domRef = useFocusableRef(ref, inputRef);\n\n let {contains} = useFilter({sensitivity: 'base'});\n let state = useComboBoxState({\n ...props,\n defaultFilter: contains,\n allowsEmptyCollection: isAsync\n });\n let layout = useListBoxLayout();\n\n let {\n buttonProps,\n inputProps,\n listBoxProps,\n labelProps,\n descriptionProps,\n errorMessageProps,\n isInvalid,\n validationErrors,\n validationDetails\n } = useComboBox(\n {\n ...props,\n layoutDelegate: layout,\n buttonRef: unwrappedButtonRef,\n popoverRef: unwrappedPopoverRef,\n listBoxRef,\n inputRef: inputRef,\n menuTrigger,\n name: formValue === 'text' ? name : undefined\n },\n state\n );\n\n // Measure the width of the inputfield and the button to inform the width of the menu (below).\n let [menuWidth, setMenuWidth] = useState<number | undefined>(undefined);\n let {scale} = useProvider();\n\n let onResize = useCallback(() => {\n if (unwrappedButtonRef.current && inputRef.current) {\n let buttonWidth = unwrappedButtonRef.current.offsetWidth;\n let inputWidth = inputRef.current.offsetWidth;\n setMenuWidth(buttonWidth + inputWidth);\n }\n }, [unwrappedButtonRef, inputRef, setMenuWidth]);\n\n useResizeObserver({\n ref: domRef,\n onResize: onResize\n });\n\n useLayoutEffect(onResize, [scale, onResize]);\n\n let width = isQuiet ? undefined : menuWidth;\n let style = {\n width: customMenuWidth ? dimensionValue(customMenuWidth) : width,\n minWidth: isQuiet\n ? `calc(${menuWidth}px + calc(2 * var(--spectrum-dropdown-quiet-offset)))`\n : menuWidth\n };\n let cbInputProps = {...props, children: null};\n\n return (\n <>\n <Field\n {...props}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n isInvalid={isInvalid}\n validationErrors={validationErrors}\n validationDetails={validationDetails}\n labelProps={labelProps}\n ref={domRef}>\n <ComboBoxInput\n {...cbInputProps}\n isOpen={state.isOpen}\n loadingState={loadingState}\n inputProps={inputProps}\n inputRef={inputRef}\n triggerProps={buttonProps}\n triggerRef={buttonRef}\n validationState={props.validationState || (isInvalid ? 'invalid' : undefined)}\n ref={inputGroupRef}\n />\n </Field>\n {name && formValue === 'key' && (\n <input type=\"hidden\" name={name} form={props.form} value={state.selectedKey ?? ''} />\n )}\n <Popover\n state={state}\n UNSAFE_style={style}\n UNSAFE_className={classNames(styles, 'spectrum-InputGroup-popover', {\n 'spectrum-InputGroup-popover--quiet': isQuiet\n })}\n ref={popoverRef}\n triggerRef={inputGroupRef}\n scrollRef={listBoxRef}\n placement={`${direction} ${align}`}\n hideArrow\n isNonModal\n shouldFlip={shouldFlip}>\n <ListBoxBase\n {...listBoxProps}\n ref={listBoxRef}\n disallowEmptySelection\n shouldSelectOnPressUp\n focusOnPointerEnter\n layout={layout}\n state={state}\n shouldUseVirtualFocus\n isLoading={loadingState === 'loading' || loadingState === 'loadingMore'}\n showLoadingSpinner={loadingState === 'loadingMore'}\n onLoadMore={onLoadMore}\n renderEmptyState={() =>\n isAsync && (\n <span className={classNames(comboboxStyles, 'no-results')}>\n {loadingState === 'loading'\n ? stringFormatter.format('loading')\n : stringFormatter.format('noResults')}\n </span>\n )\n }\n />\n </Popover>\n </>\n );\n});\n\ninterface ComboBoxInputProps extends SpectrumComboBoxProps<unknown> {\n inputProps: InputHTMLAttributes<HTMLInputElement>;\n inputRef: RefObject<HTMLInputElement | HTMLTextAreaElement | null>;\n triggerProps: AriaButtonProps;\n triggerRef: RefObject<FocusableRefValue<HTMLElement> | null>;\n style?: React.CSSProperties;\n className?: string;\n isOpen?: boolean;\n}\n\nconst ComboBoxInput = React.forwardRef(function ComboBoxInput(\n props: ComboBoxInputProps,\n ref: ForwardedRef<HTMLElement | null>\n) {\n let {\n isQuiet,\n isDisabled,\n validationState,\n inputProps,\n inputRef,\n triggerProps,\n triggerRef,\n autoFocus,\n style,\n className,\n loadingState,\n isOpen,\n menuTrigger\n } = props;\n let {hoverProps, isHovered} = useHover({});\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/combobox');\n let timeout = useRef<ReturnType<typeof setTimeout> | null>(null);\n let [showLoading, setShowLoading] = useState(false);\n\n let loadingCircle = (\n <ProgressCircle\n aria-label={stringFormatter.format('loading')}\n size=\"S\"\n isIndeterminate\n UNSAFE_className={classNames(\n textfieldStyles,\n 'spectrum-Textfield-circleLoader',\n classNames(styles, 'spectrum-InputGroup-input-circleLoader')\n )}\n />\n );\n\n let isLoading = loadingState === 'loading' || loadingState === 'filtering';\n let inputValue = inputProps.value;\n let lastInputValue = useRef(inputValue);\n useEffect(() => {\n if (isLoading && !showLoading) {\n if (timeout.current === null) {\n timeout.current = setTimeout(() => {\n setShowLoading(true);\n }, 500);\n }\n\n // If user is typing, clear the timer and restart since it is a new request\n if (inputValue !== lastInputValue.current) {\n clearTimeout(timeout.current);\n timeout.current = setTimeout(() => {\n setShowLoading(true);\n }, 500);\n }\n } else if (!isLoading) {\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n timeout.current = null;\n }\n\n lastInputValue.current = inputValue;\n }, [isLoading, showLoading, inputValue]);\n\n let [prevIsLoading, setPrevIsLoading] = useState(isLoading);\n if (prevIsLoading !== isLoading && !isLoading) {\n setShowLoading(false);\n setPrevIsLoading(isLoading);\n }\n\n useEffect(() => {\n return () => {\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n timeout.current = null;\n };\n }, []);\n\n return (\n <FocusRing\n within\n isTextInput\n focusClass={classNames(styles, 'is-focused')}\n focusRingClass={classNames(styles, 'focus-ring')}\n autoFocus={autoFocus}>\n <div\n {...hoverProps}\n ref={ref as RefObject<HTMLDivElement | null>}\n style={style}\n className={classNames(\n styles,\n 'spectrum-InputGroup',\n {\n 'spectrum-InputGroup--quiet': isQuiet,\n 'is-disabled': isDisabled,\n 'spectrum-InputGroup--invalid': validationState === 'invalid' && !isDisabled,\n 'is-hovered': isHovered\n },\n className\n )}>\n <TextFieldBase\n inputProps={inputProps}\n inputRef={inputRef}\n UNSAFE_className={classNames(styles, 'spectrum-InputGroup-field')}\n inputClassName={classNames(styles, 'spectrum-InputGroup-input')}\n validationIconClassName={classNames(styles, 'spectrum-InputGroup-input-validationIcon')}\n isDisabled={isDisabled}\n isQuiet={isQuiet}\n validationState={validationState}\n // loading circle should only be displayed if menu is open, if menuTrigger is \"manual\", or first time load (to stop circle from showing up when user selects an option)\n // TODO: add special case for completionMode: complete as well\n isLoading={\n showLoading && (isOpen || menuTrigger === 'manual' || loadingState === 'loading')\n }\n loadingIndicator={loadingState != null ? loadingCircle : undefined}\n disableFocusRing\n />\n <PressResponder preventFocusOnPress isPressed={isOpen}>\n <FieldButton\n {...triggerProps}\n ref={triggerRef}\n UNSAFE_className={classNames(styles, 'spectrum-FieldButton')}\n isQuiet={isQuiet}\n validationState={validationState}>\n <ChevronDownMedium UNSAFE_className={classNames(styles, 'spectrum-Dropdown-chevron')} />\n </FieldButton>\n </PressResponder>\n </div>\n </FocusRing>\n );\n});\n"],"names":[],"version":3,"file":"ComboBox.mjs.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CM,MAAM,0DAAiB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,eAAe,KAAiC,EAAE,GAA8B;IACtI,QAAQ,CAAA,GAAA,0CAAe,EAAE;IAEzB,IAAI,WACF,OAAO,cACP,UAAU,cACV,UAAU,cACV,UAAU,sBACV,kBAAkB,QAClB,IAAI,aACJ,YAAY,2BACZ,iBAAiB,EAClB,GAAG;IACJ,IAAI,mBACF,YAAY;IAGd,IAAI,YAAC,QAAQ,EAAC,GAAG,CAAA,GAAA,mCAAQ,EAAE;QAAC,aAAa;IAAM;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a,GACb,kBACA;YACE,aAAa,CAAC,CAAC,MAAM,KAAK;QAC5B;QAIN,gBACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAa,GACb,wBACA,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAW,GACX;QAIN,yBACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAW,GACX;sBAGN,0DAAC,CAAA,GAAA,qCAAU;QACR,GAAG,YAAY;QAChB,UAAU;0BAAC;wBAAc;QAAU;QACnC,wBAAA;QACA,uBAAA;QACA,qBAAA;QACA,QAAQ;QACR,OAAO;QACP,uBAAA;QACA,kBAAkB,IAAM,iBAAiB,2BACvC,0DAAC;gBAAK,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAa,GAAG;eACzC,gBAAgB,MAAM,CAAC;QAG5B,kBACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAa,GACb;QAGJ,KAAK;QACL,UAAU;QACV,YAAY;QACZ,WAAW;sBACb,0DAAC,CAAA,GAAA,qCAAY;QAAE,WAAW;;AAIlC","sources":["packages/@adobe/react-spectrum/src/combobox/MobileComboBox.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport {AriaButtonProps, useButton} from 'react-aria/useButton';\nimport buttonStyles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport CheckmarkMedium from '@spectrum-icons/ui/CheckmarkMedium';\nimport ChevronDownMedium from '@spectrum-icons/ui/ChevronDownMedium';\nimport {classNames} from '../utils/classNames';\nimport {ClearButton} from '../button/ClearButton';\nimport {ComboBoxState, useComboBoxState} from 'react-stately/useComboBoxState';\nimport comboboxStyles from './combobox.css';\nimport {DismissButton} from 'react-aria/Overlay';\nimport {Field} from '../label/Field';\nimport {FocusableRef, FocusableRefValue, ValidationState} from '@react-types/shared';\nimport {FocusRing} from 'react-aria/FocusRing';\nimport {focusSafely} from 'react-aria/private/interactions/focusSafely';\nimport {FocusScope} from 'react-aria/FocusScope';\nimport {getActiveElement} from 'react-aria/private/utils/shadowdom/DOMFunctions';\nimport intlMessages from '../../intl/combobox/*.json';\nimport labelStyles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\nimport {ListBoxBase, useListBoxLayout} from '../listbox/ListBoxBase';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {ProgressCircle} from '../progress/ProgressCircle';\nimport React, {ForwardedRef, HTMLAttributes, InputHTMLAttributes, ReactElement, ReactNode, useCallback, useEffect, useRef, useState} from 'react';\nimport searchStyles from '@adobe/spectrum-css-temp/components/search/vars.css';\nimport {setInteractionModality} from 'react-aria/private/interactions/useFocusVisible';\n// @ts-ignore\nimport {SpectrumComboBoxProps} from './ComboBox';\nimport styles from '@adobe/spectrum-css-temp/components/inputgroup/vars.css';\nimport {TextFieldBase} from '../textfield/TextFieldBase';\nimport textfieldStyles from '@adobe/spectrum-css-temp/components/textfield/vars.css';\nimport {Tray} from '../overlays/Tray';\nimport {unwrapDOMRef, useFocusableRef} from '../utils/useDOMRef';\nimport {useComboBox} from 'react-aria/useComboBox';\nimport {useDialog} from 'react-aria/useDialog';\nimport {useField} from 'react-aria/useField';\nimport {useFilter} from 'react-aria/useFilter';\nimport {useFormReset} from 'react-aria/private/utils/useFormReset';\nimport {useFormValidation} from 'react-aria/private/form/useFormValidation';\nimport {useHover} from 'react-aria/useHover';\nimport {useId} from 'react-aria/useId';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useObjectRef} from 'react-aria/useObjectRef';\nimport {useOverlayTrigger} from 'react-aria/useOverlayTrigger';\nimport {useProviderProps} from '../provider/Provider';\n\nexport const MobileComboBox = React.forwardRef(function MobileComboBox(props: SpectrumComboBoxProps<any>, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n\n let {\n isQuiet,\n isDisabled,\n isReadOnly,\n isRequired,\n validationBehavior,\n name,\n formValue = 'text',\n allowsCustomValue\n } = props;\n if (allowsCustomValue) {\n formValue = 'text';\n }\n\n let {contains} = useFilter({sensitivity: 'base'});\n let state = useComboBoxState({\n ...props,\n defaultFilter: contains,\n allowsEmptyCollection: true,\n // Needs to be false here otherwise we double up on commitSelection/commitCustomValue calls when\n // user taps on underlay (i.e. initial tap will call setFocused(false) -> commitSelection/commitCustomValue via onBlur,\n // then the closing of the tray will call setFocused(false) again due to cleanup effect)\n shouldCloseOnBlur: false\n });\n\n let buttonRef = useRef<HTMLDivElement>(null);\n let domRef = useFocusableRef(ref, buttonRef);\n let {triggerProps, overlayProps} = useOverlayTrigger({type: 'listbox'}, state, buttonRef);\n\n let inputRef = useRef<HTMLInputElement>(null);\n useFormValidation({\n ...props,\n focus: () => buttonRef.current?.focus()\n }, state, inputRef);\n let {isInvalid, validationErrors, validationDetails} = state.displayValidation;\n let validationState = props.validationState || (isInvalid ? 'invalid' : undefined);\n let errorMessage = props.errorMessage ?? validationErrors.join(' ');\n\n let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useField({\n ...props,\n labelElementType: 'span',\n isInvalid,\n errorMessage\n });\n\n // Focus the button and show focus ring when clicking on the label\n labelProps.onClick = () => {\n if (!props.isDisabled) {\n buttonRef.current?.focus();\n setInteractionModality('keyboard');\n }\n };\n\n let inputProps: InputHTMLAttributes<HTMLInputElement> = {\n type: 'hidden',\n name,\n value: formValue === 'text' ? state.inputValue : String(state.selectedKey)\n };\n\n if (validationBehavior === 'native') {\n // Use a hidden <input type=\"text\"> rather than <input type=\"hidden\">\n // so that an empty value blocks HTML form submission when the field is required.\n inputProps.type = 'text';\n inputProps.hidden = true;\n inputProps.required = isRequired;\n // Ignore react warning.\n inputProps.onChange = () => {};\n }\n\n useFormReset<any>(\n inputRef,\n formValue === 'text' ? state.defaultInputValue : state.defaultSelectedKey,\n formValue === 'text' ? state.setInputValue : state.setSelectedKey\n );\n\n return (\n <>\n <Field\n {...props}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n validationState={validationState}\n isInvalid={isInvalid}\n validationErrors={validationErrors}\n validationDetails={validationDetails}\n elementType=\"span\"\n ref={domRef}\n includeNecessityIndicatorInAccessibilityName>\n <ComboBoxButton\n {...mergeProps(triggerProps, fieldProps, {autoFocus: props.autoFocus})}\n ref={buttonRef}\n isQuiet={isQuiet}\n isDisabled={isDisabled}\n isPlaceholder={!state.inputValue}\n validationState={validationState}\n onPress={() => !isReadOnly && state.open(null, 'manual')}>\n {state.inputValue || props.placeholder || ''}\n </ComboBoxButton>\n </Field>\n <input {...inputProps} ref={inputRef} />\n <Tray state={state} isFixedHeight {...overlayProps}>\n <ComboBoxTray\n {...props}\n onClose={state.close}\n overlayProps={overlayProps}\n state={state} />\n </Tray>\n </>\n );\n});\n\ninterface ComboBoxButtonProps extends AriaButtonProps {\n isQuiet?: boolean,\n isDisabled?: boolean,\n isPlaceholder?: boolean,\n validationState?: ValidationState,\n children?: ReactNode,\n style?: React.CSSProperties,\n className?: string\n}\n\nexport const ComboBoxButton = React.forwardRef(function ComboBoxButton(props: ComboBoxButtonProps, ref: ForwardedRef<HTMLDivElement>) {\n let {\n isQuiet,\n isDisabled,\n isPlaceholder,\n validationState,\n children,\n style,\n className\n } = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/combobox');\n let valueId = useId();\n let invalidId = useId();\n let validId = useId();\n let validationIcon = validationState === 'invalid'\n ? <AlertMedium id={invalidId} aria-label={stringFormatter.format('invalid')} />\n : <CheckmarkMedium id={validId} aria-label={stringFormatter.format('valid')} />;\n\n let validation = React.cloneElement(validationIcon, {\n UNSAFE_className: classNames(\n textfieldStyles,\n 'spectrum-Textfield-validationIcon',\n classNames(\n styles,\n 'spectrum-InputGroup-input-validationIcon'\n )\n )\n });\n\n let objRef = useObjectRef(ref);\n let {hoverProps, isHovered} = useHover({});\n let {buttonProps, isPressed} = useButton({\n ...props,\n 'aria-labelledby': [\n props['aria-labelledby'],\n props['aria-label'] && !props['aria-labelledby'] ? props.id : null,\n valueId,\n validationState === 'invalid' ? invalidId : null,\n validationState === 'valid' ? validId : null\n ].filter(Boolean).join(' '),\n elementType: 'div'\n }, objRef);\n\n return (\n (<FocusRing\n focusClass={classNames(styles, 'is-focused')}\n focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...mergeProps(hoverProps, buttonProps)}\n aria-haspopup=\"dialog\"\n ref={objRef}\n style={{...style, outline: 'none'}}\n className={\n classNames(\n styles,\n 'spectrum-InputGroup',\n {\n 'spectrum-InputGroup--quiet': isQuiet,\n 'is-disabled': isDisabled,\n 'spectrum-InputGroup--invalid': validationState === 'invalid' && !isDisabled,\n 'is-hovered': isHovered\n },\n classNames(\n comboboxStyles,\n 'mobile-combobox'\n ),\n className\n )\n }>\n <div\n className={\n classNames(\n textfieldStyles,\n 'spectrum-Textfield',\n {\n 'spectrum-Textfield--invalid': validationState === 'invalid' && !isDisabled,\n 'spectrum-Textfield--valid': validationState === 'valid' && !isDisabled,\n 'spectrum-Textfield--quiet': isQuiet\n },\n classNames(\n styles,\n 'spectrum-InputGroup-field'\n )\n )\n }>\n <div\n className={\n classNames(\n textfieldStyles,\n 'spectrum-Textfield-input',\n {\n 'is-hovered': isHovered,\n 'is-placeholder': isPlaceholder,\n 'is-disabled': isDisabled\n },\n classNames(\n styles,\n 'spectrum-InputGroup-input',\n classNames(labelStyles, 'spectrum-Field-field')\n ),\n classNames(\n comboboxStyles,\n 'mobile-input'\n )\n )\n }>\n <span\n id={valueId}\n className={\n classNames(\n comboboxStyles,\n 'mobile-value'\n )\n }>\n {children}\n </span>\n </div>\n {validationState && !isDisabled ? validation : null}\n </div>\n <div\n className={\n classNames(\n buttonStyles,\n 'spectrum-FieldButton',\n {\n 'spectrum-FieldButton--quiet': isQuiet,\n 'is-active': isPressed,\n 'is-disabled': isDisabled,\n 'spectrum-FieldButton--invalid': validationState === 'invalid' && !isDisabled,\n 'is-hovered': isHovered\n },\n classNames(\n styles,\n 'spectrum-FieldButton'\n )\n )\n }>\n <ChevronDownMedium UNSAFE_className={classNames(styles, 'spectrum-Dropdown-chevron')} />\n </div>\n </div>\n </FocusRing>)\n );\n});\n\ninterface ComboBoxTrayProps extends SpectrumComboBoxProps<any> {\n state: ComboBoxState<any>,\n overlayProps: HTMLAttributes<HTMLElement>,\n loadingIndicator?: ReactElement,\n onClose: () => void\n}\n\nfunction ComboBoxTray(props: ComboBoxTrayProps) {\n let {\n // completionMode = 'suggest',\n state,\n isDisabled,\n validationState,\n label,\n overlayProps,\n loadingState,\n onLoadMore,\n onClose\n } = props;\n\n let timeout = useRef<ReturnType<typeof setTimeout> | null>(null);\n let [showLoading, setShowLoading] = useState(false);\n let inputRef = useRef<HTMLInputElement>(null);\n let buttonRef = useRef<FocusableRefValue<HTMLElement>>(null);\n let popoverRef = useRef<HTMLDivElement>(null);\n let listBoxRef = useRef<HTMLDivElement>(null);\n let isLoading = loadingState === 'loading' || loadingState === 'loadingMore';\n let layout = useListBoxLayout();\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/combobox');\n\n let {inputProps, listBoxProps, labelProps} = useComboBox(\n {\n ...props,\n // completionMode,\n layoutDelegate: layout,\n buttonRef: unwrapDOMRef(buttonRef),\n popoverRef: popoverRef,\n listBoxRef,\n inputRef,\n // Handled outside the tray.\n name: undefined\n },\n state\n );\n\n React.useEffect(() => {\n if (inputRef.current) {\n focusSafely(inputRef.current);\n }\n }, []);\n\n React.useEffect(() => {\n // When the tray closes, set state.isFocused (i.e. the tray input's focus tracker) to false.\n // This is to prevent state.isFocused from being set to true when the tray closes via tapping on the underlay\n // (FocusScope attempts to restore focus to the tray input when tapping outside the tray due to \"contain\")\n // Have to do this manually since React doesn't call onBlur when a component is unmounted: https://github.com/facebook/react/issues/12363\n if (!state.isOpen && state.isFocused) {\n state.setFocused(false);\n }\n });\n\n let {dialogProps} = useDialog({\n 'aria-labelledby': useId(labelProps.id)\n }, popoverRef);\n\n // Override the role of the input to \"searchbox\" instead of \"combobox\".\n // Since the listbox is always visible, the combobox role doesn't really give us anything.\n // VoiceOver on iOS reads \"double tap to collapse\" when focused on the input rather than\n // \"double tap to edit text\", as with a textbox or searchbox. We'd like double tapping to\n // open the virtual keyboard rather than closing the tray.\n // Unlike \"combobox\", \"aria-expanded\" is not a valid attribute on \"searchbox\".\n inputProps.role = 'searchbox';\n inputProps['aria-haspopup'] = 'listbox';\n delete inputProps['aria-expanded'];\n delete inputProps.onTouchEnd;\n\n let clearButton = (\n <ClearButton\n preventFocus\n aria-label={stringFormatter.format('clear')}\n excludeFromTabOrder\n onPress={() => {\n state.setInputValue('');\n inputRef.current?.focus();\n }}\n UNSAFE_className={\n classNames(\n searchStyles,\n 'spectrum-ClearButton'\n )\n }\n isDisabled={isDisabled} />\n );\n\n let loadingCircle = (\n <ProgressCircle\n aria-label={stringFormatter.format('loading')}\n size=\"S\"\n isIndeterminate\n UNSAFE_className={classNames(\n searchStyles,\n 'spectrum-Search-circleLoader',\n classNames(\n textfieldStyles,\n 'spectrum-Textfield-circleLoader'\n )\n )} />\n );\n\n // Close the software keyboard on scroll to give the user a bigger area to scroll.\n // But only do this if scrolling with touch, otherwise it can cause issues with touch\n // screen readers.\n let isTouchDown = useRef(false);\n let onTouchStart = () => {\n isTouchDown.current = true;\n };\n\n let onTouchEnd = () => {\n isTouchDown.current = false;\n };\n\n let onScroll = useCallback(() => {\n if (!inputRef.current || getActiveElement() !== inputRef.current || !isTouchDown.current) {\n return;\n }\n\n popoverRef.current?.focus();\n }, [inputRef, popoverRef, isTouchDown]);\n\n let inputValue = inputProps.value;\n let lastInputValue = useRef(inputValue);\n useEffect(() => {\n if (loadingState === 'filtering' && !showLoading) {\n if (timeout.current === null) {\n timeout.current = setTimeout(() => {\n setShowLoading(true);\n }, 500);\n }\n\n // If user is typing, clear the timer and restart since it is a new request\n if (inputValue !== lastInputValue.current) {\n clearTimeout(timeout.current);\n timeout.current = setTimeout(() => {\n setShowLoading(true);\n }, 500);\n }\n } else if (loadingState !== 'filtering') {\n // If loading is no longer happening, clear any timers and hide the loading circle\n setShowLoading(false);\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n timeout.current = null;\n }\n\n lastInputValue.current = inputValue;\n }, [loadingState, inputValue, showLoading]);\n\n let onKeyDown = (e) => {\n // Close virtual keyboard if user hits Enter w/o any focused options\n if (e.key === 'Enter' && state.selectionManager.focusedKey == null) {\n popoverRef.current?.focus();\n } else {\n inputProps.onKeyDown?.(e);\n }\n };\n\n return (\n <FocusScope restoreFocus contain>\n <div\n {...mergeProps(overlayProps, dialogProps)}\n ref={popoverRef}\n className={\n classNames(\n comboboxStyles,\n 'tray-dialog'\n )\n }>\n <DismissButton onDismiss={onClose} />\n <TextFieldBase\n label={label}\n labelProps={labelProps}\n inputProps={{...inputProps, onKeyDown}}\n inputRef={inputRef}\n isDisabled={isDisabled}\n isLoading={showLoading && loadingState === 'filtering'}\n loadingIndicator={loadingState != null ? loadingCircle : undefined}\n validationState={validationState}\n labelAlign=\"start\"\n labelPosition=\"top\"\n wrapperChildren={(state.inputValue !== '' || loadingState === 'filtering' || validationState != null) && !props.isReadOnly ? clearButton : undefined}\n UNSAFE_className={\n classNames(\n searchStyles,\n 'spectrum-Search',\n 'spectrum-Textfield',\n 'spectrum-Search--loadable',\n {\n 'spectrum-Search--invalid': validationState === 'invalid' && !isDisabled,\n 'spectrum-Search--valid': validationState === 'valid' && !isDisabled\n },\n classNames(\n comboboxStyles,\n 'tray-textfield',\n {\n 'has-label': !!props.label\n }\n )\n )\n }\n inputClassName={\n classNames(\n comboboxStyles,\n 'tray-textfield-input',\n classNames(\n searchStyles,\n 'spectrum-Search-input'\n )\n )\n }\n validationIconClassName={\n classNames(\n searchStyles,\n 'spectrum-Search-validationIcon'\n )\n } />\n <ListBoxBase\n {...listBoxProps}\n domProps={{onTouchStart, onTouchEnd}}\n disallowEmptySelection\n shouldSelectOnPressUp\n focusOnPointerEnter\n layout={layout}\n state={state}\n shouldUseVirtualFocus\n renderEmptyState={() => loadingState !== 'loading' && (\n <span className={classNames(comboboxStyles, 'no-results')}>\n {stringFormatter.format('noResults')}\n </span>\n )}\n UNSAFE_className={\n classNames(\n comboboxStyles,\n 'tray-listbox'\n )\n }\n ref={listBoxRef}\n onScroll={onScroll}\n onLoadMore={onLoadMore}\n isLoading={isLoading} />\n <DismissButton onDismiss={onClose} />\n </div>\n </FocusScope>\n );\n}\n"],"names":[],"version":3,"file":"MobileComboBox.cjs.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDM,MAAM,0DAAiB,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,eACtD,KAAiC,EACjC,GAA8B;IAE9B,QAAQ,CAAA,GAAA,0CAAe,EAAE;IAEzB,IAAI,WACF,OAAO,cACP,UAAU,cACV,UAAU,cACV,UAAU,sBACV,kBAAkB,QAClB,IAAI,aACJ,YAAY,2BACZ,iBAAiB,EAClB,GAAG;IACJ,IAAI,mBACF,YAAY;IAGd,IAAI,YAAC,QAAQ,EAAC,GAAG,CAAA,GAAA,mCAAQ,EAAE;QAAC,aAAa;IAAM;IAC/C,IAAI,QAAQ,CAAA,GAAA,oDAAe,EAAE;QAC3B,GAAG,KAAK;QACR,eAAe;QACf,uBAAuB;QACvB,gGAAgG;QAChG,uHAAuH;QACvH,wFAAwF;QACxF,mBAAmB;IACrB;IAEA,IAAI,YAAY,CAAA,GAAA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A,oCAAS,EAAE,CAAA,GAAA,mDAAW,GAAG;QAE3B,yBAAyB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAW,GAAG;sBAEpD,0DAAC,CAAA,GAAA,qCAAU;QACR,GAAG,YAAY;QAChB,UAAU;0BAAC;wBAAc;QAAU;QACnC,wBAAA;QACA,uBAAA;QACA,qBAAA;QACA,QAAQ;QACR,OAAO;QACP,uBAAA;QACA,kBAAkB,IAChB,iBAAiB,2BACf,0DAAC;gBAAK,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAa,GAAG;eACzC,gBAAgB,MAAM,CAAC;QAI9B,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAa,GAAG;QAC7C,KAAK;QACL,UAAU;QACV,YAAY;QACZ,WAAW;sBAEb,0DAAC,CAAA,GAAA,qCAAY;QAAE,WAAW;;AAIlC","sources":["packages/@adobe/react-spectrum/src/combobox/MobileComboBox.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport {AriaButtonProps, useButton} from 'react-aria/useButton';\nimport buttonStyles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport CheckmarkMedium from '@spectrum-icons/ui/CheckmarkMedium';\nimport ChevronDownMedium from '@spectrum-icons/ui/ChevronDownMedium';\nimport {classNames} from '../utils/classNames';\nimport {ClearButton} from '../button/ClearButton';\nimport {ComboBoxState, useComboBoxState} from 'react-stately/useComboBoxState';\nimport comboboxStyles from './combobox.css';\nimport {DismissButton} from 'react-aria/Overlay';\nimport {Field} from '../label/Field';\nimport {FocusableRef, FocusableRefValue, ValidationState} from '@react-types/shared';\nimport {FocusRing} from 'react-aria/FocusRing';\nimport {focusSafely} from 'react-aria/private/interactions/focusSafely';\nimport {FocusScope} from 'react-aria/FocusScope';\nimport {getActiveElement} from 'react-aria/private/utils/shadowdom/DOMFunctions';\nimport intlMessages from '../../intl/combobox/*.json';\nimport labelStyles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\nimport {ListBoxBase, useListBoxLayout} from '../listbox/ListBoxBase';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {ProgressCircle} from '../progress/ProgressCircle';\nimport React, {\n ForwardedRef,\n HTMLAttributes,\n InputHTMLAttributes,\n ReactElement,\n ReactNode,\n useCallback,\n useEffect,\n useRef,\n useState\n} from 'react';\nimport searchStyles from '@adobe/spectrum-css-temp/components/search/vars.css';\nimport {setInteractionModality} from 'react-aria/private/interactions/useFocusVisible';\n// @ts-ignore\nimport {SpectrumComboBoxProps} from './ComboBox';\nimport styles from '@adobe/spectrum-css-temp/components/inputgroup/vars.css';\nimport {TextFieldBase} from '../textfield/TextFieldBase';\nimport textfieldStyles from '@adobe/spectrum-css-temp/components/textfield/vars.css';\nimport {Tray} from '../overlays/Tray';\nimport {unwrapDOMRef, useFocusableRef} from '../utils/useDOMRef';\nimport {useComboBox} from 'react-aria/useComboBox';\nimport {useDialog} from 'react-aria/useDialog';\nimport {useField} from 'react-aria/useField';\nimport {useFilter} from 'react-aria/useFilter';\nimport {useFormReset} from 'react-aria/private/utils/useFormReset';\nimport {useFormValidation} from 'react-aria/private/form/useFormValidation';\nimport {useHover} from 'react-aria/useHover';\nimport {useId} from 'react-aria/useId';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useObjectRef} from 'react-aria/useObjectRef';\nimport {useOverlayTrigger} from 'react-aria/useOverlayTrigger';\nimport {useProviderProps} from '../provider/Provider';\n\nexport const MobileComboBox = React.forwardRef(function MobileComboBox(\n props: SpectrumComboBoxProps<any>,\n ref: FocusableRef<HTMLElement>\n) {\n props = useProviderProps(props);\n\n let {\n isQuiet,\n isDisabled,\n isReadOnly,\n isRequired,\n validationBehavior,\n name,\n formValue = 'text',\n allowsCustomValue\n } = props;\n if (allowsCustomValue) {\n formValue = 'text';\n }\n\n let {contains} = useFilter({sensitivity: 'base'});\n let state = useComboBoxState({\n ...props,\n defaultFilter: contains,\n allowsEmptyCollection: true,\n // Needs to be false here otherwise we double up on commitSelection/commitCustomValue calls when\n // user taps on underlay (i.e. initial tap will call setFocused(false) -> commitSelection/commitCustomValue via onBlur,\n // then the closing of the tray will call setFocused(false) again due to cleanup effect)\n shouldCloseOnBlur: false\n });\n\n let buttonRef = useRef<HTMLDivElement>(null);\n let domRef = useFocusableRef(ref, buttonRef);\n let {triggerProps, overlayProps} = useOverlayTrigger({type: 'listbox'}, state, buttonRef);\n\n let inputRef = useRef<HTMLInputElement>(null);\n useFormValidation(\n {\n ...props,\n focus: () => buttonRef.current?.focus()\n },\n state,\n inputRef\n );\n let {isInvalid, validationErrors, validationDetails} = state.displayValidation;\n let validationState = props.validationState || (isInvalid ? 'invalid' : undefined);\n let errorMessage = props.errorMessage ?? validationErrors.join(' ');\n\n let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useField({\n ...props,\n labelElementType: 'span',\n isInvalid,\n errorMessage\n });\n\n // Focus the button and show focus ring when clicking on the label\n labelProps.onClick = () => {\n if (!props.isDisabled) {\n buttonRef.current?.focus();\n setInteractionModality('keyboard');\n }\n };\n\n let inputProps: InputHTMLAttributes<HTMLInputElement> = {\n type: 'hidden',\n name,\n value: formValue === 'text' ? state.inputValue : String(state.selectedKey)\n };\n\n if (validationBehavior === 'native') {\n // Use a hidden <input type=\"text\"> rather than <input type=\"hidden\">\n // so that an empty value blocks HTML form submission when the field is required.\n inputProps.type = 'text';\n inputProps.hidden = true;\n inputProps.required = isRequired;\n // Ignore react warning.\n inputProps.onChange = () => {};\n }\n\n useFormReset<any>(\n inputRef,\n formValue === 'text' ? state.defaultInputValue : state.defaultSelectedKey,\n formValue === 'text' ? state.setInputValue : state.setSelectedKey\n );\n\n return (\n <>\n <Field\n {...props}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n validationState={validationState}\n isInvalid={isInvalid}\n validationErrors={validationErrors}\n validationDetails={validationDetails}\n elementType=\"span\"\n ref={domRef}\n includeNecessityIndicatorInAccessibilityName>\n <ComboBoxButton\n {...mergeProps(triggerProps, fieldProps, {autoFocus: props.autoFocus})}\n ref={buttonRef}\n isQuiet={isQuiet}\n isDisabled={isDisabled}\n isPlaceholder={!state.inputValue}\n validationState={validationState}\n onPress={() => !isReadOnly && state.open(null, 'manual')}>\n {state.inputValue || props.placeholder || ''}\n </ComboBoxButton>\n </Field>\n <input {...inputProps} ref={inputRef} />\n <Tray state={state} isFixedHeight {...overlayProps}>\n <ComboBoxTray {...props} onClose={state.close} overlayProps={overlayProps} state={state} />\n </Tray>\n </>\n );\n});\n\ninterface ComboBoxButtonProps extends AriaButtonProps {\n isQuiet?: boolean;\n isDisabled?: boolean;\n isPlaceholder?: boolean;\n validationState?: ValidationState;\n children?: ReactNode;\n style?: React.CSSProperties;\n className?: string;\n}\n\nexport const ComboBoxButton = React.forwardRef(function ComboBoxButton(\n props: ComboBoxButtonProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n let {isQuiet, isDisabled, isPlaceholder, validationState, children, style, className} = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/combobox');\n let valueId = useId();\n let invalidId = useId();\n let validId = useId();\n let validationIcon =\n validationState === 'invalid' ? (\n <AlertMedium id={invalidId} aria-label={stringFormatter.format('invalid')} />\n ) : (\n <CheckmarkMedium id={validId} aria-label={stringFormatter.format('valid')} />\n );\n\n let validation = React.cloneElement(validationIcon, {\n UNSAFE_className: classNames(\n textfieldStyles,\n 'spectrum-Textfield-validationIcon',\n classNames(styles, 'spectrum-InputGroup-input-validationIcon')\n )\n });\n\n let objRef = useObjectRef(ref);\n let {hoverProps, isHovered} = useHover({});\n let {buttonProps, isPressed} = useButton(\n {\n ...props,\n 'aria-labelledby': [\n props['aria-labelledby'],\n props['aria-label'] && !props['aria-labelledby'] ? props.id : null,\n valueId,\n validationState === 'invalid' ? invalidId : null,\n validationState === 'valid' ? validId : null\n ]\n .filter(Boolean)\n .join(' '),\n elementType: 'div'\n },\n objRef\n );\n\n return (\n <FocusRing\n focusClass={classNames(styles, 'is-focused')}\n focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...mergeProps(hoverProps, buttonProps)}\n aria-haspopup=\"dialog\"\n ref={objRef}\n style={{...style, outline: 'none'}}\n className={classNames(\n styles,\n 'spectrum-InputGroup',\n {\n 'spectrum-InputGroup--quiet': isQuiet,\n 'is-disabled': isDisabled,\n 'spectrum-InputGroup--invalid': validationState === 'invalid' && !isDisabled,\n 'is-hovered': isHovered\n },\n classNames(comboboxStyles, 'mobile-combobox'),\n className\n )}>\n <div\n className={classNames(\n textfieldStyles,\n 'spectrum-Textfield',\n {\n 'spectrum-Textfield--invalid': validationState === 'invalid' && !isDisabled,\n 'spectrum-Textfield--valid': validationState === 'valid' && !isDisabled,\n 'spectrum-Textfield--quiet': isQuiet\n },\n classNames(styles, 'spectrum-InputGroup-field')\n )}>\n <div\n className={classNames(\n textfieldStyles,\n 'spectrum-Textfield-input',\n {\n 'is-hovered': isHovered,\n 'is-placeholder': isPlaceholder,\n 'is-disabled': isDisabled\n },\n classNames(\n styles,\n 'spectrum-InputGroup-input',\n classNames(labelStyles, 'spectrum-Field-field')\n ),\n classNames(comboboxStyles, 'mobile-input')\n )}>\n <span id={valueId} className={classNames(comboboxStyles, 'mobile-value')}>\n {children}\n </span>\n </div>\n {validationState && !isDisabled ? validation : null}\n </div>\n <div\n className={classNames(\n buttonStyles,\n 'spectrum-FieldButton',\n {\n 'spectrum-FieldButton--quiet': isQuiet,\n 'is-active': isPressed,\n 'is-disabled': isDisabled,\n 'spectrum-FieldButton--invalid': validationState === 'invalid' && !isDisabled,\n 'is-hovered': isHovered\n },\n classNames(styles, 'spectrum-FieldButton')\n )}>\n <ChevronDownMedium UNSAFE_className={classNames(styles, 'spectrum-Dropdown-chevron')} />\n </div>\n </div>\n </FocusRing>\n );\n});\n\ninterface ComboBoxTrayProps extends SpectrumComboBoxProps<any> {\n state: ComboBoxState<any>;\n overlayProps: HTMLAttributes<HTMLElement>;\n loadingIndicator?: ReactElement;\n onClose: () => void;\n}\n\nfunction ComboBoxTray(props: ComboBoxTrayProps) {\n let {\n // completionMode = 'suggest',\n state,\n isDisabled,\n validationState,\n label,\n overlayProps,\n loadingState,\n onLoadMore,\n onClose\n } = props;\n\n let timeout = useRef<ReturnType<typeof setTimeout> | null>(null);\n let [showLoading, setShowLoading] = useState(false);\n let inputRef = useRef<HTMLInputElement>(null);\n let buttonRef = useRef<FocusableRefValue<HTMLElement>>(null);\n let popoverRef = useRef<HTMLDivElement>(null);\n let listBoxRef = useRef<HTMLDivElement>(null);\n let isLoading = loadingState === 'loading' || loadingState === 'loadingMore';\n let layout = useListBoxLayout();\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/combobox');\n\n let {inputProps, listBoxProps, labelProps} = useComboBox(\n {\n ...props,\n // completionMode,\n layoutDelegate: layout,\n buttonRef: unwrapDOMRef(buttonRef),\n popoverRef: popoverRef,\n listBoxRef,\n inputRef,\n // Handled outside the tray.\n name: undefined\n },\n state\n );\n\n React.useEffect(() => {\n if (inputRef.current) {\n focusSafely(inputRef.current);\n }\n }, []);\n\n React.useEffect(() => {\n // When the tray closes, set state.isFocused (i.e. the tray input's focus tracker) to false.\n // This is to prevent state.isFocused from being set to true when the tray closes via tapping on the underlay\n // (FocusScope attempts to restore focus to the tray input when tapping outside the tray due to \"contain\")\n // Have to do this manually since React doesn't call onBlur when a component is unmounted: https://github.com/facebook/react/issues/12363\n if (!state.isOpen && state.isFocused) {\n state.setFocused(false);\n }\n });\n\n let {dialogProps} = useDialog(\n {\n 'aria-labelledby': useId(labelProps.id)\n },\n popoverRef\n );\n\n // Override the role of the input to \"searchbox\" instead of \"combobox\".\n // Since the listbox is always visible, the combobox role doesn't really give us anything.\n // VoiceOver on iOS reads \"double tap to collapse\" when focused on the input rather than\n // \"double tap to edit text\", as with a textbox or searchbox. We'd like double tapping to\n // open the virtual keyboard rather than closing the tray.\n // Unlike \"combobox\", \"aria-expanded\" is not a valid attribute on \"searchbox\".\n inputProps.role = 'searchbox';\n inputProps['aria-haspopup'] = 'listbox';\n delete inputProps['aria-expanded'];\n delete inputProps.onTouchEnd;\n\n let clearButton = (\n <ClearButton\n preventFocus\n aria-label={stringFormatter.format('clear')}\n excludeFromTabOrder\n onPress={() => {\n state.setInputValue('');\n inputRef.current?.focus();\n }}\n UNSAFE_className={classNames(searchStyles, 'spectrum-ClearButton')}\n isDisabled={isDisabled}\n />\n );\n\n let loadingCircle = (\n <ProgressCircle\n aria-label={stringFormatter.format('loading')}\n size=\"S\"\n isIndeterminate\n UNSAFE_className={classNames(\n searchStyles,\n 'spectrum-Search-circleLoader',\n classNames(textfieldStyles, 'spectrum-Textfield-circleLoader')\n )}\n />\n );\n\n // Close the software keyboard on scroll to give the user a bigger area to scroll.\n // But only do this if scrolling with touch, otherwise it can cause issues with touch\n // screen readers.\n let isTouchDown = useRef(false);\n let onTouchStart = () => {\n isTouchDown.current = true;\n };\n\n let onTouchEnd = () => {\n isTouchDown.current = false;\n };\n\n let onScroll = useCallback(() => {\n if (!inputRef.current || getActiveElement() !== inputRef.current || !isTouchDown.current) {\n return;\n }\n\n popoverRef.current?.focus();\n }, [inputRef, popoverRef, isTouchDown]);\n\n let inputValue = inputProps.value;\n let lastInputValue = useRef(inputValue);\n useEffect(() => {\n if (loadingState === 'filtering' && !showLoading) {\n if (timeout.current === null) {\n timeout.current = setTimeout(() => {\n setShowLoading(true);\n }, 500);\n }\n\n // If user is typing, clear the timer and restart since it is a new request\n if (inputValue !== lastInputValue.current) {\n clearTimeout(timeout.current);\n timeout.current = setTimeout(() => {\n setShowLoading(true);\n }, 500);\n }\n } else if (loadingState !== 'filtering') {\n // If loading is no longer happening, clear any timers and hide the loading circle\n setShowLoading(false);\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n timeout.current = null;\n }\n\n lastInputValue.current = inputValue;\n }, [loadingState, inputValue, showLoading]);\n\n let onKeyDown = e => {\n // Close virtual keyboard if user hits Enter w/o any focused options\n if (e.key === 'Enter' && state.selectionManager.focusedKey == null) {\n popoverRef.current?.focus();\n } else {\n inputProps.onKeyDown?.(e);\n }\n };\n\n return (\n <FocusScope restoreFocus contain>\n <div\n {...mergeProps(overlayProps, dialogProps)}\n ref={popoverRef}\n className={classNames(comboboxStyles, 'tray-dialog')}>\n <DismissButton onDismiss={onClose} />\n <TextFieldBase\n label={label}\n labelProps={labelProps}\n inputProps={{...inputProps, onKeyDown}}\n inputRef={inputRef}\n isDisabled={isDisabled}\n isLoading={showLoading && loadingState === 'filtering'}\n loadingIndicator={loadingState != null ? loadingCircle : undefined}\n validationState={validationState}\n labelAlign=\"start\"\n labelPosition=\"top\"\n wrapperChildren={\n (state.inputValue !== '' || loadingState === 'filtering' || validationState != null) &&\n !props.isReadOnly\n ? clearButton\n : undefined\n }\n UNSAFE_className={classNames(\n searchStyles,\n 'spectrum-Search',\n 'spectrum-Textfield',\n 'spectrum-Search--loadable',\n {\n 'spectrum-Search--invalid': validationState === 'invalid' && !isDisabled,\n 'spectrum-Search--valid': validationState === 'valid' && !isDisabled\n },\n classNames(comboboxStyles, 'tray-textfield', {\n 'has-label': !!props.label\n })\n )}\n inputClassName={classNames(\n comboboxStyles,\n 'tray-textfield-input',\n classNames(searchStyles, 'spectrum-Search-input')\n )}\n validationIconClassName={classNames(searchStyles, 'spectrum-Search-validationIcon')}\n />\n <ListBoxBase\n {...listBoxProps}\n domProps={{onTouchStart, onTouchEnd}}\n disallowEmptySelection\n shouldSelectOnPressUp\n focusOnPointerEnter\n layout={layout}\n state={state}\n shouldUseVirtualFocus\n renderEmptyState={() =>\n loadingState !== 'loading' && (\n <span className={classNames(comboboxStyles, 'no-results')}>\n {stringFormatter.format('noResults')}\n </span>\n )\n }\n UNSAFE_className={classNames(comboboxStyles, 'tray-listbox')}\n ref={listBoxRef}\n onScroll={onScroll}\n onLoadMore={onLoadMore}\n isLoading={isLoading}\n />\n <DismissButton onDismiss={onClose} />\n </div>\n </FocusScope>\n );\n}\n"],"names":[],"version":3,"file":"MobileComboBox.cjs.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CM,MAAM,0DAAiB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,eAAe,KAAiC,EAAE,GAA8B;IACtI,QAAQ,CAAA,GAAA,yCAAe,EAAE;IAEzB,IAAI,WACF,OAAO,cACP,UAAU,cACV,UAAU,cACV,UAAU,sBACV,kBAAkB,QAClB,IAAI,aACJ,YAAY,2BACZ,iBAAiB,EAClB,GAAG;IACJ,IAAI,mBACF,YAAY;IAGd,IAAI,YAAC,QAAQ,EAAC,GAAG,CAAA,GAAA,gBAAQ,EAAE;QAAC,aAAa;IAAM;IAC/C,IAAI,QAAQ,CAAA,GAAA,uBAAe,EAAE;QAC3B,GAAG,KAAK;QACR,eAAe;QACf,uBAAuB;QACvB,gGAAgG;QAChG,uHAAuH;QACvH,wFAAwF;QACxF,mBAAmB;IACrB;IAEA,IAAI,YAAY,CAAA,GAAA,aAAK,EAAkB;IACvC,IAAI,SAAS,CAAA,GAAA,yCAAc,EAAE,KAAK;IAClC,IAAI,gBAAC,YAAY,gBAAE,YAAY,EAAC,GAAG,CAAA,GAAA,wBAAgB,EAAE;QAAC,MAAM;IAAS,GAAG,OAAO;IAE/E,IAAI,WAAW,CAAA,GAAA,a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,CAAA,GAAA,mDAAW,GACX;QAIN,yBACE,CAAA,GAAA,yCAAS,EACP,CAAA,GAAA,mDAAW,GACX;sBAGN,gCAAC,CAAA,GAAA,yCAAU;QACR,GAAG,YAAY;QAChB,UAAU;0BAAC;wBAAc;QAAU;QACnC,wBAAA;QACA,uBAAA;QACA,qBAAA;QACA,QAAQ;QACR,OAAO;QACP,uBAAA;QACA,kBAAkB,IAAM,iBAAiB,2BACvC,gCAAC;gBAAK,WAAW,CAAA,GAAA,yCAAS,EAAE,CAAA,GAAA,gDAAa,GAAG;eACzC,gBAAgB,MAAM,CAAC;QAG5B,kBACE,CAAA,GAAA,yCAAS,EACP,CAAA,GAAA,gDAAa,GACb;QAGJ,KAAK;QACL,UAAU;QACV,YAAY;QACZ,WAAW;sBACb,gCAAC,CAAA,GAAA,oBAAY;QAAE,WAAW;;AAIlC","sources":["packages/@adobe/react-spectrum/src/combobox/MobileComboBox.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport {AriaButtonProps, useButton} from 'react-aria/useButton';\nimport buttonStyles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport CheckmarkMedium from '@spectrum-icons/ui/CheckmarkMedium';\nimport ChevronDownMedium from '@spectrum-icons/ui/ChevronDownMedium';\nimport {classNames} from '../utils/classNames';\nimport {ClearButton} from '../button/ClearButton';\nimport {ComboBoxState, useComboBoxState} from 'react-stately/useComboBoxState';\nimport comboboxStyles from './combobox.css';\nimport {DismissButton} from 'react-aria/Overlay';\nimport {Field} from '../label/Field';\nimport {FocusableRef, FocusableRefValue, ValidationState} from '@react-types/shared';\nimport {FocusRing} from 'react-aria/FocusRing';\nimport {focusSafely} from 'react-aria/private/interactions/focusSafely';\nimport {FocusScope} from 'react-aria/FocusScope';\nimport {getActiveElement} from 'react-aria/private/utils/shadowdom/DOMFunctions';\nimport intlMessages from '../../intl/combobox/*.json';\nimport labelStyles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\nimport {ListBoxBase, useListBoxLayout} from '../listbox/ListBoxBase';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {ProgressCircle} from '../progress/ProgressCircle';\nimport React, {ForwardedRef, HTMLAttributes, InputHTMLAttributes, ReactElement, ReactNode, useCallback, useEffect, useRef, useState} from 'react';\nimport searchStyles from '@adobe/spectrum-css-temp/components/search/vars.css';\nimport {setInteractionModality} from 'react-aria/private/interactions/useFocusVisible';\n// @ts-ignore\nimport {SpectrumComboBoxProps} from './ComboBox';\nimport styles from '@adobe/spectrum-css-temp/components/inputgroup/vars.css';\nimport {TextFieldBase} from '../textfield/TextFieldBase';\nimport textfieldStyles from '@adobe/spectrum-css-temp/components/textfield/vars.css';\nimport {Tray} from '../overlays/Tray';\nimport {unwrapDOMRef, useFocusableRef} from '../utils/useDOMRef';\nimport {useComboBox} from 'react-aria/useComboBox';\nimport {useDialog} from 'react-aria/useDialog';\nimport {useField} from 'react-aria/useField';\nimport {useFilter} from 'react-aria/useFilter';\nimport {useFormReset} from 'react-aria/private/utils/useFormReset';\nimport {useFormValidation} from 'react-aria/private/form/useFormValidation';\nimport {useHover} from 'react-aria/useHover';\nimport {useId} from 'react-aria/useId';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useObjectRef} from 'react-aria/useObjectRef';\nimport {useOverlayTrigger} from 'react-aria/useOverlayTrigger';\nimport {useProviderProps} from '../provider/Provider';\n\nexport const MobileComboBox = React.forwardRef(function MobileComboBox(props: SpectrumComboBoxProps<any>, ref: FocusableRef<HTMLElement>) {\n props = useProviderProps(props);\n\n let {\n isQuiet,\n isDisabled,\n isReadOnly,\n isRequired,\n validationBehavior,\n name,\n formValue = 'text',\n allowsCustomValue\n } = props;\n if (allowsCustomValue) {\n formValue = 'text';\n }\n\n let {contains} = useFilter({sensitivity: 'base'});\n let state = useComboBoxState({\n ...props,\n defaultFilter: contains,\n allowsEmptyCollection: true,\n // Needs to be false here otherwise we double up on commitSelection/commitCustomValue calls when\n // user taps on underlay (i.e. initial tap will call setFocused(false) -> commitSelection/commitCustomValue via onBlur,\n // then the closing of the tray will call setFocused(false) again due to cleanup effect)\n shouldCloseOnBlur: false\n });\n\n let buttonRef = useRef<HTMLDivElement>(null);\n let domRef = useFocusableRef(ref, buttonRef);\n let {triggerProps, overlayProps} = useOverlayTrigger({type: 'listbox'}, state, buttonRef);\n\n let inputRef = useRef<HTMLInputElement>(null);\n useFormValidation({\n ...props,\n focus: () => buttonRef.current?.focus()\n }, state, inputRef);\n let {isInvalid, validationErrors, validationDetails} = state.displayValidation;\n let validationState = props.validationState || (isInvalid ? 'invalid' : undefined);\n let errorMessage = props.errorMessage ?? validationErrors.join(' ');\n\n let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useField({\n ...props,\n labelElementType: 'span',\n isInvalid,\n errorMessage\n });\n\n // Focus the button and show focus ring when clicking on the label\n labelProps.onClick = () => {\n if (!props.isDisabled) {\n buttonRef.current?.focus();\n setInteractionModality('keyboard');\n }\n };\n\n let inputProps: InputHTMLAttributes<HTMLInputElement> = {\n type: 'hidden',\n name,\n value: formValue === 'text' ? state.inputValue : String(state.selectedKey)\n };\n\n if (validationBehavior === 'native') {\n // Use a hidden <input type=\"text\"> rather than <input type=\"hidden\">\n // so that an empty value blocks HTML form submission when the field is required.\n inputProps.type = 'text';\n inputProps.hidden = true;\n inputProps.required = isRequired;\n // Ignore react warning.\n inputProps.onChange = () => {};\n }\n\n useFormReset<any>(\n inputRef,\n formValue === 'text' ? state.defaultInputValue : state.defaultSelectedKey,\n formValue === 'text' ? state.setInputValue : state.setSelectedKey\n );\n\n return (\n <>\n <Field\n {...props}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n validationState={validationState}\n isInvalid={isInvalid}\n validationErrors={validationErrors}\n validationDetails={validationDetails}\n elementType=\"span\"\n ref={domRef}\n includeNecessityIndicatorInAccessibilityName>\n <ComboBoxButton\n {...mergeProps(triggerProps, fieldProps, {autoFocus: props.autoFocus})}\n ref={buttonRef}\n isQuiet={isQuiet}\n isDisabled={isDisabled}\n isPlaceholder={!state.inputValue}\n validationState={validationState}\n onPress={() => !isReadOnly && state.open(null, 'manual')}>\n {state.inputValue || props.placeholder || ''}\n </ComboBoxButton>\n </Field>\n <input {...inputProps} ref={inputRef} />\n <Tray state={state} isFixedHeight {...overlayProps}>\n <ComboBoxTray\n {...props}\n onClose={state.close}\n overlayProps={overlayProps}\n state={state} />\n </Tray>\n </>\n );\n});\n\ninterface ComboBoxButtonProps extends AriaButtonProps {\n isQuiet?: boolean,\n isDisabled?: boolean,\n isPlaceholder?: boolean,\n validationState?: ValidationState,\n children?: ReactNode,\n style?: React.CSSProperties,\n className?: string\n}\n\nexport const ComboBoxButton = React.forwardRef(function ComboBoxButton(props: ComboBoxButtonProps, ref: ForwardedRef<HTMLDivElement>) {\n let {\n isQuiet,\n isDisabled,\n isPlaceholder,\n validationState,\n children,\n style,\n className\n } = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/combobox');\n let valueId = useId();\n let invalidId = useId();\n let validId = useId();\n let validationIcon = validationState === 'invalid'\n ? <AlertMedium id={invalidId} aria-label={stringFormatter.format('invalid')} />\n : <CheckmarkMedium id={validId} aria-label={stringFormatter.format('valid')} />;\n\n let validation = React.cloneElement(validationIcon, {\n UNSAFE_className: classNames(\n textfieldStyles,\n 'spectrum-Textfield-validationIcon',\n classNames(\n styles,\n 'spectrum-InputGroup-input-validationIcon'\n )\n )\n });\n\n let objRef = useObjectRef(ref);\n let {hoverProps, isHovered} = useHover({});\n let {buttonProps, isPressed} = useButton({\n ...props,\n 'aria-labelledby': [\n props['aria-labelledby'],\n props['aria-label'] && !props['aria-labelledby'] ? props.id : null,\n valueId,\n validationState === 'invalid' ? invalidId : null,\n validationState === 'valid' ? validId : null\n ].filter(Boolean).join(' '),\n elementType: 'div'\n }, objRef);\n\n return (\n (<FocusRing\n focusClass={classNames(styles, 'is-focused')}\n focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...mergeProps(hoverProps, buttonProps)}\n aria-haspopup=\"dialog\"\n ref={objRef}\n style={{...style, outline: 'none'}}\n className={\n classNames(\n styles,\n 'spectrum-InputGroup',\n {\n 'spectrum-InputGroup--quiet': isQuiet,\n 'is-disabled': isDisabled,\n 'spectrum-InputGroup--invalid': validationState === 'invalid' && !isDisabled,\n 'is-hovered': isHovered\n },\n classNames(\n comboboxStyles,\n 'mobile-combobox'\n ),\n className\n )\n }>\n <div\n className={\n classNames(\n textfieldStyles,\n 'spectrum-Textfield',\n {\n 'spectrum-Textfield--invalid': validationState === 'invalid' && !isDisabled,\n 'spectrum-Textfield--valid': validationState === 'valid' && !isDisabled,\n 'spectrum-Textfield--quiet': isQuiet\n },\n classNames(\n styles,\n 'spectrum-InputGroup-field'\n )\n )\n }>\n <div\n className={\n classNames(\n textfieldStyles,\n 'spectrum-Textfield-input',\n {\n 'is-hovered': isHovered,\n 'is-placeholder': isPlaceholder,\n 'is-disabled': isDisabled\n },\n classNames(\n styles,\n 'spectrum-InputGroup-input',\n classNames(labelStyles, 'spectrum-Field-field')\n ),\n classNames(\n comboboxStyles,\n 'mobile-input'\n )\n )\n }>\n <span\n id={valueId}\n className={\n classNames(\n comboboxStyles,\n 'mobile-value'\n )\n }>\n {children}\n </span>\n </div>\n {validationState && !isDisabled ? validation : null}\n </div>\n <div\n className={\n classNames(\n buttonStyles,\n 'spectrum-FieldButton',\n {\n 'spectrum-FieldButton--quiet': isQuiet,\n 'is-active': isPressed,\n 'is-disabled': isDisabled,\n 'spectrum-FieldButton--invalid': validationState === 'invalid' && !isDisabled,\n 'is-hovered': isHovered\n },\n classNames(\n styles,\n 'spectrum-FieldButton'\n )\n )\n }>\n <ChevronDownMedium UNSAFE_className={classNames(styles, 'spectrum-Dropdown-chevron')} />\n </div>\n </div>\n </FocusRing>)\n );\n});\n\ninterface ComboBoxTrayProps extends SpectrumComboBoxProps<any> {\n state: ComboBoxState<any>,\n overlayProps: HTMLAttributes<HTMLElement>,\n loadingIndicator?: ReactElement,\n onClose: () => void\n}\n\nfunction ComboBoxTray(props: ComboBoxTrayProps) {\n let {\n // completionMode = 'suggest',\n state,\n isDisabled,\n validationState,\n label,\n overlayProps,\n loadingState,\n onLoadMore,\n onClose\n } = props;\n\n let timeout = useRef<ReturnType<typeof setTimeout> | null>(null);\n let [showLoading, setShowLoading] = useState(false);\n let inputRef = useRef<HTMLInputElement>(null);\n let buttonRef = useRef<FocusableRefValue<HTMLElement>>(null);\n let popoverRef = useRef<HTMLDivElement>(null);\n let listBoxRef = useRef<HTMLDivElement>(null);\n let isLoading = loadingState === 'loading' || loadingState === 'loadingMore';\n let layout = useListBoxLayout();\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/combobox');\n\n let {inputProps, listBoxProps, labelProps} = useComboBox(\n {\n ...props,\n // completionMode,\n layoutDelegate: layout,\n buttonRef: unwrapDOMRef(buttonRef),\n popoverRef: popoverRef,\n listBoxRef,\n inputRef,\n // Handled outside the tray.\n name: undefined\n },\n state\n );\n\n React.useEffect(() => {\n if (inputRef.current) {\n focusSafely(inputRef.current);\n }\n }, []);\n\n React.useEffect(() => {\n // When the tray closes, set state.isFocused (i.e. the tray input's focus tracker) to false.\n // This is to prevent state.isFocused from being set to true when the tray closes via tapping on the underlay\n // (FocusScope attempts to restore focus to the tray input when tapping outside the tray due to \"contain\")\n // Have to do this manually since React doesn't call onBlur when a component is unmounted: https://github.com/facebook/react/issues/12363\n if (!state.isOpen && state.isFocused) {\n state.setFocused(false);\n }\n });\n\n let {dialogProps} = useDialog({\n 'aria-labelledby': useId(labelProps.id)\n }, popoverRef);\n\n // Override the role of the input to \"searchbox\" instead of \"combobox\".\n // Since the listbox is always visible, the combobox role doesn't really give us anything.\n // VoiceOver on iOS reads \"double tap to collapse\" when focused on the input rather than\n // \"double tap to edit text\", as with a textbox or searchbox. We'd like double tapping to\n // open the virtual keyboard rather than closing the tray.\n // Unlike \"combobox\", \"aria-expanded\" is not a valid attribute on \"searchbox\".\n inputProps.role = 'searchbox';\n inputProps['aria-haspopup'] = 'listbox';\n delete inputProps['aria-expanded'];\n delete inputProps.onTouchEnd;\n\n let clearButton = (\n <ClearButton\n preventFocus\n aria-label={stringFormatter.format('clear')}\n excludeFromTabOrder\n onPress={() => {\n state.setInputValue('');\n inputRef.current?.focus();\n }}\n UNSAFE_className={\n classNames(\n searchStyles,\n 'spectrum-ClearButton'\n )\n }\n isDisabled={isDisabled} />\n );\n\n let loadingCircle = (\n <ProgressCircle\n aria-label={stringFormatter.format('loading')}\n size=\"S\"\n isIndeterminate\n UNSAFE_className={classNames(\n searchStyles,\n 'spectrum-Search-circleLoader',\n classNames(\n textfieldStyles,\n 'spectrum-Textfield-circleLoader'\n )\n )} />\n );\n\n // Close the software keyboard on scroll to give the user a bigger area to scroll.\n // But only do this if scrolling with touch, otherwise it can cause issues with touch\n // screen readers.\n let isTouchDown = useRef(false);\n let onTouchStart = () => {\n isTouchDown.current = true;\n };\n\n let onTouchEnd = () => {\n isTouchDown.current = false;\n };\n\n let onScroll = useCallback(() => {\n if (!inputRef.current || getActiveElement() !== inputRef.current || !isTouchDown.current) {\n return;\n }\n\n popoverRef.current?.focus();\n }, [inputRef, popoverRef, isTouchDown]);\n\n let inputValue = inputProps.value;\n let lastInputValue = useRef(inputValue);\n useEffect(() => {\n if (loadingState === 'filtering' && !showLoading) {\n if (timeout.current === null) {\n timeout.current = setTimeout(() => {\n setShowLoading(true);\n }, 500);\n }\n\n // If user is typing, clear the timer and restart since it is a new request\n if (inputValue !== lastInputValue.current) {\n clearTimeout(timeout.current);\n timeout.current = setTimeout(() => {\n setShowLoading(true);\n }, 500);\n }\n } else if (loadingState !== 'filtering') {\n // If loading is no longer happening, clear any timers and hide the loading circle\n setShowLoading(false);\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n timeout.current = null;\n }\n\n lastInputValue.current = inputValue;\n }, [loadingState, inputValue, showLoading]);\n\n let onKeyDown = (e) => {\n // Close virtual keyboard if user hits Enter w/o any focused options\n if (e.key === 'Enter' && state.selectionManager.focusedKey == null) {\n popoverRef.current?.focus();\n } else {\n inputProps.onKeyDown?.(e);\n }\n };\n\n return (\n <FocusScope restoreFocus contain>\n <div\n {...mergeProps(overlayProps, dialogProps)}\n ref={popoverRef}\n className={\n classNames(\n comboboxStyles,\n 'tray-dialog'\n )\n }>\n <DismissButton onDismiss={onClose} />\n <TextFieldBase\n label={label}\n labelProps={labelProps}\n inputProps={{...inputProps, onKeyDown}}\n inputRef={inputRef}\n isDisabled={isDisabled}\n isLoading={showLoading && loadingState === 'filtering'}\n loadingIndicator={loadingState != null ? loadingCircle : undefined}\n validationState={validationState}\n labelAlign=\"start\"\n labelPosition=\"top\"\n wrapperChildren={(state.inputValue !== '' || loadingState === 'filtering' || validationState != null) && !props.isReadOnly ? clearButton : undefined}\n UNSAFE_className={\n classNames(\n searchStyles,\n 'spectrum-Search',\n 'spectrum-Textfield',\n 'spectrum-Search--loadable',\n {\n 'spectrum-Search--invalid': validationState === 'invalid' && !isDisabled,\n 'spectrum-Search--valid': validationState === 'valid' && !isDisabled\n },\n classNames(\n comboboxStyles,\n 'tray-textfield',\n {\n 'has-label': !!props.label\n }\n )\n )\n }\n inputClassName={\n classNames(\n comboboxStyles,\n 'tray-textfield-input',\n classNames(\n searchStyles,\n 'spectrum-Search-input'\n )\n )\n }\n validationIconClassName={\n classNames(\n searchStyles,\n 'spectrum-Search-validationIcon'\n )\n } />\n <ListBoxBase\n {...listBoxProps}\n domProps={{onTouchStart, onTouchEnd}}\n disallowEmptySelection\n shouldSelectOnPressUp\n focusOnPointerEnter\n layout={layout}\n state={state}\n shouldUseVirtualFocus\n renderEmptyState={() => loadingState !== 'loading' && (\n <span className={classNames(comboboxStyles, 'no-results')}>\n {stringFormatter.format('noResults')}\n </span>\n )}\n UNSAFE_className={\n classNames(\n comboboxStyles,\n 'tray-listbox'\n )\n }\n ref={listBoxRef}\n onScroll={onScroll}\n onLoadMore={onLoadMore}\n isLoading={isLoading} />\n <DismissButton onDismiss={onClose} />\n </div>\n </FocusScope>\n );\n}\n"],"names":[],"version":3,"file":"MobileComboBox.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDM,MAAM,0DAAiB,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,eACtD,KAAiC,EACjC,GAA8B;IAE9B,QAAQ,CAAA,GAAA,yCAAe,EAAE;IAEzB,IAAI,WACF,OAAO,cACP,UAAU,cACV,UAAU,cACV,UAAU,sBACV,kBAAkB,QAClB,IAAI,aACJ,YAAY,2BACZ,iBAAiB,EAClB,GAAG;IACJ,IAAI,mBACF,YAAY;IAGd,IAAI,YAAC,QAAQ,EAAC,GAAG,CAAA,GAAA,gBAAQ,EAAE;QAAC,aAAa;IAAM;IAC/C,IAAI,QAAQ,CAAA,GAAA,uBAAe,EAAE;QAC3B,GAAG,KAAK;QACR,eAAe;QACf,uBAAuB;QACvB,gGAAgG;QAChG,uHAAuH;QACvH,wFAAwF;QACxF,mBAAmB;IACrB;IAEA,IAAI,YAAY,CAAA,GAAA,aAAK,EAAkB;IACvC,IAAI,SAAS,CAAA,GAAA,yCAAc,EAAE,KAAK;IAClC,IAAI,gBAAC,YAAY,gBAAE,YAAY,EAAC,GAAG,CAAA,GAAA,wBAAgB,EAAE;QAAC,MAAM;IA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QAC5B;QAEF,gBAAgB,CAAA,GAAA,yCAAS,EACvB,CAAA,GAAA,gDAAa,GACb,wBACA,CAAA,GAAA,yCAAS,EAAE,CAAA,GAAA,mDAAW,GAAG;QAE3B,yBAAyB,CAAA,GAAA,yCAAS,EAAE,CAAA,GAAA,mDAAW,GAAG;sBAEpD,gCAAC,CAAA,GAAA,yCAAU;QACR,GAAG,YAAY;QAChB,UAAU;0BAAC;wBAAc;QAAU;QACnC,wBAAA;QACA,uBAAA;QACA,qBAAA;QACA,QAAQ;QACR,OAAO;QACP,uBAAA;QACA,kBAAkB,IAChB,iBAAiB,2BACf,gCAAC;gBAAK,WAAW,CAAA,GAAA,yCAAS,EAAE,CAAA,GAAA,gDAAa,GAAG;eACzC,gBAAgB,MAAM,CAAC;QAI9B,kBAAkB,CAAA,GAAA,yCAAS,EAAE,CAAA,GAAA,gDAAa,GAAG;QAC7C,KAAK;QACL,UAAU;QACV,YAAY;QACZ,WAAW;sBAEb,gCAAC,CAAA,GAAA,oBAAY;QAAE,WAAW;;AAIlC","sources":["packages/@adobe/react-spectrum/src/combobox/MobileComboBox.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport {AriaButtonProps, useButton} from 'react-aria/useButton';\nimport buttonStyles from '@adobe/spectrum-css-temp/components/button/vars.css';\nimport CheckmarkMedium from '@spectrum-icons/ui/CheckmarkMedium';\nimport ChevronDownMedium from '@spectrum-icons/ui/ChevronDownMedium';\nimport {classNames} from '../utils/classNames';\nimport {ClearButton} from '../button/ClearButton';\nimport {ComboBoxState, useComboBoxState} from 'react-stately/useComboBoxState';\nimport comboboxStyles from './combobox.css';\nimport {DismissButton} from 'react-aria/Overlay';\nimport {Field} from '../label/Field';\nimport {FocusableRef, FocusableRefValue, ValidationState} from '@react-types/shared';\nimport {FocusRing} from 'react-aria/FocusRing';\nimport {focusSafely} from 'react-aria/private/interactions/focusSafely';\nimport {FocusScope} from 'react-aria/FocusScope';\nimport {getActiveElement} from 'react-aria/private/utils/shadowdom/DOMFunctions';\nimport intlMessages from '../../intl/combobox/*.json';\nimport labelStyles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\nimport {ListBoxBase, useListBoxLayout} from '../listbox/ListBoxBase';\nimport {mergeProps} from 'react-aria/mergeProps';\nimport {ProgressCircle} from '../progress/ProgressCircle';\nimport React, {\n ForwardedRef,\n HTMLAttributes,\n InputHTMLAttributes,\n ReactElement,\n ReactNode,\n useCallback,\n useEffect,\n useRef,\n useState\n} from 'react';\nimport searchStyles from '@adobe/spectrum-css-temp/components/search/vars.css';\nimport {setInteractionModality} from 'react-aria/private/interactions/useFocusVisible';\n// @ts-ignore\nimport {SpectrumComboBoxProps} from './ComboBox';\nimport styles from '@adobe/spectrum-css-temp/components/inputgroup/vars.css';\nimport {TextFieldBase} from '../textfield/TextFieldBase';\nimport textfieldStyles from '@adobe/spectrum-css-temp/components/textfield/vars.css';\nimport {Tray} from '../overlays/Tray';\nimport {unwrapDOMRef, useFocusableRef} from '../utils/useDOMRef';\nimport {useComboBox} from 'react-aria/useComboBox';\nimport {useDialog} from 'react-aria/useDialog';\nimport {useField} from 'react-aria/useField';\nimport {useFilter} from 'react-aria/useFilter';\nimport {useFormReset} from 'react-aria/private/utils/useFormReset';\nimport {useFormValidation} from 'react-aria/private/form/useFormValidation';\nimport {useHover} from 'react-aria/useHover';\nimport {useId} from 'react-aria/useId';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useObjectRef} from 'react-aria/useObjectRef';\nimport {useOverlayTrigger} from 'react-aria/useOverlayTrigger';\nimport {useProviderProps} from '../provider/Provider';\n\nexport const MobileComboBox = React.forwardRef(function MobileComboBox(\n props: SpectrumComboBoxProps<any>,\n ref: FocusableRef<HTMLElement>\n) {\n props = useProviderProps(props);\n\n let {\n isQuiet,\n isDisabled,\n isReadOnly,\n isRequired,\n validationBehavior,\n name,\n formValue = 'text',\n allowsCustomValue\n } = props;\n if (allowsCustomValue) {\n formValue = 'text';\n }\n\n let {contains} = useFilter({sensitivity: 'base'});\n let state = useComboBoxState({\n ...props,\n defaultFilter: contains,\n allowsEmptyCollection: true,\n // Needs to be false here otherwise we double up on commitSelection/commitCustomValue calls when\n // user taps on underlay (i.e. initial tap will call setFocused(false) -> commitSelection/commitCustomValue via onBlur,\n // then the closing of the tray will call setFocused(false) again due to cleanup effect)\n shouldCloseOnBlur: false\n });\n\n let buttonRef = useRef<HTMLDivElement>(null);\n let domRef = useFocusableRef(ref, buttonRef);\n let {triggerProps, overlayProps} = useOverlayTrigger({type: 'listbox'}, state, buttonRef);\n\n let inputRef = useRef<HTMLInputElement>(null);\n useFormValidation(\n {\n ...props,\n focus: () => buttonRef.current?.focus()\n },\n state,\n inputRef\n );\n let {isInvalid, validationErrors, validationDetails} = state.displayValidation;\n let validationState = props.validationState || (isInvalid ? 'invalid' : undefined);\n let errorMessage = props.errorMessage ?? validationErrors.join(' ');\n\n let {labelProps, fieldProps, descriptionProps, errorMessageProps} = useField({\n ...props,\n labelElementType: 'span',\n isInvalid,\n errorMessage\n });\n\n // Focus the button and show focus ring when clicking on the label\n labelProps.onClick = () => {\n if (!props.isDisabled) {\n buttonRef.current?.focus();\n setInteractionModality('keyboard');\n }\n };\n\n let inputProps: InputHTMLAttributes<HTMLInputElement> = {\n type: 'hidden',\n name,\n value: formValue === 'text' ? state.inputValue : String(state.selectedKey)\n };\n\n if (validationBehavior === 'native') {\n // Use a hidden <input type=\"text\"> rather than <input type=\"hidden\">\n // so that an empty value blocks HTML form submission when the field is required.\n inputProps.type = 'text';\n inputProps.hidden = true;\n inputProps.required = isRequired;\n // Ignore react warning.\n inputProps.onChange = () => {};\n }\n\n useFormReset<any>(\n inputRef,\n formValue === 'text' ? state.defaultInputValue : state.defaultSelectedKey,\n formValue === 'text' ? state.setInputValue : state.setSelectedKey\n );\n\n return (\n <>\n <Field\n {...props}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n validationState={validationState}\n isInvalid={isInvalid}\n validationErrors={validationErrors}\n validationDetails={validationDetails}\n elementType=\"span\"\n ref={domRef}\n includeNecessityIndicatorInAccessibilityName>\n <ComboBoxButton\n {...mergeProps(triggerProps, fieldProps, {autoFocus: props.autoFocus})}\n ref={buttonRef}\n isQuiet={isQuiet}\n isDisabled={isDisabled}\n isPlaceholder={!state.inputValue}\n validationState={validationState}\n onPress={() => !isReadOnly && state.open(null, 'manual')}>\n {state.inputValue || props.placeholder || ''}\n </ComboBoxButton>\n </Field>\n <input {...inputProps} ref={inputRef} />\n <Tray state={state} isFixedHeight {...overlayProps}>\n <ComboBoxTray {...props} onClose={state.close} overlayProps={overlayProps} state={state} />\n </Tray>\n </>\n );\n});\n\ninterface ComboBoxButtonProps extends AriaButtonProps {\n isQuiet?: boolean;\n isDisabled?: boolean;\n isPlaceholder?: boolean;\n validationState?: ValidationState;\n children?: ReactNode;\n style?: React.CSSProperties;\n className?: string;\n}\n\nexport const ComboBoxButton = React.forwardRef(function ComboBoxButton(\n props: ComboBoxButtonProps,\n ref: ForwardedRef<HTMLDivElement>\n) {\n let {isQuiet, isDisabled, isPlaceholder, validationState, children, style, className} = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/combobox');\n let valueId = useId();\n let invalidId = useId();\n let validId = useId();\n let validationIcon =\n validationState === 'invalid' ? (\n <AlertMedium id={invalidId} aria-label={stringFormatter.format('invalid')} />\n ) : (\n <CheckmarkMedium id={validId} aria-label={stringFormatter.format('valid')} />\n );\n\n let validation = React.cloneElement(validationIcon, {\n UNSAFE_className: classNames(\n textfieldStyles,\n 'spectrum-Textfield-validationIcon',\n classNames(styles, 'spectrum-InputGroup-input-validationIcon')\n )\n });\n\n let objRef = useObjectRef(ref);\n let {hoverProps, isHovered} = useHover({});\n let {buttonProps, isPressed} = useButton(\n {\n ...props,\n 'aria-labelledby': [\n props['aria-labelledby'],\n props['aria-label'] && !props['aria-labelledby'] ? props.id : null,\n valueId,\n validationState === 'invalid' ? invalidId : null,\n validationState === 'valid' ? validId : null\n ]\n .filter(Boolean)\n .join(' '),\n elementType: 'div'\n },\n objRef\n );\n\n return (\n <FocusRing\n focusClass={classNames(styles, 'is-focused')}\n focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...mergeProps(hoverProps, buttonProps)}\n aria-haspopup=\"dialog\"\n ref={objRef}\n style={{...style, outline: 'none'}}\n className={classNames(\n styles,\n 'spectrum-InputGroup',\n {\n 'spectrum-InputGroup--quiet': isQuiet,\n 'is-disabled': isDisabled,\n 'spectrum-InputGroup--invalid': validationState === 'invalid' && !isDisabled,\n 'is-hovered': isHovered\n },\n classNames(comboboxStyles, 'mobile-combobox'),\n className\n )}>\n <div\n className={classNames(\n textfieldStyles,\n 'spectrum-Textfield',\n {\n 'spectrum-Textfield--invalid': validationState === 'invalid' && !isDisabled,\n 'spectrum-Textfield--valid': validationState === 'valid' && !isDisabled,\n 'spectrum-Textfield--quiet': isQuiet\n },\n classNames(styles, 'spectrum-InputGroup-field')\n )}>\n <div\n className={classNames(\n textfieldStyles,\n 'spectrum-Textfield-input',\n {\n 'is-hovered': isHovered,\n 'is-placeholder': isPlaceholder,\n 'is-disabled': isDisabled\n },\n classNames(\n styles,\n 'spectrum-InputGroup-input',\n classNames(labelStyles, 'spectrum-Field-field')\n ),\n classNames(comboboxStyles, 'mobile-input')\n )}>\n <span id={valueId} className={classNames(comboboxStyles, 'mobile-value')}>\n {children}\n </span>\n </div>\n {validationState && !isDisabled ? validation : null}\n </div>\n <div\n className={classNames(\n buttonStyles,\n 'spectrum-FieldButton',\n {\n 'spectrum-FieldButton--quiet': isQuiet,\n 'is-active': isPressed,\n 'is-disabled': isDisabled,\n 'spectrum-FieldButton--invalid': validationState === 'invalid' && !isDisabled,\n 'is-hovered': isHovered\n },\n classNames(styles, 'spectrum-FieldButton')\n )}>\n <ChevronDownMedium UNSAFE_className={classNames(styles, 'spectrum-Dropdown-chevron')} />\n </div>\n </div>\n </FocusRing>\n );\n});\n\ninterface ComboBoxTrayProps extends SpectrumComboBoxProps<any> {\n state: ComboBoxState<any>;\n overlayProps: HTMLAttributes<HTMLElement>;\n loadingIndicator?: ReactElement;\n onClose: () => void;\n}\n\nfunction ComboBoxTray(props: ComboBoxTrayProps) {\n let {\n // completionMode = 'suggest',\n state,\n isDisabled,\n validationState,\n label,\n overlayProps,\n loadingState,\n onLoadMore,\n onClose\n } = props;\n\n let timeout = useRef<ReturnType<typeof setTimeout> | null>(null);\n let [showLoading, setShowLoading] = useState(false);\n let inputRef = useRef<HTMLInputElement>(null);\n let buttonRef = useRef<FocusableRefValue<HTMLElement>>(null);\n let popoverRef = useRef<HTMLDivElement>(null);\n let listBoxRef = useRef<HTMLDivElement>(null);\n let isLoading = loadingState === 'loading' || loadingState === 'loadingMore';\n let layout = useListBoxLayout();\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/combobox');\n\n let {inputProps, listBoxProps, labelProps} = useComboBox(\n {\n ...props,\n // completionMode,\n layoutDelegate: layout,\n buttonRef: unwrapDOMRef(buttonRef),\n popoverRef: popoverRef,\n listBoxRef,\n inputRef,\n // Handled outside the tray.\n name: undefined\n },\n state\n );\n\n React.useEffect(() => {\n if (inputRef.current) {\n focusSafely(inputRef.current);\n }\n }, []);\n\n React.useEffect(() => {\n // When the tray closes, set state.isFocused (i.e. the tray input's focus tracker) to false.\n // This is to prevent state.isFocused from being set to true when the tray closes via tapping on the underlay\n // (FocusScope attempts to restore focus to the tray input when tapping outside the tray due to \"contain\")\n // Have to do this manually since React doesn't call onBlur when a component is unmounted: https://github.com/facebook/react/issues/12363\n if (!state.isOpen && state.isFocused) {\n state.setFocused(false);\n }\n });\n\n let {dialogProps} = useDialog(\n {\n 'aria-labelledby': useId(labelProps.id)\n },\n popoverRef\n );\n\n // Override the role of the input to \"searchbox\" instead of \"combobox\".\n // Since the listbox is always visible, the combobox role doesn't really give us anything.\n // VoiceOver on iOS reads \"double tap to collapse\" when focused on the input rather than\n // \"double tap to edit text\", as with a textbox or searchbox. We'd like double tapping to\n // open the virtual keyboard rather than closing the tray.\n // Unlike \"combobox\", \"aria-expanded\" is not a valid attribute on \"searchbox\".\n inputProps.role = 'searchbox';\n inputProps['aria-haspopup'] = 'listbox';\n delete inputProps['aria-expanded'];\n delete inputProps.onTouchEnd;\n\n let clearButton = (\n <ClearButton\n preventFocus\n aria-label={stringFormatter.format('clear')}\n excludeFromTabOrder\n onPress={() => {\n state.setInputValue('');\n inputRef.current?.focus();\n }}\n UNSAFE_className={classNames(searchStyles, 'spectrum-ClearButton')}\n isDisabled={isDisabled}\n />\n );\n\n let loadingCircle = (\n <ProgressCircle\n aria-label={stringFormatter.format('loading')}\n size=\"S\"\n isIndeterminate\n UNSAFE_className={classNames(\n searchStyles,\n 'spectrum-Search-circleLoader',\n classNames(textfieldStyles, 'spectrum-Textfield-circleLoader')\n )}\n />\n );\n\n // Close the software keyboard on scroll to give the user a bigger area to scroll.\n // But only do this if scrolling with touch, otherwise it can cause issues with touch\n // screen readers.\n let isTouchDown = useRef(false);\n let onTouchStart = () => {\n isTouchDown.current = true;\n };\n\n let onTouchEnd = () => {\n isTouchDown.current = false;\n };\n\n let onScroll = useCallback(() => {\n if (!inputRef.current || getActiveElement() !== inputRef.current || !isTouchDown.current) {\n return;\n }\n\n popoverRef.current?.focus();\n }, [inputRef, popoverRef, isTouchDown]);\n\n let inputValue = inputProps.value;\n let lastInputValue = useRef(inputValue);\n useEffect(() => {\n if (loadingState === 'filtering' && !showLoading) {\n if (timeout.current === null) {\n timeout.current = setTimeout(() => {\n setShowLoading(true);\n }, 500);\n }\n\n // If user is typing, clear the timer and restart since it is a new request\n if (inputValue !== lastInputValue.current) {\n clearTimeout(timeout.current);\n timeout.current = setTimeout(() => {\n setShowLoading(true);\n }, 500);\n }\n } else if (loadingState !== 'filtering') {\n // If loading is no longer happening, clear any timers and hide the loading circle\n setShowLoading(false);\n if (timeout.current) {\n clearTimeout(timeout.current);\n }\n timeout.current = null;\n }\n\n lastInputValue.current = inputValue;\n }, [loadingState, inputValue, showLoading]);\n\n let onKeyDown = e => {\n // Close virtual keyboard if user hits Enter w/o any focused options\n if (e.key === 'Enter' && state.selectionManager.focusedKey == null) {\n popoverRef.current?.focus();\n } else {\n inputProps.onKeyDown?.(e);\n }\n };\n\n return (\n <FocusScope restoreFocus contain>\n <div\n {...mergeProps(overlayProps, dialogProps)}\n ref={popoverRef}\n className={classNames(comboboxStyles, 'tray-dialog')}>\n <DismissButton onDismiss={onClose} />\n <TextFieldBase\n label={label}\n labelProps={labelProps}\n inputProps={{...inputProps, onKeyDown}}\n inputRef={inputRef}\n isDisabled={isDisabled}\n isLoading={showLoading && loadingState === 'filtering'}\n loadingIndicator={loadingState != null ? loadingCircle : undefined}\n validationState={validationState}\n labelAlign=\"start\"\n labelPosition=\"top\"\n wrapperChildren={\n (state.inputValue !== '' || loadingState === 'filtering' || validationState != null) &&\n !props.isReadOnly\n ? clearButton\n : undefined\n }\n UNSAFE_className={classNames(\n searchStyles,\n 'spectrum-Search',\n 'spectrum-Textfield',\n 'spectrum-Search--loadable',\n {\n 'spectrum-Search--invalid': validationState === 'invalid' && !isDisabled,\n 'spectrum-Search--valid': validationState === 'valid' && !isDisabled\n },\n classNames(comboboxStyles, 'tray-textfield', {\n 'has-label': !!props.label\n })\n )}\n inputClassName={classNames(\n comboboxStyles,\n 'tray-textfield-input',\n classNames(searchStyles, 'spectrum-Search-input')\n )}\n validationIconClassName={classNames(searchStyles, 'spectrum-Search-validationIcon')}\n />\n <ListBoxBase\n {...listBoxProps}\n domProps={{onTouchStart, onTouchEnd}}\n disallowEmptySelection\n shouldSelectOnPressUp\n focusOnPointerEnter\n layout={layout}\n state={state}\n shouldUseVirtualFocus\n renderEmptyState={() =>\n loadingState !== 'loading' && (\n <span className={classNames(comboboxStyles, 'no-results')}>\n {stringFormatter.format('noResults')}\n </span>\n )\n }\n UNSAFE_className={classNames(comboboxStyles, 'tray-listbox')}\n ref={listBoxRef}\n onScroll={onScroll}\n onLoadMore={onLoadMore}\n isLoading={isLoading}\n />\n <DismissButton onDismiss={onClose} />\n </div>\n </FocusScope>\n );\n}\n"],"names":[],"version":3,"file":"MobileComboBox.js.map"}