@vuetify/nightly 3.6.0-alpha.2-dev.2024-04-29 → 3.6.0-alpha.2-dev.2024-04-30

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 (52) hide show
  1. package/CHANGELOG.md +4 -2
  2. package/dist/json/attributes.json +61 -9
  3. package/dist/json/importMap-labs.json +26 -22
  4. package/dist/json/importMap.json +128 -128
  5. package/dist/json/tags.json +19 -1
  6. package/dist/json/web-types.json +906 -494
  7. package/dist/vuetify-labs.css +2398 -2341
  8. package/dist/vuetify-labs.d.ts +438 -214
  9. package/dist/vuetify-labs.esm.js +220 -18
  10. package/dist/vuetify-labs.esm.js.map +1 -1
  11. package/dist/vuetify-labs.js +220 -18
  12. package/dist/vuetify-labs.min.css +2 -2
  13. package/dist/vuetify.css +829 -798
  14. package/dist/vuetify.d.ts +300 -257
  15. package/dist/vuetify.esm.js +111 -18
  16. package/dist/vuetify.esm.js.map +1 -1
  17. package/dist/vuetify.js +111 -18
  18. package/dist/vuetify.js.map +1 -1
  19. package/dist/vuetify.min.css +2 -2
  20. package/dist/vuetify.min.js +180 -175
  21. package/dist/vuetify.min.js.map +1 -1
  22. package/lib/components/VDataIterator/index.d.mts +2 -0
  23. package/lib/components/VDataTable/VDataTable.css +35 -0
  24. package/lib/components/VDataTable/VDataTable.sass +34 -1
  25. package/lib/components/VDataTable/VDataTableFooter.css +5 -9
  26. package/lib/components/VDataTable/VDataTableFooter.sass +21 -21
  27. package/lib/components/VDataTable/VDataTableHeaders.mjs +66 -7
  28. package/lib/components/VDataTable/VDataTableHeaders.mjs.map +1 -1
  29. package/lib/components/VDataTable/VDataTableRow.mjs +45 -10
  30. package/lib/components/VDataTable/VDataTableRow.mjs.map +1 -1
  31. package/lib/components/VDataTable/VDataTableRows.mjs +8 -2
  32. package/lib/components/VDataTable/VDataTableRows.mjs.map +1 -1
  33. package/lib/components/VDataTable/_variables.scss +9 -4
  34. package/lib/components/VDataTable/index.d.mts +263 -217
  35. package/lib/components/VDataTable/types.mjs.map +1 -1
  36. package/lib/components/VNavigationDrawer/VNavigationDrawer.css +1 -1
  37. package/lib/components/VNavigationDrawer/VNavigationDrawer.sass +1 -1
  38. package/lib/components/index.d.mts +255 -213
  39. package/lib/entry-bundler.mjs +1 -1
  40. package/lib/framework.mjs +1 -1
  41. package/lib/index.d.mts +45 -44
  42. package/lib/labs/VPullToRefresh/VPullToRefresh.css +27 -0
  43. package/lib/labs/VPullToRefresh/VPullToRefresh.mjs +117 -0
  44. package/lib/labs/VPullToRefresh/VPullToRefresh.mjs.map +1 -0
  45. package/lib/labs/VPullToRefresh/VPullToRefresh.sass +23 -0
  46. package/lib/labs/VPullToRefresh/index.d.mts +189 -0
  47. package/lib/labs/VPullToRefresh/index.mjs +2 -0
  48. package/lib/labs/VPullToRefresh/index.mjs.map +1 -0
  49. package/lib/labs/components.d.mts +182 -1
  50. package/lib/labs/components.mjs +1 -0
  51. package/lib/labs/components.mjs.map +1 -1
  52. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.6.0-alpha.2-dev.2024-04-29
2
+ * Vuetify v3.6.0-alpha.2-dev.2024-04-30
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -19529,6 +19529,7 @@
19529
19529
  headerProps: {
19530
19530
  type: Object
19531
19531
  },
19532
+ ...makeDisplayProps(),
19532
19533
  ...makeLoaderProps()
19533
19534
  }, 'VDataTableHeaders');
19534
19535
  const VDataTableHeaders = genericComponent()({
@@ -19538,6 +19539,9 @@
19538
19539
  let {
19539
19540
  slots
19540
19541
  } = _ref;
19542
+ const {
19543
+ t
19544
+ } = useLocale();
19541
19545
  const {
19542
19546
  toggleSort,
19543
19547
  sortBy,
@@ -19573,6 +19577,10 @@
19573
19577
  backgroundColorClasses,
19574
19578
  backgroundColorStyles
19575
19579
  } = useBackgroundColor(props, 'color');
19580
+ const {
19581
+ displayClasses,
19582
+ mobile
19583
+ } = useDisplay(props);
19576
19584
  const slotProps = vue.computed(() => ({
19577
19585
  headers: headers.value,
19578
19586
  columns: columns.value,
@@ -19584,6 +19592,9 @@
19584
19592
  selectAll,
19585
19593
  getSortIcon
19586
19594
  }));
19595
+ const headerCellClasses = vue.computed(() => ['v-data-table__th', {
19596
+ 'v-data-table__th--sticky': props.sticky
19597
+ }, displayClasses.value, loaderClasses.value]);
19587
19598
  const VDataTableHeaderCell = _ref2 => {
19588
19599
  let {
19589
19600
  column,
@@ -19595,12 +19606,11 @@
19595
19606
  return vue.createVNode(VDataTableColumn, vue.mergeProps({
19596
19607
  "tag": "th",
19597
19608
  "align": column.align,
19598
- "class": ['v-data-table__th', {
19609
+ "class": [{
19599
19610
  'v-data-table__th--sortable': column.sortable,
19600
19611
  'v-data-table__th--sorted': isSorted(column),
19601
- 'v-data-table__th--fixed': column.fixed,
19602
- 'v-data-table__th--sticky': props.sticky
19603
- }, loaderClasses.value],
19612
+ 'v-data-table__th--fixed': column.fixed
19613
+ }, ...headerCellClasses.value],
19604
19614
  "style": {
19605
19615
  width: convertToUnit(column.width),
19606
19616
  minWidth: convertToUnit(column.minWidth),
@@ -19649,8 +19659,53 @@
19649
19659
  }
19650
19660
  });
19651
19661
  };
19662
+ const VDataTableMobileHeaderCell = () => {
19663
+ const headerProps = vue.mergeProps(props.headerProps ?? {} ?? {});
19664
+ const displayItems = vue.computed(() => {
19665
+ return columns.value.filter(column => column?.sortable);
19666
+ });
19667
+ const appendIcon = vue.computed(() => {
19668
+ return allSelected.value ? '$checkboxOn' : someSelected.value ? '$checkboxIndeterminate' : '$checkboxOff';
19669
+ });
19670
+ return vue.createVNode(VDataTableColumn, vue.mergeProps({
19671
+ "tag": "th",
19672
+ "class": [...headerCellClasses.value],
19673
+ "colspan": headers.value.length + 1
19674
+ }, headerProps), {
19675
+ default: () => [vue.createVNode("div", {
19676
+ "class": "v-data-table-header__content"
19677
+ }, [vue.createVNode(VSelect, {
19678
+ "chips": true,
19679
+ "class": "v-data-table__td-sort-select",
19680
+ "clearable": true,
19681
+ "density": "default",
19682
+ "items": displayItems.value,
19683
+ "label": t('$vuetify.dataTable.sortBy'),
19684
+ "multiple": props.multiSort,
19685
+ "variant": "underlined",
19686
+ "onClick:clear": () => sortBy.value = [],
19687
+ "appendIcon": appendIcon.value,
19688
+ "onClick:append": () => selectAll(!allSelected.value)
19689
+ }, {
19690
+ ...slots,
19691
+ chip: props => vue.createVNode(VChip, {
19692
+ "onClick": props.item.raw?.sortable ? () => toggleSort(props.item.raw) : undefined,
19693
+ "onMousedown": e => {
19694
+ e.preventDefault();
19695
+ e.stopPropagation();
19696
+ }
19697
+ }, {
19698
+ default: () => [props.item.title, vue.createVNode(VIcon, {
19699
+ "class": ['v-data-table__td-sort-icon', isSorted(props.item.raw) && 'v-data-table__td-sort-icon-active'],
19700
+ "icon": getSortIcon(props.item.raw),
19701
+ "size": "small"
19702
+ }, null)]
19703
+ })
19704
+ })])]
19705
+ });
19706
+ };
19652
19707
  useRender(() => {
19653
- return vue.createVNode(vue.Fragment, null, [slots.headers ? slots.headers(slotProps.value) : headers.value.map((row, y) => vue.createVNode("tr", null, [row.map((column, x) => vue.createVNode(VDataTableHeaderCell, {
19708
+ return mobile.value ? vue.createVNode("tr", null, [vue.createVNode(VDataTableMobileHeaderCell, null, null)]) : vue.createVNode(vue.Fragment, null, [slots.headers ? slots.headers(slotProps.value) : headers.value.map((row, y) => vue.createVNode("tr", null, [row.map((column, x) => vue.createVNode(VDataTableHeaderCell, {
19654
19709
  "column": column,
19655
19710
  "x": x,
19656
19711
  "y": y
@@ -19758,7 +19813,8 @@
19758
19813
  cellProps: [Object, Function],
19759
19814
  onClick: EventProp(),
19760
19815
  onContextmenu: EventProp(),
19761
- onDblclick: EventProp()
19816
+ onDblclick: EventProp(),
19817
+ ...makeDisplayProps()
19762
19818
  }, 'VDataTableRow');
19763
19819
  const VDataTableRow = genericComponent()({
19764
19820
  name: 'VDataTableRow',
@@ -19767,27 +19823,40 @@
19767
19823
  let {
19768
19824
  slots
19769
19825
  } = _ref;
19826
+ const {
19827
+ displayClasses,
19828
+ mobile
19829
+ } = useDisplay(props, 'v-data-table__tr');
19770
19830
  const {
19771
19831
  isSelected,
19772
- toggleSelect
19832
+ toggleSelect,
19833
+ someSelected,
19834
+ allSelected,
19835
+ selectAll
19773
19836
  } = useSelection();
19774
19837
  const {
19775
19838
  isExpanded,
19776
19839
  toggleExpand
19777
19840
  } = useExpanded();
19841
+ const {
19842
+ toggleSort,
19843
+ sortBy,
19844
+ isSorted
19845
+ } = useSort();
19778
19846
  const {
19779
19847
  columns
19780
19848
  } = useHeaders();
19781
19849
  useRender(() => vue.createVNode("tr", {
19782
19850
  "class": ['v-data-table__tr', {
19783
19851
  'v-data-table__tr--clickable': !!(props.onClick || props.onContextmenu || props.onDblclick)
19784
- }],
19852
+ }, displayClasses.value],
19785
19853
  "onClick": props.onClick,
19786
19854
  "onContextmenu": props.onContextmenu,
19787
19855
  "onDblclick": props.onDblclick
19788
19856
  }, [props.item && columns.value.map((column, i) => {
19789
19857
  const item = props.item;
19790
19858
  const slotName = `item.${column.key}`;
19859
+ const headerSlotName = `header.${column.key}`;
19791
19860
  const slotProps = {
19792
19861
  index: props.index,
19793
19862
  item: item.raw,
@@ -19799,6 +19868,16 @@
19799
19868
  isExpanded,
19800
19869
  toggleExpand
19801
19870
  };
19871
+ const columnSlotProps = {
19872
+ column,
19873
+ selectAll,
19874
+ isSorted,
19875
+ toggleSort,
19876
+ sortBy: sortBy.value,
19877
+ someSelected: someSelected.value,
19878
+ allSelected: allSelected.value,
19879
+ getSortIcon: () => ''
19880
+ };
19802
19881
  const cellProps = typeof props.cellProps === 'function' ? props.cellProps({
19803
19882
  index: slotProps.index,
19804
19883
  item: slotProps.item,
@@ -19814,16 +19893,20 @@
19814
19893
  }) : column.cellProps;
19815
19894
  return vue.createVNode(VDataTableColumn, vue.mergeProps({
19816
19895
  "align": column.align,
19896
+ "class": {
19897
+ 'v-data-table__td--expanded-row': column.key === 'data-table-expand',
19898
+ 'v-data-table__td--select-row': column.key === 'data-table-select'
19899
+ },
19817
19900
  "fixed": column.fixed,
19818
19901
  "fixedOffset": column.fixedOffset,
19819
19902
  "lastFixed": column.lastFixed,
19903
+ "maxWidth": !mobile.value ? column.maxWidth : undefined,
19820
19904
  "noPadding": column.key === 'data-table-select' || column.key === 'data-table-expand',
19821
- "width": column.width,
19822
- "maxWidth": column.maxWidth,
19823
- "nowrap": column.nowrap
19905
+ "nowrap": column.nowrap,
19906
+ "width": !mobile.value ? column.width : undefined
19824
19907
  }, cellProps, columnCellProps), {
19825
19908
  default: () => {
19826
- if (slots[slotName]) return slots[slotName](slotProps);
19909
+ if (slots[slotName] && !mobile.value) return slots[slotName]?.(slotProps);
19827
19910
  if (column.key === 'data-table-select') {
19828
19911
  return slots['item.data-table-select']?.(slotProps) ?? vue.createVNode(VCheckboxBtn, {
19829
19912
  "disabled": !item.selectable,
@@ -19839,7 +19922,12 @@
19839
19922
  "onClick": vue.withModifiers(() => toggleExpand(item), ['stop'])
19840
19923
  }, null);
19841
19924
  }
19842
- return vue.toDisplayString(slotProps.value);
19925
+ const displayValue = vue.toDisplayString(slotProps.value);
19926
+ return !mobile.value ? displayValue : vue.createVNode(vue.Fragment, null, [vue.createVNode("div", {
19927
+ "class": "v-data-table__td-title"
19928
+ }, [slots[headerSlotName]?.(columnSlotProps) ?? column.title]), vue.createVNode("div", {
19929
+ "class": "v-data-table__td-value"
19930
+ }, [slots[slotName]?.(slotProps) ?? displayValue])]);
19843
19931
  }
19844
19932
  });
19845
19933
  })]));
@@ -19864,7 +19952,8 @@
19864
19952
  default: '$vuetify.noDataText'
19865
19953
  },
19866
19954
  rowProps: [Object, Function],
19867
- cellProps: [Object, Function]
19955
+ cellProps: [Object, Function],
19956
+ ...makeDisplayProps()
19868
19957
  }, 'VDataTableRows');
19869
19958
  const VDataTableRows = genericComponent()({
19870
19959
  name: 'VDataTableRows',
@@ -19894,6 +19983,9 @@
19894
19983
  const {
19895
19984
  t
19896
19985
  } = useLocale();
19986
+ const {
19987
+ mobile
19988
+ } = useDisplay(props);
19897
19989
  useRender(() => {
19898
19990
  if (props.loading && (!props.items.length || slots.loading)) {
19899
19991
  return vue.createVNode("tr", {
@@ -19948,7 +20040,8 @@
19948
20040
  } : undefined,
19949
20041
  index,
19950
20042
  item,
19951
- cellProps: props.cellProps
20043
+ cellProps: props.cellProps,
20044
+ mobile: mobile.value
19952
20045
  }, getPrefixedEventHandlers(attrs, ':row', () => slotProps), typeof props.rowProps === 'function' ? props.rowProps({
19953
20046
  item: slotProps.item,
19954
20047
  index: slotProps.index,
@@ -27453,6 +27546,114 @@
27453
27546
  }
27454
27547
  });
27455
27548
 
27549
+ const VPullToRefresh = genericComponent()({
27550
+ name: 'VPullToRefresh',
27551
+ props: {
27552
+ pullDownThreshold: {
27553
+ type: Number,
27554
+ default: 64
27555
+ }
27556
+ },
27557
+ emits: {
27558
+ load: options => true
27559
+ },
27560
+ setup(props, _ref) {
27561
+ let {
27562
+ slots,
27563
+ emit
27564
+ } = _ref;
27565
+ let touchstartY = 0;
27566
+ let scrollParents = [];
27567
+ const touchDiff = vue.shallowRef(0);
27568
+ const containerRef = vue.ref();
27569
+ const refreshing = vue.shallowRef(false);
27570
+ const goingUp = vue.shallowRef(false);
27571
+ const touching = vue.shallowRef(false);
27572
+ const canRefresh = vue.computed(() => touchDiff.value >= props.pullDownThreshold && !refreshing.value);
27573
+ const topOffset = vue.computed(() => clamp(touchDiff.value, 0, props.pullDownThreshold));
27574
+ function onTouchstart(e) {
27575
+ if (refreshing.value) return;
27576
+ touching.value = true;
27577
+ touchstartY = 'clientY' in e ? e.clientY : e.touches[0].clientY;
27578
+ }
27579
+ function onTouchmove(e) {
27580
+ if (refreshing.value || !touching.value) return;
27581
+ const touchY = 'clientY' in e ? e.clientY : e.touches[0].clientY;
27582
+ if (scrollParents.length && !scrollParents[0].scrollTop) {
27583
+ touchDiff.value = touchY - touchstartY;
27584
+ }
27585
+ }
27586
+ function onTouchend(e) {
27587
+ if (refreshing.value) return;
27588
+ touching.value = false;
27589
+ if (canRefresh.value) {
27590
+ function done() {
27591
+ if (!refreshing.value) return;
27592
+ touchDiff.value = 0;
27593
+ refreshing.value = false;
27594
+ }
27595
+ emit('load', {
27596
+ done
27597
+ });
27598
+ refreshing.value = true;
27599
+ } else {
27600
+ touchDiff.value = 0;
27601
+ }
27602
+ }
27603
+ vue.onMounted(() => {
27604
+ scrollParents = getScrollParents(containerRef.value);
27605
+ });
27606
+ vue.watch([topOffset, refreshing], () => {
27607
+ if (scrollParents.length) {
27608
+ const stopScrolling = topOffset.value && !refreshing.value;
27609
+ scrollParents.forEach(p => p.style.overflow = stopScrolling ? 'hidden' : 'auto');
27610
+ }
27611
+ });
27612
+ vue.watch(topOffset, (newVal, oldVal) => {
27613
+ goingUp.value = newVal < oldVal;
27614
+ });
27615
+ useRender(() => {
27616
+ return vue.createVNode("div", {
27617
+ "class": ['v-pull-to-refresh'],
27618
+ "onTouchstart": onTouchstart,
27619
+ "onTouchmove": onTouchmove,
27620
+ "onTouchend": onTouchend,
27621
+ "onMousedown": onTouchstart,
27622
+ "onMouseup": onTouchend,
27623
+ "onMouseleave": onTouchend,
27624
+ "onMousemove": onTouchmove,
27625
+ "ref": containerRef
27626
+ }, [vue.createVNode("div", {
27627
+ "class": ['v-pull-to-refresh__pull-down', {
27628
+ 'v-pull-to-refresh__pull-down--touching': touching.value
27629
+ }],
27630
+ "style": {
27631
+ top: convertToUnit(-1 * props.pullDownThreshold + topOffset.value),
27632
+ height: convertToUnit(props.pullDownThreshold)
27633
+ }
27634
+ }, [slots.pullDownPanel ? slots.pullDownPanel({
27635
+ canRefresh: canRefresh.value,
27636
+ goingUp: goingUp.value,
27637
+ refreshing: refreshing.value
27638
+ }) : vue.createVNode("div", {
27639
+ "class": ['v-pull-to-refresh__pull-down-default']
27640
+ }, [refreshing.value ? vue.createVNode(VProgressCircular, {
27641
+ "indeterminate": true,
27642
+ "active": false
27643
+ }, null) : vue.createVNode(VIcon, {
27644
+ "icon": canRefresh.value || goingUp.value ? '$sortAsc' : '$sortDesc'
27645
+ }, null)])]), vue.createVNode("div", {
27646
+ "class": ['v-pull-to-refresh__scroll-container', {
27647
+ 'v-pull-to-refresh__scroll-container--touching': touching.value
27648
+ }],
27649
+ "style": {
27650
+ top: convertToUnit(topOffset.value)
27651
+ }
27652
+ }, [slots.default?.()])]);
27653
+ });
27654
+ }
27655
+ });
27656
+
27456
27657
  // Types
27457
27658
 
27458
27659
  const makeVSnackbarQueueProps = propsFactory({
@@ -29186,6 +29387,7 @@
29186
29387
  VPickerTitle: VPickerTitle,
29187
29388
  VProgressCircular: VProgressCircular,
29188
29389
  VProgressLinear: VProgressLinear,
29390
+ VPullToRefresh: VPullToRefresh,
29189
29391
  VRadio: VRadio,
29190
29392
  VRadioGroup: VRadioGroup,
29191
29393
  VRangeSlider: VRangeSlider,
@@ -29555,7 +29757,7 @@
29555
29757
  goTo
29556
29758
  };
29557
29759
  }
29558
- const version$1 = "3.6.0-alpha.2-dev.2024-04-29";
29760
+ const version$1 = "3.6.0-alpha.2-dev.2024-04-30";
29559
29761
  createVuetify$1.version = version$1;
29560
29762
 
29561
29763
  // Vue's inject() can only be used in setup
@@ -29808,7 +30010,7 @@
29808
30010
 
29809
30011
  /* eslint-disable local-rules/sort-imports */
29810
30012
 
29811
- const version = "3.6.0-alpha.2-dev.2024-04-29";
30013
+ const version = "3.6.0-alpha.2-dev.2024-04-30";
29812
30014
 
29813
30015
  /* eslint-disable local-rules/sort-imports */
29814
30016