@aseansc/ui 4.0.1 → 5.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/CHANGELOG.md +1021 -978
- package/fesm2022/aseansc-ui.mjs +106 -27
- package/fesm2022/aseansc-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/tokens/_semantic.scss +6 -2
- package/tokens/layout/_main.scss +1 -1
- package/tokens/layout/_menu.scss +25 -7
- package/tokens/layout/_responsive.scss +12 -1
- package/tokens/layout/_topbar.scss +164 -159
- package/tokens/layout/variables/_common.scss +4 -0
- package/tokens/layout/variables/_dark.scss +2 -0
- package/tokens/layout/variables/_light.scss +2 -1
- package/tokens/preset.css +48 -14
- package/types/aseansc-ui.d.ts +16 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aseansc/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "ASC Internal UI Component Library — Angular 22 + PrimeNG 21 + TailwindCSS 4 (PrimeNG capped at 21.x — 22.x requires a paid PrimeUI license key, xem README.md)",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "ASC Team",
|
package/tokens/_semantic.scss
CHANGED
|
@@ -39,7 +39,9 @@
|
|
|
39
39
|
--asc-surface-overlay: #{p.$asc-white}; // dialog / tooltip bg
|
|
40
40
|
--asc-surface-hover: #{p.$asc-grey-50}; // Background.surface
|
|
41
41
|
--asc-surface-active: #{p.$asc-grey-100}; // Background.onSurface
|
|
42
|
-
--asc-surface-
|
|
42
|
+
--asc-surface-0: #{p.$asc-white};
|
|
43
|
+
--asc-surface-50: #{p.$asc-white};
|
|
44
|
+
--asc-formfield-bg: #{p.$asc-white}; // nền input/select/datepicker... (PrimeNG formField.background)
|
|
43
45
|
|
|
44
46
|
// ── Color: Border — Border.* (design-token-color.json) ──────────────────────
|
|
45
47
|
--asc-border-color: #{p.$asc-grey-100}; // Border.default
|
|
@@ -59,6 +61,8 @@
|
|
|
59
61
|
--asc-text-link-hover: #{p.$asc-blue-700};
|
|
60
62
|
--asc-text-invalid: #{p.$asc-red-500}; // Text.danger
|
|
61
63
|
--asc-text-brand: #{p.$asc-brand-500}; // Text.brand — token mới, tách riêng khỏi link
|
|
64
|
+
--asc-table-header-color: #A3A3A3; // chữ header AscTable — theo design mới
|
|
65
|
+
--asc-table-border-color: #0C0C0D1A; // kẻ ô table (grey đậm, alpha 10%) — theo design mới
|
|
62
66
|
|
|
63
67
|
// ── Color: Icon — Icon.* (design-token-color.json) — tier mới, trước đây
|
|
64
68
|
// component tự tái dùng --asc-text-*, giờ có set riêng theo đúng design ──────
|
|
@@ -160,7 +164,7 @@
|
|
|
160
164
|
--asc-border-color-brand: #{p.$asc-brand-500}; // Border.brand (dark) — không đổi
|
|
161
165
|
|
|
162
166
|
--asc-text-primary: #{p.$asc-grey-10}; // Text.primary (dark)
|
|
163
|
-
--asc-text-secondary: #{p.$asc-grey-200}; // Text.secondary (dark)
|
|
167
|
+
--asc-table-header-color: #{p.$asc-grey-10}; // dark giữ như cũ (= Text.primary dark) --asc-text-secondary: #{p.$asc-grey-200}; // Text.secondary (dark)
|
|
164
168
|
--asc-text-muted: #{p.$asc-grey-300}; // Text.tertiary (dark)
|
|
165
169
|
--asc-text-disabled: #{p.$asc-grey-600}; // Text.disable (dark)
|
|
166
170
|
--asc-text-placeholder: #{p.$asc-grey-300};
|
package/tokens/layout/_main.scss
CHANGED
package/tokens/layout/_menu.scss
CHANGED
|
@@ -2,18 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
.layout-sidebar {
|
|
4
4
|
position: fixed;
|
|
5
|
-
width:
|
|
6
|
-
|
|
5
|
+
width: var(--layout-sidebar-width);
|
|
6
|
+
// full chiều cao viewport, nổi cách mép 1 khoảng gap
|
|
7
|
+
height: calc(100vh - 2 * var(--layout-sidebar-gap));
|
|
7
8
|
z-index: 999;
|
|
8
|
-
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
overflow: hidden; // clip scrollbar của .layout-sidebar-content theo border-radius
|
|
9
12
|
user-select: none;
|
|
10
|
-
top:
|
|
11
|
-
left:
|
|
13
|
+
top: var(--layout-sidebar-gap);
|
|
14
|
+
left: var(--layout-sidebar-gap);
|
|
12
15
|
transition:
|
|
13
16
|
transform var(--layout-section-transition-duration),
|
|
14
17
|
left var(--layout-section-transition-duration);
|
|
15
|
-
background-color: var(--surface-
|
|
16
|
-
border-radius:
|
|
18
|
+
background-color: var(--asc-surface-base);
|
|
19
|
+
border-radius: 20px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Logo đứng yên ở đầu sidebar, không cuộn theo menu
|
|
23
|
+
.layout-sidebar-logo {
|
|
24
|
+
flex-shrink: 0;
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
padding: 1rem 1.5rem 0.5rem;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.layout-sidebar-content {
|
|
31
|
+
flex: 1 1 auto;
|
|
32
|
+
min-height: 0;
|
|
33
|
+
overflow-y: auto;
|
|
17
34
|
padding: 0.5rem 1.5rem;
|
|
18
35
|
}
|
|
19
36
|
|
|
@@ -88,6 +105,7 @@
|
|
|
88
105
|
|
|
89
106
|
.layout-menuitem-icon {
|
|
90
107
|
margin-right: 0.5rem;
|
|
108
|
+
flex-shrink: 0;
|
|
91
109
|
}
|
|
92
110
|
|
|
93
111
|
.layout-submenu-toggler {
|
|
@@ -40,8 +40,14 @@
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
&.layout-static {
|
|
43
|
+
// Sidebar chiếm full chiều cao bên trái — topbar & main nằm bên phải sidebar
|
|
44
|
+
.layout-topbar {
|
|
45
|
+
left: var(--layout-sidebar-offset);
|
|
46
|
+
width: calc(100% - var(--layout-sidebar-offset));
|
|
47
|
+
}
|
|
48
|
+
|
|
43
49
|
.layout-main-container {
|
|
44
|
-
margin-left:
|
|
50
|
+
margin-left: var(--layout-sidebar-offset);
|
|
45
51
|
}
|
|
46
52
|
|
|
47
53
|
&.layout-static-inactive {
|
|
@@ -50,6 +56,11 @@
|
|
|
50
56
|
left: 0;
|
|
51
57
|
}
|
|
52
58
|
|
|
59
|
+
.layout-topbar {
|
|
60
|
+
left: 0;
|
|
61
|
+
width: 100%;
|
|
62
|
+
}
|
|
63
|
+
|
|
53
64
|
.layout-main-container {
|
|
54
65
|
margin-left: 0;
|
|
55
66
|
padding-left: 2rem;
|
|
@@ -1,159 +1,164 @@
|
|
|
1
|
-
@use "mixins" as *;
|
|
2
|
-
|
|
3
|
-
.layout-topbar {
|
|
4
|
-
position: fixed;
|
|
5
|
-
height: 4rem;
|
|
6
|
-
z-index: 997;
|
|
7
|
-
left: 0;
|
|
8
|
-
top: 0;
|
|
9
|
-
width: 100%;
|
|
10
|
-
padding: 0 2rem;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
.layout-topbar-logo {
|
|
22
|
-
display:
|
|
23
|
-
align-items: center;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
display:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
display: flex;
|
|
90
|
-
gap: 1rem;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.layout-
|
|
94
|
-
display: flex;
|
|
95
|
-
gap: 1rem;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.layout-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
border:
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
font-
|
|
150
|
-
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
1
|
+
@use "mixins" as *;
|
|
2
|
+
|
|
3
|
+
.layout-topbar {
|
|
4
|
+
position: fixed;
|
|
5
|
+
height: 4rem;
|
|
6
|
+
z-index: 997;
|
|
7
|
+
left: 0;
|
|
8
|
+
top: 0;
|
|
9
|
+
width: 100%;
|
|
10
|
+
padding: 0 2rem;
|
|
11
|
+
// Nền bán trong suốt theo màu nền trang + blur — nội dung cuộn phía sau không đè chữ lên topbar
|
|
12
|
+
background-color: color-mix(in srgb, var(--surface-ground) 70%, transparent);
|
|
13
|
+
-webkit-backdrop-filter: blur(12px);
|
|
14
|
+
backdrop-filter: blur(12px);
|
|
15
|
+
transition:
|
|
16
|
+
left var(--layout-section-transition-duration),
|
|
17
|
+
width var(--layout-section-transition-duration);
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
|
|
21
|
+
.layout-topbar-logo-container {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.layout-topbar-logo {
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
font-size: 1.5rem;
|
|
30
|
+
border-radius: var(--content-border-radius);
|
|
31
|
+
color: var(--text-color);
|
|
32
|
+
font-weight: 500;
|
|
33
|
+
gap: 0.5rem;
|
|
34
|
+
|
|
35
|
+
svg {
|
|
36
|
+
width: 3rem;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:focus-visible {
|
|
40
|
+
@include focused();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.layout-topbar-action {
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
justify-content: center;
|
|
47
|
+
align-items: center;
|
|
48
|
+
color: var(--text-color-secondary);
|
|
49
|
+
border-radius: 50%;
|
|
50
|
+
width: 2.5rem;
|
|
51
|
+
height: 2.5rem;
|
|
52
|
+
color: var(--text-color);
|
|
53
|
+
transition: background-color var(--element-transition-duration);
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
|
|
56
|
+
&:hover {
|
|
57
|
+
background-color: var(--surface-hover);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&:focus-visible {
|
|
61
|
+
@include focused();
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
i {
|
|
65
|
+
font-size: 1.25rem;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
span {
|
|
69
|
+
font-size: 1rem;
|
|
70
|
+
display: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&.layout-topbar-action-highlight {
|
|
74
|
+
background-color: var(--primary-color);
|
|
75
|
+
color: var(--primary-contrast-color);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.layout-menu-button {
|
|
80
|
+
margin-right: 0.5rem;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.layout-topbar-menu-button {
|
|
84
|
+
display: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.layout-topbar-actions {
|
|
88
|
+
margin-left: auto;
|
|
89
|
+
display: flex;
|
|
90
|
+
gap: 1rem;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.layout-topbar-menu-content {
|
|
94
|
+
display: flex;
|
|
95
|
+
gap: 1rem;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.layout-config-menu {
|
|
99
|
+
display: flex;
|
|
100
|
+
gap: 1rem;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@media (max-width: 991px) {
|
|
105
|
+
.layout-topbar {
|
|
106
|
+
padding: 0 2rem;
|
|
107
|
+
|
|
108
|
+
.layout-topbar-logo-container {
|
|
109
|
+
width: auto;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.layout-menu-button {
|
|
113
|
+
margin-left: 0;
|
|
114
|
+
margin-right: 0.5rem;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.layout-topbar-menu-button {
|
|
118
|
+
display: inline-flex;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.layout-topbar-menu {
|
|
122
|
+
position: absolute;
|
|
123
|
+
background-color: var(--surface-overlay);
|
|
124
|
+
transform-origin: top;
|
|
125
|
+
box-shadow:
|
|
126
|
+
0px 3px 5px rgba(0, 0, 0, 0.02),
|
|
127
|
+
0px 0px 2px rgba(0, 0, 0, 0.05),
|
|
128
|
+
0px 1px 4px rgba(0, 0, 0, 0.08);
|
|
129
|
+
border-radius: var(--content-border-radius);
|
|
130
|
+
padding: 1rem;
|
|
131
|
+
right: 2rem;
|
|
132
|
+
top: 4rem;
|
|
133
|
+
min-width: 15rem;
|
|
134
|
+
border: 1px solid var(--surface-border);
|
|
135
|
+
|
|
136
|
+
.layout-topbar-menu-content {
|
|
137
|
+
gap: 0.5rem;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.layout-topbar-action {
|
|
141
|
+
display: flex;
|
|
142
|
+
width: 100%;
|
|
143
|
+
height: auto;
|
|
144
|
+
justify-content: flex-start;
|
|
145
|
+
border-radius: var(--content-border-radius);
|
|
146
|
+
padding: 0.5rem 1rem;
|
|
147
|
+
|
|
148
|
+
i {
|
|
149
|
+
font-size: 1rem;
|
|
150
|
+
margin-right: 0.5rem;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
span {
|
|
154
|
+
font-weight: medium;
|
|
155
|
+
display: block;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.layout-topbar-menu-content {
|
|
161
|
+
flex-direction: column;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -11,6 +11,10 @@
|
|
|
11
11
|
--maskbg: var(--p-mask-background);
|
|
12
12
|
--content-border-radius: var(--p-content-border-radius);
|
|
13
13
|
--layout-section-transition-duration: 0.2s;
|
|
14
|
+
--layout-sidebar-width: 212px;
|
|
15
|
+
--layout-sidebar-gap: 1rem; // khoảng hở giữa sidebar nổi và mép viewport
|
|
16
|
+
// mép phải của sidebar tính từ mép trái viewport — topbar/main bắt đầu từ đây
|
|
17
|
+
--layout-sidebar-offset: calc(var(--layout-sidebar-gap) + var(--layout-sidebar-width));
|
|
14
18
|
--element-transition-duration: var(--p-transition-duration);
|
|
15
19
|
--focus-ring-width: var(--p-focus-ring-width);
|
|
16
20
|
--focus-ring-style: var(--p-focus-ring-style);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
:root[class*='app-dark'] {
|
|
2
2
|
--surface-ground: var(--p-surface-950);
|
|
3
|
+
// _common.scss hardcode --text-color #0F0F0F cho light — dark phải override, không thì chữ đen trên nền tối
|
|
4
|
+
--text-color: var(--p-text-color);
|
|
3
5
|
--code-background: var(--p-surface-800);
|
|
4
6
|
--code-color: var(--p-surface-100);
|
|
5
7
|
}
|
package/tokens/preset.css
CHANGED
|
@@ -76,7 +76,9 @@
|
|
|
76
76
|
--asc-surface-overlay: #ffffff;
|
|
77
77
|
--asc-surface-hover: #f2f3f5;
|
|
78
78
|
--asc-surface-active: #dedfe0;
|
|
79
|
-
--asc-surface-
|
|
79
|
+
--asc-surface-0: #ffffff;
|
|
80
|
+
--asc-surface-50: #ffffff;
|
|
81
|
+
--asc-formfield-bg: #ffffff;
|
|
80
82
|
--asc-border-color: #dedfe0;
|
|
81
83
|
--asc-border-color-strong: #a7a7a8;
|
|
82
84
|
--asc-border-color-focus: #3b82f6;
|
|
@@ -92,6 +94,8 @@
|
|
|
92
94
|
--asc-text-link-hover: #1d4ed8;
|
|
93
95
|
--asc-text-invalid: #ef4444;
|
|
94
96
|
--asc-text-brand: #f74036;
|
|
97
|
+
--asc-table-header-color: #A3A3A3;
|
|
98
|
+
--asc-table-border-color: #0C0C0D1A;
|
|
95
99
|
--asc-icon-primary: #0f0f0f;
|
|
96
100
|
--asc-icon-secondary: #8d8e8f;
|
|
97
101
|
--asc-icon-disabled: #c0c0c2;
|
|
@@ -164,7 +168,7 @@
|
|
|
164
168
|
--asc-border-color-focus: #60a5fa;
|
|
165
169
|
--asc-border-color-brand: #f74036;
|
|
166
170
|
--asc-text-primary: #fafafc;
|
|
167
|
-
--asc-
|
|
171
|
+
--asc-table-header-color: #fafafc;
|
|
168
172
|
--asc-text-muted: #a7a7a8;
|
|
169
173
|
--asc-text-disabled: #5b5b5c;
|
|
170
174
|
--asc-text-placeholder: #a7a7a8;
|
|
@@ -639,6 +643,9 @@
|
|
|
639
643
|
--maskbg: var(--p-mask-background);
|
|
640
644
|
--content-border-radius: var(--p-content-border-radius);
|
|
641
645
|
--layout-section-transition-duration: 0.2s;
|
|
646
|
+
--layout-sidebar-width: 212px;
|
|
647
|
+
--layout-sidebar-gap: 1rem;
|
|
648
|
+
--layout-sidebar-offset: calc(var(--layout-sidebar-gap) + var(--layout-sidebar-width));
|
|
642
649
|
--element-transition-duration: var(--p-transition-duration);
|
|
643
650
|
--focus-ring-width: var(--p-focus-ring-width);
|
|
644
651
|
--focus-ring-style: var(--p-focus-ring-style);
|
|
@@ -648,13 +655,14 @@
|
|
|
648
655
|
}
|
|
649
656
|
|
|
650
657
|
:root {
|
|
651
|
-
--surface-ground:
|
|
658
|
+
--surface-ground: #EAE6E1;
|
|
652
659
|
--code-background: var(--p-surface-900);
|
|
653
660
|
--code-color: var(--p-surface-200);
|
|
654
661
|
}
|
|
655
662
|
|
|
656
663
|
:root[class*=app-dark] {
|
|
657
664
|
--surface-ground: var(--p-surface-950);
|
|
665
|
+
--text-color: var(--p-text-color);
|
|
658
666
|
--code-background: var(--p-surface-800);
|
|
659
667
|
--code-color: var(--p-surface-100);
|
|
660
668
|
}
|
|
@@ -745,7 +753,7 @@ a {
|
|
|
745
753
|
.layout-main {
|
|
746
754
|
flex: 1 1 auto;
|
|
747
755
|
padding: 1.5rem 1.5rem 2rem;
|
|
748
|
-
background: var(--surface-
|
|
756
|
+
background: var(--asc-surface-base);
|
|
749
757
|
border-radius: 1.25rem;
|
|
750
758
|
}
|
|
751
759
|
|
|
@@ -761,8 +769,10 @@ img {
|
|
|
761
769
|
top: 0;
|
|
762
770
|
width: 100%;
|
|
763
771
|
padding: 0 2rem;
|
|
764
|
-
background-color: var(--surface-
|
|
765
|
-
|
|
772
|
+
background-color: color-mix(in srgb, var(--surface-ground) 70%, transparent);
|
|
773
|
+
-webkit-backdrop-filter: blur(12px);
|
|
774
|
+
backdrop-filter: blur(12px);
|
|
775
|
+
transition: left var(--layout-section-transition-duration), width var(--layout-section-transition-duration);
|
|
766
776
|
display: flex;
|
|
767
777
|
align-items: center;
|
|
768
778
|
}
|
|
@@ -910,16 +920,31 @@ img {
|
|
|
910
920
|
}
|
|
911
921
|
.layout-sidebar {
|
|
912
922
|
position: fixed;
|
|
913
|
-
width:
|
|
914
|
-
height: calc(100vh -
|
|
923
|
+
width: var(--layout-sidebar-width);
|
|
924
|
+
height: calc(100vh - 2 * var(--layout-sidebar-gap));
|
|
915
925
|
z-index: 999;
|
|
916
|
-
|
|
926
|
+
display: flex;
|
|
927
|
+
flex-direction: column;
|
|
928
|
+
overflow: hidden;
|
|
917
929
|
user-select: none;
|
|
918
|
-
top:
|
|
919
|
-
left:
|
|
930
|
+
top: var(--layout-sidebar-gap);
|
|
931
|
+
left: var(--layout-sidebar-gap);
|
|
920
932
|
transition: transform var(--layout-section-transition-duration), left var(--layout-section-transition-duration);
|
|
921
|
-
background-color: var(--surface-
|
|
922
|
-
border-radius:
|
|
933
|
+
background-color: var(--asc-surface-base);
|
|
934
|
+
border-radius: 20px;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
.layout-sidebar-logo {
|
|
938
|
+
flex-shrink: 0;
|
|
939
|
+
display: flex;
|
|
940
|
+
align-items: center;
|
|
941
|
+
padding: 1rem 1.5rem 0.5rem;
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
.layout-sidebar-content {
|
|
945
|
+
flex: 1 1 auto;
|
|
946
|
+
min-height: 0;
|
|
947
|
+
overflow-y: auto;
|
|
923
948
|
padding: 0.5rem 1.5rem;
|
|
924
949
|
}
|
|
925
950
|
|
|
@@ -981,6 +1006,7 @@ img {
|
|
|
981
1006
|
|
|
982
1007
|
.layout-menu ul a .layout-menuitem-icon {
|
|
983
1008
|
margin-right: 0.5rem;
|
|
1009
|
+
flex-shrink: 0;
|
|
984
1010
|
}
|
|
985
1011
|
|
|
986
1012
|
.layout-menu ul a .layout-submenu-toggler {
|
|
@@ -1063,13 +1089,21 @@ img {
|
|
|
1063
1089
|
.layout-wrapper.layout-overlay.layout-overlay-active .layout-sidebar {
|
|
1064
1090
|
transform: translateX(0);
|
|
1065
1091
|
}
|
|
1092
|
+
.layout-wrapper.layout-static .layout-topbar {
|
|
1093
|
+
left: var(--layout-sidebar-offset);
|
|
1094
|
+
width: calc(100% - var(--layout-sidebar-offset));
|
|
1095
|
+
}
|
|
1066
1096
|
.layout-wrapper.layout-static .layout-main-container {
|
|
1067
|
-
margin-left:
|
|
1097
|
+
margin-left: var(--layout-sidebar-offset);
|
|
1068
1098
|
}
|
|
1069
1099
|
.layout-wrapper.layout-static.layout-static-inactive .layout-sidebar {
|
|
1070
1100
|
transform: translateX(-100%);
|
|
1071
1101
|
left: 0;
|
|
1072
1102
|
}
|
|
1103
|
+
.layout-wrapper.layout-static.layout-static-inactive .layout-topbar {
|
|
1104
|
+
left: 0;
|
|
1105
|
+
width: 100%;
|
|
1106
|
+
}
|
|
1073
1107
|
.layout-wrapper.layout-static.layout-static-inactive .layout-main-container {
|
|
1074
1108
|
margin-left: 0;
|
|
1075
1109
|
padding-left: 2rem;
|
package/types/aseansc-ui.d.ts
CHANGED
|
@@ -311,6 +311,16 @@ interface AscMenuItem extends MenuItem {
|
|
|
311
311
|
permissions?: string[];
|
|
312
312
|
/** URL tới file .svg — render qua `asc-icon` thay cho `icon` (class PrimeIcons) */
|
|
313
313
|
iconSrc?: string;
|
|
314
|
+
/**
|
|
315
|
+
* Kích thước icon — áp cho cả width lẫn height, nhận mọi giá trị CSS ('24px', '1.5rem').
|
|
316
|
+
* Với `icon` (class PrimeIcons) thì map sang `font-size`. Mặc định theo font của menu.
|
|
317
|
+
*/
|
|
318
|
+
iconSize?: string;
|
|
319
|
+
/** Ghi đè riêng chiều rộng icon — ưu tiên hơn `iconSize`. */
|
|
320
|
+
iconWidth?: string;
|
|
321
|
+
/** Ghi đè riêng chiều cao icon — ưu tiên hơn `iconSize`. */
|
|
322
|
+
iconHeight?: string;
|
|
323
|
+
items?: AscMenuItem[];
|
|
314
324
|
}
|
|
315
325
|
|
|
316
326
|
declare function provideAscUI(config?: AscUIConfig): EnvironmentProviders;
|
|
@@ -1951,6 +1961,7 @@ declare class AscAvatarGroupComponent {
|
|
|
1951
1961
|
* @example
|
|
1952
1962
|
* <asc-icon src="/assets/icons/user.svg" />
|
|
1953
1963
|
* <asc-icon src="/assets/icons/star.svg" size="24px" (loadError)="onIconError($event)" />
|
|
1964
|
+
* <asc-icon src="/assets/icons/logo.svg" width="96px" height="24px" />
|
|
1954
1965
|
*/
|
|
1955
1966
|
declare class AscIconComponent {
|
|
1956
1967
|
private readonly iconService;
|
|
@@ -1958,12 +1969,16 @@ declare class AscIconComponent {
|
|
|
1958
1969
|
src: _angular_core.InputSignal<string>;
|
|
1959
1970
|
/** Kích thước CSS áp cho width/height — vd '24px', '1.5rem' */
|
|
1960
1971
|
size: _angular_core.InputSignal<string>;
|
|
1972
|
+
/** Ghi đè riêng chiều rộng — ưu tiên hơn `size` (icon không vuông) */
|
|
1973
|
+
width: _angular_core.InputSignal<string | undefined>;
|
|
1974
|
+
/** Ghi đè riêng chiều cao — ưu tiên hơn `size` (icon không vuông) */
|
|
1975
|
+
height: _angular_core.InputSignal<string | undefined>;
|
|
1961
1976
|
/** Emit khi fetch SVG lỗi (404, network...) */
|
|
1962
1977
|
loadError: _angular_core.OutputEmitterRef<unknown>;
|
|
1963
1978
|
private readonly svg$;
|
|
1964
1979
|
protected svg: _angular_core.Signal<_angular_platform_browser.SafeHtml | null>;
|
|
1965
1980
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AscIconComponent, never>;
|
|
1966
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AscIconComponent, "asc-icon", never, { "src": { "alias": "src"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "loadError": "loadError"; }, never, never, true, never>;
|
|
1981
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AscIconComponent, "asc-icon", never, { "src": { "alias": "src"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; }, { "loadError": "loadError"; }, never, never, true, never>;
|
|
1967
1982
|
}
|
|
1968
1983
|
|
|
1969
1984
|
/**
|