@bildvitta/quasar-ui-asteroid 3.5.0-beta.6 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bildvitta/quasar-ui-asteroid",
3
3
  "description": "Asteroid",
4
- "version": "3.5.0-beta.6",
4
+ "version": "3.5.0-beta.7",
5
5
  "author": "Bild & Vitta <systemteam@bild.com.br>",
6
6
  "license": "MIT",
7
7
  "main": "dist/asteroid.cjs.min.js",
@@ -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="avatarClass" v-bind="attributes">
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
- avatarClass () {
43
+ avatarClasses () {
54
44
  if (this.hasImage) {
55
45
  return null
56
46
  }
57
47
 
58
- const contrastColor = this.color ? this.color : this.contrastColor
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 () {
@@ -21,7 +21,7 @@ export default {
21
21
  computed: {
22
22
  boxClass () {
23
23
  return {
24
- 'border-primary-contrast': this.outlined,
24
+ 'border-grey': this.outlined,
25
25
  'shadow-2': !this.unelevated
26
26
  }
27
27
  }
@@ -23,7 +23,7 @@
23
23
  </div>
24
24
  </q-card-section>
25
25
 
26
- <div v-if="hasActionsSlot" class="border-primary-contrast border-top overflow-hidden row">
26
+ <div v-if="hasActionsSlot" class="border-grey border-top overflow-hidden row">
27
27
  <slot name="actions" />
28
28
  </div>
29
29
  </q-card>
@@ -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-secondary'
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';