quasar 2.2.2 → 2.3.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 (290) hide show
  1. package/dist/api/BottomSheet.json +17 -2
  2. package/dist/api/Dialog.json +17 -2
  3. package/dist/api/LocalStorage.json +8 -0
  4. package/dist/api/QCircularProgress.json +14 -0
  5. package/dist/api/QDate.json +46 -0
  6. package/dist/api/QEditor.json +7 -2
  7. package/dist/api/QFooter.json +1 -1
  8. package/dist/api/QHeader.json +1 -1
  9. package/dist/api/QIntersection.json +14 -0
  10. package/dist/api/QLinearProgress.json +14 -0
  11. package/dist/api/QRouteTab.json +1 -24
  12. package/dist/api/QScrollArea.json +3 -0
  13. package/dist/api/QSelect.json +62 -0
  14. package/dist/api/QSkeleton.json +1 -1
  15. package/dist/api/QTable.json +62 -5
  16. package/dist/api/QTree.json +6 -0
  17. package/dist/api/QUploader.json +81 -1
  18. package/dist/api/SessionStorage.json +8 -0
  19. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  20. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  21. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  22. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  23. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  24. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  25. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  26. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  27. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  28. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  29. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  30. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  31. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  32. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  33. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  34. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  35. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  36. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  37. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  38. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  39. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  40. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  41. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  42. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  43. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  44. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  45. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  46. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  47. package/dist/icon-set/themify.umd.prod.js +1 -1
  48. package/dist/lang/ar.umd.prod.js +1 -1
  49. package/dist/lang/az-Latn.umd.prod.js +1 -1
  50. package/dist/lang/bg.umd.prod.js +1 -1
  51. package/dist/lang/bn.umd.prod.js +1 -1
  52. package/dist/lang/ca.umd.prod.js +1 -1
  53. package/dist/lang/cs.umd.prod.js +1 -1
  54. package/dist/lang/da.umd.prod.js +1 -1
  55. package/dist/lang/de.umd.prod.js +1 -1
  56. package/dist/lang/el.umd.prod.js +1 -1
  57. package/dist/lang/en-GB.umd.prod.js +1 -1
  58. package/dist/lang/en-US.umd.prod.js +1 -1
  59. package/dist/lang/eo.umd.prod.js +1 -1
  60. package/dist/lang/es.umd.prod.js +1 -1
  61. package/dist/lang/et.umd.prod.js +1 -1
  62. package/dist/lang/fa-IR.umd.prod.js +1 -1
  63. package/dist/lang/fa.umd.prod.js +1 -1
  64. package/dist/lang/fi.umd.prod.js +1 -1
  65. package/dist/lang/fr.umd.prod.js +1 -1
  66. package/dist/lang/gn.umd.prod.js +1 -1
  67. package/dist/lang/he.umd.prod.js +1 -1
  68. package/dist/lang/hr.umd.prod.js +1 -1
  69. package/dist/lang/hu.umd.prod.js +1 -1
  70. package/dist/lang/id.umd.prod.js +1 -1
  71. package/dist/lang/is.umd.prod.js +1 -1
  72. package/dist/lang/it.umd.prod.js +1 -1
  73. package/dist/lang/ja.umd.prod.js +1 -1
  74. package/dist/lang/km.umd.prod.js +1 -1
  75. package/dist/lang/ko-KR.umd.prod.js +1 -1
  76. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  77. package/dist/lang/lt.umd.prod.js +1 -1
  78. package/dist/lang/lu.umd.prod.js +1 -1
  79. package/dist/lang/lv.umd.prod.js +1 -1
  80. package/dist/lang/ml.umd.prod.js +1 -1
  81. package/dist/lang/ms.umd.prod.js +1 -1
  82. package/dist/lang/nb-NO.umd.prod.js +1 -1
  83. package/dist/lang/nl.umd.prod.js +1 -1
  84. package/dist/lang/pl.umd.prod.js +1 -1
  85. package/dist/lang/pt-BR.umd.prod.js +1 -1
  86. package/dist/lang/pt.umd.prod.js +1 -1
  87. package/dist/lang/ro.umd.prod.js +1 -1
  88. package/dist/lang/ru.umd.prod.js +1 -1
  89. package/dist/lang/sk.umd.prod.js +1 -1
  90. package/dist/lang/sl.umd.prod.js +1 -1
  91. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  92. package/dist/lang/sr.umd.prod.js +1 -1
  93. package/dist/lang/sv.umd.prod.js +1 -1
  94. package/dist/lang/ta.umd.prod.js +1 -1
  95. package/dist/lang/th.umd.prod.js +1 -1
  96. package/dist/lang/tr.umd.prod.js +1 -1
  97. package/dist/lang/ug.umd.prod.js +1 -1
  98. package/dist/lang/uk.umd.prod.js +1 -1
  99. package/dist/lang/vi.umd.prod.js +1 -1
  100. package/dist/lang/zh-CN.umd.prod.js +1 -1
  101. package/dist/lang/zh-TW.umd.prod.js +1 -1
  102. package/dist/quasar.cjs.prod.js +2 -2
  103. package/dist/quasar.css +57 -9
  104. package/dist/quasar.esm.prod.js +2 -2
  105. package/dist/quasar.prod.css +1 -1
  106. package/dist/quasar.rtl.css +124 -9
  107. package/dist/quasar.rtl.prod.css +1 -1
  108. package/dist/quasar.sass +47 -7
  109. package/dist/quasar.umd.js +356 -267
  110. package/dist/quasar.umd.prod.js +2 -2
  111. package/dist/ssr-directives/Morph.js +1 -1
  112. package/dist/types/index.d.ts +374 -141
  113. package/dist/vetur/quasar-attributes.json +18 -2
  114. package/dist/vetur/quasar-tags.json +6 -2
  115. package/dist/web-types/web-types.json +44 -3
  116. package/package.json +4 -1
  117. package/src/api.extends.json +7 -0
  118. package/src/body.js +14 -4
  119. package/src/components/ajax-bar/QAjaxBar.js +3 -2
  120. package/src/components/avatar/QAvatar.js +3 -2
  121. package/src/components/badge/QBadge.js +3 -2
  122. package/src/components/banner/QBanner.js +3 -2
  123. package/src/components/bar/QBar.js +3 -2
  124. package/src/components/breadcrumbs/QBreadcrumbs.js +3 -2
  125. package/src/components/breadcrumbs/QBreadcrumbsEl.js +3 -2
  126. package/src/components/btn/QBtn.js +3 -2
  127. package/src/components/btn-dropdown/QBtnDropdown.js +3 -2
  128. package/src/components/btn-group/QBtnGroup.js +3 -2
  129. package/src/components/btn-toggle/QBtnToggle.js +3 -2
  130. package/src/components/card/QCard.js +3 -2
  131. package/src/components/card/QCardActions.js +3 -2
  132. package/src/components/card/QCardSection.js +3 -2
  133. package/src/components/carousel/QCarousel.js +3 -2
  134. package/src/components/carousel/QCarouselControl.js +3 -2
  135. package/src/components/carousel/QCarouselSlide.js +3 -2
  136. package/src/components/chat/QChatMessage.js +3 -2
  137. package/src/components/checkbox/QCheckbox.js +3 -2
  138. package/src/components/chip/QChip.js +3 -2
  139. package/src/components/circular-progress/QCircularProgress.js +9 -3
  140. package/src/components/circular-progress/QCircularProgress.json +6 -0
  141. package/src/components/color/QColor.js +3 -2
  142. package/src/components/date/QDate.js +5 -3
  143. package/src/components/date/QDate.json +34 -0
  144. package/src/components/dialog/QDialog.js +3 -2
  145. package/src/components/dialog-bottom-sheet/BottomSheet.js +3 -2
  146. package/src/components/dialog-plugin/DialogPlugin.js +3 -2
  147. package/src/components/drawer/QDrawer.js +3 -2
  148. package/src/components/editor/QEditor.js +3 -2
  149. package/src/components/editor/QEditor.json +6 -2
  150. package/src/components/expansion-item/QExpansionItem.js +3 -2
  151. package/src/components/fab/QFab.js +3 -2
  152. package/src/components/fab/QFabAction.js +3 -2
  153. package/src/components/field/QField.js +3 -3
  154. package/src/components/file/QFile.js +3 -2
  155. package/src/components/footer/QFooter.js +3 -2
  156. package/src/components/footer/QFooter.json +1 -1
  157. package/src/components/form/QForm.js +3 -2
  158. package/src/components/header/QHeader.js +3 -2
  159. package/src/components/header/QHeader.json +1 -1
  160. package/src/components/icon/QIcon.js +4 -2
  161. package/src/components/img/QImg.js +5 -2
  162. package/src/components/infinite-scroll/QInfiniteScroll.js +50 -32
  163. package/src/components/inner-loading/QInnerLoading.js +3 -2
  164. package/src/components/input/QInput.js +3 -2
  165. package/src/components/intersection/QIntersection.js +12 -3
  166. package/src/components/intersection/QIntersection.json +9 -0
  167. package/src/components/item/QItem.js +3 -2
  168. package/src/components/item/QItemLabel.js +3 -2
  169. package/src/components/item/QItemSection.js +3 -2
  170. package/src/components/item/QList.js +3 -3
  171. package/src/components/knob/QKnob.js +3 -2
  172. package/src/components/layout/QLayout.js +3 -2
  173. package/src/components/linear-progress/QLinearProgress.js +13 -3
  174. package/src/components/linear-progress/QLinearProgress.json +6 -0
  175. package/src/components/linear-progress/QLinearProgress.sass +2 -1
  176. package/src/components/markup-table/QMarkupTable.js +3 -2
  177. package/src/components/menu/QMenu.js +4 -3
  178. package/src/components/no-ssr/QNoSsr.js +3 -2
  179. package/src/components/option-group/QOptionGroup.js +4 -2
  180. package/src/components/page/QPage.js +3 -2
  181. package/src/components/page/QPageContainer.js +3 -2
  182. package/src/components/page-scroller/QPageScroller.js +4 -2
  183. package/src/components/page-sticky/QPageSticky.js +2 -3
  184. package/src/components/pagination/QPagination.js +3 -2
  185. package/src/components/parallax/QParallax.js +3 -2
  186. package/src/components/popup-edit/QPopupEdit.js +3 -2
  187. package/src/components/popup-proxy/QPopupProxy.js +10 -17
  188. package/src/components/pull-to-refresh/QPullToRefresh.js +3 -2
  189. package/src/components/radio/QRadio.js +3 -2
  190. package/src/components/range/QRange.js +3 -2
  191. package/src/components/rating/QRating.js +6 -5
  192. package/src/components/resize-observer/QResizeObserver.js +3 -2
  193. package/src/components/responsive/QResponsive.js +3 -2
  194. package/src/components/scroll-area/QScrollArea.js +3 -2
  195. package/src/components/scroll-area/QScrollArea.json +4 -1
  196. package/src/components/scroll-observer/QScrollObserver.js +3 -2
  197. package/src/components/select/QSelect.js +17 -22
  198. package/src/components/select/QSelect.json +47 -0
  199. package/src/components/separator/QSeparator.js +4 -2
  200. package/src/components/skeleton/QSkeleton.js +3 -2
  201. package/src/components/skeleton/QSkeleton.json +1 -4
  202. package/src/components/slide-item/QSlideItem.js +3 -2
  203. package/src/components/slide-transition/QSlideTransition.js +4 -2
  204. package/src/components/slider/QSlider.js +3 -2
  205. package/src/components/slider/use-slider.js +3 -3
  206. package/src/components/space/QSpace.js +4 -2
  207. package/src/components/spinner/QSpinner.js +4 -2
  208. package/src/components/spinner/QSpinnerAudio.js +4 -2
  209. package/src/components/spinner/QSpinnerBall.js +4 -2
  210. package/src/components/spinner/QSpinnerBars.js +4 -2
  211. package/src/components/spinner/QSpinnerBox.js +4 -2
  212. package/src/components/spinner/QSpinnerClock.js +4 -2
  213. package/src/components/spinner/QSpinnerComment.js +4 -2
  214. package/src/components/spinner/QSpinnerCube.js +4 -2
  215. package/src/components/spinner/QSpinnerDots.js +4 -2
  216. package/src/components/spinner/QSpinnerFacebook.js +4 -2
  217. package/src/components/spinner/QSpinnerGears.js +4 -2
  218. package/src/components/spinner/QSpinnerGrid.js +4 -2
  219. package/src/components/spinner/QSpinnerHearts.js +4 -2
  220. package/src/components/spinner/QSpinnerHourglass.js +4 -2
  221. package/src/components/spinner/QSpinnerInfinity.js +4 -2
  222. package/src/components/spinner/QSpinnerIos.js +4 -2
  223. package/src/components/spinner/QSpinnerOrbit.js +4 -2
  224. package/src/components/spinner/QSpinnerOval.js +4 -2
  225. package/src/components/spinner/QSpinnerPie.js +4 -2
  226. package/src/components/spinner/QSpinnerPuff.js +4 -2
  227. package/src/components/spinner/QSpinnerRadio.js +4 -2
  228. package/src/components/spinner/QSpinnerRings.js +4 -2
  229. package/src/components/spinner/QSpinnerTail.js +4 -2
  230. package/src/components/splitter/QSplitter.js +3 -2
  231. package/src/components/stepper/QStep.js +3 -2
  232. package/src/components/stepper/QStepper.js +3 -2
  233. package/src/components/stepper/QStepperNavigation.js +3 -2
  234. package/src/components/stepper/StepHeader.js +4 -2
  235. package/src/components/tab-panels/QTabPanel.js +4 -2
  236. package/src/components/tab-panels/QTabPanels.js +3 -2
  237. package/src/components/table/QTable.js +4 -2
  238. package/src/components/table/QTable.json +51 -5
  239. package/src/components/table/QTd.js +3 -2
  240. package/src/components/table/QTh.js +3 -2
  241. package/src/components/table/QTr.js +3 -2
  242. package/src/components/table/table-pagination.js +2 -2
  243. package/src/components/tabs/QRouteTab.js +4 -2
  244. package/src/components/tabs/QRouteTab.json +1 -23
  245. package/src/components/tabs/QTab.js +3 -3
  246. package/src/components/tabs/QTabs.js +4 -3
  247. package/src/components/time/QTime.js +9 -7
  248. package/src/components/timeline/QTimeline.js +3 -2
  249. package/src/components/timeline/QTimelineEntry.js +3 -2
  250. package/src/components/toggle/QToggle.js +5 -2
  251. package/src/components/toolbar/QToolbar.js +3 -2
  252. package/src/components/toolbar/QToolbarTitle.js +3 -2
  253. package/src/components/tooltip/QTooltip.js +3 -2
  254. package/src/components/tree/QTree.js +12 -7
  255. package/src/components/tree/QTree.json +5 -0
  256. package/src/components/tree/QTree.sass +52 -4
  257. package/src/components/uploader/QUploaderAddTrigger.js +3 -2
  258. package/src/components/uploader/uploader-core.js +2 -7
  259. package/src/components/uploader/xhr-uploader-plugin.json +97 -1
  260. package/src/components/video/QVideo.js +4 -2
  261. package/src/components/virtual-scroll/QVirtualScroll.js +3 -2
  262. package/src/components/virtual-scroll/use-virtual-scroll.js +17 -1
  263. package/src/composables/private/use-field.js +2 -2
  264. package/src/composables/private/use-file.js +8 -0
  265. package/src/composables/private/use-model-toggle.js +1 -1
  266. package/src/composables/private/use-refocus-target.js +12 -3
  267. package/src/composables/use-dialog-plugin-component.js +6 -1
  268. package/src/css/core/transitions.sass +3 -1
  269. package/src/css/normalize.sass +0 -7
  270. package/src/directives/ClosePopup.js +3 -1
  271. package/src/directives/Intersection.js +3 -1
  272. package/src/directives/Morph.js +4 -1
  273. package/src/directives/Mutation.js +3 -1
  274. package/src/directives/Ripple.js +3 -1
  275. package/src/directives/Scroll.js +3 -1
  276. package/src/directives/ScrollFire.js +3 -1
  277. package/src/directives/TouchHold.js +4 -1
  278. package/src/directives/TouchPan.js +4 -1
  279. package/src/directives/TouchRepeat.js +4 -1
  280. package/src/directives/TouchSwipe.js +4 -1
  281. package/src/install-quasar.js +1 -0
  282. package/src/plugins/Notify.js +4 -3
  283. package/src/utils/create-uploader-component.js +9 -7
  284. package/src/utils/date.js +1 -1
  285. package/src/utils/private/create.js +4 -0
  286. package/src/utils/private/get-emits-object.js +11 -0
  287. package/src/utils/private/global-dialog.json +10 -2
  288. package/src/utils/private/vm.js +3 -3
  289. package/src/utils/private/web-storage.json +10 -0
  290. package/wrappers/index.js +4 -0
@@ -1,8 +1,9 @@
1
- import { h, defineComponent, computed } from 'vue'
1
+ import { h, computed } from 'vue'
2
2
 
3
+ import { createComponent } from '../../utils/private/create.js'
3
4
  import { hSlot } from '../../utils/private/render.js'
4
5
 
5
- export default defineComponent({
6
+ export default createComponent({
6
7
  name: 'QToolbarTitle',
7
8
 
8
9
  props: {
@@ -1,4 +1,4 @@
1
- import { h, defineComponent, ref, computed, watch, onBeforeUnmount, Transition, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, onBeforeUnmount, Transition, getCurrentInstance } from 'vue'
2
2
 
3
3
  import useAnchor, { useAnchorProps } from '../../composables/private/use-anchor.js'
4
4
  import useScrollTarget from '../../composables/private/use-scroll-target.js'
@@ -8,6 +8,7 @@ import useTransition, { useTransitionProps } from '../../composables/private/use
8
8
  import useTick from '../../composables/private/use-tick.js'
9
9
  import useTimeout from '../../composables/private/use-timeout.js'
10
10
 
11
+ import { createComponent } from '../../utils/private/create.js'
11
12
  import { getScrollTarget } from '../../utils/scroll.js'
12
13
  import { stopAndPrevent, addEvt, cleanEvt } from '../../utils/event.js'
13
14
  import { clearSelection } from '../../utils/private/selection.js'
@@ -17,7 +18,7 @@ import {
17
18
  validatePosition, validateOffset, setPosition, parsePosition
18
19
  } from '../../utils/private/position-engine.js'
19
20
 
20
- export default defineComponent({
21
+ export default createComponent({
21
22
  name: 'QTooltip',
22
23
 
23
24
  inheritAttrs: false,
@@ -1,5 +1,5 @@
1
1
  import {
2
- h, defineComponent, ref, computed, watch,
2
+ h, ref, computed, watch,
3
3
  withDirectives, vShow, nextTick, getCurrentInstance, onBeforeUpdate
4
4
  } from 'vue'
5
5
 
@@ -10,10 +10,13 @@ import QSpinner from '../spinner/QSpinner.js'
10
10
 
11
11
  import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
12
12
 
13
+ import { createComponent } from '../../utils/private/create.js'
13
14
  import { stopAndPrevent } from '../../utils/event.js'
14
15
  import { shouldIgnoreKey } from '../../utils/private/key-composition.js'
15
16
 
16
- export default defineComponent({
17
+ const tickStrategyOptions = [ 'none', 'strict', 'leaf', 'leaf-filtered' ]
18
+
19
+ export default createComponent({
17
20
  name: 'QTree',
18
21
 
19
22
  props: {
@@ -36,6 +39,8 @@ export default defineComponent({
36
39
  default: 'children'
37
40
  },
38
41
 
42
+ dense: Boolean,
43
+
39
44
  color: String,
40
45
  controlColor: String,
41
46
  textColor: String,
@@ -46,7 +51,7 @@ export default defineComponent({
46
51
  tickStrategy: {
47
52
  type: String,
48
53
  default: 'none',
49
- validator: v => [ 'none', 'strict', 'leaf', 'leaf-filtered' ].includes(v)
54
+ validator: v => tickStrategyOptions.includes(v)
50
55
  },
51
56
  ticked: Array, // v-model:ticked
52
57
  expanded: Array, // v-model:expanded
@@ -91,7 +96,7 @@ export default defineComponent({
91
96
  })
92
97
 
93
98
  const classes = computed(() =>
94
- 'q-tree'
99
+ `q-tree q-tree--${ props.dense === true ? 'dense' : 'standard' }`
95
100
  + (props.noConnectors === true ? ' q-tree--no-connectors' : '')
96
101
  + (isDark.value === true ? ' q-tree--dark' : '')
97
102
  + (props.color !== void 0 ? ` text-${ props.color }` : '')
@@ -533,13 +538,13 @@ export default defineComponent({
533
538
 
534
539
  m.lazy === 'loading'
535
540
  ? h(QSpinner, {
536
- class: 'q-tree__spinner q-mr-xs',
541
+ class: 'q-tree__spinner',
537
542
  color: computedControlColor.value
538
543
  })
539
544
  : (
540
545
  isParent === true
541
546
  ? h(QIcon, {
542
- class: 'q-tree__arrow q-mr-xs'
547
+ class: 'q-tree__arrow'
543
548
  + (m.expanded === true ? ' q-tree__arrow--rotate' : ''),
544
549
  name: computedIcon.value,
545
550
  onClick (e) { onExpandClick(node, m, e) }
@@ -549,7 +554,7 @@ export default defineComponent({
549
554
 
550
555
  m.hasTicking === true && m.noTick !== true
551
556
  ? h(QCheckbox, {
552
- class: 'q-mr-xs',
557
+ class: 'q-tree__tickbox',
553
558
  modelValue: m.indeterminate === true ? null : m.ticked,
554
559
  color: computedControlColor.value,
555
560
  dark: isDark.value,
@@ -61,6 +61,11 @@
61
61
  "desc": "Color name for selected nodes (from the Quasar Color Palette)"
62
62
  },
63
63
 
64
+ "dense": {
65
+ "extends": "dense",
66
+ "addedIn": "v2.2.4"
67
+ },
68
+
64
69
  "dark": {
65
70
  "extends": "dark"
66
71
  },
@@ -39,7 +39,7 @@
39
39
  position: absolute
40
40
  top: -3px
41
41
  bottom: 50%
42
- width: 35px
42
+ width: 31px
43
43
  left: -35px
44
44
  border-left: 1px solid currentColor
45
45
  border-bottom: 1px solid currentColor
@@ -84,11 +84,13 @@
84
84
  &__node--selected .q-tree__node-header-content
85
85
  color: $grey
86
86
 
87
- &__icon, &__node-header-content .q-icon, &__spinner
87
+ &__icon,
88
+ &__node-header-content .q-icon
88
89
  font-size: 21px
89
90
 
90
91
  &__img
91
92
  height: 42px
93
+ border-radius: 2px
92
94
 
93
95
  &__avatar, &__node-header-content .q-avatar
94
96
  font-size: 28px
@@ -96,15 +98,20 @@
96
98
  width: 28px
97
99
  height: 28px
98
100
 
99
- &__arrow, &__spinner
101
+ &__arrow,
102
+ &__spinner
100
103
  font-size: 16px
101
104
 
102
105
  &__arrow
103
106
  transition: transform .3s
107
+ margin-right: 4px
104
108
 
105
109
  &--rotate
106
110
  transform: rotate3d(0, 0, 1, 90deg)
107
111
 
112
+ &__tickbox
113
+ margin-right: 4px
114
+
108
115
  // remove connectors before root
109
116
  > .q-tree__node
110
117
  padding: 0
@@ -123,10 +130,51 @@
123
130
  .q-tree__node-body:after
124
131
  display: none !important
125
132
 
133
+ &--dense .q-tree
134
+ &__arrow,
135
+ &__spinner
136
+ margin-right: 1px
137
+
138
+ &__img
139
+ height: 32px
140
+
141
+ &__tickbox
142
+ margin-right: 3px
143
+
144
+ &__node
145
+ padding: 0
146
+ &:after
147
+ top: 0
148
+ left: -8px
149
+
150
+ &__node-header
151
+ margin-top: 0
152
+ padding: 1px
153
+ &:before
154
+ top: 0
155
+ left: -8px
156
+ width: 8px
157
+
158
+ &__node--child
159
+ padding-left: 17px
160
+ > .q-tree__node-header:before
161
+ left: -25px
162
+ width: 21px
163
+
164
+ &__node-body
165
+ padding: 0 0 2px
166
+
167
+ &__node--parent > .q-tree__node-collapsible > .q-tree__node-body
168
+ padding: 0 0 2px 20px
169
+ &:after
170
+ left: 8px
171
+
172
+ &__children
173
+ padding-left: 16px
174
+
126
175
  [dir=rtl]
127
176
  .q-tree__arrow
128
177
  transform: rotate3d(0, 0, 1, 180deg) #{"/* rtl:ignore */"}
129
178
 
130
179
  &--rotate
131
180
  transform: rotate3d(0, 0, 1, 90deg) #{"/* rtl:ignore */"}
132
-
@@ -1,8 +1,9 @@
1
- import { defineComponent, inject } from 'vue'
1
+ import { inject } from 'vue'
2
2
 
3
+ import { createComponent } from '../../utils/private/create.js'
3
4
  import { uploaderKey } from '../../utils/private/symbols.js'
4
5
 
5
- export default defineComponent({
6
+ export default createComponent({
6
7
  name: 'QUploaderAddTrigger',
7
8
 
8
9
  setup () {
@@ -260,20 +260,15 @@ export function getRenderer (getPlugin) {
260
260
  }
261
261
 
262
262
  function addFilesToQueue (e, fileList) {
263
- const processedFiles = processFiles(e, fileList, state.files.value, true)
263
+ const localFiles = processFiles(e, fileList, state.files.value, true)
264
264
 
265
- if (processedFiles === void 0) { return }
266
-
267
- const localFiles = processedFiles
268
- .filter(file => state.files.value.findIndex(f => file.name === f.name) === -1)
265
+ if (localFiles === void 0) { return }
269
266
 
270
267
  const fileInput = getFileInput()
271
268
  if (fileInput !== void 0 && fileInput !== null) {
272
269
  fileInput.value = ''
273
270
  }
274
271
 
275
- if (localFiles === void 0) { return }
276
-
277
272
  localFiles.forEach(file => {
278
273
  state.updateFileStatus(file, 'idle')
279
274
  uploadSize.value += file.size
@@ -11,7 +11,7 @@
11
11
  }
12
12
  },
13
13
  "returns": {
14
- "type": [ "Object", "Promise" ],
14
+ "type": [ "Object", "Promise<any>" ],
15
15
  "desc": "Optional configuration for the upload process; You can override QUploader props in this Object (url, method, headers, formFields, fieldName, withCredentials, sendRaw); Props of these Object can also be Functions with the form of (file[s]) => value",
16
16
  "__exemption": [ "examples" ]
17
17
  },
@@ -22,6 +22,18 @@
22
22
  "type": [ "String", "Function" ],
23
23
  "desc": "URL or path to the server which handles the upload. Takes String or factory function, which returns String. Function is called right before upload; If using a function then for best performance, reference it from your scope and do not define it inline",
24
24
  "examples": [ "https://example.com/path", "files => `https://example.com?count=${files.length}`" ],
25
+ "params": {
26
+ "files": {
27
+ "type": "Array",
28
+ "desc": "Uploaded files",
29
+ "__exemption": [ "examples" ]
30
+ }
31
+ },
32
+ "returns": {
33
+ "type": "String",
34
+ "desc": "URL or path to the server which handles the upload",
35
+ "__exemption": [ "examples" ]
36
+ },
25
37
  "category": "upload"
26
38
  },
27
39
 
@@ -31,6 +43,18 @@
31
43
  "desc": "HTTP method to use for upload; Takes String or factory function which returns a String; Function is called right before upload; If using a function then for best performance, reference it from your scope and do not define it inline",
32
44
  "values": [ "POST", "PUT" ],
33
45
  "examples": [ "POST", ":method=\"files => files.length > 10 ? 'POST' : 'PUT'\"" ],
46
+ "params": {
47
+ "files": {
48
+ "type": "Array",
49
+ "desc": "Uploaded files",
50
+ "__exemption": [ "examples" ]
51
+ }
52
+ },
53
+ "returns": {
54
+ "type": "String",
55
+ "desc": "HTTP method to use for upload",
56
+ "__exemption": [ "examples" ]
57
+ },
34
58
  "category": "upload"
35
59
  },
36
60
 
@@ -42,6 +66,18 @@
42
66
  "backgroundFile",
43
67
  ":field-name=\"(file) => 'background' + file.name\""
44
68
  ],
69
+ "params": {
70
+ "files": {
71
+ "type": "File",
72
+ "desc": "The current file being processed",
73
+ "__exemption": [ "examples" ]
74
+ }
75
+ },
76
+ "returns": {
77
+ "type": "String",
78
+ "desc": "Field name for the current file upload",
79
+ "__exemption": [ "examples" ]
80
+ },
45
81
  "category": "upload"
46
82
  },
47
83
 
@@ -67,6 +103,18 @@
67
103
  "() => [{name: 'X-Custom-Timestamp', value: Date.now()}]",
68
104
  "files => [{name: 'X-Custom-Count', value: files.length}]"
69
105
  ],
106
+ "params": {
107
+ "files": {
108
+ "type": "Array",
109
+ "desc": "Uploaded files",
110
+ "__exemption": [ "examples" ]
111
+ }
112
+ },
113
+ "returns": {
114
+ "type": "String",
115
+ "desc": "An array consists of objects with header definitions",
116
+ "__exemption": [ "examples" ]
117
+ },
70
118
  "category": "upload"
71
119
  },
72
120
 
@@ -92,6 +140,18 @@
92
140
  "() => [{name: 'my-field', value: 'my-value'}]",
93
141
  "files => [{name: 'my-field', value: 'my-value' + files.length}]"
94
142
  ],
143
+ "params": {
144
+ "files": {
145
+ "type": "Array",
146
+ "desc": "Uploaded files",
147
+ "__exemption": [ "examples" ]
148
+ }
149
+ },
150
+ "returns": {
151
+ "type": "String",
152
+ "desc": "An array consists of objects with additional fields definitions (used by Form to be uploaded)",
153
+ "__exemption": [ "examples" ]
154
+ },
95
155
  "category": "upload"
96
156
  },
97
157
 
@@ -99,6 +159,18 @@
99
159
  "type": [ "Boolean", "Function" ],
100
160
  "desc": "Sets withCredentials to true on the XHR that manages the upload; Takes boolean or factory function for Boolean; Function is called right before upload; If using a function then for best performance, reference it from your scope and do not define it inline",
101
161
  "examples": [ "with-credentials", ":with-credentials=\"files => ...\"" ],
162
+ "params": {
163
+ "files": {
164
+ "type": "Array",
165
+ "desc": "Uploaded files",
166
+ "__exemption": [ "examples" ]
167
+ }
168
+ },
169
+ "returns": {
170
+ "type": "Boolean",
171
+ "desc": "If true, withCredentials will be set to true on the XHR that manages the upload",
172
+ "__exemption": [ "examples" ]
173
+ },
102
174
  "category": "upload"
103
175
  },
104
176
 
@@ -106,6 +178,18 @@
106
178
  "type": [ "Boolean", "Function" ],
107
179
  "desc": "Send raw files without wrapping into a Form(); Takes boolean or factory function for Boolean; Function is called right before upload; If using a function then for best performance, reference it from your scope and do not define it inline",
108
180
  "examples": [ "send-raw", ":send-raw=\"files => ...\"" ],
181
+ "params": {
182
+ "files": {
183
+ "type": "Array",
184
+ "desc": "Uploaded files",
185
+ "__exemption": [ "examples" ]
186
+ }
187
+ },
188
+ "returns": {
189
+ "type": "Boolean",
190
+ "desc": "If true, raw files will get sent without wrapping into a Form()",
191
+ "__exemption": [ "examples" ]
192
+ },
109
193
  "category": "upload"
110
194
  },
111
195
 
@@ -113,6 +197,18 @@
113
197
  "type": [ "Boolean", "Function" ],
114
198
  "desc": "Upload files in batch (in one XHR request); Takes boolean or factory function for Boolean; Function is called right before upload; If using a function then for best performance, reference it from your scope and do not define it inline",
115
199
  "examples": [ "files => files.length > 10" ],
200
+ "params": {
201
+ "files": {
202
+ "type": "Array",
203
+ "desc": "Uploaded files",
204
+ "__exemption": [ "examples" ]
205
+ }
206
+ },
207
+ "returns": {
208
+ "type": "Boolean",
209
+ "desc": "If true, files will be uploaded in a batch (in one XHR request)",
210
+ "__exemption": [ "examples" ]
211
+ },
116
212
  "category": "upload"
117
213
  }
118
214
  },
@@ -1,8 +1,10 @@
1
- import { h, defineComponent, computed } from 'vue'
1
+ import { h, computed } from 'vue'
2
2
 
3
3
  import useRatio, { useRatioProps } from '../../composables/private/use-ratio.js'
4
4
 
5
- export default defineComponent({
5
+ import { createComponent } from '../../utils/private/create.js'
6
+
7
+ export default createComponent({
6
8
  name: 'QVideo',
7
9
 
8
10
  props: {
@@ -1,4 +1,4 @@
1
- import { h, defineComponent, ref, computed, watch, onBeforeMount, onMounted, onBeforeUnmount } from 'vue'
1
+ import { h, ref, computed, watch, onBeforeMount, onMounted, onBeforeUnmount } from 'vue'
2
2
 
3
3
  import QList from '../item/QList.js'
4
4
  import QMarkupTable from '../markup-table/QMarkupTable.js'
@@ -6,6 +6,7 @@ import getTableMiddle from '../table/get-table-middle.js'
6
6
 
7
7
  import { useVirtualScroll, useVirtualScrollProps } from './use-virtual-scroll.js'
8
8
 
9
+ import { createComponent } from '../../utils/private/create.js'
9
10
  import { getScrollTarget } from '../../utils/scroll.js'
10
11
  import { listenOpts } from '../../utils/event.js'
11
12
  import { hMergeSlot } from '../../utils/private/render.js'
@@ -17,7 +18,7 @@ const comps = {
17
18
 
18
19
  const typeOptions = [ 'list', 'table', '__qtable' ]
19
20
 
20
- export default defineComponent({
21
+ export default createComponent({
21
22
  name: 'QVirtualScroll',
22
23
 
23
24
  props: {
@@ -1,4 +1,4 @@
1
- import { h, ref, computed, watch, onBeforeMount, onBeforeUnmount, nextTick, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, onActivated, onBeforeMount, onBeforeUnmount, nextTick, getCurrentInstance } from 'vue'
2
2
 
3
3
  import debounce from '../../utils/debounce.js'
4
4
  import { noop } from '../../utils/event.js'
@@ -679,6 +679,22 @@ export function useVirtualScroll ({
679
679
  setVirtualScrollSize()
680
680
  })
681
681
 
682
+ onActivated(() => {
683
+ const scrollEl = getVirtualScrollTarget()
684
+
685
+ if (prevScrollStart !== void 0 && scrollEl !== void 0 && scrollEl !== null && scrollEl.nodeType !== 8) {
686
+ setScroll(
687
+ scrollEl,
688
+ prevScrollStart,
689
+ props.virtualScrollHorizontal,
690
+ $q.lang.rtl
691
+ )
692
+ }
693
+ else {
694
+ scrollTo(prevToIndex)
695
+ }
696
+ })
697
+
682
698
  setOverflowAnchor !== noop && onBeforeUnmount(() => {
683
699
  const styleSheet = document.getElementById(vsId + '_ss')
684
700
  styleSheet !== null && styleSheet.remove()
@@ -88,7 +88,7 @@ export function useFieldState () {
88
88
 
89
89
  innerLoading: ref(false),
90
90
  focused: ref(false),
91
- hasPopupOpen: ref(false),
91
+ hasPopupOpen: false,
92
92
 
93
93
  splitAttrs: useSplitAttrs(attrs),
94
94
  targetUid: ref(getTargetUid(props.for)),
@@ -301,7 +301,7 @@ export default function (state) {
301
301
  focusoutTimer = setTimeout(() => {
302
302
  if (
303
303
  document.hasFocus() === true && (
304
- state.hasPopupOpen.value === true
304
+ state.hasPopupOpen === true
305
305
  || (
306
306
  state.controlRef !== void 0
307
307
  && (
@@ -112,6 +112,14 @@ export default function ({
112
112
  files = [ files[ 0 ] ]
113
113
  }
114
114
 
115
+ // Avoid duplicate files
116
+ const filenameMap = currentFileList.map(entry => entry.name)
117
+ files = filterFiles(files, rejectedFiles, 'duplicate', file => {
118
+ return filenameMap.includes(file.name) === false
119
+ })
120
+
121
+ if (files.length === 0) { return done() }
122
+
115
123
  if (props.maxTotalSize !== void 0) {
116
124
  let size = append === true
117
125
  ? currentFileList.reduce((total, file) => total + file.size, 0)
@@ -8,7 +8,7 @@ export const useModelToggleProps = {
8
8
  default: null
9
9
  },
10
10
 
11
- 'onUpdate:modelValue': Function
11
+ 'onUpdate:modelValue': [ Function, Array ]
12
12
  }
13
13
 
14
14
  export const useModelToggleEmits = [
@@ -16,12 +16,21 @@ export default function (props, rootRef) {
16
16
  })
17
17
 
18
18
  function refocusTarget (e) {
19
+ const root = rootRef.value
20
+
19
21
  if (e !== void 0 && e.type.indexOf('key') === 0) {
20
- if (document.activeElement !== rootRef.value && rootRef.value.contains(document.activeElement) === true) {
21
- rootRef.value.focus()
22
+ if (
23
+ root !== null
24
+ && document.activeElement !== root
25
+ && root.contains(document.activeElement) === true
26
+ ) {
27
+ root.focus()
22
28
  }
23
29
  }
24
- else if ((e === void 0 || rootRef.value.contains(e.target) === true) && refocusRef.value !== null) {
30
+ else if (
31
+ refocusRef.value !== null
32
+ && (e === void 0 || (root !== null && root.contains(e.target) === true))
33
+ ) {
25
34
  refocusRef.value.focus()
26
35
  }
27
36
  }
@@ -1,5 +1,7 @@
1
1
  import { ref, getCurrentInstance } from 'vue'
2
2
 
3
+ import getEmitsObject from '../utils/private/get-emits-object'
4
+
3
5
  // To be used for the custom component
4
6
  // used on a Dialog plugin
5
7
 
@@ -34,6 +36,9 @@ function useDialogPluginComponent () {
34
36
  }
35
37
  }
36
38
 
37
- useDialogPluginComponent.emits = [ 'ok', 'hide' ]
39
+ const emits = [ 'ok', 'hide' ]
40
+
41
+ useDialogPluginComponent.emits = emits
42
+ useDialogPluginComponent.emitsObject = getEmitsObject(emits)
38
43
 
39
44
  export default useDialogPluginComponent
@@ -1,4 +1,6 @@
1
- // default easing is easeOutCubic
1
+ // should not need this, but it's good as fallback
2
+ \:root
3
+ --q-transition-duration: .3s
2
4
 
3
5
  .q-transition
4
6
  &--slide-right,
@@ -160,13 +160,6 @@ progress
160
160
  textarea
161
161
  overflow: auto
162
162
 
163
- /*
164
- * Correct the odd appearance of search inputs in Chrome and Safari.
165
- */
166
-
167
- input[type='search']
168
- -webkit-appearance: textfield
169
-
170
163
  /*
171
164
  * Remove the inner padding and cancel buttons in Chrome on OS X and
172
165
  * Safari on OS X.
@@ -1,3 +1,4 @@
1
+ import { createDirective } from '../utils/private/create.js'
1
2
  import { closePortals, getPortalVm } from '../utils/private/portal.js'
2
3
  import { isKeyCode } from '../utils/private/key-composition.js'
3
4
  import getSSRProps from '../utils/private/noop-ssr-directive-transform.js'
@@ -21,7 +22,7 @@ function getDepth (value) {
21
22
  return isNaN(depth) ? 0 : depth
22
23
  }
23
24
 
24
- export default __QUASAR_SSR_SERVER__
25
+ export default createDirective(__QUASAR_SSR_SERVER__
25
26
  ? { name: 'close-popup', getSSRProps }
26
27
  : {
27
28
  name: 'close-popup',
@@ -64,3 +65,4 @@ export default __QUASAR_SSR_SERVER__
64
65
  delete el.__qclosepopup
65
66
  }
66
67
  }
68
+ )
@@ -1,3 +1,4 @@
1
+ import { createDirective } from '../utils/private/create.js'
1
2
  import { isDeepEqual } from '../utils/private/is.js'
2
3
  import getSSRProps from '../utils/private/noop-ssr-directive-transform.js'
3
4
 
@@ -66,7 +67,7 @@ function destroy (el) {
66
67
  }
67
68
  }
68
69
 
69
- export default __QUASAR_SSR_SERVER__
70
+ export default createDirective(__QUASAR_SSR_SERVER__
70
71
  ? { name: 'intersection', getSSRProps }
71
72
  : {
72
73
  name: 'intersection',
@@ -88,3 +89,4 @@ export default __QUASAR_SSR_SERVER__
88
89
 
89
90
  beforeUnmount: destroy
90
91
  }
92
+ )
@@ -1,4 +1,6 @@
1
+ import { createDirective } from '../utils/private/create.js'
1
2
  import morph from '../utils/morph.js'
3
+
2
4
  import getSSRProps from './Morph.ssr.js'
3
5
 
4
6
  const morphGroups = {}
@@ -161,7 +163,7 @@ function updateValue (ctx, value) {
161
163
  }
162
164
  }
163
165
 
164
- export default __QUASAR_SSR_SERVER__
166
+ export default createDirective(__QUASAR_SSR_SERVER__
165
167
  ? { name: 'morph', getSSRProps }
166
168
  : {
167
169
  name: 'morph',
@@ -209,3 +211,4 @@ export default __QUASAR_SSR_SERVER__
209
211
  delete el.__qmorph
210
212
  }
211
213
  }
214
+ )
@@ -1,3 +1,4 @@
1
+ import { createDirective } from '../utils/private/create.js'
1
2
  import getSSRProps from '../utils/private/noop-ssr-directive-transform.js'
2
3
 
3
4
  const defaultCfg = {
@@ -34,7 +35,7 @@ function destroy (el) {
34
35
  }
35
36
  }
36
37
 
37
- export default __QUASAR_SSR_SERVER__
38
+ export default createDirective(__QUASAR_SSR_SERVER__
38
39
  ? { name: 'mutation', getSSRProps }
39
40
  : {
40
41
  name: 'mutation',
@@ -61,3 +62,4 @@ export default __QUASAR_SSR_SERVER__
61
62
 
62
63
  beforeUnmount: destroy
63
64
  }
65
+ )