@bildvitta/quasar-ui-asteroid 3.6.0-beta.0 → 3.6.0-beta.2

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 (53) hide show
  1. package/package.json +3 -3
  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 +1 -1
  10. package/src/components/badge/QasBadge.vue +7 -1
  11. package/src/components/btn/QasBtn.vue +87 -2
  12. package/src/components/btn/QasBtn.yml +18 -0
  13. package/src/components/card/QasCard.vue +1 -1
  14. package/src/components/copy/QasCopy.vue +1 -6
  15. package/src/components/copy/QasCopy.yml +0 -6
  16. package/src/components/date-time-input/QasDateTimeInput.vue +2 -2
  17. package/src/components/delete/QasDelete.vue +14 -1
  18. package/src/components/dialog/QasDialog.vue +4 -4
  19. package/src/components/filters/QasFilters.vue +5 -5
  20. package/src/components/form-view/QasFormView.vue +22 -20
  21. package/src/components/gallery/QasGallery.vue +2 -4
  22. package/src/components/gallery/private/PvGalleryCarouselDialog.vue +33 -16
  23. package/src/components/list-items/QasListItems.vue +4 -6
  24. package/src/components/list-items/QasListItems.yml +4 -4
  25. package/src/components/list-view/QasListView.vue +1 -1
  26. package/src/components/nested-fields/QasNestedFields.vue +9 -10
  27. package/src/components/pagination/QasPagination.vue +36 -3
  28. package/src/components/search-box/QasSearchBox.vue +2 -2
  29. package/src/components/select-list/QasSelectList.vue +3 -6
  30. package/src/components/signature-pad/QasSignaturePad.vue +1 -1
  31. package/src/components/signature-uploader/QasSignatureUploader.vue +1 -1
  32. package/src/components/text-truncate/QasTextTruncate.vue +8 -1
  33. package/src/components/transfer/QasTransfer.vue +2 -2
  34. package/src/components/tree-generator/QasTreeGenerator.vue +2 -1
  35. package/src/components/uploader/QasUploader.vue +7 -5
  36. package/src/components/welcome/QasWelcome.vue +2 -2
  37. package/src/css/components/button.scss +101 -0
  38. package/src/css/components/index.scss +1 -0
  39. package/src/css/mixins/index.scss +1 -0
  40. package/src/css/mixins/set-button.scss +16 -0
  41. package/src/css/plugins/notify.scss +21 -0
  42. package/src/css/variables/button.scss +2 -1
  43. package/src/css/variables/spacing.scss +40 -27
  44. package/src/mixins/view.js +1 -1
  45. package/src/pages/ErrorComponent.vue +33 -14
  46. package/src/pages/Forbidden.vue +2 -1
  47. package/src/pages/NotFound.vue +2 -1
  48. package/src/pages/ServerError.vue +6 -2
  49. package/src/pages/Unauthorized.vue +3 -2
  50. package/src/plugins/notify-error/NotifyError.js +2 -1
  51. package/src/plugins/notify-success/NotifySuccess.js +2 -1
  52. package/src/vue-plugin.js +2 -2
  53. package/src/assets/gear.svg +0 -27
@@ -8,13 +8,13 @@
8
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
9
  <template #prepend>
10
10
  <q-icon v-if="useSearchOnType" color="grey-8" name="sym_r_search" />
11
- <qas-btn v-else color="grey-9" flat icon="sym_r_search" padding="0" @click="filter()" />
11
+ <qas-btn v-else color="grey-9" icon="sym_r_search" variant="tertiary" @click="filter()" />
12
12
  </template>
13
13
 
14
14
  <template #append>
15
- <qas-btn v-if="hasSearch" class="q-mr-sm" color="grey-9" flat icon="sym_r_clear" padding="0" size="sm" @click="clearSearch" />
15
+ <qas-btn v-if="hasSearch" class="q-mr-sm" color="grey-9" icon="sym_r_clear" variant="tertiary" @click="clearSearch" />
16
16
 
17
- <qas-btn v-if="useFilterButton" :color="filterButtonColor" data-cy="filters-btn" flat icon="sym_r_tune" padding="0">
17
+ <qas-btn v-if="useFilterButton" :color="filterButtonColor" data-cy="filters-btn" icon="sym_r_tune" variant="tertiary">
18
18
  <q-menu anchor="center right" class="full-width" max-width="270px" self="top right">
19
19
  <div v-if="isFetching" class="q-pa-xl text-center">
20
20
  <q-spinner color="grey" size="2em" />
@@ -31,11 +31,11 @@
31
31
 
32
32
  <div class="q-col-gutter-x-md q-mt-xl row">
33
33
  <div class="col-6">
34
- <qas-btn class="full-width" data-cy="filters-clear-btn" label="Limpar" outline size="12px" @click="clearFilters" />
34
+ <qas-btn class="full-width" data-cy="filters-clear-btn" label="Limpar" variant="secondary" @click="clearFilters" />
35
35
  </div>
36
36
 
37
37
  <div class="col-6">
38
- <qas-btn class="full-width" color="primary" data-cy="filters-submit-btn" label="Filtrar" size="12px" type="submit" />
38
+ <qas-btn class="full-width" data-cy="filters-submit-btn" label="Filtrar" type="submit" variant="primary" />
39
39
  </div>
40
40
  </div>
41
41
  </q-form>
@@ -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
 
@@ -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
 
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div ref="signatureContainer" class="qas-signature-pad relative-position">
3
3
  <canvas :id="canvasId" :ref="$attrs.ref" class="qas-signature-pad__canvas rounded-borders vertical-bottom" :height="height" />
4
- <qas-btn v-if="!empty" class="absolute-bottom-right q-mb-sm q-mr-sm" color="primary" dense icon="sym_r_delete" round @click="clearSignature" />
4
+ <qas-btn v-if="!empty" class="absolute-bottom-right q-mb-sm q-mr-sm" icon="sym_r_delete" variant="primary" @click="clearSignature" />
5
5
  </div>
6
6
 
7
7
  <div>
@@ -7,7 +7,7 @@
7
7
  <div v-if="uploadLabel" class="q-uploader__title">{{ uploadLabel }}</div>
8
8
  </div>
9
9
 
10
- <qas-btn v-if="!readonly" color="white" dense flat icon="sym_r_add" round @click="openDialog" />
10
+ <qas-btn v-if="!readonly" color="white" icon="sym_r_add" :use-hover-on-white-color="false" variant="tertiary" @click="openDialog" />
11
11
 
12
12
  <qas-btn ref="forceUpload" class="hidden" @click="upload(scope)" />
13
13
  <qas-btn ref="buttonCleanFiles" class="hidden" @click="scope.removeUploadedFiles" />
@@ -58,11 +58,16 @@ export default {
58
58
  maxPossibleWidth: '',
59
59
  showDialog: false,
60
60
  textWidth: '',
61
+ textContent: '',
61
62
  observer: null
62
63
  }
63
64
  },
64
65
 
65
66
  computed: {
67
+ description () {
68
+ return this.text || this.textContent
69
+ },
70
+
66
71
  truncateTextClass () {
67
72
  return (this.isTruncated || this.$qas.screen.isSmall) && 'ellipsis q-pr-sm'
68
73
  },
@@ -82,7 +87,7 @@ export default {
82
87
  ...this.dialogProps,
83
88
  card: {
84
89
  title: this.dialogTitle,
85
- description: this.text
90
+ description: this.description
86
91
  }
87
92
  }
88
93
  }
@@ -107,6 +112,8 @@ export default {
107
112
  truncateText () {
108
113
  this.$refs.parent.style.maxWidth = '100%'
109
114
  this.textWidth = this.$refs.truncate.clientWidth
115
+ this.textContent = this.$refs.truncate?.innerHTML
116
+
110
117
  this.maxPossibleWidth = this.maxWidth || this.$refs.truncate.parentElement.clientWidth * 0.90
111
118
  this.$refs.parent.style.maxWidth = `${this.maxPossibleWidth}px`
112
119
  },
@@ -19,12 +19,12 @@
19
19
 
20
20
  <div class="col-12 col-sm-auto items-center justify-center q-col-gutter-md row" :class="actionsClass">
21
21
  <div>
22
- <qas-btn :class="iconClass" dense :disabled="!firstQueue.length" flat icon="sym_r_arrow_circle_down" rounded @click="setSelectedFromClick(true)" />
22
+ <qas-btn :class="iconClass" color="primary" :disabled="!firstQueue.length" icon="sym_r_arrow_circle_down" variant="tertiary" @click="setSelectedFromClick(true)" />
23
23
  <q-tooltip anchor="top middle" self="center middle">Selecionar</q-tooltip>
24
24
  </div>
25
25
  <div>
26
26
  <div>
27
- <qas-btn :class="iconClass" dense :disabled="!secondQueue.length" flat icon="sym_r_arrow_circle_up" rounded @click="setSelectedFromClick()" />
27
+ <qas-btn :class="iconClass" color="primary" :disabled="!secondQueue.length" icon="sym_r_arrow_circle_up" variant="tertiary" @click="setSelectedFromClick()" />
28
28
  <q-tooltip anchor="bottom middle" self="center middle">Remover</q-tooltip>
29
29
  </div>
30
30
  </div>
@@ -8,7 +8,8 @@
8
8
  </span>
9
9
 
10
10
  <span v-if="hasMenuButton(node)" class="q-ml-sm">
11
- <qas-btn dense flat icon="sym_r_more_vert" round @click.stop>
11
+ <!-- TODO: rever para o uso QasActionsMenu -->
12
+ <qas-btn color="grey-9" icon="sym_r_more_vert" variant="tertiary" @click.stop>
12
13
  <q-menu auto-close>
13
14
  <q-list separator>
14
15
  <q-item v-if="useAddButton" v-ripple class="qas-tree-generator__item" clickable @click="handleTreeFormDialog(node, true, tree)">
@@ -13,13 +13,15 @@
13
13
  </div>
14
14
  </div>
15
15
 
16
- <qas-btn v-if="showAddFile" ref="buttonUpload" color="white" dense flat icon="sym_r_add" round @click="$refs.hiddenInput.click()" />
16
+ <qas-btn v-if="showAddFile" ref="buttonUpload" color="white" icon="sym_r_add" :use-hover-on-white-color="false" variant="tertiary" @click="$refs.hiddenInput.click()" />
17
17
 
18
18
  <input ref="hiddenInput" :accept="attributes.accept" class="qas-uploader__input" :multiple="isMultiple" type="file">
19
19
 
20
- <qas-btn ref="buttonCleanFiles" class="hidden" color="white" @click="scope.removeUploadedFiles" />
21
- <qas-btn v-if="scope.canUpload" color="white" dense flat icon="sym_r_cloud_upload" round @click="scope.upload" />
22
- <qas-btn v-if="scope.isUploading" color="white" dense flat icon="sym_r_clear" round @click="scope.abort" />
20
+ <qas-btn ref="buttonCleanFiles" class="hidden" @click="scope.removeUploadedFiles" />
21
+
22
+ <qas-btn v-if="scope.canUpload" color="white" icon="sym_r_cloud_upload" :use-hover-on-white-color="false" variant="tertiary" @click="scope.upload" />
23
+
24
+ <qas-btn v-if="scope.isUploading" color="white" icon="sym_r_clear" :use-hover-on-white-color="false" variant="tertiary" @click="scope.abort" />
23
25
  </div>
24
26
  </slot>
25
27
  </template>
@@ -37,7 +39,7 @@
37
39
  </div>
38
40
  <div class="items-center q-ml-sm row">
39
41
  <q-icon v-if="file.isFailed" color="negative" name="sym_r_warning" size="20px" />
40
- <qas-btn v-if="!scope.readonly" dense flat icon="sym_r_delete" round @click="removeItem(index, scope, file)" />
42
+ <qas-btn v-if="!scope.readonly" color="grey-9" icon="sym_r_delete" variant="tertiary" @click="removeItem(index, scope, file)" />
41
43
  </div>
42
44
  </div>
43
45
  </div>
@@ -53,12 +53,12 @@ export default {
53
53
  },
54
54
 
55
55
  currentDay () {
56
- const timeStamp = Date.now()
56
+ const timestamp = Date.now()
57
57
  const { daysList, monthsList } = dateConfig
58
58
 
59
59
  // exemplo: Quarta-feira, 11 de janeiro de 2023
60
60
  return date.formatDate(
61
- timeStamp, 'dddd, DDD [de] MMMM [de] YYYY', { days: daysList, months: monthsList }
61
+ timestamp, 'dddd, D [de] MMMM [de] YYYY', { days: daysList, months: monthsList }
62
62
  )
63
63
  },
64
64
 
@@ -0,0 +1,101 @@
1
+ .qas-btn {
2
+ $root: &;
3
+
4
+ min-height: 48px !important;
5
+ padding: var(--qas-spacing-xs) var(--qas-spacing-lg) !important;
6
+ text-transform: initial !important;
7
+ transition: color var(--qas-generic-transition), background-color var(--qas-generic-transition);
8
+
9
+ .q-icon {
10
+ font-size: 24px !important;
11
+ }
12
+
13
+ &:disabled {
14
+ opacity: 1 !important;
15
+ }
16
+
17
+ &:not(&--primary):not(:disabled):not(&--no-hover-on-white.qas-btn--tertiary-white):hover {
18
+ color: var(--q-primary-contrast) !important;
19
+ }
20
+
21
+ &--primary {
22
+ background-color: var(--q-primary) !important;
23
+ color: white !important;
24
+
25
+ &:disabled {
26
+ background-color: $grey-4 !important;
27
+ color: $grey-8 !important;
28
+ }
29
+
30
+ &:not(:disabled):hover {
31
+ background-color: var(--q-primary-contrast) !important;
32
+ }
33
+ }
34
+
35
+ &--secondary {
36
+ border: 1px solid currentColor !important;
37
+ color: var(--q-primary) !important;
38
+ position: relative;
39
+
40
+ &:disabled {
41
+ color: $grey-8 !important;
42
+ }
43
+ }
44
+
45
+ &--primary,
46
+ &--secondary {
47
+ &-icon-only {
48
+ height: 48px !important;
49
+ min-width: auto !important;
50
+ padding: 0 !important;
51
+ width: 48px !important;
52
+ }
53
+ }
54
+
55
+ &--tertiary {
56
+ min-height: 24px !important;
57
+ padding: 0 !important;
58
+
59
+ &:disabled {
60
+ color: $grey-8 !important;
61
+ }
62
+
63
+ &-grey-9 {
64
+ color: $grey-9 !important;
65
+ }
66
+
67
+ &-primary {
68
+ color: var(--q-primary) !important;
69
+ }
70
+
71
+ &-white {
72
+ color: white !important;
73
+ }
74
+
75
+ &-icon-only {
76
+ height: 24px !important;
77
+ min-width: auto !important;
78
+ padding: 0 !important;
79
+ width: 24px !important;
80
+ }
81
+ }
82
+
83
+ &.q-btn {
84
+ &::before {
85
+ display: none;
86
+ }
87
+ }
88
+
89
+ .q-icon.on-left {
90
+ margin-right: var(--qas-spacing-xs);
91
+ }
92
+
93
+ .q-icon.on-right {
94
+ margin-left: var(--qas-spacing-xs);
95
+ }
96
+
97
+ .q-ripple,
98
+ .q-focus-helper {
99
+ display: none;
100
+ }
101
+ }
@@ -1,4 +1,5 @@
1
1
  @import './base';
2
+ @import './button';
2
3
  @import './field';
3
4
  @import './item';
4
5
  @import './radio';
@@ -1,2 +1,3 @@
1
+ @import './set-button';
1
2
  @import './set-brand';
2
3
  @import './set-typography';
@@ -0,0 +1,16 @@
1
+ @mixin set-button($variant, $icon-only: false, $no-hover-on-white: false, $color: false) {
2
+ @extend .qas-btn;
3
+ @extend .qas-btn--#{$variant};
4
+
5
+ @if $variant == tertiary and $color {
6
+ @extend .qas-btn--tertiary-#{$color};
7
+ }
8
+
9
+ @if $icon-only {
10
+ @extend .qas-btn--#{$variant}-icon-only;
11
+ }
12
+
13
+ @if $no-hover-on-white {
14
+ @extend .qas-btn--no-hover-on-white;
15
+ }
16
+ }