@balikjs/mobile 0.1.9 → 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.
Files changed (38) hide show
  1. package/dist/BackToTop/BackToTop.module.css.js +1 -1
  2. package/dist/BottomNavigation/BottomNavigation.module.css.js +6 -6
  3. package/dist/BottomSheet/BottomSheet.js +55 -83
  4. package/dist/BottomSheet/BottomSheet.module.css.js +13 -19
  5. package/dist/Card/Card.module.css.js +1 -1
  6. package/dist/Checkbox/Checkbox.module.css.js +18 -18
  7. package/dist/Clipboard/Clipboard.js +31 -26
  8. package/dist/CloseButton/CloseButton.module.css.js +8 -8
  9. package/dist/Confirm/Confirm.js +31 -24
  10. package/dist/DatePicker/DatePicker.module.css.js +21 -21
  11. package/dist/Dialog/Dialog.js +76 -60
  12. package/dist/Dialog/Dialog.module.css.js +18 -16
  13. package/dist/Drawer/Drawer.module.css.js +10 -10
  14. package/dist/FileUpload/FileUpload.module.css.js +24 -24
  15. package/dist/FilterGroup/FilterGroup.module.css.js +17 -17
  16. package/dist/Input/Input.module.css.js +24 -24
  17. package/dist/Pagination/Pagination.module.css.js +4 -4
  18. package/dist/Picker/Picker.module.css.js +8 -8
  19. package/dist/PickerView/PickerView.module.css.js +16 -16
  20. package/dist/PinInput/PinInput.module.css.js +14 -14
  21. package/dist/Popover/Popover.module.css.js +1 -1
  22. package/dist/Progress/Progress.module.css.js +10 -10
  23. package/dist/RadioGroup/Radio.module.css.js +12 -12
  24. package/dist/Select/Select.module.css.js +24 -24
  25. package/dist/SelectPc/SelectPc.module.css.js +20 -20
  26. package/dist/SignaturePad/SignaturePad.js +116 -0
  27. package/dist/SignaturePad/SignaturePad.module.css.js +15 -0
  28. package/dist/Steps/Steps.module.css.js +18 -18
  29. package/dist/StickyHeader/StickyHeader.module.css.js +2 -2
  30. package/dist/Switch/Switch.module.css.js +20 -20
  31. package/dist/Tabs/Tabs.module.css.js +8 -8
  32. package/dist/Textarea/Textarea.module.css.js +16 -16
  33. package/dist/Toast/Toast.module.css.js +26 -26
  34. package/dist/Toggle/Toggle.module.css.js +1 -1
  35. package/dist/ToggleGroup/ToggleGroup.module.css.js +13 -13
  36. package/dist/index.js +143 -135
  37. package/dist/styles.css +1 -1
  38. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- const s = "_base_132ju_1", e = "_visible_132ju_25", i = "_icon_132ju_40", _ = {
1
+ const s = "_base_10r9f_1", e = "_visible_10r9f_25", i = "_icon_10r9f_40", _ = {
2
2
  base: s,
3
3
  visible: e,
4
4
  icon: i
@@ -1,13 +1,13 @@
1
- const o = "_root_5mvh3_1", t = "_item_5mvh3_15", _ = "_icon_5mvh3_40", e = "_label_5mvh3_54", c = {
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: e
4
+ icon: s,
5
+ label: _
6
6
  };
7
7
  export {
8
- c as default,
9
- _ as icon,
8
+ e as default,
9
+ s as icon,
10
10
  t as item,
11
- e as label,
11
+ _ as label,
12
12
  o as root
13
13
  };
@@ -1,120 +1,92 @@
1
- import { createComponent as R, Portal as G, effect as f, className as s, setAttribute as O, insert as c, memo as h, template as u, use as I, delegateEvents as w } from "solid-js/web";
2
- import { splitProps as N, mergeProps as U, createSignal as x, createEffect as F, on as H } from "solid-js";
3
- import { bem as M } from "../utils/bem.js";
4
- import { cn as C } from "../utils/cn.js";
5
- import { useScrollLock as V } from "../utils/useScrollLock.js";
6
- import l from "./BottomSheet.module.css.js";
7
- var j = /* @__PURE__ */ u("<div data-part=backdrop>"), q = /* @__PURE__ */ u("<div role=dialog aria-modal=true data-part=sheet><div data-part=body>"), z = /* @__PURE__ */ u("<div data-part=grabber-area><div data-part=grabber>"), J = /* @__PURE__ */ u("<div data-part=header><h2 data-part=title>"), B = /* @__PURE__ */ u("<div data-part=footer>");
8
- const K = {
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
- }, Q = 0.3, W = 0.5, X = 3;
13
- function ne(Y) {
14
- const [t] = N(U({
15
- footerPlacement: "bottom",
16
- ...K
17
- }, Y), ["open", "onOpen", "onClose", "onOpenChange", "title", "dismissible", "draggable", "backdropBlur", "footer", "footerClass", "footerPlacement", "class", "children"]);
18
- let m;
19
- const [b, S] = x(!1);
20
- let y = 0, g = 0, $ = 0, _ = 0, P = 0;
21
- const A = (e) => {
22
- e.currentTarget.setPointerCapture(e.pointerId), y = $ = e.clientY, _ = e.timeStamp, P = 0, g = 0, S(!0);
23
- }, D = (e) => {
24
- if (!b()) return;
25
- const r = e.clientY - y, i = e.timeStamp - _;
26
- i > 0 && (P = (e.clientY - $) / i), $ = e.clientY, _ = e.timeStamp, g = r;
27
- const o = r >= 0 ? r : r / X;
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
- }, T = () => {
34
- if (!b()) return;
35
- const e = m.offsetHeight || 1, r = g > e * Q, i = g > 0 && P > W;
36
- E(t.dismissible && (r || i));
37
- }, L = () => {
38
- b() && E(!1);
39
- }, k = (e) => {
40
- var r;
41
- (r = t.onOpenChange) == null || r.call(t, e);
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 V(() => t.open), F(H(() => t.open, (e) => {
44
- var r, i;
45
- e ? (r = t.onOpen) == null || r.call(t) : (i = t.onClose) == null || i.call(t);
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
- })), R(G, {
45
+ })), T(L, {
49
46
  get mount() {
50
47
  return document.body;
51
48
  },
52
49
  get children() {
53
50
  return [(() => {
54
- var e = j();
51
+ var e = V();
55
52
  return e.$$click = () => {
56
- t.dismissible && k({
53
+ r.dismissible && S({
57
54
  open: !1
58
55
  });
59
- }, f((r) => {
60
- var i = C(l.backdrop, t.backdropBlur && l.blurred), o = t.open ? "" : void 0;
61
- return i !== r.e && s(e, r.e = i), o !== r.t && O(e, "data-open", r.t = o), r;
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 = q(), r = e.firstChild, i = m;
68
- return typeof i == "function" ? I(i, e) : m = e, c(e, (() => {
69
- var o = h(() => !!t.draggable);
70
- return () => o() && (() => {
71
- var a = z(), v = a.firstChild;
72
- return a.addEventListener("pointercancel", L), a.$$pointerup = T, a.$$pointermove = D, a.$$pointerdown = A, f((n) => {
73
- var d = l.grabberArea, p = l.grabber;
74
- return d !== n.e && s(a, n.e = d), p !== n.t && s(v, n.t = p), n;
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
- })(), r), c(e, (() => {
81
- var o = h(() => !!t.title);
82
- return () => o() && (() => {
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
- w(["click", "pointerdown", "pointermove", "pointerup"]);
89
+ I(["click", "pointerdown", "pointermove", "pointerup"]);
118
90
  export {
119
91
  ne as BottomSheet
120
92
  };
@@ -1,25 +1,19 @@
1
- const t = "_backdrop_9tgy4_1", r = "_blurred_9tgy4_11", e = "_sheet_9tgy4_22", _ = "_dragging_9tgy4_47", g = "_grabberArea_9tgy4_65", o = "_grabber_9tgy4_65", b = "_header_9tgy4_89", a = "_title_9tgy4_98", s = "_body_9tgy4_110", d = "_footer_9tgy4_125", c = {
2
- backdrop: t,
3
- blurred: r,
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: g,
7
- grabber: o,
8
- header: b,
9
- title: a,
10
- body: s,
11
- footer: d
6
+ grabberArea: t,
7
+ grabber: b,
8
+ content: n
12
9
  };
13
10
  export {
14
- t as backdrop,
15
- r as blurred,
16
- s as body,
17
- c as default,
11
+ r as backdrop,
12
+ a as blurred,
13
+ n as content,
14
+ g as default,
18
15
  _ as dragging,
19
- d as footer,
20
- o as grabber,
21
- g as grabberArea,
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,4 +1,4 @@
1
- const s = "_base_174ux_1", e = {
1
+ const s = "_base_clllx_1", e = {
2
2
  base: s
3
3
  };
4
4
  export {
@@ -1,27 +1,27 @@
1
- const s = "_root_18n31_1", _ = "_control_18n31_16", n = "_indicator_18n31_66", o = "_label_18n31_78", e = "_sizeXs_18n31_90", i = "_sizeSm_18n31_100", t = "_sizeMd_18n31_110", c = "_sizeLg_18n31_120", z = "_sizeXl_18n31_130", l = "_size2xl_18n31_140", d = "_rounded_18n31_150", r = {
2
- root: s,
3
- control: _,
4
- indicator: n,
5
- label: o,
6
- sizeXs: e,
7
- sizeSm: i,
8
- sizeMd: t,
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: d
12
+ rounded: g
13
13
  };
14
14
  export {
15
- _ as control,
16
- r as default,
17
- n as indicator,
18
- o as label,
19
- s as root,
20
- d as rounded,
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
- t as sizeMd,
24
- i as sizeSm,
23
+ n as sizeMd,
24
+ t as sizeSm,
25
25
  z as sizeXl,
26
- e as sizeXs
26
+ i as sizeXs
27
27
  };
@@ -1,58 +1,63 @@
1
- import { spread as d, mergeProps as u, insert as s, memo as y, createComponent as n, template as C } from "solid-js/web";
2
- import { splitProps as f, mergeProps as b, createSignal as g, onCleanup as z } from "solid-js";
3
- import { Check as h, Copy as v } from "lucide-solid";
4
- import { bem as x } from "../utils/bem.js";
5
- import { cn as P } from "../utils/cn.js";
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 T = /* @__PURE__ */ C("<button>");
8
- const D = {
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(l) {
20
- const [o, c] = f(b(_, l), ["value", "size", "class", "copiedDuration", "toastOnCopy", "children"]), [a, i] = g(!1);
21
- let r = null;
22
- const p = async () => {
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
- const e = document.createElement("textarea");
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(r), r = setTimeout(() => i(!1), o.copiedDuration);
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 z(() => clearTimeout(r)), (() => {
32
- var e = T();
33
- return d(e, u(c, {
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: p,
41
+ onClick: u,
37
42
  get class() {
38
- return P(x("balik-clipboard", o.size), t.base, D[o.size], a() && t.copied, o.class);
43
+ return R(P("balik-clipboard", o.size), t.base, w[o.size], r() && t.copied, o.class);
39
44
  }
40
- }), !1, !0), s(e, (() => {
41
- var m = y(() => !!a());
42
- return () => m() ? n(h, {
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
- }) : n(v, {
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), s(e, () => o.children, null), e;
60
+ })(), null), c(e, () => o.children, null), e;
56
61
  })();
57
62
  }
58
63
  export {
@@ -1,20 +1,20 @@
1
- const s = "_base_1satc_1", e = "_sizeXs_1satc_38", _ = "_sizeSm_1satc_49", t = "_sizeMd_1satc_59", i = "_sizeLg_1satc_69", z = "_sizeXl_1satc_79", c = "_size2xl_1satc_89", a = "_rounded_1satc_99", o = {
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: t,
5
+ sizeMd: o,
6
6
  sizeLg: i,
7
7
  sizeXl: z,
8
- size2xl: c,
9
- rounded: a
8
+ size2xl: n,
9
+ rounded: r
10
10
  };
11
11
  export {
12
12
  s as base,
13
- o as default,
14
- a as rounded,
15
- c as size2xl,
13
+ t as default,
14
+ r as rounded,
15
+ n as size2xl,
16
16
  i as sizeLg,
17
- t as sizeMd,
17
+ o as sizeMd,
18
18
  _ as sizeSm,
19
19
  z as sizeXl,
20
20
  e as sizeXs
@@ -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 C } from "../Dialog/Dialog.js";
4
- import g from "./Confirm.module.css.js";
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(t) {
13
- const [e] = b(L(y, t), ["mode", "open", "onOpenChange", "confirmLabel", "cancelLabel", "danger", "loading", "onConfirm", "onCancel", "class", "children"]), r = !!e.onCancel;
14
- return f(C, {
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 : g.footerCenter;
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, o = null, m = null;
60
+ let i = null, t = null, m = null;
57
61
  function S() {
58
62
  if (m) return;
59
- const t = document.createElement("div");
60
- document.body.appendChild(t), w(() => {
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 = o;
67
- if (i = null, o = null, n.type === "confirm")
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 s = new Error("Cancel");
71
- s.code = "CANCEL", a == null || a(s);
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(C, {
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)() ? g.footerCenter : void 0;
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 (o) {
123
+ if (t) {
117
124
  const l = new Error("Cancel");
118
125
  l.code = "CANCEL";
119
- const a = o;
120
- i = null, o = null, a(l);
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
- }), t);
136
+ }), o);
130
137
  });
131
138
  }
132
- d.confirm = (t = {}) => (S(), new Promise((e, r) => {
133
- if (o) {
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", o(c);
142
+ c.code = "CANCEL", t(c);
136
143
  }
137
- i = e, o = r, m({
138
- ...t,
144
+ i = e, t = r, m({
145
+ ...o,
139
146
  open: !0
140
147
  });
141
148
  }));
@@ -1,29 +1,29 @@
1
- const e = "_trigger_zwcfc_1", c = "_triggerDisabled_zwcfc_33", r = "_triggerText_zwcfc_40", t = "_triggerPlaceholder_zwcfc_48", _ = "_triggerIcon_zwcfc_52", g = "_pickerBody_zwcfc_61", o = "_sheet_zwcfc_68", s = "_header_zwcfc_74", i = "_headerTitle_zwcfc_87", d = "_headerButton_zwcfc_103", n = "_columns_zwcfc_114", a = "_weekday_zwcfc_118", l = {
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: c,
4
- triggerText: r,
5
- triggerPlaceholder: t,
3
+ triggerDisabled: r,
4
+ triggerText: t,
5
+ triggerPlaceholder: c,
6
6
  triggerIcon: _,
7
- pickerBody: g,
8
- sheet: o,
9
- header: s,
10
- headerTitle: i,
11
- headerButton: d,
12
- columns: n,
13
- weekday: a
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
- n as columns,
16
+ d as columns,
17
17
  l as default,
18
- s as header,
19
- d as headerButton,
20
- i as headerTitle,
21
- g as pickerBody,
22
- o as sheet,
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
- c as triggerDisabled,
24
+ r as triggerDisabled,
25
25
  _ as triggerIcon,
26
- t as triggerPlaceholder,
27
- r as triggerText,
28
- a as weekday
26
+ c as triggerPlaceholder,
27
+ t as triggerText,
28
+ n as weekday
29
29
  };