@bildvitta/quasar-ui-asteroid 3.5.0-beta.5 → 3.5.0-beta.7
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/package.json +1 -1
- package/src/components/alert/QasAlert.vue +2 -5
- package/src/components/app-menu/QasAppMenu.vue +1 -1
- package/src/components/avatar/QasAvatar.vue +3 -23
- package/src/components/box/QasBox.vue +1 -1
- package/src/components/card/QasCard.vue +1 -1
- package/src/components/field/QasField.vue +18 -8
- package/src/components/form-view/QasFormView.vue +1 -5
- package/src/components/transfer/QasTransfer.vue +1 -1
- package/src/css/utils/border.scss +1 -0
- package/src/index.scss +2 -0
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div v-if="model" class="q-pa-lg qas-alert relative-position rounded-borders" :class="classes">
|
|
2
|
+
<div v-if="model" class="bg-white q-pa-lg qas-alert relative-position rounded-borders" :class="classes">
|
|
3
3
|
<qas-btn class="absolute-top-right q-mr-md q-mt-sm" :color="color" dense flat icon="o_close" rounded @click="close" />
|
|
4
4
|
|
|
5
5
|
<div class="q-gutter-md q-mr-lg">
|
|
@@ -58,10 +58,7 @@ export default {
|
|
|
58
58
|
|
|
59
59
|
computed: {
|
|
60
60
|
classes () {
|
|
61
|
-
return {
|
|
62
|
-
[`text-${this.color}`]: true,
|
|
63
|
-
[`bg-${this.color}-contrast`]: ['primary', 'secondary'].includes(this.color)
|
|
64
|
-
}
|
|
61
|
+
return `text-${this.color}`
|
|
65
62
|
}
|
|
66
63
|
},
|
|
67
64
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<router-link class="block q-toolbar__title relative-position text-no-decoration" :to="rootRoute">
|
|
8
8
|
<img v-if="brand" :alt="title" class="full-width" :src="brand">
|
|
9
9
|
<span v-else class="ellipsis text-bold text-primary">{{ title }}</span>
|
|
10
|
-
<q-badge color="red" floating :label="developmentBadgeLabel" />
|
|
10
|
+
<q-badge v-if="hasDevelopmentBadge" color="red" floating :label="developmentBadgeLabel" />
|
|
11
11
|
</router-link>
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<q-avatar class="text-bold" :class="
|
|
2
|
+
<q-avatar class="text-bold" :class="avatarClasses" v-bind="attributes">
|
|
3
3
|
<q-img v-if="hasImage" :alt="title" :ratio="1" spinner-color="primary" spinner-size="16px" :src="image" @error="onImageLoadedError" />
|
|
4
4
|
<template v-else-if="hasTitle">{{ firstLetter }}</template>
|
|
5
5
|
<q-icon v-else :name="icon" />
|
|
@@ -13,11 +13,6 @@ export default {
|
|
|
13
13
|
inheritAttrs: false,
|
|
14
14
|
|
|
15
15
|
props: {
|
|
16
|
-
color: {
|
|
17
|
-
default: '',
|
|
18
|
-
type: String
|
|
19
|
-
},
|
|
20
|
-
|
|
21
16
|
dark: {
|
|
22
17
|
type: Boolean
|
|
23
18
|
},
|
|
@@ -32,11 +27,6 @@ export default {
|
|
|
32
27
|
type: String
|
|
33
28
|
},
|
|
34
29
|
|
|
35
|
-
textColor: {
|
|
36
|
-
default: 'primary',
|
|
37
|
-
type: String
|
|
38
|
-
},
|
|
39
|
-
|
|
40
30
|
title: {
|
|
41
31
|
default: '',
|
|
42
32
|
type: String
|
|
@@ -50,22 +40,12 @@ export default {
|
|
|
50
40
|
},
|
|
51
41
|
|
|
52
42
|
computed: {
|
|
53
|
-
|
|
43
|
+
avatarClasses () {
|
|
54
44
|
if (this.hasImage) {
|
|
55
45
|
return null
|
|
56
46
|
}
|
|
57
47
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return [
|
|
61
|
-
this.dark
|
|
62
|
-
? `bg-${this.textColor} text-${contrastColor}`
|
|
63
|
-
: `bg-${contrastColor} text-${this.textColor}`
|
|
64
|
-
]
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
contrastColor () {
|
|
68
|
-
return `${this.textColor}-contrast`
|
|
48
|
+
return 'bg-primary text-white'
|
|
69
49
|
},
|
|
70
50
|
|
|
71
51
|
firstLetter () {
|
|
@@ -149,28 +149,38 @@ export default {
|
|
|
149
149
|
select: { is: 'qas-select', entity, name, multiple, options, useLazyLoading, ...input }
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
return {
|
|
152
|
+
return {
|
|
153
|
+
...(profiles[type] || profiles.default),
|
|
154
|
+
...this.$attrs,
|
|
155
|
+
label: this.formattedLabel
|
|
156
|
+
}
|
|
153
157
|
},
|
|
154
158
|
|
|
155
159
|
errorMessage () {
|
|
156
160
|
return Array.isArray(this.error) ? this.error.join(' ') : this.error
|
|
157
161
|
},
|
|
158
162
|
|
|
163
|
+
formattedLabel () {
|
|
164
|
+
const nonRequiredFieldsLabel = ['boolean', 'checkbox', 'radio']
|
|
165
|
+
|
|
166
|
+
const label = this.$attrs.label || this.formattedField.label
|
|
167
|
+
const { required, type } = this.formattedField
|
|
168
|
+
|
|
169
|
+
if (required && label && !nonRequiredFieldsLabel.includes(type)) {
|
|
170
|
+
return `${label}*`
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return label
|
|
174
|
+
},
|
|
175
|
+
|
|
159
176
|
// This computed will change the key name when the server sends different key.
|
|
160
177
|
formattedField () {
|
|
161
178
|
const field = {}
|
|
162
|
-
const nonRequiredFieldsLabel = ['boolean', 'checkbox', 'radio']
|
|
163
179
|
|
|
164
180
|
for (const key in this.field) {
|
|
165
181
|
field[attributesProfile[key] || key] = this.field[key]
|
|
166
182
|
}
|
|
167
183
|
|
|
168
|
-
const { label, required, type } = field
|
|
169
|
-
|
|
170
|
-
if (required && label && !nonRequiredFieldsLabel.includes(type)) {
|
|
171
|
-
field.label = `${label}*`
|
|
172
|
-
}
|
|
173
|
-
|
|
174
184
|
return field
|
|
175
185
|
},
|
|
176
186
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<slot v-if="useActions" name="actions">
|
|
11
11
|
<div class="justify-end q-col-gutter-md q-my-lg row">
|
|
12
12
|
<div v-if="hasCancelButton" class="col-12 col-sm-2" :class="cancelButtonClass">
|
|
13
|
-
<qas-btn v-close-popup class="full-width" :data-cy="`btnCancel-${entity}`" :disable="
|
|
13
|
+
<qas-btn v-close-popup class="full-width" :data-cy="`btnCancel-${entity}`" :disable="isSubmitting" :label="cancelButtonLabel" outline type="button" @click="cancel" />
|
|
14
14
|
</div>
|
|
15
15
|
|
|
16
16
|
<div v-if="useSubmitButton" class="col-12 col-sm-2" :class="submitButtonClass">
|
|
@@ -194,10 +194,6 @@ export default {
|
|
|
194
194
|
return this.$qas.screen.isSmall && 'order-first'
|
|
195
195
|
},
|
|
196
196
|
|
|
197
|
-
isCancelButtonDisabled () {
|
|
198
|
-
return this.disable || this.isSubmitting
|
|
199
|
-
},
|
|
200
|
-
|
|
201
197
|
defaultNotifyMessages () {
|
|
202
198
|
return {
|
|
203
199
|
validationError: 'Existem campos no formulário que ainda não foram preenchidos. Complete todas as informações para avançar.',
|
|
@@ -177,7 +177,7 @@ export default {
|
|
|
177
177
|
return this[isFirst
|
|
178
178
|
? 'firstQueue'
|
|
179
179
|
: 'secondQueue'
|
|
180
|
-
].some(item => item[this.valueKey] === object[this.valueKey]) && 'bg-
|
|
180
|
+
].some(item => item[this.valueKey] === object[this.valueKey]) && 'bg-grey-4'
|
|
181
181
|
},
|
|
182
182
|
|
|
183
183
|
getItemLabel (item) {
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
@include set-border-color(primary-contrast, $primary-contrast);
|
|
18
18
|
@include set-border-color(secondary, $secondary);
|
|
19
19
|
@include set-border-color(secondary-contrast, $secondary-contrast);
|
|
20
|
+
@include set-border-color('grey', $border-grey);
|
|
20
21
|
|
|
21
22
|
// Direction
|
|
22
23
|
.border-top {
|
package/src/index.scss
CHANGED
|
@@ -10,12 +10,14 @@ $accent: var(--q-accent);
|
|
|
10
10
|
// Asteroid variables
|
|
11
11
|
:root {
|
|
12
12
|
--qas-background-color: #fbfbfb;
|
|
13
|
+
--qas-border-grey: #{$grey-4};
|
|
13
14
|
--qas-generic-border-radius: 8px;
|
|
14
15
|
--qas-generic-transition: 300ms;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
$background-color: var(--qas-background-color);
|
|
18
19
|
$generic-border-radius: var(--qas-generic-border-radius);
|
|
20
|
+
$border-grey: var(--qas-border-grey);
|
|
19
21
|
|
|
20
22
|
// variables
|
|
21
23
|
@import './css/variables/index';
|