@bildvitta/quasar-ui-asteroid 2.12.4 → 3.0.0-alpha.1
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/QasBox.json +16 -0
- package/dist/api/QasBreakline.json +32 -0
- package/dist/api/QasBtn.json +15 -0
- package/dist/api/QasDebugger.json +13 -0
- package/dist/asteroid.cjs.css +1 -0
- package/dist/asteroid.cjs.js +9154 -0
- package/dist/asteroid.cjs.min.js +6 -0
- package/dist/asteroid.esm.css +1 -0
- package/dist/asteroid.esm.js +9145 -0
- package/dist/asteroid.esm.min.js +6 -0
- package/dist/asteroid.umd.css +1 -0
- package/dist/asteroid.umd.js +9148 -0
- package/dist/asteroid.umd.min.js +6 -0
- package/dist/vetur/asteroid-attributes.json +30 -0
- package/dist/vetur/asteroid-tags.json +29 -0
- package/package.json +42 -56
- package/src/assets/logo-modular.svg +1 -0
- package/src/asteroid.js +1 -0
- package/src/components/actions/QasActions.vue +45 -0
- package/src/components/actions-menu/QasActionsMenu.vue +8 -19
- package/src/components/alert/QasAlert.vue +90 -0
- package/src/components/app-bar/QasAppBar.vue +59 -61
- package/src/components/app-menu/QasAppMenu.vue +128 -41
- package/src/components/avatar/QasAvatar.vue +7 -3
- 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 +12 -0
- package/src/components/card/QasCard.vue +29 -21
- package/src/components/checkbox-group/QasCheckboxGroup.vue +31 -17
- package/src/components/copy/QasCopy.vue +22 -11
- package/src/components/date-time-input/QasDateTimeInput.vue +16 -26
- package/src/components/debugger/QasDebugger.vue +2 -0
- package/src/components/debugger/QasDebugger.yml +10 -0
- package/src/components/delete/QasDelete.vue +28 -15
- package/src/components/dialog/QasDialog.vue +71 -67
- package/src/components/dialog-router/QasDialogRouter.vue +12 -4
- package/src/components/field/QasField.vue +22 -25
- package/src/components/filters/QasFilters.vue +31 -24
- package/src/components/form-generator/QasFormGenerator.vue +13 -15
- package/src/components/form-view/QasFormView.vue +117 -66
- package/src/components/gallery/QasGallery.vue +39 -26
- package/src/components/grid-generator/QasGridGenerator.vue +12 -6
- package/src/components/index.js +0 -0
- package/src/components/input/QasInput.vue +38 -36
- package/src/components/label/QasLabel.vue +14 -15
- package/src/components/layout/QasLayout.vue +81 -0
- package/src/components/list-items/QasListItems.vue +16 -8
- package/src/components/list-view/QasListView.vue +31 -28
- package/src/components/map/QasMap.vue +15 -25
- package/src/components/nested-fields/QasNestedFields.vue +39 -36
- package/src/components/numeric-input/QasNumericInput.vue +125 -0
- package/src/components/page-header/QasPageHeader.vue +19 -10
- package/src/components/password-input/QasPasswordInput.vue +20 -18
- package/src/components/password-strength-checker/QasPasswordStrengthChecker.vue +52 -31
- package/src/components/profile/QasProfile.vue +14 -12
- package/src/components/resizer/QasResizer.vue +1 -1
- package/src/components/search-box/QasSearchBox.vue +36 -20
- package/src/components/select/QasSelect.vue +43 -44
- package/src/components/select-list/QasSelectList.vue +64 -51
- package/src/components/signature-pad/QasSignaturePad.vue +57 -41
- package/src/components/signature-uploader/QasSignatureUploader.vue +15 -13
- package/src/components/single-view/QasSingleView.vue +31 -17
- package/src/components/sortable/QasSortable.vue +45 -27
- package/src/components/table-generator/QasTableGenerator.vue +95 -22
- package/src/components/tabs-generator/QasTabsGenerator.vue +36 -24
- package/src/components/text-truncate/QasTextTruncate.vue +25 -17
- package/src/components/transfer/QasTransfer.vue +57 -53
- package/src/components/uploader/QasUploader.vue +169 -48
- 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 +3 -4
- package/src/helpers/get-slot-children-text.js +15 -0
- package/src/helpers/{greatestCommonDivisor.js → greatest-common-divisor.js} +0 -0
- package/src/helpers/images.js +28 -0
- package/src/helpers/index.js +11 -57
- package/src/helpers/is-local-development.js +3 -0
- package/src/helpers/scroll-on-grap.js +61 -0
- package/src/index.cjs.js +1 -0
- package/src/index.esm.js +4 -0
- package/src/index.scss +18 -20
- 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 +57 -20
- package/src/plugins/Dialog.js +14 -0
- package/src/plugins/NotifySuccess.js +3 -3
- package/src/plugins/index.js +4 -2
- 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 -88
- package/src/components/app-menu/QasAppMenu.stories.js +0 -62
- 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/decimal-input/QasDecimalInput.stories.js +0 -82
- package/src/components/decimal-input/QasDecimalInput.vue +0 -92
- 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 -138
- package/src/components/input/QasInput.stories.js +0 -78
- package/src/components/label/QasLabel.stories.js +0 -60
- package/src/components/list-items/QasListItems.stories.js +0 -130
- 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/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 -116
- 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 -121
- 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 -245
- 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
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="row" :class="btnActionsClass">
|
|
3
|
-
<div class="col-sm-auto" :class="secondaryClass">
|
|
4
|
-
<slot name="secondary" />
|
|
5
|
-
</div>
|
|
6
|
-
|
|
7
|
-
<div class="col-sm-auto" :class="primaryClass">
|
|
8
|
-
<slot name="primary" />
|
|
9
|
-
</div>
|
|
10
|
-
</div>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script>
|
|
14
|
-
// TODO: Renomear componente.
|
|
15
|
-
export default {
|
|
16
|
-
props: {
|
|
17
|
-
align: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: 'end',
|
|
20
|
-
validator:
|
|
21
|
-
value => ['start', 'around', 'between', 'center', 'end'].includes(value)
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
btnCol: {
|
|
25
|
-
type: String,
|
|
26
|
-
default: ''
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
gutter: {
|
|
30
|
-
type: String,
|
|
31
|
-
default: 'md',
|
|
32
|
-
validator: value => ['xs', 'sm', 'md', 'lg', 'xl'].includes(value)
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
computed: {
|
|
37
|
-
btnActionsClass () {
|
|
38
|
-
return `justify-${this.align} q-col-gutter-${this.gutter}`
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
isSmallScreen () {
|
|
42
|
-
return this.$q.screen.xs
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
primaryClass () {
|
|
46
|
-
return this.btnCol || (this.isSmallScreen && 'col-12 order-first')
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
secondaryClass () {
|
|
50
|
-
return this.btnCol || (this.isSmallScreen && 'col-12 order-last')
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
</script>
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import QasCard from './QasCard.vue'
|
|
2
|
-
|
|
3
|
-
const noSummary = {
|
|
4
|
-
type: { summary: null }
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
component: QasCard,
|
|
9
|
-
title: 'Components/Card',
|
|
10
|
-
|
|
11
|
-
parameters: {
|
|
12
|
-
docs: {
|
|
13
|
-
description: {
|
|
14
|
-
component: 'Simple card component.'
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
argTypes: {
|
|
20
|
-
// Props
|
|
21
|
-
bgImagePosition: {
|
|
22
|
-
description: 'Define a position of the background image.'
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
images: {
|
|
26
|
-
description: 'List of images.'
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
gutter: {
|
|
30
|
-
description: 'Gutter space by Quasar convention. `q-col-gutter-{$gutter}`.'
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
outlined: {
|
|
34
|
-
description: 'Changes the component style.'
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
useHeader: {
|
|
38
|
-
description: 'Shows the header section.'
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
// Slots
|
|
42
|
-
actions: {
|
|
43
|
-
description: 'Bottom section for actions.',
|
|
44
|
-
table: noSummary
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
'carousel-header': {
|
|
48
|
-
description: 'Header of the carousel section',
|
|
49
|
-
table: noSummary
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
default: {
|
|
53
|
-
description: 'Main content.',
|
|
54
|
-
table: noSummary
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
header: {
|
|
58
|
-
description: 'Header content.',
|
|
59
|
-
table: noSummary
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const Template = (args, { argTypes }) => ({
|
|
65
|
-
components: { QasCard },
|
|
66
|
-
props: Object.keys(argTypes),
|
|
67
|
-
template:
|
|
68
|
-
`<div class="q-col-gutter-md q-pa-md row">
|
|
69
|
-
<qas-card :images="images" use-header>
|
|
70
|
-
<template #default>
|
|
71
|
-
<div>{{ result.name }}</div>
|
|
72
|
-
<div>{{ result.email }}</div>
|
|
73
|
-
</template>
|
|
74
|
-
<template #actions>
|
|
75
|
-
<q-icon color="primary" class="col-grow" name="o_edit" />
|
|
76
|
-
<q-icon color="primary" class="col-grow" name="o_delete" />
|
|
77
|
-
<q-icon color="primary" class="col-grow" name="o_photo_camera" />
|
|
78
|
-
</template>
|
|
79
|
-
</qas-card>
|
|
80
|
-
<qas-card :images="images" use-header>
|
|
81
|
-
<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
|
|
82
|
-
</qas-card>
|
|
83
|
-
<qas-card :images="images" use-header>
|
|
84
|
-
<template #default>
|
|
85
|
-
<div>{{ result.name }}</div>
|
|
86
|
-
<div>{{ result.email }}</div>
|
|
87
|
-
</template>
|
|
88
|
-
<template #actions>
|
|
89
|
-
<div class="full-width">
|
|
90
|
-
<div class="text-blue text-bold text-center">Ver mais</div>
|
|
91
|
-
</div>
|
|
92
|
-
</template>
|
|
93
|
-
</qas-card>
|
|
94
|
-
</div>`
|
|
95
|
-
})
|
|
96
|
-
|
|
97
|
-
const images = [
|
|
98
|
-
'https://cdn.pixabay.com/photo/2016/10/10/12/54/space-1728314_960_720.jpg',
|
|
99
|
-
'https://cdn.pixabay.com/photo/2011/12/14/12/21/orion-nebula-11107_960_720.jpg',
|
|
100
|
-
'https://cdn.pixabay.com/photo/2016/10/10/12/54/space-1728314_960_720.jpg',
|
|
101
|
-
'https://cdn.pixabay.com/photo/2011/12/14/12/21/orion-nebula-11107_960_720.jpg'
|
|
102
|
-
]
|
|
103
|
-
|
|
104
|
-
const result = {
|
|
105
|
-
name: 'John Appleseed',
|
|
106
|
-
email: 'john.appleseed@example.com',
|
|
107
|
-
phone: '99999999999',
|
|
108
|
-
gender: 'Male',
|
|
109
|
-
document: '99999999999',
|
|
110
|
-
address: '747 Austen View'
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export const Default = Template.bind({})
|
|
114
|
-
Default.args = {
|
|
115
|
-
images,
|
|
116
|
-
result
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
Default.parameters = {
|
|
120
|
-
docs: {
|
|
121
|
-
source: {
|
|
122
|
-
code:
|
|
123
|
-
'<qas-card :images="images" :result="result" />'
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import QasCheckboxGroup from './QasCheckboxGroup.vue'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
component: QasCheckboxGroup,
|
|
5
|
-
title: 'Components/CheckboxGroup',
|
|
6
|
-
|
|
7
|
-
parameters: {
|
|
8
|
-
docs: {
|
|
9
|
-
description: {
|
|
10
|
-
component: 'List a collection of checkbox fields, implements [QOptionGroup](https://quasar.dev/vue-components/option-group) and [QCheckbox](https://quasar.dev/vue-components/checkbox).'
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
argTypes: {
|
|
16
|
-
// Props
|
|
17
|
-
options: {
|
|
18
|
-
description: 'List of checkbox groups with your children. Each group item has `label` and `children` array, and each checkbox has a `label` and a `value`.'
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
value: {
|
|
22
|
-
description: 'An array with all selected checkboxes value.'
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
// Events
|
|
26
|
-
input: {
|
|
27
|
-
description: 'Fires when any checkbox changes.'
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const Template = (args, { argTypes }) => ({
|
|
33
|
-
components: { QasCheckboxGroup },
|
|
34
|
-
props: Object.keys(argTypes),
|
|
35
|
-
|
|
36
|
-
data () {
|
|
37
|
-
return { model: [] }
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
template:
|
|
41
|
-
`<div>
|
|
42
|
-
<qas-checkbox-group v-model="model" v-bind="$props" />
|
|
43
|
-
<pre>{{model}}</pre>
|
|
44
|
-
</div>`
|
|
45
|
-
})
|
|
46
|
-
|
|
47
|
-
export const Default = Template.bind({})
|
|
48
|
-
|
|
49
|
-
Default.args = {
|
|
50
|
-
options: [
|
|
51
|
-
{
|
|
52
|
-
label: 'Checkbox exemple',
|
|
53
|
-
children: [
|
|
54
|
-
{ label: 'Children 1', value: 1 },
|
|
55
|
-
{ label: 'Children 2', value: 2 }
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
]
|
|
59
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import QasCopy from './QasCopy.vue'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
component: QasCopy,
|
|
5
|
-
title: 'Components/Copy',
|
|
6
|
-
|
|
7
|
-
parameters: {
|
|
8
|
-
docs: {
|
|
9
|
-
description: {
|
|
10
|
-
component: 'Copy some text to clipboard.'
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
argTypes: {
|
|
16
|
-
icon: {
|
|
17
|
-
description: 'Icon name following Quasar convention.'
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
label: {
|
|
21
|
-
description: 'Text to be copied.'
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
size: {
|
|
25
|
-
description: 'Size of your icon'
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const Template = (args, { argTypes }) => ({
|
|
31
|
-
components: { QasCopy },
|
|
32
|
-
props: Object.keys(argTypes),
|
|
33
|
-
template:
|
|
34
|
-
'<qas-copy v-bind="$props" />'
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
export const Default = Template.bind({})
|
|
38
|
-
|
|
39
|
-
Default.args = {
|
|
40
|
-
label: 'Click here!'
|
|
41
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import QasDateTimeInput from './QasDateTimeInput.vue'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
component: QasDateTimeInput,
|
|
5
|
-
title: 'Components/DateTimeInput',
|
|
6
|
-
|
|
7
|
-
parameters: {
|
|
8
|
-
docs: {
|
|
9
|
-
description: {
|
|
10
|
-
component: 'Field to input or select date and time.'
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
argTypes: {
|
|
16
|
-
// Props
|
|
17
|
-
dateMask: {
|
|
18
|
-
description: 'Mask string to parse and format date value.'
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
dateOnly: {
|
|
22
|
-
description: 'For date only mode.'
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
dateOptions: {
|
|
26
|
-
description: 'Bypass [QDate](https://quasar.dev/vue-components/date) props.'
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
gmt: {
|
|
30
|
-
description: 'Use GMT (Greenwich Mean Time) on date input'
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
timeMask: {
|
|
34
|
-
description: 'Mask string to parse and format time value.'
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
timeOnly: {
|
|
38
|
-
description: 'For time only mode.'
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
timeOptions: {
|
|
42
|
-
description: 'Bypass [QTime](https://quasar.dev/vue-components/time) props'
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
value: {
|
|
46
|
-
description: 'Sets the input value by ISO 8601.'
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
// Events
|
|
50
|
-
input: {
|
|
51
|
-
description: 'Fires when the value changes.'
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
mounted: {
|
|
55
|
-
description: 'Fires when the component mounts.'
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const Template = (args, { argTypes }) => ({
|
|
61
|
-
components: { QasDateTimeInput },
|
|
62
|
-
props: Object.keys(argTypes),
|
|
63
|
-
template:
|
|
64
|
-
'<qas-date-time-input v-bind="$props" />'
|
|
65
|
-
})
|
|
66
|
-
|
|
67
|
-
export const Default = Template.bind({})
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import QasDebugger from './QasDebugger.vue'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
component: QasDebugger,
|
|
5
|
-
title: 'Components/Debugger',
|
|
6
|
-
|
|
7
|
-
parameters: {
|
|
8
|
-
docs: {
|
|
9
|
-
description: {
|
|
10
|
-
component: 'Facilitates reactive values debug (development only).'
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
argTypes: {
|
|
16
|
-
inspect: {
|
|
17
|
-
control: 'object',
|
|
18
|
-
description: 'An array with items that will be inspected.'
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const Template = (args, { argTypes }) => ({
|
|
24
|
-
components: { QasDebugger },
|
|
25
|
-
props: Object.keys(argTypes),
|
|
26
|
-
template: '<qas-debugger v-bind="$props" />'
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
export const Default = Template.bind({})
|
|
30
|
-
|
|
31
|
-
Default.args = {
|
|
32
|
-
inspect: ['A string', 43110, ['An', 'array'], { An: 'object' }, true]
|
|
33
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import QasDecimalInput from './QasDecimalInput.vue'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
component: QasDecimalInput,
|
|
5
|
-
title: 'Components/DecimalInput',
|
|
6
|
-
|
|
7
|
-
parameters: {
|
|
8
|
-
docs: {
|
|
9
|
-
description: {
|
|
10
|
-
component: 'Extends [QInput](https://quasar.dev/vue-components/input), but with decimal mask.'
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
argTypes: {
|
|
16
|
-
// Props
|
|
17
|
-
comma: {
|
|
18
|
-
description: 'Use comma instead of period as decimal separator.'
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
places: {
|
|
22
|
-
description: 'Number of decimal places.'
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
value: {
|
|
26
|
-
description: 'Model value.'
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
// Events
|
|
30
|
-
input: {
|
|
31
|
-
description: 'Emitted when the component needs to change the model. Is also used by `v-model`.',
|
|
32
|
-
table: {
|
|
33
|
-
defaultValue: {
|
|
34
|
-
detail: JSON.stringify({ value: 'number' }),
|
|
35
|
-
summary: '{}'
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
mount: {
|
|
41
|
-
table: { disable: true }
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const Template = (args, { argTypes }) => ({
|
|
47
|
-
components: { QasDecimalInput },
|
|
48
|
-
props: Object.keys(argTypes),
|
|
49
|
-
|
|
50
|
-
data () {
|
|
51
|
-
return {
|
|
52
|
-
model: 0
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
template:
|
|
57
|
-
`<div>
|
|
58
|
-
<qas-decimal-input v-bind="$props" v-model="model" />
|
|
59
|
-
<pre>{{ model }}</pre>
|
|
60
|
-
</div>`
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
export const Default = Template.bind({})
|
|
64
|
-
|
|
65
|
-
Default.parameters = {
|
|
66
|
-
docs: {
|
|
67
|
-
source: { code: '<qas-decimal-input v-model="model" />' }
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export const BrazilianReal = Template.bind({})
|
|
72
|
-
|
|
73
|
-
BrazilianReal.args = {
|
|
74
|
-
comma: true,
|
|
75
|
-
prefix: 'R$'
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
BrazilianReal.parameters = {
|
|
79
|
-
docs: {
|
|
80
|
-
source: { code: '<qas-decimal-input v-model="model" comma prefix="R$" />' }
|
|
81
|
-
}
|
|
82
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<q-input v-bind="$attrs" fill-mask="0" :mask="mask" reverse-fill-mask :value="inputValue" v-on="events" @input="input" />
|
|
4
|
-
</div>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
export default {
|
|
9
|
-
props: {
|
|
10
|
-
comma: {
|
|
11
|
-
default: false,
|
|
12
|
-
type: Boolean
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
places: {
|
|
16
|
-
default: 2,
|
|
17
|
-
type: Number
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
value: {
|
|
21
|
-
default: 0,
|
|
22
|
-
required: true,
|
|
23
|
-
type: Number
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
data () {
|
|
28
|
-
return {
|
|
29
|
-
inputValue: this.toMask(this.value),
|
|
30
|
-
inputedValue: 0
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
computed: {
|
|
35
|
-
events () {
|
|
36
|
-
const { input, ...events } = this.$listeners
|
|
37
|
-
return events
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
mask () {
|
|
41
|
-
return `#${this.separator}${'#'.repeat(this.places)}`
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
separator () {
|
|
45
|
-
return this.comma ? ',' : '.'
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
watch: {
|
|
50
|
-
value (current) {
|
|
51
|
-
this.inputValue = this.toMask(current)
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
mounted () {
|
|
56
|
-
this.$emit('mount', this)
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
methods: {
|
|
60
|
-
blur () {
|
|
61
|
-
this.$el.blur()
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
focus () {
|
|
65
|
-
this.$el.focus()
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
input (value) {
|
|
69
|
-
this.inputedValue = this.toDecimal(value)
|
|
70
|
-
this.$emit('input', this.inputedValue)
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
toDecimal (value) {
|
|
74
|
-
if (this.comma) {
|
|
75
|
-
value = value.replace(',', '.')
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return parseFloat(value)
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
toMask (value) {
|
|
82
|
-
value = value.toFixed(this.places)
|
|
83
|
-
|
|
84
|
-
if (this.comma) {
|
|
85
|
-
value = value.replace('.', ',')
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return value
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
</script>
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import QasDelete from './QasDelete.vue'
|
|
2
|
-
|
|
3
|
-
const noSummary = {
|
|
4
|
-
type: { summary: null }
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
component: QasDelete,
|
|
9
|
-
title: 'Components/Delete',
|
|
10
|
-
|
|
11
|
-
parameters: {
|
|
12
|
-
docs: {
|
|
13
|
-
description: {
|
|
14
|
-
component: 'Button to delete an entity\'s entry.'
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
argTypes: {
|
|
20
|
-
// Props
|
|
21
|
-
color: {
|
|
22
|
-
table: { disable: true }
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
customId: {
|
|
26
|
-
description: 'Custom identifier to be deleted (by default, the component will get the `id` route\'s param).'
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
dialog: {
|
|
30
|
-
description: 'Events and props of QasDialog component.'
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
entity: {
|
|
34
|
-
description: '[VuexStoreModule](https://github.com/bildvitta/vuex-store-module) entity.'
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
label: {
|
|
38
|
-
table: { disable: true }
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
tag: {
|
|
42
|
-
description: 'Vue component or HTML element tag.'
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
url: {
|
|
46
|
-
description: 'It changes the default destroy url'
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
// Events
|
|
50
|
-
error: {
|
|
51
|
-
description: 'Fires when occur an error deleting item.',
|
|
52
|
-
table: noSummary
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
success: {
|
|
56
|
-
description: 'Fires when item is successfully deleted.',
|
|
57
|
-
table: noSummary
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
// Slots
|
|
61
|
-
default: {
|
|
62
|
-
description: 'Main content.',
|
|
63
|
-
table: noSummary
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const Template = (args, { argTypes }) => ({
|
|
69
|
-
components: { QasDelete },
|
|
70
|
-
props: Object.keys(argTypes),
|
|
71
|
-
template:
|
|
72
|
-
'<qas-delete v-bind="$props" />'
|
|
73
|
-
})
|
|
74
|
-
|
|
75
|
-
export const Default = Template.bind({})
|
|
76
|
-
|
|
77
|
-
Default.args = {
|
|
78
|
-
color: 'negative',
|
|
79
|
-
label: 'Delete'
|
|
80
|
-
}
|