quasar 2.16.10 → 2.17.0

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 (174) hide show
  1. package/dist/api/Platform.json +1 -1
  2. package/dist/api/QOptionGroup.json +1 -1
  3. package/dist/api/QScrollArea.json +1 -1
  4. package/dist/api/QSelect.json +1 -1
  5. package/dist/api/QUploader.json +1 -1
  6. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  7. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  8. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  9. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  10. package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +1 -1
  11. package/dist/icon-set/fontawesome-v6.umd.prod.js +1 -1
  12. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  13. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  14. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  15. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  16. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  17. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  18. package/dist/icon-set/material-symbols-outlined.umd.prod.js +1 -1
  19. package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
  20. package/dist/icon-set/material-symbols-sharp.umd.prod.js +1 -1
  21. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  22. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  23. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  24. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  25. package/dist/icon-set/mdi-v7.umd.prod.js +1 -1
  26. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  27. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  28. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  29. package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +1 -1
  30. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  31. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  32. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  33. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  34. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  35. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  36. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  37. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  38. package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +1 -1
  39. package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +1 -1
  40. package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +1 -1
  41. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  42. package/dist/icon-set/svg-mdi-v7.umd.prod.js +1 -1
  43. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  44. package/dist/icon-set/themify.umd.prod.js +1 -1
  45. package/dist/lang/ar-TN.umd.prod.js +1 -1
  46. package/dist/lang/ar.umd.prod.js +1 -1
  47. package/dist/lang/az-Latn.umd.prod.js +1 -1
  48. package/dist/lang/bg.umd.prod.js +1 -1
  49. package/dist/lang/bn.umd.prod.js +1 -1
  50. package/dist/lang/bs-BA.umd.prod.js +1 -1
  51. package/dist/lang/ca.umd.prod.js +1 -1
  52. package/dist/lang/cs.umd.prod.js +1 -1
  53. package/dist/lang/da.umd.prod.js +1 -1
  54. package/dist/lang/de-CH.umd.prod.js +1 -1
  55. package/dist/lang/de-DE.umd.prod.js +1 -1
  56. package/dist/lang/de.umd.prod.js +1 -1
  57. package/dist/lang/el.umd.prod.js +1 -1
  58. package/dist/lang/en-GB.umd.prod.js +1 -1
  59. package/dist/lang/en-US.umd.prod.js +1 -1
  60. package/dist/lang/eo.umd.prod.js +1 -1
  61. package/dist/lang/es.umd.prod.js +1 -1
  62. package/dist/lang/et.umd.prod.js +1 -1
  63. package/dist/lang/eu.umd.prod.js +1 -1
  64. package/dist/lang/fa-IR.umd.prod.js +1 -1
  65. package/dist/lang/fa.umd.prod.js +1 -1
  66. package/dist/lang/fi.umd.prod.js +1 -1
  67. package/dist/lang/fr.umd.prod.js +1 -1
  68. package/dist/lang/gn.umd.prod.js +1 -1
  69. package/dist/lang/he.umd.prod.js +1 -1
  70. package/dist/lang/hi.umd.prod.js +1 -1
  71. package/dist/lang/hr.umd.prod.js +1 -1
  72. package/dist/lang/hu.umd.prod.js +1 -1
  73. package/dist/lang/id.umd.prod.js +1 -1
  74. package/dist/lang/is.umd.prod.js +1 -1
  75. package/dist/lang/it.umd.prod.js +1 -1
  76. package/dist/lang/ja.umd.prod.js +1 -1
  77. package/dist/lang/kk.umd.prod.js +1 -1
  78. package/dist/lang/km.umd.prod.js +1 -1
  79. package/dist/lang/ko-KR.umd.prod.js +1 -1
  80. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  81. package/dist/lang/lt.umd.prod.js +1 -1
  82. package/dist/lang/lu.umd.prod.js +1 -1
  83. package/dist/lang/lv.umd.prod.js +1 -1
  84. package/dist/lang/mk.umd.prod.js +1 -1
  85. package/dist/lang/ml.umd.prod.js +1 -1
  86. package/dist/lang/mm.umd.prod.js +1 -1
  87. package/dist/lang/ms-MY.umd.prod.js +1 -1
  88. package/dist/lang/ms.umd.prod.js +1 -1
  89. package/dist/lang/my.umd.prod.js +1 -1
  90. package/dist/lang/nb-NO.umd.prod.js +1 -1
  91. package/dist/lang/nl.umd.prod.js +1 -1
  92. package/dist/lang/pl.umd.prod.js +1 -1
  93. package/dist/lang/pt-BR.umd.prod.js +1 -1
  94. package/dist/lang/pt.umd.prod.js +1 -1
  95. package/dist/lang/ro.umd.prod.js +1 -1
  96. package/dist/lang/ru.umd.prod.js +1 -1
  97. package/dist/lang/sk.umd.prod.js +1 -1
  98. package/dist/lang/sl.umd.prod.js +1 -1
  99. package/dist/lang/sm.umd.prod.js +1 -1
  100. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  101. package/dist/lang/sr.umd.prod.js +1 -1
  102. package/dist/lang/sv.umd.prod.js +1 -1
  103. package/dist/lang/ta.umd.prod.js +1 -1
  104. package/dist/lang/th.umd.prod.js +1 -1
  105. package/dist/lang/tl.umd.prod.js +1 -1
  106. package/dist/lang/tr.umd.prod.js +1 -1
  107. package/dist/lang/ug.umd.prod.js +1 -1
  108. package/dist/lang/uk.umd.prod.js +1 -1
  109. package/dist/lang/uz-Cyrl.umd.prod.js +1 -1
  110. package/dist/lang/uz-Latn.umd.prod.js +1 -1
  111. package/dist/lang/vi.umd.prod.js +1 -1
  112. package/dist/lang/zh-CN.umd.prod.js +1 -1
  113. package/dist/lang/zh-TW.umd.prod.js +1 -1
  114. package/dist/quasar.client.js +753 -2121
  115. package/dist/quasar.css +3 -2
  116. package/dist/quasar.prod.css +1 -1
  117. package/dist/quasar.rtl.css +3 -2
  118. package/dist/quasar.rtl.prod.css +1 -1
  119. package/dist/quasar.sass +8 -4
  120. package/dist/quasar.server.prod.cjs +53 -53
  121. package/dist/quasar.server.prod.js +51 -51
  122. package/dist/quasar.umd.js +344 -1715
  123. package/dist/quasar.umd.prod.js +44 -44
  124. package/dist/types/index.d.ts +120 -51
  125. package/dist/vetur/quasar-attributes.json +1 -1
  126. package/dist/vetur/quasar-tags.json +1 -1
  127. package/dist/web-types/web-types.json +1 -1
  128. package/package.json +9 -9
  129. package/src/components/checkbox/QCheckbox.js +3 -1
  130. package/src/components/icon/QIcon.js +1 -1
  131. package/src/components/menu/QMenu.sass +2 -2
  132. package/src/components/option-group/QOptionGroup.js +38 -15
  133. package/src/components/option-group/QOptionGroup.json +88 -1
  134. package/src/components/radio/QRadio.js +3 -1
  135. package/src/components/scroll-area/QScrollArea.js +115 -107
  136. package/src/components/scroll-area/QScrollArea.json +40 -0
  137. package/src/components/scroll-area/ScrollAreaControls.js +54 -0
  138. package/src/components/select/QSelect.js +16 -18
  139. package/src/components/select/QSelect.json +7 -0
  140. package/src/components/space/QSpace.js +1 -2
  141. package/src/components/spinner/QSpinnerAudio.js +4 -69
  142. package/src/components/spinner/QSpinnerBall.js +4 -85
  143. package/src/components/spinner/QSpinnerBars.js +4 -124
  144. package/src/components/spinner/QSpinnerBox.js +4 -42
  145. package/src/components/spinner/QSpinnerClock.js +4 -53
  146. package/src/components/spinner/QSpinnerComment.js +4 -65
  147. package/src/components/spinner/QSpinnerCube.js +4 -113
  148. package/src/components/spinner/QSpinnerDots.js +4 -85
  149. package/src/components/spinner/QSpinnerFacebook.js +4 -84
  150. package/src/components/spinner/QSpinnerGears.js +4 -40
  151. package/src/components/spinner/QSpinnerGrid.js +4 -133
  152. package/src/components/spinner/QSpinnerHearts.js +4 -35
  153. package/src/components/spinner/QSpinnerHourglass.js +4 -93
  154. package/src/components/spinner/QSpinnerInfinity.js +4 -24
  155. package/src/components/spinner/QSpinnerIos.js +4 -155
  156. package/src/components/spinner/QSpinnerOrbit.js +4 -32
  157. package/src/components/spinner/QSpinnerOval.js +4 -31
  158. package/src/components/spinner/QSpinnerPie.js +4 -62
  159. package/src/components/spinner/QSpinnerPuff.js +4 -64
  160. package/src/components/spinner/QSpinnerRadio.js +4 -57
  161. package/src/components/spinner/QSpinnerRings.js +4 -87
  162. package/src/components/spinner/QSpinnerTail.js +4 -65
  163. package/src/components/tabs/QRouteTab.js +4 -3
  164. package/src/components/tabs/QTabs.js +28 -15
  165. package/src/components/tooltip/QTooltip.sass +2 -0
  166. package/src/components/uploader/QUploader.json +9 -0
  167. package/src/components/uploader/QUploader.sass +0 -1
  168. package/src/components/uploader/uploader-core.js +6 -2
  169. package/src/composables/private.use-panel/use-panel.js +5 -3
  170. package/src/css/variables.sass +3 -0
  171. package/src/plugins/platform/Platform.js +40 -5
  172. package/src/plugins/platform/Platform.json +52 -69
  173. package/src/plugins/platform/Platform.test.js +22 -14
  174. package/src/utils/private.position-engine/position-engine.js +11 -4
@@ -8,6 +8,22 @@
8
8
  "extends": "dark"
9
9
  },
10
10
 
11
+ "vertical-offset": {
12
+ "type": "Array",
13
+ "desc": "Adds [top, bottom] offset to vertical thumb",
14
+ "default": "# [ 0, 0 ]",
15
+ "category": "style",
16
+ "addedIn": "v2.17"
17
+ },
18
+
19
+ "horizontal-offset": {
20
+ "type": "Array",
21
+ "desc": "Adds [left, right] offset to horizontal thumb",
22
+ "default": "# [ 0, 0 ]",
23
+ "category": "style",
24
+ "addedIn": "v2.17"
25
+ },
26
+
11
27
  "bar-style": {
12
28
  "type": [ "String", "Array", "Object" ],
13
29
  "tsType": "VueStyleProp",
@@ -132,6 +148,12 @@
132
148
  "required": true,
133
149
  "desc": "Height of the container (in px)"
134
150
  },
151
+ "verticalContainerInnerSize": {
152
+ "type": "Number",
153
+ "required": true,
154
+ "desc": "Height of the container without the vertical offset (in px)",
155
+ "addedIn": "v2.17"
156
+ },
135
157
 
136
158
  "horizontalPosition": {
137
159
  "type": "Number",
@@ -152,6 +174,12 @@
152
174
  "type": "Number",
153
175
  "required": true,
154
176
  "desc": "Width of the container (in px)"
177
+ },
178
+ "horizontalContainerInnerSize": {
179
+ "type": "Number",
180
+ "required": true,
181
+ "desc": "Width of the container without the horizontal offset (in px)",
182
+ "addedIn": "v2.17"
155
183
  }
156
184
  }
157
185
  }
@@ -196,6 +224,12 @@
196
224
  "required": true,
197
225
  "desc": "Height of the container (in px)"
198
226
  },
227
+ "verticalContainerInnerSize": {
228
+ "type": "Number",
229
+ "required": true,
230
+ "desc": "Height of the container without the vertical offset (in px)",
231
+ "addedIn": "v2.17"
232
+ },
199
233
 
200
234
  "horizontalPosition": {
201
235
  "type": "Number",
@@ -216,6 +250,12 @@
216
250
  "type": "Number",
217
251
  "required": true,
218
252
  "desc": "Width of the container (in px)"
253
+ },
254
+ "horizontalContainerInnerSize": {
255
+ "type": "Number",
256
+ "required": true,
257
+ "desc": "Width of the container without the horizontal offset (in px)",
258
+ "addedIn": "v2.17"
219
259
  }
220
260
  }
221
261
  }
@@ -0,0 +1,54 @@
1
+ import { h, withDirectives } from 'vue'
2
+
3
+ import { createComponent } from '../../utils/private.create/create.js'
4
+
5
+ /**
6
+ * We are using a sub-component to avoid unnecessary re-renders
7
+ * of the QScrollArea content when the scrollbars are interacted with.
8
+ */
9
+ export default createComponent({
10
+ props: [
11
+ 'store',
12
+ 'barStyle',
13
+ 'verticalBarStyle',
14
+ 'horizontalBarStyle'
15
+ ],
16
+
17
+ setup (props) {
18
+ return () => ([
19
+ h('div', {
20
+ class: props.store.scroll.vertical.barClass.value,
21
+ style: [ props.barStyle, props.verticalBarStyle ],
22
+ 'aria-hidden': 'true',
23
+ onMousedown: props.store.onVerticalMousedown
24
+ }),
25
+
26
+ h('div', {
27
+ class: props.store.scroll.horizontal.barClass.value,
28
+ style: [ props.barStyle, props.horizontalBarStyle ],
29
+ 'aria-hidden': 'true',
30
+ onMousedown: props.store.onHorizontalMousedown
31
+ }),
32
+
33
+ withDirectives(
34
+ h('div', {
35
+ ref: props.store.scroll.vertical.ref,
36
+ class: props.store.scroll.vertical.thumbClass.value,
37
+ style: props.store.scroll.vertical.style.value,
38
+ 'aria-hidden': 'true'
39
+ }),
40
+ props.store.thumbVertDir
41
+ ),
42
+
43
+ withDirectives(
44
+ h('div', {
45
+ ref: props.store.scroll.horizontal.ref,
46
+ class: props.store.scroll.horizontal.thumbClass.value,
47
+ style: props.store.scroll.horizontal.style.value,
48
+ 'aria-hidden': 'true'
49
+ }),
50
+ props.store.thumbHorizDir
51
+ )
52
+ ])
53
+ }
54
+ })
@@ -27,6 +27,16 @@ const validateNewValueMode = v => [ 'add', 'add-unique', 'toggle' ].includes(v)
27
27
  const reEscapeList = '.*+?^${}()|[]\\'
28
28
  const fieldPropsList = Object.keys(useFieldProps)
29
29
 
30
+ function getPropValueFn (userPropName, defaultPropName) {
31
+ if (typeof userPropName === 'function') return userPropName
32
+
33
+ const propName = userPropName !== void 0
34
+ ? userPropName
35
+ : defaultPropName
36
+
37
+ return opt => ((opt !== null && typeof opt === 'object' && propName in opt) ? opt[ propName ] : opt)
38
+ }
39
+
30
40
  export default createComponent({
31
41
  name: 'QSelect',
32
42
 
@@ -93,6 +103,8 @@ export default createComponent({
93
103
  mapOptions: Boolean,
94
104
  emitValue: Boolean,
95
105
 
106
+ disableTabSelection: Boolean,
107
+
96
108
  inputDebounce: {
97
109
  type: [ Number, String ],
98
110
  default: 500
@@ -159,12 +171,7 @@ export default createComponent({
159
171
 
160
172
  const onComposition = useKeyComposition(onInput)
161
173
 
162
- const virtualScrollLength = computed(() => (
163
- Array.isArray(props.options)
164
- ? props.options.length
165
- : 0
166
- ))
167
-
174
+ const virtualScrollLength = computed(() => props.options.length)
168
175
  const virtualScrollItemSizeComputed = computed(() => (
169
176
  props.virtualScrollItemSize === void 0
170
177
  ? (props.optionsDense === true ? 24 : 48)
@@ -193,7 +200,7 @@ export default createComponent({
193
200
  ? (props.multiple === true && Array.isArray(props.modelValue) ? props.modelValue : [ props.modelValue ])
194
201
  : []
195
202
 
196
- if (props.mapOptions === true && Array.isArray(props.options) === true) {
203
+ if (props.mapOptions === true) {
197
204
  const cache = props.mapOptions === true && innerValueCache !== void 0
198
205
  ? innerValueCache
199
206
  : []
@@ -393,7 +400,7 @@ export default createComponent({
393
400
  // takes into account 'option-disable' prop
394
401
  const isOptionDisabled = computed(() => getPropValueFn(props.optionDisable, 'disable'))
395
402
 
396
- const innerOptionsValue = computed(() => innerValue.value.map(opt => getOptionValue.value(opt)))
403
+ const innerOptionsValue = computed(() => innerValue.value.map(getOptionValue.value))
397
404
 
398
405
  const inputControlEvents = computed(() => {
399
406
  const evt = {
@@ -605,16 +612,6 @@ export default createComponent({
605
612
  return props.options.find(fn) || valueCache.find(fn) || value
606
613
  }
607
614
 
608
- function getPropValueFn (propValue, defaultVal) {
609
- const val = propValue !== void 0
610
- ? propValue
611
- : defaultVal
612
-
613
- return typeof val === 'function'
614
- ? val
615
- : opt => (opt !== null && typeof opt === 'object' && val in opt ? opt[ val ] : opt)
616
- }
617
-
618
615
  function isOptionSelected (opt) {
619
616
  const val = getOptionValue.value(opt)
620
617
  return innerOptionsValue.value.find(v => isDeepEqual(v, val)) !== void 0
@@ -716,6 +713,7 @@ export default createComponent({
716
713
  && (props.newValueMode !== void 0 || props.onNewValue !== void 0)
717
714
 
718
715
  const tabShouldSelect = e.shiftKey !== true
716
+ && props.disableTabSelection !== true
719
717
  && props.multiple !== true
720
718
  && (optionIndex.value !== -1 || newValueModeValid === true)
721
719
 
@@ -277,6 +277,13 @@
277
277
  "category": "options"
278
278
  },
279
279
 
280
+ "disable-tab-selection": {
281
+ "type": "Boolean",
282
+ "desc": "Prevents the tab key from confirming the currently hovered option",
283
+ "category": "options",
284
+ "addedIn": "v2.17"
285
+ },
286
+
280
287
  "emit-value": {
281
288
  "type": "Boolean",
282
289
  "desc": "Update model with the value of the selected option instead of the whole option",
@@ -2,12 +2,11 @@ import { h } from 'vue'
2
2
 
3
3
  import { createComponent } from '../../utils/private.create/create.js'
4
4
 
5
- const space = h('div', { class: 'q-space' })
6
-
7
5
  export default createComponent({
8
6
  name: 'QSpace',
9
7
 
10
8
  setup () {
9
+ const space = h('div', { class: 'q-space' })
11
10
  return () => space
12
11
  }
13
12
  })
@@ -1,74 +1,9 @@
1
1
  import { h } from 'vue'
2
2
 
3
3
  import useSpinner, { useSpinnerProps } from './use-spinner.js'
4
-
5
4
  import { createComponent } from '../../utils/private.create/create.js'
6
5
 
7
- const svg = [
8
- h('g', {
9
- transform: 'matrix(1 0 0 -1 0 80)'
10
- }, [
11
- h('rect', {
12
- width: '10',
13
- height: '20',
14
- rx: '3'
15
- }, [
16
- h('animate', {
17
- attributeName: 'height',
18
- begin: '0s',
19
- dur: '4.3s',
20
- values: '20;45;57;80;64;32;66;45;64;23;66;13;64;56;34;34;2;23;76;79;20',
21
- calcMode: 'linear',
22
- repeatCount: 'indefinite'
23
- })
24
- ]),
25
- h('rect', {
26
- x: '15',
27
- width: '10',
28
- height: '80',
29
- rx: '3'
30
- }, [
31
- h('animate', {
32
- attributeName: 'height',
33
- begin: '0s',
34
- dur: '2s',
35
- values: '80;55;33;5;75;23;73;33;12;14;60;80',
36
- calcMode: 'linear',
37
- repeatCount: 'indefinite'
38
- })
39
- ]),
40
- h('rect', {
41
- x: '30',
42
- width: '10',
43
- height: '50',
44
- rx: '3'
45
- }, [
46
- h('animate', {
47
- attributeName: 'height',
48
- begin: '0s',
49
- dur: '1.4s',
50
- values: '50;34;78;23;56;23;34;76;80;54;21;50',
51
- calcMode: 'linear',
52
- repeatCount: 'indefinite'
53
- })
54
- ]),
55
- h('rect', {
56
- x: '45',
57
- width: '10',
58
- height: '30',
59
- rx: '3'
60
- }, [
61
- h('animate', {
62
- attributeName: 'height',
63
- begin: '0s',
64
- dur: '2s',
65
- values: '30;45;13;80;56;72;45;76;34;23;67;30',
66
- calcMode: 'linear',
67
- repeatCount: 'indefinite'
68
- })
69
- ])
70
- ])
71
- ]
6
+ const innerHTML = '<g transform="matrix(1 0 0 -1 0 80)"><rect width="10" height="20" rx="3"><animate attributeName="height" begin="0s" dur="4.3s" values="20;45;57;80;64;32;66;45;64;23;66;13;64;56;34;34;2;23;76;79;20" calcMode="linear" repeatCount="indefinite"></animate></rect><rect x="15" width="10" height="80" rx="3"><animate attributeName="height" begin="0s" dur="2s" values="80;55;33;5;75;23;73;33;12;14;60;80" calcMode="linear" repeatCount="indefinite"></animate></rect><rect x="30" width="10" height="50" rx="3"><animate attributeName="height" begin="0s" dur="1.4s" values="50;34;78;23;56;23;34;76;80;54;21;50" calcMode="linear" repeatCount="indefinite"></animate></rect><rect x="45" width="10" height="30" rx="3"><animate attributeName="height" begin="0s" dur="2s" values="30;45;13;80;56;72;45;76;34;23;67;30" calcMode="linear" repeatCount="indefinite"></animate></rect></g>'
72
7
 
73
8
  export default createComponent({
74
9
  name: 'QSpinnerAudio',
@@ -77,14 +12,14 @@ export default createComponent({
77
12
 
78
13
  setup (props) {
79
14
  const { cSize, classes } = useSpinner(props)
80
-
81
15
  return () => h('svg', {
82
16
  class: classes.value,
83
17
  fill: 'currentColor',
84
18
  width: cSize.value,
85
19
  height: cSize.value,
86
20
  viewBox: '0 0 55 80',
87
- xmlns: 'http://www.w3.org/2000/svg'
88
- }, svg)
21
+ xmlns: 'http://www.w3.org/2000/svg',
22
+ innerHTML
23
+ })
89
24
  }
90
25
  })
@@ -1,90 +1,9 @@
1
1
  import { h } from 'vue'
2
2
 
3
3
  import useSpinner, { useSpinnerProps } from './use-spinner.js'
4
-
5
4
  import { createComponent } from '../../utils/private.create/create.js'
6
5
 
7
- const svg = [
8
- h('g', {
9
- transform: 'translate(1 1)',
10
- 'stroke-width': '2',
11
- fill: 'none',
12
- 'fill-rule': 'evenodd'
13
- }, [
14
- h('circle', {
15
- cx: '5',
16
- cy: '50',
17
- r: '5'
18
- }, [
19
- h('animate', {
20
- attributeName: 'cy',
21
- begin: '0s',
22
- dur: '2.2s',
23
- values: '50;5;50;50',
24
- calcMode: 'linear',
25
- repeatCount: 'indefinite'
26
- }),
27
- h('animate', {
28
- attributeName: 'cx',
29
- begin: '0s',
30
- dur: '2.2s',
31
- values: '5;27;49;5',
32
- calcMode: 'linear',
33
- repeatCount: 'indefinite'
34
- })
35
- ]),
36
- h('circle', {
37
- cx: '27',
38
- cy: '5',
39
- r: '5'
40
- }, [
41
- h('animate', {
42
- attributeName: 'cy',
43
- begin: '0s',
44
- dur: '2.2s',
45
- from: '5',
46
- to: '5',
47
- values: '5;50;50;5',
48
- calcMode: 'linear',
49
- repeatCount: 'indefinite'
50
- }),
51
- h('animate', {
52
- attributeName: 'cx',
53
- begin: '0s',
54
- dur: '2.2s',
55
- from: '27',
56
- to: '27',
57
- values: '27;49;5;27',
58
- calcMode: 'linear',
59
- repeatCount: 'indefinite'
60
- })
61
- ]),
62
- h('circle', {
63
- cx: '49',
64
- cy: '50',
65
- r: '5'
66
- }, [
67
- h('animate', {
68
- attributeName: 'cy',
69
- begin: '0s',
70
- dur: '2.2s',
71
- values: '50;50;5;50',
72
- calcMode: 'linear',
73
- repeatCount: 'indefinite'
74
- }),
75
- h('animate', {
76
- attributeName: 'cx',
77
- from: '49',
78
- to: '49',
79
- begin: '0s',
80
- dur: '2.2s',
81
- values: '49;5;27;49',
82
- calcMode: 'linear',
83
- repeatCount: 'indefinite'
84
- })
85
- ])
86
- ])
87
- ]
6
+ const innerHTML = '<g transform="translate(1 1)" stroke-width="2" fill="none" fill-rule="evenodd"><circle cx="5" cy="50" r="5"><animate attributeName="cy" begin="0s" dur="2.2s" values="50;5;50;50" calcMode="linear" repeatCount="indefinite"></animate><animate attributeName="cx" begin="0s" dur="2.2s" values="5;27;49;5" calcMode="linear" repeatCount="indefinite"></animate></circle><circle cx="27" cy="5" r="5"><animate attributeName="cy" begin="0s" dur="2.2s" from="5" to="5" values="5;50;50;5" calcMode="linear" repeatCount="indefinite"></animate><animate attributeName="cx" begin="0s" dur="2.2s" from="27" to="27" values="27;49;5;27" calcMode="linear" repeatCount="indefinite"></animate></circle><circle cx="49" cy="50" r="5"><animate attributeName="cy" begin="0s" dur="2.2s" values="50;50;5;50" calcMode="linear" repeatCount="indefinite"></animate><animate attributeName="cx" from="49" to="49" begin="0s" dur="2.2s" values="49;5;27;49" calcMode="linear" repeatCount="indefinite"></animate></circle></g>'
88
7
 
89
8
  export default createComponent({
90
9
  name: 'QSpinnerBall',
@@ -93,14 +12,14 @@ export default createComponent({
93
12
 
94
13
  setup (props) {
95
14
  const { cSize, classes } = useSpinner(props)
96
-
97
15
  return () => h('svg', {
98
16
  class: classes.value,
99
17
  stroke: 'currentColor',
100
18
  width: cSize.value,
101
19
  height: cSize.value,
102
20
  viewBox: '0 0 57 57',
103
- xmlns: 'http://www.w3.org/2000/svg'
104
- }, svg)
21
+ xmlns: 'http://www.w3.org/2000/svg',
22
+ innerHTML
23
+ })
105
24
  }
106
25
  })
@@ -1,129 +1,9 @@
1
1
  import { h } from 'vue'
2
2
 
3
3
  import useSpinner, { useSpinnerProps } from './use-spinner.js'
4
-
5
4
  import { createComponent } from '../../utils/private.create/create.js'
6
5
 
7
- const svg = [
8
- h('rect', {
9
- y: '10',
10
- width: '15',
11
- height: '120',
12
- rx: '6'
13
- }, [
14
- h('animate', {
15
- attributeName: 'height',
16
- begin: '0.5s',
17
- dur: '1s',
18
- values: '120;110;100;90;80;70;60;50;40;140;120',
19
- calcMode: 'linear',
20
- repeatCount: 'indefinite'
21
- }),
22
- h('animate', {
23
- attributeName: 'y',
24
- begin: '0.5s',
25
- dur: '1s',
26
- values: '10;15;20;25;30;35;40;45;50;0;10',
27
- calcMode: 'linear',
28
- repeatCount: 'indefinite'
29
- })
30
- ]),
31
- h('rect', {
32
- x: '30',
33
- y: '10',
34
- width: '15',
35
- height: '120',
36
- rx: '6'
37
- }, [
38
- h('animate', {
39
- attributeName: 'height',
40
- begin: '0.25s',
41
- dur: '1s',
42
- values: '120;110;100;90;80;70;60;50;40;140;120',
43
- calcMode: 'linear',
44
- repeatCount: 'indefinite'
45
- }),
46
- h('animate', {
47
- attributeName: 'y',
48
- begin: '0.25s',
49
- dur: '1s',
50
- values: '10;15;20;25;30;35;40;45;50;0;10',
51
- calcMode: 'linear',
52
- repeatCount: 'indefinite'
53
- })
54
- ]),
55
- h('rect', {
56
- x: '60',
57
- width: '15',
58
- height: '140',
59
- rx: '6'
60
- }, [
61
- h('animate', {
62
- attributeName: 'height',
63
- begin: '0s',
64
- dur: '1s',
65
- values: '120;110;100;90;80;70;60;50;40;140;120',
66
- calcMode: 'linear',
67
- repeatCount: 'indefinite'
68
- }),
69
- h('animate', {
70
- attributeName: 'y',
71
- begin: '0s',
72
- dur: '1s',
73
- values: '10;15;20;25;30;35;40;45;50;0;10',
74
- calcMode: 'linear',
75
- repeatCount: 'indefinite'
76
- })
77
- ]),
78
- h('rect', {
79
- x: '90',
80
- y: '10',
81
- width: '15',
82
- height: '120',
83
- rx: '6'
84
- }, [
85
- h('animate', {
86
- attributeName: 'height',
87
- begin: '0.25s',
88
- dur: '1s',
89
- values: '120;110;100;90;80;70;60;50;40;140;120',
90
- calcMode: 'linear',
91
- repeatCount: 'indefinite'
92
- }),
93
- h('animate', {
94
- attributeName: 'y',
95
- begin: '0.25s',
96
- dur: '1s',
97
- values: '10;15;20;25;30;35;40;45;50;0;10',
98
- calcMode: 'linear',
99
- repeatCount: 'indefinite'
100
- })
101
- ]),
102
- h('rect', {
103
- x: '120',
104
- y: '10',
105
- width: '15',
106
- height: '120',
107
- rx: '6'
108
- }, [
109
- h('animate', {
110
- attributeName: 'height',
111
- begin: '0.5s',
112
- dur: '1s',
113
- values: '120;110;100;90;80;70;60;50;40;140;120',
114
- calcMode: 'linear',
115
- repeatCount: 'indefinite'
116
- }),
117
- h('animate', {
118
- attributeName: 'y',
119
- begin: '0.5s',
120
- dur: '1s',
121
- values: '10;15;20;25;30;35;40;45;50;0;10',
122
- calcMode: 'linear',
123
- repeatCount: 'indefinite'
124
- })
125
- ])
126
- ]
6
+ const innerHTML = '<rect y="10" width="15" height="120" rx="6"><animate attributeName="height" begin="0.5s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite"></animate><animate attributeName="y" begin="0.5s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"></animate></rect><rect x="30" y="10" width="15" height="120" rx="6"><animate attributeName="height" begin="0.25s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite"></animate><animate attributeName="y" begin="0.25s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"></animate></rect><rect x="60" width="15" height="140" rx="6"><animate attributeName="height" begin="0s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite"></animate><animate attributeName="y" begin="0s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"></animate></rect><rect x="90" y="10" width="15" height="120" rx="6"><animate attributeName="height" begin="0.25s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite"></animate><animate attributeName="y" begin="0.25s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"></animate></rect><rect x="120" y="10" width="15" height="120" rx="6"><animate attributeName="height" begin="0.5s" dur="1s" values="120;110;100;90;80;70;60;50;40;140;120" calcMode="linear" repeatCount="indefinite"></animate><animate attributeName="y" begin="0.5s" dur="1s" values="10;15;20;25;30;35;40;45;50;0;10" calcMode="linear" repeatCount="indefinite"></animate></rect>'
127
7
 
128
8
  export default createComponent({
129
9
  name: 'QSpinnerBars',
@@ -132,14 +12,14 @@ export default createComponent({
132
12
 
133
13
  setup (props) {
134
14
  const { cSize, classes } = useSpinner(props)
135
-
136
15
  return () => h('svg', {
137
16
  class: classes.value,
138
17
  fill: 'currentColor',
139
18
  width: cSize.value,
140
19
  height: cSize.value,
141
20
  viewBox: '0 0 135 140',
142
- xmlns: 'http://www.w3.org/2000/svg'
143
- }, svg)
21
+ xmlns: 'http://www.w3.org/2000/svg',
22
+ innerHTML
23
+ })
144
24
  }
145
25
  })
@@ -1,47 +1,9 @@
1
1
  import { h } from 'vue'
2
2
 
3
3
  import useSpinner, { useSpinnerProps } from './use-spinner.js'
4
-
5
4
  import { createComponent } from '../../utils/private.create/create.js'
6
5
 
7
- const svg = [
8
- h('rect', {
9
- x: '25',
10
- y: '25',
11
- width: '50',
12
- height: '50',
13
- fill: 'none',
14
- 'stroke-width': '4',
15
- stroke: 'currentColor'
16
- }, [
17
- h('animateTransform', {
18
- id: 'spinnerBox',
19
- attributeName: 'transform',
20
- type: 'rotate',
21
- from: '0 50 50',
22
- to: '180 50 50',
23
- dur: '0.5s',
24
- begin: 'rectBox.end'
25
- })
26
- ]),
27
- h('rect', {
28
- x: '27',
29
- y: '27',
30
- width: '46',
31
- height: '50',
32
- fill: 'currentColor'
33
- }, [
34
- h('animate', {
35
- id: 'rectBox',
36
- attributeName: 'height',
37
- begin: '0s;spinnerBox.end',
38
- dur: '1.3s',
39
- from: '50',
40
- to: '0',
41
- fill: 'freeze'
42
- })
43
- ])
44
- ]
6
+ const innerHTML = '<rect x="25" y="25" width="50" height="50" fill="none" stroke-width="4" stroke="currentColor"><animateTransform id="spinnerBox" attributeName="transform" type="rotate" from="0 50 50" to="180 50 50" dur="0.5s" begin="rectBox.end"></animateTransform></rect><rect x="27" y="27" width="46" height="50" fill="currentColor"><animate id="rectBox" attributeName="height" begin="0s;spinnerBox.end" dur="1.3s" from="50" to="0" fill="freeze"></animate></rect>'
45
7
 
46
8
  export default createComponent({
47
9
  name: 'QSpinnerBox',
@@ -50,14 +12,14 @@ export default createComponent({
50
12
 
51
13
  setup (props) {
52
14
  const { cSize, classes } = useSpinner(props)
53
-
54
15
  return () => h('svg', {
55
16
  class: classes.value,
56
17
  width: cSize.value,
57
18
  height: cSize.value,
58
19
  viewBox: '0 0 100 100',
59
20
  preserveAspectRatio: 'xMidYMid',
60
- xmlns: 'http://www.w3.org/2000/svg'
61
- }, svg)
21
+ xmlns: 'http://www.w3.org/2000/svg',
22
+ innerHTML
23
+ })
62
24
  }
63
25
  })