@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,75 @@
|
|
|
1
|
+
import { createComponent as h, insert as l, effect as g, className as c, template as b, delegateEvents as $ } from "solid-js/web";
|
|
2
|
+
import { splitProps as k, mergeProps as P, createSignal as y, createEffect as O } from "solid-js";
|
|
3
|
+
import { BottomSheet as S } from "../BottomSheet/BottomSheet.js";
|
|
4
|
+
import { PickerView as V } from "../PickerView/PickerView.js";
|
|
5
|
+
import { bem as _ } from "../utils/bem.js";
|
|
6
|
+
import { cn as x } from "../utils/cn.js";
|
|
7
|
+
import o from "./Picker.module.css.js";
|
|
8
|
+
var B = /* @__PURE__ */ b("<div data-part=header><button type=button data-part=cancel></button><span data-part=title></span><button type=button data-part=confirm>"), E = /* @__PURE__ */ b("<div data-part=picker-body>");
|
|
9
|
+
const D = {
|
|
10
|
+
cancelLabel: "Cancel",
|
|
11
|
+
confirmLabel: "Confirm"
|
|
12
|
+
};
|
|
13
|
+
function j(C) {
|
|
14
|
+
const [e] = k(P(D, C), ["open", "onOpenChange", "columns", "value", "onValueChange", "onConfirm", "onCancel", "title", "cancelLabel", "confirmLabel", "class", "children"]), [m, s] = y([]);
|
|
15
|
+
O(() => {
|
|
16
|
+
e.open && s(e.value ? [...e.value] : e.columns.map((t) => {
|
|
17
|
+
var n;
|
|
18
|
+
return (n = t.items[0]) == null ? void 0 : n.value;
|
|
19
|
+
}));
|
|
20
|
+
});
|
|
21
|
+
const u = () => {
|
|
22
|
+
var t, n;
|
|
23
|
+
(t = e.onCancel) == null || t.call(e), (n = e.onOpenChange) == null || n.call(e, {
|
|
24
|
+
open: !1
|
|
25
|
+
});
|
|
26
|
+
}, L = () => {
|
|
27
|
+
var t, n;
|
|
28
|
+
(t = e.onConfirm) == null || t.call(e, m()), (n = e.onOpenChange) == null || n.call(e, {
|
|
29
|
+
open: !1
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
return h(S, {
|
|
33
|
+
get open() {
|
|
34
|
+
return e.open;
|
|
35
|
+
},
|
|
36
|
+
get class() {
|
|
37
|
+
return x(_(), o.sheet, e.class);
|
|
38
|
+
},
|
|
39
|
+
onOpenChange: (t) => {
|
|
40
|
+
t.open || u();
|
|
41
|
+
},
|
|
42
|
+
get children() {
|
|
43
|
+
return [(() => {
|
|
44
|
+
var t = B(), n = t.firstChild, i = n.nextSibling, a = i.nextSibling;
|
|
45
|
+
return n.$$click = u, l(n, () => e.cancelLabel), l(i, () => e.title), a.$$click = L, l(a, () => e.confirmLabel), g((r) => {
|
|
46
|
+
var p = o.header, f = o.headerButton, d = o.headerTitle, v = o.headerButton;
|
|
47
|
+
return p !== r.e && c(t, r.e = p), f !== r.t && c(n, r.t = f), d !== r.a && c(i, r.a = d), v !== r.o && c(a, r.o = v), r;
|
|
48
|
+
}, {
|
|
49
|
+
e: void 0,
|
|
50
|
+
t: void 0,
|
|
51
|
+
a: void 0,
|
|
52
|
+
o: void 0
|
|
53
|
+
}), t;
|
|
54
|
+
})(), (() => {
|
|
55
|
+
var t = E();
|
|
56
|
+
return l(t, h(V, {
|
|
57
|
+
get columns() {
|
|
58
|
+
return e.columns;
|
|
59
|
+
},
|
|
60
|
+
get value() {
|
|
61
|
+
return m();
|
|
62
|
+
},
|
|
63
|
+
onValueChange: (n, i) => {
|
|
64
|
+
var a;
|
|
65
|
+
s(n), (a = e.onValueChange) == null || a.call(e, n, i);
|
|
66
|
+
}
|
|
67
|
+
}), null), l(t, () => e.children, null), g(() => c(t, o.body)), t;
|
|
68
|
+
})()];
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
$(["click"]);
|
|
73
|
+
export {
|
|
74
|
+
j as Picker
|
|
75
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const e = "_sheet_1rmda_1", t = "_header_1rmda_7", d = "_headerTitle_1rmda_17", a = "_headerButton_1rmda_33", r = "_body_1rmda_44", _ = {
|
|
2
|
+
sheet: e,
|
|
3
|
+
header: t,
|
|
4
|
+
headerTitle: d,
|
|
5
|
+
headerButton: a,
|
|
6
|
+
body: r
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
r as body,
|
|
10
|
+
_ as default,
|
|
11
|
+
t as header,
|
|
12
|
+
a as headerButton,
|
|
13
|
+
d as headerTitle,
|
|
14
|
+
e as sheet
|
|
15
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { insert as v, createComponent as s, effect as f, className as d, template as h, use as P, setStyleProperty as E, style as _, delegateEvents as I } from "solid-js/web";
|
|
2
|
+
import { splitProps as M, For as b, onMount as S, onCleanup as V, createEffect as p, createMemo as D } from "solid-js";
|
|
3
|
+
import { bem as H } from "../utils/bem.js";
|
|
4
|
+
import { cn as w } from "../utils/cn.js";
|
|
5
|
+
import { ITEM_HEIGHT as L, createWheel as T } from "./wheel.js";
|
|
6
|
+
import c from "./PickerView.module.css.js";
|
|
7
|
+
var k = /* @__PURE__ */ h("<div data-part=column><div data-part=column-viewport><div data-part=highlight-bar></div><div data-part=column-list>"), B = /* @__PURE__ */ h("<div data-part=item>"), F = /* @__PURE__ */ h("<div data-part=columns>");
|
|
8
|
+
function G(n) {
|
|
9
|
+
let r;
|
|
10
|
+
const a = T({
|
|
11
|
+
onSettle: (t) => {
|
|
12
|
+
const i = n.items[t];
|
|
13
|
+
i !== void 0 && n.onChange(i.value);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
S(() => a.mount(r)), V(() => a.destroy()), p(() => {
|
|
17
|
+
const t = n.items;
|
|
18
|
+
a.configure({
|
|
19
|
+
count: t.length,
|
|
20
|
+
circular: !!n.circular,
|
|
21
|
+
disabled: (l) => {
|
|
22
|
+
var o;
|
|
23
|
+
return !!((o = t[l]) != null && o.disabled);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
const i = t.findIndex((l) => l.value === n.value);
|
|
27
|
+
i >= 0 && a.setIndex(i);
|
|
28
|
+
});
|
|
29
|
+
const u = D(() => n.circular ? [...n.items, ...n.items, ...n.items] : n.items);
|
|
30
|
+
return (() => {
|
|
31
|
+
var t = k(), i = t.firstChild, l = i.firstChild, o = l.nextSibling;
|
|
32
|
+
o.addEventListener("pointercancel", () => a.onPointerCancel()), o.$$pointerup = (e) => a.onPointerUp(e), o.$$pointermove = (e) => a.onPointerMove(e), o.$$pointerdown = (e) => a.onPointerDown(e);
|
|
33
|
+
var g = r;
|
|
34
|
+
return typeof g == "function" ? P(g, o) : r = o, v(o, s(b, {
|
|
35
|
+
get each() {
|
|
36
|
+
return u();
|
|
37
|
+
},
|
|
38
|
+
children: (e) => (() => {
|
|
39
|
+
var m = B();
|
|
40
|
+
return E(m, "height", `${L}px`), v(m, () => e.label), f(() => d(m, w(c.item, e.value === n.value && c.itemSelected, e.disabled && c.itemDisabled))), m;
|
|
41
|
+
})()
|
|
42
|
+
})), f((e) => {
|
|
43
|
+
var m = c.column, y = n.flex !== void 0 ? {
|
|
44
|
+
flex: n.flex
|
|
45
|
+
} : void 0, C = c.columnViewport, $ = c.highlightBar, x = c.columnList;
|
|
46
|
+
return m !== e.e && d(t, e.e = m), e.t = _(t, y, e.t), C !== e.a && d(i, e.a = C), $ !== e.o && d(l, e.o = $), x !== e.i && d(o, e.i = x), e;
|
|
47
|
+
}, {
|
|
48
|
+
e: void 0,
|
|
49
|
+
t: void 0,
|
|
50
|
+
a: void 0,
|
|
51
|
+
o: void 0,
|
|
52
|
+
i: void 0
|
|
53
|
+
}), t;
|
|
54
|
+
})();
|
|
55
|
+
}
|
|
56
|
+
function A(n) {
|
|
57
|
+
const [r] = M(n, ["columns", "value", "onValueChange", "class"]), a = (u, t) => {
|
|
58
|
+
var l;
|
|
59
|
+
const i = [...r.value];
|
|
60
|
+
i[u] = t, (l = r.onValueChange) == null || l.call(r, i, u);
|
|
61
|
+
};
|
|
62
|
+
return (() => {
|
|
63
|
+
var u = F();
|
|
64
|
+
return v(u, s(b, {
|
|
65
|
+
get each() {
|
|
66
|
+
return r.columns;
|
|
67
|
+
},
|
|
68
|
+
children: (t, i) => s(G, {
|
|
69
|
+
get items() {
|
|
70
|
+
return t.items;
|
|
71
|
+
},
|
|
72
|
+
get circular() {
|
|
73
|
+
return t.circular;
|
|
74
|
+
},
|
|
75
|
+
get flex() {
|
|
76
|
+
return t.flex;
|
|
77
|
+
},
|
|
78
|
+
get value() {
|
|
79
|
+
return r.value[i()];
|
|
80
|
+
},
|
|
81
|
+
onChange: (l) => a(i(), l)
|
|
82
|
+
})
|
|
83
|
+
})), f(() => d(u, w(H(), c.columns, r.class))), u;
|
|
84
|
+
})();
|
|
85
|
+
}
|
|
86
|
+
I(["pointerdown", "pointermove", "pointerup"]);
|
|
87
|
+
export {
|
|
88
|
+
A as PickerView
|
|
89
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const t = "_columns_6ehtv_1", e = "_column_6ehtv_1", o = "_columnViewport_6ehtv_12", c = "_columnList_6ehtv_40", i = "_highlightBar_6ehtv_44", _ = "_item_6ehtv_58", l = "_itemSelected_6ehtv_67", m = "_itemDisabled_6ehtv_73", n = {
|
|
2
|
+
columns: t,
|
|
3
|
+
column: e,
|
|
4
|
+
columnViewport: o,
|
|
5
|
+
columnList: c,
|
|
6
|
+
highlightBar: i,
|
|
7
|
+
item: _,
|
|
8
|
+
itemSelected: l,
|
|
9
|
+
itemDisabled: m
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
e as column,
|
|
13
|
+
c as columnList,
|
|
14
|
+
o as columnViewport,
|
|
15
|
+
t as columns,
|
|
16
|
+
n as default,
|
|
17
|
+
i as highlightBar,
|
|
18
|
+
_ as item,
|
|
19
|
+
m as itemDisabled,
|
|
20
|
+
l as itemSelected
|
|
21
|
+
};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
const Y = 40, x = 5, v = 200, y = 80;
|
|
2
|
+
const U = "cubic-bezier(0.23, 1, 0.68, 1)";
|
|
3
|
+
function L({ onSettle: d } = {}) {
|
|
4
|
+
let a = null, r = 0, T = !1, H = () => !1, i = 80, l = !1, m = null, I = null, s = null;
|
|
5
|
+
const G = () => r * 40, M = () => 80, _ = () => 80 - Math.max(0, r - 1) * 40;
|
|
6
|
+
function g(t) {
|
|
7
|
+
return T ? 80 - (r + t) * 40 : 80 - t * 40;
|
|
8
|
+
}
|
|
9
|
+
function F(t) {
|
|
10
|
+
if (r === 0) return 0;
|
|
11
|
+
const n = Math.round((80 - t) / 40);
|
|
12
|
+
return T ? (n % r + r) % r : Math.max(0, Math.min(r - 1, n));
|
|
13
|
+
}
|
|
14
|
+
function S(t) {
|
|
15
|
+
if (!T || r === 0) return t;
|
|
16
|
+
const n = 80 - r * 40, e = G();
|
|
17
|
+
return n - ((n - t) % e + e) % e;
|
|
18
|
+
}
|
|
19
|
+
function u(t, n) {
|
|
20
|
+
i = t, a && (a.style.transition = n > 0 ? `transform ${n}ms ${U}` : "none", a.style.transform = `translate3d(0, ${t}px, 0)`);
|
|
21
|
+
}
|
|
22
|
+
function P() {
|
|
23
|
+
if (!a) return i;
|
|
24
|
+
const t = getComputedStyle(a).transform;
|
|
25
|
+
if (!t || t === "none") return i;
|
|
26
|
+
const n = t.match(/matrix.*\((.+)\)/);
|
|
27
|
+
if (!n) return i;
|
|
28
|
+
const e = n[1].split(","), o = e.length === 16 ? parseFloat(e[13]) : parseFloat(e[5]);
|
|
29
|
+
return Number.isFinite(o) ? o : i;
|
|
30
|
+
}
|
|
31
|
+
function N() {
|
|
32
|
+
m && (clearTimeout(m), m = null), I && a && (a.removeEventListener("transitionend", I), I = null);
|
|
33
|
+
}
|
|
34
|
+
function D() {
|
|
35
|
+
N(), l && (l = !1, u(P(), 0));
|
|
36
|
+
}
|
|
37
|
+
function h() {
|
|
38
|
+
const t = F(i);
|
|
39
|
+
T && u(S(i), 0), d == null || d(t);
|
|
40
|
+
}
|
|
41
|
+
function p(t, n) {
|
|
42
|
+
if (N(), Math.abs(t - i) < 0.5 || n <= 0) {
|
|
43
|
+
u(t, 0), h();
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
l = !0, u(t, n);
|
|
47
|
+
const e = () => {
|
|
48
|
+
N(), l && (l = !1, h());
|
|
49
|
+
};
|
|
50
|
+
I = (o) => {
|
|
51
|
+
o.target === a && o.propertyName === "transform" && e();
|
|
52
|
+
}, a.addEventListener("transitionend", I), m = setTimeout(e, n + 100);
|
|
53
|
+
}
|
|
54
|
+
function C(t, n) {
|
|
55
|
+
if (r === 0 || !H(t)) return t;
|
|
56
|
+
const e = n || 1;
|
|
57
|
+
for (let o = 1; o < r; o++)
|
|
58
|
+
for (const f of [t + e * o, t - e * o]) {
|
|
59
|
+
const E = T ? (f % r + r) % r : f;
|
|
60
|
+
if (!(E < 0 || E >= r) && !H(E))
|
|
61
|
+
return E;
|
|
62
|
+
}
|
|
63
|
+
return t;
|
|
64
|
+
}
|
|
65
|
+
function O(t, n) {
|
|
66
|
+
if (!T) {
|
|
67
|
+
let c = Math.round((80 - t) / 40);
|
|
68
|
+
return c = Math.max(0, Math.min(r - 1, c)), c = C(c, n), 80 - c * 40;
|
|
69
|
+
}
|
|
70
|
+
let e = Math.round((80 - t) / 40);
|
|
71
|
+
const o = (e % r + r) % r;
|
|
72
|
+
let E = C(o, n) - o;
|
|
73
|
+
return E > r / 2 && (E -= r), E < -r / 2 && (E += r), e += E, 80 - e * 40;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
mount(t) {
|
|
77
|
+
a = t, u(i, 0);
|
|
78
|
+
},
|
|
79
|
+
/** (Re)configure item count / circularity / disabled lookup. */
|
|
80
|
+
configure(t) {
|
|
81
|
+
r = t.count, T = t.circular, H = t.disabled || (() => !1);
|
|
82
|
+
},
|
|
83
|
+
/** Jump to an index without animation. No-op while the user interacts. */
|
|
84
|
+
setIndex(t) {
|
|
85
|
+
if (s || l || r === 0) return;
|
|
86
|
+
const n = Math.max(0, Math.min(r - 1, t));
|
|
87
|
+
u(g(n), 0);
|
|
88
|
+
},
|
|
89
|
+
getIndex: () => F(i),
|
|
90
|
+
isBusy: () => !!s || l,
|
|
91
|
+
destroy() {
|
|
92
|
+
N(), l = !1, s = null, a = null;
|
|
93
|
+
},
|
|
94
|
+
onPointerDown(t) {
|
|
95
|
+
var e, o;
|
|
96
|
+
if (r === 0) return;
|
|
97
|
+
t.preventDefault(), (o = (e = t.currentTarget).setPointerCapture) == null || o.call(e, t.pointerId), D(), T && u(S(i), 0);
|
|
98
|
+
const n = performance.now();
|
|
99
|
+
s = {
|
|
100
|
+
startY: t.clientY,
|
|
101
|
+
startOffset: i,
|
|
102
|
+
sampleY: t.clientY,
|
|
103
|
+
sampleT: n,
|
|
104
|
+
moved: !1
|
|
105
|
+
};
|
|
106
|
+
},
|
|
107
|
+
onPointerMove(t) {
|
|
108
|
+
if (!s) return;
|
|
109
|
+
const n = t.clientY - s.startY;
|
|
110
|
+
Math.abs(n) > 8 && (s.moved = !0);
|
|
111
|
+
let e = s.startOffset + n;
|
|
112
|
+
T || (e > M() ? e = M() + (e - M()) / 2 : e < _() && (e = _() + (e - _()) / 2)), u(e, 0);
|
|
113
|
+
const o = performance.now();
|
|
114
|
+
o - s.sampleT > 300 && (s.sampleT = o, s.sampleY = t.clientY);
|
|
115
|
+
},
|
|
116
|
+
onPointerUp(t) {
|
|
117
|
+
if (!s) return;
|
|
118
|
+
const n = s;
|
|
119
|
+
if (s = null, !n.moved) {
|
|
120
|
+
const c = a == null ? void 0 : a.parentElement;
|
|
121
|
+
if (c) {
|
|
122
|
+
const b = c.getBoundingClientRect(), R = Math.floor((t.clientY - b.top) / 40), A = Math.floor(5 / 2), w = i - (R - A) * 40;
|
|
123
|
+
p(O(w, Math.sign(R - A) || 1), 200);
|
|
124
|
+
}
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
const e = performance.now() - n.sampleT, o = t.clientY - n.sampleY;
|
|
128
|
+
let f = i, E = 200;
|
|
129
|
+
if (e < 300 && Math.abs(o) > 15) {
|
|
130
|
+
const c = Math.abs(o) / e;
|
|
131
|
+
f += c / 3e-3 * Math.sign(o), E = 1e3;
|
|
132
|
+
}
|
|
133
|
+
T || (f > M() ? f = M() : f < _() && (f = _())), p(O(f, Math.sign(o) ? -Math.sign(o) : 1), E);
|
|
134
|
+
},
|
|
135
|
+
onPointerCancel() {
|
|
136
|
+
s && (s = null, p(O(i, 1), 200));
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
export {
|
|
141
|
+
y as CENTER_OFFSET,
|
|
142
|
+
v as CONTAINER_HEIGHT,
|
|
143
|
+
Y as ITEM_HEIGHT,
|
|
144
|
+
x as VISIBLE_ITEMS,
|
|
145
|
+
L as createWheel
|
|
146
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { createComponent as r, mergeProps as l } from "solid-js/web";
|
|
2
|
+
import { splitProps as c, mergeProps as u, useContext as m, createContext as d } from "solid-js";
|
|
3
|
+
import { PinInput as o } from "@ark-ui/solid";
|
|
4
|
+
import { bem as g } from "../utils/bem.js";
|
|
5
|
+
import { cn as i } from "../utils/cn.js";
|
|
6
|
+
import s from "./PinInput.module.css.js";
|
|
7
|
+
const a = d({
|
|
8
|
+
size: "md"
|
|
9
|
+
}), P = {
|
|
10
|
+
size: "md"
|
|
11
|
+
}, f = {
|
|
12
|
+
xs: s.sizeXs,
|
|
13
|
+
sm: s.sizeSm,
|
|
14
|
+
md: s.sizeMd,
|
|
15
|
+
lg: s.sizeLg,
|
|
16
|
+
xl: s.sizeXl
|
|
17
|
+
};
|
|
18
|
+
function z(e) {
|
|
19
|
+
const [t, n] = c(u(P, e), ["class", "children", "size", "defaultValue"]);
|
|
20
|
+
return r(a.Provider, {
|
|
21
|
+
get value() {
|
|
22
|
+
return {
|
|
23
|
+
size: t.size
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
get children() {
|
|
27
|
+
return r(o.Root, l(n, {
|
|
28
|
+
get class() {
|
|
29
|
+
return i(g(), s.root, t.class);
|
|
30
|
+
},
|
|
31
|
+
get children() {
|
|
32
|
+
return t.children;
|
|
33
|
+
}
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function R(e) {
|
|
39
|
+
const [t, n] = c(e, ["class"]);
|
|
40
|
+
return r(o.Label, l(n, {
|
|
41
|
+
get class() {
|
|
42
|
+
return i(s.label, t.class);
|
|
43
|
+
}
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
function v(e) {
|
|
47
|
+
const [t, n] = c(e, ["class", "children"]);
|
|
48
|
+
return r(o.Control, l(n, {
|
|
49
|
+
get class() {
|
|
50
|
+
return i(s.control, t.class);
|
|
51
|
+
},
|
|
52
|
+
get children() {
|
|
53
|
+
return t.children;
|
|
54
|
+
}
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
function H(e) {
|
|
58
|
+
const t = m(a), [n, p] = c(u({}, e), ["class"]);
|
|
59
|
+
return r(o.Input, l(p, {
|
|
60
|
+
get class() {
|
|
61
|
+
return i(s.input, f[t.size], n.class);
|
|
62
|
+
}
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
function O(e) {
|
|
66
|
+
const [t, n] = c(e, ["class"]);
|
|
67
|
+
return r(o.HiddenInput, l(n, {
|
|
68
|
+
get class() {
|
|
69
|
+
return t.class;
|
|
70
|
+
}
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
z.Original = o;
|
|
74
|
+
export {
|
|
75
|
+
z as PinInput,
|
|
76
|
+
v as PinInputControl,
|
|
77
|
+
O as PinInputHiddenInput,
|
|
78
|
+
H as PinInputInput,
|
|
79
|
+
R as PinInputLabel
|
|
80
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const s = "_root_nassu_1", _ = "_label_nassu_7", t = "_control_nassu_13", n = "_input_nassu_18", i = "_sizeXs_nassu_57 _b-sz-primary-xs_1bftp_1", o = "_sizeSm_nassu_63 _b-sz-primary-sm_1bftp_8", e = "_sizeMd_nassu_69 _b-sz-primary-md_1bftp_15", z = "_sizeLg_nassu_75 _b-sz-primary-lg_1bftp_22", a = "_sizeXl_nassu_81 _b-sz-primary-xl_1bftp_29", r = {
|
|
2
|
+
root: s,
|
|
3
|
+
label: _,
|
|
4
|
+
control: t,
|
|
5
|
+
input: n,
|
|
6
|
+
sizeXs: i,
|
|
7
|
+
sizeSm: o,
|
|
8
|
+
sizeMd: e,
|
|
9
|
+
sizeLg: z,
|
|
10
|
+
sizeXl: a
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
t as control,
|
|
14
|
+
r as default,
|
|
15
|
+
n as input,
|
|
16
|
+
_ as label,
|
|
17
|
+
s as root,
|
|
18
|
+
z as sizeLg,
|
|
19
|
+
e as sizeMd,
|
|
20
|
+
o as sizeSm,
|
|
21
|
+
a as sizeXl,
|
|
22
|
+
i as sizeXs
|
|
23
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { createComponent as n, mergeProps as c, Portal as p, memo as d } from "solid-js/web";
|
|
2
|
+
import { splitProps as l, mergeProps as i } from "solid-js";
|
|
3
|
+
import { Popover as o } from "@ark-ui/solid";
|
|
4
|
+
import { bem as g } from "../utils/bem.js";
|
|
5
|
+
import { cn as a } from "../utils/cn.js";
|
|
6
|
+
import s from "./Popover.module.css.js";
|
|
7
|
+
const u = {};
|
|
8
|
+
function m(e) {
|
|
9
|
+
const [r, t] = l(i(u, e), ["class", "children", "defaultOpen"]);
|
|
10
|
+
return n(o.Root, c(t, {
|
|
11
|
+
lazyMount: !0,
|
|
12
|
+
unmountOnExit: !0,
|
|
13
|
+
get children() {
|
|
14
|
+
return r.children;
|
|
15
|
+
}
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
function w(e) {
|
|
19
|
+
const [r, t] = l(i(u, e), ["class", "children"]);
|
|
20
|
+
return n(o.Trigger, c(t, {
|
|
21
|
+
as: "div",
|
|
22
|
+
get class() {
|
|
23
|
+
return a(g(), r.class);
|
|
24
|
+
},
|
|
25
|
+
get children() {
|
|
26
|
+
return r.children;
|
|
27
|
+
}
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
function O(e) {
|
|
31
|
+
const [r, t] = l(i(u, e), ["class", "children"]);
|
|
32
|
+
return n(p, {
|
|
33
|
+
get mount() {
|
|
34
|
+
return document.body;
|
|
35
|
+
},
|
|
36
|
+
get children() {
|
|
37
|
+
return n(o.Positioner, {
|
|
38
|
+
get class() {
|
|
39
|
+
return s.positioner;
|
|
40
|
+
},
|
|
41
|
+
get children() {
|
|
42
|
+
return n(o.Content, c(t, {
|
|
43
|
+
get class() {
|
|
44
|
+
return a(g(), s.content, r.class);
|
|
45
|
+
},
|
|
46
|
+
get children() {
|
|
47
|
+
return [n(o.Arrow, {
|
|
48
|
+
get class() {
|
|
49
|
+
return s.arrow;
|
|
50
|
+
},
|
|
51
|
+
get children() {
|
|
52
|
+
return n(o.ArrowTip, {
|
|
53
|
+
get class() {
|
|
54
|
+
return s.arrowTip;
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}), d(() => r.children)];
|
|
59
|
+
}
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function y(e) {
|
|
67
|
+
const [r, t] = l(i(u, e), ["class", "children"]);
|
|
68
|
+
return n(o.CloseTrigger, c(t, {
|
|
69
|
+
get class() {
|
|
70
|
+
return a(s.closeTrigger, r.class);
|
|
71
|
+
},
|
|
72
|
+
get children() {
|
|
73
|
+
return r.children;
|
|
74
|
+
}
|
|
75
|
+
}));
|
|
76
|
+
}
|
|
77
|
+
function A(e) {
|
|
78
|
+
const [r, t] = l(i(u, e), ["class", "children"]);
|
|
79
|
+
return n(o.Title, c(t, {
|
|
80
|
+
get class() {
|
|
81
|
+
return a(s.title, r.class);
|
|
82
|
+
},
|
|
83
|
+
get children() {
|
|
84
|
+
return r.children;
|
|
85
|
+
}
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
function D(e) {
|
|
89
|
+
const [r, t] = l(i(u, e), ["class", "children"]);
|
|
90
|
+
return n(o.Description, c(t, {
|
|
91
|
+
get class() {
|
|
92
|
+
return a(s.description, r.class);
|
|
93
|
+
},
|
|
94
|
+
get children() {
|
|
95
|
+
return r.children;
|
|
96
|
+
}
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
m.Original = o;
|
|
100
|
+
export {
|
|
101
|
+
m as Popover,
|
|
102
|
+
y as PopoverCloseTrigger,
|
|
103
|
+
O as PopoverContent,
|
|
104
|
+
D as PopoverDescription,
|
|
105
|
+
A as PopoverTitle,
|
|
106
|
+
w as PopoverTrigger
|
|
107
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const t = "_positioner_1sx5y_1", o = "_content_1sx5y_5", s = "_arrowTip_1sx5y_26", e = "_closeTrigger_1sx5y_31", i = "_title_1sx5y_49", n = "_description_1sx5y_57", r = {
|
|
2
|
+
positioner: t,
|
|
3
|
+
content: o,
|
|
4
|
+
arrowTip: s,
|
|
5
|
+
closeTrigger: e,
|
|
6
|
+
title: i,
|
|
7
|
+
description: n
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
s as arrowTip,
|
|
11
|
+
e as closeTrigger,
|
|
12
|
+
o as content,
|
|
13
|
+
r as default,
|
|
14
|
+
n as description,
|
|
15
|
+
t as positioner,
|
|
16
|
+
i as title
|
|
17
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { createComponent as o, mergeProps as c } from "solid-js/web";
|
|
2
|
+
import { splitProps as l, mergeProps as u, useContext as m, createContext as p } from "solid-js";
|
|
3
|
+
import { Progress as n } from "@ark-ui/solid";
|
|
4
|
+
import { bem as d } from "../utils/bem.js";
|
|
5
|
+
import { cn as a } from "../utils/cn.js";
|
|
6
|
+
import e from "./Progress.module.css.js";
|
|
7
|
+
const i = p({
|
|
8
|
+
size: "md",
|
|
9
|
+
striped: !1
|
|
10
|
+
}), P = {
|
|
11
|
+
size: "md",
|
|
12
|
+
striped: !1
|
|
13
|
+
}, f = {
|
|
14
|
+
xs: e.sizeXs,
|
|
15
|
+
sm: e.sizeSm,
|
|
16
|
+
md: e.sizeMd,
|
|
17
|
+
lg: e.sizeLg,
|
|
18
|
+
xl: e.sizeXl
|
|
19
|
+
};
|
|
20
|
+
function z(r) {
|
|
21
|
+
const [s, t] = l(u(P, r), ["class", "children", "size", "striped"]);
|
|
22
|
+
return o(i.Provider, {
|
|
23
|
+
get value() {
|
|
24
|
+
return {
|
|
25
|
+
size: s.size,
|
|
26
|
+
striped: s.striped
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
get children() {
|
|
30
|
+
return o(n.Root, c(t, {
|
|
31
|
+
get class() {
|
|
32
|
+
return a(d(), e.root, f[s.size], s.class);
|
|
33
|
+
},
|
|
34
|
+
get children() {
|
|
35
|
+
return s.children;
|
|
36
|
+
}
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function L(r) {
|
|
42
|
+
const [s, t] = l(r, ["class"]);
|
|
43
|
+
return o(n.Track, c(t, {
|
|
44
|
+
get class() {
|
|
45
|
+
return a(e.track, s.class);
|
|
46
|
+
}
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
function k(r) {
|
|
50
|
+
const s = m(i), [t, g] = l(r, ["class"]);
|
|
51
|
+
return o(n.Range, c(g, {
|
|
52
|
+
get class() {
|
|
53
|
+
return a(e.range, s.striped && e.striped, t.class);
|
|
54
|
+
}
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
function v(r) {
|
|
58
|
+
const [s, t] = l(r, ["class"]);
|
|
59
|
+
return o(n.Label, c(t, {
|
|
60
|
+
get class() {
|
|
61
|
+
return a(e.label, s.class);
|
|
62
|
+
}
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
function O(r) {
|
|
66
|
+
const [s, t] = l(r, ["class"]);
|
|
67
|
+
return o(n.ValueText, c(t, {
|
|
68
|
+
get class() {
|
|
69
|
+
return a(e.valueText, s.class);
|
|
70
|
+
}
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
z.Original = n;
|
|
74
|
+
export {
|
|
75
|
+
z as Progress,
|
|
76
|
+
v as ProgressLabel,
|
|
77
|
+
k as ProgressRange,
|
|
78
|
+
L as ProgressTrack,
|
|
79
|
+
O as ProgressValueText
|
|
80
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const s = "_root_1ohvc_1", e = "_track_1ohvc_8", _ = "_range_1ohvc_15", o = "_striped_1ohvc_22", t = "_label_1ohvc_42", c = "_valueText_1ohvc_48", i = "_sizeXs_1ohvc_53", n = "_sizeSm_1ohvc_58", z = "_sizeMd_1ohvc_63", a = "_sizeLg_1ohvc_68", l = "_sizeXl_1ohvc_73", v = {
|
|
2
|
+
root: s,
|
|
3
|
+
track: e,
|
|
4
|
+
range: _,
|
|
5
|
+
striped: o,
|
|
6
|
+
label: t,
|
|
7
|
+
valueText: c,
|
|
8
|
+
sizeXs: i,
|
|
9
|
+
sizeSm: n,
|
|
10
|
+
sizeMd: z,
|
|
11
|
+
sizeLg: a,
|
|
12
|
+
sizeXl: l
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
v as default,
|
|
16
|
+
t as label,
|
|
17
|
+
_ as range,
|
|
18
|
+
s as root,
|
|
19
|
+
a as sizeLg,
|
|
20
|
+
z as sizeMd,
|
|
21
|
+
n as sizeSm,
|
|
22
|
+
l as sizeXl,
|
|
23
|
+
i as sizeXs,
|
|
24
|
+
o as striped,
|
|
25
|
+
e as track,
|
|
26
|
+
c as valueText
|
|
27
|
+
};
|