@procore/core-react 11.32.0 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (364) hide show
  1. package/README.md +7 -1
  2. package/dist/AnchorNavigation/AnchorNavigation.styles.js +3 -3
  3. package/dist/Avatar/Avatar.styles.js +5 -5
  4. package/dist/Avatar/Avatar.types.d.ts +1 -1
  5. package/dist/Avatar/Avatar.types.js.map +1 -1
  6. package/dist/AvatarStack/AvatarStack.styles.js +7 -7
  7. package/dist/Badge/Badge.styles.js +2 -2
  8. package/dist/Banner/Banner.d.ts +0 -5
  9. package/dist/Banner/Banner.js +11 -30
  10. package/dist/Banner/Banner.js.map +1 -1
  11. package/dist/Banner/Banner.styles.js +10 -20
  12. package/dist/Banner/Banner.styles.js.map +1 -1
  13. package/dist/Banner/Banner.types.d.ts +1 -5
  14. package/dist/Banner/Banner.types.js.map +1 -1
  15. package/dist/Banner/index.d.ts +1 -1
  16. package/dist/Banner/index.js +1 -1
  17. package/dist/Banner/index.js.map +1 -1
  18. package/dist/Box/Box.d.ts +4 -0
  19. package/dist/Box/Box.js +5 -0
  20. package/dist/Box/Box.js.map +1 -1
  21. package/dist/Box/Box.styles.js +1 -1
  22. package/dist/Breadcrumbs/Breadcrumbs.d.ts +38 -2
  23. package/dist/Breadcrumbs/Breadcrumbs.js +40 -2
  24. package/dist/Breadcrumbs/Breadcrumbs.js.map +1 -1
  25. package/dist/Breadcrumbs/Breadcrumbs.styles.js +4 -4
  26. package/dist/Breadcrumbs/Breadcrumbs.types.d.ts +14 -2
  27. package/dist/Breadcrumbs/Breadcrumbs.types.js +5 -0
  28. package/dist/Breadcrumbs/Breadcrumbs.types.js.map +1 -1
  29. package/dist/Button/Button.styles.js +5 -5
  30. package/dist/Calendar/Calendar.d.ts +126 -9
  31. package/dist/Calendar/Calendar.js +126 -9
  32. package/dist/Calendar/Calendar.js.map +1 -1
  33. package/dist/Calendar/Calendar.styles.js +8 -8
  34. package/dist/Calendar/Calendar.types.d.ts +11 -1
  35. package/dist/Calendar/Calendar.types.js.map +1 -1
  36. package/dist/Card/Card.styles.js +1 -1
  37. package/dist/Checkbox/Checkbox.js +3 -2
  38. package/dist/Checkbox/Checkbox.js.map +1 -1
  39. package/dist/Checkbox/Checkbox.styles.js +6 -6
  40. package/dist/Checkbox/CheckboxTooltip.d.ts +4 -0
  41. package/dist/Checkbox/CheckboxTooltip.js +26 -0
  42. package/dist/Checkbox/CheckboxTooltip.js.map +1 -0
  43. package/dist/ContactItem/ContactItem.styles.js +5 -5
  44. package/dist/Content/Content.styles.js +4 -4
  45. package/dist/Content/Content.styles.js.map +1 -1
  46. package/dist/DateInput/DateInput.styles.js +6 -6
  47. package/dist/DetailPage/DetailPage.styles.js +7 -7
  48. package/dist/Dropdown/Dropdown.d.ts +1 -2
  49. package/dist/Dropdown/Dropdown.js.map +1 -1
  50. package/dist/Dropdown/Dropdown.styles.js +3 -3
  51. package/dist/Dropdown/Dropdown.types.d.ts +2 -1
  52. package/dist/Dropdown/Dropdown.types.js.map +1 -1
  53. package/dist/Dropdown/index.d.ts +1 -1
  54. package/dist/Dropdown/index.js.map +1 -1
  55. package/dist/DropdownFlyout/DropdownFlyout.styles.js +4 -4
  56. package/dist/Dropzone/Dropzone.js +1 -1
  57. package/dist/Dropzone/Dropzone.styles.js +9 -9
  58. package/dist/EmptyState/EmptyState.styles.js +6 -6
  59. package/dist/Field/Field.styles.js +3 -3
  60. package/dist/FileList/FileList.styles.js +4 -4
  61. package/dist/FileSelect/FileExplorer/FileExplorer.styles.js +9 -9
  62. package/dist/FileSelect/FileExplorer/FileExplorerSidebar.styles.js +3 -3
  63. package/dist/FileSelect/FileSelect.styles.js +2 -2
  64. package/dist/FileSelect/FileSelectDropzone/FileSelectDropzone.styles.js +3 -3
  65. package/dist/FileSelect/FileTokenList/FileTokenList.styles.js +2 -2
  66. package/dist/FileSelect/GridSource/GridSource.styles.js +6 -6
  67. package/dist/FileSelect/LocalSource/LocalSource.styles.js +4 -4
  68. package/dist/FileSelect/SourceItem/SourceItem.styles.js +3 -3
  69. package/dist/FileSelect/ThumbnailList/ThumbnailList.styles.js +6 -6
  70. package/dist/FileSelect/ThumbnailList/index.d.ts +1 -0
  71. package/dist/FileSelect/ThumbnailList/index.js.map +1 -1
  72. package/dist/FileSelect/TreeSource/TreeSource.styles.js +1 -1
  73. package/dist/FileSelect/TreeSource/TreeSource.types.d.ts +1 -1
  74. package/dist/FileSelect/TreeSource/TreeSource.types.js.map +1 -1
  75. package/dist/FileSelect/index.d.ts +1 -1
  76. package/dist/FileSelect/index.js.map +1 -1
  77. package/dist/FileSelect/storyHelpers.d.ts +2 -2
  78. package/dist/FileSelect/storyHelpers.js.map +1 -1
  79. package/dist/FileToken/FileToken.styles.js +4 -4
  80. package/dist/FilterToken/FilterToken.styles.js +2 -2
  81. package/dist/Flex/Flex.d.ts +5 -0
  82. package/dist/Flex/Flex.js +5 -0
  83. package/dist/Flex/Flex.js.map +1 -1
  84. package/dist/FlexList/FlexList.d.ts +5 -0
  85. package/dist/FlexList/FlexList.js +6 -0
  86. package/dist/FlexList/FlexList.js.map +1 -1
  87. package/dist/FlexList/FlexList.styles.js +1 -1
  88. package/dist/Form/Form.d.ts +6 -1
  89. package/dist/Form/Form.js +10 -4
  90. package/dist/Form/Form.js.map +1 -1
  91. package/dist/Form/Form.styles.d.ts +1 -5
  92. package/dist/Form/Form.styles.js +20 -33
  93. package/dist/Form/Form.styles.js.map +1 -1
  94. package/dist/Form/Form.types.d.ts +38 -10
  95. package/dist/Form/Form.types.js.map +1 -1
  96. package/dist/Form/StyledFormikForm.styles.d.ts +6 -0
  97. package/dist/Form/StyledFormikForm.styles.js +17 -0
  98. package/dist/Form/StyledFormikForm.styles.js.map +1 -0
  99. package/dist/Form/index.d.ts +3 -2
  100. package/dist/Form/index.js +2 -1
  101. package/dist/Form/index.js.map +1 -1
  102. package/dist/Grid/Grid.styles.js +2 -2
  103. package/dist/GroupSelect/GroupSelect.styles.js +1 -1
  104. package/dist/Input/Input.styles.js +1 -1
  105. package/dist/Input/Input.types.d.ts +1 -0
  106. package/dist/Input/Input.types.js.map +1 -1
  107. package/dist/Link/Link.styles.js +1 -1
  108. package/dist/ListPage/ListPage.styles.js +8 -8
  109. package/dist/ListPage/ListPage.types.d.ts +1 -0
  110. package/dist/ListPage/ListPage.types.js.map +1 -1
  111. package/dist/Loader/Loader.styles.js +2 -2
  112. package/dist/Menu/index.d.ts +1 -1
  113. package/dist/Menu/index.js.map +1 -1
  114. package/dist/MenuImperative/MenuImperative.styles.js +10 -10
  115. package/dist/Modal/Modal.js +1 -1
  116. package/dist/Modal/Modal.js.map +1 -1
  117. package/dist/Modal/Modal.styles.js +13 -13
  118. package/dist/MultiSelect/MultiSelect.js.map +1 -1
  119. package/dist/MultiSelect/MultiSelect.styles.js +6 -6
  120. package/dist/MultiSelect/MultiSelect.types.d.ts +4 -4
  121. package/dist/MultiSelect/MultiSelect.types.js.map +1 -1
  122. package/dist/MultiSelect/index.d.ts +1 -1
  123. package/dist/MultiSelect/index.js.map +1 -1
  124. package/dist/NextMenu/NextMenu.styles.js +3 -3
  125. package/dist/Notation/Notation.d.ts +1 -0
  126. package/dist/Notation/Notation.js +2 -1
  127. package/dist/Notation/Notation.js.map +1 -1
  128. package/dist/NumberInput/NumberInput.js +2 -3
  129. package/dist/NumberInput/NumberInput.js.map +1 -1
  130. package/dist/NumberInput/NumberInput.styles.js +7 -7
  131. package/dist/NumberInput/NumberInput.types.d.ts +15 -11
  132. package/dist/NumberInput/NumberInput.types.js.map +1 -1
  133. package/dist/NumberInput/index.d.ts +1 -1
  134. package/dist/NumberInput/index.js.map +1 -1
  135. package/dist/Overlay/OverlayArrow.styles.js +1 -1
  136. package/dist/OverlayTrigger/OverlayTrigger.js +0 -4
  137. package/dist/OverlayTrigger/OverlayTrigger.js.map +1 -1
  138. package/dist/PageLayout/PageLayout.d.ts +53 -0
  139. package/dist/PageLayout/PageLayout.js +63 -8
  140. package/dist/PageLayout/PageLayout.js.map +1 -1
  141. package/dist/PageLayout/PageLayout.styles.d.ts +1 -4
  142. package/dist/PageLayout/PageLayout.styles.js +26 -27
  143. package/dist/PageLayout/PageLayout.styles.js.map +1 -1
  144. package/dist/Pagination/Pagination.styles.js +5 -5
  145. package/dist/Pagination/index.d.ts +1 -1
  146. package/dist/Pagination/index.js.map +1 -1
  147. package/dist/Panel/Panel.styles.js +11 -11
  148. package/dist/Pill/Pill.styles.js +2 -2
  149. package/dist/PillSelect/PillSelect.styles.js +4 -4
  150. package/dist/PillSelect/index.d.ts +1 -1
  151. package/dist/PillSelect/index.js.map +1 -1
  152. package/dist/Popover/Popover.styles.js +2 -2
  153. package/dist/Portal/Portal.styles.js +1 -1
  154. package/dist/ProgressBar/ProgressBar.styles.js +2 -2
  155. package/dist/RadioButton/RadioButton.styles.js +3 -3
  156. package/dist/Required/Required.styles.js +3 -3
  157. package/dist/Search/Search.styles.js +5 -5
  158. package/dist/Section/Section.styles.js +6 -6
  159. package/dist/SegmentedController/SegmentedController.styles.js +4 -4
  160. package/dist/SegmentedController/SegmentedController.types.d.ts +2 -0
  161. package/dist/SegmentedController/SegmentedController.types.js +1 -0
  162. package/dist/SegmentedController/SegmentedController.types.js.map +1 -1
  163. package/dist/Select/Select.styles.js +7 -7
  164. package/dist/Semantic/Semantic.styles.js +9 -9
  165. package/dist/Slider/Slider.styles.js +5 -5
  166. package/dist/Spinner/Spinner.styles.js +7 -7
  167. package/dist/Spinner/Spinner.types.d.ts +1 -0
  168. package/dist/Spinner/Spinner.types.js.map +1 -1
  169. package/dist/SuperSelect/SuperSelect.presets.styles.js +1 -1
  170. package/dist/SuperSelect/SuperSelect.styles.js +37 -37
  171. package/dist/SuperSelect/index.d.ts +1 -1
  172. package/dist/SuperSelect/index.js.map +1 -1
  173. package/dist/Switch/Switch.styles.js +4 -4
  174. package/dist/Table/Table.d.ts +5 -5
  175. package/dist/Table/Table.js.map +1 -1
  176. package/dist/Table/Table.styles.js +28 -28
  177. package/dist/Table/Table.types.d.ts +2 -2
  178. package/dist/Table/Table.types.js.map +1 -1
  179. package/dist/Table/index.d.ts +1 -1
  180. package/dist/Table/index.js.map +1 -1
  181. package/dist/TableShelf/TableShelf.styles.js +5 -5
  182. package/dist/Tabs/Tabs.styles.js +8 -8
  183. package/dist/Tabs/Tabs.types.d.ts +3 -0
  184. package/dist/Tabs/Tabs.types.js.map +1 -1
  185. package/dist/Tearsheet/Tearsheet.js +1 -1
  186. package/dist/Tearsheet/Tearsheet.js.map +1 -1
  187. package/dist/Tearsheet/Tearsheet.styles.js +5 -5
  188. package/dist/TextArea/TextArea.styles.js +1 -1
  189. package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
  190. package/dist/Thumbnail/Thumbnail.styles.js +17 -17
  191. package/dist/ThumbnailGrid/ThumbnailGrid.styles.js +7 -7
  192. package/dist/TieredSelect/TieredSelect.styles.js +9 -9
  193. package/dist/TieredSelect/index.d.ts +1 -1
  194. package/dist/TieredSelect/index.js.map +1 -1
  195. package/dist/Tile/Tile.styles.js +10 -10
  196. package/dist/Tile/Tile.styles.js.map +1 -1
  197. package/dist/Title/Title.styles.js +7 -7
  198. package/dist/Toast/Toast.styles.js +3 -3
  199. package/dist/Toast/index.d.ts +1 -1
  200. package/dist/Toast/index.js.map +1 -1
  201. package/dist/ToggleButton/ToggleButton.styles.js +1 -1
  202. package/dist/Token/Token.styles.js +3 -3
  203. package/dist/ToolHeader/ToolHeader.styles.js +6 -6
  204. package/dist/Tooltip/Tooltip.styles.js +2 -2
  205. package/dist/Tree/Tree.js.map +1 -1
  206. package/dist/Tree/Tree.styles.js +9 -9
  207. package/dist/Tree/Tree.types.d.ts +1 -1
  208. package/dist/Tree/Tree.types.js.map +1 -1
  209. package/dist/Tree/index.d.ts +1 -1
  210. package/dist/Tree/index.js.map +1 -1
  211. package/dist/Typeahead/Typeahead.styles.js +3 -3
  212. package/dist/Typography/Typography.js +4 -2
  213. package/dist/Typography/Typography.js.map +1 -1
  214. package/dist/Typography/Typography.styles.js +6 -3
  215. package/dist/Typography/Typography.styles.js.map +1 -1
  216. package/dist/Typography/Typography.table.story.js +2 -2
  217. package/dist/Typography/Typography.types.d.ts +15 -23
  218. package/dist/Typography/Typography.types.js.map +1 -1
  219. package/dist/Typography/index.d.ts +1 -1
  220. package/dist/Typography/index.js +1 -1
  221. package/dist/Typography/index.js.map +1 -1
  222. package/dist/_hooks/Anchor.d.ts +0 -15
  223. package/dist/_hooks/Anchor.js +1 -29
  224. package/dist/_hooks/Anchor.js.map +1 -1
  225. package/dist/_hooks/Buffer.d.ts +0 -19
  226. package/dist/_hooks/Buffer.js +1 -41
  227. package/dist/_hooks/Buffer.js.map +1 -1
  228. package/dist/_hooks/DateTime/index.d.ts +1 -1
  229. package/dist/_hooks/DateTime/index.js +1 -1
  230. package/dist/_hooks/DateTime/index.js.map +1 -1
  231. package/dist/_hooks/InjectedScript.d.ts +0 -18
  232. package/dist/_hooks/InjectedScript.js +1 -39
  233. package/dist/_hooks/InjectedScript.js.map +1 -1
  234. package/dist/_hooks/ListNavigation.d.ts +0 -35
  235. package/dist/_hooks/ListNavigation.js +1 -53
  236. package/dist/_hooks/ListNavigation.js.map +1 -1
  237. package/dist/_hooks/ResizeObserver.js +1 -5
  238. package/dist/_hooks/ResizeObserver.js.map +1 -1
  239. package/dist/_hooks/TextEntry.d.ts +1 -29
  240. package/dist/_hooks/TextEntry.js +1 -42
  241. package/dist/_hooks/TextEntry.js.map +1 -1
  242. package/dist/_hooks/Timer.d.ts +0 -19
  243. package/dist/_hooks/Timer.js +0 -38
  244. package/dist/_hooks/Timer.js.map +1 -1
  245. package/dist/_hooks/Trigger.d.ts +0 -20
  246. package/dist/_hooks/Trigger.js +1 -47
  247. package/dist/_hooks/Trigger.js.map +1 -1
  248. package/dist/_hooks/Visibility.d.ts +0 -18
  249. package/dist/_hooks/Visibility.js +1 -41
  250. package/dist/_hooks/Visibility.js.map +1 -1
  251. package/dist/_typedoc/Avatar/Avatar.types.json +22 -22
  252. package/dist/_typedoc/AvatarStack/AvatarStack.types.json +23 -23
  253. package/dist/_typedoc/Badge/Badge.types.json +6 -6
  254. package/dist/_typedoc/Banner/Banner.types.json +16 -16
  255. package/dist/_typedoc/Box/Box.types.json +68 -68
  256. package/dist/_typedoc/Breadcrumbs/Breadcrumbs.types.json +16 -14
  257. package/dist/_typedoc/Button/Button.types.json +12 -12
  258. package/dist/_typedoc/Calendar/Calendar.json +68 -0
  259. package/dist/_typedoc/Calendar/Calendar.types.json +84 -82
  260. package/dist/_typedoc/Card/Card.types.json +6 -6
  261. package/dist/_typedoc/Checkbox/Checkbox.types.json +9 -9
  262. package/dist/_typedoc/ContactItem/ContactItem.types.json +9 -9
  263. package/dist/_typedoc/DateInput/DateInput.types.json +35 -35
  264. package/dist/_typedoc/DateSelect/DateSelect.types.json +13 -13
  265. package/dist/_typedoc/DetailPage/DetailPage.types.json +4 -4
  266. package/dist/_typedoc/Dropdown/Dropdown.types.json +37 -37
  267. package/dist/_typedoc/DropdownFlyout/DropdownFlyout.types.json +34 -29
  268. package/dist/_typedoc/Dropzone/Dropzone.types.json +51 -41
  269. package/dist/_typedoc/EmptyState/EmptyState.types.json +14 -14
  270. package/dist/_typedoc/FileList/FileList.types.json +9 -9
  271. package/dist/_typedoc/FileSelect/FileSelect.json +19 -0
  272. package/dist/_typedoc/FileSelect/FileSelect.types.json +26 -26
  273. package/dist/_typedoc/FileSelect/GridSource/GridSource.types.json +20 -20
  274. package/dist/_typedoc/FileSelect/LocalSource/LocalSource.types.json +14 -14
  275. package/dist/_typedoc/FileSelect/TreeSource/TreeSource.types.json +11 -11
  276. package/dist/_typedoc/Flex/Flex.types.json +27 -27
  277. package/dist/_typedoc/FlexList/FlexList.types.json +30 -30
  278. package/dist/_typedoc/Form/Form.types.json +787 -793
  279. package/dist/_typedoc/Grid/Grid.types.json +8 -8
  280. package/dist/_typedoc/GroupSelect/GroupSelect.types.json +53 -53
  281. package/dist/_typedoc/Input/Input.types.json +4 -3
  282. package/dist/_typedoc/Link/Link.types.json +4 -4
  283. package/dist/_typedoc/ListPage/ListPage.types.json +15 -14
  284. package/dist/_typedoc/Menu/Menu.types.json +62 -62
  285. package/dist/_typedoc/MenuImperative/MenuImperative.types.json +74 -74
  286. package/dist/_typedoc/Modal/Modal.types.json +41 -41
  287. package/dist/_typedoc/MultiSelect/MultiSelect.types.json +32 -32
  288. package/dist/_typedoc/Notation/Notation.json +9 -0
  289. package/dist/_typedoc/Notation/Notation.types.json +9 -4
  290. package/dist/_typedoc/NumberInput/NumberInput.types.json +71 -88
  291. package/dist/_typedoc/OverlayTrigger/OverlayTrigger.types.json +31 -31
  292. package/dist/_typedoc/PageLayout/PageLayout.json +36 -0
  293. package/dist/_typedoc/PageLayout/PageLayout.types.json +26 -26
  294. package/dist/_typedoc/Pagination/Pagination.types.json +7 -7
  295. package/dist/_typedoc/Panel/Panel.types.json +27 -27
  296. package/dist/_typedoc/Pill/Pill.types.json +2 -2
  297. package/dist/_typedoc/PillSelect/PillSelect.types.json +47 -47
  298. package/dist/_typedoc/Popover/Popover.types.json +14 -14
  299. package/dist/_typedoc/ProgressBar/ProgressBar.types.json +6 -6
  300. package/dist/_typedoc/RadioButton/RadioButton.types.json +6 -6
  301. package/dist/_typedoc/Required/Required.types.json +5 -5
  302. package/dist/_typedoc/Search/Search.types.json +20 -19
  303. package/dist/_typedoc/Section/Section.types.json +14 -14
  304. package/dist/_typedoc/SegmentedController/SegmentedController.types.json +29 -21
  305. package/dist/_typedoc/Select/Select.types.json +57 -57
  306. package/dist/_typedoc/Slider/Slider.types.json +6 -6
  307. package/dist/_typedoc/Spinner/Spinner.types.json +11 -10
  308. package/dist/_typedoc/Switch/Switch.types.json +3 -3
  309. package/dist/_typedoc/Table/Table.types.json +101 -100
  310. package/dist/_typedoc/Tabs/Tabs.types.json +23 -20
  311. package/dist/_typedoc/Tearsheet/Tearsheet.types.json +16 -16
  312. package/dist/_typedoc/TextArea/TextArea.types.json +3 -3
  313. package/dist/_typedoc/TextEditor/TextEditor.types.json +9 -9
  314. package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +4 -4
  315. package/dist/_typedoc/Thumbnail/Thumbnail.types.json +19 -19
  316. package/dist/_typedoc/TieredDropdown/TieredDropdown.types.json +42 -42
  317. package/dist/_typedoc/TieredSelect/TieredSelect.types.json +28 -28
  318. package/dist/_typedoc/Tile/Tile.types.json +30 -30
  319. package/dist/_typedoc/Title/Title.types.json +1 -1
  320. package/dist/_typedoc/Toast/Toast.types.json +4 -4
  321. package/dist/_typedoc/ToggleButton/ToggleButton.types.json +3 -3
  322. package/dist/_typedoc/Token/Token.types.json +4 -4
  323. package/dist/_typedoc/ToolHeader/ToolHeader.types.json +10 -10
  324. package/dist/_typedoc/Tooltip/Tooltip.types.json +13 -13
  325. package/dist/_typedoc/Tree/Tree.types.json +128 -128
  326. package/dist/_typedoc/Typeahead/Typeahead.types.json +2 -2
  327. package/dist/_typedoc/Typography/Typography.types.json +24 -14
  328. package/dist/_typedoc/_utils/types.json +3 -3
  329. package/dist/_typedoc/deprecations.json +1 -1
  330. package/dist/_utils/closeWithConfirm.js.map +1 -0
  331. package/dist/_utils/propsTypedoc.d.ts +5 -1
  332. package/dist/_utils/propsTypedoc.js +4 -0
  333. package/dist/_utils/propsTypedoc.js.map +1 -1
  334. package/dist/index.d.ts +1 -5
  335. package/dist/index.js +4 -9
  336. package/dist/index.js.map +1 -1
  337. package/package.json +15 -5
  338. package/dist/Form/closeWithConfirm.js.map +0 -1
  339. package/dist/Sidebar/Sidebar.d.ts +0 -50
  340. package/dist/Sidebar/Sidebar.js +0 -117
  341. package/dist/Sidebar/Sidebar.js.map +0 -1
  342. package/dist/Sidebar/Sidebar.styles.d.ts +0 -9
  343. package/dist/Sidebar/Sidebar.styles.js +0 -38
  344. package/dist/Sidebar/Sidebar.styles.js.map +0 -1
  345. package/dist/Sidebar/index.d.ts +0 -1
  346. package/dist/Sidebar/index.js +0 -2
  347. package/dist/Sidebar/index.js.map +0 -1
  348. package/dist/_hooks/Analytics.d.ts +0 -36
  349. package/dist/_hooks/Analytics.js +0 -54
  350. package/dist/_hooks/Analytics.js.map +0 -1
  351. package/dist/_hooks/Autofocus.d.ts +0 -32
  352. package/dist/_hooks/Autofocus.js +0 -70
  353. package/dist/_hooks/Autofocus.js.map +0 -1
  354. package/dist/_hooks/BoundingRect.d.ts +0 -41
  355. package/dist/_hooks/BoundingRect.js +0 -90
  356. package/dist/_hooks/BoundingRect.js.map +0 -1
  357. package/dist/_hooks/Event.d.ts +0 -42
  358. package/dist/_hooks/Event.js +0 -83
  359. package/dist/_hooks/Event.js.map +0 -1
  360. package/dist/_utils/genericAnalyticsClient.d.ts +0 -25
  361. package/dist/_utils/genericAnalyticsClient.js +0 -46
  362. package/dist/_utils/genericAnalyticsClient.js.map +0 -1
  363. /package/dist/{Form → _utils}/closeWithConfirm.d.ts +0 -0
  364. /package/dist/{Form → _utils}/closeWithConfirm.js +0 -0
@@ -1,9 +1,5 @@
1
- import React from 'react';
2
1
  interface TimerConfig {
3
2
  }
4
- interface Props {
5
- children: React.ReactNode;
6
- }
7
3
  declare type TimerId = number | null;
8
4
  /**
9
5
  * @deprecatedSince 9
@@ -27,19 +23,4 @@ export declare function useTimer(config: TimerConfig): TimerApi;
27
23
  export declare function Timer({ children, }: {
28
24
  children: (timer: TimerApi) => unknown;
29
25
  }): unknown;
30
- /**
31
- * @deprecatedSince 9
32
- * @deprecated Never officially documented/supported
33
- */
34
- export declare const TimerContext: React.Context<TimerApi>;
35
- /**
36
- * @deprecatedSince 9
37
- * @deprecated Never officially documented/supported
38
- */
39
- export declare function TimerProvider({ children }: Props): React.JSX.Element;
40
- /**
41
- * @deprecatedSince 9
42
- * @deprecated Never officially documented/supported
43
- */
44
- export declare function useTimerContext(): TimerApi;
45
26
  export {};
@@ -40,42 +40,4 @@ export function Timer(_ref) {
40
40
  var timer = useTimer({});
41
41
  return typeof children === 'function' ? children(timer) : children;
42
42
  }
43
-
44
- /* CONTEXT */
45
-
46
- var noop = function noop(method) {
47
- return function () {
48
- return console.warn("Could not call `".concat(method, "`, please wrap your component in a `<TimerProvider>`"));
49
- };
50
- };
51
-
52
- /**
53
- * @deprecatedSince 9
54
- * @deprecated Never officially documented/supported
55
- */
56
- export var TimerContext = /*#__PURE__*/React.createContext({
57
- cancel: noop('cancel'),
58
- reset: noop('reset'),
59
- setTimer: noop('setTimer'),
60
- timerId: null
61
- });
62
-
63
- /**
64
- * @deprecatedSince 9
65
- * @deprecated Never officially documented/supported
66
- */
67
- export function TimerProvider(_ref2) {
68
- var children = _ref2.children;
69
- return /*#__PURE__*/React.createElement(TimerContext.Provider, {
70
- value: useTimer({})
71
- }, children);
72
- }
73
-
74
- /**
75
- * @deprecatedSince 9
76
- * @deprecated Never officially documented/supported
77
- */
78
- export function useTimerContext() {
79
- return React.useContext(TimerContext);
80
- }
81
43
  //# sourceMappingURL=Timer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Timer.js","names":["React","useTimer","config","timer","useRef","cancel","current","clearTimeout","reset","setTimer","callback","duration","window","setTimeout","timerId","Timer","_ref","children","noop","method","console","warn","concat","TimerContext","createContext","TimerProvider","_ref2","createElement","Provider","value","useTimerContext","useContext"],"sources":["../../src/_hooks/Timer.tsx"],"sourcesContent":["import React from 'react'\n\n/* TYPES */\n\ninterface TimerConfig {}\n\ninterface Props {\n children: React.ReactNode\n}\n\ntype TimerId = number | null\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TimerApi {\n cancel: () => void\n reset: () => void\n setTimer: (callback: () => void, duration: number) => void\n timerId: TimerId\n}\n\n/* HOOK */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useTimer(config: TimerConfig): TimerApi {\n const timer = React.useRef<TimerId>(null)\n\n return {\n cancel: () => {\n timer.current && clearTimeout(timer.current)\n },\n reset: () => {\n timer.current && clearTimeout(timer.current)\n },\n setTimer: (callback, duration) => {\n timer.current && clearTimeout(timer.current)\n timer.current = window.setTimeout(callback, duration)\n },\n timerId: timer.current,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function Timer({\n children,\n}: {\n children: (timer: TimerApi) => unknown\n}) {\n const timer = useTimer({})\n\n return typeof children === 'function' ? children(timer) : children\n}\n\n/* CONTEXT */\n\nconst noop = (method: string) => () =>\n console.warn(\n `Could not call \\`${method}\\`, please wrap your component in a \\`<TimerProvider>\\``\n )\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport const TimerContext = React.createContext<TimerApi>({\n cancel: noop('cancel'),\n reset: noop('reset'),\n setTimer: noop('setTimer'),\n timerId: null,\n})\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function TimerProvider({ children }: Props) {\n return (\n <TimerContext.Provider value={useTimer({})}>\n {children}\n </TimerContext.Provider>\n )\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useTimerContext() {\n return React.useContext(TimerContext)\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;;AAUA;AACA;AACA;AACA;;AAQA;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,QAAQA,CAACC,MAAmB,EAAY;EACtD,IAAMC,KAAK,GAAGH,KAAK,CAACI,MAAM,CAAU,IAAI,CAAC;EAEzC,OAAO;IACLC,MAAM,EAAE,SAAAA,OAAA,EAAM;MACZF,KAAK,CAACG,OAAO,IAAIC,YAAY,CAACJ,KAAK,CAACG,OAAO,CAAC;IAC9C,CAAC;IACDE,KAAK,EAAE,SAAAA,MAAA,EAAM;MACXL,KAAK,CAACG,OAAO,IAAIC,YAAY,CAACJ,KAAK,CAACG,OAAO,CAAC;IAC9C,CAAC;IACDG,QAAQ,EAAE,SAAAA,SAACC,QAAQ,EAAEC,QAAQ,EAAK;MAChCR,KAAK,CAACG,OAAO,IAAIC,YA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ACvC"}
1
+ {"version":3,"file":"Timer.js","names":["React","useTimer","config","timer","useRef","cancel","current","clearTimeout","reset","setTimer","callback","duration","window","setTimeout","timerId","Timer","_ref","children"],"sources":["../../src/_hooks/Timer.tsx"],"sourcesContent":["import React from 'react'\n\n/* TYPES */\n\ninterface TimerConfig {}\n\ninterface Props {\n children: React.ReactNode\n}\n\ntype TimerId = number | null\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TimerApi {\n cancel: () => void\n reset: () => void\n setTimer: (callback: () => void, duration: number) => void\n timerId: TimerId\n}\n\n/* HOOK */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useTimer(config: TimerConfig): TimerApi {\n const timer = React.useRef<TimerId>(null)\n\n return {\n cancel: () => {\n timer.current && clearTimeout(timer.current)\n },\n reset: () => {\n timer.current && clearTimeout(timer.current)\n },\n setTimer: (callback, duration) => {\n timer.current && clearTimeout(timer.current)\n timer.current = window.setTimeout(callback, duration)\n },\n timerId: timer.current,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function Timer({\n children,\n}: {\n children: (timer: TimerApi) => unknown\n}) {\n const timer = useTimer({})\n\n return typeof children === 'function' ? children(timer) : children\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;;AAUA;AACA;AACA;AACA;;AAQA;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,QAAQA,CAACC,MAAmB,EAAY;EACtD,IAAMC,KAAK,GAAGH,KAAK,CAACI,MAAM,CAAU,IAAI,CAAC;EAEzC,OAAO;IACLC,MAAM,EAAE,SAAAA,OAAA,EAAM;MACZF,KAAK,CAACG,OAAO,IAAIC,YAAY,CAACJ,KAAK,CAACG,OAAO,CAAC;IAC9C,CAAC;IACDE,KAAK,EAAE,SAAAA,MAAA,EAAM;MACXL,KAAK,CAACG,OAAO,IAAIC,YAAY,CAACJ,KAAK,CAACG,OAAO,CAAC;IAC9C,CAAC;IACDG,QAAQ,EAAE,SAAAA,SAACC,QAAQ,EAAEC,QAAQ,EAAK;MAChCR,KAAK,CAACG,OAAO,IAAIC,YAAY,CAACJ,KAAK,CAACG,OAAO,CAAC;MAC5CH,KAAK,CAACG,OAAO,GAAGM,MAAM,CAACC,UAAU,CAACH,QAAQ,EAAEC,QAAQ,CAAC;IACvD,CAAC;IACDG,OAAO,EAAEX,KAAK,CAACG;EACjB,CAAC;AACH;;AAEA;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASS,KAAKA,CAAAC,IAAA,EAIlB;EAAA,IAHDC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;EAIR,IAAMd,KAAK,GAAGF,QAAQ,CAAC,CAAC,CAAC,CAAC;EAE1B,OAAO,OAAOgB,QAAQ,KAAK,UAAU,GAAGA,QAAQ,CAACd,KAAK,CAAC,GAAGc,QAAQ;AACpE"}
@@ -51,23 +51,3 @@ export declare function useTrigger({ disable, disableKeys, enable, enableKeys, i
51
51
  * @deprecated Never officially documented/supported
52
52
  */
53
53
  export declare function Trigger({ children, triggerRef, ...props }: TriggerRenderProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
54
- /**
55
- * @deprecatedSince 9
56
- * @deprecated Never officially documented/supported
57
- */
58
- export declare const initTrigger: TriggerApi;
59
- /**
60
- * @deprecatedSince 9
61
- * @deprecated Never officially documented/supported
62
- */
63
- export declare const TriggerContext: React.Context<TriggerApi>;
64
- /**
65
- * @deprecatedSince 9
66
- * @deprecated Never officially documented/supported
67
- */
68
- export declare function TriggerProvider({ children, ...props }: TriggerProps): React.JSX.Element;
69
- /**
70
- * @deprecatedSince 9
71
- * @deprecated Never officially documented/supported
72
- */
73
- export declare function useTriggerContext(): TriggerApi;
@@ -1,6 +1,5 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- var _excluded = ["children", "triggerRef"],
3
- _excluded2 = ["children"];
2
+ var _excluded = ["children", "triggerRef"];
4
3
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
4
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
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; }
@@ -111,49 +110,4 @@ export function Trigger(_ref2) {
111
110
  open: trigger.isVisible
112
111
  });
113
112
  }
114
-
115
- /* CONTEXT */
116
-
117
- var noop = function noop(method) {
118
- return function () {
119
- return console.warn("Could not call `".concat(method, "`, please wrap your component in an `<TriggerProvider>`"));
120
- };
121
- };
122
-
123
- /**
124
- * @deprecatedSince 9
125
- * @deprecated Never officially documented/supported
126
- */
127
- export var initTrigger = {
128
- disable: noop('disable'),
129
- enable: noop('enable'),
130
- isVisible: false,
131
- toggle: noop('toggle')
132
- };
133
-
134
- /**
135
- * @deprecatedSince 9
136
- * @deprecated Never officially documented/supported
137
- */
138
- export var TriggerContext = /*#__PURE__*/React.createContext(initTrigger);
139
-
140
- /**
141
- * @deprecatedSince 9
142
- * @deprecated Never officially documented/supported
143
- */
144
- export function TriggerProvider(_ref3) {
145
- var children = _ref3.children,
146
- props = _objectWithoutProperties(_ref3, _excluded2);
147
- return /*#__PURE__*/React.createElement(TriggerContext.Provider, {
148
- value: useTrigger(props)
149
- }, children);
150
- }
151
-
152
- /**
153
- * @deprecatedSince 9
154
- * @deprecated Never officially documented/supported
155
- */
156
- export function useTriggerContext() {
157
- return React.useContext(TriggerContext);
158
- }
159
113
  //# sourceMappingURL=Trigger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Trigger.js","names":["React","triggerListeners","useHotkey","useTrigger","_ref","disable","_ref$disableKeys","disableKeys","enable","_ref$enableKeys","enableKeys","_ref$isEnabled","isEnabled","_ref$trigger","trigger","triggerRef","off","on","scope","value","key","handler","preventDefault","event","concat","_toConsumableArray","isVisible","toggle","Trigger","_ref2","children","props","_objectWithoutProperties","_excluded","_objectSpread","element","cloneElement","open","noop","method","console","warn","initTrigger","TriggerContext","createContext","TriggerProvider","_ref3","_excluded2","createElement","Provider","useTriggerContext","useContext"],"sources":["../../src/_hooks/Trigger.tsx"],"sourcesContent":["import React from 'react'\nimport { triggerListeners } from '../_utils/triggerListeners'\nimport type { RenderProp } from '../_utils/types'\nimport { useHotkey } from './Hotkey'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport type TriggerVariant =\n | 'click'\n | 'hover'\n | 'none'\n | 'contextmenu'\n | 'focus'\n | 'always'\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerConfig {\n disable: React.EventHandler<any>\n disableKeys?: string[]\n enable: React.EventHandler<any>\n enableKeys?: string[]\n isEnabled?: boolean\n trigger?: TriggerVariant | TriggerVariant[]\n triggerRef: React.RefObject<HTMLElement>\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerProps extends TriggerConfig {\n children: React.ReactNode\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerRenderProps\n extends TriggerConfig,\n RenderProp<TriggerApi> {}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerApi {\n disable: React.EventHandler<any>\n enable: React.EventHandler<any>\n isVisible: boolean\n toggle: React.EventHandler<any>\n}\n\n/* HOOK */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useTrigger({\n disable,\n disableKeys = [],\n enable,\n enableKeys = [],\n isEnabled = false,\n trigger = 'click',\n triggerRef,\n}: TriggerConfig): TriggerApi {\n triggerListeners({\n off: disable,\n on: enable,\n scope: triggerRef,\n trigger,\n value: isEnabled,\n })\n\n useHotkey({\n key: enableKeys,\n handler: enable,\n preventDefault: true,\n scope: triggerRef,\n })\n\n useHotkey({\n key: disableKeys,\n handler: disable,\n preventDefault: true,\n scope: triggerRef,\n })\n\n // prevent keyup event from firing on FF\n useHotkey({\n event: 'keyup',\n key: [...enableKeys, ...disableKeys],\n handler: () => {},\n preventDefault: true,\n scope: triggerRef,\n })\n\n return {\n disable,\n enable,\n isVisible: isEnabled,\n toggle: isEnabled ? disable : enable,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function Trigger({\n children,\n triggerRef,\n ...props\n}: TriggerRenderProps) {\n const trigger = useTrigger({ ...props, triggerRef })\n\n const element =\n typeof children === 'function'\n ? (children as (props: TriggerApi) => React.ReactElement)(trigger)\n : (children as React.ReactElement)\n\n return React.cloneElement(element, {\n open: trigger.isVisible,\n })\n}\n\n/* CONTEXT */\n\nconst noop: (method: string) => React.EventHandler<any> = (method) => () =>\n console.warn(\n `Could not call \\`${method}\\`, please wrap your component in an \\`<TriggerProvider>\\``\n )\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport const initTrigger: TriggerApi = {\n disable: noop('disable'),\n enable: noop('enable'),\n isVisible: false,\n toggle: noop('toggle'),\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport const TriggerContext = React.createContext(initTrigger)\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function TriggerProvider({ children, ...props }: TriggerProps) {\n return (\n <TriggerContext.Provider value={useTrigger(props)}>\n {children}\n </TriggerContext.Provider>\n )\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useTriggerContext() {\n return React.useContext(TriggerContext)\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,QAAQ,4BAA4B;AAE7D,SAASC,SAAS,QAAQ,UAAU;;AAEpC;;AAEA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AAWA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AAQA;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAAAC,IAAA,EAQI;EAAA,IAP5BC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IAAAC,gBAAA,GAAAF,IAAA,CACPG,WAAW;IAAXA,WAAW,GAAAD,gBAAA,cAAG,EAAE,GAAAA,gBAAA;IAChBE,MAAM,GAAAJ,IAAA,CAANI,MAAM;IAAAC,eAAA,GAAAL,IAAA,CACNM,UAAU;IAAVA,UAAU,GAAAD,eAAA,cAAG,EAAE,GAAAA,eAAA;IAAAE,cAAA,GAAAP,IAAA,CACfQ,SAAS;IAATA,SAAS,GAAAD,cAAA,cAAG,KAAK,GAAAA,cAAA;IAAAE,YAAA,GAAAT,IAAA,CACjBU,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,OAAO,GAAAA,YAAA;IACjBE,UAAU,GAAAX,IAAA,CAAVW,UAAU;EAEVd,gBAAgB,CAAC;IACfe,GAAG,EAAEX,OAAO;IACZY,EAAE,EAAET,MAAM;IACVU,KAAK,EAAEH,UAAU;IACjBD,OAAO,EAAPA,OAAO;IACPK,KAAK,EAAEP;EACT,CA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AAEA;;AAEA,IAAMY,IAAiD,GAAG,SAApDA,IAAiDA,CAAIC,MAAM;EAAA,OAAK;IAAA,OACpEC,OAAO,CAACC,IAAI,oBAAAjB,MAAA,CACUe,MAAM,4DAC5B,CAAC;EAAA;AAAA;;AAEH;AACA;AACA;AACA;AACA,OAAO,IAAMG,WAAuB,GAAG;EACrCrC,OAAO,EAAEiC,IAAI,CAAC,SAAS,CAAC;EACxB9B,MAAM,EAAE8B,IAAI,CAAC,QAAQ,CAAC;EACtBZ,SAAS,EAAE,KAAK;EAChBC,MAAM,EAAEW,IAAI,CAAC,QAAQ;AACvB,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,IAAMK,cAAc,gBAAG3C,KAAK,CAAC4C,aAAa,CAACF,WAAW,CAAC;;AAE9D;AACA;AACA;AACA;AACA,OAAO,SAASG,eAAeA,CAAAC,KAAA,EAAuC;EAAA,IAApChB,QAAQ,GAAAgB,KAAA,CAARhB,QAAQ;IAAKC,KAAK,GAAAC,wBAAA,CAAAc,KAAA,EAAAC,UAAA;EAClD,oBACE/C,KAAA,CAAAgD,aAAA,CAACL,cAAc,CAACM,QAAQ;IAAC9B,KAAK,EAAEhB,UAAU,CAAC4B,KAAK;EAAE,GAC/CD,QACsB,CAAC;AAE9B;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASoB,iBAAiBA,CAAA,EAAG;EAClC,OAAOlD,KAAK,CAACmD,UAAU,CAACR,cAAc,CAAC;AACzC"}
1
+ {"version":3,"file":"Trigger.js","names":["React","triggerListeners","useHotkey","useTrigger","_ref","disable","_ref$disableKeys","disableKeys","enable","_ref$enableKeys","enableKeys","_ref$isEnabled","isEnabled","_ref$trigger","trigger","triggerRef","off","on","scope","value","key","handler","preventDefault","event","concat","_toConsumableArray","isVisible","toggle","Trigger","_ref2","children","props","_objectWithoutProperties","_excluded","_objectSpread","element","cloneElement","open"],"sources":["../../src/_hooks/Trigger.tsx"],"sourcesContent":["import React from 'react'\nimport { triggerListeners } from '../_utils/triggerListeners'\nimport type { RenderProp } from '../_utils/types'\nimport { useHotkey } from './Hotkey'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport type TriggerVariant =\n | 'click'\n | 'hover'\n | 'none'\n | 'contextmenu'\n | 'focus'\n | 'always'\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerConfig {\n disable: React.EventHandler<any>\n disableKeys?: string[]\n enable: React.EventHandler<any>\n enableKeys?: string[]\n isEnabled?: boolean\n trigger?: TriggerVariant | TriggerVariant[]\n triggerRef: React.RefObject<HTMLElement>\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerProps extends TriggerConfig {\n children: React.ReactNode\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerRenderProps\n extends TriggerConfig,\n RenderProp<TriggerApi> {}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface TriggerApi {\n disable: React.EventHandler<any>\n enable: React.EventHandler<any>\n isVisible: boolean\n toggle: React.EventHandler<any>\n}\n\n/* HOOK */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useTrigger({\n disable,\n disableKeys = [],\n enable,\n enableKeys = [],\n isEnabled = false,\n trigger = 'click',\n triggerRef,\n}: TriggerConfig): TriggerApi {\n triggerListeners({\n off: disable,\n on: enable,\n scope: triggerRef,\n trigger,\n value: isEnabled,\n })\n\n useHotkey({\n key: enableKeys,\n handler: enable,\n preventDefault: true,\n scope: triggerRef,\n })\n\n useHotkey({\n key: disableKeys,\n handler: disable,\n preventDefault: true,\n scope: triggerRef,\n })\n\n // prevent keyup event from firing on FF\n useHotkey({\n event: 'keyup',\n key: [...enableKeys, ...disableKeys],\n handler: () => {},\n preventDefault: true,\n scope: triggerRef,\n })\n\n return {\n disable,\n enable,\n isVisible: isEnabled,\n toggle: isEnabled ? disable : enable,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function Trigger({\n children,\n triggerRef,\n ...props\n}: TriggerRenderProps) {\n const trigger = useTrigger({ ...props, triggerRef })\n\n const element =\n typeof children === 'function'\n ? (children as (props: TriggerApi) => React.ReactElement)(trigger)\n : (children as React.ReactElement)\n\n return React.cloneElement(element, {\n open: trigger.isVisible,\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,QAAQ,4BAA4B;AAE7D,SAASC,SAAS,QAAQ,UAAU;;AAEpC;;AAEA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AAWA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AAQA;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASC,UAAUA,CAAAC,IAAA,EAQI;EAAA,IAP5BC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IAAAC,gBAAA,GAAAF,IAAA,CACPG,WAAW;IAAXA,WAAW,GAAAD,gBAAA,cAAG,EAAE,GAAAA,gBAAA;IAChBE,MAAM,GAAAJ,IAAA,CAANI,MAAM;IAAAC,eAAA,GAAAL,IAAA,CACNM,UAAU;IAAVA,UAAU,GAAAD,eAAA,cAAG,EAAE,GAAAA,eAAA;IAAAE,cAAA,GAAAP,IAAA,CACfQ,SAAS;IAATA,SAAS,GAAAD,cAAA,cAAG,KAAK,GAAAA,cAAA;IAAAE,YAAA,GAAAT,IAAA,CACjBU,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,OAAO,GAAAA,YAAA;IACjBE,UAAU,GAAAX,IAAA,CAAVW,UAAU;EAEVd,gBAAgB,CAAC;IACfe,GAAG,EAAEX,OAAO;IACZY,EAAE,EAAET,MAAM;IACVU,KAAK,EAAEH,UAAU;IACjBD,OAAO,EAAPA,OAAO;IACPK,KAAK,EAAEP;EACT,CAAC,CAA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,9 +14,6 @@ interface VisibilityApi {
14
14
  show: () => any;
15
15
  toggle: () => any;
16
16
  }
17
- interface Props extends VisibilityConfig {
18
- children?: React.ReactNode;
19
- }
20
17
  /**
21
18
  * @deprecatedSince 9
22
19
  * @deprecated Never officially documented/supported
@@ -34,19 +31,4 @@ export declare function useVisibility({ afterHide, afterShow, initialIsVisible,
34
31
  * @deprecated Never officially documented/supported
35
32
  */
36
33
  export declare function Visibility({ children, ...props }: RenderProps): React.ReactElement<{}, string | React.JSXElementConstructor<any>>;
37
- /**
38
- * @deprecatedSince 9
39
- * @deprecated Never officially documented/supported
40
- */
41
- export declare const VisibilityContext: React.Context<VisibilityApi>;
42
- /**
43
- * @deprecatedSince 9
44
- * @deprecated Never officially documented/supported
45
- */
46
- export declare function VisibilityProvider({ children, ...props }: Props): React.JSX.Element;
47
- /**
48
- * @deprecatedSince 9
49
- * @deprecated Never officially documented/supported
50
- */
51
- export declare function useVisibilityContext(): VisibilityApi;
52
34
  export {};
@@ -1,5 +1,4 @@
1
- var _excluded = ["children"],
2
- _excluded2 = ["children"];
1
+ var _excluded = ["children"];
3
2
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
3
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
4
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
@@ -72,43 +71,4 @@ export function Visibility(_ref2) {
72
71
  var visibility = useVisibility(props);
73
72
  return typeof children === 'function' ? children(visibility) : children;
74
73
  }
75
-
76
- /* CONTEXT */
77
-
78
- var noopCtx = function noopCtx(method) {
79
- return function () {
80
- return console.warn("Could not call `".concat(method, "`, please wrap your component in a `<VisibilityProvider>`"));
81
- };
82
- };
83
-
84
- /**
85
- * @deprecatedSince 9
86
- * @deprecated Never officially documented/supported
87
- */
88
- export var VisibilityContext = /*#__PURE__*/React.createContext({
89
- isVisible: false,
90
- hide: noopCtx('hide'),
91
- show: noopCtx('show'),
92
- toggle: noopCtx('toggle')
93
- });
94
-
95
- /**
96
- * @deprecatedSince 9
97
- * @deprecated Never officially documented/supported
98
- */
99
- export function VisibilityProvider(_ref3) {
100
- var children = _ref3.children,
101
- props = _objectWithoutProperties(_ref3, _excluded2);
102
- return /*#__PURE__*/React.createElement(VisibilityContext.Provider, {
103
- value: useVisibility(props)
104
- }, children);
105
- }
106
-
107
- /**
108
- * @deprecatedSince 9
109
- * @deprecated Never officially documented/supported
110
- */
111
- export function useVisibilityContext() {
112
- return React.useContext(VisibilityContext);
113
- }
114
74
  //# sourceMappingURL=Visibility.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Visibility.js","names":["React","noop","useVisibility","_ref","_ref$afterHide","afterHide","_ref$afterShow","afterShow","_ref$initialIsVisible","initialIsVisible","_React$useState","useState","_React$useState2","_slicedToArray","isVisible","setVisibility","hide","e","show","toggle","Visibility","_ref2","children","props","_objectWithoutProperties","_excluded","visibility","noopCtx","method","console","warn","concat","VisibilityContext","createContext","VisibilityProvider","_ref3","_excluded2","createElement","Provider","value","useVisibilityContext","useContext"],"sources":["../../src/_hooks/Visibility.tsx"],"sourcesContent":["import React from 'react'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface VisibilityConfig {\n afterHide?: (e?: Event) => void\n afterShow?: () => void\n initialIsVisible?: boolean\n}\n\ninterface VisibilityApi {\n hide: (e?: Event) => any\n isVisible: boolean\n show: () => any\n toggle: () => any\n}\n\ninterface Props extends VisibilityConfig {\n children?: React.ReactNode\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface RenderProps extends VisibilityConfig {\n children: (props: VisibilityApi) => React.ReactElement<{}>\n}\n\n/* HOOK */\n\nfunction noop() {}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useVisibility({\n afterHide = noop,\n afterShow = noop,\n initialIsVisible = false,\n}: VisibilityConfig): VisibilityApi {\n const [isVisible, setVisibility] = React.useState(initialIsVisible)\n\n const hide = (e?: Event) => {\n setVisibility(false)\n\n if (isVisible) {\n afterHide(e)\n }\n }\n\n const show = () => {\n setVisibility(true)\n\n if (!isVisible) {\n afterShow()\n }\n }\n\n const toggle = isVisible ? hide : show\n\n return {\n hide,\n isVisible,\n show,\n toggle,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function Visibility({ children, ...props }: RenderProps) {\n const visibility = useVisibility(props)\n\n return typeof children === 'function' ? children(visibility) : children\n}\n\n/* CONTEXT */\n\nconst noopCtx = (method: string) => () =>\n console.warn(\n `Could not call \\`${method}\\`, please wrap your component in a \\`<VisibilityProvider>\\``\n )\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport const VisibilityContext = React.createContext<VisibilityApi>({\n isVisible: false,\n hide: noopCtx('hide'),\n show: noopCtx('show'),\n toggle: noopCtx('toggle'),\n})\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function VisibilityProvider({ children, ...props }: Props) {\n return (\n <VisibilityContext.Provider value={useVisibility(props)}>\n {children}\n </VisibilityContext.Provider>\n )\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useVisibilityContext() {\n return React.useContext(VisibilityContext)\n}\n"],"mappings":";;;;;;;;;;A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QAAQ,GAAAD,KAAA,CAARC,QAAQ;IAAKC,KAAK,GAAAC,wBAAA,CAAAH,KAAA,EAAAI,SAAA;EAC7C,IAAMC,UAAU,GAAGxB,aAAa,CAACqB,KAAK,CAAC;EAEvC,OAAO,OAAOD,QAAQ,KAAK,UAAU,GAAGA,QAAQ,CAACI,UAAU,CAAC,GAAGJ,QAAQ;AACzE;;AAEA;;AAEA,IAAMK,OAAO,GAAG,SAAVA,OAAOA,CAAIC,MAAc;EAAA,OAAK;IAAA,OAClCC,OAAO,CAACC,IAAI,oBAAAC,MAAA,CACUH,MAAM,8DAC5B,CAAC;EAAA;AAAA;;AAEH;AACA;AACA;AACA;AACA,OAAO,IAAMI,iBAAiB,gBAAGhC,KAAK,CAACiC,aAAa,CAAgB;EAClEnB,SAAS,EAAE,KAAK;EAChBE,IAAI,EAAEW,OAAO,CAAC,MAAM,CAAC;EACrBT,IAAI,EAAES,OAAO,CAAC,MAAM,CAAC;EACrBR,MAAM,EAAEQ,OAAO,CAAC,QAAQ;AAC1B,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA,OAAO,SAASO,kBAAkBA,CAAAC,KAAA,EAAgC;EAAA,IAA7Bb,QAAQ,GAAAa,KAAA,CAARb,QAAQ;IAAKC,KAAK,GAAAC,wBAAA,CAAAW,KAAA,EAAAC,UAAA;EACrD,oBACEpC,KAAA,CAAAqC,aAAA,CAACL,iBAAiB,CAACM,QAAQ;IAACC,KAAK,EAAErC,aAAa,CAACqB,KAAK;EAAE,GACrDD,QACyB,CAAC;AAEjC;;AAEA;AACA;AACA;AACA;AACA,OAAO,SAASkB,oBAAoBA,CAAA,EAAG;EACrC,OAAOxC,KAAK,CAACyC,UAAU,CAACT,iBAAiB,CAAC;AAC5C"}
1
+ {"version":3,"file":"Visibility.js","names":["React","noop","useVisibility","_ref","_ref$afterHide","afterHide","_ref$afterShow","afterShow","_ref$initialIsVisible","initialIsVisible","_React$useState","useState","_React$useState2","_slicedToArray","isVisible","setVisibility","hide","e","show","toggle","Visibility","_ref2","children","props","_objectWithoutProperties","_excluded","visibility"],"sources":["../../src/_hooks/Visibility.tsx"],"sourcesContent":["import React from 'react'\n\n/* TYPES */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface VisibilityConfig {\n afterHide?: (e?: Event) => void\n afterShow?: () => void\n initialIsVisible?: boolean\n}\n\ninterface VisibilityApi {\n hide: (e?: Event) => any\n isVisible: boolean\n show: () => any\n toggle: () => any\n}\n\ninterface Props extends VisibilityConfig {\n children?: React.ReactNode\n}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport interface RenderProps extends VisibilityConfig {\n children: (props: VisibilityApi) => React.ReactElement<{}>\n}\n\n/* HOOK */\n\nfunction noop() {}\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function useVisibility({\n afterHide = noop,\n afterShow = noop,\n initialIsVisible = false,\n}: VisibilityConfig): VisibilityApi {\n const [isVisible, setVisibility] = React.useState(initialIsVisible)\n\n const hide = (e?: Event) => {\n setVisibility(false)\n\n if (isVisible) {\n afterHide(e)\n }\n }\n\n const show = () => {\n setVisibility(true)\n\n if (!isVisible) {\n afterShow()\n }\n }\n\n const toggle = isVisible ? hide : show\n\n return {\n hide,\n isVisible,\n show,\n toggle,\n }\n}\n\n/* RENDER PROP */\n\n/**\n * @deprecatedSince 9\n * @deprecated Never officially documented/supported\n */\nexport function Visibility({ children, ...props }: RenderProps) {\n const visibility = useVisibility(props)\n\n return typeof children === 'function' ? children(visibility) : children\n}\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB;;AAEA;AACA;AACA;AACA;AAkBA;AACA;AACA;AACA;AAKA;;AAEA,SAASC,IAAIA,CAAA,EAAG,CAAC;;AAEjB;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAAC,IAAA,EAIO;EAAA,IAAAC,cAAA,GAAAD,IAAA,CAHlCE,SAAS;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@ -10,7 +10,7 @@
10
10
  "description": "",
11
11
  "descriptionHtml": "",
12
12
  "sourceFile": "packages/core-react/src/_utils/types.ts",
13
- "sourceUrl": "https://github.com/procore/core/blob/78223f7/packages/core-react/src/_utils/types.ts#L42"
13
+ "sourceUrl": "https://github.com/procore/core/blob/2a86714/packages/core-react/src/_utils/types.ts#L42"
14
14
  },
15
15
  {
16
16
  "name": "className",
@@ -20,7 +20,7 @@
20
20
  "description": "Additional classNames",
21
21
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional classNames</p>\n</div></div>",
22
22
  "sourceFile": "packages/core-react/src/_utils/types.ts",
23
- "sourceUrl": "https://github.com/procore/core/blob/78223f7/packages/core-react/src/_utils/types.ts#L47"
23
+ "sourceUrl": "https://github.com/procore/core/blob/2a86714/packages/core-react/src/_utils/types.ts#L47"
24
24
  },
25
25
  {
26
26
  "name": "icon",
@@ -30,7 +30,7 @@
30
30
  "description": "The icon to display",
31
31
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>The icon to display</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
32
32
  "sourceFile": "packages/core-react/src/Avatar/Avatar.types.ts",
33
- "sourceUrl": "https://github.com/procore/core/blob/78223f7/packages/core-react/src/Avatar/Avatar.types.ts#L100"
33
+ "sourceUrl": "https://github.com/procore/core/blob/2a86714/packages/core-react/src/Avatar/Avatar.types.ts#L100"
34
34
  },
35
35
  {
36
36
  "name": "style",
@@ -40,7 +40,7 @@
40
40
  "description": "Additional CSS styles",
41
41
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional CSS styles</p>\n</div></div>",
42
42
  "sourceFile": "packages/core-react/src/_utils/types.ts",
43
- "sourceUrl": "https://github.com/procore/core/blob/78223f7/packages/core-react/src/_utils/types.ts#L52"
43
+ "sourceUrl": "https://github.com/procore/core/blob/2a86714/packages/core-react/src/_utils/types.ts#L52"
44
44
  }
45
45
  ],
46
46
  "description": ""
@@ -56,7 +56,7 @@
56
56
  "description": "",
57
57
  "descriptionHtml": "",
58
58
  "sourceFile": "packages/core-react/src/_utils/types.ts",
59
- "sourceUrl": "https://github.com/procore/core/blob/78223f7/packages/core-react/src/_utils/types.ts#L42"
59
+ "sourceUrl": "https://github.com/procore/core/blob/2a86714/packages/core-react/src/_utils/types.ts#L42"
60
60
  },
61
61
  {
62
62
  "name": "className",
@@ -66,7 +66,7 @@
66
66
  "description": "Additional classNames",
67
67
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional classNames</p>\n</div></div>",
68
68
  "sourceFile": "packages/core-react/src/_utils/types.ts",
69
- "sourceUrl": "https://github.com/procore/core/blob/78223f7/packages/core-react/src/_utils/types.ts#L47"
69
+ "sourceUrl": "https://github.com/procore/core/blob/2a86714/packages/core-react/src/_utils/types.ts#L47"
70
70
  },
71
71
  {
72
72
  "name": "style",
@@ -76,7 +76,7 @@
76
76
  "description": "Additional CSS styles",
77
77
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional CSS styles</p>\n</div></div>",
78
78
  "sourceFile": "packages/core-react/src/_utils/types.ts",
79
- "sourceUrl": "https://github.com/procore/core/blob/78223f7/packages/core-react/src/_utils/types.ts#L52"
79
+ "sourceUrl": "https://github.com/procore/core/blob/2a86714/packages/core-react/src/_utils/types.ts#L52"
80
80
  }
81
81
  ],
82
82
  "description": ""
@@ -92,7 +92,7 @@
92
92
  "description": "",
93
93
  "descriptionHtml": "",
94
94
  "sourceFile": "packages/core-react/src/Avatar/Avatar.types.ts",
95
- "sourceUrl": "https://github.com/procore/core/blob/78223f7/packages/core-react/src/Avatar/Avatar.types.ts#L12"
95
+ "sourceUrl": "https://github.com/procore/core/blob/2a86714/packages/core-react/src/Avatar/Avatar.types.ts#L12"
96
96
  },
97
97
  {
98
98
  "name": "img",
@@ -102,7 +102,7 @@
102
102
  "description": "",
103
103
  "descriptionHtml": "",
104
104
  "sourceFile": "packages/core-react/src/Avatar/Avatar.types.ts",
105
- "sourceUrl": "https://github.com/procore/core/blob/78223f7/packages/core-react/src/Avatar/Avatar.types.ts#L13"
105
+ "sourceUrl": "https://github.com/procore/core/blob/2a86714/packages/core-react/src/Avatar/Avatar.types.ts#L13"
106
106
  },
107
107
  {
108
108
  "name": "link",
@@ -112,7 +112,7 @@
112
112
  "description": "",
113
113
  "descriptionHtml": "",
114
114
  "sourceFile": "packages/core-react/src/Avatar/Avatar.types.ts",
115
- "sourceUrl": "https://github.com/procore/core/blob/78223f7/packages/core-react/src/Avatar/Avatar.types.ts#L14"
115
+ "sourceUrl": "https://github.com/procore/core/blob/2a86714/packages/core-react/src/Avatar/Avatar.types.ts#L14"
116
116
  }
117
117
  ],
118
118
  "description": ""
@@ -128,7 +128,7 @@
128
128
  "description": "",
129
129
  "descriptionHtml": "",
130
130
  "sourceFile": "packages/core-react/src/_utils/types.ts",
131
- "sourceUrl": "https://github.com/procore/core/blob/78223f7/packages/core-react/src/_utils/types.ts#L42"
131
+ "sourceUrl": "https://github.com/procore/core/blob/2a86714/packages/core-react/src/_utils/types.ts#L42"
132
132
  },
133
133
  {
134
134
  "name": "className",
@@ -138,7 +138,7 @@
138
138
  "description": "Additional classNames",
139
139
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional classNames</p>\n</div></div>",
140
140
  "sourceFile": "packages/core-react/src/_utils/types.ts",
141
- "sourceUrl": "https://github.com/procore/core/blob/78223f7/packages/core-react/src/_utils/types.ts#L47"
141
+ "sourceUrl": "https://github.com/procore/core/blob/2a86714/packages/core-react/src/_utils/types.ts#L47"
142
142
  },
143
143
  {
144
144
  "name": "imageUrl",
@@ -148,7 +148,7 @@
148
148
  "description": "The Avatar rich media url",
149
149
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>The Avatar rich media url</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
150
150
  "sourceFile": "packages/core-react/src/Avatar/Avatar.types.ts",
151
- "sourceUrl": "https://github.com/procore/core/blob/78223f7/packages/core-react/src/Avatar/Avatar.types.ts#L108"
151
+ "sourceUrl": "https://github.com/procore/core/blob/2a86714/packages/core-react/src/Avatar/Avatar.types.ts#L108"
152
152
  },
153
153
  {
154
154
  "name": "style",
@@ -158,7 +158,7 @@
158
158
  "description": "Additional CSS styles",
159
159
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional CSS styles</p>\n</div></div>",
160
160
  "sourceFile": "packages/core-react/src/_utils/types.ts",
161
- "sourceUrl": "https://github.com/procore/core/blob/78223f7/packages/core-react/src/_utils/types.ts#L52"
161
+ "sourceUrl": "https://github.com/procore/core/blob/2a86714/packages/core-react/src/_utils/types.ts#L52"
162
162
  }
163
163
  ],
164
164
  "description": ""
@@ -174,7 +174,7 @@
174
174
  "description": "",
175
175
  "descriptionHtml": "",
176
176
  "sourceFile": "packages/core-react/src/_utils/types.ts",
177
- "sourceUrl": "https://github.com/procore/core/blob/78223f7/packages/core-react/src/_utils/types.ts#L42"
177
+ "sourceUrl": "https://github.com/procore/core/blob/2a86714/packages/core-react/src/_utils/types.ts#L42"
178
178
  },
179
179
  {
180
180
  "name": "className",
@@ -184,7 +184,7 @@
184
184
  "description": "Additional classNames",
185
185
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional classNames</p>\n</div></div>",
186
186
  "sourceFile": "packages/core-react/src/_utils/types.ts",
187
- "sourceUrl": "https://github.com/procore/core/blob/78223f7/packages/core-react/src/_utils/types.ts#L47"
187
+ "sourceUrl": "https://github.com/procore/core/blob/2a86714/packages/core-react/src/_utils/types.ts#L47"
188
188
  },
189
189
  {
190
190
  "name": "clickable",
@@ -192,12 +192,12 @@
192
192
  "type": "<span class=\"tsd-signature-type\">boolean</span>",
193
193
  "typeDetail": "<span class=\"tsd-signature-type\">boolean</span>",
194
194
  "description": "Sets the Avatar's clickable UI state. For accessibility, see `role`",
195
- "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Sets the Avatar&#39;s clickable UI state. For accessibility, see <code>role</code></p>\n</div><dl class=\"tsd-comment-tags\"><dt>ally</dt><dd><p>This prop is around UI and has 0 UX or JS for interaction, try <code>role</code> instead.</p>\n</dd><dt>defaultvalue</dt><dd><p>false</p>\n</dd><dt>deprecated</dt><dd><p>Reviewing for removal from system, prefer accessible <code>role</code> for interactive UI.</p>\n</dd><dt>deprecatedsince</dt><dd><p>TBD</p>\n</dd><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
195
+ "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Sets the Avatar&#39;s clickable UI state. For accessibility, see <code>role</code></p>\n</div><dl class=\"tsd-comment-tags\"><dt>ally</dt><dd><p>This prop is around UI and has 0 UX or JS for interaction, try <code>role</code> instead.</p>\n</dd><dt>defaultvalue</dt><dd><p>false</p>\n</dd><dt>deprecated</dt><dd><p>Reviewing for removal from system, prefer accessible <code>role=&quot;link&quot;</code> or <code>role=&quot;button&quot;</code> for interactive UI.</p>\n</dd><dt>deprecatedsince</dt><dd><p>TBD</p>\n</dd><dt>since</dt><dd><p>10.19.0</p>\n</dd></dl></div>",
196
196
  "defaultValue": "false",
197
- "deprecated": "Reviewing for removal from system, prefer accessible `role` for interactive UI.",
197
+ "deprecated": "Reviewing for removal from system, prefer accessible `role=\"link\"` or `role=\"button\"` for interactive UI.",
198
198
  "deprecatedSince": "TBD",
199
199
  "sourceFile": "packages/core-react/src/Avatar/Avatar.types.ts",
200
- "sourceUrl": "https://github.com/procore/core/blob/78223f7/packages/core-react/src/Avatar/Avatar.types.ts#L34"
200
+ "sourceUrl": "https://github.com/procore/core/blob/2a86714/packages/core-react/src/Avatar/Avatar.types.ts#L34"
201
201
  },
202
202
  {
203
203
  "name": "disabled",
@@ -208,7 +208,7 @@
208
208
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Sets the Avatar&#39;s disabled state</p>\n</div><dl class=\"tsd-comment-tags\"><dt>defaultvalue</dt><dd><p>false</p>\n</dd></dl></div>",
209
209
  "defaultValue": "false\n",
210
210
  "sourceFile": "packages/core-react/src/Avatar/Avatar.types.ts",
211
- "sourceUrl": "https://github.com/procore/core/blob/78223f7/packages/core-react/src/Avatar/Avatar.types.ts#L40"
211
+ "sourceUrl": "https://github.com/procore/core/blob/2a86714/packages/core-react/src/Avatar/Avatar.types.ts#L40"
212
212
  },
213
213
  {
214
214
  "name": "size",
@@ -221,7 +221,7 @@
221
221
  "deprecated": "\n\nSize \"xl\" has been deprecated and will be removed in a future version.\nPlease use \"lg\" instead of \"xl\".\n\n**Before**\n\n`<Avatar size=\"xl\" />`\n\n**After**\n\n`<Avatar size=\"lg\" />`\n",
222
222
  "deprecatedSince": "10.20.0",
223
223
  "sourceFile": "packages/core-react/src/Avatar/Avatar.types.ts",
224
- "sourceUrl": "https://github.com/procore/core/blob/78223f7/packages/core-react/src/Avatar/Avatar.types.ts#L62"
224
+ "sourceUrl": "https://github.com/procore/core/blob/2a86714/packages/core-react/src/Avatar/Avatar.types.ts#L62"
225
225
  },
226
226
  {
227
227
  "name": "style",
@@ -231,7 +231,7 @@
231
231
  "description": "Additional CSS styles",
232
232
  "descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional CSS styles</p>\n</div></div>",
233
233
  "sourceFile": "packages/core-react/src/_utils/types.ts",
234
- "sourceUrl": "https://github.com/procore/core/blob/78223f7/packages/core-react/src/_utils/types.ts#L52"
234
+ "sourceUrl": "https://github.com/procore/core/blob/2a86714/packages/core-react/src/_utils/types.ts#L52"
235
235
  }
236
236
  ],
237
237
  "description": ""