@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.
Files changed (280) hide show
  1. package/dist/api/QasActions.json +40 -0
  2. package/dist/api/QasActionsMenu.json +64 -0
  3. package/dist/api/QasAlert.json +40 -0
  4. package/dist/api/QasAppBar.json +52 -0
  5. package/dist/api/QasAppMenu.json +38 -0
  6. package/dist/api/QasAvatar.json +44 -0
  7. package/dist/api/QasBox.json +16 -0
  8. package/dist/api/QasBreakline.json +32 -0
  9. package/dist/api/QasBtn.json +16 -0
  10. package/dist/api/QasCard.json +52 -0
  11. package/dist/api/QasCheckboxGroup.json +38 -0
  12. package/dist/api/QasCopy.json +29 -0
  13. package/dist/api/QasDateTimeInput.json +60 -0
  14. package/dist/api/QasDebugger.json +13 -0
  15. package/dist/api/QasDelete.json +64 -0
  16. package/dist/api/QasDialog.json +109 -0
  17. package/dist/api/QasDialogRouter.json +31 -0
  18. package/dist/api/QasField.json +56 -0
  19. package/dist/api/QasFilters.json +111 -0
  20. package/dist/api/QasFormGenerator.json +92 -0
  21. package/dist/api/QasFormView.json +228 -0
  22. package/dist/api/QasGallery.json +54 -0
  23. package/dist/api/QasGridGenerator.json +108 -0
  24. package/dist/api/QasInput.json +40 -0
  25. package/dist/api/QasLabel.json +40 -0
  26. package/dist/api/QasLayout.json +47 -0
  27. package/dist/api/QasListItems.json +72 -0
  28. package/dist/api/QasListView.json +161 -0
  29. package/dist/api/QasMap.json +41 -0
  30. package/dist/api/QasNestedFields.json +223 -0
  31. package/dist/api/QasNumericInput.json +68 -0
  32. package/dist/api/QasPageHeader.json +36 -0
  33. package/dist/api/QasPasswordInput.json +121 -0
  34. package/dist/api/QasPasswordStrengthChecker.json +126 -0
  35. package/dist/api/QasProfile.json +74 -0
  36. package/dist/api/QasResizer.json +34 -0
  37. package/dist/api/QasSearchBox.json +91 -0
  38. package/dist/api/QasSelect.json +88 -0
  39. package/dist/api/QasSelectList.json +134 -0
  40. package/dist/api/QasSignaturePad.json +63 -0
  41. package/dist/api/QasSignatureUploader.json +41 -0
  42. package/dist/api/QasSingleView.json +147 -0
  43. package/dist/api/QasSortable.json +80 -0
  44. package/dist/api/QasTableGenerator.json +56 -0
  45. package/dist/api/QasTabsGenerator.json +90 -0
  46. package/dist/api/QasTextTruncate.json +38 -0
  47. package/dist/api/QasTransfer.json +70 -0
  48. package/dist/api/QasUploader.json +143 -0
  49. package/dist/asteroid.cjs.css +1 -0
  50. package/dist/asteroid.cjs.js +9307 -0
  51. package/dist/asteroid.cjs.min.js +6 -0
  52. package/dist/asteroid.esm.css +1 -0
  53. package/dist/asteroid.esm.js +9298 -0
  54. package/dist/asteroid.esm.min.js +6 -0
  55. package/dist/asteroid.umd.css +1 -0
  56. package/dist/asteroid.umd.js +9301 -0
  57. package/dist/asteroid.umd.min.js +6 -0
  58. package/dist/vetur/asteroid-attributes.json +1178 -0
  59. package/dist/vetur/asteroid-tags.json +535 -0
  60. package/package.json +41 -56
  61. package/src/assets/logo-modular.svg +1 -1
  62. package/src/asteroid.js +1 -0
  63. package/src/components/actions/QasActions.vue +45 -0
  64. package/src/components/actions/QasActions.yml +24 -0
  65. package/src/components/actions-menu/QasActionsMenu.vue +41 -14
  66. package/src/components/actions-menu/QasActionsMenu.yml +63 -0
  67. package/src/components/alert/QasAlert.vue +90 -0
  68. package/src/components/alert/QasAlert.yml +33 -0
  69. package/src/components/app-bar/QasAppBar.vue +16 -13
  70. package/src/components/app-bar/QasAppBar.yml +51 -0
  71. package/src/components/app-menu/QasAppMenu.vue +10 -12
  72. package/src/components/app-menu/QasAppMenu.yml +32 -0
  73. package/src/components/avatar/QasAvatar.vue +17 -9
  74. package/src/components/avatar/QasAvatar.yml +38 -0
  75. package/src/components/box/QasBox.vue +12 -4
  76. package/src/components/box/QasBox.yml +13 -0
  77. package/src/components/breakline/QasBreakline.vue +37 -0
  78. package/src/components/breakline/QasBreakline.yml +25 -0
  79. package/src/components/btn/QasBtn.vue +27 -24
  80. package/src/components/btn/QasBtn.yml +13 -0
  81. package/src/components/card/QasCard.vue +32 -33
  82. package/src/components/card/QasCard.yml +42 -0
  83. package/src/components/checkbox-group/QasCheckboxGroup.vue +50 -17
  84. package/src/components/checkbox-group/QasCheckboxGroup.yml +30 -0
  85. package/src/components/copy/QasCopy.vue +22 -11
  86. package/src/components/copy/QasCopy.yml +20 -0
  87. package/src/components/date-time-input/QasDateTimeInput.vue +18 -26
  88. package/src/components/date-time-input/QasDateTimeInput.yml +54 -0
  89. package/src/components/debugger/QasDebugger.vue +2 -0
  90. package/src/components/debugger/QasDebugger.yml +10 -0
  91. package/src/components/delete/QasDelete.vue +43 -16
  92. package/src/components/delete/QasDelete.yml +52 -0
  93. package/src/components/dialog/QasDialog.vue +63 -67
  94. package/src/components/dialog/QasDialog.yml +86 -0
  95. package/src/components/dialog-router/QasDialogRouter.vue +14 -4
  96. package/src/components/dialog-router/QasDialogRouter.yml +23 -0
  97. package/src/components/field/QasField.vue +21 -24
  98. package/src/components/field/QasField.yml +31 -0
  99. package/src/components/filters/QasFilters.vue +33 -26
  100. package/src/components/filters/QasFilters.yml +91 -0
  101. package/src/components/form-generator/QasFormGenerator.vue +13 -15
  102. package/src/components/form-generator/QasFormGenerator.yml +64 -0
  103. package/src/components/form-view/QasFormView.vue +129 -69
  104. package/src/components/form-view/QasFormView.yml +179 -0
  105. package/src/components/gallery/QasGallery.vue +47 -30
  106. package/src/components/gallery/QasGallery.yml +51 -0
  107. package/src/components/grid-generator/QasGridGenerator.vue +15 -7
  108. package/src/components/grid-generator/QasGridGenerator.yml +73 -0
  109. package/src/components/index.js +0 -0
  110. package/src/components/input/QasInput.vue +43 -36
  111. package/src/components/input/QasInput.yml +32 -0
  112. package/src/components/label/QasLabel.vue +14 -15
  113. package/src/components/label/QasLabel.yml +28 -0
  114. package/src/components/layout/QasLayout.vue +13 -21
  115. package/src/components/layout/QasLayout.yml +38 -0
  116. package/src/components/list-items/QasListItems.vue +15 -12
  117. package/src/components/list-items/QasListItems.yml +57 -0
  118. package/src/components/list-view/QasListView.vue +57 -31
  119. package/src/components/list-view/QasListView.yml +132 -0
  120. package/src/components/map/QasMap.vue +15 -31
  121. package/src/components/map/QasMap.yml +33 -0
  122. package/src/components/nested-fields/QasNestedFields.vue +57 -47
  123. package/src/components/nested-fields/QasNestedFields.yml +180 -0
  124. package/src/components/numeric-input/QasNumericInput.vue +31 -22
  125. package/src/components/numeric-input/QasNumericInput.yml +51 -0
  126. package/src/components/page-header/QasPageHeader.vue +20 -11
  127. package/src/components/page-header/QasPageHeader.yml +24 -0
  128. package/src/components/password-input/QasPasswordInput.vue +24 -21
  129. package/src/components/password-input/QasPasswordInput.yml +103 -0
  130. package/src/components/password-strength-checker/QasPasswordStrengthChecker.vue +51 -34
  131. package/src/components/password-strength-checker/QasPasswordStrengthChecker.yml +103 -0
  132. package/src/components/profile/QasProfile.vue +15 -13
  133. package/src/components/profile/QasProfile.yml +60 -0
  134. package/src/components/resizer/QasResizer.vue +3 -3
  135. package/src/components/resizer/QasResizer.yml +23 -0
  136. package/src/components/search-box/QasSearchBox.vue +50 -21
  137. package/src/components/search-box/QasSearchBox.yml +76 -0
  138. package/src/components/select/QasSelect.vue +51 -50
  139. package/src/components/select/QasSelect.yml +62 -0
  140. package/src/components/select-list/QasSelectList.vue +72 -53
  141. package/src/components/select-list/QasSelectList.yml +116 -0
  142. package/src/components/signature-pad/QasSignaturePad.vue +60 -40
  143. package/src/components/signature-pad/QasSignaturePad.yml +53 -0
  144. package/src/components/signature-uploader/QasSignatureUploader.vue +19 -17
  145. package/src/components/signature-uploader/QasSignatureUploader.yml +36 -0
  146. package/src/components/single-view/QasSingleView.vue +41 -22
  147. package/src/components/single-view/QasSingleView.yml +116 -0
  148. package/src/components/sortable/QasSortable.vue +51 -30
  149. package/src/components/sortable/QasSortable.yml +65 -0
  150. package/src/components/table-generator/QasTableGenerator.vue +112 -21
  151. package/src/components/table-generator/QasTableGenerator.yml +46 -0
  152. package/src/components/tabs-generator/QasTabsGenerator.vue +37 -25
  153. package/src/components/tabs-generator/QasTabsGenerator.yml +67 -0
  154. package/src/components/text-truncate/QasTextTruncate.vue +25 -17
  155. package/src/components/text-truncate/QasTextTruncate.yml +32 -0
  156. package/src/components/transfer/QasTransfer.vue +48 -49
  157. package/src/components/transfer/QasTransfer.yml +59 -0
  158. package/src/components/uploader/QasUploader.vue +169 -48
  159. package/src/components/uploader/QasUploader.yml +117 -0
  160. package/src/css/background.scss +1 -1
  161. package/src/css/border.scss +7 -6
  162. package/src/css/design-system.scss +0 -43
  163. package/src/css/fonts.scss +2 -28
  164. package/src/css/opacity.scss +0 -4
  165. package/src/css/set-brand.scss +15 -0
  166. package/src/css/transitions.scss +1 -1
  167. package/src/helpers/add-counter-suffix.js +3 -0
  168. package/src/helpers/{base64ToBlob.js → base-64-to-blob.js} +0 -0
  169. package/src/helpers/{constructObject.js → construct-object.js} +0 -0
  170. package/src/helpers/filter-object.js +8 -6
  171. package/src/helpers/filters.js +8 -4
  172. package/src/helpers/{greatestCommonDivisor.js → get-greatest-common-divisor.js} +0 -0
  173. package/src/helpers/get-slot-children-text.js +15 -0
  174. package/src/helpers/images.js +28 -0
  175. package/src/helpers/index.js +11 -59
  176. package/src/helpers/{isLocalDevelopment.js → is-local-development.js} +0 -0
  177. package/src/helpers/set-scroll-on-grab.js +61 -0
  178. package/src/index.cjs.js +1 -0
  179. package/src/index.esm.js +4 -0
  180. package/src/index.scss +19 -21
  181. package/src/index.umd.js +2 -0
  182. package/src/mixins/context.js +1 -1
  183. package/src/mixins/dialog-router.js +17 -0
  184. package/src/mixins/form.js +4 -12
  185. package/src/mixins/generator.js +14 -14
  186. package/src/mixins/index.js +2 -8
  187. package/src/mixins/password.js +73 -11
  188. package/src/mixins/screen.js +8 -6
  189. package/src/mixins/view.js +62 -22
  190. package/src/plugins/dialog/Dialog.js +14 -0
  191. package/src/plugins/dialog/Dialog.yml +10 -0
  192. package/src/plugins/index.js +4 -2
  193. package/src/plugins/{NotifyError.js → notify-error/NotifyError.js} +0 -0
  194. package/src/plugins/notify-error/NotifyError.yml +11 -0
  195. package/src/plugins/{NotifySuccess.js → notify-success/NotifySuccess.js} +3 -3
  196. package/src/plugins/notify-success/NotifySuccess.yml +11 -0
  197. package/src/store/history.js +43 -0
  198. package/src/store/index.js +1 -0
  199. package/src/vue-plugin.js +185 -0
  200. package/.babelrc +0 -12
  201. package/.storybook/main.js +0 -35
  202. package/.storybook/preview.js +0 -26
  203. package/debug.log +0 -1
  204. package/index.js +0 -4
  205. package/jest-setup.js +0 -1
  206. package/jest.config.json +0 -22
  207. package/postcss.config.js +0 -5
  208. package/src/components/Introduction.stories.mdx +0 -12
  209. package/src/components/actions-menu/QasActionsMenu.stories.js +0 -73
  210. package/src/components/app-bar/QasAppBar.stories.js +0 -84
  211. package/src/components/app-menu/QasAppMenu.stories.js +0 -66
  212. package/src/components/apps-menu/QasAppsMenu.spec.js +0 -58
  213. package/src/components/apps-menu/QasAppsMenu.stories.js +0 -54
  214. package/src/components/apps-menu/QasAppsMenu.vue +0 -48
  215. package/src/components/avatar/QasAvatar.spec.js +0 -14
  216. package/src/components/avatar/QasAvatar.stories.js +0 -52
  217. package/src/components/box/QasBox.spec.js +0 -18
  218. package/src/components/box/QasBox.stories.js +0 -35
  219. package/src/components/break-line/QasBreakLine.stories.js +0 -57
  220. package/src/components/break-line/QasBreakLine.vue +0 -52
  221. package/src/components/btn/QasBtn.stories.js +0 -45
  222. package/src/components/btn-actions/QasBtnActions.stories.js +0 -77
  223. package/src/components/btn-actions/QasBtnActions.vue +0 -54
  224. package/src/components/card/QasCard.stories.js +0 -126
  225. package/src/components/checkbox-group/QasCheckboxGroup.stories.js +0 -59
  226. package/src/components/copy/QasCopy.stories.js +0 -41
  227. package/src/components/date-time-input/QasDateTimeInput.stories.js +0 -67
  228. package/src/components/debugger/QasDebugger.stories.js +0 -33
  229. package/src/components/delete/QasDelete.stories.js +0 -80
  230. package/src/components/dialog/QasDialog.stories.js +0 -139
  231. package/src/components/dialog-router/QasDialogRouter.stories.js +0 -38
  232. package/src/components/field/QasField.stories.js +0 -181
  233. package/src/components/filters/QasFilters.stories.js +0 -121
  234. package/src/components/form-generator/QasFormGenerator.stories.js +0 -115
  235. package/src/components/form-view/QasFormView.stories.js +0 -236
  236. package/src/components/gallery/QasGallery.stories.js +0 -91
  237. package/src/components/grid-generator/QasGridGenerator.stories.js +0 -142
  238. package/src/components/input/QasInput.stories.js +0 -78
  239. package/src/components/label/QasLabel.stories.js +0 -60
  240. package/src/components/layout/QasLayout.stories.js +0 -104
  241. package/src/components/list-items/QasListItems.stories.js +0 -135
  242. package/src/components/list-view/QasListView.stories.js +0 -168
  243. package/src/components/map/QasMap.stories.js +0 -75
  244. package/src/components/nested-fields/QasNestedFields.stories.js +0 -255
  245. package/src/components/numeric-input/QasNumericInput.stories.js +0 -92
  246. package/src/components/page-header/QasPageHeader.stories.js +0 -61
  247. package/src/components/password-input/QasPasswordInput.stories.js +0 -76
  248. package/src/components/password-strength-checker/QasPasswordStrengthChecker.stories.js +0 -54
  249. package/src/components/profile/QasProfile.stories.js +0 -131
  250. package/src/components/resizer/QasResizer.stories.js +0 -43
  251. package/src/components/search-box/QasSearchBox.stories.js +0 -111
  252. package/src/components/select/QasSelect.stories.js +0 -113
  253. package/src/components/select-list/QasSelectList.stories.js +0 -153
  254. package/src/components/signature-pad/QasSignaturePad.stories.js +0 -51
  255. package/src/components/signature-uploader/QasSignatureUploader.stories.js +0 -69
  256. package/src/components/single-view/QasSingleView.stories.js +0 -130
  257. package/src/components/sortable/QasSortable.stories.js +0 -80
  258. package/src/components/table-generator/QasTableGenerator.stories.js +0 -120
  259. package/src/components/tabs-generator/QasTabsGenerator.stories.js +0 -145
  260. package/src/components/text-truncate/QasTextTruncate.stories.js +0 -55
  261. package/src/components/tip/QasTip.stories.js +0 -57
  262. package/src/components/tip/QasTip.vue +0 -68
  263. package/src/components/tooltip/QasTooltip.stories.js +0 -63
  264. package/src/components/tooltip/QasTooltip.vue +0 -81
  265. package/src/components/transfer/QasTransfer.stories.js +0 -118
  266. package/src/components/uploader/QasCustomUploader.vue +0 -120
  267. package/src/components/uploader/QasUploader.stories.js +0 -139
  268. package/src/directives/Test.js +0 -13
  269. package/src/helpers/historyHandler.js +0 -52
  270. package/src/helpers/label.js +0 -3
  271. package/src/index.js +0 -249
  272. package/src/mixins/map-markers.js +0 -26
  273. package/src/mixins/unsaved-changes.js +0 -24
  274. package/src/mixins/uploader.js +0 -30
  275. package/src/mocks/json/user.json +0 -27
  276. package/src/mocks/json/users-new.json +0 -23
  277. package/src/mocks/json/users.json +0 -97
  278. package/src/mocks/storeModule.js +0 -71
  279. package/src/pages/Forbidden.vue +0 -6
  280. package/src/pages/NotFound.vue +0 -6
@@ -1,51 +0,0 @@
1
- import QasSignaturePad from './QasSignaturePad.vue'
2
-
3
- export default {
4
- component: QasSignaturePad,
5
- title: 'Components/SignaturePad',
6
-
7
- parameters: {
8
- docs: {
9
- description: {
10
- component: 'Extends the [signature_pad](https://github.com/szimek/signature_pad) library.'
11
- }
12
- }
13
- },
14
-
15
- argTypes: {
16
- // Props
17
- options: {
18
- description: 'Options you can pass to customize your component [Signature Pad](https://github.com/szimek/signature_pad#options) options.',
19
- control: 'object'
20
- },
21
-
22
- type: {
23
- description: 'Type of image the generated base64 will have',
24
- sumarry: 'image/png',
25
- control: null
26
- },
27
-
28
- height: {
29
- description: 'Canvas Height.'
30
- },
31
-
32
- isEmpty: {
33
- table: {
34
- disable: true
35
- }
36
- },
37
-
38
- // Events
39
- 'update:isEmpty': {
40
- description: 'Props sent to the component to control it, if the canvas is empty.'
41
- }
42
- }
43
- }
44
-
45
- const Template = (args, { argTypes }) => ({
46
- components: { QasSignaturePad },
47
- props: Object.keys(argTypes),
48
- template: '<qas-signature-pad v-bind="$props" />'
49
- })
50
-
51
- export const Default = Template.bind({})
@@ -1,69 +0,0 @@
1
- import QasSignatureUploader from './QasSignatureUploader.vue'
2
-
3
- export default {
4
- component: QasSignatureUploader,
5
- title: 'Components/SignatureUploader',
6
-
7
- parameters: {
8
- docs: {
9
- description: {
10
- component: 'Extends the QasUploader and QasSignaturePad. Responsible for uploading the generated signature.'
11
- }
12
- }
13
- },
14
-
15
- argTypes: {
16
- // Props
17
- entity: {
18
- description: 'Used by server to know where to store files in the assets bucket.'
19
- },
20
-
21
- uploadLabel: {
22
- description: 'QasUploader header label.'
23
- },
24
-
25
- signatureLabel: {
26
- description: 'Generated signature label.'
27
- },
28
-
29
- value: {
30
- description: 'Model value.'
31
- },
32
-
33
- errorMessage: {
34
- description: 'Error message.'
35
- },
36
-
37
- type: {
38
- description: 'Type of file that the signature is going to be.'
39
- },
40
-
41
- readonly: {
42
- description: 'Disable action buttons.'
43
- },
44
-
45
- // Events
46
- input: {
47
- description: 'Fires when model changes. Is also used by `v-model`.'
48
- }
49
- }
50
- }
51
-
52
- const Template = (args, { argTypes }) => ({
53
- components: { QasSignatureUploader },
54
- props: Object.keys(argTypes),
55
-
56
- data () {
57
- return {
58
- signature: ''
59
- }
60
- },
61
-
62
- template: '<qas-signature-uploader v-model="signature" v-bind="$props" />'
63
- })
64
-
65
- export const Default = Template.bind({})
66
-
67
- Default.args = {
68
- entity: 'posts/image'
69
- }
@@ -1,130 +0,0 @@
1
- import Vuex from 'vuex'
2
- import users from '../../mocks/storeModule'
3
-
4
- import QasDebugger from '../debugger/QasDebugger'
5
- import QasSingleView from './QasSingleView.vue'
6
-
7
- const slotDefaults = {
8
- defaultValue: {
9
- detail: JSON.stringify({
10
- errors: 'object',
11
- fields: 'object',
12
- metadata: 'object',
13
- result: 'object'
14
- }),
15
-
16
- summary: '{}'
17
- },
18
-
19
- type: { summary: null }
20
- }
21
-
22
- export default {
23
- component: QasSingleView,
24
- title: 'Components/SingleView',
25
-
26
- parameters: {
27
- docs: {
28
- description: {
29
- component: 'You can use this component for <strong>view and display</strong> infos.'
30
- }
31
- }
32
- },
33
-
34
- argTypes: {
35
- // Props
36
- customId: {
37
- control: null,
38
- description: 'Sets a custom id to `entity`. When not set, will use the `:id` route param.'
39
- },
40
-
41
- dialog: {
42
- description: 'Use when the component is inside a dialog.'
43
- },
44
-
45
- entity: {
46
- control: null,
47
- description: '[VuexStoreModule](https://github.com/bildvitta/vuex-store-module) entity.'
48
- },
49
-
50
- url: {
51
- control: null,
52
- description: 'Ignore entity and specify another endpoint.'
53
- },
54
-
55
- value: {
56
- description: 'Model value'
57
- },
58
-
59
- // Events
60
- 'fetch-error': {
61
- description: 'Fires when occur an error fetching value.',
62
- table: {
63
- defaultValue: {
64
- detail: JSON.stringify({ error: 'object' }),
65
- summary: '{}'
66
- }
67
- }
68
- },
69
-
70
- 'fetch-success': {
71
- description: 'Fires when successfully get the value.',
72
- table: {
73
- defaultValue: {
74
- detail: JSON.stringify({ response: 'object', value: 'object' }),
75
- summary: '{}'
76
- }
77
- }
78
- },
79
-
80
- input: {
81
- description: 'Fires when successfully get the result.'
82
- },
83
-
84
- // Slots
85
- default: {
86
- description: 'Main content.',
87
- table: slotDefaults
88
- },
89
-
90
- footer: {
91
- description: 'Page\'s footer content.',
92
- table: {
93
- type: { summary: null }
94
- }
95
- },
96
-
97
- header: {
98
- description: 'Page\'s header content.',
99
- table: slotDefaults
100
- }
101
- }
102
- }
103
-
104
- const Template = (args, { argTypes }) => ({
105
- components: { QasDebugger, QasSingleView },
106
- props: Object.keys(argTypes),
107
-
108
- store: new Vuex.Store({
109
- modules: { users }
110
- }),
111
-
112
- template:
113
- `<q-layout>
114
- <q-page-container>
115
- <qas-single-view v-bind="$props">
116
- <template v-slot="{ fields, result }">
117
- Fields: <qas-debugger :inspect="[fields]" />
118
- Results: <qas-debugger :inspect="[result]" />
119
- </template>
120
- </qas-single-view>
121
- </q-page-container>
122
- </q-layout>`
123
- })
124
-
125
- export const Default = Template.bind({})
126
-
127
- Default.args = {
128
- customId: 'a755a6d1-fc4a-4961-a8cc-b2293fe5b81c',
129
- entity: 'users'
130
- }
@@ -1,80 +0,0 @@
1
- import QasSortable from './QasSortable.vue'
2
-
3
- export default {
4
- component: QasSortable,
5
- title: 'Components/Sortable',
6
-
7
- parameters: {
8
- docs: {
9
- description: {
10
- component: 'Sort elements by drag and drop. Uses [SortableJS](https://sortablejs.github.io/Sortable/).'
11
- }
12
- }
13
- },
14
-
15
- argTypes: {
16
- entity: {
17
- description: '[VuexStoreModule](https://github.com/bildvitta/vuex-store-module) entity.'
18
- },
19
-
20
- options: {
21
- description: '[SortableJS](https://sortablejs.github.io/Sortable/) library options.'
22
- },
23
-
24
- results: {
25
- description: 'List of elements to be ordered.'
26
- },
27
-
28
- tag: {
29
- description: 'Component wrapper tag.'
30
- },
31
-
32
- url: {
33
- description: 'Ignore entity and specify another endpoint.'
34
- },
35
-
36
- // Events
37
- sort: {
38
- description: 'Fires when an element is ordered (library\'s native event).'
39
- },
40
-
41
- success: {
42
- description: 'Fires after sorting and API returns success.'
43
- },
44
-
45
- // Slots
46
- default: {
47
- description: 'Returns the array with the ordered data.',
48
- table: {
49
- defaultValue: { summary: '[]' },
50
- type: { summary: '{ sorted: Object }' }
51
- }
52
- }
53
- }
54
- }
55
-
56
- const Template = (args, { argTypes }) => ({
57
- components: { QasSortable },
58
- props: Object.keys(argTypes),
59
-
60
- // TODO template deveria aparecer com a img
61
- template:
62
- `<qas-sortable v-bind="$props" class="flex">
63
- <template v-slot="{ sorted }">
64
- <div v-for="result in sorted" :key="result.id">
65
- <img :src="result.photo" />
66
- </div>
67
- </template>
68
- </qas-sortable>`
69
- })
70
-
71
- export const Default = Template.bind({})
72
-
73
- Default.args = {
74
- options: { animation: 700 },
75
- results: [
76
- { photo: 'https://placehold.it/150/f00', id: '1w312l' },
77
- { photo: 'https://placehold.it/150/0f0', id: '2y927s' },
78
- { photo: 'https://placehold.it/150/00f', id: '3x432q' }
79
- ]
80
- }
@@ -1,120 +0,0 @@
1
- import QasTableGenerator from './QasTableGenerator.vue'
2
-
3
- const hides = {
4
- table: { disable: true }
5
- }
6
-
7
- export default {
8
- component: QasTableGenerator,
9
- title: 'Components/TableGenerator',
10
-
11
- parameters: {
12
- docs: {
13
- description: {
14
- component: 'Extends [QTable](https://quasar.dev/vue-components/table).'
15
- }
16
- }
17
- },
18
-
19
- argTypes: {
20
- // Props
21
- columns: {
22
- description: 'Table columns and order.'
23
- },
24
-
25
- emptyResultText: {
26
- description: 'Message for fields with empty values.'
27
- },
28
-
29
- fields: {
30
- description: 'Contain fields data, as `name`, `label` and `type`.',
31
- table: {
32
- defaultValue: { summary: {} }
33
- }
34
- },
35
-
36
- order: hides,
37
-
38
- results: {
39
- description: 'Same keys as fields, but with results.'
40
- },
41
-
42
- rowKey: {
43
- description: 'Property of each row that defines the unique key of each row (the result must be a primitive, not Object, Array, etc).'
44
- },
45
-
46
- // Slots
47
- default: hides,
48
-
49
- body: {
50
- description: 'Slot to define how a body row looks like. Suggestion: QTr + Td. Check [QTable](https://quasar.dev/vue-components/table) docs.',
51
- table: {
52
- category: 'slots',
53
- type: { summary: null }
54
- }
55
- },
56
-
57
- 'body-cell-[field.name]': {
58
- description: 'Slot to define how a specific column cell looks like. replace "[field.name]" with column name (from columns definition object). Check [QTable](https://quasar.dev/vue-components/table) docs.',
59
- table: { category: 'slots' }
60
- }
61
- }
62
- }
63
-
64
- const Template = (args, { argTypes }) => ({
65
- components: { QasTableGenerator },
66
- props: Object.keys(argTypes),
67
- template: '<qas-table-generator v-bind="$props" />'
68
- })
69
-
70
- const fields = {
71
- name: { name: 'name', label: 'Full name', type: 'text' },
72
- email: { name: 'email', label: 'E-mail', type: 'email' },
73
- phone: { name: 'phone', label: 'Phone', type: 'text', mask: 'phone' },
74
- gender: { name: 'gender', label: 'Gender', type: 'text' },
75
- document: { name: 'document', label: 'Document', type: 'text', mask: 'document' },
76
- address: { name: 'address', label: 'Address', type: 'text' }
77
- }
78
-
79
- const results = [
80
- {
81
- name: 'John Appleseed 1',
82
- email: 'john.appleseed1@example.com',
83
- phone: '99999999999',
84
- gender: 'male',
85
- document: '99999999999',
86
- address: '747 Austen View'
87
- },
88
- {
89
- name: 'John Appleseed 2',
90
- email: 'john.appleseed2@example.com',
91
- phone: '99999999999',
92
- gender: 'male',
93
- document: '99999999999',
94
- address: '747 Austen View'
95
- },
96
- {
97
- name: 'John Appleseed 3',
98
- email: 'john.appleseed3@example.com',
99
- phone: '99999999999',
100
- gender: 'male',
101
- document: '99999999999',
102
- address: '747 Austen View'
103
- }
104
- ]
105
-
106
- const columns = [
107
- 'name',
108
- 'email',
109
- 'phone',
110
- 'gender',
111
- 'document',
112
- 'address'
113
- ]
114
-
115
- export const Default = Template.bind({})
116
- Default.args = {
117
- columns,
118
- fields,
119
- results
120
- }
@@ -1,145 +0,0 @@
1
- import QasTabsGenerator from './QasTabsGenerator.vue'
2
-
3
- export default {
4
- component: QasTabsGenerator,
5
- title: 'Components/TabsGenerator',
6
-
7
- parameters: {
8
- docs: {
9
- description: {
10
- component: 'Generates tabs dynamically. Implements [QTabs](https://quasar.dev/vue-components/tabs) e [QTab](https://quasar.dev/vue-components/tabs).'
11
- }
12
- }
13
- },
14
-
15
- argTypes: {
16
- // Props
17
- activeColor: {
18
- descritpion: 'The color to be attributed to the text of the active tab.',
19
- default: 'primary'
20
- },
21
-
22
- bgColorClass: {
23
- description: 'The color class to be attributed to the background of tab.',
24
- default: 'transparent'
25
- },
26
-
27
- colorClass: {
28
- description: 'The color class to be attributed to the text of all tabs.',
29
- default: 'text-primary'
30
- },
31
-
32
- counters: {
33
- description: 'Number that will appear on the badge for each tab.'
34
- },
35
-
36
- indicatorColor: {
37
- description: 'The color to be attributed to the indicator (the underline) of the active tab.',
38
- default: 'primary'
39
- },
40
-
41
- tabs: {
42
- description: 'Tabs list.'
43
- },
44
-
45
- value: {
46
- control: null,
47
- description: 'Selected tab.'
48
- },
49
-
50
- // Events
51
- input: {
52
- description: 'Fires when a tab is selected.'
53
- },
54
-
55
- // Slots
56
- default: {
57
- table: { disable: true }
58
- },
59
-
60
- 'tab-[label]': {
61
- description: 'Replace entire tab.',
62
- table: {
63
- category: 'slots',
64
- defaultValue: { summary: null },
65
- type: { summary: JSON.stringify({ item: 'object' }) }
66
- }
67
- },
68
-
69
- 'tab-slot-[label]': {
70
- description: 'Put a tag or a component after [QTab](https://quasar.dev/vue-components/tabs).',
71
- table: {
72
- category: 'slots',
73
- defaultValue: { summary: null },
74
- type: { summary: JSON.stringify({ item: 'object' }) }
75
- }
76
- }
77
- }
78
- }
79
-
80
- const Template = (args, { argTypes }) => ({
81
- components: { QasTabsGenerator },
82
- props: Object.keys(argTypes),
83
- template:
84
- '<qas-tabs-generator v-model="value" v-bind="$props" />'
85
- })
86
-
87
- export const Default = Template.bind({})
88
-
89
- Default.args = {
90
- counters: { tab: 2 },
91
- tabs: { tab1: 'tab1', tab2: 'tab2' }
92
- }
93
-
94
- // Dynamic
95
- const TemplateDynamic = (args, { argTypes }) => ({
96
- components: { QasTabsGenerator },
97
- props: Object.keys(argTypes),
98
- template:
99
- `<qas-tabs-generator class="bg-primary text-white" v-bind="$props" v-model="value">
100
- <template v-slot:tab-tab1>
101
- <div>Now it's a div, not a tab!</div>
102
- </template>
103
- </qas-tabs-generator>`
104
- })
105
-
106
- export const Dynamic = TemplateDynamic.bind({})
107
-
108
- Dynamic.args = {
109
- tabs: { tab1: 'tab1', tab2: 'tab2' }
110
- }
111
-
112
- Dynamic.parameters = {
113
- docs: {
114
- description: {
115
- story: 'Template for a specific tab:'
116
- }
117
- }
118
- }
119
-
120
- // AfterTabSlot
121
- const TemplateAfterTabSlot = (args, { argTypes }) => ({
122
- components: { QasTabsGenerator },
123
- props: Object.keys(argTypes),
124
-
125
- template:
126
- `<qas-tabs-generator v-model="value" v-bind="$props" class="bg-primary text-white">
127
- <template v-slot:tab-slot-tab1>
128
- <div>I'm inside the tab!</div>
129
- </template>
130
- </qas-tabs-generator>`
131
- })
132
-
133
- export const AfterTabSlot = TemplateAfterTabSlot.bind({})
134
-
135
- AfterTabSlot.args = {
136
- tabs: { tab1: 'tab1', tab2: 'tab2' }
137
- }
138
-
139
- AfterTabSlot.parameters = {
140
- docs: {
141
- description: {
142
- story: 'Use after slot to put something, like a badge.'
143
- }
144
- }
145
- }
@@ -1,55 +0,0 @@
1
- import QasTextTruncate from './QasTextTruncate.vue'
2
-
3
- const noSummary = {
4
- type: { summary: null }
5
- }
6
-
7
- export default {
8
- component: QasTextTruncate,
9
- title: 'Components/TextTruncate',
10
-
11
- parameters: {
12
- docs: {
13
- description: {
14
- component: 'Truncate a text based on parent width.'
15
- }
16
- }
17
- },
18
-
19
- argTypes: {
20
- dialog: {
21
- description: 'Events and props of QasDialog component.'
22
- },
23
-
24
- dialogTitle: {
25
- description: 'The title that will be show in the dialog.'
26
- },
27
-
28
- maxWidth: {
29
- description: 'Width that will be used as a delimiter to truncate the text.'
30
- },
31
-
32
- seeMoreLabel: {
33
- description: 'The label that be '
34
- },
35
-
36
- text: {
37
- description: 'The text that will be truncate.'
38
- },
39
-
40
- // Slots
41
-
42
- default: {
43
- description: 'Main content.',
44
- table: noSummary
45
- }
46
- }
47
- }
48
-
49
- const Template = (args, { argTypes }) => ({
50
- components: { QasTextTruncate },
51
- props: Object.keys(argTypes),
52
- template: '<qas-text-truncate dialog-title="Title" v-bind="$props" text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. " /><template #default>Este <strong>é um texto</strong> que pode começar em negrito.</template></qas-text-truncate>'
53
- })
54
-
55
- export const Default = Template.bind({})
@@ -1,57 +0,0 @@
1
- import QasTip from './QasTip.vue'
2
-
3
- const noSummary = {
4
- type: { summary: null }
5
- }
6
-
7
- export default {
8
- component: QasTip,
9
- title: 'Components/Tip',
10
-
11
- parameters: {
12
- docs: {
13
- description: {
14
- component: 'Creates a section where a warning or message will be shown.'
15
- }
16
- }
17
- },
18
-
19
- argTypes: {
20
- // Props
21
- bgColor: {
22
- description: 'Color name for tip\'s background.'
23
- },
24
-
25
- color: {
26
- description: 'Color name for the content tip.'
27
- },
28
-
29
- text: {
30
- description: 'Text that will be displayed on the tip.'
31
- },
32
-
33
- title: {
34
- description: 'Tip\'s title.'
35
- },
36
-
37
- // Slots
38
- default: {
39
- description: 'Main content.',
40
- table: noSummary
41
- },
42
-
43
- header: {
44
- description: 'Tip\'s header.',
45
- table: noSummary
46
- }
47
-
48
- }
49
- }
50
-
51
- const Template = (args, { argTypes }) => ({
52
- components: { QasTip },
53
- props: Object.keys(argTypes),
54
- template: '<qas-tip v-bind="$props" text="Text example" title="Title" />'
55
- })
56
-
57
- export const Default = Template.bind({})