@bildvitta/quasar-ui-asteroid 3.0.0-beta.2 → 3.0.0-beta.20

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 (173) hide show
  1. package/dist/api/QasActionsMenu.json +15 -15
  2. package/dist/api/QasAppBar.json +4 -8
  3. package/dist/api/QasAppMenu.json +11 -7
  4. package/dist/api/QasBtn.json +8 -4
  5. package/dist/api/QasCard.json +17 -13
  6. package/dist/api/QasCheckboxGroup.json +8 -8
  7. package/dist/api/QasCopy.json +4 -4
  8. package/dist/api/QasDateTimeInput.json +16 -16
  9. package/dist/api/QasDelete.json +17 -17
  10. package/dist/api/QasDialog.json +24 -20
  11. package/dist/api/QasFilters.json +14 -14
  12. package/dist/api/QasFormGenerator.json +57 -26
  13. package/dist/api/QasFormView.json +115 -87
  14. package/dist/api/QasGallery.json +4 -4
  15. package/dist/api/QasGridGenerator.json +40 -39
  16. package/dist/api/QasInput.json +13 -13
  17. package/dist/api/QasListItems.json +18 -17
  18. package/dist/api/QasListView.json +67 -53
  19. package/dist/api/QasNestedFields.json +45 -35
  20. package/dist/api/QasNumericInput.json +31 -12
  21. package/dist/api/QasPageHeader.json +7 -7
  22. package/dist/api/QasPasswordInput.json +13 -13
  23. package/dist/api/QasPasswordStrengthChecker.json +12 -12
  24. package/dist/api/QasProfile.json +5 -5
  25. package/dist/api/QasResizer.json +11 -11
  26. package/dist/api/QasSearchBox.json +90 -8
  27. package/dist/api/QasSelect.json +92 -25
  28. package/dist/api/QasSelectList.json +16 -14
  29. package/dist/api/QasSignaturePad.json +1 -1
  30. package/dist/api/QasSignatureUploader.json +9 -9
  31. package/dist/api/QasSingleView.json +52 -43
  32. package/dist/api/QasSortable.json +20 -20
  33. package/dist/api/QasTableGenerator.json +5 -5
  34. package/dist/api/QasTabsGenerator.json +5 -2
  35. package/dist/api/QasTransfer.json +9 -9
  36. package/dist/api/QasUploader.json +22 -17
  37. package/dist/asteroid.cjs.css +1 -1
  38. package/dist/asteroid.cjs.js +3904 -3102
  39. package/dist/asteroid.cjs.min.js +2 -2
  40. package/dist/asteroid.esm.css +1 -1
  41. package/dist/asteroid.esm.js +3908 -3106
  42. package/dist/asteroid.esm.min.js +2 -2
  43. package/dist/asteroid.umd.css +1 -1
  44. package/dist/asteroid.umd.js +3907 -3106
  45. package/dist/asteroid.umd.min.js +2 -2
  46. package/dist/vetur/asteroid-attributes.json +387 -303
  47. package/dist/vetur/asteroid-tags.json +129 -108
  48. package/package.json +1 -1
  49. package/src/assets/gear.svg +27 -0
  50. package/src/components/actions/QasActions.vue +1 -5
  51. package/src/components/actions-menu/QasActionsMenu.vue +4 -10
  52. package/src/components/actions-menu/QasActionsMenu.yml +15 -15
  53. package/src/components/app-bar/QasAppBar.vue +18 -14
  54. package/src/components/app-bar/QasAppBar.yml +4 -8
  55. package/src/components/app-menu/QasAppMenu.vue +8 -7
  56. package/src/components/app-menu/QasAppMenu.yml +11 -7
  57. package/src/components/avatar/QasAvatar.vue +0 -4
  58. package/src/components/box/QasBox.vue +1 -1
  59. package/src/components/btn/QasBtn.vue +11 -15
  60. package/src/components/btn/QasBtn.yml +7 -3
  61. package/src/components/card/QasCard.vue +18 -9
  62. package/src/components/card/QasCard.yml +17 -13
  63. package/src/components/checkbox-group/QasCheckboxGroup.yml +9 -8
  64. package/src/components/copy/QasCopy.vue +1 -1
  65. package/src/components/copy/QasCopy.yml +4 -3
  66. package/src/components/date-time-input/QasDateTimeInput.vue +39 -41
  67. package/src/components/date-time-input/QasDateTimeInput.yml +16 -16
  68. package/src/components/delete/QasDelete.vue +15 -1
  69. package/src/components/delete/QasDelete.yml +15 -15
  70. package/src/components/dialog/QasDialog.vue +28 -9
  71. package/src/components/dialog/QasDialog.yml +22 -18
  72. package/src/components/dialog-router/QasDialogRouter.vue +1 -1
  73. package/src/components/field/QasField.vue +15 -14
  74. package/src/components/filters/QasFilters.vue +30 -13
  75. package/src/components/filters/QasFilters.yml +14 -14
  76. package/src/components/form-generator/QasFormGenerator.vue +87 -12
  77. package/src/components/form-generator/QasFormGenerator.yml +32 -18
  78. package/src/components/form-view/QasFormView.vue +142 -60
  79. package/src/components/form-view/QasFormView.yml +91 -67
  80. package/src/components/gallery/QasGallery.vue +4 -8
  81. package/src/components/gallery/QasGallery.yml +4 -4
  82. package/src/components/grid-generator/QasGridGenerator.vue +23 -7
  83. package/src/components/grid-generator/QasGridGenerator.yml +29 -27
  84. package/src/components/input/QasInput.vue +37 -21
  85. package/src/components/input/QasInput.yml +13 -13
  86. package/src/components/layout/QasLayout.vue +4 -0
  87. package/src/components/list-items/QasListItems.vue +16 -24
  88. package/src/components/list-items/QasListItems.yml +14 -15
  89. package/src/components/list-view/QasListView.vue +48 -20
  90. package/src/components/list-view/QasListView.yml +58 -46
  91. package/src/components/map/QasMap.vue +5 -5
  92. package/src/components/nested-fields/QasNestedFields.vue +29 -21
  93. package/src/components/nested-fields/QasNestedFields.yml +35 -28
  94. package/src/components/numeric-input/QasNumericInput.vue +45 -27
  95. package/src/components/numeric-input/QasNumericInput.yml +26 -12
  96. package/src/components/page-header/QasPageHeader.vue +14 -11
  97. package/src/components/page-header/QasPageHeader.yml +4 -4
  98. package/src/components/password-input/QasPasswordInput.vue +17 -16
  99. package/src/components/password-input/QasPasswordInput.yml +11 -11
  100. package/src/components/password-strength-checker/QasPasswordStrengthChecker.yml +10 -10
  101. package/src/components/profile/QasProfile.vue +3 -6
  102. package/src/components/profile/QasProfile.yml +5 -5
  103. package/src/components/resizer/QasResizer.vue +1 -1
  104. package/src/components/resizer/QasResizer.yml +6 -5
  105. package/src/components/search-box/QasSearchBox.vue +138 -42
  106. package/src/components/search-box/QasSearchBox.yml +74 -7
  107. package/src/components/select/QasSelect.vue +63 -53
  108. package/src/components/select/QasSelect.yml +68 -17
  109. package/src/components/select-list/QasSelectList.vue +13 -32
  110. package/src/components/select-list/QasSelectList.yml +13 -14
  111. package/src/components/signature-pad/QasSignaturePad.vue +1 -1
  112. package/src/components/signature-pad/QasSignaturePad.yml +1 -1
  113. package/src/components/signature-uploader/QasSignatureUploader.vue +13 -14
  114. package/src/components/signature-uploader/QasSignatureUploader.yml +9 -9
  115. package/src/components/single-view/QasSingleView.vue +24 -8
  116. package/src/components/single-view/QasSingleView.yml +45 -38
  117. package/src/components/sortable/QasSortable.yml +17 -17
  118. package/src/components/table-generator/QasTableGenerator.vue +14 -6
  119. package/src/components/table-generator/QasTableGenerator.yml +5 -5
  120. package/src/components/tabs-generator/QasTabsGenerator.vue +2 -2
  121. package/src/components/tabs-generator/QasTabsGenerator.yml +2 -2
  122. package/src/components/text-truncate/QasTextTruncate.vue +2 -5
  123. package/src/components/transfer/QasTransfer.vue +5 -7
  124. package/src/components/transfer/QasTransfer.yml +9 -9
  125. package/src/components/uploader/QasUploader.vue +63 -16
  126. package/src/components/uploader/QasUploader.yml +17 -12
  127. package/src/composables/index.js +1 -1
  128. package/src/composables/{useHistory.js → use-history.js} +0 -0
  129. package/src/css/components/base.scss +3 -0
  130. package/src/css/components/field.scss +4 -0
  131. package/src/css/components/index.scss +4 -0
  132. package/src/css/components/radio.scss +3 -0
  133. package/src/css/components/tabs.scss +3 -0
  134. package/src/css/mixins/index.scss +1 -0
  135. package/src/css/{set-brand.scss → mixins/set-brand.scss} +0 -0
  136. package/src/css/{background.scss → utils/background.scss} +0 -0
  137. package/src/css/{border-radius.scss → utils/border-radius.scss} +0 -0
  138. package/src/css/{border.scss → utils/border.scss} +0 -0
  139. package/src/css/{container.scss → utils/container.scss} +0 -0
  140. package/src/css/{fonts.scss → utils/fonts.scss} +0 -0
  141. package/src/css/utils/index.scss +9 -0
  142. package/src/css/{line-height.scss → utils/line-height.scss} +0 -0
  143. package/src/css/{opacity.scss → utils/opacity.scss} +0 -0
  144. package/src/css/{text.scss → utils/text.scss} +0 -0
  145. package/src/css/{unset.scss → utils/unset.scss} +0 -0
  146. package/src/css/variables/button.scss +3 -0
  147. package/src/css/variables/index.scss +3 -0
  148. package/src/css/variables/shadow.scss +33 -0
  149. package/src/css/variables/typography.scss +139 -0
  150. package/src/helpers/camelize-fields-name.js +15 -0
  151. package/src/helpers/filters.js +2 -0
  152. package/src/helpers/get-normalized-options.js +20 -0
  153. package/src/helpers/handle-process.js +13 -0
  154. package/src/helpers/index.js +3 -0
  155. package/src/index.scss +11 -12
  156. package/src/mixins/generator.js +10 -2
  157. package/src/mixins/index.js +3 -3
  158. package/src/mixins/search-filter.js +227 -0
  159. package/src/mixins/view.js +35 -13
  160. package/src/pages/ErrorComponent.vue +56 -0
  161. package/src/pages/Forbidden.vue +21 -5
  162. package/src/pages/NotFound.vue +21 -5
  163. package/src/pages/ServerError.vue +25 -0
  164. package/src/pages/Unauthorized.vue +28 -0
  165. package/src/plugins/index.js +4 -2
  166. package/src/plugins/logger/Logger.js +44 -0
  167. package/src/plugins/logger/Logger.yml +9 -0
  168. package/src/plugins/screen/Screen.js +5 -0
  169. package/src/vue-plugin.js +6 -3
  170. package/src/assets/logo-modular.svg +0 -1
  171. package/src/css/design-system.scss +0 -18
  172. package/src/css/shadow.scss +0 -7
  173. package/src/mixins/screen.js +0 -34
@@ -1,9 +1,9 @@
1
1
  <template>
2
- <q-header class="bg-white qas-app-bar shadow-primary" height-hint="70">
2
+ <q-header class="bg-white qas-app-bar shadow-14" height-hint="70">
3
3
  <q-toolbar class="qas-app-bar__toolbar" color="bg-white">
4
4
  <q-ajax-bar color="white" position="top" size="2px" />
5
5
 
6
- <q-btn color="grey-7" dense flat icon="o_menu" round @click="toggleMenuDrawer" />
6
+ <qas-btn color="grey-7" dense flat icon="o_menu" round @click="toggleMenuDrawer" />
7
7
 
8
8
  <q-toolbar-title class="flex">
9
9
  <div class="cursor-pointer" @click="goToRoot">
@@ -14,30 +14,30 @@
14
14
  </q-toolbar-title>
15
15
 
16
16
  <div v-if="hasNotifications" class="q-mr-md">
17
- <q-btn class="q-mr-md" dense icon="o_notifications" round unelevated>
17
+ <qas-btn class="q-mr-md" dense icon="o_notifications" round unelevated>
18
18
  <q-badge v-if="notifications" color="red" floating>{{ notifications.count }}</q-badge>
19
- </q-btn>
19
+ </qas-btn>
20
20
  </div>
21
21
 
22
22
  <div class="items-center no-wrap q-gutter-md row">
23
23
  <slot name="tools" />
24
24
 
25
- <div v-if="isAuth" class="cursor-pointer items-center q-mr-sm qas-app-bar__user rounded-borders row text-grey-9" :title="user.name || user.givenName">
26
- <qas-avatar class="rounded-borders-left" color="white" dark :image="user.photo" rounded size="42px" text-color="primary" :title="user.name || user.givenName" />
25
+ <div v-if="hasUser" class="cursor-pointer items-center q-mr-sm qas-app-bar__user rounded-borders row text-grey-9" :title="userName">
26
+ <qas-avatar class="rounded-borders-left" color="white" dark :image="user.photo" rounded size="42px" text-color="primary" :title="userName" />
27
27
 
28
28
  <div class="q-px-sm qas-app-bar__user-data qs-lh-lg text-caption">
29
- <div class="ellipsis">{{ user.name || user.givenName }}</div>
29
+ <div class="ellipsis">{{ userName }}</div>
30
30
  <div class="ellipsis text-bold">{{ user.email }}</div>
31
31
  </div>
32
32
 
33
- <q-menu anchor="bottom end" class="shadow-primary" max-height="400px" :offset="[0, 5]" self="top end">
33
+ <q-menu anchor="bottom end" class="shadow-14" max-height="400px" :offset="[0, 5]" self="top end">
34
34
  <div class="qas-app-bar__user-menu">
35
35
  <div class="q-pa-lg text-center">
36
36
  <button class="unset" @click="goToProfile">
37
- <qas-avatar :image="user.photo" size="145px" :title="user.name || user.givenName" />
37
+ <qas-avatar :image="user.photo" size="145px" :title="userName" />
38
38
  </button>
39
39
 
40
- <div class="ellipsis q-mt-lg qs-lh-sm text-bold text-subtitle1">{{ user.name || user.givenName }}</div>
40
+ <div class="ellipsis q-mt-lg qs-lh-sm text-bold text-subtitle1">{{ userName }}</div>
41
41
  <div class="ellipsis q-mt-xs text-caption">{{ user.email }}</div>
42
42
 
43
43
  <div class="q-mt-sm">
@@ -76,10 +76,6 @@ export default {
76
76
  type: String
77
77
  },
78
78
 
79
- isAuth: {
80
- type: Boolean
81
- },
82
-
83
79
  title: {
84
80
  type: String,
85
81
  default: ''
@@ -134,6 +130,14 @@ export default {
134
130
 
135
131
  showTitle () {
136
132
  return this.title && !this.brand
133
+ },
134
+
135
+ hasUser () {
136
+ return !!Object.keys(this.user).length
137
+ },
138
+
139
+ userName () {
140
+ return this.user.name || this.user.givenName
137
141
  }
138
142
  },
139
143
 
@@ -4,19 +4,15 @@ meta:
4
4
  desc: Cria um seção para alertar sobre um conteúdo.
5
5
 
6
6
  props:
7
- is-auth:
8
- desc: Controla se mostra ou não o menu de usuário.
9
- type: Boolean
10
-
11
- title:
12
- desc: Título do header, normalmente usado como título da aplicação.
13
- type: String
14
-
15
7
  notifications:
16
8
  desc: Ícone de notificação que fica ao lado do menu de usuário.
17
9
  type: Object
18
10
  default: {}
19
11
 
12
+ title:
13
+ desc: Título do header, normalmente usado como título da aplicação.
14
+ type: String
15
+
20
16
  user:
21
17
  desc: Informações de usuário para ser usado no menu.
22
18
  type: Object
@@ -35,23 +35,19 @@
35
35
  </q-list>
36
36
  </div>
37
37
 
38
- <div class="q-mx-md">
39
- <!-- TODO: O Modular não é o Asteroid, então não podemos manter esse logo aqui. -->
40
- <img v-if="!isMini" alt="Modular" class="block q-mb-md q-mx-auto" src="../../assets/logo-modular.svg">
38
+ <div v-if="brandMenu" class="q-mx-md">
39
+ <img v-if="!isMini" :alt="title" class="block q-mb-md q-mx-auto" :src="brandMenu">
41
40
  </div>
42
41
  </div>
43
42
  </q-drawer>
44
43
  </template>
45
44
 
46
45
  <script>
47
- import { screenMixin } from '../../mixins'
48
46
  import { isLocalDevelopment } from '../../helpers'
49
47
 
50
48
  export default {
51
49
  name: 'QasAppMenu',
52
50
 
53
- mixins: [screenMixin],
54
-
55
51
  props: {
56
52
  items: {
57
53
  default: () => [],
@@ -68,6 +64,11 @@ export default {
68
64
  type: String
69
65
  },
70
66
 
67
+ brandMenu: {
68
+ default: '',
69
+ type: String
70
+ },
71
+
71
72
  modules: {
72
73
  default: () => [],
73
74
  type: Array
@@ -153,7 +154,7 @@ export default {
153
154
  },
154
155
 
155
156
  beforeHide () {
156
- if (this.mx_isLarge) {
157
+ if (this.$qas.screen.isLarge) {
157
158
  this.model = true
158
159
  this.miniMode = !this.miniMode
159
160
  }
@@ -4,25 +4,29 @@ meta:
4
4
  desc: Menu lateral.
5
5
 
6
6
  props:
7
- model-value:
8
- desc: Model do componente, controla quando o menu lateral é aberto e fechado.
9
- default: true
10
- type: Boolean
7
+ brand-menu:
8
+ desc: Imagem para ser usada como logo no menu.
9
+ type: String
11
10
 
12
11
  items:
13
12
  desc: Itens do menu.
14
13
  type: Array
15
14
  default: []
16
15
 
17
- title:
18
- desc: Título que vai ficar no label do select de módulos.
19
- type: String
16
+ model-value:
17
+ desc: Model do componente, controla quando o menu lateral é aberto e fechado.
18
+ default: true
19
+ type: Boolean
20
20
 
21
21
  modules:
22
22
  desc: Lista de módulos que o usuário tem acesso para navegar.
23
23
  type: Array
24
24
  default: []
25
25
 
26
+ title:
27
+ desc: Título que vai ficar no label do select de módulos.
28
+ type: String
29
+
26
30
  events:
27
31
  '@update:model-value -> function(value)':
28
32
  desc: Dispara quando o model-value altera, também usado para v-model.
@@ -54,20 +54,16 @@ export default {
54
54
  }
55
55
 
56
56
  const contrastColor = this.color ? this.color : this.contrastColor
57
- // const contrastColor = this.textColor ? this.textColor : this.contrastColor
58
57
 
59
58
  return [
60
59
  this.dark
61
60
  ? `bg-${this.textColor} text-${contrastColor}`
62
61
  : `bg-${contrastColor} text-${this.textColor}`
63
- // ? `bg-${this.color} text-${contrastColor}`
64
- // : `bg-${contrastColor} text-${this.color}`
65
62
  ]
66
63
  },
67
64
 
68
65
  contrastColor () {
69
66
  return `${this.textColor}-contrast`
70
- // return `${this.color}-contrast`
71
67
  },
72
68
 
73
69
  firstLetter () {
@@ -22,7 +22,7 @@ export default {
22
22
  boxClass () {
23
23
  return {
24
24
  'border-primary-contrast': this.outlined,
25
- 'shadow-primary': !this.unelevated
25
+ 'shadow-14': !this.unelevated
26
26
  }
27
27
  }
28
28
  }
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <q-btn color="primary" no-caps unelevated v-bind="attributes">
3
- <slot v-if="showLabel" />
3
+ <slot />
4
4
 
5
5
  <template v-for="(_, name) in slots" #[name]="context">
6
6
  <slot :name="name" v-bind="context || {}" />
@@ -9,35 +9,31 @@
9
9
  </template>
10
10
 
11
11
  <script>
12
- import { screenMixin } from '../../mixins'
13
-
14
12
  export default {
15
13
  name: 'QasBtn',
16
14
 
17
- mixins: [screenMixin],
18
-
19
15
  props: {
20
- hideLabelOnSmallScreen: {
16
+ useLabelOnSmallScreen: {
17
+ default: true,
21
18
  type: Boolean
19
+ },
20
+
21
+ label: {
22
+ default: '',
23
+ type: String
22
24
  }
23
25
  },
24
26
 
25
27
  computed: {
26
28
  attributes () {
27
- const { label, ...attributes } = this.$attrs
28
-
29
29
  return {
30
- ...(this.showLabel && { label }),
31
- ...attributes
30
+ ...(this.showLabel && { label: this.label }),
31
+ ...this.$attrs
32
32
  }
33
33
  },
34
34
 
35
- hasLabel () {
36
- return !!(this.$attrs.label || this.$slots.default)
37
- },
38
-
39
35
  showLabel () {
40
- return this.hasLabel && !(this.hideLabelOnSmallScreen && this.mx_isSmall)
36
+ return this.useLabelOnSmallScreen || !this.$qas.screen.isSmall
41
37
  },
42
38
 
43
39
  slots () {
@@ -7,7 +7,11 @@ meta:
7
7
  desc: O mesmo botão do Quasar (QBtn), mas com o nosso estilo, tem acesso a todas propriedades do componente do quasar. Tem a função de criar gatilhos para ações. Eles podem ser utilizados isoladamente ou ​​como parte de outros componentes de padrões maiores, como formulários, caixas de diálogo e feedbacks.
8
8
 
9
9
  props:
10
- hide-label-on-small-screen:
11
- desc: Esconde o rótulo (label) do botão quando o tamanho da tela for pequeno.
10
+ use-label-on-small-screen:
11
+ desc: Esconde o rótulo (label) do botão quando o tamanho da tela for pequeno (esta propriedade só funciona se o "rotulo") for passado via propriedade "label".
12
+ default: true
12
13
  type: Boolean
13
- default: 'false'
14
+
15
+ label:
16
+ desc: Rótulo do botão.
17
+ type: String
@@ -8,7 +8,7 @@
8
8
  <qas-btn color="white" dense flat :icon="getNavigationIcon(active, btnProps)" round size="sm" @click="onClick" />
9
9
  </template>
10
10
 
11
- <q-carousel-slide v-for="(item, index) in imagesList" :key="index" class="bg-no-repeat" :class="bgImagePositionClass" :img-src="item" :name="index" />
11
+ <q-carousel-slide v-for="(item, index) in imagesList" :key="index" class="bg-no-repeat" :class="imagePositionClass" :img-src="item" :name="index" />
12
12
  </q-carousel>
13
13
 
14
14
  <div class="absolute-top flex items-center q-pa-md">
@@ -35,15 +35,11 @@ export default {
35
35
  name: 'QasCard',
36
36
 
37
37
  props: {
38
- bgImagePosition: {
38
+ imagePosition: {
39
39
  type: String,
40
40
  default: 'center'
41
41
  },
42
42
 
43
- formMode: {
44
- type: Boolean
45
- },
46
-
47
43
  gutter: {
48
44
  type: String,
49
45
  default: 'sm'
@@ -54,6 +50,14 @@ export default {
54
50
  type: Array
55
51
  },
56
52
 
53
+ outlined: {
54
+ type: Boolean
55
+ },
56
+
57
+ unelevated: {
58
+ type: Boolean
59
+ },
60
+
57
61
  useHeader: {
58
62
  type: Boolean
59
63
  }
@@ -66,12 +70,17 @@ export default {
66
70
  },
67
71
 
68
72
  computed: {
69
- bgImagePositionClass () {
70
- return `bg-position-${this.bgImagePosition}`
73
+ imagePositionClass () {
74
+ return `bg-position-${this.imagePosition}`
71
75
  },
72
76
 
73
77
  cardClasses () {
74
- return this.formMode ? 'bg-white border-primary no-shadow' : 'box-shadow-1'
78
+ return {
79
+ 'shadow-14': !this.unelevated,
80
+ 'border-primary': this.outlined,
81
+ 'no-shadow': this.outlined,
82
+ 'bg-white': this.outlined
83
+ }
75
84
  },
76
85
 
77
86
  gutterClass () {
@@ -4,15 +4,6 @@ meta:
4
4
  desc: Componente de card.
5
5
 
6
6
  props:
7
- bg-image-position:
8
- desc: Posição da imagem "background-position".
9
- default: center
10
- type: String
11
-
12
- form-mode:
13
- desc: Modo de formulário, altera o estilo quando está em uma pagina de formulário.
14
- type: Boolean
15
-
16
7
  gutter:
17
8
  desc: Espaçamento dentro <q-card-section /> onde fica o slot "default".
18
9
  default: sm
@@ -24,13 +15,26 @@ props:
24
15
  default: []
25
16
  type: Array
26
17
 
18
+ image-position:
19
+ desc: Posição da imagem "background-position".
20
+ default: center
21
+ type: String
22
+
23
+ outlined:
24
+ desc: Insere uma borda sólida em volta do componente.
25
+ type: Boolean
26
+
27
+ unelevated:
28
+ desc: Remove a sombra do componente.
29
+ type: Boolean
30
+
27
31
  use-header:
28
32
  desc: Controla se vai ter ou não o header com carousel.
29
33
  type: Boolean
30
34
 
31
35
  slots:
32
- header:
33
- desc: Slot para acessar área no lugar do "<q-carousel />".
36
+ actions:
37
+ desc: Slot para acessar conteúdo de ações como botão.
34
38
 
35
39
  carousel-header:
36
40
  desc: Slot para acessar usar de header do "<q-carousel />".
@@ -38,5 +42,5 @@ slots:
38
42
  default:
39
43
  desc: Slot para acessar conteúdo dentro do "<q-card-section />".
40
44
 
41
- actions:
42
- desc: Slot para acessar conteúdo de ações como botão.
45
+ header:
46
+ desc: Slot para acessar área no lugar do "<q-carousel />".
@@ -4,10 +4,10 @@ meta:
4
4
  desc: Componente para gerar dinamicamente checkbox agrupados.
5
5
 
6
6
  props:
7
- options:
8
- desc: Opções para gerar os checkbox.
9
- default: []
10
- type: Array
7
+ inline:
8
+ desc: Controla se o componente vai aparece em linha ou em bloco.
9
+ default: true
10
+ type: Boolean
11
11
 
12
12
  model-value:
13
13
  desc: Model do componente, usado para v-model.
@@ -16,10 +16,11 @@ props:
16
16
  examples: [v-model"value"]
17
17
  model: true
18
18
 
19
- inline:
20
- desc: Controla se o componente vai aparece em linha ou em bloco.
21
- default: true
22
- type: Boolean
19
+ options:
20
+ desc: Opções para gerar os checkbox.
21
+ default: []
22
+ type: Array
23
+
23
24
 
24
25
  events:
25
26
  '@update:model-value -> function(value)':
@@ -2,7 +2,7 @@
2
2
  <span>
3
3
  <slot>{{ text }}</slot>
4
4
 
5
- <qas-btn class="q-ml-xs" color="grey-5" flat :icon="icon" :loading="isLoading" round :size="size" @click="copy">
5
+ <qas-btn class="q-ml-xs" color="grey-7" flat :icon="icon" :loading="isLoading" round :size="size" @click="copy">
6
6
  <q-tooltip>Copiar</q-tooltip>
7
7
  </qas-btn>
8
8
  </span>
@@ -9,12 +9,13 @@ props:
9
9
  type: String
10
10
  default: o_file_copy
11
11
 
12
+ text:
13
+ desc: Texto a ser copiado.
14
+ type: String
15
+
12
16
  size:
13
17
  desc: Tamanho do botão.
14
18
  type: String
15
19
  default: xs
16
20
  examples: [xs, sm, md, lg, xl]
17
21
 
18
- text:
19
- desc: Texto a ser copiado.
20
- type: String
@@ -1,21 +1,19 @@
1
1
  <template>
2
- <div>
3
- <qas-input ref="input" v-bind="attributes" v-model="currentValue" :unmasked-value="false" @update:model-value="updateModelValue">
4
- <template #append>
5
- <q-icon v-if="!timeOnly" class="cursor-pointer" name="o_event">
6
- <q-popup-proxy ref="dateProxy" transition-hide="scale" transition-show="scale">
7
- <q-date v-model="currentValue" v-bind="dateProps" :mask="maskDate" @update:model-value="updateModelValue" />
8
- </q-popup-proxy>
9
- </q-icon>
10
-
11
- <q-icon v-if="!dateOnly" class="cursor-pointer q-ml-md" name="o_access_time">
12
- <q-popup-proxy ref="timeProxy" transition-hide="scale" transition-show="scale">
13
- <q-time v-model="currentValue" v-bind="timeProps" format24h :mask="maskDate" @update:model-value="updateModelValue" />
14
- </q-popup-proxy>
15
- </q-icon>
16
- </template>
17
- </qas-input>
18
- </div>
2
+ <qas-input ref="input" v-bind="attributes" v-model="currentValue" :unmasked-value="false" @update:model-value="updateModelValue">
3
+ <template #append>
4
+ <q-icon v-if="!useTimeOnly" class="cursor-pointer" name="o_event">
5
+ <q-popup-proxy ref="dateProxy" transition-hide="scale" transition-show="scale">
6
+ <q-date v-model="currentValue" v-bind="dateProps" :mask="maskDate" @update:model-value="updateModelValue" />
7
+ </q-popup-proxy>
8
+ </q-icon>
9
+
10
+ <q-icon v-if="!useDateOnly" class="cursor-pointer q-ml-md" name="o_access_time">
11
+ <q-popup-proxy ref="timeProxy" transition-hide="scale" transition-show="scale">
12
+ <q-time v-model="currentValue" v-bind="timeProps" format24h :mask="maskDate" @update:model-value="updateModelValue" />
13
+ </q-popup-proxy>
14
+ </q-icon>
15
+ </template>
16
+ </qas-input>
19
17
  </template>
20
18
 
21
19
  <script>
@@ -33,33 +31,33 @@ export default {
33
31
  type: String
34
32
  },
35
33
 
36
- dateOnly: {
37
- type: Boolean
38
- },
39
-
40
34
  dateProps: {
41
35
  default: () => ({}),
42
36
  type: Object
43
37
  },
44
38
 
45
- gmt: {
46
- type: Boolean
47
- },
48
-
49
39
  timeMask: {
50
40
  default: 'HH:mm',
51
41
  type: String
52
42
  },
53
43
 
54
- timeOnly: {
55
- type: Boolean
56
- },
57
-
58
44
  timeProps: {
59
45
  default: () => ({}),
60
46
  type: Object
61
47
  },
62
48
 
49
+ useIso: {
50
+ type: Boolean
51
+ },
52
+
53
+ useTimeOnly: {
54
+ type: Boolean
55
+ },
56
+
57
+ useDateOnly: {
58
+ type: Boolean
59
+ },
60
+
63
61
  modelValue: {
64
62
  default: '',
65
63
  type: String
@@ -96,16 +94,16 @@ export default {
96
94
  maskDate () {
97
95
  const mask = []
98
96
 
99
- if (!this.timeOnly) { mask.push(this.dateMask) }
100
- if (!this.dateOnly) { mask.push(this.timeMask) }
97
+ if (!this.useTimeOnly) { mask.push(this.dateMask) }
98
+ if (!this.useDateOnly) { mask.push(this.timeMask) }
101
99
 
102
100
  return mask.join(' ')
103
101
  }
104
102
  },
105
103
 
106
104
  watch: {
107
- value (current, original) {
108
- if (!current || this.timeOnly) {
105
+ modelValue (current, original) {
106
+ if (!current || this.useTimeOnly) {
109
107
  this.currentValue = current
110
108
  return
111
109
  }
@@ -131,18 +129,18 @@ export default {
131
129
 
132
130
  updateModelValue (value) {
133
131
  this.currentValue = value
134
- const valueLength = value.replace(/_/g, '').length
132
+ const valueLength = value?.replace?.(/_/g, '')?.length
135
133
 
136
134
  if (value === '' || valueLength === this.mask.length) {
137
- this.lastValue = this.timeOnly ? value : this.toISOString(value)
135
+ this.lastValue = this.useTimeOnly ? value : this.toISOString(value)
138
136
  this.$emit('update:modelValue', this.lastValue)
139
137
  }
140
138
 
141
- if (this.dateOnly) {
139
+ if (this.useDateOnly) {
142
140
  this.$refs.dateProxy.hide()
143
141
  }
144
142
 
145
- if (this.timeOnly) {
143
+ if (this.useTimeOnly) {
146
144
  this.$refs.timeProxy.hide()
147
145
  }
148
146
  },
@@ -152,11 +150,11 @@ export default {
152
150
  return ''
153
151
  }
154
152
 
155
- if (this.dateOnly && !this.gmt) {
153
+ if (this.useDateOnly && !this.useIso) {
156
154
  return dateFn(date.extractDate(value, this.maskDate), 'yyyy-MM-dd')
157
155
  }
158
156
 
159
- if (this.timeOnly && !this.gmt) {
157
+ if (this.useTimeOnly && !this.useIso) {
160
158
  return date.extractDate(value, 'HH:MM')
161
159
  }
162
160
 
@@ -164,14 +162,14 @@ export default {
164
162
  },
165
163
 
166
164
  toMask (value) {
167
- if (!value || this.timeOnly) {
165
+ if (!value || this.useTimeOnly) {
168
166
  return value || ''
169
167
  }
170
168
 
171
169
  const newDate = new Date(value).toISOString()
172
170
 
173
171
  return date.formatDate(
174
- this.dateOnly ? newDate.slice(0, 23) : newDate,
172
+ this.useDateOnly ? newDate.slice(0, 23) : newDate,
175
173
  this.maskDate
176
174
  )
177
175
  }
@@ -12,38 +12,38 @@ props:
12
12
  default: DD/MM/YYYY
13
13
  type: String
14
14
 
15
- date-only:
16
- desc: Habilita o componente para usar somente data.
17
- type: Boolean
18
-
19
15
  date-props:
20
16
  desc: Propriedades do QDate (https://quasar.dev/vue-components/date#introduction).
21
17
  default: {}
22
18
  type: Object
23
19
 
24
- gmt:
25
- desc: Utilizado para se usar junto da prop "date-only" ou "time-only", caso "gmt" for "true", o model sempre vai ser retornado no padrão ISO 8601, independente ser apenas um campo somente de data ou hora.
26
- type: Boolean
20
+ model-value:
21
+ desc: Model do componente, usado para v-model.
22
+ default: ''
23
+ type: String
24
+ model: true
27
25
 
28
26
  time-mask:
29
27
  desc: Máscara do componente de input de hora.
30
28
  default: HH:mm
31
29
  type: String
32
30
 
33
- time-only:
34
- desc: Habilita o componente para usar somente hora.
35
- type: Boolean
36
-
37
31
  time-props:
38
32
  desc: Propriedades do QTime (https://quasar.dev/vue-components/time#introduction).
39
33
  default: {}
40
34
  type: Object
41
35
 
42
- model-value:
43
- desc: Model do componente, usado para v-model.
44
- default: ''
45
- type: String
46
- model: true
36
+ use-time-only:
37
+ desc: Habilita o componente para usar somente hora.
38
+ type: Boolean
39
+
40
+ use-date-only:
41
+ desc: Habilita o componente para usar somente data.
42
+ type: Boolean
43
+
44
+ use-iso:
45
+ desc: Utilizado para se usar junto da prop "date-only" ou "time-only", caso "useIso" for "true", o model sempre vai ser retornado no padrão ISO 8601, independente ser apenas um campo somente de data ou hora.
46
+ type: Boolean
47
47
 
48
48
  events:
49
49
  '@update:model-value -> function (value)':