@oceanbase/design 1.0.0-alpha.2 → 1.0.0-alpha.4

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 (194) hide show
  1. package/dist/design.min.js +1 -1
  2. package/es/_util/genComponentStyleHook.d.ts +2 -2
  3. package/es/_util/genComponentStyleHook.js +15 -2
  4. package/es/alert/index.d.ts +2 -2
  5. package/es/alert/index.js +13 -4
  6. package/es/alert/style/index.d.ts +1 -1
  7. package/es/alert/style/index.js +152 -58
  8. package/es/app/index.d.ts +8 -0
  9. package/es/app/index.js +36 -1
  10. package/es/app/style/index.d.ts +9 -0
  11. package/es/{_util/genStyle.js → app/style/index.js} +10 -11
  12. package/es/badge/index.js +2 -3
  13. package/es/badge/style/index.d.ts +1 -1
  14. package/es/badge/style/index.js +1 -3
  15. package/es/button/style/index.d.ts +1 -1
  16. package/es/card/index.d.ts +4 -0
  17. package/es/card/index.js +64 -7
  18. package/es/card/style/index.d.ts +1 -1
  19. package/es/card/style/index.js +32 -8
  20. package/es/checkbox/style/index.d.ts +1 -1
  21. package/es/config-provider/context.d.ts +11 -0
  22. package/es/config-provider/context.js +2 -1
  23. package/es/config-provider/index.d.ts +2 -2
  24. package/es/config-provider/index.js +57 -34
  25. package/es/descriptions/style/index.d.ts +1 -1
  26. package/es/drawer/index.js +7 -5
  27. package/es/drawer/style/index.d.ts +1 -1
  28. package/es/drawer/style/index.js +31 -9
  29. package/es/empty/index.js +1 -1
  30. package/es/empty/style/index.d.ts +1 -1
  31. package/es/form/FormItem.d.ts +2 -1
  32. package/es/form/FormItem.js +14 -4
  33. package/es/form/style/index.d.ts +1 -1
  34. package/es/form/style/index.js +13 -2
  35. package/es/index.d.ts +4 -2
  36. package/es/index.js +1 -0
  37. package/es/input-number/index.d.ts +2 -1
  38. package/es/locale/ja-JP.d.ts +3 -0
  39. package/es/locale/ja-JP.js +28 -0
  40. package/es/modal/Modal.js +20 -6
  41. package/es/modal/style/index.d.ts +1 -1
  42. package/es/modal/style/index.js +62 -19
  43. package/es/radio/style/index.d.ts +1 -1
  44. package/es/result/index.d.ts +2 -2
  45. package/es/result/index.js +5 -4
  46. package/es/result/style/index.d.ts +1 -1
  47. package/es/select/style/index.d.ts +1 -1
  48. package/es/slider/style/index.d.ts +1 -1
  49. package/es/space/style/index.d.ts +1 -1
  50. package/es/spin/style/index.d.ts +1 -1
  51. package/es/static-function/index.js +13 -4
  52. package/es/switch/style/index.d.ts +1 -1
  53. package/es/table/style/index.d.ts +1 -1
  54. package/es/table/style/index.js +3 -4
  55. package/es/tabs/style/index.d.ts +1 -1
  56. package/es/tabs/style/index.js +4 -2
  57. package/es/tag/index.d.ts +1 -0
  58. package/es/tag/index.js +3 -2
  59. package/es/tag/style/index.d.ts +2 -4
  60. package/es/tag/style/index.js +20 -31
  61. package/es/theme/dark.d.ts +1 -48
  62. package/es/theme/default.d.ts +4 -2
  63. package/es/theme/default.js +59 -28
  64. package/es/theme/index.d.ts +20 -57
  65. package/es/theme/interface.d.ts +66 -0
  66. package/es/theme/interface.js +4 -1
  67. package/es/theme/style/aliyun.less +40 -40
  68. package/es/theme/style/compact.less +79 -72
  69. package/es/theme/style/dark.less +53 -53
  70. package/es/theme/style/default.less +79 -72
  71. package/es/tooltip/style/index.d.ts +1 -1
  72. package/es/tree-select/style/index.d.ts +1 -1
  73. package/lib/_util/genComponentStyleHook.d.ts +2 -2
  74. package/lib/_util/genComponentStyleHook.js +20 -4
  75. package/lib/alert/index.d.ts +2 -2
  76. package/lib/alert/index.js +18 -9
  77. package/lib/alert/style/index.d.ts +1 -1
  78. package/lib/alert/style/index.js +170 -71
  79. package/lib/app/index.d.ts +8 -0
  80. package/lib/app/index.js +36 -1
  81. package/lib/app/style/index.d.ts +9 -0
  82. package/lib/{_util/getWeakenBorderColor.js → app/style/index.js} +20 -10
  83. package/lib/badge/index.js +23 -20
  84. package/lib/badge/style/index.d.ts +1 -1
  85. package/lib/badge/style/index.js +1 -3
  86. package/lib/button/index.js +2 -1
  87. package/lib/button/style/index.d.ts +1 -1
  88. package/lib/card/index.d.ts +4 -0
  89. package/lib/card/index.js +70 -9
  90. package/lib/card/style/index.d.ts +1 -1
  91. package/lib/card/style/index.js +56 -10
  92. package/lib/checkbox/index.js +2 -1
  93. package/lib/checkbox/style/index.d.ts +1 -1
  94. package/lib/config-provider/DefaultRenderEmpty.js +4 -3
  95. package/lib/config-provider/context.d.ts +11 -0
  96. package/lib/config-provider/index.d.ts +2 -2
  97. package/lib/config-provider/index.js +70 -26
  98. package/lib/descriptions/hooks/useItems.js +5 -4
  99. package/lib/descriptions/index.js +3 -2
  100. package/lib/descriptions/style/index.d.ts +1 -1
  101. package/lib/drawer/index.js +44 -33
  102. package/lib/drawer/style/index.d.ts +1 -1
  103. package/lib/drawer/style/index.js +33 -6
  104. package/lib/dropdown/dropdown-button.js +3 -13
  105. package/lib/dropdown/index.js +2 -2
  106. package/lib/empty/colored.js +413 -327
  107. package/lib/empty/database.js +267 -222
  108. package/lib/empty/default.js +16 -21
  109. package/lib/empty/guide.js +201 -184
  110. package/lib/empty/index.js +23 -18
  111. package/lib/empty/style/index.d.ts +1 -1
  112. package/lib/form/FormItem.d.ts +2 -1
  113. package/lib/form/FormItem.js +18 -6
  114. package/lib/form/index.js +6 -3
  115. package/lib/form/style/index.d.ts +1 -1
  116. package/lib/form/style/index.js +19 -0
  117. package/lib/grid/col.js +2 -1
  118. package/lib/grid/row.js +2 -1
  119. package/lib/index.d.ts +4 -2
  120. package/lib/index.js +3 -0
  121. package/lib/input/Input.js +3 -2
  122. package/lib/input/Password.js +3 -2
  123. package/lib/input/Search.js +3 -2
  124. package/lib/input/TextArea.js +3 -2
  125. package/lib/input-number/index.d.ts +2 -1
  126. package/lib/input-number/index.js +2 -1
  127. package/lib/list/index.js +3 -2
  128. package/lib/locale/ja-JP.d.ts +3 -0
  129. package/lib/locale/ja-JP.js +60 -0
  130. package/lib/lottie/index.js +2 -1
  131. package/lib/modal/Modal.js +33 -9
  132. package/lib/modal/Progress.js +9 -5
  133. package/lib/modal/style/index.d.ts +1 -1
  134. package/lib/modal/style/index.js +76 -17
  135. package/lib/radio/index.js +2 -1
  136. package/lib/radio/style/index.d.ts +1 -1
  137. package/lib/result/403.js +156 -121
  138. package/lib/result/404.js +328 -267
  139. package/lib/result/500.js +295 -257
  140. package/lib/result/Error.js +127 -99
  141. package/lib/result/Processing.js +246 -213
  142. package/lib/result/Success.js +233 -169
  143. package/lib/result/Warning.js +611 -515
  144. package/lib/result/index.d.ts +2 -2
  145. package/lib/result/index.js +12 -11
  146. package/lib/result/style/index.d.ts +1 -1
  147. package/lib/segmented/index.js +8 -4
  148. package/lib/select/index.js +2 -1
  149. package/lib/select/style/index.d.ts +1 -1
  150. package/lib/slider/index.js +2 -1
  151. package/lib/slider/style/index.d.ts +1 -1
  152. package/lib/space/index.js +2 -1
  153. package/lib/space/style/index.d.ts +1 -1
  154. package/lib/spin/index.js +5 -4
  155. package/lib/spin/style/index.d.ts +1 -1
  156. package/lib/static-function/index.js +7 -1
  157. package/lib/switch/index.js +2 -1
  158. package/lib/switch/style/index.d.ts +1 -1
  159. package/lib/table/index.js +44 -31
  160. package/lib/table/style/index.d.ts +1 -1
  161. package/lib/table/style/index.js +3 -4
  162. package/lib/tabs/index.js +10 -5
  163. package/lib/tabs/style/index.d.ts +1 -1
  164. package/lib/tabs/style/index.js +5 -0
  165. package/lib/tag/index.d.ts +1 -0
  166. package/lib/tag/index.js +12 -6
  167. package/lib/tag/style/index.d.ts +2 -4
  168. package/lib/tag/style/index.js +20 -27
  169. package/lib/theme/dark.d.ts +1 -48
  170. package/lib/theme/default.d.ts +4 -2
  171. package/lib/theme/default.js +67 -27
  172. package/lib/theme/index.d.ts +20 -57
  173. package/lib/theme/interface.d.ts +66 -0
  174. package/lib/theme/style/aliyun.less +40 -40
  175. package/lib/theme/style/compact.less +79 -72
  176. package/lib/theme/style/dark.less +53 -53
  177. package/lib/theme/style/default.less +79 -72
  178. package/lib/tooltip/MouseTooltip.js +43 -39
  179. package/lib/tooltip/ReactStickyMouseTooltip.js +5 -4
  180. package/lib/tooltip/index.js +14 -10
  181. package/lib/tooltip/style/index.d.ts +1 -1
  182. package/lib/tree-select/index.js +2 -1
  183. package/lib/tree-select/style/index.d.ts +1 -1
  184. package/lib/typography/Link.js +5 -4
  185. package/lib/typography/Paragraph.js +5 -4
  186. package/lib/typography/Text.js +5 -4
  187. package/lib/typography/Title.js +5 -4
  188. package/package.json +7 -6
  189. package/es/_util/genStyle.d.ts +0 -2
  190. package/es/_util/getWeakenBorderColor.d.ts +0 -1
  191. package/es/_util/getWeakenBorderColor.js +0 -4
  192. package/lib/_util/genStyle.d.ts +0 -2
  193. package/lib/_util/genStyle.js +0 -43
  194. package/lib/_util/getWeakenBorderColor.d.ts +0 -1
@@ -27,6 +27,12 @@ var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
27
27
  var genFormStyle = (token) => {
28
28
  const { componentCls } = token;
29
29
  return {
30
+ [componentCls]: {
31
+ [`${componentCls}-item-extra`]: {
32
+ paddingTop: token.paddingXXS,
33
+ fontSize: token.fontSizeSM
34
+ }
35
+ },
30
36
  [`${componentCls}${componentCls}-vertical`]: {
31
37
  [`${componentCls}-item:not(${componentCls}-item-horizontal)`]: {
32
38
  [`${componentCls}-item-label > label`]: {
@@ -36,6 +42,19 @@ var genFormStyle = (token) => {
36
42
  right: 0
37
43
  }
38
44
  }
45
+ },
46
+ [`${componentCls}-item-has-description`]: {
47
+ [`${componentCls}-item-control-input`]: {
48
+ minHeight: "auto"
49
+ },
50
+ [`${componentCls}-item-label`]: {
51
+ paddingBottom: token.paddingXXS
52
+ },
53
+ [`${componentCls}-item-description`]: {
54
+ paddingBottom: token.paddingXXS + 2,
55
+ fontSize: token.fontSizeSM,
56
+ color: token.colorTextDescription
57
+ }
39
58
  }
40
59
  }
41
60
  };
package/lib/grid/col.js CHANGED
@@ -35,6 +35,7 @@ module.exports = __toCommonJS(col_exports);
35
35
  var React = __toESM(require("react"));
36
36
  var import_useFlexGapSupport = __toESM(require("../_util/useFlexGapSupport"));
37
37
  var import_antd = require("antd");
38
+ var import_jsx_runtime = require("react/jsx-runtime");
38
39
  var Col = React.forwardRef((props, ref) => {
39
40
  const { style, ...others } = props;
40
41
  const supportFlexGap = (0, import_useFlexGapSupport.default)();
@@ -45,7 +46,7 @@ var Col = React.forwardRef((props, ref) => {
45
46
  mergeStyle.paddingBottom = "8px";
46
47
  mergeStyle.paddingTop = "8px";
47
48
  }
48
- return /* @__PURE__ */ React.createElement(import_antd.Col, { ref, style: mergeStyle, ...others });
49
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Col, { ref, style: mergeStyle, ...others });
49
50
  });
50
51
  if (process.env.NODE_ENV !== "production") {
51
52
  Col.displayName = "Col";
package/lib/grid/row.js CHANGED
@@ -35,6 +35,7 @@ module.exports = __toCommonJS(row_exports);
35
35
  var React = __toESM(require("react"));
36
36
  var import_useFlexGapSupport = __toESM(require("../_util/useFlexGapSupport"));
37
37
  var import_antd = require("antd");
38
+ var import_jsx_runtime = require("react/jsx-runtime");
38
39
  var Row = React.forwardRef((props, ref) => {
39
40
  const { style, ...others } = props;
40
41
  const supportFlexGap = (0, import_useFlexGapSupport.default)();
@@ -45,7 +46,7 @@ var Row = React.forwardRef((props, ref) => {
45
46
  mergeStyle.marginTop = "-8px";
46
47
  mergeStyle.marginBottom = "-8px";
47
48
  }
48
- return /* @__PURE__ */ React.createElement(import_antd.Row, { ref, style: mergeStyle, ...others });
49
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Row, { ref, style: mergeStyle, ...others });
49
50
  });
50
51
  if (process.env.NODE_ENV !== "production") {
51
52
  Row.displayName = "Row";
package/lib/index.d.ts CHANGED
@@ -13,6 +13,8 @@ export { default as Typography } from './typography';
13
13
  export type { TypographyProps } from './typography';
14
14
  export { default as Card } from './card';
15
15
  export type { CardProps } from './card';
16
+ export { default as App } from './app';
17
+ export type { AppProps } from './app';
16
18
  export { default as ConfigProvider } from './config-provider';
17
19
  export type { ConfigProviderProps, ConfigConsumerProps, ThemeConfig } from './config-provider';
18
20
  export { default as Descriptions } from './descriptions';
@@ -68,8 +70,8 @@ export { default as Lottie } from './lottie';
68
70
  export type { LottieProps, LottieRef } from './lottie';
69
71
  export { default as theme } from './theme';
70
72
  declare const useToken: () => {
71
- theme: import("@ant-design/cssinjs").Theme<import("antd/es/theme/internal").SeedToken, import("antd/es/theme/internal").AliasToken>;
72
- token: import("antd").GlobalToken;
73
+ theme: import("@ant-design/cssinjs").Theme<import("antd/lib/theme/interface/seeds").SeedToken, import("./theme/interface").AliasToken>;
74
+ token: import("./theme/interface").GlobalToken;
73
75
  hashId: string;
74
76
  };
75
77
  export { useToken };
package/lib/index.js CHANGED
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var src_exports = {};
32
32
  __export(src_exports, {
33
33
  Alert: () => import_alert.default,
34
+ App: () => import_app.default,
34
35
  Badge: () => import_badge.default,
35
36
  Breadcrumb: () => import_breadcrumb.default,
36
37
  Button: () => import_button.default,
@@ -80,6 +81,7 @@ var import_space = __toESM(require("./space"));
80
81
  var import_grid = require("./grid");
81
82
  var import_typography = __toESM(require("./typography"));
82
83
  var import_card = __toESM(require("./card"));
84
+ var import_app = __toESM(require("./app"));
83
85
  var import_config_provider = __toESM(require("./config-provider"));
84
86
  var import_descriptions = __toESM(require("./descriptions"));
85
87
  var import_empty = __toESM(require("./empty"));
@@ -113,6 +115,7 @@ var { useToken } = import_theme2.default;
113
115
  // Annotate the CommonJS export names for ESM import in node:
114
116
  0 && (module.exports = {
115
117
  Alert,
118
+ App,
116
119
  Badge,
117
120
  Breadcrumb,
118
121
  Button,
@@ -33,11 +33,12 @@ __export(Input_exports, {
33
33
  default: () => Input_default
34
34
  });
35
35
  module.exports = __toCommonJS(Input_exports);
36
- var import_react = __toESM(require("react"));
36
+ var import_react = require("react");
37
37
  var import_antd = require("antd");
38
38
  var import_config_provider = __toESM(require("../config-provider"));
39
39
  var import_en_US = __toESM(require("../locale/en-US"));
40
40
  __reExport(Input_exports, require("antd/es/input/Input"), module.exports);
41
+ var import_jsx_runtime = require("react/jsx-runtime");
41
42
  var Input = (0, import_react.forwardRef)(({ locale: customLocale, ...restProps }, ref) => {
42
43
  var _a, _b;
43
44
  const { locale: contextLocale } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
@@ -47,7 +48,7 @@ var Input = (0, import_react.forwardRef)(({ locale: customLocale, ...restProps }
47
48
  ...contextLocale == null ? void 0 : contextLocale.Input,
48
49
  ...customLocale
49
50
  };
50
- return /* @__PURE__ */ import_react.default.createElement(import_antd.Input, { ref, placeholder: inputLocale.placeholder, ...restProps });
51
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Input, { ref, placeholder: inputLocale.placeholder, ...restProps });
51
52
  });
52
53
  if (process.env.NODE_ENV !== "production") {
53
54
  Input.displayName = "Input";
@@ -33,11 +33,12 @@ __export(Password_exports, {
33
33
  default: () => Password_default
34
34
  });
35
35
  module.exports = __toCommonJS(Password_exports);
36
- var import_react = __toESM(require("react"));
36
+ var import_react = require("react");
37
37
  var import_antd = require("antd");
38
38
  var import_config_provider = __toESM(require("../config-provider"));
39
39
  var import_en_US = __toESM(require("../locale/en-US"));
40
40
  __reExport(Password_exports, require("antd/es/input/Password"), module.exports);
41
+ var import_jsx_runtime = require("react/jsx-runtime");
41
42
  var Password = (0, import_react.forwardRef)(
42
43
  ({ locale: customLocale, ...restProps }, ref) => {
43
44
  var _a, _b;
@@ -48,7 +49,7 @@ var Password = (0, import_react.forwardRef)(
48
49
  ...contextLocale == null ? void 0 : contextLocale.Input,
49
50
  ...customLocale
50
51
  };
51
- return /* @__PURE__ */ import_react.default.createElement(import_antd.Input.Password, { ref, placeholder: inputLocale.placeholder, ...restProps });
52
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Input.Password, { ref, placeholder: inputLocale.placeholder, ...restProps });
52
53
  }
53
54
  );
54
55
  if (process.env.NODE_ENV !== "production") {
@@ -33,11 +33,12 @@ __export(Search_exports, {
33
33
  default: () => Search_default
34
34
  });
35
35
  module.exports = __toCommonJS(Search_exports);
36
- var import_react = __toESM(require("react"));
36
+ var import_react = require("react");
37
37
  var import_antd = require("antd");
38
38
  var import_config_provider = __toESM(require("../config-provider"));
39
39
  var import_en_US = __toESM(require("../locale/en-US"));
40
40
  __reExport(Search_exports, require("antd/es/input/Search"), module.exports);
41
+ var import_jsx_runtime = require("react/jsx-runtime");
41
42
  var Search = (0, import_react.forwardRef)(({ locale: customLocale, ...restProps }, ref) => {
42
43
  var _a, _b;
43
44
  const { locale: contextLocale } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
@@ -47,7 +48,7 @@ var Search = (0, import_react.forwardRef)(({ locale: customLocale, ...restProps
47
48
  ...contextLocale == null ? void 0 : contextLocale.Input,
48
49
  ...customLocale
49
50
  };
50
- return /* @__PURE__ */ import_react.default.createElement(import_antd.Input.Search, { ref, placeholder: inputLocale.placeholder, ...restProps });
51
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Input.Search, { ref, placeholder: inputLocale.placeholder, ...restProps });
51
52
  });
52
53
  if (process.env.NODE_ENV !== "production") {
53
54
  Search.displayName = "Search";
@@ -33,11 +33,12 @@ __export(TextArea_exports, {
33
33
  default: () => TextArea_default
34
34
  });
35
35
  module.exports = __toCommonJS(TextArea_exports);
36
- var import_react = __toESM(require("react"));
36
+ var import_react = require("react");
37
37
  var import_antd = require("antd");
38
38
  var import_config_provider = __toESM(require("../config-provider"));
39
39
  var import_en_US = __toESM(require("../locale/en-US"));
40
40
  __reExport(TextArea_exports, require("antd/es/input/TextArea"), module.exports);
41
+ var import_jsx_runtime = require("react/jsx-runtime");
41
42
  var TextArea = (0, import_react.forwardRef)(
42
43
  ({ locale: customLocale, ...restProps }, ref) => {
43
44
  var _a, _b;
@@ -48,7 +49,7 @@ var TextArea = (0, import_react.forwardRef)(
48
49
  ...contextLocale == null ? void 0 : contextLocale.Input,
49
50
  ...customLocale
50
51
  };
51
- return /* @__PURE__ */ import_react.default.createElement(import_antd.Input.TextArea, { ref, placeholder: inputLocale.placeholder, ...restProps });
52
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Input.TextArea, { ref, placeholder: inputLocale.placeholder, ...restProps });
52
53
  }
53
54
  );
54
55
  if (process.env.NODE_ENV !== "production") {
@@ -8,7 +8,8 @@ export interface InputNumberLocale {
8
8
  export interface InputNumberProps extends AntInputNumberProps {
9
9
  locale?: InputNumberLocale;
10
10
  }
11
- type CompoundedComponent = React.ForwardRefExoticComponent<InputNumberProps & React.RefAttributes<HTMLInputElement>> & {
11
+ type InputNumberRef = React.ComponentRef<typeof AntInputNumber>;
12
+ type CompoundedComponent = React.ForwardRefExoticComponent<InputNumberProps & React.RefAttributes<InputNumberRef>> & {
12
13
  _InternalPanelDoNotUseOrYouWillBeFired: typeof AntInputNumber._InternalPanelDoNotUseOrYouWillBeFired;
13
14
  };
14
15
  declare const InputNumber: CompoundedComponent;
@@ -38,6 +38,7 @@ var import_react = __toESM(require("react"));
38
38
  var import_config_provider = __toESM(require("../config-provider"));
39
39
  var import_en_US = __toESM(require("../locale/en-US"));
40
40
  __reExport(input_number_exports, require("antd/es/input-number"), module.exports);
41
+ var import_jsx_runtime = require("react/jsx-runtime");
41
42
  var InternalInputNumber = import_react.default.forwardRef(
42
43
  ({ locale: customLocale, ...restProps }, ref) => {
43
44
  var _a, _b;
@@ -48,7 +49,7 @@ var InternalInputNumber = import_react.default.forwardRef(
48
49
  ...contextLocale == null ? void 0 : contextLocale.InputNumber,
49
50
  ...customLocale
50
51
  };
51
- return /* @__PURE__ */ import_react.default.createElement(import_antd.InputNumber, { ref, placeholder: inputNumberLocale.placeholder, ...restProps });
52
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.InputNumber, { ref, placeholder: inputNumberLocale.placeholder, ...restProps });
52
53
  }
53
54
  );
54
55
  var InputNumber = InternalInputNumber;
package/lib/list/index.js CHANGED
@@ -33,14 +33,15 @@ __export(list_exports, {
33
33
  default: () => list_default
34
34
  });
35
35
  module.exports = __toCommonJS(list_exports);
36
- var import_react = __toESM(require("react"));
36
+ var import_react = require("react");
37
37
  var import_antd = require("antd");
38
38
  var import_config_provider = __toESM(require("../config-provider"));
39
39
  __reExport(list_exports, require("antd/es/list"), module.exports);
40
40
  __reExport(list_exports, require("antd/es/list/Item"), module.exports);
41
+ var import_jsx_runtime = require("react/jsx-runtime");
41
42
  function List({ pagination, ...restProps }) {
42
43
  const extendedContext = (0, import_react.useContext)(import_config_provider.default.ExtendedConfigContext);
43
- return /* @__PURE__ */ import_react.default.createElement(
44
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
45
  import_antd.List,
45
46
  {
46
47
  ...restProps,
@@ -0,0 +1,3 @@
1
+ import type { Locale } from '.';
2
+ declare const _default: Locale;
3
+ export default _default;
@@ -0,0 +1,60 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
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
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/locale/ja-JP.ts
30
+ var ja_JP_exports = {};
31
+ __export(ja_JP_exports, {
32
+ default: () => ja_JP_default
33
+ });
34
+ module.exports = __toCommonJS(ja_JP_exports);
35
+ var import_ja_JP = __toESM(require("antd/es/locale/ja_JP"));
36
+ var ja_JP_default = {
37
+ ...import_ja_JP.default,
38
+ global: {
39
+ ...import_ja_JP.default.global,
40
+ inputPlaceholder: "入力してください"
41
+ },
42
+ Pagination: {
43
+ ...import_ja_JP.default.Pagination,
44
+ total: "合計 ${total} 件"
45
+ },
46
+ Drawer: {
47
+ okText: "確定",
48
+ cancelText: "キャンセル"
49
+ },
50
+ Table: {
51
+ ...import_ja_JP.default.Table,
52
+ batchOperationBar: {
53
+ selected: "選択済み",
54
+ object: "件",
55
+ cancel: "キャンセル",
56
+ collapse: "折りたたむ",
57
+ open: "展開"
58
+ }
59
+ }
60
+ };
@@ -36,6 +36,7 @@ var import_react = __toESM(require("react"));
36
36
  var import_design = require("../index");
37
37
  var import_ahooks = require("ahooks");
38
38
  var import_classnames = __toESM(require("classnames"));
39
+ var import_jsx_runtime = require("react/jsx-runtime");
39
40
  var Lottie = import_react.default.forwardRef(
40
41
  ({ mode = "default", loop = true, speed = 1, className, style, ...restProps }, ref) => {
41
42
  const { iconPrefixCls } = (0, import_react.useContext)(import_design.ConfigProvider.ConfigContext);
@@ -63,7 +64,7 @@ var Lottie = import_react.default.forwardRef(
63
64
  (0, import_react.useImperativeHandle)(ref, () => ({
64
65
  animation
65
66
  }));
66
- return /* @__PURE__ */ import_react.default.createElement(
67
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
67
68
  "div",
68
69
  {
69
70
  ref: containerRef,
@@ -33,12 +33,14 @@ __export(Modal_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(Modal_exports);
35
35
  var import_antd = require("antd");
36
+ var import_icons = require("@oceanbase/icons");
36
37
  var import_classnames = __toESM(require("classnames"));
37
- var import_react = __toESM(require("react"));
38
+ var import_react = require("react");
38
39
  var import_config_provider = __toESM(require("../config-provider"));
39
40
  var import_space = __toESM(require("../space"));
40
41
  var import_static_function = require("../static-function");
41
42
  var import_style = __toESM(require("./style"));
43
+ var import_jsx_runtime = require("react/jsx-runtime");
42
44
  var Modal = ({
43
45
  extra,
44
46
  footer,
@@ -51,11 +53,14 @@ var Modal = ({
51
53
  const { wrapSSR } = (0, import_style.default)(prefixCls);
52
54
  const modalCls = (0, import_classnames.default)(className);
53
55
  return wrapSSR(
54
- /* @__PURE__ */ import_react.default.createElement(
56
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
55
57
  import_antd.Modal,
56
58
  {
57
59
  destroyOnClose: true,
58
- footer: footer === false ? null : extra ? (originNode) => /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-footer-content` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-footer-extra` }, extra), /* @__PURE__ */ import_react.default.createElement(import_space.default, null, originNode)) : footer,
60
+ footer: footer === false ? null : extra ? (originNode) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefixCls}-footer-content`, children: [
61
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-footer-extra`, children: extra }),
62
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_space.default, { children: originNode })
63
+ ] }) : footer,
59
64
  prefixCls: customizePrefixCls,
60
65
  className: modalCls,
61
66
  ...restProps
@@ -63,12 +68,31 @@ var Modal = ({
63
68
  )
64
69
  );
65
70
  };
66
- Modal.info = (props) => import_static_function.modal.info(props);
67
- Modal.success = (props) => import_static_function.modal.success(props);
68
- Modal.error = (props) => import_static_function.modal.error(props);
69
- Modal.warning = (props) => import_static_function.modal.warning(props);
70
- Modal.warn = (props) => import_static_function.modal.warning(props);
71
- Modal.confirm = (props) => import_static_function.modal.confirm(props);
71
+ Modal.info = (props) => import_static_function.modal.info({
72
+ // use outlined icon
73
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.InfoCircleOutlined, {}),
74
+ ...props
75
+ });
76
+ Modal.success = (props) => import_static_function.modal.success({
77
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CheckCircleOutlined, {}),
78
+ ...props
79
+ });
80
+ Modal.error = (props) => import_static_function.modal.error({
81
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseCircleOutlined, {}),
82
+ ...props
83
+ });
84
+ Modal.warning = (props) => import_static_function.modal.warning({
85
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.ExclamationCircleOutlined, {}),
86
+ ...props
87
+ });
88
+ Modal.warn = (props) => import_static_function.modal.warning({
89
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.ExclamationCircleOutlined, {}),
90
+ ...props
91
+ });
92
+ Modal.confirm = (props) => import_static_function.modal.confirm({
93
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.ExclamationCircleOutlined, {}),
94
+ ...props
95
+ });
72
96
  Modal.useModal = import_antd.Modal.useModal;
73
97
  Modal.destroyAll = import_antd.Modal.destroyAll;
74
98
  Modal.config = import_antd.Modal.config;
@@ -32,12 +32,13 @@ __export(Progress_exports, {
32
32
  default: () => Progress_default
33
33
  });
34
34
  module.exports = __toCommonJS(Progress_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_classnames = __toESM(require("classnames"));
38
38
  var import_config_provider = __toESM(require("../config-provider"));
39
39
  var import_Modal = __toESM(require("./Modal"));
40
40
  var import_icons = require("@oceanbase/icons");
41
+ var import_jsx_runtime = require("react/jsx-runtime");
41
42
  var Progress = ({
42
43
  prefixCls: customizePrefixCls,
43
44
  className,
@@ -52,7 +53,7 @@ var Progress = ({
52
53
  const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
53
54
  const prefixCls = getPrefixCls("modal", customizePrefixCls);
54
55
  const progressModalCls = (0, import_classnames.default)(`${prefixCls}-progress`, className);
55
- return /* @__PURE__ */ import_react.default.createElement(
56
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
56
57
  import_Modal.default,
57
58
  {
58
59
  prefixCls: customizePrefixCls,
@@ -60,9 +61,12 @@ var Progress = ({
60
61
  width,
61
62
  maskClosable,
62
63
  footer,
63
- ...restProps
64
- },
65
- /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, loading ? /* @__PURE__ */ import_react.default.createElement(import_icons.LoadingOutlined, { className: `${prefixCls}-progress-loading` }) : /* @__PURE__ */ import_react.default.createElement(import_antd.Progress, { type: "circle", size: 200, ...progress }), description && /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-progress-description` }, description))
64
+ ...restProps,
65
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
66
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.LoadingOutlined, { className: `${prefixCls}-progress-loading` }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Progress, { type: "circle", size: 200, ...progress }),
67
+ description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-progress-description`, children: description })
68
+ ] })
69
+ }
66
70
  );
67
71
  };
68
72
  if (process.env.NODE_ENV !== "production") {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
2
+ import type { FullToken, GenerateStyle } from '../../theme/interface';
3
3
  export type ModalToken = FullToken<'Modal'>;
4
4
  export declare const genModalStyle: GenerateStyle<ModalToken>;
5
5
  declare const _default: (prefixCls: string) => {
@@ -28,25 +28,59 @@ var genModalStyle = (token) => {
28
28
  const {
29
29
  antCls,
30
30
  componentCls,
31
- marginXXS,
32
31
  marginLG,
33
- paddingMD,
34
- borderRadius,
35
- controlHeight,
36
32
  fontSizeHeading5,
37
- lineHeightHeading5
33
+ lineHeightHeading5,
34
+ fontSizeHeading3,
35
+ colorSplit
38
36
  } = token;
39
37
  const top = 100;
40
38
  const bottom = 100;
41
39
  const titleHeight = fontSizeHeading5 * lineHeightHeading5;
42
40
  return {
43
41
  /* Modal */
44
- [`${componentCls}:not(${componentCls}-confirm)`]: {
45
- [`${componentCls}-header`]: {
46
- marginBottom: marginLG
42
+ [`${componentCls}:not(${componentCls}-confirm):not(${componentCls}-progress)`]: {
43
+ [`${componentCls}-content`]: {
44
+ paddingBlock: token.padding,
45
+ [`${componentCls}-close`]: {
46
+ marginTop: token.marginXXS,
47
+ marginRight: token.marginXXS
48
+ },
49
+ [`${componentCls}-header`]: {
50
+ position: "relative",
51
+ marginBottom: 0,
52
+ paddingBottom: token.padding,
53
+ [`${componentCls}-title`]: {
54
+ fontSize: fontSizeHeading3
55
+ },
56
+ // 使用伪元素创建贯通的分割线
57
+ "&::after": {
58
+ content: '""',
59
+ position: "absolute",
60
+ bottom: 0,
61
+ left: 0,
62
+ right: 0,
63
+ height: "1px",
64
+ backgroundColor: colorSplit,
65
+ // antd Modal content默认padding通常是24px,使用负margin让分割线贯通
66
+ // 如果antd使用其他padding值,可能需要调整
67
+ marginLeft: `-${token.paddingLG}px`,
68
+ marginRight: `-${token.paddingLG}px`
69
+ }
70
+ },
71
+ [`${componentCls}-body`]: {
72
+ paddingTop: token.paddingLG,
73
+ marginInline: `-${token.marginLG}px`,
74
+ paddingInline: token.paddingLG
75
+ }
47
76
  },
48
77
  [`${componentCls}-footer`]: {
49
- marginTop: marginLG,
78
+ paddingTop: token.paddingLG,
79
+ marginTop: 0,
80
+ [`${antCls}-btn`]: {
81
+ height: 28,
82
+ minHeight: 28
83
+ },
50
84
  [`${componentCls}-footer-content`]: {
51
85
  display: "flex",
52
86
  justifyContent: "space-between",
@@ -62,12 +96,16 @@ var genModalStyle = (token) => {
62
96
  /* Modal.Progress */
63
97
  [`${componentCls}${componentCls}-progress`]: {
64
98
  [`${componentCls}-content`]: {
65
- padding: `${token.paddingXL + token.padding}px ${token.paddingLG + token.padding}px`,
99
+ padding: token.paddingLG,
100
+ [`${componentCls}-close`]: {
101
+ marginTop: token.marginSM,
102
+ marginRight: token.marginXXS
103
+ },
66
104
  [`${componentCls}-header`]: {
67
105
  textAlign: "center",
68
106
  marginBottom: token.marginXXL,
69
107
  [`${componentCls}-title`]: {
70
- fontSize: token.fontSizeHeading4
108
+ fontSize: fontSizeHeading3
71
109
  }
72
110
  },
73
111
  [`${componentCls}-body`]: {
@@ -86,18 +124,39 @@ var genModalStyle = (token) => {
86
124
  }
87
125
  },
88
126
  [`${componentCls}-footer`]: {
89
- textAlign: "center"
127
+ textAlign: "center",
128
+ [`${antCls}-btn`]: {
129
+ height: 28,
130
+ minHeight: 28
131
+ }
90
132
  }
91
133
  }
92
134
  },
93
135
  /* Modal.method() */
94
136
  [`${componentCls}-confirm`]: {
95
- [`${componentCls}-body ${componentCls}-confirm-title +${componentCls}-confirm-content`]: {
96
- marginBlockStart: marginXXS,
97
- color: token.colorTextSecondary
137
+ [`${componentCls}-content`]: {
138
+ padding: token.paddingLG
98
139
  },
99
- [`${componentCls}-confirm-btns`]: {
100
- marginTop: marginLG
140
+ [`${componentCls}-body`]: {
141
+ [`${componentCls}-confirm-title`]: {
142
+ fontSize: fontSizeHeading3
143
+ },
144
+ [`${componentCls}-confirm-body > ${token.iconCls}`]: {
145
+ height: token.fontSizeHeading3 * token.lineHeight
146
+ },
147
+ [`${componentCls}-confirm-paragraph`]: {
148
+ rowGap: token.marginSM
149
+ },
150
+ [`${componentCls}-confirm-content`]: {
151
+ color: token.colorTextSecondary
152
+ },
153
+ [`${componentCls}-confirm-btns`]: {
154
+ marginTop: marginLG,
155
+ [`${antCls}-btn`]: {
156
+ height: 28,
157
+ minHeight: 28
158
+ }
159
+ }
101
160
  }
102
161
  }
103
162
  };
@@ -39,6 +39,7 @@ var import_react = __toESM(require("react"));
39
39
  var import_config_provider = __toESM(require("../config-provider"));
40
40
  var import_style = __toESM(require("./style"));
41
41
  __reExport(radio_exports, require("antd/es/radio"), module.exports);
42
+ var import_jsx_runtime = require("react/jsx-runtime");
42
43
  var InternalRadio = import_react.default.forwardRef(
43
44
  ({ prefixCls: customizePrefixCls, className, ...restProps }, ref) => {
44
45
  const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
@@ -46,7 +47,7 @@ var InternalRadio = import_react.default.forwardRef(
46
47
  const { wrapSSR } = (0, import_style.default)(prefixCls);
47
48
  const radioCls = (0, import_classnames.default)(className);
48
49
  return wrapSSR(
49
- /* @__PURE__ */ import_react.default.createElement(import_antd.Radio, { ref, prefixCls: customizePrefixCls, className: radioCls, ...restProps })
50
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Radio, { ref, prefixCls: customizePrefixCls, className: radioCls, ...restProps })
50
51
  );
51
52
  }
52
53
  );
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
2
+ import type { FullToken, GenerateStyle } from '../../theme/interface';
3
3
  export type RadioToken = FullToken<'Radio'>;
4
4
  export declare const genRadioStyle: GenerateStyle<RadioToken>;
5
5
  declare const _default: (prefixCls: string) => {