@awes-io/ui 2.84.0 → 2.87.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 +41 -0
- package/assets/css/components/_index.css +5 -0
- package/assets/css/components/action-button.css +53 -0
- package/assets/css/components/action-card-body.css +20 -0
- package/assets/css/components/action-card.css +36 -0
- package/assets/css/components/action-icon.css +45 -0
- package/assets/css/components/avatar.css +1 -0
- package/assets/css/components/button-fixed.css +4 -4
- package/assets/css/components/button-nav.css +39 -18
- package/assets/css/components/button.css +154 -493
- package/assets/css/components/context-menu.css +6 -0
- package/assets/css/components/dropdown-button.css +1 -1
- package/assets/css/components/filter-month.css +17 -0
- package/assets/css/components/icon.css +26 -0
- package/assets/css/components/mobile-menu.css +2 -2
- package/assets/css/components/modal.css +4 -4
- package/assets/css/components/page-menu-buttons.css +3 -3
- package/assets/css/components/square-icon-button.css +69 -0
- package/assets/css/components/text-field.css +4 -0
- package/assets/css/components/user-menu.css +8 -8
- package/assets/css/typography.css +13 -1
- package/assets/js/icons/animated.js +7 -0
- package/assets/js/styles.js +15 -13
- package/components/1_atoms/AwActionCard.vue +77 -0
- package/components/1_atoms/AwActionCardBody.vue +19 -0
- package/components/1_atoms/AwActionIcon.vue +150 -0
- package/components/1_atoms/AwDropdown.vue +1 -2
- package/components/1_atoms/AwDropdownButton.vue +2 -5
- package/components/1_atoms/AwIcon/AwIcon.vue +47 -21
- package/components/1_atoms/AwLabel.vue +9 -6
- package/components/2_molecules/AwActionButton.vue +110 -0
- package/components/2_molecules/AwButton.vue +36 -81
- package/components/2_molecules/AwIsland/AwIsland.vue +4 -3
- package/components/2_molecules/AwSelect.vue +10 -7
- package/components/2_molecules/AwSelectObject.vue +1 -0
- package/components/2_molecules/AwSquareIconButton.vue +52 -0
- package/components/2_molecules/AwTabNav.vue +8 -3
- package/components/3_organisms/AwAddressBlock.vue +4 -7
- package/components/3_organisms/AwCodeSnippet.vue +2 -1
- package/components/3_organisms/AwContextMenu.vue +14 -4
- package/components/3_organisms/AwFilterMonth.vue +10 -14
- package/components/3_organisms/AwModal.vue +5 -8
- package/components/3_organisms/AwModelEdit.vue +2 -4
- package/components/3_organisms/AwPagination.vue +15 -19
- package/components/3_organisms/AwTable/AwTableBuilder.vue +2 -2
- package/components/4_pages/AwPage.vue +1 -1
- package/components/4_pages/AwPageSingle.vue +4 -7
- package/components/4_pages/_AwButtonFixed.vue +3 -1
- package/components/4_pages/_AwPageHeadline.vue +7 -9
- package/components/5_layouts/_AwMobileMenu.vue +21 -26
- package/components/5_layouts/_AwUserMenu.vue +5 -3
- package/mixins/button.js +10 -2
- package/nuxt/awes.config.js +1 -1
- package/package.json +2 -2
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.aw-button {
|
|
24
|
+
min-width: 3rem;
|
|
25
|
+
padding: 0;
|
|
26
|
+
|
|
24
27
|
.aw-button__text {
|
|
25
28
|
display: none;
|
|
26
29
|
}
|
|
@@ -36,6 +39,9 @@
|
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
.aw-button {
|
|
42
|
+
min-width: 6.25rem;
|
|
43
|
+
padding: 0.5625rem 1rem;
|
|
44
|
+
|
|
39
45
|
.aw-button__text {
|
|
40
46
|
display: flex;
|
|
41
47
|
}
|
|
@@ -21,4 +21,21 @@
|
|
|
21
21
|
& &__label {
|
|
22
22
|
@apply text-xs text-mono-400;
|
|
23
23
|
}
|
|
24
|
+
|
|
25
|
+
&__btn {
|
|
26
|
+
border-width: 1px;
|
|
27
|
+
border-style: solid;
|
|
28
|
+
border-color: theme('borderColor.default');
|
|
29
|
+
padding: 0.5rem 0.75rem;
|
|
30
|
+
|
|
31
|
+
svg {
|
|
32
|
+
opacity: 0.4;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:hover {
|
|
36
|
+
svg {
|
|
37
|
+
opacity: 0.9;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
24
41
|
}
|
|
@@ -8,4 +8,30 @@
|
|
|
8
8
|
width: 1em;
|
|
9
9
|
height: 1em;
|
|
10
10
|
}
|
|
11
|
+
|
|
12
|
+
&--animated {
|
|
13
|
+
.svg-arrow-line {
|
|
14
|
+
transform: scaleX(0);
|
|
15
|
+
transform-origin: 50% 75%;
|
|
16
|
+
transition: 60ms transform;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.svg-arrow-chevron {
|
|
20
|
+
transform: translateX(-15%);
|
|
21
|
+
transition: 60ms transform;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.aw-animated-icon-parent:hover .aw-icon--animated,
|
|
27
|
+
.aw-icon--animated:hover {
|
|
28
|
+
.svg-arrow-line {
|
|
29
|
+
transform: scaleX(1);
|
|
30
|
+
transition: 240ms transform;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.svg-arrow-chevron {
|
|
34
|
+
transform: translateX(0);
|
|
35
|
+
transition: 240ms transform;
|
|
36
|
+
}
|
|
11
37
|
}
|
|
@@ -335,13 +335,13 @@ $modal-aside-width-large: 75vw;
|
|
|
335
335
|
|
|
336
336
|
&[class*="is-overlay-aside"] &__header {
|
|
337
337
|
padding-top: 1.5rem;
|
|
338
|
-
padding-left:
|
|
339
|
-
padding-right:
|
|
338
|
+
padding-left: 1.5rem;
|
|
339
|
+
padding-right: 1.5rem;
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
&[class*="is-overlay-aside"] &__close {
|
|
343
|
-
top: 0
|
|
344
|
-
right:
|
|
343
|
+
top: 0;
|
|
344
|
+
right: 0;
|
|
345
345
|
}
|
|
346
346
|
|
|
347
347
|
&.is-overlay-aside &__dialog {
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
.aw-square-icon-button {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: center;
|
|
4
|
+
align-items: center;
|
|
5
|
+
|
|
6
|
+
border-radius: 0.625rem;
|
|
7
|
+
|
|
8
|
+
width: 3rem;
|
|
9
|
+
height: 3rem;
|
|
10
|
+
|
|
11
|
+
&:disabled {
|
|
12
|
+
opacity: 0.5;
|
|
13
|
+
cursor: not-allowed;
|
|
14
|
+
user-select: none !important;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&:not([disabled]):active {
|
|
18
|
+
transform: translateY(1px);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
svg {
|
|
22
|
+
fill: var(--c-mono-400);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:not(:disabled):hover {
|
|
26
|
+
svg {
|
|
27
|
+
fill: var(--c-mono-100);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&--color-mono-900 {
|
|
32
|
+
background: var(--c-mono-900);
|
|
33
|
+
|
|
34
|
+
&:not(:disabled):hover {
|
|
35
|
+
background: var(--c-mono-800);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&--color-mono-800 {
|
|
40
|
+
background: var(--c-mono-800);
|
|
41
|
+
|
|
42
|
+
&:not(:disabled):hover {
|
|
43
|
+
background: var(--c-mono-700);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&--color-mono-700 {
|
|
48
|
+
background: var(--c-mono-700);
|
|
49
|
+
|
|
50
|
+
&:not(:disabled):hover {
|
|
51
|
+
background: var(--c-mono-600);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&--color-mono-600 {
|
|
56
|
+
background: var(--c-mono-600);
|
|
57
|
+
|
|
58
|
+
&:not(:disabled):hover {
|
|
59
|
+
background: var(--c-mono-500);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@screen lg {
|
|
65
|
+
.aw-square-icon-button {
|
|
66
|
+
width: 2.5rem;
|
|
67
|
+
height: 2.5rem;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
display: flex;
|
|
58
58
|
align-items: center;
|
|
59
59
|
|
|
60
|
-
padding: 1rem;
|
|
60
|
+
padding: 0.4375rem 1rem;
|
|
61
61
|
color: var(--c-on-surface);
|
|
62
62
|
border-bottom-width: 1px;
|
|
63
63
|
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
&-text {
|
|
69
|
-
font-size:
|
|
70
|
-
line-height: 1.
|
|
69
|
+
font-size: 0.875rem;
|
|
70
|
+
line-height: 1.5rem;
|
|
71
71
|
font-weight: 400;
|
|
72
72
|
}
|
|
73
73
|
|
|
@@ -99,20 +99,20 @@
|
|
|
99
99
|
|
|
100
100
|
&__nav-item {
|
|
101
101
|
@apply bg-surface;
|
|
102
|
-
padding: 1rem;
|
|
102
|
+
padding: 0.5rem 1rem;
|
|
103
103
|
display: flex;
|
|
104
104
|
align-items: center;
|
|
105
105
|
width: 100%;
|
|
106
106
|
|
|
107
|
-
font-size:
|
|
108
|
-
line-height: 1.
|
|
107
|
+
font-size: 0.875rem;
|
|
108
|
+
line-height: 1.5rem;
|
|
109
109
|
font-weight: 400;
|
|
110
110
|
|
|
111
111
|
white-space: nowrap;
|
|
112
112
|
|
|
113
113
|
svg {
|
|
114
|
-
width:
|
|
115
|
-
height:
|
|
114
|
+
width: 1rem;
|
|
115
|
+
height: 1rem;
|
|
116
116
|
flex: none;
|
|
117
117
|
}
|
|
118
118
|
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
font-size: 1em;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
code {
|
|
117
|
+
code:where(:not([class*="language-"])) {
|
|
118
118
|
@apply text-error bg-error bg-opacity-20;
|
|
119
119
|
padding: 0.125em 0.25em;
|
|
120
120
|
border-radius: theme('borderRadius.sm', 0);
|
|
@@ -158,6 +158,18 @@
|
|
|
158
158
|
outline: theme('focusOutline');
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
+
.link:disabled,
|
|
162
|
+
.link[disabled] {
|
|
163
|
+
@apply text-mono-400;
|
|
164
|
+
cursor: not-allowed;
|
|
165
|
+
|
|
166
|
+
&:hover,
|
|
167
|
+
&:focus {
|
|
168
|
+
text-decoration: none;
|
|
169
|
+
outline: none;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
161
173
|
abbr[title] {
|
|
162
174
|
border-bottom: none;
|
|
163
175
|
text-decoration: underline;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const ICONS = {
|
|
2
|
+
'arrow-animated': `<path d="M2.4 12c0-.66.54-1.2 1.2-1.2h15.6a1.2 1.2 0 0 1 0 2.4H3.6A1.2 1.2 0 0 1 2.4 12Z" class="svg-arrow-line"/><path fill-rule="evenodd" d="M14.12 4.84a1.2 1.2 0 1 0-1.55 1.85l6.3 5.28-6.3 5.3a1.2 1.2 0 1 0 1.54 1.82l7.36-6.16c.3-.24.45-.6.45-.96a1.2 1.2 0 0 0-.46-.95l-7.35-6.18Z" clip-rule="evenodd" class="svg-arrow-chevron" />`
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export const VIEW_BOX = '0 0 24 24'
|
|
6
|
+
|
|
7
|
+
export const isAnimatedIcon = (name) => Object.hasOwnProperty.call(ICONS, name)
|
package/assets/js/styles.js
CHANGED
|
@@ -27,15 +27,15 @@ export const CUSTOM_COLORS_BG_LIGHT = {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export const CUSTOM_COLORS_BG_DARK = {
|
|
30
|
-
red: '#
|
|
31
|
-
peach: '#
|
|
32
|
-
yellow: '#
|
|
33
|
-
magenta: '#
|
|
34
|
-
purple: '#
|
|
35
|
-
'light-blue': '#
|
|
36
|
-
blue: '#
|
|
37
|
-
green: '#
|
|
38
|
-
lime: '#
|
|
30
|
+
red: '#791a1f',
|
|
31
|
+
peach: '#7c3118',
|
|
32
|
+
yellow: '#7c4a15',
|
|
33
|
+
magenta: '#551c3b',
|
|
34
|
+
purple: '#3e2069',
|
|
35
|
+
'light-blue': '#164c7e',
|
|
36
|
+
blue: '#1c2755',
|
|
37
|
+
green: '#306317',
|
|
38
|
+
lime: '#3e4f13',
|
|
39
39
|
grey: '#060709',
|
|
40
40
|
'light-grey': '#434447'
|
|
41
41
|
}
|
|
@@ -49,10 +49,11 @@ export default {
|
|
|
49
49
|
info: '#1d6ec5',
|
|
50
50
|
notify: '#ffc230',
|
|
51
51
|
warning: '#fc8800',
|
|
52
|
-
error: '#
|
|
52
|
+
error: '#FF4931',
|
|
53
|
+
'error-hover': '#E6422C',
|
|
53
54
|
|
|
54
55
|
surface: '#fff',
|
|
55
|
-
'page-bg': '#
|
|
56
|
+
'page-bg': '#F3F5F7',
|
|
56
57
|
overlay: 'rgba(20, 23, 29, 0.4)',
|
|
57
58
|
link: '#56af40',
|
|
58
59
|
|
|
@@ -109,10 +110,11 @@ export default {
|
|
|
109
110
|
info: '#4a7fe4',
|
|
110
111
|
notify: '#ffc230',
|
|
111
112
|
warning: '#fc8800',
|
|
112
|
-
error: '#
|
|
113
|
+
error: '#FF4931',
|
|
114
|
+
'error-hover': '#E6422C',
|
|
113
115
|
|
|
114
116
|
surface: '#313236',
|
|
115
|
-
'page-bg': '#
|
|
117
|
+
'page-bg': '#1E1E21',
|
|
116
118
|
overlay: 'rgba(0, 0, 0, 0.5)',
|
|
117
119
|
link: '#56af40',
|
|
118
120
|
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="aw-action-card">
|
|
3
|
+
<div class="aw-action-card__header">
|
|
4
|
+
<slot name="before-title"></slot>
|
|
5
|
+
|
|
6
|
+
<AwHeadline class="aw-action-card__title">{{ title }}</AwHeadline>
|
|
7
|
+
|
|
8
|
+
<slot name="after-title">
|
|
9
|
+
<AwButton
|
|
10
|
+
v-if="isActionButtonVisible"
|
|
11
|
+
v-bind="actionProps"
|
|
12
|
+
v-on="actionListeners"
|
|
13
|
+
/>
|
|
14
|
+
</slot>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<slot />
|
|
18
|
+
|
|
19
|
+
<NuxtLink
|
|
20
|
+
v-if="href"
|
|
21
|
+
:to="href"
|
|
22
|
+
:aria-label="title"
|
|
23
|
+
class="aw-action-card__link"
|
|
24
|
+
/>
|
|
25
|
+
</section>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script>
|
|
29
|
+
const ACTION_DEFAULTS = {
|
|
30
|
+
color: 'default'
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default {
|
|
34
|
+
name: 'AwActionCard',
|
|
35
|
+
|
|
36
|
+
props: {
|
|
37
|
+
title: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: ''
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
action: {
|
|
43
|
+
type: Object,
|
|
44
|
+
default: null
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
href: {
|
|
48
|
+
type: [String, Object],
|
|
49
|
+
default: null
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
computed: {
|
|
54
|
+
isActionButtonVisible() {
|
|
55
|
+
return this.action && !this.href
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
actionProps() {
|
|
59
|
+
return this.action ? { ...ACTION_DEFAULTS, ...this.action } : null
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
actionListeners() {
|
|
63
|
+
return this.action
|
|
64
|
+
? this.action.href
|
|
65
|
+
? null
|
|
66
|
+
: { click: this.onClickEmitAction }
|
|
67
|
+
: null
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
methods: {
|
|
72
|
+
onClickEmitAction() {
|
|
73
|
+
this.$emit('action')
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
</script>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="aw-action-card-body">
|
|
3
|
+
<div v-if="title" class="aw-action-card-body__title">{{ title }}</div>
|
|
4
|
+
<slot />
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
export default {
|
|
10
|
+
name: 'AwActionCardBody',
|
|
11
|
+
|
|
12
|
+
props: {
|
|
13
|
+
title: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ''
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span
|
|
3
|
+
class="aw-action-icon"
|
|
4
|
+
:class="{
|
|
5
|
+
'aw-action-icon--image': image,
|
|
6
|
+
'ew-action-icon--outline': modifiers.includes('outline'),
|
|
7
|
+
'aw-animated-icon-parent': isAnimatedIcon
|
|
8
|
+
}"
|
|
9
|
+
:style="styles"
|
|
10
|
+
>
|
|
11
|
+
<img v-if="image" v-bind="image" />
|
|
12
|
+
|
|
13
|
+
<slot v-else>
|
|
14
|
+
<AwIcon :name="icon" class="aw-action-icon__icon" />
|
|
15
|
+
<small v-if="text">{{ text }}</small>
|
|
16
|
+
</slot>
|
|
17
|
+
</span>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
import { toColor, toOnColor } from '@AwUtils/styles'
|
|
22
|
+
import { isAnimatedIcon } from '@AwUtils/icons/animated'
|
|
23
|
+
|
|
24
|
+
const SIZES = {
|
|
25
|
+
xs: {
|
|
26
|
+
size: '1.5rem',
|
|
27
|
+
iconSize: '0.75rem',
|
|
28
|
+
iconWithTextSize: '0.5rem',
|
|
29
|
+
radius: '0.3125rem'
|
|
30
|
+
},
|
|
31
|
+
sm: {
|
|
32
|
+
size: '2.5rem',
|
|
33
|
+
iconSize: '1rem',
|
|
34
|
+
iconWithTextSize: '0.75rem',
|
|
35
|
+
radius: '0.625rem'
|
|
36
|
+
},
|
|
37
|
+
md: {
|
|
38
|
+
size: '2.5rem',
|
|
39
|
+
iconSize: '1.5rem',
|
|
40
|
+
iconWithTextSize: '0.75rem',
|
|
41
|
+
radius: '0.625rem'
|
|
42
|
+
},
|
|
43
|
+
lg: {
|
|
44
|
+
size: '5rem',
|
|
45
|
+
iconSize: '2rem',
|
|
46
|
+
iconWithTextSize: '1.5rem',
|
|
47
|
+
radius: '1.25rem'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const SIZES_MOBILE = {
|
|
52
|
+
...SIZES,
|
|
53
|
+
sm: {
|
|
54
|
+
size: '3rem',
|
|
55
|
+
iconSize: '1rem',
|
|
56
|
+
iconWithTextSize: '0.75rem',
|
|
57
|
+
radius: '0.625rem'
|
|
58
|
+
},
|
|
59
|
+
md: {
|
|
60
|
+
size: '3rem',
|
|
61
|
+
iconSize: '1.5rem',
|
|
62
|
+
iconWithTextSize: '0.75rem',
|
|
63
|
+
radius: '0.625rem'
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const SIZES_NAMES = Object.keys(SIZES)
|
|
68
|
+
|
|
69
|
+
const SIZE_DEFAULT = SIZES_NAMES[2]
|
|
70
|
+
|
|
71
|
+
export default {
|
|
72
|
+
name: 'AwActionIcon',
|
|
73
|
+
|
|
74
|
+
props: {
|
|
75
|
+
image: {
|
|
76
|
+
type: Object,
|
|
77
|
+
default: null
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
icon: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: 'arrow-animated'
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
text: {
|
|
86
|
+
type: String,
|
|
87
|
+
default: ''
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
size: {
|
|
91
|
+
type: String, // xs, sm, md, lg
|
|
92
|
+
default: SIZE_DEFAULT,
|
|
93
|
+
validator(size) {
|
|
94
|
+
return SIZES_NAMES.includes(size)
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
color: {
|
|
99
|
+
type: String,
|
|
100
|
+
default: 'mono-700'
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
onColor: {
|
|
104
|
+
type: String,
|
|
105
|
+
default: ''
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
iconColor: {
|
|
109
|
+
type: String,
|
|
110
|
+
default: ''
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
modifiers: {
|
|
114
|
+
type: [String, Array],
|
|
115
|
+
default: ''
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
desktopFrom: {
|
|
119
|
+
type: String,
|
|
120
|
+
default: 'lg'
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
computed: {
|
|
125
|
+
styles() {
|
|
126
|
+
const sizes = this.$screen[this.desktopFrom] ? SIZES : SIZES_MOBILE
|
|
127
|
+
const size = sizes[this.size] || sizes[SIZE_DEFAULT]
|
|
128
|
+
|
|
129
|
+
const styles = {
|
|
130
|
+
'--size': size.size,
|
|
131
|
+
'--icon-size': this.text
|
|
132
|
+
? size.iconWithTextSize
|
|
133
|
+
: size.iconSize,
|
|
134
|
+
'--radius': size.radius,
|
|
135
|
+
'--color': this.onColor
|
|
136
|
+
? toColor(this.onColor)
|
|
137
|
+
: toOnColor(this.color),
|
|
138
|
+
'--bg-color': toColor(this.color),
|
|
139
|
+
'--icon-color': this.iconColor ? toColor(this.iconColor) : null
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
return styles
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
isAnimatedIcon() {
|
|
146
|
+
return isAnimatedIcon(this.icon)
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
</script>
|
|
@@ -38,17 +38,14 @@ export default {
|
|
|
38
38
|
* @type {Object}
|
|
39
39
|
*/
|
|
40
40
|
color: {
|
|
41
|
-
/* 'default' / '
|
|
41
|
+
/* 'default' / 'error' */
|
|
42
42
|
type: String,
|
|
43
43
|
/* 'default' */
|
|
44
44
|
default: 'default',
|
|
45
45
|
validator(color) {
|
|
46
46
|
return [
|
|
47
47
|
'aw-dropdown-button_default',
|
|
48
|
-
'aw-dropdown-
|
|
49
|
-
'aw-dropdown-button_warning',
|
|
50
|
-
'aw-dropdown-button_error',
|
|
51
|
-
'aw-dropdown-button_info'
|
|
48
|
+
'aw-dropdown-button_error'
|
|
52
49
|
].includes(`aw-dropdown-button_${color}`)
|
|
53
50
|
}
|
|
54
51
|
},
|