256 lines
7.4 KiB
JavaScript
256 lines
7.4 KiB
JavaScript
import {
|
|
consoleWarn,
|
|
defineComponent,
|
|
genericComponent,
|
|
mergeDeep,
|
|
propsFactory
|
|
} from "./chunk-ADPJOAU6.js";
|
|
import {
|
|
computed,
|
|
createBaseVNode,
|
|
createVNode,
|
|
h,
|
|
inject,
|
|
mergeProps,
|
|
normalizeClass,
|
|
toValue
|
|
} from "./chunk-FIAHBV72.js";
|
|
|
|
// node_modules/vuetify/lib/iconsets/mdi.js
|
|
var aliases = {
|
|
collapse: "mdi-chevron-up",
|
|
complete: "mdi-check",
|
|
cancel: "mdi-close-circle",
|
|
close: "mdi-close",
|
|
delete: "mdi-close-circle",
|
|
// delete (e.g. v-chip close)
|
|
clear: "mdi-close-circle",
|
|
success: "mdi-check-circle",
|
|
info: "mdi-information",
|
|
warning: "mdi-alert-circle",
|
|
error: "mdi-close-circle",
|
|
prev: "mdi-chevron-left",
|
|
next: "mdi-chevron-right",
|
|
checkboxOn: "mdi-checkbox-marked",
|
|
checkboxOff: "mdi-checkbox-blank-outline",
|
|
checkboxIndeterminate: "mdi-minus-box",
|
|
delimiter: "mdi-circle",
|
|
// for carousel
|
|
sortAsc: "mdi-arrow-up",
|
|
sortDesc: "mdi-arrow-down",
|
|
expand: "mdi-chevron-down",
|
|
menu: "mdi-menu",
|
|
subgroup: "mdi-menu-down",
|
|
dropdown: "mdi-menu-down",
|
|
radioOn: "mdi-radiobox-marked",
|
|
radioOff: "mdi-radiobox-blank",
|
|
edit: "mdi-pencil",
|
|
ratingEmpty: "mdi-star-outline",
|
|
ratingFull: "mdi-star",
|
|
ratingHalf: "mdi-star-half-full",
|
|
loading: "mdi-cached",
|
|
first: "mdi-page-first",
|
|
last: "mdi-page-last",
|
|
unfold: "mdi-unfold-more-horizontal",
|
|
file: "mdi-paperclip",
|
|
plus: "mdi-plus",
|
|
minus: "mdi-minus",
|
|
calendar: "mdi-calendar",
|
|
treeviewCollapse: "mdi-menu-down",
|
|
treeviewExpand: "mdi-menu-right",
|
|
eyeDropper: "mdi-eyedropper",
|
|
upload: "mdi-cloud-upload",
|
|
color: "mdi-palette",
|
|
command: "mdi-apple-keyboard-command",
|
|
ctrl: "mdi-apple-keyboard-control",
|
|
space: "mdi-keyboard-space",
|
|
shift: "mdi-apple-keyboard-shift",
|
|
alt: "mdi-apple-keyboard-option",
|
|
enter: "mdi-keyboard-return",
|
|
arrowup: "mdi-arrow-up",
|
|
arrowdown: "mdi-arrow-down",
|
|
arrowleft: "mdi-arrow-left",
|
|
arrowright: "mdi-arrow-right",
|
|
backspace: "mdi-backspace",
|
|
play: "mdi-play",
|
|
pause: "mdi-pause",
|
|
fullscreen: "mdi-fullscreen",
|
|
fullscreenExit: "mdi-fullscreen-exit",
|
|
volumeHigh: "mdi-volume-high",
|
|
volumeMedium: "mdi-volume-medium",
|
|
volumeLow: "mdi-volume-low",
|
|
volumeOff: "mdi-volume-variant-off"
|
|
};
|
|
var mdi = {
|
|
// Not using mergeProps here, functional components merge props by default (?)
|
|
component: (props) => h(VClassIcon, {
|
|
...props,
|
|
class: "mdi"
|
|
})
|
|
};
|
|
|
|
// node_modules/vuetify/lib/composables/icons.js
|
|
var IconValue = [String, Function, Object, Array];
|
|
var IconSymbol = Symbol.for("vuetify:icons");
|
|
var makeIconProps = propsFactory({
|
|
icon: {
|
|
type: IconValue
|
|
},
|
|
// Could not remove this and use makeTagProps, types complained because it is not required
|
|
tag: {
|
|
type: [String, Object, Function],
|
|
required: true
|
|
}
|
|
}, "icon");
|
|
var VComponentIcon = genericComponent()({
|
|
name: "VComponentIcon",
|
|
props: makeIconProps(),
|
|
setup(props, _ref) {
|
|
let {
|
|
slots
|
|
} = _ref;
|
|
return () => {
|
|
const Icon = props.icon;
|
|
return createVNode(props.tag, null, {
|
|
default: () => {
|
|
var _a;
|
|
return [props.icon ? createVNode(Icon, null, null) : (_a = slots.default) == null ? void 0 : _a.call(slots)];
|
|
}
|
|
});
|
|
};
|
|
}
|
|
});
|
|
var VSvgIcon = defineComponent({
|
|
name: "VSvgIcon",
|
|
inheritAttrs: false,
|
|
props: makeIconProps(),
|
|
setup(props, _ref2) {
|
|
let {
|
|
attrs
|
|
} = _ref2;
|
|
return () => {
|
|
return createVNode(props.tag, mergeProps(attrs, {
|
|
"style": null
|
|
}), {
|
|
default: () => [createBaseVNode("svg", {
|
|
"class": "v-icon__svg",
|
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
"viewBox": "0 0 24 24",
|
|
"role": "img",
|
|
"aria-hidden": "true"
|
|
}, [Array.isArray(props.icon) ? props.icon.map((path) => Array.isArray(path) ? createBaseVNode("path", {
|
|
"d": path[0],
|
|
"fill-opacity": path[1]
|
|
}, null) : createBaseVNode("path", {
|
|
"d": path
|
|
}, null)) : createBaseVNode("path", {
|
|
"d": props.icon
|
|
}, null)])]
|
|
});
|
|
};
|
|
}
|
|
});
|
|
var VLigatureIcon = defineComponent({
|
|
name: "VLigatureIcon",
|
|
props: makeIconProps(),
|
|
setup(props) {
|
|
return () => {
|
|
return createVNode(props.tag, null, {
|
|
default: () => [props.icon]
|
|
});
|
|
};
|
|
}
|
|
});
|
|
var VClassIcon = defineComponent({
|
|
name: "VClassIcon",
|
|
props: makeIconProps(),
|
|
setup(props) {
|
|
return () => {
|
|
return createVNode(props.tag, {
|
|
"class": normalizeClass(props.icon)
|
|
}, null);
|
|
};
|
|
}
|
|
});
|
|
function genDefaults() {
|
|
return {
|
|
svg: {
|
|
component: VSvgIcon
|
|
},
|
|
class: {
|
|
component: VClassIcon
|
|
}
|
|
};
|
|
}
|
|
function createIcons(options) {
|
|
const sets = genDefaults();
|
|
const defaultSet = (options == null ? void 0 : options.defaultSet) ?? "mdi";
|
|
if (defaultSet === "mdi" && !sets.mdi) {
|
|
sets.mdi = mdi;
|
|
}
|
|
return mergeDeep({
|
|
defaultSet,
|
|
sets,
|
|
aliases: {
|
|
...aliases,
|
|
/* eslint-disable max-len */
|
|
vuetify: ["M8.2241 14.2009L12 21L22 3H14.4459L8.2241 14.2009Z", ["M7.26303 12.4733L7.00113 12L2 3H12.5261C12.5261 3 12.5261 3 12.5261 3L7.26303 12.4733Z", 0.6]],
|
|
"vuetify-outline": "svg:M7.26 12.47 12.53 3H2L7.26 12.47ZM14.45 3 8.22 14.2 12 21 22 3H14.45ZM18.6 5 12 16.88 10.51 14.2 15.62 5ZM7.26 8.35 5.4 5H9.13L7.26 8.35Z",
|
|
"vuetify-play": ["m6.376 13.184-4.11-7.192C1.505 4.66 2.467 3 4.003 3h8.532l-.953 1.576-.006.01-.396.677c-.429.732-.214 1.507.194 2.015.404.503 1.092.878 1.869.806a3.72 3.72 0 0 1 1.005.022c.276.053.434.143.523.237.138.146.38.635-.25 2.09-.893 1.63-1.553 1.722-1.847 1.677-.213-.033-.468-.158-.756-.406a4.95 4.95 0 0 1-.8-.927c-.39-.564-1.04-.84-1.66-.846-.625-.006-1.316.27-1.693.921l-.478.826-.911 1.506Z", ["M9.093 11.552c.046-.079.144-.15.32-.148a.53.53 0 0 1 .43.207c.285.414.636.847 1.046 1.2.405.35.914.662 1.516.754 1.334.205 2.502-.698 3.48-2.495l.014-.028.013-.03c.687-1.574.774-2.852-.005-3.675-.37-.391-.861-.586-1.333-.676a5.243 5.243 0 0 0-1.447-.044c-.173.016-.393-.073-.54-.257-.145-.18-.127-.316-.082-.392l.393-.672L14.287 3h5.71c1.536 0 2.499 1.659 1.737 2.992l-7.997 13.996c-.768 1.344-2.706 1.344-3.473 0l-3.037-5.314 1.377-2.278.004-.006.004-.007.481-.831Z", 0.6]]
|
|
/* eslint-enable max-len */
|
|
}
|
|
}, options);
|
|
}
|
|
var useIcon = (props) => {
|
|
const icons = inject(IconSymbol);
|
|
if (!icons) throw new Error("Missing Vuetify Icons provide!");
|
|
const iconData = computed(() => {
|
|
var _a;
|
|
const iconAlias = toValue(props);
|
|
if (!iconAlias) return {
|
|
component: VComponentIcon
|
|
};
|
|
let icon = iconAlias;
|
|
if (typeof icon === "string") {
|
|
icon = icon.trim();
|
|
if (icon.startsWith("$")) {
|
|
icon = (_a = icons.aliases) == null ? void 0 : _a[icon.slice(1)];
|
|
}
|
|
}
|
|
if (!icon) consoleWarn(`Could not find aliased icon "${iconAlias}"`);
|
|
if (Array.isArray(icon)) {
|
|
return {
|
|
component: VSvgIcon,
|
|
icon
|
|
};
|
|
} else if (typeof icon !== "string") {
|
|
return {
|
|
component: VComponentIcon,
|
|
icon
|
|
};
|
|
}
|
|
const iconSetName = Object.keys(icons.sets).find((setName) => typeof icon === "string" && icon.startsWith(`${setName}:`));
|
|
const iconName = iconSetName ? icon.slice(iconSetName.length + 1) : icon;
|
|
const iconSet = icons.sets[iconSetName ?? icons.defaultSet];
|
|
return {
|
|
component: iconSet.component,
|
|
icon: iconName
|
|
};
|
|
});
|
|
return {
|
|
iconData
|
|
};
|
|
};
|
|
|
|
export {
|
|
IconValue,
|
|
IconSymbol,
|
|
VComponentIcon,
|
|
VSvgIcon,
|
|
VLigatureIcon,
|
|
VClassIcon,
|
|
createIcons,
|
|
useIcon
|
|
};
|
|
//# sourceMappingURL=chunk-2NYYH3MH.js.map
|