@balikjs/mobile 0.1.5 → 0.1.7
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/README.md +1 -0
- package/dist/Alert/Alert.js +82 -0
- package/dist/Alert/Alert.module.css.js +25 -0
- package/dist/Avatar/Avatar.js +60 -0
- package/dist/Avatar/Avatar.module.css.js +27 -0
- package/dist/BackToTop/BackToTop.js +55 -0
- package/dist/BackToTop/BackToTop.module.css.js +11 -0
- package/dist/Badge/Badge.js +59 -0
- package/dist/Badge/Badge.module.css.js +45 -0
- package/dist/BottomNavigation/BottomNavigation.js +48 -0
- package/dist/BottomNavigation/BottomNavigation.module.css.js +13 -0
- package/dist/BottomSheet/BottomSheet.js +120 -0
- package/dist/BottomSheet/BottomSheet.module.css.js +25 -0
- package/dist/Button/Button.js +56 -0
- package/dist/Button/Button.module.css.js +31 -0
- package/dist/Card/Card.js +22 -0
- package/dist/Card/Card.module.css.js +7 -0
- package/dist/Checkbox/Checkbox.js +65 -0
- package/dist/Checkbox/Checkbox.module.css.js +27 -0
- package/dist/Clipboard/Clipboard.js +60 -0
- package/dist/Clipboard/Clipboard.module.css.js +21 -0
- package/dist/CloseButton/CloseButton.js +37 -0
- package/dist/CloseButton/CloseButton.module.css.js +21 -0
- package/dist/Confirm/Confirm.js +146 -0
- package/dist/Confirm/Confirm.module.css.js +7 -0
- package/dist/DatePicker/DatePicker.js +149 -0
- package/dist/DatePicker/DatePicker.module.css.js +29 -0
- package/dist/Dialog/Dialog.js +142 -0
- package/dist/Dialog/Dialog.module.css.js +29 -0
- package/dist/Divider/Divider.js +27 -0
- package/dist/Divider/Divider.module.css.js +9 -0
- package/dist/Drawer/Drawer.js +59 -0
- package/dist/Drawer/Drawer.module.css.js +19 -0
- package/dist/Empty/Empty.js +25 -0
- package/dist/Empty/Empty.module.css.js +9 -0
- package/dist/Fab/Fab.js +79 -0
- package/dist/Fab/Fab.module.css.js +19 -0
- package/dist/Field/Field.js +70 -0
- package/dist/Field/Field.module.css.js +21 -0
- package/dist/Fieldset/Fieldset.js +31 -0
- package/dist/Fieldset/Fieldset.module.css.js +9 -0
- package/dist/FileUpload/FileUpload.js +174 -0
- package/dist/FileUpload/FileUpload.module.css.js +35 -0
- package/dist/FilterGroup/FilterGroup.js +70 -0
- package/dist/FilterGroup/FilterGroup.module.css.js +23 -0
- package/dist/Input/Input.js +68 -0
- package/dist/Input/Input.module.css.js +35 -0
- package/dist/Link/Link.js +22 -0
- package/dist/Link/Link.module.css.js +7 -0
- package/dist/MoneyInput/MoneyInput.js +106 -0
- package/dist/MoneyInput/MoneyInput.module.css.js +9 -0
- package/dist/Pagination/Pagination.js +67 -0
- package/dist/Pagination/Pagination.module.css.js +11 -0
- package/dist/Picker/Picker.js +75 -0
- package/dist/Picker/Picker.module.css.js +15 -0
- package/dist/PickerView/PickerView.js +89 -0
- package/dist/PickerView/PickerView.module.css.js +21 -0
- package/dist/PickerView/wheel.js +146 -0
- package/dist/PinInput/PinInput.js +80 -0
- package/dist/PinInput/PinInput.module.css.js +23 -0
- package/dist/Popover/Popover.js +107 -0
- package/dist/Popover/Popover.module.css.js +17 -0
- package/dist/Progress/Progress.js +80 -0
- package/dist/Progress/Progress.module.css.js +27 -0
- package/dist/QrCode/QrCode.js +78 -0
- package/dist/QrCode/QrCode.module.css.js +15 -0
- package/dist/RadioGroup/Radio.js +42 -0
- package/dist/RadioGroup/Radio.module.css.js +23 -0
- package/dist/RadioGroup/RadioGroup.js +29 -0
- package/dist/RadioGroup/RadioGroup.module.css.js +9 -0
- package/dist/RatingGroup/RatingGroup.js +87 -0
- package/dist/RatingGroup/RatingGroup.module.css.js +13 -0
- package/dist/SafeArea/SafeArea.js +24 -0
- package/dist/SafeArea/SafeArea.module.css.js +15 -0
- package/dist/SearchInput/SearchInput.js +76 -0
- package/dist/SearchInput/SearchInput.module.css.js +11 -0
- package/dist/Select/Select.js +122 -0
- package/dist/Select/Select.module.css.js +29 -0
- package/dist/SelectPc/Select.js +130 -0
- package/dist/SelectPc/SelectPc.module.css.js +31 -0
- package/dist/Skeleton/Skeleton.js +42 -0
- package/dist/Skeleton/Skeleton.module.css.js +11 -0
- package/dist/Slider/Slider.js +63 -0
- package/dist/Slider/Slider.module.css.js +19 -0
- package/dist/Spinner/Spinner.js +31 -0
- package/dist/Spinner/Spinner.module.css.js +17 -0
- package/dist/Steps/Steps.js +173 -0
- package/dist/Steps/Steps.module.css.js +31 -0
- package/dist/StickyHeader/StickyHeader.js +30 -0
- package/dist/StickyHeader/StickyHeader.module.css.js +9 -0
- package/dist/Switch/Switch.js +49 -0
- package/dist/Switch/Switch.module.css.js +25 -0
- package/dist/Tabs/Tabs.js +55 -0
- package/dist/Tabs/Tabs.module.css.js +13 -0
- package/dist/Tag/Tag.js +58 -0
- package/dist/Tag/Tag.module.css.js +35 -0
- package/dist/Textarea/Textarea.js +32 -0
- package/dist/Textarea/Textarea.module.css.js +21 -0
- package/dist/Toast/Toast.js +137 -0
- package/dist/Toast/Toast.module.css.js +43 -0
- package/dist/Toggle/Toggle.js +33 -0
- package/dist/Toggle/Toggle.module.css.js +9 -0
- package/dist/ToggleGroup/ToggleGroup.js +42 -0
- package/dist/ToggleGroup/ToggleGroup.module.css.js +19 -0
- package/dist/Tooltip/Tooltip.js +71 -0
- package/dist/Tooltip/Tooltip.module.css.js +13 -0
- package/dist/index.js +164 -3683
- package/dist/styles.css +1 -1
- package/dist/utils/bem.js +6 -0
- package/dist/utils/cn.js +6 -0
- package/dist/utils/useScrollLock.js +16 -0
- package/package.json +3 -198
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { createComponent as n, mergeProps as a, insert as m, effect as u, className as g, template as f } from "solid-js/web";
|
|
2
|
+
import { splitProps as s } from "solid-js";
|
|
3
|
+
import { QrCode as o } from "@ark-ui/solid";
|
|
4
|
+
import { Download as p } from "lucide-solid";
|
|
5
|
+
import { bem as h } from "../utils/bem.js";
|
|
6
|
+
import { cn as d } from "../utils/cn.js";
|
|
7
|
+
import l from "./QrCode.module.css.js";
|
|
8
|
+
var C = /* @__PURE__ */ f("<div>");
|
|
9
|
+
function c(e) {
|
|
10
|
+
const [r, t] = s(e, ["class", "children"]);
|
|
11
|
+
return n(o.Root, a(t, {
|
|
12
|
+
get class() {
|
|
13
|
+
return d(h(), l.root, r.class);
|
|
14
|
+
},
|
|
15
|
+
get children() {
|
|
16
|
+
return r.children;
|
|
17
|
+
}
|
|
18
|
+
}));
|
|
19
|
+
}
|
|
20
|
+
function v(e) {
|
|
21
|
+
const [r, t] = s(e, ["class", "children"]);
|
|
22
|
+
return (() => {
|
|
23
|
+
var i = C();
|
|
24
|
+
return m(i, n(o.Frame, a(t, {
|
|
25
|
+
get class() {
|
|
26
|
+
return d(l.frame, r.class);
|
|
27
|
+
},
|
|
28
|
+
get children() {
|
|
29
|
+
return n(o.Pattern, {});
|
|
30
|
+
}
|
|
31
|
+
})), null), m(i, () => r.children, null), u(() => g(i, l.frameWrapper)), i;
|
|
32
|
+
})();
|
|
33
|
+
}
|
|
34
|
+
function Q(e) {
|
|
35
|
+
const [r, t] = s(e, ["class"]);
|
|
36
|
+
return n(o.Pattern, a(t, {
|
|
37
|
+
get class() {
|
|
38
|
+
return r.class;
|
|
39
|
+
}
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
function w(e) {
|
|
43
|
+
const [r, t] = s(e, ["class", "children"]);
|
|
44
|
+
return n(o.Overlay, a(t, {
|
|
45
|
+
get class() {
|
|
46
|
+
return d(l.overlay, r.class);
|
|
47
|
+
},
|
|
48
|
+
get children() {
|
|
49
|
+
return r.children;
|
|
50
|
+
}
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
function P(e) {
|
|
54
|
+
const [r, t] = s(e, ["class", "children"]);
|
|
55
|
+
return n(o.DownloadTrigger, a(t, {
|
|
56
|
+
get class() {
|
|
57
|
+
return d(l.downloadTrigger, r.class);
|
|
58
|
+
},
|
|
59
|
+
get children() {
|
|
60
|
+
return r.children || [n(p, {
|
|
61
|
+
size: 14,
|
|
62
|
+
"aria-hidden": "true"
|
|
63
|
+
}), "Download"];
|
|
64
|
+
}
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
c.Original = o;
|
|
68
|
+
c.Frame = v;
|
|
69
|
+
c.Pattern = Q;
|
|
70
|
+
c.Overlay = w;
|
|
71
|
+
c.DownloadTrigger = P;
|
|
72
|
+
export {
|
|
73
|
+
c as QrCode,
|
|
74
|
+
P as QrCodeDownloadTrigger,
|
|
75
|
+
v as QrCodeFrame,
|
|
76
|
+
w as QrCodeOverlay,
|
|
77
|
+
Q as QrCodePattern
|
|
78
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const r = "_root_1d6r3_1", o = "_frame_1d6r3_8", e = "_overlay_1d6r3_17", a = "_downloadTrigger_1d6r3_33", _ = "_frameWrapper_1d6r3_59", d = {
|
|
2
|
+
root: r,
|
|
3
|
+
frame: o,
|
|
4
|
+
overlay: e,
|
|
5
|
+
downloadTrigger: a,
|
|
6
|
+
frameWrapper: _
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
d as default,
|
|
10
|
+
a as downloadTrigger,
|
|
11
|
+
o as frame,
|
|
12
|
+
_ as frameWrapper,
|
|
13
|
+
e as overlay,
|
|
14
|
+
r as root
|
|
15
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { createComponent as t, mergeProps as m } from "solid-js/web";
|
|
2
|
+
import { splitProps as n, mergeProps as l } from "solid-js";
|
|
3
|
+
import { RadioGroup as r } from "@ark-ui/solid";
|
|
4
|
+
import { bem as c } from "../utils/bem.js";
|
|
5
|
+
import { cn as p } from "../utils/cn.js";
|
|
6
|
+
import e from "./Radio.module.css.js";
|
|
7
|
+
const a = {
|
|
8
|
+
xs: e.sizeXs,
|
|
9
|
+
sm: e.sizeSm,
|
|
10
|
+
md: e.sizeMd,
|
|
11
|
+
lg: e.sizeLg,
|
|
12
|
+
xl: e.sizeXl,
|
|
13
|
+
"2xl": e.size2xl
|
|
14
|
+
}, d = {
|
|
15
|
+
size: "md"
|
|
16
|
+
};
|
|
17
|
+
function g(o) {
|
|
18
|
+
const [s, i] = n(l(d, o), ["class", "children", "size"]);
|
|
19
|
+
return t(r.Item, m(i, {
|
|
20
|
+
get class() {
|
|
21
|
+
return p(c(), e.item, a[s.size], s.class);
|
|
22
|
+
},
|
|
23
|
+
get children() {
|
|
24
|
+
return [t(r.ItemControl, {
|
|
25
|
+
get class() {
|
|
26
|
+
return e.control;
|
|
27
|
+
}
|
|
28
|
+
}), t(r.ItemText, {
|
|
29
|
+
get class() {
|
|
30
|
+
return e.text;
|
|
31
|
+
},
|
|
32
|
+
get children() {
|
|
33
|
+
return s.children;
|
|
34
|
+
}
|
|
35
|
+
}), t(r.ItemHiddenInput, {})];
|
|
36
|
+
}
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
g.Original = r;
|
|
40
|
+
export {
|
|
41
|
+
g as Radio
|
|
42
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const s = "_item_i6pys_1", i = "_control_i6pys_16", e = "_text_i6pys_70", _ = "_sizeXs_i6pys_82", t = "_sizeSm_i6pys_91", z = "_sizeMd_i6pys_100", o = "_sizeLg_i6pys_109", c = "_sizeXl_i6pys_118", n = "_size2xl_i6pys_127", l = {
|
|
2
|
+
item: s,
|
|
3
|
+
control: i,
|
|
4
|
+
text: e,
|
|
5
|
+
sizeXs: _,
|
|
6
|
+
sizeSm: t,
|
|
7
|
+
sizeMd: z,
|
|
8
|
+
sizeLg: o,
|
|
9
|
+
sizeXl: c,
|
|
10
|
+
size2xl: n
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
i as control,
|
|
14
|
+
l as default,
|
|
15
|
+
s as item,
|
|
16
|
+
n as size2xl,
|
|
17
|
+
o as sizeLg,
|
|
18
|
+
z as sizeMd,
|
|
19
|
+
t as sizeSm,
|
|
20
|
+
c as sizeXl,
|
|
21
|
+
_ as sizeXs,
|
|
22
|
+
e as text
|
|
23
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createComponent as t, mergeProps as m, memo as e } from "solid-js/web";
|
|
2
|
+
import { splitProps as i, mergeProps as n } from "solid-js";
|
|
3
|
+
import { RadioGroup as o } from "@ark-ui/solid";
|
|
4
|
+
import { bem as p } from "../utils/bem.js";
|
|
5
|
+
import { cn as c } from "../utils/cn.js";
|
|
6
|
+
import l from "./RadioGroup.module.css.js";
|
|
7
|
+
const u = {};
|
|
8
|
+
function d(s) {
|
|
9
|
+
const [r, a] = i(n(u, s), ["label", "class", "children", "defaultValue"]);
|
|
10
|
+
return t(o.Root, m(a, {
|
|
11
|
+
get class() {
|
|
12
|
+
return c(p(), l.root, r.class);
|
|
13
|
+
},
|
|
14
|
+
get children() {
|
|
15
|
+
return [e(() => e(() => !!r.label)() && t(o.Label, {
|
|
16
|
+
get class() {
|
|
17
|
+
return l.label;
|
|
18
|
+
},
|
|
19
|
+
get children() {
|
|
20
|
+
return r.label;
|
|
21
|
+
}
|
|
22
|
+
})), e(() => r.children)];
|
|
23
|
+
}
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
d.Original = o;
|
|
27
|
+
export {
|
|
28
|
+
d as RadioGroup
|
|
29
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { createComponent as e, mergeProps as o, memo as u, template as c } from "solid-js/web";
|
|
2
|
+
import { splitProps as i, Show as p } from "solid-js";
|
|
3
|
+
import { RatingGroup as n, useRatingGroupItemContext as g } from "@ark-ui/solid";
|
|
4
|
+
import { bem as h } from "../utils/bem.js";
|
|
5
|
+
import { cn as s } from "../utils/cn.js";
|
|
6
|
+
import a from "./RatingGroup.module.css.js";
|
|
7
|
+
var d = /* @__PURE__ */ c('<svg viewBox="0 0 24 24"fill=currentColor width=24 height=24><title>Full star</title><path d="M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 22 12 18.56 5.82 22 7 14.14l-5-4.87 6.91-1.01L12 2z">'), f = /* @__PURE__ */ c('<svg viewBox="0 0 24 24"width=24 height=24><title>Half star</title><defs><linearGradient id=half-gradient x1=0 x2=1 y1=0 y2=0><stop offset=50% stop-color=currentColor></stop><stop offset=50% stop-color=var(--color-neutral-6)></stop></linearGradient></defs><path d="M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 22 12 18.56 5.82 22 7 14.14l-5-4.87 6.91-1.01L12 2z"fill=url(#half-gradient)>'), m = /* @__PURE__ */ c('<svg viewBox="0 0 24 24"fill=currentColor width=24 height=24><title>Empty star</title><path d="M12 2l3.09 6.26L22 9.27l-5 4.87L18.18 22 12 18.56 5.82 22 7 14.14l-5-4.87 6.91-1.01L12 2z">');
|
|
8
|
+
function G() {
|
|
9
|
+
return d();
|
|
10
|
+
}
|
|
11
|
+
function L() {
|
|
12
|
+
return f();
|
|
13
|
+
}
|
|
14
|
+
function R() {
|
|
15
|
+
return m();
|
|
16
|
+
}
|
|
17
|
+
function C() {
|
|
18
|
+
const t = g()();
|
|
19
|
+
return e(p, {
|
|
20
|
+
get when() {
|
|
21
|
+
return t.half;
|
|
22
|
+
},
|
|
23
|
+
get fallback() {
|
|
24
|
+
return u(() => !!(t.checked || t.highlighted))() ? e(G, {}) : e(R, {});
|
|
25
|
+
},
|
|
26
|
+
get children() {
|
|
27
|
+
return e(L, {});
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function x(r) {
|
|
32
|
+
const [t, l] = i(r, ["class", "children", "defaultValue"]);
|
|
33
|
+
return e(n.Root, o(l, {
|
|
34
|
+
get class() {
|
|
35
|
+
return s(h(), a.root, t.class);
|
|
36
|
+
},
|
|
37
|
+
get children() {
|
|
38
|
+
return t.children;
|
|
39
|
+
}
|
|
40
|
+
}));
|
|
41
|
+
}
|
|
42
|
+
function S(r) {
|
|
43
|
+
const [t, l] = i(r, ["class"]);
|
|
44
|
+
return e(n.Label, o(l, {
|
|
45
|
+
get class() {
|
|
46
|
+
return s(a.label, t.class);
|
|
47
|
+
}
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
function z(r) {
|
|
51
|
+
const [t, l] = i(r, ["class", "children"]);
|
|
52
|
+
return e(n.Control, o(l, {
|
|
53
|
+
get class() {
|
|
54
|
+
return s(a.control, t.class);
|
|
55
|
+
},
|
|
56
|
+
get children() {
|
|
57
|
+
return t.children;
|
|
58
|
+
}
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
function B(r) {
|
|
62
|
+
const [t, l] = i(r, ["class", "children"]);
|
|
63
|
+
return e(n.Item, o(l, {
|
|
64
|
+
get class() {
|
|
65
|
+
return s(a.item, t.class);
|
|
66
|
+
},
|
|
67
|
+
get children() {
|
|
68
|
+
return t.children || e(C, {});
|
|
69
|
+
}
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
72
|
+
function M(r) {
|
|
73
|
+
const [t, l] = i(r, ["class"]);
|
|
74
|
+
return e(n.HiddenInput, o(l, {
|
|
75
|
+
get class() {
|
|
76
|
+
return t.class;
|
|
77
|
+
}
|
|
78
|
+
}));
|
|
79
|
+
}
|
|
80
|
+
x.Original = n;
|
|
81
|
+
export {
|
|
82
|
+
x as RatingGroup,
|
|
83
|
+
z as RatingGroupControl,
|
|
84
|
+
M as RatingGroupHiddenInput,
|
|
85
|
+
B as RatingGroupItem,
|
|
86
|
+
S as RatingGroupLabel
|
|
87
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { spread as p, mergeProps as i, insert as a, template as m } from "solid-js/web";
|
|
2
|
+
import { splitProps as n, mergeProps as l } from "solid-js";
|
|
3
|
+
import { bem as c } from "../utils/bem.js";
|
|
4
|
+
import { cn as f } from "../utils/cn.js";
|
|
5
|
+
import t from "./SafeArea.module.css.js";
|
|
6
|
+
var P = /* @__PURE__ */ m("<div>");
|
|
7
|
+
const d = {
|
|
8
|
+
position: "top"
|
|
9
|
+
};
|
|
10
|
+
function b(e) {
|
|
11
|
+
const [r, s] = n(l(d, e), ["class", "children", "position"]);
|
|
12
|
+
return (() => {
|
|
13
|
+
var o = P();
|
|
14
|
+
return p(o, i(s, {
|
|
15
|
+
"data-part": "root",
|
|
16
|
+
get class() {
|
|
17
|
+
return f(c(), t.base, t[r.position], r.class);
|
|
18
|
+
}
|
|
19
|
+
}), !1, !0), a(o, () => r.children), o;
|
|
20
|
+
})();
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
b as SafeArea
|
|
24
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const t = "_base_vi1b3_1", o = "_top_vi1b3_5", _ = "_bottom_vi1b3_9", s = "_left_vi1b3_13", b = "_right_vi1b3_17", e = {
|
|
2
|
+
base: t,
|
|
3
|
+
top: o,
|
|
4
|
+
bottom: _,
|
|
5
|
+
left: s,
|
|
6
|
+
right: b
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
t as base,
|
|
10
|
+
_ as bottom,
|
|
11
|
+
e as default,
|
|
12
|
+
s as left,
|
|
13
|
+
b as right,
|
|
14
|
+
o as top
|
|
15
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { createComponent as s, mergeProps as g, memo as b, insert as h, effect as v, className as C, template as y, delegateEvents as I } from "solid-js/web";
|
|
2
|
+
import { splitProps as P, mergeProps as z, createSignal as $, on as k, onCleanup as w } from "solid-js";
|
|
3
|
+
import { X as N, Search as S } from "lucide-solid";
|
|
4
|
+
import { Input as _ } from "../Input/Input.js";
|
|
5
|
+
import { bem as a } from "../utils/bem.js";
|
|
6
|
+
import { cn as o } from "../utils/cn.js";
|
|
7
|
+
import i from "./SearchInput.module.css.js";
|
|
8
|
+
var x = /* @__PURE__ */ y('<button type=button aria-label="Clear search">');
|
|
9
|
+
const K = {
|
|
10
|
+
variant: "outline",
|
|
11
|
+
size: "md",
|
|
12
|
+
disabled: !1,
|
|
13
|
+
debounce: 300
|
|
14
|
+
};
|
|
15
|
+
function O(c) {
|
|
16
|
+
const [e, m] = P(z(K, c), ["variant", "size", "class", "inputClassName", "onKeywordChange", "debounce", "disabled", "placeholder", "onInput"]), [u, l] = $("");
|
|
17
|
+
let n;
|
|
18
|
+
k(u, (t) => {
|
|
19
|
+
const r = setTimeout(() => {
|
|
20
|
+
var p;
|
|
21
|
+
(p = e.onKeywordChange) == null || p.call(e, t);
|
|
22
|
+
}, e.debounce);
|
|
23
|
+
w(() => clearTimeout(r));
|
|
24
|
+
});
|
|
25
|
+
const d = (t) => {
|
|
26
|
+
var r;
|
|
27
|
+
l(t.target.value), (r = e.onInput) == null || r.call(e, t);
|
|
28
|
+
}, f = () => {
|
|
29
|
+
l(""), n && (n.value = "", n.focus());
|
|
30
|
+
};
|
|
31
|
+
return s(_, g({
|
|
32
|
+
ref(t) {
|
|
33
|
+
var r = n;
|
|
34
|
+
typeof r == "function" ? r(t) : n = t;
|
|
35
|
+
},
|
|
36
|
+
get variant() {
|
|
37
|
+
return e.variant;
|
|
38
|
+
},
|
|
39
|
+
get size() {
|
|
40
|
+
return e.size;
|
|
41
|
+
},
|
|
42
|
+
get disabled() {
|
|
43
|
+
return e.disabled;
|
|
44
|
+
},
|
|
45
|
+
get class() {
|
|
46
|
+
return o(a("balik-search-input", e.variant, e.size), e.class);
|
|
47
|
+
},
|
|
48
|
+
get inputClassName() {
|
|
49
|
+
return o(i.input, a(), e.inputClassName);
|
|
50
|
+
},
|
|
51
|
+
type: "search",
|
|
52
|
+
autocomplete: "off",
|
|
53
|
+
get placeholder() {
|
|
54
|
+
return e.placeholder;
|
|
55
|
+
},
|
|
56
|
+
onInput: d,
|
|
57
|
+
get prefix() {
|
|
58
|
+
return s(S, {
|
|
59
|
+
"aria-hidden": "true",
|
|
60
|
+
get class() {
|
|
61
|
+
return o(a(), i.icon);
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
get suffix() {
|
|
66
|
+
return b(() => !!(u() && !e.disabled))() ? (() => {
|
|
67
|
+
var t = x();
|
|
68
|
+
return t.$$click = f, h(t, s(N, {})), v(() => C(t, o(a(), i.clear))), t;
|
|
69
|
+
})() : null;
|
|
70
|
+
}
|
|
71
|
+
}, m));
|
|
72
|
+
}
|
|
73
|
+
I(["click"]);
|
|
74
|
+
export {
|
|
75
|
+
O as SearchInput
|
|
76
|
+
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { insert as u, createComponent as l, mergeProps as b, effect as c, className as d, template as f, memo as S, setAttribute as $, delegateEvents as C } from "solid-js/web";
|
|
2
|
+
import { splitProps as x, mergeProps as _, createSignal as w, createEffect as O, createMemo as I, For as L } from "solid-js";
|
|
3
|
+
import { Select as n, useSelectContext as T } from "@ark-ui/solid";
|
|
4
|
+
import { ChevronDown as k } from "lucide-solid";
|
|
5
|
+
import { BottomSheet as y } from "../BottomSheet/BottomSheet.js";
|
|
6
|
+
import { bem as E } from "../utils/bem.js";
|
|
7
|
+
import { cn as A } from "../utils/cn.js";
|
|
8
|
+
import t from "./Select.module.css.js";
|
|
9
|
+
var z = /* @__PURE__ */ f("<div>"), B = /* @__PURE__ */ f("<div><input>"), D = /* @__PURE__ */ f("<span>");
|
|
10
|
+
const F = {
|
|
11
|
+
xs: t.triggerSizeXs,
|
|
12
|
+
sm: t.triggerSizeSm,
|
|
13
|
+
md: t.triggerSizeMd,
|
|
14
|
+
lg: t.triggerSizeLg,
|
|
15
|
+
xl: t.triggerSizeXl
|
|
16
|
+
};
|
|
17
|
+
function M(g) {
|
|
18
|
+
const e = T(), m = () => e().open, [s, a] = w("");
|
|
19
|
+
O(() => {
|
|
20
|
+
e().open || a("");
|
|
21
|
+
});
|
|
22
|
+
const P = I(() => {
|
|
23
|
+
const r = s().toLowerCase();
|
|
24
|
+
return r ? e().collection.items.filter((i) => i.label.toLowerCase().includes(r)) : e().collection.items;
|
|
25
|
+
});
|
|
26
|
+
return l(y, {
|
|
27
|
+
get open() {
|
|
28
|
+
return m();
|
|
29
|
+
},
|
|
30
|
+
get class() {
|
|
31
|
+
return t.sheet;
|
|
32
|
+
},
|
|
33
|
+
onOpenChange: (r) => {
|
|
34
|
+
r.open || e().setOpen(!1);
|
|
35
|
+
},
|
|
36
|
+
get children() {
|
|
37
|
+
return [S(() => S(() => !!g.filter)() && (() => {
|
|
38
|
+
var r = B(), i = r.firstChild;
|
|
39
|
+
return i.$$input = (o) => a(o.target.value), c((o) => {
|
|
40
|
+
var p = t.filterWrapper, h = t.filterInput, v = g.filterPlaceholder || "Search...";
|
|
41
|
+
return p !== o.e && d(r, o.e = p), h !== o.t && d(i, o.t = h), v !== o.a && $(i, "placeholder", o.a = v), o;
|
|
42
|
+
}, {
|
|
43
|
+
e: void 0,
|
|
44
|
+
t: void 0,
|
|
45
|
+
a: void 0
|
|
46
|
+
}), c(() => i.value = s()), r;
|
|
47
|
+
})()), (() => {
|
|
48
|
+
var r = z();
|
|
49
|
+
return u(r, l(L, {
|
|
50
|
+
get each() {
|
|
51
|
+
return P();
|
|
52
|
+
},
|
|
53
|
+
children: (i) => l(n.Item, {
|
|
54
|
+
item: i,
|
|
55
|
+
get class() {
|
|
56
|
+
return t.item;
|
|
57
|
+
},
|
|
58
|
+
get children() {
|
|
59
|
+
return l(n.ItemText, {
|
|
60
|
+
get children() {
|
|
61
|
+
return i.label;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
})), c(() => d(r, t.list)), r;
|
|
67
|
+
})()];
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
const R = {
|
|
72
|
+
size: "md",
|
|
73
|
+
disabled: !1,
|
|
74
|
+
filter: !1
|
|
75
|
+
};
|
|
76
|
+
function V(g) {
|
|
77
|
+
const [e, m] = x(_(R, g), ["size", "class", "collection", "placeholder", "disabled", "filter", "filterPlaceholder", "defaultValue"]);
|
|
78
|
+
return (() => {
|
|
79
|
+
var s = z();
|
|
80
|
+
return u(s, l(n.Root, b({
|
|
81
|
+
get collection() {
|
|
82
|
+
return e.collection;
|
|
83
|
+
},
|
|
84
|
+
get disabled() {
|
|
85
|
+
return e.disabled;
|
|
86
|
+
}
|
|
87
|
+
}, m, {
|
|
88
|
+
get children() {
|
|
89
|
+
return [l(n.Trigger, {
|
|
90
|
+
get class() {
|
|
91
|
+
return A(E("balik-select", e.size), t.triggerBase, F[e.size], e.class);
|
|
92
|
+
},
|
|
93
|
+
get children() {
|
|
94
|
+
return [l(n.ValueText, {
|
|
95
|
+
get placeholder() {
|
|
96
|
+
return e.placeholder;
|
|
97
|
+
}
|
|
98
|
+
}), (() => {
|
|
99
|
+
var a = D();
|
|
100
|
+
return u(a, l(k, {
|
|
101
|
+
size: "1em",
|
|
102
|
+
"aria-hidden": "true"
|
|
103
|
+
})), c(() => d(a, t.indicator)), a;
|
|
104
|
+
})()];
|
|
105
|
+
}
|
|
106
|
+
}), l(M, {
|
|
107
|
+
get filter() {
|
|
108
|
+
return e.filter;
|
|
109
|
+
},
|
|
110
|
+
get filterPlaceholder() {
|
|
111
|
+
return e.filterPlaceholder;
|
|
112
|
+
}
|
|
113
|
+
}), l(n.HiddenSelect, {})];
|
|
114
|
+
}
|
|
115
|
+
}))), c(() => d(s, t.root)), s;
|
|
116
|
+
})();
|
|
117
|
+
}
|
|
118
|
+
V.Original = n;
|
|
119
|
+
C(["input"]);
|
|
120
|
+
export {
|
|
121
|
+
V as Select
|
|
122
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const r = "_root_vfnuu_1", t = "_triggerBase_vfnuu_5", e = "_indicator_vfnuu_46", i = "_triggerSizeXs_vfnuu_50", g = "_triggerSizeSm_vfnuu_58", _ = "_triggerSizeMd_vfnuu_66", n = "_triggerSizeLg_vfnuu_74", s = "_triggerSizeXl_vfnuu_82", u = "_filterWrapper_vfnuu_98", o = "_filterInput_vfnuu_103", f = "_list_vfnuu_125", S = "_sheet_vfnuu_132", c = {
|
|
2
|
+
root: r,
|
|
3
|
+
triggerBase: t,
|
|
4
|
+
indicator: e,
|
|
5
|
+
triggerSizeXs: i,
|
|
6
|
+
triggerSizeSm: g,
|
|
7
|
+
triggerSizeMd: _,
|
|
8
|
+
triggerSizeLg: n,
|
|
9
|
+
triggerSizeXl: s,
|
|
10
|
+
filterWrapper: u,
|
|
11
|
+
filterInput: o,
|
|
12
|
+
list: f,
|
|
13
|
+
sheet: S
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
c as default,
|
|
17
|
+
o as filterInput,
|
|
18
|
+
u as filterWrapper,
|
|
19
|
+
e as indicator,
|
|
20
|
+
f as list,
|
|
21
|
+
r as root,
|
|
22
|
+
S as sheet,
|
|
23
|
+
t as triggerBase,
|
|
24
|
+
n as triggerSizeLg,
|
|
25
|
+
_ as triggerSizeMd,
|
|
26
|
+
g as triggerSizeSm,
|
|
27
|
+
s as triggerSizeXl,
|
|
28
|
+
i as triggerSizeXs
|
|
29
|
+
};
|