@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,236 +0,0 @@
|
|
|
1
|
-
import QasFormView from './QasFormView.vue'
|
|
2
|
-
import QasDebugger from '../debugger/QasDebugger'
|
|
3
|
-
|
|
4
|
-
import Vuex from 'vuex'
|
|
5
|
-
import users from '../../mocks/storeModule'
|
|
6
|
-
|
|
7
|
-
const slotDefaults = {
|
|
8
|
-
defaultValue: {
|
|
9
|
-
detail: JSON.stringify({
|
|
10
|
-
errors: 'object',
|
|
11
|
-
fields: 'object',
|
|
12
|
-
metadata: 'object'
|
|
13
|
-
}),
|
|
14
|
-
summary: '{}'
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
type: {
|
|
18
|
-
summary: null
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export default {
|
|
23
|
-
component: QasFormView,
|
|
24
|
-
title: 'Components/FormView',
|
|
25
|
-
|
|
26
|
-
parameters: {
|
|
27
|
-
docs: {
|
|
28
|
-
description: {
|
|
29
|
-
component: 'Create forms like a magic, you can use this component with create and edit mode.'
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
argTypes: {
|
|
35
|
-
// Props
|
|
36
|
-
cancelButton: {
|
|
37
|
-
description: 'Cancel button label.'
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
cancelRoute: {
|
|
41
|
-
description: 'Cancel button route.'
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
customId: {
|
|
45
|
-
control: null,
|
|
46
|
-
description: 'Sets a custom id to `entity`. When not set, will use the `:id` route param.'
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
dialog: {
|
|
50
|
-
description: 'Use when the component is inside a dialog.'
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
disable: {
|
|
54
|
-
description: 'Disable actions buttons.'
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
entity: {
|
|
58
|
-
control: null,
|
|
59
|
-
description: '[VuexStoreModule](https://github.com/bildvitta/vuex-store-module) entity.'
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
mode: {
|
|
63
|
-
control: { type: 'select', options: ['create', 'replace', 'update'] },
|
|
64
|
-
description: 'Use `create` when you want to create a new entry (`POST`). To edit an existing entry, use `replace` (`PUT`) or `update` (`PATCH`).'
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
readOnly: {
|
|
68
|
-
description: 'Disable action buttons and submit method.'
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
route: {
|
|
72
|
-
description: 'Page route.'
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
showDialogOnUnsavedChanges: {
|
|
76
|
-
description: 'Enable dialog when leave page without save changes.'
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
submitButton: {
|
|
80
|
-
description: 'Submit button label.'
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
url: {
|
|
84
|
-
control: null,
|
|
85
|
-
description: 'Ignore entity and specify another endpoint.'
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
value: {
|
|
89
|
-
description: 'Model value.'
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
// Events
|
|
93
|
-
'fetch-error': {
|
|
94
|
-
description: 'Fires when occur an error fetching value.',
|
|
95
|
-
table: {
|
|
96
|
-
defaultValue: {
|
|
97
|
-
detail: JSON.stringify({ value: 'object' }),
|
|
98
|
-
summary: '{}'
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
|
|
103
|
-
'fetch-success': {
|
|
104
|
-
description: 'Fires when successfully get the value.',
|
|
105
|
-
table: {
|
|
106
|
-
defaultValue: {
|
|
107
|
-
detail: JSON.stringify({ response: 'object', value: 'object' }),
|
|
108
|
-
summary: '{}'
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
input: {
|
|
114
|
-
description: 'Fires when model changes. Is also used by `v-model`.',
|
|
115
|
-
table: {
|
|
116
|
-
defaultValue: {
|
|
117
|
-
detail: JSON.stringify({ error: 'object' }),
|
|
118
|
-
summary: '{}'
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
'submit-error': {
|
|
124
|
-
description: 'Fires when occur an error updating value.',
|
|
125
|
-
table: {
|
|
126
|
-
defaultValue: {
|
|
127
|
-
detail: JSON.stringify({ response: 'object', value: 'object' }),
|
|
128
|
-
summary: '{}'
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
|
|
133
|
-
'submit-success': {
|
|
134
|
-
description: 'Fires when the value is successfully updated.',
|
|
135
|
-
table: {
|
|
136
|
-
defaultValue: {
|
|
137
|
-
detail: JSON.stringify({ error: 'object', value: 'object' }),
|
|
138
|
-
summary: '{}'
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
// Slots
|
|
144
|
-
default: {
|
|
145
|
-
description: 'Main content.',
|
|
146
|
-
table: {
|
|
147
|
-
...slotDefaults
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
|
|
151
|
-
actions: {
|
|
152
|
-
description: 'Actions buttons content.',
|
|
153
|
-
table: {
|
|
154
|
-
...slotDefaults
|
|
155
|
-
}
|
|
156
|
-
},
|
|
157
|
-
|
|
158
|
-
footer: {
|
|
159
|
-
description: 'Page\'s footer content.',
|
|
160
|
-
table: {
|
|
161
|
-
...slotDefaults
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
|
|
165
|
-
header: {
|
|
166
|
-
description: 'Page\'s header content.',
|
|
167
|
-
table: {
|
|
168
|
-
...slotDefaults
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
const Template = (args, { argTypes }) => ({
|
|
175
|
-
components: { QasFormView, QasDebugger },
|
|
176
|
-
props: Object.keys(argTypes),
|
|
177
|
-
|
|
178
|
-
store: new Vuex.Store({
|
|
179
|
-
modules: { users }
|
|
180
|
-
}),
|
|
181
|
-
|
|
182
|
-
data () {
|
|
183
|
-
return {
|
|
184
|
-
values: {}
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
|
|
188
|
-
template:
|
|
189
|
-
`<q-layout>
|
|
190
|
-
<q-page-container>
|
|
191
|
-
<qas-form-view v-model="values" v-bind="$props">
|
|
192
|
-
<template v-slot="{ errors, fields, metadata }">
|
|
193
|
-
Fields: <qas-debugger :inspect="[fields]" />
|
|
194
|
-
Values: <qas-debugger :inspect="[values]" />
|
|
195
|
-
</template>
|
|
196
|
-
</qas-form-view>
|
|
197
|
-
</q-page-container>
|
|
198
|
-
</q-layout>`
|
|
199
|
-
})
|
|
200
|
-
|
|
201
|
-
const template = `
|
|
202
|
-
<qas-form-view v-model="values" entity="users">
|
|
203
|
-
<template v-slot="{ errors, fields, metadata }">
|
|
204
|
-
Fields: <qas-debugger :inspect="[fields]" />
|
|
205
|
-
Values: <qas-debugger :inspect="[values]" />
|
|
206
|
-
</template>
|
|
207
|
-
</qas-form-view>
|
|
208
|
-
`
|
|
209
|
-
|
|
210
|
-
export const CreateMode = Template.bind({})
|
|
211
|
-
|
|
212
|
-
CreateMode.args = {
|
|
213
|
-
customId: '123',
|
|
214
|
-
entity: 'users',
|
|
215
|
-
url: 'users'
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
CreateMode.parameters = {
|
|
219
|
-
docs: {
|
|
220
|
-
source: { code: template }
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
export const EditMode = Template.bind({})
|
|
225
|
-
|
|
226
|
-
EditMode.args = {
|
|
227
|
-
customId: 'a755a6d1-fc4a-4961-a8cc-b2293fe5b81c',
|
|
228
|
-
entity: 'users',
|
|
229
|
-
mode: 'replace'
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
EditMode.parameters = {
|
|
233
|
-
docs: {
|
|
234
|
-
source: { code: template }
|
|
235
|
-
}
|
|
236
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import QasGallery from './QasGallery.vue'
|
|
2
|
-
|
|
3
|
-
const noSummary = {
|
|
4
|
-
type: { summary: null }
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
component: QasGallery,
|
|
9
|
-
title: 'Components/Gallery',
|
|
10
|
-
|
|
11
|
-
parameters: {
|
|
12
|
-
docs: {
|
|
13
|
-
description: {
|
|
14
|
-
component: 'Gallery component, with list of images and carousel.'
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
argTypes: {
|
|
20
|
-
// Props
|
|
21
|
-
carouselNextIcon: {
|
|
22
|
-
description: 'Define the next image icon for carousel.'
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
carouselPreviousIcon: {
|
|
26
|
-
description: 'Define the previous image icon for carousel.'
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
height: {
|
|
30
|
-
description: 'Define the height of item.'
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
initialLength: {
|
|
34
|
-
description: 'Define the initial quantity of items.'
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
items: {
|
|
38
|
-
description: 'List of items.'
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
loadLength: {
|
|
42
|
-
description: 'Define the quantity of items to load.'
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
showMoreLabel: {
|
|
46
|
-
description: 'Text that will show for load more items.'
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
// Slots
|
|
50
|
-
default: {
|
|
51
|
-
description: 'Main content.',
|
|
52
|
-
table: noSummary
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const Template = (args, { argTypes }) => ({
|
|
58
|
-
components: { QasGallery },
|
|
59
|
-
props: Object.keys(argTypes),
|
|
60
|
-
template:
|
|
61
|
-
`<qas-box class="q-pa-lg">
|
|
62
|
-
<qas-gallery :items="images" />
|
|
63
|
-
</qas-box>`
|
|
64
|
-
})
|
|
65
|
-
|
|
66
|
-
const images = [
|
|
67
|
-
'https://cdn.pixabay.com/photo/2016/10/10/12/54/space-1728314_960_720.jpg',
|
|
68
|
-
'https://cdn.pixabay.com/photo/2011/12/14/12/21/orion-nebula-11107_960_720.jpg',
|
|
69
|
-
'https://cdn.pixabay.com/photo/2016/10/10/12/54/space-1728314_960_720.jpg',
|
|
70
|
-
'https://cdn.pixabay.com/photo/2011/12/14/12/21/orion-nebula-11107_960_720.jpg',
|
|
71
|
-
'https://cdn.pixabay.com/photo/2016/10/10/12/54/space-1728314_960_720.jpg',
|
|
72
|
-
'https://cdn.pixabay.com/photo/2011/12/14/12/21/orion-nebula-11107_960_720.jpg',
|
|
73
|
-
'https://cdn.pixabay.com/photo/2016/10/10/12/54/space-1728314_960_720.jpg',
|
|
74
|
-
'https://cdn.pixabay.com/photo/2011/12/14/12/21/orion-nebula-11107_960_720.jpg',
|
|
75
|
-
'https://cdn.pixabay.com/photo/2016/10/10/12/54/space-1728314_960_720.jpg',
|
|
76
|
-
'https://cdn.pixabay.com/photo/2011/12/14/12/21/orion-nebula-11107_960_720.jpg',
|
|
77
|
-
'https://cdn.pixabay.com/photo/2016/10/10/12/54/space-1728314_960_720.jpg',
|
|
78
|
-
'https://cdn.pixabay.com/photo/2011/12/14/12/21/orion-nebula-11107_960_720.jpg'
|
|
79
|
-
]
|
|
80
|
-
|
|
81
|
-
export const Default = Template.bind({})
|
|
82
|
-
Default.args = { images }
|
|
83
|
-
|
|
84
|
-
Default.parameters = {
|
|
85
|
-
docs: {
|
|
86
|
-
source: {
|
|
87
|
-
code:
|
|
88
|
-
'<qas-gallery :photos="images" />'
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import QasGridGenerator from './QasGridGenerator.vue'
|
|
2
|
-
|
|
3
|
-
const slotDefaults = {
|
|
4
|
-
table: {
|
|
5
|
-
category: 'slots',
|
|
6
|
-
defaultValue: {
|
|
7
|
-
detail: JSON.stringify({ field: 'object' }),
|
|
8
|
-
summary: '{}'
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default {
|
|
14
|
-
component: QasGridGenerator,
|
|
15
|
-
title: 'Components/GridGenerator',
|
|
16
|
-
|
|
17
|
-
parameters: {
|
|
18
|
-
docs: {
|
|
19
|
-
description: {
|
|
20
|
-
component: 'Generates a grid with header (as `fields`) and content (as `results`).'
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
argTypes: {
|
|
26
|
-
// Props
|
|
27
|
-
columns: {
|
|
28
|
-
description: 'Define size of each column.',
|
|
29
|
-
table: {
|
|
30
|
-
defaultValue: { summary: '[]' }
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
contentClass: {
|
|
35
|
-
description: 'CSS classes for each result value.'
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
fields: {
|
|
39
|
-
description: 'Define header value for each `field`.'
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
gutter: {
|
|
43
|
-
description: 'Gutter space by Quasar convention. `q-col-gutter-{$gutter}`.'
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
headerClass: {
|
|
47
|
-
description: 'CSS classes for each header value.'
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
hideEmptyResult: {
|
|
51
|
-
description: 'Omits cell when result value is empty.'
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
result: {
|
|
55
|
-
description: 'Define result value for each `field`.'
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
// Slots
|
|
59
|
-
default: {
|
|
60
|
-
table: { disable: true }
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
content: {
|
|
64
|
-
description: 'Content value defaults.',
|
|
65
|
-
...slotDefaults
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
'field-[field.name]': {
|
|
69
|
-
description: 'Each cell inside `fields` is a slot.',
|
|
70
|
-
...slotDefaults
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
header: {
|
|
74
|
-
description: 'Header value defaults.',
|
|
75
|
-
...slotDefaults
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const Template = (args, { argTypes }) => ({
|
|
81
|
-
components: { QasGridGenerator },
|
|
82
|
-
props: Object.keys(argTypes),
|
|
83
|
-
template:
|
|
84
|
-
'<qas-grid-generator v-bind="$props" />'
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
const fields = {
|
|
88
|
-
name: { name: 'name', label: 'Full name', type: 'text' },
|
|
89
|
-
email: { name: 'email', label: 'E-mail', type: 'email' },
|
|
90
|
-
phone: { name: 'phone', label: 'Phone', type: 'text', mask: 'phone' },
|
|
91
|
-
gender: { name: 'gender', label: 'Gender', type: 'text' },
|
|
92
|
-
document: { name: 'document', label: 'Document', type: 'text', mask: 'document' },
|
|
93
|
-
address: { name: 'address', label: 'Address', type: 'text' }
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
const result = {
|
|
97
|
-
name: 'John Appleseed',
|
|
98
|
-
email: 'john.appleseed@example.com',
|
|
99
|
-
phone: '99999999999',
|
|
100
|
-
gender: 'Male',
|
|
101
|
-
document: '99999999999',
|
|
102
|
-
address: '747 Austen View'
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
const columns = {
|
|
106
|
-
name: { col: 12, sm: 6 },
|
|
107
|
-
email: { col: 12, sm: 6 },
|
|
108
|
-
phone: { col: 12, sm: 6 },
|
|
109
|
-
gender: { col: 12, sm: 6 },
|
|
110
|
-
document: { col: 12 },
|
|
111
|
-
address: { col: 12 }
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export const Default = Template.bind({})
|
|
115
|
-
Default.args = {
|
|
116
|
-
columns: [],
|
|
117
|
-
fields,
|
|
118
|
-
result
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
Default.parameters = {
|
|
122
|
-
docs: {
|
|
123
|
-
source: { code: '<qas-grid-generator :field="fields" :result="result" />' }
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export const CustomColumns = Template.bind({})
|
|
128
|
-
CustomColumns.args = {
|
|
129
|
-
columns,
|
|
130
|
-
fields,
|
|
131
|
-
result
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
CustomColumns.parameters = {
|
|
135
|
-
docs: {
|
|
136
|
-
source: { code: `<qas-grid-generator :field="fields" :result="result" :columns="${JSON.stringify(columns)}" />` }
|
|
137
|
-
}
|
|
138
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import QasInput from './QasInput.vue'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
component: QasInput,
|
|
5
|
-
title: 'Components/Input',
|
|
6
|
-
|
|
7
|
-
parameters: {
|
|
8
|
-
docs: {
|
|
9
|
-
description: {
|
|
10
|
-
component: 'Extends [QInput](https://quasar.dev/vue-components/input). Can mask raw values by default.'
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
argTypes: {
|
|
16
|
-
// Props
|
|
17
|
-
value: {
|
|
18
|
-
description: 'Input text value.',
|
|
19
|
-
control: { type: null }
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
// Slots
|
|
23
|
-
default: {
|
|
24
|
-
description: 'Field main content',
|
|
25
|
-
table: {
|
|
26
|
-
type: { summary: null }
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const Template = (args, { argTypes }) => ({
|
|
33
|
-
components: { QasInput },
|
|
34
|
-
props: Object.keys(argTypes),
|
|
35
|
-
|
|
36
|
-
data () {
|
|
37
|
-
return {
|
|
38
|
-
text: ''
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
template:
|
|
43
|
-
`<div>
|
|
44
|
-
<qas-input v-bind="$props" v-model="text" />
|
|
45
|
-
<pre v-if="text">{{ text }}</pre>
|
|
46
|
-
</div>`
|
|
47
|
-
})
|
|
48
|
-
|
|
49
|
-
function setTemplate (mask) {
|
|
50
|
-
const code = mask
|
|
51
|
-
? `<qas-input v-model="text" mask="${mask}" />`
|
|
52
|
-
: '<qas-input v-model="text" />'
|
|
53
|
-
|
|
54
|
-
return { docs: { source: { code } } }
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export const Default = Template.bind({})
|
|
58
|
-
Default.parameters = setTemplate()
|
|
59
|
-
|
|
60
|
-
export const PhoneMask = Template.bind({})
|
|
61
|
-
PhoneMask.args = { mask: 'phone' }
|
|
62
|
-
PhoneMask.parameters = setTemplate('phone')
|
|
63
|
-
|
|
64
|
-
export const DocumentMask = Template.bind({})
|
|
65
|
-
DocumentMask.args = { mask: 'document' }
|
|
66
|
-
DocumentMask.parameters = setTemplate('document')
|
|
67
|
-
|
|
68
|
-
export const PersonalDocumentMask = Template.bind({})
|
|
69
|
-
PersonalDocumentMask.args = { mask: 'personal-document' }
|
|
70
|
-
PersonalDocumentMask.parameters = setTemplate('personal-document')
|
|
71
|
-
|
|
72
|
-
export const CompanyDocumentMask = Template.bind({})
|
|
73
|
-
CompanyDocumentMask.args = { mask: 'company-document' }
|
|
74
|
-
CompanyDocumentMask.parameters = setTemplate('company-document')
|
|
75
|
-
|
|
76
|
-
export const PostalCodeMask = Template.bind({})
|
|
77
|
-
PostalCodeMask.args = { mask: 'postal-code' }
|
|
78
|
-
PostalCodeMask.parameters = setTemplate('postal-code')
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import QasLabel from './QasLabel.vue'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
component: QasLabel,
|
|
5
|
-
title: 'Components/Label',
|
|
6
|
-
|
|
7
|
-
parameters: {
|
|
8
|
-
docs: {
|
|
9
|
-
description: {
|
|
10
|
-
component: 'Standardizes the display of labels for a form\'s field.'
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
argTypes: {
|
|
16
|
-
// Events
|
|
17
|
-
label: {
|
|
18
|
-
description: 'Text to be displayed.'
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
margin: {
|
|
22
|
-
description: 'Margin spaces.'
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
quantity: {
|
|
26
|
-
description: 'Number to be displayed after label, inside parentheses. E.g. Groups (9).'
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
// Slots
|
|
30
|
-
default: {
|
|
31
|
-
description: 'Main content, will be replace label prop.',
|
|
32
|
-
table: {
|
|
33
|
-
defaultValue: {
|
|
34
|
-
detail: JSON.stringify({ formattedLabel: 'string' }),
|
|
35
|
-
summary: '{}'
|
|
36
|
-
},
|
|
37
|
-
type: { summary: null }
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const Template = (args, { argTypes }) => ({
|
|
44
|
-
components: { QasLabel },
|
|
45
|
-
props: Object.keys(argTypes),
|
|
46
|
-
|
|
47
|
-
template:
|
|
48
|
-
'<qas-label v-bind="$props" />'
|
|
49
|
-
})
|
|
50
|
-
|
|
51
|
-
export const Default = Template.bind({})
|
|
52
|
-
Default.args = {
|
|
53
|
-
label: 'My label!'
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export const Quantity = Template.bind({})
|
|
57
|
-
Quantity.args = {
|
|
58
|
-
label: 'My label, but with quantity!',
|
|
59
|
-
quantity: 10
|
|
60
|
-
}
|