@solar-taro/ui-sun 2.8.11 → 3.0.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 (93) hide show
  1. package/CHANGELOG.md +21 -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/fab/index.scss +4 -0
  6. package/index.d.ts +4 -0
  7. package/index.js +50 -42
  8. package/index10.js +29 -17
  9. package/index11.js +19 -25
  10. package/index12.js +81 -34
  11. package/index13.js +24 -75
  12. package/index14.js +34 -20
  13. package/index15.js +72 -46
  14. package/index16.js +19 -144
  15. package/index17.js +48 -28
  16. package/index18.js +144 -21
  17. package/index19.js +28 -42
  18. package/index20.js +18 -21
  19. package/index21.js +42 -11
  20. package/index22.js +21 -26
  21. package/index23.js +12 -18
  22. package/index24.js +27 -117
  23. package/index25.js +17 -9
  24. package/index26.js +34 -11
  25. package/index27.js +123 -11
  26. package/index28.js +14 -8
  27. package/index29.js +10 -9
  28. package/index30.js +8 -7
  29. package/index31.js +11 -2
  30. package/index32.js +8 -2
  31. package/index33.js +10 -2
  32. package/index34.js +10 -2
  33. package/index36.js +1 -1
  34. package/index38.js +2 -7
  35. package/index39.js +1 -1
  36. package/index4.js +1 -1
  37. package/index40.js +1 -1
  38. package/index41.js +1 -1
  39. package/index42.js +7 -2
  40. package/index43.js +1 -1
  41. package/index44.js +1 -1
  42. package/index45.js +1 -1
  43. package/index46.js +1 -1
  44. package/index47.js +1 -1
  45. package/index48.js +1 -1
  46. package/index49.js +1 -1
  47. package/index50.js +1 -1
  48. package/index51.js +1 -1
  49. package/index52.js +1 -1
  50. package/index53.js +526 -2
  51. package/index55.js +2 -66
  52. package/index56.js +2 -12
  53. package/index57.js +2 -25
  54. package/index58.js +2 -14
  55. package/index59.js +1 -1
  56. package/index60.js +2 -526
  57. package/index61.js +2 -26
  58. package/index62.js +2 -2
  59. package/index63.js +2 -506
  60. package/index64.js +65 -78
  61. package/index65.js +12 -70
  62. package/index66.js +25 -69
  63. package/index67.js +14 -543
  64. package/index68.js +26 -2
  65. package/index7.js +18 -17
  66. package/index70.js +506 -2
  67. package/index71.js +78 -3
  68. package/index72.js +70 -2
  69. package/index73.js +69 -4
  70. package/index74.js +543 -2
  71. package/index77.js +2 -48
  72. package/index78.js +3 -81
  73. package/index8.js +13 -14
  74. package/index80.js +4 -2
  75. package/index81.js +2 -2
  76. package/index82.js +2 -2
  77. package/index83.js +4 -0
  78. package/index84.js +50 -0
  79. package/index85.js +84 -0
  80. package/index86.js +4 -0
  81. package/index87.js +4 -0
  82. package/index88.js +4 -0
  83. package/index89.js +4 -0
  84. package/index9.js +16 -30
  85. package/item-divider/index.d.ts +1 -0
  86. package/item-divider/index.scss +9 -0
  87. package/item-divider/index.vue.d.ts +18 -0
  88. package/list/index.d.ts +1 -0
  89. package/list/index.vue.d.ts +90 -0
  90. package/package.json +1 -1
  91. package/toggle/index.d.ts +1 -0
  92. package/toggle/index.scss +95 -0
  93. package/toggle/index.vue.d.ts +16 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ ## 2.9.0 (2026-07-08)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **ui-sun/toggle:** add toggle component
6
+ - **ui-sun/fab:** add sun-icon font size styling
7
+
8
+ ### ❤️ Thank You
9
+
10
+ - HyperLife1119
11
+
12
+ ## 2.8.11 (2026-07-06)
13
+
14
+ ### 🚀 Features
15
+
16
+ - **ui-sun/fab:** support color propetry
17
+
18
+ ### ❤️ Thank You
19
+
20
+ - HyperLife1119
21
+
1
22
  ## 2.8.10 (2026-07-01)
2
23
 
3
24
  This was a version bump only for ui-sun to align it with other projects, there were no code changes.
@@ -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/fab/index.scss CHANGED
@@ -66,6 +66,10 @@
66
66
  --background: var(--color-medium);
67
67
  }
68
68
 
69
+ > .sun-icon {
70
+ font-size: 30px;
71
+ }
72
+
69
73
  &-group {
70
74
  position: fixed;
71
75
  right: calc(15px + var(--safe-right));
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';
@@ -21,4 +24,5 @@ export * from './tabbar';
21
24
  export * from './table';
22
25
  export * from './tag';
23
26
  export * from './title';
27
+ export * from './toggle';
24
28
  export * from './virtual-scroll';
package/index.js CHANGED
@@ -1,60 +1,68 @@
1
- import { SolarSun as a } from "./index2.js";
1
+ import { SolarSun as o } from "./index2.js";
2
2
  import { default as t } from "./index3.js";
3
3
  import { default as f } from "./index4.js";
4
- import { default as l } from "./index5.js";
4
+ import { default as n } from "./index5.js";
5
5
  import { default as d } from "./index6.js";
6
- import { default as m } from "./index7.js";
6
+ import { default as p } from "./index7.js";
7
7
  import { default as x } from "./index8.js";
8
- import { default as c } from "./index9.js";
9
- import { default as T } from "./index10.js";
8
+ import { default as b } from "./index9.js";
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";
25
25
  import { default as Y } from "./index26.js";
26
26
  import { default as _ } from "./index27.js";
27
27
  import { default as ee } from "./index28.js";
28
- import { default as ae } from "./index29.js";
28
+ import { default as oe } from "./index29.js";
29
29
  import { default as te } from "./index30.js";
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 pe } from "./index34.js";
30
34
  export {
31
- a as SolarSun,
35
+ o as SolarSun,
32
36
  t as SunAccordion,
33
37
  f as SunBackButton,
34
- l as SunChip,
38
+ n as SunChip,
35
39
  d as SunCircularProgress,
36
- x as SunFab,
37
- m as SunFabGroup,
38
- W as SunIcon,
39
- c as SunItem,
40
- T as SunLazyRender,
41
- Y as SunListHeader,
42
- k as SunNavbar,
43
- _ as SunPageHeader,
44
- B as SunPopover,
45
- P as SunQrcode,
46
- H as SunSegment,
47
- v as SunSegmentBtn,
48
- ee as SunSkeleton,
49
- R as SunSliderCaptcha,
50
- y as SunSpinner,
51
- A as SunSudoku,
52
- ae as SunSudokuItem,
53
- N as SunTabbar,
54
- K as SunTag,
55
- E as SunTb,
56
- V as SunTbCell,
57
- q as SunTbRow,
58
- te as SunTitle,
59
- O as SunVirtualScroll
40
+ p as SunEmpty,
41
+ b as SunFab,
42
+ x as SunFabGroup,
43
+ ee as SunIcon,
44
+ g as SunItem,
45
+ oe as SunItemDivider,
46
+ k as SunLazyRender,
47
+ I as SunList,
48
+ te as SunListHeader,
49
+ B as SunNavbar,
50
+ fe as SunPageHeader,
51
+ P as SunPopover,
52
+ y as SunQrcode,
53
+ w as SunSegment,
54
+ H as SunSegmentBtn,
55
+ ne as SunSkeleton,
56
+ A as SunSliderCaptcha,
57
+ E as SunSpinner,
58
+ N as SunSudoku,
59
+ de as SunSudokuItem,
60
+ V as SunTabbar,
61
+ W as SunTag,
62
+ O as SunTb,
63
+ q as SunTbCell,
64
+ K as SunTbRow,
65
+ pe as SunTitle,
66
+ Y as SunToggle,
67
+ _ as SunVirtualScroll
60
68
  };
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 "./index28.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 "./index60.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 "./index54.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
  };