@validol4ik/uikit 0.9.10 → 0.9.12

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.
@@ -1,107 +0,0 @@
1
- import { defineComponent as M, useModel as x, ref as i, computed as H, openBlock as d, createBlock as I, unref as b, withCtx as Y, createElementVNode as n, normalizeStyle as $, normalizeClass as z, renderSlot as u, createElementBlock as _, createTextVNode as N, toDisplayString as D, createCommentVNode as Q, createVNode as y, mergeModels as B } from "vue";
2
- import { Q as E } from "./QDialog-Bon4aqzD.js";
3
- import { F as R, b as T, _ as U } from "./index-CKONRDpy.js";
4
- const F = {
5
- key: 0,
6
- class: "bottom-sheet__title"
7
- }, j = { class: "bottom-sheet__body" }, q = {
8
- key: 0,
9
- class: "bottom-sheet__loading"
10
- }, A = /* @__PURE__ */ M({
11
- __name: "BottomSheet",
12
- props: /* @__PURE__ */ B({
13
- modelValue: { type: Boolean },
14
- title: {},
15
- loading: { type: Boolean },
16
- persistent: { type: Boolean },
17
- maxHeight: { default: "95vh" },
18
- glass: { type: Boolean }
19
- }, {
20
- modelValue: { type: Boolean },
21
- modelModifiers: {}
22
- }),
23
- emits: /* @__PURE__ */ B(["hide", "beforeShow"], ["update:modelValue"]),
24
- setup(m, { emit: V }) {
25
- const P = m, r = x(m, "modelValue"), p = V, c = i(null), o = i(!1), l = i(0);
26
- let f = 0, s = null;
27
- const S = H(() => ({
28
- maxHeight: P.maxHeight,
29
- transform: l.value ? `translateY(${l.value}px)` : void 0
30
- })), v = () => r.value = !1, k = (e) => {
31
- if (e.target.closest(".bottom-sheet__close")) return;
32
- s = e.pointerId, f = e.clientY, o.value = !0;
33
- const t = e.currentTarget;
34
- typeof t.setPointerCapture == "function" && t.setPointerCapture(e.pointerId);
35
- }, C = (e) => {
36
- !o.value || e.pointerId !== s || (l.value = Math.max(0, e.clientY - f));
37
- }, h = (e) => {
38
- var g;
39
- if (!o.value || e.pointerId !== s) return;
40
- o.value = !1, s = null;
41
- const t = ((g = c.value) == null ? void 0 : g.offsetHeight) ?? 0, a = Math.min(120, t * 0.25 || 120);
42
- if (l.value > a) {
43
- v();
44
- return;
45
- }
46
- l.value = 0, p("hide");
47
- }, w = () => {
48
- o.value = !1, s = null, l.value = 0;
49
- };
50
- return (e, t) => (d(), I(b(E), {
51
- modelValue: r.value,
52
- "onUpdate:modelValue": t[0] || (t[0] = (a) => r.value = a),
53
- position: "bottom",
54
- persistent: e.persistent,
55
- class: "bottom-sheet-dialog",
56
- "backdrop-filter": "blur(12px)",
57
- onHide: w,
58
- onBeforeShow: t[1] || (t[1] = (a) => p("beforeShow"))
59
- }, {
60
- default: Y(() => [
61
- n("div", {
62
- ref_key: "sheetRef",
63
- ref: c,
64
- class: z(["bottom-sheet", {
65
- "bottom-sheet_dragging": o.value,
66
- "bottom-sheet_glass": e.glass
67
- }]),
68
- style: $(S.value)
69
- }, [
70
- n("div", {
71
- class: "bottom-sheet__header",
72
- onPointerdown: k,
73
- onPointermove: C,
74
- onPointerup: h,
75
- onPointercancel: h
76
- }, [
77
- t[2] || (t[2] = n("div", { class: "bottom-sheet__grabber" }, null, -1)),
78
- n("div", null, [
79
- u(e.$slots, "header", {}, void 0, !0)
80
- ]),
81
- e.title ? (d(), _("div", F, [
82
- N(D(e.title), 1),
83
- u(e.$slots, "title", {}, void 0, !0)
84
- ])) : Q("", !0),
85
- y(R, {
86
- class: "bottom-sheet__close",
87
- size: "xl",
88
- onClick: v
89
- })
90
- ], 32),
91
- n("div", j, [
92
- e.loading ? (d(), _("div", q, [
93
- y(b(T), {
94
- size: "40px",
95
- color: "primary"
96
- })
97
- ])) : u(e.$slots, "default", { key: 1 }, void 0, !0)
98
- ])
99
- ], 6)
100
- ]),
101
- _: 3
102
- }, 8, ["modelValue", "persistent"]));
103
- }
104
- }), L = /* @__PURE__ */ U(A, [["__scopeId", "data-v-598d068b"]]);
105
- export {
106
- L as default
107
- };