bt-core-app 2.2.4 → 2.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/VAlert.sass.mjs +1 -0
- package/dist/_virtual/VAvatar.sass.mjs +1 -0
- package/dist/_virtual/VBtn.sass.mjs +1 -0
- package/dist/_virtual/VBtnGroup.sass.mjs +1 -0
- package/dist/_virtual/VBtnToggle.sass.mjs +1 -0
- package/dist/_virtual/VCard.sass.mjs +1 -0
- package/dist/_virtual/VDivider.sass.mjs +1 -0
- package/dist/_virtual/VIcon.sass.mjs +1 -0
- package/dist/_virtual/VImg.sass.mjs +1 -0
- package/dist/_virtual/VList.sass.mjs +1 -0
- package/dist/_virtual/VListItem.sass.mjs +1 -0
- package/dist/_virtual/VMenu.sass.mjs +1 -0
- package/dist/_virtual/VOverlay.sass.mjs +1 -0
- package/dist/_virtual/VProgressCircular.sass.mjs +1 -0
- package/dist/_virtual/VProgressLinear.sass.mjs +1 -0
- package/dist/_virtual/VResponsive.sass.mjs +1 -0
- package/dist/_virtual/VRipple.sass.mjs +1 -0
- package/dist/_virtual/VToolbar.sass.mjs +1 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VAlert/VAlert.mjs +196 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VAlert/VAlertTitle.mjs +5 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VAvatar/VAvatar.mjs +92 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VBtn/VBtn.mjs +220 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VBtnGroup/VBtnGroup.mjs +68 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VBtnToggle/VBtnToggle.mjs +57 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VCard/VCard.mjs +180 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VCard/VCardActions.mjs +32 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VCard/VCardItem.mjs +118 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VCard/VCardSubtitle.mjs +29 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VCard/VCardText.mjs +29 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VCard/VCardTitle.mjs +5 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VDefaultsProvider/VDefaultsProvider.mjs +39 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VDivider/VDivider.mjs +82 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VIcon/VIcon.mjs +77 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VImg/VImg.mjs +248 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VList/VList.mjs +281 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VList/VListChildren.mjs +104 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VList/VListGroup.mjs +129 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VList/VListItem.mjs +312 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VList/VListItemSubtitle.mjs +29 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VList/VListItemTitle.mjs +5 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VList/VListSubheader.mjs +50 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VList/list.mjs +38 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VMenu/VMenu.mjs +132 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VMenu/shared.mjs +4 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VOverlay/VOverlay.mjs +291 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VOverlay/locationStrategies.mjs +292 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VOverlay/requestNewFrame.mjs +15 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VOverlay/scrollStrategies.mjs +91 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VOverlay/useActivator.mjs +179 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VOverlay/util/point.mjs +42 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VProgressCircular/VProgressCircular.mjs +129 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VProgressLinear/VProgressLinear.mjs +195 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VProgressLinear/chunks.mjs +53 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VResponsive/VResponsive.mjs +56 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VToolbar/VToolbar.mjs +167 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/VToolbar/VToolbarTitle.mjs +37 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/transitions/createTransition.mjs +113 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/transitions/dialog-transition.mjs +136 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/transitions/expand-transition.mjs +52 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/components/transitions/index.mjs +21 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/border.mjs +19 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/color.mjs +69 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/component.mjs +11 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/defaults.mjs +70 -45
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/delay.mjs +34 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/density.mjs +20 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/dimensions.mjs +23 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/display.mjs +23 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/elevation.mjs +25 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/focusTrap.mjs +97 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/forwardRefs.mjs +78 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/group.mjs +169 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/hydration.mjs +20 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/iconSizes.mjs +21 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/icons.mjs +73 -40
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/intersectionObserver.mjs +24 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/lazy.mjs +21 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/list-items.mjs +33 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/loader.mjs +38 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/locale.mjs +22 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/location.mjs +49 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/nested/activeStrategies.mjs +102 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/nested/nested.mjs +315 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/nested/openStrategies.mjs +60 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/nested/selectStrategies.mjs +206 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/position.mjs +22 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/proxiedModel.mjs +35 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/resizeObserver.mjs +26 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/reveal.mjs +21 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/rounded.mjs +30 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/router.mjs +97 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/scopeId.mjs +12 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/selectLink.mjs +16 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/size.mjs +27 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/ssrBoot.mjs +17 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/stack.mjs +39 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/tag.mjs +10 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/teleport.mjs +21 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/theme.mjs +32 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/toggleScope.mjs +19 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/transition.mjs +34 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/composables/variant.mjs +53 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/directives/click-outside/index.mjs +62 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/directives/intersect/index.mjs +41 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/directives/ripple/index.mjs +183 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/anchor.mjs +53 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/animation.mjs +44 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/bindProps.mjs +36 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/box.mjs +73 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/color/APCA.mjs +19 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/colorUtils.mjs +141 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/console.mjs +12 -4
- package/dist/bt-core/core/node_modules/vuetify/lib/util/createSimpleFunctional.mjs +31 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/deepEqual.mjs +37 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/dom.mjs +14 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/easing.mjs +7 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/getCurrentInstance.mjs +13 -6
- package/dist/bt-core/core/node_modules/vuetify/lib/util/getScrollParent.mjs +34 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/globals.mjs +7 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/helpers.mjs +301 -28
- package/dist/bt-core/core/node_modules/vuetify/lib/util/isFixedPosition.mjs +11 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/throttle.mjs +25 -0
- package/dist/bt-core/core/node_modules/vuetify/lib/util/useRender.mjs +8 -0
- package/dist/components/BT-Blade.vue.mjs +108 -97
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { useId as D, toRef as x, ref as R, inject as M, shallowRef as I, provide as T, onBeforeUnmount as S, onDeactivated as L, watch as K, computed as O, mergeProps as w, createVNode as p } from "vue";
|
|
2
|
+
import "../../../../../../../_virtual/VMenu.sass.mjs";
|
|
3
|
+
import { makeVOverlayProps as U, VOverlay as A } from "../VOverlay/VOverlay.mjs";
|
|
4
|
+
import { forwardRefs as F } from "../../composables/forwardRefs.mjs";
|
|
5
|
+
import { useRtl as B } from "../../composables/locale.mjs";
|
|
6
|
+
import { useProxiedModel as H } from "../../composables/proxiedModel.mjs";
|
|
7
|
+
import { useScopeId as N } from "../../composables/scopeId.mjs";
|
|
8
|
+
import { VMenuSymbol as k } from "./shared.mjs";
|
|
9
|
+
import { VDialogTransition as j } from "../transitions/dialog-transition.mjs";
|
|
10
|
+
import { omit as z, isClickInsideElement as $, focusChild as v, getNextElement as q, focusableChildren as G } from "../../util/helpers.mjs";
|
|
11
|
+
import { VDefaultsProvider as J } from "../VDefaultsProvider/VDefaultsProvider.mjs";
|
|
12
|
+
import { propsFactory as Q } from "../../util/propsFactory.mjs";
|
|
13
|
+
import { genericComponent as W } from "../../util/defineComponent.mjs";
|
|
14
|
+
import { useRender as X } from "../../util/useRender.mjs";
|
|
15
|
+
const Y = Q({
|
|
16
|
+
// TODO
|
|
17
|
+
// disableKeys: Boolean,
|
|
18
|
+
id: String,
|
|
19
|
+
submenu: Boolean,
|
|
20
|
+
...z(U({
|
|
21
|
+
captureFocus: !0,
|
|
22
|
+
closeDelay: 250,
|
|
23
|
+
closeOnContentClick: !0,
|
|
24
|
+
locationStrategy: "connected",
|
|
25
|
+
location: void 0,
|
|
26
|
+
openDelay: 300,
|
|
27
|
+
scrim: !1,
|
|
28
|
+
scrollStrategy: "reposition",
|
|
29
|
+
transition: {
|
|
30
|
+
component: j
|
|
31
|
+
}
|
|
32
|
+
}), ["absolute"])
|
|
33
|
+
}, "VMenu"), de = W()({
|
|
34
|
+
name: "VMenu",
|
|
35
|
+
props: Y(),
|
|
36
|
+
emits: {
|
|
37
|
+
"update:modelValue": (t) => !0
|
|
38
|
+
},
|
|
39
|
+
setup(t, E) {
|
|
40
|
+
let {
|
|
41
|
+
slots: s
|
|
42
|
+
} = E;
|
|
43
|
+
const r = H(t, "modelValue"), {
|
|
44
|
+
scopeId: P
|
|
45
|
+
} = N(), {
|
|
46
|
+
isRtl: c
|
|
47
|
+
} = B(), d = D(), f = x(() => t.id || `v-menu-${d}`), a = R(), o = M(k, null), m = I(/* @__PURE__ */ new Set());
|
|
48
|
+
T(k, {
|
|
49
|
+
register() {
|
|
50
|
+
m.value.add(d);
|
|
51
|
+
},
|
|
52
|
+
unregister() {
|
|
53
|
+
m.value.delete(d);
|
|
54
|
+
},
|
|
55
|
+
closeParents(e) {
|
|
56
|
+
setTimeout(() => {
|
|
57
|
+
var n;
|
|
58
|
+
!m.value.size && !t.persistent && (e == null || (n = a.value) != null && n.contentEl && !$(e, a.value.contentEl)) && (r.value = !1, o == null || o.closeParents());
|
|
59
|
+
}, 40);
|
|
60
|
+
}
|
|
61
|
+
}), S(() => o == null ? void 0 : o.unregister()), L(() => r.value = !1), K(r, (e) => {
|
|
62
|
+
e ? o == null || o.register() : o == null || o.unregister();
|
|
63
|
+
}, {
|
|
64
|
+
immediate: !0
|
|
65
|
+
});
|
|
66
|
+
function V(e) {
|
|
67
|
+
o == null || o.closeParents(e);
|
|
68
|
+
}
|
|
69
|
+
function b(e) {
|
|
70
|
+
var n, l, i, u, g;
|
|
71
|
+
if (!t.disabled)
|
|
72
|
+
if (e.key === "Tab" || e.key === "Enter" && !t.closeOnContentClick) {
|
|
73
|
+
if (e.key === "Enter" && (e.target instanceof HTMLTextAreaElement || e.target instanceof HTMLInputElement && e.target.closest("form")))
|
|
74
|
+
return;
|
|
75
|
+
e.key === "Enter" && e.preventDefault(), !q(G((n = a.value) == null ? void 0 : n.contentEl, !1), e.shiftKey ? "prev" : "next", (C) => C.tabIndex >= 0) && !t.retainFocus && (r.value = !1, (i = (l = a.value) == null ? void 0 : l.activatorEl) == null || i.focus());
|
|
76
|
+
} else
|
|
77
|
+
t.submenu && e.key === (c.value ? "ArrowRight" : "ArrowLeft") && (r.value = !1, (g = (u = a.value) == null ? void 0 : u.activatorEl) == null || g.focus());
|
|
78
|
+
}
|
|
79
|
+
function y(e) {
|
|
80
|
+
var l;
|
|
81
|
+
if (t.disabled)
|
|
82
|
+
return;
|
|
83
|
+
const n = (l = a.value) == null ? void 0 : l.contentEl;
|
|
84
|
+
n && r.value ? e.key === "ArrowDown" ? (e.preventDefault(), e.stopImmediatePropagation(), v(n, "next")) : e.key === "ArrowUp" ? (e.preventDefault(), e.stopImmediatePropagation(), v(n, "prev")) : t.submenu && (e.key === (c.value ? "ArrowRight" : "ArrowLeft") ? r.value = !1 : e.key === (c.value ? "ArrowLeft" : "ArrowRight") && (e.preventDefault(), v(n, "first"))) : (t.submenu ? e.key === (c.value ? "ArrowLeft" : "ArrowRight") : ["ArrowDown", "ArrowUp"].includes(e.key)) && (r.value = !0, e.preventDefault(), setTimeout(() => setTimeout(() => y(e))));
|
|
85
|
+
}
|
|
86
|
+
const h = O(() => w({
|
|
87
|
+
"aria-haspopup": "menu",
|
|
88
|
+
"aria-expanded": String(r.value),
|
|
89
|
+
"aria-controls": f.value,
|
|
90
|
+
"aria-owns": f.value,
|
|
91
|
+
onKeydown: y
|
|
92
|
+
}, t.activatorProps));
|
|
93
|
+
return X(() => {
|
|
94
|
+
const e = A.filterProps(t);
|
|
95
|
+
return p(A, w({
|
|
96
|
+
ref: a,
|
|
97
|
+
id: f.value,
|
|
98
|
+
class: ["v-menu", t.class],
|
|
99
|
+
style: t.style
|
|
100
|
+
}, e, {
|
|
101
|
+
modelValue: r.value,
|
|
102
|
+
"onUpdate:modelValue": (n) => r.value = n,
|
|
103
|
+
absolute: !0,
|
|
104
|
+
activatorProps: h.value,
|
|
105
|
+
location: t.location ?? (t.submenu ? "end" : "bottom"),
|
|
106
|
+
"onClick:outside": V,
|
|
107
|
+
onKeydown: b
|
|
108
|
+
}, P), {
|
|
109
|
+
activator: s.activator,
|
|
110
|
+
default: function() {
|
|
111
|
+
for (var n = arguments.length, l = new Array(n), i = 0; i < n; i++)
|
|
112
|
+
l[i] = arguments[i];
|
|
113
|
+
return p(J, {
|
|
114
|
+
root: "VMenu"
|
|
115
|
+
}, {
|
|
116
|
+
default: () => {
|
|
117
|
+
var u;
|
|
118
|
+
return [(u = s.default) == null ? void 0 : u.call(s, ...l)];
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
}), F({
|
|
124
|
+
id: f,
|
|
125
|
+
ΨopenChildren: m
|
|
126
|
+
}, a);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
export {
|
|
130
|
+
de as VMenu,
|
|
131
|
+
Y as makeVMenuProps
|
|
132
|
+
};
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
import { ref as k, computed as te, watch as p, onBeforeUnmount as oe, createElementVNode as S, Fragment as ae, mergeProps as c, createVNode as E, Teleport as ne, withDirectives as re, vShow as le, Transition as ie } from "vue";
|
|
2
|
+
import "../../../../../../../_virtual/VOverlay.sass.mjs";
|
|
3
|
+
import { makeLocationStrategyProps as se, useLocationStrategies as ue } from "./locationStrategies.mjs";
|
|
4
|
+
import { makeScrollStrategyProps as ce, useScrollStrategies as me } from "./scrollStrategies.mjs";
|
|
5
|
+
import { makeActivatorProps as ve, useActivator as fe } from "./useActivator.mjs";
|
|
6
|
+
import { useBackgroundColor as de } from "../../composables/color.mjs";
|
|
7
|
+
import { makeComponentProps as ye } from "../../composables/component.mjs";
|
|
8
|
+
import { makeDimensionProps as ge, useDimension as ke } from "../../composables/dimensions.mjs";
|
|
9
|
+
import { makeFocusTrapProps as Se, useFocusTrap as Ee } from "../../composables/focusTrap.mjs";
|
|
10
|
+
import { useHydration as be } from "../../composables/hydration.mjs";
|
|
11
|
+
import { makeLazyProps as we, useLazy as Ce } from "../../composables/lazy.mjs";
|
|
12
|
+
import { useRtl as pe } from "../../composables/locale.mjs";
|
|
13
|
+
import { useProxiedModel as Be } from "../../composables/proxiedModel.mjs";
|
|
14
|
+
import { useRouter as Pe, useBackButton as Te } from "../../composables/router.mjs";
|
|
15
|
+
import { useScopeId as Le } from "../../composables/scopeId.mjs";
|
|
16
|
+
import { useStack as he } from "../../composables/stack.mjs";
|
|
17
|
+
import { useTeleport as Ae } from "../../composables/teleport.mjs";
|
|
18
|
+
import { makeThemeProps as Oe, provideTheme as Ve } from "../../composables/theme.mjs";
|
|
19
|
+
import { useToggleScope as Re } from "../../composables/toggleScope.mjs";
|
|
20
|
+
import { makeTransitionProps as Ne, MaybeTransition as _e } from "../../composables/transition.mjs";
|
|
21
|
+
import A from "../../directives/click-outside/index.mjs";
|
|
22
|
+
import { getScrollParent as Ie } from "../../util/getScrollParent.mjs";
|
|
23
|
+
import { propsFactory as Fe } from "../../util/propsFactory.mjs";
|
|
24
|
+
import { genericComponent as xe } from "../../util/defineComponent.mjs";
|
|
25
|
+
import { omit as ze, convertToUnit as Me } from "../../util/helpers.mjs";
|
|
26
|
+
import { getCurrentInstance as De } from "../../util/getCurrentInstance.mjs";
|
|
27
|
+
import { IN_BROWSER as O } from "../../util/globals.mjs";
|
|
28
|
+
import { animate as Ke } from "../../util/animation.mjs";
|
|
29
|
+
import { useRender as Ge } from "../../util/useRender.mjs";
|
|
30
|
+
import { standardEasing as Ue } from "../../util/easing.mjs";
|
|
31
|
+
function je(e) {
|
|
32
|
+
const {
|
|
33
|
+
modelValue: B,
|
|
34
|
+
color: r,
|
|
35
|
+
...b
|
|
36
|
+
} = e;
|
|
37
|
+
return E(ie, {
|
|
38
|
+
name: "fade-transition",
|
|
39
|
+
appear: !0
|
|
40
|
+
}, {
|
|
41
|
+
default: () => [e.modelValue && S("div", c({
|
|
42
|
+
class: ["v-overlay__scrim", e.color.backgroundColorClasses.value],
|
|
43
|
+
style: e.color.backgroundColorStyles.value
|
|
44
|
+
}, b), null)]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
const He = Fe({
|
|
48
|
+
absolute: Boolean,
|
|
49
|
+
attach: [Boolean, String, Object],
|
|
50
|
+
closeOnBack: {
|
|
51
|
+
type: Boolean,
|
|
52
|
+
default: !0
|
|
53
|
+
},
|
|
54
|
+
contained: Boolean,
|
|
55
|
+
contentClass: null,
|
|
56
|
+
contentProps: null,
|
|
57
|
+
disabled: Boolean,
|
|
58
|
+
opacity: [Number, String],
|
|
59
|
+
noClickAnimation: Boolean,
|
|
60
|
+
modelValue: Boolean,
|
|
61
|
+
persistent: Boolean,
|
|
62
|
+
scrim: {
|
|
63
|
+
type: [Boolean, String],
|
|
64
|
+
default: !0
|
|
65
|
+
},
|
|
66
|
+
zIndex: {
|
|
67
|
+
type: [Number, String],
|
|
68
|
+
default: 2e3
|
|
69
|
+
},
|
|
70
|
+
...ve(),
|
|
71
|
+
...ye(),
|
|
72
|
+
...ge(),
|
|
73
|
+
...we(),
|
|
74
|
+
...se(),
|
|
75
|
+
...ce(),
|
|
76
|
+
...Se(),
|
|
77
|
+
...Oe(),
|
|
78
|
+
...Ne()
|
|
79
|
+
}, "VOverlay"), Ct = xe()({
|
|
80
|
+
name: "VOverlay",
|
|
81
|
+
directives: {
|
|
82
|
+
vClickOutside: A
|
|
83
|
+
},
|
|
84
|
+
inheritAttrs: !1,
|
|
85
|
+
props: {
|
|
86
|
+
_disableGlobalStack: Boolean,
|
|
87
|
+
...ze(He(), ["disableInitialFocus"])
|
|
88
|
+
},
|
|
89
|
+
emits: {
|
|
90
|
+
"click:outside": (e) => !0,
|
|
91
|
+
"update:modelValue": (e) => !0,
|
|
92
|
+
keydown: (e) => !0,
|
|
93
|
+
afterEnter: () => !0,
|
|
94
|
+
afterLeave: () => !0
|
|
95
|
+
},
|
|
96
|
+
setup(e, B) {
|
|
97
|
+
let {
|
|
98
|
+
slots: r,
|
|
99
|
+
attrs: b,
|
|
100
|
+
emit: i
|
|
101
|
+
} = B;
|
|
102
|
+
const V = De("VOverlay"), m = k(), v = k(), n = k(), P = Be(e, "modelValue"), o = te({
|
|
103
|
+
get: () => P.value,
|
|
104
|
+
set: (t) => {
|
|
105
|
+
t && e.disabled || (P.value = t);
|
|
106
|
+
}
|
|
107
|
+
}), {
|
|
108
|
+
themeClasses: R
|
|
109
|
+
} = Ve(e), {
|
|
110
|
+
rtlClasses: N,
|
|
111
|
+
isRtl: _
|
|
112
|
+
} = pe(), {
|
|
113
|
+
hasContent: I,
|
|
114
|
+
onAfterLeave: F
|
|
115
|
+
} = Ce(e, o), x = de(() => typeof e.scrim == "string" ? e.scrim : null), {
|
|
116
|
+
globalTop: f,
|
|
117
|
+
localTop: d,
|
|
118
|
+
stackStyles: z
|
|
119
|
+
} = he(o, () => e.zIndex, e._disableGlobalStack), {
|
|
120
|
+
activatorEl: l,
|
|
121
|
+
activatorRef: M,
|
|
122
|
+
target: y,
|
|
123
|
+
targetEl: D,
|
|
124
|
+
targetRef: K,
|
|
125
|
+
activatorEvents: G,
|
|
126
|
+
contentEvents: U,
|
|
127
|
+
scrimEvents: j
|
|
128
|
+
} = fe(e, {
|
|
129
|
+
isActive: o,
|
|
130
|
+
isTop: d,
|
|
131
|
+
contentEl: n
|
|
132
|
+
}), {
|
|
133
|
+
teleportTarget: w
|
|
134
|
+
} = Ae(() => {
|
|
135
|
+
var s, u, h;
|
|
136
|
+
const t = e.attach || e.contained;
|
|
137
|
+
if (t)
|
|
138
|
+
return t;
|
|
139
|
+
const a = ((s = l == null ? void 0 : l.value) == null ? void 0 : s.getRootNode()) || ((h = (u = V.proxy) == null ? void 0 : u.$el) == null ? void 0 : h.getRootNode());
|
|
140
|
+
return a instanceof ShadowRoot ? a : !1;
|
|
141
|
+
}), {
|
|
142
|
+
dimensionStyles: H
|
|
143
|
+
} = ke(e), W = be(), {
|
|
144
|
+
scopeId: $
|
|
145
|
+
} = Le();
|
|
146
|
+
p(() => e.disabled, (t) => {
|
|
147
|
+
t && (o.value = !1);
|
|
148
|
+
});
|
|
149
|
+
const {
|
|
150
|
+
contentStyles: q,
|
|
151
|
+
updateLocation: T
|
|
152
|
+
} = ue(e, {
|
|
153
|
+
isRtl: _,
|
|
154
|
+
contentEl: n,
|
|
155
|
+
target: y,
|
|
156
|
+
isActive: o
|
|
157
|
+
});
|
|
158
|
+
me(e, {
|
|
159
|
+
root: m,
|
|
160
|
+
contentEl: n,
|
|
161
|
+
targetEl: D,
|
|
162
|
+
target: y,
|
|
163
|
+
isActive: o,
|
|
164
|
+
updateLocation: T
|
|
165
|
+
});
|
|
166
|
+
function J(t) {
|
|
167
|
+
i("click:outside", t), e.persistent ? g() : o.value = !1;
|
|
168
|
+
}
|
|
169
|
+
function Q(t) {
|
|
170
|
+
return o.value && d.value && // If using scrim, only close if clicking on it rather than anything opened on top
|
|
171
|
+
(!e.scrim || t.target === v.value || t instanceof MouseEvent && t.shadowTarget === v.value);
|
|
172
|
+
}
|
|
173
|
+
Ee(e, {
|
|
174
|
+
isActive: o,
|
|
175
|
+
localTop: d,
|
|
176
|
+
contentEl: n,
|
|
177
|
+
activatorEl: l
|
|
178
|
+
}), O && p(o, (t) => {
|
|
179
|
+
t ? window.addEventListener("keydown", C) : window.removeEventListener("keydown", C);
|
|
180
|
+
}, {
|
|
181
|
+
immediate: !0
|
|
182
|
+
}), oe(() => {
|
|
183
|
+
O && window.removeEventListener("keydown", C);
|
|
184
|
+
});
|
|
185
|
+
function C(t) {
|
|
186
|
+
var a, s, u;
|
|
187
|
+
t.key === "Escape" && f.value && ((a = n.value) != null && a.contains(document.activeElement) || i("keydown", t), e.persistent ? g() : (o.value = !1, (s = n.value) != null && s.contains(document.activeElement) && ((u = l.value) == null || u.focus())));
|
|
188
|
+
}
|
|
189
|
+
function X(t) {
|
|
190
|
+
t.key === "Escape" && !f.value || i("keydown", t);
|
|
191
|
+
}
|
|
192
|
+
const Y = Pe();
|
|
193
|
+
Re(() => e.closeOnBack, () => {
|
|
194
|
+
Te(Y, (t) => {
|
|
195
|
+
f.value && o.value ? (t(!1), e.persistent ? g() : o.value = !1) : t();
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
const L = k();
|
|
199
|
+
p(() => o.value && (e.absolute || e.contained) && w.value == null, (t) => {
|
|
200
|
+
if (t) {
|
|
201
|
+
const a = Ie(m.value);
|
|
202
|
+
a && a !== document.scrollingElement && (L.value = a.scrollTop);
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
function g() {
|
|
206
|
+
e.noClickAnimation || n.value && Ke(n.value, [{
|
|
207
|
+
transformOrigin: "center"
|
|
208
|
+
}, {
|
|
209
|
+
transform: "scale(1.03)"
|
|
210
|
+
}, {
|
|
211
|
+
transformOrigin: "center"
|
|
212
|
+
}], {
|
|
213
|
+
duration: 150,
|
|
214
|
+
easing: Ue
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
function Z() {
|
|
218
|
+
i("afterEnter");
|
|
219
|
+
}
|
|
220
|
+
function ee() {
|
|
221
|
+
F(), i("afterLeave");
|
|
222
|
+
}
|
|
223
|
+
return Ge(() => {
|
|
224
|
+
var t;
|
|
225
|
+
return S(ae, null, [(t = r.activator) == null ? void 0 : t.call(r, {
|
|
226
|
+
isActive: o.value,
|
|
227
|
+
targetRef: K,
|
|
228
|
+
props: c({
|
|
229
|
+
ref: M
|
|
230
|
+
}, G.value, e.activatorProps)
|
|
231
|
+
}), W.value && I.value && E(ne, {
|
|
232
|
+
disabled: !w.value,
|
|
233
|
+
to: w.value
|
|
234
|
+
}, {
|
|
235
|
+
default: () => [S("div", c({
|
|
236
|
+
class: ["v-overlay", {
|
|
237
|
+
"v-overlay--absolute": e.absolute || e.contained,
|
|
238
|
+
"v-overlay--active": o.value,
|
|
239
|
+
"v-overlay--contained": e.contained
|
|
240
|
+
}, R.value, N.value, e.class],
|
|
241
|
+
style: [z.value, {
|
|
242
|
+
"--v-overlay-opacity": e.opacity,
|
|
243
|
+
top: Me(L.value)
|
|
244
|
+
}, e.style],
|
|
245
|
+
ref: m,
|
|
246
|
+
onKeydown: X
|
|
247
|
+
}, $, b), [E(je, c({
|
|
248
|
+
color: x,
|
|
249
|
+
modelValue: o.value && !!e.scrim,
|
|
250
|
+
ref: v
|
|
251
|
+
}, j.value), null), E(_e, {
|
|
252
|
+
appear: !0,
|
|
253
|
+
persisted: !0,
|
|
254
|
+
transition: e.transition,
|
|
255
|
+
target: y.value,
|
|
256
|
+
onAfterEnter: Z,
|
|
257
|
+
onAfterLeave: ee
|
|
258
|
+
}, {
|
|
259
|
+
default: () => {
|
|
260
|
+
var a;
|
|
261
|
+
return [re(S("div", c({
|
|
262
|
+
ref: n,
|
|
263
|
+
class: ["v-overlay__content", e.contentClass],
|
|
264
|
+
style: [H.value, q.value]
|
|
265
|
+
}, U.value, e.contentProps), [(a = r.default) == null ? void 0 : a.call(r, {
|
|
266
|
+
isActive: o
|
|
267
|
+
})]), [[le, o.value], [A, {
|
|
268
|
+
handler: J,
|
|
269
|
+
closeConditional: Q,
|
|
270
|
+
include: () => [l.value]
|
|
271
|
+
}]])];
|
|
272
|
+
}
|
|
273
|
+
})])]
|
|
274
|
+
})]);
|
|
275
|
+
}), {
|
|
276
|
+
activatorEl: l,
|
|
277
|
+
scrimEl: v,
|
|
278
|
+
target: y,
|
|
279
|
+
animateClick: g,
|
|
280
|
+
contentEl: n,
|
|
281
|
+
rootEl: m,
|
|
282
|
+
globalTop: f,
|
|
283
|
+
localTop: d,
|
|
284
|
+
updateLocation: T
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
export {
|
|
289
|
+
Ct as VOverlay,
|
|
290
|
+
He as makeVOverlayProps
|
|
291
|
+
};
|