@solar-taro/ui-sun 2.9.0 → 3.1.0
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/CHANGELOG.md +27 -0
- package/empty/index.d.ts +1 -0
- package/empty/index.scss +23 -0
- package/empty/index.vue.d.ts +18 -0
- package/index.d.ts +4 -0
- package/index.js +44 -36
- package/index10.js +29 -17
- package/index11.js +19 -25
- package/index12.js +81 -34
- package/index13.js +24 -75
- package/index14.js +34 -20
- package/index15.js +72 -46
- package/index16.js +19 -144
- package/index17.js +48 -28
- package/index18.js +144 -21
- package/index19.js +28 -42
- package/index20.js +77 -26
- package/index21.js +19 -10
- package/index22.js +41 -27
- package/index23.js +24 -18
- package/index24.js +14 -32
- package/index25.js +27 -117
- package/index26.js +17 -9
- package/index27.js +34 -11
- package/index28.js +123 -11
- package/index29.js +14 -8
- package/index30.js +10 -9
- package/index31.js +8 -7
- package/index32.js +11 -2
- package/index33.js +8 -2
- package/index34.js +10 -2
- package/index35.js +10 -2
- package/index36.js +1 -1
- package/index37.js +1 -1
- package/index38.js +2 -7
- package/index39.js +1 -1
- package/index4.js +1 -1
- package/index40.js +1 -1
- package/index41.js +1 -1
- package/index42.js +7 -2
- package/index43.js +1 -1
- package/index44.js +1 -1
- package/index45.js +1 -1
- package/index46.js +1 -1
- package/index47.js +1 -1
- package/index48.js +1 -1
- package/index49.js +1 -1
- package/index50.js +1 -1
- package/index51.js +1 -1
- package/index52.js +1 -1
- package/index53.js +1 -1
- package/index54.js +1 -1
- package/index55.js +2 -526
- package/index56.js +2 -3
- package/index57.js +2 -66
- package/index58.js +2 -12
- package/index59.js +2 -25
- package/index60.js +2 -14
- package/index61.js +1 -1
- package/index62.js +1 -1
- package/index63.js +2 -26
- package/index64.js +3 -2
- package/index65.js +525 -505
- package/index66.js +65 -78
- package/index67.js +12 -70
- package/index68.js +25 -69
- package/index69.js +14 -543
- package/index7.js +18 -17
- package/index70.js +26 -2
- package/index72.js +506 -2
- package/index73.js +78 -3
- package/index74.js +70 -2
- package/index75.js +69 -4
- package/index76.js +543 -2
- package/index79.js +2 -2
- package/index8.js +13 -14
- package/index80.js +3 -47
- package/index81.js +2 -82
- package/index82.js +4 -2
- package/index83.js +2 -2
- package/index84.js +2 -2
- package/index85.js +4 -0
- package/index86.js +50 -0
- package/index87.js +84 -0
- package/index88.js +4 -0
- package/index89.js +4 -0
- package/index9.js +16 -30
- package/index90.js +4 -0
- package/index91.js +4 -0
- package/item-divider/index.d.ts +1 -0
- package/item-divider/index.scss +9 -0
- package/item-divider/index.vue.d.ts +18 -0
- package/list/index.d.ts +1 -0
- package/list/index.vue.d.ts +90 -0
- package/package.json +1 -1
- package/stepper/index.d.ts +1 -0
- package/stepper/index.scss +61 -0
- package/stepper/index.vue.d.ts +19 -0
- package/toggle/index.vue.d.ts +2 -2
package/index28.js
CHANGED
|
@@ -1,13 +1,125 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
1
|
+
import { defineComponent as I, ref as f, computed as a, onActivated as D, onMounted as L, onUnmounted as N, renderList as A, Fragment as M, openBlock as E, createElementBlock as K, renderSlot as R, normalizeStyle as j, createCommentVNode as q, toDisplayString as O, createTextVNode as Q, unref as U, withCtx as W, createBlock as X, mergeProps as Y } from "vue";
|
|
2
|
+
import { withPixel as b } from "@solar-kit/core";
|
|
3
|
+
import { rpxToPx as G, vibrator as H } from "@solar-taro/core";
|
|
4
|
+
import { createSelectorQuery as J } from "@tarojs/taro";
|
|
5
|
+
import Z from "./index19.js";
|
|
6
|
+
const ee = A, te = M, s = E, c = K, z = R, g = j, re = q, le = O, oe = Q, B = U, ie = W, ne = X, ae = Y, se = ["id", "refresher-enabled", "refresher-triggered", "refresher-background", "scroll-x", "scroll-y", "scroll-top", "scroll-left"], ue = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "sun-virtual-scroll-placeholder",
|
|
9
|
+
style: { display: "flex", "justify-content": "center", "align-items": "center", height: "85%" }
|
|
10
|
+
};
|
|
11
|
+
let ce = 1;
|
|
12
|
+
const he = /* @__PURE__ */ I({
|
|
13
|
+
__name: "index",
|
|
14
|
+
props: {
|
|
15
|
+
refreshing: { type: Boolean },
|
|
16
|
+
refresher: { type: Boolean },
|
|
17
|
+
refresherBg: { default: "transparent" },
|
|
18
|
+
direction: { default: "vertical" },
|
|
19
|
+
items: {},
|
|
20
|
+
itemSize: {},
|
|
21
|
+
itemKey: {},
|
|
22
|
+
id: { default: () => `sun-virtual-scroll-${ce++}` },
|
|
23
|
+
bottomSpace: { default: 0 },
|
|
24
|
+
loading: { type: Boolean },
|
|
25
|
+
loadingText: { default: "Loading" }
|
|
26
|
+
},
|
|
27
|
+
emits: ["refresh", "lower"],
|
|
28
|
+
setup($, { emit: x }) {
|
|
29
|
+
const y = x, r = $;
|
|
30
|
+
let m, i = 0, S = !1;
|
|
31
|
+
const u = f(0), v = f(0), p = f(0), h = f(0), t = a(() => r.direction === "vertical"), _ = a(() => ({
|
|
32
|
+
right: t.value ? "0" : "auto",
|
|
33
|
+
transform: `translate${t.value ? "Y" : "X"}(${p.value}px)`,
|
|
34
|
+
"white-space": t.value ? "normal" : "nowrap"
|
|
35
|
+
})), n = a(() => typeof r.itemSize == "number" ? r.itemSize : r.itemSize.endsWith("rpx") ? G(parseFloat(r.itemSize)) : parseFloat(r.itemSize)), C = a(() => n.value * r.items.length), T = a(() => ({
|
|
36
|
+
[t.value ? "height" : "width"]: b(C.value + r.bottomSpace)
|
|
37
|
+
})), F = a(() => ({
|
|
38
|
+
display: t.value ? "block" : "inline-block",
|
|
39
|
+
[t.value ? "height" : "width"]: b(n.value)
|
|
40
|
+
})), P = a(
|
|
41
|
+
() => r.items.slice(
|
|
42
|
+
Math.max(v.value - u.value, 0),
|
|
43
|
+
v.value + u.value * 2
|
|
44
|
+
)
|
|
45
|
+
);
|
|
46
|
+
function V({ detail: e }) {
|
|
47
|
+
m && cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
48
|
+
i = t.value ? e.scrollTop : e.scrollLeft, v.value = ~~(i / n.value), v.value > u.value - 1 ? p.value = i - n.value * u.value - i % n.value : p.value = i - i % (n.value * u.value), m = 0;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function w() {
|
|
52
|
+
setTimeout(() => {
|
|
53
|
+
J().select(`#${r.id}`).boundingClientRect((e) => {
|
|
54
|
+
if (S) return;
|
|
55
|
+
if (e = e, !(e != null && e.height) || !(e != null && e.width))
|
|
56
|
+
return w();
|
|
57
|
+
const { height: l, width: o } = e, d = t.value ? l : o;
|
|
58
|
+
u.value = Math.ceil(d / n.value);
|
|
59
|
+
}).exec();
|
|
60
|
+
}, 50);
|
|
61
|
+
}
|
|
62
|
+
return D(() => {
|
|
63
|
+
h.value = i;
|
|
64
|
+
}), L(() => {
|
|
65
|
+
w();
|
|
66
|
+
}), N(() => {
|
|
67
|
+
S = !0;
|
|
68
|
+
}), (e, l) => (s(), c("scroll-view", ae(e.$attrs, {
|
|
69
|
+
id: e.id,
|
|
70
|
+
class: "sun-virtual-scroll",
|
|
71
|
+
"refresher-enabled": e.refresher,
|
|
72
|
+
"refresher-triggered": e.refreshing,
|
|
73
|
+
"refresher-background": e.refresherBg,
|
|
74
|
+
"scroll-x": !t.value,
|
|
75
|
+
"scroll-y": t.value,
|
|
76
|
+
"scroll-top": t.value ? h.value : 0,
|
|
77
|
+
"scroll-left": t.value ? 0 : h.value,
|
|
78
|
+
enhanced: !0,
|
|
79
|
+
"lower-threshold": 300,
|
|
80
|
+
onScrollPassive: l[0] || (l[0] = (o) => V(o)),
|
|
81
|
+
onRefresherrefresh: l[1] || (l[1] = (o) => {
|
|
82
|
+
B(H).short("light"), y("refresh");
|
|
83
|
+
}),
|
|
84
|
+
onScrolltolower: l[2] || (l[2] = (o) => y("lower"))
|
|
85
|
+
}), [
|
|
86
|
+
e.items.length ? (s(), c("view", {
|
|
87
|
+
key: 0,
|
|
88
|
+
class: "sun-virtual-scroll-content-container",
|
|
89
|
+
style: g(_.value)
|
|
90
|
+
}, [
|
|
91
|
+
(s(!0), c(te, null, ee(P.value, (o, d) => {
|
|
92
|
+
var k;
|
|
93
|
+
return s(), c("view", {
|
|
94
|
+
key: (k = o[e.itemKey]) != null ? k : d,
|
|
95
|
+
class: "sun-virtual-scroll-item",
|
|
96
|
+
style: g(F.value)
|
|
97
|
+
}, [
|
|
98
|
+
z(e.$slots, "default", {
|
|
99
|
+
item: o,
|
|
100
|
+
index: d
|
|
101
|
+
})
|
|
102
|
+
], 4);
|
|
103
|
+
}), 128))
|
|
104
|
+
], 4)) : (s(), c("view", ue, [
|
|
105
|
+
e.loading ? (s(), ne(B(Z), {
|
|
106
|
+
key: 0,
|
|
107
|
+
size: "large"
|
|
108
|
+
}, {
|
|
109
|
+
default: ie(() => [
|
|
110
|
+
oe(le(e.loadingText), 1)
|
|
111
|
+
]),
|
|
112
|
+
_: 1
|
|
113
|
+
})) : z(e.$slots, "empty", { key: 1 })
|
|
114
|
+
])),
|
|
115
|
+
e.items.length ? (s(), c("view", {
|
|
116
|
+
key: 2,
|
|
117
|
+
class: "sun-virtual-scroll-spacer",
|
|
118
|
+
style: g(T.value)
|
|
119
|
+
}, null, 4)) : re("", !0)
|
|
120
|
+
], 16, se));
|
|
121
|
+
}
|
|
122
|
+
});
|
|
11
123
|
export {
|
|
12
|
-
|
|
124
|
+
he as default
|
|
13
125
|
};
|
package/index29.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
1
|
+
import { defineComponent as c, computed as s, normalizeClass as t, openBlock as a, createElementBlock as l } from "vue";
|
|
2
|
+
const r = t, i = a, m = l, d = /* @__PURE__ */ c({
|
|
3
|
+
__name: "index",
|
|
4
|
+
props: {
|
|
5
|
+
name: {}
|
|
6
|
+
},
|
|
7
|
+
setup(e) {
|
|
8
|
+
const n = e, o = s(() => `ionicon-${n.name}`);
|
|
9
|
+
return (p, _) => (i(), m("view", {
|
|
10
|
+
class: r(["sun-icon ionicon", o.value])
|
|
11
|
+
}, null, 2));
|
|
12
|
+
}
|
|
13
|
+
});
|
|
8
14
|
export {
|
|
9
|
-
|
|
15
|
+
d as default
|
|
10
16
|
};
|
package/index30.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { renderSlot as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
return
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { renderSlot as t, openBlock as n, createElementBlock as r } from "vue";
|
|
2
|
+
import c from "./index42.js";
|
|
3
|
+
const s = {}, o = t, l = n, d = r, _ = { class: "sun-item-divider" };
|
|
4
|
+
function i(e, a) {
|
|
5
|
+
return l(), d("view", _, [
|
|
6
|
+
o(e.$slots, "default"),
|
|
7
|
+
o(e.$slots, "end")
|
|
8
|
+
]);
|
|
8
9
|
}
|
|
9
|
-
const
|
|
10
|
+
const p = /* @__PURE__ */ c(s, [["render", i]]);
|
|
10
11
|
export {
|
|
11
|
-
|
|
12
|
+
p as default
|
|
12
13
|
};
|
package/index31.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { renderSlot as t, openBlock as
|
|
2
|
-
import
|
|
3
|
-
const c = {},
|
|
4
|
-
function
|
|
5
|
-
return l(), _("view",
|
|
6
|
-
|
|
1
|
+
import { renderSlot as t, openBlock as n, createElementBlock as r } from "vue";
|
|
2
|
+
import s from "./index42.js";
|
|
3
|
+
const c = {}, o = t, l = n, _ = r, d = { class: "sun-list-header" };
|
|
4
|
+
function a(e, f) {
|
|
5
|
+
return l(), _("view", d, [
|
|
6
|
+
o(e.$slots, "default"),
|
|
7
|
+
o(e.$slots, "end")
|
|
7
8
|
]);
|
|
8
9
|
}
|
|
9
|
-
const p = /* @__PURE__ */
|
|
10
|
+
const p = /* @__PURE__ */ s(c, [["render", a]]);
|
|
10
11
|
export {
|
|
11
12
|
p as default
|
|
12
13
|
};
|
package/index32.js
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { renderSlot as t, openBlock as n, createElementBlock as r } from "vue";
|
|
2
|
+
import c from "./index42.js";
|
|
3
|
+
const s = {}, o = t, l = n, _ = r, a = { class: "sun-page-header" };
|
|
4
|
+
function d(e, f) {
|
|
5
|
+
return l(), _("view", a, [
|
|
6
|
+
o(e.$slots, "default"),
|
|
7
|
+
o(e.$slots, "end")
|
|
8
|
+
]);
|
|
9
|
+
}
|
|
10
|
+
const p = /* @__PURE__ */ c(s, [["render", d]]);
|
|
2
11
|
export {
|
|
3
|
-
|
|
12
|
+
p as default
|
|
4
13
|
};
|
package/index33.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { mergeProps as o, openBlock as r, createElementBlock as t } from "vue";
|
|
2
|
+
import c from "./index42.js";
|
|
3
|
+
const n = {}, s = o, _ = r, l = t;
|
|
4
|
+
function m(e, a) {
|
|
5
|
+
return _(), l("view", s(e.$attrs, { class: "sun-skeleton" }), " ", 16);
|
|
6
|
+
}
|
|
7
|
+
const i = /* @__PURE__ */ c(n, [["render", m]]);
|
|
2
8
|
export {
|
|
3
|
-
|
|
9
|
+
i as default
|
|
4
10
|
};
|
package/index34.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { renderSlot as o, mergeProps as r, openBlock as t, createElementBlock as s } from "vue";
|
|
2
|
+
import n from "./index42.js";
|
|
3
|
+
const c = {}, l = o, m = r, _ = t, a = s;
|
|
4
|
+
function u(e, d) {
|
|
5
|
+
return _(), a("view", m(e.$attrs, { class: "sun-sudoku-item" }), [
|
|
6
|
+
l(e.$slots, "default")
|
|
7
|
+
], 16);
|
|
8
|
+
}
|
|
9
|
+
const i = /* @__PURE__ */ n(c, [["render", u]]);
|
|
2
10
|
export {
|
|
3
|
-
|
|
11
|
+
i as default
|
|
4
12
|
};
|
package/index35.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { renderSlot as t, openBlock as o, createElementBlock as n } from "vue";
|
|
2
|
+
import r from "./index42.js";
|
|
3
|
+
const c = {}, s = t, l = o, _ = n, a = { class: "sun-title" };
|
|
4
|
+
function d(e, f) {
|
|
5
|
+
return l(), _("view", a, [
|
|
6
|
+
s(e.$slots, "default")
|
|
7
|
+
]);
|
|
8
|
+
}
|
|
9
|
+
const p = /* @__PURE__ */ r(c, [["render", d]]);
|
|
2
10
|
export {
|
|
3
|
-
|
|
11
|
+
p as default
|
|
4
12
|
};
|
package/index36.js
CHANGED
package/index37.js
CHANGED
package/index38.js
CHANGED
package/index39.js
CHANGED
package/index4.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as o, unref as r, openBlock as t, createBlock as c } from "vue";
|
|
2
2
|
import { router as a } from "@solar-taro/core";
|
|
3
|
-
import m from "./
|
|
3
|
+
import m from "./index29.js";
|
|
4
4
|
const n = r, p = t, _ = c, b = /* @__PURE__ */ o({
|
|
5
5
|
__name: "index",
|
|
6
6
|
setup(s) {
|
package/index40.js
CHANGED
package/index41.js
CHANGED
package/index42.js
CHANGED
package/index43.js
CHANGED
package/index44.js
CHANGED
package/index45.js
CHANGED
package/index46.js
CHANGED
package/index47.js
CHANGED
package/index48.js
CHANGED
package/index49.js
CHANGED
package/index50.js
CHANGED
package/index51.js
CHANGED
package/index52.js
CHANGED
package/index53.js
CHANGED
package/index54.js
CHANGED