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.
- package/css/dga-ui.css +16 -2
- package/css/dga-ui.css.map +1 -1
- package/package.json +20 -4
- package/theme/customizations/_links.scss +22 -21
- package/.editorconfig +0 -23
- package/.github/workflows/deploy.yml +0 -71
- package/.github/workflows/publish.yml +0 -36
- package/.prettierignore +0 -73
- package/.prettierrc +0 -17
- package/demo-angular/.editorconfig +0 -17
- package/demo-angular/.vscode/extensions.json +0 -4
- package/demo-angular/.vscode/launch.json +0 -20
- package/demo-angular/.vscode/tasks.json +0 -42
- package/demo-angular/README.md +0 -91
- package/demo-angular/angular.json +0 -96
- package/demo-angular/package-lock.json +0 -10600
- package/demo-angular/package.json +0 -53
- package/demo-angular/public/404.html +0 -35
- package/demo-angular/public/favicon.ico +0 -0
- package/demo-angular/public/i18n/ar.json +0 -289
- package/demo-angular/public/i18n/en.json +0 -289
- package/demo-angular/src/app/app.config.ts +0 -20
- package/demo-angular/src/app/app.html +0 -52
- package/demo-angular/src/app/app.routes.ts +0 -49
- package/demo-angular/src/app/app.scss +0 -430
- package/demo-angular/src/app/app.spec.ts +0 -23
- package/demo-angular/src/app/app.ts +0 -97
- package/demo-angular/src/app/shared/code-example/code-example.component.html +0 -30
- package/demo-angular/src/app/shared/code-example/code-example.component.scss +0 -183
- package/demo-angular/src/app/shared/code-example/code-example.component.ts +0 -89
- package/demo-angular/src/app/views/alerts/alerts.component.html +0 -155
- package/demo-angular/src/app/views/alerts/alerts.component.scss +0 -3
- package/demo-angular/src/app/views/alerts/alerts.component.ts +0 -134
- package/demo-angular/src/app/views/buttons/buttons.component.html +0 -360
- package/demo-angular/src/app/views/buttons/buttons.component.scss +0 -11
- package/demo-angular/src/app/views/buttons/buttons.component.ts +0 -225
- package/demo-angular/src/app/views/cards/cards.component.html +0 -156
- package/demo-angular/src/app/views/cards/cards.component.html.backup +0 -156
- package/demo-angular/src/app/views/cards/cards.component.scss +0 -11
- package/demo-angular/src/app/views/cards/cards.component.ts +0 -194
- package/demo-angular/src/app/views/footer/footer.html +0 -270
- package/demo-angular/src/app/views/footer/footer.ts +0 -276
- package/demo-angular/src/app/views/forms/forms.component.html +0 -347
- package/demo-angular/src/app/views/forms/forms.component.scss +0 -3
- package/demo-angular/src/app/views/forms/forms.component.ts +0 -222
- package/demo-angular/src/app/views/header/header.html +0 -1
- package/demo-angular/src/app/views/header/header.scss +0 -0
- package/demo-angular/src/app/views/header/header.spec.ts +0 -23
- package/demo-angular/src/app/views/header/header.ts +0 -11
- package/demo-angular/src/app/views/home/home.component.html +0 -33
- package/demo-angular/src/app/views/home/home.component.scss +0 -35
- package/demo-angular/src/app/views/home/home.component.ts +0 -12
- package/demo-angular/src/app/views/links/links.component.html +0 -21
- package/demo-angular/src/app/views/links/links.component.scss +0 -11
- package/demo-angular/src/app/views/links/links.component.ts +0 -19
- package/demo-angular/src/app/views/tables/tables.component.html +0 -289
- package/demo-angular/src/app/views/tables/tables.component.scss +0 -3
- package/demo-angular/src/app/views/tables/tables.component.ts +0 -278
- package/demo-angular/src/app/views/toasts/toasts.component.html +0 -201
- package/demo-angular/src/app/views/toasts/toasts.component.scss +0 -0
- package/demo-angular/src/app/views/toasts/toasts.component.ts +0 -182
- package/demo-angular/src/index.html +0 -28
- package/demo-angular/src/main.ts +0 -6
- package/demo-angular/src/styles.scss +0 -4
- package/demo-angular/tsconfig.app.json +0 -16
- package/demo-angular/tsconfig.json +0 -33
- package/demo-angular/tsconfig.spec.json +0 -15
- package/sdga-ui/README.md +0 -45
- package/sdga-ui/content/docs/components/alerts.mdx +0 -475
- package/sdga-ui/content/docs/index.mdx +0 -239
- package/sdga-ui/next.config.mjs +0 -10
- package/sdga-ui/package-lock.json +0 -5851
- package/sdga-ui/package.json +0 -32
- package/sdga-ui/postcss.config.mjs +0 -5
- package/sdga-ui/source.config.ts +0 -27
- package/sdga-ui/src/app/(home)/layout.tsx +0 -6
- package/sdga-ui/src/app/(home)/page.tsx +0 -202
- package/sdga-ui/src/app/api/search/route.ts +0 -7
- package/sdga-ui/src/app/docs/[[...slug]]/page.tsx +0 -54
- package/sdga-ui/src/app/docs/layout.tsx +0 -11
- package/sdga-ui/src/app/global.css +0 -3
- package/sdga-ui/src/app/layout.tsx +0 -25
- package/sdga-ui/src/app/llms-full.txt/route.ts +0 -10
- package/sdga-ui/src/app/og/docs/[...slug]/route.tsx +0 -34
- package/sdga-ui/src/app/sdga-scoped.css +0 -7
- package/sdga-ui/src/components/sdga-preview.tsx +0 -105
- package/sdga-ui/src/lib/layout.shared.tsx +0 -9
- package/sdga-ui/src/lib/source.ts +0 -27
- package/sdga-ui/src/mdx-components.tsx +0 -9
- package/sdga-ui/tsconfig.json +0 -46
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
<div class="container py-5">
|
|
2
|
-
<h1 class="display-4 mb-4">{{ 'cards.title' | translate }}</h1>
|
|
3
|
-
<p class="lead mb-5">{{ 'cards.subtitle' | translate }}</p>
|
|
4
|
-
|
|
5
|
-
<section class="demo-section">
|
|
6
|
-
<h2 class="mb-4">{{ 'cards.section_examples' | translate }}</h2>
|
|
7
|
-
|
|
8
|
-
<!-- Card with icon -->
|
|
9
|
-
<h3 class="mb-3">Card with Icon</h3>
|
|
10
|
-
<div class="demo-card-grid mb-3">
|
|
11
|
-
<div class="card" tabindex="0">
|
|
12
|
-
<div class="card-body">
|
|
13
|
-
<h5 class="card-title">
|
|
14
|
-
<i class="bi bi-check-circle card-title-icon"></i>
|
|
15
|
-
</h5>
|
|
16
|
-
<h6 class="card-subtitle mb-2">{{ 'cards.card_title' | translate }}</h6>
|
|
17
|
-
<p class="card-text">{{ 'cards.card_text' | translate }}</p>
|
|
18
|
-
<div class="card-footer">
|
|
19
|
-
<a href="javascript:void(0);" class="btn btn-outline-secondary">{{ 'cards.action_secondary' | translate }}</a>
|
|
20
|
-
<a href="javascript:void(0);" class="btn btn-primary">{{ 'cards.action' | translate }}</a>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
<app-code-example [htmlCode]="cardWithIconCode" title="Card with Icon and Header"></app-code-example>
|
|
26
|
-
|
|
27
|
-
<!-- Card with checkbox -->
|
|
28
|
-
<h3 class="mb-3 mt-5">Card with Checkbox</h3>
|
|
29
|
-
<div class="demo-card-grid mb-3">
|
|
30
|
-
<div class="card" tabindex="0">
|
|
31
|
-
<div class="card-body">
|
|
32
|
-
<h5 class="card-title">
|
|
33
|
-
<input class="card-title-checked form-check-input ripple" type="checkbox" value="" id="check2" aria-label="{{ 'cards.select_card' | translate }}">
|
|
34
|
-
</h5>
|
|
35
|
-
<h6 class="card-subtitle mb-2">{{ 'cards.card_title' | translate }}</h6>
|
|
36
|
-
<p class="card-text">{{ 'cards.card_text' | translate }}</p>
|
|
37
|
-
<div class="card-footer">
|
|
38
|
-
<a href="javascript:void(0);" class="btn btn-outline-secondary">{{ 'cards.action_secondary' | translate }}</a>
|
|
39
|
-
<a href="javascript:void(0);" class="btn btn-primary">{{ 'cards.action' | translate }}</a>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
<app-code-example [htmlCode]="cardWithCheckboxCode" title="Card with Checkbox"></app-code-example>
|
|
45
|
-
|
|
46
|
-
<!-- Disabled card with icon and checkbox -->
|
|
47
|
-
<h3 class="mb-3 mt-5">Disabled Card</h3>
|
|
48
|
-
<div class="demo-card-grid mb-3">
|
|
49
|
-
<div class="card disabled" tabindex="0">
|
|
50
|
-
<div class="card-body">
|
|
51
|
-
<h5 class="card-title">
|
|
52
|
-
<i class="bi bi-check-circle card-title-icon"></i>
|
|
53
|
-
<input class="card-title-checked form-check-input ripple" disabled type="checkbox" value="" id="check1" aria-label="{{ 'cards.select_card' | translate }}">
|
|
54
|
-
</h5>
|
|
55
|
-
<h6 class="card-subtitle mb-2">{{ 'cards.card_title' | translate }}</h6>
|
|
56
|
-
<p class="card-text">{{ 'cards.card_text' | translate }}</p>
|
|
57
|
-
<div class="card-footer">
|
|
58
|
-
<a href="javascript:void(0);" class="btn btn-outline-secondary disabled">{{ 'cards.action_secondary' | translate }}</a>
|
|
59
|
-
<a href="javascript:void(0);" class="btn btn-primary disabled">{{ 'cards.action' | translate }}</a>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
<app-code-example [htmlCode]="disabledCardCode" title="Disabled Card with Icon and Checkbox"></app-code-example>
|
|
65
|
-
|
|
66
|
-
<!-- Card without shadow -->
|
|
67
|
-
<h3 class="mb-3 mt-5">Card without Shadow</h3>
|
|
68
|
-
<div class="demo-card-grid mb-3">
|
|
69
|
-
<div class="card shadow-none" tabindex="0">
|
|
70
|
-
<div class="card-body">
|
|
71
|
-
<h5 class="card-title">
|
|
72
|
-
<input class="card-title-checked form-check-input ripple" type="checkbox" value="" id="check2" aria-label="{{ 'cards.select_card' | translate }}">
|
|
73
|
-
</h5>
|
|
74
|
-
<h6 class="card-subtitle mb-2">{{ 'cards.card_title' | translate }}</h6>
|
|
75
|
-
<p class="card-text">{{ 'cards.card_text' | translate }}</p>
|
|
76
|
-
<div class="card-footer">
|
|
77
|
-
<a href="javascript:void(0);" class="btn btn-outline-secondary">{{ 'cards.action_secondary' | translate }}</a>
|
|
78
|
-
<a href="javascript:void(0);" class="btn btn-primary">{{ 'cards.action' | translate }}</a>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
<app-code-example [htmlCode]="cardNoShadowCode" title="Card with Shadow Removed (shadow-none)"></app-code-example>
|
|
84
|
-
|
|
85
|
-
<!-- Expandable card with checkbox -->
|
|
86
|
-
<h3 class="mb-3 mt-5">Expandable Card (Interactive)</h3>
|
|
87
|
-
<div class="demo-card-grid mb-3">
|
|
88
|
-
<div class="card" tabindex="0" [class.expanded]="isExpanded(1)">
|
|
89
|
-
<div class="card-body">
|
|
90
|
-
<h5 class="card-title">
|
|
91
|
-
<i class="bi bi-check-circle card-title-icon"></i>
|
|
92
|
-
<input class="card-title-checked form-check-input ripple" type="checkbox" value="" id="check3" aria-label="{{ 'cards.select_card' | translate }}">
|
|
93
|
-
</h5>
|
|
94
|
-
<h6 class="card-subtitle mb-2">{{ 'cards.expandable_title' | translate }}</h6>
|
|
95
|
-
<p class="card-text">{{ 'cards.expandable_text' | translate }}</p>
|
|
96
|
-
|
|
97
|
-
@if (isExpanded(1)) {
|
|
98
|
-
<div class="card-expanded-content">
|
|
99
|
-
<p class="mt-3">{{ 'cards.expanded_content' | translate }}</p>
|
|
100
|
-
<ul>
|
|
101
|
-
<li>{{ 'cards.detail_1' | translate }}</li>
|
|
102
|
-
<li>{{ 'cards.detail_2' | translate }}</li>
|
|
103
|
-
<li>{{ 'cards.detail_3' | translate }}</li>
|
|
104
|
-
</ul>
|
|
105
|
-
</div>
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
<div class="card-footer">
|
|
109
|
-
<i class="bi card-expanded-icon" [class.bi-chevron-up]="isExpanded(1)" [class.bi-chevron-down]="!isExpanded(1)" (click)="toggleCard(1)"></i>
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
</div>
|
|
113
|
-
</div>
|
|
114
|
-
<app-code-example
|
|
115
|
-
[htmlCode]="expandableCardHtmlCode"
|
|
116
|
-
[tsCode]="expandableCardTsCode"
|
|
117
|
-
title="Expandable Card with Checkbox - HTML Template"></app-code-example>
|
|
118
|
-
|
|
119
|
-
<!-- Expandable card with actions -->
|
|
120
|
-
<h3 class="mb-3 mt-5">Expandable Card (Simple)</h3>
|
|
121
|
-
<div class="demo-card-grid mb-3">
|
|
122
|
-
<div class="card" tabindex="0" [class.expanded]="isExpanded(2)">
|
|
123
|
-
<div class="card-body">
|
|
124
|
-
<h5 class="card-title">
|
|
125
|
-
<i class="bi bi-check-circle card-title-icon"></i>
|
|
126
|
-
</h5>
|
|
127
|
-
<h6 class="card-subtitle mb-2">{{ 'cards.expandable_title' | translate }}</h6>
|
|
128
|
-
<p class="card-text">{{ 'cards.expandable_text' | translate }}</p>
|
|
129
|
-
|
|
130
|
-
@if (isExpanded(2)) {
|
|
131
|
-
<div class="card-expanded-content">
|
|
132
|
-
<p class="mt-3">{{ 'cards.expanded_content' | translate }}</p>
|
|
133
|
-
<ul>
|
|
134
|
-
<li>{{ 'cards.detail_1' | translate }}</li>
|
|
135
|
-
<li>{{ 'cards.detail_2' | translate }}</li>
|
|
136
|
-
<li>{{ 'cards.detail_3' | translate }}</li>
|
|
137
|
-
</ul>
|
|
138
|
-
<div class="d-flex align-items-center gap-3 mb-3">
|
|
139
|
-
<button class="btn btn-sm btn-primary">{{ 'cards.action' | translate }}</button>
|
|
140
|
-
<button class="btn btn-sm btn-outline-secondary">{{ 'cards.cancel' | translate }}</button>
|
|
141
|
-
</div>
|
|
142
|
-
</div>
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
<div class="card-footer">
|
|
146
|
-
<i class="bi card-expanded-icon" [class.bi-chevron-up]="isExpanded(2)" [class.bi-chevron-down]="!isExpanded(2)" (click)="toggleCard(2)"></i>
|
|
147
|
-
</div>
|
|
148
|
-
</div>
|
|
149
|
-
</div>
|
|
150
|
-
</div>
|
|
151
|
-
<app-code-example
|
|
152
|
-
[htmlCode]="expandableCardSimpleHtmlCode"
|
|
153
|
-
[tsCode]="expandableCardTsCode"
|
|
154
|
-
title="Expandable Card with Actions - HTML Template"></app-code-example>
|
|
155
|
-
</section>
|
|
156
|
-
</div>
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
<div class="container py-5">
|
|
2
|
-
<h1 class="display-4 mb-4">{{ 'cards.title' | translate }}</h1>
|
|
3
|
-
<p class="lead mb-5">{{ 'cards.subtitle' | translate }}</p>
|
|
4
|
-
|
|
5
|
-
<section class="demo-section">
|
|
6
|
-
<h2 class="mb-4">{{ 'cards.section_examples' | translate }}</h2>
|
|
7
|
-
|
|
8
|
-
<div class="demo-card-grid">
|
|
9
|
-
<!-- Card with icon -->
|
|
10
|
-
<div class="card" tabindex="0">
|
|
11
|
-
<div class="card-body">
|
|
12
|
-
<h5 class="card-title">
|
|
13
|
-
<i class="hgi hgi-stroke hgi-checkmark-circle-02 card-title-icon"></i>
|
|
14
|
-
</h5>
|
|
15
|
-
<h6 class="card-subtitle mb-2">{{ 'cards.card_title' | translate }}</h6>
|
|
16
|
-
<p class="card-text">{{ 'cards.card_text' | translate }}</p>
|
|
17
|
-
<div class="card-footer">
|
|
18
|
-
<a href="javascript:void(0);" class="btn btn-outline-secondary">{{ 'cards.action_secondary' | translate }}</a>
|
|
19
|
-
<a href="javascript:void(0);" class="btn btn-primary">{{ 'cards.action' | translate }}</a>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
|
|
24
|
-
<!-- Card with icon and checkbox -->
|
|
25
|
-
<div class="card disabled" tabindex="0">
|
|
26
|
-
<div class="card-body">
|
|
27
|
-
<h5 class="card-title">
|
|
28
|
-
<i class="hgi hgi-stroke hgi-checkmark-circle-02 card-title-icon"></i>
|
|
29
|
-
<input class="card-title-checked form-check-input ripple" disabled type="checkbox" value="" id="check1" aria-label="{{ 'cards.select_card' | translate }}">
|
|
30
|
-
</h5>
|
|
31
|
-
<h6 class="card-subtitle mb-2">{{ 'cards.card_title' | translate }}</h6>
|
|
32
|
-
<p class="card-text">{{ 'cards.card_text' | translate }}</p>
|
|
33
|
-
<div class="card-footer">
|
|
34
|
-
<a href="javascript:void(0);" class="btn btn-outline-secondary disabled">{{ 'cards.action_secondary' | translate }}</a>
|
|
35
|
-
<a href="javascript:void(0);" class="btn btn-primary disabled">{{ 'cards.action' | translate }}</a>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
|
|
40
|
-
<!-- Card with checkbox only -->
|
|
41
|
-
<div class="card" tabindex="0">
|
|
42
|
-
<div class="card-body">
|
|
43
|
-
<h5 class="card-title">
|
|
44
|
-
<input class="card-title-checked form-check-input ripple" type="checkbox" value="" id="check2" aria-label="{{ 'cards.select_card' | translate }}">
|
|
45
|
-
</h5>
|
|
46
|
-
<h6 class="card-subtitle mb-2">{{ 'cards.card_title' | translate }}</h6>
|
|
47
|
-
<p class="card-text">{{ 'cards.card_text' | translate }}</p>
|
|
48
|
-
<div class="card-footer">
|
|
49
|
-
<a href="javascript:void(0);" class="btn btn-outline-secondary">{{ 'cards.action_secondary' | translate }}</a>
|
|
50
|
-
<a href="javascript:void(0);" class="btn btn-primary">{{ 'cards.action' | translate }}</a>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
<!-- Card without shadow only -->
|
|
57
|
-
<div class="card shadow-none" tabindex="0">
|
|
58
|
-
<div class="card-body">
|
|
59
|
-
<h5 class="card-title">
|
|
60
|
-
<input class="card-title-checked form-check-input ripple" type="checkbox" value="" id="check2" aria-label="{{ 'cards.select_card' | translate }}">
|
|
61
|
-
</h5>
|
|
62
|
-
<h6 class="card-subtitle mb-2">{{ 'cards.card_title' | translate }}</h6>
|
|
63
|
-
<p class="card-text">{{ 'cards.card_text' | translate }}</p>
|
|
64
|
-
<div class="card-footer">
|
|
65
|
-
<a href="javascript:void(0);" class="btn btn-outline-secondary">{{ 'cards.action_secondary' | translate }}</a>
|
|
66
|
-
<a href="javascript:void(0);" class="btn btn-primary">{{ 'cards.action' | translate }}</a>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
|
|
71
|
-
<!-- Expandable card with checkbox -->
|
|
72
|
-
<div class="card" tabindex="0" [class.expanded]="isExpanded(1)">
|
|
73
|
-
<div class="card-body">
|
|
74
|
-
<h5 class="card-title">
|
|
75
|
-
<i class="hgi hgi-stroke hgi-checkmark-circle-02 card-title-icon"></i>
|
|
76
|
-
<input class="card-title-checked form-check-input ripple" type="checkbox" value="" id="check3" aria-label="{{ 'cards.select_card' | translate }}">
|
|
77
|
-
</h5>
|
|
78
|
-
<h6 class="card-subtitle mb-2">{{ 'cards.expandable_title' | translate }}</h6>
|
|
79
|
-
<p class="card-text">{{ 'cards.expandable_text' | translate }}</p>
|
|
80
|
-
|
|
81
|
-
@if (isExpanded(1)) {
|
|
82
|
-
<div class="card-expanded-content">
|
|
83
|
-
<p class="mt-3">{{ 'cards.expanded_content' | translate }}</p>
|
|
84
|
-
<ul>
|
|
85
|
-
<li>{{ 'cards.detail_1' | translate }}</li>
|
|
86
|
-
<li>{{ 'cards.detail_2' | translate }}</li>
|
|
87
|
-
<li>{{ 'cards.detail_3' | translate }}</li>
|
|
88
|
-
</ul>
|
|
89
|
-
</div>
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
<div class="card-footer">
|
|
93
|
-
<i class="hgi hgi-stroke hgi-arrow-up-01 card-expanded-icon" [class.hgi-arrow-up-01]="isExpanded(1)" [class.hgi-arrow-down-01]="!isExpanded(1)" (click)="toggleCard(1)"></i>
|
|
94
|
-
</div>
|
|
95
|
-
</div>
|
|
96
|
-
</div>
|
|
97
|
-
|
|
98
|
-
<!-- Expandable card -->
|
|
99
|
-
<div class="card" tabindex="0" [class.expanded]="isExpanded(2)">
|
|
100
|
-
<div class="card-body">
|
|
101
|
-
<h5 class="card-title">
|
|
102
|
-
<i class="hgi hgi-stroke hgi-checkmark-circle-02 card-title-icon"></i>
|
|
103
|
-
</h5>
|
|
104
|
-
<h6 class="card-subtitle mb-2">{{ 'cards.expandable_title' | translate }}</h6>
|
|
105
|
-
<p class="card-text">{{ 'cards.expandable_text' | translate }}</p>
|
|
106
|
-
|
|
107
|
-
@if (isExpanded(2)) {
|
|
108
|
-
<div class="card-expanded-content">
|
|
109
|
-
<p class="mt-3">{{ 'cards.expanded_content' | translate }}</p>
|
|
110
|
-
<ul>
|
|
111
|
-
<li>{{ 'cards.detail_1' | translate }}</li>
|
|
112
|
-
<li>{{ 'cards.detail_2' | translate }}</li>
|
|
113
|
-
<li>{{ 'cards.detail_3' | translate }}</li>
|
|
114
|
-
</ul>
|
|
115
|
-
<div class="d-flex align-items-center gap-3 mb-3">
|
|
116
|
-
<button class="btn btn-sm btn-primary">{{ 'cards.action' | translate }}</button>
|
|
117
|
-
<button class="btn btn-sm btn-outline-secondary">{{ 'cards.cancel' | translate }}</button>
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
<div class="card-footer">
|
|
123
|
-
<i class="hgi hgi-stroke hgi-arrow-up-01 card-expanded-icon" [class.hgi-arrow-up-01]="isExpanded(2)" [class.hgi-arrow-down-01]="!isExpanded(2)" (click)="toggleCard(2)"></i>
|
|
124
|
-
</div>
|
|
125
|
-
</div>
|
|
126
|
-
</div>
|
|
127
|
-
</div>
|
|
128
|
-
|
|
129
|
-
<!-- Code Examples -->
|
|
130
|
-
<div class="mt-5">
|
|
131
|
-
<h3 class="mb-4">Card with Icon</h3>
|
|
132
|
-
<app-code-example [htmlCode]="cardWithIconCode" title="Card with Icon and Header"></app-code-example>
|
|
133
|
-
|
|
134
|
-
<h3 class="mb-4 mt-5">Card with Checkbox</h3>
|
|
135
|
-
<app-code-example [htmlCode]="cardWithCheckboxCode" title="Card with Checkbox"></app-code-example>
|
|
136
|
-
|
|
137
|
-
<h3 class="mb-4 mt-5">Disabled Card</h3>
|
|
138
|
-
<app-code-example [htmlCode]="disabledCardCode" title="Disabled Card with Icon and Checkbox"></app-code-example>
|
|
139
|
-
|
|
140
|
-
<h3 class="mb-4 mt-5">Card without Shadow</h3>
|
|
141
|
-
<app-code-example [htmlCode]="cardNoShadowCode" title="Card with Shadow Removed (shadow-none)"></app-code-example>
|
|
142
|
-
|
|
143
|
-
<h3 class="mb-4 mt-5">Expandable Card (Interactive)</h3>
|
|
144
|
-
<app-code-example
|
|
145
|
-
[htmlCode]="expandableCardHtmlCode"
|
|
146
|
-
[tsCode]="expandableCardTsCode"
|
|
147
|
-
title="Expandable Card with Checkbox - HTML Template"></app-code-example>
|
|
148
|
-
|
|
149
|
-
<h3 class="mb-4 mt-5">Expandable Card (Simple)</h3>
|
|
150
|
-
<app-code-example
|
|
151
|
-
[htmlCode]="expandableCardSimpleHtmlCode"
|
|
152
|
-
[tsCode]="expandableCardTsCode"
|
|
153
|
-
title="Expandable Card with Actions - HTML Template"></app-code-example>
|
|
154
|
-
</div>
|
|
155
|
-
</section>
|
|
156
|
-
</div>
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import { Component, ChangeDetectionStrategy, signal } 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-cards',
|
|
7
|
-
imports: [TranslateModule, CodeExampleComponent],
|
|
8
|
-
templateUrl: './cards.component.html',
|
|
9
|
-
styleUrl: './cards.component.scss',
|
|
10
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
11
|
-
})
|
|
12
|
-
export class CardsComponent {
|
|
13
|
-
expandedCards = signal<Set<number>>(new Set());
|
|
14
|
-
|
|
15
|
-
toggleCard(cardId: number) {
|
|
16
|
-
this.expandedCards.update(cards => {
|
|
17
|
-
const newSet = new Set(cards);
|
|
18
|
-
if (newSet.has(cardId)) {
|
|
19
|
-
newSet.delete(cardId);
|
|
20
|
-
} else {
|
|
21
|
-
newSet.add(cardId);
|
|
22
|
-
}
|
|
23
|
-
return newSet;
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
isExpanded(cardId: number): boolean {
|
|
28
|
-
return this.expandedCards().has(cardId);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// Code examples for all card variations
|
|
32
|
-
cardWithIconCode = `<div class="card" tabindex="0">
|
|
33
|
-
<div class="card-body">
|
|
34
|
-
<h5 class="card-title">
|
|
35
|
-
<i class="bi bi-check-circle card-title-icon"></i>
|
|
36
|
-
</h5>
|
|
37
|
-
<h6 class="card-subtitle mb-2">Card Title</h6>
|
|
38
|
-
<p class="card-text">This is a sample card text that describes the content.</p>
|
|
39
|
-
<div class="card-footer">
|
|
40
|
-
<a href="javascript:void(0);" class="btn btn-outline-secondary">Secondary Action</a>
|
|
41
|
-
<a href="javascript:void(0);" class="btn btn-primary">Primary Action</a>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
</div>`;
|
|
45
|
-
|
|
46
|
-
cardWithCheckboxCode = `<div class="card" tabindex="0">
|
|
47
|
-
<div class="card-body">
|
|
48
|
-
<h5 class="card-title">
|
|
49
|
-
<input class="card-title-checked form-check-input ripple"
|
|
50
|
-
type="checkbox"
|
|
51
|
-
value=""
|
|
52
|
-
id="check2"
|
|
53
|
-
aria-label="Select card">
|
|
54
|
-
</h5>
|
|
55
|
-
<h6 class="card-subtitle mb-2">Card Title</h6>
|
|
56
|
-
<p class="card-text">This is a sample card text that describes the content.</p>
|
|
57
|
-
<div class="card-footer">
|
|
58
|
-
<a href="javascript:void(0);" class="btn btn-outline-secondary">Secondary Action</a>
|
|
59
|
-
<a href="javascript:void(0);" class="btn btn-primary">Primary Action</a>
|
|
60
|
-
</div>
|
|
61
|
-
</div>
|
|
62
|
-
</div>`;
|
|
63
|
-
|
|
64
|
-
disabledCardCode = `<div class="card disabled" tabindex="0">
|
|
65
|
-
<div class="card-body">
|
|
66
|
-
<h5 class="card-title">
|
|
67
|
-
<i class="bi bi-check-circle card-title-icon"></i>
|
|
68
|
-
<input class="card-title-checked form-check-input ripple"
|
|
69
|
-
disabled
|
|
70
|
-
type="checkbox"
|
|
71
|
-
value=""
|
|
72
|
-
id="check1"
|
|
73
|
-
aria-label="Select card">
|
|
74
|
-
</h5>
|
|
75
|
-
<h6 class="card-subtitle mb-2">Card Title</h6>
|
|
76
|
-
<p class="card-text">This is a sample card text that describes the content.</p>
|
|
77
|
-
<div class="card-footer">
|
|
78
|
-
<a href="javascript:void(0);" class="btn btn-outline-secondary disabled">Secondary Action</a>
|
|
79
|
-
<a href="javascript:void(0);" class="btn btn-primary disabled">Primary Action</a>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
</div>`;
|
|
83
|
-
|
|
84
|
-
cardNoShadowCode = `<div class="card shadow-none" tabindex="0">
|
|
85
|
-
<div class="card-body">
|
|
86
|
-
<h5 class="card-title">
|
|
87
|
-
<input class="card-title-checked form-check-input ripple"
|
|
88
|
-
type="checkbox"
|
|
89
|
-
value=""
|
|
90
|
-
id="check2"
|
|
91
|
-
aria-label="Select card">
|
|
92
|
-
</h5>
|
|
93
|
-
<h6 class="card-subtitle mb-2">Card Title</h6>
|
|
94
|
-
<p class="card-text">This is a sample card text that describes the content.</p>
|
|
95
|
-
<div class="card-footer">
|
|
96
|
-
<a href="javascript:void(0);" class="btn btn-outline-secondary">Secondary Action</a>
|
|
97
|
-
<a href="javascript:void(0);" class="btn btn-primary">Primary Action</a>
|
|
98
|
-
</div>
|
|
99
|
-
</div>
|
|
100
|
-
</div>`;
|
|
101
|
-
|
|
102
|
-
expandableCardHtmlCode = `<div class="card" tabindex="0" [class.expanded]="isExpanded(1)">
|
|
103
|
-
<div class="card-body">
|
|
104
|
-
<h5 class="card-title">
|
|
105
|
-
<i class="bi bi-check-circle card-title-icon"></i>
|
|
106
|
-
<input class="card-title-checked form-check-input ripple"
|
|
107
|
-
type="checkbox"
|
|
108
|
-
value=""
|
|
109
|
-
id="check3"
|
|
110
|
-
aria-label="Select card">
|
|
111
|
-
</h5>
|
|
112
|
-
<h6 class="card-subtitle mb-2">Expandable Card Title</h6>
|
|
113
|
-
<p class="card-text">Click the arrow to see more details.</p>
|
|
114
|
-
|
|
115
|
-
@if (isExpanded(1)) {
|
|
116
|
-
<div class="card-expanded-content">
|
|
117
|
-
<p class="mt-3">Additional content shown when expanded.</p>
|
|
118
|
-
<ul>
|
|
119
|
-
<li>Detail point 1</li>
|
|
120
|
-
<li>Detail point 2</li>
|
|
121
|
-
<li>Detail point 3</li>
|
|
122
|
-
</ul>
|
|
123
|
-
</div>
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
<div class="card-footer">
|
|
127
|
-
<i class="bi card-expanded-icon"
|
|
128
|
-
[class.bi-chevron-up]="isExpanded(1)"
|
|
129
|
-
[class.bi-chevron-down]="!isExpanded(1)"
|
|
130
|
-
(click)="toggleCard(1)"></i>
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
133
|
-
</div>`;
|
|
134
|
-
|
|
135
|
-
expandableCardTsCode = `import { Component, signal } from '@angular/core';
|
|
136
|
-
|
|
137
|
-
@Component({
|
|
138
|
-
selector: 'app-cards',
|
|
139
|
-
templateUrl: './cards.component.html',
|
|
140
|
-
styleUrl: './cards.component.scss'
|
|
141
|
-
})
|
|
142
|
-
export class CardsComponent {
|
|
143
|
-
// Use Angular signals to manage expanded state
|
|
144
|
-
expandedCards = signal<Set<number>>(new Set());
|
|
145
|
-
|
|
146
|
-
toggleCard(cardId: number) {
|
|
147
|
-
this.expandedCards.update(cards => {
|
|
148
|
-
const newSet = new Set(cards);
|
|
149
|
-
if (newSet.has(cardId)) {
|
|
150
|
-
newSet.delete(cardId);
|
|
151
|
-
} else {
|
|
152
|
-
newSet.add(cardId);
|
|
153
|
-
}
|
|
154
|
-
return newSet;
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
isExpanded(cardId: number): boolean {
|
|
159
|
-
return this.expandedCards().has(cardId);
|
|
160
|
-
}
|
|
161
|
-
}`;
|
|
162
|
-
|
|
163
|
-
expandableCardSimpleHtmlCode = `<div class="card" tabindex="0" [class.expanded]="isExpanded(2)">
|
|
164
|
-
<div class="card-body">
|
|
165
|
-
<h5 class="card-title">
|
|
166
|
-
<i class="bi bi-check-circle card-title-icon"></i>
|
|
167
|
-
</h5>
|
|
168
|
-
<h6 class="card-subtitle mb-2">Expandable Card Title</h6>
|
|
169
|
-
<p class="card-text">Click the arrow to see more details.</p>
|
|
170
|
-
|
|
171
|
-
@if (isExpanded(2)) {
|
|
172
|
-
<div class="card-expanded-content">
|
|
173
|
-
<p class="mt-3">Additional content shown when expanded.</p>
|
|
174
|
-
<ul>
|
|
175
|
-
<li>Detail point 1</li>
|
|
176
|
-
<li>Detail point 2</li>
|
|
177
|
-
<li>Detail point 3</li>
|
|
178
|
-
</ul>
|
|
179
|
-
<div class="d-flex align-items-center gap-3 mb-3">
|
|
180
|
-
<button class="btn btn-sm btn-primary">Primary Action</button>
|
|
181
|
-
<button class="btn btn-sm btn-outline-secondary">Cancel</button>
|
|
182
|
-
</div>
|
|
183
|
-
</div>
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
<div class="card-footer">
|
|
187
|
-
<i class="bi card-expanded-icon"
|
|
188
|
-
[class.bi-chevron-up]="isExpanded(2)"
|
|
189
|
-
[class.bi-chevron-down]="!isExpanded(2)"
|
|
190
|
-
(click)="toggleCard(2)"></i>
|
|
191
|
-
</div>
|
|
192
|
-
</div>
|
|
193
|
-
</div>`;
|
|
194
|
-
}
|