@validol4ik/uikit 0.9.9 → 0.9.11
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/{AppButtonCopy-CC8eIi2M.cjs → AppButtonCopy-JrQC5IrK.cjs} +1 -1
- package/dist/{AppButtonCopy-D9TaXIVi.js → AppButtonCopy-Y7i6QHyM.js} +1 -1
- package/dist/{AppSelect-Cb4FT_Wi.js → AppSelect-7xqklHM8.js} +4 -4
- package/dist/{AppSelect-Du-aSLls.cjs → AppSelect-BTVee6Tm.cjs} +1 -1
- package/dist/BottomSheet-1Ao1MaJs.js +112 -0
- package/dist/BottomSheet-CVT8fFEM.cjs +1 -0
- package/dist/{DropdownButton-D_33w-u2.js → DropdownButton-BJlkURzy.js} +3 -3
- package/dist/{DropdownButton-BoXskk4P.cjs → DropdownButton-CIK2EPft.cjs} +1 -1
- package/dist/{QDialog-CkO3OUm8.cjs → QDialog-DhVqrVMM.cjs} +1 -1
- package/dist/{QDialog-CDdHjXDm.js → QDialog-KSPssqyk.js} +2 -2
- package/dist/{QMenu-Dh7OV5SA.cjs → QMenu-5lCudhU5.cjs} +1 -1
- package/dist/{QMenu-igSBLsNd.js → QMenu-DUIzGTyQ.js} +2 -2
- package/dist/{escape-key-WGUAB0YL.cjs → escape-key-Drb4Wpmy.cjs} +1 -1
- package/dist/{escape-key-D7SYQkZP.js → escape-key-uN9hae3U.js} +1 -1
- package/dist/{index-BOwlbaKH.cjs → index-DCu8-BqP.cjs} +1 -1
- package/dist/{index-DAWgxISV.js → index-DvR38daU.js} +4 -4
- package/dist/style.css +1 -1
- package/dist/types/components/menu/BottomSheet/types.d.ts +1 -0
- package/dist/uikit.cjs +1 -1
- package/dist/uikit.es.js +1 -1
- package/package.json +1 -1
- package/dist/BottomSheet-A9-1h1PQ.js +0 -107
- package/dist/BottomSheet-DzQMqJWl.cjs +0 -1
|
@@ -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-CDdHjXDm.js";
|
|
3
|
-
import { F as R, b as T, _ as U } from "./index-DAWgxISV.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(10px)",
|
|
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-93091b8e"]]);
|
|
105
|
-
export {
|
|
106
|
-
L as default
|
|
107
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),B=require("./QDialog-CkO3OUm8.cjs"),i=require("./index-BOwlbaKH.cjs"),S={key:0,class:"bottom-sheet__title"},k={class:"bottom-sheet__body"},P={key:0,class:"bottom-sheet__loading"},N=e.defineComponent({__name:"BottomSheet",props:e.mergeModels({modelValue:{type:Boolean},title:{},loading:{type:Boolean},persistent:{type:Boolean},maxHeight:{default:"95vh"},glass:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:e.mergeModels(["hide","beforeShow"],["update:modelValue"]),setup(d,{emit:h}){const g=d,a=e.useModel(d,"modelValue"),u=h,c=e.ref(null),l=e.ref(!1),n=e.ref(0);let m=0,s=null;const b=e.computed(()=>({maxHeight:g.maxHeight,transform:n.value?`translateY(${n.value}px)`:void 0})),p=()=>a.value=!1,y=t=>{if(t.target.closest(".bottom-sheet__close"))return;s=t.pointerId,m=t.clientY,l.value=!0;const o=t.currentTarget;typeof o.setPointerCapture=="function"&&o.setPointerCapture(t.pointerId)},_=t=>{!l.value||t.pointerId!==s||(n.value=Math.max(0,t.clientY-m))},f=t=>{var v;if(!l.value||t.pointerId!==s)return;l.value=!1,s=null;const o=((v=c.value)==null?void 0:v.offsetHeight)??0,r=Math.min(120,o*.25||120);if(n.value>r){p();return}n.value=0,u("hide")},V=()=>{l.value=!1,s=null,n.value=0};return(t,o)=>(e.openBlock(),e.createBlock(e.unref(B.QDialog),{modelValue:a.value,"onUpdate:modelValue":o[0]||(o[0]=r=>a.value=r),position:"bottom",persistent:t.persistent,class:"bottom-sheet-dialog","backdrop-filter":"blur(10px)",onHide:V,onBeforeShow:o[1]||(o[1]=r=>u("beforeShow"))},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"sheetRef",ref:c,class:e.normalizeClass(["bottom-sheet",{"bottom-sheet_dragging":l.value,"bottom-sheet_glass":t.glass}]),style:e.normalizeStyle(b.value)},[e.createElementVNode("div",{class:"bottom-sheet__header",onPointerdown:y,onPointermove:_,onPointerup:f,onPointercancel:f},[o[2]||(o[2]=e.createElementVNode("div",{class:"bottom-sheet__grabber"},null,-1)),e.createElementVNode("div",null,[e.renderSlot(t.$slots,"header",{},void 0,!0)]),t.title?(e.openBlock(),e.createElementBlock("div",S,[e.createTextVNode(e.toDisplayString(t.title),1),e.renderSlot(t.$slots,"title",{},void 0,!0)])):e.createCommentVNode("",!0),e.createVNode(i.CloseButton,{class:"bottom-sheet__close",size:"xl",onClick:p})],32),e.createElementVNode("div",k,[t.loading?(e.openBlock(),e.createElementBlock("div",P,[e.createVNode(e.unref(i.QSpinner),{size:"40px",color:"primary"})])):e.renderSlot(t.$slots,"default",{key:1},void 0,!0)])],6)]),_:3},8,["modelValue","persistent"]))}}),C=i._export_sfc(N,[["__scopeId","data-v-93091b8e"]]);exports.default=C;
|