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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/dist/design.min.js +1 -1
  2. package/es/_util/genComponentStyleHook.d.ts +2 -2
  3. package/es/_util/genComponentStyleHook.js +15 -2
  4. package/es/alert/style/index.d.ts +1 -1
  5. package/es/app/index.d.ts +8 -0
  6. package/es/app/index.js +36 -1
  7. package/es/app/style/index.d.ts +9 -0
  8. package/es/{_util/genStyle.js → app/style/index.js} +10 -11
  9. package/es/badge/style/index.d.ts +1 -1
  10. package/es/badge/style/index.js +7 -10
  11. package/es/button/style/index.d.ts +1 -1
  12. package/es/card/index.js +5 -1
  13. package/es/card/style/index.d.ts +1 -1
  14. package/es/card/style/index.js +8 -2
  15. package/es/checkbox/style/index.d.ts +1 -1
  16. package/es/config-provider/context.d.ts +11 -0
  17. package/es/config-provider/context.js +2 -1
  18. package/es/config-provider/index.js +31 -32
  19. package/es/descriptions/hooks/useItems.d.ts +6 -6
  20. package/es/descriptions/style/index.d.ts +1 -1
  21. package/es/descriptions/style/index.js +4 -2
  22. package/es/drawer/index.js +7 -5
  23. package/es/drawer/style/index.d.ts +1 -1
  24. package/es/drawer/style/index.js +11 -7
  25. package/es/empty/index.js +1 -1
  26. package/es/empty/style/index.d.ts +1 -1
  27. package/es/form/FormItem.d.ts +1 -1
  28. package/es/form/style/index.d.ts +1 -1
  29. package/es/index.d.ts +4 -2
  30. package/es/index.js +1 -0
  31. package/es/modal/style/index.d.ts +1 -1
  32. package/es/radio/style/index.d.ts +1 -1
  33. package/es/result/index.d.ts +2 -2
  34. package/es/result/index.js +5 -4
  35. package/es/result/style/index.d.ts +1 -1
  36. package/es/select/style/index.d.ts +1 -1
  37. package/es/slider/style/index.d.ts +1 -1
  38. package/es/space/style/index.d.ts +1 -1
  39. package/es/spin/style/index.d.ts +1 -1
  40. package/es/switch/style/index.d.ts +1 -1
  41. package/es/table/style/index.d.ts +1 -1
  42. package/es/table/style/index.js +1 -3
  43. package/es/tabs/style/index.d.ts +1 -1
  44. package/es/tabs/style/index.js +1 -2
  45. package/es/tag/style/index.d.ts +2 -4
  46. package/es/tag/style/index.js +14 -31
  47. package/es/theme/dark.d.ts +1 -48
  48. package/es/theme/default.d.ts +4 -2
  49. package/es/theme/default.js +71 -35
  50. package/es/theme/index.d.ts +20 -57
  51. package/es/theme/interface.d.ts +66 -0
  52. package/es/theme/interface.js +4 -1
  53. package/es/theme/style/aliyun.less +41 -41
  54. package/es/theme/style/compact.less +87 -80
  55. package/es/theme/style/dark.less +58 -58
  56. package/es/theme/style/default.less +89 -82
  57. package/es/tooltip/style/index.d.ts +1 -1
  58. package/es/tree-select/style/index.d.ts +1 -1
  59. package/lib/_util/genComponentStyleHook.d.ts +2 -2
  60. package/lib/_util/genComponentStyleHook.js +20 -4
  61. package/lib/alert/index.js +7 -6
  62. package/lib/alert/style/index.d.ts +1 -1
  63. package/lib/app/index.d.ts +8 -0
  64. package/lib/app/index.js +36 -1
  65. package/lib/app/style/index.d.ts +9 -0
  66. package/lib/{_util/getWeakenBorderColor.js → app/style/index.js} +20 -10
  67. package/lib/badge/index.js +21 -18
  68. package/lib/badge/style/index.d.ts +1 -1
  69. package/lib/badge/style/index.js +6 -7
  70. package/lib/button/index.js +2 -1
  71. package/lib/button/style/index.d.ts +1 -1
  72. package/lib/card/index.js +14 -5
  73. package/lib/card/style/index.d.ts +1 -1
  74. package/lib/card/style/index.js +10 -0
  75. package/lib/checkbox/index.js +2 -1
  76. package/lib/checkbox/style/index.d.ts +1 -1
  77. package/lib/config-provider/DefaultRenderEmpty.js +4 -3
  78. package/lib/config-provider/context.d.ts +11 -0
  79. package/lib/config-provider/index.js +36 -25
  80. package/lib/descriptions/hooks/useItems.d.ts +6 -6
  81. package/lib/descriptions/hooks/useItems.js +5 -4
  82. package/lib/descriptions/index.js +3 -2
  83. package/lib/descriptions/style/index.d.ts +1 -1
  84. package/lib/descriptions/style/index.js +6 -1
  85. package/lib/drawer/index.js +44 -33
  86. package/lib/drawer/style/index.d.ts +1 -1
  87. package/lib/drawer/style/index.js +11 -5
  88. package/lib/dropdown/dropdown-button.js +3 -13
  89. package/lib/dropdown/index.js +2 -2
  90. package/lib/empty/colored.js +413 -327
  91. package/lib/empty/database.js +267 -222
  92. package/lib/empty/default.js +16 -21
  93. package/lib/empty/guide.js +201 -184
  94. package/lib/empty/index.js +23 -18
  95. package/lib/empty/style/index.d.ts +1 -1
  96. package/lib/form/FormItem.d.ts +1 -1
  97. package/lib/form/FormItem.js +9 -5
  98. package/lib/form/index.js +6 -3
  99. package/lib/form/style/index.d.ts +1 -1
  100. package/lib/grid/col.js +2 -1
  101. package/lib/grid/row.js +2 -1
  102. package/lib/index.d.ts +4 -2
  103. package/lib/index.js +3 -0
  104. package/lib/input/Input.js +3 -2
  105. package/lib/input/Password.js +3 -2
  106. package/lib/input/Search.js +3 -2
  107. package/lib/input/TextArea.js +3 -2
  108. package/lib/input-number/index.js +2 -1
  109. package/lib/list/index.js +3 -2
  110. package/lib/lottie/index.js +2 -1
  111. package/lib/modal/Modal.js +7 -3
  112. package/lib/modal/Progress.js +9 -5
  113. package/lib/modal/style/index.d.ts +1 -1
  114. package/lib/radio/index.js +2 -1
  115. package/lib/radio/style/index.d.ts +1 -1
  116. package/lib/result/403.js +156 -121
  117. package/lib/result/404.js +328 -267
  118. package/lib/result/500.js +295 -257
  119. package/lib/result/Error.js +127 -99
  120. package/lib/result/Processing.js +246 -213
  121. package/lib/result/Success.js +233 -169
  122. package/lib/result/Warning.js +611 -515
  123. package/lib/result/index.d.ts +2 -2
  124. package/lib/result/index.js +12 -11
  125. package/lib/result/style/index.d.ts +1 -1
  126. package/lib/segmented/index.js +8 -4
  127. package/lib/select/index.js +2 -1
  128. package/lib/select/style/index.d.ts +1 -1
  129. package/lib/slider/index.js +2 -1
  130. package/lib/slider/style/index.d.ts +1 -1
  131. package/lib/space/index.js +2 -1
  132. package/lib/space/style/index.d.ts +1 -1
  133. package/lib/spin/index.js +5 -4
  134. package/lib/spin/style/index.d.ts +1 -1
  135. package/lib/switch/index.js +2 -1
  136. package/lib/switch/style/index.d.ts +1 -1
  137. package/lib/table/index.js +44 -31
  138. package/lib/table/style/index.d.ts +1 -1
  139. package/lib/table/style/index.js +2 -4
  140. package/lib/tabs/index.js +10 -5
  141. package/lib/tabs/style/index.d.ts +1 -1
  142. package/lib/tabs/style/index.js +1 -2
  143. package/lib/tag/index.js +9 -5
  144. package/lib/tag/style/index.d.ts +2 -4
  145. package/lib/tag/style/index.js +12 -27
  146. package/lib/theme/dark.d.ts +1 -48
  147. package/lib/theme/default.d.ts +4 -2
  148. package/lib/theme/default.js +79 -34
  149. package/lib/theme/index.d.ts +20 -57
  150. package/lib/theme/interface.d.ts +66 -0
  151. package/lib/theme/style/aliyun.less +41 -41
  152. package/lib/theme/style/compact.less +87 -80
  153. package/lib/theme/style/dark.less +58 -58
  154. package/lib/theme/style/default.less +89 -82
  155. package/lib/tooltip/MouseTooltip.js +43 -39
  156. package/lib/tooltip/ReactStickyMouseTooltip.js +5 -4
  157. package/lib/tooltip/index.js +14 -10
  158. package/lib/tooltip/style/index.d.ts +1 -1
  159. package/lib/tree-select/index.js +2 -1
  160. package/lib/tree-select/style/index.d.ts +1 -1
  161. package/lib/typography/Link.js +5 -4
  162. package/lib/typography/Paragraph.js +5 -4
  163. package/lib/typography/Text.js +5 -4
  164. package/lib/typography/Title.js +5 -4
  165. package/package.json +8 -7
  166. package/es/_util/genStyle.d.ts +0 -2
  167. package/es/_util/getWeakenBorderColor.d.ts +0 -1
  168. package/es/_util/getWeakenBorderColor.js +0 -4
  169. package/lib/_util/genStyle.d.ts +0 -2
  170. package/lib/_util/genStyle.js +0 -43
  171. package/lib/_util/getWeakenBorderColor.d.ts +0 -1
@@ -1,10 +1,10 @@
1
1
  @blue: #0d6cf2;
2
2
  @purple: #722ED1;
3
3
  @cyan: #13C2C2;
4
- @green: #14b781;
4
+ @green: #16b882;
5
5
  @magenta: #EB2F96;
6
6
  @pink: #EB2F96;
7
- @red: #ef4343;
7
+ @red: #eb4242;
8
8
  @orange: #FA8C16;
9
9
  @yellow: #f49f25;
10
10
  @volcano: #FA541C;
@@ -12,9 +12,9 @@
12
12
  @gold: #FAAD14;
13
13
  @lime: #A0D911;
14
14
  @colorPrimary: #0d6cf2;
15
- @colorSuccess: #14b781;
15
+ @colorSuccess: #16b882;
16
16
  @colorWarning: #f49f25;
17
- @colorError: #ef4343;
17
+ @colorError: #eb4242;
18
18
  @colorInfo: #0d6cf2;
19
19
  @colorLink: #0d6cf2;
20
20
  @colorTextBase: #000000;
@@ -38,7 +38,7 @@
38
38
  @sizeUnit: 4px;
39
39
  @sizeStep: 4px;
40
40
  @sizePopupArrow: 16px;
41
- @controlHeight: 32px;
41
+ @controlHeight: 28px;
42
42
  @zIndexBase: 0;
43
43
  @zIndexPopupBase: 1000;
44
44
  @opacityImage: 1;
@@ -104,22 +104,22 @@
104
104
  @cyan9: #00474f;
105
105
  @cyan-10: #002329;
106
106
  @cyan10: #002329;
107
- @green-1: #e1f7ec;
108
- @green1: #e1f7ec;
109
- @green-2: #b0ebcf;
110
- @green2: #b0ebcf;
111
- @green-3: #83deb6;
112
- @green3: #83deb6;
113
- @green-4: #5ad1a1;
114
- @green4: #5ad1a1;
115
- @green-5: #35c490;
116
- @green5: #35c490;
117
- @green-6: #14b781;
118
- @green6: #14b781;
119
- @green-7: #099168;
120
- @green7: #099168;
121
- @green-8: #016b4f;
122
- @green8: #016b4f;
107
+ @green-1: #e4f7ed;
108
+ @green1: #e4f7ed;
109
+ @green-2: #b2ebd0;
110
+ @green2: #b2ebd0;
111
+ @green-3: #85deb7;
112
+ @green3: #85deb7;
113
+ @green-4: #5cd1a2;
114
+ @green4: #5cd1a2;
115
+ @green-5: #37c491;
116
+ @green5: #37c491;
117
+ @green-6: #16b882;
118
+ @green6: #16b882;
119
+ @green-7: #0a9169;
120
+ @green7: #0a9169;
121
+ @green-8: #026b4f;
122
+ @green8: #026b4f;
123
123
  @green-9: #004535;
124
124
  @green9: #004535;
125
125
  @green-10: #001f18;
@@ -172,18 +172,18 @@
172
172
  @red3: #ffc8c2;
173
173
  @red-4: #ffa099;
174
174
  @red4: #ffa099;
175
- @red-5: #fc746f;
176
- @red5: #fc746f;
177
- @red-6: #ef4343;
178
- @red6: #ef4343;
179
- @red-7: #c92e34;
180
- @red7: #c92e34;
181
- @red-8: #a31d26;
182
- @red8: #a31d26;
183
- @red-9: #7d101b;
184
- @red9: #7d101b;
185
- @red-10: #570a15;
186
- @red10: #570a15;
175
+ @red-5: #f7716d;
176
+ @red5: #f7716d;
177
+ @red-6: #eb4242;
178
+ @red6: #eb4242;
179
+ @red-7: #c42d32;
180
+ @red7: #c42d32;
181
+ @red-8: #9e1c25;
182
+ @red8: #9e1c25;
183
+ @red-9: #78101a;
184
+ @red9: #78101a;
185
+ @red-10: #520a13;
186
+ @red10: #520a13;
187
187
  @orange-1: #fff7e6;
188
188
  @orange1: #fff7e6;
189
189
  @orange-2: #ffe7ba;
@@ -307,15 +307,15 @@
307
307
  @colorText: #132039;
308
308
  @colorTextSecondary: #5c6b8a;
309
309
  @colorTextTertiary: #8592ad;
310
- @colorTextQuaternary: #c1cbe0;
310
+ @colorTextQuaternary: #b6c0d4;
311
311
  @colorFill: #cdd5e4;
312
312
  @colorFillSecondary: #e2e8f3;
313
- @colorFillTertiary: #f3f6fc;
314
- @colorFillQuaternary: #f8fafe;
313
+ @colorFillTertiary: #eff3fa;
314
+ @colorFillQuaternary: #f7f9fc;
315
315
  @colorBgSolid: rgb(0,0,0);
316
316
  @colorBgSolidHover: rgba(0,0,0,0.75);
317
317
  @colorBgSolidActive: rgba(0,0,0,0.95);
318
- @colorBgLayout: #f8fafe;
318
+ @colorBgLayout: #f7f9fc;
319
319
  @colorBgContainer: #ffffff;
320
320
  @colorBgElevated: #ffffff;
321
321
  @colorBgSpotlight: #ffffff;
@@ -331,60 +331,60 @@
331
331
  @colorPrimaryTextHover: #3690ff;
332
332
  @colorPrimaryText: #0d6cf2;
333
333
  @colorPrimaryTextActive: #004ecc;
334
- @colorSuccessBg: #e8f8f3;
335
- @colorSuccessBgHover: #b0ebcf;
336
- @colorSuccessBorder: #7ed7ba;
337
- @colorSuccessBorderHover: #5ad1a1;
338
- @colorSuccessHover: #5ad1a1;
339
- @colorSuccessActive: #099168;
340
- @colorSuccessTextHover: #35c490;
341
- @colorSuccessText: #096547;
342
- @colorSuccessTextActive: #099168;
343
- @colorErrorBg: #fdecec;
334
+ @colorSuccessBg: #f5faf8;
335
+ @colorSuccessBgHover: #b2ebd0;
336
+ @colorSuccessBorder: #79d1b4;
337
+ @colorSuccessBorderHover: #5cd1a2;
338
+ @colorSuccessHover: #5cd1a2;
339
+ @colorSuccessActive: #0a9169;
340
+ @colorSuccessTextHover: #37c491;
341
+ @colorSuccessText: #09593f;
342
+ @colorSuccessTextActive: #0a9169;
343
+ @colorErrorBg: #fff2f2;
344
344
  @colorErrorBgHover: #ffedeb;
345
345
  @colorErrorBgFilledHover: #ffddd9;
346
346
  @colorErrorBgActive: #ffc8c2;
347
347
  @colorErrorBorder: #f69898;
348
348
  @colorErrorBorderHover: #ffa099;
349
- @colorErrorHover: #fc746f;
350
- @colorErrorActive: #c92e34;
351
- @colorErrorTextHover: #fc746f;
349
+ @colorErrorHover: #f7716d;
350
+ @colorErrorActive: #c42d32;
351
+ @colorErrorTextHover: #f7716d;
352
352
  @colorErrorText: #8a1b1b;
353
- @colorErrorTextActive: #c92e34;
354
- @colorWarningBg: #fef6e9;
353
+ @colorErrorTextActive: #c42d32;
354
+ @colorWarningBg: #fff9ee;
355
355
  @colorWarningBgHover: #fff0c9;
356
- @colorWarningBorder: #f9cb87;
356
+ @colorWarningBorder: #fac373;
357
357
  @colorWarningBorderHover: #ffd078;
358
358
  @colorWarningHover: #ffd078;
359
359
  @colorWarningActive: #cf7b15;
360
360
  @colorWarningTextHover: #ffbc4f;
361
- @colorWarningText: #5b3600;
361
+ @colorWarningText: #6c4408;
362
362
  @colorWarningTextActive: #cf7b15;
363
- @colorInfoBg: #eaf1ff;
363
+ @colorInfoBg: #f3f8fe;
364
364
  @colorInfoBgHover: #b0dbff;
365
- @colorInfoBorder: #598cf3;
365
+ @colorInfoBorder: #619ef3;
366
366
  @colorInfoBorderHover: #5eacff;
367
- @colorInfoHover: #5eacff;
368
- @colorInfoActive: #004ecc;
367
+ @colorInfoHover: #0852bb;
368
+ @colorInfoActive: #0852bb;
369
369
  @colorInfoTextHover: #3690ff;
370
- @colorInfoText: #083e8b;
370
+ @colorInfoText: #0d3c80;
371
371
  @colorInfoTextActive: #004ecc;
372
372
  @colorLinkHover: #5eacff;
373
373
  @colorLinkActive: #004ecc;
374
- @colorBgMask: rgba(19, 32, 57, 0.45);
374
+ @colorBgMask: rgba(19, 32, 57, 0.6);
375
375
  @colorWhite: #fff;
376
376
  @fontSizeSM: 12px;
377
- @fontSizeLG: 14px;
377
+ @fontSizeLG: 16px;
378
378
  @fontSizeXL: 18px;
379
- @fontSizeHeading1: 34px;
380
- @fontSizeHeading2: 28px;
381
- @fontSizeHeading3: 22px;
382
- @fontSizeHeading4: 18px;
383
- @fontSizeHeading5: 14px;
384
- @lineHeight: 1.6153846153846154;
379
+ @fontSizeHeading1: 24px;
380
+ @fontSizeHeading2: 20px;
381
+ @fontSizeHeading3: 18px;
382
+ @fontSizeHeading4: 16px;
383
+ @fontSizeHeading5: 13px;
384
+ @lineHeight: 1.5384615384615385;
385
385
  @lineHeightLG: 1.5714285714285714;
386
386
  @lineHeightSM: 1.8;
387
- @fontHeight: 21px;
387
+ @fontHeight: 20px;
388
388
  @fontHeightLG: 22px;
389
389
  @fontHeightSM: 18px;
390
390
  @lineHeightHeading1: 1.2352941176470589;
@@ -402,49 +402,56 @@
402
402
  @sizeXS: 8px;
403
403
  @sizeXXS: 4px;
404
404
  @controlHeightSM: 24px;
405
- @controlHeightXS: 16px;
406
- @controlHeightLG: 40px;
405
+ @controlHeightXS: 14px;
406
+ @controlHeightLG: 35px;
407
407
  @motionDurationFast: 0.1s;
408
408
  @motionDurationMid: 0.2s;
409
409
  @motionDurationSlow: 0.3s;
410
410
  @lineWidthBold: 2px;
411
411
  @borderRadiusXS: 1px;
412
412
  @borderRadiusSM: 2px;
413
- @borderRadiusLG: 6px;
413
+ @borderRadiusLG: 8px;
414
414
  @borderRadiusOuter: 4px;
415
+ @fontWeightWeak: 400;
416
+ @fontWeight: 400;
417
+ @fontWeightStrong: 600;
418
+ @borderRadiusMD: 6px;
419
+ @colorFuchsia: #b04ec4;
420
+ @colorFuchsiaBorder: #d88ee7;
421
+ @colorFuchsiaBg: #faf0fc;
422
+ @colorFuchsiaText: #580e67;
415
423
  @colorIcon: #8592ad;
424
+ @colorBgContainerDisabled: #eff3fa;
416
425
  @boxShadow: 0 6px 16px 0 rgba(54, 69, 99, 0.08), 0 3px 6px -4px rgba(54, 69, 99, 0.12), 0 9px 28px 8px rgba(54, 69, 99, 0.05);
417
426
  @boxShadowSecondary: 0 6px 16px 0 rgba(54, 69, 99, 0.08), 0 3px 6px -4px rgba(54, 69, 99, 0.12), 0 9px 28px 8px rgba(54, 69, 99, 0.05);
418
427
  @boxShadowTertiary: 0 1px 2px 0 rgba(54, 69, 99, 0.03), 0 1px 6px -1px rgba(54, 69, 99, 0.02), 0 2px 4px 0 rgba(54, 69, 99, 0.02);
419
428
  @lineWidthFocus: 3px;
420
429
  @colorFillContent: #e2e8f3;
421
430
  @colorFillContentHover: #cdd5e4;
422
- @colorFillAlter: #f8fafe;
423
- @colorBgContainerDisabled: #f3f6fc;
431
+ @colorFillAlter: #f7f9fc;
424
432
  @colorBorderBg: #ffffff;
425
433
  @colorSplit: rgba(13,63,155,0.12);
426
- @colorTextPlaceholder: #c1cbe0;
427
- @colorTextDisabled: #c1cbe0;
434
+ @colorTextPlaceholder: #b6c0d4;
435
+ @colorTextDisabled: #b6c0d4;
428
436
  @colorTextHeading: #132039;
429
437
  @colorTextLabel: #5c6b8a;
430
438
  @colorTextDescription: #8592ad;
431
439
  @colorTextLightSolid: #fff;
432
- @colorHighlight: #ef4343;
440
+ @colorHighlight: #eb4242;
433
441
  @colorBgTextHover: #e2e8f3;
434
442
  @colorBgTextActive: #cdd5e4;
435
443
  @colorIconHover: #132039;
436
- @colorErrorOutline: rgba(230,17,17,0.08);
437
- @colorWarningOutline: rgba(244,155,11,0.09);
444
+ @colorErrorOutline: rgba(255,38,38,0.06);
445
+ @colorWarningOutline: rgba(255,169,12,0.07);
438
446
  @fontSizeIcon: 12px;
439
447
  @controlOutlineWidth: 2px;
440
- @controlInteractiveSize: 16px;
441
- @controlItemBgHover: #f3f6fc;
448
+ @controlInteractiveSize: 14px;
449
+ @controlItemBgHover: #eff3fa;
442
450
  @controlItemBgActive: #e6f4ff;
443
451
  @controlItemBgActiveHover: #b0dbff;
444
452
  @controlItemBgActiveDisabled: #cdd5e4;
445
- @controlTmpOutline: #f8fafe;
453
+ @controlTmpOutline: #f7f9fc;
446
454
  @controlOutline: rgba(5,145,255,0.1);
447
- @fontWeightStrong: 600;
448
455
  @opacityLoading: 0.65;
449
456
  @linkDecoration: none;
450
457
  @linkHoverDecoration: none;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
2
+ import type { FullToken, GenerateStyle } from '../../theme/interface';
3
3
  export type TooltipToken = FullToken<'Tooltip'>;
4
4
  export declare const genTooltipStyle: GenerateStyle<TooltipToken>;
5
5
  declare const _default: (prefixCls: string) => {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
2
+ import type { FullToken, GenerateStyle } from '../../theme/interface';
3
3
  export type TreeSelectToken = FullToken<'TreeSelect'>;
4
4
  export declare const genTreeSelectStyle: GenerateStyle<TreeSelectToken>;
5
5
  declare const _default: (prefixCls: string) => {
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import type { CSSObject } from '@ant-design/cssinjs';
3
3
  import type { ComponentTokenMap } from 'antd/es/theme/interface';
4
- import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
5
- import type { GlobalToken } from 'antd/es/theme/interface';
4
+ import type { GlobalToken, FullToken, GenerateStyle } from '../theme/interface';
5
+ export declare const genSelectCommonStyle: (token: FullToken<'Select' | 'TreeSelect' | 'Cascader'>) => CSSObject;
6
6
  export type ComponentName = keyof ComponentTokenMap;
7
7
  export declare function genComponentStyleHook(componentName: ComponentName, styleFn: GenerateStyle<FullToken<ComponentName>>, getDefaultToken?: Partial<FullToken<ComponentName>> | ((token: GlobalToken) => Partial<FullToken<ComponentName>>)): (prefixCls: string) => {
8
8
  wrapSSR: (node: React.ReactNode) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
@@ -29,17 +29,32 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  // src/_util/genComponentStyleHook.ts
30
30
  var genComponentStyleHook_exports = {};
31
31
  __export(genComponentStyleHook_exports, {
32
- genComponentStyleHook: () => genComponentStyleHook
32
+ genComponentStyleHook: () => genComponentStyleHook,
33
+ genSelectCommonStyle: () => genSelectCommonStyle
33
34
  });
34
35
  module.exports = __toCommonJS(genComponentStyleHook_exports);
35
- var import_internal = require("antd/es/theme/internal");
36
+ var import_internal = require("../theme/internal");
36
37
  var import_theme = __toESM(require("../theme"));
38
+ var genSelectCommonStyle = (token) => {
39
+ const { antCls } = token;
40
+ const selectComponentCls = `${antCls}-select`;
41
+ return {
42
+ [`${selectComponentCls}${selectComponentCls}-multiple`]: {
43
+ [`${selectComponentCls}-selection-item`]: {
44
+ borderRadius: token.borderRadius
45
+ }
46
+ }
47
+ };
48
+ };
37
49
  function genComponentStyleHook(componentName, styleFn, getDefaultToken) {
38
50
  return (prefixCls) => {
39
51
  const useStyle = (0, import_internal.genComponentStyleHook)(
40
52
  `OB-${componentName}`,
41
53
  (token) => {
42
- return [styleFn(token)];
54
+ return [
55
+ genSelectCommonStyle(token),
56
+ styleFn(token)
57
+ ];
43
58
  },
44
59
  getDefaultToken,
45
60
  {
@@ -60,5 +75,6 @@ function genComponentStyleHook(componentName, styleFn, getDefaultToken) {
60
75
  }
61
76
  // Annotate the CommonJS export names for ESM import in node:
62
77
  0 && (module.exports = {
63
- genComponentStyleHook
78
+ genComponentStyleHook,
79
+ genSelectCommonStyle
64
80
  });
@@ -33,18 +33,19 @@ __export(alert_exports, {
33
33
  default: () => alert_default
34
34
  });
35
35
  module.exports = __toCommonJS(alert_exports);
36
- var import_react = __toESM(require("react"));
36
+ var import_react = require("react");
37
37
  var import_antd = require("antd");
38
38
  var import_icons = require("@oceanbase/icons");
39
39
  var import_classnames = __toESM(require("classnames"));
40
40
  var import_config_provider = __toESM(require("../config-provider"));
41
41
  var import_style = __toESM(require("./style"));
42
42
  __reExport(alert_exports, require("antd/es/alert"), module.exports);
43
+ var import_jsx_runtime = require("react/jsx-runtime");
43
44
  var iconMapOutlined = {
44
- success: /* @__PURE__ */ import_react.default.createElement(import_icons.CheckCircleOutlined, null),
45
- info: /* @__PURE__ */ import_react.default.createElement(import_icons.InfoCircleOutlined, null),
46
- error: /* @__PURE__ */ import_react.default.createElement(import_icons.CloseCircleOutlined, null),
47
- warning: /* @__PURE__ */ import_react.default.createElement(import_icons.ExclamationCircleOutlined, null)
45
+ success: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CheckCircleOutlined, {}),
46
+ info: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.InfoCircleOutlined, {}),
47
+ error: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseCircleOutlined, {}),
48
+ warning: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.ExclamationCircleOutlined, {})
48
49
  };
49
50
  var Alert = ({
50
51
  type,
@@ -65,7 +66,7 @@ var Alert = ({
65
66
  className
66
67
  );
67
68
  return wrapSSR(
68
- /* @__PURE__ */ import_react.default.createElement(
69
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
69
70
  import_antd.Alert,
70
71
  {
71
72
  type,
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
2
+ import type { FullToken, GenerateStyle } from '../../theme/interface';
3
3
  export type AlertToken = FullToken<'Alert'>;
4
4
  export declare const genAlertStyle: GenerateStyle<AlertToken>;
5
5
  declare const _default: (prefixCls: string) => {
@@ -1 +1,9 @@
1
+ import React from 'react';
2
+ import { App as AntApp } from 'antd';
3
+ import type { AppProps } from 'antd/es/app';
1
4
  export * from 'antd/es/app';
5
+ export type AppType = React.FC<AppProps> & {
6
+ useApp: typeof AntApp.useApp;
7
+ };
8
+ declare const App: AppType;
9
+ export default App;
package/lib/app/index.js CHANGED
@@ -1,7 +1,13 @@
1
+ var __create = Object.create;
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
4
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
5
11
  var __copyProps = (to, from, except, desc) => {
6
12
  if (from && typeof from === "object" || typeof from === "function") {
7
13
  for (let key of __getOwnPropNames(from))
@@ -11,12 +17,41 @@ var __copyProps = (to, from, except, desc) => {
11
17
  return to;
12
18
  };
13
19
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
14
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
29
 
16
- // src/app/index.ts
30
+ // src/app/index.tsx
17
31
  var app_exports = {};
32
+ __export(app_exports, {
33
+ default: () => app_default
34
+ });
18
35
  module.exports = __toCommonJS(app_exports);
36
+ var import_react = require("react");
37
+ var import_antd = require("antd");
38
+ var import_classnames = __toESM(require("classnames"));
39
+ var import_config_provider = __toESM(require("../config-provider"));
40
+ var import_style = __toESM(require("./style"));
19
41
  __reExport(app_exports, require("antd/es/app"), module.exports);
42
+ var import_jsx_runtime = require("react/jsx-runtime");
43
+ var App = ({ prefixCls: customizePrefixCls, className, ...restProps }) => {
44
+ const { getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
45
+ const prefixCls = getPrefixCls("app", customizePrefixCls);
46
+ const { wrapSSR } = (0, import_style.default)(prefixCls);
47
+ const appCls = (0, import_classnames.default)(className);
48
+ return wrapSSR(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.App, { prefixCls: customizePrefixCls, className: appCls, ...restProps }));
49
+ };
50
+ App.useApp = import_antd.App.useApp;
51
+ if (process.env.NODE_ENV !== "production") {
52
+ App.displayName = import_antd.App.displayName;
53
+ }
54
+ var app_default = App;
20
55
  // Annotate the CommonJS export names for ESM import in node:
21
56
  0 && (module.exports = {
22
57
  ...require("antd/es/app")
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import type { FullToken, GenerateStyle } from '../../theme/interface';
3
+ export type AppToken = FullToken<'App'>;
4
+ export declare const genAppStyle: GenerateStyle<AppToken>;
5
+ declare const _default: (prefixCls: string) => {
6
+ wrapSSR: (node: import("react").ReactNode) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
7
+ hashId: string;
8
+ };
9
+ export default _default;
@@ -16,17 +16,27 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // src/_util/getWeakenBorderColor.ts
20
- var getWeakenBorderColor_exports = {};
21
- __export(getWeakenBorderColor_exports, {
22
- getWeakenBorderColor: () => getWeakenBorderColor
19
+ // src/app/style/index.ts
20
+ var style_exports = {};
21
+ __export(style_exports, {
22
+ default: () => style_default,
23
+ genAppStyle: () => genAppStyle
23
24
  });
24
- module.exports = __toCommonJS(getWeakenBorderColor_exports);
25
- var import_tinycolor = require("@ctrl/tinycolor");
26
- function getWeakenBorderColor(color) {
27
- return new import_tinycolor.TinyColor(color).setAlpha(0.4).toHex8String();
28
- }
25
+ module.exports = __toCommonJS(style_exports);
26
+ var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
27
+ var genAppStyle = (token) => {
28
+ const { componentCls } = token;
29
+ return {
30
+ [`${componentCls}`]: {}
31
+ };
32
+ };
33
+ var style_default = (prefixCls) => {
34
+ const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("App", (token) => {
35
+ return [genAppStyle(token)];
36
+ });
37
+ return useStyle(prefixCls);
38
+ };
29
39
  // Annotate the CommonJS export names for ESM import in node:
30
40
  0 && (module.exports = {
31
- getWeakenBorderColor
41
+ genAppStyle
32
42
  });
@@ -40,14 +40,15 @@ var import_classnames = __toESM(require("classnames"));
40
40
  var import_config_provider = __toESM(require("../config-provider"));
41
41
  var import_style = __toESM(require("./style"));
42
42
  __reExport(badge_exports, require("antd/es/badge"), module.exports);
43
+ var import_jsx_runtime = require("react/jsx-runtime");
43
44
  var Badge = import_react.default.forwardRef(
44
45
  ({ prefixCls: customizePrefixCls, className, status, text, icon, ...restProps }, ref) => {
45
46
  const { getPrefixCls, iconPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
46
47
  const prefixCls = getPrefixCls("badge", customizePrefixCls);
47
48
  const { wrapSSR, hashId } = (0, import_style.default)(prefixCls);
48
49
  const iconMap = {
49
- default: /* @__PURE__ */ import_react.default.createElement(import_icons.MinusCircleFilled, { rotate: 45 }),
50
- processing: /* @__PURE__ */ import_react.default.createElement(
50
+ default: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.MinusCircleFilled, { rotate: 45 }),
51
+ processing: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
51
52
  import_icons.Loading3QuartersOutlined,
52
53
  {
53
54
  style: {
@@ -56,12 +57,12 @@ var Badge = import_react.default.forwardRef(
56
57
  className: `${iconPrefixCls}-spin`
57
58
  }
58
59
  ),
59
- success: /* @__PURE__ */ import_react.default.createElement(import_icons.CheckCircleFilled, null),
60
- error: /* @__PURE__ */ import_react.default.createElement(import_icons.CloseCircleFilled, null),
61
- warning: /* @__PURE__ */ import_react.default.createElement(import_icons.EllipsisCircleFilled, null)
60
+ success: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CheckCircleFilled, {}),
61
+ error: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.CloseCircleFilled, {}),
62
+ warning: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.EllipsisCircleFilled, {})
62
63
  };
63
64
  return wrapSSR(
64
- /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, status && icon ? /* @__PURE__ */ import_react.default.createElement(
65
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: status && icon ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
65
66
  "span",
66
67
  {
67
68
  ref,
@@ -69,17 +70,19 @@ var Badge = import_react.default.forwardRef(
69
70
  style: {
70
71
  display: "inline-block"
71
72
  },
72
- ...restProps
73
- },
74
- /* @__PURE__ */ import_react.default.createElement(
75
- "span",
76
- {
77
- className: (0, import_classnames.default)(`${prefixCls}-status-icon`, `${prefixCls}-status-${status}`)
78
- },
79
- import_react.default.isValidElement(icon) ? icon : iconMap[status]
80
- ),
81
- text && /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefixCls}-status-text` }, text)
82
- ) : /* @__PURE__ */ import_react.default.createElement(
73
+ ...restProps,
74
+ children: [
75
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
76
+ "span",
77
+ {
78
+ className: (0, import_classnames.default)(`${prefixCls}-status-icon`, `${prefixCls}-status-${status}`),
79
+ children: import_react.default.isValidElement(icon) ? icon : iconMap[status]
80
+ }
81
+ ),
82
+ text && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${prefixCls}-status-text`, children: text })
83
+ ]
84
+ }
85
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
83
86
  import_antd.Badge,
84
87
  {
85
88
  ref,
@@ -89,7 +92,7 @@ var Badge = import_react.default.forwardRef(
89
92
  text,
90
93
  ...restProps
91
94
  }
92
- ))
95
+ ) })
93
96
  );
94
97
  }
95
98
  );
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
2
+ import type { FullToken, GenerateStyle } from '../../theme/interface';
3
3
  export type BadgeToken = FullToken<'Badge'>;
4
4
  export declare const genBadgeStyle: GenerateStyle<BadgeToken>;
5
5
  declare const _default: (prefixCls: string) => {
@@ -26,17 +26,15 @@ module.exports = __toCommonJS(style_exports);
26
26
  var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
27
27
  var genBadgeStyle = (token) => {
28
28
  const { componentCls } = token;
29
- const dotSize = token.fontSizeLG / 2;
30
29
  return {
31
30
  [`${componentCls}`]: {
32
- // inherit color from parent instead of fixed colorText
33
- color: "inherit"
31
+ // make status text inherit parent style
32
+ color: "inherit",
33
+ fontSize: "inherit"
34
34
  },
35
35
  [`${componentCls}${componentCls}-status`]: {
36
36
  // dot style
37
37
  [`${componentCls}-status-dot`]: {
38
- width: dotSize,
39
- height: dotSize,
40
38
  [`&${componentCls}-status-default`]: {
41
39
  backgroundColor: token.colorFill
42
40
  }
@@ -66,8 +64,9 @@ var genBadgeStyle = (token) => {
66
64
  },
67
65
  [`${componentCls}-status-text`]: {
68
66
  marginInlineStart: token.marginXS,
69
- // inherit color from parent instead of fixed colorText
70
- color: "inherit"
67
+ // inherit style from parent
68
+ color: "inherit",
69
+ fontSize: "inherit"
71
70
  }
72
71
  }
73
72
  };
@@ -39,6 +39,7 @@ var import_react = __toESM(require("react"));
39
39
  var import_config_provider = __toESM(require("../config-provider"));
40
40
  var import_style = __toESM(require("./style"));
41
41
  __reExport(button_exports, require("antd/es/button"), module.exports);
42
+ var import_jsx_runtime = require("react/jsx-runtime");
42
43
  var Button = import_react.default.forwardRef(
43
44
  ({ prefixCls: customizePrefixCls, className, ...restProps }, ref) => {
44
45
  const { theme, getPrefixCls } = (0, import_react.useContext)(import_config_provider.default.ConfigContext);
@@ -46,7 +47,7 @@ var Button = import_react.default.forwardRef(
46
47
  const { wrapSSR } = (0, import_style.default)(prefixCls, theme == null ? void 0 : theme.isAliyun);
47
48
  const buttonCls = (0, import_classnames.default)(className);
48
49
  return wrapSSR(
49
- /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { ref, prefixCls: customizePrefixCls, className: buttonCls, ...restProps })
50
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_antd.Button, { ref, prefixCls: customizePrefixCls, className: buttonCls, ...restProps })
50
51
  );
51
52
  }
52
53
  );
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
2
+ import type { FullToken, GenerateStyle } from '../../theme/interface';
3
3
  export type ButtonToken = FullToken<'Button'>;
4
4
  export declare const genButtonStyle: GenerateStyle<ButtonToken>;
5
5
  declare const _default: (prefixCls: string, isAliyun?: boolean) => {