@solar-taro/ui-sun 1.3.3 → 1.3.5
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 +14 -0
- package/index18.js +51 -49
- package/index19.js +1 -1
- package/index20.js +1 -1
- package/index22.js +1 -1
- package/index23.js +1 -1
- package/index24.js +1 -1
- package/index25.js +7 -2
- package/index26.js +1 -1
- package/index27.js +1 -1
- package/index28.js +1 -1
- package/index29.js +1 -1
- package/index30.js +1 -1
- package/index32.js +2 -7
- package/index33.js +1 -1
- package/index34.js +1 -1
- package/index35.js +1 -1
- package/index36.js +1 -1
- package/package.json +1 -1
- package/tailwind.js +64 -49
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 1.3.4 (2025-09-24)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **ui-sun/tailwind:** refactor color configuration to accept primary colors as options
|
|
6
|
+
|
|
7
|
+
### ❤️ Thank You
|
|
8
|
+
|
|
9
|
+
- HyperLife1119
|
|
10
|
+
|
|
11
|
+
## 1.3.3 (2025-09-24)
|
|
12
|
+
|
|
13
|
+
This was a version bump only for ui-sun to align it with other projects, there were no code changes.
|
|
14
|
+
|
|
1
15
|
## 1.3.2 (2025-09-18)
|
|
2
16
|
|
|
3
17
|
### 🩹 Fixes
|
package/index18.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { withPixel as
|
|
3
|
-
import { rpxToPx as
|
|
4
|
-
import { createSelectorQuery as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as P, ref as f, computed as i, onMounted as V, onUnmounted as I, renderList as L, Fragment as N, openBlock as D, createElementBlock as M, renderSlot as A, normalizeStyle as E, createCommentVNode as K, toDisplayString as R, createTextVNode as j, unref as q, withCtx as O, createBlock as Q, mergeProps as U } from "vue";
|
|
2
|
+
import { withPixel as w } from "@solar-kit/core";
|
|
3
|
+
import { rpxToPx as W, vibrator as X } from "@solar-taro/core";
|
|
4
|
+
import { createSelectorQuery as Y } from "@tarojs/taro";
|
|
5
|
+
import G from "./index13.js";
|
|
6
|
+
const H = L, J = N, a = D, u = M, k = A, h = E, Z = K, ee = R, te = j, b = q, re = O, le = Q, oe = U, ne = ["id", "refresher-enabled", "refresher-triggered", "refresher-background", "scroll-x", "scroll-y"], ie = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "sun-virtual-scroll-placeholder",
|
|
9
9
|
style: { display: "flex", "justify-content": "center", "align-items": "center", height: "85%" }
|
|
10
10
|
};
|
|
11
|
-
let
|
|
12
|
-
const
|
|
11
|
+
let ae = 1;
|
|
12
|
+
const ve = /* @__PURE__ */ P({
|
|
13
13
|
__name: "index",
|
|
14
14
|
props: {
|
|
15
15
|
refreshing: { type: Boolean },
|
|
@@ -19,49 +19,51 @@ const me = /* @__PURE__ */ F({
|
|
|
19
19
|
items: {},
|
|
20
20
|
itemSize: {},
|
|
21
21
|
itemKey: {},
|
|
22
|
-
id: { default: () => `sun-virtual-scroll-${
|
|
22
|
+
id: { default: () => `sun-virtual-scroll-${ae++}` },
|
|
23
23
|
bottomSpace: { default: 0 },
|
|
24
24
|
loading: { type: Boolean },
|
|
25
25
|
loadingText: { default: "Loading" }
|
|
26
26
|
},
|
|
27
27
|
emits: ["refresh", "lower"],
|
|
28
|
-
setup(
|
|
29
|
-
const p =
|
|
30
|
-
let c;
|
|
31
|
-
const s = f(0), m = f(0),
|
|
28
|
+
setup(z, { emit: B }) {
|
|
29
|
+
const p = B, r = z;
|
|
30
|
+
let c, g = !1;
|
|
31
|
+
const s = f(0), m = f(0), v = f(0), l = i(() => r.direction === "vertical"), $ = i(() => ({
|
|
32
32
|
right: l.value ? "0" : "auto",
|
|
33
|
-
transform: `translate${l.value ? "Y" : "X"}(${
|
|
33
|
+
transform: `translate${l.value ? "Y" : "X"}(${v.value}px)`,
|
|
34
34
|
"white-space": l.value ? "normal" : "nowrap"
|
|
35
|
-
})),
|
|
36
|
-
[l.value ? "height" : "width"]:
|
|
37
|
-
})),
|
|
35
|
+
})), n = i(() => typeof r.itemSize == "number" ? r.itemSize : r.itemSize.endsWith("rpx") ? W(parseFloat(r.itemSize)) : parseFloat(r.itemSize)), x = i(() => n.value * r.items.length), C = i(() => ({
|
|
36
|
+
[l.value ? "height" : "width"]: w(x.value + r.bottomSpace)
|
|
37
|
+
})), _ = i(() => ({
|
|
38
38
|
display: l.value ? "block" : "inline-block",
|
|
39
|
-
[l.value ? "height" : "width"]:
|
|
40
|
-
})),
|
|
39
|
+
[l.value ? "height" : "width"]: w(n.value)
|
|
40
|
+
})), T = i(
|
|
41
41
|
() => r.items.slice(
|
|
42
42
|
Math.max(m.value - s.value, 0),
|
|
43
43
|
m.value + s.value * 2
|
|
44
44
|
)
|
|
45
45
|
);
|
|
46
|
-
function
|
|
46
|
+
function F({ detail: e }) {
|
|
47
47
|
c && cancelAnimationFrame(c), c = requestAnimationFrame(() => {
|
|
48
48
|
const t = l.value ? e.scrollTop : e.scrollLeft;
|
|
49
|
-
m.value = ~~(t /
|
|
49
|
+
m.value = ~~(t / n.value), m.value > s.value - 1 ? v.value = t - n.value * s.value - t % n.value : v.value = t - t % (n.value * s.value), c = 0;
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function y() {
|
|
53
53
|
setTimeout(() => {
|
|
54
|
-
|
|
55
|
-
if (e = e, !(e != null && e.height) || !(e != null && e.width))
|
|
56
|
-
return
|
|
57
|
-
const { height: t, width: o } = e,
|
|
58
|
-
s.value = Math.ceil(
|
|
54
|
+
Y().select(`#${r.id}`).boundingClientRect((e) => {
|
|
55
|
+
if (e = e, (!(e != null && e.height) || !(e != null && e.width)) && !g)
|
|
56
|
+
return y();
|
|
57
|
+
const { height: t, width: o } = e, d = l.value ? t : o;
|
|
58
|
+
s.value = Math.ceil(d / n.value);
|
|
59
59
|
}).exec();
|
|
60
|
-
});
|
|
60
|
+
}, 50);
|
|
61
61
|
}
|
|
62
|
-
return
|
|
63
|
-
|
|
64
|
-
}), (
|
|
62
|
+
return V(() => {
|
|
63
|
+
y();
|
|
64
|
+
}), I(() => {
|
|
65
|
+
g = !0;
|
|
66
|
+
}), (e, t) => (a(), u("scroll-view", oe(e.$attrs, {
|
|
65
67
|
id: e.id,
|
|
66
68
|
class: "sun-virtual-scroll",
|
|
67
69
|
"refresher-enabled": e.refresher,
|
|
@@ -71,49 +73,49 @@ const me = /* @__PURE__ */ F({
|
|
|
71
73
|
"scroll-y": l.value,
|
|
72
74
|
enhanced: !0,
|
|
73
75
|
"lower-threshold": 300,
|
|
74
|
-
onScrollPassive: t[0] || (t[0] = (o) =>
|
|
76
|
+
onScrollPassive: t[0] || (t[0] = (o) => F(o)),
|
|
75
77
|
onRefresherrefresh: t[1] || (t[1] = (o) => {
|
|
76
|
-
|
|
78
|
+
b(X).short("light"), p("refresh");
|
|
77
79
|
}),
|
|
78
80
|
onScrolltolower: t[2] || (t[2] = (o) => p("lower"))
|
|
79
81
|
}), [
|
|
80
82
|
e.items.length ? (a(), u("view", {
|
|
81
83
|
key: 0,
|
|
82
84
|
class: "sun-virtual-scroll-content-container",
|
|
83
|
-
style: h(
|
|
85
|
+
style: h($.value)
|
|
84
86
|
}, [
|
|
85
|
-
(a(!0), u(
|
|
86
|
-
var
|
|
87
|
+
(a(!0), u(J, null, H(T.value, (o, d) => {
|
|
88
|
+
var S;
|
|
87
89
|
return a(), u("view", {
|
|
88
|
-
key: (
|
|
90
|
+
key: (S = o[e.itemKey]) != null ? S : d,
|
|
89
91
|
class: "sun-virtual-scroll-item",
|
|
90
|
-
style: h(
|
|
92
|
+
style: h(_.value)
|
|
91
93
|
}, [
|
|
92
|
-
|
|
94
|
+
k(e.$slots, "default", {
|
|
93
95
|
item: o,
|
|
94
|
-
index:
|
|
96
|
+
index: d
|
|
95
97
|
})
|
|
96
98
|
], 4);
|
|
97
99
|
}), 128))
|
|
98
|
-
], 4)) : (a(), u("view",
|
|
99
|
-
e.loading ? (a(),
|
|
100
|
+
], 4)) : (a(), u("view", ie, [
|
|
101
|
+
e.loading ? (a(), le(b(G), {
|
|
100
102
|
key: 0,
|
|
101
103
|
spinning: !0
|
|
102
104
|
}, {
|
|
103
|
-
default:
|
|
104
|
-
|
|
105
|
+
default: re(() => [
|
|
106
|
+
te(ee(e.loadingText), 1)
|
|
105
107
|
]),
|
|
106
108
|
_: 1
|
|
107
|
-
})) :
|
|
109
|
+
})) : k(e.$slots, "empty", { key: 1 })
|
|
108
110
|
])),
|
|
109
111
|
e.items.length ? (a(), u("view", {
|
|
110
112
|
key: 2,
|
|
111
113
|
class: "sun-virtual-scroll-spacer",
|
|
112
|
-
style: h(
|
|
113
|
-
}, null, 4)) :
|
|
114
|
-
], 16,
|
|
114
|
+
style: h(C.value)
|
|
115
|
+
}, null, 4)) : Z("", !0)
|
|
116
|
+
], 16, ne));
|
|
115
117
|
}
|
|
116
118
|
});
|
|
117
119
|
export {
|
|
118
|
-
|
|
120
|
+
ve as default
|
|
119
121
|
};
|
package/index19.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { renderSlot as r, mergeProps as o, openBlock as t, createElementBlock as n } from "vue";
|
|
2
|
-
import c from "./
|
|
2
|
+
import c from "./index25.js";
|
|
3
3
|
const s = {}, l = r, a = o, f = t, _ = n;
|
|
4
4
|
function m(e, p) {
|
|
5
5
|
return f(), _("view", a(e.$attrs, { class: "sun-fab" }), [
|
package/index20.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { renderSlot as o, mergeProps as r, openBlock as t, createElementBlock as s } from "vue";
|
|
2
|
-
import n from "./
|
|
2
|
+
import n from "./index25.js";
|
|
3
3
|
const c = {}, l = o, m = r, _ = t, a = s;
|
|
4
4
|
function u(e, d) {
|
|
5
5
|
return _(), a("view", m(e.$attrs, { class: "sun-sudoku-item" }), [
|
package/index22.js
CHANGED
package/index23.js
CHANGED
package/index24.js
CHANGED
package/index25.js
CHANGED
package/index26.js
CHANGED
package/index27.js
CHANGED
package/index28.js
CHANGED
package/index29.js
CHANGED
package/index30.js
CHANGED
package/index32.js
CHANGED
package/index33.js
CHANGED
package/index34.js
CHANGED
package/index35.js
CHANGED
package/index36.js
CHANGED
package/package.json
CHANGED
package/tailwind.js
CHANGED
|
@@ -1,52 +1,67 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} Options
|
|
3
|
+
* @property {Object<number, string>} primaryColors
|
|
4
|
+
* @param {Options} options
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
module.exports = function (options) {
|
|
8
|
+
return {
|
|
9
|
+
colors: {
|
|
10
|
+
primary: {
|
|
11
|
+
DEFAULT: 'var(--color-primary)',
|
|
12
|
+
contrast: 'var(--color-primary-contrast)',
|
|
13
|
+
tint: 'var(--color-primary-tint)',
|
|
14
|
+
shade: 'var(--color-primary-shade)',
|
|
15
|
+
...options.primaryColors
|
|
16
|
+
},
|
|
17
|
+
secondary: {
|
|
18
|
+
DEFAULT: 'var(--color-secondary)',
|
|
19
|
+
contrast: 'var(--color-secondary-contrast)',
|
|
20
|
+
tint: 'var(--color-secondary-tint)',
|
|
21
|
+
shade: 'var(--color-secondary-shade)',
|
|
22
|
+
},
|
|
23
|
+
info: {
|
|
24
|
+
DEFAULT: 'var(--color-info)',
|
|
25
|
+
contrast: 'var(--color-info-contrast)',
|
|
26
|
+
tint: 'var(--color-info-tint)',
|
|
27
|
+
shade: 'var(--color-info-shade)',
|
|
28
|
+
},
|
|
29
|
+
success: {
|
|
30
|
+
DEFAULT: 'var(--color-success)',
|
|
31
|
+
contrast: 'var(--color-success-contrast)',
|
|
32
|
+
tint: 'var(--color-success-tint)',
|
|
33
|
+
shade: 'var(--color-success-shade)',
|
|
34
|
+
},
|
|
35
|
+
warning: {
|
|
36
|
+
DEFAULT: 'var(--color-warning)',
|
|
37
|
+
contrast: 'var(--color-warning-contrast)',
|
|
38
|
+
tint: 'var(--color-warning-tint)',
|
|
39
|
+
shade: 'var(--color-warning-shade)',
|
|
40
|
+
},
|
|
41
|
+
danger: {
|
|
42
|
+
DEFAULT: 'var(--color-danger)',
|
|
43
|
+
contrast: 'var(--color-danger-contrast)',
|
|
44
|
+
tint: 'var(--color-danger-tint)',
|
|
45
|
+
shade: 'var(--color-danger-shade)',
|
|
46
|
+
},
|
|
47
|
+
medium: {
|
|
48
|
+
DEFAULT: 'var(--color-medium)',
|
|
49
|
+
contrast: 'var(--color-medium-contrast)',
|
|
50
|
+
tint: 'var(--color-medium-tint)',
|
|
51
|
+
shade: 'var(--color-medium-shade)',
|
|
52
|
+
},
|
|
53
|
+
light: {
|
|
54
|
+
DEFAULT: 'var(--color-light)',
|
|
55
|
+
contrast: 'var(--color-light-contrast)',
|
|
56
|
+
tint: 'var(--color-light-tint)',
|
|
57
|
+
shade: 'var(--color-light-shade)',
|
|
58
|
+
},
|
|
59
|
+
dark: {
|
|
60
|
+
DEFAULT: 'var(--color-dark)',
|
|
61
|
+
contrast: 'var(--color-dark-contrast)',
|
|
62
|
+
tint: 'var(--color-dark-tint)',
|
|
63
|
+
shade: 'var(--color-dark-shade)',
|
|
64
|
+
}
|
|
50
65
|
}
|
|
51
66
|
}
|
|
52
67
|
}
|