sdga-ui 1.0.3 → 1.0.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 (76) hide show
  1. package/.github/workflows/deploy.yml +57 -0
  2. package/.github/workflows/publish.yml +2 -4
  3. package/README.md +8 -0
  4. package/css/dga-ui.css +60 -30
  5. package/css/dga-ui.css.map +1 -1
  6. package/demo-angular/.editorconfig +17 -0
  7. package/demo-angular/.vscode/extensions.json +4 -0
  8. package/demo-angular/.vscode/launch.json +20 -0
  9. package/demo-angular/.vscode/tasks.json +42 -0
  10. package/demo-angular/README.md +59 -0
  11. package/demo-angular/angular.json +88 -0
  12. package/demo-angular/package-lock.json +10459 -0
  13. package/demo-angular/package.json +50 -0
  14. package/demo-angular/public/.nojekyll +0 -0
  15. package/demo-angular/public/favicon.ico +0 -0
  16. package/demo-angular/public/i18n/ar.json +239 -0
  17. package/demo-angular/public/i18n/en.json +239 -0
  18. package/demo-angular/src/app/app.config.ts +20 -0
  19. package/demo-angular/src/app/app.html +52 -0
  20. package/demo-angular/src/app/app.routes.ts +45 -0
  21. package/demo-angular/src/app/app.scss +430 -0
  22. package/demo-angular/src/app/app.spec.ts +23 -0
  23. package/demo-angular/src/app/app.ts +88 -0
  24. package/demo-angular/src/app/shared/code-example/code-example.component.html +30 -0
  25. package/demo-angular/src/app/shared/code-example/code-example.component.scss +183 -0
  26. package/demo-angular/src/app/shared/code-example/code-example.component.ts +78 -0
  27. package/demo-angular/src/app/views/alerts/alerts.component.html +155 -0
  28. package/demo-angular/src/app/views/alerts/alerts.component.scss +3 -0
  29. package/demo-angular/src/app/views/alerts/alerts.component.ts +134 -0
  30. package/demo-angular/src/app/views/bootstrap/bootstrap.component.html +14 -0
  31. package/demo-angular/src/app/views/bootstrap/bootstrap.component.scss +91 -0
  32. package/demo-angular/src/app/views/bootstrap/bootstrap.component.ts +23 -0
  33. package/demo-angular/src/app/views/buttons/buttons.component.html +289 -0
  34. package/demo-angular/src/app/views/buttons/buttons.component.scss +14 -0
  35. package/demo-angular/src/app/views/buttons/buttons.component.ts +155 -0
  36. package/demo-angular/src/app/views/cards/cards.component.html +156 -0
  37. package/demo-angular/src/app/views/cards/cards.component.html.backup +156 -0
  38. package/demo-angular/src/app/views/cards/cards.component.scss +11 -0
  39. package/demo-angular/src/app/views/cards/cards.component.ts +194 -0
  40. package/demo-angular/src/app/views/forms/forms.component.html +347 -0
  41. package/demo-angular/src/app/views/forms/forms.component.scss +3 -0
  42. package/demo-angular/src/app/views/forms/forms.component.ts +222 -0
  43. package/demo-angular/src/app/views/home/home.component.html +38 -0
  44. package/demo-angular/src/app/views/home/home.component.scss +35 -0
  45. package/demo-angular/src/app/views/home/home.component.ts +12 -0
  46. package/demo-angular/src/app/views/links/links.component.html +140 -0
  47. package/demo-angular/src/app/views/links/links.component.scss +60 -0
  48. package/demo-angular/src/app/views/links/links.component.ts +123 -0
  49. package/demo-angular/src/app/views/tables/tables.component.html +289 -0
  50. package/demo-angular/src/app/views/tables/tables.component.scss +3 -0
  51. package/demo-angular/src/app/views/tables/tables.component.ts +278 -0
  52. package/demo-angular/src/app/views/toasts/toasts.component.html +201 -0
  53. package/demo-angular/src/app/views/toasts/toasts.component.scss +0 -0
  54. package/demo-angular/src/app/views/toasts/toasts.component.ts +182 -0
  55. package/demo-angular/src/index.html +14 -0
  56. package/demo-angular/src/main.ts +6 -0
  57. package/demo-angular/src/styles.scss +4 -0
  58. package/demo-angular/tsconfig.app.json +15 -0
  59. package/demo-angular/tsconfig.json +33 -0
  60. package/demo-angular/tsconfig.spec.json +15 -0
  61. package/package.json +5 -6
  62. package/theme/components/_accordion.scss +1 -1
  63. package/theme/components/_buttons.scss +6 -6
  64. package/theme/components/_content.scss +3 -3
  65. package/theme/components/_dropdowns.scss +1 -1
  66. package/theme/components/_forms-check.scss +1 -1
  67. package/theme/components/_forms-inputs.scss +1 -1
  68. package/theme/components/_list-group.scss +1 -1
  69. package/theme/components/_modals.scss +1 -1
  70. package/theme/components/_navigation.scss +2 -2
  71. package/theme/components/_overlays.scss +2 -2
  72. package/theme/components/_pagination.scss +1 -1
  73. package/theme/components/_popovers.scss +1 -1
  74. package/theme/components/_toasts.scss +1 -1
  75. package/theme/customizations/_cards.scss +3 -3
  76. package/theme/customizations/_links.scss +72 -24
@@ -0,0 +1,278 @@
1
+ import { Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { TranslateModule } from '@ngx-translate/core';
3
+ import { CodeExampleComponent } from '../../shared/code-example/code-example.component';
4
+
5
+ @Component({
6
+ selector: 'app-tables',
7
+ imports: [TranslateModule, CodeExampleComponent],
8
+ templateUrl: './tables.component.html',
9
+ styleUrl: './tables.component.scss',
10
+ changeDetection: ChangeDetectionStrategy.OnPush
11
+ })
12
+ export class TablesComponent {
13
+ // Default table with checkboxes
14
+ defaultTableCode = `<div class="table-responsive">
15
+ <table class="table">
16
+ <thead>
17
+ <tr>
18
+ <th scope="col" style="width: 3.25rem;">
19
+ <input type="checkbox" class="form-check-input form-check-input-sm ripple" id="chkSelectAll">
20
+ </th>
21
+ <th scope="col">First</th>
22
+ <th scope="col">Last</th>
23
+ <th scope="col">Handle</th>
24
+ </tr>
25
+ </thead>
26
+ <tbody>
27
+ <tr>
28
+ <th scope="row">
29
+ <input type="checkbox" class="form-check-input form-check-input-sm ripple" id="chkRow1">
30
+ </th>
31
+ <td><a href="javascript:void(0);">Mark</a></td>
32
+ <td>Otto</td>
33
+ <td>@mdo</td>
34
+ </tr>
35
+ <tr>
36
+ <th scope="row">
37
+ <input type="checkbox" class="form-check-input form-check-input-sm ripple" id="chkRow2">
38
+ </th>
39
+ <td><a href="javascript:void(0);">Jacob</a></td>
40
+ <td>Thornton</td>
41
+ <td>@fat</td>
42
+ </tr>
43
+ <tr>
44
+ <th scope="row">
45
+ <input type="checkbox" class="form-check-input form-check-input-sm ripple" id="chkRow3">
46
+ </th>
47
+ <td><a href="javascript:void(0);">John</a></td>
48
+ <td>Doe</td>
49
+ <td>@social</td>
50
+ </tr>
51
+ </tbody>
52
+ </table>
53
+ </div>`;
54
+
55
+ // Side-borderless table
56
+ sideBorderlessTableCode = `<div class="table-responsive">
57
+ <table class="table side-borderless">
58
+ <thead>
59
+ <tr>
60
+ <th scope="col" style="width: 3.25rem;">
61
+ <input type="checkbox" class="form-check-input form-check-input-sm ripple" id="chkSelectAll">
62
+ </th>
63
+ <th scope="col">First</th>
64
+ <th scope="col">Last</th>
65
+ <th scope="col">Handle</th>
66
+ </tr>
67
+ </thead>
68
+ <tbody>
69
+ <tr>
70
+ <th scope="row">
71
+ <input type="checkbox" class="form-check-input form-check-input-sm ripple" id="chkRow1">
72
+ </th>
73
+ <td><a href="javascript:void(0);">Mark</a></td>
74
+ <td>Otto</td>
75
+ <td>@mdo</td>
76
+ </tr>
77
+ <tr>
78
+ <th scope="row">
79
+ <input type="checkbox" class="form-check-input form-check-input-sm ripple" id="chkRow2">
80
+ </th>
81
+ <td><a href="javascript:void(0);">Jacob</a></td>
82
+ <td>Thornton</td>
83
+ <td>@fat</td>
84
+ </tr>
85
+ <tr>
86
+ <th scope="row">
87
+ <input type="checkbox" class="form-check-input form-check-input-sm ripple" id="chkRow3">
88
+ </th>
89
+ <td><a href="javascript:void(0);">John</a></td>
90
+ <td>Doe</td>
91
+ <td>@social</td>
92
+ </tr>
93
+ </tbody>
94
+ </table>
95
+ </div>`;
96
+
97
+ // Striped table
98
+ stripedTableCode = `<div class="table-responsive">
99
+ <table class="table table-striped">
100
+ <thead>
101
+ <tr>
102
+ <th scope="col" style="width: 3.25rem;">
103
+ <input type="checkbox" class="form-check-input form-check-input-sm ripple" id="chkSelectAll">
104
+ </th>
105
+ <th scope="col">First</th>
106
+ <th scope="col">Last</th>
107
+ <th scope="col">Handle</th>
108
+ </tr>
109
+ </thead>
110
+ <tbody>
111
+ <tr>
112
+ <th scope="row">
113
+ <input type="checkbox" class="form-check-input form-check-input-sm ripple" id="chkRow1">
114
+ </th>
115
+ <td><a href="javascript:void(0);">Mark</a></td>
116
+ <td>Otto</td>
117
+ <td>@mdo</td>
118
+ </tr>
119
+ <tr>
120
+ <th scope="row">
121
+ <input type="checkbox" class="form-check-input form-check-input-sm ripple" id="chkRow2">
122
+ </th>
123
+ <td><a href="javascript:void(0);">Jacob</a></td>
124
+ <td>Thornton</td>
125
+ <td>@fat</td>
126
+ </tr>
127
+ <tr>
128
+ <th scope="row">
129
+ <input type="checkbox" class="form-check-input form-check-input-sm ripple" id="chkRow3">
130
+ </th>
131
+ <td><a href="javascript:void(0);">John</a></td>
132
+ <td>Doe</td>
133
+ <td>@social</td>
134
+ </tr>
135
+ </tbody>
136
+ </table>
137
+ </div>`;
138
+
139
+ // Combination: striped + side-borderless
140
+ stripedSideBorderlessTableCode = `<div class="table-responsive">
141
+ <table class="table table-striped side-borderless">
142
+ <thead>
143
+ <tr>
144
+ <th scope="col" style="width: 3.25rem;">
145
+ <input type="checkbox" class="form-check-input form-check-input-sm ripple" id="chkSelectAll">
146
+ </th>
147
+ <th scope="col">First</th>
148
+ <th scope="col">Last</th>
149
+ <th scope="col">Handle</th>
150
+ </tr>
151
+ </thead>
152
+ <tbody>
153
+ <tr>
154
+ <th scope="row">
155
+ <input type="checkbox" class="form-check-input form-check-input-sm ripple" id="chkRow1">
156
+ </th>
157
+ <td><a href="javascript:void(0);">Mark</a></td>
158
+ <td>Otto</td>
159
+ <td>@mdo</td>
160
+ </tr>
161
+ <tr>
162
+ <th scope="row">
163
+ <input type="checkbox" class="form-check-input form-check-input-sm ripple" id="chkRow2">
164
+ </th>
165
+ <td><a href="javascript:void(0);">Jacob</a></td>
166
+ <td>Thornton</td>
167
+ <td>@fat</td>
168
+ </tr>
169
+ <tr>
170
+ <th scope="row">
171
+ <input type="checkbox" class="form-check-input form-check-input-sm ripple" id="chkRow3">
172
+ </th>
173
+ <td><a href="javascript:void(0);">John</a></td>
174
+ <td>Doe</td>
175
+ <td>@social</td>
176
+ </tr>
177
+ </tbody>
178
+ </table>
179
+ </div>`;
180
+
181
+ // Table with links in cells - more comprehensive example
182
+ tableWithLinksCode = `<div class="table-responsive">
183
+ <table class="table">
184
+ <thead>
185
+ <tr>
186
+ <th scope="col">ID</th>
187
+ <th scope="col">Name</th>
188
+ <th scope="col">Email</th>
189
+ <th scope="col">Department</th>
190
+ <th scope="col">Actions</th>
191
+ </tr>
192
+ </thead>
193
+ <tbody>
194
+ <tr>
195
+ <th scope="row">1</th>
196
+ <td><a href="javascript:void(0);">John Doe</a></td>
197
+ <td><a href="mailto:john.doe@example.com">john.doe@example.com</a></td>
198
+ <td>Engineering</td>
199
+ <td>
200
+ <a href="javascript:void(0);">Edit</a> |
201
+ <a href="javascript:void(0);">Delete</a>
202
+ </td>
203
+ </tr>
204
+ <tr>
205
+ <th scope="row">2</th>
206
+ <td><a href="javascript:void(0);">Jane Smith</a></td>
207
+ <td><a href="mailto:jane.smith@example.com">jane.smith@example.com</a></td>
208
+ <td>Marketing</td>
209
+ <td>
210
+ <a href="javascript:void(0);">Edit</a> |
211
+ <a href="javascript:void(0);">Delete</a>
212
+ </td>
213
+ </tr>
214
+ <tr>
215
+ <th scope="row">3</th>
216
+ <td><a href="javascript:void(0);">Mike Johnson</a></td>
217
+ <td><a href="mailto:mike.johnson@example.com">mike.johnson@example.com</a></td>
218
+ <td>Sales</td>
219
+ <td>
220
+ <a href="javascript:void(0);">Edit</a> |
221
+ <a href="javascript:void(0);">Delete</a>
222
+ </td>
223
+ </tr>
224
+ </tbody>
225
+ </table>
226
+ </div>`;
227
+
228
+ // Responsive table wrapper
229
+ responsiveTableCode = `<!-- Responsive wrapper ensures horizontal scrolling on small screens -->
230
+ <div class="table-responsive">
231
+ <table class="table">
232
+ <thead>
233
+ <tr>
234
+ <th scope="col">ID</th>
235
+ <th scope="col">First Name</th>
236
+ <th scope="col">Last Name</th>
237
+ <th scope="col">Email</th>
238
+ <th scope="col">Department</th>
239
+ <th scope="col">Position</th>
240
+ <th scope="col">Hire Date</th>
241
+ <th scope="col">Status</th>
242
+ </tr>
243
+ </thead>
244
+ <tbody>
245
+ <tr>
246
+ <th scope="row">1</th>
247
+ <td>John</td>
248
+ <td>Doe</td>
249
+ <td>john.doe@example.com</td>
250
+ <td>Engineering</td>
251
+ <td>Senior Developer</td>
252
+ <td>2020-01-15</td>
253
+ <td>Active</td>
254
+ </tr>
255
+ <tr>
256
+ <th scope="row">2</th>
257
+ <td>Jane</td>
258
+ <td>Smith</td>
259
+ <td>jane.smith@example.com</td>
260
+ <td>Marketing</td>
261
+ <td>Marketing Manager</td>
262
+ <td>2019-06-20</td>
263
+ <td>Active</td>
264
+ </tr>
265
+ <tr>
266
+ <th scope="row">3</th>
267
+ <td>Mike</td>
268
+ <td>Johnson</td>
269
+ <td>mike.johnson@example.com</td>
270
+ <td>Sales</td>
271
+ <td>Sales Representative</td>
272
+ <td>2021-03-10</td>
273
+ <td>Active</td>
274
+ </tr>
275
+ </tbody>
276
+ </table>
277
+ </div>`;
278
+ }
@@ -0,0 +1,201 @@
1
+ <div class="container py-5">
2
+ <h1 class="display-4 mb-4">{{ 'toasts.title' | translate }}</h1>
3
+ <p class="lead mb-5">{{ 'toasts.subtitle' | translate }}</p>
4
+
5
+ <section class="demo-section mb-5">
6
+ <h2 class="mt-5">{{ 'toasts.section_variants' | translate }}</h2>
7
+
8
+ <!-- Success Toast with Icon -->
9
+ <h3 class="h5 mt-4 mb-3">Success Toast with Icon</h3>
10
+ <div class="d-flex flex-wrap gap-3 mb-3">
11
+ <div class="toast-container">
12
+ <div class="toast show fade toast-success" role="alert" aria-live="polite" aria-atomic="true">
13
+ <div class="toast-icon">
14
+ <i class="hgi hgi-stroke hgi-checkmark-circle-02 toast-icon"></i>
15
+ </div>
16
+ <div class="toast-content">
17
+ <div class="toast-header">
18
+ <strong>{{ 'toasts.success' | translate }}</strong>
19
+ </div>
20
+ <div class="toast-body">
21
+ {{ 'toasts.success_text' | translate }}
22
+ </div>
23
+ <div class="toast-footer">
24
+ <button type="button" class="btn btn-subtle btn-sm">{{ 'toasts.action' | translate }}</button>
25
+ <button type="button" class="btn btn-subtle btn-sm" data-bs-dismiss="toast" aria-label="Close">{{ 'toasts.dismiss' | translate }}</button>
26
+ </div>
27
+ </div>
28
+ <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
29
+ </div>
30
+ </div>
31
+ </div>
32
+ <app-code-example
33
+ [htmlCode]="successToastCode"
34
+ title="Success Toast with Icon">
35
+ </app-code-example>
36
+
37
+ <!-- Danger Toast with Icon -->
38
+ <h3 class="h5 mt-4 mb-3">Danger Toast with Icon</h3>
39
+ <div class="d-flex flex-wrap gap-3 mb-3">
40
+ <div class="toast show fade toast-danger" role="alert" aria-live="polite" aria-atomic="true">
41
+ <div class="toast-icon">
42
+ <i class="hgi hgi-stroke hgi-help-circle toast-icon"></i>
43
+ </div>
44
+ <div class="toast-content">
45
+ <div class="toast-header">
46
+ <strong>{{ 'toasts.danger' | translate }}</strong>
47
+ </div>
48
+ <div class="toast-body">
49
+ {{ 'toasts.danger_text' | translate }}
50
+ </div>
51
+ <div class="toast-footer">
52
+ <button type="button" class="btn btn-subtle btn-sm">{{ 'toasts.action' | translate }}</button>
53
+ <button type="button" class="btn btn-subtle btn-sm" data-bs-dismiss="toast" aria-label="Close">{{ 'toasts.dismiss' | translate }}</button>
54
+ </div>
55
+ </div>
56
+ <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
57
+ </div>
58
+ </div>
59
+ <app-code-example
60
+ [htmlCode]="dangerToastCode"
61
+ title="Danger Toast with Icon">
62
+ </app-code-example>
63
+
64
+ <!-- Warning Toast with Icon -->
65
+ <h3 class="h5 mt-4 mb-3">Warning Toast with Icon</h3>
66
+ <div class="d-flex flex-wrap gap-3 mb-3">
67
+ <div class="toast show fade toast-warning" role="alert" aria-live="polite" aria-atomic="true">
68
+ <div class="toast-icon">
69
+ <i class="hgi hgi-stroke hgi-alert-02 toast-icon"></i>
70
+ </div>
71
+ <div class="toast-content">
72
+ <div class="toast-header">
73
+ <strong>{{ 'toasts.warning' | translate }}</strong>
74
+ </div>
75
+ <div class="toast-body">
76
+ {{ 'toasts.warning_text' | translate }}
77
+ </div>
78
+ <div class="toast-footer">
79
+ <button type="button" class="btn btn-subtle btn-sm">{{ 'toasts.action' | translate }}</button>
80
+ <button type="button" class="btn btn-subtle btn-sm" data-bs-dismiss="toast" aria-label="Close">{{ 'toasts.dismiss' | translate }}</button>
81
+ </div>
82
+ </div>
83
+ <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
84
+ </div>
85
+ </div>
86
+ <app-code-example
87
+ [htmlCode]="warningToastCode"
88
+ title="Warning Toast with Icon">
89
+ </app-code-example>
90
+
91
+ <!-- Info Toast with Icon -->
92
+ <h3 class="h5 mt-4 mb-3">Info Toast with Icon</h3>
93
+ <div class="d-flex flex-wrap gap-3 mb-3">
94
+ <div class="toast show fade toast-info" role="alert" aria-live="polite" aria-atomic="true">
95
+ <div class="toast-icon">
96
+ <i class="hgi hgi-stroke hgi-help-circle toast-icon"></i>
97
+ </div>
98
+ <div class="toast-content">
99
+ <div class="toast-header">
100
+ <strong>{{ 'toasts.info' | translate }}</strong>
101
+ </div>
102
+ <div class="toast-body">
103
+ {{ 'toasts.info_text' | translate }}
104
+ </div>
105
+ <div class="toast-footer">
106
+ <button type="button" class="btn btn-subtle btn-sm">{{ 'toasts.action' | translate }}</button>
107
+ <button type="button" class="btn btn-subtle btn-sm" data-bs-dismiss="toast" aria-label="Close">{{ 'toasts.dismiss' | translate }}</button>
108
+ </div>
109
+ </div>
110
+ <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
111
+ </div>
112
+ </div>
113
+ <app-code-example
114
+ [htmlCode]="infoToastCode"
115
+ title="Info Toast with Icon">
116
+ </app-code-example>
117
+
118
+ <!-- Neutral Toast with Icon -->
119
+ <h3 class="h5 mt-4 mb-3">Neutral Toast with Icon</h3>
120
+ <div class="d-flex flex-wrap gap-3 mb-3">
121
+ <div class="toast show fade toast-neutral" role="alert" aria-live="polite" aria-atomic="true">
122
+ <div class="toast-icon">
123
+ <i class="hgi hgi-stroke hgi-help-circle toast-icon"></i>
124
+ </div>
125
+ <div class="toast-content">
126
+ <div class="toast-header">
127
+ <strong>{{ 'toasts.neutral' | translate }}</strong>
128
+ </div>
129
+ <div class="toast-body">
130
+ {{ 'toasts.neutral_text' | translate }}
131
+ </div>
132
+ <div class="toast-footer">
133
+ <button type="button" class="btn btn-subtle btn-sm">{{ 'toasts.action' | translate }}</button>
134
+ <button type="button" class="btn btn-subtle btn-sm" data-bs-dismiss="toast" aria-label="Close">{{ 'toasts.dismiss' | translate }}</button>
135
+ </div>
136
+ </div>
137
+ <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
138
+ </div>
139
+ </div>
140
+ <app-code-example
141
+ [htmlCode]="neutralToastCode"
142
+ title="Neutral Toast with Icon">
143
+ </app-code-example>
144
+
145
+ <!-- Toast with Header, Body, and Footer Actions -->
146
+ <h3 class="h5 mt-4 mb-3">Toast with Header, Body, and Footer Actions</h3>
147
+ <div class="d-flex flex-wrap gap-3 mb-3">
148
+ <div class="toast-container">
149
+ <div class="toast show fade toast-success" role="alert" aria-live="polite" aria-atomic="true">
150
+ <div class="toast-icon">
151
+ <i class="hgi hgi-stroke hgi-checkmark-circle-02 toast-icon"></i>
152
+ </div>
153
+ <div class="toast-content">
154
+ <div class="toast-header">
155
+ <strong>{{ 'toasts.success' | translate }}</strong>
156
+ </div>
157
+ <div class="toast-body">
158
+ {{ 'toasts.success_text' | translate }}
159
+ </div>
160
+ <div class="toast-footer">
161
+ <button type="button" class="btn btn-subtle btn-sm">{{ 'toasts.action' | translate }}</button>
162
+ <button type="button" class="btn btn-subtle btn-sm" data-bs-dismiss="toast" aria-label="Close">{{ 'toasts.dismiss' | translate }}</button>
163
+ </div>
164
+ </div>
165
+ <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
166
+ </div>
167
+ </div>
168
+ </div>
169
+ <app-code-example
170
+ [htmlCode]="fullToastCode"
171
+ title="Toast with Header, Body, and Footer Actions">
172
+ </app-code-example>
173
+
174
+ <!-- Dismissible Toast -->
175
+ <h3 class="h5 mt-4 mb-3">Dismissible Toast</h3>
176
+ <div class="d-flex flex-wrap gap-3 mb-3">
177
+ <div class="toast show fade toast-success" role="alert" aria-live="polite" aria-atomic="true">
178
+ <div class="toast-icon">
179
+ <i class="hgi hgi-stroke hgi-checkmark-circle-02 toast-icon"></i>
180
+ </div>
181
+ <div class="toast-content">
182
+ <div class="toast-header">
183
+ <strong>{{ 'toasts.success' | translate }}</strong>
184
+ </div>
185
+ <div class="toast-body">
186
+ {{ 'toasts.success_text' | translate }}
187
+ </div>
188
+ <div class="toast-footer">
189
+ <button type="button" class="btn btn-subtle btn-sm">{{ 'toasts.action' | translate }}</button>
190
+ <button type="button" class="btn btn-subtle btn-sm" data-bs-dismiss="toast" aria-label="Close">{{ 'toasts.dismiss' | translate }}</button>
191
+ </div>
192
+ </div>
193
+ <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
194
+ </div>
195
+ </div>
196
+ <app-code-example
197
+ [htmlCode]="dismissibleToastCode"
198
+ title="Dismissible Toast">
199
+ </app-code-example>
200
+ </section>
201
+ </div>
@@ -0,0 +1,182 @@
1
+ import { Component, ChangeDetectionStrategy, signal } from '@angular/core';
2
+ import { TranslateModule } from '@ngx-translate/core';
3
+ import { CommonModule } from '@angular/common';
4
+ import { CodeExampleComponent } from '../../shared/code-example/code-example.component';
5
+
6
+ @Component({
7
+ selector: 'app-toasts',
8
+ imports: [CommonModule, TranslateModule, CodeExampleComponent],
9
+ templateUrl: './toasts.component.html',
10
+ styleUrl: './toasts.component.scss',
11
+ changeDetection: ChangeDetectionStrategy.OnPush
12
+ })
13
+ export class ToastsComponent {
14
+ protected readonly showToast1 = signal(false);
15
+ protected readonly showToast2 = signal(false);
16
+ protected readonly showToast3 = signal(false);
17
+ protected readonly showToast4 = signal(false);
18
+ protected readonly showToast5 = signal(false);
19
+ protected readonly showToast6 = signal(false);
20
+
21
+ // Success Toast with Icon
22
+ successToastCode = `<div class="toast show fade toast-success" role="alert" aria-live="polite" aria-atomic="true">
23
+ <div class="toast-icon">
24
+ <i class="hgi hgi-stroke hgi-checkmark-circle-02 toast-icon"></i>
25
+ </div>
26
+ <div class="toast-content">
27
+ <div class="toast-header">
28
+ <strong>Success</strong>
29
+ </div>
30
+ <div class="toast-body">
31
+ Your action was completed successfully!
32
+ </div>
33
+ <div class="toast-footer">
34
+ <button type="button" class="btn btn-subtle btn-sm">Action</button>
35
+ <button type="button" class="btn btn-subtle btn-sm" data-bs-dismiss="toast" aria-label="Close">Dismiss</button>
36
+ </div>
37
+ </div>
38
+ <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
39
+ </div>`;
40
+
41
+ // Danger Toast with Icon
42
+ dangerToastCode = `<div class="toast show fade toast-danger" role="alert" aria-live="polite" aria-atomic="true">
43
+ <div class="toast-icon">
44
+ <i class="hgi hgi-stroke hgi-help-circle toast-icon"></i>
45
+ </div>
46
+ <div class="toast-content">
47
+ <div class="toast-header">
48
+ <strong>Error</strong>
49
+ </div>
50
+ <div class="toast-body">
51
+ There was an error processing your request.
52
+ </div>
53
+ <div class="toast-footer">
54
+ <button type="button" class="btn btn-subtle btn-sm">Action</button>
55
+ <button type="button" class="btn btn-subtle btn-sm" data-bs-dismiss="toast" aria-label="Close">Dismiss</button>
56
+ </div>
57
+ </div>
58
+ <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
59
+ </div>`;
60
+
61
+ // Warning Toast with Icon
62
+ warningToastCode = `<div class="toast show fade toast-warning" role="alert" aria-live="polite" aria-atomic="true">
63
+ <div class="toast-icon">
64
+ <i class="hgi hgi-stroke hgi-alert-02 toast-icon"></i>
65
+ </div>
66
+ <div class="toast-content">
67
+ <div class="toast-header">
68
+ <strong>Warning</strong>
69
+ </div>
70
+ <div class="toast-body">
71
+ Please review your changes before proceeding.
72
+ </div>
73
+ <div class="toast-footer">
74
+ <button type="button" class="btn btn-subtle btn-sm">Action</button>
75
+ <button type="button" class="btn btn-subtle btn-sm" data-bs-dismiss="toast" aria-label="Close">Dismiss</button>
76
+ </div>
77
+ </div>
78
+ <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
79
+ </div>`;
80
+
81
+ // Info Toast with Icon
82
+ infoToastCode = `<div class="toast show fade toast-info" role="alert" aria-live="polite" aria-atomic="true">
83
+ <div class="toast-icon">
84
+ <i class="hgi hgi-stroke hgi-help-circle toast-icon"></i>
85
+ </div>
86
+ <div class="toast-content">
87
+ <div class="toast-header">
88
+ <strong>Information</strong>
89
+ </div>
90
+ <div class="toast-body">
91
+ Here's some helpful information for you.
92
+ </div>
93
+ <div class="toast-footer">
94
+ <button type="button" class="btn btn-subtle btn-sm">Action</button>
95
+ <button type="button" class="btn btn-subtle btn-sm" data-bs-dismiss="toast" aria-label="Close">Dismiss</button>
96
+ </div>
97
+ </div>
98
+ <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
99
+ </div>`;
100
+
101
+ // Neutral Toast with Icon
102
+ neutralToastCode = `<div class="toast show fade toast-neutral" role="alert" aria-live="polite" aria-atomic="true">
103
+ <div class="toast-icon">
104
+ <i class="hgi hgi-stroke hgi-help-circle toast-icon"></i>
105
+ </div>
106
+ <div class="toast-content">
107
+ <div class="toast-header">
108
+ <strong>Neutral</strong>
109
+ </div>
110
+ <div class="toast-body">
111
+ This is a neutral notification message.
112
+ </div>
113
+ <div class="toast-footer">
114
+ <button type="button" class="btn btn-subtle btn-sm">Action</button>
115
+ <button type="button" class="btn btn-subtle btn-sm" data-bs-dismiss="toast" aria-label="Close">Dismiss</button>
116
+ </div>
117
+ </div>
118
+ <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
119
+ </div>`;
120
+
121
+ // Toast with Header, Body, and Footer
122
+ fullToastCode = `<div class="toast-container">
123
+ <div class="toast show fade toast-success" role="alert" aria-live="polite" aria-atomic="true">
124
+ <div class="toast-icon">
125
+ <i class="hgi hgi-stroke hgi-checkmark-circle-02 toast-icon"></i>
126
+ </div>
127
+ <div class="toast-content">
128
+ <div class="toast-header">
129
+ <strong>Success</strong>
130
+ </div>
131
+ <div class="toast-body">
132
+ Your action was completed successfully!
133
+ </div>
134
+ <div class="toast-footer">
135
+ <button type="button" class="btn btn-subtle btn-sm">Action</button>
136
+ <button type="button" class="btn btn-subtle btn-sm" data-bs-dismiss="toast" aria-label="Close">Dismiss</button>
137
+ </div>
138
+ </div>
139
+ <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
140
+ </div>
141
+ </div>`;
142
+
143
+ // Dismissible Toast
144
+ dismissibleToastCode = `<div class="toast show fade toast-success" role="alert" aria-live="polite" aria-atomic="true">
145
+ <div class="toast-icon">
146
+ <i class="hgi hgi-stroke hgi-checkmark-circle-02 toast-icon"></i>
147
+ </div>
148
+ <div class="toast-content">
149
+ <div class="toast-header">
150
+ <strong>Success</strong>
151
+ </div>
152
+ <div class="toast-body">
153
+ Your action was completed successfully!
154
+ </div>
155
+ <div class="toast-footer">
156
+ <button type="button" class="btn btn-subtle btn-sm">Action</button>
157
+ <button type="button" class="btn btn-subtle btn-sm" data-bs-dismiss="toast" aria-label="Close">Dismiss</button>
158
+ </div>
159
+ </div>
160
+ <button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
161
+ </div>`;
162
+
163
+ hideToast(number: number): void {
164
+ switch(number) {
165
+ case 1: this.showToast1.set(false); break;
166
+ case 2: this.showToast2.set(false); break;
167
+ case 3: this.showToast3.set(false); break;
168
+ case 4: this.showToast4.set(false); break;
169
+ case 5: this.showToast5.set(false); break;
170
+ case 6: this.showToast6.set(false); break;
171
+ }
172
+ }
173
+
174
+ showAllToasts(): void {
175
+ this.showToast1.set(true);
176
+ this.showToast2.set(true);
177
+ this.showToast3.set(true);
178
+ this.showToast4.set(true);
179
+ this.showToast5.set(true);
180
+ this.showToast6.set(true);
181
+ }
182
+ }