@awes-io/ui 2.139.0 → 2.141.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 +33 -0
- package/assets/css/components/notification.css +154 -27
- package/assets/js/icons/multicolor.js +18 -0
- package/assets/js/styles.js +12 -0
- package/components/1_atoms/AwAvatar.vue +13 -2
- package/components/2_molecules/AwSelect.vue +5 -0
- package/components/2_molecules/AwSelectObject.vue +5 -0
- package/components/4_pages/AwPage.vue +17 -0
- package/components/4_pages/AwPageMenuButtons.vue +39 -1
- package/components/4_pages/AwPageSingle.vue +8 -0
- package/components/5_layouts/_AwNoty.vue +40 -15
- package/components/5_layouts/_AwNotyContainer.vue +2 -0
- package/nuxt/pages/more.vue +8 -0
- package/nuxt/templates/core.plugin.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,39 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [2.141.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.140.0...@awes-io/ui@2.141.0) (2025-11-06)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **aw-avatar:** placeholder image updated ([305c95c](https://github.com/awes-io/client/commit/305c95cd6ca0ed158d6ca6e071f0876221dd47d9))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
* change style for notification ([b9a92ea](https://github.com/awes-io/client/commit/b9a92eaf0bdc623fb4e4c3f3a99c7c054a73da94))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [2.140.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.139.0...@awes-io/ui@2.140.0) (2025-10-27)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* do nothing if select loading ([03a8a4b](https://github.com/awes-io/client/commit/03a8a4b931ff6f73d5398da9b80cbecadad63787))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
|
|
32
|
+
* create new design for notify component ([28523fc](https://github.com/awes-io/client/commit/28523fcf5950e384d659f2e69ad476803ae0c25e))
|
|
33
|
+
* remove unused code ([f1a2390](https://github.com/awes-io/client/commit/f1a2390c383f0a9ab77f214eff2712c25e410796))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
6
39
|
# [2.139.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.138.0...@awes-io/ui@2.139.0) (2025-10-24)
|
|
7
40
|
|
|
8
41
|
|
|
@@ -1,35 +1,69 @@
|
|
|
1
1
|
.aw-noty {
|
|
2
|
-
--bg-opacity: 1;
|
|
3
2
|
display: flex;
|
|
4
3
|
align-items: flex-start;
|
|
5
|
-
|
|
6
|
-
border-radius: theme('borderRadius.lg');
|
|
7
|
-
box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2);
|
|
4
|
+
gap: 1rem;
|
|
8
5
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
padding: 0.75rem 1rem;
|
|
7
|
+
border-radius: 0.625rem;
|
|
8
|
+
background: var(--c-notify-bg);
|
|
9
|
+
box-shadow: 0 2px 5px 0 #14171D1A;
|
|
10
|
+
|
|
11
|
+
&:hover {
|
|
12
|
+
background: var(--c-on-notify-bg);
|
|
13
|
+
|
|
14
|
+
.aw-noty__button {
|
|
15
|
+
color: var(--c-on-notify-close-icon);
|
|
16
|
+
|
|
17
|
+
&-circle {
|
|
18
|
+
stroke: var(--c-on-notify-close-icon);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&--info {
|
|
24
|
+
.aw-noty__icon {
|
|
25
|
+
color: var(--c-on-blue);
|
|
26
|
+
}
|
|
12
27
|
}
|
|
13
28
|
|
|
14
|
-
|
|
15
|
-
|
|
29
|
+
&--warning {
|
|
30
|
+
.aw-noty__icon {
|
|
31
|
+
color: var(--c-on-yellow);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&--success {
|
|
36
|
+
.aw-noty__icon {
|
|
37
|
+
color: var(--c-success);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&--error {
|
|
42
|
+
.aw-noty__icon {
|
|
43
|
+
color: var(--c-error);
|
|
44
|
+
}
|
|
16
45
|
}
|
|
17
46
|
|
|
18
47
|
&__content {
|
|
19
48
|
flex-grow: 1;
|
|
49
|
+
align-self: center;
|
|
50
|
+
|
|
51
|
+
&.has-text .aw-noty__title {
|
|
52
|
+
@apply font-bold;
|
|
53
|
+
}
|
|
20
54
|
}
|
|
21
55
|
|
|
22
56
|
&__title {
|
|
23
|
-
font-size:
|
|
24
|
-
line-height:
|
|
57
|
+
font-size: 1rem;
|
|
58
|
+
line-height: 1;
|
|
59
|
+
color: var(--c-surface);
|
|
25
60
|
}
|
|
26
61
|
|
|
27
62
|
&__text {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
@apply font-bold;
|
|
63
|
+
font-size: 1rem;
|
|
64
|
+
line-height: 1;
|
|
65
|
+
color: var(--c-surface);
|
|
66
|
+
margin-top: 0.125rem;
|
|
33
67
|
}
|
|
34
68
|
|
|
35
69
|
&__icon,
|
|
@@ -38,9 +72,36 @@
|
|
|
38
72
|
}
|
|
39
73
|
|
|
40
74
|
&__button {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
75
|
+
color: var(--c-notify-close-icon);
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
justify-content: center;
|
|
79
|
+
align-self: center;
|
|
80
|
+
|
|
81
|
+
&-circular {
|
|
82
|
+
transform: rotateY(-180deg);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&-circle {
|
|
86
|
+
fill: none;
|
|
87
|
+
stroke: var(--c-notify-close-icon);
|
|
88
|
+
stroke-width: 2;
|
|
89
|
+
stroke-linecap: round;
|
|
90
|
+
animation: countdown var(--noty-animation-duration) linear forwards;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&-icon {
|
|
94
|
+
position: absolute;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@keyframes countdown {
|
|
99
|
+
from {
|
|
100
|
+
stroke-dashoffset: 0px;
|
|
101
|
+
}
|
|
102
|
+
to {
|
|
103
|
+
stroke-dashoffset: 100px;
|
|
104
|
+
}
|
|
44
105
|
}
|
|
45
106
|
}
|
|
46
107
|
|
|
@@ -60,8 +121,22 @@
|
|
|
60
121
|
bottom: env(safe-area-inset-bottom, 0px);
|
|
61
122
|
|
|
62
123
|
&_top {
|
|
63
|
-
top:
|
|
64
|
-
bottom:
|
|
124
|
+
top: auto;
|
|
125
|
+
bottom: env(safe-area-inset-bottom, 0px);
|
|
126
|
+
margin-bottom: 1rem !important;
|
|
127
|
+
margin-top: 0;
|
|
128
|
+
|
|
129
|
+
.aw-noty-container__item {
|
|
130
|
+
padding-top: 1rem;
|
|
131
|
+
|
|
132
|
+
&:first-of-type {
|
|
133
|
+
padding-top: 0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&:last-of-type {
|
|
137
|
+
padding-bottom: 0;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
65
140
|
}
|
|
66
141
|
|
|
67
142
|
&_left {
|
|
@@ -76,7 +151,13 @@
|
|
|
76
151
|
&_center {
|
|
77
152
|
@apply items-center;
|
|
78
153
|
right: 50%;
|
|
79
|
-
transform: translateX(50%)
|
|
154
|
+
transform: translateX(50%);
|
|
155
|
+
width: 100%;
|
|
156
|
+
max-width: 100%;
|
|
157
|
+
|
|
158
|
+
.aw-noty-container__item {
|
|
159
|
+
width: 100%;
|
|
160
|
+
}
|
|
80
161
|
}
|
|
81
162
|
|
|
82
163
|
&__item {
|
|
@@ -91,14 +172,60 @@
|
|
|
91
172
|
}
|
|
92
173
|
}
|
|
93
174
|
|
|
94
|
-
|
|
175
|
+
.aw-page-single-noty {
|
|
176
|
+
.aw-noty-container {
|
|
177
|
+
&_top {
|
|
178
|
+
padding-left: 1rem;
|
|
179
|
+
padding-right: 1rem;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.aw-page-noty {
|
|
185
|
+
.aw-noty-container_top {
|
|
186
|
+
margin-bottom: max(calc(var(--page-buttons-bottom, 0px) + var(--page-fixed-buttons-height, 0px)), 1rem) !important;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.aw-more-noty {
|
|
191
|
+
.aw-noty-container_top {
|
|
192
|
+
margin-bottom: 3.5rem !important;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
@screen lg {
|
|
197
|
+
.aw-page-single-noty {
|
|
198
|
+
.aw-noty-container {
|
|
199
|
+
&_top {
|
|
200
|
+
margin-top: 3.5rem;
|
|
201
|
+
padding-left: 0.5rem;
|
|
202
|
+
padding-right: 0.5rem;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.aw-page-noty, .aw-more-noty {
|
|
208
|
+
.aw-noty-container_top {
|
|
209
|
+
margin-bottom: 0 !important;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
95
213
|
.aw-noty-container {
|
|
96
214
|
width: auto;
|
|
97
|
-
max-width:
|
|
215
|
+
max-width: 23rem;
|
|
216
|
+
|
|
217
|
+
&_top {
|
|
218
|
+
top: env(safe-area-inset-top, 0px);
|
|
219
|
+
bottom: auto;
|
|
220
|
+
margin-top: 0.5rem;
|
|
221
|
+
margin-bottom: 0 !important;
|
|
98
222
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
223
|
+
.aw-noty-container__item {
|
|
224
|
+
&:last-of-type {
|
|
225
|
+
padding-bottom: 0.5rem;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
102
229
|
}
|
|
103
230
|
}
|
|
104
231
|
|
|
@@ -23,5 +23,23 @@ export default{
|
|
|
23
23
|
height: 10,
|
|
24
24
|
viewBox: '0 0 10 10',
|
|
25
25
|
content: '<path fill="currentColor" fill-opacity=".5" d="M8 5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"/>'
|
|
26
|
+
},
|
|
27
|
+
'error-circle': {
|
|
28
|
+
width: 24,
|
|
29
|
+
height: 24,
|
|
30
|
+
viewBox: '0 0 24 24',
|
|
31
|
+
content: '<path fill="currentColor" d="M12 0c6.628 0 12 5.374 12 12s-5.372 12-12 12S0 18.626 0 12 5.372 0 12 0m.002 15.605a1.2 1.2 0 1 0-.075 2.397 1.2 1.2 0 0 0 .075-2.397M12 6a1.2 1.2 0 0 0-1.192 1.06l-.008.14.002 6.001.009.14a1.2 1.2 0 0 0 2.383 0l.008-.14L13.2 7.2l-.008-.14A1.2 1.2 0 0 0 12 6"/><path fill="#fff" d="M12.002 15.605a1.2 1.2 0 1 0-.075 2.397 1.2 1.2 0 0 0 .075-2.397M12 6a1.2 1.2 0 0 0-1.192 1.06l-.008.14.002 6.001.009.14a1.2 1.2 0 0 0 2.383 0l.008-.14L13.2 7.2l-.008-.14A1.2 1.2 0 0 0 12 6"/>'
|
|
32
|
+
},
|
|
33
|
+
'info-circle': {
|
|
34
|
+
width: 24,
|
|
35
|
+
height: 24,
|
|
36
|
+
viewBox: '0 0 24 24',
|
|
37
|
+
content: '<path fill="currentColor" d="M12 24c6.628 0 12-5.374 12-12S18.628 0 12 0 0 5.374 0 12s5.372 12 12 12m.002-15.605a1.199 1.199 0 1 1-.075-2.397 1.199 1.199 0 0 1 .075 2.397M12 18a1.2 1.2 0 0 1-1.192-1.06l-.008-.14.002-6.001.009-.14a1.2 1.2 0 0 1 2.383 0l.008.14L13.2 16.8l-.008.14A1.2 1.2 0 0 1 12 18"/><path fill="#fff" d="M12 18a1.2 1.2 0 0 1-1.192-1.06l-.008-.14.002-6.001.009-.14a1.2 1.2 0 0 1 2.383 0l.008.14L13.2 16.8l-.008.14A1.2 1.2 0 0 1 12 18M12.002 8.395a1.199 1.199 0 1 1-.075-2.397 1.199 1.199 0 0 1 .075 2.397"/>'
|
|
38
|
+
},
|
|
39
|
+
'check-circle': {
|
|
40
|
+
width: 24,
|
|
41
|
+
height: 24,
|
|
42
|
+
viewBox: '0 0 24 24',
|
|
43
|
+
content: '<circle cx="12" cy="12" r="12" fill="currentColor"/><path fill="#fff" fill-rule="evenodd" d="M16.611 8.208a1 1 0 0 1 .18 1.403l-4.63 6a1 1 0 0 1-1.408.177l-3.368-2.63a1 1 0 0 1 1.23-1.576l2.576 2.011L15.21 8.39a1 1 0 0 1 1.402-.18" clip-rule="evenodd"/>'
|
|
26
44
|
}
|
|
27
45
|
}
|
package/assets/js/styles.js
CHANGED
|
@@ -69,6 +69,9 @@ export default {
|
|
|
69
69
|
'page-bg': '#F3F5F7',
|
|
70
70
|
overlay: 'rgba(20, 23, 29, 0.6)',
|
|
71
71
|
|
|
72
|
+
'notify-bg': '#292A2E',
|
|
73
|
+
'notify-close-icon': '#ABACAD',
|
|
74
|
+
|
|
72
75
|
'mono-0': '#000',
|
|
73
76
|
'mono-50': '#0a0c0f',
|
|
74
77
|
'mono-100': '#14171d',
|
|
@@ -97,6 +100,9 @@ export default {
|
|
|
97
100
|
'page-bg': '#14171d',
|
|
98
101
|
overlay: '#fff',
|
|
99
102
|
|
|
103
|
+
'notify-bg': '#434447',
|
|
104
|
+
'notify-close-icon': '#C0C1C2',
|
|
105
|
+
|
|
100
106
|
'mono-0': '#fff',
|
|
101
107
|
'mono-50': '#fff',
|
|
102
108
|
'mono-100': '#fff',
|
|
@@ -126,6 +132,9 @@ export default {
|
|
|
126
132
|
'page-bg': '#010101',
|
|
127
133
|
overlay: 'rgba(0, 0, 0, 0.6)',
|
|
128
134
|
|
|
135
|
+
'notify-bg': '#FFFFFF',
|
|
136
|
+
'notify-close-icon': '#838587',
|
|
137
|
+
|
|
129
138
|
'mono-0': '#FFFFFF',
|
|
130
139
|
'mono-50': '#DBDDDE',
|
|
131
140
|
'mono-100': '#feffff',
|
|
@@ -153,6 +162,9 @@ export default {
|
|
|
153
162
|
'page-bg': '#e7eaed',
|
|
154
163
|
overlay: '#fff',
|
|
155
164
|
|
|
165
|
+
'notify-bg': '#F3F5F7',
|
|
166
|
+
'notify-close-icon': '#595D62',
|
|
167
|
+
|
|
156
168
|
'mono-0': '#2E2F33',
|
|
157
169
|
'mono-50': '#2E2F33',
|
|
158
170
|
'mono-100': '#2E2F33',
|
|
@@ -49,13 +49,24 @@
|
|
|
49
49
|
<svg
|
|
50
50
|
v-if="(imageError || !src) && type === 'no-img'"
|
|
51
51
|
xmlns="http://www.w3.org/2000/svg"
|
|
52
|
-
|
|
52
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
53
|
+
width="30"
|
|
54
|
+
height="30"
|
|
55
|
+
viewBox="0 0 30 30"
|
|
53
56
|
class="aw-avatar__no-img-icon"
|
|
54
57
|
data-dark="false"
|
|
55
58
|
>
|
|
56
59
|
<path
|
|
57
60
|
:fill="color.background"
|
|
58
|
-
d="
|
|
61
|
+
d="M30 15a15 15 0 1 0-30 0 15 15 0 0 0 30 0"
|
|
62
|
+
/>
|
|
63
|
+
<path
|
|
64
|
+
fill="var(--c-surface, #fff)"
|
|
65
|
+
d="M21.23 9.23c0 3.43-2.8 6.23-6.23 6.23a6.25 6.25 0 0 1-6.23-6.23C8.77 5.8 11.57 3 15 3s6.23 2.8 6.23 6.23"
|
|
66
|
+
/>
|
|
67
|
+
<path
|
|
68
|
+
fill="var(--c-surface, #fff)"
|
|
69
|
+
d="M25.07 19.3q.37.53.63 1.14.12.27-.09.52-.32.56-.73 1.09a12.6 12.6 0 0 1-9.9 4.95 12.3 12.3 0 0 1-10.64-6.04q-.14-.25-.03-.52c.16-.38.38-.79.62-1.14 1.2-1.8 3.09-2.06 5.2-2.35l.16-.02c.28-.06.58.02.8.19A6.6 6.6 0 0 0 15 18.39c1.42 0 2.78-.43 3.92-1.27.22-.17.52-.22.79-.2l.15.03c2.12.29 3.99.54 5.21 2.35"
|
|
59
70
|
/>
|
|
60
71
|
</svg>
|
|
61
72
|
</slot>
|
|
@@ -232,6 +232,14 @@ export default {
|
|
|
232
232
|
}
|
|
233
233
|
},
|
|
234
234
|
|
|
235
|
+
head() {
|
|
236
|
+
return {
|
|
237
|
+
bodyAttrs: {
|
|
238
|
+
class: 'aw-page-noty'
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
|
|
235
243
|
provide() {
|
|
236
244
|
return {
|
|
237
245
|
teleportButtonsTo: '.aw-page'
|
|
@@ -299,9 +307,18 @@ export default {
|
|
|
299
307
|
}
|
|
300
308
|
},
|
|
301
309
|
|
|
310
|
+
mounted() {
|
|
311
|
+
if (!this._hideBottomBar) {
|
|
312
|
+
document.body.style.setProperty('--page-buttons-bottom', '3.5rem')
|
|
313
|
+
} else {
|
|
314
|
+
document.body.style.removeProperty('--page-buttons-bottom')
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
|
|
302
318
|
beforeDestory() {
|
|
303
319
|
this.$emit('update:fullscreen', false)
|
|
304
320
|
this.watchFullscreenState(false)
|
|
321
|
+
document.body.style.removeProperty('--page-buttons-bottom')
|
|
305
322
|
},
|
|
306
323
|
|
|
307
324
|
methods: {
|
|
@@ -39,7 +39,9 @@
|
|
|
39
39
|
|
|
40
40
|
<!-- fixed button -->
|
|
41
41
|
<Teleport
|
|
42
|
-
v-if="
|
|
42
|
+
v-if="
|
|
43
|
+
!isExpanded && splitButtons.fixed && splitButtons.fixed.length
|
|
44
|
+
"
|
|
43
45
|
:to="teleportButtonsTo"
|
|
44
46
|
>
|
|
45
47
|
<div class="aw-page-menu-buttons__fixed-btns">
|
|
@@ -174,11 +176,47 @@ export default {
|
|
|
174
176
|
}
|
|
175
177
|
},
|
|
176
178
|
|
|
179
|
+
watch: {
|
|
180
|
+
'splitButtons.fixed': {
|
|
181
|
+
handler() {
|
|
182
|
+
if (!this.isExpanded) {
|
|
183
|
+
this.getFixedButtonsHeight()
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
immediate: true
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
|
|
177
190
|
mounted() {
|
|
178
191
|
this._initScrollListener()
|
|
179
192
|
},
|
|
180
193
|
|
|
194
|
+
beforeDestroy() {
|
|
195
|
+
document.body.style.removeProperty('--page-fixed-buttons-height')
|
|
196
|
+
},
|
|
197
|
+
|
|
181
198
|
methods: {
|
|
199
|
+
getFixedButtonsHeight() {
|
|
200
|
+
const buttons = document.querySelector(
|
|
201
|
+
'.aw-page-menu-buttons__fixed-btns'
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
let buttonsHeight = 0
|
|
205
|
+
|
|
206
|
+
if (buttons) {
|
|
207
|
+
buttonsHeight = buttons.offsetHeight
|
|
208
|
+
} else {
|
|
209
|
+
const oneButtonHeight = 72
|
|
210
|
+
|
|
211
|
+
buttonsHeight = this.splitButtons.fixed.length * oneButtonHeight
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
document.body.style.setProperty(
|
|
215
|
+
'--page-fixed-buttons-height',
|
|
216
|
+
`${buttonsHeight}px`
|
|
217
|
+
)
|
|
218
|
+
},
|
|
219
|
+
|
|
182
220
|
_getVisiblity(show) {
|
|
183
221
|
return isType('Function', show) ? show(this) : defaultTo(true, show)
|
|
184
222
|
},
|
|
@@ -1,30 +1,33 @@
|
|
|
1
1
|
<template functional>
|
|
2
2
|
<div
|
|
3
3
|
:data-testid="props.testId"
|
|
4
|
-
:class="{
|
|
5
|
-
'bg-overlay': props.icon,
|
|
6
|
-
[`bg-${props.type}`]: !props.icon,
|
|
7
|
-
'aw-noty__has-text': props.text
|
|
8
|
-
}"
|
|
9
4
|
class="aw-noty"
|
|
5
|
+
:class="`aw-noty--${props.type}`"
|
|
6
|
+
:style="{ '--noty-animation-duration': `${props.duration}ms` }"
|
|
10
7
|
>
|
|
11
8
|
<!-- icon -->
|
|
12
9
|
<Component
|
|
13
|
-
:is="
|
|
10
|
+
:is="
|
|
11
|
+
typeof props.icon === 'string'
|
|
12
|
+
? $options.components.AwIcon
|
|
13
|
+
: $options.components.AwIconSystemColor
|
|
14
|
+
"
|
|
14
15
|
v-if="props.icon"
|
|
15
16
|
:name="
|
|
16
17
|
typeof props.icon === 'string'
|
|
17
18
|
? props.icon
|
|
18
19
|
: $options.getDefaultIconName(props.type)
|
|
19
20
|
"
|
|
20
|
-
size="
|
|
21
|
+
size="24"
|
|
21
22
|
class="aw-noty__icon"
|
|
22
23
|
:class="`text-${props.type}`"
|
|
23
24
|
/>
|
|
24
25
|
|
|
25
26
|
<!-- content -->
|
|
26
27
|
<div class="aw-noty__content" :class="{ 'has-text': props.text }">
|
|
27
|
-
<div class="aw-noty__title">
|
|
28
|
+
<div class="aw-noty__title">
|
|
29
|
+
{{ props.title }}
|
|
30
|
+
</div>
|
|
28
31
|
<div
|
|
29
32
|
v-if="props.text"
|
|
30
33
|
v-html="$options.sanitize(props.text)"
|
|
@@ -38,10 +41,25 @@
|
|
|
38
41
|
@click="props.remove"
|
|
39
42
|
class="aw-noty__button"
|
|
40
43
|
>
|
|
44
|
+
<svg
|
|
45
|
+
width="22"
|
|
46
|
+
height="22"
|
|
47
|
+
viewBox="0 0 36 36"
|
|
48
|
+
class="aw-noty__button-circular"
|
|
49
|
+
>
|
|
50
|
+
<path
|
|
51
|
+
class="aw-noty__button-circle"
|
|
52
|
+
:stroke-dasharray="100"
|
|
53
|
+
:stroke-dashoffset="100"
|
|
54
|
+
d="M18 2.0845a 15.9155 15.9155 0 0 1 0 31.831a 15.9155 15.9155 0 0 1 0 -31.831"
|
|
55
|
+
/>
|
|
56
|
+
</svg>
|
|
57
|
+
|
|
41
58
|
<Component
|
|
42
59
|
:is="$options.components.AwIconSystemMono"
|
|
43
60
|
name="close"
|
|
44
|
-
size="
|
|
61
|
+
size="8"
|
|
62
|
+
class="aw-noty__button-icon"
|
|
45
63
|
/>
|
|
46
64
|
</button>
|
|
47
65
|
</div>
|
|
@@ -51,13 +69,15 @@
|
|
|
51
69
|
import { sanitize } from '@AwUtils/string'
|
|
52
70
|
import AwIcon from '@AwAtoms/AwIcon/AwIcon.vue'
|
|
53
71
|
import AwIconSystemMono from '@AwAtoms/AwIcon/AwIconSystemMono.vue'
|
|
72
|
+
import AwIconSystemColor from '@AwAtoms/AwIcon/AwIconSystemColor.vue'
|
|
54
73
|
|
|
55
74
|
export default {
|
|
56
75
|
name: 'AwNoty',
|
|
57
76
|
|
|
58
77
|
components: {
|
|
59
78
|
AwIcon,
|
|
60
|
-
AwIconSystemMono
|
|
79
|
+
AwIconSystemMono,
|
|
80
|
+
AwIconSystemColor
|
|
61
81
|
},
|
|
62
82
|
|
|
63
83
|
props: {
|
|
@@ -96,7 +116,12 @@ export default {
|
|
|
96
116
|
|
|
97
117
|
closable: {
|
|
98
118
|
type: Boolean,
|
|
99
|
-
default:
|
|
119
|
+
default: true
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
duration: {
|
|
123
|
+
type: Number,
|
|
124
|
+
default: null
|
|
100
125
|
}
|
|
101
126
|
},
|
|
102
127
|
|
|
@@ -105,13 +130,13 @@ export default {
|
|
|
105
130
|
getDefaultIconName(type) {
|
|
106
131
|
switch (type) {
|
|
107
132
|
case 'error':
|
|
108
|
-
return '
|
|
133
|
+
return 'error-circle'
|
|
109
134
|
case 'warning':
|
|
110
|
-
return '
|
|
135
|
+
return 'info-circle'
|
|
111
136
|
case 'info':
|
|
112
|
-
return '
|
|
137
|
+
return 'info-circle'
|
|
113
138
|
default:
|
|
114
|
-
return '
|
|
139
|
+
return 'check-circle'
|
|
115
140
|
}
|
|
116
141
|
}
|
|
117
142
|
}
|
|
@@ -63,8 +63,10 @@ export default {
|
|
|
63
63
|
const id = _notifyId++
|
|
64
64
|
item.id = id
|
|
65
65
|
item.testId = item.testId || 'notifi-' + id
|
|
66
|
+
item.duration = parseInt(item.timeout)
|
|
66
67
|
|
|
67
68
|
const removeAfter = parseInt(item.timeout)
|
|
69
|
+
|
|
68
70
|
if (removeAfter && !isNaN(removeAfter)) {
|
|
69
71
|
item.timeout = setTimeout(this.remove, removeAfter, id)
|
|
70
72
|
}
|
package/nuxt/pages/more.vue
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awes-io/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.141.0",
|
|
4
4
|
"description": "User Interface (UI) components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui",
|
|
@@ -114,5 +114,5 @@
|
|
|
114
114
|
"rollup-plugin-visualizer": "^2.6.0",
|
|
115
115
|
"rollup-plugin-vue": "^5.0.1"
|
|
116
116
|
},
|
|
117
|
-
"gitHead": "
|
|
117
|
+
"gitHead": "6a1c98c94322a7515f824f414e09892e79776654"
|
|
118
118
|
}
|