@oceanbase/ui 0.4.20 → 0.4.21

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 (127) hide show
  1. package/dist/ui.min.js +1 -1
  2. package/es/Action/Group.js +121 -15
  3. package/es/Action/style/index.js +8 -4
  4. package/es/BasicLayout/locale/ja-JP.d.ts +13 -0
  5. package/es/BasicLayout/locale/ja-JP.js +12 -0
  6. package/es/BatchOperationBar/locale/ja-JP.d.ts +7 -0
  7. package/es/BatchOperationBar/locale/ja-JP.js +6 -0
  8. package/es/Boundary/locale/ja-JP.d.ts +11 -0
  9. package/es/Boundary/locale/ja-JP.js +10 -0
  10. package/es/DateRanger/locale/ja-JP.d.ts +56 -0
  11. package/es/DateRanger/locale/ja-JP.js +20 -0
  12. package/es/Dialog/locale/ja-JP.d.ts +5 -0
  13. package/es/Dialog/locale/ja-JP.js +4 -0
  14. package/es/DocDialog/locale/ja-JP.d.ts +2 -0
  15. package/es/DocDialog/locale/ja-JP.js +1 -0
  16. package/es/FullscreenBox/locale/ja-JP.d.ts +2 -0
  17. package/es/FullscreenBox/locale/ja-JP.js +1 -0
  18. package/es/GraphToolbar/locale/ja-JP.d.ts +9 -0
  19. package/es/GraphToolbar/locale/ja-JP.js +8 -0
  20. package/es/Highlight/locale/ja-JP.d.ts +4 -0
  21. package/es/Highlight/locale/ja-JP.js +3 -0
  22. package/es/Login/locale/ja-JP.d.ts +28 -0
  23. package/es/Login/locale/ja-JP.js +27 -0
  24. package/es/PageContainer/locale/ja-JP.d.ts +4 -0
  25. package/es/PageContainer/locale/ja-JP.js +3 -0
  26. package/es/Password/locale/ja-JP.d.ts +13 -0
  27. package/es/Password/locale/ja-JP.js +12 -0
  28. package/es/Ranger/locale/ja-JP.d.ts +28 -0
  29. package/es/Ranger/locale/ja-JP.js +29 -0
  30. package/es/SideTip/locale/ja-JP.d.ts +2 -0
  31. package/es/SideTip/locale/ja-JP.js +1 -0
  32. package/es/TaskGraph/locale/ja-JP.d.ts +13 -0
  33. package/es/TaskGraph/locale/ja-JP.js +12 -0
  34. package/es/Welcome/locale/ja-JP.d.ts +5 -0
  35. package/es/Welcome/locale/ja-JP.js +4 -0
  36. package/es/locale/ja-JP.d.ts +3 -0
  37. package/es/locale/ja-JP.js +42 -0
  38. package/lib/Action/Group.js +122 -46
  39. package/lib/Action/Item.js +14 -9
  40. package/lib/Action/style/index.js +16 -1
  41. package/lib/BackgroundTaskManager/RefreshMan.js +3 -12
  42. package/lib/BackgroundTaskManager/index.js +3 -12
  43. package/lib/BasicLayout/Header.js +120 -62
  44. package/lib/BasicLayout/index.js +166 -143
  45. package/lib/BasicLayout/locale/ja-JP.d.ts +13 -0
  46. package/lib/BasicLayout/locale/ja-JP.js +36 -0
  47. package/lib/BatchOperationBar/index.js +59 -44
  48. package/lib/BatchOperationBar/locale/ja-JP.d.ts +7 -0
  49. package/lib/BatchOperationBar/locale/ja-JP.js +30 -0
  50. package/lib/Boundary/Components/Code.js +11 -5
  51. package/lib/Boundary/Components/Exception.js +33 -23
  52. package/lib/Boundary/Components/Function.js +11 -5
  53. package/lib/Boundary/locale/ja-JP.d.ts +11 -0
  54. package/lib/Boundary/locale/ja-JP.js +34 -0
  55. package/lib/ContentWithIcon/index.js +30 -22
  56. package/lib/ContentWithQuestion/index.js +8 -3
  57. package/lib/DateRanger/PickerPanel.js +235 -217
  58. package/lib/DateRanger/Ranger.js +349 -313
  59. package/lib/DateRanger/locale/ja-JP.d.ts +56 -0
  60. package/lib/DateRanger/locale/ja-JP.js +49 -0
  61. package/lib/Dialog/Anchor.js +8 -5
  62. package/lib/Dialog/EventProxy.js +3 -12
  63. package/lib/Dialog/index.js +132 -108
  64. package/lib/Dialog/locale/ja-JP.d.ts +5 -0
  65. package/lib/Dialog/locale/ja-JP.js +28 -0
  66. package/lib/DocDialog/index.js +3 -2
  67. package/lib/DocDialog/locale/ja-JP.d.ts +2 -0
  68. package/lib/DocDialog/locale/ja-JP.js +25 -0
  69. package/lib/FooterToolbar/index.js +3 -2
  70. package/lib/FullscreenBox/index.js +16 -7
  71. package/lib/FullscreenBox/locale/ja-JP.d.ts +2 -0
  72. package/lib/FullscreenBox/locale/ja-JP.js +25 -0
  73. package/lib/GraphToolbar/index.js +70 -58
  74. package/lib/GraphToolbar/locale/ja-JP.d.ts +9 -0
  75. package/lib/GraphToolbar/locale/ja-JP.js +32 -0
  76. package/lib/Highlight/DiffView/DiffCells.js +17 -10
  77. package/lib/Highlight/DiffView/index.js +35 -31
  78. package/lib/Highlight/HighlightCell.js +13 -10
  79. package/lib/Highlight/JsonView.js +15 -14
  80. package/lib/Highlight/index.js +50 -45
  81. package/lib/Highlight/locale/ja-JP.d.ts +4 -0
  82. package/lib/Highlight/locale/ja-JP.js +27 -0
  83. package/lib/IconFont/index.js +2 -12
  84. package/lib/LightFilter/index.js +3 -2
  85. package/lib/LocaleDropdown/index.js +13 -20
  86. package/lib/Login/ActivateForm.js +53 -60
  87. package/lib/Login/LoginForm.js +118 -109
  88. package/lib/Login/RegisterForm.js +79 -86
  89. package/lib/Login/index.js +92 -64
  90. package/lib/Login/locale/ja-JP.d.ts +28 -0
  91. package/lib/Login/locale/ja-JP.js +51 -0
  92. package/lib/NavMenu/index.js +9 -8
  93. package/lib/PageContainer/ItemRender.js +5 -5
  94. package/lib/PageContainer/index.js +8 -4
  95. package/lib/PageContainer/locale/ja-JP.d.ts +4 -0
  96. package/lib/PageContainer/locale/ja-JP.js +27 -0
  97. package/lib/PageLoading/index.js +6 -16
  98. package/lib/Password/Content.js +38 -42
  99. package/lib/Password/index.js +83 -68
  100. package/lib/Password/locale/ja-JP.d.ts +13 -0
  101. package/lib/Password/locale/ja-JP.js +36 -0
  102. package/lib/ProCard/index.js +4 -3
  103. package/lib/ProTable/index.js +5 -4
  104. package/lib/Ranger/QuickPicker.js +24 -15
  105. package/lib/Ranger/Ranger.js +37 -34
  106. package/lib/Ranger/locale/ja-JP.d.ts +28 -0
  107. package/lib/Ranger/locale/ja-JP.js +53 -0
  108. package/lib/SideTip/Dragger.js +5 -4
  109. package/lib/SideTip/IconLoading.js +25 -25
  110. package/lib/SideTip/index.js +19 -10
  111. package/lib/SideTip/locale/ja-JP.d.ts +2 -0
  112. package/lib/SideTip/locale/ja-JP.js +25 -0
  113. package/lib/TagSelect/Group.js +9 -5
  114. package/lib/TagSelect/Item.js +22 -18
  115. package/lib/TaskGraph/Graph.js +29 -24
  116. package/lib/TaskGraph/index.js +56 -50
  117. package/lib/TaskGraph/locale/ja-JP.d.ts +13 -0
  118. package/lib/TaskGraph/locale/ja-JP.js +36 -0
  119. package/lib/TreeSearch/index.js +30 -35
  120. package/lib/Welcome/index.js +64 -37
  121. package/lib/Welcome/locale/ja-JP.d.ts +5 -0
  122. package/lib/Welcome/locale/ja-JP.js +28 -0
  123. package/lib/Welcome/step.js +11 -4
  124. package/lib/locale/LocaleWrapper.js +15 -14
  125. package/lib/locale/ja-JP.d.ts +3 -0
  126. package/lib/locale/ja-JP.js +71 -0
  127. package/package.json +5 -5
@@ -33,18 +33,19 @@ __export(Code_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(Code_exports);
35
35
  var import_design = require("@oceanbase/design");
36
- var import_react = __toESM(require("react"));
36
+ var import_react = require("react");
37
37
  var import_LocaleWrapper = __toESM(require("../../locale/LocaleWrapper"));
38
38
  var import_constant = require("../constant");
39
39
  var import_zh_CN = __toESM(require("../locale/zh-CN"));
40
40
  var import_classnames = __toESM(require("classnames"));
41
+ var import_jsx_runtime = require("react/jsx-runtime");
41
42
  var BoundaryCode = (props) => {
42
43
  const { children, onClick, code, imageUrl, title, buttonText, locale, className, ...restProps } = props;
43
44
  const info = (0, import_react.useMemo)(() => {
44
45
  const data = (0, import_constant.CODE_PRESET)(locale);
45
46
  return data[code];
46
47
  }, [code, locale]);
47
- return /* @__PURE__ */ import_react.default.createElement(
48
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
48
49
  "div",
49
50
  {
50
51
  className: (0, import_classnames.default)(
@@ -53,9 +54,14 @@ var BoundaryCode = (props) => {
53
54
  `ob-boundary-${code}`,
54
55
  className
55
56
  ),
56
- ...restProps
57
- },
58
- /* @__PURE__ */ import_react.default.createElement("div", { className: "empty" }, /* @__PURE__ */ import_react.default.createElement("img", { src: imageUrl || info.imageUrl }), /* @__PURE__ */ import_react.default.createElement("h4", null, title || info.title), children, /* @__PURE__ */ import_react.default.createElement(import_design.Button, { type: "primary", onClick: onClick || info.onClick }, buttonText || info.buttonText))
57
+ ...restProps,
58
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "empty", children: [
59
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: imageUrl || info.imageUrl }),
60
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { children: title || info.title }),
61
+ children,
62
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Button, { type: "primary", onClick: onClick || info.onClick, children: buttonText || info.buttonText })
63
+ ] })
64
+ }
59
65
  );
60
66
  };
61
67
  var Code = (0, import_LocaleWrapper.default)({
@@ -38,6 +38,7 @@ var import_LocaleWrapper = __toESM(require("../../locale/LocaleWrapper"));
38
38
  var import_constant = require("../constant");
39
39
  var import_zh_CN = __toESM(require("../locale/zh-CN"));
40
40
  var import_classnames = __toESM(require("classnames"));
41
+ var import_jsx_runtime = require("react/jsx-runtime");
41
42
  var BoundaryException = class extends import_react.default.PureComponent {
42
43
  constructor() {
43
44
  super(...arguments);
@@ -85,31 +86,36 @@ var BoundaryException = class extends import_react.default.PureComponent {
85
86
  const errorDescription = info == null ? void 0 : info.componentStack;
86
87
  const errorMessage = (error || "").toString();
87
88
  if ((_a = this.state) == null ? void 0 : _a.hasError) {
88
- return /* @__PURE__ */ import_react.default.createElement(
89
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
89
90
  "div",
90
91
  {
91
92
  className: (0, import_classnames.default)("boundary-container", "ob-boundary-error", className),
92
- ...restProps
93
- },
94
- /* @__PURE__ */ import_react.default.createElement("div", { className: "empty" }, /* @__PURE__ */ import_react.default.createElement("img", { src: imageUrl || errorInfo.imageUrl }), /* @__PURE__ */ import_react.default.createElement("h4", null, title || errorInfo.title), showError ? /* @__PURE__ */ import_react.default.createElement(
95
- import_design.Alert,
96
- {
97
- type: "error",
98
- showIcon: true,
99
- message: errorMessage,
100
- description: errorDescription,
101
- style: {
102
- marginTop: 24,
103
- overflow: "auto",
104
- maxHeight: "50vh",
105
- // 为了避免被 Empty 的水平居中样式影响,需要设置 textAlign
106
- textAlign: "left"
107
- }
108
- }
109
- ) : subscription && /* @__PURE__ */ import_react.default.createElement("span", null, subscription), hasButton ? /* @__PURE__ */ import_react.default.createElement(import_design.Button, { type: "primary", onClick: () => this.onClick() }, buttonText || errorInfo.buttonText) : "")
93
+ ...restProps,
94
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "empty", children: [
95
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: imageUrl || errorInfo.imageUrl }),
96
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { children: title || errorInfo.title }),
97
+ showError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
98
+ import_design.Alert,
99
+ {
100
+ type: "error",
101
+ showIcon: true,
102
+ message: errorMessage,
103
+ description: errorDescription,
104
+ style: {
105
+ marginTop: 24,
106
+ overflow: "auto",
107
+ maxHeight: "50vh",
108
+ // 为了避免被 Empty 的水平居中样式影响,需要设置 textAlign
109
+ textAlign: "left"
110
+ }
111
+ }
112
+ ) : subscription && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: subscription }),
113
+ hasButton ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Button, { type: "primary", onClick: () => this.onClick(), children: buttonText || errorInfo.buttonText }) : ""
114
+ ] })
115
+ }
110
116
  );
111
117
  } else if (isNotCompatible) {
112
- return /* @__PURE__ */ import_react.default.createElement(
118
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
113
119
  "div",
114
120
  {
115
121
  className: (0, import_classnames.default)(
@@ -117,9 +123,13 @@ var BoundaryException = class extends import_react.default.PureComponent {
117
123
  "ob-boundary-browser-not-compatible",
118
124
  className
119
125
  ),
120
- ...restProps
121
- },
122
- /* @__PURE__ */ import_react.default.createElement("div", { className: "empty" }, /* @__PURE__ */ import_react.default.createElement("img", { src: imageUrl || notCompatibleInfo.imageUrl }), /* @__PURE__ */ import_react.default.createElement("h4", null, title || notCompatibleInfo.title), /* @__PURE__ */ import_react.default.createElement("span", null, subscription ? subscription : notCompatibleInfo.subscription))
126
+ ...restProps,
127
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "empty", children: [
128
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: imageUrl || notCompatibleInfo.imageUrl }),
129
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { children: title || notCompatibleInfo.title }),
130
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: subscription ? subscription : notCompatibleInfo.subscription })
131
+ ] })
132
+ }
123
133
  );
124
134
  }
125
135
  return this.props.children;
@@ -33,20 +33,26 @@ __export(Function_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(Function_exports);
35
35
  var import_design = require("@oceanbase/design");
36
- var import_react = __toESM(require("react"));
36
+ var import_react = require("react");
37
37
  var import_classnames = __toESM(require("classnames"));
38
+ var import_jsx_runtime = require("react/jsx-runtime");
38
39
  var BoundaryFunction = (props) => {
39
40
  const { children, state, config, onClick, className, ...restProps } = props;
40
41
  const info = (0, import_react.useMemo)(() => {
41
42
  return state ? config[state] : config[Object.keys(config)[0]];
42
43
  }, [config, state]);
43
- return /* @__PURE__ */ import_react.default.createElement(
44
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
45
  "div",
45
46
  {
46
47
  className: (0, import_classnames.default)("boundary-container", "ob-boundary-function", className),
47
- ...restProps
48
- },
49
- /* @__PURE__ */ import_react.default.createElement("div", { className: "empty" }, /* @__PURE__ */ import_react.default.createElement("img", { src: info.imageUrl }), /* @__PURE__ */ import_react.default.createElement("h4", null, info.title), children, info.buttonText && /* @__PURE__ */ import_react.default.createElement(import_design.Button, { type: "primary", onClick: onClick || info.onClick }, info.buttonText))
48
+ ...restProps,
49
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "empty", children: [
50
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("img", { src: info.imageUrl }),
51
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h4", { children: info.title }),
52
+ children,
53
+ info.buttonText && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Button, { type: "primary", onClick: onClick || info.onClick, children: info.buttonText })
54
+ ] })
55
+ }
50
56
  );
51
57
  };
52
58
  // Annotate the CommonJS export names for ESM import in node:
@@ -0,0 +1,11 @@
1
+ declare const _default: {
2
+ goHome: string;
3
+ noPermission: string;
4
+ noPage: string;
5
+ normal: string;
6
+ test: string;
7
+ collapse: string;
8
+ incompatible: string;
9
+ proposal: string;
10
+ };
11
+ export default _default;
@@ -0,0 +1,34 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/Boundary/locale/ja-JP.ts
20
+ var ja_JP_exports = {};
21
+ __export(ja_JP_exports, {
22
+ default: () => ja_JP_default
23
+ });
24
+ module.exports = __toCommonJS(ja_JP_exports);
25
+ var ja_JP_default = {
26
+ goHome: "ホームに戻る",
27
+ noPermission: "このページへのアクセス権限がありません",
28
+ noPage: "このページが見つかりません",
29
+ normal: "正常動作",
30
+ test: "クリックしてクラッシュ効果をテスト",
31
+ collapse: "ページがクラッシュしました~",
32
+ incompatible: "ブラウザバージョンが互換性がありません",
33
+ proposal: "ブラウザバージョンが低すぎます。セキュリティリスクを避けるため、Chrome ブラウザのバージョン 80 以上を使用することをお勧めします"
34
+ };
@@ -32,12 +32,13 @@ __export(ContentWithIcon_exports, {
32
32
  default: () => ContentWithIcon_default
33
33
  });
34
34
  module.exports = __toCommonJS(ContentWithIcon_exports);
35
- var import_react = __toESM(require("react"));
35
+ var import_react = require("react");
36
36
  var import_antd = require("antd");
37
37
  var import_icons = require("@oceanbase/icons");
38
38
  var import_classnames = __toESM(require("classnames"));
39
39
  var import_util = require("../_util");
40
40
  var import_index = require("./index.less");
41
+ var import_jsx_runtime = require("react/jsx-runtime");
41
42
  var prefix = (0, import_util.getPrefix)("content-with-question");
42
43
  var ContentWithIcon = ({
43
44
  content,
@@ -58,7 +59,7 @@ var ContentWithIcon = ({
58
59
  }) => {
59
60
  const defaultIconType = () => {
60
61
  if (iconType === "question") {
61
- return /* @__PURE__ */ import_react.default.createElement(
62
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
62
63
  import_icons.QuestionCircleOutlined,
63
64
  {
64
65
  style: { color: color === "default" ? "#132039" : color, fontSize: size },
@@ -68,7 +69,7 @@ var ContentWithIcon = ({
68
69
  }
69
70
  if (iconType === "info") {
70
71
  if (infoColor) {
71
- return /* @__PURE__ */ import_react.default.createElement(
72
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
72
73
  import_icons.InfoCircleFilled,
73
74
  {
74
75
  style: { color: infoColor, fontSize: size },
@@ -76,7 +77,7 @@ var ContentWithIcon = ({
76
77
  }
77
78
  );
78
79
  } else {
79
- return /* @__PURE__ */ import_react.default.createElement(
80
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
80
81
  import_icons.InfoCircleOutlined,
81
82
  {
82
83
  style: { color: "3333333", fontSize: size },
@@ -86,7 +87,7 @@ var ContentWithIcon = ({
86
87
  }
87
88
  }
88
89
  if (iconType === "exclamation") {
89
- return /* @__PURE__ */ import_react.default.createElement(
90
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
90
91
  import_icons.ExclamationCircleFilled,
91
92
  {
92
93
  style: { color: exclamationColor, fontSize: size },
@@ -99,32 +100,39 @@ var ContentWithIcon = ({
99
100
  const getIcon = (iconConfig) => {
100
101
  return iconConfig ? !textHidden && iconType === "info" ? (
101
102
  // 文本描述直接展示且只在 info 类型下生效
102
- /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: 4 }, iconConfig, /* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#5C6B8A" } }, "文本示意不超过二十字文本示意不超过二十字"))
103
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Space, { size: 4, children: [
104
+ iconConfig,
105
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: { color: "#5C6B8A" }, children: "文本示意不超过二十字文本示意不超过二十字" })
106
+ ] })
103
107
  ) : (
104
108
  // 提示文案描述带有链接
105
- tooltipWithLink ? /* @__PURE__ */ import_react.default.createElement(import_antd.Popover, { ...popOver }, (0, import_react.isValidElement)(iconConfig) ? iconConfig : defaultIconType()) : /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { ...tooltip }, (0, import_react.isValidElement)(iconConfig) ? iconConfig : defaultIconType())
109
+ tooltipWithLink ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Popover, { ...popOver, children: (0, import_react.isValidElement)(iconConfig) ? iconConfig : defaultIconType() }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Tooltip, { ...tooltip, children: (0, import_react.isValidElement)(iconConfig) ? iconConfig : defaultIconType() })
106
110
  ) : null;
107
111
  };
108
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
112
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
109
113
  "span",
110
114
  {
111
115
  className: (0, import_classnames.default)({
112
116
  [`${prefix}-item`]: true,
113
117
  [className]: !!className
114
118
  }),
115
- ...restProps
116
- },
117
- /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: 4 }, getIcon(
118
- // 图标在文字前
119
- prefixIcon === true ? defaultIconType() : prefixIcon
120
- ), /* @__PURE__ */ import_react.default.createElement(
121
- "span",
122
- {
123
- "data-testid": "content",
124
- style: { color: color === "default" ? "#5C6B8A" : color, fontSize: size }
125
- },
126
- content ?? children
127
- ), getIcon(suffixIcon))
128
- ));
119
+ ...restProps,
120
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Space, { size: 4, children: [
121
+ getIcon(
122
+ // 图标在文字前
123
+ prefixIcon === true ? defaultIconType() : prefixIcon
124
+ ),
125
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
126
+ "span",
127
+ {
128
+ "data-testid": "content",
129
+ style: { color: color === "default" ? "#5C6B8A" : color, fontSize: size },
130
+ children: content ?? children
131
+ }
132
+ ),
133
+ getIcon(suffixIcon)
134
+ ] })
135
+ }
136
+ ) });
129
137
  };
130
138
  var ContentWithIcon_default = ContentWithIcon;
@@ -35,8 +35,9 @@ module.exports = __toCommonJS(ContentWithQuestion_exports);
35
35
  var import_icons = require("@oceanbase/icons");
36
36
  var import_design = require("@oceanbase/design");
37
37
  var import_classnames = __toESM(require("classnames"));
38
- var import_react = __toESM(require("react"));
38
+ var import_react = require("react");
39
39
  var import_style = __toESM(require("./style"));
40
+ var import_jsx_runtime = require("react/jsx-runtime");
40
41
  var ContentWithQuestion = ({
41
42
  content,
42
43
  tooltip,
@@ -51,10 +52,14 @@ var ContentWithQuestion = ({
51
52
  const prefixCls = getPrefixCls("content-with-question", customizePrefixCls);
52
53
  const { wrapSSR } = (0, import_style.default)(prefixCls);
53
54
  const getIcon = (iconConfig) => {
54
- return iconConfig ? /* @__PURE__ */ import_react.default.createElement(import_design.Tooltip, { ...tooltip }, (0, import_react.isValidElement)(iconConfig) ? iconConfig : /* @__PURE__ */ import_react.default.createElement(import_icons.QuestionCircleOutlined, { className: `${prefixCls}-help` })) : null;
55
+ return iconConfig ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Tooltip, { ...tooltip, children: (0, import_react.isValidElement)(iconConfig) ? iconConfig : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.QuestionCircleOutlined, { className: `${prefixCls}-help` }) }) : null;
55
56
  };
56
57
  return wrapSSR(
57
- /* @__PURE__ */ import_react.default.createElement("span", { className: (0, import_classnames.default)(`${prefixCls}-item`, className), ...restProps }, /* @__PURE__ */ import_react.default.createElement(import_design.Space, null, getIcon(prefixIcon), /* @__PURE__ */ import_react.default.createElement("span", { "data-testid": "content" }, content ?? children), getIcon(suffixIcon)))
58
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_classnames.default)(`${prefixCls}-item`, className), ...restProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { children: [
59
+ getIcon(prefixIcon),
60
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "data-testid": "content", children: content ?? children }),
61
+ getIcon(suffixIcon)
62
+ ] }) })
58
63
  );
59
64
  };
60
65
  var ContentWithQuestion_default = ContentWithQuestion;