quasar 2.4.9 → 2.4.13

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 (182) hide show
  1. package/dist/api/BottomSheet.json +4 -0
  2. package/dist/api/Dialog.json +5 -1
  3. package/dist/api/LoadingBar.json +7 -0
  4. package/dist/api/Notify.json +20 -10
  5. package/dist/api/Platform.json +171 -0
  6. package/dist/api/QAjaxBar.json +13 -1
  7. package/dist/api/QBtnDropdown.json +4 -2
  8. package/dist/api/QEditor.json +4 -2
  9. package/dist/api/QExpansionItem.json +6 -3
  10. package/dist/api/QFab.json +4 -2
  11. package/dist/api/QFabAction.json +4 -2
  12. package/dist/api/QFile.json +5 -2
  13. package/dist/api/QImg.json +1 -2
  14. package/dist/api/QInnerLoading.json +2 -1
  15. package/dist/api/QInput.json +4 -2
  16. package/dist/api/QPagination.json +4 -2
  17. package/dist/api/QRange.json +9 -0
  18. package/dist/api/QScrollArea.json +13 -5
  19. package/dist/api/QSelect.json +6 -3
  20. package/dist/api/QSlider.json +9 -0
  21. package/dist/api/QSplitter.json +8 -4
  22. package/dist/api/QTable.json +9 -0
  23. package/dist/api/QTree.json +7 -0
  24. package/dist/api/QUploader.json +3 -1
  25. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  26. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  27. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  28. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  29. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  30. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  31. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  32. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  33. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  34. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  35. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  36. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  37. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  38. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  39. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  40. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  41. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  42. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  43. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  44. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  45. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  46. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  47. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  48. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  49. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  50. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  51. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  52. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  53. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  54. package/dist/icon-set/themify.umd.prod.js +1 -1
  55. package/dist/lang/ar.umd.prod.js +1 -1
  56. package/dist/lang/az-Latn.umd.prod.js +1 -1
  57. package/dist/lang/bg.umd.prod.js +1 -1
  58. package/dist/lang/bn.umd.prod.js +1 -1
  59. package/dist/lang/ca.umd.prod.js +1 -1
  60. package/dist/lang/cs.umd.prod.js +1 -1
  61. package/dist/lang/da.umd.prod.js +1 -1
  62. package/dist/lang/de.umd.prod.js +1 -1
  63. package/dist/lang/el.umd.prod.js +1 -1
  64. package/dist/lang/en-GB.umd.prod.js +1 -1
  65. package/dist/lang/en-US.umd.prod.js +1 -1
  66. package/dist/lang/eo.umd.prod.js +1 -1
  67. package/dist/lang/es.umd.prod.js +1 -1
  68. package/dist/lang/et.umd.prod.js +1 -1
  69. package/dist/lang/fa-IR.umd.prod.js +1 -1
  70. package/dist/lang/fa.umd.prod.js +1 -1
  71. package/dist/lang/fi.umd.prod.js +1 -1
  72. package/dist/lang/fr.umd.prod.js +1 -1
  73. package/dist/lang/gn.umd.prod.js +1 -1
  74. package/dist/lang/he.umd.prod.js +1 -1
  75. package/dist/lang/hr.umd.prod.js +1 -1
  76. package/dist/lang/hu.umd.prod.js +1 -1
  77. package/dist/lang/id.umd.prod.js +1 -1
  78. package/dist/lang/is.umd.prod.js +1 -1
  79. package/dist/lang/it.umd.prod.js +1 -1
  80. package/dist/lang/ja.umd.prod.js +1 -1
  81. package/dist/lang/km.umd.prod.js +1 -1
  82. package/dist/lang/ko-KR.umd.prod.js +1 -1
  83. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  84. package/dist/lang/lt.umd.prod.js +1 -1
  85. package/dist/lang/lu.umd.prod.js +1 -1
  86. package/dist/lang/lv.umd.prod.js +1 -1
  87. package/dist/lang/ml.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/sr-CYR.umd.prod.js +1 -1
  100. package/dist/lang/sr.umd.prod.js +1 -1
  101. package/dist/lang/sv.umd.prod.js +1 -1
  102. package/dist/lang/ta.umd.prod.js +1 -1
  103. package/dist/lang/th.umd.prod.js +1 -1
  104. package/dist/lang/tr.umd.prod.js +1 -1
  105. package/dist/lang/ug.umd.prod.js +1 -1
  106. package/dist/lang/uk.umd.prod.js +1 -1
  107. package/dist/lang/vi.umd.prod.js +1 -1
  108. package/dist/lang/zh-CN.umd.prod.js +1 -1
  109. package/dist/lang/zh-TW.umd.prod.js +1 -1
  110. package/dist/quasar.cjs.prod.js +2 -2
  111. package/dist/quasar.css +8 -1
  112. package/dist/quasar.esm.prod.js +2 -2
  113. package/dist/quasar.prod.css +1 -1
  114. package/dist/quasar.rtl.css +8 -1
  115. package/dist/quasar.rtl.prod.css +1 -1
  116. package/dist/quasar.sass +7 -1
  117. package/dist/quasar.umd.js +193 -92
  118. package/dist/quasar.umd.prod.js +2 -2
  119. package/dist/ssr-directives/Morph.js +1 -1
  120. package/dist/types/api/qfile.d.ts +8 -0
  121. package/dist/types/api/qselect.d.ts +4 -0
  122. package/dist/types/api/qtable.d.ts +12 -0
  123. package/dist/types/api/qtree.d.ts +31 -0
  124. package/dist/types/api/quploader.d.ts +28 -0
  125. package/dist/types/api/slider.d.ts +6 -7
  126. package/dist/types/api/touchswipe.d.ts +11 -0
  127. package/dist/types/api/validation.d.ts +1 -1
  128. package/dist/types/api/vue-prop-types.ts +15 -0
  129. package/dist/types/api.d.ts +7 -0
  130. package/dist/types/index.d.ts +426 -415
  131. package/dist/types/ts-helpers.d.ts +6 -2
  132. package/dist/types/utils/dom.d.ts +4 -2
  133. package/dist/types/utils.d.ts +7 -2
  134. package/dist/vetur/quasar-attributes.json +34 -30
  135. package/dist/vetur/quasar-tags.json +1 -0
  136. package/dist/web-types/web-types.json +41 -31
  137. package/package.json +1 -1
  138. package/src/components/ajax-bar/QAjaxBar.js +22 -12
  139. package/src/components/ajax-bar/QAjaxBar.json +16 -1
  140. package/src/components/btn-dropdown/QBtnDropdown.json +4 -2
  141. package/src/components/date/QDate.js +6 -1
  142. package/src/components/dialog/QDialog.js +1 -1
  143. package/src/components/dialog-plugin/DialogPlugin.js +1 -1
  144. package/src/components/editor/QEditor.js +1 -1
  145. package/src/components/editor/QEditor.json +3 -1
  146. package/src/components/expansion-item/QExpansionItem.json +6 -3
  147. package/src/components/fab/use-fab.json +4 -2
  148. package/src/components/file/QFile.json +4 -2
  149. package/src/components/form/QForm.js +12 -2
  150. package/src/components/img/QImg.json +2 -3
  151. package/src/components/infinite-scroll/QInfiniteScroll.js +3 -2
  152. package/src/components/inner-loading/QInnerLoading.json +2 -1
  153. package/src/components/input/QInput.js +1 -1
  154. package/src/components/input/QInput.json +4 -2
  155. package/src/components/menu/QMenu.js +2 -1
  156. package/src/components/pagination/QPagination.json +4 -2
  157. package/src/components/scroll-area/QScrollArea.js +21 -1
  158. package/src/components/scroll-area/QScrollArea.json +13 -5
  159. package/src/components/select/QSelect.js +32 -27
  160. package/src/components/select/QSelect.json +6 -3
  161. package/src/components/select/QSelect.sass +4 -0
  162. package/src/components/slider/use-slider.json +9 -0
  163. package/src/components/splitter/QSplitter.json +8 -4
  164. package/src/components/stepper/QStep.js +19 -14
  165. package/src/components/stepper/QStepper.sass +3 -0
  166. package/src/components/table/QTable.json +9 -0
  167. package/src/components/tabs/QTabs.js +10 -2
  168. package/src/components/tree/QTree.js +8 -1
  169. package/src/components/tree/QTree.json +8 -0
  170. package/src/components/uploader/uploader-core.js +2 -0
  171. package/src/components/uploader/xhr-uploader-plugin.json +2 -1
  172. package/src/components/virtual-scroll/use-virtual-scroll.js +20 -9
  173. package/src/composables/private/use-field.js +16 -9
  174. package/src/composables/private/use-file.json +1 -0
  175. package/src/plugins/BottomSheet.json +1 -0
  176. package/src/plugins/Dialog.json +1 -0
  177. package/src/plugins/LoadingBar.js +3 -3
  178. package/src/plugins/LoadingBar.json +8 -0
  179. package/src/plugins/Notify.json +20 -10
  180. package/src/plugins/Platform.js +15 -8
  181. package/src/plugins/Platform.json +166 -0
  182. package/src/utils/private/global-dialog.json +3 -0
@@ -119,7 +119,7 @@ export default createComponent({
119
119
  const onScreen = ref(false)
120
120
  const animate = ref(true)
121
121
 
122
- let calls = 0, timer, speed
122
+ let sessions = 0, timer, speed
123
123
 
124
124
  const classes = computed(() =>
125
125
  `q-loading-bar q-loading-bar--${ props.position }`
@@ -165,16 +165,17 @@ export default createComponent({
165
165
  const oldSpeed = speed
166
166
  speed = Math.max(0, newSpeed) || 0
167
167
 
168
- calls++
168
+ sessions++
169
169
 
170
- if (calls > 1) {
170
+ if (sessions > 1) {
171
171
  if (oldSpeed === 0 && newSpeed > 0) {
172
172
  planNextStep()
173
173
  }
174
174
  else if (oldSpeed > 0 && newSpeed <= 0) {
175
175
  clearTimeout(timer)
176
176
  }
177
- return
177
+
178
+ return sessions
178
179
  }
179
180
 
180
181
  clearTimeout(timer)
@@ -182,25 +183,32 @@ export default createComponent({
182
183
 
183
184
  progress.value = 0
184
185
 
185
- if (onScreen.value === true) { return }
186
-
187
- onScreen.value = true
188
- animate.value = false
189
186
  timer = setTimeout(() => {
190
187
  animate.value = true
191
188
  newSpeed > 0 && planNextStep()
192
- }, 100)
189
+ }, onScreen.value === true ? 500 : 1)
190
+
191
+ if (onScreen.value !== true) {
192
+ onScreen.value = true
193
+ animate.value = false
194
+ }
195
+
196
+ return sessions
193
197
  }
194
198
 
195
199
  function increment (amount) {
196
- if (calls > 0) {
200
+ if (sessions > 0) {
197
201
  progress.value = inc(progress.value, amount)
198
202
  }
203
+
204
+ return sessions
199
205
  }
200
206
 
201
207
  function stop () {
202
- calls = Math.max(0, calls - 1)
203
- if (calls > 0) { return }
208
+ sessions = Math.max(0, sessions - 1)
209
+ if (sessions > 0) {
210
+ return sessions
211
+ }
204
212
 
205
213
  clearTimeout(timer)
206
214
  emit('stop')
@@ -219,6 +227,8 @@ export default createComponent({
219
227
  else {
220
228
  end()
221
229
  }
230
+
231
+ return sessions
222
232
  }
223
233
 
224
234
  function planNextStep () {
@@ -73,6 +73,11 @@
73
73
  "desc": "Delay (in milliseconds) between progress auto-increments; If delay is 0 then it disables auto-incrementing",
74
74
  "examples": [ 400, 0 ]
75
75
  }
76
+ },
77
+ "returns": {
78
+ "type": "Number",
79
+ "desc": "Number of active simultaneous sessions",
80
+ "__exemption": [ "examples" ]
76
81
  }
77
82
  },
78
83
 
@@ -84,11 +89,21 @@
84
89
  "desc": "Amount (0 < x <= 100) to increment with",
85
90
  "examples": [ 1 ]
86
91
  }
92
+ },
93
+ "returns": {
94
+ "type": "Number",
95
+ "desc": "Number of active simultaneous sessions",
96
+ "__exemption": [ "examples" ]
87
97
  }
88
98
  },
89
99
 
90
100
  "stop": {
91
- "desc": "Notify bar that one process you were waiting has finished"
101
+ "desc": "Notify bar that one process you were waiting has finished",
102
+ "returns": {
103
+ "type": "Number",
104
+ "desc": "Number of active simultaneous sessions",
105
+ "__exemption": [ "examples" ]
106
+ }
92
107
  }
93
108
  }
94
109
  }
@@ -43,7 +43,8 @@
43
43
  },
44
44
 
45
45
  "content-style": {
46
- "type": [ "Array", "String", "Object" ],
46
+ "type": [ "String", "Array", "Object" ],
47
+ "tsType": "VueStyleProp",
47
48
  "desc": "Style definitions to be attributed to the menu",
48
49
  "examples": [
49
50
  "background-color: #ff0000",
@@ -53,7 +54,8 @@
53
54
  },
54
55
 
55
56
  "content-class": {
56
- "type": [ "Array", "String", "Object" ],
57
+ "type": [ "String", "Array", "Object" ],
58
+ "tsType": "VueClassProp",
57
59
  "desc": "Class definitions to be attributed to the menu",
58
60
  "examples": [
59
61
  "my-special-class",
@@ -153,7 +153,12 @@ export default createComponent({
153
153
  normalizedModel.value
154
154
  .filter(date => typeof date === 'string')
155
155
  .map(date => decodeString(date, innerMask.value, innerLocale.value))
156
- .filter(date => date.dateHash !== null)
156
+ .filter(date =>
157
+ date.dateHash !== null
158
+ && date.day !== null
159
+ && date.month !== null
160
+ && date.year !== null
161
+ )
157
162
  )
158
163
 
159
164
  const rangeModel = computed(() => {
@@ -257,7 +257,7 @@ export default createComponent({
257
257
  }
258
258
 
259
259
  node = node.querySelector('[autofocus], [data-autofocus]') || node
260
- node.focus()
260
+ node.focus({ preventScroll: true })
261
261
  })
262
262
  }
263
263
 
@@ -144,8 +144,8 @@ export default createComponent({
144
144
  color: vmColor.value,
145
145
  label: okLabel.value,
146
146
  ripple: false,
147
- ...(Object(props.ok) === props.ok ? props.ok : { flat: true }),
148
147
  disable: okDisabled.value,
148
+ ...(Object(props.ok) === props.ok ? props.ok : { flat: true }),
149
149
  'data-autofocus': (props.focus === 'ok' && hasForm.value !== true) || void 0,
150
150
  onClick: onOk
151
151
  }))
@@ -454,7 +454,7 @@ export default createComponent({
454
454
 
455
455
  function focus () {
456
456
  addFocusFn(() => {
457
- contentRef.value !== null && contentRef.value.focus()
457
+ contentRef.value !== null && contentRef.value.focus({ preventScroll: true })
458
458
  })
459
459
  }
460
460
 
@@ -227,13 +227,15 @@
227
227
 
228
228
  "content-style": {
229
229
  "type": "Object",
230
+ "tsType": "VueStyleObjectProp",
230
231
  "desc": "Object with CSS properties and values for styling the container of QEditor",
231
232
  "examples": [ ":content-style=\"{ backgroundColor: '#C0C0C0' }\"" ],
232
233
  "category": "style"
233
234
  },
234
235
 
235
236
  "content-class": {
236
- "type": [ "Object", "Array", "String" ],
237
+ "type": [ "String", "Array", "Object" ],
238
+ "tsType": "VueClassProp",
237
239
  "desc": "CSS classes for the input area",
238
240
  "examples": [
239
241
  "my-special-class",
@@ -26,7 +26,8 @@
26
26
  },
27
27
 
28
28
  "expand-icon-class": {
29
- "type": [ "Array", "String", "Object" ],
29
+ "type": [ "String", "Array", "Object" ],
30
+ "tsType": "VueClassProp",
30
31
  "desc": "Apply custom class(es) to the expand icon item section",
31
32
  "examples": [ "text-purple" ],
32
33
  "category": "style"
@@ -134,7 +135,8 @@
134
135
  },
135
136
 
136
137
  "header-style": {
137
- "type": [ "Array", "String", "Object" ],
138
+ "type": [ "String", "Array", "Object" ],
139
+ "tsType": "VueStyleProp",
138
140
  "desc": "Apply custom style to the header",
139
141
  "examples": [
140
142
  "background: '#ff0000'",
@@ -144,7 +146,8 @@
144
146
  },
145
147
 
146
148
  "header-class": {
147
- "type": [ "Array", "String", "Object" ],
149
+ "type": [ "String", "Array", "Object" ],
150
+ "tsType": "VueClassProp",
148
151
  "desc": "Apply custom class(es) to the header",
149
152
  "examples": [
150
153
  "my-custom-class",
@@ -87,7 +87,8 @@
87
87
  },
88
88
 
89
89
  "label-class": {
90
- "type": [ "Array", "String", "Object" ],
90
+ "type": [ "String", "Array", "Object" ],
91
+ "tsType": "VueClassProp",
91
92
  "desc": "Class definitions to be attributed to the label container",
92
93
  "examples": [
93
94
  "my-special-class",
@@ -97,7 +98,8 @@
97
98
  },
98
99
 
99
100
  "label-style": {
100
- "type": [ "Array", "String", "Object" ],
101
+ "type": [ "String", "Array", "Object" ],
102
+ "tsType": "VueStyleProp",
101
103
  "desc": "Style definitions to be attributed to the label container",
102
104
  "examples": [
103
105
  "background-color: #ff0000",
@@ -77,7 +77,8 @@
77
77
  },
78
78
 
79
79
  "input-class": {
80
- "type": [ "Array", "String", "Object" ],
80
+ "type": [ "String", "Array", "Object" ],
81
+ "tsType": "VueClassProp",
81
82
  "desc": "Class definitions to be attributed to the underlying selection container",
82
83
  "examples": [
83
84
  "my-special-class",
@@ -87,7 +88,8 @@
87
88
  },
88
89
 
89
90
  "input-style": {
90
- "type": [ "Array", "String", "Object" ],
91
+ "type": [ "String", "Array", "Object" ],
92
+ "tsType": "VueStyleProp",
91
93
  "desc": "Style definitions to be attributed to the underlying selection container",
92
94
  "examples": [
93
95
  "background-color: #ff0000",
@@ -1,4 +1,4 @@
1
- import { h, ref, onMounted, getCurrentInstance, nextTick, provide } from 'vue'
1
+ import { h, ref, onActivated, onDeactivated, onMounted, getCurrentInstance, nextTick, provide } from 'vue'
2
2
 
3
3
  import { createComponent } from '../../utils/private/create.js'
4
4
  import { stopAndPrevent } from '../../utils/event.js'
@@ -144,7 +144,7 @@ export default createComponent({
144
144
  const target = rootRef.value.querySelector('[autofocus], [data-autofocus]')
145
145
  || Array.prototype.find.call(rootRef.value.querySelectorAll('[tabindex]'), el => el.tabIndex > -1)
146
146
 
147
- target !== null && target !== void 0 && target.focus()
147
+ target !== null && target !== void 0 && target.focus({ preventScroll: true })
148
148
  })
149
149
  }
150
150
 
@@ -161,6 +161,16 @@ export default createComponent({
161
161
  }
162
162
  })
163
163
 
164
+ let shouldActivate = false
165
+
166
+ onDeactivated(() => {
167
+ shouldActivate = true
168
+ })
169
+
170
+ onActivated(() => {
171
+ shouldActivate === true && props.autofocus === true && focus()
172
+ })
173
+
164
174
  onMounted(() => {
165
175
  props.autofocus === true && focus()
166
176
  })
@@ -53,13 +53,11 @@
53
53
  },
54
54
 
55
55
  "ratio": {
56
- "type": [ "String", "Number" ],
57
56
  "desc": "Force the component to maintain an aspect ratio",
58
57
  "examples": [
59
58
  "(Number format) :ratio=\"16/9\"",
60
59
  "(String format) ratio=\"1\""
61
- ],
62
- "category": "style"
60
+ ]
63
61
  },
64
62
 
65
63
  "initial-ratio": {
@@ -162,6 +160,7 @@
162
160
 
163
161
  "img-style": {
164
162
  "type": "Object",
163
+ "tsType": "VueStyleObjectProp",
165
164
  "desc": "Apply CSS to the native img element",
166
165
  "examples": [ ":img-style=\"{ transform: 'rotate(45deg)' }\" "],
167
166
  "category": "style"
@@ -41,7 +41,6 @@ export default createComponent({
41
41
  const rootRef = ref(null)
42
42
 
43
43
  let index = props.initialIndex || 0
44
- let scrollPos = false
45
44
  let localScrollTarget, poll
46
45
 
47
46
  const classes = computed(() =>
@@ -180,8 +179,10 @@ export default createComponent({
180
179
  watch(() => props.scrollTarget, updateScrollTarget)
181
180
  watch(() => props.debounce, setDebounce)
182
181
 
182
+ let scrollPos = false
183
+
183
184
  onActivated(() => {
184
- if (localScrollTarget && scrollPos !== false) {
185
+ if (scrollPos !== false && localScrollTarget) {
185
186
  setVerticalScrollPosition(localScrollTarget, scrollPos)
186
187
  }
187
188
  })
@@ -41,7 +41,8 @@
41
41
  },
42
42
 
43
43
  "label-style": {
44
- "type": [ "Array", "String", "Object" ],
44
+ "type": [ "String", "Array", "Object" ],
45
+ "tsType": "VueStyleProp",
45
46
  "desc": "Apply custom style to the label; Works along the 'label' prop only",
46
47
  "examples": [
47
48
  "font-size: 28px",
@@ -177,7 +177,7 @@ export default createComponent({
177
177
  && inputRef.value !== el
178
178
  && (el === null || el.id !== state.targetUid.value)
179
179
  ) {
180
- inputRef.value.focus()
180
+ inputRef.value.focus({ preventScroll: true })
181
181
  }
182
182
  })
183
183
  }
@@ -53,7 +53,8 @@
53
53
  },
54
54
 
55
55
  "input-class": {
56
- "type": [ "Array", "String", "Object" ],
56
+ "type": [ "String", "Array", "Object" ],
57
+ "tsType": "VueClassProp",
57
58
  "desc": "Class definitions to be attributed to the underlying input tag",
58
59
  "examples": [
59
60
  "my-special-class",
@@ -63,7 +64,8 @@
63
64
  },
64
65
 
65
66
  "input-style": {
66
- "type": [ "Array", "String", "Object" ],
67
+ "type": [ "String", "Array", "Object" ],
68
+ "tsType": "VueStyleProp",
67
69
  "desc": "Style definitions to be attributed to the underlying input tag",
68
70
  "examples": [
69
71
  "background-color: #ff0000",
@@ -181,7 +181,7 @@ export default createComponent({
181
181
 
182
182
  if (node && node.contains(document.activeElement) !== true) {
183
183
  node = node.querySelector('[autofocus], [data-autofocus]') || node
184
- node.focus()
184
+ node.focus({ preventScroll: true })
185
185
  }
186
186
  })
187
187
  }
@@ -309,6 +309,7 @@ export default createComponent({
309
309
  // the focus is not in a vue child component
310
310
  if (
311
311
  handlesFocus.value === true
312
+ && props.noFocus !== true
312
313
  && childHasFocus(innerRef.value, evt.target) !== true
313
314
  ) {
314
315
  focus()
@@ -51,7 +51,8 @@
51
51
  },
52
52
 
53
53
  "input-style": {
54
- "type": [ "Array", "String", "Object" ],
54
+ "type": [ "String", "Array", "Object" ],
55
+ "tsType": "VueStyleProp",
55
56
  "desc": "Style definitions to be attributed to the input (if using one)",
56
57
  "examples": [
57
58
  "background-color: #ff0000",
@@ -61,7 +62,8 @@
61
62
  },
62
63
 
63
64
  "input-class": {
64
- "type": [ "Array", "String", "Object" ],
65
+ "type": [ "String", "Array", "Object" ],
66
+ "tsType": "VueClassProp",
65
67
  "desc": "Class definitions to be attributed to the input (if using one)",
66
68
  "examples": [
67
69
  "my-special-class",
@@ -1,4 +1,4 @@
1
- import { h, ref, computed, withDirectives, onBeforeUnmount, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, withDirectives, onActivated, onDeactivated, onBeforeUnmount, getCurrentInstance } from 'vue'
2
2
 
3
3
  import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
4
4
 
@@ -380,6 +380,26 @@ export default createComponent({
380
380
  }
381
381
  })
382
382
 
383
+ let scrollPosition = null
384
+
385
+ onDeactivated(() => {
386
+ scrollPosition = {
387
+ top: scroll.vertical.position.value,
388
+ left: scroll.horizontal.position.value
389
+ }
390
+ })
391
+
392
+ onActivated(() => {
393
+ if (scrollPosition === null) { return }
394
+
395
+ const scrollTarget = targetRef.value
396
+
397
+ if (scrollTarget !== null) {
398
+ setHorizontalScrollPosition(scrollTarget, scrollPosition.left)
399
+ setVerticalScrollPosition(scrollTarget, scrollPosition.top)
400
+ }
401
+ })
402
+
383
403
  onBeforeUnmount(emitScroll.cancel)
384
404
 
385
405
  return () => {
@@ -9,21 +9,24 @@
9
9
  },
10
10
 
11
11
  "bar-style": {
12
- "type": [ "Array", "String", "Object"],
12
+ "type": [ "String", "Array", "Object" ],
13
+ "tsType": "VueStyleProp",
13
14
  "desc": "Object with CSS properties and values for custom styling the scrollbars (both vertical and horizontal)",
14
15
  "examples": [ ":bar-style=\"{ borderRadius: '5px', background: 'red', opacity: 1 }\"" ],
15
16
  "category": "style"
16
17
  },
17
18
 
18
19
  "vertical-bar-style": {
19
- "type": [ "Array", "String", "Object"],
20
+ "type": [ "String", "Array", "Object" ],
21
+ "tsType": "VueStyleProp",
20
22
  "desc": "Object with CSS properties and values for custom styling the vertical scrollbar; Is applied on top of 'bar-style' prop",
21
23
  "examples": [ ":bar-style=\"{ right: '4px', borderRadius: '5px', background: 'red', width: '10px', opacity: 1 }\"" ],
22
24
  "category": "style"
23
25
  },
24
26
 
25
27
  "horizontal-bar-style": {
26
- "type": [ "Array", "String", "Object"],
28
+ "type": [ "String", "Array", "Object" ],
29
+ "tsType": "VueStyleProp",
27
30
  "desc": "Object with CSS properties and values for custom styling the horizontal scrollbar; Is applied on top of 'bar-style' prop",
28
31
  "examples": [ ":bar-style=\"{ bottom: '4px', borderRadius: '5px', background: 'red', height: '10px', opacity: 1 }\"" ],
29
32
  "category": "style"
@@ -31,6 +34,7 @@
31
34
 
32
35
  "thumb-style": {
33
36
  "type": "Object",
37
+ "tsType": "VueStyleObjectProp",
34
38
  "desc": "Object with CSS properties and values for custom styling the thumb of scrollbars (both vertical and horizontal)",
35
39
  "examples": [ ":thumb-style=\"{ right: '4px', borderRadius: '5px', background: 'red', width: '10px', opacity: 1 }\"" ],
36
40
  "category": "style"
@@ -38,6 +42,7 @@
38
42
 
39
43
  "vertical-thumb-style": {
40
44
  "type": "Object",
45
+ "tsType": "VueStyleObjectProp",
41
46
  "desc": "Object with CSS properties and values for custom styling the thumb of the vertical scrollbar; Is applied on top of 'thumb-style' prop",
42
47
  "examples": [ ":thumb-style=\"{ right: '4px', borderRadius: '5px', background: 'red', width: '10px', opacity: 1 }\"" ],
43
48
  "category": "style"
@@ -45,20 +50,23 @@
45
50
 
46
51
  "horizontal-thumb-style": {
47
52
  "type": "Object",
53
+ "tsType": "VueStyleObjectProp",
48
54
  "desc": "Object with CSS properties and values for custom styling the thumb of the horizontal scrollbar; Is applied on top of 'thumb-style' prop",
49
55
  "examples": [ ":thumb-style=\"{ bottom: '4px', borderRadius: '5px', background: 'red', height: '10px', opacity: 1 }\"" ],
50
56
  "category": "style"
51
57
  },
52
58
 
53
59
  "content-style": {
54
- "type": [ "Array", "String", "Object"],
60
+ "type": [ "String", "Array", "Object" ],
61
+ "tsType": "VueStyleProp",
55
62
  "desc": "Object with CSS properties and values for styling the container of QScrollArea",
56
63
  "examples": [ ":content-style=\"{ backgroundColor: '#C0C0C0' }\"" ],
57
64
  "category": "style"
58
65
  },
59
66
 
60
67
  "content-active-style": {
61
- "type": [ "Array", "String", "Object"],
68
+ "type": [ "String", "Array", "Object" ],
69
+ "tsType": "VueStyleProp",
62
70
  "desc": "Object with CSS properties and values for styling the container of QScrollArea when scroll area becomes active (is mouse hovered)",
63
71
  "examples": [ ":content-active-style=\"{ backgroundColor: 'white' }\"" ],
64
72
  "category": "style"
@@ -610,8 +610,12 @@ export default createComponent({
610
610
  return innerOptionsValue.value.find(v => isDeepEqual(v, val)) !== void 0
611
611
  }
612
612
 
613
- function selectInputText () {
614
- if (props.useInput === true && targetRef.value !== null) {
613
+ function selectInputText (e) {
614
+ if (
615
+ props.useInput === true
616
+ && targetRef.value !== null
617
+ && (e === void 0 || (targetRef.value === e.target && e.target.value === selectedString.value))
618
+ ) {
615
619
  targetRef.value.select()
616
620
  }
617
621
  }
@@ -644,34 +648,34 @@ export default createComponent({
644
648
 
645
649
  if (typeof value === 'string' && value.length > 0) {
646
650
  const needle = value.toLocaleLowerCase()
651
+ const findFn = extractFn => {
652
+ const option = props.options.find(opt => extractFn.value(opt).toLocaleLowerCase() === needle)
647
653
 
648
- let fn = opt => getOptionValue.value(opt).toLocaleLowerCase() === needle
649
- let option = props.options.find(fn)
654
+ if (option === void 0) {
655
+ return false
656
+ }
650
657
 
651
- if (option !== void 0) {
652
658
  if (innerValue.value.indexOf(option) === -1) {
653
659
  toggleOption(option)
654
660
  }
655
661
  else {
656
662
  hidePopup()
657
663
  }
658
- }
659
- else {
660
- fn = opt => getOptionLabel.value(opt).toLocaleLowerCase() === needle
661
- option = props.options.find(fn)
662
664
 
663
- if (option !== void 0) {
664
- if (innerValue.value.indexOf(option) === -1) {
665
- toggleOption(option)
666
- }
667
- else {
668
- hidePopup()
669
- }
665
+ return true
666
+ }
667
+ const fillFn = afterFilter => {
668
+ if (findFn(getOptionValue) === true) {
669
+ return
670
670
  }
671
- else {
672
- filter(value, true)
671
+ if (findFn(getOptionLabel) === true || afterFilter === true) {
672
+ return
673
673
  }
674
+
675
+ filter(value, true, () => fillFn(true))
674
676
  }
677
+
678
+ fillFn()
675
679
  }
676
680
  else {
677
681
  state.clearValue(e)
@@ -981,7 +985,7 @@ export default createComponent({
981
985
  type: 'search',
982
986
  ...comboboxAttrs.value,
983
987
  ...state.splitAttrs.attributes.value,
984
- id: state.targetUid.value,
988
+ id: isTarget === true ? state.targetUid.value : void 0,
985
989
  maxlength: props.maxlength,
986
990
  autocomplete: props.autocomplete,
987
991
  'data-autofocus': (fromDialog !== true && props.autofocus === true) || void 0,
@@ -992,7 +996,7 @@ export default createComponent({
992
996
 
993
997
  if (fromDialog !== true && hasDialog === true) {
994
998
  if (Array.isArray(data.class) === true) {
995
- data.class[ 0 ] += ' no-pointer-events'
999
+ data.class = [ ...data.class, 'no-pointer-events' ]
996
1000
  }
997
1001
  else {
998
1002
  data.class += ' no-pointer-events'
@@ -1050,7 +1054,7 @@ export default createComponent({
1050
1054
  }
1051
1055
  }
1052
1056
 
1053
- function filter (val, keepClosed) {
1057
+ function filter (val, keepClosed, afterUpdateFn) {
1054
1058
  if (props.onFilter === void 0 || (keepClosed !== true && state.focused.value !== true)) {
1055
1059
  return
1056
1060
  }
@@ -1108,6 +1112,7 @@ export default createComponent({
1108
1112
  }
1109
1113
 
1110
1114
  typeof afterFn === 'function' && nextTick(() => { afterFn(proxy) })
1115
+ typeof afterUpdateFn === 'function' && nextTick(() => { afterUpdateFn(proxy) })
1111
1116
  })
1112
1117
  }
1113
1118
  },
@@ -1457,13 +1462,13 @@ export default createComponent({
1457
1462
  child.push(getInput(fromDialog, isTarget))
1458
1463
  }
1459
1464
  // there can be only one (when dialog is opened the control in dialog should be target)
1460
- else if (state.editable.value === true && isTarget === true) {
1465
+ else if (state.editable.value === true) {
1461
1466
  child.push(
1462
1467
  h('div', {
1463
- ref: targetRef,
1468
+ ref: isTarget === true ? targetRef : void 0,
1464
1469
  key: 'd_t',
1465
- class: 'no-outline',
1466
- id: state.targetUid.value,
1470
+ class: 'q-select__focus-target',
1471
+ id: isTarget === true ? state.targetUid.value : void 0,
1467
1472
  ...comboboxAttrs.value,
1468
1473
  onKeydown: onTargetKeydown,
1469
1474
  onKeyup: onTargetKeyup,
@@ -1471,10 +1476,10 @@ export default createComponent({
1471
1476
  })
1472
1477
  )
1473
1478
 
1474
- if (typeof props.autocomplete === 'string' && props.autocomplete.length > 0) {
1479
+ if (isTarget === true && typeof props.autocomplete === 'string' && props.autocomplete.length > 0) {
1475
1480
  child.push(
1476
1481
  h('input', {
1477
- class: 'q-select__autocomplete-input no-outline',
1482
+ class: 'q-select__autocomplete-input',
1478
1483
  autocomplete: props.autocomplete,
1479
1484
  onKeyup: onTargetAutocomplete
1480
1485
  })