@bildvitta/quasar-ui-asteroid 3.13.0-beta.8 → 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/QasActions.vue +54 -47
- package/src/components/actions-menu/QasActionsMenu.vue +147 -149
- package/src/components/actions-menu/QasActionsMenu.yml +13 -0
- package/src/components/app-bar/QasAppBar.vue +59 -87
- package/src/components/app-menu/QasAppMenu.vue +128 -256
- package/src/components/app-menu/composables/use-app-menu-dropdown.js +71 -0
- package/src/components/app-menu/composables/use-app-user.js +46 -0
- package/src/components/app-menu/composables/use-development-badge.js +23 -0
- package/src/components/app-menu/private/PvAppMenuDropdown.vue +33 -39
- package/src/components/app-user/QasAppUser.vue +94 -92
- package/src/components/avatar/QasAvatar.vue +67 -85
- package/src/components/avatar/enums/AvatarColors.js +9 -0
- package/src/components/badge/QasBadge.vue +21 -22
- package/src/components/badge/QasBadge.yml +1 -1
- package/src/components/box/QasBox.vue +17 -19
- package/src/components/btn/QasBtn.vue +132 -135
- 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 +135 -244
- package/src/components/dialog/composables/use-cancel.js +40 -0
- package/src/components/dialog/composables/use-dynamic-components.js +86 -0
- package/src/components/dialog/composables/use-ok.js +45 -0
- package/src/components/filters/QasFilters.vue +1 -1
- package/src/components/filters/private/PvFiltersButton.vue +2 -2
- package/src/components/form-generator/QasFormGenerator.yml +1 -1
- 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 +37 -14
- package/src/components/nested-fields/QasNestedFields.yml +63 -17
- 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/enums/Align.js +7 -0
- 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
|
@@ -16,53 +16,47 @@
|
|
|
16
16
|
</div>
|
|
17
17
|
</template>
|
|
18
18
|
|
|
19
|
-
<script>
|
|
20
|
-
|
|
21
|
-
name: 'PvAppMenuDropdown',
|
|
19
|
+
<script setup>
|
|
20
|
+
import { computed } from 'vue'
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
buttonDropdownProps: {
|
|
25
|
-
type: Object,
|
|
26
|
-
default: () => ({})
|
|
27
|
-
},
|
|
22
|
+
defineOptions({ name: 'PvAppMenuDropdown' })
|
|
28
23
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
modules: {
|
|
35
|
-
type: Array,
|
|
36
|
-
default: () => []
|
|
37
|
-
}
|
|
24
|
+
const props = defineProps({
|
|
25
|
+
buttonDropdownProps: {
|
|
26
|
+
type: Object,
|
|
27
|
+
default: () => ({})
|
|
38
28
|
},
|
|
39
29
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
...this.buttonDropdownProps,
|
|
44
|
-
|
|
45
|
-
buttonProps: {
|
|
46
|
-
align: 'between',
|
|
47
|
-
class: 'text-subtitle2',
|
|
48
|
-
color: 'primary',
|
|
49
|
-
iconRight: 'sym_r_expand_more',
|
|
50
|
-
label: this.currentModule.label,
|
|
51
|
-
useEllipsis: true,
|
|
52
|
-
useLabelOnSmallScreen: true
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
30
|
+
currentModule: {
|
|
31
|
+
type: Object,
|
|
32
|
+
default: () => ({})
|
|
56
33
|
},
|
|
57
34
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
35
|
+
modules: {
|
|
36
|
+
type: Array,
|
|
37
|
+
default: () => []
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
const defaultButtonDropdownProps = computed(() => ({
|
|
42
|
+
...props.buttonDropdownProps,
|
|
62
43
|
|
|
63
|
-
|
|
64
|
-
|
|
44
|
+
buttonProps: {
|
|
45
|
+
align: 'between',
|
|
46
|
+
class: 'text-subtitle2',
|
|
47
|
+
color: 'primary',
|
|
48
|
+
iconRight: 'sym_r_expand_more',
|
|
49
|
+
label: props.currentModule.label,
|
|
50
|
+
useEllipsis: true,
|
|
51
|
+
useLabelOnSmallScreen: true
|
|
65
52
|
}
|
|
53
|
+
}))
|
|
54
|
+
|
|
55
|
+
function isActive ({ value }) {
|
|
56
|
+
const { host, protocol } = window.location
|
|
57
|
+
const url = `${protocol}//${host}`
|
|
58
|
+
|
|
59
|
+
return url.includes(value)
|
|
66
60
|
}
|
|
67
61
|
</script>
|
|
68
62
|
|
|
@@ -2,20 +2,33 @@
|
|
|
2
2
|
<div class="cursor-pointer items-center no-wrap q-gutter-sm qas-app-user row" data-cy="app-user">
|
|
3
3
|
<div class="relative-position">
|
|
4
4
|
<qas-avatar :image="user.photo" :size="avatarSize" :title="userName" />
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
<q-badge v-if="hasNotifications" color="red" floating>
|
|
7
|
+
{{ notifications.count }}
|
|
8
|
+
</q-badge>
|
|
6
9
|
</div>
|
|
7
10
|
|
|
8
11
|
<div class="ellipsis qas-app-user__data">
|
|
9
|
-
<div class="ellipsis qas-app-user__name text-grey-
|
|
10
|
-
|
|
12
|
+
<div class="ellipsis qas-app-user__name text-grey-10">
|
|
13
|
+
{{ userName }}
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<div class="ellipsis qas-app-user__email text-grey-8">
|
|
17
|
+
{{ user.email }}
|
|
18
|
+
</div>
|
|
11
19
|
</div>
|
|
12
20
|
|
|
13
|
-
<q-menu class="shadow-2 text-grey-
|
|
21
|
+
<q-menu class="shadow-2 text-grey-10" max-height="400px" v-bind="menuProps">
|
|
14
22
|
<div class="q-pb-sm q-pt-md q-px-md qas-app-user__menu">
|
|
15
|
-
<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
|
+
|
|
25
|
+
<div class="ellipsis qas-app-user__menu-name">
|
|
26
|
+
{{ userName }}
|
|
27
|
+
</div>
|
|
16
28
|
|
|
17
|
-
<div class="ellipsis
|
|
18
|
-
|
|
29
|
+
<div class="ellipsis">
|
|
30
|
+
{{ user.email }}
|
|
31
|
+
</div>
|
|
19
32
|
|
|
20
33
|
<qas-select v-if="hasCompaniesSelect" v-model="companiesModel" class="q-my-md" v-bind="defaultCompanyProps" data-cy="app-user-companies-select" @update:model-value="setCompanies" />
|
|
21
34
|
|
|
@@ -25,7 +38,9 @@
|
|
|
25
38
|
<q-icon name="sym_r_person" />
|
|
26
39
|
</q-item-section>
|
|
27
40
|
|
|
28
|
-
<q-item-section>
|
|
41
|
+
<q-item-section>
|
|
42
|
+
Editar
|
|
43
|
+
</q-item-section>
|
|
29
44
|
</q-item>
|
|
30
45
|
|
|
31
46
|
<q-item v-if="hasNotifications" v-close-popup class="qas-app-user__menu-item" clickable>
|
|
@@ -33,10 +48,14 @@
|
|
|
33
48
|
<q-icon name="sym_r_notifications" />
|
|
34
49
|
</q-item-section>
|
|
35
50
|
|
|
36
|
-
<q-item-section>
|
|
51
|
+
<q-item-section>
|
|
52
|
+
Notificações
|
|
53
|
+
</q-item-section>
|
|
37
54
|
|
|
38
55
|
<q-item-section side>
|
|
39
|
-
<q-badge color="red">
|
|
56
|
+
<q-badge color="red">
|
|
57
|
+
{{ notifications.count }}
|
|
58
|
+
</q-badge>
|
|
40
59
|
</q-item-section>
|
|
41
60
|
</q-item>
|
|
42
61
|
|
|
@@ -45,7 +64,9 @@
|
|
|
45
64
|
<q-icon name="sym_r_logout" />
|
|
46
65
|
</q-item-section>
|
|
47
66
|
|
|
48
|
-
<q-item-section>
|
|
67
|
+
<q-item-section>
|
|
68
|
+
Sair
|
|
69
|
+
</q-item-section>
|
|
49
70
|
</q-item>
|
|
50
71
|
</q-list>
|
|
51
72
|
</div>
|
|
@@ -53,110 +74,91 @@
|
|
|
53
74
|
</div>
|
|
54
75
|
</template>
|
|
55
76
|
|
|
56
|
-
<script>
|
|
77
|
+
<script setup>
|
|
57
78
|
import QasAvatar from '../avatar/QasAvatar.vue'
|
|
58
79
|
|
|
59
|
-
|
|
60
|
-
|
|
80
|
+
import { NotifySuccess, NotifyError } from '../../plugins'
|
|
81
|
+
|
|
82
|
+
import { ref, computed, watch, inject } from 'vue'
|
|
61
83
|
|
|
62
|
-
|
|
63
|
-
|
|
84
|
+
defineOptions({ name: 'QasAppUser' })
|
|
85
|
+
|
|
86
|
+
const props = defineProps({
|
|
87
|
+
avatarSize: {
|
|
88
|
+
default: '40px',
|
|
89
|
+
type: String
|
|
64
90
|
},
|
|
65
91
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
type: String
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
companyProps: {
|
|
73
|
-
default: () => ({}),
|
|
74
|
-
type: Object
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
menuProps: {
|
|
78
|
-
default: () => ({}),
|
|
79
|
-
type: Object
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
notifications: {
|
|
83
|
-
default: () => ({}),
|
|
84
|
-
type: Object
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
user: {
|
|
88
|
-
default: () => ({}),
|
|
89
|
-
required: true,
|
|
90
|
-
type: Object
|
|
91
|
-
}
|
|
92
|
+
companyProps: {
|
|
93
|
+
default: () => ({}),
|
|
94
|
+
type: Object
|
|
92
95
|
},
|
|
93
96
|
|
|
94
|
-
|
|
97
|
+
menuProps: {
|
|
98
|
+
default: () => ({}),
|
|
99
|
+
type: Object
|
|
100
|
+
},
|
|
95
101
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
loading: false
|
|
100
|
-
}
|
|
102
|
+
notifications: {
|
|
103
|
+
default: () => ({}),
|
|
104
|
+
type: Object
|
|
101
105
|
},
|
|
102
106
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
+
user: {
|
|
108
|
+
default: () => ({}),
|
|
109
|
+
required: true,
|
|
110
|
+
type: Object
|
|
111
|
+
}
|
|
112
|
+
})
|
|
107
113
|
|
|
108
|
-
|
|
114
|
+
const emits = defineEmits(['sign-out'])
|
|
109
115
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
},
|
|
116
|
+
// vindo direto do boot api.js
|
|
117
|
+
const axios = inject('axios')
|
|
114
118
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
},
|
|
119
|
+
const companiesModel = ref('')
|
|
120
|
+
const loading = ref(false)
|
|
118
121
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
+
const defaultCompanyProps = computed(() => {
|
|
123
|
+
return {
|
|
124
|
+
loading: loading.value,
|
|
122
125
|
|
|
123
|
-
|
|
124
|
-
return !!this.companyProps.options?.length
|
|
125
|
-
}
|
|
126
|
-
},
|
|
126
|
+
...props.companyProps,
|
|
127
127
|
|
|
128
|
-
|
|
129
|
-
'
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
},
|
|
128
|
+
// não é possível alterar o label.
|
|
129
|
+
label: 'Vínculo'
|
|
130
|
+
}
|
|
131
|
+
})
|
|
133
132
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
},
|
|
133
|
+
const hasCompaniesSelect = computed(() => !!props.companyProps.options?.length)
|
|
134
|
+
const hasNotifications = computed(() => !!Object.keys(props.notifications).length)
|
|
137
135
|
|
|
138
|
-
|
|
139
|
-
signOut () {
|
|
140
|
-
this.$emit('sign-out')
|
|
141
|
-
},
|
|
136
|
+
const userName = computed(() => props.user.name || props.user.givenName)
|
|
142
137
|
|
|
143
|
-
|
|
144
|
-
|
|
138
|
+
// watch
|
|
139
|
+
watch(() => props.companyProps.modelValue, value => {
|
|
140
|
+
companiesModel.value = value
|
|
141
|
+
}, { immediate: true })
|
|
145
142
|
|
|
146
|
-
|
|
147
|
-
|
|
143
|
+
// métodos
|
|
144
|
+
function signOut () {
|
|
145
|
+
emits('sign-out')
|
|
146
|
+
}
|
|
148
147
|
|
|
149
|
-
|
|
148
|
+
async function setCompanies (value) {
|
|
149
|
+
loading.value = true
|
|
150
150
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
151
|
+
try {
|
|
152
|
+
await axios.patch('users/me', { companies: value })
|
|
153
|
+
setTimeout(() => location.reload(), 1500)
|
|
154
154
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
155
|
+
NotifySuccess('Vínculo alterado com sucesso.')
|
|
156
|
+
} catch {
|
|
157
|
+
companiesModel.value = props.companyProps.modelValue
|
|
158
|
+
|
|
159
|
+
NotifyError('Falha ao alterar vínculo.')
|
|
160
|
+
} finally {
|
|
161
|
+
loading.value = false
|
|
160
162
|
}
|
|
161
163
|
}
|
|
162
164
|
</script>
|
|
@@ -6,103 +6,85 @@
|
|
|
6
6
|
</q-avatar>
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
|
-
<script>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Grey4: 'grey-4'
|
|
14
|
-
}
|
|
9
|
+
<script setup>
|
|
10
|
+
import { AvatarColors } from './enums/AvatarColors'
|
|
11
|
+
|
|
12
|
+
import { ref, computed, watch, useAttrs } from 'vue'
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
defineOptions({
|
|
17
15
|
name: 'QasAvatar',
|
|
16
|
+
inheritAttrs: false
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const props = defineProps({
|
|
20
|
+
color: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: AvatarColors.Primary,
|
|
23
|
+
validator: value => {
|
|
24
|
+
const availableColors = Object.values(AvatarColors)
|
|
18
25
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
props: {
|
|
22
|
-
color: {
|
|
23
|
-
type: String,
|
|
24
|
-
default: AvatarColors.Primary,
|
|
25
|
-
validator: value => {
|
|
26
|
-
const availableColors = Object.values(AvatarColors)
|
|
27
|
-
|
|
28
|
-
return availableColors.includes(value)
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
size: {
|
|
33
|
-
type: String,
|
|
34
|
-
default: ''
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
icon: {
|
|
38
|
-
default: 'sym_r_error',
|
|
39
|
-
type: String
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
image: {
|
|
43
|
-
default: '',
|
|
44
|
-
type: String
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
title: {
|
|
48
|
-
default: '',
|
|
49
|
-
type: String
|
|
26
|
+
return availableColors.includes(value)
|
|
50
27
|
}
|
|
51
28
|
},
|
|
52
29
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
30
|
+
size: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: ''
|
|
57
33
|
},
|
|
58
34
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
hasImage () {
|
|
65
|
-
return !this.hasImageError && !!this.image
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
hasTitle () {
|
|
69
|
-
return !!this.title
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
attributes () {
|
|
73
|
-
const {
|
|
74
|
-
rounded,
|
|
75
|
-
square,
|
|
76
|
-
fontSize,
|
|
77
|
-
textColor,
|
|
78
|
-
...attributes
|
|
79
|
-
} = this.$attrs
|
|
80
|
-
|
|
81
|
-
const colors = {
|
|
82
|
-
[AvatarColors.Primary]: 'white',
|
|
83
|
-
[AvatarColors.SecondaryContrast]: 'primary',
|
|
84
|
-
[AvatarColors.Grey4]: 'grey-8'
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return {
|
|
88
|
-
size: this.size,
|
|
89
|
-
color: this.color,
|
|
90
|
-
textColor: colors[this.color],
|
|
91
|
-
...attributes
|
|
92
|
-
}
|
|
93
|
-
}
|
|
35
|
+
icon: {
|
|
36
|
+
default: 'sym_r_error',
|
|
37
|
+
type: String
|
|
94
38
|
},
|
|
95
39
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
40
|
+
image: {
|
|
41
|
+
default: '',
|
|
42
|
+
type: String
|
|
100
43
|
},
|
|
101
44
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
45
|
+
title: {
|
|
46
|
+
default: '',
|
|
47
|
+
type: String
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
const attrs = useAttrs()
|
|
52
|
+
|
|
53
|
+
const hasImageError = ref(false)
|
|
54
|
+
|
|
55
|
+
const attributes = computed(() => {
|
|
56
|
+
const {
|
|
57
|
+
rounded,
|
|
58
|
+
square,
|
|
59
|
+
fontSize,
|
|
60
|
+
textColor,
|
|
61
|
+
...attributes
|
|
62
|
+
} = attrs
|
|
63
|
+
|
|
64
|
+
const colors = {
|
|
65
|
+
[AvatarColors.Primary]: 'white',
|
|
66
|
+
[AvatarColors.SecondaryContrast]: 'primary',
|
|
67
|
+
[AvatarColors.Grey4]: 'grey-8'
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return {
|
|
71
|
+
size: props.size,
|
|
72
|
+
color: props.color,
|
|
73
|
+
textColor: colors[props.color],
|
|
74
|
+
...attributes
|
|
106
75
|
}
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
const firstLetter = computed(() => props.title[0].toUpperCase())
|
|
79
|
+
|
|
80
|
+
const hasImage = computed(() => !hasImageError.value && !!props.image)
|
|
81
|
+
const hasTitle = computed(() => !!props.title)
|
|
82
|
+
|
|
83
|
+
watch(() => props.image, () => {
|
|
84
|
+
hasImageError.value = false
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
function onImageLoadedError () {
|
|
88
|
+
hasImageError.value = true
|
|
107
89
|
}
|
|
108
90
|
</script>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Para utilizar este enum dentro do defineProps, é necessário externalizar e importar
|
|
3
|
+
* ou definir este enum em outro "<script>" fora do "<script setup>".
|
|
4
|
+
*/
|
|
5
|
+
export const AvatarColors = {
|
|
6
|
+
Primary: 'primary',
|
|
7
|
+
SecondaryContrast: 'secondary-contrast',
|
|
8
|
+
Grey4: 'grey-4'
|
|
9
|
+
}
|
|
@@ -1,36 +1,35 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<q-badge v-bind="
|
|
2
|
+
<q-badge v-bind="props" :aria-multiline="props.multiLine" class="q-px-sm q-py-xs qas-badge text-caption">
|
|
3
3
|
<slot />
|
|
4
4
|
</q-badge>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
|
-
<script>
|
|
8
|
-
|
|
7
|
+
<script setup>
|
|
8
|
+
defineOptions({
|
|
9
9
|
name: 'QasBadge',
|
|
10
|
+
inheritAttrs: false
|
|
11
|
+
})
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
color: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: 'light-blue-2'
|
|
17
|
+
},
|
|
12
18
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
19
|
+
label: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: ''
|
|
22
|
+
},
|
|
18
23
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
24
|
+
multiLine: {
|
|
25
|
+
type: Boolean
|
|
26
|
+
},
|
|
23
27
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
textColor: {
|
|
29
|
-
type: String,
|
|
30
|
-
default: 'grey-9'
|
|
31
|
-
}
|
|
28
|
+
textColor: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: 'black'
|
|
32
31
|
}
|
|
33
|
-
}
|
|
32
|
+
})
|
|
34
33
|
</script>
|
|
35
34
|
|
|
36
35
|
<style lang="scss">
|
|
@@ -1,30 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="bg-white q-pa-md rounded-borders" :class="
|
|
2
|
+
<div class="bg-white q-pa-md rounded-borders" :class="boxClasses">
|
|
3
3
|
<slot />
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
|
-
<script>
|
|
8
|
-
|
|
9
|
-
name: 'QasBox',
|
|
7
|
+
<script setup>
|
|
8
|
+
import { computed } from 'vue'
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
outlined: {
|
|
13
|
-
type: Boolean
|
|
14
|
-
},
|
|
10
|
+
defineOptions({ name: 'QasBox' })
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
outlined: {
|
|
14
|
+
type: Boolean
|
|
19
15
|
},
|
|
20
16
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return {
|
|
24
|
-
'border-grey': this.outlined,
|
|
25
|
-
'shadow-2': !this.unelevated
|
|
26
|
-
}
|
|
27
|
-
}
|
|
17
|
+
unelevated: {
|
|
18
|
+
type: Boolean
|
|
28
19
|
}
|
|
29
|
-
}
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
const boxClasses = computed(() => {
|
|
23
|
+
return {
|
|
24
|
+
'border-grey': props.outlined,
|
|
25
|
+
'shadow-2': !props.unelevated
|
|
26
|
+
}
|
|
27
|
+
})
|
|
30
28
|
</script>
|