@aseansc/ui 5.5.1 → 5.5.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aseansc/ui",
3
- "version": "5.5.1",
3
+ "version": "5.5.2",
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",
@@ -36,6 +36,7 @@
36
36
  // ── Color: Surface (backgrounds) — Background.* (design-token-color.json) ──
37
37
  --asc-surface-ground: #{p.$asc-grey-10}; // page background — Background.default dùng #fff, nhưng ground cần khác base 1 chút để phân lớp — giữ tone grey-10 gần trắng
38
38
  --asc-surface-base: #{p.$asc-white}; // card / panel background — Background.default
39
+ --asc-surface-translucent: #{rgba(p.$asc-white, 0.95)}; // layout main / sidebar / table header — nền trắng hơi trong
39
40
  --asc-surface-overlay: #{p.$asc-white}; // dialog / tooltip bg
40
41
  --asc-surface-hover: #{p.$asc-grey-50}; // Background.surface
41
42
  --asc-surface-active: #{p.$asc-grey-100}; // Background.onSurface
@@ -169,6 +170,7 @@
169
170
 
170
171
  --asc-surface-ground: #0c0c0d; // Background.default (dark)
171
172
  --asc-surface-base: #{p.$asc-grey-800}; // Background.surface (dark)
173
+ --asc-surface-translucent: #{rgba(p.$asc-grey-800, 0.95)}; // layout main / sidebar / table header (dark)
172
174
  --asc-surface-overlay: #{p.$asc-grey-800};
173
175
  --asc-surface-hover: #{p.$asc-grey-800};
174
176
  --asc-surface-active: #{p.$asc-grey-700}; // Background.onSurface (dark)
@@ -1,19 +1,19 @@
1
- .layout-main-container {
2
- display: flex;
3
- flex-direction: column;
4
- min-height: 100vh;
5
- justify-content: space-between;
6
- padding: 6rem 2rem 0 2rem;
7
- transition: margin-left var(--layout-section-transition-duration);
8
- }
9
-
10
- .layout-main {
11
- flex: 1 1 auto;
12
- padding: 1.5rem 1.5rem 2rem;
13
- background: var(--asc-surface-base); // trắng (light) / grey-800 (dark)
14
- border-radius: 1.25rem;
15
- }
16
-
17
- img {
18
- max-width: none !important;
19
- }
1
+ .layout-main-container {
2
+ display: flex;
3
+ flex-direction: column;
4
+ min-height: 100vh;
5
+ justify-content: space-between;
6
+ padding: 6rem 2rem 0 2rem;
7
+ transition: margin-left var(--layout-section-transition-duration);
8
+ }
9
+
10
+ .layout-main {
11
+ flex: 1 1 auto;
12
+ padding: 1.5rem 1.5rem 2rem;
13
+ background-color: var(--asc-surface-translucent);
14
+ border-radius: 1.25rem;
15
+ }
16
+
17
+ img {
18
+ max-width: none !important;
19
+ }
@@ -1,171 +1,171 @@
1
- @use 'mixins' as *;
2
-
3
- .layout-sidebar {
4
- position: fixed;
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));
8
- z-index: 999;
9
- display: flex;
10
- flex-direction: column;
11
- overflow: hidden; // clip scrollbar của .layout-sidebar-content theo border-radius
12
- user-select: none;
13
- top: var(--layout-sidebar-gap);
14
- left: var(--layout-sidebar-gap);
15
- transition:
16
- transform var(--layout-section-transition-duration),
17
- left var(--layout-section-transition-duration);
18
- background-color: var(--asc-surface-base);
19
- border-radius: 20px;
20
- // Padding sidebar theo design: dọc 16px, ngang 12px
21
- padding: var(--layout-sidebar-padding-y, 16px) var(--layout-sidebar-padding-x, 12px);
22
- }
23
-
24
- // Logo đứng yên ở đầu sidebar, không cuộn theo menu
25
- .layout-sidebar-logo {
26
- flex-shrink: 0;
27
- display: flex;
28
- align-items: center;
29
- padding: 0 0 var(--layout-sidebar-padding-y, 16px); // khoảng cách logo – menu
30
- }
31
-
32
- .layout-sidebar-content {
33
- flex: 1 1 auto;
34
- min-height: 0;
35
- overflow-y: auto;
36
- padding: 0;
37
- }
38
-
39
- .layout-menu {
40
- margin: 0;
41
- padding: 0;
42
- list-style-type: none;
43
-
44
- .layout-root-menuitem {
45
- > .layout-menuitem-root-text {
46
- font-size: 0.857rem;
47
- text-transform: uppercase;
48
- font-weight: 700;
49
- color: var(--text-color);
50
- margin: 0.75rem 0;
51
- }
52
-
53
- > a {
54
- display: none;
55
- }
56
- }
57
-
58
- a {
59
- user-select: none;
60
-
61
- &.active-menuitem {
62
- > .layout-submenu-toggler {
63
- transform: rotate(-180deg);
64
- }
65
- }
66
- }
67
-
68
- li.active-menuitem {
69
- > a {
70
- .layout-submenu-toggler {
71
- transform: rotate(-180deg);
72
- }
73
- }
74
- }
75
-
76
- ul {
77
- margin: 0;
78
- padding: 0;
79
- list-style-type: none;
80
-
81
- // Áp dụng cho MỌI cấp submenu (`.layout-menu ul` khớp mọi <ul> con cháu
82
- // của .layout-menu bất kể độ sâu) — AppMenuitem bind [class.layout-submenu-expanded]
83
- // trực tiếp lên <ul> submenu của chính nó ở TẤT CẢ các cấp đệ quy, kể cả
84
- // cấp 1 (submenu của root menuitem), nên rule collapse/expand không được
85
- // đặt lồng thêm 1 cấp `ul { ul {...} }` (chỉ khớp từ cấp 2 trở đi).
86
- overflow: hidden;
87
- border-radius: var(--content-border-radius);
88
- max-height: 0;
89
- transition: max-height 400ms cubic-bezier(0.86, 0, 0.07, 1);
90
-
91
- &.layout-submenu-expanded {
92
- max-height: 1000px;
93
- }
94
-
95
- a {
96
- display: flex;
97
- align-items: center;
98
- position: relative;
99
- outline: 0 none;
100
- color: var(--text-color);
101
- cursor: pointer;
102
- padding: 10px 8px;
103
- border-radius: var(--content-border-radius);
104
- transition:
105
- background-color var(--element-transition-duration),
106
- box-shadow var(--element-transition-duration);
107
-
108
- .layout-menuitem-icon {
109
- margin-right: 0.5rem;
110
- flex-shrink: 0;
111
- }
112
-
113
- .layout-submenu-toggler {
114
- font-size: 75%;
115
- margin-left: auto;
116
- transition: transform var(--element-transition-duration);
117
- }
118
-
119
- &.active-route {
120
- font-weight: 700;
121
- color: var(--primary-color);
122
- }
123
-
124
- &:hover {
125
- background-color: var(--surface-hover);
126
- }
127
-
128
- &:focus {
129
- @include focused-inset();
130
- }
131
- }
132
-
133
- ul {
134
- li {
135
- a {
136
- margin-left: 1rem;
137
- }
138
-
139
- li {
140
- a {
141
- margin-left: 2rem;
142
- }
143
-
144
- li {
145
- a {
146
- margin-left: 2.5rem;
147
- }
148
-
149
- li {
150
- a {
151
- margin-left: 3rem;
152
- }
153
-
154
- li {
155
- a {
156
- margin-left: 3.5rem;
157
- }
158
-
159
- li {
160
- a {
161
- margin-left: 4rem;
162
- }
163
- }
164
- }
165
- }
166
- }
167
- }
168
- }
169
- }
170
- }
171
- }
1
+ @use 'mixins' as *;
2
+
3
+ .layout-sidebar {
4
+ position: fixed;
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));
8
+ z-index: 999;
9
+ display: flex;
10
+ flex-direction: column;
11
+ overflow: hidden; // clip scrollbar của .layout-sidebar-content theo border-radius
12
+ user-select: none;
13
+ top: var(--layout-sidebar-gap);
14
+ left: var(--layout-sidebar-gap);
15
+ transition:
16
+ transform var(--layout-section-transition-duration),
17
+ left var(--layout-section-transition-duration);
18
+ background-color: var(--asc-surface-translucent);
19
+ border-radius: 20px;
20
+ // Padding sidebar theo design: dọc 16px, ngang 12px
21
+ padding: var(--layout-sidebar-padding-y, 16px) var(--layout-sidebar-padding-x, 12px);
22
+ }
23
+
24
+ // Logo đứng yên ở đầu sidebar, không cuộn theo menu
25
+ .layout-sidebar-logo {
26
+ flex-shrink: 0;
27
+ display: flex;
28
+ align-items: center;
29
+ padding: 0 0 var(--layout-sidebar-padding-y, 16px); // khoảng cách logo – menu
30
+ }
31
+
32
+ .layout-sidebar-content {
33
+ flex: 1 1 auto;
34
+ min-height: 0;
35
+ overflow-y: auto;
36
+ padding: 0;
37
+ }
38
+
39
+ .layout-menu {
40
+ margin: 0;
41
+ padding: 0;
42
+ list-style-type: none;
43
+
44
+ .layout-root-menuitem {
45
+ > .layout-menuitem-root-text {
46
+ font-size: 0.857rem;
47
+ text-transform: uppercase;
48
+ font-weight: 700;
49
+ color: var(--text-color);
50
+ margin: 0.75rem 0;
51
+ }
52
+
53
+ > a {
54
+ display: none;
55
+ }
56
+ }
57
+
58
+ a {
59
+ user-select: none;
60
+
61
+ &.active-menuitem {
62
+ > .layout-submenu-toggler {
63
+ transform: rotate(-180deg);
64
+ }
65
+ }
66
+ }
67
+
68
+ li.active-menuitem {
69
+ > a {
70
+ .layout-submenu-toggler {
71
+ transform: rotate(-180deg);
72
+ }
73
+ }
74
+ }
75
+
76
+ ul {
77
+ margin: 0;
78
+ padding: 0;
79
+ list-style-type: none;
80
+
81
+ // Áp dụng cho MỌI cấp submenu (`.layout-menu ul` khớp mọi <ul> con cháu
82
+ // của .layout-menu bất kể độ sâu) — AppMenuitem bind [class.layout-submenu-expanded]
83
+ // trực tiếp lên <ul> submenu của chính nó ở TẤT CẢ các cấp đệ quy, kể cả
84
+ // cấp 1 (submenu của root menuitem), nên rule collapse/expand không được
85
+ // đặt lồng thêm 1 cấp `ul { ul {...} }` (chỉ khớp từ cấp 2 trở đi).
86
+ overflow: hidden;
87
+ border-radius: var(--content-border-radius);
88
+ max-height: 0;
89
+ transition: max-height 400ms cubic-bezier(0.86, 0, 0.07, 1);
90
+
91
+ &.layout-submenu-expanded {
92
+ max-height: 1000px;
93
+ }
94
+
95
+ a {
96
+ display: flex;
97
+ align-items: center;
98
+ position: relative;
99
+ outline: 0 none;
100
+ color: var(--text-color);
101
+ cursor: pointer;
102
+ padding: 10px 8px;
103
+ border-radius: var(--content-border-radius);
104
+ transition:
105
+ background-color var(--element-transition-duration),
106
+ box-shadow var(--element-transition-duration);
107
+
108
+ .layout-menuitem-icon {
109
+ margin-right: 0.5rem;
110
+ flex-shrink: 0;
111
+ }
112
+
113
+ .layout-submenu-toggler {
114
+ font-size: 75%;
115
+ margin-left: auto;
116
+ transition: transform var(--element-transition-duration);
117
+ }
118
+
119
+ &.active-route {
120
+ font-weight: 700;
121
+ color: var(--primary-color);
122
+ }
123
+
124
+ &:hover {
125
+ background-color: var(--surface-hover);
126
+ }
127
+
128
+ &:focus {
129
+ @include focused-inset();
130
+ }
131
+ }
132
+
133
+ ul {
134
+ li {
135
+ a {
136
+ margin-left: 1rem;
137
+ }
138
+
139
+ li {
140
+ a {
141
+ margin-left: 2rem;
142
+ }
143
+
144
+ li {
145
+ a {
146
+ margin-left: 2.5rem;
147
+ }
148
+
149
+ li {
150
+ a {
151
+ margin-left: 3rem;
152
+ }
153
+
154
+ li {
155
+ a {
156
+ margin-left: 3.5rem;
157
+ }
158
+
159
+ li {
160
+ a {
161
+ margin-left: 4rem;
162
+ }
163
+ }
164
+ }
165
+ }
166
+ }
167
+ }
168
+ }
169
+ }
170
+ }
171
+ }
package/tokens/preset.css CHANGED
@@ -73,6 +73,7 @@
73
73
  --asc-color-info-border: #dbeafe;
74
74
  --asc-surface-ground: #fafafc;
75
75
  --asc-surface-base: #ffffff;
76
+ --asc-surface-translucent: rgba(255, 255, 255, 0.95);
76
77
  --asc-surface-overlay: #ffffff;
77
78
  --asc-surface-hover: #f2f3f5;
78
79
  --asc-surface-active: #dedfe0;
@@ -171,6 +172,7 @@
171
172
  --asc-color-info-bg: #172554;
172
173
  --asc-surface-ground: #0c0c0d;
173
174
  --asc-surface-base: #282829;
175
+ --asc-surface-translucent: rgba(40, 40, 41, 0.95);
174
176
  --asc-surface-overlay: #282829;
175
177
  --asc-surface-hover: #282829;
176
178
  --asc-surface-active: #424242;
@@ -769,7 +771,7 @@ a {
769
771
  .layout-main {
770
772
  flex: 1 1 auto;
771
773
  padding: 1.5rem 1.5rem 2rem;
772
- background: var(--asc-surface-base);
774
+ background-color: var(--asc-surface-translucent);
773
775
  border-radius: 1.25rem;
774
776
  }
775
777
 
@@ -946,7 +948,7 @@ img {
946
948
  top: var(--layout-sidebar-gap);
947
949
  left: var(--layout-sidebar-gap);
948
950
  transition: transform var(--layout-section-transition-duration), left var(--layout-section-transition-duration);
949
- background-color: var(--asc-surface-base);
951
+ background-color: var(--asc-surface-translucent);
950
952
  border-radius: 20px;
951
953
  padding: var(--layout-sidebar-padding-y, 16px) var(--layout-sidebar-padding-x, 12px);
952
954
  }