432 lines
12 KiB
JavaScript
432 lines
12 KiB
JavaScript
|
import {
|
||
|
makePositionProps,
|
||
|
usePosition
|
||
|
} from "./chunk-XJDRWBAV.js";
|
||
|
import {
|
||
|
VProgressCircular
|
||
|
} from "./chunk-YRMIN6NY.js";
|
||
|
import {
|
||
|
makeGroupItemProps,
|
||
|
makeGroupProps,
|
||
|
useGroup,
|
||
|
useGroupItem
|
||
|
} from "./chunk-37564NA2.js";
|
||
|
import {
|
||
|
genOverlays,
|
||
|
makeVariantProps,
|
||
|
useVariant
|
||
|
} from "./chunk-XQKRKMJT.js";
|
||
|
import {
|
||
|
Ripple
|
||
|
} from "./chunk-NMCVREUK.js";
|
||
|
import {
|
||
|
makeBorderProps,
|
||
|
useBorder
|
||
|
} from "./chunk-O7K6SSRF.js";
|
||
|
import {
|
||
|
makeElevationProps,
|
||
|
useElevation
|
||
|
} from "./chunk-QXA6VMYU.js";
|
||
|
import {
|
||
|
makeDimensionProps,
|
||
|
useDimension
|
||
|
} from "./chunk-O7EUYO3B.js";
|
||
|
import {
|
||
|
VDefaultsProvider
|
||
|
} from "./chunk-D42AK3WB.js";
|
||
|
import {
|
||
|
makeRouterProps,
|
||
|
useLink
|
||
|
} from "./chunk-PCNFKUUR.js";
|
||
|
import {
|
||
|
makeLoaderProps,
|
||
|
makeLocationProps,
|
||
|
useLoader,
|
||
|
useLocation
|
||
|
} from "./chunk-44S2JOLY.js";
|
||
|
import {
|
||
|
makeDensityProps,
|
||
|
useDensity
|
||
|
} from "./chunk-VQPKT5F7.js";
|
||
|
import {
|
||
|
makeRoundedProps,
|
||
|
useRounded
|
||
|
} from "./chunk-24LK52JF.js";
|
||
|
import {
|
||
|
VIcon,
|
||
|
makeSizeProps,
|
||
|
useSize
|
||
|
} from "./chunk-IFUDBK56.js";
|
||
|
import {
|
||
|
IconValue
|
||
|
} from "./chunk-472DNWSX.js";
|
||
|
import {
|
||
|
makeTagProps
|
||
|
} from "./chunk-DJRL4NAD.js";
|
||
|
import {
|
||
|
makeThemeProps,
|
||
|
provideTheme
|
||
|
} from "./chunk-CYOEVGGH.js";
|
||
|
import {
|
||
|
genericComponent,
|
||
|
makeComponentProps,
|
||
|
propsFactory,
|
||
|
provideDefaults,
|
||
|
useRender
|
||
|
} from "./chunk-I4KGD5X4.js";
|
||
|
import {
|
||
|
computed,
|
||
|
createVNode,
|
||
|
mergeProps,
|
||
|
nextTick,
|
||
|
resolveDirective,
|
||
|
toRef,
|
||
|
watch,
|
||
|
withDirectives
|
||
|
} from "./chunk-PD2AWGJV.js";
|
||
|
|
||
|
// node_modules/vuetify/lib/components/VBtn/VBtn.mjs
|
||
|
import "C:/Users/Jeremy/Documents/Dev/Projects.cloudsucks.net/Vulture/VApp/node_modules/vuetify/lib/components/VBtn/VBtn.css";
|
||
|
|
||
|
// node_modules/vuetify/lib/components/VBtnToggle/VBtnToggle.mjs
|
||
|
import "C:/Users/Jeremy/Documents/Dev/Projects.cloudsucks.net/Vulture/VApp/node_modules/vuetify/lib/components/VBtnToggle/VBtnToggle.css";
|
||
|
|
||
|
// node_modules/vuetify/lib/components/VBtnGroup/VBtnGroup.mjs
|
||
|
import "C:/Users/Jeremy/Documents/Dev/Projects.cloudsucks.net/Vulture/VApp/node_modules/vuetify/lib/components/VBtnGroup/VBtnGroup.css";
|
||
|
var makeVBtnGroupProps = propsFactory({
|
||
|
divided: Boolean,
|
||
|
...makeBorderProps(),
|
||
|
...makeComponentProps(),
|
||
|
...makeDensityProps(),
|
||
|
...makeElevationProps(),
|
||
|
...makeRoundedProps(),
|
||
|
...makeTagProps(),
|
||
|
...makeThemeProps(),
|
||
|
...makeVariantProps()
|
||
|
}, "VBtnGroup");
|
||
|
var VBtnGroup = genericComponent()({
|
||
|
name: "VBtnGroup",
|
||
|
props: makeVBtnGroupProps(),
|
||
|
setup(props, _ref) {
|
||
|
let {
|
||
|
slots
|
||
|
} = _ref;
|
||
|
const {
|
||
|
themeClasses
|
||
|
} = provideTheme(props);
|
||
|
const {
|
||
|
densityClasses
|
||
|
} = useDensity(props);
|
||
|
const {
|
||
|
borderClasses
|
||
|
} = useBorder(props);
|
||
|
const {
|
||
|
elevationClasses
|
||
|
} = useElevation(props);
|
||
|
const {
|
||
|
roundedClasses
|
||
|
} = useRounded(props);
|
||
|
provideDefaults({
|
||
|
VBtn: {
|
||
|
height: "auto",
|
||
|
color: toRef(props, "color"),
|
||
|
density: toRef(props, "density"),
|
||
|
flat: true,
|
||
|
variant: toRef(props, "variant")
|
||
|
}
|
||
|
});
|
||
|
useRender(() => {
|
||
|
return createVNode(props.tag, {
|
||
|
"class": ["v-btn-group", {
|
||
|
"v-btn-group--divided": props.divided
|
||
|
}, themeClasses.value, borderClasses.value, densityClasses.value, elevationClasses.value, roundedClasses.value, props.class],
|
||
|
"style": props.style
|
||
|
}, slots);
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/vuetify/lib/components/VBtnToggle/VBtnToggle.mjs
|
||
|
var VBtnToggleSymbol = Symbol.for("vuetify:v-btn-toggle");
|
||
|
var makeVBtnToggleProps = propsFactory({
|
||
|
...makeVBtnGroupProps(),
|
||
|
...makeGroupProps()
|
||
|
}, "VBtnToggle");
|
||
|
var VBtnToggle = genericComponent()({
|
||
|
name: "VBtnToggle",
|
||
|
props: makeVBtnToggleProps(),
|
||
|
emits: {
|
||
|
"update:modelValue": (value) => true
|
||
|
},
|
||
|
setup(props, _ref) {
|
||
|
let {
|
||
|
slots
|
||
|
} = _ref;
|
||
|
const {
|
||
|
isSelected,
|
||
|
next,
|
||
|
prev,
|
||
|
select,
|
||
|
selected
|
||
|
} = useGroup(props, VBtnToggleSymbol);
|
||
|
useRender(() => {
|
||
|
const btnGroupProps = VBtnGroup.filterProps(props);
|
||
|
return createVNode(VBtnGroup, mergeProps({
|
||
|
"class": ["v-btn-toggle", props.class]
|
||
|
}, btnGroupProps, {
|
||
|
"style": props.style
|
||
|
}), {
|
||
|
default: () => {
|
||
|
var _a;
|
||
|
return [(_a = slots.default) == null ? void 0 : _a.call(slots, {
|
||
|
isSelected,
|
||
|
next,
|
||
|
prev,
|
||
|
select,
|
||
|
selected
|
||
|
})];
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
return {
|
||
|
next,
|
||
|
prev,
|
||
|
select
|
||
|
};
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// node_modules/vuetify/lib/composables/selectLink.mjs
|
||
|
function useSelectLink(link, select) {
|
||
|
watch(() => {
|
||
|
var _a;
|
||
|
return (_a = link.isActive) == null ? void 0 : _a.value;
|
||
|
}, (isActive) => {
|
||
|
if (link.isLink.value && isActive && select) {
|
||
|
nextTick(() => {
|
||
|
select(true);
|
||
|
});
|
||
|
}
|
||
|
}, {
|
||
|
immediate: true
|
||
|
});
|
||
|
}
|
||
|
|
||
|
// node_modules/vuetify/lib/components/VBtn/VBtn.mjs
|
||
|
var makeVBtnProps = propsFactory({
|
||
|
active: {
|
||
|
type: Boolean,
|
||
|
default: void 0
|
||
|
},
|
||
|
symbol: {
|
||
|
type: null,
|
||
|
default: VBtnToggleSymbol
|
||
|
},
|
||
|
flat: Boolean,
|
||
|
icon: [Boolean, String, Function, Object],
|
||
|
prependIcon: IconValue,
|
||
|
appendIcon: IconValue,
|
||
|
block: Boolean,
|
||
|
slim: Boolean,
|
||
|
stacked: Boolean,
|
||
|
ripple: {
|
||
|
type: [Boolean, Object],
|
||
|
default: true
|
||
|
},
|
||
|
text: String,
|
||
|
...makeBorderProps(),
|
||
|
...makeComponentProps(),
|
||
|
...makeDensityProps(),
|
||
|
...makeDimensionProps(),
|
||
|
...makeElevationProps(),
|
||
|
...makeGroupItemProps(),
|
||
|
...makeLoaderProps(),
|
||
|
...makeLocationProps(),
|
||
|
...makePositionProps(),
|
||
|
...makeRoundedProps(),
|
||
|
...makeRouterProps(),
|
||
|
...makeSizeProps(),
|
||
|
...makeTagProps({
|
||
|
tag: "button"
|
||
|
}),
|
||
|
...makeThemeProps(),
|
||
|
...makeVariantProps({
|
||
|
variant: "elevated"
|
||
|
})
|
||
|
}, "VBtn");
|
||
|
var VBtn = genericComponent()({
|
||
|
name: "VBtn",
|
||
|
directives: {
|
||
|
Ripple
|
||
|
},
|
||
|
props: makeVBtnProps(),
|
||
|
emits: {
|
||
|
"group:selected": (val) => true
|
||
|
},
|
||
|
setup(props, _ref) {
|
||
|
let {
|
||
|
attrs,
|
||
|
slots
|
||
|
} = _ref;
|
||
|
const {
|
||
|
themeClasses
|
||
|
} = provideTheme(props);
|
||
|
const {
|
||
|
borderClasses
|
||
|
} = useBorder(props);
|
||
|
const {
|
||
|
colorClasses,
|
||
|
colorStyles,
|
||
|
variantClasses
|
||
|
} = useVariant(props);
|
||
|
const {
|
||
|
densityClasses
|
||
|
} = useDensity(props);
|
||
|
const {
|
||
|
dimensionStyles
|
||
|
} = useDimension(props);
|
||
|
const {
|
||
|
elevationClasses
|
||
|
} = useElevation(props);
|
||
|
const {
|
||
|
loaderClasses
|
||
|
} = useLoader(props);
|
||
|
const {
|
||
|
locationStyles
|
||
|
} = useLocation(props);
|
||
|
const {
|
||
|
positionClasses
|
||
|
} = usePosition(props);
|
||
|
const {
|
||
|
roundedClasses
|
||
|
} = useRounded(props);
|
||
|
const {
|
||
|
sizeClasses,
|
||
|
sizeStyles
|
||
|
} = useSize(props);
|
||
|
const group = useGroupItem(props, props.symbol, false);
|
||
|
const link = useLink(props, attrs);
|
||
|
const isActive = computed(() => {
|
||
|
var _a;
|
||
|
if (props.active !== void 0) {
|
||
|
return props.active;
|
||
|
}
|
||
|
if (link.isLink.value) {
|
||
|
return (_a = link.isActive) == null ? void 0 : _a.value;
|
||
|
}
|
||
|
return group == null ? void 0 : group.isSelected.value;
|
||
|
});
|
||
|
const isDisabled = computed(() => (group == null ? void 0 : group.disabled.value) || props.disabled);
|
||
|
const isElevated = computed(() => {
|
||
|
return props.variant === "elevated" && !(props.disabled || props.flat || props.border);
|
||
|
});
|
||
|
const valueAttr = computed(() => {
|
||
|
if (props.value === void 0 || typeof props.value === "symbol") return void 0;
|
||
|
return Object(props.value) === props.value ? JSON.stringify(props.value, null, 0) : props.value;
|
||
|
});
|
||
|
function onClick(e) {
|
||
|
var _a;
|
||
|
if (isDisabled.value || link.isLink.value && (e.metaKey || e.ctrlKey || e.shiftKey || e.button !== 0 || attrs.target === "_blank")) return;
|
||
|
(_a = link.navigate) == null ? void 0 : _a.call(link, e);
|
||
|
group == null ? void 0 : group.toggle();
|
||
|
}
|
||
|
useSelectLink(link, group == null ? void 0 : group.select);
|
||
|
useRender(() => {
|
||
|
var _a, _b;
|
||
|
const Tag = link.isLink.value ? "a" : props.tag;
|
||
|
const hasPrepend = !!(props.prependIcon || slots.prepend);
|
||
|
const hasAppend = !!(props.appendIcon || slots.append);
|
||
|
const hasIcon = !!(props.icon && props.icon !== true);
|
||
|
const hasColor = (group == null ? void 0 : group.isSelected.value) && (!link.isLink.value || ((_a = link.isActive) == null ? void 0 : _a.value)) || !group || ((_b = link.isActive) == null ? void 0 : _b.value);
|
||
|
return withDirectives(createVNode(Tag, {
|
||
|
"type": Tag === "a" ? void 0 : "button",
|
||
|
"class": ["v-btn", group == null ? void 0 : group.selectedClass.value, {
|
||
|
"v-btn--active": isActive.value,
|
||
|
"v-btn--block": props.block,
|
||
|
"v-btn--disabled": isDisabled.value,
|
||
|
"v-btn--elevated": isElevated.value,
|
||
|
"v-btn--flat": props.flat,
|
||
|
"v-btn--icon": !!props.icon,
|
||
|
"v-btn--loading": props.loading,
|
||
|
"v-btn--slim": props.slim,
|
||
|
"v-btn--stacked": props.stacked
|
||
|
}, themeClasses.value, borderClasses.value, hasColor ? colorClasses.value : void 0, densityClasses.value, elevationClasses.value, loaderClasses.value, positionClasses.value, roundedClasses.value, sizeClasses.value, variantClasses.value, props.class],
|
||
|
"style": [hasColor ? colorStyles.value : void 0, dimensionStyles.value, locationStyles.value, sizeStyles.value, props.style],
|
||
|
"disabled": isDisabled.value || void 0,
|
||
|
"href": link.href.value,
|
||
|
"onClick": onClick,
|
||
|
"value": valueAttr.value
|
||
|
}, {
|
||
|
default: () => {
|
||
|
var _a2;
|
||
|
return [genOverlays(true, "v-btn"), !props.icon && hasPrepend && createVNode("span", {
|
||
|
"key": "prepend",
|
||
|
"class": "v-btn__prepend"
|
||
|
}, [!slots.prepend ? createVNode(VIcon, {
|
||
|
"key": "prepend-icon",
|
||
|
"icon": props.prependIcon
|
||
|
}, null) : createVNode(VDefaultsProvider, {
|
||
|
"key": "prepend-defaults",
|
||
|
"disabled": !props.prependIcon,
|
||
|
"defaults": {
|
||
|
VIcon: {
|
||
|
icon: props.prependIcon
|
||
|
}
|
||
|
}
|
||
|
}, slots.prepend)]), createVNode("span", {
|
||
|
"class": "v-btn__content",
|
||
|
"data-no-activator": ""
|
||
|
}, [!slots.default && hasIcon ? createVNode(VIcon, {
|
||
|
"key": "content-icon",
|
||
|
"icon": props.icon
|
||
|
}, null) : createVNode(VDefaultsProvider, {
|
||
|
"key": "content-defaults",
|
||
|
"disabled": !hasIcon,
|
||
|
"defaults": {
|
||
|
VIcon: {
|
||
|
icon: props.icon
|
||
|
}
|
||
|
}
|
||
|
}, {
|
||
|
default: () => {
|
||
|
var _a3;
|
||
|
return [((_a3 = slots.default) == null ? void 0 : _a3.call(slots)) ?? props.text];
|
||
|
}
|
||
|
})]), !props.icon && hasAppend && createVNode("span", {
|
||
|
"key": "append",
|
||
|
"class": "v-btn__append"
|
||
|
}, [!slots.append ? createVNode(VIcon, {
|
||
|
"key": "append-icon",
|
||
|
"icon": props.appendIcon
|
||
|
}, null) : createVNode(VDefaultsProvider, {
|
||
|
"key": "append-defaults",
|
||
|
"disabled": !props.appendIcon,
|
||
|
"defaults": {
|
||
|
VIcon: {
|
||
|
icon: props.appendIcon
|
||
|
}
|
||
|
}
|
||
|
}, slots.append)]), !!props.loading && createVNode("span", {
|
||
|
"key": "loader",
|
||
|
"class": "v-btn__loader"
|
||
|
}, [((_a2 = slots.loader) == null ? void 0 : _a2.call(slots)) ?? createVNode(VProgressCircular, {
|
||
|
"color": typeof props.loading === "boolean" ? void 0 : props.loading,
|
||
|
"indeterminate": true,
|
||
|
"size": "23",
|
||
|
"width": "2"
|
||
|
}, null)])];
|
||
|
}
|
||
|
}), [[resolveDirective("ripple"), !isDisabled.value && props.ripple, null]]);
|
||
|
});
|
||
|
return {
|
||
|
group
|
||
|
};
|
||
|
}
|
||
|
});
|
||
|
|
||
|
export {
|
||
|
makeVBtnProps,
|
||
|
VBtn
|
||
|
};
|
||
|
//# sourceMappingURL=chunk-XCL3R7PH.js.map
|