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

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 (263) hide show
  1. package/README.md +16 -11
  2. package/assets/styles/scss/_all.scss +0 -1
  3. package/fesm2022/tacdaed-fragments.mjs +8928 -0
  4. package/index.d.ts +3929 -0
  5. package/package.json +34 -22
  6. package/assets/resources/fonts/OpenSans/OpenSans-Italic-VariableFont_wdth_wght.ttf +0 -0
  7. package/assets/resources/fonts/OpenSans/OpenSans-VariableFont_wdth_wght.ttf +0 -0
  8. package/assets/resources/fonts/Roboto/Roboto-Black.ttf +0 -0
  9. package/assets/resources/fonts/Roboto/Roboto-BlackItalic.ttf +0 -0
  10. package/assets/resources/fonts/Roboto/Roboto-Bold.ttf +0 -0
  11. package/assets/resources/fonts/Roboto/Roboto-BoldItalic.ttf +0 -0
  12. package/assets/resources/fonts/Roboto/Roboto-Italic.ttf +0 -0
  13. package/assets/resources/fonts/Roboto/Roboto-Light.ttf +0 -0
  14. package/assets/resources/fonts/Roboto/Roboto-LightItalic.ttf +0 -0
  15. package/assets/resources/fonts/Roboto/Roboto-Medium.ttf +0 -0
  16. package/assets/resources/fonts/Roboto/Roboto-MediumItalic.ttf +0 -0
  17. package/assets/resources/fonts/Roboto/Roboto-Regular.ttf +0 -0
  18. package/assets/resources/fonts/Roboto/Roboto-Thin.ttf +0 -0
  19. package/assets/resources/fonts/Roboto/Roboto-ThinItalic.ttf +0 -0
  20. package/assets/styles/scss/_fonts.scss +0 -122
  21. package/ng-package.json +0 -20
  22. package/src/lib/components/accordion/accordion.component.html +0 -103
  23. package/src/lib/components/accordion/accordion.component.scss +0 -382
  24. package/src/lib/components/accordion/accordion.component.spec.ts +0 -147
  25. package/src/lib/components/accordion/accordion.component.ts +0 -211
  26. package/src/lib/components/accordion/accordion.type.ts +0 -82
  27. package/src/lib/components/breadcrumb/breadcrumb.component.html +0 -43
  28. package/src/lib/components/breadcrumb/breadcrumb.component.scss +0 -112
  29. package/src/lib/components/breadcrumb/breadcrumb.component.spec.ts +0 -33
  30. package/src/lib/components/breadcrumb/breadcrumb.component.ts +0 -103
  31. package/src/lib/components/breadcrumb/breadcrumb.interface.ts +0 -7
  32. package/src/lib/components/button/button.component.html +0 -57
  33. package/src/lib/components/button/button.component.scss +0 -445
  34. package/src/lib/components/button/button.component.spec.ts +0 -99
  35. package/src/lib/components/button/button.component.ts +0 -143
  36. package/src/lib/components/button/button.type.ts +0 -7
  37. package/src/lib/components/card/card.component.html +0 -44
  38. package/src/lib/components/card/card.component.scss +0 -114
  39. package/src/lib/components/card/card.component.spec.ts +0 -65
  40. package/src/lib/components/card/card.component.ts +0 -21
  41. package/src/lib/components/card/card.type.ts +0 -3
  42. package/src/lib/components/code-block/code-block.component.html +0 -55
  43. package/src/lib/components/code-block/code-block.component.scss +0 -122
  44. package/src/lib/components/code-block/code-block.component.spec.ts +0 -81
  45. package/src/lib/components/code-block/code-block.component.ts +0 -302
  46. package/src/lib/components/code-block/code-block.interface.ts +0 -28
  47. package/src/lib/components/code-block/code-block.type.ts +0 -73
  48. package/src/lib/components/decorative/sparkle-field/sparkle-field.component.html +0 -14
  49. package/src/lib/components/decorative/sparkle-field/sparkle-field.component.scss +0 -20
  50. package/src/lib/components/decorative/sparkle-field/sparkle-field.component.spec.ts +0 -38
  51. package/src/lib/components/decorative/sparkle-field/sparkle-field.component.ts +0 -181
  52. package/src/lib/components/input/input-base.ts +0 -187
  53. package/src/lib/components/input/input-calendar/input-calendar.component.html +0 -76
  54. package/src/lib/components/input/input-calendar/input-calendar.component.scss +0 -179
  55. package/src/lib/components/input/input-calendar/input-calendar.component.spec.ts +0 -44
  56. package/src/lib/components/input/input-calendar/input-calendar.component.ts +0 -299
  57. package/src/lib/components/input/input-checkbox/input-checkbox.component.html +0 -37
  58. package/src/lib/components/input/input-checkbox/input-checkbox.component.scss +0 -128
  59. package/src/lib/components/input/input-checkbox/input-checkbox.component.spec.ts +0 -43
  60. package/src/lib/components/input/input-checkbox/input-checkbox.component.ts +0 -112
  61. package/src/lib/components/input/input-checkbox-group/input-checkbox-group.component.html +0 -43
  62. package/src/lib/components/input/input-checkbox-group/input-checkbox-group.component.scss +0 -140
  63. package/src/lib/components/input/input-checkbox-group/input-checkbox-group.component.spec.ts +0 -62
  64. package/src/lib/components/input/input-checkbox-group/input-checkbox-group.component.ts +0 -136
  65. package/src/lib/components/input/input-clock-picker/input-clock-picker.component.html +0 -81
  66. package/src/lib/components/input/input-clock-picker/input-clock-picker.component.scss +0 -228
  67. package/src/lib/components/input/input-clock-picker/input-clock-picker.component.spec.ts +0 -62
  68. package/src/lib/components/input/input-clock-picker/input-clock-picker.component.ts +0 -178
  69. package/src/lib/components/input/input-consts.ts +0 -132
  70. package/src/lib/components/input/input-date/input-date-validators.ts +0 -41
  71. package/src/lib/components/input/input-date/input-date.component.html +0 -41
  72. package/src/lib/components/input/input-date/input-date.component.scss +0 -95
  73. package/src/lib/components/input/input-date/input-date.component.spec.ts +0 -43
  74. package/src/lib/components/input/input-date/input-date.component.ts +0 -359
  75. package/src/lib/components/input/input-date-time/input-date-time.component.html +0 -70
  76. package/src/lib/components/input/input-date-time/input-date-time.component.scss +0 -133
  77. package/src/lib/components/input/input-date-time/input-date-time.component.spec.ts +0 -36
  78. package/src/lib/components/input/input-date-time/input-date-time.component.ts +0 -387
  79. package/src/lib/components/input/input-file-upload/input-file-upload.component.html +0 -89
  80. package/src/lib/components/input/input-file-upload/input-file-upload.component.scss +0 -171
  81. package/src/lib/components/input/input-file-upload/input-file-upload.component.spec.ts +0 -43
  82. package/src/lib/components/input/input-file-upload/input-file-upload.component.ts +0 -351
  83. package/src/lib/components/input/input-interface.ts +0 -8
  84. package/src/lib/components/input/input-number/input-number-validators.ts +0 -0
  85. package/src/lib/components/input/input-number/input-number.component.html +0 -51
  86. package/src/lib/components/input/input-number/input-number.component.scss +0 -140
  87. package/src/lib/components/input/input-number/input-number.component.spec.ts +0 -44
  88. package/src/lib/components/input/input-number/input-number.component.ts +0 -343
  89. package/src/lib/components/input/input-radio-group/input-radio-group.component.html +0 -44
  90. package/src/lib/components/input/input-radio-group/input-radio-group.component.scss +0 -139
  91. package/src/lib/components/input/input-radio-group/input-radio-group.component.spec.ts +0 -58
  92. package/src/lib/components/input/input-radio-group/input-radio-group.component.ts +0 -132
  93. package/src/lib/components/input/input-slider/input-slider.component.html +0 -111
  94. package/src/lib/components/input/input-slider/input-slider.component.scss +0 -203
  95. package/src/lib/components/input/input-slider/input-slider.component.spec.ts +0 -46
  96. package/src/lib/components/input/input-slider/input-slider.component.ts +0 -410
  97. package/src/lib/components/input/input-text/input-text-validators.ts +0 -67
  98. package/src/lib/components/input/input-text/input-text.component.html +0 -71
  99. package/src/lib/components/input/input-text/input-text.component.scss +0 -118
  100. package/src/lib/components/input/input-text/input-text.component.spec.ts +0 -55
  101. package/src/lib/components/input/input-text/input-text.component.ts +0 -215
  102. package/src/lib/components/input/input-time/input-time-validators.ts +0 -42
  103. package/src/lib/components/input/input-time/input-time.component.html +0 -92
  104. package/src/lib/components/input/input-time/input-time.component.scss +0 -191
  105. package/src/lib/components/input/input-time/input-time.component.spec.ts +0 -39
  106. package/src/lib/components/input/input-time/input-time.component.ts +0 -691
  107. package/src/lib/components/input/input-toggle-switch/input-toggle-switch.component.html +0 -36
  108. package/src/lib/components/input/input-toggle-switch/input-toggle-switch.component.scss +0 -121
  109. package/src/lib/components/input/input-toggle-switch/input-toggle-switch.component.spec.ts +0 -54
  110. package/src/lib/components/input/input-toggle-switch/input-toggle-switch.component.ts +0 -117
  111. package/src/lib/components/input/input-type.ts +0 -18
  112. package/src/lib/components/input/input-validation/input-validation.component.html +0 -19
  113. package/src/lib/components/input/input-validation/input-validation.component.scss +0 -39
  114. package/src/lib/components/input/input-validation/input-validation.component.spec.ts +0 -45
  115. package/src/lib/components/input/input-validation/input-validation.component.ts +0 -13
  116. package/src/lib/components/input/input.pipe.ts +0 -14
  117. package/src/lib/components/layout/container/container.component.html +0 -1
  118. package/src/lib/components/layout/container/container.component.scss +0 -33
  119. package/src/lib/components/layout/container/container.component.ts +0 -32
  120. package/src/lib/components/layout/container/container.type.ts +0 -1
  121. package/src/lib/components/layout/divider/divider.component.html +0 -1
  122. package/src/lib/components/layout/divider/divider.component.scss +0 -60
  123. package/src/lib/components/layout/divider/divider.component.ts +0 -38
  124. package/src/lib/components/layout/divider/divider.type.ts +0 -2
  125. package/src/lib/components/layout/section/section.component.html +0 -21
  126. package/src/lib/components/layout/section/section.component.scss +0 -43
  127. package/src/lib/components/layout/section/section.component.ts +0 -33
  128. package/src/lib/components/layout/section/section.type.ts +0 -2
  129. package/src/lib/components/layout/separator/separator.component.html +0 -9
  130. package/src/lib/components/layout/separator/separator.component.scss +0 -52
  131. package/src/lib/components/layout/separator/separator.component.ts +0 -25
  132. package/src/lib/components/layout/separator/separator.type.ts +0 -1
  133. package/src/lib/components/loader/content-blur/content-blur.component.html +0 -13
  134. package/src/lib/components/loader/content-blur/content-blur.component.scss +0 -43
  135. package/src/lib/components/loader/content-blur/content-blur.component.spec.ts +0 -42
  136. package/src/lib/components/loader/content-blur/content-blur.component.ts +0 -34
  137. package/src/lib/components/loader/loader.type.ts +0 -2
  138. package/src/lib/components/loader/progress-bar/progress-bar.component.html +0 -26
  139. package/src/lib/components/loader/progress-bar/progress-bar.component.scss +0 -151
  140. package/src/lib/components/loader/progress-bar/progress-bar.component.spec.ts +0 -47
  141. package/src/lib/components/loader/progress-bar/progress-bar.component.ts +0 -28
  142. package/src/lib/components/loader/progress-bar/progress-bar.type.ts +0 -8
  143. package/src/lib/components/loader/pulse-loader/pulse-loader.component.html +0 -12
  144. package/src/lib/components/loader/pulse-loader/pulse-loader.component.scss +0 -202
  145. package/src/lib/components/loader/pulse-loader/pulse-loader.component.spec.ts +0 -55
  146. package/src/lib/components/loader/pulse-loader/pulse-loader.component.ts +0 -73
  147. package/src/lib/components/loader/pulse-loader/pulse-loader.type.ts +0 -6
  148. package/src/lib/components/loader/skeleton-loader/skeleton-loader.component.html +0 -13
  149. package/src/lib/components/loader/skeleton-loader/skeleton-loader.component.scss +0 -113
  150. package/src/lib/components/loader/skeleton-loader/skeleton-loader.component.spec.ts +0 -37
  151. package/src/lib/components/loader/skeleton-loader/skeleton-loader.component.ts +0 -51
  152. package/src/lib/components/loader/skeleton-loader/skeleton-loader.type.ts +0 -6
  153. package/src/lib/components/loader/spinner/spinner.component.html +0 -20
  154. package/src/lib/components/loader/spinner/spinner.component.scss +0 -137
  155. package/src/lib/components/loader/spinner/spinner.component.spec.ts +0 -43
  156. package/src/lib/components/loader/spinner/spinner.component.ts +0 -32
  157. package/src/lib/components/loader/spinner/spinner.type.ts +0 -6
  158. package/src/lib/components/modal/modal.component.html +0 -47
  159. package/src/lib/components/modal/modal.component.scss +0 -139
  160. package/src/lib/components/modal/modal.component.spec.ts +0 -60
  161. package/src/lib/components/modal/modal.component.ts +0 -83
  162. package/src/lib/components/modal/modal.type.ts +0 -9
  163. package/src/lib/components/morph/blob-moph/blob-moprh.component.spec.ts +0 -79
  164. package/src/lib/components/morph/blob-moph/blob-moprh.component.ts +0 -96
  165. package/src/lib/components/morph/blob-moph/blob-morph.component.html +0 -34
  166. package/src/lib/components/morph/blob-moph/blob-morph.component.scss +0 -7
  167. package/src/lib/components/morph/morph.abstract.ts +0 -13
  168. package/src/lib/components/pagination/pagination.interface.ts +0 -4
  169. package/src/lib/components/pagination/small-pagination/small-pagination.component.html +0 -61
  170. package/src/lib/components/pagination/small-pagination/small-pagination.component.scss +0 -187
  171. package/src/lib/components/pagination/small-pagination/small-pagination.component.spec.ts +0 -88
  172. package/src/lib/components/pagination/small-pagination/small-pagination.component.ts +0 -177
  173. package/src/lib/components/selection-lists/multi-select/multi-select.component.html +0 -170
  174. package/src/lib/components/selection-lists/multi-select/multi-select.component.scss +0 -312
  175. package/src/lib/components/selection-lists/multi-select/multi-select.component.spec.ts +0 -61
  176. package/src/lib/components/selection-lists/multi-select/multi-select.component.ts +0 -372
  177. package/src/lib/components/selection-lists/selection-list/selection-list.component.html +0 -125
  178. package/src/lib/components/selection-lists/selection-list/selection-list.component.scss +0 -267
  179. package/src/lib/components/selection-lists/selection-list/selection-list.component.spec.ts +0 -66
  180. package/src/lib/components/selection-lists/selection-list/selection-list.component.ts +0 -315
  181. package/src/lib/components/selection-lists/selection-lists-base.ts +0 -35
  182. package/src/lib/components/selection-lists/selection-lists-const.ts +0 -17
  183. package/src/lib/components/selection-lists/selection-lists-interface.ts +0 -7
  184. package/src/lib/components/selection-lists/selection-lists.type.ts +0 -1
  185. package/src/lib/components/side-nav/side-nav.component.html +0 -101
  186. package/src/lib/components/side-nav/side-nav.component.scss +0 -295
  187. package/src/lib/components/side-nav/side-nav.component.spec.ts +0 -0
  188. package/src/lib/components/side-nav/side-nav.component.ts +0 -18
  189. package/src/lib/components/side-nav/side-nav.type.ts +0 -28
  190. package/src/lib/components/snackbar/snackbar.component.html +0 -33
  191. package/src/lib/components/snackbar/snackbar.component.scss +0 -195
  192. package/src/lib/components/snackbar/snackbar.component.ts +0 -112
  193. package/src/lib/components/snackbar/snackbar.type.ts +0 -27
  194. package/src/lib/components/status/chip/chip.component.html +0 -51
  195. package/src/lib/components/status/chip/chip.component.scss +0 -149
  196. package/src/lib/components/status/chip/chip.component.spec.ts +0 -62
  197. package/src/lib/components/status/chip/chip.component.ts +0 -83
  198. package/src/lib/components/status/chip/chip.type.ts +0 -42
  199. package/src/lib/components/status/directives/badge/badge.directive.spec.ts +0 -60
  200. package/src/lib/components/status/directives/badge/badge.directive.ts +0 -190
  201. package/src/lib/components/status/directives/badge/badge.interface.ts +0 -19
  202. package/src/lib/components/status/pill/pill.component.html +0 -40
  203. package/src/lib/components/status/pill/pill.component.scss +0 -113
  204. package/src/lib/components/status/pill/pill.component.spec.ts +0 -47
  205. package/src/lib/components/status/pill/pill.component.ts +0 -83
  206. package/src/lib/components/status/pill/pill.type.ts +0 -42
  207. package/src/lib/components/status/status.interface.ts +0 -57
  208. package/src/lib/components/status/status.type.ts +0 -62
  209. package/src/lib/components/status/tag/tag.component.html +0 -39
  210. package/src/lib/components/status/tag/tag.component.scss +0 -140
  211. package/src/lib/components/status/tag/tag.component.spec.ts +0 -47
  212. package/src/lib/components/status/tag/tag.component.ts +0 -83
  213. package/src/lib/components/status/tag/tag.type.ts +0 -42
  214. package/src/lib/components/stepper/stepper.component.html +0 -83
  215. package/src/lib/components/stepper/stepper.component.scss +0 -196
  216. package/src/lib/components/stepper/stepper.component.ts +0 -482
  217. package/src/lib/components/stepper/stepper.type.ts +0 -60
  218. package/src/lib/components/table/table.component.html +0 -438
  219. package/src/lib/components/table/table.component.scss +0 -259
  220. package/src/lib/components/table/table.component.spec.ts +0 -117
  221. package/src/lib/components/table/table.component.ts +0 -215
  222. package/src/lib/components/table/table.enum.ts +0 -4
  223. package/src/lib/components/table/table.function.ts +0 -47
  224. package/src/lib/components/table/table.interface.ts +0 -143
  225. package/src/lib/components/table/table.pipe.ts +0 -62
  226. package/src/lib/components/table/table.type.ts +0 -15
  227. package/src/lib/components/tabs/tabs.component.html +0 -88
  228. package/src/lib/components/tabs/tabs.component.scss +0 -305
  229. package/src/lib/components/tabs/tabs.component.spec.ts +0 -94
  230. package/src/lib/components/tabs/tabs.component.ts +0 -282
  231. package/src/lib/components/tabs/tabs.type.ts +0 -81
  232. package/src/lib/components/title-bar/title-bar.component.html +0 -21
  233. package/src/lib/components/title-bar/title-bar.component.scss +0 -139
  234. package/src/lib/components/title-bar/title-bar.component.spec.ts +0 -44
  235. package/src/lib/components/title-bar/title-bar.component.ts +0 -13
  236. package/src/lib/components/toast/toast.component.html +0 -36
  237. package/src/lib/components/toast/toast.component.scss +0 -241
  238. package/src/lib/components/toast/toast.component.ts +0 -165
  239. package/src/lib/components/toast/toast.type.ts +0 -37
  240. package/src/lib/components/toast-stack/toast-stack.component.html +0 -30
  241. package/src/lib/components/toast-stack/toast-stack.component.scss +0 -35
  242. package/src/lib/components/toast-stack/toast-stack.component.ts +0 -51
  243. package/src/lib/consts/country-prefix.ts +0 -244
  244. package/src/lib/directives/tooltip/popover.directive.ts +0 -274
  245. package/src/lib/directives/tooltip/tooltip.directive.spec.ts +0 -86
  246. package/src/lib/directives/tooltip/tooltip.directive.ts +0 -234
  247. package/src/lib/directives/tooltip/tooltip.interface.ts +0 -29
  248. package/src/lib/directives/tooltip/tooltip.type.ts +0 -9
  249. package/src/lib/interfaces/common.interfaces.ts +0 -4
  250. package/src/lib/pipes/chunk.pipe.ts +0 -16
  251. package/src/lib/pipes/safe-html.pipe.ts +0 -14
  252. package/src/lib/pipes/sanitize-html.pipe.ts +0 -23
  253. package/src/lib/types/base.types.ts +0 -23
  254. package/src/lib/types/common.types.ts +0 -98
  255. package/src/lib/types/form.types.ts +0 -5
  256. package/src/lib/utils/common.utils.ts +0 -53
  257. package/src/lib/utils/date.utils.ts +0 -474
  258. package/src/lib/utils/number.utils.ts +0 -16
  259. package/src/lib/utils/uuid.utils.ts +0 -39
  260. package/src/public-api.ts +0 -114
  261. package/tsconfig.lib.json +0 -17
  262. package/tsconfig.lib.prod.json +0 -10
  263. package/tsconfig.spec.json +0 -9
@@ -1,36 +0,0 @@
1
-
2
- <div class="frg-toggle-switch__wrapper"
3
- [class.input-error]="hasError"
4
- [class.input-warning]="hasWarning"
5
- >
6
- @if(label){
7
- <label [for]="id">{{ label | inputRequiredLabel: required }}</label>
8
- }
9
- <button
10
- type="button"
11
- class="frg-toggle-switch"
12
- [ngClass]="[
13
- 'frg-toggle-switch--' + type,
14
- value ? 'frg-toggle-switch--on' : 'frg-toggle-switch--off',
15
- disabled ? 'disabled' : ''
16
- ]"
17
- [aria-checked]="value"
18
- [disabled]="disabled"
19
- (click)="toggle()"
20
- (keydown)="onKeydown($event)"
21
- >
22
- <span class="handle">
23
- @if (disabled) {
24
- <span class="fas fa-ban"></span>
25
- }
26
- </span>
27
- </button>
28
-
29
- @if(showValidation) {
30
- <frg-input-validation
31
- [errorList]="errorList"
32
- [warningList]="warningList"
33
- [isFormInvalid]="hasError"
34
- ></frg-input-validation>
35
- }
36
- </div>
@@ -1,121 +0,0 @@
1
- @use "sass:color";
2
- @use './../../../../../assets/styles/scss/variables' as *;
3
- @use './../../../../../assets/styles/scss/functions' as *;
4
-
5
- :host {
6
- $switch-width: 40px;
7
- $switch-height: 20px;
8
- $switch-padding: 2px;
9
- $handle-size: $switch-height - ($switch-padding * 2);
10
- $handle-font-ratio: 0.7;
11
- $handle-font-size: $handle-size * $handle-font-ratio;
12
- $handle-font-size-rem: px-to-rem($handle-font-size);
13
- $translate-x: $switch-width - $switch-height;
14
-
15
-
16
- label {
17
- display: flex;
18
- font-size: $font-size-xs;
19
- color: $input-text-color;
20
- }
21
-
22
- .input-error label {
23
- color: $color-danger;
24
- }
25
-
26
- .frg-toggle-switch {
27
- width: $switch-width;
28
- height: $switch-height;
29
- position: relative;
30
- display: inline-block;
31
- background: $color-light-soft;
32
- border-radius: .25rem;
33
- border: none;
34
- padding: 0;
35
- box-shadow: $box-shadow-inner-sm;
36
- box-sizing: content-box;
37
- cursor: pointer;
38
- -webkit-appearance: none;
39
- -moz-appearance: none;
40
- appearance: none;
41
- transition: background 180ms ease, border-color 180ms ease, box-shadow 160ms ease;
42
- vertical-align: middle;
43
- user-select: none;
44
- -webkit-tap-highlight-color: transparent;
45
-
46
- &:focus {
47
- outline: none;
48
- }
49
-
50
- &:focus-visible {
51
- box-shadow: 0 0 0 4px rgba($color-primary, 0.14);
52
- }
53
-
54
- &.disabled {
55
- cursor: not-allowed;
56
- opacity: 0.65;
57
- pointer-events: none;
58
- background: $input-disabled-background;
59
- border-color: $input-disabled-border-color;
60
- }
61
-
62
- &--off {
63
- background: $color-light-soft;
64
- }
65
-
66
- &--on {
67
- background: $color-primary;
68
- border-color: color.scale($color-primary, $lightness: -20%);
69
- }
70
-
71
- .handle {
72
- width: $handle-size;
73
- height: $handle-size;
74
- background: $color-light;
75
- border-radius: .25rem;
76
- position: absolute;
77
- top: $switch-padding;
78
- left: $switch-padding;
79
- box-shadow: $box-shadow-md;
80
- transition: transform 160ms cubic-bezier(.2, .8, .2, 1), box-shadow 120ms ease;
81
- will-change: transform;
82
- display: block;
83
- font-weight: 600;
84
- color: $color-dark-neutral;
85
- text-transform: uppercase;
86
- font-size: $handle-font-size-rem;
87
- }
88
-
89
- &--circle {
90
- border-radius: $switch-height;
91
-
92
- .handle {
93
- border-radius: 50%;
94
- }
95
- }
96
-
97
- &.frg-toggle-switch--on .handle {
98
- transform: translateX($translate-x);
99
- }
100
-
101
- &:not(.disabled):hover .handle {
102
- box-shadow: $box-shadow-md;
103
- }
104
-
105
- &:active .handle {
106
- transform: translateX(0) scale(0.98);
107
- }
108
-
109
- &.frg-toggle-switch--on:active .handle {
110
- transform: translateX($translate-x) scale(0.98);
111
- }
112
-
113
- @media (prefers-reduced-motion: reduce) {
114
-
115
- .handle,
116
- & {
117
- transition: none !important;
118
- }
119
- }
120
- }
121
- }
@@ -1,54 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
- import { By } from '@angular/platform-browser';
3
- import { InputToggleSwitchComponent } from './input-toggle-switch.component';
4
-
5
- describe('InputToggleSwitchComponent', () => {
6
- let fixture: ComponentFixture<InputToggleSwitchComponent>;
7
- let component: InputToggleSwitchComponent;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [InputToggleSwitchComponent]
12
- }).compileComponents();
13
-
14
- fixture = TestBed.createComponent(InputToggleSwitchComponent);
15
- component = fixture.componentInstance;
16
- });
17
-
18
- it('toggles on click', () => {
19
- component.value = false;
20
-
21
- fixture.detectChanges();
22
-
23
- const button = fixture.debugElement.query(By.css('.frg-toggle-switch'));
24
- button.nativeElement.click();
25
- fixture.detectChanges();
26
-
27
- expect(component.value).toBeTrue();
28
- expect(button.nativeElement.classList).toContain('frg-toggle-switch--on');
29
- });
30
-
31
- it('does not toggle when disabled', () => {
32
- component.value = false;
33
- component.disabled = true;
34
-
35
- fixture.detectChanges();
36
-
37
- const button = fixture.debugElement.query(By.css('.frg-toggle-switch'));
38
- button.nativeElement.click();
39
-
40
- expect(component.value).toBeFalse();
41
- });
42
-
43
- it('toggles on Enter key', () => {
44
- component.value = false;
45
-
46
- fixture.detectChanges();
47
-
48
- const button = fixture.debugElement.query(By.css('.frg-toggle-switch'));
49
- button.nativeElement.dispatchEvent(new KeyboardEvent('keydown', { key: 'Enter' }));
50
- fixture.detectChanges();
51
-
52
- expect(component.value).toBeTrue();
53
- });
54
- });
@@ -1,117 +0,0 @@
1
- import { Component, Input } from '@angular/core';
2
- import { InputBase } from '../input-base';
3
- import { DEFAULT_INPUT_TOGGLE_SWITCH_ERROR_MESSAGES, DEFAULT_INPUT_TOGGLE_SWITCH_WARNINGS_MESSAGES } from '../input-consts';
4
- import { InputToggleSwitchType } from '../input-type';
5
- import { InputValidationComponent } from '../input-validation/input-validation.component';
6
- import { InputRequiredLabelPipe } from '../input.pipe';
7
- import { NgClass } from '@angular/common';
8
-
9
- @Component({
10
- selector: 'frg-input-toggle-switch',
11
- imports: [InputRequiredLabelPipe ,InputValidationComponent, NgClass],
12
- templateUrl: './input-toggle-switch.component.html',
13
- styleUrls: ['./input-toggle-switch.component.scss'],
14
- })
15
- export class InputToggleSwitchComponent extends InputBase<boolean> {
16
-
17
- /**
18
- * @inheritdoc
19
- */
20
- @Input() public override label: string = '';
21
- /**
22
- * @inheritdoc
23
- */
24
- @Input() public override required: boolean = false;
25
- /**
26
- * @inheritdoc
27
- */
28
- @Input() public override disabled: boolean = false;
29
- /**
30
- * @inheritdoc
31
- */
32
- @Input() public override errorMessages: Record<string, string> = {};
33
- /**
34
- * @inheritdoc
35
- */
36
- @Input() public override warningMessages: Record<string, string> = {};
37
- /**
38
- * @inheritdoc
39
- */
40
- @Input() public override showValidation: boolean = true;
41
- /**
42
- * The toggle switch type
43
- * @default 'square'
44
- */
45
- @Input() public type: InputToggleSwitchType = 'square';
46
-
47
- /**
48
- * Toggles the switch value
49
- */
50
- public toggle(): void {
51
- if(this.disabled) return;
52
-
53
- this.value = !this.value;
54
- this.onChange(this.value);
55
- this.onTouched();
56
- }
57
-
58
- public onKeydown(event: KeyboardEvent) {
59
- if (this.disabled) return;
60
-
61
- const keys = ['Enter', ' ', 'Spacebar', 'ArrowLeft', 'ArrowRight'];
62
- if (keys.includes(event.key)) {
63
- event.preventDefault();
64
- this.toggle();
65
- }
66
- }
67
-
68
- /**
69
- * @inheritdoc
70
- */
71
- protected updateView(_value: boolean | null): void {
72
- // Handled by Angular binding
73
- }
74
-
75
- /**
76
- * @inheritdoc
77
- */
78
- protected updateDisabledState(_isDisabled: boolean): void {
79
- // Handled by Angular binding
80
- }
81
-
82
- /**
83
- * @inheritdoc
84
- */
85
- protected override get errorList(): string[] {
86
- if (!this.control?.errors) return [];
87
- const errors = this.control.errors;
88
- return Object.keys(errors).map(key => {
89
- if (this.errorMessages[key]) {
90
- return this.errorMessages[key];
91
- }
92
- return DEFAULT_INPUT_TOGGLE_SWITCH_ERROR_MESSAGES[key] || 'Invalid field.';
93
- });
94
- }
95
-
96
- /**
97
- * Returns warning messages. Consumers may pass arbitrary warnings via `warningMessages`.
98
- * Falls back to DEFAULT_INPUT_TOGGLE_SWITCH_WARNINGS_MESSAGES or a generic message.
99
- */
100
- protected override get warningList(): string[] {
101
- return Object.keys(this.warningMessages).map(key => {
102
- return (
103
- this.warningMessages[key] ||
104
- DEFAULT_INPUT_TOGGLE_SWITCH_WARNINGS_MESSAGES[key] ||
105
- ''
106
- );
107
- });
108
- }
109
-
110
- /**
111
- * Returns whether any warnings are active.
112
- */
113
- protected get hasWarning(): boolean {
114
- return this.warningList.length > 0;
115
- }
116
-
117
- }
@@ -1,18 +0,0 @@
1
- export type InputTextType = 'text' | 'email' | 'password' | 'tel' | 'url';
2
- export type InputNumberType = 'number' | 'decimal';
3
- export type InputDateType = 'date' | 'datetime-local';
4
- export type InputTimeType = 'time';
5
- export type InputTimePartial = 'hour' | 'minute' | 'second' | 'meridiem';
6
- export type InputTimeMeridiem = 'AM' | 'PM';
7
- export type InputToggleSwitchType = 'square' | 'circle';
8
- export type InputSliderSize = 'small' | 'medium' | 'big';
9
- export type InputChoiceStyleType =
10
- | 'primary'
11
- | 'secondary'
12
- | 'tertiary'
13
- | 'info'
14
- | 'success'
15
- | 'warning'
16
- | 'danger'
17
- | 'light'
18
- | 'dark';
@@ -1,19 +0,0 @@
1
- @if(errorList.length && isFormInvalid){
2
- <div class="frg-input__error-list">
3
- <ul>
4
- @for(error of errorList; track error){
5
- <li>{{ error }}</li>
6
- }
7
- </ul>
8
- </div>
9
- }
10
-
11
- @if(warningList.length){
12
- <div class="frg-input__warning-list">
13
- <ul>
14
- @for(warning of warningList; track warning){
15
- <li>{{ warning }}</li>
16
- }
17
- </ul>
18
- </div>
19
- }
@@ -1,39 +0,0 @@
1
- @use './../../../../../assets/styles/scss/variables' as *;
2
-
3
- :host {
4
- .frg-input {
5
- &__error-list {
6
- width: 100%;
7
- margin-top: 0.25rem;
8
-
9
- ul {
10
- padding: 0 0 0 1.5rem;
11
- font-size: $font-size-xs;
12
- color: $color-danger;
13
- list-style: square;
14
- margin-bottom: 0;
15
- }
16
-
17
- li {
18
- margin-bottom: 0.25rem;
19
- }
20
- }
21
-
22
- &__warning-list {
23
- width: 100%;
24
- margin-top: 0.25rem;
25
-
26
- ul {
27
- padding: 0 0 0 1.5rem;
28
- font-size: $font-size-xs;
29
- color: $color-warning;
30
- list-style: square;
31
- margin-bottom: 0;
32
- }
33
-
34
- li {
35
- margin-bottom: 0.25rem;
36
- }
37
- }
38
- }
39
- }
@@ -1,45 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
- import { By } from '@angular/platform-browser';
3
- import { InputValidationComponent } from './input-validation.component';
4
-
5
- describe('InputValidationComponent', () => {
6
- let fixture: ComponentFixture<InputValidationComponent>;
7
- let component: InputValidationComponent;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [InputValidationComponent]
12
- }).compileComponents();
13
-
14
- fixture = TestBed.createComponent(InputValidationComponent);
15
- component = fixture.componentInstance;
16
- });
17
-
18
- it('renders error list when form is invalid', () => {
19
- component.errorList = ['Required', 'Too short'];
20
- component.isFormInvalid = true;
21
-
22
- fixture.detectChanges();
23
-
24
- const errors = fixture.debugElement.queryAll(By.css('.frg-input__error-list li'));
25
- expect(errors.length).toBe(2);
26
- });
27
-
28
- it('does not render errors when form is valid', () => {
29
- component.errorList = ['Required'];
30
- component.isFormInvalid = false;
31
-
32
- fixture.detectChanges();
33
-
34
- expect(fixture.debugElement.query(By.css('.frg-input__error-list'))).toBeNull();
35
- });
36
-
37
- it('renders warning list when provided', () => {
38
- component.warningList = ['Check value'];
39
-
40
- fixture.detectChanges();
41
-
42
- const warnings = fixture.debugElement.queryAll(By.css('.frg-input__warning-list li'));
43
- expect(warnings.length).toBe(1);
44
- });
45
- });
@@ -1,13 +0,0 @@
1
- import { Component, Input } from '@angular/core';
2
-
3
- @Component({
4
- selector: 'frg-input-validation',
5
- imports: [],
6
- templateUrl: './input-validation.component.html',
7
- styleUrl: './input-validation.component.scss',
8
- })
9
- export class InputValidationComponent {
10
- @Input() errorList: string[] = [];
11
- @Input() warningList: string[] = [];
12
- @Input() isFormInvalid: boolean = true;
13
- }
@@ -1,14 +0,0 @@
1
- import { Pipe, PipeTransform } from '@angular/core';
2
-
3
- @Pipe({
4
- name: 'inputRequiredLabel',
5
- standalone: true
6
- })
7
- export class InputRequiredLabelPipe implements PipeTransform {
8
- transform(label: string, isRequired: boolean): string {
9
- if (isRequired) {
10
- return `${label} *`;
11
- }
12
- return label;
13
- }
14
- }
@@ -1 +0,0 @@
1
- <ng-content></ng-content>
@@ -1,33 +0,0 @@
1
- :host {
2
- box-sizing: border-box;
3
- display: block;
4
- width: 100%;
5
- }
6
-
7
- :host(.frg-container) {
8
- margin-inline: auto;
9
- }
10
-
11
- :host(.frg-container--padded) {
12
- padding-inline: 1.5rem;
13
- }
14
-
15
- :host(.frg-container--sm) {
16
- max-width: 36rem;
17
- }
18
-
19
- :host(.frg-container--md) {
20
- max-width: 54rem;
21
- }
22
-
23
- :host(.frg-container--lg) {
24
- max-width: 72rem;
25
- }
26
-
27
- :host(.frg-container--xl) {
28
- max-width: 90rem;
29
- }
30
-
31
- :host(.frg-container--full) {
32
- max-width: none;
33
- }
@@ -1,32 +0,0 @@
1
- import { Component, HostBinding, Input } from '@angular/core';
2
- import { TContainerSize } from './container.type';
3
-
4
- @Component({
5
- selector: 'frg-container',
6
- templateUrl: './container.component.html',
7
- styleUrl: './container.component.scss'
8
- })
9
- export class ContainerComponent {
10
- @Input() size: TContainerSize = 'lg';
11
- @Input() padded: boolean = true;
12
-
13
- @HostBinding('class.frg-container') baseClass = true;
14
- @HostBinding('class.frg-container--sm') get isSmall() {
15
- return this.size === 'sm';
16
- }
17
- @HostBinding('class.frg-container--md') get isMedium() {
18
- return this.size === 'md';
19
- }
20
- @HostBinding('class.frg-container--lg') get isLarge() {
21
- return this.size === 'lg';
22
- }
23
- @HostBinding('class.frg-container--xl') get isXLarge() {
24
- return this.size === 'xl';
25
- }
26
- @HostBinding('class.frg-container--full') get isFull() {
27
- return this.size === 'full';
28
- }
29
- @HostBinding('class.frg-container--padded') get isPadded() {
30
- return this.padded;
31
- }
32
- }
@@ -1 +0,0 @@
1
- export type TContainerSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
@@ -1 +0,0 @@
1
- <span class="frg-divider__line" aria-hidden="true"></span>
@@ -1,60 +0,0 @@
1
- @use './../../../../../assets/styles/scss/variables' as *;
2
-
3
- :host {
4
- box-sizing: border-box;
5
- display: block;
6
- }
7
-
8
- :host(.frg-divider--horizontal) {
9
- width: 100%;
10
- }
11
-
12
- :host(.frg-divider--sm.frg-divider--horizontal) {
13
- margin-block: 0.5rem;
14
- }
15
-
16
- :host(.frg-divider--md.frg-divider--horizontal) {
17
- margin-block: 1rem;
18
- }
19
-
20
- :host(.frg-divider--lg.frg-divider--horizontal) {
21
- margin-block: 1.5rem;
22
- }
23
-
24
- :host(.frg-divider--sm.frg-divider--vertical) {
25
- margin-inline: 0.5rem;
26
- }
27
-
28
- :host(.frg-divider--md.frg-divider--vertical) {
29
- margin-inline: 1rem;
30
- }
31
-
32
- :host(.frg-divider--lg.frg-divider--vertical) {
33
- margin-inline: 1.5rem;
34
- }
35
-
36
- .frg-divider__line {
37
- display: block;
38
- width: 100%;
39
- border-color: $color-light-soft;
40
- border-style: solid;
41
- border-width: 0;
42
- }
43
-
44
- :host(.frg-divider--horizontal) .frg-divider__line {
45
- border-top-width: 1px;
46
- }
47
-
48
- :host(.frg-divider--vertical) {
49
- height: 100%;
50
- }
51
-
52
- :host(.frg-divider--vertical) .frg-divider__line {
53
- width: 0;
54
- height: 100%;
55
- border-left-width: 1px;
56
- }
57
-
58
- :host(.frg-divider--dashed) .frg-divider__line {
59
- border-style: dashed;
60
- }
@@ -1,38 +0,0 @@
1
- import { Component, HostBinding, Input } from '@angular/core';
2
- import { TDividerOrientation, TDividerSpacing } from './divider.type';
3
-
4
- @Component({
5
- selector: 'frg-divider',
6
- templateUrl: './divider.component.html',
7
- styleUrl: './divider.component.scss'
8
- })
9
- export class DividerComponent {
10
- @Input() orientation: TDividerOrientation = 'horizontal';
11
- @Input() spacing: TDividerSpacing = 'md';
12
- @Input() dashed: boolean = false;
13
-
14
- @HostBinding('class.frg-divider') baseClass = true;
15
- @HostBinding('class.frg-divider--horizontal') get isHorizontal() {
16
- return this.orientation === 'horizontal';
17
- }
18
- @HostBinding('class.frg-divider--vertical') get isVertical() {
19
- return this.orientation === 'vertical';
20
- }
21
- @HostBinding('class.frg-divider--sm') get isSmall() {
22
- return this.spacing === 'sm';
23
- }
24
- @HostBinding('class.frg-divider--md') get isMedium() {
25
- return this.spacing === 'md';
26
- }
27
- @HostBinding('class.frg-divider--lg') get isLarge() {
28
- return this.spacing === 'lg';
29
- }
30
- @HostBinding('class.frg-divider--dashed') get isDashed() {
31
- return this.dashed;
32
- }
33
-
34
- @HostBinding('attr.role') role = 'separator';
35
- @HostBinding('attr.aria-orientation') get ariaOrientation() {
36
- return this.orientation;
37
- }
38
- }
@@ -1,2 +0,0 @@
1
- export type TDividerOrientation = 'horizontal' | 'vertical';
2
- export type TDividerSpacing = 'sm' | 'md' | 'lg';
@@ -1,21 +0,0 @@
1
- @if (hasHeader) {
2
- <div class="frg-section__header">
3
- @if (title) {
4
- @switch (headingLevel) {
5
- @case (1) { <h1 class="frg-section__title">{{ title }}</h1> }
6
- @case (2) { <h2 class="frg-section__title">{{ title }}</h2> }
7
- @case (3) { <h3 class="frg-section__title">{{ title }}</h3> }
8
- @case (4) { <h4 class="frg-section__title">{{ title }}</h4> }
9
- @case (5) { <h5 class="frg-section__title">{{ title }}</h5> }
10
- @case (6) { <h6 class="frg-section__title">{{ title }}</h6> }
11
- @default { <h2 class="frg-section__title">{{ title }}</h2> }
12
- }
13
- }
14
- @if (description) {
15
- <p class="frg-section__description">{{ description }}</p>
16
- }
17
- </div>
18
- }
19
- <div class="frg-section__content">
20
- <ng-content></ng-content>
21
- </div>