@awes-io/ui 2.72.0 → 2.73.1
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 +22 -0
- package/assets/css/components/_index.css +1 -0
- package/assets/css/components/alert.css +6 -1
- package/assets/css/components/calendar.css +1 -1
- package/assets/css/components/label.css +6 -0
- package/assets/css/components/mobile-menu-item.css +4 -6
- package/assets/css/components/mobile-menu-nav.css +1 -1
- package/assets/css/components/mobile-menu.css +1 -1
- package/assets/css/components/page.css +1 -1
- package/assets/css/components/switch-field.css +1 -1
- package/assets/css/components/table.css +2 -2
- package/assets/css/components/tooltip.css +5 -0
- package/assets/css/components/user-menu.css +10 -1
- package/assets/js/icons/mono.js +1 -1
- package/assets/js/styles.js +93 -31
- package/components/1_atoms/AwLabel.vue +27 -5
- package/components/2_molecules/AwAlert.vue +23 -10
- package/components/5_layouts/AwLayoutProvider.vue +1 -1
- package/components/5_layouts/_AwMobileMenuItem.vue +1 -0
- package/components/5_layouts/_AwMobileMenuNav.vue +8 -2
- package/components/5_layouts/_AwNavItem.vue +11 -2
- package/components/5_layouts/_AwUserMenu.vue +5 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
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.73.1](https://github.com/awes-io/client/compare/@awes-io/ui@2.73.0...@awes-io/ui@2.73.1) (2023-10-06)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* colors from design system ([1ba4cc0](https://github.com/awes-io/client/commit/1ba4cc0204d34bd63a453b9942e81724b388e240))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [2.73.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.72.0...@awes-io/ui@2.73.0) (2023-09-29)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* change styles in components ([603d7a8](https://github.com/awes-io/client/commit/603d7a8ed86e548446afe5b656821ed0e34c528c))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
# [2.72.0](https://github.com/awes-io/client/compare/@awes-io/ui@2.71.1...@awes-io/ui@2.72.0) (2023-09-19)
|
|
7
29
|
|
|
8
30
|
|
|
@@ -41,7 +41,8 @@
|
|
|
41
41
|
margin-left: theme('spacing.4', 1rem);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
.aw-icon,
|
|
44
|
+
.aw-icon,
|
|
45
|
+
a {
|
|
45
46
|
color: var(--aw-alert-on-color);
|
|
46
47
|
}
|
|
47
48
|
}
|
|
@@ -51,6 +52,10 @@
|
|
|
51
52
|
align-items: start;
|
|
52
53
|
}
|
|
53
54
|
}
|
|
55
|
+
|
|
56
|
+
&--color-default {
|
|
57
|
+
border: 1px solid var(--c-mono-800);
|
|
58
|
+
}
|
|
54
59
|
}
|
|
55
60
|
|
|
56
61
|
@screen lg {
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
display: flex;
|
|
5
5
|
align-items: center;
|
|
6
6
|
width: 100%;
|
|
7
|
+
padding: 1.5rem;
|
|
7
8
|
|
|
8
9
|
&:hover,
|
|
9
10
|
&:focus {
|
|
@@ -17,11 +18,9 @@
|
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
&__icon-bg {
|
|
20
|
-
margin-left: 1.25rem;
|
|
21
|
-
margin-right: -1rem;
|
|
22
|
-
padding: 0.1875rem;
|
|
23
21
|
border-radius: 0.3125rem;
|
|
24
22
|
line-height: 1;
|
|
23
|
+
flex: none;
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
/* &__icon {} */
|
|
@@ -30,8 +29,7 @@
|
|
|
30
29
|
display: flex;
|
|
31
30
|
flex-direction: column;
|
|
32
31
|
justify-content: center;
|
|
33
|
-
|
|
34
|
-
padding: 0.5rem 0.5rem 0.5rem 1.875rem;
|
|
32
|
+
padding: 0 1rem;
|
|
35
33
|
flex-grow: 1;
|
|
36
34
|
}
|
|
37
35
|
|
|
@@ -42,7 +40,7 @@
|
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
&__arrow {
|
|
45
|
-
margin: 0.75rem 1.875rem 0.75rem 0;
|
|
46
43
|
color: var(--c-on-surface);
|
|
44
|
+
flex: none;
|
|
47
45
|
}
|
|
48
46
|
}
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
|
|
145
145
|
&--mobile {
|
|
146
146
|
display: block;
|
|
147
|
-
padding:
|
|
147
|
+
padding: 1.5rem;
|
|
148
148
|
|
|
149
149
|
&:hover {
|
|
150
150
|
background: inherit;
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
&--mobile {
|
|
158
158
|
display: flex;
|
|
159
159
|
justify-content: space-between;
|
|
160
|
-
padding:
|
|
160
|
+
padding: 0.5rem 0;
|
|
161
161
|
|
|
162
162
|
&:nth-of-type(2n + 1) {
|
|
163
163
|
background: none;
|
|
@@ -81,16 +81,20 @@
|
|
|
81
81
|
&__nav-item {
|
|
82
82
|
@apply bg-surface;
|
|
83
83
|
padding: 1rem;
|
|
84
|
-
display:
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
85
86
|
width: 100%;
|
|
86
87
|
|
|
87
88
|
font-size: 1rem;
|
|
88
89
|
line-height: 1.3125rem;
|
|
89
90
|
font-weight: 400;
|
|
90
91
|
|
|
92
|
+
white-space: nowrap;
|
|
93
|
+
|
|
91
94
|
svg {
|
|
92
95
|
width: 1.5rem;
|
|
93
96
|
height: 1.5rem;
|
|
97
|
+
flex: none;
|
|
94
98
|
}
|
|
95
99
|
|
|
96
100
|
&:focus {
|
|
@@ -102,5 +106,10 @@
|
|
|
102
106
|
&--active {
|
|
103
107
|
background-color: var(--c-mono-900);
|
|
104
108
|
}
|
|
109
|
+
|
|
110
|
+
&-text {
|
|
111
|
+
text-overflow: ellipsis;
|
|
112
|
+
overflow: hidden;
|
|
113
|
+
}
|
|
105
114
|
}
|
|
106
115
|
}
|
package/assets/js/icons/mono.js
CHANGED
|
@@ -24,7 +24,7 @@ export default {
|
|
|
24
24
|
'M1 10a2 2 0 114 0 2 2 0 01-4 0zm7 0a2 2 0 114 0 2 2 0 01-4 0zm7 0a2 2 0 114 0 2 2 0 01-4 0z',
|
|
25
25
|
triangle: 'M5 7h10l-5 5z',
|
|
26
26
|
external:
|
|
27
|
-
'
|
|
27
|
+
'M17.5 1.7h-5a.8.8 0 1 0 0 1.6h3l-7 7a.8.8 0 1 0 1.3 1.1l6.9-6.9v3a.8.8 0 1 0 1.6 0v-5a.8.8 0 0 0-.8-.8Z M15.8 8.8a.8.8 0 0 0-.8.9v6a1 1 0 0 1-1 1H4.4a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h5.2a.8.8 0 1 0 0-1.7H4.4A2.7 2.7 0 0 0 1.7 6v9.6a2.7 2.7 0 0 0 2.7 2.7H14a2.7 2.7 0 0 0 2.7-2.7v-6a.8.8 0 0 0-.9-.8Z',
|
|
28
28
|
edit:
|
|
29
29
|
'M11.7 5.34l2.85 2.86-7.2 7.24-2.85-2.86 7.2-7.24zm5.01-.7l-1.27-1.27c-.49-.5-1.28-.5-1.78 0l-1.21 1.22 2.85 2.86 1.41-1.42c.39-.38.39-1 0-1.38zM3.01 16.6c-.05.24.16.45.39.4l3.17-.78-2.84-2.86L3 16.6z',
|
|
30
30
|
'info-circle':
|
package/assets/js/styles.js
CHANGED
|
@@ -6,11 +6,12 @@ export default {
|
|
|
6
6
|
accent: '#56af40',
|
|
7
7
|
success: '#56af40',
|
|
8
8
|
info: '#1d6ec5',
|
|
9
|
-
notify: '#
|
|
9
|
+
notify: '#ffc230',
|
|
10
10
|
warning: '#fc8800',
|
|
11
|
-
error: '#
|
|
11
|
+
error: '#e9555b',
|
|
12
12
|
|
|
13
13
|
surface: '#fff',
|
|
14
|
+
'page-bg': '#f3f5f7',
|
|
14
15
|
overlay: 'rgba(20, 23, 29, 0.4)',
|
|
15
16
|
link: '#56af40',
|
|
16
17
|
|
|
@@ -25,7 +26,19 @@ export default {
|
|
|
25
26
|
'mono-700': '#d7dbde',
|
|
26
27
|
'mono-800': '#e7eaed',
|
|
27
28
|
'mono-900': '#f3f5f7',
|
|
28
|
-
'mono-1000': '#fff'
|
|
29
|
+
'mono-1000': '#fff',
|
|
30
|
+
|
|
31
|
+
red: '#fed9d9',
|
|
32
|
+
peach: '#ffe9e3',
|
|
33
|
+
yellow: '#fff2d9',
|
|
34
|
+
magenta: '#fddae9',
|
|
35
|
+
purple: '#ece1fc',
|
|
36
|
+
'light-blue': '#daf4fe',
|
|
37
|
+
blue: '#e0e8ff',
|
|
38
|
+
green: '#ddefd9',
|
|
39
|
+
lime: '#f1f5d9',
|
|
40
|
+
grey: '#eceded',
|
|
41
|
+
'light-grey': '#ecf0f5'
|
|
29
42
|
},
|
|
30
43
|
|
|
31
44
|
onColors: {
|
|
@@ -38,6 +51,7 @@ export default {
|
|
|
38
51
|
error: '#fff',
|
|
39
52
|
|
|
40
53
|
surface: '#14171d',
|
|
54
|
+
'page-bg': '#14171d',
|
|
41
55
|
overlay: '#fff',
|
|
42
56
|
link: '#fff',
|
|
43
57
|
|
|
@@ -52,36 +66,61 @@ export default {
|
|
|
52
66
|
'mono-700': '#333',
|
|
53
67
|
'mono-800': '#333',
|
|
54
68
|
'mono-900': '#383868',
|
|
55
|
-
'mono-1000': '#333'
|
|
69
|
+
'mono-1000': '#333',
|
|
70
|
+
|
|
71
|
+
red: '#fa0000',
|
|
72
|
+
peach: '#ff6f41',
|
|
73
|
+
yellow: '#ffa800',
|
|
74
|
+
magenta: '#f4056c',
|
|
75
|
+
purple: '#8338ec',
|
|
76
|
+
'light-blue': '#0ab7fa',
|
|
77
|
+
blue: '#2d67ff',
|
|
78
|
+
green: '#2bb611',
|
|
79
|
+
lime: '#a4bf00',
|
|
80
|
+
grey: '#565656',
|
|
81
|
+
'light-grey': '#8b9aab'
|
|
56
82
|
}
|
|
57
83
|
},
|
|
58
84
|
dark: {
|
|
59
85
|
colors: {
|
|
60
|
-
brand: '#
|
|
61
|
-
'brand-tuned': '#
|
|
86
|
+
brand: '#1e1e1e',
|
|
87
|
+
'brand-tuned': '#1e1e1e',
|
|
62
88
|
accent: '#56af40',
|
|
63
89
|
success: '#56af40',
|
|
64
|
-
info: '#
|
|
65
|
-
notify: '#
|
|
90
|
+
info: '#4a7fe4',
|
|
91
|
+
notify: '#ffc230',
|
|
66
92
|
warning: '#fc8800',
|
|
67
|
-
error: '#
|
|
93
|
+
error: '#e9555b',
|
|
68
94
|
|
|
69
95
|
surface: '#313236',
|
|
96
|
+
'page-bg': '#1e1e1e',
|
|
70
97
|
overlay: 'rgba(0, 0, 0, 0.5)',
|
|
71
98
|
link: '#56af40',
|
|
72
99
|
|
|
73
|
-
'mono-0': '#
|
|
74
|
-
'mono-50': '#
|
|
75
|
-
'mono-100': '#
|
|
76
|
-
'mono-200': '#
|
|
77
|
-
'mono-300': '#
|
|
78
|
-
'mono-400': '#
|
|
79
|
-
'mono-500': '#
|
|
80
|
-
'mono-600': '#
|
|
81
|
-
'mono-700': '#
|
|
82
|
-
'mono-800': '#
|
|
83
|
-
'mono-900': '#
|
|
84
|
-
'mono-1000': '#
|
|
100
|
+
'mono-0': '#fff',
|
|
101
|
+
'mono-50': '#f3f5f7',
|
|
102
|
+
'mono-100': '#e7eaed',
|
|
103
|
+
'mono-200': '#d7dbde',
|
|
104
|
+
'mono-300': '#c1c4c7',
|
|
105
|
+
'mono-400': '#838587',
|
|
106
|
+
'mono-500': '#838587',
|
|
107
|
+
'mono-600': '#595d62',
|
|
108
|
+
'mono-700': '#46474a',
|
|
109
|
+
'mono-800': '#373c46',
|
|
110
|
+
'mono-900': '#383838',
|
|
111
|
+
'mono-1000': '#313236',
|
|
112
|
+
|
|
113
|
+
red: '#431c1c',
|
|
114
|
+
peach: '#33160d',
|
|
115
|
+
yellow: '#3a2e17',
|
|
116
|
+
magenta: '#310116',
|
|
117
|
+
purple: '#271147',
|
|
118
|
+
'light-blue': '#022532',
|
|
119
|
+
blue: '#202b49',
|
|
120
|
+
green: '#24331b',
|
|
121
|
+
lime: '#212600',
|
|
122
|
+
grey: '#060709',
|
|
123
|
+
'light-grey': '#2c2e34'
|
|
85
124
|
},
|
|
86
125
|
|
|
87
126
|
onColors: {
|
|
@@ -94,21 +133,44 @@ export default {
|
|
|
94
133
|
error: '#fff',
|
|
95
134
|
|
|
96
135
|
surface: '#fff',
|
|
136
|
+
'page-bg': '#fff',
|
|
97
137
|
overlay: '#fff',
|
|
98
138
|
link: '#fff',
|
|
99
139
|
|
|
100
|
-
'mono-0': '#
|
|
101
|
-
'mono-50': '#
|
|
102
|
-
'mono-100': '#
|
|
103
|
-
'mono-200': '#
|
|
104
|
-
'mono-300': '#
|
|
105
|
-
'mono-400': '#
|
|
106
|
-
'mono-500': '#
|
|
107
|
-
'mono-600': '#
|
|
108
|
-
'mono-700': '#
|
|
140
|
+
'mono-0': '#1e1e1e',
|
|
141
|
+
'mono-50': '#1e1e1e',
|
|
142
|
+
'mono-100': '#1e1e1e',
|
|
143
|
+
'mono-200': '#1e1e1e',
|
|
144
|
+
'mono-300': '#1e1e1e',
|
|
145
|
+
'mono-400': '#1e1e1e',
|
|
146
|
+
'mono-500': '#1e1e1e',
|
|
147
|
+
'mono-600': '#fff',
|
|
148
|
+
'mono-700': '#fff',
|
|
109
149
|
'mono-800': '#fff',
|
|
110
150
|
'mono-900': '#fff',
|
|
111
|
-
'mono-1000': '#fff'
|
|
151
|
+
'mono-1000': '#fff',
|
|
152
|
+
|
|
153
|
+
red: '#fa0000',
|
|
154
|
+
peach: '#ff6f41',
|
|
155
|
+
yellow: '#ffa800',
|
|
156
|
+
magenta: '#f4056c',
|
|
157
|
+
purple: '#8338ec',
|
|
158
|
+
'light-blue': '#0ab7fa',
|
|
159
|
+
blue: '#2d67ff',
|
|
160
|
+
green: '#2bb611',
|
|
161
|
+
lime: '#a4bf00',
|
|
162
|
+
grey: '#565656',
|
|
163
|
+
'light-grey': '#8b9aab'
|
|
112
164
|
}
|
|
113
165
|
}
|
|
114
166
|
}
|
|
167
|
+
|
|
168
|
+
export const toColor = (color) =>
|
|
169
|
+
(color || '').startsWith('#')
|
|
170
|
+
? color
|
|
171
|
+
: `var(--c-${(color || '').toLowerCase()})`
|
|
172
|
+
|
|
173
|
+
export const toOnColor = (color) =>
|
|
174
|
+
(color || '').startsWith('#')
|
|
175
|
+
? color
|
|
176
|
+
: `var(--c-on-${(color || '').replace(/^on-?/, '').toLowerCase()})`
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
v-if="label"
|
|
4
|
-
class="
|
|
4
|
+
class="aw-label"
|
|
5
|
+
:style="styleVariables"
|
|
5
6
|
>
|
|
6
7
|
<span
|
|
7
|
-
|
|
8
|
-
class="relative inline-flex items-center leading-5 px-2 rounded-lg"
|
|
9
|
-
:style="{ backgroundColor: `rgba(var(--c-${color}-rgb), .2)` }"
|
|
8
|
+
class="aw-label__wrapper relative inline-flex items-center leading-5 px-2 rounded-lg"
|
|
10
9
|
>
|
|
11
10
|
<AwIcon
|
|
12
11
|
v-if="_icon === 'circle'"
|
|
@@ -44,6 +43,7 @@
|
|
|
44
43
|
|
|
45
44
|
<script>
|
|
46
45
|
import ICONS from '@AwUtils/icons/mono'
|
|
46
|
+
import { toColor, toOnColor } from '@AwUtils/styles'
|
|
47
47
|
|
|
48
48
|
export default {
|
|
49
49
|
name: 'AwLabel',
|
|
@@ -56,7 +56,12 @@ export default {
|
|
|
56
56
|
|
|
57
57
|
color: {
|
|
58
58
|
type: String,
|
|
59
|
-
default: '
|
|
59
|
+
default: 'green'
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
onColor: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: ''
|
|
60
65
|
},
|
|
61
66
|
|
|
62
67
|
icon: {
|
|
@@ -85,6 +90,23 @@ export default {
|
|
|
85
90
|
return this.isSystemIcon(this.iconSecond)
|
|
86
91
|
? 'AwIconSystemMono'
|
|
87
92
|
: 'AwIcon'
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
isCustomColor() {
|
|
96
|
+
return this.color && this.color !== 'default'
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
styleVariables() {
|
|
100
|
+
return {
|
|
101
|
+
'--aw-label-bg': this.isCustomColor
|
|
102
|
+
? toColor(this.color)
|
|
103
|
+
: null,
|
|
104
|
+
'--aw-label-on-color': this.onColor
|
|
105
|
+
? toColor(this.onColor)
|
|
106
|
+
: this.isCustomColor
|
|
107
|
+
? toOnColor(this.color)
|
|
108
|
+
: null
|
|
109
|
+
}
|
|
88
110
|
}
|
|
89
111
|
},
|
|
90
112
|
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class="aw-alert"
|
|
4
|
+
:class="{ 'aw-alert--color-default': isDefaultColor }"
|
|
5
|
+
:style="styleVariables"
|
|
6
|
+
>
|
|
3
7
|
<AwDescription tag="div" class="aw-alert__title">
|
|
4
8
|
<span v-if="icon || $scopedSlots.icon" class="aw-alert__icon">
|
|
5
9
|
<slot name="icon">
|
|
@@ -22,6 +26,8 @@
|
|
|
22
26
|
</template>
|
|
23
27
|
|
|
24
28
|
<script>
|
|
29
|
+
import { toColor, toOnColor } from '@AwUtils/styles'
|
|
30
|
+
|
|
25
31
|
export default {
|
|
26
32
|
name: 'AwAlert',
|
|
27
33
|
|
|
@@ -33,7 +39,7 @@ export default {
|
|
|
33
39
|
|
|
34
40
|
color: {
|
|
35
41
|
type: String,
|
|
36
|
-
default: ''
|
|
42
|
+
default: 'default'
|
|
37
43
|
},
|
|
38
44
|
|
|
39
45
|
onColor: {
|
|
@@ -53,17 +59,24 @@ export default {
|
|
|
53
59
|
},
|
|
54
60
|
|
|
55
61
|
computed: {
|
|
62
|
+
isCustomColor() {
|
|
63
|
+
return this.color && this.color !== 'default'
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
isDefaultColor() {
|
|
67
|
+
return this.color === 'default'
|
|
68
|
+
},
|
|
69
|
+
|
|
56
70
|
styleVariables() {
|
|
57
71
|
return {
|
|
58
|
-
'--aw-alert-bg': this.
|
|
59
|
-
?
|
|
60
|
-
:
|
|
61
|
-
'--aw-alert-border': this.onColor
|
|
62
|
-
? `var(--c-${this.onColor})`
|
|
63
|
-
: 'var(--c-mono-800)',
|
|
72
|
+
'--aw-alert-bg': this.isCustomColor
|
|
73
|
+
? toColor(this.color)
|
|
74
|
+
: null,
|
|
64
75
|
'--aw-alert-on-color': this.onColor
|
|
65
|
-
?
|
|
66
|
-
:
|
|
76
|
+
? toColor(this.onColor)
|
|
77
|
+
: this.isCustomColor
|
|
78
|
+
? toOnColor(this.color)
|
|
79
|
+
: null
|
|
67
80
|
}
|
|
68
81
|
}
|
|
69
82
|
}
|
|
@@ -229,7 +229,7 @@ export default {
|
|
|
229
229
|
|
|
230
230
|
return acc.concat({
|
|
231
231
|
...pick(
|
|
232
|
-
'icon,iconBg,iconActive,class,expanded,target,rel,listeners,abstract,key,badge,back,isDivide',
|
|
232
|
+
'icon,iconBg,iconActive,class,expanded,target,rel,listeners,abstract,key,badge,back,isDivide,arrow',
|
|
233
233
|
props
|
|
234
234
|
),
|
|
235
235
|
text,
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
}
|
|
25
25
|
]"
|
|
26
26
|
:href="_getChildrenCount(item) ? null : item.href"
|
|
27
|
-
:arrow="
|
|
27
|
+
:arrow="checkShowArrow(item)"
|
|
28
28
|
:active="isActive(item)"
|
|
29
29
|
v-on="
|
|
30
30
|
_getChildrenCount(item)
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
</template>
|
|
49
49
|
|
|
50
50
|
<script>
|
|
51
|
-
import { viewOr, lensProp } from 'rambdax'
|
|
51
|
+
import { viewOr, lensProp, isNil } from 'rambdax'
|
|
52
52
|
import AwMobileMenuItem from '@AwLayouts/_AwMobileMenuItem.vue'
|
|
53
53
|
|
|
54
54
|
export default {
|
|
@@ -92,6 +92,12 @@ export default {
|
|
|
92
92
|
return item.children ? item.children.length : 0
|
|
93
93
|
},
|
|
94
94
|
|
|
95
|
+
checkShowArrow(item) {
|
|
96
|
+
return isNil(item.arrow)
|
|
97
|
+
? !!(item.href || this._getChildrenCount(item))
|
|
98
|
+
: item.arrow
|
|
99
|
+
},
|
|
100
|
+
|
|
95
101
|
isActive(item) {
|
|
96
102
|
return this._getChildrenCount(item)
|
|
97
103
|
? item.children.some((child) =>
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Component :is="_linkComponent" v-bind="_linkAttrs" v-on="$listeners">
|
|
3
3
|
<slot />
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
<AwIconSystemMono
|
|
6
|
+
v-if="_linkExternal && !hideExternalIcon"
|
|
7
|
+
name="external"
|
|
8
|
+
class="ml-1"
|
|
9
|
+
/>
|
|
5
10
|
</Component>
|
|
6
11
|
</template>
|
|
7
12
|
|
|
@@ -11,6 +16,10 @@ import linkMixin from '@AwMixins/link'
|
|
|
11
16
|
export default {
|
|
12
17
|
name: 'AwNavItem',
|
|
13
18
|
|
|
14
|
-
mixins: [linkMixin]
|
|
19
|
+
mixins: [linkMixin],
|
|
20
|
+
|
|
21
|
+
props: {
|
|
22
|
+
hideExternalIcon: Boolean
|
|
23
|
+
}
|
|
15
24
|
}
|
|
16
25
|
</script>
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
]"
|
|
72
72
|
class="aw-user-menu__nav-item"
|
|
73
73
|
v-on="item.listeners || null"
|
|
74
|
+
hide-external-icon
|
|
74
75
|
>
|
|
75
76
|
<AwIcon
|
|
76
77
|
v-if="item.icon"
|
|
@@ -78,7 +79,10 @@
|
|
|
78
79
|
class="mr-2"
|
|
79
80
|
/>
|
|
80
81
|
|
|
81
|
-
<span
|
|
82
|
+
<span
|
|
83
|
+
class="aw-user-menu__nav-item-text"
|
|
84
|
+
v-html="item.text"
|
|
85
|
+
/>
|
|
82
86
|
</AwNavItem>
|
|
83
87
|
</template>
|
|
84
88
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awes-io/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.73.1",
|
|
4
4
|
"description": "User Interface (UI) components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui",
|
|
@@ -112,5 +112,5 @@
|
|
|
112
112
|
"rollup-plugin-visualizer": "^2.6.0",
|
|
113
113
|
"rollup-plugin-vue": "^5.0.1"
|
|
114
114
|
},
|
|
115
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "17d9d4b22c0424d7a3155d9eb8fa2d83206afd85"
|
|
116
116
|
}
|