@bildvitta/quasar-ui-asteroid 3.13.0-beta.9 → 3.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/actions-menu/QasActionsMenu.vue +8 -7
- package/src/components/actions-menu/QasActionsMenu.yml +13 -0
- package/src/components/app-bar/QasAppBar.vue +3 -3
- package/src/components/app-menu/QasAppMenu.vue +8 -18
- package/src/components/app-menu/composables/use-app-menu-dropdown.js +5 -5
- package/src/components/app-user/QasAppUser.vue +4 -4
- package/src/components/badge/QasBadge.vue +1 -1
- package/src/components/badge/QasBadge.yml +1 -1
- package/src/components/btn/QasBtn.vue +1 -1
- package/src/components/btn/QasBtn.yml +3 -3
- package/src/components/btn-dropdown/QasBtnDropdown.vue +2 -2
- package/src/components/chart-view/QasChartView.vue +2 -2
- package/src/components/date/QasDate.vue +3 -3
- package/src/components/date-time-input/QasDateTimeInput.vue +2 -2
- package/src/components/delete/QasDelete.vue +1 -1
- package/src/components/dialog/QasDialog.vue +6 -4
- package/src/components/filters/QasFilters.vue +1 -1
- package/src/components/filters/private/PvFiltersButton.vue +2 -2
- package/src/components/gallery/QasGallery.vue +1 -1
- package/src/components/gallery/private/PvGalleryCarouselDialog.vue +2 -2
- package/src/components/gallery-card/QasGalleryCard.vue +2 -2
- package/src/components/label/QasLabel.vue +1 -1
- package/src/components/label/QasLabel.yml +1 -1
- package/src/components/nested-fields/QasNestedFields.vue +6 -6
- package/src/components/nested-fields/QasNestedFields.yml +13 -1
- package/src/components/page-header/QasPageHeader.vue +1 -11
- package/src/components/pagination/QasPagination.vue +1 -1
- package/src/components/search-input/QasSearchInput.vue +2 -2
- package/src/components/select-list-dialog/QasSelectListDialog.vue +3 -3
- package/src/components/table-generator/QasTableGenerator.vue +8 -4
- package/src/components/tabs-generator/QasTabsGenerator.vue +1 -1
- package/src/components/timeline/QasTimeline.vue +2 -2
- package/src/components/tree-generator/QasTreeGenerator.vue +1 -1
- package/src/components/uploader/QasUploader.vue +1 -1
- package/src/components/uploader/private/PvUploaderGalleryCard.vue +1 -1
- package/src/components/welcome/QasWelcome.vue +2 -2
- package/src/composables/use-history.js +4 -4
- package/src/css/components/base.scss +1 -0
- package/src/css/components/button.scss +2 -2
- package/src/css/components/checkbox.scss +12 -0
- package/src/css/components/editor.scss +7 -0
- package/src/css/components/field.scss +23 -3
- package/src/css/components/index.scss +3 -0
- package/src/css/components/item.scss +1 -1
- package/src/css/components/radio.scss +15 -2
- package/src/css/components/toggle.scss +11 -0
- package/src/css/variables/typography.scss +11 -1
- package/src/index.scss +4 -4
- package/src/pages/ErrorComponent.vue +1 -2
- package/src/plugins/dialog/Dialog.js +1 -1
- package/src/shared/notify-config.js +1 -1
- package/src/vue-plugin.js +4 -0
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div v-if="hasActions" class="qas-actions-menu">
|
|
2
|
+
<div v-if="hasActions" class="qas-actions-menu" data-cy="actions-menu">
|
|
3
3
|
<component :is="component.is" v-bind="component.props" variant="tertiary" @click.stop.prevent>
|
|
4
|
-
<q-list v-if="isBtnDropdown">
|
|
4
|
+
<q-list v-if="isBtnDropdown" data-cy="actions-menu-list">
|
|
5
5
|
<slot v-for="(item, key) in actions" :item="item" :name="key">
|
|
6
|
-
<q-item v-bind="item.props" :key="key" clickable @click="onClick(item)">
|
|
6
|
+
<q-item v-bind="item.props" :key="key" clickable data-cy="actions-menu-list-item" @click="onClick(item)">
|
|
7
7
|
<q-item-section avatar>
|
|
8
8
|
<q-icon :name="item.icon" />
|
|
9
9
|
</q-item-section>
|
|
@@ -26,13 +26,14 @@
|
|
|
26
26
|
import QasBtn from '../btn/QasBtn.vue'
|
|
27
27
|
import QasBtnDropdown from '../btn-dropdown/QasBtnDropdown.vue'
|
|
28
28
|
|
|
29
|
-
import Delete from '../../plugins/delete/Delete'
|
|
30
29
|
import useScreen from '../../composables/use-screen'
|
|
31
30
|
|
|
32
|
-
import { computed } from 'vue'
|
|
31
|
+
import { computed, inject } from 'vue'
|
|
33
32
|
|
|
34
33
|
defineOptions({ name: 'QasActionsMenu' })
|
|
35
34
|
|
|
35
|
+
const qas = inject('qas')
|
|
36
|
+
|
|
36
37
|
const props = defineProps({
|
|
37
38
|
buttonProps: {
|
|
38
39
|
default: () => ({}),
|
|
@@ -195,10 +196,10 @@ function useDelete () {
|
|
|
195
196
|
if (hasDelete.value) {
|
|
196
197
|
Object.assign(deleteBtnProps, {
|
|
197
198
|
delete: {
|
|
198
|
-
color: 'grey-
|
|
199
|
+
color: 'grey-10',
|
|
199
200
|
icon: props.deleteIcon,
|
|
200
201
|
label: props.deleteLabel,
|
|
201
|
-
handler: () =>
|
|
202
|
+
handler: () => qas.delete(props.deleteProps)
|
|
202
203
|
}
|
|
203
204
|
})
|
|
204
205
|
}
|
|
@@ -70,3 +70,16 @@ slots:
|
|
|
70
70
|
}
|
|
71
71
|
"
|
|
72
72
|
]
|
|
73
|
+
|
|
74
|
+
selectors:
|
|
75
|
+
'actions-menu':
|
|
76
|
+
desc: Seletor do componente.
|
|
77
|
+
examples: ['data-cy="actions-menu"']
|
|
78
|
+
|
|
79
|
+
'actions-menu-list':
|
|
80
|
+
desc: Seletor da lista de ações.
|
|
81
|
+
examples: ['data-cy="actions-menu-list"']
|
|
82
|
+
|
|
83
|
+
'actions-menu-list-item':
|
|
84
|
+
desc: Seletor para cada item da lista de ações.
|
|
85
|
+
examples: ['data-cy="actions-menu-list-item"']
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<q-header class="qas-app-bar shadow-2" height-hint="56">
|
|
3
|
-
<q-toolbar class="bg-white qas-app-bar__toolbar text-grey-
|
|
4
|
-
<qas-btn color="grey-
|
|
3
|
+
<q-toolbar class="bg-white qas-app-bar__toolbar text-grey-10">
|
|
4
|
+
<qas-btn color="grey-10" icon="sym_r_menu" variant="tertiary" @click="toggleMenuDrawer" />
|
|
5
5
|
|
|
6
6
|
<q-toolbar-title>
|
|
7
7
|
<router-link class="flex items-center no-wrap text-no-decoration" :class="routerLinkClass" :to="rootRoute">
|
|
@@ -108,7 +108,7 @@ function toggleMenuDrawer () {
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
&__brand {
|
|
111
|
-
max-width:
|
|
111
|
+
max-width: 115px;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
</style>
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
<div class="full-width">
|
|
6
6
|
<!-- Brand -->
|
|
7
7
|
<div v-if="!screen.untilLarge" class="q-mb-xl q-pt-xl qas-app-menu__label" :class="classes.spacedItem">
|
|
8
|
-
<router-link class="flex relative-position text-no-decoration" :
|
|
9
|
-
<q-img v-if="normalizedBrand" :alt="title" class="qas-app-menu__brand qas-app-menu__label"
|
|
8
|
+
<router-link class="column flex items-center justify-center relative-position text-no-decoration" :to="rootRoute">
|
|
9
|
+
<q-img v-if="normalizedBrand" :alt="title" class="qas-app-menu__brand qas-app-menu__label" fit="contain" height="27px" img-class="qas-app-menu__brand-img" no-spinner :src="normalizedBrand" />
|
|
10
10
|
|
|
11
11
|
<span v-else-if="!isMiniMode" class="ellipsis text-bold text-primary text-subtitle2">{{ title }}</span>
|
|
12
12
|
|
|
13
|
-
<q-badge v-if="hasDevelopmentBadge" color="red"
|
|
13
|
+
<q-badge v-if="hasDevelopmentBadge" class="q-mt-sm" color="red" :label="developmentBadgeLabel" />
|
|
14
14
|
</router-link>
|
|
15
15
|
</div>
|
|
16
16
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
21
|
<div v-if="screen.untilLarge" class="q-pr-xl q-pt-md text-right">
|
|
22
|
-
<qas-btn color="grey-
|
|
22
|
+
<qas-btn color="grey-10" icon="sym_r_close" variant="tertiary" @click="closeDrawer" />
|
|
23
23
|
</div>
|
|
24
24
|
|
|
25
25
|
<!-- Module -->
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
</div>
|
|
31
31
|
|
|
32
32
|
<!-- List -->
|
|
33
|
-
<q-list v-if="items.length" class="q-mt-xl qas-app-menu__menu text-grey-
|
|
33
|
+
<q-list v-if="items.length" class="q-mt-xl qas-app-menu__menu text-grey-10">
|
|
34
34
|
<template v-for="(menuItem, index) in items">
|
|
35
35
|
<div v-if="hasChildren(menuItem)" :key="`children-${index}`" class="qas-app-menu__content" :class="classes.content">
|
|
36
36
|
<q-item class="ellipsis items-center q-py-none qas-app-menu__item qas-app-menu__item--label-mini text-weight-bold">
|
|
37
|
-
<div class="ellipsis qas-app-menu__label text-grey-
|
|
37
|
+
<div class="ellipsis qas-app-menu__label text-grey-10 text-subtitle2" :class="classes.spacedItem">
|
|
38
38
|
{{ menuItem.label }}
|
|
39
39
|
</div>
|
|
40
40
|
</q-item>
|
|
@@ -183,20 +183,12 @@ const normalizedBrand = computed(() => isMini.value ? props.miniBrand : props.br
|
|
|
183
183
|
|
|
184
184
|
const classes = computed(() => {
|
|
185
185
|
return {
|
|
186
|
-
brand: {
|
|
187
|
-
'qas-app-menu__brand--spaced': !isMiniMode.value
|
|
188
|
-
},
|
|
189
|
-
|
|
190
186
|
content: {
|
|
191
187
|
'qas-app-menu__content--spaced': !isMiniMode.value
|
|
192
188
|
},
|
|
193
189
|
|
|
194
190
|
spacedItem: {
|
|
195
191
|
'qas-app-menu__label--spaced': !isMiniMode.value
|
|
196
|
-
},
|
|
197
|
-
|
|
198
|
-
brandPosition: {
|
|
199
|
-
'justify-center': isMiniMode.value
|
|
200
192
|
}
|
|
201
193
|
}
|
|
202
194
|
})
|
|
@@ -294,10 +286,8 @@ function setHasOpenedMenu (value) {
|
|
|
294
286
|
}
|
|
295
287
|
|
|
296
288
|
&__brand {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
&--spaced {
|
|
300
|
-
width: 208px;
|
|
289
|
+
:deep(.qas-app-menu__brand-img) {
|
|
290
|
+
transition: opacity 120ms ease-in; // 120ms é o mesmo tempo utilizado na abertura do QDrawer.
|
|
301
291
|
}
|
|
302
292
|
}
|
|
303
293
|
|
|
@@ -4,7 +4,7 @@ import { computed, watch, ref } from 'vue'
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @param {{
|
|
7
|
-
* props: { modules: [] },
|
|
7
|
+
* props: { modules: [], title: string },
|
|
8
8
|
* onMenuUpdate: () => void
|
|
9
9
|
* }} config
|
|
10
10
|
*/
|
|
@@ -19,7 +19,7 @@ export default function useAppMenuDropdown (config = {}) {
|
|
|
19
19
|
const module = ref('')
|
|
20
20
|
|
|
21
21
|
const defaultModules = computed(() => {
|
|
22
|
-
if (!isLocalDevelopment()) return
|
|
22
|
+
if (!isLocalDevelopment()) return props.modules
|
|
23
23
|
|
|
24
24
|
const normalizedModules = [...props.modules]
|
|
25
25
|
|
|
@@ -31,7 +31,7 @@ export default function useAppMenuDropdown (config = {}) {
|
|
|
31
31
|
* executado em desenvolvimento local.
|
|
32
32
|
*/
|
|
33
33
|
normalizedModules.unshift({
|
|
34
|
-
label: `Localhost ${
|
|
34
|
+
label: `Localhost ${props.title ? `(${props.title})` : ''}`,
|
|
35
35
|
icon: 'sym_r_home',
|
|
36
36
|
value
|
|
37
37
|
})
|
|
@@ -40,7 +40,7 @@ export default function useAppMenuDropdown (config = {}) {
|
|
|
40
40
|
})
|
|
41
41
|
|
|
42
42
|
const currentModelOption = computed(() => {
|
|
43
|
-
return defaultModules.value.find(
|
|
43
|
+
return defaultModules.value.find(moduleOption => moduleOption?.value === module.value)
|
|
44
44
|
})
|
|
45
45
|
|
|
46
46
|
const appMenuDropdownProps = computed(() => {
|
|
@@ -55,7 +55,7 @@ export default function useAppMenuDropdown (config = {}) {
|
|
|
55
55
|
})
|
|
56
56
|
|
|
57
57
|
const currentModule = computed(() => {
|
|
58
|
-
return
|
|
58
|
+
return defaultModules.value.find(module => module?.value.includes(hostname))?.value
|
|
59
59
|
})
|
|
60
60
|
|
|
61
61
|
const showAppMenuDropdown = computed(() => !!currentModule.value)
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
11
|
<div class="ellipsis qas-app-user__data">
|
|
12
|
-
<div class="ellipsis qas-app-user__name text-grey-
|
|
12
|
+
<div class="ellipsis qas-app-user__name text-grey-10">
|
|
13
13
|
{{ userName }}
|
|
14
14
|
</div>
|
|
15
15
|
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
</div>
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
|
-
<q-menu class="shadow-2 text-grey-
|
|
21
|
+
<q-menu class="shadow-2 text-grey-10" max-height="400px" v-bind="menuProps">
|
|
22
22
|
<div class="q-pb-sm q-pt-md q-px-md qas-app-user__menu">
|
|
23
|
-
<qas-avatar class="q-mb-md" :image="user.photo" size="
|
|
23
|
+
<qas-avatar class="q-mb-md" :image="user.photo" size="64px" :title="userName" />
|
|
24
24
|
|
|
25
25
|
<div class="ellipsis qas-app-user__menu-name">
|
|
26
26
|
{{ userName }}
|
|
@@ -85,7 +85,7 @@ defineOptions({ name: 'QasAppUser' })
|
|
|
85
85
|
|
|
86
86
|
const props = defineProps({
|
|
87
87
|
avatarSize: {
|
|
88
|
-
default: '
|
|
88
|
+
default: '40px',
|
|
89
89
|
type: String
|
|
90
90
|
},
|
|
91
91
|
|
|
@@ -8,10 +8,10 @@ meta:
|
|
|
8
8
|
|
|
9
9
|
props:
|
|
10
10
|
color:
|
|
11
|
-
desc: Cor do botão, sendo possível alterar somente quando a variante for "tertiary", podendo ser "primary", "grey-
|
|
11
|
+
desc: Cor do botão, sendo possível alterar somente quando a variante for "tertiary", podendo ser "primary", "grey-10" ou "white".
|
|
12
12
|
default: primary
|
|
13
13
|
type: String
|
|
14
|
-
examples: ['grey-
|
|
14
|
+
examples: ['grey-10', 'primary', 'white']
|
|
15
15
|
|
|
16
16
|
icon:
|
|
17
17
|
desc: Ícone a esquerda.
|
|
@@ -45,4 +45,4 @@ props:
|
|
|
45
45
|
desc: Variantes do botão, que define para qual comportamento o botão será usado, podendo ser "primary", "secondary" ou "tertiary".
|
|
46
46
|
default: tertiary
|
|
47
47
|
type: String
|
|
48
|
-
examples: ['primary', 'secondary', 'tertiary']
|
|
48
|
+
examples: ['primary', 'secondary', 'tertiary']
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<q-separator v-if="hasSeparator" class="q-mr-sm qas-btn-dropdown__separator self-center" dark vertical />
|
|
16
16
|
|
|
17
17
|
<div v-if="useSplit">
|
|
18
|
-
<qas-btn color="grey-
|
|
18
|
+
<qas-btn color="grey-10" :icon="dropdownIcon" variant="tertiary">
|
|
19
19
|
<q-menu v-if="hasDefaultSlot" anchor="bottom right" auto-close self="top right">
|
|
20
20
|
<div :class="menuContentClasses">
|
|
21
21
|
<slot />
|
|
@@ -106,7 +106,7 @@ export default {
|
|
|
106
106
|
|
|
107
107
|
...defaultProps,
|
|
108
108
|
|
|
109
|
-
color: color || (!this.useSplit ? 'grey-
|
|
109
|
+
color: color || (!this.useSplit ? 'grey-10' : 'primary'),
|
|
110
110
|
...(!this.useSplit && { iconRight: defaultIconRight }),
|
|
111
111
|
...(this.useSplit && { icon })
|
|
112
112
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<qas-header-actions v-if="hasHeaderActions" align-columns="end">
|
|
3
3
|
<template #left>
|
|
4
|
-
<
|
|
4
|
+
<h3 v-if="title" class="text-h3">
|
|
5
5
|
{{ title }}
|
|
6
|
-
</
|
|
6
|
+
</h3>
|
|
7
7
|
|
|
8
8
|
<div v-if="subtitle" class="text-body1 text-grey-8">
|
|
9
9
|
{{ subtitle }}
|
|
@@ -559,7 +559,7 @@ export default {
|
|
|
559
559
|
justify-content: space-between;
|
|
560
560
|
|
|
561
561
|
.q-btn {
|
|
562
|
-
@include set-button(tertiary, false, false, grey-
|
|
562
|
+
@include set-button(tertiary, false, false, grey-10);
|
|
563
563
|
@include set-typography($subtitle2);
|
|
564
564
|
|
|
565
565
|
.q-icon {
|
|
@@ -592,7 +592,7 @@ export default {
|
|
|
592
592
|
color: $primary !important;
|
|
593
593
|
}
|
|
594
594
|
|
|
595
|
-
@include set-button(tertiary, false, false, grey-
|
|
595
|
+
@include set-button(tertiary, false, false, grey-10);
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
598
|
|
|
@@ -601,7 +601,7 @@ export default {
|
|
|
601
601
|
}
|
|
602
602
|
|
|
603
603
|
&__calendar-days-container {
|
|
604
|
-
color: $grey-
|
|
604
|
+
color: $grey-10;
|
|
605
605
|
min-height: auto;
|
|
606
606
|
|
|
607
607
|
.q-btn {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<qas-input ref="input" v-bind="attributes" v-model="currentValue" inputmode="numeric" :unmasked-value="false" @blur="validateDateTimeOnBlur" @focus="resetError" @update:model-value="updateModelValue">
|
|
3
3
|
<template #append>
|
|
4
|
-
<qas-btn v-if="!useTimeOnly" color="grey-
|
|
4
|
+
<qas-btn v-if="!useTimeOnly" color="grey-10" :disable="$attrs.readonly" icon="sym_r_event" variant="tertiary">
|
|
5
5
|
<q-popup-proxy ref="dateProxy" transition-hide="scale" transition-show="scale" v-bind="datePopupProxyProps">
|
|
6
6
|
<qas-date v-model="currentValue" v-bind="defaultDateProps" :mask="maskDate" width="290px" @update:model-value="updateModelValue" />
|
|
7
7
|
</q-popup-proxy>
|
|
8
8
|
</qas-btn>
|
|
9
9
|
|
|
10
|
-
<qas-btn v-if="!useDateOnly" class="q-ml-sm" color="grey-
|
|
10
|
+
<qas-btn v-if="!useDateOnly" class="q-ml-sm" color="grey-10" :disable="$attrs.readonly" icon="sym_r_access_time">
|
|
11
11
|
<q-popup-proxy ref="timeProxy" transition-hide="scale" transition-show="scale" v-bind="timePopupProxyProps">
|
|
12
12
|
<q-time v-model="currentValue" v-bind="defaultTimeProps" format24h :mask="maskDate" @update:model-value="updateModelValue" />
|
|
13
13
|
</q-popup-proxy>
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
<header v-if="hasHeader" class="q-mb-lg">
|
|
5
5
|
<slot name="header">
|
|
6
6
|
<div class="items-center justify-between row">
|
|
7
|
-
<h5 class="text-
|
|
7
|
+
<h5 class="text-h5" data-cy="dialog-title">{{ card.title }}</h5>
|
|
8
8
|
|
|
9
|
-
<qas-btn v-if="isInfoDialog" v-close-popup color="grey-
|
|
9
|
+
<qas-btn v-if="isInfoDialog" v-close-popup color="grey-10" data-cy="dialog-close-btn" icon="sym_r_close" variant="tertiary" />
|
|
10
10
|
</div>
|
|
11
11
|
</slot>
|
|
12
12
|
</header>
|
|
@@ -125,7 +125,7 @@ const screen = useScreen()
|
|
|
125
125
|
const slots = useSlots()
|
|
126
126
|
|
|
127
127
|
// usado para o plugin
|
|
128
|
-
const { dialogRef } = useDialogPluginComponent()
|
|
128
|
+
const { dialogRef, onDialogHide } = useDialogPluginComponent()
|
|
129
129
|
|
|
130
130
|
// QForm template
|
|
131
131
|
const form = ref(null)
|
|
@@ -139,7 +139,9 @@ const { descriptionComponent, mainComponent } = useDynamicComponents({ ...compos
|
|
|
139
139
|
const dialogProps = computed(() => {
|
|
140
140
|
return {
|
|
141
141
|
...(!props.usePlugin && { modelValue: props.modelValue }),
|
|
142
|
-
...attrs
|
|
142
|
+
...attrs,
|
|
143
|
+
|
|
144
|
+
onHide: onDialogHide
|
|
143
145
|
}
|
|
144
146
|
})
|
|
145
147
|
|
|
@@ -44,8 +44,8 @@ export default {
|
|
|
44
44
|
props: {
|
|
45
45
|
color: {
|
|
46
46
|
type: String,
|
|
47
|
-
default: 'grey-
|
|
48
|
-
validator: value => ['grey-
|
|
47
|
+
default: 'grey-10',
|
|
48
|
+
validator: value => ['grey-10', 'primary', 'white'].includes(value)
|
|
49
49
|
},
|
|
50
50
|
|
|
51
51
|
error: {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<qas-dialog v-model="model" :cancel="false" class="q-pa-xl" max-width="1100px" :ok="false" :persistent="false" use-full-max-width>
|
|
4
4
|
<template #header>
|
|
5
5
|
<div class="text-right">
|
|
6
|
-
<qas-btn v-close-popup color="grey-
|
|
6
|
+
<qas-btn v-close-popup color="grey-10" icon="sym_r_close" variant="tertiary" @click="close" />
|
|
7
7
|
</div>
|
|
8
8
|
</template>
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
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
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
13
|
<div v-if="$qas.screen.isSmall" class="full-width justify-end row">
|
|
14
|
-
<qas-btn color="grey-
|
|
14
|
+
<qas-btn color="grey-10" icon="sym_r_close" variant="tertiary" @click="close" />
|
|
15
15
|
</div>
|
|
16
16
|
</q-carousel-slide>
|
|
17
17
|
</q-carousel>
|
|
@@ -129,7 +129,7 @@ export default {
|
|
|
129
129
|
return {
|
|
130
130
|
'justify-between': this.card.name,
|
|
131
131
|
'justify-right': !this.card.name,
|
|
132
|
-
'text-grey-
|
|
132
|
+
'text-grey-10': !this.disable,
|
|
133
133
|
'q-mb-md': this.hasActions || this.card.name
|
|
134
134
|
}
|
|
135
135
|
},
|
|
@@ -142,7 +142,7 @@ export default {
|
|
|
142
142
|
'full-width',
|
|
143
143
|
'items-center',
|
|
144
144
|
'justify-center',
|
|
145
|
-
'text-grey-
|
|
145
|
+
'text-grey-10',
|
|
146
146
|
'text-subtitle2'
|
|
147
147
|
]
|
|
148
148
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :id="fieldName" class="qas-nested-fields">
|
|
2
|
+
<div :id="fieldName" class="qas-nested-fields" :data-cy="`nested-fields-${fieldName}`">
|
|
3
3
|
<div v-if="useSingleLabel" class="text-left">
|
|
4
4
|
<qas-label :label="fieldLabel" typography="h5" />
|
|
5
5
|
</div>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<div ref="inputContent">
|
|
8
8
|
<component :is="componentTag" v-bind="componentProps">
|
|
9
9
|
<template v-for="(row, index) in nested" :key="`row-${index}`">
|
|
10
|
-
<div v-if="!row[destroyKey]" :id="`row-${index}`" class="full-width qas-nested-fields__field-item">
|
|
10
|
+
<div v-if="!row[destroyKey]" :id="`row-${index}`" class="full-width qas-nested-fields__field-item" data-cy="nested-fields-item">
|
|
11
11
|
<header v-if="hasHeader" class="flex items-center q-pb-md" :class="headerClasses">
|
|
12
12
|
<qas-label v-if="!useSingleLabel" :label="getRowLabel(index)" margin="none" typography="h5" />
|
|
13
13
|
<qas-actions-menu v-if="hasBlockActions(row)" v-bind="getActionsMenuProps(index, row)" />
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
<div v-if="useAdd">
|
|
38
38
|
<slot :add="add" name="add-input">
|
|
39
39
|
<div v-if="showAddFirstInputButton" class="text-left">
|
|
40
|
-
<qas-btn class="q-px-sm" color="primary" variant="tertiary" @click="add()"
|
|
40
|
+
<qas-btn class="q-px-sm" color="primary" data-cy="nested-fields-add-btn" :label="addFirstInputLabel" variant="tertiary" @click="add()" />
|
|
41
41
|
</div>
|
|
42
42
|
|
|
43
|
-
<div v-else-if="useInlineActions" class="cursor-pointer items-center q-col-gutter-x-md q-mt-md row" @click="add()">
|
|
43
|
+
<div v-else-if="useInlineActions" class="cursor-pointer items-center q-col-gutter-x-md q-mt-md row" data-cy="nested-fields-add-btn" @click="add()">
|
|
44
44
|
<div class="col">
|
|
45
45
|
<qas-input class="disabled no-pointer-events" hide-bottom-space :label="addInputLabel" outlined @focus="add()" />
|
|
46
46
|
</div>
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
</div>
|
|
52
52
|
|
|
53
53
|
<div v-else class="text-left">
|
|
54
|
-
<qas-btn class="q-px-sm" color="primary" icon="sym_r_add" :label="addInputLabel" variant="tertiary" @click="add()" />
|
|
54
|
+
<qas-btn class="q-px-sm" color="primary" data-cy="nested-fields-add-btn" icon="sym_r_add" :label="addInputLabel" variant="tertiary" @click="add()" />
|
|
55
55
|
</div>
|
|
56
56
|
</slot>
|
|
57
57
|
</div>
|
|
@@ -108,7 +108,7 @@ export default {
|
|
|
108
108
|
type: Object,
|
|
109
109
|
default: () => {
|
|
110
110
|
return {
|
|
111
|
-
color: 'grey-
|
|
111
|
+
color: 'grey-10',
|
|
112
112
|
icon: 'sym_r_delete',
|
|
113
113
|
label: 'Excluir',
|
|
114
114
|
variant: 'tertiary'
|
|
@@ -246,7 +246,6 @@ slots:
|
|
|
246
246
|
type: Function
|
|
247
247
|
examples: ["updateValue({ name: 'novo valor' }, 2)"]
|
|
248
248
|
|
|
249
|
-
|
|
250
249
|
events:
|
|
251
250
|
'@update:model-value -> function (value)':
|
|
252
251
|
desc: Dispara toda vez que o model é atualizado, também utilizado para v-model.
|
|
@@ -254,3 +253,16 @@ events:
|
|
|
254
253
|
value:
|
|
255
254
|
desc: Novo valor do v-model
|
|
256
255
|
type: String
|
|
256
|
+
|
|
257
|
+
selectors:
|
|
258
|
+
'nested-fields-[fieldName]':
|
|
259
|
+
desc: Seletor criado a partir da propriedade "name" do campo.
|
|
260
|
+
examples: ['data-cy="nested-fields-companies"']
|
|
261
|
+
|
|
262
|
+
'nested-fields-item':
|
|
263
|
+
desc: Seletor para cada item do nested.
|
|
264
|
+
examples: ['data-cy="nested-fields-item"']
|
|
265
|
+
|
|
266
|
+
'nested-fields-add-btn':
|
|
267
|
+
desc: Seletor para os botões de adicionar itens ao nested.
|
|
268
|
+
examples: ['data-cy="nested-fields-add-btn"']
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<q-toolbar class="justify-between q-mb-lg q-px-none qas-page-header">
|
|
4
4
|
<div class="ellipsis">
|
|
5
|
-
<q-toolbar-title v-if="title" class="text-
|
|
5
|
+
<q-toolbar-title v-if="title" class="text-h3">
|
|
6
6
|
{{ title }}
|
|
7
7
|
</q-toolbar-title>
|
|
8
8
|
|
|
@@ -28,11 +28,8 @@
|
|
|
28
28
|
import QasHeaderActions from '../header-actions/QasHeaderActions.vue'
|
|
29
29
|
|
|
30
30
|
import { castArray } from 'lodash-es'
|
|
31
|
-
import { useHistory } from '../../composables'
|
|
32
31
|
import { createMetaMixin } from 'quasar'
|
|
33
32
|
|
|
34
|
-
const { history } = useHistory()
|
|
35
|
-
|
|
36
33
|
export default {
|
|
37
34
|
name: 'QasPageHeader',
|
|
38
35
|
|
|
@@ -94,13 +91,6 @@ export default {
|
|
|
94
91
|
item.route = { name: item.routeName }
|
|
95
92
|
}
|
|
96
93
|
|
|
97
|
-
const historyList = history.list
|
|
98
|
-
|
|
99
|
-
if (historyList.length && item?.route?.name) {
|
|
100
|
-
const previous = historyList.find(history => history.name === item.route.name)
|
|
101
|
-
item.route.query = previous ? previous.query : null
|
|
102
|
-
}
|
|
103
|
-
|
|
104
94
|
return item
|
|
105
95
|
})
|
|
106
96
|
},
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<qas-input ref="input" v-model="model" v-bind="$attrs" class="bg-white rounded-borders-sm" data-cy="search-input" :debounce="debounce" dense hide-bottom-space input-class="ellipsis text-grey-8" inputmode="search" type="search">
|
|
4
4
|
<template #prepend>
|
|
5
5
|
<q-icon v-if="useSearchOnType" color="grey-8" name="sym_r_search" />
|
|
6
|
-
<qas-btn v-else color="grey-
|
|
6
|
+
<qas-btn v-else color="grey-10" icon="sym_r_search" variant="tertiary" @click="$emit('filter')" />
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<template #append>
|
|
10
|
-
<qas-btn v-if="hasSearch" color="grey-
|
|
10
|
+
<qas-btn v-if="hasSearch" color="grey-10" icon="sym_r_clear" variant="tertiary" @click="clear" />
|
|
11
11
|
|
|
12
12
|
<slot name="after-clear" />
|
|
13
13
|
</template>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
v-if="hasBox"
|
|
21
21
|
class="q-mt-md relative-position"
|
|
22
22
|
>
|
|
23
|
-
<span class="text-grey-
|
|
23
|
+
<span class="text-grey-10 text-subtitle1">
|
|
24
24
|
{{ props.listLabel }}
|
|
25
25
|
</span>
|
|
26
26
|
|
|
@@ -184,7 +184,7 @@ const labelProps = computed(() => {
|
|
|
184
184
|
return {
|
|
185
185
|
label: props.label,
|
|
186
186
|
margin: 'none',
|
|
187
|
-
color: hasError.value ? 'negative' : 'grey-
|
|
187
|
+
color: hasError.value ? 'negative' : 'grey-10'
|
|
188
188
|
}
|
|
189
189
|
})
|
|
190
190
|
|
|
@@ -268,7 +268,7 @@ function useList () {
|
|
|
268
268
|
|
|
269
269
|
function getRemoveButtonProps ({ option }) {
|
|
270
270
|
return {
|
|
271
|
-
color: 'grey-
|
|
271
|
+
color: 'grey-10',
|
|
272
272
|
icon: 'sym_r_delete',
|
|
273
273
|
variant: 'tertiary',
|
|
274
274
|
disable: props.disable || !!option.disable,
|
|
@@ -149,7 +149,7 @@ export default {
|
|
|
149
149
|
field: name,
|
|
150
150
|
label,
|
|
151
151
|
name,
|
|
152
|
-
headerClasses: 'text-grey-
|
|
152
|
+
headerClasses: 'text-grey-10'
|
|
153
153
|
})
|
|
154
154
|
}
|
|
155
155
|
|
|
@@ -333,13 +333,17 @@ export default {
|
|
|
333
333
|
|
|
334
334
|
td {
|
|
335
335
|
@include set-typography($body1);
|
|
336
|
+
|
|
337
|
+
&:before {
|
|
338
|
+
transition: background-color var(--qas-generic-transition);
|
|
339
|
+
}
|
|
336
340
|
}
|
|
337
341
|
|
|
338
342
|
tr {
|
|
339
|
-
transition: background-color var(--qas-generic-transition);
|
|
340
|
-
|
|
341
343
|
&:hover {
|
|
342
|
-
|
|
344
|
+
td:before {
|
|
345
|
+
background-color: var(--qas-background-color);
|
|
346
|
+
}
|
|
343
347
|
}
|
|
344
348
|
}
|
|
345
349
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
</slot>
|
|
22
22
|
|
|
23
23
|
<slot :item="item" name="description">
|
|
24
|
-
<div class="text-body1 text-grey-
|
|
24
|
+
<div class="text-body1 text-grey-10">
|
|
25
25
|
{{ item[descriptionKey] }}
|
|
26
26
|
</div>
|
|
27
27
|
</slot>
|
|
@@ -89,7 +89,7 @@ function getFormattedValue (item, mask) {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
.q-timeline__subtitle {
|
|
92
|
-
color: $
|
|
92
|
+
color: $grey-10;
|
|
93
93
|
opacity: initial;
|
|
94
94
|
padding-right: 0;
|
|
95
95
|
position: relative;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
<span v-if="hasMenuButton(node)" class="q-ml-sm">
|
|
11
11
|
<!-- TODO: rever para o uso QasActionsMenu -->
|
|
12
|
-
<qas-btn color="grey-
|
|
12
|
+
<qas-btn color="grey-10" icon="sym_r_more_vert" variant="tertiary" @click.stop.prevent>
|
|
13
13
|
<q-menu auto-close>
|
|
14
14
|
<q-list separator>
|
|
15
15
|
<q-item v-if="useAddButton" v-ripple class="qas-tree-generator__item" clickable @click="handleTreeFormDialog(node, true, tree)">
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
<div class="q-mb-xl qas-welcome text-left">
|
|
3
3
|
<div class="items-center justify-between row">
|
|
4
4
|
<div>
|
|
5
|
-
<h3 class="text-
|
|
5
|
+
<h3 class="text-h3">
|
|
6
6
|
{{ welcomeMessage }}<span v-if="firstName">, {{ firstName }}</span>
|
|
7
7
|
</h3>
|
|
8
8
|
|
|
9
|
-
<div class="text-caption
|
|
9
|
+
<div class="text-caption">{{ currentDay }}</div>
|
|
10
10
|
</div>
|
|
11
11
|
|
|
12
12
|
<slot name="actions">
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { reactive, computed } from 'vue'
|
|
2
|
-
import { findLastIndex } from 'lodash-es'
|
|
3
2
|
|
|
4
3
|
const history = reactive({ list: [] })
|
|
5
4
|
|
|
@@ -7,17 +6,18 @@ export default function () {
|
|
|
7
6
|
const hasPreviousRoute = computed(() => history.list.length > 1)
|
|
8
7
|
|
|
9
8
|
function getPreviousRoute (currentRoute) {
|
|
10
|
-
const index =
|
|
9
|
+
const index = history.list.findLastIndex(item => item.name === currentRoute.name)
|
|
11
10
|
|
|
12
11
|
if (~index) {
|
|
13
12
|
history.list.splice(index, 1)
|
|
14
13
|
}
|
|
15
14
|
|
|
16
|
-
return history.list
|
|
15
|
+
return history.list.at(-1)
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
function addRoute (route) {
|
|
20
|
-
const
|
|
19
|
+
const lastRoute = history.list?.at(-1)
|
|
20
|
+
const routeExistsInList = lastRoute?.name === route.name
|
|
21
21
|
|
|
22
22
|
if (routeExistsInList) return
|
|
23
23
|
|
|
@@ -1,4 +1,24 @@
|
|
|
1
|
-
.q-field
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
.q-field {
|
|
2
|
+
&__label,
|
|
3
|
+
&--dense &__label {
|
|
4
|
+
@include set-typography($body1);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
&__native,
|
|
8
|
+
&__input,
|
|
9
|
+
&--dense &__native,
|
|
10
|
+
&--dense &__input {
|
|
11
|
+
@include set-typography($body1);
|
|
12
|
+
|
|
13
|
+
color: $grey-10;
|
|
14
|
+
|
|
15
|
+
&::placeholder {
|
|
16
|
+
color: $grey-6;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&--outlined .q-field__control {
|
|
21
|
+
background-color: white;
|
|
22
|
+
border-radius: $generic-border-radius;
|
|
23
|
+
}
|
|
4
24
|
}
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
-
.q-
|
|
2
|
-
|
|
1
|
+
.q-radio {
|
|
2
|
+
&__label {
|
|
3
|
+
@include set-typography($body1);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
&__inner::before {
|
|
7
|
+
color: $primary;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&.disabled {
|
|
11
|
+
.q-radio__label,
|
|
12
|
+
.q-radio__inner {
|
|
13
|
+
color: $grey-6;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
3
16
|
}
|
|
@@ -33,7 +33,7 @@ $h3: (
|
|
|
33
33
|
);
|
|
34
34
|
|
|
35
35
|
$h4: (
|
|
36
|
-
size: 1.
|
|
36
|
+
size: 1.25rem,
|
|
37
37
|
line-height: 140%,
|
|
38
38
|
letter-spacing: 0,
|
|
39
39
|
weight: 600,
|
|
@@ -137,3 +137,13 @@ $h-tags: (
|
|
|
137
137
|
margin: map.get($value, 'margin');
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
+
|
|
141
|
+
// Defini as cores para os headings
|
|
142
|
+
h1, .text-h1,
|
|
143
|
+
h2, .text-h2,
|
|
144
|
+
h3, .text-h3,
|
|
145
|
+
h4, .text-h4,
|
|
146
|
+
h5, .text-h5,
|
|
147
|
+
h6, .text-h6 {
|
|
148
|
+
color: $grey-10;
|
|
149
|
+
}
|
package/src/index.scss
CHANGED
|
@@ -9,7 +9,7 @@ $accent: var(--q-accent);
|
|
|
9
9
|
|
|
10
10
|
// Asteroid variables
|
|
11
11
|
:root {
|
|
12
|
-
--qas-background-color:
|
|
12
|
+
--qas-background-color: rgba(15, 83, 175, 0.03);
|
|
13
13
|
--qas-border-grey: #{$grey-4};
|
|
14
14
|
--qas-generic-border-radius: 4px;
|
|
15
15
|
--qas-generic-transition: 300ms;
|
|
@@ -25,6 +25,9 @@ $border-grey: var(--qas-border-grey);
|
|
|
25
25
|
// variables
|
|
26
26
|
@import './css/variables/index';
|
|
27
27
|
|
|
28
|
+
// mixins
|
|
29
|
+
@import './css/mixins/index';
|
|
30
|
+
|
|
28
31
|
// components
|
|
29
32
|
@import './css/components/index';
|
|
30
33
|
|
|
@@ -33,6 +36,3 @@ $border-grey: var(--qas-border-grey);
|
|
|
33
36
|
|
|
34
37
|
// utils
|
|
35
38
|
@import './css/utils/index';
|
|
36
|
-
|
|
37
|
-
// mixins
|
|
38
|
-
@import './css/mixins/index';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="container error-component flex">
|
|
3
3
|
<div class="column full-width items-center justify-center row">
|
|
4
|
-
<h2 :aria-label="ariaLabelCode" class="q-mb-sm text-
|
|
4
|
+
<h2 :aria-label="ariaLabelCode" class="q-mb-sm text-h2" role="heading">
|
|
5
5
|
{{ code }}
|
|
6
6
|
</h2>
|
|
7
7
|
|
|
@@ -56,7 +56,6 @@ export default {
|
|
|
56
56
|
|
|
57
57
|
<style lang="scss">
|
|
58
58
|
.error-component {
|
|
59
|
-
background-color: var(--qas-background-color);
|
|
60
59
|
min-height: 100vh;
|
|
61
60
|
padding: var(--qas-spacing-3xl) 0;
|
|
62
61
|
|
|
@@ -7,7 +7,7 @@ import QasDialog from '../../components/dialog/QasDialog.vue'
|
|
|
7
7
|
* @example Dialog({ card: { title: 'Esse é o meu titulo!' } })
|
|
8
8
|
*/
|
|
9
9
|
export default (componentProps = {}) => {
|
|
10
|
-
Dialog.create({
|
|
10
|
+
return Dialog.create({
|
|
11
11
|
component: QasDialog,
|
|
12
12
|
componentProps: { ...componentProps, usePlugin: true }
|
|
13
13
|
})
|
package/src/vue-plugin.js
CHANGED