@awes-io/ui 2.86.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 +14 -0
- package/assets/css/components/_index.css +1 -0
- package/assets/css/components/button-fixed.css +4 -4
- package/assets/css/components/button-nav.css +26 -15
- 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/page-menu-buttons.css +3 -3
- package/assets/css/components/square-icon-button.css +69 -0
- package/assets/css/components/user-menu.css +8 -8
- package/assets/css/typography.css +13 -1
- package/assets/js/styles.js +13 -11
- package/components/1_atoms/AwDropdown.vue +1 -2
- package/components/1_atoms/AwDropdownButton.vue +2 -5
- 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/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 +6 -8
- package/components/5_layouts/_AwMobileMenu.vue +21 -26
- package/components/5_layouts/_AwUserMenu.vue +5 -3
- package/mixins/button.js +10 -2
- 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
|
}
|
|
@@ -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;
|
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,7 +49,8 @@ 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
56
|
'page-bg': '#F3F5F7',
|
|
@@ -109,7 +110,8 @@ 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
117
|
'page-bg': '#1E1E21',
|
|
@@ -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
|
},
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
<component
|
|
3
3
|
:is="_linkComponent"
|
|
4
4
|
class="aw-button"
|
|
5
|
-
:class="classes"
|
|
5
|
+
:class="[classes, contentClass]"
|
|
6
6
|
:disabled="isDisabled"
|
|
7
|
+
:aria-label="$attrs['aria-label'] || text || null"
|
|
7
8
|
v-bind="_linkAttrs"
|
|
8
9
|
v-on="$listeners"
|
|
9
10
|
>
|
|
10
|
-
<span class="aw-button__overlay"></span>
|
|
11
|
-
|
|
12
11
|
<AwIconSystemColor
|
|
13
12
|
v-if="loading"
|
|
14
13
|
class="aw-button__loader"
|
|
@@ -16,70 +15,50 @@
|
|
|
16
15
|
/>
|
|
17
16
|
|
|
18
17
|
<span
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
'aw-button__content_sm': size === 'sm',
|
|
23
|
-
'aw-button__content_md': size === 'md',
|
|
24
|
-
'aw-button__content_lg': size === 'lg',
|
|
25
|
-
'aw-button__content_no-text': mobileTextHidden
|
|
26
|
-
},
|
|
27
|
-
contentClass
|
|
28
|
-
]"
|
|
29
|
-
tabindex="-1"
|
|
18
|
+
v-else-if="locked"
|
|
19
|
+
class="aw-button__lock"
|
|
20
|
+
v-tooltip="lockedTooltip"
|
|
30
21
|
>
|
|
31
|
-
<
|
|
22
|
+
<span>
|
|
23
|
+
<AwIconSystemMono name="lock" />
|
|
24
|
+
</span>
|
|
25
|
+
</span>
|
|
26
|
+
|
|
27
|
+
<template v-else>
|
|
28
|
+
<slot name="icon" v-bind="{ icon }">
|
|
32
29
|
<AwIcon
|
|
33
30
|
v-if="icon"
|
|
31
|
+
class="aw-button__icon-left"
|
|
32
|
+
:class="{ 'mr-2': text }"
|
|
34
33
|
:name="icon"
|
|
35
|
-
|
|
36
|
-
:size="iconSize"
|
|
34
|
+
:size="16"
|
|
37
35
|
/>
|
|
38
36
|
</slot>
|
|
39
37
|
|
|
40
|
-
<
|
|
41
|
-
class="aw-button__text"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
'ml-2': icon && isContentAdded,
|
|
46
|
-
'mr-2': iconRight && isContentAdded
|
|
47
|
-
}"
|
|
48
|
-
>
|
|
49
|
-
<slot>{{ text }}</slot>
|
|
50
|
-
</span>
|
|
38
|
+
<slot v-if="!hideText">
|
|
39
|
+
<span class="aw-button__text">
|
|
40
|
+
{{ text }}
|
|
41
|
+
</span>
|
|
42
|
+
</slot>
|
|
51
43
|
|
|
52
|
-
<slot name="
|
|
44
|
+
<slot name="iconRight" v-bind="{ iconRight }">
|
|
53
45
|
<AwIcon
|
|
54
46
|
v-if="iconRight"
|
|
47
|
+
class="aw-button__icon-right"
|
|
48
|
+
:class="{ 'ml-2': text }"
|
|
55
49
|
:name="iconRight"
|
|
56
|
-
|
|
57
|
-
:size="iconSize"
|
|
50
|
+
:size="16"
|
|
58
51
|
/>
|
|
59
52
|
</slot>
|
|
60
|
-
</
|
|
61
|
-
|
|
62
|
-
<span v-if="locked" class="aw-button__lock" v-tooltip="lockedTooltip">
|
|
63
|
-
<span>
|
|
64
|
-
<AwIconSystemMono name="lock" />
|
|
65
|
-
</span>
|
|
66
|
-
</span>
|
|
53
|
+
</template>
|
|
67
54
|
</component>
|
|
68
55
|
</template>
|
|
69
56
|
|
|
70
57
|
<script>
|
|
71
58
|
import AwLink from '@AwAtoms/AwLink.vue'
|
|
72
|
-
import { pathOr } from 'rambdax'
|
|
73
59
|
import { AwButton as _config } from '@AwConfig'
|
|
74
60
|
import { conf } from '@AwUtils/component'
|
|
75
61
|
|
|
76
|
-
const iconSizes = {
|
|
77
|
-
xs: 10,
|
|
78
|
-
sm: 12,
|
|
79
|
-
md: 14,
|
|
80
|
-
lg: 16
|
|
81
|
-
}
|
|
82
|
-
|
|
83
62
|
export default {
|
|
84
63
|
name: 'AwButton',
|
|
85
64
|
|
|
@@ -96,7 +75,7 @@ export default {
|
|
|
96
75
|
}
|
|
97
76
|
},
|
|
98
77
|
|
|
99
|
-
// Background color of button. Possible values: '
|
|
78
|
+
// Background color of button. Possible values: 'accent', 'error', 'mono', 'dark'
|
|
100
79
|
color: {
|
|
101
80
|
type: String,
|
|
102
81
|
default() {
|
|
@@ -104,7 +83,7 @@ export default {
|
|
|
104
83
|
}
|
|
105
84
|
},
|
|
106
85
|
|
|
107
|
-
// Possible values: outline,
|
|
86
|
+
// Possible values: solid, outline, icon
|
|
108
87
|
theme: {
|
|
109
88
|
type: String,
|
|
110
89
|
default() {
|
|
@@ -136,11 +115,6 @@ export default {
|
|
|
136
115
|
default: ''
|
|
137
116
|
},
|
|
138
117
|
|
|
139
|
-
// Active state
|
|
140
|
-
active: Boolean,
|
|
141
|
-
|
|
142
|
-
mobileTextHidden: Boolean,
|
|
143
|
-
|
|
144
118
|
// Show lock icon and disable button
|
|
145
119
|
locked: Boolean,
|
|
146
120
|
|
|
@@ -148,27 +122,23 @@ export default {
|
|
|
148
122
|
lockedTooltip: {
|
|
149
123
|
type: String,
|
|
150
124
|
default: ''
|
|
151
|
-
}
|
|
152
|
-
},
|
|
125
|
+
},
|
|
153
126
|
|
|
154
|
-
|
|
155
|
-
return {
|
|
156
|
-
isPressed: false
|
|
157
|
-
}
|
|
127
|
+
hideText: Boolean
|
|
158
128
|
},
|
|
159
129
|
|
|
160
130
|
computed: {
|
|
161
131
|
classes() {
|
|
162
132
|
return [
|
|
163
133
|
{
|
|
164
|
-
'
|
|
165
|
-
'
|
|
166
|
-
'aw-
|
|
167
|
-
'aw-
|
|
168
|
-
'aw-
|
|
134
|
+
'aw-button--size-sm': this.size === 'sm',
|
|
135
|
+
'aw-button--size-md': this.size === 'md',
|
|
136
|
+
'aw-button--size-lg': this.size === 'lg',
|
|
137
|
+
'aw-button--loading': this.loading,
|
|
138
|
+
'aw-button--square': this.hideText
|
|
169
139
|
},
|
|
170
|
-
`color-${this.color || '
|
|
171
|
-
|
|
140
|
+
`aw-button--color-${this.color || 'green'}`,
|
|
141
|
+
`aw-button--theme-${this.theme || 'solid'}`
|
|
172
142
|
]
|
|
173
143
|
},
|
|
174
144
|
|
|
@@ -179,21 +149,6 @@ export default {
|
|
|
179
149
|
this.loading ||
|
|
180
150
|
this.locked
|
|
181
151
|
)
|
|
182
|
-
},
|
|
183
|
-
|
|
184
|
-
isContentAdded() {
|
|
185
|
-
return this.text || this.$scopedSlots.default
|
|
186
|
-
},
|
|
187
|
-
|
|
188
|
-
// loadingText() {
|
|
189
|
-
// return (
|
|
190
|
-
// (isType('String', this.loading) && this.loading) ||
|
|
191
|
-
// this.$t('Loading...')
|
|
192
|
-
// )
|
|
193
|
-
// },
|
|
194
|
-
|
|
195
|
-
iconSize() {
|
|
196
|
-
return pathOr(12, this.size, iconSizes)
|
|
197
152
|
}
|
|
198
153
|
},
|
|
199
154
|
|
|
@@ -42,7 +42,9 @@
|
|
|
42
42
|
class="aw-island__description"
|
|
43
43
|
>
|
|
44
44
|
<slot name="description" v-bind="{ isOpened, toggle }">
|
|
45
|
-
<AwDescription tag="div">{{
|
|
45
|
+
<AwDescription tag="div">{{
|
|
46
|
+
description
|
|
47
|
+
}}</AwDescription>
|
|
46
48
|
</slot>
|
|
47
49
|
</div>
|
|
48
50
|
|
|
@@ -101,8 +103,7 @@
|
|
|
101
103
|
<template v-else>
|
|
102
104
|
<AwButton
|
|
103
105
|
text="Reset"
|
|
104
|
-
color="
|
|
105
|
-
theme="ghost"
|
|
106
|
+
color="mono"
|
|
106
107
|
:disabled="model.saving"
|
|
107
108
|
@click="reset"
|
|
108
109
|
/>
|
|
@@ -54,13 +54,15 @@
|
|
|
54
54
|
<AwButton
|
|
55
55
|
v-if="_isCreateButton"
|
|
56
56
|
v-show="!isEditing"
|
|
57
|
-
theme="icon"
|
|
58
57
|
type="button"
|
|
58
|
+
theme="icon"
|
|
59
59
|
@click="_onAddClick"
|
|
60
60
|
>
|
|
61
|
-
<
|
|
62
|
-
<
|
|
63
|
-
|
|
61
|
+
<template #icon>
|
|
62
|
+
<slot name="create-icon">
|
|
63
|
+
<AwIconSystemMono name="add-circle" size="20" />
|
|
64
|
+
</slot>
|
|
65
|
+
</template>
|
|
64
66
|
</AwButton>
|
|
65
67
|
|
|
66
68
|
<AwButton
|
|
@@ -73,11 +75,11 @@
|
|
|
73
75
|
<AwIconSystemMono name="close" />
|
|
74
76
|
</AwButton>
|
|
75
77
|
<AwButton
|
|
76
|
-
:size="$attrs.size || 'md'"
|
|
77
78
|
tabindex="-1"
|
|
78
|
-
theme="icon"
|
|
79
79
|
type="button"
|
|
80
80
|
class="h-full"
|
|
81
|
+
theme="icon"
|
|
82
|
+
:size="$attrs.size || 'md'"
|
|
81
83
|
@click="searchable ? toggleDropdown() : null"
|
|
82
84
|
>
|
|
83
85
|
<AwIconSystemColor
|
|
@@ -86,6 +88,7 @@
|
|
|
86
88
|
name="spinner"
|
|
87
89
|
class="h-5 w-5"
|
|
88
90
|
/>
|
|
91
|
+
|
|
89
92
|
<AwIconSystemMono
|
|
90
93
|
v-if="
|
|
91
94
|
!isLoading &&
|
|
@@ -150,9 +153,9 @@
|
|
|
150
153
|
<AwIconSystemMono name="close" />
|
|
151
154
|
</AwButton>
|
|
152
155
|
<AwButton
|
|
153
|
-
:size="$attrs.size || 'md'"
|
|
154
156
|
tabindex="-1"
|
|
155
157
|
theme="icon"
|
|
158
|
+
:size="$attrs.size || 'md'"
|
|
156
159
|
class="h-full"
|
|
157
160
|
@click="searchable ? toggleDropdown() : null"
|
|
158
161
|
>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
class="aw-square-icon-button"
|
|
4
|
+
:class="classes"
|
|
5
|
+
:is="_linkComponent"
|
|
6
|
+
:disabled="isDisabled"
|
|
7
|
+
v-bind="_linkAttrs"
|
|
8
|
+
v-on="$listeners"
|
|
9
|
+
>
|
|
10
|
+
<slot>
|
|
11
|
+
<AwIcon :name="icon" :size="iconSize" />
|
|
12
|
+
</slot>
|
|
13
|
+
</component>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
import AwLink from '@AwAtoms/AwLink.vue'
|
|
18
|
+
|
|
19
|
+
export default {
|
|
20
|
+
name: 'AwSquareIconButton',
|
|
21
|
+
|
|
22
|
+
extends: AwLink,
|
|
23
|
+
|
|
24
|
+
props: {
|
|
25
|
+
icon: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: 'close'
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
iconSize: {
|
|
31
|
+
type: [String, Number],
|
|
32
|
+
default: 16
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
// Possible values: mono-900, mono-800, mono-700, mono-600
|
|
36
|
+
color: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: 'mono-900'
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
computed: {
|
|
43
|
+
classes() {
|
|
44
|
+
return [`aw-square-icon-button--color-${this.color || 'mono-900'}`]
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
isDisabled() {
|
|
48
|
+
return this.$attrs.disabled === true || this.$attrs.disabled === ''
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
</script>
|
|
@@ -8,9 +8,14 @@
|
|
|
8
8
|
[`${_cssClasses.base}--without-min-with`]: modifiers.includes(
|
|
9
9
|
'without-min-with'
|
|
10
10
|
),
|
|
11
|
-
[`${_cssClasses.base}--
|
|
12
|
-
'
|
|
13
|
-
|
|
11
|
+
[`${_cssClasses.base}--expand`]:
|
|
12
|
+
(modifiers.includes('expand') ||
|
|
13
|
+
!modifiers.includes('always-small')) &&
|
|
14
|
+
!modifiers.includes('without-min-with'),
|
|
15
|
+
[`${_cssClasses.base}--fullwidth`]:
|
|
16
|
+
modifiers.includes('fullwidth') &&
|
|
17
|
+
!modifiers.includes('always-small') &&
|
|
18
|
+
!modifiers.includes('without-min-with')
|
|
14
19
|
}
|
|
15
20
|
]"
|
|
16
21
|
@resized="scrollToActive(false)"
|
|
@@ -15,9 +15,8 @@
|
|
|
15
15
|
<!-- Address info -->
|
|
16
16
|
<AwAccordionFold :show="hasAddress">
|
|
17
17
|
<div class="flex justify-end relative w-full">
|
|
18
|
-
<
|
|
18
|
+
<AwSquareIconButton
|
|
19
19
|
icon="edit"
|
|
20
|
-
theme="circle"
|
|
21
20
|
class="edit-button"
|
|
22
21
|
@click="openModal(null)"
|
|
23
22
|
/>
|
|
@@ -175,11 +174,7 @@
|
|
|
175
174
|
@click="saveAddress"
|
|
176
175
|
/>
|
|
177
176
|
|
|
178
|
-
<AwButton
|
|
179
|
-
color="default"
|
|
180
|
-
theme="ghost"
|
|
181
|
-
@click="resetAddress"
|
|
182
|
-
>
|
|
177
|
+
<AwButton color="mono" @click="resetAddress">
|
|
183
178
|
<span class="text-dark-blue">
|
|
184
179
|
{{ $t('Cancel') }}
|
|
185
180
|
</span>
|
|
@@ -193,6 +188,7 @@
|
|
|
193
188
|
<script>
|
|
194
189
|
import { clone } from 'rambdax'
|
|
195
190
|
import { makePreventableEventMock } from '@AwUtils/events'
|
|
191
|
+
import AwSquareIconButton from '../2_molecules/AwSquareIconButton.vue'
|
|
196
192
|
|
|
197
193
|
const BASE = {
|
|
198
194
|
description: null,
|
|
@@ -216,6 +212,7 @@ const BASE = {
|
|
|
216
212
|
|
|
217
213
|
export default {
|
|
218
214
|
name: 'AwAddressBlock',
|
|
215
|
+
components: { AwSquareIconButton },
|
|
219
216
|
|
|
220
217
|
props: {
|
|
221
218
|
model: {
|