@awes-io/ui 2.80.0 → 2.82.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 +24 -0
- package/assets/css/components/alert.css +4 -0
- package/assets/css/components/avatar.css +1 -1
- package/assets/css/components/switch-field.css +62 -20
- package/assets/css/components/user-menu.css +5 -0
- package/assets/css/typography.css +2 -2
- package/assets/js/styles.js +2 -0
- package/components/1_atoms/AwDropdownButton.vue +6 -2
- package/components/4_pages/_AwPageHeadline.vue +21 -3
- package/components/5_layouts/_AwMobileMenu.vue +30 -4
- package/components/5_layouts/_AwMobileMenuNav.vue +2 -1
- package/components/5_layouts/_AwUserMenu.vue +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
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.82.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.81.0...@awes-io/ui@2.82.0) (2023-11-08)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* mobile nav special behaviour added ([0c37293](https://github.com/awes-io/client/commit/0c37293ebc3b3d73a5d39c4a5a4d376d612e7013))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [2.81.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.80.0...@awes-io/ui@2.81.0) (2023-11-08)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* change hover state in switch component and links ([0fb0378](https://github.com/awes-io/client/commit/0fb0378f3d905ce6f9ab7989f6d6b191a7b4f247))
|
|
23
|
+
* **aw-user-menu:** add hover state on profile link ([27cb4a8](https://github.com/awes-io/client/commit/27cb4a869d3f397106d395e17c5dc0f1096ef908))
|
|
24
|
+
* change color in icon in dropdown btn ([b1c3b91](https://github.com/awes-io/client/commit/b1c3b91758c2b3b3589fecde8bbdaa008553c6c8))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
6
30
|
# [2.80.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.79.0...@awes-io/ui@2.80.0) (2023-11-07)
|
|
7
31
|
|
|
8
32
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@apply flex relative py-1;
|
|
3
3
|
|
|
4
4
|
&__element {
|
|
5
|
-
@apply bg-surface border;
|
|
5
|
+
@apply bg-surface border border-mono-800;
|
|
6
6
|
flex-shrink: 0;
|
|
7
7
|
cursor: pointer;
|
|
8
8
|
appearance: none;
|
|
@@ -17,8 +17,7 @@
|
|
|
17
17
|
box-shadow: none;
|
|
18
18
|
|
|
19
19
|
&:checked {
|
|
20
|
-
@apply bg-accent;
|
|
21
|
-
border-color: inherit;
|
|
20
|
+
@apply bg-accent border-accent;
|
|
22
21
|
background-size: 100% 100%;
|
|
23
22
|
}
|
|
24
23
|
|
|
@@ -27,6 +26,30 @@
|
|
|
27
26
|
outline: none;
|
|
28
27
|
}
|
|
29
28
|
|
|
29
|
+
&:hover {
|
|
30
|
+
@apply border-mono-600;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:checked:hover {
|
|
34
|
+
@apply bg-accent-hover border-accent-hover;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&:disabled {
|
|
38
|
+
@apply border-mono-800 bg-mono-800;
|
|
39
|
+
|
|
40
|
+
&:hover {
|
|
41
|
+
@apply border-mono-800 bg-mono-800;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.aw-switch-field__label {
|
|
45
|
+
@apply text-mono-400;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:checked:disabled {
|
|
50
|
+
@apply bg-accent-hover opacity-50 border-accent-hover;
|
|
51
|
+
}
|
|
52
|
+
|
|
30
53
|
/* &:checked:focus {
|
|
31
54
|
border-color: theme('colors.info.700');
|
|
32
55
|
} */
|
|
@@ -44,25 +67,13 @@
|
|
|
44
67
|
background-position: center;
|
|
45
68
|
background-repeat: no-repeat;
|
|
46
69
|
|
|
47
|
-
&:disabled {
|
|
48
|
-
@apply bg-mono-900;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
70
|
&:checked {
|
|
52
71
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' width='20' height='20' fill='none'%3E%3Cpath fill='%23fff' d='m7 13.8-3-3.1a.8.8 0 0 0-1.3 1.1l3.8 3.8a.8.8 0 0 0 1.2 0l9.1-9.2a.8.8 0 0 0-1.1-1.2L7 13.8Z'/%3E%3C/svg%3E");
|
|
53
72
|
}
|
|
54
73
|
|
|
55
|
-
&:checked:disabled {
|
|
56
|
-
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' width='20' height='20' fill='none'%3E%3Cpath fill='%23838587' d='m7 13.8-3-3.1a.8.8 0 0 0-1.3 1.1l3.8 3.8a.8.8 0 0 0 1.2 0l9.1-9.2a.8.8 0 0 0-1.1-1.2L7 13.8Z'/%3E%3C/svg%3E");
|
|
57
|
-
}
|
|
58
|
-
|
|
59
74
|
&--partial:checked {
|
|
60
75
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none'%3E%3Cpath fill='%23fff' d='M3.3 10.8h13.4a.8.8 0 0 0 0-1.6H3.3a.8.8 0 1 0 0 1.6Z'/%3E%3C/svg%3E");
|
|
61
76
|
}
|
|
62
|
-
|
|
63
|
-
&--partial:checked:disabled {
|
|
64
|
-
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none'%3E%3Cpath fill='%23838587' d='M3.3 10.8h13.4a.8.8 0 0 0 0-1.6H3.3a.8.8 0 1 0 0 1.6Z'/%3E%3C/svg%3E");
|
|
65
|
-
}
|
|
66
77
|
}
|
|
67
78
|
|
|
68
79
|
/**
|
|
@@ -122,6 +133,42 @@
|
|
|
122
133
|
}
|
|
123
134
|
}
|
|
124
135
|
|
|
136
|
+
&.is-switcher:hover &__element ~ &__switch {
|
|
137
|
+
@apply bg-mono-400;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&.is-switcher:hover &__element:checked ~ &__switch {
|
|
141
|
+
@apply bg-accent-hover;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&.is-switcher &__element:disabled ~ &__switch {
|
|
145
|
+
@apply bg-mono-800;
|
|
146
|
+
|
|
147
|
+
.aw-switch-field__switch-circle {
|
|
148
|
+
@apply bg-mono-600;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.aw-switch-field__switch-icon {
|
|
152
|
+
@apply text-mono-600;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&.is-switcher &__element:checked:disabled ~ &__switch {
|
|
157
|
+
@apply bg-accent-hover bg-opacity-50;
|
|
158
|
+
|
|
159
|
+
.aw-switch-field__switch-circle {
|
|
160
|
+
background-color: var(--c-on-overlay, '#fff');
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.aw-switch-field__switch-icon {
|
|
164
|
+
color: var(--c-white);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&.is-switcher &__element:disabled ~ &__label {
|
|
169
|
+
@apply text-mono-400;
|
|
170
|
+
}
|
|
171
|
+
|
|
125
172
|
&.is-switcher &__element:focus-visible ~ &__switch {
|
|
126
173
|
outline: theme('focusOutline');
|
|
127
174
|
}
|
|
@@ -263,10 +310,5 @@
|
|
|
263
310
|
&.is-switcher &__element[disabled] ~ &__switch {
|
|
264
311
|
cursor: not-allowed;
|
|
265
312
|
user-select: none;
|
|
266
|
-
opacity: 0.3;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
&.is-switcher &__element[disabled] ~ &__label {
|
|
270
|
-
opacity: 0.3;
|
|
271
313
|
}
|
|
272
314
|
}
|
package/assets/js/styles.js
CHANGED
|
@@ -44,6 +44,7 @@ export default {
|
|
|
44
44
|
default: {
|
|
45
45
|
colors: {
|
|
46
46
|
accent: '#56af40',
|
|
47
|
+
'accent-hover': '#469E30',
|
|
47
48
|
success: '#56af40',
|
|
48
49
|
info: '#1d6ec5',
|
|
49
50
|
notify: '#ffc230',
|
|
@@ -73,6 +74,7 @@ export default {
|
|
|
73
74
|
|
|
74
75
|
onColors: {
|
|
75
76
|
accent: '#fff',
|
|
77
|
+
'accent-hover': '#fff',
|
|
76
78
|
success: '#fff',
|
|
77
79
|
info: '#fff',
|
|
78
80
|
notify: '#463100',
|
|
@@ -14,7 +14,11 @@
|
|
|
14
14
|
class="w-6 text-left inline-block mr-1"
|
|
15
15
|
>
|
|
16
16
|
<slot name="icon">
|
|
17
|
-
<AwIcon
|
|
17
|
+
<AwIcon
|
|
18
|
+
:name="icon"
|
|
19
|
+
:size="iconSize"
|
|
20
|
+
class="text-mono-400"
|
|
21
|
+
/>
|
|
18
22
|
</slot>
|
|
19
23
|
</span>
|
|
20
24
|
<slot>
|
|
@@ -60,7 +64,7 @@ export default {
|
|
|
60
64
|
|
|
61
65
|
iconSize: {
|
|
62
66
|
type: [String, Number],
|
|
63
|
-
default: ''
|
|
67
|
+
default: '16'
|
|
64
68
|
},
|
|
65
69
|
|
|
66
70
|
/**
|
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
<div class="aw-page-headline__back-wrapper">
|
|
5
5
|
<slot name="headline-breadcrumb" :breadcrumb="breadcrumb">
|
|
6
6
|
<AwButton
|
|
7
|
-
v-if="backUrl"
|
|
7
|
+
v-if="backUrl || isMenuToggler"
|
|
8
8
|
color="mono"
|
|
9
9
|
class="w-10 h-10 aw-page-headline__back"
|
|
10
10
|
:href="backUrl"
|
|
11
|
-
:aria-label="breadcrumb.title"
|
|
11
|
+
:aria-label="isMenuToggler ? $t('Menu') : breadcrumb.title"
|
|
12
12
|
content-class="p-0"
|
|
13
|
+
v-on="isMenuToggler ? { click: openMenu } : null"
|
|
13
14
|
>
|
|
14
15
|
<template #icon>
|
|
15
16
|
<AwIconSystemMono name="arrow-l" size="24" />
|
|
@@ -98,7 +99,14 @@ export default {
|
|
|
98
99
|
buttonsBreakpoint: {
|
|
99
100
|
type: String,
|
|
100
101
|
default: null
|
|
101
|
-
}
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
breadcrumbMenu: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
default() {
|
|
107
|
+
return conf(this, 'breadcrumbMenu')
|
|
108
|
+
}
|
|
109
|
+
},
|
|
102
110
|
},
|
|
103
111
|
|
|
104
112
|
computed: {
|
|
@@ -122,6 +130,16 @@ export default {
|
|
|
122
130
|
}
|
|
123
131
|
|
|
124
132
|
return this.breadcrumb.href
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
isMenuToggler() {
|
|
136
|
+
return !this.backUrl && this.breadcrumbMenu
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
|
|
140
|
+
methods: {
|
|
141
|
+
openMenu() {
|
|
142
|
+
this.$store.commit('awesIo/TOGGLE_MOBILE_MENU', true)
|
|
125
143
|
}
|
|
126
144
|
}
|
|
127
145
|
}
|
|
@@ -89,7 +89,8 @@
|
|
|
89
89
|
click: () =>
|
|
90
90
|
showSubmenu(
|
|
91
91
|
item.children,
|
|
92
|
-
item.subtitle || item.text
|
|
92
|
+
item.subtitle || item.text,
|
|
93
|
+
item.href
|
|
93
94
|
)
|
|
94
95
|
}
|
|
95
96
|
: item.listeners || null
|
|
@@ -119,7 +120,8 @@
|
|
|
119
120
|
click: () =>
|
|
120
121
|
showSubmenu(
|
|
121
122
|
item.children,
|
|
122
|
-
item.subtitle || item.text
|
|
123
|
+
item.subtitle || item.text,
|
|
124
|
+
item.href
|
|
123
125
|
)
|
|
124
126
|
}
|
|
125
127
|
: item.listeners || null
|
|
@@ -214,8 +216,11 @@
|
|
|
214
216
|
|
|
215
217
|
<script>
|
|
216
218
|
import { mapGetters } from 'vuex'
|
|
217
|
-
import { pathOr, viewOr, lensProp, partition } from 'rambdax'
|
|
219
|
+
import { pathOr, viewOr, lensProp, partition, isType } from 'rambdax'
|
|
218
220
|
import { disableBodyScroll, enableBodyScroll } from 'body-scroll-lock'
|
|
221
|
+
import { LINK_REGEX } from '@AwConfig'
|
|
222
|
+
import { conf } from '@AwUtils/component'
|
|
223
|
+
import { getPath } from '@AwUtils/router'
|
|
219
224
|
import AwMobileMenuNav from '@AwLayouts/_AwMobileMenuNav.vue'
|
|
220
225
|
import AwMobileMenuItemNew from '@AwLayouts/_AwMobileMenuItemNew.vue'
|
|
221
226
|
// import AwMobileMenuItem from '@AwLayouts/_AwMobileMenuItem.vue'
|
|
@@ -230,6 +235,15 @@ export default {
|
|
|
230
235
|
// AwMobileMenuItem
|
|
231
236
|
},
|
|
232
237
|
|
|
238
|
+
props: {
|
|
239
|
+
navigateToFirstPage: {
|
|
240
|
+
type: Boolean,
|
|
241
|
+
default() {
|
|
242
|
+
return conf(this, 'navigateToFirstPage')
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
|
|
233
247
|
inject: {
|
|
234
248
|
layoutProvider: {
|
|
235
249
|
default: null
|
|
@@ -348,7 +362,19 @@ export default {
|
|
|
348
362
|
},
|
|
349
363
|
|
|
350
364
|
methods: {
|
|
351
|
-
showSubmenu(items, text) {
|
|
365
|
+
showSubmenu(items, text, href) {
|
|
366
|
+
if (this.navigateToFirstPage && href) {
|
|
367
|
+
if (isType('String', href) && LINK_REGEX.test(href)) {
|
|
368
|
+
window.location.assign(href)
|
|
369
|
+
} else if (getPath(this.$route) === getPath(href)) {
|
|
370
|
+
this.show = false
|
|
371
|
+
} else {
|
|
372
|
+
this.$router.push(href)
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
return
|
|
376
|
+
}
|
|
377
|
+
|
|
352
378
|
const [submenu, submenuDeep] = partition(
|
|
353
379
|
({ children }) =>
|
|
354
380
|
!Array.isArray(children) || children.length === 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awes-io/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.82.0",
|
|
4
4
|
"description": "User Interface (UI) components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui",
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"rollup-plugin-visualizer": "^2.6.0",
|
|
114
114
|
"rollup-plugin-vue": "^5.0.1"
|
|
115
115
|
},
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "4fec2536721f50b6ebca7ce727c38d0770d33d9b"
|
|
117
117
|
}
|