218 lines
7.7 KiB
JavaScript
218 lines
7.7 KiB
JavaScript
import { C as vShow, Cn as withDirectives, Dt as mergeProps, U as computed, W as createBaseVNode, ar as normalizeClass, et as createVNode, sr as normalizeStyle } from "./vue.runtime.esm-bundler-BvoXUmaf.js";
|
|
import { I as isObject, _ as convertToUnit, l as propsFactory, n as genericComponent, q as pickWithRest } from "./defineComponent-DB6xIcDy.js";
|
|
import { t as makeComponentProps } from "./component-DdiwBe6i.js";
|
|
import { t as useRender } from "./useRender-fVtVsZgv.js";
|
|
import { r as useTextColor, t as useBackgroundColor } from "./color-B6vuQruj.js";
|
|
import { a as useTheme, i as provideTheme, r as makeThemeProps } from "./theme-Cx5kFg0-.js";
|
|
import { n as IconValue } from "./icons-k2ZLE_i8.js";
|
|
import { r as useLocale } from "./locale-DDGMqzqb.js";
|
|
import { t as makeTagProps } from "./tag-C_KkCPzB.js";
|
|
import { t as VDefaultsProvider } from "./VDefaultsProvider-C09t4-My.js";
|
|
import { n as useDimension, t as makeDimensionProps } from "./dimensions-BDdmuRdK.js";
|
|
import { t as VImg } from "./VImg-DaEUT7gG.js";
|
|
import { n as useRounded, t as makeRoundedProps } from "./rounded-BuPGKRa9.js";
|
|
import { n as makeTransitionProps, t as MaybeTransition } from "./transition-DqoZ8fA1.js";
|
|
import { n as useBorder, t as makeBorderProps } from "./border-jCmRyoxP.js";
|
|
import { n as useLocation, t as makeLocationProps } from "./location-BIKTnDF4.js";
|
|
import { n as useDensity, t as makeDensityProps } from "./density-CpKZ5PhP.js";
|
|
import { n as makeVariantProps, r as useVariant, t as genOverlays } from "./variant-CqXtG9Ih.js";
|
|
import { n as makeSizeProps, r as useSize, t as VIcon } from "./VIcon-1CJH_3Uo.js";
|
|
import "/Users/thackmaster/Development/routie2/frontend/node_modules/vuetify/lib/components/VAvatar/VAvatar.css";
|
|
import "/Users/thackmaster/Development/routie2/frontend/node_modules/vuetify/lib/components/VBadge/VBadge.css";
|
|
//#region node_modules/vuetify/lib/components/VBadge/VBadge.js
|
|
var makeVBadgeProps = propsFactory({
|
|
bordered: Boolean,
|
|
color: String,
|
|
content: [Number, String],
|
|
dot: Boolean,
|
|
dotSize: [Number, String],
|
|
floating: Boolean,
|
|
icon: IconValue,
|
|
inline: Boolean,
|
|
label: {
|
|
type: String,
|
|
default: "$vuetify.badge"
|
|
},
|
|
max: [Number, String],
|
|
modelValue: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
offsetX: [Number, String],
|
|
offsetY: [Number, String],
|
|
textColor: String,
|
|
...makeComponentProps(),
|
|
...makeLocationProps({ location: "top end" }),
|
|
...makeRoundedProps(),
|
|
...makeTagProps(),
|
|
...makeThemeProps(),
|
|
...makeTransitionProps({ transition: "scale-rotate-transition" }),
|
|
...makeDimensionProps()
|
|
}, "VBadge");
|
|
var VBadge = genericComponent()({
|
|
name: "VBadge",
|
|
inheritAttrs: false,
|
|
props: makeVBadgeProps(),
|
|
setup(props, ctx) {
|
|
const { backgroundColorClasses, backgroundColorStyles } = useBackgroundColor(() => props.color);
|
|
const { roundedClasses } = useRounded(props);
|
|
const { t } = useLocale();
|
|
const { textColorClasses, textColorStyles } = useTextColor(() => props.textColor);
|
|
const { themeClasses } = useTheme();
|
|
const { locationStyles } = useLocation(props, true, (side) => {
|
|
return (props.floating ? props.dot ? 2 : 4 : props.dot ? Number(props.dotSize ?? 8) : 12) + (["top", "bottom"].includes(side) ? Number(props.offsetY ?? 0) : ["left", "right"].includes(side) ? Number(props.offsetX ?? 0) : 0);
|
|
});
|
|
const { dimensionStyles } = useDimension(props);
|
|
useRender(() => {
|
|
const value = Number(props.content);
|
|
const content = !props.max || isNaN(value) ? props.content : value <= Number(props.max) ? value : `${props.max}+`;
|
|
const [badgeAttrs, attrs] = pickWithRest(ctx.attrs, [
|
|
"aria-atomic",
|
|
"aria-label",
|
|
"aria-live",
|
|
"role",
|
|
"title"
|
|
]);
|
|
return createVNode(props.tag, mergeProps({ "class": [
|
|
"v-badge",
|
|
{
|
|
"v-badge--bordered": props.bordered,
|
|
"v-badge--dot": props.dot,
|
|
"v-badge--floating": props.floating,
|
|
"v-badge--inline": props.inline
|
|
},
|
|
props.class
|
|
] }, attrs, { "style": props.style }), { default: () => [createBaseVNode("div", { "class": "v-badge__wrapper" }, [ctx.slots.default?.(), createVNode(MaybeTransition, { "transition": props.transition }, { default: () => [withDirectives(createBaseVNode("span", mergeProps({
|
|
"class": [
|
|
"v-badge__badge",
|
|
themeClasses.value,
|
|
backgroundColorClasses.value,
|
|
roundedClasses.value,
|
|
textColorClasses.value
|
|
],
|
|
"style": [
|
|
backgroundColorStyles.value,
|
|
textColorStyles.value,
|
|
dimensionStyles.value,
|
|
props.inline ? {} : locationStyles.value,
|
|
props.dot && props.dotSize ? {
|
|
width: convertToUnit(props.dotSize),
|
|
height: convertToUnit(props.dotSize)
|
|
} : {}
|
|
],
|
|
"aria-atomic": "true",
|
|
"aria-label": t(props.label, value),
|
|
"aria-live": "polite",
|
|
"role": "status"
|
|
}, badgeAttrs), [props.dot ? void 0 : ctx.slots.badge ? ctx.slots.badge?.() : props.icon ? createVNode(VIcon, { "icon": props.icon }, null) : content]), [[vShow, props.modelValue]])] })])] });
|
|
});
|
|
return {};
|
|
}
|
|
});
|
|
//#endregion
|
|
//#region node_modules/vuetify/lib/components/VAvatar/VAvatar.js
|
|
var makeVAvatarProps = propsFactory({
|
|
badge: {
|
|
type: [Boolean, Object],
|
|
default: false
|
|
},
|
|
start: Boolean,
|
|
end: Boolean,
|
|
icon: IconValue,
|
|
image: String,
|
|
text: String,
|
|
...makeBorderProps(),
|
|
...makeComponentProps(),
|
|
...makeDensityProps(),
|
|
...makeRoundedProps(),
|
|
...makeSizeProps(),
|
|
...makeTagProps(),
|
|
...makeThemeProps(),
|
|
...makeVariantProps({ variant: "flat" })
|
|
}, "VAvatar");
|
|
var VAvatar = genericComponent()({
|
|
name: "VAvatar",
|
|
props: makeVAvatarProps(),
|
|
setup(props, { slots }) {
|
|
const { themeClasses } = provideTheme(props);
|
|
const { borderClasses } = useBorder(props);
|
|
const { colorClasses, colorStyles, variantClasses } = useVariant(props);
|
|
const { densityClasses } = useDensity(props);
|
|
const { roundedClasses } = useRounded(props);
|
|
const { sizeClasses, sizeStyles } = useSize(props);
|
|
const badgeDotSize = computed(() => {
|
|
switch (props.size) {
|
|
case "x-small": return 8;
|
|
case "small": return 10;
|
|
case "large": return 14;
|
|
case "x-large": return 16;
|
|
default: return 12;
|
|
}
|
|
});
|
|
const badgeOffset = computed(() => {
|
|
const { floating } = isObject(props.badge) ? props.badge : {};
|
|
return (floating ? badgeDotSize.value / 2 : 0) - 1.5;
|
|
});
|
|
const badgeProps = computed(() => {
|
|
return {
|
|
bordered: true,
|
|
dot: !slots.badge,
|
|
dotSize: badgeDotSize.value,
|
|
offsetX: badgeOffset.value,
|
|
offsetY: badgeOffset.value,
|
|
color: typeof props.badge === "string" ? props.badge : "primary",
|
|
...isObject(props.badge) ? props.badge : {}
|
|
};
|
|
});
|
|
useRender(() => {
|
|
const avatar = createVNode(props.tag, {
|
|
"class": normalizeClass([
|
|
"v-avatar",
|
|
{
|
|
"v-avatar--start": props.start,
|
|
"v-avatar--end": props.end
|
|
},
|
|
themeClasses.value,
|
|
borderClasses.value,
|
|
colorClasses.value,
|
|
densityClasses.value,
|
|
roundedClasses.value,
|
|
sizeClasses.value,
|
|
variantClasses.value,
|
|
props.class
|
|
]),
|
|
"style": normalizeStyle([
|
|
colorStyles.value,
|
|
sizeStyles.value,
|
|
props.style
|
|
])
|
|
}, { default: () => [!slots.default ? props.image ? createVNode(VImg, {
|
|
"key": "image",
|
|
"src": props.image,
|
|
"alt": "",
|
|
"cover": true
|
|
}, null) : props.icon ? createVNode(VIcon, {
|
|
"key": "icon",
|
|
"icon": props.icon
|
|
}, null) : props.text : createVNode(VDefaultsProvider, {
|
|
"key": "content-defaults",
|
|
"defaults": {
|
|
VImg: {
|
|
cover: true,
|
|
src: props.image
|
|
},
|
|
VIcon: { icon: props.icon }
|
|
}
|
|
}, { default: () => [slots.default()] }), genOverlays(false, "v-avatar")] });
|
|
return props.badge ? createVNode(VBadge, badgeProps.value, {
|
|
default: () => avatar,
|
|
badge: slots.badge
|
|
}) : avatar;
|
|
});
|
|
return {};
|
|
}
|
|
});
|
|
//#endregion
|
|
export { VAvatar as t };
|
|
|
|
//# sourceMappingURL=VAvatar-CA-KqvIX.js.map
|