@pisell/common 0.0.5 → 0.0.7
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/es/components/Iconfont/index.d.ts +1 -1
- package/es/components/avatar/index.d.ts +13 -0
- package/es/components/avatar/index.js +25 -0
- package/es/components/button/index.d.ts +17 -3
- package/es/components/button/index.js +28 -4
- package/es/components/checkbox/index.d.ts +20 -0
- package/es/components/checkbox/index.js +43 -0
- package/es/components/configProvider/index.d.ts +109 -0
- package/es/components/configProvider/index.js +111 -0
- package/es/components/index.d.ts +17 -0
- package/es/components/index.js +8 -1
- package/es/components/input/index.d.ts +35 -0
- package/es/components/input/index.js +97 -0
- package/es/components/pagination/index.d.ts +10 -0
- package/es/components/pagination/index.js +18 -0
- package/es/components/radio/index.d.ts +13 -0
- package/es/components/radio/index.js +28 -0
- package/es/components/switch/index.d.ts +10 -0
- package/es/components/switch/index.js +18 -0
- package/es/index.d.ts +0 -2
- package/es/index.js +1 -3
- package/lib/components/Iconfont/index.d.ts +1 -1
- package/lib/components/avatar/index.d.ts +13 -0
- package/lib/components/avatar/index.js +42 -0
- package/lib/components/button/index.d.ts +17 -3
- package/lib/components/button/index.js +7 -2
- package/lib/components/checkbox/index.d.ts +20 -0
- package/lib/components/checkbox/index.js +36 -0
- package/lib/components/configProvider/index.d.ts +109 -0
- package/lib/components/configProvider/index.js +140 -0
- package/lib/components/index.d.ts +17 -0
- package/lib/components/index.js +22 -2
- package/lib/components/input/index.d.ts +35 -0
- package/lib/components/input/index.js +53 -0
- package/lib/components/pagination/index.d.ts +10 -0
- package/lib/components/pagination/index.js +42 -0
- package/lib/components/radio/index.d.ts +13 -0
- package/lib/components/radio/index.js +36 -0
- package/lib/components/switch/index.d.ts +10 -0
- package/lib/components/switch/index.js +42 -0
- package/lib/index.d.ts +0 -2
- package/lib/index.js +0 -12
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
interface IconFontProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
2
|
+
export interface IconFontProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
3
3
|
type: string;
|
|
4
4
|
}
|
|
5
5
|
declare const IconFont: React.FC<IconFontProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AvatarProps as AntAvatarProps } from 'antd5';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* 后续可添加属性
|
|
5
|
+
*/
|
|
6
|
+
export declare type AvatarProps = AntAvatarProps;
|
|
7
|
+
/**
|
|
8
|
+
* 头像
|
|
9
|
+
* @param props
|
|
10
|
+
* @constructor
|
|
11
|
+
*/
|
|
12
|
+
declare const Avatar: React.FC<AvatarProps>;
|
|
13
|
+
export default Avatar;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
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
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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 { Avatar as AntAvatar } from 'antd5';
|
|
8
|
+
import React from 'react';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 后续可添加属性
|
|
12
|
+
*/
|
|
13
|
+
// export interface AvatarProps extends AntAvatarProps {
|
|
14
|
+
// [key: string]: any
|
|
15
|
+
// }
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
/**
|
|
18
|
+
* 头像
|
|
19
|
+
* @param props
|
|
20
|
+
* @constructor
|
|
21
|
+
*/
|
|
22
|
+
var Avatar = function Avatar(props) {
|
|
23
|
+
return /*#__PURE__*/_jsx(AntAvatar, _objectSpread({}, props));
|
|
24
|
+
};
|
|
25
|
+
export default Avatar;
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
-
import type { ButtonProps } from 'antd5';
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { ButtonProps as AntButtonProps } from 'antd5';
|
|
2
|
+
import type { ButtonGroupProps as AntButtonGroupProps } from 'antd5/es/button';
|
|
3
|
+
/**
|
|
4
|
+
* 后续可添加属性
|
|
5
|
+
*/
|
|
6
|
+
export declare type ButtonProps = AntButtonProps;
|
|
7
|
+
export declare type ButtonGroupProps = AntButtonGroupProps;
|
|
8
|
+
/**
|
|
9
|
+
* 按钮组件
|
|
10
|
+
* @param props
|
|
11
|
+
* @constructor
|
|
12
|
+
*/
|
|
13
|
+
declare const Button: {
|
|
14
|
+
(props: ButtonProps): JSX.Element;
|
|
15
|
+
Group: (props: ButtonGroupProps) => JSX.Element;
|
|
16
|
+
};
|
|
17
|
+
export default Button;
|
|
@@ -4,9 +4,33 @@ 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 { Button } from 'antd5';
|
|
7
|
+
import { Button as AntButton } from 'antd5';
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
var
|
|
10
|
-
|
|
9
|
+
var AntGroup = AntButton.Group;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 后续可添加属性
|
|
13
|
+
*/
|
|
14
|
+
// export interface ButtonProps extends AntButtonProps {
|
|
15
|
+
// [key: string]: any
|
|
16
|
+
// }
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* 按钮组件
|
|
20
|
+
* @param props
|
|
21
|
+
* @constructor
|
|
22
|
+
*/
|
|
23
|
+
var Button = function Button(props) {
|
|
24
|
+
return /*#__PURE__*/_jsx(AntButton, _objectSpread({}, props));
|
|
11
25
|
};
|
|
12
|
-
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 按钮组
|
|
29
|
+
* @param props
|
|
30
|
+
* @constructor
|
|
31
|
+
*/
|
|
32
|
+
var Group = function Group(props) {
|
|
33
|
+
return /*#__PURE__*/_jsx(AntGroup, _objectSpread({}, props));
|
|
34
|
+
};
|
|
35
|
+
Button.Group = Group;
|
|
36
|
+
export default Button;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CheckboxGroupProps as AntCheckboxGroupProps } from 'antd/es/checkbox';
|
|
2
|
+
import type { CheckboxProps as AntCheckboxProps } from 'antd5';
|
|
3
|
+
/**
|
|
4
|
+
* 后续可添加属性
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* 后续可添加属性
|
|
8
|
+
*/
|
|
9
|
+
export declare type CheckboxProps = AntCheckboxProps;
|
|
10
|
+
export declare type CheckboxGroupProps = AntCheckboxGroupProps;
|
|
11
|
+
/**
|
|
12
|
+
* 多选框
|
|
13
|
+
* @param props
|
|
14
|
+
* @constructor
|
|
15
|
+
*/
|
|
16
|
+
declare const Checkbox: {
|
|
17
|
+
(props: CheckboxProps): JSX.Element;
|
|
18
|
+
Group: (props: CheckboxGroupProps) => JSX.Element;
|
|
19
|
+
};
|
|
20
|
+
export default Checkbox;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
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
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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 { Checkbox as AntCheckbox } from 'antd5';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
var AntGroup = AntCheckbox.Group;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 后续可添加属性
|
|
13
|
+
*/
|
|
14
|
+
// export interface CheckboxProps extends AntCheckboxProps {
|
|
15
|
+
// [key: string]: any
|
|
16
|
+
// }
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* 后续可添加属性
|
|
20
|
+
*/
|
|
21
|
+
// export interface CheckboxGroupProps extends AntCheckboxGroupProps {
|
|
22
|
+
// [key: string]: any
|
|
23
|
+
// }
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 多选框
|
|
27
|
+
* @param props
|
|
28
|
+
* @constructor
|
|
29
|
+
*/
|
|
30
|
+
var Checkbox = function Checkbox(props) {
|
|
31
|
+
return /*#__PURE__*/_jsx(AntCheckbox, _objectSpread({}, props));
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* 多选框组
|
|
36
|
+
* @param props
|
|
37
|
+
* @constructor
|
|
38
|
+
*/
|
|
39
|
+
var Group = function Group(props) {
|
|
40
|
+
return /*#__PURE__*/_jsx(AntGroup, _objectSpread({}, props));
|
|
41
|
+
};
|
|
42
|
+
Checkbox.Group = Group;
|
|
43
|
+
export default Checkbox;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { ConfigProvider } from 'antd5';
|
|
2
|
+
declare const cssVariableMap: {
|
|
3
|
+
/** 白色 - White */
|
|
4
|
+
'--color-white': string;
|
|
5
|
+
/** 灰色 - Grey */
|
|
6
|
+
'--color-grey-10': string;
|
|
7
|
+
'--color-grey-20': string;
|
|
8
|
+
'--color-grey-30': string;
|
|
9
|
+
'--color-grey-40': string;
|
|
10
|
+
'--color-grey-50': string;
|
|
11
|
+
'--color-grey-60': string;
|
|
12
|
+
'--color-grey-70': string;
|
|
13
|
+
'--color-grey-80': string;
|
|
14
|
+
'--color-grey-90': string;
|
|
15
|
+
'--color-grey-95': string;
|
|
16
|
+
'--color-grey-98': string;
|
|
17
|
+
'--color-grey-99': string;
|
|
18
|
+
/** 主题色 - Primary */
|
|
19
|
+
'--color-primary-primary': string;
|
|
20
|
+
/** -------------------文本与图标颜色 - Text-------------------------------- */
|
|
21
|
+
'--color-text-1': string;
|
|
22
|
+
'--color-text-2': string;
|
|
23
|
+
'--color-text-3': string;
|
|
24
|
+
'--color-text-4': string;
|
|
25
|
+
/** -------------------徽标色 - Badge 四种功能用色-------------------------------- */
|
|
26
|
+
/** 红色 */
|
|
27
|
+
'--color-badge-red': string;
|
|
28
|
+
/** 红色容器背景色 */
|
|
29
|
+
'--color-badge-red-container': string;
|
|
30
|
+
/** 橙色 */
|
|
31
|
+
'--color-badge-orange': string;
|
|
32
|
+
/** 橙色容器背景色 */
|
|
33
|
+
'--color-badge-orange-container': string;
|
|
34
|
+
/** 橙色文字颜色 */
|
|
35
|
+
'--color-badge-orange-text': string;
|
|
36
|
+
/** 绿色 */
|
|
37
|
+
'--color-badge-green': string;
|
|
38
|
+
/** 绿色容器背景色 */
|
|
39
|
+
'--color-badge-green-container': string;
|
|
40
|
+
/** 蓝色 */
|
|
41
|
+
'--color-badge-blue': string;
|
|
42
|
+
/** 蓝色容器背景色 */
|
|
43
|
+
'--color-badge-blue-container': string;
|
|
44
|
+
/** 紫色 */
|
|
45
|
+
'--color-badge-purple': string;
|
|
46
|
+
/** 紫色容器背景色 */
|
|
47
|
+
'--color-badge-purple-container': string;
|
|
48
|
+
/** 灰色 */
|
|
49
|
+
'--color-badge-grey': string;
|
|
50
|
+
/** 灰色容器背景色 */
|
|
51
|
+
'--color-badge-grey-container': string;
|
|
52
|
+
/** 黄色 */
|
|
53
|
+
'--color-badge-yellow': string;
|
|
54
|
+
/** 黄色容器背景色 */
|
|
55
|
+
'--color-badge-yellow-container': string;
|
|
56
|
+
/** 黄色文字颜色 */
|
|
57
|
+
'--color-badge-yellow-text': string;
|
|
58
|
+
/** -------------------功能色 - Functional Color-------------------------------- */
|
|
59
|
+
/** 错误色 */
|
|
60
|
+
'--color-functional-error': string;
|
|
61
|
+
/** 错误容器背景色 */
|
|
62
|
+
'--color-functional-error-container': string;
|
|
63
|
+
/** 警告色 */
|
|
64
|
+
'--color-functional-warning': string;
|
|
65
|
+
/** 警告容器背景色 */
|
|
66
|
+
'--color-functional-warning-container': string;
|
|
67
|
+
/** 成功色 */
|
|
68
|
+
'--color-functional-success': string;
|
|
69
|
+
/** 成功容器背景色 */
|
|
70
|
+
'--color-functional-success-container': string;
|
|
71
|
+
/** 信息色 */
|
|
72
|
+
'--color-functional-info': string;
|
|
73
|
+
/** 信息容器背景色 */
|
|
74
|
+
'--color-functional-info-container': string;
|
|
75
|
+
/** -------------------背景色 - Background------------------- */
|
|
76
|
+
/** APP大背景 */
|
|
77
|
+
'--color-bg-app': string;
|
|
78
|
+
/** web端大背景、表格表头背景 */
|
|
79
|
+
'--color-bg-web': string;
|
|
80
|
+
/** 鼠标悬停背景 */
|
|
81
|
+
'--color-bg-hover': string;
|
|
82
|
+
/** 鼠标按下背景 */
|
|
83
|
+
'--color-bg-pressing': string;
|
|
84
|
+
/** button禁用背景、输入框叉号默认 */
|
|
85
|
+
'--color-bg-button-disabled': string;
|
|
86
|
+
/** -------------------表面色 - Surface------------------- */
|
|
87
|
+
/** 多选框默认、单选框默认、警告提示叉号 */
|
|
88
|
+
'--color-surface-1': string;
|
|
89
|
+
/** 面包屑分隔符、开关_关闭 */
|
|
90
|
+
'--color-surface-2': string;
|
|
91
|
+
/** 输入框边框、输入框提示icon、开关禁用 */
|
|
92
|
+
'--color-surface-3': string;
|
|
93
|
+
/** 边框颜色、分页器边框、次要button禁用边框、多选框禁用、单选框禁用、下拉框边框、输入框禁用边框、输入框禁用icon、弹窗边框 */
|
|
94
|
+
'--color-surface-4': string;
|
|
95
|
+
/** 分割线颜色、弹窗分割线 */
|
|
96
|
+
'--color-surface-5': string;
|
|
97
|
+
};
|
|
98
|
+
declare const defaultTheme: {
|
|
99
|
+
token: {
|
|
100
|
+
colorPrimary: string;
|
|
101
|
+
colorSuccess: string;
|
|
102
|
+
borderRadius: number;
|
|
103
|
+
colorWarning: string;
|
|
104
|
+
colorError: string;
|
|
105
|
+
colorInfo: string;
|
|
106
|
+
colorTextBase: string;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
export { ConfigProvider, defaultTheme, cssVariableMap };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { ConfigProvider } from 'antd5';
|
|
2
|
+
|
|
3
|
+
// css变量
|
|
4
|
+
var cssVariableMap = {
|
|
5
|
+
/** 白色 - White */
|
|
6
|
+
'--color-white': '#FFFFFF',
|
|
7
|
+
/** 灰色 - Grey */
|
|
8
|
+
'--color-grey-10': '#1b1b1b',
|
|
9
|
+
'--color-grey-20': '#303030',
|
|
10
|
+
'--color-grey-30': '#474747',
|
|
11
|
+
'--color-grey-40': '#5e5e5e',
|
|
12
|
+
'--color-grey-50': '#777777',
|
|
13
|
+
'--color-grey-60': '#919191',
|
|
14
|
+
'--color-grey-70': '#ababab',
|
|
15
|
+
'--color-grey-80': '#c6c6c6',
|
|
16
|
+
'--color-grey-90': '#e2e2e2',
|
|
17
|
+
'--color-grey-95': '#f1f1f1',
|
|
18
|
+
'--color-grey-98': '#fafafa',
|
|
19
|
+
'--color-grey-99': '#fcfcfc',
|
|
20
|
+
/** 主题色 - Primary */
|
|
21
|
+
'--color-primary-primary': '#705DFF',
|
|
22
|
+
/** -------------------文本与图标颜色 - Text-------------------------------- */
|
|
23
|
+
'--color-text-1': 'var(--color-grey-10)',
|
|
24
|
+
'--color-text-2': 'var(--color-grey-50)',
|
|
25
|
+
'--color-text-3': 'var(--color-grey-60)',
|
|
26
|
+
'--color-text-4': 'var(--color-grey-70)',
|
|
27
|
+
/** -------------------徽标色 - Badge 四种功能用色-------------------------------- */
|
|
28
|
+
/** 红色 */
|
|
29
|
+
'--color-badge-red': '#DC3545',
|
|
30
|
+
/** 红色容器背景色 */
|
|
31
|
+
'--color-badge-red-container': '#FFDDE0',
|
|
32
|
+
/** 橙色 */
|
|
33
|
+
'--color-badge-orange': '#FD7E14',
|
|
34
|
+
/** 橙色容器背景色 */
|
|
35
|
+
'--color-badge-orange-container': '#FFE5D0',
|
|
36
|
+
/** 橙色文字颜色 */
|
|
37
|
+
'--color-badge-orange-text': '#CA6510',
|
|
38
|
+
/** 绿色 */
|
|
39
|
+
'--color-badge-green': '#1B945C',
|
|
40
|
+
/** 绿色容器背景色 */
|
|
41
|
+
'--color-badge-green-container': '#D7EDE3',
|
|
42
|
+
/** 蓝色 */
|
|
43
|
+
'--color-badge-blue': '#0B5FDB',
|
|
44
|
+
/** 蓝色容器背景色 */
|
|
45
|
+
'--color-badge-blue-container': '#D1E3FF',
|
|
46
|
+
/** 紫色 */
|
|
47
|
+
'--color-badge-purple': '#610FE5',
|
|
48
|
+
/** 紫色容器背景色 */
|
|
49
|
+
'--color-badge-purple-container': '#E9DBFF',
|
|
50
|
+
/** 灰色 */
|
|
51
|
+
'--color-badge-grey': 'var(--color-grey-50)',
|
|
52
|
+
/** 灰色容器背景色 */
|
|
53
|
+
'--color-badge-grey-container': 'var(--color-grey-90)',
|
|
54
|
+
/** 黄色 */
|
|
55
|
+
'--color-badge-yellow': '#F5B800',
|
|
56
|
+
/** 黄色容器背景色 */
|
|
57
|
+
'--color-badge-yellow-container': '#FFF3CD',
|
|
58
|
+
/** 黄色文字颜色 */
|
|
59
|
+
'--color-badge-yellow-text': '#CC9A06',
|
|
60
|
+
/** -------------------功能色 - Functional Color-------------------------------- */
|
|
61
|
+
/** 错误色 */
|
|
62
|
+
'--color-functional-error': 'var(--color-badge-red)',
|
|
63
|
+
/** 错误容器背景色 */
|
|
64
|
+
'--color-functional-error-container': 'var(--color-badge-red-container)',
|
|
65
|
+
/** 警告色 */
|
|
66
|
+
'--color-functional-warning': 'var(--color-badge-orange)',
|
|
67
|
+
/** 警告容器背景色 */
|
|
68
|
+
'--color-functional-warning-container': 'var(--color-badge-orange-container)',
|
|
69
|
+
/** 成功色 */
|
|
70
|
+
'--color-functional-success': 'var(--color-badge-green)',
|
|
71
|
+
/** 成功容器背景色 */
|
|
72
|
+
'--color-functional-success-container': 'var(--color-badge-green-container)',
|
|
73
|
+
/** 信息色 */
|
|
74
|
+
'--color-functional-info': 'var(--color-badge-blue)',
|
|
75
|
+
/** 信息容器背景色 */
|
|
76
|
+
'--color-functional-info-container': 'var(--color-badge-blue-container)',
|
|
77
|
+
/** -------------------背景色 - Background------------------- */
|
|
78
|
+
/** APP大背景 */
|
|
79
|
+
'--color-bg-app': 'var(--color-grey-95)',
|
|
80
|
+
/** web端大背景、表格表头背景 */
|
|
81
|
+
'--color-bg-web': 'var(--color-grey-98)',
|
|
82
|
+
/** 鼠标悬停背景 */
|
|
83
|
+
'--color-bg-hover': 'var(--color-grey-95)',
|
|
84
|
+
/** 鼠标按下背景 */
|
|
85
|
+
'--color-bg-pressing': 'var(--color-grey-90)',
|
|
86
|
+
/** button禁用背景、输入框叉号默认 */
|
|
87
|
+
'--color-bg-button-disabled': 'var(--color-grey-80)',
|
|
88
|
+
/** -------------------表面色 - Surface------------------- */
|
|
89
|
+
/** 多选框默认、单选框默认、警告提示叉号 */
|
|
90
|
+
'--color-surface-1': 'var(--color-grey-60)',
|
|
91
|
+
/** 面包屑分隔符、开关_关闭 */
|
|
92
|
+
'--color-surface-2': 'var(--color-grey-70)',
|
|
93
|
+
/** 输入框边框、输入框提示icon、开关禁用 */
|
|
94
|
+
'--color-surface-3': 'var(--color-grey-80)',
|
|
95
|
+
/** 边框颜色、分页器边框、次要button禁用边框、多选框禁用、单选框禁用、下拉框边框、输入框禁用边框、输入框禁用icon、弹窗边框 */
|
|
96
|
+
'--color-surface-4': 'var(--color-grey-90)',
|
|
97
|
+
/** 分割线颜色、弹窗分割线 */
|
|
98
|
+
'--color-surface-5': 'var(--color-grey-95)'
|
|
99
|
+
};
|
|
100
|
+
var defaultTheme = {
|
|
101
|
+
token: {
|
|
102
|
+
colorPrimary: '#705dff',
|
|
103
|
+
colorSuccess: '#1b945c',
|
|
104
|
+
borderRadius: 8,
|
|
105
|
+
colorWarning: '#fd7e14',
|
|
106
|
+
colorError: '#dc3545',
|
|
107
|
+
colorInfo: '#0b5fdb',
|
|
108
|
+
colorTextBase: '#1b1b1b'
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
export { ConfigProvider, defaultTheme, cssVariableMap };
|
package/es/components/index.d.ts
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
|
+
export { default as Avatar } from './avatar';
|
|
2
|
+
export type { AvatarProps } from './avatar';
|
|
1
3
|
export { default as Button } from './button';
|
|
4
|
+
export type { ButtonGroupProps, ButtonProps } from './button';
|
|
2
5
|
export { default as Card } from './card';
|
|
6
|
+
export type { CardProps } from './card';
|
|
7
|
+
export { default as Checkbox } from './checkbox';
|
|
8
|
+
export type { CheckboxGroupProps, CheckboxProps } from './checkbox';
|
|
3
9
|
export { default as ColorPicker } from './ColorPicker';
|
|
10
|
+
export type { ColorPickerProps } from './ColorPicker';
|
|
11
|
+
export * from './configProvider';
|
|
4
12
|
export { default as DragSort } from './DragSort';
|
|
5
13
|
export { default as IconFont } from './Iconfont';
|
|
14
|
+
export type { IconFontProps } from './Iconfont';
|
|
15
|
+
export { default as Input } from './input';
|
|
16
|
+
export type { GroupProps, InputProps, PasswordProps, SearchProps, TextAreaProps, } from './input';
|
|
17
|
+
export { default as Pagination } from './pagination';
|
|
18
|
+
export type { PaginationProps } from './pagination';
|
|
19
|
+
export { default as Radio } from './radio';
|
|
20
|
+
export type { RadioGroupProps, RadioProps } from './radio';
|
|
21
|
+
export { default as Switch } from './switch';
|
|
22
|
+
export type { SwitchProps } from './switch';
|
package/es/components/index.js
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
export { default as Avatar } from "./avatar";
|
|
1
2
|
export { default as Button } from "./button";
|
|
2
3
|
export { default as Card } from "./card";
|
|
4
|
+
export { default as Checkbox } from "./checkbox";
|
|
3
5
|
export { default as ColorPicker } from "./ColorPicker";
|
|
6
|
+
export * from "./configProvider";
|
|
4
7
|
export { default as DragSort } from "./DragSort";
|
|
5
|
-
export { default as IconFont } from "./Iconfont";
|
|
8
|
+
export { default as IconFont } from "./Iconfont";
|
|
9
|
+
export { default as Input } from "./input";
|
|
10
|
+
export { default as Pagination } from "./pagination";
|
|
11
|
+
export { default as Radio } from "./radio";
|
|
12
|
+
export { default as Switch } from "./switch";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { InputProps as AntInputProps } from 'antd5';
|
|
2
|
+
import { GroupProps as AntGroupProps, PasswordProps as AntPasswordProps, SearchProps as AntSearchProps, TextAreaProps as AntTextAreaProps } from 'antd5/es/input';
|
|
3
|
+
/**
|
|
4
|
+
* 后续可添加属性
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* 后续可添加属性
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* 后续可添加属性
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* 后续可添加属性
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* 后续可添加属性
|
|
17
|
+
*/
|
|
18
|
+
export declare type InputProps = AntInputProps;
|
|
19
|
+
export declare type TextAreaProps = AntTextAreaProps;
|
|
20
|
+
export declare type SearchProps = AntSearchProps;
|
|
21
|
+
export declare type PasswordProps = AntPasswordProps;
|
|
22
|
+
export declare type GroupProps = AntGroupProps;
|
|
23
|
+
/**
|
|
24
|
+
* input输入框
|
|
25
|
+
* @param props
|
|
26
|
+
* @constructor
|
|
27
|
+
*/
|
|
28
|
+
declare const Input: {
|
|
29
|
+
(props: InputProps): JSX.Element;
|
|
30
|
+
TextArea: (props: TextAreaProps) => JSX.Element;
|
|
31
|
+
Search: (props: SearchProps) => JSX.Element;
|
|
32
|
+
Password: (props: PasswordProps) => JSX.Element;
|
|
33
|
+
Group: (props: GroupProps) => JSX.Element;
|
|
34
|
+
};
|
|
35
|
+
export default Input;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
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
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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 { Input as AntInput } from 'antd5';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
var AntTextArea = AntInput.TextArea,
|
|
10
|
+
AntSearch = AntInput.Search,
|
|
11
|
+
AntPassword = AntInput.Password,
|
|
12
|
+
AntGroup = AntInput.Group;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 后续可添加属性
|
|
16
|
+
*/
|
|
17
|
+
// export interface InputProps extends AntInputProps {
|
|
18
|
+
// [key: string]: any
|
|
19
|
+
// }
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 后续可添加属性
|
|
23
|
+
*/
|
|
24
|
+
// export interface TextAreaProps extends AntTextAreaProps {
|
|
25
|
+
// [key: string]: any
|
|
26
|
+
// }
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* 后续可添加属性
|
|
30
|
+
*/
|
|
31
|
+
// export interface SearchProps extends AntSearchProps {
|
|
32
|
+
// [key: string]: any
|
|
33
|
+
// }
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 后续可添加属性
|
|
37
|
+
*/
|
|
38
|
+
// export interface PasswordProps extends AntPasswordProps {
|
|
39
|
+
// [key: string]: any
|
|
40
|
+
// }
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* 后续可添加属性
|
|
44
|
+
*/
|
|
45
|
+
// export interface GroupProps extends AntGroupProps {
|
|
46
|
+
// [key: string]: any
|
|
47
|
+
// }
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* input输入框
|
|
51
|
+
* @param props
|
|
52
|
+
* @constructor
|
|
53
|
+
*/
|
|
54
|
+
var Input = function Input(props) {
|
|
55
|
+
return /*#__PURE__*/_jsx(AntInput, _objectSpread({}, props));
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* 文本域
|
|
60
|
+
* @param props
|
|
61
|
+
* @constructor
|
|
62
|
+
*/
|
|
63
|
+
var TextArea = function TextArea(props) {
|
|
64
|
+
return /*#__PURE__*/_jsx(AntTextArea, _objectSpread({}, props));
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* 搜索
|
|
69
|
+
* @param props
|
|
70
|
+
* @constructor
|
|
71
|
+
*/
|
|
72
|
+
var Search = function Search(props) {
|
|
73
|
+
return /*#__PURE__*/_jsx(AntSearch, _objectSpread({}, props));
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* 密码输入
|
|
78
|
+
* @param props
|
|
79
|
+
* @constructor
|
|
80
|
+
*/
|
|
81
|
+
var Password = function Password(props) {
|
|
82
|
+
return /*#__PURE__*/_jsx(AntPassword, _objectSpread({}, props));
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* 组
|
|
87
|
+
* @param props
|
|
88
|
+
* @constructor
|
|
89
|
+
*/
|
|
90
|
+
var Group = function Group(props) {
|
|
91
|
+
return /*#__PURE__*/_jsx(AntGroup, _objectSpread({}, props));
|
|
92
|
+
};
|
|
93
|
+
Input.TextArea = TextArea;
|
|
94
|
+
Input.Search = Search;
|
|
95
|
+
Input.Password = Password;
|
|
96
|
+
Input.Group = Group;
|
|
97
|
+
export default Input;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PaginationProps as AntPaginationProps } from 'antd5';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare type PaginationProps = AntPaginationProps;
|
|
4
|
+
/**
|
|
5
|
+
* 分页
|
|
6
|
+
* @param props
|
|
7
|
+
* @constructor
|
|
8
|
+
*/
|
|
9
|
+
declare const Pagination: React.FC<PaginationProps>;
|
|
10
|
+
export default Pagination;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
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
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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 { Pagination as AntPagination } from 'antd5';
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
/**
|
|
11
|
+
* 分页
|
|
12
|
+
* @param props
|
|
13
|
+
* @constructor
|
|
14
|
+
*/
|
|
15
|
+
var Pagination = function Pagination(props) {
|
|
16
|
+
return /*#__PURE__*/_jsx(AntPagination, _objectSpread({}, props));
|
|
17
|
+
};
|
|
18
|
+
export default Pagination;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { RadioGroupProps as AntRadioGroupProps, RadioProps as AntRadioProps } from 'antd5';
|
|
2
|
+
export declare type RadioGroupProps = AntRadioGroupProps;
|
|
3
|
+
export declare type RadioProps = AntRadioProps;
|
|
4
|
+
/**
|
|
5
|
+
* 单选框
|
|
6
|
+
* @param props
|
|
7
|
+
* @constructor
|
|
8
|
+
*/
|
|
9
|
+
declare const Radio: {
|
|
10
|
+
(props: RadioProps): JSX.Element;
|
|
11
|
+
Group: (props: RadioGroupProps) => JSX.Element;
|
|
12
|
+
};
|
|
13
|
+
export default Radio;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
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
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
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 { Radio as AntRadio } from 'antd5';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
var AntGroup = AntRadio.Group;
|
|
10
|
+
/**
|
|
11
|
+
* 单选框
|
|
12
|
+
* @param props
|
|
13
|
+
* @constructor
|
|
14
|
+
*/
|
|
15
|
+
var Radio = function Radio(props) {
|
|
16
|
+
return /*#__PURE__*/_jsx(AntRadio, _objectSpread({}, props));
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 单选框组
|
|
21
|
+
* @param props
|
|
22
|
+
* @constructor
|
|
23
|
+
*/
|
|
24
|
+
var Group = function Group(props) {
|
|
25
|
+
return /*#__PURE__*/_jsx(AntGroup, _objectSpread({}, props));
|
|
26
|
+
};
|
|
27
|
+
Radio.Group = Group;
|
|
28
|
+
export default Radio;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SwitchProps as AntSwitchProps } from 'antd5';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare type SwitchProps = AntSwitchProps;
|
|
4
|
+
/**
|
|
5
|
+
* 开关
|
|
6
|
+
* @param props
|
|
7
|
+
* @constructor
|
|
8
|
+
*/
|
|
9
|
+
declare const Switch: React.FC<SwitchProps>;
|
|
10
|
+
export default Switch;
|