@awes-io/ui 2.70.0 → 2.71.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 +10 -0
- package/assets/css/components/address-block.css +29 -0
- package/assets/css/components/alert.css +16 -4
- package/assets/css/components/avatar.css +1 -0
- package/assets/css/components/bottom-bar.css +3 -2
- package/assets/css/components/button-fixed.css +4 -0
- package/assets/css/components/button-nav.css +125 -8
- package/assets/css/components/button.css +159 -3
- package/assets/css/components/calendar.css +2 -1
- package/assets/css/components/card.css +32 -4
- package/assets/css/components/chart.css +7 -0
- package/assets/css/components/context-menu.css +40 -0
- package/assets/css/components/date.css +4 -0
- package/assets/css/components/description.css +8 -0
- package/assets/css/components/dock.css +86 -0
- package/assets/css/components/dropdown-button.css +4 -0
- package/assets/css/components/dropdown.css +42 -9
- package/assets/css/components/file.css +20 -0
- package/assets/css/components/filter-date-range.css +21 -0
- package/assets/css/components/gmap.css +8 -0
- package/assets/css/components/header-notification.css +19 -0
- package/assets/css/components/headline.css +5 -2
- package/assets/css/components/icon-menu-item.css +42 -2
- package/assets/css/components/info.css +9 -1
- package/assets/css/components/island-avatar.css +1 -1
- package/assets/css/components/island.css +1 -0
- package/assets/css/components/layout-menu.css +4 -4
- package/assets/css/components/layout.css +6 -6
- package/assets/css/components/main.css +16 -0
- package/assets/css/components/mobile-menu-item.css +2 -2
- package/assets/css/components/mobile-menu-nav.css +12 -0
- package/assets/css/components/mobile-menu.css +15 -3
- package/assets/css/components/modal.css +116 -9
- package/assets/css/components/nav.css +2 -0
- package/assets/css/components/notification.css +9 -4
- package/assets/css/components/page-headline.css +49 -3
- package/assets/css/components/page-menu-buttons.css +25 -0
- package/assets/css/components/page.css +6 -0
- package/assets/css/components/search.css +45 -0
- package/assets/css/components/select.css +32 -1
- package/assets/css/components/sub-headline.css +9 -3
- package/assets/css/components/tab-nav.css +16 -0
- package/assets/css/components/table.css +95 -9
- package/assets/css/components/tags.css +8 -0
- package/assets/css/components/tel.css +4 -0
- package/assets/css/components/text-field.css +117 -16
- package/assets/css/components/title.css +7 -0
- package/assets/css/components/user-menu.css +10 -5
- package/assets/js/events.js +8 -0
- package/assets/js/icons/mono.js +3 -1
- package/assets/js/styles.js +65 -31
- package/components/1_atoms/AwDock.vue +195 -0
- package/components/1_atoms/AwFile.vue +21 -0
- package/components/1_atoms/AwSelectNative.vue +151 -0
- package/components/1_atoms/AwTitle.vue +18 -0
- package/components/2_molecules/AwDescriptionInput.vue +19 -0
- package/components/3_organisms/AwAddressBlock.vue +0 -8
- package/components/3_organisms/AwBottomBar.vue +6 -6
- package/components/3_organisms/AwContextMenu.vue +8 -3
- package/components/3_organisms/AwGmap.vue +0 -6
- package/components/3_organisms/AwModal.vue +2 -2
- package/components/4_pages/AwPageMenuButtons.vue +1 -0
- package/components/4_pages/_AwPageHeadline.vue +2 -2
- package/package.json +2 -2
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex aw-text-field is-select" :class="wrapperClasses">
|
|
3
|
+
<div v-if="prefix || $scopedSlots.prefix" class="aw-text-field__prefix" :class="{ 'px-4': prefix }">
|
|
4
|
+
<slot name="prefix">{{ prefix }}</slot>
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
<div class="relative w-full">
|
|
8
|
+
<select
|
|
9
|
+
:id="id || defaultId"
|
|
10
|
+
ref="element"
|
|
11
|
+
v-model="selected"
|
|
12
|
+
v-tooltip.show.prepend="errorTooltip"
|
|
13
|
+
class="aw-text-field__element"
|
|
14
|
+
:class="size === 'md' ? 'p-3' : 'p-2'"
|
|
15
|
+
v-bind="$attrs"
|
|
16
|
+
>
|
|
17
|
+
<option v-for="(option, i) in options" :key="i" :value="_getOptionValue(option)" :disabled="optionDisabled(option)">
|
|
18
|
+
{{ _getOptionLabel(option) }}
|
|
19
|
+
</option>
|
|
20
|
+
</select>
|
|
21
|
+
<label
|
|
22
|
+
v-if="!!label || $scopedSlots.label"
|
|
23
|
+
:for="id || defaultId"
|
|
24
|
+
class="aw-text-field__label"
|
|
25
|
+
:class="{ 'aw-text-field__label--required': isRequired }"
|
|
26
|
+
>
|
|
27
|
+
<slot name="label">
|
|
28
|
+
{{ label }}
|
|
29
|
+
</slot>
|
|
30
|
+
</label>
|
|
31
|
+
|
|
32
|
+
<div class="aw-text-field__caret pl-2 pr-4">
|
|
33
|
+
<AwIcon name="triangle-d" size="12" />
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div v-if="postfix || $scopedSlots.postfix" class="aw-text-field__postfix" :class="{ 'px-4': postfix }">
|
|
38
|
+
<slot name="prefix">{{ postfix }}</slot>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script>
|
|
44
|
+
import { path } from 'rambdax'
|
|
45
|
+
import fieldMixin from '@AwMixins/field'
|
|
46
|
+
import errorMixin from '@AwMixins/error'
|
|
47
|
+
|
|
48
|
+
const itself = (val) => val
|
|
49
|
+
|
|
50
|
+
export default {
|
|
51
|
+
name: 'AwSelectNative',
|
|
52
|
+
|
|
53
|
+
mixins: [fieldMixin, errorMixin],
|
|
54
|
+
|
|
55
|
+
inheritAttrs: false,
|
|
56
|
+
|
|
57
|
+
props: {
|
|
58
|
+
options: {
|
|
59
|
+
type: Array,
|
|
60
|
+
default: () => []
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
value: {
|
|
64
|
+
type: [String, Number, Object],
|
|
65
|
+
default: null
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
optionLabel: {
|
|
69
|
+
type: [String, Function],
|
|
70
|
+
default: ''
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
optionDisabled: {
|
|
74
|
+
type: Function,
|
|
75
|
+
default: () => false
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
trackBy: {
|
|
79
|
+
type: [String, Function],
|
|
80
|
+
default: ''
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
size: {
|
|
84
|
+
type: String,
|
|
85
|
+
default: 'md'
|
|
86
|
+
},
|
|
87
|
+
|
|
88
|
+
prefix: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: ''
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
postfix: {
|
|
94
|
+
type: String,
|
|
95
|
+
default: ''
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
computed: {
|
|
100
|
+
_getOptionLabel() {
|
|
101
|
+
return this._generateGetterFunction(this.optionLabel)
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
_getOptionValue() {
|
|
105
|
+
return this._generateGetterFunction(this.trackBy)
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
selected: {
|
|
109
|
+
get() {
|
|
110
|
+
return this.value
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
set(val) {
|
|
114
|
+
if (this.hasError) {
|
|
115
|
+
this.setError('')
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
this.$emit('input', val)
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
_isFilled() {
|
|
123
|
+
return this.options.some((option) => this.value === this._getOptionValue(option))
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
wrapperClasses() {
|
|
127
|
+
return {
|
|
128
|
+
'is-filled': this._isFilled,
|
|
129
|
+
'has-label': !!this.label,
|
|
130
|
+
'has-error': this.hasError,
|
|
131
|
+
'is-disabled': this.isDisabled,
|
|
132
|
+
'has-prefix': this.prefix,
|
|
133
|
+
'has-postfix': this.postfix
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
methods: {
|
|
139
|
+
_generateGetterFunction(arg) {
|
|
140
|
+
switch (typeof arg) {
|
|
141
|
+
case 'function':
|
|
142
|
+
return arg
|
|
143
|
+
case 'string':
|
|
144
|
+
return arg.length ? path(arg) : itself
|
|
145
|
+
default:
|
|
146
|
+
return itself
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
</script>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<slot />
|
|
4
|
+
<AwDescription v-if="text != ''" class="mt-2 inline-block" v-html="text" />
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
export default {
|
|
10
|
+
name: 'AwDescriptionInput',
|
|
11
|
+
|
|
12
|
+
props: {
|
|
13
|
+
text: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: ''
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
@@ -27,9 +27,10 @@
|
|
|
27
27
|
class="aw-icon-menu-item__icon"
|
|
28
28
|
:size="$options.ICON_SIZE"
|
|
29
29
|
/>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
|
|
31
|
+
<span class="aw-icon-menu-item__text">
|
|
32
|
+
{{ text }}
|
|
33
|
+
</span>
|
|
33
34
|
</span>
|
|
34
35
|
</template>
|
|
35
36
|
</AwMenuItemIcon>
|
|
@@ -77,9 +78,8 @@ export default {
|
|
|
77
78
|
...button,
|
|
78
79
|
listeners: {
|
|
79
80
|
...button.listeners,
|
|
80
|
-
click: () =>
|
|
81
|
-
'awes-io::bottom-bar-action:click'
|
|
82
|
-
)
|
|
81
|
+
click: () =>
|
|
82
|
+
this.$root.$emit('awes-io::bottom-bar-action:click')
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -20,7 +20,12 @@ export default {
|
|
|
20
20
|
default: ''
|
|
21
21
|
},
|
|
22
22
|
|
|
23
|
-
vertical: Boolean
|
|
23
|
+
vertical: Boolean,
|
|
24
|
+
|
|
25
|
+
text: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: ''
|
|
28
|
+
}
|
|
24
29
|
},
|
|
25
30
|
|
|
26
31
|
render(h) {
|
|
@@ -73,9 +78,9 @@ export default {
|
|
|
73
78
|
theme: 'ghost',
|
|
74
79
|
color: 'default',
|
|
75
80
|
contentClass: 'p-2',
|
|
76
|
-
text: this
|
|
81
|
+
text: this.text
|
|
77
82
|
},
|
|
78
|
-
staticClass: 'h-10 ' + this.buttonClass,
|
|
83
|
+
staticClass: 'h-10 w-auto ' + this.buttonClass,
|
|
79
84
|
attrs: {
|
|
80
85
|
'data-arrow-focus': ''
|
|
81
86
|
},
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
@click.prevent="close()"
|
|
35
35
|
theme="ghost"
|
|
36
36
|
color="default"
|
|
37
|
-
content-class="p-2"
|
|
38
37
|
tabindex="0"
|
|
38
|
+
content-class="p-0"
|
|
39
39
|
>
|
|
40
40
|
<template #icon>
|
|
41
|
-
<AwIconSystemMono name="close" />
|
|
41
|
+
<AwIconSystemMono name="close" size="16" />
|
|
42
42
|
</template>
|
|
43
43
|
</AwButton>
|
|
44
44
|
</div>
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
<AwButton
|
|
7
7
|
v-if="backUrl"
|
|
8
8
|
color="mono"
|
|
9
|
-
content-class="px-2"
|
|
10
9
|
class="w-10 h-10 aw-page-headline__back"
|
|
11
10
|
:href="backUrl"
|
|
12
11
|
:aria-label="breadcrumb.title"
|
|
12
|
+
content-class="p-0"
|
|
13
13
|
>
|
|
14
14
|
<template #icon>
|
|
15
|
-
<AwIconSystemMono name="
|
|
15
|
+
<AwIconSystemMono name="arrow-l" size="24" />
|
|
16
16
|
</template>
|
|
17
17
|
</AwButton>
|
|
18
18
|
</slot>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awes-io/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.71.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": "06094c5bdf9e8a6364d6382df3d9b095e61e06bc"
|
|
116
116
|
}
|