@goat-bravos/intern-hub-layout 1.0.0
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/.editorconfig +17 -0
- package/.vscode/extensions.json +4 -0
- package/.vscode/launch.json +20 -0
- package/.vscode/mcp.json +9 -0
- package/.vscode/tasks.json +42 -0
- package/README.md +267 -0
- package/angular.json +131 -0
- package/ng-package.json +7 -0
- package/package.json +46 -0
- package/projects/layout-templates/README.md +63 -0
- package/projects/layout-templates/ng-package.json +7 -0
- package/projects/layout-templates/package.json +12 -0
- package/projects/layout-templates/src/lib/layout-templates.spec.ts +23 -0
- package/projects/layout-templates/src/lib/layout-templates.ts +15 -0
- package/projects/layout-templates/src/public-api.ts +5 -0
- package/projects/layout-templates/tsconfig.lib.json +17 -0
- package/projects/layout-templates/tsconfig.lib.prod.json +11 -0
- package/projects/layout-templates/tsconfig.spec.json +15 -0
- package/projects/ui-components/README.md +63 -0
- package/projects/ui-components/ng-package.json +7 -0
- package/projects/ui-components/package.json +12 -0
- package/projects/ui-components/src/lib/ui-components.spec.ts +23 -0
- package/projects/ui-components/src/lib/ui-components.ts +15 -0
- package/projects/ui-components/src/public-api.ts +5 -0
- package/projects/ui-components/tsconfig.lib.json +17 -0
- package/projects/ui-components/tsconfig.lib.prod.json +11 -0
- package/projects/ui-components/tsconfig.spec.json +15 -0
- package/public/B/341/273/231 icon message (1).svg" +87 -0
- package/public/B/341/273/231 icon message (2).svg" +104 -0
- package/public/B/341/273/231 icon message.svg" +98 -0
- package/public/FPT-IS-Logo.png +0 -0
- package/public/FPT_IS_Logo.svg +12 -0
- package/public/favicon.ico +0 -0
- package/public/federation.manifest.json +8 -0
- package/src/app/app.config.ts +22 -0
- package/src/app/app.html +1 -0
- package/src/app/app.routes.ts +24 -0
- package/src/app/app.scss +0 -0
- package/src/app/app.spec.ts +23 -0
- package/src/app/app.ts +19 -0
- package/src/index.html +15 -0
- package/src/libs/layouts/header/header.component.html +27 -0
- package/src/libs/layouts/header/header.component.scss +96 -0
- package/src/libs/layouts/header/header.component.ts +13 -0
- package/src/libs/layouts/main-layout/main-layout.component.html +15 -0
- package/src/libs/layouts/main-layout/main-layout.component.scss +35 -0
- package/src/libs/layouts/main-layout/main-layout.component.ts +17 -0
- package/src/libs/layouts/main-layout-test/main-layout-test.component.html +296 -0
- package/src/libs/layouts/main-layout-test/main-layout-test.component.scss +94 -0
- package/src/libs/layouts/main-layout-test/main-layout-test.component.ts +121 -0
- package/src/libs/layouts/sidebar/sidebar.component.html +7 -0
- package/src/libs/layouts/sidebar/sidebar.component.scss +38 -0
- package/src/libs/layouts/sidebar/sidebar.component.ts +19 -0
- package/src/libs/shared/components/approval/approval-list/approval-list.component.html +19 -0
- package/src/libs/shared/components/approval/approval-list/approval-list.component.scss +24 -0
- package/src/libs/shared/components/approval/approval-list/approval-list.component.ts +19 -0
- package/src/libs/shared/components/approval/approval-list-item/approval-list-item.component.html +21 -0
- package/src/libs/shared/components/approval/approval-list-item/approval-list-item.component.scss +28 -0
- package/src/libs/shared/components/approval/approval-list-item/approval-list-item.component.ts +20 -0
- package/src/libs/shared/components/approval/approval-list-item/approval-list-item.model.ts +8 -0
- package/src/libs/shared/components/button/button-container/button-container.component.html +20 -0
- package/src/libs/shared/components/button/button-container/button-container.component.scss +49 -0
- package/src/libs/shared/components/button/button-container/button-container.component.ts +38 -0
- package/src/libs/shared/components/button/button-container/button-container.model.ts +58 -0
- package/src/libs/shared/components/button/label-button/label-button.component.html +11 -0
- package/src/libs/shared/components/button/label-button/label-button.component.scss +13 -0
- package/src/libs/shared/components/button/label-button/label-button.component.ts +18 -0
- package/src/libs/shared/components/functional-label/functional-label.component.html +4 -0
- package/src/libs/shared/components/functional-label/functional-label.component.scss +58 -0
- package/src/libs/shared/components/functional-label/functional-label.component.ts +15 -0
- package/src/libs/shared/components/input/input-calendar/input-calendar.component.html +52 -0
- package/src/libs/shared/components/input/input-calendar/input-calendar.component.scss +98 -0
- package/src/libs/shared/components/input/input-calendar/input-calendar.component.ts +102 -0
- package/src/libs/shared/components/input/input-label/input-label.component.html +0 -0
- package/src/libs/shared/components/input/input-label/input-label.component.scss +0 -0
- package/src/libs/shared/components/input/input-label/input-label.component.ts +0 -0
- package/src/libs/shared/components/input/input-stepper/input-stepper.component.html +62 -0
- package/src/libs/shared/components/input/input-stepper/input-stepper.component.scss +211 -0
- package/src/libs/shared/components/input/input-stepper/input-stepper.component.ts +73 -0
- package/src/libs/shared/components/input/input-text/input-text.component.html +40 -0
- package/src/libs/shared/components/input/input-text/input-text.component.scss +143 -0
- package/src/libs/shared/components/input/input-text/input-text.component.ts +63 -0
- package/src/libs/shared/components/pop-up/pop-up-confirm/pop-up-confirm.component.html +15 -0
- package/src/libs/shared/components/pop-up/pop-up-confirm/pop-up-confirm.component.scss +70 -0
- package/src/libs/shared/components/pop-up/pop-up-confirm/pop-up-confirm.component.ts +29 -0
- package/src/libs/shared/components/table/table-body/table-body.component.html +18 -0
- package/src/libs/shared/components/table/table-body/table-body.component.scss +6 -0
- package/src/libs/shared/components/table/table-body/table-body.component.ts +17 -0
- package/src/libs/shared/components/table/table-header/table-header.component.html +27 -0
- package/src/libs/shared/components/table/table-header/table-header.component.scss +91 -0
- package/src/libs/shared/components/table/table-header/table-header.component.ts +25 -0
- package/src/main.ts +6 -0
- package/src/public-api.ts +22 -0
- package/src/styles.scss +27 -0
- package/tsconfig.app.json +15 -0
- package/tsconfig.json +53 -0
- package/tsconfig.spec.json +15 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
// Input Form Component - System Design Format
|
|
2
|
+
|
|
3
|
+
.input-form {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
gap: 4px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.hidden {
|
|
11
|
+
visibility: hidden;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.input-form-label {
|
|
15
|
+
display: block;
|
|
16
|
+
font-size: var(--font-sm);
|
|
17
|
+
font-weight: 700;
|
|
18
|
+
color: var(--neutral-color-700);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.label-text {
|
|
22
|
+
display: block;
|
|
23
|
+
margin-bottom: 4px;
|
|
24
|
+
height: 20px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.required-mark {
|
|
28
|
+
color: var(--utility-600);
|
|
29
|
+
margin-left: 2px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.input-form-field {
|
|
33
|
+
padding: 8px 12px;
|
|
34
|
+
border: 1px solid var(--neutral-color-200);
|
|
35
|
+
border-radius: var(--radius-md);
|
|
36
|
+
font-size: var(--font-sm);
|
|
37
|
+
color: var(--neutral-color-875);
|
|
38
|
+
height: 36px;
|
|
39
|
+
width: 100%;
|
|
40
|
+
box-sizing: border-box;
|
|
41
|
+
background-color: var(--neutral-color-10);
|
|
42
|
+
transition:
|
|
43
|
+
border-color 0.2s ease,
|
|
44
|
+
box-shadow 0.2s ease;
|
|
45
|
+
|
|
46
|
+
&::placeholder {
|
|
47
|
+
color: var(--neutral-color-400);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&:focus {
|
|
51
|
+
outline: none;
|
|
52
|
+
border-color: var(--brand-500);
|
|
53
|
+
box-shadow: 0 0 0 2px rgba(var(--brand-500-rgb, 39, 64, 180), 0.15);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:read-only {
|
|
57
|
+
background-color: var(--neutral-color-25);
|
|
58
|
+
cursor: not-allowed;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Password input - larger dots
|
|
62
|
+
&[type='password'] {
|
|
63
|
+
font-family: 'Verdana', sans-serif;
|
|
64
|
+
font-size: 16px;
|
|
65
|
+
letter-spacing: 3px;
|
|
66
|
+
|
|
67
|
+
&::placeholder {
|
|
68
|
+
font-family: inherit;
|
|
69
|
+
font-size: var(--font-sm);
|
|
70
|
+
letter-spacing: normal;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// When icon is present, add padding-right
|
|
76
|
+
.input-field-wrapper:has(.input-icon-button) {
|
|
77
|
+
.input-form-field {
|
|
78
|
+
padding-right: 36px;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.input-field-wrapper {
|
|
83
|
+
position: relative;
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.input-icon-button {
|
|
89
|
+
position: absolute;
|
|
90
|
+
right: 10px;
|
|
91
|
+
top: 50%;
|
|
92
|
+
transform: translateY(-50%);
|
|
93
|
+
background: none;
|
|
94
|
+
border: none;
|
|
95
|
+
padding: 0;
|
|
96
|
+
margin: 0;
|
|
97
|
+
display: flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
justify-content: center;
|
|
100
|
+
color: var(--neutral-color-500);
|
|
101
|
+
transition: color 0.2s ease;
|
|
102
|
+
outline: none;
|
|
103
|
+
|
|
104
|
+
&.clickable {
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
|
|
107
|
+
&:hover {
|
|
108
|
+
.input-icon {
|
|
109
|
+
color: var(--brand-500);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&:disabled {
|
|
115
|
+
cursor: default;
|
|
116
|
+
pointer-events: none;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Force Font Awesome icon size
|
|
121
|
+
.input-icon {
|
|
122
|
+
font-size: 14px !important;
|
|
123
|
+
width: 14px;
|
|
124
|
+
height: 14px;
|
|
125
|
+
display: flex;
|
|
126
|
+
align-items: center;
|
|
127
|
+
justify-content: center;
|
|
128
|
+
transition: color 0.2s ease;
|
|
129
|
+
|
|
130
|
+
&::before {
|
|
131
|
+
font-size: 14px !important;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.limit {
|
|
136
|
+
display: flex;
|
|
137
|
+
justify-content: flex-end;
|
|
138
|
+
|
|
139
|
+
span {
|
|
140
|
+
font-size: var(--font-xs, 12px);
|
|
141
|
+
color: var(--neutral-color-500);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter } from "@angular/core";
|
|
2
|
+
import { CommonModule } from "@angular/common";
|
|
3
|
+
import { FormsModule } from "@angular/forms";
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'app-input-text',
|
|
7
|
+
standalone: true,
|
|
8
|
+
imports: [CommonModule, FormsModule],
|
|
9
|
+
templateUrl: './input-text.component.html',
|
|
10
|
+
styleUrls: ['./input-text.component.scss'],
|
|
11
|
+
})
|
|
12
|
+
export class InputTextComponent {
|
|
13
|
+
@Input() headerInput: string = '';
|
|
14
|
+
@Input() placeholder: string = '';
|
|
15
|
+
@Input() readonly: boolean = false;
|
|
16
|
+
@Input() required: boolean = false;
|
|
17
|
+
@Input() width: string = '100%';
|
|
18
|
+
@Input() maxLength: number = 0; // 0 = no limit
|
|
19
|
+
@Input() showLimit: boolean = false;
|
|
20
|
+
@Input() icon: string = '';
|
|
21
|
+
@Input() typeInput: string = 'text';
|
|
22
|
+
|
|
23
|
+
@Output() valueChange = new EventEmitter<string>();
|
|
24
|
+
@Output() iconClick = new EventEmitter<void>();
|
|
25
|
+
|
|
26
|
+
private _value: string = '';
|
|
27
|
+
|
|
28
|
+
onIconClick(): void {
|
|
29
|
+
this.iconClick.emit();
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@Input()
|
|
33
|
+
set value(val: string) {
|
|
34
|
+
this._value = val || '';
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
get value(): string {
|
|
38
|
+
return this._value;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
get currentLength(): number {
|
|
42
|
+
return this._value?.length || 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
get limit(): string {
|
|
46
|
+
if (!this.showLimit || this.maxLength <= 0) return '';
|
|
47
|
+
return `${this.currentLength}/${this.maxLength}`;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
onInput(event: Event): void {
|
|
51
|
+
const input = event.target as HTMLInputElement;
|
|
52
|
+
let newValue = input.value;
|
|
53
|
+
|
|
54
|
+
// Enforce maxLength if set
|
|
55
|
+
if (this.maxLength > 0 && newValue.length > this.maxLength) {
|
|
56
|
+
newValue = newValue.substring(0, this.maxLength);
|
|
57
|
+
input.value = newValue;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
this._value = newValue;
|
|
61
|
+
this.valueChange.emit(this._value);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<div class="pop-up-confirm-overlay">
|
|
2
|
+
<div class="pop-up-confirm">
|
|
3
|
+
<div class="pop-up-confirm-content">
|
|
4
|
+
<img *ngIf="imgUrl" [src]="imgUrl" alt="">
|
|
5
|
+
<div class="pop-up-confirm-text">
|
|
6
|
+
<p class="pop-up-title">{{title}}</p>
|
|
7
|
+
<p class="pop-up-content">{{content}}</p>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="pop-up-confirm-actions">
|
|
11
|
+
<app-button-container size="md" content="Quay Lại" backgroundColor="var(--neutral-100)" color="var(--neutral-800)" (buttonClick)="onCancel()"></app-button-container>
|
|
12
|
+
<app-button-container size="md" content="Đồng Ý" [backgroundColor]="colorButton" color="#fff" (buttonClick)="onConfirm()"></app-button-container>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// Pop-up Confirm Component - System Design Format
|
|
2
|
+
|
|
3
|
+
.pop-up-confirm-overlay {
|
|
4
|
+
position: fixed;
|
|
5
|
+
top: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
background-color: rgba(var(--neutral-color-875-rgb, 30, 34, 37), 0.5);
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
align-items: center;
|
|
13
|
+
z-index: 1000;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.pop-up-confirm {
|
|
17
|
+
background-color: var(--neutral-color-10);
|
|
18
|
+
border-radius: var(--radius-lg);
|
|
19
|
+
padding: 24px;
|
|
20
|
+
min-width: 320px;
|
|
21
|
+
max-width: 400px;
|
|
22
|
+
box-shadow: 0 4px 20px rgba(var(--neutral-color-875-rgb, 30, 34, 37), 0.15);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.pop-up-confirm-content {
|
|
26
|
+
display: flex;
|
|
27
|
+
gap: 16px;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
margin-bottom: 24px;
|
|
32
|
+
width: 352px;
|
|
33
|
+
height: 172px;
|
|
34
|
+
|
|
35
|
+
img {
|
|
36
|
+
width: 96px;
|
|
37
|
+
height: 96px;
|
|
38
|
+
object-fit: contain;
|
|
39
|
+
flex-shrink: 0;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.pop-up-confirm-text {
|
|
44
|
+
display: flex;
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
align-items: center;
|
|
48
|
+
gap: 8px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.pop-up-title {
|
|
52
|
+
font-size: var(--font-xl);
|
|
53
|
+
font-weight: 600;
|
|
54
|
+
color: var(--neutral-color-875);
|
|
55
|
+
margin: 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.pop-up-content {
|
|
59
|
+
font-size: var(--font-sm);
|
|
60
|
+
color: var(--neutral-color-500);
|
|
61
|
+
margin: 0;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.pop-up-confirm-actions {
|
|
65
|
+
display: flex;
|
|
66
|
+
gap: 12px;
|
|
67
|
+
justify-content: center;
|
|
68
|
+
align-items: center;
|
|
69
|
+
padding: 16px 8px;
|
|
70
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter } from "@angular/core";
|
|
2
|
+
import { CommonModule } from "@angular/common";
|
|
3
|
+
import { ButtonContainerComponent } from "../../button/button-container/button-container.component";
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'app-pop-up-confirm',
|
|
7
|
+
standalone: true,
|
|
8
|
+
imports: [CommonModule, ButtonContainerComponent],
|
|
9
|
+
templateUrl: './pop-up-confirm.component.html',
|
|
10
|
+
styleUrls: ['./pop-up-confirm.component.scss'],
|
|
11
|
+
})
|
|
12
|
+
export class PopUpConfirmComponent {
|
|
13
|
+
|
|
14
|
+
@Input() imgUrl: string = '';
|
|
15
|
+
@Input() title: string = '';
|
|
16
|
+
@Input() content: string = '';
|
|
17
|
+
@Input() colorButton: string = 'var(--brand-600)';
|
|
18
|
+
|
|
19
|
+
@Output() confirmClick = new EventEmitter<void>();
|
|
20
|
+
@Output() cancelClick = new EventEmitter<void>();
|
|
21
|
+
|
|
22
|
+
onConfirm(): void {
|
|
23
|
+
this.confirmClick.emit();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
onCancel(): void {
|
|
27
|
+
this.cancelClick.emit();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@for (row of rows; track $index) {
|
|
2
|
+
<tr>
|
|
3
|
+
@for (col of columns; track col.key) {
|
|
4
|
+
<td [style.width]="col.width" [style.font-size]="fontSize">
|
|
5
|
+
@if (columnTemplates[col.key]) {
|
|
6
|
+
<ng-container
|
|
7
|
+
*ngTemplateOutlet="
|
|
8
|
+
columnTemplates[col.key];
|
|
9
|
+
context: { $implicit: row[col.key], row: row }
|
|
10
|
+
"
|
|
11
|
+
></ng-container>
|
|
12
|
+
} @else {
|
|
13
|
+
{{ row[col.key] }}
|
|
14
|
+
}
|
|
15
|
+
</td>
|
|
16
|
+
}
|
|
17
|
+
</tr>
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, Input, TemplateRef } from '@angular/core';
|
|
3
|
+
import { ColumnConfig } from '../table-header/table-header.component';
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: '[app-table-body]', // ✅ Attribute selector
|
|
7
|
+
standalone: true,
|
|
8
|
+
imports: [CommonModule],
|
|
9
|
+
templateUrl: './table-body.component.html',
|
|
10
|
+
styleUrl: './table-body.component.scss',
|
|
11
|
+
})
|
|
12
|
+
export class TableBodyComponent {
|
|
13
|
+
@Input() rows: any[] = [];
|
|
14
|
+
@Input() columns: ColumnConfig[] = [];
|
|
15
|
+
@Input() columnTemplates: { [key: string]: TemplateRef<any> } = {};
|
|
16
|
+
@Input() fontSize: string = 'var(--font-sm)';
|
|
17
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@for (col of columns; track col.key) {
|
|
2
|
+
<th
|
|
3
|
+
scope="col"
|
|
4
|
+
[style.width]="col.width"
|
|
5
|
+
[style.backgroundColor]="backgroundColor"
|
|
6
|
+
[style.color]="textColor"
|
|
7
|
+
>
|
|
8
|
+
<div class="header-container">
|
|
9
|
+
<div class="header-content">
|
|
10
|
+
@if (headerIconLeft) {
|
|
11
|
+
<div class="icon-left">
|
|
12
|
+
<i [class]="headerIconLeft"></i>
|
|
13
|
+
</div>
|
|
14
|
+
}
|
|
15
|
+
<div class="header-text" [style.font-size]="fontSize">
|
|
16
|
+
{{ col.header }}
|
|
17
|
+
</div>
|
|
18
|
+
@if (headerIconRight) {
|
|
19
|
+
<div class="icon-right">
|
|
20
|
+
<i [class]="headerIconRight"></i>
|
|
21
|
+
</div>
|
|
22
|
+
}
|
|
23
|
+
</div>
|
|
24
|
+
<p class="divider">|</p>
|
|
25
|
+
</div>
|
|
26
|
+
</th>
|
|
27
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
th {
|
|
2
|
+
padding: 0;
|
|
3
|
+
vertical-align: middle;
|
|
4
|
+
height: 44px;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
|
|
7
|
+
.header-content {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
width: 100%;
|
|
11
|
+
gap: 8px;
|
|
12
|
+
border-collapse: collapse;
|
|
13
|
+
|
|
14
|
+
.header-text {
|
|
15
|
+
font-weight: 600;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.icon-left,
|
|
19
|
+
.icon-right {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
flex-shrink: 0;
|
|
24
|
+
width: 20px;
|
|
25
|
+
height: 20px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Khi chỉ có text (không có icons)
|
|
29
|
+
&:has(.header-text:only-child) {
|
|
30
|
+
justify-content: flex-start;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Khi có icons
|
|
34
|
+
&:has(.icon-left),
|
|
35
|
+
&:has(.icon-right) {
|
|
36
|
+
justify-content: space-between;
|
|
37
|
+
background-color: var(--brand-900);
|
|
38
|
+
.header-text {
|
|
39
|
+
flex: 1;
|
|
40
|
+
text-align: center;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Khi chỉ có icon bên trái
|
|
45
|
+
&:has(.icon-left):not(:has(.icon-right)) {
|
|
46
|
+
justify-content: flex-start;
|
|
47
|
+
|
|
48
|
+
.header-text {
|
|
49
|
+
flex: 1;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Khi chỉ có icon bên phải
|
|
54
|
+
&:has(.icon-right):not(:has(.icon-left)) {
|
|
55
|
+
justify-content: space-between;
|
|
56
|
+
|
|
57
|
+
.header-text {
|
|
58
|
+
flex: 1;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Separator line between columns */
|
|
65
|
+
th:not(:last-child) {
|
|
66
|
+
border-right: 1px solid rgba(0, 0, 0, 0.1);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.table-header {
|
|
70
|
+
width: 100%;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.header-container {
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
width: 100%;
|
|
77
|
+
padding: 0 8px;
|
|
78
|
+
box-sizing: border-box;
|
|
79
|
+
height: 100%;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.divider {
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
height: 20px;
|
|
87
|
+
width: 1px;
|
|
88
|
+
background-color: rgba(0, 0, 0, 0.1);
|
|
89
|
+
margin: 0 8px;
|
|
90
|
+
color: transparent; /* Text content '|' hidden or style it */
|
|
91
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
|
|
4
|
+
export interface ColumnConfig {
|
|
5
|
+
header: string;
|
|
6
|
+
key: string;
|
|
7
|
+
width: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@Component({
|
|
11
|
+
selector: 'tr[app-table-header]', // ✅ Attribute selector on tr
|
|
12
|
+
standalone: true,
|
|
13
|
+
imports: [CommonModule],
|
|
14
|
+
templateUrl: './table-header.component.html',
|
|
15
|
+
styleUrl: './table-header.component.scss',
|
|
16
|
+
})
|
|
17
|
+
export class TableHeaderComponent {
|
|
18
|
+
@Input() columns: ColumnConfig[] = [];
|
|
19
|
+
@Input() backgroundColor?: string;
|
|
20
|
+
@Input({ transform: (value: string | undefined) => value || '#ffffff' })
|
|
21
|
+
textColor: string = '#ffffff';
|
|
22
|
+
@Input() headerIconLeft?: string;
|
|
23
|
+
@Input() headerIconRight?: string;
|
|
24
|
+
@Input() fontSize: string = 'var(--font-xs)';
|
|
25
|
+
}
|
package/src/main.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Public API Surface of intern-hub-layout
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export * from './libs/layouts/main-layout/main-layout.component';
|
|
6
|
+
export * from './libs/layouts/header/header.component';
|
|
7
|
+
export * from './libs/layouts/sidebar/sidebar.component';
|
|
8
|
+
|
|
9
|
+
export * from './libs/shared/components/button/button-container/button-container.component';
|
|
10
|
+
export * from './libs/shared/components/button/label-button/label-button.component';
|
|
11
|
+
|
|
12
|
+
export * from './libs/shared/components/input/input-text/input-text.component';
|
|
13
|
+
export * from './libs/shared/components/input/input-stepper/input-stepper.component';
|
|
14
|
+
export * from './libs/shared/components/input/input-calendar/input-calendar.component';
|
|
15
|
+
|
|
16
|
+
export * from './libs/shared/components/table/table-header/table-header.component';
|
|
17
|
+
export * from './libs/shared/components/table/table-body/table-body.component';
|
|
18
|
+
|
|
19
|
+
export * from './libs/shared/components/approval/approval-list/approval-list.component';
|
|
20
|
+
export * from './libs/shared/components/approval/approval-list-item/approval-list-item.model';
|
|
21
|
+
|
|
22
|
+
export * from './libs/shared/components/pop-up/pop-up-confirm/pop-up-confirm.component';
|
package/src/styles.scss
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@use 'dynamic-ds/src/lib/styles/system-design';
|
|
2
|
+
|
|
3
|
+
@import url('https://rsms.me/inter/inter.css');
|
|
4
|
+
|
|
5
|
+
// Apply Inter font globally
|
|
6
|
+
:root {
|
|
7
|
+
font-family: 'Inter', sans-serif;
|
|
8
|
+
font-feature-settings:
|
|
9
|
+
'liga' 1,
|
|
10
|
+
'calt' 1; /* fix for Chrome */
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@supports (font-variation-settings: normal) {
|
|
14
|
+
:root {
|
|
15
|
+
font-family: 'InterVariable', sans-serif;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
* {
|
|
20
|
+
font-family: 'Inter', sans-serif;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
body {
|
|
24
|
+
font-family: 'Inter', sans-serif;
|
|
25
|
+
margin: 0;
|
|
26
|
+
padding: 0;
|
|
27
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
+
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
+
{
|
|
4
|
+
"extends": "./tsconfig.json",
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"outDir": "./out-tsc/app",
|
|
7
|
+
"types": []
|
|
8
|
+
},
|
|
9
|
+
"include": [
|
|
10
|
+
"src/**/*.ts"
|
|
11
|
+
],
|
|
12
|
+
"exclude": [
|
|
13
|
+
"src/**/*.spec.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
+
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
+
{
|
|
4
|
+
"compileOnSave": false,
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"strict": true,
|
|
7
|
+
"noImplicitOverride": true,
|
|
8
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
9
|
+
"noImplicitReturns": true,
|
|
10
|
+
"noFallthroughCasesInSwitch": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"isolatedModules": true,
|
|
13
|
+
"experimentalDecorators": true,
|
|
14
|
+
"importHelpers": true,
|
|
15
|
+
"target": "ES2022",
|
|
16
|
+
"module": "preserve",
|
|
17
|
+
"paths": {
|
|
18
|
+
"layout-templates": [
|
|
19
|
+
"./dist/layout-templates"
|
|
20
|
+
],
|
|
21
|
+
"ui-components": [
|
|
22
|
+
"./dist/ui-components"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"angularCompilerOptions": {
|
|
27
|
+
"enableI18nLegacyMessageIdFormat": false,
|
|
28
|
+
"strictInjectionParameters": true,
|
|
29
|
+
"strictInputAccessModifiers": true,
|
|
30
|
+
"strictTemplates": true
|
|
31
|
+
},
|
|
32
|
+
"files": [],
|
|
33
|
+
"references": [
|
|
34
|
+
{
|
|
35
|
+
"path": "./tsconfig.app.json"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"path": "./tsconfig.spec.json"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"path": "./projects/ui-components/tsconfig.lib.json"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"path": "./projects/ui-components/tsconfig.spec.json"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"path": "./projects/layout-templates/tsconfig.lib.json"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"path": "./projects/layout-templates/tsconfig.spec.json"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
+
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
+
{
|
|
4
|
+
"extends": "./tsconfig.json",
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"outDir": "./out-tsc/spec",
|
|
7
|
+
"types": [
|
|
8
|
+
"vitest/globals"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"include": [
|
|
12
|
+
"src/**/*.d.ts",
|
|
13
|
+
"src/**/*.spec.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|