quasar 2.4.11 → 2.5.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.
Files changed (216) hide show
  1. package/dist/api/BottomSheet.json +4 -0
  2. package/dist/api/Dialog.json +5 -1
  3. package/dist/api/Notify.json +20 -10
  4. package/dist/api/QBtnDropdown.json +4 -2
  5. package/dist/api/QCheckbox.json +27 -0
  6. package/dist/api/QEditor.json +4 -2
  7. package/dist/api/QExpansionItem.json +6 -3
  8. package/dist/api/QFab.json +4 -2
  9. package/dist/api/QFabAction.json +4 -2
  10. package/dist/api/QFile.json +4 -2
  11. package/dist/api/QImg.json +1 -2
  12. package/dist/api/QInnerLoading.json +2 -1
  13. package/dist/api/QInput.json +4 -2
  14. package/dist/api/QPagination.json +4 -2
  15. package/dist/api/QRadio.json +18 -0
  16. package/dist/api/QRange.json +9 -0
  17. package/dist/api/QScrollArea.json +13 -5
  18. package/dist/api/QSelect.json +6 -3
  19. package/dist/api/QSlider.json +9 -0
  20. package/dist/api/QSplitter.json +8 -4
  21. package/dist/api/QTable.json +9 -0
  22. package/dist/api/QTime.json +8 -2
  23. package/dist/api/QToggle.json +24 -24
  24. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  25. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  26. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  27. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  28. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  29. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  30. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  31. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  32. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  33. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  34. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  35. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  36. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  37. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  38. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  39. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  40. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  41. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  42. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  43. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  44. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  45. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  46. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  47. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  48. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  49. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  50. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  51. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  52. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  53. package/dist/icon-set/themify.umd.prod.js +1 -1
  54. package/dist/lang/ar.umd.prod.js +1 -1
  55. package/dist/lang/az-Latn.umd.prod.js +1 -1
  56. package/dist/lang/bg.umd.prod.js +1 -1
  57. package/dist/lang/bn.umd.prod.js +1 -1
  58. package/dist/lang/ca.umd.prod.js +1 -1
  59. package/dist/lang/cs.umd.prod.js +1 -1
  60. package/dist/lang/da.umd.prod.js +1 -1
  61. package/dist/lang/de.umd.prod.js +1 -1
  62. package/dist/lang/el.umd.prod.js +1 -1
  63. package/dist/lang/en-GB.umd.prod.js +1 -1
  64. package/dist/lang/en-US.umd.prod.js +1 -1
  65. package/dist/lang/eo.umd.prod.js +1 -1
  66. package/dist/lang/es.umd.prod.js +1 -1
  67. package/dist/lang/et.umd.prod.js +1 -1
  68. package/dist/lang/fa-IR.umd.prod.js +1 -1
  69. package/dist/lang/fa.umd.prod.js +1 -1
  70. package/dist/lang/fi.umd.prod.js +1 -1
  71. package/dist/lang/fr.umd.prod.js +1 -1
  72. package/dist/lang/gn.umd.prod.js +1 -1
  73. package/dist/lang/he.umd.prod.js +1 -1
  74. package/dist/lang/hr.umd.prod.js +1 -1
  75. package/dist/lang/hu.umd.prod.js +1 -1
  76. package/dist/lang/id.umd.prod.js +1 -1
  77. package/dist/lang/is.umd.prod.js +1 -1
  78. package/dist/lang/it.umd.prod.js +1 -1
  79. package/dist/lang/ja.umd.prod.js +1 -1
  80. package/dist/lang/km.umd.prod.js +1 -1
  81. package/dist/lang/ko-KR.umd.prod.js +1 -1
  82. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  83. package/dist/lang/lt.umd.prod.js +1 -1
  84. package/dist/lang/lu.umd.prod.js +1 -1
  85. package/dist/lang/lv.umd.prod.js +1 -1
  86. package/dist/lang/ml.umd.prod.js +1 -1
  87. package/dist/lang/ms.umd.prod.js +1 -1
  88. package/dist/lang/my.umd.prod.js +1 -1
  89. package/dist/lang/nb-NO.umd.prod.js +1 -1
  90. package/dist/lang/nl.umd.prod.js +1 -1
  91. package/dist/lang/pl.umd.prod.js +1 -1
  92. package/dist/lang/pt-BR.umd.prod.js +1 -1
  93. package/dist/lang/pt.umd.prod.js +1 -1
  94. package/dist/lang/ro.umd.prod.js +1 -1
  95. package/dist/lang/ru.umd.prod.js +1 -1
  96. package/dist/lang/sk.umd.prod.js +1 -1
  97. package/dist/lang/sl.umd.prod.js +1 -1
  98. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  99. package/dist/lang/sr.umd.prod.js +1 -1
  100. package/dist/lang/sv.umd.prod.js +1 -1
  101. package/dist/lang/ta.umd.prod.js +1 -1
  102. package/dist/lang/th.umd.prod.js +1 -1
  103. package/dist/lang/tr.umd.prod.js +1 -1
  104. package/dist/lang/ug.umd.prod.js +1 -1
  105. package/dist/lang/uk.umd.prod.js +1 -1
  106. package/dist/lang/vi.umd.prod.js +1 -1
  107. package/dist/lang/zh-CN.umd.prod.js +1 -1
  108. package/dist/lang/zh-TW.umd.prod.js +1 -1
  109. package/dist/quasar.cjs.prod.js +2 -2
  110. package/dist/quasar.css +43 -10
  111. package/dist/quasar.esm.prod.js +2 -2
  112. package/dist/quasar.prod.css +1 -1
  113. package/dist/quasar.rtl.css +60 -23
  114. package/dist/quasar.rtl.prod.css +1 -1
  115. package/dist/quasar.sass +34 -11
  116. package/dist/quasar.umd.js +314 -157
  117. package/dist/quasar.umd.prod.js +2 -2
  118. package/dist/ssr-directives/Morph.js +1 -1
  119. package/dist/transforms/auto-import.json +39 -3
  120. package/dist/transforms/import-map.json +18 -0
  121. package/dist/types/api/slider.d.ts +6 -7
  122. package/dist/types/api/vue-prop-types.ts +15 -0
  123. package/dist/types/api.d.ts +1 -0
  124. package/dist/types/index.d.ts +110 -184
  125. package/dist/types/utils/date.d.ts +25 -13
  126. package/dist/types/utils/dom.d.ts +4 -2
  127. package/dist/types/utils.d.ts +3 -1
  128. package/dist/vetur/quasar-attributes.json +62 -42
  129. package/dist/vetur/quasar-tags.json +8 -3
  130. package/dist/web-types/web-types.json +103 -58
  131. package/package.json +13 -3
  132. package/src/components/avatar/__tests__/QAvatar.spec.js +121 -0
  133. package/src/components/badge/__tests__/QBadge.spec.js +74 -0
  134. package/src/components/breadcrumbs/QBreadcrumbs.js +1 -1
  135. package/src/components/btn/__tests__/QBtn.spec.js +55 -0
  136. package/src/components/btn/__tests__/use-btn.spec.js +189 -0
  137. package/src/components/btn-dropdown/QBtnDropdown.json +4 -2
  138. package/src/components/checkbox/QCheckbox.js +34 -3
  139. package/src/components/checkbox/QCheckbox.json +17 -0
  140. package/src/components/checkbox/QCheckbox.sass +17 -5
  141. package/src/components/checkbox/use-checkbox.js +4 -0
  142. package/src/components/checkbox/use-checkbox.json +18 -0
  143. package/src/components/chip/__tests__/QChip.spec.js +155 -0
  144. package/src/components/date/__tests__/QDate.spec.js +189 -0
  145. package/src/components/date/__tests__/use-datetime.spec.js +83 -0
  146. package/src/components/dialog/QDialog.js +1 -1
  147. package/src/components/dialog/__tests__/QDialog.spec.js +129 -0
  148. package/src/components/editor/QEditor.js +1 -1
  149. package/src/components/editor/QEditor.json +3 -1
  150. package/src/components/editor/__tests__/QEditor.spec.js +195 -0
  151. package/src/components/expansion-item/QExpansionItem.json +6 -3
  152. package/src/components/fab/use-fab.json +4 -2
  153. package/src/components/field/QField.sass +2 -0
  154. package/src/components/file/QFile.json +4 -2
  155. package/src/components/form/QForm.js +27 -25
  156. package/src/components/img/QImg.json +2 -3
  157. package/src/components/inner-loading/QInnerLoading.json +2 -1
  158. package/src/components/input/QInput.js +10 -1
  159. package/src/components/input/QInput.json +4 -2
  160. package/src/components/input/__tests__/QInput.spec.js +105 -0
  161. package/src/components/input/__tests__/use-mask.spec.js +29 -0
  162. package/src/components/menu/QMenu.js +2 -1
  163. package/src/components/menu/__tests__/QMenu.spec.js +610 -0
  164. package/src/components/menu/__tests__/WrapperOne.vue +51 -0
  165. package/src/components/menu/__tests__/WrapperTwo.vue +38 -0
  166. package/src/components/pagination/QPagination.json +4 -2
  167. package/src/components/radio/QRadio.js +26 -1
  168. package/src/components/radio/QRadio.json +16 -0
  169. package/src/components/radio/QRadio.sass +17 -6
  170. package/src/components/scroll-area/QScrollArea.json +13 -5
  171. package/src/components/select/QSelect.js +13 -9
  172. package/src/components/select/QSelect.json +6 -3
  173. package/src/components/select/QSelect.sass +1 -0
  174. package/src/components/select/__tests__/QSelect.spec.js +2003 -0
  175. package/src/components/select/__tests__/WrapperOne.vue +28 -0
  176. package/src/components/slider/use-slider.json +9 -0
  177. package/src/components/splitter/QSplitter.json +8 -4
  178. package/src/components/stepper/QStep.js +19 -14
  179. package/src/components/stepper/QStepper.sass +3 -0
  180. package/src/components/table/QTable.json +9 -0
  181. package/src/components/table/__tests__/QTable.spec.js +635 -0
  182. package/src/components/table/__tests__/QTd.spec.js +35 -0
  183. package/src/components/table/__tests__/QTh.spec.js +27 -0
  184. package/src/components/table/__tests__/QTr.spec.js +27 -0
  185. package/src/components/tabs/__tests__/QRouteTab.spec.js +9 -0
  186. package/src/components/tabs/__tests__/QTab.spec.js +79 -0
  187. package/src/components/tabs/__tests__/QTabs.spec.js +147 -0
  188. package/src/components/time/QTime.json +2 -2
  189. package/src/components/toggle/QToggle.js +5 -13
  190. package/src/components/toggle/QToggle.json +3 -12
  191. package/src/components/uploader/__tests__/QUploader.spec.js +161 -0
  192. package/src/components/virtual-scroll/use-virtual-scroll.js +9 -6
  193. package/src/composables/private/__tests__/FieldWrapper.vue +39 -0
  194. package/src/composables/private/__tests__/use-anchor.spec.js +99 -0
  195. package/src/composables/private/__tests__/use-field.spec.js +351 -0
  196. package/src/composables/private/__tests__/use-file.spec.js +69 -0
  197. package/src/composables/private/__tests__/use-form.spec.js +11 -0
  198. package/src/composables/private/__tests__/use-fullscreen.spec.js +37 -0
  199. package/src/composables/private/__tests__/use-model-toggle.spec.js +306 -0
  200. package/src/composables/private/__tests__/use-portal.spec.js +4 -0
  201. package/src/composables/private/__tests__/use-router-link.spec.js +55 -0
  202. package/src/composables/private/__tests__/use-size.spec.js +37 -0
  203. package/src/composables/private/__tests__/use-transition.spec.js +108 -0
  204. package/src/composables/private/__tests__/use-validate.spec.js +111 -0
  205. package/src/composables/private/use-field.js +5 -8
  206. package/src/composables/private/use-fullscreen.js +1 -1
  207. package/src/composables/private/use-model-toggle.js +1 -1
  208. package/src/composables/private/use-validate.js +22 -22
  209. package/src/plugins/BottomSheet.json +1 -0
  210. package/src/plugins/Dialog.json +1 -0
  211. package/src/plugins/Meta.js +1 -1
  212. package/src/plugins/Notify.json +20 -10
  213. package/src/plugins/Screen.js +11 -8
  214. package/src/utils/date.js +111 -32
  215. package/src/utils/private/global-dialog.json +3 -0
  216. package/src/utils/private/vm.js +14 -8
@@ -0,0 +1,9 @@
1
+ describe('RouteTab API', () => {
2
+ describe('Events', () => {
3
+ describe('(event): click', () => {
4
+ it.skip(' ', () => {
5
+ //
6
+ })
7
+ })
8
+ })
9
+ })
@@ -0,0 +1,79 @@
1
+ describe('Tab API', () => {
2
+ describe('Props', () => {
3
+ describe('Category: content', () => {
4
+ describe('(prop): icon', () => {
5
+ it.skip(' ', () => {
6
+ //
7
+ })
8
+ })
9
+
10
+ describe('(prop): label', () => {
11
+ it.skip(' ', () => {
12
+ //
13
+ })
14
+ })
15
+
16
+ describe('(prop): alert', () => {
17
+ it.skip(' ', () => {
18
+ //
19
+ })
20
+ })
21
+
22
+ describe('(prop): alert-icon', () => {
23
+ it.skip(' ', () => {
24
+ //
25
+ })
26
+ })
27
+
28
+ describe('(prop): no-caps', () => {
29
+ it.skip(' ', () => {
30
+ //
31
+ })
32
+ })
33
+ })
34
+
35
+ describe('Category: general', () => {
36
+ describe('(prop): name', () => {
37
+ it.skip(' ', () => {
38
+ //
39
+ })
40
+ })
41
+
42
+ describe('(prop): tabindex', () => {
43
+ it.skip(' ', () => {
44
+ //
45
+ })
46
+ })
47
+ })
48
+
49
+ describe('Category: state', () => {
50
+ describe('(prop): disable', () => {
51
+ it.skip(' ', () => {
52
+ //
53
+ })
54
+ })
55
+ })
56
+
57
+ describe('Category: style', () => {
58
+ describe('(prop): content-class', () => {
59
+ it.skip(' ', () => {
60
+ //
61
+ })
62
+ })
63
+
64
+ describe('(prop): ripple', () => {
65
+ it.skip(' ', () => {
66
+ //
67
+ })
68
+ })
69
+ })
70
+ })
71
+
72
+ describe('Slots', () => {
73
+ describe('(slot): default', () => {
74
+ it.skip(' ', () => {
75
+ //
76
+ })
77
+ })
78
+ })
79
+ })
@@ -0,0 +1,147 @@
1
+ describe('Tabs API', () => {
2
+ describe('Props', () => {
3
+ describe('Category: content', () => {
4
+ describe('(prop): vertical', () => {
5
+ it.skip(' ', () => {
6
+ //
7
+ })
8
+ })
9
+
10
+ describe('(prop): outside-arrows', () => {
11
+ it.skip(' ', () => {
12
+ //
13
+ })
14
+ })
15
+
16
+ describe('(prop): mobile-arrows', () => {
17
+ it.skip(' ', () => {
18
+ //
19
+ })
20
+ })
21
+
22
+ describe('(prop): align', () => {
23
+ it.skip(' ', () => {
24
+ //
25
+ })
26
+ })
27
+
28
+ describe('(prop): left-icon', () => {
29
+ it.skip(' ', () => {
30
+ //
31
+ })
32
+ })
33
+
34
+ describe('(prop): right-icon', () => {
35
+ it.skip(' ', () => {
36
+ //
37
+ })
38
+ })
39
+
40
+ describe('(prop): stretch', () => {
41
+ it.skip(' ', () => {
42
+ //
43
+ })
44
+ })
45
+
46
+ describe('(prop): shrink', () => {
47
+ it.skip(' ', () => {
48
+ //
49
+ })
50
+ })
51
+
52
+ describe('(prop): switch-indicator', () => {
53
+ it.skip(' ', () => {
54
+ //
55
+ })
56
+ })
57
+
58
+ describe('(prop): narrow-indicator', () => {
59
+ it.skip(' ', () => {
60
+ //
61
+ })
62
+ })
63
+
64
+ describe('(prop): inline-label', () => {
65
+ it.skip(' ', () => {
66
+ //
67
+ })
68
+ })
69
+
70
+ describe('(prop): no-caps', () => {
71
+ it.skip(' ', () => {
72
+ //
73
+ })
74
+ })
75
+ })
76
+
77
+ describe('Category: content|behavior', () => {
78
+ describe('(prop): breakpoint', () => {
79
+ it.skip(' ', () => {
80
+ //
81
+ })
82
+ })
83
+ })
84
+
85
+ describe('Category: model', () => {
86
+ describe('(prop): model-value', () => {
87
+ it.skip(' ', () => {
88
+ //
89
+ })
90
+ })
91
+ })
92
+
93
+ describe('Category: style', () => {
94
+ describe('(prop): active-color', () => {
95
+ it.skip(' ', () => {
96
+ //
97
+ })
98
+ })
99
+
100
+ describe('(prop): active-bg-color', () => {
101
+ it.skip(' ', () => {
102
+ //
103
+ })
104
+ })
105
+
106
+ describe('(prop): indicator-color', () => {
107
+ it.skip(' ', () => {
108
+ //
109
+ })
110
+ })
111
+
112
+ describe('(prop): content-class', () => {
113
+ it.skip(' ', () => {
114
+ //
115
+ })
116
+ })
117
+
118
+ describe('(prop): active-class', () => {
119
+ it.skip(' ', () => {
120
+ //
121
+ })
122
+ })
123
+
124
+ describe('(prop): dense', () => {
125
+ it.skip(' ', () => {
126
+ //
127
+ })
128
+ })
129
+ })
130
+ })
131
+
132
+ describe('Slots', () => {
133
+ describe('(slot): default', () => {
134
+ it.skip(' ', () => {
135
+ //
136
+ })
137
+ })
138
+ })
139
+
140
+ describe('Events', () => {
141
+ describe('(event): update:model-value', () => {
142
+ it.skip(' ', () => {
143
+ //
144
+ })
145
+ })
146
+ })
147
+ })
@@ -47,12 +47,12 @@
47
47
  "examples": [ 15 ]
48
48
  },
49
49
  "min": {
50
- "type": "Number",
50
+ "type": [ "Number", "null" ],
51
51
  "desc": "Minutes",
52
52
  "examples": [ 38 ]
53
53
  },
54
54
  "sec": {
55
- "type": "Number",
55
+ "type": [ "Number", "null" ],
56
56
  "desc": "Seconds",
57
57
  "examples": [ 12 ]
58
58
  }
@@ -13,10 +13,6 @@ export default createComponent({
13
13
  ...useCheckboxProps,
14
14
 
15
15
  icon: String,
16
- checkedIcon: String,
17
- uncheckedIcon: String,
18
- indeterminateIcon: String,
19
-
20
16
  iconColor: String
21
17
  },
22
18
 
@@ -24,29 +20,25 @@ export default createComponent({
24
20
 
25
21
  setup (props) {
26
22
  function getInner (isTrue, isIndeterminate) {
27
- const computedIcon = computed(() =>
23
+ const icon = computed(() =>
28
24
  (isTrue.value === true
29
25
  ? props.checkedIcon
30
26
  : (isIndeterminate.value === true ? props.indeterminateIcon : props.uncheckedIcon)
31
27
  ) || props.icon
32
28
  )
33
29
 
34
- const computedIconColor = computed(() => {
35
- if (isTrue.value === true) {
36
- return props.iconColor
37
- }
38
- })
30
+ const color = computed(() => (isTrue.value === true ? props.iconColor : null))
39
31
 
40
32
  return () => [
41
33
  h('div', { class: 'q-toggle__track' }),
42
34
 
43
35
  h('div', {
44
36
  class: 'q-toggle__thumb absolute flex flex-center no-wrap'
45
- }, computedIcon.value !== void 0
37
+ }, icon.value !== void 0
46
38
  ? [
47
39
  h(QIcon, {
48
- name: computedIcon.value,
49
- color: computedIconColor.value
40
+ name: icon.value,
41
+ color: color.value
50
42
  })
51
43
  ]
52
44
  : void 0
@@ -11,24 +11,15 @@
11
11
  },
12
12
 
13
13
  "checked-icon": {
14
- "type": "String",
15
- "desc": "The icon to be used when the toggle is on",
16
- "examples": [ "visibility" ],
17
- "category": "content"
14
+ "desc": "The icon to be used when the toggle is on"
18
15
  },
19
16
 
20
17
  "unchecked-icon": {
21
- "type": "String",
22
- "desc": "The icon to be used when the toggle is off",
23
- "examples": [ "visibility_off" ],
24
- "category": "content"
18
+ "desc": "The icon to be used when the toggle is off"
25
19
  },
26
20
 
27
21
  "indeterminate-icon": {
28
- "type": "String",
29
- "desc": "The icon to be used when the model is indeterminate",
30
- "examples": [ "help" ],
31
- "category": "content"
22
+ "desc": "The icon to be used when the model is indeterminate"
32
23
  },
33
24
 
34
25
  "icon-color": {
@@ -0,0 +1,161 @@
1
+ describe('Uploader API', () => {
2
+ describe('Props', () => {
3
+ describe('Category: behavior', () => {
4
+ describe('(prop): auto-upload', () => {
5
+ it.skip(' ', () => {
6
+ //
7
+ })
8
+ })
9
+
10
+ describe('(prop): hide-upload-btn', () => {
11
+ it.skip(' ', () => {
12
+ //
13
+ })
14
+ })
15
+ })
16
+
17
+ describe('Category: content', () => {
18
+ describe('(prop): label', () => {
19
+ it.skip(' ', () => {
20
+ //
21
+ })
22
+ })
23
+
24
+ describe('(prop): no-thumbnails', () => {
25
+ it.skip(' ', () => {
26
+ //
27
+ })
28
+ })
29
+ })
30
+
31
+ describe('Category: state', () => {
32
+ describe('(prop): disable', () => {
33
+ it.skip(' ', () => {
34
+ //
35
+ })
36
+ })
37
+
38
+ describe('(prop): readonly', () => {
39
+ it.skip(' ', () => {
40
+ //
41
+ })
42
+ })
43
+ })
44
+
45
+ describe('Category: style', () => {
46
+ describe('(prop): color', () => {
47
+ it.skip(' ', () => {
48
+ //
49
+ })
50
+ })
51
+
52
+ describe('(prop): text-color', () => {
53
+ it.skip(' ', () => {
54
+ //
55
+ })
56
+ })
57
+
58
+ describe('(prop): dark', () => {
59
+ it.skip(' ', () => {
60
+ //
61
+ })
62
+ })
63
+
64
+ describe('(prop): square', () => {
65
+ it.skip(' ', () => {
66
+ //
67
+ })
68
+ })
69
+
70
+ describe('(prop): flat', () => {
71
+ it.skip(' ', () => {
72
+ //
73
+ })
74
+ })
75
+
76
+ describe('(prop): bordered', () => {
77
+ it.skip(' ', () => {
78
+ //
79
+ })
80
+ })
81
+ })
82
+ })
83
+
84
+ describe('Slots', () => {
85
+ describe('(slot): header', () => {
86
+ it.skip(' ', () => {
87
+ //
88
+ })
89
+ })
90
+
91
+ describe('(slot): list', () => {
92
+ it.skip(' ', () => {
93
+ //
94
+ })
95
+ })
96
+ })
97
+
98
+ describe('Events', () => {
99
+ describe('(event): added', () => {
100
+ it.skip(' ', () => {
101
+ //
102
+ })
103
+ })
104
+
105
+ describe('(event): removed', () => {
106
+ it.skip(' ', () => {
107
+ //
108
+ })
109
+ })
110
+
111
+ describe('(event): start', () => {
112
+ it.skip(' ', () => {
113
+ //
114
+ })
115
+ })
116
+
117
+ describe('(event): finish', () => {
118
+ it.skip(' ', () => {
119
+ //
120
+ })
121
+ })
122
+ })
123
+
124
+ describe('Methods', () => {
125
+ describe('(method): upload', () => {
126
+ it.skip(' ', () => {
127
+ //
128
+ })
129
+ })
130
+
131
+ describe('(method): abort', () => {
132
+ it.skip(' ', () => {
133
+ //
134
+ })
135
+ })
136
+
137
+ describe('(method): reset', () => {
138
+ it.skip(' ', () => {
139
+ //
140
+ })
141
+ })
142
+
143
+ describe('(method): removeUploadedFiles', () => {
144
+ it.skip(' ', () => {
145
+ //
146
+ })
147
+ })
148
+
149
+ describe('(method): removeQueuedFiles', () => {
150
+ it.skip(' ', () => {
151
+ //
152
+ })
153
+ })
154
+
155
+ describe('(method): removeFile', () => {
156
+ it.skip(' ', () => {
157
+ //
158
+ })
159
+ })
160
+ })
161
+ })
@@ -559,13 +559,14 @@ export function useVirtualScroll ({
559
559
  prevToIndex = -1
560
560
  prevScrollStart = void 0
561
561
 
562
+ virtualScrollPaddingBefore.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, 0, virtualScrollSliceRange.value.from)
563
+ virtualScrollPaddingAfter.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, virtualScrollSliceRange.value.to, virtualScrollLength.value)
564
+
562
565
  if (toIndex >= 0) {
563
566
  updateVirtualScrollSizes(virtualScrollSliceRange.value.from)
564
567
  nextTick(() => { scrollTo(toIndex) })
565
568
  }
566
569
  else {
567
- virtualScrollPaddingBefore.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, 0, virtualScrollSliceRange.value.from)
568
- virtualScrollPaddingAfter.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, virtualScrollSliceRange.value.to, virtualScrollLength.value)
569
570
  onVirtualScrollEvt()
570
571
  }
571
572
  }
@@ -590,7 +591,9 @@ export function useVirtualScroll ({
590
591
 
591
592
  localScrollViewSize = scrollViewSize
592
593
 
593
- const multiplier = 1 + props.virtualScrollSliceRatioBefore + props.virtualScrollSliceRatioAfter
594
+ const virtualScrollSliceRatioBefore = parseFloat(props.virtualScrollSliceRatioBefore) || 0
595
+ const virtualScrollSliceRatioAfter = parseFloat(props.virtualScrollSliceRatioAfter) || 0
596
+ const multiplier = 1 + virtualScrollSliceRatioBefore + virtualScrollSliceRatioAfter
594
597
  const view = scrollViewSize === void 0 || scrollViewSize <= 0
595
598
  ? 1
596
599
  : Math.ceil(scrollViewSize / virtualScrollItemSizeComputed.value)
@@ -603,9 +606,9 @@ export function useVirtualScroll ({
603
606
 
604
607
  virtualScrollSliceSizeComputed.value = {
605
608
  total: Math.ceil(baseSize * multiplier),
606
- start: Math.ceil(baseSize * props.virtualScrollSliceRatioBefore),
607
- center: Math.ceil(baseSize * (0.5 + props.virtualScrollSliceRatioBefore)),
608
- end: Math.ceil(baseSize * (1 + props.virtualScrollSliceRatioBefore)),
609
+ start: Math.ceil(baseSize * virtualScrollSliceRatioBefore),
610
+ center: Math.ceil(baseSize * (0.5 + virtualScrollSliceRatioBefore)),
611
+ end: Math.ceil(baseSize * (1 + virtualScrollSliceRatioBefore)),
609
612
  view
610
613
  }
611
614
  }
@@ -0,0 +1,39 @@
1
+ <template>
2
+ <div style="margin: 150px auto" class="row justify-center" data-cy="wrapper">
3
+ <q-select data-cy="select" class="select-root" ref="compRef" v-bind="$attrs" style="min-width: 300px"></q-select>
4
+ </div>
5
+ <q-btn class="hidden" data-cy="method-show" @click="show" />
6
+ <q-btn class="hidden" data-cy="method-hide" @click="hide" />
7
+ <q-btn class="hidden" data-cy="method-toggle" @click="toggle" />
8
+ <q-btn class="hidden" data-cy="method-focus" @click="focusMethod" />
9
+ </template>
10
+
11
+ <script>
12
+ import { defineComponent, ref } from 'vue'
13
+
14
+ export default defineComponent({
15
+ inheritAttrs: false,
16
+ setup () {
17
+ const compRef = ref(null)
18
+
19
+ function show () {
20
+ compRef.value.show()
21
+ }
22
+
23
+ function hide () {
24
+ compRef.value.hide()
25
+ }
26
+
27
+ function toggle () {
28
+ compRef.value.toggle()
29
+ }
30
+
31
+ function focusMethod () {
32
+ compRef.value.focus()
33
+ }
34
+
35
+ return { compRef, show, hide, toggle, focusMethod }
36
+ }
37
+ })
38
+
39
+ </script>
@@ -0,0 +1,99 @@
1
+ import { mount } from '@cypress/vue'
2
+ import WrapperOne from './../../../components/menu/__tests__/WrapperOne.vue'
3
+
4
+ describe('use-anchor API', () => {
5
+ describe('Props', () => {
6
+ describe('Category: behavior', () => {
7
+ describe('(prop): target', () => {
8
+ it('should use another target using a CSS selector', () => {
9
+ mount(WrapperOne, {
10
+ attrs: {
11
+ target: '.other-target'
12
+ }
13
+ })
14
+
15
+ // Click on parent element should not show menu
16
+ cy.dataCy('wrapper')
17
+ .click()
18
+ cy.dataCy('menu')
19
+ .should('not.exist')
20
+
21
+ // Click on other target should show menu
22
+ cy.dataCy('other-target')
23
+ .click()
24
+ cy.dataCy('menu')
25
+ .should('exist')
26
+ })
27
+
28
+ it('should not show when target is false', () => {
29
+ mount(WrapperOne, {
30
+ attrs: {
31
+ target: false
32
+ }
33
+ })
34
+
35
+ cy.dataCy('wrapper')
36
+ .click()
37
+ cy.dataCy('menu')
38
+ .should('not.exist')
39
+ })
40
+ })
41
+
42
+ describe('(prop): no-parent-event', () => {
43
+ it('should not show when clicking parent with no-parent-event true', () => {
44
+ mount(WrapperOne, {
45
+ attrs: {
46
+ 'no-parent-event': true
47
+ }
48
+ })
49
+
50
+ cy.dataCy('wrapper')
51
+ .click()
52
+ cy.dataCy('menu')
53
+ .should('not.exist')
54
+ })
55
+
56
+ it('should show when clicking parent with no-parent-event false', () => {
57
+ mount(WrapperOne, {
58
+ attrs: {
59
+ 'no-parent-event': false
60
+ }
61
+ })
62
+
63
+ cy.dataCy('wrapper')
64
+ .click()
65
+ cy.dataCy('menu')
66
+ .should('exist')
67
+ })
68
+ })
69
+
70
+ describe('(prop): context-menu', () => {
71
+ it('should not show when left clicking parent', () => {
72
+ mount(WrapperOne, {
73
+ attrs: {
74
+ 'context-menu': true
75
+ }
76
+ })
77
+
78
+ cy.dataCy('wrapper')
79
+ .click()
80
+ cy.dataCy('menu')
81
+ .should('not.exist')
82
+ })
83
+
84
+ it('should show when right clicking parent', () => {
85
+ mount(WrapperOne, {
86
+ attrs: {
87
+ 'context-menu': true
88
+ }
89
+ })
90
+
91
+ cy.dataCy('wrapper')
92
+ .rightclick()
93
+ cy.dataCy('menu')
94
+ .should('exist')
95
+ })
96
+ })
97
+ })
98
+ })
99
+ })