@solar-taro/ui-sun 1.1.0 → 1.1.2

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/index9.js CHANGED
@@ -1,56 +1,30 @@
1
- import { defineComponent as x, getCurrentInstance as V, shallowRef as E, shallowReactive as k, computed as c, provide as m, 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 "./index33.js";
3
- const R = y, T = B, b = I, L = O, S = A, $ = { class: "sun-segment-inner" }, M = /* @__PURE__ */ x({
4
- __name: "segment",
5
- props: {
6
- modelValue: {}
7
- },
8
- emits: ["update:modelValue", "change"],
9
- setup(v, { emit: f }) {
10
- const d = f, u = v, g = V(), o = E(null), t = k([]), i = c(() => t.indexOf(o.value)), h = c(() => t.length), _ = c(() => ({
11
- "--segment-length": h.value,
12
- "--segment-active-index": i.value
13
- }));
14
- m(N, o), m(P, {
15
- link: (e) => {
16
- const n = p();
17
- t.push(e), t.sort((a, s) => {
18
- const l = n.indexOf(a.vnode), r = n.indexOf(s.vnode);
19
- return l - r;
20
- });
21
- },
22
- unlink: (e) => {
23
- t.slice(t.indexOf(e), 1);
24
- },
25
- active: (e) => {
26
- d("change", {
27
- value: e.props.value,
28
- index: i.value
29
- }), d("update:modelValue", e.props.value), o.value = e;
30
- }
31
- }), C(() => u.modelValue, (e) => {
32
- o.value = t.find((n) => n.props.value === e);
33
- });
34
- function p() {
35
- return g.subTree.children[0].children[0].children.filter((e) => typeof e.type != "symbol");
36
- }
37
- return w(() => {
38
- const e = p();
39
- t.forEach((n) => {
40
- var s, l;
41
- const a = e.findIndex((r) => r === n.vnode);
42
- (l = (s = n.props).value) != null || (s.value = a), n.props.value === u.modelValue && (o.value = n);
43
- });
44
- }), (e, n) => (L(), S("view", b(e.$attrs, {
45
- class: "sun-segment",
46
- style: _.value
47
- }), [
48
- T("view", $, [
49
- R(e.$slots, "default")
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({
5
+ __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
+ ])
50
24
  ])
51
- ], 16));
25
+ ]));
52
26
  }
53
27
  });
54
28
  export {
55
- M as default
29
+ k as default
56
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solar-taro/ui-sun",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",
package/plugin.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ import { Plugin } from 'vue';
2
+
3
+ /**
4
+ * solar sun ui vue plugin
5
+ */
6
+ export declare const SolarSun: Plugin;
package/typing.d.ts ADDED
@@ -0,0 +1 @@
1
+ export type Color = 'primary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | 'secondary';
@@ -8,11 +8,14 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<im
8
8
  itemKey?: string;
9
9
  id?: string;
10
10
  bottomSpace?: number;
11
+ loading?: boolean;
12
+ loadingText?: string;
11
13
  }>, {
12
14
  refresherBg: string;
13
15
  direction: string;
14
16
  id: () => string;
15
17
  bottomSpace: number;
18
+ loadingText: string;
16
19
  }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
17
20
  refresh: () => void;
18
21
  lower: () => void;
@@ -26,11 +29,14 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<im
26
29
  itemKey?: string;
27
30
  id?: string;
28
31
  bottomSpace?: number;
32
+ loading?: boolean;
33
+ loadingText?: string;
29
34
  }>, {
30
35
  refresherBg: string;
31
36
  direction: string;
32
37
  id: () => string;
33
38
  bottomSpace: number;
39
+ loadingText: string;
34
40
  }>>> & Readonly<{
35
41
  onRefresh?: (() => any) | undefined;
36
42
  onLower?: (() => any) | undefined;
@@ -39,11 +45,13 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<im
39
45
  direction: "vertical" | "horizontal";
40
46
  id: string;
41
47
  bottomSpace: number;
48
+ loadingText: string;
42
49
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>, {
43
50
  default?(_: {
44
51
  item: Record<string, any>;
45
52
  index: number;
46
53
  }): any;
54
+ empty?(_: {}): any;
47
55
  }>;
48
56
  export default _default;
49
57
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;