@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/CHANGELOG.md CHANGED
@@ -1,3 +1,30 @@
1
+ # 3.0.0 (2026-07-08)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **ui-sun/list:** add List component
6
+ - **ui-sun/empty:** add Empty component
7
+ - **ui-sun/item-divider:** add ItemDivider component
8
+
9
+ ### 🩹 Fixes
10
+
11
+ - **ui-sun/toggle:** fix bug
12
+
13
+ ### ❤️ Thank You
14
+
15
+ - HyperLife1119
16
+
17
+ ## 2.9.0 (2026-07-08)
18
+
19
+ ### 🚀 Features
20
+
21
+ - **ui-sun/toggle:** add toggle component
22
+ - **ui-sun/fab:** add sun-icon font size styling
23
+
24
+ ### ❤️ Thank You
25
+
26
+ - HyperLife1119
27
+
1
28
  ## 2.8.11 (2026-07-06)
2
29
 
3
30
  ### 🚀 Features
@@ -0,0 +1 @@
1
+ export { default as SunEmpty } from './index.vue';
@@ -0,0 +1,23 @@
1
+ .sun-empty {
2
+ display: flex;
3
+ flex-direction: column;
4
+ align-items: center;
5
+ justify-content: center;
6
+ gap: 4px;
7
+ height: 100%;
8
+ color: var(--color-medium);
9
+
10
+ &-icon {
11
+ font-size: 60px;
12
+ }
13
+
14
+ &-description {
15
+ font-size: 14px;
16
+ font-weight: bold;
17
+ }
18
+
19
+ &-icon,
20
+ &-description {
21
+ opacity: 0.4;
22
+ }
23
+ }
@@ -0,0 +1,18 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ description?(_: {}): any;
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: SVGViewElement;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, SVGViewElement>;
12
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
13
+ export default _default;
14
+ type __VLS_WithTemplateSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
package/index.d.ts CHANGED
@@ -2,10 +2,13 @@ export * from './accordion';
2
2
  export * from './back-button';
3
3
  export * from './chip';
4
4
  export * from './circular-progress';
5
+ export * from './empty';
5
6
  export * from './fab';
6
7
  export * from './icon';
7
8
  export * from './item';
9
+ export * from './item-divider';
8
10
  export * from './lazy-render';
11
+ export * from './list';
9
12
  export * from './list-header';
10
13
  export * from './navbar';
11
14
  export * from './page-header';
@@ -16,6 +19,7 @@ export * from './segment';
16
19
  export * from './skeleton';
17
20
  export * from './slider-captcha';
18
21
  export * from './spinner';
22
+ export * from './stepper';
19
23
  export * from './sudoku';
20
24
  export * from './tabbar';
21
25
  export * from './table';
package/index.js CHANGED
@@ -5,20 +5,20 @@ import { default as n } from "./index5.js";
5
5
  import { default as d } from "./index6.js";
6
6
  import { default as m } from "./index7.js";
7
7
  import { default as x } from "./index8.js";
8
- import { default as c } from "./index9.js";
8
+ import { default as b } from "./index9.js";
9
9
  import { default as g } from "./index10.js";
10
10
  import { default as k } from "./index11.js";
11
- import { default as B } from "./index12.js";
12
- import { default as P } from "./index13.js";
13
- import { default as v } from "./index14.js";
14
- import { default as H } from "./index15.js";
15
- import { default as R } from "./index16.js";
16
- import { default as y } from "./index17.js";
11
+ import { default as I } from "./index12.js";
12
+ import { default as B } from "./index13.js";
13
+ import { default as P } from "./index14.js";
14
+ import { default as y } from "./index15.js";
15
+ import { default as H } from "./index16.js";
16
+ import { default as w } from "./index17.js";
17
17
  import { default as A } from "./index18.js";
18
- import { default as N } from "./index19.js";
19
- import { default as V } from "./index20.js";
20
- import { default as q } from "./index21.js";
21
- import { default as E } from "./index22.js";
18
+ import { default as E } from "./index19.js";
19
+ import { default as N } from "./index20.js";
20
+ import { default as V } from "./index21.js";
21
+ import { default as q } from "./index22.js";
22
22
  import { default as K } from "./index23.js";
23
23
  import { default as O } from "./index24.js";
24
24
  import { default as W } from "./index25.js";
@@ -28,35 +28,43 @@ import { default as ee } from "./index28.js";
28
28
  import { default as oe } from "./index29.js";
29
29
  import { default as te } from "./index30.js";
30
30
  import { default as fe } from "./index31.js";
31
+ import { default as ne } from "./index32.js";
32
+ import { default as de } from "./index33.js";
33
+ import { default as me } from "./index34.js";
34
+ import { default as xe } from "./index35.js";
31
35
  export {
32
36
  o as SolarSun,
33
37
  t as SunAccordion,
34
38
  f as SunBackButton,
35
39
  n as SunChip,
36
40
  d as SunCircularProgress,
37
- x as SunFab,
38
- m as SunFabGroup,
39
- Y as SunIcon,
40
- c as SunItem,
41
- g as SunLazyRender,
42
- _ as SunListHeader,
43
- k as SunNavbar,
44
- ee as SunPageHeader,
45
- B as SunPopover,
46
- P as SunQrcode,
47
- H as SunSegment,
48
- v as SunSegmentBtn,
49
- oe as SunSkeleton,
50
- R as SunSliderCaptcha,
51
- y as SunSpinner,
52
- A as SunSudoku,
53
- te as SunSudokuItem,
54
- N as SunTabbar,
55
- K as SunTag,
56
- E as SunTb,
57
- V as SunTbCell,
58
- q as SunTbRow,
59
- fe as SunTitle,
60
- O as SunToggle,
61
- W as SunVirtualScroll
41
+ m as SunEmpty,
42
+ b as SunFab,
43
+ x as SunFabGroup,
44
+ oe as SunIcon,
45
+ g as SunItem,
46
+ te as SunItemDivider,
47
+ k as SunLazyRender,
48
+ I as SunList,
49
+ fe as SunListHeader,
50
+ B as SunNavbar,
51
+ ne as SunPageHeader,
52
+ P as SunPopover,
53
+ y as SunQrcode,
54
+ w as SunSegment,
55
+ H as SunSegmentBtn,
56
+ de as SunSkeleton,
57
+ A as SunSliderCaptcha,
58
+ E as SunSpinner,
59
+ N as SunStepper,
60
+ V as SunSudoku,
61
+ me as SunSudokuItem,
62
+ q as SunTabbar,
63
+ Y as SunTag,
64
+ W as SunTb,
65
+ K as SunTbCell,
66
+ O as SunTbRow,
67
+ xe as SunTitle,
68
+ _ as SunToggle,
69
+ ee as SunVirtualScroll
62
70
  };
package/index10.js CHANGED
@@ -1,24 +1,36 @@
1
- import { defineComponent as c, ref as d, onActivated as s, onDeactivated as i, renderSlot as l, createCommentVNode as f } from "vue";
2
- const m = l, u = f, v = /* @__PURE__ */ c({
1
+ import { defineComponent as r, computed as c, renderSlot as i, createElementVNode as m, unref as d, openBlock as u, createBlock as p, createCommentVNode as _, normalizeClass as f, createElementBlock as k } from "vue";
2
+ import B from "./index29.js";
3
+ const n = i, o = m, v = d, s = u, h = p, w = _, C = f, y = k, E = { class: "sun-item-inner" }, N = { class: "sun-item-content-wrapper" }, z = /* @__PURE__ */ r({
3
4
  __name: "index",
4
5
  props: {
5
- hook: { default: "activated" }
6
+ detail: { type: Boolean },
7
+ lines: { type: Boolean, default: !0 },
8
+ clickable: { type: Boolean }
6
9
  },
7
- setup(a) {
8
- const n = a, e = d(!1);
9
- let t;
10
- function o() {
11
- t = requestAnimationFrame(() => {
12
- e.value = !0;
13
- });
14
- }
15
- return n.hook === "created" && o(), s(() => {
16
- o();
17
- }), i(() => {
18
- e.value = !1, t && cancelAnimationFrame(t);
19
- }), (r, p) => e.value ? m(r.$slots, "default", { key: 0 }) : u("", !0);
10
+ setup(l) {
11
+ const t = l, a = c(() => ({
12
+ "sun-item-lines-none": !t.lines,
13
+ "sun-item-clickable": t.detail || t.clickable
14
+ }));
15
+ return (e, V) => (s(), y("view", {
16
+ class: C(["sun-item", a.value]),
17
+ "hover-class": "hover"
18
+ }, [
19
+ n(e.$slots, "start"),
20
+ o("view", E, [
21
+ o("view", N, [
22
+ n(e.$slots, "default")
23
+ ]),
24
+ n(e.$slots, "end"),
25
+ e.detail ? (s(), h(v(B), {
26
+ key: 0,
27
+ class: "sun-item-detail-icon",
28
+ name: "chevron-forward"
29
+ })) : w("", !0)
30
+ ])
31
+ ], 2));
20
32
  }
21
33
  });
22
34
  export {
23
- v as default
35
+ z as default
24
36
  };
package/index11.js CHANGED
@@ -1,30 +1,24 @@
1
- import { defineComponent as i, renderSlot as d, createElementVNode as s, openBlock as c, createElementBlock as l } from "vue";
2
- import { withPixel as t } from "@solar-kit/core";
3
- import { getNavbarRect as p } from "@solar-taro/core";
4
- const a = d, o = s, g = c, m = l, v = { class: "sun-navbar-inner" }, b = { class: "sun-navbar-center" }, k = /* @__PURE__ */ i({
1
+ import { defineComponent as c, ref as d, onActivated as s, onDeactivated as i, renderSlot as l, createCommentVNode as f } from "vue";
2
+ const m = l, u = f, v = /* @__PURE__ */ c({
5
3
  __name: "index",
6
- setup(_) {
7
- const e = p(), r = {
8
- "--navbar-height": t(e.height),
9
- "--navbar-content-height": t(e.buttonHeight),
10
- "--navbar-padding-top": t(e.paddingTop),
11
- "--navbar-padding-bottom": t(e.paddingBottom),
12
- "--navbar-padding-left": t(e.paddingLeft),
13
- "--navbar-padding-right": t(e.paddingRight)
14
- };
15
- return (n, h) => (g(), m("view", {
16
- class: "sun-navbar",
17
- style: r
18
- }, [
19
- o("view", v, [
20
- a(n.$slots, "default"),
21
- o("view", b, [
22
- a(n.$slots, "center")
23
- ])
24
- ])
25
- ]));
4
+ props: {
5
+ hook: { default: "activated" }
6
+ },
7
+ setup(a) {
8
+ const n = a, e = d(!1);
9
+ let t;
10
+ function o() {
11
+ t = requestAnimationFrame(() => {
12
+ e.value = !0;
13
+ });
14
+ }
15
+ return n.hook === "created" && o(), s(() => {
16
+ o();
17
+ }), i(() => {
18
+ e.value = !1, t && cancelAnimationFrame(t);
19
+ }), (r, p) => e.value ? m(r.$slots, "default", { key: 0 }) : u("", !0);
26
20
  }
27
21
  });
28
22
  export {
29
- k as default
23
+ v as default
30
24
  };
package/index12.js CHANGED
@@ -1,39 +1,86 @@
1
- import { defineComponent as m, mergeModels as d, useModel as v, computed as t, renderSlot as w, createElementVNode as g, mergeProps as k, withModifiers as y, normalizeClass as $, normalizeStyle as h, openBlock as b, createElementBlock as B } from "vue";
2
- const p = w, n = g, M = k, z = y, E = $, S = h, C = b, N = B, T = /* @__PURE__ */ m({
1
+ import { defineComponent as c, renderSlot as m, toDisplayString as y, createTextVNode as w, unref as p, withCtx as x, openBlock as v, createBlock as B, createVNode as S, vShow as k, createElementVNode as b, withDirectives as N, mergeProps as V, createElementBlock as E } from "vue";
2
+ import { vibrator as $ } from "@solar-taro/core";
3
+ import { SunSpinner as a, SunEmpty as D } from "@solar-taro/ui-sun";
4
+ const s = m, T = y, C = w, r = p, z = x, i = v, P = B, d = S, f = k, n = b, h = N, j = V, A = E, L = ["enable-flex", "refresher-enabled", "refresher-triggered", "refresher-background"], R = {
5
+ class: "sun-list-placeholder",
6
+ style: { display: "flex", "justify-content": "center", "align-items": "center", height: "85%" }
7
+ }, q = {
8
+ class: "sun-list-loading-wrapper",
9
+ style: { "text-align": "center", padding: "6px" }
10
+ }, I = /* @__PURE__ */ c({
3
11
  __name: "index",
4
- props: /* @__PURE__ */ d({
5
- placement: {},
6
- offset: { default: "6px" },
7
- background: { default: "rgba(0, 0, 0, 0.5)" },
8
- color: { default: "#fff" }
9
- }, {
10
- show: { type: Boolean },
11
- showModifiers: {}
12
- }),
13
- emits: ["update:show"],
14
- setup(r) {
15
- const o = r, l = v(r, "show"), a = t(() => ["left", "right"].includes(o.placement[0])), u = t(() => ["top", "bottom"].includes(o.placement[1])), f = t(() => a.value ? o.offset : "0px"), i = t(() => u.value ? o.offset : "0px");
16
- return (e, s) => (C(), N("view", {
17
- class: E(["sun-popover", [{ "sun-popover-show": l.value }, `sun-popover-x-${e.placement[0]}`, `sun-popover-y-${e.placement[1]}`]]),
18
- style: S({ "--popover-x-offset": f.value, "--popover-y-offset": i.value, "--popover-background": e.background }),
19
- onTap: z((c) => !1, ["stop"])
20
- }, [
21
- n("view", {
22
- class: "sun-popover-trigger",
23
- onTap: s[0] || (s[0] = (c) => l.value = !l.value)
24
- }, [
25
- p(e.$slots, "default")
26
- ], 32),
27
- n("view", M(e.$attrs, {
28
- class: "sun-popover-container",
29
- style: { color: e.color }
30
- }), [
31
- s[1] || (s[1] = n("view", { class: "sun-popover-arrow" }, null, -1)),
32
- p(e.$slots, "content")
33
- ], 16)
34
- ], 38));
12
+ props: {
13
+ refreshing: {
14
+ type: Boolean,
15
+ default: !1
16
+ },
17
+ flex: {
18
+ type: Boolean,
19
+ default: !1
20
+ },
21
+ loading: {
22
+ type: Boolean,
23
+ default: !1
24
+ },
25
+ loadingText: {
26
+ type: String,
27
+ default: "Loading"
28
+ },
29
+ data: {
30
+ type: Array,
31
+ default: []
32
+ },
33
+ refresher: {
34
+ type: Boolean,
35
+ default: !0
36
+ },
37
+ refresherBg: {
38
+ type: String,
39
+ default: "transparent"
40
+ }
41
+ },
42
+ emits: ["refresh", "lower"],
43
+ setup(e, { emit: g }) {
44
+ const o = g;
45
+ return (l, t) => (i(), A("scroll-view", j(l.$attrs, {
46
+ class: "sun-list",
47
+ enhanced: !0,
48
+ "scroll-y": !0,
49
+ "lower-threshold": 300,
50
+ "enable-flex": e.flex,
51
+ "refresher-enabled": e.refresher,
52
+ "refresher-triggered": e.refreshing,
53
+ "refresher-background": e.refresherBg,
54
+ onRefresherrefresh: t[0] || (t[0] = (u) => {
55
+ r($).short("light"), o("refresh");
56
+ }),
57
+ onScrolltolower: t[1] || (t[1] = (u) => o("lower"))
58
+ }), [
59
+ s(l.$slots, "default"),
60
+ h(n("view", R, [
61
+ e.loading ? (i(), P(r(a), {
62
+ key: 0,
63
+ size: "large"
64
+ }, {
65
+ default: z(() => [
66
+ C(T(e.loadingText), 1)
67
+ ]),
68
+ _: 1
69
+ })) : s(l.$slots, "empty", { key: 1 }, () => [
70
+ d(r(D))
71
+ ])
72
+ ], 512), [
73
+ [f, !e.data.length]
74
+ ]),
75
+ h(n("view", q, [
76
+ d(r(a), { size: "small" })
77
+ ], 512), [
78
+ [f, e.data.length && e.loading && !e.refreshing]
79
+ ]),
80
+ t[2] || (t[2] = n("view", { style: { position: "absolute", height: "1px", width: "1px", overflow: "hidden" } }, null, -1))
81
+ ], 16, L));
35
82
  }
36
83
  });
37
84
  export {
38
- T as default
85
+ I as default
39
86
  };
package/index13.js CHANGED
@@ -1,81 +1,30 @@
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
- import { createSelectorQuery as y, getWindowInfo as Q, previewImage as S } from "@tarojs/taro";
3
- import { QrCode as U, QrCodeEcc as a } from "./index55.js";
4
- const h = k, A = w, B = z, D = R;
5
- let T = 1;
6
- const N = /* @__PURE__ */ C({
1
+ import { defineComponent as i, renderSlot as d, createElementVNode as s, openBlock as c, createElementBlock as l } from "vue";
2
+ import { withPixel as t } from "@solar-kit/core";
3
+ import { getNavbarRect as p } from "@solar-taro/core";
4
+ const a = d, o = s, g = c, m = l, v = { class: "sun-navbar-inner" }, b = { class: "sun-navbar-center" }, k = /* @__PURE__ */ i({
7
5
  __name: "index",
8
- props: {
9
- value: {},
10
- color: { default: "#000000" },
11
- backgroundColor: { default: "transparent" },
12
- level: { default: "M" }
13
- },
14
- emits: ["rendered"],
15
- setup(m, { expose: v, emit: g }) {
16
- let n, i, l, s = !1;
17
- const u = `sun-qrcode-captcha-${T++}`, x = {
18
- L: a.LOW,
19
- M: a.MEDIUM,
20
- Q: a.QUARTILE,
21
- H: a.HIGH
22
- }, _ = g, c = m;
23
- v({
24
- getDataURL: p
25
- });
26
- function d() {
27
- setTimeout(() => {
28
- y().select(`#${u}`).fields({ node: !0, size: !0 }).exec(([{ node: t, width: e, height: r }]) => {
29
- if (s) return;
30
- if (!r || !e)
31
- return d();
32
- const o = Q().pixelRatio;
33
- n = t, l = n.getContext("2d"), i = e, n.width = e * o, n.height = r * o, l.scale(o, o), f();
34
- });
35
- }, 50);
36
- }
37
- function f() {
38
- const t = U.encodeText(c.value, x[c.level]), e = i / (t.size + 2);
39
- l.fillStyle = c.backgroundColor, l.fillRect(0, 0, n.width, n.height), l.fillStyle = c.color;
40
- for (let r = 0; r < t.size; r++)
41
- for (let o = 0; o < t.size; o++)
42
- t.getModule(o, r) && l.fillRect(
43
- o * e + e,
44
- // +moduleSize 留出边距
45
- r * e + e,
46
- e,
47
- e
48
- );
49
- _("rendered");
50
- }
51
- function p() {
52
- return n.toDataURL("image/png", 1);
53
- }
54
- function E() {
55
- const t = p();
56
- S({
57
- current: t,
58
- urls: [t]
59
- });
60
- }
61
- return I(() => c.value, () => {
62
- l && f();
63
- }), L(() => {
64
- d();
65
- }), M(() => {
66
- s = !0;
67
- }), (t, e) => (B(), D("view", {
68
- class: "sun-qrcode",
69
- onTap: e[0] || (e[0] = (r) => A(n) && E())
6
+ setup(_) {
7
+ const e = p(), r = {
8
+ "--navbar-height": t(e.height),
9
+ "--navbar-content-height": t(e.buttonHeight),
10
+ "--navbar-padding-top": t(e.paddingTop),
11
+ "--navbar-padding-bottom": t(e.paddingBottom),
12
+ "--navbar-padding-left": t(e.paddingLeft),
13
+ "--navbar-padding-right": t(e.paddingRight)
14
+ };
15
+ return (n, h) => (g(), m("view", {
16
+ class: "sun-navbar",
17
+ style: r
70
18
  }, [
71
- h("canvas", {
72
- id: u,
73
- type: "2d",
74
- class: "sun-slider-captcha-canvas"
75
- })
76
- ], 32));
19
+ o("view", v, [
20
+ a(n.$slots, "default"),
21
+ o("view", b, [
22
+ a(n.$slots, "center")
23
+ ])
24
+ ])
25
+ ]));
77
26
  }
78
27
  });
79
28
  export {
80
- N as default
29
+ k as default
81
30
  };
package/index14.js CHANGED
@@ -1,25 +1,39 @@
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 "./index56.js";
3
- const o = u, k = i, C = _, B = f, E = v, $ = /* @__PURE__ */ p({
4
- __name: "segment-btn",
5
- props: {
6
- value: {}
7
- },
8
- setup(b) {
9
- const l = a(d), e = a(g), n = c();
10
- return m(() => {
11
- e.unlink(n);
12
- }), e.link(n), (t, r) => {
13
- var s;
14
- return B(), E("view", C(t.$attrs, {
15
- class: ["sun-segment-btn", { "sun-segment-btn-active": ((s = o(l)) == null ? void 0 : s.props.value) === t.value }],
16
- onTap: r[0] || (r[0] = (I) => o(e).active(o(n)))
1
+ import { defineComponent as m, mergeModels as d, useModel as v, computed as t, renderSlot as w, createElementVNode as g, mergeProps as k, withModifiers as y, normalizeClass as $, normalizeStyle as h, openBlock as b, createElementBlock as B } from "vue";
2
+ const p = w, n = g, M = k, z = y, E = $, S = h, C = b, N = B, T = /* @__PURE__ */ m({
3
+ __name: "index",
4
+ props: /* @__PURE__ */ d({
5
+ placement: {},
6
+ offset: { default: "6px" },
7
+ background: { default: "rgba(0, 0, 0, 0.5)" },
8
+ color: { default: "#fff" }
9
+ }, {
10
+ show: { type: Boolean },
11
+ showModifiers: {}
12
+ }),
13
+ emits: ["update:show"],
14
+ setup(r) {
15
+ const o = r, l = v(r, "show"), a = t(() => ["left", "right"].includes(o.placement[0])), u = t(() => ["top", "bottom"].includes(o.placement[1])), f = t(() => a.value ? o.offset : "0px"), i = t(() => u.value ? o.offset : "0px");
16
+ return (e, s) => (C(), N("view", {
17
+ class: E(["sun-popover", [{ "sun-popover-show": l.value }, `sun-popover-x-${e.placement[0]}`, `sun-popover-y-${e.placement[1]}`]]),
18
+ style: S({ "--popover-x-offset": f.value, "--popover-y-offset": i.value, "--popover-background": e.background }),
19
+ onTap: z((c) => !1, ["stop"])
20
+ }, [
21
+ n("view", {
22
+ class: "sun-popover-trigger",
23
+ onTap: s[0] || (s[0] = (c) => l.value = !l.value)
24
+ }, [
25
+ p(e.$slots, "default")
26
+ ], 32),
27
+ n("view", M(e.$attrs, {
28
+ class: "sun-popover-container",
29
+ style: { color: e.color }
17
30
  }), [
18
- k(t.$slots, "default")
19
- ], 16);
20
- };
31
+ s[1] || (s[1] = n("view", { class: "sun-popover-arrow" }, null, -1)),
32
+ p(e.$slots, "content")
33
+ ], 16)
34
+ ], 38));
21
35
  }
22
36
  });
23
37
  export {
24
- $ as default
38
+ T as default
25
39
  };