quasar 2.16.11 → 2.17.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 (184) 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 +758 -2145
  115. package/dist/quasar.css +6 -5
  116. package/dist/quasar.prod.css +1 -1
  117. package/dist/quasar.rtl.css +6 -5
  118. package/dist/quasar.rtl.prod.css +1 -1
  119. package/dist/quasar.sass +67 -63
  120. package/dist/quasar.server.prod.cjs +49 -49
  121. package/dist/quasar.server.prod.js +47 -47
  122. package/dist/quasar.umd.js +348 -1738
  123. package/dist/quasar.umd.prod.js +48 -48
  124. package/dist/types/api/slider.d.ts +2 -1
  125. package/dist/types/extras/icon-set.d.ts +11 -6
  126. package/dist/types/index.d.ts +272 -203
  127. package/dist/types/plugin.d.ts +7 -7
  128. package/dist/vetur/quasar-attributes.json +1 -1
  129. package/dist/vetur/quasar-tags.json +1 -1
  130. package/dist/web-types/web-types.json +1 -1
  131. package/package.json +9 -9
  132. package/src/components/menu/QMenu.sass +2 -2
  133. package/src/components/option-group/QOptionGroup.js +38 -15
  134. package/src/components/option-group/QOptionGroup.json +88 -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/spinner/QSpinnerAudio.js +4 -70
  141. package/src/components/spinner/QSpinnerBall.js +4 -86
  142. package/src/components/spinner/QSpinnerBars.js +4 -125
  143. package/src/components/spinner/QSpinnerBox.js +4 -43
  144. package/src/components/spinner/QSpinnerClock.js +4 -54
  145. package/src/components/spinner/QSpinnerComment.js +4 -66
  146. package/src/components/spinner/QSpinnerCube.js +4 -114
  147. package/src/components/spinner/QSpinnerDots.js +4 -86
  148. package/src/components/spinner/QSpinnerFacebook.js +4 -85
  149. package/src/components/spinner/QSpinnerGears.js +4 -41
  150. package/src/components/spinner/QSpinnerGrid.js +4 -134
  151. package/src/components/spinner/QSpinnerHearts.js +4 -36
  152. package/src/components/spinner/QSpinnerHourglass.js +4 -94
  153. package/src/components/spinner/QSpinnerInfinity.js +4 -25
  154. package/src/components/spinner/QSpinnerIos.js +4 -156
  155. package/src/components/spinner/QSpinnerOrbit.js +4 -33
  156. package/src/components/spinner/QSpinnerOval.js +4 -32
  157. package/src/components/spinner/QSpinnerPie.js +4 -63
  158. package/src/components/spinner/QSpinnerPuff.js +4 -65
  159. package/src/components/spinner/QSpinnerRadio.js +4 -58
  160. package/src/components/spinner/QSpinnerRings.js +4 -88
  161. package/src/components/spinner/QSpinnerTail.js +4 -66
  162. package/src/components/tabs/QRouteTab.js +4 -3
  163. package/src/components/tabs/QTabs.js +28 -15
  164. package/src/components/time/QTime.sass +5 -5
  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-key-composition/use-key-composition.js +19 -2
  170. package/src/composables/private.use-panel/use-panel.js +5 -3
  171. package/src/css/core/elevation.sass +6 -4
  172. package/src/css/core/flex.sass +5 -6
  173. package/src/css/core/size.sass +20 -18
  174. package/src/css/core/typography.sass +11 -9
  175. package/src/css/core/visibility.sass +2 -2
  176. package/src/css/flex-addon.sass +22 -20
  177. package/src/css/helpers/math.sass +1 -1
  178. package/src/css/helpers/string.sass +7 -4
  179. package/src/css/variables.sass +14 -9
  180. package/src/plugins/platform/Platform.js +40 -5
  181. package/src/plugins/platform/Platform.json +52 -69
  182. package/src/plugins/platform/Platform.test.js +22 -14
  183. package/src/utils/private.config/nodes.js +1 -3
  184. package/src/utils/private.position-engine/position-engine.js +11 -4
@@ -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",
@@ -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 createSvg = () => [
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,15 +12,14 @@ export default createComponent({
77
12
 
78
13
  setup (props) {
79
14
  const { cSize, classes } = useSpinner(props)
80
- const svg = createSvg()
81
-
82
15
  return () => h('svg', {
83
16
  class: classes.value,
84
17
  fill: 'currentColor',
85
18
  width: cSize.value,
86
19
  height: cSize.value,
87
20
  viewBox: '0 0 55 80',
88
- xmlns: 'http://www.w3.org/2000/svg'
89
- }, svg)
21
+ xmlns: 'http://www.w3.org/2000/svg',
22
+ innerHTML
23
+ })
90
24
  }
91
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 createSvg = () => [
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,15 +12,14 @@ export default createComponent({
93
12
 
94
13
  setup (props) {
95
14
  const { cSize, classes } = useSpinner(props)
96
- const svg = createSvg()
97
-
98
15
  return () => h('svg', {
99
16
  class: classes.value,
100
17
  stroke: 'currentColor',
101
18
  width: cSize.value,
102
19
  height: cSize.value,
103
20
  viewBox: '0 0 57 57',
104
- xmlns: 'http://www.w3.org/2000/svg'
105
- }, svg)
21
+ xmlns: 'http://www.w3.org/2000/svg',
22
+ innerHTML
23
+ })
106
24
  }
107
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 createSvg = () => [
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,15 +12,14 @@ export default createComponent({
132
12
 
133
13
  setup (props) {
134
14
  const { cSize, classes } = useSpinner(props)
135
- const svg = createSvg()
136
-
137
15
  return () => h('svg', {
138
16
  class: classes.value,
139
17
  fill: 'currentColor',
140
18
  width: cSize.value,
141
19
  height: cSize.value,
142
20
  viewBox: '0 0 135 140',
143
- xmlns: 'http://www.w3.org/2000/svg'
144
- }, svg)
21
+ xmlns: 'http://www.w3.org/2000/svg',
22
+ innerHTML
23
+ })
145
24
  }
146
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 createSvg = () => [
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,15 +12,14 @@ export default createComponent({
50
12
 
51
13
  setup (props) {
52
14
  const { cSize, classes } = useSpinner(props)
53
- const svg = createSvg()
54
-
55
15
  return () => h('svg', {
56
16
  class: classes.value,
57
17
  width: cSize.value,
58
18
  height: cSize.value,
59
19
  viewBox: '0 0 100 100',
60
20
  preserveAspectRatio: 'xMidYMid',
61
- xmlns: 'http://www.w3.org/2000/svg'
62
- }, svg)
21
+ xmlns: 'http://www.w3.org/2000/svg',
22
+ innerHTML
23
+ })
63
24
  }
64
25
  })
@@ -1,58 +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 createSvg = () => [
8
- h('circle', {
9
- cx: '50',
10
- cy: '50',
11
- r: '48',
12
- fill: 'none',
13
- 'stroke-width': '4',
14
- 'stroke-miterlimit': '10',
15
- stroke: 'currentColor'
16
- }),
17
- h('line', {
18
- 'stroke-linecap': 'round',
19
- 'stroke-width': '4',
20
- 'stroke-miterlimit': '10',
21
- stroke: 'currentColor',
22
- x1: '50',
23
- y1: '50',
24
- x2: '85',
25
- y2: '50.5'
26
- }, [
27
- h('animateTransform', {
28
- attributeName: 'transform',
29
- type: 'rotate',
30
- from: '0 50 50',
31
- to: '360 50 50',
32
- dur: '2s',
33
- repeatCount: 'indefinite'
34
- })
35
- ]),
36
- h('line', {
37
- 'stroke-linecap': 'round',
38
- 'stroke-width': '4',
39
- 'stroke-miterlimit': '10',
40
- stroke: 'currentColor',
41
- x1: '50',
42
- y1: '50',
43
- x2: '49.5',
44
- y2: '74'
45
- }, [
46
- h('animateTransform', {
47
- attributeName: 'transform',
48
- type: 'rotate',
49
- from: '0 50 50',
50
- to: '360 50 50',
51
- dur: '15s',
52
- repeatCount: 'indefinite'
53
- })
54
- ])
55
- ]
6
+ const innerHTML = '<circle cx="50" cy="50" r="48" fill="none" stroke-width="4" stroke-miterlimit="10" stroke="currentColor"></circle><line stroke-linecap="round" stroke-width="4" stroke-miterlimit="10" stroke="currentColor" x1="50" y1="50" x2="85" y2="50.5"><animateTransform attributeName="transform" type="rotate" from="0 50 50" to="360 50 50" dur="2s" repeatCount="indefinite"></animateTransform></line><line stroke-linecap="round" stroke-width="4" stroke-miterlimit="10" stroke="currentColor" x1="50" y1="50" x2="49.5" y2="74"><animateTransform attributeName="transform" type="rotate" from="0 50 50" to="360 50 50" dur="15s" repeatCount="indefinite"></animateTransform></line>'
56
7
 
57
8
  export default createComponent({
58
9
  name: 'QSpinnerClock',
@@ -61,15 +12,14 @@ export default createComponent({
61
12
 
62
13
  setup (props) {
63
14
  const { cSize, classes } = useSpinner(props)
64
- const svg = createSvg()
65
-
66
15
  return () => h('svg', {
67
16
  class: classes.value,
68
17
  width: cSize.value,
69
18
  height: cSize.value,
70
19
  viewBox: '0 0 100 100',
71
20
  preserveAspectRatio: 'xMidYMid',
72
- xmlns: 'http://www.w3.org/2000/svg'
73
- }, svg)
21
+ xmlns: 'http://www.w3.org/2000/svg',
22
+ innerHTML
23
+ })
74
24
  }
75
25
  })