quasar 2.5.3 → 2.6.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 (242) hide show
  1. package/README.md +1 -1
  2. package/dist/api/BottomSheet.json +1 -1
  3. package/dist/api/Dialog.json +9 -2
  4. package/dist/api/Notify.json +205 -5
  5. package/dist/api/QAvatar.json +1 -1
  6. package/dist/api/QBreadcrumbsEl.json +1 -1
  7. package/dist/api/QBtn.json +4 -4
  8. package/dist/api/QBtnDropdown.json +17 -17
  9. package/dist/api/QCarousel.json +4 -4
  10. package/dist/api/QCheckbox.json +1 -1
  11. package/dist/api/QChip.json +5 -5
  12. package/dist/api/QDialog.json +13 -13
  13. package/dist/api/QDrawer.json +16 -16
  14. package/dist/api/QExpansionItem.json +15 -15
  15. package/dist/api/QFab.json +15 -15
  16. package/dist/api/QFabAction.json +3 -3
  17. package/dist/api/QField.json +2 -2
  18. package/dist/api/QFile.json +1 -1
  19. package/dist/api/QForm.json +12 -3
  20. package/dist/api/QIcon.json +4 -2
  21. package/dist/api/QInput.json +2 -2
  22. package/dist/api/QKnob.json +23 -0
  23. package/dist/api/QMenu.json +13 -13
  24. package/dist/api/QPagination.json +4 -4
  25. package/dist/api/QPopupEdit.json +6 -6
  26. package/dist/api/QPopupProxy.json +13 -13
  27. package/dist/api/QRadio.json +1 -1
  28. package/dist/api/QRange.json +1 -1
  29. package/dist/api/QRouteTab.json +2 -2
  30. package/dist/api/QSelect.json +18 -5
  31. package/dist/api/QSlider.json +1 -1
  32. package/dist/api/QStep.json +4 -4
  33. package/dist/api/QStepper.json +4 -4
  34. package/dist/api/QTab.json +1 -1
  35. package/dist/api/QTable.json +6 -6
  36. package/dist/api/QTimelineEntry.json +1 -1
  37. package/dist/api/QToggle.json +2 -2
  38. package/dist/api/QTooltip.json +13 -13
  39. package/dist/api/QTree.json +1 -1
  40. package/dist/api/QUploader.json +1 -1
  41. package/dist/api/TouchHold.json +1 -1
  42. package/dist/api/TouchPan.json +1 -1
  43. package/dist/api/TouchRepeat.json +1 -1
  44. package/dist/api/TouchSwipe.json +1 -1
  45. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  46. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  47. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  48. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  49. package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +6 -0
  50. package/dist/icon-set/fontawesome-v6.umd.prod.js +6 -0
  51. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  52. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  53. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  54. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  55. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  56. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  57. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  58. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  59. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  60. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  61. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +2 -2
  62. package/dist/icon-set/svg-eva-icons.umd.prod.js +2 -2
  63. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +2 -2
  64. package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +6 -0
  65. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  66. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  67. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +2 -2
  68. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  69. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  70. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  71. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  72. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  73. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  74. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  75. package/dist/icon-set/svg-mdi-v6.umd.prod.js +2 -2
  76. package/dist/icon-set/svg-themify.umd.prod.js +2 -2
  77. package/dist/icon-set/themify.umd.prod.js +1 -1
  78. package/dist/lang/ar.umd.prod.js +1 -1
  79. package/dist/lang/az-Latn.umd.prod.js +1 -1
  80. package/dist/lang/bg.umd.prod.js +1 -1
  81. package/dist/lang/bn.umd.prod.js +1 -1
  82. package/dist/lang/ca.umd.prod.js +1 -1
  83. package/dist/lang/cs.umd.prod.js +1 -1
  84. package/dist/lang/da.umd.prod.js +1 -1
  85. package/dist/lang/de.umd.prod.js +1 -1
  86. package/dist/lang/el.umd.prod.js +1 -1
  87. package/dist/lang/en-GB.umd.prod.js +1 -1
  88. package/dist/lang/en-US.umd.prod.js +1 -1
  89. package/dist/lang/eo.umd.prod.js +1 -1
  90. package/dist/lang/es.umd.prod.js +1 -1
  91. package/dist/lang/et.umd.prod.js +1 -1
  92. package/dist/lang/eu.umd.prod.js +6 -0
  93. package/dist/lang/fa-IR.umd.prod.js +1 -1
  94. package/dist/lang/fa.umd.prod.js +1 -1
  95. package/dist/lang/fi.umd.prod.js +1 -1
  96. package/dist/lang/fr.umd.prod.js +1 -1
  97. package/dist/lang/gn.umd.prod.js +1 -1
  98. package/dist/lang/he.umd.prod.js +1 -1
  99. package/dist/lang/hr.umd.prod.js +1 -1
  100. package/dist/lang/hu.umd.prod.js +1 -1
  101. package/dist/lang/id.umd.prod.js +1 -1
  102. package/dist/lang/is.umd.prod.js +1 -1
  103. package/dist/lang/it.umd.prod.js +1 -1
  104. package/dist/lang/ja.umd.prod.js +1 -1
  105. package/dist/lang/km.umd.prod.js +1 -1
  106. package/dist/lang/ko-KR.umd.prod.js +1 -1
  107. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  108. package/dist/lang/kz.umd.prod.js +6 -0
  109. package/dist/lang/lt.umd.prod.js +1 -1
  110. package/dist/lang/lu.umd.prod.js +1 -1
  111. package/dist/lang/lv.umd.prod.js +1 -1
  112. package/dist/lang/ml.umd.prod.js +1 -1
  113. package/dist/lang/ms.umd.prod.js +1 -1
  114. package/dist/lang/my.umd.prod.js +1 -1
  115. package/dist/lang/nb-NO.umd.prod.js +1 -1
  116. package/dist/lang/nl.umd.prod.js +1 -1
  117. package/dist/lang/pl.umd.prod.js +1 -1
  118. package/dist/lang/pt-BR.umd.prod.js +1 -1
  119. package/dist/lang/pt.umd.prod.js +1 -1
  120. package/dist/lang/ro.umd.prod.js +1 -1
  121. package/dist/lang/ru.umd.prod.js +1 -1
  122. package/dist/lang/sk.umd.prod.js +1 -1
  123. package/dist/lang/sl.umd.prod.js +1 -1
  124. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  125. package/dist/lang/sr.umd.prod.js +1 -1
  126. package/dist/lang/sv.umd.prod.js +1 -1
  127. package/dist/lang/ta.umd.prod.js +1 -1
  128. package/dist/lang/th.umd.prod.js +1 -1
  129. package/dist/lang/tr.umd.prod.js +1 -1
  130. package/dist/lang/ug.umd.prod.js +2 -2
  131. package/dist/lang/uk.umd.prod.js +1 -1
  132. package/dist/lang/vi.umd.prod.js +1 -1
  133. package/dist/lang/zh-CN.umd.prod.js +1 -1
  134. package/dist/lang/zh-TW.umd.prod.js +1 -1
  135. package/dist/quasar.cjs.prod.js +2 -2
  136. package/dist/quasar.css +4 -6
  137. package/dist/quasar.esm.prod.js +2 -2
  138. package/dist/quasar.prod.css +1 -1
  139. package/dist/quasar.rtl.css +4 -6
  140. package/dist/quasar.rtl.prod.css +1 -1
  141. package/dist/quasar.sass +3 -1
  142. package/dist/quasar.umd.js +560 -505
  143. package/dist/quasar.umd.prod.js +2 -2
  144. package/dist/types/extras/icon-set.d.ts +3 -0
  145. package/dist/types/globals.d.ts +2 -2
  146. package/dist/types/index.d.ts +254 -136
  147. package/dist/vetur/quasar-attributes.json +50 -38
  148. package/dist/vetur/quasar-tags.json +3 -0
  149. package/dist/web-types/web-types.json +129 -93
  150. package/icon-set/fontawesome-v6-pro.js +128 -0
  151. package/icon-set/fontawesome-v6.js +128 -0
  152. package/icon-set/svg-fontawesome-v6.js +198 -0
  153. package/lang/eu.js +91 -0
  154. package/lang/index.json +8 -0
  155. package/lang/kz.js +95 -0
  156. package/lang/ug.js +49 -50
  157. package/package.json +1 -1
  158. package/src/api-file-example.json +2 -2
  159. package/src/api.extends.json +22 -33
  160. package/src/components/btn/QBtn.js +16 -14
  161. package/src/components/btn/QBtn.json +3 -6
  162. package/src/components/btn/use-btn.js +7 -7
  163. package/src/components/carousel/QCarousel.json +2 -4
  164. package/src/components/checkbox/use-checkbox.json +2 -4
  165. package/src/components/chip/QChip.json +1 -3
  166. package/src/components/date/QDate.js +20 -19
  167. package/src/components/date/use-datetime.js +3 -1
  168. package/src/components/dialog/QDialog.js +11 -11
  169. package/src/components/dialog-bottom-sheet/BottomSheet.js +11 -11
  170. package/src/components/dialog-plugin/DialogPlugin.js +9 -8
  171. package/src/components/editor/QEditor.js +10 -10
  172. package/src/components/editor/editor-utils.js +2 -2
  173. package/src/components/fab/QFabAction.json +1 -3
  174. package/src/components/field/QField.json +2 -6
  175. package/src/components/file/QFile.js +2 -1
  176. package/src/components/form/QForm.json +10 -7
  177. package/src/components/icon/QIcon.js +6 -2
  178. package/src/components/icon/QIcon.json +1 -3
  179. package/src/components/infinite-scroll/QInfiniteScroll.js +3 -1
  180. package/src/components/inner-loading/QInnerLoading.js +7 -7
  181. package/src/components/input/QInput.js +4 -1
  182. package/src/components/input/QInput.json +2 -6
  183. package/src/components/input/use-mask.js +2 -2
  184. package/src/components/knob/QKnob.js +51 -42
  185. package/src/components/knob/QKnob.json +22 -0
  186. package/src/components/linear-progress/QLinearProgress.sass +1 -0
  187. package/src/components/menu/QMenu.js +13 -13
  188. package/src/components/page-scroller/QPageScroller.js +4 -4
  189. package/src/components/pull-to-refresh/QPullToRefresh.js +5 -5
  190. package/src/components/radio/QRadio.json +2 -4
  191. package/src/components/select/QSelect.js +14 -7
  192. package/src/components/select/QSelect.json +14 -8
  193. package/src/components/slide-transition/QSlideTransition.js +4 -4
  194. package/src/components/slider/use-slider.js +4 -4
  195. package/src/components/slider/use-slider.json +1 -1
  196. package/src/components/stepper/QStep.js +6 -6
  197. package/src/components/stepper/QStep.json +3 -0
  198. package/src/components/stepper/QStepper.json +3 -0
  199. package/src/components/stepper/QStepper.sass +1 -0
  200. package/src/components/stepper/StepHeader.js +23 -8
  201. package/src/components/table/QTable.json +5 -13
  202. package/src/components/table/table-column-selection.js +6 -6
  203. package/src/components/table/table-sort.js +2 -2
  204. package/src/components/tabs/QRouteTab.json +2 -3
  205. package/src/components/tabs/QTabs.js +4 -4
  206. package/src/components/tabs/use-tab.js +11 -8
  207. package/src/components/time/QTime.js +5 -5
  208. package/src/components/tooltip/QTooltip.js +12 -12
  209. package/src/components/uploader/uploader-core.js +11 -10
  210. package/src/components/virtual-scroll/QVirtualScroll.js +3 -3
  211. package/src/components/virtual-scroll/use-virtual-scroll.js +20 -20
  212. package/src/composables/private/use-field.js +25 -17
  213. package/src/composables/private/use-file-dom-props.js +5 -5
  214. package/src/composables/private/use-file.js +15 -12
  215. package/src/composables/private/use-file.json +1 -3
  216. package/src/composables/private/use-router-link.js +3 -3
  217. package/src/directives/Morph.js +12 -3
  218. package/src/directives/TouchHold.json +2 -3
  219. package/src/directives/TouchPan.json +2 -3
  220. package/src/directives/TouchRepeat.json +2 -3
  221. package/src/directives/TouchSwipe.json +2 -3
  222. package/src/install-quasar.js +37 -36
  223. package/src/plugins/AddressbarColor.js +7 -7
  224. package/src/plugins/Cookies.js +5 -1
  225. package/src/plugins/Dialog.json +3 -2
  226. package/src/plugins/Loading.js +3 -2
  227. package/src/plugins/LoadingBar.js +12 -5
  228. package/src/plugins/Notify.js +11 -4
  229. package/src/plugins/Notify.json +102 -2
  230. package/src/utils/create-meta-mixin.js +4 -4
  231. package/src/utils/create-uploader-component.js +2 -1
  232. package/src/utils/event.js +3 -3
  233. package/src/utils/extend.js +6 -34
  234. package/src/utils/morph.js +19 -17
  235. package/src/utils/private/is.js +3 -14
  236. package/src/utils/private/noop-ssr-directive-transform.js +1 -1
  237. package/src/utils/private/web-storage.js +3 -2
  238. package/wrappers/index.js +33 -5
  239. package/wrappers/index.mjs +63 -0
  240. package/dist/ssr-directives/Morph.js +0 -55
  241. package/dist/ssr-directives/index.js +0 -14
  242. package/src/directives/Morph.ssr.js +0 -45
@@ -17,6 +17,7 @@ import { createComponent } from '../../utils/private/create.js'
17
17
  import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
18
18
 
19
19
  import { isKeyCode } from '../../utils/private/key-composition.js'
20
+ import { isObject } from '../../utils/private/is.js'
20
21
 
21
22
  export default createComponent({
22
23
  name: 'DialogPlugin',
@@ -80,7 +81,7 @@ export default createComponent({
80
81
  props.progress === false
81
82
  ? null
82
83
  : (
83
- Object(props.progress) === props.progress
84
+ isObject(props.progress) === true
84
85
  ? {
85
86
  component: props.progress.spinner || QSpinner,
86
87
  props: { color: props.progress.color || vmColor.value }
@@ -109,7 +110,7 @@ export default createComponent({
109
110
  })
110
111
 
111
112
  const okLabel = computed(() => (
112
- Object(props.ok) === props.ok
113
+ isObject(props.ok) === true
113
114
  ? $q.lang.label.ok
114
115
  : (
115
116
  props.ok === true
@@ -119,7 +120,7 @@ export default createComponent({
119
120
  ))
120
121
 
121
122
  const cancelLabel = computed(() => (
122
- Object(props.cancel) === props.cancel
123
+ isObject(props.cancel) === true
123
124
  ? $q.lang.label.cancel
124
125
  : (
125
126
  props.cancel === true
@@ -145,7 +146,7 @@ export default createComponent({
145
146
  label: okLabel.value,
146
147
  ripple: false,
147
148
  disable: okDisabled.value,
148
- ...(Object(props.ok) === props.ok ? props.ok : { flat: true }),
149
+ ...(isObject(props.ok) === true ? props.ok : { flat: true }),
149
150
  'data-autofocus': (props.focus === 'ok' && hasForm.value !== true) || void 0,
150
151
  onClick: onOk
151
152
  }))
@@ -154,7 +155,7 @@ export default createComponent({
154
155
  color: vmColor.value,
155
156
  label: cancelLabel.value,
156
157
  ripple: false,
157
- ...(Object(props.cancel) === props.cancel ? props.cancel : { flat: true }),
158
+ ...(isObject(props.cancel) === true ? props.cancel : { flat: true }),
158
159
  'data-autofocus': (props.focus === 'cancel' && hasForm.value !== true) || void 0,
159
160
  onClick: onCancel
160
161
  }))
@@ -201,9 +202,9 @@ export default createComponent({
201
202
  function getSection (classes, text) {
202
203
  return props.html === true
203
204
  ? h(QCardSection, {
204
- class: classes,
205
- innerHTML: text
206
- })
205
+ class: classes,
206
+ innerHTML: text
207
+ })
207
208
  : h(QCardSection, { class: classes }, () => text)
208
209
  }
209
210
 
@@ -180,17 +180,17 @@ export default createComponent({
180
180
  const userDef = props.definitions || {}
181
181
  const def = props.definitions || props.fonts
182
182
  ? extend(
183
- true,
184
- {},
185
- buttonDef.value,
186
- userDef,
187
- getFonts(
188
- defaultFont,
189
- $q.lang.editor.defaultFont,
190
- $q.iconSet.editor.font,
191
- props.fonts
192
- )
183
+ true,
184
+ {},
185
+ buttonDef.value,
186
+ userDef,
187
+ getFonts(
188
+ defaultFont,
189
+ $q.lang.editor.defaultFont,
190
+ $q.iconSet.editor.font,
191
+ props.fonts
193
192
  )
193
+ )
194
194
  : buttonDef.value
195
195
 
196
196
  return props.toolbar.map(
@@ -34,8 +34,8 @@ function getBtn (eVm, btn, clickHandler, active = false) {
34
34
  if (btn.tip && eVm.$q.platform.is.desktop) {
35
35
  const Key = btn.key
36
36
  ? h('div', [
37
- h('small', `(CTRL + ${ String.fromCharCode(btn.key) })`)
38
- ])
37
+ h('small', `(CTRL + ${ String.fromCharCode(btn.key) })`)
38
+ ])
39
39
  : null
40
40
  child.push(
41
41
  h(QTooltip, { delay: 1000 }, () => [
@@ -59,9 +59,7 @@
59
59
  "desc": "Emulate click on QFabAction",
60
60
  "params": {
61
61
  "evt": {
62
- "type": "Object",
63
- "desc": "JS event object",
64
- "__exemption": [ "examples" ]
62
+ "extends": "evt"
65
63
  }
66
64
  }
67
65
  }
@@ -81,9 +81,7 @@
81
81
  "desc": "Emitted when component gets focused",
82
82
  "params": {
83
83
  "evt": {
84
- "type": "Object",
85
- "desc": "JS event object",
86
- "__exemption": [ "examples" ]
84
+ "extends": "evt"
87
85
  }
88
86
  }
89
87
  },
@@ -92,9 +90,7 @@
92
90
  "desc": "Emitted when component loses focus",
93
91
  "params": {
94
92
  "evt": {
95
- "type": "Object",
96
- "desc": "JS event object",
97
- "__exemption": [ "examples" ]
93
+ "extends": "evt"
98
94
  }
99
95
  }
100
96
  }
@@ -58,6 +58,7 @@ export default createComponent({
58
58
  const {
59
59
  pickFiles,
60
60
  onDragover,
61
+ onDragleave,
61
62
  processFiles,
62
63
  getDndNode
63
64
  } = useFile({ editable: state.editable, dnd, getFileInput, addFilesToQueue })
@@ -263,7 +264,7 @@ export default createComponent({
263
264
  }
264
265
 
265
266
  if (state.editable.value === true) {
266
- Object.assign(data, { onDragover, onKeydown, onKeyup })
267
+ Object.assign(data, { onDragover, onDragleave, onKeydown, onKeyup })
267
268
  }
268
269
 
269
270
  return h('div', data, [ getInput() ].concat(getSelection()))
@@ -37,7 +37,14 @@
37
37
 
38
38
  "events": {
39
39
  "submit": {
40
- "desc": "Emitted when all validations have passed when tethered to a submit button"
40
+ "desc": "Emitted when all validations have passed when tethered to a submit button",
41
+ "params": {
42
+ "evt": {
43
+ "type": [ "Event", "SubmitEvent" ],
44
+ "desc": "Form submission event object",
45
+ "__exemption": [ "examples" ]
46
+ }
47
+ }
41
48
  },
42
49
 
43
50
  "reset": {
@@ -89,9 +96,7 @@
89
96
  "desc": "Manually trigger form validation and submit",
90
97
  "params": {
91
98
  "evt": {
92
- "type": "Object",
93
- "desc": "JS event object",
94
- "__exemption": [ "examples" ]
99
+ "extends": "evt"
95
100
  }
96
101
  }
97
102
  },
@@ -100,9 +105,7 @@
100
105
  "desc": "Manually trigger form reset",
101
106
  "params": {
102
107
  "evt": {
103
- "type": "Object",
104
- "desc": "JS event object",
105
- "__exemption": [ "examples" ]
108
+ "extends": "evt"
106
109
  }
107
110
  }
108
111
  },
@@ -36,6 +36,7 @@ const imgRE = /^img:/
36
36
  const svgUseRE = /^svguse:/
37
37
  const ionRE = /^ion-/
38
38
  const faLaRE = /^[lf]a[srlbdk]? /
39
+ const fa6RE = /^fa-(brand|regular|solid)/
39
40
 
40
41
  export default createComponent({
41
42
  name: 'QIcon',
@@ -69,7 +70,7 @@ export default createComponent({
69
70
  let cls
70
71
  let icon = props.name
71
72
 
72
- if (!icon) {
73
+ if (icon === 'none' || !icon) {
73
74
  return { none: true }
74
75
  }
75
76
 
@@ -78,6 +79,9 @@ export default createComponent({
78
79
  if (res !== void 0) {
79
80
  if (res.icon !== void 0) {
80
81
  icon = res.icon
82
+ if (icon === 'none' || !icon) {
83
+ return { none: true }
84
+ }
81
85
  }
82
86
  else {
83
87
  return {
@@ -126,7 +130,7 @@ export default createComponent({
126
130
  if (matches !== null) {
127
131
  cls = libMap[ matches[ 1 ] ](icon)
128
132
  }
129
- else if (faLaRE.test(icon) === true) {
133
+ else if (faLaRE.test(icon) === true || fa6RE.test(icon) === true) {
130
134
  cls = icon
131
135
  }
132
136
  else if (ionRE.test(icon) === true) {
@@ -14,9 +14,7 @@
14
14
  },
15
15
 
16
16
  "name": {
17
- "type": "String",
18
- "desc": "Name of the icon, following Quasar convention",
19
- "examples": [ "map", "ion-add" ],
17
+ "extends": "icon",
20
18
  "category": "model"
21
19
  },
22
20
 
@@ -120,7 +120,9 @@ export default createComponent({
120
120
  isWorking.value = false
121
121
  isFetching.value = false
122
122
  localScrollTarget.removeEventListener('scroll', poll, passive)
123
- poll !== void 0 && poll.cancel()
123
+ if (poll !== void 0 && poll.cancel !== void 0) {
124
+ poll.cancel()
125
+ }
124
126
  }
125
127
  }
126
128
 
@@ -39,7 +39,7 @@ export default createComponent({
39
39
 
40
40
  const labelClass = computed(() =>
41
41
  'q-inner-loading__label'
42
- + (props.labelClass !== void 0 ? ` ${ props.labelClass}` : '')
42
+ + (props.labelClass !== void 0 ? ` ${ props.labelClass }` : '')
43
43
  )
44
44
 
45
45
  function getInner () {
@@ -65,12 +65,12 @@ export default createComponent({
65
65
  function getContent () {
66
66
  return props.showing === true
67
67
  ? h(
68
- 'div',
69
- { class: classes.value, style: transitionStyle.value },
70
- slots.default !== void 0
71
- ? slots.default()
72
- : getInner()
73
- )
68
+ 'div',
69
+ { class: classes.value, style: transitionStyle.value },
70
+ slots.default !== void 0
71
+ ? slots.default()
72
+ : getInner()
73
+ )
74
74
  : null
75
75
  }
76
76
 
@@ -138,7 +138,10 @@ export default createComponent({
138
138
  if (hasMask.value === true) {
139
139
  if (stopValueWatcher === true) {
140
140
  stopValueWatcher = false
141
- return
141
+
142
+ if (String(v) === emitCachedValue) {
143
+ return
144
+ }
142
145
  }
143
146
 
144
147
  updateMaskValue(v)
@@ -89,9 +89,7 @@
89
89
  "desc": "Emitted when component gets focused",
90
90
  "params": {
91
91
  "evt": {
92
- "type": "Object",
93
- "desc": "JS event object",
94
- "__exemption": [ "examples" ]
92
+ "extends": "evt"
95
93
  }
96
94
  }
97
95
  },
@@ -100,9 +98,7 @@
100
98
  "desc": "Emitted when component loses focus",
101
99
  "params": {
102
100
  "evt": {
103
- "type": "Object",
104
- "desc": "JS event object",
105
- "__exemption": [ "examples" ]
101
+ "extends": "evt"
106
102
  }
107
103
  }
108
104
  }
@@ -1,4 +1,4 @@
1
- import { ref, computed, watch, nextTick } from 'vue'
1
+ import { ref, watch, nextTick } from 'vue'
2
2
 
3
3
  import { shouldIgnoreKey } from '../../utils/private/key-composition.js'
4
4
 
@@ -297,7 +297,7 @@ export default function (props, emit, emitValue, inputRef) {
297
297
  ? unmaskValue(masked)
298
298
  : masked
299
299
 
300
- props.modelValue !== val && emitValue(val, true)
300
+ String(props.modelValue) !== val && emitValue(val, true)
301
301
  }
302
302
 
303
303
  function moveCursorForPaste (inp, start, end) {
@@ -1,4 +1,4 @@
1
- import { h, ref, computed, watch, onMounted, withDirectives, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, getCurrentInstance } from 'vue'
2
2
 
3
3
  import QCircularProgress from '../circular-progress/QCircularProgress.js'
4
4
  import TouchPan from '../../directives/TouchPan.js'
@@ -6,6 +6,7 @@ import TouchPan from '../../directives/TouchPan.js'
6
6
  import { createComponent } from '../../utils/private/create.js'
7
7
  import { position, stopAndPrevent } from '../../utils/event.js'
8
8
  import { between, normalizeToInterval } from '../../utils/format.js'
9
+ import { hDir } from '../../utils/private/render.js'
9
10
 
10
11
  import { useFormProps, useFormAttrs } from '../../composables/private/use-form.js'
11
12
  import { useCircularCommonProps } from '../circular-progress/use-circular-progress.js'
@@ -26,6 +27,9 @@ export default createComponent({
26
27
  required: true
27
28
  },
28
29
 
30
+ innerMin: Number,
31
+ innerMax: Number,
32
+
29
33
  step: {
30
34
  type: Number,
31
35
  default: 1,
@@ -50,27 +54,33 @@ export default createComponent({
50
54
  const model = ref(props.modelValue)
51
55
  const dragging = ref(false)
52
56
 
53
- let centerPosition, $el
57
+ const innerMin = computed(() => (
58
+ isNaN(props.innerMin) === true || props.innerMin < props.min
59
+ ? props.min
60
+ : props.innerMin
61
+ ))
62
+ const innerMax = computed(() => (
63
+ isNaN(props.innerMax) === true || props.innerMax > props.max
64
+ ? props.max
65
+ : props.innerMax
66
+ ))
54
67
 
55
- watch(() => props.modelValue, val => {
56
- if (val < props.min) {
57
- model.value = props.min
58
- }
59
- else if (val > props.max) {
60
- model.value = props.max
61
- }
62
- else {
63
- if (val !== model.value) {
64
- model.value = val
65
- }
66
- return
67
- }
68
+ let centerPosition
68
69
 
69
- if (model.value !== props.modelValue) {
70
- emit('update:modelValue', model.value)
71
- emit('change', model.value)
72
- }
73
- })
70
+ function normalizeModel () {
71
+ model.value = props.modelValue === null
72
+ ? innerMin.value
73
+ : between(props.modelValue, innerMin.value, innerMax.value)
74
+
75
+ updateValue(true)
76
+ }
77
+
78
+ watch(
79
+ () => `${ props.modelValue }|${ innerMin.value }|${ innerMax.value }`,
80
+ normalizeModel
81
+ )
82
+
83
+ normalizeModel()
74
84
 
75
85
  const editable = computed(() => props.disable === false && props.readonly === false)
76
86
 
@@ -138,7 +148,7 @@ export default createComponent({
138
148
  })
139
149
 
140
150
  function updateCenterPosition () {
141
- const { top, left, width, height } = $el.getBoundingClientRect()
151
+ const { top, left, width, height } = proxy.$el.getBoundingClientRect()
142
152
  centerPosition = {
143
153
  top: top + height / 2,
144
154
  left: left + width / 2
@@ -168,8 +178,8 @@ export default createComponent({
168
178
 
169
179
  model.value = between(
170
180
  parseFloat((model.value + offset).toFixed(decimals.value)),
171
- props.min,
172
- props.max
181
+ innerMin.value,
182
+ innerMax.value
173
183
  )
174
184
 
175
185
  updateValue()
@@ -193,11 +203,14 @@ export default createComponent({
193
203
  angle = centerPosition.left < pos.left ? angle + 90 : 270 - angle
194
204
  }
195
205
 
196
- if (props.angle) {
206
+ if ($q.lang.rtl === true) {
207
+ angle = normalizeToInterval(-angle - props.angle, 0, 360)
208
+ }
209
+ else if (props.angle) {
197
210
  angle = normalizeToInterval(angle - props.angle, 0, 360)
198
211
  }
199
212
 
200
- if ($q.lang.rtl === true) {
213
+ if (props.reverse === true) {
201
214
  angle = 360 - angle
202
215
  }
203
216
 
@@ -212,7 +225,7 @@ export default createComponent({
212
225
  newModel = parseFloat(newModel.toFixed(decimals.value))
213
226
  }
214
227
 
215
- newModel = between(newModel, props.min, props.max)
228
+ newModel = between(newModel, innerMin.value, innerMax.value)
216
229
 
217
230
  emit('drag-value', newModel)
218
231
 
@@ -240,16 +253,12 @@ export default createComponent({
240
253
  return h('input', formAttrs.value)
241
254
  }
242
255
 
243
- onMounted(() => {
244
- $el = proxy.$el
245
- })
246
-
247
256
  return () => {
248
257
  const data = {
249
258
  class: classes.value,
250
259
  role: 'slider',
251
- 'aria-valuemin': props.min,
252
- 'aria-valuemax': props.max,
260
+ 'aria-valuemin': innerMin.value,
261
+ 'aria-valuemax': innerMax.value,
253
262
  'aria-valuenow': props.modelValue,
254
263
  ...attrs.value,
255
264
  ...circularProps.value,
@@ -262,18 +271,18 @@ export default createComponent({
262
271
  default: slots.default
263
272
  }
264
273
 
265
- if (editable.value === true) {
266
- if (props.name !== void 0) {
267
- child.internal = getNameInput
268
- }
269
-
270
- return withDirectives(
271
- h(QCircularProgress, data, child),
272
- directives.value
273
- )
274
+ if (editable.value === true && props.name !== void 0) {
275
+ child.internal = getNameInput
274
276
  }
275
277
 
276
- return h(QCircularProgress, data, child)
278
+ return hDir(
279
+ QCircularProgress,
280
+ data,
281
+ child,
282
+ 'knob',
283
+ editable.value,
284
+ () => directives.value
285
+ )
277
286
  }
278
287
  }
279
288
  })
@@ -27,6 +27,22 @@
27
27
  "category": "model"
28
28
  },
29
29
 
30
+ "inner-min": {
31
+ "type": "Number",
32
+ "desc": "Inner minimum value of the model; Use in case you need the model value to be inside of the track's min-max values; Needs to be higher or equal to 'min' prop; Defaults to 'min' prop",
33
+ "examples": [ ":inner-min=\"0\"" ],
34
+ "category": "model",
35
+ "addedIn": "v2.5.4"
36
+ },
37
+
38
+ "inner-max": {
39
+ "type": "Number",
40
+ "desc": "Inner maximum value of the model; Use in case you need the model value to be inside of the track's min-max values; Needs to be lower or equal to 'max' prop; Defaults to 'max' prop",
41
+ "examples": [ ":inner-max=\"100\"" ],
42
+ "category": "model",
43
+ "addedIn": "v2.5.4"
44
+ },
45
+
30
46
  "step": {
31
47
  "type": "Number",
32
48
  "default": "1",
@@ -35,6 +51,12 @@
35
51
  "category": "model"
36
52
  },
37
53
 
54
+ "reverse": {
55
+ "type": "Boolean",
56
+ "desc": "Reverses the direction of progress",
57
+ "category": "behavior"
58
+ },
59
+
38
60
  "instant-feedback": {
39
61
  "type": "Boolean",
40
62
  "desc": "No animation when model changes",
@@ -6,6 +6,7 @@
6
6
  font-size: 4px
7
7
  height: 1em
8
8
  color: var(--q-primary)
9
+ transform: scale3d(1, 1, 1)
9
10
 
10
11
  &__model, &__track
11
12
  transform-origin: 0 0
@@ -349,19 +349,19 @@ export default createComponent({
349
349
  () => (
350
350
  showing.value === true
351
351
  ? h('div', {
352
- ...attrs,
353
- ref: innerRef,
354
- tabindex: -1,
355
- class: [
356
- 'q-menu q-position-engine scroll' + menuClass.value,
357
- attrs.class
358
- ],
359
- style: [
360
- attrs.style,
361
- transitionStyle.value
362
- ],
363
- ...onEvents.value
364
- }, hSlot(slots.default))
352
+ ...attrs,
353
+ ref: innerRef,
354
+ tabindex: -1,
355
+ class: [
356
+ 'q-menu q-position-engine scroll' + menuClass.value,
357
+ attrs.class
358
+ ],
359
+ style: [
360
+ attrs.style,
361
+ transitionStyle.value
362
+ ],
363
+ ...onEvents.value
364
+ }, hSlot(slots.default))
365
365
  : null
366
366
  )
367
367
  )
@@ -98,10 +98,10 @@ export default createComponent({
98
98
  function getContent () {
99
99
  return showing.value === true
100
100
  ? h('div', {
101
- ref: rootRef,
102
- class: 'q-page-scroller',
103
- onClick
104
- }, getStickyContent(slots))
101
+ ref: rootRef,
102
+ class: 'q-page-scroller',
103
+ onClick
104
+ }, getStickyContent(slots))
105
105
  : null
106
106
  }
107
107
 
@@ -76,7 +76,7 @@ export default createComponent({
76
76
  }
77
77
 
78
78
  if (event.isFirst === true) {
79
- if (getVerticalScrollPosition(localScrollTarget) !== 0 || event.direction !== "down") {
79
+ if (getVerticalScrollPosition(localScrollTarget) !== 0 || event.direction !== 'down') {
80
80
  if (pulling.value === true) {
81
81
  pulling.value = false
82
82
  state.value = 'pull'
@@ -189,10 +189,10 @@ export default createComponent({
189
189
  }, [
190
190
  state.value !== 'refreshing'
191
191
  ? h(QIcon, {
192
- name: props.icon || $q.iconSet.pullToRefresh.icon,
193
- color: props.color,
194
- size: '32px'
195
- })
192
+ name: props.icon || $q.iconSet.pullToRefresh.icon,
193
+ color: props.color,
194
+ size: '32px'
195
+ })
196
196
  : h(QSpinner, {
197
197
  size: '24px',
198
198
  color: props.color
@@ -93,10 +93,8 @@
93
93
  "__exemption": [ "examples" ]
94
94
  },
95
95
  "evt": {
96
- "type": "Object",
97
- "desc": "JS event object",
98
- "required": true,
99
- "__exemption": [ "examples" ]
96
+ "extends": "evt",
97
+ "required": true
100
98
  }
101
99
  }
102
100
  }