@vuetify/nightly 3.6.10-master.2024-06-21 → 3.6.11-dev.2024-07-03
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -2
- package/dist/json/attributes.json +291 -119
- package/dist/json/importMap-labs.json +28 -28
- package/dist/json/importMap.json +106 -106
- package/dist/json/tags.json +49 -6
- package/dist/json/web-types.json +601 -211
- package/dist/vuetify-labs.css +2575 -2559
- package/dist/vuetify-labs.d.ts +802 -519
- package/dist/vuetify-labs.esm.js +86 -71
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +86 -71
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +627 -611
- package/dist/vuetify.d.ts +716 -505
- package/dist/vuetify.esm.js +36 -16
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +36 -16
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +24 -24
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VAppBar/index.d.mts +6 -0
- package/lib/components/VAutocomplete/index.d.mts +49 -49
- package/lib/components/VAvatar/VAvatar.css +7 -0
- package/lib/components/VAvatar/VAvatar.mjs +6 -1
- package/lib/components/VAvatar/VAvatar.mjs.map +1 -1
- package/lib/components/VAvatar/VAvatar.sass +1 -0
- package/lib/components/VAvatar/_variables.scss +13 -0
- package/lib/components/VAvatar/index.d.mts +6 -0
- package/lib/components/VBottomSheet/index.d.mts +7 -7
- package/lib/components/VBreadcrumbs/index.d.mts +8 -8
- package/lib/components/VBtn/VBtn.mjs +3 -1
- package/lib/components/VBtn/VBtn.mjs.map +1 -1
- package/lib/components/VBtn/index.d.mts +6 -0
- package/lib/components/VCarousel/index.d.mts +16 -7
- package/lib/components/VCheckbox/index.d.mts +6 -6
- package/lib/components/VCombobox/index.d.mts +49 -49
- package/lib/components/VDialog/index.d.mts +31 -31
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs +7 -2
- package/lib/components/VExpansionPanel/VExpansionPanelTitle.mjs.map +1 -1
- package/lib/components/VExpansionPanel/index.d.mts +122 -14
- package/lib/components/VFab/index.d.mts +6 -0
- package/lib/components/VFileInput/index.d.mts +18 -18
- package/lib/components/VForm/index.d.mts +9 -9
- package/lib/components/VGrid/VContainer.mjs +6 -1
- package/lib/components/VGrid/VContainer.mjs.map +1 -1
- package/lib/components/VGrid/index.d.mts +36 -0
- package/lib/components/VImg/VImg.css +9 -0
- package/lib/components/VImg/VImg.mjs +2 -0
- package/lib/components/VImg/VImg.mjs.map +1 -1
- package/lib/components/VImg/VImg.sass +9 -0
- package/lib/components/VImg/index.d.mts +16 -7
- package/lib/components/VInput/index.d.mts +6 -6
- package/lib/components/VList/index.d.mts +12 -12
- package/lib/components/VMenu/index.d.mts +33 -33
- package/lib/components/VOverlay/VOverlay.mjs +1 -1
- package/lib/components/VOverlay/VOverlay.mjs.map +1 -1
- package/lib/components/VOverlay/index.d.mts +7 -7
- package/lib/components/VRadioGroup/index.d.mts +6 -6
- package/lib/components/VRangeSlider/index.d.mts +6 -6
- package/lib/components/VSelect/index.d.mts +49 -49
- package/lib/components/VSlideGroup/VSlideGroup.mjs +3 -1
- package/lib/components/VSlideGroup/VSlideGroup.mjs.map +1 -1
- package/lib/components/VSlideGroup/index.d.mts +6 -0
- package/lib/components/VSlider/index.d.mts +6 -6
- package/lib/components/VSnackbar/index.d.mts +33 -33
- package/lib/components/VSpeedDial/index.d.mts +9 -9
- package/lib/components/VSwitch/index.d.mts +6 -6
- package/lib/components/VTabs/index.d.mts +21 -3
- package/lib/components/VTextField/index.d.mts +18 -18
- package/lib/components/VTextarea/index.d.mts +18 -18
- package/lib/components/VTooltip/index.d.mts +39 -39
- package/lib/components/VValidation/index.d.mts +9 -8
- package/lib/components/index.d.mts +675 -464
- package/lib/composables/validation.mjs +8 -6
- package/lib/composables/validation.mjs.map +1 -1
- package/lib/entry-bundler.mjs +1 -1
- package/lib/entry-bundler.mjs.map +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/framework.mjs.map +1 -1
- package/lib/index.d.mts +41 -41
- package/lib/labs/VDateInput/index.d.mts +6 -6
- package/lib/labs/VNumberInput/VNumberInput.mjs +48 -55
- package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
- package/lib/labs/VNumberInput/index.d.mts +6 -6
- package/lib/labs/VSnackbarQueue/index.d.mts +42 -42
- package/lib/labs/VStepperVertical/VStepperVertical.mjs +2 -0
- package/lib/labs/VStepperVertical/VStepperVertical.mjs.map +1 -1
- package/lib/labs/VStepperVertical/index.d.mts +90 -18
- package/lib/labs/VTreeview/index.d.mts +16 -16
- package/lib/labs/components.d.mts +160 -88
- package/package.json +1 -1
@@ -51,12 +51,14 @@ export function useValidation(props) {
|
|
51
51
|
const validateOn = computed(() => {
|
52
52
|
let value = (props.validateOn ?? form?.validateOn.value) || 'input';
|
53
53
|
if (value === 'lazy') value = 'input lazy';
|
54
|
+
if (value === 'eager') value = 'input eager';
|
54
55
|
const set = new Set(value?.split(' ') ?? []);
|
55
56
|
return {
|
56
|
-
blur: set.has('blur') || set.has('input'),
|
57
57
|
input: set.has('input'),
|
58
|
-
|
59
|
-
|
58
|
+
blur: set.has('blur') || set.has('input') || set.has('invalid-input'),
|
59
|
+
invalidInput: set.has('invalid-input'),
|
60
|
+
lazy: set.has('lazy'),
|
61
|
+
eager: set.has('eager')
|
60
62
|
};
|
61
63
|
});
|
62
64
|
const isValid = computed(() => {
|
@@ -93,11 +95,11 @@ export function useValidation(props) {
|
|
93
95
|
});
|
94
96
|
onMounted(async () => {
|
95
97
|
if (!validateOn.value.lazy) {
|
96
|
-
await validate(
|
98
|
+
await validate(!validateOn.value.eager);
|
97
99
|
}
|
98
100
|
form?.update(uid.value, isValid.value, errorMessages.value);
|
99
101
|
});
|
100
|
-
useToggleScope(() => validateOn.value.input, () => {
|
102
|
+
useToggleScope(() => validateOn.value.input || validateOn.value.invalidInput && isValid.value === false, () => {
|
101
103
|
watch(validationModel, () => {
|
102
104
|
if (validationModel.value != null) {
|
103
105
|
validate();
|
@@ -125,7 +127,7 @@ export function useValidation(props) {
|
|
125
127
|
async function resetValidation() {
|
126
128
|
isPristine.value = true;
|
127
129
|
if (!validateOn.value.lazy) {
|
128
|
-
await validate(
|
130
|
+
await validate(!validateOn.value.eager);
|
129
131
|
} else {
|
130
132
|
internalErrorMessages.value = [];
|
131
133
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"validation.mjs","names":["makeFocusProps","useForm","useProxiedModel","useToggleScope","computed","nextTick","onBeforeMount","onBeforeUnmount","onMounted","ref","shallowRef","unref","watch","getCurrentInstance","getCurrentInstanceName","getUid","propsFactory","wrapInArray","makeValidationProps","disabled","type","Boolean","default","error","errorMessages","Array","String","maxErrors","Number","name","label","readonly","rules","modelValue","validateOn","validationValue","useValidation","props","arguments","length","undefined","id","model","validationModel","value","form","internalErrorMessages","isPristine","isDirty","isDisabled","isReadonly","concat","slice","Math","max","set","Set","split","blur","has","input","submit","lazy","isValid","isValidating","validationClasses","vm","uid","register","validate","reset","resetValidation","unregister","update","focused","unwatch","val","silent","results","rule","handler","result","console","warn","push"],"sources":["../../src/composables/validation.ts"],"sourcesContent":["// Composables\nimport { makeFocusProps } from '@/composables/focus'\nimport { useForm } from '@/composables/form'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { useToggleScope } from '@/composables/toggleScope'\n\n// Utilities\nimport { computed, nextTick, onBeforeMount, onBeforeUnmount, onMounted, ref, shallowRef, unref, watch } from 'vue'\nimport { getCurrentInstance, getCurrentInstanceName, getUid, propsFactory, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { EventProp, MaybeRef } from '@/util'\n\nexport type ValidationResult = string | boolean\nexport type ValidationRule =\n | ValidationResult\n | PromiseLike<ValidationResult>\n | ((value: any) => ValidationResult)\n | ((value: any) => PromiseLike<ValidationResult>)\n\ntype ValidateOnValue = 'blur' | 'input' | 'submit'\n\nexport interface ValidationProps {\n disabled: boolean | null\n error: boolean\n errorMessages: string | readonly string[] | null\n focused: boolean\n maxErrors: string | number\n name: string | undefined\n label: string | undefined\n readonly: boolean | null\n rules: readonly ValidationRule[]\n modelValue: any\n 'onUpdate:modelValue': EventProp | undefined\n validateOn?: ValidateOnValue | `${ValidateOnValue} lazy` | `lazy ${ValidateOnValue}` | 'lazy'\n validationValue: any\n}\n\nexport const makeValidationProps = propsFactory({\n disabled: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n error: Boolean,\n errorMessages: {\n type: [Array, String] as PropType<string | readonly string[] | null>,\n default: () => ([]),\n },\n maxErrors: {\n type: [Number, String],\n default: 1,\n },\n name: String,\n label: String,\n readonly: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n rules: {\n type: Array as PropType<readonly ValidationRule[]>,\n default: () => ([]),\n },\n modelValue: null,\n validateOn: String as PropType<ValidationProps['validateOn']>,\n validationValue: null,\n\n ...makeFocusProps(),\n}, 'validation')\n\nexport function useValidation (\n props: ValidationProps,\n name = getCurrentInstanceName(),\n id: MaybeRef<string | number> = getUid(),\n) {\n const model = useProxiedModel(props, 'modelValue')\n const validationModel = computed(() => props.validationValue === undefined ? model.value : props.validationValue)\n const form = useForm()\n const internalErrorMessages = ref<string[]>([])\n const isPristine = shallowRef(true)\n const isDirty = computed(() => !!(\n wrapInArray(model.value === '' ? null : model.value).length ||\n wrapInArray(validationModel.value === '' ? null : validationModel.value).length\n ))\n const isDisabled = computed(() => !!(props.disabled ?? form?.isDisabled.value))\n const isReadonly = computed(() => !!(props.readonly ?? form?.isReadonly.value))\n const errorMessages = computed(() => {\n return props.errorMessages?.length\n ? wrapInArray(props.errorMessages).concat(internalErrorMessages.value).slice(0, Math.max(0, +props.maxErrors))\n : internalErrorMessages.value\n })\n const validateOn = computed(() => {\n let value = (props.validateOn ?? form?.validateOn.value) || 'input'\n if (value === 'lazy') value = 'input lazy'\n const set = new Set(value?.split(' ') ?? [])\n\n return {\n blur: set.has('blur') || set.has('input'),\n input: set.has('input'),\n submit: set.has('submit'),\n lazy: set.has('lazy'),\n }\n })\n const isValid = computed(() => {\n if (props.error || props.errorMessages?.length) return false\n if (!props.rules.length) return true\n if (isPristine.value) {\n return internalErrorMessages.value.length || validateOn.value.lazy ? null : true\n } else {\n return !internalErrorMessages.value.length\n }\n })\n const isValidating = shallowRef(false)\n const validationClasses = computed(() => {\n return {\n [`${name}--error`]: isValid.value === false,\n [`${name}--dirty`]: isDirty.value,\n [`${name}--disabled`]: isDisabled.value,\n [`${name}--readonly`]: isReadonly.value,\n }\n })\n\n const vm = getCurrentInstance('validation')\n const uid = computed(() => props.name ?? unref(id))\n\n onBeforeMount(() => {\n form?.register({\n id: uid.value,\n vm,\n validate,\n reset,\n resetValidation,\n })\n })\n\n onBeforeUnmount(() => {\n form?.unregister(uid.value)\n })\n\n onMounted(async () => {\n if (!validateOn.value.lazy) {\n await validate(true)\n }\n form?.update(uid.value, isValid.value, errorMessages.value)\n })\n\n useToggleScope(() => validateOn.value.input, () => {\n watch(validationModel, () => {\n if (validationModel.value != null) {\n validate()\n } else if (props.focused) {\n const unwatch = watch(() => props.focused, val => {\n if (!val) validate()\n\n unwatch()\n })\n }\n })\n })\n\n useToggleScope(() => validateOn.value.blur, () => {\n watch(() => props.focused, val => {\n if (!val) validate()\n })\n })\n\n watch([isValid, errorMessages], () => {\n form?.update(uid.value, isValid.value, errorMessages.value)\n })\n\n async function reset () {\n model.value = null\n await nextTick()\n await resetValidation()\n }\n\n async function resetValidation () {\n isPristine.value = true\n if (!validateOn.value.lazy) {\n await validate(true)\n } else {\n internalErrorMessages.value = []\n }\n }\n\n async function validate (silent = false) {\n const results = []\n\n isValidating.value = true\n\n for (const rule of props.rules) {\n if (results.length >= +(props.maxErrors ?? 1)) {\n break\n }\n\n const handler = typeof rule === 'function' ? rule : () => rule\n const result = await handler(validationModel.value)\n\n if (result === true) continue\n\n if (result !== false && typeof result !== 'string') {\n // eslint-disable-next-line no-console\n console.warn(`${result} is not a valid value. Rule functions must return boolean true or a string.`)\n\n continue\n }\n\n results.push(result || '')\n }\n\n internalErrorMessages.value = results\n isValidating.value = false\n isPristine.value = silent\n\n return internalErrorMessages.value\n }\n\n return {\n errorMessages,\n isDirty,\n isDisabled,\n isReadonly,\n isPristine,\n isValid,\n isValidating,\n reset,\n resetValidation,\n validate,\n validationClasses,\n }\n}\n"],"mappings":"AAAA;AAAA,SACSA,cAAc;AAAA,SACdC,OAAO;AAAA,SACPC,eAAe;AAAA,SACfC,cAAc,6BAEvB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,aAAa,EAAEC,eAAe,EAAEC,SAAS,EAAEC,GAAG,EAAEC,UAAU,EAAEC,KAAK,EAAEC,KAAK,QAAQ,KAAK;AAAA,SACzGC,kBAAkB,EAAEC,sBAAsB,EAAEC,MAAM,EAAEC,YAAY,EAAEC,WAAW,6BAEtF;AA6BA,OAAO,MAAMC,mBAAmB,GAAGF,YAAY,CAAC;EAC9CG,QAAQ,EAAE;IACRC,IAAI,EAAEC,OAAmC;IACzCC,OAAO,EAAE;EACX,CAAC;EACDC,KAAK,EAAEF,OAAO;EACdG,aAAa,EAAE;IACbJ,IAAI,EAAE,CAACK,KAAK,EAAEC,MAAM,CAAgD;IACpEJ,OAAO,EAAEA,CAAA,KAAO;EAClB,CAAC;EACDK,SAAS,EAAE;IACTP,IAAI,EAAE,CAACQ,MAAM,EAAEF,MAAM,CAAC;IACtBJ,OAAO,EAAE;EACX,CAAC;EACDO,IAAI,EAAEH,MAAM;EACZI,KAAK,EAAEJ,MAAM;EACbK,QAAQ,EAAE;IACRX,IAAI,EAAEC,OAAmC;IACzCC,OAAO,EAAE;EACX,CAAC;EACDU,KAAK,EAAE;IACLZ,IAAI,EAAEK,KAA4C;IAClDH,OAAO,EAAEA,CAAA,KAAO;EAClB,CAAC;EACDW,UAAU,EAAE,IAAI;EAChBC,UAAU,EAAER,MAAiD;EAC7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":3,"file":"validation.mjs","names":["makeFocusProps","useForm","useProxiedModel","useToggleScope","computed","nextTick","onBeforeMount","onBeforeUnmount","onMounted","ref","shallowRef","unref","watch","getCurrentInstance","getCurrentInstanceName","getUid","propsFactory","wrapInArray","makeValidationProps","disabled","type","Boolean","default","error","errorMessages","Array","String","maxErrors","Number","name","label","readonly","rules","modelValue","validateOn","validationValue","useValidation","props","arguments","length","undefined","id","model","validationModel","value","form","internalErrorMessages","isPristine","isDirty","isDisabled","isReadonly","concat","slice","Math","max","set","Set","split","input","has","blur","invalidInput","lazy","eager","isValid","isValidating","validationClasses","vm","uid","register","validate","reset","resetValidation","unregister","update","focused","unwatch","val","silent","results","rule","handler","result","console","warn","push"],"sources":["../../src/composables/validation.ts"],"sourcesContent":["// Composables\nimport { makeFocusProps } from '@/composables/focus'\nimport { useForm } from '@/composables/form'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { useToggleScope } from '@/composables/toggleScope'\n\n// Utilities\nimport { computed, nextTick, onBeforeMount, onBeforeUnmount, onMounted, ref, shallowRef, unref, watch } from 'vue'\nimport { getCurrentInstance, getCurrentInstanceName, getUid, propsFactory, wrapInArray } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { EventProp, MaybeRef } from '@/util'\n\nexport type ValidationResult = string | boolean\nexport type ValidationRule =\n | ValidationResult\n | PromiseLike<ValidationResult>\n | ((value: any) => ValidationResult)\n | ((value: any) => PromiseLike<ValidationResult>)\n\ntype ValidateOnValue = 'blur' | 'input' | 'submit' | 'invalid-input'\ntype ValidateOn =\n | ValidateOnValue\n | `${ValidateOnValue} lazy`\n | `${ValidateOnValue} eager`\n | `lazy ${ValidateOnValue}`\n | `eager ${ValidateOnValue}`\n | 'lazy'\n | 'eager'\n\nexport interface ValidationProps {\n disabled: boolean | null\n error: boolean\n errorMessages: string | readonly string[] | null\n focused: boolean\n maxErrors: string | number\n name: string | undefined\n label: string | undefined\n readonly: boolean | null\n rules: readonly ValidationRule[]\n modelValue: any\n 'onUpdate:modelValue': EventProp | undefined\n validateOn?: ValidateOn\n validationValue: any\n}\n\nexport const makeValidationProps = propsFactory({\n disabled: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n error: Boolean,\n errorMessages: {\n type: [Array, String] as PropType<string | readonly string[] | null>,\n default: () => ([]),\n },\n maxErrors: {\n type: [Number, String],\n default: 1,\n },\n name: String,\n label: String,\n readonly: {\n type: Boolean as PropType<boolean | null>,\n default: null,\n },\n rules: {\n type: Array as PropType<readonly ValidationRule[]>,\n default: () => ([]),\n },\n modelValue: null,\n validateOn: String as PropType<ValidationProps['validateOn']>,\n validationValue: null,\n\n ...makeFocusProps(),\n}, 'validation')\n\nexport function useValidation (\n props: ValidationProps,\n name = getCurrentInstanceName(),\n id: MaybeRef<string | number> = getUid(),\n) {\n const model = useProxiedModel(props, 'modelValue')\n const validationModel = computed(() => props.validationValue === undefined ? model.value : props.validationValue)\n const form = useForm()\n const internalErrorMessages = ref<string[]>([])\n const isPristine = shallowRef(true)\n const isDirty = computed(() => !!(\n wrapInArray(model.value === '' ? null : model.value).length ||\n wrapInArray(validationModel.value === '' ? null : validationModel.value).length\n ))\n const isDisabled = computed(() => !!(props.disabled ?? form?.isDisabled.value))\n const isReadonly = computed(() => !!(props.readonly ?? form?.isReadonly.value))\n const errorMessages = computed(() => {\n return props.errorMessages?.length\n ? wrapInArray(props.errorMessages).concat(internalErrorMessages.value).slice(0, Math.max(0, +props.maxErrors))\n : internalErrorMessages.value\n })\n const validateOn = computed(() => {\n let value = (props.validateOn ?? form?.validateOn.value) || 'input'\n if (value === 'lazy') value = 'input lazy'\n if (value === 'eager') value = 'input eager'\n const set = new Set(value?.split(' ') ?? [])\n\n return {\n input: set.has('input'),\n blur: set.has('blur') || set.has('input') || set.has('invalid-input'),\n invalidInput: set.has('invalid-input'),\n lazy: set.has('lazy'),\n eager: set.has('eager'),\n }\n })\n const isValid = computed(() => {\n if (props.error || props.errorMessages?.length) return false\n if (!props.rules.length) return true\n if (isPristine.value) {\n return internalErrorMessages.value.length || validateOn.value.lazy ? null : true\n } else {\n return !internalErrorMessages.value.length\n }\n })\n const isValidating = shallowRef(false)\n const validationClasses = computed(() => {\n return {\n [`${name}--error`]: isValid.value === false,\n [`${name}--dirty`]: isDirty.value,\n [`${name}--disabled`]: isDisabled.value,\n [`${name}--readonly`]: isReadonly.value,\n }\n })\n\n const vm = getCurrentInstance('validation')\n const uid = computed(() => props.name ?? unref(id))\n\n onBeforeMount(() => {\n form?.register({\n id: uid.value,\n vm,\n validate,\n reset,\n resetValidation,\n })\n })\n\n onBeforeUnmount(() => {\n form?.unregister(uid.value)\n })\n\n onMounted(async () => {\n if (!validateOn.value.lazy) {\n await validate(!validateOn.value.eager)\n }\n form?.update(uid.value, isValid.value, errorMessages.value)\n })\n\n useToggleScope(() => validateOn.value.input || (validateOn.value.invalidInput && isValid.value === false), () => {\n watch(validationModel, () => {\n if (validationModel.value != null) {\n validate()\n } else if (props.focused) {\n const unwatch = watch(() => props.focused, val => {\n if (!val) validate()\n\n unwatch()\n })\n }\n })\n })\n\n useToggleScope(() => validateOn.value.blur, () => {\n watch(() => props.focused, val => {\n if (!val) validate()\n })\n })\n\n watch([isValid, errorMessages], () => {\n form?.update(uid.value, isValid.value, errorMessages.value)\n })\n\n async function reset () {\n model.value = null\n await nextTick()\n await resetValidation()\n }\n\n async function resetValidation () {\n isPristine.value = true\n if (!validateOn.value.lazy) {\n await validate(!validateOn.value.eager)\n } else {\n internalErrorMessages.value = []\n }\n }\n\n async function validate (silent = false) {\n const results = []\n\n isValidating.value = true\n\n for (const rule of props.rules) {\n if (results.length >= +(props.maxErrors ?? 1)) {\n break\n }\n\n const handler = typeof rule === 'function' ? rule : () => rule\n const result = await handler(validationModel.value)\n\n if (result === true) continue\n\n if (result !== false && typeof result !== 'string') {\n // eslint-disable-next-line no-console\n console.warn(`${result} is not a valid value. Rule functions must return boolean true or a string.`)\n\n continue\n }\n\n results.push(result || '')\n }\n\n internalErrorMessages.value = results\n isValidating.value = false\n isPristine.value = silent\n\n return internalErrorMessages.value\n }\n\n return {\n errorMessages,\n isDirty,\n isDisabled,\n isReadonly,\n isPristine,\n isValid,\n isValidating,\n reset,\n resetValidation,\n validate,\n validationClasses,\n }\n}\n"],"mappings":"AAAA;AAAA,SACSA,cAAc;AAAA,SACdC,OAAO;AAAA,SACPC,eAAe;AAAA,SACfC,cAAc,6BAEvB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,aAAa,EAAEC,eAAe,EAAEC,SAAS,EAAEC,GAAG,EAAEC,UAAU,EAAEC,KAAK,EAAEC,KAAK,QAAQ,KAAK;AAAA,SACzGC,kBAAkB,EAAEC,sBAAsB,EAAEC,MAAM,EAAEC,YAAY,EAAEC,WAAW,6BAEtF;AAqCA,OAAO,MAAMC,mBAAmB,GAAGF,YAAY,CAAC;EAC9CG,QAAQ,EAAE;IACRC,IAAI,EAAEC,OAAmC;IACzCC,OAAO,EAAE;EACX,CAAC;EACDC,KAAK,EAAEF,OAAO;EACdG,aAAa,EAAE;IACbJ,IAAI,EAAE,CAACK,KAAK,EAAEC,MAAM,CAAgD;IACpEJ,OAAO,EAAEA,CAAA,KAAO;EAClB,CAAC;EACDK,SAAS,EAAE;IACTP,IAAI,EAAE,CAACQ,MAAM,EAAEF,MAAM,CAAC;IACtBJ,OAAO,EAAE;EACX,CAAC;EACDO,IAAI,EAAEH,MAAM;EACZI,KAAK,EAAEJ,MAAM;EACbK,QAAQ,EAAE;IACRX,IAAI,EAAEC,OAAmC;IACzCC,OAAO,EAAE;EACX,CAAC;EACDU,KAAK,EAAE;IACLZ,IAAI,EAAEK,KAA4C;IAClDH,OAAO,EAAEA,CAAA,KAAO;EAClB,CAAC;EACDW,UAAU,EAAE,IAAI;EAChBC,UAAU,EAAER,MAAiD;EAC7DS,eAAe,EAAE,IAAI;EAErB,GAAGnC,cAAc,CAAC;AACpB,CAAC,EAAE,YAAY,CAAC;AAEhB,OAAO,SAASoC,aAAaA,CAC3B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pC;EAEA,OAAO;IACLpB,aAAa;IACbwB,OAAO;IACPC,UAAU;IACVC,UAAU;IACVH,UAAU;IACViB,OAAO;IACPC,YAAY;IACZM,KAAK;IACLC,eAAe;IACfF,QAAQ;IACRJ;EACF,CAAC;AACH","ignoreList":[]}
|
package/lib/entry-bundler.mjs
CHANGED
@@ -16,7 +16,7 @@ export const createVuetify = function () {
|
|
16
16
|
...options
|
17
17
|
});
|
18
18
|
};
|
19
|
-
export const version = "3.6.
|
19
|
+
export const version = "3.6.11-dev.2024-07-03";
|
20
20
|
createVuetify.version = version;
|
21
21
|
export { blueprints, components, directives };
|
22
22
|
export * from "./composables/index.mjs";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"entry-bundler.mjs","names":["blueprints","components","directives","createVuetify","_createVuetify","options","arguments","length","undefined","version"],"sources":["../src/entry-bundler.ts"],"sourcesContent":["/* eslint-disable local-rules/sort-imports */\n\n// Styles\nimport './styles/main.sass'\n\n// Components\nimport * as blueprints from './blueprints'\nimport * as components from './components'\nimport * as directives from './directives'\nimport { createVuetify as _createVuetify } from './framework'\n\n// Types\nimport type { VuetifyOptions } from './framework'\n\nexport const createVuetify = (options: VuetifyOptions = {}) => {\n return _createVuetify({ components, directives, ...options })\n}\n\nexport const version = __VUETIFY_VERSION__\ncreateVuetify.version = version\n\nexport {\n blueprints,\n components,\n directives,\n}\nexport * from './composables'\n"],"mappings":"AAAA;;AAEA;AACA;;AAEA;AAAA,OACO,KAAKA,UAAU;AAAA,OACf,KAAKC,UAAU;AAAA,OACf,KAAKC,UAAU;AAAA,SACbC,aAAa,IAAIC,cAAc,2BAExC;AAGA,OAAO,MAAMD,aAAa,GAAG,SAAAA,CAAA,EAAkC;EAAA,IAAjCE,OAAuB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACxD,OAAOF,cAAc,CAAC;IAAEH,UAAU;IAAEC,UAAU;IAAE,GAAGG;EAAQ,CAAC,CAAC;AAC/D,CAAC;AAED,OAAO,MAAMI,OAAO,
|
1
|
+
{"version":3,"file":"entry-bundler.mjs","names":["blueprints","components","directives","createVuetify","_createVuetify","options","arguments","length","undefined","version"],"sources":["../src/entry-bundler.ts"],"sourcesContent":["/* eslint-disable local-rules/sort-imports */\n\n// Styles\nimport './styles/main.sass'\n\n// Components\nimport * as blueprints from './blueprints'\nimport * as components from './components'\nimport * as directives from './directives'\nimport { createVuetify as _createVuetify } from './framework'\n\n// Types\nimport type { VuetifyOptions } from './framework'\n\nexport const createVuetify = (options: VuetifyOptions = {}) => {\n return _createVuetify({ components, directives, ...options })\n}\n\nexport const version = __VUETIFY_VERSION__\ncreateVuetify.version = version\n\nexport {\n blueprints,\n components,\n directives,\n}\nexport * from './composables'\n"],"mappings":"AAAA;;AAEA;AACA;;AAEA;AAAA,OACO,KAAKA,UAAU;AAAA,OACf,KAAKC,UAAU;AAAA,OACf,KAAKC,UAAU;AAAA,SACbC,aAAa,IAAIC,cAAc,2BAExC;AAGA,OAAO,MAAMD,aAAa,GAAG,SAAAA,CAAA,EAAkC;EAAA,IAAjCE,OAAuB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACxD,OAAOF,cAAc,CAAC;IAAEH,UAAU;IAAEC,UAAU;IAAE,GAAGG;EAAQ,CAAC,CAAC;AAC/D,CAAC;AAED,OAAO,MAAMI,OAAO,0BAAsB;AAC1CN,aAAa,CAACM,OAAO,GAAGA,OAAO;AAE/B,SACET,UAAU,EACVC,UAAU,EACVC,UAAU;AACX","ignoreList":[]}
|
package/lib/framework.mjs
CHANGED
package/lib/framework.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"framework.mjs","names":["createDate","DateAdapterSymbol","DateOptionsSymbol","createDefaults","DefaultsSymbol","createDisplay","DisplaySymbol","createGoTo","GoToSymbol","createIcons","IconSymbol","createLocale","LocaleSymbol","createTheme","ThemeSymbol","nextTick","reactive","defineComponent","getUid","IN_BROWSER","mergeDeep","createVuetify","vuetify","arguments","length","undefined","blueprint","rest","options","aliases","components","directives","defaults","display","ssr","theme","icons","locale","date","goTo","install","app","key","directive","component","name","aliasName","provide","instance","$nuxt","hook","update","mount","vm","reset","__VUE_OPTIONS_API__","mixin","computed","$vuetify","inject","call","version","$","provides","parent","vnode","appContext"],"sources":["../src/framework.ts"],"sourcesContent":["// Composables\nimport { createDate, DateAdapterSymbol, DateOptionsSymbol } from '@/composables/date/date'\nimport { createDefaults, DefaultsSymbol } from '@/composables/defaults'\nimport { createDisplay, DisplaySymbol } from '@/composables/display'\nimport { createGoTo, GoToSymbol } from '@/composables/goto'\nimport { createIcons, IconSymbol } from '@/composables/icons'\nimport { createLocale, LocaleSymbol } from '@/composables/locale'\nimport { createTheme, ThemeSymbol } from '@/composables/theme'\n\n// Utilities\nimport { nextTick, reactive } from 'vue'\nimport { defineComponent, getUid, IN_BROWSER, mergeDeep } from '@/util'\n\n// Types\nimport type { App, ComponentPublicInstance, InjectionKey } from 'vue'\nimport type { DateOptions } from '@/composables/date'\nimport type { DefaultsOptions } from '@/composables/defaults'\nimport type { DisplayOptions, SSROptions } from '@/composables/display'\nimport type { GoToOptions } from '@/composables/goto'\nimport type { IconOptions } from '@/composables/icons'\nimport type { LocaleOptions, RtlOptions } from '@/composables/locale'\nimport type { ThemeOptions } from '@/composables/theme'\nexport * from './composables'\nexport type { DateOptions, DateInstance, DateModule } from '@/composables/date'\n\nexport interface VuetifyOptions {\n aliases?: Record<string, any>\n blueprint?: Blueprint\n components?: Record<string, any>\n date?: DateOptions\n directives?: Record<string, any>\n defaults?: DefaultsOptions\n display?: DisplayOptions\n goTo?: GoToOptions\n theme?: ThemeOptions\n icons?: IconOptions\n locale?: LocaleOptions & RtlOptions\n ssr?: SSROptions\n}\n\nexport interface Blueprint extends Omit<VuetifyOptions, 'blueprint'> {}\n\nexport function createVuetify (vuetify: VuetifyOptions = {}) {\n const { blueprint, ...rest } = vuetify\n const options: VuetifyOptions = mergeDeep(blueprint, rest)\n const {\n aliases = {},\n components = {},\n directives = {},\n } = options\n\n const defaults = createDefaults(options.defaults)\n const display = createDisplay(options.display, options.ssr)\n const theme = createTheme(options.theme)\n const icons = createIcons(options.icons)\n const locale = createLocale(options.locale)\n const date = createDate(options.date, locale)\n const goTo = createGoTo(options.goTo, locale)\n\n const install = (app: App) => {\n for (const key in directives) {\n app.directive(key, directives[key])\n }\n\n for (const key in components) {\n app.component(key, components[key])\n }\n\n for (const key in aliases) {\n app.component(key, defineComponent({\n ...aliases[key],\n name: key,\n aliasName: aliases[key].name,\n }))\n }\n\n theme.install(app)\n\n app.provide(DefaultsSymbol, defaults)\n app.provide(DisplaySymbol, display)\n app.provide(ThemeSymbol, theme)\n app.provide(IconSymbol, icons)\n app.provide(LocaleSymbol, locale)\n app.provide(DateOptionsSymbol, date.options)\n app.provide(DateAdapterSymbol, date.instance)\n app.provide(GoToSymbol, goTo)\n\n if (IN_BROWSER && options.ssr) {\n if (app.$nuxt) {\n app.$nuxt.hook('app:suspense:resolve', () => {\n display.update()\n })\n } else {\n const { mount } = app\n app.mount = (...args) => {\n const vm = mount(...args)\n nextTick(() => display.update())\n app.mount = mount\n return vm\n }\n }\n }\n\n getUid.reset()\n\n if (typeof __VUE_OPTIONS_API__ !== 'boolean' || __VUE_OPTIONS_API__) {\n app.mixin({\n computed: {\n $vuetify () {\n return reactive({\n defaults: inject.call(this, DefaultsSymbol),\n display: inject.call(this, DisplaySymbol),\n theme: inject.call(this, ThemeSymbol),\n icons: inject.call(this, IconSymbol),\n locale: inject.call(this, LocaleSymbol),\n date: inject.call(this, DateAdapterSymbol),\n })\n },\n },\n })\n }\n }\n\n return {\n install,\n defaults,\n display,\n theme,\n icons,\n locale,\n date,\n goTo,\n }\n}\n\nexport const version = __VUETIFY_VERSION__\ncreateVuetify.version = version\n\n// Vue's inject() can only be used in setup\nfunction inject (this: ComponentPublicInstance, key: InjectionKey<any> | string) {\n const vm = this.$\n\n const provides = vm.parent?.provides ?? vm.vnode.appContext?.provides\n\n if (provides && (key as any) in provides) {\n return provides[(key as string)]\n }\n}\n"],"mappings":"AAAA;AAAA,SACSA,UAAU,EAAEC,iBAAiB,EAAEC,iBAAiB;AAAA,SAChDC,cAAc,EAAEC,cAAc;AAAA,SAC9BC,aAAa,EAAEC,aAAa;AAAA,SAC5BC,UAAU,EAAEC,UAAU;AAAA,SACtBC,WAAW,EAAEC,UAAU;AAAA,SACvBC,YAAY,EAAEC,YAAY;AAAA,SAC1BC,WAAW,EAAEC,WAAW,mCAEjC;AACA,SAASC,QAAQ,EAAEC,QAAQ,QAAQ,KAAK;AAAA,SAC/BC,eAAe,EAAEC,MAAM,EAAEC,UAAU,EAAEC,SAAS,4BAEvD;AAAA;AA6BA,OAAO,SAASC,aAAaA,CAAA,EAAgC;EAAA,IAA9BC,OAAuB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACzD,MAAM;IAAEG,SAAS;IAAE,GAAGC;EAAK,CAAC,GAAGL,OAAO;EACtC,MAAMM,OAAuB,GAAGR,SAAS,CAACM,SAAS,EAAEC,IAAI,CAAC;EAC1D,MAAM;IACJE,OAAO,GAAG,CAAC,CAAC;IACZC,UAAU,GAAG,CAAC,CAAC;IACfC,UAAU,GAAG,CAAC;EAChB,CAAC,GAAGH,OAAO;EAEX,MAAMI,QAAQ,GAAG7B,cAAc,CAACyB,OAAO,CAACI,QAAQ,CAAC;EACjD,MAAMC,OAAO,GAAG5B,aAAa,CAACuB,OAAO,CAACK,OAAO,EAAEL,OAAO,CAACM,GAAG,CAAC;EAC3D,MAAMC,KAAK,GAAGtB,WAAW,CAACe,OAAO,CAACO,KAAK,CAAC;EACxC,MAAMC,KAAK,GAAG3B,WAAW,CAACmB,OAAO,CAACQ,KAAK,CAAC;EACxC,MAAMC,MAAM,GAAG1B,YAAY,C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ACJ;QACF;MACF,CAAC,CAAC;IACJ;EACF,CAAC;EAED,OAAO;IACLuC,OAAO;IACPR,QAAQ;IACRC,OAAO;IACPE,KAAK;IACLC,KAAK;IACLC,MAAM;IACNC,IAAI;IACJC;EACF,CAAC;AACH;AAEA,OAAO,MAAMsB,OAAO,
|
1
|
+
{"version":3,"file":"framework.mjs","names":["createDate","DateAdapterSymbol","DateOptionsSymbol","createDefaults","DefaultsSymbol","createDisplay","DisplaySymbol","createGoTo","GoToSymbol","createIcons","IconSymbol","createLocale","LocaleSymbol","createTheme","ThemeSymbol","nextTick","reactive","defineComponent","getUid","IN_BROWSER","mergeDeep","createVuetify","vuetify","arguments","length","undefined","blueprint","rest","options","aliases","components","directives","defaults","display","ssr","theme","icons","locale","date","goTo","install","app","key","directive","component","name","aliasName","provide","instance","$nuxt","hook","update","mount","vm","reset","__VUE_OPTIONS_API__","mixin","computed","$vuetify","inject","call","version","$","provides","parent","vnode","appContext"],"sources":["../src/framework.ts"],"sourcesContent":["// Composables\nimport { createDate, DateAdapterSymbol, DateOptionsSymbol } from '@/composables/date/date'\nimport { createDefaults, DefaultsSymbol } from '@/composables/defaults'\nimport { createDisplay, DisplaySymbol } from '@/composables/display'\nimport { createGoTo, GoToSymbol } from '@/composables/goto'\nimport { createIcons, IconSymbol } from '@/composables/icons'\nimport { createLocale, LocaleSymbol } from '@/composables/locale'\nimport { createTheme, ThemeSymbol } from '@/composables/theme'\n\n// Utilities\nimport { nextTick, reactive } from 'vue'\nimport { defineComponent, getUid, IN_BROWSER, mergeDeep } from '@/util'\n\n// Types\nimport type { App, ComponentPublicInstance, InjectionKey } from 'vue'\nimport type { DateOptions } from '@/composables/date'\nimport type { DefaultsOptions } from '@/composables/defaults'\nimport type { DisplayOptions, SSROptions } from '@/composables/display'\nimport type { GoToOptions } from '@/composables/goto'\nimport type { IconOptions } from '@/composables/icons'\nimport type { LocaleOptions, RtlOptions } from '@/composables/locale'\nimport type { ThemeOptions } from '@/composables/theme'\nexport * from './composables'\nexport type { DateOptions, DateInstance, DateModule } from '@/composables/date'\n\nexport interface VuetifyOptions {\n aliases?: Record<string, any>\n blueprint?: Blueprint\n components?: Record<string, any>\n date?: DateOptions\n directives?: Record<string, any>\n defaults?: DefaultsOptions\n display?: DisplayOptions\n goTo?: GoToOptions\n theme?: ThemeOptions\n icons?: IconOptions\n locale?: LocaleOptions & RtlOptions\n ssr?: SSROptions\n}\n\nexport interface Blueprint extends Omit<VuetifyOptions, 'blueprint'> {}\n\nexport function createVuetify (vuetify: VuetifyOptions = {}) {\n const { blueprint, ...rest } = vuetify\n const options: VuetifyOptions = mergeDeep(blueprint, rest)\n const {\n aliases = {},\n components = {},\n directives = {},\n } = options\n\n const defaults = createDefaults(options.defaults)\n const display = createDisplay(options.display, options.ssr)\n const theme = createTheme(options.theme)\n const icons = createIcons(options.icons)\n const locale = createLocale(options.locale)\n const date = createDate(options.date, locale)\n const goTo = createGoTo(options.goTo, locale)\n\n const install = (app: App) => {\n for (const key in directives) {\n app.directive(key, directives[key])\n }\n\n for (const key in components) {\n app.component(key, components[key])\n }\n\n for (const key in aliases) {\n app.component(key, defineComponent({\n ...aliases[key],\n name: key,\n aliasName: aliases[key].name,\n }))\n }\n\n theme.install(app)\n\n app.provide(DefaultsSymbol, defaults)\n app.provide(DisplaySymbol, display)\n app.provide(ThemeSymbol, theme)\n app.provide(IconSymbol, icons)\n app.provide(LocaleSymbol, locale)\n app.provide(DateOptionsSymbol, date.options)\n app.provide(DateAdapterSymbol, date.instance)\n app.provide(GoToSymbol, goTo)\n\n if (IN_BROWSER && options.ssr) {\n if (app.$nuxt) {\n app.$nuxt.hook('app:suspense:resolve', () => {\n display.update()\n })\n } else {\n const { mount } = app\n app.mount = (...args) => {\n const vm = mount(...args)\n nextTick(() => display.update())\n app.mount = mount\n return vm\n }\n }\n }\n\n getUid.reset()\n\n if (typeof __VUE_OPTIONS_API__ !== 'boolean' || __VUE_OPTIONS_API__) {\n app.mixin({\n computed: {\n $vuetify () {\n return reactive({\n defaults: inject.call(this, DefaultsSymbol),\n display: inject.call(this, DisplaySymbol),\n theme: inject.call(this, ThemeSymbol),\n icons: inject.call(this, IconSymbol),\n locale: inject.call(this, LocaleSymbol),\n date: inject.call(this, DateAdapterSymbol),\n })\n },\n },\n })\n }\n }\n\n return {\n install,\n defaults,\n display,\n theme,\n icons,\n locale,\n date,\n goTo,\n }\n}\n\nexport const version = __VUETIFY_VERSION__\ncreateVuetify.version = version\n\n// Vue's inject() can only be used in setup\nfunction inject (this: ComponentPublicInstance, key: InjectionKey<any> | string) {\n const vm = this.$\n\n const provides = vm.parent?.provides ?? vm.vnode.appContext?.provides\n\n if (provides && (key as any) in provides) {\n return provides[(key as string)]\n }\n}\n"],"mappings":"AAAA;AAAA,SACSA,UAAU,EAAEC,iBAAiB,EAAEC,iBAAiB;AAAA,SAChDC,cAAc,EAAEC,cAAc;AAAA,SAC9BC,aAAa,EAAEC,aAAa;AAAA,SAC5BC,UAAU,EAAEC,UAAU;AAAA,SACtBC,WAAW,EAAEC,UAAU;AAAA,SACvBC,YAAY,EAAEC,YAAY;AAAA,SAC1BC,WAAW,EAAEC,WAAW,mCAEjC;AACA,SAASC,QAAQ,EAAEC,QAAQ,QAAQ,KAAK;AAAA,SAC/BC,eAAe,EAAEC,MAAM,EAAEC,UAAU,EAAEC,SAAS,4BAEvD;AAAA;AA6BA,OAAO,SAASC,aAAaA,CAAA,EAAgC;EAAA,IAA9BC,OAAuB,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACzD,MAAM;IAAEG,SAAS;IAAE,GAAGC;EAAK,CAAC,GAAGL,OAAO;EACtC,MAAMM,OAAuB,GAAGR,SAAS,CAACM,SAAS,EAAEC,IAAI,CAAC;EAC1D,MAAM;IACJE,OAAO,GAAG,CAAC,CAAC;IACZC,UAAU,GAAG,CAAC,CAAC;IACfC,UAAU,GAAG,CAAC;EAChB,CAAC,GAAGH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,EAAEtD,aAAa,CAAC;cACzC6B,KAAK,EAAEwB,MAAM,CAACC,IAAI,CAAC,IAAI,EAAE9C,WAAW,CAAC;cACrCsB,KAAK,EAAEuB,MAAM,CAACC,IAAI,CAAC,IAAI,EAAElD,UAAU,CAAC;cACpC2B,MAAM,EAAEsB,MAAM,CAACC,IAAI,CAAC,IAAI,EAAEhD,YAAY,CAAC;cACvC0B,IAAI,EAAEqB,MAAM,CAACC,IAAI,CAAC,IAAI,EAAE3D,iBAAiB;YAC3C,CAAC,CAAC;UACJ;QACF;MACF,CAAC,CAAC;IACJ;EACF,CAAC;EAED,OAAO;IACLuC,OAAO;IACPR,QAAQ;IACRC,OAAO;IACPE,KAAK;IACLC,KAAK;IACLC,MAAM;IACNC,IAAI;IACJC;EACF,CAAC;AACH;AAEA,OAAO,MAAMsB,OAAO,0BAAsB;AAC1CxC,aAAa,CAACwC,OAAO,GAAGA,OAAO;;AAE/B;AACA,SAASF,MAAMA,CAAiCjB,GAA+B,EAAE;EAC/E,MAAMW,EAAE,GAAG,IAAI,CAACS,CAAC;EAEjB,MAAMC,QAAQ,GAAGV,EAAE,CAACW,MAAM,EAAED,QAAQ,IAAIV,EAAE,CAACY,KAAK,CAACC,UAAU,EAAEH,QAAQ;EAErE,IAAIA,QAAQ,IAAKrB,GAAG,IAAYqB,QAAQ,EAAE;IACxC,OAAOA,QAAQ,CAAErB,GAAG,CAAY;EAClC;AACF","ignoreList":[]}
|
package/lib/index.d.mts
CHANGED
@@ -492,40 +492,41 @@ declare module '@vue/runtime-core' {
|
|
492
492
|
}
|
493
493
|
|
494
494
|
export interface GlobalComponents {
|
495
|
-
|
496
|
-
VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
|
497
|
-
VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
|
495
|
+
VApp: typeof import('vuetify/components')['VApp']
|
498
496
|
VAlert: typeof import('vuetify/components')['VAlert']
|
499
497
|
VAlertTitle: typeof import('vuetify/components')['VAlertTitle']
|
500
|
-
VApp: typeof import('vuetify/components')['VApp']
|
501
498
|
VAutocomplete: typeof import('vuetify/components')['VAutocomplete']
|
499
|
+
VAppBar: typeof import('vuetify/components')['VAppBar']
|
500
|
+
VAppBarNavIcon: typeof import('vuetify/components')['VAppBarNavIcon']
|
501
|
+
VAppBarTitle: typeof import('vuetify/components')['VAppBarTitle']
|
502
502
|
VBadge: typeof import('vuetify/components')['VBadge']
|
503
503
|
VAvatar: typeof import('vuetify/components')['VAvatar']
|
504
|
-
VBtn: typeof import('vuetify/components')['VBtn']
|
505
504
|
VBanner: typeof import('vuetify/components')['VBanner']
|
506
505
|
VBannerActions: typeof import('vuetify/components')['VBannerActions']
|
507
506
|
VBannerText: typeof import('vuetify/components')['VBannerText']
|
508
507
|
VBreadcrumbs: typeof import('vuetify/components')['VBreadcrumbs']
|
509
508
|
VBreadcrumbsItem: typeof import('vuetify/components')['VBreadcrumbsItem']
|
510
509
|
VBreadcrumbsDivider: typeof import('vuetify/components')['VBreadcrumbsDivider']
|
511
|
-
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
512
|
-
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
513
510
|
VBottomNavigation: typeof import('vuetify/components')['VBottomNavigation']
|
511
|
+
VBtnGroup: typeof import('vuetify/components')['VBtnGroup']
|
512
|
+
VBottomSheet: typeof import('vuetify/components')['VBottomSheet']
|
513
|
+
VBtn: typeof import('vuetify/components')['VBtn']
|
514
|
+
VCarousel: typeof import('vuetify/components')['VCarousel']
|
515
|
+
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
514
516
|
VBtnToggle: typeof import('vuetify/components')['VBtnToggle']
|
515
517
|
VCheckbox: typeof import('vuetify/components')['VCheckbox']
|
516
518
|
VCheckboxBtn: typeof import('vuetify/components')['VCheckboxBtn']
|
519
|
+
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
517
520
|
VCard: typeof import('vuetify/components')['VCard']
|
518
521
|
VCardActions: typeof import('vuetify/components')['VCardActions']
|
519
522
|
VCardItem: typeof import('vuetify/components')['VCardItem']
|
520
523
|
VCardSubtitle: typeof import('vuetify/components')['VCardSubtitle']
|
521
524
|
VCardText: typeof import('vuetify/components')['VCardText']
|
522
525
|
VCardTitle: typeof import('vuetify/components')['VCardTitle']
|
523
|
-
|
524
|
-
VCarouselItem: typeof import('vuetify/components')['VCarouselItem']
|
526
|
+
VCode: typeof import('vuetify/components')['VCode']
|
525
527
|
VChip: typeof import('vuetify/components')['VChip']
|
526
528
|
VColorPicker: typeof import('vuetify/components')['VColorPicker']
|
527
529
|
VCombobox: typeof import('vuetify/components')['VCombobox']
|
528
|
-
VChipGroup: typeof import('vuetify/components')['VChipGroup']
|
529
530
|
VDataTable: typeof import('vuetify/components')['VDataTable']
|
530
531
|
VDataTableHeaders: typeof import('vuetify/components')['VDataTableHeaders']
|
531
532
|
VDataTableFooter: typeof import('vuetify/components')['VDataTableFooter']
|
@@ -533,38 +534,36 @@ declare module '@vue/runtime-core' {
|
|
533
534
|
VDataTableRow: typeof import('vuetify/components')['VDataTableRow']
|
534
535
|
VDataTableVirtual: typeof import('vuetify/components')['VDataTableVirtual']
|
535
536
|
VDataTableServer: typeof import('vuetify/components')['VDataTableServer']
|
536
|
-
|
537
|
+
VCounter: typeof import('vuetify/components')['VCounter']
|
537
538
|
VDatePicker: typeof import('vuetify/components')['VDatePicker']
|
538
539
|
VDatePickerControls: typeof import('vuetify/components')['VDatePickerControls']
|
539
540
|
VDatePickerHeader: typeof import('vuetify/components')['VDatePickerHeader']
|
540
541
|
VDatePickerMonth: typeof import('vuetify/components')['VDatePickerMonth']
|
541
542
|
VDatePickerMonths: typeof import('vuetify/components')['VDatePickerMonths']
|
542
543
|
VDatePickerYears: typeof import('vuetify/components')['VDatePickerYears']
|
543
|
-
VCounter: typeof import('vuetify/components')['VCounter']
|
544
544
|
VDialog: typeof import('vuetify/components')['VDialog']
|
545
545
|
VEmptyState: typeof import('vuetify/components')['VEmptyState']
|
546
|
-
VField: typeof import('vuetify/components')['VField']
|
547
|
-
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
548
546
|
VDivider: typeof import('vuetify/components')['VDivider']
|
549
547
|
VExpansionPanels: typeof import('vuetify/components')['VExpansionPanels']
|
550
548
|
VExpansionPanel: typeof import('vuetify/components')['VExpansionPanel']
|
551
549
|
VExpansionPanelText: typeof import('vuetify/components')['VExpansionPanelText']
|
552
550
|
VExpansionPanelTitle: typeof import('vuetify/components')['VExpansionPanelTitle']
|
553
551
|
VFab: typeof import('vuetify/components')['VFab']
|
554
|
-
|
552
|
+
VField: typeof import('vuetify/components')['VField']
|
553
|
+
VFieldLabel: typeof import('vuetify/components')['VFieldLabel']
|
555
554
|
VFileInput: typeof import('vuetify/components')['VFileInput']
|
556
|
-
|
555
|
+
VFooter: typeof import('vuetify/components')['VFooter']
|
557
556
|
VIcon: typeof import('vuetify/components')['VIcon']
|
558
557
|
VComponentIcon: typeof import('vuetify/components')['VComponentIcon']
|
559
558
|
VSvgIcon: typeof import('vuetify/components')['VSvgIcon']
|
560
559
|
VLigatureIcon: typeof import('vuetify/components')['VLigatureIcon']
|
561
560
|
VClassIcon: typeof import('vuetify/components')['VClassIcon']
|
562
561
|
VImg: typeof import('vuetify/components')['VImg']
|
562
|
+
VInfiniteScroll: typeof import('vuetify/components')['VInfiniteScroll']
|
563
563
|
VItemGroup: typeof import('vuetify/components')['VItemGroup']
|
564
564
|
VItem: typeof import('vuetify/components')['VItem']
|
565
|
-
VInput: typeof import('vuetify/components')['VInput']
|
566
565
|
VKbd: typeof import('vuetify/components')['VKbd']
|
567
|
-
|
566
|
+
VInput: typeof import('vuetify/components')['VInput']
|
568
567
|
VList: typeof import('vuetify/components')['VList']
|
569
568
|
VListGroup: typeof import('vuetify/components')['VListGroup']
|
570
569
|
VListImg: typeof import('vuetify/components')['VListImg']
|
@@ -574,26 +573,27 @@ declare module '@vue/runtime-core' {
|
|
574
573
|
VListItemSubtitle: typeof import('vuetify/components')['VListItemSubtitle']
|
575
574
|
VListItemTitle: typeof import('vuetify/components')['VListItemTitle']
|
576
575
|
VListSubheader: typeof import('vuetify/components')['VListSubheader']
|
576
|
+
VLabel: typeof import('vuetify/components')['VLabel']
|
577
|
+
VMain: typeof import('vuetify/components')['VMain']
|
577
578
|
VMenu: typeof import('vuetify/components')['VMenu']
|
578
579
|
VMessages: typeof import('vuetify/components')['VMessages']
|
579
|
-
VMain: typeof import('vuetify/components')['VMain']
|
580
|
-
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
581
580
|
VOverlay: typeof import('vuetify/components')['VOverlay']
|
582
|
-
|
581
|
+
VNavigationDrawer: typeof import('vuetify/components')['VNavigationDrawer']
|
583
582
|
VPagination: typeof import('vuetify/components')['VPagination']
|
583
|
+
VOtpInput: typeof import('vuetify/components')['VOtpInput']
|
584
584
|
VProgressLinear: typeof import('vuetify/components')['VProgressLinear']
|
585
585
|
VProgressCircular: typeof import('vuetify/components')['VProgressCircular']
|
586
|
-
VRating: typeof import('vuetify/components')['VRating']
|
587
|
-
VSelect: typeof import('vuetify/components')['VSelect']
|
588
|
-
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
589
586
|
VRadioGroup: typeof import('vuetify/components')['VRadioGroup']
|
587
|
+
VRating: typeof import('vuetify/components')['VRating']
|
590
588
|
VSelectionControl: typeof import('vuetify/components')['VSelectionControl']
|
591
|
-
|
589
|
+
VSelect: typeof import('vuetify/components')['VSelect']
|
592
590
|
VSkeletonLoader: typeof import('vuetify/components')['VSkeletonLoader']
|
593
|
-
|
594
|
-
VSlider: typeof import('vuetify/components')['VSlider']
|
591
|
+
VSelectionControlGroup: typeof import('vuetify/components')['VSelectionControlGroup']
|
595
592
|
VSlideGroup: typeof import('vuetify/components')['VSlideGroup']
|
596
593
|
VSlideGroupItem: typeof import('vuetify/components')['VSlideGroupItem']
|
594
|
+
VSlider: typeof import('vuetify/components')['VSlider']
|
595
|
+
VSheet: typeof import('vuetify/components')['VSheet']
|
596
|
+
VSnackbar: typeof import('vuetify/components')['VSnackbar']
|
597
597
|
VSwitch: typeof import('vuetify/components')['VSwitch']
|
598
598
|
VStepper: typeof import('vuetify/components')['VStepper']
|
599
599
|
VStepperActions: typeof import('vuetify/components')['VStepperActions']
|
@@ -606,9 +606,9 @@ declare module '@vue/runtime-core' {
|
|
606
606
|
VTabs: typeof import('vuetify/components')['VTabs']
|
607
607
|
VTabsWindow: typeof import('vuetify/components')['VTabsWindow']
|
608
608
|
VTabsWindowItem: typeof import('vuetify/components')['VTabsWindowItem']
|
609
|
-
VTextarea: typeof import('vuetify/components')['VTextarea']
|
610
|
-
VTable: typeof import('vuetify/components')['VTable']
|
611
609
|
VTextField: typeof import('vuetify/components')['VTextField']
|
610
|
+
VTable: typeof import('vuetify/components')['VTable']
|
611
|
+
VTextarea: typeof import('vuetify/components')['VTextarea']
|
612
612
|
VTimeline: typeof import('vuetify/components')['VTimeline']
|
613
613
|
VTimelineItem: typeof import('vuetify/components')['VTimelineItem']
|
614
614
|
VTooltip: typeof import('vuetify/components')['VTooltip']
|
@@ -617,28 +617,29 @@ declare module '@vue/runtime-core' {
|
|
617
617
|
VToolbarItems: typeof import('vuetify/components')['VToolbarItems']
|
618
618
|
VWindow: typeof import('vuetify/components')['VWindow']
|
619
619
|
VWindowItem: typeof import('vuetify/components')['VWindowItem']
|
620
|
-
VConfirmEdit: typeof import('vuetify/components')['VConfirmEdit']
|
621
620
|
VDataIterator: typeof import('vuetify/components')['VDataIterator']
|
621
|
+
VConfirmEdit: typeof import('vuetify/components')['VConfirmEdit']
|
622
622
|
VDefaultsProvider: typeof import('vuetify/components')['VDefaultsProvider']
|
623
|
-
VForm: typeof import('vuetify/components')['VForm']
|
624
623
|
VContainer: typeof import('vuetify/components')['VContainer']
|
625
624
|
VCol: typeof import('vuetify/components')['VCol']
|
626
625
|
VRow: typeof import('vuetify/components')['VRow']
|
627
626
|
VSpacer: typeof import('vuetify/components')['VSpacer']
|
627
|
+
VForm: typeof import('vuetify/components')['VForm']
|
628
628
|
VHover: typeof import('vuetify/components')['VHover']
|
629
629
|
VLayout: typeof import('vuetify/components')['VLayout']
|
630
630
|
VLayoutItem: typeof import('vuetify/components')['VLayoutItem']
|
631
631
|
VLazy: typeof import('vuetify/components')['VLazy']
|
632
632
|
VLocaleProvider: typeof import('vuetify/components')['VLocaleProvider']
|
633
|
-
VNoSsr: typeof import('vuetify/components')['VNoSsr']
|
634
633
|
VParallax: typeof import('vuetify/components')['VParallax']
|
635
|
-
|
634
|
+
VNoSsr: typeof import('vuetify/components')['VNoSsr']
|
636
635
|
VRadio: typeof import('vuetify/components')['VRadio']
|
636
|
+
VRangeSlider: typeof import('vuetify/components')['VRangeSlider']
|
637
637
|
VResponsive: typeof import('vuetify/components')['VResponsive']
|
638
638
|
VSparkline: typeof import('vuetify/components')['VSparkline']
|
639
639
|
VSpeedDial: typeof import('vuetify/components')['VSpeedDial']
|
640
640
|
VThemeProvider: typeof import('vuetify/components')['VThemeProvider']
|
641
641
|
VVirtualScroll: typeof import('vuetify/components')['VVirtualScroll']
|
642
|
+
VValidation: typeof import('vuetify/components')['VValidation']
|
642
643
|
VFabTransition: typeof import('vuetify/components')['VFabTransition']
|
643
644
|
VDialogBottomTransition: typeof import('vuetify/components')['VDialogBottomTransition']
|
644
645
|
VDialogTopTransition: typeof import('vuetify/components')['VDialogTopTransition']
|
@@ -655,25 +656,24 @@ declare module '@vue/runtime-core' {
|
|
655
656
|
VExpandTransition: typeof import('vuetify/components')['VExpandTransition']
|
656
657
|
VExpandXTransition: typeof import('vuetify/components')['VExpandXTransition']
|
657
658
|
VDialogTransition: typeof import('vuetify/components')['VDialogTransition']
|
658
|
-
|
659
|
+
VStepperVertical: typeof import('vuetify/labs/components')['VStepperVertical']
|
660
|
+
VStepperVerticalItem: typeof import('vuetify/labs/components')['VStepperVerticalItem']
|
661
|
+
VStepperVerticalActions: typeof import('vuetify/labs/components')['VStepperVerticalActions']
|
662
|
+
VNumberInput: typeof import('vuetify/labs/components')['VNumberInput']
|
659
663
|
VCalendar: typeof import('vuetify/labs/components')['VCalendar']
|
660
664
|
VCalendarDay: typeof import('vuetify/labs/components')['VCalendarDay']
|
661
665
|
VCalendarHeader: typeof import('vuetify/labs/components')['VCalendarHeader']
|
662
666
|
VCalendarInterval: typeof import('vuetify/labs/components')['VCalendarInterval']
|
663
667
|
VCalendarIntervalEvent: typeof import('vuetify/labs/components')['VCalendarIntervalEvent']
|
664
668
|
VCalendarMonthDay: typeof import('vuetify/labs/components')['VCalendarMonthDay']
|
665
|
-
VStepperVertical: typeof import('vuetify/labs/components')['VStepperVertical']
|
666
|
-
VStepperVerticalItem: typeof import('vuetify/labs/components')['VStepperVerticalItem']
|
667
|
-
VStepperVerticalActions: typeof import('vuetify/labs/components')['VStepperVerticalActions']
|
668
|
-
VTreeview: typeof import('vuetify/labs/components')['VTreeview']
|
669
|
-
VTreeviewItem: typeof import('vuetify/labs/components')['VTreeviewItem']
|
670
|
-
VTreeviewGroup: typeof import('vuetify/labs/components')['VTreeviewGroup']
|
671
669
|
VPicker: typeof import('vuetify/labs/components')['VPicker']
|
672
670
|
VPickerTitle: typeof import('vuetify/labs/components')['VPickerTitle']
|
673
|
-
VNumberInput: typeof import('vuetify/labs/components')['VNumberInput']
|
674
671
|
VTimePicker: typeof import('vuetify/labs/components')['VTimePicker']
|
675
672
|
VTimePickerClock: typeof import('vuetify/labs/components')['VTimePickerClock']
|
676
673
|
VTimePickerControls: typeof import('vuetify/labs/components')['VTimePickerControls']
|
674
|
+
VTreeview: typeof import('vuetify/labs/components')['VTreeview']
|
675
|
+
VTreeviewItem: typeof import('vuetify/labs/components')['VTreeviewItem']
|
676
|
+
VTreeviewGroup: typeof import('vuetify/labs/components')['VTreeviewGroup']
|
677
677
|
VDateInput: typeof import('vuetify/labs/components')['VDateInput']
|
678
678
|
VSnackbarQueue: typeof import('vuetify/labs/components')['VSnackbarQueue']
|
679
679
|
VPullToRefresh: typeof import('vuetify/labs/components')['VPullToRefresh']
|
@@ -88,7 +88,7 @@ declare const VDateInput: {
|
|
88
88
|
position?: "fixed" | "absolute" | "relative" | "static" | "sticky" | undefined;
|
89
89
|
'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
|
90
90
|
modelValue?: any;
|
91
|
-
validateOn?: ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | "lazy" | undefined;
|
91
|
+
validateOn?: (("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" | "lazy" | "eager") | undefined;
|
92
92
|
validationValue?: any;
|
93
93
|
rounded?: string | number | boolean | undefined;
|
94
94
|
maxHeight?: string | number | undefined;
|
@@ -200,7 +200,7 @@ declare const VDateInput: {
|
|
200
200
|
position?: "fixed" | "absolute" | "relative" | "static" | "sticky" | undefined;
|
201
201
|
'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
|
202
202
|
modelValue?: any;
|
203
|
-
validateOn?: ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | "lazy" | undefined;
|
203
|
+
validateOn?: (("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" | "lazy" | "eager") | undefined;
|
204
204
|
validationValue?: any;
|
205
205
|
rounded?: string | number | boolean | undefined;
|
206
206
|
maxHeight?: string | number | undefined;
|
@@ -372,7 +372,7 @@ declare const VDateInput: {
|
|
372
372
|
position?: "fixed" | "absolute" | "relative" | "static" | "sticky" | undefined;
|
373
373
|
'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
|
374
374
|
modelValue?: any;
|
375
|
-
validateOn?: ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | "lazy" | undefined;
|
375
|
+
validateOn?: (("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" | "lazy" | "eager") | undefined;
|
376
376
|
validationValue?: any;
|
377
377
|
rounded?: string | number | boolean | undefined;
|
378
378
|
maxHeight?: string | number | undefined;
|
@@ -537,7 +537,7 @@ declare const VDateInput: {
|
|
537
537
|
position?: "fixed" | "absolute" | "relative" | "static" | "sticky" | undefined;
|
538
538
|
'onUpdate:focused'?: ((args_0: boolean) => void) | undefined;
|
539
539
|
modelValue?: any;
|
540
|
-
validateOn?: ("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | "lazy" | undefined;
|
540
|
+
validateOn?: (("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" | "lazy" | "eager") | undefined;
|
541
541
|
validationValue?: any;
|
542
542
|
rounded?: string | number | boolean | undefined;
|
543
543
|
maxHeight?: string | number | undefined;
|
@@ -795,7 +795,7 @@ declare const VDateInput: {
|
|
795
795
|
type: vue.PropType<readonly ValidationRule[]>;
|
796
796
|
default: () => never[];
|
797
797
|
};
|
798
|
-
validateOn: vue.PropType<("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | "lazy" | undefined>;
|
798
|
+
validateOn: vue.PropType<(("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" | "lazy" | "eager") | undefined>;
|
799
799
|
validationValue: null;
|
800
800
|
density: {
|
801
801
|
type: vue.PropType<Density>;
|
@@ -1008,7 +1008,7 @@ declare const VDateInput: {
|
|
1008
1008
|
type: vue.PropType<readonly ValidationRule[]>;
|
1009
1009
|
default: () => never[];
|
1010
1010
|
};
|
1011
|
-
validateOn: vue.PropType<("input" | "blur" | "submit") | "input lazy" | "blur lazy" | "submit lazy" | "lazy input" | "lazy blur" | "lazy submit" | "lazy" | undefined>;
|
1011
|
+
validateOn: vue.PropType<(("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" | "lazy" | "eager") | undefined>;
|
1012
1012
|
validationValue: null;
|
1013
1013
|
density: {
|
1014
1014
|
type: vue.PropType<Density>;
|
@@ -70,6 +70,10 @@ export const VNumberInput = genericComponent()({
|
|
70
70
|
const controlVariant = computed(() => {
|
71
71
|
return props.hideInput ? 'stacked' : props.controlVariant;
|
72
72
|
});
|
73
|
+
const incrementIcon = computed(() => controlVariant.value === 'split' ? '$plus' : '$collapse');
|
74
|
+
const decrementIcon = computed(() => controlVariant.value === 'split' ? '$minus' : '$expand');
|
75
|
+
const controlNodeSize = computed(() => controlVariant.value === 'split' ? 'default' : 'small');
|
76
|
+
const controlNodeDefaultHeight = computed(() => controlVariant.value === 'stacked' ? 'auto' : '100%');
|
73
77
|
const incrementSlotProps = computed(() => ({
|
74
78
|
click: onClickUp
|
75
79
|
}));
|
@@ -127,18 +131,42 @@ export const VNumberInput = genericComponent()({
|
|
127
131
|
modelValue: _,
|
128
132
|
...textFieldProps
|
129
133
|
} = VTextField.filterProps(props);
|
130
|
-
function
|
131
|
-
|
132
|
-
|
133
|
-
"
|
134
|
-
|
134
|
+
function incrementControlNode() {
|
135
|
+
return !slots.increment ? _createVNode(VBtn, {
|
136
|
+
"disabled": !canIncrease.value,
|
137
|
+
"flat": true,
|
138
|
+
"key": "increment-btn",
|
139
|
+
"height": controlNodeDefaultHeight.value,
|
140
|
+
"name": "increment-btn",
|
141
|
+
"icon": incrementIcon.value,
|
142
|
+
"onClick": onClickUp,
|
143
|
+
"onMousedown": onControlMousedown,
|
144
|
+
"size": controlNodeSize.value,
|
145
|
+
"tabindex": "-1"
|
146
|
+
}, null) : _createVNode(VDefaultsProvider, {
|
147
|
+
"key": "increment-defaults",
|
148
|
+
"defaults": {
|
149
|
+
VBtn: {
|
150
|
+
disabled: !canIncrease.value,
|
151
|
+
flat: true,
|
152
|
+
height: controlNodeDefaultHeight.value,
|
153
|
+
size: controlNodeSize.value,
|
154
|
+
icon: incrementIcon.value
|
155
|
+
}
|
156
|
+
}
|
157
|
+
}, {
|
158
|
+
default: () => [slots.increment(incrementSlotProps.value)]
|
159
|
+
});
|
160
|
+
}
|
161
|
+
function decrementControlNode() {
|
162
|
+
return !slots.decrement ? _createVNode(VBtn, {
|
135
163
|
"disabled": !canDecrease.value,
|
136
164
|
"flat": true,
|
137
165
|
"key": "decrement-btn",
|
138
|
-
"height":
|
166
|
+
"height": controlNodeDefaultHeight.value,
|
139
167
|
"name": "decrement-btn",
|
140
|
-
"icon":
|
141
|
-
"size":
|
168
|
+
"icon": decrementIcon.value,
|
169
|
+
"size": controlNodeSize.value,
|
142
170
|
"tabindex": "-1",
|
143
171
|
"onClick": onClickDown,
|
144
172
|
"onMousedown": onControlMousedown
|
@@ -148,40 +176,21 @@ export const VNumberInput = genericComponent()({
|
|
148
176
|
VBtn: {
|
149
177
|
disabled: !canDecrease.value,
|
150
178
|
flat: true,
|
151
|
-
height:
|
152
|
-
size:
|
153
|
-
icon:
|
179
|
+
height: controlNodeDefaultHeight.value,
|
180
|
+
size: controlNodeSize.value,
|
181
|
+
icon: decrementIcon.value
|
154
182
|
}
|
155
183
|
}
|
156
184
|
}, {
|
157
185
|
default: () => [slots.decrement(decrementSlotProps.value)]
|
158
|
-
})
|
186
|
+
});
|
187
|
+
}
|
188
|
+
function controlNode() {
|
189
|
+
return _createVNode("div", {
|
190
|
+
"class": "v-number-input__control"
|
191
|
+
}, [decrementControlNode(), _createVNode(VDivider, {
|
159
192
|
"vertical": controlVariant.value !== 'stacked'
|
160
|
-
}, null),
|
161
|
-
"disabled": !canIncrease.value,
|
162
|
-
"flat": true,
|
163
|
-
"key": "increment-btn",
|
164
|
-
"height": defaultHeight,
|
165
|
-
"name": "increment-btn",
|
166
|
-
"icon": "$collapse",
|
167
|
-
"onClick": onClickUp,
|
168
|
-
"onMousedown": onControlMousedown,
|
169
|
-
"size": "small",
|
170
|
-
"tabindex": "-1"
|
171
|
-
}, null) : _createVNode(VDefaultsProvider, {
|
172
|
-
"key": "increment-defaults",
|
173
|
-
"defaults": {
|
174
|
-
VBtn: {
|
175
|
-
disabled: !canIncrease.value,
|
176
|
-
flat: true,
|
177
|
-
height: defaultHeight,
|
178
|
-
size: 'small',
|
179
|
-
icon: '$collapse'
|
180
|
-
}
|
181
|
-
}
|
182
|
-
}, {
|
183
|
-
default: () => [slots.increment(incrementSlotProps.value)]
|
184
|
-
})]);
|
193
|
+
}, null), incrementControlNode()]);
|
185
194
|
}
|
186
195
|
function dividerNode() {
|
187
196
|
return !props.hideInput && !props.inset ? _createVNode(VDivider, {
|
@@ -192,27 +201,11 @@ export const VNumberInput = genericComponent()({
|
|
192
201
|
"class": "v-number-input__control"
|
193
202
|
}, [_createVNode(VDivider, {
|
194
203
|
"vertical": true
|
195
|
-
}, null), _createVNode(
|
196
|
-
"flat": true,
|
197
|
-
"height": "100%",
|
198
|
-
"icon": "$plus",
|
199
|
-
"tile": true,
|
200
|
-
"tabindex": "-1",
|
201
|
-
"onClick": onClickUp,
|
202
|
-
"onMousedown": onControlMousedown
|
203
|
-
}, null)]) : !props.reverse ? _createVNode(_Fragment, null, [dividerNode(), controlNode()]) : undefined;
|
204
|
+
}, null), incrementControlNode()]) : !props.reverse ? _createVNode(_Fragment, null, [dividerNode(), controlNode()]) : undefined;
|
204
205
|
const hasAppendInner = slots['append-inner'] || appendInnerControl;
|
205
206
|
const prependInnerControl = controlVariant.value === 'split' ? _createVNode("div", {
|
206
207
|
"class": "v-number-input__control"
|
207
|
-
}, [_createVNode(
|
208
|
-
"flat": true,
|
209
|
-
"height": "100%",
|
210
|
-
"icon": "$minus",
|
211
|
-
"tile": true,
|
212
|
-
"tabindex": "-1",
|
213
|
-
"onClick": onClickDown,
|
214
|
-
"onMousedown": onControlMousedown
|
215
|
-
}, null), _createVNode(VDivider, {
|
208
|
+
}, [decrementControlNode(), _createVNode(VDivider, {
|
216
209
|
"vertical": true
|
217
210
|
}, null)]) : props.reverse ? _createVNode(_Fragment, null, [controlNode(), dividerNode()]) : undefined;
|
218
211
|
const hasPrependInner = slots['prepend-inner'] || prependInnerControl;
|