@bildvitta/quasar-ui-asteroid 3.17.0-beta.17 → 3.17.0-beta.18

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.17.0-beta.17",
4
+ "version": "3.17.0-beta.18",
5
5
  "author": "Bild & Vitta <systemteam@bild.com.br>",
6
6
  "license": "MIT",
7
7
  "main": "dist/asteroid.cjs.min.js",
@@ -2,14 +2,14 @@
2
2
  <div class="qas-card">
3
3
  <qas-box class="rounded-borders-right" v-bind="boxProps">
4
4
  <q-card class="column full-height overflow-hidden shadow-0">
5
- <div class="items-center justify-between row">
6
- <component :is="titleComponent" class="text-h5 text-no-decoration" :class="titleClasses" :to="route">
5
+ <div class="full-width items-center justify-between no-wrap row">
6
+ <component :is="titleComponent" class="ellipsis text-h5 text-no-decoration" :class="titleClasses" :to="route">
7
7
  <slot name="title">
8
8
  {{ props.title }}
9
9
  </slot>
10
10
  </component>
11
11
 
12
- <qas-actions-menu v-if="hasActions" :list="props.actionsMenuProps" :use-label="false" />
12
+ <qas-actions-menu v-if="hasActions" v-bind="formattedActionsMenuProps" />
13
13
  </div>
14
14
 
15
15
  <div class="q-my-sm qas-card__content">
@@ -66,8 +66,10 @@ const props = defineProps({
66
66
  }
67
67
  })
68
68
 
69
+ // consts
69
70
  const isInsideBox = inject('isBox', false)
70
71
 
72
+ // computeds
71
73
  const boxProps = computed(() => {
72
74
  return {
73
75
  outlined: isInsideBox,
@@ -106,6 +108,13 @@ const slots = useSlots()
106
108
  const hasFooterSlot = computed(() => !!slots.footer)
107
109
 
108
110
  const hasFooter = computed(() => hasFooterSlot.value || hasExpansion.value)
111
+
112
+ const formattedActionsMenuProps = computed(() => {
113
+ return {
114
+ ...props.actionsMenuProps,
115
+ useLabel: false
116
+ }
117
+ })
109
118
  </script>
110
119
 
111
120
  <style lang="scss">
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div ref="expansionItem" class="full-width qas-expansion-item" :class="classes" v-bind="expansionProps.parent">
3
3
  <component :is="component.is" class="qas-expansion-item__box" v-bind="boxProps">
4
- <q-expansion-item v-model="modelValue" v-bind="expansionProps.item" header-class="text-bold q-mt-sm q-pa-none qas-expansion-item__header">
4
+ <q-expansion-item v-model="modelValue" v-bind="expansionProps.item" header-class="text-bold q-mt-sm q-pa-none qas-expansion-item__header" @show="setShowContent">
5
5
  <template #header>
6
6
  <div class="full-width justify-between no-wrap row">
7
7
  <div class="full-width">
@@ -31,7 +31,7 @@
31
31
  <q-separator v-if="hasHeaderSeparator" class="q-my-md" />
32
32
 
33
33
  <div :class="contentClasses">
34
- <slot name="content">
34
+ <slot v-if="showContent" name="content">
35
35
  <qas-grid-generator v-if="hasGridGenerator" use-inline v-bind="gridGeneratorProps" />
36
36
  </slot>
37
37
  </div>
@@ -117,6 +117,7 @@ const slots = defineSlots()
117
117
  // refs
118
118
  const expansionItem = ref(null)
119
119
  const hasNextSibling = ref(false)
120
+ const showContent = ref(false)
120
121
 
121
122
  onMounted(setHasNextSibling)
122
123
 
@@ -216,7 +217,7 @@ const isDisabled = computed(() => props.disable || props.disableButton)
216
217
  * Caso o componente esteja dentro de um QasExpansionItem, verifica se existe um próximo irmão
217
218
  * para adicionar um separador.
218
219
  */
219
- function setHasNextSibling (value) {
220
+ function setHasNextSibling () {
220
221
  if (!isNestedExpansionItem) return
221
222
 
222
223
  const hasTextContentSibling = !!expansionItem.value.nextSibling?.textContent?.trim?.()
@@ -224,6 +225,10 @@ function setHasNextSibling (value) {
224
225
 
225
226
  hasNextSibling.value = hasElementSibling || hasTextContentSibling
226
227
  }
228
+
229
+ function setShowContent () {
230
+ showContent.value = true
231
+ }
227
232
  </script>
228
233
 
229
234
  <style lang="scss">
@@ -244,7 +249,7 @@ function setHasNextSibling (value) {
244
249
 
245
250
  &--error {
246
251
  #{$root}__box {
247
- border: 2px solid $negative;
252
+ border: 2px solid $negative !important;
248
253
  }
249
254
 
250
255
  #{$root}__error-message {