@solar-taro/ui-sun 1.1.5 → 1.1.7

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,22 @@
1
+ ## 1.1.6 (2025-04-22)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **ui-sun:** add head prop to sun-table-cell
6
+
7
+ ### 🩹 Fixes
8
+
9
+ - **ui-sun/table:** add default value for size prop
10
+ - **ui-sun:** fix style of table
11
+
12
+ ### ❤️ Thank You
13
+
14
+ - HyperLife1119
15
+
16
+ ## 1.1.5 (2025-04-21)
17
+
18
+ This was a version bump only for ui-sun to align it with other projects, there were no code changes.
19
+
1
20
  ## 1.1.4 (2025-04-08)
2
21
 
3
22
  ### 🩹 Fixes
package/index12.js CHANGED
@@ -1,4 +1,4 @@
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";
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
2
  import { ACTIVE_CHILD as N, PARENT as P } from "./index38.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",
@@ -6,44 +6,43 @@ const R = y, T = B, b = I, L = O, S = A, $ = { class: "sun-segment-inner" }, M =
6
6
  modelValue: {}
7
7
  },
8
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
9
+ setup(p, { emit: v }) {
10
+ const r = v, c = p, m = V(), o = E(null), t = k([]), d = a(() => t.indexOf(o.value)), f = a(() => t.length), g = a(() => ({
11
+ "--segment-length": f.value,
12
+ "--segment-active-index": d.value
13
13
  }));
14
- m(N, o), m(P, {
14
+ i(N, o), i(P, {
15
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;
16
+ const n = u();
17
+ t.push(e), t.sort((s, l) => {
18
+ const h = n.indexOf(s.vnode), _ = n.indexOf(l.vnode);
19
+ return h - _;
20
20
  });
21
21
  },
22
22
  unlink: (e) => {
23
23
  t.slice(t.indexOf(e), 1);
24
24
  },
25
25
  active: (e) => {
26
- d("change", {
26
+ r("change", {
27
27
  value: e.props.value,
28
- index: i.value
29
- }), d("update:modelValue", e.props.value), o.value = e;
28
+ index: d.value
29
+ }), r("update:modelValue", e.props.value), o.value = e;
30
30
  }
31
- }), C(() => u.modelValue, (e) => {
31
+ }), C(() => c.modelValue, (e) => {
32
32
  o.value = t.find((n) => n.props.value === e);
33
33
  });
34
- function p() {
35
- return g.subTree.children[0].children[0].children.filter((e) => typeof e.type != "symbol");
34
+ function u() {
35
+ return m.subTree.children[0].children[0].children.filter((e) => typeof e.type != "symbol");
36
36
  }
37
37
  return w(() => {
38
- const e = p();
38
+ const e = u();
39
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);
40
+ const s = e.findIndex((l) => l === n.vnode);
41
+ n.props.value === void 0 && (n.props.value = s), n.props.value === c.modelValue && (o.value = n);
43
42
  });
44
43
  }), (e, n) => (L(), S("view", b(e.$attrs, {
45
44
  class: "sun-segment",
46
- style: _.value
45
+ style: g.value
47
46
  }), [
48
47
  T("view", $, [
49
48
  R(e.$slots, "default")
package/index15.js CHANGED
@@ -1,25 +1,27 @@
1
- import { defineComponent as o, computed as r, renderSlot as i, mergeProps as n, openBlock as c, createElementBlock as a } from "vue";
2
- const p = i, d = n, m = c, k = a, b = /* @__PURE__ */ o({
1
+ import { defineComponent as o, computed as i, renderSlot as r, mergeProps as n, openBlock as c, createElementBlock as a } from "vue";
2
+ const p = r, d = n, m = c, h = a, b = /* @__PURE__ */ o({
3
3
  __name: "table-cell",
4
4
  props: {
5
5
  sticky: {},
6
+ head: { type: Boolean },
6
7
  width: {},
7
8
  maxWidth: {},
8
9
  ellipsis: { type: Boolean },
9
10
  breakWord: { type: Boolean }
10
11
  },
11
12
  setup(l) {
12
- const t = l, s = r(() => ({
13
- "sun-tb-cell-sticky-left": t.sticky === "left",
14
- "sun-tb-cell-sticky-right": t.sticky === "right",
15
- "sun-tb-cell-ellipsis": t.ellipsis,
16
- "sun-tb-cell-break-word": t.breakWord
13
+ const e = l, s = i(() => ({
14
+ "sun-tb-cell-sticky-left": e.sticky === "left",
15
+ "sun-tb-cell-sticky-right": e.sticky === "right",
16
+ "sun-tb-cell-ellipsis": e.ellipsis,
17
+ "sun-tb-cell-head": e.ellipsis,
18
+ "sun-tb-cell-break-word": e.breakWord
17
19
  }));
18
- return (e, u) => (m(), k("view", d(e.$attrs, {
20
+ return (t, u) => (m(), h("view", d(t.$attrs, {
19
21
  class: ["sun-tb-cell", s.value],
20
- style: { width: e.width, "min-width": e.width, "max-width": e.maxWidth }
22
+ style: { width: t.width, "min-width": t.width, "max-width": t.maxWidth }
21
23
  }), [
22
- p(e.$slots, "default")
24
+ p(t.$slots, "default")
23
25
  ], 16));
24
26
  }
25
27
  });
package/index17.js CHANGED
@@ -1,31 +1,31 @@
1
- import { defineComponent as a, computed as t, renderSlot as l, normalizeClass as u, createElementVNode as d, mergeProps as b, openBlock as c, createElementBlock as p } from "vue";
2
- const m = l, i = u, B = d, _ = b, z = c, y = p, k = /* @__PURE__ */ a({
1
+ import { defineComponent as s, computed as o, renderSlot as l, normalizeClass as u, createElementVNode as d, mergeProps as b, openBlock as c, createElementBlock as p } from "vue";
2
+ const m = l, i = u, B = d, _ = b, f = c, z = p, k = /* @__PURE__ */ s({
3
3
  __name: "table",
4
4
  props: {
5
5
  rounded: { type: Boolean, default: !0 },
6
6
  bordered: { type: Boolean },
7
7
  outerBordered: { type: Boolean, default: !0 },
8
8
  zebra: { type: Boolean },
9
- size: {},
9
+ size: { default: "default" },
10
10
  layout: {}
11
11
  },
12
12
  setup(r) {
13
- const e = r, n = t(() => ({
13
+ const e = r, n = o(() => ({
14
14
  "sun-tb-rounded": e.rounded,
15
15
  "sun-tb-bordered": e.bordered,
16
16
  "sun-tb-outer-bordered": e.outerBordered,
17
17
  [`sun-tb-size-${e.size}`]: e.size
18
- })), s = t(() => ({
18
+ })), a = o(() => ({
19
19
  "sun-tb-zebra": e.zebra,
20
20
  [`sun-tb-layout-${e.layout}`]: e.layout
21
21
  }));
22
- return (o, f) => (z(), y("view", _(o.$attrs, {
22
+ return (t, y) => (f(), z("view", _(t.$attrs, {
23
23
  class: ["sun-tb", n.value]
24
24
  }), [
25
25
  B("view", {
26
- class: i(["sun-tb-inner", s.value])
26
+ class: i(["sun-tb-inner", a.value])
27
27
  }, [
28
- m(o.$slots, "default")
28
+ m(t.$slots, "default")
29
29
  ], 2)
30
30
  ], 16));
31
31
  }
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 "./index26.js";
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 "./index26.js";
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/index21.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index9.js";
1
+ import f from "./index7.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index22.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index3.js";
1
+ import f from "./index10.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index23.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index7.js";
1
+ import f from "./index4.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index24.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index4.js";
1
+ import f from "./index6.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index25.js CHANGED
@@ -1,4 +1,9 @@
1
- import f from "./index6.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/index26.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 "./index9.js";
7
2
  export {
8
- s as default
3
+ f as default
9
4
  };
package/index27.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index5.js";
1
+ import f from "./index11.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index28.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/index29.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index10.js";
1
+ import f from "./index14.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index30.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index14.js";
1
+ import f from "./index8.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index31.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index11.js";
1
+ import f from "./index13.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index32.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index12.js";
1
+ import f from "./index15.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index33.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index18.js";
1
+ import f from "./index16.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index34.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index8.js";
1
+ import f from "./index17.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index35.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index15.js";
1
+ import f from "./index18.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index36.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index16.js";
1
+ import f from "./index5.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/index37.js CHANGED
@@ -1,4 +1,4 @@
1
- import f from "./index17.js";
1
+ import f from "./index3.js";
2
2
  export {
3
3
  f as default
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solar-taro/ui-sun",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "type": "module",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",
package/table/_table.scss CHANGED
@@ -38,7 +38,8 @@
38
38
  }
39
39
 
40
40
  // zebra style
41
- .sun-tb-zebra > .sun-tb-row:nth-child(odd) > .sun-tb-cell {
41
+ .sun-tb-zebra > .sun-tb-row:nth-child(odd) > .sun-tb-cell,
42
+ .sun-tb-head {
42
43
  background: #f8fafc;
43
44
  }
44
45
 
@@ -3,6 +3,7 @@ declare function __VLS_template(): {
3
3
  };
4
4
  declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
5
5
  sticky?: "left" | "right";
6
+ head?: boolean;
6
7
  width?: string;
7
8
  maxWidth?: string;
8
9
  /** 溢出省略 */
@@ -11,6 +12,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
11
12
  breakWord?: boolean;
12
13
  }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
13
14
  sticky?: "left" | "right";
15
+ head?: boolean;
14
16
  width?: string;
15
17
  maxWidth?: string;
16
18
  /** 溢出省略 */
@@ -10,6 +10,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
10
10
  size?: "small" | "medium" | "default";
11
11
  layout?: "auto" | "fixed";
12
12
  }>, {
13
+ size: string;
13
14
  rounded: boolean;
14
15
  outerBordered: boolean;
15
16
  }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
@@ -21,9 +22,11 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
21
22
  size?: "small" | "medium" | "default";
22
23
  layout?: "auto" | "fixed";
23
24
  }>, {
25
+ size: string;
24
26
  rounded: boolean;
25
27
  outerBordered: boolean;
26
28
  }>>> & Readonly<{}>, {
29
+ size: "small" | "medium" | "default";
27
30
  rounded: boolean;
28
31
  outerBordered: boolean;
29
32
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;