@oceanbase/ui 1.0.0-alpha.1 → 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 (85) 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/DateRanger/Ranger.d.ts +4 -0
  5. package/es/DateRanger/Ranger.js +158 -14
  6. package/es/DateRanger/constant/index.js +1 -1
  7. package/es/DateRanger/index.less +23 -0
  8. package/es/FooterToolbar/style/index.d.ts +0 -2
  9. package/es/FooterToolbar/style/index.js +0 -12
  10. package/es/PageContainer/index.js +14 -4
  11. package/es/PageContainer/style/index.js +5 -7
  12. package/es/ProCard/index.js +11 -3
  13. package/es/ProCard/style/index.d.ts +2 -2
  14. package/es/ProCard/style/index.js +6 -3
  15. package/es/ProTable/index.d.ts +1 -1
  16. package/es/ProTable/index.js +11 -5
  17. package/es/ProTable/style/index.d.ts +2 -2
  18. package/es/ProTable/style/index.js +6 -3
  19. package/lib/Action/Group.js +57 -46
  20. package/lib/Action/Item.js +14 -9
  21. package/lib/Action/style/index.d.ts +2 -2
  22. package/lib/BackgroundTaskManager/RefreshMan.js +3 -12
  23. package/lib/BackgroundTaskManager/index.js +3 -12
  24. package/lib/BasicLayout/Header.js +120 -62
  25. package/lib/BasicLayout/index.js +166 -143
  26. package/lib/BatchOperationBar/index.js +59 -44
  27. package/lib/Boundary/Components/Code.js +11 -5
  28. package/lib/Boundary/Components/Exception.js +33 -23
  29. package/lib/Boundary/Components/Function.js +11 -5
  30. package/lib/ContentWithIcon/index.js +30 -22
  31. package/lib/ContentWithQuestion/index.js +8 -3
  32. package/lib/DateRanger/PickerPanel.js +235 -217
  33. package/lib/DateRanger/Ranger.d.ts +4 -0
  34. package/lib/DateRanger/Ranger.js +396 -227
  35. package/lib/DateRanger/constant/index.js +1 -1
  36. package/lib/DateRanger/index.less +23 -0
  37. package/lib/Dialog/Anchor.js +8 -5
  38. package/lib/Dialog/EventProxy.js +3 -12
  39. package/lib/Dialog/index.js +132 -108
  40. package/lib/DocDialog/index.js +3 -2
  41. package/lib/FooterToolbar/index.js +3 -2
  42. package/lib/FooterToolbar/style/index.d.ts +0 -2
  43. package/lib/FooterToolbar/style/index.js +0 -17
  44. package/lib/FullscreenBox/index.js +16 -7
  45. package/lib/GraphToolbar/index.js +70 -58
  46. package/lib/Highlight/DiffView/DiffCells.js +17 -10
  47. package/lib/Highlight/DiffView/index.js +35 -31
  48. package/lib/Highlight/HighlightCell.js +13 -10
  49. package/lib/Highlight/JsonView.js +15 -14
  50. package/lib/Highlight/index.js +50 -45
  51. package/lib/IconFont/index.js +2 -12
  52. package/lib/LightFilter/index.js +3 -2
  53. package/lib/LocaleDropdown/index.js +13 -20
  54. package/lib/Login/ActivateForm.js +53 -60
  55. package/lib/Login/LoginForm.js +118 -109
  56. package/lib/Login/RegisterForm.js +79 -86
  57. package/lib/Login/index.js +92 -64
  58. package/lib/NavMenu/index.js +9 -8
  59. package/lib/PageContainer/ItemRender.js +5 -5
  60. package/lib/PageContainer/index.js +17 -6
  61. package/lib/PageContainer/style/index.js +5 -6
  62. package/lib/PageLoading/index.js +6 -16
  63. package/lib/Password/Content.js +38 -42
  64. package/lib/Password/index.js +83 -68
  65. package/lib/ProCard/index.js +6 -3
  66. package/lib/ProCard/style/index.d.ts +2 -2
  67. package/lib/ProCard/style/index.js +6 -2
  68. package/lib/ProTable/index.d.ts +1 -1
  69. package/lib/ProTable/index.js +19 -8
  70. package/lib/ProTable/style/index.d.ts +2 -2
  71. package/lib/ProTable/style/index.js +7 -1
  72. package/lib/Ranger/QuickPicker.js +24 -15
  73. package/lib/Ranger/Ranger.js +37 -34
  74. package/lib/SideTip/Dragger.js +5 -4
  75. package/lib/SideTip/IconLoading.js +25 -25
  76. package/lib/SideTip/index.js +19 -10
  77. package/lib/TagSelect/Group.js +9 -5
  78. package/lib/TagSelect/Item.js +22 -18
  79. package/lib/TaskGraph/Graph.js +29 -24
  80. package/lib/TaskGraph/index.js +56 -50
  81. package/lib/TreeSearch/index.js +30 -35
  82. package/lib/Welcome/index.js +64 -37
  83. package/lib/Welcome/step.js +11 -4
  84. package/lib/locale/LocaleWrapper.js +15 -14
  85. package/package.json +4 -4
@@ -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,14 +32,16 @@ __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 = ({
44
+ loading,
43
45
  bordered,
44
46
  ghost,
45
47
  title,
@@ -71,9 +73,10 @@ var ProCard = ({
71
73
  className
72
74
  );
73
75
  return wrapSSR(
74
- /* @__PURE__ */ import_react.default.createElement(
76
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
75
77
  import_pro_components.ProCard,
76
78
  {
79
+ loading: loading === true ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Skeleton, { active: true, title: false, paragraph: { rows: 4 } }) : loading,
77
80
  prefixCls: customizePrefixCls,
78
81
  bordered: bordered ?? ((contextCard == null ? void 0 : contextCard.variant) ? (contextCard == null ? void 0 : contextCard.variant) === "outlined" : void 0),
79
82
  ghost,
@@ -90,7 +93,7 @@ var ProCard = ({
90
93
  ...style
91
94
  },
92
95
  collapsibleIconRender: ({ collapsed }) => {
93
- return /* @__PURE__ */ import_react.default.createElement(
96
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
94
97
  import_icons.CaretRightFilled,
95
98
  {
96
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`;
@@ -36,6 +37,9 @@ var genProCardStyle = (token) => {
36
37
  [`div${componentCls}`]: {
37
38
  borderRadius: token.borderRadiusLG
38
39
  },
40
+ [`${componentCls}${componentCls}-border`]: {
41
+ border: `${token.lineWidth}px solid ${token.colorBorderSecondary}`
42
+ },
39
43
  [`${componentCls}:not(${componentCls}-border):not(${componentCls}-ghost)`]: {
40
44
  boxShadow: "0 1px 2px 0 rgba(0, 0, 0, 0.03),0 1px 6px -1px rgba(0, 0, 0, 0.02),0 2px 4px 0 rgba(0, 0, 0, 0.02)"
41
45
  },
@@ -3,7 +3,7 @@ import type { ProTableProps as AntProTableProps } from '@ant-design/pro-componen
3
3
  export interface ProTableProps<T, U, ValueType> extends AntProTableProps<T, U, ValueType> {
4
4
  innerBordered?: boolean;
5
5
  }
6
- declare function ProTable<T, U, ValueType>({ form, headerTitle, options, optionsRender, toolbar, toolBarRender, size, bordered, innerBordered, expandable, rowSelection, pagination: customPagination, footer, locale, cardProps: outerCardProps, prefixCls: customizePrefixCls, tableClassName, className, ...restProps }: ProTableProps<T, U, ValueType>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
6
+ declare function ProTable<T, U, ValueType>({ form, headerTitle, options, optionsRender, toolbar, toolBarRender, size, bordered, innerBordered, cardBordered, expandable, rowSelection, pagination: customPagination, footer, locale, cardProps: outerCardProps, prefixCls: customizePrefixCls, tableClassName, className, ...restProps }: ProTableProps<T, U, ValueType>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
7
7
  declare namespace ProTable {
8
8
  var Summary;
9
9
  }
@@ -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,
@@ -49,6 +50,7 @@ function ProTable({
49
50
  size,
50
51
  bordered,
51
52
  innerBordered,
53
+ cardBordered,
52
54
  expandable,
53
55
  rowSelection,
54
56
  pagination: customPagination,
@@ -60,7 +62,7 @@ function ProTable({
60
62
  className,
61
63
  ...restProps
62
64
  }) {
63
- const { getPrefixCls } = (0, import_react.useContext)(import_design.ConfigProvider.ConfigContext);
65
+ const { getPrefixCls, card: contextCard } = (0, import_react.useContext)(import_design.ConfigProvider.ConfigContext);
64
66
  const tablePrefixCls = getPrefixCls("table", customizePrefixCls);
65
67
  const { wrapSSR: tableWrapSSR } = import_design.Table.useStyle(tablePrefixCls);
66
68
  const pagination = import_design.Table.useDefaultPagination(customPagination);
@@ -78,18 +80,23 @@ function ProTable({
78
80
  const prefixCls = getPrefixCls("pro-table", customizePrefixCls);
79
81
  const { wrapSSR } = (0, import_style2.default)(prefixCls);
80
82
  const proTableCls = (0, import_classnames.default)(className);
81
- const { emptyText = /* @__PURE__ */ import_react.default.createElement(import_design.Empty, { image: import_design.Empty.PRESENTED_IMAGE_SIMPLE }), ...restLocale } = locale || {};
82
- const cardProps = typeof outerCardProps === "boolean" ? {} : outerCardProps;
83
+ const { emptyText = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_design.Empty, { image: import_design.Empty.PRESENTED_IMAGE_SIMPLE }), ...restLocale } = locale || {};
84
+ const cardProps = (0, import_lodash.merge)(
85
+ {},
86
+ contextCard,
87
+ typeof outerCardProps === "boolean" ? {} : outerCardProps
88
+ );
83
89
  const proCardCls = getPrefixCls("pro-card", customizePrefixCls);
84
90
  return tableWrapSSR(
85
91
  lightFilterWrapSSR(
86
92
  wrapSSR(
87
- /* @__PURE__ */ import_react.default.createElement(
93
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
88
94
  import_pro_components.ProTable,
89
95
  {
90
96
  defaultSize: "large",
91
97
  size,
92
98
  bordered: bordered || innerBordered,
99
+ cardBordered: cardBordered ?? ((contextCard == null ? void 0 : contextCard.variant) ? (contextCard == null ? void 0 : contextCard.variant) === "outlined" : void 0),
93
100
  form: {
94
101
  // query form should remove required mark
95
102
  requiredMark: false,
@@ -105,12 +112,16 @@ function ProTable({
105
112
  className: (0, import_classnames.default)(
106
113
  {
107
114
  [`${proCardCls}-has-title`]: !!headerTitle || options || options === void 0 || optionsRender || toolbar || toolBarRender,
108
- [`${proCardCls}-no-divider`]: !(cardProps == null ? void 0 : cardProps.headerBordered),
115
+ [`${proCardCls}-no-divider`]: !(cardProps == null ? void 0 : cardProps.headerBordered) && !(cardProps == null ? void 0 : cardProps.divided),
109
116
  [`${proCardCls}-no-padding`]: true,
110
117
  [`${proCardCls}-contain-tabs`]: !!(cardProps == null ? void 0 : cardProps.tabs)
111
118
  },
112
119
  cardProps == null ? void 0 : cardProps.className
113
- )
120
+ ),
121
+ bodyStyle: {
122
+ paddingBlock: 0,
123
+ ...cardProps == null ? void 0 : cardProps.bodyStyle
124
+ }
114
125
  },
115
126
  expandable: expandable ? {
116
127
  columnWidth: !size || size === "large" ? 40 : 32,
@@ -121,7 +132,7 @@ function ProTable({
121
132
  footer,
122
133
  locale: {
123
134
  ...restLocale,
124
- 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 })
125
136
  },
126
137
  prefixCls: customizePrefixCls,
127
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,6 +37,10 @@ var genProTableStyle = (token) => {
36
37
  flexDirection: "row-reverse"
37
38
  }
38
39
  },
40
+ // Remove nested ProCard box-shadow
41
+ [`& > ${proCardComponentCls}, ${proCardComponentCls}${componentCls}-search-light-filter`]: {
42
+ boxShadow: "none !important"
43
+ },
39
44
  [`${proCardComponentCls}${proCardComponentCls}-no-padding`]: {
40
45
  [`${proCardComponentCls}-body`]: {
41
46
  paddingInline: 0,
@@ -48,7 +53,8 @@ var genProTableStyle = (token) => {
48
53
  componentCls: proCardComponentCls
49
54
  })
50
55
  }
51
- }
56
+ },
57
+ ...(0, import_style.genProCardStyle)(token, proCardComponentCls)
52
58
  };
53
59
  };
54
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
  };