@stack-spot/portal-components 0.0.18 → 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 (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 +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 +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 +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/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":"ServerError.js","sourceRoot":"","sources":["../../src/svg/ServerError.tsx"],"names":[],"mappings":";AAAA,4BAA4B;AAE5B,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAE,SAAS,EAAE,KAAK,EAAuD,EAAE,EAAE,CAAC,CACxG,eAAK,KAAK,EAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,OAAO,EAAC,aAAa,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,EAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,aACnI,eAAM,OAAO,EAAC,KAAK,EAAC,CAAC,EAAC,8HAA8H,EAAC,MAAM,EAAC,iCAAiC,EAAC,WAAW,EAAC,QAAQ,GAAG,EACrN,aAAG,OAAO,EAAC,KAAK,aACd,eAAM,EAAE,EAAC,2BAA2B,EAAC,IAAI,EAAC,OAAO,YAC/C,eAAM,QAAQ,EAAC,SAAS,EAAC,QAAQ,EAAC,SAAS,EAAC,CAAC,EAAC,wwBAAwwB,GAAG,GACpzB,EACP,eAAM,CAAC,EAAC,0jFAA0jF,EAAC,IAAI,EAAC,iCAAiC,EAAC,IAAI,EAAC,iCAAiC,GAAG,IACjpF,EACJ,eAAM,OAAO,EAAC,KAAK,EAAC,CAAC,EAAC,wDAAwD,EAAC,MAAM,EAAC,iCAAiC,EAAC,WAAW,EAAC,SAAS,GAAG,EAChJ,eAAM,OAAO,EAAC,MAAM,EAAC,CAAC,EAAC,yXAAyX,EAAC,IAAI,EAAC,SAAS,G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,WAAW,EAAC,MAAM,GAAG,IAClD,IACZ,IACH,CACP,CAAA"}
@@ -0,0 +1,5 @@
1
+ export declare const Unauthenticated: ({ className, style }: {
2
+ className?: string;
3
+ style?: React.CSSProperties;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=Unauthenticated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Unauthenticated.d.ts","sourceRoot":"","sources":["../../src/svg/Unauthenticated.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,GAAI,sBAAsB;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAAE,4CAaxG,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /* eslint-disable max-len */
3
+ export const Unauthenticated = ({ className, style }) => (_jsxs("svg", { width: "178", height: "160", viewBox: "0 0 178 160", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, style: style, children: [_jsx("circle", { opacity: "0.16", cx: "89.6761", cy: "80.2113", r: "31.5629", fill: "#FAFAFB" }), _jsx("ellipse", { opacity: "0.16", cx: "89.6721", cy: "80.6057", rx: "22.094", ry: "21.6995", fill: "#FAFAFB" }), _jsx("ellipse", { opacity: "0.16", cx: "89.6759", cy: "80.6056", rx: "13.4142", ry: "13.0197", fill: "#FAFAFB" }), _jsx("path", { opacity: "0.5", fillRule: "evenodd", clipRule: "evenodd", d: "M44.7029 19.055C69.3231 -5.56521 109.24 -5.56521 133.861 19.055L177.651 62.8454C178.086 63.2808 178.086 63.9868 177.651 64.4222C177.215 64.8577 176.509 64.8577 176.074 64.4222L132.284 20.6319C108.534 -3.11747 70.0291 -3.11747 46.2798 20.6319C45.8443 21.0673 45.1383 21.0673 44.7029 20.6319C44.2675 20.1964 44.2675 19.4904 44.7029 19.055ZM161.243 79.8912L126.447 45.0949C105.747 24.3952 72.1863 24.3952 51.4866 45.0949L16.6903 79.8912L51.4866 114.687C72.1863 135.387 105.747 135.387 126.447 114.687L161.243 79.8912ZM128.024 43.518C106.453 21.9474 71.4803 21.9474 49.9097 43.5181L15.1135 78.3143L13.5366 79.8912L15.1135 81.468L49.9097 116.264C71.4803 137.835 106.453 137.835 128.024 116.264L162.82 81.468L164.397 79.8912L162.82 78.3143L128.024 43.518ZM44.7029 141.115C69.3231 165.736 109.24 165.736 133.861 141.115C134.296 140.68 134.296 139.974 133.861 139.538C133.425 139.103 132.719 139.103 132.284 139.538C108.534 163.288 70.0291 163.288 46.2798 139.538L2.48938 95.7481C2.05394 95.3126 1.34795 95.3126 0.912516 95.7481C0.477078 96.1835 0.477077 96.8895 0.912518 97.3249L44.7029 141.115Z", fill: "url(#paint0_linear_3383_243082)" }), _jsx("defs", { children: _jsxs("linearGradient", { id: "paint0_linear_3383_243082", x1: "-3.35603", y1: "94.0049", x2: "89.5555", y2: "212.99", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { stopColor: "#BCBCCF" }), _jsx("stop", { offset: "0.766098", stopColor: "#353546", stopOpacity: "0.09" })] }) })] }));
4
+ //# sourceMappingURL=Unauthenticated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Unauthenticated.js","sourceRoot":"","sources":["../../src/svg/Unauthenticated.tsx"],"names":[],"mappings":";AAAA,4BAA4B;AAE5B,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,SAAS,EAAE,KAAK,EAAuD,EAAE,EAAE,CAAC,CAC5G,eAAK,KAAK,EAAC,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,OAAO,EAAC,aAAa,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,4BAA4B,EAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,aACnI,iBAAQ,OAAO,EAAC,MAAM,EAAC,EAAE,EAAC,SAAS,EAAC,EAAE,EAAC,SAAS,EAAC,CAAC,EAAC,SAAS,EAAC,IAAI,EAAC,SAAS,GAAE,EAC7E,kBAAS,OAAO,EAAC,MAAM,EAAC,EAAE,EAAC,SAAS,EAAC,EAAE,EAAC,SAAS,EAAC,EAAE,EAAC,QAAQ,EAAC,EAAE,EAAC,SAAS,EAAC,IAAI,EAAC,SAAS,GAAE,EAC3F,kBAAS,OAAO,EAAC,MAAM,EAAC,EAAE,EAAC,SAAS,EAAC,EAAE,EAAC,SAAS,EAAC,EAAE,EAAC,SAAS,EAAC,EAAE,EAAC,SAAS,EAAC,IAAI,EAAC,SAAS,GAAE,EAC5F,eAAM,OAAO,EAAC,KAAK,EAAC,QAAQ,EAAC,SAAS,EAAC,QAAQ,EAAC,SAAS,EAAC,CAAC,EAAC,kkCAAkkC,EAAC,IAAI,EAAC,iCAAiC,GAAE,EACvqC,yBACE,0BAAgB,EAAE,EAAC,2BAA2B,EAAC,EAAE,EAAC,UAAU,EAAC,EAAE,EAAC,SAAS,EAAC,EAAE,EAAC,SAAS,EAAC,EAAE,EAAC,QAAQ,EAAC,aAAa,EAAC,gBAAgB,aAC/H,eAAM,SAAS,EAAC,SAAS,GAAE,EAC3B,eAAM,MAAM,EAAC,UAAU,EAAC,SAAS,EAAC,SAAS,EAAC,WAAW,EAAC,MAAM,GAAE,IACjD,GACZ,IACH,CACP,CAAA"}
@@ -0,0 +1,12 @@
1
+ export { AI } from './AI.js';
2
+ export { CS } from './CS.js';
3
+ export { EDP } from './EDP.js';
4
+ export { Forbidden } from './Forbidden.js';
5
+ export { GenericPlaceholder } from './GenericPlaceholder.js';
6
+ export { HUB } from './HUB.js';
7
+ export { Logo } from './Logo.js';
8
+ export { MiniLogo } from './MiniLogo.js';
9
+ export { NotFound } from './NotFound.js';
10
+ export { ServerError } from './ServerError.js';
11
+ export { Unauthenticated } from './Unauthenticated.js';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/svg/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA;AACzB,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA;AACzB,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA"}
@@ -0,0 +1,12 @@
1
+ export { AI } from './AI.js';
2
+ export { CS } from './CS.js';
3
+ export { EDP } from './EDP.js';
4
+ export { Forbidden } from './Forbidden.js';
5
+ export { GenericPlaceholder } from './GenericPlaceholder.js';
6
+ export { HUB } from './HUB.js';
7
+ export { Logo } from './Logo.js';
8
+ export { MiniLogo } from './MiniLogo.js';
9
+ export { NotFound } from './NotFound.js';
10
+ export { ServerError } from './ServerError.js';
11
+ export { Unauthenticated } from './Unauthenticated.js';
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/svg/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA;AACzB,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA;AACzB,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Important for accessibility.
3
+ *
4
+ * Makes it so we focus the next focusable element in the DOM hierarchy, disregarding the element passed as parameter and its children.
5
+ *
6
+ * If there's no next focusable element, the first focusable element of the page will be focused. If the page doesn't contain any focusable
7
+ * element, nothing happens.
8
+ *
9
+ * @param current the reference element to focus the next. If not provided, will be the currently active element.
10
+ */
11
+ export declare function focusNextIgnoringChildren(current?: HTMLElement | null): void;
12
+ export type TagPriority = 'a' | 'button' | 'input' | 'textarea' | 'select' | 'other';
13
+ export type TagPriorityElement = TagPriority | TagPriority[];
14
+ interface FocusOptions {
15
+ /**
16
+ * Instead of focusing the first element overall, focus the first according to this list of priorities.
17
+ *
18
+ * 'other' means elements that are normally not focusable, but have positive tabIndex values.
19
+ */
20
+ priority?: TagPriorityElement[];
21
+ /**
22
+ * Ignores any element that matches this query selector.
23
+ */
24
+ ignore?: string;
25
+ }
26
+ /**
27
+ * Focus the first focusable child of the element provided. If the element has no focusable child, nothing happens.
28
+ *
29
+ * A priority list can be passed in the second parameter, as an option. If it's provided, it will focus the first element according to the
30
+ * list.
31
+ *
32
+ * An ignore query selector can also be passed in the options parameter. If the first focusable element matches the query selector, the
33
+ * next element is focused instead.
34
+ *
35
+ * @example
36
+ * Suppose the children of element are: h1, button, p, input, select.
37
+ * 1. We don't pass a priority list. The focused element will be the button.
38
+ * 2. Our priority list is ['button']. The focused element will be the button.
39
+ * 3. Our priority list is ['input', 'button']. The focused element will be the input.
40
+ * 4. Our priority list is ['select', 'input']. The focused element will be the select.
41
+ * 5. Our priority list is [['select', 'input'], 'button']. The focused element will be the input.
42
+ *
43
+ * @param element the element to search a child to focus.
44
+ * @param options optional.
45
+ */
46
+ export declare function focusFirstChild(element: HTMLElement | Document | null | undefined, { priority, ignore }?: FocusOptions): void;
47
+ /**
48
+ * Checks if an element can receive focus.
49
+ *
50
+ * Elements can receive focus only if:
51
+ * - they exist;
52
+ * - they're visible;
53
+ * - they're not disabled;
54
+ * - they are a focusable tag name or have a positive tab index;
55
+ * - they don't have a negative tab index.
56
+ * @param element the element to check.
57
+ * @returns true if the element is focusable, false otherwise.
58
+ */
59
+ export declare function isFocusable(element?: Element | null): boolean;
60
+ /**
61
+ * Focus the element passed as parameter if it can receive focus. Otherwise, decides on another element to focus based on the HTML tree
62
+ * and accessibility attributes.
63
+ *
64
+ * Decision making:
65
+ * - If the element is focusable, focus it.
66
+ * - If the element is not focusable, check if it has an id and if another element controls it (aria-controls).
67
+ * - If the element is controlled by another, try to focus the controller, based in this same algorithm.
68
+ * - Otherwise, try to focus its parent.
69
+ *
70
+ * If no focusable element is found. Nothing happens.
71
+ * @param element the element to focus.
72
+ */
73
+ export declare function focusAccessibleElement(element?: Element | null): void;
74
+ export {};
75
+ //# sourceMappingURL=accessibility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accessibility.d.ts","sourceRoot":"","sources":["../../src/utils/accessibility.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,QAWrE;AAED,MAAM,MAAM,WAAW,GAAG,GAAG,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAA;AACpF,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG,WAAW,EAAE,CAAA;AAE5D,UAAU,YAAY;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAChC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAWD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,GAAG,QAAQ,GAAG,IAAI,GAAG,SAAS,EAAE,EAAE,QAAa,EAAE,MAAM,EAAE,GAAE,YAAiB,QAkB/H;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,WAYnD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,QAO9D"}
@@ -0,0 +1,123 @@
1
+ /**
2
+ * Important for accessibility.
3
+ *
4
+ * Makes it so we focus the next focusable element in the DOM hierarchy, disregarding the element passed as parameter and its children.
5
+ *
6
+ * If there's no next focusable element, the first focusable element of the page will be focused. If the page doesn't contain any focusable
7
+ * element, nothing happens.
8
+ *
9
+ * @param current the reference element to focus the next. If not provided, will be the currently active element.
10
+ */
11
+ export function focusNextIgnoringChildren(current) {
12
+ current = current ?? document.activeElement;
13
+ while (current && !current.nextElementSibling) {
14
+ current = current?.parentElement;
15
+ }
16
+ current = current?.nextElementSibling;
17
+ while (current && current.tabIndex < 0) {
18
+ current = (current.children.length ? current.firstChild : current.nextElementSibling);
19
+ }
20
+ if (current)
21
+ current?.focus?.();
22
+ else
23
+ focusFirstChild(document);
24
+ }
25
+ const selectors = {
26
+ a: 'a[href]:not(:disabled)',
27
+ button: 'button:not(:disabled)',
28
+ input: 'input:not(:disabled):not([type="hidden"])',
29
+ select: 'textarea:not(:disabled)',
30
+ textarea: 'select:not(:disabled)',
31
+ other: '[tabindex]:not([tabindex="-1"])',
32
+ };
33
+ /**
34
+ * Focus the first focusable child of the element provided. If the element has no focusable child, nothing happens.
35
+ *
36
+ * A priority list can be passed in the second parameter, as an option. If it's provided, it will focus the first element according to the
37
+ * list.
38
+ *
39
+ * An ignore query selector can also be passed in the options parameter. If the first focusable element matches the query selector, the
40
+ * next element is focused instead.
41
+ *
42
+ * @example
43
+ * Suppose the children of element are: h1, button, p, input, select.
44
+ * 1. We don't pass a priority list. The focused element will be the button.
45
+ * 2. Our priority list is ['button']. The focused element will be the button.
46
+ * 3. Our priority list is ['input', 'button']. The focused element will be the input.
47
+ * 4. Our priority list is ['select', 'input']. The focused element will be the select.
48
+ * 5. Our priority list is [['select', 'input'], 'button']. The focused element will be the input.
49
+ *
50
+ * @param element the element to search a child to focus.
51
+ * @param options optional.
52
+ */
53
+ export function focusFirstChild(element, { priority = [], ignore } = {}) {
54
+ const allFocusableTags = ['a', 'button', 'input', 'other', 'select', 'textarea'];
55
+ const focusableList = [
56
+ element?.querySelectorAll(allFocusableTags.map(t => selectors[t]).join(', ')),
57
+ ];
58
+ for (const p of priority) {
59
+ const tags = Array.isArray(p) ? p : [p];
60
+ const querySelectors = tags.map(t => selectors[t]);
61
+ focusableList.unshift(element?.querySelectorAll(querySelectors.join(', ')));
62
+ }
63
+ for (const focusable of focusableList ?? []) {
64
+ for (const f of focusable ?? []) {
65
+ if (!ignore || !f.matches(ignore)) {
66
+ const styles = window.getComputedStyle(f);
67
+ if (styles.display != 'none' && styles.visibility != 'hidden')
68
+ return f.focus();
69
+ }
70
+ }
71
+ }
72
+ }
73
+ /**
74
+ * Checks if an element can receive focus.
75
+ *
76
+ * Elements can receive focus only if:
77
+ * - they exist;
78
+ * - they're visible;
79
+ * - they're not disabled;
80
+ * - they are a focusable tag name or have a positive tab index;
81
+ * - they don't have a negative tab index.
82
+ * @param element the element to check.
83
+ * @returns true if the element is focusable, false otherwise.
84
+ */
85
+ export function isFocusable(element) {
86
+ if (!element)
87
+ return false;
88
+ // is disabled: return false
89
+ if (element.ariaDisabled || element.getAttribute('disabled') !== null)
90
+ return false;
91
+ // is invisible: return false
92
+ if (!element.checkVisibility({ checkOpacity: true, checkVisibilityCSS: true }))
93
+ return false;
94
+ // has tab index: return false if negative, true otherwise
95
+ const tabIndexStr = element.getAttribute('tabindex');
96
+ const tabIndex = tabIndexStr ? parseInt(tabIndexStr) : undefined;
97
+ if (tabIndex !== undefined)
98
+ return tabIndex >= 0;
99
+ // check the tag name
100
+ return ['a', 'button', 'input', 'iframe', 'select', 'textarea'].includes(element.tagName.toLowerCase() ?? '');
101
+ }
102
+ /**
103
+ * Focus the element passed as parameter if it can receive focus. Otherwise, decides on another element to focus based on the HTML tree
104
+ * and accessibility attributes.
105
+ *
106
+ * Decision making:
107
+ * - If the element is focusable, focus it.
108
+ * - If the element is not focusable, check if it has an id and if another element controls it (aria-controls).
109
+ * - If the element is controlled by another, try to focus the controller, based in this same algorithm.
110
+ * - Otherwise, try to focus its parent.
111
+ *
112
+ * If no focusable element is found. Nothing happens.
113
+ * @param element the element to focus.
114
+ */
115
+ export function focusAccessibleElement(element) {
116
+ let elementToFocus = element;
117
+ while (elementToFocus && !isFocusable(elementToFocus)) {
118
+ const controlledBy = elementToFocus.id ? document.querySelector(`[aria-controls="${elementToFocus.id}"]`) : undefined;
119
+ elementToFocus = (controlledBy ?? elementToFocus.parentElement);
120
+ }
121
+ elementToFocus?.focus?.();
122
+ }
123
+ //# sourceMappingURL=accessibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accessibility.js","sourceRoot":"","sources":["../../src/utils/accessibility.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,UAAU,yBAAyB,CAAC,OAA4B;IACpE,OAAO,GAAG,OAAO,IAAI,QAAQ,CAAC,aAA4B,CAAA;IAC1D,OAAO,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC;QAC9C,OAAO,GAAG,OAAO,EAAE,aAAa,CAAA;IAClC,CAAC;IACD,OAAO,GAAG,OAAO,EAAE,kBAAiC,CAAA;IACpD,OAAO,OAAO,IAAI,OAAO,CAAC,QAAQ,GAAG,CAAC,EAAE,CAAC;QACvC,OAAO,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,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W,EAAE,IAAI,EAAE,CAAC,CAAA;AAC/G,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAwB;IAC7D,IAAI,cAAc,GAAG,OAAyC,CAAA;IAC9D,OAAO,cAAc,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,EAAE,CAAC;QACtD,MAAM,YAAY,GAAG,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,mBAAmB,cAAc,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;QACrH,cAAc,GAAG,CAAC,YAAY,IAAI,cAAc,CAAC,aAAa,CAAmC,CAAA;IACnG,CAAC;IACD,cAAc,EAAE,KAAK,EAAE,EAAE,CAAA;AAC3B,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Setup the cookie utilities to use a another domain. By default, it's based on *.stackspot.com.
3
+ * @param domainRegex the regex to identify the domain. Example: {@link DEFAULT_DOMAIN_REGEX}.
4
+ */
5
+ export declare function setupCookies(domainRegex: RegExp): void;
6
+ /**
7
+ * Retrieves the current domain used for cookies. To change the domain, use `setupCookies(domainRegex)`.
8
+ * @returns the current cookie domain.
9
+ */
10
+ export declare function getCookieDomain(): string;
11
+ /**
12
+ * Get all cookies as an object where the keys are the cookie names and the values are the respective cookie values.
13
+ * @returns a map of cookie name to cookie value.
14
+ */
15
+ export declare function getCookies(): Record<string, string | undefined>;
16
+ /**
17
+ * Sets the value of a cookie.
18
+ * @param key the cookie name (identifier).
19
+ * @param value the cookie value.
20
+ * @param customAttributes Accepted values: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#attributes.
21
+ */
22
+ export declare function setCookie(key: string, value: string, customAttributes?: Record<string, string>): void;
23
+ /**
24
+ * Removes a cookie.
25
+ * @param key the cookie name (identifier).
26
+ */
27
+ export declare function removeCookie(key: string): void;
28
+ /**
29
+ * Retrieves the value of a cookie given its key/name.
30
+ * @param key the cookie name (identifier).
31
+ * @returns the cookie value or undefined, if the cookie doesn't exist.
32
+ */
33
+ export declare function getCookie(key: string): string | undefined;
34
+ //# sourceMappingURL=cookie.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cookie.d.ts","sourceRoot":"","sources":["../../src/utils/cookie.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,QAQ/C;AAED;;;GAGG;AACH,wBAAgB,eAAe,WAG9B;AAED;;;GAGG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAO/D;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,gBAAgB,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,QAGlG;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,QAGvC;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,sBAEpC"}
@@ -0,0 +1,69 @@
1
+ import { isEmpty } from 'lodash';
2
+ const DEFAULT_DOMAIN_REGEX = new RegExp(/(\.*(prd|stg|dev)*.stackspot.com)|localhost/);
3
+ let cookieDomain = '';
4
+ let cookieAttributes = {};
5
+ /**
6
+ * Setup the cookie utilities to use a another domain. By default, it's based on *.stackspot.com.
7
+ * @param domainRegex the regex to identify the domain. Example: {@link DEFAULT_DOMAIN_REGEX}.
8
+ */
9
+ export function setupCookies(domainRegex) {
10
+ const portalUrl = new URL(location.href);
11
+ cookieDomain = domainRegex.exec(portalUrl.host)?.[0] ?? '';
12
+ cookieAttributes = { domain: cookieDomain, SameSite: 'Strict' };
13
+ // Add Secure attribute if using HTTPS
14
+ if (portalUrl.protocol === 'https:') {
15
+ cookieAttributes['Secure'] = '';
16
+ }
17
+ }
18
+ /**
19
+ * Retrieves the current domain used for cookies. To change the domain, use `setupCookies(domainRegex)`.
20
+ * @returns the current cookie domain.
21
+ */
22
+ export function getCookieDomain() {
23
+ if (isEmpty(cookieAttributes))
24
+ setupCookies(DEFAULT_DOMAIN_REGEX);
25
+ return cookieDomain;
26
+ }
27
+ /**
28
+ * Get all cookies as an object where the keys are the cookie names and the values are the respective cookie values.
29
+ * @returns a map of cookie name to cookie value.
30
+ */
31
+ export function getCookies() {
32
+ if (isEmpty(cookieAttributes))
33
+ setupCookies(DEFAULT_DOMAIN_REGEX);
34
+ return document.cookie.split('; ').reduce((result, current) => {
35
+ const [name, ...value] = current.split('=');
36
+ result[name] = value.join('=');
37
+ return result;
38
+ }, {});
39
+ }
40
+ /**
41
+ * Sets the value of a cookie.
42
+ * @param key the cookie name (identifier).
43
+ * @param value the cookie value.
44
+ * @param customAttributes Accepted values: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#attributes.
45
+ */
46
+ export function setCookie(key, value, customAttributes = {}) {
47
+ if (isEmpty(cookieAttributes))
48
+ setupCookies(DEFAULT_DOMAIN_REGEX);
49
+ document.cookie = `${key}=${value};${objectToCookieString({ ...cookieAttributes, ...customAttributes })}`;
50
+ }
51
+ /**
52
+ * Removes a cookie.
53
+ * @param key the cookie name (identifier).
54
+ */
55
+ export function removeCookie(key) {
56
+ if (isEmpty(cookieAttributes))
57
+ setupCookies(DEFAULT_DOMAIN_REGEX);
58
+ document.cookie = `${key}=;${objectToCookieString({ ...cookieAttributes, expires: 'Thu, 01 Jan 1970 00:00:00 GMT' })}`;
59
+ }
60
+ /**
61
+ * Retrieves the value of a cookie given its key/name.
62
+ * @param key the cookie name (identifier).
63
+ * @returns the cookie value or undefined, if the cookie doesn't exist.
64
+ */
65
+ export function getCookie(key) {
66
+ return getCookies()[key];
67
+ }
68
+ const objectToCookieString = (object) => Object.entries(object).reduce((prev, [k, v]) => `${prev} ${k}${v !== '' ? `=${v}` : ''};`, '').trim();
69
+ //# sourceMappingURL=cookie.js.map
@@ -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appingURL=promise.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promise.d.ts","sourceRoot":"","sources":["../../src/utils/promise.ts"],"names":[],"mappings":"AAAA,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,oBAI/B"}
@@ -0,0 +1,6 @@
1
+ export function delay(ms) {
2
+ return new Promise((resolve) => {
3
+ setTimeout(resolve, ms);
4
+ });
5
+ }
6
+ //# sourceMappingURL=promise.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promise.js","sourceRoot":"","sources":["../../src/utils/promise.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,KAAK,CAAC,EAAU;IAC9B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;IACzB,CAAC,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function readFile(file: File, isJson?: boolean): Promise<string | undefined>;
2
+ //# sourceMappingURL=read-file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-file.d.ts","sourceRoot":"","sources":["../../src/utils/read-file.ts"],"names":[],"mappings":"AAAA,wBAAsB,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,UAAQ,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAetF"}
@@ -0,0 +1,14 @@
1
+ export async function readFile(file, isJson = false) {
2
+ return new Promise((resolve, reject) => {
3
+ const reader = new FileReader();
4
+ reader.onload = (e) => {
5
+ const content = e.target?.result;
6
+ resolve(isJson ? JSON.parse(content) : content);
7
+ };
8
+ reader.onerror = (e) => {
9
+ reject(e);
10
+ };
11
+ reader.readAsText(file);
12
+ });
13
+ }
14
+ //# sourceMappingURL=read-file.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"read-file.js","sourceRoot":"","sources":["../../src/utils/read-file.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,IAAU,EAAE,MAAM,GAAG,KAAK;IACvD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAA;QAE/B,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE;YACpB,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,EAAE,MAAgB,CAAA;YAC1C,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAA;QACjD,CAAC,CAAA;QAED,MAAM,CAAC,OAAO,GAAG,CAAC,CAAC,EAAE,EAAE;YACrB,MAAM,CAAC,CAAC,CAAC,CAAA;QACX,CAAC,CAAA;QAED,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;IACzB,CAAC,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ {
2
+ "version": "1.0.0-dev.{timestamp}"
3
+ }
package/package.json CHANGED
@@ -1,30 +1,58 @@
1
1
  {
2
2
  "name": "@stack-spot/portal-components",
3
- "version": "0.0.18",
3
+ "version": "1.0.0-dev.1768482754546",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
+ "exports": {
8
+ ".": "./dist/index.js",
9
+ "./Breadcrumb": "./dist/components/Breadcrumb/index.js",
10
+ "./SelectionList": "./dist/components/SelectionList.js",
11
+ "./LazyMarkdown": "./dist/components/LazyMarkdown/index.js",
12
+ "./CodeViewer": "./dist/components/LazyMarkdown/CodeViewer.js",
13
+ "./Notifications": "./dist/notifications.js",
14
+ "./NotificationPage": "./dist/containers/NotificationsPage.js",
15
+ "./StatusCircle": "./dist/components/StatusCircle.js",
16
+ "./InfiniteScroll": "./dist/components/InfiniteScroll.js",
17
+ "./Placeholder": "./dist/components/Placeholder.js",
18
+ "./ScrollView": "./dist/components/ScrollView.js",
19
+ "./svg": "./dist/svg/index.js",
20
+ "./anchor": "./dist/context/anchor.js",
21
+ "./loading": "./dist/context/loading.js",
22
+ "./error": "./dist/components/error/index.js",
23
+ "./AnimatedHeight": "./dist/components/AnimatedHeight.js",
24
+ "./SearchInput": "./dist/components/form/SearchInput.js",
25
+ "./Select": "./dist/components/form/Select/index.js",
26
+ "./Stepper": "./dist/components/Stepper/index.js",
27
+ "./FileTreeView": "./dist/components/FileTreeView/index.js",
28
+ "./FadingOverflow": "./dist/components/FadingOverflow.js",
29
+ "./Table": "./dist/components/Table/index.js",
30
+ "./ContentValidateFilter": "./dist/components/ContentValidateFilter.js",
31
+ "./Form": "./dist/components/form/Form/index.js"
32
+ },
7
33
  "scripts": {
8
- "build": "tsc && tsc-esm-fix --target='dist'",
9
- "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0"
34
+ "build": "pnpm package-override --revert=false && rimraf dist && tsc && tsc-esm-fix --target='dist'",
35
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
36
+ "check-tree-shaking": "agadoo"
10
37
  },
11
38
  "peerDependencies": {
12
- "@citric/core": ">=6.0.0",
13
- "@citric/icons": ">=5.4.0",
14
- "@citric/ui": ">=5.4.0",
15
- "@stack-spot/portal-theme": ">=1.0.0",
16
- "@stack-spot/portal-translate": ">=1.0.0",
17
- "react": ">=18.2.0",
18
- "react-dom": ">=18.2.0",
19
- "styled-components": ">=6.1.10"
39
+ "@citric/core": "^6.5.1",
40
+ "@citric/icons": "^5.10.0",
41
+ "@citric/ui": "^6.10.1",
42
+ "@stack-spot/portal-theme": "^1.1.1",
43
+ "@stack-spot/portal-translate": "^2.1.0",
44
+ "react": "^18.2.0",
45
+ "react-dom": "^18.2.0"
20
46
  },
21
47
  "devDependencies": {
48
+ "@stack-spot/build-tools": "^1.2.4",
22
49
  "@types/lodash": "^4.14.202",
23
50
  "@types/react": "^18.2.37",
24
51
  "@types/react-dom": "^18.2.15",
25
- "@types/reactour": "^1.18.5",
52
+ "@types/react-syntax-highlighter": "^15.5.13",
26
53
  "@typescript-eslint/eslint-plugin": "^6.10.0",
27
54
  "@typescript-eslint/parser": "^6.10.0",
55
+ "agadoo": "^3.0.0",
28
56
  "eslint": "^8.53.0",
29
57
  "eslint-plugin-filenames": "^1.3.2",
30
58
  "eslint-plugin-import": "^2.29.0",
@@ -33,12 +61,23 @@
33
61
  "eslint-plugin-react": "^7.33.2",
34
62
  "eslint-plugin-react-hooks": "^4.6.0",
35
63
  "eslint-plugin-react-refresh": "^0.4.4",
64
+ "react": "18.2.0",
65
+ "react-dom": "18.2.0",
66
+ "rimraf": "^5.0.7",
67
+ "styled-components": "6.1.10",
36
68
  "tsc-esm-fix": "^2.20.26",
37
69
  "typescript": "^5.2.2"
38
70
  },
39
71
  "dependencies": {
72
+ "date-fns": "^3.6.0",
40
73
  "lodash": "^4.17.21",
41
- "react-toastify": "^9.1.3",
42
- "reactour": "^1.19.3"
74
+ "react-hook-form": "^7.55.0",
75
+ "react-infinite-scroll-component": "^6.1.0",
76
+ "react-markdown": "^9.0.1",
77
+ "react-select": "^5.10.0",
78
+ "react-syntax-highlighter": "^15.5.0",
79
+ "rehype-raw": "^7.0.0",
80
+ "remark-breaks": "^4.0.0",
81
+ "remark-gfm": "^4.0.0"
43
82
  }
44
83
  }
@@ -0,0 +1,3 @@
1
+ {
2
+ "version": "1.0.0-stg.{timestamp}"
3
+ }
package/readme.md CHANGED
@@ -1,24 +1,66 @@
1
1
  # Components
2
- Although this lib is called components, it may also contain hooks and containers.
2
+ A collection of UI components, hooks, SVG images, utilities and variables shared among Stackspot web projects.
3
3
 
4
- This library was made in order to share common components, containers and hooks among Stack Spot projects.
5
-
6
- What about the Design System (DS)? Some components here may be upgraded to the design system level eventually. But this is a place where we can have any kind of component, despite it belonging to a DS or not.
4
+ What about the Design System (DS)? Some components here may be upgraded to the design system level eventually. But this is a place where we
5
+ can have any kind of component, despite it belonging to a DS or not.
7
6
 
8
7
  ## Presentation components
9
8
  These are pure functions, i.e. they rely only in their inputs to render the UI. Furthermore, they don't have any collateral effect.
10
9
 
11
- Exceptions: translations are the only exception here. These components can access the current language without having it passed as parameter.
12
-
13
- - BreadcrumbList: renders a list of breadcrumb navigation items.
14
-
15
- ## Containers
16
- Containers are components that can access more than what has been passed as parameter. They can also have collateral effects.
10
+ Exceptions: translations are the only exception here. These components can access the current language without having it passed as
11
+ parameter.
17
12
 
18
- We don't have any containers yet.
13
+ - `BreadcrumbList`: renders a list of breadcrumb navigation items. Must be imported from `@stack-spot/portal-components/Breadcrumb`.
14
+ - `BannerWarning`: a yellow alert box with an exclamation icon and the content passed as parameter. Used for warning messages.
15
+ - `ChatBot`: an orange circular button that can toggle the chat window from Service Now. The button has a chat icon when the window is
16
+ closed and a close icon when it's open.
17
+ - `ErrorFeedback`: a box with an icon and an error message. This is used for giving error feedbacks to the user.
18
+ - `SelectionList`: a selection UI that allows the selection of one single item. These items can be divided in sections (groups). This
19
+ component is highly customizable and has lots of accessibility features implemented.
20
+ - `AnchorProvider`: a way to provide an anchor component (links) to be used by Stackspot libraries. This allows these libraries not to be
21
+ coupled with an specific React navigators. To retrieve the component, use `useLinkComponent`. Must be imported from
22
+ `@stack-spot/portal-components/anchor`.
19
23
 
20
24
  ## Hooks
25
+
21
26
  These are useful react hooks shared among the StackSpot portals.
22
27
 
23
- - `useEffectOnce()`: runs an effect only once, when the component is mounted. This prevents React from running the effect twice when in development mode.
24
- - `useTitleEffect(title)`: changes the title for the current page. The title is returned to its original value as soon as the component is unmounted.
28
+ - `useEffectOnce()`: runs an effect only once, when the component is mounted. This prevents React from running the effect twice when in
29
+ development mode.
30
+ - `useTitleEffect(title)`: changes the title for the current page. The title is returned to its original value as soon as the component is
31
+ unmounted.
32
+ - `useCheckTextOverflow()`: checks if the text fits completely in the space available.
33
+ - `useLinkComponent()`: retrieves the anchor component declared at the closest `AnchorProvider`. If no component was provided, returns a
34
+ component that renders the HTML `<a>` tag directly. This is useful for integration with navigators for React. Must be imported from
35
+ `@stack-spot/portal-components/anchor`.
36
+ - `useKeyboardControls(options)`: creates listeners for controlling a Menu UI through the keyboard (up, down, tab, esc, enter).
37
+ - `useServiceNowEffect(options)`, `useServiceNowChatButtonVisibility()`: Service Now hooks (chat capabilities).
38
+
39
+ ## SVG images
40
+ Some SVG images are exported as React components at `@stack-spot/portal-components/svg`.
41
+
42
+ ## Utilities and variables
43
+ These are useful functions shared among the StackSpot portals.
44
+
45
+ #### Accessibility
46
+ - `focusNextIgnoringChildren(element)`: focus the next element in the hierarchy, ignoring the children of the element passed as parameter.
47
+ - `focusFirstChild(element, options)`: focus the first child of element that is focusable according to the options.
48
+ - `isFocusable(element)`: checks if the element can receive focus.
49
+ - `focusAccessibleElement(element)`: tries to focus the element passed as parameter, but if it's not focusable, finds another element to
50
+ focus according to accessibility rules.
51
+
52
+ #### Cookie
53
+ - `setupCookies(domainRegex)`: setup a domain regex for the cookies. Use this if the domain is different than localhost or *.stackspot.com.
54
+ - `getCookies()`: retrieves an object with all the cookies.
55
+ - `getCookie(name)`: same as `getCookies()[name]`.
56
+ - `setCookie(name, value)`: sets the value of a cookie.
57
+ - `removeCookie(name)`: removes a cookie.
58
+
59
+ #### Other
60
+ - `isNewTourStep(step)`, `hasFinishedTourStep(key)`, `tourStepBuilder(options)`, `defaultTourConfig`: related to React Tour (tutorial).
61
+ - `openServiceNowChat()`, `serviceNowDictionary`: related to Service Now chat service.
62
+
63
+ # Developer notes
64
+ - Since not every component in this library will be used by every project. This library must be tree-shakeable! Before committing, make sure
65
+ `pnpm check-tree-shaking` passes.
66
+