vuetify 3.10.5 → 3.10.7

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 (94) hide show
  1. package/README.md +0 -6
  2. package/dist/json/attributes.json +3488 -3512
  3. package/dist/json/importMap-labs.json +20 -20
  4. package/dist/json/importMap.json +176 -176
  5. package/dist/json/tags.json +3 -9
  6. package/dist/json/web-types.json +6467 -6520
  7. package/dist/vuetify-labs.cjs +190 -82
  8. package/dist/vuetify-labs.css +4945 -4895
  9. package/dist/vuetify-labs.d.ts +117 -172
  10. package/dist/vuetify-labs.esm.js +190 -82
  11. package/dist/vuetify-labs.esm.js.map +1 -1
  12. package/dist/vuetify-labs.js +190 -82
  13. package/dist/vuetify-labs.min.css +2 -2
  14. package/dist/vuetify.cjs +171 -72
  15. package/dist/vuetify.cjs.map +1 -1
  16. package/dist/vuetify.css +3926 -3898
  17. package/dist/vuetify.d.ts +117 -137
  18. package/dist/vuetify.esm.js +171 -72
  19. package/dist/vuetify.esm.js.map +1 -1
  20. package/dist/vuetify.js +171 -72
  21. package/dist/vuetify.js.map +1 -1
  22. package/dist/vuetify.min.css +2 -2
  23. package/dist/vuetify.min.js +118 -107
  24. package/dist/vuetify.min.js.map +1 -1
  25. package/lib/components/VAutocomplete/VAutocomplete.d.ts +0 -61
  26. package/lib/components/VAutocomplete/VAutocomplete.js +15 -12
  27. package/lib/components/VAutocomplete/VAutocomplete.js.map +1 -1
  28. package/lib/components/VChipGroup/VChipGroup.d.ts +37 -0
  29. package/lib/components/VChipGroup/VChipGroup.js +3 -1
  30. package/lib/components/VChipGroup/VChipGroup.js.map +1 -1
  31. package/lib/components/VCombobox/VCombobox.d.ts +6 -67
  32. package/lib/components/VCombobox/VCombobox.js +29 -30
  33. package/lib/components/VCombobox/VCombobox.js.map +1 -1
  34. package/lib/components/VCounter/VCounter.css +1 -0
  35. package/lib/components/VCounter/VCounter.sass +1 -0
  36. package/lib/components/VDatePicker/VDatePicker.js +1 -1
  37. package/lib/components/VDatePicker/VDatePicker.js.map +1 -1
  38. package/lib/components/VFileInput/VFileInput.js +3 -2
  39. package/lib/components/VFileInput/VFileInput.js.map +1 -1
  40. package/lib/components/VList/VListItem.css +14 -12
  41. package/lib/components/VList/VListItem.js +4 -2
  42. package/lib/components/VList/VListItem.js.map +1 -1
  43. package/lib/components/VList/VListItem.sass +20 -18
  44. package/lib/components/VMenu/VMenu.js +22 -4
  45. package/lib/components/VMenu/VMenu.js.map +1 -1
  46. package/lib/components/VNumberInput/VNumberInput.css +8 -0
  47. package/lib/components/VNumberInput/VNumberInput.js +5 -2
  48. package/lib/components/VNumberInput/VNumberInput.js.map +1 -1
  49. package/lib/components/VNumberInput/VNumberInput.sass +10 -4
  50. package/lib/components/VSelect/VSelect.js +2 -1
  51. package/lib/components/VSelect/VSelect.js.map +1 -1
  52. package/lib/components/VSkeletonLoader/VSkeletonLoader.css +17 -0
  53. package/lib/components/VSkeletonLoader/VSkeletonLoader.js +3 -3
  54. package/lib/components/VSkeletonLoader/VSkeletonLoader.js.map +1 -1
  55. package/lib/components/VSkeletonLoader/VSkeletonLoader.sass +7 -0
  56. package/lib/components/VSlideGroup/VSlideGroup.d.ts +25 -0
  57. package/lib/components/VSlideGroup/VSlideGroup.js +5 -1
  58. package/lib/components/VSlideGroup/VSlideGroup.js.map +1 -1
  59. package/lib/components/VTabs/VTabs.d.ts +25 -0
  60. package/lib/components/VTextField/VTextField.js +3 -5
  61. package/lib/components/VTextField/VTextField.js.map +1 -1
  62. package/lib/components/VTextarea/VTextarea.css +2 -2
  63. package/lib/components/VTextarea/VTextarea.d.ts +3 -3
  64. package/lib/components/VTextarea/VTextarea.js +23 -3
  65. package/lib/components/VTextarea/VTextarea.js.map +1 -1
  66. package/lib/components/VTextarea/VTextarea.sass +4 -2
  67. package/lib/components/VWindow/VWindow.js +39 -3
  68. package/lib/components/VWindow/VWindow.js.map +1 -1
  69. package/lib/composables/date/date.js +1 -1
  70. package/lib/composables/date/date.js.map +1 -1
  71. package/lib/composables/group.js +1 -1
  72. package/lib/composables/group.js.map +1 -1
  73. package/lib/composables/nested/nested.js +12 -2
  74. package/lib/composables/nested/nested.js.map +1 -1
  75. package/lib/composables/virtual.js +2 -2
  76. package/lib/composables/virtual.js.map +1 -1
  77. package/lib/entry-bundler.js +1 -1
  78. package/lib/framework.d.ts +60 -60
  79. package/lib/framework.js +1 -1
  80. package/lib/labs/VColorInput/VColorInput.d.ts +0 -40
  81. package/lib/labs/VColorInput/VColorInput.js +2 -2
  82. package/lib/labs/VColorInput/VColorInput.js.map +1 -1
  83. package/lib/labs/VDateInput/VDateInput.d.ts +0 -30
  84. package/lib/labs/VDateInput/VDateInput.js +16 -7
  85. package/lib/labs/VDateInput/VDateInput.js.map +1 -1
  86. package/lib/labs/VIconBtn/VIconBtn.css +22 -0
  87. package/lib/labs/VIconBtn/VIconBtn.scss +32 -0
  88. package/lib/labs/VMaskInput/VMaskInput.js +1 -1
  89. package/lib/labs/VMaskInput/VMaskInput.js.map +1 -1
  90. package/lib/labs/rules/rules.js +1 -1
  91. package/lib/labs/rules/rules.js.map +1 -1
  92. package/lib/util/helpers.js +4 -2
  93. package/lib/util/helpers.js.map +1 -1
  94. package/package.json +1 -1
@@ -33,13 +33,9 @@ export declare const makeVColorInputProps: <Defaults extends {
33
33
  rounded?: unknown;
34
34
  tile?: unknown;
35
35
  tag?: unknown;
36
- height?: unknown;
37
- maxHeight?: unknown;
38
36
  maxWidth?: unknown;
39
- minHeight?: unknown;
40
37
  minWidth?: unknown;
41
38
  width?: unknown;
42
- location?: unknown;
43
39
  loading?: unknown;
44
40
  position?: unknown;
45
41
  id?: unknown;
@@ -244,22 +240,10 @@ export declare const makeVColorInputProps: <Defaults extends {
244
240
  type: PropType<unknown extends Defaults["tag"] ? string | import("../../util/index.js").JSXComponent : string | Defaults["tag"] | import("../../util/index.js").JSXComponent>;
245
241
  default: unknown extends Defaults["tag"] ? string | import("../../util/index.js").JSXComponent : Defaults["tag"] | NonNullable<string | import("../../util/index.js").JSXComponent>;
246
242
  };
247
- height: unknown extends Defaults["height"] ? (NumberConstructor | StringConstructor)[] : {
248
- type: PropType<unknown extends Defaults["height"] ? string | number : string | number | Defaults["height"]>;
249
- default: unknown extends Defaults["height"] ? string | number : Defaults["height"] | NonNullable<string | number>;
250
- };
251
- maxHeight: unknown extends Defaults["maxHeight"] ? (NumberConstructor | StringConstructor)[] : {
252
- type: PropType<unknown extends Defaults["maxHeight"] ? string | number : string | number | Defaults["maxHeight"]>;
253
- default: unknown extends Defaults["maxHeight"] ? string | number : Defaults["maxHeight"] | NonNullable<string | number>;
254
- };
255
243
  maxWidth: unknown extends Defaults["maxWidth"] ? (NumberConstructor | StringConstructor)[] : {
256
244
  type: PropType<unknown extends Defaults["maxWidth"] ? string | number : string | number | Defaults["maxWidth"]>;
257
245
  default: unknown extends Defaults["maxWidth"] ? string | number : Defaults["maxWidth"] | NonNullable<string | number>;
258
246
  };
259
- minHeight: unknown extends Defaults["minHeight"] ? (NumberConstructor | StringConstructor)[] : {
260
- type: PropType<unknown extends Defaults["minHeight"] ? string | number : string | number | Defaults["minHeight"]>;
261
- default: unknown extends Defaults["minHeight"] ? string | number : Defaults["minHeight"] | NonNullable<string | number>;
262
- };
263
247
  minWidth: unknown extends Defaults["minWidth"] ? (NumberConstructor | StringConstructor)[] : {
264
248
  type: PropType<unknown extends Defaults["minWidth"] ? string | number : string | number | Defaults["minWidth"]>;
265
249
  default: unknown extends Defaults["minWidth"] ? string | number : Defaults["minWidth"] | NonNullable<string | number>;
@@ -268,10 +252,6 @@ export declare const makeVColorInputProps: <Defaults extends {
268
252
  type: PropType<unknown extends Defaults["width"] ? string | number : string | number | Defaults["width"]>;
269
253
  default: unknown extends Defaults["width"] ? string | number : Defaults["width"] | NonNullable<string | number>;
270
254
  };
271
- location: unknown extends Defaults["location"] ? PropType<import("../../util/index.js").Anchor | null> : {
272
- type: PropType<unknown extends Defaults["location"] ? import("../../util/index.js").Anchor | null : Defaults["location"] | import("../../util/index.js").Anchor | null>;
273
- default: unknown extends Defaults["location"] ? import("../../util/index.js").Anchor | null : Defaults["location"] | NonNullable<import("../../util/index.js").Anchor | null>;
274
- };
275
255
  loading: unknown extends Defaults["loading"] ? (BooleanConstructor | StringConstructor)[] : {
276
256
  type: PropType<unknown extends Defaults["loading"] ? string | boolean : string | boolean | Defaults["loading"]>;
277
257
  default: unknown extends Defaults["loading"] ? string | boolean : Defaults["loading"] | NonNullable<string | boolean>;
@@ -841,13 +821,9 @@ export declare const VColorInput: {
841
821
  border?: string | number | boolean | undefined;
842
822
  elevation?: string | number | undefined;
843
823
  rounded?: string | number | boolean | undefined;
844
- height?: string | number | undefined;
845
- maxHeight?: string | number | undefined;
846
824
  maxWidth?: string | number | undefined;
847
- minHeight?: string | number | undefined;
848
825
  minWidth?: string | number | undefined;
849
826
  width?: string | number | undefined;
850
- location?: import("../../util/index.js").Anchor | null | undefined;
851
827
  loading?: string | boolean | undefined;
852
828
  position?: "absolute" | "fixed" | "relative" | "static" | "sticky" | undefined;
853
829
  id?: string | undefined;
@@ -1126,13 +1102,9 @@ export declare const VColorInput: {
1126
1102
  border?: string | number | boolean | undefined;
1127
1103
  elevation?: string | number | undefined;
1128
1104
  rounded?: string | number | boolean | undefined;
1129
- height?: string | number | undefined;
1130
- maxHeight?: string | number | undefined;
1131
1105
  maxWidth?: string | number | undefined;
1132
- minHeight?: string | number | undefined;
1133
1106
  minWidth?: string | number | undefined;
1134
1107
  width?: string | number | undefined;
1135
- location?: import("../../util/index.js").Anchor | null | undefined;
1136
1108
  loading?: string | boolean | undefined;
1137
1109
  position?: "absolute" | "fixed" | "relative" | "static" | "sticky" | undefined;
1138
1110
  id?: string | undefined;
@@ -1364,13 +1336,9 @@ export declare const VColorInput: {
1364
1336
  border?: string | number | boolean | undefined;
1365
1337
  elevation?: string | number | undefined;
1366
1338
  rounded?: string | number | boolean | undefined;
1367
- height?: string | number | undefined;
1368
- maxHeight?: string | number | undefined;
1369
1339
  maxWidth?: string | number | undefined;
1370
- minHeight?: string | number | undefined;
1371
1340
  minWidth?: string | number | undefined;
1372
1341
  width?: string | number | undefined;
1373
- location?: import("../../util/index.js").Anchor | null | undefined;
1374
1342
  loading?: string | boolean | undefined;
1375
1343
  position?: "absolute" | "fixed" | "relative" | "static" | "sticky" | undefined;
1376
1344
  id?: string | undefined;
@@ -1625,13 +1593,9 @@ export declare const VColorInput: {
1625
1593
  type: PropType<string | import("../../util/index.js").JSXComponent>;
1626
1594
  default: string;
1627
1595
  };
1628
- height: (NumberConstructor | StringConstructor)[];
1629
- maxHeight: (NumberConstructor | StringConstructor)[];
1630
1596
  maxWidth: (NumberConstructor | StringConstructor)[];
1631
- minHeight: (NumberConstructor | StringConstructor)[];
1632
1597
  minWidth: (NumberConstructor | StringConstructor)[];
1633
1598
  width: (NumberConstructor | StringConstructor)[];
1634
- location: PropType<import("../../util/index.js").Anchor | null>;
1635
1599
  loading: (BooleanConstructor | StringConstructor)[];
1636
1600
  position: {
1637
1601
  type: PropType<"absolute" | "fixed" | "relative" | "static" | "sticky">;
@@ -1833,13 +1797,9 @@ export declare const VColorInput: {
1833
1797
  type: PropType<string | import("../../util/index.js").JSXComponent>;
1834
1798
  default: string;
1835
1799
  };
1836
- height: (NumberConstructor | StringConstructor)[];
1837
- maxHeight: (NumberConstructor | StringConstructor)[];
1838
1800
  maxWidth: (NumberConstructor | StringConstructor)[];
1839
- minHeight: (NumberConstructor | StringConstructor)[];
1840
1801
  minWidth: (NumberConstructor | StringConstructor)[];
1841
1802
  width: (NumberConstructor | StringConstructor)[];
1842
- location: PropType<import("../../util/index.js").Anchor | null>;
1843
1803
  loading: (BooleanConstructor | StringConstructor)[];
1844
1804
  position: {
1845
1805
  type: PropType<"absolute" | "fixed" | "relative" | "static" | "sticky">;
@@ -32,7 +32,7 @@ export const makeVColorInputProps = propsFactory({
32
32
  ...makeFocusProps(),
33
33
  ...makeVConfirmEditProps(),
34
34
  ...makeVTextFieldProps(),
35
- ...omit(makeVColorPickerProps(), ['width'])
35
+ ...omit(makeVColorPickerProps(), ['location', 'height', 'minHeight', 'maxHeight'])
36
36
  }, 'VColorInput');
37
37
  export const VColorInput = genericComponent()({
38
38
  name: 'VColorInput',
@@ -71,7 +71,7 @@ export const VColorInput = genericComponent()({
71
71
  }
72
72
  useRender(() => {
73
73
  const confirmEditProps = VConfirmEdit.filterProps(props);
74
- const colorPickerProps = VColorPicker.filterProps(omit(props, ['active', 'color']));
74
+ const colorPickerProps = VColorPicker.filterProps(omit(props, ['active', 'bgColor', 'color', 'rounded', 'maxWidth', 'minWidth', 'width']));
75
75
  const textFieldProps = VTextField.filterProps(props);
76
76
  const slotWithPip = props.hidePip ? undefined : {
77
77
  [props.pipLocation]: arg => _createElementVNode(_Fragment, null, [_createVNode(VAvatar, {
@@ -1 +1 @@
1
- {"version":3,"file":"VColorInput.js","names":["VAvatar","makeVColorPickerProps","VColorPicker","makeVConfirmEditProps","VConfirmEdit","VMenu","makeVTextFieldProps","VTextField","makeFocusProps","useProxiedModel","computed","shallowRef","genericComponent","omit","propsFactory","useRender","availablePipLocations","makeVColorInputProps","hidePip","Boolean","colorPip","pipIcon","type","String","default","pipLocation","validator","v","includes","pipVariant","VColorInput","name","props","emits","val","setup","_ref","slots","model","menu","isFocused","focused","isInteractive","disabled","readonly","display","value","onKeydown","e","key","target","onClick","preventDefault","stopPropagation","onSave","onCancel","confirmEditProps","filterProps","colorPickerProps","textFieldProps","slotWithPip","undefined","arg","_createElementVNode","_Fragment","_createVNode","_mergeProps","class","style","event","$event","_ref2","actions","proxyModel","save","cancel","isPristine","onUpdateModel","hideActions"],"sources":["../../../src/labs/VColorInput/VColorInput.tsx"],"sourcesContent":["// Styles\nimport './VColorInput.sass'\n\n// Components\nimport { VAvatar } from '@/components/VAvatar'\nimport { makeVColorPickerProps, VColorPicker } from '@/components/VColorPicker/VColorPicker'\nimport { makeVConfirmEditProps, VConfirmEdit } from '@/components/VConfirmEdit/VConfirmEdit'\nimport { VMenu } from '@/components/VMenu/VMenu'\nimport { makeVTextFieldProps, VTextField } from '@/components/VTextField/VTextField'\n\n// Composables\nimport { makeFocusProps } from '@/composables/focus'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, shallowRef } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VTextFieldSlots } from '@/components/VTextField/VTextField'\n\nexport type VColorInputActionsSlot = {\n save: () => void\n cancel: () => void\n isPristine: boolean\n}\n\nexport type VColorInputSlots = Omit<VTextFieldSlots, 'default'> & {\n actions: VColorInputActionsSlot\n default: never\n}\n\nconst availablePipLocations = ['prepend', 'prepend-inner', 'append', 'append-inner'] as const\nexport type PipLocation = typeof availablePipLocations[number]\n\nexport const makeVColorInputProps = propsFactory({\n hidePip: Boolean,\n colorPip: Boolean,\n pipIcon: {\n type: String,\n default: '$color',\n },\n pipLocation: {\n type: String as PropType<PipLocation>,\n default: 'prepend',\n validator: (v: any) => availablePipLocations.includes(v),\n },\n pipVariant: {\n type: String as PropType<VAvatar['$props']['variant']>,\n default: 'text',\n },\n\n ...makeFocusProps(),\n ...makeVConfirmEditProps(),\n ...makeVTextFieldProps(),\n ...omit(makeVColorPickerProps(), ['width']),\n}, 'VColorInput')\n\nexport const VColorInput = genericComponent<VColorInputSlots>()({\n name: 'VColorInput',\n\n props: makeVColorInputProps(),\n\n emits: {\n 'update:modelValue': (val: string) => true,\n },\n\n setup (props, { slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const menu = shallowRef(false)\n const isFocused = shallowRef(props.focused)\n\n const isInteractive = computed(() => !props.disabled && !props.readonly)\n\n const display = computed(() => model.value || null)\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 onCancel () {\n menu.value = false\n }\n\n useRender(() => {\n const confirmEditProps = VConfirmEdit.filterProps(props)\n const colorPickerProps = VColorPicker.filterProps(omit(props, ['active', 'color']))\n const textFieldProps = VTextField.filterProps(props)\n\n const slotWithPip = props.hidePip\n ? undefined\n : {\n [props.pipLocation]: (arg: any) => (\n <>\n <VAvatar\n class=\"v-color-input__pip\"\n color={ props.colorPip ? model.value as string : undefined }\n variant={ props.pipVariant }\n icon={ props.pipIcon }\n />\n { slots[props.pipLocation]?.(arg) }\n </>\n ),\n }\n\n return (\n <VTextField\n { ...textFieldProps }\n class={[\n 'v-color-input',\n props.class,\n ]}\n style={ props.style }\n modelValue={ display.value }\n onKeydown={ isInteractive.value ? onKeydown : undefined }\n focused={ menu.value || isFocused.value }\n onClick:control={ isInteractive.value ? onClick : undefined }\n onClick:prependInner={ isInteractive.value ? onClick : undefined }\n onUpdate:focused={ event => isFocused.value = event }\n onClick:appendInner={ isInteractive.value ? onClick : undefined }\n onUpdate:modelValue={ val => {\n model.value = val\n }}\n >\n {{\n ...slots,\n ...slotWithPip,\n default: () => (\n <>\n <VMenu\n v-model={ menu.value }\n activator=\"parent\"\n minWidth=\"0\"\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 }\n\n return (\n <VColorPicker\n { ...colorPickerProps }\n modelValue={ props.hideActions ? model.value : proxyModel.value }\n onUpdate:modelValue={ value => onUpdateModel(value) }\n >\n {{\n actions: !props.hideActions ? () => slots.actions?.({ save, cancel, isPristine }) ?? actions() : undefined,\n }}\n </VColorPicker>\n )\n },\n }}\n </VConfirmEdit>\n </VMenu>\n\n { slots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AC,CAAC,GAAGX;cAAS;YAIlH;UAAC;QAAA,IAKLxB,KAAK,CAACb,OAAO,GAAG,CAAC;MAEtB;IAIT,CAAC,CAAC;EACJ;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"VColorInput.js","names":["VAvatar","makeVColorPickerProps","VColorPicker","makeVConfirmEditProps","VConfirmEdit","VMenu","makeVTextFieldProps","VTextField","makeFocusProps","useProxiedModel","computed","shallowRef","genericComponent","omit","propsFactory","useRender","availablePipLocations","makeVColorInputProps","hidePip","Boolean","colorPip","pipIcon","type","String","default","pipLocation","validator","v","includes","pipVariant","VColorInput","name","props","emits","val","setup","_ref","slots","model","menu","isFocused","focused","isInteractive","disabled","readonly","display","value","onKeydown","e","key","target","onClick","preventDefault","stopPropagation","onSave","onCancel","confirmEditProps","filterProps","colorPickerProps","textFieldProps","slotWithPip","undefined","arg","_createElementVNode","_Fragment","_createVNode","_mergeProps","class","style","event","$event","_ref2","actions","proxyModel","save","cancel","isPristine","onUpdateModel","hideActions"],"sources":["../../../src/labs/VColorInput/VColorInput.tsx"],"sourcesContent":["// Styles\nimport './VColorInput.sass'\n\n// Components\nimport { VAvatar } from '@/components/VAvatar'\nimport { makeVColorPickerProps, VColorPicker } from '@/components/VColorPicker/VColorPicker'\nimport { makeVConfirmEditProps, VConfirmEdit } from '@/components/VConfirmEdit/VConfirmEdit'\nimport { VMenu } from '@/components/VMenu/VMenu'\nimport { makeVTextFieldProps, VTextField } from '@/components/VTextField/VTextField'\n\n// Composables\nimport { makeFocusProps } from '@/composables/focus'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, shallowRef } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VTextFieldSlots } from '@/components/VTextField/VTextField'\n\nexport type VColorInputActionsSlot = {\n save: () => void\n cancel: () => void\n isPristine: boolean\n}\n\nexport type VColorInputSlots = Omit<VTextFieldSlots, 'default'> & {\n actions: VColorInputActionsSlot\n default: never\n}\n\nconst availablePipLocations = ['prepend', 'prepend-inner', 'append', 'append-inner'] as const\nexport type PipLocation = typeof availablePipLocations[number]\n\nexport const makeVColorInputProps = propsFactory({\n hidePip: Boolean,\n colorPip: Boolean,\n pipIcon: {\n type: String,\n default: '$color',\n },\n pipLocation: {\n type: String as PropType<PipLocation>,\n default: 'prepend',\n validator: (v: any) => availablePipLocations.includes(v),\n },\n pipVariant: {\n type: String as PropType<VAvatar['$props']['variant']>,\n default: 'text',\n },\n\n ...makeFocusProps(),\n ...makeVConfirmEditProps(),\n ...makeVTextFieldProps(),\n ...omit(makeVColorPickerProps(), [\n 'location',\n 'height',\n 'minHeight',\n 'maxHeight',\n ]),\n}, 'VColorInput')\n\nexport const VColorInput = genericComponent<VColorInputSlots>()({\n name: 'VColorInput',\n\n props: makeVColorInputProps(),\n\n emits: {\n 'update:modelValue': (val: string) => true,\n },\n\n setup (props, { slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const menu = shallowRef(false)\n const isFocused = shallowRef(props.focused)\n\n const isInteractive = computed(() => !props.disabled && !props.readonly)\n\n const display = computed(() => model.value || null)\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 onCancel () {\n menu.value = false\n }\n\n useRender(() => {\n const confirmEditProps = VConfirmEdit.filterProps(props)\n const colorPickerProps = VColorPicker.filterProps(omit(props, [\n 'active',\n 'bgColor',\n 'color',\n 'rounded',\n 'maxWidth',\n 'minWidth',\n 'width',\n ]))\n const textFieldProps = VTextField.filterProps(props)\n\n const slotWithPip = props.hidePip\n ? undefined\n : {\n [props.pipLocation]: (arg: any) => (\n <>\n <VAvatar\n class=\"v-color-input__pip\"\n color={ props.colorPip ? model.value as string : undefined }\n variant={ props.pipVariant }\n icon={ props.pipIcon }\n />\n { slots[props.pipLocation]?.(arg) }\n </>\n ),\n }\n\n return (\n <VTextField\n { ...textFieldProps }\n class={[\n 'v-color-input',\n props.class,\n ]}\n style={ props.style }\n modelValue={ display.value }\n onKeydown={ isInteractive.value ? onKeydown : undefined }\n focused={ menu.value || isFocused.value }\n onClick:control={ isInteractive.value ? onClick : undefined }\n onClick:prependInner={ isInteractive.value ? onClick : undefined }\n onUpdate:focused={ event => isFocused.value = event }\n onClick:appendInner={ isInteractive.value ? onClick : undefined }\n onUpdate:modelValue={ val => {\n model.value = val\n }}\n >\n {{\n ...slots,\n ...slotWithPip,\n default: () => (\n <>\n <VMenu\n v-model={ menu.value }\n activator=\"parent\"\n minWidth=\"0\"\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 }\n\n return (\n <VColorPicker\n { ...colorPickerProps }\n modelValue={ props.hideActions ? model.value : proxyModel.value }\n onUpdate:modelValue={ value => onUpdateModel(value) }\n >\n {{\n actions: !props.hideActions ? () => slots.actions?.({ save, cancel, isPristine }) ?? actions() : undefined,\n }}\n </VColorPicker>\n )\n },\n }}\n </VConfirmEdit>\n </VMenu>\n\n { slots.default?.() }\n </>\n ),\n }}\n </VTextField>\n )\n })\n },\n})\n\nexport type VColorInput = InstanceType<typeof VColorInput>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,OAAO;AAAA,SACPC,qBAAqB,EAAEC,YAAY;AAAA,SACnCC,qBAAqB,EAAEC,YAAY;AAAA,SACnCC,KAAK;AAAA,SACLC,mBAAmB,EAAEC,UAAU,qDAExC;AAAA,SACSC,cAAc;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34
  rounded?: unknown;
35
35
  tile?: unknown;
36
36
  tag?: unknown;
37
- height?: unknown;
38
- maxHeight?: unknown;
39
37
  maxWidth?: unknown;
40
- minHeight?: unknown;
41
38
  minWidth?: unknown;
42
39
  width?: unknown;
43
40
  loading?: unknown;
@@ -278,22 +275,10 @@ export declare const makeVDateInputProps: <Defaults extends {
278
275
  type: PropType<unknown extends Defaults["tag"] ? string | import("../../util/index.js").JSXComponent : string | Defaults["tag"] | import("../../util/index.js").JSXComponent>;
279
276
  default: unknown extends Defaults["tag"] ? string | import("../../util/index.js").JSXComponent : Defaults["tag"] | NonNullable<string | import("../../util/index.js").JSXComponent>;
280
277
  };
281
- height: unknown extends Defaults["height"] ? (NumberConstructor | StringConstructor)[] : {
282
- type: PropType<unknown extends Defaults["height"] ? string | number : string | number | Defaults["height"]>;
283
- default: unknown extends Defaults["height"] ? string | number : Defaults["height"] | NonNullable<string | number>;
284
- };
285
- maxHeight: unknown extends Defaults["maxHeight"] ? (NumberConstructor | StringConstructor)[] : {
286
- type: PropType<unknown extends Defaults["maxHeight"] ? string | number : string | number | Defaults["maxHeight"]>;
287
- default: unknown extends Defaults["maxHeight"] ? string | number : Defaults["maxHeight"] | NonNullable<string | number>;
288
- };
289
278
  maxWidth: unknown extends Defaults["maxWidth"] ? (NumberConstructor | StringConstructor)[] : {
290
279
  type: PropType<unknown extends Defaults["maxWidth"] ? string | number : string | number | Defaults["maxWidth"]>;
291
280
  default: unknown extends Defaults["maxWidth"] ? string | number : Defaults["maxWidth"] | NonNullable<string | number>;
292
281
  };
293
- minHeight: unknown extends Defaults["minHeight"] ? (NumberConstructor | StringConstructor)[] : {
294
- type: PropType<unknown extends Defaults["minHeight"] ? string | number : string | number | Defaults["minHeight"]>;
295
- default: unknown extends Defaults["minHeight"] ? string | number : Defaults["minHeight"] | NonNullable<string | number>;
296
- };
297
282
  minWidth: unknown extends Defaults["minWidth"] ? (NumberConstructor | StringConstructor)[] : {
298
283
  type: PropType<unknown extends Defaults["minWidth"] ? string | number : string | number | Defaults["minWidth"]>;
299
284
  default: unknown extends Defaults["minWidth"] ? string | number : Defaults["minWidth"] | NonNullable<string | number>;
@@ -917,10 +902,7 @@ export declare const VDateInput: {
917
902
  border?: string | number | boolean | undefined;
918
903
  elevation?: string | number | undefined;
919
904
  rounded?: string | number | boolean | undefined;
920
- height?: string | number | undefined;
921
- maxHeight?: string | number | undefined;
922
905
  maxWidth?: string | number | undefined;
923
- minHeight?: string | number | undefined;
924
906
  minWidth?: string | number | undefined;
925
907
  width?: string | number | undefined;
926
908
  loading?: string | boolean | undefined;
@@ -3346,10 +3328,7 @@ export declare const VDateInput: {
3346
3328
  border?: string | number | boolean | undefined;
3347
3329
  elevation?: string | number | undefined;
3348
3330
  rounded?: string | number | boolean | undefined;
3349
- height?: string | number | undefined;
3350
- maxHeight?: string | number | undefined;
3351
3331
  maxWidth?: string | number | undefined;
3352
- minHeight?: string | number | undefined;
3353
3332
  minWidth?: string | number | undefined;
3354
3333
  width?: string | number | undefined;
3355
3334
  loading?: string | boolean | undefined;
@@ -5677,10 +5656,7 @@ export declare const VDateInput: {
5677
5656
  border?: string | number | boolean | undefined;
5678
5657
  elevation?: string | number | undefined;
5679
5658
  rounded?: string | number | boolean | undefined;
5680
- height?: string | number | undefined;
5681
- maxHeight?: string | number | undefined;
5682
5659
  maxWidth?: string | number | undefined;
5683
- minHeight?: string | number | undefined;
5684
5660
  minWidth?: string | number | undefined;
5685
5661
  width?: string | number | undefined;
5686
5662
  loading?: string | boolean | undefined;
@@ -8097,10 +8073,7 @@ export declare const VDateInput: {
8097
8073
  type: PropType<string | import("../../util/index.js").JSXComponent>;
8098
8074
  default: string;
8099
8075
  };
8100
- height: (NumberConstructor | StringConstructor)[];
8101
- maxHeight: (NumberConstructor | StringConstructor)[];
8102
8076
  maxWidth: (NumberConstructor | StringConstructor)[];
8103
- minHeight: (NumberConstructor | StringConstructor)[];
8104
8077
  minWidth: (NumberConstructor | StringConstructor)[];
8105
8078
  width: (NumberConstructor | StringConstructor)[];
8106
8079
  loading: (BooleanConstructor | StringConstructor)[];
@@ -8342,10 +8315,7 @@ export declare const VDateInput: {
8342
8315
  type: PropType<string | import("../../util/index.js").JSXComponent>;
8343
8316
  default: string;
8344
8317
  };
8345
- height: (NumberConstructor | StringConstructor)[];
8346
- maxHeight: (NumberConstructor | StringConstructor)[];
8347
8318
  maxWidth: (NumberConstructor | StringConstructor)[];
8348
- minHeight: (NumberConstructor | StringConstructor)[];
8349
8319
  minWidth: (NumberConstructor | StringConstructor)[];
8350
8320
  width: (NumberConstructor | StringConstructor)[];
8351
8321
  loading: (BooleanConstructor | StringConstructor)[];
@@ -43,7 +43,7 @@ export const makeVDateInputProps = propsFactory({
43
43
  ...omit(makeVDatePickerProps({
44
44
  hideHeader: true,
45
45
  showAdjacentMonths: true
46
- }), ['active', 'location', 'rounded'])
46
+ }), ['active', 'location', 'rounded', 'height', 'minHeight', 'maxHeight'])
47
47
  }, 'VDateInput');
48
48
  export const VDateInput = genericComponent()({
49
49
  name: 'VDateInput',
@@ -74,6 +74,15 @@ export const VDateInput = genericComponent()({
74
74
  const {
75
75
  mobile
76
76
  } = useDisplay(props);
77
+ const clamp = date => {
78
+ if (props.max && adapter.isAfter(date, props.max)) {
79
+ return props.max;
80
+ }
81
+ if (props.min && adapter.isBefore(date, props.min)) {
82
+ return props.min;
83
+ }
84
+ return date;
85
+ };
77
86
  const emptyModelValue = () => props.multiple ? [] : null;
78
87
  const model = useProxiedModel(props, 'modelValue', emptyModelValue(), 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);
79
88
  const menu = useProxiedModel(props, 'menu');
@@ -124,7 +133,7 @@ export const VDateInput = genericComponent()({
124
133
  if (!menu.value || !isFocused.value) {
125
134
  menu.value = true;
126
135
  }
127
- if (props.updateOn.includes('enter')) {
136
+ if (props.updateOn.includes('enter') && !props.readonly) {
128
137
  onUserInput(e.target);
129
138
  }
130
139
  }
@@ -151,7 +160,7 @@ export const VDateInput = genericComponent()({
151
160
  model.value = emptyModelValue();
152
161
  }
153
162
  function onBlur(e) {
154
- if (props.updateOn.includes('blur')) {
163
+ if (props.updateOn.includes('blur') && !props.readonly) {
155
164
  onUserInput(e.target);
156
165
  }
157
166
 
@@ -169,23 +178,23 @@ export const VDateInput = genericComponent()({
169
178
  model.value = emptyModelValue();
170
179
  } else if (!props.multiple) {
171
180
  if (isValid(value)) {
172
- model.value = parseDate(value);
181
+ model.value = clamp(parseDate(value));
173
182
  }
174
183
  } else {
175
184
  const parts = value.trim().split(/\D+-\D+|[^\d\-/.]+/);
176
185
  if (parts.every(isValid)) {
177
186
  if (props.multiple === 'range') {
178
- const [start, stop] = parts.map(parseDate).toSorted((a, b) => adapter.isAfter(a, b) ? 1 : -1);
187
+ const [start, stop] = parts.map(parseDate).map(clamp).toSorted((a, b) => adapter.isAfter(a, b) ? 1 : -1);
179
188
  model.value = createDateRange(adapter, start, stop);
180
189
  } else {
181
- model.value = parts.map(parseDate);
190
+ model.value = parts.map(parseDate).map(clamp);
182
191
  }
183
192
  }
184
193
  }
185
194
  }
186
195
  useRender(() => {
187
196
  const confirmEditProps = VConfirmEdit.filterProps(props);
188
- const datePickerProps = VDatePicker.filterProps(omit(props, ['active', 'location', 'rounded']));
197
+ const datePickerProps = VDatePicker.filterProps(omit(props, ['active', 'bgColor', 'color', 'location', 'rounded', 'maxWidth', 'minWidth', 'width']));
189
198
  const datePickerSlots = pick(slots, ['title', 'header', 'day', 'month', 'year']);
190
199
  const textFieldProps = VTextField.filterProps(omit(props, ['placeholder']));
191
200
  return _createVNode(VTextField, _mergeProps({
@@ -1 +1 @@
1
- {"version":3,"file":"VDateInput.js","names":["makeVConfirmEditProps","VConfirmEdit","makeVDatePickerProps","VDatePicker","VMenu","makeVTextFieldProps","VTextField","useDate","createDateRange","makeDateFormatProps","useDateFormat","makeDisplayProps","useDisplay","makeFocusProps","forwardRefs","useLocale","useProxiedModel","computed","ref","shallowRef","watch","genericComponent","omit","pick","propsFactory","useRender","wrapInArray","makeVDateInputProps","displayFormat","type","Function","String","default","undefined","location","menu","Boolean","updateOn","Array","mobile","hideActions","prependIcon","hideHeader","showAdjacentMonths","VDateInput","name","props","emits","save","value","cancel","val","setup","_ref","emit","slots","t","current","currentLocale","adapter","isValid","parseDate","formatDate","parserFormat","emptyModelValue","multiple","model","isArray","map","item","toJsDate","date","isEditingInput","isFocused","focused","vTextFieldRef","disabledActions","format","display","length","start","end","inputmode","isInteractive","disabled","readonly","isReadonly","onKeydown","e","key","includes","onUserInput","target","onClick","preventDefault","stopPropagation","onCancel","onSave","onUpdateDisplayModel","onBlur","_ref2","trim","parts","split","every","stop","toSorted","a","b","isAfter","confirmEditProps","filterProps","datePickerProps","datePickerSlots","textFieldProps","_createVNode","_mergeProps","class","style","placeholder","event","_createElementVNode","_Fragment","$event","_ref3","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 { createDateRange } from '@/composables/date/date'\nimport { makeDateFormatProps, useDateFormat } from '@/composables/dateFormat'\nimport { makeDisplayProps, useDisplay } from '@/composables/display'\nimport { makeFocusProps } 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, pick, propsFactory, useRender, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VDatePickerSlots } from '@/components/VDatePicker/VDatePicker'\nimport type { StrategyProps } from '@/components/VOverlay/locationStrategies'\nimport type { VTextFieldSlots } from '@/components/VTextField/VTextField'\nimport type { GenericProps } from '@/util'\n\n// Types\nexport type VDateInputActionsSlot = {\n save: () => void\n cancel: () => void\n isPristine: boolean\n}\n\nexport type VDateInputSlots = Omit<VTextFieldSlots, 'default'> &\n Pick<VDatePickerSlots, 'title' | 'header' | 'day' | 'month' | 'year'> & {\n actions: VDateInputActionsSlot\n default: never\n }\n\nexport const makeVDateInputProps = propsFactory({\n displayFormat: {\n type: [Function, String] as PropType<string | ((date: unknown) => any)>,\n default: undefined,\n },\n location: {\n type: String as PropType<StrategyProps['location']>,\n default: 'bottom start',\n },\n menu: Boolean,\n updateOn: {\n type: Array as PropType<('blur' | 'enter')[]>,\n default: () => ['blur', 'enter'],\n },\n\n ...makeDateFormatProps(),\n ...makeDisplayProps({\n mobile: null,\n }),\n ...makeFocusProps(),\n ...makeVConfirmEditProps({\n hideActions: true,\n }),\n ...makeVTextFieldProps({\n prependIcon: '$calendar',\n }),\n ...omit(makeVDatePickerProps({\n hideHeader: true,\n showAdjacentMonths: true,\n }), ['active', 'location', 'rounded']),\n}, 'VDateInput')\n\nexport const VDateInput = genericComponent<new <\n T,\n Multiple extends boolean | 'range' | number | (string & {}) = false,\n TModel = Multiple extends true | number | string\n ? T[]\n : T,\n> (\n props: {\n modelValue?: TModel\n onSave?: (value: TModel) => void\n 'onUpdate:modelValue'?: (value: TModel) => void\n multiple?: Multiple\n },\n slots: VDateInputSlots\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VDateInput',\n\n props: makeVDateInputProps(),\n\n emits: {\n save: (value: unknown) => true,\n cancel: () => true,\n 'update:focused': (val: boolean) => true,\n 'update:modelValue': (val: unknown) => true,\n 'update:menu': (val: boolean) => true,\n },\n\n setup (props, { emit, slots }) {\n const { t, current: currentLocale } = useLocale()\n const adapter = useDate()\n const { isValid, parseDate, formatDate, parserFormat } = useDateFormat(props, currentLocale)\n const { mobile } = useDisplay(props)\n\n const emptyModelValue = () => props.multiple ? [] : null\n\n const model = useProxiedModel(\n props,\n 'modelValue',\n emptyModelValue(),\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 = useProxiedModel(props, 'menu')\n const isEditingInput = shallowRef(false)\n const isFocused = shallowRef(props.focused)\n const vTextFieldRef = ref<VTextField>()\n const disabledActions = ref<typeof VConfirmEdit['props']['disabled']>(['save'])\n\n function format (date: unknown) {\n if (typeof props.displayFormat === 'function') {\n return props.displayFormat(date)\n }\n if (props.displayFormat) {\n return adapter.format(date, props.displayFormat ?? 'keyboardDate')\n }\n return formatDate(date)\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\n const isReadonly = computed(() => {\n if (!props.updateOn.length) return true\n\n return !(mobile.value && isEditingInput.value) && props.readonly\n })\n\n watch(menu, val => {\n if (val) return\n\n isEditingInput.value = false\n disabledActions.value = ['save']\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\n if (props.updateOn.includes('enter')) {\n onUserInput(e.target as HTMLInputElement)\n }\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: unknown) {\n if (value != null) return\n\n model.value = emptyModelValue()\n }\n\n function onBlur (e: FocusEvent) {\n if (props.updateOn.includes('blur')) {\n onUserInput(e.target as HTMLInputElement)\n }\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 function onUserInput ({ value }: HTMLInputElement) {\n if (!value.trim()) {\n model.value = emptyModelValue()\n } else if (!props.multiple) {\n if (isValid(value)) {\n model.value = parseDate(value)\n }\n } else {\n const parts = value.trim().split(/\\D+-\\D+|[^\\d\\-/.]+/)\n if (parts.every(isValid)) {\n if (props.multiple === 'range') {\n const [start, stop] = parts.map(parseDate).toSorted((a, b) => adapter.isAfter(a, b) ? 1 : -1)\n model.value = createDateRange(adapter, start, stop)\n } else {\n model.value = parts.map(parseDate)\n }\n }\n }\n }\n\n useRender(() => {\n const confirmEditProps = VConfirmEdit.filterProps(props)\n const datePickerProps = VDatePicker.filterProps(omit(props, ['active', 'location', 'rounded']))\n const datePickerSlots = pick(slots, ['title', 'header', 'day', 'month', 'year'])\n const textFieldProps = VTextField.filterProps(omit(props, ['placeholder']))\n\n return (\n <VTextField\n ref={ vTextFieldRef }\n { ...textFieldProps }\n class={ props.class }\n style={ props.style }\n modelValue={ display.value }\n inputmode={ inputmode.value }\n placeholder={ props.placeholder ?? parserFormat.value }\n readonly={ isReadonly.value }\n onKeydown={ isInteractive.value ? onKeydown : undefined }\n focused={ menu.value || isFocused.value }\n onBlur={ onBlur }\n validationValue={ model.value }\n onClick:control={ isInteractive.value ? onClick : undefined }\n onClick:prepend={ isInteractive.value ? onClick : undefined }\n onUpdate:modelValue={ onUpdateDisplayModel }\n onUpdate:focused={ event => isFocused.value = event }\n >\n {{\n ...slots,\n default: () => (\n <>\n <VMenu\n v-model={ menu.value }\n activator=\"parent\"\n minWidth=\"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 disabled={ disabledActions.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\n disabledActions.value = []\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 ...datePickerSlots,\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({}, vTextFieldRef)\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,qDAExC;AAAA,SACSC,OAAO;AAAA,SACPC,eAAe;AAAA,SACfC,mBAAmB,EAAEC,aAAa;AAAA,SAClCC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,cAAc;AAAA,SACdC,WAAW;AAAA,SACXC,SAAS;AAAA,SACTC,eAAe,6CAExB;AACA,SAASC,QAAQ,EAAEC,GAAG,EAAEC,UAAU,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC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,GAAG,CAAC;MAEtB;IAIT,CAAC,CAAC;IAEF,OAAOlB,WAAW,CAAC,CAAC,CAAC,EAAE6D,aAAa,CAAC;EACvC;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"VDateInput.js","names":["makeVConfirmEditProps","VConfirmEdit","makeVDatePickerProps","VDatePicker","VMenu","makeVTextFieldProps","VTextField","useDate","createDateRange","makeDateFormatProps","useDateFormat","makeDisplayProps","useDisplay","makeFocusProps","forwardRefs","useLocale","useProxiedModel","computed","ref","shallowRef","watch","genericComponent","omit","pick","propsFactory","useRender","wrapInArray","makeVDateInputProps","displayFormat","type","Function","String","default","undefined","location","menu","Boolean","updateOn","Array","mobile","hideActions","prependIcon","hideHeader","showAdjacentMonths","VDateInput","name","props","emits","save","value","cancel","val","setup","_ref","emit","slots","t","current","currentLocale","adapter","isValid","parseDate","formatDate","parserFormat","clamp","date","max","isAfter","min","isBefore","emptyModelValue","multiple","model","isArray","map","item","toJsDate","isEditingInput","isFocused","focused","vTextFieldRef","disabledActions","format","display","length","start","end","inputmode","isInteractive","disabled","readonly","isReadonly","onKeydown","e","key","includes","onUserInput","target","onClick","preventDefault","stopPropagation","onCancel","onSave","onUpdateDisplayModel","onBlur","_ref2","trim","parts","split","every","stop","toSorted","a","b","confirmEditProps","filterProps","datePickerProps","datePickerSlots","textFieldProps","_createVNode","_mergeProps","class","style","placeholder","event","_createElementVNode","_Fragment","$event","_ref3","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 { createDateRange } from '@/composables/date/date'\nimport { makeDateFormatProps, useDateFormat } from '@/composables/dateFormat'\nimport { makeDisplayProps, useDisplay } from '@/composables/display'\nimport { makeFocusProps } 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, pick, propsFactory, useRender, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VDatePickerSlots } from '@/components/VDatePicker/VDatePicker'\nimport type { StrategyProps } from '@/components/VOverlay/locationStrategies'\nimport type { VTextFieldSlots } from '@/components/VTextField/VTextField'\nimport type { GenericProps } from '@/util'\n\n// Types\nexport type VDateInputActionsSlot = {\n save: () => void\n cancel: () => void\n isPristine: boolean\n}\n\nexport type VDateInputSlots = Omit<VTextFieldSlots, 'default'> &\n Pick<VDatePickerSlots, 'title' | 'header' | 'day' | 'month' | 'year'> & {\n actions: VDateInputActionsSlot\n default: never\n }\n\nexport const makeVDateInputProps = propsFactory({\n displayFormat: {\n type: [Function, String] as PropType<string | ((date: unknown) => any)>,\n default: undefined,\n },\n location: {\n type: String as PropType<StrategyProps['location']>,\n default: 'bottom start',\n },\n menu: Boolean,\n updateOn: {\n type: Array as PropType<('blur' | 'enter')[]>,\n default: () => ['blur', 'enter'],\n },\n\n ...makeDateFormatProps(),\n ...makeDisplayProps({\n mobile: null,\n }),\n ...makeFocusProps(),\n ...makeVConfirmEditProps({\n hideActions: true,\n }),\n ...makeVTextFieldProps({\n prependIcon: '$calendar',\n }),\n ...omit(makeVDatePickerProps({\n hideHeader: true,\n showAdjacentMonths: true,\n }), [\n 'active',\n 'location',\n 'rounded',\n 'height',\n 'minHeight',\n 'maxHeight',\n ]),\n}, 'VDateInput')\n\nexport const VDateInput = genericComponent<new <\n T,\n Multiple extends boolean | 'range' | number | (string & {}) = false,\n TModel = Multiple extends true | number | string\n ? T[]\n : T,\n> (\n props: {\n modelValue?: TModel\n onSave?: (value: TModel) => void\n 'onUpdate:modelValue'?: (value: TModel) => void\n multiple?: Multiple\n },\n slots: VDateInputSlots\n) => GenericProps<typeof props, typeof slots>>()({\n name: 'VDateInput',\n\n props: makeVDateInputProps(),\n\n emits: {\n save: (value: unknown) => true,\n cancel: () => true,\n 'update:focused': (val: boolean) => true,\n 'update:modelValue': (val: unknown) => true,\n 'update:menu': (val: boolean) => true,\n },\n\n setup (props, { emit, slots }) {\n const { t, current: currentLocale } = useLocale()\n const adapter = useDate()\n const { isValid, parseDate, formatDate, parserFormat } = useDateFormat(props, currentLocale)\n const { mobile } = useDisplay(props)\n\n const clamp = (date: unknown) => {\n if (props.max && adapter.isAfter(date, props.max)) {\n return props.max\n }\n if (props.min && adapter.isBefore(date, props.min)) {\n return props.min\n }\n return date\n }\n\n const emptyModelValue = () => props.multiple ? [] : null\n\n const model = useProxiedModel(\n props,\n 'modelValue',\n emptyModelValue(),\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 = useProxiedModel(props, 'menu')\n const isEditingInput = shallowRef(false)\n const isFocused = shallowRef(props.focused)\n const vTextFieldRef = ref<VTextField>()\n const disabledActions = ref<typeof VConfirmEdit['props']['disabled']>(['save'])\n\n function format (date: unknown) {\n if (typeof props.displayFormat === 'function') {\n return props.displayFormat(date)\n }\n if (props.displayFormat) {\n return adapter.format(date, props.displayFormat ?? 'keyboardDate')\n }\n return formatDate(date)\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\n const isReadonly = computed(() => {\n if (!props.updateOn.length) return true\n\n return !(mobile.value && isEditingInput.value) && props.readonly\n })\n\n watch(menu, val => {\n if (val) return\n\n isEditingInput.value = false\n disabledActions.value = ['save']\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\n if (props.updateOn.includes('enter') && !props.readonly) {\n onUserInput(e.target as HTMLInputElement)\n }\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: unknown) {\n if (value != null) return\n\n model.value = emptyModelValue()\n }\n\n function onBlur (e: FocusEvent) {\n if (props.updateOn.includes('blur') && !props.readonly) {\n onUserInput(e.target as HTMLInputElement)\n }\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 function onUserInput ({ value }: HTMLInputElement) {\n if (!value.trim()) {\n model.value = emptyModelValue()\n } else if (!props.multiple) {\n if (isValid(value)) {\n model.value = clamp(parseDate(value))\n }\n } else {\n const parts = value.trim().split(/\\D+-\\D+|[^\\d\\-/.]+/)\n if (parts.every(isValid)) {\n if (props.multiple === 'range') {\n const [start, stop] = parts.map(parseDate).map(clamp).toSorted((a, b) => adapter.isAfter(a, b) ? 1 : -1)\n model.value = createDateRange(adapter, start, stop)\n } else {\n model.value = parts.map(parseDate).map(clamp)\n }\n }\n }\n }\n\n useRender(() => {\n const confirmEditProps = VConfirmEdit.filterProps(props)\n const datePickerProps = VDatePicker.filterProps(omit(props, [\n 'active',\n 'bgColor',\n 'color',\n 'location',\n 'rounded',\n 'maxWidth',\n 'minWidth',\n 'width',\n ]))\n const datePickerSlots = pick(slots, ['title', 'header', 'day', 'month', 'year'])\n const textFieldProps = VTextField.filterProps(omit(props, ['placeholder']))\n\n return (\n <VTextField\n ref={ vTextFieldRef }\n { ...textFieldProps }\n class={ props.class }\n style={ props.style }\n modelValue={ display.value }\n inputmode={ inputmode.value }\n placeholder={ props.placeholder ?? parserFormat.value }\n readonly={ isReadonly.value }\n onKeydown={ isInteractive.value ? onKeydown : undefined }\n focused={ menu.value || isFocused.value }\n onBlur={ onBlur }\n validationValue={ model.value }\n onClick:control={ isInteractive.value ? onClick : undefined }\n onClick:prepend={ isInteractive.value ? onClick : undefined }\n onUpdate:modelValue={ onUpdateDisplayModel }\n onUpdate:focused={ event => isFocused.value = event }\n >\n {{\n ...slots,\n default: () => (\n <>\n <VMenu\n v-model={ menu.value }\n activator=\"parent\"\n minWidth=\"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 disabled={ disabledActions.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\n disabledActions.value = []\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 ...datePickerSlots,\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({}, vTextFieldRef)\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,qDAExC;AAAA,SACSC,OAAO;AAAA,SACPC,eAAe;AAAA,SACfC,mBAAmB,EAAEC,aAAa;AAAA,SAClCC,gBAAgB,EAAEC,UAAU;AAAA,SAC5BC,cAAc;AAAA,SACdC,WAAW;AAAA,SACXC,SAAS;AAAA,SACTC,eAAe,6CAExB;AACA,SAASC,QAAQ,EAAEC,GAAG,EAAEC,UAAU,EAAEC,KAAK,QAAQ,KAAK;AAAA,SAC7CC,gBAAgB,EAAEC,IAAI,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,EAAEC,WAAW,+BAE3E;AAOA;AAaA,OAAO,MAAMC,mBAAmB,GAAGH,YAAY,CAAC;EAC9CI,aAAa,EAAE;IACbC,IAAI,EAAE,CAACC,QAAQ,EAAEC,MAAM,CAAgD;IACvEC,OAAO,EAAEC;EACX,CAAC;EACDC,QAAQ,EAAE;IACRL,IAAI,EAAEE,MAA6C;IACnDC,OAAO,EAAE;EACX,CAAC;EACDG,IAAI,EAAEC,OAAO;EACbC,QAAQ,EAAE;IACRR,IAAI,EAAES,KAAuC;IAC7CN,OAAO,EAAEA,CAAA,KAAM,CAAC,MAAM,EAAE,OAAO;EACjC,CAAC;EAED,GAAGvB,mBAAmB,CAAC,CAAC;EACxB,GAAGE,gBAAgB,CAAC;IAClB4B,MAAM,EAAE;EACV,CAAC,CAAC;EACF,GAAG1B,cAAc,CAAC,CAAC;EACnB,GAAGb,qBAAqB,CAAC;IACvBwC,WAAW,EAAE;EACf,CAAC,CAAC;EACF,GAAGnC,mBAA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,WAAW,CAAC,CAAC,CAAC,EAAEkE,aAAa,CAAC;EACvC;AACF,CAAC,CAAC","ignoreList":[]}
@@ -175,4 +175,26 @@
175
175
  }
176
176
  .v-icon-btn--active:not(:hover) .v-icon-btn__overlay {
177
177
  --v-activated-opacity: 0;
178
+ }
179
+
180
+ @media (forced-colors: active) {
181
+ .v-icon-btn:focus-visible {
182
+ outline: 2px solid;
183
+ outline-offset: 2px;
184
+ }
185
+ .v-icon-btn:not(.v-icon-btn--active):hover, .v-icon-btn:not(.v-icon-btn--active):focus {
186
+ color: highlight !important;
187
+ }
188
+ .v-icon-btn--active:not(.v-icon-btn--disabled), .v-icon-btn--active:not(.v-icon-btn--disabled)[class*=bg-] {
189
+ outline-color: canvastext !important;
190
+ background: highlight !important;
191
+ color: highlighttext !important;
192
+ }
193
+ .v-icon-btn--disabled {
194
+ color: graytext;
195
+ }
196
+ .v-icon-btn__overlay, .v-icon-btn__underlay,
197
+ .v-icon-btn .v-icon {
198
+ forced-color-adjust: preserve-parent-color;
199
+ }
178
200
  }
@@ -107,4 +107,36 @@
107
107
  --v-activated-opacity: 0;
108
108
  }
109
109
  }
110
+
111
+ @media (forced-colors: active) {
112
+ .v-icon-btn {
113
+ &:focus-visible {
114
+ outline: 2px solid;
115
+ outline-offset: 2px;
116
+ }
117
+
118
+ &:not(&--active):hover,
119
+ &:not(&--active):focus {
120
+ color: highlight !important;
121
+ }
122
+
123
+ &--active:not(&--disabled),
124
+ &--active:not(&--disabled)[class*="bg-"]
125
+ {
126
+ outline-color: canvastext !important;
127
+ background: highlight !important;
128
+ color: highlighttext !important;
129
+ }
130
+
131
+ &--disabled {
132
+ color: graytext;
133
+ }
134
+
135
+ &__overlay,
136
+ &__underlay,
137
+ .v-icon {
138
+ forced-color-adjust: preserve-parent-color;
139
+ }
140
+ }
141
+ }
110
142
  }
@@ -31,7 +31,7 @@ export const VMaskInput = genericComponent()({
31
31
  // Always display masked value in input when mask is applied
32
32
  val => props.mask ? mask.mask(mask.unmask(val)) : val, val => {
33
33
  if (props.mask) {
34
- const valueWithoutDelimiters = removeMaskDelimiters(val);
34
+ const valueWithoutDelimiters = val ? removeMaskDelimiters(val) : '';
35
35
 
36
36
  // E.g. mask is #-# and the input value is '2-23'
37
37
  // model-value should be enforced to '2-2'