@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.
Files changed (99) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/empty/index.d.ts +1 -0
  3. package/empty/index.scss +23 -0
  4. package/empty/index.vue.d.ts +18 -0
  5. package/index.d.ts +4 -0
  6. package/index.js +44 -36
  7. package/index10.js +29 -17
  8. package/index11.js +19 -25
  9. package/index12.js +81 -34
  10. package/index13.js +24 -75
  11. package/index14.js +34 -20
  12. package/index15.js +72 -46
  13. package/index16.js +19 -144
  14. package/index17.js +48 -28
  15. package/index18.js +144 -21
  16. package/index19.js +28 -42
  17. package/index20.js +77 -26
  18. package/index21.js +19 -10
  19. package/index22.js +41 -27
  20. package/index23.js +24 -18
  21. package/index24.js +14 -32
  22. package/index25.js +27 -117
  23. package/index26.js +17 -9
  24. package/index27.js +34 -11
  25. package/index28.js +123 -11
  26. package/index29.js +14 -8
  27. package/index30.js +10 -9
  28. package/index31.js +8 -7
  29. package/index32.js +11 -2
  30. package/index33.js +8 -2
  31. package/index34.js +10 -2
  32. package/index35.js +10 -2
  33. package/index36.js +1 -1
  34. package/index37.js +1 -1
  35. package/index38.js +2 -7
  36. package/index39.js +1 -1
  37. package/index4.js +1 -1
  38. package/index40.js +1 -1
  39. package/index41.js +1 -1
  40. package/index42.js +7 -2
  41. package/index43.js +1 -1
  42. package/index44.js +1 -1
  43. package/index45.js +1 -1
  44. package/index46.js +1 -1
  45. package/index47.js +1 -1
  46. package/index48.js +1 -1
  47. package/index49.js +1 -1
  48. package/index50.js +1 -1
  49. package/index51.js +1 -1
  50. package/index52.js +1 -1
  51. package/index53.js +1 -1
  52. package/index54.js +1 -1
  53. package/index55.js +2 -526
  54. package/index56.js +2 -3
  55. package/index57.js +2 -66
  56. package/index58.js +2 -12
  57. package/index59.js +2 -25
  58. package/index60.js +2 -14
  59. package/index61.js +1 -1
  60. package/index62.js +1 -1
  61. package/index63.js +2 -26
  62. package/index64.js +3 -2
  63. package/index65.js +525 -505
  64. package/index66.js +65 -78
  65. package/index67.js +12 -70
  66. package/index68.js +25 -69
  67. package/index69.js +14 -543
  68. package/index7.js +18 -17
  69. package/index70.js +26 -2
  70. package/index72.js +506 -2
  71. package/index73.js +78 -3
  72. package/index74.js +70 -2
  73. package/index75.js +69 -4
  74. package/index76.js +543 -2
  75. package/index79.js +2 -2
  76. package/index8.js +13 -14
  77. package/index80.js +3 -47
  78. package/index81.js +2 -82
  79. package/index82.js +4 -2
  80. package/index83.js +2 -2
  81. package/index84.js +2 -2
  82. package/index85.js +4 -0
  83. package/index86.js +50 -0
  84. package/index87.js +84 -0
  85. package/index88.js +4 -0
  86. package/index89.js +4 -0
  87. package/index9.js +16 -30
  88. package/index90.js +4 -0
  89. package/index91.js +4 -0
  90. package/item-divider/index.d.ts +1 -0
  91. package/item-divider/index.scss +9 -0
  92. package/item-divider/index.vue.d.ts +18 -0
  93. package/list/index.d.ts +1 -0
  94. package/list/index.vue.d.ts +90 -0
  95. package/package.json +1 -1
  96. package/stepper/index.d.ts +1 -0
  97. package/stepper/index.scss +61 -0
  98. package/stepper/index.vue.d.ts +19 -0
  99. package/toggle/index.vue.d.ts +2 -2
package/index28.js CHANGED
@@ -1,13 +1,125 @@
1
- import { renderSlot as t, openBlock as n, createElementBlock as r } from "vue";
2
- import c from "./index38.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]]);
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
- p as default
124
+ he as default
13
125
  };
package/index29.js CHANGED
@@ -1,10 +1,16 @@
1
- import { mergeProps as o, openBlock as r, createElementBlock as t } from "vue";
2
- import c from "./index38.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]]);
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
- i as default
15
+ d as default
10
16
  };
package/index30.js CHANGED
@@ -1,12 +1,13 @@
1
- import { renderSlot as o, mergeProps as r, openBlock as t, createElementBlock as s } from "vue";
2
- import n from "./index38.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);
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 i = /* @__PURE__ */ n(c, [["render", u]]);
10
+ const p = /* @__PURE__ */ c(s, [["render", i]]);
10
11
  export {
11
- i as default
12
+ p as default
12
13
  };
package/index31.js CHANGED
@@ -1,12 +1,13 @@
1
- import { renderSlot as t, openBlock as o, createElementBlock as n } from "vue";
2
- import r from "./index38.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")
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__ */ r(c, [["render", d]]);
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 f from "./index3.js";
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
- f as default
12
+ p as default
4
13
  };
package/index33.js CHANGED
@@ -1,4 +1,10 @@
1
- import f from "./index5.js";
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
- f as default
9
+ i as default
4
10
  };
package/index34.js CHANGED
@@ -1,4 +1,12 @@
1
- import f from "./index26.js";
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
- f as default
11
+ i as default
4
12
  };
package/index35.js CHANGED
@@ -1,4 +1,12 @@
1
- import f from "./index9.js";
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
- f as default
11
+ p as default
4
12
  };
package/index36.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index11.js";
1
+ import f from "./index4.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index37.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index6.js";
1
+ import f from "./index5.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index38.js CHANGED
@@ -1,9 +1,4 @@
1
- const s = (t, e) => {
2
- const o = t.__vccOpts || t;
3
- for (const [r, c] of e)
4
- o[r] = c;
5
- return o;
6
- };
1
+ import f from "./index10.js";
7
2
  export {
8
- s as default
3
+ f as default
9
4
  };
package/index39.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index13.js";
1
+ import f from "./index6.js";
2
2
  export {
3
3
  f as default
4
4
  };
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 "./index26.js";
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
@@ -1,4 +1,4 @@
1
- import f from "./index10.js";
1
+ import f from "./index8.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index41.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index14.js";
1
+ import f from "./index9.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index42.js CHANGED
@@ -1,4 +1,9 @@
1
- import f from "./index15.js";
1
+ const s = (t, e) => {
2
+ const o = t.__vccOpts || t;
3
+ for (const [r, c] of e)
4
+ o[r] = c;
5
+ return o;
6
+ };
2
7
  export {
3
- f as default
8
+ s as default
4
9
  };
package/index43.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index16.js";
1
+ import f from "./index14.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index44.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index17.js";
1
+ import f from "./index3.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index45.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index12.js";
1
+ import f from "./index29.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index46.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index7.js";
1
+ import f from "./index16.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index47.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index8.js";
1
+ import f from "./index17.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index48.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index18.js";
1
+ import f from "./index11.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index49.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index4.js";
1
+ import f from "./index13.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index50.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index19.js";
1
+ import f from "./index7.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index51.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index20.js";
1
+ import f from "./index15.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index52.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index21.js";
1
+ import f from "./index18.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index53.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index22.js";
1
+ import f from "./index12.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index54.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index23.js";
1
+ import f from "./index19.js";
2
2
  export {
3
3
  f as default
4
4
  };