bt-core-app 2.2.3 → 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 +4 -4
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { createElementVNode as n, Fragment as c, normalizeClass as r, toRef as m, toValue as l } from "vue";
|
|
2
|
+
import { useColor as d } from "./color.mjs";
|
|
3
|
+
import { propsFactory as v } from "../util/propsFactory.mjs";
|
|
4
|
+
import { getCurrentInstanceName as f } from "../util/getCurrentInstance.mjs";
|
|
5
|
+
const g = ["elevated", "flat", "tonal", "outlined", "text", "plain"];
|
|
6
|
+
function k(t, e) {
|
|
7
|
+
return n(c, null, [t && n("span", {
|
|
8
|
+
key: "overlay",
|
|
9
|
+
class: r(`${e}__overlay`)
|
|
10
|
+
}, null), n("span", {
|
|
11
|
+
key: "underlay",
|
|
12
|
+
class: r(`${e}__underlay`)
|
|
13
|
+
}, null)]);
|
|
14
|
+
}
|
|
15
|
+
const _ = v({
|
|
16
|
+
color: String,
|
|
17
|
+
variant: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "elevated",
|
|
20
|
+
validator: (t) => g.includes(t)
|
|
21
|
+
}
|
|
22
|
+
}, "variant");
|
|
23
|
+
function $(t) {
|
|
24
|
+
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : f();
|
|
25
|
+
const o = m(() => {
|
|
26
|
+
const {
|
|
27
|
+
variant: a
|
|
28
|
+
} = l(t);
|
|
29
|
+
return `${e}--variant-${a}`;
|
|
30
|
+
}), {
|
|
31
|
+
colorClasses: s,
|
|
32
|
+
colorStyles: i
|
|
33
|
+
} = d(() => {
|
|
34
|
+
const {
|
|
35
|
+
variant: a,
|
|
36
|
+
color: u
|
|
37
|
+
} = l(t);
|
|
38
|
+
return {
|
|
39
|
+
[["elevated", "flat"].includes(a) ? "background" : "text"]: u
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
return {
|
|
43
|
+
colorClasses: s,
|
|
44
|
+
colorStyles: i,
|
|
45
|
+
variantClasses: o
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
g as allowedVariants,
|
|
50
|
+
k as genOverlays,
|
|
51
|
+
_ as makeVariantProps,
|
|
52
|
+
$ as useVariant
|
|
53
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { attachedRoot as i } from "../../util/dom.mjs";
|
|
2
|
+
function r() {
|
|
3
|
+
return !0;
|
|
4
|
+
}
|
|
5
|
+
function a(t, o, e) {
|
|
6
|
+
if (!t || d(t, e) === !1)
|
|
7
|
+
return !1;
|
|
8
|
+
const c = i(o);
|
|
9
|
+
if (typeof ShadowRoot < "u" && c instanceof ShadowRoot && c.host === t.target)
|
|
10
|
+
return !1;
|
|
11
|
+
const s = (typeof e.value == "object" && e.value.include || (() => []))();
|
|
12
|
+
return s.push(o), !s.some((u) => u == null ? void 0 : u.contains(t.target));
|
|
13
|
+
}
|
|
14
|
+
function d(t, o) {
|
|
15
|
+
return (typeof o.value == "object" && o.value.closeConditional || r)(t);
|
|
16
|
+
}
|
|
17
|
+
function f(t, o, e) {
|
|
18
|
+
const c = typeof e.value == "function" ? e.value : e.value.handler;
|
|
19
|
+
t.shadowTarget = t.target, o._clickOutside.lastMousedownWasOutside && a(t, o, e) && setTimeout(() => {
|
|
20
|
+
d(t, e) && c && c(t);
|
|
21
|
+
}, 0);
|
|
22
|
+
}
|
|
23
|
+
function n(t, o) {
|
|
24
|
+
const e = i(t);
|
|
25
|
+
o(document), typeof ShadowRoot < "u" && e instanceof ShadowRoot && o(e);
|
|
26
|
+
}
|
|
27
|
+
const l = {
|
|
28
|
+
// [data-app] may not be found
|
|
29
|
+
// if using bind, inserted makes
|
|
30
|
+
// sure that the root element is
|
|
31
|
+
// available, iOS does not support
|
|
32
|
+
// clicks on body
|
|
33
|
+
mounted(t, o) {
|
|
34
|
+
const e = (s) => f(s, t, o), c = (s) => {
|
|
35
|
+
t._clickOutside.lastMousedownWasOutside = a(s, t, o);
|
|
36
|
+
};
|
|
37
|
+
n(t, (s) => {
|
|
38
|
+
s.addEventListener("click", e, !0), s.addEventListener("mousedown", c, !0);
|
|
39
|
+
}), t._clickOutside || (t._clickOutside = {
|
|
40
|
+
lastMousedownWasOutside: !1
|
|
41
|
+
}), t._clickOutside[o.instance.$.uid] = {
|
|
42
|
+
onClick: e,
|
|
43
|
+
onMousedown: c
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
beforeUnmount(t, o) {
|
|
47
|
+
t._clickOutside && (n(t, (e) => {
|
|
48
|
+
var u;
|
|
49
|
+
if (!e || !((u = t._clickOutside) != null && u[o.instance.$.uid]))
|
|
50
|
+
return;
|
|
51
|
+
const {
|
|
52
|
+
onClick: c,
|
|
53
|
+
onMousedown: s
|
|
54
|
+
} = t._clickOutside[o.instance.$.uid];
|
|
55
|
+
e.removeEventListener("click", c, !0), e.removeEventListener("mousedown", s, !0);
|
|
56
|
+
}), delete t._clickOutside[o.instance.$.uid]);
|
|
57
|
+
}
|
|
58
|
+
}, k = l;
|
|
59
|
+
export {
|
|
60
|
+
l as ClickOutside,
|
|
61
|
+
k as default
|
|
62
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { SUPPORTS_INTERSECTION as _ } from "../../util/globals.mjs";
|
|
2
|
+
function f(e, t) {
|
|
3
|
+
if (!_)
|
|
4
|
+
return;
|
|
5
|
+
const s = t.modifiers || {}, n = t.value, {
|
|
6
|
+
handler: u,
|
|
7
|
+
options: d
|
|
8
|
+
} = typeof n == "object" ? n : {
|
|
9
|
+
handler: n,
|
|
10
|
+
options: {}
|
|
11
|
+
}, c = new IntersectionObserver(function() {
|
|
12
|
+
var v;
|
|
13
|
+
let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], m = arguments.length > 1 ? arguments[1] : void 0;
|
|
14
|
+
const r = (v = e._observe) == null ? void 0 : v[t.instance.$.uid];
|
|
15
|
+
if (!r)
|
|
16
|
+
return;
|
|
17
|
+
const o = a.some((b) => b.isIntersecting);
|
|
18
|
+
u && (!s.quiet || r.init) && (!s.once || o || r.init) && u(o, a, m), o && s.once ? i(e, t) : r.init = !0;
|
|
19
|
+
}, d);
|
|
20
|
+
e._observe = Object(e._observe), e._observe[t.instance.$.uid] = {
|
|
21
|
+
init: !1,
|
|
22
|
+
observer: c
|
|
23
|
+
}, c.observe(e);
|
|
24
|
+
}
|
|
25
|
+
function i(e, t) {
|
|
26
|
+
var n;
|
|
27
|
+
const s = (n = e._observe) == null ? void 0 : n[t.instance.$.uid];
|
|
28
|
+
s && (s.observer.unobserve(e), delete e._observe[t.instance.$.uid]);
|
|
29
|
+
}
|
|
30
|
+
const I = {
|
|
31
|
+
mounted: f,
|
|
32
|
+
unmounted: i,
|
|
33
|
+
updated: (e, t) => {
|
|
34
|
+
var s;
|
|
35
|
+
(s = e._observe) != null && s[t.instance.$.uid] && (i(e, t), f(e, t));
|
|
36
|
+
}
|
|
37
|
+
}, $ = I;
|
|
38
|
+
export {
|
|
39
|
+
I as Intersect,
|
|
40
|
+
$ as default
|
|
41
|
+
};
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import "../../../../../../../_virtual/VRipple.sass.mjs";
|
|
2
|
+
import { isObject as R } from "../../util/helpers.mjs";
|
|
3
|
+
const E = Symbol("rippleStop"), S = 80;
|
|
4
|
+
function y(e, t) {
|
|
5
|
+
e.style.transform = t, e.style.webkitTransform = t;
|
|
6
|
+
}
|
|
7
|
+
function L(e) {
|
|
8
|
+
return e.constructor.name === "TouchEvent";
|
|
9
|
+
}
|
|
10
|
+
function T(e) {
|
|
11
|
+
return e.constructor.name === "KeyboardEvent";
|
|
12
|
+
}
|
|
13
|
+
const x = function(e, t) {
|
|
14
|
+
var u;
|
|
15
|
+
let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, s = 0, r = 0;
|
|
16
|
+
if (!T(e)) {
|
|
17
|
+
const d = t.getBoundingClientRect(), l = L(e) ? e.touches[e.touches.length - 1] : e;
|
|
18
|
+
s = l.clientX - d.left, r = l.clientY - d.top;
|
|
19
|
+
}
|
|
20
|
+
let n = 0, o = 0.3;
|
|
21
|
+
(u = t._ripple) != null && u.circle ? (o = 0.15, n = t.clientWidth / 2, n = i.center ? n : n + Math.sqrt((s - n) ** 2 + (r - n) ** 2) / 4) : n = Math.sqrt(t.clientWidth ** 2 + t.clientHeight ** 2) / 2;
|
|
22
|
+
const p = `${(t.clientWidth - n * 2) / 2}px`, c = `${(t.clientHeight - n * 2) / 2}px`, _ = i.center ? p : `${s - n}px`, w = i.center ? c : `${r - n}px`;
|
|
23
|
+
return {
|
|
24
|
+
radius: n,
|
|
25
|
+
scale: o,
|
|
26
|
+
x: _,
|
|
27
|
+
y: w,
|
|
28
|
+
centerX: p,
|
|
29
|
+
centerY: c
|
|
30
|
+
};
|
|
31
|
+
}, f = {
|
|
32
|
+
/* eslint-disable max-statements */
|
|
33
|
+
show(e, t) {
|
|
34
|
+
var l;
|
|
35
|
+
let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
36
|
+
if (!((l = t == null ? void 0 : t._ripple) != null && l.enabled))
|
|
37
|
+
return;
|
|
38
|
+
const s = document.createElement("span"), r = document.createElement("span");
|
|
39
|
+
s.appendChild(r), s.className = "v-ripple__container", i.class && (s.className += ` ${i.class}`);
|
|
40
|
+
const {
|
|
41
|
+
radius: n,
|
|
42
|
+
scale: o,
|
|
43
|
+
x: p,
|
|
44
|
+
y: c,
|
|
45
|
+
centerX: _,
|
|
46
|
+
centerY: w
|
|
47
|
+
} = x(e, t, i), u = `${n * 2}px`;
|
|
48
|
+
r.className = "v-ripple__animation", r.style.width = u, r.style.height = u, t.appendChild(s);
|
|
49
|
+
const d = window.getComputedStyle(t);
|
|
50
|
+
d && d.position === "static" && (t.style.position = "relative", t.dataset.previousPosition = "static"), r.classList.add("v-ripple__animation--enter"), r.classList.add("v-ripple__animation--visible"), y(r, `translate(${p}, ${c}) scale3d(${o},${o},${o})`), r.dataset.activated = String(performance.now()), requestAnimationFrame(() => {
|
|
51
|
+
requestAnimationFrame(() => {
|
|
52
|
+
r.classList.remove("v-ripple__animation--enter"), r.classList.add("v-ripple__animation--in"), y(r, `translate(${_}, ${w}) scale3d(1,1,1)`);
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
hide(e) {
|
|
57
|
+
var n;
|
|
58
|
+
if (!((n = e == null ? void 0 : e._ripple) != null && n.enabled))
|
|
59
|
+
return;
|
|
60
|
+
const t = e.getElementsByClassName("v-ripple__animation");
|
|
61
|
+
if (t.length === 0)
|
|
62
|
+
return;
|
|
63
|
+
const i = Array.from(t).findLast((o) => !o.dataset.isHiding);
|
|
64
|
+
if (i)
|
|
65
|
+
i.dataset.isHiding = "true";
|
|
66
|
+
else
|
|
67
|
+
return;
|
|
68
|
+
const s = performance.now() - Number(i.dataset.activated), r = Math.max(250 - s, 0);
|
|
69
|
+
setTimeout(() => {
|
|
70
|
+
i.classList.remove("v-ripple__animation--in"), i.classList.add("v-ripple__animation--out"), setTimeout(() => {
|
|
71
|
+
var p;
|
|
72
|
+
e.getElementsByClassName("v-ripple__animation").length === 1 && e.dataset.previousPosition && (e.style.position = e.dataset.previousPosition, delete e.dataset.previousPosition), ((p = i.parentNode) == null ? void 0 : p.parentNode) === e && e.removeChild(i.parentNode);
|
|
73
|
+
}, 300);
|
|
74
|
+
}, r);
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
function g(e) {
|
|
78
|
+
return typeof e > "u" || !!e;
|
|
79
|
+
}
|
|
80
|
+
function m(e) {
|
|
81
|
+
const t = {}, i = e.currentTarget;
|
|
82
|
+
if (!(!(i != null && i._ripple) || i._ripple.touched || e[E])) {
|
|
83
|
+
if (e[E] = !0, L(e))
|
|
84
|
+
i._ripple.touched = !0, i._ripple.isTouch = !0;
|
|
85
|
+
else if (i._ripple.isTouch)
|
|
86
|
+
return;
|
|
87
|
+
if (t.center = i._ripple.centered || T(e), i._ripple.class && (t.class = i._ripple.class), L(e)) {
|
|
88
|
+
if (i._ripple.showTimerCommit)
|
|
89
|
+
return;
|
|
90
|
+
i._ripple.showTimerCommit = () => {
|
|
91
|
+
f.show(e, i, t);
|
|
92
|
+
}, i._ripple.showTimer = window.setTimeout(() => {
|
|
93
|
+
var s;
|
|
94
|
+
(s = i == null ? void 0 : i._ripple) != null && s.showTimerCommit && (i._ripple.showTimerCommit(), i._ripple.showTimerCommit = null);
|
|
95
|
+
}, S);
|
|
96
|
+
} else
|
|
97
|
+
f.show(e, i, t);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
function h(e) {
|
|
101
|
+
e[E] = !0;
|
|
102
|
+
}
|
|
103
|
+
function a(e) {
|
|
104
|
+
const t = e.currentTarget;
|
|
105
|
+
if (t != null && t._ripple) {
|
|
106
|
+
if (window.clearTimeout(t._ripple.showTimer), e.type === "touchend" && t._ripple.showTimerCommit) {
|
|
107
|
+
t._ripple.showTimerCommit(), t._ripple.showTimerCommit = null, t._ripple.showTimer = window.setTimeout(() => {
|
|
108
|
+
a(e);
|
|
109
|
+
});
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
window.setTimeout(() => {
|
|
113
|
+
t._ripple && (t._ripple.touched = !1);
|
|
114
|
+
}), f.hide(t);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function C(e) {
|
|
118
|
+
const t = e.currentTarget;
|
|
119
|
+
t != null && t._ripple && (t._ripple.showTimerCommit && (t._ripple.showTimerCommit = null), window.clearTimeout(t._ripple.showTimer));
|
|
120
|
+
}
|
|
121
|
+
let v = !1;
|
|
122
|
+
function N(e, t) {
|
|
123
|
+
!v && t.includes(e.key) && (v = !0, m(e));
|
|
124
|
+
}
|
|
125
|
+
function b(e) {
|
|
126
|
+
v = !1, a(e);
|
|
127
|
+
}
|
|
128
|
+
function k(e) {
|
|
129
|
+
v && (v = !1, a(e));
|
|
130
|
+
}
|
|
131
|
+
function $(e, t, i) {
|
|
132
|
+
const {
|
|
133
|
+
value: s,
|
|
134
|
+
modifiers: r
|
|
135
|
+
} = t, n = g(s);
|
|
136
|
+
n || f.hide(e), e._ripple = e._ripple ?? {}, e._ripple.enabled = n, e._ripple.centered = r.center, e._ripple.circle = r.circle;
|
|
137
|
+
const o = R(s) ? s : {};
|
|
138
|
+
o.class && (e._ripple.class = o.class);
|
|
139
|
+
const p = o.keys ?? ["Enter", "Space"];
|
|
140
|
+
if (e._ripple.keyDownHandler = (c) => N(c, p), n && !i) {
|
|
141
|
+
if (r.stop) {
|
|
142
|
+
e.addEventListener("touchstart", h, {
|
|
143
|
+
passive: !0
|
|
144
|
+
}), e.addEventListener("mousedown", h);
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
e.addEventListener("touchstart", m, {
|
|
148
|
+
passive: !0
|
|
149
|
+
}), e.addEventListener("touchend", a, {
|
|
150
|
+
passive: !0
|
|
151
|
+
}), e.addEventListener("touchmove", C, {
|
|
152
|
+
passive: !0
|
|
153
|
+
}), e.addEventListener("touchcancel", a), e.addEventListener("mousedown", m), e.addEventListener("mouseup", a), e.addEventListener("mouseleave", a), e.addEventListener("keydown", e._ripple.keyDownHandler), e.addEventListener("keyup", b), e.addEventListener("blur", k), e.addEventListener("dragstart", a, {
|
|
154
|
+
passive: !0
|
|
155
|
+
});
|
|
156
|
+
} else
|
|
157
|
+
!n && i && H(e);
|
|
158
|
+
}
|
|
159
|
+
function H(e) {
|
|
160
|
+
var t;
|
|
161
|
+
e.removeEventListener("touchstart", h), e.removeEventListener("mousedown", h), e.removeEventListener("touchstart", m), e.removeEventListener("touchend", a), e.removeEventListener("touchmove", C), e.removeEventListener("touchcancel", a), e.removeEventListener("mousedown", m), e.removeEventListener("mouseup", a), e.removeEventListener("mouseleave", a), (t = e._ripple) != null && t.keyDownHandler && e.removeEventListener("keydown", e._ripple.keyDownHandler), e.removeEventListener("keyup", b), e.removeEventListener("blur", k), e.removeEventListener("dragstart", a);
|
|
162
|
+
}
|
|
163
|
+
function P(e, t) {
|
|
164
|
+
$(e, t, !1);
|
|
165
|
+
}
|
|
166
|
+
function D(e) {
|
|
167
|
+
H(e), delete e._ripple;
|
|
168
|
+
}
|
|
169
|
+
function Y(e, t) {
|
|
170
|
+
if (t.value === t.oldValue)
|
|
171
|
+
return;
|
|
172
|
+
const i = g(t.oldValue);
|
|
173
|
+
$(e, t, i);
|
|
174
|
+
}
|
|
175
|
+
const q = {
|
|
176
|
+
mounted: P,
|
|
177
|
+
unmounted: D,
|
|
178
|
+
updated: Y
|
|
179
|
+
}, B = q;
|
|
180
|
+
export {
|
|
181
|
+
q as Ripple,
|
|
182
|
+
B as default
|
|
183
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { includes as r } from "./helpers.mjs";
|
|
2
|
+
const l = ["top", "bottom"], f = ["start", "end", "left", "right"];
|
|
3
|
+
function s(t, e) {
|
|
4
|
+
let [i, n] = t.split(" ");
|
|
5
|
+
return n || (n = r(l, i) ? "start" : r(f, i) ? "top" : "center"), {
|
|
6
|
+
side: o(i, e),
|
|
7
|
+
align: o(n, e)
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function o(t, e) {
|
|
11
|
+
return t === "start" ? e ? "right" : "left" : t === "end" ? e ? "left" : "right" : t;
|
|
12
|
+
}
|
|
13
|
+
function u(t) {
|
|
14
|
+
return {
|
|
15
|
+
side: {
|
|
16
|
+
center: "center",
|
|
17
|
+
top: "bottom",
|
|
18
|
+
bottom: "top",
|
|
19
|
+
left: "right",
|
|
20
|
+
right: "left"
|
|
21
|
+
}[t.side],
|
|
22
|
+
align: t.align
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function c(t) {
|
|
26
|
+
return {
|
|
27
|
+
side: t.side,
|
|
28
|
+
align: {
|
|
29
|
+
center: "center",
|
|
30
|
+
top: "bottom",
|
|
31
|
+
bottom: "top",
|
|
32
|
+
left: "right",
|
|
33
|
+
right: "left"
|
|
34
|
+
}[t.align]
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function d(t) {
|
|
38
|
+
return {
|
|
39
|
+
side: t.align,
|
|
40
|
+
align: t.side
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function p(t) {
|
|
44
|
+
return r(l, t.side) ? "y" : "x";
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
c as flipAlign,
|
|
48
|
+
d as flipCorner,
|
|
49
|
+
u as flipSide,
|
|
50
|
+
p as getAxis,
|
|
51
|
+
s as parseAnchor,
|
|
52
|
+
o as toPhysical
|
|
53
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Box as f } from "./box.mjs";
|
|
2
|
+
function y(r) {
|
|
3
|
+
const i = new f(r), o = getComputedStyle(r), t = o.transform;
|
|
4
|
+
if (t) {
|
|
5
|
+
let e, n, s, m, a;
|
|
6
|
+
if (t.startsWith("matrix3d("))
|
|
7
|
+
e = t.slice(9, -1).split(/, /), n = Number(e[0]), s = Number(e[5]), m = Number(e[12]), a = Number(e[13]);
|
|
8
|
+
else if (t.startsWith("matrix("))
|
|
9
|
+
e = t.slice(7, -1).split(/, /), n = Number(e[0]), s = Number(e[3]), m = Number(e[4]), a = Number(e[5]);
|
|
10
|
+
else
|
|
11
|
+
return new f(i);
|
|
12
|
+
const u = o.transformOrigin, h = i.x - m - (1 - n) * parseFloat(u), c = i.y - a - (1 - s) * parseFloat(u.slice(u.indexOf(" ") + 1)), d = n ? i.width / n : r.offsetWidth + 1, l = s ? i.height / s : r.offsetHeight + 1;
|
|
13
|
+
return new f({
|
|
14
|
+
x: h,
|
|
15
|
+
y: c,
|
|
16
|
+
width: d,
|
|
17
|
+
height: l
|
|
18
|
+
});
|
|
19
|
+
} else
|
|
20
|
+
return new f(i);
|
|
21
|
+
}
|
|
22
|
+
function p(r, i, o) {
|
|
23
|
+
if (typeof r.animate > "u")
|
|
24
|
+
return {
|
|
25
|
+
finished: Promise.resolve()
|
|
26
|
+
};
|
|
27
|
+
let t;
|
|
28
|
+
try {
|
|
29
|
+
t = r.animate(i, o);
|
|
30
|
+
} catch {
|
|
31
|
+
return {
|
|
32
|
+
finished: Promise.resolve()
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
return typeof t.finished > "u" && (t.finished = new Promise((e) => {
|
|
36
|
+
t.onfinish = () => {
|
|
37
|
+
e(t);
|
|
38
|
+
};
|
|
39
|
+
})), t;
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
p as animate,
|
|
43
|
+
y as nullifyTransforms
|
|
44
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { isOn as a, eventName as m } from "./helpers.mjs";
|
|
2
|
+
const f = /* @__PURE__ */ new WeakMap();
|
|
3
|
+
function u(n, s) {
|
|
4
|
+
Object.keys(s).forEach((e) => {
|
|
5
|
+
if (a(e)) {
|
|
6
|
+
const o = m(e), t = f.get(n);
|
|
7
|
+
if (s[e] == null)
|
|
8
|
+
t == null || t.forEach((i) => {
|
|
9
|
+
const [c, r] = i;
|
|
10
|
+
c === o && (n.removeEventListener(o, r), t.delete(i));
|
|
11
|
+
});
|
|
12
|
+
else if (!t || ![...t].some((i) => i[0] === o && i[1] === s[e])) {
|
|
13
|
+
n.addEventListener(o, s[e]);
|
|
14
|
+
const i = t || /* @__PURE__ */ new Set();
|
|
15
|
+
i.add([o, s[e]]), f.has(n) || f.set(n, i);
|
|
16
|
+
}
|
|
17
|
+
} else
|
|
18
|
+
s[e] == null ? n.removeAttribute(e) : n.setAttribute(e, s[e]);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function b(n, s) {
|
|
22
|
+
Object.keys(s).forEach((e) => {
|
|
23
|
+
if (a(e)) {
|
|
24
|
+
const o = m(e), t = f.get(n);
|
|
25
|
+
t == null || t.forEach((i) => {
|
|
26
|
+
const [c, r] = i;
|
|
27
|
+
c === o && (n.removeEventListener(o, r), t.delete(i));
|
|
28
|
+
});
|
|
29
|
+
} else
|
|
30
|
+
n.removeAttribute(e);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
u as bindProps,
|
|
35
|
+
b as unbindProps
|
|
36
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
class i {
|
|
2
|
+
constructor(t) {
|
|
3
|
+
const o = document.body.currentCSSZoom ?? 1, r = t instanceof Element, n = r ? 1 + (1 - o) / o : 1, {
|
|
4
|
+
x: h,
|
|
5
|
+
y: s,
|
|
6
|
+
width: c,
|
|
7
|
+
height: u
|
|
8
|
+
} = r ? t.getBoundingClientRect() : t;
|
|
9
|
+
this.x = h * n, this.y = s * n, this.width = c * n, this.height = u * n;
|
|
10
|
+
}
|
|
11
|
+
get top() {
|
|
12
|
+
return this.y;
|
|
13
|
+
}
|
|
14
|
+
get bottom() {
|
|
15
|
+
return this.y + this.height;
|
|
16
|
+
}
|
|
17
|
+
get left() {
|
|
18
|
+
return this.x;
|
|
19
|
+
}
|
|
20
|
+
get right() {
|
|
21
|
+
return this.x + this.width;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function l(e, t) {
|
|
25
|
+
return {
|
|
26
|
+
x: {
|
|
27
|
+
before: Math.max(0, t.left - e.left),
|
|
28
|
+
after: Math.max(0, e.right - t.right)
|
|
29
|
+
},
|
|
30
|
+
y: {
|
|
31
|
+
before: Math.max(0, t.top - e.top),
|
|
32
|
+
after: Math.max(0, e.bottom - t.bottom)
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function a(e) {
|
|
37
|
+
if (Array.isArray(e)) {
|
|
38
|
+
const t = document.body.currentCSSZoom ?? 1, o = 1 + (1 - t) / t;
|
|
39
|
+
return new i({
|
|
40
|
+
x: e[0] * o,
|
|
41
|
+
y: e[1] * o,
|
|
42
|
+
width: 0 * o,
|
|
43
|
+
height: 0 * o
|
|
44
|
+
});
|
|
45
|
+
} else
|
|
46
|
+
return new i(e);
|
|
47
|
+
}
|
|
48
|
+
function m(e) {
|
|
49
|
+
if (e === document.documentElement)
|
|
50
|
+
if (visualViewport) {
|
|
51
|
+
const t = document.body.currentCSSZoom ?? 1;
|
|
52
|
+
return new i({
|
|
53
|
+
x: visualViewport.scale > 1 ? 0 : visualViewport.offsetLeft,
|
|
54
|
+
y: visualViewport.scale > 1 ? 0 : visualViewport.offsetTop,
|
|
55
|
+
width: visualViewport.width * visualViewport.scale / t,
|
|
56
|
+
height: visualViewport.height * visualViewport.scale / t
|
|
57
|
+
});
|
|
58
|
+
} else
|
|
59
|
+
return new i({
|
|
60
|
+
x: 0,
|
|
61
|
+
y: 0,
|
|
62
|
+
width: document.documentElement.clientWidth,
|
|
63
|
+
height: document.documentElement.clientHeight
|
|
64
|
+
});
|
|
65
|
+
else
|
|
66
|
+
return new i(e);
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
i as Box,
|
|
70
|
+
m as getElementBox,
|
|
71
|
+
l as getOverflow,
|
|
72
|
+
a as getTargetBox
|
|
73
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const r = 0.2126729, a = 0.7151522, e = 0.072175, A = 0.55, u = 0.58, x = 0.57, P = 0.62, s = 0.03, T = 1.45, Y = 5e-4, v = 1.25, S = 1.25, m = 0.078, R = 12.82051282051282, c = 0.06, b = 1e-3;
|
|
2
|
+
function W(C, l) {
|
|
3
|
+
const f = (C.r / 255) ** 2.4, B = (C.g / 255) ** 2.4, G = (C.b / 255) ** 2.4, g = (l.r / 255) ** 2.4, h = (l.g / 255) ** 2.4, p = (l.b / 255) ** 2.4;
|
|
4
|
+
let o = f * r + B * a + G * e, n = g * r + h * a + p * e;
|
|
5
|
+
if (o <= s && (o += (s - o) ** T), n <= s && (n += (s - n) ** T), Math.abs(n - o) < Y)
|
|
6
|
+
return 0;
|
|
7
|
+
let i;
|
|
8
|
+
if (n > o) {
|
|
9
|
+
const t = (n ** A - o ** u) * v;
|
|
10
|
+
i = t < b ? 0 : t < m ? t - t * R * c : t - c;
|
|
11
|
+
} else {
|
|
12
|
+
const t = (n ** P - o ** x) * S;
|
|
13
|
+
i = t > -b ? 0 : t > -m ? t - t * R * c : t + c;
|
|
14
|
+
}
|
|
15
|
+
return i * 100;
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
W as APCAcontrast
|
|
19
|
+
};
|