@aseansc/ui 4.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.
@@ -0,0 +1,151 @@
1
+ @use 'mixins' as *;
2
+
3
+ .layout-sidebar {
4
+ position: fixed;
5
+ width: 20rem;
6
+ height: calc(100vh - 8rem);
7
+ z-index: 999;
8
+ overflow-y: auto;
9
+ user-select: none;
10
+ top: 6rem;
11
+ left: 2rem;
12
+ transition:
13
+ transform var(--layout-section-transition-duration),
14
+ left var(--layout-section-transition-duration);
15
+ background-color: var(--surface-overlay);
16
+ border-radius: var(--content-border-radius);
17
+ padding: 0.5rem 1.5rem;
18
+ }
19
+
20
+ .layout-menu {
21
+ margin: 0;
22
+ padding: 0;
23
+ list-style-type: none;
24
+
25
+ .layout-root-menuitem {
26
+ > .layout-menuitem-root-text {
27
+ font-size: 0.857rem;
28
+ text-transform: uppercase;
29
+ font-weight: 700;
30
+ color: var(--text-color);
31
+ margin: 0.75rem 0;
32
+ }
33
+
34
+ > a {
35
+ display: none;
36
+ }
37
+ }
38
+
39
+ a {
40
+ user-select: none;
41
+
42
+ &.active-menuitem {
43
+ > .layout-submenu-toggler {
44
+ transform: rotate(-180deg);
45
+ }
46
+ }
47
+ }
48
+
49
+ li.active-menuitem {
50
+ > a {
51
+ .layout-submenu-toggler {
52
+ transform: rotate(-180deg);
53
+ }
54
+ }
55
+ }
56
+
57
+ ul {
58
+ margin: 0;
59
+ padding: 0;
60
+ list-style-type: none;
61
+
62
+ // Áp dụng cho MỌI cấp submenu (`.layout-menu ul` khớp mọi <ul> con cháu
63
+ // của .layout-menu bất kể độ sâu) — AppMenuitem bind [class.layout-submenu-expanded]
64
+ // trực tiếp lên <ul> submenu của chính nó ở TẤT CẢ các cấp đệ quy, kể cả
65
+ // cấp 1 (submenu của root menuitem), nên rule collapse/expand không được
66
+ // đặt lồng thêm 1 cấp `ul { ul {...} }` (chỉ khớp từ cấp 2 trở đi).
67
+ overflow: hidden;
68
+ border-radius: var(--content-border-radius);
69
+ max-height: 0;
70
+ transition: max-height 400ms cubic-bezier(0.86, 0, 0.07, 1);
71
+
72
+ &.layout-submenu-expanded {
73
+ max-height: 1000px;
74
+ }
75
+
76
+ a {
77
+ display: flex;
78
+ align-items: center;
79
+ position: relative;
80
+ outline: 0 none;
81
+ color: var(--text-color);
82
+ cursor: pointer;
83
+ padding: 0.75rem 1rem;
84
+ border-radius: var(--content-border-radius);
85
+ transition:
86
+ background-color var(--element-transition-duration),
87
+ box-shadow var(--element-transition-duration);
88
+
89
+ .layout-menuitem-icon {
90
+ margin-right: 0.5rem;
91
+ }
92
+
93
+ .layout-submenu-toggler {
94
+ font-size: 75%;
95
+ margin-left: auto;
96
+ transition: transform var(--element-transition-duration);
97
+ }
98
+
99
+ &.active-route {
100
+ font-weight: 700;
101
+ color: var(--primary-color);
102
+ }
103
+
104
+ &:hover {
105
+ background-color: var(--surface-hover);
106
+ }
107
+
108
+ &:focus {
109
+ @include focused-inset();
110
+ }
111
+ }
112
+
113
+ ul {
114
+ li {
115
+ a {
116
+ margin-left: 1rem;
117
+ }
118
+
119
+ li {
120
+ a {
121
+ margin-left: 2rem;
122
+ }
123
+
124
+ li {
125
+ a {
126
+ margin-left: 2.5rem;
127
+ }
128
+
129
+ li {
130
+ a {
131
+ margin-left: 3rem;
132
+ }
133
+
134
+ li {
135
+ a {
136
+ margin-left: 3.5rem;
137
+ }
138
+
139
+ li {
140
+ a {
141
+ margin-left: 4rem;
142
+ }
143
+ }
144
+ }
145
+ }
146
+ }
147
+ }
148
+ }
149
+ }
150
+ }
151
+ }
@@ -0,0 +1,15 @@
1
+ @mixin focused() {
2
+ outline-width: var(--focus-ring-width);
3
+ outline-style: var(--focus-ring-style);
4
+ outline-color: var(--focus-ring-color);
5
+ outline-offset: var(--focus-ring-offset);
6
+ box-shadow: var(--focus-ring-shadow);
7
+ transition:
8
+ box-shadow var(--transition-duration),
9
+ outline-color var(--transition-duration);
10
+ }
11
+
12
+ @mixin focused-inset() {
13
+ outline-offset: -1px;
14
+ box-shadow: inset var(--focus-ring-shadow);
15
+ }
@@ -0,0 +1,49 @@
1
+ .preloader {
2
+ position: fixed;
3
+ z-index: 999999;
4
+ background: #edf1f5;
5
+ width: 100%;
6
+ height: 100%;
7
+ }
8
+
9
+ .preloader-content {
10
+ border: 0 solid transparent;
11
+ border-radius: 50%;
12
+ width: 150px;
13
+ height: 150px;
14
+ position: absolute;
15
+ top: calc(50vh - 75px);
16
+ left: calc(50vw - 75px);
17
+ }
18
+
19
+ .preloader-content:before,
20
+ .preloader-content:after {
21
+ content: '';
22
+ border: 1em solid var(--primary-color);
23
+ border-radius: 50%;
24
+ width: inherit;
25
+ height: inherit;
26
+ position: absolute;
27
+ top: 0;
28
+ left: 0;
29
+ animation: loader 2s linear infinite;
30
+ opacity: 0;
31
+ }
32
+
33
+ .preloader-content:before {
34
+ animation-delay: 0.5s;
35
+ }
36
+
37
+ @keyframes loader {
38
+ 0% {
39
+ transform: scale(0);
40
+ opacity: 0;
41
+ }
42
+ 50% {
43
+ opacity: 1;
44
+ }
45
+ 100% {
46
+ transform: scale(1);
47
+ opacity: 0;
48
+ }
49
+ }
@@ -0,0 +1,110 @@
1
+ @media screen and (min-width: 1960px) {
2
+ .layout-main,
3
+ .landing-wrapper {
4
+ width: 1504px;
5
+ margin-left: auto !important;
6
+ margin-right: auto !important;
7
+ }
8
+ }
9
+
10
+ @media (min-width: 992px) {
11
+ .layout-wrapper {
12
+ &.layout-overlay {
13
+ .layout-main-container {
14
+ margin-left: 0;
15
+ padding-left: 2rem;
16
+ }
17
+
18
+ .layout-sidebar {
19
+ transform: translateX(-100%);
20
+ left: 0;
21
+ top: 0;
22
+ height: 100vh;
23
+ border-top-left-radius: 0;
24
+ border-bottom-left-radius: 0;
25
+ border-right: 1px solid var(--surface-border);
26
+ transition:
27
+ transform 0.4s cubic-bezier(0.05, 0.74, 0.2, 0.99),
28
+ left 0.4s cubic-bezier(0.05, 0.74, 0.2, 0.99);
29
+ box-shadow:
30
+ 0px 3px 5px rgba(0, 0, 0, 0.02),
31
+ 0px 0px 2px rgba(0, 0, 0, 0.05),
32
+ 0px 1px 4px rgba(0, 0, 0, 0.08);
33
+ }
34
+
35
+ &.layout-overlay-active {
36
+ .layout-sidebar {
37
+ transform: translateX(0);
38
+ }
39
+ }
40
+ }
41
+
42
+ &.layout-static {
43
+ .layout-main-container {
44
+ margin-left: 22rem;
45
+ }
46
+
47
+ &.layout-static-inactive {
48
+ .layout-sidebar {
49
+ transform: translateX(-100%);
50
+ left: 0;
51
+ }
52
+
53
+ .layout-main-container {
54
+ margin-left: 0;
55
+ padding-left: 2rem;
56
+ }
57
+ }
58
+ }
59
+
60
+ .layout-mask {
61
+ display: none;
62
+ }
63
+ }
64
+ }
65
+
66
+ @media (max-width: 991px) {
67
+ .blocked-scroll {
68
+ overflow: hidden;
69
+ }
70
+
71
+ .layout-wrapper {
72
+ .layout-main-container {
73
+ margin-left: 0;
74
+ padding-left: 2rem;
75
+ }
76
+
77
+ .layout-sidebar {
78
+ transform: translateX(-100%);
79
+ left: 0;
80
+ top: 0;
81
+ height: 100vh;
82
+ border-top-left-radius: 0;
83
+ border-bottom-left-radius: 0;
84
+ transition:
85
+ transform 0.4s cubic-bezier(0.05, 0.74, 0.2, 0.99),
86
+ left 0.4s cubic-bezier(0.05, 0.74, 0.2, 0.99);
87
+ }
88
+
89
+ .layout-mask {
90
+ display: none;
91
+ position: fixed;
92
+ top: 0;
93
+ left: 0;
94
+ z-index: 998;
95
+ width: 100%;
96
+ height: 100%;
97
+ background-color: var(--maskbg);
98
+ }
99
+
100
+ &.layout-mobile-active {
101
+ .layout-sidebar {
102
+ transform: translateX(0);
103
+ }
104
+
105
+ .layout-mask {
106
+ display: block;
107
+ }
108
+ }
109
+ }
110
+ }
@@ -0,0 +1,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
+ background-color: var(--surface-card);
12
+ transition: left var(--layout-section-transition-duration);
13
+ display: flex;
14
+ align-items: center;
15
+
16
+ .layout-topbar-logo-container {
17
+ display: flex;
18
+ align-items: center;
19
+ }
20
+
21
+ .layout-topbar-logo {
22
+ display: inline-flex;
23
+ align-items: center;
24
+ font-size: 1.5rem;
25
+ border-radius: var(--content-border-radius);
26
+ color: var(--text-color);
27
+ font-weight: 500;
28
+ gap: 0.5rem;
29
+
30
+ svg {
31
+ width: 3rem;
32
+ }
33
+
34
+ &:focus-visible {
35
+ @include focused();
36
+ }
37
+ }
38
+
39
+ .layout-topbar-action {
40
+ display: inline-flex;
41
+ justify-content: center;
42
+ align-items: center;
43
+ color: var(--text-color-secondary);
44
+ border-radius: 50%;
45
+ width: 2.5rem;
46
+ height: 2.5rem;
47
+ color: var(--text-color);
48
+ transition: background-color var(--element-transition-duration);
49
+ cursor: pointer;
50
+
51
+ &:hover {
52
+ background-color: var(--surface-hover);
53
+ }
54
+
55
+ &:focus-visible {
56
+ @include focused();
57
+ }
58
+
59
+ i {
60
+ font-size: 1.25rem;
61
+ }
62
+
63
+ span {
64
+ font-size: 1rem;
65
+ display: none;
66
+ }
67
+
68
+ &.layout-topbar-action-highlight {
69
+ background-color: var(--primary-color);
70
+ color: var(--primary-contrast-color);
71
+ }
72
+ }
73
+
74
+ .layout-menu-button {
75
+ margin-right: 0.5rem;
76
+ }
77
+
78
+ .layout-topbar-menu-button {
79
+ display: none;
80
+ }
81
+
82
+ .layout-topbar-actions {
83
+ margin-left: auto;
84
+ display: flex;
85
+ gap: 1rem;
86
+ }
87
+
88
+ .layout-topbar-menu-content {
89
+ display: flex;
90
+ gap: 1rem;
91
+ }
92
+
93
+ .layout-config-menu {
94
+ display: flex;
95
+ gap: 1rem;
96
+ }
97
+ }
98
+
99
+ @media (max-width: 991px) {
100
+ .layout-topbar {
101
+ padding: 0 2rem;
102
+
103
+ .layout-topbar-logo-container {
104
+ width: auto;
105
+ }
106
+
107
+ .layout-menu-button {
108
+ margin-left: 0;
109
+ margin-right: 0.5rem;
110
+ }
111
+
112
+ .layout-topbar-menu-button {
113
+ display: inline-flex;
114
+ }
115
+
116
+ .layout-topbar-menu {
117
+ position: absolute;
118
+ background-color: var(--surface-overlay);
119
+ transform-origin: top;
120
+ box-shadow:
121
+ 0px 3px 5px rgba(0, 0, 0, 0.02),
122
+ 0px 0px 2px rgba(0, 0, 0, 0.05),
123
+ 0px 1px 4px rgba(0, 0, 0, 0.08);
124
+ border-radius: var(--content-border-radius);
125
+ padding: 1rem;
126
+ right: 2rem;
127
+ top: 4rem;
128
+ min-width: 15rem;
129
+ border: 1px solid var(--surface-border);
130
+
131
+ .layout-topbar-menu-content {
132
+ gap: 0.5rem;
133
+ }
134
+
135
+ .layout-topbar-action {
136
+ display: flex;
137
+ width: 100%;
138
+ height: auto;
139
+ justify-content: flex-start;
140
+ border-radius: var(--content-border-radius);
141
+ padding: 0.5rem 1rem;
142
+
143
+ i {
144
+ font-size: 1rem;
145
+ margin-right: 0.5rem;
146
+ }
147
+
148
+ span {
149
+ font-weight: medium;
150
+ display: block;
151
+ }
152
+ }
153
+ }
154
+
155
+ .layout-topbar-menu-content {
156
+ flex-direction: column;
157
+ }
158
+ }
159
+ }
@@ -0,0 +1,68 @@
1
+ h1,
2
+ h2,
3
+ h3,
4
+ h4,
5
+ h5,
6
+ h6 {
7
+ margin: 1.5rem 0 1rem 0;
8
+ font-family: inherit;
9
+ font-weight: 700;
10
+ line-height: 1.5;
11
+ color: var(--text-color);
12
+
13
+ &:first-child {
14
+ margin-top: 0;
15
+ }
16
+ }
17
+
18
+ h1 {
19
+ font-size: 2.5rem;
20
+ }
21
+
22
+ h2 {
23
+ font-size: 2rem;
24
+ }
25
+
26
+ h3 {
27
+ font-size: 1.75rem;
28
+ }
29
+
30
+ h4 {
31
+ font-size: 1.5rem;
32
+ }
33
+
34
+ h5 {
35
+ font-size: 1.25rem;
36
+ }
37
+
38
+ h6 {
39
+ font-size: 1rem;
40
+ }
41
+
42
+ mark {
43
+ background: #fff8e1;
44
+ padding: 0.25rem 0.4rem;
45
+ border-radius: var(--content-border-radius);
46
+ font-family: monospace;
47
+ }
48
+
49
+ blockquote {
50
+ margin: 1rem 0;
51
+ padding: 0 2rem;
52
+ border-left: 4px solid #90a4ae;
53
+ }
54
+
55
+ hr {
56
+ border-top: solid var(--surface-border);
57
+ border-width: 1px 0 0 0;
58
+ margin: 1rem 0;
59
+ }
60
+
61
+ p {
62
+ margin: 0 0 1rem 0;
63
+ line-height: 1.5;
64
+
65
+ &:last-child {
66
+ margin-bottom: 0;
67
+ }
68
+ }
@@ -0,0 +1,25 @@
1
+ /* Utils */
2
+ .clearfix:after {
3
+ content: ' ';
4
+ display: block;
5
+ clear: both;
6
+ }
7
+
8
+ .card {
9
+ background: var(--surface-card);
10
+ padding: 2rem;
11
+ margin-bottom: 2rem;
12
+ border-radius: var(--content-border-radius);
13
+
14
+ &:last-child {
15
+ margin-bottom: 0;
16
+ }
17
+ }
18
+
19
+ .p-toast {
20
+ &.p-toast-top-right,
21
+ &.p-toast-top-left,
22
+ &.p-toast-top-center {
23
+ top: 100px;
24
+ }
25
+ }
@@ -0,0 +1,13 @@
1
+ @use './variables/_common';
2
+ @use './variables/_light';
3
+ @use './variables/_dark';
4
+ @use './_mixins';
5
+ @use './_preloading';
6
+ @use './_core';
7
+ @use './_main';
8
+ @use './_topbar';
9
+ @use './_menu';
10
+ @use './_footer';
11
+ @use './_responsive';
12
+ @use './_utils';
13
+ @use './_typography';
@@ -0,0 +1,20 @@
1
+ :root {
2
+ --primary-color: var(--p-primary-color);
3
+ --primary-contrast-color: var(--p-primary-contrast-color);
4
+ --text-color: #0F0F0F;
5
+ --text-color-secondary: var(--p-text-muted-color);
6
+ --surface-border: var(--p-content-border-color);
7
+ --surface-card: var(--p-content-background);
8
+ --surface-hover: var(--p-content-hover-background);
9
+ --surface-overlay: var(--p-overlay-popover-background);
10
+ --transition-duration: var(--p-transition-duration);
11
+ --maskbg: var(--p-mask-background);
12
+ --content-border-radius: var(--p-content-border-radius);
13
+ --layout-section-transition-duration: 0.2s;
14
+ --element-transition-duration: var(--p-transition-duration);
15
+ --focus-ring-width: var(--p-focus-ring-width);
16
+ --focus-ring-style: var(--p-focus-ring-style);
17
+ --focus-ring-color: var(--p-focus-ring-color);
18
+ --focus-ring-offset: var(--p-focus-ring-offset);
19
+ --focus-ring-shadow: var(--p-focus-ring-shadow);
20
+ }
@@ -0,0 +1,5 @@
1
+ :root[class*='app-dark'] {
2
+ --surface-ground: var(--p-surface-950);
3
+ --code-background: var(--p-surface-800);
4
+ --code-color: var(--p-surface-100);
5
+ }
@@ -0,0 +1,5 @@
1
+ :root {
2
+ --surface-ground: var(--p-surface-100);
3
+ --code-background: var(--p-surface-900);
4
+ --code-color: var(--p-surface-200);
5
+ }