@solar-taro/ui-sun 3.1.0 → 3.1.1

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 CHANGED
@@ -1,3 +1,13 @@
1
+ ## 3.1.0 (2026-07-09)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **ui-sun/stepper:** add Stepper component
6
+
7
+ ### ❤️ Thank You
8
+
9
+ - HyperLife1119
10
+
1
11
  # 3.0.0 (2026-07-08)
2
12
 
3
13
  ### 🚀 Features
package/index15.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as C, watch as I, onMounted as L, onUnmounted as M, createElementVNode as k, unref as w, openBlock as z, createElementBlock as R } from "vue";
2
2
  import { createSelectorQuery as y, getWindowInfo as Q, previewImage as S } from "@tarojs/taro";
3
- import { QrCode as U, QrCodeEcc as a } from "./index65.js";
3
+ import { QrCode as U, QrCodeEcc as a } from "./index55.js";
4
4
  const h = k, A = w, B = z, D = R;
5
5
  let T = 1;
6
6
  const N = /* @__PURE__ */ C({
package/index16.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as p, inject as a, getCurrentInstance as c, onUnmounted as m, unref as u, renderSlot as i, mergeProps as _, openBlock as f, createElementBlock as v } from "vue";
2
- import { ACTIVE_CHILD as d, PARENT as g } from "./index64.js";
2
+ import { ACTIVE_CHILD as d, PARENT as g } from "./index56.js";
3
3
  const o = u, k = i, C = _, B = f, E = v, $ = /* @__PURE__ */ p({
4
4
  __name: "segment-btn",
5
5
  props: {
package/index17.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as x, getCurrentInstance as V, shallowRef as E, shallowReactive as k, computed as a, provide as i, watch as C, onMounted as w, renderSlot as y, createElementVNode as B, mergeProps as I, openBlock as O, createElementBlock as A } from "vue";
2
- import { ACTIVE_CHILD as N, PARENT as P } from "./index64.js";
2
+ import { ACTIVE_CHILD as N, PARENT as P } from "./index56.js";
3
3
  const R = y, T = B, b = I, L = O, S = A, $ = { class: "sun-segment-inner" }, M = /* @__PURE__ */ x({
4
4
  __name: "segment",
5
5
  props: {
package/index20.js CHANGED
@@ -1,10 +1,12 @@
1
- import { defineComponent as I, mergeModels as w, useModel as z, ref as f, computed as r, effect as C, unref as T, createVNode as _, normalizeClass as h, createElementVNode as S, openBlock as j, createElementBlock as q } from "vue";
2
- import { vibrator as v } from "@solar-taro/core";
3
- import c from "./index29.js";
4
- const b = T, V = _, m = h, d = S, A = j, D = q, G = ["type", "value", "disabled"], L = /* @__PURE__ */ I({
1
+ import { defineComponent as w, mergeModels as C, useModel as D, ref as f, computed as a, effect as T, unref as _, createVNode as h, normalizeClass as S, createElementVNode as j, openBlock as q, createElementBlock as A } from "vue";
2
+ import { vibrator as b } from "@solar-taro/core";
3
+ import x from "./index29.js";
4
+ const V = _, y = h, d = S, p = j, G = q, H = A, J = ["type", "value", "disabled"], P = /* @__PURE__ */ w({
5
5
  __name: "index",
6
- props: /* @__PURE__ */ w({
6
+ props: /* @__PURE__ */ C({
7
7
  type: { default: "decimal" },
8
+ expand: { default: "inline" },
9
+ size: { default: "middle" },
8
10
  min: { default: -1 / 0 },
9
11
  max: { default: 1 / 0 },
10
12
  disabled: { type: Boolean }
@@ -13,69 +15,76 @@ const b = T, V = _, m = h, d = S, A = j, D = q, G = ["type", "value", "disabled"
13
15
  modelModifiers: {}
14
16
  }),
15
17
  emits: ["update:modelValue"],
16
- setup(p) {
17
- const t = p, u = z(p, "modelValue"), a = f(""), x = r(() => t.type === "integer" ? "number" : "digit"), y = r(() => ({
18
- "sun-stepper-disabled": t.disabled
19
- })), o = f(!1), M = r(() => u.value <= t.min), B = r(() => u.value >= t.max);
20
- function g() {
21
- const e = u.value;
22
- e >= t.max || (u.value = i(Math.min(t.max, e + 1)), a.value = s(u.value), v.short());
18
+ setup(m) {
19
+ const e = m, l = D(m, "modelValue"), s = f(""), M = a(() => e.type === "integer" ? "number" : "digit"), g = a(() => ({
20
+ "sun-stepper-disabled": e.disabled,
21
+ "sun-stepper-inline": e.expand === "inline",
22
+ "sun-stepper-block": e.expand === "block",
23
+ "sun-stepper-small": e.size === "small",
24
+ "sun-stepper-middle": e.size === "middle",
25
+ "sun-stepper-large": e.size === "large"
26
+ })), r = f(!1), z = a(() => l.value <= e.min), B = a(() => l.value >= e.max), v = a(() => e.disabled || z.value), c = a(() => e.disabled || B.value);
27
+ function k() {
28
+ if (c.value) return;
29
+ const n = l.value;
30
+ l.value = o(Math.min(e.max, n + 1)), s.value = i(l.value), b.short();
23
31
  }
24
32
  function F() {
25
- const e = u.value;
26
- e <= t.min || (u.value = i(Math.max(t.min, e - 1)), a.value = s(u.value), v.short());
33
+ if (v.value) return;
34
+ const n = l.value;
35
+ l.value = o(Math.max(e.min, n - 1)), s.value = i(l.value), b.short();
27
36
  }
28
- function N(e) {
29
- a.value = e.detail.value;
30
- let n = E(a.value);
31
- n > t.max ? n = t.max : n < t.min && (n = t.min), u.value = n;
37
+ function N(n) {
38
+ s.value = n.detail.value;
39
+ let t = E(s.value);
40
+ t > e.max ? t = e.max : t < e.min && (t = e.min), l.value = t;
32
41
  }
33
- function $() {
34
- o.value = !0;
42
+ function I() {
43
+ r.value = !0;
35
44
  }
36
- function k() {
37
- a.value = s(u.value), o.value = !1;
45
+ function $() {
46
+ s.value = i(l.value), r.value = !1;
38
47
  }
39
- function E(e) {
40
- return e ? i(Number.parseFloat(e) || 0) : 0;
48
+ function E(n) {
49
+ return n ? o(Number.parseFloat(n) || 0) : 0;
41
50
  }
42
- function s(e) {
43
- return e = +e, Number.isFinite(e) ? (t.type === "integer" ? Math.trunc(e) : e).toString() : "";
51
+ function i(n) {
52
+ return n = +n, Number.isFinite(n) ? (e.type === "integer" ? Math.trunc(n) : n).toString() : "";
44
53
  }
45
- function i(e) {
46
- return t.type === "integer" ? Math.trunc(e) : +e.toFixed(2);
54
+ function o(n) {
55
+ return e.type === "integer" ? Math.trunc(n) : +n.toFixed(2);
47
56
  }
48
- return C(() => {
49
- o.value || (a.value = s(u.value));
50
- }), (e, n) => (A(), D("view", {
51
- class: m(["sun-stepper", y.value])
57
+ return T(() => {
58
+ r.value || (s.value = i(l.value));
59
+ }), (n, t) => (G(), H("view", {
60
+ class: d(["sun-stepper", g.value])
52
61
  }, [
53
- d("view", {
54
- class: m(["sun-stepper-btn sun-stepper-btn-dec", { "sun-stepper-btn-disabled": M.value }]),
62
+ p("view", {
63
+ class: d(["sun-stepper-btn sun-stepper-btn-dec", { "sun-stepper-btn-disabled": v.value }]),
55
64
  "hover-class": "hover",
56
- onTap: n[0] || (n[0] = (l) => F())
65
+ onTap: t[0] || (t[0] = (u) => F())
57
66
  }, [
58
- V(b(c), { name: "remove" })
67
+ y(V(x), { name: "remove" })
59
68
  ], 34),
60
- d("input", {
69
+ p("input", {
61
70
  class: "sun-stepper-input",
62
- type: x.value,
63
- value: a.value,
64
- disabled: e.disabled,
65
- onInput: n[1] || (n[1] = (l) => N(l)),
66
- onFocus: n[2] || (n[2] = (l) => $()),
67
- onBlur: n[3] || (n[3] = (l) => k())
68
- }, null, 40, G),
69
- d("view", {
70
- class: m(["sun-stepper-btn sun-stepper-btn-inc", { "sun-stepper-btn-disabled": B.value }]),
71
+ type: M.value,
72
+ value: s.value,
73
+ disabled: n.disabled,
74
+ onInput: t[1] || (t[1] = (u) => N(u)),
75
+ onFocus: t[2] || (t[2] = (u) => I()),
76
+ onBlur: t[3] || (t[3] = (u) => $())
77
+ }, null, 40, J),
78
+ p("view", {
79
+ class: d(["sun-stepper-btn sun-stepper-btn-inc", { "sun-stepper-btn-disabled": c.value }]),
71
80
  "hover-class": "hover",
72
- onTap: n[4] || (n[4] = (l) => g())
81
+ onTap: t[4] || (t[4] = (u) => k())
73
82
  }, [
74
- V(b(c), { name: "add" })
83
+ y(V(x), { name: "add" })
75
84
  ], 34)
76
85
  ], 2));
77
86
  }
78
87
  });
79
88
  export {
80
- L as default
89
+ P as default
81
90
  };
package/index30.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { renderSlot as t, openBlock as n, createElementBlock as r } from "vue";
2
- import c from "./index42.js";
2
+ import c from "./index38.js";
3
3
  const s = {}, o = t, l = n, d = r, _ = { class: "sun-item-divider" };
4
4
  function i(e, a) {
5
5
  return l(), d("view", _, [
package/index31.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { renderSlot as t, openBlock as n, createElementBlock as r } from "vue";
2
- import s from "./index42.js";
2
+ import s from "./index38.js";
3
3
  const c = {}, o = t, l = n, _ = r, d = { class: "sun-list-header" };
4
4
  function a(e, f) {
5
5
  return l(), _("view", d, [
package/index32.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { renderSlot as t, openBlock as n, createElementBlock as r } from "vue";
2
- import c from "./index42.js";
2
+ import c from "./index38.js";
3
3
  const s = {}, o = t, l = n, _ = r, a = { class: "sun-page-header" };
4
4
  function d(e, f) {
5
5
  return l(), _("view", a, [
package/index33.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { mergeProps as o, openBlock as r, createElementBlock as t } from "vue";
2
- import c from "./index42.js";
2
+ import c from "./index38.js";
3
3
  const n = {}, s = o, _ = r, l = t;
4
4
  function m(e, a) {
5
5
  return _(), l("view", s(e.$attrs, { class: "sun-skeleton" }), " ", 16);
package/index34.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 "./index42.js";
2
+ import n from "./index38.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/index35.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { renderSlot as t, openBlock as o, createElementBlock as n } from "vue";
2
- import r from "./index42.js";
2
+ import r from "./index38.js";
3
3
  const c = {}, s = t, l = o, _ = n, a = { class: "sun-title" };
4
4
  function d(e, f) {
5
5
  return l(), _("view", a, [
package/index36.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index4.js";
1
+ import f from "./index11.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index38.js CHANGED
@@ -1,4 +1,9 @@
1
- import f from "./index10.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/index39.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index6.js";
1
+ import f from "./index29.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index40.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index8.js";
1
+ import f from "./index4.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index41.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index9.js";
1
+ import f from "./index3.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index42.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 "./index7.js";
7
2
  export {
8
- s as default
3
+ f as default
9
4
  };
package/index43.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index14.js";
1
+ import f from "./index10.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index44.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index3.js";
1
+ import f from "./index15.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index45.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index29.js";
1
+ import f from "./index16.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index46.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index16.js";
1
+ import f from "./index17.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index47.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index17.js";
1
+ import f from "./index8.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index48.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index11.js";
1
+ import f from "./index9.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index49.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index13.js";
1
+ import f from "./index12.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index50.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index7.js";
1
+ import f from "./index13.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index51.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index15.js";
1
+ import f from "./index6.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index52.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index18.js";
1
+ import f from "./index14.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index53.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index12.js";
1
+ import f from "./index18.js";
2
2
  export {
3
3
  f as default
4
4
  };