@unicom-cloud/ui 0.8.106 → 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 (84) 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/app/App.js +26 -0
  6. package/app/context.js +9 -0
  7. package/app/index.js +9 -0
  8. package/app/interface.js +1 -0
  9. package/app/useApp.js +8 -0
  10. package/back-top/index.js +44 -56
  11. package/calendar/Lunar.js +71 -0
  12. package/calendar/index.js +11 -11
  13. package/color-picker/index.js +34 -34
  14. package/components/common/flex/index.js +4 -4
  15. package/components/common/icons/file/index.js +13 -11
  16. package/components/common/utils/dayjs.js +99 -124
  17. package/components/common/utils/is.js +98 -104
  18. package/components/common/utils/setDir.js +12 -0
  19. package/components/common/utils/setTheme.js +13 -13
  20. package/config-provider/ConfigProvider.js +32 -30
  21. package/descriptions/index.js +32 -32
  22. package/divider/index.js +28 -20
  23. package/empty/index.js +1 -1
  24. package/grid/Grid.js +55 -88
  25. package/grid/Item.js +40 -61
  26. package/grid/context.js +1 -4
  27. package/grid/hook/useResponsiveState.js +22 -25
  28. package/grid/util.js +6 -44
  29. package/index.js +462 -457
  30. package/input/Button.js +12 -12
  31. package/input/Group.js +11 -12
  32. package/input/Input.js +112 -102
  33. package/input/Search.js +24 -24
  34. package/modal/Confirm.js +17 -17
  35. package/modal/Modal.js +247 -237
  36. package/modal/index.js +4 -2
  37. package/modal/use-modal/index.js +2 -2
  38. package/package.json +1 -1
  39. package/select-view/Core.js +31 -28
  40. package/splitter/SplitBar.js +44 -46
  41. package/style.css +1 -1
  42. package/table/Table.js +198 -210
  43. package/table/th-resizable/index.js +9 -10
  44. package/time-picker/util.js +20 -30
  45. package/types/common/development/interface.d.ts +3 -3
  46. package/types/common/utils/is.d.ts +3 -4
  47. package/types/common/utils/setDir.d.ts +2 -0
  48. package/types/pc/app/App.d.ts +6 -0
  49. package/types/pc/app/context.d.ts +4 -0
  50. package/types/pc/app/index.d.ts +5 -0
  51. package/types/pc/app/interface.d.ts +17 -0
  52. package/types/pc/app/useApp.d.ts +3 -0
  53. package/types/pc/back-top/interface.d.ts +4 -17
  54. package/types/pc/calendar/Lunar.d.ts +17 -0
  55. package/types/pc/calendar/index.d.ts +1 -1
  56. package/types/pc/config-provider/interface.d.ts +1 -1
  57. package/types/pc/divider/interface.d.ts +1 -0
  58. package/types/pc/grid/Grid.d.ts +1 -2
  59. package/types/pc/grid/Item.d.ts +2 -5
  60. package/types/pc/grid/context.d.ts +4 -10
  61. package/types/pc/grid/hook/useResponsiveState.d.ts +2 -2
  62. package/types/pc/grid/interface.d.ts +9 -19
  63. package/types/pc/grid/util.d.ts +1 -10
  64. package/types/pc/index.d.ts +3 -1
  65. package/types/pc/input/Button.d.ts +2 -2
  66. package/types/pc/message/index.d.ts +1 -9
  67. package/types/pc/message/interface.d.ts +8 -0
  68. package/types/pc/message/useMessage.d.ts +1 -2
  69. package/types/pc/modal/Modal.d.ts +1 -0
  70. package/types/pc/modal/config.d.ts +1 -2
  71. package/types/pc/modal/index.d.ts +2 -1
  72. package/types/pc/modal/interface.d.ts +17 -5
  73. package/types/pc/notification/index.d.ts +2 -9
  74. package/types/pc/notification/interface.d.ts +7 -0
  75. package/types/pc/notification/useNotification.d.ts +1 -2
  76. package/types/pc/select-view/Core.d.ts +1 -8
  77. package/types/pc/select-view/index.d.ts +1 -8
  78. package/types/pc/select-view/interface.d.ts +9 -2
  79. package/types/pc/utils/is.d.ts +1 -1
  80. package/types/pc/utils/names.d.ts +303 -0
  81. package/utils/index.js +58 -59
  82. package/utils/is.js +65 -66
  83. package/utils/names.js +298 -144
  84. package/version/index.js +1 -1
package/input/Button.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { jsx as u } from "react/jsx-runtime";
2
2
  import m from "lodash/isPlainObject";
3
3
  import A, { useContext as B } from "react";
4
- import P from "../button/index.js";
4
+ import I from "../button/index.js";
5
5
  import "../config-provider/ConfigProvider.js";
6
- import $ from "../components/common/hooks/useMergeValue.js";
6
+ import P from "../components/common/hooks/useMergeValue.js";
7
7
  import c from "@unicom-cloud/utils/class-name";
8
- import j, { formatValue as d } from "./Input.js";
9
- import z from "../config-provider/context.js";
10
- const I = A.forwardRef(
8
+ import $, { formatValue as d } from "./Input.js";
9
+ import j from "../config-provider/context.js";
10
+ const z = A.forwardRef(
11
11
  (t, f) => {
12
- const { getPrefixCls: g } = B(z), {
12
+ const { getPrefixCls: g } = B(j), {
13
13
  className: h,
14
14
  style: x,
15
15
  placeholder: C,
@@ -26,7 +26,7 @@ const I = A.forwardRef(
26
26
  warning: "warning",
27
27
  success: "success"
28
28
  }, V = t.status ? N[t.status] : void 0, i = l === void 0 ? /* @__PURE__ */ u(
29
- P,
29
+ I,
30
30
  {
31
31
  type: "primary",
32
32
  disabled: o,
@@ -38,14 +38,14 @@ const I = A.forwardRef(
38
38
  onClick: (e) => {
39
39
  L?.(k), t.onClick?.(e), a?.onClick?.(e);
40
40
  },
41
- children: b ?? "确定"
41
+ children: a?.children ?? b ?? "确定"
42
42
  }
43
- ) : l, y = m(t.maxLength) ? t.maxLength.length : t.maxLength, r = m(t.maxLength) && t.maxLength.errorOnly ? void 0 : y, [k, M] = $("", {
43
+ ) : l, y = m(t.maxLength) ? t.maxLength.length : t.maxLength, r = m(t.maxLength) && t.maxLength.errorOnly ? void 0 : y, [k, M] = P("", {
44
44
  defaultValue: "defaultValue" in t ? d(t.defaultValue, r) : void 0,
45
45
  value: "value" in t ? d(t.value, r) : void 0
46
46
  });
47
47
  return /* @__PURE__ */ u(
48
- j,
48
+ $,
49
49
  {
50
50
  ...s,
51
51
  className: c(
@@ -66,7 +66,7 @@ const I = A.forwardRef(
66
66
  );
67
67
  }
68
68
  );
69
- I.displayName = "Input.Button";
69
+ z.displayName = "Input.Button";
70
70
  export {
71
- I as default
71
+ z as default
72
72
  };
package/input/Group.js CHANGED
@@ -1,19 +1,18 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import l, { useContext as f } from "react";
2
+ import f, { useContext as u } from "react";
3
3
  import "../config-provider/ConfigProvider.js";
4
- import u from "@unicom-cloud/utils/class-name";
5
- import x from "../config-provider/context.js";
6
- const N = l.forwardRef((o, s) => {
7
- const { getPrefixCls: r } = f(x), { className: e, style: a, children: m, compact: c, ...p } = o, t = r?.("input-group"), i = u(
4
+ import x from "@unicom-cloud/utils/class-name";
5
+ import N from "../config-provider/context.js";
6
+ const d = f.forwardRef((o, s) => {
7
+ const { getPrefixCls: r, rtl: e } = u(N), { className: a, style: m, children: c, compact: p, ...l } = o, t = r?.("input-group"), i = x(
8
8
  t,
9
- {
10
- [`${t}-compact`]: c
11
- },
12
- e
9
+ p && [`${t}-compact`],
10
+ e && `${t}-rtl`,
11
+ a
13
12
  );
14
- return /* @__PURE__ */ n("div", { ref: s, className: i, style: a, ...p, children: m });
13
+ return /* @__PURE__ */ n("div", { ref: s, className: i, style: m, ...l, children: c });
15
14
  });
16
- N.displayName = "InputGroup";
15
+ d.displayName = "InputGroup";
17
16
  export {
18
- N as default
17
+ d as default
19
18
  };
package/input/Input.js CHANGED
@@ -1,90 +1,90 @@
1
1
  import { jsxs as R, jsx as $ } from "react/jsx-runtime";
2
- import nr from "lodash/isNil";
2
+ import sr from "lodash/isNil";
3
3
  import B from "lodash/isPlainObject";
4
- import sr from "lodash/isString";
5
- import { forwardRef as ar, useContext as ir, useState as ur, useRef as A, useImperativeHandle as pr, useMemo as lr } from "react";
4
+ import ar from "lodash/isString";
5
+ import { forwardRef as ir, useContext as ur, useState as pr, useRef as A, useImperativeHandle as fr, useMemo as lr } from "react";
6
6
  import "../config-provider/ConfigProvider.js";
7
7
  import cr from "../components/common/hooks/useMergeProps.js";
8
- import fr from "../components/common/hooks/useMergeValue.js";
8
+ import mr from "../components/common/hooks/useMergeValue.js";
9
9
  import h from "@unicom-cloud/utils/class-name";
10
- import { contains as O } from "../components/common/utils/dom.js";
11
- import U from "./Button.js";
12
- import mr from "./Group.js";
10
+ import { contains as H } from "../components/common/utils/dom.js";
11
+ import q from "./Button.js";
12
+ import J from "./Group.js";
13
13
  import dr from "./InputElement.js";
14
- import q from "../input-number/index.js";
14
+ import K from "../input-number/index.js";
15
15
  import gr from "./Password.js";
16
16
  import hr from "./Search.js";
17
- import J from "../input-tag/InputTag.js";
17
+ import Q from "../input-tag/InputTag.js";
18
18
  import wr from "./Textarea.js";
19
19
  import $r from "../config-provider/context.js";
20
20
  const xr = (o) => {
21
21
  o.target.tagName === "INPUT" || o.preventDefault();
22
- }, w = (o, i, a = {}, x) => i ? /* @__PURE__ */ $("span", { style: a, className: o, onClick: x, children: i }) : null;
23
- function H(o, i) {
24
- let a = o || "";
25
- return sr(o) || nr(o) || (a = String(o)), i && (a = a.slice(0, i)), a;
22
+ }, w = (o, a, s = {}, x) => a ? /* @__PURE__ */ $("span", { style: s, className: o, onClick: x, children: a }) : null;
23
+ function U(o, a) {
24
+ let s = o || "";
25
+ return ar(o) || sr(o) || (s = String(o)), a && (s = s.slice(0, a)), s;
26
26
  }
27
- function Ir(o, i) {
27
+ function Ir(o, a) {
28
28
  const {
29
- getPrefixCls: a,
29
+ getPrefixCls: s,
30
30
  size: x,
31
- componentConfig: K,
31
+ componentConfig: X,
32
32
  rtl: I
33
- } = ir($r), e = cr(
33
+ } = ur($r), e = cr(
34
34
  o,
35
35
  {},
36
- K?.Input
36
+ X?.Input
37
37
  ), {
38
38
  className: F,
39
- style: Q,
39
+ style: Y,
40
40
  addBefore: V,
41
41
  addAfter: D,
42
- suffix: X,
42
+ suffix: Z,
43
43
  prefix: N,
44
- beforeStyle: Y,
45
- afterStyle: Z,
44
+ beforeStyle: _,
45
+ afterStyle: rr,
46
46
  height: z,
47
47
  disabled: L,
48
48
  maxLength: p,
49
- showWordLimit: _,
49
+ showWordLimit: er,
50
50
  allowClear: C,
51
51
  autoWidth: W
52
- } = e, l = W ? {
52
+ } = e, f = W ? {
53
53
  minWidth: 0,
54
54
  maxWidth: "100%",
55
55
  ...B(W) ? W : {}
56
56
  } : null, b = {
57
- minWidth: l?.minWidth,
58
- maxWidth: l?.maxWidth,
59
- width: l && "auto",
60
- ...Q
61
- }, u = B(p) ? p.length : p, f = B(p) && p.errorOnly ? void 0 : u, [rr, j] = ur(!1), s = A(), v = A(), c = A(), [S, er] = fr("", {
62
- defaultValue: "defaultValue" in e ? H(e.defaultValue, f) : void 0,
63
- value: "value" in e ? H(e.value, f) : void 0
57
+ minWidth: f?.minWidth,
58
+ maxWidth: f?.maxWidth,
59
+ width: f && "auto",
60
+ ...Y
61
+ }, i = B(p) ? p.length : p, c = B(p) && p.errorOnly ? void 0 : i, [j, k] = pr(!1), u = A(), v = A(), l = A(), [S, tr] = mr("", {
62
+ defaultValue: "defaultValue" in e ? U(e.defaultValue, c) : void 0,
63
+ value: "value" in e ? U(e.value, c) : void 0
64
64
  });
65
- pr(
66
- i,
65
+ fr(
66
+ a,
67
67
  () => ({
68
- focus: s.current?.focus,
69
- blur: s.current?.blur,
70
- dom: s.current?.dom,
68
+ focus: u.current?.focus,
69
+ blur: u.current?.blur,
70
+ dom: u.current?.dom,
71
71
  // 保持之前逻辑
72
- getRootDOMNode: () => v.current || s.current?.dom
72
+ getRootDOMNode: () => v.current || u.current?.dom
73
73
  }),
74
74
  []
75
75
  );
76
- const tr = (t, M) => {
77
- "value" in e || er(t), e.onChange?.(t, M);
78
- }, r = a?.("input"), m = e.size || x, y = "height" in e;
79
- let d = X;
80
- const g = S ? S.length : 0, k = lr(() => !f && u ? g > u : !1, [g, u, f]);
81
- if (u && _) {
82
- const [t, M] = I ? [u, g] : [g, u];
76
+ const or = (t, M) => {
77
+ "value" in e || tr(t), e.onChange?.(t, M);
78
+ }, r = s?.("input"), m = e.size || x, y = "height" in e;
79
+ let d = Z;
80
+ const g = S ? S.length : 0, E = lr(() => !c && i ? g > i : !1, [g, i, c]);
81
+ if (i && er) {
82
+ const [t, M] = I ? [i, g] : [g, i];
83
83
  d = /* @__PURE__ */ R(
84
84
  "span",
85
85
  {
86
86
  className: h(`${r}-word-limit`, {
87
- [`${r}-word-limit-error`]: k
87
+ [`${r}-word-limit-error`]: E
88
88
  }),
89
89
  children: [
90
90
  t,
@@ -94,110 +94,120 @@ function Ir(o, i) {
94
94
  }
95
95
  );
96
96
  }
97
- const or = h(
97
+ const nr = h(
98
98
  `${r}-group-wrapper`,
99
99
  `${r}-group-wrapper-${m}`,
100
+ !!j && `${r}-group-wrapper-focus`,
101
+ // 潘启宝添加
100
102
  {
101
103
  [`${r}-custom-height`]: y,
102
104
  [`${r}-has-suffix`]: d,
103
105
  [`${r}-group-wrapper-disabled`]: L,
104
106
  [`${r}-group-wrapper-rtl`]: I,
105
- [`${r}-group-wrapper-autowidth`]: l
107
+ [`${r}-group-wrapper-autowidth`]: f
106
108
  },
107
109
  F
108
- ), P = e.status || (e.error || k ? "error" : void 0), E = V || D || d || N, T = /* @__PURE__ */ $(
110
+ ), P = e.status || (e.error || E ? "error" : void 0), G = V || D || d || N, T = /* @__PURE__ */ $(
109
111
  dr,
110
112
  {
111
- ref: s,
113
+ ref: u,
112
114
  ...e,
113
- autoFitWidth: !!l,
115
+ autoFitWidth: !!f,
114
116
  style: b,
115
117
  status: P,
116
118
  onFocus: (t) => {
117
- j(!0), e.onFocus?.(t);
119
+ k(!0), e.onFocus?.(t);
118
120
  },
119
121
  onBlur: (t) => {
120
- j(!1), e.onBlur?.(t);
122
+ k(!1), e.onBlur?.(t);
121
123
  },
122
- onChange: tr,
124
+ onChange: or,
123
125
  prefixCls: r,
124
126
  value: S,
125
- hasParent: !!E || C,
127
+ hasParent: !!G || C,
126
128
  size: m
127
129
  }
128
- ), G = h(`${r}-inner-wrapper`, {
129
- [`${r}-inner-wrapper-${P}`]: P,
130
- [`${r}-inner-wrapper-disabled`]: L,
131
- [`${r}-inner-wrapper-focus`]: rr,
132
- [`${r}-inner-wrapper-has-prefix`]: N,
133
- [`${r}-inner-wrapper-${m}`]: m,
134
- [`${r}-clear-wrapper`]: C,
135
- [`${r}-inner-wrapper-rtl`]: I
136
- });
137
- return E ? /* @__PURE__ */ $(
130
+ ), O = h(
131
+ `${r}-inner-wrapper`,
132
+ {
133
+ [`${r}-inner-wrapper-${P}`]: P,
134
+ [`${r}-inner-wrapper-disabled`]: L,
135
+ [`${r}-inner-wrapper-focus`]: j,
136
+ [`${r}-inner-wrapper-has-prefix`]: N,
137
+ [`${r}-inner-wrapper-${m}`]: m,
138
+ [`${r}-clear-wrapper`]: C
139
+ },
140
+ I ? `${r}-inner-wrapper-rtl` : `${r}-inner-wrapper-ltr`
141
+ );
142
+ return G ? /* @__PURE__ */ $(
138
143
  "div",
139
144
  {
140
145
  ref: v,
141
- className: or,
146
+ className: nr,
142
147
  style: { ...b, ...y ? { height: z } : {} },
143
- children: /* @__PURE__ */ R("span", { className: `${r}-group`, children: [
144
- w(`${r}-group-addbefore`, V, Y),
145
- /* @__PURE__ */ R(
146
- "span",
147
- {
148
- className: G,
149
- ref: c,
150
- onMouseDown: (t) => {
151
- t.target.tagName !== "INPUT" && c.current && O(c.current, t.target) && t.preventDefault();
152
- },
153
- onClick: (t) => {
154
- c.current && O(c.current, t.target) && s.current && s.current.focus();
155
- },
156
- children: [
157
- w(`${r}-group-prefix`, N),
158
- T,
159
- w(`${r}-group-suffix`, d)
160
- ]
161
- }
162
- ),
163
- w(`${r}-group-addafter`, D, Z)
164
- ] })
148
+ children: /* @__PURE__ */ R(
149
+ J,
150
+ {
151
+ children: [
152
+ w(`${r}-group-addbefore`, V, _),
153
+ /* @__PURE__ */ R(
154
+ "span",
155
+ {
156
+ className: O,
157
+ ref: l,
158
+ onMouseDown: (t) => {
159
+ t.target.tagName !== "INPUT" && l.current && H(l.current, t.target) && t.preventDefault();
160
+ },
161
+ onClick: (t) => {
162
+ l.current && H(l.current, t.target) && u.current?.focus?.();
163
+ },
164
+ children: [
165
+ w(`${r}-group-prefix`, N),
166
+ T,
167
+ w(`${r}-group-suffix`, d)
168
+ ]
169
+ }
170
+ ),
171
+ w(`${r}-group-addafter`, D, rr)
172
+ ]
173
+ }
174
+ )
165
175
  }
166
176
  ) : C ? /* @__PURE__ */ $(
167
177
  "span",
168
178
  {
169
179
  ref: v,
170
- className: h(F, G),
180
+ className: h(F, O),
171
181
  style: { ...b, ...y ? { height: z } : {} },
172
182
  onMouseDown: xr,
173
183
  onClick: () => {
174
- s.current && s.current.focus();
184
+ u.current?.focus?.();
175
185
  },
176
186
  children: T
177
187
  }
178
188
  ) : T;
179
189
  }
180
- const Nr = ar(Ir), n = Nr;
190
+ const Nr = ir(Ir), n = Nr;
181
191
  n.displayName = "Input";
182
192
  n.Search = hr;
183
- n.Button = U;
184
- n.InputButton = U;
193
+ n.Button = q;
194
+ n.InputButton = q;
185
195
  n.TextArea = wr;
186
196
  n.Password = gr;
187
- n.Number = q;
188
- n.InputNumber = q;
189
- n.Tag = J;
190
- n.InputTag = J;
191
- n.Group = mr;
197
+ n.Number = K;
198
+ n.InputNumber = K;
199
+ n.Tag = Q;
200
+ n.InputTag = Q;
201
+ n.Group = J;
192
202
  export {
193
- U as InputButton,
194
- mr as InputGroup,
195
- q as InputNumber,
203
+ q as InputButton,
204
+ J as InputGroup,
205
+ K as InputNumber,
196
206
  gr as InputPassword,
197
207
  hr as InputSearch,
198
- J as InputTag,
208
+ Q as InputTag,
199
209
  wr as InputTextArea,
200
210
  wr as TextArea,
201
211
  n as default,
202
- H as formatValue
212
+ U as formatValue
203
213
  };
package/input/Search.js CHANGED
@@ -1,38 +1,38 @@
1
- import { jsx as o } from "react/jsx-runtime";
1
+ import { jsx as n } from "react/jsx-runtime";
2
2
  import S from "@unicom-cloud/icons/IconUiLoading";
3
3
  import f from "@unicom-cloud/icons/IconUiSearch";
4
4
  import s from "lodash/isPlainObject";
5
5
  import V, { useContext as k } from "react";
6
6
  import "../config-provider/ConfigProvider.js";
7
- import M from "../components/common/hooks/useMergeValue.js";
8
- import $ from "@unicom-cloud/utils/class-name";
9
- import { omit as j } from "../components/common/utils/omit.js";
10
- import y from "./Button.js";
7
+ import I from "../components/common/hooks/useMergeValue.js";
8
+ import M from "@unicom-cloud/utils/class-name";
9
+ import { omit as $ } from "../components/common/utils/omit.js";
10
+ import j from "./Button.js";
11
11
  import { formatValue as d } from "./Input.js";
12
- import A from "../config-provider/context.js";
13
- const B = V.forwardRef(
12
+ import y from "../config-provider/context.js";
13
+ const A = V.forwardRef(
14
14
  (e, h) => {
15
- const { getPrefixCls: g } = k(A), {
15
+ const { getPrefixCls: g } = k(y), {
16
16
  className: x,
17
17
  disabled: m,
18
18
  searchButton: t,
19
- loading: n,
19
+ loading: o,
20
20
  addAfter: C,
21
21
  suffix: l,
22
- buttonProps: c,
22
+ buttonProps: u,
23
23
  ...L
24
- } = e, r = g?.("input-search"), b = s(e.maxLength) ? e.maxLength.length : e.maxLength, u = s(e.maxLength) && e.maxLength.errorOnly ? void 0 : b, [v, N] = M("", {
25
- defaultValue: "defaultValue" in e ? d(e.defaultValue, u) : void 0,
26
- value: "value" in e ? d(e.value, u) : void 0
24
+ } = e, r = g?.("input-search"), b = s(e.maxLength) ? e.maxLength.length : e.maxLength, c = s(e.maxLength) && e.maxLength.errorOnly ? void 0 : b, [v, N] = I("", {
25
+ defaultValue: "defaultValue" in e ? d(e.defaultValue, c) : void 0,
26
+ value: "value" in e ? d(e.value, c) : void 0
27
27
  }), i = () => {
28
28
  m || e.onSearch?.(v);
29
29
  };
30
- return /* @__PURE__ */ o(
31
- y,
30
+ return /* @__PURE__ */ n(
31
+ j,
32
32
  {
33
- ...j(L, ["onSearch"]),
33
+ ...$(L, ["onSearch"]),
34
34
  disabled: m,
35
- className: $(
35
+ className: M(
36
36
  r,
37
37
  t && `${r}-button`,
38
38
  x
@@ -40,14 +40,14 @@ const B = V.forwardRef(
40
40
  ref: h,
41
41
  label: t !== !0 && t,
42
42
  addAfter: t ? C : null,
43
- suffix: l === void 0 ? t ? null : n ? /* @__PURE__ */ o(S, {}) : /* @__PURE__ */ o(f, { onClick: i }) : l,
43
+ suffix: l === void 0 ? t ? null : o ? /* @__PURE__ */ n(S, {}) : /* @__PURE__ */ n(f, { onClick: i }) : l,
44
44
  buttonProps: {
45
45
  className: `${r}-btn`,
46
- loading: n,
47
- icon: t === !0 && !n && /* @__PURE__ */ o(f, {}),
48
- ...c,
46
+ loading: o,
47
+ icon: t === !0 && !o && /* @__PURE__ */ n(f, {}),
48
+ ...u,
49
49
  onClick(a) {
50
- i(), c?.onClick?.(a);
50
+ i(), u?.onClick?.(a);
51
51
  }
52
52
  },
53
53
  onChange: (a, P) => {
@@ -60,7 +60,7 @@ const B = V.forwardRef(
60
60
  );
61
61
  }
62
62
  );
63
- B.displayName = "Search";
63
+ A.displayName = "Search";
64
64
  export {
65
- B as default
65
+ A as default
66
66
  };
package/modal/Confirm.js CHANGED
@@ -1,5 +1,5 @@
1
- import { jsx as n, jsxs as x } from "react/jsx-runtime";
2
- import P from "@unicom-cloud/icons/IconUiCheckCircleFill";
1
+ import { jsx as r, jsxs as P } from "react/jsx-runtime";
2
+ import x from "@unicom-cloud/icons/IconUiCheckCircleFill";
3
3
  import y from "@unicom-cloud/icons/IconUiCloseCircleFill";
4
4
  import u from "@unicom-cloud/icons/IconUiExclamationCircleFill";
5
5
  import F from "@unicom-cloud/icons/IconUiInfoCircleFill";
@@ -8,42 +8,42 @@ import M from "../config-provider/ConfigProvider.js";
8
8
  import N from "./Modal.js";
9
9
  import { destroyList as f, getConfigProviderProps as O, getModalConfig as U } from "./config.js";
10
10
  function w(e) {
11
- const { prefixCls: r, simple: i } = U();
12
- return /* @__PURE__ */ n(N, { prefixCls: r, simple: i, ...e, children: e.content });
11
+ const { simple: n } = U();
12
+ return /* @__PURE__ */ r(N, { simple: n, ...e, children: e.content });
13
13
  }
14
14
  const p = (e) => {
15
- let r = e.icon;
16
- if (!r) {
17
- if (r !== null) {
18
- if (r = /* @__PURE__ */ n(u, {}), e.isNotice)
15
+ let n = e.icon;
16
+ if (!n) {
17
+ if (n !== null) {
18
+ if (n = /* @__PURE__ */ r(u, {}), e.isNotice)
19
19
  switch (e.noticeType) {
20
20
  case "info":
21
- r = /* @__PURE__ */ n(F, {});
21
+ n = /* @__PURE__ */ r(F, {});
22
22
  break;
23
23
  case "success":
24
- r = /* @__PURE__ */ n(P, {});
24
+ n = /* @__PURE__ */ r(x, {});
25
25
  break;
26
26
  case "warning":
27
- r = /* @__PURE__ */ n(u, {});
27
+ n = /* @__PURE__ */ r(u, {});
28
28
  break;
29
29
  case "error":
30
- r = /* @__PURE__ */ n(y, {});
30
+ n = /* @__PURE__ */ r(y, {});
31
31
  break;
32
32
  }
33
33
  }
34
34
  }
35
- return e.noticeType === "show" && (r = e.icon), e.isNotice && (e.hideCancel = !0), e.title = r === null && e.title === null ? null : /* @__PURE__ */ x("span", { children: [
36
- r,
35
+ return e.noticeType === "show" && (n = e.icon), e.isNotice && (e.hideCancel = !0), e.title = n === null && e.title === null ? null : /* @__PURE__ */ P("span", { children: [
36
+ n,
37
37
  e.title
38
38
  ] }), e;
39
39
  };
40
- function D(e, r) {
40
+ function D(e, n) {
41
41
  let i;
42
42
  const l = document.createElement("div");
43
43
  l.className = "pqb-modal-root", document.body.appendChild(l);
44
44
  const C = O();
45
45
  function h(t) {
46
- const c = /* @__PURE__ */ n(M, { ...C, childrenName: "ModalConfirm", children: /* @__PURE__ */ n(
46
+ const c = /* @__PURE__ */ r(M, { ...C, childrenName: "ModalConfirm", children: /* @__PURE__ */ r(
47
47
  w,
48
48
  {
49
49
  getPopupContainer: () => l,
@@ -53,7 +53,7 @@ function D(e, r) {
53
53
  ) });
54
54
  i ||= I(l), i.render(c);
55
55
  }
56
- const s = r || h;
56
+ const s = n || h;
57
57
  let o = {
58
58
  ...e,
59
59
  visible: !1