351 lines
11 KiB
JavaScript
351 lines
11 KiB
JavaScript
import {
|
|
VExpandTransition
|
|
} from "./chunk-B4JFJDWM.js";
|
|
import {
|
|
makeLazyProps,
|
|
useLazy
|
|
} from "./chunk-YGX2Z63P.js";
|
|
import {
|
|
makeGroupItemProps,
|
|
makeGroupProps,
|
|
useGroup,
|
|
useGroupItem
|
|
} from "./chunk-W6DJL42A.js";
|
|
import {
|
|
makeElevationProps,
|
|
useElevation
|
|
} from "./chunk-YJD2PNP6.js";
|
|
import {
|
|
VIcon
|
|
} from "./chunk-4XZHKYGH.js";
|
|
import {
|
|
makeRoundedProps,
|
|
useRounded
|
|
} from "./chunk-AQK3CYVW.js";
|
|
import {
|
|
VDefaultsProvider
|
|
} from "./chunk-PAT7NP2Z.js";
|
|
import {
|
|
makeTagProps
|
|
} from "./chunk-2HZIACSB.js";
|
|
import {
|
|
IconValue
|
|
} from "./chunk-OJDZBU5D.js";
|
|
import {
|
|
ripple_default
|
|
} from "./chunk-DS4J67XG.js";
|
|
import {
|
|
useBackgroundColor
|
|
} from "./chunk-BHV5Z34M.js";
|
|
import {
|
|
makeDimensionProps,
|
|
useDimension
|
|
} from "./chunk-6EZKHCRW.js";
|
|
import {
|
|
makeThemeProps,
|
|
provideTheme
|
|
} from "./chunk-3DSR7NCB.js";
|
|
import {
|
|
genericComponent,
|
|
makeComponentProps,
|
|
pick,
|
|
propsFactory,
|
|
provideDefaults,
|
|
useRender
|
|
} from "./chunk-LZ5T2ERG.js";
|
|
import {
|
|
computed,
|
|
createBaseVNode,
|
|
createVNode,
|
|
inject,
|
|
normalizeClass,
|
|
normalizeStyle,
|
|
provide,
|
|
toRef,
|
|
vShow,
|
|
withDirectives
|
|
} from "./chunk-2MKFL3BX.js";
|
|
|
|
// node_modules/vuetify/lib/components/VExpansionPanel/VExpansionPanels.js
|
|
import "/home/david/gitea_repo/personal_development/ServerManagerWebApp/frontend/node_modules/vuetify/lib/components/VExpansionPanel/VExpansionPanel.css";
|
|
|
|
// node_modules/vuetify/lib/components/VExpansionPanel/shared.js
|
|
var VExpansionPanelSymbol = /* @__PURE__ */ Symbol.for("vuetify:v-expansion-panel");
|
|
|
|
// node_modules/vuetify/lib/components/VExpansionPanel/VExpansionPanelText.js
|
|
var makeVExpansionPanelTextProps = propsFactory({
|
|
...makeComponentProps(),
|
|
...makeLazyProps()
|
|
}, "VExpansionPanelText");
|
|
var VExpansionPanelText = genericComponent()({
|
|
name: "VExpansionPanelText",
|
|
props: makeVExpansionPanelTextProps(),
|
|
setup(props, _ref) {
|
|
let {
|
|
slots
|
|
} = _ref;
|
|
const expansionPanel = inject(VExpansionPanelSymbol);
|
|
if (!expansionPanel) throw new Error("[Vuetify] v-expansion-panel-text needs to be placed inside v-expansion-panel");
|
|
const {
|
|
hasContent,
|
|
onAfterLeave
|
|
} = useLazy(props, expansionPanel.isSelected);
|
|
useRender(() => createVNode(VExpandTransition, {
|
|
"onAfterLeave": onAfterLeave
|
|
}, {
|
|
default: () => [withDirectives(createBaseVNode("div", {
|
|
"class": normalizeClass(["v-expansion-panel-text", props.class]),
|
|
"style": normalizeStyle(props.style)
|
|
}, [slots.default && hasContent.value && createBaseVNode("div", {
|
|
"class": "v-expansion-panel-text__wrapper"
|
|
}, [slots.default?.()])]), [[vShow, expansionPanel.isSelected.value]])]
|
|
}));
|
|
return {};
|
|
}
|
|
});
|
|
|
|
// node_modules/vuetify/lib/components/VExpansionPanel/VExpansionPanelTitle.js
|
|
var makeVExpansionPanelTitleProps = propsFactory({
|
|
color: String,
|
|
expandIcon: {
|
|
type: IconValue,
|
|
default: "$expand"
|
|
},
|
|
collapseIcon: {
|
|
type: IconValue,
|
|
default: "$collapse"
|
|
},
|
|
hideActions: Boolean,
|
|
focusable: Boolean,
|
|
static: Boolean,
|
|
ripple: {
|
|
type: [Boolean, Object],
|
|
default: false
|
|
},
|
|
readonly: Boolean,
|
|
...makeComponentProps(),
|
|
...makeDimensionProps()
|
|
}, "VExpansionPanelTitle");
|
|
var VExpansionPanelTitle = genericComponent()({
|
|
name: "VExpansionPanelTitle",
|
|
directives: {
|
|
vRipple: ripple_default
|
|
},
|
|
props: makeVExpansionPanelTitleProps(),
|
|
setup(props, _ref) {
|
|
let {
|
|
slots
|
|
} = _ref;
|
|
const expansionPanel = inject(VExpansionPanelSymbol);
|
|
if (!expansionPanel) throw new Error("[Vuetify] v-expansion-panel-title needs to be placed inside v-expansion-panel");
|
|
const {
|
|
backgroundColorClasses,
|
|
backgroundColorStyles
|
|
} = useBackgroundColor(() => props.color);
|
|
const {
|
|
dimensionStyles
|
|
} = useDimension(props);
|
|
const slotProps = computed(() => ({
|
|
collapseIcon: props.collapseIcon,
|
|
disabled: expansionPanel.disabled.value,
|
|
expanded: expansionPanel.isSelected.value,
|
|
expandIcon: props.expandIcon,
|
|
readonly: props.readonly
|
|
}));
|
|
const icon = toRef(() => expansionPanel.isSelected.value ? props.collapseIcon : props.expandIcon);
|
|
useRender(() => withDirectives(createBaseVNode("button", {
|
|
"class": normalizeClass(["v-expansion-panel-title", {
|
|
"v-expansion-panel-title--active": expansionPanel.isSelected.value,
|
|
"v-expansion-panel-title--focusable": props.focusable,
|
|
"v-expansion-panel-title--static": props.static
|
|
}, backgroundColorClasses.value, props.class]),
|
|
"style": normalizeStyle([backgroundColorStyles.value, dimensionStyles.value, props.style]),
|
|
"type": "button",
|
|
"tabindex": expansionPanel.disabled.value ? -1 : void 0,
|
|
"disabled": expansionPanel.disabled.value,
|
|
"aria-expanded": expansionPanel.isSelected.value,
|
|
"onClick": !props.readonly ? expansionPanel.toggle : void 0
|
|
}, [createBaseVNode("span", {
|
|
"class": "v-expansion-panel-title__overlay"
|
|
}, null), slots.default?.(slotProps.value), !props.hideActions && createVNode(VDefaultsProvider, {
|
|
"defaults": {
|
|
VIcon: {
|
|
icon: icon.value
|
|
}
|
|
}
|
|
}, {
|
|
default: () => [createBaseVNode("span", {
|
|
"class": "v-expansion-panel-title__icon"
|
|
}, [slots.actions?.(slotProps.value) ?? createVNode(VIcon, null, null)])]
|
|
})]), [[ripple_default, props.ripple]]));
|
|
return {};
|
|
}
|
|
});
|
|
|
|
// node_modules/vuetify/lib/components/VExpansionPanel/VExpansionPanel.js
|
|
var makeVExpansionPanelProps = propsFactory({
|
|
title: String,
|
|
text: String,
|
|
bgColor: String,
|
|
...makeElevationProps(),
|
|
...makeGroupItemProps(),
|
|
...makeRoundedProps(),
|
|
...makeTagProps(),
|
|
...makeVExpansionPanelTitleProps(),
|
|
...makeVExpansionPanelTextProps()
|
|
}, "VExpansionPanel");
|
|
var VExpansionPanel = genericComponent()({
|
|
name: "VExpansionPanel",
|
|
props: makeVExpansionPanelProps(),
|
|
emits: {
|
|
"group:selected": (val) => true
|
|
},
|
|
setup(props, _ref) {
|
|
let {
|
|
slots
|
|
} = _ref;
|
|
const groupItem = useGroupItem(props, VExpansionPanelSymbol);
|
|
const {
|
|
backgroundColorClasses,
|
|
backgroundColorStyles
|
|
} = useBackgroundColor(() => props.bgColor);
|
|
const {
|
|
elevationClasses
|
|
} = useElevation(props);
|
|
const {
|
|
roundedClasses
|
|
} = useRounded(props);
|
|
const isDisabled = toRef(() => groupItem?.disabled.value || props.disabled);
|
|
const selectedIndices = computed(() => groupItem.group.items.value.reduce((arr, item, index) => {
|
|
if (groupItem.group.selected.value.includes(item.id)) arr.push(index);
|
|
return arr;
|
|
}, []));
|
|
const isBeforeSelected = computed(() => {
|
|
const index = groupItem.group.items.value.findIndex((item) => item.id === groupItem.id);
|
|
return !groupItem.isSelected.value && selectedIndices.value.some((selectedIndex) => selectedIndex - index === 1);
|
|
});
|
|
const isAfterSelected = computed(() => {
|
|
const index = groupItem.group.items.value.findIndex((item) => item.id === groupItem.id);
|
|
return !groupItem.isSelected.value && selectedIndices.value.some((selectedIndex) => selectedIndex - index === -1);
|
|
});
|
|
provide(VExpansionPanelSymbol, groupItem);
|
|
useRender(() => {
|
|
const hasText = !!(slots.text || props.text);
|
|
const hasTitle = !!(slots.title || props.title);
|
|
const expansionPanelTitleProps = VExpansionPanelTitle.filterProps(props);
|
|
const expansionPanelTextProps = VExpansionPanelText.filterProps(props);
|
|
return createVNode(props.tag, {
|
|
"class": normalizeClass(["v-expansion-panel", {
|
|
"v-expansion-panel--active": groupItem.isSelected.value,
|
|
"v-expansion-panel--before-active": isBeforeSelected.value,
|
|
"v-expansion-panel--after-active": isAfterSelected.value,
|
|
"v-expansion-panel--disabled": isDisabled.value
|
|
}, roundedClasses.value, backgroundColorClasses.value, props.class]),
|
|
"style": normalizeStyle([backgroundColorStyles.value, props.style])
|
|
}, {
|
|
default: () => [createBaseVNode("div", {
|
|
"class": normalizeClass(["v-expansion-panel__shadow", ...elevationClasses.value])
|
|
}, null), createVNode(VDefaultsProvider, {
|
|
"defaults": {
|
|
VExpansionPanelTitle: {
|
|
...expansionPanelTitleProps
|
|
},
|
|
VExpansionPanelText: {
|
|
...expansionPanelTextProps
|
|
}
|
|
}
|
|
}, {
|
|
default: () => [hasTitle && createVNode(VExpansionPanelTitle, {
|
|
"key": "title"
|
|
}, {
|
|
default: () => [slots.title ? slots.title() : props.title]
|
|
}), hasText && createVNode(VExpansionPanelText, {
|
|
"key": "text"
|
|
}, {
|
|
default: () => [slots.text ? slots.text() : props.text]
|
|
}), slots.default?.()]
|
|
})]
|
|
});
|
|
});
|
|
return {
|
|
groupItem
|
|
};
|
|
}
|
|
});
|
|
|
|
// node_modules/vuetify/lib/components/VExpansionPanel/VExpansionPanels.js
|
|
var allowedVariants = ["default", "accordion", "inset", "popout"];
|
|
var makeVExpansionPanelsProps = propsFactory({
|
|
flat: Boolean,
|
|
...makeGroupProps(),
|
|
...pick(makeVExpansionPanelProps(), ["bgColor", "collapseIcon", "color", "eager", "elevation", "expandIcon", "focusable", "hideActions", "readonly", "ripple", "rounded", "tile", "static"]),
|
|
...makeThemeProps(),
|
|
...makeComponentProps(),
|
|
...makeTagProps(),
|
|
variant: {
|
|
type: String,
|
|
default: "default",
|
|
validator: (v) => allowedVariants.includes(v)
|
|
}
|
|
}, "VExpansionPanels");
|
|
var VExpansionPanels = genericComponent()({
|
|
name: "VExpansionPanels",
|
|
props: makeVExpansionPanelsProps(),
|
|
emits: {
|
|
"update:modelValue": (val) => true
|
|
},
|
|
setup(props, _ref) {
|
|
let {
|
|
slots
|
|
} = _ref;
|
|
const {
|
|
next,
|
|
prev
|
|
} = useGroup(props, VExpansionPanelSymbol);
|
|
const {
|
|
themeClasses
|
|
} = provideTheme(props);
|
|
const variantClass = toRef(() => props.variant && `v-expansion-panels--variant-${props.variant}`);
|
|
provideDefaults({
|
|
VExpansionPanel: {
|
|
bgColor: toRef(() => props.bgColor),
|
|
collapseIcon: toRef(() => props.collapseIcon),
|
|
color: toRef(() => props.color),
|
|
eager: toRef(() => props.eager),
|
|
elevation: toRef(() => props.elevation),
|
|
expandIcon: toRef(() => props.expandIcon),
|
|
focusable: toRef(() => props.focusable),
|
|
hideActions: toRef(() => props.hideActions),
|
|
readonly: toRef(() => props.readonly),
|
|
ripple: toRef(() => props.ripple),
|
|
rounded: toRef(() => props.rounded),
|
|
static: toRef(() => props.static)
|
|
}
|
|
});
|
|
useRender(() => createVNode(props.tag, {
|
|
"class": normalizeClass(["v-expansion-panels", {
|
|
"v-expansion-panels--flat": props.flat,
|
|
"v-expansion-panels--tile": props.tile
|
|
}, themeClasses.value, variantClass.value, props.class]),
|
|
"style": normalizeStyle(props.style)
|
|
}, {
|
|
default: () => [slots.default?.({
|
|
prev,
|
|
next
|
|
})]
|
|
}));
|
|
return {
|
|
next,
|
|
prev
|
|
};
|
|
}
|
|
});
|
|
|
|
export {
|
|
VExpansionPanelText,
|
|
VExpansionPanelTitle,
|
|
VExpansionPanel,
|
|
VExpansionPanels
|
|
};
|
|
//# sourceMappingURL=chunk-SCY7DFFY.js.map
|