@xto/core 1.0.3 → 1.2.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.
@@ -1,4 +1,4 @@
1
- const g = {
1
+ const y = {
2
2
  mode: "light",
3
3
  primary: "#409eff",
4
4
  success: "#67c23a",
@@ -6,60 +6,180 @@ const g = {
6
6
  danger: "#f56c6c",
7
7
  info: "#909399",
8
8
  size: "default"
9
- }, u = {
9
+ }, f = {
10
10
  large: 40,
11
11
  default: 32,
12
12
  small: 24
13
- };
14
- function h(r, e = 10) {
15
- const o = [], n = r.startsWith("#"), f = r.startsWith("rgb");
16
- let s, a, c;
17
- if (n) {
18
- const t = r.slice(1);
19
- s = parseInt(t.slice(0, 2), 16), a = parseInt(t.slice(2, 4), 16), c = parseInt(t.slice(4, 6), 16);
20
- } else if (f) {
21
- const t = r.match(/\d+/g);
22
- if (t)
23
- s = Number(t[0]), a = Number(t[1]), c = Number(t[2]);
13
+ }, k = (e) => f[e];
14
+ function z(e, r = 10) {
15
+ const t = [], l = e.startsWith("#"), n = e.startsWith("rgb");
16
+ let c, s, i;
17
+ if (l) {
18
+ const a = e.slice(1);
19
+ c = parseInt(a.slice(0, 2), 16), s = parseInt(a.slice(2, 4), 16), i = parseInt(a.slice(4, 6), 16);
20
+ } else if (n) {
21
+ const a = e.match(/\d+/g);
22
+ if (a)
23
+ c = Number(a[0]), s = Number(a[1]), i = Number(a[2]);
24
24
  else
25
- return o;
25
+ return t;
26
26
  } else
27
- return o;
28
- const i = 100 / (e + 1);
29
- for (let t = 1; t <= e; t++) {
30
- const l = 1 - i * t / 100, $ = Math.round(s + (255 - s) * l), d = Math.round(a + (255 - a) * l), p = Math.round(c + (255 - c) * l);
31
- o.push(`rgb(${$}, ${d}, ${p})`);
27
+ return t;
28
+ const p = 100 / (r + 1);
29
+ for (let a = 1; a <= r; a++) {
30
+ const d = 1 - p * a / 100, g = Math.round(c + (255 - c) * d), x = Math.round(s + (255 - s) * d), u = Math.round(i + (255 - i) * d);
31
+ t.push(`rgb(${g}, ${x}, ${u})`);
32
32
  }
33
- return o;
33
+ return t;
34
34
  }
35
- const b = "--xto";
36
- function m(r) {
37
- const e = b;
35
+ const $ = (e) => {
36
+ const r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
37
+ return r ? {
38
+ r: parseInt(r[1], 16),
39
+ g: parseInt(r[2], 16),
40
+ b: parseInt(r[3], 16)
41
+ } : null;
42
+ }, h = (e, r, t) => "#" + [e, r, t].map((l) => l.toString(16).padStart(2, "0")).join(""), C = (e, r, t = 0.5) => {
43
+ const l = $(e), n = $(r);
44
+ if (!l || !n) return e;
45
+ const c = Math.round(l.r * (1 - t) + n.r * t), s = Math.round(l.g * (1 - t) + n.g * t), i = Math.round(l.b * (1 - t) + n.b * t);
46
+ return h(c, s, i);
47
+ }, o = "--xto";
48
+ function m(e) {
49
+ const r = o;
38
50
  return {
39
- [`${e}-color-primary`]: r.primary,
40
- [`${e}-color-success`]: r.success,
41
- [`${e}-color-warning`]: r.warning,
42
- [`${e}-color-danger`]: r.danger,
43
- [`${e}-color-info`]: r.info,
44
- [`${e}-color-text`]: "#303133",
45
- [`${e}-color-text-placeholder`]: "#a8abb2",
46
- [`${e}-color-text-disabled`]: "#c0c4cc",
47
- [`${e}-border-color`]: "#dcdfe6",
48
- [`${e}-border-color-light`]: "#e4e7ed",
49
- [`${e}-border-color-lighter`]: "#ebeef5",
50
- [`${e}-fill-color`]: "#f5f7fa",
51
- [`${e}-fill-color-light`]: "#fafafa",
52
- [`${e}-bg-color`]: "#ffffff",
53
- [`${e}-bg-color-page`]: "#f2f3f5",
54
- [`${e}-bg-color-overlay`]: "#ffffff",
55
- [`${e}-font-size`]: r.size === "large" ? "15px" : r.size === "small" ? "13px" : "14px",
56
- [`${e}-component-size`]: `${u[r.size]}px`
51
+ // 颜色
52
+ [`${r}-color-primary`]: e.primary,
53
+ [`${r}-color-success`]: e.success,
54
+ [`${r}-color-warning`]: e.warning,
55
+ [`${r}-color-danger`]: e.danger,
56
+ [`${r}-color-info`]: e.info,
57
+ // 文本颜色
58
+ [`${r}-color-text-primary`]: "#303133",
59
+ [`${r}-color-text-regular`]: "#606266",
60
+ [`${r}-color-text-secondary`]: "#909399",
61
+ [`${r}-color-text-placeholder`]: "#a8abb2",
62
+ [`${r}-color-text-disabled`]: "#c0c4cc",
63
+ // 边框颜色
64
+ [`${r}-border-color`]: "#dcdfe6",
65
+ [`${r}-border-color-light`]: "#e4e7ed",
66
+ [`${r}-border-color-lighter`]: "#ebeef5",
67
+ [`${r}-border-color-extra-light`]: "#f2f6fc",
68
+ [`${r}-border-color-dark`]: "#d4d4d4",
69
+ [`${r}-border-color-darker`]: "#c0c4cc",
70
+ // 填充颜色
71
+ [`${r}-fill-color`]: "#f5f7fa",
72
+ [`${r}-fill-color-light`]: "#fafafa",
73
+ [`${r}-fill-color-lighter`]: "#fafafa",
74
+ [`${r}-fill-color-extra-light`]: "#fafafa",
75
+ [`${r}-fill-color-dark`]: "#ebedf0",
76
+ [`${r}-fill-color-darker`]: "#e6e8eb",
77
+ [`${r}-fill-color-blank`]: "#ffffff",
78
+ // 背景颜色
79
+ [`${r}-bg-color`]: "#ffffff",
80
+ [`${r}-bg-color-page`]: "#f2f3f5",
81
+ [`${r}-bg-color-overlay`]: "#ffffff",
82
+ // 字体
83
+ [`${r}-font-family`]: "'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif",
84
+ [`${r}-font-size-extra-small`]: "12px",
85
+ [`${r}-font-size-small`]: "13px",
86
+ [`${r}-font-size-base`]: "14px",
87
+ [`${r}-font-size-medium`]: "16px",
88
+ [`${r}-font-size-large`]: "18px",
89
+ [`${r}-font-size-extra-large`]: "20px",
90
+ // 行高
91
+ [`${r}-line-height-extra-small`]: "1.4",
92
+ [`${r}-line-height-small`]: "1.5",
93
+ [`${r}-line-height-base`]: "1.6",
94
+ [`${r}-line-height-medium`]: "1.7",
95
+ [`${r}-line-height-large`]: "1.8",
96
+ [`${r}-line-height-extra-large`]: "1.9",
97
+ // 圆角
98
+ [`${r}-border-radius-base`]: "4px",
99
+ [`${r}-border-radius-small`]: "2px",
100
+ [`${r}-border-radius-large`]: "8px",
101
+ [`${r}-border-radius-round`]: "20px",
102
+ [`${r}-border-radius-circle`]: "100%",
103
+ // 阴影
104
+ [`${r}-box-shadow-base`]: "0 2px 4px rgba(0, 0, 0, .12), 0 0 6px rgba(0, 0, 0, .04)",
105
+ [`${r}-box-shadow-light`]: "0 2px 12px 0 rgba(0, 0, 0, 0.1)",
106
+ [`${r}-box-shadow-lighter`]: "0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24)",
107
+ [`${r}-box-shadow-dark`]: "0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05)",
108
+ // 组件尺寸
109
+ [`${r}-component-size`]: `${f[e.size]}px`,
110
+ [`${r}-component-size-large`]: `${f.large}px`,
111
+ [`${r}-component-size-small`]: `${f.small}px`,
112
+ // 动画
113
+ [`${r}-transition-duration`]: "0.3s",
114
+ [`${r}-transition-duration-fast`]: "0.2s",
115
+ [`${r}-transition-function`]: "cubic-bezier(0.645, 0.045, 0.355, 1)"
57
116
  };
58
117
  }
118
+ function D(e) {
119
+ const r = m(e), t = document.documentElement;
120
+ Object.entries(r).forEach(([l, n]) => {
121
+ t.style.setProperty(l, n);
122
+ });
123
+ }
124
+ function E() {
125
+ const r = document.documentElement.style;
126
+ for (let t = r.length - 1; t >= 0; t--) {
127
+ const l = r[t];
128
+ l.startsWith(o) && r.removeProperty(l);
129
+ }
130
+ }
131
+ const b = {
132
+ // 文本颜色
133
+ [`${o}-color-text-primary`]: "#E5EAF3",
134
+ [`${o}-color-text-regular`]: "#CFD3DC",
135
+ [`${o}-color-text-secondary`]: "#A3A6AD",
136
+ [`${o}-color-text-placeholder`]: "#8D9099",
137
+ [`${o}-color-text-disabled`]: "#6C6E72",
138
+ // 边框颜色
139
+ [`${o}-border-color`]: "#4C4D4F",
140
+ [`${o}-border-color-light`]: "#414243",
141
+ [`${o}-border-color-lighter`]: "#363637",
142
+ [`${o}-border-color-extra-light`]: "#2B2B2C",
143
+ [`${o}-border-color-dark`]: "#58585B",
144
+ [`${o}-border-color-darker`]: "#6B6B6E",
145
+ // 填充颜色
146
+ [`${o}-fill-color`]: "#303032",
147
+ [`${o}-fill-color-light`]: "#262727",
148
+ [`${o}-fill-color-lighter`]: "#1D1D1D",
149
+ [`${o}-fill-color-extra-light`]: "#191919",
150
+ [`${o}-fill-color-dark`]: "#363637",
151
+ [`${o}-fill-color-darker`]: "#3E3E3F",
152
+ [`${o}-fill-color-blank`]: "#141414",
153
+ // 背景颜色
154
+ [`${o}-bg-color`]: "#141414",
155
+ [`${o}-bg-color-page`]: "#0a0a0a",
156
+ [`${o}-bg-color-overlay`]: "#1D1D1D"
157
+ };
158
+ function S() {
159
+ const e = document.documentElement;
160
+ Object.entries(b).forEach(([r, t]) => {
161
+ e.style.setProperty(r, t);
162
+ });
163
+ }
164
+ function v() {
165
+ const e = document.documentElement;
166
+ Object.keys(b).forEach((r) => {
167
+ e.style.removeProperty(r);
168
+ });
169
+ }
59
170
  export {
60
- b as cssVarPrefix,
61
- g as defaultThemeConfig,
171
+ D as applyCSSVars,
172
+ S as applyDarkTheme,
173
+ o as cssVarPrefix,
174
+ b as darkCSSVars,
175
+ y as defaultThemeConfig,
62
176
  m as generateCSSVars,
63
- h as generateColorPalette,
64
- u as sizeMap
177
+ z as generateColorPalette,
178
+ k as getComponentSize,
179
+ $ as hexToRgb,
180
+ C as mixColor,
181
+ E as removeCSSVars,
182
+ v as removeDarkTheme,
183
+ h as rgbToHex,
184
+ f as sizeMap
65
185
  };
@@ -1,150 +1,226 @@
1
- import { computed as _, getCurrentInstance as A } from "vue";
2
- const p = "x", I = "is-", $ = (e) => p + "-" + e, l = $, j = (e, t) => `${$(e)}__${t}`, R = j, w = (e, t, n) => `${$(e)}${t ? `__${t}` : ""}--${n}`, S = w, U = (e, t) => t ? `${I}${e}` : "", O = (e, t) => t === !1 ? "" : `${I}${e}`;
3
- function q(e) {
4
- const t = e || p, n = (i = "") => t ? `${t}-${i}` : i;
1
+ import { computed as w, getCurrentInstance as j } from "vue";
2
+ const l = "x", I = "is-", g = (e) => l + "-" + e, y = g, O = (e, t) => `${g(e)}__${t}`, W = O, _ = (e, t, n) => `${g(e)}${t ? `__${t}` : ""}--${n}`, G = _, H = (e, t) => t ? `${I}${e}` : "", C = (e, t) => t === !1 ? "" : `${I}${e}`;
3
+ function J(e) {
4
+ const t = e || l, n = (i = "") => t ? `${t}-${i}` : i;
5
5
  return {
6
6
  b: n,
7
- e: (i) => (x) => `${n(x)}__${i}`,
8
- m: (i) => (x) => `${n(x)}--${i}`,
9
- em: (i, x) => (h) => `${n(h)}__${i}--${x}`,
10
- is: O
7
+ e: (i) => (a) => `${n(a)}__${i}`,
8
+ m: (i) => (a) => `${n(a)}--${i}`,
9
+ em: (i, a) => ($) => `${n($)}__${i}--${a}`,
10
+ is: C
11
11
  };
12
12
  }
13
- function G(e) {
14
- const t = p, n = `${t}-${e}`, s = (o = "") => o ? `${n}-${o}` : n, r = (o) => o ? `${n}__${o}` : "";
13
+ function K(e) {
14
+ const t = l, n = `${t}-${e}`, s = (r = "") => r ? `${n}-${r}` : n, o = (r) => r ? `${n}__${r}` : "";
15
15
  return {
16
16
  namespace: t,
17
17
  prefix: n,
18
18
  b: s,
19
- e: r,
20
- m: (o) => o ? `${n}--${o}` : "",
21
- be: (o, c) => s(o) + (c ? `__${c}` : ""),
22
- bm: (o, c) => s(o) + (c ? `--${c}` : ""),
23
- em: (o, c) => r(o) + (c ? `--${c}` : ""),
24
- is: (o, c) => c === !1 ? "" : `${I}${o}`
19
+ e: o,
20
+ m: (r) => r ? `${n}--${r}` : "",
21
+ be: (r, u) => s(r) + (u ? `__${u}` : ""),
22
+ bm: (r, u) => s(r) + (u ? `--${u}` : ""),
23
+ em: (r, u) => o(r) + (u ? `--${u}` : ""),
24
+ is: (r, u) => u === !1 ? "" : `${I}${r}`
25
25
  };
26
26
  }
27
- function H() {
27
+ function Q() {
28
28
  var n;
29
- const e = A(), t = ((n = e == null ? void 0 : e.type) == null ? void 0 : n.name) || "";
29
+ const e = j(), t = ((n = e == null ? void 0 : e.type) == null ? void 0 : n.name) || "";
30
30
  return {
31
- prefix: p,
31
+ prefix: l,
32
32
  name: t
33
33
  };
34
34
  }
35
- function J(e, t) {
35
+ function X(e, t) {
36
36
  return {
37
- classList: _(() => {
37
+ classList: w(() => {
38
38
  const s = [];
39
- return t && s.push(l(t)), e.size && s.push(l(t) + `--${e.size}`), e.type && s.push(l(t) + `--${e.type}`), e.disabled && s.push("is-disabled"), e.loading && s.push("is-loading"), s;
39
+ return t && s.push(y(t)), e.size && s.push(y(t) + `--${e.size}`), e.type && s.push(y(t) + `--${e.type}`), e.disabled && s.push("is-disabled"), e.loading && s.push("is-loading"), s;
40
40
  })
41
41
  };
42
42
  }
43
- let d = 2e3;
44
- const y = [], f = () => ({
43
+ function L(...e) {
44
+ const t = [];
45
+ return e.forEach((n) => {
46
+ if (n)
47
+ if (typeof n == "string")
48
+ t.push(n);
49
+ else if (Array.isArray(n)) {
50
+ const s = L(...n);
51
+ s && t.push(s);
52
+ } else typeof n == "object" && Object.entries(n).forEach(([s, o]) => {
53
+ o && t.push(s);
54
+ });
55
+ }), t.join(" ");
56
+ }
57
+ let x = 2e3;
58
+ const h = [], d = () => ({
45
59
  get current() {
46
- return d;
60
+ return x;
47
61
  },
48
- next: () => (d = d + 1, y.push(d), d),
62
+ next: () => (x = x + 1, h.push(x), x),
49
63
  set: (t) => {
50
- d = t;
64
+ x = t;
51
65
  }
52
- }), T = 2e3, C = 1990, L = 1999, P = 2e3, M = 2e3, V = 2e3, K = () => f().next() + T, N = () => f().next() + C, Q = () => f().next() + L, W = () => f().next() + P, X = () => f().next() + M, Y = () => f().next() + V, k = {
66
+ }), T = 2e3, M = 1990, S = 1999, D = 2e3, E = 2e3, P = 2e3, N = 2e3, R = 2e3, Y = () => d().next() + T, k = () => d().next() + M, v = () => d().next() + S, ee = () => d().next() + D, te = () => d().next() + E, ne = () => d().next() + P, se = () => d().next() + N, oe = () => d().next() + R, re = {
67
+ /** 当前 z-index */
53
68
  zIndex: 2e3,
69
+ /**
70
+ * 获取下一个 z-index
71
+ * @returns z-index 值
72
+ */
54
73
  next() {
55
74
  return this.zIndex = this.zIndex + 1, this.zIndex;
75
+ },
76
+ /**
77
+ * 重置 z-index
78
+ */
79
+ reset() {
80
+ this.zIndex = 2e3;
56
81
  }
57
- }, v = () => {
58
- d = 2e3, y.length = 0;
59
- }, ee = () => [...y], g = (e) => e === void 0, Z = (e) => e === null, m = (e) => g(e) || Z(e), te = (e) => e === !0, ne = (e) => e === !1, se = (e) => Array.isArray(e) || typeof e == "string" ? e.length === 0 : typeof e == "object" && e !== null ? Object.keys(e).length === 0 : m(e), oe = (e) => !m(e), re = (e) => (t) => e(t), ce = (e) => () => e, ie = (e, t) => m(e) ? t : e, ue = (e) => Array.isArray(e) ? e : [e], D = (e) => Z(e) ? "null" : g(e) ? "undefined" : Object.prototype.toString.call(e).slice(8, -1).toLowerCase(), de = (e, t) => D(e) === t, a = (e) => {
82
+ }, ce = () => {
83
+ x = 2e3, h.length = 0;
84
+ }, ie = () => [...h], ue = () => x, z = (e) => e === void 0, Z = (e) => e === null, m = (e) => z(e) || Z(e), xe = (e) => e === !0, de = (e) => e === !1, ae = (e) => Array.isArray(e) || typeof e == "string" ? e.length === 0 : typeof e == "object" && e !== null ? Object.keys(e).length === 0 : m(e), fe = (e) => !m(e), pe = (e) => typeof e == "number" && !isNaN(e), le = (e) => typeof e == "string", ye = (e) => typeof e == "boolean", V = (e) => typeof e == "function", Ie = Array.isArray, B = (e) => e !== null && typeof e == "object", f = (e) => {
60
85
  if (e === null || typeof e != "object") return !1;
61
86
  const t = Object.getPrototypeOf(e);
62
87
  return t === Object.prototype || t === null;
63
- }, z = (e, ...t) => {
88
+ }, ge = (e) => B(e) && V(e.then), he = (e) => e instanceof Date, me = (e) => e instanceof RegExp, F = (e) => Z(e) ? "null" : z(e) ? "undefined" : Object.prototype.toString.call(e).slice(8, -1).toLowerCase(), $e = (e, t) => F(e) === t, be = (e) => (t) => e(t), Ae = (e) => () => e, ze = (e, t) => m(e) ? t : e, Ze = () => {
89
+ }, we = (e) => e, je = (...e) => (t) => e.reduceRight((n, s) => s(n), t), Oe = (...e) => (t) => e.reduce((n, s) => s(n), t), _e = (e) => {
90
+ let t = !1, n;
91
+ return (...s) => (t || (t = !0, n = e(...s)), n);
92
+ }, Ce = (e, t) => {
93
+ try {
94
+ return e();
95
+ } catch (n) {
96
+ return typeof t == "function" ? t(n) : void 0;
97
+ }
98
+ }, Le = (e) => Array.isArray(e) ? e : [e], Te = (e) => [...new Set(e)], Me = (e) => e.reduce((t, n) => t.concat(Array.isArray(n) ? n : [n]), []), b = (e, ...t) => {
64
99
  if (!t.length) return e;
65
100
  const n = t.shift();
66
- return a(e) && a(n) && Object.keys(n).forEach((s) => {
67
- const r = e[s], u = n[s];
68
- Array.isArray(r) && Array.isArray(u) ? e[s] = r.concat(u) : a(r) && a(u) ? e[s] = z(r, u) : e[s] = u;
69
- }), z(e, ...t);
70
- }, b = (e) => Array.isArray(e) ? e.map(b) : a(e) ? Object.fromEntries(
71
- Object.entries(e).map(([t, n]) => [t, b(n)])
72
- ) : e, xe = (e, t = 300) => {
101
+ return f(e) && f(n) && Object.keys(n).forEach((s) => {
102
+ const o = e[s], c = n[s];
103
+ Array.isArray(o) && Array.isArray(c) ? e[s] = o.concat(c) : f(o) && f(c) ? e[s] = b(o, c) : e[s] = c;
104
+ }), b(e, ...t);
105
+ }, A = (e) => Array.isArray(e) ? e.map(A) : f(e) ? Object.fromEntries(
106
+ Object.entries(e).map(([t, n]) => [t, A(n)])
107
+ ) : e, Se = (e, t, n) => {
108
+ const s = Array.isArray(t) ? t : t.split(".");
109
+ let o = e;
110
+ for (const c of s) {
111
+ if (o == null)
112
+ return n;
113
+ o = o[c];
114
+ }
115
+ return o === void 0 ? n : o;
116
+ }, De = (e, t, n) => {
117
+ const s = Array.isArray(t) ? t : t.split(".");
118
+ let o = e;
119
+ for (let c = 0; c < s.length - 1; c++) {
120
+ const i = s[c];
121
+ i in o || (o[i] = {}), o = o[i];
122
+ }
123
+ o[s[s.length - 1]] = n;
124
+ }, Ee = (e, t = 300) => {
73
125
  let n = null;
74
126
  return (...s) => {
75
127
  n && clearTimeout(n), n = setTimeout(() => e(...s), t);
76
128
  };
77
- }, fe = (e, t = 300) => {
129
+ }, Pe = (e, t = 300) => {
78
130
  let n = 0;
79
131
  return (...s) => {
80
- const r = Date.now();
81
- r - n >= t && (n = r, e(...s));
132
+ const o = Date.now();
133
+ o - n >= t && (n = o, e(...s));
82
134
  };
83
- }, ae = (e) => {
84
- let t = !1, n;
85
- return (...s) => (t || (t = !0, n = e(...s)), n);
86
- }, pe = () => {
87
- }, le = (e) => e, Ie = (...e) => (t) => e.reduceRight((n, s) => s(n), t), $e = (...e) => (t) => e.reduce((n, s) => s(n), t), ye = (e, t) => {
88
- try {
89
- return e();
90
- } catch (n) {
91
- return typeof t == "function" ? t(n) : void 0;
92
- }
93
- }, E = typeof window < "u", me = E && "ontouchstart" in window;
135
+ }, p = typeof window < "u", Ne = p && "ontouchstart" in window, Re = p && /mobile|android|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(navigator.userAgent.toLowerCase()), Ve = p && /iphone|ipad|ipod/i.test(navigator.userAgent.toLowerCase()), Be = p && /android/i.test(navigator.userAgent.toLowerCase()), Fe = p && /micromessenger/i.test(navigator.userAgent.toLowerCase()), qe = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (e) => {
136
+ const t = Math.random() * 16 | 0;
137
+ return (e === "x" ? t : t & 3 | 8).toString(16);
138
+ }), Ue = (e = 8) => {
139
+ const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
140
+ let n = "";
141
+ for (let s = 0; s < e; s++)
142
+ n += t.charAt(Math.floor(Math.random() * t.length));
143
+ return n;
144
+ };
94
145
  export {
95
- l as b,
96
- $ as block,
97
- ue as coerceToArray,
98
- Ie as compose,
99
- ce as constant,
100
- q as createNamespace,
101
- xe as debounce,
102
- b as deepClone,
103
- z as deepMerge,
104
- p as defaultNamespace,
105
- ie as defaultTo,
106
- M as drawerZIndex,
107
- R as e,
108
- j as element,
109
- D as getType,
110
- ee as getZIndexList,
111
- le as identity,
112
- O as is,
113
- E as isBrowser,
114
- oe as isDefined,
115
- se as isEmpty,
116
- ne as isFalse,
146
+ y as b,
147
+ g as block,
148
+ L as classNames,
149
+ Le as coerceToArray,
150
+ je as compose,
151
+ Ae as constant,
152
+ J as createNamespace,
153
+ Ee as debounce,
154
+ A as deepClone,
155
+ b as deepMerge,
156
+ l as defaultNamespace,
157
+ ze as defaultTo,
158
+ E as drawerZIndex,
159
+ R as dropdownZIndex,
160
+ W as e,
161
+ O as element,
162
+ Me as flatten,
163
+ Se as get,
164
+ ue as getCurrentZIndex,
165
+ F as getType,
166
+ ie as getZIndexList,
167
+ we as identity,
168
+ C as is,
169
+ Be as isAndroid,
170
+ Ie as isArray,
171
+ ye as isBoolean,
172
+ p as isBrowser,
173
+ he as isDate,
174
+ fe as isDefined,
175
+ ae as isEmpty,
176
+ de as isFalse,
177
+ V as isFunction,
178
+ Ve as isIOS,
179
+ Re as isMobile,
117
180
  m as isNil,
118
181
  Z as isNull,
119
- a as isPlainObject,
120
- me as isSupportTouch,
121
- te as isTrue,
122
- de as isType,
123
- g as isUndefined,
124
- L as loadingZIndex,
125
- S as m,
126
- C as messageZIndex,
182
+ pe as isNumber,
183
+ B as isObject,
184
+ f as isPlainObject,
185
+ ge as isPromise,
186
+ me as isRegExp,
187
+ le as isString,
188
+ Ne as isSupportTouch,
189
+ xe as isTrue,
190
+ $e as isType,
191
+ z as isUndefined,
192
+ Fe as isWechat,
193
+ S as loadingZIndex,
194
+ G as m,
195
+ M as messageZIndex,
127
196
  T as modalZIndex,
128
- w as modifier,
129
- X as nextDrawerZIndex,
130
- Q as nextLoadingZIndex,
131
- N as nextMessageZIndex,
132
- K as nextModalZIndex,
133
- W as nextPopoverZIndex,
134
- Y as nextTooltipZIndex,
135
- pe as noop,
136
- ae as once,
137
- $e as pipe,
138
- P as popoverZIndex,
139
- k as popupManage,
140
- v as resetZIndex,
141
- U as state,
142
- fe as throttle,
143
- V as tooltipZIndex,
144
- ye as tryCatch,
145
- re as unary,
146
- J as useClass,
147
- H as useComponentPrefix,
148
- G as useNamespace,
149
- f as useZIndex
197
+ _ as modifier,
198
+ te as nextDrawerZIndex,
199
+ oe as nextDropdownZIndex,
200
+ v as nextLoadingZIndex,
201
+ k as nextMessageZIndex,
202
+ Y as nextModalZIndex,
203
+ ee as nextPopoverZIndex,
204
+ se as nextSelectZIndex,
205
+ ne as nextTooltipZIndex,
206
+ Ze as noop,
207
+ _e as once,
208
+ Oe as pipe,
209
+ D as popoverZIndex,
210
+ re as popupManage,
211
+ ce as resetZIndex,
212
+ N as selectZIndex,
213
+ De as set,
214
+ Ue as shortId,
215
+ H as state,
216
+ Pe as throttle,
217
+ P as tooltipZIndex,
218
+ Ce as tryCatch,
219
+ be as unary,
220
+ Te as unique,
221
+ X as useClass,
222
+ Q as useComponentPrefix,
223
+ K as useNamespace,
224
+ d as useZIndex,
225
+ qe as uuid
150
226
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue"),c=t=>typeof t=="number",d=t=>typeof t=="string",a=t=>typeof t=="boolean";function v(t=!1){const e=u.ref(t);return{value:e,toggle:o=>{a(o)?e.value=o:e.value=!e.value},setTrue:()=>{e.value=!0},setFalse:()=>{e.value=!1}}}function f(t,e,s="modelValue",n){return u.computed({get(){const o=t[s];return c(o)||d(o)?o:o??n},set(o){e(`update:${s}`,o)}})}function m(t=!1){const e=u.ref(t);return{visible:e,show:()=>{e.value=!0},hide:()=>{e.value=!1},toggle:()=>{e.value=!e.value}}}function g(t=!1){const e=u.ref(t);return{disabled:e,enable:()=>{e.value=!1},disable:()=>{e.value=!0}}}function b(t=!1){const e=u.ref(t);return{loading:e,setLoading:n=>{e.value=n},start:()=>{e.value=!0},end:()=>{e.value=!1}}}function h(t,e){const s=n=>{t.value&&!t.value.contains(n.target)&&e()};u.onMounted(()=>{document.addEventListener("click",s)}),u.onUnmounted(()=>{document.removeEventListener("click",s)})}function w(t){const e=s=>{s.key==="Escape"&&t()};u.onMounted(()=>{document.addEventListener("keydown",e)}),u.onUnmounted(()=>{document.removeEventListener("keydown",e)})}function L(t,e){let s=null;const n=()=>{s&&(s.disconnect(),s=null)};u.watch(t,i=>{n(),i&&(s=new ResizeObserver(o=>{const{width:r,height:l}=o[0].contentRect;e(r,l)}),s.observe(i))},{immediate:!0}),u.onUnmounted(n)}function p(t,e={attributes:!0,childList:!0,subtree:!0},s){let n=null;u.watch(t,i=>{n&&n.disconnect(),i&&(n=new MutationObserver(s),n.observe(i,e))},{immediate:!0}),u.onUnmounted(()=>{n==null||n.disconnect()})}function E(t,e){const s=()=>{const n=t.value;if(n&&n!==window){const{scrollTop:i,scrollLeft:o}=n;e(i,o)}else e(window.scrollY,window.scrollX)};u.onMounted(()=>{var n;(n=t.value)==null||n.addEventListener("scroll",s,{passive:!0})}),u.onUnmounted(()=>{var n;(n=t.value)==null||n.removeEventListener("scroll",s)})}function O(t,e){const s=u.ref(!1),n=()=>{s.value=!0,e==null||e(!0)},i=()=>{s.value=!1,e==null||e(!1)};return u.watch(t,o=>{o==null||o.addEventListener("focus",n),o==null||o.addEventListener("blur",i)},{immediate:!0}),u.onUnmounted(()=>{var o,r;(o=t.value)==null||o.removeEventListener("focus",n),(r=t.value)==null||r.removeEventListener("blur",i)}),{focused:s}}function y(t,e,s={threshold:0}){let n=null;u.watch(t,i=>{n&&n.disconnect(),i&&typeof IntersectionObserver<"u"&&(n=new IntersectionObserver(o=>{const r=o[0];e(r.isIntersecting)},s),n.observe(i))},{immediate:!0}),u.onUnmounted(()=>{n==null||n.disconnect()})}exports.useClickOutside=h;exports.useDOMObserver=p;exports.useDisabled=g;exports.useEscape=w;exports.useFocus=O;exports.useIntersectionObserver=y;exports.useLoading=b;exports.useModel=f;exports.useResize=L;exports.useScroll=E;exports.useToggle=v;exports.useVisible=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("vue"),c=t=>typeof t=="number",d=t=>typeof t=="string",a=t=>typeof t=="boolean";function v(t=!1){const e=u.ref(t);return{value:e,toggle:o=>{a(o)?e.value=o:e.value=!e.value},setTrue:()=>{e.value=!0},setFalse:()=>{e.value=!1}}}function f(t,e,s="modelValue",n){return u.computed({get(){const o=t[s];return c(o)||d(o)?o:o??n},set(o){e(`update:${s}`,o)}})}function m(t=!1){const e=u.ref(t);return{visible:e,show:()=>{e.value=!0},hide:()=>{e.value=!1},toggle:()=>{e.value=!e.value}}}function g(t=!1){const e=u.ref(t);return{disabled:e,enable:()=>{e.value=!1},disable:()=>{e.value=!0}}}function b(t=!1){const e=u.ref(t);return{loading:e,setLoading:n=>{e.value=n},start:()=>{e.value=!0},end:()=>{e.value=!1}}}function h(t,e){const s=n=>{t.value&&!t.value.contains(n.target)&&e()};u.onMounted(()=>{document.addEventListener("click",s)}),u.onUnmounted(()=>{document.removeEventListener("click",s)})}function w(t){const e=s=>{s.key==="Escape"&&t()};u.onMounted(()=>{document.addEventListener("keydown",e)}),u.onUnmounted(()=>{document.removeEventListener("keydown",e)})}function L(t,e){let s=null;const n=()=>{s&&(s.disconnect(),s=null)};u.watch(t,i=>{n(),i&&(s=new ResizeObserver(o=>{const{width:r,height:l}=o[0].contentRect;e(r,l)}),s.observe(i))},{immediate:!0}),u.onUnmounted(n)}function p(t,e={attributes:!0,childList:!0,subtree:!0},s){let n=null;u.watch(t,i=>{n&&n.disconnect(),i&&(n=new MutationObserver(s),n.observe(i,e))},{immediate:!0}),u.onUnmounted(()=>{n==null||n.disconnect()})}function E(t,e){const s=()=>{const n=t.value;if(n&&n!==window){const{scrollTop:i,scrollLeft:o}=n;e(i,o)}else e(window.scrollY,window.scrollX)};u.onMounted(()=>{var n;(n=t.value)==null||n.addEventListener("scroll",s,{passive:!0})}),u.onUnmounted(()=>{var n;(n=t.value)==null||n.removeEventListener("scroll",s)})}function O(t,e){const s=u.ref(!1),n=()=>{s.value=!0,e==null||e(!0)},i=()=>{s.value=!1,e==null||e(!1)};return u.watch(t,o=>{o==null||o.addEventListener("focus",n),o==null||o.addEventListener("blur",i)},{immediate:!0}),u.onUnmounted(()=>{var o,r;(o=t.value)==null||o.removeEventListener("focus",n),(r=t.value)==null||r.removeEventListener("blur",i)}),{focused:s}}function y(t,e,s={threshold:0}){let n=null;u.watch(t,i=>{n&&n.disconnect(),i&&typeof IntersectionObserver<"u"&&(n=new IntersectionObserver(o=>{const r=o[0];e(r.isIntersecting)},s),n.observe(i))},{immediate:!0}),u.onUnmounted(()=>{n==null||n.disconnect()})}function M(t=300){let e=null;const s=i=>{n(),e=setTimeout(i,t)},n=()=>{e&&(clearTimeout(e),e=null)};return u.onUnmounted(n),{execute:s,cancel:n}}exports.useClickOutside=h;exports.useDOMObserver=p;exports.useDelayedAction=M;exports.useDisabled=g;exports.useEscape=w;exports.useFocus=O;exports.useIntersectionObserver=y;exports.useLoading=b;exports.useModel=f;exports.useResize=L;exports.useScroll=E;exports.useToggle=v;exports.useVisible=m;
package/lib/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./theme/index.cjs"),e=require("./utils/index.cjs"),s=require("./hooks/index.cjs");exports.cssVarPrefix=n.cssVarPrefix;exports.defaultThemeConfig=n.defaultThemeConfig;exports.generateCSSVars=n.generateCSSVars;exports.generateColorPalette=n.generateColorPalette;exports.sizeMap=n.sizeMap;exports.b=e.b;exports.block=e.block;exports.coerceToArray=e.coerceToArray;exports.compose=e.compose;exports.constant=e.constant;exports.createNamespace=e.createNamespace;exports.debounce=e.debounce;exports.deepClone=e.deepClone;exports.deepMerge=e.deepMerge;exports.defaultNamespace=e.defaultNamespace;exports.defaultTo=e.defaultTo;exports.drawerZIndex=e.drawerZIndex;exports.e=e.e;exports.element=e.element;exports.getType=e.getType;exports.getZIndexList=e.getZIndexList;exports.identity=e.identity;exports.is=e.is;exports.isBrowser=e.isBrowser;exports.isDefined=e.isDefined;exports.isEmpty=e.isEmpty;exports.isFalse=e.isFalse;exports.isNil=e.isNil;exports.isNull=e.isNull;exports.isPlainObject=e.isPlainObject;exports.isSupportTouch=e.isSupportTouch;exports.isTrue=e.isTrue;exports.isType=e.isType;exports.isUndefined=e.isUndefined;exports.loadingZIndex=e.loadingZIndex;exports.m=e.m;exports.messageZIndex=e.messageZIndex;exports.modalZIndex=e.modalZIndex;exports.modifier=e.modifier;exports.nextDrawerZIndex=e.nextDrawerZIndex;exports.nextLoadingZIndex=e.nextLoadingZIndex;exports.nextMessageZIndex=e.nextMessageZIndex;exports.nextModalZIndex=e.nextModalZIndex;exports.nextPopoverZIndex=e.nextPopoverZIndex;exports.nextTooltipZIndex=e.nextTooltipZIndex;exports.noop=e.noop;exports.once=e.once;exports.pipe=e.pipe;exports.popoverZIndex=e.popoverZIndex;exports.popupManage=e.popupManage;exports.resetZIndex=e.resetZIndex;exports.state=e.state;exports.throttle=e.throttle;exports.tooltipZIndex=e.tooltipZIndex;exports.tryCatch=e.tryCatch;exports.unary=e.unary;exports.useClass=e.useClass;exports.useComponentPrefix=e.useComponentPrefix;exports.useNamespace=e.useNamespace;exports.useZIndex=e.useZIndex;exports.useClickOutside=s.useClickOutside;exports.useDOMObserver=s.useDOMObserver;exports.useDisabled=s.useDisabled;exports.useEscape=s.useEscape;exports.useFocus=s.useFocus;exports.useIntersectionObserver=s.useIntersectionObserver;exports.useLoading=s.useLoading;exports.useModel=s.useModel;exports.useResize=s.useResize;exports.useScroll=s.useScroll;exports.useToggle=s.useToggle;exports.useVisible=s.useVisible;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./theme/index.cjs"),e=require("./utils/index.cjs"),n=require("./hooks/index.cjs"),m=require("vue"),h={confirm:"确认",cancel:"取消",save:"保存",delete:"删除",edit:"编辑",add:"添加",search:"搜索",reset:"重置",submit:"提交",back:"返回",close:"关闭",loading:"加载中...",noData:"暂无数据",noResult:"无匹配结果",success:"操作成功",failed:"操作失败",warning:"警告",error:"错误",info:"提示",form:{required:"此项为必填项",invalid:"格式不正确",minLength:"最少输入 {0} 个字符",maxLength:"最多输入 {0} 个字符",min:"不能小于 {0}",max:"不能大于 {0}",email:"请输入有效的邮箱地址",phone:"请输入有效的手机号码",url:"请输入有效的网址",idCard:"请输入有效的身份证号码",password:"密码长度应为 6-20 个字符",confirmPassword:"两次输入的密码不一致"},table:{total:"共 {0} 条",pageSize:"{0} 条/页",goto:"跳至",page:"页",prevPage:"上一页",nextPage:"下一页",selectAll:"全选",sort:"排序",filter:"筛选",columnSettings:"列设置",expand:"展开",collapse:"收起"},datePicker:{year:"年",month:"月",week:"周",day:"日",today:"今天",thisWeek:"本周",thisMonth:"本月",thisYear:"今年",lastWeek:"上周",lastMonth:"上月",lastYear:"去年",last7Days:"最近 7 天",last30Days:"最近 30 天",last90Days:"最近 90 天",custom:"自定义",startPlaceholder:"开始日期",endPlaceholder:"结束日期",startTimePlaceholder:"开始时间",endTimePlaceholder:"结束时间",months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],weeks:["日","一","二","三","四","五","六"]},timePicker:{hour:"时",minute:"分",second:"秒",now:"此刻",confirm:"确定"},upload:{selectFile:"选择文件",dragTip:"将文件拖到此处,或",clickUpload:"点击上传",uploadSuccess:"上传成功",uploadFailed:"上传失败",fileSizeLimit:"文件大小不超过 {0}",fileTypeLimit:"文件格式不支持",fileCountLimit:"最多上传 {0} 个文件",deleteConfirm:"确定删除此文件?",preview:"预览",download:"下载",remove:"删除"},pagination:{total:"共 {total} 条",pageSize:"{size} 条/页",goto:"前往",page:"页"},transfer:{searchPlaceholder:"请输入搜索内容",noData:"暂无数据",noMatch:"无匹配数据",toRight:"移至右侧",toLeft:"移至左侧",selectAll:"全选",selected:"已选 {count} 项"},tree:{expandAll:"展开全部",collapseAll:"收起全部",searchPlaceholder:"搜索关键字",noData:"暂无数据"},modal:{confirm:"确认",cancel:"取消",close:"关闭"},message:{success:"操作成功",warning:"警告提示",error:"错误提示",info:"信息提示"},image:{zoomIn:"放大",zoomOut:"缩小",rotateLeft:"左旋转",rotateRight:"右旋转",originalSize:"原始大小",prev:"上一张",next:"下一张"},result:{success:"操作成功",failed:"操作失败",warning:"警告提示",info:"信息提示",backHome:"返回首页",retry:"重试"}},P={confirm:"Confirm",cancel:"Cancel",save:"Save",delete:"Delete",edit:"Edit",add:"Add",search:"Search",reset:"Reset",submit:"Submit",back:"Back",close:"Close",loading:"Loading...",noData:"No Data",noResult:"No Result",success:"Success",failed:"Failed",warning:"Warning",error:"Error",info:"Info",form:{required:"This field is required",invalid:"Invalid format",minLength:"Minimum {0} characters required",maxLength:"Maximum {0} characters allowed",min:"Must be at least {0}",max:"Must be at most {0}",email:"Please enter a valid email",phone:"Please enter a valid phone number",url:"Please enter a valid URL",idCard:"Please enter a valid ID card number",password:"Password must be 6-20 characters",confirmPassword:"Passwords do not match"},table:{total:"Total {0} items",pageSize:"{0} / page",goto:"Go to",page:"Page",prevPage:"Previous",nextPage:"Next",selectAll:"Select All",sort:"Sort",filter:"Filter",columnSettings:"Column Settings",expand:"Expand",collapse:"Collapse"},datePicker:{year:"Year",month:"Month",week:"Week",day:"Day",today:"Today",thisWeek:"This Week",thisMonth:"This Month",thisYear:"This Year",lastWeek:"Last Week",lastMonth:"Last Month",lastYear:"Last Year",last7Days:"Last 7 Days",last30Days:"Last 30 Days",last90Days:"Last 90 Days",custom:"Custom",startPlaceholder:"Start Date",endPlaceholder:"End Date",startTimePlaceholder:"Start Time",endTimePlaceholder:"End Time",months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weeks:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},timePicker:{hour:"Hour",minute:"Minute",second:"Second",now:"Now",confirm:"OK"},upload:{selectFile:"Select File",dragTip:"Drag file here, or",clickUpload:"Click to Upload",uploadSuccess:"Upload Success",uploadFailed:"Upload Failed",fileSizeLimit:"File size must not exceed {0}",fileTypeLimit:"File type not supported",fileCountLimit:"Maximum {0} files allowed",deleteConfirm:"Are you sure to delete this file?",preview:"Preview",download:"Download",remove:"Remove"},pagination:{total:"Total {total} items",pageSize:"{size} / page",goto:"Go to",page:"Page"},transfer:{searchPlaceholder:"Search",noData:"No Data",noMatch:"No Match",toRight:"Move to Right",toLeft:"Move to Left",selectAll:"Select All",selected:"{count} items selected"},tree:{expandAll:"Expand All",collapseAll:"Collapse All",searchPlaceholder:"Search",noData:"No Data"},modal:{confirm:"Confirm",cancel:"Cancel",close:"Close"},message:{success:"Success",warning:"Warning",error:"Error",info:"Info"},image:{zoomIn:"Zoom In",zoomOut:"Zoom Out",rotateLeft:"Rotate Left",rotateRight:"Rotate Right",originalSize:"Original Size",prev:"Previous",next:"Next"},result:{success:"Success",failed:"Failed",warning:"Warning",info:"Info",backHome:"Back Home",retry:"Retry"}},v={confirm:"確認",cancel:"キャンセル",save:"保存",delete:"削除",edit:"編集",add:"追加",search:"検索",reset:"リセット",submit:"送信",back:"戻る",close:"閉じる",loading:"読み込み中...",noData:"データがありません",noResult:"結果がありません",success:"成功",failed:"失敗",warning:"警告",error:"エラー",info:"情報",form:{required:"この項目は必須です",invalid:"形式が正しくありません",minLength:"{0}文字以上で入力してください",maxLength:"{0}文字以内で入力してください",min:"{0}以上で入力してください",max:"{0}以下で入力してください",email:"有効なメールアドレスを入力してください",phone:"有効な電話番号を入力してください",url:"有効なURLを入力してください",idCard:"有効なID番号を入力してください",password:"パスワードは6-20文字で入力してください",confirmPassword:"パスワードが一致しません"},table:{total:"合計 {0} 件",pageSize:"{0} 件/ページ",goto:"移動",page:"ページ",prevPage:"前へ",nextPage:"次へ",selectAll:"全選択",sort:"並び替え",filter:"フィルター",columnSettings:"列設定",expand:"展開",collapse:"折りたたむ"},datePicker:{year:"年",month:"月",week:"週",day:"日",today:"今日",thisWeek:"今週",thisMonth:"今月",thisYear:"今年",lastWeek:"先週",lastMonth:"先月",lastYear:"昨年",last7Days:"過去7日間",last30Days:"過去30日間",last90Days:"過去90日間",custom:"カスタム",startPlaceholder:"開始日",endPlaceholder:"終了日",startTimePlaceholder:"開始時間",endTimePlaceholder:"終了時間",months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],weeks:["日","月","火","水","木","金","土"]},timePicker:{hour:"時",minute:"分",second:"秒",now:"現在",confirm:"確定"},upload:{selectFile:"ファイルを選択",dragTip:"ファイルをここにドラッグ、または",clickUpload:"クリックしてアップロード",uploadSuccess:"アップロード成功",uploadFailed:"アップロード失敗",fileSizeLimit:"ファイルサイズは{0}以下にしてください",fileTypeLimit:"サポートされていないファイル形式です",fileCountLimit:"最大{0}ファイルまでアップロードできます",deleteConfirm:"このファイルを削除しますか?",preview:"プレビュー",download:"ダウンロード",remove:"削除"},pagination:{total:"合計 {total} 件",pageSize:"{size} 件/ページ",goto:"移動",page:"ページ"},transfer:{searchPlaceholder:"検索",noData:"データがありません",noMatch:"一致するデータがありません",toRight:"右に移動",toLeft:"左に移動",selectAll:"全選択",selected:"{count}件選択済み"},tree:{expandAll:"すべて展開",collapseAll:"すべて折りたたむ",searchPlaceholder:"キーワード検索",noData:"データがありません"},modal:{confirm:"確認",cancel:"キャンセル",close:"閉じる"},message:{success:"成功",warning:"警告",error:"エラー",info:"情報"},image:{zoomIn:"拡大",zoomOut:"縮小",rotateLeft:"左に回転",rotateRight:"右に回転",originalSize:"元のサイズ",prev:"前へ",next:"次へ"},result:{success:"成功",failed:"失敗",warning:"警告",info:"情報",backHome:"ホームに戻る",retry:"再試行"}},y={confirm:"확인",cancel:"취소",save:"저장",delete:"삭제",edit:"편집",add:"추가",search:"검색",reset:"초기화",submit:"제출",back:"뒤로",close:"닫기",loading:"로딩 중...",noData:"데이터 없음",noResult:"결과 없음",success:"성공",failed:"실패",warning:"경고",error:"오류",info:"정보",form:{required:"필수 항목입니다",invalid:"형식이 올바르지 않습니다",minLength:"최소 {0}자 이상 입력하세요",maxLength:"최대 {0}자까지 입력 가능합니다",min:"{0} 이상이어야 합니다",max:"{0} 이하여야 합니다",email:"올바른 이메일을 입력하세요",phone:"올바른 전화번호를 입력하세요",url:"올바른 URL을 입력하세요",idCard:"올바른 ID 번호를 입력하세요",password:"비밀번호는 6-20자여야 합니다",confirmPassword:"비밀번호가 일치하지 않습니다"},table:{total:"총 {0}개",pageSize:"{0}개/페이지",goto:"이동",page:"페이지",prevPage:"이전",nextPage:"다음",selectAll:"전체 선택",sort:"정렬",filter:"필터",columnSettings:"열 설정",expand:"펼치기",collapse:"접기"},datePicker:{year:"년",month:"월",week:"주",day:"일",today:"오늘",thisWeek:"이번 주",thisMonth:"이번 달",thisYear:"올해",lastWeek:"지난 주",lastMonth:"지난 달",lastYear:"작년",last7Days:"최근 7일",last30Days:"최근 30일",last90Days:"최근 90일",custom:"사용자 지정",startPlaceholder:"시작일",endPlaceholder:"종료일",startTimePlaceholder:"시작 시간",endTimePlaceholder:"종료 시간",months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],weeks:["일","월","화","수","목","금","토"]},timePicker:{hour:"시",minute:"분",second:"초",now:"현재",confirm:"확인"},upload:{selectFile:"파일 선택",dragTip:"파일을 여기에 끌어오거나",clickUpload:"클릭하여 업로드",uploadSuccess:"업로드 성공",uploadFailed:"업로드 실패",fileSizeLimit:"파일 크기는 {0} 이하여야 합니다",fileTypeLimit:"지원하지 않는 파일 형식입니다",fileCountLimit:"최대 {0}개까지 업로드 가능합니다",deleteConfirm:"이 파일을 삭제하시겠습니까?",preview:"미리보기",download:"다운로드",remove:"삭제"},pagination:{total:"총 {total}개",pageSize:"{size}개/페이지",goto:"이동",page:"페이지"},transfer:{searchPlaceholder:"검색",noData:"데이터 없음",noMatch:"일치하는 데이터 없음",toRight:"오른쪽으로 이동",toLeft:"왼쪽으로 이동",selectAll:"전체 선택",selected:"{count}개 선택됨"},tree:{expandAll:"모두 펼치기",collapseAll:"모두 접기",searchPlaceholder:"키워드 검색",noData:"데이터 없음"},modal:{confirm:"확인",cancel:"취소",close:"닫기"},message:{success:"성공",warning:"경고",error:"오류",info:"정보"},image:{zoomIn:"확대",zoomOut:"축소",rotateLeft:"왼쪽 회전",rotateRight:"오른쪽 회전",originalSize:"원본 크기",prev:"이전",next:"다음"},result:{success:"성공",failed:"실패",warning:"경고",info:"정보",backHome:"홈으로",retry:"재시도"}},u={"zh-CN":h,"en-US":P,"ja-JP":v,"ko-KR":y},f={"zh-CN":"简体中文","en-US":"English","ja-JP":"日本語","ko-KR":"한국어"},g=Symbol("locale"),I=m.ref("zh-CN"),w=m.ref({...h});function x(t,o){const a=o.split(".");let i=t;for(const c of a)if(i&&typeof i=="object"&&c in i)i=i[c];else return;return typeof i=="string"?i:void 0}function S(t,o){return t.replace(/\{(\d+)\}/g,(a,i)=>{const c=parseInt(i,10);return o[c]!==void 0?String(o[c]):a})}function b(){const t=m.inject(g,null),o=(t==null?void 0:t.locale)||I,a=(t==null?void 0:t.messages)||w,i=(l,...p)=>{const d=x(a.value,l);return d===void 0?(console.warn(`[xto-i18n] Missing translation for key: ${l}`),l):p.length>0?S(d,p):d},c=l=>{u[l]?(o.value=l,a.value={...u[l]}):console.warn(`[xto-i18n] Unknown locale: ${l}`)},r=l=>{a.value={...a.value,...l}};return{locale:o,messages:m.computed(()=>a.value),t:i,setLocale:c,mergeMessages:r}}function D(){return Object.entries(f).map(([t,o])=>({code:t,name:o}))}function k(t="zh-CN"){const o=m.ref(t),a=m.ref({...u[t]});return{locale:o,messages:a,setLocale:r=>{u[r]&&(o.value=r,a.value={...u[r]})},mergeMessages:r=>{a.value={...a.value,...r}},install(r){r.provide(g,{locale:o,messages:a}),r.config.globalProperties.$t=(l,...p)=>{const d=x(a.value,l);return d===void 0?l:p.length>0?S(d,p):d},r.config.globalProperties.$locale=o}}}const C="1.0.0";exports.applyCSSVars=s.applyCSSVars;exports.applyDarkTheme=s.applyDarkTheme;exports.cssVarPrefix=s.cssVarPrefix;exports.darkCSSVars=s.darkCSSVars;exports.defaultThemeConfig=s.defaultThemeConfig;exports.generateCSSVars=s.generateCSSVars;exports.generateColorPalette=s.generateColorPalette;exports.getComponentSize=s.getComponentSize;exports.hexToRgb=s.hexToRgb;exports.mixColor=s.mixColor;exports.removeCSSVars=s.removeCSSVars;exports.removeDarkTheme=s.removeDarkTheme;exports.rgbToHex=s.rgbToHex;exports.sizeMap=s.sizeMap;exports.b=e.b;exports.block=e.block;exports.classNames=e.classNames;exports.coerceToArray=e.coerceToArray;exports.compose=e.compose;exports.constant=e.constant;exports.createNamespace=e.createNamespace;exports.debounce=e.debounce;exports.deepClone=e.deepClone;exports.deepMerge=e.deepMerge;exports.defaultNamespace=e.defaultNamespace;exports.defaultTo=e.defaultTo;exports.drawerZIndex=e.drawerZIndex;exports.dropdownZIndex=e.dropdownZIndex;exports.e=e.e;exports.element=e.element;exports.flatten=e.flatten;exports.get=e.get;exports.getCurrentZIndex=e.getCurrentZIndex;exports.getType=e.getType;exports.getZIndexList=e.getZIndexList;exports.identity=e.identity;exports.is=e.is;exports.isAndroid=e.isAndroid;exports.isArray=e.isArray;exports.isBoolean=e.isBoolean;exports.isBrowser=e.isBrowser;exports.isDate=e.isDate;exports.isDefined=e.isDefined;exports.isEmpty=e.isEmpty;exports.isFalse=e.isFalse;exports.isFunction=e.isFunction;exports.isIOS=e.isIOS;exports.isMobile=e.isMobile;exports.isNil=e.isNil;exports.isNull=e.isNull;exports.isNumber=e.isNumber;exports.isObject=e.isObject;exports.isPlainObject=e.isPlainObject;exports.isPromise=e.isPromise;exports.isRegExp=e.isRegExp;exports.isString=e.isString;exports.isSupportTouch=e.isSupportTouch;exports.isTrue=e.isTrue;exports.isType=e.isType;exports.isUndefined=e.isUndefined;exports.isWechat=e.isWechat;exports.loadingZIndex=e.loadingZIndex;exports.m=e.m;exports.messageZIndex=e.messageZIndex;exports.modalZIndex=e.modalZIndex;exports.modifier=e.modifier;exports.nextDrawerZIndex=e.nextDrawerZIndex;exports.nextDropdownZIndex=e.nextDropdownZIndex;exports.nextLoadingZIndex=e.nextLoadingZIndex;exports.nextMessageZIndex=e.nextMessageZIndex;exports.nextModalZIndex=e.nextModalZIndex;exports.nextPopoverZIndex=e.nextPopoverZIndex;exports.nextSelectZIndex=e.nextSelectZIndex;exports.nextTooltipZIndex=e.nextTooltipZIndex;exports.noop=e.noop;exports.once=e.once;exports.pipe=e.pipe;exports.popoverZIndex=e.popoverZIndex;exports.popupManage=e.popupManage;exports.resetZIndex=e.resetZIndex;exports.selectZIndex=e.selectZIndex;exports.set=e.set;exports.shortId=e.shortId;exports.state=e.state;exports.throttle=e.throttle;exports.tooltipZIndex=e.tooltipZIndex;exports.tryCatch=e.tryCatch;exports.unary=e.unary;exports.unique=e.unique;exports.useClass=e.useClass;exports.useComponentPrefix=e.useComponentPrefix;exports.useNamespace=e.useNamespace;exports.useZIndex=e.useZIndex;exports.uuid=e.uuid;exports.useClickOutside=n.useClickOutside;exports.useDOMObserver=n.useDOMObserver;exports.useDelayedAction=n.useDelayedAction;exports.useDisabled=n.useDisabled;exports.useEscape=n.useEscape;exports.useFocus=n.useFocus;exports.useIntersectionObserver=n.useIntersectionObserver;exports.useLoading=n.useLoading;exports.useModel=n.useModel;exports.useResize=n.useResize;exports.useScroll=n.useScroll;exports.useToggle=n.useToggle;exports.useVisible=n.useVisible;exports.createLocaleProvider=k;exports.getSupportedLocales=D;exports.localeInjectionKey=g;exports.localeNames=f;exports.locales=u;exports.useLocale=b;exports.version=C;