quasar 2.9.2 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/dist/api/QBreadcrumbsEl.json +0 -14
  2. package/dist/api/QBtnDropdown.json +36 -0
  3. package/dist/api/QPagination.json +134 -102
  4. package/dist/api/QTabs.json +1 -1
  5. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  6. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  7. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  8. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  9. package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +1 -1
  10. package/dist/icon-set/fontawesome-v6.umd.prod.js +1 -1
  11. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  12. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  13. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  14. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  15. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  16. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  17. package/dist/icon-set/material-symbols-outlined.umd.prod.js +1 -1
  18. package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
  19. package/dist/icon-set/material-symbols-sharp.umd.prod.js +1 -1
  20. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  21. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  22. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  23. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  24. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  25. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  26. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  27. package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +1 -1
  28. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  29. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  30. package/dist/icon-set/svg-ionicons-v6.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-material-symbols-outlined.umd.prod.js +1 -1
  37. package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +1 -1
  38. package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +1 -1
  39. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  40. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  41. package/dist/icon-set/themify.umd.prod.js +1 -1
  42. package/dist/lang/ar-TN.umd.prod.js +1 -1
  43. package/dist/lang/ar.umd.prod.js +1 -1
  44. package/dist/lang/az-Latn.umd.prod.js +1 -1
  45. package/dist/lang/bg.umd.prod.js +1 -1
  46. package/dist/lang/bn.umd.prod.js +1 -1
  47. package/dist/lang/ca.umd.prod.js +1 -1
  48. package/dist/lang/cs.umd.prod.js +1 -1
  49. package/dist/lang/da.umd.prod.js +1 -1
  50. package/dist/lang/de.umd.prod.js +1 -1
  51. package/dist/lang/el.umd.prod.js +1 -1
  52. package/dist/lang/en-GB.umd.prod.js +1 -1
  53. package/dist/lang/en-US.umd.prod.js +1 -1
  54. package/dist/lang/eo.umd.prod.js +1 -1
  55. package/dist/lang/es.umd.prod.js +1 -1
  56. package/dist/lang/et.umd.prod.js +1 -1
  57. package/dist/lang/eu.umd.prod.js +1 -1
  58. package/dist/lang/fa-IR.umd.prod.js +1 -1
  59. package/dist/lang/fa.umd.prod.js +1 -1
  60. package/dist/lang/fi.umd.prod.js +1 -1
  61. package/dist/lang/fr.umd.prod.js +1 -1
  62. package/dist/lang/gn.umd.prod.js +1 -1
  63. package/dist/lang/he.umd.prod.js +1 -1
  64. package/dist/lang/hr.umd.prod.js +1 -1
  65. package/dist/lang/hu.umd.prod.js +1 -1
  66. package/dist/lang/id.umd.prod.js +1 -1
  67. package/dist/lang/is.umd.prod.js +1 -1
  68. package/dist/lang/it.umd.prod.js +1 -1
  69. package/dist/lang/ja.umd.prod.js +1 -1
  70. package/dist/lang/km.umd.prod.js +1 -1
  71. package/dist/lang/ko-KR.umd.prod.js +1 -1
  72. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  73. package/dist/lang/kz.umd.prod.js +1 -1
  74. package/dist/lang/lt.umd.prod.js +1 -1
  75. package/dist/lang/lu.umd.prod.js +1 -1
  76. package/dist/lang/lv.umd.prod.js +1 -1
  77. package/dist/lang/ml.umd.prod.js +1 -1
  78. package/dist/lang/mm.umd.prod.js +1 -1
  79. package/dist/lang/ms.umd.prod.js +1 -1
  80. package/dist/lang/my.umd.prod.js +1 -1
  81. package/dist/lang/nb-NO.umd.prod.js +1 -1
  82. package/dist/lang/nl.umd.prod.js +1 -1
  83. package/dist/lang/pl.umd.prod.js +1 -1
  84. package/dist/lang/pt-BR.umd.prod.js +1 -1
  85. package/dist/lang/pt.umd.prod.js +1 -1
  86. package/dist/lang/ro.umd.prod.js +1 -1
  87. package/dist/lang/ru.umd.prod.js +1 -1
  88. package/dist/lang/sk.umd.prod.js +1 -1
  89. package/dist/lang/sl.umd.prod.js +1 -1
  90. package/dist/lang/sm.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/uz-Cyrl.umd.prod.js +1 -1
  100. package/dist/lang/uz-Latn.umd.prod.js +1 -1
  101. package/dist/lang/vi.umd.prod.js +1 -1
  102. package/dist/lang/zh-CN.umd.prod.js +1 -1
  103. package/dist/lang/zh-TW.umd.prod.js +1 -1
  104. package/dist/quasar.cjs.prod.js +2 -2
  105. package/dist/quasar.css +10 -0
  106. package/dist/quasar.esm.js +450 -300
  107. package/dist/quasar.esm.prod.js +2 -2
  108. package/dist/quasar.prod.css +1 -1
  109. package/dist/quasar.rtl.css +26 -0
  110. package/dist/quasar.rtl.prod.css +1 -1
  111. package/dist/quasar.sass +11 -1
  112. package/dist/quasar.umd.js +450 -300
  113. package/dist/quasar.umd.prod.js +2 -2
  114. package/dist/transforms/auto-import.json +7 -3
  115. package/dist/transforms/import-map.json +2 -0
  116. package/dist/types/index.d.ts +66 -51
  117. package/dist/vetur/quasar-attributes.json +61 -49
  118. package/dist/vetur/quasar-tags.json +16 -13
  119. package/dist/web-types/web-types.json +121 -92
  120. package/package.json +1 -1
  121. package/src/components/badge/QBadge.js +1 -1
  122. package/src/components/breadcrumbs/QBreadcrumbsEl.json +0 -4
  123. package/src/components/breadcrumbs/__tests__/BasicBreadcrumbs.vue +7 -0
  124. package/src/components/breadcrumbs/__tests__/BreadcrumbWithSeparatorSlot.vue +11 -0
  125. package/src/components/breadcrumbs/__tests__/QBreadcrumbs.spec.js +112 -0
  126. package/src/components/breadcrumbs/__tests__/QBreadcrumbsEl.spec.js +87 -0
  127. package/src/components/btn/use-btn.js +24 -14
  128. package/src/components/btn-dropdown/QBtnDropdown.js +39 -16
  129. package/src/components/btn-dropdown/QBtnDropdown.json +1 -1
  130. package/src/components/btn-toggle/QBtnToggle.js +14 -14
  131. package/src/components/checkbox/use-checkbox.js +1 -1
  132. package/src/components/chip/QChip.js +14 -11
  133. package/src/components/dialog/QDialog.js +2 -1
  134. package/src/components/dialog-bottom-sheet/BottomSheet.js +6 -2
  135. package/src/components/drawer/QDrawer.js +5 -3
  136. package/src/components/footer/QFooter.js +5 -3
  137. package/src/components/header/QHeader.js +5 -3
  138. package/src/components/input/use-mask.js +1 -1
  139. package/src/components/item/QItem.js +1 -0
  140. package/src/components/item/QList.js +1 -1
  141. package/src/components/option-group/QOptionGroup.js +1 -1
  142. package/src/components/page/QPage.js +11 -4
  143. package/src/components/page/QPageContainer.js +5 -3
  144. package/src/components/page-sticky/use-page-sticky.js +5 -3
  145. package/src/components/pagination/QPagination.js +265 -188
  146. package/src/components/pagination/QPagination.json +82 -65
  147. package/src/components/pagination/QPagination.sass +14 -0
  148. package/src/components/resize-observer/QResizeObserver.js +14 -10
  149. package/src/components/stepper/QStep.js +7 -5
  150. package/src/components/tab-panels/QTabPanel.js +1 -1
  151. package/src/components/tabs/QTabs.js +0 -7
  152. package/src/components/tabs/QTabs.json +1 -1
  153. package/src/components/tabs/use-tab.js +5 -3
  154. package/src/components/timeline/QTimelineEntry.js +5 -3
  155. package/src/components/toolbar/QToolbar.js +1 -1
  156. package/src/components/tooltip/QTooltip.js +1 -1
  157. package/src/components/uploader/QUploaderAddTrigger.js +7 -3
  158. package/src/composables/private/use-file.js +10 -1
  159. package/src/utils/private/symbols.js +2 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Quasar Framework v2.9.2
2
+ * Quasar Framework v2.10.0
3
3
  * (c) 2015-present Razvan Stoenescu
4
4
  * Released under the MIT License.
5
5
  */
@@ -1396,6 +1396,8 @@ const formKey = '_q_fo_';
1396
1396
  const tabsKey = '_q_tabs_';
1397
1397
  const uploaderKey = '_q_u_';
1398
1398
 
1399
+ const emptyRenderFn = () => {};
1400
+
1399
1401
  const globalConfig = {};
1400
1402
  let globalConfigIsFrozen = false;
1401
1403
 
@@ -1608,7 +1610,7 @@ function prepareApp (app, uiOpts, pluginOpts) {
1608
1610
  }
1609
1611
 
1610
1612
  var installQuasar = function (parentApp, opts = {}) {
1611
- const $q = { version: '2.9.2' };
1613
+ const $q = { version: '2.10.0' };
1612
1614
 
1613
1615
  if (globalConfigIsFrozen === false) {
1614
1616
  if (opts.config !== void 0) {
@@ -2367,7 +2369,7 @@ var QBadge = createComponent({
2367
2369
  return () => h('div', {
2368
2370
  class: classes.value,
2369
2371
  style: style.value,
2370
- role: 'alert',
2372
+ role: 'status',
2371
2373
  'aria-label': props.label
2372
2374
  }, hMergeSlot(slots.default, props.label !== void 0 ? [ props.label ] : []))
2373
2375
  }
@@ -3298,7 +3300,7 @@ var Ripple = createDirective({
3298
3300
  }
3299
3301
  );
3300
3302
 
3301
- const padding = {
3303
+ const btnPadding = {
3302
3304
  none: 0,
3303
3305
  xs: 4,
3304
3306
  sm: 8,
@@ -3318,6 +3320,21 @@ const defaultSizes$2 = {
3318
3320
  const formTypes = [ 'button', 'submit', 'reset' ];
3319
3321
  const mediaTypeRE = /[^\s]\/[^\s]/;
3320
3322
 
3323
+ const btnDesignOptions = [ 'flat', 'outline', 'push', 'unelevated' ];
3324
+ const getBtnDesign = (props, defaultValue) => {
3325
+ if (props.flat === true) return 'flat'
3326
+ if (props.outline === true) return 'outline'
3327
+ if (props.push === true) return 'push'
3328
+ if (props.unelevated === true) return 'unelevated'
3329
+ return defaultValue
3330
+ };
3331
+ const getBtnDesignAttr = props => {
3332
+ const design = getBtnDesign(props);
3333
+ return design !== void 0
3334
+ ? { [ design ]: true }
3335
+ : {}
3336
+ };
3337
+
3321
3338
  const useBtnProps = {
3322
3339
  ...useSizeProps,
3323
3340
  ...useRouterLinkProps,
@@ -3331,13 +3348,14 @@ const useBtnProps = {
3331
3348
  icon: String,
3332
3349
  iconRight: String,
3333
3350
 
3334
- round: Boolean,
3351
+ ...btnDesignOptions.reduce(
3352
+ (acc, val) => (acc[ val ] = Boolean) && acc,
3353
+ {}
3354
+ ),
3355
+
3335
3356
  square: Boolean,
3336
- outline: Boolean,
3337
- flat: Boolean,
3338
- unelevated: Boolean,
3357
+ round: Boolean,
3339
3358
  rounded: Boolean,
3340
- push: Boolean,
3341
3359
  glossy: Boolean,
3342
3360
 
3343
3361
  size: String,
@@ -3387,7 +3405,7 @@ function useBtn (props) {
3387
3405
  ? Object.assign({}, obj, {
3388
3406
  padding: props.padding
3389
3407
  .split(/\s+/)
3390
- .map(v => (v in padding ? padding[ v ] + 'px' : v))
3408
+ .map(v => (v in btnPadding ? btnPadding[ v ] + 'px' : v))
3391
3409
  .join(' '),
3392
3410
  minWidth: '0',
3393
3411
  minHeight: '0'
@@ -3407,13 +3425,7 @@ function useBtn (props) {
3407
3425
  isActionable.value === true ? props.tabindex || 0 : -1
3408
3426
  ));
3409
3427
 
3410
- const design = computed(() => {
3411
- if (props.flat === true) return 'flat'
3412
- if (props.outline === true) return 'outline'
3413
- if (props.push === true) return 'push'
3414
- if (props.unelevated === true) return 'unelevated'
3415
- return 'standard'
3416
- });
3428
+ const design = computed(() => getBtnDesign(props, 'standard'));
3417
3429
 
3418
3430
  const attributes = computed(() => {
3419
3431
  const acc = { tabindex: tabIndex.value };
@@ -5665,11 +5677,32 @@ function uid$3 () {
5665
5677
  + hexBytes[ b[ 14 ] ] + hexBytes[ b[ 15 ] ]
5666
5678
  }
5667
5679
 
5680
+ const btnPropsList = Object.keys(useBtnProps);
5681
+
5682
+ // let's not duplicate type checking and prop validations
5683
+ // so just specify the props here with no type description
5684
+ const btnProps = btnPropsList.reduce(
5685
+ (acc, key) => (acc[ key ] = {}) && acc,
5686
+ {}
5687
+ );
5688
+
5689
+ const passBtnProps = props => btnPropsList.reduce(
5690
+ (acc, key) => {
5691
+ const val = props[ key ];
5692
+ if (val !== void 0) {
5693
+ acc[ key ] = val;
5694
+ }
5695
+ return acc
5696
+ },
5697
+ {}
5698
+ );
5699
+
5668
5700
  var QBtnDropdown = createComponent({
5669
5701
  name: 'QBtnDropdown',
5670
5702
 
5671
5703
  props: {
5672
- ...useBtnProps,
5704
+ ...btnProps,
5705
+ ...useTransitionProps,
5673
5706
 
5674
5707
  modelValue: Boolean,
5675
5708
  split: Boolean,
@@ -5710,7 +5743,7 @@ var QBtnDropdown = createComponent({
5710
5743
  const menuRef = ref(null);
5711
5744
  const targetUid = uid$3();
5712
5745
 
5713
- const attributes = computed(() => {
5746
+ const ariaAttrs = computed(() => {
5714
5747
  const acc = {
5715
5748
  'aria-expanded': showing.value === true ? 'true' : 'false',
5716
5749
  'aria-haspopup': 'true',
@@ -5738,6 +5771,9 @@ var QBtnDropdown = createComponent({
5738
5771
  + (props.split === false ? ' q-btn-dropdown__arrow-container' : '')
5739
5772
  );
5740
5773
 
5774
+ const btnDesignAttr = computed(() => getBtnDesignAttr(props));
5775
+ const btnProps = computed(() => passBtnProps(props));
5776
+
5741
5777
  watch(() => props.modelValue, val => {
5742
5778
  menuRef.value !== null && menuRef.value[ val ? 'show' : 'hide' ]();
5743
5779
  });
@@ -5818,6 +5854,9 @@ var QBtnDropdown = createComponent({
5818
5854
  self: props.menuSelf,
5819
5855
  offset: props.menuOffset,
5820
5856
  separateClosePopup: true,
5857
+ transitionShow: props.transitionShow,
5858
+ transitionHide: props.transitionHide,
5859
+ transitionDuration: props.transitionDuration,
5821
5860
  onBeforeShow,
5822
5861
  onShow,
5823
5862
  onBeforeHide,
@@ -5828,11 +5867,11 @@ var QBtnDropdown = createComponent({
5828
5867
  if (props.split === false) {
5829
5868
  return h(QBtn, {
5830
5869
  class: 'q-btn-dropdown q-btn-dropdown--simple',
5831
- ...props,
5870
+ ...btnProps.value,
5871
+ ...ariaAttrs.value,
5832
5872
  disable: props.disable === true || props.disableMainBtn === true,
5833
5873
  noWrap: true,
5834
5874
  round: false,
5835
- ...attributes.value,
5836
5875
  onClick
5837
5876
  }, {
5838
5877
  default: () => hSlot(slots.label, []).concat(Arrow),
@@ -5842,21 +5881,17 @@ var QBtnDropdown = createComponent({
5842
5881
 
5843
5882
  return h(QBtnGroup, {
5844
5883
  class: 'q-btn-dropdown q-btn-dropdown--split no-wrap q-btn-item',
5845
- outline: props.outline,
5846
- flat: props.flat,
5847
5884
  rounded: props.rounded,
5848
5885
  square: props.square,
5849
- push: props.push,
5850
- unelevated: props.unelevated,
5886
+ ...btnDesignAttr.value,
5851
5887
  glossy: props.glossy,
5852
5888
  stretch: props.stretch
5853
5889
  }, () => [
5854
5890
  h(QBtn, {
5855
5891
  class: 'q-btn-dropdown--current',
5856
- ...props,
5892
+ ...btnProps.value,
5857
5893
  disable: props.disable === true || props.disableMainBtn === true,
5858
5894
  noWrap: true,
5859
- iconRight: props.iconRight,
5860
5895
  round: false,
5861
5896
  onClick: onClickHide
5862
5897
  }, {
@@ -5866,16 +5901,15 @@ var QBtnDropdown = createComponent({
5866
5901
 
5867
5902
  h(QBtn, {
5868
5903
  class: 'q-btn-dropdown__arrow-container q-anchor--skip',
5869
- ...attributes.value,
5904
+ ...ariaAttrs.value,
5905
+ ...btnDesignAttr.value,
5870
5906
  disable: props.disable === true || props.disableDropdown === true,
5871
- outline: props.outline,
5872
- flat: props.flat,
5873
5907
  rounded: props.rounded,
5874
- push: props.push,
5875
- size: props.size,
5876
5908
  color: props.color,
5877
5909
  textColor: props.textColor,
5878
5910
  dense: props.dense,
5911
+ size: props.size,
5912
+ padding: props.padding,
5879
5913
  ripple: props.ripple
5880
5914
  }, () => Arrow)
5881
5915
  ])
@@ -5982,6 +6016,14 @@ var QBtnToggle = createComponent({
5982
6016
 
5983
6017
  const injectFormInput = useFormInject(formAttrs);
5984
6018
 
6019
+ const btnDesignAttr = computed(() => getBtnDesignAttr(props));
6020
+
6021
+ const btnOptionDesign = computed(() => ({
6022
+ rounded: props.rounded,
6023
+ dense: props.dense,
6024
+ ...btnDesignAttr.value
6025
+ }));
6026
+
5985
6027
  const btnOptions = computed(() => props.options.map((item, i) => {
5986
6028
  const { attrs, value, slot, ...opt } = item;
5987
6029
 
@@ -5989,19 +6031,11 @@ var QBtnToggle = createComponent({
5989
6031
  slot,
5990
6032
  props: {
5991
6033
  key: i,
5992
- onClick (e) { set(value, item, e); },
5993
6034
 
5994
6035
  'aria-pressed': value === props.modelValue ? 'true' : 'false',
5995
-
5996
6036
  ...attrs,
5997
6037
  ...opt,
5998
-
5999
- outline: props.outline,
6000
- flat: props.flat,
6001
- rounded: props.rounded,
6002
- push: props.push,
6003
- unelevated: props.unelevated,
6004
- dense: props.dense,
6038
+ ...btnOptionDesign.value,
6005
6039
 
6006
6040
  disable: props.disable === true || opt.disable === true,
6007
6041
 
@@ -6019,7 +6053,9 @@ var QBtnToggle = createComponent({
6019
6053
  padding: mergeOpt(opt, 'padding'),
6020
6054
  ripple: mergeOpt(opt, 'ripple'),
6021
6055
  stack: mergeOpt(opt, 'stack') === true,
6022
- stretch: mergeOpt(opt, 'stretch') === true
6056
+ stretch: mergeOpt(opt, 'stretch') === true,
6057
+
6058
+ onClick (e) { set(value, item, e); }
6023
6059
  }
6024
6060
  }
6025
6061
  }));
@@ -6058,12 +6094,9 @@ var QBtnToggle = createComponent({
6058
6094
 
6059
6095
  return () => h(QBtnGroup, {
6060
6096
  class: 'q-btn-toggle',
6061
- outline: props.outline,
6062
- flat: props.flat,
6097
+ ...btnDesignAttr.value,
6063
6098
  rounded: props.rounded,
6064
- push: props.push,
6065
6099
  stretch: props.stretch,
6066
- unelevated: props.unelevated,
6067
6100
  glossy: props.glossy,
6068
6101
  spread: props.spread
6069
6102
  }, getContent)
@@ -7504,7 +7537,7 @@ function useCheckbox (type, getInner) {
7504
7537
  const attributes = computed(() => {
7505
7538
  const attrs = {
7506
7539
  tabindex: tabindex.value,
7507
- role: 'checkbox',
7540
+ role: type === 'toggle' ? 'switch' : 'checkbox',
7508
7541
  'aria-label': props.label,
7509
7542
  'aria-checked': isIndeterminate.value === true
7510
7543
  ? 'mixed'
@@ -7769,16 +7802,19 @@ var QChip = createComponent({
7769
7802
  + (isDark.value === true ? ' q-chip--dark q-dark' : '')
7770
7803
  });
7771
7804
 
7772
- const attributes = computed(() => (
7773
- props.disable === true
7805
+ const attributes = computed(() => {
7806
+ const chip = props.disable === true
7774
7807
  ? { tabindex: -1, 'aria-disabled': 'true' }
7775
- : {
7776
- tabindex: props.tabindex || 0,
7777
- role: 'button',
7778
- 'aria-hidden': 'false',
7779
- 'aria-label': props.removeAriaLabel || $q.lang.label.remove
7780
- }
7781
- ));
7808
+ : { tabindex: props.tabindex || 0 };
7809
+ const remove = {
7810
+ ...chip,
7811
+ role: 'button',
7812
+ 'aria-hidden': 'false',
7813
+ 'aria-label': props.removeAriaLabel || $q.lang.label.remove
7814
+ };
7815
+
7816
+ return { chip, remove }
7817
+ });
7782
7818
 
7783
7819
  function onKeyup (e) {
7784
7820
  e.keyCode === 13 /* ENTER */ && onClick(e);
@@ -7836,7 +7872,7 @@ var QChip = createComponent({
7836
7872
  h(QIcon, {
7837
7873
  class: 'q-chip__icon q-chip__icon--remove cursor-pointer',
7838
7874
  name: removeIcon.value,
7839
- ...attributes.value,
7875
+ ...attributes.value.remove,
7840
7876
  onClick: onRemove,
7841
7877
  onKeyup: onRemove
7842
7878
  })
@@ -7855,7 +7891,7 @@ var QChip = createComponent({
7855
7891
 
7856
7892
  isClickable.value === true && Object.assign(
7857
7893
  data,
7858
- attributes.value,
7894
+ attributes.value.chip,
7859
7895
  { onClick, onKeyup }
7860
7896
  );
7861
7897
 
@@ -9339,17 +9375,21 @@ var QResizeObserver = createComponent({
9339
9375
  if (hasObserver === true) {
9340
9376
  let observer;
9341
9377
 
9342
- onMounted(() => {
9343
- nextTick(() => {
9344
- targetEl = proxy.$el.parentNode;
9378
+ // initialize as soon as possible
9379
+ const init = stop => {
9380
+ targetEl = proxy.$el.parentNode;
9345
9381
 
9346
- if (targetEl) {
9347
- observer = new ResizeObserver(trigger);
9348
- observer.observe(targetEl);
9349
- emitEvent();
9350
- }
9351
- });
9352
- });
9382
+ if (targetEl) {
9383
+ observer = new ResizeObserver(trigger);
9384
+ observer.observe(targetEl);
9385
+ emitEvent();
9386
+ }
9387
+ else if (stop !== true) {
9388
+ nextTick(() => { init(true); });
9389
+ }
9390
+ };
9391
+
9392
+ onMounted(() => { init(); });
9353
9393
 
9354
9394
  onBeforeUnmount(() => {
9355
9395
  clearTimeout(timer);
@@ -10033,13 +10073,6 @@ var QTabs = createComponent({
10033
10073
  }
10034
10074
  }
10035
10075
 
10036
- /*
10037
- * Vue has an aggressive diff (in-place replacement) so we cannot
10038
- * ensure that the instance getting destroyed is the actual tab
10039
- * reported here. As a result, we cannot use its name or check
10040
- * if it's a route one to make the necessary updates. We need to
10041
- * always check the existing list again and infer the changes.
10042
- */
10043
10076
  function unregisterTab (tabData) {
10044
10077
  tabDataList.splice(tabDataList.indexOf(tabData), 1);
10045
10078
  tabDataListLen.value--;
@@ -10171,9 +10204,11 @@ const useTabProps = {
10171
10204
  };
10172
10205
 
10173
10206
  function useTab (props, slots, emit, routeData) {
10174
- const $tabs = inject(tabsKey, () => {
10207
+ const $tabs = inject(tabsKey, emptyRenderFn);
10208
+ if ($tabs === emptyRenderFn) {
10175
10209
  console.error('QTab/QRouteTab component needs to be child of QTabs');
10176
- });
10210
+ return emptyRenderFn
10211
+ }
10177
10212
 
10178
10213
  const { proxy } = getCurrentInstance();
10179
10214
 
@@ -10449,7 +10484,7 @@ var QTabPanel = createComponent({
10449
10484
  props: usePanelChildProps,
10450
10485
 
10451
10486
  setup (_, { slots }) {
10452
- return () => h('div', { class: 'q-tab-panel' }, hSlot(slots.default))
10487
+ return () => h('div', { class: 'q-tab-panel', role: 'tabpanel' }, hSlot(slots.default))
10453
10488
  }
10454
10489
  });
10455
10490
 
@@ -15029,7 +15064,8 @@ var QDialog = createComponent({
15029
15064
 
15030
15065
  function renderPortalContent () {
15031
15066
  return h('div', {
15032
- 'aria-modal': 'true',
15067
+ role: 'dialog',
15068
+ 'aria-modal': useBackdrop.value === true ? 'true' : 'false',
15033
15069
  ...attrs,
15034
15070
  class: rootClasses.value
15035
15071
  }, [
@@ -15133,9 +15169,11 @@ var QDrawer = createComponent({
15133
15169
  const { preventBodyScroll } = usePreventScroll();
15134
15170
  const { registerTimeout, removeTimeout } = useTimeout();
15135
15171
 
15136
- const $layout = inject(layoutKey, () => {
15172
+ const $layout = inject(layoutKey, emptyRenderFn);
15173
+ if ($layout === emptyRenderFn) {
15137
15174
  console.error('QDrawer needs to be child of QLayout');
15138
- });
15175
+ return emptyRenderFn
15176
+ }
15139
15177
 
15140
15178
  let lastDesktopState, timerMini, layoutTotalWidthWatcher;
15141
15179
 
@@ -16387,7 +16425,7 @@ var QTooltip = createComponent({
16387
16425
  attrs.style,
16388
16426
  transitionStyle.value
16389
16427
  ],
16390
- role: 'complementary'
16428
+ role: 'tooltip'
16391
16429
  }, hSlot(slots.default))
16392
16430
  : null
16393
16431
  }
@@ -16536,6 +16574,7 @@ var QItem = createComponent({
16536
16574
  ref: rootRef,
16537
16575
  class: classes.value,
16538
16576
  style: style.value,
16577
+ role: 'listitem',
16539
16578
  onClick,
16540
16579
  onKeyup
16541
16580
  };
@@ -19440,7 +19479,14 @@ function useFile ({
19440
19479
 
19441
19480
  function onDragleave (e) {
19442
19481
  stopAndPrevent(e);
19443
- e.relatedTarget !== dndRef.value && (dnd.value = false);
19482
+
19483
+ // Safari bug: relatedTarget is null for over 10 years
19484
+ // https://bugs.webkit.org/show_bug.cgi?id=66547
19485
+ const gone = e.relatedTarget !== null || client.is.safari !== true
19486
+ ? e.relatedTarget !== dndRef.value
19487
+ : document.elementsFromPoint(e.clientX, e.clientY).includes(dndRef.value) === false;
19488
+
19489
+ gone === true && (dnd.value = false);
19444
19490
  }
19445
19491
 
19446
19492
  function onDrop (e) {
@@ -19474,6 +19520,7 @@ function useFile ({
19474
19520
  pickFiles,
19475
19521
  addFiles,
19476
19522
  onDragover,
19523
+ onDragleave,
19477
19524
  processFiles,
19478
19525
  getDndNode,
19479
19526
 
@@ -19827,9 +19874,11 @@ var QFooter = createComponent({
19827
19874
  setup (props, { slots, emit }) {
19828
19875
  const { proxy: { $q } } = getCurrentInstance();
19829
19876
 
19830
- const $layout = inject(layoutKey, () => {
19877
+ const $layout = inject(layoutKey, emptyRenderFn);
19878
+ if ($layout === emptyRenderFn) {
19831
19879
  console.error('QFooter needs to be child of QLayout');
19832
- });
19880
+ return emptyRenderFn
19881
+ }
19833
19882
 
19834
19883
  const size = ref(parseInt(props.heightHint, 10));
19835
19884
  const revealed = ref(true);
@@ -20247,9 +20296,11 @@ var QHeader = createComponent({
20247
20296
  setup (props, { slots, emit }) {
20248
20297
  const { proxy: { $q } } = getCurrentInstance();
20249
20298
 
20250
- const $layout = inject(layoutKey, () => {
20299
+ const $layout = inject(layoutKey, emptyRenderFn);
20300
+ if ($layout === emptyRenderFn) {
20251
20301
  console.error('QHeader needs to be child of QLayout');
20252
- });
20302
+ return emptyRenderFn
20303
+ }
20253
20304
 
20254
20305
  const size = ref(parseInt(props.heightHint, 10));
20255
20306
  const revealed = ref(true);
@@ -21158,7 +21209,7 @@ function useMask (props, emit, emitValue, inputRef) {
21158
21209
  '^'
21159
21210
  + unmask.join('')
21160
21211
  + '(' + (unmaskChar === '' ? '.' : '[^' + unmaskChar + ']') + '+)?'
21161
- + '[' + unmaskChar + ']*$'
21212
+ + (unmaskChar === '' ? '' : '[' + unmaskChar + ']*') + '$'
21162
21213
  ),
21163
21214
  extractLast = extract.length - 1,
21164
21215
  extractMatcher = extract.map((re, index) => {
@@ -22184,7 +22235,7 @@ var QList = createComponent({
22184
22235
  + (props.padding === true ? ' q-list--padding' : '')
22185
22236
  );
22186
22237
 
22187
- return () => h('div', { class: classes.value }, hSlot(slots.default))
22238
+ return () => h('div', { class: classes.value, role: 'list' }, hSlot(slots.default))
22188
22239
  }
22189
22240
  });
22190
22241
 
@@ -23225,7 +23276,7 @@ var QOptionGroup = createComponent({
23225
23276
  );
23226
23277
 
23227
23278
  const attrs = computed(() => {
23228
- const attrs = {};
23279
+ const attrs = { role: 'group' };
23229
23280
 
23230
23281
  if (props.type === 'radio') {
23231
23282
  attrs.role = 'radiogroup';
@@ -23290,10 +23341,17 @@ var QPage = createComponent({
23290
23341
  setup (props, { slots }) {
23291
23342
  const { proxy: { $q } } = getCurrentInstance();
23292
23343
 
23293
- const $layout = inject(layoutKey);
23294
- inject(pageContainerKey, () => {
23344
+ const $layout = inject(layoutKey, emptyRenderFn);
23345
+ if ($layout === emptyRenderFn) {
23346
+ console.error('QPage needs to be a deep child of QLayout');
23347
+ return emptyRenderFn
23348
+ }
23349
+
23350
+ const $pageContainer = inject(pageContainerKey, emptyRenderFn);
23351
+ if ($pageContainer === emptyRenderFn) {
23295
23352
  console.error('QPage needs to be child of QPageContainer');
23296
- });
23353
+ return emptyRenderFn
23354
+ }
23297
23355
 
23298
23356
  const style = computed(() => {
23299
23357
  const offset
@@ -23336,9 +23394,11 @@ var QPageContainer = createComponent({
23336
23394
  setup (_, { slots }) {
23337
23395
  const { proxy: { $q } } = getCurrentInstance();
23338
23396
 
23339
- const $layout = inject(layoutKey, () => {
23397
+ const $layout = inject(layoutKey, emptyRenderFn);
23398
+ if ($layout === emptyRenderFn) {
23340
23399
  console.error('QPageContainer needs to be child of QLayout');
23341
- });
23400
+ return emptyRenderFn
23401
+ }
23342
23402
 
23343
23403
  provide(pageContainerKey, true);
23344
23404
 
@@ -23388,9 +23448,11 @@ const usePageStickyProps = {
23388
23448
  function usePageSticky () {
23389
23449
  const { props, proxy: { $q } } = getCurrentInstance();
23390
23450
 
23391
- const $layout = inject(layoutKey, () => {
23451
+ const $layout = inject(layoutKey, emptyRenderFn);
23452
+ if ($layout === emptyRenderFn) {
23392
23453
  console.error('QPageSticky needs to be child of QLayout');
23393
- });
23454
+ return emptyRenderFn
23455
+ }
23394
23456
 
23395
23457
  const attach = computed(() => {
23396
23458
  const pos = props.position;
@@ -23603,6 +23665,12 @@ var QPageSticky = createComponent({
23603
23665
  }
23604
23666
  });
23605
23667
 
23668
+ function getBool (val, otherwise) {
23669
+ return [ true, false ].includes(val)
23670
+ ? val
23671
+ : otherwise
23672
+ }
23673
+
23606
23674
  var QPagination = createComponent({
23607
23675
  name: 'QPagination',
23608
23676
 
@@ -23614,22 +23682,20 @@ var QPagination = createComponent({
23614
23682
  required: true
23615
23683
  },
23616
23684
  min: {
23617
- type: Number,
23685
+ type: [ Number, String ],
23618
23686
  default: 1
23619
23687
  },
23620
23688
  max: {
23621
- type: Number,
23689
+ type: [ Number, String ],
23622
23690
  required: true
23623
23691
  },
23624
-
23625
- color: {
23626
- type: String,
23627
- default: 'primary'
23692
+ maxPages: {
23693
+ type: [ Number, String ],
23694
+ default: 0,
23695
+ validator: v => (
23696
+ (typeof v === 'string' ? parseInt(v, 10) : v) >= 0
23697
+ )
23628
23698
  },
23629
- textColor: String,
23630
-
23631
- activeColor: String,
23632
- activeTextColor: String,
23633
23699
 
23634
23700
  inputStyle: [ Array, String, Object ],
23635
23701
  inputClass: [ Array, String, Object ],
@@ -23663,11 +23729,6 @@ var QPagination = createComponent({
23663
23729
  type: Boolean,
23664
23730
  default: null
23665
23731
  },
23666
- maxPages: {
23667
- type: Number,
23668
- default: 0,
23669
- validator: v => v >= 0
23670
- },
23671
23732
 
23672
23733
  ripple: {
23673
23734
  type: [ Boolean, Object ],
@@ -23683,7 +23744,21 @@ var QPagination = createComponent({
23683
23744
  push: Boolean,
23684
23745
  glossy: Boolean,
23685
23746
 
23686
- dense: Boolean,
23747
+ color: {
23748
+ type: String,
23749
+ default: 'primary'
23750
+ },
23751
+ textColor: String,
23752
+
23753
+ activeDesign: {
23754
+ type: String,
23755
+ default: '',
23756
+ values: v => v === '' || btnDesignOptions.includes(v)
23757
+ },
23758
+ activeColor: String,
23759
+ activeTextColor: String,
23760
+
23761
+ gutter: String,
23687
23762
  padding: {
23688
23763
  type: String,
23689
23764
  default: '3px 2px'
@@ -23698,6 +23773,16 @@ var QPagination = createComponent({
23698
23773
 
23699
23774
  const isDark = useDark(props, $q);
23700
23775
 
23776
+ const minProp = computed(() => parseInt(props.min, 10));
23777
+ const maxProp = computed(() => parseInt(props.max, 10));
23778
+ const maxPagesProp = computed(() => parseInt(props.maxPages, 10));
23779
+
23780
+ const inputPlaceholder = computed(() => model.value + ' / ' + maxProp.value);
23781
+ const boundaryLinksProp = computed(() => getBool(props.boundaryLinks, props.input));
23782
+ const boundaryNumbersProp = computed(() => getBool(props.boundaryNumbers, !props.input));
23783
+ const directionLinksProp = computed(() => getBool(props.directionLinks, props.input));
23784
+ const ellipsesProp = computed(() => getBool(props.ellipses, !props.input));
23785
+
23701
23786
  const newPage = ref(null);
23702
23787
  const model = computed({
23703
23788
  get: () => props.modelValue,
@@ -23706,32 +23791,33 @@ var QPagination = createComponent({
23706
23791
  if (props.disable || isNaN(val)) {
23707
23792
  return
23708
23793
  }
23709
- const value = between(val, props.min, props.max);
23794
+ const value = between(val, minProp.value, maxProp.value);
23710
23795
  if (props.modelValue !== value) {
23711
23796
  emit('update:modelValue', value);
23712
23797
  }
23713
23798
  }
23714
23799
  });
23715
23800
 
23716
- watch(() => props.min + props.max, () => {
23801
+ watch(() => `${ minProp.value }|${ maxProp.value }`, () => {
23717
23802
  model.value = props.modelValue;
23718
23803
  });
23719
23804
 
23720
- function getBool (val, otherwise) {
23721
- return [ true, false ].includes(val)
23722
- ? val
23723
- : otherwise
23724
- }
23725
-
23726
23805
  const classes = computed(() =>
23727
23806
  'q-pagination row no-wrap items-center'
23728
23807
  + (props.disable === true ? ' disabled' : '')
23729
23808
  );
23730
- const inputPlaceholder = computed(() => model.value + ' / ' + props.max);
23731
- const __boundaryLinks = computed(() => getBool(props.boundaryLinks, props.input));
23732
- const __boundaryNumbers = computed(() => getBool(props.boundaryNumbers, !props.input));
23733
- const __directionLinks = computed(() => getBool(props.directionLinks, props.input));
23734
- const __ellipses = computed(() => getBool(props.ellipses, !props.input));
23809
+
23810
+ const gutterProp = computed(() => (
23811
+ props.gutter in btnPadding
23812
+ ? `${ btnPadding[ props.gutter ] }px`
23813
+ : props.gutter || null
23814
+ ));
23815
+ const gutterStyle = computed(() => (
23816
+ gutterProp.value !== null
23817
+ ? `--q-pagination-gutter-parent:-${ gutterProp.value };--q-pagination-gutter-child:${ gutterProp.value }`
23818
+ : null
23819
+ ));
23820
+
23735
23821
  const icons = computed(() => {
23736
23822
  const ico = [
23737
23823
  props.iconFirst || $q.iconSet.pagination.first,
@@ -23742,38 +23828,90 @@ var QPagination = createComponent({
23742
23828
  return $q.lang.rtl === true ? ico.reverse() : ico
23743
23829
  });
23744
23830
 
23745
- const attrs = computed(() => (
23746
- props.disable === true
23747
- ? { 'aria-disabled': 'true' }
23748
- : {}
23749
- ));
23831
+ const attrs = computed(() => ({
23832
+ 'aria-disabled': props.disable === true ? 'true' : 'false',
23833
+ role: 'navigation'
23834
+ }));
23750
23835
 
23836
+ const btnDesignProp = computed(() => getBtnDesign(props, 'flat'));
23751
23837
  const btnProps = computed(() => ({
23838
+ [ btnDesignProp.value ]: true,
23839
+
23752
23840
  round: props.round,
23753
23841
  rounded: props.rounded,
23754
23842
 
23755
- outline: props.outline,
23756
- unelevated: props.unelevated,
23757
- push: props.push,
23758
- glossy: props.glossy,
23759
-
23760
- dense: props.dense,
23761
23843
  padding: props.padding,
23762
23844
 
23763
23845
  color: props.color,
23764
- flat: true,
23846
+ textColor: props.textColor,
23847
+
23765
23848
  size: props.size,
23766
23849
  ripple: props.ripple !== null
23767
23850
  ? props.ripple
23768
23851
  : true
23769
23852
  }));
23770
23853
 
23854
+ const btnActiveDesignProp = computed(() => {
23855
+ // we also reset non-active design
23856
+ const acc = { [ btnDesignProp.value ]: false };
23857
+ if (props.activeDesign !== '') {
23858
+ acc[ props.activeDesign ] = true;
23859
+ }
23860
+ return acc
23861
+ });
23771
23862
  const activeBtnProps = computed(() => ({
23772
- flat: props.flat,
23863
+ ...btnActiveDesignProp.value,
23773
23864
  color: props.activeColor || props.color,
23774
23865
  textColor: props.activeTextColor || props.textColor
23775
23866
  }));
23776
23867
 
23868
+ const btnConfig = computed(() => {
23869
+ let maxPages = Math.max(
23870
+ maxPagesProp.value,
23871
+ 1 + (ellipsesProp.value ? 2 : 0) + (boundaryNumbersProp.value ? 2 : 0)
23872
+ );
23873
+
23874
+ const acc = {
23875
+ pgFrom: minProp.value,
23876
+ pgTo: maxProp.value,
23877
+ ellipsesStart: false,
23878
+ ellipsesEnd: false,
23879
+ boundaryStart: false,
23880
+ boundaryEnd: false,
23881
+ marginalStyle: {
23882
+ minWidth: `${ Math.max(2, String(maxProp.value).length) }em`
23883
+ }
23884
+ };
23885
+
23886
+ if (maxPagesProp.value && maxPages < (maxProp.value - minProp.value + 1)) {
23887
+ maxPages = 1 + Math.floor(maxPages / 2) * 2;
23888
+ acc.pgFrom = Math.max(minProp.value, Math.min(maxProp.value - maxPages + 1, props.modelValue - Math.floor(maxPages / 2)));
23889
+ acc.pgTo = Math.min(maxProp.value, acc.pgFrom + maxPages - 1);
23890
+
23891
+ if (boundaryNumbersProp.value) {
23892
+ acc.boundaryStart = true;
23893
+ acc.pgFrom++;
23894
+ }
23895
+
23896
+ if (ellipsesProp.value && acc.pgFrom > (minProp.value + (boundaryNumbersProp.value ? 1 : 0))) {
23897
+ acc.ellipsesStart = true;
23898
+ acc.pgFrom++;
23899
+ }
23900
+
23901
+ if (boundaryNumbersProp.value) {
23902
+ acc.boundaryEnd = true;
23903
+ acc.pgTo--;
23904
+ }
23905
+
23906
+ if (ellipsesProp.value && acc.pgTo < (maxProp.value - (boundaryNumbersProp.value ? 1 : 0))) {
23907
+ acc.ellipsesEnd = true;
23908
+ acc.pgTo--;
23909
+ }
23910
+ }
23911
+
23912
+ return acc
23913
+ });
23914
+
23777
23915
  function set (value) {
23778
23916
  model.value = value;
23779
23917
  }
@@ -23782,20 +23920,40 @@ var QPagination = createComponent({
23782
23920
  model.value = model.value + offset;
23783
23921
  }
23784
23922
 
23785
- function updateModel () {
23786
- model.value = newPage.value;
23787
- newPage.value = null;
23788
- }
23923
+ const inputEvents = computed(() => {
23924
+ function updateModel () {
23925
+ model.value = newPage.value;
23926
+ newPage.value = null;
23927
+ }
23928
+
23929
+ return {
23930
+ 'onUpdate:modelValue': val => { newPage.value = val; },
23931
+ onKeyup: e => { isKeyCode(e, 13) === true && updateModel(); },
23932
+ onBlur: updateModel
23933
+ }
23934
+ });
23789
23935
 
23790
- function getBtn (cfg, page) {
23791
- const data = { ...btnProps.value, ...cfg };
23936
+ function getBtn (cfg, page, active) {
23937
+ const data = {
23938
+ 'aria-label': page,
23939
+ 'aria-current': 'false',
23940
+ ...btnProps.value,
23941
+ ...cfg
23942
+ };
23943
+
23944
+ if (active === true) {
23945
+ Object.assign(data, {
23946
+ 'aria-current': 'true',
23947
+ ...activeBtnProps.value
23948
+ });
23949
+ }
23792
23950
 
23793
23951
  if (page !== void 0) {
23794
23952
  if (props.toFn !== void 0) {
23795
23953
  data.to = props.toFn(page);
23796
23954
  }
23797
23955
  else {
23798
- data.onClick = () => set(page);
23956
+ data.onClick = () => { set(page); };
23799
23957
  }
23800
23958
  }
23801
23959
 
@@ -23806,147 +23964,107 @@ var QPagination = createComponent({
23806
23964
  Object.assign(proxy, { set, setByOffset });
23807
23965
 
23808
23966
  return () => {
23809
- const
23810
- contentStart = [],
23811
- contentEnd = [],
23812
- contentMiddle = [];
23967
+ const contentStart = [];
23968
+ const contentEnd = [];
23969
+ let contentMiddle;
23970
+
23971
+ if (boundaryLinksProp.value === true) {
23972
+ contentStart.push(
23973
+ getBtn({
23974
+ key: 'bls',
23975
+ disable: props.disable || props.modelValue <= minProp.value,
23976
+ icon: icons.value[ 0 ]
23977
+ }, minProp.value)
23978
+ );
23813
23979
 
23814
- if (__boundaryLinks.value) {
23815
- contentStart.push(getBtn({
23816
- key: 'bls',
23817
- disable: props.disable || props.modelValue <= props.min,
23818
- icon: icons.value[ 0 ]
23819
- }, props.min));
23820
- contentEnd.unshift(getBtn({
23821
- key: 'ble',
23822
- disable: props.disable || props.modelValue >= props.max,
23823
- icon: icons.value[ 3 ]
23824
- }, props.max));
23825
- }
23826
-
23827
- if (__directionLinks.value) {
23828
- contentStart.push(getBtn({
23829
- key: 'bdp',
23830
- disable: props.disable || props.modelValue <= props.min,
23831
- icon: icons.value[ 1 ]
23832
- }, props.modelValue - 1));
23833
- contentEnd.unshift(getBtn({
23834
- key: 'bdn',
23835
- disable: props.disable || props.modelValue >= props.max,
23836
- icon: icons.value[ 2 ]
23837
- }, props.modelValue + 1));
23838
- }
23839
-
23840
- if (props.input === true) {
23841
- contentMiddle.push(h(QInput, {
23842
- class: 'inline',
23843
- style: {
23844
- width: `${ inputPlaceholder.value.length / 1.5 }em`
23845
- },
23846
- type: 'number',
23847
- dense: true,
23848
- value: newPage.value,
23849
- disable: props.disable,
23850
- dark: isDark.value,
23851
- borderless: true,
23852
- inputClass: props.inputClass,
23853
- inputStyle: props.inputStyle,
23854
- placeholder: inputPlaceholder.value,
23855
- min: props.min,
23856
- max: props.max,
23857
- 'onUpdate:modelValue' (value) { newPage.value = value; },
23858
- onKeyup (e) { isKeyCode(e, 13) === true && updateModel(); },
23859
- onBlur: updateModel
23860
- }));
23980
+ contentEnd.unshift(
23981
+ getBtn({
23982
+ key: 'ble',
23983
+ disable: props.disable || props.modelValue >= maxProp.value,
23984
+ icon: icons.value[ 3 ]
23985
+ }, maxProp.value)
23986
+ );
23861
23987
  }
23862
- else { // is type select
23863
- let
23864
- maxPages = Math.max(
23865
- props.maxPages,
23866
- 1 + (__ellipses.value ? 2 : 0) + (__boundaryNumbers.value ? 2 : 0)
23867
- ),
23868
- pgFrom = props.min,
23869
- pgTo = props.max,
23870
- ellipsesStart = false,
23871
- ellipsesEnd = false,
23872
- boundaryStart = false,
23873
- boundaryEnd = false;
23874
-
23875
- if (props.maxPages && maxPages < (props.max - props.min + 1)) {
23876
- maxPages = 1 + Math.floor(maxPages / 2) * 2;
23877
- pgFrom = Math.max(props.min, Math.min(props.max - maxPages + 1, props.modelValue - Math.floor(maxPages / 2)));
23878
- pgTo = Math.min(props.max, pgFrom + maxPages - 1);
23879
- if (__boundaryNumbers.value) {
23880
- boundaryStart = true;
23881
- pgFrom += 1;
23882
- }
23883
- if (__ellipses.value && pgFrom > (props.min + (__boundaryNumbers.value ? 1 : 0))) {
23884
- ellipsesStart = true;
23885
- pgFrom += 1;
23886
- }
23887
- if (__boundaryNumbers.value) {
23888
- boundaryEnd = true;
23889
- pgTo -= 1;
23890
- }
23891
- if (__ellipses.value && pgTo < (props.max - (__boundaryNumbers.value ? 1 : 0))) {
23892
- ellipsesEnd = true;
23893
- pgTo -= 1;
23894
- }
23988
+
23989
+ if (directionLinksProp.value === true) {
23990
+ contentStart.push(
23991
+ getBtn({
23992
+ key: 'bdp',
23993
+ disable: props.disable || props.modelValue <= minProp.value,
23994
+ icon: icons.value[ 1 ]
23995
+ }, props.modelValue - 1)
23996
+ );
23997
+
23998
+ contentEnd.unshift(
23999
+ getBtn({
24000
+ key: 'bdn',
24001
+ disable: props.disable || props.modelValue >= maxProp.value,
24002
+ icon: icons.value[ 2 ]
24003
+ }, props.modelValue + 1)
24004
+ );
24005
+ }
24006
+
24007
+ if (props.input !== true) { // has buttons instead of inputbox
24008
+ contentMiddle = [];
24009
+ const { pgFrom, pgTo, marginalStyle: style } = btnConfig.value;
24010
+
24011
+ if (btnConfig.value.boundaryStart === true) {
24012
+ const active = minProp.value === props.modelValue;
24013
+ contentStart.push(
24014
+ getBtn({
24015
+ key: 'bns',
24016
+ style,
24017
+ disable: props.disable,
24018
+ label: minProp.value
24019
+ }, minProp.value, active)
24020
+ );
23895
24021
  }
23896
- const style = {
23897
- minWidth: `${ Math.max(2, String(props.max).length) }em`
23898
- };
23899
- if (boundaryStart) {
23900
- const active = props.min === props.modelValue;
23901
- contentStart.push(getBtn({
23902
- key: 'bns',
23903
- style,
23904
- disable: props.disable,
23905
- flat: !active,
23906
- label: props.min,
23907
- ...(active ? activeBtnProps.value : {})
23908
- }, props.min));
23909
- }
23910
- if (boundaryEnd) {
23911
- const active = props.max === props.modelValue;
23912
- contentEnd.unshift(getBtn({
23913
- key: 'bne',
23914
- style,
23915
- disable: props.disable,
23916
- flat: !active,
23917
- label: props.max,
23918
- ...(active ? activeBtnProps.value : {})
23919
- }, props.max));
23920
- }
23921
- if (ellipsesStart) {
23922
- contentStart.push(getBtn({
23923
- key: 'bes',
23924
- style,
23925
- disable: props.disable,
23926
- label: '…',
23927
- ripple: false
23928
- }, pgFrom - 1));
23929
- }
23930
- if (ellipsesEnd) {
23931
- contentEnd.unshift(getBtn({
23932
- key: 'bee',
23933
- style,
23934
- disable: props.disable,
23935
- label: '…',
23936
- ripple: false
23937
- }, pgTo + 1));
24022
+
24023
+ if (btnConfig.value.boundaryEnd === true) {
24024
+ const active = maxProp.value === props.modelValue;
24025
+ contentEnd.unshift(
24026
+ getBtn({
24027
+ key: 'bne',
24028
+ style,
24029
+ disable: props.disable,
24030
+ label: maxProp.value
24031
+ }, maxProp.value, active)
24032
+ );
23938
24033
  }
24034
+
24035
+ if (btnConfig.value.ellipsesStart === true) {
24036
+ contentStart.push(
24037
+ getBtn({
24038
+ key: 'bes',
24039
+ style,
24040
+ disable: props.disable,
24041
+ label: '…',
24042
+ ripple: false
24043
+ }, pgFrom - 1)
24044
+ );
24045
+ }
24046
+
24047
+ if (btnConfig.value.ellipsesEnd === true) {
24048
+ contentEnd.unshift(
24049
+ getBtn({
24050
+ key: 'bee',
24051
+ style,
24052
+ disable: props.disable,
24053
+ label: '…',
24054
+ ripple: false
24055
+ }, pgTo + 1)
24056
+ );
24057
+ }
24058
+
23939
24059
  for (let i = pgFrom; i <= pgTo; i++) {
23940
- const btn = {
23941
- key: `bpg${ i }`,
23942
- style,
23943
- disable: props.disable,
23944
- label: i
23945
- };
23946
- if (i === props.modelValue) {
23947
- Object.assign(btn, activeBtnProps.value);
23948
- }
23949
- contentMiddle.push(getBtn(btn, i));
24060
+ contentMiddle.push(
24061
+ getBtn({
24062
+ key: `bpg${ i }`,
24063
+ style,
24064
+ disable: props.disable,
24065
+ label: i
24066
+ }, i, i === props.modelValue)
24067
+ );
23950
24068
  }
23951
24069
  }
23952
24070
 
@@ -23954,15 +24072,35 @@ var QPagination = createComponent({
23954
24072
  class: classes.value,
23955
24073
  ...attrs.value
23956
24074
  }, [
23957
- contentStart,
23958
-
23959
24075
  h('div', {
23960
- class: 'row justify-center'
24076
+ class: 'q-pagination__content row no-wrap items-center',
24077
+ style: gutterStyle.value
23961
24078
  }, [
23962
- contentMiddle
23963
- ]),
24079
+ ...contentStart,
24080
+
24081
+ props.input === true
24082
+ ? h(QInput, {
24083
+ class: 'inline',
24084
+ style: { width: `${ inputPlaceholder.value.length / 1.5 }em` },
24085
+ type: 'number',
24086
+ dense: true,
24087
+ value: newPage.value,
24088
+ disable: props.disable,
24089
+ dark: isDark.value,
24090
+ borderless: true,
24091
+ inputClass: props.inputClass,
24092
+ inputStyle: props.inputStyle,
24093
+ placeholder: inputPlaceholder.value,
24094
+ min: minProp.value,
24095
+ max: maxProp.value,
24096
+ ...inputEvents.value
24097
+ })
24098
+ : h('div', {
24099
+ class: 'q-pagination__middle row justify-center'
24100
+ }, contentMiddle),
23964
24101
 
23965
- contentEnd
24102
+ ...contentEnd
24103
+ ])
23966
24104
  ])
23967
24105
  }
23968
24106
  }
@@ -30881,9 +31019,11 @@ var QStep = createComponent({
30881
31019
  setup (props, { slots, emit }) {
30882
31020
  const { proxy: { $q } } = getCurrentInstance();
30883
31021
 
30884
- const $stepper = inject(stepperKey, () => {
30885
- console.error('QStep needs to be child of QStepper');
30886
- });
31022
+ const $stepper = inject(stepperKey, emptyRenderFn);
31023
+ if ($stepper === emptyRenderFn) {
31024
+ console.error('QStep needs to be a child of QStepper');
31025
+ return emptyRenderFn
31026
+ }
30887
31027
 
30888
31028
  const { getCacheWithFn } = useCache();
30889
31029
 
@@ -30941,7 +31081,7 @@ var QStep = createComponent({
30941
31081
 
30942
31082
  return () => h(
30943
31083
  'div',
30944
- { ref: rootRef, class: 'q-stepper__step', ...scrollEvent.value },
31084
+ { ref: rootRef, class: 'q-stepper__step', role: 'tabpanel', ...scrollEvent.value },
30945
31085
  $stepper.value.vertical === true
30946
31086
  ? [
30947
31087
  h(StepHeader, {
@@ -34006,9 +34146,11 @@ var QTimelineEntry = createComponent({
34006
34146
  },
34007
34147
 
34008
34148
  setup (props, { slots }) {
34009
- const $timeline = inject(timelineKey, () => {
34149
+ const $timeline = inject(timelineKey, emptyRenderFn);
34150
+ if ($timeline === emptyRenderFn) {
34010
34151
  console.error('QTimelineEntry needs to be child of QTimeline');
34011
- });
34152
+ return emptyRenderFn
34153
+ }
34012
34154
 
34013
34155
  const classes = computed(() =>
34014
34156
  `q-timeline__entry q-timeline__entry--${ props.side }`
@@ -34097,7 +34239,7 @@ var QToolbar = createComponent({
34097
34239
  + (props.inset === true ? ' q-toolbar--inset' : '')
34098
34240
  );
34099
34241
 
34100
- return () => h('div', { class: classes.value }, hSlot(slots.default))
34242
+ return () => h('div', { class: classes.value, role: 'toolbar' }, hSlot(slots.default))
34101
34243
  }
34102
34244
  });
34103
34245
 
@@ -35585,9 +35727,13 @@ var QUploaderAddTrigger = createComponent({
35585
35727
  name: 'QUploaderAddTrigger',
35586
35728
 
35587
35729
  setup () {
35588
- return inject(uploaderKey, () => {
35730
+ const $trigger = inject(uploaderKey, emptyRenderFn);
35731
+
35732
+ if ($trigger === emptyRenderFn) {
35589
35733
  console.error('QUploaderAddTrigger needs to be child of QUploader');
35590
- })
35734
+ }
35735
+
35736
+ return $trigger
35591
35737
  }
35592
35738
  });
35593
35739
 
@@ -37765,6 +37911,7 @@ var BottomSheet$1 = createComponent({
37765
37911
  action.class
37766
37912
  ],
37767
37913
  tabindex: 0,
37914
+ role: 'listitem',
37768
37915
  onClick () { onOk(action); },
37769
37916
  onKeyup (e) { e.keyCode === 13 && onOk(action); }
37770
37917
  }, [
@@ -37840,9 +37987,12 @@ var BottomSheet$1 = createComponent({
37840
37987
  child.push(
37841
37988
  props.grid === true
37842
37989
  ? h('div', {
37843
- class: 'row items-stretch justify-start'
37990
+ class: 'row items-stretch justify-start',
37991
+ role: 'list'
37844
37992
  }, getGrid())
37845
- : h('div', getList())
37993
+ : h('div', {
37994
+ role: 'list'
37995
+ }, getList())
37846
37996
  );
37847
37997
 
37848
37998
  return child
@@ -40138,7 +40288,7 @@ function runSequentialPromises (
40138
40288
  */
40139
40289
 
40140
40290
  const Quasar = {
40141
- version: '2.9.2',
40291
+ version: '2.10.0',
40142
40292
  install: installQuasar,
40143
40293
  lang: Plugin$8,
40144
40294
  iconSet: Plugin$7