@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
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import 'antd/dist/reset.css';
3
+ export interface GlobalStyleProps {
4
+ prefixCls?: string;
5
+ }
6
+ declare const GlobalStyle: React.FC<GlobalStyleProps>;
7
+ export { GlobalStyle };
8
+ export default GlobalStyle;
@@ -0,0 +1,176 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/style/global.tsx
30
+ var global_exports = {};
31
+ __export(global_exports, {
32
+ GlobalStyle: () => GlobalStyle,
33
+ default: () => global_default
34
+ });
35
+ module.exports = __toCommonJS(global_exports);
36
+ var import_cssinjs = require("@ant-design/cssinjs");
37
+ var import_theme = __toESM(require("../theme"));
38
+ var import_Inter_Regular = __toESM(require("../fonts/Inter-Regular.woff2"));
39
+ var import_Inter_Medium = __toESM(require("../fonts/Inter-Medium.woff2"));
40
+ var import_Inter_SemiBold = __toESM(require("../fonts/Inter-SemiBold.woff2"));
41
+ var import_Consolas = __toESM(require("../fonts/Consolas.woff2"));
42
+ var import_HelveticaNeue = __toESM(require("../fonts/HelveticaNeue.woff2"));
43
+ var import_reset = require("antd/dist/reset.css");
44
+ var import_jsx_runtime = require("react/jsx-runtime");
45
+ var genGlobalStyle = (token, prefixCls) => {
46
+ const antCls = `.${prefixCls}`;
47
+ const buttonComponentCls = `${antCls}-btn`;
48
+ const typographyComponentCls = `${antCls}-typography`;
49
+ const menuComponentCls = `${antCls}-menu`;
50
+ return [
51
+ {
52
+ "@font-face": {
53
+ fontFamily: "Inter",
54
+ fontStyle: "lighter",
55
+ fontWeight: 300,
56
+ // load priority: local font > self-hosting font > remote font
57
+ src: `local('Inter'), url(${import_Inter_Regular.default}) format('woff2'), url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*ucHoQ4exBNYAAAAARtAAAAgAemfOAQ/Inter-Regular.woff2') format('woff2')`,
58
+ fontDisplay: "swap"
59
+ }
60
+ },
61
+ {
62
+ "@font-face": {
63
+ fontFamily: "Inter",
64
+ fontStyle: "normal",
65
+ fontWeight: 400,
66
+ src: `local('Inter'), url(${import_Inter_Medium.default}) format('woff2'), url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*GboAQ56sQbkAAAAARwAAAAgAemfOAQ/Inter-Medium.woff2') format('woff2')`,
67
+ fontDisplay: "swap"
68
+ }
69
+ },
70
+ {
71
+ "@font-face": {
72
+ fontFamily: "Inter",
73
+ fontStyle: "medium",
74
+ fontWeight: 500,
75
+ src: `local('Inter'), url(${import_Inter_Medium.default}) format('woff2'), url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*GboAQ56sQbkAAAAARwAAAAgAemfOAQ/Inter-Medium.woff2') format('woff2')`,
76
+ fontDisplay: "swap"
77
+ }
78
+ },
79
+ {
80
+ "@font-face": {
81
+ fontFamily: "Inter",
82
+ fontStyle: "semibold",
83
+ fontWeight: 600,
84
+ src: `local('Inter'), url(${import_Inter_SemiBold.default}) format('woff2'), url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*tcOIT5gLQl4AAAAARwAAAAgAemfOAQ/Inter-SemiBold.woff2') format('woff2')`,
85
+ fontDisplay: "swap"
86
+ }
87
+ },
88
+ {
89
+ "@font-face": {
90
+ fontFamily: "Consolas",
91
+ src: `local('Consolas'), url(${import_Consolas.default}) format('woff2'), url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*R8bMTqAdGWgAAAAAAAAAAAAADmfOAQ/Consolas.woff2') format('woff2')`,
92
+ fontDisplay: "swap"
93
+ }
94
+ },
95
+ {
96
+ "@font-face": {
97
+ fontFamily: "Helvetica Neue",
98
+ src: `local('Helvetica Neue'), url(${import_HelveticaNeue.default}) format('woff2'), url('https://mdn.alipayobjects.com/huamei_fhnyvh/afts/file/A*3EzqR6aYJMkAAAAAAAAAAAAADmfOAQ/HelveticaNeue.woff2') format('woff2')`,
99
+ fontDisplay: "swap"
100
+ }
101
+ },
102
+ {
103
+ "pre, code, kbd, samp": {
104
+ fontFamily: token.fontFamilyCode
105
+ },
106
+ "input::placeholder": {
107
+ // affact all placeholder excluding select
108
+ fontWeight: token.fontWeightWeak
109
+ },
110
+ "*": {
111
+ scrollbarColor: `${token.colorFillSecondary} transparent`
112
+ },
113
+ ".rc-virtual-list-scrollbar-thumb": {
114
+ background: `${token.colorFillSecondary} !important`
115
+ },
116
+ // handle font-size: 12px font weight
117
+ [`[style*='font-size: 12px']`]: {
118
+ fontWeight: token.fontWeightWeak
119
+ },
120
+ // link with href or data-aspm-param^="obcloud_openLink= show underline on hover
121
+ // except disabled and antd element
122
+ 'a[href], a[data-aspm-param^="obcloud_openLink="]': {
123
+ [`&:not([disabled]):not([class^="${prefixCls}-"]):hover`]: {
124
+ textDecoration: "underline"
125
+ }
126
+ },
127
+ // handle link style in button
128
+ [`${buttonComponentCls}${buttonComponentCls}-link:not(${buttonComponentCls}-disabled)`]: {
129
+ '&[href], &[data-aspm-param^="obcloud_openLink="]': {
130
+ "&:hover": {
131
+ textDecoration: "underline"
132
+ }
133
+ }
134
+ },
135
+ // handle link style in typography
136
+ [`${typographyComponentCls}:not(${typographyComponentCls}-disabled)`]: {
137
+ '&[href], &[data-aspm-param^="obcloud_openLink="]': {
138
+ "&:hover": {
139
+ textDecoration: "underline"
140
+ }
141
+ }
142
+ },
143
+ // handle link style in menu
144
+ [`${menuComponentCls}`]: {
145
+ [`${menuComponentCls}-item`]: {
146
+ [`${menuComponentCls}-title-content`]: {
147
+ "a:hover": {
148
+ textDecoration: "none"
149
+ }
150
+ }
151
+ }
152
+ }
153
+ }
154
+ ];
155
+ };
156
+ var GlobalStyle = ({ prefixCls = "ant" }) => {
157
+ const { theme, token } = import_theme.default.useToken();
158
+ const wrapSSR = (0, import_cssinjs.useStyleRegister)(
159
+ {
160
+ theme,
161
+ token,
162
+ path: ["global"],
163
+ hashId: "",
164
+ // Empty hashId for global styles
165
+ order: -1e3
166
+ // Inject before other styles
167
+ },
168
+ () => genGlobalStyle(token, prefixCls)
169
+ );
170
+ return wrapSSR(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {}));
171
+ };
172
+ var global_default = GlobalStyle;
173
+ // Annotate the CommonJS export names for ESM import in node:
174
+ 0 && (module.exports = {
175
+ GlobalStyle
176
+ });
@@ -1 +1,2 @@
1
- @import '~antd/dist/reset.css';
1
+ /* antd/dist/reset.css is imported in global.tsx */
2
+ /* reserve this file for compatibility with antd */
@@ -39,14 +39,15 @@ 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);
45
46
  const prefixCls = getPrefixCls("switch", customizePrefixCls);
46
- const { wrapSSR } = (0, import_style.default)(prefixCls);
47
+ const [wrapCSSVar] = (0, import_style.default)(prefixCls);
47
48
  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 })
49
+ return wrapCSSVar(
50
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Switch, { ref, prefixCls: customizePrefixCls, className: switchCls, ...restProps })
50
51
  );
51
52
  }
52
53
  );
@@ -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 SwitchToken = FullToken<'Switch'>;
4
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
- };
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;
@@ -32,12 +32,9 @@ var genSwitchStyle = (token) => {
32
32
  }
33
33
  };
34
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
- };
35
+ var style_default = (0, import_genComponentStyleHook.genStyleHooks)("Switch", (token) => {
36
+ return [genSwitchStyle(token)];
37
+ });
41
38
  // Annotate the CommonJS export names for ESM import in node:
42
39
  0 && (module.exports = {
43
40
  genSwitchStyle
@@ -41,10 +41,7 @@ declare const _default: (<RecordType extends AnyObject = AnyObject>(props: Table
41
41
  Column: <RecordType extends import("antd/es/_util/type").AnyObject>(_: import("antd").TableColumnProps<RecordType>) => null;
42
42
  ColumnGroup: <RecordType_1 extends import("antd/es/_util/type").AnyObject>(_: import("antd/es/table/ColumnGroup").ColumnGroupProps<RecordType_1>) => null;
43
43
  Summary: typeof Summary;
44
- useStyle: (prefixCls: string) => {
45
- wrapSSR: (node: ReactNode) => ReactElement<any, string | React.JSXElementConstructor<any>>;
46
- hashId: string;
47
- };
44
+ useStyle: (prefixCls: string, rootCls?: string) => readonly [(node: ReactElement<any, string | React.JSXElementConstructor<any>>) => ReactElement<any, string | React.JSXElementConstructor<any>>, string, string];
48
45
  useDefaultPagination: (pagination?: false | import("antd").TablePaginationConfig) => false | import("antd").TablePaginationConfig;
49
46
  };
50
47
  export default _default;
@@ -44,7 +44,9 @@ var import_style = __toESM(require("./style"));
44
44
  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
+ var import_theme = __toESM(require("../theme"));
47
48
  __reExport(table_exports, require("antd/es/table"), module.exports);
49
+ var import_jsx_runtime = require("react/jsx-runtime");
48
50
  function Table(props, ref) {
49
51
  var _a, _b;
50
52
  const {
@@ -64,16 +66,18 @@ function Table(props, ref) {
64
66
  collapseText,
65
67
  openText,
66
68
  expandable,
69
+ scroll,
67
70
  hiddenCancelBtn = false,
68
71
  prefixCls: customizePrefixCls,
69
72
  className
70
73
  } = props;
71
74
  const extendedContext = (0, import_react.useContext)(import_config_provider.default.ExtendedConfigContext);
72
75
  const pagination = (0, import_useDefaultPagination.default)(customPagination);
76
+ const { token } = import_theme.default.useToken();
73
77
  const { getPrefixCls, locale, table } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
74
78
  const {
75
79
  batchOperationBar,
76
- emptyText = /* @__PURE__ */ import_react.default.createElement(import_empty.default, { image: import_empty.default.PRESENTED_IMAGE_SIMPLE }),
80
+ emptyText = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_empty.default, { image: import_empty.default.PRESENTED_IMAGE_SIMPLE }),
77
81
  ...restLocale
78
82
  } = {
79
83
  ...customLocale,
@@ -84,7 +88,7 @@ function Table(props, ref) {
84
88
  }
85
89
  };
86
90
  const prefixCls = getPrefixCls("table", customizePrefixCls);
87
- const { wrapSSR } = (0, import_style.default)(prefixCls);
91
+ const [wrapCSSVar] = (0, import_style.default)(prefixCls);
88
92
  const tableCls = (0, import_classnames.default)(
89
93
  {
90
94
  [`${prefixCls}-expandable`]: !(0, import_lodash.isEmpty)(expandable),
@@ -112,7 +116,7 @@ function Table(props, ref) {
112
116
  render: (text, record, index) => {
113
117
  const element = item.render ? item.render(text, record, index) : record[item.dataIndex];
114
118
  const elementType = element == null ? void 0 : element.type;
115
- return (elementType == null ? void 0 : elementType.__ANT_TOOLTIP) === true ? element : /* @__PURE__ */ import_react.default.createElement(
119
+ return (elementType == null ? void 0 : elementType.__ANT_TOOLTIP) === true ? element : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
116
120
  import_typography.default.Text,
117
121
  {
118
122
  ellipsis: {
@@ -120,15 +124,16 @@ function Table(props, ref) {
120
124
  placement: "topLeft",
121
125
  title: element
122
126
  }
123
- }
124
- },
125
- /* @__PURE__ */ import_react.default.createElement("span", null, element)
127
+ },
128
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: element })
129
+ }
126
130
  );
127
131
  }
128
132
  };
129
133
  }
130
134
  return item;
131
135
  });
136
+ const hasEllipsisColumn = newColumns.some((item) => item.ellipsis);
132
137
  const handleSelectedData = (selectedRowKeys, selectedRows, info) => {
133
138
  setCurrentSelectedRowKeys(selectedRowKeys);
134
139
  setCurrentSelectedRows(selectedRows);
@@ -148,75 +153,116 @@ function Table(props, ref) {
148
153
  if ((0, import_lodash.isEmpty)(rowSelection) || (0, import_lodash.isEmpty)(currentSelectedRowKeys)) {
149
154
  return (
150
155
  // @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)))
156
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: pagination && (pagination == null ? void 0 : pagination.showTotal) && (pagination == null ? void 0 : pagination.showTotal(total, range)) })
152
157
  );
153
158
  }
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))));
159
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
160
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${prefixCls}-batch-operation-bar`, children: [
161
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
162
+ import_antd.Space,
163
+ {
164
+ size: 8,
165
+ style: {
166
+ marginRight: 24
167
+ },
168
+ children: [
169
+ toolAlertRender && toolAlertRender(currentSelectedRowKeys, currentSelectedRows),
170
+ !toolAlertRender && toolAlertRender !== false && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: `${prefixCls}-batch-operation-selection`, children: [
171
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: batchOperationBar == null ? void 0 : batchOperationBar.selected }),
172
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-batch-operation-selection-count`, children: (currentSelectedRowKeys == null ? void 0 : currentSelectedRowKeys.length) || 0 }),
173
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: batchOperationBar == null ? void 0 : batchOperationBar.object })
174
+ ] }),
175
+ !hiddenCancelBtn && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { onClick: handleOptionsCancel, children: cancelText ?? (batchOperationBar == null ? void 0 : batchOperationBar.cancel) }),
176
+ toolSelectedContent && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
177
+ import_antd.Popover,
178
+ {
179
+ placement: "top",
180
+ overlayClassName: `${prefixCls}-batch-operation-selection-popover`,
181
+ content: toolSelectedContent == null ? void 0 : toolSelectedContent(currentSelectedRowKeys, currentSelectedRows),
182
+ trigger: "click",
183
+ open: openPopover,
184
+ 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) })
185
+ }
186
+ )
187
+ ]
188
+ }
189
+ ),
190
+ toolOptionsRender && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Space, { size: 8, children: toolOptionsRender == null ? void 0 : toolOptionsRender(currentSelectedRowKeys, currentSelectedRows) })
191
+ ] }),
192
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: pagination && (pagination == null ? void 0 : pagination.showTotal) && (pagination == null ? void 0 : pagination.showTotal(total, range)) })
193
+ ] });
177
194
  };
178
- return wrapSSR(
179
- /* @__PURE__ */ import_react.default.createElement(
180
- import_antd.Table,
195
+ return wrapCSSVar(
196
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
197
+ import_config_provider.default,
181
198
  {
182
- ...props,
183
- ref,
184
- prefixCls: customizePrefixCls,
185
- className: tableCls,
186
- locale: {
187
- ...restLocale,
188
- emptyText: /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefixCls}-empty-wrapper` }, typeof emptyText === "function" ? emptyText() : emptyText)
189
- },
190
- size,
191
- bordered: bordered || innerBordered,
192
- columns: newColumns,
193
- rowClassName: (...args) => {
194
- return (0, import_classnames.default)(
195
- typeof rowClassName === "function" ? rowClassName(...args) : rowClassName,
196
- {
197
- [`${prefixCls}-expand-row-by-click`]: expandable == null ? void 0 : expandable.expandRowByClick
199
+ theme: {
200
+ components: {
201
+ Button: {
202
+ fontSize: token.fontSizeSM,
203
+ controlHeight: token.controlHeightSM,
204
+ paddingInline: token.paddingXS
205
+ },
206
+ Pagination: {
207
+ fontSize: token.fontSizeSM,
208
+ controlHeight: token.controlHeightSM
209
+ },
210
+ Select: {
211
+ fontSize: token.fontSizeSM,
212
+ controlHeight: token.controlHeightSM,
213
+ // control select padding by inputPaddingHorizontalBase
214
+ paddingSM: token.paddingXS
198
215
  }
199
- );
216
+ }
200
217
  },
201
- expandable: expandable ? {
202
- columnWidth: !size || size === "large" ? 40 : 32,
203
- ...expandable
204
- } : void 0,
205
- rowSelection: rowSelection ? {
206
- columnWidth: table == null ? void 0 : table.selectionColumnWidth,
207
- ...rowSelection,
208
- onChange: (selectedRowKeys, selectedRows, info) => {
209
- var _a2;
210
- handleSelectedData(selectedRowKeys, selectedRows, info);
211
- (_a2 = rowSelection == null ? void 0 : rowSelection.onChange) == null ? void 0 : _a2.call(rowSelection, selectedRowKeys, selectedRows, info);
218
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
219
+ import_antd.Table,
220
+ {
221
+ ...props,
222
+ ref,
223
+ prefixCls: customizePrefixCls,
224
+ className: tableCls,
225
+ locale: {
226
+ ...restLocale,
227
+ emptyText: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `${prefixCls}-empty-wrapper`, children: typeof emptyText === "function" ? emptyText() : emptyText })
228
+ },
229
+ size,
230
+ bordered: bordered || innerBordered,
231
+ columns: newColumns,
232
+ rowClassName: (...args) => {
233
+ return (0, import_classnames.default)(
234
+ typeof rowClassName === "function" ? rowClassName(...args) : rowClassName,
235
+ {
236
+ [`${prefixCls}-expand-row-by-click`]: expandable == null ? void 0 : expandable.expandRowByClick
237
+ }
238
+ );
239
+ },
240
+ expandable: expandable ? {
241
+ columnWidth: !size || size === "large" ? 40 : 32,
242
+ ...expandable
243
+ } : void 0,
244
+ rowSelection: rowSelection ? {
245
+ columnWidth: table == null ? void 0 : table.selectionColumnWidth,
246
+ ...rowSelection,
247
+ onChange: (selectedRowKeys, selectedRows, info) => {
248
+ var _a2;
249
+ handleSelectedData(selectedRowKeys, selectedRows, info);
250
+ (_a2 = rowSelection == null ? void 0 : rowSelection.onChange) == null ? void 0 : _a2.call(rowSelection, selectedRowKeys, selectedRows, info);
251
+ }
252
+ } : void 0,
253
+ scroll: {
254
+ // enable auto x scroll when there is no ellipsis column
255
+ x: hasEllipsisColumn ? void 0 : "max-content",
256
+ ...scroll
257
+ },
258
+ footer,
259
+ pagination: pagination === false ? false : {
260
+ ...pagination,
261
+ hideOnSinglePage: toolAlertRender || toolOptionsRender || toolSelectedContent || (pagination == null ? void 0 : pagination.showSizeChanger) ? false : (pagination == null ? void 0 : pagination.hideOnSinglePage) !== void 0 ? pagination == null ? void 0 : pagination.hideOnSinglePage : extendedContext.hideOnSinglePage,
262
+ showTotal: renderOptionsBar
263
+ }
212
264
  }
213
- } : void 0,
214
- footer,
215
- pagination: pagination === false ? false : {
216
- ...pagination,
217
- hideOnSinglePage: toolAlertRender || toolOptionsRender || toolSelectedContent || (pagination == null ? void 0 : pagination.showSizeChanger) ? false : (pagination == null ? void 0 : pagination.hideOnSinglePage) !== void 0 ? pagination == null ? void 0 : pagination.hideOnSinglePage : extendedContext.hideOnSinglePage,
218
- showTotal: renderOptionsBar
219
- }
265
+ )
220
266
  }
221
267
  )
222
268
  );
@@ -1,10 +1,7 @@
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
- declare const _default: (prefixCls: string) => {
7
- wrapSSR: (node: import("react").ReactNode) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
8
- hashId: string;
9
- };
6
+ 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];
10
7
  export default _default;