@bildvitta/quasar-ui-asteroid 2.16.0 → 3.0.0-alpha.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.
- package/dist/api/QasActions.json +40 -0
- package/dist/api/QasActionsMenu.json +64 -0
- package/dist/api/QasAlert.json +40 -0
- package/dist/api/QasAppBar.json +52 -0
- package/dist/api/QasAppMenu.json +38 -0
- package/dist/api/QasAvatar.json +44 -0
- package/dist/api/QasBox.json +16 -0
- package/dist/api/QasBreakline.json +32 -0
- package/dist/api/QasBtn.json +16 -0
- package/dist/api/QasCard.json +52 -0
- package/dist/api/QasCheckboxGroup.json +38 -0
- package/dist/api/QasCopy.json +29 -0
- package/dist/api/QasDateTimeInput.json +60 -0
- package/dist/api/QasDebugger.json +13 -0
- package/dist/api/QasDelete.json +64 -0
- package/dist/api/QasDialog.json +109 -0
- package/dist/api/QasDialogRouter.json +31 -0
- package/dist/api/QasField.json +56 -0
- package/dist/api/QasFilters.json +111 -0
- package/dist/api/QasFormGenerator.json +92 -0
- package/dist/api/QasFormView.json +228 -0
- package/dist/api/QasGallery.json +54 -0
- package/dist/api/QasGridGenerator.json +108 -0
- package/dist/api/QasInput.json +40 -0
- package/dist/api/QasLabel.json +40 -0
- package/dist/api/QasLayout.json +47 -0
- package/dist/api/QasListItems.json +72 -0
- package/dist/api/QasListView.json +161 -0
- package/dist/api/QasMap.json +41 -0
- package/dist/api/QasNestedFields.json +223 -0
- package/dist/api/QasNumericInput.json +68 -0
- package/dist/api/QasPageHeader.json +36 -0
- package/dist/api/QasPasswordInput.json +121 -0
- package/dist/api/QasPasswordStrengthChecker.json +126 -0
- package/dist/api/QasProfile.json +74 -0
- package/dist/api/QasResizer.json +34 -0
- package/dist/api/QasSearchBox.json +91 -0
- package/dist/api/QasSelect.json +88 -0
- package/dist/api/QasSelectList.json +134 -0
- package/dist/api/QasSignaturePad.json +63 -0
- package/dist/api/QasSignatureUploader.json +41 -0
- package/dist/api/QasSingleView.json +147 -0
- package/dist/api/QasSortable.json +80 -0
- package/dist/api/QasTableGenerator.json +56 -0
- package/dist/api/QasTabsGenerator.json +90 -0
- package/dist/api/QasTextTruncate.json +38 -0
- package/dist/api/QasTransfer.json +70 -0
- package/dist/api/QasUploader.json +143 -0
- package/dist/asteroid.cjs.css +1 -0
- package/dist/asteroid.cjs.js +9307 -0
- package/dist/asteroid.cjs.min.js +6 -0
- package/dist/asteroid.esm.css +1 -0
- package/dist/asteroid.esm.js +9298 -0
- package/dist/asteroid.esm.min.js +6 -0
- package/dist/asteroid.umd.css +1 -0
- package/dist/asteroid.umd.js +9301 -0
- package/dist/asteroid.umd.min.js +6 -0
- package/dist/vetur/asteroid-attributes.json +1178 -0
- package/dist/vetur/asteroid-tags.json +535 -0
- package/package.json +41 -56
- package/src/assets/logo-modular.svg +1 -1
- package/src/asteroid.js +1 -0
- package/src/components/actions/QasActions.vue +45 -0
- package/src/components/actions/QasActions.yml +24 -0
- package/src/components/actions-menu/QasActionsMenu.vue +41 -14
- package/src/components/actions-menu/QasActionsMenu.yml +63 -0
- package/src/components/alert/QasAlert.vue +90 -0
- package/src/components/alert/QasAlert.yml +33 -0
- package/src/components/app-bar/QasAppBar.vue +16 -13
- package/src/components/app-bar/QasAppBar.yml +51 -0
- package/src/components/app-menu/QasAppMenu.vue +10 -12
- package/src/components/app-menu/QasAppMenu.yml +32 -0
- package/src/components/avatar/QasAvatar.vue +17 -9
- package/src/components/avatar/QasAvatar.yml +38 -0
- package/src/components/box/QasBox.vue +12 -4
- package/src/components/box/QasBox.yml +13 -0
- package/src/components/breakline/QasBreakline.vue +37 -0
- package/src/components/breakline/QasBreakline.yml +25 -0
- package/src/components/btn/QasBtn.vue +27 -24
- package/src/components/btn/QasBtn.yml +13 -0
- package/src/components/card/QasCard.vue +32 -33
- package/src/components/card/QasCard.yml +42 -0
- package/src/components/checkbox-group/QasCheckboxGroup.vue +50 -17
- package/src/components/checkbox-group/QasCheckboxGroup.yml +30 -0
- package/src/components/copy/QasCopy.vue +22 -11
- package/src/components/copy/QasCopy.yml +20 -0
- package/src/components/date-time-input/QasDateTimeInput.vue +18 -26
- package/src/components/date-time-input/QasDateTimeInput.yml +54 -0
- package/src/components/debugger/QasDebugger.vue +2 -0
- package/src/components/debugger/QasDebugger.yml +10 -0
- package/src/components/delete/QasDelete.vue +43 -16
- package/src/components/delete/QasDelete.yml +52 -0
- package/src/components/dialog/QasDialog.vue +63 -67
- package/src/components/dialog/QasDialog.yml +86 -0
- package/src/components/dialog-router/QasDialogRouter.vue +14 -4
- package/src/components/dialog-router/QasDialogRouter.yml +23 -0
- package/src/components/field/QasField.vue +21 -24
- package/src/components/field/QasField.yml +31 -0
- package/src/components/filters/QasFilters.vue +33 -26
- package/src/components/filters/QasFilters.yml +91 -0
- package/src/components/form-generator/QasFormGenerator.vue +13 -15
- package/src/components/form-generator/QasFormGenerator.yml +64 -0
- package/src/components/form-view/QasFormView.vue +129 -69
- package/src/components/form-view/QasFormView.yml +179 -0
- package/src/components/gallery/QasGallery.vue +47 -30
- package/src/components/gallery/QasGallery.yml +51 -0
- package/src/components/grid-generator/QasGridGenerator.vue +15 -7
- package/src/components/grid-generator/QasGridGenerator.yml +73 -0
- package/src/components/index.js +0 -0
- package/src/components/input/QasInput.vue +43 -36
- package/src/components/input/QasInput.yml +32 -0
- package/src/components/label/QasLabel.vue +14 -15
- package/src/components/label/QasLabel.yml +28 -0
- package/src/components/layout/QasLayout.vue +13 -21
- package/src/components/layout/QasLayout.yml +38 -0
- package/src/components/list-items/QasListItems.vue +15 -12
- package/src/components/list-items/QasListItems.yml +57 -0
- package/src/components/list-view/QasListView.vue +57 -31
- package/src/components/list-view/QasListView.yml +132 -0
- package/src/components/map/QasMap.vue +15 -31
- package/src/components/map/QasMap.yml +33 -0
- package/src/components/nested-fields/QasNestedFields.vue +57 -47
- package/src/components/nested-fields/QasNestedFields.yml +180 -0
- package/src/components/numeric-input/QasNumericInput.vue +31 -22
- package/src/components/numeric-input/QasNumericInput.yml +51 -0
- package/src/components/page-header/QasPageHeader.vue +20 -11
- package/src/components/page-header/QasPageHeader.yml +24 -0
- package/src/components/password-input/QasPasswordInput.vue +24 -21
- package/src/components/password-input/QasPasswordInput.yml +103 -0
- package/src/components/password-strength-checker/QasPasswordStrengthChecker.vue +51 -34
- package/src/components/password-strength-checker/QasPasswordStrengthChecker.yml +103 -0
- package/src/components/profile/QasProfile.vue +15 -13
- package/src/components/profile/QasProfile.yml +60 -0
- package/src/components/resizer/QasResizer.vue +3 -3
- package/src/components/resizer/QasResizer.yml +23 -0
- package/src/components/search-box/QasSearchBox.vue +50 -21
- package/src/components/search-box/QasSearchBox.yml +76 -0
- package/src/components/select/QasSelect.vue +51 -50
- package/src/components/select/QasSelect.yml +62 -0
- package/src/components/select-list/QasSelectList.vue +72 -53
- package/src/components/select-list/QasSelectList.yml +116 -0
- package/src/components/signature-pad/QasSignaturePad.vue +60 -40
- package/src/components/signature-pad/QasSignaturePad.yml +53 -0
- package/src/components/signature-uploader/QasSignatureUploader.vue +19 -17
- package/src/components/signature-uploader/QasSignatureUploader.yml +36 -0
- package/src/components/single-view/QasSingleView.vue +41 -22
- package/src/components/single-view/QasSingleView.yml +116 -0
- package/src/components/sortable/QasSortable.vue +51 -30
- package/src/components/sortable/QasSortable.yml +65 -0
- package/src/components/table-generator/QasTableGenerator.vue +112 -21
- package/src/components/table-generator/QasTableGenerator.yml +46 -0
- package/src/components/tabs-generator/QasTabsGenerator.vue +37 -25
- package/src/components/tabs-generator/QasTabsGenerator.yml +67 -0
- package/src/components/text-truncate/QasTextTruncate.vue +25 -17
- package/src/components/text-truncate/QasTextTruncate.yml +32 -0
- package/src/components/transfer/QasTransfer.vue +48 -49
- package/src/components/transfer/QasTransfer.yml +59 -0
- package/src/components/uploader/QasUploader.vue +169 -48
- package/src/components/uploader/QasUploader.yml +117 -0
- package/src/css/background.scss +1 -1
- package/src/css/border.scss +7 -6
- package/src/css/design-system.scss +0 -43
- package/src/css/fonts.scss +2 -28
- package/src/css/opacity.scss +0 -4
- package/src/css/set-brand.scss +15 -0
- package/src/css/transitions.scss +1 -1
- package/src/helpers/add-counter-suffix.js +3 -0
- package/src/helpers/{base64ToBlob.js → base-64-to-blob.js} +0 -0
- package/src/helpers/{constructObject.js → construct-object.js} +0 -0
- package/src/helpers/filter-object.js +8 -6
- package/src/helpers/filters.js +8 -4
- package/src/helpers/{greatestCommonDivisor.js → get-greatest-common-divisor.js} +0 -0
- package/src/helpers/get-slot-children-text.js +15 -0
- package/src/helpers/images.js +28 -0
- package/src/helpers/index.js +11 -59
- package/src/helpers/{isLocalDevelopment.js → is-local-development.js} +0 -0
- package/src/helpers/set-scroll-on-grab.js +61 -0
- package/src/index.cjs.js +1 -0
- package/src/index.esm.js +4 -0
- package/src/index.scss +19 -21
- package/src/index.umd.js +2 -0
- package/src/mixins/context.js +1 -1
- package/src/mixins/dialog-router.js +17 -0
- package/src/mixins/form.js +4 -12
- package/src/mixins/generator.js +14 -14
- package/src/mixins/index.js +2 -8
- package/src/mixins/password.js +73 -11
- package/src/mixins/screen.js +8 -6
- package/src/mixins/view.js +62 -22
- package/src/plugins/dialog/Dialog.js +14 -0
- package/src/plugins/dialog/Dialog.yml +10 -0
- package/src/plugins/index.js +4 -2
- package/src/plugins/{NotifyError.js → notify-error/NotifyError.js} +0 -0
- package/src/plugins/notify-error/NotifyError.yml +11 -0
- package/src/plugins/{NotifySuccess.js → notify-success/NotifySuccess.js} +3 -3
- package/src/plugins/notify-success/NotifySuccess.yml +11 -0
- package/src/store/history.js +43 -0
- package/src/store/index.js +1 -0
- package/src/vue-plugin.js +185 -0
- package/.babelrc +0 -12
- package/.storybook/main.js +0 -35
- package/.storybook/preview.js +0 -26
- package/debug.log +0 -1
- package/index.js +0 -4
- package/jest-setup.js +0 -1
- package/jest.config.json +0 -22
- package/postcss.config.js +0 -5
- package/src/components/Introduction.stories.mdx +0 -12
- package/src/components/actions-menu/QasActionsMenu.stories.js +0 -73
- package/src/components/app-bar/QasAppBar.stories.js +0 -84
- package/src/components/app-menu/QasAppMenu.stories.js +0 -66
- package/src/components/apps-menu/QasAppsMenu.spec.js +0 -58
- package/src/components/apps-menu/QasAppsMenu.stories.js +0 -54
- package/src/components/apps-menu/QasAppsMenu.vue +0 -48
- package/src/components/avatar/QasAvatar.spec.js +0 -14
- package/src/components/avatar/QasAvatar.stories.js +0 -52
- package/src/components/box/QasBox.spec.js +0 -18
- package/src/components/box/QasBox.stories.js +0 -35
- package/src/components/break-line/QasBreakLine.stories.js +0 -57
- package/src/components/break-line/QasBreakLine.vue +0 -52
- package/src/components/btn/QasBtn.stories.js +0 -45
- package/src/components/btn-actions/QasBtnActions.stories.js +0 -77
- package/src/components/btn-actions/QasBtnActions.vue +0 -54
- package/src/components/card/QasCard.stories.js +0 -126
- package/src/components/checkbox-group/QasCheckboxGroup.stories.js +0 -59
- package/src/components/copy/QasCopy.stories.js +0 -41
- package/src/components/date-time-input/QasDateTimeInput.stories.js +0 -67
- package/src/components/debugger/QasDebugger.stories.js +0 -33
- package/src/components/delete/QasDelete.stories.js +0 -80
- package/src/components/dialog/QasDialog.stories.js +0 -139
- package/src/components/dialog-router/QasDialogRouter.stories.js +0 -38
- package/src/components/field/QasField.stories.js +0 -181
- package/src/components/filters/QasFilters.stories.js +0 -121
- package/src/components/form-generator/QasFormGenerator.stories.js +0 -115
- package/src/components/form-view/QasFormView.stories.js +0 -236
- package/src/components/gallery/QasGallery.stories.js +0 -91
- package/src/components/grid-generator/QasGridGenerator.stories.js +0 -142
- package/src/components/input/QasInput.stories.js +0 -78
- package/src/components/label/QasLabel.stories.js +0 -60
- package/src/components/layout/QasLayout.stories.js +0 -104
- package/src/components/list-items/QasListItems.stories.js +0 -135
- package/src/components/list-view/QasListView.stories.js +0 -168
- package/src/components/map/QasMap.stories.js +0 -75
- package/src/components/nested-fields/QasNestedFields.stories.js +0 -255
- package/src/components/numeric-input/QasNumericInput.stories.js +0 -92
- package/src/components/page-header/QasPageHeader.stories.js +0 -61
- package/src/components/password-input/QasPasswordInput.stories.js +0 -76
- package/src/components/password-strength-checker/QasPasswordStrengthChecker.stories.js +0 -54
- package/src/components/profile/QasProfile.stories.js +0 -131
- package/src/components/resizer/QasResizer.stories.js +0 -43
- package/src/components/search-box/QasSearchBox.stories.js +0 -111
- package/src/components/select/QasSelect.stories.js +0 -113
- package/src/components/select-list/QasSelectList.stories.js +0 -153
- package/src/components/signature-pad/QasSignaturePad.stories.js +0 -51
- package/src/components/signature-uploader/QasSignatureUploader.stories.js +0 -69
- package/src/components/single-view/QasSingleView.stories.js +0 -130
- package/src/components/sortable/QasSortable.stories.js +0 -80
- package/src/components/table-generator/QasTableGenerator.stories.js +0 -120
- package/src/components/tabs-generator/QasTabsGenerator.stories.js +0 -145
- package/src/components/text-truncate/QasTextTruncate.stories.js +0 -55
- package/src/components/tip/QasTip.stories.js +0 -57
- package/src/components/tip/QasTip.vue +0 -68
- package/src/components/tooltip/QasTooltip.stories.js +0 -63
- package/src/components/tooltip/QasTooltip.vue +0 -81
- package/src/components/transfer/QasTransfer.stories.js +0 -118
- package/src/components/uploader/QasCustomUploader.vue +0 -120
- package/src/components/uploader/QasUploader.stories.js +0 -139
- package/src/directives/Test.js +0 -13
- package/src/helpers/historyHandler.js +0 -52
- package/src/helpers/label.js +0 -3
- package/src/index.js +0 -249
- package/src/mixins/map-markers.js +0 -26
- package/src/mixins/unsaved-changes.js +0 -24
- package/src/mixins/uploader.js +0 -30
- package/src/mocks/json/user.json +0 -27
- package/src/mocks/json/users-new.json +0 -23
- package/src/mocks/json/users.json +0 -97
- package/src/mocks/storeModule.js +0 -71
- package/src/pages/Forbidden.vue +0 -6
- package/src/pages/NotFound.vue +0 -6
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
type: component
|
|
2
|
+
|
|
3
|
+
mixins:
|
|
4
|
+
- quasar/dist/api/QAvatar.json
|
|
5
|
+
|
|
6
|
+
meta:
|
|
7
|
+
desc: Cria um elemento escalável e colorido que pode ter texto, ícone ou imagem em sua forma. Usa como base o componente [QAvatar](https://quasar.dev/vue-components/avatar#introduction).
|
|
8
|
+
|
|
9
|
+
props:
|
|
10
|
+
color:
|
|
11
|
+
desc: Cor de fundo (background-color).
|
|
12
|
+
type: String
|
|
13
|
+
examples: ['primary', 'positive']
|
|
14
|
+
|
|
15
|
+
dark:
|
|
16
|
+
desc: Habilita o modo escuro.
|
|
17
|
+
type: Boolean
|
|
18
|
+
|
|
19
|
+
icon:
|
|
20
|
+
desc: Ícone de fundo do avatar que vai aparecer caso não tenha imagem nem título.
|
|
21
|
+
default: o_error
|
|
22
|
+
type: String
|
|
23
|
+
|
|
24
|
+
image:
|
|
25
|
+
desc: Imagem de fundo (maior prioridade).
|
|
26
|
+
type: String
|
|
27
|
+
|
|
28
|
+
text-color:
|
|
29
|
+
desc: Cor de texto (caso não tenha imagem).
|
|
30
|
+
default: primary
|
|
31
|
+
type: String
|
|
32
|
+
|
|
33
|
+
title:
|
|
34
|
+
desc: Caso não tenha imagem, o avatar vai aparecer com a inicial do titulo.
|
|
35
|
+
type: String
|
|
36
|
+
examples: [
|
|
37
|
+
'John Doe'
|
|
38
|
+
]
|
|
@@ -1,21 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div class="bg-white q-px-md q-py-lg rounded-borders" :class="boxClass">
|
|
3
3
|
<slot />
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script>
|
|
8
8
|
export default {
|
|
9
|
+
name: 'QasBox',
|
|
10
|
+
|
|
9
11
|
props: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
outlined: {
|
|
13
|
+
type: Boolean
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
unelevated: {
|
|
12
17
|
type: Boolean
|
|
13
18
|
}
|
|
14
19
|
},
|
|
15
20
|
|
|
16
21
|
computed: {
|
|
17
22
|
boxClass () {
|
|
18
|
-
return
|
|
23
|
+
return {
|
|
24
|
+
'border-primary-contrast': this.outlined,
|
|
25
|
+
'shadow-primary': !this.unelevated
|
|
26
|
+
}
|
|
19
27
|
}
|
|
20
28
|
}
|
|
21
29
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type: component
|
|
2
|
+
|
|
3
|
+
meta:
|
|
4
|
+
desc: Um simples componente com fundo branco e bordas arredondadas para encapsular o seu conteúdo.
|
|
5
|
+
|
|
6
|
+
props:
|
|
7
|
+
outlined:
|
|
8
|
+
desc: Insere uma borda sólida em volta do componente.
|
|
9
|
+
type: Boolean
|
|
10
|
+
|
|
11
|
+
unelevated:
|
|
12
|
+
desc: Remove a sombra do componente.
|
|
13
|
+
type: Boolean
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component :is="tag" v-for="(line, index) in lines" :key="index" v-bind="$attrs">
|
|
3
|
+
{{ line }}
|
|
4
|
+
</component>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import { getSlotChildrenText } from '../../helpers'
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
name: 'QasBreakline',
|
|
12
|
+
|
|
13
|
+
props: {
|
|
14
|
+
split: {
|
|
15
|
+
default: '\n',
|
|
16
|
+
type: String
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
tag: {
|
|
20
|
+
default: 'div',
|
|
21
|
+
type: String
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
text: {
|
|
25
|
+
default: '',
|
|
26
|
+
type: String
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
computed: {
|
|
31
|
+
lines () {
|
|
32
|
+
const text = this.text || getSlotChildrenText(this.$slots.default())
|
|
33
|
+
return text.split(this.split)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
</script>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type: component
|
|
2
|
+
|
|
3
|
+
meta:
|
|
4
|
+
desc: Permite encapsular quebra de linhas (\n) de um texto em uma tag HTML ou componente Vue.
|
|
5
|
+
|
|
6
|
+
props:
|
|
7
|
+
split:
|
|
8
|
+
default: '\n'
|
|
9
|
+
desc: Carácter ou conjunto de caracteres que serão utilizados para dividir o texto.
|
|
10
|
+
type: String
|
|
11
|
+
|
|
12
|
+
tag:
|
|
13
|
+
default: div
|
|
14
|
+
desc: Tag HTML que será utilizada para encapsular o texto dividido.
|
|
15
|
+
examples: [p, span]
|
|
16
|
+
type: String
|
|
17
|
+
|
|
18
|
+
text:
|
|
19
|
+
default: ''
|
|
20
|
+
desc: Texto que será dividido.
|
|
21
|
+
type: String
|
|
22
|
+
|
|
23
|
+
slots:
|
|
24
|
+
default:
|
|
25
|
+
desc: Texto que será dividido.
|
|
@@ -1,43 +1,46 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<q-btn color="primary" no-caps unelevated v-bind="attributes">
|
|
3
|
+
<slot v-if="showLabel">{{ $attrs.label }}</slot>
|
|
4
|
+
|
|
5
|
+
<template v-for="(_, name) in slots" #[name]="context">
|
|
6
|
+
<slot :name="name" v-bind="context || {}" />
|
|
7
|
+
</template>
|
|
8
|
+
</q-btn>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
1
11
|
<script>
|
|
2
|
-
import {
|
|
12
|
+
import { screenMixin } from '../../mixins'
|
|
3
13
|
|
|
4
14
|
export default {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
props: {
|
|
8
|
-
color: {
|
|
9
|
-
default: 'primary',
|
|
10
|
-
type: String
|
|
11
|
-
},
|
|
15
|
+
name: 'QasBtn',
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
hideMobileLabel: {
|
|
15
|
-
type: Boolean
|
|
16
|
-
},
|
|
17
|
+
mixins: [screenMixin],
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
default: true,
|
|
20
|
-
type: Boolean
|
|
21
|
-
},
|
|
19
|
+
inheritAttrs: false,
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
props: {
|
|
22
|
+
hideLabelOnSmallScreen: {
|
|
25
23
|
type: Boolean
|
|
26
24
|
}
|
|
27
25
|
},
|
|
28
26
|
|
|
29
27
|
computed: {
|
|
30
|
-
|
|
28
|
+
attributes () {
|
|
29
|
+
const { label, ...attributes } = this.$attrs
|
|
30
|
+
return attributes
|
|
31
|
+
},
|
|
32
|
+
|
|
31
33
|
hasLabel () {
|
|
32
|
-
return !!this.label
|
|
34
|
+
return !!(this.$attrs.label || this.$slots.default)
|
|
33
35
|
},
|
|
34
36
|
|
|
35
|
-
|
|
36
|
-
return this
|
|
37
|
+
showLabel () {
|
|
38
|
+
return this.hasLabel && !(this.hideLabelOnSmallScreen && this.mx_isSmall)
|
|
37
39
|
},
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
slots () {
|
|
42
|
+
const { default: _, ...slots } = this.$slots
|
|
43
|
+
return slots
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
46
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type: component
|
|
2
|
+
|
|
3
|
+
mixins:
|
|
4
|
+
- quasar/dist/api/QBtn.json
|
|
5
|
+
|
|
6
|
+
meta:
|
|
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
|
+
|
|
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.
|
|
12
|
+
type: Boolean
|
|
13
|
+
default: 'false'
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="col-12 col-lg-3 col-md-4 col-sm-6">
|
|
3
|
-
<q-card class="border-radius-lg column full-height" :class="cardClasses">
|
|
4
|
-
<
|
|
3
|
+
<q-card class="border-radius-lg column full-height overflow-hidden" :class="cardClasses">
|
|
4
|
+
<header v-if="useHeader" class="overflow-hidden relative-position w-full">
|
|
5
5
|
<slot name="header">
|
|
6
6
|
<q-carousel v-model="slideImage" animated class="cursor-pointer" height="205px" infinite :navigation="hasImages" navigation-icon="o_fiber_manual_record" swipeable>
|
|
7
7
|
<template #navigation-icon="{ active, btnProps, onClick }">
|
|
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
12
|
</q-carousel>
|
|
13
|
+
|
|
12
14
|
<div class="absolute-top flex items-center q-pa-md">
|
|
13
15
|
<slot name="carousel-header" />
|
|
14
16
|
</div>
|
|
15
17
|
</slot>
|
|
16
|
-
</
|
|
18
|
+
</header>
|
|
17
19
|
|
|
18
20
|
<q-card-section class="col-grow column justify-between w-full">
|
|
19
|
-
<div class="w-full" :class="
|
|
21
|
+
<div class="w-full" :class="gutterClass">
|
|
20
22
|
<slot />
|
|
21
23
|
</div>
|
|
22
24
|
</q-card-section>
|
|
23
25
|
|
|
24
|
-
<div v-if="
|
|
26
|
+
<div v-if="hasActionsSlot" class="border-primary-contrast border-top overflow-hidden row">
|
|
25
27
|
<slot name="actions" />
|
|
26
28
|
</div>
|
|
27
29
|
</q-card>
|
|
@@ -30,29 +32,26 @@
|
|
|
30
32
|
|
|
31
33
|
<script>
|
|
32
34
|
export default {
|
|
35
|
+
name: 'QasCard',
|
|
36
|
+
|
|
33
37
|
props: {
|
|
34
38
|
bgImagePosition: {
|
|
35
39
|
type: String,
|
|
36
40
|
default: 'center'
|
|
37
41
|
},
|
|
38
42
|
|
|
43
|
+
formMode: {
|
|
44
|
+
type: Boolean
|
|
45
|
+
},
|
|
46
|
+
|
|
39
47
|
gutter: {
|
|
40
48
|
type: String,
|
|
41
49
|
default: 'sm'
|
|
42
50
|
},
|
|
43
51
|
|
|
44
52
|
images: {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
outlined: {
|
|
50
|
-
type: Boolean
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
result: {
|
|
54
|
-
type: Object,
|
|
55
|
-
default: () => ({})
|
|
53
|
+
default: () => [],
|
|
54
|
+
type: Array
|
|
56
55
|
},
|
|
57
56
|
|
|
58
57
|
useHeader: {
|
|
@@ -67,38 +66,38 @@ export default {
|
|
|
67
66
|
},
|
|
68
67
|
|
|
69
68
|
computed: {
|
|
70
|
-
|
|
71
|
-
return
|
|
69
|
+
bgImagePositionClass () {
|
|
70
|
+
return `bg-position-${this.bgImagePosition}`
|
|
72
71
|
},
|
|
73
72
|
|
|
74
|
-
|
|
75
|
-
return this.
|
|
73
|
+
cardClasses () {
|
|
74
|
+
return this.formMode ? 'bg-white border-primary no-shadow' : 'box-shadow-1'
|
|
76
75
|
},
|
|
77
76
|
|
|
78
|
-
|
|
79
|
-
return this.
|
|
77
|
+
gutterClass () {
|
|
78
|
+
return `q-col-gutter-${this.gutter}`
|
|
80
79
|
},
|
|
81
80
|
|
|
82
|
-
|
|
83
|
-
return this.
|
|
81
|
+
hasActionsSlot () {
|
|
82
|
+
return !!this.$slots.actions
|
|
84
83
|
},
|
|
85
84
|
|
|
86
|
-
|
|
87
|
-
return
|
|
85
|
+
hasImages () {
|
|
86
|
+
return this.images.length > 1
|
|
88
87
|
},
|
|
89
88
|
|
|
90
|
-
|
|
91
|
-
return
|
|
89
|
+
imagesLength () {
|
|
90
|
+
return this.images?.length
|
|
92
91
|
},
|
|
93
92
|
|
|
94
|
-
|
|
95
|
-
return
|
|
93
|
+
imagesList () {
|
|
94
|
+
return this.imagesLength && this.images.slice(0, 3)
|
|
96
95
|
}
|
|
97
96
|
},
|
|
98
97
|
|
|
99
98
|
methods: {
|
|
100
|
-
getNavigationIcon (active,
|
|
101
|
-
return active ? 'o_radio_button_checked' :
|
|
99
|
+
getNavigationIcon (active, { icon }) {
|
|
100
|
+
return active ? 'o_radio_button_checked' : icon
|
|
102
101
|
}
|
|
103
102
|
}
|
|
104
103
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
type: component
|
|
2
|
+
|
|
3
|
+
meta:
|
|
4
|
+
desc: Componente de card.
|
|
5
|
+
|
|
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
|
+
gutter:
|
|
17
|
+
desc: Espaçamento dentro <q-card-section /> onde fica o slot "default".
|
|
18
|
+
default: sm
|
|
19
|
+
type: String
|
|
20
|
+
examples: [xs, sm, md, lg, xl]
|
|
21
|
+
|
|
22
|
+
images:
|
|
23
|
+
desc: Imagens do carousel.
|
|
24
|
+
default: []
|
|
25
|
+
type: Array
|
|
26
|
+
|
|
27
|
+
use-header:
|
|
28
|
+
desc: Controla se vai ter ou não o header com carousel.
|
|
29
|
+
type: Boolean
|
|
30
|
+
|
|
31
|
+
slots:
|
|
32
|
+
header:
|
|
33
|
+
desc: Slot para acessar área no lugar do "<q-carousel />".
|
|
34
|
+
|
|
35
|
+
carousel-header:
|
|
36
|
+
desc: Slot para acessar usar de header do "<q-carousel />".
|
|
37
|
+
|
|
38
|
+
default:
|
|
39
|
+
desc: Slot para acessar conteúdo dentro do "<q-card-section />".
|
|
40
|
+
|
|
41
|
+
actions:
|
|
42
|
+
desc: Slot para acessar conteúdo de ações como botão.
|
|
@@ -1,26 +1,38 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div>
|
|
2
|
+
<div :class="classes">
|
|
3
3
|
<div v-for="(option, index) in options" :key="index">
|
|
4
|
-
<q-checkbox
|
|
5
|
-
|
|
4
|
+
<q-checkbox v-if="hasChildren(option)" :class="getCheckboxClass(option)" :label="option.label" :model-value="getModelValue(index)" @update:model-value="updateCheckbox($event, option, index)" />
|
|
5
|
+
|
|
6
|
+
<q-option-group v-if="hasChildren(option)" class="q-ml-sm" :inline="inline" :model-value="modelValue" :options="option.children" type="checkbox" @update:model-value="updateChildren($event, option, index)" />
|
|
7
|
+
|
|
8
|
+
<q-option-group v-else v-model="model" v-bind="$attrs" :options="[option]" type="checkbox" />
|
|
6
9
|
</div>
|
|
7
10
|
</div>
|
|
8
11
|
</template>
|
|
9
12
|
|
|
10
13
|
<script>
|
|
11
14
|
export default {
|
|
15
|
+
name: 'QasCheckboxGroup',
|
|
16
|
+
|
|
12
17
|
props: {
|
|
13
18
|
options: {
|
|
14
19
|
default: () => [],
|
|
15
20
|
type: Array
|
|
16
21
|
},
|
|
17
22
|
|
|
18
|
-
|
|
23
|
+
modelValue: {
|
|
19
24
|
default: () => [],
|
|
20
25
|
type: Array
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
inline: {
|
|
29
|
+
default: true,
|
|
30
|
+
type: Boolean
|
|
21
31
|
}
|
|
22
32
|
},
|
|
23
33
|
|
|
34
|
+
emits: ['update:modelValue'],
|
|
35
|
+
|
|
24
36
|
data () {
|
|
25
37
|
return {
|
|
26
38
|
group: {}
|
|
@@ -28,8 +40,18 @@ export default {
|
|
|
28
40
|
},
|
|
29
41
|
|
|
30
42
|
computed: {
|
|
31
|
-
|
|
32
|
-
|
|
43
|
+
model: {
|
|
44
|
+
get () {
|
|
45
|
+
return this.modelValue
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
set (value) {
|
|
49
|
+
this.$emit('update:modelValue', value)
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
classes () {
|
|
54
|
+
return this.inline && 'flex q-gutter-x-sm'
|
|
33
55
|
}
|
|
34
56
|
},
|
|
35
57
|
|
|
@@ -48,7 +70,7 @@ export default {
|
|
|
48
70
|
for (const index in this.options) {
|
|
49
71
|
const option = this.options[index]
|
|
50
72
|
if (this.hasChildren(option)) {
|
|
51
|
-
this.setGroupIntersection(this.
|
|
73
|
+
this.setGroupIntersection(this.modelValue, option, index)
|
|
52
74
|
}
|
|
53
75
|
}
|
|
54
76
|
},
|
|
@@ -60,25 +82,36 @@ export default {
|
|
|
60
82
|
setGroupIntersection (value, option, index) {
|
|
61
83
|
const options = option.children.map(item => item.value)
|
|
62
84
|
const intersection = options.filter(item => value.includes(item))
|
|
63
|
-
|
|
85
|
+
|
|
86
|
+
this.group[index] = intersection.length && (intersection.length === options.length ? true : null)
|
|
64
87
|
},
|
|
65
88
|
|
|
66
89
|
updateCheckbox (value, option, index) {
|
|
67
|
-
|
|
68
|
-
// Arrumar
|
|
69
|
-
return this.$emit('input', this.value)
|
|
70
|
-
}
|
|
71
|
-
this.$set(this.group, index, value)
|
|
90
|
+
this.group[index] = value
|
|
72
91
|
const groupValues = option.children.map(item => item.value)
|
|
92
|
+
|
|
73
93
|
const updatedValue = value
|
|
74
|
-
? [...this.
|
|
75
|
-
: this.
|
|
76
|
-
|
|
94
|
+
? [...new Set([...this.modelValue, ...groupValues])]
|
|
95
|
+
: this.modelValue.filter(item => !groupValues.includes(item))
|
|
96
|
+
|
|
97
|
+
this.updateModelValue(updatedValue)
|
|
77
98
|
},
|
|
78
99
|
|
|
79
100
|
updateChildren (value, option, index) {
|
|
80
101
|
this.setGroupIntersection(value, option, index)
|
|
81
|
-
this
|
|
102
|
+
this.updateModelValue(value)
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
getCheckboxClass (option) {
|
|
106
|
+
return this.hasChildren(option) && 'text-weight-bold'
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
getModelValue (index) {
|
|
110
|
+
return this.group[index]
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
updateModelValue (value) {
|
|
114
|
+
this.$emit('update:modelValue', value)
|
|
82
115
|
}
|
|
83
116
|
}
|
|
84
117
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
type: component
|
|
2
|
+
|
|
3
|
+
meta:
|
|
4
|
+
desc: Componente para gerar dinamicamente checkbox agrupados.
|
|
5
|
+
|
|
6
|
+
props:
|
|
7
|
+
options:
|
|
8
|
+
desc: Opções para gerar os checkbox.
|
|
9
|
+
default: []
|
|
10
|
+
type: Array
|
|
11
|
+
|
|
12
|
+
model-value:
|
|
13
|
+
desc: Model do componente, usado para v-model.
|
|
14
|
+
default: []
|
|
15
|
+
type: Array
|
|
16
|
+
examples: [v-model"value"]
|
|
17
|
+
model: true
|
|
18
|
+
|
|
19
|
+
inline:
|
|
20
|
+
desc: Controla se o componente vai aparece em linha ou em bloco.
|
|
21
|
+
default: true
|
|
22
|
+
type: Boolean
|
|
23
|
+
|
|
24
|
+
events:
|
|
25
|
+
'@update:model-value -> function(value)':
|
|
26
|
+
desc: Dispara quando o model-value altera, também usado para v-model.
|
|
27
|
+
params:
|
|
28
|
+
value:
|
|
29
|
+
desc: Novo valor do model.
|
|
30
|
+
type: []
|
|
@@ -1,42 +1,53 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<span>
|
|
3
|
-
<slot>{{
|
|
3
|
+
<slot>{{ text }}</slot>
|
|
4
4
|
|
|
5
|
-
<
|
|
5
|
+
<qas-btn class="q-ml-xs" color="grey-5" 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
9
|
</template>
|
|
10
10
|
|
|
11
11
|
<script>
|
|
12
12
|
import { copyToClipboard } from 'quasar'
|
|
13
|
-
import { NotifyError, NotifySuccess } from '../../plugins'
|
|
14
13
|
|
|
15
14
|
export default {
|
|
15
|
+
name: 'QasCopy',
|
|
16
|
+
|
|
16
17
|
props: {
|
|
17
18
|
icon: {
|
|
18
19
|
default: 'o_file_copy',
|
|
19
20
|
type: String
|
|
20
21
|
},
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
size: {
|
|
24
|
+
default: 'xs',
|
|
24
25
|
type: String
|
|
25
26
|
},
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
text: {
|
|
29
|
+
required: true,
|
|
29
30
|
type: String
|
|
30
31
|
}
|
|
31
32
|
},
|
|
32
33
|
|
|
34
|
+
data () {
|
|
35
|
+
return {
|
|
36
|
+
isLoading: false
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
|
|
33
40
|
methods: {
|
|
34
41
|
async copy () {
|
|
42
|
+
this.isLoading = true
|
|
43
|
+
|
|
35
44
|
try {
|
|
36
|
-
await copyToClipboard(this.
|
|
37
|
-
|
|
45
|
+
await copyToClipboard(this.text)
|
|
46
|
+
this.$qas.success('Copiado!', this.text)
|
|
38
47
|
} catch (error) {
|
|
39
|
-
|
|
48
|
+
this.$qas.error('Não foi possível copiar.', this.text)
|
|
49
|
+
} finally {
|
|
50
|
+
setTimeout(() => { this.isLoading = false }, 500)
|
|
40
51
|
}
|
|
41
52
|
}
|
|
42
53
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type: component
|
|
2
|
+
|
|
3
|
+
meta:
|
|
4
|
+
desc: Copia algum texto para o clipboard após clicar no botão.
|
|
5
|
+
|
|
6
|
+
props:
|
|
7
|
+
icon:
|
|
8
|
+
desc: Ícone para mostrar no botão.
|
|
9
|
+
type: String
|
|
10
|
+
default: o_file_copy
|
|
11
|
+
|
|
12
|
+
size:
|
|
13
|
+
desc: Tamanho do botão.
|
|
14
|
+
type: String
|
|
15
|
+
default: xs
|
|
16
|
+
examples: [xs, sm, md, lg, xl]
|
|
17
|
+
|
|
18
|
+
text:
|
|
19
|
+
desc: Texto a ser copiado.
|
|
20
|
+
type: String
|