@bildvitta/quasar-ui-asteroid 3.5.0 → 3.6.0-beta.1

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 (61) hide show
  1. package/package.json +1 -1
  2. package/src/assets/big-shoes-hero.svg +1 -0
  3. package/src/assets/big-shoes-sitting-on-rock.svg +1 -0
  4. package/src/assets/big-shoes-walking-the-dog.svg +1 -0
  5. package/src/components/actions/QasActions.vue +1 -1
  6. package/src/components/actions-menu/QasActionsMenu.vue +5 -3
  7. package/src/components/alert/QasAlert.vue +1 -1
  8. package/src/components/app-bar/QasAppBar.vue +1 -1
  9. package/src/components/app-menu/QasAppMenu.vue +2 -2
  10. package/src/components/badge/QasBadge.vue +40 -0
  11. package/src/components/badge/QasBadge.yml +28 -0
  12. package/src/components/btn/QasBtn.vue +87 -2
  13. package/src/components/btn/QasBtn.yml +18 -0
  14. package/src/components/card/QasCard.vue +1 -1
  15. package/src/components/copy/QasCopy.vue +1 -6
  16. package/src/components/copy/QasCopy.yml +0 -6
  17. package/src/components/date-time-input/QasDateTimeInput.vue +27 -6
  18. package/src/components/delete/QasDelete.vue +14 -1
  19. package/src/components/dialog/QasDialog.vue +4 -4
  20. package/src/components/filters/QasFilters.vue +80 -65
  21. package/src/components/form-view/QasFormView.vue +22 -20
  22. package/src/components/gallery/QasGallery.vue +2 -4
  23. package/src/components/gallery/private/PvGalleryCarouselDialog.vue +33 -16
  24. package/src/components/list-items/QasListItems.vue +4 -6
  25. package/src/components/list-items/QasListItems.yml +4 -4
  26. package/src/components/list-view/QasListView.vue +1 -1
  27. package/src/components/nested-fields/QasNestedFields.vue +9 -10
  28. package/src/components/pagination/QasPagination.vue +36 -3
  29. package/src/components/search-box/QasSearchBox.vue +2 -3
  30. package/src/components/search-box/QasSearchBox.yml +1 -1
  31. package/src/components/select/QasSelect.vue +0 -1
  32. package/src/components/select/QasSelect.yml +1 -1
  33. package/src/components/select-list/QasSelectList.vue +3 -6
  34. package/src/components/signature-pad/QasSignaturePad.vue +1 -1
  35. package/src/components/signature-uploader/QasSignatureUploader.vue +1 -1
  36. package/src/components/{tabs-generator/private/PvTabsGeneratorStatus.vue → status/QasStatus.vue} +4 -4
  37. package/src/components/status/QasStatus.yml +10 -0
  38. package/src/components/tabs-generator/QasTabsGenerator.vue +3 -3
  39. package/src/components/text-truncate/QasTextTruncate.vue +32 -10
  40. package/src/components/transfer/QasTransfer.vue +2 -2
  41. package/src/components/tree-generator/QasTreeGenerator.vue +2 -1
  42. package/src/components/uploader/QasUploader.vue +7 -5
  43. package/src/css/components/button.scss +101 -0
  44. package/src/css/components/index.scss +1 -0
  45. package/src/css/mixins/index.scss +1 -0
  46. package/src/css/mixins/set-button.scss +16 -0
  47. package/src/css/plugins/notify.scss +21 -0
  48. package/src/css/variables/button.scss +2 -1
  49. package/src/css/variables/spacing.scss +40 -27
  50. package/src/css/variables/typography.scss +11 -11
  51. package/src/index.scss +1 -1
  52. package/src/mixins/view.js +1 -1
  53. package/src/pages/ErrorComponent.vue +33 -14
  54. package/src/pages/Forbidden.vue +2 -1
  55. package/src/pages/NotFound.vue +2 -1
  56. package/src/pages/ServerError.vue +6 -2
  57. package/src/pages/Unauthorized.vue +3 -2
  58. package/src/plugins/notify-error/NotifyError.js +2 -1
  59. package/src/plugins/notify-success/NotifySuccess.js +2 -1
  60. package/src/vue-plugin.js +6 -0
  61. package/src/assets/gear.svg +0 -27
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <component v-bind="$attrs" :is="tag" @click.stop="openConfirmDialog">
2
+ <component v-bind="attributes" :is="tag" @click.stop="openConfirmDialog">
3
3
  <template v-for="(_, name) in $slots" #[name]="context">
4
4
  <slot :name="name" v-bind="context || {}" />
5
5
  </template>
@@ -25,6 +25,8 @@ export default {
25
25
  QasDialog
26
26
  },
27
27
 
28
+ inheritAttrs: false,
29
+
28
30
  props: {
29
31
  customId: {
30
32
  default: '',
@@ -74,6 +76,13 @@ export default {
74
76
  },
75
77
 
76
78
  computed: {
79
+ attributes () {
80
+ return {
81
+ ...this.$attrs,
82
+ color: this.isButton ? 'grey-9' : this.$attrs.color
83
+ }
84
+ },
85
+
77
86
  defaultDialogProps () {
78
87
  return {
79
88
  card: {
@@ -98,6 +107,10 @@ export default {
98
107
  error: 'Não conseguimos excluir as informações. Por favor, tente novamente em alguns minutos.',
99
108
  success: 'Informações excluídas com sucesso.'
100
109
  }
110
+ },
111
+
112
+ isButton () {
113
+ return this.tag === 'qas-btn'
101
114
  }
102
115
  },
103
116
 
@@ -6,7 +6,7 @@
6
6
  <div class="items-center justify-between row">
7
7
  <h5 class="text-grey-9 text-h5">{{ card.title }}</h5>
8
8
 
9
- <qas-btn v-if="isInfoDialog" v-close-popup color="grey-9" dense flat icon="sym_r_close" rounded />
9
+ <qas-btn v-if="isInfoDialog" v-close-popup color="grey-9" icon="sym_r_close" variant="tertiary" />
10
10
  </div>
11
11
  </slot>
12
12
  </header>
@@ -19,15 +19,15 @@
19
19
  </component>
20
20
  </section>
21
21
 
22
- <footer v-if="!isInfoDialog" class="q-mt-xl">
22
+ <footer v-if="!isInfoDialog">
23
23
  <slot name="actions">
24
24
  <qas-actions v-bind="actionsProps" :use-equal-width="hasAllActions" :use-full-width="hasSingleAction">
25
25
  <template v-if="hasOk" #primary>
26
- <qas-btn v-close-popup="!useForm" class="full-width" v-bind="defaultOk" @click="submitHandler" />
26
+ <qas-btn v-close-popup="!useForm" class="full-width" variant="primary" v-bind="defaultOk" @click="submitHandler" />
27
27
  </template>
28
28
 
29
29
  <template v-if="hasCancel" #secondary>
30
- <qas-btn v-close-popup class="full-width" v-bind="defaultCancel" />
30
+ <qas-btn v-close-popup class="full-width" v-bind="defaultCancel" variant="secondary" />
31
31
  </template>
32
32
  </qas-actions>
33
33
  </slot>
@@ -4,44 +4,46 @@
4
4
  <div v-if="showSearch" class="col-12 col-md-6">
5
5
  <slot :filter="filter" name="search">
6
6
  <q-form v-if="useSearch" @submit.prevent="filter()">
7
- <qas-input v-model="search" class="bg-white q-px-sm qas-filters__input rounded-borders-sm shadow-2" data-cy="filters-search-input" :debounce="debounce" dense hide-bottom-space input-class="ellipsis text-grey-8" :outlined="false" :placeholder="searchPlaceholder" type="search">
8
- <template #prepend>
9
- <q-icon v-if="useSearchOnType" color="grey-8" name="sym_r_search" />
10
- <qas-btn v-else color="grey-9" flat icon="sym_r_search" padding="0" @click="filter()" />
11
- </template>
12
-
13
- <template #append>
14
- <qas-btn v-if="hasSearch" class="q-mr-sm" color="grey-9" flat icon="sym_r_clear" padding="0" size="sm" @click="clearSearch" />
15
-
16
- <qas-btn v-if="useFilterButton" :color="filterButtonColor" data-cy="filters-btn" flat icon="sym_r_tune" padding="0">
17
- <q-menu anchor="center right" class="full-width" max-width="270px" self="top right">
18
- <div v-if="isFetching" class="q-pa-xl text-center">
19
- <q-spinner color="grey" size="2em" />
20
- </div>
21
-
22
- <div v-else-if="hasFetchError" class="q-pa-xl text-center">
23
- <q-icon color="negative" name="sym_r_warning" size="2em" />
24
- </div>
25
-
26
- <q-form v-else class="q-gutter-y-md q-pa-md" @submit.prevent="filter()">
27
- <div v-for="(field, index) in fields" :key="index">
28
- <qas-field v-model="filters[field.name]" :data-cy="`filters-${field.name}-field`" :field="field" v-bind="fieldsProps[field.name]" />
7
+ <div class="qas-filters__input-content">
8
+ <qas-input v-model="search" class="bg-white q-px-sm rounded-borders-sm shadow-2" data-cy="filters-search-input" :debounce="debounce" dense hide-bottom-space input-class="ellipsis text-grey-8" :outlined="false" :placeholder="searchPlaceholder" type="search">
9
+ <template #prepend>
10
+ <q-icon v-if="useSearchOnType" color="grey-8" name="sym_r_search" />
11
+ <qas-btn v-else color="grey-9" icon="sym_r_search" variant="tertiary" @click="filter()" />
12
+ </template>
13
+
14
+ <template #append>
15
+ <qas-btn v-if="hasSearch" class="q-mr-sm" color="grey-9" icon="sym_r_clear" variant="tertiary" @click="clearSearch" />
16
+
17
+ <qas-btn v-if="useFilterButton" :color="filterButtonColor" data-cy="filters-btn" icon="sym_r_tune" variant="tertiary">
18
+ <q-menu anchor="center right" class="full-width" max-width="270px" self="top right">
19
+ <div v-if="isFetching" class="q-pa-xl text-center">
20
+ <q-spinner color="grey" size="2em" />
29
21
  </div>
30
22
 
31
- <div class="q-col-gutter-x-md q-mt-xl row">
32
- <div class="col-6">
33
- <qas-btn class="full-width" data-cy="filters-clear-btn" label="Limpar" outline size="12px" @click="clearFilters" />
23
+ <div v-else-if="hasFetchError" class="q-pa-xl text-center">
24
+ <q-icon color="negative" name="sym_r_warning" size="2em" />
25
+ </div>
26
+
27
+ <q-form v-else class="q-gutter-y-md q-pa-md" @submit.prevent="filter()">
28
+ <div v-for="(field, index) in fields" :key="index">
29
+ <qas-field v-model="filters[field.name]" :data-cy="`filters-${field.name}-field`" :field="field" v-bind="fieldsProps[field.name]" />
34
30
  </div>
35
31
 
36
- <div class="col-6">
37
- <qas-btn class="full-width" color="primary" data-cy="filters-submit-btn" label="Filtrar" size="12px" type="submit" />
32
+ <div class="q-col-gutter-x-md q-mt-xl row">
33
+ <div class="col-6">
34
+ <qas-btn class="full-width" data-cy="filters-clear-btn" label="Limpar" variant="secondary" @click="clearFilters" />
35
+ </div>
36
+
37
+ <div class="col-6">
38
+ <qas-btn class="full-width" data-cy="filters-submit-btn" label="Filtrar" type="submit" variant="primary" />
39
+ </div>
38
40
  </div>
39
- </div>
40
- </q-form>
41
- </q-menu>
42
- </qas-btn>
43
- </template>
44
- </qas-input>
41
+ </q-form>
42
+ </q-menu>
43
+ </qas-btn>
44
+ </template>
45
+ </qas-input>
46
+ </div>
45
47
  </q-form>
46
48
  </slot>
47
49
  </div>
@@ -225,6 +227,7 @@ export default {
225
227
  created () {
226
228
  this.fetchFilters()
227
229
  this.watchOnceFields()
230
+ this.handleSearchModelOnCreate()
228
231
  },
229
232
 
230
233
  methods: {
@@ -322,8 +325,9 @@ export default {
322
325
  },
323
326
 
324
327
  updateValues () {
325
- const { filters, search } = this.mx_context
326
- this.search = search || ''
328
+ this.setSearch()
329
+
330
+ const { filters } = this.mx_context
327
331
 
328
332
  for (const key in filters) {
329
333
  this.filters[key] = parseValue(this.normalizeValues(filters[key], this.fields[key]?.multiple))
@@ -343,6 +347,15 @@ export default {
343
347
  watchOnce()
344
348
  }
345
349
  })
350
+ },
351
+
352
+ handleSearchModelOnCreate () {
353
+ !this.useFilterButton && this.setSearch()
354
+ },
355
+
356
+ setSearch () {
357
+ const { search } = this.mx_context
358
+ this.search = search || ''
346
359
  }
347
360
  }
348
361
  }
@@ -351,41 +364,43 @@ export default {
351
364
  <style lang="scss">
352
365
  // TODO rever
353
366
  .qas-filters {
354
- .q-field::before {
355
- border: 2px solid transparent;
356
- border-radius: 4px;
357
- bottom: 0;
358
- content: '';
359
- left: 0;
360
- pointer-events: none;
361
- position: absolute;
362
- right: 0;
363
- top: 0;
364
- transition: border-color var(--qas-generic-transition);
365
- }
367
+ &__input-content {
368
+ .q-field {
369
+ &::before {
370
+ border: 2px solid transparent;
371
+ border-radius: var(--qas-generic-border-radius);
372
+ bottom: 0;
373
+ content: '';
374
+ left: 0;
375
+ pointer-events: none;
376
+ position: absolute;
377
+ right: 0;
378
+ top: 0;
379
+ transition: border-color var(--qas-generic-transition);
380
+ }
366
381
 
367
- .q-field--focused::before {
368
- border-color: var(--q-primary);
369
- color: var(--q-primary);
370
- }
382
+ &--dense .q-field__prepend {
383
+ padding-right: var(--qas-spacing-xs);
384
+ }
371
385
 
372
- .q-field--dense .q-field__prepend {
373
- padding-right: var(--qas-spacing-xs);
374
- }
386
+ &--dense .q-field__append {
387
+ padding-left: var(--qas-spacing-sm);
388
+ }
375
389
 
376
- .q-field--dense .q-field__append {
377
- padding-left: var(--qas-spacing-sm);
378
- }
390
+ &--focused::before {
391
+ border-color: var(--q-primary);
392
+ color: var(--q-primary);
393
+ }
379
394
 
380
- &__input {
381
- .q-field__control::before,
382
- .q-field__control::after {
383
- display: none;
384
- }
395
+ &__control::after,
396
+ &__control::before {
397
+ display: none !important;
398
+ }
385
399
 
386
- .q-field__native {
387
- padding-bottom: var(--qas-spacing-sm);
388
- padding-top: var(--qas-spacing-sm);
400
+ &__native {
401
+ padding-bottom: var(--qas-spacing-sm);
402
+ padding-top: var(--qas-spacing-sm);
403
+ }
389
404
  }
390
405
  }
391
406
  }
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <component :is="mx_componentTag" :class="mx_componentClass">
2
+ <component :is="mx_componentTag" class="qas-form-view" :class="mx_componentClass">
3
3
  <header v-if="mx_hasHeaderSlot">
4
4
  <slot name="header" />
5
5
  </header>
@@ -8,15 +8,15 @@
8
8
  <slot />
9
9
 
10
10
  <slot v-if="useActions" name="actions">
11
- <div class="justify-end q-col-gutter-md q-my-lg row">
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="isSubmitting" :label="cancelButtonLabel" outline type="button" @click="cancel" />
14
- </div>
15
-
16
- <div v-if="useSubmitButton" class="col-12 col-sm-2" :class="submitButtonClass">
17
- <qas-btn class="full-width" :data-cy="`btnSave-${entity}`" :disable="disable" :label="submitButtonLabel" :loading="isSubmitting" type="submit" />
18
- </div>
19
- </div>
11
+ <qas-actions>
12
+ <template #primary>
13
+ <qas-btn class="qas-form-view__btn" :data-cy="`btnSave-${entity}`" :disable="disable" :label="submitButtonLabel" :loading="isSubmitting" type="submit" variant="primary" />
14
+ </template>
15
+
16
+ <template #secondary>
17
+ <qas-btn v-close-popup class="qas-form-view__btn" :data-cy="`btnCancel-${entity}`" :disable="isSubmitting" :label="cancelButtonLabel" type="button" variant="secondary" @click="cancel" />
18
+ </template>
19
+ </qas-actions>
20
20
  </slot>
21
21
  </q-form>
22
22
 
@@ -161,10 +161,6 @@ export default {
161
161
  },
162
162
 
163
163
  computed: {
164
- cancelButtonClass () {
165
- return this.$qas.screen.isSmall && 'order-last'
166
- },
167
-
168
164
  fetchURL () {
169
165
  return this.url ? (`${this.url}/${this.isCreateMode ? 'new' : 'edit'}`) : ''
170
166
  },
@@ -189,13 +185,9 @@ export default {
189
185
  return this.$route
190
186
  },
191
187
 
192
- submitButtonClass () {
193
- return this.$qas.screen.isSmall && 'order-first'
194
- },
195
-
196
188
  defaultNotifyMessages () {
197
189
  return {
198
- validationError: 'Existem campos no formulário que ainda não foram preenchidos. Complete todas as informações para avançar.',
190
+ validationError: 'Não conseguimos salvar as informações. Por favor, revise os campos e tente novamente.',
199
191
  error: 'Não conseguimos salvar as informações. Por favor, tente novamente em alguns minutos.',
200
192
  success: 'Informações salvas com sucesso.'
201
193
  }
@@ -434,8 +426,9 @@ export default {
434
426
  } catch (error) {
435
427
  const errors = error?.response?.data?.errors
436
428
  const message = error?.response?.data?.status?.text
429
+ const hasFieldError = !!Object.keys(errors || {})?.length
437
430
 
438
- const defaultMessage = error
431
+ const defaultMessage = hasFieldError
439
432
  ? this.defaultNotifyMessages.validationError
440
433
  : this.defaultNotifyMessages.error
441
434
 
@@ -462,3 +455,12 @@ export default {
462
455
  }
463
456
  }
464
457
  </script>
458
+
459
+ <style lang="scss">
460
+ .qas-form-view {
461
+ &__btn {
462
+ min-width: 132px;
463
+ width: 100%;
464
+ }
465
+ }
466
+ </style>
@@ -13,9 +13,7 @@
13
13
 
14
14
  <div v-if="useDestroy">
15
15
  <slot :destroy="onDestroy" :image="image" :index="index" name="destroy">
16
- <qas-btn color="grey-9" dense :disabled="isDestroyDisabled(image)" flat round size="sm" @click="onDestroy(image, index)">
17
- <q-icon name="sym_r_delete" size="xs" />
18
- </qas-btn>
16
+ <qas-btn color="grey-9" :disabled="isDestroyDisabled(image)" icon="sym_r_delete" variant="tertiary" @click="onDestroy(image, index)" />
19
17
  </slot>
20
18
  </div>
21
19
  </div>
@@ -26,7 +24,7 @@
26
24
 
27
25
  <slot>
28
26
  <div v-if="!hideShowMore" class="full-width text-center">
29
- <qas-btn color="primary" data-cy="gallery-btn-show-more" flat :label="showMoreLabel" @click="showMore" />
27
+ <qas-btn color="primary" data-cy="gallery-btn-show-more" :label="showMoreLabel" variant="tertiary" @click="showMore" />
30
28
  </div>
31
29
  </slot>
32
30
 
@@ -1,21 +1,23 @@
1
1
  <template>
2
- <qas-dialog v-model="model" :cancel="false" class="q-pa-xl" max-width="1100px" :ok="false" :persistent="false" use-full-max-width>
3
- <template #header>
4
- <div class="text-right">
5
- <qas-btn v-close-popup dense flat icon="sym_r_close" rounded @click="close" />
6
- </div>
7
- </template>
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-9" icon="sym_r_close" variant="tertiary" @click="close" />
7
+ </div>
8
+ </template>
8
9
 
9
- <template #description>
10
- <q-carousel v-model="imageIndexModel" animated :arrows="!$qas.screen.isSmall" control-text-color="primary" data-cy="gallery-carousel" :fullscreen="$qas.screen.isSmall" :height="carouselImageHeight" next-icon="sym_r_chevron_right" prev-icon="sym_r_chevron_left" swipeable :thumbnails="!isSingleImage">
11
- <q-carousel-slide v-for="(image, index) in images" :key="index" class="bg-no-repeat bg-size-contain" :data-cy="`gallery-carousel-slide-${index}`" :img-src="image.url" :name="index">
12
- <div v-if="$qas.screen.isSmall" class="full-width justify-end row">
13
- <qas-btn dense flat icon="sym_r_close" @click="close" />
14
- </div>
15
- </q-carousel-slide>
16
- </q-carousel>
17
- </template>
18
- </qas-dialog>
10
+ <template #description>
11
+ <q-carousel v-model="imageIndexModel" animated :arrows="!$qas.screen.isSmall" class="pv-gallery-carousel-dialog__carousel" control-text-color="primary" data-cy="gallery-carousel" :fullscreen="$qas.screen.isSmall" :height="carouselImageHeight" next-icon="sym_r_chevron_right" prev-icon="sym_r_chevron_left" swipeable :thumbnails="!isSingleImage">
12
+ <q-carousel-slide v-for="(image, index) in images" :key="index" class="bg-no-repeat bg-size-contain" :data-cy="`gallery-carousel-slide-${index}`" :img-src="image.url" :name="index">
13
+ <div v-if="$qas.screen.isSmall" class="full-width justify-end row">
14
+ <qas-btn color="grey-9" icon="sym_r_close" variant="tertiary" @click="close" />
15
+ </div>
16
+ </q-carousel-slide>
17
+ </q-carousel>
18
+ </template>
19
+ </qas-dialog>
20
+ </div>
19
21
  </template>
20
22
 
21
23
  <script>
@@ -80,3 +82,18 @@ export default {
80
82
  }
81
83
  }
82
84
  </script>
85
+
86
+ <style lang="scss">
87
+ .pv-gallery-carousel-dialog {
88
+ // https://quasar.dev/style/sass-scss-variables#caveat: $
89
+
90
+ &__carousel .q-carousel__control .q-btn {
91
+ @include set-button(
92
+ tertiary,
93
+ true,
94
+ false,
95
+ primary
96
+ );
97
+ }
98
+ }
99
+ </style>
@@ -9,9 +9,7 @@
9
9
 
10
10
  <q-item-section v-if="useSectionActions" side>
11
11
  <slot :index="index" :item="item" name="item-section-side">
12
- <qas-btn flat round @click="onClick({ item, index })">
13
- <q-icon v-bind="iconProps" />
14
- </qas-btn>
12
+ <qas-btn color="primary" :icon="icon" variant="tertiary" @click="onClick({ item, index })" />
15
13
  </slot>
16
14
  </q-item-section>
17
15
  </slot>
@@ -33,9 +31,9 @@ export default {
33
31
  },
34
32
 
35
33
  props: {
36
- iconProps: {
37
- default: () => ({ color: 'primary', name: 'sym_r_chevron_right' }),
38
- type: Object
34
+ icon: {
35
+ type: String,
36
+ default: 'sym_r_chevron_right'
39
37
  },
40
38
 
41
39
  list: {
@@ -4,10 +4,10 @@ meta:
4
4
  desc: Componente para listagem.
5
5
 
6
6
  props:
7
- icon-props:
8
- desc: Props do [QIcon](https://quasar.dev/vue-components/icon#introduction)
9
- default: { color: 'primary', name: 'sym_r_chevron_right' }
10
- type: Object
7
+ icon:
8
+ desc: Nome do ícone
9
+ default: sym_r_chevron_right
10
+ type: String
11
11
 
12
12
  list:
13
13
  desc: Lista para ser selecionada.
@@ -26,7 +26,7 @@
26
26
  <q-spinner color="grey" size="3em" />
27
27
  </div>
28
28
 
29
- <div v-if="hasPages" class="flex items-center q-mt-sm" :class="paginationClasses">
29
+ <div v-if="hasPages" class="flex items-center q-mt-md" :class="paginationClasses">
30
30
  <qas-pagination v-model="page" :max="totalPages" @click="changePage" />
31
31
  </div>
32
32
 
@@ -9,7 +9,7 @@
9
9
  <div v-for="(row, index) in nested" :id="`row-${index}`" :key="`row-${index}`" class="full-width">
10
10
  <div v-if="!row[destroyKey]" :key="index" class="col-12 q-mt-md">
11
11
  <div>
12
- <div class="flex items-center justify-between q-py-xs">
12
+ <div class="flex items-center justify-between q-py-md">
13
13
  <qas-label v-if="!useSingleLabel" :label="getRowLabel(index)" />
14
14
  <qas-actions-menu v-if="hasBlockActions(row)" :list="getActionsList(index, row)" :use-label-on-small-screen="false" />
15
15
  </div>
@@ -39,7 +39,7 @@
39
39
  <div v-if="useAdd" class="q-mt-md">
40
40
  <slot :add="add" name="add-input">
41
41
  <div v-if="showAddFirstInputButton" class="text-left">
42
- <qas-btn class="q-px-sm" color="dark" flat @click="add()">{{ addFirstInputLabel }}</qas-btn>
42
+ <qas-btn class="q-px-sm" color="primary" variant="tertiary" @click="add()">{{ addFirstInputLabel }}</qas-btn>
43
43
  </div>
44
44
 
45
45
  <div v-else-if="useInlineActions" class="cursor-pointer items-center q-col-gutter-x-md q-mt-md row" @click="add()">
@@ -48,12 +48,12 @@
48
48
  </div>
49
49
 
50
50
  <div class="col-auto">
51
- <qas-btn color="dark" flat icon="sym_r_add_circle_outline" round />
51
+ <qas-btn color="primary" icon="sym_r_add_circle_outline" variant="tertiary" />
52
52
  </div>
53
53
  </div>
54
54
 
55
55
  <div v-else class="text-left">
56
- <qas-btn class="q-px-sm" color="dark" flat icon="sym_r_add" @click="add()">{{ addInputLabel }}</qas-btn>
56
+ <qas-btn class="q-px-sm" color="primary" icon="sym_r_add" :label="addInputLabel" variant="tertiary" @click="add()" />
57
57
  </div>
58
58
  </slot>
59
59
  </div>
@@ -106,10 +106,10 @@ export default {
106
106
  type: Object,
107
107
  default: () => {
108
108
  return {
109
- label: 'Excluir',
109
+ color: 'grey-9',
110
110
  icon: 'sym_r_delete',
111
- flat: true,
112
- dense: true
111
+ label: 'Excluir',
112
+ variant: 'tertiary'
113
113
  }
114
114
  }
115
115
  },
@@ -118,11 +118,10 @@ export default {
118
118
  type: Object,
119
119
  default: () => {
120
120
  return {
121
- label: 'Duplicar',
122
121
  icon: 'sym_r_content_copy',
123
- flat: true,
122
+ label: 'Duplicar',
124
123
  useLabelOnSmallScreen: false,
125
- dense: true
124
+ variant: 'tertiary'
126
125
  }
127
126
  }
128
127
  },
@@ -19,7 +19,7 @@ export default {
19
19
  directionLinks: true,
20
20
  iconNext: 'sym_r_chevron_right',
21
21
  iconPrev: 'sym_r_chevron_left',
22
- maxPages: modelValue < 3 ? 3 : 6,
22
+ maxPages: 3,
23
23
  modelValue,
24
24
 
25
25
  ...attributes
@@ -31,8 +31,41 @@ export default {
31
31
 
32
32
  <style lang="scss">
33
33
  .qas-pagination {
34
- .q-icon {
35
- color: $grey-9;
34
+ // https://quasar.dev/style/sass-scss-variables#caveat: $
35
+
36
+ .q-pagination__content .q-btn {
37
+ @include set-button(
38
+ tertiary,
39
+ true,
40
+ false,
41
+ grey-9
42
+ );
43
+
44
+ min-width: max-content !important;
45
+
46
+ &.text-primary {
47
+ color: var(--q-primary) !important;
48
+ }
49
+ }
50
+
51
+ .q-pagination__middle + .q-btn,
52
+ .q-btn + .q-pagination__middle,
53
+ .q-btn + .q-btn {
54
+ margin-left: var(--qas-spacing-md) !important;
55
+ }
56
+
57
+ .q-pagination__content > .q-btn,
58
+ .q-pagination__middle > .q-btn {
59
+ margin-left: 0;
60
+ margin-top: 0;
61
+ }
62
+
63
+ @media (max-width: $breakpoint-xs) {
64
+ .q-pagination__middle + .q-btn,
65
+ .q-btn + .q-pagination__middle,
66
+ .q-btn + .q-btn {
67
+ margin-left: var(--qas-spacing-sm) !important;
68
+ }
36
69
  }
37
70
  }
38
71
  </style>
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <qas-box>
3
3
  <qas-input v-bind="attributes" ref="search" v-model="mx_search">
4
- <template #append>
5
- <q-icon color="primary" name="sym_r_search" />
4
+ <template #prepend>
5
+ <q-icon color="grey-8" name="sym_r_search" />
6
6
  </template>
7
7
  </qas-input>
8
8
 
@@ -153,7 +153,6 @@ export default {
153
153
 
154
154
  defaultFuseOptions () {
155
155
  return {
156
- threshold: 0.1,
157
156
  ignoreLocation: true,
158
157
 
159
158
  ...this.fuseOptions
@@ -34,7 +34,7 @@ props:
34
34
  examples: ["{ keys: ['label'] }"]
35
35
  default:
36
36
  ignoreLocation: true
37
- threshold: 0.1
37
+ threshold: 0.6
38
38
 
39
39
  height:
40
40
  desc: Define altura do box quando a lista não está vazia.
@@ -105,7 +105,6 @@ export default {
105
105
  return {
106
106
  ignoreLocation: true,
107
107
  keys: ['label', 'value'],
108
- threshold: 0.1,
109
108
 
110
109
  ...this.fuseOptions
111
110
  }
@@ -27,7 +27,7 @@ props:
27
27
  default:
28
28
  ignoreLocation: true
29
29
  keys: [label, value]
30
- threshold: 0.1
30
+ threshold: 0.6
31
31
 
32
32
  label-key:
33
33
  desc: O componente internamente espera receber na propriedade "options" um array de objeto contendo "label" e "value", caso o seu objeto não tenha "label" mas um "name" por exemplo, você pode definir esta prop "label-key" como "name".
@@ -128,12 +128,9 @@ export default {
128
128
  const isSelected = this.values.includes(value)
129
129
 
130
130
  return {
131
- dense: this.$qas.screen.isSmall,
132
- useLabelOnSmallScreen: false,
133
- icon: !this.$qas.screen.isSmall ? undefined : isSelected ? 'sym_r_close' : 'sym_r_add',
134
- label: isSelected ? 'Remover' : 'Adicionar',
135
- outline: isSelected,
136
- size: 'sm'
131
+ variant: 'tertiary',
132
+ color: isSelected ? 'grey-9' : 'primary',
133
+ icon: isSelected ? 'sym_r_remove' : 'sym_r_add'
137
134
  }
138
135
  },
139
136