sdga-ui 1.0.3 → 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.
- package/.github/workflows/deploy.yml +57 -0
- package/.github/workflows/publish.yml +2 -4
- package/README.md +8 -0
- package/css/dga-ui.css +60 -30
- package/css/dga-ui.css.map +1 -1
- package/demo-angular/.editorconfig +17 -0
- package/demo-angular/.vscode/extensions.json +4 -0
- package/demo-angular/.vscode/launch.json +20 -0
- package/demo-angular/.vscode/tasks.json +42 -0
- package/demo-angular/README.md +59 -0
- package/demo-angular/angular.json +90 -0
- package/demo-angular/package-lock.json +10459 -0
- package/demo-angular/package.json +50 -0
- package/demo-angular/public/.nojekyll +0 -0
- package/demo-angular/public/favicon.ico +0 -0
- package/demo-angular/public/i18n/ar.json +239 -0
- package/demo-angular/public/i18n/en.json +239 -0
- package/demo-angular/src/app/app.config.ts +20 -0
- package/demo-angular/src/app/app.html +52 -0
- package/demo-angular/src/app/app.routes.ts +45 -0
- package/demo-angular/src/app/app.scss +430 -0
- package/demo-angular/src/app/app.spec.ts +23 -0
- package/demo-angular/src/app/app.ts +88 -0
- package/demo-angular/src/app/shared/code-example/code-example.component.html +30 -0
- package/demo-angular/src/app/shared/code-example/code-example.component.scss +183 -0
- package/demo-angular/src/app/shared/code-example/code-example.component.ts +78 -0
- package/demo-angular/src/app/views/alerts/alerts.component.html +155 -0
- package/demo-angular/src/app/views/alerts/alerts.component.scss +3 -0
- package/demo-angular/src/app/views/alerts/alerts.component.ts +134 -0
- package/demo-angular/src/app/views/bootstrap/bootstrap.component.html +14 -0
- package/demo-angular/src/app/views/bootstrap/bootstrap.component.scss +91 -0
- package/demo-angular/src/app/views/bootstrap/bootstrap.component.ts +23 -0
- package/demo-angular/src/app/views/buttons/buttons.component.html +289 -0
- package/demo-angular/src/app/views/buttons/buttons.component.scss +14 -0
- package/demo-angular/src/app/views/buttons/buttons.component.ts +155 -0
- package/demo-angular/src/app/views/cards/cards.component.html +156 -0
- package/demo-angular/src/app/views/cards/cards.component.html.backup +156 -0
- package/demo-angular/src/app/views/cards/cards.component.scss +11 -0
- package/demo-angular/src/app/views/cards/cards.component.ts +194 -0
- package/demo-angular/src/app/views/forms/forms.component.html +347 -0
- package/demo-angular/src/app/views/forms/forms.component.scss +3 -0
- package/demo-angular/src/app/views/forms/forms.component.ts +222 -0
- package/demo-angular/src/app/views/home/home.component.html +38 -0
- package/demo-angular/src/app/views/home/home.component.scss +35 -0
- package/demo-angular/src/app/views/home/home.component.ts +12 -0
- package/demo-angular/src/app/views/links/links.component.html +140 -0
- package/demo-angular/src/app/views/links/links.component.scss +60 -0
- package/demo-angular/src/app/views/links/links.component.ts +123 -0
- package/demo-angular/src/app/views/tables/tables.component.html +289 -0
- package/demo-angular/src/app/views/tables/tables.component.scss +3 -0
- package/demo-angular/src/app/views/tables/tables.component.ts +278 -0
- package/demo-angular/src/app/views/toasts/toasts.component.html +201 -0
- package/demo-angular/src/app/views/toasts/toasts.component.scss +0 -0
- package/demo-angular/src/app/views/toasts/toasts.component.ts +182 -0
- package/demo-angular/src/index.html +14 -0
- package/demo-angular/src/main.ts +6 -0
- package/demo-angular/src/styles.scss +4 -0
- package/demo-angular/tsconfig.app.json +15 -0
- package/demo-angular/tsconfig.json +33 -0
- package/demo-angular/tsconfig.spec.json +15 -0
- package/package.json +4 -5
- package/theme/components/_accordion.scss +1 -1
- package/theme/components/_buttons.scss +6 -6
- package/theme/components/_content.scss +3 -3
- package/theme/components/_dropdowns.scss +1 -1
- package/theme/components/_forms-check.scss +1 -1
- package/theme/components/_forms-inputs.scss +1 -1
- package/theme/components/_list-group.scss +1 -1
- package/theme/components/_modals.scss +1 -1
- package/theme/components/_navigation.scss +2 -2
- package/theme/components/_overlays.scss +2 -2
- package/theme/components/_pagination.scss +1 -1
- package/theme/components/_popovers.scss +1 -1
- package/theme/components/_toasts.scss +1 -1
- package/theme/customizations/_cards.scss +3 -3
- package/theme/customizations/_links.scss +72 -24
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
.code-example-wrapper {
|
|
2
|
+
margin-top: 1rem;
|
|
3
|
+
margin-bottom: 2rem;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.code-header {
|
|
7
|
+
display: flex;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
align-items: center;
|
|
10
|
+
padding: 0.5rem 1rem;
|
|
11
|
+
background: #f8f9fa;
|
|
12
|
+
border: 1px solid #dee2e6;
|
|
13
|
+
border-bottom: none;
|
|
14
|
+
border-radius: 0.375rem 0.375rem 0 0;
|
|
15
|
+
|
|
16
|
+
.code-title {
|
|
17
|
+
font-size: 0.875rem;
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
color: #495057;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.btn-toggle {
|
|
23
|
+
padding: 0.25rem 0.75rem;
|
|
24
|
+
font-size: 0.875rem;
|
|
25
|
+
background: white;
|
|
26
|
+
border: 1px solid #dee2e6;
|
|
27
|
+
border-radius: 0.25rem;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
transition: all 0.2s;
|
|
30
|
+
|
|
31
|
+
&:hover {
|
|
32
|
+
background: #e9ecef;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.code-example {
|
|
38
|
+
background: #282c34;
|
|
39
|
+
border: 1px solid #dee2e6;
|
|
40
|
+
border-radius: 0 0 0.375rem 0.375rem;
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
direction: ltr;
|
|
43
|
+
|
|
44
|
+
.code-tabs {
|
|
45
|
+
display: flex;
|
|
46
|
+
gap: 0.5rem;
|
|
47
|
+
padding: 0.75rem 1rem;
|
|
48
|
+
background: #21252b;
|
|
49
|
+
border-bottom: 1px solid #181a1f;
|
|
50
|
+
|
|
51
|
+
.tab-btn {
|
|
52
|
+
padding: 0.375rem 0.875rem;
|
|
53
|
+
font-size: 0.813rem;
|
|
54
|
+
font-weight: 500;
|
|
55
|
+
color: #abb2bf;
|
|
56
|
+
background: transparent;
|
|
57
|
+
border: 1px solid transparent;
|
|
58
|
+
border-radius: 0.25rem;
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
transition: all 0.2s;
|
|
61
|
+
text-transform: uppercase;
|
|
62
|
+
|
|
63
|
+
&:hover {
|
|
64
|
+
color: #ffffff;
|
|
65
|
+
background: #282c34;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&.active {
|
|
69
|
+
color: #61afef;
|
|
70
|
+
background: #282c34;
|
|
71
|
+
border-color: #61afef;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.btn-copy {
|
|
76
|
+
margin-inline-start: auto;
|
|
77
|
+
padding: 0.375rem 0.875rem;
|
|
78
|
+
font-size: 0.813rem;
|
|
79
|
+
font-weight: 500;
|
|
80
|
+
color: #98c379;
|
|
81
|
+
background: transparent;
|
|
82
|
+
border: 1px solid #98c379;
|
|
83
|
+
border-radius: 0.25rem;
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
transition: all 0.2s;
|
|
86
|
+
|
|
87
|
+
&:hover {
|
|
88
|
+
background: #98c37920;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&:active {
|
|
92
|
+
transform: scale(0.95);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
pre {
|
|
98
|
+
margin: 0;
|
|
99
|
+
padding: 1rem;
|
|
100
|
+
overflow-x: auto;
|
|
101
|
+
background: #282c34;
|
|
102
|
+
|
|
103
|
+
code {
|
|
104
|
+
font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
|
|
105
|
+
font-size: 0.875rem;
|
|
106
|
+
line-height: 1.6;
|
|
107
|
+
color: #abb2bf;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Syntax highlighting styles (Atom One Dark theme)
|
|
113
|
+
:host ::ng-deep {
|
|
114
|
+
.hljs-comment,
|
|
115
|
+
.hljs-quote {
|
|
116
|
+
color: #5c6370;
|
|
117
|
+
font-style: italic;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.hljs-doctag,
|
|
121
|
+
.hljs-keyword,
|
|
122
|
+
.hljs-formula {
|
|
123
|
+
color: #c678dd;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.hljs-section,
|
|
127
|
+
.hljs-name,
|
|
128
|
+
.hljs-selector-tag,
|
|
129
|
+
.hljs-deletion,
|
|
130
|
+
.hljs-subst {
|
|
131
|
+
color: #e06c75;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.hljs-literal {
|
|
135
|
+
color: #56b6c2;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.hljs-string,
|
|
139
|
+
.hljs-regexp,
|
|
140
|
+
.hljs-addition,
|
|
141
|
+
.hljs-attribute,
|
|
142
|
+
.hljs-meta .hljs-string {
|
|
143
|
+
color: #98c379;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.hljs-attr,
|
|
147
|
+
.hljs-variable,
|
|
148
|
+
.hljs-template-variable,
|
|
149
|
+
.hljs-type,
|
|
150
|
+
.hljs-selector-class,
|
|
151
|
+
.hljs-selector-attr,
|
|
152
|
+
.hljs-selector-pseudo,
|
|
153
|
+
.hljs-number {
|
|
154
|
+
color: #d19a66;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.hljs-symbol,
|
|
158
|
+
.hljs-bullet,
|
|
159
|
+
.hljs-link,
|
|
160
|
+
.hljs-meta,
|
|
161
|
+
.hljs-selector-id,
|
|
162
|
+
.hljs-title {
|
|
163
|
+
color: #61afef;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.hljs-built_in,
|
|
167
|
+
.hljs-title.class_,
|
|
168
|
+
.hljs-class .hljs-title {
|
|
169
|
+
color: #e6c07b;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.hljs-emphasis {
|
|
173
|
+
font-style: italic;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.hljs-strong {
|
|
177
|
+
font-weight: bold;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.hljs-link {
|
|
181
|
+
text-decoration: underline;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Component, Input, signal } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
4
|
+
import hljs from 'highlight.js';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: 'app-code-example',
|
|
8
|
+
imports: [CommonModule, TranslateModule],
|
|
9
|
+
templateUrl: './code-example.component.html',
|
|
10
|
+
styleUrls: ['./code-example.component.scss'],
|
|
11
|
+
})
|
|
12
|
+
export class CodeExampleComponent {
|
|
13
|
+
@Input() htmlCode?: string;
|
|
14
|
+
@Input() tsCode?: string;
|
|
15
|
+
@Input() scssCode?: string;
|
|
16
|
+
@Input() title?: string;
|
|
17
|
+
@Input() expanded = false;
|
|
18
|
+
|
|
19
|
+
isExpanded = signal(false);
|
|
20
|
+
activeTab = signal<'html' | 'ts' | 'scss'>('html');
|
|
21
|
+
copySuccess = signal(false);
|
|
22
|
+
|
|
23
|
+
ngOnInit() {
|
|
24
|
+
this.isExpanded.set(this.expanded);
|
|
25
|
+
// Set initial active tab to first available code
|
|
26
|
+
if (this.htmlCode) this.activeTab.set('html');
|
|
27
|
+
else if (this.tsCode) this.activeTab.set('ts');
|
|
28
|
+
else if (this.scssCode) this.activeTab.set('scss');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
toggleExpand() {
|
|
32
|
+
this.isExpanded.update((value) => !value);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
setActiveTab(tab: 'html' | 'ts' | 'scss') {
|
|
36
|
+
this.activeTab.set(tab);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
get currentCode(): string {
|
|
40
|
+
const tab = this.activeTab();
|
|
41
|
+
if (tab === 'html' && this.htmlCode) return this.htmlCode;
|
|
42
|
+
if (tab === 'ts' && this.tsCode) return this.tsCode;
|
|
43
|
+
if (tab === 'scss' && this.scssCode) return this.scssCode;
|
|
44
|
+
return '';
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
get highlightedCode(): string {
|
|
48
|
+
const code = this.currentCode;
|
|
49
|
+
const tab = this.activeTab();
|
|
50
|
+
let language = 'html';
|
|
51
|
+
if (tab === 'ts') language = 'typescript';
|
|
52
|
+
if (tab === 'scss') language = 'scss';
|
|
53
|
+
|
|
54
|
+
try {
|
|
55
|
+
return hljs.highlight(code, { language }).value;
|
|
56
|
+
} catch {
|
|
57
|
+
return code;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
get availableTabs(): Array<'html' | 'ts' | 'scss'> {
|
|
62
|
+
const tabs: Array<'html' | 'ts' | 'scss'> = [];
|
|
63
|
+
if (this.htmlCode) tabs.push('html');
|
|
64
|
+
if (this.tsCode) tabs.push('ts');
|
|
65
|
+
if (this.scssCode) tabs.push('scss');
|
|
66
|
+
return tabs;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
async copyCode() {
|
|
70
|
+
try {
|
|
71
|
+
await navigator.clipboard.writeText(this.currentCode);
|
|
72
|
+
this.copySuccess.set(true);
|
|
73
|
+
setTimeout(() => this.copySuccess.set(false), 2000);
|
|
74
|
+
} catch (err) {
|
|
75
|
+
console.error('Failed to copy code:', err);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
<div class="container py-5">
|
|
2
|
+
<h1 class="display-4 mb-4">{{ 'alerts.title' | translate }}</h1>
|
|
3
|
+
<p class="lead mb-5">{{ 'alerts.subtitle' | translate }}</p>
|
|
4
|
+
|
|
5
|
+
<section class="demo-section">
|
|
6
|
+
<h2>{{ 'alerts.section_dismissible' | translate }}</h2>
|
|
7
|
+
<div class="d-flex flex-wrap gap-3">
|
|
8
|
+
<section>
|
|
9
|
+
<h3 class="h5 mb-3">Standard Alerts</h3>
|
|
10
|
+
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
|
11
|
+
<i class="hgi hgi-stroke hgi-tick-02 alert-icon"></i>
|
|
12
|
+
<div>
|
|
13
|
+
<strong class="alert-title">{{ 'alerts.success' | translate }}</strong> {{ 'alerts.success_text' | translate }}
|
|
14
|
+
<div class="alert-footer">
|
|
15
|
+
<button type="button" class="btn btn-subtle">{{ 'buttons.normal' | translate }}</button>
|
|
16
|
+
<button type="button" class="btn btn-subtle">{{ 'buttons.normal' | translate }}</button>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" [attr.aria-label]="'common.close' | translate"></button>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<app-code-example [htmlCode]="successAlertCode"></app-code-example>
|
|
23
|
+
|
|
24
|
+
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
|
25
|
+
<i class="hgi hgi-stroke hgi-help-circle alert-icon"></i>
|
|
26
|
+
<div>
|
|
27
|
+
<strong class="alert-title">{{ 'alerts.danger' | translate }}</strong> {{ 'alerts.danger_text' | translate }}
|
|
28
|
+
<div class="alert-footer">
|
|
29
|
+
<button type="button" class="btn btn-subtle">{{ 'buttons.normal' | translate }}</button>
|
|
30
|
+
<button type="button" class="btn btn-subtle">{{ 'buttons.normal' | translate }}</button>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" [attr.aria-label]="'common.close' | translate"></button>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<app-code-example [htmlCode]="dangerAlertCode"></app-code-example>
|
|
37
|
+
|
|
38
|
+
<div class="alert alert-warning alert-dismissible fade show" role="alert">
|
|
39
|
+
<i class="hgi hgi-stroke hgi-alert-02 alert-icon"></i>
|
|
40
|
+
<div>
|
|
41
|
+
<strong class="alert-title">{{ 'alerts.warning' | translate }}</strong> {{ 'alerts.warning_text' | translate }}
|
|
42
|
+
<div class="alert-footer">
|
|
43
|
+
<button type="button" class="btn btn-subtle">{{ 'buttons.normal' | translate }}</button>
|
|
44
|
+
<button type="button" class="btn btn-subtle">{{ 'buttons.normal' | translate }}</button>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" [attr.aria-label]="'common.close' | translate"></button>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<app-code-example [htmlCode]="warningAlertCode"></app-code-example>
|
|
51
|
+
|
|
52
|
+
<div class="alert alert-info alert-dismissible fade show" role="alert">
|
|
53
|
+
<i class="hgi hgi-stroke hgi-help-circle alert-icon"></i>
|
|
54
|
+
<div>
|
|
55
|
+
<strong class="alert-title">{{ 'alerts.info' | translate }}</strong> {{ 'alerts.info_text' | translate }}
|
|
56
|
+
<div class="alert-footer">
|
|
57
|
+
<button type="button" class="btn btn-subtle">{{ 'buttons.normal' | translate }}</button>
|
|
58
|
+
<button type="button" class="btn btn-subtle">{{ 'buttons.normal' | translate }}</button>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" [attr.aria-label]="'common.close' | translate"></button>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<app-code-example [htmlCode]="infoAlertCode"></app-code-example>
|
|
65
|
+
|
|
66
|
+
<div class="alert alert-neutral alert-dismissible fade show" role="alert">
|
|
67
|
+
<i class="hgi hgi-stroke hgi-help-circle alert-icon"></i>
|
|
68
|
+
<div>
|
|
69
|
+
<strong class="alert-title">{{ 'alerts.neutral' | translate }}</strong> {{ 'alerts.neutral_text' | translate }}
|
|
70
|
+
<div class="alert-footer">
|
|
71
|
+
<button type="button" class="btn btn-subtle">{{ 'buttons.normal' | translate }}</button>
|
|
72
|
+
<button type="button" class="btn btn-subtle">{{ 'buttons.normal' | translate }}</button>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" [attr.aria-label]="'common.close' | translate"></button>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<app-code-example [htmlCode]="neutralAlertCode"></app-code-example>
|
|
79
|
+
</section>
|
|
80
|
+
|
|
81
|
+
<section>
|
|
82
|
+
<h3 class="h5 mb-3">Side-bordered Alerts</h3>
|
|
83
|
+
<div class="alert alert-side alert-success alert-dismissible fade show" role="alert">
|
|
84
|
+
<i class="hgi hgi-stroke hgi-tick-02 alert-icon"></i>
|
|
85
|
+
<div>
|
|
86
|
+
<strong class="alert-title">{{ 'alerts.success' | translate }}</strong> {{ 'alerts.success_text' | translate }}
|
|
87
|
+
<div class="alert-footer">
|
|
88
|
+
<button type="button" class="btn btn-subtle">{{ 'buttons.normal' | translate }}</button>
|
|
89
|
+
<button type="button" class="btn btn-subtle">{{ 'buttons.normal' | translate }}</button>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" [attr.aria-label]="'common.close' | translate"></button>
|
|
93
|
+
</div>
|
|
94
|
+
|
|
95
|
+
<app-code-example [htmlCode]="sideSuccessAlertCode"></app-code-example>
|
|
96
|
+
|
|
97
|
+
<div class="alert alert-side alert-danger alert-dismissible fade show" role="alert">
|
|
98
|
+
<i class="hgi hgi-stroke hgi-help-circle alert-icon"></i>
|
|
99
|
+
<div>
|
|
100
|
+
<strong class="alert-title">{{ 'alerts.danger' | translate }}</strong> {{ 'alerts.danger_text' | translate }}
|
|
101
|
+
<div class="alert-footer">
|
|
102
|
+
<button type="button" class="btn btn-subtle">{{ 'buttons.normal' | translate }}</button>
|
|
103
|
+
<button type="button" class="btn btn-subtle">{{ 'buttons.normal' | translate }}</button>
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" [attr.aria-label]="'common.close' | translate"></button>
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
<app-code-example [htmlCode]="sideDangerAlertCode"></app-code-example>
|
|
110
|
+
|
|
111
|
+
<div class="alert alert-side alert-warning alert-dismissible fade show" role="alert">
|
|
112
|
+
<i class="hgi hgi-stroke hgi-alert-02 alert-icon"></i>
|
|
113
|
+
<div>
|
|
114
|
+
<strong class="alert-title">{{ 'alerts.warning' | translate }}</strong> {{ 'alerts.warning_text' | translate }}
|
|
115
|
+
<div class="alert-footer">
|
|
116
|
+
<button type="button" class="btn btn-subtle">{{ 'buttons.normal' | translate }}</button>
|
|
117
|
+
<button type="button" class="btn btn-subtle">{{ 'buttons.normal' | translate }}</button>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" [attr.aria-label]="'common.close' | translate"></button>
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
<app-code-example [htmlCode]="sideWarningAlertCode"></app-code-example>
|
|
124
|
+
|
|
125
|
+
<div class="alert alert-side alert-info alert-dismissible fade show" role="alert">
|
|
126
|
+
<i class="hgi hgi-stroke hgi-alert-02 alert-icon"></i>
|
|
127
|
+
<div>
|
|
128
|
+
<strong class="alert-title">{{ 'alerts.info' | translate }}</strong> {{ 'alerts.info_text' | translate }}
|
|
129
|
+
<div class="alert-footer">
|
|
130
|
+
<button type="button" class="btn btn-subtle">{{ 'buttons.normal' | translate }}</button>
|
|
131
|
+
<button type="button" class="btn btn-subtle">{{ 'buttons.normal' | translate }}</button>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" [attr.aria-label]="'common.close' | translate"></button>
|
|
135
|
+
</div>
|
|
136
|
+
|
|
137
|
+
<app-code-example [htmlCode]="sideInfoAlertCode"></app-code-example>
|
|
138
|
+
|
|
139
|
+
<div class="alert alert-side alert-neutral alert-dismissible fade show" role="alert">
|
|
140
|
+
<i class="hgi hgi-stroke hgi-help-circle alert-icon"></i>
|
|
141
|
+
<div>
|
|
142
|
+
<strong class="alert-title">{{ 'alerts.neutral' | translate }}</strong> {{ 'alerts.neutral_text' | translate }}
|
|
143
|
+
<div class="alert-footer">
|
|
144
|
+
<button type="button" class="btn btn-subtle">{{ 'buttons.normal' | translate }}</button>
|
|
145
|
+
<button type="button" class="btn btn-subtle">{{ 'buttons.normal' | translate }}</button>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" [attr.aria-label]="'common.close' | translate"></button>
|
|
149
|
+
</div>
|
|
150
|
+
|
|
151
|
+
<app-code-example [htmlCode]="sideNeutralAlertCode"></app-code-example>
|
|
152
|
+
</section>
|
|
153
|
+
</div>
|
|
154
|
+
</section>
|
|
155
|
+
</div>
|
|
@@ -0,0 +1,134 @@
|
|
|
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-alerts',
|
|
7
|
+
imports: [TranslateModule, CodeExampleComponent],
|
|
8
|
+
templateUrl: './alerts.component.html',
|
|
9
|
+
styleUrl: './alerts.component.scss',
|
|
10
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
11
|
+
})
|
|
12
|
+
export class AlertsComponent {
|
|
13
|
+
// Standard Dismissible Alerts
|
|
14
|
+
successAlertCode = `<div class="alert alert-success alert-dismissible fade show" role="alert">
|
|
15
|
+
<i class="hgi hgi-stroke hgi-tick-02 alert-icon"></i>
|
|
16
|
+
<div>
|
|
17
|
+
<strong class="alert-title">Success!</strong> Your action completed successfully.
|
|
18
|
+
<div class="alert-footer">
|
|
19
|
+
<button type="button" class="btn btn-subtle">Action</button>
|
|
20
|
+
<button type="button" class="btn btn-subtle">Cancel</button>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
24
|
+
</div>`;
|
|
25
|
+
|
|
26
|
+
dangerAlertCode = `<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
|
27
|
+
<i class="hgi hgi-stroke hgi-help-circle alert-icon"></i>
|
|
28
|
+
<div>
|
|
29
|
+
<strong class="alert-title">Error!</strong> Something went wrong with your request.
|
|
30
|
+
<div class="alert-footer">
|
|
31
|
+
<button type="button" class="btn btn-subtle">Retry</button>
|
|
32
|
+
<button type="button" class="btn btn-subtle">Cancel</button>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
36
|
+
</div>`;
|
|
37
|
+
|
|
38
|
+
warningAlertCode = `<div class="alert alert-warning alert-dismissible fade show" role="alert">
|
|
39
|
+
<i class="hgi hgi-stroke hgi-alert-02 alert-icon"></i>
|
|
40
|
+
<div>
|
|
41
|
+
<strong class="alert-title">Warning!</strong> Please review before proceeding.
|
|
42
|
+
<div class="alert-footer">
|
|
43
|
+
<button type="button" class="btn btn-subtle">Review</button>
|
|
44
|
+
<button type="button" class="btn btn-subtle">Dismiss</button>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
48
|
+
</div>`;
|
|
49
|
+
|
|
50
|
+
infoAlertCode = `<div class="alert alert-info alert-dismissible fade show" role="alert">
|
|
51
|
+
<i class="hgi hgi-stroke hgi-help-circle alert-icon"></i>
|
|
52
|
+
<div>
|
|
53
|
+
<strong class="alert-title">Info</strong> Here's some helpful information.
|
|
54
|
+
<div class="alert-footer">
|
|
55
|
+
<button type="button" class="btn btn-subtle">Learn More</button>
|
|
56
|
+
<button type="button" class="btn btn-subtle">Dismiss</button>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
60
|
+
</div>`;
|
|
61
|
+
|
|
62
|
+
neutralAlertCode = `<div class="alert alert-neutral alert-dismissible fade show" role="alert">
|
|
63
|
+
<i class="hgi hgi-stroke hgi-help-circle alert-icon"></i>
|
|
64
|
+
<div>
|
|
65
|
+
<strong class="alert-title">Neutral</strong> Standard notification message.
|
|
66
|
+
<div class="alert-footer">
|
|
67
|
+
<button type="button" class="btn btn-subtle">Action</button>
|
|
68
|
+
<button type="button" class="btn btn-subtle">Cancel</button>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
72
|
+
</div>`;
|
|
73
|
+
|
|
74
|
+
// Side-bordered Alerts
|
|
75
|
+
sideSuccessAlertCode = `<div class="alert alert-side alert-success alert-dismissible fade show" role="alert">
|
|
76
|
+
<i class="hgi hgi-stroke hgi-tick-02 alert-icon"></i>
|
|
77
|
+
<div>
|
|
78
|
+
<strong class="alert-title">Success!</strong> Your action completed successfully.
|
|
79
|
+
<div class="alert-footer">
|
|
80
|
+
<button type="button" class="btn btn-subtle">Action</button>
|
|
81
|
+
<button type="button" class="btn btn-subtle">Cancel</button>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
85
|
+
</div>`;
|
|
86
|
+
|
|
87
|
+
sideDangerAlertCode = `<div class="alert alert-side alert-danger alert-dismissible fade show" role="alert">
|
|
88
|
+
<i class="hgi hgi-stroke hgi-help-circle alert-icon"></i>
|
|
89
|
+
<div>
|
|
90
|
+
<strong class="alert-title">Error!</strong> Something went wrong with your request.
|
|
91
|
+
<div class="alert-footer">
|
|
92
|
+
<button type="button" class="btn btn-subtle">Retry</button>
|
|
93
|
+
<button type="button" class="btn btn-subtle">Cancel</button>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
97
|
+
</div>`;
|
|
98
|
+
|
|
99
|
+
sideWarningAlertCode = `<div class="alert alert-side alert-warning alert-dismissible fade show" role="alert">
|
|
100
|
+
<i class="hgi hgi-stroke hgi-alert-02 alert-icon"></i>
|
|
101
|
+
<div>
|
|
102
|
+
<strong class="alert-title">Warning!</strong> Please review before proceeding.
|
|
103
|
+
<div class="alert-footer">
|
|
104
|
+
<button type="button" class="btn btn-subtle">Review</button>
|
|
105
|
+
<button type="button" class="btn btn-subtle">Dismiss</button>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
109
|
+
</div>`;
|
|
110
|
+
|
|
111
|
+
sideInfoAlertCode = `<div class="alert alert-side alert-info alert-dismissible fade show" role="alert">
|
|
112
|
+
<i class="hgi hgi-stroke hgi-alert-02 alert-icon"></i>
|
|
113
|
+
<div>
|
|
114
|
+
<strong class="alert-title">Info</strong> Here's some helpful information.
|
|
115
|
+
<div class="alert-footer">
|
|
116
|
+
<button type="button" class="btn btn-subtle">Learn More</button>
|
|
117
|
+
<button type="button" class="btn btn-subtle">Dismiss</button>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
121
|
+
</div>`;
|
|
122
|
+
|
|
123
|
+
sideNeutralAlertCode = `<div class="alert alert-side alert-neutral alert-dismissible fade show" role="alert">
|
|
124
|
+
<i class="hgi hgi-stroke hgi-help-circle alert-icon"></i>
|
|
125
|
+
<div>
|
|
126
|
+
<strong class="alert-title">Neutral</strong> Standard notification message.
|
|
127
|
+
<div class="alert-footer">
|
|
128
|
+
<button type="button" class="btn btn-subtle">Action</button>
|
|
129
|
+
<button type="button" class="btn btn-subtle">Cancel</button>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
133
|
+
</div>`;
|
|
134
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<div class="container py-5">
|
|
2
|
+
<h1 class="display-4 mb-4">{{ 'bootstrap.title' | translate }}</h1>
|
|
3
|
+
<p class="lead mb-5">{{ 'bootstrap.subtitle' | translate }}</p>
|
|
4
|
+
|
|
5
|
+
<app-alerts />
|
|
6
|
+
|
|
7
|
+
<app-buttons />
|
|
8
|
+
|
|
9
|
+
<app-cards />
|
|
10
|
+
|
|
11
|
+
<app-forms />
|
|
12
|
+
|
|
13
|
+
<app-tables />
|
|
14
|
+
</div>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
.demo-section {
|
|
2
|
+
margin-bottom: 3rem;
|
|
3
|
+
padding-bottom: 2rem;
|
|
4
|
+
border-bottom: 1px solid #e5e7eb;
|
|
5
|
+
|
|
6
|
+
&:last-child {
|
|
7
|
+
border-bottom: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
h2 {
|
|
11
|
+
margin-bottom: 1.5rem;
|
|
12
|
+
padding-bottom: 0.5rem;
|
|
13
|
+
border-bottom: 2px solid #1B8354;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
h3 {
|
|
17
|
+
margin-top: 2rem;
|
|
18
|
+
margin-bottom: 1rem;
|
|
19
|
+
font-size: 1.25rem;
|
|
20
|
+
color: #384250;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.component-showcase {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-wrap: wrap;
|
|
27
|
+
gap: 0.75rem;
|
|
28
|
+
margin-bottom: 1.5rem;
|
|
29
|
+
align-items: flex-start;
|
|
30
|
+
|
|
31
|
+
> * {
|
|
32
|
+
flex: 0 0 auto;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.demo-card-grid {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-wrap: wrap;
|
|
39
|
+
gap: 1rem;
|
|
40
|
+
align-items: flex-start;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.toast-container-demo {
|
|
44
|
+
position: fixed;
|
|
45
|
+
top: 1rem;
|
|
46
|
+
right: 1rem;
|
|
47
|
+
z-index: 1090;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Radius Showcase
|
|
51
|
+
.radius-showcase {
|
|
52
|
+
display: grid;
|
|
53
|
+
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
|
|
54
|
+
gap: 1.5rem;
|
|
55
|
+
margin-bottom: 2rem;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.radius-item {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
align-items: flex-start;
|
|
62
|
+
gap: 0.5rem;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.radius-box {
|
|
66
|
+
width: 180px;
|
|
67
|
+
height: 140px;
|
|
68
|
+
background-color: #ffffff;
|
|
69
|
+
border: 1px solid #D2D6DB;
|
|
70
|
+
|
|
71
|
+
&.circle {
|
|
72
|
+
width: 140px;
|
|
73
|
+
height: 140px;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.radius-label {
|
|
78
|
+
font-size: 0.875rem;
|
|
79
|
+
font-weight: 600;
|
|
80
|
+
color: #111927;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.radius-value {
|
|
84
|
+
font-size: 0.875rem;
|
|
85
|
+
color: #4D5761;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.radius-pixels {
|
|
89
|
+
font-size: 0.75rem;
|
|
90
|
+
color: #6C737F;
|
|
91
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Component, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
3
|
+
import { AlertsComponent } from '../alerts/alerts.component';
|
|
4
|
+
import { ButtonsComponent } from '../buttons/buttons.component';
|
|
5
|
+
import { CardsComponent } from '../cards/cards.component';
|
|
6
|
+
import { FormsComponent } from '../forms/forms.component';
|
|
7
|
+
import { TablesComponent } from '../tables/tables.component';
|
|
8
|
+
|
|
9
|
+
@Component({
|
|
10
|
+
selector: 'app-bootstrap',
|
|
11
|
+
imports: [
|
|
12
|
+
TranslateModule,
|
|
13
|
+
AlertsComponent,
|
|
14
|
+
ButtonsComponent,
|
|
15
|
+
CardsComponent,
|
|
16
|
+
FormsComponent,
|
|
17
|
+
TablesComponent
|
|
18
|
+
],
|
|
19
|
+
templateUrl: './bootstrap.component.html',
|
|
20
|
+
styleUrl: './bootstrap.component.scss',
|
|
21
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
22
|
+
})
|
|
23
|
+
export class BootstrapComponent {}
|