vuetify 3.2.3 → 3.2.4

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 (132) hide show
  1. package/dist/json/attributes.json +9 -9
  2. package/dist/json/importMap.json +12 -12
  3. package/dist/json/web-types.json +11 -11
  4. package/dist/vuetify-labs.css +34 -35
  5. package/dist/vuetify-labs.d.ts +72 -72
  6. package/dist/vuetify-labs.esm.js +142 -124
  7. package/dist/vuetify-labs.esm.js.map +1 -1
  8. package/dist/vuetify-labs.js +142 -124
  9. package/dist/vuetify-labs.min.css +2 -2
  10. package/dist/vuetify.css +1 -2
  11. package/dist/vuetify.d.ts +75 -68
  12. package/dist/vuetify.esm.js +131 -115
  13. package/dist/vuetify.esm.js.map +1 -1
  14. package/dist/vuetify.js +131 -115
  15. package/dist/vuetify.js.map +1 -1
  16. package/dist/vuetify.min.css +2 -2
  17. package/dist/vuetify.min.js +469 -469
  18. package/dist/vuetify.min.js.map +1 -1
  19. package/lib/components/VAlert/VAlert.mjs +1 -2
  20. package/lib/components/VAlert/VAlert.mjs.map +1 -1
  21. package/lib/components/VAppBar/VAppBar.mjs +2 -2
  22. package/lib/components/VAppBar/VAppBar.mjs.map +1 -1
  23. package/lib/components/VAppBar/VAppBarNavIcon.mjs +1 -2
  24. package/lib/components/VAppBar/VAppBarNavIcon.mjs.map +1 -1
  25. package/lib/components/VAppBar/VAppBarTitle.mjs +1 -2
  26. package/lib/components/VAppBar/VAppBarTitle.mjs.map +1 -1
  27. package/lib/components/VAutocomplete/VAutocomplete.mjs +5 -5
  28. package/lib/components/VAutocomplete/VAutocomplete.mjs.map +1 -1
  29. package/lib/components/VAutocomplete/index.d.ts +9 -9
  30. package/lib/components/VChip/VChip.css +0 -1
  31. package/lib/components/VChip/VChip.sass +0 -1
  32. package/lib/components/VColorPicker/VColorPickerCanvas.mjs +5 -5
  33. package/lib/components/VColorPicker/VColorPickerCanvas.mjs.map +1 -1
  34. package/lib/components/VCombobox/VCombobox.mjs +5 -5
  35. package/lib/components/VCombobox/VCombobox.mjs.map +1 -1
  36. package/lib/components/VCombobox/index.d.ts +9 -9
  37. package/lib/components/VFooter/VFooter.mjs +2 -2
  38. package/lib/components/VFooter/VFooter.mjs.map +1 -1
  39. package/lib/components/VForm/index.d.ts +3 -3
  40. package/lib/components/VImg/VImg.mjs +6 -6
  41. package/lib/components/VImg/VImg.mjs.map +1 -1
  42. package/lib/components/VImg/index.d.ts +12 -12
  43. package/lib/components/VList/VList.mjs +2 -2
  44. package/lib/components/VList/VList.mjs.map +1 -1
  45. package/lib/components/VList/index.d.ts +9 -9
  46. package/lib/components/VList/list.mjs +4 -4
  47. package/lib/components/VList/list.mjs.map +1 -1
  48. package/lib/components/VMenu/VMenu.mjs +3 -3
  49. package/lib/components/VMenu/VMenu.mjs.map +1 -1
  50. package/lib/components/VMenu/index.d.ts +3 -3
  51. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs +2 -2
  52. package/lib/components/VNavigationDrawer/VNavigationDrawer.mjs.map +1 -1
  53. package/lib/components/VNavigationDrawer/index.d.ts +3 -3
  54. package/lib/components/VNavigationDrawer/sticky.mjs +5 -4
  55. package/lib/components/VNavigationDrawer/sticky.mjs.map +1 -1
  56. package/lib/components/VNavigationDrawer/touch.mjs +4 -4
  57. package/lib/components/VNavigationDrawer/touch.mjs.map +1 -1
  58. package/lib/components/VOverlay/locationStrategies.mjs +1 -1
  59. package/lib/components/VOverlay/locationStrategies.mjs.map +1 -1
  60. package/lib/components/VPagination/VPagination.mjs +2 -2
  61. package/lib/components/VPagination/VPagination.mjs.map +1 -1
  62. package/lib/components/VRating/VRating.mjs +6 -3
  63. package/lib/components/VRating/VRating.mjs.map +1 -1
  64. package/lib/components/VSelect/VSelect.mjs +2 -2
  65. package/lib/components/VSelect/VSelect.mjs.map +1 -1
  66. package/lib/components/VSelect/index.d.ts +9 -9
  67. package/lib/components/VSelectionControl/VSelectionControl.mjs +3 -3
  68. package/lib/components/VSelectionControl/VSelectionControl.mjs.map +1 -1
  69. package/lib/components/VSelectionControl/index.d.ts +3 -3
  70. package/lib/components/VSlideGroup/VSlideGroup.mjs +7 -7
  71. package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
  72. package/lib/components/VSlideGroup/index.d.ts +3 -3
  73. package/lib/components/VSlider/slider.mjs +3 -3
  74. package/lib/components/VSlider/slider.mjs.map +1 -1
  75. package/lib/components/VSystemBar/VSystemBar.mjs +2 -2
  76. package/lib/components/VSystemBar/VSystemBar.mjs.map +1 -1
  77. package/lib/components/VTabs/VTab.mjs +4 -5
  78. package/lib/components/VTabs/VTab.mjs.map +1 -1
  79. package/lib/components/VTextarea/VTextarea.mjs +6 -3
  80. package/lib/components/VTextarea/VTextarea.mjs.map +1 -1
  81. package/lib/components/VTimeline/VTimelineItem.mjs +2 -2
  82. package/lib/components/VTimeline/VTimelineItem.mjs.map +1 -1
  83. package/lib/components/VToolbar/VToolbar.mjs +2 -2
  84. package/lib/components/VToolbar/VToolbar.mjs.map +1 -1
  85. package/lib/components/VVirtualScroll/VVirtualScroll.mjs +3 -3
  86. package/lib/components/VVirtualScroll/VVirtualScroll.mjs.map +1 -1
  87. package/lib/components/VWindow/VWindow.mjs +3 -3
  88. package/lib/components/VWindow/VWindow.mjs.map +1 -1
  89. package/lib/components/VWindow/VWindowItem.mjs +3 -3
  90. package/lib/components/VWindow/VWindowItem.mjs.map +1 -1
  91. package/lib/components/index.d.ts +63 -63
  92. package/lib/composables/display.mjs +3 -3
  93. package/lib/composables/display.mjs.map +1 -1
  94. package/lib/composables/form.mjs +4 -4
  95. package/lib/composables/form.mjs.map +1 -1
  96. package/lib/composables/hydration.mjs +6 -6
  97. package/lib/composables/hydration.mjs.map +1 -1
  98. package/lib/composables/intersectionObserver.mjs +2 -2
  99. package/lib/composables/intersectionObserver.mjs.map +1 -1
  100. package/lib/composables/layout.mjs +3 -3
  101. package/lib/composables/layout.mjs.map +1 -1
  102. package/lib/composables/lazy.mjs +2 -2
  103. package/lib/composables/lazy.mjs.map +1 -1
  104. package/lib/composables/nested/nested.mjs +5 -4
  105. package/lib/composables/nested/nested.mjs.map +1 -1
  106. package/lib/composables/scroll.mjs +6 -6
  107. package/lib/composables/scroll.mjs.map +1 -1
  108. package/lib/composables/ssrBoot.mjs +2 -2
  109. package/lib/composables/ssrBoot.mjs.map +1 -1
  110. package/lib/composables/stack.mjs +5 -4
  111. package/lib/composables/stack.mjs.map +1 -1
  112. package/lib/composables/transition.mjs +5 -2
  113. package/lib/composables/transition.mjs.map +1 -1
  114. package/lib/composables/validation.mjs +3 -3
  115. package/lib/composables/validation.mjs.map +1 -1
  116. package/lib/entry-bundler.mjs +1 -1
  117. package/lib/framework.mjs +1 -1
  118. package/lib/index.d.ts +12 -5
  119. package/lib/labs/VDataTable/VDataTable.mjs +2 -1
  120. package/lib/labs/VDataTable/VDataTable.mjs.map +1 -1
  121. package/lib/labs/VDataTable/VDataTableServer.mjs +2 -1
  122. package/lib/labs/VDataTable/VDataTableServer.mjs.map +1 -1
  123. package/lib/labs/VDataTable/VDataTableVirtual.mjs +6 -6
  124. package/lib/labs/VDataTable/VDataTableVirtual.mjs.map +1 -1
  125. package/lib/labs/VDataTable/composables/virtual.mjs +3 -3
  126. package/lib/labs/VDataTable/composables/virtual.mjs.map +1 -1
  127. package/lib/labs/VSkeletonLoader/VSkeletonLoader.mjs.map +1 -1
  128. package/lib/labs/VSkeletonLoader/index.d.ts +9 -9
  129. package/lib/labs/components.d.ts +9 -9
  130. package/lib/locale/adapters/vuetify.mjs +8 -5
  131. package/lib/locale/adapters/vuetify.mjs.map +1 -1
  132. package/package.json +2 -2
@@ -5745,12 +5745,12 @@ declare const VSkeletonLoader: {
5745
5745
  $: vue.ComponentInternalInstance;
5746
5746
  $data: {};
5747
5747
  $props: Partial<{
5748
- type: "button" | "article" | "table" | "image" | "text" | "table-row" | "list-item" | "sentences" | "heading" | "subtitle" | "divider" | "chip" | "avatar" | "actions" | "paragraph" | "card" | "card-avatar" | "date-picker" | "date-picker-options" | "date-picker-days" | "list-item-avatar" | "list-item-two-line" | "list-item-avatar-two-line" | "list-item-three-line" | "list-item-avatar-three-line" | "table-heading" | "table-thead" | "table-tbody" | "table-row-divider" | "table-tfoot" | ("button" | "article" | "table" | "image" | "text" | "table-row" | "list-item" | "sentences" | "heading" | "subtitle" | "divider" | "chip" | "avatar" | "actions" | "paragraph" | "card" | "card-avatar" | "date-picker" | "date-picker-options" | "date-picker-days" | "list-item-avatar" | "list-item-two-line" | "list-item-avatar-two-line" | "list-item-three-line" | "list-item-avatar-three-line" | "table-heading" | "table-thead" | "table-tbody" | "table-row-divider" | "table-tfoot")[];
5748
+ type: string | string[];
5749
5749
  loading: boolean;
5750
5750
  loadingText: string;
5751
5751
  boilerplate: boolean;
5752
5752
  }> & Omit<{
5753
- type: "button" | "article" | "table" | "image" | "text" | "table-row" | "list-item" | "sentences" | "heading" | "subtitle" | "divider" | "chip" | "avatar" | "actions" | "paragraph" | "card" | "card-avatar" | "date-picker" | "date-picker-options" | "date-picker-days" | "list-item-avatar" | "list-item-two-line" | "list-item-avatar-two-line" | "list-item-three-line" | "list-item-avatar-three-line" | "table-heading" | "table-thead" | "table-tbody" | "table-row-divider" | "table-tfoot" | ("button" | "article" | "table" | "image" | "text" | "table-row" | "list-item" | "sentences" | "heading" | "subtitle" | "divider" | "chip" | "avatar" | "actions" | "paragraph" | "card" | "card-avatar" | "date-picker" | "date-picker-options" | "date-picker-days" | "list-item-avatar" | "list-item-two-line" | "list-item-avatar-two-line" | "list-item-three-line" | "list-item-avatar-three-line" | "table-heading" | "table-thead" | "table-tbody" | "table-row-divider" | "table-tfoot")[];
5753
+ type: string | string[];
5754
5754
  loading: boolean;
5755
5755
  loadingText: string;
5756
5756
  boilerplate: boolean;
@@ -5788,7 +5788,7 @@ declare const VSkeletonLoader: {
5788
5788
  $emit: (event: string, ...args: any[]) => void;
5789
5789
  $el: any;
5790
5790
  $options: vue.ComponentOptionsBase<{
5791
- type: "button" | "article" | "table" | "image" | "text" | "table-row" | "list-item" | "sentences" | "heading" | "subtitle" | "divider" | "chip" | "avatar" | "actions" | "paragraph" | "card" | "card-avatar" | "date-picker" | "date-picker-options" | "date-picker-days" | "list-item-avatar" | "list-item-two-line" | "list-item-avatar-two-line" | "list-item-three-line" | "list-item-avatar-three-line" | "table-heading" | "table-thead" | "table-tbody" | "table-row-divider" | "table-tfoot" | ("button" | "article" | "table" | "image" | "text" | "table-row" | "list-item" | "sentences" | "heading" | "subtitle" | "divider" | "chip" | "avatar" | "actions" | "paragraph" | "card" | "card-avatar" | "date-picker" | "date-picker-options" | "date-picker-days" | "list-item-avatar" | "list-item-two-line" | "list-item-avatar-two-line" | "list-item-three-line" | "list-item-avatar-three-line" | "table-heading" | "table-thead" | "table-tbody" | "table-row-divider" | "table-tfoot")[];
5791
+ type: string | string[];
5792
5792
  loading: boolean;
5793
5793
  loadingText: string;
5794
5794
  boilerplate: boolean;
@@ -5812,7 +5812,7 @@ declare const VSkeletonLoader: {
5812
5812
  } & {
5813
5813
  "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
5814
5814
  }, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
5815
- type: "button" | "article" | "table" | "image" | "text" | "table-row" | "list-item" | "sentences" | "heading" | "subtitle" | "divider" | "chip" | "avatar" | "actions" | "paragraph" | "card" | "card-avatar" | "date-picker" | "date-picker-options" | "date-picker-days" | "list-item-avatar" | "list-item-two-line" | "list-item-avatar-two-line" | "list-item-three-line" | "list-item-avatar-three-line" | "table-heading" | "table-thead" | "table-tbody" | "table-row-divider" | "table-tfoot" | ("button" | "article" | "table" | "image" | "text" | "table-row" | "list-item" | "sentences" | "heading" | "subtitle" | "divider" | "chip" | "avatar" | "actions" | "paragraph" | "card" | "card-avatar" | "date-picker" | "date-picker-options" | "date-picker-days" | "list-item-avatar" | "list-item-two-line" | "list-item-avatar-two-line" | "list-item-three-line" | "list-item-avatar-three-line" | "table-heading" | "table-thead" | "table-tbody" | "table-row-divider" | "table-tfoot")[];
5815
+ type: string | string[];
5816
5816
  loading: boolean;
5817
5817
  loadingText: string;
5818
5818
  boilerplate: boolean;
@@ -5837,7 +5837,7 @@ declare const VSkeletonLoader: {
5837
5837
  $nextTick: typeof vue.nextTick;
5838
5838
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: vue.WatchOptions<boolean> | undefined): vue.WatchStopHandle;
5839
5839
  } & {
5840
- type: "button" | "article" | "table" | "image" | "text" | "table-row" | "list-item" | "sentences" | "heading" | "subtitle" | "divider" | "chip" | "avatar" | "actions" | "paragraph" | "card" | "card-avatar" | "date-picker" | "date-picker-options" | "date-picker-days" | "list-item-avatar" | "list-item-two-line" | "list-item-avatar-two-line" | "list-item-three-line" | "list-item-avatar-three-line" | "table-heading" | "table-thead" | "table-tbody" | "table-row-divider" | "table-tfoot" | ("button" | "article" | "table" | "image" | "text" | "table-row" | "list-item" | "sentences" | "heading" | "subtitle" | "divider" | "chip" | "avatar" | "actions" | "paragraph" | "card" | "card-avatar" | "date-picker" | "date-picker-options" | "date-picker-days" | "list-item-avatar" | "list-item-two-line" | "list-item-avatar-two-line" | "list-item-three-line" | "list-item-avatar-three-line" | "table-heading" | "table-thead" | "table-tbody" | "table-row-divider" | "table-tfoot")[];
5840
+ type: string | string[];
5841
5841
  loading: boolean;
5842
5842
  loadingText: string;
5843
5843
  boilerplate: boolean;
@@ -5865,7 +5865,7 @@ declare const VSkeletonLoader: {
5865
5865
  __isTeleport?: undefined;
5866
5866
  __isSuspense?: undefined;
5867
5867
  } & vue.ComponentOptionsBase<{
5868
- type: "button" | "article" | "table" | "image" | "text" | "table-row" | "list-item" | "sentences" | "heading" | "subtitle" | "divider" | "chip" | "avatar" | "actions" | "paragraph" | "card" | "card-avatar" | "date-picker" | "date-picker-options" | "date-picker-days" | "list-item-avatar" | "list-item-two-line" | "list-item-avatar-two-line" | "list-item-three-line" | "list-item-avatar-three-line" | "table-heading" | "table-thead" | "table-tbody" | "table-row-divider" | "table-tfoot" | ("button" | "article" | "table" | "image" | "text" | "table-row" | "list-item" | "sentences" | "heading" | "subtitle" | "divider" | "chip" | "avatar" | "actions" | "paragraph" | "card" | "card-avatar" | "date-picker" | "date-picker-options" | "date-picker-days" | "list-item-avatar" | "list-item-two-line" | "list-item-avatar-two-line" | "list-item-three-line" | "list-item-avatar-three-line" | "table-heading" | "table-thead" | "table-tbody" | "table-row-divider" | "table-tfoot")[];
5868
+ type: string | string[];
5869
5869
  loading: boolean;
5870
5870
  loadingText: string;
5871
5871
  boilerplate: boolean;
@@ -5889,7 +5889,7 @@ declare const VSkeletonLoader: {
5889
5889
  } & {
5890
5890
  "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
5891
5891
  }, {}, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, Record<string, any>, string, {
5892
- type: "button" | "article" | "table" | "image" | "text" | "table-row" | "list-item" | "sentences" | "heading" | "subtitle" | "divider" | "chip" | "avatar" | "actions" | "paragraph" | "card" | "card-avatar" | "date-picker" | "date-picker-options" | "date-picker-days" | "list-item-avatar" | "list-item-two-line" | "list-item-avatar-two-line" | "list-item-three-line" | "list-item-avatar-three-line" | "table-heading" | "table-thead" | "table-tbody" | "table-row-divider" | "table-tfoot" | ("button" | "article" | "table" | "image" | "text" | "table-row" | "list-item" | "sentences" | "heading" | "subtitle" | "divider" | "chip" | "avatar" | "actions" | "paragraph" | "card" | "card-avatar" | "date-picker" | "date-picker-options" | "date-picker-days" | "list-item-avatar" | "list-item-two-line" | "list-item-avatar-two-line" | "list-item-three-line" | "list-item-avatar-three-line" | "table-heading" | "table-thead" | "table-tbody" | "table-row-divider" | "table-tfoot")[];
5892
+ type: string | string[];
5893
5893
  loading: boolean;
5894
5894
  loadingText: string;
5895
5895
  boilerplate: boolean;
@@ -5913,7 +5913,7 @@ declare const VSkeletonLoader: {
5913
5913
  default: string;
5914
5914
  };
5915
5915
  type: {
5916
- type: PropType<"button" | "article" | "table" | "image" | "text" | "table-row" | "list-item" | "sentences" | "heading" | "subtitle" | "divider" | "chip" | "avatar" | "actions" | "paragraph" | "card" | "card-avatar" | "date-picker" | "date-picker-options" | "date-picker-days" | "list-item-avatar" | "list-item-two-line" | "list-item-avatar-two-line" | "list-item-three-line" | "list-item-avatar-three-line" | "table-heading" | "table-thead" | "table-tbody" | "table-row-divider" | "table-tfoot" | ("button" | "article" | "table" | "image" | "text" | "table-row" | "list-item" | "sentences" | "heading" | "subtitle" | "divider" | "chip" | "avatar" | "actions" | "paragraph" | "card" | "card-avatar" | "date-picker" | "date-picker-options" | "date-picker-days" | "list-item-avatar" | "list-item-two-line" | "list-item-avatar-two-line" | "list-item-three-line" | "list-item-avatar-three-line" | "table-heading" | "table-thead" | "table-tbody" | "table-row-divider" | "table-tfoot")[]>;
5916
+ type: PropType<string | string[]>;
5917
5917
  default: string;
5918
5918
  };
5919
5919
  }, vue.ExtractPropTypes<{
@@ -5936,7 +5936,7 @@ declare const VSkeletonLoader: {
5936
5936
  default: string;
5937
5937
  };
5938
5938
  type: {
5939
- type: PropType<"button" | "article" | "table" | "image" | "text" | "table-row" | "list-item" | "sentences" | "heading" | "subtitle" | "divider" | "chip" | "avatar" | "actions" | "paragraph" | "card" | "card-avatar" | "date-picker" | "date-picker-options" | "date-picker-days" | "list-item-avatar" | "list-item-two-line" | "list-item-avatar-two-line" | "list-item-three-line" | "list-item-avatar-three-line" | "table-heading" | "table-thead" | "table-tbody" | "table-row-divider" | "table-tfoot" | ("button" | "article" | "table" | "image" | "text" | "table-row" | "list-item" | "sentences" | "heading" | "subtitle" | "divider" | "chip" | "avatar" | "actions" | "paragraph" | "card" | "card-avatar" | "date-picker" | "date-picker-options" | "date-picker-days" | "list-item-avatar" | "list-item-two-line" | "list-item-avatar-two-line" | "list-item-three-line" | "list-item-avatar-three-line" | "table-heading" | "table-thead" | "table-tbody" | "table-row-divider" | "table-tfoot")[]>;
5939
+ type: PropType<string | string[]>;
5940
5940
  default: string;
5941
5941
  };
5942
5942
  }>>;
@@ -1,7 +1,10 @@
1
- import { ref, watch } from 'vue';
1
+ // Composables
2
+ import { useProxiedModel } from "../../composables/proxiedModel.mjs"; // Utilities
2
3
  import { consoleError, consoleWarn, getObjectValueByPath } from "../../util/index.mjs";
3
- import { useProxiedModel } from "../../composables/proxiedModel.mjs";
4
- import en from "../en.mjs";
4
+ import { ref, shallowRef, watch } from 'vue';
5
+
6
+ // Locales
7
+ import en from "../en.mjs"; // Types
5
8
  const LANG_PREFIX = '$vuetify.';
6
9
  const replace = (str, params) => {
7
10
  return str.replace(/\{(\d+)\}/g, (match, index) => {
@@ -74,8 +77,8 @@ function createProvideFunction(state) {
74
77
  };
75
78
  }
76
79
  export function createVuetifyAdapter(options) {
77
- const current = ref(options?.locale ?? 'en');
78
- const fallback = ref(options?.fallback ?? 'en');
80
+ const current = shallowRef(options?.locale ?? 'en');
81
+ const fallback = shallowRef(options?.fallback ?? 'en');
79
82
  const messages = ref({
80
83
  en,
81
84
  ...options?.messages
@@ -1 +1 @@
1
- {"version":3,"file":"vuetify.mjs","names":["ref","watch","consoleError","consoleWarn","getObjectValueByPath","useProxiedModel","en","LANG_PREFIX","replace","str","params","match","index","String","createTranslateFunction","current","fallback","messages","key","_len","arguments","length","Array","_key","startsWith","shortKey","currentLocale","value","fallbackLocale","createNumberFunction","options","numberFormat","Intl","NumberFormat","format","useProvided","props","prop","provided","internal","v","createProvideFunction","state","name","t","n","provide","createVuetifyAdapter","locale"],"sources":["../../../src/locale/adapters/vuetify.ts"],"sourcesContent":["import { ref, watch } from 'vue'\nimport { consoleError, consoleWarn, getObjectValueByPath } from '@/util'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport en from '@/locale/en'\n\nimport type { Ref } from 'vue'\nimport type { LocaleInstance, LocaleMessages, LocaleOptions } from '@/composables/locale'\n\nconst LANG_PREFIX = '$vuetify.'\n\nconst replace = (str: string, params: unknown[]) => {\n return str.replace(/\\{(\\d+)\\}/g, (match: string, index: string) => {\n return String(params[+index])\n })\n}\n\nconst createTranslateFunction = (\n current: Ref<string>,\n fallback: Ref<string>,\n messages: Ref<LocaleMessages>,\n) => {\n return (key: string, ...params: unknown[]) => {\n if (!key.startsWith(LANG_PREFIX)) {\n return replace(key, params)\n }\n\n const shortKey = key.replace(LANG_PREFIX, '')\n const currentLocale = current.value && messages.value[current.value]\n const fallbackLocale = fallback.value && messages.value[fallback.value]\n\n let str: string = getObjectValueByPath(currentLocale, shortKey, null)\n\n if (!str) {\n consoleWarn(`Translation key \"${key}\" not found in \"${current.value}\", trying fallback locale`)\n str = getObjectValueByPath(fallbackLocale, shortKey, null)\n }\n\n if (!str) {\n consoleError(`Translation key \"${key}\" not found in fallback`)\n str = key\n }\n\n if (typeof str !== 'string') {\n consoleError(`Translation key \"${key}\" has a non-string value`)\n str = key\n }\n\n return replace(str, params)\n }\n}\n\nfunction createNumberFunction (current: Ref<string>, fallback: Ref<string>) {\n return (value: number, options?: Intl.NumberFormatOptions) => {\n const numberFormat = new Intl.NumberFormat([current.value, fallback.value], options)\n\n return numberFormat.format(value)\n }\n}\n\nfunction useProvided <T> (props: any, prop: string, provided: Ref<T>) {\n const internal = useProxiedModel(props, prop, props[prop] ?? provided.value)\n\n // TODO: Remove when defaultValue works\n internal.value = props[prop] ?? provided.value\n\n watch(provided, v => {\n if (props[prop] == null) {\n internal.value = provided.value\n }\n })\n\n return internal as Ref<T>\n}\n\nfunction createProvideFunction (state: { current: Ref<string>, fallback: Ref<string>, messages: Ref<LocaleMessages> }) {\n return (props: LocaleOptions): LocaleInstance => {\n const current = useProvided(props, 'locale', state.current)\n const fallback = useProvided(props, 'fallback', state.fallback)\n const messages = useProvided(props, 'messages', state.messages)\n\n return {\n name: 'vuetify',\n current,\n fallback,\n messages,\n t: createTranslateFunction(current, fallback, messages),\n n: createNumberFunction(current, fallback),\n provide: createProvideFunction({ current, fallback, messages }),\n }\n }\n}\n\nexport function createVuetifyAdapter (options?: LocaleOptions): LocaleInstance {\n const current = ref(options?.locale ?? 'en')\n const fallback = ref(options?.fallback ?? 'en')\n const messages = ref({ en, ...options?.messages })\n\n return {\n name: 'vuetify',\n current,\n fallback,\n messages,\n t: createTranslateFunction(current, fallback, messages),\n n: createNumberFunction(current, fallback),\n provide: createProvideFunction({ current, fallback, messages }),\n }\n}\n"],"mappings":"AAAA,SAASA,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SACvBC,YAAY,EAAEC,WAAW,EAAEC,oBAAoB;AAAA,SAC/CC,eAAe;AAAA,OACjBC,EAAE;AAKT,MAAMC,WAAW,GAAG,WAAW;AAE/B,MAAMC,OAAO,GAAGA,CAACC,GAAW,EAAEC,MAAiB,KAAK;EAClD,OAAOD,GAAG,CAACD,OAAO,CAAC,YAAY,EAAE,CAACG,KAAa,EAAEC,KAAa,KAAK;IACjE,OAAOC,MAAM,CAACH,MAAM,CAAC,CAACE,KAAK,CAAC,CAAC;EAC/B,CAAC,CAAC;AACJ,CAAC;AAED,MAAME,uBAAuB,GAAGA,CAC9BC,OAAoB,EACpBC,QAAqB,EACrBC,QAA6B,KAC1B;EACH,OAAO,UAACC,GAAW,EAA2B;IAAA,SAAAC,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAtBX,MAAM,OAAAY,KAAA,CAAAH,IAAA,OAAAA,IAAA,WAAAI,IAAA,MAAAA,IAAA,GAAAJ,IAAA,EAAAI,IAAA;MAANb,MAAM,CAAAa,IAAA,QAAAH,SAAA,CAAAG,IAAA;IAAA;IAC5B,IAAI,CAACL,GAAG,CAACM,UAAU,CAACjB,WAAW,CAAC,EAAE;MAChC,OAAOC,OAAO,CAACU,GAAG,EAAER,MAAM,CAAC;IAC7B;IAEA,MAAMe,QAAQ,GAAGP,GAAG,CAACV,OAAO,CAACD,WAAW,EAAE,EAAE,CAAC;IAC7C,MAAMmB,aAAa,GAAGX,OAAO,CAACY,KAAK,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AMC,QAAQ,GAAGjB,GAAG,CAAC;IAAEM,EAAE;IAAE,GAAGwB,OAAO,EAAEb;EAAS,CAAC,CAAC;EAElD,OAAO;IACL0B,IAAI,EAAE,SAAS;IACf5B,OAAO;IACPC,QAAQ;IACRC,QAAQ;IACR2B,CAAC,EAAE9B,uBAAuB,CAACC,OAAO,EAAEC,QAAQ,EAAEC,QAAQ,CAAC;IACvD4B,CAAC,EAAEhB,oBAAoB,CAACd,OAAO,EAAEC,QAAQ,CAAC;IAC1C8B,OAAO,EAAEL,qBAAqB,CAAC;MAAE1B,OAAO;MAAEC,QAAQ;MAAEC;IAAS,CAAC;EAChE,CAAC;AACH"}
1
+ {"version":3,"file":"vuetify.mjs","names":["useProxiedModel","consoleError","consoleWarn","getObjectValueByPath","ref","shallowRef","watch","en","LANG_PREFIX","replace","str","params","match","index","String","createTranslateFunction","current","fallback","messages","key","_len","arguments","length","Array","_key","startsWith","shortKey","currentLocale","value","fallbackLocale","createNumberFunction","options","numberFormat","Intl","NumberFormat","format","useProvided","props","prop","provided","internal","v","createProvideFunction","state","name","t","n","provide","createVuetifyAdapter","locale"],"sources":["../../../src/locale/adapters/vuetify.ts"],"sourcesContent":["// Composables\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { consoleError, consoleWarn, getObjectValueByPath } from '@/util'\nimport { ref, shallowRef, watch } from 'vue'\n\n// Locales\nimport en from '@/locale/en'\n\n// Types\nimport type { LocaleInstance, LocaleMessages, LocaleOptions } from '@/composables/locale'\nimport type { Ref } from 'vue'\n\nconst LANG_PREFIX = '$vuetify.'\n\nconst replace = (str: string, params: unknown[]) => {\n return str.replace(/\\{(\\d+)\\}/g, (match: string, index: string) => {\n return String(params[+index])\n })\n}\n\nconst createTranslateFunction = (\n current: Ref<string>,\n fallback: Ref<string>,\n messages: Ref<LocaleMessages>,\n) => {\n return (key: string, ...params: unknown[]) => {\n if (!key.startsWith(LANG_PREFIX)) {\n return replace(key, params)\n }\n\n const shortKey = key.replace(LANG_PREFIX, '')\n const currentLocale = current.value && messages.value[current.value]\n const fallbackLocale = fallback.value && messages.value[fallback.value]\n\n let str: string = getObjectValueByPath(currentLocale, shortKey, null)\n\n if (!str) {\n consoleWarn(`Translation key \"${key}\" not found in \"${current.value}\", trying fallback locale`)\n str = getObjectValueByPath(fallbackLocale, shortKey, null)\n }\n\n if (!str) {\n consoleError(`Translation key \"${key}\" not found in fallback`)\n str = key\n }\n\n if (typeof str !== 'string') {\n consoleError(`Translation key \"${key}\" has a non-string value`)\n str = key\n }\n\n return replace(str, params)\n }\n}\n\nfunction createNumberFunction (current: Ref<string>, fallback: Ref<string>) {\n return (value: number, options?: Intl.NumberFormatOptions) => {\n const numberFormat = new Intl.NumberFormat([current.value, fallback.value], options)\n\n return numberFormat.format(value)\n }\n}\n\nfunction useProvided <T> (props: any, prop: string, provided: Ref<T>) {\n const internal = useProxiedModel(props, prop, props[prop] ?? provided.value)\n\n // TODO: Remove when defaultValue works\n internal.value = props[prop] ?? provided.value\n\n watch(provided, v => {\n if (props[prop] == null) {\n internal.value = provided.value\n }\n })\n\n return internal as Ref<T>\n}\n\nfunction createProvideFunction (state: { current: Ref<string>, fallback: Ref<string>, messages: Ref<LocaleMessages> }) {\n return (props: LocaleOptions): LocaleInstance => {\n const current = useProvided(props, 'locale', state.current)\n const fallback = useProvided(props, 'fallback', state.fallback)\n const messages = useProvided(props, 'messages', state.messages)\n\n return {\n name: 'vuetify',\n current,\n fallback,\n messages,\n t: createTranslateFunction(current, fallback, messages),\n n: createNumberFunction(current, fallback),\n provide: createProvideFunction({ current, fallback, messages }),\n }\n }\n}\n\nexport function createVuetifyAdapter (options?: LocaleOptions): LocaleInstance {\n const current = shallowRef(options?.locale ?? 'en')\n const fallback = shallowRef(options?.fallback ?? 'en')\n const messages = ref({ en, ...options?.messages })\n\n return {\n name: 'vuetify',\n current,\n fallback,\n messages,\n t: createTranslateFunction(current, fallback, messages),\n n: createNumberFunction(current, fallback),\n provide: createProvideFunction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AAO,EAAEC,QAAQ,EAAEC,QAAQ,CAAC;IACvD4B,CAAC,EAAEhB,oBAAoB,CAACd,OAAO,EAAEC,QAAQ,CAAC;IAC1C8B,OAAO,EAAEL,qBAAqB,CAAC;MAAE1B,OAAO;MAAEC,QAAQ;MAAEC;IAAS,CAAC;EAChE,CAAC;AACH"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vuetify",
3
3
  "description": "Vue Material Component Framework",
4
- "version": "3.2.3",
4
+ "version": "3.2.4",
5
5
  "author": {
6
6
  "name": "John Leider",
7
7
  "email": "john@vuetifyjs.com"
@@ -191,5 +191,5 @@
191
191
  "attributes": "dist/json/attributes.json"
192
192
  },
193
193
  "web-types": "dist/json/web-types.json",
194
- "gitHead": "9a8bbef503380cd727e126bfb66827e1479bcbf4"
194
+ "gitHead": "edacda8a26564626880d2662fe62d79beb870d2c"
195
195
  }