@unicom-cloud/ui 0.8.105 → 0.8.107

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 (87) hide show
  1. package/App.js +7 -0
  2. package/BackTop.js +2 -4
  3. package/Calendar.js +2 -2
  4. package/Modal.js +4 -2
  5. package/Segmented.js +4 -2
  6. package/app/App.js +26 -0
  7. package/app/context.js +9 -0
  8. package/app/index.js +9 -0
  9. package/app/interface.js +1 -0
  10. package/app/useApp.js +8 -0
  11. package/back-top/index.js +44 -56
  12. package/calendar/Lunar.js +71 -0
  13. package/calendar/index.js +11 -11
  14. package/color-picker/index.js +34 -34
  15. package/components/common/flex/index.js +4 -4
  16. package/components/common/icons/file/index.js +13 -11
  17. package/components/common/utils/dayjs.js +99 -124
  18. package/components/common/utils/is.js +98 -104
  19. package/components/common/utils/setDir.js +12 -0
  20. package/components/common/utils/setTheme.js +13 -13
  21. package/config-provider/ConfigProvider.js +32 -30
  22. package/descriptions/index.js +32 -32
  23. package/divider/index.js +28 -20
  24. package/empty/index.js +1 -1
  25. package/grid/Grid.js +55 -88
  26. package/grid/Item.js +40 -61
  27. package/grid/context.js +1 -4
  28. package/grid/hook/useResponsiveState.js +22 -25
  29. package/grid/util.js +6 -44
  30. package/index.js +462 -457
  31. package/input/Button.js +12 -12
  32. package/input/Group.js +11 -12
  33. package/input/Input.js +112 -102
  34. package/input/Search.js +24 -24
  35. package/modal/Confirm.js +17 -17
  36. package/modal/Modal.js +247 -237
  37. package/modal/index.js +4 -2
  38. package/modal/use-modal/index.js +2 -2
  39. package/package.json +1 -1
  40. package/segmented/index.js +93 -90
  41. package/select-view/Core.js +31 -28
  42. package/splitter/SplitBar.js +44 -46
  43. package/style.css +1 -1
  44. package/table/Table.js +198 -210
  45. package/table/th-resizable/index.js +9 -10
  46. package/time-picker/util.js +20 -30
  47. package/types/common/development/interface.d.ts +3 -3
  48. package/types/common/utils/is.d.ts +3 -4
  49. package/types/common/utils/setDir.d.ts +2 -0
  50. package/types/pc/app/App.d.ts +6 -0
  51. package/types/pc/app/context.d.ts +4 -0
  52. package/types/pc/app/index.d.ts +5 -0
  53. package/types/pc/app/interface.d.ts +17 -0
  54. package/types/pc/app/useApp.d.ts +3 -0
  55. package/types/pc/back-top/interface.d.ts +4 -17
  56. package/types/pc/calendar/Lunar.d.ts +17 -0
  57. package/types/pc/calendar/index.d.ts +1 -1
  58. package/types/pc/config-provider/interface.d.ts +1 -1
  59. package/types/pc/divider/interface.d.ts +1 -0
  60. package/types/pc/grid/Grid.d.ts +1 -2
  61. package/types/pc/grid/Item.d.ts +2 -5
  62. package/types/pc/grid/context.d.ts +4 -10
  63. package/types/pc/grid/hook/useResponsiveState.d.ts +2 -2
  64. package/types/pc/grid/interface.d.ts +9 -19
  65. package/types/pc/grid/util.d.ts +1 -10
  66. package/types/pc/index.d.ts +3 -1
  67. package/types/pc/input/Button.d.ts +2 -2
  68. package/types/pc/message/index.d.ts +1 -9
  69. package/types/pc/message/interface.d.ts +8 -0
  70. package/types/pc/message/useMessage.d.ts +1 -2
  71. package/types/pc/modal/Modal.d.ts +1 -0
  72. package/types/pc/modal/config.d.ts +1 -2
  73. package/types/pc/modal/index.d.ts +2 -1
  74. package/types/pc/modal/interface.d.ts +17 -5
  75. package/types/pc/notification/index.d.ts +2 -9
  76. package/types/pc/notification/interface.d.ts +7 -0
  77. package/types/pc/notification/useNotification.d.ts +1 -2
  78. package/types/pc/segmented/interface.d.ts +6 -0
  79. package/types/pc/select-view/Core.d.ts +1 -8
  80. package/types/pc/select-view/index.d.ts +1 -8
  81. package/types/pc/select-view/interface.d.ts +9 -2
  82. package/types/pc/utils/is.d.ts +1 -1
  83. package/types/pc/utils/names.d.ts +303 -0
  84. package/utils/index.js +58 -59
  85. package/utils/is.js +65 -66
  86. package/utils/names.js +298 -144
  87. package/version/index.js +1 -1
@@ -1,76 +1,51 @@
1
- import a, { isDayjs as l } from "dayjs";
2
- import $ from "dayjs/plugin/advancedFormat";
3
- import b from "dayjs/plugin/customParseFormat";
4
- import v from "dayjs/plugin/isBetween";
5
- import F from "dayjs/plugin/quarterOfYear";
6
- import Y from "dayjs/plugin/timezone";
7
- import A from "dayjs/plugin/utc";
8
- import W from "dayjs/plugin/weekOfYear";
9
- import U from "dayjs/plugin/weekYear";
1
+ import i, { isDayjs as w } from "dayjs";
2
+ import j from "dayjs/plugin/advancedFormat";
3
+ import F from "dayjs/plugin/customParseFormat";
4
+ import Y from "dayjs/plugin/isBetween";
5
+ import k from "dayjs/plugin/quarterOfYear";
6
+ import A from "dayjs/plugin/timezone";
7
+ import M from "dayjs/plugin/utc";
8
+ import S from "dayjs/plugin/weekOfYear";
9
+ import $ from "dayjs/plugin/weekYear";
10
10
  import d from "lodash/isArray";
11
- import O from "lodash/isUndefined";
12
- const u = a()._isAMomentObject;
13
- u && (a.extend = () => {
14
- });
15
- const C = (t, e, n) => {
16
- n = function(o, c) {
17
- if (l(o))
18
- return o.clone();
19
- const i = typeof c == "object" ? c : {};
20
- return i.date = o, i.args = arguments, new e(i);
21
- };
22
- const r = e.prototype, s = r.$utils;
23
- r.$utils = function() {
24
- const o = s();
25
- return o.i = l, o;
26
- }, n.isDayjs = l;
27
- };
28
- a.extend(C);
29
- a.extend(b);
30
- a.extend(v);
31
- a.extend(W);
32
- a.extend($);
33
- a.extend(U);
34
- a.extend(F);
35
- a.extend(A);
36
- a.extend(Y);
37
- const f = a;
38
- function T(t, e) {
39
- const n = (t.day() - e + 7) % 7;
40
- return t.clone().startOf("day").subtract(n, "day").valueOf();
41
- }
42
- function H(t, e, n) {
43
- return T(t, n) === T(e, n);
44
- }
45
- const h = {
11
+ import m from "lodash/isUndefined";
12
+ i.extend(F);
13
+ i.extend(Y);
14
+ i.extend(S);
15
+ i.extend(j);
16
+ i.extend($);
17
+ i.extend(k);
18
+ i.extend(M);
19
+ i.extend(A);
20
+ const s = i, y = {
46
21
  add(t, e, n) {
47
- return u ? t.clone().add(e, n) : t.add(e, n);
22
+ return t.add(e, n);
48
23
  },
49
24
  subtract(t, e, n) {
50
- return u ? t.clone().subtract(e, n) : t.subtract(e, n);
25
+ return t.subtract(e, n);
51
26
  },
52
27
  startOf(t, e) {
53
- return u ? t.clone().startOf(e) : t.startOf(e);
28
+ return t.startOf(e);
54
29
  },
55
30
  endOf(t, e) {
56
- return u ? t.clone().endOf(e) : t.endOf(e);
31
+ return t.endOf(e);
57
32
  },
58
33
  set(t, e, n) {
59
- return u ? t.clone().set(e, n) : t.set(e, n);
34
+ return t.set(e, n);
60
35
  },
61
36
  isSameWeek(t, e, n, r) {
62
- return u ? H(t, e, n) : t.locale({ ...f.Ls[r], weekStart: n }).isSame(e, "week");
37
+ return t.locale({ ...s.Ls[r], weekStart: n }).isSame(e, "week");
63
38
  }
64
- }, P = {
39
+ }, C = {
65
40
  year: 0,
66
41
  month: 1,
67
42
  day: 2,
68
43
  hour: 3,
69
44
  minute: 4,
70
45
  second: 5
71
- }, j = {}, S = (t, e) => {
46
+ }, D = {}, H = (t, e) => {
72
47
  const n = `${t}|short`;
73
- let r = j[n];
48
+ let r = D[n];
74
49
  return r || (r = new Intl.DateTimeFormat("en-US", {
75
50
  hour12: !1,
76
51
  timeZone: t,
@@ -80,114 +55,114 @@ const h = {
80
55
  hour: "2-digit",
81
56
  minute: "2-digit",
82
57
  second: "2-digit"
83
- }), j[n] = r), r;
84
- }, I = (t, e) => {
58
+ }), D[n] = r), r;
59
+ }, P = (t, e) => {
85
60
  const n = new Date(t);
86
- return S(e).formatToParts(n);
87
- }, x = (t, e) => {
88
- const n = I(t, e), r = [];
89
- for (let m = 0; m < n.length; m += 1) {
90
- const { type: g, value: M } = n[m], D = P[g];
91
- D >= 0 && (r[D] = parseInt(M, 10));
61
+ return H(e).formatToParts(n);
62
+ }, g = (t, e) => {
63
+ const n = P(t, e), r = [];
64
+ for (let c = 0; c < n.length; c += 1) {
65
+ const { type: l, value: v } = n[c], x = C[l];
66
+ x >= 0 && (r[x] = parseInt(v, 10));
92
67
  }
93
- const s = r[3], o = s === 24 ? 0 : s, c = Date.UTC(
68
+ const o = r[3], f = o === 24 ? 0 : o, u = Date.UTC(
94
69
  r[0],
95
70
  r[1] - 1,
96
71
  r[2],
97
- o,
72
+ f,
98
73
  r[4],
99
74
  r[5],
100
75
  0
101
76
  );
102
- let i = +t;
103
- const y = i % 1e3;
104
- return i -= y, (c - i) / (60 * 1e3);
105
- }, _ = (t, e, n) => {
77
+ let a = +t;
78
+ const O = a % 1e3;
79
+ return a -= O, (u - a) / (60 * 1e3);
80
+ }, b = (t, e, n) => {
106
81
  let r = t - e * 60 * 1e3;
107
- const s = x(r, n);
108
- if (e === s)
82
+ const o = g(r, n);
83
+ if (e === o)
109
84
  return [r, e];
110
- r -= (s - e) * 60 * 1e3;
111
- const o = x(r, n);
112
- return s === o ? [r, s] : [t - Math.min(s, o) * 60 * 1e3, Math.max(s, o)];
85
+ r -= (o - e) * 60 * 1e3;
86
+ const f = g(r, n);
87
+ return o === f ? [r, o] : [t - Math.min(o, f) * 60 * 1e3, Math.max(o, f)];
113
88
  };
114
- function w(t, e) {
115
- const n = x(t, e);
116
- return _(t, n, e)[1];
89
+ function T(t, e) {
90
+ const n = g(t, e);
91
+ return b(t, n, e)[1];
117
92
  }
118
- function z(t, e) {
119
- return O(t) && !e ? f() : p(f(), t, e);
93
+ function E(t, e) {
94
+ return m(t) && !e ? s() : h(s(), t, e);
120
95
  }
121
- function p(t, e, n, r) {
122
- if (!t || O(e) && !n)
96
+ function h(t, e, n, r) {
97
+ if (!t || m(e) && !n)
123
98
  return t;
124
- const s = -t.toDate().getTimezoneOffset(), o = O(e) ? n ? w(t.valueOf(), n) : s : e, c = Math.abs(o) <= 16 ? o * 60 : o, i = r ? s - c : c - s, y = n ? w(f(t).valueOf() + i * 60 * 1e3, n) : o, m = i - (o - y), g = r || !O(e) ? i : m;
125
- return f(f(t).valueOf() + g * 60 * 1e3);
99
+ const o = -t.toDate().getTimezoneOffset(), f = m(e) ? n ? T(t.valueOf(), n) : o : e, u = Math.abs(f) <= 16 ? f * 60 : f, a = r ? o - u : u - o, O = n ? T(s(t).valueOf() + a * 60 * 1e3, n) : f, c = a - (f - O), l = r || !m(e) ? a : c;
100
+ return s(s(t).valueOf() + l * 60 * 1e3);
126
101
  }
127
- function V(t, e, n) {
128
- return p(t, e, n, !0);
102
+ function J(t, e, n) {
103
+ return h(t, e, n, !0);
129
104
  }
130
- function tt(t) {
105
+ function K(t) {
131
106
  const e = ["H", "h", "m", "s", "A", "a"];
132
107
  let n = "";
133
108
  return e.some((r) => t.indexOf(r) !== -1 ? (n = `${r}${t.split(` ${r}`)[1]}`, !0) : !1), n || "HH:mm:ss";
134
109
  }
135
- function L(t, e) {
136
- if (l(t))
137
- return f(t.valueOf());
110
+ function U(t, e) {
111
+ if (w(t))
112
+ return s(t.valueOf());
138
113
  if (typeof t == "string") {
139
- const n = f(t, e);
140
- return n.isValid() ? n : f(t, "YYYY-MM-DD");
114
+ const n = s(t, e);
115
+ return n.isValid() ? n : s(t, "YYYY-MM-DD");
141
116
  }
142
- return f(t);
117
+ return s(t);
143
118
  }
144
- function k(t, e, n, r) {
145
- let s = L(t, e);
146
- return (n !== void 0 || r) && (s = p(s, n, r)), s;
119
+ function p(t, e, n, r) {
120
+ let o = U(t, e);
121
+ return (n !== void 0 || r) && (o = h(o, n, r)), o;
147
122
  }
148
- function et(t, e, n, r) {
123
+ function X(t, e, n, r) {
149
124
  if (!t) return;
150
- const s = d(e) ? e : [e];
151
- return d(t) ? t.map((o, c, i) => {
152
- if (o)
153
- return k(o, s[c], n, r);
154
- }) : k(t, s[0], n, r);
125
+ const o = d(e) ? e : [e];
126
+ return d(t) ? t.map((f, u, a) => {
127
+ if (f)
128
+ return p(f, o[u], n, r);
129
+ }) : p(t, o[0], n, r);
155
130
  }
156
- function nt(t, e) {
157
- const n = t.year(), r = t.month(), s = t.date();
131
+ function z(t, e) {
132
+ const n = t.year(), r = t.month(), o = t.date();
158
133
  if (e) {
159
- let o = e;
160
- return o = h.set(o, "year", n), o = h.set(o, "month", r), o = h.set(o, "date", s), o;
134
+ let f = e;
135
+ return f = y.set(f, "year", n), f = y.set(f, "month", r), f = y.set(f, "date", o), f;
161
136
  }
162
137
  return t;
163
138
  }
164
- function rt(t) {
139
+ function V(t) {
165
140
  if (!d(t) || !(t[0] && t[1]) || !(t[0].valueOf() > t[1].valueOf())) return t;
166
141
  const e = [...t];
167
142
  return e.sort((n, r) => n.valueOf() - r.valueOf()), e;
168
143
  }
169
- function ot(t, e) {
170
- return e === void 0 && t === void 0 ? !1 : e && !t || !e && t || f(e).valueOf() !== f(t).valueOf();
144
+ function tt(t, e) {
145
+ return e === void 0 && t === void 0 ? !1 : e && !t || !e && t || s(e).valueOf() !== s(t).valueOf();
171
146
  }
172
- function st(t, e) {
173
- return e === void 0 && t === void 0 ? !1 : e && !t || !e && t || d(e) && d(t) && f(e[0]).valueOf() !== f(t[0]).valueOf() || f(e[1]).valueOf() !== f(t[1]).valueOf();
147
+ function et(t, e) {
148
+ return e === void 0 && t === void 0 ? !1 : e && !t || !e && t || d(e) && d(t) && s(e[0]).valueOf() !== s(t[0]).valueOf() || s(e[1]).valueOf() !== s(t[1]).valueOf();
174
149
  }
175
- function ft(t, e, n) {
176
- return typeof t == "string" && f(t, e).format(d(e) ? e[n] : e) === t;
150
+ function nt(t, e, n) {
151
+ return typeof t == "string" && s(t, e).format(d(e) ? e[n] : e) === t;
177
152
  }
178
153
  export {
179
- f as dayjs,
180
- f as default,
181
- et as getDayjsValue,
182
- z as getNow,
183
- rt as getSortedDayjsArray,
184
- tt as getTimeFormat,
185
- nt as getValueWithTime,
186
- st as isDayjsArrayChange,
187
- ot as isDayjsChange,
188
- ft as isValidTimeString,
189
- h as methods,
190
- w as timezoneToOffset,
191
- V as toLocal,
192
- p as toTimezone
154
+ s as dayjs,
155
+ s as default,
156
+ X as getDayjsValue,
157
+ E as getNow,
158
+ V as getSortedDayjsArray,
159
+ K as getTimeFormat,
160
+ z as getValueWithTime,
161
+ et as isDayjsArrayChange,
162
+ tt as isDayjsChange,
163
+ nt as isValidTimeString,
164
+ y as methods,
165
+ T as timezoneToOffset,
166
+ J as toLocal,
167
+ h as toTimezone
193
168
  };
@@ -1,116 +1,110 @@
1
- import { isPlainObject as l } from "@unicom-cloud/utils/is";
2
- import { isArguments as L, isArray as v, isArrayBuffer as V, isArrayLike as W, isArrayLikeObject as h, isBlob as k, isBoolean as B, isBuffer as j, isColor as I, isColor2 as Y, isDate as q, isElement as z, isEmpty as U, isEmptyArray as H, isEmptyObject as J, isEmptyValue as G, isEqual as K, isEqualWith as Q, isError as X, isFile as Z, isFinite as ii, isFunction as si, isInteger as ri, isJSON as ei, isLength as ti, isMap as oi, isMatch as ai, isMatchWith as ni, isNaN as fi, isNative as ui, isNil as pi, isNull as li, isNumber as ci, isObject as yi, isObjectLike as di, isPlainObject as Ri, isPromise as Ei, isReadableByteStreamControllerSupported as mi, isReadableStream as Si, isReadableStreamDefaultControllerSupported as $i, isReadableStreamSupported as Ci, isReadableStreamSymbolAsyncIteratorSupported as Mi, isRegExp as bi, isSafeInteger as Ai, isSet as Ni, isString as Ti, isSymbol as Fi, isTypedArray as Pi, isUndefined as gi, isValidColor as Oi, isWeakMap as wi, isWeakSet as xi } from "@unicom-cloud/utils/is";
3
- import { isDayjs as c } from "dayjs";
1
+ import { isArguments as x, isArray as w, isArrayBuffer as O, isArrayLike as _, isArrayLikeObject as L, isBlob as v, isBoolean as W, isBuffer as h, isColor as k, isColor2 as B, isDate as D, isElement as V, isEmpty as I, isEmptyArray as Y, isEmptyObject as q, isEmptyValue as z, isEqual as U, isEqualWith as j, isError as J, isFile as G, isFinite as H, isFunction as K, isInteger as Q, isJSON as X, isLength as Z, isMap as ee, isMatch as ie, isMatchWith as re, isNaN as te, isNative as se, isNil as oe, isNull as ae, isNumber as ne, isObject as fe, isObjectLike as pe, isPlainObject as ue, isPromise as le, isReadableByteStreamControllerSupported as ye, isReadableStream as ce, isReadableStreamDefaultControllerSupported as me, isReadableStreamSupported as Re, isReadableStreamSymbolAsyncIteratorSupported as de, isRegExp as Ee, isSafeInteger as Se, isSet as Ce, isString as $e, isSymbol as be, isTypedArray as Ne, isUndefined as Te, isValidColor as Ae, isWeakMap as Fe, isWeakSet as Me } from "@unicom-cloud/utils/is";
2
+ import { isDayjs as ge } from "dayjs";
4
3
  import { isValidElement as o } from "react";
5
4
  import a from "react-dom";
6
- import { isForwardRef as n, ForwardRef as t, Memo as y } from "react-is";
7
- import { isAsyncMode as Di, isConcurrentMode as Li, isContextConsumer as vi, isContextProvider as Vi, isElement as Wi, isForwardRef as hi, isFragment as ki, isLazy as Bi, isMemo as ji, isPortal as Ii, isProfiler as Yi, isStrictMode as qi, isSuspense as zi, isValidElementType as Ui } from "react-is";
8
- function T(i) {
9
- return i == null;
5
+ import { isForwardRef as n, ForwardRef as s, Memo as l } from "react-is";
6
+ import { isContextConsumer as we, isContextProvider as Oe, isElement as _e, isForwardRef as Le, isFragment as ve, isLazy as We, isMemo as he, isPortal as ke, isProfiler as Be, isStrictMode as De, isSuspense as Ve, isValidElementType as Ie } from "react-is";
7
+ function b(e) {
8
+ return e == null;
10
9
  }
11
- function F(i, s) {
12
- return i == null || i === !1 || typeof i == "string" && (s ? i.trim() === "" : i === "");
10
+ function N(e, i) {
11
+ return e == null || e === !1 || typeof e == "string" && (i ? e.trim() === "" : e === "");
13
12
  }
14
- function P(i) {
15
- return i || i === 0;
13
+ function T(e) {
14
+ return e || e === 0;
16
15
  }
17
- function g(i) {
18
- return i === window;
16
+ function A(e) {
17
+ return e === window;
19
18
  }
20
- function O(i) {
21
- return i && c(i) && typeof i.isValid == "function" && i.isValid() && l(i) && "$y" in i && "$M" in i && "$D" in i && "$d" in i && "$H" in i && "$m" in i && "$s" in i;
22
- }
23
- const f = (i) => i && o(i) && typeof i.type == "function", d = (i) => f(i) && !!i.type.prototype?.isReactComponent, R = (i) => o(i) && typeof i.type == "string", w = Number(a.version?.split(".")[0]) > 17, E = Number(a.version?.split(".")[0]) > 18, m = (i) => {
24
- if (!E)
25
- return n(i);
26
- const s = Symbol.for("react.element"), u = Symbol.for("react.transitional.element"), p = Symbol.for("react.forward_ref");
27
- if (typeof i == "object" && i !== null) {
28
- const r = i.$$typeof;
29
- if (r === s || r === u) {
30
- const e = i.type;
31
- return (e && e.$$typeof) === p;
19
+ const f = (e) => e && o(e) && typeof e.type == "function", y = (e) => f(e) && !!e.type.prototype?.isReactComponent, c = (e) => o(e) && typeof e.type == "string", F = Number(a.version?.split(".")[0]) > 17, m = Number(a.version?.split(".")[0]) > 18, R = (e) => {
20
+ if (!m)
21
+ return n(e);
22
+ const i = Symbol.for("react.element"), p = Symbol.for("react.transitional.element"), u = Symbol.for("react.forward_ref");
23
+ if (typeof e == "object" && e !== null) {
24
+ const r = e.$$typeof;
25
+ if (r === i || r === p) {
26
+ const t = e.type;
27
+ return (t && t.$$typeof) === u;
32
28
  }
33
29
  }
34
30
  return !1;
35
- }, S = (i) => i ? R(i) || m(i) || n(i) || i.$$typeof === t ? !0 : i.$$typeof === y ? i.type?.$$typeof === t : f(i) ? d(i) : !1 : !1, x = S;
31
+ }, d = (e) => e ? c(e) || R(e) || n(e) || e.$$typeof === s ? !0 : e.$$typeof === l ? e.type?.$$typeof === s : f(e) ? y(e) : !1 : !1, M = d;
36
32
  export {
37
- L as isArguments,
38
- v as isArray,
39
- V as isArrayBuffer,
40
- W as isArrayLike,
41
- h as isArrayLikeObject,
42
- k as isBlob,
43
- B as isBoolean,
44
- j as isBuffer,
45
- d as isClassComponent,
46
- I as isColor,
47
- Y as isColor2,
48
- R as isDOMElement,
49
- q as isDate,
50
- O as isDayjs,
51
- z as isElement,
52
- U as isEmpty,
53
- H as isEmptyArray,
54
- J as isEmptyObject,
55
- F as isEmptyReactNode,
56
- G as isEmptyValue,
57
- K as isEqual,
58
- Q as isEqualWith,
59
- X as isError,
60
- P as isExist,
61
- Z as isFile,
62
- ii as isFinite,
63
- m as isForwardRefReact,
64
- si as isFunction,
65
- ri as isInteger,
66
- ei as isJSON,
67
- ti as isLength,
68
- oi as isMap,
69
- ai as isMatch,
70
- ni as isMatchWith,
71
- fi as isNaN,
72
- ui as isNative,
73
- pi as isNil,
74
- li as isNull,
75
- T as isNullOrUndefined,
76
- ci as isNumber,
77
- yi as isObject,
78
- di as isObjectLike,
79
- Ri as isPlainObject,
80
- Ei as isPromise,
81
- w as isReact18,
82
- E as isReact19,
83
- Di as isReactAsyncMode,
33
+ x as isArguments,
34
+ w as isArray,
35
+ O as isArrayBuffer,
36
+ _ as isArrayLike,
37
+ L as isArrayLikeObject,
38
+ v as isBlob,
39
+ W as isBoolean,
40
+ h as isBuffer,
41
+ y as isClassComponent,
42
+ k as isColor,
43
+ B as isColor2,
44
+ c as isDOMElement,
45
+ D as isDate,
46
+ ge as isDayjs,
47
+ V as isElement,
48
+ I as isEmpty,
49
+ Y as isEmptyArray,
50
+ q as isEmptyObject,
51
+ N as isEmptyReactNode,
52
+ z as isEmptyValue,
53
+ U as isEqual,
54
+ j as isEqualWith,
55
+ J as isError,
56
+ T as isExist,
57
+ G as isFile,
58
+ H as isFinite,
59
+ R as isForwardRefReact,
60
+ K as isFunction,
61
+ Q as isInteger,
62
+ X as isJSON,
63
+ Z as isLength,
64
+ ee as isMap,
65
+ ie as isMatch,
66
+ re as isMatchWith,
67
+ te as isNaN,
68
+ se as isNative,
69
+ oe as isNil,
70
+ ae as isNull,
71
+ b as isNullOrUndefined,
72
+ ne as isNumber,
73
+ fe as isObject,
74
+ pe as isObjectLike,
75
+ ue as isPlainObject,
76
+ le as isPromise,
77
+ F as isReact18,
78
+ m as isReact19,
84
79
  f as isReactComponent,
85
- Li as isReactConcurrentMode,
86
- vi as isReactContextConsumer,
87
- Vi as isReactContextProvider,
88
- Wi as isReactElement,
89
- hi as isReactForwardRef,
90
- ki as isReactFragment,
91
- Bi as isReactLazy,
92
- ji as isReactMemo,
93
- Ii as isReactPortal,
94
- Yi as isReactProfiler,
95
- qi as isReactStrictMode,
96
- zi as isReactSuspense,
97
- Ui as isReactValidElementType,
98
- mi as isReadableByteStreamControllerSupported,
99
- Si as isReadableStream,
100
- $i as isReadableStreamDefaultControllerSupported,
101
- Ci as isReadableStreamSupported,
102
- Mi as isReadableStreamSymbolAsyncIteratorSupported,
103
- bi as isRegExp,
104
- Ai as isSafeInteger,
105
- Ni as isSet,
106
- Ti as isString,
107
- x as isSupportRef,
108
- Fi as isSymbol,
109
- Pi as isTypedArray,
110
- gi as isUndefined,
111
- Oi as isValidColor,
112
- wi as isWeakMap,
113
- xi as isWeakSet,
114
- g as isWindow,
115
- S as supportRef
80
+ we as isReactContextConsumer,
81
+ Oe as isReactContextProvider,
82
+ _e as isReactElement,
83
+ Le as isReactForwardRef,
84
+ ve as isReactFragment,
85
+ We as isReactLazy,
86
+ he as isReactMemo,
87
+ ke as isReactPortal,
88
+ Be as isReactProfiler,
89
+ De as isReactStrictMode,
90
+ Ve as isReactSuspense,
91
+ Ie as isReactValidElementType,
92
+ ye as isReadableByteStreamControllerSupported,
93
+ ce as isReadableStream,
94
+ me as isReadableStreamDefaultControllerSupported,
95
+ Re as isReadableStreamSupported,
96
+ de as isReadableStreamSymbolAsyncIteratorSupported,
97
+ Ee as isRegExp,
98
+ Se as isSafeInteger,
99
+ Ce as isSet,
100
+ $e as isString,
101
+ M as isSupportRef,
102
+ be as isSymbol,
103
+ Ne as isTypedArray,
104
+ Te as isUndefined,
105
+ Ae as isValidColor,
106
+ Fe as isWeakMap,
107
+ Me as isWeakSet,
108
+ A as isWindow,
109
+ d as supportRef
116
110
  };
@@ -0,0 +1,12 @@
1
+ import { UI_PC_PREFIX as i } from "@unicom-cloud/utils/constant/ui.js";
2
+ import s from "lodash/isPlainObject";
3
+ import { CSS_VARIABLE_ELEMENT as o } from "./constant.js";
4
+ function n(r) {
5
+ if (!s(r)) return;
6
+ const { prefix: l = i, dir: e = "ltr" } = r, t = o;
7
+ t.setAttribute("dir", e), t.classList.remove("ltr"), t.classList.remove("rtl"), t.classList.add(e);
8
+ }
9
+ export {
10
+ n as default,
11
+ n as setDir
12
+ };
@@ -1,10 +1,10 @@
1
- import { UI_PC_PREFIX as f } from "@unicom-cloud/utils/constant/ui.js";
2
- import n from "@unicom-cloud/utils/tinycolor";
3
- import $ from "lodash/isPlainObject";
1
+ import { UI_PC_PREFIX as $ } from "@unicom-cloud/utils/constant/ui.js";
2
+ import a from "@unicom-cloud/utils/tinycolor";
3
+ import m from "lodash/isPlainObject";
4
4
  import { CSS_VARIABLE_ELEMENT as p } from "./constant.js";
5
- function P(s) {
6
- if (!$(s)) return;
7
- const { prefix: e = f, ...i } = s, c = {
5
+ function b(s) {
6
+ if (!m(s)) return;
7
+ const { prefix: e = $, element: f, ...i } = s, c = {
8
8
  primary: {
9
9
  default: `--${e}-primary-6`,
10
10
  hover: `--${e}-primary-5`,
@@ -36,19 +36,19 @@ function P(s) {
36
36
  active: `--${e}-red-7`
37
37
  }
38
38
  };
39
- Object.entries(c).forEach(([o, r], m, h) => {
39
+ Object.entries(c).forEach(([o, r], h, d) => {
40
40
  c[`${o}Color`] = r;
41
41
  const l = i[o];
42
42
  if (!l) return;
43
- const a = new n(l), t = p;
44
- t.style.setProperty(r.default, a.toRgbArrayString());
43
+ const n = new a(l), t = f || p;
44
+ t.style.setProperty(r.default, n.toRgbArrayString());
45
45
  const y = i[`${o}Hover`];
46
- y ? t.style.setProperty(r.hover, new n(y).toRgbArrayString()) : t.style.setProperty(r.hover, a.lighten(10).toRgbArrayString());
46
+ y ? t.style.setProperty(r.hover, new a(y).toRgbArrayString()) : t.style.setProperty(r.hover, n.lighten(7).toRgbArrayString());
47
47
  const g = i[`${o}Active`];
48
- g ? t.style.setProperty(r.active, new n(g).toRgbArrayString()) : t.style.setProperty(r.active, a.lighten(-10).toRgbArrayString());
48
+ g ? t.style.setProperty(r.active, new a(g).toRgbArrayString()) : t.style.setProperty(r.active, n.lighten(-7).toRgbArrayString());
49
49
  });
50
50
  }
51
51
  export {
52
- P as default,
53
- P as setTheme
52
+ b as default,
53
+ b as setTheme
54
54
  };