routie dev init since i didn't adhere to any proper guidance up until now
This commit is contained in:
+103
@@ -0,0 +1,103 @@
|
||||
import { L as Text, Yn as shallowRef, ar as normalizeClass, et as createVNode, sr as normalizeStyle } from "./vue.runtime.esm-bundler-BvoXUmaf.js";
|
||||
import { E as flattenFragments, P as includes, _ as convertToUnit, c as getCurrentInstanceName, l as propsFactory, n as genericComponent, x as destructComputed } from "./defineComponent-DB6xIcDy.js";
|
||||
import { t as makeComponentProps } from "./component-DdiwBe6i.js";
|
||||
import { t as useRender } from "./useRender-fVtVsZgv.js";
|
||||
import { r as useTextColor } from "./color-B6vuQruj.js";
|
||||
import { a as useTheme, r as makeThemeProps } from "./theme-Cx5kFg0-.js";
|
||||
import { n as IconValue, s as useIcon } from "./icons-k2ZLE_i8.js";
|
||||
import { t as makeTagProps } from "./tag-C_KkCPzB.js";
|
||||
import "/Users/thackmaster/Development/routie2/frontend/node_modules/vuetify/lib/components/VIcon/VIcon.css";
|
||||
//#region node_modules/vuetify/lib/composables/size.js
|
||||
var predefinedSizes = [
|
||||
"x-small",
|
||||
"small",
|
||||
"default",
|
||||
"large",
|
||||
"x-large"
|
||||
];
|
||||
var makeSizeProps = propsFactory({ size: {
|
||||
type: [String, Number],
|
||||
default: "default"
|
||||
} }, "size");
|
||||
function useSize(props, name = getCurrentInstanceName()) {
|
||||
return destructComputed(() => {
|
||||
const size = props.size;
|
||||
let sizeClasses;
|
||||
let sizeStyles;
|
||||
if (includes(predefinedSizes, size)) sizeClasses = `${name}--size-${size}`;
|
||||
else if (size) sizeStyles = {
|
||||
width: convertToUnit(size),
|
||||
height: convertToUnit(size)
|
||||
};
|
||||
return {
|
||||
sizeClasses,
|
||||
sizeStyles
|
||||
};
|
||||
});
|
||||
}
|
||||
//#endregion
|
||||
//#region node_modules/vuetify/lib/components/VIcon/VIcon.js
|
||||
var makeVIconProps = propsFactory({
|
||||
color: String,
|
||||
disabled: Boolean,
|
||||
start: Boolean,
|
||||
end: Boolean,
|
||||
icon: IconValue,
|
||||
opacity: [String, Number],
|
||||
...makeComponentProps(),
|
||||
...makeSizeProps(),
|
||||
...makeTagProps({ tag: "i" }),
|
||||
...makeThemeProps()
|
||||
}, "VIcon");
|
||||
var VIcon = genericComponent()({
|
||||
name: "VIcon",
|
||||
props: makeVIconProps(),
|
||||
setup(props, { attrs, slots }) {
|
||||
const slotIcon = shallowRef();
|
||||
const { themeClasses } = useTheme();
|
||||
const { iconData } = useIcon(() => slotIcon.value || props.icon);
|
||||
const { sizeClasses } = useSize(props);
|
||||
const { textColorClasses, textColorStyles } = useTextColor(() => props.color);
|
||||
useRender(() => {
|
||||
const slotValue = slots.default?.();
|
||||
if (slotValue) slotIcon.value = flattenFragments(slotValue).filter((node) => node.type === Text && node.children && typeof node.children === "string")[0]?.children;
|
||||
const hasClick = !!(attrs.onClick || attrs.onClickOnce);
|
||||
return createVNode(iconData.value.component, {
|
||||
"tag": props.tag,
|
||||
"icon": iconData.value.icon,
|
||||
"class": normalizeClass([
|
||||
"v-icon",
|
||||
"notranslate",
|
||||
themeClasses.value,
|
||||
sizeClasses.value,
|
||||
textColorClasses.value,
|
||||
{
|
||||
"v-icon--clickable": hasClick,
|
||||
"v-icon--disabled": props.disabled,
|
||||
"v-icon--start": props.start,
|
||||
"v-icon--end": props.end
|
||||
},
|
||||
props.class
|
||||
]),
|
||||
"style": normalizeStyle([
|
||||
{ "--v-icon-opacity": props.opacity },
|
||||
!sizeClasses.value ? {
|
||||
fontSize: convertToUnit(props.size),
|
||||
height: convertToUnit(props.size),
|
||||
width: convertToUnit(props.size)
|
||||
} : void 0,
|
||||
textColorStyles.value,
|
||||
props.style
|
||||
]),
|
||||
"role": hasClick ? "button" : void 0,
|
||||
"aria-hidden": !hasClick,
|
||||
"tabindex": hasClick ? props.disabled ? -1 : 0 : void 0
|
||||
}, { default: () => [slotValue] });
|
||||
});
|
||||
return {};
|
||||
}
|
||||
});
|
||||
//#endregion
|
||||
export { makeSizeProps as n, useSize as r, VIcon as t };
|
||||
|
||||
//# sourceMappingURL=VIcon-1CJH_3Uo.js.map
|
||||
Reference in New Issue
Block a user