sdga-ui 1.0.8 → 1.0.9

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 (90) hide show
  1. package/css/dga-ui.css +16 -2
  2. package/css/dga-ui.css.map +1 -1
  3. package/package.json +20 -4
  4. package/theme/customizations/_links.scss +22 -21
  5. package/.editorconfig +0 -23
  6. package/.github/workflows/deploy.yml +0 -71
  7. package/.github/workflows/publish.yml +0 -36
  8. package/.prettierignore +0 -73
  9. package/.prettierrc +0 -17
  10. package/demo-angular/.editorconfig +0 -17
  11. package/demo-angular/.vscode/extensions.json +0 -4
  12. package/demo-angular/.vscode/launch.json +0 -20
  13. package/demo-angular/.vscode/tasks.json +0 -42
  14. package/demo-angular/README.md +0 -91
  15. package/demo-angular/angular.json +0 -96
  16. package/demo-angular/package-lock.json +0 -10600
  17. package/demo-angular/package.json +0 -53
  18. package/demo-angular/public/404.html +0 -35
  19. package/demo-angular/public/favicon.ico +0 -0
  20. package/demo-angular/public/i18n/ar.json +0 -289
  21. package/demo-angular/public/i18n/en.json +0 -289
  22. package/demo-angular/src/app/app.config.ts +0 -20
  23. package/demo-angular/src/app/app.html +0 -52
  24. package/demo-angular/src/app/app.routes.ts +0 -49
  25. package/demo-angular/src/app/app.scss +0 -430
  26. package/demo-angular/src/app/app.spec.ts +0 -23
  27. package/demo-angular/src/app/app.ts +0 -97
  28. package/demo-angular/src/app/shared/code-example/code-example.component.html +0 -30
  29. package/demo-angular/src/app/shared/code-example/code-example.component.scss +0 -183
  30. package/demo-angular/src/app/shared/code-example/code-example.component.ts +0 -89
  31. package/demo-angular/src/app/views/alerts/alerts.component.html +0 -155
  32. package/demo-angular/src/app/views/alerts/alerts.component.scss +0 -3
  33. package/demo-angular/src/app/views/alerts/alerts.component.ts +0 -134
  34. package/demo-angular/src/app/views/buttons/buttons.component.html +0 -360
  35. package/demo-angular/src/app/views/buttons/buttons.component.scss +0 -11
  36. package/demo-angular/src/app/views/buttons/buttons.component.ts +0 -225
  37. package/demo-angular/src/app/views/cards/cards.component.html +0 -156
  38. package/demo-angular/src/app/views/cards/cards.component.html.backup +0 -156
  39. package/demo-angular/src/app/views/cards/cards.component.scss +0 -11
  40. package/demo-angular/src/app/views/cards/cards.component.ts +0 -194
  41. package/demo-angular/src/app/views/footer/footer.html +0 -270
  42. package/demo-angular/src/app/views/footer/footer.ts +0 -276
  43. package/demo-angular/src/app/views/forms/forms.component.html +0 -347
  44. package/demo-angular/src/app/views/forms/forms.component.scss +0 -3
  45. package/demo-angular/src/app/views/forms/forms.component.ts +0 -222
  46. package/demo-angular/src/app/views/header/header.html +0 -1
  47. package/demo-angular/src/app/views/header/header.scss +0 -0
  48. package/demo-angular/src/app/views/header/header.spec.ts +0 -23
  49. package/demo-angular/src/app/views/header/header.ts +0 -11
  50. package/demo-angular/src/app/views/home/home.component.html +0 -33
  51. package/demo-angular/src/app/views/home/home.component.scss +0 -35
  52. package/demo-angular/src/app/views/home/home.component.ts +0 -12
  53. package/demo-angular/src/app/views/links/links.component.html +0 -21
  54. package/demo-angular/src/app/views/links/links.component.scss +0 -11
  55. package/demo-angular/src/app/views/links/links.component.ts +0 -19
  56. package/demo-angular/src/app/views/tables/tables.component.html +0 -289
  57. package/demo-angular/src/app/views/tables/tables.component.scss +0 -3
  58. package/demo-angular/src/app/views/tables/tables.component.ts +0 -278
  59. package/demo-angular/src/app/views/toasts/toasts.component.html +0 -201
  60. package/demo-angular/src/app/views/toasts/toasts.component.scss +0 -0
  61. package/demo-angular/src/app/views/toasts/toasts.component.ts +0 -182
  62. package/demo-angular/src/index.html +0 -28
  63. package/demo-angular/src/main.ts +0 -6
  64. package/demo-angular/src/styles.scss +0 -4
  65. package/demo-angular/tsconfig.app.json +0 -16
  66. package/demo-angular/tsconfig.json +0 -33
  67. package/demo-angular/tsconfig.spec.json +0 -15
  68. package/sdga-ui/README.md +0 -45
  69. package/sdga-ui/content/docs/components/alerts.mdx +0 -475
  70. package/sdga-ui/content/docs/index.mdx +0 -239
  71. package/sdga-ui/next.config.mjs +0 -10
  72. package/sdga-ui/package-lock.json +0 -5851
  73. package/sdga-ui/package.json +0 -32
  74. package/sdga-ui/postcss.config.mjs +0 -5
  75. package/sdga-ui/source.config.ts +0 -27
  76. package/sdga-ui/src/app/(home)/layout.tsx +0 -6
  77. package/sdga-ui/src/app/(home)/page.tsx +0 -202
  78. package/sdga-ui/src/app/api/search/route.ts +0 -7
  79. package/sdga-ui/src/app/docs/[[...slug]]/page.tsx +0 -54
  80. package/sdga-ui/src/app/docs/layout.tsx +0 -11
  81. package/sdga-ui/src/app/global.css +0 -3
  82. package/sdga-ui/src/app/layout.tsx +0 -25
  83. package/sdga-ui/src/app/llms-full.txt/route.ts +0 -10
  84. package/sdga-ui/src/app/og/docs/[...slug]/route.tsx +0 -34
  85. package/sdga-ui/src/app/sdga-scoped.css +0 -7
  86. package/sdga-ui/src/components/sdga-preview.tsx +0 -105
  87. package/sdga-ui/src/lib/layout.shared.tsx +0 -9
  88. package/sdga-ui/src/lib/source.ts +0 -27
  89. package/sdga-ui/src/mdx-components.tsx +0 -9
  90. package/sdga-ui/tsconfig.json +0 -46
@@ -1,347 +0,0 @@
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>
@@ -1,3 +0,0 @@
1
- .demo-section {
2
- margin-bottom: 4rem;
3
- }
@@ -1,222 +0,0 @@
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
- }
@@ -1 +0,0 @@
1
- <header></header>
File without changes
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { Header } from './header';
4
-
5
- describe('Header', () => {
6
- let component: Header;
7
- let fixture: ComponentFixture<Header>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- imports: [Header]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(Header);
16
- component = fixture.componentInstance;
17
- await fixture.whenStable();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });
@@ -1,11 +0,0 @@
1
- import { Component } from "@angular/core";
2
- import { TranslateModule } from "@ngx-translate/core";
3
-
4
- @Component({
5
- selector: 'app-header',
6
- imports: [TranslateModule],
7
- templateUrl: './header.html',
8
- styleUrl: './header.scss',
9
- })
10
- export class Header {
11
- }
@@ -1,33 +0,0 @@
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
- </div>
33
- </div>