@vuetify/nightly 3.7.18-master.2025-03-24 → 3.7.19-master.2025-03-26

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.
@@ -5,19 +5,22 @@ import { makeVDatePickerProps, VDatePicker } from "../../components/VDatePicker/
5
5
  import { VMenu } from "../../components/VMenu/VMenu.mjs";
6
6
  import { makeVTextFieldProps, VTextField } from "../../components/VTextField/VTextField.mjs"; // Composables
7
7
  import { useDate } from "../../composables/date/index.mjs";
8
+ import { makeDisplayProps, useDisplay } from "../../composables/display.mjs";
8
9
  import { makeFocusProps, useFocus } from "../../composables/focus.mjs";
9
10
  import { forwardRefs } from "../../composables/forwardRefs.mjs";
10
11
  import { useLocale } from "../../composables/locale.mjs";
11
12
  import { useProxiedModel } from "../../composables/proxiedModel.mjs"; // Utilities
12
- import { computed, ref, shallowRef } from 'vue';
13
+ import { computed, ref, shallowRef, watch } from 'vue';
13
14
  import { genericComponent, omit, propsFactory, useRender, wrapInArray } from "../../util/index.mjs"; // Types
14
15
  // Types
15
16
  export const makeVDateInputProps = propsFactory({
17
+ displayFormat: [Function, String],
16
18
  hideActions: Boolean,
17
19
  location: {
18
20
  type: String,
19
21
  default: 'bottom start'
20
22
  },
23
+ ...makeDisplayProps(),
21
24
  ...makeFocusProps(),
22
25
  ...makeVConfirmEditProps(),
23
26
  ...makeVTextFieldProps({
@@ -33,16 +36,22 @@ export const VDateInput = genericComponent()({
33
36
  name: 'VDateInput',
34
37
  props: makeVDateInputProps(),
35
38
  emits: {
39
+ save: value => true,
40
+ cancel: () => true,
36
41
  'update:modelValue': val => true
37
42
  },
38
43
  setup(props, _ref) {
39
44
  let {
45
+ emit,
40
46
  slots
41
47
  } = _ref;
42
48
  const {
43
49
  t
44
50
  } = useLocale();
45
51
  const adapter = useDate();
52
+ const {
53
+ mobile
54
+ } = useDisplay(props);
46
55
  const {
47
56
  isFocused,
48
57
  focus,
@@ -50,7 +59,14 @@ export const VDateInput = genericComponent()({
50
59
  } = useFocus(props);
51
60
  const model = useProxiedModel(props, 'modelValue', props.multiple ? [] : null, val => Array.isArray(val) ? val.map(item => adapter.toJsDate(item)) : val ? adapter.toJsDate(val) : val, val => Array.isArray(val) ? val.map(item => adapter.date(item)) : val ? adapter.date(val) : val);
52
61
  const menu = shallowRef(false);
62
+ const isEditingInput = shallowRef(false);
53
63
  const vDateInputRef = ref();
64
+ function format(date) {
65
+ if (typeof props.displayFormat === 'function') {
66
+ return props.displayFormat(date);
67
+ }
68
+ return adapter.format(date, props.displayFormat ?? 'keyboardDate');
69
+ }
54
70
  const display = computed(() => {
55
71
  const value = wrapInArray(model.value);
56
72
  if (!value.length) return null;
@@ -60,11 +76,22 @@ export const VDateInput = genericComponent()({
60
76
  if (props.multiple === 'range') {
61
77
  const start = value[0];
62
78
  const end = value[value.length - 1];
63
- return adapter.isValid(start) && adapter.isValid(end) ? `${adapter.format(adapter.date(start), 'keyboardDate')} - ${adapter.format(adapter.date(end), 'keyboardDate')}` : '';
79
+ if (!adapter.isValid(start) || !adapter.isValid(end)) return '';
80
+ return `${format(adapter.date(start))} - ${format(adapter.date(end))}`;
64
81
  }
65
- return adapter.isValid(model.value) ? adapter.format(adapter.date(model.value), 'keyboardDate') : '';
82
+ return adapter.isValid(model.value) ? format(adapter.date(model.value)) : '';
83
+ });
84
+ const inputmode = computed(() => {
85
+ if (!mobile.value) return undefined;
86
+ if (isEditingInput.value) return 'text';
87
+ return 'none';
66
88
  });
67
89
  const isInteractive = computed(() => !props.disabled && !props.readonly);
90
+ const isReadonly = computed(() => !(mobile.value && isEditingInput.value) && props.readonly);
91
+ watch(menu, val => {
92
+ if (val) return;
93
+ isEditingInput.value = false;
94
+ });
68
95
  function onKeydown(e) {
69
96
  if (e.key !== 'Enter') return;
70
97
  if (!menu.value || !isFocused.value) {
@@ -72,20 +99,39 @@ export const VDateInput = genericComponent()({
72
99
  return;
73
100
  }
74
101
  const target = e.target;
75
- model.value = target.value === '' ? null : target.value;
102
+ model.value = adapter.isValid(target.value) ? target.value : null;
76
103
  }
77
104
  function onClick(e) {
78
105
  e.preventDefault();
79
106
  e.stopPropagation();
80
- menu.value = true;
107
+ if (menu.value && mobile.value) {
108
+ isEditingInput.value = true;
109
+ } else {
110
+ menu.value = true;
111
+ }
81
112
  }
82
- function onSave() {
113
+ function onCancel() {
114
+ emit('cancel');
83
115
  menu.value = false;
116
+ isEditingInput.value = false;
84
117
  }
85
- function onUpdateModel(value) {
118
+ function onSave(value) {
119
+ emit('save', value);
120
+ menu.value = false;
121
+ }
122
+ function onUpdateDisplayModel(value) {
86
123
  if (value != null) return;
87
124
  model.value = null;
88
125
  }
126
+ function onBlur() {
127
+ blur();
128
+
129
+ // When in mobile mode and editing is done (due to keyboard dismissal), close the menu
130
+ if (mobile.value && isEditingInput.value && !isFocused.value) {
131
+ menu.value = false;
132
+ isEditingInput.value = false;
133
+ }
134
+ }
89
135
  useRender(() => {
90
136
  const confirmEditProps = VConfirmEdit.filterProps(props);
91
137
  const datePickerProps = VDatePicker.filterProps(omit(props, ['active', 'location', 'rounded']));
@@ -96,13 +142,15 @@ export const VDateInput = genericComponent()({
96
142
  "class": props.class,
97
143
  "style": props.style,
98
144
  "modelValue": display.value,
145
+ "inputmode": inputmode.value,
146
+ "readonly": isReadonly.value,
99
147
  "onKeydown": isInteractive.value ? onKeydown : undefined,
100
148
  "focused": menu.value || isFocused.value,
101
149
  "onFocus": focus,
102
- "onBlur": blur,
150
+ "onBlur": onBlur,
103
151
  "onClick:control": isInteractive.value ? onClick : undefined,
104
152
  "onClick:prepend": isInteractive.value ? onClick : undefined,
105
- "onUpdate:modelValue": onUpdateModel
153
+ "onUpdate:modelValue": onUpdateDisplayModel
106
154
  }), {
107
155
  ...slots,
108
156
  default: () => _createVNode(_Fragment, null, [_createVNode(VMenu, {
@@ -119,7 +167,7 @@ export const VDateInput = genericComponent()({
119
167
  "modelValue": model.value,
120
168
  "onUpdate:modelValue": $event => model.value = $event,
121
169
  "onSave": onSave,
122
- "onCancel": () => menu.value = false
170
+ "onCancel": onCancel
123
171
  }), {
124
172
  default: _ref2 => {
125
173
  let {
@@ -129,16 +177,21 @@ export const VDateInput = genericComponent()({
129
177
  cancel,
130
178
  isPristine
131
179
  } = _ref2;
180
+ function onUpdateModel(value) {
181
+ if (!props.hideActions) {
182
+ proxyModel.value = value;
183
+ } else {
184
+ model.value = value;
185
+ if (!props.multiple) {
186
+ menu.value = false;
187
+ }
188
+ }
189
+ emit('save', value);
190
+ vDateInputRef.value?.blur();
191
+ }
132
192
  return _createVNode(VDatePicker, _mergeProps(datePickerProps, {
133
193
  "modelValue": props.hideActions ? model.value : proxyModel.value,
134
- "onUpdate:modelValue": val => {
135
- if (!props.hideActions) {
136
- proxyModel.value = val;
137
- } else {
138
- model.value = val;
139
- if (!props.multiple) menu.value = false;
140
- }
141
- },
194
+ "onUpdate:modelValue": value => onUpdateModel(value),
142
195
  "onMousedown": e => e.preventDefault()
143
196
  }), {
144
197
  actions: !props.hideActions ? () => slots.actions?.({
@@ -1 +1 @@
1
- {"version":3,"file":"VDateInput.mjs","names":["makeVConfirmEditProps","VConfirmEdit","makeVDatePickerProps","VDatePicker","VMenu","makeVTextFieldProps","VTextField","useDate","makeFocusProps","useFocus","forwardRefs","useLocale","useProxiedModel","computed","ref","shallowRef","genericComponent","omit","propsFactory","useRender","wrapInArray","makeVDateInputProps","hideActions","Boolean","location","type","String","default","placeholder","prependIcon","hideHeader","showAdjacentMonths","VDateInput","name","props","emits","val","setup","_ref","slots","t","adapter","isFocused","focus","blur","model","multiple","Array","isArray","map","item","toJsDate","date","menu","vDateInputRef","display","value","length","start","end","isValid","format","isInteractive","disabled","readonly","onKeydown","e","key","target","onClick","preventDefault","stopPropagation","onSave","onUpdateModel","confirmEditProps","filterProps","datePickerProps","textFieldProps","_createVNode","_mergeProps","class","style","undefined","_Fragment","$event","onCancel","_ref2","actions","proxyModel","save","cancel","isPristine"],"sources":["../../../src/labs/VDateInput/VDateInput.tsx"],"sourcesContent":["// Components\nimport { makeVConfirmEditProps, VConfirmEdit } from '@/components/VConfirmEdit/VConfirmEdit'\nimport { makeVDatePickerProps, VDatePicker } from '@/components/VDatePicker/VDatePicker'\nimport { VMenu } from '@/components/VMenu/VMenu'\nimport { makeVTextFieldProps, VTextField } from '@/components/VTextField/VTextField'\n\n// Composables\nimport { useDate } from '@/composables/date'\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, ref, shallowRef } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { StrategyProps } from '@/components/VOverlay/locationStrategies'\nimport type { VTextFieldSlots } from '@/components/VTextField/VTextField'\n\n// Types\nexport type VDateInputActionsSlot = {\n save: () => void\n cancel: () => void\n isPristine: boolean\n}\n\nexport type VDateInputSlots = Omit<VTextFieldSlots, 'default'> & {\n actions: VDateInputActionsSlot\n default: never\n}\n\nexport const makeVDateInputProps = propsFactory({\n hideActions: Boolean,\n location: {\n type: String as PropType<StrategyProps['location']>,\n default: 'bottom start',\n },\n ...makeFocusProps(),\n ...makeVConfirmEditProps(),\n ...makeVTextFieldProps({\n placeholder: 'mm/dd/yyyy',\n prependIcon: '$calendar',\n }),\n ...omit(makeVDatePickerProps({\n hideHeader: true,\n showAdjacentMonths: true,\n }), ['active', 'location', 'rounded']),\n}, 'VDateInput')\n\nexport const VDateInput = genericComponent<VDateInputSlots>()({\n name: 'VDateInput',\n\n props: makeVDateInputProps(),\n\n emits: {\n 'update:modelValue': (val: string) => true,\n },\n\n setup (props, { slots }) {\n const { t } = useLocale()\n const adapter = useDate()\n const { isFocused, focus, blur } = useFocus(props)\n const model = useProxiedModel(\n props,\n 'modelValue',\n props.multiple ? [] : null,\n val => Array.isArray(val) ? val.map(item => adapter.toJsDate(item)) : val ? adapter.toJsDate(val) : val,\n val => Array.isArray(val) ? val.map(item => adapter.date(item)) : val ? adapter.date(val) : val\n )\n\n const menu = shallowRef(false)\n const vDateInputRef = ref()\n\n const display = computed(() => {\n const value = wrapInArray(model.value)\n\n if (!value.length) return null\n\n if (props.multiple === true) {\n return t('$vuetify.datePicker.itemsSelected', value.length)\n }\n\n if (props.multiple === 'range') {\n const start = value[0]\n const end = value[value.length - 1]\n\n return adapter.isValid(start) && adapter.isValid(end)\n ? `${adapter.format(adapter.date(start), 'keyboardDate')} - ${adapter.format(adapter.date(end), 'keyboardDate')}`\n : ''\n }\n\n return adapter.isValid(model.value) ? adapter.format(adapter.date(model.value), 'keyboardDate') : ''\n })\n\n const isInteractive = computed(() => !props.disabled && !props.readonly)\n\n function onKeydown (e: KeyboardEvent) {\n if (e.key !== 'Enter') return\n\n if (!menu.value || !isFocused.value) {\n menu.value = true\n\n return\n }\n\n const target = e.target as HTMLInputElement\n\n model.value = target.value === '' ? null : target.value\n }\n\n function onClick (e: MouseEvent) {\n e.preventDefault()\n e.stopPropagation()\n\n menu.value = true\n }\n\n function onSave () {\n menu.value = false\n }\n\n function onUpdateModel (value: string) {\n if (value != null) return\n\n model.value = null\n }\n\n useRender(() => {\n const confirmEditProps = VConfirmEdit.filterProps(props)\n const datePickerProps = VDatePicker.filterProps(omit(props, ['active', 'location', 'rounded']))\n const textFieldProps = VTextField.filterProps(props)\n\n return (\n <VTextField\n ref={ vDateInputRef }\n { ...textFieldProps }\n class={ props.class }\n style={ props.style }\n modelValue={ display.value }\n onKeydown={ isInteractive.value ? onKeydown : undefined }\n focused={ menu.value || isFocused.value }\n onFocus={ focus }\n onBlur={ blur }\n onClick:control={ isInteractive.value ? onClick : undefined }\n onClick:prepend={ isInteractive.value ? onClick : undefined }\n onUpdate:modelValue={ onUpdateModel }\n >\n {{\n ...slots,\n default: () => (\n <>\n <VMenu\n v-model={ menu.value }\n activator=\"parent\"\n min-width=\"0\"\n eager={ isFocused.value }\n location={ props.location }\n closeOnContentClick={ false }\n openOnClick={ false }\n >\n <VConfirmEdit\n { ...confirmEditProps }\n v-model={ model.value }\n onSave={ onSave }\n onCancel={ () => menu.value = false }\n >\n {{\n default: ({ actions, model: proxyModel, save, cancel, isPristine }) => {\n return (\n <VDatePicker\n { ...datePickerProps }\n modelValue={ props.hideActions ? model.value : proxyModel.value }\n onUpdate:modelValue={ val => {\n if (!props.hideActions) {\n proxyModel.value = val\n } else {\n model.value = val\n\n if (!props.multiple) menu.value = false\n }\n }}\n onMousedown={ (e: MouseEvent) => e.preventDefault() }\n >\n {{\n actions: !props.hideActions ? () => slots.actions?.({ save, cancel, isPristine }) ?? actions() : undefined,\n }}\n </VDatePicker>\n )\n },\n }}\n </VConfirmEdit>\n </VMenu>\n\n { slots.default?.() }\n </>\n ),\n }}\n </VTextField>\n )\n })\n\n return forwardRefs({}, vDateInputRef)\n },\n})\n\nexport type VDateInput = InstanceType<typeof VDateInput>\n"],"mappings":";AAAA;AAAA,SACSA,qBAAqB,EAAEC,YAAY;AAAA,SACnCC,oBAAoB,EAAEC,WAAW;AAAA,SACjCC,KAAK;AAAA,SACLC,mBAAmB,EAAEC,UAAU,sDAExC;AAAA,SACSC,OAAO;AAAA,SACPC,cAAc,EAAEC,QAAQ;AAAA,SACxBC,WAAW;AAAA,SACXC,SAAS;AAAA,SACTC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,GAAG,EAAEC,UAAU,QAAQ,KAAK;AAAA,SACtCC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,EAAEC,WAAW,gCAErE;AAKA;AAYA,OAAO,MAAMC,mBAAmB,GAAGH,YAAY,CAAC;EAC9CI,WAAW,EAAEC,OAAO;EACpBC,QAAQ,EAAE;IACRC,IAAI,EAAEC,MAA6C;IACnDC,OAAO,EAAE;EACX,CAAC;EACD,GAAGnB,cAAc,CAAC,CAAC;EACnB,GAAGR,qBAAqB,CAAC,CAAC;EAC1B,GAAGK,mBAA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,WAAW,EAAE;oBACtBkE,UAAU,CAAChC,KAAK,GAAGpB,GAAG;kBACxB,CAAC,MAAM;oBACLS,KAAK,CAACW,KAAK,GAAGpB,GAAG;oBAEjB,IAAI,CAACF,KAAK,CAACY,QAAQ,EAAEO,IAAI,CAACG,KAAK,GAAG,KAAK;kBACzC;gBACF,CAAC;gBAAA,eACcU,CAAa,IAAKA,CAAC,CAACI,cAAc,CAAC;cAAC;gBAGjDiB,OAAO,EAAE,CAACrD,KAAK,CAACZ,WAAW,GAAG,MAAMiB,KAAK,CAACgD,OAAO,GAAG;kBAAEE,IAAI;kBAAEC,MAAM;kBAAEC;gBAAW,CAAC,CAAC,IAAIJ,OAAO,CAAC,CAAC,GAAGL;cAAS;YAIlH;UAAC;QAAA,IAKL3C,KAAK,CAACZ,OAAO,GAAG,CAAC;MAEtB;IAIT,CAAC,CAAC;IAEF,OAAOjB,WAAW,CAAC,CAAC,CAAC,EAAE4C,aAAa,CAAC;EACvC;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"VDateInput.mjs","names":["makeVConfirmEditProps","VConfirmEdit","makeVDatePickerProps","VDatePicker","VMenu","makeVTextFieldProps","VTextField","useDate","makeDisplayProps","useDisplay","makeFocusProps","useFocus","forwardRefs","useLocale","useProxiedModel","computed","ref","shallowRef","watch","genericComponent","omit","propsFactory","useRender","wrapInArray","makeVDateInputProps","displayFormat","Function","String","hideActions","Boolean","location","type","default","placeholder","prependIcon","hideHeader","showAdjacentMonths","VDateInput","name","props","emits","save","value","cancel","val","setup","_ref","emit","slots","t","adapter","mobile","isFocused","focus","blur","model","multiple","Array","isArray","map","item","toJsDate","date","menu","isEditingInput","vDateInputRef","format","display","length","start","end","isValid","inputmode","undefined","isInteractive","disabled","readonly","isReadonly","onKeydown","e","key","target","onClick","preventDefault","stopPropagation","onCancel","onSave","onUpdateDisplayModel","onBlur","confirmEditProps","filterProps","datePickerProps","textFieldProps","_createVNode","_mergeProps","class","style","_Fragment","$event","_ref2","actions","proxyModel","isPristine","onUpdateModel"],"sources":["../../../src/labs/VDateInput/VDateInput.tsx"],"sourcesContent":["// Components\nimport { makeVConfirmEditProps, VConfirmEdit } from '@/components/VConfirmEdit/VConfirmEdit'\nimport { makeVDatePickerProps, VDatePicker } from '@/components/VDatePicker/VDatePicker'\nimport { VMenu } from '@/components/VMenu/VMenu'\nimport { makeVTextFieldProps, VTextField } from '@/components/VTextField/VTextField'\n\n// Composables\nimport { useDate } from '@/composables/date'\nimport { makeDisplayProps, useDisplay } from '@/composables/display'\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, ref, shallowRef, watch } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { StrategyProps } from '@/components/VOverlay/locationStrategies'\nimport type { VTextFieldSlots } from '@/components/VTextField/VTextField'\n\n// Types\nexport type VDateInputActionsSlot = {\n save: () => void\n cancel: () => void\n isPristine: boolean\n}\n\nexport type VDateInputSlots = Omit<VTextFieldSlots, 'default'> & {\n actions: VDateInputActionsSlot\n default: never\n}\n\nexport const makeVDateInputProps = propsFactory({\n displayFormat: [Function, String],\n hideActions: Boolean,\n location: {\n type: String as PropType<StrategyProps['location']>,\n default: 'bottom start',\n },\n\n ...makeDisplayProps(),\n ...makeFocusProps(),\n ...makeVConfirmEditProps(),\n ...makeVTextFieldProps({\n placeholder: 'mm/dd/yyyy',\n prependIcon: '$calendar',\n }),\n ...omit(makeVDatePickerProps({\n hideHeader: true,\n showAdjacentMonths: true,\n }), ['active', 'location', 'rounded']),\n}, 'VDateInput')\n\nexport const VDateInput = genericComponent<VDateInputSlots>()({\n name: 'VDateInput',\n\n props: makeVDateInputProps(),\n\n emits: {\n save: (value: string) => true,\n cancel: () => true,\n 'update:modelValue': (val: string) => true,\n },\n\n setup (props, { emit, slots }) {\n const { t } = useLocale()\n const adapter = useDate()\n const { mobile } = useDisplay(props)\n const { isFocused, focus, blur } = useFocus(props)\n const model = useProxiedModel(\n props,\n 'modelValue',\n props.multiple ? [] : null,\n val => Array.isArray(val) ? val.map(item => adapter.toJsDate(item)) : val ? adapter.toJsDate(val) : val,\n val => Array.isArray(val) ? val.map(item => adapter.date(item)) : val ? adapter.date(val) : val\n )\n\n const menu = shallowRef(false)\n const isEditingInput = shallowRef(false)\n const vDateInputRef = ref()\n\n function format (date: unknown) {\n if (typeof props.displayFormat === 'function') {\n return props.displayFormat(date)\n }\n\n return adapter.format(date, props.displayFormat ?? 'keyboardDate')\n }\n\n const display = computed(() => {\n const value = wrapInArray(model.value)\n\n if (!value.length) return null\n\n if (props.multiple === true) {\n return t('$vuetify.datePicker.itemsSelected', value.length)\n }\n\n if (props.multiple === 'range') {\n const start = value[0]\n const end = value[value.length - 1]\n\n if (!adapter.isValid(start) || !adapter.isValid(end)) return ''\n\n return `${format(adapter.date(start))} - ${format(adapter.date(end))}`\n }\n\n return adapter.isValid(model.value) ? format(adapter.date(model.value)) : ''\n })\n\n const inputmode = computed(() => {\n if (!mobile.value) return undefined\n if (isEditingInput.value) return 'text'\n\n return 'none'\n })\n\n const isInteractive = computed(() => !props.disabled && !props.readonly)\n const isReadonly = computed(() => !(mobile.value && isEditingInput.value) && props.readonly)\n\n watch(menu, val => {\n if (val) return\n\n isEditingInput.value = false\n })\n\n function onKeydown (e: KeyboardEvent) {\n if (e.key !== 'Enter') return\n\n if (!menu.value || !isFocused.value) {\n menu.value = true\n\n return\n }\n\n const target = e.target as HTMLInputElement\n\n model.value = adapter.isValid(target.value) ? target.value : null\n }\n\n function onClick (e: MouseEvent) {\n e.preventDefault()\n e.stopPropagation()\n\n if (menu.value && mobile.value) {\n isEditingInput.value = true\n } else {\n menu.value = true\n }\n }\n\n function onCancel () {\n emit('cancel')\n menu.value = false\n isEditingInput.value = false\n }\n\n function onSave (value: string) {\n emit('save', value)\n menu.value = false\n }\n\n function onUpdateDisplayModel (value: string) {\n if (value != null) return\n\n model.value = null\n }\n\n function onBlur () {\n blur()\n\n // When in mobile mode and editing is done (due to keyboard dismissal), close the menu\n if (mobile.value && isEditingInput.value && !isFocused.value) {\n menu.value = false\n isEditingInput.value = false\n }\n }\n\n useRender(() => {\n const confirmEditProps = VConfirmEdit.filterProps(props)\n const datePickerProps = VDatePicker.filterProps(omit(props, ['active', 'location', 'rounded']))\n const textFieldProps = VTextField.filterProps(props)\n\n return (\n <VTextField\n ref={ vDateInputRef }\n { ...textFieldProps }\n class={ props.class }\n style={ props.style }\n modelValue={ display.value }\n inputmode={ inputmode.value }\n readonly={ isReadonly.value }\n onKeydown={ isInteractive.value ? onKeydown : undefined }\n focused={ menu.value || isFocused.value }\n onFocus={ focus }\n onBlur={ onBlur }\n onClick:control={ isInteractive.value ? onClick : undefined }\n onClick:prepend={ isInteractive.value ? onClick : undefined }\n onUpdate:modelValue={ onUpdateDisplayModel }\n >\n {{\n ...slots,\n default: () => (\n <>\n <VMenu\n v-model={ menu.value }\n activator=\"parent\"\n min-width=\"0\"\n eager={ isFocused.value }\n location={ props.location }\n closeOnContentClick={ false }\n openOnClick={ false }\n >\n <VConfirmEdit\n { ...confirmEditProps }\n v-model={ model.value }\n onSave={ onSave }\n onCancel={ onCancel }\n >\n {{\n default: ({ actions, model: proxyModel, save, cancel, isPristine }) => {\n function onUpdateModel (value: string) {\n if (!props.hideActions) {\n proxyModel.value = value\n } else {\n model.value = value\n\n if (!props.multiple) {\n menu.value = false\n }\n }\n\n emit('save', value)\n vDateInputRef.value?.blur()\n }\n\n return (\n <VDatePicker\n { ...datePickerProps }\n modelValue={ props.hideActions ? model.value : proxyModel.value }\n onUpdate:modelValue={ value => onUpdateModel(value) }\n onMousedown={ (e: MouseEvent) => e.preventDefault() }\n >\n {{\n actions: !props.hideActions ? () => slots.actions?.({ save, cancel, isPristine }) ?? actions() : undefined,\n }}\n </VDatePicker>\n )\n },\n }}\n </VConfirmEdit>\n </VMenu>\n\n { slots.default?.() }\n </>\n ),\n }}\n </VTextField>\n )\n })\n\n return forwardRefs({}, vDateInputRef)\n },\n})\n\nexport type VDateInput = InstanceType<typeof VDateInput>\n"],"mappings":";AAAA;AAAA,SACSA,qBAAqB,EAAEC,YAAY;AAAA,SACnCC,oBAAoB,EAAEC,WAAW;AAAA,SACjCC,KAAK;AAAA,SACLC,mBAAmB,EAAEC,UAAU,sDAExC;AAAA,SACSC,OAAO;AAAA,SACPC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,cAAc,EAAEC,QAAQ;AAAA,SACxBC,WAAW;AAAA,SACXC,SAAS;AAAA,SACTC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,GAAG,EAAEC,UAAU,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC7CC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,EAAEC,WAAW,gCAErE;AAKA;AAYA,OAAO,MAAMC,mBAAmB,GAAGH,YAAY,CAAC;EAC9CI,aAAa,EAAE,CAACC,QAAQ,EAAEC,MAAM,CAAC;EACjCC,WAAW,EAAEC,OAAO;EACpBC,QAAQ,EAAE;IACRC,IAAI,EAAEJ,MAA6C;IACnDK,OAAO,EAAE;EACX,CAAC;EAED,GAAGxB,gBAAgB,CAAC,CAAC;EACrB,GAAGE,cAAc,CAAC,CAAC;EACnB,GAAGV,qBAAqB,CAAC,CAAC;EAC1B,GAAGK,mBAAmB,CAAC;IACrB4B,WAAW,EAAE,YAAY;IACzBC,WAAW,EAAE;EACf,CAAC,CAAC;EACF,GAAGd,IAAI,CAAClB,oBAAoB,CAAC;IAC3BiC,UAAU,EAAE,IAAI;IAChBC,kBAAkB,EAAE;EACtB,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC;AACvC,CAAC,EAAE,YAAY,CAAC;AAEhB,OAAO,MAAMC,UAAU,GAAGlB,gBAAgB,CA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AGA,KAAK;kBAEnB,IAAI,CAACH,KAAK,CAACiB,QAAQ,EAAE;oBACnBO,IAAI,CAACrB,KAAK,GAAG,KAAK;kBACpB;gBACF;gBAEAK,IAAI,CAAC,MAAM,EAAEL,KAAK,CAAC;gBACnBuB,aAAa,CAACvB,KAAK,EAAEY,IAAI,CAAC,CAAC;cAC7B;cAEA,OAAAuC,YAAA,CAAA1F,WAAA,EAAA2F,WAAA,CAESH,eAAe;gBAAA,cACPpD,KAAK,CAACX,WAAW,GAAG2B,KAAK,CAACb,KAAK,GAAG2D,UAAU,CAAC3D,KAAK;gBAAA,uBACzCA,KAAK,IAAI6D,aAAa,CAAC7D,KAAK,CAAC;gBAAA,eACpCqC,CAAa,IAAKA,CAAC,CAACI,cAAc,CAAC;cAAC;gBAGjDiB,OAAO,EAAE,CAAC7D,KAAK,CAACX,WAAW,GAAG,MAAMoB,KAAK,CAACoD,OAAO,GAAG;kBAAE3D,IAAI;kBAAEE,MAAM;kBAAE2D;gBAAW,CAAC,CAAC,IAAIF,OAAO,CAAC,CAAC,GAAG3B;cAAS;YAIlH;UAAC;QAAA,IAKLzB,KAAK,CAAChB,OAAO,GAAG,CAAC;MAEtB;IAIT,CAAC,CAAC;IAEF,OAAOpB,WAAW,CAAC,CAAC,CAAC,EAAEqD,aAAa,CAAC;EACvC;AACF,CAAC,CAAC","ignoreList":[]}
@@ -98,6 +98,10 @@ interface DefaultInputSlot {
98
98
  blur: () => void;
99
99
  }
100
100
 
101
+ declare const breakpoints: readonly ["sm", "md", "lg", "xl", "xxl"];
102
+ type Breakpoint = typeof breakpoints[number];
103
+ type DisplayBreakpoint = 'xs' | Breakpoint;
104
+
101
105
  interface LocationStrategyData {
102
106
  contentEl: Ref<HTMLElement | undefined>;
103
107
  target: Ref<HTMLElement | [x: number, y: number] | undefined>;
@@ -152,6 +156,7 @@ declare const VDateInput: {
152
156
  style: vue.StyleValue;
153
157
  title: string;
154
158
  autofocus: boolean;
159
+ mobile: boolean | null;
155
160
  disabled: boolean;
156
161
  readonly: boolean | null;
157
162
  tag: string;
@@ -214,6 +219,7 @@ declare const VDateInput: {
214
219
  theme?: string | undefined;
215
220
  elevation?: string | number | undefined;
216
221
  counter?: string | number | boolean | undefined;
222
+ mobileBreakpoint?: number | DisplayBreakpoint | undefined;
217
223
  'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
218
224
  modelValue?: any;
219
225
  validateOn?: ("eager" | "lazy" | ("input" | "blur" | "submit" | "invalid-input") | "input lazy" | "blur lazy" | "submit lazy" | "invalid-input lazy" | "input eager" | "blur eager" | "submit eager" | "invalid-input eager" | "lazy input" | "lazy blur" | "lazy submit" | "lazy invalid-input" | "eager input" | "eager blur" | "eager submit" | "eager invalid-input") | undefined;
@@ -237,6 +243,7 @@ declare const VDateInput: {
237
243
  modelModifiers?: Record<string, boolean> | undefined;
238
244
  firstDayOfWeek?: string | number | undefined;
239
245
  allowedDates?: unknown[] | ((date: unknown) => boolean) | undefined;
246
+ displayFormat?: string | Function | undefined;
240
247
  } & {
241
248
  $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
242
249
  message?: ((arg: VMessageSlot) => vue.VNodeChild) | undefined;
@@ -295,8 +302,12 @@ declare const VDateInput: {
295
302
  "v-slot:actions"?: false | ((arg: VDateInputActionsSlot) => vue.VNodeChild) | undefined;
296
303
  "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
297
304
  } & {
305
+ onCancel?: (() => any) | undefined;
298
306
  "onUpdate:modelValue"?: ((val: string) => any) | undefined;
307
+ onSave?: ((value: string) => any) | undefined;
299
308
  }, any, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
309
+ save: (value: string) => true;
310
+ cancel: () => true;
300
311
  'update:modelValue': (val: string) => true;
301
312
  }, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps & {
302
313
  flat: boolean;
@@ -312,6 +323,7 @@ declare const VDateInput: {
312
323
  style: vue.StyleValue;
313
324
  title: string;
314
325
  autofocus: boolean;
326
+ mobile: boolean | null;
315
327
  disabled: boolean;
316
328
  readonly: boolean | null;
317
329
  tag: string;
@@ -374,6 +386,7 @@ declare const VDateInput: {
374
386
  theme?: string | undefined;
375
387
  elevation?: string | number | undefined;
376
388
  counter?: string | number | boolean | undefined;
389
+ mobileBreakpoint?: number | DisplayBreakpoint | undefined;
377
390
  'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
378
391
  modelValue?: any;
379
392
  validateOn?: ("eager" | "lazy" | ("input" | "blur" | "submit" | "invalid-input") | "input lazy" | "blur lazy" | "submit lazy" | "invalid-input lazy" | "input eager" | "blur eager" | "submit eager" | "invalid-input eager" | "lazy input" | "lazy blur" | "lazy submit" | "lazy invalid-input" | "eager input" | "eager blur" | "eager submit" | "eager invalid-input") | undefined;
@@ -397,6 +410,7 @@ declare const VDateInput: {
397
410
  modelModifiers?: Record<string, boolean> | undefined;
398
411
  firstDayOfWeek?: string | number | undefined;
399
412
  allowedDates?: unknown[] | ((date: unknown) => boolean) | undefined;
413
+ displayFormat?: string | Function | undefined;
400
414
  } & {
401
415
  $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
402
416
  message?: ((arg: VMessageSlot) => vue.VNodeChild) | undefined;
@@ -455,7 +469,9 @@ declare const VDateInput: {
455
469
  "v-slot:actions"?: false | ((arg: VDateInputActionsSlot) => vue.VNodeChild) | undefined;
456
470
  "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
457
471
  } & {
472
+ onCancel?: (() => any) | undefined;
458
473
  "onUpdate:modelValue"?: ((val: string) => any) | undefined;
474
+ onSave?: ((value: string) => any) | undefined;
459
475
  }, {
460
476
  flat: boolean;
461
477
  reverse: boolean;
@@ -470,6 +486,7 @@ declare const VDateInput: {
470
486
  style: vue.StyleValue;
471
487
  title: string;
472
488
  autofocus: boolean;
489
+ mobile: boolean | null;
473
490
  disabled: boolean;
474
491
  readonly: boolean | null;
475
492
  tag: string;
@@ -547,6 +564,7 @@ declare const VDateInput: {
547
564
  style: vue.StyleValue;
548
565
  title: string;
549
566
  autofocus: boolean;
567
+ mobile: boolean | null;
550
568
  disabled: boolean;
551
569
  readonly: boolean | null;
552
570
  tag: string;
@@ -609,6 +627,7 @@ declare const VDateInput: {
609
627
  theme?: string | undefined;
610
628
  elevation?: string | number | undefined;
611
629
  counter?: string | number | boolean | undefined;
630
+ mobileBreakpoint?: number | DisplayBreakpoint | undefined;
612
631
  'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
613
632
  modelValue?: any;
614
633
  validateOn?: ("eager" | "lazy" | ("input" | "blur" | "submit" | "invalid-input") | "input lazy" | "blur lazy" | "submit lazy" | "invalid-input lazy" | "input eager" | "blur eager" | "submit eager" | "invalid-input eager" | "lazy input" | "lazy blur" | "lazy submit" | "lazy invalid-input" | "eager input" | "eager blur" | "eager submit" | "eager invalid-input") | undefined;
@@ -632,6 +651,7 @@ declare const VDateInput: {
632
651
  modelModifiers?: Record<string, boolean> | undefined;
633
652
  firstDayOfWeek?: string | number | undefined;
634
653
  allowedDates?: unknown[] | ((date: unknown) => boolean) | undefined;
654
+ displayFormat?: string | Function | undefined;
635
655
  } & {
636
656
  $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
637
657
  message?: ((arg: VMessageSlot) => vue.VNodeChild) | undefined;
@@ -690,7 +710,9 @@ declare const VDateInput: {
690
710
  "v-slot:actions"?: false | ((arg: VDateInputActionsSlot) => vue.VNodeChild) | undefined;
691
711
  "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
692
712
  } & {
713
+ onCancel?: (() => any) | undefined;
693
714
  "onUpdate:modelValue"?: ((val: string) => any) | undefined;
715
+ onSave?: ((value: string) => any) | undefined;
694
716
  }, any, {}, {}, {}, {
695
717
  flat: boolean;
696
718
  reverse: boolean;
@@ -705,6 +727,7 @@ declare const VDateInput: {
705
727
  style: vue.StyleValue;
706
728
  title: string;
707
729
  autofocus: boolean;
730
+ mobile: boolean | null;
708
731
  disabled: boolean;
709
732
  readonly: boolean | null;
710
733
  tag: string;
@@ -761,6 +784,7 @@ declare const VDateInput: {
761
784
  style: vue.StyleValue;
762
785
  title: string;
763
786
  autofocus: boolean;
787
+ mobile: boolean | null;
764
788
  disabled: boolean;
765
789
  readonly: boolean | null;
766
790
  tag: string;
@@ -823,6 +847,7 @@ declare const VDateInput: {
823
847
  theme?: string | undefined;
824
848
  elevation?: string | number | undefined;
825
849
  counter?: string | number | boolean | undefined;
850
+ mobileBreakpoint?: number | DisplayBreakpoint | undefined;
826
851
  'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
827
852
  modelValue?: any;
828
853
  validateOn?: ("eager" | "lazy" | ("input" | "blur" | "submit" | "invalid-input") | "input lazy" | "blur lazy" | "submit lazy" | "invalid-input lazy" | "input eager" | "blur eager" | "submit eager" | "invalid-input eager" | "lazy input" | "lazy blur" | "lazy submit" | "lazy invalid-input" | "eager input" | "eager blur" | "eager submit" | "eager invalid-input") | undefined;
@@ -846,6 +871,7 @@ declare const VDateInput: {
846
871
  modelModifiers?: Record<string, boolean> | undefined;
847
872
  firstDayOfWeek?: string | number | undefined;
848
873
  allowedDates?: unknown[] | ((date: unknown) => boolean) | undefined;
874
+ displayFormat?: string | Function | undefined;
849
875
  } & {
850
876
  $children?: vue.VNodeChild | (() => vue.VNodeChild) | {
851
877
  message?: ((arg: VMessageSlot) => vue.VNodeChild) | undefined;
@@ -904,8 +930,12 @@ declare const VDateInput: {
904
930
  "v-slot:actions"?: false | ((arg: VDateInputActionsSlot) => vue.VNodeChild) | undefined;
905
931
  "v-slot:default"?: false | (() => vue.VNodeChild) | undefined;
906
932
  } & {
933
+ onCancel?: (() => any) | undefined;
907
934
  "onUpdate:modelValue"?: ((val: string) => any) | undefined;
935
+ onSave?: ((value: string) => any) | undefined;
908
936
  }, any, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
937
+ save: (value: string) => true;
938
+ cancel: () => true;
909
939
  'update:modelValue': (val: string) => true;
910
940
  }, string, {
911
941
  flat: boolean;
@@ -921,6 +951,7 @@ declare const VDateInput: {
921
951
  style: vue.StyleValue;
922
952
  title: string;
923
953
  autofocus: boolean;
954
+ mobile: boolean | null;
924
955
  disabled: boolean;
925
956
  readonly: boolean | null;
926
957
  tag: string;
@@ -1193,6 +1224,12 @@ declare const VDateInput: {
1193
1224
  type: StringConstructor;
1194
1225
  default: string;
1195
1226
  };
1227
+ mobile: {
1228
+ type: PropType<boolean | null>;
1229
+ default: boolean;
1230
+ };
1231
+ mobileBreakpoint: PropType<number | DisplayBreakpoint>;
1232
+ displayFormat: (FunctionConstructor | StringConstructor)[];
1196
1233
  hideActions: BooleanConstructor;
1197
1234
  location: {
1198
1235
  type: PropType<StrategyProps["location"]>;
@@ -1414,6 +1451,12 @@ declare const VDateInput: {
1414
1451
  type: StringConstructor;
1415
1452
  default: string;
1416
1453
  };
1454
+ mobile: {
1455
+ type: PropType<boolean | null>;
1456
+ default: boolean;
1457
+ };
1458
+ mobileBreakpoint: PropType<number | DisplayBreakpoint>;
1459
+ displayFormat: (FunctionConstructor | StringConstructor)[];
1417
1460
  hideActions: BooleanConstructor;
1418
1461
  location: {
1419
1462
  type: PropType<StrategyProps["location"]>;