117 lines
3.3 KiB
JavaScript
117 lines
3.3 KiB
JavaScript
import {
|
|
VOverlay,
|
|
makeVOverlayProps
|
|
} from "./chunk-CL6G3ICF.js";
|
|
import {
|
|
useScopeId
|
|
} from "./chunk-BVUPSGRF.js";
|
|
import {
|
|
forwardRefs
|
|
} from "./chunk-GUNW7S2L.js";
|
|
import {
|
|
useProxiedModel
|
|
} from "./chunk-KA77II4V.js";
|
|
import {
|
|
genericComponent,
|
|
omit,
|
|
propsFactory,
|
|
useRender
|
|
} from "./chunk-LZ5T2ERG.js";
|
|
import {
|
|
computed,
|
|
createVNode,
|
|
mergeProps,
|
|
ref,
|
|
toRef,
|
|
useId
|
|
} from "./chunk-2MKFL3BX.js";
|
|
|
|
// node_modules/vuetify/lib/components/VTooltip/VTooltip.js
|
|
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VTooltip/VTooltip.css";
|
|
var makeVTooltipProps = propsFactory({
|
|
id: String,
|
|
interactive: Boolean,
|
|
text: String,
|
|
...omit(makeVOverlayProps({
|
|
closeOnBack: false,
|
|
location: "end",
|
|
locationStrategy: "connected",
|
|
eager: true,
|
|
minWidth: 0,
|
|
offset: 10,
|
|
openOnClick: false,
|
|
openOnHover: true,
|
|
origin: "auto",
|
|
scrim: false,
|
|
scrollStrategy: "reposition",
|
|
transition: null
|
|
}), ["absolute", "retainFocus", "captureFocus", "disableInitialFocus"])
|
|
}, "VTooltip");
|
|
var VTooltip = genericComponent()({
|
|
name: "VTooltip",
|
|
props: makeVTooltipProps(),
|
|
emits: {
|
|
"update:modelValue": (value) => true
|
|
},
|
|
setup(props, _ref) {
|
|
let {
|
|
slots
|
|
} = _ref;
|
|
const isActive = useProxiedModel(props, "modelValue");
|
|
const {
|
|
scopeId
|
|
} = useScopeId();
|
|
const uid = useId();
|
|
const id = toRef(() => props.id || `v-tooltip-${uid}`);
|
|
const overlay = ref();
|
|
const location = computed(() => {
|
|
return props.location.split(" ").length > 1 ? props.location : props.location + " center";
|
|
});
|
|
const origin = computed(() => {
|
|
return props.origin === "auto" || props.origin === "overlap" || props.origin.split(" ").length > 1 || props.location.split(" ").length > 1 ? props.origin : props.origin + " center";
|
|
});
|
|
const transition = toRef(() => {
|
|
if (props.transition != null) return props.transition;
|
|
return isActive.value ? "scale-transition" : "fade-transition";
|
|
});
|
|
const activatorProps = computed(() => mergeProps({
|
|
"aria-describedby": id.value
|
|
}, props.activatorProps));
|
|
useRender(() => {
|
|
const overlayProps = VOverlay.filterProps(props);
|
|
return createVNode(VOverlay, mergeProps({
|
|
"ref": overlay,
|
|
"class": ["v-tooltip", {
|
|
"v-tooltip--interactive": props.interactive
|
|
}, props.class],
|
|
"style": props.style,
|
|
"id": id.value
|
|
}, overlayProps, {
|
|
"modelValue": isActive.value,
|
|
"onUpdate:modelValue": ($event) => isActive.value = $event,
|
|
"transition": transition.value,
|
|
"absolute": true,
|
|
"location": location.value,
|
|
"origin": origin.value,
|
|
"role": "tooltip",
|
|
"activatorProps": activatorProps.value,
|
|
"_disableGlobalStack": true
|
|
}, scopeId), {
|
|
activator: slots.activator,
|
|
default: function() {
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
return slots.default?.(...args) ?? props.text;
|
|
}
|
|
});
|
|
});
|
|
return forwardRefs({}, overlay);
|
|
}
|
|
});
|
|
|
|
export {
|
|
VTooltip
|
|
};
|
|
//# sourceMappingURL=chunk-EXUNAYJA.js.map
|