Files
personal_development/ServerManagerWebApp/frontend/node_modules/.vite/deps/chunk-QMLWKRPM.js
T
2026-01-09 19:24:41 +00:00

290 lines
7.5 KiB
JavaScript

import {
VBtn
} from "./chunk-UQALH6SL.js";
import {
makePositionProps,
usePosition
} from "./chunk-HOEZWRBG.js";
import {
genOverlays,
makeVariantProps,
useVariant
} from "./chunk-ADXDXPPR.js";
import {
makeElevationProps,
useElevation
} from "./chunk-YJD2PNP6.js";
import {
makeLocationProps,
useLocation
} from "./chunk-KTTVT6V2.js";
import {
makeDensityProps,
useDensity
} from "./chunk-TM3MIDYC.js";
import {
VIcon
} from "./chunk-4XZHKYGH.js";
import {
makeRoundedProps,
useRounded
} from "./chunk-AQK3CYVW.js";
import {
VDefaultsProvider
} from "./chunk-PAT7NP2Z.js";
import {
makeTagProps
} from "./chunk-2HZIACSB.js";
import {
IconValue
} from "./chunk-OJDZBU5D.js";
import {
useTextColor
} from "./chunk-BHV5Z34M.js";
import {
makeDimensionProps,
useDimension
} from "./chunk-6EZKHCRW.js";
import {
useLocale
} from "./chunk-ENTLCOCZ.js";
import {
useProxiedModel
} from "./chunk-KA77II4V.js";
import {
makeThemeProps,
provideTheme
} from "./chunk-3DSR7NCB.js";
import {
createSimpleFunctional,
genericComponent,
makeComponentProps,
propsFactory
} from "./chunk-LZ5T2ERG.js";
import {
computed,
createBaseVNode,
createVNode,
mergeProps,
normalizeClass,
normalizeStyle,
toRef
} from "./chunk-2MKFL3BX.js";
// node_modules/vuetify/lib/components/VAlert/VAlert.js
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VAlert/VAlert.css";
// node_modules/vuetify/lib/components/VAlert/VAlertTitle.js
var VAlertTitle = createSimpleFunctional("v-alert-title");
// node_modules/vuetify/lib/composables/iconSizes.js
var makeIconSizeProps = propsFactory({
iconSize: [Number, String],
iconSizes: {
type: Array,
default: () => [["x-small", 10], ["small", 16], ["default", 24], ["large", 28], ["x-large", 32]]
}
}, "iconSize");
function useIconSizes(props, fallback) {
const iconSize = computed(() => {
const iconSizeMap = new Map(props.iconSizes);
const _iconSize = props.iconSize ?? fallback() ?? "default";
return iconSizeMap.has(_iconSize) ? iconSizeMap.get(_iconSize) : _iconSize;
});
return {
iconSize
};
}
// node_modules/vuetify/lib/components/VAlert/VAlert.js
var allowedTypes = ["success", "info", "warning", "error"];
var makeVAlertProps = propsFactory({
border: {
type: [Boolean, String],
validator: (val) => {
return typeof val === "boolean" || ["top", "end", "bottom", "start"].includes(val);
}
},
borderColor: String,
closable: Boolean,
closeIcon: {
type: IconValue,
default: "$close"
},
closeLabel: {
type: String,
default: "$vuetify.close"
},
icon: {
type: [Boolean, String, Function, Object],
default: null
},
modelValue: {
type: Boolean,
default: true
},
prominent: Boolean,
title: String,
text: String,
type: {
type: String,
validator: (val) => allowedTypes.includes(val)
},
...makeComponentProps(),
...makeDensityProps(),
...makeDimensionProps(),
...makeElevationProps(),
...makeIconSizeProps(),
...makeLocationProps(),
...makePositionProps(),
...makeRoundedProps(),
...makeTagProps(),
...makeThemeProps(),
...makeVariantProps({
variant: "flat"
})
}, "VAlert");
var VAlert = genericComponent()({
name: "VAlert",
props: makeVAlertProps(),
emits: {
"click:close": (e) => true,
"update:modelValue": (value) => true
},
setup(props, _ref) {
let {
emit,
slots
} = _ref;
const isActive = useProxiedModel(props, "modelValue");
const icon = toRef(() => {
if (props.icon === false) return void 0;
if (!props.type) return props.icon;
return props.icon ?? `$${props.type}`;
});
const {
iconSize
} = useIconSizes(props, () => props.prominent ? 44 : void 0);
const {
themeClasses
} = provideTheme(props);
const {
colorClasses,
colorStyles,
variantClasses
} = useVariant(() => ({
color: props.color ?? props.type,
variant: props.variant
}));
const {
densityClasses
} = useDensity(props);
const {
dimensionStyles
} = useDimension(props);
const {
elevationClasses
} = useElevation(props);
const {
locationStyles
} = useLocation(props);
const {
positionClasses
} = usePosition(props);
const {
roundedClasses
} = useRounded(props);
const {
textColorClasses,
textColorStyles
} = useTextColor(() => props.borderColor);
const {
t
} = useLocale();
const closeProps = toRef(() => ({
"aria-label": t(props.closeLabel),
onClick(e) {
isActive.value = false;
emit("click:close", e);
}
}));
return () => {
const hasPrepend = !!(slots.prepend || icon.value);
const hasTitle = !!(slots.title || props.title);
const hasClose = !!(slots.close || props.closable);
const iconProps = {
density: props.density,
icon: icon.value,
size: props.iconSize || props.prominent ? iconSize.value : void 0
};
return isActive.value && createVNode(props.tag, {
"class": normalizeClass(["v-alert", props.border && {
"v-alert--border": !!props.border,
[`v-alert--border-${props.border === true ? "start" : props.border}`]: true
}, {
"v-alert--prominent": props.prominent
}, themeClasses.value, colorClasses.value, densityClasses.value, elevationClasses.value, positionClasses.value, roundedClasses.value, variantClasses.value, props.class]),
"style": normalizeStyle([colorStyles.value, dimensionStyles.value, locationStyles.value, props.style]),
"role": "alert"
}, {
default: () => [genOverlays(false, "v-alert"), props.border && createBaseVNode("div", {
"key": "border",
"class": normalizeClass(["v-alert__border", textColorClasses.value]),
"style": normalizeStyle(textColorStyles.value)
}, null), hasPrepend && createBaseVNode("div", {
"key": "prepend",
"class": "v-alert__prepend"
}, [!slots.prepend ? createVNode(VIcon, mergeProps({
"key": "prepend-icon"
}, iconProps), null) : createVNode(VDefaultsProvider, {
"key": "prepend-defaults",
"disabled": !icon.value,
"defaults": {
VIcon: {
...iconProps
}
}
}, slots.prepend)]), createBaseVNode("div", {
"class": "v-alert__content"
}, [hasTitle && createVNode(VAlertTitle, {
"key": "title"
}, {
default: () => [slots.title?.() ?? props.title]
}), slots.text?.() ?? props.text, slots.default?.()]), slots.append && createBaseVNode("div", {
"key": "append",
"class": "v-alert__append"
}, [slots.append()]), hasClose && createBaseVNode("div", {
"key": "close",
"class": "v-alert__close"
}, [!slots.close ? createVNode(VBtn, mergeProps({
"key": "close-btn",
"icon": props.closeIcon,
"size": "x-small",
"variant": "text"
}, closeProps.value), null) : createVNode(VDefaultsProvider, {
"key": "close-defaults",
"defaults": {
VBtn: {
icon: props.closeIcon,
size: "x-small",
variant: "text"
}
}
}, {
default: () => [slots.close?.({
props: closeProps.value
})]
})])]
});
};
}
});
export {
VAlertTitle,
makeIconSizeProps,
useIconSizes,
VAlert
};
//# sourceMappingURL=chunk-QMLWKRPM.js.map