@rhino-design/vue 0.2.6 → 0.2.8

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 (36) hide show
  1. package/README.md +95 -18
  2. package/README.zh-CN.md +115 -0
  3. package/dist/arco.less +95 -76
  4. package/dist/components/XButton.vue.js +2 -2
  5. package/dist/components/XConfigProvider.vue.js +1 -1
  6. package/dist/components/XMenuOverflowWrap.vue.js +66 -59
  7. package/dist/components/XScrollbar.vue.js +1 -1
  8. package/dist/components/XSubMenuPop.vue.js +1 -1
  9. package/dist/components/XTable.vue.d.ts +1 -0
  10. package/dist/components/XTable.vue.js +3 -3
  11. package/dist/components/XTable.vue2.js +774 -614
  12. package/dist/components/XToast.vue.d.ts +25 -0
  13. package/dist/components/XToast.vue.js +7 -0
  14. package/dist/components/XToast.vue2.js +27 -0
  15. package/dist/components/XTour.vue.d.ts +2 -0
  16. package/dist/components/XTour.vue.js +69 -61
  17. package/dist/components/XTree.vue.d.ts +2 -0
  18. package/dist/components/XTree.vue.js +1 -1
  19. package/dist/components/XTree.vue2.js +124 -121
  20. package/dist/components/XTreeNode.vue.d.ts +1 -0
  21. package/dist/components/XTreeNode.vue.js +2 -2
  22. package/dist/components/XTreeNode.vue2.js +21 -20
  23. package/dist/components/XTreeSelect.vue.js +4 -4
  24. package/dist/components/XTreeSelect.vue2.js +314 -291
  25. package/dist/components/XWatermark.vue.js +4 -4
  26. package/dist/components/index.d.ts +1 -0
  27. package/dist/components/index.js +55 -53
  28. package/dist/index.cjs +9 -9
  29. package/dist/index.css +95 -76
  30. package/dist/index.js +62 -60
  31. package/dist/index.less +95 -76
  32. package/dist/index.scss +14853 -0
  33. package/dist/style.css +95 -76
  34. package/dist/style.less +95 -76
  35. package/dist/style.scss +14853 -0
  36. package/package.json +14 -6
@@ -1,7 +1,7 @@
1
1
  import o from "./XButton.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c41d7083"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-9770ba6f"]]);
5
5
  export {
6
- _ as default
6
+ m as default
7
7
  };
@@ -5,7 +5,7 @@ import { provideXI18n as C } from "../composables/i18n.js";
5
5
  const P = /* @__PURE__ */ m({
6
6
  __name: "XConfigProvider",
7
7
  props: {
8
- prefixCls: { default: "arco" },
8
+ prefixCls: { default: "rhino" },
9
9
  locale: {},
10
10
  size: {},
11
11
  global: { type: Boolean, default: !1 },
@@ -1,100 +1,107 @@
1
- import { defineComponent as A, ref as g, onMounted as L, onUpdated as $, onUnmounted as E, h, cloneVNode as N, Comment as V, Fragment as k } from "vue";
2
- import R from "./XSubMenu.vue.js";
1
+ import { defineComponent as $, ref as x, onMounted as A, onUpdated as E, onUnmounted as B, h, cloneVNode as g, Comment as V, Fragment as k } from "vue";
2
+ import N from "./XSubMenu.vue.js";
3
3
  import F from "../composables/menu-hooks/use-menu-context.js";
4
4
  const H = 10;
5
- function S(r) {
6
- return r ? Number(r.getBoundingClientRect().width.toFixed(2)) : 0;
5
+ function O(n) {
6
+ return n ? Number(n.getBoundingClientRect().width.toFixed(2)) : 0;
7
7
  }
8
- function W(r) {
9
- const t = Number(r.replace("px", ""));
10
- return Number.isNaN(t) ? 0 : t;
8
+ function S(n) {
9
+ const e = Number(n.replace("px", ""));
10
+ return Number.isNaN(e) ? 0 : e;
11
11
  }
12
- function P(r) {
13
- const t = [], s = (u) => {
14
- u.forEach((e) => {
15
- if (!e) return;
16
- if (Array.isArray(e)) {
17
- s(e);
12
+ function P(n) {
13
+ const e = getComputedStyle(n);
14
+ return O(n) + S(e.marginLeft) + S(e.marginRight);
15
+ }
16
+ function W(n, e) {
17
+ return n.classList.contains(e) ? n : n.querySelector(`.${e}`);
18
+ }
19
+ function T(n) {
20
+ const e = [], i = (u) => {
21
+ u.forEach((t) => {
22
+ if (!t) return;
23
+ if (Array.isArray(t)) {
24
+ i(t);
18
25
  return;
19
26
  }
20
- if (typeof e != "object") return;
21
- const n = e;
22
- if (n.type !== V) {
23
- if (n.type === k && Array.isArray(n.children)) {
24
- s(n.children);
27
+ if (typeof t != "object") return;
28
+ const r = t;
29
+ if (r.type !== V) {
30
+ if (r.type === k && Array.isArray(r.children)) {
31
+ i(r.children);
25
32
  return;
26
33
  }
27
- t.push(n);
34
+ e.push(r);
28
35
  }
29
36
  });
30
37
  };
31
- return s(r), t;
38
+ return i(n), e;
32
39
  }
33
- const j = A({
40
+ const q = $({
34
41
  name: "XMenuOverflowWrap",
35
- setup(r, { slots: t }) {
36
- const s = F(), u = g(null), e = g(null);
37
- let n = null;
38
- const a = `${s.prefixCls || "x-menu"}-overflow`, _ = `${a}-wrap`, C = `${a}-sub-menu`, O = `${a}-hidden-menu-item`, x = `${a}-sub-menu-mirror`, w = () => {
42
+ setup(n, { slots: e }) {
43
+ const i = F(), u = x(null), t = x(null);
44
+ let r = null;
45
+ const f = `${i.prefixCls || "x-menu"}-overflow`, R = `${f}-wrap`, y = `${f}-sub-menu`, _ = `${f}-hidden-menu-item`, C = `${f}-sub-menu-mirror`, w = () => {
39
46
  const l = u.value;
40
47
  if (!l) return;
41
- const f = S(l), m = Array.from(l.children);
42
- let d = 0, i = 0, p = 0;
48
+ const a = O(l), m = Array.from(l.children);
49
+ let d = 0, s = 0, v = 0;
43
50
  for (let o = 0; o < m.length; o += 1) {
44
- const c = m[o], v = c.className.split(" "), b = v.includes(C), I = v.includes(x);
45
- if (b)
51
+ const c = m[o], b = W(c, y), p = W(c, C), I = !!b, L = !!p;
52
+ if (I)
46
53
  continue;
47
- const y = getComputedStyle(c), M = S(c) + W(y.marginLeft) + W(y.marginRight);
48
- if (I) {
49
- p = M;
54
+ const M = P(p || c);
55
+ if (L) {
56
+ v = M;
50
57
  continue;
51
58
  }
52
- if (i += M, i + p + H > f) {
53
- e.value = d - 1;
59
+ if (s += M, s + v + H > a) {
60
+ t.value = d - 1;
54
61
  return;
55
62
  }
56
63
  d += 1;
57
64
  }
58
- e.value = null;
65
+ t.value = null;
59
66
  };
60
- return L(() => {
61
- w(), !(typeof ResizeObserver > "u" || !u.value) && (n = new ResizeObserver(() => {
67
+ return A(() => {
68
+ w(), !(typeof ResizeObserver > "u" || !u.value) && (r = new ResizeObserver(() => {
62
69
  w();
63
- }), n.observe(u.value));
64
- }), $(() => {
65
- w();
70
+ }), r.observe(u.value));
66
71
  }), E(() => {
67
- n == null || n.disconnect(), n = null;
72
+ w();
73
+ }), B(() => {
74
+ r == null || r.disconnect(), r = null;
68
75
  }), () => {
69
- var i;
70
- const l = P(((i = t.default) == null ? void 0 : i.call(t)) || []);
71
- let f = null;
76
+ var s;
77
+ const l = T(((s = e.default) == null ? void 0 : s.call(e)) || []);
78
+ let a = null;
72
79
  const m = h(
73
- R,
80
+ N,
74
81
  {
75
82
  key: "__x-menu-overflow-sub-menu-mirror",
76
- class: x
83
+ class: C
77
84
  },
78
85
  {
79
86
  title: () => "...",
80
87
  default: () => null
81
88
  }
82
- ), d = l.map((p, o) => {
83
- const c = N(
84
- p,
85
- e.value !== null && o > e.value ? { class: O } : { class: "" }
89
+ ), d = l.map((v, o) => {
90
+ const c = g(
91
+ v,
92
+ t.value !== null && o > t.value ? { class: _ } : { class: "" }
86
93
  );
87
- if (e.value !== null && o === e.value + 1) {
88
- const v = l.slice(o).map((b) => N(b));
89
- f = h(
90
- R,
94
+ if (t.value !== null && o === t.value + 1) {
95
+ const b = l.slice(o).map((p) => g(p));
96
+ a = h(
97
+ N,
91
98
  {
92
99
  key: "__x-menu-overflow-sub-menu",
93
- class: C
100
+ class: y
94
101
  },
95
102
  {
96
103
  title: () => "...",
97
- default: () => v
104
+ default: () => b
98
105
  }
99
106
  );
100
107
  }
@@ -104,13 +111,13 @@ const j = A({
104
111
  "div",
105
112
  {
106
113
  ref: u,
107
- class: _
114
+ class: R
108
115
  },
109
- [m, ...d, f]
116
+ [m, ...d, a]
110
117
  );
111
118
  };
112
119
  }
113
120
  });
114
121
  export {
115
- j as default
122
+ q as default
116
123
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as J, useAttrs as Q, ref as c, computed as m, onMounted as Y, nextTick as k, onBeforeUnmount as ee, watch as le, openBlock as R, createElementBlock as te, normalizeStyle as oe, normalizeClass as ae, createElementVNode as re, mergeProps as ne, unref as se, renderSlot as ce, createBlock as E, createCommentVNode as L } from "vue";
2
2
  import O from "./XScrollbarThumb.vue.js";
3
- const ue = 20, p = 15, de = /* @__PURE__ */ J({
3
+ const ue = 20, p = 2, de = /* @__PURE__ */ J({
4
4
  name: "XScrollbar",
5
5
  inheritAttrs: !1,
6
6
  __name: "XScrollbar",
@@ -7,7 +7,7 @@ function y(e, l, V, B, P, w) {
7
7
  return i(), t(f, a({
8
8
  trigger: "hover",
9
9
  class: e.triggerClassNames,
10
- position: e.needPopOnBottom ? "bottom-start" : "right-start",
10
+ position: e.needPopOnBottom ? "bottom" : "right-start",
11
11
  offset: 0,
12
12
  "auto-fit-popup-min-width": !0,
13
13
  "unmount-on-close": !1,
@@ -106,6 +106,7 @@ declare const _default: <T extends Record<string, unknown>>(__VLS_props: NonNull
106
106
  columns: XTableColumn<T>[];
107
107
  data: T[];
108
108
  loading?: boolean;
109
+ loadingAnimation?: boolean;
109
110
  pagination?: boolean | XTablePagination;
110
111
  rowSelection?: XTableRowSelection<T>;
111
112
  expandable?: XTableExpandable<T>;
@@ -1,7 +1,7 @@
1
1
  import o from "./XTable.vue2.js";
2
2
  /* empty css */
3
- import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-dfbe0b69"]]);
3
+ import a from "../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-f8afd5ca"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };