@oceanbase/design 0.2.0 → 0.2.2
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 +9 -0
- package/es/alert/index.d.ts +12 -0
- package/es/{Alert → alert}/index.js +3 -1
- package/es/button/index.d.ts +10 -0
- package/es/{Button → button}/index.js +3 -1
- package/es/card/index.d.ts +17 -0
- package/es/{Card → card}/index.js +5 -3
- package/es/card/style/index.d.ts +11 -0
- package/es/{Card → card}/style/index.js +1 -1
- package/es/color-picker/interface.d.ts +1 -0
- package/es/color-picker/interface.js +1 -0
- package/es/config-provider/index.d.ts +13 -0
- package/es/{ConfigProvider → config-provider}/index.js +2 -2
- package/es/descriptions/index.d.ts +11 -0
- package/es/{Descriptions → descriptions}/index.js +3 -1
- package/es/float-button/interface.d.ts +1 -0
- package/es/float-button/interface.js +1 -0
- package/es/form/FormItem.d.ts +16 -0
- package/es/{Form → form}/FormItem.js +1 -1
- package/es/form/index.d.ts +3 -0
- package/es/{Form → form}/index.js +1 -0
- package/es/form/interface.d.ts +1 -0
- package/es/form/interface.js +1 -0
- package/es/index.d.ts +21 -0
- package/es/index.js +11 -14
- package/es/locale/en-US.d.ts +3 -0
- package/es/locale/index.d.ts +5 -0
- package/es/locale/zh-CN.d.ts +3 -0
- package/es/locale/zh-TW.d.ts +3 -0
- package/es/message/interface.d.ts +1 -0
- package/es/message/interface.js +1 -0
- package/es/modal/index.d.ts +31 -0
- package/es/{Modal → modal}/index.js +4 -2
- package/es/modal/interface.d.ts +1 -0
- package/es/modal/interface.js +1 -0
- package/es/notification/interface.d.ts +1 -0
- package/es/notification/interface.js +1 -0
- package/es/qrcode/interface.d.ts +1 -0
- package/es/qrcode/interface.js +1 -0
- package/es/radio/interface.d.ts +1 -0
- package/es/radio/interface.js +1 -0
- package/es/static-function/index.d.ts +10 -0
- package/es/statistic/interface.d.ts +1 -0
- package/es/statistic/interface.js +1 -0
- package/es/table/index.d.ts +35 -0
- package/es/{Table → table}/index.js +11 -1
- package/es/table/interface.d.ts +1 -0
- package/es/table/interface.js +1 -0
- package/es/tabs/hooks/useLegacyItems.d.ts +3 -0
- package/es/tabs/index.d.ts +18 -0
- package/es/{Tabs → tabs}/index.js +4 -2
- package/es/theme/index.d.ts +184 -0
- package/es/theme/index.js +1 -0
- package/es/theme/interface.d.ts +1 -0
- package/es/theme/interface.js +1 -0
- package/es/tooltip/MouseTooltip.d.ts +9 -0
- package/es/{Tooltip → tooltip}/MouseTooltip.js +1 -1
- package/es/tooltip/index.d.ts +19 -0
- package/es/{Tooltip → tooltip}/index.js +2 -1
- package/es/tour/interface.d.ts +1 -0
- package/es/tour/interface.js +1 -0
- package/es/transfer/interface.d.ts +1 -0
- package/es/transfer/interface.js +1 -0
- package/es/upload/interface.d.ts +1 -0
- package/es/upload/interface.js +1 -0
- package/lib/_util/genComponentStyleHook.d.ts +9 -0
- package/lib/alert/index.d.ts +12 -0
- package/lib/{Alert → alert}/index.js +14 -7
- package/lib/{Alert → alert}/style/index.js +1 -1
- package/lib/button/index.d.ts +10 -0
- package/lib/{Button → button}/index.js +14 -7
- package/lib/{Button → button}/style/index.js +1 -1
- package/lib/card/index.d.ts +17 -0
- package/lib/{Card → card}/index.js +15 -8
- package/lib/card/style/index.d.ts +11 -0
- package/lib/{Card → card}/style/index.js +2 -2
- package/lib/color-picker/interface.d.ts +1 -0
- package/lib/color-picker/interface.js +23 -0
- package/lib/config-provider/index.d.ts +13 -0
- package/lib/{ConfigProvider → config-provider}/index.js +11 -11
- package/lib/{Descriptions → descriptions}/Item.js +1 -1
- package/lib/descriptions/index.d.ts +11 -0
- package/lib/{Descriptions → descriptions}/index.js +14 -7
- package/lib/{Descriptions → descriptions}/style/index.js +1 -1
- package/lib/float-button/interface.d.ts +1 -0
- package/lib/float-button/interface.js +23 -0
- package/lib/form/FormItem.d.ts +16 -0
- package/lib/{Form → form}/FormItem.js +3 -3
- package/lib/form/index.d.ts +3 -0
- package/lib/{Form → form}/index.js +12 -6
- package/lib/form/interface.d.ts +1 -0
- package/lib/form/interface.js +23 -0
- package/lib/index.d.ts +21 -0
- package/lib/index.js +24 -24
- package/lib/locale/en-US.d.ts +3 -0
- package/lib/locale/index.d.ts +5 -0
- package/lib/locale/zh-CN.d.ts +3 -0
- package/lib/locale/zh-TW.d.ts +3 -0
- package/lib/message/interface.d.ts +1 -0
- package/lib/message/interface.js +23 -0
- package/lib/modal/index.d.ts +31 -0
- package/lib/{Modal → modal}/index.js +20 -13
- package/lib/modal/interface.d.ts +1 -0
- package/lib/modal/interface.js +23 -0
- package/lib/{Modal → modal}/style/index.js +1 -1
- package/lib/notification/interface.d.ts +1 -0
- package/lib/notification/interface.js +23 -0
- package/lib/qrcode/interface.d.ts +1 -0
- package/lib/qrcode/interface.js +23 -0
- package/lib/radio/interface.d.ts +1 -0
- package/lib/radio/interface.js +23 -0
- package/lib/static-function/index.d.ts +10 -0
- package/lib/{StaticFunction → static-function}/index.js +6 -6
- package/lib/statistic/interface.d.ts +1 -0
- package/lib/statistic/interface.js +23 -0
- package/lib/table/index.d.ts +35 -0
- package/lib/{Table → table}/index.js +22 -7
- package/lib/table/interface.d.ts +1 -0
- package/lib/table/interface.js +23 -0
- package/lib/{Table → table}/style/index.js +1 -1
- package/lib/{Tabs → tabs}/TabPane.js +1 -1
- package/lib/{Tabs → tabs}/hooks/useInkBar.js +1 -1
- package/lib/tabs/hooks/useLegacyItems.d.ts +3 -0
- package/lib/{Tabs → tabs}/hooks/useLegacyItems.js +1 -1
- package/lib/tabs/index.d.ts +18 -0
- package/lib/{Tabs → tabs}/index.js +14 -7
- package/lib/{Tabs → tabs}/style/index.js +1 -1
- package/lib/theme/index.d.ts +184 -0
- package/lib/theme/index.js +6 -0
- package/lib/theme/interface.d.ts +1 -0
- package/lib/theme/interface.js +23 -0
- package/lib/tooltip/MouseTooltip.d.ts +9 -0
- package/lib/{Tooltip → tooltip}/MouseTooltip.js +6 -6
- package/lib/tooltip/index.d.ts +19 -0
- package/lib/{Tooltip → tooltip}/index.js +20 -17
- package/lib/tour/interface.d.ts +1 -0
- package/lib/tour/interface.js +23 -0
- package/lib/transfer/interface.d.ts +1 -0
- package/lib/transfer/interface.js +23 -0
- package/lib/upload/interface.d.ts +1 -0
- package/lib/upload/interface.js +23 -0
- package/package.json +10 -5
- /package/es/{Alert → alert}/style/index.js +0 -0
- /package/es/{Button → button}/style/index.js +0 -0
- /package/es/{Descriptions → descriptions}/Item.js +0 -0
- /package/es/{Descriptions → descriptions}/style/index.js +0 -0
- /package/es/{Modal → modal}/style/index.js +0 -0
- /package/es/{StaticFunction → static-function}/index.js +0 -0
- /package/es/{Table → table}/style/index.js +0 -0
- /package/es/{Tabs → tabs}/TabPane.js +0 -0
- /package/es/{Tabs → tabs}/hooks/useInkBar.js +0 -0
- /package/es/{Tabs → tabs}/hooks/useLegacyItems.js +0 -0
- /package/es/{Tabs → tabs}/style/index.js +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CSSObject } from '@ant-design/cssinjs';
|
|
2
|
+
import type { ComponentTokenMap } from 'antd/es/theme/interface';
|
|
3
|
+
import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
|
|
4
|
+
export declare type ComponentName = keyof ComponentTokenMap;
|
|
5
|
+
export declare function genComponentStyleHook(componentName: ComponentName, styleFn: GenerateStyle<FullToken<ComponentName>>): (prefixCls: string) => {
|
|
6
|
+
wrapSSR: (node: import("react").ReactNode) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
7
|
+
hashId: string;
|
|
8
|
+
};
|
|
9
|
+
export type { CSSObject, FullToken, GenerateStyle };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AlertProps as AntAlertProps } from 'antd/es/alert';
|
|
2
|
+
export * from 'antd/es/alert';
|
|
3
|
+
export interface AlertProps extends AntAlertProps {
|
|
4
|
+
ghost?: boolean;
|
|
5
|
+
colored?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const Alert: {
|
|
8
|
+
({ ghost, colored, prefixCls: customizePrefixCls, className, ...restProps }: AlertProps): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
9
|
+
ErrorBoundary: typeof import("antd/es/alert/ErrorBoundary").default;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
export default Alert;
|
|
@@ -6,10 +6,12 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
7
|
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; }
|
|
8
8
|
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; }
|
|
9
|
-
import { Alert as AntAlert
|
|
9
|
+
import { Alert as AntAlert } from 'antd';
|
|
10
10
|
import classNames from 'classnames';
|
|
11
11
|
import { useContext } from 'react';
|
|
12
|
+
import ConfigProvider from "../config-provider";
|
|
12
13
|
import useStyle from "./style";
|
|
14
|
+
export * from 'antd/es/alert';
|
|
13
15
|
var Alert = function Alert(_ref) {
|
|
14
16
|
var _classNames;
|
|
15
17
|
var ghost = _ref.ghost,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ButtonProps as AntButtonProps } from 'antd/es/button';
|
|
2
|
+
export * from 'antd/es/button';
|
|
3
|
+
export declare type ButtonProps = AntButtonProps;
|
|
4
|
+
declare const Button: {
|
|
5
|
+
({ prefixCls: customizePrefixCls, className, ...restProps }: ButtonProps): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
6
|
+
Group: import("react").FC<import("antd/es/button").ButtonGroupProps>;
|
|
7
|
+
__ANT_BUTTON: any;
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
10
|
+
export default Button;
|
|
@@ -2,10 +2,12 @@ var _excluded = ["prefixCls", "className"];
|
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
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; }
|
|
4
4
|
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
|
-
import { Button as AntButton
|
|
5
|
+
import { Button as AntButton } from 'antd';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import { useContext } from 'react';
|
|
8
|
+
import ConfigProvider from "../config-provider";
|
|
8
9
|
import useStyle from "./style";
|
|
10
|
+
export * from 'antd/es/button';
|
|
9
11
|
var Button = function Button(_ref) {
|
|
10
12
|
var customizePrefixCls = _ref.prefixCls,
|
|
11
13
|
className = _ref.className,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CardProps as AntCardProps, CardTabListType as AntCardTabListType } from 'antd/es/card';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export * from 'antd/es/card';
|
|
4
|
+
export interface CardTabListType extends AntCardTabListType {
|
|
5
|
+
tag?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export interface CardProps extends AntCardProps {
|
|
8
|
+
divided?: boolean;
|
|
9
|
+
tabList?: CardTabListType[];
|
|
10
|
+
}
|
|
11
|
+
declare const Card: {
|
|
12
|
+
({ children, divided, tabList, activeTabKey, defaultActiveTabKey, onTabChange, tabProps, prefixCls: customizePrefixCls, className, ...restProps }: CardProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
13
|
+
Grid: React.FC<import("antd/es/card").CardGridProps>;
|
|
14
|
+
Meta: React.FC<import("antd/es/card").CardMetaProps>;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
export default Card;
|
|
@@ -15,11 +15,13 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
15
15
|
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; }
|
|
16
16
|
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; }
|
|
17
17
|
import { isNullValue } from '@oceanbase/util';
|
|
18
|
-
import { Card as AntCard,
|
|
18
|
+
import { Card as AntCard, Space, Tag } from 'antd';
|
|
19
19
|
import classNames from 'classnames';
|
|
20
20
|
import React, { useContext, useRef, useState } from 'react';
|
|
21
|
-
import
|
|
21
|
+
import ConfigProvider from "../config-provider";
|
|
22
|
+
import useInkBar from "../tabs/hooks/useInkBar";
|
|
22
23
|
import useStyle from "./style";
|
|
24
|
+
export * from 'antd/es/card';
|
|
23
25
|
var Card = function Card(_ref) {
|
|
24
26
|
var children = _ref.children,
|
|
25
27
|
_ref$divided = _ref.divided,
|
|
@@ -32,7 +34,7 @@ var Card = function Card(_ref) {
|
|
|
32
34
|
customizePrefixCls = _ref.prefixCls,
|
|
33
35
|
className = _ref.className,
|
|
34
36
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
35
|
-
var _useContext = useContext(
|
|
37
|
+
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
36
38
|
getPrefixCls = _useContext.getPrefixCls;
|
|
37
39
|
var prefixCls = getPrefixCls('card', customizePrefixCls);
|
|
38
40
|
var tabsPrefixCls = getPrefixCls('tabs', customizePrefixCls);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FullToken, GenerateStyle } from 'antd/es/theme/internal';
|
|
2
|
+
export declare type CardToken = FullToken<'Card'> & {
|
|
3
|
+
tabsComponentCls: string;
|
|
4
|
+
tabsPrefixCls: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const genCardStyle: GenerateStyle<CardToken>;
|
|
7
|
+
declare const _default: (prefixCls: string, tabsPrefixCls: string) => {
|
|
8
|
+
wrapSSR: (node: import("react").ReactNode) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
9
|
+
hashId: string;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -4,7 +4,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
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; }
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
import { genTagStyle } from "../../
|
|
7
|
+
import { genTagStyle } from "../../tabs/style";
|
|
8
8
|
import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
|
|
9
9
|
export var genCardStyle = function genCardStyle(token) {
|
|
10
10
|
var _$concat$concat, _ref;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/color-picker/interface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/color-picker/interface';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ConfigProviderProps } from 'antd/es/config-provider';
|
|
2
|
+
export * from 'antd/es/config-provider';
|
|
3
|
+
declare const ConfigProvider: {
|
|
4
|
+
({ children, ...restProps }: ConfigProviderProps): import("react").JSX.Element;
|
|
5
|
+
ConfigContext: import("react").Context<import("antd/es/config-provider").ConfigConsumerProps>;
|
|
6
|
+
SizeContext: import("react").Context<import("antd/es/button").ButtonSize>;
|
|
7
|
+
config: ({ prefixCls, iconPrefixCls, theme, }: Pick<ConfigProviderProps, "prefixCls" | "iconPrefixCls"> & {
|
|
8
|
+
theme?: import("antd").ThemeConfig | import("antd/es/config-provider/context").Theme;
|
|
9
|
+
}) => void;
|
|
10
|
+
useConfig: typeof import("antd/es/config-provider/hooks/useConfig").default;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
export default ConfigProvider;
|
|
@@ -2,8 +2,8 @@ var _excluded = ["children"];
|
|
|
2
2
|
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; }
|
|
3
3
|
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; }
|
|
4
4
|
import { App, ConfigProvider as AntConfigProvider } from 'antd';
|
|
5
|
-
import StaticFunction from "../
|
|
6
|
-
export
|
|
5
|
+
import StaticFunction from "../static-function";
|
|
6
|
+
export * from 'antd/es/config-provider';
|
|
7
7
|
|
|
8
8
|
// ConfigProvider 默认内嵌 App,支持 message, notification 和 Modal 等静态方法消费 ConfigProvider 配置
|
|
9
9
|
// ref: https://ant-design.antgroup.com/components/app-cn
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DescriptionsProps as AntDescriptionsProps } from 'antd/es/descriptions';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export * from 'antd/es/descriptions';
|
|
5
|
+
export declare type DescriptionsProps = AntDescriptionsProps;
|
|
6
|
+
declare const Descriptions: {
|
|
7
|
+
({ children, bordered, prefixCls: customizePrefixCls, className, ...restProps }: DescriptionsProps): ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
8
|
+
displayName: string;
|
|
9
|
+
Item: React.FC<import("antd/es/descriptions/Item").DescriptionsItemProps>;
|
|
10
|
+
};
|
|
11
|
+
export default Descriptions;
|
|
@@ -10,13 +10,15 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
10
10
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
11
|
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; }
|
|
12
12
|
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; }
|
|
13
|
-
import {
|
|
13
|
+
import { Descriptions as AntDescriptions, Typography } from 'antd';
|
|
14
14
|
import classNames from 'classnames';
|
|
15
15
|
import { isObject } from 'lodash';
|
|
16
16
|
import toArray from 'rc-util/lib/Children/toArray';
|
|
17
17
|
import React, { isValidElement, useContext } from 'react';
|
|
18
|
+
import ConfigProvider from "../config-provider";
|
|
18
19
|
import DescriptionsItem from "./Item";
|
|
19
20
|
import useStyle from "./style";
|
|
21
|
+
export * from 'antd/es/descriptions';
|
|
20
22
|
var Descriptions = function Descriptions(_ref) {
|
|
21
23
|
var children = _ref.children,
|
|
22
24
|
bordered = _ref.bordered,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/float-button/interface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/float-button/interface';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { FormItemProps as AntFormItemProps } from 'antd/es/form';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import type { TooltipProps } from '../tooltip';
|
|
5
|
+
export declare type WrapperTooltipProps = Omit<TooltipProps, 'mouseFollow'> & {
|
|
6
|
+
icon?: React.ReactElement;
|
|
7
|
+
};
|
|
8
|
+
export declare type LabelTooltipType = WrapperTooltipProps | React.ReactNode;
|
|
9
|
+
declare const FormItem: (<Values = any>(props: AntFormItemProps<Values>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & {
|
|
10
|
+
useStatus: () => {
|
|
11
|
+
status?: "" | "success" | "error" | "warning" | "validating";
|
|
12
|
+
errors: ReactNode[];
|
|
13
|
+
warnings: ReactNode[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default FormItem;
|
|
@@ -11,7 +11,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
11
11
|
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; }
|
|
12
12
|
import { Form as AntForm } from 'antd';
|
|
13
13
|
import React from 'react';
|
|
14
|
-
import { getTooltipTypeList } from "../
|
|
14
|
+
import { getTooltipTypeList } from "../tooltip";
|
|
15
15
|
var AntFormItem = AntForm.Item;
|
|
16
16
|
var Item = function Item(_ref) {
|
|
17
17
|
var children = _ref.children,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/form/interface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/form/interface';
|
package/es/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import 'antd/dist/reset.css';
|
|
2
|
+
export * from 'antd';
|
|
3
|
+
export { version } from '../package.json';
|
|
4
|
+
export { default as Alert } from './alert';
|
|
5
|
+
export { default as Button } from './button';
|
|
6
|
+
export { default as Card } from './card';
|
|
7
|
+
export { default as ConfigProvider } from './config-provider';
|
|
8
|
+
export { default as Descriptions } from './descriptions';
|
|
9
|
+
export { default as Form } from './form';
|
|
10
|
+
export { default as Modal } from './modal';
|
|
11
|
+
export { message, notification, token } from './static-function';
|
|
12
|
+
export { default as Table } from './table';
|
|
13
|
+
export { default as Tabs } from './tabs';
|
|
14
|
+
export { default as theme } from './theme';
|
|
15
|
+
export { default as Tooltip } from './tooltip';
|
|
16
|
+
declare const useToken: () => {
|
|
17
|
+
theme: import("@ant-design/cssinjs").Theme<import("antd/es/theme/internal").SeedToken, import("antd/es/theme/interface").MapToken>;
|
|
18
|
+
token: import("antd").GlobalToken;
|
|
19
|
+
hashId: string;
|
|
20
|
+
};
|
|
21
|
+
export { useToken };
|
package/es/index.js
CHANGED
|
@@ -3,23 +3,20 @@ import { theme } from 'antd';
|
|
|
3
3
|
// 引入 antd/dist/reset.css,以重置基本样式,保证原生元素遵从 antd 规范样式
|
|
4
4
|
// ref: https://ant-design.antgroup.com/docs/react/migration-v5-cn#%E6%8A%80%E6%9C%AF%E8%B0%83%E6%95%B4
|
|
5
5
|
import 'antd/dist/reset.css';
|
|
6
|
-
|
|
7
|
-
// 基础组件
|
|
8
|
-
// 业务组件
|
|
9
6
|
export * from 'antd';
|
|
10
7
|
export { version } from "../package.json";
|
|
11
|
-
export { default as Alert } from "./
|
|
12
|
-
export { default as Button } from "./
|
|
13
|
-
export { default as Card } from "./
|
|
14
|
-
export { default as ConfigProvider } from "./
|
|
15
|
-
export { default as Descriptions } from "./
|
|
16
|
-
export { default as Form } from "./
|
|
17
|
-
export { default as Modal } from "./
|
|
18
|
-
export { message, notification, token } from "./
|
|
19
|
-
export { default as Table } from "./
|
|
20
|
-
export { default as Tabs } from "./
|
|
8
|
+
export { default as Alert } from "./alert";
|
|
9
|
+
export { default as Button } from "./button";
|
|
10
|
+
export { default as Card } from "./card";
|
|
11
|
+
export { default as ConfigProvider } from "./config-provider";
|
|
12
|
+
export { default as Descriptions } from "./descriptions";
|
|
13
|
+
export { default as Form } from "./form";
|
|
14
|
+
export { default as Modal } from "./modal";
|
|
15
|
+
export { message, notification, token } from "./static-function";
|
|
16
|
+
export { default as Table } from "./table";
|
|
17
|
+
export { default as Tabs } from "./tabs";
|
|
21
18
|
export { default as theme } from "./theme";
|
|
22
|
-
export { default as Tooltip } from "./
|
|
19
|
+
export { default as Tooltip } from "./tooltip";
|
|
23
20
|
var useToken = theme.useToken;
|
|
24
21
|
|
|
25
22
|
// 直接导出 useToken,方便上层使用
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/message/interface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/message/interface';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ModalProps as AntModalProps } from 'antd/es/modal';
|
|
2
|
+
export * from 'antd/es/modal';
|
|
3
|
+
export declare type ModalProps = AntModalProps;
|
|
4
|
+
declare const Modal: {
|
|
5
|
+
({ prefixCls: customizePrefixCls, className, ...restProps }: ModalProps): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
6
|
+
info(props: any): {
|
|
7
|
+
destroy: () => void;
|
|
8
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
9
|
+
};
|
|
10
|
+
success(props: any): {
|
|
11
|
+
destroy: () => void;
|
|
12
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
13
|
+
};
|
|
14
|
+
error(props: any): {
|
|
15
|
+
destroy: () => void;
|
|
16
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
17
|
+
};
|
|
18
|
+
warning(props: any): {
|
|
19
|
+
destroy: () => void;
|
|
20
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
21
|
+
};
|
|
22
|
+
confirm(props: any): {
|
|
23
|
+
destroy: () => void;
|
|
24
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
25
|
+
};
|
|
26
|
+
useModal: typeof import("antd/es/modal/useModal").default;
|
|
27
|
+
destroyAll: () => void;
|
|
28
|
+
config: typeof import("antd/es/modal/confirm").modalGlobalConfig;
|
|
29
|
+
displayName: string;
|
|
30
|
+
};
|
|
31
|
+
export default Modal;
|
|
@@ -2,11 +2,13 @@ var _excluded = ["prefixCls", "className"];
|
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
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; }
|
|
4
4
|
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
|
-
import {
|
|
5
|
+
import { Modal as AntModal } from 'antd';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
7
|
import { useContext } from 'react';
|
|
8
|
-
import
|
|
8
|
+
import ConfigProvider from "../config-provider";
|
|
9
|
+
import { modal } from "../static-function";
|
|
9
10
|
import useStyle from "./style";
|
|
11
|
+
export * from 'antd/es/modal';
|
|
10
12
|
var Modal = function Modal(_ref) {
|
|
11
13
|
var customizePrefixCls = _ref.prefixCls,
|
|
12
14
|
className = _ref.className,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/modal/interface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/modal/interface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/notification/interface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/notification/interface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/qrcode/interface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/qrcode/interface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/radio/interface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/radio/interface';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MessageInstance } from 'antd/es/message/interface';
|
|
2
|
+
import type { ModalStaticFunctions } from 'antd/es/modal/confirm';
|
|
3
|
+
import type { NotificationInstance } from 'antd/es/notification/interface';
|
|
4
|
+
declare let token: import("antd/lib/theme/internal").AliasToken;
|
|
5
|
+
declare let message: MessageInstance;
|
|
6
|
+
declare let notification: NotificationInstance;
|
|
7
|
+
declare let modal: Omit<ModalStaticFunctions, 'warn'>;
|
|
8
|
+
declare const _default: () => any;
|
|
9
|
+
export default _default;
|
|
10
|
+
export { token, message, notification, modal };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/statistic/interface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/statistic/interface';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { TableProps as AntTableProps } from 'antd';
|
|
2
|
+
import type { ColumnsType } from 'antd/es/table';
|
|
3
|
+
import type { TableLocale as AntTableLocale } from 'antd/es/table/interface';
|
|
4
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export * from 'antd/es/table';
|
|
7
|
+
export interface TableLocale extends AntTableLocale {
|
|
8
|
+
batchOperationBar?: {
|
|
9
|
+
selected?: string;
|
|
10
|
+
object?: string;
|
|
11
|
+
cancel?: string;
|
|
12
|
+
collapse?: string;
|
|
13
|
+
open?: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export interface TableProps<T> extends AntTableProps<T> {
|
|
17
|
+
columns?: ColumnsType<T>;
|
|
18
|
+
hiddenCancelBtn?: boolean;
|
|
19
|
+
toolOptionsRender?: (selectedRowKeys: any, selectedRows: any) => ReactNode[];
|
|
20
|
+
toolAlertRender?: false | ((selectedRowKeys: any, selectedRows: any) => ReactNode);
|
|
21
|
+
toolSelectedContent?: (selectedRowKeys: any, selectedRows: any) => ReactNode;
|
|
22
|
+
locale?: TableLocale;
|
|
23
|
+
}
|
|
24
|
+
declare function Table<T>(props: TableProps<T>): ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
25
|
+
declare namespace Table {
|
|
26
|
+
var SELECTION_COLUMN: {};
|
|
27
|
+
var EXPAND_COLUMN: any;
|
|
28
|
+
var SELECTION_ALL: "SELECT_ALL";
|
|
29
|
+
var SELECTION_INVERT: "SELECT_INVERT";
|
|
30
|
+
var SELECTION_NONE: "SELECT_NONE";
|
|
31
|
+
var Column: typeof import("antd/es/table/Column").default;
|
|
32
|
+
var ColumnGroup: typeof import("antd/es/table/ColumnGroup").default;
|
|
33
|
+
var Summary: any;
|
|
34
|
+
}
|
|
35
|
+
export default Table;
|
|
@@ -11,13 +11,15 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
11
11
|
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; }
|
|
12
12
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
13
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
|
-
import {
|
|
14
|
+
import { Popover, Space, Table as AntTable, Typography } from 'antd';
|
|
15
15
|
import { useLocale } from 'antd/es/locale';
|
|
16
16
|
import classNames from 'classnames';
|
|
17
17
|
import { isEmpty } from 'lodash';
|
|
18
18
|
import React, { useContext, useEffect, useState } from 'react';
|
|
19
|
+
import ConfigProvider from "../config-provider";
|
|
19
20
|
import enUS from "../locale/en-US";
|
|
20
21
|
import useStyle from "./style";
|
|
22
|
+
export * from 'antd/es/table';
|
|
21
23
|
function Table(props) {
|
|
22
24
|
var customLocale = props.locale,
|
|
23
25
|
columns = props.columns,
|
|
@@ -141,4 +143,12 @@ function Table(props) {
|
|
|
141
143
|
})
|
|
142
144
|
})));
|
|
143
145
|
}
|
|
146
|
+
Table.SELECTION_COLUMN = AntTable.SELECTION_COLUMN;
|
|
147
|
+
Table.EXPAND_COLUMN = AntTable.EXPAND_COLUMN;
|
|
148
|
+
Table.SELECTION_ALL = AntTable.SELECTION_ALL;
|
|
149
|
+
Table.SELECTION_INVERT = AntTable.SELECTION_INVERT;
|
|
150
|
+
Table.SELECTION_NONE = AntTable.SELECTION_NONE;
|
|
151
|
+
Table.Column = AntTable.Column;
|
|
152
|
+
Table.ColumnGroup = AntTable.ColumnGroup;
|
|
153
|
+
Table.Summary = AntTable.Summary;
|
|
144
154
|
export default Table;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/table/interface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from 'antd/es/table/interface';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { TabsPosition as AntTabsPosition, TabsProps as AntTabsProps } from 'antd/es/tabs';
|
|
2
|
+
import type { Tab as AntTab } from 'rc-tabs/es/interface';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export * from 'antd/es/tabs';
|
|
5
|
+
export type { TabPaneProps } from './TabPane';
|
|
6
|
+
export interface Tab extends AntTab {
|
|
7
|
+
tag?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface TabsProps extends AntTabsProps {
|
|
10
|
+
items?: Tab[];
|
|
11
|
+
}
|
|
12
|
+
export declare type TabsPosition = AntTabsPosition;
|
|
13
|
+
declare const Tabs: {
|
|
14
|
+
({ children, items, defaultActiveKey, activeKey: activeKeyProp, onChange, size, type, tabPosition, prefixCls: customizePrefixCls, className, ...restProps }: TabsProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
15
|
+
TabPane: React.FC<TabPaneProps>;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
export default Tabs;
|
|
@@ -15,13 +15,15 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
15
15
|
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; }
|
|
16
16
|
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; }
|
|
17
17
|
import { isNullValue } from '@oceanbase/util';
|
|
18
|
-
import {
|
|
18
|
+
import { Space, Tabs as AntTabs, Tag } from 'antd';
|
|
19
19
|
import classNames from 'classnames';
|
|
20
20
|
import React, { useContext, useRef, useState } from 'react';
|
|
21
|
+
import ConfigProvider from "../config-provider";
|
|
21
22
|
import useInkBar from "./hooks/useInkBar";
|
|
22
23
|
import useLegacyItems from "./hooks/useLegacyItems";
|
|
23
24
|
import useStyle from "./style";
|
|
24
25
|
import TabPane from "./TabPane";
|
|
26
|
+
export * from 'antd/es/tabs';
|
|
25
27
|
var Tabs = function Tabs(_ref) {
|
|
26
28
|
var _newItems;
|
|
27
29
|
var children = _ref.children,
|
|
@@ -35,7 +37,7 @@ var Tabs = function Tabs(_ref) {
|
|
|
35
37
|
customizePrefixCls = _ref.prefixCls,
|
|
36
38
|
className = _ref.className,
|
|
37
39
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
38
|
-
var _useContext = useContext(
|
|
40
|
+
var _useContext = useContext(ConfigProvider.ConfigContext),
|
|
39
41
|
getPrefixCls = _useContext.getPrefixCls;
|
|
40
42
|
var prefixCls = getPrefixCls('tabs', customizePrefixCls);
|
|
41
43
|
var _useStyle = useStyle(prefixCls),
|