@unicom-cloud/ui 0.8.102 → 0.8.104

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 (48) hide show
  1. package/Copy.js +1 -1
  2. package/LiquidFill.js +1 -1
  3. package/Marquee.js +2 -2
  4. package/QrCode.js +1 -1
  5. package/Spin.js +6 -3
  6. package/Tour.js +1 -1
  7. package/badge/Count.js +12 -12
  8. package/badge/index.js +35 -35
  9. package/components/common/space/index.js +24 -24
  10. package/copy/index.js +1 -1
  11. package/divider/index.js +45 -31
  12. package/grid/Col.js +32 -32
  13. package/grid/Row.js +53 -44
  14. package/liquid-fill/index.js +1 -1
  15. package/liquid-fill/interface.js +1 -0
  16. package/marquee/index.js +143 -221
  17. package/marquee/interface.js +1 -0
  18. package/marquee-/index.js +260 -0
  19. package/marquee-/interface.js +1 -0
  20. package/package.json +1 -1
  21. package/qr-code/index.js +1 -1
  22. package/spin/DotLoading.js +3 -3
  23. package/spin/index.js +70 -57
  24. package/style.css +1 -1
  25. package/table/hook/useThResizable.js +1 -1
  26. package/table/th-resizable/index.js +1 -1
  27. package/tour/index.js +1 -1
  28. package/tour/interface.js +1 -0
  29. package/types/pc/config-provider/interface.d.ts +8 -8
  30. package/types/pc/divider/interface.d.ts +9 -1
  31. package/types/pc/grid/Row.d.ts +2 -1
  32. package/types/pc/index.d.ts +4 -4
  33. package/types/pc/liquid-fill/index.d.ts +2 -113
  34. package/types/pc/liquid-fill/interface.d.ts +113 -0
  35. package/types/pc/marquee/index.d.ts +3 -60
  36. package/types/pc/marquee/interface.d.ts +95 -0
  37. package/types/pc/marquee-/index.d.ts +8 -0
  38. package/types/pc/marquee-/interface.d.ts +56 -0
  39. package/types/pc/qr-code/index.d.ts +1 -31
  40. package/types/pc/qr-code/interface.d.ts +26 -33
  41. package/types/pc/spin/interface.d.ts +2 -3
  42. package/types/pc/tour/index.d.ts +2 -45
  43. package/types/pc/tour/interface.d.ts +46 -0
  44. package/types/pc/utils/responsiveObserve.d.ts +8 -4
  45. package/typography/Ellipsis.js +1 -1
  46. package/typography/Operations.js +1 -1
  47. package/utils/responsiveObserve.js +32 -25
  48. package/version/index.js +1 -1
package/grid/Col.js CHANGED
@@ -1,8 +1,8 @@
1
- import { jsx as U } from "react/jsx-runtime";
2
- import W from "lodash/isNil";
1
+ import { jsx as W } from "react/jsx-runtime";
2
+ import X from "lodash/isNil";
3
3
  import M from "lodash/isNumber";
4
4
  import B from "lodash/isPlainObject";
5
- import { forwardRef as X, useContext as F, useState as Y, useMemo as b, useEffect as Z } from "react";
5
+ import { forwardRef as Y, useContext as F, useState as Z, useMemo as b, useEffect as _ } from "react";
6
6
  import "../config-provider/ConfigProvider.js";
7
7
  import ee from "../components/common/hooks/useMergeProps.js";
8
8
  import te from "@unicom-cloud/utils/class-name";
@@ -23,23 +23,23 @@ const ie = (i, E) => {
23
23
  I?.["Grid.Col"]
24
24
  ), { gutter: C, div: o } = F(re), {
25
25
  className: V,
26
- style: _,
27
- children: q,
26
+ style: q,
27
+ children: D,
28
28
  span: g = 24,
29
- offset: p,
29
+ offset: c,
30
30
  order: u,
31
31
  pull: m,
32
32
  push: $,
33
33
  xs: v,
34
- sm: k,
35
- md: P,
34
+ sm: P,
35
+ md: k,
36
36
  lg: R,
37
37
  xl: S,
38
38
  xxl: w,
39
39
  xxxl: O,
40
40
  flex: j,
41
- ...D
42
- } = T, f = !W(j), s = G?.("col"), [A, H] = Y({
41
+ ...H
42
+ } = T, f = !X(j), s = G?.("col"), [A, J] = Z({
43
43
  xs: !1,
44
44
  sm: !1,
45
45
  md: !1,
@@ -47,14 +47,14 @@ const ie = (i, E) => {
47
47
  xl: !1,
48
48
  xxl: !1,
49
49
  xxxl: !1
50
- }), l = b(() => ({ xs: v, sm: k, md: P, lg: R, xl: S, xxl: w, xxxl: O }), [R, P, k, S, v, w, O]), J = b(() => {
50
+ }), l = b(() => ({ xs: v, sm: P, md: k, lg: R, xl: S, xxl: w, xxxl: O }), [R, k, P, S, v, w, O]), K = b(() => {
51
51
  if (f)
52
52
  return;
53
53
  const e = {
54
54
  [`${s}`]: !o,
55
55
  [`${s}-order-${u}`]: u,
56
56
  [`${s}-${g}`]: !o && Object.values(l).every((r) => !r),
57
- [`${s}-offset-${p}`]: p,
57
+ [`${s}-offset-${c}`]: c,
58
58
  [`${s}-pull-${m}`]: m,
59
59
  [`${s}-push-${$}`]: $,
60
60
  [`${s}-rtl`]: d
@@ -71,24 +71,24 @@ const ie = (i, E) => {
71
71
  u,
72
72
  g,
73
73
  l,
74
- p,
74
+ c,
75
75
  m,
76
76
  $,
77
77
  d
78
- ]), x = (e) => `${100 / 24 * e}%`, K = b(() => {
78
+ ]), x = (e) => `${100 / 24 * e}%`, Q = b(() => {
79
79
  if (o || f)
80
80
  return;
81
81
  const e = {
82
82
  span: g,
83
- offset: p,
83
+ offset: c,
84
84
  order: u,
85
85
  pull: m,
86
86
  push: $
87
87
  }, r = y.find((a) => A[a]);
88
88
  if (r) {
89
89
  const a = y.indexOf(r);
90
- for (let c = a; c < y.length; c++) {
91
- const h = y[c], n = l[h];
90
+ for (let p = a; p < y.length; p++) {
91
+ const h = y[p], n = l[h];
92
92
  if (n !== void 0) {
93
93
  if (B(n)) {
94
94
  Object.assign(e, n);
@@ -103,7 +103,7 @@ const ie = (i, E) => {
103
103
  }
104
104
  const t = {}, L = x(e.span);
105
105
  t.width = L, t.flex = `0 0 ${L}`;
106
- const N = (a, c, h) => {
106
+ const N = (a, p, h) => {
107
107
  if (d) {
108
108
  const n = {
109
109
  left: "right",
@@ -111,9 +111,9 @@ const ie = (i, E) => {
111
111
  marginLeft: "marginRight",
112
112
  marginRight: "marginLeft"
113
113
  };
114
- a[n[c]] = h;
114
+ a[n[p]] = h;
115
115
  } else
116
- a[c] = h;
116
+ a[p] = h;
117
117
  };
118
118
  return e.offset && N(
119
119
  t,
@@ -124,14 +124,14 @@ const ie = (i, E) => {
124
124
  o,
125
125
  f,
126
126
  g,
127
- p,
127
+ c,
128
128
  u,
129
129
  m,
130
130
  $,
131
131
  A,
132
132
  l,
133
133
  d
134
- ]), Q = b(() => {
134
+ ]), U = b(() => {
135
135
  if (o)
136
136
  return;
137
137
  const e = {};
@@ -141,28 +141,28 @@ const ie = (i, E) => {
141
141
  }
142
142
  return e;
143
143
  }, [C, o]);
144
- return Z(() => {
144
+ return _(() => {
145
145
  const e = z.subscribe((r) => {
146
- H(r);
146
+ J(r);
147
147
  });
148
148
  return () => {
149
149
  z.unsubscribe(e);
150
150
  };
151
- }, []), /* @__PURE__ */ U(
151
+ }, []), /* @__PURE__ */ W(
152
152
  "div",
153
153
  {
154
154
  ref: E,
155
- ...D,
155
+ ...H,
156
156
  style: {
157
- ...f ? ne(j) : K,
158
- ...Q,
159
- ..._
157
+ ...f ? ne(j) : Q,
158
+ ...U,
159
+ ...q
160
160
  },
161
- className: te(f ? s : J, V),
162
- children: q
161
+ className: te(f ? s : K, V),
162
+ children: D
163
163
  }
164
164
  );
165
- }, fe = X(ie);
165
+ }, fe = Y(ie);
166
166
  fe.displayName = "Col";
167
167
  export {
168
168
  fe as default
package/grid/Row.js CHANGED
@@ -1,23 +1,34 @@
1
- import { jsx as g } from "react/jsx-runtime";
2
- import { forwardRef as S, useContext as z, useState as G, useRef as H, useEffect as V } from "react";
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { forwardRef as z, useContext as G, useState as H, useRef as U, useEffect as V } from "react";
3
3
  import "../config-provider/ConfigProvider.js";
4
4
  import B from "../components/common/hooks/useMergeProps.js";
5
5
  import E from "@unicom-cloud/utils/class-name";
6
+ import "../components/common/utils/is.js";
6
7
  import { omit as L } from "../components/common/utils/omit.js";
7
- import { responsiveObserve as y, responsiveArray as x } from "../utils/responsiveObserve.js";
8
+ import { responsiveObserve as x, responsiveArray as y } from "../utils/responsiveObserve.js";
8
9
  import { RowContext as M } from "./context.js";
9
- import O from "../config-provider/context.js";
10
- const T = {
10
+ import T from "../config-provider/context.js";
11
+ import { isPlainObject as f, isArray as b, isObject as q } from "@unicom-cloud/utils/is";
12
+ const D = {
11
13
  gutter: 0,
12
14
  align: "start",
13
15
  justify: "start"
14
16
  };
15
- function q(d, b) {
16
- const { getPrefixCls: A, componentConfig: j, rtl: v } = z(O), C = B(
17
- d,
18
- T,
19
- j?.["Grid.Row"]
20
- ), { className: R, style: $, children: w, div: i, align: m, justify: l, gutter: t, ...N } = C, [h, P] = G({
17
+ function F(v, C) {
18
+ const { getPrefixCls: R, componentConfig: $, rtl: j } = G(T), w = B(
19
+ v,
20
+ D,
21
+ $?.["Grid.Row"]
22
+ ), {
23
+ className: N,
24
+ style: P,
25
+ children: h,
26
+ div: i,
27
+ align: u,
28
+ justify: p,
29
+ gutter: r = 0,
30
+ ...A
31
+ } = w, [k, O] = H({
21
32
  xs: !0,
22
33
  sm: !0,
23
34
  md: !0,
@@ -25,63 +36,61 @@ function q(d, b) {
25
36
  xl: !0,
26
37
  xxl: !0,
27
38
  xxxl: !0
28
- }), u = H();
29
- V(() => (u.current = y.subscribe((r) => {
30
- (!Array.isArray(t) && typeof t == "object" || Array.isArray(t) && (typeof t[0] == "object" || typeof t[1] == "object")) && P(r);
39
+ }), n = U();
40
+ V(() => (n.current = x.subscribe((t) => {
41
+ (f(r) || Array.isArray(r) && (f(r[0]) || f(r[1]))) && O(t);
31
42
  }), () => {
32
- y.unsubscribe(u.current);
43
+ n.current && x.unsubscribe(n.current);
33
44
  }), []);
34
- function p(r) {
45
+ function g(t) {
35
46
  let e = 0;
36
- if (typeof r == "object")
37
- for (let c = 0; c < x.length; c++) {
38
- const f = x[c];
39
- if (h[f] && r[f] !== void 0) {
40
- e = r[f];
47
+ if (q(t))
48
+ for (let c = 0; c < y.length; c++) {
49
+ const l = y[c];
50
+ if (k[l] && t[l] !== void 0) {
51
+ e = t[l];
41
52
  break;
42
53
  }
43
54
  }
44
55
  else
45
- e = r;
56
+ e = t;
46
57
  return e;
47
58
  }
48
- const s = A?.("row"), k = E(
59
+ const s = R?.("row"), S = E(
49
60
  {
50
61
  [`${s}`]: !i,
51
- [`${s}-align-${m}`]: m,
52
- [`${s}-justify-${l}`]: l,
53
- [`${s}-rtl`]: v
62
+ [`${s}-align-${u}`]: u,
63
+ [`${s}-justify-${p}`]: p,
64
+ [`${s}-rtl`]: j
54
65
  },
55
- R
56
- ), o = {}, n = p(
57
- Array.isArray(t) ? t[0] : t
58
- ), a = p(Array.isArray(t) ? t[1] : 0);
59
- if ((n || a) && !i) {
60
- const r = -n / 2, e = -a / 2;
61
- r && (o.marginLeft = r, o.marginRight = r), e && (o.marginTop = e, o.marginBottom = e);
66
+ N
67
+ ), o = {}, a = g(b(r) ? r[0] : r), m = g(b(r) ? r[1] : 0);
68
+ if ((a || m) && !i) {
69
+ const t = -a / 2, e = -m / 2;
70
+ t && (o.marginLeft = t, o.marginRight = t), e && (o.marginTop = e, o.marginBottom = e);
62
71
  }
63
- return /* @__PURE__ */ g(
72
+ return /* @__PURE__ */ d(
64
73
  "div",
65
74
  {
66
- ref: b,
67
- ...L(N, ["gutter"]),
75
+ ref: C,
76
+ ...L(A, ["gutter"]),
68
77
  style: {
69
- ...$,
78
+ ...P,
70
79
  ...o
71
80
  },
72
- className: k,
73
- children: /* @__PURE__ */ g(
81
+ className: S,
82
+ children: /* @__PURE__ */ d(
74
83
  M.Provider,
75
84
  {
76
- value: { gutter: [n, a], div: i },
77
- children: w
85
+ value: { gutter: [a, m], div: i },
86
+ children: h
78
87
  }
79
88
  )
80
89
  }
81
90
  );
82
91
  }
83
- const D = S(q);
84
- D.displayName = "Row";
92
+ const I = z(F);
93
+ I.displayName = "Row";
85
94
  export {
86
- D as default
95
+ I as default
87
96
  };
@@ -46,6 +46,7 @@ import "../dist/react-transition-group/src/ReplaceTransition.js";
46
46
  import "../dist/react-transition-group/src/SwitchTransition.js";
47
47
  import "../dist/react-transition-group/chunk/CPfP7aNL.js";
48
48
  import "../dist/react-transition-group/src/TransitionGroup.js";
49
+ import { v4 as A } from "uuid";
49
50
  import "@unicom-cloud/utils/file/saveAs";
50
51
  import "@unicom-cloud/utils/screenfull";
51
52
  import "@unicom-cloud/utils/tinycolor";
@@ -54,7 +55,6 @@ import "@unicom-cloud/utils/constant/ui.js";
54
55
  import "react-is";
55
56
  import "@unicom-cloud/utils/tree";
56
57
  import { isNumber as ct } from "@unicom-cloud/utils/is";
57
- import { v4 as A } from "uuid";
58
58
  import "../dist/validate/src/index.js";
59
59
  import pt from "../config-provider/context.js";
60
60
  const dt = {
@@ -0,0 +1 @@
1
+