39 lines
936 B
JavaScript
39 lines
936 B
JavaScript
|
import {
|
||
|
propsFactory
|
||
|
} from "./chunk-I4KGD5X4.js";
|
||
|
import {
|
||
|
computed,
|
||
|
isRef
|
||
|
} from "./chunk-PD2AWGJV.js";
|
||
|
|
||
|
// node_modules/vuetify/lib/composables/elevation.mjs
|
||
|
var makeElevationProps = propsFactory({
|
||
|
elevation: {
|
||
|
type: [Number, String],
|
||
|
validator(v) {
|
||
|
const value = parseInt(v);
|
||
|
return !isNaN(value) && value >= 0 && // Material Design has a maximum elevation of 24
|
||
|
// https://material.io/design/environment/elevation.html#default-elevations
|
||
|
value <= 24;
|
||
|
}
|
||
|
}
|
||
|
}, "elevation");
|
||
|
function useElevation(props) {
|
||
|
const elevationClasses = computed(() => {
|
||
|
const elevation = isRef(props) ? props.value : props.elevation;
|
||
|
const classes = [];
|
||
|
if (elevation == null) return classes;
|
||
|
classes.push(`elevation-${elevation}`);
|
||
|
return classes;
|
||
|
});
|
||
|
return {
|
||
|
elevationClasses
|
||
|
};
|
||
|
}
|
||
|
|
||
|
export {
|
||
|
makeElevationProps,
|
||
|
useElevation
|
||
|
};
|
||
|
//# sourceMappingURL=chunk-QXA6VMYU.js.map
|