@unicom-cloud/ui 0.8.98 → 0.8.100

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 (180) hide show
  1. package/Anchor.js +3 -1
  2. package/Badge.js +54 -7
  3. package/Copy.js +49 -2
  4. package/Flex.js +12 -0
  5. package/Grid.js +1 -1
  6. package/LiquidFill.js +60 -2
  7. package/Marquee.js +62 -0
  8. package/QrCode.js +14 -9
  9. package/Segmented.js +11 -0
  10. package/Space.js +14 -6
  11. package/Splitter.js +6 -0
  12. package/Tag.js +3 -2
  13. package/Tour.js +14 -9
  14. package/alert/index.js +38 -39
  15. package/anchor/index.js +5 -3
  16. package/badge/index.js +174 -80
  17. package/collapse/Collapse.js +54 -48
  18. package/components/common/space/index.js +90 -106
  19. package/copy/index.js +83 -35
  20. package/flex/index.js +59 -0
  21. package/flex/interface.js +34 -0
  22. package/flex/utils.js +13 -0
  23. package/grid/{GridItem.js → Item.js} +15 -15
  24. package/grid/index.js +1 -1
  25. package/index.js +490 -477
  26. package/input/Button.js +39 -34
  27. package/input/Textarea.js +108 -104
  28. package/liquid-fill/index.js +256 -2
  29. package/marquee/index.js +283 -0
  30. package/menu/Item.js +17 -16
  31. package/package.json +1 -1
  32. package/qr-code/index.js +54 -36
  33. package/rate/index.js +8 -8
  34. package/segmented/index.js +225 -0
  35. package/space/index.js +28 -29
  36. package/spin/index.js +75 -62
  37. package/splitter/Panel.js +39 -0
  38. package/splitter/SplitBar.js +157 -0
  39. package/splitter/Splitter.js +139 -0
  40. package/splitter/hooks/useEvent.js +12 -0
  41. package/splitter/hooks/useItems.js +26 -0
  42. package/splitter/hooks/useResizable.js +26 -0
  43. package/splitter/hooks/useResize.js +68 -0
  44. package/splitter/hooks/useSizes.js +60 -0
  45. package/splitter/index.js +7 -0
  46. package/splitter/interface.js +1 -0
  47. package/style.css +1 -1
  48. package/table/Table.js +1 -1
  49. package/table/hook/useThResizable.js +72 -26
  50. package/table/tbody/Td.js +80 -77
  51. package/table/th-resizable/index.js +92 -35
  52. package/tag/index.js +42 -41
  53. package/tooltip/index.js +89 -82
  54. package/tour/index.js +110 -89
  55. package/types/common/hooks/useMergeProps.d.ts +1 -1
  56. package/types/common/space/index.d.ts +7 -5
  57. package/types/common/space/interface.d.ts +29 -16
  58. package/types/pc/affix/interface.d.ts +0 -2
  59. package/types/pc/alert/index.d.ts +2 -2
  60. package/types/pc/anchor/index.d.ts +2 -1
  61. package/types/pc/anchor/interface.d.ts +0 -2
  62. package/types/pc/auto-complete/interface.d.ts +0 -6
  63. package/types/pc/avatar/interface.d.ts +0 -4
  64. package/types/pc/badge/index.d.ts +4 -4
  65. package/types/pc/badge/interface.d.ts +26 -0
  66. package/types/pc/breadcrumb/interface.d.ts +0 -3
  67. package/types/pc/carousel/interface.d.ts +2 -6
  68. package/types/pc/cascader/interface.d.ts +6 -18
  69. package/types/pc/checkbox/interface.d.ts +0 -1
  70. package/types/pc/collapse/interface.d.ts +4 -2
  71. package/types/pc/color-picker/interface.d.ts +0 -2
  72. package/types/pc/config-provider/interface.d.ts +16 -14
  73. package/types/pc/copy/interface.d.ts +2 -1
  74. package/types/pc/date-picker/RangePicker.d.ts +1 -1
  75. package/types/pc/date-picker/interface.d.ts +0 -17
  76. package/types/pc/descriptions/interface.d.ts +0 -1
  77. package/types/pc/drawer/interface.d.ts +0 -7
  78. package/types/pc/dropdown/interface.d.ts +0 -1
  79. package/types/pc/flex/index.d.ts +9 -0
  80. package/types/pc/flex/interface.d.ts +61 -0
  81. package/types/pc/flex/utils.d.ts +9 -0
  82. package/types/pc/form/interface.d.ts +9 -22
  83. package/types/pc/form/util.d.ts +1 -1
  84. package/types/pc/grid/index.d.ts +3 -3
  85. package/types/pc/grid/interface.d.ts +1 -6
  86. package/types/pc/image/interface.d.ts +0 -13
  87. package/types/pc/index.d.ts +16 -6
  88. package/types/pc/input/Textarea.d.ts +2 -6
  89. package/types/pc/input/interface.d.ts +5 -13
  90. package/types/pc/input-number/interface.d.ts +0 -4
  91. package/types/pc/input-tag/interface.d.ts +0 -13
  92. package/types/pc/layout/interface.d.ts +0 -1
  93. package/types/pc/link/interface.d.ts +0 -1
  94. package/types/pc/liquid-fill/index.d.ts +114 -1
  95. package/types/pc/list/interface.d.ts +0 -4
  96. package/types/pc/marquee/index.d.ts +61 -0
  97. package/types/pc/menu/context.d.ts +1 -1
  98. package/types/pc/menu/interface.d.ts +0 -8
  99. package/types/pc/message/interface.d.ts +0 -2
  100. package/types/pc/modal/interface.d.ts +0 -5
  101. package/types/pc/notification/interface.d.ts +0 -1
  102. package/types/pc/pagination/interface.d.ts +0 -2
  103. package/types/pc/popconfirm/interface.d.ts +8 -10
  104. package/types/pc/popover/interface.d.ts +0 -1
  105. package/types/pc/progress/interface.d.ts +0 -3
  106. package/types/pc/qr-code/index.d.ts +1 -1
  107. package/types/pc/rate/index.d.ts +2 -2
  108. package/types/pc/resize-box/interface.d.ts +1 -7
  109. package/types/pc/segmented/index.d.ts +8 -0
  110. package/types/pc/segmented/interface.d.ts +88 -0
  111. package/types/pc/select/interface.d.ts +0 -12
  112. package/types/pc/select-view/interface.d.ts +0 -7
  113. package/types/pc/slider/interface.d.ts +0 -4
  114. package/types/pc/space/index.d.ts +4 -1
  115. package/types/pc/space/interface.d.ts +6 -10
  116. package/types/pc/spin/interface.d.ts +4 -1
  117. package/types/pc/splitter/Panel.d.ts +8 -0
  118. package/types/pc/splitter/SplitBar.d.ts +21 -0
  119. package/types/pc/splitter/Splitter.d.ts +4 -0
  120. package/types/pc/splitter/hooks/useEvent.d.ts +3 -0
  121. package/types/pc/splitter/hooks/useItems.d.ts +10 -0
  122. package/types/pc/splitter/hooks/useResizable.d.ts +8 -0
  123. package/types/pc/splitter/hooks/useResize.d.ts +4 -0
  124. package/types/pc/splitter/hooks/useSizes.d.ts +5 -0
  125. package/types/pc/splitter/index.d.ts +8 -0
  126. package/types/pc/splitter/interface.d.ts +213 -0
  127. package/types/pc/statistic/interface.d.ts +0 -4
  128. package/types/pc/steps/interface.d.ts +0 -3
  129. package/types/pc/table/hook/useThResizable.d.ts +2 -2
  130. package/types/pc/table/interface.d.ts +4 -15
  131. package/types/pc/tabs/interface.d.ts +0 -7
  132. package/types/pc/tag/index.d.ts +2 -0
  133. package/types/pc/tag/interface.d.ts +0 -1
  134. package/types/pc/time-picker/interface.d.ts +0 -7
  135. package/types/pc/tooltip/interface.d.ts +4 -1
  136. package/types/pc/tour/index.d.ts +6 -1
  137. package/types/pc/transfer/interface.d.ts +2 -9
  138. package/types/pc/tree/interface.d.ts +2 -8
  139. package/types/pc/tree-select/interface.d.ts +0 -8
  140. package/types/pc/trigger/interface.d.ts +0 -5
  141. package/types/pc/typography/EditContent.d.ts +2 -1
  142. package/types/pc/typography/interface.d.ts +45 -30
  143. package/types/pc/upload/interface.d.ts +6 -11
  144. package/types/pc/utils/index.d.ts +1 -0
  145. package/types/pc/utils/names.d.ts +24 -0
  146. package/types/pc/utils/toArray.d.ts +7 -0
  147. package/types/pc/verification-code/interface.d.ts +0 -2
  148. package/types/pc/watermark/interface.d.ts +0 -2
  149. package/typography/Base.js +73 -73
  150. package/typography/EditContent.js +43 -33
  151. package/typography/Ellipsis.js +117 -184
  152. package/typography/Operations.js +97 -49
  153. package/typography/useCssEllipsis.js +7 -6
  154. package/utils/index.js +117 -115
  155. package/utils/names.js +16 -0
  156. package/utils/toArray.js +12 -0
  157. package/version/index.js +1 -1
  158. package/_virtual/_commonjsHelpers.js +0 -6
  159. package/_virtual/index.js +0 -7
  160. package/_virtual/index2.js +0 -4
  161. package/liquid-fill/LiquidFill.js +0 -226
  162. package/liquid-fill/LiquidFill2.js +0 -3
  163. package/space-/index.js +0 -93
  164. package/types/common/utils/color.d.ts +0 -1
  165. package/types/common/utils/computeScrollIntoView.d.ts +0 -1
  166. package/types/common/utils/index.d.ts +0 -45
  167. package/types/common/utils/math.d.ts +0 -1
  168. package/types/common/utils/reactTransitionGroup.d.ts +0 -1
  169. package/types/common/utils/tree.d.ts +0 -1
  170. package/types/common/utils/tween.d.ts +0 -1
  171. package/types/common/utils/uuid.d.ts +0 -1
  172. package/types/common/utils/validate.d.ts +0 -1
  173. package/types/pc/liquid-fill/LiquidFill.d.ts +0 -115
  174. package/types/pc/liquid-fill/LiquidFill2.d.ts +0 -1
  175. package/types/pc/space-/index.d.ts +0 -6
  176. package/types/pc/space-/interface.d.ts +0 -38
  177. /package/{space- → components/common/space}/toArray.js +0 -0
  178. /package/{space- → segmented}/interface.js +0 -0
  179. /package/types/{pc/space- → common/space}/toArray.d.ts +0 -0
  180. /package/types/pc/grid/{GridItem.d.ts → Item.d.ts} +0 -0
@@ -1,34 +1,34 @@
1
- import { jsx as p, jsxs as ie, Fragment as re } from "react/jsx-runtime";
2
- import le from "lodash/merge";
3
- import R, { forwardRef as pe, useContext as ce, useRef as W, useState as q, useEffect as ae, useImperativeHandle as me } from "react";
1
+ import { jsx as p, jsxs as ne, Fragment as ie } from "react/jsx-runtime";
2
+ import re from "lodash/merge";
3
+ import _, { forwardRef as le, useContext as pe, useRef as ce, useState as W, useEffect as ae, useImperativeHandle as me } from "react";
4
4
  import "../config-provider/ConfigProvider.js";
5
5
  import de from "../components/common/hooks/useMergeValue.js";
6
6
  import fe from "../components/common/hooks/useUpdateEffect.js";
7
7
  import ue from "../popover/index.js";
8
8
  import he from "../tooltip/index.js";
9
- import F from "@unicom-cloud/utils/class-name";
9
+ import q from "@unicom-cloud/utils/class-name";
10
10
  import "../components/common/utils/is.js";
11
11
  import { mergedToString as Ee } from "../components/common/utils/mergedToString.js";
12
12
  import { omit as ge } from "../components/common/utils/omit.js";
13
13
  import { resizeObserver as Ce } from "../components/common/utils/resizeObserver.js";
14
14
  import { throttleByRaf as xe } from "../components/common/utils/throttleByRaf.js";
15
15
  import Te from "./EditContent.js";
16
- import Ne from "./Operations.js";
17
- import Se from "./useCssEllipsis.js";
18
- import be, { MEASURE_STATUS as O } from "./useEllipsis.js";
16
+ import Se from "./Operations.js";
17
+ import Ne from "./useCssEllipsis.js";
18
+ import be, { MEASURE_STATUS as A } from "./useEllipsis.js";
19
19
  import we from "../config-provider/context.js";
20
- import { isPlainObject as x, isUndefined as L } from "@unicom-cloud/utils/is";
20
+ import { isPlainObject as x, isUndefined as F } from "@unicom-cloud/utils/is";
21
21
  function ye(s, f) {
22
22
  const {
23
23
  type: c,
24
- bold: b,
24
+ bold: w,
25
25
  disabled: T,
26
26
  mark: u,
27
- underline: N,
27
+ underline: S,
28
28
  delete: a,
29
- code: w
29
+ code: y
30
30
  } = s, l = [], h = [];
31
- return c && h.push(`${f}-${c}`), T && h.push(`${f}-disabled`), b && l.push("b"), N && l.push("u"), a && l.push("del"), w && l.push("code"), u && l.push("mark"), {
31
+ return c && h.push(`${f}-${c}`), T && h.push(`${f}-disabled`), w && l.push("b"), S && l.push("u"), a && l.push("del"), y && l.push("code"), u && l.push("mark"), {
32
32
  component: l,
33
33
  className: h
34
34
  };
@@ -36,100 +36,100 @@ function ye(s, f) {
36
36
  function $e(s, f) {
37
37
  const {
38
38
  componentType: c,
39
- style: b,
39
+ style: w,
40
40
  className: T,
41
41
  children: u,
42
- editable: N,
42
+ editable: S,
43
43
  ellipsis: a,
44
- heading: w,
44
+ heading: y,
45
45
  blockquote: l,
46
46
  ...h
47
- } = s, _ = ce(we), { getPrefixCls: V, rtl: A } = _, n = V?.("typography"), I = W(), { component: S, className: M } = ye(s, n), [H, U] = q(!1), [G, J] = q(0), y = x(N) ? N : {}, K = "editing" in y ? y.editing : H, e = a ? {
47
+ } = s, I = pe(we), { getPrefixCls: L, rtl: O } = I, n = L?.("typography"), N = ce(null), { component: b, className: U } = ye(s, n), [V, z] = W(!1), [H, G] = W(0), $ = x(S) ? S : {}, J = "editing" in $ ? $.editing : V, D = "...", e = a ? {
48
48
  rows: 1,
49
- ellipsisStr: "...",
49
+ ellipsisStr: D,
50
50
  cssEllipsis: !1,
51
51
  ...x(a) ? a : {}
52
- } : {}, Q = e.wrapper || R.Fragment, [i, X] = de(!1, {
52
+ } : {}, K = e.wrapper || _.Fragment, [i, Q] = de(!1, {
53
53
  defaultValue: e.defaultExpanded,
54
54
  value: e.expanded
55
- }), { simpleEllipsis: $, ellipsisStyle: Y } = Se(e), z = (t, o) => {
56
- const r = L(e.ellipsisStr) ? "..." : e.ellipsisStr, d = !L(e.suffix) && e.suffix;
57
- return /* @__PURE__ */ ie(Q, { children: [
55
+ }), { simpleEllipsis: k, ellipsisStyle: X } = Ne(e), M = (t, o) => {
56
+ const r = F(e.ellipsisStr) ? D : e.ellipsisStr, d = !F(e.suffix) && e.suffix;
57
+ return /* @__PURE__ */ ne(K, { children: [
58
58
  t,
59
- o && !i && !$ ? r : "",
59
+ o && !i && !k ? r : "",
60
60
  d,
61
- te(o)
61
+ ee(o)
62
62
  ] });
63
- }, { ellipsisNode: Z, isEllipsis: m, measureStatus: D } = be({
63
+ }, { ellipsisNode: Y, isEllipsis: m, measureStatus: j } = be({
64
64
  ...e,
65
65
  children: u,
66
66
  expanding: i,
67
- width: G,
68
- renderMeasureContent: z,
69
- simpleEllipsis: $ || i
70
- }), ee = xe((t) => {
67
+ width: H,
68
+ renderMeasureContent: M,
69
+ simpleEllipsis: k || i
70
+ }), Z = xe((t) => {
71
71
  const { contentRect: o } = t?.[0];
72
72
  if (o) {
73
- const r = S.includes("code") ? o.width - 18 : o.width;
73
+ const r = b.includes("code") ? o.width - 18 : o.width;
74
74
  [
75
- O.NO_NEED_ELLIPSIS,
76
- O.MEASURE_END
77
- ].includes(D) && J(r);
75
+ A.NO_NEED_ELLIPSIS,
76
+ A.MEASURE_END
77
+ ].includes(j) && G(r);
78
78
  }
79
- }), j = W(null);
79
+ });
80
80
  ae(() => {
81
- const t = Ce([j.current], ee);
81
+ const t = Ce([N.current], Z);
82
82
  return () => {
83
83
  t();
84
84
  };
85
- }, [j.current]);
86
- function te(t) {
87
- return /* @__PURE__ */ p(re, { children: /* @__PURE__ */ p(
88
- Ne,
85
+ }, [N.current]);
86
+ function ee(t) {
87
+ return /* @__PURE__ */ p(ie, { children: /* @__PURE__ */ p(
88
+ Se,
89
89
  {
90
90
  ...s,
91
- setEditing: U,
92
- onClickExpand: oe,
91
+ setEditing: z,
92
+ onClickExpand: te,
93
93
  expanding: i,
94
94
  isEllipsis: t,
95
- currentContext: _
95
+ currentContext: I
96
96
  }
97
97
  ) });
98
98
  }
99
- function oe(t) {
100
- X(!i), s.onClickExpand?.(t), e.onExpand?.(!i, t);
99
+ function te(t) {
100
+ Q(!i), s.onClickExpand?.(t), e.onExpand?.(!i, t);
101
101
  }
102
102
  fe(() => {
103
103
  e.onEllipsis?.(m);
104
- }, [m]), me(f, () => I.current);
104
+ }, [m]), me(f, () => N.current);
105
105
  function B(t, o, r, d = {}) {
106
106
  let g = t;
107
- return o.forEach((k, P) => {
108
- const v = { className: `${n}-${k}` }, C = P === 0 ? d : {}, ne = x(r.mark) && r.mark.color ? { style: { backgroundColor: r.mark.color }, ...C } : { ...C };
109
- g = R.createElement(
110
- k,
111
- le({ ...ne }, v),
107
+ return o.forEach((P, v) => {
108
+ const R = { className: `${n}-${P}` }, C = v === 0 ? d : {}, se = x(r.mark) && r.mark.color ? { style: { backgroundColor: r.mark.color }, ...C } : { ...C };
109
+ g = _.createElement(
110
+ P,
111
+ re({ ...se }, R),
112
112
  g
113
113
  );
114
114
  }), g;
115
115
  }
116
116
  let E;
117
- c === "Paragraph" ? E = l ? "blockquote" : "div" : c === "Title" ? E = `h${w}` : c === "Text" && (E = a ? "div" : "span");
118
- function se() {
119
- const t = Ee(R.Children.toArray(u)), o = e.showTooltip, r = x(e.showTooltip) && e.showTooltip.type === "popover" ? "popover" : "tooltip", d = x(e.showTooltip) ? e.showTooltip.props || {} : {}, g = r === "popover" ? ue : he, P = {
120
- style: b,
117
+ c === "Paragraph" ? E = l ? "blockquote" : "div" : c === "Title" ? E = `h${y}` : c === "Text" && (E = a ? "div" : "span");
118
+ function oe() {
119
+ const t = Ee(_.Children.toArray(u)), o = e.showTooltip, r = x(e.showTooltip) && e.showTooltip.type === "popover" ? "popover" : "tooltip", d = x(e.showTooltip) ? e.showTooltip.props || {} : {}, g = r === "popover" ? ue : he, v = {
120
+ style: w,
121
121
  ...m && !o && !i ? { title: t } : {}
122
- }, v = m && o && !i, C = /* @__PURE__ */ p(
122
+ }, R = m && o && !i, C = /* @__PURE__ */ p(
123
123
  E,
124
124
  {
125
- ref: I,
126
- className: F(
125
+ ref: N,
126
+ className: q(
127
127
  n,
128
- M,
129
- { [`${n}-rtl`]: A },
128
+ U,
129
+ { [`${n}-rtl`]: O },
130
130
  T
131
131
  ),
132
- ...P,
132
+ ...v,
133
133
  ...ge(h, [
134
134
  "spacing",
135
135
  "type",
@@ -147,41 +147,41 @@ function $e(s, f) {
147
147
  "setEditing",
148
148
  "forceShowExpand"
149
149
  ]),
150
- children: $ && D !== O.INIT && !i && m ? B(
150
+ children: k && j !== A.INIT && !i && m ? B(
151
151
  // CSS folding style, need to wrap the text separately.
152
- z(
153
- /* @__PURE__ */ p("span", { style: Y, children: u }),
152
+ M(
153
+ /* @__PURE__ */ p("span", { style: X, children: u }),
154
154
  m
155
155
  ),
156
- S.length ? S : ["span"],
156
+ b.length ? b : ["span"],
157
157
  s,
158
158
  // The simple-ellipsis class ensures that the ReactNode after the text is displayed correctly (no line breaks)
159
159
  // Need to act on the immediate parent node of the text
160
160
  { className: `${n}-simple-ellipsis` }
161
- ) : B(Z, S, s)
161
+ ) : B(Y, b, s)
162
162
  }
163
163
  );
164
- return v ? /* @__PURE__ */ p(g, { content: t, ...d, children: /* @__PURE__ */ p("span", { children: C }) }) : C;
164
+ return R ? /* @__PURE__ */ p(g, { content: t, ...d, children: /* @__PURE__ */ p("span", { children: C }) }) : C;
165
165
  }
166
- return K ? /* @__PURE__ */ p(
166
+ return J ? /* @__PURE__ */ p(
167
167
  Te,
168
168
  {
169
169
  ref: f,
170
170
  ...s,
171
- className: F(
171
+ className: q(
172
172
  n,
173
- M,
174
- { [`${n}-rtl`]: A },
173
+ U,
174
+ { [`${n}-rtl`]: O },
175
175
  `${n}-${E}`,
176
176
  T
177
177
  ),
178
178
  prefixCls: n,
179
- setEditing: U,
180
- editableConfig: y
179
+ setEditing: z,
180
+ editableConfig: $
181
181
  }
182
- ) : se();
182
+ ) : oe();
183
183
  }
184
- const Ge = pe($e);
184
+ const Ge = le($e);
185
185
  export {
186
186
  Ge as default
187
187
  };
@@ -1,43 +1,53 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
- import { forwardRef as p, useRef as E, useEffect as h } from "react";
3
- import C from "../input/Input.js";
4
- import x from "@unicom-cloud/utils/class-name";
5
- import { mergedToString as N } from "../components/common/utils/mergedToString.js";
6
- function $(o, a) {
7
- const { prefixCls: n, children: u, setEditing: f, editableConfig: r, style: l } = o, m = x(
8
- `${n}-typography`,
9
- `${n}-edit-content`,
10
- o.className
11
- ), c = N(u), t = E(null);
12
- h(() => {
13
- if (t.current && t.current.focus?.(), t.current && t.current.dom) {
14
- const { length: e } = t.current.dom.value;
15
- t.current.dom.setSelectionRange(e, e);
2
+ import { forwardRef as C, useRef as P, useEffect as x } from "react";
3
+ import u from "../input/Input.js";
4
+ import N from "@unicom-cloud/utils/class-name";
5
+ import { mergedToString as $ } from "../components/common/utils/mergedToString.js";
6
+ function y(c, l) {
7
+ const { prefixCls: o, children: m, setEditing: d, editableConfig: n, style: p } = c, g = N(
8
+ `${o}-typography`,
9
+ `${o}-edit-content`,
10
+ c.className
11
+ ), a = $(m), e = P(null);
12
+ x(() => {
13
+ if (e.current?.focus?.(), e.current && "dom" in e.current) {
14
+ const { length: t } = e.current.dom.value;
15
+ e.current.dom.setSelectionRange(t, t);
16
16
  }
17
17
  }, []);
18
- function s() {
19
- f(!1), r.onEnd?.(c);
20
- }
21
- function d(e) {
22
- r.onChange?.(e);
23
- }
24
- function g() {
25
- s();
26
- }
27
- return /* @__PURE__ */ i("div", { className: m, style: l, ref: a, children: /* @__PURE__ */ i(
28
- C.TextArea,
18
+ const r = () => {
19
+ d?.(!1), n?.onEnd?.(a);
20
+ }, E = (t) => {
21
+ n?.onChange?.(t);
22
+ }, h = () => r(), f = {
23
+ className: `${o}-edit-content-input`,
24
+ value: a,
25
+ onBlur: h,
26
+ onChange: E
27
+ };
28
+ let s;
29
+ return n?.inputProps ? s = /* @__PURE__ */ i(
30
+ u,
29
31
  {
30
- className: `${n}-edit-content-textarea`,
31
- onBlur: g,
32
- ref: t,
33
- value: c,
32
+ ...f,
33
+ ref: e,
34
+ onPressEnter: r,
35
+ ...n.inputProps
36
+ }
37
+ ) : s = /* @__PURE__ */ i(
38
+ u.TextArea,
39
+ {
40
+ ...f,
41
+ ref: e,
34
42
  autoSize: !0,
35
- onChange: d,
36
- onPressEnter: s
43
+ onPressEnter: (t) => {
44
+ t.shiftKey || r();
45
+ },
46
+ ...n?.textAreaProps
37
47
  }
38
- ) });
48
+ ), /* @__PURE__ */ i("div", { className: g, style: p, ref: l, children: s });
39
49
  }
40
- const b = p($);
50
+ const b = C(y);
41
51
  export {
42
52
  b as default
43
53
  };