@balikjs/mobile 0.1.10 → 0.1.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/BackToTop/BackToTop.module.css.js +1 -1
- package/dist/BottomNavigation/BottomNavigation.module.css.js +6 -6
- package/dist/BottomSheet/BottomSheet.js +55 -83
- package/dist/BottomSheet/BottomSheet.module.css.js +13 -19
- package/dist/Card/Card.module.css.js +1 -1
- package/dist/Checkbox/Checkbox.module.css.js +18 -18
- package/dist/Clipboard/Clipboard.js +31 -26
- package/dist/CloseButton/CloseButton.module.css.js +8 -8
- package/dist/Confirm/Confirm.js +31 -24
- package/dist/DatePicker/DatePicker.module.css.js +21 -21
- package/dist/Dialog/Dialog.js +76 -60
- package/dist/Dialog/Dialog.module.css.js +18 -16
- package/dist/Drawer/Drawer.module.css.js +10 -10
- package/dist/FileUpload/FileUpload.module.css.js +24 -24
- package/dist/FilterGroup/FilterGroup.module.css.js +17 -17
- package/dist/Input/Input.module.css.js +24 -24
- package/dist/Pagination/Pagination.module.css.js +4 -4
- package/dist/Picker/Picker.module.css.js +8 -8
- package/dist/PickerView/PickerView.module.css.js +16 -16
- package/dist/PinInput/PinInput.module.css.js +14 -14
- package/dist/Popover/Popover.module.css.js +1 -1
- package/dist/Progress/Progress.module.css.js +10 -10
- package/dist/RadioGroup/Radio.module.css.js +12 -12
- package/dist/Select/Select.module.css.js +24 -24
- package/dist/SelectPc/SelectPc.module.css.js +20 -20
- package/dist/SignaturePad/SignaturePad.js +116 -0
- package/dist/SignaturePad/SignaturePad.module.css.js +15 -0
- package/dist/Steps/Steps.module.css.js +18 -18
- package/dist/StickyHeader/StickyHeader.module.css.js +2 -2
- package/dist/Switch/Switch.module.css.js +20 -20
- package/dist/Tabs/Tabs.module.css.js +8 -8
- package/dist/Textarea/Textarea.module.css.js +16 -16
- package/dist/Toast/Toast.module.css.js +26 -26
- package/dist/Toggle/Toggle.module.css.js +1 -1
- package/dist/ToggleGroup/ToggleGroup.module.css.js +13 -13
- package/dist/index.js +143 -135
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const o = "
|
|
1
|
+
const o = "_root_sjvh2_1", t = "_item_sjvh2_15", s = "_icon_sjvh2_40", _ = "_label_sjvh2_54", e = {
|
|
2
2
|
root: o,
|
|
3
3
|
item: t,
|
|
4
|
-
icon:
|
|
5
|
-
label:
|
|
4
|
+
icon: s,
|
|
5
|
+
label: _
|
|
6
6
|
};
|
|
7
7
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
e as default,
|
|
9
|
+
s as icon,
|
|
10
10
|
t as item,
|
|
11
|
-
|
|
11
|
+
_ as label,
|
|
12
12
|
o as root
|
|
13
13
|
};
|
|
@@ -1,120 +1,92 @@
|
|
|
1
|
-
import { createComponent as
|
|
2
|
-
import { splitProps as
|
|
3
|
-
import { bem as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { useScrollLock as
|
|
6
|
-
import
|
|
7
|
-
var
|
|
8
|
-
const
|
|
1
|
+
import { createComponent as T, Portal as L, effect as b, className as c, setAttribute as k, insert as _, memo as R, template as C, use as G, delegateEvents as I } from "solid-js/web";
|
|
2
|
+
import { splitProps as w, mergeProps as N, createSignal as U, createEffect as x, on as F } from "solid-js";
|
|
3
|
+
import { bem as H } from "../utils/bem.js";
|
|
4
|
+
import { cn as g } from "../utils/cn.js";
|
|
5
|
+
import { useScrollLock as M } from "../utils/useScrollLock.js";
|
|
6
|
+
import s from "./BottomSheet.module.css.js";
|
|
7
|
+
var V = /* @__PURE__ */ C("<div data-part=backdrop>"), j = /* @__PURE__ */ C("<div role=dialog aria-modal=true aria-label=BottomSheet><div data-part=content>"), q = /* @__PURE__ */ C("<div data-part=grabber><div>");
|
|
8
|
+
const z = {
|
|
9
9
|
dismissible: !0,
|
|
10
10
|
backdropBlur: !0,
|
|
11
11
|
draggable: !0
|
|
12
|
-
},
|
|
13
|
-
function ne(
|
|
14
|
-
const [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
m.style.transform = `translateY(${o}px)`;
|
|
29
|
-
}, E = (e) => {
|
|
30
|
-
S(!1), m.style.transform = "", e && k({
|
|
12
|
+
}, J = 0.3, K = 0.5, Q = 3;
|
|
13
|
+
function ne(y) {
|
|
14
|
+
const [r] = w(N(z, y), ["open", "onOpen", "onClose", "onOpenChange", "dismissible", "draggable", "backdropBlur", "class", "contentClass", "children"]);
|
|
15
|
+
let l;
|
|
16
|
+
const [d, h] = U(!1);
|
|
17
|
+
let $ = 0, m = 0, v = 0, u = 0, f = 0;
|
|
18
|
+
const B = (e) => {
|
|
19
|
+
e.currentTarget.setPointerCapture(e.pointerId), $ = v = e.clientY, u = e.timeStamp, f = 0, m = 0, h(!0);
|
|
20
|
+
}, Y = (e) => {
|
|
21
|
+
if (!d()) return;
|
|
22
|
+
const t = e.clientY - $, o = e.timeStamp - u;
|
|
23
|
+
o > 0 && (f = (e.clientY - v) / o), v = e.clientY, u = e.timeStamp, m = t;
|
|
24
|
+
const n = t >= 0 ? t : t / Q;
|
|
25
|
+
l.style.transform = `translateY(${n}px)`;
|
|
26
|
+
}, O = (e) => {
|
|
27
|
+
h(!1), l.style.transform = "", e && S({
|
|
31
28
|
open: !1
|
|
32
29
|
});
|
|
33
|
-
},
|
|
34
|
-
if (!
|
|
35
|
-
const e =
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
var
|
|
41
|
-
(
|
|
30
|
+
}, A = () => {
|
|
31
|
+
if (!d()) return;
|
|
32
|
+
const e = l.offsetHeight || 1, t = m > e * J, o = m > 0 && f > K;
|
|
33
|
+
O(r.dismissible && (t || o));
|
|
34
|
+
}, D = () => {
|
|
35
|
+
d() && O(!1);
|
|
36
|
+
}, S = (e) => {
|
|
37
|
+
var t;
|
|
38
|
+
(t = r.onOpenChange) == null || t.call(r, e);
|
|
42
39
|
};
|
|
43
|
-
return
|
|
44
|
-
var
|
|
45
|
-
e ? (
|
|
40
|
+
return M(() => r.open), x(F(() => r.open, (e) => {
|
|
41
|
+
var t, o;
|
|
42
|
+
e ? (t = r.onOpen) == null || t.call(r) : (o = r.onClose) == null || o.call(r);
|
|
46
43
|
}, {
|
|
47
44
|
defer: !0
|
|
48
|
-
})),
|
|
45
|
+
})), T(L, {
|
|
49
46
|
get mount() {
|
|
50
47
|
return document.body;
|
|
51
48
|
},
|
|
52
49
|
get children() {
|
|
53
50
|
return [(() => {
|
|
54
|
-
var e =
|
|
51
|
+
var e = V();
|
|
55
52
|
return e.$$click = () => {
|
|
56
|
-
|
|
53
|
+
r.dismissible && S({
|
|
57
54
|
open: !1
|
|
58
55
|
});
|
|
59
|
-
},
|
|
60
|
-
var
|
|
61
|
-
return
|
|
56
|
+
}, b((t) => {
|
|
57
|
+
var o = g(s.backdrop, r.backdropBlur && s.blurred), n = r.open ? "" : void 0;
|
|
58
|
+
return o !== t.e && c(e, t.e = o), n !== t.t && k(e, "data-open", t.t = n), t;
|
|
62
59
|
}, {
|
|
63
60
|
e: void 0,
|
|
64
61
|
t: void 0
|
|
65
62
|
}), e;
|
|
66
63
|
})(), (() => {
|
|
67
|
-
var e =
|
|
68
|
-
return typeof
|
|
69
|
-
var
|
|
70
|
-
return () =>
|
|
71
|
-
var a =
|
|
72
|
-
return a.addEventListener("pointercancel",
|
|
73
|
-
var
|
|
74
|
-
return
|
|
64
|
+
var e = j(), t = e.firstChild, o = l;
|
|
65
|
+
return typeof o == "function" ? G(o, e) : l = e, _(e, (() => {
|
|
66
|
+
var n = R(() => !!r.draggable);
|
|
67
|
+
return () => n() && (() => {
|
|
68
|
+
var a = q(), p = a.firstChild;
|
|
69
|
+
return a.addEventListener("pointercancel", D), a.$$pointerup = A, a.$$pointermove = Y, a.$$pointerdown = B, b((i) => {
|
|
70
|
+
var E = s.grabberArea, P = s.grabber;
|
|
71
|
+
return E !== i.e && c(a, i.e = E), P !== i.t && c(p, i.t = P), i;
|
|
75
72
|
}, {
|
|
76
73
|
e: void 0,
|
|
77
74
|
t: void 0
|
|
78
75
|
}), a;
|
|
79
76
|
})();
|
|
80
|
-
})(),
|
|
81
|
-
var
|
|
82
|
-
return ()
|
|
83
|
-
var a = J(), v = a.firstChild;
|
|
84
|
-
return c(v, () => t.title), f((n) => {
|
|
85
|
-
var d = l.header, p = l.title;
|
|
86
|
-
return d !== n.e && s(a, n.e = d), p !== n.t && s(v, n.t = p), n;
|
|
87
|
-
}, {
|
|
88
|
-
e: void 0,
|
|
89
|
-
t: void 0
|
|
90
|
-
}), a;
|
|
91
|
-
})();
|
|
92
|
-
})(), r), c(e, (() => {
|
|
93
|
-
var o = h(() => !!(t.footerPlacement === "top" && t.footer));
|
|
94
|
-
return () => o() && (() => {
|
|
95
|
-
var a = B();
|
|
96
|
-
return c(a, () => t.footer), f(() => s(a, C(l.footer, t.footerClass))), a;
|
|
97
|
-
})();
|
|
98
|
-
})(), r), c(r, () => t.children), c(e, (() => {
|
|
99
|
-
var o = h(() => !!(t.footerPlacement !== "top" && t.footer));
|
|
100
|
-
return () => o() && (() => {
|
|
101
|
-
var a = B();
|
|
102
|
-
return c(a, () => t.footer), f(() => s(a, C(l.footer, t.footerClass))), a;
|
|
103
|
-
})();
|
|
104
|
-
})(), null), f((o) => {
|
|
105
|
-
var a = C(M(), l.sheet, b() && l.dragging, t.class), v = t.open ? "" : void 0, n = t.title || "BottomSheet", d = l.body;
|
|
106
|
-
return a !== o.e && s(e, o.e = a), v !== o.t && O(e, "data-open", o.t = v), n !== o.a && O(e, "aria-label", o.a = n), d !== o.o && s(r, o.o = d), o;
|
|
77
|
+
})(), t), _(t, () => r.children), b((n) => {
|
|
78
|
+
var a = g(H(), s.sheet, d() && s.dragging, r.class), p = r.open ? "" : void 0, i = g(s.content, r.contentClass);
|
|
79
|
+
return a !== n.e && c(e, n.e = a), p !== n.t && k(e, "data-open", n.t = p), i !== n.a && c(t, n.a = i), n;
|
|
107
80
|
}, {
|
|
108
81
|
e: void 0,
|
|
109
82
|
t: void 0,
|
|
110
|
-
a: void 0
|
|
111
|
-
o: void 0
|
|
83
|
+
a: void 0
|
|
112
84
|
}), e;
|
|
113
85
|
})()];
|
|
114
86
|
}
|
|
115
87
|
});
|
|
116
88
|
}
|
|
117
|
-
|
|
89
|
+
I(["click", "pointerdown", "pointermove", "pointerup"]);
|
|
118
90
|
export {
|
|
119
91
|
ne as BottomSheet
|
|
120
92
|
};
|
|
@@ -1,25 +1,19 @@
|
|
|
1
|
-
const
|
|
2
|
-
backdrop:
|
|
3
|
-
blurred:
|
|
1
|
+
const r = "_backdrop_zak2p_1", a = "_blurred_zak2p_11", e = "_sheet_zak2p_22", _ = "_dragging_zak2p_52", t = "_grabberArea_zak2p_70", b = "_grabber_zak2p_70", n = "_content_zak2p_96", g = {
|
|
2
|
+
backdrop: r,
|
|
3
|
+
blurred: a,
|
|
4
4
|
sheet: e,
|
|
5
5
|
dragging: _,
|
|
6
|
-
grabberArea:
|
|
7
|
-
grabber:
|
|
8
|
-
|
|
9
|
-
title: a,
|
|
10
|
-
body: s,
|
|
11
|
-
footer: d
|
|
6
|
+
grabberArea: t,
|
|
7
|
+
grabber: b,
|
|
8
|
+
content: n
|
|
12
9
|
};
|
|
13
10
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
r as backdrop,
|
|
12
|
+
a as blurred,
|
|
13
|
+
n as content,
|
|
14
|
+
g as default,
|
|
18
15
|
_ as dragging,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
b as header,
|
|
23
|
-
e as sheet,
|
|
24
|
-
a as title
|
|
16
|
+
b as grabber,
|
|
17
|
+
t as grabberArea,
|
|
18
|
+
e as sheet
|
|
25
19
|
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
const
|
|
2
|
-
root:
|
|
3
|
-
control:
|
|
4
|
-
indicator:
|
|
5
|
-
label:
|
|
6
|
-
sizeXs:
|
|
7
|
-
sizeSm:
|
|
8
|
-
sizeMd:
|
|
1
|
+
const o = "_root_1e8og_1", e = "_control_1e8og_16", s = "_indicator_1e8og_66", _ = "_label_1e8og_78", i = "_sizeXs_1e8og_90", t = "_sizeSm_1e8og_100", n = "_sizeMd_1e8og_110", c = "_sizeLg_1e8og_120", z = "_sizeXl_1e8og_130", l = "_size2xl_1e8og_140", g = "_rounded_1e8og_150", d = {
|
|
2
|
+
root: o,
|
|
3
|
+
control: e,
|
|
4
|
+
indicator: s,
|
|
5
|
+
label: _,
|
|
6
|
+
sizeXs: i,
|
|
7
|
+
sizeSm: t,
|
|
8
|
+
sizeMd: n,
|
|
9
9
|
sizeLg: c,
|
|
10
10
|
sizeXl: z,
|
|
11
11
|
size2xl: l,
|
|
12
|
-
rounded:
|
|
12
|
+
rounded: g
|
|
13
13
|
};
|
|
14
14
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
e as control,
|
|
16
|
+
d as default,
|
|
17
|
+
s as indicator,
|
|
18
|
+
_ as label,
|
|
19
|
+
o as root,
|
|
20
|
+
g as rounded,
|
|
21
21
|
l as size2xl,
|
|
22
22
|
c as sizeLg,
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
n as sizeMd,
|
|
24
|
+
t as sizeSm,
|
|
25
25
|
z as sizeXl,
|
|
26
|
-
|
|
26
|
+
i as sizeXs
|
|
27
27
|
};
|
|
@@ -1,58 +1,63 @@
|
|
|
1
|
-
import { spread as
|
|
2
|
-
import { splitProps as
|
|
3
|
-
import { Check as
|
|
4
|
-
import { bem as
|
|
5
|
-
import { cn as
|
|
1
|
+
import { spread as g, mergeProps as b, insert as c, memo as f, createComponent as p, template as y } from "solid-js/web";
|
|
2
|
+
import { splitProps as C, mergeProps as h, createSignal as v, onCleanup as x } from "solid-js";
|
|
3
|
+
import { Check as z, Copy as T } from "lucide-solid";
|
|
4
|
+
import { bem as P } from "../utils/bem.js";
|
|
5
|
+
import { cn as R } from "../utils/cn.js";
|
|
6
6
|
import t from "./Clipboard.module.css.js";
|
|
7
|
-
var
|
|
8
|
-
const
|
|
7
|
+
var k = /* @__PURE__ */ y("<button>");
|
|
8
|
+
const w = {
|
|
9
9
|
xs: t.sizeXs,
|
|
10
10
|
sm: t.sizeSm,
|
|
11
11
|
md: t.sizeMd,
|
|
12
12
|
lg: t.sizeLg,
|
|
13
13
|
xl: t.sizeXl
|
|
14
|
-
},
|
|
14
|
+
}, S = {
|
|
15
15
|
size: "md",
|
|
16
16
|
copiedDuration: 2e3,
|
|
17
17
|
toastOnCopy: !1
|
|
18
18
|
};
|
|
19
|
-
function L(
|
|
20
|
-
const [o,
|
|
21
|
-
let
|
|
22
|
-
const
|
|
19
|
+
function L(d) {
|
|
20
|
+
const [o, m] = C(h(S, d), ["value", "size", "class", "copiedDuration", "toastOnCopy", "children"]), [r, i] = v(!1);
|
|
21
|
+
let a = null;
|
|
22
|
+
const u = async () => {
|
|
23
|
+
var e;
|
|
23
24
|
try {
|
|
24
|
-
await navigator.clipboard.writeText(o.value);
|
|
25
|
+
(e = navigator.clipboard) != null && e.writeText ? await navigator.clipboard.writeText(o.value) : s();
|
|
25
26
|
} catch {
|
|
26
|
-
|
|
27
|
-
e.value = o.value, e.style.position = "fixed", e.style.opacity = "0", document.body.appendChild(e), e.select(), document.execCommand("copy"), document.body.removeChild(e);
|
|
27
|
+
s();
|
|
28
28
|
}
|
|
29
|
-
i(!0), clearTimeout(
|
|
29
|
+
i(!0), clearTimeout(a), a = setTimeout(() => i(!1), o.copiedDuration);
|
|
30
|
+
}, s = () => {
|
|
31
|
+
const e = document.createElement("textarea");
|
|
32
|
+
e.value = o.value, e.setAttribute("readonly", ""), e.style.cssText = "position:fixed;top:0;left:0;width:2px;height:2px;padding:0;border:none;outline:none;box-shadow:none;background:transparent;opacity:0;pointer-events:none", document.body.appendChild(e);
|
|
33
|
+
const n = document.getSelection(), l = n && n.rangeCount > 0 ? n.getRangeAt(0) : null;
|
|
34
|
+
e.select(), e.setSelectionRange(0, o.value.length), document.execCommand("copy"), document.body.removeChild(e), l && n && (n.removeAllRanges(), n.addRange(l));
|
|
30
35
|
};
|
|
31
|
-
return
|
|
32
|
-
var e =
|
|
33
|
-
return
|
|
36
|
+
return x(() => clearTimeout(a)), (() => {
|
|
37
|
+
var e = k();
|
|
38
|
+
return g(e, b(m, {
|
|
34
39
|
type: "button",
|
|
35
40
|
"data-part": "root",
|
|
36
|
-
onClick:
|
|
41
|
+
onClick: u,
|
|
37
42
|
get class() {
|
|
38
|
-
return P(
|
|
43
|
+
return R(P("balik-clipboard", o.size), t.base, w[o.size], r() && t.copied, o.class);
|
|
39
44
|
}
|
|
40
|
-
}), !1, !0),
|
|
41
|
-
var
|
|
42
|
-
return () =>
|
|
45
|
+
}), !1, !0), c(e, (() => {
|
|
46
|
+
var n = f(() => !!r());
|
|
47
|
+
return () => n() ? p(z, {
|
|
43
48
|
"aria-hidden": "true",
|
|
44
49
|
get class() {
|
|
45
50
|
return t.icon;
|
|
46
51
|
},
|
|
47
52
|
"data-part": "icon"
|
|
48
|
-
}) :
|
|
53
|
+
}) : p(T, {
|
|
49
54
|
"aria-hidden": "true",
|
|
50
55
|
get class() {
|
|
51
56
|
return t.icon;
|
|
52
57
|
},
|
|
53
58
|
"data-part": "icon"
|
|
54
59
|
});
|
|
55
|
-
})(), null),
|
|
60
|
+
})(), null), c(e, () => o.children, null), e;
|
|
56
61
|
})();
|
|
57
62
|
}
|
|
58
63
|
export {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
const s = "
|
|
1
|
+
const s = "_base_r7pou_1", e = "_sizeXs_r7pou_38", _ = "_sizeSm_r7pou_49", o = "_sizeMd_r7pou_59", i = "_sizeLg_r7pou_69", z = "_sizeXl_r7pou_79", n = "_size2xl_r7pou_89", r = "_rounded_r7pou_99", t = {
|
|
2
2
|
base: s,
|
|
3
3
|
sizeXs: e,
|
|
4
4
|
sizeSm: _,
|
|
5
|
-
sizeMd:
|
|
5
|
+
sizeMd: o,
|
|
6
6
|
sizeLg: i,
|
|
7
7
|
sizeXl: z,
|
|
8
|
-
size2xl:
|
|
9
|
-
rounded:
|
|
8
|
+
size2xl: n,
|
|
9
|
+
rounded: r
|
|
10
10
|
};
|
|
11
11
|
export {
|
|
12
12
|
s as base,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
t as default,
|
|
14
|
+
r as rounded,
|
|
15
|
+
n as size2xl,
|
|
16
16
|
i as sizeLg,
|
|
17
|
-
|
|
17
|
+
o as sizeMd,
|
|
18
18
|
_ as sizeSm,
|
|
19
19
|
z as sizeXl,
|
|
20
20
|
e as sizeXs
|
package/dist/Confirm/Confirm.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { createComponent as f, render as p, memo as h } from "solid-js/web";
|
|
2
2
|
import { splitProps as b, mergeProps as L, createRoot as w, createSignal as E, Show as v } from "solid-js";
|
|
3
|
-
import { Dialog as
|
|
4
|
-
import
|
|
3
|
+
import { Dialog as g } from "../Dialog/Dialog.js";
|
|
4
|
+
import s from "./Confirm.module.css.js";
|
|
5
5
|
const y = {
|
|
6
6
|
mode: "sheet",
|
|
7
|
+
title: "Confirm",
|
|
7
8
|
confirmLabel: "Confirm",
|
|
8
9
|
cancelLabel: "Cancel",
|
|
9
10
|
danger: !1,
|
|
10
11
|
loading: !1
|
|
11
12
|
};
|
|
12
|
-
function d(
|
|
13
|
-
const [e] = b(L(y,
|
|
14
|
-
return f(
|
|
13
|
+
function d(o) {
|
|
14
|
+
const [e] = b(L(y, o), ["mode", "open", "onOpenChange", "title", "confirmLabel", "cancelLabel", "danger", "loading", "onConfirm", "onCancel", "class", "children"]), r = !!e.onCancel;
|
|
15
|
+
return f(g, {
|
|
15
16
|
get mode() {
|
|
16
17
|
return e.mode;
|
|
17
18
|
},
|
|
@@ -22,6 +23,9 @@ function d(t) {
|
|
|
22
23
|
return e.onOpenChange;
|
|
23
24
|
},
|
|
24
25
|
closeable: !1,
|
|
26
|
+
get title() {
|
|
27
|
+
return e.title;
|
|
28
|
+
},
|
|
25
29
|
showCancel: r,
|
|
26
30
|
showConfirm: !0,
|
|
27
31
|
get cancelLabel() {
|
|
@@ -43,7 +47,7 @@ function d(t) {
|
|
|
43
47
|
return e.onCancel;
|
|
44
48
|
},
|
|
45
49
|
get footerClass() {
|
|
46
|
-
return r ? void 0 :
|
|
50
|
+
return r ? void 0 : s.footerCenter;
|
|
47
51
|
},
|
|
48
52
|
get class() {
|
|
49
53
|
return e.class;
|
|
@@ -53,22 +57,22 @@ function d(t) {
|
|
|
53
57
|
}
|
|
54
58
|
});
|
|
55
59
|
}
|
|
56
|
-
let i = null,
|
|
60
|
+
let i = null, t = null, m = null;
|
|
57
61
|
function S() {
|
|
58
62
|
if (m) return;
|
|
59
|
-
const
|
|
60
|
-
document.body.appendChild(
|
|
63
|
+
const o = document.createElement("div");
|
|
64
|
+
document.body.appendChild(o), w(() => {
|
|
61
65
|
const [e, r] = E(null);
|
|
62
66
|
m = r;
|
|
63
67
|
const c = (n) => {
|
|
64
68
|
const u = e();
|
|
65
69
|
if (n.prev) return;
|
|
66
|
-
const l = i, a =
|
|
67
|
-
if (i = null,
|
|
70
|
+
const l = i, a = t;
|
|
71
|
+
if (i = null, t = null, n.type === "confirm")
|
|
68
72
|
l == null || l();
|
|
69
73
|
else {
|
|
70
|
-
const
|
|
71
|
-
|
|
74
|
+
const C = new Error("Cancel");
|
|
75
|
+
C.code = "CANCEL", a == null || a(C);
|
|
72
76
|
}
|
|
73
77
|
r({
|
|
74
78
|
...u,
|
|
@@ -79,7 +83,7 @@ function S() {
|
|
|
79
83
|
get when() {
|
|
80
84
|
return e();
|
|
81
85
|
},
|
|
82
|
-
children: (n) => f(
|
|
86
|
+
children: (n) => f(g, {
|
|
83
87
|
get mode() {
|
|
84
88
|
return n().mode || "sheet";
|
|
85
89
|
},
|
|
@@ -87,6 +91,9 @@ function S() {
|
|
|
87
91
|
return n().open;
|
|
88
92
|
},
|
|
89
93
|
closeable: !1,
|
|
94
|
+
get title() {
|
|
95
|
+
return n().title || "Confirm";
|
|
96
|
+
},
|
|
90
97
|
get showCancel() {
|
|
91
98
|
return !n().noCancel;
|
|
92
99
|
},
|
|
@@ -101,7 +108,7 @@ function S() {
|
|
|
101
108
|
return n().danger;
|
|
102
109
|
},
|
|
103
110
|
get footerClass() {
|
|
104
|
-
return h(() => !!n().noCancel)() ?
|
|
111
|
+
return h(() => !!n().noCancel)() ? s.footerCenter : void 0;
|
|
105
112
|
},
|
|
106
113
|
onConfirm: () => c({
|
|
107
114
|
type: "confirm",
|
|
@@ -113,11 +120,11 @@ function S() {
|
|
|
113
120
|
}),
|
|
114
121
|
onOpenChange: (u) => {
|
|
115
122
|
if (!u.open) {
|
|
116
|
-
if (
|
|
123
|
+
if (t) {
|
|
117
124
|
const l = new Error("Cancel");
|
|
118
125
|
l.code = "CANCEL";
|
|
119
|
-
const a =
|
|
120
|
-
i = null,
|
|
126
|
+
const a = t;
|
|
127
|
+
i = null, t = null, a(l);
|
|
121
128
|
}
|
|
122
129
|
r(null);
|
|
123
130
|
}
|
|
@@ -126,16 +133,16 @@ function S() {
|
|
|
126
133
|
return n().children;
|
|
127
134
|
}
|
|
128
135
|
})
|
|
129
|
-
}),
|
|
136
|
+
}), o);
|
|
130
137
|
});
|
|
131
138
|
}
|
|
132
|
-
d.confirm = (
|
|
133
|
-
if (
|
|
139
|
+
d.confirm = (o = {}) => (S(), new Promise((e, r) => {
|
|
140
|
+
if (t) {
|
|
134
141
|
const c = new Error("Superseded by a newer confirm()");
|
|
135
|
-
c.code = "CANCEL",
|
|
142
|
+
c.code = "CANCEL", t(c);
|
|
136
143
|
}
|
|
137
|
-
i = e,
|
|
138
|
-
...
|
|
144
|
+
i = e, t = r, m({
|
|
145
|
+
...o,
|
|
139
146
|
open: !0
|
|
140
147
|
});
|
|
141
148
|
}));
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
const e = "
|
|
1
|
+
const e = "_trigger_1c0a3_1", r = "_triggerDisabled_1c0a3_33", t = "_triggerText_1c0a3_40", c = "_triggerPlaceholder_1c0a3_48", _ = "_triggerIcon_1c0a3_52", a = "_pickerBody_1c0a3_61", g = "_sheet_1c0a3_68", o = "_header_1c0a3_72", s = "_headerTitle_1c0a3_85", i = "_headerButton_1c0a3_101", d = "_columns_1c0a3_112", n = "_weekday_1c0a3_116", l = {
|
|
2
2
|
trigger: e,
|
|
3
|
-
triggerDisabled:
|
|
4
|
-
triggerText:
|
|
5
|
-
triggerPlaceholder:
|
|
3
|
+
triggerDisabled: r,
|
|
4
|
+
triggerText: t,
|
|
5
|
+
triggerPlaceholder: c,
|
|
6
6
|
triggerIcon: _,
|
|
7
|
-
pickerBody:
|
|
8
|
-
sheet:
|
|
9
|
-
header:
|
|
10
|
-
headerTitle:
|
|
11
|
-
headerButton:
|
|
12
|
-
columns:
|
|
13
|
-
weekday:
|
|
7
|
+
pickerBody: a,
|
|
8
|
+
sheet: g,
|
|
9
|
+
header: o,
|
|
10
|
+
headerTitle: s,
|
|
11
|
+
headerButton: i,
|
|
12
|
+
columns: d,
|
|
13
|
+
weekday: n
|
|
14
14
|
};
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
d as columns,
|
|
17
17
|
l as default,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
o as header,
|
|
19
|
+
i as headerButton,
|
|
20
|
+
s as headerTitle,
|
|
21
|
+
a as pickerBody,
|
|
22
|
+
g as sheet,
|
|
23
23
|
e as trigger,
|
|
24
|
-
|
|
24
|
+
r as triggerDisabled,
|
|
25
25
|
_ as triggerIcon,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
c as triggerPlaceholder,
|
|
27
|
+
t as triggerText,
|
|
28
|
+
n as weekday
|
|
29
29
|
};
|