quasar 2.3.2 → 2.4.1

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 (311) hide show
  1. package/dist/api/AppFullscreen.json +15 -8
  2. package/dist/api/BottomSheet.json +6 -0
  3. package/dist/api/Cookies.json +4 -3
  4. package/dist/api/Dialog.json +24 -10
  5. package/dist/api/Loading.json +0 -2
  6. package/dist/api/LoadingBar.json +8 -3
  7. package/dist/api/Morph.json +14 -7
  8. package/dist/api/Mutation.json +1 -1
  9. package/dist/api/Notify.json +41 -27
  10. package/dist/api/QAjaxBar.json +6 -3
  11. package/dist/api/QBreadcrumbs.json +8 -4
  12. package/dist/api/QBreadcrumbsEl.json +35 -12
  13. package/dist/api/QBtn.json +36 -17
  14. package/dist/api/QBtnDropdown.json +41 -20
  15. package/dist/api/QBtnToggle.json +7 -2
  16. package/dist/api/QCard.json +2 -1
  17. package/dist/api/QCardActions.json +2 -1
  18. package/dist/api/QCardSection.json +2 -1
  19. package/dist/api/QCarousel.json +10 -5
  20. package/dist/api/QCarouselControl.json +4 -2
  21. package/dist/api/QChatMessage.json +0 -4
  22. package/dist/api/QCheckbox.json +8 -4
  23. package/dist/api/QChip.json +2 -1
  24. package/dist/api/QCircularProgress.json +14 -7
  25. package/dist/api/QColor.json +6 -3
  26. package/dist/api/QDate.json +33 -5
  27. package/dist/api/QDialog.json +8 -4
  28. package/dist/api/QDrawer.json +10 -5
  29. package/dist/api/QEditor.json +10 -5
  30. package/dist/api/QExpansionItem.json +36 -13
  31. package/dist/api/QFab.json +41 -6
  32. package/dist/api/QFabAction.json +12 -2
  33. package/dist/api/QField.json +3 -1
  34. package/dist/api/QFile.json +8 -2
  35. package/dist/api/QFooter.json +2 -1
  36. package/dist/api/QForm.json +1 -1
  37. package/dist/api/QHeader.json +4 -2
  38. package/dist/api/QIcon.json +2 -1
  39. package/dist/api/QImg.json +8 -4
  40. package/dist/api/QInfiniteScroll.json +6 -3
  41. package/dist/api/QInnerLoading.json +8 -4
  42. package/dist/api/QInput.json +3 -1
  43. package/dist/api/QIntersection.json +4 -2
  44. package/dist/api/QItem.json +33 -11
  45. package/dist/api/QKnob.json +8 -4
  46. package/dist/api/QLayout.json +9 -1
  47. package/dist/api/QLinearProgress.json +4 -2
  48. package/dist/api/QMarkupTable.json +2 -1
  49. package/dist/api/QMenu.json +8 -4
  50. package/dist/api/QNoSsr.json +2 -1
  51. package/dist/api/QOptionGroup.json +76 -5
  52. package/dist/api/QPage.json +2 -1
  53. package/dist/api/QPageScroller.json +8 -4
  54. package/dist/api/QPageSticky.json +2 -1
  55. package/dist/api/QPagination.json +10 -6
  56. package/dist/api/QParallax.json +2 -1
  57. package/dist/api/QPopupEdit.json +5 -2
  58. package/dist/api/QPopupProxy.json +7 -4
  59. package/dist/api/QRange.json +600 -111
  60. package/dist/api/QRating.json +5 -2
  61. package/dist/api/QResizeObserver.json +4 -1
  62. package/dist/api/QRouteTab.json +35 -13
  63. package/dist/api/QScrollArea.json +29 -6
  64. package/dist/api/QScrollObserver.json +13 -1
  65. package/dist/api/QSelect.json +76 -47
  66. package/dist/api/QSeparator.json +2 -1
  67. package/dist/api/QSkeleton.json +8 -4
  68. package/dist/api/QSlideItem.json +9 -0
  69. package/dist/api/QSlideTransition.json +2 -1
  70. package/dist/api/QSlider.json +512 -43
  71. package/dist/api/QSpinner.json +2 -1
  72. package/dist/api/QSplitter.json +4 -2
  73. package/dist/api/QStep.json +2 -1
  74. package/dist/api/QStepper.json +6 -3
  75. package/dist/api/QTab.json +4 -2
  76. package/dist/api/QTabPanels.json +6 -3
  77. package/dist/api/QTable.json +154 -88
  78. package/dist/api/QTabs.json +4 -2
  79. package/dist/api/QTime.json +16 -4
  80. package/dist/api/QTimeline.json +4 -2
  81. package/dist/api/QTimelineEntry.json +4 -2
  82. package/dist/api/QToggle.json +8 -4
  83. package/dist/api/QTooltip.json +18 -9
  84. package/dist/api/QTree.json +34 -19
  85. package/dist/api/QUploader.json +28 -6
  86. package/dist/api/QVirtualScroll.json +26 -11
  87. package/dist/api/ScrollFire.json +1 -1
  88. package/dist/api/TouchHold.json +2 -1
  89. package/dist/api/TouchRepeat.json +2 -1
  90. package/dist/api/TouchSwipe.json +2 -1
  91. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  92. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  93. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  94. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  95. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  96. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  97. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  98. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  99. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  100. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  101. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  102. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  103. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  104. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  105. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  106. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  107. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  108. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  109. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  110. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  111. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  112. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  113. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  114. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  115. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  116. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  117. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  118. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  119. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  120. package/dist/icon-set/themify.umd.prod.js +1 -1
  121. package/dist/lang/ar.umd.prod.js +1 -1
  122. package/dist/lang/az-Latn.umd.prod.js +1 -1
  123. package/dist/lang/bg.umd.prod.js +1 -1
  124. package/dist/lang/bn.umd.prod.js +1 -1
  125. package/dist/lang/ca.umd.prod.js +1 -1
  126. package/dist/lang/cs.umd.prod.js +1 -1
  127. package/dist/lang/da.umd.prod.js +1 -1
  128. package/dist/lang/de.umd.prod.js +1 -1
  129. package/dist/lang/el.umd.prod.js +1 -1
  130. package/dist/lang/en-GB.umd.prod.js +1 -1
  131. package/dist/lang/en-US.umd.prod.js +1 -1
  132. package/dist/lang/eo.umd.prod.js +1 -1
  133. package/dist/lang/es.umd.prod.js +1 -1
  134. package/dist/lang/et.umd.prod.js +1 -1
  135. package/dist/lang/fa-IR.umd.prod.js +1 -1
  136. package/dist/lang/fa.umd.prod.js +1 -1
  137. package/dist/lang/fi.umd.prod.js +1 -1
  138. package/dist/lang/fr.umd.prod.js +1 -1
  139. package/dist/lang/gn.umd.prod.js +1 -1
  140. package/dist/lang/he.umd.prod.js +1 -1
  141. package/dist/lang/hr.umd.prod.js +1 -1
  142. package/dist/lang/hu.umd.prod.js +1 -1
  143. package/dist/lang/id.umd.prod.js +1 -1
  144. package/dist/lang/is.umd.prod.js +1 -1
  145. package/dist/lang/it.umd.prod.js +1 -1
  146. package/dist/lang/ja.umd.prod.js +1 -1
  147. package/dist/lang/km.umd.prod.js +1 -1
  148. package/dist/lang/ko-KR.umd.prod.js +1 -1
  149. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  150. package/dist/lang/lt.umd.prod.js +1 -1
  151. package/dist/lang/lu.umd.prod.js +1 -1
  152. package/dist/lang/lv.umd.prod.js +1 -1
  153. package/dist/lang/ml.umd.prod.js +1 -1
  154. package/dist/lang/ms.umd.prod.js +1 -1
  155. package/dist/lang/nb-NO.umd.prod.js +1 -1
  156. package/dist/lang/nl.umd.prod.js +1 -1
  157. package/dist/lang/pl.umd.prod.js +1 -1
  158. package/dist/lang/pt-BR.umd.prod.js +1 -1
  159. package/dist/lang/pt.umd.prod.js +1 -1
  160. package/dist/lang/ro.umd.prod.js +1 -1
  161. package/dist/lang/ru.umd.prod.js +1 -1
  162. package/dist/lang/sk.umd.prod.js +1 -1
  163. package/dist/lang/sl.umd.prod.js +1 -1
  164. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  165. package/dist/lang/sr.umd.prod.js +1 -1
  166. package/dist/lang/sv.umd.prod.js +1 -1
  167. package/dist/lang/ta.umd.prod.js +1 -1
  168. package/dist/lang/th.umd.prod.js +1 -1
  169. package/dist/lang/tr.umd.prod.js +1 -1
  170. package/dist/lang/ug.umd.prod.js +1 -1
  171. package/dist/lang/uk.umd.prod.js +1 -1
  172. package/dist/lang/vi.umd.prod.js +1 -1
  173. package/dist/lang/zh-CN.umd.prod.js +1 -1
  174. package/dist/lang/zh-TW.umd.prod.js +1 -1
  175. package/dist/quasar.cjs.prod.js +2 -2
  176. package/dist/quasar.css +268 -184
  177. package/dist/quasar.esm.prod.js +2 -2
  178. package/dist/quasar.prod.css +1 -1
  179. package/dist/quasar.rtl.css +340 -263
  180. package/dist/quasar.rtl.prod.css +1 -1
  181. package/dist/quasar.sass +272 -212
  182. package/dist/quasar.umd.js +16522 -16213
  183. package/dist/quasar.umd.prod.js +2 -2
  184. package/dist/ssr-directives/Morph.js +1 -1
  185. package/dist/transforms/loader-asset-urls.json +20 -0
  186. package/dist/types/api/cookies.d.ts +1 -1
  187. package/dist/types/api/slider.d.ts +46 -0
  188. package/dist/types/api/validation.d.ts +4 -0
  189. package/dist/types/api.d.ts +2 -0
  190. package/dist/types/composables.d.ts +3 -3
  191. package/dist/types/index.d.ts +759 -177
  192. package/dist/vetur/quasar-attributes.json +251 -83
  193. package/dist/vetur/quasar-tags.json +59 -17
  194. package/dist/web-types/web-types.json +587 -155
  195. package/package.json +1 -1
  196. package/src/api.extends.json +0 -1
  197. package/src/components/breadcrumbs/QBreadcrumbs.js +7 -2
  198. package/src/components/breadcrumbs/QBreadcrumbs.sass +0 -3
  199. package/src/components/breadcrumbs/QBreadcrumbsEl.js +14 -8
  200. package/src/components/btn/QBtn.js +6 -5
  201. package/src/components/btn/use-btn.js +21 -21
  202. package/src/components/btn/use-btn.json +22 -13
  203. package/src/components/btn-dropdown/QBtnDropdown.json +1 -0
  204. package/src/components/btn-toggle/QBtnToggle.json +3 -0
  205. package/src/components/checkbox/use-checkbox.js +1 -1
  206. package/src/components/chip/QChip.json +1 -2
  207. package/src/components/color/QColor.js +32 -26
  208. package/src/components/color/QColor.sass +10 -23
  209. package/src/components/date/QDate.json +25 -1
  210. package/src/components/date/QDate.sass +2 -0
  211. package/src/components/drawer/QDrawer.js +18 -15
  212. package/src/components/editor/QEditor.js +1 -1
  213. package/src/components/editor/QEditor.sass +10 -1
  214. package/src/components/expansion-item/QExpansionItem.js +4 -1
  215. package/src/components/expansion-item/QExpansionItem.json +2 -1
  216. package/src/components/fab/QFab.js +18 -12
  217. package/src/components/fab/QFab.json +36 -1
  218. package/src/components/fab/QFab.sass +1 -1
  219. package/src/components/fab/QFabAction.js +14 -7
  220. package/src/components/fab/QFabAction.json +10 -0
  221. package/src/components/field/QField.json +3 -3
  222. package/src/components/file/QFile.js +12 -5
  223. package/src/components/file/QFile.json +9 -6
  224. package/src/components/file/QFile.sass +4 -2
  225. package/src/components/footer/QFooter.js +1 -1
  226. package/src/components/form/QForm.json +2 -3
  227. package/src/components/header/QHeader.js +1 -1
  228. package/src/components/icon/QIcon.js +2 -2
  229. package/src/components/infinite-scroll/QInfiniteScroll.js +4 -5
  230. package/src/components/item/QItem.js +2 -3
  231. package/src/components/layout/QLayout.json +8 -1
  232. package/src/components/linear-progress/QLinearProgress.js +3 -2
  233. package/src/components/linear-progress/QLinearProgress.sass +1 -1
  234. package/src/components/option-group/QOptionGroup.js +3 -0
  235. package/src/components/option-group/QOptionGroup.json +48 -2
  236. package/src/components/pagination/QPagination.json +0 -1
  237. package/src/components/parallax/QParallax.js +4 -2
  238. package/src/components/popup-edit/QPopupEdit.js +2 -5
  239. package/src/components/popup-edit/QPopupEdit.json +1 -0
  240. package/src/components/popup-proxy/QPopupProxy.json +2 -1
  241. package/src/components/radio/QRadio.js +2 -7
  242. package/src/components/range/QRange.js +103 -222
  243. package/src/components/range/QRange.json +11 -121
  244. package/src/components/rating/QRating.json +1 -1
  245. package/src/components/resize-observer/QResizeObserver.json +2 -0
  246. package/src/components/scroll-area/QScrollArea.js +10 -13
  247. package/src/components/scroll-area/QScrollArea.json +29 -9
  248. package/src/components/scroll-observer/QScrollObserver.json +11 -0
  249. package/src/components/select/QSelect.json +41 -15
  250. package/src/components/slide-item/QSlideItem.json +9 -0
  251. package/src/components/slider/QSlider.js +46 -132
  252. package/src/components/slider/QSlider.json +1 -121
  253. package/src/components/slider/QSlider.sass +198 -132
  254. package/src/components/slider/use-slider.js +453 -109
  255. package/src/components/slider/use-slider.json +546 -0
  256. package/src/components/stepper/QStepper.js +3 -3
  257. package/src/components/stepper/QStepper.sass +24 -26
  258. package/src/components/table/QTable.js +27 -47
  259. package/src/components/table/QTable.json +104 -55
  260. package/src/components/table/table-pagination.js +4 -0
  261. package/src/components/tabs/QRouteTab.js +1 -2
  262. package/src/components/tabs/QRouteTab.json +0 -7
  263. package/src/components/tabs/QTabs.js +71 -20
  264. package/src/components/tabs/use-tab.js +26 -13
  265. package/src/components/time/QTime.json +8 -0
  266. package/src/components/tree/QTree.js +14 -12
  267. package/src/components/tree/QTree.json +26 -21
  268. package/src/components/tree/QTree.sass +45 -41
  269. package/src/components/uploader/QUploader.json +14 -2
  270. package/src/components/uploader/uploader-core.js +16 -9
  271. package/src/components/uploader/xhr-uploader-plugin.json +8 -3
  272. package/src/components/virtual-scroll/QVirtualScroll.json +15 -0
  273. package/src/components/virtual-scroll/QVirtualScroll.sass +1 -0
  274. package/src/components/virtual-scroll/use-virtual-scroll.js +30 -17
  275. package/src/components/virtual-scroll/use-virtual-scroll.json +7 -5
  276. package/src/composables/private/use-field.js +5 -5
  277. package/src/composables/private/use-file.js +20 -5
  278. package/src/composables/private/use-form.js +2 -3
  279. package/src/composables/private/use-fullscreen.js +15 -4
  280. package/src/composables/private/use-router-link.js +44 -23
  281. package/src/composables/private/use-router-link.json +26 -10
  282. package/src/composables/private/use-split-attrs.js +7 -10
  283. package/src/composables/private/use-validate.js +21 -15
  284. package/src/composables/private/use-validate.json +1 -0
  285. package/src/css/core/helpers.sass +3 -0
  286. package/src/css/core/positioning.sass +5 -0
  287. package/src/directives/Mutation.json +2 -3
  288. package/src/directives/ScrollFire.js +1 -0
  289. package/src/directives/ScrollFire.json +2 -3
  290. package/src/icon-set.js +2 -4
  291. package/src/plugins/AppFullscreen.js +70 -53
  292. package/src/plugins/AppFullscreen.json +8 -8
  293. package/src/plugins/AppVisibility.js +2 -3
  294. package/src/plugins/BottomSheet.js +3 -5
  295. package/src/plugins/Cookies.json +2 -2
  296. package/src/plugins/Dialog.js +3 -5
  297. package/src/plugins/Dialog.json +6 -5
  298. package/src/plugins/LoadingBar.js +17 -18
  299. package/src/plugins/LoadingBar.json +4 -3
  300. package/src/plugins/Notify.js +296 -295
  301. package/src/plugins/Notify.json +13 -19
  302. package/src/plugins/Platform.js +14 -14
  303. package/src/utils/date.js +4 -4
  304. package/src/utils/dom.js +2 -2
  305. package/src/utils/open-url.js +2 -2
  306. package/src/utils/patterns.js +1 -0
  307. package/src/utils/private/define-reactive-plugin.js +10 -8
  308. package/src/utils/private/global-dialog.js +6 -8
  309. package/src/utils/private/global-dialog.json +6 -0
  310. package/src/utils/private/inject-obj-prop.js +13 -0
  311. package/src/utils/private/is.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quasar",
3
- "version": "2.3.2",
3
+ "version": "2.4.1",
4
4
  "description": "Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time",
5
5
  "main": "dist/quasar.cjs.prod.js",
6
6
  "module": "dist/quasar.esm.prod.js",
@@ -110,7 +110,6 @@
110
110
 
111
111
  "html": {
112
112
  "type": "Boolean",
113
- "default": "false",
114
113
  "desc": "Force use of textContent instead of innerHTML to render text; Use it when the text might be unsafe (from user input)",
115
114
  "category": "behavior"
116
115
  },
@@ -6,6 +6,8 @@ import { createComponent } from '../../utils/private/create.js'
6
6
  import { hSlot } from '../../utils/private/render.js'
7
7
  import { getNormalizedVNodes } from '../../utils/private/vm.js'
8
8
 
9
+ const disabledValues = [ void 0, true ]
10
+
9
11
  export default createComponent({
10
12
  name: 'QBreadcrumbs',
11
13
 
@@ -59,12 +61,15 @@ export default createComponent({
59
61
  vnodes.forEach(comp => {
60
62
  if (comp.type !== void 0 && comp.type.name === 'QBreadcrumbsEl') {
61
63
  const middle = els < len
64
+ const disabled = comp.props !== null && disabledValues.includes(comp.props.disable)
65
+ const cls = (middle === true ? ' q-breadcrumbs--last' : '')
66
+ + (disabled !== true && middle === true ? ' ' + activeClass.value : '')
67
+
62
68
  els++
63
69
 
64
70
  child.push(
65
71
  h('div', {
66
- class: 'flex items-center '
67
- + (middle === true ? activeClass.value : 'q-breadcrumbs--last')
72
+ class: `flex items-center${ cls }`
68
73
  }, [ comp ])
69
74
  )
70
75
 
@@ -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 */"}
@@ -22,12 +22,17 @@ export default createComponent({
22
22
  },
23
23
 
24
24
  setup (props, { slots }) {
25
- const { linkTag, linkProps, hasLink, navigateToLink } = useRouterLink()
25
+ const { linkTag, linkProps, hasRouterLink, navigateToRouterLink } = useRouterLink()
26
26
 
27
27
  const data = computed(() => {
28
- const acc = { ...linkProps.value }
29
- if (hasLink.value === true) {
30
- acc.onClick = navigateToLink
28
+ const acc = {
29
+ class: 'q-breadcrumbs__el q-link '
30
+ + 'flex inline items-center relative-position '
31
+ + (props.disable !== true ? 'q-link--focusable' : 'q-breadcrumbs__el--disable'),
32
+ ...linkProps.value
33
+ }
34
+ if (hasRouterLink.value === true) {
35
+ acc.onClick = navigateToRouterLink
31
36
  }
32
37
  return acc
33
38
  })
@@ -49,10 +54,11 @@ export default createComponent({
49
54
 
50
55
  props.label !== void 0 && child.push(props.label)
51
56
 
52
- return h(linkTag.value, {
53
- class: 'q-breadcrumbs__el q-link flex inline items-center relative-position',
54
- ...data.value
55
- }, hMergeSlot(slots.default, child))
57
+ return h(
58
+ linkTag.value,
59
+ { ...data.value },
60
+ hMergeSlot(slots.default, child)
61
+ )
56
62
  }
57
63
  }
58
64
  })
@@ -37,7 +37,7 @@ export default createComponent({
37
37
  const {
38
38
  classes, style, innerClasses,
39
39
  attributes,
40
- hasLink, isLink, navigateToLink,
40
+ hasRouterLink, hasLink, linkTag, navigateToRouterLink,
41
41
  isActionable
42
42
  } = useBtn(props)
43
43
 
@@ -54,7 +54,7 @@ export default createComponent({
54
54
  props.disable === true || props.ripple === false
55
55
  ? false
56
56
  : {
57
- keyCodes: isLink.value === true ? [ 13, 32 ] : [ 13 ],
57
+ keyCodes: hasLink.value === true ? [ 13, 32 ] : [ 13 ],
58
58
  ...(props.ripple === true ? {} : props.ripple)
59
59
  }
60
60
  ))
@@ -135,10 +135,10 @@ export default createComponent({
135
135
  }
136
136
  }
137
137
 
138
- if (hasLink.value === true) {
138
+ if (hasRouterLink.value === true) {
139
139
  const go = () => {
140
140
  e.__qNavigate = true
141
- navigateToLink(e)
141
+ navigateToRouterLink(e)
142
142
  }
143
143
 
144
144
  emit('click', e, go)
@@ -277,6 +277,7 @@ export default createComponent({
277
277
  }
278
278
 
279
279
  function onLoadingEvt (evt) {
280
+ stopAndPrevent(evt)
280
281
  evt.qSkipRipple = true
281
282
  }
282
283
 
@@ -359,7 +360,7 @@ export default createComponent({
359
360
 
360
361
  return withDirectives(
361
362
  h(
362
- isLink.value === true ? 'a' : 'button',
363
+ linkTag.value,
363
364
  nodeProps.value,
364
365
  child
365
366
  ),
@@ -21,6 +21,9 @@ const defaultSizes = {
21
21
  xl: 24
22
22
  }
23
23
 
24
+ const formTypes = [ 'submit', 'reset' ]
25
+ const mediaTypeRE = /[^\s]\/[^\s]/
26
+
24
27
  export const useBtnProps = {
25
28
  ...useSizeProps,
26
29
  ...useRouterLinkProps,
@@ -76,7 +79,7 @@ export const useBtnProps = {
76
79
  export default function (props) {
77
80
  const sizeStyle = useSize(props, defaultSizes)
78
81
  const alignClass = useAlign(props)
79
- const { hasLink, linkProps, navigateToLink } = useRouterLink()
82
+ const { hasRouterLink, hasLink, linkTag, linkProps, navigateToRouterLink } = useRouterLink('button')
80
83
 
81
84
  const style = computed(() => {
82
85
  const obj = props.fab === false && props.fabMini === false
@@ -107,10 +110,6 @@ export default function (props) {
107
110
  isActionable.value === true ? props.tabindex || 0 : -1
108
111
  ))
109
112
 
110
- const isLink = computed(() =>
111
- props.type === 'a' || hasLink.value === true
112
- )
113
-
114
113
  const design = computed(() => {
115
114
  if (props.flat === true) return 'flat'
116
115
  if (props.outline === true) return 'outline'
@@ -122,19 +121,24 @@ export default function (props) {
122
121
  const attributes = computed(() => {
123
122
  const acc = { tabindex: tabIndex.value }
124
123
 
125
- // if it's not rendered with "<a>" tag
126
- // OR it's "<a>" but type is not "button"
127
- // (<a> with type="button" is invalid HTML)
128
- if (props.type !== 'a' && (props.type !== 'button' || hasLink.value !== true)) {
124
+ if (hasLink.value === true) {
125
+ Object.assign(acc, linkProps.value)
126
+ }
127
+ else if (formTypes.includes(props.type) === true) {
129
128
  acc.type = props.type
130
129
  }
131
130
 
132
- if (hasLink.value === true) {
133
- Object.assign(acc, linkProps.value)
134
- acc.role = 'link'
131
+ if (linkTag.value === 'a') {
132
+ if (acc.href === void 0) {
133
+ acc.role = 'button'
134
+ }
135
+ if (hasRouterLink.value !== true && mediaTypeRE.test(props.type) === true) {
136
+ acc.type = props.type
137
+ }
135
138
  }
136
- else {
137
- acc.role = props.type === 'a' ? 'link' : 'button'
139
+ else if (props.disable === true) {
140
+ acc.disabled = ''
141
+ acc[ 'aria-disabled' ] = 'true'
138
142
  }
139
143
 
140
144
  if (props.loading === true && props.percentage !== void 0) {
@@ -146,11 +150,6 @@ export default function (props) {
146
150
  })
147
151
  }
148
152
 
149
- if (props.disable === true) {
150
- acc.disabled = ''
151
- acc[ 'aria-disabled' ] = 'true'
152
- }
153
-
154
153
  return acc
155
154
  })
156
155
 
@@ -191,9 +190,10 @@ export default function (props) {
191
190
  style,
192
191
  innerClasses,
193
192
  attributes,
193
+ hasRouterLink,
194
194
  hasLink,
195
- isLink,
196
- navigateToLink,
195
+ linkTag,
196
+ navigateToRouterLink,
197
197
  isActionable
198
198
  }
199
199
  }
@@ -4,37 +4,46 @@
4
4
  "props": {
5
5
  "type":{
6
6
  "type": "String",
7
- "desc": "Define the button HTML DOM type",
7
+ "desc": "1) Define the button native type attribute (submit, reset, button) or 2) render component with <a> tag so you can access events even if disable or 3) Use 'href' prop and specify 'type' as a media tag",
8
8
  "default": "button",
9
- "values": [
10
- "a", "submit", "button", "reset"
11
- ],
12
9
  "examples": [
13
- "type=\"a\" href=\"http://some-site.net\" target=\"__blank\""
10
+ "a", "submit", "button", "reset",
11
+ "image/png",
12
+ "href=\"https://quasar.dev\" target=\"_blank\""
14
13
  ],
15
14
  "category": "general"
16
15
  },
17
16
 
18
17
  "to": {
19
18
  "type": [ "String", "Object" ],
20
- "desc": "Equivalent to Vue Router <router-link> 'to' property",
19
+ "desc": "Equivalent to Vue Router <router-link> 'to' property; Superseeded by 'href' prop if used",
21
20
  "examples": [
22
21
  "/home/dashboard",
23
22
  ":to=\"{ name: 'my-route-name' }\""
24
23
  ],
25
- "category": "router"
24
+ "category": "navigation"
26
25
  },
27
26
 
28
27
  "replace": {
29
28
  "type": "Boolean",
30
- "desc": "Equivalent to Vue Router <router-link> 'replace' property",
31
- "category": "router"
29
+ "desc": "Equivalent to Vue Router <router-link> 'replace' property; Superseeded by 'href' prop if used",
30
+ "category": "navigation"
32
31
  },
33
32
 
34
- "append": {
35
- "type": "Boolean",
36
- "desc": "Equivalent to Vue Router <router-link> 'append' property",
37
- "category": "router"
33
+ "href": {
34
+ "type": "String",
35
+ "desc": "Native <a> link href attribute; Has priority over the 'to' and 'replace' props",
36
+ "examples": [ "http://quasar.dev", "href=\"https://quasar.dev\" target=\"_blank\"" ],
37
+ "category": "navigation",
38
+ "addedIn": "v2.4"
39
+ },
40
+
41
+ "target": {
42
+ "type": "String",
43
+ "desc": "Native <a> link target attribute; Use it only with 'to' or 'href' props",
44
+ "examples": [ "_blank", "_self", "_parent", "_top" ],
45
+ "category": "navigation",
46
+ "addedIn": "v2.4"
38
47
  },
39
48
 
40
49
  "label":{
@@ -10,6 +10,7 @@
10
10
  "extends": "model-value",
11
11
  "type": "Boolean",
12
12
  "desc": "Controls Menu show/hidden state; Either use this property (along with a listener for 'update:modelValue' event) OR use v-model directive",
13
+ "required": false,
13
14
  "examples": [ "v-model=\"menuState\"" ]
14
15
  },
15
16
 
@@ -189,6 +189,9 @@
189
189
  "slots": {
190
190
  "default": {
191
191
  "desc": "Suggestions: QTooltip, QBadge"
192
+ },
193
+ "...": {
194
+ "desc": "Any other dynamic slots to be used with 'slot' property of the 'options' prop"
192
195
  }
193
196
  }
194
197
  }
@@ -107,7 +107,7 @@ export default function (type, getInner) {
107
107
  const prop = { type: 'checkbox' }
108
108
 
109
109
  props.name !== void 0 && Object.assign(prop, {
110
- checked: isTrue.value,
110
+ '^checked': isTrue.value === true ? 'checked' : void 0,
111
111
  name: props.name,
112
112
  value: modelIsArray.value === true
113
113
  ? props.val
@@ -55,8 +55,7 @@
55
55
  "type": "Boolean",
56
56
  "desc": "Model of the component determining if QChip should be rendered or not",
57
57
  "required": false,
58
- "default": true,
59
- "category": "model"
58
+ "default": true
60
59
  },
61
60
 
62
61
  "selected": {
@@ -35,6 +35,7 @@ const palette = [
35
35
  ]
36
36
 
37
37
  const thumbPath = 'M5 5 h10 v10 h-10 v-10 z'
38
+ const alphaTrackImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAH0lEQVQoU2NkYGAwZkAFZ5G5jPRRgOYEVDeB3EBjBQBOZwTVugIGyAAAAABJRU5ErkJggg=='
38
39
 
39
40
  export default createComponent({
40
41
  name: 'QColor',
@@ -653,37 +654,42 @@ export default createComponent({
653
654
  ]
654
655
 
655
656
  const sliders = [
656
- h('div', { class: 'q-color-picker__hue non-selectable' }, [
657
- h(QSlider, {
658
- modelValue: model.value.h,
659
- min: 0,
660
- max: 360,
661
- fillHandleAlways: true,
662
- readonly: editable.value !== true,
663
- thumbPath,
664
- 'onUpdate:modelValue': onHueChange,
665
- ...getCache('lazyhue', {
666
- onChange: val => onHueChange(val, true)
667
- })
657
+ h(QSlider, {
658
+ class: 'q-color-picker__hue non-selectable',
659
+ modelValue: model.value.h,
660
+ min: 0,
661
+ max: 360,
662
+ trackSize: '8px',
663
+ innerTrackColor: 'transparent',
664
+ selectionColor: 'transparent',
665
+ readonly: editable.value !== true,
666
+ thumbPath,
667
+ 'onUpdate:modelValue': onHueChange,
668
+ ...getCache('lazyhue', {
669
+ onChange: val => onHueChange(val, true)
668
670
  })
669
- ])
671
+ })
670
672
  ]
671
673
 
672
674
  hasAlpha.value === true && sliders.push(
673
- h('div', { class: 'q-color-picker__alpha non-selectable' }, [
674
- h(QSlider, {
675
- modelValue: model.value.a,
676
- min: 0,
677
- max: 100,
678
- fillHandleAlways: true,
679
- readonly: editable.value !== true,
680
- thumbPath,
681
- ...getCache('alphaSlide', {
682
- 'onUpdate:modelValue': value => onNumericChange(value, 'a', 100),
683
- onChange: value => onNumericChange(value, 'a', 100, void 0, true)
684
- })
675
+ h(QSlider, {
676
+ class: 'q-color-picker__alpha non-selectable',
677
+ modelValue: model.value.a,
678
+ min: 0,
679
+ max: 100,
680
+ trackSize: '8px',
681
+ trackColor: 'white',
682
+ innerTrackColor: 'transparent',
683
+ selectionColor: 'transparent',
684
+ trackImg: alphaTrackImg,
685
+ readonly: editable.value !== true,
686
+ hideSelection: true,
687
+ thumbPath,
688
+ ...getCache('alphaSlide', {
689
+ 'onUpdate:modelValue': value => onNumericChange(value, 'a', 100),
690
+ onChange: value => onNumericChange(value, 'a', 100, void 0, true)
685
691
  })
686
- ])
692
+ })
687
693
  )
688
694
 
689
695
  return [
@@ -97,47 +97,34 @@
97
97
  border-radius: 50%
98
98
  transform: translate(-5px, -5px)
99
99
 
100
- &__hue .q-slider__track-container
100
+ &__hue .q-slider__track
101
101
  background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%) !important // @stylint ignore
102
102
  opacity: 1
103
103
 
104
- &__alpha .q-slider__track-container
105
- color: #fff
106
- opacity: 1
107
- height: 8px
108
- background-color: #fff !important
109
- background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAH0lEQVQoU2NkYGAwZkAFZ5G5jPRRgOYEVDeB3EBjBQBOZwTVugIGyAAAAABJRU5ErkJggg==') !important
110
- &:after
104
+ &__alpha
105
+ .q-slider__track-container
106
+ padding-top: 0
107
+ .q-slider__track:before
111
108
  content: ''
112
109
  position: absolute
113
110
  top: 0
114
111
  right: 0
115
112
  bottom: 0
116
113
  left: 0
114
+ border-radius: inherit
117
115
  background: linear-gradient(90deg, rgba(255,255,255,0), $grey-7)
118
116
 
119
117
  &__sliders
120
- padding: 4px 16px 16px
121
-
122
- .q-slider__track-container
123
- height: 10px
124
- margin-top: -5px
125
-
126
- .q-slider__track
127
- display: none
118
+ padding: 0 16px
128
119
 
129
120
  .q-slider__thumb
121
+ color: $grey-9
130
122
  path
131
123
  stroke-width: 2px
132
124
  fill: transparent
133
125
  .q-slider--active path
134
126
  stroke-width: 3px
135
127
 
136
- .q-slider
137
- height: 16px
138
- margin-top: 8px
139
- color: $grey-9
140
-
141
128
  /* Tune Tab */
142
129
 
143
130
  &__tune-tab
@@ -188,5 +175,5 @@
188
175
  .q-color-picker__tune-tab input
189
176
  border: 1px solid rgba(#fff, .3)
190
177
 
191
- .q-slider
192
- color: $grey-5
178
+ .q-slider__thumb
179
+ color: $grey-1
@@ -209,35 +209,42 @@
209
209
  "definition": {
210
210
  "year": {
211
211
  "type": "Number",
212
+ "required": true,
212
213
  "desc": "The year of the date that the user has clicked/tapped on",
213
214
  "__exemption": [ "examples" ]
214
215
  },
215
216
  "month": {
216
217
  "type": "Number",
218
+ "required": true,
217
219
  "desc": "The month of the date that the user has clicked/tapped on",
218
220
  "__exemption": [ "examples" ]
219
221
  },
220
222
  "day": {
221
223
  "type": "Number",
224
+ "required": true,
222
225
  "desc": "The day of the month that the user has clicked/tapped on",
223
226
  "__exemption": [ "examples" ]
224
227
  },
225
228
  "from": {
226
229
  "type": "Object",
230
+ "required": false,
227
231
  "desc": "Object of properties of the range starting point (only if range)",
228
232
  "definition": {
229
233
  "year": {
230
234
  "type": "Number",
235
+ "required": true,
231
236
  "desc": "The year",
232
237
  "__exemption": [ "examples" ]
233
238
  },
234
239
  "month": {
235
240
  "type": "Number",
241
+ "required": true,
236
242
  "desc": "The month",
237
243
  "__exemption": [ "examples" ]
238
244
  },
239
245
  "day": {
240
246
  "type": "Number",
247
+ "required": true,
241
248
  "desc": "The day of month",
242
249
  "__exemption": [ "examples" ]
243
250
  }
@@ -245,20 +252,24 @@
245
252
  },
246
253
  "to": {
247
254
  "type": "Object",
255
+ "required": false,
248
256
  "desc": "Object of properties of the range ending point (only if range)",
249
257
  "definition": {
250
258
  "year": {
251
259
  "type": "Number",
260
+ "required": true,
252
261
  "desc": "The year",
253
262
  "__exemption": [ "examples" ]
254
263
  },
255
264
  "month": {
256
265
  "type": "Number",
266
+ "required": true,
257
267
  "desc": "The month",
258
268
  "__exemption": [ "examples" ]
259
269
  },
260
270
  "day": {
261
271
  "type": "Number",
272
+ "required": true,
262
273
  "desc": "The day of month",
263
274
  "__exemption": [ "examples" ]
264
275
  }
@@ -278,11 +289,13 @@
278
289
  "definition": {
279
290
  "year": {
280
291
  "type": "Number",
292
+ "required": true,
281
293
  "desc": "The year",
282
294
  "__exemption": [ "examples" ]
283
295
  },
284
296
  "month": {
285
297
  "type": "Number",
298
+ "required": true,
286
299
  "desc": "The month",
287
300
  "__exemption": [ "examples" ]
288
301
  }
@@ -300,16 +313,19 @@
300
313
  "definition": {
301
314
  "year": {
302
315
  "type": "Number",
316
+ "required": true,
303
317
  "desc": "The year",
304
318
  "__exemption": [ "examples" ]
305
319
  },
306
320
  "month": {
307
321
  "type": "Number",
322
+ "required": true,
308
323
  "desc": "The month",
309
324
  "__exemption": [ "examples" ]
310
325
  },
311
326
  "day": {
312
327
  "type": "Number",
328
+ "required": true,
313
329
  "desc": "The day of month",
314
330
  "__exemption": [ "examples" ]
315
331
  }
@@ -327,20 +343,24 @@
327
343
  "definition": {
328
344
  "from": {
329
345
  "type": "Object",
346
+ "required": true,
330
347
  "desc": "Definition of date from where the range begins",
331
348
  "definition": {
332
349
  "year": {
333
350
  "type": "Number",
351
+ "required": true,
334
352
  "desc": "The year",
335
353
  "__exemption": [ "examples" ]
336
354
  },
337
355
  "month": {
338
356
  "type": "Number",
357
+ "required": true,
339
358
  "desc": "The month",
340
359
  "__exemption": [ "examples" ]
341
360
  },
342
361
  "day": {
343
362
  "type": "Number",
363
+ "required": true,
344
364
  "desc": "The day of month",
345
365
  "__exemption": [ "examples" ]
346
366
  }
@@ -348,20 +368,24 @@
348
368
  },
349
369
  "to": {
350
370
  "type": "Object",
371
+ "required": true,
351
372
  "desc": "Definition of date to where the range ends",
352
373
  "definition": {
353
374
  "year": {
354
375
  "type": "Number",
376
+ "required": true,
355
377
  "desc": "The year",
356
378
  "__exemption": [ "examples" ]
357
379
  },
358
380
  "month": {
359
381
  "type": "Number",
382
+ "required": true,
360
383
  "desc": "The month",
361
384
  "__exemption": [ "examples" ]
362
385
  },
363
386
  "day": {
364
387
  "type": "Number",
388
+ "required": true,
365
389
  "desc": "The day of month",
366
390
  "__exemption": [ "examples" ]
367
391
  }
@@ -383,8 +407,8 @@
383
407
  "params": {
384
408
  "view": {
385
409
  "type": "String",
386
- "desc": "QDate view name",
387
410
  "required": true,
411
+ "desc": "QDate view name",
388
412
  "values": [ "Calendar", "Months", "Years" ]
389
413
  }
390
414
  }
@@ -95,6 +95,8 @@
95
95
  > div
96
96
  line-height: 30px
97
97
  text-align: center
98
+ > button
99
+ line-height: 22px
98
100
 
99
101
  &--out
100
102
  opacity: .18