quasar 1.16.2 → 1.17.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 (309) hide show
  1. package/dist/api/BottomSheet.json +2 -2
  2. package/dist/api/Loading.json +0 -2
  3. package/dist/api/LoadingBar.json +1 -1
  4. package/dist/api/Notify.json +25 -25
  5. package/dist/api/QAjaxBar.json +23 -4
  6. package/dist/api/QAvatar.json +1 -1
  7. package/dist/api/QBreadcrumbsEl.json +32 -11
  8. package/dist/api/QBtn.json +35 -14
  9. package/dist/api/QBtnDropdown.json +36 -15
  10. package/dist/api/QBtnToggle.json +1 -1
  11. package/dist/api/QCarousel.json +7 -7
  12. package/dist/api/QCarouselSlide.json +2 -2
  13. package/dist/api/QChatMessage.json +1 -5
  14. package/dist/api/QChip.json +4 -4
  15. package/dist/api/QColor.json +6 -0
  16. package/dist/api/QDialog.json +7 -1
  17. package/dist/api/QExpansionItem.json +34 -13
  18. package/dist/api/QFab.json +34 -2
  19. package/dist/api/QFabAction.json +9 -1
  20. package/dist/api/QField.json +80 -6
  21. package/dist/api/QFile.json +80 -6
  22. package/dist/api/QImg.json +2 -2
  23. package/dist/api/QInnerLoading.json +32 -0
  24. package/dist/api/QInput.json +82 -6
  25. package/dist/api/QItem.json +31 -10
  26. package/dist/api/QOptionGroup.json +58 -1
  27. package/dist/api/QPagination.json +4 -4
  28. package/dist/api/QParallax.json +1 -1
  29. package/dist/api/QPopupEdit.json +14 -7
  30. package/dist/api/QPullToRefresh.json +1 -1
  31. package/dist/api/QRange.json +581 -96
  32. package/dist/api/QRating.json +3 -3
  33. package/dist/api/QRouteTab.json +32 -12
  34. package/dist/api/QScrollArea.json +188 -20
  35. package/dist/api/QSelect.json +82 -10
  36. package/dist/api/QSeparator.json +1 -1
  37. package/dist/api/QSlider.json +499 -34
  38. package/dist/api/QStep.json +4 -4
  39. package/dist/api/QStepper.json +4 -4
  40. package/dist/api/QTab.json +1 -1
  41. package/dist/api/QTable.json +4 -4
  42. package/dist/api/QTabs.json +9 -0
  43. package/dist/api/QTimelineEntry.json +2 -2
  44. package/dist/api/QToggle.json +1 -1
  45. package/dist/api/QTree.json +7 -1
  46. package/dist/api/QVideo.json +10 -0
  47. package/dist/icon-set/bootstrap-icons.umd.min.js +1 -1
  48. package/dist/icon-set/eva-icons.umd.min.js +1 -1
  49. package/dist/icon-set/fontawesome-v5-pro.umd.min.js +1 -1
  50. package/dist/icon-set/fontawesome-v5.umd.min.js +1 -1
  51. package/dist/icon-set/ionicons-v4.umd.min.js +1 -1
  52. package/dist/icon-set/line-awesome.umd.min.js +1 -1
  53. package/dist/icon-set/material-icons-outlined.umd.min.js +1 -1
  54. package/dist/icon-set/material-icons-round.umd.min.js +1 -1
  55. package/dist/icon-set/material-icons-sharp.umd.min.js +1 -1
  56. package/dist/icon-set/material-icons.umd.min.js +1 -1
  57. package/dist/icon-set/mdi-v3.umd.min.js +1 -1
  58. package/dist/icon-set/mdi-v4.umd.min.js +1 -1
  59. package/dist/icon-set/mdi-v5.umd.min.js +1 -1
  60. package/dist/icon-set/mdi-v6.umd.min.js +1 -1
  61. package/dist/icon-set/svg-bootstrap-icons.umd.min.js +1 -1
  62. package/dist/icon-set/svg-eva-icons.umd.min.js +1 -1
  63. package/dist/icon-set/svg-fontawesome-v5.umd.min.js +1 -1
  64. package/dist/icon-set/svg-ionicons-v4.umd.min.js +1 -1
  65. package/dist/icon-set/svg-ionicons-v5.umd.min.js +1 -1
  66. package/dist/icon-set/svg-ionicons-v6.umd.min.js +6 -0
  67. package/dist/icon-set/svg-line-awesome.umd.min.js +1 -1
  68. package/dist/icon-set/svg-material-icons-outlined.umd.min.js +1 -1
  69. package/dist/icon-set/svg-material-icons-round.umd.min.js +1 -1
  70. package/dist/icon-set/svg-material-icons-sharp.umd.min.js +1 -1
  71. package/dist/icon-set/svg-material-icons.umd.min.js +1 -1
  72. package/dist/icon-set/svg-mdi-v4.umd.min.js +1 -1
  73. package/dist/icon-set/svg-mdi-v5.umd.min.js +1 -1
  74. package/dist/icon-set/svg-mdi-v6.umd.min.js +1 -1
  75. package/dist/icon-set/svg-themify.umd.min.js +1 -1
  76. package/dist/icon-set/themify.umd.min.js +1 -1
  77. package/dist/lang/ar.umd.min.js +2 -2
  78. package/dist/lang/az-latn.umd.min.js +1 -1
  79. package/dist/lang/bg.umd.min.js +1 -1
  80. package/dist/lang/ca.umd.min.js +1 -1
  81. package/dist/lang/cs.umd.min.js +1 -1
  82. package/dist/lang/da.umd.min.js +1 -1
  83. package/dist/lang/de.umd.min.js +1 -1
  84. package/dist/lang/el.umd.min.js +1 -1
  85. package/dist/lang/en-gb.umd.min.js +1 -1
  86. package/dist/lang/en-us.umd.min.js +1 -1
  87. package/dist/lang/eo.umd.min.js +1 -1
  88. package/dist/lang/es.umd.min.js +1 -1
  89. package/dist/lang/et.umd.min.js +1 -1
  90. package/dist/lang/fa-ir.umd.min.js +1 -1
  91. package/dist/lang/fa.umd.min.js +1 -1
  92. package/dist/lang/fi.umd.min.js +1 -1
  93. package/dist/lang/fr.umd.min.js +2 -2
  94. package/dist/lang/gn.umd.min.js +1 -1
  95. package/dist/lang/he.umd.min.js +1 -1
  96. package/dist/lang/hr.umd.min.js +1 -1
  97. package/dist/lang/hu.umd.min.js +1 -1
  98. package/dist/lang/id.umd.min.js +1 -1
  99. package/dist/lang/is.umd.min.js +1 -1
  100. package/dist/lang/it.umd.min.js +1 -1
  101. package/dist/lang/ja.umd.min.js +1 -1
  102. package/dist/lang/km.umd.min.js +1 -1
  103. package/dist/lang/ko-kr.umd.min.js +1 -1
  104. package/dist/lang/kur-ckb.umd.min.js +1 -1
  105. package/dist/lang/lu.umd.min.js +1 -1
  106. package/dist/lang/lv.umd.min.js +1 -1
  107. package/dist/lang/ml.umd.min.js +1 -1
  108. package/dist/lang/ms.umd.min.js +1 -1
  109. package/dist/lang/nb-no.umd.min.js +1 -1
  110. package/dist/lang/nl.umd.min.js +1 -1
  111. package/dist/lang/pl.umd.min.js +1 -1
  112. package/dist/lang/pt-br.umd.min.js +1 -1
  113. package/dist/lang/pt.umd.min.js +1 -1
  114. package/dist/lang/ro.umd.min.js +1 -1
  115. package/dist/lang/ru.umd.min.js +1 -1
  116. package/dist/lang/sk.umd.min.js +1 -1
  117. package/dist/lang/sl.umd.min.js +1 -1
  118. package/dist/lang/sr.umd.min.js +2 -2
  119. package/dist/lang/sv.umd.min.js +1 -1
  120. package/dist/lang/ta.umd.min.js +1 -1
  121. package/dist/lang/th.umd.min.js +1 -1
  122. package/dist/lang/tr.umd.min.js +1 -1
  123. package/dist/lang/ug.umd.min.js +2 -2
  124. package/dist/lang/uk.umd.min.js +1 -1
  125. package/dist/lang/vi.umd.min.js +1 -1
  126. package/dist/lang/zh-hans.umd.min.js +2 -2
  127. package/dist/lang/zh-hant.umd.min.js +2 -2
  128. package/dist/quasar.addon.css +1 -1
  129. package/dist/quasar.addon.rtl.css +1 -1
  130. package/dist/quasar.common.js +2 -2
  131. package/dist/quasar.css +378 -226
  132. package/dist/quasar.esm.js +2 -2
  133. package/dist/quasar.ie.polyfills.js +1 -1
  134. package/dist/quasar.ie.polyfills.umd.min.js +1 -1
  135. package/dist/quasar.min.css +1 -1
  136. package/dist/quasar.rtl.css +510 -302
  137. package/dist/quasar.rtl.min.css +1 -1
  138. package/dist/quasar.sass +326 -211
  139. package/dist/quasar.styl +326 -209
  140. package/dist/quasar.umd.js +3240 -1889
  141. package/dist/quasar.umd.min.js +2 -2
  142. package/dist/quasar.umd.modern.js +3199 -1870
  143. package/dist/quasar.umd.modern.min.js +2 -2
  144. package/dist/transform-asset-urls.json +20 -0
  145. package/dist/types/index.d.ts +427 -105
  146. package/dist/types/utils/scroll.d.ts +1 -0
  147. package/dist/vetur/quasar-attributes.json +320 -92
  148. package/dist/vetur/quasar-tags.json +76 -19
  149. package/dist/web-types/web-types.json +1296 -257
  150. package/icon-set/svg-ionicons-v6.js +225 -0
  151. package/lang/ar.js +1 -1
  152. package/lang/fa-ir.js +3 -1
  153. package/lang/fa.js +3 -1
  154. package/lang/fr.js +1 -1
  155. package/lang/index.json +1 -1
  156. package/lang/kur-ckb.js +2 -2
  157. package/lang/sr.js +4 -4
  158. package/lang/ug.js +48 -46
  159. package/lang/zh-hans.js +1 -1
  160. package/lang/zh-hant.js +18 -18
  161. package/package.json +1 -1
  162. package/src/api.extends.json +1 -2
  163. package/src/components/ajax-bar/QAjaxBar.js +48 -26
  164. package/src/components/ajax-bar/QAjaxBar.json +22 -4
  165. package/src/components/breadcrumbs/QBreadcrumbs.js +15 -11
  166. package/src/components/breadcrumbs/QBreadcrumbs.sass +0 -3
  167. package/src/components/breadcrumbs/QBreadcrumbs.styl +0 -3
  168. package/src/components/breadcrumbs/QBreadcrumbsEl.js +25 -9
  169. package/src/components/btn/QBtn.js +3 -3
  170. package/src/components/btn-dropdown/QBtnDropdown.sass +2 -0
  171. package/src/components/btn-dropdown/QBtnDropdown.styl +2 -0
  172. package/src/components/btn-toggle/QBtnToggle.js +4 -1
  173. package/src/components/carousel/QCarousel.js +6 -2
  174. package/src/components/carousel/QCarousel.json +9 -1
  175. package/src/components/carousel/QCarouselSlide.json +2 -2
  176. package/src/components/chat/QChatMessage.json +1 -1
  177. package/src/components/color/QColor.js +100 -85
  178. package/src/components/color/QColor.json +7 -0
  179. package/src/components/color/QColor.sass +14 -24
  180. package/src/components/color/QColor.styl +14 -24
  181. package/src/components/date/QDate.js +7 -1
  182. package/src/components/date/QDate.sass +2 -0
  183. package/src/components/date/QDate.styl +2 -0
  184. package/src/components/dialog/QDialog.js +8 -4
  185. package/src/components/dialog/QDialog.json +8 -1
  186. package/src/components/drawer/QDrawer.js +16 -15
  187. package/src/components/editor/QEditor.js +2 -2
  188. package/src/components/editor/QEditor.sass +13 -1
  189. package/src/components/editor/QEditor.styl +13 -1
  190. package/src/components/expansion-item/QExpansionItem.js +13 -11
  191. package/src/components/fab/QFab.js +20 -11
  192. package/src/components/fab/QFab.json +35 -0
  193. package/src/components/fab/QFabAction.js +16 -9
  194. package/src/components/fab/QFabAction.json +10 -0
  195. package/src/components/field/QField.js +28 -23
  196. package/src/components/field/__QField.json +72 -8
  197. package/src/components/file/QFile.js +12 -4
  198. package/src/components/file/QFile.sass +4 -3
  199. package/src/components/file/QFile.styl +4 -3
  200. package/src/components/footer/QFooter.js +1 -1
  201. package/src/components/form/QForm.js +1 -1
  202. package/src/components/header/QHeader.js +1 -1
  203. package/src/components/icon/QIcon.js +92 -75
  204. package/src/components/icon/QIcon.sass +0 -1
  205. package/src/components/icon/QIcon.styl +0 -1
  206. package/src/components/img/QImg.json +2 -2
  207. package/src/components/infinite-scroll/QInfiniteScroll.js +49 -36
  208. package/src/components/inner-loading/QInnerLoading.js +54 -22
  209. package/src/components/inner-loading/QInnerLoading.json +29 -0
  210. package/src/components/inner-loading/QInnerLoading.sass +3 -0
  211. package/src/components/inner-loading/QInnerLoading.styl +3 -0
  212. package/src/components/item/QItem.js +9 -15
  213. package/src/components/layout/QLayout.js +49 -0
  214. package/src/components/linear-progress/QLinearProgress.js +6 -2
  215. package/src/components/menu/QMenu.js +5 -1
  216. package/src/components/option-group/QOptionGroup.js +32 -22
  217. package/src/components/option-group/QOptionGroup.json +50 -1
  218. package/src/components/parallax/QParallax.js +3 -0
  219. package/src/components/parallax/QParallax.json +1 -1
  220. package/src/components/popup-edit/QPopupEdit.js +41 -16
  221. package/src/components/popup-edit/QPopupEdit.json +15 -8
  222. package/src/components/range/QRange.js +223 -278
  223. package/src/components/range/QRange.json +11 -122
  224. package/src/components/rating/QRating.js +56 -38
  225. package/src/components/rating/QRating.json +3 -3
  226. package/src/components/rating/QRating.sass +8 -6
  227. package/src/components/rating/QRating.styl +8 -6
  228. package/src/components/resize-observer/QResizeObserver.js +15 -10
  229. package/src/components/scroll-area/QScrollArea.js +342 -126
  230. package/src/components/scroll-area/QScrollArea.json +164 -20
  231. package/src/components/scroll-area/QScrollArea.sass +5 -0
  232. package/src/components/scroll-area/QScrollArea.styl +5 -0
  233. package/src/components/scroll-observer/QScrollObserver.js +9 -2
  234. package/src/components/select/QSelect.js +8 -2
  235. package/src/components/select/QSelect.json +1 -1
  236. package/src/components/separator/QSeparator.js +0 -1
  237. package/src/components/separator/QSeparator.json +1 -1
  238. package/src/components/slider/QSlider.js +97 -140
  239. package/src/components/slider/QSlider.json +1 -122
  240. package/src/components/slider/QSlider.sass +205 -139
  241. package/src/components/slider/QSlider.styl +205 -139
  242. package/src/components/slider/slider-utils.js +468 -123
  243. package/src/components/slider/slider-utils.json +546 -0
  244. package/src/components/stepper/QStepper.js +1 -1
  245. package/src/components/stepper/QStepper.sass +25 -26
  246. package/src/components/stepper/QStepper.styl +25 -26
  247. package/src/components/table/QTable.sass +3 -0
  248. package/src/components/table/QTable.styl +3 -0
  249. package/src/components/tabs/QRouteTab.js +13 -13
  250. package/src/components/tabs/QRouteTab.json +0 -7
  251. package/src/components/tabs/QTab.js +71 -20
  252. package/src/components/tabs/QTabs.js +237 -52
  253. package/src/components/tabs/QTabs.json +8 -0
  254. package/src/components/tabs/QTabs.sass +6 -6
  255. package/src/components/tabs/QTabs.styl +6 -6
  256. package/src/components/time/QTime.js +6 -2
  257. package/src/components/timeline/QTimeline.sass +1 -2
  258. package/src/components/timeline/QTimeline.styl +1 -2
  259. package/src/components/timeline/QTimelineEntry.json +1 -1
  260. package/src/components/tree/QTree.js +10 -6
  261. package/src/components/tree/QTree.json +5 -0
  262. package/src/components/tree/QTree.sass +58 -4
  263. package/src/components/tree/QTree.styl +58 -4
  264. package/src/components/uploader/QUploaderBase.js +15 -19
  265. package/src/components/video/QVideo.js +4 -1
  266. package/src/components/video/QVideo.json +11 -0
  267. package/src/components/virtual-scroll/QVirtualScroll.sass +1 -0
  268. package/src/components/virtual-scroll/QVirtualScroll.styl +1 -0
  269. package/src/css/core/helpers.sass +3 -0
  270. package/src/css/core/helpers.styl +3 -0
  271. package/src/css/core/positioning.sass +5 -0
  272. package/src/css/core/positioning.styl +5 -0
  273. package/src/css/normalize.sass +0 -7
  274. package/src/css/variables.sass +4 -6
  275. package/src/css/variables.styl +4 -6
  276. package/src/directives/Scroll.js +2 -2
  277. package/src/directives/ScrollFire.js +1 -0
  278. package/src/ie-compat/ie.js +13 -13
  279. package/src/install.js +1 -1
  280. package/src/lang.js +7 -4
  281. package/src/mixins/anchor.js +3 -13
  282. package/src/mixins/btn.js +33 -38
  283. package/src/mixins/btn.json +26 -11
  284. package/src/mixins/file.js +27 -5
  285. package/src/mixins/fullscreen.js +16 -4
  286. package/src/mixins/portal.js +10 -10
  287. package/src/mixins/router-link.js +88 -14
  288. package/src/mixins/router-link.json +26 -10
  289. package/src/mixins/validate.js +33 -15
  290. package/src/mixins/virtual-scroll.js +40 -42
  291. package/src/plugins/AppFullscreen.js +41 -16
  292. package/src/plugins/BottomSheet.json +1 -1
  293. package/src/plugins/Cookies.js +1 -1
  294. package/src/plugins/Loading.js +8 -0
  295. package/src/plugins/LoadingBar.js +9 -0
  296. package/src/plugins/LoadingBar.json +1 -1
  297. package/src/plugins/Notify.js +351 -333
  298. package/src/plugins/Notify.json +20 -20
  299. package/src/plugins/Notify.sass +9 -3
  300. package/src/plugins/Notify.styl +9 -3
  301. package/src/utils/clone.js +53 -4
  302. package/src/utils/date.js +134 -69
  303. package/src/utils/dom.js +28 -9
  304. package/src/utils/extend.js +2 -2
  305. package/src/utils/focus-manager.js +8 -10
  306. package/src/utils/global-dialog.js +18 -1
  307. package/src/utils/is.js +2 -2
  308. package/src/utils/morph.js +2 -12
  309. package/src/utils/scroll.js +71 -35
@@ -6,22 +6,22 @@ import { ariaHidden } from '../../mixins/attrs'
6
6
 
7
7
  const
8
8
  xhr = isSSR ? null : XMLHttpRequest,
9
- send = isSSR ? null : xhr.prototype.send,
10
- stackStart = [],
11
- stackStop = []
9
+ open = isSSR ? null : xhr.prototype.open,
10
+ positionValues = [ 'top', 'right', 'bottom', 'left' ]
12
11
 
12
+ let stack = []
13
13
  let highjackCount = 0
14
14
 
15
15
  function translate ({ p, pos, active, horiz, reverse, dir }) {
16
16
  let x = 1, y = 1
17
17
 
18
- if (horiz) {
19
- if (reverse) { x = -1 }
18
+ if (horiz === true) {
19
+ if (reverse === true) { x = -1 }
20
20
  if (pos === 'bottom') { y = -1 }
21
21
  return { transform: `translate3d(${x * (p - 100)}%,${active ? 0 : y * -200}%,0)` }
22
22
  }
23
23
 
24
- if (reverse) { y = -1 }
24
+ if (reverse === true) { y = -1 }
25
25
  if (pos === 'right') { x = -1 }
26
26
  return { transform: `translate3d(${active ? 0 : dir * x * -200}%,${y * (p - 100)}%,0)` }
27
27
  }
@@ -47,32 +47,46 @@ function inc (p, amount) {
47
47
  return between(p + amount, 0, 100)
48
48
  }
49
49
 
50
- function highjackAjax (start, stop) {
51
- stackStart.push(start)
52
- stackStop.push(stop)
53
-
50
+ function highjackAjax (stackEntry) {
54
51
  highjackCount++
55
52
 
53
+ stack.push(stackEntry)
54
+
56
55
  if (highjackCount > 1) { return }
57
56
 
58
- function endHandler () {
59
- stackStop.forEach(fn => { fn() })
60
- }
57
+ xhr.prototype.open = function (_, url) {
58
+ const stopStack = []
59
+
60
+ const loadStart = () => {
61
+ stack.forEach(entry => {
62
+ const hijackFilter = entry.getHijackFilter()
63
+ if (
64
+ hijackFilter === null ||
65
+ hijackFilter(url) === true
66
+ ) {
67
+ entry.start()
68
+ stopStack.push(entry.stop)
69
+ }
70
+ })
71
+ }
61
72
 
62
- xhr.prototype.send = function (/* ...args */) {
63
- stackStart.forEach(fn => { fn() })
64
- this.addEventListener('loadend', endHandler, false)
65
- send.apply(this, arguments)
73
+ const loadEnd = () => {
74
+ stopStack.forEach(stop => { stop() })
75
+ }
76
+
77
+ this.addEventListener('loadstart', loadStart, { once: true })
78
+ this.addEventListener('loadend', loadEnd, { once: true })
79
+
80
+ open.apply(this, arguments)
66
81
  }
67
82
  }
68
83
 
69
- function restoreAjax (start, stop) {
70
- stackStart.splice(stackStart.indexOf(start), 1)
71
- stackStop.splice(stackStop.indexOf(stop), 1)
84
+ function restoreAjax (start) {
85
+ stack = stack.filter(entry => entry.start !== start)
72
86
 
73
87
  highjackCount = Math.max(0, highjackCount - 1)
74
88
  if (!highjackCount) {
75
- xhr.prototype.send = send
89
+ xhr.prototype.open = open
76
90
  }
77
91
  }
78
92
 
@@ -83,15 +97,19 @@ export default Vue.extend({
83
97
  position: {
84
98
  type: String,
85
99
  default: 'top',
86
- validator: val => ['top', 'right', 'bottom', 'left'].includes(val)
100
+ validator: val => positionValues.includes(val)
87
101
  },
102
+
88
103
  size: {
89
104
  type: String,
90
105
  default: '2px'
91
106
  },
107
+
92
108
  color: String,
109
+ reverse: Boolean,
110
+
93
111
  skipHijack: Boolean,
94
- reverse: Boolean
112
+ hijackFilter: Function
95
113
  },
96
114
 
97
115
  data () {
@@ -119,7 +137,7 @@ export default Vue.extend({
119
137
  active,
120
138
  horiz: this.horizontal,
121
139
  reverse: this.$q.lang.rtl === true && ['top', 'bottom'].includes(this.position)
122
- ? !this.reverse
140
+ ? this.reverse === false
123
141
  : this.reverse,
124
142
  dir: this.$q.lang.rtl === true ? -1 : 1
125
143
  })
@@ -224,13 +242,17 @@ export default Vue.extend({
224
242
  mounted () {
225
243
  if (this.skipHijack !== true) {
226
244
  this.hijacked = true
227
- highjackAjax(this.start, this.stop)
245
+ highjackAjax({
246
+ start: this.start,
247
+ stop: this.stop,
248
+ getHijackFilter: () => this.hijackFilter || null
249
+ })
228
250
  }
229
251
  },
230
252
 
231
253
  beforeDestroy () {
232
254
  clearTimeout(this.timer)
233
- this.hijacked === true && restoreAjax(this.start, this.stop)
255
+ this.hijacked === true && restoreAjax(this.start)
234
256
  },
235
257
 
236
258
  render (h) {
@@ -22,16 +22,34 @@
22
22
  "extends": "color"
23
23
  },
24
24
 
25
- "skip-hijack": {
25
+ "reverse": {
26
26
  "type": "Boolean",
27
- "desc": "Skip Ajax hijacking (not a reactive prop)",
27
+ "desc": "Reverse direction of progress",
28
28
  "category": "behavior"
29
29
  },
30
30
 
31
- "reverse": {
31
+ "skip-hijack": {
32
32
  "type": "Boolean",
33
- "desc": "Reverse direction of progress",
33
+ "desc": "Skip Ajax hijacking (not a reactive prop)",
34
34
  "category": "behavior"
35
+ },
36
+
37
+ "hijack-filter": {
38
+ "type": "Function",
39
+ "desc": "Filter which URL should trigger start() + stop()",
40
+ "params": {
41
+ "url": {
42
+ "type": "String",
43
+ "desc": "The URL being triggered",
44
+ "examples": [ "https://some.url/path" ]
45
+ }
46
+ },
47
+ "returns": {
48
+ "type": "Boolean",
49
+ "desc": "Should the URL received as param trigger start() + stop()?"
50
+ },
51
+ "category": "behavior",
52
+ "addedIn": "v1.17.2"
35
53
  }
36
54
  },
37
55
 
@@ -4,6 +4,8 @@ import AlignMixin from '../../mixins/align.js'
4
4
  import { slot } from '../../utils/slot.js'
5
5
  import ListenersMixin from '../../mixins/listeners.js'
6
6
 
7
+ const disabledValues = [ true, '' ]
8
+
7
9
  export default Vue.extend({
8
10
  name: 'QBreadcrumbs',
9
11
 
@@ -34,13 +36,13 @@ export default Vue.extend({
34
36
  },
35
37
 
36
38
  sepClass () {
37
- if (this.separatorColor) {
38
- return `text-${this.separatorColor}`
39
- }
39
+ return this.separatorColor
40
+ ? ` text-${this.separatorColor}`
41
+ : ''
40
42
  },
41
43
 
42
44
  activeClass () {
43
- return `text-${this.activeColor}`
45
+ return ` text-${this.activeColor}`
44
46
  }
45
47
  },
46
48
 
@@ -60,18 +62,20 @@ export default Vue.extend({
60
62
  nodes.forEach(comp => {
61
63
  if (comp.tag !== void 0 && comp.tag.endsWith('-QBreadcrumbsEl')) {
62
64
  const middle = els < len
65
+ const disabled = disabledValues.includes(comp.componentOptions.propsData.disable)
66
+ const cls = middle === true
67
+ ? (disabled !== true ? this.activeClass : '')
68
+ : ' q-breadcrumbs--last'
69
+
63
70
  els++
64
71
 
65
72
  child.push(h('div', {
66
- staticClass: 'flex items-center',
67
- class: middle ? this.activeClass : 'q-breadcrumbs--last'
73
+ staticClass: 'flex items-center' + cls
68
74
  }, [ comp ]))
69
75
 
70
- if (middle) {
71
- child.push(h('div', {
72
- staticClass: 'q-breadcrumbs__separator', class: this.sepClass
73
- }, separator()))
74
- }
76
+ middle === true && child.push(h('div', {
77
+ staticClass: 'q-breadcrumbs__separator' + this.sepClass
78
+ }, separator()))
75
79
  }
76
80
  else {
77
81
  child.push(comp)
@@ -9,8 +9,5 @@
9
9
  &--with-label
10
10
  margin-right: 8px
11
11
 
12
- &--last a
13
- pointer-events: none
14
-
15
12
  [dir=rtl] .q-breadcrumbs__separator .q-icon
16
13
  transform: scaleX(-1) #{"/* rtl:ignore */"}
@@ -9,8 +9,5 @@
9
9
  &--with-label
10
10
  margin-right: 8px
11
11
 
12
- &--last a
13
- pointer-events: none
14
-
15
12
  [dir=rtl] .q-breadcrumbs__separator .q-icon
16
13
  transform: scaleX(-1) /* rtl:ignore */
@@ -2,9 +2,9 @@ import Vue from 'vue'
2
2
 
3
3
  import { mergeSlot } from '../../utils/slot.js'
4
4
  import ListenersMixin from '../../mixins/listeners.js'
5
+ import RouterLinkMixin from '../../mixins/router-link.js'
5
6
 
6
7
  import QIcon from '../icon/QIcon.js'
7
- import { RouterLinkMixin } from '../../mixins/router-link.js'
8
8
 
9
9
  export default Vue.extend({
10
10
  name: 'QBreadcrumbsEl',
@@ -16,23 +16,39 @@ export default Vue.extend({
16
16
  icon: String
17
17
  },
18
18
 
19
+ computed: {
20
+ iconClass () {
21
+ return 'q-breadcrumbs__el-icon' +
22
+ (this.label !== void 0 ? ' q-breadcrumbs__el-icon--with-label' : '')
23
+ },
24
+
25
+ renderData () {
26
+ return {
27
+ staticClass: 'q-breadcrumbs__el q-link ' +
28
+ 'flex inline items-center relative-position ' +
29
+ (this.disable !== true ? 'q-link--focusable' : 'q-breadcrumbs__el--disabled'),
30
+ ...this.linkProps,
31
+ [this.hasRouterLink === true ? 'nativeOn' : 'on']: { ...this.qListeners }
32
+ }
33
+ }
34
+ },
35
+
36
+ beforeCreate () {
37
+ this.fallbackTag = 'span'
38
+ },
39
+
19
40
  render (h) {
20
41
  const child = []
21
42
 
22
43
  this.icon !== void 0 && child.push(
23
44
  h(QIcon, {
24
- staticClass: 'q-breadcrumbs__el-icon',
25
- class: this.label !== void 0 ? 'q-breadcrumbs__el-icon--with-label' : null,
45
+ class: this.iconClass,
26
46
  props: { name: this.icon }
27
47
  })
28
48
  )
29
49
 
30
- this.label && child.push(this.label)
50
+ this.label !== void 0 && child.push(this.label)
31
51
 
32
- return h(this.hasRouterLink === true ? 'router-link' : 'span', {
33
- staticClass: 'q-breadcrumbs__el q-link flex inline items-center relative-position',
34
- props: this.hasRouterLink === true ? this.routerLinkProps : null,
35
- [this.hasRouterLink === true ? 'nativeOn' : 'on']: { ...this.qListeners }
36
- }, mergeSlot(child, this, 'default'))
52
+ return h(this.linkTag, this.renderData, mergeSlot(child, this, 'default'))
37
53
  }
38
54
  })
@@ -37,7 +37,7 @@ export default Vue.extend({
37
37
  return this.ripple === false
38
38
  ? false
39
39
  : {
40
- keyCodes: this.isLink === true ? [ 13, 32 ] : [ 13 ],
40
+ keyCodes: this.hasLink === true ? [ 13, 32 ] : [ 13 ],
41
41
  ...(this.ripple === true ? {} : this.ripple)
42
42
  }
43
43
  },
@@ -147,7 +147,7 @@ export default Vue.extend({
147
147
  // vue-router now throwing error if navigating
148
148
  // to the same route that the user is currently at
149
149
  // https://github.com/vuejs/vue-router/issues/2872
150
- this.$router[this.replace === true ? 'replace' : 'push'](this.currentLocation.route, void 0, noop)
150
+ this.$router[this.replace === true ? 'replace' : 'push'](this.linkRoute.route, void 0, noop)
151
151
  }
152
152
 
153
153
  this.$emit('click', e, go)
@@ -346,7 +346,7 @@ export default Vue.extend({
346
346
  ] : void 0)
347
347
  )
348
348
 
349
- return h(this.isLink === true ? 'a' : 'button', {
349
+ return h(this.hasLink === true || this.type === 'a' ? 'a' : 'button', {
350
350
  staticClass: 'q-btn q-btn-item non-selectable no-outline',
351
351
  class: this.classes,
352
352
  style: this.style,
@@ -1,5 +1,7 @@
1
1
  .q-btn-dropdown
2
2
  &--split .q-btn-dropdown__arrow-container
3
+ &.q-btn--outline
4
+ border-left: 1px solid currentColor
3
5
  &:not(.q-btn--outline)
4
6
  border-left: 1px solid rgba(255,255,255,.3)
5
7
 
@@ -1,5 +1,7 @@
1
1
  .q-btn-dropdown
2
2
  &--split .q-btn-dropdown__arrow-container
3
+ &.q-btn--outline
4
+ border-left: 1px solid currentColor
3
5
  &:not(.q-btn--outline)
4
6
  border-left: 1px solid rgba(255,255,255,.3)
5
7
 
@@ -87,7 +87,10 @@ export default Vue.extend({
87
87
  ...this.qListeners,
88
88
  click: e => this.__set(opt.value, opt, e)
89
89
  },
90
- attrs: opt.attrs,
90
+ attrs: {
91
+ 'aria-pressed': opt.value === this.value ? 'true' : 'false',
92
+ ...opt.attrs
93
+ },
91
94
  props: {
92
95
  ...opt,
93
96
  slot: void 0,
@@ -127,9 +127,13 @@ export default Vue.extend({
127
127
 
128
128
  methods: {
129
129
  __startTimer () {
130
+ const duration = isNumber(this.autoplay) === true
131
+ ? this.autoplay
132
+ : 5000
133
+
130
134
  this.timer = setTimeout(
131
- this.next,
132
- isNumber(this.autoplay) ? this.autoplay : 5000
135
+ duration >= 0 ? this.next : this.previous,
136
+ Math.abs(duration)
133
137
  )
134
138
  },
135
139
 
@@ -47,7 +47,7 @@
47
47
 
48
48
  "autoplay": {
49
49
  "type": [ "Number", "Boolean" ],
50
- "desc": "Jump to next slide at fixed time intervals (in milliseconds); 'false' disables autoplay, 'true' enables it for 5000ms intervals",
50
+ "desc": "Jump to next slide (if 'true' or val > 0) or previous slide (if val < 0) at fixed time intervals (in milliseconds); 'false' disables autoplay, 'true' enables it for 5000ms intervals",
51
51
  "default": false,
52
52
  "examples": [
53
53
  ":autoplay=\"2500\"",
@@ -101,6 +101,14 @@
101
101
  "type": "Boolean",
102
102
  "desc": "Show thumbnails",
103
103
  "category": "content"
104
+ },
105
+
106
+ "transition-prev": {
107
+ "default": "fade"
108
+ },
109
+
110
+ "transition-next": {
111
+ "default": "fade"
104
112
  }
105
113
  },
106
114
 
@@ -20,10 +20,10 @@
20
20
 
21
21
  "img-src": {
22
22
  "type": "String",
23
- "desc": "URL pointing to a slide background image (use statics folder)",
23
+ "desc": "URL pointing to a slide background image (use public folder)",
24
24
  "transformAssetUrls": true,
25
25
  "examples": [
26
- "(statics folder) src=\"statics/img/my-bg.png\"",
26
+ "(public folder) src=\"img/my-bg.png\"",
27
27
  "(assets folder) src=\"~assets/my-img.png\"",
28
28
  "(relative path format) :src=\"require('./my_img.jpg')\"",
29
29
  "(URL) src=\"https://placeimg.com/500/300/nature\""
@@ -45,7 +45,7 @@
45
45
  "desc": "URL to the avatar image of the author",
46
46
  "transformAssetUrls": true,
47
47
  "examples": [
48
- "(statics folder) src=\"statics/boy-avatar.png\"",
48
+ "(public folder) src=\"boy-avatar.png\"",
49
49
  "(assets folder) src=\"~assets/boy-avatar.png\"",
50
50
  "(relative path format) :src=\"require('./my_img.jpg')\"",
51
51
  "(URL) src=\"https://placeimg.com/500/300/nature\""
@@ -33,6 +33,9 @@ const palette = [
33
33
  'rgb(255,255,255)', 'rgb(205,205,205)', 'rgb(178,178,178)', 'rgb(153,153,153)', 'rgb(127,127,127)', 'rgb(102,102,102)', 'rgb(76,76,76)', 'rgb(51,51,51)', 'rgb(25,25,25)', 'rgb(0,0,0)'
34
34
  ]
35
35
 
36
+ const thumbPath = 'M5 5 h10 v10 h-10 v-10 z'
37
+ const alphaTrackImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAH0lEQVQoU2NkYGAwZkAFZ5G5jPRRgOYEVDeB3EBjBQBOZwTVugIGyAAAAABJRU5ErkJggg=='
38
+
36
39
  export default Vue.extend({
37
40
  name: 'QColor',
38
41
 
@@ -61,6 +64,7 @@ export default Vue.extend({
61
64
  palette: Array,
62
65
 
63
66
  noHeader: Boolean,
67
+ noHeaderTabs: Boolean,
64
68
  noFooter: Boolean,
65
69
 
66
70
  square: Boolean,
@@ -228,71 +232,78 @@ export default Vue.extend({
228
232
 
229
233
  methods: {
230
234
  __getHeader (h) {
231
- return h('div', {
232
- staticClass: 'q-color-picker__header relative-position overflow-hidden'
233
- }, [
234
- h('div', { staticClass: 'q-color-picker__header-bg absolute-full' }),
235
+ const child = []
235
236
 
236
- h('div', {
237
- staticClass: 'q-color-picker__header-content absolute-full',
238
- class: this.headerClass,
239
- style: this.currentBgColor
237
+ this.noHeaderTabs !== true && child.push(
238
+ h(QTabs, {
239
+ class: 'q-color-picker__header-tabs',
240
+ props: {
241
+ value: this.topView,
242
+ dense: true,
243
+ align: 'justify'
244
+ },
245
+ on: cache(this, 'topVTab', {
246
+ input: val => { this.topView = val }
247
+ })
240
248
  }, [
241
- h(QTabs, {
249
+ h(QTab, {
242
250
  props: {
243
- value: this.topView,
244
- dense: true,
245
- align: 'justify'
246
- },
247
- on: cache(this, 'topVTab', {
248
- input: val => { this.topView = val }
249
- })
250
- }, [
251
- h(QTab, {
252
- props: {
253
- label: 'HEX' + (this.hasAlpha === true ? 'A' : ''),
254
- name: 'hex',
255
- ripple: false
256
- }
257
- }),
251
+ label: 'HEX' + (this.hasAlpha === true ? 'A' : ''),
252
+ name: 'hex',
253
+ ripple: false
254
+ }
255
+ }),
258
256
 
259
- h(QTab, {
260
- props: {
261
- label: 'RGB' + (this.hasAlpha === true ? 'A' : ''),
262
- name: 'rgb',
263
- ripple: false
257
+ h(QTab, {
258
+ props: {
259
+ label: 'RGB' + (this.hasAlpha === true ? 'A' : ''),
260
+ name: 'rgb',
261
+ ripple: false
262
+ }
263
+ })
264
+ ])
265
+ )
266
+
267
+ child.push(
268
+ h('div', {
269
+ staticClass: 'q-color-picker__header-banner row flex-center no-wrap'
270
+ }, [
271
+ h('input', {
272
+ staticClass: 'fit',
273
+ domProps: { value: this.model[this.topView] },
274
+ attrs: this.editable !== true ? {
275
+ readonly: true
276
+ } : null,
277
+ on: cache(this, 'topIn', {
278
+ input: evt => {
279
+ this.__updateErrorIcon(this.__onEditorChange(evt) === true)
280
+ },
281
+ change: stop,
282
+ blur: evt => {
283
+ this.__onEditorChange(evt, true) === true && this.$forceUpdate()
284
+ this.__updateErrorIcon(false)
264
285
  }
265
286
  })
266
- ]),
267
-
268
- h('div', {
269
- staticClass: 'q-color-picker__header-banner row flex-center no-wrap'
270
- }, [
271
- h('input', {
272
- staticClass: 'fit',
273
- domProps: { value: this.model[this.topView] },
274
- attrs: this.editable !== true ? {
275
- readonly: true
276
- } : null,
277
- on: cache(this, 'topIn', {
278
- input: evt => {
279
- this.__updateErrorIcon(this.__onEditorChange(evt) === true)
280
- },
281
- change: stop,
282
- blur: evt => {
283
- this.__onEditorChange(evt, true) === true && this.$forceUpdate()
284
- this.__updateErrorIcon(false)
285
- }
286
- })
287
- }),
287
+ }),
288
288
 
289
- h(QIcon, {
290
- ref: 'errorIcon',
291
- staticClass: 'q-color-picker__error-icon absolute no-pointer-events',
292
- props: { name: this.$q.iconSet.type.negative }
293
- })
294
- ])
289
+ h(QIcon, {
290
+ ref: 'errorIcon',
291
+ staticClass: 'q-color-picker__error-icon absolute no-pointer-events',
292
+ props: { name: this.$q.iconSet.type.negative }
293
+ })
295
294
  ])
295
+ )
296
+
297
+ return h('div', {
298
+ staticClass: 'q-color-picker__header relative-position overflow-hidden'
299
+ }, [
300
+ h('div', { staticClass: 'q-color-picker__header-bg absolute-full' }),
301
+
302
+ h('div', {
303
+ staticClass: 'q-color-picker__header-content',
304
+ class: this.headerClass,
305
+ style: this.currentBgColor
306
+ }, child)
296
307
  ])
297
308
  },
298
309
 
@@ -363,8 +374,6 @@ export default Vue.extend({
363
374
  },
364
375
 
365
376
  __getSpectrumTab (h) {
366
- const thumbPath = 'M5 5 h10 v10 h-10 v-10 z'
367
-
368
377
  return [
369
378
  h('div', {
370
379
  ref: 'spectrum',
@@ -403,39 +412,45 @@ export default Vue.extend({
403
412
  h('div', {
404
413
  staticClass: 'q-color-picker__sliders'
405
414
  }, [
406
- h('div', { staticClass: 'q-color-picker__hue non-selectable' }, [
407
- h(QSlider, {
415
+ h(QSlider, {
416
+ staticClass: 'q-color-picker__hue non-selectable',
417
+ props: {
418
+ value: this.model.h,
419
+ min: 0,
420
+ max: 360,
421
+ trackSize: '8px',
422
+ innerTrackColor: 'transparent',
423
+ selectionColor: 'transparent',
424
+ readonly: this.editable !== true,
425
+ thumbPath
426
+ },
427
+ on: cache(this, 'hueSlide', {
428
+ input: this.__onHueChange,
429
+ change: val => this.__onHueChange(val, true)
430
+ })
431
+ }),
432
+
433
+ this.hasAlpha === true
434
+ ? h(QSlider, {
435
+ staticClass: 'q-color-picker__alpha non-selectable',
408
436
  props: {
409
- value: this.model.h,
437
+ value: this.model.a,
410
438
  min: 0,
411
- max: 360,
412
- fillHandleAlways: true,
439
+ max: 100,
440
+ trackSize: '8px',
441
+ trackColor: 'white',
442
+ innerTrackColor: 'transparent',
443
+ selectionColor: 'transparent',
444
+ trackImg: alphaTrackImg,
413
445
  readonly: this.editable !== true,
446
+ hideSelection: true,
414
447
  thumbPath
415
448
  },
416
- on: cache(this, 'hueSlide', {
417
- input: this.__onHueChange,
418
- change: val => this.__onHueChange(val, true)
449
+ on: cache(this, 'alphaSlide', {
450
+ input: value => this.__onNumericChange(value, 'a', 100),
451
+ change: value => this.__onNumericChange(value, 'a', 100, void 0, true)
419
452
  })
420
453
  })
421
- ]),
422
- this.hasAlpha === true
423
- ? h('div', { staticClass: 'q-color-picker__alpha non-selectable' }, [
424
- h(QSlider, {
425
- props: {
426
- value: this.model.a,
427
- min: 0,
428
- max: 100,
429
- fillHandleAlways: true,
430
- readonly: this.editable !== true,
431
- thumbPath
432
- },
433
- on: cache(this, 'alphaSlide', {
434
- input: value => this.__onNumericChange(value, 'a', 100),
435
- change: value => this.__onNumericChange(value, 'a', 100, void 0, true)
436
- })
437
- })
438
- ])
439
454
  : null
440
455
  ])
441
456
  ]