quasar 2.1.9 → 2.2.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 (270) hide show
  1. package/dist/api/QCarousel.json +19 -5
  2. package/dist/api/QColor.json +6 -0
  3. package/dist/api/QInnerLoading.json +32 -0
  4. package/dist/api/QOptionGroup.json +58 -1
  5. package/dist/api/QRange.json +10 -3
  6. package/dist/api/QSeparator.json +1 -1
  7. package/dist/api/QSkeleton.json +14 -0
  8. package/dist/api/QSlider.json +10 -3
  9. package/dist/api/QStepper.json +16 -2
  10. package/dist/api/QTabPanels.json +16 -2
  11. package/dist/api/QTable.json +5 -0
  12. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  13. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  14. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  15. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  16. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  17. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  18. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  19. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  20. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  21. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  22. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  23. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  24. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  25. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  26. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  27. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  28. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  29. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  30. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  31. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  32. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  33. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  34. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  35. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  36. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  37. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  38. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  39. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  40. package/dist/icon-set/themify.umd.prod.js +1 -1
  41. package/dist/lang/ar.umd.prod.js +1 -1
  42. package/dist/lang/az-Latn.umd.prod.js +1 -1
  43. package/dist/lang/bg.umd.prod.js +1 -1
  44. package/dist/lang/bn.umd.prod.js +1 -1
  45. package/dist/lang/ca.umd.prod.js +1 -1
  46. package/dist/lang/cs.umd.prod.js +1 -1
  47. package/dist/lang/da.umd.prod.js +1 -1
  48. package/dist/lang/de.umd.prod.js +1 -1
  49. package/dist/lang/el.umd.prod.js +1 -1
  50. package/dist/lang/en-GB.umd.prod.js +1 -1
  51. package/dist/lang/en-US.umd.prod.js +1 -1
  52. package/dist/lang/eo.umd.prod.js +1 -1
  53. package/dist/lang/es.umd.prod.js +1 -1
  54. package/dist/lang/et.umd.prod.js +1 -1
  55. package/dist/lang/fa-IR.umd.prod.js +1 -1
  56. package/dist/lang/fa.umd.prod.js +1 -1
  57. package/dist/lang/fi.umd.prod.js +1 -1
  58. package/dist/lang/fr.umd.prod.js +1 -1
  59. package/dist/lang/gn.umd.prod.js +1 -1
  60. package/dist/lang/he.umd.prod.js +1 -1
  61. package/dist/lang/hr.umd.prod.js +1 -1
  62. package/dist/lang/hu.umd.prod.js +1 -1
  63. package/dist/lang/id.umd.prod.js +1 -1
  64. package/dist/lang/is.umd.prod.js +1 -1
  65. package/dist/lang/it.umd.prod.js +1 -1
  66. package/dist/lang/ja.umd.prod.js +1 -1
  67. package/dist/lang/km.umd.prod.js +1 -1
  68. package/dist/lang/ko-KR.umd.prod.js +1 -1
  69. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  70. package/dist/lang/lt.umd.prod.js +6 -0
  71. package/dist/lang/lu.umd.prod.js +1 -1
  72. package/dist/lang/lv.umd.prod.js +1 -1
  73. package/dist/lang/ml.umd.prod.js +1 -1
  74. package/dist/lang/ms.umd.prod.js +1 -1
  75. package/dist/lang/nb-NO.umd.prod.js +1 -1
  76. package/dist/lang/nl.umd.prod.js +1 -1
  77. package/dist/lang/pl.umd.prod.js +1 -1
  78. package/dist/lang/pt-BR.umd.prod.js +1 -1
  79. package/dist/lang/pt.umd.prod.js +1 -1
  80. package/dist/lang/ro.umd.prod.js +1 -1
  81. package/dist/lang/ru.umd.prod.js +1 -1
  82. package/dist/lang/sk.umd.prod.js +1 -1
  83. package/dist/lang/sl.umd.prod.js +1 -1
  84. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  85. package/dist/lang/sr.umd.prod.js +1 -1
  86. package/dist/lang/sv.umd.prod.js +1 -1
  87. package/dist/lang/ta.umd.prod.js +1 -1
  88. package/dist/lang/th.umd.prod.js +1 -1
  89. package/dist/lang/tr.umd.prod.js +1 -1
  90. package/dist/lang/ug.umd.prod.js +2 -2
  91. package/dist/lang/uk.umd.prod.js +1 -1
  92. package/dist/lang/vi.umd.prod.js +1 -1
  93. package/dist/lang/zh-CN.umd.prod.js +1 -1
  94. package/dist/lang/zh-TW.umd.prod.js +1 -1
  95. package/dist/quasar.cjs.prod.js +2 -2
  96. package/dist/quasar.css +24 -23
  97. package/dist/quasar.esm.prod.js +2 -2
  98. package/dist/quasar.prod.css +1 -1
  99. package/dist/quasar.rtl.css +29 -28
  100. package/dist/quasar.rtl.prod.css +1 -1
  101. package/dist/quasar.sass +24 -18
  102. package/dist/quasar.umd.js +538 -391
  103. package/dist/quasar.umd.prod.js +2 -2
  104. package/dist/ssr-directives/Morph.js +1 -1
  105. package/dist/types/index.d.ts +81 -12
  106. package/dist/vetur/quasar-attributes.json +39 -7
  107. package/dist/vetur/quasar-tags.json +9 -1
  108. package/dist/web-types/web-types.json +101 -15
  109. package/lang/index.json +4 -0
  110. package/lang/lt.js +103 -0
  111. package/lang/ug.js +42 -42
  112. package/package.json +1 -1
  113. package/src/components/ajax-bar/QAjaxBar.js +3 -2
  114. package/src/components/avatar/QAvatar.js +3 -2
  115. package/src/components/badge/QBadge.js +3 -2
  116. package/src/components/banner/QBanner.js +3 -2
  117. package/src/components/bar/QBar.js +3 -2
  118. package/src/components/breadcrumbs/QBreadcrumbs.js +3 -2
  119. package/src/components/breadcrumbs/QBreadcrumbsEl.js +3 -2
  120. package/src/components/btn/QBtn.js +19 -21
  121. package/src/components/btn-dropdown/QBtnDropdown.js +3 -2
  122. package/src/components/btn-group/QBtnGroup.js +3 -2
  123. package/src/components/btn-toggle/QBtnToggle.js +3 -2
  124. package/src/components/card/QCard.js +3 -2
  125. package/src/components/card/QCardActions.js +3 -2
  126. package/src/components/card/QCardSection.js +3 -2
  127. package/src/components/carousel/QCarousel.js +11 -3
  128. package/src/components/carousel/QCarousel.json +9 -1
  129. package/src/components/carousel/QCarouselControl.js +3 -2
  130. package/src/components/carousel/QCarouselSlide.js +3 -2
  131. package/src/components/chat/QChatMessage.js +3 -2
  132. package/src/components/checkbox/QCheckbox.js +3 -2
  133. package/src/components/chip/QChip.js +3 -2
  134. package/src/components/circular-progress/QCircularProgress.js +3 -2
  135. package/src/components/color/QColor.js +76 -63
  136. package/src/components/color/QColor.json +7 -0
  137. package/src/components/color/QColor.sass +5 -1
  138. package/src/components/date/QDate.js +5 -3
  139. package/src/components/dialog/QDialog.js +9 -2
  140. package/src/components/dialog-bottom-sheet/BottomSheet.js +3 -2
  141. package/src/components/dialog-plugin/DialogPlugin.js +3 -2
  142. package/src/components/drawer/QDrawer.js +6 -2
  143. package/src/components/editor/QEditor.js +3 -2
  144. package/src/components/expansion-item/QExpansionItem.js +3 -2
  145. package/src/components/fab/QFab.js +3 -2
  146. package/src/components/fab/QFabAction.js +3 -2
  147. package/src/components/field/QField.js +3 -3
  148. package/src/components/file/QFile.js +3 -2
  149. package/src/components/footer/QFooter.js +3 -2
  150. package/src/components/form/QForm.js +3 -2
  151. package/src/components/header/QHeader.js +3 -2
  152. package/src/components/icon/QIcon.js +4 -2
  153. package/src/components/img/QImg.js +5 -2
  154. package/src/components/infinite-scroll/QInfiniteScroll.js +3 -2
  155. package/src/components/inner-loading/QInnerLoading.js +34 -9
  156. package/src/components/inner-loading/QInnerLoading.json +29 -0
  157. package/src/components/inner-loading/QInnerLoading.sass +4 -0
  158. package/src/components/input/QInput.js +3 -2
  159. package/src/components/intersection/QIntersection.js +3 -2
  160. package/src/components/item/QItem.js +3 -2
  161. package/src/components/item/QItemLabel.js +3 -2
  162. package/src/components/item/QItemSection.js +3 -2
  163. package/src/components/item/QList.js +3 -3
  164. package/src/components/knob/QKnob.js +3 -2
  165. package/src/components/layout/QLayout.js +3 -2
  166. package/src/components/linear-progress/QLinearProgress.js +3 -2
  167. package/src/components/markup-table/QMarkupTable.js +3 -2
  168. package/src/components/menu/QMenu.js +4 -3
  169. package/src/components/no-ssr/QNoSsr.js +3 -2
  170. package/src/components/option-group/QOptionGroup.js +33 -21
  171. package/src/components/option-group/QOptionGroup.json +50 -1
  172. package/src/components/page/QPage.js +3 -2
  173. package/src/components/page/QPageContainer.js +3 -2
  174. package/src/components/page-scroller/QPageScroller.js +4 -2
  175. package/src/components/page-sticky/QPageSticky.js +2 -3
  176. package/src/components/pagination/QPagination.js +3 -2
  177. package/src/components/parallax/QParallax.js +3 -2
  178. package/src/components/popup-edit/QPopupEdit.js +3 -2
  179. package/src/components/popup-proxy/QPopupProxy.js +4 -2
  180. package/src/components/pull-to-refresh/QPullToRefresh.js +3 -2
  181. package/src/components/radio/QRadio.js +3 -2
  182. package/src/components/range/QRange.js +4 -3
  183. package/src/components/range/QRange.json +7 -3
  184. package/src/components/rating/QRating.js +65 -44
  185. package/src/components/rating/QRating.sass +8 -6
  186. package/src/components/resize-observer/QResizeObserver.js +3 -2
  187. package/src/components/responsive/QResponsive.js +3 -2
  188. package/src/components/scroll-area/QScrollArea.js +3 -2
  189. package/src/components/scroll-observer/QScrollObserver.js +3 -2
  190. package/src/components/select/QSelect.js +3 -2
  191. package/src/components/separator/QSeparator.js +4 -2
  192. package/src/components/separator/QSeparator.json +1 -1
  193. package/src/components/skeleton/QSkeleton.js +18 -7
  194. package/src/components/skeleton/QSkeleton.json +9 -0
  195. package/src/components/skeleton/QSkeleton.sass +7 -6
  196. package/src/components/slide-item/QSlideItem.js +3 -2
  197. package/src/components/slide-transition/QSlideTransition.js +4 -2
  198. package/src/components/slider/QSlider.js +4 -3
  199. package/src/components/slider/QSlider.json +7 -3
  200. package/src/components/slider/use-slider.js +7 -2
  201. package/src/components/space/QSpace.js +4 -2
  202. package/src/components/spinner/QSpinner.js +4 -2
  203. package/src/components/spinner/QSpinnerAudio.js +4 -2
  204. package/src/components/spinner/QSpinnerBall.js +4 -2
  205. package/src/components/spinner/QSpinnerBars.js +4 -2
  206. package/src/components/spinner/QSpinnerBox.js +4 -2
  207. package/src/components/spinner/QSpinnerClock.js +4 -2
  208. package/src/components/spinner/QSpinnerComment.js +4 -2
  209. package/src/components/spinner/QSpinnerCube.js +4 -2
  210. package/src/components/spinner/QSpinnerDots.js +4 -2
  211. package/src/components/spinner/QSpinnerFacebook.js +4 -2
  212. package/src/components/spinner/QSpinnerGears.js +4 -2
  213. package/src/components/spinner/QSpinnerGrid.js +4 -2
  214. package/src/components/spinner/QSpinnerHearts.js +4 -2
  215. package/src/components/spinner/QSpinnerHourglass.js +4 -2
  216. package/src/components/spinner/QSpinnerInfinity.js +4 -2
  217. package/src/components/spinner/QSpinnerIos.js +4 -2
  218. package/src/components/spinner/QSpinnerOrbit.js +4 -2
  219. package/src/components/spinner/QSpinnerOval.js +4 -2
  220. package/src/components/spinner/QSpinnerPie.js +4 -2
  221. package/src/components/spinner/QSpinnerPuff.js +4 -2
  222. package/src/components/spinner/QSpinnerRadio.js +4 -2
  223. package/src/components/spinner/QSpinnerRings.js +4 -2
  224. package/src/components/spinner/QSpinnerTail.js +4 -2
  225. package/src/components/splitter/QSplitter.js +3 -2
  226. package/src/components/stepper/QStep.js +3 -2
  227. package/src/components/stepper/QStepper.js +3 -2
  228. package/src/components/stepper/QStepperNavigation.js +3 -2
  229. package/src/components/stepper/StepHeader.js +12 -10
  230. package/src/components/tab-panels/QTabPanel.js +4 -2
  231. package/src/components/tab-panels/QTabPanels.js +3 -2
  232. package/src/components/table/QTable.js +4 -2
  233. package/src/components/table/QTable.json +1 -0
  234. package/src/components/table/QTd.js +3 -2
  235. package/src/components/table/QTh.js +3 -2
  236. package/src/components/table/QTr.js +3 -2
  237. package/src/components/tabs/QRouteTab.js +4 -2
  238. package/src/components/tabs/QTab.js +3 -3
  239. package/src/components/tabs/QTabs.js +3 -2
  240. package/src/components/tabs/use-tab.js +11 -9
  241. package/src/components/time/QTime.js +3 -4
  242. package/src/components/timeline/QTimeline.js +3 -2
  243. package/src/components/timeline/QTimelineEntry.js +3 -2
  244. package/src/components/toggle/QToggle.js +5 -2
  245. package/src/components/toolbar/QToolbar.js +3 -2
  246. package/src/components/toolbar/QToolbarTitle.js +3 -2
  247. package/src/components/tooltip/QTooltip.js +3 -2
  248. package/src/components/tree/QTree.js +3 -2
  249. package/src/components/uploader/QUploaderAddTrigger.js +3 -2
  250. package/src/components/video/QVideo.js +4 -2
  251. package/src/components/virtual-scroll/QVirtualScroll.js +3 -2
  252. package/src/composables/private/use-panel.js +13 -8
  253. package/src/composables/private/use-panel.json +11 -2
  254. package/src/css/core/transitions.sass +4 -4
  255. package/src/css/normalize.sass +0 -7
  256. package/src/directives/ClosePopup.js +3 -1
  257. package/src/directives/Intersection.js +3 -1
  258. package/src/directives/Morph.js +4 -1
  259. package/src/directives/Mutation.js +3 -1
  260. package/src/directives/Ripple.js +3 -1
  261. package/src/directives/Scroll.js +3 -1
  262. package/src/directives/ScrollFire.js +3 -1
  263. package/src/directives/TouchHold.js +4 -1
  264. package/src/directives/TouchPan.js +4 -1
  265. package/src/directives/TouchRepeat.js +4 -1
  266. package/src/directives/TouchSwipe.js +4 -1
  267. package/src/plugins/Notify.js +4 -3
  268. package/src/utils/create-uploader-component.js +3 -3
  269. package/src/utils/date.js +93 -60
  270. package/src/utils/private/create.js +4 -0
@@ -1,11 +1,12 @@
1
- import { h, defineComponent, computed, Transition, getCurrentInstance } from 'vue'
1
+ import { h, computed, Transition, getCurrentInstance } from 'vue'
2
2
 
3
3
  import QSpinner from '../spinner/QSpinner.js'
4
4
 
5
+ import { createComponent } from '../../utils/private/create.js'
5
6
  import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
6
7
  import useTransition, { useTransitionProps } from '../../composables/private/use-transition.js'
7
8
 
8
- export default defineComponent({
9
+ export default createComponent({
9
10
  name: 'QInnerLoading',
10
11
 
11
12
  props: {
@@ -18,7 +19,11 @@ export default defineComponent({
18
19
  size: {
19
20
  type: [ String, Number ],
20
21
  default: 42
21
- }
22
+ },
23
+
24
+ label: String,
25
+ labelClass: String,
26
+ labelStyle: [ String, Array, Object ]
22
27
  },
23
28
 
24
29
  setup (props, { slots }) {
@@ -32,6 +37,31 @@ export default defineComponent({
32
37
  + (isDark.value === true ? ' q-inner-loading--dark' : '')
33
38
  )
34
39
 
40
+ const labelClass = computed(() =>
41
+ 'q-inner-loading__label'
42
+ + (props.labelClass !== void 0 ? ` ${ props.labelClass}` : '')
43
+ )
44
+
45
+ function getInner () {
46
+ const child = [
47
+ h(QSpinner, {
48
+ size: props.size,
49
+ color: props.color
50
+ })
51
+ ]
52
+
53
+ if (props.label !== void 0) {
54
+ child.push(
55
+ h('div', {
56
+ class: labelClass.value,
57
+ style: props.labelStyle
58
+ }, [ props.label ])
59
+ )
60
+ }
61
+
62
+ return child
63
+ }
64
+
35
65
  function getContent () {
36
66
  return props.showing === true
37
67
  ? h(
@@ -39,12 +69,7 @@ export default defineComponent({
39
69
  { class: classes.value, style: transitionStyle.value },
40
70
  slots.default !== void 0
41
71
  ? slots.default()
42
- : [
43
- h(QSpinner, {
44
- size: props.size,
45
- color: props.color
46
- })
47
- ]
72
+ : getInner()
48
73
  )
49
74
  : null
50
75
  }
@@ -22,6 +22,35 @@
22
22
  "default": "42px"
23
23
  },
24
24
 
25
+ "label": {
26
+ "type": "String",
27
+ "desc": "Add a label; Gets overriden when using the default slot",
28
+ "examples": [ "Please wait..." ],
29
+ "category": "label",
30
+ "addedIn": "v2.2"
31
+ },
32
+
33
+ "label-class": {
34
+ "type": "String",
35
+ "desc": "Add CSS class(es) to the label; Works along the 'label' prop only",
36
+ "examples": [
37
+ "text-red q-mt-xl"
38
+ ],
39
+ "category": "label",
40
+ "addedIn": "v2.2"
41
+ },
42
+
43
+ "label-style": {
44
+ "type": [ "Array", "String", "Object" ],
45
+ "desc": "Apply custom style to the label; Works along the 'label' prop only",
46
+ "examples": [
47
+ "font-size: 28px",
48
+ ":label-style=\"{ color: '#ff0000' }\""
49
+ ],
50
+ "category": "label",
51
+ "addedIn": "v2.2"
52
+ },
53
+
25
54
  "dark": {
26
55
  "extends": "dark"
27
56
  }
@@ -1,4 +1,8 @@
1
1
  .q-inner-loading
2
2
  background: $light-dimmed-background
3
+
3
4
  &--dark
4
5
  background: $dimmed-background
6
+
7
+ &__label
8
+ margin-top: 8px
@@ -1,4 +1,4 @@
1
- import { h, defineComponent, ref, computed, watch, onBeforeUnmount, onMounted, nextTick, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, onBeforeUnmount, onMounted, nextTick, getCurrentInstance } from 'vue'
2
2
 
3
3
  import useField, { useFieldState, useFieldProps, useFieldEmits, fieldValueIsFilled } from '../../composables/private/use-field.js'
4
4
  import useMask, { useMaskProps } from './use-mask.js'
@@ -6,10 +6,11 @@ import { useFormProps, useFormInputNameAttr } from '../../composables/private/us
6
6
  import useFileFormDomProps from '../../composables/private/use-file-dom-props.js'
7
7
  import useKeyComposition from '../../composables/private/use-key-composition.js'
8
8
 
9
+ import { createComponent } from '../../utils/private/create.js'
9
10
  import { stop } from '../../utils/event.js'
10
11
  import { addFocusFn } from '../../utils/private/focus-manager.js'
11
12
 
12
- export default defineComponent({
13
+ export default createComponent({
13
14
  name: 'QInput',
14
15
 
15
16
  inheritAttrs: false,
@@ -1,12 +1,13 @@
1
- import { h, defineComponent, ref, computed, Transition } from 'vue'
1
+ import { h, ref, computed, Transition } from 'vue'
2
2
 
3
3
  import { isRuntimeSsrPreHydration } from '../../plugins/Platform.js'
4
4
 
5
5
  import Intersection from '../../directives/Intersection.js'
6
6
 
7
+ import { createComponent } from '../../utils/private/create.js'
7
8
  import { hSlot, hDir } from '../../utils/private/render.js'
8
9
 
9
- export default defineComponent({
10
+ export default createComponent({
10
11
  name: 'QIntersection',
11
12
 
12
13
  props: {
@@ -1,13 +1,14 @@
1
- import { h, defineComponent, ref, computed, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, getCurrentInstance } from 'vue'
2
2
 
3
3
  import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
4
4
  import useRouterLink, { useRouterLinkProps } from '../../composables/private/use-router-link.js'
5
5
 
6
+ import { createComponent } from '../../utils/private/create.js'
6
7
  import { hUniqueSlot } from '../../utils/private/render.js'
7
8
  import { stopAndPrevent } from '../../utils/event.js'
8
9
  import { isKeyCode } from '../../utils/private/key-composition.js'
9
10
 
10
- export default defineComponent({
11
+ export default createComponent({
11
12
  name: 'QItem',
12
13
 
13
14
  props: {
@@ -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: 'QItemLabel',
7
8
 
8
9
  props: {
@@ -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: 'QItemSection',
7
8
 
8
9
  props: {
@@ -1,10 +1,10 @@
1
- import { h, defineComponent, computed, getCurrentInstance } from 'vue'
1
+ import { h, computed, getCurrentInstance } from 'vue'
2
2
 
3
+ import { createComponent } from '../../utils/private/create.js'
3
4
  import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
4
-
5
5
  import { hSlot } from '../../utils/private/render.js'
6
6
 
7
- export default defineComponent({
7
+ export default createComponent({
8
8
  name: 'QList',
9
9
 
10
10
  props: {
@@ -1,8 +1,9 @@
1
- import { h, defineComponent, ref, computed, watch, onMounted, withDirectives, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, onMounted, withDirectives, getCurrentInstance } from 'vue'
2
2
 
3
3
  import QCircularProgress from '../circular-progress/QCircularProgress.js'
4
4
  import TouchPan from '../../directives/TouchPan.js'
5
5
 
6
+ import { createComponent } from '../../utils/private/create.js'
6
7
  import { position, stopAndPrevent } from '../../utils/event.js'
7
8
  import { between, normalizeToInterval } from '../../utils/format.js'
8
9
 
@@ -13,7 +14,7 @@ import { useCircularCommonProps } from '../circular-progress/use-circular-progre
13
14
  const keyCodes = [ 34, 37, 40, 33, 39, 38 ]
14
15
  const commonPropsName = Object.keys(useCircularCommonProps)
15
16
 
16
- export default defineComponent({
17
+ export default createComponent({
17
18
  name: 'QKnob',
18
19
 
19
20
  props: {
@@ -1,15 +1,16 @@
1
- import { h, defineComponent, ref, reactive, computed, provide, getCurrentInstance } from 'vue'
1
+ import { h, ref, reactive, computed, provide, getCurrentInstance } from 'vue'
2
2
 
3
3
  import { isRuntimeSsrPreHydration } from '../../plugins/Platform.js'
4
4
 
5
5
  import QScrollObserver from '../scroll-observer/QScrollObserver.js'
6
6
  import QResizeObserver from '../resize-observer/QResizeObserver.js'
7
7
 
8
+ import { createComponent } from '../../utils/private/create.js'
8
9
  import { getScrollbarWidth } from '../../utils/scroll.js'
9
10
  import { hMergeSlot } from '../../utils/private/render.js'
10
11
  import { layoutKey } from '../../utils/private/symbols.js'
11
12
 
12
- export default defineComponent({
13
+ export default createComponent({
13
14
  name: 'QLayout',
14
15
 
15
16
  props: {
@@ -1,8 +1,9 @@
1
- import { h, defineComponent, computed, getCurrentInstance } from 'vue'
1
+ import { h, computed, getCurrentInstance } from 'vue'
2
2
 
3
3
  import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
4
4
  import useSize, { useSizeProps } from '../../composables/private/use-size.js'
5
5
 
6
+ import { createComponent } from '../../utils/private/create.js'
6
7
  import { hMergeSlot } from '../../utils/private/render.js'
7
8
 
8
9
  const defaultSizes = {
@@ -21,7 +22,7 @@ function width (val, reverse, $q) {
21
22
  }
22
23
  }
23
24
 
24
- export default defineComponent({
25
+ export default createComponent({
25
26
  name: 'QLinearProgress',
26
27
 
27
28
  props: {
@@ -1,12 +1,13 @@
1
- import { h, defineComponent, computed, getCurrentInstance } from 'vue'
1
+ import { h, computed, getCurrentInstance } from 'vue'
2
2
 
3
3
  import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
4
4
 
5
+ import { createComponent } from '../../utils/private/create.js'
5
6
  import { hSlot } from '../../utils/private/render.js'
6
7
 
7
8
  const separatorValues = [ 'horizontal', 'vertical', 'cell', 'none' ]
8
9
 
9
- export default defineComponent({
10
+ export default createComponent({
10
11
  name: 'QMarkupTable',
11
12
 
12
13
  props: {
@@ -1,4 +1,4 @@
1
- import { h, defineComponent, ref, computed, watch, Transition, onBeforeUnmount, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, Transition, onBeforeUnmount, 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'
@@ -9,6 +9,7 @@ import useTransition, { useTransitionProps } from '../../composables/private/use
9
9
  import useTick from '../../composables/private/use-tick.js'
10
10
  import useTimeout from '../../composables/private/use-timeout.js'
11
11
 
12
+ import { createComponent } from '../../utils/private/create.js'
12
13
  import { closePortalMenus } from '../../utils/private/portal.js'
13
14
  import { getScrollTarget } from '../../utils/scroll.js'
14
15
  import { position, stopAndPrevent } from '../../utils/event.js'
@@ -17,13 +18,13 @@ import { addEscapeKey, removeEscapeKey } from '../../utils/private/escape-key.js
17
18
  import { addFocusout, removeFocusout } from '../../utils/private/focusout.js'
18
19
  import { childHasFocus } from '../../utils/dom.js'
19
20
  import { addClickOutside, removeClickOutside } from '../../utils/private/click-outside.js'
21
+ import { addFocusFn } from '../../utils/private/focus-manager.js'
20
22
 
21
23
  import {
22
24
  validatePosition, validateOffset, setPosition, parsePosition
23
25
  } from '../../utils/private/position-engine.js'
24
- import { addFocusFn } from '../../utils/private/focus-manager.js'
25
26
 
26
- export default defineComponent({
27
+ export default createComponent({
27
28
  name: 'QMenu',
28
29
 
29
30
  inheritAttrs: false,
@@ -1,10 +1,11 @@
1
- import { h, defineComponent } from 'vue'
1
+ import { h } from 'vue'
2
2
 
3
3
  import useCanRender from '../../composables/private/use-can-render.js'
4
4
 
5
+ import { createComponent } from '../../utils/private/create.js'
5
6
  import { hSlot } from '../../utils/private/render.js'
6
7
 
7
- export default defineComponent({
8
+ export default createComponent({
8
9
  name: 'QNoSsr',
9
10
 
10
11
  props: {
@@ -1,9 +1,11 @@
1
- import { h, defineComponent, computed, getCurrentInstance } from 'vue'
1
+ import { h, computed, getCurrentInstance } from 'vue'
2
2
 
3
3
  import QRadio from '../radio/QRadio.js'
4
4
  import QCheckbox from '../checkbox/QCheckbox.js'
5
5
  import QToggle from '../toggle/QToggle.js'
6
6
 
7
+ import { createComponent } from '../../utils/private/create.js'
8
+
7
9
  import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
8
10
 
9
11
  const components = {
@@ -14,7 +16,7 @@ const components = {
14
16
 
15
17
  const typeValues = Object.keys(components)
16
18
 
17
- export default defineComponent({
19
+ export default createComponent({
18
20
  name: 'QOptionGroup',
19
21
 
20
22
  props: {
@@ -48,7 +50,7 @@ export default defineComponent({
48
50
 
49
51
  emits: [ 'update:modelValue' ],
50
52
 
51
- setup (props, { emit }) {
53
+ setup (props, { emit, slots }) {
52
54
  const { proxy: { $q } } = getCurrentInstance()
53
55
 
54
56
  const arrayModel = Array.isArray(props.modelValue)
@@ -92,23 +94,33 @@ export default defineComponent({
92
94
  return () => h('div', {
93
95
  class: classes.value,
94
96
  ...attrs.value
95
- }, props.options.map(opt => h('div', [
96
- h(component.value, {
97
- modelValue: props.modelValue,
98
- val: opt.value,
99
- name: opt.name === void 0 ? props.name : opt.name,
100
- disable: props.disable || opt.disable,
101
- label: opt.label,
102
- leftLabel: opt.leftLabel === void 0 ? props.leftLabel : opt.leftLabel,
103
- color: opt.color === void 0 ? props.color : opt.color,
104
- checkedIcon: opt.checkedIcon,
105
- uncheckedIcon: opt.uncheckedIcon,
106
- dark: opt.dark || isDark.value,
107
- size: opt.size === void 0 ? props.size : opt.size,
108
- dense: props.dense,
109
- keepColor: opt.keepColor === void 0 ? props.keepColor : opt.keepColor,
110
- 'onUpdate:modelValue': onUpdateModelValue
111
- })
112
- ])))
97
+ }, props.options.map((opt, i) => {
98
+ const child = slots[ 'label-' + i ] !== void 0
99
+ ? () => slots[ 'label-' + i ](opt)
100
+ : (
101
+ slots.label !== void 0
102
+ ? () => slots.label(opt)
103
+ : void 0
104
+ )
105
+
106
+ return h('div', [
107
+ h(component.value, {
108
+ modelValue: props.modelValue,
109
+ val: opt.value,
110
+ name: opt.name === void 0 ? props.name : opt.name,
111
+ disable: props.disable || opt.disable,
112
+ label: child === void 0 ? opt.label : null,
113
+ leftLabel: opt.leftLabel === void 0 ? props.leftLabel : opt.leftLabel,
114
+ color: opt.color === void 0 ? props.color : opt.color,
115
+ checkedIcon: opt.checkedIcon,
116
+ uncheckedIcon: opt.uncheckedIcon,
117
+ dark: opt.dark || isDark.value,
118
+ size: opt.size === void 0 ? props.size : opt.size,
119
+ dense: props.dense,
120
+ keepColor: opt.keepColor === void 0 ? props.keepColor : opt.keepColor,
121
+ 'onUpdate:modelValue': onUpdateModelValue
122
+ }, child)
123
+ ])
124
+ }))
113
125
  }
114
126
  })
@@ -14,7 +14,30 @@
14
14
 
15
15
  "options": {
16
16
  "type": "Array",
17
- "desc": "Array of objects with value and label props. The binary components will be created according to this array; Props from QToggle, QCheckbox or QRadio can also be added as key/value pairs to control the components singularly",
17
+ "desc": "Array of objects with value, label, and disable (optional) props. The binary components will be created according to this array; Props from QToggle, QCheckbox or QRadio can also be added as key/value pairs to control the components singularly",
18
+ "definition": {
19
+ "label": {
20
+ "type": "String",
21
+ "desc": "Label to display along the component",
22
+ "required": true,
23
+ "examples": [ "Option 1", "Option 2", "Option 3" ]
24
+ },
25
+ "value": {
26
+ "type": "Any",
27
+ "desc": "Value of the option that will be used by the component model",
28
+ "required": true,
29
+ "examples": [ "op1", "op2", "op3" ]
30
+ },
31
+ "disable": {
32
+ "type": "Boolean",
33
+ "desc": "If true, the option will be disabled"
34
+ },
35
+ "...props": {
36
+ "type": "Any",
37
+ "desc": "Any other props from QToggle, QCheckbox, or QRadio",
38
+ "examples": [ "val=\"car\"", ":true-value=\"trueValue\"", "checked-icon=\"visibility\"" ]
39
+ }
40
+ },
18
41
  "examples": [
19
42
  ":options=\"[ { label: 'Option 1', value: 'op1' }, { label: 'Option 2', value: 'op2' }, { label: 'Option 3', value: 'op3', disable: true } ]\""
20
43
  ],
@@ -72,6 +95,32 @@
72
95
  }
73
96
  },
74
97
 
98
+ "slots": {
99
+ "label": {
100
+ "desc": "Generic slot for all labels",
101
+ "scope": {
102
+ "opt": {
103
+ "type": "Object",
104
+ "desc": "The corresponding option entry from the 'options' prop",
105
+ "__exemption": [ "examples" ]
106
+ }
107
+ },
108
+ "addedIn": "v2.2"
109
+ },
110
+
111
+ "label-[name]": {
112
+ "desc": "Slot to define the specific label for the option at '[name]' where name is a 0-based index; Overrides the generic 'label' slot if used",
113
+ "scope": {
114
+ "...opt": {
115
+ "type": "Object",
116
+ "desc": "The corresponding option entry from the 'options' prop",
117
+ "__exemption": [ "examples" ]
118
+ }
119
+ },
120
+ "addedIn": "v2.2"
121
+ }
122
+ },
123
+
75
124
  "events": {
76
125
  "update:model-value": {
77
126
  "extends": "update:model-value"
@@ -1,9 +1,10 @@
1
- import { h, defineComponent, computed, inject, getCurrentInstance } from 'vue'
1
+ import { h, computed, inject, getCurrentInstance } from 'vue'
2
2
 
3
+ import { createComponent } from '../../utils/private/create.js'
3
4
  import { hSlot } from '../../utils/private/render.js'
4
5
  import { pageContainerKey, layoutKey } from '../../utils/private/symbols.js'
5
6
 
6
- export default defineComponent({
7
+ export default createComponent({
7
8
  name: 'QPage',
8
9
 
9
10
  props: {
@@ -1,9 +1,10 @@
1
- import { h, defineComponent, computed, provide, inject, getCurrentInstance } from 'vue'
1
+ import { h, computed, provide, inject, getCurrentInstance } from 'vue'
2
2
 
3
+ import { createComponent } from '../../utils/private/create.js'
3
4
  import { hSlot } from '../../utils/private/render.js'
4
5
  import { pageContainerKey, layoutKey } from '../../utils/private/symbols.js'
5
6
 
6
- export default defineComponent({
7
+ export default createComponent({
7
8
  name: 'QPageContainer',
8
9
 
9
10
  setup (_, { slots }) {
@@ -1,9 +1,11 @@
1
- import { h, defineComponent, ref, computed, watch, onBeforeUnmount, getCurrentInstance, Transition } from 'vue'
1
+ import { h, ref, computed, watch, onBeforeUnmount, getCurrentInstance, Transition } from 'vue'
2
2
 
3
3
  import usePageSticky, { usePageStickyProps } from '../page-sticky/use-page-sticky.js'
4
4
  import { getScrollTarget, setVerticalScrollPosition } from '../../utils/scroll.js'
5
5
 
6
- export default defineComponent({
6
+ import { createComponent } from '../../utils/private/create.js'
7
+
8
+ export default createComponent({
7
9
  name: 'QPageScroller',
8
10
 
9
11
  props: {
@@ -1,8 +1,7 @@
1
- import { defineComponent } from 'vue'
2
-
1
+ import { createComponent } from '../../utils/private/create.js'
3
2
  import usePageSticky, { usePageStickyProps } from './use-page-sticky'
4
3
 
5
- export default defineComponent({
4
+ export default createComponent({
6
5
  name: 'QPageSticky',
7
6
 
8
7
  props: usePageStickyProps,
@@ -1,14 +1,15 @@
1
- import { h, defineComponent, ref, watch, computed, getCurrentInstance } from 'vue'
1
+ import { h, ref, watch, computed, getCurrentInstance } from 'vue'
2
2
 
3
3
  import QBtn from '../btn/QBtn.js'
4
4
  import QInput from '../input/QInput.js'
5
5
 
6
6
  import useDark, { useDarkProps } from '../../composables/private/use-dark.js'
7
7
 
8
+ import { createComponent } from '../../utils/private/create.js'
8
9
  import { between } from '../../utils/format.js'
9
10
  import { isKeyCode } from '../../utils/private/key-composition.js'
10
11
 
11
- export default defineComponent({
12
+ export default createComponent({
12
13
  name: 'QPagination',
13
14
 
14
15
  props: {
@@ -1,5 +1,6 @@
1
- import { h, defineComponent, ref, watch, onMounted, onBeforeUnmount } from 'vue'
1
+ import { h, ref, watch, onMounted, onBeforeUnmount } from 'vue'
2
2
 
3
+ import { createComponent } from '../../utils/private/create.js'
3
4
  import { height, offset } from '../../utils/dom.js'
4
5
  import frameDebounce from '../../utils/frame-debounce.js'
5
6
  import { getScrollTarget } from '../../utils/scroll.js'
@@ -8,7 +9,7 @@ import { listenOpts } from '../../utils/event.js'
8
9
 
9
10
  const { passive } = listenOpts
10
11
 
11
- export default defineComponent({
12
+ export default createComponent({
12
13
  name: 'QParallax',
13
14
 
14
15
  props: {
@@ -1,12 +1,13 @@
1
- import { h, defineComponent, ref, computed, nextTick, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, nextTick, getCurrentInstance } from 'vue'
2
2
 
3
3
  import QMenu from '../menu/QMenu.js'
4
4
  import QBtn from '../btn/QBtn.js'
5
5
 
6
+ import { createComponent } from '../../utils/private/create.js'
6
7
  import clone from '../../utils/clone.js'
7
8
  import { isDeepEqual } from '../../utils/private/is.js'
8
9
 
9
- export default defineComponent({
10
+ export default createComponent({
10
11
  name: 'QPopupEdit',
11
12
 
12
13
  props: {
@@ -1,12 +1,14 @@
1
- import { h, defineComponent, ref, computed, watch, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, getCurrentInstance } from 'vue'
2
2
 
3
3
  import QDialog from '../dialog/QDialog.js'
4
4
  import QMenu from '../menu/QMenu.js'
5
5
 
6
6
  import useAnchor, { useAnchorProps } from '../../composables/private/use-anchor.js'
7
+
8
+ import { createComponent } from '../../utils/private/create.js'
7
9
  import { hSlot } from '../../utils/private/render.js'
8
10
 
9
- export default defineComponent({
11
+ export default createComponent({
10
12
  name: 'QPopupProxy',
11
13
 
12
14
  props: {
@@ -1,9 +1,10 @@
1
- import { h, defineComponent, ref, computed, watch, onMounted, onBeforeUnmount, getCurrentInstance } from 'vue'
1
+ import { h, ref, computed, watch, onMounted, onBeforeUnmount, getCurrentInstance } from 'vue'
2
2
 
3
3
  import QIcon from '../icon/QIcon.js'
4
4
  import QSpinner from '../spinner/QSpinner.js'
5
5
  import TouchPan from '../../directives/TouchPan.js'
6
6
 
7
+ import { createComponent } from '../../utils/private/create.js'
7
8
  import { getScrollTarget, getVerticalScrollPosition } from '../../utils/scroll.js'
8
9
  import { between } from '../../utils/format.js'
9
10
  import { prevent } from '../../utils/event.js'
@@ -13,7 +14,7 @@ const
13
14
  PULLER_HEIGHT = 40,
14
15
  OFFSET_TOP = 20
15
16
 
16
- export default defineComponent({
17
+ export default createComponent({
17
18
  name: 'QPullToRefresh',
18
19
 
19
20
  props: {