@balikjs/mobile 0.1.20 → 0.1.22

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,12 +1,12 @@
1
- import { insert as u, createComponent as o, effect as m, className as g, mergeProps as D, Portal as S, memo as a, template as p } from "solid-js/web";
1
+ import { insert as u, createComponent as o, effect as m, className as g, mergeProps as D, Portal as S, memo as a, template as f } from "solid-js/web";
2
2
  import { splitProps as E, mergeProps as L, createEffect as z, on as M, Show as b } from "solid-js";
3
- import { Dialog as i } from "@ark-ui/solid";
3
+ import { Dialog as l } from "@ark-ui/solid";
4
4
  import { CloseButton as x } from "../CloseButton/CloseButton.js";
5
5
  import { cn as c } from "../utils/cn.js";
6
6
  import { bem as T } from "../utils/bem.js";
7
7
  import { Button as w } from "../Button/Button.js";
8
8
  import n from "./Dialog.module.css.js";
9
- var N = /* @__PURE__ */ p("<div data-scope=dialog data-part=footer>"), R = /* @__PURE__ */ p("<div data-scope=dialog data-part=body>"), q = /* @__PURE__ */ p("<div data-scope=dialog data-part=header>");
9
+ var N = /* @__PURE__ */ f("<div data-scope=dialog data-part=footer>"), R = /* @__PURE__ */ f("<div data-scope=dialog data-part=body>"), q = /* @__PURE__ */ f("<div data-scope=dialog data-part=header>");
10
10
  const A = {
11
11
  mode: "sheet",
12
12
  modal: !0,
@@ -20,13 +20,13 @@ const A = {
20
20
  confirmLabel: "Confirm",
21
21
  loading: !1,
22
22
  danger: !1,
23
- backdropDismissible: !0
23
+ backdropDismissible: !1
24
24
  };
25
25
  let O = !1;
26
26
  function F(v) {
27
- const [e, P] = E(L(A, v), ["mode", "onOpen", "onClose", "onOpenChange", "title", "closeable", "lazyMount", "unmountOnExit", "showCancel", "showConfirm", "cancelLabel", "confirmLabel", "onCancel", "onConfirm", "loading", "danger", "backdropDismissible", "backdropBlur", "modal", "defaultOpen", "footerClass", "footerPlacement", "class", "children"]), l = e.mode === "modal", f = () => e.open !== void 0, k = (t) => {
27
+ const [e, P] = E(L(A, v), ["mode", "onOpen", "onClose", "onOpenChange", "title", "closeable", "lazyMount", "unmountOnExit", "showCancel", "showConfirm", "cancelLabel", "confirmLabel", "onCancel", "onConfirm", "loading", "danger", "backdropDismissible", "backdropBlur", "modal", "defaultOpen", "footerClass", "footerPlacement", "class", "children"]), i = e.mode === "modal", p = () => e.open !== void 0, k = (t) => {
28
28
  var r, s, d, C;
29
- t.open ? f() || (r = e.onOpen) == null || r.call(e) : ((s = e.onCancel) == null || s.call(e), f() || (d = e.onClose) == null || d.call(e)), (C = e.onOpenChange) == null || C.call(e, t);
29
+ t.open ? p() || (r = e.onOpen) == null || r.call(e) : ((s = e.onCancel) == null || s.call(e), p() || (d = e.onClose) == null || d.call(e)), (C = e.onOpenChange) == null || C.call(e, t);
30
30
  };
31
31
  z(M(() => e.open, (t, r) => {
32
32
  var s, d;
@@ -40,8 +40,8 @@ function F(v) {
40
40
  }, B = () => {
41
41
  var t;
42
42
  (t = e.onConfirm) == null || t.call(e);
43
- }, _ = e.showCancel !== e.showConfirm, y = () => !!e.title || l && e.closeable && !e.loading;
44
- !l && !e.title && !O && (O = !0, console.warn("[Dialog] sheet mode requires a title; use BottomSheet for header-less content."));
43
+ }, _ = e.showCancel !== e.showConfirm, y = () => !!e.title || i && e.closeable && !e.loading;
44
+ !i && !e.title && !O && (O = !0, console.warn("[Dialog] sheet mode requires a title; use BottomSheet for header-less content."));
45
45
  const h = (() => {
46
46
  var t = N();
47
47
  return u(t, o(b, {
@@ -83,9 +83,9 @@ function F(v) {
83
83
  }
84
84
  });
85
85
  }
86
- }), null), m(() => g(t, c(n.footer, !l && e.footerPlacement !== "top" && n.footerSheet, _ && n.footerSingle, e.footerClass))), t;
86
+ }), null), m(() => g(t, c(n.footer, !i && e.footerPlacement !== "top" && n.footerSheet, _ && n.footerSingle, e.footerClass))), t;
87
87
  })();
88
- return o(i.Root, D(P, {
88
+ return o(l.Root, D(P, {
89
89
  onOpenChange: k,
90
90
  get modal() {
91
91
  return e.modal;
@@ -105,25 +105,25 @@ function F(v) {
105
105
  return document.body;
106
106
  },
107
107
  get children() {
108
- return [o(i.Backdrop, {
108
+ return [o(l.Backdrop, {
109
109
  get class() {
110
110
  return c(n.backdrop, e.backdropBlur && n.blurred);
111
111
  }
112
- }), o(i.Positioner, {
112
+ }), o(l.Positioner, {
113
113
  get class() {
114
- return c(n.positioner, !l && n.positionerSheet);
114
+ return c(n.positioner, !i && n.positionerSheet);
115
115
  },
116
116
  get children() {
117
- return o(i.Content, {
117
+ return o(l.Content, {
118
118
  get class() {
119
- return c(T(), n.content, l ? n.contentModal : n.contentSheet, e.class);
119
+ return c(T(), n.content, i ? n.contentModal : n.contentSheet, e.class);
120
120
  },
121
121
  get children() {
122
122
  return [a(() => a(() => !!y())() && (() => {
123
123
  var t = q();
124
124
  return u(t, (() => {
125
125
  var r = a(() => !!e.title);
126
- return () => r() && o(i.Title, {
126
+ return () => r() && o(l.Title, {
127
127
  get class() {
128
128
  return n.title;
129
129
  },
@@ -132,8 +132,8 @@ function F(v) {
132
132
  }
133
133
  });
134
134
  })(), null), u(t, (() => {
135
- var r = a(() => !!(l && e.closeable && !e.loading));
136
- return () => r() && o(i.CloseTrigger, {
135
+ var r = a(() => !!(i && e.closeable && !e.loading));
136
+ return () => r() && o(l.CloseTrigger, {
137
137
  asChild: x,
138
138
  get class() {
139
139
  return n.close;
@@ -153,7 +153,7 @@ function F(v) {
153
153
  }
154
154
  }));
155
155
  }
156
- F.Original = i;
156
+ F.Original = l;
157
157
  export {
158
158
  F as Dialog
159
159
  };
@@ -9,11 +9,12 @@ const K = {
9
9
  variant: "outline",
10
10
  size: "md",
11
11
  disabled: !1,
12
+ intent: "default",
12
13
  precision: 2,
13
14
  min: 0
14
15
  };
15
16
  function q(D) {
16
- const [e, t] = $(z(K, D), ["variant", "size", "class", "inputClassName", "disabled", "value", "onValueChange", "currency", "suffix", "precision", "min", "max", "locale", "placeholder"]), [w, l] = x(!1), [o, a] = x("");
17
+ const [e, t] = $(z(K, D), ["variant", "size", "class", "inputClassName", "disabled", "value", "onValueChange", "currency", "suffix", "precision", "min", "max", "locale", "placeholder", "intent"]), [w, l] = x(!1), [o, a] = x("");
17
18
  let s;
18
19
  const u = (n) => {
19
20
  if (n == null || Number.isNaN(n)) return "";
@@ -46,6 +47,9 @@ function q(D) {
46
47
  get size() {
47
48
  return e.size;
48
49
  },
50
+ get intent() {
51
+ return e.intent;
52
+ },
49
53
  get disabled() {
50
54
  return e.disabled;
51
55
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@balikjs/mobile",
3
- "version": "0.1.20",
3
+ "version": "0.1.22",
4
4
  "description": "A mobile-first UI component library built on top of Ark UI for Solid.js",
5
5
  "type": "module",
6
6
  "license": "MIT",