Major overhaul to the theme and now functioning.
This commit is contained in:
+109
@@ -0,0 +1,109 @@
|
||||
import {
|
||||
makeSizeProps,
|
||||
useSize
|
||||
} from "./chunk-PIT7IT55.js";
|
||||
import {
|
||||
makeTagProps
|
||||
} from "./chunk-2HZIACSB.js";
|
||||
import {
|
||||
IconValue,
|
||||
useIcon
|
||||
} from "./chunk-OJDZBU5D.js";
|
||||
import {
|
||||
useTextColor
|
||||
} from "./chunk-BHV5Z34M.js";
|
||||
import {
|
||||
makeThemeProps,
|
||||
useTheme
|
||||
} from "./chunk-3DSR7NCB.js";
|
||||
import {
|
||||
convertToUnit,
|
||||
flattenFragments,
|
||||
genericComponent,
|
||||
makeComponentProps,
|
||||
propsFactory,
|
||||
useRender
|
||||
} from "./chunk-LZ5T2ERG.js";
|
||||
import {
|
||||
Text,
|
||||
createVNode,
|
||||
normalizeClass,
|
||||
normalizeStyle,
|
||||
shallowRef
|
||||
} from "./chunk-2MKFL3BX.js";
|
||||
|
||||
// node_modules/vuetify/lib/components/VIcon/VIcon.js
|
||||
import "/home/david/Documents/vscode/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VIcon/VIcon.css";
|
||||
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, _ref) {
|
||||
let {
|
||||
attrs,
|
||||
slots
|
||||
} = _ref;
|
||||
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 {};
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
VIcon
|
||||
};
|
||||
//# sourceMappingURL=chunk-CMZ4UYUX.js.map
|
||||
Reference in New Issue
Block a user