@balikjs/mobile 0.1.5 → 0.1.6
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,174 @@
|
|
|
1
|
+
import { createComponent as l, mergeProps as i, memo as p, effect as u, className as d, insert as h, template as m } from "solid-js/web";
|
|
2
|
+
import { splitProps as a } from "solid-js";
|
|
3
|
+
import { FileUpload as s } from "@ark-ui/solid";
|
|
4
|
+
import { Trash2 as f, Upload as g, X as I, File as F } from "lucide-solid";
|
|
5
|
+
import { bem as U } from "../utils/bem.js";
|
|
6
|
+
import { cn as c } from "../utils/cn.js";
|
|
7
|
+
import n from "./FileUpload.module.css.js";
|
|
8
|
+
var v = /* @__PURE__ */ m("<span>Drag & drop files here, or click to browse"), T = /* @__PURE__ */ m("<div>");
|
|
9
|
+
function z(r) {
|
|
10
|
+
const [e, t] = a(r, ["class", "children"]);
|
|
11
|
+
return l(s.Root, i(t, {
|
|
12
|
+
get class() {
|
|
13
|
+
return c(U(), n.root, e.class);
|
|
14
|
+
},
|
|
15
|
+
get children() {
|
|
16
|
+
return [p(() => e.children), l(s.HiddenInput, {})];
|
|
17
|
+
}
|
|
18
|
+
}));
|
|
19
|
+
}
|
|
20
|
+
function _(r) {
|
|
21
|
+
const [e, t] = a(r, ["class"]);
|
|
22
|
+
return l(s.Label, i(t, {
|
|
23
|
+
get class() {
|
|
24
|
+
return c(n.label, e.class);
|
|
25
|
+
}
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
function $(r) {
|
|
29
|
+
const [e, t] = a(r, ["class", "children"]);
|
|
30
|
+
return l(s.Dropzone, i(t, {
|
|
31
|
+
get class() {
|
|
32
|
+
return c(n.dropzone, e.class);
|
|
33
|
+
},
|
|
34
|
+
get children() {
|
|
35
|
+
return e.children || [l(g, {
|
|
36
|
+
get class() {
|
|
37
|
+
return n.dropzoneIcon;
|
|
38
|
+
},
|
|
39
|
+
"aria-hidden": "true"
|
|
40
|
+
}), (() => {
|
|
41
|
+
var o = v();
|
|
42
|
+
return u(() => d(o, n.dropzoneText)), o;
|
|
43
|
+
})()];
|
|
44
|
+
}
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
function G(r) {
|
|
48
|
+
const [e, t] = a(r, ["class", "children"]);
|
|
49
|
+
return l(s.Trigger, i(t, {
|
|
50
|
+
get class() {
|
|
51
|
+
return c(n.trigger, e.class);
|
|
52
|
+
},
|
|
53
|
+
get children() {
|
|
54
|
+
return e.children || [l(g, {
|
|
55
|
+
size: 16,
|
|
56
|
+
"aria-hidden": "true"
|
|
57
|
+
}), "Upload"];
|
|
58
|
+
}
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
function S(r) {
|
|
62
|
+
const [e, t] = a(r, ["class", "children"]);
|
|
63
|
+
return l(s.ItemGroup, i(t, {
|
|
64
|
+
get class() {
|
|
65
|
+
return c(n.itemGroup, e.class);
|
|
66
|
+
},
|
|
67
|
+
get children() {
|
|
68
|
+
return e.children;
|
|
69
|
+
}
|
|
70
|
+
}));
|
|
71
|
+
}
|
|
72
|
+
function k(r) {
|
|
73
|
+
const [e, t] = a(r, ["class", "children"]);
|
|
74
|
+
return l(s.Item, i(t, {
|
|
75
|
+
get class() {
|
|
76
|
+
return c(n.item, e.class);
|
|
77
|
+
},
|
|
78
|
+
get children() {
|
|
79
|
+
return e.children;
|
|
80
|
+
}
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
function H(r) {
|
|
84
|
+
const [e, t] = a(r, ["class", "children"]);
|
|
85
|
+
return l(s.ItemPreview, i(t, {
|
|
86
|
+
get class() {
|
|
87
|
+
return c(n.itemPreview, e.class);
|
|
88
|
+
},
|
|
89
|
+
get children() {
|
|
90
|
+
return [l(s.ItemPreviewImage, {
|
|
91
|
+
get class() {
|
|
92
|
+
return n.itemPreviewImage;
|
|
93
|
+
}
|
|
94
|
+
}), (() => {
|
|
95
|
+
var o = T();
|
|
96
|
+
return h(o, l(F, {
|
|
97
|
+
size: "100%",
|
|
98
|
+
"aria-hidden": "true"
|
|
99
|
+
})), u(() => d(o, n.itemPreviewFallback)), o;
|
|
100
|
+
})()];
|
|
101
|
+
}
|
|
102
|
+
}));
|
|
103
|
+
}
|
|
104
|
+
function L(r) {
|
|
105
|
+
const [e, t] = a(r, ["class"]);
|
|
106
|
+
return l(s.ItemPreviewImage, i(t, {
|
|
107
|
+
get class() {
|
|
108
|
+
return c(n.itemPreviewImage, e.class);
|
|
109
|
+
}
|
|
110
|
+
}));
|
|
111
|
+
}
|
|
112
|
+
function R(r) {
|
|
113
|
+
const [e, t] = a(r, ["class"]);
|
|
114
|
+
return l(s.ItemName, i(t, {
|
|
115
|
+
get class() {
|
|
116
|
+
return c(n.itemName, e.class);
|
|
117
|
+
}
|
|
118
|
+
}));
|
|
119
|
+
}
|
|
120
|
+
function y(r) {
|
|
121
|
+
const [e, t] = a(r, ["class"]);
|
|
122
|
+
return l(s.ItemSizeText, i(t, {
|
|
123
|
+
get class() {
|
|
124
|
+
return c(n.itemSizeText, e.class);
|
|
125
|
+
}
|
|
126
|
+
}));
|
|
127
|
+
}
|
|
128
|
+
function O(r) {
|
|
129
|
+
const [e, t] = a(r, ["class"]);
|
|
130
|
+
return l(s.ItemDeleteTrigger, i(t, {
|
|
131
|
+
get class() {
|
|
132
|
+
return c(n.itemDeleteTrigger, e.class);
|
|
133
|
+
},
|
|
134
|
+
get children() {
|
|
135
|
+
return l(I, {
|
|
136
|
+
size: 16,
|
|
137
|
+
"aria-hidden": "true"
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
}));
|
|
141
|
+
}
|
|
142
|
+
function X(r) {
|
|
143
|
+
const [e, t] = a(r, ["class", "children"]);
|
|
144
|
+
return l(s.ClearTrigger, i(t, {
|
|
145
|
+
get class() {
|
|
146
|
+
return c(n.clearTrigger, e.class);
|
|
147
|
+
},
|
|
148
|
+
get children() {
|
|
149
|
+
return e.children || [l(f, {
|
|
150
|
+
size: 14,
|
|
151
|
+
"aria-hidden": "true"
|
|
152
|
+
}), "Clear"];
|
|
153
|
+
}
|
|
154
|
+
}));
|
|
155
|
+
}
|
|
156
|
+
function j() {
|
|
157
|
+
return null;
|
|
158
|
+
}
|
|
159
|
+
z.Original = s;
|
|
160
|
+
export {
|
|
161
|
+
z as FileUpload,
|
|
162
|
+
X as FileUploadClearTrigger,
|
|
163
|
+
$ as FileUploadDropzone,
|
|
164
|
+
j as FileUploadHiddenInput,
|
|
165
|
+
k as FileUploadItem,
|
|
166
|
+
O as FileUploadItemDeleteTrigger,
|
|
167
|
+
S as FileUploadItemGroup,
|
|
168
|
+
R as FileUploadItemName,
|
|
169
|
+
H as FileUploadItemPreview,
|
|
170
|
+
L as FileUploadItemPreviewImage,
|
|
171
|
+
y as FileUploadItemSizeText,
|
|
172
|
+
_ as FileUploadLabel,
|
|
173
|
+
G as FileUploadTrigger
|
|
174
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const e = "_root_1xrbf_1", r = "_label_1xrbf_7", t = "_dropzone_1xrbf_13", o = "_dropzoneIcon_1xrbf_48", i = "_dropzoneText_1xrbf_54", _ = "_itemGroup_1xrbf_60", m = "_item_1xrbf_60", n = "_itemPreview_1xrbf_79", c = "_itemPreviewImage_1xrbf_91", x = "_itemPreviewFallback_1xrbf_97", b = "_itemName_1xrbf_108", g = "_itemSizeText_1xrbf_116", a = "_itemDeleteTrigger_1xrbf_122", l = "_trigger_1xrbf_151", s = "_clearTrigger_1xrbf_183", f = {
|
|
2
|
+
root: e,
|
|
3
|
+
label: r,
|
|
4
|
+
dropzone: t,
|
|
5
|
+
dropzoneIcon: o,
|
|
6
|
+
dropzoneText: i,
|
|
7
|
+
itemGroup: _,
|
|
8
|
+
item: m,
|
|
9
|
+
itemPreview: n,
|
|
10
|
+
itemPreviewImage: c,
|
|
11
|
+
itemPreviewFallback: x,
|
|
12
|
+
itemName: b,
|
|
13
|
+
itemSizeText: g,
|
|
14
|
+
itemDeleteTrigger: a,
|
|
15
|
+
trigger: l,
|
|
16
|
+
clearTrigger: s
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
s as clearTrigger,
|
|
20
|
+
f as default,
|
|
21
|
+
t as dropzone,
|
|
22
|
+
o as dropzoneIcon,
|
|
23
|
+
i as dropzoneText,
|
|
24
|
+
m as item,
|
|
25
|
+
a as itemDeleteTrigger,
|
|
26
|
+
_ as itemGroup,
|
|
27
|
+
b as itemName,
|
|
28
|
+
n as itemPreview,
|
|
29
|
+
x as itemPreviewFallback,
|
|
30
|
+
c as itemPreviewImage,
|
|
31
|
+
g as itemSizeText,
|
|
32
|
+
r as label,
|
|
33
|
+
e as root,
|
|
34
|
+
l as trigger
|
|
35
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { insert as z, createComponent as c, memo as S, effect as X, className as m, style as $, setAttribute as E, template as M, delegateEvents as N } from "solid-js/web";
|
|
2
|
+
import { createSignal as O, For as R } from "solid-js";
|
|
3
|
+
import { ToggleGroup as y } from "@ark-ui/solid";
|
|
4
|
+
import { bem as r } from "../utils/bem.js";
|
|
5
|
+
import { cn as a } from "../utils/cn.js";
|
|
6
|
+
import l from "./FilterGroup.module.css.js";
|
|
7
|
+
var T = /* @__PURE__ */ M("<div><div><button type=button>");
|
|
8
|
+
const j = {
|
|
9
|
+
xs: l.sizeXs,
|
|
10
|
+
sm: l.sizeSm,
|
|
11
|
+
md: l.sizeMd,
|
|
12
|
+
lg: l.sizeLg,
|
|
13
|
+
xl: l.sizeXl
|
|
14
|
+
}, K = (t) => {
|
|
15
|
+
const k = t.allLabel ?? "All", V = t.items ?? [], x = t.size ?? "md", s = () => t.sticky ?? !1, [A, L] = O(t.defaultValue ?? []), d = () => t.value !== void 0, v = () => d() ? t.value ?? [] : A(), u = () => v().length === 0, g = (i) => {
|
|
16
|
+
var n;
|
|
17
|
+
d() || L(i), (n = t.onValueChange) == null || n.call(t, i);
|
|
18
|
+
}, F = () => {
|
|
19
|
+
u() || g([]);
|
|
20
|
+
}, G = (i) => {
|
|
21
|
+
g(i.value);
|
|
22
|
+
};
|
|
23
|
+
return (() => {
|
|
24
|
+
var i = T(), n = i.firstChild, o = n.firstChild;
|
|
25
|
+
return o.$$click = F, z(o, k), z(n, c(y.Root, {
|
|
26
|
+
get class() {
|
|
27
|
+
return a(l.list, r(), t.groupClass);
|
|
28
|
+
},
|
|
29
|
+
multiple: !0,
|
|
30
|
+
get value() {
|
|
31
|
+
return S(() => !!u())() ? [] : v();
|
|
32
|
+
},
|
|
33
|
+
onValueChange: G,
|
|
34
|
+
get children() {
|
|
35
|
+
return c(R, {
|
|
36
|
+
each: V,
|
|
37
|
+
children: (e) => c(y.Item, {
|
|
38
|
+
get class() {
|
|
39
|
+
return a(l.item, r(), t.buttonClass);
|
|
40
|
+
},
|
|
41
|
+
get value() {
|
|
42
|
+
return e.value;
|
|
43
|
+
},
|
|
44
|
+
get disabled() {
|
|
45
|
+
return e.disabled;
|
|
46
|
+
},
|
|
47
|
+
get children() {
|
|
48
|
+
return e.label;
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}), null), X((e) => {
|
|
54
|
+
var f = a(r(), t.class), h = a(l.group, j[x], s() && l.sticky), I = typeof s() == "number" ? {
|
|
55
|
+
top: `${s()}px`
|
|
56
|
+
} : void 0, b = a(l.item, r(), t.buttonClass), C = u() ? "on" : "off";
|
|
57
|
+
return f !== e.e && m(i, e.e = f), h !== e.t && m(n, e.t = h), e.a = $(n, I, e.a), b !== e.o && m(o, e.o = b), C !== e.i && E(o, "data-state", e.i = C), e;
|
|
58
|
+
}, {
|
|
59
|
+
e: void 0,
|
|
60
|
+
t: void 0,
|
|
61
|
+
a: void 0,
|
|
62
|
+
o: void 0,
|
|
63
|
+
i: void 0
|
|
64
|
+
}), i;
|
|
65
|
+
})();
|
|
66
|
+
};
|
|
67
|
+
N(["click"]);
|
|
68
|
+
export {
|
|
69
|
+
K as FilterGroup
|
|
70
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const s = "_group_1m5wj_1", _ = "_sticky_1m5wj_9", i = "_list_1m5wj_16", t = "_item_1m5wj_31", e = "_sizeXs_1m5wj_90", m = "_sizeSm_1m5wj_97", z = "_sizeMd_1m5wj_104", o = "_sizeLg_1m5wj_111", c = "_sizeXl_1m5wj_118", n = {
|
|
2
|
+
group: s,
|
|
3
|
+
sticky: _,
|
|
4
|
+
list: i,
|
|
5
|
+
item: t,
|
|
6
|
+
sizeXs: e,
|
|
7
|
+
sizeSm: m,
|
|
8
|
+
sizeMd: z,
|
|
9
|
+
sizeLg: o,
|
|
10
|
+
sizeXl: c
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
n as default,
|
|
14
|
+
s as group,
|
|
15
|
+
t as item,
|
|
16
|
+
i as list,
|
|
17
|
+
o as sizeLg,
|
|
18
|
+
z as sizeMd,
|
|
19
|
+
m as sizeSm,
|
|
20
|
+
c as sizeXl,
|
|
21
|
+
e as sizeXs,
|
|
22
|
+
_ as sticky
|
|
23
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { className as p, insert as a, memo as u, effect as m, createComponent as _, mergeProps as y, setAttribute as S, template as l, delegateEvents as C } from "solid-js/web";
|
|
2
|
+
import { splitProps as L, mergeProps as A, createSignal as M } from "solid-js";
|
|
3
|
+
import { ark as h } from "@ark-ui/solid/factory";
|
|
4
|
+
import { bem as n } from "../utils/bem.js";
|
|
5
|
+
import { cn as o } from "../utils/cn.js";
|
|
6
|
+
import t from "./Input.module.css.js";
|
|
7
|
+
var N = /* @__PURE__ */ l("<div data-part=root>"), g = /* @__PURE__ */ l("<span data-part=affix>"), j = /* @__PURE__ */ l("<button type=button data-part=password-toggle tabindex=-1>"), B = /* @__PURE__ */ l('<svg fill=none stroke=currentColor strokeLinecap=round strokeLinejoin=round strokeWidth=2 viewBox="0 0 24 24"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94"></path><path d="M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19"></path><line x1=1 y1=1 x2=23 y2=23>'), E = /* @__PURE__ */ l('<svg fill=none stroke=currentColor strokeLinecap=round strokeLinejoin=round strokeWidth=2 viewBox="0 0 24 24"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx=12 cy=12 r=3>');
|
|
8
|
+
const O = {
|
|
9
|
+
solid: t.solid,
|
|
10
|
+
outline: t.outline,
|
|
11
|
+
singleline: t.singleline
|
|
12
|
+
}, T = {
|
|
13
|
+
xs: t.sizeXs,
|
|
14
|
+
sm: t.sizeSm,
|
|
15
|
+
md: t.sizeMd,
|
|
16
|
+
lg: t.sizeLg,
|
|
17
|
+
xl: t.sizeXl
|
|
18
|
+
}, W = {
|
|
19
|
+
variant: "outline",
|
|
20
|
+
size: "md",
|
|
21
|
+
disabled: !1
|
|
22
|
+
};
|
|
23
|
+
function X(w) {
|
|
24
|
+
const [e, b] = L(A(W, w), ["variant", "size", "class", "inputClassName", "type", "prefix", "suffix", "disabled"]), [d, $] = M(!1), f = e.type === "password", k = e.prefix != null, z = e.suffix != null || f, P = o(n("balik-input", e.variant, e.size), t.base, O[e.variant], T[e.size], e.disabled && t.disabled, k && t.hasPrefix, z && t.hasSuffix, e.class);
|
|
25
|
+
return (() => {
|
|
26
|
+
var i = N();
|
|
27
|
+
return p(i, P), a(i, (() => {
|
|
28
|
+
var c = u(() => e.prefix != null);
|
|
29
|
+
return () => c() && (() => {
|
|
30
|
+
var r = g();
|
|
31
|
+
return a(r, () => e.prefix), m(() => p(r, o(n(), t.affix))), r;
|
|
32
|
+
})();
|
|
33
|
+
})(), null), a(i, _(h.input, y(b, {
|
|
34
|
+
get disabled() {
|
|
35
|
+
return e.disabled;
|
|
36
|
+
},
|
|
37
|
+
get type() {
|
|
38
|
+
return f ? d() ? "text" : "password" : e.type;
|
|
39
|
+
},
|
|
40
|
+
get class() {
|
|
41
|
+
return o(n(), t.input, e.inputClassName);
|
|
42
|
+
}
|
|
43
|
+
})), null), a(i, (() => {
|
|
44
|
+
var c = u(() => !!(f && e.suffix == null));
|
|
45
|
+
return () => c() ? (() => {
|
|
46
|
+
var r = j();
|
|
47
|
+
return r.$$click = () => $((s) => !s), a(r, (() => {
|
|
48
|
+
var s = u(() => !!d());
|
|
49
|
+
return () => s() ? B() : E();
|
|
50
|
+
})()), m((s) => {
|
|
51
|
+
var x = o(n(), t.passwordToggle), v = d() ? "Hide password" : "Show password";
|
|
52
|
+
return x !== s.e && p(r, s.e = x), v !== s.t && S(r, "aria-label", s.t = v), s;
|
|
53
|
+
}, {
|
|
54
|
+
e: void 0,
|
|
55
|
+
t: void 0
|
|
56
|
+
}), r;
|
|
57
|
+
})() : u(() => e.suffix != null)() ? (() => {
|
|
58
|
+
var r = g();
|
|
59
|
+
return a(r, () => e.suffix), m(() => p(r, o(n(), t.affix))), r;
|
|
60
|
+
})() : null;
|
|
61
|
+
})(), null), i;
|
|
62
|
+
})();
|
|
63
|
+
}
|
|
64
|
+
X.Original = h;
|
|
65
|
+
C(["click"]);
|
|
66
|
+
export {
|
|
67
|
+
X as Input
|
|
68
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const s = "_base_d4mcr_1", _ = "_input_d4mcr_19", i = "_affix_d4mcr_38", e = "_passwordToggle_d4mcr_64", c = "_solid_d4mcr_99", d = "_outline_d4mcr_108", o = "_singleline_d4mcr_118", n = "_disabled_d4mcr_130", t = "_sizeXs_d4mcr_137", l = "_sizeSm_d4mcr_146", r = "_sizeMd_d4mcr_155", a = "_sizeLg_d4mcr_164", m = "_sizeXl_d4mcr_173", f = "_hasPrefix_d4mcr_185", z = "_hasSuffix_d4mcr_189", g = {
|
|
2
|
+
base: s,
|
|
3
|
+
input: _,
|
|
4
|
+
affix: i,
|
|
5
|
+
passwordToggle: e,
|
|
6
|
+
solid: c,
|
|
7
|
+
outline: d,
|
|
8
|
+
singleline: o,
|
|
9
|
+
disabled: n,
|
|
10
|
+
sizeXs: t,
|
|
11
|
+
sizeSm: l,
|
|
12
|
+
sizeMd: r,
|
|
13
|
+
sizeLg: a,
|
|
14
|
+
sizeXl: m,
|
|
15
|
+
hasPrefix: f,
|
|
16
|
+
hasSuffix: z
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
i as affix,
|
|
20
|
+
s as base,
|
|
21
|
+
g as default,
|
|
22
|
+
n as disabled,
|
|
23
|
+
f as hasPrefix,
|
|
24
|
+
z as hasSuffix,
|
|
25
|
+
_ as input,
|
|
26
|
+
d as outline,
|
|
27
|
+
e as passwordToggle,
|
|
28
|
+
o as singleline,
|
|
29
|
+
a as sizeLg,
|
|
30
|
+
r as sizeMd,
|
|
31
|
+
l as sizeSm,
|
|
32
|
+
m as sizeXl,
|
|
33
|
+
t as sizeXs,
|
|
34
|
+
c as solid
|
|
35
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { spread as s, mergeProps as m, insert as a, template as p } from "solid-js/web";
|
|
2
|
+
import { splitProps as l, mergeProps as n } from "solid-js";
|
|
3
|
+
import { bem as i } from "../utils/bem.js";
|
|
4
|
+
import { cn as c } from "../utils/cn.js";
|
|
5
|
+
import f from "./Link.module.css.js";
|
|
6
|
+
var P = /* @__PURE__ */ p("<a>");
|
|
7
|
+
const u = {};
|
|
8
|
+
function h(t) {
|
|
9
|
+
const [e, o] = l(n(u, t), ["class", "children"]);
|
|
10
|
+
return (() => {
|
|
11
|
+
var r = P();
|
|
12
|
+
return s(r, m(o, {
|
|
13
|
+
"data-part": "root",
|
|
14
|
+
get class() {
|
|
15
|
+
return c(i(), f.base, e.class);
|
|
16
|
+
}
|
|
17
|
+
}), !1, !0), a(r, () => e.children), r;
|
|
18
|
+
})();
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
h as Link
|
|
22
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { createComponent as I, mergeProps as P, memo as g, insert as y, effect as v, className as h, template as V } from "solid-js/web";
|
|
2
|
+
import { splitProps as $, mergeProps as z, createSignal as x, createEffect as S, on as _ } from "solid-js";
|
|
3
|
+
import { Input as B } from "../Input/Input.js";
|
|
4
|
+
import { bem as N } from "../utils/bem.js";
|
|
5
|
+
import { cn as b } from "../utils/cn.js";
|
|
6
|
+
import F from "./MoneyInput.module.css.js";
|
|
7
|
+
var C = /* @__PURE__ */ V("<span>");
|
|
8
|
+
const K = {
|
|
9
|
+
variant: "outline",
|
|
10
|
+
size: "md",
|
|
11
|
+
disabled: !1,
|
|
12
|
+
precision: 2,
|
|
13
|
+
min: 0
|
|
14
|
+
};
|
|
15
|
+
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
|
+
let s;
|
|
18
|
+
const u = (n) => {
|
|
19
|
+
if (n == null || Number.isNaN(n)) return "";
|
|
20
|
+
const r = e.locale ?? (typeof navigator < "u" ? navigator.language : "en-US");
|
|
21
|
+
try {
|
|
22
|
+
return new Intl.NumberFormat(r, {
|
|
23
|
+
minimumFractionDigits: e.precision,
|
|
24
|
+
maximumFractionDigits: e.precision
|
|
25
|
+
}).format(n);
|
|
26
|
+
} catch {
|
|
27
|
+
return n.toFixed(e.precision);
|
|
28
|
+
}
|
|
29
|
+
}, c = (n) => {
|
|
30
|
+
if (!n || n === "-") return null;
|
|
31
|
+
const r = n.replace(/[^\d.-]/g, ""), i = Number.parseFloat(r);
|
|
32
|
+
return Number.isNaN(i) || e.min !== void 0 && i < e.min || e.max !== void 0 && i > e.max ? null : i;
|
|
33
|
+
};
|
|
34
|
+
return S(_(() => e.value, (n) => {
|
|
35
|
+
w() ? a(n != null ? String(n) : "") : a(u(n ?? null));
|
|
36
|
+
}, {
|
|
37
|
+
defer: !1
|
|
38
|
+
})), I(B, P(t, {
|
|
39
|
+
ref(n) {
|
|
40
|
+
var r = s;
|
|
41
|
+
typeof r == "function" ? r(n) : s = n;
|
|
42
|
+
},
|
|
43
|
+
get variant() {
|
|
44
|
+
return e.variant;
|
|
45
|
+
},
|
|
46
|
+
get size() {
|
|
47
|
+
return e.size;
|
|
48
|
+
},
|
|
49
|
+
get disabled() {
|
|
50
|
+
return e.disabled;
|
|
51
|
+
},
|
|
52
|
+
get class() {
|
|
53
|
+
return b(N("balik-money-input", e.variant, e.size), e.class);
|
|
54
|
+
},
|
|
55
|
+
get inputClassName() {
|
|
56
|
+
return b(N(), e.inputClassName);
|
|
57
|
+
},
|
|
58
|
+
type: "text",
|
|
59
|
+
inputmode: "decimal",
|
|
60
|
+
get placeholder() {
|
|
61
|
+
return e.placeholder || (e.currency ? `0${".".repeat(e.precision > 0 ? 1 : 0)}${"0".repeat(e.precision)}` : void 0);
|
|
62
|
+
},
|
|
63
|
+
get value() {
|
|
64
|
+
return o();
|
|
65
|
+
},
|
|
66
|
+
onInput: (n) => {
|
|
67
|
+
const r = n.target.value;
|
|
68
|
+
a(r);
|
|
69
|
+
},
|
|
70
|
+
onFocus: (n) => {
|
|
71
|
+
var i;
|
|
72
|
+
l(!0);
|
|
73
|
+
const r = c(o());
|
|
74
|
+
a(r != null ? String(r) : o()), (i = t.onFocus) == null || i.call(t, n);
|
|
75
|
+
},
|
|
76
|
+
onBlur: (n) => {
|
|
77
|
+
var i, m, p, f;
|
|
78
|
+
l(!1);
|
|
79
|
+
const r = c(o());
|
|
80
|
+
if (r != null && e.precision >= 0) {
|
|
81
|
+
const d = Number.parseFloat(r.toFixed(e.precision));
|
|
82
|
+
(i = e.onValueChange) == null || i.call(e, d), a(u(d));
|
|
83
|
+
} else o() === "" || o() === "-" ? ((m = e.onValueChange) == null || m.call(e, null), a("")) : ((p = e.onValueChange) == null || p.call(e, r), a(u(r ?? null)));
|
|
84
|
+
(f = t.onBlur) == null || f.call(t, n);
|
|
85
|
+
},
|
|
86
|
+
onKeyDown: (n) => {
|
|
87
|
+
var r;
|
|
88
|
+
n.key === "Enter" && n.target.blur(), (r = t.onKeyDown) == null || r.call(t, n);
|
|
89
|
+
},
|
|
90
|
+
get prefix() {
|
|
91
|
+
return g(() => !!e.currency)() && (() => {
|
|
92
|
+
var n = C();
|
|
93
|
+
return y(n, () => e.currency), v(() => h(n, F.currency)), n;
|
|
94
|
+
})();
|
|
95
|
+
},
|
|
96
|
+
get suffix() {
|
|
97
|
+
return g(() => !!e.suffix)() && (() => {
|
|
98
|
+
var n = C();
|
|
99
|
+
return y(n, () => e.suffix), v(() => h(n, F.suffix)), n;
|
|
100
|
+
})();
|
|
101
|
+
}
|
|
102
|
+
}));
|
|
103
|
+
}
|
|
104
|
+
export {
|
|
105
|
+
q as MoneyInput
|
|
106
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { createComponent as s, mergeProps as i } from "solid-js/web";
|
|
2
|
+
import { splitProps as l } from "solid-js";
|
|
3
|
+
import { Pagination as n } from "@ark-ui/solid";
|
|
4
|
+
import { bem as c } from "../utils/bem.js";
|
|
5
|
+
import { cn as o } from "../utils/cn.js";
|
|
6
|
+
import a from "./Pagination.module.css.js";
|
|
7
|
+
function g(t) {
|
|
8
|
+
const [r, e] = l(t, ["class", "children", "defaultPage"]);
|
|
9
|
+
return s(n.Root, i(e, {
|
|
10
|
+
get class() {
|
|
11
|
+
return o(c(), a.root, r.class);
|
|
12
|
+
},
|
|
13
|
+
get children() {
|
|
14
|
+
return r.children;
|
|
15
|
+
}
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
function h(t) {
|
|
19
|
+
const [r, e] = l(t, ["class", "page"]);
|
|
20
|
+
return s(n.Item, i(e, {
|
|
21
|
+
get value() {
|
|
22
|
+
return r.page;
|
|
23
|
+
},
|
|
24
|
+
get class() {
|
|
25
|
+
return o(a.item, r.class);
|
|
26
|
+
}
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
function v(t) {
|
|
30
|
+
const [r, e] = l(t, ["class", "children"]);
|
|
31
|
+
return s(n.PrevTrigger, i(e, {
|
|
32
|
+
get class() {
|
|
33
|
+
return o(a.item, r.class);
|
|
34
|
+
},
|
|
35
|
+
get children() {
|
|
36
|
+
return r.children || "Prev";
|
|
37
|
+
}
|
|
38
|
+
}));
|
|
39
|
+
}
|
|
40
|
+
function x(t) {
|
|
41
|
+
const [r, e] = l(t, ["class", "children"]);
|
|
42
|
+
return s(n.NextTrigger, i(e, {
|
|
43
|
+
get class() {
|
|
44
|
+
return o(a.item, r.class);
|
|
45
|
+
},
|
|
46
|
+
get children() {
|
|
47
|
+
return r.children || "Next";
|
|
48
|
+
}
|
|
49
|
+
}));
|
|
50
|
+
}
|
|
51
|
+
function T(t) {
|
|
52
|
+
const [r, e] = l(t, ["class"]);
|
|
53
|
+
return s(n.Ellipsis, i(e, {
|
|
54
|
+
get class() {
|
|
55
|
+
return o(a.ellipsis, r.class);
|
|
56
|
+
},
|
|
57
|
+
children: "..."
|
|
58
|
+
}));
|
|
59
|
+
}
|
|
60
|
+
g.Original = n;
|
|
61
|
+
export {
|
|
62
|
+
g as Pagination,
|
|
63
|
+
T as PaginationEllipsis,
|
|
64
|
+
h as PaginationItem,
|
|
65
|
+
x as PaginationNextTrigger,
|
|
66
|
+
v as PaginationPrevTrigger
|
|
67
|
+
};
|