@oceanbase/design 1.0.0-alpha.0 → 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 +2 -1
  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 +333 -78
  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 +86 -86
  131. package/es/theme/style/compact.less +199 -170
  132. package/es/theme/style/dark.less +103 -103
  133. package/es/theme/style/default.less +202 -173
  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 +2 -1
  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 +412 -79
  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 +86 -86
  292. package/lib/theme/style/compact.less +199 -170
  293. package/lib/theme/style/dark.less +103 -103
  294. package/lib/theme/style/default.less +202 -173
  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 +11 -10
  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
@@ -23,11 +23,13 @@ __export(style_exports, {
23
23
  genTableStyle: () => genTableStyle
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 genTableStyle = (token) => {
28
29
  const {
29
30
  antCls,
30
31
  componentCls,
32
+ iconCls,
31
33
  colorText,
32
34
  colorBgBase,
33
35
  colorTextSecondary,
@@ -38,7 +40,8 @@ var genTableStyle = (token) => {
38
40
  colorBorderSecondary,
39
41
  padding,
40
42
  marginLG,
41
- marginXS
43
+ marginXS,
44
+ calc
42
45
  } = token;
43
46
  return {
44
47
  // 表格通用样式
@@ -53,9 +56,8 @@ var genTableStyle = (token) => {
53
56
  // head 样式
54
57
  [`${componentCls}-thead > tr`]: {
55
58
  ["th"]: {
56
- // 弱化列标题
57
59
  color: colorTextSecondary,
58
- fontWeight: "normal",
60
+ fontWeight: token.fontWeight,
59
61
  backgroundColor: colorBgBase
60
62
  },
61
63
  // 去掉排序列表头的灰色背景
@@ -75,6 +77,10 @@ var genTableStyle = (token) => {
75
77
  [`${componentCls}-tbody-virtual-scrollbar ${componentCls}-tbody-virtual-scrollbar-thumb`]: {
76
78
  background: `${token.colorFillSecondary} !important`
77
79
  },
80
+ // for custom expand icon
81
+ [`${componentCls}-row-indent+${iconCls}`]: {
82
+ marginInlineEnd: token.marginXS
83
+ },
78
84
  // expandRowByClick 行样式
79
85
  [`tr${componentCls}-expand-row-by-click`]: {
80
86
  cursor: "pointer"
@@ -88,14 +94,32 @@ var genTableStyle = (token) => {
88
94
  },
89
95
  // 为了避免行展开/收起时出现 border 动画,覆盖 antd 默认配置,仅设置背景色动画
90
96
  [`tr > td`]: {
91
- transition: `background ${token.motionDurationMid}`
97
+ fontWeight: token.fontWeight,
98
+ transition: `background ${token.motionDurationMid}`,
99
+ a: {
100
+ fontWeight: token.fontWeightStrong,
101
+ // work for ProTable link style
102
+ fontSize: token.fontSizeSM
103
+ }
92
104
  },
93
- // empty style
94
- [`${componentCls}-placeholder td`]: {
95
- borderBottom: "none"
105
+ // button is small size by default
106
+ [`${antCls}-btn:not(${antCls}-btn-sm):not(${antCls}-btn-lg)`]: {
107
+ height: token.controlHeightSM,
108
+ fontSize: token.fontSizeSM,
109
+ [`&:not(${antCls}-btn-icon-only):not(${antCls}-btn-circle)`]: {
110
+ paddingInline: token.paddingXS
111
+ },
112
+ [`&${antCls}-btn-icon-only`]: {
113
+ width: token.controlHeightSM
114
+ },
115
+ [`&${antCls}-btn-circle`]: {
116
+ minWidth: token.controlHeightSM
117
+ }
96
118
  },
119
+ // empty style
120
+ [`${componentCls}-placeholder td`]: {},
97
121
  [`${componentCls}-empty-wrapper`]: {
98
- minHeight: 360 - token.paddingSM * 2,
122
+ minHeight: calc(360).sub(calc(token.paddingSM).mul(2).equal()).equal(),
99
123
  display: "flex",
100
124
  justifyContent: "center",
101
125
  alignItems: "center"
@@ -125,7 +149,7 @@ var genTableStyle = (token) => {
125
149
  [`${componentCls}-wrapper ${componentCls}${componentCls}-middle`]: {
126
150
  [`${componentCls}-tbody`]: {
127
151
  [`${componentCls}-empty-wrapper`]: {
128
- minHeight: 260 - token.paddingXS * 2
152
+ minHeight: calc(260).sub(calc(token.paddingXS).mul(2).equal()).equal()
129
153
  }
130
154
  }
131
155
  },
@@ -133,17 +157,17 @@ var genTableStyle = (token) => {
133
157
  [`${componentCls}-wrapper ${componentCls}${componentCls}-small`]: {
134
158
  [`${componentCls}-tbody`]: {
135
159
  [`${componentCls}-empty-wrapper`]: {
136
- minHeight: 160 - token.paddingXXS * 2
160
+ minHeight: calc(160).sub(calc(token.paddingXXS).mul(2).equal()).equal()
137
161
  }
138
162
  }
139
163
  },
140
164
  // 带边框的表格样式
141
165
  [`${componentCls}-wrapper ${componentCls}${componentCls}-bordered`]: {
142
166
  [`${componentCls}-footer`]: {
143
- borderRadius: `0px 0px ${token.borderRadiusLG}px ${token.borderRadiusLG}px`
167
+ borderRadius: `0px 0px ${(0, import_cssinjs.unit)(token.borderRadiusLG)} ${(0, import_cssinjs.unit)(token.borderRadiusLG)}`
144
168
  }
145
169
  },
146
- // 带边框的表格样式
170
+ // 带内部边框的表格样式
147
171
  [`${componentCls}-wrapper${componentCls}-inner-bordered ${componentCls}-bordered`]: {
148
172
  [`${componentCls}-container`]: {
149
173
  borderInlineStart: "none",
@@ -161,7 +185,6 @@ var genTableStyle = (token) => {
161
185
  [`${componentCls}-thead, ${componentCls}-tbody`]: {
162
186
  ["td, th"]: {
163
187
  [`&${componentCls}-row-expand-icon-cell`]: {
164
- backgroundColor: colorBgBase,
165
188
  // 设置 paddingRight 即可
166
189
  paddingRight: token.paddingXS
167
190
  },
@@ -204,15 +227,19 @@ var genTableStyle = (token) => {
204
227
  [`${componentCls}-expanded-row > td`]: {
205
228
  // 除内嵌子表格外,设置其他内嵌元素样式
206
229
  [`& > *:not(${componentCls}-wrapper):not(${componentCls}-expanded-row-fixed)`]: {
207
- marginLeft: token.marginXL + token.lineWidth * 2
230
+ marginLeft: calc(token.marginXL).add(calc(token.lineWidth).mul(2).equal()).equal()
208
231
  },
209
232
  [`& > *${componentCls}-expanded-row-fixed`]: {
210
- paddingLeft: token.marginXL + token.lineWidth * 2 + token.padding
233
+ paddingLeft: calc(token.marginXL).add(calc(token.lineWidth).mul(2).equal()).add(token.padding).equal(),
234
+ margin: `-${(0, import_cssinjs.unit)(token.marginXS)} -${(0, import_cssinjs.unit)(token.margin)}`
211
235
  }
212
236
  },
213
237
  // 嵌套子表格和父表格第一列对齐
214
238
  [`tr > td > ${componentCls}-wrapper:only-child ${componentCls}`]: {
215
- marginLeft: token.margin + token.lineWidth * 2
239
+ marginLeft: calc(token.margin).add(calc(token.lineWidth).mul(2).equal()).equal()
240
+ },
241
+ [`tr > td > ${componentCls}-expanded-row-fixed > ${componentCls}-wrapper:only-child ${componentCls}`]: {
242
+ marginLeft: -token.padding
216
243
  }
217
244
  }
218
245
  },
@@ -220,7 +247,7 @@ var genTableStyle = (token) => {
220
247
  [`${componentCls}-tbody`]: {
221
248
  // 嵌套子表格和父表格第一列对齐
222
249
  [`tr > td > ${componentCls}-wrapper:only-child ${componentCls}`]: {
223
- marginLeft: token.margin + token.lineWidth * 2 + token.margin
250
+ marginLeft: calc(token.margin).add(calc(token.lineWidth).mul(2).equal()).add(token.margin).equal()
224
251
  }
225
252
  }
226
253
  }
@@ -232,15 +259,15 @@ var genTableStyle = (token) => {
232
259
  [`${componentCls}-expanded-row > td`]: {
233
260
  // 除内嵌子表格外,设置其他内嵌元素样式
234
261
  [`& > *:not(${componentCls}-wrapper):not(${componentCls}-expanded-row-fixed)`]: {
235
- marginLeft: token.marginXL + token.marginXL + token.lineWidth * 2
262
+ marginLeft: calc(token.marginXL).add(token.marginXL).add(calc(token.lineWidth).mul(2).equal()).equal()
236
263
  },
237
264
  [`& > *${componentCls}-expanded-row-fixed`]: {
238
- paddingLeft: token.marginXL + token.marginXL + token.lineWidth * 2 + token.padding
265
+ paddingLeft: calc(token.marginXL).add(token.marginXL).add(calc(token.lineWidth).mul(2).equal()).add(token.padding).equal()
239
266
  }
240
267
  },
241
268
  // 嵌套子表格和父表格第一列对齐
242
269
  [`tr > td > ${componentCls}-wrapper:only-child ${componentCls}`]: {
243
- marginLeft: token.margin + token.marginXL + token.lineWidth * 2
270
+ marginLeft: calc(token.margin).add(token.marginXL).add(calc(token.lineWidth).mul(2).equal()).equal()
244
271
  }
245
272
  }
246
273
  },
@@ -248,7 +275,7 @@ var genTableStyle = (token) => {
248
275
  [`${componentCls}-tbody`]: {
249
276
  // 嵌套子表格和父表格第一列对齐
250
277
  [`tr > td > ${componentCls}-wrapper:only-child ${componentCls}`]: {
251
- marginLeft: token.margin + token.marginXL + token.lineWidth * 2 + token.margin
278
+ marginLeft: calc(token.margin).add(token.marginXL).add(calc(token.lineWidth).mul(2).equal()).add(token.margin).equal()
252
279
  }
253
280
  }
254
281
  }
@@ -266,8 +293,22 @@ var genTableStyle = (token) => {
266
293
  [`${componentCls}-wrapper`]: {
267
294
  [`${componentCls}-pagination`]: {
268
295
  [`&${antCls}-pagination`]: {
269
- padding: `${padding}px 0`,
270
- margin: "0 !important"
296
+ fontSize: token.fontSizeSM,
297
+ padding: `${(0, import_cssinjs.unit)(token.paddingSM)} 0`,
298
+ margin: "0 !important",
299
+ [`${antCls}-pagination-item, ${antCls}-pagination-total-text, ${antCls}-pagination-prev, ${antCls}-pagination-next`]: {
300
+ height: token.controlHeightSM,
301
+ minWidth: token.controlHeightSM,
302
+ lineHeight: (0, import_cssinjs.unit)(
303
+ calc(token.controlHeightSM).sub(calc(token.lineWidth).mul(2)).equal()
304
+ )
305
+ },
306
+ [`${antCls}-pagination-options ${antCls}-select-single`]: {
307
+ height: token.controlHeightSM,
308
+ [`${antCls}-select-selector`]: {
309
+ paddingInline: calc(token.paddingXS).sub(token.lineWidth).equal()
310
+ }
311
+ }
271
312
  },
272
313
  // 批量操作栏样式
273
314
  [`${componentCls}-batch-operation-bar`]: {
@@ -276,10 +317,8 @@ var genTableStyle = (token) => {
276
317
  display: "inline-block",
277
318
  marginRight: marginLG,
278
319
  [`${componentCls}-batch-operation-selection`]: {
279
- color: colorTextSecondary,
280
- fontWeight: 500,
281
320
  [`${componentCls}-batch-operation-selection-count`]: {
282
- margin: `0 ${marginXS}px`,
321
+ margin: `0 ${(0, import_cssinjs.unit)(marginXS)}`,
283
322
  color: colorLink
284
323
  }
285
324
  }
@@ -302,12 +341,9 @@ var genTableStyle = (token) => {
302
341
  }
303
342
  };
304
343
  };
305
- var style_default = (prefixCls) => {
306
- const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("Table", (token) => {
307
- return [genTableStyle(token)];
308
- });
309
- return useStyle(prefixCls);
310
- };
344
+ var style_default = (0, import_genComponentStyleHook.genStyleHooks)("Table", (token) => {
345
+ return [genTableStyle(token)];
346
+ });
311
347
  // Annotate the CommonJS export names for ESM import in node:
312
348
  0 && (module.exports = {
313
349
  genTableStyle
package/lib/tabs/index.js CHANGED
@@ -43,6 +43,7 @@ var import_useLegacyItems = __toESM(require("./hooks/useLegacyItems"));
43
43
  var import_style = __toESM(require("./style"));
44
44
  var import_TabPane = __toESM(require("./TabPane"));
45
45
  __reExport(tabs_exports, require("antd/es/tabs"), module.exports);
46
+ var import_jsx_runtime = require("react/jsx-runtime");
46
47
  var isReactNode = (item) => {
47
48
  return import_react.default.isValidElement(item);
48
49
  };
@@ -59,7 +60,7 @@ var Tabs = import_react.default.forwardRef(
59
60
  }, ref) => {
60
61
  const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
61
62
  const prefixCls = getPrefixCls("tabs", customizePrefixCls);
62
- const { wrapSSR } = (0, import_style.default)(prefixCls);
63
+ const [wrapCSSVar] = (0, import_style.default)(prefixCls);
63
64
  const tabsCls = (0, import_classnames.default)(className, {
64
65
  [`${prefixCls}-no-divider`]: !divider
65
66
  });
@@ -68,9 +69,9 @@ var Tabs = import_react.default.forwardRef(
68
69
  const renderBadge = (0, import_react.useCallback)(
69
70
  (badge) => {
70
71
  if (typeof badge === "object" && !isReactNode(badge)) {
71
- return /* @__PURE__ */ import_react.default.createElement(import_badge.default, { ...badge, className: (0, import_classnames.default)(`${prefixCls}-tab-badge`, badge.className) });
72
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge.default, { ...badge, className: (0, import_classnames.default)(`${prefixCls}-tab-badge`, badge.className) });
72
73
  }
73
- return /* @__PURE__ */ import_react.default.createElement(import_badge.default, { className: `${prefixCls}-tab-badge`, count: badge });
74
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge.default, { className: `${prefixCls}-tab-badge`, count: badge });
74
75
  },
75
76
  [prefixCls]
76
77
  );
@@ -80,7 +81,7 @@ var Tabs = import_react.default.forwardRef(
80
81
  return {
81
82
  ...item,
82
83
  key: `divider-${dividerList == null ? void 0 : dividerList.indexOf(item)}`,
83
- label: /* @__PURE__ */ import_react.default.createElement(
84
+ label: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
84
85
  import_antd.Divider,
85
86
  {
86
87
  type: isHorizontal ? "vertical" : "horizontal",
@@ -92,13 +93,17 @@ var Tabs = import_react.default.forwardRef(
92
93
  } else if (!(0, import_util.isNullValue)(item.tag) || !(0, import_util.isNullValue)(item.badge)) {
93
94
  return {
94
95
  ...item,
95
- label: /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: 4 }, item.label, item.badge && renderBadge(item.badge), !(0, import_util.isNullValue)(item.tag) && /* @__PURE__ */ import_react.default.createElement(import_antd.Tag, { bordered: false, className: `${prefixCls}-tab-tag` }, item.tag))
96
+ label: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Space, { size: 4, children: [
97
+ item.label,
98
+ item.badge && renderBadge(item.badge),
99
+ !(0, import_util.isNullValue)(item.tag) && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Tag, { bordered: false, className: `${prefixCls}-tab-tag`, children: item.tag })
100
+ ] })
96
101
  };
97
102
  }
98
103
  return item;
99
104
  });
100
- return wrapSSR(
101
- /* @__PURE__ */ import_react.default.createElement(
105
+ return wrapCSSVar(
106
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
102
107
  import_antd.Tabs,
103
108
  {
104
109
  ref,
@@ -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 TabsToken = FullToken<'Tabs'>;
5
5
  export declare const genTabsStyle: (token: Partial<TabsToken>) => 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;
@@ -36,15 +36,22 @@ var genTabsStyle = (token) => {
36
36
  }
37
37
  }
38
38
  },
39
+ [`&${componentCls}-left, &${componentCls}-right`]: {
40
+ [`${componentCls}-tab[data-node-key^=divider-]`]: {
41
+ paddingBlock: 0
42
+ }
43
+ },
39
44
  [`${componentCls}-tab`]: {
45
+ [`${componentCls}-tab-btn:hover`]: {
46
+ textShadow: "0 0 0.25px currentcolor"
47
+ },
40
48
  /** @deprecated */
41
49
  [`${componentCls}-tab-tag`]: {
42
50
  color: colorTextSecondary,
43
- fontFamily: "PingFangSC",
44
51
  fontSize: 12,
45
52
  borderRadius: 12,
46
53
  marginInlineEnd: 0,
47
- height: 20
54
+ height: token.controlHeightSM
48
55
  },
49
56
  [`${componentCls}-tab-badge`]: {
50
57
  [`>${antCls}-badge-count`]: {
@@ -88,12 +95,9 @@ var genTabsStyle = (token) => {
88
95
  }
89
96
  };
90
97
  };
91
- var style_default = (prefixCls) => {
92
- const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("Tabs", (token) => {
93
- return [genTabsStyle(token)];
94
- });
95
- return useStyle(prefixCls);
96
- };
98
+ var style_default = (0, import_genComponentStyleHook.genStyleHooks)("Tabs", (token) => {
99
+ return [genTabsStyle(token)];
100
+ });
97
101
  // Annotate the CommonJS export names for ESM import in node:
98
102
  0 && (module.exports = {
99
103
  genTabsStyle
@@ -4,6 +4,7 @@ import type { Ellipsis } from '../_util/getEllipsisConfig';
4
4
  export * from 'antd/es/tag';
5
5
  export interface TagProps extends AntTagProps {
6
6
  ellipsis?: Ellipsis;
7
+ pill?: boolean;
7
8
  }
8
9
  declare const _default: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLSpanElement>> & {
9
10
  CheckableTag: React.ForwardRefExoticComponent<import("antd/es/tag").CheckableTagProps & React.RefAttributes<HTMLSpanElement>>;
package/lib/tag/index.js CHANGED
@@ -41,41 +41,51 @@ var import_typography = __toESM(require("../typography"));
41
41
  var import_style = __toESM(require("./style"));
42
42
  var import_getEllipsisConfig = require("../_util/getEllipsisConfig");
43
43
  __reExport(tag_exports, require("antd/es/tag"), module.exports);
44
+ var import_jsx_runtime = require("react/jsx-runtime");
44
45
  var Tag = import_react.default.forwardRef(
45
46
  ({
46
47
  children,
47
48
  prefixCls: customizePrefixCls,
48
49
  icon,
49
50
  className,
51
+ color: colorProp,
50
52
  ellipsis = {
51
53
  tooltip: {
52
54
  title: children
53
55
  }
54
56
  },
57
+ pill,
55
58
  ...restProps
56
59
  }, ref) => {
57
60
  const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
58
61
  const prefixCls = getPrefixCls("tag", customizePrefixCls);
59
- const { wrapSSR } = (0, import_style.default)(prefixCls);
62
+ const [wrapCSSVar] = (0, import_style.default)(prefixCls);
63
+ const isCritical = colorProp === "critical";
60
64
  const ellipsisConfig = (0, import_getEllipsisConfig.getEllipsisConfig)(ellipsis, children);
61
65
  const tagCls = (0, import_classnames.default)(
62
66
  {
63
- [`${prefixCls}-ellipsis`]: !!ellipsisConfig
67
+ [`${prefixCls}-ellipsis`]: !!ellipsisConfig,
68
+ [`${prefixCls}-pill`]: pill,
69
+ [`${prefixCls}-critical`]: isCritical
64
70
  },
65
71
  className
66
72
  );
67
- const realIcon = icon ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefixCls}-icon` }, icon) : null;
68
- return wrapSSR(
69
- /* @__PURE__ */ import_react.default.createElement(
73
+ const realIcon = icon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-icon`, children: icon }) : null;
74
+ return wrapCSSVar(
75
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
70
76
  import_antd.Tag,
71
77
  {
72
78
  ref,
73
79
  prefixCls: customizePrefixCls,
74
80
  className: tagCls,
75
81
  icon: ellipsisConfig ? null : icon,
76
- ...restProps
77
- },
78
- ellipsisConfig ? /* @__PURE__ */ import_react.default.createElement(import_typography.default.Text, { ellipsis: ellipsisConfig }, realIcon, children) : children
82
+ color: isCritical ? void 0 : colorProp,
83
+ ...restProps,
84
+ children: ellipsisConfig ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_typography.default.Text, { ellipsis: ellipsisConfig, children: [
85
+ realIcon,
86
+ children
87
+ ] }) : children
88
+ }
79
89
  )
80
90
  );
81
91
  }
@@ -1,12 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { type FullToken } from 'antd/es/theme/internal';
3
2
  import type { CSSObject } from '@ant-design/cssinjs';
4
- export type TagToken = FullToken<'Tag'> & {
5
- tagPaddingHorizontal: number;
6
- };
3
+ import type { FullToken } from '../../theme/interface';
4
+ export type TagToken = FullToken<'Tag'>;
7
5
  export declare const genTagStyle: (token: TagToken) => CSSObject;
8
- declare const _default: (prefixCls: string) => {
9
- wrapSSR: (node: import("react").ReactNode) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
10
- hashId: string;
11
- };
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];
12
7
  export default _default;
@@ -25,42 +25,51 @@ __export(style_exports, {
25
25
  module.exports = __toCommonJS(style_exports);
26
26
  var import_internal = require("antd/es/theme/internal");
27
27
  var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
28
- var import_internal2 = require("antd/lib/theme/internal");
29
- var import_getWeakenBorderColor = require("../../_util/getWeakenBorderColor");
30
- var getTagBorderColor = (color) => {
31
- return (0, import_getWeakenBorderColor.getWeakenBorderColor)(color);
32
- };
33
28
  var genTagPresetStatusStyle = (token, status) => {
34
- const borderColorMap = {
29
+ const colorMap = {
30
+ success: token.colorSuccessText,
31
+ processing: token.colorInfoText,
32
+ warning: token.colorWarningText,
33
+ error: token.colorErrorText,
34
+ critical: token.colorFuchsiaText
35
+ };
36
+ const bgMap = {
37
+ success: token.colorSuccessBg,
38
+ processing: token.colorInfoBg,
39
+ warning: token.colorWarningBg,
40
+ error: token.colorErrorBg,
41
+ critical: token.colorFuchsiaBg
42
+ };
43
+ const borderMap = {
35
44
  success: token.colorSuccessBorder,
36
45
  processing: token.colorInfoBorder,
46
+ warning: token.colorWarningBorder,
37
47
  error: token.colorErrorBorder,
38
- warning: token.colorWarningBorder
48
+ critical: token.colorFuchsiaBorder
39
49
  };
40
50
  return {
41
51
  [`${token.componentCls}${token.componentCls}-${status}`]: {
42
- borderColor: getTagBorderColor(borderColorMap[status])
52
+ color: colorMap[status],
53
+ background: bgMap[status],
54
+ borderColor: borderMap[status],
55
+ [`&${token.componentCls}-borderless`]: {
56
+ borderColor: "transparent"
57
+ }
43
58
  }
44
59
  };
45
60
  };
46
- var genPresetStyle = (token) => (0, import_internal2.genPresetColor)(token, (colorKey, { lightBorderColor }) => {
47
- return {
48
- [`${token.componentCls}${token.componentCls}-${colorKey}`]: {
49
- borderColor: getTagBorderColor(lightBorderColor)
50
- }
51
- };
52
- });
53
61
  var genTagStyle = (token) => {
54
- const { antCls, componentCls, tagPaddingHorizontal, lineWidth, calc } = token;
55
- const paddingInline = calc(tagPaddingHorizontal).sub(lineWidth).equal();
62
+ const { antCls, componentCls, iconCls } = token;
56
63
  return {
57
64
  [`${componentCls}`]: {
58
65
  paddingInline: token.paddingXS,
59
- borderColor: getTagBorderColor(token.colorBorder),
60
66
  fontSize: token.fontSizeSM,
67
+ [`${componentCls}-close-icon${iconCls}`]: {
68
+ marginInlineStart: token.marginXXS
69
+ },
61
70
  [`${antCls}-typography`]: {
62
71
  [`${componentCls}-icon`]: {
63
- marginInlineEnd: paddingInline
72
+ marginInlineEnd: token.marginXXS
64
73
  }
65
74
  },
66
75
  ["&-ellipsis"]: {
@@ -77,27 +86,27 @@ var genTagStyle = (token) => {
77
86
  },
78
87
  ["&-borderless"]: {
79
88
  borderColor: "transparent"
89
+ },
90
+ ["&-pill"]: {
91
+ borderRadius: 100,
92
+ marginInlineEnd: token.marginXXS,
93
+ borderColor: token.colorBorderSecondary,
94
+ color: token.colorTextSecondary
80
95
  }
81
96
  }
82
97
  };
83
98
  };
84
- var style_default = (prefixCls) => {
85
- const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("Tag", (token) => {
86
- const tagToken = (0, import_internal.mergeToken)(token, {
87
- tagPaddingHorizontal: 8
88
- // Fixed padding.
89
- });
90
- return [
91
- genTagStyle(tagToken),
92
- genPresetStyle(tagToken),
93
- genTagPresetStatusStyle(tagToken, "success"),
94
- genTagPresetStatusStyle(tagToken, "error"),
95
- genTagPresetStatusStyle(tagToken, "processing"),
96
- genTagPresetStatusStyle(tagToken, "warning")
97
- ];
98
- });
99
- return useStyle(prefixCls);
100
- };
99
+ var style_default = (0, import_genComponentStyleHook.genStyleHooks)("Tag", (token) => {
100
+ const tagToken = (0, import_internal.mergeToken)(token, {});
101
+ return [
102
+ genTagStyle(tagToken),
103
+ genTagPresetStatusStyle(tagToken, "success"),
104
+ genTagPresetStatusStyle(tagToken, "error"),
105
+ genTagPresetStatusStyle(tagToken, "processing"),
106
+ genTagPresetStatusStyle(tagToken, "warning"),
107
+ genTagPresetStatusStyle(tagToken, "critical")
108
+ ];
109
+ });
101
110
  // Annotate the CommonJS export names for ESM import in node:
102
111
  0 && (module.exports = {
103
112
  genTagStyle
@@ -1,5 +1,5 @@
1
1
  declare const compactTheme: {
2
- token: import("antd/es/theme/internal").AliasToken;
2
+ token: import("antd/es/theme/internal").SeedToken;
3
3
  components: {
4
4
  InputNumber: {
5
5
  handleVisible: boolean;
@@ -32,13 +32,9 @@ __export(compact_exports, {
32
32
  default: () => compact_default
33
33
  });
34
34
  module.exports = __toCommonJS(compact_exports);
35
- var import_antd = require("antd");
36
35
  var import_index = __toESM(require("./index"));
37
36
  var compactTheme = {
38
- token: import_antd.theme.getDesignToken({
39
- algorithm: import_antd.theme.compactAlgorithm,
40
- token: import_index.default.defaultSeed
41
- }),
37
+ token: import_index.default.defaultSeed,
42
38
  components: {
43
39
  InputNumber: {
44
40
  handleVisible: true
@@ -1,52 +1,5 @@
1
1
  declare const darkTheme: {
2
- token: {
3
- colorPrimary: string;
4
- colorSuccess: string;
5
- colorWarning: string;
6
- colorError: string;
7
- colorInfo: string;
8
- colorTextBase: string;
9
- colorBgBase: string;
10
- colorLink: string;
11
- fontFamily: string;
12
- fontFamilyCode: string;
13
- fontSize: number;
14
- lineWidth: number;
15
- lineType: string;
16
- borderRadius: number;
17
- sizeUnit: number;
18
- sizeStep: number;
19
- sizePopupArrow: number;
20
- controlHeight: number;
21
- zIndexBase: number;
22
- zIndexPopupBase: number;
23
- opacityImage: number;
24
- motionUnit: number;
25
- motionBase: number;
26
- motionEaseOutCirc: string;
27
- motionEaseInOutCirc: string;
28
- motionEaseInOut: string;
29
- motionEaseOutBack: string;
30
- motionEaseInBack: string;
31
- motionEaseInQuint: string;
32
- motionEaseOutQuint: string;
33
- motionEaseOut: string;
34
- wireframe: boolean;
35
- motion: boolean;
36
- blue: string;
37
- purple: string;
38
- cyan: string;
39
- green: string;
40
- magenta: string;
41
- pink: string;
42
- red: string;
43
- orange: string;
44
- yellow: string;
45
- volcano: string;
46
- geekblue: string;
47
- lime: string;
48
- gold: string;
49
- };
2
+ token: import("antd/es/theme/internal").SeedToken;
50
3
  components: {
51
4
  InputNumber: {
52
5
  handleVisible: boolean;