@stack-spot/portal-components 0.0.17 → 1.0.0-dev.1768482754546

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 (613) hide show
  1. package/CHANGELOG.md +670 -0
  2. package/dist/components/AnimatedHeight.d.ts +58 -0
  3. package/dist/components/AnimatedHeight.d.ts.map +1 -0
  4. package/dist/components/AnimatedHeight.js +105 -0
  5. package/dist/components/AnimatedHeight.js.map +1 -0
  6. package/dist/components/AsyncContent.d.ts +46 -0
  7. package/dist/components/AsyncContent.d.ts.map +1 -0
  8. package/dist/components/AsyncContent.js +34 -0
  9. package/dist/components/AsyncContent.js.map +1 -0
  10. package/dist/components/BannerWarning.d.ts +11 -2
  11. package/dist/components/BannerWarning.d.ts.map +1 -1
  12. package/dist/components/BannerWarning.js +45 -3
  13. package/dist/components/BannerWarning.js.map +1 -1
  14. package/dist/components/Breadcrumb/index.d.ts +10 -2
  15. package/dist/components/Breadcrumb/index.d.ts.map +1 -1
  16. package/dist/components/Breadcrumb/index.js +7 -5
  17. package/dist/components/Breadcrumb/index.js.map +1 -1
  18. package/dist/components/Breadcrumb/styled.d.ts +1 -2
  19. package/dist/components/Breadcrumb/styled.d.ts.map +1 -1
  20. package/dist/components/Breadcrumb/styled.js +1 -0
  21. package/dist/components/Breadcrumb/styled.js.map +1 -1
  22. package/dist/components/ButtonLoading.d.ts +11 -0
  23. package/dist/components/ButtonLoading.d.ts.map +1 -0
  24. package/dist/components/ButtonLoading.js +5 -0
  25. package/dist/components/ButtonLoading.js.map +1 -0
  26. package/dist/components/ChatBot.d.ts +5 -0
  27. package/dist/components/ChatBot.d.ts.map +1 -1
  28. package/dist/components/ChatBot.js +11 -6
  29. package/dist/components/ChatBot.js.map +1 -1
  30. package/dist/components/ContentValidateFilter.d.ts +6 -0
  31. package/dist/components/ContentValidateFilter.d.ts.map +1 -0
  32. package/dist/components/ContentValidateFilter.js +8 -0
  33. package/dist/components/ContentValidateFilter.js.map +1 -0
  34. package/dist/components/FadingOverflow.d.ts +37 -0
  35. package/dist/components/FadingOverflow.d.ts.map +1 -0
  36. package/dist/components/FadingOverflow.js +228 -0
  37. package/dist/components/FadingOverflow.js.map +1 -0
  38. package/dist/components/FileTreeView/More.d.ts +23 -0
  39. package/dist/components/FileTreeView/More.d.ts.map +1 -0
  40. package/dist/components/FileTreeView/More.js +55 -0
  41. package/dist/components/FileTreeView/More.js.map +1 -0
  42. package/dist/components/FileTreeView/index.d.ts +32 -0
  43. package/dist/components/FileTreeView/index.d.ts.map +1 -0
  44. package/dist/components/FileTreeView/index.js +91 -0
  45. package/dist/components/FileTreeView/index.js.map +1 -0
  46. package/dist/components/InfiniteScroll.d.ts +11 -0
  47. package/dist/components/InfiniteScroll.d.ts.map +1 -0
  48. package/dist/components/InfiniteScroll.js +14 -0
  49. package/dist/components/InfiniteScroll.js.map +1 -0
  50. package/dist/components/InfoMaintenanceBanner.d.ts +8 -0
  51. package/dist/components/InfoMaintenanceBanner.d.ts.map +1 -0
  52. package/dist/components/InfoMaintenanceBanner.js +19 -0
  53. package/dist/components/InfoMaintenanceBanner.js.map +1 -0
  54. package/dist/components/LazyMarkdown/BlockquoteMd.d.ts +11 -0
  55. package/dist/components/LazyMarkdown/BlockquoteMd.d.ts.map +1 -0
  56. package/dist/components/LazyMarkdown/BlockquoteMd.js +77 -0
  57. package/dist/components/LazyMarkdown/BlockquoteMd.js.map +1 -0
  58. package/dist/components/LazyMarkdown/CodeViewer.d.ts +24 -0
  59. package/dist/components/LazyMarkdown/CodeViewer.d.ts.map +1 -0
  60. package/dist/components/LazyMarkdown/CodeViewer.js +122 -0
  61. package/dist/components/LazyMarkdown/CodeViewer.js.map +1 -0
  62. package/dist/components/LazyMarkdown/Markdown.d.ts +19 -0
  63. package/dist/components/LazyMarkdown/Markdown.d.ts.map +1 -0
  64. package/dist/components/LazyMarkdown/Markdown.js +96 -0
  65. package/dist/components/LazyMarkdown/Markdown.js.map +1 -0
  66. package/dist/components/LazyMarkdown/MarkdownButton.d.ts +19 -0
  67. package/dist/components/LazyMarkdown/MarkdownButton.d.ts.map +1 -0
  68. package/dist/components/LazyMarkdown/MarkdownButton.js +9 -0
  69. package/dist/components/LazyMarkdown/MarkdownButton.js.map +1 -0
  70. package/dist/components/LazyMarkdown/Video.d.ts +11 -0
  71. package/dist/components/LazyMarkdown/Video.d.ts.map +1 -0
  72. package/dist/components/LazyMarkdown/Video.js +10 -0
  73. package/dist/components/LazyMarkdown/Video.js.map +1 -0
  74. package/dist/components/LazyMarkdown/index.d.ts +10 -0
  75. package/dist/components/LazyMarkdown/index.d.ts.map +1 -0
  76. package/dist/components/LazyMarkdown/index.js +8 -0
  77. package/dist/components/LazyMarkdown/index.js.map +1 -0
  78. package/dist/components/Placeholder.d.ts +28 -0
  79. package/dist/components/Placeholder.d.ts.map +1 -0
  80. package/dist/components/Placeholder.js +32 -0
  81. package/dist/components/Placeholder.js.map +1 -0
  82. package/dist/components/ScrollView.d.ts +31 -0
  83. package/dist/components/ScrollView.d.ts.map +1 -0
  84. package/dist/components/ScrollView.js +30 -0
  85. package/dist/components/ScrollView.js.map +1 -0
  86. package/dist/components/Select/BadgeItem.d.ts +4 -0
  87. package/dist/components/Select/BadgeItem.d.ts.map +1 -0
  88. package/dist/components/Select/BadgeItem.js +28 -0
  89. package/dist/components/Select/BadgeItem.js.map +1 -0
  90. package/dist/components/Select/ClearInput.d.ts +3 -0
  91. package/dist/components/Select/ClearInput.d.ts.map +1 -0
  92. package/dist/components/Select/ClearInput.js +18 -0
  93. package/dist/components/Select/ClearInput.js.map +1 -0
  94. package/dist/components/Select/CloseItem.d.ts +3 -0
  95. package/dist/components/Select/CloseItem.d.ts.map +1 -0
  96. package/dist/components/Select/CloseItem.js +26 -0
  97. package/dist/components/Select/CloseItem.js.map +1 -0
  98. package/dist/components/Select/CreatableSelect.d.ts +16 -0
  99. package/dist/components/Select/CreatableSelect.d.ts.map +1 -0
  100. package/dist/components/Select/CreatableSelect.js +114 -0
  101. package/dist/components/Select/CreatableSelect.js.map +1 -0
  102. package/dist/components/Select/CustomMenu.d.ts +8 -0
  103. package/dist/components/Select/CustomMenu.d.ts.map +1 -0
  104. package/dist/components/Select/CustomMenu.js +4 -0
  105. package/dist/components/Select/CustomMenu.js.map +1 -0
  106. package/dist/components/Select/LabelItem.d.ts +3 -0
  107. package/dist/components/Select/LabelItem.d.ts.map +1 -0
  108. package/dist/components/Select/LabelItem.js +4 -0
  109. package/dist/components/Select/LabelItem.js.map +1 -0
  110. package/dist/components/Select/MultiValue.d.ts +3 -0
  111. package/dist/components/Select/MultiValue.d.ts.map +1 -0
  112. package/dist/components/Select/MultiValue.js +27 -0
  113. package/dist/components/Select/MultiValue.js.map +1 -0
  114. package/dist/components/Select/SelectInfiniteScroll.d.ts +14 -0
  115. package/dist/components/Select/SelectInfiniteScroll.d.ts.map +1 -0
  116. package/dist/components/Select/SelectInfiniteScroll.js +31 -0
  117. package/dist/components/Select/SelectInfiniteScroll.js.map +1 -0
  118. package/dist/components/Select/SelectSearch.d.ts +11 -0
  119. package/dist/components/Select/SelectSearch.d.ts.map +1 -0
  120. package/dist/components/Select/SelectSearch.js +156 -0
  121. package/dist/components/Select/SelectSearch.js.map +1 -0
  122. package/dist/components/Select/index.d.ts +6 -0
  123. package/dist/components/Select/index.d.ts.map +1 -0
  124. package/dist/components/Select/index.js +6 -0
  125. package/dist/components/Select/index.js.map +1 -0
  126. package/dist/components/Select/types.d.ts +7 -0
  127. package/dist/components/Select/types.d.ts.map +1 -0
  128. package/dist/components/Select/types.js +2 -0
  129. package/dist/components/Select/types.js.map +1 -0
  130. package/dist/components/SelectionList.d.ts +151 -0
  131. package/dist/components/SelectionList.d.ts.map +1 -0
  132. package/dist/components/SelectionList.js +180 -0
  133. package/dist/components/SelectionList.js.map +1 -0
  134. package/dist/components/StatusCircle.d.ts +24 -0
  135. package/dist/components/StatusCircle.d.ts.map +1 -0
  136. package/dist/components/StatusCircle.js +44 -0
  137. package/dist/components/StatusCircle.js.map +1 -0
  138. package/dist/components/Stepper/Navigation.d.ts +35 -0
  139. package/dist/components/Stepper/Navigation.d.ts.map +1 -0
  140. package/dist/components/Stepper/Navigation.js +41 -0
  141. package/dist/components/Stepper/Navigation.js.map +1 -0
  142. package/dist/components/Stepper/Step.d.ts +18 -0
  143. package/dist/components/Stepper/Step.d.ts.map +1 -0
  144. package/dist/components/Stepper/Step.js +13 -0
  145. package/dist/components/Stepper/Step.js.map +1 -0
  146. package/dist/components/Stepper/Stepper.d.ts +45 -0
  147. package/dist/components/Stepper/Stepper.d.ts.map +1 -0
  148. package/dist/components/Stepper/Stepper.js +57 -0
  149. package/dist/components/Stepper/Stepper.js.map +1 -0
  150. package/dist/components/Stepper/headers.d.ts +19 -0
  151. package/dist/components/Stepper/headers.d.ts.map +1 -0
  152. package/dist/components/Stepper/headers.js +40 -0
  153. package/dist/components/Stepper/headers.js.map +1 -0
  154. package/dist/components/Stepper/index.d.ts +4 -0
  155. package/dist/components/Stepper/index.d.ts.map +1 -0
  156. package/dist/components/Stepper/index.js +4 -0
  157. package/dist/components/Stepper/index.js.map +1 -0
  158. package/dist/components/Table/HeaderItem.d.ts +18 -0
  159. package/dist/components/Table/HeaderItem.d.ts.map +1 -0
  160. package/dist/components/Table/HeaderItem.js +14 -0
  161. package/dist/components/Table/HeaderItem.js.map +1 -0
  162. package/dist/components/Table/SettingsVerticalMenu.d.ts +14 -0
  163. package/dist/components/Table/SettingsVerticalMenu.d.ts.map +1 -0
  164. package/dist/components/Table/SettingsVerticalMenu.js +14 -0
  165. package/dist/components/Table/SettingsVerticalMenu.js.map +1 -0
  166. package/dist/components/Table/StyledLinkTable.d.ts +5 -0
  167. package/dist/components/Table/StyledLinkTable.d.ts.map +1 -0
  168. package/dist/components/Table/StyledLinkTable.js +13 -0
  169. package/dist/components/Table/StyledLinkTable.js.map +1 -0
  170. package/dist/components/Table/TableData.d.ts +37 -0
  171. package/dist/components/Table/TableData.d.ts.map +1 -0
  172. package/dist/components/Table/TableData.js +84 -0
  173. package/dist/components/Table/TableData.js.map +1 -0
  174. package/dist/components/Table/index.d.ts +3 -0
  175. package/dist/components/Table/index.d.ts.map +1 -0
  176. package/dist/components/Table/index.js +3 -0
  177. package/dist/components/Table/index.js.map +1 -0
  178. package/dist/components/TimelineSection.d.ts +24 -0
  179. package/dist/components/TimelineSection.d.ts.map +1 -0
  180. package/dist/components/TimelineSection.js +37 -0
  181. package/dist/components/TimelineSection.js.map +1 -0
  182. package/dist/components/error/ErrorFeedback.d.ts +58 -0
  183. package/dist/components/error/ErrorFeedback.d.ts.map +1 -0
  184. package/dist/components/error/ErrorFeedback.js +110 -0
  185. package/dist/components/error/ErrorFeedback.js.map +1 -0
  186. package/dist/components/error/NotFound.d.ts +4 -0
  187. package/dist/components/error/NotFound.d.ts.map +1 -0
  188. package/dist/components/error/NotFound.js +19 -0
  189. package/dist/components/error/NotFound.js.map +1 -0
  190. package/dist/components/error/UnderMaintenance.d.ts +4 -0
  191. package/dist/components/error/UnderMaintenance.d.ts.map +1 -0
  192. package/dist/components/error/UnderMaintenance.js +25 -0
  193. package/dist/components/error/UnderMaintenance.js.map +1 -0
  194. package/dist/components/error/index.d.ts +4 -0
  195. package/dist/components/error/index.d.ts.map +1 -0
  196. package/dist/components/error/index.js +4 -0
  197. package/dist/components/error/index.js.map +1 -0
  198. package/dist/components/form/Form/Form.d.ts +15 -0
  199. package/dist/components/form/Form/Form.d.ts.map +1 -0
  200. package/dist/components/form/Form/Form.js +48 -0
  201. package/dist/components/form/Form/Form.js.map +1 -0
  202. package/dist/components/form/Form/FormGroup.d.ts +37 -0
  203. package/dist/components/form/Form/FormGroup.d.ts.map +1 -0
  204. package/dist/components/form/Form/FormGroup.js +72 -0
  205. package/dist/components/form/Form/FormGroup.js.map +1 -0
  206. package/dist/components/form/Form/index.d.ts +3 -0
  207. package/dist/components/form/Form/index.d.ts.map +1 -0
  208. package/dist/components/form/Form/index.js +3 -0
  209. package/dist/components/form/Form/index.js.map +1 -0
  210. package/dist/components/form/SearchInput.d.ts +9 -0
  211. package/dist/components/form/SearchInput.d.ts.map +1 -0
  212. package/dist/components/form/SearchInput.js +28 -0
  213. package/dist/components/form/SearchInput.js.map +1 -0
  214. package/dist/components/form/Select/CustomSelect.d.ts +81 -0
  215. package/dist/components/form/Select/CustomSelect.d.ts.map +1 -0
  216. package/dist/components/form/Select/CustomSelect.js +178 -0
  217. package/dist/components/form/Select/CustomSelect.js.map +1 -0
  218. package/dist/components/form/Select/DetailedSelect.d.ts +65 -0
  219. package/dist/components/form/Select/DetailedSelect.d.ts.map +1 -0
  220. package/dist/components/form/Select/DetailedSelect.js +80 -0
  221. package/dist/components/form/Select/DetailedSelect.js.map +1 -0
  222. package/dist/components/form/Select/Select.d.ts +47 -0
  223. package/dist/components/form/Select/Select.d.ts.map +1 -0
  224. package/dist/components/form/Select/Select.js +62 -0
  225. package/dist/components/form/Select/Select.js.map +1 -0
  226. package/dist/components/form/Select/index.d.ts +5 -0
  227. package/dist/components/form/Select/index.d.ts.map +1 -0
  228. package/dist/components/form/Select/index.js +5 -0
  229. package/dist/components/form/Select/index.js.map +1 -0
  230. package/dist/components/form/Select/styled.d.ts +5 -0
  231. package/dist/components/form/Select/styled.d.ts.map +1 -0
  232. package/dist/components/form/Select/styled.js +165 -0
  233. package/dist/components/form/Select/styled.js.map +1 -0
  234. package/dist/components/form/Select/types.d.ts +103 -0
  235. package/dist/components/form/Select/types.d.ts.map +1 -0
  236. package/dist/components/form/Select/types.js +2 -0
  237. package/dist/components/form/Select/types.js.map +1 -0
  238. package/dist/components/form/Select/utils.d.ts +3 -0
  239. package/dist/components/form/Select/utils.d.ts.map +1 -0
  240. package/dist/components/form/Select/utils.js +20 -0
  241. package/dist/components/form/Select/utils.js.map +1 -0
  242. package/dist/components/notification/NotificationComponent.d.ts +31 -0
  243. package/dist/components/notification/NotificationComponent.d.ts.map +1 -0
  244. package/dist/components/notification/NotificationComponent.js +176 -0
  245. package/dist/components/notification/NotificationComponent.js.map +1 -0
  246. package/dist/components/notification/NotificationItem.d.ts +51 -0
  247. package/dist/components/notification/NotificationItem.d.ts.map +1 -0
  248. package/dist/components/notification/NotificationItem.js +165 -0
  249. package/dist/components/notification/NotificationItem.js.map +1 -0
  250. package/dist/components/notification/NotificationList.d.ts +47 -0
  251. package/dist/components/notification/NotificationList.d.ts.map +1 -0
  252. package/dist/components/notification/NotificationList.js +82 -0
  253. package/dist/components/notification/NotificationList.js.map +1 -0
  254. package/dist/components/notification/NotificationPlaceholder.d.ts +13 -0
  255. package/dist/components/notification/NotificationPlaceholder.d.ts.map +1 -0
  256. package/dist/components/notification/NotificationPlaceholder.js +34 -0
  257. package/dist/components/notification/NotificationPlaceholder.js.map +1 -0
  258. package/dist/components/notification/types.d.ts +60 -0
  259. package/dist/components/notification/types.d.ts.map +1 -0
  260. package/dist/components/notification/types.js +7 -0
  261. package/dist/components/notification/types.js.map +1 -0
  262. package/dist/containers/NotificationsPage.d.ts +2 -0
  263. package/dist/containers/NotificationsPage.d.ts.map +1 -0
  264. package/dist/containers/NotificationsPage.js +71 -0
  265. package/dist/containers/NotificationsPage.js.map +1 -0
  266. package/dist/context/anchor.d.ts +27 -0
  267. package/dist/context/anchor.d.ts.map +1 -0
  268. package/dist/context/anchor.js +23 -0
  269. package/dist/context/anchor.js.map +1 -0
  270. package/dist/context/loading.d.ts +27 -0
  271. package/dist/context/loading.d.ts.map +1 -0
  272. package/dist/context/loading.js +24 -0
  273. package/dist/context/loading.js.map +1 -0
  274. package/dist/context/notification/LazyNotificationList.d.ts +28 -0
  275. package/dist/context/notification/LazyNotificationList.d.ts.map +1 -0
  276. package/dist/context/notification/LazyNotificationList.js +136 -0
  277. package/dist/context/notification/LazyNotificationList.js.map +1 -0
  278. package/dist/context/notification/NotificationController.d.ts +25 -0
  279. package/dist/context/notification/NotificationController.d.ts.map +1 -0
  280. package/dist/context/notification/NotificationController.js +153 -0
  281. package/dist/context/notification/NotificationController.js.map +1 -0
  282. package/dist/context/notification/context.d.ts +8 -0
  283. package/dist/context/notification/context.d.ts.map +1 -0
  284. package/dist/context/notification/context.js +12 -0
  285. package/dist/context/notification/context.js.map +1 -0
  286. package/dist/context/notification/hooks.d.ts +18 -0
  287. package/dist/context/notification/hooks.d.ts.map +1 -0
  288. package/dist/context/notification/hooks.js +92 -0
  289. package/dist/context/notification/hooks.js.map +1 -0
  290. package/dist/context/notification/types.d.ts +65 -0
  291. package/dist/context/notification/types.d.ts.map +1 -0
  292. package/dist/context/notification/types.js +2 -0
  293. package/dist/context/notification/types.js.map +1 -0
  294. package/dist/hooks/date.d.ts +18 -0
  295. package/dist/hooks/date.d.ts.map +1 -0
  296. package/dist/hooks/date.js +68 -0
  297. package/dist/hooks/date.js.map +1 -0
  298. package/dist/hooks/keyboard.d.ts +64 -0
  299. package/dist/hooks/keyboard.d.ts.map +1 -0
  300. package/dist/hooks/keyboard.js +84 -0
  301. package/dist/hooks/keyboard.js.map +1 -0
  302. package/dist/hooks/manual-render.d.ts +8 -0
  303. package/dist/hooks/manual-render.d.ts.map +1 -0
  304. package/dist/hooks/manual-render.js +10 -0
  305. package/dist/hooks/manual-render.js.map +1 -0
  306. package/dist/hooks/service-now.d.ts +32 -1
  307. package/dist/hooks/service-now.d.ts.map +1 -1
  308. package/dist/hooks/service-now.js +58 -18
  309. package/dist/hooks/service-now.js.map +1 -1
  310. package/dist/hooks/text.d.ts +9 -0
  311. package/dist/hooks/text.d.ts.map +1 -0
  312. package/dist/hooks/text.js +24 -0
  313. package/dist/hooks/text.js.map +1 -0
  314. package/dist/hooks/title.d.ts +13 -0
  315. package/dist/hooks/title.d.ts.map +1 -1
  316. package/dist/hooks/title.js +13 -0
  317. package/dist/hooks/title.js.map +1 -1
  318. package/dist/hooks/use-effect-once.d.ts.map +1 -1
  319. package/dist/hooks/use-effect-once.js.map +1 -1
  320. package/dist/index.d.ts +14 -4
  321. package/dist/index.d.ts.map +1 -1
  322. package/dist/index.js +14 -4
  323. package/dist/index.js.map +1 -1
  324. package/dist/notifications.d.ts +11 -0
  325. package/dist/notifications.d.ts.map +1 -0
  326. package/dist/notifications.js +10 -0
  327. package/dist/notifications.js.map +1 -0
  328. package/dist/svg/AI.d.ts +8 -0
  329. package/dist/svg/AI.d.ts.map +1 -0
  330. package/dist/svg/AI.js +15 -0
  331. package/dist/svg/AI.js.map +1 -0
  332. package/dist/svg/CS.d.ts +8 -0
  333. package/dist/svg/CS.d.ts.map +1 -0
  334. package/dist/svg/CS.js +15 -0
  335. package/dist/svg/CS.js.map +1 -0
  336. package/dist/svg/EDP.d.ts +8 -0
  337. package/dist/svg/EDP.d.ts.map +1 -0
  338. package/dist/svg/EDP.js +15 -0
  339. package/dist/svg/EDP.js.map +1 -0
  340. package/dist/svg/Forbidden.d.ts +5 -0
  341. package/dist/svg/Forbidden.d.ts.map +1 -0
  342. package/dist/svg/Forbidden.js +4 -0
  343. package/dist/svg/Forbidden.js.map +1 -0
  344. package/dist/svg/GenericPlaceholder.d.ts +7 -0
  345. package/dist/svg/GenericPlaceholder.d.ts.map +1 -0
  346. package/dist/svg/GenericPlaceholder.js +4 -0
  347. package/dist/svg/GenericPlaceholder.js.map +1 -0
  348. package/dist/svg/HUB.d.ts +8 -0
  349. package/dist/svg/HUB.d.ts.map +1 -0
  350. package/dist/svg/HUB.js +15 -0
  351. package/dist/svg/HUB.js.map +1 -0
  352. package/dist/svg/Logo.d.ts +5 -0
  353. package/dist/svg/Logo.d.ts.map +1 -0
  354. package/dist/svg/Logo.js +8 -0
  355. package/dist/svg/Logo.js.map +1 -0
  356. package/dist/svg/MiniLogo.d.ts +8 -0
  357. package/dist/svg/MiniLogo.d.ts.map +1 -0
  358. package/dist/svg/MiniLogo.js +6 -0
  359. package/dist/svg/MiniLogo.js.map +1 -0
  360. package/dist/svg/NotFound.d.ts +5 -0
  361. package/dist/svg/NotFound.d.ts.map +1 -0
  362. package/dist/svg/NotFound.js +4 -0
  363. package/dist/svg/NotFound.js.map +1 -0
  364. package/dist/svg/ServerError.d.ts +5 -0
  365. package/dist/svg/ServerError.d.ts.map +1 -0
  366. package/dist/svg/ServerError.js +4 -0
  367. package/dist/svg/ServerError.js.map +1 -0
  368. package/dist/svg/Unauthenticated.d.ts +5 -0
  369. package/dist/svg/Unauthenticated.d.ts.map +1 -0
  370. package/dist/svg/Unauthenticated.js +4 -0
  371. package/dist/svg/Unauthenticated.js.map +1 -0
  372. package/dist/svg/index.d.ts +12 -0
  373. package/dist/svg/index.d.ts.map +1 -0
  374. package/dist/svg/index.js +12 -0
  375. package/dist/svg/index.js.map +1 -0
  376. package/dist/utils/accessibility.d.ts +75 -0
  377. package/dist/utils/accessibility.d.ts.map +1 -0
  378. package/dist/utils/accessibility.js +123 -0
  379. package/dist/utils/accessibility.js.map +1 -0
  380. package/dist/utils/cookie.d.ts +34 -0
  381. package/dist/utils/cookie.d.ts.map +1 -0
  382. package/dist/utils/cookie.js +69 -0
  383. package/dist/utils/cookie.js.map +1 -0
  384. package/dist/utils/promise.d.ts +2 -0
  385. package/dist/utils/promise.d.ts.map +1 -0
  386. package/dist/utils/promise.js +6 -0
  387. package/dist/utils/promise.js.map +1 -0
  388. package/dist/utils/read-file.d.ts +2 -0
  389. package/dist/utils/read-file.d.ts.map +1 -0
  390. package/dist/utils/read-file.js +14 -0
  391. package/dist/utils/read-file.js.map +1 -0
  392. package/package.dev.json +3 -0
  393. package/package.json +53 -14
  394. package/package.stg.json +3 -0
  395. package/readme.md +55 -13
  396. package/src/components/AnimatedHeight.tsx +174 -0
  397. package/src/components/AsyncContent.tsx +78 -0
  398. package/src/components/BannerWarning.tsx +89 -19
  399. package/src/components/Breadcrumb/index.tsx +20 -5
  400. package/src/components/Breadcrumb/styled.ts +2 -1
  401. package/src/components/ButtonLoading.tsx +29 -0
  402. package/src/components/ChatBot.tsx +12 -7
  403. package/src/components/ContentValidateFilter.tsx +15 -0
  404. package/src/components/FadingOverflow.tsx +265 -0
  405. package/src/components/FileTreeView/More.tsx +114 -0
  406. package/src/components/FileTreeView/index.tsx +186 -0
  407. package/src/components/InfiniteScroll.tsx +24 -0
  408. package/src/components/InfoMaintenanceBanner.tsx +25 -0
  409. package/src/components/LazyMarkdown/BlockquoteMd.tsx +107 -0
  410. package/src/components/LazyMarkdown/CodeViewer.tsx +161 -0
  411. package/src/components/LazyMarkdown/Markdown.tsx +122 -0
  412. package/src/components/LazyMarkdown/MarkdownButton.tsx +24 -0
  413. package/src/components/LazyMarkdown/Video.tsx +13 -0
  414. package/src/components/LazyMarkdown/index.tsx +21 -0
  415. package/src/components/Placeholder.tsx +124 -0
  416. package/src/components/ScrollView.tsx +57 -0
  417. package/src/components/Select/BadgeItem.tsx +58 -0
  418. package/src/components/Select/ClearInput.tsx +24 -0
  419. package/src/components/Select/CloseItem.tsx +38 -0
  420. package/src/components/Select/CreatableSelect.tsx +155 -0
  421. package/src/components/Select/CustomMenu.tsx +16 -0
  422. package/src/components/Select/LabelItem.tsx +8 -0
  423. package/src/components/Select/MultiValue.tsx +49 -0
  424. package/src/components/Select/SelectInfiniteScroll.tsx +82 -0
  425. package/src/components/Select/SelectSearch.tsx +195 -0
  426. package/src/components/Select/index.tsx +7 -0
  427. package/src/components/Select/types.ts +8 -0
  428. package/src/components/SelectionList.tsx +427 -0
  429. package/src/components/StatusCircle.tsx +67 -0
  430. package/src/components/Stepper/Navigation.tsx +97 -0
  431. package/src/components/Stepper/Step.tsx +30 -0
  432. package/src/components/Stepper/Stepper.tsx +113 -0
  433. package/src/components/Stepper/headers.tsx +64 -0
  434. package/src/components/Stepper/index.ts +3 -0
  435. package/src/components/Table/HeaderItem.tsx +52 -0
  436. package/src/components/Table/SettingsVerticalMenu.tsx +50 -0
  437. package/src/components/Table/StyledLinkTable.tsx +22 -0
  438. package/src/components/Table/TableData.tsx +251 -0
  439. package/src/components/Table/index.tsx +2 -0
  440. package/src/components/TimelineSection.tsx +66 -0
  441. package/src/components/error/ErrorFeedback.tsx +217 -0
  442. package/src/components/error/NotFound.tsx +24 -0
  443. package/src/components/error/UnderMaintenance.tsx +30 -0
  444. package/src/components/error/index.ts +4 -0
  445. package/src/components/form/Form/Form.tsx +101 -0
  446. package/src/components/form/Form/FormGroup.tsx +221 -0
  447. package/src/components/form/Form/index.ts +2 -0
  448. package/src/components/form/SearchInput.tsx +69 -0
  449. package/src/components/form/Select/CustomSelect.tsx +232 -0
  450. package/src/components/form/Select/DetailedSelect.tsx +85 -0
  451. package/src/components/form/Select/Select.tsx +67 -0
  452. package/src/components/form/Select/index.ts +4 -0
  453. package/src/components/form/Select/styled.ts +165 -0
  454. package/src/components/form/Select/types.ts +112 -0
  455. package/src/components/form/Select/utils.tsx +28 -0
  456. package/src/components/notification/NotificationComponent.tsx +340 -0
  457. package/src/components/notification/NotificationItem.tsx +353 -0
  458. package/src/components/notification/NotificationList.tsx +185 -0
  459. package/src/components/notification/NotificationPlaceholder.tsx +60 -0
  460. package/src/components/notification/types.ts +72 -0
  461. package/src/containers/NotificationsPage.tsx +120 -0
  462. package/src/context/anchor.tsx +37 -0
  463. package/src/context/loading.tsx +36 -0
  464. package/src/context/notification/LazyNotificationList.ts +103 -0
  465. package/src/context/notification/NotificationController.ts +119 -0
  466. package/src/context/notification/context.tsx +23 -0
  467. package/src/context/notification/hooks.ts +98 -0
  468. package/src/context/notification/types.ts +71 -0
  469. package/src/hooks/date.ts +68 -0
  470. package/src/hooks/keyboard.tsx +128 -0
  471. package/src/hooks/manual-render.tsx +10 -0
  472. package/src/hooks/service-now.tsx +64 -19
  473. package/src/hooks/text.tsx +30 -0
  474. package/src/hooks/title.tsx +13 -0
  475. package/src/index.ts +14 -6
  476. package/src/notifications.ts +11 -0
  477. package/src/svg/AI.tsx +41 -0
  478. package/src/svg/CS.tsx +48 -0
  479. package/src/svg/EDP.tsx +31 -0
  480. package/src/svg/Forbidden.tsx +22 -0
  481. package/src/svg/GenericPlaceholder.tsx +16 -0
  482. package/src/svg/HUB.tsx +48 -0
  483. package/src/svg/Logo.tsx +16 -0
  484. package/src/svg/MiniLogo.tsx +12 -0
  485. package/src/svg/NotFound.tsx +16 -0
  486. package/src/svg/ServerError.tsx +33 -0
  487. package/src/svg/Unauthenticated.tsx +16 -0
  488. package/src/svg/index.ts +11 -0
  489. package/src/utils/accessibility.ts +135 -0
  490. package/src/utils/cookie.ts +73 -0
  491. package/src/utils/promise.ts +5 -0
  492. package/src/utils/read-file.ts +16 -0
  493. package/tsconfig.json +1 -0
  494. package/dist/BannerWarning.d.ts +0 -4
  495. package/dist/BannerWarning.d.ts.map +0 -1
  496. package/dist/BannerWarning.js +0 -6
  497. package/dist/BannerWarning.js.map +0 -1
  498. package/dist/Login.d.ts +0 -25
  499. package/dist/Login.d.ts.map +0 -1
  500. package/dist/Login.js +0 -104
  501. package/dist/Login.js.map +0 -1
  502. package/dist/MiniLogo.d.ts +0 -6
  503. package/dist/MiniLogo.d.ts.map +0 -1
  504. package/dist/MiniLogo.js +0 -4
  505. package/dist/MiniLogo.js.map +0 -1
  506. package/dist/components/Login.d.ts +0 -26
  507. package/dist/components/Login.d.ts.map +0 -1
  508. package/dist/components/Login.js +0 -100
  509. package/dist/components/Login.js.map +0 -1
  510. package/dist/components/MiniLogo.d.ts +0 -6
  511. package/dist/components/MiniLogo.d.ts.map +0 -1
  512. package/dist/components/MiniLogo.js +0 -4
  513. package/dist/components/MiniLogo.js.map +0 -1
  514. package/dist/components/src/components/BannerWarning.d.ts +0 -4
  515. package/dist/components/src/components/BannerWarning.d.ts.map +0 -1
  516. package/dist/components/src/components/BannerWarning.js +0 -6
  517. package/dist/components/src/components/BannerWarning.js.map +0 -1
  518. package/dist/components/src/components/Breadcrumb/index.d.ts +0 -42
  519. package/dist/components/src/components/Breadcrumb/index.d.ts.map +0 -1
  520. package/dist/components/src/components/Breadcrumb/index.js +0 -27
  521. package/dist/components/src/components/Breadcrumb/index.js.map +0 -1
  522. package/dist/components/src/components/Breadcrumb/styled.d.ts +0 -3
  523. package/dist/components/src/components/Breadcrumb/styled.d.ts.map +0 -1
  524. package/dist/components/src/components/Breadcrumb/styled.js +0 -36
  525. package/dist/components/src/components/Breadcrumb/styled.js.map +0 -1
  526. package/dist/components/src/components/ChatBot.d.ts +0 -2
  527. package/dist/components/src/components/ChatBot.d.ts.map +0 -1
  528. package/dist/components/src/components/ChatBot.js +0 -61
  529. package/dist/components/src/components/ChatBot.js.map +0 -1
  530. package/dist/components/src/components/Login.d.ts +0 -26
  531. package/dist/components/src/components/Login.d.ts.map +0 -1
  532. package/dist/components/src/components/Login.js +0 -100
  533. package/dist/components/src/components/Login.js.map +0 -1
  534. package/dist/components/src/components/MiniLogo.d.ts +0 -6
  535. package/dist/components/src/components/MiniLogo.d.ts.map +0 -1
  536. package/dist/components/src/components/MiniLogo.js +0 -4
  537. package/dist/components/src/components/MiniLogo.js.map +0 -1
  538. package/dist/components/src/components/tour/StepContainer.d.ts +0 -13
  539. package/dist/components/src/components/tour/StepContainer.d.ts.map +0 -1
  540. package/dist/components/src/components/tour/StepContainer.js +0 -48
  541. package/dist/components/src/components/tour/StepContainer.js.map +0 -1
  542. package/dist/components/src/components/tour/StepNavigation.d.ts +0 -13
  543. package/dist/components/src/components/tour/StepNavigation.d.ts.map +0 -1
  544. package/dist/components/src/components/tour/StepNavigation.js +0 -20
  545. package/dist/components/src/components/tour/StepNavigation.js.map +0 -1
  546. package/dist/components/src/components/tour/StepTitle.d.ts +0 -7
  547. package/dist/components/src/components/tour/StepTitle.d.ts.map +0 -1
  548. package/dist/components/src/components/tour/StepTitle.js +0 -5
  549. package/dist/components/src/components/tour/StepTitle.js.map +0 -1
  550. package/dist/components/src/components/tour/context.d.ts +0 -17
  551. package/dist/components/src/components/tour/context.d.ts.map +0 -1
  552. package/dist/components/src/components/tour/context.js +0 -48
  553. package/dist/components/src/components/tour/context.js.map +0 -1
  554. package/dist/components/src/components/tour/index.d.ts +0 -4
  555. package/dist/components/src/components/tour/index.d.ts.map +0 -1
  556. package/dist/components/src/components/tour/index.js +0 -4
  557. package/dist/components/src/components/tour/index.js.map +0 -1
  558. package/dist/components/src/components/tour/utils.d.ts +0 -13
  559. package/dist/components/src/components/tour/utils.d.ts.map +0 -1
  560. package/dist/components/src/components/tour/utils.js +0 -43
  561. package/dist/components/src/components/tour/utils.js.map +0 -1
  562. package/dist/components/src/hooks/service-now.d.ts +0 -24
  563. package/dist/components/src/hooks/service-now.d.ts.map +0 -1
  564. package/dist/components/src/hooks/service-now.js +0 -161
  565. package/dist/components/src/hooks/service-now.js.map +0 -1
  566. package/dist/components/src/hooks/title.d.ts +0 -3
  567. package/dist/components/src/hooks/title.d.ts.map +0 -1
  568. package/dist/components/src/hooks/title.js +0 -13
  569. package/dist/components/src/hooks/title.js.map +0 -1
  570. package/dist/components/src/hooks/use-effect-once.d.ts +0 -12
  571. package/dist/components/src/hooks/use-effect-once.d.ts.map +0 -1
  572. package/dist/components/src/hooks/use-effect-once.js +0 -40
  573. package/dist/components/src/hooks/use-effect-once.js.map +0 -1
  574. package/dist/components/src/index.d.ts +0 -9
  575. package/dist/components/src/index.d.ts.map +0 -1
  576. package/dist/components/src/index.js +0 -9
  577. package/dist/components/src/index.js.map +0 -1
  578. package/dist/components/tour/StepContainer.d.ts +0 -13
  579. package/dist/components/tour/StepContainer.d.ts.map +0 -1
  580. package/dist/components/tour/StepContainer.js +0 -48
  581. package/dist/components/tour/StepContainer.js.map +0 -1
  582. package/dist/components/tour/StepNavigation.d.ts +0 -13
  583. package/dist/components/tour/StepNavigation.d.ts.map +0 -1
  584. package/dist/components/tour/StepNavigation.js +0 -20
  585. package/dist/components/tour/StepNavigation.js.map +0 -1
  586. package/dist/components/tour/StepTitle.d.ts +0 -7
  587. package/dist/components/tour/StepTitle.d.ts.map +0 -1
  588. package/dist/components/tour/StepTitle.js +0 -5
  589. package/dist/components/tour/StepTitle.js.map +0 -1
  590. package/dist/components/tour/context.d.ts +0 -17
  591. package/dist/components/tour/context.d.ts.map +0 -1
  592. package/dist/components/tour/context.js +0 -48
  593. package/dist/components/tour/context.js.map +0 -1
  594. package/dist/components/tour/index.d.ts +0 -9
  595. package/dist/components/tour/index.d.ts.map +0 -1
  596. package/dist/components/tour/index.js +0 -4
  597. package/dist/components/tour/index.js.map +0 -1
  598. package/dist/components/tour/utils.d.ts +0 -13
  599. package/dist/components/tour/utils.d.ts.map +0 -1
  600. package/dist/components/tour/utils.js +0 -43
  601. package/dist/components/tour/utils.js.map +0 -1
  602. package/dist/layout/src/components/tour/PortalSwitcherStep.d.ts +0 -2
  603. package/dist/layout/src/components/tour/PortalSwitcherStep.d.ts.map +0 -1
  604. package/dist/layout/src/components/tour/PortalSwitcherStep.js +0 -30
  605. package/dist/layout/src/components/tour/PortalSwitcherStep.js.map +0 -1
  606. package/src/components/Login.tsx +0 -157
  607. package/src/components/MiniLogo.tsx +0 -32
  608. package/src/components/tour/StepContainer.tsx +0 -67
  609. package/src/components/tour/StepNavigation.tsx +0 -32
  610. package/src/components/tour/StepTitle.tsx +0 -17
  611. package/src/components/tour/context.tsx +0 -56
  612. package/src/components/tour/index.ts +0 -7
  613. package/src/components/tour/utils.tsx +0 -65
@@ -0,0 +1,58 @@
1
+ interface Props {
2
+ /**
3
+ * A header with fixed height.
4
+ */
5
+ header?: React.ReactElement;
6
+ /**
7
+ * The content. This may change its height whenever. When the height changes, the animation will play making a fluid transition from the
8
+ * previous height to the next.
9
+ */
10
+ children: React.ReactElement;
11
+ /**
12
+ * A footer with fixed height.
13
+ */
14
+ footer?: React.ReactElement;
15
+ /**
16
+ * Whether or not this panel is visible. Changing this value, animates the panel's height.
17
+ * @default true
18
+ */
19
+ visible?: boolean;
20
+ /**
21
+ * The duration of the animations in milliseconds.
22
+ * @default 300
23
+ */
24
+ duration?: number;
25
+ /**
26
+ * This component wraps its content in a div that changes its height from zero to the size of its content. It is not recommended to add
27
+ * styles to it, but if you need to, use this property.
28
+ */
29
+ outerStyle?: React.CSSProperties;
30
+ /**
31
+ * This component wraps its content in a div that changes its height from zero to the size of its content. It is not recommended to add
32
+ * classes to it, but if you need to, use this property.
33
+ */
34
+ outerClassName?: string;
35
+ /**
36
+ * The style to apply to the whole panel.
37
+ *
38
+ * Attention: this is not the outer-most div, use `outerStyle` if you need to style it.
39
+ */
40
+ style?: React.CSSProperties;
41
+ /**
42
+ * The class to apply to the whole panel.
43
+ *
44
+ * Attention: this is not the outer-most div, use `outerClassName` if you need to add a class to it.
45
+ */
46
+ className?: string;
47
+ }
48
+ /**
49
+ * This is a generic component for animating the height of a panel whenever its content changes.
50
+ *
51
+ * You can provide a header and a footer with fixed height, these won't change during the animations and will always be visible.
52
+ *
53
+ * This panel can also be hidden or visible and transitions between these two state will be animated.
54
+ * @param props the React props for this component. {@link Props}.
55
+ */
56
+ export declare const AnimatedHeight: ({ children, footer, header, visible, duration, className, style, outerClassName, outerStyle }: Props) => import("react/jsx-runtime").JSX.Element;
57
+ export {};
58
+ //# sourceMappingURL=AnimatedHeight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnimatedHeight.d.ts","sourceRoot":"","sources":["../../src/components/AnimatedHeight.tsx"],"names":[],"mappings":"AAKA,UAAU,KAAK;IACb;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC5B;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC5B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACjC;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAsDD;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GACzB,+FAA6G,KAAK,4CA2DnH,CAAA"}
@@ -0,0 +1,105 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { listToClass } from '@stack-spot/portal-theme';
3
+ import { useCallback, useEffect, useLayoutEffect, useRef } from 'react';
4
+ import styled from 'styled-components';
5
+ import { useManualRender } from '../hooks/manual-render.js';
6
+ const Box = styled.div `
7
+ overflow-y: clip; // <-- do not use hidden, it's buggy in Chrome.
8
+ transition: height ease-in-out ${({ $animationMs }) => $animationMs / 1000}s;
9
+
10
+ .wrapper {
11
+ display: flex;
12
+ flex-direction: column;
13
+ }
14
+
15
+ &.initial {
16
+ opacity: 0;
17
+ pointer-events: none;
18
+ overflow: inherit;
19
+ transition: none;
20
+
21
+ &.content {
22
+ overflow: inherit;
23
+ transition: none;
24
+ }
25
+ }
26
+
27
+ .content {
28
+ overflow: hidden;
29
+ transition: height ease-in-out ${({ $animationMs }) => $animationMs / 1000}s;
30
+ }
31
+ `;
32
+ function getActualContent(wrapper) {
33
+ const firstChild = wrapper.firstChild;
34
+ if (!firstChild || !('tagName' in firstChild))
35
+ throw new Error('AnimatedHeight could not find any content to animate');
36
+ return firstChild;
37
+ }
38
+ function onChangeHeight(element, callback) {
39
+ const resizeObserver = new ResizeObserver((entries) => {
40
+ const entry = entries[0];
41
+ const newHeight = entry.borderBoxSize[0].blockSize;
42
+ callback(newHeight);
43
+ });
44
+ resizeObserver.observe(element);
45
+ return () => resizeObserver.disconnect();
46
+ }
47
+ /**
48
+ * This is a generic component for animating the height of a panel whenever its content changes.
49
+ *
50
+ * You can provide a header and a footer with fixed height, these won't change during the animations and will always be visible.
51
+ *
52
+ * This panel can also be hidden or visible and transitions between these two state will be animated.
53
+ * @param props the React props for this component. {@link Props}.
54
+ */
55
+ export const AnimatedHeight = ({ children, footer, header, visible = true, duration = 300, className, style, outerClassName, outerStyle }) => {
56
+ const { repaint } = useManualRender();
57
+ const boxRef = useRef(null);
58
+ const wrapperRef = useRef(null);
59
+ const headerRef = useRef(null);
60
+ const contentRef = useRef(null);
61
+ const footerRef = useRef(null);
62
+ const heights = useRef({ content: 0, footer: 0, header: 0, extra: 0 });
63
+ const status = useRef('initial');
64
+ const updateHeight = useCallback(() => {
65
+ if (boxRef.current) {
66
+ boxRef.current.style.height = `${heights.current.content + heights.current.header + heights.current.footer + heights.current.extra}px`;
67
+ }
68
+ if (contentRef.current)
69
+ contentRef.current.style.height = `${heights.current.content}px`;
70
+ }, []);
71
+ useLayoutEffect(() => {
72
+ let unsubscribe;
73
+ if (headerRef.current)
74
+ heights.current.header = headerRef.current.getBoundingClientRect().height;
75
+ if (contentRef.current) {
76
+ heights.current.content = contentRef.current.getBoundingClientRect().height;
77
+ unsubscribe = onChangeHeight(getActualContent(contentRef.current), (height) => {
78
+ heights.current.content = height;
79
+ if (status.current === 'visible' && boxRef.current)
80
+ updateHeight();
81
+ });
82
+ }
83
+ if (footerRef.current)
84
+ heights.current.footer = footerRef.current.getBoundingClientRect().height;
85
+ if (wrapperRef.current)
86
+ heights.current.extra = wrapperRef.current.getBoundingClientRect().height
87
+ - heights.current.header
88
+ - heights.current.footer
89
+ - heights.current.content;
90
+ status.current = visible ? 'visible' : 'hidden';
91
+ repaint();
92
+ return unsubscribe;
93
+ }, []);
94
+ useEffect(() => {
95
+ if (status.current === 'initial')
96
+ return;
97
+ status.current = visible ? 'visible' : 'hidden';
98
+ if (visible)
99
+ updateHeight();
100
+ else if (boxRef.current)
101
+ boxRef.current.style.height = '0';
102
+ }, [visible]);
103
+ return (_jsx(Box, { ref: boxRef, "$animationMs": duration, className: listToClass([outerClassName, status.current === 'initial' && 'initial']), style: outerStyle, children: _jsxs("div", { ref: wrapperRef, className: listToClass(['wrapper', className]), style: style, children: [header && _jsx("div", { ref: headerRef, children: header }), _jsx("div", { ref: contentRef, className: "content", children: children }), footer && _jsx("div", { ref: footerRef, children: footer })] }) }));
104
+ };
105
+ //# sourceMappingURL=AnimatedHeight.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Anim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CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAA;QAC/C,IAAI,OAAO;YAAE,YAAY,EAAE,CAAA;aACtB,IAAI,MAAM,CAAC,OAAO;YAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,CAAA;IAC5D,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IAEb,OAAO,CACL,KAAC,GAAG,IACF,GAAG,EAAE,MAAM,kBACG,QAAQ,EACtB,SAAS,EAAE,WAAW,CAAC,CAAC,cAAc,EAAE,MAAM,CAAC,OAAO,KAAK,SAAS,IAAI,SAAS,CAAC,CAAC,EACnF,KAAK,EAAE,UAAU,YAEjB,eAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,aAC/E,MAAM,IAAI,cAAK,GAAG,EAAE,SAAS,YAAG,MAAM,GAAO,EAC9C,cAAK,GAAG,EAAE,UAAU,EAAE,SAAS,EAAC,SAAS,YAAE,QAAQ,GAAO,EACzD,MAAM,IAAI,cAAK,GAAG,EAAE,SAAS,YAAG,MAAM,GAAO,IAC1C,GACF,CACP,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,46 @@
1
+ import { MutableRefObject } from 'react';
2
+ export interface ErrorProps {
3
+ /**
4
+ * The error component to be rendered in case of error. It should receive error props
5
+ */
6
+ errorComponent: React.FC<{
7
+ error: any;
8
+ }>;
9
+ /**
10
+ * The function to report the error.
11
+ */
12
+ reportError: (error: any) => void;
13
+ }
14
+ interface Props {
15
+ /**
16
+ * Whether or not to show the loading feedback.
17
+ */
18
+ loading: boolean;
19
+ /**
20
+ * A javascript error. Used to show error feedbacks.
21
+ */
22
+ error?: any;
23
+ /**
24
+ * If provided, this element will receive focus as soon as the content is loaded and has no errors.
25
+ * Can be either a React Ref Object or a query selector.
26
+ */
27
+ autofocus?: string | MutableRefObject<HTMLElement>;
28
+ /**
29
+ * The content to show if it's not loading or has errors.
30
+ */
31
+ children: React.ReactNode;
32
+ /**
33
+ * The error details component.
34
+ */
35
+ errorDetails: ErrorProps;
36
+ }
37
+ /**
38
+ * Renders a component that provides user feedback on async requests.
39
+ * It renders either a loading component, an error component (which is received as prop)
40
+ * or the received children props.
41
+ *
42
+ * @param options the props for rendering the component: {@link Props}.
43
+ */
44
+ export declare const AsyncContent: ({ loading, error, autofocus, children, errorDetails }: Props) => string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
45
+ export {};
46
+ //# sourceMappingURL=AsyncContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AsyncContent.d.ts","sourceRoot":"","sources":["../../src/components/AsyncContent.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAA8B,MAAM,OAAO,CAAA;AAEpE,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,cAAc,EAAG,KAAK,CAAC,EAAE,CAAC;QAAE,KAAK,EAAE,GAAG,CAAA;KAAE,CAAC,CAAC;IAC1C;;OAEG;IACH,WAAW,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CACnC;AAED,UAAU,KAAK;IACb;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACnD;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;MAEE;IACF,YAAY,EAAE,UAAU,CAAC;CAC1B;AAED;;;;;;GAMG;AAEH,eAAO,MAAM,YAAY,GAAI,uDAAuD,KAAK,iIA8BxF,CAAA"}
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Flex } from '@citric/core';
3
+ import { LoadingCircular } from '@citric/ui';
4
+ import { useEffect, useLayoutEffect } from 'react';
5
+ /**
6
+ * Renders a component that provides user feedback on async requests.
7
+ * It renders either a loading component, an error component (which is received as prop)
8
+ * or the received children props.
9
+ *
10
+ * @param options the props for rendering the component: {@link Props}.
11
+ */
12
+ export const AsyncContent = ({ loading, error, autofocus, children, errorDetails }) => {
13
+ const ErrorComponent = errorDetails.errorComponent;
14
+ useEffect(() => {
15
+ if (error) {
16
+ errorDetails.reportError(error);
17
+ // eslint-disable-next-line no-console
18
+ console.error(error);
19
+ }
20
+ }, [error]);
21
+ useLayoutEffect(() => {
22
+ if (!loading && !error) {
23
+ typeof autofocus === 'string' ? document.querySelector(autofocus)?.focus?.() : autofocus?.current?.focus();
24
+ }
25
+ }, [loading, error]);
26
+ if (loading) {
27
+ return (_jsx(Flex, { alignItems: "center", justifyContent: "center", flex: 1, style: { padding: '80px' }, "data-test-hint": "loading", children: _jsx(LoadingCircular, {}) }));
28
+ }
29
+ if (error) {
30
+ return _jsx(ErrorComponent, { error: error });
31
+ }
32
+ return children;
33
+ };
34
+ //# sourceMappingURL=AsyncContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AsyncContent.js","sourceRoot":"","sources":["../../src/components/AsyncContent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAoB,SAAS,EAAE,eAAe,EAAE,MAAM,OAAO,CAAA;AAqCpE;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAS,EAAE,EAAE;IAC3F,MAAM,cAAc,GAAG,YAAY,CAAC,cAAc,CAAA;IAElD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,KAAK,EAAE,CAAC;YACV,YAAY,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;YAC/B,sCAAsC;YACtC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;QACtB,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;IAEX,eAAe,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC,OAAO,IAAI,CAAC,KAAK,EAAE,CAAC;YACvB,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAE,QAAQ,CAAC,aAAa,CAAC,SAAS,CAAiB,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,CAAA;QAC7H,CAAC;IACH,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAA;IAEpB,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,CACL,KAAC,IAAI,IAAC,UAAU,EAAC,QAAQ,EAAC,cAAc,EAAC,QAAQ,EAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,oBAAiB,SAAS,YAC7G,KAAC,eAAe,KAAG,GACd,CACR,CAAA;IACH,CAAC;IAED,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,KAAC,cAAc,IAAC,KAAK,EAAE,KAAK,GAAI,CAAA;IACzC,CAAC;IAED,OAAO,QAAQ,CAAA;AACjB,CAAC,CAAA"}
@@ -1,4 +1,13 @@
1
- export declare const BannerWarning: ({ children }: {
1
+ import { SxProp } from '@citric/core';
2
+ /**
3
+ * A styled and dismissible alert box for showing important warnings for the user.
4
+ *
5
+ * This renders a yellow box with an exclamation icon. The content passed as parameter is placed on the right of the icon.
6
+ * @param props an object containing the content (children) to show inside the alert box.
7
+ */
8
+ export declare const BannerWarning: ({ children, showCloseButton }: {
2
9
  children: React.ReactNode;
3
- }) => import("react/jsx-runtime").JSX.Element;
10
+ sx?: SxProp;
11
+ showCloseButton?: boolean;
12
+ }) => import("react/jsx-runtime").JSX.Element | null;
4
13
  //# sourceMappingURL=BannerWarning.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BannerWarning.d.ts","sourceRoot":"","sources":["../../src/components/BannerWarning.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa;cAA8B,MAAM,SAAS;6CAgBtE,CAAA"}
1
+ {"version":3,"file":"BannerWarning.d.ts","sourceRoot":"","sources":["../../src/components/BannerWarning.tsx"],"names":[],"mappings":"AACA,OAAO,EAAyB,MAAM,EAAQ,MAAM,cAAc,CAAA;AAMlE;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAI,+BAC5B;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,OAAO,CAAA;CAAE,mDA4EtE,CAAA"}
@@ -1,6 +1,48 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Flex, IconBox, Text } from '@citric/core';
3
- import { ExclamationTriangle } from '@citric/icons';
2
+ import { Button, Flex, IconBox, Text } from '@citric/core';
3
+ import { ExclamationTriangle, TimesCircleFill } from '@citric/icons';
4
4
  import { Alert } from '@citric/ui';
5
- export const BannerWarning = ({ children }) => (_jsx(Flex, { sx: { position: 'fixed', top: 0, zIndex: '999', w: 12, left: 0 }, children: _jsxs(Alert, { colorScheme: "warning", sx: { p: 2, w: 12, justifyContent: 'center', height: ['60px', '100px'] }, children: [_jsx(IconBox, { size: "md", colorIcon: "light.500", sx: { display: ['block', 'none'] }, children: _jsx(ExclamationTriangle, {}) }), _jsx(Flex, { sx: { py: [5, 3] }, children: _jsx(Text, { sx: { fontSize: ['16px', '14px'], whiteSpace: 'pre-line' }, colorScheme: "warning.contrastText", children: children }) }), _jsx(IconBox, { size: "md", colorIcon: "light.500", sx: { display: ['block', 'none'] }, children: _jsx(ExclamationTriangle, {}) })] }) }));
5
+ import { useState } from 'react';
6
+ import { getCookie, setCookie } from '../utils/cookie.js';
7
+ /**
8
+ * A styled and dismissible alert box for showing important warnings for the user.
9
+ *
10
+ * This renders a yellow box with an exclamation icon. The content passed as parameter is placed on the right of the icon.
11
+ * @param props an object containing the content (children) to show inside the alert box.
12
+ */
13
+ export const BannerWarning = ({ children, showCloseButton = true }) => {
14
+ const bannerKey = 'bannerClosed';
15
+ const [isVisible, setIsVisible] = useState(() => {
16
+ if (typeof window !== 'undefined') {
17
+ const isBannerClosed = getCookie(bannerKey) === 'true';
18
+ return !isBannerClosed;
19
+ }
20
+ return false;
21
+ });
22
+ const handleClose = () => {
23
+ setCookie(bannerKey, 'true');
24
+ setIsVisible(false);
25
+ };
26
+ if (!isVisible) {
27
+ return null;
28
+ }
29
+ return (_jsx(Flex, { sx: { zIndex: '1', w: '12', mb: 7 }, children: _jsxs(Alert, { colorScheme: "warning", sx: {
30
+ position: 'relative',
31
+ px: 3,
32
+ py: 1,
33
+ alignItems: 'center',
34
+ display: 'flex',
35
+ justifyContent: 'space-between',
36
+ height: 'auto',
37
+ padding: `${showCloseButton ? '0.5rem' : '1rem'}`,
38
+ }, children: [_jsxs(Flex, { sx: {
39
+ alignItems: 'center',
40
+ flexWrap: 'nowrap',
41
+ }, children: [_jsx(IconBox, { size: "sm", colorIcon: "light.500", children: _jsx(ExclamationTriangle, {}) }), _jsx(Text, { sx: {
42
+ ml: 5,
43
+ }, appearance: "body2", colorScheme: "warning.contrastText", children: children })] }), showCloseButton && _jsx(Button, { appearance: 'text', onClick: handleClose, sx: {
44
+ p: 0,
45
+ ml: 2,
46
+ }, children: _jsx(IconBox, { size: "lg", colorIcon: "light.500", children: _jsx(TimesCircleFill, {}) }) })] }) }));
47
+ };
6
48
  //# sourceMappingURL=BannerWarning.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BannerWarning.js","sourceRoot":"","sources":["../../src/components/BannerWarning.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAA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ACf,cAAc,EAAE,eAAe;gBAC/B,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,GAAG,eAAe,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE;aAClD,aAED,MAAC,IAAI,IACH,EAAE,EAAE;wBACF,UAAU,EAAE,QAAQ;wBACpB,QAAQ,EAAE,QAAQ;qBACnB,aAED,KAAC,OAAO,IACN,IAAI,EAAC,IAAI,EACT,SAAS,EAAC,WAAW,YAErB,KAAC,mBAAmB,KAAG,GACf,EACV,KAAC,IAAI,IACH,EAAE,EAAE;gCACF,EAAE,EAAE,CAAC;6BACN,EACD,UAAU,EAAC,OAAO,EAClB,WAAW,EAAC,sBAAsB,YAEjC,QAAQ,GACJ,IACF,EAEN,eAAe,IAAI,KAAC,MAAM,IACzB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,WAAW,EACpB,EAAE,EAAE;wBACF,CAAC,EAAE,CAAC;wBACJ,EAAE,EAAE,CAAC;qBACN,YAED,KAAC,OAAO,IACN,IAAI,EAAC,IAAI,EACT,SAAS,EAAC,WAAW,YAErB,KAAC,eAAe,KAAG,GACX,GACH,IACH,GACH,CACR,CAAA;AACH,CAAC,CAAA"}
@@ -1,3 +1,4 @@
1
+ export type AnchorComponent = (props: React.AnchorHTMLAttributes<HTMLAnchorElement>) => React.ReactElement;
1
2
  interface BreadcrumbItem {
2
3
  /**
3
4
  * A unique id for this link of the breadcrumb. If not provided, the label will be used.
@@ -30,13 +31,20 @@ interface Props {
30
31
  * @default false
31
32
  */
32
33
  shouldUpdatePageTitle?: boolean;
34
+ /**
35
+ * Key of the current page. If an item has this key, it won't be rendered as a link and will be marked as active.
36
+ */
37
+ currentPageKey?: string;
38
+ }
39
+ interface ItemProps extends Pick<Props, 'currentPageKey'> {
40
+ item: BreadcrumbItem;
33
41
  }
34
- declare const BreadcrumbItem: ({ label, href }: BreadcrumbItem) => import("react/jsx-runtime").JSX.Element;
42
+ declare const BreadcrumbItem: ({ item: { label, href, key }, currentPageKey }: ItemProps) => import("react/jsx-runtime").JSX.Element;
35
43
  /**
36
44
  * Builds a breadcrumb navigator based on the items passed in the properties.
37
45
  *
38
46
  * If the breadcrumb is obtained asynchronously, pass `isLoading = true` in order to show a loading feedback.
39
47
  */
40
- export declare const BreadcrumbList: ({ items, isLoading, shouldUpdatePageTitle }: Props) => import("react/jsx-runtime").JSX.Element;
48
+ export declare const BreadcrumbList: ({ items, isLoading, shouldUpdatePageTitle, currentPageKey }: Props) => import("react/jsx-runtime").JSX.Element;
41
49
  export {};
42
50
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumb/index.tsx"],"names":[],"mappings":"AAOA,UAAU,cAAc;IACtB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,UAAU,KAAK;IACb;;OAEG;IACH,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;OAOG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,QAAA,MAAM,cAAc,oBAAqB,cAAc,4CAItD,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,gDAAiD,KAAK,4CAOhF,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumb/index.tsx"],"names":[],"mappings":"AAQA,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,KAAK,KAAK,CAAC,YAAY,CAAA;AAE1G,UAAU,cAAc;IACtB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,UAAU,KAAK;IACb;;OAEG;IACH,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;OAOG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,UAAU,SAAU,SAAQ,IAAI,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACvD,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,QAAA,MAAM,cAAc,GAAI,gDAAgD,SAAS,4CAKhF,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,6DAA6D,KAAK,4CAUhG,CAAA"}
@@ -3,20 +3,22 @@ import { Text } from '@citric/core';
3
3
  import { Skeleton } from '@citric/ui';
4
4
  import { last } from 'lodash';
5
5
  import { useEffect, useMemo } from 'react';
6
+ import { useAnchorTag } from '../../context/anchor.js';
6
7
  import { titleEffect } from '../../hooks/title.js';
7
8
  import { Box } from './styled.js';
8
- const BreadcrumbItem = ({ label, href }) => {
9
+ const BreadcrumbItem = ({ item: { label, href, key }, currentPageKey }) => {
9
10
  const text = _jsx(Text, { appearance: "breadcrumb", children: label });
10
- const element = href ? _jsx("a", { href: href, children: text }) : text;
11
- return _jsx("li", { children: element });
11
+ const Link = useAnchorTag();
12
+ const shouldBeLink = href && currentPageKey != key;
13
+ return _jsx("li", { children: shouldBeLink ? _jsx(Link, { href: href, children: text }) : text });
12
14
  };
13
15
  /**
14
16
  * Builds a breadcrumb navigator based on the items passed in the properties.
15
17
  *
16
18
  * If the breadcrumb is obtained asynchronously, pass `isLoading = true` in order to show a loading feedback.
17
19
  */
18
- export const BreadcrumbList = ({ items, isLoading, shouldUpdatePageTitle }) => {
19
- const listItems = useMemo(() => items.map(item => _jsx(BreadcrumbItem, { ...item }, item.key || item.label)), [items]);
20
+ export const BreadcrumbList = ({ items, isLoading, shouldUpdatePageTitle, currentPageKey }) => {
21
+ const listItems = useMemo(() => items.map(item => _jsx(BreadcrumbItem, { item: item, currentPageKey: currentPageKey }, item.key || item.label)), [items]);
20
22
  useEffect(() => {
21
23
  const title = last(items)?.label;
22
24
  if (shouldUpdatePageTitle && title && !isLoading)
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Breadcrumb/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAqC9B,MAAM,cAAc,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,EAAkB,EAAE,EAAE;IACzD,MAAM,IAAI,GAAG,KAAC,IAAI,IAAC,UAAU,EAAC,YAAY,YAAE,KAAK,GAAQ,CAAA;IACzD,MAAM,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,YAAG,IAAI,EAAE,IAAI,YAAG,IAAI,GAAK,CAAC,CAAC,CAAC,IAAI,CAAA;IACvD,OAAO,uBAAK,OAAO,GAAM,CAAA;AAC3B,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,qBAAqB,EAAS,EAAE,EAAE;IACnF,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,KAAC,cAAc,OAAkC,IAAI,IAAhC,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,KA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AK,YAAY,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,YAAG,IAAI,GAAQ,CAAC,CAAC,CAAC,IAAI,GAAM,CAAA;AACzE,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,qBAAqB,EAAE,cAAc,EAAS,EAAE,EAAE;IACnG,MAAM,SAAS,GAAG,OAAO,CACvB,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,KAAC,cAAc,IAA8B,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,cAAc,IAAlE,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,KAAK,CAAgD,CAAC,EACpH,CAAC,KAAK,CAAC,CACR,CAAA;IACD,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,CAAA;QAChC,IAAI,qBAAqB,IAAI,KAAK,IAAI,CAAC,SAAS;YAAE,OAAO,WAAW,CAAC,KAAK,CAAC,CAAA;IAC7E,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAA;IACtB,OAAO,KAAC,GAAG,cAAE,SAAS,CAAC,CAAC,CAAC,KAAC,QAAQ,IAAC,MAAM,EAAC,MAAM,GAAG,CAAC,CAAC,CAAC,uBAAK,SAAS,GAAM,GAAO,CAAA;AACnF,CAAC,CAAA"}
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- export declare const Box: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
1
+ export declare const Box: React.FC<React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>>;
3
2
  //# sourceMappingURL=styled.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumb/styled.ts"],"names":[],"mappings":";AAIA,eAAO,MAAM,GAAG,kOA+Bf,CAAA"}
1
+ {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumb/styled.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CA+BjG,CAAA"}
@@ -1,6 +1,7 @@
1
1
  import { getFontAppearance } from '@citric/core/dist/utils/theme.js';
2
2
  import { theme } from '@stack-spot/portal-theme';
3
3
  import { styled } from 'styled-components';
4
+ // the type below should be inferred, but a bug in TS+PNPM prevents it: https://github.com/microsoft/TypeScript/issues/42873
4
5
  export const Box = styled.nav `
5
6
  margin-bottom: 24px;
6
7
 
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sourceRoot":"","sources":["../../../src/components/Breadcrumb/styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE1C,MAAM,CAAC,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;cAcf,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAY,EAAE,YAAY,CAAQ;;eAElE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC;;;;;;;;;aAS1B,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC;;;eAGtB,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY;;;CAG5C,CAAA"}
1
+ {"version":3,"file":"styled.js","sourceRoot":"","sources":["../../../src/components/Breadcrumb/styled.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE1C,4HAA4H;AAC5H,MAAM,CAAC,MAAM,GAAG,GAAsF,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;cAclG,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAY,EAAE,YAAY,CAAQ;;eAElE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC;;;;;;;;;aAS1B,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC;;;eAGtB,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY;;;CAG5C,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { ButtonProps } from '@citric/core/dist/Button.js';
2
+ import { ReactNode } from 'react';
3
+ interface Props extends ButtonProps {
4
+ isLoading?: boolean;
5
+ loadingSize?: 'sm' | 'md' | 'lg';
6
+ children: ReactNode;
7
+ onClick?: () => void;
8
+ }
9
+ export declare const ButtonLoading: ({ isLoading, loadingSize, children, disabled, sx, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=ButtonLoading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ButtonLoading.d.ts","sourceRoot":"","sources":["../../src/components/ButtonLoading.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,UAAU,KAAM,SAAQ,WAAW;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,GAAI,8DAAqE,KAAK,4CAgBvG,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button, Text } from '@citric/core';
3
+ import { LoadingCircular } from '@citric/ui';
4
+ export const ButtonLoading = ({ isLoading, loadingSize = 'sm', children, disabled, sx, ...props }) => (_jsxs(Button, { type: "submit", ...props, disabled: isLoading || disabled, sx: { ...sx, position: 'relative' }, children: [_jsx(Text, { as: "span", sx: { visibility: isLoading ? 'hidden' : 'visible' }, children: children }), _jsx(LoadingCircular, { colorScheme: props.colorScheme, size: loadingSize, sx: { visibility: isLoading ? 'visible' : 'hidden', position: 'absolute' } })] }));
5
+ //# sourceMappingURL=ButtonLoading.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ButtonLoading.js","sourceRoot":"","sources":["../../src/components/ButtonLoading.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAE3C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAU5C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,SAAS,EAAE,WAAW,GAAG,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,KAAK,EAAS,EAAE,EAAE,CAAC,CAC3G,MAAC,MAAM,IACL,IAAI,EAAC,QAAQ,KACT,KAAK,EACT,QAAQ,EAAE,SAAS,IAAI,QAAQ,EAC/B,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,aAEnC,KAAC,IAAI,IAAC,EAAE,EAAC,MAAM,EAAC,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EAAE,YACjE,QAAQ,GACJ,EACP,KAAC,eAAe,IACd,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,IAAI,EAAE,WAAW,EACjB,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,GAC1E,IACK,CACV,CAAA"}
@@ -1,2 +1,7 @@
1
+ /**
2
+ * A button for opening or closing the service-now chat window.
3
+ *
4
+ * This is a circular orange button with a chat icon if the chat window is closed or a close icon if the chat window is open.
5
+ */
1
6
  export declare const ChatBot: () => import("react/jsx-runtime").JSX.Element;
2
7
  //# sourceMappingURL=ChatBot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatBot.d.ts","sourceRoot":"","sources":["../../src/components/ChatBot.tsx"],"names":[],"mappings":"AA8CA,eAAO,MAAM,OAAO,+CA8BnB,CAAA"}
1
+ {"version":3,"file":"ChatBot.d.ts","sourceRoot":"","sources":["../../src/components/ChatBot.tsx"],"names":[],"mappings":"AA8CA;;;;GAIG;AACH,eAAO,MAAM,OAAO,+CA8BnB,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Button, Flex, IconBox } from '@citric/core';
3
3
  import { QuestionAnswer, Times } from '@citric/icons';
4
- import { addOrRemoveServiceNowLauncher, getServiceNowLauncher } from '../hooks/service-now.js';
4
+ import { CHAT_BUTTON_ID, CHAT_BUTTON_WRAPPER_ID, getServiceNowLauncher, hideChatWindow, showChatWindow } from '../hooks/service-now.js';
5
5
  const styles = {
6
6
  content: {
7
7
  position: 'fixed',
@@ -43,19 +43,24 @@ const styles = {
43
43
  transform: 'translate(-50%, -50%)',
44
44
  },
45
45
  };
46
+ /**
47
+ * A button for opening or closing the service-now chat window.
48
+ *
49
+ * This is a circular orange button with a chat icon if the chat window is closed or a close icon if the chat window is open.
50
+ */
46
51
  export const ChatBot = () => {
47
52
  const handleOpenChatBot = () => {
48
53
  const chatIframe = getServiceNowLauncher();
49
54
  if (chatIframe) {
50
- const isShow = chatIframe.classList.contains('show');
51
- if (isShow) {
52
- addOrRemoveServiceNowLauncher('remove');
55
+ const isVisible = chatIframe.classList.contains('show');
56
+ if (isVisible) {
57
+ hideChatWindow();
53
58
  }
54
59
  else {
55
- addOrRemoveServiceNowLauncher('add');
60
+ showChatWindow();
56
61
  }
57
62
  }
58
63
  };
59
- return (_jsx(Flex, { id: "service-now-content", sx: styles.content, children: _jsx(Button, { onClick: handleOpenChatBot, id: "service-now-button", sx: styles.button, children: _jsxs(IconBox, { colorIcon: "light.400", sx: styles.icon, size: "lg", children: [_jsx(Times, { className: "times" }), _jsx(QuestionAnswer, { className: "question" })] }) }) }));
64
+ return (_jsx(Flex, { id: CHAT_BUTTON_WRAPPER_ID, sx: styles.content, children: _jsx(Button, { onClick: handleOpenChatBot, id: CHAT_BUTTON_ID, sx: styles.button, children: _jsxs(IconBox, { colorIcon: "light.400", sx: styles.icon, size: "lg", children: [_jsx(Times, { className: "times" }), _jsx(QuestionAnswer, { className: "question" })] }) }) }));
60
65
  };
61
66
  //# sourceMappingURL=ChatBot.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatBot.js","sourceRoot":"","sources":["../../src/components/ChatBot.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAU,MAAM,cAAc,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrD,OAAO,EAAE,6BAA6B,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAE3F,MAAM,MAAM,GAAW;IACrB,OAAO,EAAE;QACP,QAAQ,EAAE,OAAO;QACjB,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,GAAG;QACV,UAAU,EAAE,SAAS;QACrB,iBAAiB,EAAE;YACjB,OAAO,EAAE,OAAO;SACjB;QACD,oBAAoB,EAAE;YACpB,OAAO,EAAE,MAAM;SAChB;QACD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M,iBAAiB,GAAG,GAAG,EAAE;QAC7B,MAAM,UAAU,GAAG,qBAAqB,EAAE,CAAA;QAC1C,IAAI,UAAU,EAAE,CAAC;YACf,MAAM,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;YACvD,IAAI,SAAS,EAAE,CAAC;gBACd,cAAc,EAAE,CAAA;YAClB,CAAC;iBAAM,CAAC;gBACN,cAAc,EAAE,CAAA;YAClB,CAAC;QACH,CAAC;IACH,CAAC,CAAA;IAED,OAAO,CACL,KAAC,IAAI,IAAC,EAAE,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,CAAC,OAAO,YAClD,KAAC,MAAM,IACL,OAAO,EAAE,iBAAiB,EAC1B,EAAE,EAAE,cAAc,EAClB,EAAE,EAAE,MAAM,CAAC,MAAM,YAEjB,MAAC,OAAO,IACN,SAAS,EAAC,WAAW,EACrB,EAAE,EAAE,MAAM,CAAC,IAAI,EACf,IAAI,EAAC,IAAI,aACT,KAAC,KAAK,IAAC,SAAS,EAAC,OAAO,GAAG,EAC3B,KAAC,cAAc,IAAC,SAAS,EAAC,UAAU,GAAG,IAC/B,GACH,GACJ,CACR,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,6 @@
1
+ export declare const ContentValidateFilter: ({ searchText, listLength, children, }: {
2
+ searchText?: string;
3
+ listLength: number;
4
+ children: React.ReactNode;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=ContentValidateFilter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentValidateFilter.d.ts","sourceRoot":"","sources":["../../src/components/ContentValidateFilter.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,GAAI,uCAInC;IACD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,4CAGA,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { PlaceholderResourceEmptySearch } from './Placeholder.js';
3
+ export const ContentValidateFilter = ({ searchText, listLength, children, }) => {
4
+ if (!listLength && searchText)
5
+ return _jsx(PlaceholderResourceEmptySearch, {});
6
+ return _jsx(_Fragment, { children: children });
7
+ };
8
+ //# sourceMappingURL=ContentValidateFilter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentValidateFilter.js","sourceRoot":"","sources":["../../src/components/ContentValidateFilter.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,eAAe,CAAA;AAE9D,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACpC,UAAU,EACV,UAAU,EACV,QAAQ,GAKT,EAAE,EAAE;IACH,IAAI,CAAC,UAAU,IAAI,UAAU;QAAE,OAAO,KAAC,8BAA8B,KAAG,CAAA;IACxE,OAAO,4BAAG,QAAQ,GAAI,CAAA;AACxB,CAAC,CAAA"}
@@ -0,0 +1,37 @@
1
+ import { WithStyle } from '@stack-spot/portal-theme';
2
+ type Side = 'top' | 'right' | 'left' | 'bottom';
3
+ type ScrollType = 'none' | 'wheel' | 'bar' | 'arrows';
4
+ interface Props extends WithStyle {
5
+ /**
6
+ * How to scroll the content.
7
+ * - none: overflow is hidden. No scrolling.
8
+ * - wheel: the content is solely scrollable through the mouse wheel and keyboard arrows, no scroll bars are rendered.
9
+ * - bar: this is the normal browser scroll. The content will be scrollable through the mouse wheel, keyboard and scrollbar.
10
+ * - arrows: arrows will be placed in the far edges of the sides that must be scrolled. The content is scrolled through the mouse wheel,
11
+ * keyboard and these arrows. Hovering an arrow slowly scrolls the content, clicking the arrow fully scrolls the content in its direction.
12
+ * There are no scrollbars in this scenario.
13
+ * @default 'none'
14
+ */
15
+ scroll?: ScrollType;
16
+ /**
17
+ * If true, a horizontal scroll can be performed by using the vertical mouse wheel.
18
+ * @default false
19
+ */
20
+ enableHorizontalScrollWithVerticalWheel?: boolean;
21
+ /**
22
+ * Which sides to fade when the content overflows.
23
+ *
24
+ * Important: it seems the current solution doesn't support mixing vertical and horizontal scrolls. I'm not sure if this is possible, I
25
+ * believed combining linear gradients would work, but it doesn't.
26
+ */
27
+ sides?: Side[];
28
+ children?: React.ReactNode;
29
+ }
30
+ /**
31
+ * This component applies a fading graphical effect to its content if it overflows in any of the sides specified by the props.
32
+ *
33
+ * This also controls how this overflow is scrolled, introducing a new scrolling technique, which applies arrows to the overflowing side.
34
+ */
35
+ export declare const FadingOverflow: ({ children, scroll, sides, enableHorizontalScrollWithVerticalWheel, className, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
36
+ export {};
37
+ //# sourceMappingURL=FadingOverflow.d.ts.map