@conveyorhq/arrow-ds 1.62.0 → 2.0.0-beta.10

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 (376) hide show
  1. package/package.json +3 -2
  2. package/public/components/Avatar/Avatar.d.ts +2 -1
  3. package/public/components/Avatar/Avatar.js +8 -4
  4. package/public/components/DateRangePicker/CustomDateRangeInput.js +3 -2
  5. package/public/components/Drawer/Drawer.js +4 -2
  6. package/public/components/MarkdownEditor/MarkdownEditor.js +1 -2
  7. package/public/components/MarkdownEditor/MarkdownHelp.js +4 -7
  8. package/public/components/MenuRenderer/MenuRenderer.js +2 -2
  9. package/public/components/Modal/Modal.d.ts +8 -4
  10. package/public/components/Modal/Modal.js +23 -60
  11. package/public/components/Overlay/Overlay.js +2 -2
  12. package/public/components/Popover/Popover.js +4 -4
  13. package/public/components/SelectNew/hooks/useSelectLayout.js +2 -2
  14. package/public/components/Stack/Stack.js +1 -1
  15. package/public/components/Table/FilterDropdown.js +4 -4
  16. package/public/components/Toast/Toast.d.ts +3 -3
  17. package/public/components/Toast/Toast.js +6 -2
  18. package/public/components/Tooltip/Tooltip.d.ts +8 -4
  19. package/public/components/Tooltip/Tooltip.js +96 -97
  20. package/public/css/styles.css +2959 -4517
  21. package/public/css/styles.min.css +1 -1
  22. package/public/css/styles.min.css.map +1 -1
  23. package/public/hooks/index.d.ts +1 -0
  24. package/public/hooks/index.js +3 -1
  25. package/public/hooks/useCopyToClipboard.d.ts +1 -0
  26. package/public/hooks/useCopyToClipboard.js +49 -0
  27. package/public/index.d.ts +1 -22
  28. package/public/index.js +2 -23
  29. package/public/storybook-components/ComponentHeading.js +1 -3
  30. package/public/types/index.d.ts +0 -16
  31. package/public/types/index.js +1 -20
  32. package/public/utilities/index.d.ts +1 -0
  33. package/public/utilities/index.js +3 -1
  34. package/public/utilities/mergeEventHandlers.d.ts +3 -0
  35. package/public/utilities/mergeEventHandlers.js +13 -0
  36. package/src/components/Accordion/Accordion.story.mdx +6 -7
  37. package/src/components/Avatar/Avatar.tsx +42 -39
  38. package/src/components/Banner/Banner.story.mdx +4 -12
  39. package/src/components/Card/Card.story.mdx +11 -36
  40. package/src/components/DateRangePicker/CustomDateRangeInput.tsx +25 -32
  41. package/src/components/DateRangePicker/index.css +0 -4
  42. package/src/components/Drawer/Drawer.story.mdx +68 -70
  43. package/src/components/Drawer/Drawer.tsx +9 -8
  44. package/src/components/Drawer/index.css +26 -1
  45. package/src/components/Frame/Frame.story.mdx +6 -1
  46. package/src/components/MarkdownEditor/MarkdownEditor.tsx +2 -3
  47. package/src/components/MarkdownEditor/MarkdownHelp.tsx +7 -10
  48. package/src/components/MarkdownEditor/index.css +5 -1
  49. package/src/components/MenuRenderer/MenuRenderer.tsx +1 -1
  50. package/src/components/Modal/Modal.story.mdx +135 -3
  51. package/src/components/Modal/Modal.tsx +69 -100
  52. package/src/components/Modal/index.css +2 -2
  53. package/src/components/Overlay/Overlay.tsx +2 -3
  54. package/src/components/Overlay/index.css +2 -1
  55. package/src/components/Popover/Popover.tsx +1 -1
  56. package/src/components/Select/Select.story.mdx +9 -10
  57. package/src/components/Select/SelectPopover.tsx +1 -1
  58. package/src/components/SelectNew/hooks/useSelectLayout.ts +1 -1
  59. package/src/components/Stack/Stack.tsx +1 -1
  60. package/src/components/Stack/index.css +0 -416
  61. package/src/components/Table/FilterDropdown.tsx +1 -1
  62. package/src/components/Toast/Toast.story.mdx +1 -1
  63. package/src/components/Toast/Toast.tsx +14 -10
  64. package/src/components/Toast/index.css +2 -2
  65. package/src/components/Tooltip/Tooltip.story.mdx +270 -126
  66. package/src/components/Tooltip/Tooltip.tsx +197 -114
  67. package/src/components/Tooltip/index.css +18 -13
  68. package/src/css/components.css +0 -13
  69. package/src/hooks/index.ts +1 -0
  70. package/src/hooks/useCopyToClipboard.ts +61 -0
  71. package/src/index.ts +1 -22
  72. package/src/storybook-components/ComponentHeading.tsx +1 -16
  73. package/src/types/index.ts +0 -28
  74. package/src/utilities/index.ts +1 -0
  75. package/src/utilities/mergeEventHandlers.ts +20 -0
  76. package/public/components/Absolute/Absolute.d.ts +0 -2
  77. package/public/components/Absolute/Absolute.js +0 -14
  78. package/public/components/Absolute/index.d.ts +0 -1
  79. package/public/components/Absolute/index.js +0 -5
  80. package/public/components/Appbar/Appbar.d.ts +0 -61
  81. package/public/components/Appbar/Appbar.js +0 -44
  82. package/public/components/Appbar/AppbarClaimProfileButton.d.ts +0 -2
  83. package/public/components/Appbar/AppbarClaimProfileButton.js +0 -10
  84. package/public/components/Appbar/AppbarDropdownIcon.d.ts +0 -1
  85. package/public/components/Appbar/AppbarDropdownIcon.js +0 -10
  86. package/public/components/Appbar/AppbarLogInButton.d.ts +0 -2
  87. package/public/components/Appbar/AppbarLogInButton.js +0 -25
  88. package/public/components/Appbar/AppbarLogo.d.ts +0 -2
  89. package/public/components/Appbar/AppbarLogo.js +0 -31
  90. package/public/components/Appbar/AppbarOrganization.d.ts +0 -17
  91. package/public/components/Appbar/AppbarOrganization.js +0 -35
  92. package/public/components/Appbar/AppbarProductMenu.d.ts +0 -13
  93. package/public/components/Appbar/AppbarProductMenu.js +0 -67
  94. package/public/components/Appbar/AppbarTabMarker.d.ts +0 -1
  95. package/public/components/Appbar/AppbarTabMarker.js +0 -11
  96. package/public/components/Appbar/AppbarTabs.d.ts +0 -10
  97. package/public/components/Appbar/AppbarTabs.js +0 -42
  98. package/public/components/Appbar/AppbarUser.d.ts +0 -27
  99. package/public/components/Appbar/AppbarUser.js +0 -76
  100. package/public/components/Appbar/config.d.ts +0 -7
  101. package/public/components/Appbar/config.js +0 -13
  102. package/public/components/Appbar/context.d.ts +0 -10
  103. package/public/components/Appbar/context.js +0 -16
  104. package/public/components/Appbar/index.d.ts +0 -1
  105. package/public/components/Appbar/index.js +0 -13
  106. package/public/components/AptibleLogo/AptibleLogo.d.ts +0 -7
  107. package/public/components/AptibleLogo/AptibleLogo.js +0 -25
  108. package/public/components/AptibleLogo/index.d.ts +0 -1
  109. package/public/components/AptibleLogo/index.js +0 -5
  110. package/public/components/ArrowButton/ArrowButton.d.ts +0 -9
  111. package/public/components/ArrowButton/ArrowButton.js +0 -22
  112. package/public/components/ArrowButton/index.d.ts +0 -1
  113. package/public/components/ArrowButton/index.js +0 -13
  114. package/public/components/ArrowLink/ArrowLink.d.ts +0 -9
  115. package/public/components/ArrowLink/ArrowLink.js +0 -21
  116. package/public/components/ArrowLink/index.d.ts +0 -1
  117. package/public/components/ArrowLink/index.js +0 -13
  118. package/public/components/Aside/Aside.d.ts +0 -14
  119. package/public/components/Aside/Aside.js +0 -28
  120. package/public/components/Aside/index.d.ts +0 -1
  121. package/public/components/Aside/index.js +0 -13
  122. package/public/components/Combobox/Combobox.d.ts +0 -2
  123. package/public/components/Combobox/Combobox.js +0 -75
  124. package/public/components/Combobox/ComboboxMulti.d.ts +0 -2
  125. package/public/components/Combobox/ComboboxMulti.js +0 -57
  126. package/public/components/Combobox/index.d.ts +0 -2
  127. package/public/components/Combobox/index.js +0 -14
  128. package/public/components/Combobox/ui.d.ts +0 -73
  129. package/public/components/Combobox/ui.js +0 -97
  130. package/public/components/Combobox/useSelect.d.ts +0 -60
  131. package/public/components/Combobox/useSelect.js +0 -239
  132. package/public/components/Fixed/Fixed.d.ts +0 -2
  133. package/public/components/Fixed/Fixed.js +0 -14
  134. package/public/components/Fixed/index.d.ts +0 -1
  135. package/public/components/Fixed/index.js +0 -5
  136. package/public/components/IntegrationLogo/IntegrationLogo.d.ts +0 -10
  137. package/public/components/IntegrationLogo/IntegrationLogo.js +0 -35
  138. package/public/components/IntegrationLogo/IntegrationLogoSvg.d.ts +0 -9
  139. package/public/components/IntegrationLogo/IntegrationLogoSvg.js +0 -56
  140. package/public/components/IntegrationLogo/index.d.ts +0 -1
  141. package/public/components/IntegrationLogo/index.js +0 -13
  142. package/public/components/IntegrationLogo/svg/addigy.d.ts +0 -2
  143. package/public/components/IntegrationLogo/svg/addigy.js +0 -17
  144. package/public/components/IntegrationLogo/svg/aws.d.ts +0 -2
  145. package/public/components/IntegrationLogo/svg/aws.js +0 -22
  146. package/public/components/IntegrationLogo/svg/bamboohr.d.ts +0 -2
  147. package/public/components/IntegrationLogo/svg/bamboohr.js +0 -18
  148. package/public/components/IntegrationLogo/svg/bitbucket.d.ts +0 -2
  149. package/public/components/IntegrationLogo/svg/bitbucket.js +0 -18
  150. package/public/components/IntegrationLogo/svg/conveyor.d.ts +0 -2
  151. package/public/components/IntegrationLogo/svg/conveyor.js +0 -20
  152. package/public/components/IntegrationLogo/svg/default.d.ts +0 -2
  153. package/public/components/IntegrationLogo/svg/default.js +0 -13
  154. package/public/components/IntegrationLogo/svg/deploy.d.ts +0 -2
  155. package/public/components/IntegrationLogo/svg/deploy.js +0 -17
  156. package/public/components/IntegrationLogo/svg/docusign.d.ts +0 -2
  157. package/public/components/IntegrationLogo/svg/docusign.js +0 -32
  158. package/public/components/IntegrationLogo/svg/events-api.d.ts +0 -2
  159. package/public/components/IntegrationLogo/svg/events-api.js +0 -26
  160. package/public/components/IntegrationLogo/svg/gcp.d.ts +0 -3
  161. package/public/components/IntegrationLogo/svg/gcp.js +0 -15
  162. package/public/components/IntegrationLogo/svg/github.d.ts +0 -3
  163. package/public/components/IntegrationLogo/svg/github.js +0 -12
  164. package/public/components/IntegrationLogo/svg/gitlab.d.ts +0 -2
  165. package/public/components/IntegrationLogo/svg/gitlab.js +0 -19
  166. package/public/components/IntegrationLogo/svg/gsuite.d.ts +0 -2
  167. package/public/components/IntegrationLogo/svg/gsuite.js +0 -15
  168. package/public/components/IntegrationLogo/svg/index.d.ts +0 -23
  169. package/public/components/IntegrationLogo/svg/index.js +0 -58
  170. package/public/components/IntegrationLogo/svg/jamf.d.ts +0 -2
  171. package/public/components/IntegrationLogo/svg/jamf.js +0 -20
  172. package/public/components/IntegrationLogo/svg/jira.d.ts +0 -2
  173. package/public/components/IntegrationLogo/svg/jira.js +0 -21
  174. package/public/components/IntegrationLogo/svg/jumpcloud.d.ts +0 -2
  175. package/public/components/IntegrationLogo/svg/jumpcloud.js +0 -28
  176. package/public/components/IntegrationLogo/svg/okta.d.ts +0 -2
  177. package/public/components/IntegrationLogo/svg/okta.js +0 -16
  178. package/public/components/IntegrationLogo/svg/onelogin.d.ts +0 -2
  179. package/public/components/IntegrationLogo/svg/onelogin.js +0 -18
  180. package/public/components/IntegrationLogo/svg/salesforce.d.ts +0 -2
  181. package/public/components/IntegrationLogo/svg/salesforce.js +0 -20
  182. package/public/components/IntegrationLogo/svg/servicenow.d.ts +0 -2
  183. package/public/components/IntegrationLogo/svg/servicenow.js +0 -14
  184. package/public/components/IntegrationLogo/svg/slack.d.ts +0 -2
  185. package/public/components/IntegrationLogo/svg/slack.js +0 -19
  186. package/public/components/IntegrationLogo/svg/wrapper.d.ts +0 -11
  187. package/public/components/IntegrationLogo/svg/wrapper.js +0 -13
  188. package/public/components/IntegrationLogo/svg/zoom.d.ts +0 -2
  189. package/public/components/IntegrationLogo/svg/zoom.js +0 -23
  190. package/public/components/Meta/Meta.d.ts +0 -6
  191. package/public/components/Meta/Meta.js +0 -21
  192. package/public/components/Meta/Meta.story.d.ts +0 -1
  193. package/public/components/Meta/Meta.story.js +0 -39
  194. package/public/components/Meta/index.d.ts +0 -1
  195. package/public/components/Meta/index.js +0 -5
  196. package/public/components/Pagination/Pagination.d.ts +0 -9
  197. package/public/components/Pagination/Pagination.js +0 -36
  198. package/public/components/Pagination/index.d.ts +0 -1
  199. package/public/components/Pagination/index.js +0 -13
  200. package/public/components/ProductIcon/ProductIcon.d.ts +0 -7
  201. package/public/components/ProductIcon/ProductIcon.js +0 -31
  202. package/public/components/ProductIcon/ProductIconComply.d.ts +0 -2
  203. package/public/components/ProductIcon/ProductIconComply.js +0 -11
  204. package/public/components/ProductIcon/ProductIconDeploy.d.ts +0 -2
  205. package/public/components/ProductIcon/ProductIconDeploy.js +0 -11
  206. package/public/components/ProductIcon/ProductIconExchange.d.ts +0 -2
  207. package/public/components/ProductIcon/ProductIconExchange.js +0 -11
  208. package/public/components/ProductIcon/ProductIconTrustCenter.d.ts +0 -2
  209. package/public/components/ProductIcon/ProductIconTrustCenter.js +0 -11
  210. package/public/components/ProductIcon/index.d.ts +0 -1
  211. package/public/components/ProductIcon/index.js +0 -5
  212. package/public/components/PropertyDiff/PropertyDiff.d.ts +0 -7
  213. package/public/components/PropertyDiff/PropertyDiff.js +0 -22
  214. package/public/components/PropertyDiff/index.d.ts +0 -1
  215. package/public/components/PropertyDiff/index.js +0 -13
  216. package/public/components/Relative/Relative.d.ts +0 -2
  217. package/public/components/Relative/Relative.js +0 -14
  218. package/public/components/Relative/index.d.ts +0 -1
  219. package/public/components/Relative/index.js +0 -5
  220. package/public/components/SearchFilter/SearchFilter.d.ts +0 -17
  221. package/public/components/SearchFilter/SearchFilter.js +0 -103
  222. package/public/components/SearchFilter/index.d.ts +0 -1
  223. package/public/components/SearchFilter/index.js +0 -13
  224. package/public/components/StatusLabel/StatusLabel.d.ts +0 -16
  225. package/public/components/StatusLabel/StatusLabel.js +0 -40
  226. package/public/components/StatusLabel/index.d.ts +0 -1
  227. package/public/components/StatusLabel/index.js +0 -13
  228. package/public/components/StatusPanel/StatusPanel.d.ts +0 -11
  229. package/public/components/StatusPanel/StatusPanel.js +0 -24
  230. package/public/components/StatusPanel/index.d.ts +0 -1
  231. package/public/components/StatusPanel/index.js +0 -13
  232. package/public/components/Sticky/Sticky.d.ts +0 -2
  233. package/public/components/Sticky/Sticky.js +0 -14
  234. package/public/components/Sticky/index.d.ts +0 -1
  235. package/public/components/Sticky/index.js +0 -5
  236. package/public/components/TopBar/TopBar.d.ts +0 -14
  237. package/public/components/TopBar/TopBar.js +0 -24
  238. package/public/components/TopBar/TopBarBreadcrumbs.d.ts +0 -10
  239. package/public/components/TopBar/TopBarBreadcrumbs.js +0 -34
  240. package/public/components/TopBar/TopBarSubNav.d.ts +0 -2
  241. package/public/components/TopBar/TopBarSubNav.js +0 -16
  242. package/public/components/TopBar/TopBarSubNavItem.d.ts +0 -5
  243. package/public/components/TopBar/TopBarSubNavItem.js +0 -17
  244. package/public/components/TopBar/index.d.ts +0 -1
  245. package/public/components/TopBar/index.js +0 -13
  246. package/public/components/VendorLogo/VendorLogo.d.ts +0 -21
  247. package/public/components/VendorLogo/VendorLogo.js +0 -57
  248. package/public/components/VendorLogo/index.d.ts +0 -1
  249. package/public/components/VendorLogo/index.js +0 -13
  250. package/src/components/Absolute/Absolute.story.mdx +0 -34
  251. package/src/components/Absolute/Absolute.tsx +0 -12
  252. package/src/components/Absolute/index.ts +0 -1
  253. package/src/components/Appbar/Appbar.story.mdx +0 -207
  254. package/src/components/Appbar/Appbar.tsx +0 -124
  255. package/src/components/Appbar/AppbarClaimProfileButton.tsx +0 -13
  256. package/src/components/Appbar/AppbarDropdownIcon.tsx +0 -6
  257. package/src/components/Appbar/AppbarLogInButton.tsx +0 -27
  258. package/src/components/Appbar/AppbarLogo.tsx +0 -43
  259. package/src/components/Appbar/AppbarOrganization.tsx +0 -96
  260. package/src/components/Appbar/AppbarProductMenu.tsx +0 -125
  261. package/src/components/Appbar/AppbarTabMarker.tsx +0 -5
  262. package/src/components/Appbar/AppbarTabs.tsx +0 -46
  263. package/src/components/Appbar/AppbarUser.tsx +0 -179
  264. package/src/components/Appbar/config.ts +0 -12
  265. package/src/components/Appbar/context.ts +0 -20
  266. package/src/components/Appbar/index.css +0 -294
  267. package/src/components/Appbar/index.ts +0 -1
  268. package/src/components/AptibleLogo/AptibleLogo.story.mdx +0 -42
  269. package/src/components/AptibleLogo/AptibleLogo.tsx +0 -45
  270. package/src/components/AptibleLogo/index.ts +0 -1
  271. package/src/components/ArrowButton/ArrowButton.story.mdx +0 -121
  272. package/src/components/ArrowButton/ArrowButton.tsx +0 -57
  273. package/src/components/ArrowButton/index.css +0 -42
  274. package/src/components/ArrowButton/index.ts +0 -1
  275. package/src/components/ArrowLink/ArrowLink.story.mdx +0 -75
  276. package/src/components/ArrowLink/ArrowLink.tsx +0 -45
  277. package/src/components/ArrowLink/index.ts +0 -1
  278. package/src/components/Aside/Aside.story.mdx +0 -72
  279. package/src/components/Aside/Aside.tsx +0 -68
  280. package/src/components/Aside/index.css +0 -11
  281. package/src/components/Aside/index.ts +0 -1
  282. package/src/components/Combobox/Combobox.story.mdx +0 -205
  283. package/src/components/Combobox/Combobox.tsx +0 -165
  284. package/src/components/Combobox/ComboboxMulti.tsx +0 -169
  285. package/src/components/Combobox/TODO.md +0 -33
  286. package/src/components/Combobox/index.css +0 -97
  287. package/src/components/Combobox/index.ts +0 -2
  288. package/src/components/Combobox/ui.tsx +0 -211
  289. package/src/components/Combobox/useSelect.ts +0 -347
  290. package/src/components/Fixed/Fixed.story.mdx +0 -34
  291. package/src/components/Fixed/Fixed.tsx +0 -12
  292. package/src/components/Fixed/index.ts +0 -1
  293. package/src/components/IntegrationLogo/IntegrationLogo.story.mdx +0 -167
  294. package/src/components/IntegrationLogo/IntegrationLogo.tsx +0 -59
  295. package/src/components/IntegrationLogo/IntegrationLogoSvg.tsx +0 -85
  296. package/src/components/IntegrationLogo/index.ts +0 -1
  297. package/src/components/IntegrationLogo/svg/addigy.tsx +0 -23
  298. package/src/components/IntegrationLogo/svg/aws.tsx +0 -52
  299. package/src/components/IntegrationLogo/svg/bamboohr.tsx +0 -34
  300. package/src/components/IntegrationLogo/svg/bitbucket.tsx +0 -37
  301. package/src/components/IntegrationLogo/svg/conveyor.tsx +0 -41
  302. package/src/components/IntegrationLogo/svg/default.tsx +0 -11
  303. package/src/components/IntegrationLogo/svg/deploy.tsx +0 -29
  304. package/src/components/IntegrationLogo/svg/docusign.tsx +0 -102
  305. package/src/components/IntegrationLogo/svg/events-api.tsx +0 -75
  306. package/src/components/IntegrationLogo/svg/gcp.tsx +0 -26
  307. package/src/components/IntegrationLogo/svg/github.tsx +0 -14
  308. package/src/components/IntegrationLogo/svg/gitlab.tsx +0 -40
  309. package/src/components/IntegrationLogo/svg/gsuite.tsx +0 -24
  310. package/src/components/IntegrationLogo/svg/index.ts +0 -23
  311. package/src/components/IntegrationLogo/svg/jamf.tsx +0 -36
  312. package/src/components/IntegrationLogo/svg/jira.tsx +0 -44
  313. package/src/components/IntegrationLogo/svg/jumpcloud.tsx +0 -86
  314. package/src/components/IntegrationLogo/svg/okta.tsx +0 -28
  315. package/src/components/IntegrationLogo/svg/onelogin.tsx +0 -34
  316. package/src/components/IntegrationLogo/svg/salesforce.tsx +0 -39
  317. package/src/components/IntegrationLogo/svg/servicenow.tsx +0 -18
  318. package/src/components/IntegrationLogo/svg/slack.tsx +0 -40
  319. package/src/components/IntegrationLogo/svg/wrapper.tsx +0 -35
  320. package/src/components/IntegrationLogo/svg/zoom.tsx +0 -51
  321. package/src/components/Meta/Meta.md +0 -14
  322. package/src/components/Meta/Meta.story.tsx +0 -24
  323. package/src/components/Meta/Meta.tsx +0 -29
  324. package/src/components/Meta/index.ts +0 -1
  325. package/src/components/Pagination/Pagination.story.mdx +0 -48
  326. package/src/components/Pagination/Pagination.tsx +0 -81
  327. package/src/components/Pagination/index.css +0 -41
  328. package/src/components/Pagination/index.ts +0 -1
  329. package/src/components/ProductIcon/ProductIcon.story.mdx +0 -50
  330. package/src/components/ProductIcon/ProductIcon.tsx +0 -48
  331. package/src/components/ProductIcon/ProductIconComply.tsx +0 -17
  332. package/src/components/ProductIcon/ProductIconDeploy.tsx +0 -17
  333. package/src/components/ProductIcon/ProductIconExchange.tsx +0 -17
  334. package/src/components/ProductIcon/ProductIconTrustCenter.tsx +0 -17
  335. package/src/components/ProductIcon/index.css +0 -13
  336. package/src/components/ProductIcon/index.ts +0 -1
  337. package/src/components/PropertyDiff/PropertDiff.story.mdx +0 -52
  338. package/src/components/PropertyDiff/PropertyDiff.tsx +0 -51
  339. package/src/components/PropertyDiff/index.css +0 -33
  340. package/src/components/PropertyDiff/index.ts +0 -1
  341. package/src/components/Relative/Relative.story.mdx +0 -34
  342. package/src/components/Relative/Relative.tsx +0 -12
  343. package/src/components/Relative/index.ts +0 -1
  344. package/src/components/SearchFilter/SearchFilter.story.mdx +0 -201
  345. package/src/components/SearchFilter/SearchFilter.tsx +0 -190
  346. package/src/components/SearchFilter/index.css +0 -83
  347. package/src/components/SearchFilter/index.ts +0 -1
  348. package/src/components/StatusLabel/StatusLabel.story.mdx +0 -325
  349. package/src/components/StatusLabel/StatusLabel.tsx +0 -121
  350. package/src/components/StatusLabel/index.css +0 -26
  351. package/src/components/StatusLabel/index.ts +0 -1
  352. package/src/components/StatusPanel/StatusPanel.story.mdx +0 -118
  353. package/src/components/StatusPanel/StatusPanel.tsx +0 -54
  354. package/src/components/StatusPanel/index.css +0 -52
  355. package/src/components/StatusPanel/index.ts +0 -1
  356. package/src/components/Sticky/Sticky.story.mdx +0 -34
  357. package/src/components/Sticky/Sticky.tsx +0 -12
  358. package/src/components/Sticky/index.ts +0 -1
  359. package/src/components/TopBar/TopBar.story.mdx +0 -157
  360. package/src/components/TopBar/TopBar.tsx +0 -43
  361. package/src/components/TopBar/TopBarBreadcrumbs.tsx +0 -82
  362. package/src/components/TopBar/TopBarSubNav.tsx +0 -22
  363. package/src/components/TopBar/TopBarSubNavItem.tsx +0 -24
  364. package/src/components/TopBar/index.css +0 -93
  365. package/src/components/TopBar/index.ts +0 -1
  366. package/src/components/VendorLogo/VendorLogo.story.mdx +0 -215
  367. package/src/components/VendorLogo/VendorLogo.tsx +0 -123
  368. package/src/components/VendorLogo/index.css +0 -46
  369. package/src/components/VendorLogo/index.ts +0 -1
  370. package/src/docs/brand-components/BrandButton.story.mdx +0 -106
  371. package/src/docs/brand-components/BrandCheckbox.story.mdx +0 -66
  372. package/src/docs/brand-components/BrandFormGroup.story.mdx +0 -79
  373. package/src/docs/brand-components/BrandRadio.story.mdx +0 -48
  374. package/src/docs/brand-components/BrandTextArea.story.mdx +0 -44
  375. package/src/recipes/TopBarNavigation.story.mdx +0 -114
  376. package/src/templates/Index.story.mdx +0 -177
@@ -1,81 +1,110 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
22
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
23
4
  };
24
5
  Object.defineProperty(exports, "__esModule", { value: true });
25
6
  exports.Tooltip = void 0;
26
- const react_1 = __importStar(require("react"));
27
- const classnames_1 = __importDefault(require("classnames"));
28
- const bem_1 = require("../../utilities/bem");
29
- const hooks_1 = require("../../hooks");
30
- const Popover_1 = require("../Popover");
7
+ const react_1 = __importDefault(require("react"));
8
+ const Overlay_1 = __importDefault(require("react-overlays/Overlay"));
9
+ const auto_id_1 = require("@reach/auto-id");
31
10
  const types_1 = require("../../types");
32
- const context_1 = require("./context");
33
- const cn = "Tooltip";
34
- const Tooltip = (props) => {
35
- const { isVisible: isVisibleProp = false, children, referenceElement, placement = "bottom", className, delay = 200, style, ...rest } = props;
36
- const { isOpen, onOpen, onClose } = hooks_1.useDisclosure(isVisibleProp);
37
- const isHoveringReferenceRef = react_1.useRef(false);
38
- const isHoveringPopoverRef = react_1.useRef(false);
39
- const referenceTimoutRef = react_1.useRef(null);
40
- const popoverTimoutRef = react_1.useRef(null);
41
- react_1.useEffect(() => {
42
- if (isVisibleProp) {
43
- onOpen();
11
+ const hooks_1 = require("../../hooks");
12
+ const utilities_1 = require("../../utilities");
13
+ const tokens_1 = require("../../style-dictionary/dist/tokens");
14
+ const Box_1 = require("../Box");
15
+ const cn = utilities_1.bemHOF("Tooltip");
16
+ const TooltipArrow = react_1.default.forwardRef(({ placement, style }, forwaredRef) => {
17
+ const generatePositionStyles = () => {
18
+ if (placement.startsWith("top")) {
19
+ return { bottom: `-${tokens_1.tokens.spacing[1]}`, left: 0 };
44
20
  }
45
- }, [isVisibleProp, onOpen]);
46
- react_1.useEffect(() => {
47
- return () => {
48
- if (referenceTimoutRef.current) {
49
- clearTimeout(referenceTimoutRef.current);
50
- }
51
- if (popoverTimoutRef.current) {
52
- clearTimeout(popoverTimoutRef.current);
53
- }
54
- };
55
- });
56
- const close = () => {
21
+ if (placement.startsWith("right")) {
22
+ return { left: `-${tokens_1.tokens.spacing[1]}`, top: 0 };
23
+ }
24
+ if (placement.startsWith("bottom")) {
25
+ return { top: `-${tokens_1.tokens.spacing[1]}`, left: 0 };
26
+ }
27
+ if (placement.startsWith("left")) {
28
+ return { right: `-${tokens_1.tokens.spacing[1]}`, top: 0 };
29
+ }
30
+ return {};
31
+ };
32
+ const positionStyles = generatePositionStyles();
33
+ return (react_1.default.createElement(Box_1.Box, { ref: forwaredRef, className: cn({ e: "arrow" }), style: {
34
+ ...style,
35
+ ...positionStyles,
36
+ } },
37
+ react_1.default.createElement(Box_1.Box, null)));
38
+ });
39
+ const Tooltip = ({ children, content, placement = "auto", delay = 200, }) => {
40
+ const { isOpen, onOpen, onClose } = hooks_1.useDisclosure();
41
+ const triggerRef = react_1.default.useRef(null);
42
+ const rootRef = react_1.default.useRef(null);
43
+ const id = `ads-tooltip-${auto_id_1.useId()}`;
44
+ const isHoveringTriggerRef = react_1.default.useRef(false);
45
+ const isHoveringPopoverRef = react_1.default.useRef(false);
46
+ const triggerTimoutRef = react_1.default.useRef(null);
47
+ const popoverTimoutRef = react_1.default.useRef(null);
48
+ const onHide = () => {
57
49
  if (!isHoveringPopoverRef.current) {
58
50
  onClose();
59
51
  }
60
52
  };
61
- const handleMouseEnter = () => {
62
- isHoveringReferenceRef.current = true;
53
+ const onHideDelay = () => {
54
+ isHoveringTriggerRef.current = false;
55
+ isHoveringPopoverRef.current = false;
56
+ if (isOpen) {
57
+ const popoverTimeout = setTimeout(onHide, delay);
58
+ popoverTimoutRef.current = popoverTimeout;
59
+ }
60
+ };
61
+ const onShow = () => {
62
+ if (!isOpen) {
63
+ onOpen();
64
+ }
65
+ };
66
+ const onShowDelay = () => {
67
+ isHoveringTriggerRef.current = true;
68
+ isHoveringPopoverRef.current = true;
63
69
  if (!isOpen) {
64
70
  const referenceTimeout = setTimeout(() => {
65
- if (isHoveringReferenceRef.current) {
71
+ if (isHoveringTriggerRef.current) {
66
72
  onOpen();
67
73
  }
68
74
  }, delay);
69
- referenceTimoutRef.current = referenceTimeout;
75
+ triggerTimoutRef.current = referenceTimeout;
70
76
  }
71
77
  };
72
- const handleMouseLeave = () => {
73
- isHoveringReferenceRef.current = false;
78
+ react_1.default.useEffect(() => {
79
+ return () => {
80
+ if (triggerTimoutRef.current) {
81
+ clearTimeout(triggerTimoutRef.current);
82
+ }
83
+ if (popoverTimoutRef.current) {
84
+ clearTimeout(popoverTimoutRef.current);
85
+ }
86
+ };
87
+ });
88
+ hooks_1.useKeyPress(types_1.KEY_CODE.ESC, () => {
74
89
  if (isOpen) {
75
- const popoverTimeout = setTimeout(close, delay);
76
- popoverTimoutRef.current = popoverTimeout;
90
+ onHide();
77
91
  }
78
- };
92
+ });
93
+ const triggerProps = ({ onMouseEnter, onMouseLeave, onMouseDown, onFocus, onBlur, onKeyDown, ...rest }) => ({
94
+ ref: triggerRef,
95
+ "aria-describedby": isOpen ? id : undefined,
96
+ onMouseEnter: utilities_1.mergeEventHandlers(onMouseEnter, onShowDelay),
97
+ onMouseLeave: utilities_1.mergeEventHandlers(onMouseLeave, onHideDelay),
98
+ onMouseDown: utilities_1.mergeEventHandlers(onMouseDown, onHideDelay),
99
+ onFocus: utilities_1.mergeEventHandlers(onFocus, onShow),
100
+ onBlur: utilities_1.mergeEventHandlers(onBlur, onHide),
101
+ onKeyDown: utilities_1.mergeEventHandlers(onKeyDown, (event) => {
102
+ if (event.key === "Enter" || event.key === " ") {
103
+ onHide();
104
+ }
105
+ }),
106
+ ...rest,
107
+ });
79
108
  const handlePopoverMouseEnter = () => {
80
109
  if (!isHoveringPopoverRef.current) {
81
110
  isHoveringPopoverRef.current = true;
@@ -84,48 +113,18 @@ const Tooltip = (props) => {
84
113
  const handlePopoverMouseLeave = () => {
85
114
  isHoveringPopoverRef.current = false;
86
115
  if (isOpen) {
87
- const popoverTimeout = setTimeout(close, delay);
116
+ const popoverTimeout = setTimeout(onHide, delay);
88
117
  popoverTimoutRef.current = popoverTimeout;
89
118
  }
90
119
  };
91
- hooks_1.useKeyPress(types_1.KEY_CODE.ESC, () => {
92
- if (isOpen && !isVisibleProp) {
93
- close();
94
- }
95
- });
96
- const referenceElementWithMouseHandlers = !isVisibleProp
97
- ? react_1.cloneElement(referenceElement, {
98
- onMouseEnter: () => {
99
- handleMouseEnter();
100
- if (typeof referenceElement.props.onMouseEnter === "function") {
101
- referenceElement.props.onMouseEnter();
102
- }
103
- },
104
- onMouseLeave: () => {
105
- handleMouseLeave();
106
- if (typeof referenceElement.props.onMouseLeave === "function") {
107
- referenceElement.props.onMouseLeave();
108
- }
109
- },
110
- onFocus: () => {
111
- handleMouseEnter();
112
- if (typeof referenceElement.props.onFocus === "function") {
113
- referenceElement.props.onFocus();
114
- }
115
- },
116
- onBlur: () => {
117
- handleMouseLeave();
118
- if (typeof referenceElement.props.onBlur === "function") {
119
- referenceElement.props.onBlur();
120
- }
121
- },
122
- tabIndex: 0,
123
- })
124
- : referenceElement;
125
- const context = react_1.useMemo(() => ({
126
- isOpen,
127
- }), [isOpen]);
128
- return children ? (react_1.default.createElement(context_1.TooltipContext.Provider, { value: context },
129
- react_1.default.createElement(Popover_1.Popover, Object.assign({ showArrow: true, isVisible: isOpen, referenceElement: referenceElementWithMouseHandlers, placement: placement, className: classnames_1.default(bem_1.bem(cn), className), onMouseEnter: !isVisibleProp ? handlePopoverMouseEnter : undefined, onMouseLeave: !isVisibleProp ? handlePopoverMouseLeave : undefined, style: style }, rest), children))) : (referenceElement);
120
+ return content ? (react_1.default.createElement(Box_1.Box, { ref: rootRef },
121
+ react_1.default.cloneElement(react_1.default.Children.only(children), {
122
+ ...triggerProps(children.props),
123
+ }),
124
+ content && (react_1.default.createElement(Overlay_1.default, { rootClose: true, show: isOpen, offset: [0, 8], onHide: onHide, container: rootRef, target: triggerRef, placement: placement, flip: placement && placement.indexOf("auto") !== -1 }, ({ props: contentProps, arrowProps, placement: overlayPlacement, }) => {
125
+ return (react_1.default.createElement(Box_1.Box, Object.assign({ id: id, className: cn(), "data-component": "tooltip", onMouseEnter: handlePopoverMouseEnter, onMouseLeave: handlePopoverMouseLeave }, contentProps),
126
+ react_1.default.createElement(TooltipArrow, { ref: arrowProps.ref, placement: overlayPlacement, style: arrowProps.style }),
127
+ content));
128
+ })))) : (children);
130
129
  };
131
130
  exports.Tooltip = Tooltip;