@stack-spot/portal-components 0.0.18 → 1.0.0-dev.1770393008395

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 (533) 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 +7 -9
  15. package/dist/components/Breadcrumb/index.d.ts.map +1 -1
  16. package/dist/components/Breadcrumb/index.js +7 -6
  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 +27 -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 +102 -0
  253. package/dist/components/notification/NotificationList.js.map +1 -0
  254. package/dist/components/notification/types.d.ts +60 -0
  255. package/dist/components/notification/types.d.ts.map +1 -0
  256. package/dist/components/notification/types.js +7 -0
  257. package/dist/components/notification/types.js.map +1 -0
  258. package/dist/containers/NotificationsPage.d.ts +2 -0
  259. package/dist/containers/NotificationsPage.d.ts.map +1 -0
  260. package/dist/containers/NotificationsPage.js +72 -0
  261. package/dist/containers/NotificationsPage.js.map +1 -0
  262. package/dist/context/anchor.d.ts +27 -0
  263. package/dist/context/anchor.d.ts.map +1 -0
  264. package/dist/context/anchor.js +23 -0
  265. package/dist/context/anchor.js.map +1 -0
  266. package/dist/context/loading.d.ts +27 -0
  267. package/dist/context/loading.d.ts.map +1 -0
  268. package/dist/context/loading.js +24 -0
  269. package/dist/context/loading.js.map +1 -0
  270. package/dist/context/notification/LazyNotificationList.d.ts +28 -0
  271. package/dist/context/notification/LazyNotificationList.d.ts.map +1 -0
  272. package/dist/context/notification/LazyNotificationList.js +136 -0
  273. package/dist/context/notification/LazyNotificationList.js.map +1 -0
  274. package/dist/context/notification/NotificationController.d.ts +25 -0
  275. package/dist/context/notification/NotificationController.d.ts.map +1 -0
  276. package/dist/context/notification/NotificationController.js +153 -0
  277. package/dist/context/notification/NotificationController.js.map +1 -0
  278. package/dist/context/notification/context.d.ts +8 -0
  279. package/dist/context/notification/context.d.ts.map +1 -0
  280. package/dist/context/notification/context.js +12 -0
  281. package/dist/context/notification/context.js.map +1 -0
  282. package/dist/context/notification/hooks.d.ts +18 -0
  283. package/dist/context/notification/hooks.d.ts.map +1 -0
  284. package/dist/context/notification/hooks.js +104 -0
  285. package/dist/context/notification/hooks.js.map +1 -0
  286. package/dist/context/notification/types.d.ts +65 -0
  287. package/dist/context/notification/types.d.ts.map +1 -0
  288. package/dist/context/notification/types.js +2 -0
  289. package/dist/context/notification/types.js.map +1 -0
  290. package/dist/hooks/date.d.ts +18 -0
  291. package/dist/hooks/date.d.ts.map +1 -0
  292. package/dist/hooks/date.js +68 -0
  293. package/dist/hooks/date.js.map +1 -0
  294. package/dist/hooks/keyboard.d.ts +64 -0
  295. package/dist/hooks/keyboard.d.ts.map +1 -0
  296. package/dist/hooks/keyboard.js +84 -0
  297. package/dist/hooks/keyboard.js.map +1 -0
  298. package/dist/hooks/manual-render.d.ts +8 -0
  299. package/dist/hooks/manual-render.d.ts.map +1 -0
  300. package/dist/hooks/manual-render.js +10 -0
  301. package/dist/hooks/manual-render.js.map +1 -0
  302. package/dist/hooks/service-now.d.ts +32 -1
  303. package/dist/hooks/service-now.d.ts.map +1 -1
  304. package/dist/hooks/service-now.js +58 -18
  305. package/dist/hooks/service-now.js.map +1 -1
  306. package/dist/hooks/text.d.ts +9 -0
  307. package/dist/hooks/text.d.ts.map +1 -0
  308. package/dist/hooks/text.js +24 -0
  309. package/dist/hooks/text.js.map +1 -0
  310. package/dist/hooks/title.d.ts +13 -0
  311. package/dist/hooks/title.d.ts.map +1 -1
  312. package/dist/hooks/title.js +13 -0
  313. package/dist/hooks/title.js.map +1 -1
  314. package/dist/hooks/use-effect-once.d.ts.map +1 -1
  315. package/dist/hooks/use-effect-once.js.map +1 -1
  316. package/dist/index.d.ts +14 -4
  317. package/dist/index.d.ts.map +1 -1
  318. package/dist/index.js +14 -4
  319. package/dist/index.js.map +1 -1
  320. package/dist/notifications.d.ts +11 -0
  321. package/dist/notifications.d.ts.map +1 -0
  322. package/dist/notifications.js +10 -0
  323. package/dist/notifications.js.map +1 -0
  324. package/dist/svg/AI.d.ts +8 -0
  325. package/dist/svg/AI.d.ts.map +1 -0
  326. package/dist/svg/AI.js +15 -0
  327. package/dist/svg/AI.js.map +1 -0
  328. package/dist/svg/CS.d.ts +8 -0
  329. package/dist/svg/CS.d.ts.map +1 -0
  330. package/dist/svg/CS.js +15 -0
  331. package/dist/svg/CS.js.map +1 -0
  332. package/dist/svg/EDP.d.ts +8 -0
  333. package/dist/svg/EDP.d.ts.map +1 -0
  334. package/dist/svg/EDP.js +15 -0
  335. package/dist/svg/EDP.js.map +1 -0
  336. package/dist/svg/Forbidden.d.ts +5 -0
  337. package/dist/svg/Forbidden.d.ts.map +1 -0
  338. package/dist/svg/Forbidden.js +4 -0
  339. package/dist/svg/Forbidden.js.map +1 -0
  340. package/dist/svg/GenericPlaceholder.d.ts +7 -0
  341. package/dist/svg/GenericPlaceholder.d.ts.map +1 -0
  342. package/dist/svg/GenericPlaceholder.js +4 -0
  343. package/dist/svg/GenericPlaceholder.js.map +1 -0
  344. package/dist/svg/GenericPlaceholderCentered.d.ts +7 -0
  345. package/dist/svg/GenericPlaceholderCentered.d.ts.map +1 -0
  346. package/dist/svg/GenericPlaceholderCentered.js +4 -0
  347. package/dist/svg/GenericPlaceholderCentered.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 +13 -0
  373. package/dist/svg/index.d.ts.map +1 -0
  374. package/dist/svg/index.js +14 -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 +54 -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 +15 -13
  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 +123 -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 +72 -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 +207 -0
  459. package/src/components/notification/types.ts +72 -0
  460. package/src/containers/NotificationsPage.tsx +121 -0
  461. package/src/context/anchor.tsx +37 -0
  462. package/src/context/loading.tsx +36 -0
  463. package/src/context/notification/LazyNotificationList.ts +103 -0
  464. package/src/context/notification/NotificationController.ts +119 -0
  465. package/src/context/notification/context.tsx +23 -0
  466. package/src/context/notification/hooks.ts +115 -0
  467. package/src/context/notification/types.ts +71 -0
  468. package/src/hooks/date.ts +68 -0
  469. package/src/hooks/keyboard.tsx +128 -0
  470. package/src/hooks/manual-render.tsx +10 -0
  471. package/src/hooks/service-now.tsx +64 -19
  472. package/src/hooks/text.tsx +30 -0
  473. package/src/hooks/title.tsx +13 -0
  474. package/src/index.ts +14 -6
  475. package/src/notifications.ts +11 -0
  476. package/src/svg/AI.tsx +41 -0
  477. package/src/svg/CS.tsx +48 -0
  478. package/src/svg/EDP.tsx +31 -0
  479. package/src/svg/Forbidden.tsx +22 -0
  480. package/src/svg/GenericPlaceholder.tsx +16 -0
  481. package/src/svg/GenericPlaceholderCentered.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 +14 -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/components/Login.d.ts +0 -26
  495. package/dist/components/Login.d.ts.map +0 -1
  496. package/dist/components/Login.js +0 -100
  497. package/dist/components/Login.js.map +0 -1
  498. package/dist/components/MiniLogo.d.ts +0 -6
  499. package/dist/components/MiniLogo.d.ts.map +0 -1
  500. package/dist/components/MiniLogo.js +0 -4
  501. package/dist/components/MiniLogo.js.map +0 -1
  502. package/dist/components/tour/StepContainer.d.ts +0 -13
  503. package/dist/components/tour/StepContainer.d.ts.map +0 -1
  504. package/dist/components/tour/StepContainer.js +0 -48
  505. package/dist/components/tour/StepContainer.js.map +0 -1
  506. package/dist/components/tour/StepNavigation.d.ts +0 -13
  507. package/dist/components/tour/StepNavigation.d.ts.map +0 -1
  508. package/dist/components/tour/StepNavigation.js +0 -20
  509. package/dist/components/tour/StepNavigation.js.map +0 -1
  510. package/dist/components/tour/StepTitle.d.ts +0 -7
  511. package/dist/components/tour/StepTitle.d.ts.map +0 -1
  512. package/dist/components/tour/StepTitle.js +0 -5
  513. package/dist/components/tour/StepTitle.js.map +0 -1
  514. package/dist/components/tour/context.d.ts +0 -17
  515. package/dist/components/tour/context.d.ts.map +0 -1
  516. package/dist/components/tour/context.js +0 -48
  517. package/dist/components/tour/context.js.map +0 -1
  518. package/dist/components/tour/index.d.ts +0 -9
  519. package/dist/components/tour/index.d.ts.map +0 -1
  520. package/dist/components/tour/index.js +0 -4
  521. package/dist/components/tour/index.js.map +0 -1
  522. package/dist/components/tour/utils.d.ts +0 -13
  523. package/dist/components/tour/utils.d.ts.map +0 -1
  524. package/dist/components/tour/utils.js +0 -43
  525. package/dist/components/tour/utils.js.map +0 -1
  526. package/src/components/Login.tsx +0 -157
  527. package/src/components/MiniLogo.tsx +0 -32
  528. package/src/components/tour/StepContainer.tsx +0 -67
  529. package/src/components/tour/StepNavigation.tsx +0 -32
  530. package/src/components/tour/StepTitle.tsx +0 -17
  531. package/src/components/tour/context.tsx +0 -56
  532. package/src/components/tour/index.ts +0 -7
  533. package/src/components/tour/utils.tsx +0 -65
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/Select/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,151 @@
1
+ import { WithStyle } from '@stack-spot/portal-theme';
2
+ import { ReactElement } from 'react';
3
+ interface CustomLabel {
4
+ /**
5
+ * A unique identifier for this label. This is also used to read this label to screen readers.
6
+ */
7
+ id: string;
8
+ /**
9
+ * A custom label that can be made up of any React component.
10
+ */
11
+ element: React.ReactNode;
12
+ }
13
+ export interface Action {
14
+ /**
15
+ * The label of the action.
16
+ */
17
+ label: string | CustomLabel;
18
+ /**
19
+ * Function to run on a click.
20
+ */
21
+ onClick?: (event?: React.MouseEvent) => void;
22
+ /**
23
+ * URL to open on a click.
24
+ */
25
+ href?: string;
26
+ /**
27
+ * Target of the URL to open.
28
+ */
29
+ target?: React.AnchorHTMLAttributes<HTMLAnchorElement>['target'];
30
+ /**
31
+ * Language of the linked document.
32
+ */
33
+ lang?: React.AnchorHTMLAttributes<HTMLAnchorElement>['lang'];
34
+ /**
35
+ * Language of the destination URL.
36
+ */
37
+ hrefLang?: React.AnchorHTMLAttributes<HTMLAnchorElement>['hrefLang'];
38
+ /**
39
+ * The title of the action.
40
+ */
41
+ title?: string;
42
+ }
43
+ interface ItemWithIcon {
44
+ /**
45
+ * An Icon to appear at the left of the item.
46
+ */
47
+ icon?: React.ReactElement;
48
+ /**
49
+ * An Icon to appear at the right of the item.
50
+ */
51
+ iconRight?: React.ReactElement;
52
+ }
53
+ export interface ListAction extends ItemWithIcon, Action {
54
+ /**
55
+ * Whether or not this option is currently active.
56
+ */
57
+ active?: boolean;
58
+ /**
59
+ * Icon to render when this option is active.
60
+ */
61
+ iconActive?: React.ReactElement;
62
+ /**
63
+ * A class to be added to this item.
64
+ */
65
+ className?: string;
66
+ /**
67
+ * Defines the ARIA role of the element for accessibility purposes. Example: "button", "dialog", etc.
68
+ */
69
+ role?: string;
70
+ }
71
+ interface ListGroup {
72
+ /**
73
+ * If this group is rendered as a section with its items right below it or a collapsible, which requires a click to open a submenu.
74
+ */
75
+ type?: 'section' | 'collapsible';
76
+ /**
77
+ * The items of this group.
78
+ */
79
+ children: ListItem[];
80
+ /**
81
+ * A class to be added to this item.
82
+ */
83
+ className?: string;
84
+ }
85
+ interface ListSection extends ListGroup {
86
+ type: 'section';
87
+ /**
88
+ * The section's title.
89
+ */
90
+ label?: string;
91
+ }
92
+ interface ListCollapsible extends ListGroup, ItemWithIcon {
93
+ type?: 'collapsible';
94
+ /**
95
+ * The title of the collapsible menu.
96
+ */
97
+ label: string;
98
+ }
99
+ type ListItem = ListSection | ListCollapsible | ListAction;
100
+ export interface SelectionListProps extends WithStyle {
101
+ /**
102
+ * The id of this selection list. This is important for accessibility. Be sure to link it to the aria-controls tag of the element who
103
+ * controls the visibility of this selection list.
104
+ */
105
+ id: string;
106
+ /**
107
+ * Whether or not the selection list is visible.
108
+ */
109
+ visible?: boolean;
110
+ /**
111
+ * The options in the selection list.
112
+ */
113
+ items: ListItem[];
114
+ /**
115
+ * Function to run when the selection list is hidden/closed.
116
+ */
117
+ onHide?: () => void;
118
+ /**
119
+ * The maximum height for the selection list.
120
+ * @default "300px"
121
+ */
122
+ maxHeight?: string;
123
+ /**
124
+ * A React element to render right before the items.
125
+ */
126
+ before?: ReactElement;
127
+ /**
128
+ * A React element to render right after the items.
129
+ */
130
+ after?: ReactElement;
131
+ /**
132
+ * Whether or not this list should be scrollable.
133
+ */
134
+ scroll?: boolean;
135
+ /**
136
+ * Show list as card
137
+ */
138
+ showListAsCard?: boolean;
139
+ }
140
+ /**
141
+ * Renders a component that allows the selection of one item. The list is show/hidden according to the prop `visible`.
142
+ *
143
+ * The items in this list can be grouped into multiple sections. Sections may be displayed on a column (section) or might replace the
144
+ * current list of options with another list of options (collapsible).
145
+ *
146
+ * This component implements keyboard controls and accessibility features.
147
+ * @param props the component's props {@link SelectionListProps}.
148
+ */
149
+ export declare const SelectionList: ({ id, items, className, style, visible, maxHeight, onHide, before, after, scroll, showListAsCard, }: SelectionListProps) => import("react/jsx-runtime").JSX.Element;
150
+ export {};
151
+ //# sourceMappingURL=SelectionList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectionList.d.ts","sourceRoot":"","sources":["../../src/components/SelectionList.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAsB,MAAM,0BAA0B,CAAA;AAExE,OAAO,EAAE,YAAY,EAA6C,MAAM,OAAO,CAAA;AAK/E,UAAU,WAAW;IACnB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC7C;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC;IACjE;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;IAC7D;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,UAAU,CAAC,CAAC;IACrE;;OAEG;IACH,KAAK,CAA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AAY,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAkID;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa,GAAI,qGAE3B,kBAAkB,4CAiHpB,CAAA"}
@@ -0,0 +1,180 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Flex, IconBox, Text } from '@citric/core';
3
+ import { ArrowLeft, Check, ChevronRight } from '@citric/icons';
4
+ import { IconButton } from '@citric/ui';
5
+ import { listToClass, theme } from '@stack-spot/portal-theme';
6
+ import { useTranslate } from '@stack-spot/portal-translate';
7
+ import { useCallback, useEffect, useMemo, useState } from 'react';
8
+ import { styled } from 'styled-components';
9
+ import { useAnchorTag } from '../context/anchor.js';
10
+ import { useKeyboardControls } from '../hooks/keyboard.js';
11
+ const ANIMATION_DURATION_MS = 300;
12
+ const MAX_HEIGHT_TRANSITION = `max-height ease-in ${ANIMATION_DURATION_MS / 1000}s`;
13
+ const SelectionBox = styled.div `
14
+ max-height: 0;
15
+ overflow-y: ${({ $scroll }) => $scroll ? 'auto' : 'hidden'};
16
+ overflow-x: hidden;
17
+ transition: ${MAX_HEIGHT_TRANSITION}, visibility 0s ${ANIMATION_DURATION_MS / 1000}s;
18
+ z-index: 1;
19
+ box-shadow: 4px 4px 48px #000;
20
+ border-radius: 0.5rem;
21
+ visibility: hidden;
22
+
23
+ .selection-list-content {
24
+ display: flex;
25
+ flex-direction: column;
26
+ border-radius: 0.5rem;
27
+ background-color: ${theme.color.light['300']};
28
+ padding-inline: ${({ $showListAsCard }) => $showListAsCard ? '8px' : '0'};
29
+ }
30
+
31
+ .section-title, li > a {
32
+ height: 40px;
33
+ padding: 0 8px;
34
+ display: flex;
35
+ flex-direction: row;
36
+ align-items: center;
37
+ }
38
+
39
+ li > a {
40
+ gap: 4px;
41
+ transition: background-color 0.2s;
42
+ &:hover, &:focus {
43
+ background: ${theme.color.light['400']};
44
+ }
45
+ .label {
46
+ flex: 1;
47
+ white-space: nowrap;
48
+ overflow: hidden;
49
+ text-overflow: ellipsis;
50
+ }
51
+ }
52
+
53
+ li.action {
54
+ background-color: ${({ $showListAsCard }) => $showListAsCard ? theme.color.light['400'] : ''};
55
+ border: ${({ $showListAsCard }) => '1px solid' + $showListAsCard ? theme.color.light['500'] : 'transparent'};
56
+ border-radius: ${({ $showListAsCard }) => $showListAsCard ? '4px' : '0'};
57
+ margin-bottom: ${({ $showListAsCard }) => $showListAsCard ? '8px' : '0'};
58
+ }
59
+
60
+ li.section {
61
+ border-bottom: 2px solid;
62
+ border-bottom-color: ${({ $showListAsCard }) => $showListAsCard ? 'transparent' : theme.color.light['600']};
63
+ &:last-child {
64
+ border-bottom: none;
65
+ }
66
+ }
67
+
68
+ &.visible {
69
+ max-height: ${({ $maxHeight }) => $maxHeight};
70
+ visibility: visible;
71
+ transition: ${MAX_HEIGHT_TRANSITION};
72
+ }
73
+ `;
74
+ function renderAction({ label, href, onClick, icon, iconRight, active, target, iconActive = _jsx(Check, {}), className = '', lang, hrefLang, title, role = 'link', }, { onClose, Link }) {
75
+ function handleClick(event) {
76
+ onClick?.(event);
77
+ onClose?.();
78
+ }
79
+ const isTextLabel = typeof label === 'string';
80
+ return (_jsx("li", { className: "action", title: title, children: _jsxs(Link, { href: href, onClick: handleClick, target: target, tabIndex: 0, "aria-current": active && 'page', className: className, lang: lang, hrefLang: hrefLang, role: role, children: [icon && _jsx(IconBox, { children: icon }), isTextLabel ? _jsx(Text, { appearance: "body2", className: "label", children: label }) : label.element, iconRight && _jsx(IconBox, { children: iconRight }), active && _jsx(IconBox, { children: iconActive })] }) }, isTextLabel ? label : label.id));
81
+ }
82
+ function renderCollapsible({ label, icon, iconRight, className = '', children }, { setCurrent, controllerId, Link }) {
83
+ function handleClick(ev) {
84
+ //accessibility: this will tell the screen reader the section was expanded before this link is removed from the DOM.
85
+ ev.target?.setAttribute?.('aria-expanded', 'true');
86
+ setCurrent({ items: children, label });
87
+ }
88
+ return (_jsx("li", { className: "collapsible", children: _jsxs(Link, { onClick: handleClick, tabIndex: 0, className: className, "aria-expanded": false, "aria-controls": controllerId, children: [icon && _jsx(IconBox, { children: icon }), _jsx(Text, { appearance: "body2", className: "label", children: label }), iconRight && _jsx(IconBox, { children: iconRight }), _jsx(IconBox, { children: _jsx(ChevronRight, {}) })] }) }, label));
89
+ }
90
+ function renderSection({ label, className = '', children }, options) {
91
+ return (_jsxs("li", { className: `${className} section`, children: [label && _jsx(Text, { appearance: "overheader2", colorScheme: "light.700", className: "section-title", children: label }), _jsx("ul", { children: children.map(i => renderItem(i, options)) })] }, label ?? children.map(c => c.label).join('-')));
92
+ }
93
+ function renderItem(item, options) {
94
+ if ('children' in item) {
95
+ return item.type === 'section' ? renderSection(item, options) : renderCollapsible(item, options);
96
+ }
97
+ return renderAction(item, options);
98
+ }
99
+ /**
100
+ * Renders a component that allows the selection of one item. The list is show/hidden according to the prop `visible`.
101
+ *
102
+ * The items in this list can be grouped into multiple sections. Sections may be displayed on a column (section) or might replace the
103
+ * current list of options with another list of options (collapsible).
104
+ *
105
+ * This component implements keyboard controls and accessibility features.
106
+ * @param props the component's props {@link SelectionListProps}.
107
+ */
108
+ export const SelectionList = ({ id, items, className, style, visible = true, maxHeight = '300px', onHide, before, after, scroll, showListAsCard, }) => {
109
+ const Link = useAnchorTag();
110
+ const t = useTranslate(dictionary);
111
+ const [current, setCurrent] = useState({ items });
112
+ const { keyboardControlledElement: wrapper, attachKeyboardListeners, detachKeyboardListeners } = useKeyboardControls({ onPressEscape: onHide, querySelectors: 'li.action a, li.collapsible a, button' });
113
+ const listItems = useMemo(() => current.items.map(i => renderItem(i, {
114
+ setCurrent: (next) => setCurrent({ ...next, parent: current }),
115
+ onClose: onHide,
116
+ controllerId: id,
117
+ Link,
118
+ })), [current]);
119
+ useEffect(() => {
120
+ const selectionBox = wrapper.current;
121
+ if (!selectionBox)
122
+ return;
123
+ const handleTransitionEnd = () => {
124
+ selectionBox.style.overflow = 'auto';
125
+ };
126
+ selectionBox.addEventListener('transitionend', handleTransitionEnd);
127
+ return () => {
128
+ selectionBox.removeEventListener('transitionend', handleTransitionEnd);
129
+ };
130
+ }, []);
131
+ const handleExpand = () => {
132
+ const selectionBox = wrapper.current;
133
+ if (selectionBox) {
134
+ selectionBox.style.overflow = 'hidden';
135
+ }
136
+ };
137
+ const hide = useCallback((event) => {
138
+ const target = event.target;
139
+ // if the element is not in the DOM anymore, we'll consider the click was inside the selection list
140
+ const isClickInsideSelectionList = !target?.isConnected || wrapper.current?.contains(target);
141
+ const isAction = target?.classList?.contains('action') || !!target?.closest('.action');
142
+ const isInsideTour = !!target?.closest('#___reactour');
143
+ if (!isInsideTour && (!isClickInsideSelectionList || isAction))
144
+ onHide?.();
145
+ }, []);
146
+ useEffect(() => {
147
+ handleExpand();
148
+ function removeListeners() {
149
+ detachKeyboardListeners();
150
+ document.removeEventListener('click', hide);
151
+ }
152
+ if (visible) {
153
+ setCurrent({ items });
154
+ attachKeyboardListeners();
155
+ if (onHide)
156
+ setTimeout(() => document.addEventListener('click', hide), 50);
157
+ }
158
+ else {
159
+ removeListeners();
160
+ }
161
+ return () => removeListeners();
162
+ }, [visible, items]);
163
+ return (_jsx(SelectionBox, { id: id, ref: wrapper, "$maxHeight": maxHeight, style: style, className: listToClass(['selection-list', visible ? 'visible' : undefined, className]), "$scroll": scroll, "aria-hidden": !visible, "$showListAsCard": showListAsCard, children: _jsxs("div", { className: "selection-list-content", children: [before, current.parent
164
+ ? (_jsxs(Flex, { mt: 5, mb: 1, alignItems: "center", children: [_jsx(IconButton, { onClick: (ev) => {
165
+ // accessibility: this will tell the screen reader the section was collapsed before this button is removed from the DOM.
166
+ ev.target?.setAttribute?.('aria-expanded', 'false');
167
+ setCurrent(current.parent ?? { items });
168
+ }, sx: { mr: 3 }, title: t.back, "aria-controls": id, "aria-expanded": true, children: _jsx(ArrowLeft, {}) }), _jsx(Text, { appearance: "microtext1", children: current.label })] }))
169
+ : undefined, _jsxs("ul", { children: [listItems, after &&
170
+ _jsx("li", { className: "action", children: after })] })] }) }));
171
+ };
172
+ const dictionary = {
173
+ en: {
174
+ back: 'Go back',
175
+ },
176
+ pt: {
177
+ back: 'Voltar',
178
+ },
179
+ };
180
+ //# sourceMappingURL=SelectionList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectionList.js","sourceRoot":"","sources":["../../src/components/SelectionList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACvC,OAAO,EAAa,WAAW,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,EAAc,YAAY,EAAE,MAAM,8BAA8B,CAAA;AACvE,OAAO,EAAgB,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC1C,OAAO,EAAmB,YAAY,EAAE,MAAM,mBAAmB,CAAA;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAiHvD,MAAM,qBAAqB,GAAG,GAAG,CAAA;AACjC,MAAM,qBAAqB,GAAG,sBAAsB,qBAAqB,GAAG,IAAI,GAAG,CAAA;AAkDnF,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAsE;;gBAErF,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ;;gBAE5C,qBAAqB,mBAAmB,qBAAqB,GAAG,IAAI;;;;;;;;;;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F,EACb,KAAC,IAAI,IAAC,UAAU,EAAC,YAAY,YAAE,OAAO,CAAC,KAAK,GAAQ,IAC/C,CACR;oBACD,CAAC,CAAC,SAAS,EAEb,yBACG,SAAS,EACT,KAAK;4BACJ,aAAI,SAAS,EAAC,QAAQ,YACnB,KAAK,GACH,IAEJ,IACD,GACO,CAChB,CAAA;AACH,CAAC,CAAA;AAED,MAAM,UAAU,GAAG;IACjB,EAAE,EAAE;QACF,IAAI,EAAE,SAAS;KAChB;IACD,EAAE,EAAE;QACF,IAAI,EAAE,QAAQ;KACf;CACmB,CAAA"}
@@ -0,0 +1,24 @@
1
+ export type Status = 'success' | 'warning' | 'danger' | 'unknown' | 'progress';
2
+ interface Props {
3
+ /** The status of the component which determines its color */
4
+ status?: Status;
5
+ /** Tooltip text to be displayed on hover */
6
+ tooltip?: string;
7
+ }
8
+ interface WithTooltip {
9
+ /** Tooltip text to be displayed on hover */
10
+ tooltip?: string;
11
+ /** Additional class names for the component */
12
+ className?: string;
13
+ /** Inline styles for the component */
14
+ style?: React.CSSProperties;
15
+ }
16
+ /**
17
+ * Renders a component that displays a colored circle based on the status.
18
+ * It also supports an optional tooltip.
19
+ *
20
+ * @param props the component's props {@link Props}.
21
+ */
22
+ export declare const StatusCircle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<WithTooltip, Props>> & string & Omit<({ tooltip, className, style }: WithTooltip) => import("react/jsx-runtime").JSX.Element, keyof import("react").Component<any, {}, any>>;
23
+ export {};
24
+ //# sourceMappingURL=StatusCircle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusCircle.d.ts","sourceRoot":"","sources":["../../src/components/StatusCircle.tsx"],"names":[],"mappings":"AAOA,MAAM,MAAM,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAA;AAE9E,UAAU,KAAK;IACb,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAsBD,UAAU,WAAW;IACnB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAYD;;;;;GAKG;AACH,eAAO,MAAM,YAAY,4LAXiC,WAAW,4FAgBpE,CAAA"}
@@ -0,0 +1,44 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { getColor } from '@citric/core/dist/utils/theme.js';
3
+ import { Tooltip } from '@citric/ui';
4
+ import styled from 'styled-components';
5
+ const statusToColor = {
6
+ success: 'success.500',
7
+ warning: 'warning.500',
8
+ danger: 'danger.500',
9
+ progress: 'secondary.500',
10
+ unknown: 'light.contrastText',
11
+ };
12
+ /**
13
+ * Get the color corresponding to the status.
14
+ *
15
+ * @param {Theme} theme - The theme object.
16
+ * @param {Status} [status] - The status of the component.
17
+ * @returns {string} The color corresponding to the status.
18
+ */
19
+ function getColorFromStatus(theme, status) {
20
+ const colorName = status && status in statusToColor ? statusToColor[status] : statusToColor.unknown;
21
+ return getColor(theme, colorName);
22
+ }
23
+ /**
24
+ * CircleWithTooltip component that displays a circle with an optional tooltip.
25
+ *
26
+ * @param props the component's props {@link WithTooltip}.
27
+ */
28
+ const CircleWithTooltip = ({ tooltip, className, style }) => {
29
+ const circle = _jsx("div", { style: style, className: className });
30
+ return tooltip && tooltip.length ? _jsx(Tooltip, { text: tooltip, children: circle }) : circle;
31
+ };
32
+ /**
33
+ * Renders a component that displays a colored circle based on the status.
34
+ * It also supports an optional tooltip.
35
+ *
36
+ * @param props the component's props {@link Props}.
37
+ */
38
+ export const StatusCircle = styled(CircleWithTooltip) `
39
+ background-color: ${({ status, theme }) => getColorFromStatus(theme, status)};
40
+ width: 12px;
41
+ height: 12px;
42
+ border-radius: 50%;
43
+ `;
44
+ //# sourceMappingURL=StatusCircle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StatusCircle.js","sourceRoot":"","sources":["../../src/components/StatusCircle.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAA;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AACpC,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAatC,MAAM,aAAa,GAA0B;IAC3C,OAAO,EAAE,aAAa;IACtB,OAAO,EAAE,aAAa;IACtB,MAAM,EAAE,YAAY;IACpB,QAAQ,EAAE,eAAe;IACzB,OAAO,EAAE,oBAAoB;CAC9B,CAAA;AAED;;;;;;GAMG;AACH,SAAS,kBAAkB,CAAC,KAAY,EAAE,MAAe;IACvD,MAAM,SAAS,GAAG,MAAM,IAAI,MAAM,IAAI,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAA;IACnG,OAAO,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;AACnC,CAAC;AAWD;;;;GAIG;AACH,MAAM,iBAAiB,GAAG,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAe,EAAE,EAAE;IACvE,MAAM,MAAM,GAAG,cAAK,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,GAAQ,CAAA;IAC9D,OAAO,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAC,OAAO,IAAC,IAAI,EAAE,OAAO,YAAG,MAAM,GAAW,CAAC,CAAC,CAAC,MAAM,CAAA;AACxF,CAAC,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAO;sBACtC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,kBAAkB,CAAC,KAAY,EAAE,MAAM,CAAC;;;;CAIpF,CAAA"}
@@ -0,0 +1,35 @@
1
+ import { FC } from 'react';
2
+ import { ButtonProps } from '@citric/core/dist/Button.js';
3
+ export interface StepperNavigationProps extends ButtonProps {
4
+ /**
5
+ * Prop used to pass specific text to the next button.
6
+ */
7
+ nextButtonText?: string;
8
+ /**
9
+ * Function that is rendered when pressing the skip button.
10
+ */
11
+ onSkip?: () => void;
12
+ /**
13
+ * Boolean that is used as a conditional to appear the skip button.
14
+ */
15
+ canSkip?: boolean;
16
+ /**
17
+ * Boolean that is used as a conditional to appear the loading icon in next button.
18
+ */
19
+ isLoading?: boolean;
20
+ /**
21
+ * Function that is rendered when pressing the back button.
22
+ */
23
+ onGoBack?: () => void;
24
+ /**
25
+ * Function that is rendered when pressing the next button.
26
+ */
27
+ onSubmit?: () => void;
28
+ }
29
+ /**
30
+ * Renders a component that represents the stepper component's navigation buttons, containing the button options (back, skip, and next).
31
+ *
32
+ * The component stepper wraps this component.
33
+ */
34
+ export declare const StepperNavigation: FC<Omit<StepperNavigationProps, 'children'>>;
35
+ //# sourceMappingURL=Navigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Navigation.d.ts","sourceRoot":"","sources":["../../../src/components/Stepper/Navigation.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAc,MAAM,OAAO,CAAA;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAItD,MAAM,WAAW,sBAAuB,SAAQ,WAAW;IACzD;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAOD;;;;GAIG;AAEH,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,IAAI,CAAC,sBAAsB,EAAE,UAAU,CAAC,CAqCvE,CAAA"}
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button, Flex, Text } from '@citric/core';
3
+ import { useTranslate } from '@stack-spot/portal-translate';
4
+ import { useContext } from 'react';
5
+ import { styled } from 'styled-components';
6
+ import { useLoadingComponent } from '../../context/loading.js';
7
+ import { StepperContext } from './Stepper.js';
8
+ const Wrapper = styled(Flex) `
9
+ width: 100%;
10
+ justify-content: space-between;
11
+ `;
12
+ /**
13
+ * Renders a component that represents the stepper component's navigation buttons, containing the button options (back, skip, and next).
14
+ *
15
+ * The component stepper wraps this component.
16
+ */
17
+ export const StepperNavigation = ({ nextButtonText, onSkip, onGoBack, canSkip = false, isLoading, disabled, onSubmit }) => {
18
+ const t = useTranslate(dictionary);
19
+ const { goToNextStep, goToPreviousStep } = useContext(StepperContext);
20
+ const Loading = useLoadingComponent();
21
+ return (_jsxs(Wrapper, { children: [_jsx(Button, { appearance: "contained", colorScheme: "inverse", onClick: () => {
22
+ onGoBack && onGoBack();
23
+ goToPreviousStep();
24
+ }, children: t.back }), _jsxs(Flex, { children: [canSkip && (_jsx(Button, { appearance: "text", colorScheme: "inverse", onClick: () => {
25
+ onSkip && onSkip();
26
+ goToNextStep();
27
+ }, children: t.skip })), _jsxs(Button, { type: "submit", onClick: onSubmit, sx: { position: 'relative' }, disabled: isLoading || disabled, children: [_jsx(Text, { as: "span", sx: { visibility: isLoading ? 'hidden' : 'visible' }, children: nextButtonText ?? t.next }), isLoading && Loading] })] })] }));
28
+ };
29
+ const dictionary = {
30
+ en: {
31
+ back: 'Back',
32
+ skip: 'Skip',
33
+ next: 'Next',
34
+ },
35
+ pt: {
36
+ back: 'Voltar',
37
+ skip: 'Pular',
38
+ next: 'Próximo',
39
+ },
40
+ };
41
+ //# sourceMapping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,MAAM,IAAI,MAAM,EAAE,CAAA;4BAClB,YAAY,EAAE,CAAA;wBAChB,CAAC,YAEA,CAAC,CAAC,IAAI,GACA,CACV,EACD,MAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAE,SAAS,IAAI,QAAQ,aACpG,KAAC,IAAI,IAAC,EAAE,EAAC,MAAM,EAAC,EAAE,EAAE,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EAAE,YAAG,cAAc,IAAI,CAAC,CAAC,IAAI,GAAQ,EACtG,SAAS,IAAI,OAAO,IACd,IACJ,IACC,CACX,CAAA;AAAA,CAAC,CAAA;AAEJ,MAAM,UAAU,GAAG;IACjB,EAAE,EAAE;QACF,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM;KACb;IACD,EAAE,EAAE;QACF,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,SAAS;KAChB;CACmB,CAAA"}
@@ -0,0 +1,18 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ export interface StepProps extends PropsWithChildren {
3
+ /**
4
+ * Name given to the step.
5
+ */
6
+ name: string;
7
+ /**
8
+ * Title given to the step.
9
+ */
10
+ title: string;
11
+ }
12
+ /**
13
+ * Renders a component that represents the body of a step within the stepper component.
14
+ *
15
+ * The component stepper wraps this component.
16
+ */
17
+ export declare const Step: FC<StepProps>;
18
+ //# sourceMappingURL=Step.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Step.d.ts","sourceRoot":"","sources":["../../../src/components/Stepper/Step.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAG7C,MAAM,WAAW,SAAU,SAAQ,iBAAiB;IAClD;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAMD;;;;GAIG;AAEH,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CAI9B,CAAA"}
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box } from '@citric/core';
3
+ import { styled } from 'styled-components';
4
+ const Wrapper = styled(Box) `
5
+ width: 100%;
6
+ `;
7
+ /**
8
+ * Renders a component that represents the body of a step within the stepper component.
9
+ *
10
+ * The component stepper wraps this component.
11
+ */
12
+ export const Step = ({ children }) => (_jsx(Wrapper, { children: children }));
13
+ //# sourceMappingURL=Step.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Step.js","sourceRoot":"","sources":["../../../src/components/Stepper/Step.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAa1C,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;;CAE1B,CAAA;AAED;;;;GAIG;AAEH,MAAM,CAAC,MAAM,IAAI,GAAkB,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CACnD,KAAC,OAAO,cACL,QAAQ,GACD,CACX,CAAA"}
@@ -0,0 +1,45 @@
1
+ import { FC, ReactElement } from 'react';
2
+ import { StepProps } from './Step.js';
3
+ export interface StepperContextProps {
4
+ /**
5
+ * Informs the index of the active step.
6
+ */
7
+ activeIndex: number;
8
+ /**
9
+ * Informs data for all steps.
10
+ * @default 0
11
+ */
12
+ stepsData: Record<string, any>;
13
+ /**
14
+ * Saves data for a given steps.
15
+ */
16
+ setStepData: (name: string, data: any) => void;
17
+ /**
18
+ * Takes data from a given step.
19
+ */
20
+ getStepData: (name: string) => any | null | undefined;
21
+ /**
22
+ * Navigate to the next step.
23
+ */
24
+ goToNextStep: () => void;
25
+ /**
26
+ * Navigate to the previous step.
27
+ */
28
+ goToPreviousStep: () => void;
29
+ /**
30
+ * Navigate to the provided step.
31
+ */
32
+ goToStep: (step: number) => void;
33
+ }
34
+ declare const StepperContext: import("react").Context<StepperContextProps>;
35
+ export interface StepperProps {
36
+ children: ReactElement<StepProps>[];
37
+ }
38
+ /**
39
+ * Renders a component that provides an interface of steps for creating some content.
40
+ *
41
+ * The component wraps the Step component.
42
+ */
43
+ declare const Stepper: FC<StepperProps>;
44
+ export { StepperContext, Stepper };
45
+ //# sourceMappingURL=Stepper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../src/components/Stepper/Stepper.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,YAAY,EAA2B,MAAM,OAAO,CAAA;AAGjE,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAElC,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/B;;OAEG;IACH,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/C;;OAEG;IACH,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,GAAG,GAAG,IAAI,GAAG,SAAS,CAAC;IACtD;;OAEG;IACH,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB;;OAEG;IACH,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B;;OAEG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAED,QAAA,MAAM,cAAc,8CAQlB,CAAA;AAEF,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,YAAY,CAAC,SAAS,CAAC,EAAE,CAAC;CACrC;AAWD;;;;GAIG;AAEH,QAAA,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,CA2C7B,CAAA;AACD,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,CAAA"}