@vuetify/nightly 3.9.0-beta.0-dev.2025-06-20 → 3.9.0-beta.0-dev.2025-06-24
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.
- package/CHANGELOG.md +87 -3
- package/dist/json/attributes.json +1523 -1523
- package/dist/json/importMap-labs.json +16 -16
- package/dist/json/importMap.json +182 -182
- package/dist/json/web-types.json +2950 -2950
- package/dist/vuetify-labs.cjs +45 -43
- package/dist/vuetify-labs.css +5095 -5099
- package/dist/vuetify-labs.d.ts +1294 -91
- package/dist/vuetify-labs.esm.js +45 -43
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +45 -43
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.cjs +45 -43
- package/dist/vuetify.cjs.map +1 -1
- package/dist/vuetify.css +2312 -2316
- package/dist/vuetify.d.ts +1294 -91
- package/dist/vuetify.esm.js +45 -43
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +45 -43
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +38 -38
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VBtn/VBtn.sass +3 -1
- package/lib/components/VCarousel/VCarousel.css +0 -1
- package/lib/components/VCarousel/VCarousel.js +1 -0
- package/lib/components/VCarousel/VCarousel.js.map +1 -1
- package/lib/components/VCarousel/VCarousel.sass +0 -1
- package/lib/components/VDatePicker/VDatePickerControls.css +1 -0
- package/lib/components/VDatePicker/VDatePickerControls.sass +1 -0
- package/lib/components/VDatePicker/VDatePickerMonth.css +3 -8
- package/lib/components/VDatePicker/VDatePickerMonth.js +8 -3
- package/lib/components/VDatePicker/VDatePickerMonth.js.map +1 -1
- package/lib/components/VDatePicker/VDatePickerMonth.sass +3 -8
- package/lib/components/VField/VField.js +2 -10
- package/lib/components/VField/VField.js.map +1 -1
- package/lib/components/VList/VList.js +1 -1
- package/lib/components/VList/VList.js.map +1 -1
- package/lib/components/VNumberInput/VNumberInput.js +4 -10
- package/lib/components/VNumberInput/VNumberInput.js.map +1 -1
- package/lib/components/VNumberInput/hold.js +4 -0
- package/lib/components/VNumberInput/hold.js.map +1 -1
- package/lib/components/VTimePicker/VTimePicker.css +1 -6
- package/lib/components/VTimePicker/VTimePicker.sass +1 -6
- package/lib/components/VTimePicker/VTimePickerClock.css +5 -4
- package/lib/components/VTimePicker/VTimePickerClock.sass +5 -4
- package/lib/components/VTimePicker/VTimePickerControls.css +2 -1
- package/lib/components/VTimePicker/VTimePickerControls.sass +2 -3
- package/lib/components/VTreeview/VTreeviewChildren.js +9 -5
- package/lib/components/VTreeview/VTreeviewChildren.js.map +1 -1
- package/lib/components/VTreeview/VTreeviewItem.d.ts +1206 -3
- package/lib/components/VTreeview/VTreeviewItem.js +8 -9
- package/lib/components/VTreeview/VTreeviewItem.js.map +1 -1
- package/lib/composables/calendar.d.ts +2 -0
- package/lib/composables/calendar.js +7 -3
- package/lib/composables/calendar.js.map +1 -1
- package/lib/entry-bundler.js +1 -1
- package/lib/framework.d.ts +62 -62
- package/lib/framework.js +1 -1
- package/lib/labs/VPicker/VPicker.css +4 -0
- package/lib/labs/VPicker/VPicker.sass +4 -0
- package/package.json +1 -1
@@ -7,6 +7,7 @@ import { VBtn } from "../VBtn/index.js";
|
|
7
7
|
import { VListItemAction } from "../VList/index.js";
|
8
8
|
import { makeVListItemProps, VListItem } from "../VList/VListItem.js";
|
9
9
|
import { VProgressCircular } from "../VProgressCircular/index.js"; // Composables
|
10
|
+
import { forwardRefs } from "../../composables/forwardRefs.js";
|
10
11
|
import { IconValue } from "../../composables/icons.js"; // Utilities
|
11
12
|
import { computed, inject, ref, toRaw } from 'vue';
|
12
13
|
import { genericComponent, omit, propsFactory, useRender } from "../../util/index.js"; // Types
|
@@ -64,7 +65,7 @@ export const VTreeviewItem = genericComponent()({
|
|
64
65
|
...slots,
|
65
66
|
prepend: hasPrepend ? slotProps => {
|
66
67
|
return _createElementVNode(_Fragment, null, [_createVNode(VListItemAction, {
|
67
|
-
"start":
|
68
|
+
"start": true
|
68
69
|
}, {
|
69
70
|
default: () => [props.toggleIcon ? _createVNode(VBtn, {
|
70
71
|
"density": "compact",
|
@@ -73,13 +74,11 @@ export const VTreeviewItem = genericComponent()({
|
|
73
74
|
"variant": "text",
|
74
75
|
"onClick": onClickAction
|
75
76
|
}, {
|
76
|
-
loader() {
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
}, null);
|
82
|
-
}
|
77
|
+
loader: () => _createVNode(VProgressCircular, {
|
78
|
+
"indeterminate": "disable-shrink",
|
79
|
+
"size": "20",
|
80
|
+
"width": "2"
|
81
|
+
}, null)
|
83
82
|
}) : _createElementVNode("div", {
|
84
83
|
"class": "v-treeview-item__level"
|
85
84
|
}, null)]
|
@@ -87,7 +86,7 @@ export const VTreeviewItem = genericComponent()({
|
|
87
86
|
} : undefined
|
88
87
|
});
|
89
88
|
});
|
90
|
-
return {};
|
89
|
+
return forwardRefs({}, vListItemRef);
|
91
90
|
}
|
92
91
|
});
|
93
92
|
//# sourceMappingURL=VTreeviewItem.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VTreeviewItem.js","names":["VBtn","VListItemAction","makeVListItemProps","VListItem","VProgressCircular","IconValue","computed","inject","ref","toRaw","genericComponent","omit","propsFactory","useRender","VTreeviewSymbol","makeVTreeviewItemProps","loading","Boolean","toggleIcon","slim","VTreeviewItem","name","props","emits","toggleExpand","value","setup","_ref","slots","emit","visibleIds","vListItemRef","isActivatableGroupActivator","root","activatable","isGroupActivator","vListItemRefIsClickable","link","isClickable","list","disabled","isFiltered","has","id","activateGroupActivator","e","activate","isActivated","onClickAction","preventDefault","stopPropagation","listItemProps","filterProps","hasPrepend","prepend","_createVNode","_mergeProps","class","onClick","slotProps","_createElementVNode","_Fragment","default","loader","undefined"],"sources":["../../../src/components/VTreeview/VTreeviewItem.tsx"],"sourcesContent":["// Styles\nimport './VTreeviewItem.sass'\n\n// Components\nimport { VBtn } from '@/components/VBtn'\nimport { VListItemAction } from '@/components/VList'\nimport { makeVListItemProps, VListItem } from '@/components/VList/VListItem'\nimport { VProgressCircular } from '@/components/VProgressCircular'\n\n// Composables\nimport { IconValue } from '@/composables/icons'\n\n// Utilities\nimport { computed, inject, ref, toRaw } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport { VTreeviewSymbol } from './shared'\nimport type { VListItemSlots } from '@/components/VList/VListItem'\n\nexport const makeVTreeviewItemProps = propsFactory({\n loading: Boolean,\n toggleIcon: IconValue,\n\n ...makeVListItemProps({ slim: true }),\n}, 'VTreeviewItem')\n\nexport const VTreeviewItem = genericComponent<VListItemSlots>()({\n name: 'VTreeviewItem',\n\n props: makeVTreeviewItemProps(),\n\n emits: {\n toggleExpand: (value: PointerEvent) => true,\n },\n\n setup (props, { slots, emit }) {\n const visibleIds = inject(VTreeviewSymbol, { visibleIds: ref() }).visibleIds\n\n const vListItemRef = ref<VListItem>()\n\n const isActivatableGroupActivator = computed(() =>\n (vListItemRef.value?.root.activatable.value) &&\n vListItemRef.value?.isGroupActivator\n )\n const vListItemRefIsClickable = computed(() => (\n vListItemRef.value?.link.isClickable.value ||\n (props.value != null && !!vListItemRef.value?.list)\n ))\n const isClickable = computed(() =>\n !props.disabled &&\n props.link !== false &&\n (props.link || vListItemRefIsClickable.value || isActivatableGroupActivator.value)\n )\n const isFiltered = computed(() => visibleIds.value && !visibleIds.value.has(toRaw(vListItemRef.value?.id)))\n\n function activateGroupActivator (e: MouseEvent | KeyboardEvent) {\n if (isClickable.value && isActivatableGroupActivator.value) {\n vListItemRef.value?.activate(!vListItemRef.value?.isActivated, e)\n }\n }\n\n function onClickAction (e: PointerEvent) {\n e.preventDefault()\n e.stopPropagation()\n emit('toggleExpand', e)\n }\n\n useRender(() => {\n const listItemProps = omit(VListItem.filterProps(props), ['onClick'])\n const hasPrepend = slots.prepend || props.toggleIcon\n\n return (\n <VListItem\n ref={ vListItemRef }\n { ...listItemProps }\n active={ vListItemRef.value?.isActivated }\n class={[\n 'v-treeview-item',\n {\n 'v-treeview-item--activatable-group-activator': isActivatableGroupActivator.value,\n 'v-treeview-item--filtered': isFiltered.value,\n },\n props.class,\n ]}\n ripple={ false }\n onClick={ props.onClick ?? activateGroupActivator }\n >\n {{\n ...slots,\n prepend: hasPrepend ? slotProps => {\n return (\n <>\n <VListItemAction start
|
1
|
+
{"version":3,"file":"VTreeviewItem.js","names":["VBtn","VListItemAction","makeVListItemProps","VListItem","VProgressCircular","forwardRefs","IconValue","computed","inject","ref","toRaw","genericComponent","omit","propsFactory","useRender","VTreeviewSymbol","makeVTreeviewItemProps","loading","Boolean","toggleIcon","slim","VTreeviewItem","name","props","emits","toggleExpand","value","setup","_ref","slots","emit","visibleIds","vListItemRef","isActivatableGroupActivator","root","activatable","isGroupActivator","vListItemRefIsClickable","link","isClickable","list","disabled","isFiltered","has","id","activateGroupActivator","e","activate","isActivated","onClickAction","preventDefault","stopPropagation","listItemProps","filterProps","hasPrepend","prepend","_createVNode","_mergeProps","class","onClick","slotProps","_createElementVNode","_Fragment","default","loader","undefined"],"sources":["../../../src/components/VTreeview/VTreeviewItem.tsx"],"sourcesContent":["// Styles\nimport './VTreeviewItem.sass'\n\n// Components\nimport { VBtn } from '@/components/VBtn'\nimport { VListItemAction } from '@/components/VList'\nimport { makeVListItemProps, VListItem } from '@/components/VList/VListItem'\nimport { VProgressCircular } from '@/components/VProgressCircular'\n\n// Composables\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { IconValue } from '@/composables/icons'\n\n// Utilities\nimport { computed, inject, ref, toRaw } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport { VTreeviewSymbol } from './shared'\nimport type { VListItemSlots } from '@/components/VList/VListItem'\n\nexport const makeVTreeviewItemProps = propsFactory({\n loading: Boolean,\n toggleIcon: IconValue,\n\n ...makeVListItemProps({ slim: true }),\n}, 'VTreeviewItem')\n\nexport const VTreeviewItem = genericComponent<VListItemSlots>()({\n name: 'VTreeviewItem',\n\n props: makeVTreeviewItemProps(),\n\n emits: {\n toggleExpand: (value: PointerEvent) => true,\n },\n\n setup (props, { slots, emit }) {\n const visibleIds = inject(VTreeviewSymbol, { visibleIds: ref() }).visibleIds\n\n const vListItemRef = ref<VListItem>()\n\n const isActivatableGroupActivator = computed(() =>\n (vListItemRef.value?.root.activatable.value) &&\n vListItemRef.value?.isGroupActivator\n )\n const vListItemRefIsClickable = computed(() => (\n vListItemRef.value?.link.isClickable.value ||\n (props.value != null && !!vListItemRef.value?.list)\n ))\n const isClickable = computed(() =>\n !props.disabled &&\n props.link !== false &&\n (props.link || vListItemRefIsClickable.value || isActivatableGroupActivator.value)\n )\n const isFiltered = computed(() => visibleIds.value && !visibleIds.value.has(toRaw(vListItemRef.value?.id)))\n\n function activateGroupActivator (e: MouseEvent | KeyboardEvent) {\n if (isClickable.value && isActivatableGroupActivator.value) {\n vListItemRef.value?.activate(!vListItemRef.value?.isActivated, e)\n }\n }\n\n function onClickAction (e: PointerEvent) {\n e.preventDefault()\n e.stopPropagation()\n emit('toggleExpand', e)\n }\n\n useRender(() => {\n const listItemProps = omit(VListItem.filterProps(props), ['onClick'])\n const hasPrepend = slots.prepend || props.toggleIcon\n\n return (\n <VListItem\n ref={ vListItemRef }\n { ...listItemProps }\n active={ vListItemRef.value?.isActivated }\n class={[\n 'v-treeview-item',\n {\n 'v-treeview-item--activatable-group-activator': isActivatableGroupActivator.value,\n 'v-treeview-item--filtered': isFiltered.value,\n },\n props.class,\n ]}\n ripple={ false }\n onClick={ props.onClick ?? activateGroupActivator }\n >\n {{\n ...slots,\n prepend: hasPrepend ? slotProps => {\n return (\n <>\n <VListItemAction start>\n { props.toggleIcon ? (\n <VBtn\n density=\"compact\"\n icon={ props.toggleIcon }\n loading={ props.loading }\n variant=\"text\"\n onClick={ onClickAction }\n >\n {{\n loader: () => (\n <VProgressCircular\n indeterminate=\"disable-shrink\"\n size=\"20\"\n width=\"2\"\n />\n ),\n }}\n </VBtn>\n ) : (\n <div class=\"v-treeview-item__level\" />\n )}\n </VListItemAction>\n\n { slots.prepend?.(slotProps) }\n </>\n )\n } : undefined,\n }}\n </VListItem>\n )\n })\n\n return forwardRefs({}, vListItemRef)\n },\n})\n\nexport type VTreeviewItem = InstanceType<typeof VTreeviewItem>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,IAAI;AAAA,SACJC,eAAe;AAAA,SACfC,kBAAkB,EAAEC,SAAS;AAAA,SAC7BC,iBAAiB,yCAE1B;AAAA,SACSC,WAAW;AAAA,SACXC,SAAS,sCAElB;AACA,SAASC,QAAQ,EAAEC,MAAM,EAAEC,GAAG,EAAEC,KAAK,QAAQ,KAAK;AAAA,SACzCC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,+BAExD;AAAA,SACSC,eAAe;AAGxB,OAAO,MAAMC,sBAAsB,GAAGH,YAAY,CAAC;EACjDI,OAAO,EAAEC,OAAO;EAChBC,UAAU,EAAEb,SAAS;EAErB,GAAGJ,kBAAkB,CAAC;IAAEkB,IAAI,EAAE;EAAK,CAAC;AACtC,CAAC,EAAE,eAAe,CAAC;AAEnB,OAAO,MAAMC,aAAa,GAAGV,gBAAgB,CAAiB,CAAC,CAAC;EAC9DW,IAAI,EAAE,eAAe;EAErBC,KAAK,EAAEP,sBAAsB,CAAC,CAAC;EAE/BQ,KAAK,EAAE;IACLC,YAAY,EAAGC,KAAmB,IAAK;EACzC,CAAC;EAEDC,KAAKA,CAAEJ,KAAK,EAAAK,IAAA,EAAmB;IAAA,IAAjB;MAAEC,KAAK;MAAEC;IAAK,CAAC,GAAAF,IAAA;IAC3B,MAAMG,UAAU,GAAGvB,MAAM,CAACO,eAAe,EAAE;MAAEgB,UAAU,EAAEtB,GAAG,CAAC;IAAE,CAAC,CAAC,CAACsB,UAAU;IAE5E,MAAMC,YAAY,GAAGvB,GAAG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,CAAC9B,KAAK,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;MACrE,MAAM+B,UAAU,GAAGzB,KAAK,CAAC0B,OAAO,IAAIhC,KAAK,CAACJ,UAAU;MAEpD,OAAAqC,YAAA,CAAArD,SAAA,EAAAsD,WAAA;QAAA,OAEUzB;MAAY,GACboB,aAAa;QAAA,UACTpB,YAAY,CAACN,KAAK,EAAEsB,WAAW;QAAA,SACjC,CACL,iBAAiB,EACjB;UACE,8CAA8C,EAAEf,2BAA2B,CAACP,KAAK;UACjF,2BAA2B,EAAEgB,UAAU,CAAChB;QAC1C,CAAC,EACDH,KAAK,CAACmC,KAAK,CACZ;QAAA,UACQ,KAAK;QAAA,WACJnC,KAAK,CAACoC,OAAO,IAAId;MAAsB;QAG/C,GAAGhB,KAAK;QACR0B,OAAO,EAAED,UAAU,GAAGM,SAAS,IAAI;UACjC,OAAAC,mBAAA,CAAAC,SAAA,SAAAN,YAAA,CAAAvD,eAAA;YAAA;UAAA;YAAA8D,OAAA,EAAAA,CAAA,MAGQxC,KAAK,CAACJ,UAAU,GAAAqC,YAAA,CAAAxD,IAAA;cAAA;cAAA,QAGPuB,KAAK,CAACJ,UAAU;cAAA,WACbI,KAAK,CAACN,OAAO;cAAA;cAAA,WAEbgC;YAAa;cAGrBe,MAAM,EAAEA,CAAA,KAAAR,YAAA,CAAApD,iBAAA;gBAAA;gBAAA;gBAAA;cAAA;YAMP,KAAAyD,mBAAA;cAAA;YAAA,QAKN;UAAA,IAGDhC,KAAK,CAAC0B,OAAO,GAAGK,SAAS,CAAC;QAGlC,CAAC,GAAGK;MAAS;IAIrB,CAAC,CAAC;IAEF,OAAO5D,WAAW,CAAC,CAAC,CAAC,EAAE2B,YAAY,CAAC;EACtC;AACF,CAAC,CAAC","ignoreList":[]}
|
@@ -12,6 +12,7 @@ export interface CalendarProps {
|
|
12
12
|
year: number | string | undefined;
|
13
13
|
weeksInMonth: 'dynamic' | 'static';
|
14
14
|
firstDayOfWeek: number | string | undefined;
|
15
|
+
weekdayFormat: 'long' | 'short' | 'narrow' | undefined;
|
15
16
|
'onUpdate:modelValue': ((value: unknown[]) => void) | undefined;
|
16
17
|
'onUpdate:month': ((value: number) => void) | undefined;
|
17
18
|
'onUpdate:year': ((value: number) => void) | undefined;
|
@@ -137,5 +138,6 @@ export declare function useCalendar(props: CalendarProps): {
|
|
137
138
|
};
|
138
139
|
weeksInMonth: import("vue").ComputedRef<unknown[][]>;
|
139
140
|
weekDays: import("vue").ComputedRef<number[]>;
|
141
|
+
weekdayLabels: import("vue").ComputedRef<string[]>;
|
140
142
|
weekNumbers: import("vue").ComputedRef<(number | null)[]>;
|
141
143
|
};
|
@@ -53,8 +53,11 @@ export function useCalendar(props) {
|
|
53
53
|
}, v => adapter.getMonth(v));
|
54
54
|
const weekDays = computed(() => {
|
55
55
|
const firstDayOfWeek = adapter.toJsDate(adapter.startOfWeek(adapter.date(), props.firstDayOfWeek)).getDay();
|
56
|
-
|
57
|
-
|
56
|
+
return props.weekdays.map(day => (day + firstDayOfWeek) % 7);
|
57
|
+
});
|
58
|
+
const weekdayLabels = computed(() => {
|
59
|
+
const labels = adapter.getWeekdays(props.firstDayOfWeek, props.weekdayFormat);
|
60
|
+
return weekDays.value.map(day => labels[day]);
|
58
61
|
});
|
59
62
|
const weeksInMonth = computed(() => {
|
60
63
|
const weeks = adapter.getWeekArray(month.value, props.firstDayOfWeek);
|
@@ -135,7 +138,7 @@ export function useCalendar(props) {
|
|
135
138
|
if (typeof props.allowedDates === 'function') {
|
136
139
|
return !props.allowedDates(date);
|
137
140
|
}
|
138
|
-
return
|
141
|
+
return false;
|
139
142
|
}
|
140
143
|
return {
|
141
144
|
displayValue,
|
@@ -145,6 +148,7 @@ export function useCalendar(props) {
|
|
145
148
|
model,
|
146
149
|
weeksInMonth,
|
147
150
|
weekDays,
|
151
|
+
weekdayLabels,
|
148
152
|
weekNumbers
|
149
153
|
};
|
150
154
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"calendar.js","names":["useDate","useProxiedModel","computed","propsFactory","wrapInArray","makeCalendarProps","allowedDates","Array","Function","disabled","type","Boolean","default","displayValue","modelValue","month","Number","String","max","min","showAdjacentMonths","year","weekdays","weeksInMonth","firstDayOfWeek","undefined","weekdayFormat","useCalendar","props","adapter","model","v","map","i","date","value","length","isArray","getYear","startOfYear","setYear","getMonth","startOfMonth","setMonth","weekDays","toJsDate","startOfWeek","getDay","day","weeks","getWeekArray","days","flat","daysInMonth","lastDay","week","push","addDays","genDays","today","filter","includes","index","isoDate","toISO","isAdjacent","isSameMonth","isStart","isSameDay","isEnd","endOfMonth","isSame","formatted","format","isDisabled","isHidden","isSelected","some","isToday","isWeekEnd","isWeekStart","localized","daysInWeek","weekNumbers","getWeek","isAfter","d"],"sources":["../../src/composables/calendar.ts"],"sourcesContent":["// Composables\nimport { useDate } from '@/composables/date/date'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed } from 'vue'\nimport { propsFactory, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\n// Types\nexport interface CalendarProps {\n allowedDates: unknown[] | ((date: unknown) => boolean) | undefined\n disabled: boolean\n displayValue?: unknown\n modelValue: unknown[] | undefined\n max: unknown\n min: unknown\n showAdjacentMonths: boolean\n month: number | string | undefined\n weekdays: number[]\n year: number | string | undefined\n weeksInMonth: 'dynamic' | 'static'\n firstDayOfWeek: number | string | undefined\n\n 'onUpdate:modelValue': ((value: unknown[]) => void) | undefined\n 'onUpdate:month': ((value: number) => void) | undefined\n 'onUpdate:year': ((value: number) => void) | undefined\n}\n\nexport type CalendarDay = {\n date: Date\n formatted: string\n isAdjacent: boolean\n isDisabled: boolean\n isEnd: boolean\n isHidden: boolean\n isSame: boolean\n isSelected: boolean\n isStart: boolean\n isToday: boolean\n isWeekEnd: boolean\n isWeekStart: boolean\n isoDate: string\n localized: string\n month: number\n year: number\n}\n\nexport type CalendarWeekdays = 0 | 1 | 2 | 3 | 4 | 5 | 6\n\n// Composables\nexport const makeCalendarProps = propsFactory({\n allowedDates: [Array, Function] as PropType<unknown[] | ((date: unknown) => boolean)>,\n disabled: {\n type: Boolean,\n default: null,\n },\n displayValue: null as any as PropType<unknown>,\n modelValue: Array as PropType<unknown[]>,\n month: [Number, String],\n max: null as any as PropType<unknown>,\n min: null as any as PropType<unknown>,\n showAdjacentMonths: Boolean,\n year: [Number, String],\n weekdays: {\n type: Array as PropType<CalendarWeekdays[]>,\n default: () => [0, 1, 2, 3, 4, 5, 6],\n },\n weeksInMonth: {\n type: String as PropType<'dynamic' | 'static'>,\n default: 'dynamic',\n },\n firstDayOfWeek: {\n type: [Number, String],\n default: undefined,\n },\n weekdayFormat: String as PropType<'long' | 'short' | 'narrow' | undefined>,\n}, 'calendar')\n\nexport function useCalendar (props: CalendarProps) {\n const adapter = useDate()\n const model = useProxiedModel(\n props,\n 'modelValue',\n [],\n v => wrapInArray(v).map(i => adapter.date(i)),\n )\n const displayValue = computed(() => {\n if (props.displayValue) return adapter.date(props.displayValue)\n if (model.value.length > 0) return adapter.date(model.value[0])\n if (props.min) return adapter.date(props.min)\n if (Array.isArray(props.allowedDates)) return adapter.date(props.allowedDates[0])\n\n return adapter.date()\n })\n\n const year = useProxiedModel(\n props,\n 'year',\n undefined,\n v => {\n const value = v != null ? Number(v) : adapter.getYear(displayValue.value)\n\n return adapter.startOfYear(adapter.setYear(adapter.date(), value))\n },\n v => adapter.getYear(v)\n )\n\n const month = useProxiedModel(\n props,\n 'month',\n undefined,\n v => {\n const value = v != null ? Number(v) : adapter.getMonth(displayValue.value)\n const date = adapter.setYear(adapter.startOfMonth(adapter.date()), adapter.getYear(year.value))\n\n return adapter.setMonth(date, value)\n },\n v => adapter.getMonth(v)\n )\n\n const weekDays = computed(() => {\n const firstDayOfWeek = adapter.toJsDate(adapter.startOfWeek(adapter.date(), props.firstDayOfWeek)).getDay()\n // Always generate all days, regardless of props.weekdays\n return [0, 1, 2, 3, 4, 5, 6].map(day => (day + firstDayOfWeek) % 7)\n })\n\n const weeksInMonth = computed(() => {\n const weeks = adapter.getWeekArray(month.value, props.firstDayOfWeek)\n\n const days = weeks.flat()\n\n // Make sure there's always 6 weeks in month (6 * 7 days)\n // if weeksInMonth is 'static'\n const daysInMonth = 6 * 7\n if (props.weeksInMonth === 'static' && days.length < daysInMonth) {\n const lastDay = days[days.length - 1]\n\n let week = []\n for (let day = 1; day <= daysInMonth - days.length; day++) {\n week.push(adapter.addDays(lastDay, day))\n\n if (day % 7 === 0) {\n weeks.push(week)\n week = []\n }\n }\n }\n\n return weeks\n })\n\n function genDays (days: Date[], today: Date): CalendarDay[] {\n return days.filter(date => {\n return weekDays.value.includes(adapter.toJsDate(date).getDay())\n }).map((date, index) => {\n const isoDate = adapter.toISO(date)\n const isAdjacent = !adapter.isSameMonth(date, month.value)\n const isStart = adapter.isSameDay(date, adapter.startOfMonth(month.value))\n const isEnd = adapter.isSameDay(date, adapter.endOfMonth(month.value))\n const isSame = adapter.isSameDay(date, month.value)\n\n return {\n date,\n formatted: adapter.format(date, 'keyboardDate'),\n isAdjacent,\n isDisabled: isDisabled(date),\n isEnd,\n isHidden: isAdjacent && !props.showAdjacentMonths,\n isSame,\n isSelected: model.value.some(value => adapter.isSameDay(date, value)),\n isStart,\n isToday: adapter.isSameDay(date, today),\n isWeekEnd: index % 7 === 6,\n isWeekStart: index % 7 === 0,\n isoDate,\n localized: adapter.format(date, 'dayOfMonth'),\n month: adapter.getMonth(date),\n year: adapter.getYear(date),\n }\n })\n }\n\n const daysInWeek = computed(() => {\n const lastDay = adapter.startOfWeek(displayValue.value, props.firstDayOfWeek)\n const week: Date[] = []\n for (let day = 0; day <= 6; day++) {\n week.push(adapter.addDays(lastDay, day) as Date)\n }\n\n const today = adapter.date() as Date\n\n return genDays(week as Date[], today as Date)\n })\n\n const daysInMonth = computed(() => {\n const days = weeksInMonth.value.flat() as Date[]\n const today = adapter.date() as Date\n\n return genDays(days as Date[], today)\n })\n\n const weekNumbers = computed(() => {\n return weeksInMonth.value.map(week => {\n return week.length ? adapter.getWeek(week[0], props.firstDayOfWeek) : null\n })\n })\n\n function isDisabled (value: unknown) {\n if (props.disabled) return true\n\n const date = adapter.date(value)\n\n if (props.min && adapter.isAfter(adapter.date(props.min), date)) return true\n if (props.max && adapter.isAfter(date, adapter.date(props.max))) return true\n\n if (Array.isArray(props.allowedDates) && props.allowedDates.length > 0) {\n return !props.allowedDates.some(d => adapter.isSameDay(adapter.date(d), date))\n }\n\n if (typeof props.allowedDates === 'function') {\n return !props.allowedDates(date)\n }\n\n return !props.weekdays.includes(adapter.toJsDate(date).getDay())\n }\n\n return {\n displayValue,\n daysInMonth,\n daysInWeek,\n genDays,\n model,\n weeksInMonth,\n weekDays,\n weekNumbers,\n }\n}\n"],"mappings":"AAAA;AAAA,SACSA,OAAO;AAAA,SACPC,eAAe,6BAExB;AACA,SAASC,QAAQ,QAAQ,KAAK;AAAA,SACrBC,YAAY,EAAEC,WAAW,4BAElC;AAGA;AAyCA;AACA,OAAO,MAAMC,iBAAiB,GAAGF,YAAY,CAAC;EAC5CG,YAAY,EAAE,CAACC,KAAK,EAAEC,QAAQ,CAAuD;EACrFC,QAAQ,EAAE;IACRC,IAAI,EAAEC,OAAO;IACbC,OAAO,EAAE;EACX,CAAC;EACDC,YAAY,EAAE,IAAgC;EAC9CC,UAAU,EAAEP,KAA4B;EACxCQ,KAAK,EAAE,CAACC,MAAM,EAAEC,MAAM,CAAC;EACvBC,GAAG,EAAE,IAAgC;EACrCC,GAAG,EAAE,IAAgC;EACrCC,kBAAkB,EAAET,OAAO;EAC3BU,IAAI,EAAE,CAACL,MAAM,EAAEC,MAAM,CAAC;EACtBK,QAAQ,EAAE;IACRZ,IAAI,EAAEH,KAAqC;IAC3CK,OAAO,EAAEA,CAAA,KAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;EACrC,CAAC;EACDW,YAAY,EAAE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AG,IAAIU,OAAO,CAACwD,OAAO,CAACxD,OAAO,CAACK,IAAI,CAACN,KAAK,CAACT,GAAG,CAAC,EAAEe,IAAI,CAAC,EAAE,OAAO,IAAI;IAC5E,IAAIN,KAAK,CAACV,GAAG,IAAIW,OAAO,CAACwD,OAAO,CAACnD,IAAI,EAAEL,OAAO,CAACK,IAAI,CAACN,KAAK,CAACV,GAAG,CAAC,CAAC,EAAE,OAAO,IAAI;IAE5E,IAAIX,KAAK,CAAC8B,OAAO,CAACT,KAAK,CAACtB,YAAY,CAAC,IAAIsB,KAAK,CAACtB,YAAY,CAAC8B,MAAM,GAAG,CAAC,EAAE;MACtE,OAAO,CAACR,KAAK,CAACtB,YAAY,CAACuE,IAAI,CAACS,CAAC,IAAIzD,OAAO,CAACuC,SAAS,CAACvC,OAAO,CAACK,IAAI,CAACoD,CAAC,CAAC,EAAEpD,IAAI,CAAC,CAAC;IAChF;IAEA,IAAI,OAAON,KAAK,CAACtB,YAAY,KAAK,UAAU,EAAE;MAC5C,OAAO,CAACsB,KAAK,CAACtB,YAAY,CAAC4B,IAAI,CAAC;IAClC;IAEA,OAAO,CAACN,KAAK,CAACN,QAAQ,CAACuC,QAAQ,CAAChC,OAAO,CAACgB,QAAQ,CAACX,IAAI,CAAC,CAACa,MAAM,CAAC,CAAC,CAAC;EAClE;EAEA,OAAO;IACLlC,YAAY;IACZwC,WAAW;IACX6B,UAAU;IACVxB,OAAO;IACP5B,KAAK;IACLP,YAAY;IACZqB,QAAQ;IACRuC;EACF,CAAC;AACH","ignoreList":[]}
|
1
|
+
{"version":3,"file":"calendar.js","names":["useDate","useProxiedModel","computed","propsFactory","wrapInArray","makeCalendarProps","allowedDates","Array","Function","disabled","type","Boolean","default","displayValue","modelValue","month","Number","String","max","min","showAdjacentMonths","year","weekdays","weeksInMonth","firstDayOfWeek","undefined","weekdayFormat","useCalendar","props","adapter","model","v","map","i","date","value","length","isArray","getYear","startOfYear","setYear","getMonth","startOfMonth","setMonth","weekDays","toJsDate","startOfWeek","getDay","day","weekdayLabels","labels","getWeekdays","weeks","getWeekArray","days","flat","daysInMonth","lastDay","week","push","addDays","genDays","today","filter","includes","index","isoDate","toISO","isAdjacent","isSameMonth","isStart","isSameDay","isEnd","endOfMonth","isSame","formatted","format","isDisabled","isHidden","isSelected","some","isToday","isWeekEnd","isWeekStart","localized","daysInWeek","weekNumbers","getWeek","isAfter","d"],"sources":["../../src/composables/calendar.ts"],"sourcesContent":["// Composables\nimport { useDate } from '@/composables/date/date'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed } from 'vue'\nimport { propsFactory, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\n\n// Types\nexport interface CalendarProps {\n allowedDates: unknown[] | ((date: unknown) => boolean) | undefined\n disabled: boolean\n displayValue?: unknown\n modelValue: unknown[] | undefined\n max: unknown\n min: unknown\n showAdjacentMonths: boolean\n month: number | string | undefined\n weekdays: number[]\n year: number | string | undefined\n weeksInMonth: 'dynamic' | 'static'\n firstDayOfWeek: number | string | undefined\n weekdayFormat: 'long' | 'short' | 'narrow' | undefined\n\n 'onUpdate:modelValue': ((value: unknown[]) => void) | undefined\n 'onUpdate:month': ((value: number) => void) | undefined\n 'onUpdate:year': ((value: number) => void) | undefined\n}\n\nexport type CalendarDay = {\n date: Date\n formatted: string\n isAdjacent: boolean\n isDisabled: boolean\n isEnd: boolean\n isHidden: boolean\n isSame: boolean\n isSelected: boolean\n isStart: boolean\n isToday: boolean\n isWeekEnd: boolean\n isWeekStart: boolean\n isoDate: string\n localized: string\n month: number\n year: number\n}\n\nexport type CalendarWeekdays = 0 | 1 | 2 | 3 | 4 | 5 | 6\n\n// Composables\nexport const makeCalendarProps = propsFactory({\n allowedDates: [Array, Function] as PropType<unknown[] | ((date: unknown) => boolean)>,\n disabled: {\n type: Boolean,\n default: null,\n },\n displayValue: null as any as PropType<unknown>,\n modelValue: Array as PropType<unknown[]>,\n month: [Number, String],\n max: null as any as PropType<unknown>,\n min: null as any as PropType<unknown>,\n showAdjacentMonths: Boolean,\n year: [Number, String],\n weekdays: {\n type: Array as PropType<CalendarWeekdays[]>,\n default: () => [0, 1, 2, 3, 4, 5, 6],\n },\n weeksInMonth: {\n type: String as PropType<'dynamic' | 'static'>,\n default: 'dynamic',\n },\n firstDayOfWeek: {\n type: [Number, String],\n default: undefined,\n },\n weekdayFormat: String as PropType<'long' | 'short' | 'narrow' | undefined>,\n}, 'calendar')\n\nexport function useCalendar (props: CalendarProps) {\n const adapter = useDate()\n const model = useProxiedModel(\n props,\n 'modelValue',\n [],\n v => wrapInArray(v).map(i => adapter.date(i)),\n )\n const displayValue = computed(() => {\n if (props.displayValue) return adapter.date(props.displayValue)\n if (model.value.length > 0) return adapter.date(model.value[0])\n if (props.min) return adapter.date(props.min)\n if (Array.isArray(props.allowedDates)) return adapter.date(props.allowedDates[0])\n\n return adapter.date()\n })\n\n const year = useProxiedModel(\n props,\n 'year',\n undefined,\n v => {\n const value = v != null ? Number(v) : adapter.getYear(displayValue.value)\n\n return adapter.startOfYear(adapter.setYear(adapter.date(), value))\n },\n v => adapter.getYear(v)\n )\n\n const month = useProxiedModel(\n props,\n 'month',\n undefined,\n v => {\n const value = v != null ? Number(v) : adapter.getMonth(displayValue.value)\n const date = adapter.setYear(adapter.startOfMonth(adapter.date()), adapter.getYear(year.value))\n\n return adapter.setMonth(date, value)\n },\n v => adapter.getMonth(v)\n )\n\n const weekDays = computed(() => {\n const firstDayOfWeek = adapter.toJsDate(adapter.startOfWeek(adapter.date(), props.firstDayOfWeek)).getDay()\n return props.weekdays.map(day => (day + firstDayOfWeek) % 7)\n })\n\n const weekdayLabels = computed(() => {\n const labels = adapter.getWeekdays(props.firstDayOfWeek, props.weekdayFormat)\n\n return weekDays.value.map(day => labels[day])\n })\n\n const weeksInMonth = computed(() => {\n const weeks = adapter.getWeekArray(month.value, props.firstDayOfWeek)\n\n const days = weeks.flat()\n\n // Make sure there's always 6 weeks in month (6 * 7 days)\n // if weeksInMonth is 'static'\n const daysInMonth = 6 * 7\n if (props.weeksInMonth === 'static' && days.length < daysInMonth) {\n const lastDay = days[days.length - 1]\n\n let week = []\n for (let day = 1; day <= daysInMonth - days.length; day++) {\n week.push(adapter.addDays(lastDay, day))\n\n if (day % 7 === 0) {\n weeks.push(week)\n week = []\n }\n }\n }\n\n return weeks\n })\n\n function genDays (days: Date[], today: Date): CalendarDay[] {\n return days.filter(date => {\n return weekDays.value.includes(adapter.toJsDate(date).getDay())\n }).map((date, index) => {\n const isoDate = adapter.toISO(date)\n const isAdjacent = !adapter.isSameMonth(date, month.value)\n const isStart = adapter.isSameDay(date, adapter.startOfMonth(month.value))\n const isEnd = adapter.isSameDay(date, adapter.endOfMonth(month.value))\n const isSame = adapter.isSameDay(date, month.value)\n\n return {\n date,\n formatted: adapter.format(date, 'keyboardDate'),\n isAdjacent,\n isDisabled: isDisabled(date),\n isEnd,\n isHidden: isAdjacent && !props.showAdjacentMonths,\n isSame,\n isSelected: model.value.some(value => adapter.isSameDay(date, value)),\n isStart,\n isToday: adapter.isSameDay(date, today),\n isWeekEnd: index % 7 === 6,\n isWeekStart: index % 7 === 0,\n isoDate,\n localized: adapter.format(date, 'dayOfMonth'),\n month: adapter.getMonth(date),\n year: adapter.getYear(date),\n }\n })\n }\n\n const daysInWeek = computed(() => {\n const lastDay = adapter.startOfWeek(displayValue.value, props.firstDayOfWeek)\n const week: Date[] = []\n for (let day = 0; day <= 6; day++) {\n week.push(adapter.addDays(lastDay, day) as Date)\n }\n\n const today = adapter.date() as Date\n\n return genDays(week as Date[], today as Date)\n })\n\n const daysInMonth = computed(() => {\n const days = weeksInMonth.value.flat() as Date[]\n const today = adapter.date() as Date\n\n return genDays(days as Date[], today)\n })\n\n const weekNumbers = computed(() => {\n return weeksInMonth.value.map(week => {\n return week.length ? adapter.getWeek(week[0], props.firstDayOfWeek) : null\n })\n })\n\n function isDisabled (value: unknown) {\n if (props.disabled) return true\n\n const date = adapter.date(value)\n\n if (props.min && adapter.isAfter(adapter.date(props.min), date)) return true\n if (props.max && adapter.isAfter(date, adapter.date(props.max))) return true\n\n if (Array.isArray(props.allowedDates) && props.allowedDates.length > 0) {\n return !props.allowedDates.some(d => adapter.isSameDay(adapter.date(d), date))\n }\n\n if (typeof props.allowedDates === 'function') {\n return !props.allowedDates(date)\n }\n\n return false\n }\n\n return {\n displayValue,\n daysInMonth,\n daysInWeek,\n genDays,\n model,\n weeksInMonth,\n weekDays,\n weekdayLabels,\n weekNumbers,\n }\n}\n"],"mappings":"AAAA;AAAA,SACSA,OAAO;AAAA,SACPC,eAAe,6BAExB;AACA,SAASC,QAAQ,QAAQ,KAAK;AAAA,SACrBC,YAAY,EAAEC,WAAW,4BAElC;AAGA;AA0CA;AACA,OAAO,MAAMC,iBAAiB,GAAGF,YAAY,CAAC;EAC5CG,YAAY,EAAE,CAACC,KAAK,EAAEC,QAAQ,CAAuD;EACrFC,QAAQ,EAAE;IACRC,IAAI,EAAEC,OAAO;IACbC,OAAO,EAAE;EACX,CAAC;EACDC,YAAY,EAAE,IAAgC;EAC9CC,UAAU,EAAEP,KAA4B;EACxCQ,KAAK,EAAE,CAACC,MAAM,EAAEC,MAAM,CAAC;EACvBC,GAAG,EAAE,IAAgC;EACrCC,GAAG,EAAE,IAAgC;EACrCC,kBAAkB,EAAET,OAAO;EAC3BU,IAAI,EAAE,CAACL,MAAM,EAAEC,MAAM,CAAC;EACtBK,QAAQ,EAAE;IACRZ,IAAI,EAAEH,KAAqC;IAC3CK,OAAO,EAAEA,CAAA,KAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;EACrC,CAAC;EACDW,YAAY,EAAE;IACZb,IAAI,EAAEO,MAAwC;IAC9CL,OAAO,EAAE;EACX,CAAC;EACDY,cAAc,EAAE;IACdd,IAAI,EAAE,CAACM,MAAM,EAAEC,MAAM,CAAC;IACtBL,OAAO,EAAEa;EACX,CAAC;E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AACK,IAAI,CAACC,KAAK,CAAC;IAEhC,IAAIP,KAAK,CAACT,GAAG,IAAIU,OAAO,CAAC2D,OAAO,CAAC3D,OAAO,CAACK,IAAI,CAACN,KAAK,CAACT,GAAG,CAAC,EAAEe,IAAI,CAAC,EAAE,OAAO,IAAI;IAC5E,IAAIN,KAAK,CAACV,GAAG,IAAIW,OAAO,CAAC2D,OAAO,CAACtD,IAAI,EAAEL,OAAO,CAACK,IAAI,CAACN,KAAK,CAACV,GAAG,CAAC,CAAC,EAAE,OAAO,IAAI;IAE5E,IAAIX,KAAK,CAAC8B,OAAO,CAACT,KAAK,CAACtB,YAAY,CAAC,IAAIsB,KAAK,CAACtB,YAAY,CAAC8B,MAAM,GAAG,CAAC,EAAE;MACtE,OAAO,CAACR,KAAK,CAACtB,YAAY,CAAC0E,IAAI,CAACS,CAAC,IAAI5D,OAAO,CAAC0C,SAAS,CAAC1C,OAAO,CAACK,IAAI,CAACuD,CAAC,CAAC,EAAEvD,IAAI,CAAC,CAAC;IAChF;IAEA,IAAI,OAAON,KAAK,CAACtB,YAAY,KAAK,UAAU,EAAE;MAC5C,OAAO,CAACsB,KAAK,CAACtB,YAAY,CAAC4B,IAAI,CAAC;IAClC;IAEA,OAAO,KAAK;EACd;EAEA,OAAO;IACLrB,YAAY;IACZ2C,WAAW;IACX6B,UAAU;IACVxB,OAAO;IACP/B,KAAK;IACLP,YAAY;IACZqB,QAAQ;IACRK,aAAa;IACbqC;EACF,CAAC;AACH","ignoreList":[]}
|
package/lib/entry-bundler.js
CHANGED
@@ -16,7 +16,7 @@ export const createVuetify = function () {
|
|
16
16
|
...options
|
17
17
|
});
|
18
18
|
};
|
19
|
-
export const version = "3.9.0-beta.0-dev.2025-06-
|
19
|
+
export const version = "3.9.0-beta.0-dev.2025-06-24";
|
20
20
|
createVuetify.version = version;
|
21
21
|
export { blueprints, components, directives };
|
22
22
|
export * from "./composables/index.js";
|
package/lib/framework.d.ts
CHANGED
@@ -2556,74 +2556,72 @@ declare module 'vue' {
|
|
2556
2556
|
VApp: typeof import('vuetify/components')['VApp']
|
2557
2557
|
VAlert: typeof import('vuetify/components')['VAlert']
|
2558
2558
|
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
2559
|
-
|
2559
|
+
VBanner: typeof import('vuetify/components')['VBanner']
|
2560
|
+
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
2561
|
+
VBannerText: typeof import('vuetify/components')['VBannerText']
|
2562
|
+
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
2560
2563
|
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
2561
|
-
|
2562
|
-
VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
|
2563
|
-
VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
|
2564
|
+
VAvatar: typeof import('vuetify/components')['VAvatar']
|
2564
2565
|
VBadge: typeof import('vuetify/components')['VBadge']
|
2565
2566
|
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
2566
|
-
VBtn: typeof import('vuetify/components')['VBtn']
|
2567
|
-
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
2568
|
-
VCarousel: typeof import('vuetify/components')['VCarousel']
|
2569
|
-
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
2570
2567
|
VBreadcrumbs: typeof import('vuetify/components')['VBreadcrumbs']
|
2571
2568
|
VBreadcrumbsItem: typeof import('vuetify/components')['VBreadcrumbsItem']
|
2572
2569
|
VBreadcrumbsDivider: typeof import('vuetify/components')['VBreadcrumbsDivider']
|
2573
2570
|
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
2574
|
-
VBanner: typeof import('vuetify/components')['VBanner']
|
2575
|
-
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
2576
|
-
VBannerText: typeof import('vuetify/components')['VBannerText']
|
2577
|
-
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
2578
|
-
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
2579
|
-
VChip: typeof import('vuetify/components')['VChip']
|
2580
|
-
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
2581
2571
|
VCard: typeof import('vuetify/components')['VCard']
|
2582
2572
|
VCardActions: typeof import('vuetify/components')['VCardActions']
|
2583
2573
|
VCardItem: typeof import('vuetify/components')['VCardItem']
|
2584
2574
|
VCardSubtitle: typeof import('vuetify/components')['VCardSubtitle']
|
2585
2575
|
VCardText: typeof import('vuetify/components')['VCardText']
|
2586
2576
|
VCardTitle: typeof import('vuetify/components')['VCardTitle']
|
2587
|
-
VCombobox: typeof import('vuetify/components')['VCombobox']
|
2588
2577
|
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
2578
|
+
VBtn: typeof import('vuetify/components')['VBtn']
|
2579
|
+
VCarousel: typeof import('vuetify/components')['VCarousel']
|
2580
|
+
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
2581
|
+
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
2582
|
+
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
2583
|
+
VChip: typeof import('vuetify/components')['VChip']
|
2584
|
+
VCode: typeof import('vuetify/components')['VCode']
|
2589
2585
|
VColorPicker: typeof import('vuetify/components')['VColorPicker']
|
2590
2586
|
VCounter: typeof import('vuetify/components')['VCounter']
|
2591
|
-
|
2592
|
-
VDataTable: typeof import('vuetify/components')['VDataTable']
|
2593
|
-
VDataTableHeaders: typeof import('vuetify/components')['VDataTableHeaders']
|
2594
|
-
VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
|
2595
|
-
VDataTableRows: typeof import('vuetify/components')['VDataTableRows']
|
2596
|
-
VDataTableRow: typeof import('vuetify/components')['VDataTableRow']
|
2597
|
-
VDataTableVirtual: typeof import('vuetify/components')['VDataTableVirtual']
|
2598
|
-
VDataTableServer: typeof import('vuetify/components')['VDataTableServer']
|
2599
|
-
VDialog: typeof import('vuetify/components')['VDialog']
|
2587
|
+
VCombobox: typeof import('vuetify/components')['VCombobox']
|
2600
2588
|
VDatePicker: typeof import('vuetify/components')['VDatePicker']
|
2601
2589
|
VDatePickerControls: typeof import('vuetify/components')['VDatePickerControls']
|
2602
2590
|
VDatePickerHeader: typeof import('vuetify/components')['VDatePickerHeader']
|
2603
2591
|
VDatePickerMonth: typeof import('vuetify/components')['VDatePickerMonth']
|
2604
2592
|
VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
|
2605
2593
|
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
2594
|
+
VDialog: typeof import('vuetify/components')['VDialog']
|
2606
2595
|
VDivider: typeof import('vuetify/components')['VDivider']
|
2596
|
+
VDataTable: typeof import('vuetify/components')['VDataTable']
|
2597
|
+
VDataTableHeaders: typeof import('vuetify/components')['VDataTableHeaders']
|
2598
|
+
VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
|
2599
|
+
VDataTableRows: typeof import('vuetify/components')['VDataTableRows']
|
2600
|
+
VDataTableRow: typeof import('vuetify/components')['VDataTableRow']
|
2601
|
+
VDataTableVirtual: typeof import('vuetify/components')['VDataTableVirtual']
|
2602
|
+
VDataTableServer: typeof import('vuetify/components')['VDataTableServer']
|
2603
|
+
VField: typeof import('vuetify/components')['VField']
|
2604
|
+
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
2605
|
+
VFab: typeof import('vuetify/components')['VFab']
|
2606
|
+
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
2607
|
+
VFooter: typeof import('vuetify/components')['VFooter']
|
2608
|
+
VImg: typeof import('vuetify/components')['VImg']
|
2607
2609
|
VExpansionPanels: typeof import('vuetify/components')['VExpansionPanels']
|
2608
2610
|
VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
|
2609
2611
|
VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
|
2610
2612
|
VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
|
2611
|
-
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
2612
|
-
VFab: typeof import('vuetify/components')['VFab']
|
2613
|
-
VField: typeof import('vuetify/components')['VField']
|
2614
|
-
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
2615
|
-
VFooter: typeof import('vuetify/components')['VFooter']
|
2616
2613
|
VFileInput: typeof import('vuetify/components')['VFileInput']
|
2617
|
-
VImg: typeof import('vuetify/components')['VImg']
|
2618
|
-
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
2619
2614
|
VIcon: typeof import('vuetify/components')['VIcon']
|
2620
2615
|
VComponentIcon: typeof import('vuetify/components')['VComponentIcon']
|
2621
2616
|
VSvgIcon: typeof import('vuetify/components')['VSvgIcon']
|
2622
2617
|
VLigatureIcon: typeof import('vuetify/components')['VLigatureIcon']
|
2623
2618
|
VClassIcon: typeof import('vuetify/components')['VClassIcon']
|
2619
|
+
VInput: typeof import('vuetify/components')['VInput']
|
2620
|
+
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
2624
2621
|
VKbd: typeof import('vuetify/components')['VKbd']
|
2622
|
+
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
2623
|
+
VItem: typeof import('vuetify/components')['VItem']
|
2625
2624
|
VLabel: typeof import('vuetify/components')['VLabel']
|
2626
|
-
VInput: typeof import('vuetify/components')['VInput']
|
2627
2625
|
VList: typeof import('vuetify/components')['VList']
|
2628
2626
|
VListGroup: typeof import('vuetify/components')['VListGroup']
|
2629
2627
|
VListImg: typeof import('vuetify/components')['VListImg']
|
@@ -2633,58 +2631,59 @@ declare module 'vue' {
|
|
2633
2631
|
VListItemSubtitle: typeof import('vuetify/components')['VListItemSubtitle']
|
2634
2632
|
VListItemTitle: typeof import('vuetify/components')['VListItemTitle']
|
2635
2633
|
VListSubheader: typeof import('vuetify/components')['VListSubheader']
|
2636
|
-
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
2637
|
-
VItem: typeof import('vuetify/components')['VItem']
|
2638
|
-
VMain: typeof import('vuetify/components')['VMain']
|
2639
2634
|
VMessages: typeof import('vuetify/components')['VMessages']
|
2635
|
+
VMain: typeof import('vuetify/components')['VMain']
|
2636
|
+
VOverlay: typeof import('vuetify/components')['VOverlay']
|
2640
2637
|
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
2638
|
+
VNumberInput: typeof import('vuetify/components')['VNumberInput']
|
2641
2639
|
VMenu: typeof import('vuetify/components')['VMenu']
|
2642
|
-
VOverlay: typeof import('vuetify/components')['VOverlay']
|
2643
2640
|
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
|
2644
2641
|
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
2645
2642
|
VPagination: typeof import('vuetify/components')['VPagination']
|
2646
2643
|
VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
|
2647
|
-
VNumberInput: typeof import('vuetify/components')['VNumberInput']
|
2648
|
-
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
2649
2644
|
VRating: typeof import('vuetify/components')['VRating']
|
2650
|
-
|
2651
|
-
VSheet: typeof import('vuetify/components')['VSheet']
|
2645
|
+
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
2652
2646
|
VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
|
2653
|
-
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
2654
2647
|
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
2655
|
-
VSnackbar: typeof import('vuetify/components')['VSnackbar']
|
2656
2648
|
VSlideGroup: typeof import('vuetify/components')['VSlideGroup']
|
2657
2649
|
VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
|
2650
|
+
VSlider: typeof import('vuetify/components')['VSlider']
|
2651
|
+
VSelect: typeof import('vuetify/components')['VSelect']
|
2652
|
+
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
2653
|
+
VSnackbar: typeof import('vuetify/components')['VSnackbar']
|
2658
2654
|
VStepper: typeof import('vuetify/components')['VStepper']
|
2659
2655
|
VStepperActions: typeof import('vuetify/components')['VStepperActions']
|
2660
2656
|
VStepperHeader: typeof import('vuetify/components')['VStepperHeader']
|
2661
2657
|
VStepperItem: typeof import('vuetify/components')['VStepperItem']
|
2662
2658
|
VStepperWindow: typeof import('vuetify/components')['VStepperWindow']
|
2663
2659
|
VStepperWindowItem: typeof import('vuetify/components')['VStepperWindowItem']
|
2664
|
-
|
2660
|
+
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
2665
2661
|
VSwitch: typeof import('vuetify/components')['VSwitch']
|
2662
|
+
VTable: typeof import('vuetify/components')['VTable']
|
2666
2663
|
VTab: typeof import('vuetify/components')['VTab']
|
2667
2664
|
VTabs: typeof import('vuetify/components')['VTabs']
|
2668
2665
|
VTabsWindow: typeof import('vuetify/components')['VTabsWindow']
|
2669
2666
|
VTabsWindowItem: typeof import('vuetify/components')['VTabsWindowItem']
|
2670
|
-
VTable: typeof import('vuetify/components')['VTable']
|
2671
|
-
VSystemBar: typeof import('vuetify/components')['VSystemBar']
|
2672
2667
|
VTextField: typeof import('vuetify/components')['VTextField']
|
2673
2668
|
VTextarea: typeof import('vuetify/components')['VTextarea']
|
2674
|
-
VTimeline: typeof import('vuetify/components')['VTimeline']
|
2675
|
-
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
2676
2669
|
VToolbar: typeof import('vuetify/components')['VToolbar']
|
2677
2670
|
VToolbarTitle: typeof import('vuetify/components')['VToolbarTitle']
|
2678
2671
|
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
2679
|
-
VTreeview: typeof import('vuetify/components')['VTreeview']
|
2680
|
-
VTreeviewItem: typeof import('vuetify/components')['VTreeviewItem']
|
2681
|
-
VTreeviewGroup: typeof import('vuetify/components')['VTreeviewGroup']
|
2682
2672
|
VTimePicker: typeof import('vuetify/components')['VTimePicker']
|
2683
2673
|
VTimePickerClock: typeof import('vuetify/components')['VTimePickerClock']
|
2684
2674
|
VTimePickerControls: typeof import('vuetify/components')['VTimePickerControls']
|
2675
|
+
VTimeline: typeof import('vuetify/components')['VTimeline']
|
2676
|
+
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
2685
2677
|
VTooltip: typeof import('vuetify/components')['VTooltip']
|
2678
|
+
VTreeview: typeof import('vuetify/components')['VTreeview']
|
2679
|
+
VTreeviewItem: typeof import('vuetify/components')['VTreeviewItem']
|
2680
|
+
VTreeviewGroup: typeof import('vuetify/components')['VTreeviewGroup']
|
2681
|
+
VAppBar: typeof import('vuetify/components')['VAppBar']
|
2682
|
+
VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
|
2683
|
+
VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
|
2686
2684
|
VWindow: typeof import('vuetify/components')['VWindow']
|
2687
2685
|
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
2686
|
+
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
2688
2687
|
VConfirmEdit: typeof import('vuetify/components')['VConfirmEdit']
|
2689
2688
|
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
2690
2689
|
VDefaultsProvider: typeof import('vuetify/components')['VDefaultsProvider']
|
@@ -2694,20 +2693,19 @@ declare module 'vue' {
|
|
2694
2693
|
VRow: typeof import('vuetify/components')['VRow']
|
2695
2694
|
VSpacer: typeof import('vuetify/components')['VSpacer']
|
2696
2695
|
VHover: typeof import('vuetify/components')['VHover']
|
2697
|
-
VLazy: typeof import('vuetify/components')['VLazy']
|
2698
2696
|
VLayout: typeof import('vuetify/components')['VLayout']
|
2699
2697
|
VLayoutItem: typeof import('vuetify/components')['VLayoutItem']
|
2700
|
-
|
2698
|
+
VLazy: typeof import('vuetify/components')['VLazy']
|
2701
2699
|
VNoSsr: typeof import('vuetify/components')['VNoSsr']
|
2702
|
-
VRadio: typeof import('vuetify/components')['VRadio']
|
2703
2700
|
VParallax: typeof import('vuetify/components')['VParallax']
|
2704
|
-
|
2705
|
-
|
2701
|
+
VLocaleProvider: typeof import('vuetify/components')['VLocaleProvider']
|
2702
|
+
VRadio: typeof import('vuetify/components')['VRadio']
|
2706
2703
|
VSparkline: typeof import('vuetify/components')['VSparkline']
|
2707
2704
|
VSnackbarQueue: typeof import('vuetify/components')['VSnackbarQueue']
|
2708
2705
|
VSpeedDial: typeof import('vuetify/components')['VSpeedDial']
|
2709
|
-
|
2706
|
+
VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
|
2710
2707
|
VValidation: typeof import('vuetify/components')['VValidation']
|
2708
|
+
VThemeProvider: typeof import('vuetify/components')['VThemeProvider']
|
2711
2709
|
VVirtualScroll: typeof import('vuetify/components')['VVirtualScroll']
|
2712
2710
|
VFabTransition: typeof import('vuetify/components')['VFabTransition']
|
2713
2711
|
VDialogBottomTransition: typeof import('vuetify/components')['VDialogBottomTransition']
|
@@ -2725,24 +2723,26 @@ declare module 'vue' {
|
|
2725
2723
|
VExpandTransition: typeof import('vuetify/components')['VExpandTransition']
|
2726
2724
|
VExpandXTransition: typeof import('vuetify/components')['VExpandXTransition']
|
2727
2725
|
VDialogTransition: typeof import('vuetify/components')['VDialogTransition']
|
2726
|
+
VResponsive: typeof import('vuetify/components')['VResponsive']
|
2727
|
+
VSheet: typeof import('vuetify/components')['VSheet']
|
2728
|
+
VFileUpload: typeof import('vuetify/labs/components')['VFileUpload']
|
2729
|
+
VFileUploadItem: typeof import('vuetify/labs/components')['VFileUploadItem']
|
2728
2730
|
VCalendar: typeof import('vuetify/labs/components')['VCalendar']
|
2729
2731
|
VCalendarDay: typeof import('vuetify/labs/components')['VCalendarDay']
|
2730
2732
|
VCalendarHeader: typeof import('vuetify/labs/components')['VCalendarHeader']
|
2731
2733
|
VCalendarInterval: typeof import('vuetify/labs/components')['VCalendarInterval']
|
2732
2734
|
VCalendarIntervalEvent: typeof import('vuetify/labs/components')['VCalendarIntervalEvent']
|
2733
2735
|
VCalendarMonthDay: typeof import('vuetify/labs/components')['VCalendarMonthDay']
|
2734
|
-
|
2735
|
-
VFileUpload: typeof import('vuetify/labs/components')['VFileUpload']
|
2736
|
-
VFileUploadItem: typeof import('vuetify/labs/components')['VFileUploadItem']
|
2736
|
+
VColorInput: typeof import('vuetify/labs/components')['VColorInput']
|
2737
2737
|
VPicker: typeof import('vuetify/labs/components')['VPicker']
|
2738
2738
|
VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
|
2739
|
+
VIconBtn: typeof import('vuetify/labs/components')['VIconBtn']
|
2739
2740
|
VStepperVertical: typeof import('vuetify/labs/components')['VStepperVertical']
|
2740
2741
|
VStepperVerticalItem: typeof import('vuetify/labs/components')['VStepperVerticalItem']
|
2741
2742
|
VStepperVerticalActions: typeof import('vuetify/labs/components')['VStepperVerticalActions']
|
2742
2743
|
VMaskInput: typeof import('vuetify/labs/components')['VMaskInput']
|
2743
|
-
VPullToRefresh: typeof import('vuetify/labs/components')['VPullToRefresh']
|
2744
2744
|
VDateInput: typeof import('vuetify/labs/components')['VDateInput']
|
2745
|
-
|
2745
|
+
VPullToRefresh: typeof import('vuetify/labs/components')['VPullToRefresh']
|
2746
2746
|
}
|
2747
2747
|
export interface GlobalDirectives {
|
2748
2748
|
vClickOutside: typeof import('vuetify/directives')['ClickOutside']
|
package/lib/framework.js
CHANGED
@@ -109,7 +109,7 @@ export function createVuetify() {
|
|
109
109
|
};
|
110
110
|
});
|
111
111
|
}
|
112
|
-
export const version = "3.9.0-beta.0-dev.2025-06-
|
112
|
+
export const version = "3.9.0-beta.0-dev.2025-06-24";
|
113
113
|
createVuetify.version = version;
|
114
114
|
|
115
115
|
// Vue's inject() can only be used in setup
|
@@ -2,6 +2,7 @@
|
|
2
2
|
display: grid;
|
3
3
|
grid-auto-rows: min-content;
|
4
4
|
grid-template-areas: "title" "header" "body";
|
5
|
+
grid-template-columns: minmax(0, 1fr);
|
5
6
|
overflow: hidden;
|
6
7
|
}
|
7
8
|
.v-picker.v-sheet {
|
@@ -18,6 +19,9 @@
|
|
18
19
|
grid-area: body;
|
19
20
|
overflow: hidden;
|
20
21
|
position: relative;
|
22
|
+
display: flex;
|
23
|
+
justify-content: center;
|
24
|
+
flex-wrap: wrap;
|
21
25
|
}
|
22
26
|
|
23
27
|
.v-picker__header {
|
@@ -7,6 +7,7 @@
|
|
7
7
|
display: grid
|
8
8
|
grid-auto-rows: min-content
|
9
9
|
grid-template-areas: "title" "header" "body"
|
10
|
+
grid-template-columns: minmax(0, 1fr)
|
10
11
|
overflow: hidden
|
11
12
|
@include tools.elevation($picker-elevation)
|
12
13
|
@include tools.rounded($picker-border-radius)
|
@@ -18,6 +19,9 @@
|
|
18
19
|
grid-area: body
|
19
20
|
overflow: hidden
|
20
21
|
position: relative
|
22
|
+
display: flex
|
23
|
+
justify-content: center
|
24
|
+
flex-wrap: wrap
|
21
25
|
|
22
26
|
.v-picker__header
|
23
27
|
grid-area: header
|
package/package.json
CHANGED