quasar 2.4.11 → 2.4.12

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 (108) hide show
  1. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  2. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  3. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  4. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  5. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  6. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  7. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  8. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  9. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  10. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  11. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  12. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  13. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  14. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  15. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  16. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  17. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  18. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  19. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  20. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  21. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  22. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  23. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  24. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  25. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  26. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  27. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  28. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  29. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  30. package/dist/icon-set/themify.umd.prod.js +1 -1
  31. package/dist/lang/ar.umd.prod.js +1 -1
  32. package/dist/lang/az-Latn.umd.prod.js +1 -1
  33. package/dist/lang/bg.umd.prod.js +1 -1
  34. package/dist/lang/bn.umd.prod.js +1 -1
  35. package/dist/lang/ca.umd.prod.js +1 -1
  36. package/dist/lang/cs.umd.prod.js +1 -1
  37. package/dist/lang/da.umd.prod.js +1 -1
  38. package/dist/lang/de.umd.prod.js +1 -1
  39. package/dist/lang/el.umd.prod.js +1 -1
  40. package/dist/lang/en-GB.umd.prod.js +1 -1
  41. package/dist/lang/en-US.umd.prod.js +1 -1
  42. package/dist/lang/eo.umd.prod.js +1 -1
  43. package/dist/lang/es.umd.prod.js +1 -1
  44. package/dist/lang/et.umd.prod.js +1 -1
  45. package/dist/lang/fa-IR.umd.prod.js +1 -1
  46. package/dist/lang/fa.umd.prod.js +1 -1
  47. package/dist/lang/fi.umd.prod.js +1 -1
  48. package/dist/lang/fr.umd.prod.js +1 -1
  49. package/dist/lang/gn.umd.prod.js +1 -1
  50. package/dist/lang/he.umd.prod.js +1 -1
  51. package/dist/lang/hr.umd.prod.js +1 -1
  52. package/dist/lang/hu.umd.prod.js +1 -1
  53. package/dist/lang/id.umd.prod.js +1 -1
  54. package/dist/lang/is.umd.prod.js +1 -1
  55. package/dist/lang/it.umd.prod.js +1 -1
  56. package/dist/lang/ja.umd.prod.js +1 -1
  57. package/dist/lang/km.umd.prod.js +1 -1
  58. package/dist/lang/ko-KR.umd.prod.js +1 -1
  59. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  60. package/dist/lang/lt.umd.prod.js +1 -1
  61. package/dist/lang/lu.umd.prod.js +1 -1
  62. package/dist/lang/lv.umd.prod.js +1 -1
  63. package/dist/lang/ml.umd.prod.js +1 -1
  64. package/dist/lang/ms.umd.prod.js +1 -1
  65. package/dist/lang/my.umd.prod.js +1 -1
  66. package/dist/lang/nb-NO.umd.prod.js +1 -1
  67. package/dist/lang/nl.umd.prod.js +1 -1
  68. package/dist/lang/pl.umd.prod.js +1 -1
  69. package/dist/lang/pt-BR.umd.prod.js +1 -1
  70. package/dist/lang/pt.umd.prod.js +1 -1
  71. package/dist/lang/ro.umd.prod.js +1 -1
  72. package/dist/lang/ru.umd.prod.js +1 -1
  73. package/dist/lang/sk.umd.prod.js +1 -1
  74. package/dist/lang/sl.umd.prod.js +1 -1
  75. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  76. package/dist/lang/sr.umd.prod.js +1 -1
  77. package/dist/lang/sv.umd.prod.js +1 -1
  78. package/dist/lang/ta.umd.prod.js +1 -1
  79. package/dist/lang/th.umd.prod.js +1 -1
  80. package/dist/lang/tr.umd.prod.js +1 -1
  81. package/dist/lang/ug.umd.prod.js +1 -1
  82. package/dist/lang/uk.umd.prod.js +1 -1
  83. package/dist/lang/vi.umd.prod.js +1 -1
  84. package/dist/lang/zh-CN.umd.prod.js +1 -1
  85. package/dist/lang/zh-TW.umd.prod.js +1 -1
  86. package/dist/quasar.cjs.prod.js +2 -2
  87. package/dist/quasar.css +5 -0
  88. package/dist/quasar.esm.prod.js +2 -2
  89. package/dist/quasar.prod.css +1 -1
  90. package/dist/quasar.rtl.css +5 -0
  91. package/dist/quasar.rtl.prod.css +1 -1
  92. package/dist/quasar.sass +4 -1
  93. package/dist/quasar.umd.js +47 -39
  94. package/dist/quasar.umd.prod.js +2 -2
  95. package/dist/ssr-directives/Morph.js +1 -1
  96. package/dist/web-types/web-types.json +1 -1
  97. package/package.json +1 -1
  98. package/src/components/dialog/QDialog.js +1 -1
  99. package/src/components/editor/QEditor.js +1 -1
  100. package/src/components/form/QForm.js +1 -1
  101. package/src/components/input/QInput.js +1 -1
  102. package/src/components/menu/QMenu.js +2 -1
  103. package/src/components/select/QSelect.js +12 -8
  104. package/src/components/select/QSelect.sass +1 -0
  105. package/src/components/stepper/QStep.js +19 -14
  106. package/src/components/stepper/QStepper.sass +3 -0
  107. package/src/components/virtual-scroll/use-virtual-scroll.js +3 -2
  108. package/src/composables/private/use-field.js +5 -8
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Quasar Framework v2.4.11
2
+ * Quasar Framework v2.4.12
3
3
  * (c) 2015-present Razvan Stoenescu
4
4
  * Released under the MIT License.
5
5
  */
@@ -2,7 +2,7 @@
2
2
  "$schema": "",
3
3
  "framework": "vue",
4
4
  "name": "quasar",
5
- "version": "2.4.11",
5
+ "version": "2.4.12",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "types-syntax": "typescript",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quasar",
3
- "version": "2.4.11",
3
+ "version": "2.4.12",
4
4
  "description": "Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time",
5
5
  "main": "dist/quasar.cjs.prod.js",
6
6
  "module": "dist/quasar.esm.prod.js",
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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
  }
@@ -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()
@@ -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
  }
@@ -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'
@@ -1458,13 +1462,13 @@ export default createComponent({
1458
1462
  child.push(getInput(fromDialog, isTarget))
1459
1463
  }
1460
1464
  // there can be only one (when dialog is opened the control in dialog should be target)
1461
- else if (state.editable.value === true && isTarget === true) {
1465
+ else if (state.editable.value === true) {
1462
1466
  child.push(
1463
1467
  h('div', {
1464
- ref: targetRef,
1468
+ ref: isTarget === true ? targetRef : void 0,
1465
1469
  key: 'd_t',
1466
1470
  class: 'q-select__focus-target',
1467
- id: state.targetUid.value,
1471
+ id: isTarget === true ? state.targetUid.value : void 0,
1468
1472
  ...comboboxAttrs.value,
1469
1473
  onKeydown: onTargetKeydown,
1470
1474
  onKeyup: onTargetKeyup,
@@ -1472,7 +1476,7 @@ export default createComponent({
1472
1476
  })
1473
1477
  )
1474
1478
 
1475
- if (typeof props.autocomplete === 'string' && props.autocomplete.length > 0) {
1479
+ if (isTarget === true && typeof props.autocomplete === 'string' && props.autocomplete.length > 0) {
1476
1480
  child.push(
1477
1481
  h('input', {
1478
1482
  class: 'q-select__autocomplete-input',
@@ -8,6 +8,7 @@
8
8
 
9
9
  .q-field__input
10
10
  min-width: 50px !important
11
+ cursor: text
11
12
 
12
13
  &--padding
13
14
  padding-left: 4px
@@ -1,4 +1,4 @@
1
- import { h, ref, computed, watch, nextTick, inject, KeepAlive } from 'vue'
1
+ import { h, ref, computed, inject, getCurrentInstance, KeepAlive } from 'vue'
2
2
 
3
3
  import QSlideTransition from '../slide-transition/QSlideTransition.js'
4
4
  import StepHeader from './StepHeader.js'
@@ -56,7 +56,9 @@ export default createComponent({
56
56
  error: Boolean
57
57
  },
58
58
 
59
- setup (props, { slots }) {
59
+ setup (props, { attrs, slots }) {
60
+ const { proxy: { $q } } = getCurrentInstance()
61
+
60
62
  const $stepper = inject(stepperKey, () => {
61
63
  console.error('QStep needs to be child of QStepper')
62
64
  })
@@ -67,18 +69,21 @@ export default createComponent({
67
69
 
68
70
  const isActive = computed(() => $stepper.value.modelValue === props.name)
69
71
 
70
- watch(isActive, active => {
71
- if (
72
- active === true
73
- && $stepper.value.vertical === true
74
- ) {
75
- nextTick(() => {
76
- if (rootRef.value !== null) {
77
- rootRef.value.scrollTop = 0
72
+ const scrollEvent = computed(() => (
73
+ ($q.platform.is.ios !== true && $q.platform.is.safari !== true)
74
+ || isActive.value !== true
75
+ || $stepper.value.vertical !== true
76
+ ? {}
77
+ : {
78
+ onScroll (e) {
79
+ const { target } = e
80
+ if (target.scrollTop > 0) {
81
+ target.scrollTop = 0
82
+ }
83
+ attrs.onScroll !== void 0 && attrs.onScroll(e)
78
84
  }
79
- })
80
- }
81
- })
85
+ }
86
+ ))
82
87
 
83
88
  const contentKey = computed(() => (
84
89
  typeof props.name === 'string' || typeof props.name === 'number'
@@ -114,7 +119,7 @@ export default createComponent({
114
119
 
115
120
  return () => h(
116
121
  'div',
117
- { ref: rootRef, class: 'q-stepper__step' },
122
+ { ref: rootRef, class: 'q-stepper__step', ...scrollEvent.value },
118
123
  $stepper.value.vertical === true
119
124
  ? [
120
125
  h(StepHeader, {
@@ -13,6 +13,7 @@
13
13
  line-height: 14px
14
14
 
15
15
  &__dot
16
+ contain: layout
16
17
  margin-right: 8px
17
18
  font-size: 14px
18
19
  width: 24px
@@ -20,6 +21,7 @@
20
21
  height: 24px
21
22
  border-radius: 50%
22
23
  background: currentColor
24
+
23
25
  span
24
26
  color: #fff
25
27
 
@@ -133,6 +135,7 @@
133
135
  .q-stepper__tab
134
136
  overflow: hidden
135
137
  .q-stepper__line
138
+ contain: layout
136
139
  &:before, &:after
137
140
  position: absolute
138
141
  top: 50%
@@ -559,13 +559,14 @@ export function useVirtualScroll ({
559
559
  prevToIndex = -1
560
560
  prevScrollStart = void 0
561
561
 
562
+ virtualScrollPaddingBefore.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, 0, virtualScrollSliceRange.value.from)
563
+ virtualScrollPaddingAfter.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, virtualScrollSliceRange.value.to, virtualScrollLength.value)
564
+
562
565
  if (toIndex >= 0) {
563
566
  updateVirtualScrollSizes(virtualScrollSliceRange.value.from)
564
567
  nextTick(() => { scrollTo(toIndex) })
565
568
  }
566
569
  else {
567
- virtualScrollPaddingBefore.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, 0, virtualScrollSliceRange.value.from)
568
- virtualScrollPaddingAfter.value = sumSize(virtualScrollSizesAgg, virtualScrollSizes, virtualScrollSliceRange.value.to, virtualScrollLength.value)
569
570
  onVirtualScrollEvt()
570
571
  }
571
572
  }
@@ -270,7 +270,7 @@ export default function (state) {
270
270
  if (target && (el === null || el.id !== state.targetUid.value)) {
271
271
  target.hasAttribute('tabindex') === true || (target = target.querySelector('[tabindex]'))
272
272
  if (target && target !== el) {
273
- target.focus()
273
+ target.focus({ preventScroll: true })
274
274
  }
275
275
  }
276
276
  }
@@ -288,6 +288,7 @@ export default function (state) {
288
288
  }
289
289
 
290
290
  function onControlFocusin (e) {
291
+ clearTimeout(focusoutTimer)
291
292
  if (state.editable.value === true && state.focused.value === false) {
292
293
  state.focused.value = true
293
294
  emit('focus', e)
@@ -300,13 +301,9 @@ export default function (state) {
300
301
  if (
301
302
  document.hasFocus() === true && (
302
303
  state.hasPopupOpen === true
303
- || (
304
- state.controlRef !== void 0
305
- && (
306
- state.controlRef.value === null
307
- || state.controlRef.value.contains(document.activeElement) !== false
308
- )
309
- )
304
+ || state.controlRef === void 0
305
+ || state.controlRef.value === null
306
+ || state.controlRef.value.contains(document.activeElement) !== false
310
307
  )
311
308
  ) {
312
309
  return