vuetify 3.1.15 → 3.1.16

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 (46) hide show
  1. package/dist/json/attributes.json +44 -44
  2. package/dist/json/importMap.json +72 -72
  3. package/dist/json/web-types.json +77 -77
  4. package/dist/vuetify-labs.css +370 -371
  5. package/dist/vuetify-labs.d.ts +3 -3
  6. package/dist/vuetify-labs.esm.js +101 -68
  7. package/dist/vuetify-labs.esm.js.map +1 -1
  8. package/dist/vuetify-labs.js +101 -68
  9. package/dist/vuetify-labs.min.css +2 -2
  10. package/dist/vuetify.css +7 -8
  11. package/dist/vuetify.d.ts +24 -24
  12. package/dist/vuetify.esm.js +63 -41
  13. package/dist/vuetify.esm.js.map +1 -1
  14. package/dist/vuetify.js +63 -41
  15. package/dist/vuetify.js.map +1 -1
  16. package/dist/vuetify.min.css +2 -2
  17. package/dist/vuetify.min.js +717 -714
  18. package/dist/vuetify.min.js.map +1 -1
  19. package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs +31 -16
  20. package/lib/components/VBreadcrumbs/VBreadcrumbs.mjs.map +1 -1
  21. package/lib/components/VBreadcrumbs/index.d.ts +3 -3
  22. package/lib/components/VDialog/VDialog.mjs +2 -2
  23. package/lib/components/VDialog/VDialog.mjs.map +1 -1
  24. package/lib/components/VField/VField.css +0 -1
  25. package/lib/components/VField/VField.sass +0 -1
  26. package/lib/components/VList/VList.mjs +3 -22
  27. package/lib/components/VList/VList.mjs.map +1 -1
  28. package/lib/components/VSlideGroup/VSlideGroup.mjs +2 -2
  29. package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
  30. package/lib/components/index.d.ts +3 -3
  31. package/lib/entry-bundler.mjs +1 -1
  32. package/lib/framework.mjs +1 -1
  33. package/lib/index.d.ts +21 -21
  34. package/lib/labs/VDataTable/VDataTable.mjs +1 -1
  35. package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
  36. package/lib/labs/VDataTable/VDataTableHeaders.mjs +34 -20
  37. package/lib/labs/VDataTable/VDataTableHeaders.mjs.map +1 -1
  38. package/lib/labs/VDataTable/VDataTableRow.mjs +2 -4
  39. package/lib/labs/VDataTable/VDataTableRow.mjs.map +1 -1
  40. package/lib/labs/VDataTable/VDataTableRows.mjs +2 -2
  41. package/lib/labs/VDataTable/VDataTableRows.mjs.map +1 -1
  42. package/lib/labs/VDataTable/VDataTableServer.mjs +1 -1
  43. package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
  44. package/lib/util/helpers.mjs +26 -0
  45. package/lib/util/helpers.mjs.map +1 -1
  46. package/package.json +3 -3
@@ -8049,8 +8049,8 @@ interface LinkProps {
8049
8049
  exact: boolean | undefined;
8050
8050
  }
8051
8051
 
8052
- type BreadcrumbItem = string | (LinkProps & {
8053
- text: string;
8052
+ type BreadcrumbItem = string | (Partial<LinkProps> & {
8053
+ title: string;
8054
8054
  disabled?: boolean;
8055
8055
  });
8056
8056
  declare const VBreadcrumbs: {
@@ -8237,7 +8237,7 @@ declare const VBreadcrumbs: {
8237
8237
  rounded: string | number | boolean;
8238
8238
  density: Density;
8239
8239
  divider: string;
8240
- }, {}, string> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new <T_1>() => {
8240
+ }, {}, string> & vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & (new <T_1 extends BreadcrumbItem>() => {
8241
8241
  $props: {
8242
8242
  items?: T_1[] | undefined;
8243
8243
  } & {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.1.15
2
+ * Vuetify v3.1.16
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -356,6 +356,32 @@ function callEvent(handler) {
356
356
  handler(...args);
357
357
  }
358
358
  }
359
+ function focusableChildren(el) {
360
+ const targets = ['button', '[href]', 'input:not([type="hidden"])', 'select', 'textarea', '[tabindex]'].map(s => `${s}:not([tabindex="-1"]):not([disabled])`).join(', ');
361
+ return [...el.querySelectorAll(targets)];
362
+ }
363
+ function focusChild(el, location) {
364
+ const focusable = focusableChildren(el);
365
+ const idx = focusable.indexOf(document.activeElement);
366
+ if (!location) {
367
+ if (!el.contains(document.activeElement)) {
368
+ focusable[0]?.focus();
369
+ }
370
+ } else if (location === 'first') {
371
+ focusable[0]?.focus();
372
+ } else if (location === 'last') {
373
+ focusable.at(-1)?.focus();
374
+ } else {
375
+ let _el;
376
+ let idxx = idx;
377
+ const inc = location === 'next' ? 1 : -1;
378
+ do {
379
+ idxx += inc;
380
+ _el = focusable[idxx];
381
+ } while ((!_el || _el.offsetParent == null) && idxx < focusable.length && idxx >= 0);
382
+ if (_el) _el.focus();else focusChild(el, location === 'next' ? 'first' : 'last');
383
+ }
384
+ }
359
385
 
360
386
  const block = ['top', 'bottom'];
361
387
  const inline = ['start', 'end', 'left', 'right'];
@@ -8227,27 +8253,8 @@ const VList = genericComponent()({
8227
8253
  e.preventDefault();
8228
8254
  }
8229
8255
  function focus(location) {
8230
- if (!contentRef.value) return;
8231
- const targets = ['button', '[href]', 'input', 'select', 'textarea', '[tabindex]'].map(s => `${s}:not([tabindex="-1"])`).join(', ');
8232
- const focusable = [...contentRef.value.querySelectorAll(targets)].filter(el => !el.hasAttribute('disabled'));
8233
- const idx = focusable.indexOf(document.activeElement);
8234
- if (!location) {
8235
- if (!contentRef.value.contains(document.activeElement)) {
8236
- focusable[0]?.focus();
8237
- }
8238
- } else if (location === 'first') {
8239
- focusable[0]?.focus();
8240
- } else if (location === 'last') {
8241
- focusable.at(-1)?.focus();
8242
- } else {
8243
- let el;
8244
- let idxx = idx;
8245
- const inc = location === 'next' ? 1 : -1;
8246
- do {
8247
- idxx += inc;
8248
- el = focusable[idxx];
8249
- } while ((!el || el.offsetParent == null) && idxx < focusable.length && idxx >= 0);
8250
- if (el) el.focus();else focus(location === 'next' ? 'first' : 'last');
8256
+ if (contentRef.value) {
8257
+ return focusChild(contentRef.value, location);
8251
8258
  }
8252
8259
  }
8253
8260
  useRender(() => {
@@ -11058,6 +11065,17 @@ const VBreadcrumbs = genericComponent()({
11058
11065
  disabled: toRef(props, 'disabled')
11059
11066
  }
11060
11067
  });
11068
+ const items = computed(() => props.items.map(item => {
11069
+ return typeof item === 'string' ? {
11070
+ item: {
11071
+ title: item
11072
+ },
11073
+ raw: item
11074
+ } : {
11075
+ item,
11076
+ raw: item
11077
+ };
11078
+ }));
11061
11079
  useRender(() => {
11062
11080
  const hasPrepend = !!(slots.prepend || props.icon);
11063
11081
  return createVNode(props.tag, {
@@ -11080,22 +11098,26 @@ const VBreadcrumbs = genericComponent()({
11080
11098
  start: true
11081
11099
  }
11082
11100
  }
11083
- }, slots.prepend)]), props.items.map((item, index, array) => createVNode(Fragment, null, [createVNode(VBreadcrumbsItem, mergeProps({
11084
- "key": index,
11085
- "disabled": index >= array.length - 1
11086
- }, typeof item === 'string' ? {
11087
- title: item
11088
- } : item), {
11089
- default: slots.title ? () => slots.title?.({
11090
- item,
11091
- index
11092
- }) : undefined
11093
- }), index < array.length - 1 && createVNode(VBreadcrumbsDivider, null, {
11094
- default: slots.divider ? () => slots.divider?.({
11101
+ }, slots.prepend)]), items.value.map((_ref2, index, array) => {
11102
+ let {
11095
11103
  item,
11096
- index
11097
- }) : undefined
11098
- })])), slots.default?.()]
11104
+ raw
11105
+ } = _ref2;
11106
+ return createVNode(Fragment, null, [createVNode(VBreadcrumbsItem, mergeProps({
11107
+ "key": item.title,
11108
+ "disabled": index >= array.length - 1
11109
+ }, item), {
11110
+ default: slots.title ? () => slots.title?.({
11111
+ item: raw,
11112
+ index
11113
+ }) : undefined
11114
+ }), index < array.length - 1 && createVNode(VBreadcrumbsDivider, null, {
11115
+ default: slots.divider ? () => slots.divider?.({
11116
+ item: raw,
11117
+ index
11118
+ }) : undefined
11119
+ })]);
11120
+ }), slots.default?.()]
11099
11121
  });
11100
11122
  });
11101
11123
  return {};
@@ -14017,7 +14039,7 @@ const VDialog = genericComponent()({
14017
14039
  ![document, overlay.value.contentEl].includes(after) &&
14018
14040
  // It isn't inside the dialog body
14019
14041
  !overlay.value.contentEl.contains(after)) {
14020
- const focusable = [...overlay.value.contentEl.querySelectorAll('button, [href], input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])')].filter(el => !el.hasAttribute('disabled') && !el.matches('[tabindex="-1"]'));
14042
+ const focusable = focusableChildren(overlay.value.contentEl);
14021
14043
  if (!focusable.length) return;
14022
14044
  const firstElement = focusable[0];
14023
14045
  const lastElement = focusable[focusable.length - 1];
@@ -16862,7 +16884,7 @@ const VSlideGroup = genericComponent()({
16862
16884
  function focus(location) {
16863
16885
  if (!contentRef.value) return;
16864
16886
  if (!location) {
16865
- const focusable = [...contentRef.value.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')].filter(el => !el.hasAttribute('disabled'));
16887
+ const focusable = focusableChildren(contentRef.value);
16866
16888
  focusable[0]?.focus();
16867
16889
  } else if (location === 'next') {
16868
16890
  const el = contentRef.value.querySelector(':focus')?.nextElementSibling;
@@ -18538,6 +18560,17 @@ const VDataTableHeaders = genericComponent()({
18538
18560
  backgroundColorClasses,
18539
18561
  backgroundColorStyles
18540
18562
  } = useBackgroundColor(props, 'color');
18563
+ const slotProps = computed(() => ({
18564
+ headers: headers.value,
18565
+ columns: columns.value,
18566
+ toggleSort,
18567
+ sortBy: sortBy.value,
18568
+ someSelected: someSelected.value,
18569
+ allSelected: allSelected.value,
18570
+ selectAll,
18571
+ getSortIcon,
18572
+ getFixedStyles
18573
+ }));
18541
18574
  const VDataTableHeaderCell = _ref2 => {
18542
18575
  let {
18543
18576
  column,
@@ -18565,14 +18598,14 @@ const VDataTableHeaders = genericComponent()({
18565
18598
  "noPadding": noPadding
18566
18599
  }, {
18567
18600
  default: () => {
18568
- const slotName = `column.${column.key}`;
18569
- const slotProps = {
18601
+ const columnSlotName = `column.${column.key}`;
18602
+ const columnSlotProps = {
18570
18603
  column,
18571
18604
  selectAll
18572
18605
  };
18573
- if (slots[slotName]) return slots[slotName](slotProps);
18606
+ if (slots[columnSlotName]) return slots[columnSlotName](columnSlotProps);
18574
18607
  if (column.key === 'data-table-select') {
18575
- return slots['column.data-table-select']?.(slotProps) ?? createVNode(VCheckboxBtn, {
18608
+ return slots['column.data-table-select']?.(columnSlotProps) ?? createVNode(VCheckboxBtn, {
18576
18609
  "modelValue": allSelected.value,
18577
18610
  "indeterminate": someSelected.value && !allSelected.value,
18578
18611
  "onUpdate:modelValue": selectAll
@@ -18592,22 +18625,24 @@ const VDataTableHeaders = genericComponent()({
18592
18625
  }
18593
18626
  });
18594
18627
  };
18595
- useRender(() => createVNode(Fragment, null, [headers.value.map((row, y) => createVNode("tr", null, [row.map((column, x) => createVNode(VDataTableHeaderCell, {
18596
- "column": column,
18597
- "x": x,
18598
- "y": y
18599
- }, null))])), props.loading && createVNode("tr", {
18600
- "class": "v-data-table__progress"
18601
- }, [createVNode("th", {
18602
- "colspan": columns.value.length
18603
- }, [createVNode(LoaderSlot, {
18604
- "name": "v-data-table-headers",
18605
- "active": true,
18606
- "color": typeof props.loading === 'boolean' ? undefined : props.loading,
18607
- "indeterminate": true
18608
- }, {
18609
- default: slots.loader
18610
- })])])]));
18628
+ useRender(() => {
18629
+ return createVNode(Fragment, null, [slots.headers ? slots.headers(slotProps.value) : headers.value.map((row, y) => createVNode("tr", null, [row.map((column, x) => createVNode(VDataTableHeaderCell, {
18630
+ "column": column,
18631
+ "x": x,
18632
+ "y": y
18633
+ }, null))])), props.loading && createVNode("tr", {
18634
+ "class": "v-data-table__progress"
18635
+ }, [createVNode("th", {
18636
+ "colspan": columns.value.length
18637
+ }, [createVNode(LoaderSlot, {
18638
+ "name": "v-data-table-headers",
18639
+ "active": true,
18640
+ "color": typeof props.loading === 'boolean' ? undefined : props.loading,
18641
+ "indeterminate": true
18642
+ }, {
18643
+ default: slots.loader
18644
+ })])])]);
18645
+ });
18611
18646
  }
18612
18647
  });
18613
18648
 
@@ -18906,9 +18941,7 @@ const VDataTableRow = defineComponent({
18906
18941
  'v-data-table__tr--clickable': !!props.onClick
18907
18942
  }],
18908
18943
  "onClick": props.onClick
18909
- }, [!columns.value.length && createVNode(VDataTableColumn, {
18910
- "key": "no-data"
18911
- }, slots), props.item && columns.value.map((column, i) => createVNode(VDataTableColumn, {
18944
+ }, [props.item && columns.value.map((column, i) => createVNode(VDataTableColumn, {
18912
18945
  "align": column.align,
18913
18946
  "fixed": column.fixed,
18914
18947
  "fixedOffset": column.fixedOffset,
@@ -18998,13 +19031,13 @@ const VDataTableRows = genericComponent()({
18998
19031
  useRender(() => {
18999
19032
  if (props.loading && slots.loading) {
19000
19033
  return createVNode("tr", {
19001
- "class": "v-data-table-rows-no-data",
19034
+ "class": "v-data-table-rows-loading",
19002
19035
  "key": "loading"
19003
19036
  }, [createVNode("td", {
19004
19037
  "colspan": columns.value.length
19005
19038
  }, [slots.loading()])]);
19006
19039
  }
19007
- if (!props.loading && !props.items.length && !props.hideNoData && slots['no-data']) {
19040
+ if (!props.loading && !props.items.length && !props.hideNoData) {
19008
19041
  return createVNode("tr", {
19009
19042
  "class": "v-data-table-rows-no-data",
19010
19043
  "key": "no-data"
@@ -19483,7 +19516,7 @@ const VDataTable = genericComponent()({
19483
19516
  top: slots.top,
19484
19517
  default: slots.default ?? (() => createVNode(Fragment, null, [slots.colgroup?.({
19485
19518
  columns
19486
- }), createVNode("thead", null, [slots.headers ? slots.headers() : createVNode(VDataTableHeaders, {
19519
+ }), createVNode("thead", null, [createVNode(VDataTableHeaders, {
19487
19520
  "sticky": props.fixedHeader,
19488
19521
  "multiSort": props.multiSort
19489
19522
  }, slots)]), slots.thead?.(), createVNode("tbody", null, [slots.body ? slots.body() : createVNode(VDataTableRows, {
@@ -19849,7 +19882,7 @@ const VDataTableServer = genericComponent()({
19849
19882
  }), createVNode("thead", {
19850
19883
  "class": "v-data-table__thead",
19851
19884
  "role": "rowgroup"
19852
- }, [slots.headers ? slots.headers() : createVNode(VDataTableHeaders, {
19885
+ }, [createVNode(VDataTableHeaders, {
19853
19886
  "sticky": props.fixedHeader,
19854
19887
  "loading": props.loading,
19855
19888
  "color": props.color
@@ -20522,7 +20555,7 @@ function createVuetify$1() {
20522
20555
  locale
20523
20556
  };
20524
20557
  }
20525
- const version$1 = "3.1.15";
20558
+ const version$1 = "3.1.16";
20526
20559
  createVuetify$1.version = version$1;
20527
20560
 
20528
20561
  // Vue's inject() can only be used in setup
@@ -20534,7 +20567,7 @@ function inject(key) {
20534
20567
  }
20535
20568
  }
20536
20569
 
20537
- const version = "3.1.15";
20570
+ const version = "3.1.16";
20538
20571
 
20539
20572
  const createVuetify = function () {
20540
20573
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};