@oceanbase/design 0.4.1 → 0.4.2

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 (82) hide show
  1. package/dist/design.min.css +1 -1
  2. package/dist/design.min.js +1 -1
  3. package/dist/reset.css +1 -0
  4. package/es/_util/genComponentStyleHook.d.ts +0 -1
  5. package/es/_util/genComponentStyleHook.js +1 -25
  6. package/es/button/index.d.ts +1 -1
  7. package/es/card/index.js +11 -19
  8. package/es/descriptions/hooks/useItems.d.ts +1 -1
  9. package/es/empty/style/index.js +13 -11
  10. package/es/global.css +48 -0
  11. package/es/index.d.ts +3 -1
  12. package/es/index.js +2 -1
  13. package/es/progress/index.d.ts +1 -0
  14. package/es/progress/index.js +1 -0
  15. package/es/progress/progress.d.ts +1 -0
  16. package/es/progress/progress.js +1 -0
  17. package/es/radio/index.d.ts +6 -1
  18. package/es/result/style/index.js +10 -2
  19. package/es/slider/style/index.js +2 -2
  20. package/es/switch/index.d.ts +4 -0
  21. package/es/switch/index.js +40 -1
  22. package/es/switch/style/index.d.ts +9 -0
  23. package/es/switch/style/index.js +17 -0
  24. package/es/table/index.js +4 -1
  25. package/es/table/style/index.js +40 -32
  26. package/es/theme/default.js +3 -1
  27. package/es/theme/style/compact.less +1 -1
  28. package/es/theme/style/default.less +1 -1
  29. package/es/tooltip/MouseTooltip.js +3 -2
  30. package/es/tooltip/index.js +3 -2
  31. package/es/tooltip/style/index.js +11 -2
  32. package/es/typography/Link.js +9 -3
  33. package/es/typography/Paragraph.js +9 -3
  34. package/es/typography/Text.js +9 -3
  35. package/es/typography/Title.js +9 -3
  36. package/es/typography/hooks/useClassName.d.ts +3 -0
  37. package/es/typography/hooks/useClassName.js +11 -0
  38. package/es/typography/style/index.js +45 -3
  39. package/lib/_util/genComponentStyleHook.d.ts +0 -1
  40. package/lib/_util/genComponentStyleHook.js +3 -38
  41. package/lib/button/index.d.ts +1 -1
  42. package/lib/card/index.js +10 -21
  43. package/lib/descriptions/hooks/useItems.d.ts +1 -1
  44. package/lib/empty/style/index.js +42 -46
  45. package/lib/global.css +48 -0
  46. package/lib/index.d.ts +3 -1
  47. package/lib/index.js +4 -1
  48. package/lib/progress/index.d.ts +1 -0
  49. package/lib/progress/index.js +2 -0
  50. package/lib/progress/progress.d.ts +1 -0
  51. package/lib/progress/progress.js +23 -0
  52. package/lib/radio/index.d.ts +6 -1
  53. package/lib/result/style/index.js +10 -1
  54. package/lib/slider/style/index.js +2 -2
  55. package/lib/switch/index.d.ts +4 -0
  56. package/lib/switch/index.js +40 -1
  57. package/lib/switch/style/index.d.ts +9 -0
  58. package/lib/switch/style/index.js +44 -0
  59. package/lib/table/index.js +5 -0
  60. package/lib/table/style/index.js +77 -42
  61. package/lib/theme/default.js +3 -1
  62. package/lib/theme/style/compact.less +1 -1
  63. package/lib/theme/style/default.less +1 -1
  64. package/lib/tooltip/MouseTooltip.js +3 -2
  65. package/lib/tooltip/index.js +3 -2
  66. package/lib/tooltip/style/index.js +10 -1
  67. package/lib/typography/Link.js +14 -2
  68. package/lib/typography/Paragraph.js +14 -2
  69. package/lib/typography/Text.js +14 -2
  70. package/lib/typography/Title.js +14 -2
  71. package/lib/typography/hooks/useClassName.d.ts +3 -0
  72. package/lib/typography/hooks/useClassName.js +46 -0
  73. package/lib/typography/style/index.js +49 -1
  74. package/package.json +6 -7
  75. package/es/reset.css +0 -10
  76. package/lib/reset.css +0 -10
  77. /package/es/{_util/fonts → fonts}/Consolas.woff2 +0 -0
  78. /package/es/{_util/fonts → fonts}/HelveticaNeue.woff2 +0 -0
  79. /package/es/{_util/fonts → fonts}/Inter.woff2 +0 -0
  80. /package/lib/{_util/fonts → fonts}/Consolas.woff2 +0 -0
  81. /package/lib/{_util/fonts → fonts}/HelveticaNeue.woff2 +0 -0
  82. /package/lib/{_util/fonts → fonts}/Inter.woff2 +0 -0
@@ -0,0 +1,23 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/progress/progress.ts
17
+ var progress_exports = {};
18
+ module.exports = __toCommonJS(progress_exports);
19
+ __reExport(progress_exports, require("antd/es/progress/progress"), module.exports);
20
+ // Annotate the CommonJS export names for ESM import in node:
21
+ 0 && (module.exports = {
22
+ ...require("antd/es/progress/progress")
23
+ });
@@ -1,3 +1,8 @@
1
+ import type { RadioProps as AntRadioProps, RadioRef } from 'antd/es/radio';
2
+ import React from 'react';
1
3
  export * from 'antd/es/radio';
2
- declare const Radio: any;
4
+ declare const Radio: React.ForwardRefExoticComponent<AntRadioProps & React.RefAttributes<RadioRef>> & {
5
+ Group: React.MemoExoticComponent<React.ForwardRefExoticComponent<import("antd").RadioGroupProps & React.RefAttributes<HTMLDivElement>>>;
6
+ Button: React.ForwardRefExoticComponent<import("antd/es/radio/radioButton").RadioButtonProps & React.RefAttributes<RadioRef>>;
7
+ };
3
8
  export default Radio;
@@ -30,12 +30,21 @@ var genResultStyle = (token) => {
30
30
  return {
31
31
  [`${componentCls}`]: {
32
32
  [`${componentCls}-title`]: {
33
- fontWeight: token.fontWeightStrong
33
+ fontWeight: token.fontWeightStrong,
34
+ fontSize: token.fontSizeHeading4,
35
+ lineHeight: token.lineHeightHeading4
36
+ },
37
+ [`${componentCls}-subtitle`]: {
38
+ maxWidth: 600,
39
+ margin: "0px auto"
34
40
  },
35
41
  [`${componentCls}-extra`]: {
36
42
  ...(0, import_genStyle.genLargeStyle)(token)
37
43
  },
38
44
  [`${componentCls}-content`]: {
45
+ maxWidth: 1e3,
46
+ margin: "0px auto",
47
+ marginTop: token.marginLG,
39
48
  padding: token.paddingLG,
40
49
  borderRadius: token.borderRadiusLG
41
50
  }
@@ -29,10 +29,10 @@ var genSliderStyle = (token) => {
29
29
  return {
30
30
  [`${componentCls}${componentCls}-horizontal`]: {
31
31
  [`${componentCls}-mark`]: {
32
- [`${componentCls}-mark-text[style^="left: 0%; transform: translateX(-50%);"]`]: {
32
+ [`${componentCls}-mark-text[style*="left: 0%;"]`]: {
33
33
  transform: `translateX(calc(0% - ${dotSize / 2}px)) !important`
34
34
  },
35
- [`${componentCls}-mark-text[style^="left: 100%; transform: translateX(-50%);"]`]: {
35
+ [`${componentCls}-mark-text[style*="left: 100%;"]`]: {
36
36
  transform: `translateX(calc(-100% + ${dotSize / 2}px)) !important`
37
37
  }
38
38
  }
@@ -1 +1,5 @@
1
+ import type { SwitchProps as AntSwitchProps } from 'antd/es/switch';
2
+ import React from 'react';
1
3
  export * from 'antd/es/switch';
4
+ declare const Switch: React.ForwardRefExoticComponent<AntSwitchProps & React.RefAttributes<HTMLButtonElement>>;
5
+ export default Switch;
@@ -1,7 +1,13 @@
1
+ var __create = Object.create;
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
4
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
+ };
5
11
  var __copyProps = (to, from, except, desc) => {
6
12
  if (from && typeof from === "object" || typeof from === "function") {
7
13
  for (let key of __getOwnPropNames(from))
@@ -11,12 +17,45 @@ var __copyProps = (to, from, except, desc) => {
11
17
  return to;
12
18
  };
13
19
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
14
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
29
 
16
- // src/switch/index.ts
30
+ // src/switch/index.tsx
17
31
  var switch_exports = {};
32
+ __export(switch_exports, {
33
+ default: () => switch_default
34
+ });
18
35
  module.exports = __toCommonJS(switch_exports);
36
+ var import_antd = require("antd");
37
+ var import_classnames = __toESM(require("classnames"));
38
+ var import_react = __toESM(require("react"));
39
+ var import_config_provider = __toESM(require("../config-provider"));
40
+ var import_style = __toESM(require("./style"));
19
41
  __reExport(switch_exports, require("antd/es/switch"), module.exports);
42
+ var InternalSwitch = import_react.default.forwardRef(
43
+ ({ prefixCls: customizePrefixCls, className, ...restProps }, ref) => {
44
+ const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
45
+ const prefixCls = getPrefixCls("switch", customizePrefixCls);
46
+ const { wrapSSR } = (0, import_style.default)(prefixCls);
47
+ const switchCls = (0, import_classnames.default)(className);
48
+ return wrapSSR(
49
+ /* @__PURE__ */ import_react.default.createElement(import_antd.Switch, { ref, prefixCls: customizePrefixCls, className: switchCls, ...restProps })
50
+ );
51
+ }
52
+ );
53
+ var Switch = InternalSwitch;
54
+ Switch.__ANT_SWITCH = import_antd.Switch.__ANT_SWITCH;
55
+ if (process.env.NODE_ENV !== "production") {
56
+ Switch.displayName = import_antd.Switch.displayName;
57
+ }
58
+ var switch_default = Switch;
20
59
  // Annotate the CommonJS export names for ESM import in node:
21
60
  0 && (module.exports = {
22
61
  ...require("antd/es/switch")
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
3
+ export type SwitchToken = FullToken<'Switch'>;
4
+ export declare const genSwitchStyle: GenerateStyle<SwitchToken>;
5
+ declare const _default: (prefixCls: string) => {
6
+ wrapSSR: (node: import("react").ReactNode) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
7
+ hashId: string;
8
+ };
9
+ export default _default;
@@ -0,0 +1,44 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/switch/style/index.ts
20
+ var style_exports = {};
21
+ __export(style_exports, {
22
+ default: () => style_default,
23
+ genSwitchStyle: () => genSwitchStyle
24
+ });
25
+ module.exports = __toCommonJS(style_exports);
26
+ var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
27
+ var genSwitchStyle = (token) => {
28
+ const { componentCls } = token;
29
+ return {
30
+ [`${componentCls}:not(${componentCls}-checked):not(${componentCls}-disabled):not(${componentCls}-loading)`]: {
31
+ background: token.colorTextTertiary
32
+ }
33
+ };
34
+ };
35
+ var style_default = (prefixCls) => {
36
+ const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("Switch", (token) => {
37
+ return [genSwitchStyle(token)];
38
+ });
39
+ return useStyle(prefixCls);
40
+ };
41
+ // Annotate the CommonJS export names for ESM import in node:
42
+ 0 && (module.exports = {
43
+ genSwitchStyle
44
+ });
@@ -84,6 +84,7 @@ function Table(props, ref) {
84
84
  const tableCls = (0, import_classnames.default)(
85
85
  {
86
86
  [`${prefixCls}-expandable`]: !(0, import_lodash.isEmpty)(expandable),
87
+ [`${prefixCls}-selectable`]: !!rowSelection,
87
88
  [`${prefixCls}-has-footer`]: !!footer
88
89
  },
89
90
  className
@@ -182,6 +183,10 @@ function Table(props, ref) {
182
183
  emptyText: /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-empty-wrapper` }, typeof emptyText === "function" ? emptyText() : emptyText)
183
184
  },
184
185
  columns: newColumns,
186
+ expandable: expandable ? {
187
+ columnWidth: 32,
188
+ ...expandable
189
+ } : void 0,
185
190
  rowSelection: rowSelection ? {
186
191
  columnWidth: table == null ? void 0 : table.selectionColumnWidth,
187
192
  ...rowSelection,
@@ -36,12 +36,9 @@ var genTableStyle = (token) => {
36
36
  colorLink,
37
37
  borderRadiusLG,
38
38
  colorBorderSecondary,
39
- paddingSM,
40
39
  padding,
41
- paddingLG,
42
40
  marginLG,
43
- marginXS,
44
- marginSM
41
+ marginXS
45
42
  } = token;
46
43
  return {
47
44
  // 表格通用样式
@@ -52,19 +49,29 @@ var genTableStyle = (token) => {
52
49
  [`${componentCls}-footer`]: {
53
50
  borderBottom: `1px solid ${colorBorderSecondary}`
54
51
  },
52
+ // 单元格通用样式
53
+ [`${componentCls}-thead, ${componentCls}-tbody`]: {
54
+ ["td, th"]: {
55
+ [`&${componentCls}-row-expand-icon-cell`]: {
56
+ backgroundColor: colorBgBase,
57
+ padding: `${token.paddingSM}px ${token.paddingXS}px`
58
+ },
59
+ // 内容第一列,左侧间距减小为 8px
60
+ [`&:not(:first-child):not(${componentCls}-selection-column):not(${componentCls}-row-expand-icon-cell)`]: {
61
+ paddingLeft: token.paddingXS
62
+ }
63
+ }
64
+ },
55
65
  // head 样式
56
66
  [`${componentCls}-thead > tr`]: {
57
- ["td, th"]: {
67
+ ["th"]: {
58
68
  // 弱化列标题
59
69
  color: colorTextSecondary,
60
70
  fontWeight: "normal",
61
71
  backgroundColor: colorBgBase
62
72
  },
63
- [`td${componentCls}-row-expand-icon-cell`]: {
64
- backgroundColor: colorBgBase
65
- },
66
73
  // 去掉排序列表头的灰色背景
67
- [`th${componentCls}-column-sort`]: {
74
+ [`th${componentCls}-column-has-sorters`]: {
68
75
  backgroundColor: colorBgBase
69
76
  },
70
77
  [`${componentCls}-cell-scrollbar`]: {
@@ -88,19 +95,24 @@ var genTableStyle = (token) => {
88
95
  [`tr${componentCls}-row-selected > td`]: {
89
96
  backgroundColor: `${colorPrimaryBg} !important`
90
97
  },
91
- // 展开行样式
92
- [`${componentCls}-expanded-row > td`]: {
93
- padding: `${paddingSM}px ${paddingLG}px ${paddingSM}px ${padding + paddingLG}px !important`,
94
- backgroundColor: colorBgBase,
95
- // 除内嵌子表格外,设置其他内嵌元素样式
96
- [`& > *:not(${componentCls}-wrapper)`]: {
97
- marginTop: -marginSM,
98
- padding: `${paddingSM}px ${padding}px`,
99
- backgroundColor: colorFillQuaternary,
100
- borderRadius: borderRadiusLG
98
+ [`${componentCls}-tbody-virtual-scrollbar ${componentCls}-tbody-virtual-scrollbar-thumb`]: {
99
+ background: `${token.colorFillSecondary} !important`
100
+ },
101
+ // 去掉可展开行在展开时的底部 border
102
+ [`tr > td:has(${componentCls}-row-expand-icon-expanded)`]: {
103
+ borderBottom: "none",
104
+ [`& ~ td`]: {
105
+ borderBottom: "none"
101
106
  }
102
107
  },
103
- // empty wrapper style
108
+ // 为了避免行展开/收起时出现 border 动画,覆盖 antd 默认配置,仅设置背景色动画
109
+ [`tr > td`]: {
110
+ transition: `background ${token.motionDurationMid}`
111
+ },
112
+ // empty style
113
+ [`${componentCls}-placeholder td`]: {
114
+ borderBottom: "none"
115
+ },
104
116
  [`${componentCls}-empty-wrapper`]: {
105
117
  minHeight: 360,
106
118
  display: "flex",
@@ -109,21 +121,17 @@ var genTableStyle = (token) => {
109
121
  },
110
122
  // 嵌套子表格样式
111
123
  [`tr > td > ${componentCls}-wrapper:only-child ${componentCls}`]: {
112
- // 调整嵌套子表格的间距
113
- marginBlock: "0 !important",
114
- marginInline: "0 !important",
115
- // 设置嵌套子表格的单元格背景色
124
+ borderBottom: "none",
125
+ // 设置嵌套子表格的表头背景色
116
126
  [`${componentCls}-thead > tr > th`]: {
117
- backgroundColor: `${colorFillQuaternary} !important`
127
+ backgroundColor: token.colorFillQuaternary
118
128
  },
119
- [`${componentCls}-tbody ${componentCls}-row td`]: {
120
- backgroundColor: `${colorFillQuaternary} !important`
129
+ // 去掉表头左右单元格的圆角
130
+ [`${componentCls}-thead > tr:first-child > th:first-child`]: {
131
+ borderRadius: 0
121
132
  },
122
- // 设置最后一行左右两列的圆角
123
- [`${componentCls}-tbody > tr:last-child`]: {
124
- ["td:first-child, td:last-child"]: {
125
- borderRadius: borderRadiusLG
126
- }
133
+ [`${componentCls}-thead > tr:first-child > th:last-child`]: {
134
+ borderRadius: 0
127
135
  },
128
136
  // empty wrapper style
129
137
  [`${componentCls}-empty-wrapper`]: {
@@ -152,16 +160,6 @@ var genTableStyle = (token) => {
152
160
  }
153
161
  }
154
162
  },
155
- // 去掉非展开表格的边框
156
- [`${componentCls}-wrapper:not(${componentCls}-expandable)`]: {
157
- [`${componentCls}:not(${componentCls}-bordered)`]: {
158
- [`${componentCls}-tbody`]: {
159
- [`tr:not(${componentCls}-measure-row) > td`]: {
160
- border: "none"
161
- }
162
- }
163
- }
164
- },
165
163
  // 可展开表格样式
166
164
  [`${componentCls}-wrapper${componentCls}-expandable`]: {
167
165
  [`${componentCls}`]: {
@@ -176,6 +174,43 @@ var genTableStyle = (token) => {
176
174
  backgroundColor: colorPrimaryBg
177
175
  }
178
176
  }
177
+ },
178
+ // 嵌套子表格和父表格第一列对齐
179
+ [`tr > td > ${componentCls}-wrapper:only-child ${componentCls}`]: {
180
+ marginLeft: token.marginXS + token.lineWidth * 2
181
+ }
182
+ }
183
+ },
184
+ [`${componentCls}-middle, ${componentCls}-small`]: {
185
+ [`${componentCls}-tbody`]: {
186
+ // 嵌套子表格和父表格第一列对齐
187
+ [`tr > td > ${componentCls}-wrapper:only-child ${componentCls}`]: {
188
+ marginLeft: token.marginXS + token.lineWidth * 2 + token.margin
189
+ }
190
+ }
191
+ }
192
+ },
193
+ // 可展开表格 + 可选择表格样式
194
+ [`${componentCls}-wrapper${componentCls}-expandable${componentCls}-selectable`]: {
195
+ [`${componentCls}`]: {
196
+ [`${componentCls}-tbody`]: {
197
+ [`${componentCls}-expanded-row > td`]: {
198
+ // 除内嵌子表格外,设置其他内嵌元素样式
199
+ [`& > *:not(${componentCls}-wrapper)`]: {
200
+ marginLeft: token.marginLG + token.marginXL + token.lineWidth * 2
201
+ }
202
+ },
203
+ // 嵌套子表格和父表格第一列对齐
204
+ [`tr > td > ${componentCls}-wrapper:only-child ${componentCls}`]: {
205
+ marginLeft: token.marginXS + token.marginXL + token.lineWidth * 2
206
+ }
207
+ }
208
+ },
209
+ [`${componentCls}-middle, ${componentCls}-small`]: {
210
+ [`${componentCls}-tbody`]: {
211
+ // 嵌套子表格和父表格第一列对齐
212
+ [`tr > td > ${componentCls}-wrapper:only-child ${componentCls}`]: {
213
+ marginLeft: token.marginXS + token.marginXL + token.lineWidth * 2 + token.margin
179
214
  }
180
215
  }
181
216
  }
@@ -100,7 +100,9 @@ var defaultTheme = {
100
100
  boxShadowSecondary: "0 6px 16px 0 rgba(54, 69, 99, 0.08), 0 3px 6px -4px rgba(54, 69, 99, 0.12), 0 9px 28px 8px rgba(54, 69, 99, 0.05)",
101
101
  boxShadow: "0 1px 2px 0 rgba(54, 69, 99, 0.03), 0 1px 6px -1px rgba(54, 69, 99, 0.02), 0 2px 4px 0 rgba(54, 69, 99, 0.02)",
102
102
  borderRadius: 6,
103
- wireframe: false
103
+ wireframe: false,
104
+ // Remove focus outline
105
+ lineWidthFocus: 0
104
106
  },
105
107
  components: {
106
108
  Breadcrumb: {
@@ -414,6 +414,7 @@
414
414
  @borderRadiusOuter: 4;
415
415
  @boxShadowSecondary: 0 6px 16px 0 rgba(54, 69, 99, 0.08), 0 3px 6px -4px rgba(54, 69, 99, 0.12), 0 9px 28px 8px rgba(54, 69, 99, 0.05);
416
416
  @boxShadow: 0 1px 2px 0 rgba(54, 69, 99, 0.03), 0 1px 6px -1px rgba(54, 69, 99, 0.02), 0 2px 4px 0 rgba(54, 69, 99, 0.02);
417
+ @lineWidthFocus: 3;
417
418
  @colorFillContent: #e2e8f3;
418
419
  @colorFillContentHover: #cdd5e4;
419
420
  @colorFillAlter: #f8fafe;
@@ -434,7 +435,6 @@
434
435
  @colorErrorOutline: rgba(255, 5, 5, 0.08);
435
436
  @colorWarningOutline: rgba(255, 164, 19, 0.11);
436
437
  @fontSizeIcon: 10;
437
- @lineWidthFocus: 3;
438
438
  @controlOutlineWidth: 2;
439
439
  @controlInteractiveSize: 14;
440
440
  @controlItemBgHover: #f3f6fc;
@@ -414,6 +414,7 @@
414
414
  @borderRadiusOuter: 4;
415
415
  @boxShadowSecondary: 0 6px 16px 0 rgba(54, 69, 99, 0.08), 0 3px 6px -4px rgba(54, 69, 99, 0.12), 0 9px 28px 8px rgba(54, 69, 99, 0.05);
416
416
  @boxShadow: 0 1px 2px 0 rgba(54, 69, 99, 0.03), 0 1px 6px -1px rgba(54, 69, 99, 0.02), 0 2px 4px 0 rgba(54, 69, 99, 0.02);
417
+ @lineWidthFocus: 3;
417
418
  @colorFillContent: #e2e8f3;
418
419
  @colorFillContentHover: #cdd5e4;
419
420
  @colorFillAlter: #f8fafe;
@@ -434,7 +435,6 @@
434
435
  @colorErrorOutline: rgba(255, 5, 5, 0.08);
435
436
  @colorWarningOutline: rgba(255, 164, 19, 0.11);
436
437
  @fontSizeIcon: 12;
437
- @lineWidthFocus: 3;
438
438
  @controlOutlineWidth: 2;
439
439
  @controlInteractiveSize: 16;
440
440
  @controlItemBgHover: #f3f6fc;
@@ -49,6 +49,7 @@ var MouseTooltip = ({
49
49
  mouseLeaveDelay = 0.1,
50
50
  ...restProps
51
51
  }) => {
52
+ var _a, _b;
52
53
  const { token } = import_theme.default.useToken();
53
54
  const [visible, setVisible] = (0, import_react.useState)(false);
54
55
  const { color: textColor, ...restOverlayInnerStyle } = overlayInnerStyle || {};
@@ -95,10 +96,10 @@ var MouseTooltip = ({
95
96
  boxShadow: token.boxShadowSecondary,
96
97
  borderRadius: token.borderRadius,
97
98
  // @ts-ignore
98
- color: textColor || token.Tooltip.colorTextLightSolid || token.colorTextLightSolid,
99
+ color: textColor || ((_a = token.Tooltip) == null ? void 0 : _a.colorTextLightSolid) || token.colorTextLightSolid,
99
100
  backgroundColor: (
100
101
  // @ts-ignore
101
- backgroundColor || token.Tooltip.colorBgSpotlight || token.colorBgSpotlight
102
+ backgroundColor || ((_b = token.Tooltip) == null ? void 0 : _b.colorBgSpotlight) || token.colorBgSpotlight
102
103
  ),
103
104
  left: isOverWidth ? clientX - tooltipWidth - offset : clientX + offset,
104
105
  top: isOverHeight ? clientY - tooltipHeight - offset : clientY + offset,
@@ -66,7 +66,8 @@ var Tooltip = import_react.default.forwardRef(
66
66
  const { prefixCls: customizePrefixCls } = restProps;
67
67
  const prefixCls = getPrefixCls("tooltip", customizePrefixCls);
68
68
  const { wrapSSR, hashId } = (0, import_style.default)(prefixCls);
69
- const tooltipCls = (0, import_classnames.default)(className, hashId);
69
+ const tooltipCls = (0, import_classnames.default)(className);
70
+ const mouseTooltipCls = (0, import_classnames.default)(prefixCls, className, hashId);
70
71
  const [innerOpen, setInnerOpen] = (0, import_react.useState)(open ?? visible ?? defaultOpen ?? defaultVisible);
71
72
  const noTitle = !title && !overlay && title !== 0;
72
73
  const newOpen = open ?? visible ?? (noTitle ? false : innerOpen);
@@ -93,7 +94,7 @@ var Tooltip = import_react.default.forwardRef(
93
94
  color: typeItem == null ? void 0 : typeItem.color,
94
95
  ...overlayInnerStyle
95
96
  },
96
- className: tooltipCls,
97
+ className: mouseTooltipCls,
97
98
  overlay,
98
99
  ...restProps
99
100
  },
@@ -28,13 +28,22 @@ var genTooltipStyle = (token) => {
28
28
  const { componentCls } = token;
29
29
  return {
30
30
  [componentCls]: {
31
+ maxWidth: 300,
32
+ [`${componentCls}-inner`]: {
33
+ maxHeight: 250,
34
+ overflow: "auto"
35
+ },
31
36
  [`${componentCls}-close-icon-wrap`]: {
32
37
  display: "flex",
33
38
  justifyContent: "space-between",
34
39
  alignItems: "flex-start",
35
40
  wordBreak: "break-all",
36
41
  [`${componentCls}-close-icon`]: {
37
- cursor: "pointer"
42
+ cursor: "pointer",
43
+ color: token.colorIcon,
44
+ "&:hover": {
45
+ color: token.colorIconHover
46
+ }
38
47
  }
39
48
  }
40
49
  }
@@ -36,16 +36,28 @@ module.exports = __toCommonJS(Link_exports);
36
36
  var import_react = __toESM(require("react"));
37
37
  var import_antd = require("antd");
38
38
  var import_config_provider = __toESM(require("../config-provider"));
39
+ var import_useClassName = __toESM(require("./hooks/useClassName"));
39
40
  var import_style = __toESM(require("./style"));
40
41
  __reExport(Link_exports, require("antd/es/typography/Link"), module.exports);
41
42
  var { Link: AntLink } = import_antd.Typography;
42
43
  var Link = import_react.default.forwardRef(
43
- ({ prefixCls: customizePrefixCls, children, ...restProps }, ref) => {
44
+ ({ editable, prefixCls: customizePrefixCls, className, children, ...restProps }, ref) => {
44
45
  const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
45
46
  const prefixCls = getPrefixCls("typography", customizePrefixCls);
46
47
  const { wrapSSR } = (0, import_style.default)(prefixCls);
48
+ const typographyCls = (0, import_useClassName.default)(prefixCls, className, editable);
47
49
  return wrapSSR(
48
- /* @__PURE__ */ import_react.default.createElement(AntLink, { ref, prefixCls: customizePrefixCls, ...restProps }, children)
50
+ /* @__PURE__ */ import_react.default.createElement(
51
+ AntLink,
52
+ {
53
+ ref,
54
+ editable,
55
+ prefixCls: customizePrefixCls,
56
+ className: typographyCls,
57
+ ...restProps
58
+ },
59
+ children
60
+ )
49
61
  );
50
62
  }
51
63
  );
@@ -36,16 +36,28 @@ module.exports = __toCommonJS(Paragraph_exports);
36
36
  var import_react = __toESM(require("react"));
37
37
  var import_antd = require("antd");
38
38
  var import_config_provider = __toESM(require("../config-provider"));
39
+ var import_useClassName = __toESM(require("./hooks/useClassName"));
39
40
  var import_style = __toESM(require("./style"));
40
41
  __reExport(Paragraph_exports, require("antd/es/typography/Paragraph"), module.exports);
41
42
  var { Paragraph: AntParagraph } = import_antd.Typography;
42
43
  var Paragraph = import_react.default.forwardRef(
43
- ({ prefixCls: customizePrefixCls, children, ...restProps }, ref) => {
44
+ ({ editable, prefixCls: customizePrefixCls, className, children, ...restProps }, ref) => {
44
45
  const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
45
46
  const prefixCls = getPrefixCls("typography", customizePrefixCls);
46
47
  const { wrapSSR } = (0, import_style.default)(prefixCls);
48
+ const typographyCls = (0, import_useClassName.default)(prefixCls, className, editable);
47
49
  return wrapSSR(
48
- /* @__PURE__ */ import_react.default.createElement(AntParagraph, { ref, prefixCls: customizePrefixCls, ...restProps }, children)
50
+ /* @__PURE__ */ import_react.default.createElement(
51
+ AntParagraph,
52
+ {
53
+ ref,
54
+ editable,
55
+ prefixCls: customizePrefixCls,
56
+ className: typographyCls,
57
+ ...restProps
58
+ },
59
+ children
60
+ )
49
61
  );
50
62
  }
51
63
  );
@@ -36,16 +36,28 @@ module.exports = __toCommonJS(Text_exports);
36
36
  var import_react = __toESM(require("react"));
37
37
  var import_antd = require("antd");
38
38
  var import_config_provider = __toESM(require("../config-provider"));
39
+ var import_useClassName = __toESM(require("./hooks/useClassName"));
39
40
  var import_style = __toESM(require("./style"));
40
41
  __reExport(Text_exports, require("antd/es/typography/Text"), module.exports);
41
42
  var { Text: AntText } = import_antd.Typography;
42
43
  var Text = import_react.default.forwardRef(
43
- ({ prefixCls: customizePrefixCls, children, ...restProps }, ref) => {
44
+ ({ editable, prefixCls: customizePrefixCls, className, children, ...restProps }, ref) => {
44
45
  const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
45
46
  const prefixCls = getPrefixCls("typography", customizePrefixCls);
46
47
  const { wrapSSR } = (0, import_style.default)(prefixCls);
48
+ const typographyCls = (0, import_useClassName.default)(prefixCls, className, editable);
47
49
  return wrapSSR(
48
- /* @__PURE__ */ import_react.default.createElement(AntText, { ref, prefixCls: customizePrefixCls, ...restProps }, children)
50
+ /* @__PURE__ */ import_react.default.createElement(
51
+ AntText,
52
+ {
53
+ ref,
54
+ editable,
55
+ prefixCls: customizePrefixCls,
56
+ className: typographyCls,
57
+ ...restProps
58
+ },
59
+ children
60
+ )
49
61
  );
50
62
  }
51
63
  );
@@ -36,16 +36,28 @@ module.exports = __toCommonJS(Title_exports);
36
36
  var import_react = __toESM(require("react"));
37
37
  var import_antd = require("antd");
38
38
  var import_config_provider = __toESM(require("../config-provider"));
39
+ var import_useClassName = __toESM(require("./hooks/useClassName"));
39
40
  var import_style = __toESM(require("./style"));
40
41
  __reExport(Title_exports, require("antd/es/typography/Title"), module.exports);
41
42
  var { Title: AntTitle } = import_antd.Typography;
42
43
  var Title = import_react.default.forwardRef(
43
- ({ prefixCls: customizePrefixCls, children, ...restProps }, ref) => {
44
+ ({ editable, prefixCls: customizePrefixCls, className, children, ...restProps }, ref) => {
44
45
  const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
45
46
  const prefixCls = getPrefixCls("typography", customizePrefixCls);
46
47
  const { wrapSSR } = (0, import_style.default)(prefixCls);
48
+ const typographyCls = (0, import_useClassName.default)(prefixCls, className, editable);
47
49
  return wrapSSR(
48
- /* @__PURE__ */ import_react.default.createElement(AntTitle, { ref, prefixCls: customizePrefixCls, ...restProps }, children)
50
+ /* @__PURE__ */ import_react.default.createElement(
51
+ AntTitle,
52
+ {
53
+ ref,
54
+ editable,
55
+ prefixCls: customizePrefixCls,
56
+ className: typographyCls,
57
+ ...restProps
58
+ },
59
+ children
60
+ )
49
61
  );
50
62
  }
51
63
  );
@@ -0,0 +1,3 @@
1
+ import type { BlockProps } from 'antd/es/typography/Base';
2
+ declare const useClassName: (prefixCls: string, className: string, editable?: BlockProps['editable']) => string;
3
+ export default useClassName;