@oceanbase/design 1.0.0-alpha.2 → 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 (162) 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/button/style/index.d.ts +1 -1
  11. package/es/card/style/index.d.ts +1 -1
  12. package/es/card/style/index.js +3 -3
  13. package/es/checkbox/style/index.d.ts +1 -1
  14. package/es/config-provider/context.d.ts +11 -0
  15. package/es/config-provider/context.js +2 -1
  16. package/es/config-provider/index.js +31 -32
  17. package/es/descriptions/hooks/useItems.d.ts +6 -6
  18. package/es/descriptions/style/index.d.ts +1 -1
  19. package/es/drawer/index.js +7 -5
  20. package/es/drawer/style/index.d.ts +1 -1
  21. package/es/drawer/style/index.js +11 -7
  22. package/es/empty/index.js +1 -1
  23. package/es/empty/style/index.d.ts +1 -1
  24. package/es/form/FormItem.d.ts +1 -1
  25. package/es/form/style/index.d.ts +1 -1
  26. package/es/index.d.ts +4 -2
  27. package/es/index.js +1 -0
  28. package/es/modal/style/index.d.ts +1 -1
  29. package/es/radio/style/index.d.ts +1 -1
  30. package/es/result/index.d.ts +2 -2
  31. package/es/result/index.js +5 -4
  32. package/es/result/style/index.d.ts +1 -1
  33. package/es/select/style/index.d.ts +1 -1
  34. package/es/slider/style/index.d.ts +1 -1
  35. package/es/space/style/index.d.ts +1 -1
  36. package/es/spin/style/index.d.ts +1 -1
  37. package/es/switch/style/index.d.ts +1 -1
  38. package/es/table/style/index.d.ts +1 -1
  39. package/es/tabs/style/index.d.ts +1 -1
  40. package/es/tag/style/index.d.ts +2 -4
  41. package/es/tag/style/index.js +14 -31
  42. package/es/theme/dark.d.ts +1 -48
  43. package/es/theme/default.d.ts +4 -2
  44. package/es/theme/default.js +52 -27
  45. package/es/theme/index.d.ts +20 -57
  46. package/es/theme/interface.d.ts +66 -0
  47. package/es/theme/interface.js +4 -1
  48. package/es/theme/style/aliyun.less +40 -40
  49. package/es/theme/style/compact.less +79 -72
  50. package/es/theme/style/dark.less +53 -53
  51. package/es/theme/style/default.less +79 -72
  52. package/es/tooltip/style/index.d.ts +1 -1
  53. package/es/tree-select/style/index.d.ts +1 -1
  54. package/lib/_util/genComponentStyleHook.d.ts +2 -2
  55. package/lib/_util/genComponentStyleHook.js +20 -4
  56. package/lib/alert/index.js +7 -6
  57. package/lib/alert/style/index.d.ts +1 -1
  58. package/lib/app/index.d.ts +8 -0
  59. package/lib/app/index.js +36 -1
  60. package/lib/app/style/index.d.ts +9 -0
  61. package/lib/{_util/getWeakenBorderColor.js → app/style/index.js} +20 -10
  62. package/lib/badge/index.js +21 -18
  63. package/lib/badge/style/index.d.ts +1 -1
  64. package/lib/button/index.js +2 -1
  65. package/lib/button/style/index.d.ts +1 -1
  66. package/lib/card/index.js +9 -5
  67. package/lib/card/style/index.d.ts +1 -1
  68. package/lib/card/style/index.js +4 -4
  69. package/lib/checkbox/index.js +2 -1
  70. package/lib/checkbox/style/index.d.ts +1 -1
  71. package/lib/config-provider/DefaultRenderEmpty.js +4 -3
  72. package/lib/config-provider/context.d.ts +11 -0
  73. package/lib/config-provider/index.js +36 -25
  74. package/lib/descriptions/hooks/useItems.d.ts +6 -6
  75. package/lib/descriptions/hooks/useItems.js +5 -4
  76. package/lib/descriptions/index.js +3 -2
  77. package/lib/descriptions/style/index.d.ts +1 -1
  78. package/lib/drawer/index.js +44 -33
  79. package/lib/drawer/style/index.d.ts +1 -1
  80. package/lib/drawer/style/index.js +11 -5
  81. package/lib/dropdown/dropdown-button.js +3 -13
  82. package/lib/dropdown/index.js +2 -2
  83. package/lib/empty/colored.js +413 -327
  84. package/lib/empty/database.js +267 -222
  85. package/lib/empty/default.js +16 -21
  86. package/lib/empty/guide.js +201 -184
  87. package/lib/empty/index.js +23 -18
  88. package/lib/empty/style/index.d.ts +1 -1
  89. package/lib/form/FormItem.d.ts +1 -1
  90. package/lib/form/FormItem.js +9 -5
  91. package/lib/form/index.js +6 -3
  92. package/lib/form/style/index.d.ts +1 -1
  93. package/lib/grid/col.js +2 -1
  94. package/lib/grid/row.js +2 -1
  95. package/lib/index.d.ts +4 -2
  96. package/lib/index.js +3 -0
  97. package/lib/input/Input.js +3 -2
  98. package/lib/input/Password.js +3 -2
  99. package/lib/input/Search.js +3 -2
  100. package/lib/input/TextArea.js +3 -2
  101. package/lib/input-number/index.js +2 -1
  102. package/lib/list/index.js +3 -2
  103. package/lib/lottie/index.js +2 -1
  104. package/lib/modal/Modal.js +7 -3
  105. package/lib/modal/Progress.js +9 -5
  106. package/lib/modal/style/index.d.ts +1 -1
  107. package/lib/radio/index.js +2 -1
  108. package/lib/radio/style/index.d.ts +1 -1
  109. package/lib/result/403.js +156 -121
  110. package/lib/result/404.js +328 -267
  111. package/lib/result/500.js +295 -257
  112. package/lib/result/Error.js +127 -99
  113. package/lib/result/Processing.js +246 -213
  114. package/lib/result/Success.js +233 -169
  115. package/lib/result/Warning.js +611 -515
  116. package/lib/result/index.d.ts +2 -2
  117. package/lib/result/index.js +12 -11
  118. package/lib/result/style/index.d.ts +1 -1
  119. package/lib/segmented/index.js +8 -4
  120. package/lib/select/index.js +2 -1
  121. package/lib/select/style/index.d.ts +1 -1
  122. package/lib/slider/index.js +2 -1
  123. package/lib/slider/style/index.d.ts +1 -1
  124. package/lib/space/index.js +2 -1
  125. package/lib/space/style/index.d.ts +1 -1
  126. package/lib/spin/index.js +5 -4
  127. package/lib/spin/style/index.d.ts +1 -1
  128. package/lib/switch/index.js +2 -1
  129. package/lib/switch/style/index.d.ts +1 -1
  130. package/lib/table/index.js +44 -31
  131. package/lib/table/style/index.d.ts +1 -1
  132. package/lib/tabs/index.js +10 -5
  133. package/lib/tabs/style/index.d.ts +1 -1
  134. package/lib/tag/index.js +9 -5
  135. package/lib/tag/style/index.d.ts +2 -4
  136. package/lib/tag/style/index.js +12 -27
  137. package/lib/theme/dark.d.ts +1 -48
  138. package/lib/theme/default.d.ts +4 -2
  139. package/lib/theme/default.js +60 -26
  140. package/lib/theme/index.d.ts +20 -57
  141. package/lib/theme/interface.d.ts +66 -0
  142. package/lib/theme/style/aliyun.less +40 -40
  143. package/lib/theme/style/compact.less +79 -72
  144. package/lib/theme/style/dark.less +53 -53
  145. package/lib/theme/style/default.less +79 -72
  146. package/lib/tooltip/MouseTooltip.js +43 -39
  147. package/lib/tooltip/ReactStickyMouseTooltip.js +5 -4
  148. package/lib/tooltip/index.js +14 -10
  149. package/lib/tooltip/style/index.d.ts +1 -1
  150. package/lib/tree-select/index.js +2 -1
  151. package/lib/tree-select/style/index.d.ts +1 -1
  152. package/lib/typography/Link.js +5 -4
  153. package/lib/typography/Paragraph.js +5 -4
  154. package/lib/typography/Text.js +5 -4
  155. package/lib/typography/Title.js +5 -4
  156. package/package.json +5 -4
  157. package/es/_util/genStyle.d.ts +0 -2
  158. package/es/_util/getWeakenBorderColor.d.ts +0 -1
  159. package/es/_util/getWeakenBorderColor.js +0 -4
  160. package/lib/_util/genStyle.d.ts +0 -2
  161. package/lib/_util/genStyle.js +0 -43
  162. package/lib/_util/getWeakenBorderColor.d.ts +0 -1
@@ -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>>;
@@ -1,15 +1,28 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
1
2
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
3
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
4
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
5
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
6
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
7
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- import { genComponentStyleHook as antGenComponentStyleHook } from 'antd/es/theme/internal';
8
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
10
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
11
+ import { genComponentStyleHook as antGenComponentStyleHook } from "../theme/internal";
8
12
  import theme from "../theme";
13
+
14
+ // work for Select, TreeSelect, Cascader
15
+ export var genSelectCommonStyle = function genSelectCommonStyle(token) {
16
+ var antCls = token.antCls;
17
+ var selectComponentCls = "".concat(antCls, "-select");
18
+ return _defineProperty({}, "".concat(selectComponentCls).concat(selectComponentCls, "-multiple"), _defineProperty({}, "".concat(selectComponentCls, "-selection-item"), {
19
+ borderRadius: token.borderRadius
20
+ }));
21
+ };
9
22
  export function genComponentStyleHook(componentName, styleFn, getDefaultToken) {
10
23
  return function (prefixCls) {
11
24
  var useStyle = antGenComponentStyleHook("OB-".concat(componentName), function (token) {
12
- return [styleFn(token)];
25
+ return [genSelectCommonStyle(token), styleFn(token)];
13
26
  }, getDefaultToken, {
14
27
  resetStyle: false,
15
28
  // antd style order is -999 and -998
@@ -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) => {
package/es/app/index.d.ts CHANGED
@@ -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/es/app/index.js CHANGED
@@ -1 +1,36 @@
1
- export * from 'antd/es/app';
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["prefixCls", "className"];
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
9
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
10
+ import React, { useContext } from 'react';
11
+ import { App as AntApp } from 'antd';
12
+ import classNames from 'classnames';
13
+ import ConfigProvider from "../config-provider";
14
+ import useStyle from "./style";
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
+ export * from 'antd/es/app';
17
+ var App = function App(_ref) {
18
+ var customizePrefixCls = _ref.prefixCls,
19
+ className = _ref.className,
20
+ restProps = _objectWithoutProperties(_ref, _excluded);
21
+ var _useContext = useContext(ConfigProvider.ConfigContext),
22
+ getPrefixCls = _useContext.getPrefixCls;
23
+ var prefixCls = getPrefixCls('app', customizePrefixCls);
24
+ var _useStyle = useStyle(prefixCls),
25
+ wrapSSR = _useStyle.wrapSSR;
26
+ var appCls = classNames(className);
27
+ return wrapSSR( /*#__PURE__*/_jsx(AntApp, _objectSpread({
28
+ prefixCls: customizePrefixCls,
29
+ className: appCls
30
+ }, restProps)));
31
+ };
32
+ App.useApp = AntApp.useApp;
33
+ if (process.env.NODE_ENV !== 'production') {
34
+ App.displayName = AntApp.displayName;
35
+ }
36
+ export default 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;
@@ -2,15 +2,14 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
4
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
- export var genCompactStyle = function genCompactStyle(componentCls) {
6
- var subComponentCls = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
7
- return _defineProperty(_defineProperty(_defineProperty({}, "&".concat(componentCls, "-compact-item:not(").concat(componentCls, "-compact-last-item)").concat(componentCls, "-compact-first-item ").concat(subComponentCls), {
8
- borderStartEndRadius: 0,
9
- borderEndEndRadius: 0
10
- }), "&".concat(componentCls, "-compact-item:not(").concat(componentCls, "-compact-first-item):not(").concat(componentCls, "-compact-last-item) ").concat(subComponentCls), {
11
- borderRadius: 0
12
- }), "&".concat(componentCls, "-compact-item:not(").concat(componentCls, "-compact-first-item)").concat(componentCls, "-compact-last-item ").concat(subComponentCls), {
13
- borderStartStartRadius: 0,
14
- borderEndStartRadius: 0
5
+ import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
6
+ export var genAppStyle = function genAppStyle(token) {
7
+ var componentCls = token.componentCls;
8
+ return _defineProperty({}, "".concat(componentCls), {});
9
+ };
10
+ export default (function (prefixCls) {
11
+ var useStyle = genComponentStyleHook('App', function (token) {
12
+ return [genAppStyle(token)];
15
13
  });
16
- };
14
+ return useStyle(prefixCls);
15
+ });
@@ -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) => {
@@ -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) => {
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { CSSObject } from '@ant-design/cssinjs';
3
- import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
3
+ import type { FullToken, GenerateStyle } from '../../theme/interface';
4
4
  export type CardToken = FullToken<'Card'> & {
5
5
  tabsComponentCls: string;
6
6
  tabsPrefixCls: string;
@@ -30,11 +30,11 @@ export var genCardStyle = function genCardStyle(token) {
30
30
  var tableComponentCls = "".concat(antCls, "-table");
31
31
  return _ref2 = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref2, "".concat(componentCls), _defineProperty(_defineProperty({}, "".concat(componentCls, ":not(").concat(componentCls, "-bordered):not(").concat(componentCls, "-type-inner)"), {
32
32
  boxShadow: 'none'
33
- }), "".concat(componentCls), _defineProperty({
33
+ }), "".concat(componentCls).concat(componentCls, "-bordered"), _defineProperty({
34
34
  borderRadius: token.borderRadiusLG - 2
35
- }, "".concat(componentCls), _defineProperty({
35
+ }, "".concat(componentCls).concat(componentCls, "-bordered"), _defineProperty({
36
36
  borderRadius: token.borderRadius
37
- }, "".concat(componentCls), {
37
+ }, "".concat(componentCls).concat(componentCls, "-bordered"), {
38
38
  borderRadius: token.borderRadiusSM
39
39
  })))), "".concat(componentCls).concat(componentCls, "-no-divider"), _defineProperty({}, "".concat(componentCls, "-head"), _defineProperty({
40
40
  // should not remove border-bottom to avoid tabs inkbar display correctly
@@ -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 CheckboxToken = FullToken<'Checkbox'>;
4
4
  export declare const genCheckboxStyle: GenerateStyle<CheckboxToken>;
5
5
  declare const _default: (prefixCls: string) => {
@@ -1 +1,12 @@
1
+ import type { ThemeConfig as AntThemeConfig, MappingAlgorithm } from 'antd';
2
+ import type { AliasToken, OverrideToken } from '../theme/interface';
1
3
  export * from 'antd/es/config-provider/context';
4
+ type ComponentsConfig = {
5
+ [key in keyof OverrideToken]?: OverrideToken[key] & {
6
+ algorithm?: boolean | MappingAlgorithm | MappingAlgorithm[];
7
+ };
8
+ };
9
+ export interface ThemeConfig extends AntThemeConfig {
10
+ token?: Partial<AliasToken>;
11
+ components?: ComponentsConfig;
12
+ }
@@ -1 +1,2 @@
1
- export * from 'antd/es/config-provider/context';
1
+ export * from 'antd/es/config-provider/context';
2
+ export {};
@@ -1,22 +1,23 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
1
  var _excluded = ["children", "theme", "locale", "navigate", "hideOnSinglePage", "card", "collapse", "form", "spin", "table", "tabs", "styleProviderProps", "appProps"];
2
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
6
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
7
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
8
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
9
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
9
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
10
10
  import React from 'react';
11
- import { App, ConfigProvider as AntConfigProvider } from 'antd';
11
+ import { ConfigProvider as AntConfigProvider } from 'antd';
12
12
  import { StyleProvider } from '@ant-design/cssinjs';
13
13
  import StyleContext from '@ant-design/cssinjs/es/StyleContext';
14
14
  import { CaretRightOutlined } from '@oceanbase/icons';
15
15
  import aliyunTheme from '@oceanbase/aliyun-theme';
16
16
  import { merge } from 'lodash';
17
+ import App from "../app";
17
18
  import StaticFunction from "../static-function";
18
19
  import themeConfig from "../theme";
19
- import defaultTheme, { fontFamilyEn } from "../theme/default";
20
+ import defaultTheme, { fontFamilyEn, fontWeightEn, fontWeightStrongEn } from "../theme/default";
20
21
  import darkTheme from "../theme/dark";
21
22
  import DefaultRenderEmpty from "./DefaultRenderEmpty";
22
23
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -31,22 +32,25 @@ var ExtendedConfigContext = /*#__PURE__*/React.createContext({
31
32
  hideOnSinglePage: false,
32
33
  injectStaticFunction: true
33
34
  });
34
- var ConfigProvider = function ConfigProvider(_ref) {
35
- var _mergedTheme$token, _parentContext$pagina;
36
- var children = _ref.children,
37
- theme = _ref.theme,
38
- locale = _ref.locale,
39
- navigate = _ref.navigate,
40
- hideOnSinglePage = _ref.hideOnSinglePage,
41
- card = _ref.card,
42
- collapse = _ref.collapse,
43
- form = _ref.form,
44
- spin = _ref.spin,
45
- table = _ref.table,
46
- tabs = _ref.tabs,
47
- styleProviderProps = _ref.styleProviderProps,
48
- appProps = _ref.appProps,
49
- restProps = _objectWithoutProperties(_ref, _excluded);
35
+ var getLocaleTokenValue = function getLocaleTokenValue(locale, tokenKey, tokenValue, tokenValueEn) {
36
+ return tokenValue !== defaultTheme.token[tokenKey] ? _defineProperty({}, tokenKey, tokenValue) : ['en', 'en-gb'].includes(locale.locale) ? _defineProperty({}, tokenKey, tokenValueEn) : {};
37
+ };
38
+ var ConfigProvider = function ConfigProvider(_ref3) {
39
+ var _mergedTheme$token, _mergedTheme$token2, _mergedTheme$token3, _parentContext$pagina;
40
+ var children = _ref3.children,
41
+ theme = _ref3.theme,
42
+ locale = _ref3.locale,
43
+ navigate = _ref3.navigate,
44
+ hideOnSinglePage = _ref3.hideOnSinglePage,
45
+ card = _ref3.card,
46
+ collapse = _ref3.collapse,
47
+ form = _ref3.form,
48
+ spin = _ref3.spin,
49
+ table = _ref3.table,
50
+ tabs = _ref3.tabs,
51
+ styleProviderProps = _ref3.styleProviderProps,
52
+ appProps = _ref3.appProps,
53
+ restProps = _objectWithoutProperties(_ref3, _excluded);
50
54
  // inherit from parent ConfigProvider
51
55
  var parentContext = React.useContext(AntConfigProvider.ConfigContext);
52
56
  var parentExtendedContext = React.useContext(ExtendedConfigContext);
@@ -58,6 +62,9 @@ var ConfigProvider = function ConfigProvider(_ref) {
58
62
  var _themeConfig$useToken = themeConfig.useToken(),
59
63
  token = _themeConfig$useToken.token;
60
64
  var fontFamily = ((_mergedTheme$token = mergedTheme.token) === null || _mergedTheme$token === void 0 ? void 0 : _mergedTheme$token.fontFamily) || token.fontFamily;
65
+ // @ts-ignore
66
+ var fontWeight = ((_mergedTheme$token2 = mergedTheme.token) === null || _mergedTheme$token2 === void 0 ? void 0 : _mergedTheme$token2.fontWeight) || token.fontWeight;
67
+ var fontWeightStrong = ((_mergedTheme$token3 = mergedTheme.token) === null || _mergedTheme$token3 === void 0 ? void 0 : _mergedTheme$token3.fontWeightStrong) || token.fontWeightStrong;
61
68
 
62
69
  // inherit from parent StyleProvider
63
70
  var parentStyleContext = React.useContext(StyleContext);
@@ -67,8 +74,8 @@ var ConfigProvider = function ConfigProvider(_ref) {
67
74
  locale: mergedLocale,
68
75
  card: merge({}, parentContext.card, card),
69
76
  collapse: merge({}, {
70
- expandIcon: function expandIcon(_ref2) {
71
- var isActive = _ref2.isActive;
77
+ expandIcon: function expandIcon(_ref4) {
78
+ var isActive = _ref4.isActive;
72
79
  return /*#__PURE__*/_jsx(CaretRightOutlined, {
73
80
  rotate: isActive ? 90 : 0
74
81
  });
@@ -81,15 +88,7 @@ var ConfigProvider = function ConfigProvider(_ref) {
81
88
  table: merge({}, parentContext.table, table),
82
89
  tabs: merge({}, parentContext.tabs, tabs),
83
90
  theme: merge({}, mergedTheme, {
84
- token:
85
- // custom fontFamily
86
- fontFamily !== defaultTheme.token.fontFamily ? {
87
- fontFamily: fontFamily
88
- } :
89
- // use fontFamilyEn for en
90
- ['en', 'en-gb'].includes(mergedLocale.locale) ? {
91
- fontFamily: fontFamilyEn
92
- } : {}
91
+ token: _objectSpread(_objectSpread(_objectSpread({}, getLocaleTokenValue(mergedLocale, 'fontFamily', fontFamily, fontFamilyEn)), getLocaleTokenValue(mergedLocale, 'fontWeight', fontWeight, fontWeightEn)), getLocaleTokenValue(mergedLocale, 'fontWeightStrong', fontWeightStrong, fontWeightStrongEn))
93
92
  }),
94
93
  renderEmpty: parentContext.renderEmpty || function (componentName) {
95
94
  return /*#__PURE__*/_jsx(DefaultRenderEmpty, {
@@ -5,17 +5,17 @@ export default function useItems(items?: DescriptionsItemType[], children?: Reac
5
5
  key?: React.Key;
6
6
  label?: React.ReactNode;
7
7
  span?: number | "filled" | {
8
- xxl?: number;
9
- xl?: number;
10
- lg?: number;
11
- md?: number;
12
- sm?: number;
13
8
  xs?: number;
9
+ sm?: number;
10
+ md?: number;
11
+ lg?: number;
12
+ xl?: number;
13
+ xxl?: number;
14
14
  };
15
15
  style?: React.CSSProperties;
16
- className?: string;
17
16
  classNames?: Partial<Record<"label" | "content", string>>;
18
17
  styles?: Partial<Record<"label" | "content", React.CSSProperties>>;
18
+ className?: string;
19
19
  labelStyle?: React.CSSProperties;
20
20
  contentStyle?: React.CSSProperties;
21
21
  }[];
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { CSSObject } from '@ant-design/cssinjs';
3
- import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
3
+ import type { FullToken, GenerateStyle } from '../../theme/interface';
4
4
  import type { DescriptionsProps } from '..';
5
5
  export type DescriptionsToken = FullToken<'Alert'> & {
6
6
  typographyPrefixCls: string;
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["locale", "children", "onOk", "onClose", "onCancel", "okText", "cancelText", "okButtonProps", "confirmLoading", "footer", "footerExtra", "rootClassName", "bodyStyle", "styles", "prefixCls"];
2
+ var _excluded = ["locale", "children", "loading", "onOk", "onClose", "onCancel", "okText", "cancelText", "okButtonProps", "confirmLoading", "footer", "footerExtra", "rootClassName", "bodyStyle", "styles", "prefixCls"];
3
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
4
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5
5
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -28,6 +28,7 @@ export * from 'antd/es/drawer';
28
28
  var Drawer = function Drawer(_ref) {
29
29
  var customLocale = _ref.locale,
30
30
  children = _ref.children,
31
+ loading = _ref.loading,
31
32
  onOk = _ref.onOk,
32
33
  onClose = _ref.onClose,
33
34
  onCancel = _ref.onCancel,
@@ -58,16 +59,17 @@ var Drawer = function Drawer(_ref) {
58
59
  useSize(contentElment);
59
60
  // useScroll for re-render when scroll
60
61
  var scroll = useScroll(contentElment);
61
- var isScroll = (contentElment === null || contentElment === void 0 ? void 0 : contentElment.scrollHeight) !== (contentElment === null || contentElment === void 0 ? void 0 : contentElment.clientHeight);
62
+ var isScroll = !loading && (contentElment === null || contentElment === void 0 ? void 0 : contentElment.scrollHeight) !== (contentElment === null || contentElment === void 0 ? void 0 : contentElment.clientHeight);
62
63
  // start scroll
63
- var isStartScroll = scroll.top > 0;
64
+ var isStartScroll = !loading && scroll.top > 0;
64
65
  // Determine if an element has been totally scrolled
65
66
  // ref: https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#determine_if_an_element_has_been_totally_scrolled
66
- var isTotalScroll = Math.abs(((contentElment === null || contentElment === void 0 ? void 0 : contentElment.scrollHeight) || 0) - ((contentElment === null || contentElment === void 0 ? void 0 : contentElment.clientHeight) || 0) - ((contentElment === null || contentElment === void 0 ? void 0 : contentElment.scrollTop) || 0)) < 1;
67
+ var isTotalScroll = !loading && Math.abs(((contentElment === null || contentElment === void 0 ? void 0 : contentElment.scrollHeight) || 0) - ((contentElment === null || contentElment === void 0 ? void 0 : contentElment.clientHeight) || 0) - ((contentElment === null || contentElment === void 0 ? void 0 : contentElment.scrollTop) || 0)) < 1;
67
68
  var handleCancel = onCancel || onClose;
68
69
  var showFooter = !!(footer || onOk) && footer !== false && footer !== null;
69
- var drawerCls = classNames(prefixCls, _defineProperty({}, "".concat(prefixCls, "-with-footer"), showFooter), rootClassName);
70
+ var drawerCls = classNames(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-loading"), loading), "".concat(prefixCls, "-with-footer"), showFooter), rootClassName);
70
71
  return wrapSSR( /*#__PURE__*/_jsxs(AntDrawer, _objectSpread(_objectSpread({
72
+ loading: loading,
71
73
  destroyOnClose: true,
72
74
  onClose: handleCancel,
73
75
  rootClassName: drawerCls,
@@ -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 DrawerToken = FullToken<'Drawer'>;
4
4
  export declare const genDrawerStyle: GenerateStyle<DrawerToken>;
5
5
  declare const _default: (prefixCls: string) => {
@@ -4,11 +4,13 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
4
4
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
6
6
  export var genDrawerStyle = function genDrawerStyle(token) {
7
- var componentCls = token.componentCls;
7
+ var componentCls = token.componentCls,
8
+ antCls = token.antCls;
9
+ var contentPadding = "".concat(token.paddingXS, "px ").concat(token.paddingLG, "px ").concat(token.paddingLG, "px ").concat(token.paddingLG, "px");
8
10
  var boxShadowBottom = '0 2px 4px 0 rgba(54,69,99,0.04), 0 1px 6px -1px rgba(54,69,99,0.04), 0 1px 2px 0 rgba(54,69,99,0.06)';
9
11
  var boxShadowTop = '0 -2px 4px 0 rgba(54,69,99,0.04), 0 -1px 6px -1px rgba(54,69,99,0.04), 0 -1px 2px 0 rgba(54,69,99,0.06)';
10
- return _defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty({}, "".concat(componentCls, "-content"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-header"), {
11
- padding: '16px 24px',
12
+ return _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls), _defineProperty({}, "".concat(componentCls, "-content"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-header"), {
13
+ padding: "".concat(token.padding, "px ").concat(token.paddingLG, "px"),
12
14
  borderBottom: 'none',
13
15
  transition: "box-shadow ".concat(token.motionDurationMid),
14
16
  // ensure header box-shadow cover body content
@@ -20,11 +22,11 @@ export var genDrawerStyle = function genDrawerStyle(token) {
20
22
  display: 'flex',
21
23
  flexDirection: 'column'
22
24
  }), "".concat(componentCls, "-body-content"), {
23
- padding: '8px 24px 24px 24px',
25
+ padding: contentPadding,
24
26
  overflow: 'auto'
25
27
  }), "".concat(componentCls, "-footer-container"), _defineProperty({
26
28
  position: 'sticky',
27
- padding: '16px 24px',
29
+ padding: "".concat(token.padding, "px ").concat(token.paddingLG, "px"),
28
30
  transition: "box-shadow ".concat(token.motionDurationMid),
29
31
  // ensure footer box-shadow cover body content
30
32
  zIndex: 10
@@ -35,8 +37,10 @@ export var genDrawerStyle = function genDrawerStyle(token) {
35
37
  alignItems: 'center'
36
38
  })), "".concat(componentCls, "-footer-container-shadow"), {
37
39
  boxShadow: boxShadowTop
38
- }))), "".concat(componentCls).concat(componentCls, "-with-footer"), _defineProperty({}, "".concat(componentCls, "-content"), _defineProperty({}, "".concat(componentCls, "-body-content"), {
39
- padding: '8px 24px 8px 24px'
40
+ }))), "".concat(componentCls).concat(componentCls, "-loading"), _defineProperty({}, "".concat(componentCls, "-body > ").concat(antCls, "-skeleton"), {
41
+ padding: contentPadding
42
+ })), "".concat(componentCls).concat(componentCls, "-with-footer"), _defineProperty({}, "".concat(componentCls, "-content"), _defineProperty({}, "".concat(componentCls, "-body-content"), {
43
+ padding: "".concat(token.paddingXS, "px ").concat(token.paddingLG, "px")
40
44
  })));
41
45
  };
42
46
  export default (function (prefixCls) {
package/es/empty/index.js CHANGED
@@ -56,7 +56,7 @@ var Empty = function Empty(props) {
56
56
  var _useStyle = useStyle(prefixCls),
57
57
  wrapSSR = _useStyle.wrapSSR;
58
58
  var isHorizontal = layout === 'horizontal';
59
- var emptyCls = classNames(prefixCls, _defineProperty(_defineProperty({}, "".concat(prefixCls, "-horizontal"), isHorizontal), "".concat(prefixCls, "-small"), image === defaultEmptyImg || image === simpleEmptyImg), className);
59
+ var emptyCls = classNames(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-horizontal"), isHorizontal), "".concat(prefixCls, "-small"), image === defaultEmptyImg || image === simpleEmptyImg), className);
60
60
  return wrapSSR( /*#__PURE__*/_jsx(AntEmpty, _objectSpread(_objectSpread({
61
61
  image: image,
62
62
  description: /*#__PURE__*/_jsxs(_Fragment, {
@@ -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 EmptyToken = FullToken<'Badge'>;
4
4
  export declare const genEmptyStyle: GenerateStyle<EmptyToken>;
5
5
  declare const _default: (prefixCls: string) => {
@@ -4,7 +4,7 @@ import type { FormItemProps as AntFormItemProps } from 'antd/es/form';
4
4
  import type { TooltipProps } from '../tooltip';
5
5
  declare const AntFormItem: (<Values = any>(props: AntFormItemProps<Values>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & {
6
6
  useStatus: () => {
7
- status?: "" | "error" | "warning" | "success" | "validating";
7
+ status?: "" | "success" | "warning" | "error" | "validating";
8
8
  errors: React.ReactNode[];
9
9
  warnings: React.ReactNode[];
10
10
  };
@@ -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 FormToken = FullToken<'Form'>;
4
4
  export declare const genFormStyle: GenerateStyle<FormToken>;
5
5
  declare const _default: (prefixCls: string) => {
package/es/index.d.ts CHANGED
@@ -13,6 +13,8 @@ export { default as Typography } from './typography';
13
13
  export type { TypographyProps } from './typography';
14
14
  export { default as Card } from './card';
15
15
  export type { CardProps } from './card';
16
+ export { default as App } from './app';
17
+ export type { AppProps } from './app';
16
18
  export { default as ConfigProvider } from './config-provider';
17
19
  export type { ConfigProviderProps, ConfigConsumerProps, ThemeConfig } from './config-provider';
18
20
  export { default as Descriptions } from './descriptions';
@@ -68,8 +70,8 @@ export { default as Lottie } from './lottie';
68
70
  export type { LottieProps, LottieRef } from './lottie';
69
71
  export { default as theme } from './theme';
70
72
  declare const useToken: () => {
71
- theme: import("@ant-design/cssinjs").Theme<import("antd/es/theme/internal").SeedToken, import("antd/es/theme/internal").AliasToken>;
72
- token: import("antd").GlobalToken;
73
+ theme: import("@ant-design/cssinjs").Theme<import("antd/lib/theme/interface/seeds").SeedToken, import("./theme/interface").AliasToken>;
74
+ token: import("./theme/interface").GlobalToken;
73
75
  hashId: string;
74
76
  };
75
77
  export { useToken };
package/es/index.js CHANGED
@@ -7,6 +7,7 @@ export { default as Space } from "./space";
7
7
  export { Col, Row } from "./grid";
8
8
  export { default as Typography } from "./typography";
9
9
  export { default as Card } from "./card";
10
+ export { default as App } from "./app";
10
11
  export { default as ConfigProvider } from "./config-provider";
11
12
  export { default as Descriptions } from "./descriptions";
12
13
  export { default as Empty } from "./empty";
@@ -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 ModalToken = FullToken<'Modal'>;
4
4
  export declare const genModalStyle: GenerateStyle<ModalToken>;
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 RadioToken = FullToken<'Radio'>;
4
4
  export declare const genRadioStyle: GenerateStyle<RadioToken>;
5
5
  declare const _default: (prefixCls: string) => {
@@ -8,10 +8,10 @@ export type ResultStatusType = AntResultStatusType | 'processing';
8
8
  export interface ResultProps extends Omit<AntResultProps, 'status'> {
9
9
  status?: ResultStatusType;
10
10
  }
11
- export interface ResultType extends React.FC<ResultProps> {
11
+ export type ResultType = React.FC<ResultProps> & {
12
12
  PRESENTED_IMAGE_403: typeof Image403;
13
13
  PRESENTED_IMAGE_404: typeof Image404;
14
14
  PRESENTED_IMAGE_500: typeof Image500;
15
- }
15
+ };
16
16
  declare const Result: ResultType;
17
17
  export default Result;
@@ -1,5 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["status", "prefixCls"];
2
+ var _excluded = ["prefixCls", "className", "status"];
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
5
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -22,15 +22,16 @@ import useStyle from "./style";
22
22
  import { jsx as _jsx } from "react/jsx-runtime";
23
23
  export * from 'antd/es/result';
24
24
  var Result = function Result(_ref) {
25
- var status = _ref.status,
26
- customizePrefixCls = _ref.prefixCls,
25
+ var customizePrefixCls = _ref.prefixCls,
26
+ className = _ref.className,
27
+ status = _ref.status,
27
28
  restProps = _objectWithoutProperties(_ref, _excluded);
28
29
  var _useContext = useContext(ConfigProvider.ConfigContext),
29
30
  getPrefixCls = _useContext.getPrefixCls;
30
31
  var prefixCls = getPrefixCls('result', customizePrefixCls);
31
32
  var _useStyle = useStyle(prefixCls),
32
33
  wrapSSR = _useStyle.wrapSSR;
33
- var resultCls = classNames(prefixCls);
34
+ var resultCls = classNames(className);
34
35
  var statusMap = {
35
36
  success: /*#__PURE__*/_jsx(Success, {}),
36
37
  error: /*#__PURE__*/_jsx(Error, {}),
@@ -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 ResultToken = FullToken<'Result'>;
4
4
  export declare const genResultStyle: GenerateStyle<ResultToken>;
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 SelectToken = FullToken<'Select'>;
4
4
  export declare const genSelectStyle: GenerateStyle<SelectToken>;
5
5
  declare const _default: (prefixCls: string) => {