@aloudata/aloudata-design 0.2.0-beta.7 → 0.2.1
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 +188 -51
- package/es/Alert/index.d.ts +4 -0
- package/es/Alert/index.js +3 -0
- package/es/Alert/style/index.d.ts +2 -0
- package/es/Alert/style/index.js +2 -0
- package/es/Alert/style/index.less +1 -0
- package/es/Button/style/index.less +113 -63
- package/es/Checkbox/index.d.ts +11 -0
- package/es/Checkbox/index.js +38 -0
- package/es/Checkbox/style/index.d.ts +2 -0
- package/es/Checkbox/style/index.js +2 -0
- package/es/Checkbox/style/index.less +79 -0
- package/es/Col/index.d.ts +4 -0
- package/es/Col/index.js +3 -0
- package/es/Col/style/index.d.ts +2 -0
- package/es/Col/style/index.js +2 -0
- package/es/Col/style/index.less +1 -0
- package/es/ConfigProvider/index.d.ts +3 -0
- package/es/ConfigProvider/index.js +3 -0
- package/es/ConfigProvider/style/index.d.ts +2 -0
- package/es/ConfigProvider/style/index.js +2 -0
- package/es/ConfigProvider/style/index.less +1 -0
- package/es/DatePicker/index.d.ts +4 -0
- package/es/DatePicker/index.js +3 -0
- package/es/DatePicker/style/index.d.ts +2 -0
- package/es/DatePicker/style/index.js +2 -0
- package/es/DatePicker/style/index.less +1 -0
- package/es/Divider/index.d.ts +3 -0
- package/es/Divider/index.js +3 -0
- package/es/Divider/style/index.d.ts +2 -0
- package/es/Divider/style/index.js +2 -0
- package/es/Divider/style/index.less +1 -0
- package/es/Dropdown/Button.d.ts +1 -0
- package/es/Dropdown/Button.js +2 -1
- package/es/Dropdown/index.d.ts +22 -0
- package/es/Dropdown/style/index.d.ts +1 -0
- package/es/Dropdown/style/index.js +1 -0
- package/es/Empty/style/index.less +8 -7
- package/es/Form/index.d.ts +8 -0
- package/es/Form/index.js +3 -0
- package/es/Form/style/index.d.ts +2 -0
- package/es/Form/style/index.js +2 -0
- package/es/Form/style/index.less +1 -0
- package/es/Icon/index.d.ts +3 -0
- package/es/Icon/index.js +5 -2
- package/es/Input/components/Group/index.d.ts +1 -2
- package/es/Input/components/Input/index.d.ts +67 -0
- package/es/Input/components/Input/index.js +38 -0
- package/es/Input/components/Password/index.d.ts +5 -5
- package/es/Input/components/Password/index.js +5 -4
- package/es/Input/components/TextArea/index.d.ts +10 -4
- package/es/Input/components/TextArea/index.js +16 -6
- package/es/Input/index.d.ts +14 -62
- package/es/Input/index.js +4 -40
- package/es/Input/style/index.d.ts +1 -0
- package/es/Input/style/index.js +1 -0
- package/es/Input/style/index.less +44 -12
- package/es/Layout/index.d.ts +4 -0
- package/es/Layout/index.js +3 -0
- package/es/Layout/style/index.d.ts +2 -0
- package/es/Layout/style/index.js +2 -0
- package/es/Layout/style/index.less +1 -0
- package/es/Menu/MenuItem.d.ts +7 -1
- package/es/Menu/style/index.d.ts +1 -0
- package/es/Menu/style/index.js +1 -0
- package/es/Menu/style/index.less +9 -5
- package/es/Message/index.d.ts +4 -0
- package/es/Message/index.js +3 -0
- package/es/Message/style/index.d.ts +2 -0
- package/es/Message/style/index.js +2 -0
- package/es/Message/style/index.less +1 -0
- package/es/Navigator/components/Menu/index.js +2 -2
- package/es/Notification/index.d.ts +3 -0
- package/es/Notification/index.js +3 -0
- package/es/Notification/style/index.d.ts +2 -0
- package/es/Notification/style/index.js +2 -0
- package/es/Notification/style/index.less +1 -0
- package/es/Radio/index.d.ts +4 -0
- package/es/Radio/index.js +3 -0
- package/es/Radio/style/index.d.ts +2 -0
- package/es/Radio/style/index.js +2 -0
- package/es/Radio/style/index.less +1 -0
- package/es/Row/index.d.ts +3 -0
- package/es/Row/index.js +1 -0
- package/es/Row/style/index.d.ts +2 -0
- package/es/Row/style/index.js +2 -0
- package/es/Row/style/index.less +1 -0
- package/es/Select/BaseSelect.js +18 -5
- package/es/Select/OptionsList/OptionItem/RenderLabelIcon.d.ts +2 -1
- package/es/Select/OptionsList/OptionItem/RenderLabelIcon.js +1 -0
- package/es/Select/OptionsList/index.js +13 -20
- package/es/Select/Selector/index.js +13 -9
- package/es/Select/interface.d.ts +10 -2
- package/es/Select/style/index.less +63 -30
- package/es/Skeleton/index.d.ts +3 -0
- package/es/Skeleton/index.js +2 -0
- package/es/Skeleton/style/index.d.ts +2 -0
- package/es/Skeleton/style/index.js +2 -0
- package/es/Skeleton/style/index.less +1 -0
- package/es/Space/index.d.ts +4 -0
- package/es/Space/index.js +3 -0
- package/es/Space/style/index.d.ts +2 -0
- package/es/Space/style/index.js +2 -0
- package/es/Space/style/index.less +1 -0
- package/es/Spin/index.d.ts +4 -0
- package/es/Spin/index.js +2 -0
- package/es/Spin/style/index.d.ts +2 -0
- package/es/Spin/style/index.js +2 -0
- package/es/Spin/style/index.less +1 -0
- package/es/Steps/index.d.ts +3 -0
- package/es/Steps/index.js +2 -0
- package/es/Steps/style/index.d.ts +2 -0
- package/es/Steps/style/index.js +2 -0
- package/es/Steps/style/index.less +1 -0
- package/es/Switch/index.d.ts +4 -0
- package/es/Switch/index.js +2 -0
- package/es/Switch/style/index.d.ts +2 -0
- package/es/Switch/style/index.js +2 -0
- package/es/Switch/style/index.less +1 -0
- package/es/Table/index.d.ts +3 -3
- package/es/Table/index.js +286 -157
- package/es/Table/interface.d.ts +12 -4
- package/es/Table/react-table-config.d.ts +45 -45
- package/es/Table/style/index.less +121 -63
- package/es/Tabs/index.d.ts +5 -0
- package/es/Tabs/index.js +7 -4
- package/es/Tabs/style/index.d.ts +1 -0
- package/es/Tabs/style/index.js +1 -0
- package/es/Tabs/style/index.less +9 -2
- package/es/Tooltip/style/index.less +1 -1
- package/es/Tree/index.d.ts +5 -0
- package/es/Tree/index.js +2 -0
- package/es/Tree/style/index.d.ts +2 -0
- package/es/Tree/style/index.js +2 -0
- package/es/Tree/style/index.less +1 -0
- package/es/Typography/index.d.ts +3 -0
- package/es/Typography/index.js +3 -0
- package/es/Typography/style/index.d.ts +2 -0
- package/es/Typography/style/index.js +2 -0
- package/es/Typography/style/index.less +1 -0
- package/es/Upload/index.d.ts +4 -0
- package/es/Upload/index.js +3 -0
- package/es/Upload/style/index.d.ts +2 -0
- package/es/Upload/style/index.js +2 -0
- package/es/Upload/style/index.less +1 -0
- package/es/_utils/hooks/useControlledState.d.ts +1 -1
- package/es/_utils/hooks/useControlledState.js +11 -11
- package/es/index.d.ts +39 -1
- package/es/index.js +21 -1
- package/es/locale/zh_CN.d.ts +2 -0
- package/es/locale/zh_CN.js +2 -0
- package/es/style/index.d.ts +1 -1
- package/es/style/index.js +1 -1
- package/es/style/themes/default/index.less +1 -1
- package/lib/Alert/index.d.ts +4 -0
- package/lib/Alert/index.js +15 -0
- package/lib/Alert/style/index.d.ts +2 -0
- package/lib/Alert/style/index.js +5 -0
- package/lib/Alert/style/index.less +1 -0
- package/lib/Button/style/index.less +113 -63
- package/lib/Checkbox/index.d.ts +11 -0
- package/lib/Checkbox/index.js +52 -0
- package/lib/Checkbox/style/index.d.ts +2 -0
- package/lib/Checkbox/style/index.js +5 -0
- package/lib/Checkbox/style/index.less +79 -0
- package/lib/Col/index.d.ts +4 -0
- package/lib/Col/index.js +15 -0
- package/lib/Col/style/index.d.ts +2 -0
- package/lib/Col/style/index.js +5 -0
- package/lib/Col/style/index.less +1 -0
- package/lib/ConfigProvider/index.d.ts +3 -0
- package/lib/ConfigProvider/index.js +15 -0
- package/lib/ConfigProvider/style/index.d.ts +2 -0
- package/lib/ConfigProvider/style/index.js +5 -0
- package/lib/ConfigProvider/style/index.less +1 -0
- package/lib/DatePicker/index.d.ts +4 -0
- package/lib/DatePicker/index.js +15 -0
- package/lib/DatePicker/style/index.d.ts +2 -0
- package/lib/DatePicker/style/index.js +5 -0
- package/lib/DatePicker/style/index.less +1 -0
- package/lib/Divider/index.d.ts +3 -0
- package/lib/Divider/index.js +15 -0
- package/lib/Divider/style/index.d.ts +2 -0
- package/lib/Divider/style/index.js +5 -0
- package/lib/Divider/style/index.less +1 -0
- package/lib/Dropdown/Button.d.ts +1 -0
- package/lib/Dropdown/Button.js +2 -0
- package/lib/Dropdown/index.d.ts +22 -0
- package/lib/Dropdown/style/index.d.ts +1 -0
- package/lib/Dropdown/style/index.js +2 -0
- package/lib/Empty/style/index.less +8 -7
- package/lib/Form/index.d.ts +8 -0
- package/lib/Form/index.js +15 -0
- package/lib/Form/style/index.d.ts +2 -0
- package/lib/Form/style/index.js +5 -0
- package/lib/Form/style/index.less +1 -0
- package/lib/Icon/index.d.ts +3 -0
- package/lib/Icon/index.js +11 -3
- package/lib/Input/components/Group/index.d.ts +1 -2
- package/lib/Input/components/Input/index.d.ts +67 -0
- package/lib/Input/components/Input/index.js +51 -0
- package/lib/Input/components/Password/index.d.ts +5 -5
- package/lib/Input/components/Password/index.js +10 -8
- package/lib/Input/components/TextArea/index.d.ts +10 -4
- package/lib/Input/components/TextArea/index.js +18 -7
- package/lib/Input/index.d.ts +14 -62
- package/lib/Input/index.js +4 -42
- package/lib/Input/style/index.d.ts +1 -0
- package/lib/Input/style/index.js +2 -0
- package/lib/Input/style/index.less +44 -12
- package/lib/Layout/index.d.ts +4 -0
- package/lib/Layout/index.js +15 -0
- package/lib/Layout/style/index.d.ts +2 -0
- package/lib/Layout/style/index.js +5 -0
- package/lib/Layout/style/index.less +1 -0
- package/lib/Menu/MenuItem.d.ts +7 -1
- package/lib/Menu/style/index.d.ts +1 -0
- package/lib/Menu/style/index.js +2 -0
- package/lib/Menu/style/index.less +9 -5
- package/lib/Message/index.d.ts +4 -0
- package/lib/Message/index.js +15 -0
- package/lib/Message/style/index.d.ts +2 -0
- package/lib/Message/style/index.js +5 -0
- package/lib/Message/style/index.less +1 -0
- package/lib/Navigator/components/Menu/index.js +2 -2
- package/lib/Notification/index.d.ts +3 -0
- package/lib/Notification/index.js +15 -0
- package/lib/Notification/style/index.d.ts +2 -0
- package/lib/Notification/style/index.js +5 -0
- package/lib/Notification/style/index.less +1 -0
- package/lib/Radio/index.d.ts +4 -0
- package/lib/Radio/index.js +15 -0
- package/lib/Radio/style/index.d.ts +2 -0
- package/lib/Radio/style/index.js +5 -0
- package/lib/Radio/style/index.less +1 -0
- package/lib/Row/index.d.ts +3 -0
- package/lib/Row/index.js +8 -0
- package/lib/Row/style/index.d.ts +2 -0
- package/lib/Row/style/index.js +5 -0
- package/lib/Row/style/index.less +1 -0
- package/lib/Select/BaseSelect.js +18 -5
- package/lib/Select/OptionsList/OptionItem/RenderLabelIcon.d.ts +2 -1
- package/lib/Select/OptionsList/OptionItem/RenderLabelIcon.js +2 -0
- package/lib/Select/OptionsList/index.js +12 -20
- package/lib/Select/Selector/index.js +13 -9
- package/lib/Select/interface.d.ts +10 -2
- package/lib/Select/style/index.less +63 -30
- package/lib/Skeleton/index.d.ts +3 -0
- package/lib/Skeleton/index.js +13 -0
- package/lib/Skeleton/style/index.d.ts +2 -0
- package/lib/Skeleton/style/index.js +5 -0
- package/lib/Skeleton/style/index.less +1 -0
- package/lib/Space/index.d.ts +4 -0
- package/lib/Space/index.js +23 -0
- package/lib/Space/style/index.d.ts +2 -0
- package/lib/Space/style/index.js +5 -0
- package/lib/Space/style/index.less +1 -0
- package/lib/Spin/index.d.ts +4 -0
- package/lib/Spin/index.js +13 -0
- package/lib/Spin/style/index.d.ts +2 -0
- package/lib/Spin/style/index.js +5 -0
- package/lib/Spin/style/index.less +1 -0
- package/lib/Steps/index.d.ts +3 -0
- package/lib/Steps/index.js +13 -0
- package/lib/Steps/style/index.d.ts +2 -0
- package/lib/Steps/style/index.js +5 -0
- package/lib/Steps/style/index.less +1 -0
- package/lib/Switch/index.d.ts +4 -0
- package/lib/Switch/index.js +13 -0
- package/lib/Switch/style/index.d.ts +2 -0
- package/lib/Switch/style/index.js +5 -0
- package/lib/Switch/style/index.less +1 -0
- package/lib/Table/index.d.ts +3 -3
- package/lib/Table/index.js +295 -165
- package/lib/Table/interface.d.ts +12 -4
- package/lib/Table/react-table-config.d.ts +45 -45
- package/lib/Table/style/index.less +121 -63
- package/lib/Tabs/index.d.ts +5 -0
- package/lib/Tabs/index.js +6 -3
- package/lib/Tabs/style/index.d.ts +1 -0
- package/lib/Tabs/style/index.js +2 -0
- package/lib/Tabs/style/index.less +9 -2
- package/lib/Tooltip/style/index.less +1 -1
- package/lib/Tree/index.d.ts +5 -0
- package/lib/Tree/index.js +13 -0
- package/lib/Tree/style/index.d.ts +2 -0
- package/lib/Tree/style/index.js +5 -0
- package/lib/Tree/style/index.less +1 -0
- package/lib/Typography/index.d.ts +3 -0
- package/lib/Typography/index.js +15 -0
- package/lib/Typography/style/index.d.ts +2 -0
- package/lib/Typography/style/index.js +5 -0
- package/lib/Typography/style/index.less +1 -0
- package/lib/Upload/index.d.ts +4 -0
- package/lib/Upload/index.js +15 -0
- package/lib/Upload/style/index.d.ts +2 -0
- package/lib/Upload/style/index.js +5 -0
- package/lib/Upload/style/index.less +1 -0
- package/lib/_utils/hooks/useControlledState.d.ts +1 -1
- package/lib/_utils/hooks/useControlledState.js +11 -11
- package/lib/index.d.ts +39 -1
- package/lib/index.js +160 -0
- package/lib/locale/zh_CN.d.ts +2 -0
- package/lib/locale/zh_CN.js +13 -0
- package/lib/style/index.d.ts +1 -1
- package/lib/style/index.js +1 -1
- package/lib/style/themes/default/index.less +1 -1
- package/package.json +16 -5
package/es/Input/index.d.ts
CHANGED
|
@@ -1,64 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*/
|
|
15
|
-
id?: string;
|
|
16
|
-
/**
|
|
17
|
-
* @description 提示文字
|
|
18
|
-
*/
|
|
19
|
-
prefix?: ReactNode;
|
|
20
|
-
/**
|
|
21
|
-
* @description 带标签的 input,设置前置标签
|
|
22
|
-
*/
|
|
23
|
-
allowClear?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* @description 可以点击清除图标删除内容
|
|
26
|
-
* @default true
|
|
27
|
-
*/
|
|
28
|
-
disabled?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* @description 提示文字
|
|
31
|
-
* @default false
|
|
32
|
-
* @type boolean | { formatter: (args: { count: number; maxLength?: number; }) => string; };
|
|
33
|
-
*/
|
|
34
|
-
showCount?: boolean | ShowCountProps;
|
|
35
|
-
/**
|
|
36
|
-
* @description 最大长度
|
|
37
|
-
*/
|
|
38
|
-
maxLength?: number;
|
|
39
|
-
/**
|
|
40
|
-
* @description 输入框内容
|
|
41
|
-
*/
|
|
42
|
-
value?: string;
|
|
43
|
-
/**
|
|
44
|
-
* @description 输入框默认内容
|
|
45
|
-
*/
|
|
46
|
-
defaultValue?: string;
|
|
47
|
-
/**
|
|
48
|
-
* @description 按下回车的回调
|
|
49
|
-
* @type (e) => void
|
|
50
|
-
*/
|
|
51
|
-
onPressEnter?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
52
|
-
/**
|
|
53
|
-
* @description 输入框内容变化时的回调
|
|
54
|
-
* @type (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
55
|
-
*/
|
|
56
|
-
onChange?: ChangeEventHandler;
|
|
57
|
-
}
|
|
58
|
-
declare function Input(props: IInputProps): JSX.Element;
|
|
59
|
-
declare namespace Input {
|
|
60
|
-
var TextArea: typeof import("./components/TextArea").default;
|
|
61
|
-
var Group: typeof import("./components/Group").default;
|
|
62
|
-
var Password: typeof import("./components/Password").default;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IInputProps, InputRef } from './components/Input';
|
|
3
|
+
import Group from './components/Group';
|
|
4
|
+
import TextArea from './components/TextArea';
|
|
5
|
+
import Password from './components/Password';
|
|
6
|
+
export type { IInputProps, InputRef, TSize } from './components/Input';
|
|
7
|
+
export type { IGroupProps } from './components/Group';
|
|
8
|
+
export type { ITextAreaProps, TextAreaRef } from './components/TextArea';
|
|
9
|
+
export type { IPasswordProps } from './components/Password';
|
|
10
|
+
interface ICompoundedComponent extends React.ForwardRefExoticComponent<IInputProps & React.RefAttributes<InputRef>> {
|
|
11
|
+
Group: typeof Group;
|
|
12
|
+
TextArea: typeof TextArea;
|
|
13
|
+
Password: typeof Password;
|
|
63
14
|
}
|
|
15
|
+
declare const Input: ICompoundedComponent;
|
|
64
16
|
export default Input;
|
package/es/Input/index.js
CHANGED
|
@@ -1,45 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var _excluded = ["size"];
|
|
4
|
-
|
|
5
|
-
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; }
|
|
6
|
-
|
|
7
|
-
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; }
|
|
8
|
-
|
|
9
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
-
|
|
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
|
-
|
|
13
|
-
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; }
|
|
14
|
-
|
|
15
|
-
import React from 'react';
|
|
1
|
+
import InternalInput from './components/Input';
|
|
2
|
+
import Group from './components/Group';
|
|
16
3
|
import TextArea from './components/TextArea';
|
|
17
4
|
import Password from './components/Password';
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
function Input(props) {
|
|
21
|
-
var _props$size = props.size,
|
|
22
|
-
size = _props$size === void 0 ? 'default' : _props$size,
|
|
23
|
-
rest = _objectWithoutProperties(props, _excluded);
|
|
24
|
-
|
|
25
|
-
var getInputSize = function getInputSize(inputSize) {
|
|
26
|
-
if (inputSize === 'small' || inputSize === 'large') {
|
|
27
|
-
return inputSize;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return 'middle';
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
return /*#__PURE__*/React.createElement(_Input, _objectSpread(_objectSpread({}, rest), {}, {
|
|
34
|
-
size: getInputSize(size),
|
|
35
|
-
bordered: true,
|
|
36
|
-
addonAfter: null,
|
|
37
|
-
addonBefore: null,
|
|
38
|
-
suffix: null
|
|
39
|
-
}));
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
Input.TextArea = TextArea;
|
|
5
|
+
var Input = InternalInput;
|
|
43
6
|
Input.Group = Group;
|
|
7
|
+
Input.TextArea = TextArea;
|
|
44
8
|
Input.Password = Password;
|
|
45
9
|
export default Input;
|
package/es/Input/style/index.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
@import '../../style/index.less';
|
|
2
2
|
@import '../../Icon/index.less';
|
|
3
3
|
|
|
4
|
-
@ald-prefix:ant;
|
|
4
|
+
@ald-prefix: ant;
|
|
5
5
|
|
|
6
|
-
@ald-iconfont-css-prefix:anticon;
|
|
7
|
-
|
|
6
|
+
@ald-iconfont-css-prefix: anticon;
|
|
7
|
+
|
|
8
|
+
.ant-input {
|
|
9
|
+
height: 28px;
|
|
8
10
|
color: @NL0;
|
|
11
|
+
font-size: 12px;
|
|
9
12
|
border-radius: @border-radius-base;
|
|
10
13
|
|
|
11
14
|
&::placeholder {
|
|
@@ -14,6 +17,9 @@
|
|
|
14
17
|
|
|
15
18
|
&-prefix {
|
|
16
19
|
color: @NL30;
|
|
20
|
+
font-weight: 400;
|
|
21
|
+
font-size: 12px;
|
|
22
|
+
line-height: 16px;
|
|
17
23
|
}
|
|
18
24
|
|
|
19
25
|
&-suffix {
|
|
@@ -27,9 +33,9 @@
|
|
|
27
33
|
}
|
|
28
34
|
|
|
29
35
|
&[disabled] {
|
|
30
|
-
border-color: @NL90;
|
|
31
|
-
background-color: @NL95;
|
|
32
36
|
color: @NL80;
|
|
37
|
+
background-color: @NL95;
|
|
38
|
+
border-color: @NL90;
|
|
33
39
|
|
|
34
40
|
&::placeholder {
|
|
35
41
|
color: @NL80;
|
|
@@ -37,10 +43,19 @@
|
|
|
37
43
|
}
|
|
38
44
|
|
|
39
45
|
&-sm {
|
|
46
|
+
height: 24px;
|
|
47
|
+
font-size: 12px;
|
|
40
48
|
border-radius: @border-radius-sm;
|
|
41
49
|
}
|
|
42
50
|
|
|
51
|
+
&-lg {
|
|
52
|
+
height: 32px;
|
|
53
|
+
font-size: 14px;
|
|
54
|
+
}
|
|
55
|
+
|
|
43
56
|
&-affix-wrapper {
|
|
57
|
+
height: 28px;
|
|
58
|
+
padding: 0 12px;
|
|
44
59
|
border-radius: @border-radius-base;
|
|
45
60
|
|
|
46
61
|
&-hover,
|
|
@@ -48,18 +63,35 @@
|
|
|
48
63
|
&:hover {
|
|
49
64
|
box-shadow: unset;
|
|
50
65
|
}
|
|
51
|
-
|
|
66
|
+
|
|
67
|
+
.ant-input {
|
|
68
|
+
height: 100%;
|
|
52
69
|
border-radius: 0;
|
|
53
70
|
caret-color: @B40;
|
|
54
71
|
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.ant-input-affix-wrapper.ant-input-affix-wrapper {
|
|
76
|
+
&-lg {
|
|
77
|
+
height: 32px;
|
|
78
|
+
padding: 4px 11px;
|
|
79
|
+
font-size: 14px;
|
|
80
|
+
}
|
|
55
81
|
|
|
56
|
-
|
|
57
|
-
|
|
82
|
+
&-sm {
|
|
83
|
+
height: 24px;
|
|
84
|
+
padding: 0 12px;
|
|
85
|
+
border-radius: @border-radius-sm;
|
|
86
|
+
|
|
87
|
+
.ant-input-sm {
|
|
88
|
+
height: 22px;
|
|
58
89
|
}
|
|
59
90
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
91
|
+
|
|
92
|
+
.ant-input-suffix {
|
|
93
|
+
.anticon-close-circle.ant-input-clear-icon {
|
|
94
|
+
.ald-iconfont('\e616');
|
|
95
|
+
}
|
|
64
96
|
}
|
|
65
97
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../../style/index.less';
|
package/es/Menu/MenuItem.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export interface IMenuItemProps {
|
|
|
6
6
|
* @type string | number
|
|
7
7
|
* @default -
|
|
8
8
|
*/
|
|
9
|
-
key
|
|
9
|
+
key?: React.Key;
|
|
10
10
|
/**
|
|
11
11
|
* @description 是否禁用
|
|
12
12
|
* @default false
|
|
@@ -18,6 +18,12 @@ export interface IMenuItemProps {
|
|
|
18
18
|
* @default -
|
|
19
19
|
*/
|
|
20
20
|
onClick?: MenuClickEventHandler;
|
|
21
|
+
/**
|
|
22
|
+
* @description 类名
|
|
23
|
+
* @type string
|
|
24
|
+
* @default -
|
|
25
|
+
*/
|
|
26
|
+
className?: string;
|
|
21
27
|
children?: React.ReactNode;
|
|
22
28
|
}
|
|
23
29
|
export default function Menu(props: IMenuItemProps): JSX.Element;
|
package/es/Menu/style/index.d.ts
CHANGED
package/es/Menu/style/index.js
CHANGED
package/es/Menu/style/index.less
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
@import '../../Icon/index.less';
|
|
3
3
|
|
|
4
4
|
.menu-popup {
|
|
5
|
+
background: @BG100;
|
|
5
6
|
border: 1px solid @NL95;
|
|
6
|
-
box-shadow: @shadow-actionsheet;
|
|
7
7
|
border-radius: @border-radius-base;
|
|
8
|
-
|
|
8
|
+
box-shadow: @shadow-actionsheet;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.ald-menu,
|
|
@@ -18,16 +18,20 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.ald-iconfont {
|
|
21
|
-
font-family: @icon-font !important;
|
|
22
21
|
font-size: 16px;
|
|
22
|
+
font-family: @icon-font !important;
|
|
23
23
|
font-style: normal;
|
|
24
24
|
-webkit-font-smoothing: antialiased;
|
|
25
25
|
-moz-osx-font-smoothing: grayscale;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
// 替换二级菜单箭头icon
|
|
29
|
-
.ant-dropdown-menu-item
|
|
30
|
-
|
|
29
|
+
.ant-dropdown-menu-item
|
|
30
|
+
.ant-dropdown-menu-submenu-expand-icon
|
|
31
|
+
.ant-dropdown-menu-submenu-arrow-icon,
|
|
32
|
+
.ant-dropdown-menu-submenu-title
|
|
33
|
+
.ant-dropdown-menu-submenu-expand-icon
|
|
34
|
+
.ant-dropdown-menu-submenu-arrow-icon {
|
|
31
35
|
.ald-iconfont('\e691');
|
|
32
36
|
}
|
|
33
37
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../../style/index.less';
|
|
@@ -47,14 +47,14 @@ function Menu(props) {
|
|
|
47
47
|
|
|
48
48
|
if (isOpen) {
|
|
49
49
|
return /*#__PURE__*/React.createElement(Icon, {
|
|
50
|
-
type: "
|
|
50
|
+
type: "arrow_drop_up",
|
|
51
51
|
size: 20,
|
|
52
52
|
className: "ald-nav-menu-icon-right"
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
return /*#__PURE__*/React.createElement(Icon, {
|
|
57
|
-
type: "
|
|
57
|
+
type: "arrow_drop_down",
|
|
58
58
|
size: 20,
|
|
59
59
|
className: "ald-nav-menu-icon-right"
|
|
60
60
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../../style/index.less';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Radio, RadioProps, RadioChangeEvent, RadioGroupProps } from 'antd';
|
|
2
|
+
export { RadioGroupButtonStyle, RadioGroupOptionType, RadioGroupContextProps, RadioChangeEventTarget, } from 'antd/lib/radio';
|
|
3
|
+
export { RadioProps, RadioChangeEvent, RadioGroupProps };
|
|
4
|
+
export default Radio;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../../style/index.less';
|
package/es/Row/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default Row;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../../style/index.less';
|
package/es/Select/BaseSelect.js
CHANGED
|
@@ -30,6 +30,7 @@ import useCacheOptions from './hooks/useCacheOption';
|
|
|
30
30
|
import useControlledState from '../_utils/hooks/useControlledState';
|
|
31
31
|
var DEFAULT_LIST_HEIGHT = 256;
|
|
32
32
|
var DEFAULT_ACTIVE_INDEX = -1;
|
|
33
|
+
var DEFAULT_SELECT_LIST_INDEX = 1050;
|
|
33
34
|
var ZERO = 0;
|
|
34
35
|
export var Select = function Select(props, ref) {
|
|
35
36
|
var _props$size = props.size,
|
|
@@ -48,7 +49,6 @@ export var Select = function Select(props, ref) {
|
|
|
48
49
|
label = props.label,
|
|
49
50
|
className = props.className,
|
|
50
51
|
style = props.style,
|
|
51
|
-
optionStyle = props.optionStyle,
|
|
52
52
|
groupStyle = props.groupStyle,
|
|
53
53
|
_props$allowClear = props.allowClear,
|
|
54
54
|
allowClear = _props$allowClear === void 0 ? false : _props$allowClear,
|
|
@@ -73,7 +73,9 @@ export var Select = function Select(props, ref) {
|
|
|
73
73
|
dropDownStyle = props.dropDownStyle,
|
|
74
74
|
_props$dropdownMatchS = props.dropdownMatchSelectWidth,
|
|
75
75
|
dropdownMatchSelectWidth = _props$dropdownMatchS === void 0 ? 'width' : _props$dropdownMatchS,
|
|
76
|
-
children = props.children
|
|
76
|
+
children = props.children,
|
|
77
|
+
_props$zIndex = props.zIndex,
|
|
78
|
+
zIndex = _props$zIndex === void 0 ? DEFAULT_SELECT_LIST_INDEX : _props$zIndex;
|
|
77
79
|
var prefix = usePrefixCls('select-legacy', customizePrefixCls);
|
|
78
80
|
|
|
79
81
|
var _useControlledState = useControlledState(controlledValue, defaultValue),
|
|
@@ -114,7 +116,19 @@ export var Select = function Select(props, ref) {
|
|
|
114
116
|
activeIndex = _useState10[0],
|
|
115
117
|
setActiveIndex = _useState10[1];
|
|
116
118
|
|
|
117
|
-
var
|
|
119
|
+
var initOptionChecked = function initOptionChecked() {
|
|
120
|
+
if (Array.isArray(value)) {
|
|
121
|
+
return value;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (value === null) {
|
|
125
|
+
return [];
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return [value];
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
var _useState11 = useState(initOptionChecked()),
|
|
118
132
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
119
133
|
optionChecked = _useState12[0],
|
|
120
134
|
setOptionChecked = _useState12[1]; // Exhibition value (tempvalue + value);
|
|
@@ -314,7 +328,6 @@ export var Select = function Select(props, ref) {
|
|
|
314
328
|
visible: visible,
|
|
315
329
|
hasGroup: hasGroup,
|
|
316
330
|
groupStyle: groupStyle,
|
|
317
|
-
optionStyle: optionStyle,
|
|
318
331
|
searchType: "no-search",
|
|
319
332
|
placeholder: placeholder,
|
|
320
333
|
data: flattenOptions,
|
|
@@ -344,7 +357,7 @@ export var Select = function Select(props, ref) {
|
|
|
344
357
|
popupStyle: dropDownStyle,
|
|
345
358
|
getPopupContainer: getContainer,
|
|
346
359
|
stretch: dropdownMatchSelectWidth ? 'width' : 'minWidth',
|
|
347
|
-
zIndex:
|
|
360
|
+
zIndex: zIndex,
|
|
348
361
|
builtinPlacements: {
|
|
349
362
|
left: {
|
|
350
363
|
points: ['cr', 'cl']
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import 'antd/lib/checkbox/style';
|
|
2
|
+
declare const RenderLabelIcon: ({ isSelected, multiple, disabled, prefixCls, isIndeterminate, }: {
|
|
2
3
|
isSelected: boolean;
|
|
3
4
|
multiple: boolean;
|
|
4
5
|
disabled?: boolean | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["input", "prefixCls", "data", "groupStyle", "height", "itemHeight", "selected", "optionChecked", "tempValue", "value", "placeholder", "notFoundContent", "onValueChange", "onTempValueChange", "setTempValue", "onInputChange", "onOptionClick", "activeIndex", "multiple", "visible", "
|
|
1
|
+
var _excluded = ["input", "prefixCls", "data", "groupStyle", "height", "itemHeight", "selected", "optionChecked", "tempValue", "value", "placeholder", "notFoundContent", "onValueChange", "onTempValueChange", "setTempValue", "onInputChange", "onOptionClick", "activeIndex", "multiple", "visible", "setActiveIndex"];
|
|
2
2
|
|
|
3
3
|
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; }
|
|
4
4
|
|
|
@@ -25,17 +25,19 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
25
25
|
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
26
26
|
import React, { useCallback, useImperativeHandle, useMemo, useRef, useEffect } from 'react';
|
|
27
27
|
import classnames from 'classnames';
|
|
28
|
-
import
|
|
29
|
-
import { ForwardRenderGroup, ForwardRenderOption, ForwardRenderTooltip, RenderLabelIcon } from './OptionItem';
|
|
28
|
+
import { ForwardRenderOption, ForwardRenderTooltip, RenderLabelIcon } from './OptionItem';
|
|
30
29
|
var ZERO_LENGTH = 0;
|
|
31
30
|
var DEFAULT_ACTIVE_INDEX = -1;
|
|
31
|
+
var DEFAULT_LIST_HEIGHT = 256;
|
|
32
|
+
var DEFAULT_LIST_PADDING = 8;
|
|
32
33
|
|
|
33
34
|
var OptionsList = function OptionsList(props, ref) {
|
|
34
35
|
var input = props.input,
|
|
35
36
|
prefixCls = props.prefixCls,
|
|
36
37
|
data = props.data,
|
|
37
38
|
groupStyle = props.groupStyle,
|
|
38
|
-
height = props.height,
|
|
39
|
+
_props$height = props.height,
|
|
40
|
+
height = _props$height === void 0 ? DEFAULT_LIST_HEIGHT : _props$height,
|
|
39
41
|
itemHeight = props.itemHeight,
|
|
40
42
|
selected = props.selected,
|
|
41
43
|
optionChecked = props.optionChecked,
|
|
@@ -51,7 +53,6 @@ var OptionsList = function OptionsList(props, ref) {
|
|
|
51
53
|
activeIndex = props.activeIndex,
|
|
52
54
|
multiple = props.multiple,
|
|
53
55
|
visible = props.visible,
|
|
54
|
-
style = props.style,
|
|
55
56
|
setActiveIndex = props.setActiveIndex,
|
|
56
57
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
57
58
|
|
|
@@ -92,7 +93,7 @@ var OptionsList = function OptionsList(props, ref) {
|
|
|
92
93
|
}, [selected]); // 部分选中
|
|
93
94
|
// 全部列表选项选中
|
|
94
95
|
|
|
95
|
-
var isAllChecked = isChecked && (selected === null || selected === void 0 ? void 0 : selected.length) === (filterflattenOptions === null || filterflattenOptions === void 0 ? void 0 : filterflattenOptions.length); // ”全部“选项是否选中
|
|
96
|
+
var isAllChecked = isChecked && (selected === null || selected === void 0 ? void 0 : selected.length) === (filterflattenOptions === null || filterflattenOptions === void 0 ? void 0 : filterflattenOptions.length) || (selected === null || selected === void 0 ? void 0 : selected.length) === ZERO_LENGTH; // ”全部“选项是否选中
|
|
96
97
|
|
|
97
98
|
var allOptionChecked = isAllChecked && Array.isArray(optionChecked) && optionChecked.length === ZERO_LENGTH; // 点击全选
|
|
98
99
|
|
|
@@ -146,7 +147,9 @@ var OptionsList = function OptionsList(props, ref) {
|
|
|
146
147
|
|
|
147
148
|
return /*#__PURE__*/React.createElement("div", {
|
|
148
149
|
className: "".concat(prefixCls, "-list"),
|
|
149
|
-
style:
|
|
150
|
+
style: {
|
|
151
|
+
maxHeight: "".concat(height - DEFAULT_LIST_PADDING, "px")
|
|
152
|
+
},
|
|
150
153
|
ref: OptionListRef,
|
|
151
154
|
role: "list",
|
|
152
155
|
"aria-hidden": "true",
|
|
@@ -155,20 +158,10 @@ var OptionsList = function OptionsList(props, ref) {
|
|
|
155
158
|
onMouseLeave: function onMouseLeave() {
|
|
156
159
|
return setActiveIndex(DEFAULT_ACTIVE_INDEX);
|
|
157
160
|
}
|
|
158
|
-
}, multiple && renderAllOptions(), data.length > ZERO_LENGTH ?
|
|
159
|
-
|
|
160
|
-
prefixCls: prefixCls,
|
|
161
|
-
ref: VirtualListRef,
|
|
162
|
-
data: data,
|
|
163
|
-
height: height,
|
|
164
|
-
itemHeight: itemHeight
|
|
165
|
-
}, restProps), function (option, index) {
|
|
166
|
-
return option.isSelectOptGroup ? /*#__PURE__*/React.createElement(ForwardRenderGroup, {
|
|
167
|
-
option: option,
|
|
168
|
-
prefixCls: prefixCls,
|
|
169
|
-
groupStyle: groupStyle
|
|
170
|
-
}) : /*#__PURE__*/React.createElement(ForwardRenderTooltip, {
|
|
161
|
+
}, multiple && renderAllOptions(), data.length > ZERO_LENGTH ? data.map(function (option, index) {
|
|
162
|
+
return /*#__PURE__*/React.createElement(ForwardRenderTooltip, {
|
|
171
163
|
tooltip: option === null || option === void 0 ? void 0 : option.tooltip,
|
|
164
|
+
key: option === null || option === void 0 ? void 0 : option.value,
|
|
172
165
|
render: /*#__PURE__*/React.createElement(ForwardRenderOption, _objectSpread({
|
|
173
166
|
option: option,
|
|
174
167
|
prefixCls: prefixCls,
|