@bildvitta/quasar-ui-asteroid 3.5.0-beta.7 → 3.5.0-beta.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bildvitta/quasar-ui-asteroid",
3
3
  "description": "Asteroid",
4
- "version": "3.5.0-beta.7",
4
+ "version": "3.5.0-beta.9",
5
5
  "author": "Bild & Vitta <systemteam@bild.com.br>",
6
6
  "license": "MIT",
7
7
  "main": "dist/asteroid.cjs.min.js",
@@ -13,7 +13,7 @@
13
13
 
14
14
  <!-- Module -->
15
15
  <div v-if="displayModuleSection" class="q-mt-xl q-px-lg qas-app-menu__module">
16
- <qas-select v-model="module" borderless class="q-py-xs rounded-borders shadow-2" dense input-class="q-px-md" :options="defaultModules" :outlined="false" :use-search="false" @update:model-value="redirectHandler(currentModelOption)" />
16
+ <qas-select v-model="module" borderless class="q-py-xs qas-app-menu__select shadow-2" dense input-class="q-px-md" :options="defaultModules" :outlined="false" :use-search="false" @update:model-value="redirectHandler(currentModelOption)" />
17
17
  </div>
18
18
 
19
19
  <!-- Menu -->
@@ -259,6 +259,10 @@ export default {
259
259
  padding-left: var(--qas-spacing-lg);
260
260
  }
261
261
 
262
+ &__select {
263
+ border-radius: 4px;
264
+ }
265
+
262
266
  // User
263
267
  .qas-app-user__data {
264
268
  line-height: 1.25;
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="cursor-pointer items-center no-wrap q-gutter-sm qas-app-user row">
3
3
  <div class="relative-position">
4
- <qas-avatar color="white" dark :image="user.photo" rounded :size="avatarSize" text-color="primary" :title="userName" />
4
+ <qas-avatar :image="user.photo" :size="avatarSize" :title="userName" />
5
5
  <q-badge v-if="hasNotifications" color="red" floating>{{ notifications.count }}</q-badge>
6
6
  </div>
7
7
 
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <q-avatar class="text-bold" :class="avatarClasses" v-bind="attributes">
2
+ <q-avatar class="text-bold" 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,8 +13,15 @@ export default {
13
13
  inheritAttrs: false,
14
14
 
15
15
  props: {
16
- dark: {
17
- type: Boolean
16
+ color: {
17
+ type: String,
18
+ default: 'primary',
19
+ validator: value => ['primary', 'secondary-contrast'].includes(value)
20
+ },
21
+
22
+ size: {
23
+ type: String,
24
+ default: ''
18
25
  },
19
26
 
20
27
  icon: {
@@ -40,14 +47,6 @@ export default {
40
47
  },
41
48
 
42
49
  computed: {
43
- avatarClasses () {
44
- if (this.hasImage) {
45
- return null
46
- }
47
-
48
- return 'bg-primary text-white'
49
- },
50
-
51
50
  firstLetter () {
52
51
  return this.title[0].toUpperCase()
53
52
  },
@@ -61,9 +60,25 @@ export default {
61
60
  },
62
61
 
63
62
  attributes () {
64
- const { square, rounded, ...attributes } = this.$attrs
63
+ const {
64
+ rounded,
65
+ square,
66
+ fontSize,
67
+ textColor,
68
+ ...attributes
69
+ } = this.$attrs
70
+
71
+ const colors = {
72
+ primary: 'white',
73
+ 'secondary-contrast': 'primary'
74
+ }
65
75
 
66
- return attributes
76
+ return {
77
+ size: this.size,
78
+ color: this.color,
79
+ textColor: colors[this.color],
80
+ ...attributes
81
+ }
67
82
  }
68
83
  },
69
84
 
@@ -10,11 +10,11 @@ props:
10
10
  color:
11
11
  desc: Cor de fundo (background-color).
12
12
  type: String
13
- examples: ['primary', 'positive']
13
+ examples: ['primary', 'secondary-contrast']
14
14
 
15
- dark:
16
- desc: Habilita o modo escuro.
17
- type: Boolean
15
+ size:
16
+ desc: Tamanho do avatar.
17
+ type: String
18
18
 
19
19
  icon:
20
20
  desc: Ícone de fundo do avatar que vai aparecer caso não tenha imagem nem título.