@oceanbase/design 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 (162) 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/style/index.d.ts +1 -1
  5. package/es/app/index.d.ts +8 -0
  6. package/es/app/index.js +36 -1
  7. package/es/app/style/index.d.ts +9 -0
  8. package/es/{_util/genStyle.js → app/style/index.js} +10 -11
  9. package/es/badge/style/index.d.ts +1 -1
  10. package/es/button/style/index.d.ts +1 -1
  11. package/es/card/style/index.d.ts +1 -1
  12. package/es/card/style/index.js +3 -3
  13. package/es/checkbox/style/index.d.ts +1 -1
  14. package/es/config-provider/context.d.ts +11 -0
  15. package/es/config-provider/context.js +2 -1
  16. package/es/config-provider/index.js +31 -32
  17. package/es/descriptions/hooks/useItems.d.ts +6 -6
  18. package/es/descriptions/style/index.d.ts +1 -1
  19. package/es/drawer/index.js +7 -5
  20. package/es/drawer/style/index.d.ts +1 -1
  21. package/es/drawer/style/index.js +11 -7
  22. package/es/empty/index.js +1 -1
  23. package/es/empty/style/index.d.ts +1 -1
  24. package/es/form/FormItem.d.ts +1 -1
  25. package/es/form/style/index.d.ts +1 -1
  26. package/es/index.d.ts +4 -2
  27. package/es/index.js +1 -0
  28. package/es/modal/style/index.d.ts +1 -1
  29. package/es/radio/style/index.d.ts +1 -1
  30. package/es/result/index.d.ts +2 -2
  31. package/es/result/index.js +5 -4
  32. package/es/result/style/index.d.ts +1 -1
  33. package/es/select/style/index.d.ts +1 -1
  34. package/es/slider/style/index.d.ts +1 -1
  35. package/es/space/style/index.d.ts +1 -1
  36. package/es/spin/style/index.d.ts +1 -1
  37. package/es/switch/style/index.d.ts +1 -1
  38. package/es/table/style/index.d.ts +1 -1
  39. package/es/tabs/style/index.d.ts +1 -1
  40. package/es/tag/style/index.d.ts +2 -4
  41. package/es/tag/style/index.js +14 -31
  42. package/es/theme/dark.d.ts +1 -48
  43. package/es/theme/default.d.ts +4 -2
  44. package/es/theme/default.js +52 -27
  45. package/es/theme/index.d.ts +20 -57
  46. package/es/theme/interface.d.ts +66 -0
  47. package/es/theme/interface.js +4 -1
  48. package/es/theme/style/aliyun.less +40 -40
  49. package/es/theme/style/compact.less +79 -72
  50. package/es/theme/style/dark.less +53 -53
  51. package/es/theme/style/default.less +79 -72
  52. package/es/tooltip/style/index.d.ts +1 -1
  53. package/es/tree-select/style/index.d.ts +1 -1
  54. package/lib/_util/genComponentStyleHook.d.ts +2 -2
  55. package/lib/_util/genComponentStyleHook.js +20 -4
  56. package/lib/alert/index.js +7 -6
  57. package/lib/alert/style/index.d.ts +1 -1
  58. package/lib/app/index.d.ts +8 -0
  59. package/lib/app/index.js +36 -1
  60. package/lib/app/style/index.d.ts +9 -0
  61. package/lib/{_util/getWeakenBorderColor.js → app/style/index.js} +20 -10
  62. package/lib/badge/index.js +21 -18
  63. package/lib/badge/style/index.d.ts +1 -1
  64. package/lib/button/index.js +2 -1
  65. package/lib/button/style/index.d.ts +1 -1
  66. package/lib/card/index.js +9 -5
  67. package/lib/card/style/index.d.ts +1 -1
  68. package/lib/card/style/index.js +4 -4
  69. package/lib/checkbox/index.js +2 -1
  70. package/lib/checkbox/style/index.d.ts +1 -1
  71. package/lib/config-provider/DefaultRenderEmpty.js +4 -3
  72. package/lib/config-provider/context.d.ts +11 -0
  73. package/lib/config-provider/index.js +36 -25
  74. package/lib/descriptions/hooks/useItems.d.ts +6 -6
  75. package/lib/descriptions/hooks/useItems.js +5 -4
  76. package/lib/descriptions/index.js +3 -2
  77. package/lib/descriptions/style/index.d.ts +1 -1
  78. package/lib/drawer/index.js +44 -33
  79. package/lib/drawer/style/index.d.ts +1 -1
  80. package/lib/drawer/style/index.js +11 -5
  81. package/lib/dropdown/dropdown-button.js +3 -13
  82. package/lib/dropdown/index.js +2 -2
  83. package/lib/empty/colored.js +413 -327
  84. package/lib/empty/database.js +267 -222
  85. package/lib/empty/default.js +16 -21
  86. package/lib/empty/guide.js +201 -184
  87. package/lib/empty/index.js +23 -18
  88. package/lib/empty/style/index.d.ts +1 -1
  89. package/lib/form/FormItem.d.ts +1 -1
  90. package/lib/form/FormItem.js +9 -5
  91. package/lib/form/index.js +6 -3
  92. package/lib/form/style/index.d.ts +1 -1
  93. package/lib/grid/col.js +2 -1
  94. package/lib/grid/row.js +2 -1
  95. package/lib/index.d.ts +4 -2
  96. package/lib/index.js +3 -0
  97. package/lib/input/Input.js +3 -2
  98. package/lib/input/Password.js +3 -2
  99. package/lib/input/Search.js +3 -2
  100. package/lib/input/TextArea.js +3 -2
  101. package/lib/input-number/index.js +2 -1
  102. package/lib/list/index.js +3 -2
  103. package/lib/lottie/index.js +2 -1
  104. package/lib/modal/Modal.js +7 -3
  105. package/lib/modal/Progress.js +9 -5
  106. package/lib/modal/style/index.d.ts +1 -1
  107. package/lib/radio/index.js +2 -1
  108. package/lib/radio/style/index.d.ts +1 -1
  109. package/lib/result/403.js +156 -121
  110. package/lib/result/404.js +328 -267
  111. package/lib/result/500.js +295 -257
  112. package/lib/result/Error.js +127 -99
  113. package/lib/result/Processing.js +246 -213
  114. package/lib/result/Success.js +233 -169
  115. package/lib/result/Warning.js +611 -515
  116. package/lib/result/index.d.ts +2 -2
  117. package/lib/result/index.js +12 -11
  118. package/lib/result/style/index.d.ts +1 -1
  119. package/lib/segmented/index.js +8 -4
  120. package/lib/select/index.js +2 -1
  121. package/lib/select/style/index.d.ts +1 -1
  122. package/lib/slider/index.js +2 -1
  123. package/lib/slider/style/index.d.ts +1 -1
  124. package/lib/space/index.js +2 -1
  125. package/lib/space/style/index.d.ts +1 -1
  126. package/lib/spin/index.js +5 -4
  127. package/lib/spin/style/index.d.ts +1 -1
  128. package/lib/switch/index.js +2 -1
  129. package/lib/switch/style/index.d.ts +1 -1
  130. package/lib/table/index.js +44 -31
  131. package/lib/table/style/index.d.ts +1 -1
  132. package/lib/tabs/index.js +10 -5
  133. package/lib/tabs/style/index.d.ts +1 -1
  134. package/lib/tag/index.js +9 -5
  135. package/lib/tag/style/index.d.ts +2 -4
  136. package/lib/tag/style/index.js +12 -27
  137. package/lib/theme/dark.d.ts +1 -48
  138. package/lib/theme/default.d.ts +4 -2
  139. package/lib/theme/default.js +60 -26
  140. package/lib/theme/index.d.ts +20 -57
  141. package/lib/theme/interface.d.ts +66 -0
  142. package/lib/theme/style/aliyun.less +40 -40
  143. package/lib/theme/style/compact.less +79 -72
  144. package/lib/theme/style/dark.less +53 -53
  145. package/lib/theme/style/default.less +79 -72
  146. package/lib/tooltip/MouseTooltip.js +43 -39
  147. package/lib/tooltip/ReactStickyMouseTooltip.js +5 -4
  148. package/lib/tooltip/index.js +14 -10
  149. package/lib/tooltip/style/index.d.ts +1 -1
  150. package/lib/tree-select/index.js +2 -1
  151. package/lib/tree-select/style/index.d.ts +1 -1
  152. package/lib/typography/Link.js +5 -4
  153. package/lib/typography/Paragraph.js +5 -4
  154. package/lib/typography/Text.js +5 -4
  155. package/lib/typography/Title.js +5 -4
  156. package/package.json +5 -4
  157. package/es/_util/genStyle.d.ts +0 -2
  158. package/es/_util/getWeakenBorderColor.d.ts +0 -1
  159. package/es/_util/getWeakenBorderColor.js +0 -4
  160. package/lib/_util/genStyle.d.ts +0 -2
  161. package/lib/_util/genStyle.js +0 -43
  162. package/lib/_util/getWeakenBorderColor.d.ts +0 -1
@@ -8,10 +8,10 @@ export type ResultStatusType = AntResultStatusType | 'processing';
8
8
  export interface ResultProps extends Omit<AntResultProps, 'status'> {
9
9
  status?: ResultStatusType;
10
10
  }
11
- export interface ResultType extends React.FC<ResultProps> {
11
+ export type ResultType = React.FC<ResultProps> & {
12
12
  PRESENTED_IMAGE_403: typeof Image403;
13
13
  PRESENTED_IMAGE_404: typeof Image404;
14
14
  PRESENTED_IMAGE_500: typeof Image500;
15
- }
15
+ };
16
16
  declare const Result: ResultType;
17
17
  export default Result;
@@ -33,7 +33,7 @@ __export(result_exports, {
33
33
  default: () => result_default
34
34
  });
35
35
  module.exports = __toCommonJS(result_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_classnames = __toESM(require("classnames"));
39
39
  var import_config_provider = __toESM(require("../config-provider"));
@@ -46,22 +46,23 @@ var import__2 = __toESM(require("./404"));
46
46
  var import__3 = __toESM(require("./500"));
47
47
  var import_style = __toESM(require("./style"));
48
48
  __reExport(result_exports, require("antd/es/result"), module.exports);
49
- var Result = ({ status, prefixCls: customizePrefixCls, ...restProps }) => {
49
+ var import_jsx_runtime = require("react/jsx-runtime");
50
+ var Result = ({ prefixCls: customizePrefixCls, className, status, ...restProps }) => {
50
51
  const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
51
52
  const prefixCls = getPrefixCls("result", customizePrefixCls);
52
53
  const { wrapSSR } = (0, import_style.default)(prefixCls);
53
- const resultCls = (0, import_classnames.default)(prefixCls);
54
+ const resultCls = (0, import_classnames.default)(className);
54
55
  const statusMap = {
55
- success: /* @__PURE__ */ import_react.default.createElement(import_Success.default, null),
56
- error: /* @__PURE__ */ import_react.default.createElement(import_Error.default, null),
57
- warning: /* @__PURE__ */ import_react.default.createElement(import_Warning.default, null),
58
- processing: /* @__PURE__ */ import_react.default.createElement(import_Processing.default, null),
59
- 403: /* @__PURE__ */ import_react.default.createElement(import__.default, null),
60
- 404: /* @__PURE__ */ import_react.default.createElement(import__2.default, null),
61
- 500: /* @__PURE__ */ import_react.default.createElement(import__3.default, null)
56
+ success: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Success.default, {}),
57
+ error: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Error.default, {}),
58
+ warning: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Warning.default, {}),
59
+ processing: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Processing.default, {}),
60
+ 403: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.default, {}),
61
+ 404: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.default, {}),
62
+ 500: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__3.default, {})
62
63
  };
63
64
  return wrapSSR(
64
- /* @__PURE__ */ import_react.default.createElement(
65
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
65
66
  import_antd.Result,
66
67
  {
67
68
  icon: statusMap[status],
@@ -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 ResultToken = FullToken<'Result'>;
4
4
  export declare const genResultStyle: GenerateStyle<ResultToken>;
5
5
  declare const _default: (prefixCls: string) => {
@@ -40,6 +40,7 @@ var import_typography = __toESM(require("../typography"));
40
40
  var import_badge = __toESM(require("../badge"));
41
41
  var import_style = __toESM(require("./style"));
42
42
  __reExport(segmented_exports, require("antd/es/segmented"), module.exports);
43
+ var import_jsx_runtime = require("react/jsx-runtime");
43
44
  var isReactNode = (item) => {
44
45
  return import_react.default.isValidElement(item);
45
46
  };
@@ -50,21 +51,24 @@ var Segmented = import_react.default.forwardRef(
50
51
  const { wrapSSR } = (0, import_style.default)(prefixCls);
51
52
  const renderBadge = (0, import_react.useCallback)((badge) => {
52
53
  if (typeof badge === "object" && !isReactNode(badge)) {
53
- return /* @__PURE__ */ import_react.default.createElement(import_badge.default, { ...badge });
54
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge.default, { ...badge });
54
55
  }
55
- return /* @__PURE__ */ import_react.default.createElement(import_badge.default, { count: badge });
56
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge.default, { count: badge });
56
57
  }, []);
57
58
  const newOptions = options == null ? void 0 : options.map((item) => {
58
59
  if (typeof item === "object") {
59
60
  const { label, badge, ...restItem } = item;
60
61
  return {
61
62
  ...restItem,
62
- label: /* @__PURE__ */ import_react.default.createElement(import_antd.Flex, { gap: 4, align: "center", justify: "center" }, (item == null ? void 0 : item.ellipsis) ? /* @__PURE__ */ import_react.default.createElement(import_typography.default.Text, { ellipsis: item.ellipsis }, label) : label, badge && renderBadge(badge))
63
+ label: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Flex, { gap: 4, align: "center", justify: "center", children: [
64
+ (item == null ? void 0 : item.ellipsis) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_typography.default.Text, { ellipsis: item.ellipsis, children: label }) : label,
65
+ badge && renderBadge(badge)
66
+ ] })
63
67
  };
64
68
  }
65
69
  return item;
66
70
  });
67
- return wrapSSR(/* @__PURE__ */ import_react.default.createElement(import_antd.Segmented, { ref, options: newOptions, ...restProps }));
71
+ return wrapSSR(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Segmented, { ref, options: newOptions, ...restProps }));
68
72
  }
69
73
  );
70
74
  if (process.env.NODE_ENV !== "production") {
@@ -40,6 +40,7 @@ var import_config_provider = __toESM(require("../config-provider"));
40
40
  var import_en_US = __toESM(require("../locale/en-US"));
41
41
  var import_style = __toESM(require("./style"));
42
42
  __reExport(select_exports, require("antd/es/select"), module.exports);
43
+ var import_jsx_runtime = require("react/jsx-runtime");
43
44
  var InternalSelect = import_react.default.forwardRef(
44
45
  ({ locale: customLocale, prefixCls: customizePrefixCls, className, ...restProps }, ref) => {
45
46
  const { locale: contextLocale, getPrefixCls } = (0, import_react.useContext)(
@@ -56,7 +57,7 @@ var InternalSelect = import_react.default.forwardRef(
56
57
  const { wrapSSR } = (0, import_style.default)(prefixCls);
57
58
  const selectCls = (0, import_classnames.default)(className);
58
59
  return wrapSSR(
59
- /* @__PURE__ */ import_react.default.createElement(
60
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
60
61
  import_antd.Select,
61
62
  {
62
63
  ref,
@@ -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 SelectToken = FullToken<'Select'>;
4
4
  export declare const genSelectStyle: GenerateStyle<SelectToken>;
5
5
  declare const _default: (prefixCls: string) => {
@@ -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(slider_exports, require("antd/es/slider"), module.exports);
42
+ var import_jsx_runtime = require("react/jsx-runtime");
42
43
  var Slider = 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 Slider = import_react.default.forwardRef(
46
47
  const { wrapSSR } = (0, import_style.default)(prefixCls);
47
48
  const sliderCls = (0, import_classnames.default)(className);
48
49
  return wrapSSR(
49
- /* @__PURE__ */ import_react.default.createElement(import_antd.Slider, { ref, prefixCls: customizePrefixCls, className: sliderCls, ...restProps })
50
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Slider, { ref, prefixCls: customizePrefixCls, className: sliderCls, ...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 SliderToken = FullToken<'Slider'>;
4
4
  export declare const genSliderStyle: GenerateStyle<SliderToken>;
5
5
  declare const _default: (prefixCls: string) => {
@@ -43,6 +43,7 @@ var import_antd = require("antd");
43
43
  var import_style = __toESM(require("./style"));
44
44
  __reExport(space_exports, require("antd/es/space"), module.exports);
45
45
  var import_context = require("antd/es/space/context");
46
+ var import_jsx_runtime = require("react/jsx-runtime");
46
47
  var Space = React.forwardRef(
47
48
  ({ prefixCls: customizePrefixCls, className, ...restProps }, ref) => {
48
49
  const { getPrefixCls } = React.useContext(import_config_provider.ConfigContext);
@@ -56,7 +57,7 @@ var Space = React.forwardRef(
56
57
  },
57
58
  className
58
59
  );
59
- return wrapSSR(/* @__PURE__ */ React.createElement(import_antd.Space, { ref, className: spaceCls, ...restProps }));
60
+ return wrapSSR(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Space, { ref, className: spaceCls, ...restProps }));
60
61
  }
61
62
  );
62
63
  if (process.env.NODE_ENV !== "production") {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { type FullToken, type GenerateStyle } from 'antd/es/theme/internal';
2
+ import type { FullToken, GenerateStyle } from '../../theme/interface';
3
3
  export type SpaceToken = FullToken<'Space'>;
4
4
  export declare const genSpaceStyle: GenerateStyle<SpaceToken>;
5
5
  declare const _default: (prefixCls: string) => {
package/lib/spin/index.js CHANGED
@@ -35,13 +35,14 @@ __export(spin_exports, {
35
35
  module.exports = __toCommonJS(spin_exports);
36
36
  var import_antd = require("antd");
37
37
  var import_classnames = __toESM(require("classnames"));
38
- var import_react = __toESM(require("react"));
38
+ var import_react = require("react");
39
39
  var import_config_provider = __toESM(require("../config-provider"));
40
40
  var import_lottie = __toESM(require("../lottie"));
41
41
  var import_spin = __toESM(require("./assets/spin.json"));
42
42
  var import_spin_gray = __toESM(require("./assets/spin-gray.json"));
43
43
  var import_style = __toESM(require("./style"));
44
44
  __reExport(spin_exports, require("antd/es/spin"), module.exports);
45
+ var import_jsx_runtime = require("react/jsx-runtime");
45
46
  var Spin = ({
46
47
  prefixCls: customizePrefixCls,
47
48
  className,
@@ -50,7 +51,7 @@ var Spin = ({
50
51
  ...restProps
51
52
  }) => {
52
53
  const { getPrefixCls, spin } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
53
- const indicator = customizeIndicator || (spin == null ? void 0 : spin.indicator) || (gray ? /* @__PURE__ */ import_react.default.createElement(import_lottie.default, { animationData: import_spin_gray.default }) : /* @__PURE__ */ import_react.default.createElement(import_lottie.default, { animationData: import_spin.default }));
54
+ const indicator = customizeIndicator || (spin == null ? void 0 : spin.indicator) || (gray ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lottie.default, { animationData: import_spin_gray.default }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lottie.default, { animationData: import_spin.default }));
54
55
  const isDefaultIndicator = !(customizeIndicator || (spin == null ? void 0 : spin.indicator));
55
56
  const isGrayIndicator = isDefaultIndicator && gray;
56
57
  const prefixCls = getPrefixCls("spin", customizePrefixCls);
@@ -63,7 +64,7 @@ var Spin = ({
63
64
  className
64
65
  );
65
66
  return wrapSSR(
66
- /* @__PURE__ */ import_react.default.createElement(
67
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
67
68
  import_antd.Spin,
68
69
  {
69
70
  prefixCls: customizePrefixCls,
@@ -75,7 +76,7 @@ var Spin = ({
75
76
  );
76
77
  };
77
78
  Spin.setDefaultIndicator = import_antd.Spin.setDefaultIndicator;
78
- Spin.setDefaultIndicator(/* @__PURE__ */ import_react.default.createElement(Spin, null));
79
+ Spin.setDefaultIndicator(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Spin, {}));
79
80
  if (process.env.NODE_ENV !== "production") {
80
81
  Spin.displayName = import_antd.Spin.displayName;
81
82
  }
@@ -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 SpinToken = FullToken<'Spin'> & {
4
4
  spinDotSize: number;
5
5
  spinDotSizeSM: number;
@@ -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(switch_exports, require("antd/es/switch"), module.exports);
42
+ var import_jsx_runtime = require("react/jsx-runtime");
42
43
  var InternalSwitch = 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 InternalSwitch = import_react.default.forwardRef(
46
47
  const { wrapSSR } = (0, import_style.default)(prefixCls);
47
48
  const switchCls = (0, import_classnames.default)(className);
48
49
  return wrapSSR(
49
- /* @__PURE__ */ import_react.default.createElement(import_antd.Switch, { ref, prefixCls: customizePrefixCls, className: switchCls, ...restProps })
50
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Switch, { ref, prefixCls: customizePrefixCls, className: switchCls, ...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 SwitchToken = FullToken<'Switch'>;
4
4
  export declare const genSwitchStyle: GenerateStyle<SwitchToken>;
5
5
  declare const _default: (prefixCls: string) => {
@@ -45,6 +45,7 @@ var import_useDefaultPagination = __toESM(require("./hooks/useDefaultPagination"
45
45
  var import_useMergedState = __toESM(require("rc-util/lib/hooks/useMergedState"));
46
46
  var import_en_US = __toESM(require("../locale/en-US"));
47
47
  __reExport(table_exports, require("antd/es/table"), module.exports);
48
+ var import_jsx_runtime = require("react/jsx-runtime");
48
49
  function Table(props, ref) {
49
50
  var _a, _b;
50
51
  const {
@@ -73,7 +74,7 @@ function Table(props, ref) {
73
74
  const { getPrefixCls, locale, table } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
74
75
  const {
75
76
  batchOperationBar,
76
- emptyText = /* @__PURE__ */ import_react.default.createElement(import_empty.default, { image: import_empty.default.PRESENTED_IMAGE_SIMPLE }),
77
+ emptyText = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_empty.default, { image: import_empty.default.PRESENTED_IMAGE_SIMPLE }),
77
78
  ...restLocale
78
79
  } = {
79
80
  ...customLocale,
@@ -112,7 +113,7 @@ function Table(props, ref) {
112
113
  render: (text, record, index) => {
113
114
  const element = item.render ? item.render(text, record, index) : record[item.dataIndex];
114
115
  const elementType = element == null ? void 0 : element.type;
115
- return (elementType == null ? void 0 : elementType.__ANT_TOOLTIP) === true ? element : /* @__PURE__ */ import_react.default.createElement(
116
+ return (elementType == null ? void 0 : elementType.__ANT_TOOLTIP) === true ? element : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
116
117
  import_typography.default.Text,
117
118
  {
118
119
  ellipsis: {
@@ -120,9 +121,9 @@ function Table(props, ref) {
120
121
  placement: "topLeft",
121
122
  title: element
122
123
  }
123
- }
124
- },
125
- /* @__PURE__ */ import_react.default.createElement("span", null, element)
124
+ },
125
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: element })
126
+ }
126
127
  );
127
128
  }
128
129
  };
@@ -148,35 +149,47 @@ function Table(props, ref) {
148
149
  if ((0, import_lodash.isEmpty)(rowSelection) || (0, import_lodash.isEmpty)(currentSelectedRowKeys)) {
149
150
  return (
150
151
  // @ts-ignore
151
- /* @__PURE__ */ import_react.default.createElement("span", null, pagination && (pagination == null ? void 0 : pagination.showTotal) && (pagination == null ? void 0 : pagination.showTotal(total, range)))
152
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: pagination && (pagination == null ? void 0 : pagination.showTotal) && (pagination == null ? void 0 : pagination.showTotal(total, range)) })
152
153
  );
153
154
  }
154
- return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-batch-operation-bar` }, /* @__PURE__ */ import_react.default.createElement(
155
- import_antd.Space,
156
- {
157
- size: 8,
158
- style: {
159
- marginRight: 24
160
- }
161
- },
162
- toolAlertRender && toolAlertRender(currentSelectedRowKeys, currentSelectedRows),
163
- !toolAlertRender && toolAlertRender !== false && /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefixCls}-batch-operation-selection` }, /* @__PURE__ */ import_react.default.createElement("span", null, batchOperationBar == null ? void 0 : batchOperationBar.selected), /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefixCls}-batch-operation-selection-count` }, (currentSelectedRowKeys == null ? void 0 : currentSelectedRowKeys.length) || 0), /* @__PURE__ */ import_react.default.createElement("span", null, batchOperationBar == null ? void 0 : batchOperationBar.object)),
164
- !hiddenCancelBtn && /* @__PURE__ */ import_react.default.createElement("a", { onClick: handleOptionsCancel }, cancelText ?? (batchOperationBar == null ? void 0 : batchOperationBar.cancel)),
165
- toolSelectedContent && /* @__PURE__ */ import_react.default.createElement(
166
- import_antd.Popover,
167
- {
168
- placement: "top",
169
- overlayClassName: `${prefixCls}-batch-operation-selection-popover`,
170
- content: toolSelectedContent == null ? void 0 : toolSelectedContent(currentSelectedRowKeys, currentSelectedRows),
171
- trigger: "click",
172
- open: openPopover
173
- },
174
- /* @__PURE__ */ import_react.default.createElement("a", { onClick: () => setOpenPopover(!openPopover) }, openPopover ? collapseText ?? (batchOperationBar == null ? void 0 : batchOperationBar.collapse) : openText ?? (batchOperationBar == null ? void 0 : batchOperationBar.open))
175
- )
176
- ), toolOptionsRender && /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: 8 }, toolOptionsRender == null ? void 0 : toolOptionsRender(currentSelectedRowKeys, currentSelectedRows))), /* @__PURE__ */ import_react.default.createElement("span", null, pagination && (pagination == null ? void 0 : pagination.showTotal) && (pagination == null ? void 0 : pagination.showTotal(total, range))));
155
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
156
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefixCls}-batch-operation-bar`, children: [
157
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
158
+ import_antd.Space,
159
+ {
160
+ size: 8,
161
+ style: {
162
+ marginRight: 24
163
+ },
164
+ children: [
165
+ toolAlertRender && toolAlertRender(currentSelectedRowKeys, currentSelectedRows),
166
+ !toolAlertRender && toolAlertRender !== false && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: `${prefixCls}-batch-operation-selection`, children: [
167
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: batchOperationBar == null ? void 0 : batchOperationBar.selected }),
168
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-batch-operation-selection-count`, children: (currentSelectedRowKeys == null ? void 0 : currentSelectedRowKeys.length) || 0 }),
169
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: batchOperationBar == null ? void 0 : batchOperationBar.object })
170
+ ] }),
171
+ !hiddenCancelBtn && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { onClick: handleOptionsCancel, children: cancelText ?? (batchOperationBar == null ? void 0 : batchOperationBar.cancel) }),
172
+ toolSelectedContent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
173
+ import_antd.Popover,
174
+ {
175
+ placement: "top",
176
+ overlayClassName: `${prefixCls}-batch-operation-selection-popover`,
177
+ content: toolSelectedContent == null ? void 0 : toolSelectedContent(currentSelectedRowKeys, currentSelectedRows),
178
+ trigger: "click",
179
+ open: openPopover,
180
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { onClick: () => setOpenPopover(!openPopover), children: openPopover ? collapseText ?? (batchOperationBar == null ? void 0 : batchOperationBar.collapse) : openText ?? (batchOperationBar == null ? void 0 : batchOperationBar.open) })
181
+ }
182
+ )
183
+ ]
184
+ }
185
+ ),
186
+ toolOptionsRender && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Space, { size: 8, children: toolOptionsRender == null ? void 0 : toolOptionsRender(currentSelectedRowKeys, currentSelectedRows) })
187
+ ] }),
188
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: pagination && (pagination == null ? void 0 : pagination.showTotal) && (pagination == null ? void 0 : pagination.showTotal(total, range)) })
189
+ ] });
177
190
  };
178
191
  return wrapSSR(
179
- /* @__PURE__ */ import_react.default.createElement(
192
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
180
193
  import_antd.Table,
181
194
  {
182
195
  ...props,
@@ -185,7 +198,7 @@ function Table(props, ref) {
185
198
  className: tableCls,
186
199
  locale: {
187
200
  ...restLocale,
188
- emptyText: /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-empty-wrapper` }, typeof emptyText === "function" ? emptyText() : emptyText)
201
+ emptyText: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-empty-wrapper`, children: typeof emptyText === "function" ? emptyText() : emptyText })
189
202
  },
190
203
  size,
191
204
  bordered: bordered || innerBordered,
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { CSSObject } from '@ant-design/cssinjs';
3
- import type { FullToken } from 'antd/es/theme/internal';
3
+ import type { FullToken } from '../../theme/interface';
4
4
  export type TableToken = FullToken<'Table'>;
5
5
  export declare const genTableStyle: (token: TableToken) => CSSObject;
6
6
  declare const _default: (prefixCls: string) => {
package/lib/tabs/index.js CHANGED
@@ -43,6 +43,7 @@ var import_useLegacyItems = __toESM(require("./hooks/useLegacyItems"));
43
43
  var import_style = __toESM(require("./style"));
44
44
  var import_TabPane = __toESM(require("./TabPane"));
45
45
  __reExport(tabs_exports, require("antd/es/tabs"), module.exports);
46
+ var import_jsx_runtime = require("react/jsx-runtime");
46
47
  var isReactNode = (item) => {
47
48
  return import_react.default.isValidElement(item);
48
49
  };
@@ -68,9 +69,9 @@ var Tabs = import_react.default.forwardRef(
68
69
  const renderBadge = (0, import_react.useCallback)(
69
70
  (badge) => {
70
71
  if (typeof badge === "object" && !isReactNode(badge)) {
71
- return /* @__PURE__ */ import_react.default.createElement(import_badge.default, { ...badge, className: (0, import_classnames.default)(`${prefixCls}-tab-badge`, badge.className) });
72
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge.default, { ...badge, className: (0, import_classnames.default)(`${prefixCls}-tab-badge`, badge.className) });
72
73
  }
73
- return /* @__PURE__ */ import_react.default.createElement(import_badge.default, { className: `${prefixCls}-tab-badge`, count: badge });
74
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge.default, { className: `${prefixCls}-tab-badge`, count: badge });
74
75
  },
75
76
  [prefixCls]
76
77
  );
@@ -80,7 +81,7 @@ var Tabs = import_react.default.forwardRef(
80
81
  return {
81
82
  ...item,
82
83
  key: `divider-${dividerList == null ? void 0 : dividerList.indexOf(item)}`,
83
- label: /* @__PURE__ */ import_react.default.createElement(
84
+ label: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
84
85
  import_antd.Divider,
85
86
  {
86
87
  type: isHorizontal ? "vertical" : "horizontal",
@@ -92,13 +93,17 @@ var Tabs = import_react.default.forwardRef(
92
93
  } else if (!(0, import_util.isNullValue)(item.tag) || !(0, import_util.isNullValue)(item.badge)) {
93
94
  return {
94
95
  ...item,
95
- label: /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: 4 }, item.label, item.badge && renderBadge(item.badge), !(0, import_util.isNullValue)(item.tag) && /* @__PURE__ */ import_react.default.createElement(import_antd.Tag, { bordered: false, className: `${prefixCls}-tab-tag` }, item.tag))
96
+ label: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Space, { size: 4, children: [
97
+ item.label,
98
+ item.badge && renderBadge(item.badge),
99
+ !(0, import_util.isNullValue)(item.tag) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Tag, { bordered: false, className: `${prefixCls}-tab-tag`, children: item.tag })
100
+ ] })
96
101
  };
97
102
  }
98
103
  return item;
99
104
  });
100
105
  return wrapSSR(
101
- /* @__PURE__ */ import_react.default.createElement(
106
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
102
107
  import_antd.Tabs,
103
108
  {
104
109
  ref,
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { CSSObject } from '@ant-design/cssinjs';
3
- import type { FullToken } from 'antd/es/theme/internal';
3
+ import type { FullToken } from '../../theme/interface';
4
4
  export type TabsToken = FullToken<'Tabs'>;
5
5
  export declare const genTabsStyle: (token: Partial<TabsToken>) => CSSObject;
6
6
  declare const _default: (prefixCls: string) => {
package/lib/tag/index.js CHANGED
@@ -41,6 +41,7 @@ var import_typography = __toESM(require("../typography"));
41
41
  var import_style = __toESM(require("./style"));
42
42
  var import_getEllipsisConfig = require("../_util/getEllipsisConfig");
43
43
  __reExport(tag_exports, require("antd/es/tag"), module.exports);
44
+ var import_jsx_runtime = require("react/jsx-runtime");
44
45
  var Tag = import_react.default.forwardRef(
45
46
  ({
46
47
  children,
@@ -64,18 +65,21 @@ var Tag = import_react.default.forwardRef(
64
65
  },
65
66
  className
66
67
  );
67
- const realIcon = icon ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefixCls}-icon` }, icon) : null;
68
+ const realIcon = icon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-icon`, children: icon }) : null;
68
69
  return wrapSSR(
69
- /* @__PURE__ */ import_react.default.createElement(
70
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
70
71
  import_antd.Tag,
71
72
  {
72
73
  ref,
73
74
  prefixCls: customizePrefixCls,
74
75
  className: tagCls,
75
76
  icon: ellipsisConfig ? null : icon,
76
- ...restProps
77
- },
78
- ellipsisConfig ? /* @__PURE__ */ import_react.default.createElement(import_typography.default.Text, { ellipsis: ellipsisConfig }, realIcon, children) : children
77
+ ...restProps,
78
+ children: ellipsisConfig ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_typography.default.Text, { ellipsis: ellipsisConfig, children: [
79
+ realIcon,
80
+ children
81
+ ] }) : children
82
+ }
79
83
  )
80
84
  );
81
85
  }
@@ -1,9 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { type FullToken } from 'antd/es/theme/internal';
3
2
  import type { CSSObject } from '@ant-design/cssinjs';
4
- export type TagToken = FullToken<'Tag'> & {
5
- tagPaddingHorizontal: number;
6
- };
3
+ import type { FullToken } from '../../theme/interface';
4
+ export type TagToken = FullToken<'Tag'>;
7
5
  export declare const genTagStyle: (token: TagToken) => CSSObject;
8
6
  declare const _default: (prefixCls: string) => {
9
7
  wrapSSR: (node: import("react").ReactNode) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
@@ -25,42 +25,31 @@ __export(style_exports, {
25
25
  module.exports = __toCommonJS(style_exports);
26
26
  var import_internal = require("antd/es/theme/internal");
27
27
  var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
28
- var import_internal2 = require("antd/lib/theme/internal");
29
- var import_getWeakenBorderColor = require("../../_util/getWeakenBorderColor");
30
- var getTagBorderColor = (color) => {
31
- return (0, import_getWeakenBorderColor.getWeakenBorderColor)(color);
32
- };
33
28
  var genTagPresetStatusStyle = (token, status) => {
34
- const borderColorMap = {
35
- success: token.colorSuccessBorder,
36
- processing: token.colorInfoBorder,
37
- error: token.colorErrorBorder,
38
- warning: token.colorWarningBorder
29
+ const colorMap = {
30
+ success: token.colorSuccessText,
31
+ processing: token.colorInfoText,
32
+ error: token.colorErrorText,
33
+ warning: token.colorWarningText
39
34
  };
40
35
  return {
41
36
  [`${token.componentCls}${token.componentCls}-${status}`]: {
42
- borderColor: getTagBorderColor(borderColorMap[status])
37
+ color: colorMap[status]
43
38
  }
44
39
  };
45
40
  };
46
- var genPresetStyle = (token) => (0, import_internal2.genPresetColor)(token, (colorKey, { lightBorderColor }) => {
47
- return {
48
- [`${token.componentCls}${token.componentCls}-${colorKey}`]: {
49
- borderColor: getTagBorderColor(lightBorderColor)
50
- }
51
- };
52
- });
53
41
  var genTagStyle = (token) => {
54
- const { antCls, componentCls, tagPaddingHorizontal, lineWidth, calc } = token;
55
- const paddingInline = calc(tagPaddingHorizontal).sub(lineWidth).equal();
42
+ const { antCls, componentCls, iconCls } = token;
56
43
  return {
57
44
  [`${componentCls}`]: {
58
45
  paddingInline: token.paddingXS,
59
- borderColor: getTagBorderColor(token.colorBorder),
60
46
  fontSize: token.fontSizeSM,
47
+ [`${componentCls}-close-icon${iconCls}`]: {
48
+ marginInlineStart: token.marginXXS
49
+ },
61
50
  [`${antCls}-typography`]: {
62
51
  [`${componentCls}-icon`]: {
63
- marginInlineEnd: paddingInline
52
+ marginInlineEnd: token.marginXXS
64
53
  }
65
54
  },
66
55
  ["&-ellipsis"]: {
@@ -83,13 +72,9 @@ var genTagStyle = (token) => {
83
72
  };
84
73
  var style_default = (prefixCls) => {
85
74
  const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("Tag", (token) => {
86
- const tagToken = (0, import_internal.mergeToken)(token, {
87
- tagPaddingHorizontal: 8
88
- // Fixed padding.
89
- });
75
+ const tagToken = (0, import_internal.mergeToken)(token, {});
90
76
  return [
91
77
  genTagStyle(tagToken),
92
- genPresetStyle(tagToken),
93
78
  genTagPresetStatusStyle(tagToken, "success"),
94
79
  genTagPresetStatusStyle(tagToken, "error"),
95
80
  genTagPresetStatusStyle(tagToken, "processing"),
@@ -1,52 +1,5 @@
1
1
  declare const darkTheme: {
2
- token: {
3
- colorPrimary: string;
4
- colorSuccess: string;
5
- colorWarning: string;
6
- colorError: string;
7
- colorInfo: string;
8
- colorTextBase: string;
9
- colorBgBase: string;
10
- colorLink: string;
11
- fontFamily: string;
12
- fontFamilyCode: string;
13
- fontSize: number;
14
- lineWidth: number;
15
- lineType: string;
16
- borderRadius: number;
17
- sizeUnit: number;
18
- sizeStep: number;
19
- sizePopupArrow: number;
20
- controlHeight: number;
21
- zIndexBase: number;
22
- zIndexPopupBase: number;
23
- opacityImage: number;
24
- motionUnit: number;
25
- motionBase: number;
26
- motionEaseOutCirc: string;
27
- motionEaseInOutCirc: string;
28
- motionEaseInOut: string;
29
- motionEaseOutBack: string;
30
- motionEaseInBack: string;
31
- motionEaseInQuint: string;
32
- motionEaseOutQuint: string;
33
- motionEaseOut: string;
34
- wireframe: boolean;
35
- motion: boolean;
36
- blue: string;
37
- purple: string;
38
- cyan: string;
39
- green: string;
40
- magenta: string;
41
- pink: string;
42
- red: string;
43
- orange: string;
44
- yellow: string;
45
- volcano: string;
46
- geekblue: string;
47
- lime: string;
48
- gold: string;
49
- };
2
+ token: import("antd/es/theme/internal").SeedToken;
50
3
  components: {
51
4
  InputNumber: {
52
5
  handleVisible: boolean;
@@ -1,4 +1,6 @@
1
- import type { ThemeConfig } from 'antd';
2
1
  export declare const fontFamilyEn = "Inter, 'Noto sans', sans-serif, Roboto, 'Open Sans', 'Segoe UI', 'Helvetica Neue', 'Helvetica, Arial', 'Apple Color Emoji'";
3
- declare const _default: ThemeConfig;
2
+ export declare const fontWeightWeakEn = 400;
3
+ export declare const fontWeightEn = 500;
4
+ export declare const fontWeightStrongEn = 600;
5
+ declare const _default: import("antd").ThemeConfig;
4
6
  export default _default;