@oceanbase/ui 1.0.0-alpha.2 → 1.0.0-alpha.3

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 (73) hide show
  1. package/dist/ui.min.css +1 -1
  2. package/dist/ui.min.js +1 -1
  3. package/es/Action/style/index.d.ts +2 -2
  4. package/es/FooterToolbar/style/index.d.ts +0 -2
  5. package/es/FooterToolbar/style/index.js +0 -12
  6. package/es/Highlight/index.d.ts +1 -1
  7. package/es/ProCard/style/index.d.ts +2 -2
  8. package/es/ProCard/style/index.js +3 -2
  9. package/es/ProTable/style/index.d.ts +2 -2
  10. package/es/ProTable/style/index.js +6 -5
  11. package/lib/Action/Group.js +57 -46
  12. package/lib/Action/Item.js +14 -9
  13. package/lib/Action/style/index.d.ts +2 -2
  14. package/lib/BackgroundTaskManager/RefreshMan.js +3 -12
  15. package/lib/BackgroundTaskManager/index.js +3 -12
  16. package/lib/BasicLayout/Header.js +120 -62
  17. package/lib/BasicLayout/index.js +166 -143
  18. package/lib/BatchOperationBar/index.js +59 -44
  19. package/lib/Boundary/Components/Code.js +11 -5
  20. package/lib/Boundary/Components/Exception.js +33 -23
  21. package/lib/Boundary/Components/Function.js +11 -5
  22. package/lib/ContentWithIcon/index.js +30 -22
  23. package/lib/ContentWithQuestion/index.js +8 -3
  24. package/lib/DateRanger/PickerPanel.js +235 -217
  25. package/lib/DateRanger/Ranger.js +349 -313
  26. package/lib/Dialog/Anchor.js +8 -5
  27. package/lib/Dialog/EventProxy.js +3 -12
  28. package/lib/Dialog/index.js +132 -108
  29. package/lib/DocDialog/index.js +3 -2
  30. package/lib/FooterToolbar/index.js +3 -2
  31. package/lib/FooterToolbar/style/index.d.ts +0 -2
  32. package/lib/FooterToolbar/style/index.js +0 -17
  33. package/lib/FullscreenBox/index.js +16 -7
  34. package/lib/GraphToolbar/index.js +70 -58
  35. package/lib/Highlight/DiffView/DiffCells.js +17 -10
  36. package/lib/Highlight/DiffView/index.js +35 -31
  37. package/lib/Highlight/HighlightCell.js +13 -10
  38. package/lib/Highlight/JsonView.js +15 -14
  39. package/lib/Highlight/index.d.ts +1 -1
  40. package/lib/Highlight/index.js +50 -45
  41. package/lib/IconFont/index.js +2 -12
  42. package/lib/LightFilter/index.js +3 -2
  43. package/lib/LocaleDropdown/index.js +13 -20
  44. package/lib/Login/ActivateForm.js +53 -60
  45. package/lib/Login/LoginForm.js +118 -109
  46. package/lib/Login/RegisterForm.js +79 -86
  47. package/lib/Login/index.js +92 -64
  48. package/lib/NavMenu/index.js +9 -8
  49. package/lib/PageContainer/ItemRender.js +5 -5
  50. package/lib/PageContainer/index.js +9 -5
  51. package/lib/PageLoading/index.js +6 -16
  52. package/lib/Password/Content.js +38 -42
  53. package/lib/Password/index.js +83 -68
  54. package/lib/ProCard/index.js +5 -4
  55. package/lib/ProCard/style/index.d.ts +2 -2
  56. package/lib/ProCard/style/index.js +3 -2
  57. package/lib/ProTable/index.js +5 -4
  58. package/lib/ProTable/style/index.d.ts +2 -2
  59. package/lib/ProTable/style/index.js +6 -7
  60. package/lib/Ranger/QuickPicker.js +24 -15
  61. package/lib/Ranger/Ranger.js +37 -34
  62. package/lib/SideTip/Dragger.js +5 -4
  63. package/lib/SideTip/IconLoading.js +25 -25
  64. package/lib/SideTip/index.js +19 -10
  65. package/lib/TagSelect/Group.js +9 -5
  66. package/lib/TagSelect/Item.js +22 -18
  67. package/lib/TaskGraph/Graph.js +29 -24
  68. package/lib/TaskGraph/index.js +56 -50
  69. package/lib/TreeSearch/index.js +30 -35
  70. package/lib/Welcome/index.js +64 -37
  71. package/lib/Welcome/step.js +11 -4
  72. package/lib/locale/LocaleWrapper.js +15 -14
  73. package/package.json +3 -3
@@ -1,8 +1,6 @@
1
- var __create = Object.create;
2
1
  var __defProp = Object.defineProperty;
3
2
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
5
  var __export = (target, all) => {
8
6
  for (var name in all)
@@ -16,14 +14,6 @@ var __copyProps = (to, from, except, desc) => {
16
14
  }
17
15
  return to;
18
16
  };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
18
 
29
19
  // src/Password/Content.tsx
@@ -34,14 +24,14 @@ __export(Content_exports, {
34
24
  module.exports = __toCommonJS(Content_exports);
35
25
  var import_icons = require("@oceanbase/icons");
36
26
  var import_design = require("@oceanbase/design");
37
- var import_react = __toESM(require("react"));
38
27
  var import_design2 = require("@oceanbase/design");
28
+ var import_jsx_runtime = require("react/jsx-runtime");
39
29
  var Content = ({ rules, fieldError, isValidating, value, isTouched }) => {
40
30
  const { token } = import_design2.theme.useToken();
41
31
  const statusIconMap = {
42
- error: /* @__PURE__ */ import_react.default.createElement(import_icons.CloseCircleFilled, { style: { color: token.colorError } }),
43
- success: /* @__PURE__ */ import_react.default.createElement(import_icons.CheckCircleFilled, { style: { color: token.colorSuccess } }),
44
- wait: /* @__PURE__ */ import_react.default.createElement(
32
+ error: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseCircleFilled, { style: { color: token.colorError } }),
33
+ success: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CheckCircleFilled, { style: { color: token.colorSuccess } }),
34
+ wait: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
45
35
  "div",
46
36
  {
47
37
  style: {
@@ -49,19 +39,19 @@ var Content = ({ rules, fieldError, isValidating, value, isTouched }) => {
49
39
  alignItems: "center",
50
40
  justifyContent: "center",
51
41
  height: token.fontSize * token.lineHeight
52
- }
53
- },
54
- /* @__PURE__ */ import_react.default.createElement(
55
- "div",
56
- {
57
- style: {
58
- width: 8,
59
- height: 8,
60
- backgroundColor: token.colorFillSecondary,
61
- borderRadius: "50%"
42
+ },
43
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
+ "div",
45
+ {
46
+ style: {
47
+ width: 8,
48
+ height: 8,
49
+ backgroundColor: token.colorFillSecondary,
50
+ borderRadius: "50%"
51
+ }
62
52
  }
63
- }
64
- )
53
+ )
54
+ }
65
55
  )
66
56
  };
67
57
  const isRequireFail = rules.filter((rule) => !rule.optional).filter((rule) => fieldError.includes(rule.message)).length > 0;
@@ -78,21 +68,27 @@ var Content = ({ rules, fieldError, isValidating, value, isTouched }) => {
78
68
  } else {
79
69
  strokeColor = token.colorSuccess;
80
70
  }
81
- return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(import_design.Progress, { percent: value ? percent : 0, strokeColor, showInfo: false }), /* @__PURE__ */ import_react.default.createElement("ul", { style: { margin: 0, marginTop: "10px", listStyle: "none", padding: "0" } }, /* @__PURE__ */ import_react.default.createElement(import_design.Space, { size: 4, direction: "vertical" }, rules == null ? void 0 : rules.map((rule) => {
82
- const isError = fieldError.includes(rule.message);
83
- let status = "wait";
84
- if (isError) {
85
- status = rule.optional ? "wait" : "error";
86
- } else {
87
- status = "success";
88
- }
89
- if (!value) {
90
- status = "error";
91
- }
92
- if (!isTouched) {
93
- status = "wait";
94
- }
95
- return /* @__PURE__ */ import_react.default.createElement("li", { key: `${rule.message}` }, /* @__PURE__ */ import_react.default.createElement(import_design.Space, { size: status === "wait" ? 14 : 8, align: "start" }, isValidating ? /* @__PURE__ */ import_react.default.createElement(import_icons.LoadingOutlined, null) : statusIconMap[status], /* @__PURE__ */ import_react.default.createElement("span", null, rule.message)));
96
- }))));
71
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
72
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Progress, { percent: value ? percent : 0, strokeColor, showInfo: false }),
73
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", { style: { margin: 0, marginTop: "10px", listStyle: "none", padding: "0" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Space, { size: 4, direction: "vertical", children: rules == null ? void 0 : rules.map((rule) => {
74
+ const isError = fieldError.includes(rule.message);
75
+ let status = "wait";
76
+ if (isError) {
77
+ status = rule.optional ? "wait" : "error";
78
+ } else {
79
+ status = "success";
80
+ }
81
+ if (!value) {
82
+ status = "error";
83
+ }
84
+ if (!isTouched) {
85
+ status = "wait";
86
+ }
87
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { size: status === "wait" ? 14 : 8, align: "start", children: [
88
+ isValidating ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.LoadingOutlined, {}) : statusIconMap[status],
89
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: rule.message })
90
+ ] }) }, `${rule.message}`);
91
+ }) }) })
92
+ ] });
97
93
  };
98
94
  var Content_default = Content;
@@ -34,12 +34,13 @@ __export(Password_exports, {
34
34
  module.exports = __toCommonJS(Password_exports);
35
35
  var import_design = require("@oceanbase/design");
36
36
  var import_randexp = __toESM(require("randexp"));
37
- var import_react = __toESM(require("react"));
37
+ var import_react = require("react");
38
38
  var import_design2 = require("@oceanbase/design");
39
39
  var import_icons = require("@oceanbase/icons");
40
40
  var import_LocaleWrapper = __toESM(require("../locale/LocaleWrapper"));
41
41
  var import_Content = __toESM(require("./Content"));
42
42
  var import_zh_CN = __toESM(require("./locale/zh-CN"));
43
+ var import_jsx_runtime = require("react/jsx-runtime");
43
44
  var Password = ({
44
45
  value,
45
46
  locale,
@@ -95,81 +96,95 @@ var Password = ({
95
96
  }
96
97
  return getRandomPassword();
97
98
  };
98
- return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex" } }, /* @__PURE__ */ import_react.default.createElement(
99
- import_design.Popover,
100
- {
101
- trigger: "click",
102
- placement: "right",
103
- popupAlign: {
104
- offset: [48, 0]
105
- },
106
- content: /* @__PURE__ */ import_react.default.createElement(
107
- import_Content.default,
99
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
100
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex" }, children: [
101
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
102
+ import_design.Popover,
108
103
  {
109
- isTouched,
110
- value,
111
- isValidating,
112
- rules: newRules,
113
- fieldError
104
+ trigger: "click",
105
+ placement: "right",
106
+ popupAlign: {
107
+ offset: [48, 0]
108
+ },
109
+ content: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
110
+ import_Content.default,
111
+ {
112
+ isTouched,
113
+ value,
114
+ isValidating,
115
+ rules: newRules,
116
+ fieldError
117
+ }
118
+ ),
119
+ overlayStyle: { maxWidth: 400 },
120
+ overlayInnerStyle: {
121
+ padding: `${token.padding / 2}px ${token.padding}px ${token.padding}px ${token.padding}px`
122
+ },
123
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
124
+ import_design.Input.Password,
125
+ {
126
+ value,
127
+ autoComplete: "new-password",
128
+ onChange: (e) => {
129
+ var _a;
130
+ handleChange((_a = e == null ? void 0 : e.target) == null ? void 0 : _a.value);
131
+ },
132
+ placeholder: generatePasswordRegex ? locale.generatePlaceholder : locale.placeholder,
133
+ ...restProps
134
+ }
135
+ )
114
136
  }
115
137
  ),
116
- overlayStyle: { maxWidth: 400 },
117
- overlayInnerStyle: {
118
- padding: `${token.padding / 2}px ${token.padding}px ${token.padding}px ${token.padding}px`
119
- }
120
- },
121
- /* @__PURE__ */ import_react.default.createElement(
122
- import_design.Input.Password,
123
- {
124
- value,
125
- autoComplete: "new-password",
126
- onChange: (e) => {
127
- var _a;
128
- handleChange((_a = e == null ? void 0 : e.target) == null ? void 0 : _a.value);
129
- },
130
- placeholder: generatePasswordRegex ? locale.generatePlaceholder : locale.placeholder,
131
- ...restProps
132
- }
133
- )
134
- ), generatePasswordRegex && /* @__PURE__ */ import_react.default.createElement(
135
- import_design.Button,
136
- {
137
- onClick: () => {
138
- if (generatePassword instanceof Function) {
139
- handleChange(generatePassword());
140
- } else {
141
- handleChange(getRandomPassword());
138
+ generatePasswordRegex && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
139
+ import_design.Button,
140
+ {
141
+ onClick: () => {
142
+ if (generatePassword instanceof Function) {
143
+ handleChange(generatePassword());
144
+ } else {
145
+ handleChange(getRandomPassword());
146
+ }
147
+ },
148
+ style: { marginLeft: 8 },
149
+ children: locale.randomlyGenerate
142
150
  }
143
- },
144
- style: { marginLeft: 8 }
145
- },
146
- locale.randomlyGenerate
147
- )), value && (fieldError == null ? void 0 : fieldError.length) === 0 && /* @__PURE__ */ import_react.default.createElement(
148
- "div",
149
- {
150
- style: {
151
- fontSize: 14,
152
- color: token.colorTextTertiary,
153
- lineHeight: "22px",
154
- marginTop: token.marginXXS
155
- }
156
- },
157
- locale.pleaseRememberYourPassword,
158
- /* @__PURE__ */ import_react.default.createElement(
159
- import_design.Typography.Text,
151
+ )
152
+ ] }),
153
+ value && (fieldError == null ? void 0 : fieldError.length) === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
154
+ "div",
160
155
  {
161
- copyable: {
162
- text: value,
163
- icon: [
164
- /* @__PURE__ */ import_react.default.createElement(import_design.Space, { key: "copy", size: token.marginXXS }, /* @__PURE__ */ import_react.default.createElement(import_icons.CopyOutlined, null), /* @__PURE__ */ import_react.default.createElement("a", null, locale.copyPassword)),
165
- /* @__PURE__ */ import_react.default.createElement(import_design.Space, { key: "copy-success", size: token.marginXXS }, /* @__PURE__ */ import_react.default.createElement(import_icons.CheckOutlined, null), /* @__PURE__ */ import_react.default.createElement("a", null, locale.copyPassword))
166
- ],
167
- tooltips: ["", locale.copySuccessfully]
156
+ style: {
157
+ fontSize: 14,
158
+ color: token.colorTextTertiary,
159
+ lineHeight: "22px",
160
+ marginTop: token.marginXXS
168
161
  },
169
- style: { marginLeft: token.marginXS }
162
+ children: [
163
+ locale.pleaseRememberYourPassword,
164
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
165
+ import_design.Typography.Text,
166
+ {
167
+ copyable: {
168
+ text: value,
169
+ icon: [
170
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { size: token.marginXXS, children: [
171
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CopyOutlined, {}),
172
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { children: locale.copyPassword })
173
+ ] }, "copy"),
174
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { size: token.marginXXS, children: [
175
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CheckOutlined, {}),
176
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { children: locale.copyPassword })
177
+ ] }, "copy-success")
178
+ ],
179
+ tooltips: ["", locale.copySuccessfully]
180
+ },
181
+ style: { marginLeft: token.marginXS }
182
+ }
183
+ )
184
+ ]
170
185
  }
171
186
  )
172
- ));
187
+ ] });
173
188
  };
174
189
  var Password_default = (0, import_LocaleWrapper.default)({
175
190
  componentName: "Password",
@@ -32,13 +32,14 @@ __export(ProCard_exports, {
32
32
  default: () => ProCard_default
33
33
  });
34
34
  module.exports = __toCommonJS(ProCard_exports);
35
- var import_react = __toESM(require("react"));
35
+ var import_react = require("react");
36
36
  var import_pro_components = require("@ant-design/pro-components");
37
37
  var import_design = require("@oceanbase/design");
38
38
  var import_util = require("@oceanbase/design/es/_util");
39
39
  var import_icons = require("@oceanbase/icons");
40
40
  var import_classnames = __toESM(require("classnames"));
41
41
  var import_style = __toESM(require("./style"));
42
+ var import_jsx_runtime = require("react/jsx-runtime");
42
43
  var ProCard = ({
43
44
  loading,
44
45
  bordered,
@@ -72,10 +73,10 @@ var ProCard = ({
72
73
  className
73
74
  );
74
75
  return wrapSSR(
75
- /* @__PURE__ */ import_react.default.createElement(
76
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
76
77
  import_pro_components.ProCard,
77
78
  {
78
- loading: loading === true ? /* @__PURE__ */ import_react.default.createElement(import_design.Skeleton, { active: true, title: false, paragraph: { rows: 4 } }) : loading,
79
+ loading: loading === true ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Skeleton, { active: true, title: false, paragraph: { rows: 4 } }) : loading,
79
80
  prefixCls: customizePrefixCls,
80
81
  bordered: bordered ?? ((contextCard == null ? void 0 : contextCard.variant) ? (contextCard == null ? void 0 : contextCard.variant) === "outlined" : void 0),
81
82
  ghost,
@@ -92,7 +93,7 @@ var ProCard = ({
92
93
  ...style
93
94
  },
94
95
  collapsibleIconRender: ({ collapsed }) => {
95
- return /* @__PURE__ */ import_react.default.createElement(
96
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
96
97
  import_icons.CaretRightFilled,
97
98
  {
98
99
  className: `${iconPrefixCls} ${iconPrefixCls}-right ${prefixCls}-collapsible-icon`,
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import type { GenerateStyle } from '@oceanbase/design/es/theme';
2
+ import type { CSSObject } from '@ant-design/cssinjs';
3
3
  import type { OBToken } from '../../_util/genComponentStyleHook';
4
- export declare const genProCardStyle: GenerateStyle<OBToken>;
4
+ export declare const genProCardStyle: (token: OBToken, outerComponentCls?: string) => CSSObject;
5
5
  declare const _default: (prefixCls: string) => {
6
6
  wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
7
7
  hashId: string;
@@ -25,8 +25,9 @@ __export(style_exports, {
25
25
  module.exports = __toCommonJS(style_exports);
26
26
  var import_design = require("@oceanbase/design");
27
27
  var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
28
- var genProCardStyle = (token) => {
29
- const { componentCls, antCls, prefixCls } = token;
28
+ var genProCardStyle = (token, outerComponentCls) => {
29
+ const { componentCls: innerComponentCls, antCls, prefixCls } = token;
30
+ const componentCls = outerComponentCls || innerComponentCls;
30
31
  const tableComponentCls = `${antCls}-table`;
31
32
  const tabsComponentCls = `${antCls}-tabs`;
32
33
  const tabsPrefixCls = `${prefixCls}-tabs`;
@@ -32,13 +32,14 @@ __export(ProTable_exports, {
32
32
  default: () => ProTable_default
33
33
  });
34
34
  module.exports = __toCommonJS(ProTable_exports);
35
- var import_react = __toESM(require("react"));
35
+ var import_react = require("react");
36
36
  var import_pro_components = require("@ant-design/pro-components");
37
37
  var import_design = require("@oceanbase/design");
38
38
  var import_classnames = __toESM(require("classnames"));
39
39
  var import_lodash = require("lodash");
40
40
  var import_style = __toESM(require("../LightFilter/style"));
41
41
  var import_style2 = __toESM(require("./style"));
42
+ var import_jsx_runtime = require("react/jsx-runtime");
42
43
  function ProTable({
43
44
  form,
44
45
  headerTitle,
@@ -79,7 +80,7 @@ function ProTable({
79
80
  const prefixCls = getPrefixCls("pro-table", customizePrefixCls);
80
81
  const { wrapSSR } = (0, import_style2.default)(prefixCls);
81
82
  const proTableCls = (0, import_classnames.default)(className);
82
- const { emptyText = /* @__PURE__ */ import_react.default.createElement(import_design.Empty, { image: import_design.Empty.PRESENTED_IMAGE_SIMPLE }), ...restLocale } = locale || {};
83
+ const { emptyText = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Empty, { image: import_design.Empty.PRESENTED_IMAGE_SIMPLE }), ...restLocale } = locale || {};
83
84
  const cardProps = (0, import_lodash.merge)(
84
85
  {},
85
86
  contextCard,
@@ -89,7 +90,7 @@ function ProTable({
89
90
  return tableWrapSSR(
90
91
  lightFilterWrapSSR(
91
92
  wrapSSR(
92
- /* @__PURE__ */ import_react.default.createElement(
93
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
93
94
  import_pro_components.ProTable,
94
95
  {
95
96
  defaultSize: "large",
@@ -131,7 +132,7 @@ function ProTable({
131
132
  footer,
132
133
  locale: {
133
134
  ...restLocale,
134
- emptyText: /* @__PURE__ */ import_react.default.createElement("div", { className: `${tablePrefixCls}-empty-wrapper` }, typeof emptyText === "function" ? emptyText() : emptyText)
135
+ emptyText: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${tablePrefixCls}-empty-wrapper`, children: typeof emptyText === "function" ? emptyText() : emptyText })
135
136
  },
136
137
  prefixCls: customizePrefixCls,
137
138
  tableClassName: tableCls,
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import type { GenerateStyle } from '@oceanbase/design/es/theme';
2
+ import type { CSSObject } from '@ant-design/cssinjs';
3
3
  import type { OBToken } from '../../_util/genComponentStyleHook';
4
- export declare const genProTableStyle: GenerateStyle<OBToken>;
4
+ export declare const genProTableStyle: (token: OBToken) => CSSObject;
5
5
  declare const _default: (prefixCls: string) => {
6
6
  wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
7
7
  hashId: string;
@@ -25,6 +25,7 @@ __export(style_exports, {
25
25
  module.exports = __toCommonJS(style_exports);
26
26
  var import_design = require("@oceanbase/design");
27
27
  var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
28
+ var import_style = require("../../ProCard/style");
28
29
  var genProTableStyle = (token) => {
29
30
  const { antCls, componentCls, proComponentsCls } = token;
30
31
  const proCardComponentCls = `${proComponentsCls}-card`;
@@ -36,12 +37,9 @@ var genProTableStyle = (token) => {
36
37
  flexDirection: "row-reverse"
37
38
  }
38
39
  },
39
- [`${proCardComponentCls}:not(${proCardComponentCls}-no-divider)`]: {
40
- [`${proCardComponentCls}-body`]: {
41
- [`${componentCls}-list-toolbar-container`]: {
42
- borderBottom: `${token.lineWidth}px solid ${token.colorBorderSecondary}`
43
- }
44
- }
40
+ // Remove nested ProCard box-shadow
41
+ [`& > ${proCardComponentCls}, ${proCardComponentCls}${componentCls}-search-light-filter`]: {
42
+ boxShadow: "none !important"
45
43
  },
46
44
  [`${proCardComponentCls}${proCardComponentCls}-no-padding`]: {
47
45
  [`${proCardComponentCls}-body`]: {
@@ -55,7 +53,8 @@ var genProTableStyle = (token) => {
55
53
  componentCls: proCardComponentCls
56
54
  })
57
55
  }
58
- }
56
+ },
57
+ ...(0, import_style.genProCardStyle)(token, proCardComponentCls)
59
58
  };
60
59
  };
61
60
  var style_default = (prefixCls) => {
@@ -38,9 +38,10 @@ var import_classnames = __toESM(require("classnames"));
38
38
  var import_dayjs = __toESM(require("dayjs"));
39
39
  var import_lodash = require("lodash");
40
40
  var import_moment = __toESM(require("moment"));
41
- var import_react = __toESM(require("react"));
41
+ var import_react = require("react");
42
42
  var import_util = require("../_util");
43
43
  var import_constant = require("./constant");
44
+ var import_jsx_runtime = require("react/jsx-runtime");
44
45
  var prefix = (0, import_util.getPrefix)("ranger-quick-picker");
45
46
  var RangeDropdown = ({
46
47
  selects,
@@ -50,19 +51,25 @@ var RangeDropdown = ({
50
51
  locale = {},
51
52
  ...rest
52
53
  }) => {
53
- const menu = /* @__PURE__ */ import_react.default.createElement(
54
+ const menu = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
54
55
  import_design.Menu,
55
56
  {
56
57
  onClick: (e) => {
57
58
  onChange(e.key);
58
59
  },
59
- style: { minWidth: 120 }
60
- },
61
- selects.map((item) => /* @__PURE__ */ import_react.default.createElement(import_design.Menu.Item, { key: item.name }, locale[item.name] || item.name)),
62
- customable && /* @__PURE__ */ import_react.default.createElement(import_design.Menu.Item, { key: import_constant.CUSTOMIZE }, locale.customize)
60
+ style: { minWidth: 120 },
61
+ children: [
62
+ selects.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Menu.Item, { children: locale[item.name] || item.name }, item.name)),
63
+ customable && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Menu.Item, { children: locale.customize }, import_constant.CUSTOMIZE)
64
+ ]
65
+ }
63
66
  );
64
67
  const match = selects.find((item) => item.name === value);
65
- return /* @__PURE__ */ import_react.default.createElement(import_design.Dropdown, { overlay: menu, ...rest }, /* @__PURE__ */ import_react.default.createElement(import_design.Space, { style: { cursor: "pointer" }, className: (0, import_classnames.default)(prefix, `${prefix}-dropdown`) }, /* @__PURE__ */ import_react.default.createElement(import_icons.ClockCircleOutlined, null), locale[match == null ? void 0 : match.name] || (match == null ? void 0 : match.name), /* @__PURE__ */ import_react.default.createElement(import_icons.DownOutlined, null)));
68
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Dropdown, { overlay: menu, ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_design.Space, { style: { cursor: "pointer" }, className: (0, import_classnames.default)(prefix, `${prefix}-dropdown`), children: [
69
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.ClockCircleOutlined, {}),
70
+ locale[match == null ? void 0 : match.name] || (match == null ? void 0 : match.name),
71
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.DownOutlined, {})
72
+ ] }) });
66
73
  };
67
74
  var RangeSelect = ({
68
75
  selects,
@@ -76,7 +83,7 @@ var RangeSelect = ({
76
83
  const handleChange = (nextValue) => {
77
84
  onChange(nextValue);
78
85
  };
79
- return /* @__PURE__ */ import_react.default.createElement(
86
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
80
87
  import_design.Select,
81
88
  {
82
89
  className: (0, import_classnames.default)(prefix, `${prefix}-select`),
@@ -84,12 +91,14 @@ var RangeSelect = ({
84
91
  onSelect: handleChange,
85
92
  value,
86
93
  size,
87
- ...rest
88
- },
89
- selects.map((item) => {
90
- return /* @__PURE__ */ import_react.default.createElement(import_design.Select.Option, { key: item.name, value: item.name }, locale[item.name] || item.name);
91
- }),
92
- customable && /* @__PURE__ */ import_react.default.createElement(import_design.Select.Option, { key: import_constant.CUSTOMIZE, value: import_constant.CUSTOMIZE }, locale.customize)
94
+ ...rest,
95
+ children: [
96
+ selects.map((item) => {
97
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Select.Option, { value: item.name, children: locale[item.name] || item.name }, item.name);
98
+ }),
99
+ customable && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Select.Option, { value: import_constant.CUSTOMIZE, children: locale.customize }, import_constant.CUSTOMIZE)
100
+ ]
101
+ }
93
102
  );
94
103
  };
95
104
  var QuickPicker_default = (props) => {
@@ -118,5 +127,5 @@ var QuickPicker_default = (props) => {
118
127
  }
119
128
  onNameChange(value);
120
129
  };
121
- return type === "select" ? /* @__PURE__ */ import_react.default.createElement(RangeSelect, { value: innerName, selects, onChange: handleChange, ...rest }) : /* @__PURE__ */ import_react.default.createElement(RangeDropdown, { value: innerName, selects, onChange: handleChange, ...rest });
130
+ return type === "select" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RangeSelect, { value: innerName, selects, onChange: handleChange, ...rest }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RangeDropdown, { value: innerName, selects, onChange: handleChange, ...rest });
122
131
  };
@@ -37,13 +37,14 @@ var import_dayjs = __toESM(require("dayjs"));
37
37
  var import_lodash = require("lodash");
38
38
  var import_moment = __toESM(require("moment"));
39
39
  var import_classnames = __toESM(require("classnames"));
40
- var import_react = __toESM(require("react"));
40
+ var import_react = require("react");
41
41
  var import_LocaleWrapper = __toESM(require("../locale/LocaleWrapper"));
42
42
  var import_util = require("../_util");
43
43
  var import_constant = require("./constant");
44
44
  var import_index = require("./index.less");
45
45
  var import_zh_CN = __toESM(require("./locale/zh-CN"));
46
46
  var import_QuickPicker = __toESM(require("./QuickPicker"));
47
+ var import_jsx_runtime = require("react/jsx-runtime");
47
48
  var prefix = (0, import_util.getPrefix)("ranger");
48
49
  var Ranger = (props) => {
49
50
  var _a;
@@ -121,7 +122,7 @@ var Ranger = (props) => {
121
122
  }
122
123
  const showRange = mode === "default" || rangeName === import_constant.CUSTOMIZE;
123
124
  const showQuickPicker = selects.length !== 0;
124
- return /* @__PURE__ */ import_react.default.createElement(
125
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
125
126
  import_design.Space,
126
127
  {
127
128
  size: 0,
@@ -131,38 +132,40 @@ var Ranger = (props) => {
131
132
  },
132
133
  prefix
133
134
  ),
134
- style: rest.style
135
- },
136
- showQuickPicker && /* @__PURE__ */ import_react.default.createElement(
137
- import_QuickPicker.default,
138
- {
139
- customable: true,
140
- type: internalQuickType,
141
- onChange: rangeChange,
142
- onNameChange: handleNameChange,
143
- selects,
144
- name: rangeName,
145
- locale,
146
- isMoment,
147
- size,
148
- ...quickPickerProps
149
- }
150
- ),
151
- showRange && // @ts-ignore
152
- /* @__PURE__ */ import_react.default.createElement(
153
- import_design.DatePicker.RangePicker,
154
- {
155
- disabledDate: pastOnly ? disabledFuture : disabledDate,
156
- format: import_constant.DATE_TIME_FORMAT,
157
- defaultValue,
158
- value: innerValue || defaultInternalValue,
159
- onChange: datePickerChange,
160
- showTime: true,
161
- className: `${prefix}-range-picker`,
162
- size,
163
- ...(0, import_lodash.omit)(rest, "value", "onChange")
164
- }
165
- )
135
+ style: rest.style,
136
+ children: [
137
+ showQuickPicker && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
138
+ import_QuickPicker.default,
139
+ {
140
+ customable: true,
141
+ type: internalQuickType,
142
+ onChange: rangeChange,
143
+ onNameChange: handleNameChange,
144
+ selects,
145
+ name: rangeName,
146
+ locale,
147
+ isMoment,
148
+ size,
149
+ ...quickPickerProps
150
+ }
151
+ ),
152
+ showRange && // @ts-ignore
153
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
154
+ import_design.DatePicker.RangePicker,
155
+ {
156
+ disabledDate: pastOnly ? disabledFuture : disabledDate,
157
+ format: import_constant.DATE_TIME_FORMAT,
158
+ defaultValue,
159
+ value: innerValue || defaultInternalValue,
160
+ onChange: datePickerChange,
161
+ showTime: true,
162
+ className: `${prefix}-range-picker`,
163
+ size,
164
+ ...(0, import_lodash.omit)(rest, "value", "onChange")
165
+ }
166
+ )
167
+ ]
168
+ }
166
169
  );
167
170
  };
168
171
  var Ranger_default = (0, import_LocaleWrapper.default)({