@sarasanalytics-com/design-system 0.0.41 → 0.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/.editorconfig +16 -0
  2. package/.eslintrc.json +23 -0
  3. package/.storybook/main.ts +21 -0
  4. package/.storybook/manager.ts +17 -0
  5. package/.storybook/preview-head.html +5 -0
  6. package/.storybook/preview.ts +66 -0
  7. package/.storybook/tsconfig.doc.json +10 -0
  8. package/.storybook/tsconfig.json +11 -0
  9. package/.storybook/typings.d.ts +4 -0
  10. package/.vscode/extensions.json +7 -0
  11. package/.vscode/launch.json +20 -0
  12. package/.vscode/settings.json +13 -0
  13. package/.vscode/tasks.json +42 -0
  14. package/README.md +34 -13
  15. package/angular.json +195 -0
  16. package/build-storybook.log +45 -0
  17. package/documentation.json +0 -0
  18. package/generate-public-api.js +59 -0
  19. package/package.json +73 -18
  20. package/projects/component-library/README.md +24 -0
  21. package/projects/component-library/ng-package.json +8 -0
  22. package/projects/component-library/package.json +12 -0
  23. package/projects/component-library/src/interfaces/avatar-interface.ts +6 -0
  24. package/projects/component-library/src/interfaces/button-interface.ts +37 -0
  25. package/{interfaces/card-carousel-interface.d.ts → projects/component-library/src/interfaces/card-carousel-interface.ts} +2 -1
  26. package/projects/component-library/src/interfaces/chip-interface.ts +11 -0
  27. package/projects/component-library/src/interfaces/grid-interface.ts +24 -0
  28. package/projects/component-library/src/interfaces/icon-interface.ts +21 -0
  29. package/projects/component-library/src/interfaces/select-interface.ts +20 -0
  30. package/projects/component-library/src/interfaces/tab-interface.ts +6 -0
  31. package/{interfaces/toast-interface.d.ts → projects/component-library/src/interfaces/toast-interface.ts} +1 -1
  32. package/projects/component-library/src/lib/accordion/accordion.component.css +188 -0
  33. package/projects/component-library/src/lib/accordion/accordion.component.html +151 -0
  34. package/projects/component-library/src/lib/accordion/accordion.component.spec.ts +23 -0
  35. package/projects/component-library/src/lib/accordion/accordion.component.ts +129 -0
  36. package/projects/component-library/src/lib/avatar/avatar.component.css +48 -0
  37. package/projects/component-library/src/lib/avatar/avatar.component.html +5 -0
  38. package/projects/component-library/src/lib/avatar/avatar.component.spec.ts +23 -0
  39. package/projects/component-library/src/lib/avatar/avatar.component.ts +50 -0
  40. package/projects/component-library/src/lib/button/button.component.css +145 -0
  41. package/projects/component-library/src/lib/button/button.component.html +25 -0
  42. package/projects/component-library/src/lib/button/button.component.spec.ts +23 -0
  43. package/projects/component-library/src/lib/button/button.component.ts +82 -0
  44. package/projects/component-library/src/lib/calendar-header/calendar-header.component.css +67 -0
  45. package/projects/component-library/src/lib/calendar-header/calendar-header.component.html +20 -0
  46. package/projects/component-library/src/lib/calendar-header/calendar-header.component.spec.ts +23 -0
  47. package/projects/component-library/src/lib/calendar-header/calendar-header.component.ts +191 -0
  48. package/projects/component-library/src/lib/card/card-body/card-body.component.css +0 -0
  49. package/projects/component-library/src/lib/card/card-body/card-body.component.html +1 -0
  50. package/projects/component-library/src/lib/card/card-body/card-body.component.spec.ts +23 -0
  51. package/projects/component-library/src/lib/card/card-body/card-body.component.ts +12 -0
  52. package/projects/component-library/src/lib/card/card-custom-header/card-custom-header.component.css +70 -0
  53. package/projects/component-library/src/lib/card/card-custom-header/card-custom-header.component.html +1 -0
  54. package/projects/component-library/src/lib/card/card-custom-header/card-custom-header.component.spec.ts +23 -0
  55. package/projects/component-library/src/lib/card/card-custom-header/card-custom-header.component.ts +13 -0
  56. package/projects/component-library/src/lib/card/card-footer-actions/card-footer-actions.component.css +4 -0
  57. package/projects/component-library/src/lib/card/card-footer-actions/card-footer-actions.component.html +3 -0
  58. package/projects/component-library/src/lib/card/card-footer-actions/card-footer-actions.component.spec.ts +23 -0
  59. package/projects/component-library/src/lib/card/card-footer-actions/card-footer-actions.component.ts +12 -0
  60. package/projects/component-library/src/lib/card/card-icon/card-icon.component.css +0 -0
  61. package/projects/component-library/src/lib/card/card-icon/card-icon.component.html +1 -0
  62. package/projects/component-library/src/lib/card/card-icon/card-icon.component.spec.ts +23 -0
  63. package/projects/component-library/src/lib/card/card-icon/card-icon.component.ts +12 -0
  64. package/projects/component-library/src/lib/card/card-title-actions/card-title-actions.component.css +3 -0
  65. package/projects/component-library/src/lib/card/card-title-actions/card-title-actions.component.html +1 -0
  66. package/projects/component-library/src/lib/card/card-title-actions/card-title-actions.component.spec.ts +23 -0
  67. package/projects/component-library/src/lib/card/card-title-actions/card-title-actions.component.ts +12 -0
  68. package/projects/component-library/src/lib/card/card.component.css +149 -0
  69. package/projects/component-library/src/lib/card/card.component.html +46 -0
  70. package/projects/component-library/src/lib/card/card.component.spec.ts +23 -0
  71. package/projects/component-library/src/lib/card/card.component.ts +47 -0
  72. package/projects/component-library/src/lib/card/checkbox-card/checkbox-card.component.css +79 -0
  73. package/projects/component-library/src/lib/card/checkbox-card/checkbox-card.component.html +55 -0
  74. package/projects/component-library/src/lib/card/checkbox-card/checkbox-card.component.spec.ts +23 -0
  75. package/projects/component-library/src/lib/card/checkbox-card/checkbox-card.component.ts +44 -0
  76. package/projects/component-library/src/lib/card/guide-card/guide-card.component.css +80 -0
  77. package/projects/component-library/src/lib/card/guide-card/guide-card.component.html +24 -0
  78. package/projects/component-library/src/lib/card/guide-card/guide-card.component.spec.ts +23 -0
  79. package/projects/component-library/src/lib/card/guide-card/guide-card.component.ts +19 -0
  80. package/projects/component-library/src/lib/card-carousel/card-carousel.component.css +91 -0
  81. package/projects/component-library/src/lib/card-carousel/card-carousel.component.html +54 -0
  82. package/projects/component-library/src/lib/card-carousel/card-carousel.component.spec.ts +23 -0
  83. package/projects/component-library/src/lib/card-carousel/card-carousel.component.ts +89 -0
  84. package/projects/component-library/src/lib/checkbox/checkbox.component.css +79 -0
  85. package/projects/component-library/src/lib/checkbox/checkbox.component.html +27 -0
  86. package/projects/component-library/src/lib/checkbox/checkbox.component.spec.ts +23 -0
  87. package/projects/component-library/src/lib/checkbox/checkbox.component.ts +38 -0
  88. package/projects/component-library/src/lib/chips/chips.component.css +129 -0
  89. package/projects/component-library/src/lib/chips/chips.component.html +17 -0
  90. package/projects/component-library/src/lib/chips/chips.component.spec.ts +23 -0
  91. package/projects/component-library/src/lib/chips/chips.component.ts +54 -0
  92. package/projects/component-library/src/lib/component-library.component.spec.ts +23 -0
  93. package/projects/component-library/src/lib/component-library.component.ts +16 -0
  94. package/projects/component-library/src/lib/component-library.service.spec.ts +16 -0
  95. package/projects/component-library/src/lib/component-library.service.ts +9 -0
  96. package/projects/component-library/src/lib/datepicker/datepicker.component.css +33 -0
  97. package/projects/component-library/src/lib/datepicker/datepicker.component.html +11 -0
  98. package/projects/component-library/src/lib/datepicker/datepicker.component.spec.ts +23 -0
  99. package/projects/component-library/src/lib/datepicker/datepicker.component.ts +36 -0
  100. package/projects/component-library/src/lib/form-input/form-input.component.css +164 -0
  101. package/projects/component-library/src/lib/form-input/form-input.component.html +55 -0
  102. package/projects/component-library/src/lib/form-input/form-input.component.spec.ts +23 -0
  103. package/projects/component-library/src/lib/form-input/form-input.component.ts +282 -0
  104. package/projects/component-library/src/lib/form-select/form-select.component.css +158 -0
  105. package/projects/component-library/src/lib/form-select/form-select.component.html +38 -0
  106. package/projects/component-library/src/lib/form-select/form-select.component.spec.ts +23 -0
  107. package/projects/component-library/src/lib/form-select/form-select.component.ts +72 -0
  108. package/projects/component-library/src/lib/grid-cell/grid-cell.component.css +78 -0
  109. package/projects/component-library/src/lib/grid-cell/grid-cell.component.html +31 -0
  110. package/projects/component-library/src/lib/grid-cell/grid-cell.component.spec.ts +23 -0
  111. package/projects/component-library/src/lib/grid-cell/grid-cell.component.ts +89 -0
  112. package/projects/component-library/src/lib/header/header.component.css +62 -0
  113. package/projects/component-library/src/lib/header/header.component.html +23 -0
  114. package/projects/component-library/src/lib/header/header.component.spec.ts +23 -0
  115. package/projects/component-library/src/lib/header/header.component.ts +28 -0
  116. package/projects/component-library/src/lib/icon/icon.component.css +65 -0
  117. package/projects/component-library/src/lib/icon/icon.component.html +9 -0
  118. package/projects/component-library/src/lib/icon/icon.component.ts +64 -0
  119. package/projects/component-library/src/lib/icon/icon.service.ts +26 -0
  120. package/projects/component-library/src/lib/left-nav/left-nav.component.css +109 -0
  121. package/projects/component-library/src/lib/left-nav/left-nav.component.html +51 -0
  122. package/projects/component-library/src/lib/left-nav/left-nav.component.spec.ts +23 -0
  123. package/projects/component-library/src/lib/left-nav/left-nav.component.ts +180 -0
  124. package/projects/component-library/src/lib/list/list.component.css +28 -0
  125. package/projects/component-library/src/lib/list/list.component.html +10 -0
  126. package/projects/component-library/src/lib/list/list.component.spec.ts +23 -0
  127. package/projects/component-library/src/lib/list/list.component.ts +15 -0
  128. package/projects/component-library/src/lib/message-banner/message-banner.component.css +52 -0
  129. package/projects/component-library/src/lib/message-banner/message-banner.component.html +15 -0
  130. package/projects/component-library/src/lib/message-banner/message-banner.component.spec.ts +23 -0
  131. package/projects/component-library/src/lib/message-banner/message-banner.component.ts +31 -0
  132. package/projects/component-library/src/lib/page-layout/page-layout.component.css +76 -0
  133. package/projects/component-library/src/lib/page-layout/page-layout.component.html +30 -0
  134. package/projects/component-library/src/lib/page-layout/page-layout.component.spec.ts +23 -0
  135. package/projects/component-library/src/lib/page-layout/page-layout.component.ts +14 -0
  136. package/projects/component-library/src/lib/progress-bar/progress-bar.component.css +30 -0
  137. package/projects/component-library/src/lib/progress-bar/progress-bar.component.html +4 -0
  138. package/projects/component-library/src/lib/progress-bar/progress-bar.component.spec.ts +23 -0
  139. package/projects/component-library/src/lib/progress-bar/progress-bar.component.ts +24 -0
  140. package/projects/component-library/src/lib/radio-button/radio-button.component.css +128 -0
  141. package/projects/component-library/src/lib/radio-button/radio-button.component.html +28 -0
  142. package/projects/component-library/src/lib/radio-button/radio-button.component.spec.ts +23 -0
  143. package/projects/component-library/src/lib/radio-button/radio-button.component.ts +35 -0
  144. package/projects/component-library/src/lib/scrolling-cards/scrolling-cards.component.css +118 -0
  145. package/projects/component-library/src/lib/scrolling-cards/scrolling-cards.component.html +11 -0
  146. package/projects/component-library/src/lib/scrolling-cards/scrolling-cards.component.spec.ts +23 -0
  147. package/projects/component-library/src/lib/scrolling-cards/scrolling-cards.component.ts +74 -0
  148. package/projects/component-library/src/lib/spinner/spinner.component.css +41 -0
  149. package/projects/component-library/src/lib/spinner/spinner.component.html +1 -0
  150. package/projects/component-library/src/lib/spinner/spinner.component.spec.ts +23 -0
  151. package/projects/component-library/src/lib/spinner/spinner.component.ts +15 -0
  152. package/projects/component-library/src/lib/stepper/stepper.component.css +96 -0
  153. package/projects/component-library/src/lib/stepper/stepper.component.html +14 -0
  154. package/projects/component-library/src/lib/stepper/stepper.component.spec.ts +23 -0
  155. package/projects/component-library/src/lib/stepper/stepper.component.ts +61 -0
  156. package/projects/component-library/src/lib/tabs/tabs.component.css +100 -0
  157. package/projects/component-library/src/lib/tabs/tabs.component.html +16 -0
  158. package/projects/component-library/src/lib/tabs/tabs.component.spec.ts +23 -0
  159. package/projects/component-library/src/lib/tabs/tabs.component.ts +37 -0
  160. package/projects/component-library/src/lib/toast/toast.component.css +115 -0
  161. package/projects/component-library/src/lib/toast/toast.component.html +29 -0
  162. package/projects/component-library/src/lib/toast/toast.component.spec.ts +23 -0
  163. package/projects/component-library/src/lib/toast/toast.component.ts +87 -0
  164. package/projects/component-library/src/lib/tool-tip/tool-tip.component.css +144 -0
  165. package/projects/component-library/src/lib/tool-tip/tool-tip.component.html +31 -0
  166. package/projects/component-library/src/lib/tool-tip/tool-tip.component.spec.ts +23 -0
  167. package/projects/component-library/src/lib/tool-tip/tool-tip.component.ts +37 -0
  168. package/{public-api.d.ts → projects/component-library/src/public-api.ts} +13 -0
  169. package/projects/component-library/src/shared/formly-field-wrapper/formly-field-wrapper.component.css +0 -0
  170. package/projects/component-library/src/shared/formly-field-wrapper/formly-field-wrapper.component.html +22 -0
  171. package/projects/component-library/src/shared/formly-field-wrapper/formly-field-wrapper.component.spec.ts +23 -0
  172. package/projects/component-library/src/shared/formly-field-wrapper/formly-field-wrapper.component.ts +13 -0
  173. package/projects/component-library/src/utils/validators.ts +100 -0
  174. package/projects/component-library/tsconfig.lib.json +14 -0
  175. package/projects/component-library/tsconfig.lib.prod.json +10 -0
  176. package/projects/component-library/tsconfig.spec.json +14 -0
  177. package/sarasanalytics-com-design-system-0.0.21.tgz +0 -0
  178. package/src/Saras-logo.svg +15 -0
  179. package/src/app/app.component.css +82 -0
  180. package/src/app/app.component.html +663 -0
  181. package/src/app/app.component.spec.ts +29 -0
  182. package/src/app/app.component.ts +1341 -0
  183. package/src/app/app.config.ts +56 -0
  184. package/src/app/app.routes.ts +3 -0
  185. package/src/app/data.ts +52 -0
  186. package/src/app/kitchen-sink/kitchen-sink.component.css +30 -0
  187. package/src/app/kitchen-sink/kitchen-sink.component.html +7 -0
  188. package/src/app/kitchen-sink/kitchen-sink.component.spec.ts +23 -0
  189. package/src/app/kitchen-sink/kitchen-sink.component.ts +92 -0
  190. package/src/assets/.gitkeep +0 -0
  191. package/src/assets/analysis.svg +1 -0
  192. package/src/assets/arrowRightOutlined.svg +1 -0
  193. package/src/assets/avatar.svg +1 -0
  194. package/src/assets/bpn.svg +1 -0
  195. package/src/assets/businessStatsFilled.svg +1 -0
  196. package/src/assets/channelkey.svg +1 -0
  197. package/src/assets/chatHelpOutlined.svg +1 -0
  198. package/src/assets/checkCircleFilled.svg +1 -0
  199. package/src/assets/checkCircleOutlined.svg +1 -0
  200. package/src/assets/checkOutlined.svg +1 -0
  201. package/src/assets/circleFilled.svg +1 -0
  202. package/src/assets/closeBlueOutlined.svg +1 -0
  203. package/src/assets/closeCircleFilled.svg +1 -0
  204. package/src/assets/closeOutlined.svg +1 -0
  205. package/src/assets/dataonavatar.svg +1 -0
  206. package/src/assets/datonAvatar.png +0 -0
  207. package/src/assets/desktopSpeakerOutlined.svg +1 -0
  208. package/src/assets/disabledCheckboxFilled.svg +1 -0
  209. package/src/assets/doubleDownOutlined.svg +1 -0
  210. package/src/assets/downChevronOutlined.svg +3 -0
  211. package/src/assets/downOutlined.svg +1 -0
  212. package/src/assets/errorCircleOutlined.svg +1 -0
  213. package/src/assets/errorCrossOutlined.svg +3 -0
  214. package/src/assets/eyeFilled.svg +1 -0
  215. package/src/assets/eyeOff.svg +3 -0
  216. package/src/assets/eyeOutlined.svg +1 -0
  217. package/src/assets/formDetailsOutlined.svg +1 -0
  218. package/src/assets/gridViewOutlined.svg +1 -0
  219. package/src/assets/headsetOutlined.svg +3 -0
  220. package/src/assets/homeOutlined.svg +1 -0
  221. package/src/assets/icons/analysis1.svg +1 -0
  222. package/src/assets/infoCircleOutlined.svg +3 -0
  223. package/src/assets/infoTriangleFilled.svg +1 -0
  224. package/src/assets/infoTriangleOutlined.svg +1 -0
  225. package/src/assets/innosupps.svg +1 -0
  226. package/src/assets/leftChevronCircle.svg +2 -0
  227. package/src/assets/locationOutlined.svg +1 -0
  228. package/src/assets/loginDashboard.png +0 -0
  229. package/src/assets/mailOutlined.svg +1 -0
  230. package/src/assets/multiConnectionHub.svg +1 -0
  231. package/src/assets/murad.svg +1 -0
  232. package/src/assets/personOutlined.svg +1 -0
  233. package/src/assets/pricingIcon.svg +3 -0
  234. package/src/assets/rightChevronCircle.svg +1 -0
  235. package/src/assets/rightChevronOutlined.svg +1 -0
  236. package/src/assets/sarasFullLogo.svg +13 -0
  237. package/src/assets/sarasWhite.svg +1 -0
  238. package/src/assets/settingsOutlined.svg +1 -0
  239. package/src/assets/sourcesOutlined.svg +1 -0
  240. package/src/assets/tabDesktopArrowClockwiseOutlined.svg +1 -0
  241. package/src/assets/targetScanOutlined.svg +1 -0
  242. package/src/assets/timerOutlined.svg +5 -0
  243. package/src/assets/upwardTriangleFilled.svg +1 -0
  244. package/src/custom-theme.scss +37 -0
  245. package/src/favicon.ico +0 -0
  246. package/src/index.html +23 -0
  247. package/src/main.ts +6 -0
  248. package/src/stories/GettingStarted.mdx +233 -0
  249. package/src/stories/KitchenSink.stories.ts +109 -0
  250. package/src/stories/accordion.stories.ts +234 -0
  251. package/src/stories/avatar.stories.ts +45 -0
  252. package/src/stories/card-carousel.stories.ts +136 -0
  253. package/src/stories/card.stories.ts +242 -0
  254. package/src/stories/checkbox.stories.ts +238 -0
  255. package/src/stories/chips.stories.ts +61 -0
  256. package/src/stories/custom-button.stories.ts +89 -0
  257. package/src/stories/datepicker.stories.ts +78 -0
  258. package/src/stories/form-input.stories.ts +166 -0
  259. package/src/stories/gridCell.stories.ts +234 -0
  260. package/src/stories/header.stories.ts +61 -0
  261. package/src/stories/icon.stories.ts +65 -0
  262. package/src/stories/leftnav.stories.ts +67 -0
  263. package/src/stories/message-banner.stories.ts +116 -0
  264. package/src/stories/page-layout.stories.ts +200 -0
  265. package/src/stories/progress-bar.stories.ts +40 -0
  266. package/src/stories/radio-button.stories.ts +80 -0
  267. package/src/stories/scrolling-card.stories.ts +36 -0
  268. package/src/stories/selectInput.stories.ts +176 -0
  269. package/src/stories/stepper.stories.ts +92 -0
  270. package/src/stories/tabs.stories.ts +97 -0
  271. package/src/stories/toast.stories.ts +74 -0
  272. package/src/stories/tool-tip.stories.ts +45 -0
  273. package/{styles → src}/styles.css +27 -0
  274. package/src/svg.d.ts +1 -0
  275. package/tsconfig.app.json +14 -0
  276. package/tsconfig.json +42 -0
  277. package/tsconfig.spec.json +14 -0
  278. package/esm2022/interfaces/avatar-interface.mjs +0 -2
  279. package/esm2022/interfaces/button-interface.mjs +0 -10
  280. package/esm2022/interfaces/card-carousel-interface.mjs +0 -2
  281. package/esm2022/interfaces/chip-interface.mjs +0 -2
  282. package/esm2022/interfaces/grid-interface.mjs +0 -2
  283. package/esm2022/interfaces/guide-card-interface.mjs +0 -2
  284. package/esm2022/interfaces/icon-interface.mjs +0 -16
  285. package/esm2022/interfaces/message-banner.mjs +0 -2
  286. package/esm2022/interfaces/option-interface.mjs +0 -2
  287. package/esm2022/interfaces/select-interface.mjs +0 -2
  288. package/esm2022/interfaces/tab-interface.mjs +0 -2
  289. package/esm2022/interfaces/toast-interface.mjs +0 -2
  290. package/esm2022/lib/avatar/avatar.component.mjs +0 -56
  291. package/esm2022/lib/button/button.component.mjs +0 -100
  292. package/esm2022/lib/calendar-header/calendar-header.component.mjs +0 -168
  293. package/esm2022/lib/card/card-body/card-body.component.mjs +0 -11
  294. package/esm2022/lib/card/card-custom-header/card-custom-header.component.mjs +0 -11
  295. package/esm2022/lib/card/card-footer-actions/card-footer-actions.component.mjs +0 -11
  296. package/esm2022/lib/card/card-icon/card-icon.component.mjs +0 -11
  297. package/esm2022/lib/card/card-title-actions/card-title-actions.component.mjs +0 -11
  298. package/esm2022/lib/card/card.component.mjs +0 -97
  299. package/esm2022/lib/card/checkbox-card/checkbox-card.component.mjs +0 -41
  300. package/esm2022/lib/card/guide-card/guide-card.component.mjs +0 -19
  301. package/esm2022/lib/card-carousel/card-carousel.component.mjs +0 -87
  302. package/esm2022/lib/checkbox/checkbox.component.mjs +0 -38
  303. package/esm2022/lib/chips/chips.component.mjs +0 -62
  304. package/esm2022/lib/component-library.component.mjs +0 -19
  305. package/esm2022/lib/component-library.service.mjs +0 -14
  306. package/esm2022/lib/datepicker/datepicker.component.mjs +0 -40
  307. package/esm2022/lib/form-input/form-input.component.mjs +0 -219
  308. package/esm2022/lib/form-select/form-select.component.mjs +0 -77
  309. package/esm2022/lib/grid-cell/grid-cell.component.mjs +0 -84
  310. package/esm2022/lib/header/header.component.mjs +0 -37
  311. package/esm2022/lib/icon/icon.component.mjs +0 -73
  312. package/esm2022/lib/icon/icon.service.mjs +0 -28
  313. package/esm2022/lib/left-nav/left-nav.component.mjs +0 -146
  314. package/esm2022/lib/list/list.component.mjs +0 -23
  315. package/esm2022/lib/message-banner/message-banner.component.mjs +0 -43
  316. package/esm2022/lib/page-layout/page-layout.component.mjs +0 -21
  317. package/esm2022/lib/progress-bar/progress-bar.component.mjs +0 -29
  318. package/esm2022/lib/radio-button/radio-button.component.mjs +0 -33
  319. package/esm2022/lib/scrolling-cards/scrolling-cards.component.mjs +0 -59
  320. package/esm2022/lib/spinner/spinner.component.mjs +0 -22
  321. package/esm2022/lib/stepper/stepper.component.mjs +0 -64
  322. package/esm2022/lib/tabs/tabs.component.mjs +0 -38
  323. package/esm2022/lib/toast/toast.component.mjs +0 -100
  324. package/esm2022/lib/tool-tip/tool-tip.component.mjs +0 -41
  325. package/esm2022/public-api.mjs +0 -55
  326. package/esm2022/sarasanalytics-com-design-system.mjs +0 -5
  327. package/esm2022/utils/validators.mjs +0 -97
  328. package/fesm2022/sarasanalytics-com-design-system.mjs +0 -1891
  329. package/fesm2022/sarasanalytics-com-design-system.mjs.map +0 -1
  330. package/index.d.ts +0 -5
  331. package/interfaces/avatar-interface.d.ts +0 -6
  332. package/interfaces/button-interface.d.ts +0 -22
  333. package/interfaces/chip-interface.d.ts +0 -11
  334. package/interfaces/grid-interface.d.ts +0 -24
  335. package/interfaces/icon-interface.d.ts +0 -4
  336. package/interfaces/select-interface.d.ts +0 -20
  337. package/interfaces/tab-interface.d.ts +0 -6
  338. package/lib/avatar/avatar.component.d.ts +0 -18
  339. package/lib/button/button.component.d.ts +0 -32
  340. package/lib/calendar-header/calendar-header.component.d.ts +0 -31
  341. package/lib/card/card-body/card-body.component.d.ts +0 -5
  342. package/lib/card/card-custom-header/card-custom-header.component.d.ts +0 -5
  343. package/lib/card/card-footer-actions/card-footer-actions.component.d.ts +0 -5
  344. package/lib/card/card-icon/card-icon.component.d.ts +0 -5
  345. package/lib/card/card-title-actions/card-title-actions.component.d.ts +0 -5
  346. package/lib/card/card.component.d.ts +0 -28
  347. package/lib/card/checkbox-card/checkbox-card.component.d.ts +0 -12
  348. package/lib/card/guide-card/guide-card.component.d.ts +0 -8
  349. package/lib/card-carousel/card-carousel.component.d.ts +0 -27
  350. package/lib/checkbox/checkbox.component.d.ts +0 -9
  351. package/lib/chips/chips.component.d.ts +0 -22
  352. package/lib/component-library.component.d.ts +0 -5
  353. package/lib/component-library.service.d.ts +0 -6
  354. package/lib/datepicker/datepicker.component.d.ts +0 -9
  355. package/lib/form-input/form-input.component.d.ts +0 -67
  356. package/lib/form-select/form-select.component.d.ts +0 -18
  357. package/lib/grid-cell/grid-cell.component.d.ts +0 -20
  358. package/lib/header/header.component.d.ts +0 -14
  359. package/lib/icon/icon.component.d.ts +0 -24
  360. package/lib/icon/icon.service.d.ts +0 -12
  361. package/lib/left-nav/left-nav.component.d.ts +0 -47
  362. package/lib/list/list.component.d.ts +0 -10
  363. package/lib/message-banner/message-banner.component.d.ts +0 -19
  364. package/lib/page-layout/page-layout.component.d.ts +0 -8
  365. package/lib/progress-bar/progress-bar.component.d.ts +0 -13
  366. package/lib/radio-button/radio-button.component.d.ts +0 -12
  367. package/lib/scrolling-cards/scrolling-cards.component.d.ts +0 -36
  368. package/lib/spinner/spinner.component.d.ts +0 -7
  369. package/lib/stepper/stepper.component.d.ts +0 -17
  370. package/lib/tabs/tabs.component.d.ts +0 -15
  371. package/lib/toast/toast.component.d.ts +0 -33
  372. package/lib/tool-tip/tool-tip.component.d.ts +0 -15
  373. package/utils/validators.d.ts +0 -6
  374. /package/{interfaces/guide-card-interface.d.ts → projects/component-library/src/interfaces/guide-card-interface.ts} +0 -0
  375. /package/{interfaces/message-banner.d.ts → projects/component-library/src/interfaces/message-banner.ts} +0 -0
  376. /package/{interfaces/option-interface.d.ts → projects/component-library/src/interfaces/option-interface.ts} +0 -0
@@ -0,0 +1,23 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { CardComponent } from './card.component';
4
+
5
+ describe('CardComponent', () => {
6
+ let component: CardComponent;
7
+ let fixture: ComponentFixture<CardComponent>;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ imports: [CardComponent]
12
+ })
13
+ .compileComponents();
14
+
15
+ fixture = TestBed.createComponent(CardComponent);
16
+ component = fixture.componentInstance;
17
+ fixture.detectChanges();
18
+ });
19
+
20
+ it('should create', () => {
21
+ expect(component).toBeTruthy();
22
+ });
23
+ });
@@ -0,0 +1,47 @@
1
+ import { CommonModule } from '@angular/common';
2
+ import { Component, Input, SimpleChanges } from '@angular/core';
3
+ import { ChipsComponent } from '../chips/chips.component';
4
+ import { ChipInterface } from '../../interfaces/chip-interface';
5
+ import { IconComponent } from '../icon/icon.component';
6
+ import { AvatarComponent } from "../avatar/avatar.component";
7
+
8
+ @Component({
9
+ selector: 'sa-card',
10
+ standalone: true,
11
+ imports: [CommonModule, ChipsComponent, IconComponent, AvatarComponent],
12
+ templateUrl: './card.component.html',
13
+ styleUrl: './card.component.css'
14
+ })
15
+ export class CardComponent {
16
+ @Input('title') title: string = '';
17
+ @Input('showCardHeader') showCardHeader: boolean = false;
18
+ @Input('showCardBody') showCardBody: boolean = false;
19
+ @Input('showHeaderBodyDivider') showHeaderBodyDivider: boolean = false;
20
+ @Input('showCustomCardBody') showCustomCardBody: boolean = false;
21
+ @Input('customWrapperClass') customWrapperClass: string = '';
22
+ @Input('chip') chip: ChipInterface | null = null;
23
+ @Input('body') body: string = '';
24
+ @Input('avatar') avatar: string = '';
25
+ @Input('image') image: string = '';
26
+ @Input('imageWidth') imageWidth: string = '';
27
+ @Input('avatarSize') avatarSize: string;
28
+
29
+ @Input('icon') icon: string = '';
30
+ @Input('iconSize') iconSize: string;
31
+
32
+ @Input('subtitle') subtitle: string = '';
33
+ @Input('logoIcon') logoIcon: string = '';
34
+
35
+ @Input('width') width: string | number;
36
+ @Input('height') height: string | number;
37
+ @Input('column') column: boolean = false;
38
+
39
+ cardStyles: any = {};
40
+
41
+ ngOnChanges(changes: SimpleChanges) {
42
+ if (changes['width']?.currentValue || changes['height']?.currentValue) {
43
+ this.cardStyles['width'] = typeof changes['width']?.currentValue === 'string' ? changes['width']?.currentValue : changes['width']?.currentValue + '%';
44
+ this.cardStyles['height'] = typeof changes['height']?.currentValue === 'string' ? changes['height']?.currentValue : changes['height']?.currentValue + '%';
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,79 @@
1
+ .sa-card-title-logo-container {
2
+ display: flex;
3
+ gap: var(--small-8px);
4
+ align-items: center;
5
+ }
6
+
7
+ .sa-card-title-logo sa-icon {
8
+ display: flex;
9
+ }
10
+
11
+ ::ng-deep.checkbox-style .mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,
12
+ ::ng-deep.checkbox-style .mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,
13
+ ::ng-deep.checkbox-style .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background,
14
+ ::ng-deep.checkbox-style.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,
15
+ ::ng-deep.checkbox-style .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,
16
+ ::ng-deep.checkbox-style .mdc-checkbox:hover .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background,
17
+ ::ng-deep.checkbox-style .mdc-checkbox .mdc-checkbox__native-control:enabled:focus:checked~.mdc-checkbox__background,
18
+ ::ng-deep.checkbox-style .mdc-checkbox .mdc-checkbox__native-control:enabled:focus:indeterminate~.mdc-checkbox__background,
19
+ ::ng-deep.checkbox-style .mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mdc-checkbox__ripple,
20
+ ::ng-deep.checkbox-style .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,
21
+ ::ng-deep.checkbox-style .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,
22
+ ::ng-deep.checkbox-style .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background,
23
+ ::ng-deep.checkbox-style .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,
24
+ ::ng-deep.checkbox-style .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,
25
+ ::ng-deep.checkbox-style .mdc-checkbox:hover .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background,
26
+ ::ng-deep.checkbox-style .mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple {
27
+ border-color: var(--primary-500);
28
+ background-color: var(--primary-500);
29
+ }
30
+
31
+ .checkbox-card {
32
+ display: block;
33
+ height: 100%;
34
+ }
35
+
36
+ .buttons-container {
37
+ display: flex;
38
+ justify-content: center;
39
+ align-items: center;
40
+ height: 100%;
41
+ }
42
+
43
+ /* Button Wrapper */
44
+ .button-wrapper {
45
+ display: flex;
46
+ flex-direction: column;
47
+ align-items: center;
48
+ }
49
+
50
+ .button-content {
51
+ display: flex;
52
+ flex-direction: column;
53
+ align-items: flex-start;
54
+ gap: var(--medium-20px, 20px);
55
+ }
56
+
57
+ .description-container {
58
+ display: flex;
59
+ align-items: center;
60
+ gap: var(--small-12px);
61
+ }
62
+
63
+ .description-style {
64
+ color: var(--text-mediumemphasis, #6D6979);
65
+ font-family: var(--font);
66
+ font-size: var(--small-14px);
67
+ font-style: normal;
68
+ font-weight: 500;
69
+ line-height: var(--medium-20px);
70
+ letter-spacing: 0.1px;
71
+ }
72
+
73
+ .description-icon {
74
+ display: flex;
75
+ }
76
+
77
+ ::ng-deep .sa-card {
78
+ height: 100%;
79
+ }
@@ -0,0 +1,55 @@
1
+ <sa-card [width]="props['width']" [customWrapperClass]="props['customWrapperClass']"
2
+ (click)="!props['disabled'] && onCardClick($event)" [showCardBody]="false" [showCardHeader]="true"
3
+ [showCustomCardBody]="true" class="checkbox-card {{props['isCardSelected'] ? 'card-selected': ''}}"
4
+ [style.width]="props['width']">
5
+ <sa-card-title-header>
6
+ <div class="sa-card-custom-header-container">
7
+ <div class="sa-card-title-logo-container">
8
+ <div class="sa-card-title-logo {{props['disabled'] ? 'disabled-card': ''}}"><sa-icon
9
+ [icon]="props['featureIcon']" customClass="auto-dimensions colored-icon"></sa-icon>
10
+ </div>
11
+ <div class="sa-card-custom-title">{{props['title']}}</div>
12
+ </div>
13
+ <div class="sa-card-titleIcon">
14
+ <sa-card-title-actions>
15
+ <div class="sa-document-action">
16
+ @if(props['disabled']){
17
+ <sa-icon icon="disabledCheckboxFilled"
18
+ customClass="auto-dimensions disabled-checkbox-icon"></sa-icon>
19
+ }@else{
20
+ <mat-checkbox class="checkbox-style" [formControl]="formControl"
21
+ (click)="onCheckboxClick($event)" [disabled]="props['disabled']"></mat-checkbox>
22
+ }
23
+ </div>
24
+ </sa-card-title-actions>
25
+ </div>
26
+ </div>
27
+ </sa-card-title-header>
28
+ <sa-card-custom-body>
29
+ @if(props['listItems']){
30
+ <lib-list [listData]="props['listItems']" [featuresIcon]="props['listIcon']"></lib-list>
31
+ }@else if(props['showButtons']){
32
+ <div class="buttons-container">
33
+ <ng-container *ngFor="let button of props['showButtons']">
34
+ <ng-container *ngIf="button.type === 'submit'">
35
+ <div class="button-content">
36
+ @if(props['description']){
37
+ @if(props['descriptionIcon']){
38
+ <div class="description-container">
39
+ <sa-icon [icon]="props['descriptionIcon']" customClass="auto-dimensions disabled-icon"
40
+ class="description-icon"></sa-icon>
41
+ <span class="description-style">{{props['description']}}</span>
42
+ </div>
43
+ }
44
+ }
45
+ <sa-button (click)="actionHandler(button)" [text]="button.label" [type]="button.buttonType"
46
+ [size]="button.size" [state]="button.state" [icon]="button.icon"
47
+ [iconPosition]='button.iconPosition' class="checkbox-card-action-button"
48
+ [buttonIconSize]="button.iconSize"></sa-button>
49
+ </div>
50
+ </ng-container>
51
+ </ng-container>
52
+ </div>
53
+ }
54
+ </sa-card-custom-body>
55
+ </sa-card>
@@ -0,0 +1,23 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { CheckboxCardComponent } from './checkbox-card.component';
4
+
5
+ describe('CheckboxCardComponent', () => {
6
+ let component: CheckboxCardComponent;
7
+ let fixture: ComponentFixture<CheckboxCardComponent>;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ imports: [CheckboxCardComponent]
12
+ })
13
+ .compileComponents();
14
+
15
+ fixture = TestBed.createComponent(CheckboxCardComponent);
16
+ component = fixture.componentInstance;
17
+ fixture.detectChanges();
18
+ });
19
+
20
+ it('should create', () => {
21
+ expect(component).toBeTruthy();
22
+ });
23
+ });
@@ -0,0 +1,44 @@
1
+ import { Component, EventEmitter, Input, Output } from '@angular/core';
2
+ import { CardComponent } from '../card.component';
3
+ import { IconComponent } from '../../icon/icon.component';
4
+ import { ListComponent } from '../../list/list.component';
5
+ import { CardBodyComponent } from '../card-body/card-body.component';
6
+ import { MatCheckboxModule } from '@angular/material/checkbox';
7
+ import { CommonModule } from '@angular/common';
8
+ import { CardTitleActionsComponent } from '../card-title-actions/card-title-actions.component';
9
+ import { CardCustomHeaderComponent } from '../card-custom-header/card-custom-header.component';
10
+ import { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
11
+ import { FieldType } from '@ngx-formly/core';
12
+ import { ButtonComponent } from '../../button/button.component';
13
+
14
+ @Component({
15
+ selector: 'sa-checkbox-card',
16
+ standalone: true,
17
+ imports: [CardComponent, IconComponent, ListComponent, CardBodyComponent, MatCheckboxModule, CommonModule, CardTitleActionsComponent, CardCustomHeaderComponent, FormsModule, ReactiveFormsModule, ButtonComponent],
18
+ templateUrl: './checkbox-card.component.html',
19
+ styleUrl: './checkbox-card.component.css'
20
+ })
21
+ export class CheckboxCardComponent extends FieldType {
22
+
23
+ ngOnInit() {
24
+ // console.log(this)
25
+ }
26
+
27
+ onCardClick(event: MouseEvent): void {
28
+ this.props['isCardSelected'] = !this.props['isCardSelected'];
29
+ this.formControl.setValue(!this.formControl.value);
30
+ }
31
+
32
+ onCheckboxClick(event: Event): void {
33
+ event.stopPropagation();
34
+ }
35
+
36
+
37
+ override get formControl(): FormControl {
38
+ return super.formControl as FormControl;
39
+ }
40
+
41
+ actionHandler(button: any) {
42
+ this.field.props['onButtonClick'](this.field);
43
+ }
44
+ }
@@ -0,0 +1,80 @@
1
+ .guide-container {
2
+ background-color: var(--structural-white);
3
+ border: 0.0625rem solid var(--grey-100, #eaecf0);
4
+ border-radius: 0.5rem;
5
+ overflow: hidden;
6
+ padding: 1.75rem 1.875rem 1.75rem 1.875rem;
7
+ display: flex;
8
+ flex-direction: column;
9
+ gap: 2.25rem;
10
+ }
11
+
12
+ .guide-header {
13
+ border-bottom: 0.0625rem solid var(--grey-100, #eaecf0);
14
+ position: relative;
15
+ }
16
+
17
+ .guide-header h1 {
18
+ font-size: 1.5rem;
19
+ color: var(--text-highemphasis, #1C1B20);
20
+ margin: 0;
21
+ }
22
+
23
+ .guide-content {
24
+ display: flex;
25
+ flex-direction: column;
26
+ gap: var(--large-42px);
27
+ }
28
+
29
+ .step {
30
+ display: flex;
31
+ }
32
+
33
+ .guide-header .guide-header-title,
34
+ .step-content .step-title {
35
+ color: var(--text-highemphasis, #1C1B20);
36
+ font-family: var(--font-roboto, 'Roboto');
37
+ font-size: var(--small-16px);
38
+ font-style: normal;
39
+ font-weight: 400;
40
+ line-height: 1.5rem;
41
+ letter-spacing: 0.03125rem;
42
+ }
43
+
44
+
45
+ .step-content .step-description {
46
+ color: var(--text-lowemphasis, #98A2A3)
47
+ }
48
+
49
+ .step-indicator {
50
+ margin-right: 1.1575rem;
51
+ margin-top: 0.125rem;
52
+ }
53
+
54
+ .step-circle {
55
+ width: 1rem;
56
+ height: 1rem;
57
+ border-radius: 50%;
58
+ border: 0.25rem solid var(--primary-500);
59
+ margin: 0.125rem auto 0;
60
+ }
61
+
62
+ .step-line {
63
+ width: 0.125rem;
64
+ height: calc(100% + 1.75rem);
65
+ background-color: var(--primary-500);
66
+ margin: 0 auto 0;
67
+ }
68
+
69
+ .step-content h2 {
70
+ font-size: 1.125rem;
71
+ color: var(--text-highemphasis, #1C1B20);
72
+ margin: 0 0 0.625rem 0;
73
+ }
74
+
75
+ .step-content p {
76
+ font-size: 0.875rem;
77
+ color: var(--text-highemphasis, #1C1B20);
78
+ margin: 0;
79
+ line-height: 1.5;
80
+ }
@@ -0,0 +1,24 @@
1
+ <div class="guide-container">
2
+ <div class="guide-header">
3
+ <p class="guide-header-title">{{ title }}</p>
4
+ </div>
5
+ <div class="guide-content">
6
+ @for (step of steps; track step; let last = $last) {
7
+ <div class="step">
8
+ <div class="step-indicator">
9
+ <div class="step-circle"></div>
10
+
11
+ @if (!last) {
12
+ <div class="step-line"></div>
13
+ }
14
+ </div>
15
+ <div class="step-content">
16
+ <p class="step-title">{{ step.title }}</p>
17
+ @if (step?.description) {
18
+ <p class="step-description">{{ step.description }}</p>
19
+ }
20
+ </div>
21
+ </div>
22
+ }
23
+ </div>
24
+ </div>
@@ -0,0 +1,23 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { GuideCardComponent } from './guide-card.component';
4
+
5
+ describe('GuideCardComponent', () => {
6
+ let component: GuideCardComponent;
7
+ let fixture: ComponentFixture<GuideCardComponent>;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ imports: [GuideCardComponent]
12
+ })
13
+ .compileComponents();
14
+
15
+ fixture = TestBed.createComponent(GuideCardComponent);
16
+ component = fixture.componentInstance;
17
+ fixture.detectChanges();
18
+ });
19
+
20
+ it('should create', () => {
21
+ expect(component).toBeTruthy();
22
+ });
23
+ });
@@ -0,0 +1,19 @@
1
+ import { Component, Input, ViewEncapsulation } from '@angular/core';
2
+ import { GuideStep } from '../../../interfaces/guide-card-interface';
3
+
4
+
5
+
6
+ @Component({
7
+ selector: 'sa-guide-card',
8
+ standalone: true,
9
+ imports: [],
10
+ templateUrl: './guide-card.component.html',
11
+ styleUrl: './guide-card.component.css',
12
+ encapsulation: ViewEncapsulation.None
13
+ })
14
+ export class GuideCardComponent {
15
+ @Input() title: string = '';
16
+ @Input() steps: GuideStep[] = []
17
+
18
+
19
+ }
@@ -0,0 +1,91 @@
1
+ /* card-carousel.component.css */
2
+ .carousel-container {
3
+ display: flex;
4
+ flex-direction: column;
5
+ align-items: center;
6
+ }
7
+
8
+ .controls {
9
+ display: flex;
10
+ align-items: center;
11
+ margin: 0 0 var(--medium-20px) 0;
12
+ width: 100%;
13
+ min-height: var(--medium-32px);
14
+ }
15
+
16
+ .dots {
17
+ display: inline-flex;
18
+ gap: var(--small-4px);
19
+ align-items: center;
20
+ width: 17rem;
21
+ overflow: hidden;
22
+ }
23
+
24
+ .arrow-controls {
25
+ display: flex;
26
+ align-items: center;
27
+ margin-top: var(--small-4px);
28
+ gap: var(--small-12px);
29
+ margin-left: auto;
30
+ }
31
+
32
+ .arrow-controls sa-icon {
33
+ cursor: pointer;
34
+ }
35
+
36
+ .dot {
37
+ width: var(--small-6px);
38
+ height: var(--small-6px);
39
+ min-width: var(--small-6px);
40
+ min-height: var(--small-6px);
41
+ border-radius: 50%;
42
+ background-color: var(--grey-200);
43
+ margin: 0 var(--small-6px);
44
+ cursor: pointer;
45
+ display: block;
46
+ }
47
+
48
+ .dot.active {
49
+ background-color: var(--primary-500);
50
+ width: var(--small-8px);
51
+ height: var(--small-8px);
52
+ min-width: var(--small-8px);
53
+ min-height: var(--small-8px);
54
+ }
55
+
56
+ .brand-logos-container {
57
+ width: 100%; /* Adjust as needed */
58
+ margin-top: var(--medium-32px);
59
+ overflow: hidden;
60
+ max-width: 28.9375rem;
61
+ }
62
+
63
+ .brand-logos {
64
+ display: flex;
65
+ gap: var(--medium-24px);
66
+ transition: transform 0.3s ease;
67
+ justify-content: center;
68
+ align-items: center;
69
+ }
70
+
71
+ .brand-logos sa-icon {
72
+ flex: 0 0 60px;
73
+ opacity: 0.5;
74
+ cursor: pointer;
75
+ transition: transform 0.3s ease, opacity 0.3s ease;
76
+ display: flex;
77
+ align-items: center;
78
+ justify-content: center;
79
+ height: var(--medium-32px);
80
+ max-height: var(--medium-32px);
81
+ min-height: var(--medium-32px);
82
+ }
83
+
84
+ .brand-logos sa-icon.active {
85
+ opacity: 1;
86
+ }
87
+
88
+ .sa-icon.logo-style > svg {
89
+ width: fit-content;
90
+ height: fit-content;
91
+ }
@@ -0,0 +1,54 @@
1
+ <!-- card-carousel.component.html -->
2
+ <div class="carousel-container">
3
+ <div class="carousel-top-wrapper">
4
+ <div class="controls">
5
+ @if (showIndicators) {
6
+ <div class="dots">
7
+ @for (card of cards; track card.id; let i = $index) {
8
+ <span class="dot" [class.active]="i === currentIndex" (click)="selectCard(i)"></span>
9
+ }
10
+ </div>
11
+ }
12
+ @if (showNavigationArrows) {
13
+ <div class="arrow-controls">
14
+ <sa-icon [icon]="'leftChevronCircle'" size="24" (click)="prev()"></sa-icon>
15
+ <sa-icon [icon]="'rightChevronCircle'" size="24" (click)="next()"></sa-icon>
16
+ </div>
17
+ }
18
+ </div>
19
+
20
+ <div class="card-container">
21
+ <sa-card [customWrapperClass]="'sa-card-custom-wrapper'" [width]="'24.063rem'" [column]="false"
22
+ [showCardHeader]="true" [showCardBody]="true" [body]="cards[currentIndex].body"
23
+ [showHeaderBodyDivider]="true">
24
+ <sa-card-title-header>
25
+ <div class="sa-card-custom-header-container">
26
+ <sa-icon [icon]="cards[currentIndex].avatarIcon" size="50"></sa-icon>
27
+ <div class="sa-card-title-subtitle-container">
28
+ <div class="sa-card-custom-title">{{ cards[currentIndex].title }}</div>
29
+ <div class="sa-card-subtitle">{{ cards[currentIndex].subtitle }}</div>
30
+ </div>
31
+ <div class="sa-card-titleIcon">
32
+ <sa-icon [icon]="cards[currentIndex].logoIcon" customClass="logo-style"></sa-icon>
33
+ </div>
34
+ </div>
35
+ </sa-card-title-header>
36
+ </sa-card>
37
+ </div>
38
+ </div>
39
+
40
+ @if (showBrandFooter) {
41
+ <div class="brand-logos-container">
42
+ <div class="brand-logos">
43
+ @for (logo of visibleLogos; track $index) {
44
+ <sa-icon [icon]="logo.logoIcon" [class.active]="$index === 1" (click)="selectCard(logo.index)"
45
+ [customClass]="'logo-style'">
46
+ </sa-icon>
47
+ }
48
+ </div>
49
+ </div>
50
+ }
51
+
52
+
53
+
54
+ </div>
@@ -0,0 +1,23 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { CardCarouselComponent } from './card-carousel.component';
4
+
5
+ describe('CardCarouselComponent', () => {
6
+ let component: CardCarouselComponent;
7
+ let fixture: ComponentFixture<CardCarouselComponent>;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ imports: [CardCarouselComponent]
12
+ })
13
+ .compileComponents();
14
+
15
+ fixture = TestBed.createComponent(CardCarouselComponent);
16
+ component = fixture.componentInstance;
17
+ fixture.detectChanges();
18
+ });
19
+
20
+ it('should create', () => {
21
+ expect(component).toBeTruthy();
22
+ });
23
+ });
@@ -0,0 +1,89 @@
1
+ import { Component, OnInit, Input, OnDestroy, ViewEncapsulation } from '@angular/core';
2
+ import { CardComponent } from '../card/card.component';
3
+ import { IconComponent } from '../icon/icon.component';
4
+ import { CardCustomHeaderComponent } from '../card/card-custom-header/card-custom-header.component';
5
+ import { CardCarousel } from '../../interfaces/card-carousel-interface';
6
+
7
+
8
+ @Component({
9
+ selector: 'sa-card-carousel',
10
+ standalone: true,
11
+ imports: [CardComponent, IconComponent, CardCustomHeaderComponent],
12
+ templateUrl: './card-carousel.component.html',
13
+ styleUrl: './card-carousel.component.css',
14
+ encapsulation: ViewEncapsulation.None
15
+ })
16
+ export class CardCarouselComponent implements OnInit, OnDestroy {
17
+ @Input() cards: CardCarousel[] = [];
18
+ @Input() interval: number = 5000;
19
+ @Input() autoPlay: boolean = true;
20
+ @Input() showNavigationArrows: boolean = true;
21
+ @Input() showIndicators: boolean = true;
22
+ @Input() showBrandFooter: boolean = true;
23
+
24
+ visibleLogos: (CardCarousel & { index: number })[] = [];
25
+
26
+ currentIndex: number = 0;
27
+ private timer: any;
28
+
29
+ ngOnInit() {
30
+ this.updateVisibleLogos();
31
+ if (this.autoPlay) {
32
+ this.startTimer();
33
+ }
34
+ }
35
+
36
+ ngOnDestroy() {
37
+ this.stopTimer();
38
+ }
39
+
40
+
41
+ startTimer() {
42
+ this.stopTimer();
43
+ this.timer = setInterval(() => {
44
+ this.next();
45
+ }, this.interval);
46
+ }
47
+
48
+ stopTimer() {
49
+ if (this.timer) {
50
+ clearInterval(this.timer);
51
+ }
52
+ }
53
+
54
+ resetTimer() {
55
+ clearInterval(this.timer);
56
+ if (this.autoPlay) {
57
+ this.startTimer();
58
+ }
59
+ }
60
+
61
+ selectCard(index: number) {
62
+ this.currentIndex = index;
63
+ this.resetTimer();
64
+ this.updateVisibleLogos();
65
+ }
66
+
67
+ next() {
68
+ this.currentIndex = (this.currentIndex + 1) % this.cards.length;
69
+ this.resetTimer();
70
+ this.updateVisibleLogos();
71
+ }
72
+
73
+ prev() {
74
+ this.currentIndex = (this.currentIndex - 1 + this.cards.length) % this.cards.length;
75
+ this.resetTimer();
76
+ this.updateVisibleLogos();
77
+ }
78
+
79
+ updateVisibleLogos() {
80
+ this.visibleLogos = [];
81
+ for (let i = -1; i <= 4; i++) {
82
+ const index = (this.currentIndex + i + this.cards.length) % this.cards.length;
83
+ this.visibleLogos.push({
84
+ ...this.cards[index],
85
+ index: index
86
+ });
87
+ }
88
+ }
89
+ }