@tacdaed/fragments 1.0.0-beta.3 → 1.0.0-beta.4

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 (248) hide show
  1. package/README.md +14 -0
  2. package/ng-package.json +20 -0
  3. package/package.json +22 -29
  4. package/src/lib/components/accordion/accordion.component.html +103 -0
  5. package/src/lib/components/accordion/accordion.component.scss +382 -0
  6. package/src/lib/components/accordion/accordion.component.spec.ts +147 -0
  7. package/src/lib/components/accordion/accordion.component.ts +211 -0
  8. package/src/lib/components/accordion/accordion.type.ts +82 -0
  9. package/src/lib/components/breadcrumb/breadcrumb.component.html +43 -0
  10. package/src/lib/components/breadcrumb/breadcrumb.component.scss +112 -0
  11. package/src/lib/components/breadcrumb/breadcrumb.component.spec.ts +33 -0
  12. package/src/lib/components/breadcrumb/breadcrumb.component.ts +103 -0
  13. package/src/lib/components/breadcrumb/breadcrumb.interface.ts +7 -0
  14. package/src/lib/components/button/button.component.html +57 -0
  15. package/src/lib/components/button/button.component.scss +445 -0
  16. package/src/lib/components/button/button.component.spec.ts +99 -0
  17. package/src/lib/components/button/button.component.ts +143 -0
  18. package/src/lib/components/button/button.type.ts +7 -0
  19. package/src/lib/components/card/card.component.html +44 -0
  20. package/src/lib/components/card/card.component.scss +114 -0
  21. package/src/lib/components/card/card.component.spec.ts +65 -0
  22. package/src/lib/components/card/card.component.ts +21 -0
  23. package/src/lib/components/card/card.type.ts +3 -0
  24. package/src/lib/components/code-block/code-block.component.html +55 -0
  25. package/src/lib/components/code-block/code-block.component.scss +122 -0
  26. package/src/lib/components/code-block/code-block.component.spec.ts +81 -0
  27. package/src/lib/components/code-block/code-block.component.ts +302 -0
  28. package/src/lib/components/code-block/code-block.interface.ts +28 -0
  29. package/src/lib/components/code-block/code-block.type.ts +73 -0
  30. package/src/lib/components/decorative/sparkle-field/sparkle-field.component.html +14 -0
  31. package/src/lib/components/decorative/sparkle-field/sparkle-field.component.scss +20 -0
  32. package/src/lib/components/decorative/sparkle-field/sparkle-field.component.spec.ts +38 -0
  33. package/src/lib/components/decorative/sparkle-field/sparkle-field.component.ts +181 -0
  34. package/src/lib/components/input/input-base.ts +187 -0
  35. package/src/lib/components/input/input-calendar/input-calendar.component.html +76 -0
  36. package/src/lib/components/input/input-calendar/input-calendar.component.scss +179 -0
  37. package/src/lib/components/input/input-calendar/input-calendar.component.spec.ts +44 -0
  38. package/src/lib/components/input/input-calendar/input-calendar.component.ts +299 -0
  39. package/src/lib/components/input/input-checkbox/input-checkbox.component.html +37 -0
  40. package/src/lib/components/input/input-checkbox/input-checkbox.component.scss +128 -0
  41. package/src/lib/components/input/input-checkbox/input-checkbox.component.spec.ts +43 -0
  42. package/src/lib/components/input/input-checkbox/input-checkbox.component.ts +112 -0
  43. package/src/lib/components/input/input-checkbox-group/input-checkbox-group.component.html +43 -0
  44. package/src/lib/components/input/input-checkbox-group/input-checkbox-group.component.scss +140 -0
  45. package/src/lib/components/input/input-checkbox-group/input-checkbox-group.component.spec.ts +62 -0
  46. package/src/lib/components/input/input-checkbox-group/input-checkbox-group.component.ts +136 -0
  47. package/src/lib/components/input/input-clock-picker/input-clock-picker.component.html +81 -0
  48. package/src/lib/components/input/input-clock-picker/input-clock-picker.component.scss +228 -0
  49. package/src/lib/components/input/input-clock-picker/input-clock-picker.component.spec.ts +62 -0
  50. package/src/lib/components/input/input-clock-picker/input-clock-picker.component.ts +178 -0
  51. package/src/lib/components/input/input-consts.ts +132 -0
  52. package/src/lib/components/input/input-date/input-date-validators.ts +41 -0
  53. package/src/lib/components/input/input-date/input-date.component.html +41 -0
  54. package/src/lib/components/input/input-date/input-date.component.scss +95 -0
  55. package/src/lib/components/input/input-date/input-date.component.spec.ts +43 -0
  56. package/src/lib/components/input/input-date/input-date.component.ts +359 -0
  57. package/src/lib/components/input/input-date-time/input-date-time.component.html +70 -0
  58. package/src/lib/components/input/input-date-time/input-date-time.component.scss +133 -0
  59. package/src/lib/components/input/input-date-time/input-date-time.component.spec.ts +36 -0
  60. package/src/lib/components/input/input-date-time/input-date-time.component.ts +387 -0
  61. package/src/lib/components/input/input-file-upload/input-file-upload.component.html +89 -0
  62. package/src/lib/components/input/input-file-upload/input-file-upload.component.scss +171 -0
  63. package/src/lib/components/input/input-file-upload/input-file-upload.component.spec.ts +43 -0
  64. package/src/lib/components/input/input-file-upload/input-file-upload.component.ts +351 -0
  65. package/src/lib/components/input/input-interface.ts +8 -0
  66. package/src/lib/components/input/input-number/input-number-validators.ts +0 -0
  67. package/src/lib/components/input/input-number/input-number.component.html +51 -0
  68. package/src/lib/components/input/input-number/input-number.component.scss +140 -0
  69. package/src/lib/components/input/input-number/input-number.component.spec.ts +44 -0
  70. package/src/lib/components/input/input-number/input-number.component.ts +343 -0
  71. package/src/lib/components/input/input-radio-group/input-radio-group.component.html +44 -0
  72. package/src/lib/components/input/input-radio-group/input-radio-group.component.scss +139 -0
  73. package/src/lib/components/input/input-radio-group/input-radio-group.component.spec.ts +58 -0
  74. package/src/lib/components/input/input-radio-group/input-radio-group.component.ts +132 -0
  75. package/src/lib/components/input/input-slider/input-slider.component.html +111 -0
  76. package/src/lib/components/input/input-slider/input-slider.component.scss +203 -0
  77. package/src/lib/components/input/input-slider/input-slider.component.spec.ts +46 -0
  78. package/src/lib/components/input/input-slider/input-slider.component.ts +410 -0
  79. package/src/lib/components/input/input-text/input-text-validators.ts +67 -0
  80. package/src/lib/components/input/input-text/input-text.component.html +71 -0
  81. package/src/lib/components/input/input-text/input-text.component.scss +118 -0
  82. package/src/lib/components/input/input-text/input-text.component.spec.ts +55 -0
  83. package/src/lib/components/input/input-text/input-text.component.ts +215 -0
  84. package/src/lib/components/input/input-time/input-time-validators.ts +42 -0
  85. package/src/lib/components/input/input-time/input-time.component.html +92 -0
  86. package/src/lib/components/input/input-time/input-time.component.scss +191 -0
  87. package/src/lib/components/input/input-time/input-time.component.spec.ts +39 -0
  88. package/src/lib/components/input/input-time/input-time.component.ts +691 -0
  89. package/src/lib/components/input/input-toggle-switch/input-toggle-switch.component.html +36 -0
  90. package/src/lib/components/input/input-toggle-switch/input-toggle-switch.component.scss +121 -0
  91. package/src/lib/components/input/input-toggle-switch/input-toggle-switch.component.spec.ts +54 -0
  92. package/src/lib/components/input/input-toggle-switch/input-toggle-switch.component.ts +117 -0
  93. package/src/lib/components/input/input-type.ts +18 -0
  94. package/src/lib/components/input/input-validation/input-validation.component.html +19 -0
  95. package/src/lib/components/input/input-validation/input-validation.component.scss +39 -0
  96. package/src/lib/components/input/input-validation/input-validation.component.spec.ts +45 -0
  97. package/src/lib/components/input/input-validation/input-validation.component.ts +13 -0
  98. package/src/lib/components/input/input.pipe.ts +14 -0
  99. package/src/lib/components/layout/container/container.component.html +1 -0
  100. package/src/lib/components/layout/container/container.component.scss +33 -0
  101. package/src/lib/components/layout/container/container.component.ts +32 -0
  102. package/src/lib/components/layout/container/container.type.ts +1 -0
  103. package/src/lib/components/layout/divider/divider.component.html +1 -0
  104. package/src/lib/components/layout/divider/divider.component.scss +60 -0
  105. package/src/lib/components/layout/divider/divider.component.ts +38 -0
  106. package/src/lib/components/layout/divider/divider.type.ts +2 -0
  107. package/src/lib/components/layout/section/section.component.html +21 -0
  108. package/src/lib/components/layout/section/section.component.scss +43 -0
  109. package/src/lib/components/layout/section/section.component.ts +33 -0
  110. package/src/lib/components/layout/section/section.type.ts +2 -0
  111. package/src/lib/components/layout/separator/separator.component.html +9 -0
  112. package/src/lib/components/layout/separator/separator.component.scss +52 -0
  113. package/src/lib/components/layout/separator/separator.component.ts +25 -0
  114. package/src/lib/components/layout/separator/separator.type.ts +1 -0
  115. package/src/lib/components/loader/content-blur/content-blur.component.html +13 -0
  116. package/src/lib/components/loader/content-blur/content-blur.component.scss +43 -0
  117. package/src/lib/components/loader/content-blur/content-blur.component.spec.ts +42 -0
  118. package/src/lib/components/loader/content-blur/content-blur.component.ts +34 -0
  119. package/src/lib/components/loader/loader.type.ts +2 -0
  120. package/src/lib/components/loader/progress-bar/progress-bar.component.html +26 -0
  121. package/src/lib/components/loader/progress-bar/progress-bar.component.scss +151 -0
  122. package/src/lib/components/loader/progress-bar/progress-bar.component.spec.ts +47 -0
  123. package/src/lib/components/loader/progress-bar/progress-bar.component.ts +28 -0
  124. package/src/lib/components/loader/progress-bar/progress-bar.type.ts +8 -0
  125. package/src/lib/components/loader/pulse-loader/pulse-loader.component.html +12 -0
  126. package/src/lib/components/loader/pulse-loader/pulse-loader.component.scss +202 -0
  127. package/src/lib/components/loader/pulse-loader/pulse-loader.component.spec.ts +55 -0
  128. package/src/lib/components/loader/pulse-loader/pulse-loader.component.ts +73 -0
  129. package/src/lib/components/loader/pulse-loader/pulse-loader.type.ts +6 -0
  130. package/src/lib/components/loader/skeleton-loader/skeleton-loader.component.html +13 -0
  131. package/src/lib/components/loader/skeleton-loader/skeleton-loader.component.scss +113 -0
  132. package/src/lib/components/loader/skeleton-loader/skeleton-loader.component.spec.ts +37 -0
  133. package/src/lib/components/loader/skeleton-loader/skeleton-loader.component.ts +51 -0
  134. package/src/lib/components/loader/skeleton-loader/skeleton-loader.type.ts +6 -0
  135. package/src/lib/components/loader/spinner/spinner.component.html +20 -0
  136. package/src/lib/components/loader/spinner/spinner.component.scss +137 -0
  137. package/src/lib/components/loader/spinner/spinner.component.spec.ts +43 -0
  138. package/src/lib/components/loader/spinner/spinner.component.ts +32 -0
  139. package/src/lib/components/loader/spinner/spinner.type.ts +6 -0
  140. package/src/lib/components/modal/modal.component.html +47 -0
  141. package/src/lib/components/modal/modal.component.scss +139 -0
  142. package/src/lib/components/modal/modal.component.spec.ts +60 -0
  143. package/src/lib/components/modal/modal.component.ts +83 -0
  144. package/src/lib/components/modal/modal.type.ts +9 -0
  145. package/src/lib/components/morph/blob-moph/blob-moprh.component.spec.ts +79 -0
  146. package/src/lib/components/morph/blob-moph/blob-moprh.component.ts +96 -0
  147. package/src/lib/components/morph/blob-moph/blob-morph.component.html +34 -0
  148. package/src/lib/components/morph/blob-moph/blob-morph.component.scss +7 -0
  149. package/src/lib/components/morph/morph.abstract.ts +13 -0
  150. package/src/lib/components/pagination/pagination.interface.ts +4 -0
  151. package/src/lib/components/pagination/small-pagination/small-pagination.component.html +61 -0
  152. package/src/lib/components/pagination/small-pagination/small-pagination.component.scss +187 -0
  153. package/src/lib/components/pagination/small-pagination/small-pagination.component.spec.ts +88 -0
  154. package/src/lib/components/pagination/small-pagination/small-pagination.component.ts +177 -0
  155. package/src/lib/components/selection-lists/multi-select/multi-select.component.html +170 -0
  156. package/src/lib/components/selection-lists/multi-select/multi-select.component.scss +312 -0
  157. package/src/lib/components/selection-lists/multi-select/multi-select.component.spec.ts +61 -0
  158. package/src/lib/components/selection-lists/multi-select/multi-select.component.ts +372 -0
  159. package/src/lib/components/selection-lists/selection-list/selection-list.component.html +125 -0
  160. package/src/lib/components/selection-lists/selection-list/selection-list.component.scss +267 -0
  161. package/src/lib/components/selection-lists/selection-list/selection-list.component.spec.ts +66 -0
  162. package/src/lib/components/selection-lists/selection-list/selection-list.component.ts +315 -0
  163. package/src/lib/components/selection-lists/selection-lists-base.ts +35 -0
  164. package/src/lib/components/selection-lists/selection-lists-const.ts +17 -0
  165. package/src/lib/components/selection-lists/selection-lists-interface.ts +7 -0
  166. package/src/lib/components/selection-lists/selection-lists.type.ts +1 -0
  167. package/src/lib/components/side-nav/side-nav.component.html +101 -0
  168. package/src/lib/components/side-nav/side-nav.component.scss +295 -0
  169. package/src/lib/components/side-nav/side-nav.component.spec.ts +0 -0
  170. package/src/lib/components/side-nav/side-nav.component.ts +18 -0
  171. package/src/lib/components/side-nav/side-nav.type.ts +28 -0
  172. package/src/lib/components/snackbar/snackbar.component.html +33 -0
  173. package/src/lib/components/snackbar/snackbar.component.scss +195 -0
  174. package/src/lib/components/snackbar/snackbar.component.ts +112 -0
  175. package/src/lib/components/snackbar/snackbar.type.ts +27 -0
  176. package/src/lib/components/status/chip/chip.component.html +51 -0
  177. package/src/lib/components/status/chip/chip.component.scss +149 -0
  178. package/src/lib/components/status/chip/chip.component.spec.ts +62 -0
  179. package/src/lib/components/status/chip/chip.component.ts +83 -0
  180. package/src/lib/components/status/chip/chip.type.ts +42 -0
  181. package/src/lib/components/status/directives/badge/badge.directive.spec.ts +60 -0
  182. package/src/lib/components/status/directives/badge/badge.directive.ts +190 -0
  183. package/src/lib/components/status/directives/badge/badge.interface.ts +19 -0
  184. package/src/lib/components/status/pill/pill.component.html +40 -0
  185. package/src/lib/components/status/pill/pill.component.scss +113 -0
  186. package/src/lib/components/status/pill/pill.component.spec.ts +47 -0
  187. package/src/lib/components/status/pill/pill.component.ts +83 -0
  188. package/src/lib/components/status/pill/pill.type.ts +42 -0
  189. package/src/lib/components/status/status.interface.ts +57 -0
  190. package/src/lib/components/status/status.type.ts +62 -0
  191. package/src/lib/components/status/tag/tag.component.html +39 -0
  192. package/src/lib/components/status/tag/tag.component.scss +140 -0
  193. package/src/lib/components/status/tag/tag.component.spec.ts +47 -0
  194. package/src/lib/components/status/tag/tag.component.ts +83 -0
  195. package/src/lib/components/status/tag/tag.type.ts +42 -0
  196. package/src/lib/components/stepper/stepper.component.html +83 -0
  197. package/src/lib/components/stepper/stepper.component.scss +196 -0
  198. package/src/lib/components/stepper/stepper.component.ts +482 -0
  199. package/src/lib/components/stepper/stepper.type.ts +60 -0
  200. package/src/lib/components/table/table.component.html +438 -0
  201. package/src/lib/components/table/table.component.scss +259 -0
  202. package/src/lib/components/table/table.component.spec.ts +117 -0
  203. package/src/lib/components/table/table.component.ts +215 -0
  204. package/src/lib/components/table/table.enum.ts +4 -0
  205. package/src/lib/components/table/table.function.ts +47 -0
  206. package/src/lib/components/table/table.interface.ts +143 -0
  207. package/src/lib/components/table/table.pipe.ts +62 -0
  208. package/src/lib/components/table/table.type.ts +15 -0
  209. package/src/lib/components/tabs/tabs.component.html +88 -0
  210. package/src/lib/components/tabs/tabs.component.scss +305 -0
  211. package/src/lib/components/tabs/tabs.component.spec.ts +94 -0
  212. package/src/lib/components/tabs/tabs.component.ts +282 -0
  213. package/src/lib/components/tabs/tabs.type.ts +81 -0
  214. package/src/lib/components/title-bar/title-bar.component.html +21 -0
  215. package/src/lib/components/title-bar/title-bar.component.scss +139 -0
  216. package/src/lib/components/title-bar/title-bar.component.spec.ts +44 -0
  217. package/src/lib/components/title-bar/title-bar.component.ts +13 -0
  218. package/src/lib/components/toast/toast.component.html +36 -0
  219. package/src/lib/components/toast/toast.component.scss +241 -0
  220. package/src/lib/components/toast/toast.component.ts +165 -0
  221. package/src/lib/components/toast/toast.type.ts +37 -0
  222. package/src/lib/components/toast-stack/toast-stack.component.html +30 -0
  223. package/src/lib/components/toast-stack/toast-stack.component.scss +35 -0
  224. package/src/lib/components/toast-stack/toast-stack.component.ts +51 -0
  225. package/src/lib/consts/country-prefix.ts +244 -0
  226. package/src/lib/directives/tooltip/popover.directive.ts +274 -0
  227. package/src/lib/directives/tooltip/tooltip.directive.spec.ts +86 -0
  228. package/src/lib/directives/tooltip/tooltip.directive.ts +234 -0
  229. package/src/lib/directives/tooltip/tooltip.interface.ts +29 -0
  230. package/src/lib/directives/tooltip/tooltip.type.ts +9 -0
  231. package/src/lib/interfaces/common.interfaces.ts +4 -0
  232. package/src/lib/pipes/chunk.pipe.ts +16 -0
  233. package/src/lib/pipes/safe-html.pipe.ts +14 -0
  234. package/src/lib/pipes/sanitize-html.pipe.ts +23 -0
  235. package/src/lib/types/base.types.ts +23 -0
  236. package/src/lib/types/common.types.ts +98 -0
  237. package/src/lib/types/form.types.ts +5 -0
  238. package/src/lib/utils/common.utils.ts +53 -0
  239. package/src/lib/utils/date.utils.ts +474 -0
  240. package/src/lib/utils/number.utils.ts +16 -0
  241. package/src/lib/utils/uuid.utils.ts +39 -0
  242. package/src/public-api.ts +114 -0
  243. package/tsconfig.lib.json +17 -0
  244. package/tsconfig.lib.prod.json +10 -0
  245. package/tsconfig.spec.json +9 -0
  246. package/fesm2022/tacdaed-fragments.mjs +0 -8928
  247. package/fesm2022/tacdaed-fragments.mjs.map +0 -1
  248. package/index.d.ts +0 -3929
@@ -0,0 +1,43 @@
1
+ @use './../../../../../assets/styles/scss/variables' as *;
2
+
3
+ :host {
4
+ box-sizing: border-box;
5
+ display: block;
6
+ width: 100%;
7
+ }
8
+
9
+ :host(.frg-section--sm) {
10
+ --section-padding: 1.5rem;
11
+ }
12
+
13
+ :host(.frg-section--md) {
14
+ --section-padding: 2.5rem;
15
+ }
16
+
17
+ :host(.frg-section--lg) {
18
+ --section-padding: 4rem;
19
+ }
20
+
21
+ :host(.frg-section) {
22
+ padding-block: var(--section-padding, 2.5rem);
23
+ }
24
+
25
+ :host(.frg-section--divider) {
26
+ padding-bottom: calc(var(--section-padding, 2.5rem) + 1rem);
27
+ }
28
+
29
+ .frg-section__header {
30
+ margin-bottom: 1.25rem;
31
+ }
32
+
33
+ .frg-section__title {
34
+ margin: 0 0 0.5rem 0;
35
+ font-size: 1.5rem;
36
+ font-weight: 600;
37
+ }
38
+
39
+ .frg-section__description {
40
+ margin: 0;
41
+ font-size: 0.95rem;
42
+ color: $color-dark-neutral;
43
+ }
@@ -0,0 +1,33 @@
1
+ import { Component, HostBinding, Input } from '@angular/core';
2
+ import { TSectionHeading, TSectionSpacing } from './section.type';
3
+
4
+ @Component({
5
+ selector: 'frg-section',
6
+ templateUrl: './section.component.html',
7
+ styleUrl: './section.component.scss'
8
+ })
9
+ export class SectionComponent {
10
+ @Input() title?: string;
11
+ @Input() description?: string;
12
+ @Input() spacing: TSectionSpacing = 'md';
13
+ @Input() divider: boolean = false;
14
+ @Input() headingLevel: TSectionHeading = 2;
15
+
16
+ @HostBinding('class.frg-section') baseClass = true;
17
+ @HostBinding('class.frg-section--sm') get isSmall() {
18
+ return this.spacing === 'sm';
19
+ }
20
+ @HostBinding('class.frg-section--md') get isMedium() {
21
+ return this.spacing === 'md';
22
+ }
23
+ @HostBinding('class.frg-section--lg') get isLarge() {
24
+ return this.spacing === 'lg';
25
+ }
26
+ @HostBinding('class.frg-section--divider') get hasDivider() {
27
+ return this.divider;
28
+ }
29
+
30
+ get hasHeader(): boolean {
31
+ return !!(this.title || this.description);
32
+ }
33
+ }
@@ -0,0 +1,2 @@
1
+ export type TSectionSpacing = 'sm' | 'md' | 'lg';
2
+ export type TSectionHeading = 1 | 2 | 3 | 4 | 5 | 6;
@@ -0,0 +1,9 @@
1
+ <div class="frg-separator__row">
2
+ @if (label) {
3
+ <span class="frg-separator__line" aria-hidden="true"></span>
4
+ <span class="frg-separator__label">{{ label }}</span>
5
+ <span class="frg-separator__line" aria-hidden="true"></span>
6
+ } @else {
7
+ <span class="frg-separator__line frg-separator__line--full" aria-hidden="true"></span>
8
+ }
9
+ </div>
@@ -0,0 +1,52 @@
1
+ @use './../../../../../assets/styles/scss/variables' as *;
2
+
3
+ :host {
4
+ box-sizing: border-box;
5
+ display: block;
6
+ }
7
+
8
+ :host(.frg-separator) {
9
+ --frg-separator-spacing: 1rem;
10
+ --frg-separator-font-size: 0.85rem;
11
+ margin-block: var(--frg-separator-spacing);
12
+ }
13
+
14
+ :host(.frg-separator--sm) {
15
+ --frg-separator-spacing: 0.75rem;
16
+ --frg-separator-font-size: 0.75rem;
17
+ }
18
+
19
+ :host(.frg-separator--md) {
20
+ --frg-separator-spacing: 1rem;
21
+ --frg-separator-font-size: 0.85rem;
22
+ }
23
+
24
+ :host(.frg-separator--lg) {
25
+ --frg-separator-spacing: 1.5rem;
26
+ --frg-separator-font-size: 0.95rem;
27
+ }
28
+
29
+ .frg-separator__row {
30
+ display: flex;
31
+ align-items: center;
32
+ gap: 0.75rem;
33
+ color: $color-dark-neutral;
34
+ }
35
+
36
+ .frg-separator__line {
37
+ flex: 1;
38
+ height: 1px;
39
+ background-color: $color-light-soft;
40
+ }
41
+
42
+ .frg-separator__line--full {
43
+ flex: 1;
44
+ }
45
+
46
+ .frg-separator__label {
47
+ font-size: var(--frg-separator-font-size);
48
+ text-transform: uppercase;
49
+ letter-spacing: 0.08em;
50
+ font-weight: 600;
51
+ color: $color-dark-soft;
52
+ }
@@ -0,0 +1,25 @@
1
+ import { Component, HostBinding, Input } from '@angular/core';
2
+ import { TSeparatorSize } from './separator.type';
3
+
4
+ @Component({
5
+ selector: 'frg-separator',
6
+ templateUrl: './separator.component.html',
7
+ styleUrl: './separator.component.scss'
8
+ })
9
+ export class SeparatorComponent {
10
+ @Input() label?: string;
11
+ @Input() size: TSeparatorSize = 'md';
12
+
13
+ @HostBinding('class.frg-separator') baseClass = true;
14
+ @HostBinding('class.frg-separator--sm') get isSmall() {
15
+ return this.size === 'sm';
16
+ }
17
+ @HostBinding('class.frg-separator--md') get isMedium() {
18
+ return this.size === 'md';
19
+ }
20
+ @HostBinding('class.frg-separator--lg') get isLarge() {
21
+ return this.size === 'lg';
22
+ }
23
+
24
+ @HostBinding('attr.role') role = 'separator';
25
+ }
@@ -0,0 +1 @@
1
+ export type TSeparatorSize = 'sm' | 'md' | 'lg';
@@ -0,0 +1,13 @@
1
+ <div class="blur-loader">
2
+ <div class="blur-overlay" [style.backdropFilter]="'blur(' + blurPx + 'px)'" [style.opacity]="blurOpacity"></div>
3
+
4
+ <div class="content">
5
+ <ng-content></ng-content>
6
+ </div>
7
+
8
+ @if(showProgress) {
9
+ <div class="progress-text">
10
+ {{ safeProgress }}%
11
+ </div>
12
+ }
13
+ </div>
@@ -0,0 +1,43 @@
1
+ @use './../../../../../assets/styles/scss/variables' as *;
2
+ :host {
3
+ display: block;
4
+
5
+ .blur-loader {
6
+ position: relative;
7
+ width: 100%;
8
+ height: 100%;
9
+ border-radius: 1rem;
10
+ overflow: hidden;
11
+ display: flex;
12
+ align-items: center;
13
+ justify-content: center;
14
+
15
+ .content {
16
+ position: relative;
17
+ z-index: 1;
18
+ width: 100%;
19
+ height: 100%;
20
+ }
21
+
22
+ .blur-overlay {
23
+ position: absolute;
24
+ inset: 0;
25
+ background: rgba($color-light, 0.6);
26
+ z-index: 2;
27
+ transition: backdrop-filter 0.2s ease, opacity 0.2s ease;
28
+ }
29
+
30
+ .progress-text {
31
+ position: absolute;
32
+ z-index: 3;
33
+ font-size: 1.5rem;
34
+ font-weight: bold;
35
+ color: $color-dark-neutral;
36
+ background: rgba($color-light, 0.5);
37
+ box-shadow: $box-shadow-md;
38
+ padding: 0.25rem 0.75rem;
39
+ border-radius: 1rem;
40
+ pointer-events: none;
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,42 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+ import { By } from '@angular/platform-browser';
3
+ import { ContentBlurComponent } from './content-blur.component';
4
+
5
+ describe('ContentBlurComponent', () => {
6
+ let fixture: ComponentFixture<ContentBlurComponent>;
7
+ let component: ContentBlurComponent;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ imports: [ContentBlurComponent]
12
+ }).compileComponents();
13
+
14
+ fixture = TestBed.createComponent(ContentBlurComponent);
15
+ component = fixture.componentInstance;
16
+ });
17
+
18
+ it('clamps progress to 0-100', () => {
19
+ component.progress = 120;
20
+ component.ngOnChanges();
21
+
22
+ expect(component.safeProgress).toBe(100);
23
+ expect(component.showProgress).toBeFalse();
24
+ });
25
+
26
+ it('renders progress text when incomplete', () => {
27
+ component.progress = 50;
28
+ component.ngOnChanges();
29
+
30
+ fixture.detectChanges();
31
+
32
+ const text = fixture.debugElement.query(By.css('.progress-text'));
33
+ expect(text.nativeElement.textContent).toContain('50%');
34
+ });
35
+
36
+ it('computes blur based on progress', () => {
37
+ component.progress = 10;
38
+ component.ngOnChanges();
39
+
40
+ expect(component.blurPx).toBe(50);
41
+ });
42
+ });
@@ -0,0 +1,34 @@
1
+ import { Component, Input, OnChanges } from '@angular/core';
2
+
3
+ @Component({
4
+ selector: 'frg-content-blur',
5
+ standalone: true,
6
+ templateUrl: './content-blur.component.html',
7
+ styleUrls: ['./content-blur.component.scss'],
8
+ })
9
+ export class ContentBlurComponent implements OnChanges {
10
+ @Input() progress: number = 0;
11
+ safeProgress: number = 0;
12
+
13
+ ngOnChanges(): void {
14
+ this.safeProgress = Math.min(100, Math.max(0, this.progress));
15
+ }
16
+
17
+ get blurPx(): number {
18
+ const p = this.safeProgress;
19
+
20
+ if (p < 20) return 50;
21
+ if (p < 50) return 30;
22
+ if (p < 75) return 25;
23
+ if (p < 100) return 18;
24
+ return 0;
25
+ }
26
+
27
+ get blurOpacity(): number {
28
+ return this.blurPx / 20;
29
+ }
30
+
31
+ get showProgress(): boolean {
32
+ return this.safeProgress < 100;
33
+ }
34
+ }
@@ -0,0 +1,2 @@
1
+ export type TBaseLoaderStyle = 'primary' | 'secondary' | 'tertiary' | 'dark' | 'light';
2
+ export type TBaseLoaderSize = 'small' | 'medium' | 'large';
@@ -0,0 +1,26 @@
1
+ <div
2
+ class="frg-progress-bar"
3
+ [ngClass]="{
4
+ 'frg-progress-bar--primary': styleType === 'primary',
5
+ 'frg-progress-bar--secondary': styleType === 'secondary',
6
+ 'frg-progress-bar--tertiary': styleType === 'tertiary',
7
+ 'frg-progress-bar--dark': styleType === 'dark',
8
+ 'frg-progress-bar--light': styleType === 'light',
9
+ 'frg-progress-bar--small': size === 'small',
10
+ 'frg-progress-bar--medium': size === 'medium',
11
+ 'frg-progress-bar--large': size === 'large',
12
+ 'frg-progress-bar--fill': animation === 'fill',
13
+ 'frg-progress-bar--slide': animation === 'slide',
14
+ 'frg-progress-bar--pulse': animation === 'pulse',
15
+ 'frg-progress-bar--rotate': animation === 'rotate'
16
+ }"
17
+ [style.--segments]="segmentsList.length"
18
+ >
19
+ @for(segment of segmentsList; let i = $index; track $index) {
20
+ <div class="frg-progress-bar__segment" [class.filled]="i < filledSegments"></div>
21
+ }
22
+
23
+ @if(showPercentage) {
24
+ <span class="frg-progress-label">{{ safeProgress }}%</span>
25
+ }
26
+ </div>
@@ -0,0 +1,151 @@
1
+ @use './../../../../../assets/styles/scss/variables' as *;
2
+
3
+ :host {
4
+ display: block;
5
+
6
+ .frg-progress-bar {
7
+ position: relative;
8
+ width: 100%;
9
+ background-color: $color-light-soft;
10
+ border-radius: 0.1rem;
11
+ overflow: hidden;
12
+ height: 0.75rem;
13
+
14
+ display: flex;
15
+
16
+ .frg-progress-bar__segment {
17
+ flex: 0 0 auto;
18
+ width: calc((100% / var(--segments)));
19
+ background-color: $color-light-soft;
20
+ transition: background-color 0.3s ease;
21
+ }
22
+
23
+ .frg-progress-label {
24
+ position: absolute;
25
+ top: 50%;
26
+ left: 50%;
27
+ transform: translate(-50%, -50%);
28
+ font-size: $font-size-xs;
29
+ font-weight: 600;
30
+ color: $color-light;
31
+ user-select: none;
32
+ pointer-events: none;
33
+ }
34
+
35
+ &--small {
36
+ height: 0.5rem;
37
+ .frg-progress-label {
38
+ font-size: $font-size-2xs;
39
+ }
40
+ }
41
+
42
+ &--medium {
43
+ height: 0.75rem;
44
+ }
45
+
46
+ &--large {
47
+ height: 1rem;
48
+ }
49
+
50
+ &--primary {
51
+ .frg-progress-bar__segment.filled {
52
+ background-color: $color-primary;
53
+ }
54
+ }
55
+
56
+ &--secondary {
57
+ .frg-progress-bar__segment.filled {
58
+ background-color: $color-secondary;
59
+ }
60
+ }
61
+
62
+ &--tertiary {
63
+ .frg-progress-bar__segment.filled {
64
+ background-color: $color-tertiary;
65
+ }
66
+ }
67
+
68
+ &--dark {
69
+ .frg-progress-bar__segment.filled {
70
+ background-color: $color-dark;
71
+ }
72
+ }
73
+
74
+ &--light {
75
+ .frg-progress-bar__segment.filled {
76
+ background-color: $color-light;
77
+ }
78
+
79
+ .frg-progress-label {
80
+ color: $color-dark-soft;
81
+ }
82
+ }
83
+
84
+ &--fill {
85
+ .frg-progress-bar__segment.filled {
86
+ transform-origin: left;
87
+ animation: fill-in 0.4s ease forwards;
88
+ }
89
+ }
90
+
91
+ @keyframes fill-in {
92
+ from {
93
+ opacity: 0.5;
94
+ }
95
+ to {
96
+ opacity: 1;
97
+ }
98
+ }
99
+
100
+ &--slide {
101
+ .frg-progress-bar__segment.filled {
102
+ transform-origin: left;
103
+ animation: slide-in 0.4s ease forwards;
104
+ }
105
+ }
106
+
107
+ @keyframes slide-in {
108
+ from {
109
+ transform: translateX(-100%);
110
+ opacity: 0.1;
111
+ }
112
+ to {
113
+ transform: translateX(0);
114
+ opacity: 1;
115
+ }
116
+ }
117
+
118
+ &--rotate {
119
+ .frg-progress-bar__segment.filled {
120
+ transform-origin: left;
121
+ animation: rotate 0.5s ease forwards;
122
+ }
123
+ }
124
+
125
+ @keyframes rotate {
126
+ from {
127
+ transform: translateX(-100%) rotate(-360deg);
128
+ opacity: 0.1;
129
+ }
130
+ to {
131
+ transform: translateX(0) rotate(0deg);
132
+ opacity: 1;
133
+ }
134
+ }
135
+
136
+ &--pulse {
137
+ .frg-progress-bar__segment.filled {
138
+ animation: pulse 1.2s ease-in-out infinite;
139
+ }
140
+ }
141
+
142
+ @keyframes pulse {
143
+ 0%, 100% {
144
+ opacity: 1;
145
+ }
146
+ 50% {
147
+ opacity: 0.5;
148
+ }
149
+ }
150
+ }
151
+ }
@@ -0,0 +1,47 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+ import { By } from '@angular/platform-browser';
3
+ import { ProgressBarComponent } from './progress-bar.component';
4
+
5
+ describe('ProgressBarComponent', () => {
6
+ let fixture: ComponentFixture<ProgressBarComponent>;
7
+ let component: ProgressBarComponent;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ imports: [ProgressBarComponent]
12
+ }).compileComponents();
13
+
14
+ fixture = TestBed.createComponent(ProgressBarComponent);
15
+ component = fixture.componentInstance;
16
+ });
17
+
18
+ it('calculates filled segments from progress', () => {
19
+ component.progress = 50;
20
+ component.segments = 10;
21
+
22
+ component.ngOnChanges();
23
+
24
+ expect(component.segmentsList.length).toBe(10);
25
+ expect(component.filledSegments).toBe(5);
26
+ });
27
+
28
+ it('renders percentage label when enabled', () => {
29
+ component.progress = 30;
30
+ component.showPercentage = true;
31
+
32
+ component.ngOnChanges();
33
+ fixture.detectChanges();
34
+
35
+ const label = fixture.debugElement.query(By.css('.frg-progress-label'));
36
+ expect(label.nativeElement.textContent).toContain('30%');
37
+ });
38
+
39
+ it('hides percentage label when disabled', () => {
40
+ component.showPercentage = false;
41
+
42
+ component.ngOnChanges();
43
+ fixture.detectChanges();
44
+
45
+ expect(fixture.debugElement.query(By.css('.frg-progress-label'))).toBeNull();
46
+ });
47
+ });
@@ -0,0 +1,28 @@
1
+ import { NgClass } from '@angular/common';
2
+ import { Component, Input, OnChanges } from '@angular/core';
3
+ import { TProgressBarAnimation, TProgressBarSize, TProgressBarType } from './progress-bar.type';
4
+
5
+ @Component({
6
+ selector: 'frg-progress-bar',
7
+ imports: [NgClass],
8
+ templateUrl: './progress-bar.component.html',
9
+ styleUrl: './progress-bar.component.scss',
10
+ })
11
+ export class ProgressBarComponent implements OnChanges {
12
+ @Input() progress: number = 0;
13
+ @Input() styleType: TProgressBarType = 'primary';
14
+ @Input() size: TProgressBarSize = 'medium';
15
+ @Input() showPercentage: boolean = true;
16
+ @Input() segments: number = 100;
17
+ @Input() animation: TProgressBarAnimation = 'fill';
18
+
19
+ protected safeProgress: number = 0;
20
+ segmentsList: Array<number> = [];
21
+ filledSegments: number = 0;
22
+
23
+ ngOnChanges(): void {
24
+ this.safeProgress = Math.min(100, Math.max(0, this.progress));
25
+ this.segmentsList = Array.from({ length: this.segments }, (_, i) => i + 1);
26
+ this.filledSegments = Math.round((this.safeProgress / 100) * this.segments);
27
+ }
28
+ }
@@ -0,0 +1,8 @@
1
+ import { TBaseSize } from "../../../types/base.types";
2
+ import { TBaseLoaderStyle } from "../loader.type";
3
+
4
+ export type TProgressBarSize = TBaseSize;
5
+
6
+ export type TProgressBarType = TBaseLoaderStyle;
7
+
8
+ export type TProgressBarAnimation = 'fill' | 'slide' | 'pulse' | 'rotate';
@@ -0,0 +1,12 @@
1
+ <output
2
+ [ngClass]="classes"
3
+ [attr.aria-label]="ariaLabel"
4
+ >
5
+ <div class="frg-pulse-loader__core"></div>
6
+
7
+ @if (showPercentage) {
8
+ <span class="frg-pulse-loader__percent">
9
+ {{ progress }}%
10
+ </span>
11
+ }
12
+ </output>