@antcde/component-library 0.0.4 → 0.0.10

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 (133) hide show
  1. package/dist/component-library.css +1 -1
  2. package/dist/index.js +11633 -11114
  3. package/dist/types/components/BaseAppCard.vue.d.ts +5 -1
  4. package/node_modules/vuetify/dist/json/attributes.json +2765 -2749
  5. package/node_modules/vuetify/dist/json/importMap-labs.json +8 -8
  6. package/node_modules/vuetify/dist/json/importMap.json +158 -158
  7. package/node_modules/vuetify/dist/json/tags.json +6 -2
  8. package/node_modules/vuetify/dist/json/web-types.json +5003 -4921
  9. package/node_modules/vuetify/dist/vuetify-labs.css +2500 -2499
  10. package/node_modules/vuetify/dist/vuetify-labs.d.ts +509 -229
  11. package/node_modules/vuetify/dist/vuetify-labs.esm.js +250 -147
  12. package/node_modules/vuetify/dist/vuetify-labs.esm.js.map +1 -1
  13. package/node_modules/vuetify/dist/vuetify-labs.js +249 -146
  14. package/node_modules/vuetify/dist/vuetify-labs.min.css +2 -2
  15. package/node_modules/vuetify/dist/vuetify.css +2957 -2956
  16. package/node_modules/vuetify/dist/vuetify.d.ts +417 -234
  17. package/node_modules/vuetify/dist/vuetify.esm.js +122 -72
  18. package/node_modules/vuetify/dist/vuetify.esm.js.map +1 -1
  19. package/node_modules/vuetify/dist/vuetify.js +121 -71
  20. package/node_modules/vuetify/dist/vuetify.js.map +1 -1
  21. package/node_modules/vuetify/dist/vuetify.min.css +2 -2
  22. package/node_modules/vuetify/dist/vuetify.min.js +474 -473
  23. package/node_modules/vuetify/dist/vuetify.min.js.map +1 -1
  24. package/node_modules/vuetify/lib/components/VAppBar/index.d.mts +15 -6
  25. package/node_modules/vuetify/lib/components/VAutocomplete/index.d.mts +23 -8
  26. package/node_modules/vuetify/lib/components/VBadge/VBadge.mjs +2 -2
  27. package/node_modules/vuetify/lib/components/VBadge/VBadge.mjs.map +1 -1
  28. package/node_modules/vuetify/lib/components/VBtn/VBtn.mjs +6 -3
  29. package/node_modules/vuetify/lib/components/VBtn/VBtn.mjs.map +1 -1
  30. package/node_modules/vuetify/lib/components/VBtn/index.d.mts +15 -6
  31. package/node_modules/vuetify/lib/components/VCard/VCard.mjs +12 -3
  32. package/node_modules/vuetify/lib/components/VCard/VCard.mjs.map +1 -1
  33. package/node_modules/vuetify/lib/components/VCard/VCardItem.mjs +11 -4
  34. package/node_modules/vuetify/lib/components/VCard/VCardItem.mjs.map +1 -1
  35. package/node_modules/vuetify/lib/components/VCard/index.d.mts +75 -30
  36. package/node_modules/vuetify/lib/components/VCarousel/VCarousel.mjs +1 -1
  37. package/node_modules/vuetify/lib/components/VCarousel/VCarousel.mjs.map +1 -1
  38. package/node_modules/vuetify/lib/components/VChip/VChip.mjs +6 -3
  39. package/node_modules/vuetify/lib/components/VChip/VChip.mjs.map +1 -1
  40. package/node_modules/vuetify/lib/components/VChip/index.d.mts +15 -6
  41. package/node_modules/vuetify/lib/components/VCombobox/index.d.mts +23 -8
  42. package/node_modules/vuetify/lib/components/VDataIterator/index.d.mts +2 -2
  43. package/node_modules/vuetify/lib/components/VDataTable/VDataTableRow.mjs +18 -3
  44. package/node_modules/vuetify/lib/components/VDataTable/VDataTableRow.mjs.map +1 -1
  45. package/node_modules/vuetify/lib/components/VDataTable/composables/headers.mjs +3 -1
  46. package/node_modules/vuetify/lib/components/VDataTable/composables/headers.mjs.map +1 -1
  47. package/node_modules/vuetify/lib/components/VDataTable/composables/paginate.mjs +2 -2
  48. package/node_modules/vuetify/lib/components/VDataTable/composables/paginate.mjs.map +1 -1
  49. package/node_modules/vuetify/lib/components/VDataTable/index.d.mts +125 -122
  50. package/node_modules/vuetify/lib/components/VDataTable/types.mjs.map +1 -1
  51. package/node_modules/vuetify/lib/components/VDatePicker/VDatePicker.mjs +1 -1
  52. package/node_modules/vuetify/lib/components/VDatePicker/VDatePicker.mjs.map +1 -1
  53. package/node_modules/vuetify/lib/components/VDatePicker/VDatePickerControls.mjs +5 -5
  54. package/node_modules/vuetify/lib/components/VDatePicker/VDatePickerControls.mjs.map +1 -1
  55. package/node_modules/vuetify/lib/components/VDialog/__test__/VDialog.spec.browser.mjs +50 -0
  56. package/node_modules/vuetify/lib/components/VDialog/__test__/VDialog.spec.browser.mjs.map +1 -0
  57. package/node_modules/vuetify/lib/components/VDialog/index.d.mts +21 -6
  58. package/node_modules/vuetify/lib/components/VFab/index.d.mts +15 -6
  59. package/node_modules/vuetify/lib/components/VField/VField.mjs +1 -6
  60. package/node_modules/vuetify/lib/components/VField/VField.mjs.map +1 -1
  61. package/node_modules/vuetify/lib/components/VFileInput/VFileInput.mjs +2 -2
  62. package/node_modules/vuetify/lib/components/VFileInput/VFileInput.mjs.map +1 -1
  63. package/node_modules/vuetify/lib/components/VIcon/VIcon.mjs +2 -2
  64. package/node_modules/vuetify/lib/components/VIcon/VIcon.mjs.map +1 -1
  65. package/node_modules/vuetify/lib/components/VList/VListItem.mjs +11 -5
  66. package/node_modules/vuetify/lib/components/VList/VListItem.mjs.map +1 -1
  67. package/node_modules/vuetify/lib/components/VList/index.d.mts +32 -14
  68. package/node_modules/vuetify/lib/components/VMenu/index.d.mts +21 -6
  69. package/node_modules/vuetify/lib/components/VOverlay/VOverlay.mjs +10 -1
  70. package/node_modules/vuetify/lib/components/VOverlay/VOverlay.mjs.map +1 -1
  71. package/node_modules/vuetify/lib/components/VOverlay/index.d.mts +6 -0
  72. package/node_modules/vuetify/lib/components/VPagination/VPagination.mjs +3 -3
  73. package/node_modules/vuetify/lib/components/VPagination/VPagination.mjs.map +1 -1
  74. package/node_modules/vuetify/lib/components/VParallax/VParallax.mjs +1 -1
  75. package/node_modules/vuetify/lib/components/VParallax/VParallax.mjs.map +1 -1
  76. package/node_modules/vuetify/lib/components/VRating/VRating.mjs +1 -1
  77. package/node_modules/vuetify/lib/components/VRating/VRating.mjs.map +1 -1
  78. package/node_modules/vuetify/lib/components/VSelect/index.d.mts +23 -8
  79. package/node_modules/vuetify/lib/components/VSlider/slider.mjs +1 -1
  80. package/node_modules/vuetify/lib/components/VSlider/slider.mjs.map +1 -1
  81. package/node_modules/vuetify/lib/components/VSnackbar/index.d.mts +21 -6
  82. package/node_modules/vuetify/lib/components/VSparkline/VBarline.mjs +1 -1
  83. package/node_modules/vuetify/lib/components/VSparkline/VBarline.mjs.map +1 -1
  84. package/node_modules/vuetify/lib/components/VTabs/index.d.mts +39 -24
  85. package/node_modules/vuetify/lib/components/VTextField/VTextField.mjs +2 -2
  86. package/node_modules/vuetify/lib/components/VTextField/VTextField.mjs.map +1 -1
  87. package/node_modules/vuetify/lib/components/VTextarea/VTextarea.mjs +4 -4
  88. package/node_modules/vuetify/lib/components/VTextarea/VTextarea.mjs.map +1 -1
  89. package/node_modules/vuetify/lib/components/VToolbar/VToolbar.css +1 -0
  90. package/node_modules/vuetify/lib/components/VToolbar/VToolbar.sass +1 -0
  91. package/node_modules/vuetify/lib/components/VTooltip/index.d.mts +21 -6
  92. package/node_modules/vuetify/lib/components/index.d.mts +365 -182
  93. package/node_modules/vuetify/lib/composables/calendar.mjs +1 -1
  94. package/node_modules/vuetify/lib/composables/calendar.mjs.map +1 -1
  95. package/node_modules/vuetify/lib/composables/stack.mjs +2 -2
  96. package/node_modules/vuetify/lib/composables/stack.mjs.map +1 -1
  97. package/node_modules/vuetify/lib/composables/theme.mjs +1 -1
  98. package/node_modules/vuetify/lib/composables/theme.mjs.map +1 -1
  99. package/node_modules/vuetify/lib/composables/validation.mjs +2 -2
  100. package/node_modules/vuetify/lib/composables/validation.mjs.map +1 -1
  101. package/node_modules/vuetify/lib/entry-bundler.mjs +1 -1
  102. package/node_modules/vuetify/lib/framework.mjs +1 -1
  103. package/node_modules/vuetify/lib/index.d.mts +52 -52
  104. package/node_modules/vuetify/lib/labs/VDateInput/VDateInput.mjs +79 -21
  105. package/node_modules/vuetify/lib/labs/VDateInput/VDateInput.mjs.map +1 -1
  106. package/node_modules/vuetify/lib/labs/VDateInput/index.d.mts +53 -10
  107. package/node_modules/vuetify/lib/labs/VFileUpload/VFileUpload.mjs +3 -2
  108. package/node_modules/vuetify/lib/labs/VFileUpload/VFileUpload.mjs.map +1 -1
  109. package/node_modules/vuetify/lib/labs/VFileUpload/index.d.mts +32 -14
  110. package/node_modules/vuetify/lib/labs/VNumberInput/VNumberInput.mjs +5 -5
  111. package/node_modules/vuetify/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
  112. package/node_modules/vuetify/lib/labs/VSnackbarQueue/index.d.mts +21 -6
  113. package/node_modules/vuetify/lib/labs/VTimePicker/VTimePicker.mjs +30 -31
  114. package/node_modules/vuetify/lib/labs/VTimePicker/VTimePicker.mjs.map +1 -1
  115. package/node_modules/vuetify/lib/labs/VTimePicker/VTimePickerControls.mjs +14 -13
  116. package/node_modules/vuetify/lib/labs/VTimePicker/VTimePickerControls.mjs.map +1 -1
  117. package/node_modules/vuetify/lib/labs/VTimePicker/index.d.mts +35 -13
  118. package/node_modules/vuetify/lib/labs/VTimePicker/shared.mjs +2 -0
  119. package/node_modules/vuetify/lib/labs/VTimePicker/shared.mjs.map +1 -0
  120. package/node_modules/vuetify/lib/labs/VTreeview/index.d.mts +32 -14
  121. package/node_modules/vuetify/lib/labs/components.d.mts +171 -59
  122. package/node_modules/vuetify/lib/locale/adapters/vuetify.mjs +1 -1
  123. package/node_modules/vuetify/lib/locale/adapters/vuetify.mjs.map +1 -1
  124. package/node_modules/vuetify/lib/util/animation.mjs +8 -8
  125. package/node_modules/vuetify/lib/util/animation.mjs.map +1 -1
  126. package/node_modules/vuetify/lib/util/helpers.mjs +7 -5
  127. package/node_modules/vuetify/lib/util/helpers.mjs.map +1 -1
  128. package/node_modules/vuetify/package.json +2 -2
  129. package/package.json +3 -3
  130. package/node_modules/vuetify/lib/components/VDialog/__test__/VDialog.spec.cy.mjs +0 -39
  131. package/node_modules/vuetify/lib/components/VDialog/__test__/VDialog.spec.cy.mjs.map +0 -1
  132. package/node_modules/vuetify/lib/labs/VTimePicker/SelectingTimes.mjs +0 -10
  133. package/node_modules/vuetify/lib/labs/VTimePicker/SelectingTimes.mjs.map +0 -1
@@ -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({
@@ -25,24 +28,30 @@ export const makeVDateInputProps = propsFactory({
25
28
  prependIcon: '$calendar'
26
29
  }),
27
30
  ...omit(makeVDatePickerProps({
28
- weeksInMonth: 'dynamic',
29
- hideHeader: true
31
+ hideHeader: true,
32
+ showAdjacentMonths: true
30
33
  }), ['active', 'location', 'rounded'])
31
34
  }, 'VDateInput');
32
35
  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();
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,43 @@ export const VDateInput = genericComponent()({
72
99
  return;
73
100
  }
74
101
  const target = e.target;
75
- model.value = target.value;
102
+ model.value = target.value === '' ? null : target.value;
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 onUpdateMenuModel(isMenuOpen) {
127
+ if (isMenuOpen) return;
128
+ isEditingInput.value = false;
129
+ }
130
+ function onBlur() {
131
+ blur();
132
+
133
+ // When in mobile mode and editing is done (due to keyboard dismissal), close the menu
134
+ if (mobile.value && isEditingInput.value && !isFocused.value) {
135
+ menu.value = false;
136
+ isEditingInput.value = false;
137
+ }
138
+ }
89
139
  useRender(() => {
90
140
  const confirmEditProps = VConfirmEdit.filterProps(props);
91
141
  const datePickerProps = VDatePicker.filterProps(omit(props, ['active', 'location', 'rounded']));
@@ -96,20 +146,23 @@ export const VDateInput = genericComponent()({
96
146
  "class": props.class,
97
147
  "style": props.style,
98
148
  "modelValue": display.value,
149
+ "inputmode": inputmode.value,
150
+ "readonly": isReadonly.value,
99
151
  "onKeydown": isInteractive.value ? onKeydown : undefined,
100
152
  "focused": menu.value || isFocused.value,
101
153
  "onFocus": focus,
102
- "onBlur": blur,
154
+ "onBlur": onBlur,
103
155
  "onClick:control": isInteractive.value ? onClick : undefined,
104
156
  "onClick:prepend": isInteractive.value ? onClick : undefined,
105
- "onUpdate:modelValue": onUpdateModel
157
+ "onUpdate:modelValue": onUpdateDisplayModel
106
158
  }), {
107
159
  ...slots,
108
160
  default: () => _createVNode(_Fragment, null, [_createVNode(VMenu, {
109
161
  "modelValue": menu.value,
110
- "onUpdate:modelValue": $event => menu.value = $event,
162
+ "onUpdate:modelValue": [$event => menu.value = $event, onUpdateMenuModel],
111
163
  "activator": "parent",
112
164
  "min-width": "0",
165
+ "eager": isFocused.value,
113
166
  "location": props.location,
114
167
  "closeOnContentClick": false,
115
168
  "openOnClick": false
@@ -118,7 +171,7 @@ export const VDateInput = genericComponent()({
118
171
  "modelValue": model.value,
119
172
  "onUpdate:modelValue": $event => model.value = $event,
120
173
  "onSave": onSave,
121
- "onCancel": () => menu.value = false
174
+ "onCancel": onCancel
122
175
  }), {
123
176
  default: _ref2 => {
124
177
  let {
@@ -128,16 +181,21 @@ export const VDateInput = genericComponent()({
128
181
  cancel,
129
182
  isPristine
130
183
  } = _ref2;
184
+ function onUpdateModel(value) {
185
+ if (!props.hideActions) {
186
+ proxyModel.value = value;
187
+ } else {
188
+ model.value = value;
189
+ if (!props.multiple) {
190
+ menu.value = false;
191
+ }
192
+ }
193
+ emit('save', value);
194
+ vDateInputRef.value?.blur();
195
+ }
131
196
  return _createVNode(VDatePicker, _mergeProps(datePickerProps, {
132
197
  "modelValue": props.hideActions ? model.value : proxyModel.value,
133
- "onUpdate:modelValue": val => {
134
- if (!props.hideActions) {
135
- proxyModel.value = val;
136
- } else {
137
- model.value = val;
138
- if (!props.multiple) menu.value = false;
139
- }
140
- },
198
+ "onUpdate:modelValue": value => onUpdateModel(value),
141
199
  "onMousedown": e => e.preventDefault()
142
200
  }), {
143
201
  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","weeksInMonth","hideHeader","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 weeksInMonth: 'dynamic' as const,\n hideHeader: 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\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 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,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,KAAK,EAAE2C,UAAU;gBAAEC,IAAI;gBAAEC,MAAM;gBAAEC;cAAW,CAAC,GAAAL,KAAA;cAChE,OAAAR,YAAA,CAAA3E,WAAA,EAAA4E,WAAA,CAESH,eAAe;gBAAA,cACP1C,KAAK,CAACZ,WAAW,GAAGuB,KAAK,CAACW,KAAK,GAAGgC,UAAU,CAAChC,KAAK;gBAAA,uBACzCpB,GAAG,IAAI;kBAC3B,IAAI,CAACF,KAAK,CAACZ,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","onUpdateMenuModel","isMenuOpen","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()\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 = target.value === '' ? null : target.value\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 onUpdateMenuModel (isMenuOpen: boolean) {\n if (isMenuOpen) return\n\n isEditingInput.value = false\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 onUpdate:modelValue={ onUpdateMenuModel }\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,gB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,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;
@@ -1050,7 +1081,10 @@ declare const VDateInput: {
1050
1081
  type: PropType<"month" | "months" | "year">;
1051
1082
  default: string;
1052
1083
  };
1053
- showAdjacentMonths: BooleanConstructor;
1084
+ showAdjacentMonths: {
1085
+ type: PropType<boolean>;
1086
+ default: boolean;
1087
+ };
1054
1088
  weekdays: {
1055
1089
  type: {
1056
1090
  (arrayLength: number): number[];
@@ -1070,15 +1104,12 @@ declare const VDateInput: {
1070
1104
  };
1071
1105
  default: () => number[];
1072
1106
  };
1073
- weeksInMonth: Omit<Omit<{
1107
+ weeksInMonth: Omit<{
1074
1108
  type: PropType<"dynamic" | "static">;
1075
1109
  default: string;
1076
1110
  }, "type" | "default"> & {
1077
1111
  type: PropType<"static" | "dynamic">;
1078
1112
  default: NonNullable<"static" | "dynamic">;
1079
- }, "type" | "default"> & {
1080
- type: PropType<"static" | "dynamic">;
1081
- default: NonNullable<"static" | "dynamic">;
1082
1113
  };
1083
1114
  firstDayOfWeek: (StringConstructor | NumberConstructor)[];
1084
1115
  allowedDates: PropType<unknown[] | ((date: unknown) => boolean)>;
@@ -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"]>;
@@ -1271,7 +1308,10 @@ declare const VDateInput: {
1271
1308
  type: PropType<"month" | "months" | "year">;
1272
1309
  default: string;
1273
1310
  };
1274
- showAdjacentMonths: BooleanConstructor;
1311
+ showAdjacentMonths: {
1312
+ type: PropType<boolean>;
1313
+ default: boolean;
1314
+ };
1275
1315
  weekdays: {
1276
1316
  type: {
1277
1317
  (arrayLength: number): number[];
@@ -1291,15 +1331,12 @@ declare const VDateInput: {
1291
1331
  };
1292
1332
  default: () => number[];
1293
1333
  };
1294
- weeksInMonth: Omit<Omit<{
1334
+ weeksInMonth: Omit<{
1295
1335
  type: PropType<"dynamic" | "static">;
1296
1336
  default: string;
1297
1337
  }, "type" | "default"> & {
1298
1338
  type: PropType<"static" | "dynamic">;
1299
1339
  default: NonNullable<"static" | "dynamic">;
1300
- }, "type" | "default"> & {
1301
- type: PropType<"static" | "dynamic">;
1302
- default: NonNullable<"static" | "dynamic">;
1303
1340
  };
1304
1341
  firstDayOfWeek: (StringConstructor | NumberConstructor)[];
1305
1342
  allowedDates: PropType<unknown[] | ((date: unknown) => boolean)>;
@@ -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"]>;
@@ -120,8 +120,9 @@ export const VFileUpload = genericComponent()({
120
120
  inputRef.value?.click();
121
121
  }
122
122
  function onClickRemove(index) {
123
- model.value = model.value.filter((_, i) => i !== index);
124
- if (model.value.length > 0 || !inputRef.value) return;
123
+ const newValue = model.value.filter((_, i) => i !== index);
124
+ model.value = newValue;
125
+ if (newValue.length > 0 || !inputRef.value) return;
125
126
  inputRef.value.value = '';
126
127
  }
127
128
  useRender(() => {