sdga-ui 1.0.2 → 1.0.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 (119) hide show
  1. package/.editorconfig +23 -23
  2. package/.github/workflows/deploy.yml +57 -0
  3. package/.github/workflows/publish.yml +36 -33
  4. package/.prettierignore +73 -73
  5. package/.prettierrc +17 -17
  6. package/LICENSE +21 -21
  7. package/README.md +175 -167
  8. package/css/dga-ui.css +60 -30
  9. package/css/dga-ui.css.map +1 -1
  10. package/demo-angular/.editorconfig +17 -0
  11. package/demo-angular/.vscode/extensions.json +4 -0
  12. package/demo-angular/.vscode/launch.json +20 -0
  13. package/demo-angular/.vscode/tasks.json +42 -0
  14. package/demo-angular/README.md +59 -0
  15. package/demo-angular/angular.json +90 -0
  16. package/demo-angular/package-lock.json +10459 -0
  17. package/demo-angular/package.json +50 -0
  18. package/demo-angular/public/.nojekyll +0 -0
  19. package/demo-angular/public/favicon.ico +0 -0
  20. package/demo-angular/public/i18n/ar.json +239 -0
  21. package/demo-angular/public/i18n/en.json +239 -0
  22. package/demo-angular/src/app/app.config.ts +20 -0
  23. package/demo-angular/src/app/app.html +52 -0
  24. package/demo-angular/src/app/app.routes.ts +45 -0
  25. package/demo-angular/src/app/app.scss +430 -0
  26. package/demo-angular/src/app/app.spec.ts +23 -0
  27. package/demo-angular/src/app/app.ts +88 -0
  28. package/demo-angular/src/app/shared/code-example/code-example.component.html +30 -0
  29. package/demo-angular/src/app/shared/code-example/code-example.component.scss +183 -0
  30. package/demo-angular/src/app/shared/code-example/code-example.component.ts +78 -0
  31. package/demo-angular/src/app/views/alerts/alerts.component.html +155 -0
  32. package/demo-angular/src/app/views/alerts/alerts.component.scss +3 -0
  33. package/demo-angular/src/app/views/alerts/alerts.component.ts +134 -0
  34. package/demo-angular/src/app/views/bootstrap/bootstrap.component.html +14 -0
  35. package/demo-angular/src/app/views/bootstrap/bootstrap.component.scss +91 -0
  36. package/demo-angular/src/app/views/bootstrap/bootstrap.component.ts +23 -0
  37. package/demo-angular/src/app/views/buttons/buttons.component.html +289 -0
  38. package/demo-angular/src/app/views/buttons/buttons.component.scss +14 -0
  39. package/demo-angular/src/app/views/buttons/buttons.component.ts +155 -0
  40. package/demo-angular/src/app/views/cards/cards.component.html +156 -0
  41. package/demo-angular/src/app/views/cards/cards.component.html.backup +156 -0
  42. package/demo-angular/src/app/views/cards/cards.component.scss +11 -0
  43. package/demo-angular/src/app/views/cards/cards.component.ts +194 -0
  44. package/demo-angular/src/app/views/forms/forms.component.html +347 -0
  45. package/demo-angular/src/app/views/forms/forms.component.scss +3 -0
  46. package/demo-angular/src/app/views/forms/forms.component.ts +222 -0
  47. package/demo-angular/src/app/views/home/home.component.html +38 -0
  48. package/demo-angular/src/app/views/home/home.component.scss +35 -0
  49. package/demo-angular/src/app/views/home/home.component.ts +12 -0
  50. package/demo-angular/src/app/views/links/links.component.html +140 -0
  51. package/demo-angular/src/app/views/links/links.component.scss +60 -0
  52. package/demo-angular/src/app/views/links/links.component.ts +123 -0
  53. package/demo-angular/src/app/views/tables/tables.component.html +289 -0
  54. package/demo-angular/src/app/views/tables/tables.component.scss +3 -0
  55. package/demo-angular/src/app/views/tables/tables.component.ts +278 -0
  56. package/demo-angular/src/app/views/toasts/toasts.component.html +201 -0
  57. package/demo-angular/src/app/views/toasts/toasts.component.scss +0 -0
  58. package/demo-angular/src/app/views/toasts/toasts.component.ts +182 -0
  59. package/demo-angular/src/index.html +14 -0
  60. package/demo-angular/src/main.ts +6 -0
  61. package/demo-angular/src/styles.scss +4 -0
  62. package/demo-angular/tsconfig.app.json +15 -0
  63. package/demo-angular/tsconfig.json +33 -0
  64. package/demo-angular/tsconfig.spec.json +15 -0
  65. package/fonts/IBM_Plex_Sans_Arabic/OFL.txt +93 -93
  66. package/package.json +50 -47
  67. package/theme/_fonts.scss +58 -58
  68. package/theme/_functions.scss +11 -11
  69. package/theme/_variables.scss +50 -50
  70. package/theme/components/_accordion.scss +35 -35
  71. package/theme/components/_alerts.scss +11 -11
  72. package/theme/components/_badges.scss +8 -8
  73. package/theme/components/_breadcrumb.scss +13 -13
  74. package/theme/components/_buttons.scss +270 -270
  75. package/theme/components/_cards.scss +21 -21
  76. package/theme/components/_carousel.scss +33 -33
  77. package/theme/components/_content.scss +211 -211
  78. package/theme/components/_dropdowns.scss +45 -45
  79. package/theme/components/_forms-check.scss +124 -124
  80. package/theme/components/_forms-floating.scss +17 -17
  81. package/theme/components/_forms-inputs.scss +70 -70
  82. package/theme/components/_forms-range.scss +26 -26
  83. package/theme/components/_forms-select.scss +47 -47
  84. package/theme/components/_forms-switch.scss +63 -63
  85. package/theme/components/_forms-validation.scss +16 -16
  86. package/theme/components/_forms.scss +14 -14
  87. package/theme/components/_list-group.scss +26 -26
  88. package/theme/components/_modals.scss +42 -42
  89. package/theme/components/_navbar.scss +40 -40
  90. package/theme/components/_navigation.scss +151 -151
  91. package/theme/components/_offcanvas.scss +15 -15
  92. package/theme/components/_overlays.scss +112 -112
  93. package/theme/components/_pagination.scss +39 -39
  94. package/theme/components/_popovers.scss +26 -26
  95. package/theme/components/_progress.scss +11 -11
  96. package/theme/components/_spinners.scss +11 -11
  97. package/theme/components/_tables.scss +47 -47
  98. package/theme/components/_toasts.scss +16 -16
  99. package/theme/components/_tooltips.scss +15 -15
  100. package/theme/config/_base.scss +111 -111
  101. package/theme/config/_colors.scss +303 -303
  102. package/theme/config/_effects.scss +227 -227
  103. package/theme/config/_radius.scss +78 -78
  104. package/theme/config/_spacing.scss +155 -155
  105. package/theme/config/_typography.scss +118 -118
  106. package/theme/customizations/_alerts.scss +242 -242
  107. package/theme/customizations/_badges.scss +15 -15
  108. package/theme/customizations/_buttons.scss +209 -209
  109. package/theme/customizations/_cards.scss +117 -117
  110. package/theme/customizations/_forms-check.scss +278 -278
  111. package/theme/customizations/_forms-inputs.scss +9 -9
  112. package/theme/customizations/_forms-switch.scss +91 -91
  113. package/theme/customizations/_forms.scss +5 -5
  114. package/theme/customizations/_global.scss +25 -25
  115. package/theme/customizations/_links.scss +94 -46
  116. package/theme/customizations/_tables.scss +67 -67
  117. package/theme/customizations/_toasts.scss +221 -221
  118. package/theme/customizations/_utilities.scss +138 -138
  119. package/theme/dga-ui.scss +28 -28
@@ -0,0 +1,347 @@
1
+ <div class="container py-5">
2
+ <h1 class="display-4 mb-4">{{ 'forms.title' | translate }}</h1>
3
+ <p class="lead mb-5">{{ 'forms.subtitle' | translate }}</p>
4
+
5
+ <!-- CHECKBOXES -->
6
+ <section class="mb-5" aria-labelledby="checkboxesHeading">
7
+ <h2 id="checkboxesHeading" class="h4 mb-3">{{ 'forms.checkboxes' | translate }}</h2>
8
+ <div class="d-flex gap-2 mb-2">
9
+ <input type="checkbox" class="form-check-input ripple" id="chkDemoMd" aria-label="Demo checkbox medium" checked>
10
+ <input type="checkbox" class="form-check-input ripple form-check-input-sm" id="chkDemoSm" aria-label="Demo checkbox small" checked>
11
+ <input type="checkbox" class="form-check-input ripple form-check-input-xs" id="chkDemoXs" aria-label="Demo checkbox extra small" checked>
12
+ </div>
13
+ <div class="row g-3">
14
+ <div class="col-md-3">
15
+ <h3 class="h6 mb-2">Primary</h3>
16
+ <div class="form-check form-check-md mb-2">
17
+ <input type="checkbox" class="form-check-input ripple" id="chkPrimaryMd" checked>
18
+ <label class="form-check-label" for="chkPrimaryMd">Medium</label>
19
+ </div>
20
+ <div class="form-check form-check-md mb-2">
21
+ <input type="checkbox" class="form-check-input ripple indeterminate-check" id="chkPrimaryIndeterminateMd">
22
+ <label class="form-check-label" for="chkPrimaryIndeterminateMd">Medium indeterminate</label>
23
+ </div>
24
+ <div class="form-check form-check-sm mb-2">
25
+ <input type="checkbox" class="form-check-input ripple" id="chkPrimarySm" checked>
26
+ <label class="form-check-label" for="chkPrimarySm">Small</label>
27
+ </div>
28
+ <div class="form-check form-check-xs mb-2">
29
+ <input type="checkbox" class="form-check-input ripple" id="chkPrimaryXs" checked>
30
+ <label class="form-check-label" for="chkPrimaryXs">Extra small</label>
31
+ </div>
32
+ </div>
33
+ <div class="col-md-3">
34
+ <h3 class="h6 mb-2">Disabled</h3>
35
+ <div class="form-check form-check-md mb-2">
36
+ <input type="checkbox" class="form-check-input ripple" id="chkDisabledMd" disabled>
37
+ <label class="form-check-label" for="chkDisabledMd">Medium unchecked</label>
38
+ </div>
39
+ <div class="form-check form-check-md mb-2">
40
+ <input type="checkbox" class="form-check-input ripple" id="chkDisabledCheckedMd" checked disabled>
41
+ <label class="form-check-label" for="chkDisabledCheckedMd">Medium checked</label>
42
+ </div>
43
+ <div class="form-check form-check-md mb-2">
44
+ <input type="checkbox" class="form-check-input ripple indeterminate-check" id="chkDisabledIndeterminateMd" disabled>
45
+ <label class="form-check-label" for="chkDisabledIndeterminateMd">Medium indeterminate</label>
46
+ </div>
47
+ <div class="form-check form-check-sm mb-2">
48
+ <input type="checkbox" class="form-check-input ripple" id="chkDisabledSm" disabled>
49
+ <label class="form-check-label" for="chkDisabledSm">Small unchecked</label>
50
+ </div>
51
+ <div class="form-check form-check-xs mb-2">
52
+ <input type="checkbox" class="form-check-input ripple" id="chkDisabledXs" checked disabled>
53
+ <label class="form-check-label" for="chkDisabledXs">Extra small checked</label>
54
+ </div>
55
+ </div>
56
+ <div class="col-md-3">
57
+ <h3 class="h6 mb-2">Readonly</h3>
58
+ <div class="form-check form-check-md mb-2">
59
+ <input type="checkbox" class="form-check-input ripple" id="chkReadonlyMd" readonly>
60
+ <label class="form-check-label" for="chkReadonlyMd">Medium unchecked</label>
61
+ </div>
62
+ <div class="form-check form-check-md mb-2">
63
+ <input type="checkbox" class="form-check-input ripple" id="chkReadonlyCheckedMd" checked readonly>
64
+ <label class="form-check-label" for="chkReadonlyCheckedMd">Medium checked</label>
65
+ </div>
66
+ <div class="form-check form-check-md mb-2">
67
+ <input type="checkbox" class="form-check-input ripple indeterminate-check" id="chkReadonlyIndeterminateMd" readonly>
68
+ <label class="form-check-label" for="chkReadonlyIndeterminateMd">Medium indeterminate</label>
69
+ </div>
70
+ <div class="form-check form-check-sm mb-2">
71
+ <input type="checkbox" class="form-check-input ripple" id="chkReadonlySm" readonly>
72
+ <label class="form-check-label" for="chkReadonlySm">Small unchecked</label>
73
+ </div>
74
+ <div class="form-check form-check-xs mb-2">
75
+ <input type="checkbox" class="form-check-input ripple" id="chkReadonlyXs" checked readonly>
76
+ <label class="form-check-label" for="chkReadonlyXs">Extra small checked</label>
77
+ </div>
78
+ </div>
79
+ <div class="col-md-3">
80
+ <h3 class="h6 mb-2">Neutral</h3>
81
+ <div class="form-check form-check-neutral form-check-md mb-2">
82
+ <input type="checkbox" class="form-check-input ripple" id="chkNeutralMd" checked>
83
+ <label class="form-check-label" for="chkNeutralMd">Medium</label>
84
+ </div>
85
+ <div class="form-check form-check-neutral form-check-md mb-2">
86
+ <input type="checkbox" class="form-check-input ripple indeterminate-check" id="chkNeutralIndeterminateMd">
87
+ <label class="form-check-label" for="chkNeutralIndeterminateMd">Medium indeterminate</label>
88
+ </div>
89
+ <div class="form-check form-check-neutral form-check-sm mb-2">
90
+ <input type="checkbox" class="form-check-input ripple" id="chkNeutralSm" checked>
91
+ <label class="form-check-label" for="chkNeutralSm">Small</label>
92
+ </div>
93
+ <div class="form-check form-check-neutral form-check-xs mb-2">
94
+ <input type="checkbox" class="form-check-input ripple" id="chkNeutralXs" checked>
95
+ <label class="form-check-label" for="chkNeutralXs">Extra small</label>
96
+ </div>
97
+ </div>
98
+ </div>
99
+
100
+ <!-- Code Examples for Checkboxes -->
101
+ <div class="mt-4">
102
+ <h3 class="h6 mb-3">Primary Checkboxes</h3>
103
+ <app-code-example [htmlCode]="checkboxPrimaryCode"></app-code-example>
104
+ </div>
105
+
106
+ <div class="mt-3">
107
+ <h3 class="h6 mb-3">Disabled Checkboxes</h3>
108
+ <app-code-example [htmlCode]="checkboxDisabledCode"></app-code-example>
109
+ </div>
110
+
111
+ <div class="mt-3">
112
+ <h3 class="h6 mb-3">Readonly Checkboxes</h3>
113
+ <app-code-example [htmlCode]="checkboxReadonlyCode"></app-code-example>
114
+ </div>
115
+
116
+ <div class="mt-3">
117
+ <h3 class="h6 mb-3">Neutral Checkboxes</h3>
118
+ <app-code-example [htmlCode]="checkboxNeutralCode"></app-code-example>
119
+ </div>
120
+
121
+ <div class="mt-3">
122
+ <h3 class="h6 mb-3">Indeterminate Checkbox</h3>
123
+ <app-code-example
124
+ [htmlCode]="checkboxIndeterminateHtmlCode"
125
+ [tsCode]="checkboxIndeterminateTsCode">
126
+ </app-code-example>
127
+ </div>
128
+ </section>
129
+
130
+ <!-- RADIOS -->
131
+ <section class="mb-5" aria-labelledby="radiosHeading">
132
+ <h2 id="radiosHeading" class="h4 mb-3">{{ 'forms.radios' | translate }}</h2>
133
+ <div class="d-flex gap-2 mb-2">
134
+ <input class="form-check-input ripple" type="radio" name="radioDemo" id="radDemoMd" aria-label="Demo radio medium" checked>
135
+ <input class="form-check-input form-check-input-sm ripple" type="radio" name="radioDemo" id="radDemoSm" aria-label="Demo radio small">
136
+ <input class="form-check-input form-check-input-xs ripple" type="radio" name="radioDemo" id="radDemoXs" aria-label="Demo radio extra small">
137
+ </div>
138
+ <div class="row g-3">
139
+ <div class="col-md-3">
140
+ <h3 class="h6 mb-2">Primary</h3>
141
+ <div class="form-check form-check-md mb-2">
142
+ <input class="form-check-input ripple" type="radio" name="radioPrimaryGroup" id="radPrimaryCheckedMd" checked>
143
+ <label class="form-check-label" for="radPrimaryCheckedMd">Medium</label>
144
+ </div>
145
+ <div class="form-check form-check-sm mb-2">
146
+ <input class="form-check-input ripple" type="radio" name="radioPrimaryGroup" id="radPrimaryCheckedSm">
147
+ <label class="form-check-label" for="radPrimaryCheckedSm">Small</label>
148
+ </div>
149
+ <div class="form-check form-check-xs mb-2">
150
+ <input class="form-check-input ripple" type="radio" name="radioPrimaryGroup" id="radPrimaryCheckedXs">
151
+ <label class="form-check-label" for="radPrimaryCheckedXs">Extra small</label>
152
+ </div>
153
+ </div>
154
+ <div class="col-md-3">
155
+ <h3 class="h6 mb-2">Disabled</h3>
156
+ <div class="form-check form-check-md mb-2">
157
+ <input class="form-check-input ripple" type="radio" name="radioDisabled" id="radDisabledMd" disabled>
158
+ <label class="form-check-label" for="radDisabledMd">Medium unchecked</label>
159
+ </div>
160
+ <div class="form-check form-check-md mb-2">
161
+ <input class="form-check-input ripple" type="radio" name="radioDisabled" id="radDisabledCheckedMd" checked disabled>
162
+ <label class="form-check-label" for="radDisabledCheckedMd">Medium checked</label>
163
+ </div>
164
+ <div class="form-check form-check-sm mb-2">
165
+ <input class="form-check-input ripple" type="radio" name="radioDisabled" id="radDisabledSm" disabled>
166
+ <label class="form-check-label" for="radDisabledSm">Small unchecked</label>
167
+ </div>
168
+ <div class="form-check form-check-xs mb-2">
169
+ <input class="form-check-input ripple" type="radio" name="radioDisabled" id="radDisabledXs" checked disabled>
170
+ <label class="form-check-label" for="radDisabledXs">Extra small checked</label>
171
+ </div>
172
+ </div>
173
+ <div class="col-md-3">
174
+ <h3 class="h6 mb-2">Readonly</h3>
175
+ <div class="form-check form-check-md mb-2">
176
+ <input class="form-check-input ripple" type="radio" name="radioReadonly" id="radReadonlyMd" readonly>
177
+ <label class="form-check-label" for="radReadonlyMd">Medium unchecked</label>
178
+ </div>
179
+ <div class="form-check form-check-md mb-2">
180
+ <input class="form-check-input ripple" type="radio" name="radioReadonly" id="radReadonlyCheckedMd" checked readonly>
181
+ <label class="form-check-label" for="radReadonlyCheckedMd">Medium checked</label>
182
+ </div>
183
+ <div class="form-check form-check-sm mb-2">
184
+ <input class="form-check-input ripple" type="radio" name="radioReadonly" id="radReadonlySm" readonly>
185
+ <label class="form-check-label" for="radReadonlySm">Small unchecked</label>
186
+ </div>
187
+ <div class="form-check form-check-xs mb-2">
188
+ <input class="form-check-input ripple" type="radio" name="radioReadonly" id="radReadonlyXs" checked readonly>
189
+ <label class="form-check-label" for="radReadonlyXs">Extra small checked</label>
190
+ </div>
191
+ </div>
192
+ <div class="col-md-3">
193
+ <h3 class="h6 mb-2">Neutral</h3>
194
+ <div class="form-check form-check-neutral form-check-md mb-2">
195
+ <input class="form-check-input ripple" type="radio" name="radioNeutral" id="radNeutralMd" checked>
196
+ <label class="form-check-label" for="radNeutralMd">Medium</label>
197
+ </div>
198
+ <div class="form-check form-check-neutral form-check-sm mb-2">
199
+ <input class="form-check-input ripple" type="radio" name="radioNeutral" id="radNeutralSm">
200
+ <label class="form-check-label" for="radNeutralSm">Small</label>
201
+ </div>
202
+ <div class="form-check form-check-neutral form-check-xs mb-2">
203
+ <input class="form-check-input ripple" type="radio" name="radioNeutral" id="radNeutralXs">
204
+ <label class="form-check-label" for="radNeutralXs">Extra small</label>
205
+ </div>
206
+ </div>
207
+ </div>
208
+
209
+ <!-- Code Examples for Radios -->
210
+ <div class="mt-4">
211
+ <h3 class="h6 mb-3">Primary Radio Buttons</h3>
212
+ <app-code-example [htmlCode]="radioPrimaryCode"></app-code-example>
213
+ </div>
214
+
215
+ <div class="mt-3">
216
+ <h3 class="h6 mb-3">Disabled Radio Buttons</h3>
217
+ <app-code-example [htmlCode]="radioDisabledCode"></app-code-example>
218
+ </div>
219
+
220
+ <div class="mt-3">
221
+ <h3 class="h6 mb-3">Readonly Radio Buttons</h3>
222
+ <app-code-example [htmlCode]="radioReadonlyCode"></app-code-example>
223
+ </div>
224
+
225
+ <div class="mt-3">
226
+ <h3 class="h6 mb-3">Neutral Radio Buttons</h3>
227
+ <app-code-example [htmlCode]="radioNeutralCode"></app-code-example>
228
+ </div>
229
+ </section>
230
+
231
+ <!-- SWITCHES -->
232
+ <div class="d-flex gap-2 justify-content-between">
233
+ <section class="mb-5" aria-labelledby="switchesHeading">
234
+ <h2 id="switchesHeading" class="h4 mb-3">{{ 'forms.switches' | translate }}</h2>
235
+ <div class="form-check form-switch mb-2">
236
+ <input class="form-check-input" type="checkbox" role="switch" id="switchDefault">
237
+ <label class="form-check-label" for="switchDefault">{{ 'forms.switch_default' | translate }}</label>
238
+ </div>
239
+ <div class="form-check form-switch mb-2">
240
+ <input class="form-check-input" type="checkbox" role="switch" id="switchDisabled" disabled>
241
+ <label class="form-check-label" for="switchDisabled">{{ 'forms.switch_disabled' | translate }}</label>
242
+ </div>
243
+ <div class="form-check form-switch mb-2">
244
+ <input class="form-check-input" checked type="checkbox" role="switch" id="switchDefault">
245
+ <label class="form-check-label" for="switchDefault">{{ 'forms.switch_checked' | translate }}</label>
246
+ </div>
247
+ <div class="form-check form-switch mb-2">
248
+ <input class="form-check-input" checked type="checkbox" role="switch" id="switchDisabled" disabled>
249
+ <label class="form-check-label" for="switchDisabled">{{ 'forms.switch_disabled' | translate }}</label>
250
+ </div>
251
+
252
+ <!-- Code Example for Switches -->
253
+ <div class="mt-4">
254
+ <h3 class="h6 mb-3">Switch Examples</h3>
255
+ <app-code-example [htmlCode]="switchCode"></app-code-example>
256
+ </div>
257
+ </section>
258
+ </div>
259
+ <!-- TEXT INPUTS -->
260
+ <section class="mb-5" aria-labelledby="textInputsHeading">
261
+ <h2 id="textInputsHeading" class="h4 mb-3">{{ 'forms.text_inputs' | translate }}</h2>
262
+ <div class="mb-3">
263
+ <label for="exampleInputEmail1" class="form-label">Email address</label>
264
+ <input type="email" class="form-control" id="exampleInputEmail1" placeholder="name@example.com">
265
+ <div class="form-text">We'll never share your email with anyone else.</div>
266
+ </div>
267
+ <div class="mb-3">
268
+ <label for="exampleInputPassword1" class="form-label">Password</label>
269
+ <input type="password" class="form-control" id="exampleInputPassword1">
270
+ </div>
271
+ <div class="mb-3">
272
+ <label for="exampleFormControlTextarea1" class="form-label">Textarea</label>
273
+ <textarea class="form-control" id="exampleFormControlTextarea1" rows="3"></textarea>
274
+ </div>
275
+
276
+ <!-- Code Examples for Text Inputs -->
277
+ <div class="mt-4">
278
+ <h3 class="h6 mb-3">Email Input</h3>
279
+ <app-code-example [htmlCode]="textInputEmailCode"></app-code-example>
280
+ </div>
281
+
282
+ <div class="mt-3">
283
+ <h3 class="h6 mb-3">Password Input</h3>
284
+ <app-code-example [htmlCode]="textInputPasswordCode"></app-code-example>
285
+ </div>
286
+
287
+ <div class="mt-3">
288
+ <h3 class="h6 mb-3">Textarea</h3>
289
+ <app-code-example [htmlCode]="textInputTextareaCode"></app-code-example>
290
+ </div>
291
+ </section>
292
+
293
+ <!-- SELECT -->
294
+ <section class="mb-5" aria-labelledby="selectHeading">
295
+ <h2 id="selectHeading" class="h4 mb-3">{{ 'forms.select' | translate }}</h2>
296
+ <div class="mb-3">
297
+ <label for="exampleSelect" class="form-label">Example select</label>
298
+ <select class="form-select" id="exampleSelect">
299
+ <option selected>Open this select menu</option>
300
+ <option value="1">One</option>
301
+ <option value="2">Two</option>
302
+ <option value="3">Three</option>
303
+ </select>
304
+ </div>
305
+
306
+ <!-- Code Example for Select -->
307
+ <div class="mt-4">
308
+ <h3 class="h6 mb-3">Select Dropdown</h3>
309
+ <app-code-example [htmlCode]="selectCode"></app-code-example>
310
+ </div>
311
+ </section>
312
+
313
+ <!-- RANGE -->
314
+ <section class="mb-5" aria-labelledby="rangeHeading">
315
+ <h2 id="rangeHeading" class="h4 mb-3">{{ 'forms.range' | translate }}</h2>
316
+ <div class="mb-3">
317
+ <label for="customRange" class="form-label">Example range</label>
318
+ <input type="range" class="form-range" id="customRange">
319
+ </div>
320
+
321
+ <!-- Code Example for Range -->
322
+ <div class="mt-4">
323
+ <h3 class="h6 mb-3">Range Slider</h3>
324
+ <app-code-example [htmlCode]="rangeCode"></app-code-example>
325
+ </div>
326
+ </section>
327
+
328
+ <!-- INPUT SIZES -->
329
+ <section class="mb-5" aria-labelledby="sizesHeading">
330
+ <h2 id="sizesHeading" class="h4 mb-3">{{ 'forms.input_sizes' | translate }}</h2>
331
+ <input class="form-control form-control-lg mb-2" type="text" placeholder="Large input" aria-label="Large input">
332
+ <input class="form-control mb-2" type="text" placeholder="Default input" aria-label="Default input">
333
+ <input class="form-control form-control-sm" type="text" placeholder="Small input" aria-label="Small input">
334
+
335
+ <!-- Code Example for Input Sizes -->
336
+ <div class="mt-4">
337
+ <h3 class="h6 mb-3">Input Size Variations</h3>
338
+ <app-code-example [htmlCode]="inputSizesCode"></app-code-example>
339
+ </div>
340
+ </section>
341
+
342
+ <!-- FORM ACTION -->
343
+ <section class="mb-5" aria-labelledby="actionsHeading">
344
+ <h2 id="actionsHeading" class="h4 mb-3">{{ 'forms.actions' | translate }}</h2>
345
+ <button type="button" class="btn btn-primary">Submit</button>
346
+ </section>
347
+ </div>
@@ -0,0 +1,3 @@
1
+ .demo-section {
2
+ margin-bottom: 4rem;
3
+ }
@@ -0,0 +1,222 @@
1
+ import { Component, ChangeDetectionStrategy, AfterViewInit, inject, PLATFORM_ID, viewChild, ElementRef } from '@angular/core';
2
+ import { isPlatformBrowser } from '@angular/common';
3
+ import { TranslateModule } from '@ngx-translate/core';
4
+ import { CodeExampleComponent } from '../../shared/code-example/code-example.component';
5
+
6
+ @Component({
7
+ selector: 'app-forms',
8
+ imports: [TranslateModule, CodeExampleComponent],
9
+ templateUrl: './forms.component.html',
10
+ styleUrl: './forms.component.scss',
11
+ changeDetection: ChangeDetectionStrategy.OnPush
12
+ })
13
+ export class FormsComponent implements AfterViewInit {
14
+ private readonly platformId = inject(PLATFORM_ID);
15
+
16
+ // Checkbox examples
17
+ checkboxPrimaryCode = `<div class="form-check form-check-md mb-2">
18
+ <input type="checkbox" class="form-check-input ripple" id="chkPrimaryMd" checked>
19
+ <label class="form-check-label" for="chkPrimaryMd">Medium</label>
20
+ </div>
21
+ <div class="form-check form-check-sm mb-2">
22
+ <input type="checkbox" class="form-check-input ripple" id="chkPrimarySm" checked>
23
+ <label class="form-check-label" for="chkPrimarySm">Small</label>
24
+ </div>
25
+ <div class="form-check form-check-xs mb-2">
26
+ <input type="checkbox" class="form-check-input ripple" id="chkPrimaryXs" checked>
27
+ <label class="form-check-label" for="chkPrimaryXs">Extra small</label>
28
+ </div>`;
29
+
30
+ checkboxDisabledCode = `<div class="form-check form-check-md mb-2">
31
+ <input type="checkbox" class="form-check-input ripple" id="chkDisabledMd" disabled>
32
+ <label class="form-check-label" for="chkDisabledMd">Medium unchecked</label>
33
+ </div>
34
+ <div class="form-check form-check-md mb-2">
35
+ <input type="checkbox" class="form-check-input ripple" id="chkDisabledCheckedMd" checked disabled>
36
+ <label class="form-check-label" for="chkDisabledCheckedMd">Medium checked</label>
37
+ </div>
38
+ <div class="form-check form-check-sm mb-2">
39
+ <input type="checkbox" class="form-check-input ripple" id="chkDisabledSm" disabled>
40
+ <label class="form-check-label" for="chkDisabledSm">Small unchecked</label>
41
+ </div>`;
42
+
43
+ checkboxReadonlyCode = `<div class="form-check form-check-md mb-2">
44
+ <input type="checkbox" class="form-check-input ripple" id="chkReadonlyMd" readonly>
45
+ <label class="form-check-label" for="chkReadonlyMd">Medium unchecked</label>
46
+ </div>
47
+ <div class="form-check form-check-md mb-2">
48
+ <input type="checkbox" class="form-check-input ripple" id="chkReadonlyCheckedMd" checked readonly>
49
+ <label class="form-check-label" for="chkReadonlyCheckedMd">Medium checked</label>
50
+ </div>
51
+ <div class="form-check form-check-sm mb-2">
52
+ <input type="checkbox" class="form-check-input ripple" id="chkReadonlySm" readonly>
53
+ <label class="form-check-label" for="chkReadonlySm">Small unchecked</label>
54
+ </div>`;
55
+
56
+ checkboxNeutralCode = `<div class="form-check form-check-neutral form-check-md mb-2">
57
+ <input type="checkbox" class="form-check-input ripple" id="chkNeutralMd" checked>
58
+ <label class="form-check-label" for="chkNeutralMd">Medium</label>
59
+ </div>
60
+ <div class="form-check form-check-neutral form-check-sm mb-2">
61
+ <input type="checkbox" class="form-check-input ripple" id="chkNeutralSm" checked>
62
+ <label class="form-check-label" for="chkNeutralSm">Small</label>
63
+ </div>
64
+ <div class="form-check form-check-neutral form-check-xs mb-2">
65
+ <input type="checkbox" class="form-check-input ripple" id="chkNeutralXs" checked>
66
+ <label class="form-check-label" for="chkNeutralXs">Extra small</label>
67
+ </div>`;
68
+
69
+ // Indeterminate checkbox example
70
+ checkboxIndeterminateHtmlCode = `<div class="form-check form-check-md mb-2">
71
+ <input type="checkbox" class="form-check-input ripple" id="chkIndeterminate" #indeterminateCheckbox>
72
+ <label class="form-check-label" for="chkIndeterminate">Indeterminate checkbox</label>
73
+ </div>`;
74
+
75
+ checkboxIndeterminateTsCode = `import { Component, ViewChild, ElementRef, AfterViewInit } from '@angular/core';
76
+
77
+ @Component({
78
+ selector: 'app-example',
79
+ templateUrl: './example.component.html'
80
+ })
81
+ export class ExampleComponent implements AfterViewInit {
82
+ @ViewChild('indeterminateCheckbox') indeterminateCheckbox!: ElementRef<HTMLInputElement>;
83
+
84
+ ngAfterViewInit(): void {
85
+ // Set checkbox to indeterminate state
86
+ if (this.indeterminateCheckbox) {
87
+ this.indeterminateCheckbox.nativeElement.indeterminate = true;
88
+ }
89
+ }
90
+ }
91
+
92
+ // Alternative approach using direct DOM query
93
+ ngAfterViewInit(): void {
94
+ const checkbox = document.getElementById('chkIndeterminate') as HTMLInputElement;
95
+ if (checkbox) {
96
+ checkbox.indeterminate = true;
97
+ }
98
+ }`;
99
+
100
+ // Radio button examples
101
+ radioPrimaryCode = `<div class="form-check form-check-md mb-2">
102
+ <input class="form-check-input ripple" type="radio" name="radioPrimaryGroup" id="radPrimaryCheckedMd" checked>
103
+ <label class="form-check-label" for="radPrimaryCheckedMd">Medium</label>
104
+ </div>
105
+ <div class="form-check form-check-sm mb-2">
106
+ <input class="form-check-input ripple" type="radio" name="radioPrimaryGroup" id="radPrimaryCheckedSm">
107
+ <label class="form-check-label" for="radPrimaryCheckedSm">Small</label>
108
+ </div>
109
+ <div class="form-check form-check-xs mb-2">
110
+ <input class="form-check-input ripple" type="radio" name="radioPrimaryGroup" id="radPrimaryCheckedXs">
111
+ <label class="form-check-label" for="radPrimaryCheckedXs">Extra small</label>
112
+ </div>`;
113
+
114
+ radioDisabledCode = `<div class="form-check form-check-md mb-2">
115
+ <input class="form-check-input ripple" type="radio" name="radioDisabled" id="radDisabledMd" disabled>
116
+ <label class="form-check-label" for="radDisabledMd">Medium unchecked</label>
117
+ </div>
118
+ <div class="form-check form-check-md mb-2">
119
+ <input class="form-check-input ripple" type="radio" name="radioDisabled" id="radDisabledCheckedMd" checked disabled>
120
+ <label class="form-check-label" for="radDisabledCheckedMd">Medium checked</label>
121
+ </div>
122
+ <div class="form-check form-check-sm mb-2">
123
+ <input class="form-check-input ripple" type="radio" name="radioDisabled" id="radDisabledSm" disabled>
124
+ <label class="form-check-label" for="radDisabledSm">Small unchecked</label>
125
+ </div>`;
126
+
127
+ radioReadonlyCode = `<div class="form-check form-check-md mb-2">
128
+ <input class="form-check-input ripple" type="radio" name="radioReadonly" id="radReadonlyMd" readonly>
129
+ <label class="form-check-label" for="radReadonlyMd">Medium unchecked</label>
130
+ </div>
131
+ <div class="form-check form-check-md mb-2">
132
+ <input class="form-check-input ripple" type="radio" name="radioReadonly" id="radReadonlyCheckedMd" checked readonly>
133
+ <label class="form-check-label" for="radReadonlyCheckedMd">Medium checked</label>
134
+ </div>
135
+ <div class="form-check form-check-sm mb-2">
136
+ <input class="form-check-input ripple" type="radio" name="radioReadonly" id="radReadonlySm" readonly>
137
+ <label class="form-check-label" for="radReadonlySm">Small unchecked</label>
138
+ </div>`;
139
+
140
+ radioNeutralCode = `<div class="form-check form-check-neutral form-check-md mb-2">
141
+ <input class="form-check-input ripple" type="radio" name="radioNeutral" id="radNeutralMd" checked>
142
+ <label class="form-check-label" for="radNeutralMd">Medium</label>
143
+ </div>
144
+ <div class="form-check form-check-neutral form-check-sm mb-2">
145
+ <input class="form-check-input ripple" type="radio" name="radioNeutral" id="radNeutralSm">
146
+ <label class="form-check-label" for="radNeutralSm">Small</label>
147
+ </div>
148
+ <div class="form-check form-check-neutral form-check-xs mb-2">
149
+ <input class="form-check-input ripple" type="radio" name="radioNeutral" id="radNeutralXs">
150
+ <label class="form-check-label" for="radNeutralXs">Extra small</label>
151
+ </div>`;
152
+
153
+ // Switch examples
154
+ switchCode = `<div class="form-check form-switch mb-2">
155
+ <input class="form-check-input" type="checkbox" role="switch" id="switchDefault">
156
+ <label class="form-check-label" for="switchDefault">Default switch</label>
157
+ </div>
158
+ <div class="form-check form-switch mb-2">
159
+ <input class="form-check-input" type="checkbox" role="switch" id="switchDisabled" disabled>
160
+ <label class="form-check-label" for="switchDisabled">Disabled switch</label>
161
+ </div>
162
+ <div class="form-check form-switch mb-2">
163
+ <input class="form-check-input" checked type="checkbox" role="switch" id="switchChecked">
164
+ <label class="form-check-label" for="switchChecked">Checked switch</label>
165
+ </div>
166
+ <div class="form-check form-switch mb-2">
167
+ <input class="form-check-input" checked type="checkbox" role="switch" id="switchDisabledChecked" disabled>
168
+ <label class="form-check-label" for="switchDisabledChecked">Disabled checked switch</label>
169
+ </div>`;
170
+
171
+ // Text input examples
172
+ textInputEmailCode = `<div class="mb-3">
173
+ <label for="exampleInputEmail1" class="form-label">Email address</label>
174
+ <input type="email" class="form-control" id="exampleInputEmail1" placeholder="name@example.com">
175
+ <div class="form-text">We'll never share your email with anyone else.</div>
176
+ </div>`;
177
+
178
+ textInputPasswordCode = `<div class="mb-3">
179
+ <label for="exampleInputPassword1" class="form-label">Password</label>
180
+ <input type="password" class="form-control" id="exampleInputPassword1">
181
+ </div>`;
182
+
183
+ textInputTextareaCode = `<div class="mb-3">
184
+ <label for="exampleFormControlTextarea1" class="form-label">Textarea</label>
185
+ <textarea class="form-control" id="exampleFormControlTextarea1" rows="3"></textarea>
186
+ </div>`;
187
+
188
+ // Select dropdown example
189
+ selectCode = `<div class="mb-3">
190
+ <label for="exampleSelect" class="form-label">Example select</label>
191
+ <select class="form-select" id="exampleSelect">
192
+ <option selected>Open this select menu</option>
193
+ <option value="1">One</option>
194
+ <option value="2">Two</option>
195
+ <option value="3">Three</option>
196
+ </select>
197
+ </div>`;
198
+
199
+ // Range slider example
200
+ rangeCode = `<div class="mb-3">
201
+ <label for="customRange" class="form-label">Example range</label>
202
+ <input type="range" class="form-range" id="customRange">
203
+ </div>`;
204
+
205
+ // Input size variations
206
+ inputSizesCode = `<input class="form-control form-control-lg mb-2" type="text" placeholder="Large input" aria-label="Large input">
207
+ <input class="form-control mb-2" type="text" placeholder="Default input" aria-label="Default input">
208
+ <input class="form-control form-control-sm" type="text" placeholder="Small input" aria-label="Small input">`;
209
+
210
+ ngAfterViewInit(): void {
211
+ if (isPlatformBrowser(this.platformId)) {
212
+ queueMicrotask(() => {
213
+ document.querySelectorAll('[type="checkbox"]').forEach((checkbox: any) => {
214
+ if (checkbox.id.includes('Indeterminate')) {
215
+ checkbox.indeterminate = true
216
+ console.log(checkbox)
217
+ }
218
+ })
219
+ });
220
+ }
221
+ }
222
+ }
@@ -0,0 +1,38 @@
1
+ <div class="container py-5">
2
+ <div class="hero-section text-center mb-5">
3
+ <h1 class="display-1 mb-4">{{ 'home.title' | translate }}</h1>
4
+ <p class="lead mb-5">{{ 'home.subtitle' | translate }}</p>
5
+ </div>
6
+
7
+ <div class="components-grid">
8
+ <a routerLink="/alerts" class="component-card">
9
+ <h3>{{ 'nav.alerts' | translate }}</h3>
10
+ <p>{{ 'home.alerts_desc' | translate }}</p>
11
+ </a>
12
+
13
+ <a routerLink="/buttons" class="component-card">
14
+ <h3>{{ 'nav.buttons' | translate }}</h3>
15
+ <p>{{ 'home.buttons_desc' | translate }}</p>
16
+ </a>
17
+
18
+ <a routerLink="/cards" class="component-card">
19
+ <h3>{{ 'nav.cards' | translate }}</h3>
20
+ <p>{{ 'home.cards_desc' | translate }}</p>
21
+ </a>
22
+
23
+ <a routerLink="/forms" class="component-card">
24
+ <h3>{{ 'nav.forms' | translate }}</h3>
25
+ <p>{{ 'home.forms_desc' | translate }}</p>
26
+ </a>
27
+
28
+ <a routerLink="/tables" class="component-card">
29
+ <h3>{{ 'nav.tables' | translate }}</h3>
30
+ <p>{{ 'home.tables_desc' | translate }}</p>
31
+ </a>
32
+
33
+ <a routerLink="/utilities" class="component-card">
34
+ <h3>{{ 'nav.utilities' | translate }}</h3>
35
+ <p>{{ 'home.utilities_desc' | translate }}</p>
36
+ </a>
37
+ </div>
38
+ </div>
@@ -0,0 +1,35 @@
1
+ .hero-section {
2
+ padding: 4rem 0;
3
+ }
4
+
5
+ .components-grid {
6
+ display: grid;
7
+ grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
8
+ gap: 2rem;
9
+ margin-top: 3rem;
10
+ }
11
+
12
+ .component-card {
13
+ padding: 2rem;
14
+ background: white;
15
+ border-radius: 1rem;
16
+ text-decoration: none;
17
+ color: inherit;
18
+ box-shadow: 0 4px 8px -2px rgba(16, 24, 40, 0.1), 0 2px 4px -2px rgba(16, 24, 40, 0.06);
19
+ transition: all 0.3s ease;
20
+
21
+ &:hover {
22
+ transform: translateY(-4px);
23
+ box-shadow: 0 8px 16px -4px rgba(16, 24, 40, 0.15), 0 4px 8px -4px rgba(16, 24, 40, 0.1);
24
+ }
25
+
26
+ h3 {
27
+ margin-bottom: 0.5rem;
28
+ color: var(--dga-primary);
29
+ }
30
+
31
+ p {
32
+ margin: 0;
33
+ color: var(--dga-neutral);
34
+ }
35
+ }