259 lines
10 KiB
JavaScript
259 lines
10 KiB
JavaScript
import { C as vShow, Cn as withDirectives, Qn as toRef, U as computed, Ut as provide, W as createBaseVNode, ar as normalizeClass, et as createVNode, sr as normalizeStyle, xt as inject } from "./vue.runtime.esm-bundler-BvoXUmaf.js";
|
|
import { K as pick, a as provideDefaults, l as propsFactory, n as genericComponent } from "./defineComponent-DB6xIcDy.js";
|
|
import { t as VExpandTransition } from "./transitions-DCQ3sjjZ.js";
|
|
import { t as makeComponentProps } from "./component-DdiwBe6i.js";
|
|
import { t as useRender } from "./useRender-fVtVsZgv.js";
|
|
import { t as useBackgroundColor } from "./color-B6vuQruj.js";
|
|
import { i as provideTheme, r as makeThemeProps } from "./theme-Cx5kFg0-.js";
|
|
import { n as IconValue } from "./icons-k2ZLE_i8.js";
|
|
import { t as makeTagProps } from "./tag-C_KkCPzB.js";
|
|
import { t as VDefaultsProvider } from "./VDefaultsProvider-C09t4-My.js";
|
|
import { n as useDimension, t as makeDimensionProps } from "./dimensions-BDdmuRdK.js";
|
|
import { n as useRounded, t as makeRoundedProps } from "./rounded-BuPGKRa9.js";
|
|
import { n as useElevation, t as makeElevationProps } from "./elevation-B0TH2wU6.js";
|
|
import { i as useGroupItem, n as makeGroupProps, r as useGroup, t as makeGroupItemProps } from "./group-Cm2viEWK.js";
|
|
import { t as VIcon } from "./VIcon-1CJH_3Uo.js";
|
|
import { t as Ripple } from "./ripple-Z40rPDte.js";
|
|
import { n as useLazy, t as makeLazyProps } from "./lazy-DhsobH97.js";
|
|
import "/Users/thackmaster/Development/routie2/frontend/node_modules/vuetify/lib/components/VExpansionPanel/VExpansionPanel.css";
|
|
//#region node_modules/vuetify/lib/components/VExpansionPanel/shared.js
|
|
var VExpansionPanelSymbol = Symbol.for("vuetify:v-expansion-panel");
|
|
//#endregion
|
|
//#region node_modules/vuetify/lib/components/VExpansionPanel/VExpansionPanelText.js
|
|
var makeVExpansionPanelTextProps = propsFactory({
|
|
...makeComponentProps(),
|
|
...makeLazyProps()
|
|
}, "VExpansionPanelText");
|
|
var VExpansionPanelText = genericComponent()({
|
|
name: "VExpansionPanelText",
|
|
props: makeVExpansionPanelTextProps(),
|
|
setup(props, { slots }) {
|
|
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 {};
|
|
}
|
|
});
|
|
//#endregion
|
|
//#region 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 },
|
|
props: makeVExpansionPanelTitleProps(),
|
|
setup(props, { slots }) {
|
|
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, props.ripple]]));
|
|
return {};
|
|
}
|
|
});
|
|
//#endregion
|
|
//#region 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, { slots }) {
|
|
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 };
|
|
}
|
|
});
|
|
//#endregion
|
|
//#region 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",
|
|
"static"
|
|
]),
|
|
...makeRoundedProps(),
|
|
...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, { slots }) {
|
|
const { next, prev } = useGroup(props, VExpansionPanelSymbol);
|
|
const { themeClasses } = provideTheme(props);
|
|
const { roundedClasses } = useRounded(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),
|
|
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,
|
|
roundedClasses.value,
|
|
variantClass.value,
|
|
props.class
|
|
]),
|
|
"style": normalizeStyle(props.style)
|
|
}, { default: () => [slots.default?.({
|
|
prev,
|
|
next
|
|
})] }));
|
|
return {
|
|
next,
|
|
prev
|
|
};
|
|
}
|
|
});
|
|
//#endregion
|
|
export { VExpansionPanel, VExpansionPanelText, VExpansionPanelTitle, VExpansionPanels };
|
|
|
|
//# sourceMappingURL=vuetify_components_VExpansionPanel.js.map
|