quasar 1.18.4 → 1.18.7

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 (172) hide show
  1. package/dist/api/BottomSheet.json +1 -1
  2. package/dist/api/Notify.json +205 -5
  3. package/dist/api/QAvatar.json +1 -1
  4. package/dist/api/QBreadcrumbsEl.json +1 -1
  5. package/dist/api/QBtn.json +2 -2
  6. package/dist/api/QBtnDropdown.json +3 -3
  7. package/dist/api/QCarousel.json +3 -3
  8. package/dist/api/QChip.json +4 -4
  9. package/dist/api/QExpansionItem.json +2 -2
  10. package/dist/api/QFab.json +2 -2
  11. package/dist/api/QFabAction.json +1 -1
  12. package/dist/api/QIcon.json +4 -2
  13. package/dist/api/QKnob.json +5 -0
  14. package/dist/api/QPagination.json +4 -4
  15. package/dist/api/QRouteTab.json +1 -1
  16. package/dist/api/QSelect.json +1 -1
  17. package/dist/api/QStep.json +4 -4
  18. package/dist/api/QStepper.json +4 -4
  19. package/dist/api/QTab.json +1 -1
  20. package/dist/api/QTimelineEntry.json +1 -1
  21. package/dist/api/QToggle.json +1 -1
  22. package/dist/api/QTree.json +1 -1
  23. package/dist/icon-set/bootstrap-icons.umd.min.js +1 -1
  24. package/dist/icon-set/eva-icons.umd.min.js +1 -1
  25. package/dist/icon-set/fontawesome-v5-pro.umd.min.js +1 -1
  26. package/dist/icon-set/fontawesome-v5.umd.min.js +1 -1
  27. package/dist/icon-set/fontawesome-v6-pro.umd.min.js +6 -0
  28. package/dist/icon-set/fontawesome-v6.umd.min.js +6 -0
  29. package/dist/icon-set/ionicons-v4.umd.min.js +1 -1
  30. package/dist/icon-set/line-awesome.umd.min.js +1 -1
  31. package/dist/icon-set/material-icons-outlined.umd.min.js +1 -1
  32. package/dist/icon-set/material-icons-round.umd.min.js +1 -1
  33. package/dist/icon-set/material-icons-sharp.umd.min.js +1 -1
  34. package/dist/icon-set/material-icons.umd.min.js +1 -1
  35. package/dist/icon-set/mdi-v3.umd.min.js +1 -1
  36. package/dist/icon-set/mdi-v4.umd.min.js +1 -1
  37. package/dist/icon-set/mdi-v5.umd.min.js +1 -1
  38. package/dist/icon-set/mdi-v6.umd.min.js +1 -1
  39. package/dist/icon-set/svg-bootstrap-icons.umd.min.js +2 -2
  40. package/dist/icon-set/svg-eva-icons.umd.min.js +2 -2
  41. package/dist/icon-set/svg-fontawesome-v5.umd.min.js +2 -2
  42. package/dist/icon-set/svg-fontawesome-v6.umd.min.js +6 -0
  43. package/dist/icon-set/svg-ionicons-v4.umd.min.js +1 -1
  44. package/dist/icon-set/svg-ionicons-v5.umd.min.js +1 -1
  45. package/dist/icon-set/svg-ionicons-v6.umd.min.js +2 -2
  46. package/dist/icon-set/svg-line-awesome.umd.min.js +1 -1
  47. package/dist/icon-set/svg-material-icons-outlined.umd.min.js +1 -1
  48. package/dist/icon-set/svg-material-icons-round.umd.min.js +1 -1
  49. package/dist/icon-set/svg-material-icons-sharp.umd.min.js +1 -1
  50. package/dist/icon-set/svg-material-icons.umd.min.js +1 -1
  51. package/dist/icon-set/svg-mdi-v4.umd.min.js +1 -1
  52. package/dist/icon-set/svg-mdi-v5.umd.min.js +1 -1
  53. package/dist/icon-set/svg-mdi-v6.umd.min.js +2 -2
  54. package/dist/icon-set/svg-themify.umd.min.js +1 -1
  55. package/dist/icon-set/themify.umd.min.js +1 -1
  56. package/dist/lang/ar.umd.min.js +1 -1
  57. package/dist/lang/az-latn.umd.min.js +1 -1
  58. package/dist/lang/bg.umd.min.js +1 -1
  59. package/dist/lang/ca.umd.min.js +1 -1
  60. package/dist/lang/cs.umd.min.js +1 -1
  61. package/dist/lang/da.umd.min.js +1 -1
  62. package/dist/lang/de.umd.min.js +1 -1
  63. package/dist/lang/el.umd.min.js +1 -1
  64. package/dist/lang/en-gb.umd.min.js +1 -1
  65. package/dist/lang/en-us.umd.min.js +1 -1
  66. package/dist/lang/eo.umd.min.js +1 -1
  67. package/dist/lang/es.umd.min.js +1 -1
  68. package/dist/lang/et.umd.min.js +1 -1
  69. package/dist/lang/eu.umd.min.js +6 -0
  70. package/dist/lang/fa-ir.umd.min.js +1 -1
  71. package/dist/lang/fa.umd.min.js +1 -1
  72. package/dist/lang/fi.umd.min.js +1 -1
  73. package/dist/lang/fr.umd.min.js +1 -1
  74. package/dist/lang/gn.umd.min.js +1 -1
  75. package/dist/lang/he.umd.min.js +1 -1
  76. package/dist/lang/hr.umd.min.js +1 -1
  77. package/dist/lang/hu.umd.min.js +1 -1
  78. package/dist/lang/id.umd.min.js +1 -1
  79. package/dist/lang/is.umd.min.js +1 -1
  80. package/dist/lang/it.umd.min.js +1 -1
  81. package/dist/lang/ja.umd.min.js +1 -1
  82. package/dist/lang/km.umd.min.js +1 -1
  83. package/dist/lang/ko-kr.umd.min.js +1 -1
  84. package/dist/lang/kur-ckb.umd.min.js +1 -1
  85. package/dist/lang/kz.umd.min.js +6 -0
  86. package/dist/lang/lu.umd.min.js +1 -1
  87. package/dist/lang/lv.umd.min.js +1 -1
  88. package/dist/lang/ml.umd.min.js +1 -1
  89. package/dist/lang/ms.umd.min.js +1 -1
  90. package/dist/lang/my.umd.min.js +1 -1
  91. package/dist/lang/nb-no.umd.min.js +1 -1
  92. package/dist/lang/nl.umd.min.js +1 -1
  93. package/dist/lang/pl.umd.min.js +1 -1
  94. package/dist/lang/pt-br.umd.min.js +1 -1
  95. package/dist/lang/pt.umd.min.js +1 -1
  96. package/dist/lang/ro.umd.min.js +1 -1
  97. package/dist/lang/ru.umd.min.js +1 -1
  98. package/dist/lang/sk.umd.min.js +1 -1
  99. package/dist/lang/sl.umd.min.js +1 -1
  100. package/dist/lang/sr.umd.min.js +1 -1
  101. package/dist/lang/sv.umd.min.js +1 -1
  102. package/dist/lang/ta.umd.min.js +1 -1
  103. package/dist/lang/th.umd.min.js +1 -1
  104. package/dist/lang/tr.umd.min.js +1 -1
  105. package/dist/lang/ug.umd.min.js +2 -2
  106. package/dist/lang/uk.umd.min.js +1 -1
  107. package/dist/lang/vi.umd.min.js +1 -1
  108. package/dist/lang/zh-hans.umd.min.js +1 -1
  109. package/dist/lang/zh-hant.umd.min.js +1 -1
  110. package/dist/quasar.addon.css +1 -1
  111. package/dist/quasar.addon.rtl.css +1 -1
  112. package/dist/quasar.common.js +2 -2
  113. package/dist/quasar.css +6 -3
  114. package/dist/quasar.esm.js +2 -2
  115. package/dist/quasar.ie.polyfills.js +1 -1
  116. package/dist/quasar.ie.polyfills.umd.min.js +1 -1
  117. package/dist/quasar.min.css +1 -1
  118. package/dist/quasar.rtl.css +8 -3
  119. package/dist/quasar.rtl.min.css +1 -1
  120. package/dist/quasar.sass +4 -1
  121. package/dist/quasar.styl +4 -1
  122. package/dist/quasar.umd.js +176 -97
  123. package/dist/quasar.umd.min.js +2 -2
  124. package/dist/quasar.umd.modern.js +176 -97
  125. package/dist/quasar.umd.modern.min.js +2 -2
  126. package/dist/types/extras/icon-set.d.ts +2 -0
  127. package/dist/types/index.d.ts +114 -44
  128. package/dist/vetur/quasar-attributes.json +42 -38
  129. package/dist/vetur/quasar-tags.json +1 -0
  130. package/dist/web-types/web-types.json +49 -39
  131. package/icon-set/fontawesome-v6-pro.js +128 -0
  132. package/icon-set/fontawesome-v6.js +128 -0
  133. package/icon-set/svg-fontawesome-v6.js +198 -0
  134. package/lang/eu.js +93 -0
  135. package/lang/index.json +8 -0
  136. package/lang/kz.js +97 -0
  137. package/lang/ug.js +49 -52
  138. package/package.json +1 -1
  139. package/src/api.extends.json +1 -1
  140. package/src/components/btn/QBtn.js +30 -22
  141. package/src/components/date/QDate.js +2 -1
  142. package/src/components/dialog-plugin/DialogPlugin.js +6 -5
  143. package/src/components/fab/QFab.js +1 -1
  144. package/src/components/field/QField.js +17 -9
  145. package/src/components/file/QFile.js +1 -0
  146. package/src/components/icon/QIcon.js +6 -2
  147. package/src/components/icon/QIcon.json +1 -3
  148. package/src/components/input/QInput.js +4 -1
  149. package/src/components/knob/QKnob.js +5 -2
  150. package/src/components/knob/QKnob.json +6 -0
  151. package/src/components/linear-progress/QLinearProgress.sass +1 -0
  152. package/src/components/linear-progress/QLinearProgress.styl +1 -0
  153. package/src/components/select/QSelect.js +23 -8
  154. package/src/components/slide-transition/QSlideTransition.js +4 -4
  155. package/src/components/slider/slider-utils.js +4 -4
  156. package/src/components/stepper/QStep.json +3 -0
  157. package/src/components/stepper/QStepper.json +3 -0
  158. package/src/components/stepper/QStepper.sass +2 -0
  159. package/src/components/stepper/QStepper.styl +2 -0
  160. package/src/components/stepper/StepHeader.js +23 -8
  161. package/src/components/table/table-sort.js +2 -2
  162. package/src/components/uploader/QUploaderBase.js +4 -1
  163. package/src/mixins/datetime.js +3 -1
  164. package/src/mixins/file.js +3 -2
  165. package/src/plugins/Loading.js +3 -2
  166. package/src/plugins/LoadingBar.js +15 -10
  167. package/src/plugins/Notify.js +8 -5
  168. package/src/plugins/Notify.json +100 -0
  169. package/src/utils/extend.js +2 -2
  170. package/src/utils/is.js +4 -14
  171. package/src/utils/morph.js +4 -3
  172. package/src/utils/web-storage.js +3 -2
@@ -20,6 +20,7 @@ import DarkMixin from '../../mixins/dark.js'
20
20
  import AttrsMixin from '../../mixins/attrs.js'
21
21
 
22
22
  import cache from '../../utils/cache.js'
23
+ import { isObject } from '../../utils/is.js'
23
24
 
24
25
  export default Vue.extend({
25
26
  name: 'DialogPlugin',
@@ -64,7 +65,7 @@ export default Vue.extend({
64
65
 
65
66
  spinner () {
66
67
  if (this.progress !== false) {
67
- return Object(this.progress) === this.progress
68
+ return isObject(this.progress) === true
68
69
  ? {
69
70
  component: this.progress.spinner || QSpinner,
70
71
  props: { color: this.progress.color || this.vmColor }
@@ -81,7 +82,7 @@ export default Vue.extend({
81
82
  },
82
83
 
83
84
  okLabel () {
84
- return Object(this.ok) === this.ok
85
+ return isObject(this.ok) === true
85
86
  ? this.$q.lang.label.ok
86
87
  : (
87
88
  this.ok === true
@@ -91,7 +92,7 @@ export default Vue.extend({
91
92
  },
92
93
 
93
94
  cancelLabel () {
94
- return Object(this.cancel) === this.cancel
95
+ return isObject(this.cancel) === true
95
96
  ? this.$q.lang.label.cancel
96
97
  : (
97
98
  this.cancel === true
@@ -121,7 +122,7 @@ export default Vue.extend({
121
122
  label: this.okLabel,
122
123
  ripple: false,
123
124
  disable: this.okDisabled,
124
- ...(Object(this.ok) === this.ok ? this.ok : { flat: true })
125
+ ...(isObject(this.ok) === true ? this.ok : { flat: true })
125
126
  }
126
127
  },
127
128
 
@@ -130,7 +131,7 @@ export default Vue.extend({
130
131
  color: this.vmColor,
131
132
  label: this.cancelLabel,
132
133
  ripple: false,
133
- ...(Object(this.cancel) === this.cancel ? this.cancel : { flat: true })
134
+ ...(isObject(this.cancel) === true ? this.cancel : { flat: true })
134
135
  }
135
136
  }
136
137
  },
@@ -101,7 +101,7 @@ export default Vue.extend({
101
101
  const staticClass = `q-fab__${kebab} absolute-full`
102
102
 
103
103
  return slotFn === void 0
104
- ? h(QIcon, { staticClass, props: { name: this[kebab] || this.$q.iconSet.fab[camel] } })
104
+ ? h(QIcon, { staticClass, props: { name: this[camel] || this.$q.iconSet.fab[camel] } })
105
105
  : h('div', { staticClass }, slotFn(this.slotScope))
106
106
  }
107
107
  },
@@ -288,14 +288,6 @@ export default Vue.extend({
288
288
  }, this.__getControlContainer(h))
289
289
  )
290
290
 
291
- this.$scopedSlots.append !== void 0 && node.push(
292
- h('div', {
293
- staticClass: 'q-field__append q-field__marginal row no-wrap items-center',
294
- key: 'append',
295
- on: this.slotsEvents
296
- }, this.$scopedSlots.append())
297
- )
298
-
299
291
  this.hasError === true && this.noErrorIcon === false && node.push(
300
292
  this.__getInnerAppendNode(h, 'error', [
301
293
  h(QIcon, { props: { name: this.$q.iconSet.field.error, color: 'negative' } })
@@ -326,6 +318,14 @@ export default Vue.extend({
326
318
  )
327
319
  }
328
320
 
321
+ this.$scopedSlots.append !== void 0 && node.push(
322
+ h('div', {
323
+ staticClass: 'q-field__append q-field__marginal row no-wrap items-center',
324
+ key: 'append',
325
+ on: this.slotsEvents
326
+ }, this.$scopedSlots.append())
327
+ )
328
+
329
329
  this.__getInnerAppend !== void 0 && node.push(
330
330
  this.__getInnerAppendNode(h, 'inner-append', this.__getInnerAppend(h))
331
331
  )
@@ -539,10 +539,18 @@ export default Vue.extend({
539
539
  this.__onPreRender !== void 0 && this.__onPreRender()
540
540
  this.__onPostRender !== void 0 && this.$nextTick(this.__onPostRender)
541
541
 
542
+ const attrs = this.__getControl === void 0 && this.$scopedSlots.control === void 0
543
+ ? {
544
+ ...this.qAttrs,
545
+ 'data-autofocus': this.autofocus,
546
+ ...this.attrs
547
+ }
548
+ : this.attrs
549
+
542
550
  return h('label', {
543
551
  staticClass: 'q-field q-validation-component row no-wrap items-start',
544
552
  class: this.classes,
545
- attrs: this.attrs
553
+ attrs
546
554
  }, [
547
555
  this.$scopedSlots.before !== void 0 ? h('div', {
548
556
  staticClass: 'q-field__before q-field__marginal row no-wrap items-center',
@@ -167,6 +167,7 @@ export default Vue.extend({
167
167
  if (this.editable === true) {
168
168
  data.on = cache(this, 'native', {
169
169
  dragover: this.__onDragOver,
170
+ dragleave: this.__onDragLeave,
170
171
  keydown: this.__onKeydown,
171
172
  keyup: this.__onKeyup
172
173
  })
@@ -37,6 +37,7 @@ const imgRE = /^img:/
37
37
  const svgUseRE = /^svguse:/
38
38
  const ionRE = /^ion-/
39
39
  const faLaRE = /^[lf]a[srlbdk]? /
40
+ const fa6RE = /^fa-(solid|regular|light|brands|duotone|thin)/
40
41
 
41
42
  export default Vue.extend({
42
43
  name: 'QIcon',
@@ -67,7 +68,7 @@ export default Vue.extend({
67
68
  let cls
68
69
  let icon = this.name
69
70
 
70
- if (!icon) {
71
+ if (icon === 'none' || !icon) {
71
72
  return { none: true }
72
73
  }
73
74
 
@@ -76,6 +77,9 @@ export default Vue.extend({
76
77
  if (res !== void 0) {
77
78
  if (res.icon !== void 0) {
78
79
  icon = res.icon
80
+ if (icon === 'none' || !icon) {
81
+ return { none: true }
82
+ }
79
83
  }
80
84
  else {
81
85
  return {
@@ -127,7 +131,7 @@ export default Vue.extend({
127
131
  if (matches !== null) {
128
132
  cls = libMap[ matches[ 1 ] ](icon)
129
133
  }
130
- else if (faLaRE.test(icon) === true) {
134
+ else if (faLaRE.test(icon) === true || fa6RE.test(icon) === true) {
131
135
  cls = icon
132
136
  }
133
137
  else if (ionRE.test(icon) === true) {
@@ -18,9 +18,7 @@
18
18
  },
19
19
 
20
20
  "name": {
21
- "type": "String",
22
- "desc": "Name of the icon, following Quasar convention",
23
- "examples": [ "map", "ion-add" ],
21
+ "extends": "icon",
24
22
  "category": "model"
25
23
  },
26
24
 
@@ -46,7 +46,10 @@ export default Vue.extend({
46
46
  if (this.hasMask === true) {
47
47
  if (this.stopValueWatcher === true) {
48
48
  this.stopValueWatcher = false
49
- return
49
+
50
+ if (String(v) === this.emitCachedValue) {
51
+ return
52
+ }
50
53
  }
51
54
 
52
55
  this.__updateMaskValue(v)
@@ -222,11 +222,14 @@ export default Vue.extend({
222
222
  angle = center.left < pos.left ? angle + 90 : 270 - angle
223
223
  }
224
224
 
225
- if (this.angle) {
225
+ if (this.$q.lang.rtl === true) {
226
+ angle = normalizeToInterval(-angle - this.angle, 0, 360)
227
+ }
228
+ else if (this.angle) {
226
229
  angle = normalizeToInterval(angle - this.angle, 0, 360)
227
230
  }
228
231
 
229
- if (this.$q.lang.rtl === true) {
232
+ if (this.reverse === true) {
230
233
  angle = 360 - angle
231
234
  }
232
235
 
@@ -51,6 +51,12 @@
51
51
  "category": "model"
52
52
  },
53
53
 
54
+ "reverse": {
55
+ "type": "Boolean",
56
+ "desc": "Reverses the direction of progress",
57
+ "category": "behavior"
58
+ },
59
+
54
60
  "instant-feedback": {
55
61
  "type": "Boolean",
56
62
  "desc": "No animation when model changes",
@@ -6,6 +6,7 @@
6
6
  height: 1em
7
7
  color: $primary
8
8
  color: var(--q-color-primary)
9
+ transform: scale3d(1, 1, 1)
9
10
 
10
11
  &__model, &__track
11
12
  transform-origin: 0 0
@@ -6,6 +6,7 @@
6
6
  height: 1em
7
7
  color: $primary
8
8
  color: var(--q-color-primary)
9
+ transform: scale3d(1, 1, 1)
9
10
 
10
11
  &__model, &__track
11
12
  transform-origin: 0 0
@@ -162,6 +162,18 @@ export default Vue.extend({
162
162
 
163
163
  menu (show) {
164
164
  this.__updateMenu(show)
165
+ },
166
+
167
+ virtualScrollLength () {
168
+ if (this.menu === true && this.innerLoading === false) {
169
+ this.reset()
170
+
171
+ this.$nextTick(() => {
172
+ if (this.menu === true && this.innerLoading === false) {
173
+ this.__updateMenu(true)
174
+ }
175
+ })
176
+ }
165
177
  }
166
178
  },
167
179
 
@@ -589,9 +601,7 @@ export default Vue.extend({
589
601
 
590
602
  return typeof val === 'function'
591
603
  ? val
592
- : opt => Object(opt) === opt && val in opt
593
- ? opt[val]
594
- : opt
604
+ : opt => (opt !== null && typeof opt === 'object' && val in opt ? opt[ val ] : opt)
595
605
  },
596
606
 
597
607
  isOptionSelected (opt) {
@@ -948,6 +958,8 @@ export default Vue.extend({
948
958
  }
949
959
  // there can be only one (when dialog is opened the control in dialog should be target)
950
960
  else if (this.editable === true) {
961
+ const attrs = isTarget === true ? this.comboboxAttrs : void 0
962
+
951
963
  child.push(
952
964
  h('div', {
953
965
  ref: isTarget === true ? 'target' : void 0,
@@ -956,7 +968,7 @@ export default Vue.extend({
956
968
  attrs: {
957
969
  id: isTarget === true ? this.targetUid : void 0,
958
970
  tabindex: this.tabindex,
959
- ...this.comboboxAttrs
971
+ ...attrs
960
972
  },
961
973
  on: cache(this, 'f-tget', {
962
974
  keydown: this.__onTargetKeydown,
@@ -995,7 +1007,9 @@ export default Vue.extend({
995
1007
  )
996
1008
  }
997
1009
 
998
- return h('div', { staticClass: 'q-field__native row items-center', attrs: this.qAttrs }, child)
1010
+ const attrs = this.useInput === true || isTarget !== true ? void 0 : this.qAttrs
1011
+
1012
+ return h('div', { staticClass: 'q-field__native row items-center', attrs }, child)
999
1013
  },
1000
1014
 
1001
1015
  __getOptions (h) {
@@ -1057,6 +1071,8 @@ export default Vue.extend({
1057
1071
  },
1058
1072
 
1059
1073
  __getInput (h, fromDialog, isTarget) {
1074
+ const attrs = isTarget === true ? { ...this.comboboxAttrs, ...this.qAttrs } : void 0
1075
+
1060
1076
  const options = {
1061
1077
  ref: isTarget === true ? 'target' : void 0,
1062
1078
  key: 'i_t',
@@ -1067,15 +1083,14 @@ export default Vue.extend({
1067
1083
  attrs: {
1068
1084
  // required for Android in order to show ENTER key when in form
1069
1085
  type: 'search',
1070
- ...this.qAttrs,
1086
+ ...attrs,
1071
1087
  id: isTarget === true ? this.targetUid : void 0,
1072
1088
  maxlength: this.maxlength, // this is converted to prop by QField
1073
1089
  tabindex: this.tabindex,
1074
1090
  autocomplete: this.autocomplete,
1075
1091
  'data-autofocus': fromDialog === true ? false : this.autofocus,
1076
1092
  disabled: this.disable === true,
1077
- readonly: this.readonly === true,
1078
- ...this.comboboxAttrs
1093
+ readonly: this.readonly === true
1079
1094
  },
1080
1095
  on: this.inputControlEvents
1081
1096
  }
@@ -73,8 +73,8 @@ export default Vue.extend({
73
73
 
74
74
  this.timer = setTimeout(() => {
75
75
  el.style.height = `${el.scrollHeight}px`
76
- this.animListener = ev => {
77
- if (Object(ev) !== ev || ev.target === el) {
76
+ this.animListener = evt => {
77
+ if (Object(evt) !== evt || evt.target === el) {
78
78
  this.__end(el, 'show')
79
79
  }
80
80
  }
@@ -99,8 +99,8 @@ export default Vue.extend({
99
99
 
100
100
  this.timer = setTimeout(() => {
101
101
  el.style.height = 0
102
- this.animListener = ev => {
103
- if (Object(ev) !== ev || ev.target === el) {
102
+ this.animListener = evt => {
103
+ if (Object(evt) !== evt || evt.target === el) {
104
104
  this.__end(el, 'hide')
105
105
  }
106
106
  }
@@ -5,7 +5,7 @@ import FormMixin from '../../mixins/form.js'
5
5
 
6
6
  import { between } from '../../utils/format.js'
7
7
  import { position } from '../../utils/event.js'
8
- import { isNumber } from '../../utils/is.js'
8
+ import { isNumber, isObject } from '../../utils/is.js'
9
9
 
10
10
  const markerPrefixClass = 'q-slider__marker-labels'
11
11
  const defaultMarkerConvertFn = v => ({ value: v })
@@ -414,7 +414,7 @@ export const SliderMixin = {
414
414
  if (typeof def === 'function') {
415
415
  return this.markerTicks.map(value => {
416
416
  const item = def(value)
417
- return Object(item) === item ? { ...item, value } : { value, label: item }
417
+ return isObject(item) === true ? { ...item, value } : { value, label: item }
418
418
  })
419
419
  }
420
420
 
@@ -422,14 +422,14 @@ export const SliderMixin = {
422
422
 
423
423
  if (Array.isArray(def) === true) {
424
424
  return def
425
- .map(item => (Object(item) === item ? item : { value: item }))
425
+ .map(item => (isObject(item) === true ? item : { value: item }))
426
426
  .filter(filterFn)
427
427
  }
428
428
 
429
429
  return Object.keys(def).map(key => {
430
430
  const item = def[ key ]
431
431
  const value = Number(key)
432
- return Object(item) === item ? { ...item, value } : { value, label: item }
432
+ return isObject(item) === true ? { ...item, value } : { value, label: item }
433
433
  }).filter(filterFn)
434
434
  },
435
435
 
@@ -49,6 +49,7 @@
49
49
 
50
50
  "done-icon": {
51
51
  "extends": "icon",
52
+ "desc": "Icon name following Quasar convention; If 'none' (String) is used as value, then it will defer to prefix or the regular icon for this state; Make sure you have the icon library installed unless you are using 'img:' prefix",
52
53
  "category": "header"
53
54
  },
54
55
 
@@ -59,6 +60,7 @@
59
60
 
60
61
  "active-icon": {
61
62
  "extends": "icon",
63
+ "desc": "Icon name following Quasar convention; If 'none' (String) is used as value, then it will defer to prefix or the regular icon for this state; Make sure you have the icon library installed unless you are using 'img:' prefix",
62
64
  "category": "header"
63
65
  },
64
66
 
@@ -69,6 +71,7 @@
69
71
 
70
72
  "error-icon": {
71
73
  "extends": "icon",
74
+ "desc": "Icon name following Quasar convention; If 'none' (String) is used as value, then it will defer to prefix or the regular icon for this state; Make sure you have the icon library installed unless you are using 'img:' prefix",
72
75
  "category": "header"
73
76
  },
74
77
 
@@ -58,6 +58,7 @@
58
58
 
59
59
  "done-icon": {
60
60
  "extends": "icon",
61
+ "desc": "Icon name following Quasar convention; If 'none' (String) is used as value, then it will defer to prefix or the regular icon for this state; Make sure you have the icon library installed unless you are using 'img:' prefix",
61
62
  "category": "header"
62
63
  },
63
64
 
@@ -68,6 +69,7 @@
68
69
 
69
70
  "active-icon": {
70
71
  "extends": "icon",
72
+ "desc": "Icon name following Quasar convention; If 'none' (String) is used as value, then it will defer to prefix or the regular icon for this state; Make sure you have the icon library installed unless you are using 'img:' prefix",
71
73
  "category": "header"
72
74
  },
73
75
 
@@ -78,6 +80,7 @@
78
80
 
79
81
  "error-icon": {
80
82
  "extends": "icon",
83
+ "desc": "Icon name following Quasar convention; If 'none' (String) is used as value, then it will defer to prefix or the regular icon for this state; Make sure you have the icon library installed unless you are using 'img:' prefix",
81
84
  "category": "header"
82
85
  },
83
86
 
@@ -53,10 +53,12 @@
53
53
  color: $negative
54
54
  color: var(--q-color-negative)
55
55
 
56
+ &--error-with-icon
56
57
  .q-stepper__dot
57
58
  background: transparent !important
58
59
  span
59
60
  color: currentColor
61
+ .q-icon
60
62
  font-size: 24px
61
63
 
62
64
  &__header
@@ -53,10 +53,12 @@
53
53
  color: $negative
54
54
  color: var(--q-color-negative)
55
55
 
56
+ &--error-with-icon
56
57
  .q-stepper__dot
57
58
  background: transparent !important
58
59
  span
59
60
  color: currentColor
61
+ .q-icon
60
62
  font-size: 24px
61
63
 
62
64
  &__header
@@ -53,23 +53,36 @@ export default Vue.extend({
53
53
 
54
54
  hasPrefix () {
55
55
  return this.step.prefix &&
56
- this.isActive === false &&
57
- this.isError === false &&
58
- this.isDone === false
56
+ (this.isActive === false || this.stepper.activeIcon === 'none') &&
57
+ (this.isError === false || this.stepper.errorIcon === 'none') &&
58
+ (this.isDone === false || this.stepper.doneIcon === 'none')
59
59
  },
60
60
 
61
61
  icon () {
62
+ const defaultIcon = this.step.icon || this.stepper.inactiveIcon
63
+
62
64
  if (this.isActive === true) {
63
- return this.step.activeIcon || this.stepper.activeIcon || this.$q.iconSet.stepper.active
65
+ const icon = this.step.activeIcon || this.stepper.activeIcon
66
+ return icon === 'none'
67
+ ? defaultIcon
68
+ : icon || this.$q.iconSet.stepper.active
64
69
  }
70
+
65
71
  if (this.isError === true) {
66
- return this.step.errorIcon || this.stepper.errorIcon || this.$q.iconSet.stepper.error
72
+ const icon = this.step.errorIcon || this.stepper.errorIcon
73
+ return icon === 'none'
74
+ ? defaultIcon
75
+ : icon || this.$q.iconSet.stepper.error
67
76
  }
77
+
68
78
  if (this.isDisable === false && this.isDone === true) {
69
- return this.step.doneIcon || this.stepper.doneIcon || this.$q.iconSet.stepper.done
79
+ const icon = this.step.doneIcon || this.stepper.doneIcon
80
+ return icon === 'none'
81
+ ? defaultIcon
82
+ : icon || this.$q.iconSet.stepper.done
70
83
  }
71
84
 
72
- return this.step.icon || this.stepper.inactiveIcon
85
+ return defaultIcon
73
86
  },
74
87
 
75
88
  color () {
@@ -96,7 +109,9 @@ export default Vue.extend({
96
109
  classes () {
97
110
  return `q-stepper__tab col-grow flex items-center no-wrap relative-position` +
98
111
  (this.color !== void 0 ? ` text-${this.color}` : '') +
99
- (this.isError === true ? ' q-stepper__tab--error' : '') +
112
+ (this.isError === true
113
+ ? ' q-stepper__tab--error q-stepper__tab--error-with-' + (this.hasPrefix === true ? 'prefix' : 'icon')
114
+ : '') +
100
115
  (this.isActive === true ? ' q-stepper__tab--active' : '') +
101
116
  (this.isDone === true ? ' q-stepper__tab--done' : '') +
102
117
  (this.headerNav === true ? ' q-stepper__tab--navigation q-focusable q-hoverable' : '') +
@@ -1,5 +1,5 @@
1
1
  import { sortDate } from '../../utils/sort.js'
2
- import { isNumber, isDate } from '../../utils/is.js'
2
+ import { isNumber, isDate, isObject } from '../../utils/is.js'
3
3
 
4
4
  export default {
5
5
  props: {
@@ -71,7 +71,7 @@ export default {
71
71
  sort (col /* String(col name) or Object(col definition) */) {
72
72
  let sortOrder = this.columnSortOrder
73
73
 
74
- if (col === Object(col)) {
74
+ if (isObject(col) === true) {
75
75
  if (col.sortOrder) {
76
76
  sortOrder = col.sortOrder
77
77
  }
@@ -441,7 +441,10 @@ export default Vue.extend({
441
441
  'disabled q-uploader--disable': this.disable
442
442
  },
443
443
  on: this.canAddFiles === true
444
- ? cache(this, 'drag', { dragover: this.__onDragOver })
444
+ ? cache(this, 'drag', {
445
+ dragover: this.__onDragOver,
446
+ dragleave: this.__onDragLeave
447
+ })
445
448
  : null
446
449
  }, children)
447
450
  }
@@ -75,7 +75,9 @@ export default {
75
75
 
76
76
  methods: {
77
77
  __getLocale () {
78
- return this.locale || this.$q.lang.date
78
+ return this.locale !== void 0
79
+ ? { ...this.$q.lang.date, ...this.locale }
80
+ : this.$q.lang.date
79
81
  },
80
82
 
81
83
  __getCurrentDate (dateOnly) {
@@ -116,7 +116,7 @@ export default {
116
116
  // Cordova/iOS allows selecting multiple files even when the
117
117
  // multiple attribute is not specified. We also normalize drag'n'dropped
118
118
  // files here:
119
- if (this.multiple !== true) {
119
+ if (this.multiple !== true && files.length > 0) {
120
120
  files = [ files[0] ]
121
121
  }
122
122
 
@@ -180,7 +180,7 @@ export default {
180
180
 
181
181
  __onDragLeave (e) {
182
182
  stopAndPrevent(e)
183
- this.dnd = false
183
+ e.relatedTarget !== this.$refs.dnd && (this.dnd = false)
184
184
  },
185
185
 
186
186
  __onDrop (e) {
@@ -198,6 +198,7 @@ export default {
198
198
  if (this.dnd === true) {
199
199
  return h('div', {
200
200
  staticClass: `q-${type}__dnd absolute-full`,
201
+ ref: 'dnd',
201
202
  on: cache(this, 'dnd', {
202
203
  dragenter: stopAndPreventDrag,
203
204
  dragover: stopAndPreventDrag,
@@ -3,6 +3,7 @@ import Vue from 'vue'
3
3
  import QSpinner from '../components/spinner/QSpinner.js'
4
4
  import { isSSR } from './Platform.js'
5
5
  import cache from '../utils/cache.js'
6
+ import { isObject } from '../utils/is.js'
6
7
  import { preventScroll } from '../mixins/prevent-scroll.js'
7
8
 
8
9
  let
@@ -29,7 +30,7 @@ const Loading = {
29
30
  show (opts) {
30
31
  if (isSSR === true) { return }
31
32
 
32
- props = opts === Object(opts) && opts.ignoreDefaults === true
33
+ props = isObject(opts) === true && opts.ignoreDefaults === true
33
34
  ? { ...originalDefaults, ...opts }
34
35
  : { ...defaults, ...opts }
35
36
 
@@ -125,7 +126,7 @@ const Loading = {
125
126
  },
126
127
 
127
128
  setDefaults (opts) {
128
- opts === Object(opts) && Object.assign(defaults, opts)
129
+ isObject(opts) === true && Object.assign(defaults, opts)
129
130
  },
130
131
 
131
132
  install ({ $q, cfg: { loading } }) {
@@ -2,6 +2,7 @@ import Vue from 'vue'
2
2
 
3
3
  import { isSSR } from './Platform.js'
4
4
  import { noop } from '../utils/event.js'
5
+ import { isObject } from '../utils/is.js'
5
6
  import QAjaxBar from '../components/ajax-bar/QAjaxBar.js'
6
7
 
7
8
  export default {
@@ -21,6 +22,15 @@ export default {
21
22
  const props = cfg.loadingBar !== void 0
22
23
  ? { ...cfg.loadingBar }
23
24
  : {}
25
+ const on = {
26
+ start: () => {
27
+ this.isActive = true
28
+ },
29
+
30
+ stop: () => {
31
+ this.isActive = false
32
+ }
33
+ }
24
34
 
25
35
  const bar = new Vue({
26
36
  name: 'LoadingBar',
@@ -35,22 +45,17 @@ export default {
35
45
 
36
46
  render: h => h(QAjaxBar, {
37
47
  ref: 'bar',
38
- props
48
+ props,
49
+ on
39
50
  })
40
51
  }).$mount().$refs.bar
41
52
 
42
53
  Object.assign(this, {
43
- start: speed => {
44
- bar.start(speed)
45
- this.isActive = bar.isActive = true
46
- },
47
- stop: () => {
48
- const sessions = bar.stop()
49
- this.isActive = bar.isActive = sessions > 0
50
- },
54
+ start: bar.start,
55
+ stop: bar.stop,
51
56
  increment: bar.increment,
52
57
  setDefaults: opts => {
53
- opts === Object(opts) && Object.assign(props, opts)
58
+ isObject(opts) === true && Object.assign(props, opts)
54
59
  bar.$parent.$forceUpdate()
55
60
  }
56
61
  })