@unicom-cloud/ui 0.8.94 → 0.8.95

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 (49) hide show
  1. package/Message.js +1 -1
  2. package/Notification.js +1 -1
  3. package/Switch.js +1 -1
  4. package/Tooltip.js +1 -1
  5. package/Trigger.js +1 -1
  6. package/back-top/index.js +8 -8
  7. package/badge/index.js +11 -11
  8. package/cascader/panel/List.js +1 -1
  9. package/collapse/Item.js +1 -1
  10. package/color-picker/InputHex.js +1 -1
  11. package/color-picker/InputRgb.js +1 -1
  12. package/color-picker/Palette.js +1 -1
  13. package/color-picker/Panel.js +1 -1
  14. package/color-picker/colors.js +1 -1
  15. package/color-picker/hooks/useColorPicker.js +1 -1
  16. package/color-picker/utils.js +1 -1
  17. package/components/common/empty/index.js +33 -13
  18. package/components/common/space/index.js +4 -3
  19. package/components/common/utils/PqbCSSTransition.js +1 -1
  20. package/components/common/utils/setPrimaryColor.js +21 -21
  21. package/components/common/utils/setTheme.js +23 -23
  22. package/dist/react-transition-group/src/CSSTransition.js +1 -1
  23. package/dist/react-transition-group/src/SwitchTransition.js +1 -1
  24. package/dist/tinycolor/chunk/{DGZSWe7E.js → BOzCVdr0.js} +43 -43
  25. package/dist/tinycolor/customize/index.js +1 -1
  26. package/dist/tween/src/tween.js +25 -24
  27. package/index.js +2 -2
  28. package/input-tag/InputTag.js +1 -1
  29. package/message/index.js +1 -1
  30. package/notification/index.js +1 -1
  31. package/package.json +1 -1
  32. package/statistic/index.js +16 -16
  33. package/style.css +1 -1
  34. package/switch/index.js +1 -1
  35. package/table/Table.js +153 -153
  36. package/tag/index.js +24 -24
  37. package/time-picker/util.js +4 -4
  38. package/tooltip/index.js +1 -1
  39. package/trigger/index.js +1 -1
  40. package/types/pc/badge/interface.d.ts +1 -1
  41. package/types/pc/menu/context.d.ts +1 -1
  42. package/typography/Ellipsis.js +6 -5
  43. package/upload/list/index.js +1 -1
  44. package/utils/color.js +1 -1
  45. package/utils/index.js +2 -2
  46. package/utils/reactTransitionGroup.js +1 -1
  47. package/utils/tinycolor.js +1 -1
  48. package/version/index.js +1 -1
  49. /package/dist/react-transition-group/chunk/{CPfP7aNL.js → C6QwjD4L.js} +0 -0
@@ -2,13 +2,13 @@ import { TinyColor as e } from "../src/index.js";
2
2
  const o = 10, k = {
3
3
  name: { zh: "浪漫红", en: "red" },
4
4
  value: "#F53F3F"
5
- }, b = {
5
+ }, f = {
6
6
  name: { zh: "晚秋红", en: "orangered" },
7
7
  value: "#FF702E"
8
- }, f = {
8
+ }, C = {
9
9
  name: { zh: "活力橙", en: "orange" },
10
10
  value: "#FFA500"
11
- }, C = {
11
+ }, b = {
12
12
  name: { zh: "黄昏", en: "gold" },
13
13
  value: "#FFBD14"
14
14
  }, _ = {
@@ -17,25 +17,25 @@ const o = 10, k = {
17
17
  }, j = {
18
18
  name: { zh: "新生绿", en: "lime" },
19
19
  value: "#A1E619"
20
- }, q = {
20
+ }, P = {
21
21
  name: { zh: "仙野绿", en: "green" },
22
22
  value: "#00B82B"
23
- }, P = {
23
+ }, T = {
24
24
  name: { zh: "碧涛青", en: "cyan" },
25
25
  value: "#0BD0D0"
26
- }, T = {
26
+ }, H = {
27
27
  name: { zh: "海蔚蓝", en: "blue" },
28
28
  value: "#2E8FFF"
29
- }, H = {
30
- name: { zh: "极致蓝", en: "pqbblue" },
31
- value: "#1A5EFF"
32
29
  }, L = {
30
+ name: { zh: "主题色(极致蓝)", en: "primary" },
31
+ value: "#1A5EFF"
32
+ }, M = {
33
33
  name: { zh: "暗夜紫", en: "purple" },
34
34
  value: "#7126D9"
35
- }, M = {
35
+ }, O = {
36
36
  name: { zh: "青春紫", en: "pinkpurple" },
37
37
  value: "#D91AD9"
38
- }, O = {
38
+ }, S = {
39
39
  name: { zh: "品红", en: "magenta" },
40
40
  value: "#FF299F"
41
41
  }, t = {
@@ -43,21 +43,21 @@ const o = 10, k = {
43
43
  value: "#6B6C6D"
44
44
  }, i = [
45
45
  k,
46
- b,
47
46
  f,
48
47
  C,
48
+ b,
49
49
  _,
50
50
  j,
51
- q,
52
51
  P,
53
52
  T,
54
53
  H,
55
54
  L,
56
55
  M,
57
- O
56
+ O,
57
+ S
58
58
  ];
59
59
  var A, B;
60
- const S = {
60
+ const q = {
61
61
  key: ((A = t.name) == null ? void 0 : A.en) ?? ((B = t.name) == null ? void 0 : B.zh) ?? t.name,
62
62
  name: t.name,
63
63
  primary: t.value,
@@ -94,17 +94,17 @@ const S = {
94
94
  light: G({ color: u, length: o }),
95
95
  dark: N({ color: u, length: o })
96
96
  };
97
- }).concat([S]);
97
+ }).concat([q]);
98
98
  function p(n = {}) {
99
99
  const { length: s, color: F, level: r } = n, a = (s ?? o) / 2 + 1, u = r ?? a;
100
100
  let m = new e(F);
101
- const g = m.toHsv(), E = g.h, l = g.s, c = g.v, d = E === 0 && l === 0, y = u < a, h = Math.abs(a - u), I = 1, z = 0.1;
101
+ const g = m.toHsv(), y = g.h, l = g.s, c = g.v, E = y === 0 && l === 0, d = u < a, h = Math.abs(a - u), I = 1, z = 0.1;
102
102
  let v = l;
103
- v > z && (y ? v = l - (l - z) / (a - 1) * h : v = l + (I - l) / (a - 1) * h), d && (v = l);
104
- const J = d ? 0.97 : 1, D = 0.1;
103
+ v > z && (d ? v = l - (l - z) / (a - 1) * h : v = l + (I - l) / (a - 1) * h), E && (v = l);
104
+ const J = E ? 0.97 : 1, D = 0.1;
105
105
  let w = c;
106
- return w > D && (y ? w = c + (J - c) / (a - 1) * h : w = c - (c - D) / (a - 1) * h), m = new e({
107
- h: E,
106
+ return w > D && (d ? w = c + (J - c) / (a - 1) * h : w = c - (c - D) / (a - 1) * h), m = new e({
107
+ h: y,
108
108
  s: v,
109
109
  v: w
110
110
  }), n.dark && (m = m.darken(n.amount ?? 10)), m;
@@ -132,51 +132,51 @@ function N(n = {}) {
132
132
  const Q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
133
133
  __proto__: null,
134
134
  LENGTH: o,
135
- blue: T,
135
+ blue: H,
136
136
  colorPresets: K,
137
137
  colors: i,
138
- cyan: P,
138
+ cyan: T,
139
139
  default: i,
140
140
  generate: G,
141
141
  generateDark: N,
142
- gold: C,
142
+ gold: b,
143
143
  gray: t,
144
- grayPresets: S,
145
- green: q,
144
+ grayPresets: q,
145
+ green: P,
146
146
  lime: j,
147
- magenta: O,
148
- orange: f,
149
- orangered: b,
147
+ magenta: S,
148
+ orange: C,
149
+ orangered: f,
150
150
  palette: p,
151
151
  paletteDark: x,
152
- pinkpurple: M,
153
- pqbblue: H,
154
- purple: L,
152
+ pinkpurple: O,
153
+ primary: L,
154
+ purple: M,
155
155
  red: k,
156
156
  yellow: _
157
157
  }, Symbol.toStringTag, { value: "Module" }));
158
158
  export {
159
159
  o as L,
160
160
  Q as a,
161
- T as b,
161
+ H as b,
162
162
  i as c,
163
163
  K as d,
164
- P as e,
164
+ T as e,
165
165
  N as f,
166
166
  G as g,
167
- C as h,
167
+ b as h,
168
168
  t as i,
169
- S as j,
170
- q as k,
169
+ q as j,
170
+ P as k,
171
171
  j as l,
172
- O as m,
173
- b as n,
174
- f as o,
172
+ S as m,
173
+ f as n,
174
+ C as o,
175
175
  p,
176
176
  x as q,
177
- M as r,
178
- H as s,
179
- L as t,
177
+ O as r,
178
+ L as s,
179
+ M as t,
180
180
  k as u,
181
181
  _ as y
182
182
  };
@@ -1,4 +1,4 @@
1
- import { c as f, a as h } from "../chunk/DGZSWe7E.js";
1
+ import { c as f, a as h } from "../chunk/BOzCVdr0.js";
2
2
  function p(c = [34797, 15747172]) {
3
3
  return (a = 1) => {
4
4
  const o = c, r = Math.log(256) / Math.log(2), l = o[0] >>> r * 2 & 255, s = o[0] >>> r * 1 & 255, g = o[0] >>> r * 0 & 255, t = o[1] >>> r * 2 & 255, e = o[1] >>> r * 1 & 255, n = o[1] >>> r * 0 & 255, u = t - (t - l) * a, i = e - (e - s) * a, m = n - (n - g) * a;
@@ -1,7 +1,8 @@
1
- import { isFunction as l, isString as m } from "@unicom-cloud/utils/is";
1
+ import l from "lodash/isFunction";
2
+ import m from "lodash/isString";
2
3
  import a from "./easing.js";
3
- import { bounceIn as y, bounceInOut as g, bounceOut as F, cubicIn as b, cubicInOut as k, cubicOut as T, linear as w, quadIn as S, quadInOut as v, quadOut as x, quartIn as A, quartInOut as D, quartOut as U, quintIn as j, quintInOut as z, quintOut as B, sineIn as C, sineInOut as E, sineOut as G } from "./easing.js";
4
- class I {
4
+ import { bounceIn as g, bounceInOut as F, bounceOut as b, cubicIn as k, cubicInOut as T, cubicOut as w, linear as S, quadIn as v, quadInOut as x, quadOut as A, quartIn as D, quartInOut as U, quartOut as j, quintIn as z, quintInOut as B, quintOut as C, sineIn as E, sineInOut as G, sineOut as H } from "./easing.js";
5
+ class O {
5
6
  constructor(s) {
6
7
  const {
7
8
  from: i,
@@ -45,26 +46,26 @@ class I {
45
46
  }
46
47
  }
47
48
  export {
48
- I as Tween,
49
- y as bounceIn,
50
- g as bounceInOut,
51
- F as bounceOut,
52
- b as cubicIn,
53
- k as cubicInOut,
54
- T as cubicOut,
55
- I as default,
49
+ O as Tween,
50
+ g as bounceIn,
51
+ F as bounceInOut,
52
+ b as bounceOut,
53
+ k as cubicIn,
54
+ T as cubicInOut,
55
+ w as cubicOut,
56
+ O as default,
56
57
  a as easing,
57
- w as linear,
58
- S as quadIn,
59
- v as quadInOut,
60
- x as quadOut,
61
- A as quartIn,
62
- D as quartInOut,
63
- U as quartOut,
64
- j as quintIn,
65
- z as quintInOut,
66
- B as quintOut,
67
- C as sineIn,
68
- E as sineInOut,
69
- G as sineOut
58
+ S as linear,
59
+ v as quadIn,
60
+ x as quadInOut,
61
+ A as quadOut,
62
+ D as quartIn,
63
+ U as quartInOut,
64
+ j as quartOut,
65
+ z as quintIn,
66
+ B as quintInOut,
67
+ C as quintOut,
68
+ E as sineIn,
69
+ G as sineInOut,
70
+ H as sineOut
70
71
  };
package/index.js CHANGED
@@ -34,7 +34,7 @@ import { names as De } from "./dist/tinycolor/src/css-color-names.js";
34
34
  import { inputToRGB as Ee, isValidCSSUnit as ve, stringInputToObject as Me } from "./dist/tinycolor/src/format-input.js";
35
35
  import { compareColorByRange as Oe } from "./dist/tinycolor/customize/index.js";
36
36
  import { TinyColor as Le } from "./dist/tinycolor/src/index.js";
37
- import { a as we } from "./dist/tinycolor/chunk/DGZSWe7E.js";
37
+ import { a as we } from "./dist/tinycolor/chunk/BOzCVdr0.js";
38
38
  import { compute as Ge, compute as _e } from "./dist/compute-scroll-into-view/src/index.js";
39
39
  import { newArray as He, pickTriggerPropsFromRest as We } from "./utils/constant.js";
40
40
  import { ContextHolderElement as ze } from "./utils/contextHolder.js";
@@ -76,7 +76,7 @@ import { callbackOriginRef as No, findDOMNode_ as Lo } from "./components/common
76
76
  import { default as wo } from "./dist/react-transition-group/src/CSSTransition.js";
77
77
  import { default as Go } from "./dist/react-transition-group/src/ReplaceTransition.js";
78
78
  import { default as Uo } from "./dist/react-transition-group/src/SwitchTransition.js";
79
- import { T as Wo } from "./dist/react-transition-group/chunk/CPfP7aNL.js";
79
+ import { T as Wo } from "./dist/react-transition-group/chunk/C6QwjD4L.js";
80
80
  import { default as zo, default as qo } from "./dist/react-transition-group/src/TransitionGroup.js";
81
81
  import { responsiveArray as Ko, responsiveMap as Jo, responsiveObserve as Qo } from "./utils/responsiveObserve.js";
82
82
  import { default as Zo } from "@unicom-cloud/utils/file/saveAs";
@@ -3,7 +3,7 @@ import Ge from "@unicom-cloud/icons/IconUiClose";
3
3
  import "../dist/react-transition-group/src/CSSTransition.js";
4
4
  import "../dist/react-transition-group/src/ReplaceTransition.js";
5
5
  import "../dist/react-transition-group/src/SwitchTransition.js";
6
- import "../dist/react-transition-group/chunk/CPfP7aNL.js";
6
+ import "../dist/react-transition-group/chunk/C6QwjD4L.js";
7
7
  import Ke from "../dist/react-transition-group/src/TransitionGroup.js";
8
8
  import Te from "lodash/isArray";
9
9
  import Ce, { useContext as qe, useRef as C, useState as Xe, useImperativeHandle as Ye, useMemo as Je, useEffect as Qe } from "react";
package/message/index.js CHANGED
@@ -2,7 +2,7 @@ import { jsx as u } from "react/jsx-runtime";
2
2
  import "../dist/react-transition-group/src/CSSTransition.js";
3
3
  import "../dist/react-transition-group/src/ReplaceTransition.js";
4
4
  import "../dist/react-transition-group/src/SwitchTransition.js";
5
- import "../dist/react-transition-group/chunk/CPfP7aNL.js";
5
+ import "../dist/react-transition-group/chunk/C6QwjD4L.js";
6
6
  import O from "../dist/react-transition-group/src/TransitionGroup.js";
7
7
  import C from "lodash/isNumber";
8
8
  import y from "lodash/isUndefined";
@@ -2,7 +2,7 @@ import { jsx as s } from "react/jsx-runtime";
2
2
  import "../dist/react-transition-group/src/CSSTransition.js";
3
3
  import "../dist/react-transition-group/src/ReplaceTransition.js";
4
4
  import "../dist/react-transition-group/src/SwitchTransition.js";
5
- import "../dist/react-transition-group/chunk/CPfP7aNL.js";
5
+ import "../dist/react-transition-group/chunk/C6QwjD4L.js";
6
6
  import L from "../dist/react-transition-group/src/TransitionGroup.js";
7
7
  import b from "lodash/isNumber";
8
8
  import y from "lodash/isUndefined";
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@unicom-cloud/ui","version":"0.8.94","dependencies":{"@unicom-cloud/icons":"latest"},"peerDependencies":{"dayjs":"^1.11.10","lodash":"^4.17.21","react":"^18.3.1","react-dom":"^18.3.1"},"peerDependenciesMeta":{},"type":"module","types":"types/pc/index.d.ts","main":"./index.js","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
1
+ {"name":"@unicom-cloud/ui","version":"0.8.95","dependencies":{"@unicom-cloud/icons":"latest"},"peerDependencies":{"dayjs":"^1.11.10","lodash":"^4.17.21","react":"^18.3.1","react-dom":"^18.3.1"},"peerDependenciesMeta":{},"type":"module","types":"types/pc/index.d.ts","main":"./index.js","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
@@ -4,7 +4,7 @@ import { quartOut as W } from "../dist/tween/src/easing.js";
4
4
  import z from "dayjs";
5
5
  import A from "lodash/isFunction";
6
6
  import c from "lodash/isNumber";
7
- import { forwardRef as B, useContext as G, useRef as C, useState as J, useEffect as K, useImperativeHandle as Q, useMemo as X } from "react";
7
+ import { forwardRef as B, useContext as G, useRef as y, useState as J, useEffect as K, useImperativeHandle as Q, useMemo as X } from "react";
8
8
  import "../config-provider/ConfigProvider.js";
9
9
  import Y from "../components/common/hooks/useMergeProps.js";
10
10
  import Z from "../skeleton/index.js";
@@ -31,11 +31,11 @@ function nt(R, U) {
31
31
  suffix: u,
32
32
  format: f,
33
33
  renderFormat: F,
34
- styleValue: O,
35
- styleDecimal: P,
36
- loading: _,
37
- ...k
38
- } = t, i = C(), g = C(), [e, v] = J(
34
+ styleValue: I,
35
+ styleDecimal: O,
36
+ loading: P,
37
+ ..._
38
+ } = t, i = y(), g = y(), [e, v] = J(
39
39
  "value" in t ? t.value : void 0
40
40
  ), r = m == null ? void 0 : m("statistic"), N = (n = t.countFrom, o = t.value) => {
41
41
  const { countDuration: h } = t;
@@ -48,8 +48,8 @@ function nt(R, U) {
48
48
  },
49
49
  duration: h,
50
50
  easing: W,
51
- onUpdate: (I) => {
52
- v(I.value.toFixed(s));
51
+ onUpdate: (H) => {
52
+ v(H.value.toFixed(s));
53
53
  },
54
54
  onFinish: () => {
55
55
  v(o);
@@ -62,7 +62,7 @@ function nt(R, U) {
62
62
  countUp: N,
63
63
  getRootDOMNode: () => g.current
64
64
  }));
65
- const { int: E, decimal: x } = X(() => {
65
+ const { int: k, decimal: x } = X(() => {
66
66
  let n = e;
67
67
  f && (n = z(e).format(f)), c(s) && s >= 0 && (n = Number(e).toFixed(s));
68
68
  let o = String(n).split(".")[0];
@@ -71,16 +71,16 @@ function nt(R, U) {
71
71
  int: o,
72
72
  decimal: h
73
73
  };
74
- }, [f, w, s, e]), H = A(F) ? F : (n, o) => o, b = c(Number(e)), y = /* @__PURE__ */ l(L, { children: [
74
+ }, [f, w, s, e]), E = A(F) ? F : (n, o) => o, b = c(Number(e)), C = /* @__PURE__ */ l(L, { children: [
75
75
  p != null ? /* @__PURE__ */ a("span", { className: `${r}-value-prefix`, children: p }) : null,
76
- H(e, b ? E : e)
76
+ E(e, b ? k : e)
77
77
  ] });
78
78
  return /* @__PURE__ */ l(
79
79
  "div",
80
80
  {
81
81
  className: tt(`${r}`, { [`${r}-rtl`]: j }, M),
82
82
  style: q,
83
- ...et(k, ["value", "countUp", "countFrom", "countDuration"]),
83
+ ...et(_, ["value", "countUp", "countFrom", "countDuration"]),
84
84
  ref: g,
85
85
  children: [
86
86
  S && /* @__PURE__ */ a("div", { className: `${r}-title`, children: S }),
@@ -89,15 +89,15 @@ function nt(R, U) {
89
89
  Z,
90
90
  {
91
91
  animation: !0,
92
- loading: !!_,
92
+ loading: !!P,
93
93
  text: { rows: 1, width: "100%" },
94
- children: /* @__PURE__ */ l("div", { className: `${r}-value`, style: O, children: [
95
- b ? /* @__PURE__ */ a("span", { className: `${r}-value-int`, children: y }) : y,
94
+ children: /* @__PURE__ */ l("div", { className: `${r}-value`, style: I, children: [
95
+ b ? /* @__PURE__ */ a("span", { className: `${r}-value-int`, children: C }) : C,
96
96
  x !== void 0 || u ? /* @__PURE__ */ l(
97
97
  "span",
98
98
  {
99
99
  className: `${r}-value-decimal`,
100
- style: P,
100
+ style: O,
101
101
  children: [
102
102
  c(Number(e)) && x !== void 0 && `.${x}`,
103
103
  u != null ? /* @__PURE__ */ a("span", { className: `${r}-value-suffix`, children: u }) : null