@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.
- package/dist/design.min.js +1 -1
- package/es/_util/genComponentStyleHook.d.ts +2 -2
- package/es/_util/genComponentStyleHook.js +15 -2
- package/es/alert/style/index.d.ts +1 -1
- package/es/app/index.d.ts +8 -0
- package/es/app/index.js +36 -1
- package/es/app/style/index.d.ts +9 -0
- package/es/{_util/genStyle.js → app/style/index.js} +10 -11
- package/es/badge/style/index.d.ts +1 -1
- package/es/badge/style/index.js +7 -10
- package/es/button/style/index.d.ts +1 -1
- package/es/card/index.js +5 -1
- package/es/card/style/index.d.ts +1 -1
- package/es/card/style/index.js +8 -2
- package/es/checkbox/style/index.d.ts +1 -1
- package/es/config-provider/context.d.ts +11 -0
- package/es/config-provider/context.js +2 -1
- package/es/config-provider/index.js +31 -32
- package/es/descriptions/hooks/useItems.d.ts +6 -6
- package/es/descriptions/style/index.d.ts +1 -1
- package/es/descriptions/style/index.js +4 -2
- package/es/drawer/index.js +7 -5
- package/es/drawer/style/index.d.ts +1 -1
- package/es/drawer/style/index.js +11 -7
- package/es/empty/index.js +1 -1
- package/es/empty/style/index.d.ts +1 -1
- package/es/form/FormItem.d.ts +1 -1
- package/es/form/style/index.d.ts +1 -1
- package/es/index.d.ts +4 -2
- package/es/index.js +1 -0
- package/es/modal/style/index.d.ts +1 -1
- package/es/radio/style/index.d.ts +1 -1
- package/es/result/index.d.ts +2 -2
- package/es/result/index.js +5 -4
- package/es/result/style/index.d.ts +1 -1
- package/es/select/style/index.d.ts +1 -1
- package/es/slider/style/index.d.ts +1 -1
- package/es/space/style/index.d.ts +1 -1
- package/es/spin/style/index.d.ts +1 -1
- package/es/switch/style/index.d.ts +1 -1
- package/es/table/style/index.d.ts +1 -1
- package/es/table/style/index.js +1 -3
- package/es/tabs/style/index.d.ts +1 -1
- package/es/tabs/style/index.js +1 -2
- package/es/tag/style/index.d.ts +2 -4
- package/es/tag/style/index.js +14 -31
- package/es/theme/dark.d.ts +1 -48
- package/es/theme/default.d.ts +4 -2
- package/es/theme/default.js +71 -35
- package/es/theme/index.d.ts +20 -57
- package/es/theme/interface.d.ts +66 -0
- package/es/theme/interface.js +4 -1
- package/es/theme/style/aliyun.less +41 -41
- package/es/theme/style/compact.less +87 -80
- package/es/theme/style/dark.less +58 -58
- package/es/theme/style/default.less +89 -82
- package/es/tooltip/style/index.d.ts +1 -1
- package/es/tree-select/style/index.d.ts +1 -1
- package/lib/_util/genComponentStyleHook.d.ts +2 -2
- package/lib/_util/genComponentStyleHook.js +20 -4
- package/lib/alert/index.js +7 -6
- package/lib/alert/style/index.d.ts +1 -1
- package/lib/app/index.d.ts +8 -0
- package/lib/app/index.js +36 -1
- package/lib/app/style/index.d.ts +9 -0
- package/lib/{_util/getWeakenBorderColor.js → app/style/index.js} +20 -10
- package/lib/badge/index.js +21 -18
- package/lib/badge/style/index.d.ts +1 -1
- package/lib/badge/style/index.js +6 -7
- package/lib/button/index.js +2 -1
- package/lib/button/style/index.d.ts +1 -1
- package/lib/card/index.js +14 -5
- package/lib/card/style/index.d.ts +1 -1
- package/lib/card/style/index.js +10 -0
- package/lib/checkbox/index.js +2 -1
- package/lib/checkbox/style/index.d.ts +1 -1
- package/lib/config-provider/DefaultRenderEmpty.js +4 -3
- package/lib/config-provider/context.d.ts +11 -0
- package/lib/config-provider/index.js +36 -25
- package/lib/descriptions/hooks/useItems.d.ts +6 -6
- package/lib/descriptions/hooks/useItems.js +5 -4
- package/lib/descriptions/index.js +3 -2
- package/lib/descriptions/style/index.d.ts +1 -1
- package/lib/descriptions/style/index.js +6 -1
- package/lib/drawer/index.js +44 -33
- package/lib/drawer/style/index.d.ts +1 -1
- package/lib/drawer/style/index.js +11 -5
- package/lib/dropdown/dropdown-button.js +3 -13
- package/lib/dropdown/index.js +2 -2
- package/lib/empty/colored.js +413 -327
- package/lib/empty/database.js +267 -222
- package/lib/empty/default.js +16 -21
- package/lib/empty/guide.js +201 -184
- package/lib/empty/index.js +23 -18
- package/lib/empty/style/index.d.ts +1 -1
- package/lib/form/FormItem.d.ts +1 -1
- package/lib/form/FormItem.js +9 -5
- package/lib/form/index.js +6 -3
- package/lib/form/style/index.d.ts +1 -1
- package/lib/grid/col.js +2 -1
- package/lib/grid/row.js +2 -1
- package/lib/index.d.ts +4 -2
- package/lib/index.js +3 -0
- package/lib/input/Input.js +3 -2
- package/lib/input/Password.js +3 -2
- package/lib/input/Search.js +3 -2
- package/lib/input/TextArea.js +3 -2
- package/lib/input-number/index.js +2 -1
- package/lib/list/index.js +3 -2
- package/lib/lottie/index.js +2 -1
- package/lib/modal/Modal.js +7 -3
- package/lib/modal/Progress.js +9 -5
- package/lib/modal/style/index.d.ts +1 -1
- package/lib/radio/index.js +2 -1
- package/lib/radio/style/index.d.ts +1 -1
- package/lib/result/403.js +156 -121
- package/lib/result/404.js +328 -267
- package/lib/result/500.js +295 -257
- package/lib/result/Error.js +127 -99
- package/lib/result/Processing.js +246 -213
- package/lib/result/Success.js +233 -169
- package/lib/result/Warning.js +611 -515
- package/lib/result/index.d.ts +2 -2
- package/lib/result/index.js +12 -11
- package/lib/result/style/index.d.ts +1 -1
- package/lib/segmented/index.js +8 -4
- package/lib/select/index.js +2 -1
- package/lib/select/style/index.d.ts +1 -1
- package/lib/slider/index.js +2 -1
- package/lib/slider/style/index.d.ts +1 -1
- package/lib/space/index.js +2 -1
- package/lib/space/style/index.d.ts +1 -1
- package/lib/spin/index.js +5 -4
- package/lib/spin/style/index.d.ts +1 -1
- package/lib/switch/index.js +2 -1
- package/lib/switch/style/index.d.ts +1 -1
- package/lib/table/index.js +44 -31
- package/lib/table/style/index.d.ts +1 -1
- package/lib/table/style/index.js +2 -4
- package/lib/tabs/index.js +10 -5
- package/lib/tabs/style/index.d.ts +1 -1
- package/lib/tabs/style/index.js +1 -2
- package/lib/tag/index.js +9 -5
- package/lib/tag/style/index.d.ts +2 -4
- package/lib/tag/style/index.js +12 -27
- package/lib/theme/dark.d.ts +1 -48
- package/lib/theme/default.d.ts +4 -2
- package/lib/theme/default.js +79 -34
- package/lib/theme/index.d.ts +20 -57
- package/lib/theme/interface.d.ts +66 -0
- package/lib/theme/style/aliyun.less +41 -41
- package/lib/theme/style/compact.less +87 -80
- package/lib/theme/style/dark.less +58 -58
- package/lib/theme/style/default.less +89 -82
- package/lib/tooltip/MouseTooltip.js +43 -39
- package/lib/tooltip/ReactStickyMouseTooltip.js +5 -4
- package/lib/tooltip/index.js +14 -10
- package/lib/tooltip/style/index.d.ts +1 -1
- package/lib/tree-select/index.js +2 -1
- package/lib/tree-select/style/index.d.ts +1 -1
- package/lib/typography/Link.js +5 -4
- package/lib/typography/Paragraph.js +5 -4
- package/lib/typography/Text.js +5 -4
- package/lib/typography/Title.js +5 -4
- package/package.json +8 -7
- package/es/_util/genStyle.d.ts +0 -2
- package/es/_util/getWeakenBorderColor.d.ts +0 -1
- package/es/_util/getWeakenBorderColor.js +0 -4
- package/lib/_util/genStyle.d.ts +0 -2
- package/lib/_util/genStyle.js +0 -43
- 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 '
|
|
5
|
-
|
|
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
|
-
|
|
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 '
|
|
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
|
-
|
|
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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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 '
|
|
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) => {
|
package/es/badge/style/index.js
CHANGED
|
@@ -5,15 +5,11 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
5
5
|
import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
|
|
6
6
|
export var genBadgeStyle = function genBadgeStyle(token) {
|
|
7
7
|
var componentCls = token.componentCls;
|
|
8
|
-
// dot size is larger than antd
|
|
9
|
-
var dotSize = token.fontSizeLG / 2;
|
|
10
8
|
return _defineProperty(_defineProperty({}, "".concat(componentCls), {
|
|
11
|
-
//
|
|
12
|
-
color: 'inherit'
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
height: dotSize
|
|
16
|
-
}, "&".concat(componentCls, "-status-default"), {
|
|
9
|
+
// make status text inherit parent style
|
|
10
|
+
color: 'inherit',
|
|
11
|
+
fontSize: 'inherit'
|
|
12
|
+
}), "".concat(componentCls).concat(componentCls, "-status"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-status-dot"), _defineProperty({}, "&".concat(componentCls, "-status-default"), {
|
|
17
13
|
backgroundColor: token.colorFill
|
|
18
14
|
})), "".concat(componentCls, "-status-icon"), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
19
15
|
// remove dot style
|
|
@@ -32,8 +28,9 @@ export var genBadgeStyle = function genBadgeStyle(token) {
|
|
|
32
28
|
color: token.colorWarning
|
|
33
29
|
})), "".concat(componentCls, "-status-text"), {
|
|
34
30
|
marginInlineStart: token.marginXS,
|
|
35
|
-
// inherit
|
|
36
|
-
color: 'inherit'
|
|
31
|
+
// inherit style from parent
|
|
32
|
+
color: 'inherit',
|
|
33
|
+
fontSize: 'inherit'
|
|
37
34
|
}));
|
|
38
35
|
};
|
|
39
36
|
export default (function (prefixCls) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { FullToken, GenerateStyle } from '
|
|
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) => {
|
package/es/card/index.js
CHANGED
|
@@ -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 = ["children", "size", "title", "tabList", "divided", "prefixCls", "bodyStyle", "styles", "className"];
|
|
2
|
+
var _excluded = ["children", "size", "title", "tabList", "tabProps", "divided", "prefixCls", "bodyStyle", "styles", "className"];
|
|
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; }
|
|
@@ -24,6 +24,7 @@ var Card = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
24
24
|
size = _ref.size,
|
|
25
25
|
title = _ref.title,
|
|
26
26
|
tabList = _ref.tabList,
|
|
27
|
+
tabProps = _ref.tabProps,
|
|
27
28
|
outerDivided = _ref.divided,
|
|
28
29
|
customizePrefixCls = _ref.prefixCls,
|
|
29
30
|
bodyStyle = _ref.bodyStyle,
|
|
@@ -62,6 +63,9 @@ var Card = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
62
63
|
size: size,
|
|
63
64
|
title: title,
|
|
64
65
|
tabList: newTabList,
|
|
66
|
+
tabProps: _objectSpread({
|
|
67
|
+
size: 'middle'
|
|
68
|
+
}, tabProps),
|
|
65
69
|
prefixCls: customizePrefixCls,
|
|
66
70
|
bodyStyle: bodyStyle,
|
|
67
71
|
styles: styles,
|
package/es/card/style/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { CSSObject } from '@ant-design/cssinjs';
|
|
3
|
-
import type { FullToken, GenerateStyle } from '
|
|
3
|
+
import type { FullToken, GenerateStyle } from '../../theme/interface';
|
|
4
4
|
export type CardToken = FullToken<'Card'> & {
|
|
5
5
|
tabsComponentCls: string;
|
|
6
6
|
tabsPrefixCls: string;
|
package/es/card/style/index.js
CHANGED
|
@@ -28,9 +28,15 @@ export var genCardStyle = function genCardStyle(token) {
|
|
|
28
28
|
paddingSM = token.paddingSM,
|
|
29
29
|
paddingLG = token.paddingLG;
|
|
30
30
|
var tableComponentCls = "".concat(antCls, "-table");
|
|
31
|
-
return _ref2 = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref2, "".concat(componentCls), _defineProperty({}, "".concat(componentCls, ":not(").concat(componentCls, "-bordered):not(").concat(componentCls, "-type-inner)"), {
|
|
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
|
-
})
|
|
33
|
+
}), "".concat(componentCls).concat(componentCls, "-bordered"), _defineProperty({
|
|
34
|
+
borderRadius: token.borderRadiusLG - 2
|
|
35
|
+
}, "".concat(componentCls).concat(componentCls, "-bordered"), _defineProperty({
|
|
36
|
+
borderRadius: token.borderRadius
|
|
37
|
+
}, "".concat(componentCls).concat(componentCls, "-bordered"), {
|
|
38
|
+
borderRadius: token.borderRadiusSM
|
|
39
|
+
})))), "".concat(componentCls).concat(componentCls, "-no-divider"), _defineProperty({}, "".concat(componentCls, "-head"), _defineProperty({
|
|
34
40
|
// should not remove border-bottom to avoid tabs inkbar display correctly
|
|
35
41
|
borderBottomColor: 'transparent'
|
|
36
42
|
}, tabsComponentCls, _defineProperty({}, "&".concat(tabsComponentCls, "-top, &").concat(tabsComponentCls, "-bottom"), _defineProperty({}, "".concat(tabsComponentCls, "-nav::before"), {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { FullToken, GenerateStyle } from '
|
|
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 {
|
|
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
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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(
|
|
71
|
-
var 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 '
|
|
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;
|
|
@@ -9,7 +9,7 @@ export var genVerticalStyle = function genVerticalStyle(size, token) {
|
|
|
9
9
|
var componentCls = token.componentCls;
|
|
10
10
|
var paddingMap = {
|
|
11
11
|
default: {
|
|
12
|
-
paddingIn: token.
|
|
12
|
+
paddingIn: token.paddingXXS,
|
|
13
13
|
paddingOut: token.paddingLG
|
|
14
14
|
},
|
|
15
15
|
middle: {
|
|
@@ -22,10 +22,12 @@ export var genVerticalStyle = function genVerticalStyle(size, token) {
|
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
var paddingConfig = paddingMap[size];
|
|
25
|
-
return _defineProperty({}, "&".concat(componentCls).concat(componentCls, "-vertical:not(").concat(componentCls, "-bordered)"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-row:nth-child(2n + 1)"), _defineProperty({}, "& > th, & > td", {
|
|
25
|
+
return _defineProperty({}, "&".concat(componentCls).concat(componentCls, "-vertical:not(").concat(componentCls, "-bordered)"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-row:nth-child(2n + 1)"), _defineProperty({}, "& > th, & > td", {
|
|
26
26
|
paddingBottom: paddingConfig.paddingIn
|
|
27
27
|
})), "".concat(componentCls, "-row:nth-child(2n)"), _defineProperty({}, "& > th, & > td", {
|
|
28
28
|
paddingBottom: paddingConfig.paddingOut
|
|
29
|
+
})), "".concat(componentCls, "-item"), _defineProperty({}, "".concat(componentCls, "-item-label"), {
|
|
30
|
+
fontSize: token.fontSizeSM
|
|
29
31
|
})));
|
|
30
32
|
};
|
|
31
33
|
export var genDescriptionsStyle = function genDescriptionsStyle(token) {
|
package/es/drawer/index.js
CHANGED
|
@@ -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(
|
|
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 '
|
|
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) => {
|
package/es/drawer/style/index.js
CHANGED
|
@@ -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:
|
|
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:
|
|
25
|
+
padding: contentPadding,
|
|
24
26
|
overflow: 'auto'
|
|
25
27
|
}), "".concat(componentCls, "-footer-container"), _defineProperty({
|
|
26
28
|
position: 'sticky',
|
|
27
|
-
padding:
|
|
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, "-
|
|
39
|
-
padding:
|
|
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(
|
|
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 '
|
|
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) => {
|
package/es/form/FormItem.d.ts
CHANGED
|
@@ -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?: "" | "
|
|
7
|
+
status?: "" | "success" | "warning" | "error" | "validating";
|
|
8
8
|
errors: React.ReactNode[];
|
|
9
9
|
warnings: React.ReactNode[];
|
|
10
10
|
};
|
package/es/form/style/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { FullToken, GenerateStyle } from '
|
|
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/
|
|
72
|
-
token: import("
|
|
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 };
|