@balikjs/mobile 0.1.10 → 0.1.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.
Files changed (68) hide show
  1. package/dist/Alert/Alert.module.css.js +18 -18
  2. package/dist/Avatar/Avatar.module.css.js +16 -16
  3. package/dist/BackToTop/BackToTop.module.css.js +6 -6
  4. package/dist/Badge/Badge.js +44 -43
  5. package/dist/Badge/Badge.module.css.js +36 -42
  6. package/dist/BottomNavigation/BottomNavigation.module.css.js +6 -6
  7. package/dist/BottomSheet/BottomSheet.js +61 -78
  8. package/dist/BottomSheet/BottomSheet.module.css.js +14 -20
  9. package/dist/Button/Button.js +29 -24
  10. package/dist/Button/Button.module.css.js +21 -19
  11. package/dist/Card/Card.module.css.js +1 -1
  12. package/dist/Checkbox/Checkbox.module.css.js +13 -13
  13. package/dist/Clipboard/Clipboard.js +31 -26
  14. package/dist/Clipboard/Clipboard.module.css.js +16 -16
  15. package/dist/CloseButton/CloseButton.js +1 -2
  16. package/dist/CloseButton/CloseButton.module.css.js +12 -12
  17. package/dist/Confirm/Confirm.js +31 -24
  18. package/dist/DatePicker/DatePicker.js +71 -59
  19. package/dist/DatePicker/DatePicker.module.css.js +36 -24
  20. package/dist/Dialog/Dialog.js +79 -63
  21. package/dist/Dialog/Dialog.module.css.js +16 -14
  22. package/dist/Divider/Divider.module.css.js +2 -2
  23. package/dist/Drawer/Drawer.module.css.js +2 -2
  24. package/dist/Fab/Fab.module.css.js +16 -16
  25. package/dist/Field/Field.module.css.js +14 -14
  26. package/dist/Fieldset/Fieldset.module.css.js +1 -1
  27. package/dist/FileUpload/FileUpload.module.css.js +26 -26
  28. package/dist/FilterGroup/FilterGroup.js +61 -58
  29. package/dist/FilterGroup/FilterGroup.module.css.js +12 -20
  30. package/dist/Input/Input.js +62 -40
  31. package/dist/Input/Input.module.css.js +36 -30
  32. package/dist/Link/Link.module.css.js +1 -1
  33. package/dist/MoneyInput/MoneyInput.module.css.js +6 -6
  34. package/dist/Pagination/Pagination.module.css.js +1 -1
  35. package/dist/Picker/Picker.module.css.js +8 -8
  36. package/dist/PickerView/PickerView.module.css.js +16 -16
  37. package/dist/PinInput/PinInput.module.css.js +14 -14
  38. package/dist/Popover/Popover.module.css.js +10 -10
  39. package/dist/Progress/Progress.module.css.js +14 -14
  40. package/dist/QrCode/QrCode.module.css.js +6 -6
  41. package/dist/RadioGroup/Radio.module.css.js +18 -18
  42. package/dist/RatingGroup/RatingGroup.js +6 -6
  43. package/dist/RatingGroup/RatingGroup.module.css.js +6 -6
  44. package/dist/SearchInput/SearchInput.module.css.js +1 -1
  45. package/dist/Select/Select.js +45 -44
  46. package/dist/Select/Select.module.css.js +20 -18
  47. package/dist/SelectPc/Select.js +50 -44
  48. package/dist/SelectPc/SelectPc.module.css.js +34 -28
  49. package/dist/SignaturePad/SignaturePad.js +116 -0
  50. package/dist/SignaturePad/SignaturePad.module.css.js +15 -0
  51. package/dist/Slider/Slider.module.css.js +10 -10
  52. package/dist/Spinner/Spinner.module.css.js +4 -4
  53. package/dist/Steps/Steps.js +87 -77
  54. package/dist/Steps/Steps.module.css.js +20 -22
  55. package/dist/StickyHeader/StickyHeader.module.css.js +2 -2
  56. package/dist/Switch/Switch.js +22 -18
  57. package/dist/Switch/Switch.module.css.js +22 -20
  58. package/dist/Tabs/Tabs.module.css.js +6 -6
  59. package/dist/Tag/Tag.js +34 -26
  60. package/dist/Tag/Tag.module.css.js +36 -32
  61. package/dist/Textarea/Textarea.module.css.js +10 -10
  62. package/dist/Toast/Toast.module.css.js +30 -30
  63. package/dist/Toggle/Toggle.module.css.js +1 -1
  64. package/dist/ToggleGroup/ToggleGroup.js +36 -21
  65. package/dist/ToggleGroup/ToggleGroup.module.css.js +22 -16
  66. package/dist/index.js +143 -135
  67. package/dist/styles.css +1 -1
  68. package/package.json +4 -1
@@ -1,25 +1,25 @@
1
- const n = "_base_1kunc_1", t = "_icon_1kunc_26", c = "_body_1kunc_40", e = "_title_1kunc_45", _ = "_description_1kunc_53", s = "_close_1kunc_61", i = "_intentInfo_1kunc_83", o = "_intentSuccess_1kunc_88", u = "_intentWarning_1kunc_93", a = "_intentDanger_1kunc_98", k = {
1
+ const n = "_base_fr8u0_1", t = "_icon_fr8u0_26", e = "_body_fr8u0_40", _ = "_title_fr8u0_45", s = "_description_fr8u0_53", i = "_close_fr8u0_61", o = "_intentInfo_fr8u0_83", c = "_intentSuccess_fr8u0_88", r = "_intentWarning_fr8u0_93", f = "_intentDanger_fr8u0_98", u = {
2
2
  base: n,
3
3
  icon: t,
4
- body: c,
5
- title: e,
6
- description: _,
7
- close: s,
8
- intentInfo: i,
9
- intentSuccess: o,
10
- intentWarning: u,
11
- intentDanger: a
4
+ body: e,
5
+ title: _,
6
+ description: s,
7
+ close: i,
8
+ intentInfo: o,
9
+ intentSuccess: c,
10
+ intentWarning: r,
11
+ intentDanger: f
12
12
  };
13
13
  export {
14
14
  n as base,
15
- c as body,
16
- s as close,
17
- k as default,
18
- _ as description,
15
+ e as body,
16
+ i as close,
17
+ u as default,
18
+ s as description,
19
19
  t as icon,
20
- a as intentDanger,
21
- i as intentInfo,
22
- o as intentSuccess,
23
- u as intentWarning,
24
- e as title
20
+ f as intentDanger,
21
+ o as intentInfo,
22
+ c as intentSuccess,
23
+ r as intentWarning,
24
+ _ as title
25
25
  };
@@ -1,27 +1,27 @@
1
- const e = "_base_1iyre_1", s = "_image_1iyre_17", _ = "_fallback_1iyre_26", i = "_sizeXs_1iyre_30", a = "_sizeSm_1iyre_36", l = "_sizeMd_1iyre_42", z = "_sizeLg_1iyre_48", c = "_sizeXl_1iyre_54", t = "_size2xl_1iyre_60", o = "_male_1iyre_66", m = "_female_1iyre_71", n = {
2
- base: e,
3
- image: s,
1
+ const s = "_base_4spf6_1", e = "_image_4spf6_17", _ = "_fallback_4spf6_26", i = "_sizeXs_4spf6_30", a = "_sizeSm_4spf6_36", l = "_sizeMd_4spf6_42", f = "_sizeLg_4spf6_48", z = "_sizeXl_4spf6_54", c = "_size2xl_4spf6_60", t = "_male_4spf6_66", o = "_female_4spf6_71", m = {
2
+ base: s,
3
+ image: e,
4
4
  fallback: _,
5
5
  sizeXs: i,
6
6
  sizeSm: a,
7
7
  sizeMd: l,
8
- sizeLg: z,
9
- sizeXl: c,
10
- size2xl: t,
11
- male: o,
12
- female: m
8
+ sizeLg: f,
9
+ sizeXl: z,
10
+ size2xl: c,
11
+ male: t,
12
+ female: o
13
13
  };
14
14
  export {
15
- e as base,
16
- n as default,
15
+ s as base,
16
+ m as default,
17
17
  _ as fallback,
18
- m as female,
19
- s as image,
20
- o as male,
21
- t as size2xl,
22
- z as sizeLg,
18
+ o as female,
19
+ e as image,
20
+ t as male,
21
+ c as size2xl,
22
+ f as sizeLg,
23
23
  l as sizeMd,
24
24
  a as sizeSm,
25
- c as sizeXl,
25
+ z as sizeXl,
26
26
  i as sizeXs
27
27
  };
@@ -1,11 +1,11 @@
1
- const s = "_base_132ju_1", e = "_visible_132ju_25", i = "_icon_132ju_40", _ = {
1
+ const s = "_base_bz5rq_1", b = "_visible_bz5rq_25", e = "_icon_bz5rq_40", i = {
2
2
  base: s,
3
- visible: e,
4
- icon: i
3
+ visible: b,
4
+ icon: e
5
5
  };
6
6
  export {
7
7
  s as base,
8
- _ as default,
9
- i as icon,
10
- e as visible
8
+ i as default,
9
+ e as icon,
10
+ b as visible
11
11
  };
@@ -1,59 +1,60 @@
1
- import { spread as d, mergeProps as u, insert as o, createComponent as c, effect as m, className as p, template as l } from "solid-js/web";
2
- import { splitProps as f, mergeProps as g, Show as z } from "solid-js";
3
- import { bem as h } from "../utils/bem.js";
4
- import { cn as I } from "../utils/cn.js";
5
- import e from "./Badge.module.css.js";
6
- var P = /* @__PURE__ */ l("<span aria-hidden=true data-part=dot>"), x = /* @__PURE__ */ l("<span>");
7
- const D = {
8
- xs: e.sizeXs,
9
- sm: e.sizeSm,
10
- md: e.sizeMd,
11
- lg: e.sizeLg,
12
- xl: e.sizeXl,
13
- "2xl": e.size2xl
1
+ import { spread as u, mergeProps as m, insert as a, createComponent as d, effect as p, className as f, template as i } from "solid-js/web";
2
+ import { splitProps as g, mergeProps as z, createMemo as b, Show as h } from "solid-js";
3
+ import { bem as v } from "../utils/bem.js";
4
+ import { cn as P } from "../utils/cn.js";
5
+ import t from "./Badge.module.css.js";
6
+ var $ = /* @__PURE__ */ i("<span aria-hidden=true data-part=dot>"), x = /* @__PURE__ */ i("<span>");
7
+ const _ = {
8
+ xs: t.sizeXs,
9
+ sm: t.sizeSm,
10
+ md: t.sizeMd,
11
+ lg: t.sizeLg,
12
+ xl: t.sizeXl,
13
+ "2xl": t.size2xl
14
14
  }, S = {
15
- default: e.solidDefault,
16
- danger: e.solidDanger,
17
- success: e.solidSuccess,
18
- warning: e.solidWarning,
19
- info: e.solidInfo,
20
- intent: e.solidIntent
21
- }, _ = {
22
- default: e.outlineDefault,
23
- danger: e.outlineDanger,
24
- success: e.outlineSuccess,
25
- warning: e.outlineWarning,
26
- info: e.outlineInfo,
27
- intent: e.outlineIntent
28
- }, $ = {
29
- solid: S,
30
- outline: _
31
- }, b = {
32
- size: "md",
15
+ solid: t.solid,
16
+ surface: t.surface,
17
+ subtle: t.subtle,
18
+ outline: t.outline
19
+ }, w = {
20
+ neutral: t.intentNeutral,
21
+ accent: t.intentAccent,
22
+ danger: t.intentDanger,
23
+ success: t.intentSuccess,
24
+ warning: t.intentWarning
25
+ }, M = {
26
+ default: "neutral",
27
+ info: "accent",
28
+ intent: "accent"
29
+ }, N = {
30
+ variant: "subtle",
33
31
  intent: "default",
34
- solid: !0,
32
+ size: "md",
35
33
  dot: !1
36
34
  };
37
- function X(r) {
38
- const [t, a] = f(g(b, r), ["size", "intent", "solid", "dot", "class", "children"]), s = t.solid ? "solid" : "outline";
35
+ function k(o) {
36
+ const [n, l] = g(z(N, o), ["variant", "intent", "size", "dot", "class", "children"]), s = (e) => typeof e == "function" ? e() : e, c = b(() => {
37
+ const e = s(n.variant), r = M[s(n.intent)] || s(n.intent);
38
+ return P(v("balik-badge", e, r, s(n.size)), t.base, S[e], w[r], _[s(n.size)], n.class);
39
+ });
39
40
  return (() => {
40
- var n = x();
41
- return d(n, u(a, {
41
+ var e = x();
42
+ return u(e, m(l, {
42
43
  "data-part": "root",
43
44
  get class() {
44
- return I(h("balik-badge", s, t.intent, t.size), e.base, D[t.size], $[s][t.intent], t.class);
45
+ return c();
45
46
  }
46
- }), !1, !0), o(n, c(z, {
47
+ }), !1, !0), a(e, d(h, {
47
48
  get when() {
48
- return t.dot;
49
+ return n.dot;
49
50
  },
50
51
  get children() {
51
- var i = P();
52
- return m(() => p(i, e.dot)), i;
52
+ var r = $();
53
+ return p(() => f(r, t.dot)), r;
53
54
  }
54
- }), null), o(n, () => t.children, null), n;
55
+ }), null), a(e, () => n.children, null), e;
55
56
  })();
56
57
  }
57
58
  export {
58
- X as Badge
59
+ k as Badge
59
60
  };
@@ -1,45 +1,39 @@
1
- const s = "_base_rjkpf_1", n = "_sizeXs_rjkpf_22", o = "_sizeSm_rjkpf_29", e = "_sizeMd_rjkpf_36", t = "_sizeLg_rjkpf_43", i = "_sizeXl_rjkpf_50", _ = "_size2xl_rjkpf_57", l = "_solidDefault_rjkpf_66", c = "_solidDanger_rjkpf_72", f = "_solidSuccess_rjkpf_78", r = "_solidWarning_rjkpf_84", u = "_solidInfo_rjkpf_90", d = "_solidIntent_rjkpf_96", a = "_outlineDefault_rjkpf_104", p = "_outlineDanger_rjkpf_109", j = "_outlineSuccess_rjkpf_114", k = "_outlineWarning_rjkpf_119", z = "_outlineInfo_rjkpf_124", g = "_outlineIntent_rjkpf_129", D = "_dot_rjkpf_136", I = {
2
- base: s,
3
- sizeXs: n,
4
- sizeSm: o,
5
- sizeMd: e,
6
- sizeLg: t,
7
- sizeXl: i,
8
- size2xl: _,
9
- solidDefault: l,
10
- solidDanger: c,
11
- solidSuccess: f,
12
- solidWarning: r,
13
- solidInfo: u,
14
- solidIntent: d,
15
- outlineDefault: a,
16
- outlineDanger: p,
17
- outlineSuccess: j,
18
- outlineWarning: k,
19
- outlineInfo: z,
20
- outlineIntent: g,
21
- dot: D
1
+ const t = "_base_6avx0_1", n = "_solid_6avx0_29", e = "_surface_6avx0_34", s = "_subtle_6avx0_40", _ = "_outline_6avx0_45", i = "_intentNeutral_6avx0_52", a = "_intentAccent_6avx0_64", c = "_intentDanger_6avx0_76", o = "_intentSuccess_6avx0_88", x = "_intentWarning_6avx0_100", l = "_sizeXs_6avx0_114", z = "_sizeSm_6avx0_121", v = "_sizeMd_6avx0_128", u = "_sizeLg_6avx0_135", r = "_sizeXl_6avx0_142", d = "_size2xl_6avx0_149", g = "_dot_6avx0_158", b = {
2
+ base: t,
3
+ solid: n,
4
+ surface: e,
5
+ subtle: s,
6
+ outline: _,
7
+ intentNeutral: i,
8
+ intentAccent: a,
9
+ intentDanger: c,
10
+ intentSuccess: o,
11
+ intentWarning: x,
12
+ sizeXs: l,
13
+ sizeSm: z,
14
+ sizeMd: v,
15
+ sizeLg: u,
16
+ sizeXl: r,
17
+ size2xl: d,
18
+ dot: g
22
19
  };
23
20
  export {
24
- s as base,
25
- I as default,
26
- D as dot,
27
- p as outlineDanger,
28
- a as outlineDefault,
29
- z as outlineInfo,
30
- g as outlineIntent,
31
- j as outlineSuccess,
32
- k as outlineWarning,
33
- _ as size2xl,
34
- t as sizeLg,
35
- e as sizeMd,
36
- o as sizeSm,
37
- i as sizeXl,
38
- n as sizeXs,
39
- c as solidDanger,
40
- l as solidDefault,
41
- u as solidInfo,
42
- d as solidIntent,
43
- f as solidSuccess,
44
- r as solidWarning
21
+ t as base,
22
+ b as default,
23
+ g as dot,
24
+ a as intentAccent,
25
+ c as intentDanger,
26
+ i as intentNeutral,
27
+ o as intentSuccess,
28
+ x as intentWarning,
29
+ _ as outline,
30
+ d as size2xl,
31
+ u as sizeLg,
32
+ v as sizeMd,
33
+ z as sizeSm,
34
+ r as sizeXl,
35
+ l as sizeXs,
36
+ n as solid,
37
+ s as subtle,
38
+ e as surface
45
39
  };
@@ -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_1xc7x_1", t = "_item_1xc7x_15", c = "_icon_1xc7x_40", _ = "_label_1xc7x_54", e = {
2
2
  root: o,
3
3
  item: t,
4
- icon: _,
5
- label: e
4
+ icon: c,
5
+ label: _
6
6
  };
7
7
  export {
8
- c as default,
9
- _ as icon,
8
+ e as default,
9
+ c as icon,
10
10
  t as item,
11
- e as label,
11
+ _ as label,
12
12
  o as root
13
13
  };
@@ -1,51 +1,59 @@
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";
1
+ import { createComponent as F, Portal as R, effect as b, className as c, setAttribute as E, use as w, insert as P, memo as G, template as C, delegateEvents as I } from "solid-js/web";
2
+ import { splitProps as N, mergeProps as U, createSignal as x, createEffect as y, on as _ } from "solid-js";
3
+ import { trapFocus as H } from "@zag-js/focus-trap";
3
4
  import { bem as M } from "../utils/bem.js";
4
- import { cn as C } from "../utils/cn.js";
5
+ import { cn as g } from "../utils/cn.js";
5
6
  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 = {
7
+ import s from "./BottomSheet.module.css.js";
8
+ var j = /* @__PURE__ */ C("<div data-part=backdrop>"), q = /* @__PURE__ */ C("<div role=dialog aria-modal=true aria-label=BottomSheet><div data-part=content>"), z = /* @__PURE__ */ C("<div data-part=grabber><div>");
9
+ const J = {
9
10
  dismissible: !0,
10
11
  backdropBlur: !0,
11
12
  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({
13
+ }, K = 0.3, Q = 0.5, W = 3;
14
+ function ae(B) {
15
+ const [r] = N(U(J, B), ["open", "onOpen", "onClose", "onOpenChange", "dismissible", "draggable", "backdropBlur", "class", "contentClass", "children"]);
16
+ let l;
17
+ const [d, h] = x(!1);
18
+ let O = 0, p = 0, m = 0, f = 0, v = 0;
19
+ const Y = (e) => {
20
+ e.currentTarget.setPointerCapture(e.pointerId), O = m = e.clientY, f = e.timeStamp, v = 0, p = 0, h(!0);
21
+ }, A = (e) => {
22
+ if (!d()) return;
23
+ const t = e.clientY - O, o = e.timeStamp - f;
24
+ o > 0 && (v = (e.clientY - m) / o), m = e.clientY, f = e.timeStamp, p = t;
25
+ const n = t >= 0 ? t : t / W;
26
+ l.style.transform = `translateY(${n}px)`;
27
+ }, $ = (e) => {
28
+ h(!1), l.style.transform = "", e && k({
31
29
  open: !1
32
30
  });
33
31
  }, 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));
32
+ if (!d()) return;
33
+ const e = l.offsetHeight || 1, t = p > e * K, o = p > 0 && v > Q;
34
+ $(r.dismissible && (t || o));
37
35
  }, L = () => {
38
- b() && E(!1);
36
+ d() && $(!1);
39
37
  }, k = (e) => {
40
- var r;
41
- (r = t.onOpenChange) == null || r.call(t, e);
38
+ var t;
39
+ (t = r.onOpenChange) == null || t.call(r, e);
42
40
  };
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);
41
+ return V(() => r.open), y(_(() => r.open, (e) => {
42
+ if (!e) return;
43
+ const t = H(l, {
44
+ initialFocus: !1,
45
+ escapeDeactivates: !1,
46
+ clickOutsideDeactivates: !1,
47
+ allowOutsideClick: !0,
48
+ returnFocusOnDeactivate: !0
49
+ });
50
+ onCleanup(t);
51
+ })), y(_(() => r.open, (e) => {
52
+ var t, o;
53
+ e ? (t = r.onOpen) == null || t.call(r) : (o = r.onClose) == null || o.call(r);
46
54
  }, {
47
55
  defer: !0
48
- })), R(G, {
56
+ })), F(R, {
49
57
  get mount() {
50
58
  return document.body;
51
59
  },
@@ -53,68 +61,43 @@ function ne(Y) {
53
61
  return [(() => {
54
62
  var e = j();
55
63
  return e.$$click = () => {
56
- t.dismissible && k({
64
+ r.dismissible && k({
57
65
  open: !1
58
66
  });
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;
67
+ }, b((t) => {
68
+ var o = g(s.backdrop, r.backdropBlur && s.blurred), n = r.open ? "" : void 0;
69
+ return o !== t.e && c(e, t.e = o), n !== t.t && E(e, "data-open", t.t = n), t;
62
70
  }, {
63
71
  e: void 0,
64
72
  t: void 0
65
73
  }), e;
66
74
  })(), (() => {
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;
75
- }, {
76
- e: void 0,
77
- t: void 0
78
- }), a;
79
- })();
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;
75
+ var e = q(), t = e.firstChild, o = l;
76
+ return typeof o == "function" ? w(o, e) : l = e, P(e, (() => {
77
+ var n = G(() => !!r.draggable);
78
+ return () => n() && (() => {
79
+ var a = z(), u = a.firstChild;
80
+ return a.addEventListener("pointercancel", L), a.$$pointerup = T, a.$$pointermove = A, a.$$pointerdown = Y, b((i) => {
81
+ var S = s.grabberArea, D = s.grabber;
82
+ return S !== i.e && c(a, i.e = S), D !== i.t && c(u, i.t = D), i;
87
83
  }, {
88
84
  e: void 0,
89
85
  t: void 0
90
86
  }), a;
91
87
  })();
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;
88
+ })(), t), P(t, () => r.children), b((n) => {
89
+ var a = g(M(), s.sheet, d() && s.dragging, r.class), u = r.open ? "" : void 0, i = g(s.content, r.contentClass);
90
+ return a !== n.e && c(e, n.e = a), u !== n.t && E(e, "data-open", n.t = u), i !== n.a && c(t, n.a = i), n;
107
91
  }, {
108
92
  e: void 0,
109
93
  t: void 0,
110
- a: void 0,
111
- o: void 0
94
+ a: void 0
112
95
  }), e;
113
96
  })()];
114
97
  }
115
98
  });
116
99
  }
117
- w(["click", "pointerdown", "pointermove", "pointerup"]);
100
+ I(["click", "pointerdown", "pointermove", "pointerup"]);
118
101
  export {
119
- ne as BottomSheet
102
+ ae as BottomSheet
120
103
  };
@@ -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,
4
- sheet: e,
1
+ const r = "_backdrop_1l1c4_1", e = "_blurred_1l1c4_11", c = "_sheet_1l1c4_22", _ = "_dragging_1l1c4_52", t = "_grabberArea_1l1c4_70", b = "_grabber_1l1c4_70", a = "_content_1l1c4_96", n = {
2
+ backdrop: r,
3
+ blurred: e,
4
+ sheet: c,
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: a
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
+ e as blurred,
13
+ a as content,
14
+ n 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
+ c as sheet
25
19
  };
@@ -1,56 +1,61 @@
1
- import { createComponent as o, mergeProps as m, memo as r, insert as g, effect as c, className as u, template as p } from "solid-js/web";
2
- import { splitProps as f, mergeProps as b } from "solid-js";
3
- import { ark as l } from "@ark-ui/solid/factory";
4
- import { Loader2 as z } from "lucide-solid";
5
- import { bem as P } from "../utils/bem.js";
6
- import { cn as h } from "../utils/cn.js";
1
+ import { createComponent as a, mergeProps as u, memo as s, insert as c, effect as g, className as f, template as p } from "solid-js/web";
2
+ import { splitProps as b, mergeProps as z, createMemo as P } from "solid-js";
3
+ import { ark as o } from "@ark-ui/solid/factory";
4
+ import { Loader2 as v } from "lucide-solid";
5
+ import { bem as h } from "../utils/bem.js";
6
+ import { cn as x } from "../utils/cn.js";
7
7
  import e from "./Button.module.css.js";
8
8
  var y = /* @__PURE__ */ p("<span>");
9
- const v = {
9
+ const D = {
10
10
  outline: e.outline,
11
11
  solid: e.solid
12
- }, x = {
12
+ }, L = {
13
13
  default: e.intentDefault,
14
+ neutral: e.intentNeutral,
14
15
  danger: e.intentDanger
15
- }, D = {
16
+ }, N = {
16
17
  xs: e.sizeXs,
17
18
  sm: e.sizeSm,
18
19
  md: e.sizeMd,
19
20
  lg: e.sizeLg,
20
21
  xl: e.sizeXl
21
- }, L = {
22
- solid: !1,
23
- danger: !1,
22
+ }, O = {
23
+ variant: "outline",
24
+ intent: "default",
24
25
  size: "md",
25
26
  disabled: !1,
26
27
  loading: !1
27
28
  };
28
- function O(a) {
29
- const [s, d] = f(b(L, a), ["solid", "danger", "size", "class", "loading", "disabled", "children"]), i = s.solid ? "solid" : "outline", n = s.danger ? "danger" : "default";
30
- return o(l.button, m(d, {
29
+ function _(l) {
30
+ const [t, d] = b(z(O, l), ["variant", "intent", "size", "class", "loading", "disabled", "children"]), i = (n) => typeof n == "function" ? n() : n, m = P(() => {
31
+ const n = i(t.variant) === "solid" ? "solid" : "outline";
32
+ let r = i(t.intent);
33
+ return r === "neutral" && n === "solid" && (r = "default"), x(h("balik-button", n, r, i(t.size)), e.base, D[n], L[r], N[i(t.size)], i(t.loading) && e.loadingButton, t.class);
34
+ });
35
+ return a(o.button, u(d, {
31
36
  get disabled() {
32
- return s.disabled;
37
+ return t.disabled;
33
38
  },
34
39
  get "aria-disabled"() {
35
- return s.loading || s.disabled;
40
+ return t.loading || t.disabled;
36
41
  },
37
42
  get class() {
38
- return h(P("balik-button", i, n, s.size), e.base, v[i], x[n], D[s.size], s.loading && e.loadingButton, s.class);
43
+ return m();
39
44
  },
40
45
  get children() {
41
- return [r(() => s.children), r(() => r(() => !!s.loading)() && (() => {
42
- var t = y();
43
- return g(t, o(z, {
46
+ return [s(() => t.children), s(() => s(() => !!t.loading)() && (() => {
47
+ var n = y();
48
+ return c(n, a(v, {
44
49
  get class() {
45
50
  return e.spinner;
46
51
  },
47
52
  "aria-hidden": "true"
48
- })), c(() => u(t, e.loadingOverlay)), t;
53
+ })), g(() => f(n, e.loadingOverlay)), n;
49
54
  })())];
50
55
  }
51
56
  }));
52
57
  }
53
- O.Original = l;
58
+ _.Original = o;
54
59
  export {
55
- O as Button
60
+ _ as Button
56
61
  };