@bildvitta/quasar-ui-asteroid 3.20.0-beta.2 → 3.20.0-beta.21

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.
Files changed (102) hide show
  1. package/package.json +3 -3
  2. package/src/asteroid.js +8 -1
  3. package/src/components/actions/QasActions.vue +12 -2
  4. package/src/components/actions-menu/QasActionsMenu.vue +18 -5
  5. package/src/components/alert/QasAlert.vue +89 -64
  6. package/src/components/app-user/QasAppUser.vue +2 -1
  7. package/src/components/board-generator/QasBoardGenerator.vue +883 -162
  8. package/src/components/board-generator/QasBoardGenerator.yml +83 -2
  9. package/src/components/board-generator/private/PvBoardGeneratorCardsContainer.vue +25 -0
  10. package/src/components/box/QasBox.vue +16 -3
  11. package/src/components/box/QasBox.yml +10 -0
  12. package/src/components/btn/QasBtn.vue +27 -5
  13. package/src/components/btn/QasBtn.yml +10 -1
  14. package/src/components/btn-dropdown/QasBtnDropdown.vue +13 -1
  15. package/src/components/card/QasCard.vue +97 -25
  16. package/src/components/card/QasCard.yml +10 -0
  17. package/src/components/card-image/QasCardImage.vue +10 -1
  18. package/src/components/card-image/QasCardImage.yml +5 -0
  19. package/src/components/chart-view/QasChartView.vue +4 -3
  20. package/src/components/chart-view/QasChartView.yml +5 -0
  21. package/src/components/checkbox/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
  22. package/src/components/copy/QasCopy.vue +6 -1
  23. package/src/components/copy/QasCopy.yml +5 -0
  24. package/src/components/date-time-input/QasDateTimeInput.vue +30 -6
  25. package/src/components/dialog/QasDialog.vue +308 -91
  26. package/src/components/dialog/QasDialog.yml +51 -23
  27. package/src/components/dialog/composables/use-cancel.js +1 -1
  28. package/src/components/dialog/composables/use-dynamic-components.js +2 -2
  29. package/src/components/dialog/composables/use-ok.js +1 -0
  30. package/src/components/dialog-router/QasDialogRouter.vue +1 -1
  31. package/src/components/drawer/QasDrawer.vue +76 -26
  32. package/src/components/drawer/QasDrawer.yml +10 -0
  33. package/src/components/expansion-item/QasExpansionItem.yml +5 -0
  34. package/src/components/filters/QasFilters.vue +2 -1
  35. package/src/components/filters/private/PvFiltersActions.vue +79 -13
  36. package/src/components/form-generator/QasFormGenerator.vue +8 -1
  37. package/src/components/form-generator/QasFormGenerator.yml +10 -0
  38. package/src/components/form-view/QasFormView.vue +20 -11
  39. package/src/components/form-view/QasFormView.yml +6 -0
  40. package/src/components/gallery/composables/use-delete.js +2 -3
  41. package/src/components/gallery/private/PvGalleryCarouselDialog.vue +8 -7
  42. package/src/components/grid-item/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
  43. package/src/components/header/QasHeader.vue +66 -11
  44. package/src/components/header/QasHeader.yml +16 -1
  45. package/src/components/infinite-scroll/QasInfiniteScroll.vue +1 -1
  46. package/src/components/label/QasLabel.vue +3 -1
  47. package/src/components/layout/QasLayout.vue +16 -1
  48. package/src/components/layout/private/PvLayoutNotificationsDrawer.vue +2 -1
  49. package/src/components/layout/private/PvLayoutOverlayDrawer.vue +4 -2
  50. package/src/components/lazy-loading-components/QasLazyLoadingComponents.vue +262 -0
  51. package/src/components/lazy-loading-components/QasLazyLoadingComponents.yml +49 -0
  52. package/src/components/list-view/QasListView.vue +12 -4
  53. package/src/components/list-view/QasListView.yml +12 -0
  54. package/src/components/page-header/QasPageHeader.vue +49 -3
  55. package/src/components/page-header/QasPageHeader.yml +5 -0
  56. package/src/components/router-link/QasRouterLink.vue +72 -0
  57. package/src/components/router-link/QasRouterLink.yml +24 -0
  58. package/src/components/search-box/QasSearchBox.vue +1 -1
  59. package/src/components/select/QasSelect.vue +8 -1
  60. package/src/components/select-list-dialog/QasSelectListDialog.vue +40 -20
  61. package/src/components/select-list-dialog/QasSelectListDialog.yml +14 -2
  62. package/src/components/signature-uploader/QasSignatureUploader.vue +5 -18
  63. package/src/components/single-view/QasSingleView.vue +2 -2
  64. package/src/components/skeleton/QasSkeleton.vue +139 -0
  65. package/src/components/skeleton/QasSkeleton.yml +48 -0
  66. package/src/components/sortable/QasSortable.vue +1 -1
  67. package/src/components/stepper/QasStepper.vue +24 -2
  68. package/src/components/table-generator/QasTableGenerator.vue +186 -35
  69. package/src/components/table-generator/QasTableGenerator.yml +6 -1
  70. package/src/components/tabs-generator/QasTabsGenerator.vue +14 -3
  71. package/src/components/tabs-generator/QasTabsGenerator.yml +5 -1
  72. package/src/components/text-truncate/QasTextTruncate.vue +61 -12
  73. package/src/components/text-truncate/QasTextTruncate.yml +5 -0
  74. package/src/components/toggle-visibility/QasToggleVisibility.vue +2 -1
  75. package/src/components/tooltip/QasTooltip.vue +6 -1
  76. package/src/components/tree-generator/QasTreeGenerator.vue +4 -6
  77. package/src/components/uploader/QasUploader.vue +12 -2
  78. package/src/composables/private/use-view.js +1 -1
  79. package/src/composables/use-overlay-navigation.js +116 -10
  80. package/src/composables/use-screen.js +17 -1
  81. package/src/css/components/button.scss +82 -3
  82. package/src/css/components/item.scss +6 -0
  83. package/src/css/utils/background.scss +5 -0
  84. package/src/css/utils/border.scss +6 -0
  85. package/src/css/utils/container.scss +4 -3
  86. package/src/css/utils/text.scss +9 -0
  87. package/src/helpers/copy-to-clipboard.js +2 -1
  88. package/src/helpers/filters.js +1 -1
  89. package/src/helpers/promise-handler.js +2 -1
  90. package/src/helpers/set-scroll-gradient.js +31 -8
  91. package/src/helpers/set-scroll-on-grab.js +10 -3
  92. package/src/index.scss +1 -0
  93. package/src/mixins/search-filter.js +7 -1
  94. package/src/plugins/delete/Delete.js +7 -9
  95. package/src/plugins/delete/Delete.yml +1 -1
  96. package/src/plugins/dialog/Dialog.yml +1 -1
  97. package/src/plugins/notify-error/NotifyError.yml +1 -1
  98. package/src/plugins/notify-success/NotifySuccess.yml +1 -1
  99. package/src/plugins/screen/Screen.js +17 -1
  100. package/src/plugins/screen/Screen.yml +5 -1
  101. package/src/vue-plugin.js +5 -7
  102. package/src/plugins/index.js +0 -5
@@ -12,7 +12,7 @@
12
12
  <slot v-if="useActions" name="actions">
13
13
  <qas-actions>
14
14
  <template v-if="useSubmitButton" #primary>
15
- <qas-btn class="qas-form-view__btn" :data-cy="`form-view-submit-btn-${entity}`" :disable="disable" :label="submitButtonLabel" :loading="isSubmitting" type="submit" variant="primary" />
15
+ <qas-btn class="qas-form-view__btn" :data-cy="`form-view-submit-btn-${entity}`" :disable="disable" :label="submitButtonLabel" :loading="isSubmitting" :skeleton="mx_isFetching" type="submit" variant="primary" />
16
16
  </template>
17
17
 
18
18
  <template v-if="hasCancelButton" #secondary>
@@ -28,7 +28,7 @@
28
28
 
29
29
  <qas-dialog v-model="showDialog" v-bind="defaultDialogProps" />
30
30
 
31
- <q-inner-loading :showing="mx_isFetching">
31
+ <q-inner-loading :showing="mx_isFetching && useLoading">
32
32
  <q-spinner color="grey" size="3em" />
33
33
  </q-inner-loading>
34
34
  </qas-container>
@@ -40,7 +40,8 @@ import QasBtn from '../btn/QasBtn.vue'
40
40
  import QasContainer from '../container/QasContainer.vue'
41
41
  import QasDialog from '../dialog/QasDialog.vue'
42
42
 
43
- import { NotifyError, NotifySuccess } from '../../plugins'
43
+ import NotifyError from '../../plugins/notify-error/NotifyError.js'
44
+ import NotifySuccess from '../../plugins/notify-success/NotifySuccess.js'
44
45
  import { useHistory, useOverlayNavigation } from '../../composables'
45
46
  import { viewMixin } from '../../mixins'
46
47
 
@@ -150,6 +151,11 @@ export default {
150
151
  default: true
151
152
  },
152
153
 
154
+ useLoading: {
155
+ type: Boolean,
156
+ default: true
157
+ },
158
+
153
159
  useSubmitButton: {
154
160
  default: true,
155
161
  type: Boolean
@@ -184,9 +190,9 @@ export default {
184
190
  ignoreRouterGuard: false,
185
191
 
186
192
  defaultDialogProps: {
187
- card: {
188
- description: 'Você está deixando a página e suas alterações serão perdidas. Tem certeza que deseja sair sem salvar?'
189
- },
193
+ title: 'Alterações não salvas',
194
+ description: 'Você está deixando a página e suas alterações serão perdidas. Tem certeza que deseja sair sem salvar?',
195
+ size: 'md',
190
196
 
191
197
  ok: { label: 'Continuar editando' },
192
198
 
@@ -498,6 +504,9 @@ export default {
498
504
 
499
505
  getFormattedURL ({ payload, isSubmit = false } = {}) {
500
506
  const { url: customURL } = payload
507
+
508
+ if (customURL) return customURL
509
+
501
510
  const decamelizedEntity = decamelize(this.entity, { separator: '-' })
502
511
 
503
512
  // Utiliza a URL passada via prop, ou monta a URL baseada na entity e id.
@@ -507,9 +516,7 @@ export default {
507
516
  * Utiliza a customURL que pode vir via payload, no caso de um beforeSubmit por exemplo
508
517
  * Caso for uma ação de submit, retorna a customURL ou a baseURL (sem o mode new ou edit).
509
518
  */
510
- if (isSubmit) {
511
- return customURL || baseURL
512
- }
519
+ if (isSubmit) return baseURL
513
520
 
514
521
  const mode = this.isCreateMode ? 'new' : 'edit'
515
522
 
@@ -517,7 +524,7 @@ export default {
517
524
  * Utiliza a customURL que pode vir via payload, no caso de um beforeFetch por exemplo,
518
525
  * ou então concatena a baseURL com o mode (new ou edit).
519
526
  */
520
- return customURL || `${baseURL}/${mode}`
527
+ return `${baseURL}/${mode}`
521
528
  },
522
529
 
523
530
  handleFetchAction (payload) {
@@ -555,10 +562,12 @@ export default {
555
562
  // Formata a url com base em mode, entity, url via props, etc
556
563
  const url = this.getFormattedURL({ payload, isSubmit: true })
557
564
 
565
+ const { payload: dataPayload } = payload
566
+
558
567
  return this.$axios({
559
568
  method: methods[this.mode],
560
569
  url,
561
- data: this.modelValue
570
+ data: dataPayload
562
571
  })
563
572
  },
564
573
 
@@ -138,6 +138,12 @@ props:
138
138
  default: true
139
139
  type: Boolean
140
140
 
141
+ use-loading:
142
+ desc: Controla se o componente vai exibir um loading quando estiver fazendo fetch dos dados.
143
+ default: true
144
+ type: Boolean
145
+
146
+
141
147
  use-notify-success:
142
148
  desc: Controla se vai ter ou não notificação de sucesso ao finalizar o submit.
143
149
  default: true
@@ -28,9 +28,8 @@ export default function useDelete ({ props, destroyFn, emit }) {
28
28
 
29
29
  const defaultDialogProps = computed(() => {
30
30
  return {
31
- card: {
32
- description: 'Tem certeza que deseja excluir este item?'
33
- },
31
+ title: 'Excluir',
32
+ description: 'Tem certeza que deseja excluir este item?',
34
33
 
35
34
  ok: {
36
35
  label: 'Excluir',
@@ -1,12 +1,6 @@
1
1
  <template>
2
2
  <div class="pv-gallery-carousel-dialog">
3
- <qas-dialog v-model="model" :cancel="false" class="q-pa-xl" max-width="1100px" :ok="false" :persistent="false" use-full-max-width>
4
- <template #header>
5
- <div class="text-right">
6
- <qas-btn v-close-popup color="grey-10" icon="sym_r_close" variant="tertiary" @click="close" />
7
- </div>
8
- </template>
9
-
3
+ <qas-dialog v-model="model" v-bind="dialogProps">
10
4
  <template #description>
11
5
  <q-carousel v-model="imageIndexModel" animated :arrows="!screen.isSmall" class="pv-gallery-carousel-dialog__carousel" control-text-color="primary" data-cy="gallery-carousel" :fullscreen="screen.isSmall" :height="carouselImageHeight" next-icon="sym_r_chevron_right" prev-icon="sym_r_chevron_left" swipeable :thumbnails="!isSingleImage">
12
6
  <q-carousel-slide v-for="(image, index) in props.images" :key="index" class="bg-no-repeat bg-size-contain" :data-cy="`gallery-carousel-slide-${index}`" :img-src="image.url" :name="index">
@@ -52,6 +46,13 @@ const screen = useScreen()
52
46
 
53
47
  const carouselImageHeight = 'calc((500/976) * 100vh)'
54
48
 
49
+ const dialogProps = {
50
+ cancel: false,
51
+ ok: false,
52
+ size: 'xl',
53
+ title: 'Galeria de imagens'
54
+ }
55
+
55
56
  const model = computed({
56
57
  get () {
57
58
  return props.modelValue
@@ -0,0 +1 @@
1
+ {"version":"4.0.18","results":[[":QasGridItem.test.js",{"duration":0,"failed":true}]]}
@@ -2,13 +2,23 @@
2
2
  <div v-if="hasHeaderContent" :class="containerClasses">
3
3
  <div v-if="hasLabelSection" class="full-width items-center justify-between no-wrap row" :class="labelSectionClasses">
4
4
  <div class="items-center overflow-hidden q-col-gutter-sm row">
5
- <slot name="label">
6
- <qas-label v-if="hasLabel" v-bind="defaultLabelProps" />
5
+ <div v-if="props.skeleton">
6
+ <qas-skeleton type="text" use-contrast width="200px" />
7
+ </div>
8
+
9
+ <slot v-else name="label">
10
+ <div v-if="hasLabel" class="items-center q-gutter-x-sm row">
11
+ <qas-label v-if="hasLabel" v-bind="defaultLabelProps" />
12
+
13
+ <qas-tip v-if="hasTip" v-bind="defaultTipProps" />
14
+ </div>
7
15
  </slot>
8
16
 
9
17
  <div v-if="hasBadges" class="col-auto items-center q-col-gutter-sm row">
10
- <div v-for="(badge, badgeIndex) in props.badges" :key="badgeIndex">
11
- <qas-badge v-bind="badge" />
18
+ <div v-for="(badge, badgeIndex) in normalizedBadges" :key="badgeIndex">
19
+ <qas-skeleton v-if="props.skeleton" type="QasBadge" />
20
+
21
+ <qas-badge v-else v-bind="badge" />
12
22
  </div>
13
23
  </div>
14
24
  </div>
@@ -21,14 +31,18 @@
21
31
  </div>
22
32
 
23
33
  <div v-if="hasDescriptionOrOnlyActionsSection" class="items-start no-wrap q-col-gutter-sm row" :class="descriptionSectionClasses">
24
- <div v-if="hasDescriptionSection" class="text-body1 text-grey-8">
25
- <slot name="description">
34
+ <div v-if="hasDescriptionSection" class="text-body1 text-grey-8" :class="descriptionClasses">
35
+ <qas-skeleton v-if="props.skeleton" max-width="400px" type="text" />
36
+
37
+ <slot v-else name="description">
26
38
  {{ props.description }}
27
39
  </slot>
28
40
  </div>
29
41
 
30
42
  <div v-if="!hasLabelSection" class="justify-end row text-right">
31
- <slot name="actions">
43
+ <qas-skeleton v-if="props.skeleton" type="QasBtn" />
44
+
45
+ <slot v-else name="actions">
32
46
  <component :is="actionsComponent.is" v-if="hasActionsComponent" v-bind="actionsComponent.props" />
33
47
  </slot>
34
48
  </div>
@@ -42,11 +56,13 @@ import QasBadge from '../badge/QasBadge.vue'
42
56
  import QasBtn from '../btn/QasBtn.vue'
43
57
  import QasActionsMenu from '../actions-menu/QasActionsMenu.vue'
44
58
  import QasFilters from '../filters/QasFilters.vue'
59
+ import QasSkeleton from '../skeleton/QasSkeleton.vue'
60
+ import QasTip from '../tip/QasTip.vue'
45
61
 
46
62
  import { Spacing } from '../../enums/Spacing'
47
63
  import { gutterValidator } from '../../helpers/private/gutter-validator'
48
64
 
49
- import { computed, useSlots } from 'vue'
65
+ import { computed, useSlots, provide } from 'vue'
50
66
 
51
67
  defineOptions({ name: 'QasHeader' })
52
68
 
@@ -57,7 +73,7 @@ const props = defineProps({
57
73
  },
58
74
 
59
75
  badges: {
60
- type: Array,
76
+ type: [Array, Object],
61
77
  default: () => []
62
78
  },
63
79
 
@@ -81,17 +97,29 @@ const props = defineProps({
81
97
  default: () => ({})
82
98
  },
83
99
 
100
+ skeleton: {
101
+ type: Boolean
102
+ },
103
+
84
104
  spacing: {
85
105
  default: Spacing.Md,
86
106
  type: String,
87
107
  validator: gutterValidator
88
108
  },
89
109
 
110
+ tipProps: {
111
+ type: Object,
112
+ default: () => ({})
113
+ },
114
+
90
115
  useEllipsis: {
91
116
  type: Boolean
92
117
  }
93
118
  })
94
119
 
120
+ // globals
121
+ provide('isHeader', true)
122
+
95
123
  const slots = useSlots()
96
124
 
97
125
  // computed
@@ -110,6 +138,17 @@ const descriptionSectionClasses = computed(() => {
110
138
  }
111
139
  })
112
140
 
141
+ /**
142
+ * É necessário adicionar full-width na descrição quando tem skeleton pois o skeleton
143
+ * precisa ter max-width, e para width funcionar corretamente, o pai precisa ser full-width.
144
+ * Se sempre deixar como full-width, quebra layout quando tem descrição com ação sem label.
145
+ */
146
+ const descriptionClasses = computed(() => {
147
+ return {
148
+ 'full-width': props.skeleton
149
+ }
150
+ })
151
+
113
152
  const defaultLabelProps = computed(() => {
114
153
  return {
115
154
  class: {
@@ -121,11 +160,21 @@ const defaultLabelProps = computed(() => {
121
160
  }
122
161
  })
123
162
 
163
+ const hasTip = computed(() => !!Object.keys(props.tipProps).length)
164
+
165
+ const defaultTipProps = computed(() => {
166
+ return {
167
+ size: '20px',
168
+ ...props.tipProps
169
+ }
170
+ })
171
+
124
172
  const actionsComponent = computed(() => {
125
173
  const component = {
126
174
  [hasDefaultButton.value]: {
127
175
  is: QasBtn,
128
176
  props: {
177
+ skeleton: props.skeleton,
129
178
  ...props.buttonProps,
130
179
  useLabelOnSmallScreen: false
131
180
  }
@@ -133,12 +182,16 @@ const actionsComponent = computed(() => {
133
182
 
134
183
  [hasDefaultActionsMenu.value]: {
135
184
  is: QasActionsMenu,
136
- props: props.actionsMenuProps
185
+ props: {
186
+ skeleton: props.skeleton,
187
+ ...props.actionsMenuProps
188
+ }
137
189
  },
138
190
 
139
191
  [hasDefaultFilters.value]: {
140
192
  is: QasFilters,
141
193
  props: {
194
+ skeleton: props.skeleton,
142
195
  useSearch: false,
143
196
  useChip: false,
144
197
  useSpacing: false,
@@ -150,13 +203,15 @@ const actionsComponent = computed(() => {
150
203
  return component.true
151
204
  })
152
205
 
206
+ const normalizedBadges = computed(() => Array.isArray(props.badges) ? props.badges : [props.badges])
207
+
153
208
  const hasActionsComponent = computed(() => {
154
209
  return hasDefaultButton.value || hasDefaultActionsMenu.value || hasDefaultFilters.value
155
210
  })
156
211
 
157
212
  const hasActionsSection = computed(() => !!slots.actions || hasActionsComponent.value)
158
213
 
159
- const hasBadges = computed(() => !!props.badges.length)
214
+ const hasBadges = computed(() => !!normalizedBadges.value.length)
160
215
  const hasLabel = computed(() => !!Object.keys(props.labelProps).length)
161
216
  const hasDefaultButton = computed(() => !!Object.keys(props.buttonProps).length)
162
217
  const hasDefaultFilters = computed(() => !!Object.keys(props.filtersProps).length)
@@ -12,7 +12,7 @@ props:
12
12
  badges:
13
13
  desc: Adiciona badges ao lado do titulo (QasLabel), caso não tenha titulo fica somente as bages acima da descrição.
14
14
  default: []
15
- type: Array
15
+ type: [Array, Object]
16
16
 
17
17
  button-props:
18
18
  desc: Propriedades do QasBtn.
@@ -33,17 +33,32 @@ props:
33
33
  type: Object
34
34
  default: {}
35
35
 
36
+ skeleton:
37
+ desc: Exibe um esqueleto de carregamento no lugar do conteúdo.
38
+ default: false
39
+ type: Boolean
40
+
36
41
  spacing:
37
42
  desc: Espaçamento entre o componente e o conteúdo abaixo.
38
43
  default: xl
39
44
  type: String
40
45
  examples: [none, xs, sm, md, lg, xl, '2xl', '3xl', '4xl', '5xl']
41
46
 
47
+ tip-props:
48
+ desc: Propriedades repassadas para o componente do QasTip ficando ao lado do título (label).
49
+ type: Object
50
+ default: {}
51
+
42
52
  use-ellipsis:
43
53
  desc: Adiciona ellipsis ao título (label).
44
54
  type: Boolean
45
55
  default: false
46
56
 
57
+ provide:
58
+ is-header:
59
+ desc: Identificador booleano que indica quando um componente está dentro do contexto de um QasHeader.
60
+ type: Boolean
61
+
47
62
  slots:
48
63
  actions:
49
64
  desc: slot para acessar seção da direita (ações).
@@ -25,7 +25,7 @@
25
25
  import QasEmptyResultText from '../empty-result-text/QasEmptyResultText.vue'
26
26
 
27
27
  import { ref, computed, inject, nextTick } from 'vue'
28
- import { NotifyError } from '../../plugins'
28
+ import NotifyError from '../../plugins/notify-error/NotifyError.js'
29
29
 
30
30
  defineOptions({ name: 'QasInfiniteScroll' })
31
31
 
@@ -1,6 +1,8 @@
1
1
  <template>
2
2
  <component :is="props.typography" class="qas-label" :class="classes">
3
- <slot :label-with-suffix="formattedLabel">{{ formattedLabel }}</slot>
3
+ <slot :label-with-suffix="formattedLabel">
4
+ {{ formattedLabel }}
5
+ </slot>
4
6
  </component>
5
7
  </template>
6
8
 
@@ -11,7 +11,7 @@
11
11
  <slot>
12
12
  <q-page-container>
13
13
  <q-page>
14
- <router-view />
14
+ <router-view :route="overlayBackgroundRoute" />
15
15
  </q-page>
16
16
  </q-page-container>
17
17
  </slot>
@@ -34,6 +34,7 @@ import useScreen from '../../composables/use-screen'
34
34
  import useNotifications from '../../composables/use-notifications'
35
35
 
36
36
  import { computed, ref, watch } from 'vue'
37
+ import { useRoute } from 'vue-router'
37
38
 
38
39
  defineOptions({ name: 'QasLayout' })
39
40
 
@@ -68,10 +69,24 @@ const screen = useScreen()
68
69
 
69
70
  const { isNotificationsEnabled, setUnreadNotificationsCount } = useNotifications()
70
71
 
72
+ const route = useRoute()
73
+
71
74
  const menuDrawer = ref(false)
72
75
  const notificationsDrawer = ref(false)
73
76
 
74
77
  // computed
78
+
79
+ /**
80
+ * Sempre fornece uma rota para o <router-view>. Quando o overlay está ativo,
81
+ * usa a rota resolvida do background; sem overlay, usa a rota atual.
82
+ * Isso evita alternância entre `undefined` e objeto de rota, reduzindo remounts.
83
+ */
84
+ const overlayBackgroundRoute = computed(() => {
85
+ return route.query?.overlay === 'true'
86
+ ? route.meta.overlayBackgroundResolvedRoute
87
+ : route
88
+ })
89
+
75
90
  const defaultAppMenuProps = computed(() => {
76
91
  return {
77
92
  ...props.appBarProps,
@@ -91,7 +91,8 @@ const model = computed({
91
91
  const drawerProps = computed(() => {
92
92
  return {
93
93
  loading: isMarkingNotificationsAsRead.value,
94
- title: 'Notificações'
94
+ title: 'Notificações',
95
+ size: 'md'
95
96
  }
96
97
  })
97
98
 
@@ -17,7 +17,9 @@
17
17
  </template>
18
18
 
19
19
  <template #default>
20
- <router-view name="overlay" />
20
+ <div class="pv-layout-overlay-drawer__content">
21
+ <router-view name="overlay" />
22
+ </div>
21
23
  </template>
22
24
  </qas-drawer>
23
25
  </template>
@@ -60,8 +62,8 @@ const isForwardButtonDisabled = computed(() => !hasNextRoute.value || isDisabled
60
62
  const drawerProps = computed(() => {
61
63
  return {
62
64
  position: 'right',
63
- maxWidth: '90%',
64
65
  dialogProps: {
66
+ class: 'pv-layout-overlay-drawer',
65
67
  onHide: closeOverlay,
66
68
  noRouteDismiss: true,
67
69
  persistent: isDisabled.value