@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,76 +0,0 @@
1
- import QasPasswordInput from './QasPasswordInput.vue'
2
-
3
- export default {
4
- component: QasPasswordInput,
5
- title: 'Components/PasswordInput',
6
-
7
- parameters: {
8
- docs: {
9
- description: {
10
- component: 'Creates a password input with strength checker.'
11
- }
12
- }
13
- },
14
-
15
- argTypes: {
16
- // Props
17
- hideStrengthChecker: {
18
- description: 'Hides the password strength check component.'
19
- },
20
-
21
- iconColor: {
22
- description: 'Color name for icon from the [Quasar Color Palette](https://quasar.dev/style/color-palette#Color-List).'
23
- },
24
-
25
- pattern: {
26
- description: 'Sets the pattern for the input strenght with RegExp and string.'
27
- },
28
-
29
- value: {
30
- description: 'Password field value.'
31
- },
32
-
33
- weak: {
34
- description: 'Define weak password level.'
35
- },
36
-
37
- // Events
38
- input: {
39
- description: 'Fires when the value changes.',
40
- table: {
41
- type: { summary: null }
42
- }
43
- },
44
-
45
- 'password-success': {
46
- description: 'Fires when a password meets requirements.',
47
- table: {
48
- type: { summary: null }
49
- }
50
- },
51
-
52
- // Slots
53
- default: {
54
- description: 'Main content.',
55
- table: {
56
- type: { summary: null }
57
- }
58
- }
59
- }
60
- }
61
-
62
- const Template = (args, { argTypes }) => ({
63
- components: { QasPasswordInput },
64
- props: Object.keys(argTypes),
65
-
66
- data () {
67
- return { model: 'Example@321' }
68
- },
69
-
70
- template: '<qas-password-input v-model="model" v-bind="$props" />'
71
- })
72
-
73
- export const Default = Template.bind({})
74
- Default.args = {
75
- pattern: /(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/
76
- }
@@ -1,54 +0,0 @@
1
- import QasPasswordStrengthChecker from './QasPasswordStrengthChecker.vue'
2
-
3
- export default {
4
- component: QasPasswordStrengthChecker,
5
- title: 'Components/PasswordStrengthChecker',
6
-
7
- parameters: {
8
- docs: {
9
- description: {
10
- component: 'Password strenght checker.'
11
- }
12
- }
13
- },
14
-
15
- argTypes: {
16
- // Props
17
- pattern: {
18
- description: 'Sets the pattern for the input strenght with RegExp and string.'
19
- },
20
-
21
- trackColor: {
22
- description: 'Color name for component\'s track from the Quasar Color Palette.'
23
- },
24
-
25
- value: {
26
- description: 'Password field value.'
27
- },
28
-
29
- weak: {
30
- description: 'Define weak password level.'
31
- },
32
-
33
- // Events
34
- 'password-success': {
35
- description: 'Fires when a password meets requirements.',
36
- table: {
37
- type: { summary: null }
38
- }
39
- }
40
- }
41
- }
42
-
43
- const Template = (args, { argTypes }) => ({
44
- components: { QasPasswordStrengthChecker },
45
- props: Object.keys(argTypes),
46
- template: '<qas-password-strength-checker v-bind="$props" />'
47
- })
48
-
49
- export const Default = Template.bind({})
50
-
51
- Default.args = {
52
- pattern: /(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/,
53
- value: 'Example@321'
54
- }
@@ -1,131 +0,0 @@
1
- import QasProfile from './QasProfile.vue'
2
-
3
- const noSummary = {
4
- type: { summary: null }
5
- }
6
-
7
- export default {
8
- component: QasProfile,
9
- title: 'Components/Profile',
10
-
11
- parameters: {
12
- docs: {
13
- description: {
14
- component: 'Profile view.'
15
- }
16
- }
17
- },
18
-
19
- argTypes: {
20
- // Props
21
- columns: {
22
- description: 'Define size of each column.',
23
- table: {
24
- defaultValue: { summary: '[]' }
25
- }
26
- },
27
-
28
- fields: {
29
- description: 'Define header value for each `field`.'
30
- },
31
-
32
- hideStatus: {
33
- description: 'Show the status badge.'
34
- },
35
-
36
- list: {
37
- description: 'List of the fields to be listed in grid.'
38
- },
39
-
40
- result: {
41
- description: 'Define result value for each `field`.'
42
- },
43
-
44
- subtitle: {
45
- description: 'Component subtitle.'
46
- },
47
-
48
- tag: {
49
- description: 'Type of main element.'
50
- },
51
-
52
- title: {
53
- description: 'Component title.'
54
- },
55
-
56
- // Slot
57
- default: {
58
- description: 'Main content.',
59
- table: noSummary
60
- },
61
-
62
- grid: {
63
- description: 'Grid custom fields.',
64
- table: noSummary
65
- }
66
- }
67
- }
68
-
69
- const Template = (args, { argTypes }) => ({
70
- components: { QasProfile },
71
- props: Object.keys(argTypes),
72
- template:
73
- '<qas-profile v-bind="$props" :title="result.name" />'
74
- })
75
-
76
- const fields = {
77
- name: { name: 'name', label: 'Full name', type: 'text' },
78
- email: { name: 'email', label: 'E-mail', type: 'email' },
79
- phone: { name: 'phone', label: 'Phone', type: 'text', mask: 'phone' },
80
- gender: { name: 'gender', label: 'Gender', type: 'text' },
81
- document: { name: 'document', label: 'Document', type: 'text', mask: 'document' },
82
- address: { name: 'address', label: 'Address', type: 'text' }
83
- }
84
-
85
- const list = ['name', 'phone', 'gender', 'document', 'address', 'email']
86
-
87
- const result = {
88
- name: 'John Appleseed',
89
- phone: '99999999999',
90
- gender: 'Male',
91
- document: '99999999999',
92
- address: '747 Austen View',
93
- email: 'john.appleseed@example.com'
94
- }
95
-
96
- const columns = {
97
- name: { col: 12, sm: 6 },
98
- phone: { col: 12, sm: 6 },
99
- gender: { col: 12, sm: 6 },
100
- document: { col: 12, sm: 6 },
101
- address: { col: 6 },
102
- email: { col: 12, sm: 6 }
103
- }
104
-
105
- export const Default = Template.bind({})
106
- Default.args = {
107
- columns,
108
- fields,
109
- list,
110
- result
111
- }
112
-
113
- Default.parameters = {
114
- docs: {
115
- source: { code: `<qas-profile :fields="fields" :list="list" :result="result" :columns="${JSON.stringify(columns)}" />` }
116
- }
117
- }
118
-
119
- export const CustomColumns = Template.bind({})
120
- CustomColumns.args = {
121
- columns,
122
- fields,
123
- list,
124
- result
125
- }
126
-
127
- CustomColumns.parameters = {
128
- docs: {
129
- source: { code: `<qas-profile :fields="fields" :list="list" :result="result" :columns="${JSON.stringify(columns)}" />` }
130
- }
131
- }
@@ -1,43 +0,0 @@
1
- import QasResizer from './QasResizer.vue'
2
-
3
- export default {
4
- component: QasResizer,
5
- title: 'Components/Resizer',
6
-
7
- parameters: {
8
- docs: {
9
- description: {
10
- component: 'Resize images on cloud.'
11
- }
12
- }
13
- },
14
-
15
- argTypes: {
16
- resize: {
17
- control: { type: 'select', options: ['cover', 'contain', 'fill', 'inside', 'outside'] },
18
- description: 'Resizer fit format.'
19
- },
20
-
21
- size: {
22
- description: 'Image size.'
23
- },
24
-
25
- source: {
26
- description: 'Path of image.'
27
- }
28
- }
29
- }
30
-
31
- const Template = (args, { argTypes }) => ({
32
- props: Object.keys(argTypes),
33
- components: { QasResizer },
34
- template:
35
- '<qas-resizer v-bind="$props" />'
36
- })
37
-
38
- export const Default = Template.bind({})
39
-
40
- Default.args = {
41
- size: '100x100',
42
- source: '//placehold.it/1000'
43
- }
@@ -1,111 +0,0 @@
1
- import QasSearchBox from './QasSearchBox.vue'
2
-
3
- const noSummary = {
4
- type: { summary: null }
5
- }
6
-
7
- const options = JSON.stringify({
8
- distance: 100,
9
- location: 0,
10
- maxPatternLength: 32,
11
- minMatchCharLength: 1,
12
- shouldSort: true,
13
- threshold: 0.1,
14
- tokenize: true
15
- })
16
-
17
- export default {
18
- component: QasSearchBox,
19
- title: 'Components/SearchBox',
20
-
21
- parameters: {
22
- docs: {
23
- description: {
24
- component: 'Filters items in the provided list.<br />Search algorithm powered by [Fuse.js](https://fusejs.io).'
25
- }
26
- }
27
- },
28
-
29
- argTypes: {
30
- // Props
31
- emptyListHeight: {
32
- description: 'List height when there is no results.'
33
- },
34
-
35
- fuseOptions: {
36
- description: '[Fuse.js options](https://fusejs.io/api/options.html)',
37
- table: {
38
- defaultValue: { detail: options }
39
- }
40
- },
41
-
42
- height: {
43
- description: 'List height (without search field).'
44
- },
45
-
46
- hideEmptySlot: {
47
- description: 'Hides empty slot.'
48
- },
49
-
50
- list: {
51
- description: 'Array of objects with `label` and `value` each, to be searched.'
52
- },
53
-
54
- placeholder: {
55
- description: 'Display temporary message when search field in empty.'
56
- },
57
-
58
- value: {
59
- description: 'Search field value.'
60
- },
61
-
62
- // Events
63
- emptyResult: {
64
- description: 'Fires when there is no results.',
65
- table: noSummary
66
- },
67
-
68
- input: {
69
- description: 'Fires when the result changes.',
70
- table: noSummary
71
- },
72
-
73
- // Slots
74
- default: {
75
- description: 'To format results. Receives the filtered list.',
76
- table: {
77
- defaultValue: {
78
- detail: JSON.stringify({ results: 'array' }),
79
- summary: '{}'
80
- },
81
- ...noSummary
82
- }
83
- },
84
-
85
- empty: {
86
- description: 'To be displayed when there is no results.',
87
- table: noSummary
88
- }
89
- }
90
- }
91
-
92
- const Template = (args, { argTypes }) => ({
93
- components: { QasSearchBox },
94
- props: Object.keys(argTypes),
95
- template:
96
- `<qas-search-box v-bind="$props" >
97
- <template v-slot="{ results }">
98
- <pre>{{ results }}</pre>
99
- </template>
100
- </qas-search-box>`
101
- })
102
-
103
- export const Default = Template.bind({})
104
- // TODO: Inserir um mock maior e criar exemplos mais visuais.
105
- Default.args = {
106
- fuseOptions: { keys: ['label'] },
107
- list: [
108
- { label: 'Paul', value: 1 },
109
- { label: 'Walker', value: 2 }
110
- ]
111
- }
@@ -1,113 +0,0 @@
1
- import QasSelect from './QasSelect.vue'
2
-
3
- const noSummary = {
4
- type: { summary: null }
5
- }
6
-
7
- const options = JSON.stringify({
8
- distance: 100,
9
- includeScore: true,
10
- keys: ['label', 'value'],
11
- location: 0,
12
- maxPatternLength: 32,
13
- minMatchCharLength: 1,
14
- shouldSort: true,
15
- threshold: 0.1,
16
- tokenize: true
17
- })
18
-
19
- export default {
20
- component: QasSelect,
21
- title: 'Components/Select',
22
-
23
- parameters: {
24
- docs: {
25
- description: {
26
- component: 'Filter options by text. Uses [Fuse.js](https://fusejs.io/) and extends [QSelect](https://quasar.dev/vue-components/select).'
27
- }
28
- }
29
- },
30
-
31
- argTypes: {
32
- // Props
33
- fuseOptions: {
34
- description: '[Fuse.js](https://fusejs.io/) options.',
35
- table: {
36
- defaultValue: { detail: options }
37
- }
38
- },
39
-
40
- labelKey: {
41
- description: 'Key to be used instead of `label`.'
42
- },
43
-
44
- options: {
45
- description: 'Select options.'
46
- },
47
-
48
- noOptionLabel: {
49
- description: 'Text for empty result on search.'
50
- },
51
-
52
- value: {
53
- description: 'String to filter results.'
54
- },
55
-
56
- valueKey: {
57
- description: 'Key to be used instead of `value`.'
58
- },
59
-
60
- searchable: {
61
- description: 'option to enable the search field.'
62
- },
63
-
64
- // Events
65
- input: {
66
- description: 'Fires when model changes. Also used by `v-model`.'
67
- },
68
-
69
- // Slots
70
- append: {
71
- description: 'Attach to the inner field.',
72
- table: {
73
- category: 'slots',
74
- ...noSummary
75
- }
76
- },
77
-
78
- 'no-option': {
79
- description: 'Customize display when there is no options to show. By default, the results box does not appear.',
80
- table: {
81
- category: 'slots',
82
- ...noSummary
83
- }
84
- },
85
-
86
- option: {
87
- description: 'Replace an option defaults.',
88
- table: noSummary
89
- }
90
- }
91
- }
92
-
93
- const Template = ({ options }, { argTypes }) => ({
94
- components: { QasSelect },
95
- props: Object.keys(argTypes),
96
-
97
- data () {
98
- return {
99
- model: ''
100
- }
101
- },
102
-
103
- template: '<qas-select v-model="model" v-bind="$props" label="Selecione o item"/>'
104
- })
105
-
106
- export const Default = Template.bind({})
107
-
108
- Default.args = {
109
- options: [
110
- { label: 'Option 1', value: '1' },
111
- { label: 'Option 2', value: '2' }
112
- ]
113
- }
@@ -1,153 +0,0 @@
1
- import QasSelectList from './QasSelectList.vue'
2
-
3
- const noSummary = {
4
- type: { summary: null }
5
- }
6
-
7
- export default {
8
- component: QasSelectList,
9
- title: 'Components/SelectList',
10
-
11
- parameters: {
12
- docs: {
13
- description: {
14
- component: 'Extends `SearchBox`. Filter and select items and return selected items.'
15
- }
16
- }
17
- },
18
-
19
- argTypes: {
20
- deleteOnly: {
21
- description: 'Remove options by value model.',
22
- table: {
23
- defaultValue: { summary: false }
24
- }
25
- },
26
-
27
- fuseOptions: {
28
- description: '[Fuse.js](https://fusejs.io) options.',
29
- table: {
30
- defaultValue: {
31
- detail: JSON.stringify({ keys: ['label'] }),
32
- summary: '{}'
33
- }
34
- }
35
- },
36
-
37
- options: {
38
- description: 'Array of objects containing `label` and `value` each.'
39
- },
40
-
41
- to: {
42
- description: 'Object sended to `$router.push(to)` for each item.'
43
- },
44
-
45
- toIdentifier: {
46
- description: 'Key to be used as identifier.'
47
- },
48
-
49
- value: {
50
- control: { type: null },
51
- description: 'Array of selected items.'
52
- },
53
-
54
- // events
55
- input: {
56
- description: 'Fires when model changes. Also used by `v-model`.',
57
- table: {
58
- defaultValue: {
59
- detail: JSON.stringify({ value: 'array' }),
60
- summary: '{}'
61
- }
62
- }
63
- },
64
-
65
- added: {
66
- description: 'Fires when an item is added to the list.',
67
- table: {
68
- defaultValue: {
69
- detail: JSON.stringify({ item: 'object' }),
70
- summary: '{}'
71
- }
72
- }
73
- },
74
-
75
- removed: {
76
- description: 'Fires when removing an item from the list.',
77
- table: {
78
- defaultValue: {
79
- detail: JSON.stringify({ item: 'object', index: 'string' }),
80
- summary: '{}'
81
- }
82
- }
83
- },
84
-
85
- // Slots
86
- item: {
87
- description: '[QItem](https://quasar.dev/vue-components/list-and-list-items) slot.',
88
- table: {
89
- defaultValue: {
90
- detail: JSON.stringify({ context: 'SelectList' }),
91
- summary: '{}'
92
- },
93
- ...noSummary
94
- }
95
- },
96
-
97
- 'item-action': {
98
- description: 'Slot inside [QItemSection](https://quasar.dev/vue-components/list-and-list-items#QItemSection) encompassing action button.',
99
- table: {
100
- defaultValue: {
101
- detail: JSON.stringify({ context: 'SelectList' }),
102
- summary: '{}'
103
- },
104
- ...noSummary
105
- }
106
- },
107
-
108
- 'item-section': {
109
- description: '[QItemSection](https://quasar.dev/vue-components/list-and-list-items#QItemSection) wrapper slot.',
110
- table: {
111
- defaultValue: {
112
- detail: JSON.stringify({ result: 'object' }),
113
- summary: '{}'
114
- },
115
- ...noSummary
116
- }
117
- }
118
- }
119
- }
120
-
121
- const Template = (args, { argTypes }) => ({
122
- components: { QasSelectList },
123
- props: Object.keys(argTypes),
124
-
125
- data () {
126
- return {
127
- model: []
128
- }
129
- },
130
-
131
- template:
132
- `<div>
133
- <qas-select-list v-model="model" v-bind="$props" />
134
- <pre>{{ model }}</pre>
135
- </div>`
136
- })
137
-
138
- export const Default = Template.bind({})
139
- Default.args = {
140
- fuseOptions: { keys: ['label'] },
141
- options: [
142
- { label: 'Item 1', value: 1 },
143
- { label: 'Item 2', value: 2 },
144
- { label: 'Item 3', value: 3 },
145
- { label: 'Item 4', value: 4 },
146
- { label: 'Item 5', value: 5 },
147
- { label: 'Item 6', value: 6 },
148
- { label: 'Item 7', value: 7 },
149
- { label: 'Item 8', value: 8 },
150
- { label: 'Item 9', value: 9 },
151
- { label: 'Item 10', value: 10 }
152
- ]
153
- }