quasar 2.3.4 → 2.4.3

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 (238) hide show
  1. package/dist/api/BottomSheet.json +1 -1
  2. package/dist/api/Loading.json +2 -6
  3. package/dist/api/Notify.json +5 -5
  4. package/dist/api/QAvatar.json +1 -1
  5. package/dist/api/QBreadcrumbsEl.json +32 -11
  6. package/dist/api/QBtn.json +32 -16
  7. package/dist/api/QBtnDropdown.json +33 -17
  8. package/dist/api/QBtnToggle.json +4 -1
  9. package/dist/api/QCarousel.json +4 -4
  10. package/dist/api/QChatMessage.json +4 -12
  11. package/dist/api/QChip.json +4 -4
  12. package/dist/api/QExpansionItem.json +34 -13
  13. package/dist/api/QFab.json +32 -2
  14. package/dist/api/QFabAction.json +9 -1
  15. package/dist/api/QField.json +1 -0
  16. package/dist/api/QFile.json +1 -0
  17. package/dist/api/QInput.json +1 -0
  18. package/dist/api/QItem.json +31 -10
  19. package/dist/api/QLinearProgress.json +1 -1
  20. package/dist/api/QOptionGroup.json +74 -4
  21. package/dist/api/QPagination.json +4 -4
  22. package/dist/api/QPullToRefresh.json +1 -1
  23. package/dist/api/QRange.json +592 -107
  24. package/dist/api/QRating.json +3 -3
  25. package/dist/api/QRouteTab.json +32 -12
  26. package/dist/api/QSelect.json +4 -7
  27. package/dist/api/QSlider.json +504 -39
  28. package/dist/api/QStep.json +4 -4
  29. package/dist/api/QStepper.json +4 -4
  30. package/dist/api/QTab.json +1 -1
  31. package/dist/api/QTable.json +4 -4
  32. package/dist/api/QTimelineEntry.json +1 -1
  33. package/dist/api/QToggle.json +1 -1
  34. package/dist/api/QTree.json +1 -1
  35. package/dist/api/QUploader.json +16 -2
  36. package/dist/api/QVideo.json +11 -1
  37. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  38. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  39. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  40. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  41. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  42. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  43. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  44. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  45. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  46. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  47. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  48. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  49. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  50. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  51. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  52. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  53. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  54. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  55. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  56. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  57. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  58. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  59. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  60. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  61. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  62. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  63. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  64. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  65. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  66. package/dist/icon-set/themify.umd.prod.js +1 -1
  67. package/dist/lang/ar.umd.prod.js +1 -1
  68. package/dist/lang/az-Latn.umd.prod.js +1 -1
  69. package/dist/lang/bg.umd.prod.js +1 -1
  70. package/dist/lang/bn.umd.prod.js +1 -1
  71. package/dist/lang/ca.umd.prod.js +1 -1
  72. package/dist/lang/cs.umd.prod.js +1 -1
  73. package/dist/lang/da.umd.prod.js +1 -1
  74. package/dist/lang/de.umd.prod.js +1 -1
  75. package/dist/lang/el.umd.prod.js +1 -1
  76. package/dist/lang/en-GB.umd.prod.js +1 -1
  77. package/dist/lang/en-US.umd.prod.js +1 -1
  78. package/dist/lang/eo.umd.prod.js +1 -1
  79. package/dist/lang/es.umd.prod.js +1 -1
  80. package/dist/lang/et.umd.prod.js +1 -1
  81. package/dist/lang/fa-IR.umd.prod.js +1 -1
  82. package/dist/lang/fa.umd.prod.js +1 -1
  83. package/dist/lang/fi.umd.prod.js +1 -1
  84. package/dist/lang/fr.umd.prod.js +1 -1
  85. package/dist/lang/gn.umd.prod.js +1 -1
  86. package/dist/lang/he.umd.prod.js +1 -1
  87. package/dist/lang/hr.umd.prod.js +1 -1
  88. package/dist/lang/hu.umd.prod.js +1 -1
  89. package/dist/lang/id.umd.prod.js +1 -1
  90. package/dist/lang/is.umd.prod.js +1 -1
  91. package/dist/lang/it.umd.prod.js +1 -1
  92. package/dist/lang/ja.umd.prod.js +1 -1
  93. package/dist/lang/km.umd.prod.js +1 -1
  94. package/dist/lang/ko-KR.umd.prod.js +1 -1
  95. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  96. package/dist/lang/lt.umd.prod.js +1 -1
  97. package/dist/lang/lu.umd.prod.js +1 -1
  98. package/dist/lang/lv.umd.prod.js +1 -1
  99. package/dist/lang/ml.umd.prod.js +1 -1
  100. package/dist/lang/ms.umd.prod.js +1 -1
  101. package/dist/lang/nb-NO.umd.prod.js +1 -1
  102. package/dist/lang/nl.umd.prod.js +1 -1
  103. package/dist/lang/pl.umd.prod.js +1 -1
  104. package/dist/lang/pt-BR.umd.prod.js +1 -1
  105. package/dist/lang/pt.umd.prod.js +1 -1
  106. package/dist/lang/ro.umd.prod.js +1 -1
  107. package/dist/lang/ru.umd.prod.js +1 -1
  108. package/dist/lang/sk.umd.prod.js +1 -1
  109. package/dist/lang/sl.umd.prod.js +1 -1
  110. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  111. package/dist/lang/sr.umd.prod.js +1 -1
  112. package/dist/lang/sv.umd.prod.js +1 -1
  113. package/dist/lang/ta.umd.prod.js +1 -1
  114. package/dist/lang/th.umd.prod.js +1 -1
  115. package/dist/lang/tr.umd.prod.js +1 -1
  116. package/dist/lang/ug.umd.prod.js +1 -1
  117. package/dist/lang/uk.umd.prod.js +1 -1
  118. package/dist/lang/vi.umd.prod.js +1 -1
  119. package/dist/lang/zh-CN.umd.prod.js +1 -1
  120. package/dist/lang/zh-TW.umd.prod.js +1 -1
  121. package/dist/quasar.cjs.prod.js +2 -2
  122. package/dist/quasar.css +277 -196
  123. package/dist/quasar.esm.prod.js +2 -2
  124. package/dist/quasar.prod.css +1 -1
  125. package/dist/quasar.rtl.css +344 -275
  126. package/dist/quasar.rtl.prod.css +1 -1
  127. package/dist/quasar.sass +243 -189
  128. package/dist/quasar.umd.js +16670 -16294
  129. package/dist/quasar.umd.prod.js +2 -2
  130. package/dist/ssr-directives/Morph.js +1 -1
  131. package/dist/transforms/loader-asset-urls.json +20 -0
  132. package/dist/types/api/slider.d.ts +46 -0
  133. package/dist/types/api/validation.d.ts +4 -0
  134. package/dist/types/api.d.ts +2 -0
  135. package/dist/types/composables.d.ts +3 -3
  136. package/dist/types/index.d.ts +599 -121
  137. package/dist/types/utils/date.d.ts +2 -1
  138. package/dist/vetur/quasar-attributes.json +254 -82
  139. package/dist/vetur/quasar-tags.json +61 -18
  140. package/dist/web-types/web-types.json +635 -197
  141. package/package.json +1 -1
  142. package/src/api.extends.json +1 -2
  143. package/src/components/breadcrumbs/QBreadcrumbs.js +7 -2
  144. package/src/components/breadcrumbs/QBreadcrumbs.sass +0 -3
  145. package/src/components/breadcrumbs/QBreadcrumbsEl.js +14 -8
  146. package/src/components/btn/QBtn.js +5 -5
  147. package/src/components/btn/use-btn.js +21 -21
  148. package/src/components/btn/use-btn.json +22 -13
  149. package/src/components/btn-toggle/QBtnToggle.json +3 -0
  150. package/src/components/checkbox/use-checkbox.js +1 -1
  151. package/src/components/color/QColor.js +32 -26
  152. package/src/components/color/QColor.sass +10 -23
  153. package/src/components/date/QDate.sass +2 -0
  154. package/src/components/dialog/QDialog.js +7 -5
  155. package/src/components/drawer/QDrawer.js +18 -15
  156. package/src/components/editor/QEditor.js +1 -1
  157. package/src/components/editor/QEditor.sass +10 -1
  158. package/src/components/expansion-item/QExpansionItem.js +4 -1
  159. package/src/components/fab/QFab.js +18 -12
  160. package/src/components/fab/QFab.json +33 -0
  161. package/src/components/fab/QFab.sass +1 -1
  162. package/src/components/fab/QFabAction.js +14 -7
  163. package/src/components/fab/QFabAction.json +10 -0
  164. package/src/components/file/QFile.js +12 -5
  165. package/src/components/file/QFile.sass +4 -2
  166. package/src/components/footer/QFooter.js +1 -1
  167. package/src/components/header/QHeader.js +1 -1
  168. package/src/components/icon/QIcon.js +1 -1
  169. package/src/components/infinite-scroll/QInfiniteScroll.js +4 -5
  170. package/src/components/item/QItem.js +2 -3
  171. package/src/components/linear-progress/QLinearProgress.json +1 -1
  172. package/src/components/menu/QMenu.js +6 -2
  173. package/src/components/option-group/QOptionGroup.js +3 -0
  174. package/src/components/option-group/QOptionGroup.json +48 -2
  175. package/src/components/parallax/QParallax.js +4 -2
  176. package/src/components/popup-edit/QPopupEdit.js +2 -5
  177. package/src/components/radio/QRadio.js +2 -7
  178. package/src/components/range/QRange.js +132 -273
  179. package/src/components/range/QRange.json +11 -121
  180. package/src/components/rating/QRating.json +3 -3
  181. package/src/components/resize-observer/QResizeObserver.js +11 -10
  182. package/src/components/scroll-area/QScrollArea.js +8 -2
  183. package/src/components/scroll-observer/QScrollObserver.js +2 -0
  184. package/src/components/select/QSelect.js +4 -1
  185. package/src/components/slider/QSlider.js +61 -137
  186. package/src/components/slider/QSlider.json +1 -121
  187. package/src/components/slider/QSlider.sass +203 -138
  188. package/src/components/slider/use-slider.js +454 -107
  189. package/src/components/slider/use-slider.json +546 -0
  190. package/src/components/stepper/QStepper.js +3 -3
  191. package/src/components/stepper/QStepper.sass +24 -26
  192. package/src/components/table/QTable.js +26 -46
  193. package/src/components/tabs/QRouteTab.js +1 -2
  194. package/src/components/tabs/QRouteTab.json +0 -7
  195. package/src/components/tabs/QTabs.js +91 -24
  196. package/src/components/tabs/use-tab.js +26 -13
  197. package/src/components/tooltip/QTooltip.js +1 -2
  198. package/src/components/tree/QTree.js +14 -12
  199. package/src/components/uploader/QUploader.json +14 -2
  200. package/src/components/uploader/uploader-core.js +16 -9
  201. package/src/components/video/QVideo.js +4 -1
  202. package/src/components/video/QVideo.json +12 -1
  203. package/src/components/virtual-scroll/QVirtualScroll.sass +1 -0
  204. package/src/components/virtual-scroll/use-virtual-scroll.js +30 -17
  205. package/src/composables/private/use-field.js +18 -20
  206. package/src/composables/private/use-file.js +20 -5
  207. package/src/composables/private/use-form.js +2 -3
  208. package/src/composables/private/use-fullscreen.js +15 -4
  209. package/src/composables/private/use-model-toggle.js +1 -1
  210. package/src/composables/private/use-portal.js +9 -7
  211. package/src/composables/private/use-router-link.js +44 -23
  212. package/src/composables/private/use-router-link.json +26 -10
  213. package/src/composables/private/use-split-attrs.js +4 -4
  214. package/src/composables/private/use-tick.js +7 -14
  215. package/src/composables/private/use-validate.js +21 -15
  216. package/src/composables/private/use-validate.json +1 -0
  217. package/src/css/core/helpers.sass +3 -0
  218. package/src/css/core/positioning.sass +5 -0
  219. package/src/css/variables.sass +4 -6
  220. package/src/directives/ScrollFire.js +1 -0
  221. package/src/icon-set.js +2 -4
  222. package/src/plugins/AppFullscreen.js +70 -53
  223. package/src/plugins/AppVisibility.js +2 -3
  224. package/src/plugins/BottomSheet.js +3 -5
  225. package/src/plugins/Dialog.js +3 -5
  226. package/src/plugins/LoadingBar.js +17 -18
  227. package/src/plugins/Notify.js +296 -295
  228. package/src/plugins/Platform.js +14 -14
  229. package/src/utils/clone.js +53 -4
  230. package/src/utils/date.js +4 -4
  231. package/src/utils/dom.js +2 -2
  232. package/src/utils/open-url.js +2 -2
  233. package/src/utils/patterns.js +1 -0
  234. package/src/utils/private/define-reactive-plugin.js +10 -8
  235. package/src/utils/private/focus-manager.js +8 -10
  236. package/src/utils/private/global-dialog.js +6 -8
  237. package/src/utils/private/inject-obj-prop.js +13 -0
  238. 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.4",
3
+ "version": "2.4.3",
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",
@@ -52,7 +52,7 @@
52
52
  "map",
53
53
  "ion-add",
54
54
  "img:https://cdn.quasar.dev/logo-v2/svg/logo.svg",
55
- "img:statics/path/to/some_image.png"
55
+ "img:path/to/some_image.png"
56
56
  ],
57
57
  "category": "content"
58
58
  },
@@ -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)
@@ -360,7 +360,7 @@ export default createComponent({
360
360
 
361
361
  return withDirectives(
362
362
  h(
363
- isLink.value === true ? 'a' : 'button',
363
+ linkTag.value,
364
364
  nodeProps.value,
365
365
  child
366
366
  ),
@@ -21,6 +21,9 @@ const defaultSizes = {
21
21
  xl: 24
22
22
  }
23
23
 
24
+ const formTypes = [ 'button', '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":{
@@ -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
@@ -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
@@ -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
@@ -94,7 +94,7 @@ export default createComponent({
94
94
 
95
95
  const { preventBodyScroll } = usePreventScroll()
96
96
  const { registerTimeout, removeTimeout } = useTimeout()
97
- const { registerTick, removeTick, prepareTick } = useTick()
97
+ const { registerTick, removeTick } = useTick()
98
98
 
99
99
  const { showPortal, hidePortal, portalIsActive, renderPortal } = usePortal(
100
100
  vm, innerRef, renderPortalContent, /* pls do check if on a global dialog */ true
@@ -193,7 +193,6 @@ export default createComponent({
193
193
  if (props.noFocus !== true) {
194
194
  document.activeElement !== null && document.activeElement.blur()
195
195
  registerTick(focus)
196
- prepareTick()
197
196
  }
198
197
 
199
198
  registerTimeout(() => {
@@ -239,6 +238,7 @@ export default createComponent({
239
238
 
240
239
  if (refocusTarget !== null) {
241
240
  refocusTarget.focus()
241
+ refocusTarget = null
242
242
  }
243
243
 
244
244
  registerTimeout(() => {
@@ -306,6 +306,10 @@ export default createComponent({
306
306
  removeEscapeKey(onEscapeKey)
307
307
  }
308
308
  }
309
+
310
+ if (hiding !== true) {
311
+ refocusTarget = null
312
+ }
309
313
  }
310
314
 
311
315
  function updateMaximized (active) {
@@ -364,9 +368,7 @@ export default createComponent({
364
368
  }
365
369
  })
366
370
 
367
- onBeforeUnmount(() => {
368
- cleanup()
369
- })
371
+ onBeforeUnmount(cleanup)
370
372
 
371
373
  function renderPortalContent () {
372
374
  return h('div', {
@@ -330,6 +330,13 @@ export default createComponent({
330
330
  ] ]
331
331
  })
332
332
 
333
+ function updateBelowBreakpoint () {
334
+ updateLocal(belowBreakpoint, (
335
+ props.behavior === 'mobile'
336
+ || (props.behavior !== 'desktop' && $layout.totalWidth.value <= props.breakpoint)
337
+ ))
338
+ }
339
+
333
340
  watch(belowBreakpoint, val => {
334
341
  if (val === true) { // from lg to xs
335
342
  lastDesktopState = showing.value
@@ -351,13 +358,6 @@ export default createComponent({
351
358
  }
352
359
  })
353
360
 
354
- watch($layout.totalWidth, val => {
355
- updateLocal(belowBreakpoint, (
356
- props.behavior === 'mobile'
357
- || (props.behavior !== 'desktop' && val <= props.breakpoint)
358
- ))
359
- })
360
-
361
361
  watch(() => props.side, (newSide, oldSide) => {
362
362
  if ($layout.instances[ oldSide ] === instance) {
363
363
  $layout.instances[ oldSide ] = void 0
@@ -371,10 +371,20 @@ export default createComponent({
371
371
  $layout[ newSide ].offset = offset.value
372
372
  })
373
373
 
374
- watch(() => props.behavior + props.breakpoint, updateBelowBreakpoint)
374
+ watch($layout.totalWidth, () => {
375
+ if ($layout.isContainer.value === true || document.qScrollPrevented !== true) {
376
+ updateBelowBreakpoint()
377
+ }
378
+ })
379
+
380
+ watch(
381
+ () => props.behavior + props.breakpoint,
382
+ updateBelowBreakpoint
383
+ )
375
384
 
376
385
  watch($layout.isContainer, val => {
377
386
  showing.value === true && preventBodyScroll(val !== true)
387
+ val === true && updateBelowBreakpoint()
378
388
  })
379
389
 
380
390
  watch($layout.scrollbarWidth, () => {
@@ -430,13 +440,6 @@ export default createComponent({
430
440
  }
431
441
  }
432
442
 
433
- function updateBelowBreakpoint () {
434
- updateLocal(belowBreakpoint, (
435
- props.behavior === 'mobile'
436
- || (props.behavior !== 'desktop' && $layout.totalWidth.value <= props.breakpoint)
437
- ))
438
- }
439
-
440
443
  function applyBackdrop (x) {
441
444
  flagBackdropBg.value = x
442
445
  }
@@ -502,7 +502,7 @@ export default createComponent({
502
502
  return h('div', {
503
503
  ref: rootRef,
504
504
  class: classes.value,
505
- style: { height: inFullscreen.value === true ? '100vh' : null },
505
+ style: { height: inFullscreen.value === true ? '100%' : null },
506
506
  ...attributes.value,
507
507
  onFocusin,
508
508
  onFocusout
@@ -6,7 +6,9 @@
6
6
  &.disabled
7
7
  border-style: dashed
8
8
 
9
- > div:first-child, &__toolbars-container, &__toolbars-container > div:first-child
9
+ > div:first-child,
10
+ &__toolbars-container,
11
+ &__toolbars-container > div:first-child
10
12
  border-top-left-radius: inherit
11
13
  border-top-right-radius: inherit
12
14
 
@@ -17,14 +19,18 @@
17
19
  border-bottom-left-radius: inherit
18
20
  border-bottom-right-radius: inherit
19
21
  overflow: auto
22
+ max-width: 100%
23
+
20
24
  pre
21
25
  white-space: pre-wrap
26
+
22
27
  hr
23
28
  border: 0
24
29
  outline: 0
25
30
  margin: 1px
26
31
  height: 1px
27
32
  background: $editor-hr-color
33
+
28
34
  &:empty:not(:focus):before
29
35
  content: attr(placeholder)
30
36
  opacity: .7
@@ -33,6 +39,9 @@
33
39
  border-bottom: 1px solid $editor-border-color
34
40
  min-height: 32px
35
41
 
42
+ &__toolbars-container
43
+ max-width: 100%
44
+
36
45
  .q-btn
37
46
  margin: $editor-button-gutter
38
47
 
@@ -96,7 +96,10 @@ export default createComponent({
96
96
  })
97
97
 
98
98
  const hasLink = computed(() =>
99
- props.disable !== true && props.to !== void 0 && props.to !== null && props.to !== ''
99
+ props.disable !== true && (
100
+ props.href !== void 0
101
+ || (props.to !== void 0 && props.to !== null && props.to !== '')
102
+ )
100
103
  )
101
104
 
102
105
  const linkProps = computed(() => {