@stack-spot/portal-layout 0.0.64 → 1.0.0-dev.1768482785050

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 (383) hide show
  1. package/CHANGELOG.md +779 -0
  2. package/dist/Layout.d.ts +60 -8
  3. package/dist/Layout.d.ts.map +1 -1
  4. package/dist/Layout.js +59 -24
  5. package/dist/Layout.js.map +1 -1
  6. package/dist/LayoutOverlayManager.d.ts +274 -19
  7. package/dist/LayoutOverlayManager.d.ts.map +1 -1
  8. package/dist/LayoutOverlayManager.js +373 -82
  9. package/dist/LayoutOverlayManager.js.map +1 -1
  10. package/dist/WelcomeTour.d.ts +2 -0
  11. package/dist/WelcomeTour.d.ts.map +1 -0
  12. package/dist/WelcomeTour.js +8 -0
  13. package/dist/WelcomeTour.js.map +1 -0
  14. package/dist/components/Backdrop.d.ts +75 -0
  15. package/dist/components/Backdrop.d.ts.map +1 -0
  16. package/dist/components/Backdrop.js +69 -0
  17. package/dist/components/Backdrop.js.map +1 -0
  18. package/dist/components/Contact/show-contact-modal.d.ts +5 -0
  19. package/dist/components/Contact/show-contact-modal.d.ts.map +1 -0
  20. package/dist/components/Contact/show-contact-modal.js +37 -0
  21. package/dist/components/Contact/show-contact-modal.js.map +1 -0
  22. package/dist/components/ContactModal.d.ts +1 -0
  23. package/dist/components/ContactModal.d.ts.map +1 -0
  24. package/dist/components/ContactModal.js +2 -0
  25. package/dist/components/ContactModal.js.map +1 -0
  26. package/dist/components/Dialog.d.ts +54 -7
  27. package/dist/components/Dialog.d.ts.map +1 -1
  28. package/dist/components/Dialog.js +8 -2
  29. package/dist/components/Dialog.js.map +1 -1
  30. package/dist/components/Header.d.ts +38 -2
  31. package/dist/components/Header.d.ts.map +1 -1
  32. package/dist/components/Header.js +9 -4
  33. package/dist/components/Header.js.map +1 -1
  34. package/dist/components/NotificationCenter/NotificationPanel.d.ts +3 -0
  35. package/dist/components/NotificationCenter/NotificationPanel.d.ts.map +1 -0
  36. package/dist/components/NotificationCenter/NotificationPanel.js +19 -0
  37. package/dist/components/NotificationCenter/NotificationPanel.js.map +1 -0
  38. package/dist/components/NotificationCenter/NotificationPanelHeader.d.ts +3 -0
  39. package/dist/components/NotificationCenter/NotificationPanelHeader.d.ts.map +1 -0
  40. package/dist/components/NotificationCenter/NotificationPanelHeader.js +16 -0
  41. package/dist/components/NotificationCenter/NotificationPanelHeader.js.map +1 -0
  42. package/dist/components/NotificationCenter/NotificationsPanelFooter.d.ts +4 -0
  43. package/dist/components/NotificationCenter/NotificationsPanelFooter.d.ts.map +1 -0
  44. package/dist/components/NotificationCenter/NotificationsPanelFooter.js +12 -0
  45. package/dist/components/NotificationCenter/NotificationsPanelFooter.js.map +1 -0
  46. package/dist/components/NotificationCenter/dictionary.d.ts +2 -0
  47. package/dist/components/NotificationCenter/dictionary.d.ts.map +1 -0
  48. package/dist/components/NotificationCenter/dictionary.js +43 -0
  49. package/dist/components/NotificationCenter/dictionary.js.map +1 -0
  50. package/dist/components/NotificationCenter/index.d.ts +2 -0
  51. package/dist/components/NotificationCenter/index.d.ts.map +1 -0
  52. package/dist/components/NotificationCenter/index.js +34 -0
  53. package/dist/components/NotificationCenter/index.js.map +1 -0
  54. package/dist/components/NotificationCenter/styled.d.ts +3 -0
  55. package/dist/components/NotificationCenter/styled.d.ts.map +1 -0
  56. package/dist/components/NotificationCenter/styled.js +74 -0
  57. package/dist/components/NotificationCenter/styled.js.map +1 -0
  58. package/dist/components/NotificationCenter/types.d.ts +21 -0
  59. package/dist/components/NotificationCenter/types.d.ts.map +1 -0
  60. package/dist/components/NotificationCenter/types.js.map +1 -0
  61. package/dist/components/NotificationCenter/utils.d.ts +5 -0
  62. package/dist/components/NotificationCenter/utils.d.ts.map +1 -0
  63. package/dist/components/NotificationCenter/utils.js +18 -0
  64. package/dist/components/NotificationCenter/utils.js.map +1 -0
  65. package/dist/components/OverlayContent.d.ts +27 -1
  66. package/dist/components/OverlayContent.d.ts.map +1 -1
  67. package/dist/components/OverlayContent.js +8 -4
  68. package/dist/components/OverlayContent.js.map +1 -1
  69. package/dist/components/PortalSwitcher.d.ts +19 -1
  70. package/dist/components/PortalSwitcher.d.ts.map +1 -1
  71. package/dist/components/PortalSwitcher.js +16 -31
  72. package/dist/components/PortalSwitcher.js.map +1 -1
  73. package/dist/components/PrivacyPolicyMessage/hooks.d.ts +10 -0
  74. package/dist/components/PrivacyPolicyMessage/hooks.d.ts.map +1 -0
  75. package/dist/components/PrivacyPolicyMessage/hooks.js +33 -0
  76. package/dist/components/PrivacyPolicyMessage/hooks.js.map +1 -0
  77. package/dist/components/PrivacyPolicyMessage/index.d.ts +7 -0
  78. package/dist/components/PrivacyPolicyMessage/index.d.ts.map +1 -0
  79. package/dist/components/PrivacyPolicyMessage/index.js +5 -0
  80. package/dist/components/PrivacyPolicyMessage/index.js.map +1 -0
  81. package/dist/components/Rate/FeedbackModal.d.ts +8 -0
  82. package/dist/components/Rate/FeedbackModal.d.ts.map +1 -0
  83. package/dist/components/Rate/FeedbackModal.js +52 -0
  84. package/dist/components/Rate/FeedbackModal.js.map +1 -0
  85. package/dist/components/Rate/hook.d.ts +3 -0
  86. package/dist/components/Rate/hook.d.ts.map +1 -0
  87. package/dist/components/Rate/hook.js +48 -0
  88. package/dist/components/Rate/hook.js.map +1 -0
  89. package/dist/components/Rate/index.d.ts +10 -0
  90. package/dist/components/Rate/index.d.ts.map +1 -0
  91. package/dist/components/Rate/index.js +16 -0
  92. package/dist/components/Rate/index.js.map +1 -0
  93. package/dist/components/Rate/on-nps-submit.d.ts +7 -0
  94. package/dist/components/Rate/on-nps-submit.d.ts.map +1 -0
  95. package/dist/components/Rate/on-nps-submit.js +8 -0
  96. package/dist/components/Rate/on-nps-submit.js.map +1 -0
  97. package/dist/components/Rate/show-rate-us-modals.d.ts +17 -0
  98. package/dist/components/Rate/show-rate-us-modals.d.ts.map +1 -0
  99. package/dist/components/Rate/show-rate-us-modals.js +14 -0
  100. package/dist/components/Rate/show-rate-us-modals.js.map +1 -0
  101. package/dist/components/Rate/utils.d.ts +2 -0
  102. package/dist/components/Rate/utils.d.ts.map +1 -0
  103. package/dist/components/Rate/utils.js +10 -0
  104. package/dist/components/Rate/utils.js.map +1 -0
  105. package/dist/components/Toaster.d.ts +35 -0
  106. package/dist/components/Toaster.d.ts.map +1 -1
  107. package/dist/components/Toaster.js +32 -4
  108. package/dist/components/Toaster.js.map +1 -1
  109. package/dist/components/TypeForm/hook.d.ts +2 -0
  110. package/dist/components/TypeForm/hook.d.ts.map +1 -0
  111. package/dist/components/TypeForm/hook.js +11 -0
  112. package/dist/components/TypeForm/hook.js.map +1 -0
  113. package/dist/components/TypeForm/index.d.ts +6 -0
  114. package/dist/components/TypeForm/index.d.ts.map +1 -0
  115. package/dist/components/TypeForm/index.js +23 -0
  116. package/dist/components/TypeForm/index.js.map +1 -0
  117. package/dist/components/TypeForm/show-typeform-modal.d.ts +5 -0
  118. package/dist/components/TypeForm/show-typeform-modal.d.ts.map +1 -0
  119. package/dist/components/TypeForm/show-typeform-modal.js +11 -0
  120. package/dist/components/TypeForm/show-typeform-modal.js.map +1 -0
  121. package/dist/components/TypeForm/utils.d.ts +2 -0
  122. package/dist/components/TypeForm/utils.d.ts.map +1 -0
  123. package/dist/components/TypeForm/utils.js +9 -0
  124. package/dist/components/TypeForm/utils.js.map +1 -0
  125. package/dist/components/UserMenu.d.ts +19 -2
  126. package/dist/components/UserMenu.d.ts.map +1 -1
  127. package/dist/components/UserMenu.js +12 -6
  128. package/dist/components/UserMenu.js.map +1 -1
  129. package/dist/components/error/ErrorBoundary.d.ts +25 -4
  130. package/dist/components/error/ErrorBoundary.d.ts.map +1 -1
  131. package/dist/components/error/ErrorBoundary.js +10 -1
  132. package/dist/components/error/ErrorBoundary.js.map +1 -1
  133. package/dist/components/error/ErrorManager.d.ts +22 -6
  134. package/dist/components/error/ErrorManager.d.ts.map +1 -1
  135. package/dist/components/error/ErrorManager.js +21 -1
  136. package/dist/components/error/ErrorManager.js.map +1 -1
  137. package/dist/components/error/SilentErrorBoundary.d.ts +26 -5
  138. package/dist/components/error/SilentErrorBoundary.d.ts.map +1 -1
  139. package/dist/components/error/SilentErrorBoundary.js +10 -0
  140. package/dist/components/error/SilentErrorBoundary.js.map +1 -1
  141. package/dist/components/menu/MenuContent.d.ts +20 -547
  142. package/dist/components/menu/MenuContent.d.ts.map +1 -1
  143. package/dist/components/menu/MenuContent.js +89 -88
  144. package/dist/components/menu/MenuContent.js.map +1 -1
  145. package/dist/components/menu/MenuSectionGroup.d.ts +2 -0
  146. package/dist/components/menu/MenuSectionGroup.d.ts.map +1 -0
  147. package/dist/components/menu/MenuSectionGroup.js +121 -0
  148. package/dist/components/menu/MenuSectionGroup.js.map +1 -0
  149. package/dist/components/menu/MenuSections.d.ts +17 -0
  150. package/dist/components/menu/MenuSections.d.ts.map +1 -1
  151. package/dist/components/menu/MenuSections.js +159 -39
  152. package/dist/components/menu/MenuSections.js.map +1 -1
  153. package/dist/components/menu/PageSelector.d.ts +5 -0
  154. package/dist/components/menu/PageSelector.d.ts.map +1 -1
  155. package/dist/components/menu/PageSelector.js +9 -4
  156. package/dist/components/menu/PageSelector.js.map +1 -1
  157. package/dist/components/menu/types.d.ts +219 -8
  158. package/dist/components/menu/types.d.ts.map +1 -1
  159. package/dist/components/tour/StepContainer.d.ts +37 -0
  160. package/dist/components/tour/StepContainer.d.ts.map +1 -0
  161. package/dist/components/tour/StepContainer.js +51 -0
  162. package/dist/components/tour/StepContainer.js.map +1 -0
  163. package/dist/components/tour/StepNavigation.d.ts +29 -0
  164. package/dist/components/tour/StepNavigation.d.ts.map +1 -0
  165. package/dist/components/tour/StepNavigation.js +37 -0
  166. package/dist/components/tour/StepNavigation.js.map +1 -0
  167. package/dist/components/tour/StepTitle.d.ts +17 -0
  168. package/dist/components/tour/StepTitle.d.ts.map +1 -0
  169. package/dist/components/tour/StepTitle.js +10 -0
  170. package/dist/components/tour/StepTitle.js.map +1 -0
  171. package/dist/components/tour/hook.d.ts +3 -0
  172. package/dist/components/tour/hook.d.ts.map +1 -0
  173. package/dist/components/tour/hook.js +10 -0
  174. package/dist/components/tour/hook.js.map +1 -0
  175. package/dist/components/tour/index.d.ts +5 -0
  176. package/dist/components/tour/index.d.ts.map +1 -0
  177. package/dist/components/tour/index.js +5 -0
  178. package/dist/components/tour/index.js.map +1 -0
  179. package/dist/components/tour/manager.d.ts +34 -0
  180. package/dist/components/tour/manager.d.ts.map +1 -0
  181. package/dist/components/tour/manager.js +104 -0
  182. package/dist/components/tour/manager.js.map +1 -0
  183. package/dist/components/tour/utils.d.ts +66 -8
  184. package/dist/components/tour/utils.d.ts.map +1 -1
  185. package/dist/components/tour/utils.js +57 -45
  186. package/dist/components/tour/utils.js.map +1 -1
  187. package/dist/components/user-menu-manager.d.ts +13 -0
  188. package/dist/components/user-menu-manager.d.ts.map +1 -0
  189. package/dist/components/user-menu-manager.js +36 -0
  190. package/dist/components/user-menu-manager.js.map +1 -0
  191. package/dist/dictionary.d.ts +6 -1
  192. package/dist/dictionary.d.ts.map +1 -1
  193. package/dist/dictionary.js +7 -2
  194. package/dist/dictionary.js.map +1 -1
  195. package/dist/elements.d.ts +7 -0
  196. package/dist/elements.d.ts.map +1 -1
  197. package/dist/elements.js +7 -0
  198. package/dist/elements.js.map +1 -1
  199. package/dist/index.d.ts +15 -8
  200. package/dist/index.d.ts.map +1 -1
  201. package/dist/index.js +15 -8
  202. package/dist/index.js.map +1 -1
  203. package/dist/layout.css +190 -35
  204. package/dist/svg/StarFillWithGradient.d.ts +6 -0
  205. package/dist/svg/StarFillWithGradient.d.ts.map +1 -0
  206. package/dist/svg/StarFillWithGradient.js +4 -0
  207. package/dist/svg/StarFillWithGradient.js.map +1 -0
  208. package/dist/toaster.d.ts +55 -9
  209. package/dist/toaster.d.ts.map +1 -1
  210. package/dist/toaster.js +34 -6
  211. package/dist/toaster.js.map +1 -1
  212. package/dist/types.d.ts +5 -0
  213. package/dist/types.d.ts.map +1 -0
  214. package/dist/types.js +2 -0
  215. package/dist/types.js.map +1 -0
  216. package/dist/utils.d.ts +6 -69
  217. package/dist/utils.d.ts.map +1 -1
  218. package/dist/utils.js +9 -130
  219. package/dist/utils.js.map +1 -1
  220. package/package.dev.json +3 -0
  221. package/package.json +26 -15
  222. package/package.stg.json +3 -0
  223. package/readme.md +147 -0
  224. package/src/Layout.tsx +166 -57
  225. package/src/LayoutOverlayManager.tsx +499 -85
  226. package/src/WelcomeTour.tsx +8 -0
  227. package/src/components/Backdrop.tsx +116 -0
  228. package/src/components/Contact/show-contact-modal.tsx +71 -0
  229. package/src/components/Dialog.tsx +58 -9
  230. package/src/components/Header.tsx +53 -5
  231. package/src/components/NotificationCenter/NotificationPanel.tsx +40 -0
  232. package/src/components/NotificationCenter/NotificationPanelHeader.tsx +53 -0
  233. package/src/components/NotificationCenter/NotificationsPanelFooter.tsx +25 -0
  234. package/src/components/NotificationCenter/dictionary.ts +44 -0
  235. package/src/components/NotificationCenter/index.tsx +58 -0
  236. package/src/components/NotificationCenter/styled.ts +75 -0
  237. package/src/components/NotificationCenter/types.ts +24 -0
  238. package/src/components/NotificationCenter/utils.ts +20 -0
  239. package/src/components/OverlayContent.tsx +40 -5
  240. package/src/components/PortalSwitcher.tsx +33 -39
  241. package/src/components/PrivacyPolicyMessage/hooks.tsx +49 -0
  242. package/src/components/PrivacyPolicyMessage/index.tsx +21 -0
  243. package/src/components/Rate/FeedbackModal.tsx +86 -0
  244. package/src/components/Rate/hook.tsx +61 -0
  245. package/src/components/Rate/index.tsx +36 -0
  246. package/src/components/Rate/on-nps-submit.ts +18 -0
  247. package/src/components/Rate/show-rate-us-modals.tsx +29 -0
  248. package/src/components/Rate/utils.ts +11 -0
  249. package/src/components/Toaster.tsx +82 -3
  250. package/src/components/TypeForm/hook.tsx +13 -0
  251. package/src/components/TypeForm/index.tsx +50 -0
  252. package/src/components/TypeForm/show-typeform-modal.tsx +10 -0
  253. package/src/components/TypeForm/utils.ts +8 -0
  254. package/src/components/UserMenu.tsx +32 -8
  255. package/src/components/error/ErrorBoundary.tsx +11 -2
  256. package/src/components/error/ErrorManager.ts +22 -6
  257. package/src/components/error/SilentErrorBoundary.tsx +12 -2
  258. package/src/components/menu/MenuContent.tsx +102 -110
  259. package/src/components/menu/MenuSectionGroup.tsx +121 -0
  260. package/src/components/menu/MenuSections.tsx +342 -93
  261. package/src/components/menu/PageSelector.tsx +16 -4
  262. package/src/components/menu/types.ts +221 -9
  263. package/src/components/tour/StepContainer.tsx +92 -0
  264. package/src/components/tour/StepNavigation.tsx +72 -0
  265. package/src/components/tour/StepTitle.tsx +28 -0
  266. package/src/components/tour/hook.ts +12 -0
  267. package/src/components/tour/index.ts +6 -0
  268. package/src/components/tour/manager.tsx +119 -0
  269. package/src/components/tour/utils.tsx +119 -0
  270. package/src/components/user-menu-manager.ts +31 -0
  271. package/src/dictionary.ts +7 -2
  272. package/src/elements.ts +7 -0
  273. package/src/index.ts +15 -8
  274. package/src/layout.css +190 -35
  275. package/src/svg/StarFillWithGradient.tsx +14 -0
  276. package/src/toaster.tsx +90 -13
  277. package/src/types.ts +4 -0
  278. package/src/utils.ts +9 -142
  279. package/dist/components/BottomNotification.d.ts +0 -1
  280. package/dist/components/BottomNotification.d.ts.map +0 -1
  281. package/dist/components/BottomNotification.js +0 -2
  282. package/dist/components/BottomNotification.js.map +0 -1
  283. package/dist/components/BottomPanel.d.ts +0 -1
  284. package/dist/components/BottomPanel.d.ts.map +0 -1
  285. package/dist/components/BottomPanel.js +0 -2
  286. package/dist/components/BottomPanel.js.map +0 -1
  287. package/dist/components/SelectionList.d.ts +0 -36
  288. package/dist/components/SelectionList.d.ts.map +0 -1
  289. package/dist/components/SelectionList.js +0 -140
  290. package/dist/components/SelectionList.js.map +0 -1
  291. package/dist/components/error/ErrorDescriptor.d.ts +0 -12
  292. package/dist/components/error/ErrorDescriptor.d.ts.map +0 -1
  293. package/dist/components/error/ErrorDescriptor.js +0 -17
  294. package/dist/components/error/ErrorDescriptor.js.map +0 -1
  295. package/dist/components/error/ErrorFeedback.d.ts +0 -3
  296. package/dist/components/error/ErrorFeedback.d.ts.map +0 -1
  297. package/dist/components/error/ErrorFeedback.js +0 -66
  298. package/dist/components/error/ErrorFeedback.js.map +0 -1
  299. package/dist/components/menu/use-check-text-overflow.d.ts +0 -6
  300. package/dist/components/menu/use-check-text-overflow.d.ts.map +0 -1
  301. package/dist/components/menu/use-check-text-overflow.js +0 -20
  302. package/dist/components/menu/use-check-text-overflow.js.map +0 -1
  303. package/dist/components/menu/use-keyboard-controls.d.ts +0 -23
  304. package/dist/components/menu/use-keyboard-controls.d.ts.map +0 -1
  305. package/dist/components/menu/use-keyboard-controls.js +0 -49
  306. package/dist/components/menu/use-keyboard-controls.js.map +0 -1
  307. package/dist/components/menu/useCheckTextOverflow.d.ts +0 -6
  308. package/dist/components/menu/useCheckTextOverflow.d.ts.map +0 -1
  309. package/dist/components/menu/useCheckTextOverflow.js +0 -20
  310. package/dist/components/menu/useCheckTextOverflow.js.map +0 -1
  311. package/dist/components/tour/Navigation.d.ts +0 -8
  312. package/dist/components/tour/Navigation.d.ts.map +0 -1
  313. package/dist/components/tour/Navigation.js +0 -15
  314. package/dist/components/tour/Navigation.js.map +0 -1
  315. package/dist/components/tour/PortalSwitcherStep.d.ts +0 -3
  316. package/dist/components/tour/PortalSwitcherStep.d.ts.map +0 -1
  317. package/dist/components/tour/PortalSwitcherStep.js +0 -29
  318. package/dist/components/tour/PortalSwitcherStep.js.map +0 -1
  319. package/dist/components/tour/config.d.ts +0 -3
  320. package/dist/components/tour/config.d.ts.map +0 -1
  321. package/dist/components/tour/config.js +0 -22
  322. package/dist/components/tour/config.js.map +0 -1
  323. package/dist/components/tour/steps/PortalSwitcherStep.d.ts +0 -3
  324. package/dist/components/tour/steps/PortalSwitcherStep.d.ts.map +0 -1
  325. package/dist/components/tour/steps/PortalSwitcherStep.js +0 -30
  326. package/dist/components/tour/steps/PortalSwitcherStep.js.map +0 -1
  327. package/dist/components/types.d.ts +0 -15
  328. package/dist/components/types.d.ts.map +0 -1
  329. package/dist/components/types.js.map +0 -1
  330. package/dist/layout-context.d.ts +0 -10
  331. package/dist/layout-context.d.ts.map +0 -1
  332. package/dist/layout-context.js +0 -11
  333. package/dist/layout-context.js.map +0 -1
  334. package/dist/svg/AI.d.ts +0 -6
  335. package/dist/svg/AI.d.ts.map +0 -1
  336. package/dist/svg/AI.js +0 -9
  337. package/dist/svg/AI.js.map +0 -1
  338. package/dist/svg/EDP.d.ts +0 -6
  339. package/dist/svg/EDP.d.ts.map +0 -1
  340. package/dist/svg/EDP.js +0 -5
  341. package/dist/svg/EDP.js.map +0 -1
  342. package/dist/svg/Forbidden.d.ts +0 -6
  343. package/dist/svg/Forbidden.d.ts.map +0 -1
  344. package/dist/svg/Forbidden.js +0 -4
  345. package/dist/svg/Forbidden.js.map +0 -1
  346. package/dist/svg/HUB.d.ts +0 -6
  347. package/dist/svg/HUB.d.ts.map +0 -1
  348. package/dist/svg/HUB.js +0 -5
  349. package/dist/svg/HUB.js.map +0 -1
  350. package/dist/svg/Logo.d.ts +0 -2
  351. package/dist/svg/Logo.d.ts.map +0 -1
  352. package/dist/svg/Logo.js +0 -4
  353. package/dist/svg/Logo.js.map +0 -1
  354. package/dist/svg/NotFound.d.ts +0 -6
  355. package/dist/svg/NotFound.d.ts.map +0 -1
  356. package/dist/svg/NotFound.js +0 -4
  357. package/dist/svg/NotFound.js.map +0 -1
  358. package/dist/svg/ServerError.d.ts +0 -6
  359. package/dist/svg/ServerError.d.ts.map +0 -1
  360. package/dist/svg/ServerError.js +0 -4
  361. package/dist/svg/ServerError.js.map +0 -1
  362. package/dist/svg/Unauthenticated.d.ts +0 -6
  363. package/dist/svg/Unauthenticated.d.ts.map +0 -1
  364. package/dist/svg/Unauthenticated.js +0 -4
  365. package/dist/svg/Unauthenticated.js.map +0 -1
  366. package/src/components/BottomPanel.tsx +0 -0
  367. package/src/components/SelectionList.tsx +0 -272
  368. package/src/components/error/ErrorFeedback.tsx +0 -114
  369. package/src/components/menu/use-check-text-overflow.tsx +0 -26
  370. package/src/components/menu/use-keyboard-controls.tsx +0 -70
  371. package/src/components/tour/PortalSwitcherStep.tsx +0 -36
  372. package/src/components/types.ts +0 -15
  373. package/src/layout-context.tsx +0 -22
  374. package/src/svg/AI.tsx +0 -37
  375. package/src/svg/EDP.tsx +0 -35
  376. package/src/svg/Forbidden.tsx +0 -22
  377. package/src/svg/HUB.tsx +0 -35
  378. package/src/svg/Logo.tsx +0 -35
  379. package/src/svg/NotFound.tsx +0 -16
  380. package/src/svg/ServerError.tsx +0 -33
  381. package/src/svg/Unauthenticated.tsx +0 -16
  382. /package/dist/components/{types.js → NotificationCenter/types.js} +0 -0
  383. /package/src/components/{BottomNotification.tsx → ContactModal.tsx} +0 -0
@@ -1,5 +1,5 @@
1
+ import { Action } from '@stack-spot/portal-components/SelectionList';
1
2
  import { ReactElement, ReactNode } from 'react';
2
- import { Action } from '../types.js';
3
3
  interface BaseMenuItem {
4
4
  hidden?: boolean;
5
5
  /**
@@ -17,40 +17,105 @@ interface BaseMenuItem {
17
17
  overflow?: 'hidden' | 'wrap' | 'ellipsis';
18
18
  }
19
19
  export interface ItemGroup extends BaseMenuItem {
20
+ /**
21
+ * The label for this group.
22
+ */
20
23
  label: string;
24
+ /**
25
+ * The items in this group.
26
+ */
21
27
  children: MenuItem[];
28
+ /**
29
+ * Whether it should start opened or not.
30
+ */
22
31
  open?: boolean;
32
+ showAsTitle?: boolean;
23
33
  }
24
34
  export interface MenuAction extends Action, BaseMenuItem {
35
+ /**
36
+ * Whether this menu item is currently active or not.
37
+ */
25
38
  active?: boolean;
26
39
  }
27
40
  export type MenuItem = ItemGroup | MenuAction;
28
- export interface MenuButton extends Action {
29
- icon?: ReactElement;
30
- }
31
41
  export interface SelectorItem extends Action {
42
+ /**
43
+ * A unique id for this item.
44
+ */
32
45
  key: string;
46
+ /**
47
+ * An icon to place at the left side of the item.
48
+ */
33
49
  icon?: ReactElement;
34
50
  }
35
51
  export interface Selector {
52
+ /**
53
+ * The current value. Must correspond to a `key` in `options`.
54
+ */
36
55
  value?: string;
56
+ /**
57
+ * A series of options to show in the selector.
58
+ */
37
59
  options: SelectorItem[];
60
+ /**
61
+ * An extra button to show after the list of options.
62
+ */
38
63
  button?: Action;
64
+ /**
65
+ * A title of this selector.
66
+ */
39
67
  title?: string;
68
+ /**
69
+ * A subtitle for this selector.
70
+ */
40
71
  subtitle?: string;
72
+ /**
73
+ * Whether or not the options for this selector are loading.
74
+ */
41
75
  loading?: boolean;
42
76
  }
43
77
  export interface MenuSectionContent {
78
+ /**
79
+ * A link to go back.
80
+ */
44
81
  goBack?: Action;
82
+ /**
83
+ * A title for this menu.
84
+ */
45
85
  title?: string;
86
+ /**
87
+ * A subtitle for this menu.
88
+ */
46
89
  subtitle?: string;
90
+ /**
91
+ * A custom React Node to add right after the menu title.
92
+ */
47
93
  afterTitle?: React.ReactNode;
94
+ /**
95
+ * A page selector.
96
+ */
48
97
  pageSelector?: Selector;
98
+ /**
99
+ * The menu options, may contain subgroups.
100
+ */
49
101
  options?: MenuItem[];
102
+ /**
103
+ * Whether or not the options for this menu are loading.
104
+ */
50
105
  loading?: boolean;
106
+ /**
107
+ * An error to show instead of the menu.
108
+ */
51
109
  error?: string;
52
110
  }
53
111
  export interface MenuSection extends Action {
112
+ /**
113
+ * Type should not be present in menu section items
114
+ */
115
+ type?: never;
116
+ /**
117
+ * The icon for this section.
118
+ */
54
119
  icon: ReactElement;
55
120
  /**
56
121
  * The content or a function that creates the content.
@@ -65,29 +130,168 @@ export interface MenuSection extends Action {
65
130
  * This should be used when the content you want to render is not the default content
66
131
  */
67
132
  customContent?: ReactNode;
133
+ /**
134
+ * Whether or not this section is currently active.
135
+ */
68
136
  active?: boolean;
69
- onOpen?: () => void;
137
+ /**
138
+ * A css class to pass to the <li> tag.
139
+ */
70
140
  className?: string;
71
141
  hidden?: boolean;
142
+ /**
143
+ * The items in this group. This property will create a accordion to include the items
144
+ */
145
+ children?: MenuSection[];
146
+ /**
147
+ * initial value to accordion when using children prop
148
+ */
149
+ open?: boolean;
150
+ /**
151
+ * Badge to show at the right of the item.
152
+ */
153
+ badge?: ReactElement;
154
+ /**
155
+ * If true, when the section menu is collapsed, if this item has children, it will be replaced by its children and lose the
156
+ * collapse/expand behavior.
157
+ * @default true
158
+ */
159
+ replaceWithChildrenWhenCollapsed?: boolean;
160
+ }
161
+ export interface MenuSectionCustomItem {
162
+ /**
163
+ * Type to indicate the element is a custom item.
164
+ */
165
+ type: 'custom-element';
166
+ /**
167
+ * Children to be rendered
168
+ */
169
+ children?: ReactNode;
170
+ /**
171
+ * A css class to pass to the <div> tag.
172
+ */
173
+ className?: string;
174
+ /**
175
+ * A boolean indicating whether or not the element should be visible.
176
+ */
177
+ hidden?: boolean;
178
+ /**
179
+ * The icon for this section.
180
+ */
181
+ icon: ReactElement;
182
+ content?: never;
183
+ customContent?: never;
184
+ active?: never;
185
+ open?: never;
186
+ badge?: never;
187
+ label?: never;
188
+ onClick?: never;
189
+ href?: never;
190
+ target?: never;
191
+ lang?: never;
192
+ hrefLang?: never;
193
+ title?: never;
72
194
  }
73
195
  interface BaseMenuProps {
74
- sections?: MenuSection[];
196
+ /**
197
+ * The sections of the menu.
198
+ */
199
+ sections?: (MenuSection | MenuSectionCustomItem)[];
200
+ /**
201
+ * The content of the menu as a React Element. Use this to create anything you want as the menu content, but prefer using `content`
202
+ * instead, which is a predefined menu.
203
+ */
75
204
  customContent?: ReactNode;
205
+ /**
206
+ * Options for the settings button.
207
+ */
76
208
  settings?: {
209
+ /**
210
+ * Whether or not to show the settings button.
211
+ */
77
212
  show?: boolean;
213
+ /**
214
+ * A function to call when the button is clicked.
215
+ */
78
216
  onClick?: () => void;
217
+ /**
218
+ * A url to go to when the button is clicked.
219
+ */
79
220
  href?: string;
221
+ /**
222
+ * Whether or not this button represents the page currently active.
223
+ */
80
224
  active?: boolean;
225
+ /**
226
+ * A css class to pass to the button.
227
+ */
81
228
  className?: string;
82
229
  };
230
+ /**
231
+ * Options for the rate button.
232
+ */
233
+ rateUs?: {
234
+ /**
235
+ * Whether or not to show the rate button.
236
+ */
237
+ show?: boolean;
238
+ /**
239
+ * A function to call when the button is clicked.
240
+ */
241
+ onClick?: () => void;
242
+ /**
243
+ * A url to go to when the button is clicked.
244
+ */
245
+ href?: string;
246
+ /**
247
+ * Whether or not this button represents the page currently active.
248
+ */
249
+ active?: boolean;
250
+ /**
251
+ * A css class to pass to the button.
252
+ */
253
+ className?: string;
254
+ };
255
+ /**
256
+ * Options for the contact us button.
257
+ */
258
+ contactUs?: {
259
+ /**
260
+ * Whether or not to show the rate button.
261
+ */
262
+ show?: boolean;
263
+ /**
264
+ * A function to call when the button is clicked.
265
+ */
266
+ onClick?: () => void;
267
+ /**
268
+ * A url to go to when the button is clicked.
269
+ */
270
+ href?: string;
271
+ /**
272
+ * Whether or not this button represents the page currently active.
273
+ */
274
+ active?: boolean;
275
+ /**
276
+ * A css class to pass to the button.
277
+ */
278
+ className?: string;
279
+ /**
280
+ * Target of the URL to open.
281
+ */
282
+ target?: React.AnchorHTMLAttributes<HTMLAnchorElement>['target'];
283
+ };
83
284
  }
84
285
  export interface MenuPropsWithStaticContent extends BaseMenuProps {
286
+ /**
287
+ * The config for creating the menu content.
288
+ */
85
289
  content?: MenuSectionContent;
86
290
  }
87
291
  export interface MenuPropsWithDynamicContent extends BaseMenuProps {
88
292
  /**
89
- * The function that creates the content. It will be called only when the content is rendered, i.e. only when the content really needs to
90
- * be rendered.
293
+ * The function that creates a config to render a menu content. It will be called only when the content is rendered, i.e. only when the
294
+ * content really needs to be rendered.
91
295
  *
92
296
  * Tip: this function can be a React Hook.
93
297
  */
@@ -96,6 +300,13 @@ export interface MenuPropsWithDynamicContent extends BaseMenuProps {
96
300
  * Identifies each content that might be rendered by the menu. This prevents React Hook errors when the content is a React Hook function.
97
301
  */
98
302
  contentKey: React.Key;
303
+ /**
304
+ * The function that creates a config to render a third level nav menu content. It will be called only when the content is rendered,
305
+ * i.e. only when the content really needs to be rendered.
306
+ *
307
+ * Tip: this function can be a React Hook.
308
+ */
309
+ innerContent?: MenuSectionContent | (() => MenuSectionContent | undefined);
99
310
  }
100
311
  export type MenuProps = MenuPropsWithStaticContent | MenuPropsWithDynamicContent;
101
312
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/menu/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,UAAU,YAAY;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;CAC3C;AAED,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,UAAW,SAAQ,MAAM,EAAE,YAAY;IACtD,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAA;AAE7C,MAAM,WAAW,UAAW,SAAQ,MAAM;IACxC,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED,MAAM,WAAW,YAAa,SAAQ,MAAM;IAC1C,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,MAAM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KACpB,CAAC;IACF;;OAEG;IACH,MAAM,CAAC,EAAE;QACP;;WAEG;QACH,IAAI,CAAC,EAAE,OAAO,CAAC;QACf;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF;;OAEG;IACH,SAAS,CAAC,EAAE;QACV;;WAEG;QACH,IAAI,CAAC,EAAE,OAAO,CAAC;QACf;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB;;WAEG;QACH,MAAM,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC;KAClE,CAAC;CACH;AAED,MAAM,WAAW,0BAA2B,SAAQ,aAAa;IAC/D;;OAEG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B;AAED,MAAM,WAAW,2BAA4B,SAAQ,aAAa;IAChE;;;;;OAKG;IACH,OAAO,EAAE,kBAAkB,GAAG,CAAC,MAAM,kBAAkB,CAAC,CAAC;IACzD;;OAEG;IACH,UAAU,EAAE,KAAK,CAAC,GAAG,CAAC;IACtB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,kBAAkB,GAAG,CAAC,MAAM,kBAAkB,GAAG,SAAS,CAAC,CAAC;CAC5E;AAED,MAAM,MAAM,SAAS,GAAG,0BAA0B,GAAG,2BAA2B,CAAA"}
@@ -0,0 +1,37 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { NavigationProps } from './StepNavigation.js';
3
+ interface StepContainerProps {
4
+ children: ReactNode;
5
+ /**
6
+ * The unique identifier for the step.
7
+ */
8
+ stepKey: string;
9
+ /**
10
+ * The title for the step.
11
+ */
12
+ title: string;
13
+ /**
14
+ * The position of the tour overlay related to the content being explained.
15
+ */
16
+ position?: PointingArrowPosition;
17
+ /**
18
+ * The CSS 'right' property to adjust the horizontal position of the overlay.
19
+ */
20
+ right?: React.CSSProperties['right'];
21
+ /**
22
+ * The CSS 'top' property to adjust the vertical position of the overlay.
23
+ */
24
+ top?: React.CSSProperties['top'];
25
+ /**
26
+ * A customizable set of buttons for navigating the tour steps.
27
+ */
28
+ customNavigation?: Omit<NavigationProps, 'stepKey'>;
29
+ }
30
+ /**
31
+ * Tutorial: the overlay component for showing a step on React Tour.
32
+ * @param props the react props for the component {@link StepContainerProps}.
33
+ */
34
+ export declare const StepContainer: ({ title, stepKey, customNavigation, position, top, right, children }: StepContainerProps) => import("react/jsx-runtime").JSX.Element;
35
+ export type PointingArrowPosition = 'right' | 'top' | 'left' | 'bottom';
36
+ export {};
37
+ //# sourceMappingURL=StepContainer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StepContainer.d.ts","sourceRoot":"","sources":["../../../src/components/tour/StepContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAExC,OAAO,EAAE,eAAe,EAAkB,MAAM,kBAAkB,CAAA;AAIlE,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IACjC;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACrC;;OAEG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACjC;;OAEG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;CACrD;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,sEAAiF,kBAAkB,4CAShI,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAA"}
@@ -0,0 +1,51 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { theme } from '@stack-spot/portal-theme';
3
+ import { styled } from 'styled-components';
4
+ import { StepNavigation } from './StepNavigation.js';
5
+ import { StepTitle } from './StepTitle.js';
6
+ import { useTour } from './hook.js';
7
+ /**
8
+ * Tutorial: the overlay component for showing a step on React Tour.
9
+ * @param props the react props for the component {@link StepContainerProps}.
10
+ */
11
+ export const StepContainer = ({ title, stepKey, customNavigation, position = 'bottom', top, right, children }) => {
12
+ const { closeTour } = useTour();
13
+ return (_jsxs(BoxWithPointingArrow, { "$position": position, "$top": top, "$right": right, children: [_jsx(StepTitle, { title: title, onClose: () => closeTour() }), children, _jsx(StepNavigation, { stepKey: stepKey, ...(customNavigation || {}) })] }));
14
+ };
15
+ const BoxWithPointingArrow = styled.div `
16
+ position: relative;
17
+ width: 100%;
18
+ background-color: ${theme.color.inverse[500]};
19
+ &::after {
20
+ content: '';
21
+ position: absolute;
22
+ border-width: 10px;
23
+ border-style: solid;
24
+ border-color: transparent;
25
+ border-right-color: ${theme.color.inverse[500]};
26
+ ${({ $position, $top }) => $position === 'right' ?
27
+ `
28
+ top: ${$top || '16px'};
29
+ right: 100%;
30
+ ` : ''}
31
+ ${({ $position, $right }) => $position === 'top' ?
32
+ `
33
+ top: 100%;
34
+ right: ${$right || '16px'};
35
+ transform: rotate(-90deg);
36
+ ` : ''}
37
+ ${({ $position, $top }) => $position === 'left' ?
38
+ `
39
+ top: ${$top || '16px'};
40
+ left: 100%;
41
+ transform: rotate(180deg);
42
+ ` : ''}
43
+ ${({ $position, $right }) => $position === 'bottom' ?
44
+ `
45
+ bottom: 100%;
46
+ right: ${$right || '16px'};
47
+ transform: rotate(90deg);
48
+ ` : ''}
49
+ }
50
+ `;
51
+ //# sourceMappingURL=StepContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StepContainer.js","sourceRoot":"","sources":["../../../src/components/tour/StepContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC1C,OAAO,EAAmB,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AA8BhC;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,GAAG,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAsB,EAAE,EAAE;IACnI,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,EAAE,CAAA;IAC/B,OAAO,CACL,MAAC,oBAAoB,iBAAY,QAAQ,UAAQ,GAAG,YAAU,KAAK,aACjE,KAAC,SAAS,IAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,GAAI,EACtD,QAAQ,EACT,KAAC,cAAc,IAAC,OAAO,EAAE,OAAO,KAAM,CAAC,gBAAgB,IAAI,EAAE,CAAC,GAAI,IAC7C,CACxB,CAAA;AACH,CAAC,CAAA;AAID,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAInC;;;sBAGkB,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;;;;;;;0BAOpB,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;MAC5C,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,SAAS,KAAK,OAAO,CAAC,CAAC;IAClD;aACS,IAAI,IAAI,MAAM;;KAEtB,CAAC,CAAC,CAAC,EAAE;MACJ,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,SAAS,KAAK,KAAK,CAAC,CAAC;IAClD;;aAES,MAAM,IAAI,MAAM;;KAExB,CAAC,CAAC,CAAC,EAAE;MACJ,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC;IACjD;aACS,IAAI,IAAI,MAAM;;;KAGtB,CAAC,CAAC,CAAC,EAAE;MACJ,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC;IACrD;;aAES,MAAM,IAAI,MAAM;;KAExB,CAAC,CAAC,CAAC,EAAE;;CAET,CAAA"}
@@ -0,0 +1,29 @@
1
+ import '@stack-spot/portal-theme/dist/theme.css';
2
+ interface CustomNavigationButton {
3
+ /**
4
+ * The text content to render.
5
+ */
6
+ text: string;
7
+ onClick?: () => void;
8
+ }
9
+ export interface NavigationProps {
10
+ /**
11
+ * The unique identifier of the step.
12
+ */
13
+ stepKey: string;
14
+ /**
15
+ * The text and click handler for the button "next".
16
+ */
17
+ nextButton?: CustomNavigationButton;
18
+ /**
19
+ * The text and click handler for the button "previous".
20
+ */
21
+ prevButton?: CustomNavigationButton;
22
+ }
23
+ /**
24
+ * Tutorial: the component in a React Tour overlay that shows the next and previous buttons (for step navigation).
25
+ * @param props the react props for the component {@link NavigationProps}.
26
+ */
27
+ export declare const StepNavigation: ({ stepKey, nextButton, prevButton }: NavigationProps) => import("react/jsx-runtime").JSX.Element;
28
+ export {};
29
+ //# sourceMappingURL=StepNavigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StepNavigation.d.ts","sourceRoot":"","sources":["../../../src/components/tour/StepNavigation.tsx"],"names":[],"mappings":"AACA,OAAO,yCAAyC,CAAA;AAIhD,UAAU,sBAAsB;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC;;OAEG;IACH,UAAU,CAAC,EAAE,sBAAsB,CAAC;CACrC;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,qCAAqC,eAAe,4CAwBlF,CAAA"}
@@ -0,0 +1,37 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { Button, Flex, Text } from '@citric/core';
3
+ import '@stack-spot/portal-theme/dist/theme.css';
4
+ import { useTranslate } from '@stack-spot/portal-translate';
5
+ import { useTour } from './hook.js';
6
+ /**
7
+ * Tutorial: the component in a React Tour overlay that shows the next and previous buttons (for step navigation).
8
+ * @param props the react props for the component {@link NavigationProps}.
9
+ */
10
+ export const StepNavigation = ({ stepKey, nextButton, prevButton }) => {
11
+ const { currentStep, steps, prevStep, finishStep } = useTour();
12
+ const t = useTranslate(translations);
13
+ return _jsxs(Flex, { w: 12, px: 5, py: 2, mt: "-1px", bg: "inverse.500", justifyContent: "space-between", alignItems: "center", children: [steps.length > 1 &&
14
+ _jsxs(Text, { appearance: "microtext1", colorScheme: "inverse.contrastText", children: [currentStep + 1, " ", t.of, " ", steps.length] }), _jsxs(Flex, { sx: { gap: '8px' }, children: [currentStep >= 1 &&
15
+ _jsx(Button, { sx: { paddingInline: '20px' }, onClick: () => {
16
+ prevStep?.();
17
+ prevButton?.onClick?.();
18
+ }, size: "sm", appearance: "text", colorScheme: "light", children: prevButton?.text || t.back }), _jsx(Button, { sx: { paddingInline: '20px' }, onClick: () => {
19
+ nextButton?.onClick?.();
20
+ finishStep(stepKey);
21
+ }, size: "sm", colorScheme: "light", children: nextButton?.text || (currentStep < steps.length - 1 ? t.next : t.done) })] })] });
22
+ };
23
+ const translations = {
24
+ en: {
25
+ of: 'of',
26
+ back: 'Back',
27
+ next: 'Next',
28
+ done: 'Done',
29
+ },
30
+ pt: {
31
+ of: 'de',
32
+ back: 'Voltar',
33
+ next: 'Próximo',
34
+ done: 'Finalizado',
35
+ },
36
+ };
37
+ //# sourceMappingURL=StepNavigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StepNavigation.js","sourceRoot":"","sources":["../../../src/components/tour/StepNavigation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,yCAAyC,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAyBhC;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAmB,EAAE,EAAE;IACrF,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,OAAO,EAAE,CAAA;IAC9D,MAAM,CAAC,GAAG,YAAY,CAAC,YAAY,CAAC,CAAA;IAEpC,OAAO,MAAC,IAAI,IAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAC,MAAM,EAAC,EAAE,EAAC,aAAa,EAAC,cAAc,EAAC,eAAe,EAAC,UAAU,EAAC,QAAQ,aAC3G,KAAK,CAAC,MAAM,GAAG,CAAC;gBAChB,MAAC,IAAI,IAAC,UAAU,EAAC,YAAY,EAAC,WAAW,EAAC,sBAAsB,aAAE,WAAW,GAAG,CAAC,OAAG,CAAC,CAAC,EAAE,OAAG,KAAK,CAAC,MAAM,IAAQ,EAEjH,MAAC,IAAI,IAAC,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,aACrB,WAAW,IAAI,CAAC;wBACf,KAAC,MAAM,IAAC,EAAE,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE;gCACnD,QAAQ,EAAE,EAAE,CAAA;gCACZ,UAAU,EAAE,OAAO,EAAE,EAAE,CAAA;4BACzB,CAAC,EAAE,IAAI,EAAC,IAAI,EAAC,UAAU,EAAC,MAAM,EAAC,WAAW,EAAC,OAAO,YAC/C,UAAU,EAAE,IAAI,IAAI,CAAC,CAAC,IAAI,GACpB,EACX,KAAC,MAAM,IAAC,EAAE,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE;4BACnD,UAAU,EAAE,OAAO,EAAE,EAAE,CAAA;4BACvB,UAAU,CAAC,OAAO,CAAC,CAAA;wBACrB,CAAC,EAAE,IAAI,EAAC,IAAI,EAAC,WAAW,EAAC,OAAO,YAC7B,UAAU,EAAE,IAAI,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAChE,IACJ,IACF,CAAA;AACT,CAAC,CAAA;AAED,MAAM,YAAY,GAAG;IACnB,EAAE,EAAE;QACF,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM;KACb;IACD,EAAE,EAAE;QACF,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;KACnB;CACF,CAAA"}
@@ -0,0 +1,17 @@
1
+ interface StepTitleProps {
2
+ /**
3
+ * The step's title.
4
+ */
5
+ title: string;
6
+ /**
7
+ * A function to run once the step is closed.
8
+ */
9
+ onClose?: () => void;
10
+ }
11
+ /**
12
+ * Tutorial: the component in a React Tour overlay that renders the title.
13
+ * @param props the react props for the component {@link StepTitleProps}.
14
+ */
15
+ export declare const StepTitle: ({ title, onClose }: StepTitleProps) => import("react/jsx-runtime").JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=StepTitle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StepTitle.d.ts","sourceRoot":"","sources":["../../../src/components/tour/StepTitle.tsx"],"names":[],"mappings":"AAIA,UAAU,cAAc;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,GAAI,oBAAoB,cAAc,4CAQnD,CAAA"}
@@ -0,0 +1,10 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { Flex, IconBox, Text } from '@citric/core';
3
+ import { TimesMini } from '@citric/icons';
4
+ import { IconButton } from '@citric/ui';
5
+ /**
6
+ * Tutorial: the component in a React Tour overlay that renders the title.
7
+ * @param props the react props for the component {@link StepTitleProps}.
8
+ */
9
+ export const StepTitle = ({ title, onClose }) => _jsxs(Flex, { w: 12, px: 5, py: 3, flexWrap: "nowrap", justifyContent: "space-between", alignItems: "center", children: [_jsxs(Text, { appearance: "body2", colorScheme: "inverse.contrastText", weight: "medium", children: [" ", title, " "] }), _jsx(IconButton, { onClick: onClose, sx: { r: 'full', p: 0 }, children: _jsx(IconBox, { size: "xs", colorIcon: "inverse.contrastText", children: _jsx(TimesMini, {}) }) })] });
10
+ //# sourceMappingURL=StepTitle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StepTitle.js","sourceRoot":"","sources":["../../../src/components/tour/StepTitle.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAavC;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAkB,EAAE,EAAE,CAC9D,MAAC,IAAI,IAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,QAAQ,EAAC,QAAQ,EAAC,cAAc,EAAC,eAAe,EAAC,UAAU,EAAC,QAAQ,aAC7F,MAAC,IAAI,IAAC,UAAU,EAAC,OAAO,EAAC,WAAW,EAAC,sBAAsB,EAAC,MAAM,EAAC,QAAQ,kBAAG,KAAK,SAAS,EAC5F,KAAC,UAAU,IAAC,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,YACnD,KAAC,OAAO,IAAC,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,sBAAsB,YACjD,KAAC,SAAS,KAAG,GACL,GACC,IACR,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { TourConfigExtra } from './manager.js';
2
+ export declare const useTour: () => TourConfigExtra;
3
+ //# sourceMappingURL=hook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/components/tour/hook.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAe,MAAM,WAAW,CAAA;AAExD,eAAO,MAAM,OAAO,uBAQnB,CAAA"}
@@ -0,0 +1,10 @@
1
+ import { useEffect, useState } from 'react';
2
+ import { tourManager } from './manager.js';
3
+ export const useTour = () => {
4
+ const [tourConfig, setTourConfig] = useState(tourManager.config);
5
+ useEffect(() => tourManager.subscribe((config) => {
6
+ setTourConfig(config);
7
+ }), []);
8
+ return tourConfig;
9
+ };
10
+ //# sourceMappingURL=hook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hook.js","sourceRoot":"","sources":["../../../src/components/tour/hook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAmB,WAAW,EAAE,MAAM,WAAW,CAAA;AAExD,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,EAAE;IAC1B,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAkB,WAAW,CAAC,MAAM,CAAC,CAAA;IAEjF,SAAS,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,EAAE;QAC/C,aAAa,CAAC,MAAM,CAAC,CAAA;IACvB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IAEP,OAAO,UAAU,CAAA;AACnB,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ export { useTour } from './hook.js';
2
+ export { TourConfig, TourConfigListener, tourManager, TourStep, WelcomeTour } from './manager.js';
3
+ export { StepContainer } from './StepContainer.js';
4
+ export { getTourCookie, hasFinishedTourStep, isNewTourStep, StackspotTourStep, tourStepBuilder } from './utils.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tour/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAChC,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAC9F,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,aAAa,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,5 @@
1
+ export { useTour } from './hook.js';
2
+ export { tourManager, WelcomeTour } from './manager.js';
3
+ export { StepContainer } from './StepContainer.js';
4
+ export { getTourCookie, hasFinishedTourStep, isNewTourStep, tourStepBuilder } from './utils.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/tour/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAChC,OAAO,EAAkC,WAAW,EAAY,WAAW,EAAE,MAAM,WAAW,CAAA;AAC9F,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,aAAa,EAAqB,eAAe,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,34 @@
1
+ import WelcomeTour, { ReactourProps, ReactourStep } from 'reactour';
2
+ import { StackspotTourStep } from './utils.js';
3
+ export type TourConfig = Omit<ReactourProps, 'children'>;
4
+ export type TourStep = ReactourStep;
5
+ export type TourConfigExtra = TourConfig & {
6
+ currentStep: number;
7
+ finishStep: (stepSelector: string) => void;
8
+ addStep: (step: StackspotTourStep) => void;
9
+ closeTour: () => void;
10
+ };
11
+ type TourConfigListener = (config: TourConfigExtra) => void;
12
+ /**
13
+ * TourManager: provides state management for React Tour.
14
+ */
15
+ declare class TourManager {
16
+ private _steps;
17
+ private _currentStep;
18
+ private observers;
19
+ get config(): TourConfigExtra;
20
+ get currentStep(): number;
21
+ get steps(): ReactourStep[];
22
+ addStep(step: StackspotTourStep): void;
23
+ addRawStep(step: TourStep): void;
24
+ nextStep(): void;
25
+ prevStep(): void;
26
+ finishStep(stepSelector: string): void;
27
+ closeTour(): void;
28
+ subscribe(updateFn: TourConfigListener): () => void;
29
+ private pullListener;
30
+ private notify;
31
+ }
32
+ declare const tourManager: TourManager;
33
+ export { TourConfigListener, WelcomeTour, tourManager };
34
+ //# sourceMappingURL=manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../src/components/tour/manager.tsx"],"names":[],"mapp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