@balikjs/mobile 0.1.20 → 0.1.21
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/Dialog/Dialog.js +19 -19
- package/dist/MoneyInput/MoneyInput.js +5 -1
- package/package.json +1 -1
package/dist/Dialog/Dialog.js
CHANGED
|
@@ -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
|
|
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
|
|
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__ */
|
|
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: !
|
|
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"]),
|
|
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 ?
|
|
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 ||
|
|
44
|
-
!
|
|
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, !
|
|
86
|
+
}), null), m(() => g(t, c(n.footer, !i && e.footerPlacement !== "top" && n.footerSheet, _ && n.footerSingle, e.footerClass))), t;
|
|
87
87
|
})();
|
|
88
|
-
return o(
|
|
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(
|
|
108
|
+
return [o(l.Backdrop, {
|
|
109
109
|
get class() {
|
|
110
110
|
return c(n.backdrop, e.backdropBlur && n.blurred);
|
|
111
111
|
}
|
|
112
|
-
}), o(
|
|
112
|
+
}), o(l.Positioner, {
|
|
113
113
|
get class() {
|
|
114
|
-
return c(n.positioner, !
|
|
114
|
+
return c(n.positioner, !i && n.positionerSheet);
|
|
115
115
|
},
|
|
116
116
|
get children() {
|
|
117
|
-
return o(
|
|
117
|
+
return o(l.Content, {
|
|
118
118
|
get class() {
|
|
119
|
-
return c(T(), n.content,
|
|
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(
|
|
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(() => !!(
|
|
136
|
-
return () => r() && o(
|
|
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 =
|
|
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
|
},
|