quasar 1.16.0 → 1.17.0

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 (304) hide show
  1. package/dist/api/BottomSheet.json +2 -2
  2. package/dist/api/Loading.json +0 -2
  3. package/dist/api/Notify.json +15 -15
  4. package/dist/api/QAvatar.json +1 -1
  5. package/dist/api/QBreadcrumbsEl.json +32 -11
  6. package/dist/api/QBtn.json +35 -14
  7. package/dist/api/QBtnDropdown.json +36 -15
  8. package/dist/api/QBtnToggle.json +1 -1
  9. package/dist/api/QCarousel.json +7 -7
  10. package/dist/api/QCarouselSlide.json +2 -2
  11. package/dist/api/QChatMessage.json +1 -5
  12. package/dist/api/QChip.json +4 -4
  13. package/dist/api/QColor.json +6 -0
  14. package/dist/api/QDialog.json +7 -1
  15. package/dist/api/QExpansionItem.json +34 -13
  16. package/dist/api/QFab.json +34 -2
  17. package/dist/api/QFabAction.json +9 -1
  18. package/dist/api/QField.json +80 -6
  19. package/dist/api/QFile.json +80 -6
  20. package/dist/api/QImg.json +2 -2
  21. package/dist/api/QInnerLoading.json +32 -0
  22. package/dist/api/QInput.json +82 -6
  23. package/dist/api/QItem.json +31 -10
  24. package/dist/api/QOptionGroup.json +58 -1
  25. package/dist/api/QPagination.json +4 -4
  26. package/dist/api/QParallax.json +1 -1
  27. package/dist/api/QPopupEdit.json +14 -7
  28. package/dist/api/QPullToRefresh.json +1 -1
  29. package/dist/api/QRange.json +581 -96
  30. package/dist/api/QRating.json +3 -3
  31. package/dist/api/QRouteTab.json +32 -12
  32. package/dist/api/QScrollArea.json +188 -20
  33. package/dist/api/QSelect.json +81 -9
  34. package/dist/api/QSeparator.json +1 -1
  35. package/dist/api/QSlider.json +499 -34
  36. package/dist/api/QStep.json +4 -4
  37. package/dist/api/QStepper.json +4 -4
  38. package/dist/api/QTab.json +1 -1
  39. package/dist/api/QTable.json +4 -4
  40. package/dist/api/QTabs.json +9 -0
  41. package/dist/api/QTimelineEntry.json +2 -2
  42. package/dist/api/QToggle.json +1 -1
  43. package/dist/api/QTree.json +7 -1
  44. package/dist/api/QVideo.json +10 -0
  45. package/dist/icon-set/bootstrap-icons.umd.min.js +1 -1
  46. package/dist/icon-set/eva-icons.umd.min.js +1 -1
  47. package/dist/icon-set/fontawesome-v5-pro.umd.min.js +1 -1
  48. package/dist/icon-set/fontawesome-v5.umd.min.js +1 -1
  49. package/dist/icon-set/ionicons-v4.umd.min.js +1 -1
  50. package/dist/icon-set/line-awesome.umd.min.js +1 -1
  51. package/dist/icon-set/material-icons-outlined.umd.min.js +1 -1
  52. package/dist/icon-set/material-icons-round.umd.min.js +1 -1
  53. package/dist/icon-set/material-icons-sharp.umd.min.js +1 -1
  54. package/dist/icon-set/material-icons.umd.min.js +1 -1
  55. package/dist/icon-set/mdi-v3.umd.min.js +1 -1
  56. package/dist/icon-set/mdi-v4.umd.min.js +1 -1
  57. package/dist/icon-set/mdi-v5.umd.min.js +1 -1
  58. package/dist/icon-set/mdi-v6.umd.min.js +1 -1
  59. package/dist/icon-set/svg-bootstrap-icons.umd.min.js +1 -1
  60. package/dist/icon-set/svg-eva-icons.umd.min.js +1 -1
  61. package/dist/icon-set/svg-fontawesome-v5.umd.min.js +1 -1
  62. package/dist/icon-set/svg-ionicons-v4.umd.min.js +1 -1
  63. package/dist/icon-set/svg-ionicons-v5.umd.min.js +1 -1
  64. package/dist/icon-set/svg-ionicons-v6.umd.min.js +6 -0
  65. package/dist/icon-set/svg-line-awesome.umd.min.js +1 -1
  66. package/dist/icon-set/svg-material-icons-outlined.umd.min.js +1 -1
  67. package/dist/icon-set/svg-material-icons-round.umd.min.js +1 -1
  68. package/dist/icon-set/svg-material-icons-sharp.umd.min.js +1 -1
  69. package/dist/icon-set/svg-material-icons.umd.min.js +1 -1
  70. package/dist/icon-set/svg-mdi-v4.umd.min.js +1 -1
  71. package/dist/icon-set/svg-mdi-v5.umd.min.js +1 -1
  72. package/dist/icon-set/svg-mdi-v6.umd.min.js +1 -1
  73. package/dist/icon-set/svg-themify.umd.min.js +1 -1
  74. package/dist/icon-set/themify.umd.min.js +1 -1
  75. package/dist/lang/ar.umd.min.js +2 -2
  76. package/dist/lang/az-latn.umd.min.js +1 -1
  77. package/dist/lang/bg.umd.min.js +1 -1
  78. package/dist/lang/ca.umd.min.js +1 -1
  79. package/dist/lang/cs.umd.min.js +1 -1
  80. package/dist/lang/da.umd.min.js +1 -1
  81. package/dist/lang/de.umd.min.js +2 -2
  82. package/dist/lang/el.umd.min.js +1 -1
  83. package/dist/lang/en-gb.umd.min.js +1 -1
  84. package/dist/lang/en-us.umd.min.js +1 -1
  85. package/dist/lang/eo.umd.min.js +1 -1
  86. package/dist/lang/es.umd.min.js +1 -1
  87. package/dist/lang/et.umd.min.js +1 -1
  88. package/dist/lang/fa-ir.umd.min.js +1 -1
  89. package/dist/lang/fa.umd.min.js +1 -1
  90. package/dist/lang/fi.umd.min.js +1 -1
  91. package/dist/lang/fr.umd.min.js +2 -2
  92. package/dist/lang/gn.umd.min.js +1 -1
  93. package/dist/lang/he.umd.min.js +1 -1
  94. package/dist/lang/hr.umd.min.js +1 -1
  95. package/dist/lang/hu.umd.min.js +1 -1
  96. package/dist/lang/id.umd.min.js +1 -1
  97. package/dist/lang/is.umd.min.js +1 -1
  98. package/dist/lang/it.umd.min.js +1 -1
  99. package/dist/lang/ja.umd.min.js +1 -1
  100. package/dist/lang/km.umd.min.js +1 -1
  101. package/dist/lang/ko-kr.umd.min.js +1 -1
  102. package/dist/lang/kur-ckb.umd.min.js +1 -1
  103. package/dist/lang/lu.umd.min.js +1 -1
  104. package/dist/lang/lv.umd.min.js +1 -1
  105. package/dist/lang/ml.umd.min.js +1 -1
  106. package/dist/lang/ms.umd.min.js +1 -1
  107. package/dist/lang/nb-no.umd.min.js +1 -1
  108. package/dist/lang/nl.umd.min.js +1 -1
  109. package/dist/lang/pl.umd.min.js +1 -1
  110. package/dist/lang/pt-br.umd.min.js +1 -1
  111. package/dist/lang/pt.umd.min.js +1 -1
  112. package/dist/lang/ro.umd.min.js +1 -1
  113. package/dist/lang/ru.umd.min.js +1 -1
  114. package/dist/lang/sk.umd.min.js +1 -1
  115. package/dist/lang/sl.umd.min.js +1 -1
  116. package/dist/lang/sr.umd.min.js +2 -2
  117. package/dist/lang/sv.umd.min.js +1 -1
  118. package/dist/lang/ta.umd.min.js +1 -1
  119. package/dist/lang/th.umd.min.js +1 -1
  120. package/dist/lang/tr.umd.min.js +1 -1
  121. package/dist/lang/ug.umd.min.js +2 -2
  122. package/dist/lang/uk.umd.min.js +1 -1
  123. package/dist/lang/vi.umd.min.js +1 -1
  124. package/dist/lang/zh-hans.umd.min.js +2 -2
  125. package/dist/lang/zh-hant.umd.min.js +2 -2
  126. package/dist/quasar.addon.css +1 -1
  127. package/dist/quasar.addon.rtl.css +1 -1
  128. package/dist/quasar.common.js +2 -2
  129. package/dist/quasar.css +376 -228
  130. package/dist/quasar.esm.js +2 -2
  131. package/dist/quasar.ie.polyfills.js +1 -1
  132. package/dist/quasar.ie.polyfills.umd.min.js +1 -1
  133. package/dist/quasar.min.css +1 -1
  134. package/dist/quasar.rtl.css +508 -304
  135. package/dist/quasar.rtl.min.css +1 -1
  136. package/dist/quasar.sass +324 -210
  137. package/dist/quasar.styl +324 -210
  138. package/dist/quasar.umd.js +3098 -1836
  139. package/dist/quasar.umd.min.js +2 -2
  140. package/dist/quasar.umd.modern.js +3057 -1817
  141. package/dist/quasar.umd.modern.min.js +2 -2
  142. package/dist/transform-asset-urls.json +20 -0
  143. package/dist/types/index.d.ts +421 -103
  144. package/dist/types/utils/scroll.d.ts +1 -0
  145. package/dist/vetur/quasar-attributes.json +313 -89
  146. package/dist/vetur/quasar-tags.json +74 -18
  147. package/dist/web-types/web-types.json +1289 -259
  148. package/icon-set/svg-ionicons-v6.js +225 -0
  149. package/lang/ar.js +1 -1
  150. package/lang/de.js +1 -1
  151. package/lang/fa-ir.js +3 -1
  152. package/lang/fa.js +3 -1
  153. package/lang/fr.js +1 -1
  154. package/lang/index.json +1 -1
  155. package/lang/kur-ckb.js +2 -2
  156. package/lang/sr.js +4 -4
  157. package/lang/ug.js +48 -46
  158. package/lang/zh-hans.js +1 -1
  159. package/lang/zh-hant.js +18 -18
  160. package/package.json +1 -1
  161. package/src/api.extends.json +1 -2
  162. package/src/components/breadcrumbs/QBreadcrumbs.js +15 -11
  163. package/src/components/breadcrumbs/QBreadcrumbs.sass +0 -3
  164. package/src/components/breadcrumbs/QBreadcrumbs.styl +0 -3
  165. package/src/components/breadcrumbs/QBreadcrumbsEl.js +25 -9
  166. package/src/components/btn/QBtn.js +3 -3
  167. package/src/components/btn-dropdown/QBtnDropdown.sass +2 -0
  168. package/src/components/btn-dropdown/QBtnDropdown.styl +2 -0
  169. package/src/components/carousel/QCarousel.js +6 -2
  170. package/src/components/carousel/QCarousel.json +9 -1
  171. package/src/components/carousel/QCarouselSlide.json +2 -2
  172. package/src/components/chat/QChatMessage.json +1 -1
  173. package/src/components/color/QColor.js +100 -85
  174. package/src/components/color/QColor.json +7 -0
  175. package/src/components/color/QColor.sass +14 -24
  176. package/src/components/color/QColor.styl +14 -24
  177. package/src/components/date/QDate.js +7 -1
  178. package/src/components/date/QDate.sass +2 -0
  179. package/src/components/date/QDate.styl +2 -0
  180. package/src/components/dialog/QDialog.js +8 -4
  181. package/src/components/dialog/QDialog.json +8 -1
  182. package/src/components/drawer/QDrawer.js +16 -15
  183. package/src/components/editor/QEditor.js +2 -2
  184. package/src/components/editor/QEditor.sass +13 -1
  185. package/src/components/editor/QEditor.styl +13 -1
  186. package/src/components/expansion-item/QExpansionItem.js +13 -11
  187. package/src/components/fab/QFab.js +20 -11
  188. package/src/components/fab/QFab.json +35 -0
  189. package/src/components/fab/QFabAction.js +16 -9
  190. package/src/components/fab/QFabAction.json +10 -0
  191. package/src/components/field/QField.js +28 -23
  192. package/src/components/field/__QField.json +72 -8
  193. package/src/components/file/QFile.js +12 -4
  194. package/src/components/file/QFile.sass +4 -3
  195. package/src/components/file/QFile.styl +4 -3
  196. package/src/components/footer/QFooter.js +1 -1
  197. package/src/components/form/QForm.js +1 -1
  198. package/src/components/header/QHeader.js +1 -1
  199. package/src/components/icon/QIcon.js +54 -49
  200. package/src/components/img/QImg.json +2 -2
  201. package/src/components/infinite-scroll/QInfiniteScroll.js +49 -36
  202. package/src/components/inner-loading/QInnerLoading.js +54 -22
  203. package/src/components/inner-loading/QInnerLoading.json +29 -0
  204. package/src/components/inner-loading/QInnerLoading.sass +3 -0
  205. package/src/components/inner-loading/QInnerLoading.styl +3 -0
  206. package/src/components/item/QItem.js +9 -15
  207. package/src/components/linear-progress/QLinearProgress.js +6 -2
  208. package/src/components/menu/QMenu.js +5 -1
  209. package/src/components/option-group/QOptionGroup.js +32 -22
  210. package/src/components/option-group/QOptionGroup.json +50 -1
  211. package/src/components/parallax/QParallax.js +3 -0
  212. package/src/components/parallax/QParallax.json +1 -1
  213. package/src/components/popup-edit/QPopupEdit.js +41 -16
  214. package/src/components/popup-edit/QPopupEdit.json +15 -8
  215. package/src/components/range/QRange.js +223 -278
  216. package/src/components/range/QRange.json +11 -122
  217. package/src/components/rating/QRating.js +56 -38
  218. package/src/components/rating/QRating.json +3 -3
  219. package/src/components/rating/QRating.sass +8 -6
  220. package/src/components/rating/QRating.styl +8 -6
  221. package/src/components/resize-observer/QResizeObserver.js +15 -10
  222. package/src/components/scroll-area/QScrollArea.js +342 -126
  223. package/src/components/scroll-area/QScrollArea.json +164 -20
  224. package/src/components/scroll-area/QScrollArea.sass +4 -0
  225. package/src/components/scroll-area/QScrollArea.styl +4 -0
  226. package/src/components/scroll-observer/QScrollObserver.js +9 -2
  227. package/src/components/select/QSelect.js +8 -2
  228. package/src/components/separator/QSeparator.js +0 -1
  229. package/src/components/separator/QSeparator.json +1 -1
  230. package/src/components/slider/QSlider.js +97 -140
  231. package/src/components/slider/QSlider.json +1 -122
  232. package/src/components/slider/QSlider.sass +205 -139
  233. package/src/components/slider/QSlider.styl +205 -139
  234. package/src/components/slider/slider-utils.js +468 -123
  235. package/src/components/slider/slider-utils.json +546 -0
  236. package/src/components/stepper/QStepper.js +1 -1
  237. package/src/components/stepper/QStepper.sass +25 -26
  238. package/src/components/stepper/QStepper.styl +25 -26
  239. package/src/components/table/QTable.sass +3 -0
  240. package/src/components/table/QTable.styl +3 -0
  241. package/src/components/tabs/QRouteTab.js +13 -13
  242. package/src/components/tabs/QRouteTab.json +0 -7
  243. package/src/components/tabs/QTab.js +71 -20
  244. package/src/components/tabs/QTabs.js +237 -52
  245. package/src/components/tabs/QTabs.json +8 -0
  246. package/src/components/tabs/QTabs.sass +6 -6
  247. package/src/components/tabs/QTabs.styl +6 -6
  248. package/src/components/time/QTime.js +6 -2
  249. package/src/components/timeline/QTimelineEntry.json +1 -1
  250. package/src/components/tree/QTree.js +10 -6
  251. package/src/components/tree/QTree.json +5 -0
  252. package/src/components/tree/QTree.sass +58 -4
  253. package/src/components/tree/QTree.styl +58 -4
  254. package/src/components/uploader/QUploaderBase.js +15 -19
  255. package/src/components/video/QVideo.js +4 -1
  256. package/src/components/video/QVideo.json +11 -0
  257. package/src/components/virtual-scroll/QVirtualScroll.sass +1 -0
  258. package/src/components/virtual-scroll/QVirtualScroll.styl +1 -0
  259. package/src/css/core/helpers.sass +3 -0
  260. package/src/css/core/helpers.styl +3 -0
  261. package/src/css/core/positioning.sass +5 -0
  262. package/src/css/core/positioning.styl +5 -0
  263. package/src/css/normalize.sass +0 -7
  264. package/src/css/normalize.styl +0 -7
  265. package/src/css/variables.sass +4 -6
  266. package/src/css/variables.styl +4 -6
  267. package/src/directives/Scroll.js +2 -2
  268. package/src/directives/ScrollFire.js +1 -0
  269. package/src/ie-compat/ie.js +13 -13
  270. package/src/install.js +1 -1
  271. package/src/lang.js +7 -4
  272. package/src/mixins/anchor.js +3 -13
  273. package/src/mixins/btn.js +30 -38
  274. package/src/mixins/btn.json +26 -11
  275. package/src/mixins/file.js +27 -5
  276. package/src/mixins/fullscreen.js +16 -4
  277. package/src/mixins/portal.js +10 -10
  278. package/src/mixins/router-link.js +88 -14
  279. package/src/mixins/router-link.json +26 -10
  280. package/src/mixins/validate.js +33 -15
  281. package/src/mixins/virtual-scroll.js +40 -42
  282. package/src/plugins/AppFullscreen.js +41 -16
  283. package/src/plugins/BottomSheet.json +1 -1
  284. package/src/plugins/Cookies.js +1 -1
  285. package/src/plugins/Loading.js +8 -0
  286. package/src/plugins/LoadingBar.js +9 -0
  287. package/src/plugins/Notify.js +351 -333
  288. package/src/plugins/Notify.json +10 -10
  289. package/src/plugins/Notify.sass +9 -3
  290. package/src/plugins/Notify.styl +9 -3
  291. package/src/utils/clone.js +53 -4
  292. package/src/utils/date.js +134 -69
  293. package/src/utils/dom.js +28 -9
  294. package/src/utils/extend.js +2 -2
  295. package/src/utils/focus-manager.js +8 -10
  296. package/src/utils/global-dialog.js +18 -1
  297. package/src/utils/is.js +2 -2
  298. package/src/utils/morph.js +2 -12
  299. package/src/utils/scroll.js +71 -35
  300. package/src/.DS_Store +0 -0
  301. package/src/components/.DS_Store +0 -0
  302. package/src/components/layout/.DS_Store +0 -0
  303. package/src/css/.DS_Store +0 -0
  304. package/src/utils/.DS_Store +0 -0
@@ -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
 
@@ -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
  ]
@@ -71,6 +71,13 @@
71
71
  "category": "content"
72
72
  },
73
73
 
74
+ "no-header-tabs": {
75
+ "type": "Boolean",
76
+ "desc": "Do not render header tabs (only the input)",
77
+ "category": "content",
78
+ "addedIn": "v1.17"
79
+ },
80
+
74
81
  "no-footer": {
75
82
  "type": "Boolean",
76
83
  "desc": "Do not render footer; Useful when you want a specific view ('default-view' prop) and don't want the user to be able to switch it",
@@ -16,7 +16,11 @@
16
16
  border: 1px solid $separator-color
17
17
 
18
18
  &__header
19
- height: 68px
19
+
20
+ &-tabs
21
+ height: 32px
22
+ &-banner
23
+ height: 36px
20
24
 
21
25
  input
22
26
  line-height: 24px
@@ -93,47 +97,34 @@
93
97
  border-radius: 50%
94
98
  transform: translate(-5px, -5px)
95
99
 
96
- &__hue .q-slider__track-container
100
+ &__hue .q-slider__track
97
101
  background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%) !important // @stylint ignore
98
102
  opacity: 1
99
103
 
100
- &__alpha .q-slider__track-container
101
- color: #fff
102
- opacity: 1
103
- height: 8px
104
- background-color: #fff !important
105
- background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAH0lEQVQoU2NkYGAwZkAFZ5G5jPRRgOYEVDeB3EBjBQBOZwTVugIGyAAAAABJRU5ErkJggg==') !important
106
- &:after
104
+ &__alpha
105
+ .q-slider__track-container
106
+ padding-top: 0
107
+ .q-slider__track:before
107
108
  content: ''
108
109
  position: absolute
109
110
  top: 0
110
111
  right: 0
111
112
  bottom: 0
112
113
  left: 0
114
+ border-radius: inherit
113
115
  background: linear-gradient(90deg, rgba(255,255,255,0), $grey-7)
114
116
 
115
117
  &__sliders
116
- padding: 4px 16px 16px
117
-
118
- .q-slider__track-container
119
- height: 10px
120
- margin-top: -5px
121
-
122
- .q-slider__track
123
- display: none
118
+ padding: 0 16px
124
119
 
125
120
  .q-slider__thumb
121
+ color: $grey-9
126
122
  path
127
123
  stroke-width: 2px
128
124
  fill: transparent
129
125
  .q-slider--active path
130
126
  stroke-width: 3px
131
127
 
132
- .q-slider
133
- height: 16px
134
- margin-top: 8px
135
- color: $grey-9
136
-
137
128
  /* Tune Tab */
138
129
 
139
130
  &__tune-tab
@@ -180,9 +171,8 @@
180
171
  background: inherit
181
172
 
182
173
  &--dark
183
-
184
174
  .q-color-picker__tune-tab input
185
175
  border: 1px solid rgba(#fff, .3)
186
176
 
187
177
  .q-slider
188
- color: $grey-5
178
+ color: $grey-1
@@ -16,7 +16,11 @@
16
16
  border: 1px solid $separator-color
17
17
 
18
18
  &__header
19
- height: 68px
19
+
20
+ &-tabs
21
+ height: 32px
22
+ &-banner
23
+ height: 36px
20
24
 
21
25
  input
22
26
  line-height: 24px
@@ -93,47 +97,34 @@
93
97
  border-radius: 50%
94
98
  transform: translate(-5px, -5px)
95
99
 
96
- &__hue .q-slider__track-container
100
+ &__hue .q-slider__track
97
101
  background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%) !important // @stylint ignore
98
102
  opacity: 1
99
103
 
100
- &__alpha .q-slider__track-container
101
- color: #fff
102
- opacity: 1
103
- height: 8px
104
- background-color: #fff !important
105
- background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAH0lEQVQoU2NkYGAwZkAFZ5G5jPRRgOYEVDeB3EBjBQBOZwTVugIGyAAAAABJRU5ErkJggg==') !important
106
- &:after
104
+ &__alpha
105
+ .q-slider__track-container
106
+ padding-top: 0
107
+ .q-slider__track:before
107
108
  content: ''
108
109
  position: absolute
109
110
  top: 0
110
111
  right: 0
111
112
  bottom: 0
112
113
  left: 0
114
+ border-radius: inherit
113
115
  background: linear-gradient(90deg, rgba(255,255,255,0), $grey-7)
114
116
 
115
117
  &__sliders
116
- padding: 4px 16px 16px
117
-
118
- .q-slider__track-container
119
- height: 10px
120
- margin-top: -5px
121
-
122
- .q-slider__track
123
- display: none
118
+ padding: 0 16px
124
119
 
125
120
  .q-slider__thumb
121
+ color: $grey-9
126
122
  path
127
123
  stroke-width: 2px
128
124
  fill: transparent
129
125
  .q-slider--active path
130
126
  stroke-width: 3px
131
127
 
132
- .q-slider
133
- height: 16px
134
- margin-top: 8px
135
- color: $grey-9
136
-
137
128
  /* Tune Tab */
138
129
 
139
130
  &__tune-tab
@@ -180,9 +171,8 @@
180
171
  background: inherit
181
172
 
182
173
  &--dark
183
-
184
174
  .q-color-picker__tune-tab input
185
175
  border: 1px solid alpha(#fff, .3)
186
176
 
187
177
  .q-slider
188
- color: $grey-5
178
+ color: $grey-1
@@ -696,7 +696,13 @@ export default Vue.extend({
696
696
 
697
697
  methods: {
698
698
  setToday () {
699
- this.__toggleDate(this.today, this.__getMonthHash(this.today))
699
+ const date = this.today
700
+ const month = this.daysMap[this.__getMonthHash(date)]
701
+
702
+ if (month === void 0 || month.includes(date.day) === false) {
703
+ this.__addToModel(date)
704
+ }
705
+
700
706
  this.setCalendarTo(this.today.year, this.today.month)
701
707
  },
702
708
 
@@ -96,6 +96,8 @@
96
96
  > div
97
97
  line-height: 30px
98
98
  text-align: center
99
+ > button
100
+ line-height: 22px
99
101
 
100
102
  &--out
101
103
  opacity: .18
@@ -96,6 +96,8 @@
96
96
  > div
97
97
  line-height: 30px
98
98
  text-align: center
99
+ > button
100
+ line-height: 22px
99
101
 
100
102
  &--out
101
103
  opacity: .18
@@ -12,6 +12,7 @@ import { slot } from '../../utils/slot.js'
12
12
  import { create, stop } from '../../utils/event.js'
13
13
  import cache from '../../utils/cache.js'
14
14
  import { addFocusFn } from '../../utils/focus-manager.js'
15
+ import { client } from '../../plugins/Platform.js'
15
16
 
16
17
  let maximizedModals = 0
17
18
 
@@ -51,6 +52,7 @@ export default Vue.extend({
51
52
  noRouteDismiss: Boolean,
52
53
  noRefocus: Boolean,
53
54
  noFocus: Boolean,
55
+ noShake: Boolean,
54
56
 
55
57
  seamless: Boolean,
56
58
 
@@ -188,7 +190,7 @@ export default Vue.extend({
188
190
  this.__addHistory()
189
191
 
190
192
  // IE can have null document.activeElement
191
- this.__refocusTarget = this.noRefocus === false && document.activeElement !== null
193
+ this.__refocusTarget = client.is.mobile !== true && this.noRefocus === false && document.activeElement !== null
192
194
  ? document.activeElement
193
195
  : void 0
194
196
 
@@ -198,7 +200,7 @@ export default Vue.extend({
198
200
  EscapeKey.register(this, () => {
199
201
  if (this.seamless !== true) {
200
202
  if (this.persistent === true || this.noEscDismiss === true) {
201
- this.maximized !== true && this.shake()
203
+ this.maximized !== true && this.noShake !== true && this.shake()
202
204
  }
203
205
  else {
204
206
  this.$emit('escape-key')
@@ -255,7 +257,8 @@ export default Vue.extend({
255
257
 
256
258
  // check null for IE
257
259
  if (this.__refocusTarget !== void 0 && this.__refocusTarget !== null) {
258
- this.__refocusTarget.focus()
260
+ this.__refocusTarget.focus(evt)
261
+ this.__refocusTarget = void 0
259
262
  }
260
263
 
261
264
  this.$el.dispatchEvent(create('popup-hide', { bubbles: true }))
@@ -316,7 +319,7 @@ export default Vue.extend({
316
319
  if (this.persistent !== true && this.noBackdropDismiss !== true) {
317
320
  this.hide(e)
318
321
  }
319
- else {
322
+ else if (this.noShake !== true) {
320
323
  this.shake()
321
324
  }
322
325
  },
@@ -372,5 +375,6 @@ export default Vue.extend({
372
375
 
373
376
  beforeDestroy () {
374
377
  this.__cleanup()
378
+ this.__refocusTarget = void 0
375
379
  }
376
380
  })