@oceanbase/design 1.0.0-alpha.1 → 1.0.0-alpha.10

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 (324) hide show
  1. package/dist/design.min.css +1 -1
  2. package/dist/design.min.js +1 -1
  3. package/dist/reset.css +2 -1
  4. package/dist/static/Inter-Medium.ea234620.woff2 +0 -0
  5. package/dist/static/Inter-Regular.34ba43c9.woff2 +0 -0
  6. package/dist/static/Inter-SemiBold.95439fb4.woff2 +0 -0
  7. package/es/_util/genComponentStyleHook.d.ts +21 -4
  8. package/es/_util/genComponentStyleHook.js +68 -20
  9. package/es/alert/index.d.ts +2 -2
  10. package/es/alert/index.js +22 -6
  11. package/es/alert/style/index.d.ts +2 -5
  12. package/es/alert/style/index.js +157 -67
  13. package/es/app/index.d.ts +8 -0
  14. package/es/app/index.js +43 -1
  15. package/es/app/style/index.d.ts +6 -0
  16. package/es/app/style/index.js +9 -0
  17. package/es/badge/index.js +15 -7
  18. package/es/badge/style/index.d.ts +2 -5
  19. package/es/badge/style/index.js +13 -18
  20. package/es/button/index.js +10 -4
  21. package/es/button/style/index.d.ts +4 -5
  22. package/es/button/style/index.js +40 -7
  23. package/es/card/index.d.ts +11 -0
  24. package/es/card/index.js +151 -9
  25. package/es/card/style/index.d.ts +2 -5
  26. package/es/card/style/index.js +83 -18
  27. package/es/checkbox/index.js +9 -2
  28. package/es/checkbox/style/index.d.ts +2 -5
  29. package/es/checkbox/style/index.js +14 -11
  30. package/es/config-provider/context.d.ts +11 -0
  31. package/es/config-provider/context.js +2 -1
  32. package/es/config-provider/index.d.ts +4 -3
  33. package/es/config-provider/index.js +92 -40
  34. package/es/descriptions/index.d.ts +10 -0
  35. package/es/descriptions/index.js +62 -5
  36. package/es/descriptions/style/index.d.ts +3 -6
  37. package/es/descriptions/style/index.js +70 -10
  38. package/es/drawer/index.js +10 -7
  39. package/es/drawer/style/index.d.ts +2 -5
  40. package/es/drawer/style/index.js +44 -17
  41. package/es/dropdown/dropdown-button.js +26 -6
  42. package/es/dropdown/style/index.d.ts +6 -0
  43. package/es/{_util/genStyle.js → dropdown/style/index.js} +14 -11
  44. package/es/empty/index.js +4 -3
  45. package/es/empty/style/index.d.ts +2 -5
  46. package/es/empty/style/index.js +10 -10
  47. package/es/fonts/Inter-Medium.woff2 +0 -0
  48. package/es/fonts/Inter-Regular.woff2 +0 -0
  49. package/es/fonts/Inter-SemiBold.woff2 +0 -0
  50. package/es/form/FormItem.d.ts +1 -0
  51. package/es/form/FormItem.js +26 -11
  52. package/es/form/index.js +9 -2
  53. package/es/form/style/index.d.ts +2 -5
  54. package/es/form/style/index.js +19 -8
  55. package/es/index.d.ts +4 -3
  56. package/es/index.js +1 -1
  57. package/es/input/Input.d.ts +2 -0
  58. package/es/input/Input.js +30 -7
  59. package/es/input/Password.js +24 -5
  60. package/es/input/Search.js +24 -5
  61. package/es/input/TextArea.js +24 -5
  62. package/es/input/style/index.d.ts +6 -0
  63. package/es/input/style/index.js +32 -0
  64. package/es/input-number/index.d.ts +2 -1
  65. package/es/input-number/index.js +18 -4
  66. package/es/input-number/style/index.d.ts +6 -0
  67. package/es/input-number/style/index.js +19 -0
  68. package/es/locale/en-US.js +4 -1
  69. package/es/locale/index.d.ts +2 -0
  70. package/es/locale/ja-JP.d.ts +3 -0
  71. package/es/locale/ja-JP.js +31 -0
  72. package/es/locale/zh-CN.js +4 -1
  73. package/es/locale/zh-TW.js +4 -1
  74. package/es/modal/Modal.js +29 -8
  75. package/es/modal/style/index.d.ts +2 -5
  76. package/es/modal/style/index.js +67 -26
  77. package/es/radio/index.js +9 -2
  78. package/es/radio/style/index.d.ts +2 -5
  79. package/es/radio/style/index.js +16 -10
  80. package/es/result/index.d.ts +2 -2
  81. package/es/result/index.js +14 -6
  82. package/es/result/style/index.d.ts +2 -5
  83. package/es/result/style/index.js +3 -6
  84. package/es/segmented/index.d.ts +1 -0
  85. package/es/segmented/index.js +24 -9
  86. package/es/segmented/style/index.d.ts +1 -4
  87. package/es/segmented/style/index.js +4 -6
  88. package/es/select/index.js +9 -2
  89. package/es/select/style/index.d.ts +2 -5
  90. package/es/select/style/index.js +6 -7
  91. package/es/slider/index.js +9 -2
  92. package/es/slider/style/index.d.ts +2 -5
  93. package/es/slider/style/index.js +11 -11
  94. package/es/space/index.js +9 -2
  95. package/es/space/style/index.d.ts +2 -5
  96. package/es/space/style/index.js +3 -6
  97. package/es/spin/index.js +9 -2
  98. package/es/spin/style/index.d.ts +2 -5
  99. package/es/spin/style/index.js +27 -27
  100. package/es/static-function/index.js +13 -4
  101. package/es/style/cssVariables.d.ts +25 -0
  102. package/es/style/cssVariables.js +48 -0
  103. package/es/style/cssVariablesMeta.d.ts +24 -0
  104. package/es/style/cssVariablesMeta.js +974 -0
  105. package/es/style/global.d.ts +8 -0
  106. package/es/style/global.js +121 -0
  107. package/es/style/reset.css +2 -1
  108. package/es/switch/index.js +9 -2
  109. package/es/switch/style/index.d.ts +2 -5
  110. package/es/switch/style/index.js +3 -6
  111. package/es/table/index.d.ts +1 -4
  112. package/es/table/index.js +67 -34
  113. package/es/table/style/index.d.ts +2 -5
  114. package/es/table/style/index.js +58 -36
  115. package/es/tabs/index.js +9 -2
  116. package/es/tabs/style/index.d.ts +2 -5
  117. package/es/tabs/style/index.js +10 -10
  118. package/es/tag/index.d.ts +1 -0
  119. package/es/tag/index.js +17 -4
  120. package/es/tag/style/index.d.ts +3 -8
  121. package/es/tag/style/index.js +39 -35
  122. package/es/theme/compact.d.ts +1 -1
  123. package/es/theme/compact.js +2 -6
  124. package/es/theme/dark.d.ts +1 -48
  125. package/es/theme/default.d.ts +48 -2
  126. package/es/theme/default.js +324 -62
  127. package/es/theme/index.d.ts +20 -57
  128. package/es/theme/interface.d.ts +130 -0
  129. package/es/theme/interface.js +4 -1
  130. package/es/theme/style/aliyun.less +41 -41
  131. package/es/theme/style/compact.less +166 -137
  132. package/es/theme/style/dark.less +58 -58
  133. package/es/theme/style/default.less +169 -140
  134. package/es/tooltip/index.js +4 -4
  135. package/es/tooltip/style/index.d.ts +2 -5
  136. package/es/tooltip/style/index.js +10 -13
  137. package/es/tree-select/index.js +9 -2
  138. package/es/tree-select/style/index.d.ts +2 -5
  139. package/es/tree-select/style/index.js +3 -6
  140. package/es/typography/Link.js +9 -2
  141. package/es/typography/Paragraph.js +9 -2
  142. package/es/typography/Text.d.ts +1 -0
  143. package/es/typography/Text.js +12 -4
  144. package/es/typography/Title.js +9 -2
  145. package/es/typography/hooks/useClassName.d.ts +1 -1
  146. package/es/typography/hooks/useClassName.js +2 -2
  147. package/es/typography/index.d.ts +12 -1
  148. package/es/typography/index.js +2 -1
  149. package/es/typography/style/index.d.ts +2 -5
  150. package/es/typography/style/index.js +36 -28
  151. package/lib/_util/genComponentStyleHook.d.ts +21 -4
  152. package/lib/_util/genComponentStyleHook.js +50 -31
  153. package/lib/alert/index.d.ts +2 -2
  154. package/lib/alert/index.js +20 -11
  155. package/lib/alert/style/index.d.ts +2 -5
  156. package/lib/alert/style/index.js +174 -79
  157. package/lib/app/index.d.ts +8 -0
  158. package/lib/app/index.js +36 -1
  159. package/lib/app/style/index.d.ts +6 -0
  160. package/lib/{_util/getWeakenBorderColor.js → app/style/index.js} +15 -10
  161. package/lib/badge/index.js +32 -23
  162. package/lib/badge/style/index.d.ts +2 -5
  163. package/lib/badge/style/index.js +14 -16
  164. package/lib/button/index.js +5 -4
  165. package/lib/button/style/index.d.ts +4 -5
  166. package/lib/button/style/index.js +48 -9
  167. package/lib/card/index.d.ts +11 -0
  168. package/lib/card/index.js +160 -12
  169. package/lib/card/style/index.d.ts +2 -5
  170. package/lib/card/style/index.js +132 -21
  171. package/lib/checkbox/index.js +4 -3
  172. package/lib/checkbox/style/index.d.ts +2 -5
  173. package/lib/checkbox/style/index.js +10 -8
  174. package/lib/config-provider/DefaultRenderEmpty.js +4 -3
  175. package/lib/config-provider/context.d.ts +11 -0
  176. package/lib/config-provider/index.d.ts +4 -3
  177. package/lib/config-provider/index.js +133 -30
  178. package/lib/descriptions/hooks/useItems.js +5 -4
  179. package/lib/descriptions/index.d.ts +10 -0
  180. package/lib/descriptions/index.js +54 -6
  181. package/lib/descriptions/style/index.d.ts +3 -6
  182. package/lib/descriptions/style/index.js +117 -7
  183. package/lib/drawer/index.js +46 -35
  184. package/lib/drawer/style/index.d.ts +2 -5
  185. package/lib/drawer/style/index.js +44 -14
  186. package/lib/dropdown/dropdown-button.js +26 -3
  187. package/lib/dropdown/index.js +2 -2
  188. package/lib/dropdown/style/index.d.ts +6 -0
  189. package/lib/dropdown/style/index.js +46 -0
  190. package/lib/empty/colored.js +413 -327
  191. package/lib/empty/database.js +267 -222
  192. package/lib/empty/default.js +16 -21
  193. package/lib/empty/guide.js +201 -184
  194. package/lib/empty/index.js +25 -20
  195. package/lib/empty/style/index.d.ts +2 -5
  196. package/lib/empty/style/index.js +9 -10
  197. package/lib/fonts/Inter-Medium.woff2 +0 -0
  198. package/lib/fonts/Inter-Regular.woff2 +0 -0
  199. package/lib/fonts/Inter-SemiBold.woff2 +0 -0
  200. package/lib/form/FormItem.d.ts +1 -0
  201. package/lib/form/FormItem.js +19 -8
  202. package/lib/form/index.js +8 -5
  203. package/lib/form/style/index.d.ts +2 -5
  204. package/lib/form/style/index.js +28 -7
  205. package/lib/grid/col.js +2 -1
  206. package/lib/grid/row.js +2 -1
  207. package/lib/index.d.ts +4 -3
  208. package/lib/index.js +3 -1
  209. package/lib/input/Input.d.ts +2 -0
  210. package/lib/input/Input.js +37 -13
  211. package/lib/input/Password.js +22 -4
  212. package/lib/input/Search.js +32 -12
  213. package/lib/input/TextArea.js +22 -4
  214. package/lib/input/style/index.d.ts +6 -0
  215. package/lib/input/style/index.js +74 -0
  216. package/lib/input-number/index.d.ts +2 -1
  217. package/lib/input-number/index.js +19 -3
  218. package/lib/input-number/style/index.d.ts +6 -0
  219. package/lib/{_util/genStyle.js → input-number/style/index.js} +22 -17
  220. package/lib/list/index.js +3 -2
  221. package/lib/locale/en-US.js +3 -0
  222. package/lib/locale/index.d.ts +2 -0
  223. package/lib/locale/ja-JP.d.ts +3 -0
  224. package/lib/locale/ja-JP.js +63 -0
  225. package/lib/locale/zh-CN.js +3 -0
  226. package/lib/locale/zh-TW.js +3 -0
  227. package/lib/lottie/index.js +2 -1
  228. package/lib/modal/Modal.js +35 -11
  229. package/lib/modal/Progress.js +9 -5
  230. package/lib/modal/style/index.d.ts +2 -5
  231. package/lib/modal/style/index.js +81 -24
  232. package/lib/radio/index.js +4 -3
  233. package/lib/radio/style/index.d.ts +2 -5
  234. package/lib/radio/style/index.js +17 -8
  235. package/lib/result/403.js +156 -121
  236. package/lib/result/404.js +328 -267
  237. package/lib/result/500.js +295 -257
  238. package/lib/result/Error.js +127 -99
  239. package/lib/result/Processing.js +246 -213
  240. package/lib/result/Success.js +233 -169
  241. package/lib/result/Warning.js +611 -515
  242. package/lib/result/index.d.ts +2 -2
  243. package/lib/result/index.js +14 -13
  244. package/lib/result/style/index.d.ts +2 -5
  245. package/lib/result/style/index.js +3 -6
  246. package/lib/segmented/index.d.ts +1 -0
  247. package/lib/segmented/index.js +17 -6
  248. package/lib/segmented/style/index.d.ts +1 -4
  249. package/lib/segmented/style/index.js +4 -6
  250. package/lib/select/index.js +4 -3
  251. package/lib/select/style/index.d.ts +2 -5
  252. package/lib/select/style/index.js +7 -7
  253. package/lib/slider/index.js +4 -3
  254. package/lib/slider/style/index.d.ts +2 -5
  255. package/lib/slider/style/index.js +12 -11
  256. package/lib/space/index.js +3 -2
  257. package/lib/space/style/index.d.ts +2 -5
  258. package/lib/space/style/index.js +3 -6
  259. package/lib/spin/index.js +7 -6
  260. package/lib/spin/style/index.d.ts +2 -5
  261. package/lib/spin/style/index.js +26 -28
  262. package/lib/static-function/index.js +7 -1
  263. package/lib/style/cssVariables.d.ts +25 -0
  264. package/lib/style/cssVariables.js +261 -0
  265. package/lib/style/cssVariablesMeta.d.ts +24 -0
  266. package/lib/style/cssVariablesMeta.js +1059 -0
  267. package/lib/style/global.d.ts +8 -0
  268. package/lib/style/global.js +176 -0
  269. package/lib/style/reset.css +2 -1
  270. package/lib/switch/index.js +4 -3
  271. package/lib/switch/style/index.d.ts +2 -5
  272. package/lib/switch/style/index.js +3 -6
  273. package/lib/table/index.d.ts +1 -4
  274. package/lib/table/index.js +114 -68
  275. package/lib/table/style/index.d.ts +2 -5
  276. package/lib/table/style/index.js +68 -32
  277. package/lib/tabs/index.js +12 -7
  278. package/lib/tabs/style/index.d.ts +2 -5
  279. package/lib/tabs/style/index.js +12 -8
  280. package/lib/tag/index.d.ts +1 -0
  281. package/lib/tag/index.js +18 -8
  282. package/lib/tag/style/index.d.ts +3 -8
  283. package/lib/tag/style/index.js +45 -36
  284. package/lib/theme/compact.d.ts +1 -1
  285. package/lib/theme/compact.js +1 -5
  286. package/lib/theme/dark.d.ts +1 -48
  287. package/lib/theme/default.d.ts +48 -2
  288. package/lib/theme/default.js +403 -61
  289. package/lib/theme/index.d.ts +20 -57
  290. package/lib/theme/interface.d.ts +130 -0
  291. package/lib/theme/style/aliyun.less +41 -41
  292. package/lib/theme/style/compact.less +166 -137
  293. package/lib/theme/style/dark.less +58 -58
  294. package/lib/theme/style/default.less +169 -140
  295. package/lib/tooltip/MouseTooltip.js +43 -39
  296. package/lib/tooltip/ReactStickyMouseTooltip.js +5 -4
  297. package/lib/tooltip/index.js +17 -13
  298. package/lib/tooltip/style/index.d.ts +2 -5
  299. package/lib/tooltip/style/index.js +10 -13
  300. package/lib/tree-select/index.js +4 -3
  301. package/lib/tree-select/style/index.d.ts +2 -5
  302. package/lib/tree-select/style/index.js +3 -6
  303. package/lib/typography/Link.js +7 -6
  304. package/lib/typography/Paragraph.js +7 -6
  305. package/lib/typography/Text.d.ts +1 -0
  306. package/lib/typography/Text.js +9 -8
  307. package/lib/typography/Title.js +7 -6
  308. package/lib/typography/hooks/useClassName.d.ts +1 -1
  309. package/lib/typography/hooks/useClassName.js +3 -2
  310. package/lib/typography/index.d.ts +12 -1
  311. package/lib/typography/index.js +6 -5
  312. package/lib/typography/style/index.d.ts +2 -5
  313. package/lib/typography/style/index.js +34 -26
  314. package/package.json +10 -9
  315. package/dist/static/Inter.f6bcdfb6.woff2 +0 -0
  316. package/es/_util/genStyle.d.ts +0 -2
  317. package/es/_util/getWeakenBorderColor.d.ts +0 -1
  318. package/es/_util/getWeakenBorderColor.js +0 -4
  319. package/es/fonts/Inter.woff2 +0 -0
  320. package/es/global.css +0 -48
  321. package/lib/_util/genStyle.d.ts +0 -2
  322. package/lib/_util/getWeakenBorderColor.d.ts +0 -1
  323. package/lib/fonts/Inter.woff2 +0 -0
  324. package/lib/global.css +0 -48
@@ -41,6 +41,7 @@ var import_config_provider = __toESM(require("../config-provider"));
41
41
  var import_en_US = __toESM(require("../locale/en-US"));
42
42
  var import_style = __toESM(require("./style"));
43
43
  __reExport(tree_select_exports, require("antd/es/tree-select"), module.exports);
44
+ var import_jsx_runtime = require("react/jsx-runtime");
44
45
  var InternalTreeSelect = import_react.default.forwardRef(
45
46
  ({ locale: customLocale, prefixCls: customizePrefixCls, className, ...restProps }, ref) => {
46
47
  const { locale: contextLocale, getPrefixCls } = (0, import_react.useContext)(
@@ -54,10 +55,10 @@ var InternalTreeSelect = import_react.default.forwardRef(
54
55
  ...customLocale
55
56
  };
56
57
  const prefixCls = getPrefixCls("tree-select", customizePrefixCls);
57
- const { wrapSSR } = (0, import_style.default)(prefixCls);
58
+ const [wrapCSSVar] = (0, import_style.default)(prefixCls);
58
59
  const treeSelectCls = (0, import_classnames.default)(className);
59
- return wrapSSR(
60
- /* @__PURE__ */ import_react.default.createElement(
60
+ return wrapCSSVar(
61
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
61
62
  import_antd.TreeSelect,
62
63
  {
63
64
  ref,
@@ -1,9 +1,6 @@
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 TreeSelectToken = FullToken<'TreeSelect'>;
4
4
  export declare const genTreeSelectStyle: GenerateStyle<TreeSelectToken>;
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
- };
5
+ declare const _default: (prefixCls: string, rootCls?: string) => readonly [(node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>, string, string];
9
6
  export default _default;
@@ -27,12 +27,9 @@ var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
27
27
  var genTreeSelectStyle = (token) => {
28
28
  return {};
29
29
  };
30
- var style_default = (prefixCls) => {
31
- const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("TreeSelect", (token) => {
32
- return [genTreeSelectStyle(token)];
33
- });
34
- return useStyle(prefixCls);
35
- };
30
+ var style_default = (0, import_genComponentStyleHook.genStyleHooks)("TreeSelect", (token) => {
31
+ return [genTreeSelectStyle(token)];
32
+ });
36
33
  // Annotate the CommonJS export names for ESM import in node:
37
34
  0 && (module.exports = {
38
35
  genTreeSelectStyle
@@ -39,24 +39,25 @@ var import_config_provider = __toESM(require("../config-provider"));
39
39
  var import_useClassName = __toESM(require("./hooks/useClassName"));
40
40
  var import_style = __toESM(require("./style"));
41
41
  __reExport(Link_exports, require("antd/es/typography/Link"), module.exports);
42
+ var import_jsx_runtime = require("react/jsx-runtime");
42
43
  var { Link: AntLink } = import_antd.Typography;
43
44
  var Link = import_react.default.forwardRef(
44
45
  ({ editable, prefixCls: customizePrefixCls, className, children, ...restProps }, ref) => {
45
46
  const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
46
47
  const prefixCls = getPrefixCls("typography", customizePrefixCls);
47
- const { wrapSSR } = (0, import_style.default)(prefixCls);
48
+ const [wrapCSSVar] = (0, import_style.default)(prefixCls);
48
49
  const typographyCls = (0, import_useClassName.default)(prefixCls, className, editable);
49
- return wrapSSR(
50
- /* @__PURE__ */ import_react.default.createElement(
50
+ return wrapCSSVar(
51
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
51
52
  AntLink,
52
53
  {
53
54
  ref,
54
55
  editable,
55
56
  prefixCls: customizePrefixCls,
56
57
  className: typographyCls,
57
- ...restProps
58
- },
59
- children
58
+ ...restProps,
59
+ children
60
+ }
60
61
  )
61
62
  );
62
63
  }
@@ -39,24 +39,25 @@ var import_config_provider = __toESM(require("../config-provider"));
39
39
  var import_useClassName = __toESM(require("./hooks/useClassName"));
40
40
  var import_style = __toESM(require("./style"));
41
41
  __reExport(Paragraph_exports, require("antd/es/typography/Paragraph"), module.exports);
42
+ var import_jsx_runtime = require("react/jsx-runtime");
42
43
  var { Paragraph: AntParagraph } = import_antd.Typography;
43
44
  var Paragraph = import_react.default.forwardRef(
44
45
  ({ editable, prefixCls: customizePrefixCls, className, children, ...restProps }, ref) => {
45
46
  const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
46
47
  const prefixCls = getPrefixCls("typography", customizePrefixCls);
47
- const { wrapSSR } = (0, import_style.default)(prefixCls);
48
+ const [wrapCSSVar] = (0, import_style.default)(prefixCls);
48
49
  const typographyCls = (0, import_useClassName.default)(prefixCls, className, editable);
49
- return wrapSSR(
50
- /* @__PURE__ */ import_react.default.createElement(
50
+ return wrapCSSVar(
51
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
51
52
  AntParagraph,
52
53
  {
53
54
  ref,
54
55
  editable,
55
56
  prefixCls: customizePrefixCls,
56
57
  className: typographyCls,
57
- ...restProps
58
- },
59
- children
58
+ ...restProps,
59
+ children
60
+ }
60
61
  )
61
62
  );
62
63
  }
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import type { TextProps as AntTextProps } from 'antd/es/typography/Text';
3
3
  export * from 'antd/es/typography/Text';
4
4
  export interface TextProps extends AntTextProps {
5
+ caption?: boolean;
5
6
  }
6
7
  type CompoundedComponent = React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>> & {
7
8
  /** @internal */
@@ -39,24 +39,25 @@ var import_config_provider = __toESM(require("../config-provider"));
39
39
  var import_useClassName = __toESM(require("./hooks/useClassName"));
40
40
  var import_style = __toESM(require("./style"));
41
41
  __reExport(Text_exports, require("antd/es/typography/Text"), module.exports);
42
+ var import_jsx_runtime = require("react/jsx-runtime");
42
43
  var { Text: AntText } = import_antd.Typography;
43
44
  var Text = import_react.default.forwardRef(
44
- ({ editable, prefixCls: customizePrefixCls, className, children, ...restProps }, ref) => {
45
+ ({ editable, caption, prefixCls: customizePrefixCls, className, children, ...restProps }, ref) => {
45
46
  const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
46
47
  const prefixCls = getPrefixCls("typography", customizePrefixCls);
47
- const { wrapSSR } = (0, import_style.default)(prefixCls);
48
- const typographyCls = (0, import_useClassName.default)(prefixCls, className, editable);
49
- return wrapSSR(
50
- /* @__PURE__ */ import_react.default.createElement(
48
+ const [wrapCSSVar] = (0, import_style.default)(prefixCls);
49
+ const typographyCls = (0, import_useClassName.default)(prefixCls, className, editable, caption);
50
+ return wrapCSSVar(
51
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
51
52
  AntText,
52
53
  {
53
54
  ref,
54
55
  editable,
55
56
  prefixCls: customizePrefixCls,
56
57
  className: typographyCls,
57
- ...restProps
58
- },
59
- children
58
+ ...restProps,
59
+ children
60
+ }
60
61
  )
61
62
  );
62
63
  }
@@ -39,24 +39,25 @@ var import_config_provider = __toESM(require("../config-provider"));
39
39
  var import_useClassName = __toESM(require("./hooks/useClassName"));
40
40
  var import_style = __toESM(require("./style"));
41
41
  __reExport(Title_exports, require("antd/es/typography/Title"), module.exports);
42
+ var import_jsx_runtime = require("react/jsx-runtime");
42
43
  var { Title: AntTitle } = import_antd.Typography;
43
44
  var Title = import_react.default.forwardRef(
44
45
  ({ editable, prefixCls: customizePrefixCls, className, children, ...restProps }, ref) => {
45
46
  const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
46
47
  const prefixCls = getPrefixCls("typography", customizePrefixCls);
47
- const { wrapSSR } = (0, import_style.default)(prefixCls);
48
+ const [wrapCSSVar] = (0, import_style.default)(prefixCls);
48
49
  const typographyCls = (0, import_useClassName.default)(prefixCls, className, editable);
49
- return wrapSSR(
50
- /* @__PURE__ */ import_react.default.createElement(
50
+ return wrapCSSVar(
51
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
51
52
  AntTitle,
52
53
  {
53
54
  ref,
54
55
  editable,
55
56
  prefixCls: customizePrefixCls,
56
57
  className: typographyCls,
57
- ...restProps
58
- },
59
- children
58
+ ...restProps,
59
+ children
60
+ }
60
61
  )
61
62
  );
62
63
  }
@@ -1,3 +1,3 @@
1
1
  import type { BlockProps } from 'antd/es/typography/Base';
2
- declare const useClassName: (prefixCls: string, className: string, editable?: BlockProps['editable']) => string;
2
+ declare const useClassName: (prefixCls: string, className: string, editable?: BlockProps['editable'], caption?: boolean) => string;
3
3
  export default useClassName;
@@ -33,11 +33,12 @@ __export(useClassName_exports, {
33
33
  });
34
34
  module.exports = __toCommonJS(useClassName_exports);
35
35
  var import_classnames = __toESM(require("classnames"));
36
- var useClassName = (prefixCls, className, editable) => {
36
+ var useClassName = (prefixCls, className, editable, caption) => {
37
37
  var _a;
38
38
  const typographyCls = (0, import_classnames.default)(
39
39
  {
40
- [`${prefixCls}-editable-text`]: typeof editable === "object" && ((_a = editable == null ? void 0 : editable.triggerType) == null ? void 0 : _a.includes("text"))
40
+ [`${prefixCls}-editable-text`]: typeof editable === "object" && ((_a = editable == null ? void 0 : editable.triggerType) == null ? void 0 : _a.includes("text")),
41
+ [`${prefixCls}-caption`]: caption
41
42
  },
42
43
  className
43
44
  );
@@ -1,8 +1,19 @@
1
- import { Typography } from 'antd';
1
+ import { Typography as OriginTypography } from 'antd';
2
+ import Text from './Text';
3
+ import Link from './Link';
4
+ import Title from './Title';
5
+ import Paragraph from './Paragraph';
2
6
  export * from 'antd/es/typography';
3
7
  export * from 'antd/es/typography/Base';
4
8
  export * from 'antd/es/typography/Text';
5
9
  export * from 'antd/es/typography/Paragraph';
6
10
  export * from 'antd/es/typography/Link';
7
11
  export * from 'antd/es/typography/Title';
12
+ export type TypographyType = typeof OriginTypography & {
13
+ Text: typeof Text;
14
+ Link: typeof Link;
15
+ Title: typeof Title;
16
+ Paragraph: typeof Paragraph;
17
+ };
18
+ declare const Typography: TypographyType;
8
19
  export default Typography;
@@ -44,11 +44,12 @@ __reExport(typography_exports, require("antd/es/typography/Text"), module.export
44
44
  __reExport(typography_exports, require("antd/es/typography/Paragraph"), module.exports);
45
45
  __reExport(typography_exports, require("antd/es/typography/Link"), module.exports);
46
46
  __reExport(typography_exports, require("antd/es/typography/Title"), module.exports);
47
- import_antd.Typography.Text = import_Text.default;
48
- import_antd.Typography.Link = import_Link.default;
49
- import_antd.Typography.Title = import_Title.default;
50
- import_antd.Typography.Paragraph = import_Paragraph.default;
51
- var typography_default = import_antd.Typography;
47
+ var Typography = import_antd.Typography;
48
+ Typography.Text = import_Text.default;
49
+ Typography.Link = import_Link.default;
50
+ Typography.Title = import_Title.default;
51
+ Typography.Paragraph = import_Paragraph.default;
52
+ var typography_default = Typography;
52
53
  // Annotate the CommonJS export names for ESM import in node:
53
54
  0 && (module.exports = {
54
55
  ...require("antd/es/typography"),
@@ -1,9 +1,6 @@
1
1
  /// <reference types="react" />
2
- import type { FullToken, GenerateStyle } from 'antd/lib/theme/internal';
2
+ import type { FullToken, GenerateStyle } from '../../theme/interface';
3
3
  export type TypographyToken = FullToken<'Typography'>;
4
4
  export declare const genTypographyStyle: GenerateStyle<TypographyToken>;
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
- };
5
+ declare const _default: (prefixCls: string, rootCls?: string) => readonly [(node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>, string, string];
9
6
  export default _default;
@@ -23,10 +23,14 @@ __export(style_exports, {
23
23
  genTypographyStyle: () => genTypographyStyle
24
24
  });
25
25
  module.exports = __toCommonJS(style_exports);
26
+ var import_cssinjs = require("@ant-design/cssinjs");
26
27
  var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
27
28
  var genTypographyStyle = (token) => {
28
- const { componentCls, controlHeight, fontSize, lineHeight } = token;
29
- const marginOffset = (controlHeight - fontSize * lineHeight) / 2;
29
+ const { componentCls, controlHeight, fontSize, lineHeight, calc } = token;
30
+ const marginOffset = calc(controlHeight).sub(calc(fontSize).mul(lineHeight).equal()).div(2).equal();
31
+ const paddingTop = calc(marginOffset).sub(token.lineWidth).equal();
32
+ const paddingInline = calc(token.paddingSM).sub(token.lineWidth).equal();
33
+ const negativeMarginOffset = calc(marginOffset).mul(-1).equal();
30
34
  return {
31
35
  // inherit color and lineHeight from parent instead of fixed colorText
32
36
  [`${componentCls}`]: {
@@ -37,56 +41,60 @@ var genTypographyStyle = (token) => {
37
41
  fontSize: token.fontSize
38
42
  }
39
43
  },
44
+ [`${componentCls}-caption`]: {
45
+ fontSize: token.fontSizeSM,
46
+ fontWeight: token.fontWeightWeak
47
+ },
40
48
  [`${componentCls}${componentCls}-editable-text:not(${componentCls}-edit-content)`]: {
41
49
  "&:hover": {
42
50
  background: token.colorBgContainer,
43
- border: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`,
51
+ border: `${(0, import_cssinjs.unit)(token.lineWidth)} ${token.lineType} ${token.colorBorder}`,
44
52
  borderRadius: token.borderRadius,
45
53
  position: "relative",
46
- insetInlineStart: -token.paddingSM,
47
- padding: `${marginOffset - token.lineWidth}px ${token.paddingSM - token.lineWidth}px`
54
+ insetInlineStart: calc(token.paddingSM).mul(-1).equal(),
55
+ padding: `${paddingTop} ${paddingInline}`
48
56
  },
49
57
  "div&:hover": {
50
58
  height: token.controlHeight,
51
- marginTop: -marginOffset,
52
- marginBottom: `calc(1em - ${marginOffset}px)`
59
+ marginTop: negativeMarginOffset,
60
+ marginBottom: calc("1em").sub(marginOffset).equal()
53
61
  },
54
62
  "span&:hover": {
55
63
  display: "inline-block",
56
64
  height: token.controlHeight,
57
- marginTop: -marginOffset,
58
- marginBottom: -marginOffset
65
+ marginTop: negativeMarginOffset,
66
+ marginBottom: negativeMarginOffset
59
67
  },
60
68
  "h1&:hover, h2&:hover, h3&:hover, h4&:hover, h5&:hover": {
61
- marginTop: `${-marginOffset}px !important`,
62
- marginBottom: `${-marginOffset}px !important`
69
+ marginTop: `${negativeMarginOffset} !important`,
70
+ marginBottom: `${negativeMarginOffset} !important`
63
71
  }
64
72
  },
65
73
  [`${componentCls}${componentCls}-edit-content`]: {
66
74
  [`${componentCls}-div&`]: {
67
- insetInlineStart: -token.paddingSM,
68
- marginTop: -marginOffset,
69
- marginBottom: `calc(1em - ${marginOffset}px)`
75
+ insetInlineStart: calc(token.paddingSM).mul(-1).equal(),
76
+ insetBlockStart: 0,
77
+ marginTop: negativeMarginOffset,
78
+ marginBottom: calc("1em").sub(marginOffset).equal()
70
79
  },
71
80
  [`${componentCls}-span&`]: {
72
- insetInlineStart: -token.paddingSM,
73
- marginTop: -marginOffset,
74
- marginBottom: -marginOffset
81
+ insetInlineStart: calc(token.paddingSM).mul(-1).equal(),
82
+ insetBlockStart: 0,
83
+ marginTop: negativeMarginOffset,
84
+ marginBottom: negativeMarginOffset
75
85
  },
76
86
  [`${componentCls}-h1&, ${componentCls}-h2&, ${componentCls}-h3&, ${componentCls}-h4&, ${componentCls}-h5&`]: {
77
- insetInlineStart: -token.paddingSM,
78
- marginTop: `${-marginOffset}px !important`,
79
- marginBottom: `${-marginOffset}px !important`
87
+ insetInlineStart: calc(token.paddingSM).mul(-1).equal(),
88
+ insetBlockStart: 0,
89
+ marginTop: `${negativeMarginOffset} !important`,
90
+ marginBottom: `${negativeMarginOffset} !important`
80
91
  }
81
92
  }
82
93
  };
83
94
  };
84
- var style_default = (prefixCls) => {
85
- const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("Typography", (token) => {
86
- return [genTypographyStyle(token)];
87
- });
88
- return useStyle(prefixCls);
89
- };
95
+ var style_default = (0, import_genComponentStyleHook.genStyleHooks)("Typography", (token) => {
96
+ return [genTypographyStyle(token)];
97
+ });
90
98
  // Annotate the CommonJS export names for ESM import in node:
91
99
  0 && (module.exports = {
92
100
  genTypographyStyle
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oceanbase/design",
3
- "version": "1.0.0-alpha.1",
3
+ "version": "1.0.0-alpha.10",
4
4
  "description": "The Design System of OceanBase",
5
5
  "keywords": [
6
6
  "oceanbase",
@@ -31,7 +31,6 @@
31
31
  "LICENSE"
32
32
  ],
33
33
  "sideEffects": [
34
- "**/*.less",
35
34
  "**/*.css"
36
35
  ],
37
36
  "scripts": {
@@ -39,13 +38,13 @@
39
38
  },
40
39
  "dependencies": {
41
40
  "@ant-design/cssinjs": "^1.24.0",
42
- "@ctrl/tinycolor": "^4.1.0",
41
+ "@ctrl/tinycolor": "^4.2.0",
43
42
  "@inline-svg-unique-id/react": "^1.2.3",
44
43
  "@oceanbase/aliyun-theme": "^0.1.6",
45
44
  "@oceanbase/icons": "^1.0.0-alpha.0",
46
- "@oceanbase/util": "^1.0.0-alpha.0",
45
+ "@oceanbase/util": "^1.0.0-alpha.2",
47
46
  "ahooks": "^2.10.14",
48
- "antd": "^5.27.3",
47
+ "antd": "^5.29.2",
49
48
  "classnames": "^2.5.1",
50
49
  "lodash": "^4.17.21",
51
50
  "lottie-web": "^5.13.0",
@@ -53,17 +52,19 @@
53
52
  "rc-util": "^5.44.4"
54
53
  },
55
54
  "devDependencies": {
55
+ "@ant-design/cssinjs-utils": "^1.1.3",
56
56
  "@babel/cli": "^7.28.3",
57
- "@babel/preset-env": "^7.28.3",
57
+ "@babel/preset-env": "^7.28.5",
58
58
  "antd-token-previewer": "^2.0.8",
59
+ "rc-input": "^1.8.0",
59
60
  "rc-select": "^14.16.8",
60
- "rc-slider": "^11.1.8",
61
- "rc-table": "^7.53.0",
61
+ "rc-slider": "^11.1.9",
62
+ "rc-table": "^7.55.1",
62
63
  "rc-tree-select": "^5.27.0"
63
64
  },
64
65
  "peerDependencies": {
65
66
  "react": ">=16.9.0",
66
67
  "react-dom": ">=16.9.0"
67
68
  },
68
- "gitHead": "47b1ebfa75581585b83252085dddd33fc2c072a5"
69
+ "gitHead": "06757770d5ede2d3bc2ea0409e45d2e6dea5012c"
69
70
  }
Binary file
@@ -1,2 +0,0 @@
1
- import type { CSSObject } from '@ant-design/cssinjs';
2
- export declare const genCompactStyle: (componentCls: string, subComponentCls?: string) => CSSObject;
@@ -1 +0,0 @@
1
- export declare function getWeakenBorderColor(color: string): string;
@@ -1,4 +0,0 @@
1
- import { TinyColor } from '@ctrl/tinycolor';
2
- export function getWeakenBorderColor(color) {
3
- return new TinyColor(color).setAlpha(0.4).toHex8String();
4
- }
Binary file
package/es/global.css DELETED
@@ -1,48 +0,0 @@
1
- @import '~antd/dist/reset.css';
2
-
3
- @font-face {
4
- font-family: 'Inter';
5
- /* load priority: local font > self-hosting font > remote font */
6
- src:
7
- local('Inter'),
8
- url('./fonts/Inter.woff2') format('woff2'),
9
- url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*2aG4RJIdUGYAAAAAAAAAAAAADmfOAQ/Inter.woff2')
10
- format('woff2');
11
- /* load strategy: use default font as fallback */
12
- font-display: swap;
13
- }
14
-
15
- @font-face {
16
- font-family: 'Consolas';
17
- src:
18
- local('Consolas'),
19
- url('./fonts/Consolas.woff2') format('woff2'),
20
- url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*R8bMTqAdGWgAAAAAAAAAAAAADmfOAQ/Consolas.woff2')
21
- format('woff2');
22
- font-display: swap;
23
- }
24
-
25
- @font-face {
26
- font-family: 'Helvetica Neue';
27
- src:
28
- local('Helvetica Neue'),
29
- url('./fonts/HelveticaNeue.woff2') format('woff2'),
30
- url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*3EzqR6aYJMkAAAAAAAAAAAAADmfOAQ/HelveticaNeue.woff2')
31
- format('woff2');
32
- font-display: swap;
33
- }
34
-
35
- pre,
36
- code,
37
- kbd,
38
- samp {
39
- font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
40
- }
41
-
42
- * {
43
- scrollbar-color: #e2e8f3 transparent;
44
- }
45
-
46
- .rc-virtual-list-scrollbar-thumb {
47
- background: #e2e8f3 !important;
48
- }
@@ -1,2 +0,0 @@
1
- import type { CSSObject } from '@ant-design/cssinjs';
2
- export declare const genCompactStyle: (componentCls: string, subComponentCls?: string) => CSSObject;
@@ -1 +0,0 @@
1
- export declare function getWeakenBorderColor(color: string): string;
Binary file
package/lib/global.css DELETED
@@ -1,48 +0,0 @@
1
- @import '~antd/dist/reset.css';
2
-
3
- @font-face {
4
- font-family: 'Inter';
5
- /* load priority: local font > self-hosting font > remote font */
6
- src:
7
- local('Inter'),
8
- url('./fonts/Inter.woff2') format('woff2'),
9
- url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*2aG4RJIdUGYAAAAAAAAAAAAADmfOAQ/Inter.woff2')
10
- format('woff2');
11
- /* load strategy: use default font as fallback */
12
- font-display: swap;
13
- }
14
-
15
- @font-face {
16
- font-family: 'Consolas';
17
- src:
18
- local('Consolas'),
19
- url('./fonts/Consolas.woff2') format('woff2'),
20
- url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*R8bMTqAdGWgAAAAAAAAAAAAADmfOAQ/Consolas.woff2')
21
- format('woff2');
22
- font-display: swap;
23
- }
24
-
25
- @font-face {
26
- font-family: 'Helvetica Neue';
27
- src:
28
- local('Helvetica Neue'),
29
- url('./fonts/HelveticaNeue.woff2') format('woff2'),
30
- url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*3EzqR6aYJMkAAAAAAAAAAAAADmfOAQ/HelveticaNeue.woff2')
31
- format('woff2');
32
- font-display: swap;
33
- }
34
-
35
- pre,
36
- code,
37
- kbd,
38
- samp {
39
- font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
40
- }
41
-
42
- * {
43
- scrollbar-color: #e2e8f3 transparent;
44
- }
45
-
46
- .rc-virtual-list-scrollbar-thumb {
47
- background: #e2e8f3 !important;
48
- }