quasar 2.3.3 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. package/dist/api/Dialog.json +1 -1
  2. package/dist/api/Loading.json +2 -6
  3. package/dist/api/QBreadcrumbsEl.json +31 -10
  4. package/dist/api/QBtn.json +30 -14
  5. package/dist/api/QBtnDropdown.json +31 -15
  6. package/dist/api/QBtnToggle.json +3 -0
  7. package/dist/api/QChatMessage.json +4 -12
  8. package/dist/api/QExpansionItem.json +34 -12
  9. package/dist/api/QFab.json +33 -2
  10. package/dist/api/QFabAction.json +8 -0
  11. package/dist/api/QField.json +1 -0
  12. package/dist/api/QFile.json +5 -2
  13. package/dist/api/QForm.json +1 -1
  14. package/dist/api/QInput.json +1 -0
  15. package/dist/api/QItem.json +31 -10
  16. package/dist/api/QOptionGroup.json +74 -4
  17. package/dist/api/QPopupProxy.json +3 -2
  18. package/dist/api/QRange.json +592 -107
  19. package/dist/api/QRating.json +3 -1
  20. package/dist/api/QRouteTab.json +31 -11
  21. package/dist/api/QScrollArea.json +3 -2
  22. package/dist/api/QSelect.json +9 -16
  23. package/dist/api/QSlider.json +504 -39
  24. package/dist/api/QTree.json +8 -4
  25. package/dist/api/QUploader.json +16 -2
  26. package/dist/api/QVirtualScroll.json +3 -2
  27. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  28. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  29. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  30. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  31. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  32. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  33. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  34. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  35. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  36. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  37. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  38. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  39. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  40. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  41. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  42. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  43. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  44. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  45. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  46. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  47. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  48. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  49. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  50. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  51. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  52. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  53. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  54. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  55. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  56. package/dist/icon-set/themify.umd.prod.js +1 -1
  57. package/dist/lang/ar.umd.prod.js +1 -1
  58. package/dist/lang/az-Latn.umd.prod.js +1 -1
  59. package/dist/lang/bg.umd.prod.js +1 -1
  60. package/dist/lang/bn.umd.prod.js +1 -1
  61. package/dist/lang/ca.umd.prod.js +1 -1
  62. package/dist/lang/cs.umd.prod.js +1 -1
  63. package/dist/lang/da.umd.prod.js +1 -1
  64. package/dist/lang/de.umd.prod.js +1 -1
  65. package/dist/lang/el.umd.prod.js +1 -1
  66. package/dist/lang/en-GB.umd.prod.js +1 -1
  67. package/dist/lang/en-US.umd.prod.js +1 -1
  68. package/dist/lang/eo.umd.prod.js +1 -1
  69. package/dist/lang/es.umd.prod.js +1 -1
  70. package/dist/lang/et.umd.prod.js +1 -1
  71. package/dist/lang/fa-IR.umd.prod.js +1 -1
  72. package/dist/lang/fa.umd.prod.js +1 -1
  73. package/dist/lang/fi.umd.prod.js +1 -1
  74. package/dist/lang/fr.umd.prod.js +1 -1
  75. package/dist/lang/gn.umd.prod.js +1 -1
  76. package/dist/lang/he.umd.prod.js +1 -1
  77. package/dist/lang/hr.umd.prod.js +1 -1
  78. package/dist/lang/hu.umd.prod.js +1 -1
  79. package/dist/lang/id.umd.prod.js +1 -1
  80. package/dist/lang/is.umd.prod.js +1 -1
  81. package/dist/lang/it.umd.prod.js +1 -1
  82. package/dist/lang/ja.umd.prod.js +1 -1
  83. package/dist/lang/km.umd.prod.js +1 -1
  84. package/dist/lang/ko-KR.umd.prod.js +1 -1
  85. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  86. package/dist/lang/lt.umd.prod.js +1 -1
  87. package/dist/lang/lu.umd.prod.js +1 -1
  88. package/dist/lang/lv.umd.prod.js +1 -1
  89. package/dist/lang/ml.umd.prod.js +1 -1
  90. package/dist/lang/ms.umd.prod.js +1 -1
  91. package/dist/lang/nb-NO.umd.prod.js +1 -1
  92. package/dist/lang/nl.umd.prod.js +1 -1
  93. package/dist/lang/pl.umd.prod.js +1 -1
  94. package/dist/lang/pt-BR.umd.prod.js +1 -1
  95. package/dist/lang/pt.umd.prod.js +1 -1
  96. package/dist/lang/ro.umd.prod.js +1 -1
  97. package/dist/lang/ru.umd.prod.js +1 -1
  98. package/dist/lang/sk.umd.prod.js +1 -1
  99. package/dist/lang/sl.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/tr.umd.prod.js +1 -1
  106. package/dist/lang/ug.umd.prod.js +1 -1
  107. package/dist/lang/uk.umd.prod.js +1 -1
  108. package/dist/lang/vi.umd.prod.js +1 -1
  109. package/dist/lang/zh-CN.umd.prod.js +1 -1
  110. package/dist/lang/zh-TW.umd.prod.js +1 -1
  111. package/dist/quasar.cjs.prod.js +2 -2
  112. package/dist/quasar.css +275 -191
  113. package/dist/quasar.esm.prod.js +2 -2
  114. package/dist/quasar.prod.css +1 -1
  115. package/dist/quasar.rtl.css +347 -270
  116. package/dist/quasar.rtl.prod.css +1 -1
  117. package/dist/quasar.sass +275 -217
  118. package/dist/quasar.umd.js +16598 -16283
  119. package/dist/quasar.umd.prod.js +2 -2
  120. package/dist/ssr-directives/Morph.js +1 -1
  121. package/dist/transforms/loader-asset-urls.json +20 -0
  122. package/dist/types/api/slider.d.ts +46 -0
  123. package/dist/types/api/validation.d.ts +4 -0
  124. package/dist/types/api.d.ts +2 -0
  125. package/dist/types/composables.d.ts +3 -3
  126. package/dist/types/index.d.ts +611 -140
  127. package/dist/vetur/quasar-attributes.json +251 -83
  128. package/dist/vetur/quasar-tags.json +59 -17
  129. package/dist/web-types/web-types.json +580 -152
  130. package/package.json +1 -1
  131. package/src/api.extends.json +0 -1
  132. package/src/components/breadcrumbs/QBreadcrumbs.js +7 -2
  133. package/src/components/breadcrumbs/QBreadcrumbs.sass +0 -3
  134. package/src/components/breadcrumbs/QBreadcrumbsEl.js +14 -8
  135. package/src/components/btn/QBtn.js +5 -5
  136. package/src/components/btn/use-btn.js +21 -21
  137. package/src/components/btn/use-btn.json +22 -13
  138. package/src/components/btn-dropdown/QBtnDropdown.json +1 -0
  139. package/src/components/btn-toggle/QBtnToggle.json +3 -0
  140. package/src/components/checkbox/use-checkbox.js +1 -1
  141. package/src/components/chip/QChip.json +1 -2
  142. package/src/components/color/QColor.js +32 -26
  143. package/src/components/color/QColor.sass +10 -23
  144. package/src/components/date/QDate.sass +2 -0
  145. package/src/components/drawer/QDrawer.js +18 -15
  146. package/src/components/editor/QEditor.js +1 -1
  147. package/src/components/editor/QEditor.sass +10 -1
  148. package/src/components/expansion-item/QExpansionItem.js +4 -1
  149. package/src/components/expansion-item/QExpansionItem.json +2 -1
  150. package/src/components/fab/QFab.js +18 -12
  151. package/src/components/fab/QFab.json +36 -1
  152. package/src/components/fab/QFab.sass +1 -1
  153. package/src/components/fab/QFabAction.js +14 -7
  154. package/src/components/fab/QFabAction.json +10 -0
  155. package/src/components/file/QFile.js +12 -5
  156. package/src/components/file/QFile.json +6 -6
  157. package/src/components/file/QFile.sass +4 -2
  158. package/src/components/footer/QFooter.js +1 -1
  159. package/src/components/form/QForm.json +2 -3
  160. package/src/components/header/QHeader.js +1 -1
  161. package/src/components/icon/QIcon.js +2 -2
  162. package/src/components/infinite-scroll/QInfiniteScroll.js +4 -5
  163. package/src/components/item/QItem.js +2 -3
  164. package/src/components/linear-progress/QLinearProgress.js +3 -2
  165. package/src/components/option-group/QOptionGroup.js +3 -0
  166. package/src/components/option-group/QOptionGroup.json +48 -2
  167. package/src/components/parallax/QParallax.js +4 -2
  168. package/src/components/popup-edit/QPopupEdit.js +2 -5
  169. package/src/components/popup-proxy/QPopupProxy.json +2 -1
  170. package/src/components/radio/QRadio.js +2 -7
  171. package/src/components/range/QRange.js +103 -222
  172. package/src/components/range/QRange.json +11 -121
  173. package/src/components/rating/QRating.json +1 -1
  174. package/src/components/scroll-area/QScrollArea.js +3 -1
  175. package/src/components/scroll-area/QScrollArea.json +5 -6
  176. package/src/components/select/QSelect.js +4 -1
  177. package/src/components/select/QSelect.json +17 -4
  178. package/src/components/slider/QSlider.js +46 -132
  179. package/src/components/slider/QSlider.json +1 -121
  180. package/src/components/slider/QSlider.sass +198 -132
  181. package/src/components/slider/use-slider.js +453 -109
  182. package/src/components/slider/use-slider.json +546 -0
  183. package/src/components/stepper/QStepper.js +3 -3
  184. package/src/components/stepper/QStepper.sass +24 -26
  185. package/src/components/table/QTable.js +27 -47
  186. package/src/components/tabs/QRouteTab.js +1 -2
  187. package/src/components/tabs/QRouteTab.json +0 -7
  188. package/src/components/tabs/QTabs.js +71 -20
  189. package/src/components/tabs/use-tab.js +26 -13
  190. package/src/components/tree/QTree.js +14 -12
  191. package/src/components/tree/QTree.json +12 -12
  192. package/src/components/tree/QTree.sass +45 -41
  193. package/src/components/uploader/QUploader.json +14 -2
  194. package/src/components/uploader/uploader-core.js +16 -9
  195. package/src/components/virtual-scroll/QVirtualScroll.json +15 -0
  196. package/src/components/virtual-scroll/QVirtualScroll.sass +1 -0
  197. package/src/components/virtual-scroll/use-virtual-scroll.js +30 -17
  198. package/src/components/virtual-scroll/use-virtual-scroll.json +2 -5
  199. package/src/composables/private/use-field.js +5 -5
  200. package/src/composables/private/use-file.js +20 -5
  201. package/src/composables/private/use-form.js +2 -3
  202. package/src/composables/private/use-fullscreen.js +15 -4
  203. package/src/composables/private/use-router-link.js +44 -23
  204. package/src/composables/private/use-router-link.json +26 -10
  205. package/src/composables/private/use-split-attrs.js +4 -4
  206. package/src/composables/private/use-validate.js +21 -15
  207. package/src/composables/private/use-validate.json +1 -0
  208. package/src/css/core/helpers.sass +3 -0
  209. package/src/css/core/positioning.sass +5 -0
  210. package/src/css/variables.sass +4 -6
  211. package/src/directives/ScrollFire.js +1 -0
  212. package/src/icon-set.js +2 -4
  213. package/src/plugins/AppFullscreen.js +70 -53
  214. package/src/plugins/AppVisibility.js +2 -3
  215. package/src/plugins/BottomSheet.js +3 -5
  216. package/src/plugins/Dialog.js +3 -5
  217. package/src/plugins/Dialog.json +2 -3
  218. package/src/plugins/LoadingBar.js +17 -18
  219. package/src/plugins/Notify.js +296 -295
  220. package/src/plugins/Platform.js +14 -14
  221. package/src/utils/date.js +4 -4
  222. package/src/utils/dom.js +2 -2
  223. package/src/utils/open-url.js +2 -2
  224. package/src/utils/patterns.js +1 -0
  225. package/src/utils/private/define-reactive-plugin.js +10 -8
  226. package/src/utils/private/global-dialog.js +6 -8
  227. package/src/utils/private/inject-obj-prop.js +13 -0
  228. package/src/utils/private/is.js +2 -2
@@ -3,8 +3,10 @@
3
3
 
4
4
  "props": {
5
5
  "model-value": {
6
+ "extends": "model-value",
6
7
  "desc": "Controls state of fab actions (showing/hidden); Works best with v-model directive, otherwise use along listening to 'update:modelValue' event",
7
- "category": "model"
8
+ "category": "model",
9
+ "required": false
8
10
  },
9
11
 
10
12
  "icon": {
@@ -52,6 +54,39 @@
52
54
 
53
55
  "tooltip": {
54
56
  "desc": "Slot specifically designed for a QTooltip"
57
+ },
58
+
59
+ "icon": {
60
+ "desc": "Slot for icon shown when FAB is closed; Suggestion: QIcon",
61
+ "scope": {
62
+ "opened": {
63
+ "type": "Boolean",
64
+ "desc": "FAB is opened"
65
+ }
66
+ },
67
+ "addedIn": "v2.4"
68
+ },
69
+
70
+ "active-icon": {
71
+ "desc": "Slot for icon shown when FAB is opened; Suggestion: QIcon",
72
+ "scope": {
73
+ "opened": {
74
+ "type": "Boolean",
75
+ "desc": "FAB is opened"
76
+ }
77
+ },
78
+ "addedIn": "v2.4"
79
+ },
80
+
81
+ "label": {
82
+ "desc": "Slot for label",
83
+ "scope": {
84
+ "opened": {
85
+ "type": "Boolean",
86
+ "desc": "FAB is opened"
87
+ }
88
+ },
89
+ "addedIn": "v2.4"
55
90
  }
56
91
  },
57
92
 
@@ -134,7 +134,7 @@
134
134
  &--up, &--down
135
135
  left: 50%
136
136
  margin-left: -28px
137
-
137
+
138
138
  &--opened
139
139
  opacity: 1
140
140
  transform: scale(1) translate(0, 0)
@@ -66,13 +66,20 @@ export default createComponent({
66
66
  function getContent () {
67
67
  const child = []
68
68
 
69
- props.icon !== '' && child.push(
70
- h(QIcon, { name: props.icon })
71
- )
72
-
73
- props.label !== '' && child[ labelProps.value.action ](
74
- h('div', labelProps.value.data, [ props.label ])
75
- )
69
+ if (slots.icon !== void 0) {
70
+ child.push(slots.icon())
71
+ }
72
+ else if (props.icon !== '') {
73
+ child.push(
74
+ h(QIcon, { name: props.icon })
75
+ )
76
+ }
77
+
78
+ if (props.label !== '' || slots.label !== void 0) {
79
+ child[ labelProps.value.action ](
80
+ h('div', labelProps.value.data, slots.label !== void 0 ? slots.label() : [ props.label ])
81
+ )
82
+ }
76
83
 
77
84
  return hMergeSlot(slots.default, child)
78
85
  }
@@ -35,6 +35,16 @@
35
35
  "slots": {
36
36
  "default": {
37
37
  "desc": "Suggestion for this slot: QTooltip"
38
+ },
39
+
40
+ "icon": {
41
+ "desc": "Slot for icon; Suggestion: QIcon",
42
+ "addedIn": "v2.4"
43
+ },
44
+
45
+ "label": {
46
+ "desc": "Slot for label",
47
+ "addedIn": "v2.4"
38
48
  }
39
49
  },
40
50
 
@@ -9,6 +9,7 @@ import useFileFormDomProps from '../../composables/private/use-file-dom-props.js
9
9
 
10
10
  import { createComponent } from '../../utils/private/create.js'
11
11
  import { humanStorageSize } from '../../utils/format.js'
12
+ import { prevent } from '../../utils/event.js'
12
13
 
13
14
  export default createComponent({
14
15
  name: 'QFile',
@@ -122,9 +123,16 @@ export default createComponent({
122
123
  emit('update:modelValue', props.multiple === true ? files : files[ 0 ])
123
124
  }
124
125
 
126
+ function onKeydown (e) {
127
+ // prevent form submit if ENTER is pressed
128
+ e.keyCode === 13 && prevent(e)
129
+ }
130
+
125
131
  function onKeyup (e) {
126
- // only on ENTER
127
- e.keyCode === 13 && pickFiles(e)
132
+ // only on ENTER and SPACE to match native input field
133
+ if (e.keyCode === 13 || e.keyCode === 32) {
134
+ pickFiles(e)
135
+ }
128
136
  }
129
137
 
130
138
  function getFileInput () {
@@ -158,8 +166,7 @@ export default createComponent({
158
166
  return [
159
167
  h('input', {
160
168
  class: [ props.inputClass, 'q-file__filler' ],
161
- style: props.inputStyle,
162
- tabindex: -1
169
+ style: props.inputStyle
163
170
  })
164
171
  ]
165
172
  }
@@ -256,7 +263,7 @@ export default createComponent({
256
263
  }
257
264
 
258
265
  if (state.editable.value === true) {
259
- Object.assign(data, { onDragover, onKeyup })
266
+ Object.assign(data, { onDragover, onKeydown, onKeyup })
260
267
  }
261
268
 
262
269
  return h('div', data, [ getInput() ].concat(getSelection()))
@@ -114,9 +114,9 @@
114
114
  },
115
115
 
116
116
  "ref": {
117
- "type": "Object",
118
- "desc": "Reference to the QFile component",
119
- "__exemption": [ "examples" ]
117
+ "type": "Component",
118
+ "tsType": "QFile",
119
+ "desc": "Reference to the QFile component"
120
120
  }
121
121
  }
122
122
  },
@@ -131,9 +131,9 @@
131
131
  },
132
132
 
133
133
  "ref": {
134
- "type": "Object",
135
- "desc": "Reference to the QFile component",
136
- "__exemption": [ "examples" ]
134
+ "type": "Component",
135
+ "tsType": "QFile",
136
+ "desc": "Reference to the QFile component"
137
137
  }
138
138
  }
139
139
  }
@@ -11,8 +11,10 @@
11
11
  cursor: pointer
12
12
 
13
13
  &__filler
14
- opacity: 0
15
- pointer-events: none
14
+ visibility: hidden
15
+ width: 100%
16
+ border: none
17
+ padding: 0
16
18
 
17
19
  &__dnd
18
20
  outline: 1px dashed currentColor
@@ -46,7 +46,7 @@ export default createComponent({
46
46
  const fixed = computed(() =>
47
47
  props.reveal === true
48
48
  || $layout.view.value.indexOf('F') > -1
49
- || $layout.isContainer.value === true
49
+ || ($q.platform.is.ios && $layout.isContainer.value === true)
50
50
  )
51
51
 
52
52
  const containerHeight = computed(() => (
@@ -52,9 +52,8 @@
52
52
  "desc": "Emitted after a validation was triggered and at least one of the inner Quasar components models are NOT valid",
53
53
  "params": {
54
54
  "ref": {
55
- "type": "Object",
56
- "desc": "Vue reference to the first component that triggered the validation error",
57
- "__exemption": [ "examples" ]
55
+ "type": "Component",
56
+ "desc": "Vue reference to the first component that triggered the validation error"
58
57
  }
59
58
  }
60
59
  }
@@ -43,7 +43,7 @@ export default createComponent({
43
43
  const fixed = computed(() =>
44
44
  props.reveal === true
45
45
  || $layout.view.value.indexOf('H') > -1
46
- || $layout.isContainer.value === true
46
+ || ($q.platform.is.ios && $layout.isContainer.value === true)
47
47
  )
48
48
 
49
49
  const offset = computed(() => {
@@ -29,11 +29,11 @@ const matMap = {
29
29
 
30
30
  const libRE = new RegExp('^(' + Object.keys(libMap).join('|') + ')')
31
31
  const matRE = new RegExp('^(' + Object.keys(matMap).join('|') + ')')
32
- const mRE = /^M/
32
+ const mRE = /^[Mm]\s?[-+]?\.?\d/
33
33
  const imgRE = /^img:/
34
34
  const svgUseRE = /^svguse:/
35
35
  const ionRE = /^ion-/
36
- const faLaRE = /^[l|f]a[s|r|l|b|d|k]? /
36
+ const faLaRE = /^[lf]a[srlbdk]? /
37
37
 
38
38
  export default createComponent({
39
39
  name: 'QIcon',
@@ -60,14 +60,12 @@ export default createComponent({
60
60
  containerHeight = height(localScrollTarget)
61
61
 
62
62
  if (props.reverse === false) {
63
- if (scrollPosition + containerHeight + props.offset >= scrollHeight) {
63
+ if (Math.round(scrollPosition + containerHeight + props.offset) >= Math.round(scrollHeight)) {
64
64
  trigger()
65
65
  }
66
66
  }
67
- else {
68
- if (scrollPosition < props.offset) {
69
- trigger()
70
- }
67
+ else if (Math.round(scrollPosition) <= props.offset) {
68
+ trigger()
71
69
  }
72
70
  }
73
71
 
@@ -123,6 +121,7 @@ export default createComponent({
123
121
  isWorking.value = false
124
122
  isFetching.value = false
125
123
  localScrollTarget.removeEventListener('scroll', poll, passive)
124
+ poll !== void 0 && poll.cancel()
126
125
  }
127
126
  }
128
127
 
@@ -38,7 +38,7 @@ export default createComponent({
38
38
  const { proxy: { $q } } = getCurrentInstance()
39
39
 
40
40
  const isDark = useDark(props, $q)
41
- const { hasLink, linkProps, linkClass, linkTag, navigateToLink } = useRouterLink()
41
+ const { hasRouterLink, hasLink, linkProps, linkClass, linkTag, navigateToRouterLink } = useRouterLink()
42
42
 
43
43
  const rootRef = ref(null)
44
44
  const blurTargetRef = ref(null)
@@ -46,7 +46,6 @@ export default createComponent({
46
46
  const isActionable = computed(() =>
47
47
  props.clickable === true
48
48
  || hasLink.value === true
49
- || props.tag === 'a'
50
49
  || props.tag === 'label'
51
50
  )
52
51
 
@@ -99,7 +98,7 @@ export default createComponent({
99
98
  }
100
99
  }
101
100
 
102
- hasLink.value === true && navigateToLink(e)
101
+ hasRouterLink.value === true && navigateToRouterLink(e)
103
102
  emit('click', e)
104
103
  }
105
104
  }
@@ -58,6 +58,7 @@ export default createComponent({
58
58
  const sizeStyle = useSize(props, defaultSizes)
59
59
 
60
60
  const motion = computed(() => props.indeterminate === true || props.query === true)
61
+ const widthReverse = computed(() => props.reverse !== props.query)
61
62
  const style = computed(() => ({
62
63
  ...(sizeStyle.value !== null ? sizeStyle.value : {}),
63
64
  '--q-linear-progress-speed': `${ props.animationSpeed }ms`
@@ -70,7 +71,7 @@ export default createComponent({
70
71
  + (props.rounded === true ? ' rounded-borders' : '')
71
72
  )
72
73
 
73
- const trackStyle = computed(() => width(props.buffer !== void 0 ? props.buffer : 1, props.reverse, proxy.$q))
74
+ const trackStyle = computed(() => width(props.buffer !== void 0 ? props.buffer : 1, widthReverse.value, proxy.$q))
74
75
  const trackClass = computed(() =>
75
76
  'q-linear-progress__track absolute-full'
76
77
  + ` q-linear-progress__track--with${ props.instantFeedback === true ? 'out' : '' }-transition`
@@ -78,7 +79,7 @@ export default createComponent({
78
79
  + (props.trackColor !== void 0 ? ` bg-${ props.trackColor }` : '')
79
80
  )
80
81
 
81
- const modelStyle = computed(() => width(motion.value === true ? 1 : props.value, props.reverse, proxy.$q))
82
+ const modelStyle = computed(() => width(motion.value === true ? 1 : props.value, widthReverse.value, proxy.$q))
82
83
  const modelClass = computed(() =>
83
84
  'q-linear-progress__model absolute-full'
84
85
  + ` q-linear-progress__model--with${ props.instantFeedback === true ? 'out' : '' }-transition`
@@ -95,6 +95,9 @@ export default createComponent({
95
95
  class: classes.value,
96
96
  ...attrs.value
97
97
  }, props.options.map((opt, i) => {
98
+ // TODO: (Qv3) Make the 'opt' a separate property instead of
99
+ // the whole scope for consistency and flexibility
100
+ // (e.g. { opt } instead of opt)
98
101
  const child = slots[ 'label-' + i ] !== void 0
99
102
  ? () => slots[ 'label-' + i ](opt)
100
103
  : (
@@ -99,9 +99,32 @@
99
99
  "label": {
100
100
  "desc": "Generic slot for all labels",
101
101
  "scope": {
102
- "opt": {
102
+ "...self": {
103
103
  "type": "Object",
104
104
  "desc": "The corresponding option entry from the 'options' prop",
105
+ "definition": {
106
+ "label": {
107
+ "type": "String",
108
+ "desc": "Label to display along the component",
109
+ "required": true,
110
+ "examples": [ "Option 1", "Option 2", "Option 3" ]
111
+ },
112
+ "value": {
113
+ "type": "Any",
114
+ "desc": "Value of the option that will be used by the component model",
115
+ "required": true,
116
+ "examples": [ "op1", "op2", "op3" ]
117
+ },
118
+ "disable": {
119
+ "type": "Boolean",
120
+ "desc": "If true, the option will be disabled"
121
+ },
122
+ "...props": {
123
+ "type": "Any",
124
+ "desc": "Any other props from QToggle, QCheckbox, or QRadio",
125
+ "examples": [ "val=\"car\"", ":true-value=\"trueValue\"", "checked-icon=\"visibility\"" ]
126
+ }
127
+ },
105
128
  "__exemption": [ "examples" ]
106
129
  }
107
130
  },
@@ -111,9 +134,32 @@
111
134
  "label-[name]": {
112
135
  "desc": "Slot to define the specific label for the option at '[name]' where name is a 0-based index; Overrides the generic 'label' slot if used",
113
136
  "scope": {
114
- "...opt": {
137
+ "...self": {
115
138
  "type": "Object",
116
139
  "desc": "The corresponding option entry from the 'options' prop",
140
+ "definition": {
141
+ "label": {
142
+ "type": "String",
143
+ "desc": "Label to display along the component",
144
+ "required": true,
145
+ "examples": [ "Option 1", "Option 2", "Option 3" ]
146
+ },
147
+ "value": {
148
+ "type": "Any",
149
+ "desc": "Value of the option that will be used by the component model",
150
+ "required": true,
151
+ "examples": [ "op1", "op2", "op3" ]
152
+ },
153
+ "disable": {
154
+ "type": "Boolean",
155
+ "desc": "If true, the option will be disabled"
156
+ },
157
+ "...props": {
158
+ "type": "Any",
159
+ "desc": "Any other props from QToggle, QCheckbox, or QRadio",
160
+ "examples": [ "val=\"car\"", ":true-value=\"trueValue\"", "checked-icon=\"visibility\"" ]
161
+ }
162
+ },
117
163
  "__exemption": [ "examples" ]
118
164
  }
119
165
  },
@@ -60,8 +60,7 @@ export default createComponent({
60
60
 
61
61
  if (localScrollTarget === window) {
62
62
  containerTop = 0
63
- containerHeight = window.innerHeight
64
- containerBottom = containerHeight
63
+ containerBottom = containerHeight = window.innerHeight
65
64
  }
66
65
  else {
67
66
  containerTop = offset(localScrollTarget).top
@@ -103,6 +102,9 @@ export default createComponent({
103
102
  localScrollTarget.removeEventListener('scroll', updatePos, passive)
104
103
  window.removeEventListener('resize', resizeHandler, passive)
105
104
  localScrollTarget = void 0
105
+ setPos.cancel()
106
+ update.cancel()
107
+ resizeHandler.cancel()
106
108
  }
107
109
  }
108
110
 
@@ -6,6 +6,7 @@ import QBtn from '../btn/QBtn.js'
6
6
  import { createComponent } from '../../utils/private/create.js'
7
7
  import clone from '../../utils/clone.js'
8
8
  import { isDeepEqual } from '../../utils/private/is.js'
9
+ import { injectProp } from '../../utils/private/inject-obj-prop.js'
9
10
 
10
11
  export default createComponent({
11
12
  name: 'QPopupEdit',
@@ -65,11 +66,7 @@ export default createComponent({
65
66
  updatePosition
66
67
  }
67
68
 
68
- Object.defineProperty(acc, 'value', {
69
- get: () => currentModel.value,
70
- set: val => { currentModel.value = val }
71
- })
72
-
69
+ injectProp(acc, 'value', () => currentModel.value, val => { currentModel.value = val })
73
70
  return acc
74
71
  })
75
72
 
@@ -7,9 +7,10 @@
7
7
 
8
8
  "props": {
9
9
  "model-value": {
10
+ "extends": "model-value",
10
11
  "type": "Boolean",
11
12
  "desc": "Defines the state of the component (shown/hidden); Either use this property (along with a listener for 'update:modelValue' event) OR use v-model directive",
12
- "category": "model"
13
+ "required": false
13
14
  },
14
15
 
15
16
  "breakpoint": {
@@ -92,6 +92,7 @@ export default createComponent({
92
92
  const prop = { type: 'radio' }
93
93
 
94
94
  props.name !== void 0 && Object.assign(prop, {
95
+ '^checked': isTrue.value === true ? 'checked' : void 0,
95
96
  name: props.name,
96
97
  value: props.val
97
98
  })
@@ -99,13 +100,7 @@ export default createComponent({
99
100
  return prop
100
101
  })
101
102
 
102
- const formDomProps = computed(() => (
103
- props.name !== void 0 && isTrue.value === true
104
- ? { checked: true }
105
- : {}
106
- ))
107
-
108
- const injectFormInput = useFormInject(formAttrs, formDomProps)
103
+ const injectFormInput = useFormInject(formAttrs)
109
104
 
110
105
  function onClick (e) {
111
106
  if (e !== void 0) {