@aloudata/aloudata-design 0.3.1 → 0.3.4
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/README.md +15 -5
- package/es/Breadcrumb/index.d.ts +1 -0
- package/es/Button/index.js +3 -2
- package/es/Button/style/index.less +135 -126
- package/es/Button/style/variables.less +53 -53
- package/es/Card/index.d.ts +3 -0
- package/es/Card/index.js +3 -0
- package/es/Card/style/index.d.ts +2 -0
- package/es/Card/style/index.js +2 -0
- package/es/Card/style/index.less +1 -0
- package/es/Checkbox/index.d.ts +1 -0
- package/es/ConfigProvider/defaultRenderEmpty.d.ts +4 -0
- package/es/ConfigProvider/defaultRenderEmpty.js +37 -0
- package/es/ConfigProvider/sizeContext.d.ts +9 -0
- package/es/ConfigProvider/sizeContext.js +12 -0
- package/es/Dropdown/Button.js +4 -3
- package/es/Empty/image/Authority.d.ts +1 -0
- package/es/Empty/image/Dataspace.d.ts +1 -0
- package/es/Empty/image/Search.d.ts +1 -0
- package/es/Empty/image/Simple.d.ts +1 -0
- package/es/Empty/image/Worksheet.d.ts +1 -0
- package/es/Empty/image/empty.d.ts +1 -0
- package/es/Icon/icons/CheckLine.d.ts +13 -0
- package/es/Icon/icons/CheckLine.js +73 -0
- package/es/Icon/icons.json +410 -0
- package/es/Input/components/Group/index.d.ts +3 -1
- package/es/Input/components/Group/index.js +6 -12
- package/es/Input/components/Input/index.d.ts +3 -2
- package/es/Input/components/Input/index.js +11 -23
- package/es/Input/components/Password/index.js +11 -16
- package/es/Input/components/TextArea/index.d.ts +8 -1
- package/es/Input/components/TextArea/index.js +8 -1
- package/es/Input/style/index.less +180 -102
- package/es/InputNumber/index.d.ts +1 -0
- package/es/InputNumber/style/index.less +69 -69
- package/es/Menu/Divider.d.ts +1 -0
- package/es/Modal/index.js +20 -16
- package/es/Modal/locale.d.ts +7 -0
- package/es/Modal/locale.js +20 -0
- package/es/Modal/style/index.less +48 -45
- package/es/Navigator/components/Header/index.d.ts +1 -0
- package/es/Navigator/components/Menu/index.d.ts +1 -0
- package/es/Navigator/components/MenuItem/index.d.ts +1 -1
- package/es/Navigator/index.d.ts +1 -1
- package/es/PageHeader/index.d.ts +3 -0
- package/es/PageHeader/index.js +3 -0
- package/es/PageHeader/style/index.d.ts +2 -0
- package/es/PageHeader/style/index.js +2 -0
- package/es/PageHeader/style/index.less +1 -0
- package/es/Popover/index.d.ts +1 -0
- package/es/Radio/components/Group/index.d.ts +6 -0
- package/es/Radio/components/Group/index.js +72 -0
- package/es/Radio/components/Radio/index.d.ts +3 -0
- package/es/Radio/components/Radio/index.js +95 -0
- package/es/Radio/index.d.ts +9 -2
- package/es/Radio/index.js +5 -3
- package/es/Radio/interface/radio.d.ts +24 -0
- package/es/Radio/interface/radio.js +1 -0
- package/es/Radio/interface/radioGroup.d.ts +42 -0
- package/es/Radio/interface/radioGroup.js +1 -0
- package/es/Radio/style/index.less +348 -0
- package/es/Select/index.js +1 -1
- package/es/Select/rc-select/OptionList.js +4 -4
- package/es/Select/rc-select/Selector/MultipleSelector.js +11 -1
- package/es/Select/rc-select/hooks/useOptions.d.ts +1 -1
- package/es/Select/style/index.less +70 -45
- package/es/Select/style/variables.less +45 -45
- package/es/Select/utils/iconUtil.d.ts +2 -2
- package/es/Select/utils/iconUtil.js +9 -5
- package/es/Steps/components/ProcessIcon/index.d.ts +6 -0
- package/es/Steps/components/ProcessIcon/index.js +8 -0
- package/es/Steps/components/Step/index.d.ts +20 -0
- package/es/Steps/components/Step/index.js +45 -0
- package/es/Steps/index.d.ts +36 -2
- package/es/Steps/index.js +30 -1
- package/es/Steps/matchMedia.mock.d.ts +1 -0
- package/es/Steps/matchMedia.mock.js +17 -0
- package/es/Steps/style/index.less +251 -0
- package/es/Switch/index.d.ts +46 -2
- package/es/Switch/index.js +71 -1
- package/es/Switch/style/index.less +129 -0
- package/es/Table/Table.d.ts +2 -1
- package/es/Table/Table.js +223 -330
- package/es/Table/components/Empty/index.d.ts +3 -0
- package/es/Table/components/Empty/index.js +17 -0
- package/es/Table/components/Loading/index.d.ts +3 -0
- package/es/Table/components/Loading/index.js +19 -0
- package/es/Table/components/TableBodyRowList/index.d.ts +13 -0
- package/es/Table/components/TableBodyRowList/index.js +89 -0
- package/es/Table/components/TableHead/index.d.ts +23 -0
- package/es/Table/components/TableHead/index.js +262 -0
- package/es/Table/constant.d.ts +1 -0
- package/es/Table/constant.js +1 -0
- package/es/Table/hooks/useFrame.d.ts +7 -0
- package/es/Table/hooks/useFrame.js +90 -0
- package/es/Table/hooks/useTableColumn.d.ts +28 -0
- package/es/Table/hooks/useTableColumn.js +53 -0
- package/es/Table/interface.d.ts +3 -2
- package/es/Table/style/index.less +33 -30
- package/es/Table/utils.d.ts +15 -0
- package/es/Table/utils.js +131 -0
- package/es/Tabs/index.js +7 -9
- package/es/Tabs/style/index.less +57 -25
- package/es/_utils/hooks/useId.d.ts +4 -0
- package/es/_utils/hooks/useId.js +23 -0
- package/es/index.d.ts +9 -5
- package/es/index.js +3 -1
- package/es/locale/default.d.ts +2 -0
- package/es/locale/default.js +2 -0
- package/es/locale/en_US.d.ts +3 -0
- package/es/locale/en_US.js +132 -0
- package/es/locale/zh_CN.d.ts +3 -2
- package/es/locale/zh_CN.js +131 -2
- package/es/locale-provider/LocaleReceiver.d.ts +4 -0
- package/es/locale-provider/LocaleReceiver.js +3 -0
- package/es/locale-provider/context.d.ts +7 -0
- package/es/locale-provider/context.js +3 -0
- package/es/locale-provider/default.d.ts +2 -0
- package/es/locale-provider/default.js +2 -0
- package/es/locale-provider/en_US.d.ts +2 -0
- package/es/locale-provider/en_US.js +2 -0
- package/es/locale-provider/index.d.ts +65 -0
- package/es/locale-provider/index.js +102 -0
- package/es/locale-provider/style/index.d.ts +1 -0
- package/es/locale-provider/style/index.js +1 -0
- package/es/locale-provider/style/index.less +2 -0
- package/es/locale-provider/zh_CN.d.ts +2 -0
- package/es/locale-provider/zh_CN.js +2 -0
- package/es/style/index.d.ts +0 -1
- package/es/style/index.js +0 -1
- package/es/style/index.less +2 -2
- package/es/style/themes/default/index.less +30 -30
- package/lib/Breadcrumb/index.d.ts +1 -0
- package/lib/Button/index.js +5 -3
- package/lib/Button/style/index.less +135 -126
- package/lib/Button/style/variables.less +53 -53
- package/lib/Card/index.d.ts +3 -0
- package/lib/Card/index.js +15 -0
- package/lib/Card/style/index.d.ts +2 -0
- package/lib/Card/style/index.js +5 -0
- package/lib/Card/style/index.less +1 -0
- package/lib/Checkbox/index.d.ts +1 -0
- package/lib/ConfigProvider/defaultRenderEmpty.d.ts +4 -0
- package/lib/ConfigProvider/defaultRenderEmpty.js +55 -0
- package/lib/ConfigProvider/sizeContext.d.ts +9 -0
- package/lib/ConfigProvider/sizeContext.js +30 -0
- package/lib/Dropdown/Button.js +8 -6
- package/lib/Empty/image/Authority.d.ts +1 -0
- package/lib/Empty/image/Dataspace.d.ts +1 -0
- package/lib/Empty/image/Search.d.ts +1 -0
- package/lib/Empty/image/Simple.d.ts +1 -0
- package/lib/Empty/image/Worksheet.d.ts +1 -0
- package/lib/Empty/image/empty.d.ts +1 -0
- package/lib/Icon/icons/CheckLine.d.ts +13 -0
- package/lib/Icon/icons/CheckLine.js +90 -0
- package/lib/Icon/icons.json +410 -0
- package/lib/Input/components/Group/index.d.ts +3 -1
- package/lib/Input/components/Group/index.js +7 -12
- package/lib/Input/components/Input/index.d.ts +3 -2
- package/lib/Input/components/Input/index.js +13 -23
- package/lib/Input/components/Password/index.js +13 -17
- package/lib/Input/components/TextArea/index.d.ts +8 -1
- package/lib/Input/components/TextArea/index.js +10 -1
- package/lib/Input/style/index.less +180 -102
- package/lib/InputNumber/index.d.ts +1 -0
- package/lib/InputNumber/style/index.less +69 -69
- package/lib/Menu/Divider.d.ts +1 -0
- package/lib/Modal/index.js +25 -18
- package/lib/Modal/locale.d.ts +7 -0
- package/lib/Modal/locale.js +31 -0
- package/lib/Modal/style/index.less +48 -45
- package/lib/Navigator/components/Header/index.d.ts +1 -0
- package/lib/Navigator/components/Menu/index.d.ts +1 -0
- package/lib/Navigator/components/MenuItem/index.d.ts +1 -1
- package/lib/Navigator/index.d.ts +1 -1
- package/lib/PageHeader/index.d.ts +3 -0
- package/lib/PageHeader/index.js +15 -0
- package/lib/PageHeader/style/index.d.ts +2 -0
- package/lib/PageHeader/style/index.js +5 -0
- package/lib/PageHeader/style/index.less +1 -0
- package/lib/Popover/index.d.ts +1 -0
- package/lib/Radio/components/Group/index.d.ts +6 -0
- package/lib/Radio/components/Group/index.js +93 -0
- package/lib/Radio/components/Radio/index.d.ts +3 -0
- package/lib/Radio/components/Radio/index.js +115 -0
- package/lib/Radio/index.d.ts +9 -2
- package/lib/Radio/index.js +5 -3
- package/lib/Radio/interface/radio.d.ts +24 -0
- package/lib/Radio/interface/radio.js +5 -0
- package/lib/Radio/interface/radioGroup.d.ts +42 -0
- package/lib/Radio/interface/radioGroup.js +5 -0
- package/lib/Radio/style/index.less +348 -0
- package/lib/Select/index.js +1 -1
- package/lib/Select/rc-select/OptionList.js +8 -7
- package/lib/Select/rc-select/Selector/MultipleSelector.js +11 -1
- package/lib/Select/rc-select/hooks/useOptions.d.ts +1 -1
- package/lib/Select/style/index.less +70 -45
- package/lib/Select/style/variables.less +45 -45
- package/lib/Select/utils/iconUtil.d.ts +2 -2
- package/lib/Select/utils/iconUtil.js +13 -7
- package/lib/Steps/components/ProcessIcon/index.d.ts +6 -0
- package/lib/Steps/components/ProcessIcon/index.js +19 -0
- package/lib/Steps/components/Step/index.d.ts +20 -0
- package/lib/Steps/components/Step/index.js +61 -0
- package/lib/Steps/index.d.ts +36 -2
- package/lib/Steps/index.js +34 -1
- package/lib/Steps/matchMedia.mock.d.ts +1 -0
- package/lib/Steps/matchMedia.mock.js +17 -0
- package/lib/Steps/style/index.less +251 -0
- package/lib/Switch/index.d.ts +46 -2
- package/lib/Switch/index.js +78 -1
- package/lib/Switch/style/index.less +129 -0
- package/lib/Table/Table.d.ts +2 -1
- package/lib/Table/Table.js +228 -332
- package/lib/Table/components/Empty/index.d.ts +3 -0
- package/lib/Table/components/Empty/index.js +30 -0
- package/lib/Table/components/Loading/index.d.ts +3 -0
- package/lib/Table/components/Loading/index.js +33 -0
- package/lib/Table/components/TableBodyRowList/index.d.ts +13 -0
- package/lib/Table/components/TableBodyRowList/index.js +108 -0
- package/lib/Table/components/TableHead/index.d.ts +23 -0
- package/lib/Table/components/TableHead/index.js +286 -0
- package/lib/Table/constant.d.ts +1 -0
- package/lib/Table/constant.js +1 -0
- package/lib/Table/hooks/useFrame.d.ts +7 -0
- package/lib/Table/hooks/useFrame.js +98 -0
- package/lib/Table/hooks/useTableColumn.d.ts +28 -0
- package/lib/Table/hooks/useTableColumn.js +66 -0
- package/lib/Table/interface.d.ts +3 -2
- package/lib/Table/style/index.less +33 -30
- package/lib/Table/utils.d.ts +15 -0
- package/lib/Table/utils.js +147 -0
- package/lib/Tabs/index.js +9 -11
- package/lib/Tabs/style/index.less +57 -25
- package/lib/_utils/hooks/useId.d.ts +4 -0
- package/lib/_utils/hooks/useId.js +36 -0
- package/lib/index.d.ts +9 -5
- package/lib/index.js +16 -0
- package/lib/locale/default.d.ts +2 -0
- package/lib/locale/default.js +13 -0
- package/lib/locale/en_US.d.ts +3 -0
- package/lib/locale/en_US.js +146 -0
- package/lib/locale/zh_CN.d.ts +3 -2
- package/lib/locale/zh_CN.js +134 -2
- package/lib/locale-provider/LocaleReceiver.d.ts +4 -0
- package/lib/locale-provider/LocaleReceiver.js +23 -0
- package/lib/locale-provider/context.d.ts +7 -0
- package/lib/locale-provider/context.js +12 -0
- package/lib/locale-provider/default.d.ts +2 -0
- package/lib/locale-provider/default.js +13 -0
- package/lib/locale-provider/en_US.d.ts +2 -0
- package/lib/locale-provider/en_US.js +13 -0
- package/lib/locale-provider/index.d.ts +65 -0
- package/lib/locale-provider/index.js +116 -0
- package/lib/locale-provider/style/index.d.ts +1 -0
- package/lib/locale-provider/style/index.js +3 -0
- package/lib/locale-provider/style/index.less +2 -0
- package/lib/locale-provider/zh_CN.d.ts +2 -0
- package/lib/locale-provider/zh_CN.js +13 -0
- package/lib/style/index.d.ts +0 -1
- package/lib/style/index.js +0 -2
- package/lib/style/index.less +2 -2
- package/lib/style/themes/default/index.less +30 -30
- package/package.json +11 -8
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { GroupProps } from 'antd/lib/input';
|
|
2
3
|
import { TSize } from '../Input';
|
|
3
4
|
export interface IGroupProps extends Omit<GroupProps, 'size'> {
|
|
@@ -8,9 +9,10 @@ export interface IGroupProps extends Omit<GroupProps, 'size'> {
|
|
|
8
9
|
compact?: boolean;
|
|
9
10
|
/**
|
|
10
11
|
* @description Input.Group 中所有的 Input 的大小,可选 large default small
|
|
11
|
-
* @type 'mini'|'small' | '
|
|
12
|
+
* @type 'mini'|'small' | 'middle' | 'large';
|
|
12
13
|
* @default default
|
|
13
14
|
*/
|
|
14
15
|
size?: TSize;
|
|
16
|
+
className?: string;
|
|
15
17
|
}
|
|
16
18
|
export default function Group(props: IGroupProps): JSX.Element;
|
|
@@ -9,9 +9,11 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _input = _interopRequireDefault(require("antd/lib/input"));
|
|
11
11
|
|
|
12
|
+
var _Input = require("../Input");
|
|
13
|
+
|
|
12
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
15
|
|
|
14
|
-
var _excluded = ["size"];
|
|
16
|
+
var _excluded = ["size", "className"];
|
|
15
17
|
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
@@ -23,19 +25,12 @@ var AntdGroup = _input.default.Group;
|
|
|
23
25
|
|
|
24
26
|
function Group(props) {
|
|
25
27
|
var _props$size = props.size,
|
|
26
|
-
size = _props$size === void 0 ? '
|
|
28
|
+
size = _props$size === void 0 ? 'middle' : _props$size,
|
|
29
|
+
_props$className = props.className,
|
|
30
|
+
className = _props$className === void 0 ? '' : _props$className,
|
|
27
31
|
rest = _objectWithoutProperties(props, _excluded);
|
|
28
32
|
|
|
29
|
-
var getClassName = function getClassName(groupSize) {
|
|
30
|
-
return (0, _classnames.default)('ald-input-group', {
|
|
31
|
-
'ald-input-group-large': groupSize === 'large',
|
|
32
|
-
'ald-input-group-small': groupSize === 'small',
|
|
33
|
-
'ald-input-group-mini': groupSize === 'mini',
|
|
34
|
-
'ald-input-group-middle': !['mini', 'small', 'large'].includes(groupSize)
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
|
|
38
33
|
return /*#__PURE__*/_react.default.createElement(AntdGroup, Object.assign({
|
|
39
|
-
className:
|
|
34
|
+
className: (0, _classnames.default)("ald-input-group-".concat((0, _Input.getSizeType)(size)), className)
|
|
40
35
|
}, rest));
|
|
41
36
|
}
|
|
@@ -7,14 +7,14 @@ interface IShowCountProps {
|
|
|
7
7
|
maxLength?: number;
|
|
8
8
|
}) => string;
|
|
9
9
|
}
|
|
10
|
-
export declare type TSize = '
|
|
10
|
+
export declare type TSize = 'small' | 'middle' | 'large';
|
|
11
11
|
export type { InputRef };
|
|
12
12
|
declare type ChangeEventHandler = (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
13
13
|
export interface IInputProps extends Omit<InputProps, 'size' | 'id' | 'prefix' | 'allowClear' | 'disabled' | 'showCount' | 'maxLength' | 'value' | 'defaultValue' | 'onPressEnter' | 'onChange'> {
|
|
14
14
|
/**
|
|
15
15
|
* @description 输入框尺寸
|
|
16
16
|
* @default default
|
|
17
|
-
* @type 'small' | '
|
|
17
|
+
* @type 'mini' | 'small' | 'middle' | 'large';
|
|
18
18
|
*/
|
|
19
19
|
size?: TSize;
|
|
20
20
|
/**
|
|
@@ -63,5 +63,6 @@ export interface IInputProps extends Omit<InputProps, 'size' | 'id' | 'prefix' |
|
|
|
63
63
|
*/
|
|
64
64
|
onChange?: ChangeEventHandler;
|
|
65
65
|
}
|
|
66
|
+
export declare function getSizeType(sizeType: TSize): TSize;
|
|
66
67
|
declare const Input: React.ForwardRefExoticComponent<IInputProps & React.RefAttributes<InputRef>>;
|
|
67
68
|
export default Input;
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
exports.getSizeType = getSizeType;
|
|
7
8
|
|
|
8
9
|
var _react = _interopRequireDefault(require("react"));
|
|
9
10
|
|
|
@@ -11,7 +12,7 @@ var _Input = _interopRequireDefault(require("antd/lib/input/Input"));
|
|
|
11
12
|
|
|
12
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
14
|
|
|
14
|
-
var _excluded = ["size"];
|
|
15
|
+
var _excluded = ["size", "className"];
|
|
15
16
|
|
|
16
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
18
|
|
|
@@ -19,35 +20,24 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
19
20
|
|
|
20
21
|
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; }
|
|
21
22
|
|
|
23
|
+
function getSizeType(sizeType) {
|
|
24
|
+
if (['mini', 'small', 'middle', 'large'].includes(sizeType)) {
|
|
25
|
+
return sizeType;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return 'middle';
|
|
29
|
+
}
|
|
30
|
+
|
|
22
31
|
var Input = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
23
32
|
var _props$size = props.size,
|
|
24
|
-
size = _props$size === void 0 ? '
|
|
33
|
+
size = _props$size === void 0 ? 'middle' : _props$size,
|
|
34
|
+
className = props.className,
|
|
25
35
|
rest = _objectWithoutProperties(props, _excluded);
|
|
26
36
|
|
|
27
|
-
var getInputSize = function getInputSize(inputSize) {
|
|
28
|
-
if (inputSize === 'small' || inputSize === 'large') {
|
|
29
|
-
return inputSize;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return 'middle';
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
var getClassName = function getClassName(inputSize) {
|
|
36
|
-
return (0, _classnames.default)('ald-input', {
|
|
37
|
-
'ald-input-small': inputSize === 'small',
|
|
38
|
-
'ald-input-large': inputSize === 'large',
|
|
39
|
-
'ald-input-mini': inputSize === 'mini',
|
|
40
|
-
'ald-input-middle': !['small', 'mini', 'large'].includes(inputSize),
|
|
41
|
-
'ald-input-showCount': props.showCount
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
|
|
45
37
|
return /*#__PURE__*/_react.default.createElement(_Input.default, Object.assign({}, rest, {
|
|
46
|
-
// @ts-ignore
|
|
47
38
|
ref: ref,
|
|
48
|
-
size: getInputSize(size),
|
|
49
39
|
bordered: true,
|
|
50
|
-
className:
|
|
40
|
+
className: (0, _classnames.default)('ald-input', "ald-input-".concat(getSizeType(size)), className),
|
|
51
41
|
addonAfter: null,
|
|
52
42
|
addonBefore: null,
|
|
53
43
|
suffix: null
|
|
@@ -5,17 +5,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
require("@aloudata/icons-react/styles/index.less");
|
|
9
|
+
|
|
10
|
+
var _EyeOffLine2 = _interopRequireDefault(require("@aloudata/icons-react/es/icons/EyeOffLine"));
|
|
9
11
|
|
|
10
|
-
var
|
|
12
|
+
var _EyeOnLine2 = _interopRequireDefault(require("@aloudata/icons-react/es/icons/EyeOnLine"));
|
|
11
13
|
|
|
12
|
-
var
|
|
14
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
15
|
|
|
14
16
|
var _Password = _interopRequireDefault(require("antd/lib/input/Password"));
|
|
15
17
|
|
|
18
|
+
var _Input = require("../Input");
|
|
19
|
+
|
|
16
20
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
21
|
|
|
18
|
-
var _excluded = ["size"];
|
|
22
|
+
var _excluded = ["size", "className"];
|
|
19
23
|
|
|
20
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
25
|
|
|
@@ -26,25 +30,17 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
26
30
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
31
|
var _default = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
28
32
|
var _props$size = props.size,
|
|
29
|
-
size = _props$size === void 0 ? '
|
|
33
|
+
size = _props$size === void 0 ? 'middle' : _props$size,
|
|
34
|
+
className = props.className,
|
|
30
35
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
31
36
|
|
|
32
|
-
var getClassName = function getClassName(inputSize) {
|
|
33
|
-
return (0, _classnames.default)('ald-input', {
|
|
34
|
-
'ald-input-small': inputSize === 'small',
|
|
35
|
-
'ald-input-large': inputSize === 'large',
|
|
36
|
-
'ald-input-mini': inputSize === 'mini',
|
|
37
|
-
'ald-input-middle': !['small', 'mini', 'large'].includes(inputSize)
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
|
|
41
37
|
return /*#__PURE__*/_react.default.createElement(_Password.default, Object.assign({}, restProps, {
|
|
42
38
|
ref: ref,
|
|
43
|
-
className:
|
|
39
|
+
className: (0, _classnames.default)('ald-input', "ald-input-".concat((0, _Input.getSizeType)(size)), className),
|
|
44
40
|
iconRender: function iconRender(visible) {
|
|
45
|
-
return visible ? /*#__PURE__*/_react.default.createElement(
|
|
41
|
+
return visible ? /*#__PURE__*/_react.default.createElement(_EyeOnLine2.default, {
|
|
46
42
|
fill: "currentColor"
|
|
47
|
-
}) : /*#__PURE__*/_react.default.createElement(
|
|
43
|
+
}) : /*#__PURE__*/_react.default.createElement(_EyeOffLine2.default, {
|
|
48
44
|
fill: "currentColor"
|
|
49
45
|
});
|
|
50
46
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextAreaProps, TextAreaRef } from 'antd/lib/input/TextArea';
|
|
3
|
+
import { TSize } from '../Input';
|
|
3
4
|
export type { TextAreaRef };
|
|
4
|
-
export interface ITextAreaProps extends Omit<TextAreaProps, 'onPressEnter'> {
|
|
5
|
+
export interface ITextAreaProps extends Omit<TextAreaProps, 'onPressEnter' | 'size'> {
|
|
5
6
|
/**
|
|
6
7
|
* @description 可以点击清除图标删除内容
|
|
7
8
|
* @default false
|
|
@@ -53,6 +54,12 @@ export interface ITextAreaProps extends Omit<TextAreaProps, 'onPressEnter'> {
|
|
|
53
54
|
* @type boolean
|
|
54
55
|
*/
|
|
55
56
|
border?: boolean;
|
|
57
|
+
className?: string;
|
|
58
|
+
/**
|
|
59
|
+
* @description 尺寸大学
|
|
60
|
+
* @default middle
|
|
61
|
+
*/
|
|
62
|
+
size?: TSize;
|
|
56
63
|
}
|
|
57
64
|
declare const _default: React.ForwardRefExoticComponent<ITextAreaProps & React.RefAttributes<TextAreaRef>>;
|
|
58
65
|
export default _default;
|
|
@@ -9,7 +9,11 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
|
|
10
10
|
var _TextArea = _interopRequireDefault(require("antd/lib/input/TextArea"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _Input = require("../Input");
|
|
15
|
+
|
|
16
|
+
var _excluded = ["bordered", "size", "className"];
|
|
13
17
|
|
|
14
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
19
|
|
|
@@ -20,9 +24,14 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
20
24
|
var _default = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
21
25
|
var _props$bordered = props.bordered,
|
|
22
26
|
bordered = _props$bordered === void 0 ? true : _props$bordered,
|
|
27
|
+
_props$size = props.size,
|
|
28
|
+
size = _props$size === void 0 ? 'middle' : _props$size,
|
|
29
|
+
_props$className = props.className,
|
|
30
|
+
className = _props$className === void 0 ? '' : _props$className,
|
|
23
31
|
rest = _objectWithoutProperties(props, _excluded);
|
|
24
32
|
|
|
25
33
|
return /*#__PURE__*/_react.default.createElement(_TextArea.default, Object.assign({}, rest, {
|
|
34
|
+
className: (0, _classnames.default)('ald-input-textarea', "ald-input-textarea-".concat((0, _Input.getSizeType)(size)), className),
|
|
26
35
|
ref: ref,
|
|
27
36
|
bordered: bordered
|
|
28
37
|
}));
|