@procore/core-react 11.23.2 → 11.23.4

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 (371) hide show
  1. package/README.md +7 -7
  2. package/dist/Avatar/Avatar.styles.js +5 -5
  3. package/dist/Avatar/index.d.ts +1 -1
  4. package/dist/Avatar/index.js +0 -1
  5. package/dist/Avatar/index.js.map +1 -1
  6. package/dist/AvatarStack/AvatarStack.styles.js +7 -7
  7. package/dist/AvatarStack/index.d.ts +1 -1
  8. package/dist/AvatarStack/index.js +0 -1
  9. package/dist/AvatarStack/index.js.map +1 -1
  10. package/dist/Badge/Badge.styles.js +2 -2
  11. package/dist/Badge/index.d.ts +1 -1
  12. package/dist/Badge/index.js +0 -1
  13. package/dist/Badge/index.js.map +1 -1
  14. package/dist/Banner/Banner.styles.js +10 -10
  15. package/dist/Banner/index.d.ts +2 -2
  16. package/dist/Banner/index.js +1 -2
  17. package/dist/Banner/index.js.map +1 -1
  18. package/dist/Box/Box.styles.js +1 -1
  19. package/dist/Box/index.d.ts +1 -1
  20. package/dist/Box/index.js +0 -1
  21. package/dist/Box/index.js.map +1 -1
  22. package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
  23. package/dist/Breadcrumbs/index.d.ts +1 -1
  24. package/dist/Breadcrumbs/index.js +0 -1
  25. package/dist/Breadcrumbs/index.js.map +1 -1
  26. package/dist/Button/Button.styles.js +5 -5
  27. package/dist/Calendar/Calendar.styles.js +8 -8
  28. package/dist/Calendar/index.d.ts +1 -1
  29. package/dist/Calendar/index.js +0 -1
  30. package/dist/Calendar/index.js.map +1 -1
  31. package/dist/Card/Card.styles.js +1 -1
  32. package/dist/Card/index.d.ts +1 -1
  33. package/dist/Card/index.js +0 -1
  34. package/dist/Card/index.js.map +1 -1
  35. package/dist/Checkbox/Checkbox.styles.js +5 -5
  36. package/dist/Checkbox/index.d.ts +1 -1
  37. package/dist/Checkbox/index.js +0 -1
  38. package/dist/Checkbox/index.js.map +1 -1
  39. package/dist/CheckboxGroup/index.d.ts +1 -1
  40. package/dist/CheckboxGroup/index.js +0 -1
  41. package/dist/CheckboxGroup/index.js.map +1 -1
  42. package/dist/ContactItem/ContactItem.styles.js +5 -5
  43. package/dist/ContactItem/index.d.ts +1 -1
  44. package/dist/ContactItem/index.js +0 -1
  45. package/dist/ContactItem/index.js.map +1 -1
  46. package/dist/Content/Content.styles.js +2 -2
  47. package/dist/DateInput/DateInput.styles.js +6 -6
  48. package/dist/DateSelect/index.d.ts +1 -1
  49. package/dist/DateSelect/index.js +0 -1
  50. package/dist/DateSelect/index.js.map +1 -1
  51. package/dist/DetailPage/DetailPage.styles.js +7 -7
  52. package/dist/Dropdown/Dropdown.styles.js +3 -3
  53. package/dist/Dropdown/index.d.ts +1 -1
  54. package/dist/Dropdown/index.js +0 -1
  55. package/dist/Dropdown/index.js.map +1 -1
  56. package/dist/DropdownFlyout/DropdownFlyout.js +1 -1
  57. package/dist/DropdownFlyout/DropdownFlyout.js.map +1 -1
  58. package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
  59. package/dist/Dropzone/Dropzone.js +1 -1
  60. package/dist/Dropzone/Dropzone.styles.js +9 -9
  61. package/dist/Dropzone/index.d.ts +1 -1
  62. package/dist/Dropzone/index.js +0 -1
  63. package/dist/Dropzone/index.js.map +1 -1
  64. package/dist/EmptyState/EmptyState.styles.js +6 -6
  65. package/dist/EmptyState/index.d.ts +1 -1
  66. package/dist/EmptyState/index.js +0 -1
  67. package/dist/EmptyState/index.js.map +1 -1
  68. package/dist/Field/Field.styles.js +3 -3
  69. package/dist/FileList/FileList.styles.js +4 -4
  70. package/dist/FileList/index.d.ts +1 -1
  71. package/dist/FileList/index.js +0 -1
  72. package/dist/FileList/index.js.map +1 -1
  73. package/dist/FileSelect/FileExplorer/FileExplorer.js.map +1 -1
  74. package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
  75. package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
  76. package/dist/FileSelect/FileSelect.js +1 -1
  77. package/dist/FileSelect/FileSelect.js.map +1 -1
  78. package/dist/FileSelect/FileSelect.styles.js +2 -2
  79. package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
  80. package/dist/FileSelect/FileSelectDropzone/index.d.ts +1 -1
  81. package/dist/FileSelect/FileSelectDropzone/index.js +0 -1
  82. package/dist/FileSelect/FileSelectDropzone/index.js.map +1 -1
  83. package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
  84. package/dist/FileSelect/GridSource/GridSource.js +1 -1
  85. package/dist/FileSelect/GridSource/GridSource.js.map +1 -1
  86. package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
  87. package/dist/FileSelect/GridSource/index.d.ts +1 -1
  88. package/dist/FileSelect/GridSource/index.js +0 -1
  89. package/dist/FileSelect/GridSource/index.js.map +1 -1
  90. package/dist/FileSelect/LocalSource/LocalSource.js +1 -1
  91. package/dist/FileSelect/LocalSource/LocalSource.js.map +1 -1
  92. package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
  93. package/dist/FileSelect/LocalSource/index.d.ts +1 -1
  94. package/dist/FileSelect/LocalSource/index.js +0 -1
  95. package/dist/FileSelect/LocalSource/index.js.map +1 -1
  96. package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
  97. package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
  98. package/dist/FileSelect/TreeSource/TreeSource.js +1 -1
  99. package/dist/FileSelect/TreeSource/TreeSource.js.map +1 -1
  100. package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
  101. package/dist/FileSelect/TreeSource/index.d.ts +1 -1
  102. package/dist/FileSelect/TreeSource/index.js +0 -1
  103. package/dist/FileSelect/TreeSource/index.js.map +1 -1
  104. package/dist/FileSelect/index.d.ts +1 -1
  105. package/dist/FileSelect/index.js +0 -1
  106. package/dist/FileSelect/index.js.map +1 -1
  107. package/dist/FileSelect/storyHelpers.js +1 -1
  108. package/dist/FileSelect/storyHelpers.js.map +1 -1
  109. package/dist/FileToken/FileToken.styles.js +4 -4
  110. package/dist/FilterToken/FilterToken.styles.js +2 -2
  111. package/dist/Flex/index.d.ts +1 -1
  112. package/dist/Flex/index.js +0 -1
  113. package/dist/Flex/index.js.map +1 -1
  114. package/dist/FlexList/FlexList.styles.js +1 -1
  115. package/dist/FlexList/index.d.ts +1 -1
  116. package/dist/FlexList/index.js +0 -1
  117. package/dist/FlexList/index.js.map +1 -1
  118. package/dist/Form/Form.styles.js +15 -15
  119. package/dist/Grid/Grid.styles.js +2 -2
  120. package/dist/Grid/index.d.ts +1 -1
  121. package/dist/Grid/index.js +0 -1
  122. package/dist/Grid/index.js.map +1 -1
  123. package/dist/GroupSelect/GroupSelect.styles.js +1 -1
  124. package/dist/Input/Input.styles.js +1 -1
  125. package/dist/Input/index.d.ts +1 -1
  126. package/dist/Input/index.js +0 -1
  127. package/dist/Input/index.js.map +1 -1
  128. package/dist/Link/Link.styles.js +1 -1
  129. package/dist/Link/index.d.ts +1 -1
  130. package/dist/Link/index.js +0 -1
  131. package/dist/Link/index.js.map +1 -1
  132. package/dist/ListPage/ListPage.styles.js +8 -8
  133. package/dist/Loader/Loader.styles.js +2 -2
  134. package/dist/Menu/Menu.d.ts +2 -2
  135. package/dist/MenuImperative/MenuImperative.styles.js +10 -10
  136. package/dist/Modal/Modal.styles.js +13 -13
  137. package/dist/Modal/index.d.ts +1 -1
  138. package/dist/Modal/index.js +0 -1
  139. package/dist/Modal/index.js.map +1 -1
  140. package/dist/MultiSelect/MultiSelect.styles.js +6 -6
  141. package/dist/NextMenu/NextMenu.styles.js +3 -3
  142. package/dist/Notation/Notation.js +1 -1
  143. package/dist/Notation/index.d.ts +1 -1
  144. package/dist/Notation/index.js +0 -1
  145. package/dist/Notation/index.js.map +1 -1
  146. package/dist/NumberInput/NumberInput.styles.js +7 -7
  147. package/dist/NumberInput/index.d.ts +1 -1
  148. package/dist/NumberInput/index.js +0 -1
  149. package/dist/NumberInput/index.js.map +1 -1
  150. package/dist/Overlay/OverlayArrow.styles.js +1 -1
  151. package/dist/Overlay/useOverlay.js +3 -2
  152. package/dist/Overlay/useOverlay.js.map +1 -1
  153. package/dist/OverlayTrigger/OverlayTrigger.js +0 -14
  154. package/dist/OverlayTrigger/OverlayTrigger.js.map +1 -1
  155. package/dist/OverlayTrigger/a11yPresets.d.ts +14 -14
  156. package/dist/OverlayTrigger/index.d.ts +1 -1
  157. package/dist/OverlayTrigger/index.js +0 -1
  158. package/dist/OverlayTrigger/index.js.map +1 -1
  159. package/dist/PageLayout/PageLayout.js +1 -1
  160. package/dist/PageLayout/PageLayout.js.map +1 -1
  161. package/dist/PageLayout/PageLayout.styles.js +13 -13
  162. package/dist/Pagination/Pagination.styles.js +5 -5
  163. package/dist/Pagination/index.d.ts +1 -1
  164. package/dist/Pagination/index.js +0 -1
  165. package/dist/Pagination/index.js.map +1 -1
  166. package/dist/Panel/Panel.styles.js +11 -11
  167. package/dist/Pill/Pill.styles.js +2 -2
  168. package/dist/Pill/index.d.ts +1 -1
  169. package/dist/Pill/index.js +0 -1
  170. package/dist/Pill/index.js.map +1 -1
  171. package/dist/PillSelect/PillSelect.styles.js +4 -4
  172. package/dist/PillSelect/index.d.ts +1 -1
  173. package/dist/PillSelect/index.js +0 -1
  174. package/dist/PillSelect/index.js.map +1 -1
  175. package/dist/Popover/Popover.styles.js +2 -2
  176. package/dist/Popover/index.d.ts +1 -1
  177. package/dist/Popover/index.js +0 -1
  178. package/dist/Popover/index.js.map +1 -1
  179. package/dist/Portal/Portal.styles.js +1 -1
  180. package/dist/ProgressBar/ProgressBar.styles.js +2 -2
  181. package/dist/ProgressBar/index.d.ts +1 -1
  182. package/dist/ProgressBar/index.js +0 -1
  183. package/dist/ProgressBar/index.js.map +1 -1
  184. package/dist/RadioButton/RadioButton.styles.js +3 -3
  185. package/dist/RadioButton/index.d.ts +1 -1
  186. package/dist/RadioButton/index.js +0 -1
  187. package/dist/RadioButton/index.js.map +1 -1
  188. package/dist/Required/Required.styles.js +3 -3
  189. package/dist/Required/index.d.ts +1 -1
  190. package/dist/Required/index.js +0 -1
  191. package/dist/Required/index.js.map +1 -1
  192. package/dist/Search/Search.styles.js +5 -5
  193. package/dist/Search/index.d.ts +1 -1
  194. package/dist/Search/index.js +0 -1
  195. package/dist/Search/index.js.map +1 -1
  196. package/dist/Section/Section.styles.js +6 -6
  197. package/dist/SegmentedController/SegmentedController.styles.js +4 -4
  198. package/dist/SegmentedController/index.d.ts +1 -1
  199. package/dist/SegmentedController/index.js +0 -1
  200. package/dist/SegmentedController/index.js.map +1 -1
  201. package/dist/Select/Select.styles.js +7 -7
  202. package/dist/Semantic/Semantic.styles.js +8 -8
  203. package/dist/Sidebar/Sidebar.styles.js +7 -7
  204. package/dist/Slider/Slider.styles.js +5 -5
  205. package/dist/Slider/index.d.ts +1 -1
  206. package/dist/Slider/index.js +0 -1
  207. package/dist/Slider/index.js.map +1 -1
  208. package/dist/Spinner/Spinner.styles.js +7 -7
  209. package/dist/Spinner/index.d.ts +1 -1
  210. package/dist/Spinner/index.js +0 -1
  211. package/dist/Spinner/index.js.map +1 -1
  212. package/dist/SuperSelect/SuperSelect.components.js +1 -0
  213. package/dist/SuperSelect/SuperSelect.components.js.map +1 -1
  214. package/dist/SuperSelect/SuperSelect.d.ts +25 -21
  215. package/dist/SuperSelect/SuperSelect.js +8 -6
  216. package/dist/SuperSelect/SuperSelect.js.map +1 -1
  217. package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
  218. package/dist/SuperSelect/SuperSelect.styles.js +37 -37
  219. package/dist/SuperSelect/useSuperSelect.d.ts +75 -61
  220. package/dist/Switch/Switch.styles.js +5 -5
  221. package/dist/Switch/Switch.styles.js.map +1 -1
  222. package/dist/Switch/index.d.ts +1 -1
  223. package/dist/Switch/index.js +0 -1
  224. package/dist/Switch/index.js.map +1 -1
  225. package/dist/Table/Table.styles.js +28 -28
  226. package/dist/TableShelf/TableShelf.styles.js +5 -5
  227. package/dist/Tabs/Tabs.styles.js +8 -8
  228. package/dist/Tabs/index.d.ts +1 -1
  229. package/dist/Tabs/index.js +0 -1
  230. package/dist/Tabs/index.js.map +1 -1
  231. package/dist/Tearsheet/Tearsheet.js +1 -1
  232. package/dist/Tearsheet/Tearsheet.js.map +1 -1
  233. package/dist/Tearsheet/Tearsheet.styles.js +5 -5
  234. package/dist/Tearsheet/index.d.ts +1 -1
  235. package/dist/Tearsheet/index.js +0 -1
  236. package/dist/Tearsheet/index.js.map +1 -1
  237. package/dist/TextArea/TextArea.styles.js +1 -1
  238. package/dist/TextArea/index.d.ts +1 -1
  239. package/dist/TextArea/index.js +0 -1
  240. package/dist/TextArea/index.js.map +1 -1
  241. package/dist/TextEditor/index.d.ts +1 -1
  242. package/dist/TextEditor/index.js +0 -1
  243. package/dist/TextEditor/index.js.map +1 -1
  244. package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
  245. package/dist/Thumbnail/Thumbnail.hooks.d.ts +70 -76
  246. package/dist/Thumbnail/Thumbnail.styles.js +17 -17
  247. package/dist/Thumbnail/index.d.ts +1 -1
  248. package/dist/Thumbnail/index.js +0 -1
  249. package/dist/Thumbnail/index.js.map +1 -1
  250. package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
  251. package/dist/ThumbnailGrid/index.d.ts +1 -1
  252. package/dist/ThumbnailGrid/index.js +0 -1
  253. package/dist/ThumbnailGrid/index.js.map +1 -1
  254. package/dist/TieredDropdown/index.d.ts +1 -1
  255. package/dist/TieredDropdown/index.js +0 -1
  256. package/dist/TieredDropdown/index.js.map +1 -1
  257. package/dist/TieredSelect/TieredSelect.styles.js +9 -9
  258. package/dist/TieredSelect/index.d.ts +1 -1
  259. package/dist/TieredSelect/index.js +0 -1
  260. package/dist/TieredSelect/index.js.map +1 -1
  261. package/dist/Tile/Tile.styles.js +8 -8
  262. package/dist/Title/Title.styles.js +7 -7
  263. package/dist/Title/index.d.ts +1 -1
  264. package/dist/Title/index.js +0 -1
  265. package/dist/Title/index.js.map +1 -1
  266. package/dist/Toast/Toast.styles.js +3 -3
  267. package/dist/Toast/index.d.ts +1 -1
  268. package/dist/Toast/index.js +0 -1
  269. package/dist/Toast/index.js.map +1 -1
  270. package/dist/ToggleButton/ToggleButton.styles.js +1 -1
  271. package/dist/ToggleButton/index.d.ts +1 -1
  272. package/dist/ToggleButton/index.js +0 -1
  273. package/dist/ToggleButton/index.js.map +1 -1
  274. package/dist/Token/Token.styles.js +3 -3
  275. package/dist/Token/index.d.ts +1 -1
  276. package/dist/Token/index.js +0 -1
  277. package/dist/Token/index.js.map +1 -1
  278. package/dist/ToolHeader/ToolHeader.styles.js +6 -6
  279. package/dist/Tooltip/Tooltip.styles.js +2 -2
  280. package/dist/Tooltip/index.d.ts +1 -1
  281. package/dist/Tooltip/index.js +0 -1
  282. package/dist/Tooltip/index.js.map +1 -1
  283. package/dist/Tree/Tree.hooks.js +1 -1
  284. package/dist/Tree/Tree.hooks.js.map +1 -1
  285. package/dist/Tree/Tree.styles.js +9 -9
  286. package/dist/Typeahead/Typeahead.styles.js +3 -3
  287. package/dist/Typography/Typography.styles.js +1 -1
  288. package/dist/Typography/Typography.table.story.js +2 -2
  289. package/dist/_hooks/useFileUploader.js +1 -1
  290. package/dist/_hooks/useFileUploader.js.map +1 -1
  291. package/dist/_typedoc/Avatar/Avatar.types.json +20 -20
  292. package/dist/_typedoc/AvatarStack/AvatarStack.types.json +23 -23
  293. package/dist/_typedoc/Badge/Badge.types.json +6 -6
  294. package/dist/_typedoc/Banner/Banner.types.json +13 -13
  295. package/dist/_typedoc/Box/Box.types.json +68 -68
  296. package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +10 -10
  297. package/dist/_typedoc/Button/Button.types.json +11 -11
  298. package/dist/_typedoc/Calendar/Calendar.types.json +80 -80
  299. package/dist/_typedoc/Card/Card.types.json +6 -6
  300. package/dist/_typedoc/Checkbox/Checkbox.types.json +7 -7
  301. package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
  302. package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
  303. package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
  304. package/dist/_typedoc/DetailPage/DetailPage.types.json +4 -4
  305. package/dist/_typedoc/Dropdown/Dropdown.types.json +37 -37
  306. package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +29 -29
  307. package/dist/_typedoc/Dropzone/Dropzone.types.json +41 -41
  308. package/dist/_typedoc/EmptyState/EmptyState.types.json +14 -14
  309. package/dist/_typedoc/FileList/FileList.types.json +9 -9
  310. package/dist/_typedoc/FileSelect/FileSelect.types.json +26 -26
  311. package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
  312. package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
  313. package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +9 -9
  314. package/dist/_typedoc/Flex/Flex.types.json +27 -27
  315. package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
  316. package/dist/_typedoc/Form/Form.types.json +700 -700
  317. package/dist/_typedoc/Grid/Grid.types.json +8 -8
  318. package/dist/_typedoc/GroupSelect/GroupSelect.types.json +52 -52
  319. package/dist/_typedoc/Input/Input.types.json +2 -2
  320. package/dist/_typedoc/Link/Link.types.json +4 -4
  321. package/dist/_typedoc/ListPage/ListPage.types.json +13 -13
  322. package/dist/_typedoc/Menu/Menu.types.json +62 -62
  323. package/dist/_typedoc/MenuImperative/MenuImperative.types.json +74 -74
  324. package/dist/_typedoc/Modal/Modal.types.json +41 -41
  325. package/dist/_typedoc/MultiSelect/MultiSelect.types.json +31 -31
  326. package/dist/_typedoc/Notation/Notation.types.json +4 -4
  327. package/dist/_typedoc/NumberInput/NumberInput.types.json +38 -38
  328. package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +30 -30
  329. package/dist/_typedoc/PageLayout/PageLayout.types.json +22 -22
  330. package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
  331. package/dist/_typedoc/Panel/Panel.types.json +27 -27
  332. package/dist/_typedoc/Pill/Pill.types.json +2 -2
  333. package/dist/_typedoc/PillSelect/PillSelect.types.json +46 -46
  334. package/dist/_typedoc/Popover/Popover.types.json +14 -14
  335. package/dist/_typedoc/ProgressBar/ProgressBar.types.json +6 -6
  336. package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
  337. package/dist/_typedoc/Required/Required.types.json +5 -5
  338. package/dist/_typedoc/Search/Search.types.json +18 -18
  339. package/dist/_typedoc/Section/Section.types.json +14 -14
  340. package/dist/_typedoc/SegmentedController/SegmentedController.types.json +20 -20
  341. package/dist/_typedoc/Select/Select.types.json +55 -55
  342. package/dist/_typedoc/Slider/Slider.types.json +6 -6
  343. package/dist/_typedoc/Spinner/Spinner.types.json +9 -9
  344. package/dist/_typedoc/Switch/Switch.types.json +3 -3
  345. package/dist/_typedoc/Table/Table.types.json +96 -96
  346. package/dist/_typedoc/Tabs/Tabs.types.json +17 -17
  347. package/dist/_typedoc/Tearsheet/Tearsheet.types.json +16 -16
  348. package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
  349. package/dist/_typedoc/TextEditor/TextEditor.types.json +9 -9
  350. package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
  351. package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
  352. package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +42 -42
  353. package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
  354. package/dist/_typedoc/Tile/Tile.types.json +30 -30
  355. package/dist/_typedoc/Toast/Toast.types.json +4 -4
  356. package/dist/_typedoc/ToggleButton/ToggleButton.types.json +3 -3
  357. package/dist/_typedoc/Token/Token.types.json +4 -4
  358. package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
  359. package/dist/_typedoc/Tooltip/Tooltip.types.json +13 -13
  360. package/dist/_typedoc/Tree/Tree.types.json +86 -86
  361. package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
  362. package/dist/_typedoc/Typography/Typography.types.json +8 -8
  363. package/dist/_typedoc/_utils/types.json +3 -3
  364. package/dist/_utils/polymorphic.js +0 -3
  365. package/dist/_utils/polymorphic.js.map +1 -1
  366. package/dist/_utils/runInQueue.js +1 -1
  367. package/dist/_utils/runInQueue.js.map +1 -1
  368. package/package.json +37 -37
  369. package/dist/SuperSelect/useVirtuosoResizeErrorFix.d.ts +0 -1
  370. package/dist/SuperSelect/useVirtuosoResizeErrorFix.js +0 -18
  371. package/dist/SuperSelect/useVirtuosoResizeErrorFix.js.map +0 -1
@@ -6,26 +6,26 @@ import { getFocus } from '../_styles/mixins';
6
6
  import { spacing } from '../_styles/spacing';
7
7
  export var StyledMultiSelectValues = /*#__PURE__*/styled.div.withConfig({
8
8
  displayName: "StyledMultiSelectValues",
9
- componentId: "core-11_23_2__sc-s9ym9q-0"
9
+ componentId: "core-11_23_4__sc-s9ym9q-0"
10
10
  })(["display:flex;flex-wrap:wrap;margin-bottom:2px;margin-left:", "px;margin-right:", "px;margin-top:2px;min-width:0;width:100%;"], spacing.md, spacing.xs);
11
11
  export var StyledMultiSelectToken = /*#__PURE__*/styled.div.withConfig({
12
12
  displayName: "StyledMultiSelectToken",
13
- componentId: "core-11_23_2__sc-s9ym9q-1"
13
+ componentId: "core-11_23_4__sc-s9ym9q-1"
14
14
  })(["margin-bottom:2px;margin-right:", "px;margin-top:2px;flex:0 1 auto;> div{max-width:178px;width:100%;}"], spacing.xs);
15
15
  export var StyledMultiSelectSearchInput = /*#__PURE__*/styled.input.withConfig({
16
16
  displayName: "StyledMultiSelectSearchInput",
17
- componentId: "core-11_23_2__sc-s9ym9q-2"
17
+ componentId: "core-11_23_4__sc-s9ym9q-2"
18
18
  })(["background-color:transparent;border-width:0;font-family:inherit;padding:0;height:24px;width:100%;", " ", " &::-ms-clear{display:none;}&:focus{box-shadow:none;outline:none;}&::placeholder{color:", ";}"], getTypographyIntent('body'), function (_ref) {
19
19
  var $isNavigatingTokens = _ref.$isNavigatingTokens;
20
20
  return $isNavigatingTokens && css(["color:transparent;"]);
21
21
  }, colors.gray45);
22
22
  export var StyledMultiSelectSearch = /*#__PURE__*/styled.div.withConfig({
23
23
  displayName: "StyledMultiSelectSearch",
24
- componentId: "core-11_23_2__sc-s9ym9q-3"
24
+ componentId: "core-11_23_4__sc-s9ym9q-3"
25
25
  })(["margin-bottom:2px;margin-right:", "px;margin-top:2px;flex:1;max-width:100%;min-width:24px;"], spacing.xs);
26
26
  export var StyledMultiSelectSearchIcon = /*#__PURE__*/styled.div.withConfig({
27
27
  displayName: "StyledMultiSelectSearchIcon",
28
- componentId: "core-11_23_2__sc-s9ym9q-4"
28
+ componentId: "core-11_23_4__sc-s9ym9q-4"
29
29
  })(["align-items:center;align-self:flex-start;display:flex;height:34px;justify-content:flex-end;margin-left:", "px;margin-right:", "px;min-width:40px;width:40px;"], spacing.xs, spacing.md);
30
30
  export var StyledMultiSelectClearIcon = StyledSelectClearIcon;
31
31
  export var StyledMultiSelectArrowContainer = StyledSelectArrowContainer;
@@ -33,7 +33,7 @@ export var StyledMultiSelectArrow = StyledSelectArrow;
33
33
  export var StyledMultiSelectMenu = StyledSelectMenu;
34
34
  export var StyledMultiSelectButton = /*#__PURE__*/styled(StyledSelectButton).withConfig({
35
35
  displayName: "StyledMultiSelectButton",
36
- componentId: "core-11_23_2__sc-s9ym9q-5"
36
+ componentId: "core-11_23_4__sc-s9ym9q-5"
37
37
  })(["height:auto;padding:0;white-space:normal;&:focus-within{", "}", ""], getFocus(), function (_ref2) {
38
38
  var $emptyValue = _ref2.$emptyValue;
39
39
  return $emptyValue && css(["", "{cursor:pointer;}"], StyledMultiSelectSearchInput);
@@ -6,14 +6,14 @@ export var optionMinHeight = 32;
6
6
  export var defaultMenuHeight = 64;
7
7
  export var StyledOptions = /*#__PURE__*/styled.div.withConfig({
8
8
  displayName: "StyledOptions",
9
- componentId: "core-11_23_2__sc-3o6zya-0"
9
+ componentId: "core-11_23_4__sc-3o6zya-0"
10
10
  })([""]);
11
11
  export var StyledItem = /*#__PURE__*/styled.div.withConfig({
12
12
  displayName: "StyledItem",
13
- componentId: "core-11_23_2__sc-3o6zya-1"
13
+ componentId: "core-11_23_4__sc-3o6zya-1"
14
14
  })(["", ";padding:", "px ", "px;cursor:pointer;list-style-type:none;"], getTypographyIntent('body'), spacing.xs, spacing.md);
15
15
  export var StyledGroup = /*#__PURE__*/styled.div.withConfig({
16
16
  displayName: "StyledGroup",
17
- componentId: "core-11_23_2__sc-3o6zya-2"
17
+ componentId: "core-11_23_4__sc-3o6zya-2"
18
18
  })(["", ";padding:", "px ", "px ", "px;font-weight:", ";background:white;list-style-type:none;"], getTypographyIntent('body'), spacing.md, spacing.md, spacing.xs, typographyWeights.semibold);
19
19
  //# sourceMappingURL=NextMenu.styles.js.map
@@ -14,7 +14,7 @@ var variantColorMap = {
14
14
  };
15
15
  var StyledNotation = /*#__PURE__*/styled.i.withConfig({
16
16
  displayName: "StyledNotation",
17
- componentId: "core-11_23_2__sc-160q1m6-0"
17
+ componentId: "core-11_23_4__sc-160q1m6-0"
18
18
  })(["", " color:", ";font-style:italic;"], getTypographyIntent('small'), function (_ref) {
19
19
  var variant = _ref.variant;
20
20
  return variant ? colors[variantColorMap[variant]] : colors.gray15;
@@ -1,2 +1,2 @@
1
1
  export { Notation } from './Notation';
2
- export { NotationProps } from './Notation.types';
2
+ export type { NotationProps } from './Notation.types';
@@ -1,3 +1,2 @@
1
1
  export { Notation } from './Notation';
2
- export { NotationProps } from './Notation.types';
3
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Notation","NotationProps"],"sources":["../../src/Notation/index.ts"],"sourcesContent":["export { Notation } from './Notation'\nexport { NotationProps } from './Notation.types'\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,YAAY;AACrC,SAASC,aAAa,QAAQ,kBAAkB"}
1
+ {"version":3,"file":"index.js","names":["Notation"],"sources":["../../src/Notation/index.ts"],"sourcesContent":["export { Notation } from './Notation'\nexport type { NotationProps } from './Notation.types'\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,YAAY"}
@@ -12,37 +12,37 @@ var inputBgColor = colors.white;
12
12
  var inputBorder = "".concat(colors.gray70, " solid 1px");
13
13
  var StyledRootAddon = /*#__PURE__*/styled.span.withConfig({
14
14
  displayName: "StyledRootAddon",
15
- componentId: "core-11_23_2__sc-1782nvg-0"
15
+ componentId: "core-11_23_4__sc-1782nvg-0"
16
16
  })(["display:inline-flex;align-items:center;height:100%;position:absolute;top:0;color:", ";", ";"], function (_ref) {
17
17
  var disabled = _ref.disabled;
18
18
  return disabled ? colors.gray70 : colors.gray45;
19
19
  }, getTypographyIntent('body'));
20
20
  export var StyledPrefix = /*#__PURE__*/styled(StyledRootAddon).withConfig({
21
21
  displayName: "StyledPrefix",
22
- componentId: "core-11_23_2__sc-1782nvg-1"
22
+ componentId: "core-11_23_4__sc-1782nvg-1"
23
23
  })(["left:", "px;"], spacing.md);
24
24
  export var StyledSuffix = /*#__PURE__*/styled(StyledRootAddon).withConfig({
25
25
  displayName: "StyledSuffix",
26
- componentId: "core-11_23_2__sc-1782nvg-2"
26
+ componentId: "core-11_23_4__sc-1782nvg-2"
27
27
  })(["right:", "px;"], function (_ref2) {
28
28
  var withIncrementer = _ref2.withIncrementer;
29
29
  return withIncrementer ? spacing.md + incrementerWidth : spacing.md;
30
30
  });
31
31
  export var StyledIncrementerWrapper = /*#__PURE__*/styled.div.withConfig({
32
32
  displayName: "StyledIncrementerWrapper",
33
- componentId: "core-11_23_2__sc-1782nvg-3"
33
+ componentId: "core-11_23_4__sc-1782nvg-3"
34
34
  })(["display:flex;flex-direction:column;position:absolute;top:1px;right:1px;height:100%;"]);
35
35
  export var StyledIncrementerButton = /*#__PURE__*/styled.button.withConfig({
36
36
  displayName: "StyledIncrementerButton",
37
- componentId: "core-11_23_2__sc-1782nvg-4"
37
+ componentId: "core-11_23_4__sc-1782nvg-4"
38
38
  })(["display:inline-flex;justify-content:center;align-items:center;width:", "px;height:calc(50% - 1px);border:none;border-radius:0px;outline:none;background-color:", ";padding:0;cursor:pointer;&:first-child,&:last-child{border-left:", ";&:disabled{border-color:", ";background-color:", ";}}&:first-child{border-top-right-radius:2px;}&:last-child{border-top:", ";border-bottom-right-radius:2px;}svg{fill:", ";}&:hover{svg{fill:", ";}}&:disabled{cursor:default;svg{fill:", ";}}"], incrementerWidth, inputBgColor, inputBorder, colors.gray70, colors.gray94, inputBorder, colors.gray45, colors.gray10, colors.gray70);
39
39
  export var StyledInput = /*#__PURE__*/styled(Input).withConfig({
40
40
  displayName: "StyledInput",
41
- componentId: "core-11_23_2__sc-1782nvg-5"
41
+ componentId: "core-11_23_4__sc-1782nvg-5"
42
42
  })([""]);
43
43
  export var StyledWrapper = /*#__PURE__*/styled.div.withConfig({
44
44
  displayName: "StyledWrapper",
45
- componentId: "core-11_23_2__sc-1782nvg-6"
45
+ componentId: "core-11_23_4__sc-1782nvg-6"
46
46
  })(["position:relative;", ""], function (_ref3) {
47
47
  var hasIncrementer = _ref3.hasIncrementer;
48
48
  return hasIncrementer && css(["", "{padding-right:", "px;}"], StyledInput, spacing.md + incrementerWidth);
@@ -1,2 +1,2 @@
1
1
  export { CurrencyInput, NumberInput } from './NumberInput';
2
- export { CurrencyInputProps, NumberInputProps } from './NumberInput.types';
2
+ export type { CurrencyInputProps, NumberInputProps } from './NumberInput.types';
@@ -1,3 +1,2 @@
1
1
  export { CurrencyInput, NumberInput } from './NumberInput';
2
- export { CurrencyInputProps, NumberInputProps } from './NumberInput.types';
3
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["CurrencyInput","NumberInput","CurrencyInputProps","NumberInputProps"],"sources":["../../src/NumberInput/index.ts"],"sourcesContent":["export { CurrencyInput, NumberInput } from './NumberInput'\nexport { CurrencyInputProps, NumberInputProps } from './NumberInput.types'\n"],"mappings":"AAAA,SAASA,aAAa,EAAEC,WAAW,QAAQ,eAAe;AAC1D,SAASC,kBAAkB,EAAEC,gBAAgB,QAAQ,qBAAqB"}
1
+ {"version":3,"file":"index.js","names":["CurrencyInput","NumberInput"],"sources":["../../src/NumberInput/index.ts"],"sourcesContent":["export { CurrencyInput, NumberInput } from './NumberInput'\nexport type { CurrencyInputProps, NumberInputProps } from './NumberInput.types'\n"],"mappings":"AAAA,SAASA,aAAa,EAAEC,WAAW,QAAQ,eAAe"}
@@ -2,6 +2,6 @@ import styled from 'styled-components';
2
2
  export var arrowSize = 8;
3
3
  export var StyledArrow = /*#__PURE__*/styled.div.withConfig({
4
4
  displayName: "StyledArrow",
5
- componentId: "core-11_23_2__sc-1epxw7u-0"
5
+ componentId: "core-11_23_4__sc-1epxw7u-0"
6
6
  })(["position:absolute;background:inherit;width:", "px;height:", "px;transform:rotate(45deg);"], arrowSize, arrowSize);
7
7
  //# sourceMappingURL=OverlayArrow.styles.js.map
@@ -11,8 +11,9 @@ export function useOverlay(_ref) {
11
11
  }),
12
12
  middlewareData = _useFloating.middlewareData,
13
13
  currentPlacement = _useFloating.placement,
14
- referenceRef = _useFloating.reference,
15
- overlayRef = _useFloating.floating,
14
+ _useFloating$refs = _useFloating.refs,
15
+ referenceRef = _useFloating$refs.setReference,
16
+ overlayRef = _useFloating$refs.setFloating,
16
17
  x = _useFloating.x,
17
18
  y = _useFloating.y,
18
19
  strategy = _useFloating.strategy;
@@ -1 +1 @@
1
- {"version":3,"file":"useOverlay.js","names":["autoUpdate","useFloating","getPlacement","useOverlay","_ref","placement","middleware","_useFloating","strategy","whileElementsMounted","middlewareData","currentPlacement","referenceRef","reference","overlayRef","floating","x","y","overlayStyle","left","concat","top","position","width"],"sources":["../../src/Overlay/useOverlay.ts"],"sourcesContent":["import {\n autoUpdate,\n Middleware,\n MiddlewareData,\n offset,\n Placement as FloatingPlacement,\n ReferenceType,\n useFloating,\n} from '@floating-ui/react-dom'\nimport { CSSProperties } from 'react'\nimport { getPlacement, Placement } from '../_utils/placement'\n\nexport type OverlayOffsetValue = Parameters<typeof offset>[0]\n\nexport type OverlayRefType = (node: HTMLElement | null) => void\n\nexport type ReferenceRefType = (node: ReferenceType | null) => void\n\nexport type OverlayMiddleware = Middleware\n\nexport type OverlayPlacement = FloatingPlacement\n\nexport function useOverlay({\n placement,\n middleware,\n}: {\n placement: Placement\n middleware?: Middleware[]\n}): {\n overlayRef: (node: HTMLElement | null) => void\n referenceRef: (node: ReferenceType | null) => void\n /** Dimensions of the floating element should not change before and after being positioned\n * https://floating-ui.com/docs/computeposition#initial-layout\n * https://github.com/floating-ui/floating-ui/issues/1740 */\n overlayStyle: CSSProperties\n middlewareData: MiddlewareData\n placement: OverlayPlacement\n} {\n const {\n middlewareData,\n placement: currentPlacement,\n reference: referenceRef,\n floating: overlayRef,\n x,\n y,\n strategy,\n } = useFloating({\n strategy: 'fixed',\n whileElementsMounted: autoUpdate,\n placement: getPlacement(placement),\n middleware,\n })\n return {\n overlayStyle: {\n left: `${x}px`,\n top: `${y}px`,\n position: strategy,\n width: 'max-content',\n },\n overlayRef,\n referenceRef,\n middlewareData,\n placement: currentPlacement,\n }\n}\n"],"mappings":"AAAA,SACEA,UAAU,EAMVC,WAAW,QACN,wBAAwB;AAE/B,SAASC,YAAY,QAAmB,qBAAqB;AAY7D,OAAO,SAASC,UAAUA,CAAAC,IAAA,EAexB;EAAA,IAdAC,SAAS,GAAAD,IAAA,CAATC,SAAS;IACTC,UAAU,GAAAF,IAAA,CAAVE,UAAU;EAcV,IAAAC,YAAA,GAQIN,WAAW,CAAC;MACdO,QAAQ,EAAE,OAAO;MACjBC,oBAAoB,EAAET,UAAU;MAChCK,SAAS,EAAEH,YAAY,CAACG,SAAS,CAAC;MAClCC,UAAU,EAAVA;IACF,CAAC,CAAC;IAZAI,cAAc,GAAAH,YAAA,CAAdG,cAAc;IACHC,gBAAgB,GAAAJ,YAAA,CAA3BF,SAAS;IACEO,YAAY,GAAAL,YAAA,CAAvBM,SAAS;IACCC,UAAU,GAAAP,YAAA,CAApBQ,QAAQ;IACRC,CAAC,GAAAT,YAAA,CAADS,CAAC;IACDC,CAAC,GAAAV,YAAA,CAADU,CAAC;IACDT,QAAQ,GAAAD,YAAA,CAARC,QAAQ;EAOV,OAAO;IACLU,YAAY,EAAE;MACZC,IAAI,KAAAC,MAAA,CAAKJ,CAAC,OAAI;MACdK,GAAG,KAAAD,MAAA,CAAKH,CAAC,OAAI;MACbK,QAAQ,EAAEd,QAAQ;MAClBe,KAAK,EAAE;IACT,CAAC;IACDT,UAAU,EAAVA,UAAU;IACVF,YAAY,EAAZA,YAAY;IACZF,cAAc,EAAdA,cAAc;IACdL,SAAS,EAAEM;EACb,CAAC;AACH"}
1
+ {"version":3,"file":"useOverlay.js","names":["autoUpdate","useFloating","getPlacement","useOverlay","_ref","placement","middleware","_useFloating","strategy","whileElementsMounted","middlewareData","currentPlacement","_useFloating$refs","refs","referenceRef","setReference","overlayRef","setFloating","x","y","overlayStyle","left","concat","top","position","width"],"sources":["../../src/Overlay/useOverlay.ts"],"sourcesContent":["import {\n autoUpdate,\n Middleware,\n MiddlewareData,\n offset,\n Placement as FloatingPlacement,\n ReferenceType,\n useFloating,\n} from '@floating-ui/react-dom'\nimport { CSSProperties } from 'react'\nimport { getPlacement, Placement } from '../_utils/placement'\n\nexport type OverlayOffsetValue = Parameters<typeof offset>[0]\n\nexport type OverlayRefType = (node: HTMLElement | null) => void\n\nexport type ReferenceRefType = (node: ReferenceType | null) => void\n\nexport type OverlayMiddleware = Middleware\n\nexport type OverlayPlacement = FloatingPlacement\n\nexport function useOverlay({\n placement,\n middleware,\n}: {\n placement: Placement\n middleware?: Middleware[]\n}): {\n overlayRef: (node: HTMLElement | null) => void\n referenceRef: (node: ReferenceType | null) => void\n /** Dimensions of the floating element should not change before and after being positioned\n * https://floating-ui.com/docs/computeposition#initial-layout\n * https://github.com/floating-ui/floating-ui/issues/1740 */\n overlayStyle: CSSProperties\n middlewareData: MiddlewareData\n placement: OverlayPlacement\n} {\n const {\n middlewareData,\n placement: currentPlacement,\n refs: { setReference: referenceRef, setFloating: overlayRef },\n x,\n y,\n strategy,\n } = useFloating({\n strategy: 'fixed',\n whileElementsMounted: autoUpdate,\n placement: getPlacement(placement),\n middleware,\n })\n return {\n overlayStyle: {\n left: `${x}px`,\n top: `${y}px`,\n position: strategy,\n width: 'max-content',\n },\n overlayRef,\n referenceRef,\n middlewareData,\n placement: currentPlacement,\n }\n}\n"],"mappings":"AAAA,SACEA,UAAU,EAMVC,WAAW,QACN,wBAAwB;AAE/B,SAASC,YAAY,QAAmB,qBAAqB;AAY7D,OAAO,SAASC,UAAUA,CAAAC,IAAA,EAexB;EAAA,IAdAC,SAAS,GAAAD,IAAA,CAATC,SAAS;IACTC,UAAU,GAAAF,IAAA,CAAVE,UAAU;EAcV,IAAAC,YAAA,GAOIN,WAAW,CAAC;MACdO,QAAQ,EAAE,OAAO;MACjBC,oBAAoB,EAAET,UAAU;MAChCK,SAAS,EAAEH,YAAY,CAACG,SAAS,CAAC;MAClCC,UAAU,EAAVA;IACF,CAAC,CAAC;IAXAI,cAAc,GAAAH,YAAA,CAAdG,cAAc;IACHC,gBAAgB,GAAAJ,YAAA,CAA3BF,SAAS;IAAAO,iBAAA,GAAAL,YAAA,CACTM,IAAI;IAAkBC,YAAY,GAAAF,iBAAA,CAA1BG,YAAY;IAA6BC,UAAU,GAAAJ,iBAAA,CAAvBK,WAAW;IAC/CC,CAAC,GAAAX,YAAA,CAADW,CAAC;IACDC,CAAC,GAAAZ,YAAA,CAADY,CAAC;IACDX,QAAQ,GAAAD,YAAA,CAARC,QAAQ;EAOV,OAAO;IACLY,YAAY,EAAE;MACZC,IAAI,KAAAC,MAAA,CAAKJ,CAAC,OAAI;MACdK,GAAG,KAAAD,MAAA,CAAKH,CAAC,OAAI;MACbK,QAAQ,EAAEhB,QAAQ;MAClBiB,KAAK,EAAE;IACT,CAAC;IACDT,UAAU,EAAVA,UAAU;IACVF,YAAY,EAAZA,YAAY;IACZJ,cAAc,EAAdA,cAAc;IACdL,SAAS,EAAEM;EACb,CAAC;AACH"}
@@ -186,20 +186,6 @@ export var OverlayTrigger = /*#__PURE__*/React.forwardRef(function OverlayTrigge
186
186
  open: triggerApi.isVisible,
187
187
  ref: triggerElement.ref ? mergeRefs(triggerElement.ref, ref, triggerElRef, setReferenceElement) : mergeRefs(ref, triggerElRef, setReferenceElement)
188
188
  }, triggerProps));
189
- React.useEffect(function () {
190
- var targetErrors = ['ResizeObserver loop completed with undelivered notifications.', 'ResizeObserver loop limit exceeded'];
191
- var onWindowError = function onWindowError(e) {
192
- if (triggerApi.isVisible) {
193
- if (targetErrors.includes(e.message)) {
194
- e.stopImmediatePropagation();
195
- }
196
- }
197
- };
198
- window.addEventListener('error', onWindowError);
199
- return function () {
200
- window.removeEventListener('error', onWindowError);
201
- };
202
- }, []);
203
189
  return /*#__PURE__*/React.createElement(DelayedToggleContext.Provider, {
204
190
  value: delayedToggle
205
191
  }, wrappedTriggerElement, visibility.isVisible && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ClickOutside, {
@@ -1 +1 @@
1
- {"version":3,"file":"OverlayTrigger.js","names":["arrow","floatingArrow","flip","floatingFlip","limitShift","offset","floatingOffset","shift","floatingShift","size","floatingSize","FocusScope","useId","React","ResizeObserverPolyfill","Arrow","arrowSize","useOverlay","Portal","useClickOutside","DelayedToggleContext","useDelayedToggle","useDelayedToggleContext","Trigger","useTrigger","useVisibility","mergeRefs","useOverlayTriggerA11y","globalThis","ResizeObserver","ClickOutside","_ref","onClickOutside","refs","createElement","Fragment","OverlayTrigger","forwardRef","_ref2","ref","_ref2$afterHide","afterHide","_ref2$afterShow","afterShow","ariaDescribedby","ariaDetails","ariaLabelledby","ariaLabel","autoFocus","_ref2$beforeHide","beforeHide","_ref2$beforeShow","beforeShow","_ref2$canFlip","canFlip","children","_ref2$clickOutsideIgn","clickOutsideIgnoreRefs","containFocus","_ref2$hideDelay","hideDelay","hideKeys_","hideKeys","_ref2$initialIsVisibl","initialIsVisible","overlay","_ref2$padding","padding","_ref2$placement","placement","_ref2$restoreFocusOnH","restoreFocusOnHide","_ref2$showDelay","showDelay","_ref2$showKeys","showKeys","_ref2$shrinkOverlay","shrinkOverlay","_ref2$trigger","trigger","_ref2$arrow","overlayApiRef","overlayRef","role","_ref2$passA11yPropsTo","passA11yPropsToOverlay","isDialogRole","includes","console","warn","concat","target","triggerElRef","useRef","overlayElRef","_React$useState","useState","_React$useState2","_slicedToArray","referenceElement","setReferenceElement","clickedOutsideRef","visibility","useImperativeHandle","show","hide","triggers","useMemo","Array","isArray","useEffect","indexOf","isVisible","current","focus","delayedToggle","beforeDisable","beforeEnable","disableDelay","enableDelay","isEnabled","onDisable","onEnable","triggerApi","enable","disable","enableKeys","disableKeys","triggerRef","triggerElement","overlayId","_useOverlayTriggerA","canPropOverlayUp","isValidElement","id","isOpen","wrapperProps","overlayProps","portalProps","triggerProps","focusScopeProps","labelProps","wrappedTriggerElement","cloneElement","_objectSpread","open","targetErrors","onWindowError","e","message","stopImmediatePropagation","window","addEventListener","removeEventListener","Provider","value","event","_toConsumableArray","TriggerOverlay","contain","restoreFocus","overlayCloneProps","CloseOnFocus","_ref3","style","height","position","top","width","onFocus","opacity","useOverlayTriggerContext","_useDelayedToggleCont","toggle","_ref4","arrowRef","arrowPadding","middleware","mainAxis","limiter","apply","_ref5","elements","Object","assign","floating","minWidth","reference","getBoundingClientRect","element","filter","_useOverlay","overlayStyle","referenceRefCallback","referenceRef","middlewareData","currentPlacement","mergedRefs","_extends"],"sources":["../../src/OverlayTrigger/OverlayTrigger.tsx"],"sourcesContent":["import {\n arrow as floatingArrow,\n flip as floatingFlip,\n limitShift,\n offset as floatingOffset,\n shift as floatingShift,\n size as floatingSize,\n} from '@floating-ui/react-dom'\nimport { FocusScope } from '@react-aria/focus'\nimport { useId } from '@react-aria/utils'\nimport React from 'react'\nimport ResizeObserverPolyfill from 'resize-observer-polyfill'\nimport { Arrow } from '../Overlay/OverlayArrow'\nimport { arrowSize } from '../Overlay/OverlayArrow.styles'\nimport { OverlayMiddleware, useOverlay } from '../Overlay/useOverlay'\nimport { Portal } from '../Portal'\nimport { ClickOutsideConfig, useClickOutside } from '../_hooks/ClickOutside'\nimport {\n DelayedToggleContext,\n useDelayedToggle,\n useDelayedToggleContext,\n} from '../_hooks/DelayedToggle'\nimport { Trigger, TriggerApi, useTrigger } from '../_hooks/Trigger'\nimport { useVisibility } from '../_hooks/Visibility'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport { Placement } from '../_utils/placement'\nimport { ReactElementWithRef } from '../_utils/types'\nimport { useOverlayTriggerA11y } from './a11yPresets'\nimport {\n DeprecatedOverlayTriggerRef,\n OverlayTriggerProps,\n} from './OverlayTrigger.types'\n\nif (!globalThis?.ResizeObserver) {\n globalThis.ResizeObserver = ResizeObserverPolyfill\n}\n\nconst ClickOutside = ({ onClickOutside, refs }: ClickOutsideConfig) => {\n useClickOutside({\n onClickOutside,\n refs,\n })\n\n return <></>\n}\n\n/**\n\n @since 10.19.0\n\n @see [Storybook](https://procore.github.io/core/core-react/latest/?path=/story/demos-overlaytrigger--demo)\n\n */\nexport const OverlayTrigger = React.forwardRef<\n DeprecatedOverlayTriggerRef,\n OverlayTriggerProps\n>(function OverlayTrigger(\n {\n afterHide = () => {},\n afterShow = () => {},\n ['aria-describedby']: ariaDescribedby,\n ['aria-details']: ariaDetails,\n ['aria-labelledby']: ariaLabelledby,\n ['aria-label']: ariaLabel,\n autoFocus,\n beforeHide = () => true,\n beforeShow = () => true,\n canFlip = true,\n children,\n clickOutsideIgnoreRefs = [],\n containFocus,\n hideDelay = 100,\n hideKeys: hideKeys_,\n initialIsVisible = false,\n overlay,\n padding = 2,\n placement = 'top',\n restoreFocusOnHide = true, // TODO: change default to be false, but that is a breaking change\n showDelay = 0,\n showKeys = ['ArrowDown', 'Down'],\n shrinkOverlay = false,\n trigger = 'click',\n arrow = false,\n overlayRef: overlayApiRef,\n role,\n passA11yPropsToOverlay = false,\n },\n ref\n) {\n const isDialogRole = role === 'dialog'\n\n if (isDialogRole && (trigger === 'hover' || trigger?.includes('hover'))) {\n console.warn(\n `@procore/core-react: OverlayTigger has role ${role} and a hover trigger, this may cause weird focus management and is unrecommended. Review autoFocus prop.`\n )\n }\n\n const hideKeys = hideKeys_ ?? {\n // Note by default OverlayTrigger closes on tab. Dialog role changes the default.\n overlay:\n containFocus ?? isDialogRole\n ? ['Escape', 'Esc']\n : ['Escape', 'Esc', 'Tab'],\n target: ['Escape', 'Esc'],\n }\n\n const triggerElRef = React.useRef<HTMLElement>(null)\n const overlayElRef = React.useRef<HTMLElement>(null)\n const [referenceElement, setReferenceElement] =\n React.useState<HTMLElement | null>(null)\n const clickedOutsideRef = React.useRef(true)\n\n const visibility = useVisibility({\n afterHide,\n afterShow,\n initialIsVisible,\n })\n\n React.useImperativeHandle(overlayApiRef, () => ({\n show: visibility.show,\n hide: visibility.hide,\n }))\n\n const triggers = React.useMemo(\n () => (Array.isArray(trigger) ? trigger : [trigger]),\n [trigger]\n )\n\n React.useEffect(() => {\n if (triggers.indexOf('none') >= 0 && visibility.isVisible) {\n visibility.hide()\n }\n if (triggers.indexOf('always') >= 0 && !visibility.isVisible) {\n visibility.show()\n }\n }, [triggers, visibility.isVisible])\n\n // TODO delete in a separate branch for testing and rely only on FocusScope\n React.useEffect(() => {\n if (\n restoreFocusOnHide &&\n !visibility.isVisible &&\n !clickedOutsideRef.current\n ) {\n triggerElRef.current && triggerElRef.current.focus()\n }\n\n clickedOutsideRef.current = false\n }, [restoreFocusOnHide, triggerElRef, visibility.isVisible])\n\n const delayedToggle = useDelayedToggle({\n beforeDisable: beforeHide,\n beforeEnable: beforeShow,\n disableDelay: hideDelay,\n enableDelay: showDelay,\n isEnabled: visibility.isVisible,\n onDisable: visibility.hide,\n onEnable: visibility.show,\n })\n\n const triggerApi = useTrigger({\n isEnabled: visibility.isVisible,\n enable: delayedToggle.enable,\n disable: delayedToggle.disable,\n enableKeys: showKeys,\n disableKeys: hideKeys.target,\n trigger,\n triggerRef: triggerElRef,\n })\n\n const triggerElement =\n typeof children === 'function'\n ? (children as (props: TriggerApi) => ReactElementWithRef)(triggerApi)\n : (children as ReactElementWithRef)\n\n const overlayId = useId()\n\n const {\n wrapperProps,\n overlayProps,\n portalProps,\n triggerProps,\n focusScopeProps,\n // Does not use. User needs to wire up when using dialog role!\n labelProps,\n } = useOverlayTriggerA11y({\n canPropOverlayUp: React.isValidElement(overlay) && passA11yPropsToOverlay,\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n id: overlayId,\n isOpen: visibility.isVisible,\n role,\n })\n\n const wrappedTriggerElement = React.cloneElement(triggerElement, {\n open: triggerApi.isVisible,\n ref: triggerElement.ref\n ? mergeRefs(triggerElement.ref, ref, triggerElRef, setReferenceElement)\n : mergeRefs(ref, triggerElRef, setReferenceElement),\n ...triggerProps,\n })\n\n React.useEffect(() => {\n const targetErrors = [\n 'ResizeObserver loop completed with undelivered notifications.',\n 'ResizeObserver loop limit exceeded',\n ]\n\n const onWindowError = (e: WindowEventMap['error']) => {\n if (triggerApi.isVisible) {\n if (targetErrors.includes(e.message)) {\n e.stopImmediatePropagation()\n }\n }\n }\n\n window.addEventListener('error', onWindowError)\n\n return () => {\n window.removeEventListener('error', onWindowError)\n }\n }, [])\n\n return (\n <DelayedToggleContext.Provider value={delayedToggle}>\n {wrappedTriggerElement}\n {visibility.isVisible && (\n <>\n <ClickOutside\n {...{\n onClickOutside: (event) => {\n clickedOutsideRef.current = true\n delayedToggle.disable(event)\n },\n refs: [overlayElRef, triggerElRef, ...clickOutsideIgnoreRefs],\n }}\n />\n <Portal {...portalProps}>\n <Trigger\n {...{\n isEnabled: visibility.isVisible,\n enable: delayedToggle.enable,\n disable: delayedToggle.disable,\n disableKeys: hideKeys.overlay,\n trigger: trigger === 'click' ? 'none' : trigger,\n triggerRef: overlayElRef,\n }}\n >\n <TriggerOverlay\n autoFocus={autoFocus ?? focusScopeProps.autoFocus}\n containFocus={containFocus ?? focusScopeProps.contain}\n restoreFocus={\n restoreFocusOnHide ?? focusScopeProps.restoreFocus\n }\n ref={overlayElRef}\n referenceElement={referenceElement}\n overlay={overlay}\n shrinkOverlay={shrinkOverlay}\n placement={placement}\n padding={padding}\n canFlip={canFlip}\n arrow={arrow}\n wrapperProps={wrapperProps}\n overlayCloneProps={overlayProps}\n />\n </Trigger>\n </Portal>\n </>\n )}\n </DelayedToggleContext.Provider>\n )\n})\n\nexport function CloseOnFocus({ hide }: { hide: (event: any) => any }) {\n return (\n // in IE, the hidden input's cursor appears right under the menu\n // this positions it arbitrarily away where it won't be noticed\n <div\n style={{\n height: 0,\n position: 'absolute',\n top: 1000,\n width: 0,\n }}\n >\n <input onFocus={hide} style={{ opacity: 0 }} />\n </div>\n )\n}\n\nexport function useOverlayTriggerContext() {\n const { enable: show, disable: hide, toggle } = useDelayedToggleContext()\n\n return {\n hide,\n show,\n toggle,\n }\n}\n\ninterface TriggerOverlayProps {\n containFocus?: boolean\n autoFocus?: boolean\n restoreFocus?: boolean\n placement: Placement\n canFlip?: boolean\n arrow?: boolean\n padding: number\n shrinkOverlay: boolean\n overlay: React.ReactNode\n overlayCloneProps: any\n wrapperProps: Record<string, unknown>\n referenceElement: HTMLElement | null\n}\n\nexport const TriggerOverlay = React.forwardRef<\n HTMLElement,\n TriggerOverlayProps\n>(function (\n {\n autoFocus,\n containFocus,\n restoreFocus,\n placement,\n canFlip,\n arrow,\n padding,\n shrinkOverlay,\n overlay,\n referenceElement,\n wrapperProps,\n overlayCloneProps,\n },\n ref\n) {\n const arrowRef = React.useRef<HTMLDivElement>(null)\n\n const arrowPadding = arrowSize / 2 + 1\n const middleware = [\n floatingOffset({ mainAxis: arrow ? padding + arrowPadding : padding }),\n canFlip ? floatingFlip() : null,\n floatingShift({ limiter: limitShift() }),\n !shrinkOverlay\n ? floatingSize({\n apply({ elements }) {\n Object.assign(elements.floating.style, {\n minWidth: `${elements.reference.getBoundingClientRect().width}px`,\n })\n },\n })\n : null,\n floatingArrow({\n element: arrowRef,\n padding: 6,\n }),\n ].filter((middleware) => middleware !== null) as OverlayMiddleware[]\n\n const {\n overlayStyle,\n referenceRef: referenceRefCallback,\n overlayRef,\n middlewareData,\n placement: currentPlacement,\n } = useOverlay({\n middleware,\n placement,\n })\n\n React.useEffect(() => {\n referenceRefCallback(referenceElement)\n }, [referenceElement, referenceRefCallback])\n\n const mergedRefs = mergeRefs(ref, overlayRef)\n\n // TODO could just move clone and clone props to parent\n if (!React.isValidElement(overlay) && overlayCloneProps) {\n console.warn(\n 'PLEASE REPORT ISSUE @procore/core-react: OverlayTrigger TriggerOverlay is not a valid React element but wants to clone \"overlay\" with props. Cannot pass props to the element.'\n )\n }\n\n return (\n <FocusScope\n autoFocus={autoFocus}\n contain={containFocus}\n restoreFocus={restoreFocus}\n >\n <div\n data-qa=\"core-overlay-trigger-overlay-wrapper\"\n ref={mergedRefs}\n style={overlayStyle}\n {...wrapperProps}\n >\n {React.isValidElement(overlay)\n ? React.cloneElement(overlay, overlayCloneProps)\n : overlay}\n {arrow && (\n <Arrow\n ref={arrowRef}\n arrow={middlewareData.arrow}\n placement={currentPlacement}\n />\n )}\n </div>\n </FocusScope>\n )\n})\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SACEA,KAAK,IAAIC,aAAa,EACtBC,IAAI,IAAIC,YAAY,EACpBC,UAAU,EACVC,MAAM,IAAIC,cAAc,EACxBC,KAAK,IAAIC,aAAa,EACtBC,IAAI,IAAIC,YAAY,QACf,wBAAwB;AAC/B,SAASC,UAAU,QAAQ,mBAAmB;AAC9C,SAASC,KAAK,QAAQ,mBAAmB;AACzC,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,sBAAsB,MAAM,0BAA0B;AAC7D,SAASC,KAAK,QAAQ,yBAAyB;AAC/C,SAASC,SAAS,QAAQ,gCAAgC;AAC1D,SAA4BC,UA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AAC,CAAC"}
1
+ {"version":3,"file":"OverlayTrigger.js","names":["arrow","floatingArrow","flip","floatingFlip","limitShift","offset","floatingOffset","shift","floatingShift","size","floatingSize","FocusScope","useId","React","ResizeObserverPolyfill","Arrow","arrowSize","useOverlay","Portal","useClickOutside","DelayedToggleContext","useDelayedToggle","useDelayedToggleContext","Trigger","useTrigger","useVisibility","mergeRefs","useOverlayTriggerA11y","globalThis","ResizeObserver","ClickOutside","_ref","onClickOutside","refs","createElement","Fragment","OverlayTrigger","forwardRef","_ref2","ref","_ref2$afterHide","afterHide","_ref2$afterShow","afterShow","ariaDescribedby","ariaDetails","ariaLabelledby","ariaLabel","autoFocus","_ref2$beforeHide","beforeHide","_ref2$beforeShow","beforeShow","_ref2$canFlip","canFlip","children","_ref2$clickOutsideIgn","clickOutsideIgnoreRefs","containFocus","_ref2$hideDelay","hideDelay","hideKeys_","hideKeys","_ref2$initialIsVisibl","initialIsVisible","overlay","_ref2$padding","padding","_ref2$placement","placement","_ref2$restoreFocusOnH","restoreFocusOnHide","_ref2$showDelay","showDelay","_ref2$showKeys","showKeys","_ref2$shrinkOverlay","shrinkOverlay","_ref2$trigger","trigger","_ref2$arrow","overlayApiRef","overlayRef","role","_ref2$passA11yPropsTo","passA11yPropsToOverlay","isDialogRole","includes","console","warn","concat","target","triggerElRef","useRef","overlayElRef","_React$useState","useState","_React$useState2","_slicedToArray","referenceElement","setReferenceElement","clickedOutsideRef","visibility","useImperativeHandle","show","hide","triggers","useMemo","Array","isArray","useEffect","indexOf","isVisible","current","focus","delayedToggle","beforeDisable","beforeEnable","disableDelay","enableDelay","isEnabled","onDisable","onEnable","triggerApi","enable","disable","enableKeys","disableKeys","triggerRef","triggerElement","overlayId","_useOverlayTriggerA","canPropOverlayUp","isValidElement","id","isOpen","wrapperProps","overlayProps","portalProps","triggerProps","focusScopeProps","labelProps","wrappedTriggerElement","cloneElement","_objectSpread","open","Provider","value","event","_toConsumableArray","TriggerOverlay","contain","restoreFocus","overlayCloneProps","CloseOnFocus","_ref3","style","height","position","top","width","onFocus","opacity","useOverlayTriggerContext","_useDelayedToggleCont","toggle","_ref4","arrowRef","arrowPadding","middleware","mainAxis","limiter","apply","_ref5","elements","Object","assign","floating","minWidth","reference","getBoundingClientRect","element","filter","_useOverlay","overlayStyle","referenceRefCallback","referenceRef","middlewareData","currentPlacement","mergedRefs","_extends"],"sources":["../../src/OverlayTrigger/OverlayTrigger.tsx"],"sourcesContent":["import {\n arrow as floatingArrow,\n flip as floatingFlip,\n limitShift,\n offset as floatingOffset,\n shift as floatingShift,\n size as floatingSize,\n} from '@floating-ui/react-dom'\nimport { FocusScope } from '@react-aria/focus'\nimport { useId } from '@react-aria/utils'\nimport React from 'react'\nimport ResizeObserverPolyfill from 'resize-observer-polyfill'\nimport { Arrow } from '../Overlay/OverlayArrow'\nimport { arrowSize } from '../Overlay/OverlayArrow.styles'\nimport { OverlayMiddleware, useOverlay } from '../Overlay/useOverlay'\nimport { Portal } from '../Portal'\nimport { ClickOutsideConfig, useClickOutside } from '../_hooks/ClickOutside'\nimport {\n DelayedToggleContext,\n useDelayedToggle,\n useDelayedToggleContext,\n} from '../_hooks/DelayedToggle'\nimport { Trigger, TriggerApi, useTrigger } from '../_hooks/Trigger'\nimport { useVisibility } from '../_hooks/Visibility'\nimport { mergeRefs } from '../_utils/mergeRefs'\nimport { Placement } from '../_utils/placement'\nimport { ReactElementWithRef } from '../_utils/types'\nimport { useOverlayTriggerA11y } from './a11yPresets'\nimport {\n DeprecatedOverlayTriggerRef,\n OverlayTriggerProps,\n} from './OverlayTrigger.types'\n\nif (!globalThis?.ResizeObserver) {\n globalThis.ResizeObserver = ResizeObserverPolyfill\n}\n\nconst ClickOutside = ({ onClickOutside, refs }: ClickOutsideConfig) => {\n useClickOutside({\n onClickOutside,\n refs,\n })\n\n return <></>\n}\n\n/**\n\n @since 10.19.0\n\n @see [Storybook](https://procore.github.io/core/core-react/latest/?path=/story/demos-overlaytrigger--demo)\n\n */\nexport const OverlayTrigger = React.forwardRef<\n DeprecatedOverlayTriggerRef,\n OverlayTriggerProps\n>(function OverlayTrigger(\n {\n afterHide = () => {},\n afterShow = () => {},\n ['aria-describedby']: ariaDescribedby,\n ['aria-details']: ariaDetails,\n ['aria-labelledby']: ariaLabelledby,\n ['aria-label']: ariaLabel,\n autoFocus,\n beforeHide = () => true,\n beforeShow = () => true,\n canFlip = true,\n children,\n clickOutsideIgnoreRefs = [],\n containFocus,\n hideDelay = 100,\n hideKeys: hideKeys_,\n initialIsVisible = false,\n overlay,\n padding = 2,\n placement = 'top',\n restoreFocusOnHide = true, // TODO: change default to be false, but that is a breaking change\n showDelay = 0,\n showKeys = ['ArrowDown', 'Down'],\n shrinkOverlay = false,\n trigger = 'click',\n arrow = false,\n overlayRef: overlayApiRef,\n role,\n passA11yPropsToOverlay = false,\n },\n ref\n) {\n const isDialogRole = role === 'dialog'\n\n if (isDialogRole && (trigger === 'hover' || trigger?.includes('hover'))) {\n console.warn(\n `@procore/core-react: OverlayTigger has role ${role} and a hover trigger, this may cause weird focus management and is unrecommended. Review autoFocus prop.`\n )\n }\n\n const hideKeys = hideKeys_ ?? {\n // Note by default OverlayTrigger closes on tab. Dialog role changes the default.\n overlay:\n containFocus ?? isDialogRole\n ? ['Escape', 'Esc']\n : ['Escape', 'Esc', 'Tab'],\n target: ['Escape', 'Esc'],\n }\n\n const triggerElRef = React.useRef<HTMLElement>(null)\n const overlayElRef = React.useRef<HTMLElement>(null)\n const [referenceElement, setReferenceElement] =\n React.useState<HTMLElement | null>(null)\n const clickedOutsideRef = React.useRef(true)\n\n const visibility = useVisibility({\n afterHide,\n afterShow,\n initialIsVisible,\n })\n\n React.useImperativeHandle(overlayApiRef, () => ({\n show: visibility.show,\n hide: visibility.hide,\n }))\n\n const triggers = React.useMemo(\n () => (Array.isArray(trigger) ? trigger : [trigger]),\n [trigger]\n )\n\n React.useEffect(() => {\n if (triggers.indexOf('none') >= 0 && visibility.isVisible) {\n visibility.hide()\n }\n if (triggers.indexOf('always') >= 0 && !visibility.isVisible) {\n visibility.show()\n }\n }, [triggers, visibility.isVisible])\n\n // TODO delete in a separate branch for testing and rely only on FocusScope\n React.useEffect(() => {\n if (\n restoreFocusOnHide &&\n !visibility.isVisible &&\n !clickedOutsideRef.current\n ) {\n triggerElRef.current && triggerElRef.current.focus()\n }\n\n clickedOutsideRef.current = false\n }, [restoreFocusOnHide, triggerElRef, visibility.isVisible])\n\n const delayedToggle = useDelayedToggle({\n beforeDisable: beforeHide,\n beforeEnable: beforeShow,\n disableDelay: hideDelay,\n enableDelay: showDelay,\n isEnabled: visibility.isVisible,\n onDisable: visibility.hide,\n onEnable: visibility.show,\n })\n\n const triggerApi = useTrigger({\n isEnabled: visibility.isVisible,\n enable: delayedToggle.enable,\n disable: delayedToggle.disable,\n enableKeys: showKeys,\n disableKeys: hideKeys.target,\n trigger,\n triggerRef: triggerElRef,\n })\n\n const triggerElement =\n typeof children === 'function'\n ? (children as (props: TriggerApi) => ReactElementWithRef)(triggerApi)\n : (children as ReactElementWithRef)\n\n const overlayId = useId()\n\n const {\n wrapperProps,\n overlayProps,\n portalProps,\n triggerProps,\n focusScopeProps,\n // Does not use. User needs to wire up when using dialog role!\n labelProps,\n } = useOverlayTriggerA11y({\n canPropOverlayUp: React.isValidElement(overlay) && passA11yPropsToOverlay,\n 'aria-describedby': ariaDescribedby,\n 'aria-details': ariaDetails,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n id: overlayId,\n isOpen: visibility.isVisible,\n role,\n })\n\n const wrappedTriggerElement = React.cloneElement(triggerElement, {\n open: triggerApi.isVisible,\n ref: triggerElement.ref\n ? mergeRefs(triggerElement.ref, ref, triggerElRef, setReferenceElement)\n : mergeRefs(ref, triggerElRef, setReferenceElement),\n ...triggerProps,\n })\n\n return (\n <DelayedToggleContext.Provider value={delayedToggle}>\n {wrappedTriggerElement}\n {visibility.isVisible && (\n <>\n <ClickOutside\n {...{\n onClickOutside: (event) => {\n clickedOutsideRef.current = true\n delayedToggle.disable(event)\n },\n refs: [overlayElRef, triggerElRef, ...clickOutsideIgnoreRefs],\n }}\n />\n <Portal {...portalProps}>\n <Trigger\n {...{\n isEnabled: visibility.isVisible,\n enable: delayedToggle.enable,\n disable: delayedToggle.disable,\n disableKeys: hideKeys.overlay,\n trigger: trigger === 'click' ? 'none' : trigger,\n triggerRef: overlayElRef,\n }}\n >\n <TriggerOverlay\n autoFocus={autoFocus ?? focusScopeProps.autoFocus}\n containFocus={containFocus ?? focusScopeProps.contain}\n restoreFocus={\n restoreFocusOnHide ?? focusScopeProps.restoreFocus\n }\n ref={overlayElRef}\n referenceElement={referenceElement}\n overlay={overlay}\n shrinkOverlay={shrinkOverlay}\n placement={placement}\n padding={padding}\n canFlip={canFlip}\n arrow={arrow}\n wrapperProps={wrapperProps}\n overlayCloneProps={overlayProps}\n />\n </Trigger>\n </Portal>\n </>\n )}\n </DelayedToggleContext.Provider>\n )\n})\n\nexport function CloseOnFocus({ hide }: { hide: (event: any) => any }) {\n return (\n // in IE, the hidden input's cursor appears right under the menu\n // this positions it arbitrarily away where it won't be noticed\n <div\n style={{\n height: 0,\n position: 'absolute',\n top: 1000,\n width: 0,\n }}\n >\n <input onFocus={hide} style={{ opacity: 0 }} />\n </div>\n )\n}\n\nexport function useOverlayTriggerContext() {\n const { enable: show, disable: hide, toggle } = useDelayedToggleContext()\n\n return {\n hide,\n show,\n toggle,\n }\n}\n\ninterface TriggerOverlayProps {\n containFocus?: boolean\n autoFocus?: boolean\n restoreFocus?: boolean\n placement: Placement\n canFlip?: boolean\n arrow?: boolean\n padding: number\n shrinkOverlay: boolean\n overlay: React.ReactNode\n overlayCloneProps: any\n wrapperProps: Record<string, unknown>\n referenceElement: HTMLElement | null\n}\n\nexport const TriggerOverlay = React.forwardRef<\n HTMLElement,\n TriggerOverlayProps\n>(function (\n {\n autoFocus,\n containFocus,\n restoreFocus,\n placement,\n canFlip,\n arrow,\n padding,\n shrinkOverlay,\n overlay,\n referenceElement,\n wrapperProps,\n overlayCloneProps,\n },\n ref\n) {\n const arrowRef = React.useRef<HTMLDivElement>(null)\n\n const arrowPadding = arrowSize / 2 + 1\n const middleware = [\n floatingOffset({ mainAxis: arrow ? padding + arrowPadding : padding }),\n canFlip ? floatingFlip() : null,\n floatingShift({ limiter: limitShift() }),\n !shrinkOverlay\n ? floatingSize({\n apply({ elements }) {\n Object.assign(elements.floating.style, {\n minWidth: `${elements.reference.getBoundingClientRect().width}px`,\n })\n },\n })\n : null,\n floatingArrow({\n element: arrowRef,\n padding: 6,\n }),\n ].filter((middleware) => middleware !== null) as OverlayMiddleware[]\n\n const {\n overlayStyle,\n referenceRef: referenceRefCallback,\n overlayRef,\n middlewareData,\n placement: currentPlacement,\n } = useOverlay({\n middleware,\n placement,\n })\n\n React.useEffect(() => {\n referenceRefCallback(referenceElement)\n }, [referenceElement, referenceRefCallback])\n\n const mergedRefs = mergeRefs(ref, overlayRef)\n\n // TODO could just move clone and clone props to parent\n if (!React.isValidElement(overlay) && overlayCloneProps) {\n console.warn(\n 'PLEASE REPORT ISSUE @procore/core-react: OverlayTrigger TriggerOverlay is not a valid React element but wants to clone \"overlay\" with props. Cannot pass props to the element.'\n )\n }\n\n return (\n <FocusScope\n autoFocus={autoFocus}\n contain={containFocus}\n restoreFocus={restoreFocus}\n >\n <div\n data-qa=\"core-overlay-trigger-overlay-wrapper\"\n ref={mergedRefs}\n style={overlayStyle}\n {...wrapperProps}\n >\n {React.isValidElement(overlay)\n ? React.cloneElement(overlay, overlayCloneProps)\n : overlay}\n {arrow && (\n <Arrow\n ref={arrowRef}\n arrow={middlewareData.arrow}\n placement={currentPlacement}\n />\n )}\n </div>\n </FocusScope>\n )\n})\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,SACEA,KAAK,IAAIC,aAAa,EACtBC,IAAI,IAAIC,YAAY,EACpBC,UAAU,EACVC,MAAM,IAAIC,cAAc,EACxBC,KAAK,IAAIC,aAAa,EACtBC,IAAI,IAAIC,YAAY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AA3BlH,SAAS;EAMXxD,KAAK,CAACiG,SAAS,CAAC,YAAM;IACpB2E,oBAAoB,CAACtF,gBAAgB,CAAC;EACxC,CAAC,EAAE,CAACA,gBAAgB,EAAEsF,oBAAoB,CAAC,CAAC;EAE5C,IAAMI,UAAU,GAAGnK,SAAS,CAACa,GAAG,EAAE2C,UAAU,CAAC;;EAE7C;EACA,IAAI,eAACrE,KAAK,CAACwH,cAAc,CAACpE,OAAO,CAAC,IAAIwF,iBAAiB,EAAE;IACvDjE,OAAO,CAACC,IAAI,CACV,gLACF,CAAC;EACH;EAEA,oBACE5E,KAAA,CAAAqB,aAAA,CAACvB,UAAU;IACTqC,SAAS,EAAEA,SAAU;IACrBuG,OAAO,EAAE7F,YAAa;IACtB8F,YAAY,EAAEA;EAAa,gBAE3B3I,KAAA,CAAAqB,aAAA,QAAA4J,QAAA;IACE,WAAQ,sCAAsC;IAC9CvJ,GAAG,EAAEsJ,UAAW;IAChBjC,KAAK,EAAE4B;EAAa,GAChBhD,YAAY,GAEf,aAAA3H,KAAK,CAACwH,cAAc,CAACpE,OAAO,CAAC,gBAC1BpD,KAAK,CAACkI,YAAY,CAAC9E,OAAO,EAAEwF,iBAAiB,CAAC,GAC9CxF,OAAO,EACVjE,KAAK,iBACJa,KAAA,CAAAqB,aAAA,CAACnB,KAAK;IACJwB,GAAG,EAAEgI,QAAS;IACdvK,KAAK,EAAE2L,cAAc,CAAC3L,KAAM;IAC5BqE,SAAS,EAAEuH;EAAiB,CAC7B,CAEA,CACK,CAAC;AAEjB,CAAC,CAAC"}
@@ -91,47 +91,47 @@ export declare function useLabelledPopup({ 'aria-describedby': ariaDescribedby,
91
91
  };
92
92
  popupProps: {
93
93
  'aria-activedescendant'?: string | undefined;
94
- 'aria-atomic'?: (boolean | "true" | "false") | undefined;
94
+ 'aria-atomic'?: boolean | "true" | "false" | undefined;
95
95
  'aria-autocomplete'?: "none" | "list" | "inline" | "both" | undefined;
96
- 'aria-busy'?: (boolean | "true" | "false") | undefined;
96
+ 'aria-busy'?: boolean | "true" | "false" | undefined;
97
97
  'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;
98
98
  'aria-colcount'?: number | undefined;
99
99
  'aria-colindex'?: number | undefined;
100
100
  'aria-colspan'?: number | undefined;
101
101
  'aria-controls'?: string | undefined;
102
- 'aria-current'?: boolean | "time" | "true" | "false" | "step" | "date" | "page" | "location" | undefined;
102
+ 'aria-current'?: boolean | "time" | "true" | "false" | "step" | "page" | "location" | "date" | undefined;
103
103
  'aria-describedby': string | undefined;
104
104
  'aria-details': string | undefined;
105
- 'aria-disabled'?: (boolean | "true" | "false") | undefined;
105
+ 'aria-disabled'?: boolean | "true" | "false" | undefined;
106
106
  'aria-dropeffect'?: "none" | "link" | "copy" | "execute" | "move" | "popup" | undefined;
107
107
  'aria-errormessage'?: string | undefined;
108
- 'aria-expanded'?: (boolean | "true" | "false") | undefined;
108
+ 'aria-expanded'?: boolean | "true" | "false" | undefined;
109
109
  'aria-flowto'?: string | undefined;
110
- 'aria-grabbed'?: (boolean | "true" | "false") | undefined;
111
- 'aria-haspopup'?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
112
- 'aria-hidden'?: (boolean | "true" | "false") | undefined;
110
+ 'aria-grabbed'?: boolean | "true" | "false" | undefined;
111
+ 'aria-haspopup'?: boolean | "dialog" | "menu" | "true" | "false" | "listbox" | "tree" | "grid" | undefined;
112
+ 'aria-hidden'?: boolean | "true" | "false" | undefined;
113
113
  'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
114
114
  'aria-keyshortcuts'?: string | undefined;
115
115
  'aria-label'?: string | undefined;
116
116
  'aria-labelledby'?: string | undefined;
117
117
  'aria-level'?: number | undefined;
118
118
  'aria-live'?: "off" | "assertive" | "polite" | undefined;
119
- 'aria-modal'?: (boolean | "true" | "false") | undefined;
120
- 'aria-multiline'?: (boolean | "true" | "false") | undefined;
121
- 'aria-multiselectable'?: (boolean | "true" | "false") | undefined;
119
+ 'aria-modal'?: boolean | "true" | "false" | undefined;
120
+ 'aria-multiline'?: boolean | "true" | "false" | undefined;
121
+ 'aria-multiselectable'?: boolean | "true" | "false" | undefined;
122
122
  'aria-orientation'?: "horizontal" | "vertical" | undefined;
123
123
  'aria-owns'?: string | undefined;
124
124
  'aria-placeholder'?: string | undefined;
125
125
  'aria-posinset'?: number | undefined;
126
126
  'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined;
127
- 'aria-readonly'?: (boolean | "true" | "false") | undefined;
127
+ 'aria-readonly'?: boolean | "true" | "false" | undefined;
128
128
  'aria-relevant'?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
129
- 'aria-required'?: (boolean | "true" | "false") | undefined;
129
+ 'aria-required'?: boolean | "true" | "false" | undefined;
130
130
  'aria-roledescription'?: string | undefined;
131
131
  'aria-rowcount'?: number | undefined;
132
132
  'aria-rowindex'?: number | undefined;
133
133
  'aria-rowspan'?: number | undefined;
134
- 'aria-selected'?: (boolean | "true" | "false") | undefined;
134
+ 'aria-selected'?: boolean | "true" | "false" | undefined;
135
135
  'aria-setsize'?: number | undefined;
136
136
  'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;
137
137
  'aria-valuemax'?: number | undefined;
@@ -1,2 +1,2 @@
1
1
  export { OverlayTrigger, useOverlayTriggerContext as UNSAFE_useOverlayTriggerContext, } from './OverlayTrigger';
2
- export { OverlayTriggerProps } from './OverlayTrigger.types';
2
+ export type { OverlayTriggerProps } from './OverlayTrigger.types';
@@ -1,3 +1,2 @@
1
1
  export { OverlayTrigger, useOverlayTriggerContext as UNSAFE_useOverlayTriggerContext } from './OverlayTrigger';
2
- export { OverlayTriggerProps } from './OverlayTrigger.types';
3
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["OverlayTrigger","useOverlayTriggerContext","UNSAFE_useOverlayTriggerContext","OverlayTriggerProps"],"sources":["../../src/OverlayTrigger/index.ts"],"sourcesContent":["export {\n OverlayTrigger,\n useOverlayTriggerContext as UNSAFE_useOverlayTriggerContext,\n} from './OverlayTrigger'\nexport { OverlayTriggerProps } from './OverlayTrigger.types'\n"],"mappings":"AAAA,SACEA,cAAc,EACdC,wBAAwB,IAAIC,+BAA+B,QACtD,kBAAkB;AACzB,SAASC,mBAAmB,QAAQ,wBAAwB"}
1
+ {"version":3,"file":"index.js","names":["OverlayTrigger","useOverlayTriggerContext","UNSAFE_useOverlayTriggerContext"],"sources":["../../src/OverlayTrigger/index.ts"],"sourcesContent":["export {\n OverlayTrigger,\n useOverlayTriggerContext as UNSAFE_useOverlayTriggerContext,\n} from './OverlayTrigger'\nexport type { OverlayTriggerProps } from './OverlayTrigger.types'\n"],"mappings":"AAAA,SACEA,cAAc,EACdC,wBAAwB,IAAIC,+BAA+B,QACtD,kBAAkB"}
@@ -5,7 +5,7 @@ var _excluded = ["gutterX"],
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
7
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
8
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return { value: void 0, done: !0 }; } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable || "" === iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } throw new TypeError(_typeof(iterable) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
9
9
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
10
10
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
11
11
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }