@tacdaed/fragments 1.0.0-beta.0 → 1.0.0-beta.2

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 +2 -18
  2. package/ng-package.json +25 -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/fragments.mjs +0 -8928
  247. package/fesm2022/fragments.mjs.map +0 -1
  248. package/index.d.ts +0 -3929
@@ -0,0 +1,140 @@
1
+ @use './../../../../../assets/styles/scss/variables' as *;
2
+ @use 'sass:color';
3
+
4
+ :host {
5
+ .frg-tag {
6
+ display: inline-flex;
7
+ align-items: center;
8
+ gap: 0.35rem;
9
+ border-radius: 0.25rem;
10
+ white-space: nowrap;
11
+ transition: all 0.2s ease-in-out;
12
+
13
+ color: $color-dark-soft;
14
+ cursor: default;
15
+
16
+ &--primary {
17
+ background: color.scale($color-primary, $lightness: 90%);
18
+ border: 1px solid color.scale($color-primary, $lightness: 70%);
19
+ color: $color-primary-dark;
20
+ }
21
+
22
+ &--secondary {
23
+ background: color.scale($color-secondary, $lightness: 90%);
24
+ border: 1px solid color.scale($color-secondary, $lightness: 70%);
25
+ color: $color-secondary-dark;
26
+ }
27
+
28
+ &--tertiary {
29
+ background: color.scale($color-tertiary, $lightness: 90%);
30
+ border: 1px solid color.scale($color-tertiary, $lightness: 70%);
31
+ color: $color-tertiary-dark;
32
+ }
33
+
34
+ &--info {
35
+ background: color.scale($color-info, $lightness: 90%);
36
+ border: 1px solid color.scale($color-info, $lightness: 70%);
37
+ color: $color-info-dark;
38
+ }
39
+
40
+ &--warning {
41
+ background: color.scale($color-warning, $lightness: 90%);
42
+ border: 1px solid color.scale($color-warning, $lightness: 70%);
43
+ color: $color-warning-dark;
44
+ }
45
+
46
+ &--danger {
47
+ background: color.scale($color-danger, $lightness: 90%);
48
+ border: 1px solid color.scale($color-danger, $lightness: 70%);
49
+ color: $color-danger-dark;
50
+ }
51
+
52
+ &--success {
53
+ background: color.scale($color-success, $lightness: 90%);
54
+ border: 1px solid color.scale($color-success, $lightness: 70%);
55
+ color: $color-success-dark;
56
+ }
57
+
58
+ &--dark {
59
+ background: $color-dark;
60
+ border: 1px solid color.scale($color-dark, $lightness: -10%);
61
+ color: $color-light;
62
+ }
63
+
64
+ &--light {
65
+ background: $color-light;
66
+ border: 1px solid color.scale($color-dark, $lightness: 85%);
67
+ color: $color-dark;
68
+ }
69
+
70
+ &--sm {
71
+ font-size: 0.875rem;
72
+ padding: 0.1rem 0.5rem;
73
+ }
74
+
75
+ &--md {
76
+ font-size: 1rem;
77
+ padding: 0.15rem 0.75rem;
78
+ }
79
+
80
+ &--lg {
81
+ font-size: 1.125rem;
82
+ padding: 0.2rem 1rem;
83
+ }
84
+
85
+ &__icon {
86
+ display: flex;
87
+ align-items: center;
88
+ font-size: 0.9em;
89
+ }
90
+
91
+ &__label {
92
+ display: inline-block;
93
+ }
94
+
95
+ &__remove {
96
+ color: inherit;
97
+ background: transparent;
98
+ border: none;
99
+ padding: 0;
100
+ margin-left: 0.25rem;
101
+ cursor: pointer;
102
+ font-size: 1.2rem;
103
+ line-height: 1;
104
+ transition: opacity 0.2s ease;
105
+
106
+ &:hover {
107
+ opacity: 0.8;
108
+ }
109
+
110
+ &:focus-visible {
111
+ outline: 2px solid rgba($color-primary, 0.5);
112
+ outline-offset: 2px;
113
+ }
114
+
115
+ &:focus:not(:focus-visible) {
116
+ outline: none;
117
+ }
118
+ }
119
+
120
+ &--disabled {
121
+ background: color.scale($color-dark, $lightness: 92%);
122
+ border: 1px solid color.scale($color-dark, $lightness: 80%);
123
+ color: $color-dark-soft;
124
+ opacity: 0.6;
125
+ cursor: not-allowed;
126
+ pointer-events: none;
127
+
128
+ &:focus {
129
+ outline: none;
130
+ }
131
+
132
+ &__icon,
133
+ &__remove {
134
+ opacity: 0.4;
135
+ pointer-events: none;
136
+ }
137
+ }
138
+
139
+ }
140
+ }
@@ -0,0 +1,47 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+ import { By } from '@angular/platform-browser';
3
+ import { TagComponent } from './tag.component';
4
+
5
+ describe('TagComponent', () => {
6
+ let fixture: ComponentFixture<TagComponent>;
7
+ let component: TagComponent;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ imports: [TagComponent]
12
+ }).compileComponents();
13
+
14
+ fixture = TestBed.createComponent(TagComponent);
15
+ component = fixture.componentInstance;
16
+ });
17
+
18
+ it('renders the label', () => {
19
+ component.label = 'Draft';
20
+
21
+ fixture.detectChanges();
22
+
23
+ const label = fixture.debugElement.query(By.css('.frg-tag__label'));
24
+ expect(label.nativeElement.textContent).toContain('Draft');
25
+ });
26
+
27
+ it('applies disabled class when disabled', () => {
28
+ component.disabled = true;
29
+
30
+ fixture.detectChanges();
31
+
32
+ const host = fixture.debugElement.query(By.css('.frg-tag'));
33
+ expect(host.nativeElement.classList).toContain('frg-tag--disabled');
34
+ });
35
+
36
+ it('emits removed when removable and not disabled', () => {
37
+ const emitSpy = spyOn(component.removed, 'emit');
38
+ component.removable = true;
39
+
40
+ fixture.detectChanges();
41
+
42
+ const removeButton = fixture.debugElement.query(By.css('.frg-tag__remove'));
43
+ removeButton.nativeElement.click();
44
+
45
+ expect(emitSpy).toHaveBeenCalledWith(component.id);
46
+ });
47
+ });
@@ -0,0 +1,83 @@
1
+ import { NgClass } from '@angular/common';
2
+ import { Component, EventEmitter, Input, Output } from '@angular/core';
3
+ import { generateUUID } from '../../../utils/uuid.utils';
4
+ import { Tag, TTagIconPosition, TTagSize, TTagType } from './tag.type';
5
+
6
+ /**
7
+ * TagComponent
8
+ *
9
+ * A small UI element used to display labeled statuses, metadata, or categories.
10
+ * Supports icons, removable behavior, disabled state, and standardized design-
11
+ * system styles and sizes. Implements the shared `Tag` interface to ensure
12
+ * consistency across all status-driven UI components (Tag, Badge, Chip, etc.).
13
+ */
14
+ @Component({
15
+ selector: 'frg-tag',
16
+ templateUrl: './tag.component.html',
17
+ styleUrls: ['./tag.component.scss'],
18
+ imports: [NgClass]
19
+ })
20
+ export class TagComponent implements Tag {
21
+
22
+ /**
23
+ * Unique identifier for the tag.
24
+ * Automatically generated if not provided by the parent.
25
+ * Used primarily for tracking and removal events.
26
+ */
27
+ @Input() id: string = generateUUID();
28
+
29
+ /**
30
+ * Text content displayed inside the tag.
31
+ */
32
+ @Input() label?: string = '';
33
+
34
+ /**
35
+ * Visual style of the tag.
36
+ * Corresponds to design-system status color tokens.
37
+ * Example: 'primary', 'secondary', 'success', 'warning', etc.
38
+ */
39
+ @Input() style: TTagType = 'primary';
40
+
41
+ /**
42
+ * Size variant of the tag.
43
+ * Options follow the standardized sizing tokens: 'sm', 'md', or 'lg'.
44
+ */
45
+ @Input() size: TTagSize = 'md';
46
+
47
+ /**
48
+ * Optional icon class displayed before the label.
49
+ * Example: 'frg-icon-info', 'frg-icon-alert'.
50
+ */
51
+ @Input() icon: string | undefined = undefined;
52
+
53
+ /**
54
+ * Position of the icon
55
+ */
56
+ @Input() iconPosition: TTagIconPosition = 'end';
57
+
58
+ /**
59
+ * Whether the tag is disabled.
60
+ * Disables interactions and applies the disabled visual style.
61
+ */
62
+ @Input() disabled = false;
63
+
64
+ /**
65
+ * If true, displays a remove button allowing the tag to be dismissed.
66
+ */
67
+ @Input() removable = false;
68
+
69
+ /**
70
+ * Emits the ID of the tag when it is removed.
71
+ */
72
+ @Output() removed = new EventEmitter<string>();
73
+
74
+ /**
75
+ * Emits the `removed` event when the remove button is clicked,
76
+ * provided the tag is not disabled and removal is allowed.
77
+ */
78
+ onRemove(): void {
79
+ if (!this.disabled && this.removable) {
80
+ this.removed.emit(this.id);
81
+ }
82
+ }
83
+ }
@@ -0,0 +1,42 @@
1
+ import { StatusIndicator } from "../status.interface";
2
+ import { TBaseStatusIconPosition, TBaseStatusSize, TBaseStatusStyle } from "../status.type";
3
+
4
+ /**
5
+ * TagType
6
+ *
7
+ * Alias for `TBaseStatusStyle`.
8
+ * Represents the visual style of a tag according to the design system.
9
+ * Example: 'primary', 'secondary', 'success', etc.
10
+ */
11
+ export type TTagType = TBaseStatusStyle;
12
+
13
+ /**
14
+ * TagSize
15
+ *
16
+ * Alias for `TBaseStatusSize`.
17
+ * Defines the size of the tag. Options: 'sm', 'md', 'lg'.
18
+ */
19
+ export type TTagSize = TBaseStatusSize;
20
+
21
+ /**
22
+ * TagIconPosition
23
+ *
24
+ * Alias for `TBaseStatusIconPosition`.
25
+ * Defines the icon position of the icon in the tag. Options: 'start' or 'end'.
26
+ */
27
+ export type TTagIconPosition = TBaseStatusIconPosition;
28
+ /**
29
+ * Tag
30
+ *
31
+ * A UI element that extends the shared `StatusIndicator` interface.
32
+ * Represents a labeled status, optionally removable.
33
+ *
34
+ * @extends StatusIndicator
35
+ */
36
+ export interface Tag extends StatusIndicator {
37
+ /**
38
+ * If true, the tag can be removed by the user.
39
+ * Triggers the `removed` event in the component.
40
+ */
41
+ removable?: boolean;
42
+ }
@@ -0,0 +1,83 @@
1
+ <div
2
+ class="frg-stepper"
3
+ [class.is-animated]="animated"
4
+ [attr.data-orientation]="orientation"
5
+ [attr.data-motion]="motion">
6
+ <div class="frg-stepper__header" role="tablist" [attr.aria-orientation]="orientation">
7
+ @for (step of viewSteps; track step.id; let i = $index) {
8
+ <button
9
+ type="button"
10
+ #stepBtn
11
+ class="frg-stepper__step"
12
+ role="tab"
13
+ [class.is-active]="isActive(step.id)"
14
+ [class.is-disabled]="isStepDisabled(step, i)"
15
+ [attr.id]="stepId(step.id)"
16
+ [attr.aria-controls]="panelId(step.id)"
17
+ [attr.aria-selected]="isActive(step.id)"
18
+ [attr.aria-current]="isActive(step.id) ? 'step' : null"
19
+ [attr.aria-disabled]="isStepDisabled(step, i) || null"
20
+ [attr.aria-invalid]="isStepError(step) || null"
21
+ [attr.tabindex]="tabIndexFor(i)"
22
+ [disabled]="isStepDisabled(step, i)"
23
+ (click)="onStepClick(i, $event)"
24
+ (keydown)="onStepKeydown($event, i)">
25
+ <span class="frg-stepper__indicator" [attr.data-status]="stepStatus(step, i)">
26
+ @if (step.indicatorTemplate || indicatorTemplate) {
27
+ <ng-container
28
+ [ngTemplateOutlet]="step.indicatorTemplate || indicatorTemplate"
29
+ [ngTemplateOutletContext]="buildContext(step, i)">
30
+ </ng-container>
31
+ } @else {
32
+ <span class="frg-stepper__indicator-text">{{ indicatorText(step, i) }}</span>
33
+ }
34
+ <span class="frg-stepper__sr">{{ indicatorLabel(step, i) }}</span>
35
+ </span>
36
+ <span class="frg-stepper__label">
37
+ @if (step.labelTemplate || labelTemplate) {
38
+ <ng-container
39
+ [ngTemplateOutlet]="step.labelTemplate || labelTemplate"
40
+ [ngTemplateOutletContext]="buildContext(step, i)">
41
+ </ng-container>
42
+ } @else {
43
+ <span class="frg-stepper__label-text">{{ step.label }}</span>
44
+ @if (step.description) {
45
+ <small class="frg-stepper__label-desc">{{ step.description }}</small>
46
+ }
47
+ @if (step.optional) {
48
+ <span class="frg-stepper__label-optional">Optional</span>
49
+ }
50
+ }
51
+ </span>
52
+ </button>
53
+ @if (i < viewSteps.length - 1) {
54
+ <span class="frg-stepper__connector" [class.is-complete]="isStepComplete(step)" aria-hidden="true"></span>
55
+ }
56
+ }
57
+ </div>
58
+
59
+ <div class="frg-stepper__panels">
60
+ @for (step of viewSteps; track step.id; let i = $index) {
61
+ <section
62
+ class="frg-stepper__panel"
63
+ #panelBody
64
+ role="tabpanel"
65
+ [class.is-active]="isActive(step.id)"
66
+ [attr.id]="panelId(step.id)"
67
+ [attr.aria-labelledby]="stepId(step.id)"
68
+ [hidden]="!isActive(step.id)"
69
+ [attr.tabindex]="isActive(step.id) ? 0 : -1">
70
+ @if (step.contentTemplate || contentTemplate) {
71
+ <ng-container
72
+ [ngTemplateOutlet]="step.contentTemplate || contentTemplate"
73
+ [ngTemplateOutletContext]="buildContext(step, i)">
74
+ </ng-container>
75
+ } @else if (step.content) {
76
+ {{ step.content }}
77
+ } @else if (step.data; as payload) {
78
+ {{ payload }}
79
+ }
80
+ </section>
81
+ }
82
+ </div>
83
+ </div>
@@ -0,0 +1,196 @@
1
+ @use "sass:color";
2
+ @use './../../../../assets/styles/scss/variables' as *;
3
+
4
+ :host {
5
+ display: block;
6
+ font-family: $base-font;
7
+ }
8
+
9
+ .frg-stepper {
10
+ display: flex;
11
+ flex-direction: column;
12
+ gap: 1.25rem;
13
+ --frg-stepper-offset: 10px;
14
+
15
+ &[data-orientation='vertical'] {
16
+ .frg-stepper__header {
17
+ flex-direction: column;
18
+ align-items: stretch;
19
+ gap: 0.65rem;
20
+ }
21
+
22
+ .frg-stepper__step {
23
+ align-items: flex-start;
24
+ }
25
+
26
+ .frg-stepper__connector {
27
+ width: 2px;
28
+ height: 1.5rem;
29
+ margin-left: 1.05rem;
30
+ }
31
+ }
32
+ }
33
+
34
+ .frg-stepper[data-motion='previous'] {
35
+ --frg-stepper-offset: -10px;
36
+ }
37
+
38
+ .frg-stepper__header {
39
+ display: flex;
40
+ align-items: center;
41
+ gap: 0.85rem;
42
+ flex-wrap: wrap;
43
+ }
44
+
45
+ .frg-stepper__step {
46
+ display: inline-flex;
47
+ align-items: center;
48
+ gap: 0.75rem;
49
+ border: none;
50
+ background: transparent;
51
+ cursor: pointer;
52
+ padding: 0.45rem 0.6rem;
53
+ border-radius: 0.65rem;
54
+ color: $color-dark-neutral;
55
+ text-align: left;
56
+ transition:
57
+ color 0.16s ease,
58
+ background-color 0.2s ease,
59
+ box-shadow 0.2s ease;
60
+
61
+ &.is-disabled {
62
+ opacity: 0.6;
63
+ cursor: not-allowed;
64
+ }
65
+
66
+ &:hover:not(.is-disabled) {
67
+ background-color: color.scale($color-light, $lightness: -2%);
68
+ color: $color-dark;
69
+ }
70
+
71
+ &:focus-visible {
72
+ outline: none;
73
+ box-shadow: 0 0 0 2px color.scale($color-primary, $lightness: 32%);
74
+ }
75
+
76
+ &.is-active {
77
+ color: $color-dark;
78
+ }
79
+ }
80
+
81
+ .frg-stepper__indicator {
82
+ position: relative;
83
+ width: 2.1rem;
84
+ height: 2.1rem;
85
+ border-radius: 999px;
86
+ border: 1px solid $color-light-soft;
87
+ display: inline-flex;
88
+ align-items: center;
89
+ justify-content: center;
90
+ background-color: $color-light;
91
+ color: $color-dark;
92
+ font-size: $font-size-xs;
93
+ font-weight: 700;
94
+ line-height: 1;
95
+ flex-shrink: 0;
96
+
97
+ &[data-status='active'] {
98
+ background-color: $color-primary;
99
+ border-color: $color-primary;
100
+ color: $color-light;
101
+ box-shadow: $box-shadow-primary-sm;
102
+ }
103
+
104
+ &[data-status='completed'] {
105
+ background-color: $color-success;
106
+ border-color: $color-success;
107
+ color: $color-light;
108
+ }
109
+
110
+ &[data-status='error'] {
111
+ background-color: $color-danger;
112
+ border-color: $color-danger;
113
+ color: $color-light;
114
+ }
115
+ }
116
+
117
+ .frg-stepper__indicator-text {
118
+ font-size: $font-size-xs;
119
+ text-transform: uppercase;
120
+ }
121
+
122
+ .frg-stepper__label {
123
+ display: flex;
124
+ flex-direction: column;
125
+ gap: 0.1rem;
126
+ }
127
+
128
+ .frg-stepper__label-text {
129
+ font-size: $font-size-sm;
130
+ font-weight: 600;
131
+ line-height: 1.35;
132
+ }
133
+
134
+ .frg-stepper__label-desc {
135
+ font-size: $font-size-2xs;
136
+ color: $color-dark-soft;
137
+ }
138
+
139
+ .frg-stepper__label-optional {
140
+ font-size: $font-size-2xs;
141
+ color: $color-dark-soft;
142
+ text-transform: uppercase;
143
+ letter-spacing: 0.04em;
144
+ }
145
+
146
+ .frg-stepper__connector {
147
+ flex: 1 1 auto;
148
+ height: 2px;
149
+ background-color: $color-light-soft;
150
+ border-radius: 999px;
151
+
152
+ &.is-complete {
153
+ background-color: $color-success;
154
+ }
155
+ }
156
+
157
+ .frg-stepper__panels {
158
+ position: relative;
159
+ }
160
+
161
+ .frg-stepper__panel {
162
+ padding: 0.75rem 0;
163
+ color: $color-dark-neutral;
164
+ outline: none;
165
+ line-height: 1.5;
166
+ opacity: 0;
167
+ transform: translateX(var(--frg-stepper-offset));
168
+
169
+ &.is-active {
170
+ opacity: 1;
171
+ transform: translateX(0);
172
+ }
173
+
174
+ &:focus-visible {
175
+ outline: 2px solid $color-primary;
176
+ outline-offset: 2px;
177
+ }
178
+ }
179
+
180
+ .frg-stepper.is-animated {
181
+ .frg-stepper__panel {
182
+ transition: opacity 0.2s ease, transform 0.2s ease;
183
+ }
184
+ }
185
+
186
+ .frg-stepper__sr {
187
+ position: absolute;
188
+ width: 1px;
189
+ height: 1px;
190
+ padding: 0;
191
+ margin: -1px;
192
+ overflow: hidden;
193
+ clip: rect(0, 0, 0, 0);
194
+ border: 0;
195
+ white-space: nowrap;
196
+ }