@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.
Files changed (264) hide show
  1. package/README.md +15 -5
  2. package/es/Breadcrumb/index.d.ts +1 -0
  3. package/es/Button/index.js +3 -2
  4. package/es/Button/style/index.less +135 -126
  5. package/es/Button/style/variables.less +53 -53
  6. package/es/Card/index.d.ts +3 -0
  7. package/es/Card/index.js +3 -0
  8. package/es/Card/style/index.d.ts +2 -0
  9. package/es/Card/style/index.js +2 -0
  10. package/es/Card/style/index.less +1 -0
  11. package/es/Checkbox/index.d.ts +1 -0
  12. package/es/ConfigProvider/defaultRenderEmpty.d.ts +4 -0
  13. package/es/ConfigProvider/defaultRenderEmpty.js +37 -0
  14. package/es/ConfigProvider/sizeContext.d.ts +9 -0
  15. package/es/ConfigProvider/sizeContext.js +12 -0
  16. package/es/Dropdown/Button.js +4 -3
  17. package/es/Empty/image/Authority.d.ts +1 -0
  18. package/es/Empty/image/Dataspace.d.ts +1 -0
  19. package/es/Empty/image/Search.d.ts +1 -0
  20. package/es/Empty/image/Simple.d.ts +1 -0
  21. package/es/Empty/image/Worksheet.d.ts +1 -0
  22. package/es/Empty/image/empty.d.ts +1 -0
  23. package/es/Icon/icons/CheckLine.d.ts +13 -0
  24. package/es/Icon/icons/CheckLine.js +73 -0
  25. package/es/Icon/icons.json +410 -0
  26. package/es/Input/components/Group/index.d.ts +3 -1
  27. package/es/Input/components/Group/index.js +6 -12
  28. package/es/Input/components/Input/index.d.ts +3 -2
  29. package/es/Input/components/Input/index.js +11 -23
  30. package/es/Input/components/Password/index.js +11 -16
  31. package/es/Input/components/TextArea/index.d.ts +8 -1
  32. package/es/Input/components/TextArea/index.js +8 -1
  33. package/es/Input/style/index.less +180 -102
  34. package/es/InputNumber/index.d.ts +1 -0
  35. package/es/InputNumber/style/index.less +69 -69
  36. package/es/Menu/Divider.d.ts +1 -0
  37. package/es/Modal/index.js +20 -16
  38. package/es/Modal/locale.d.ts +7 -0
  39. package/es/Modal/locale.js +20 -0
  40. package/es/Modal/style/index.less +48 -45
  41. package/es/Navigator/components/Header/index.d.ts +1 -0
  42. package/es/Navigator/components/Menu/index.d.ts +1 -0
  43. package/es/Navigator/components/MenuItem/index.d.ts +1 -1
  44. package/es/Navigator/index.d.ts +1 -1
  45. package/es/PageHeader/index.d.ts +3 -0
  46. package/es/PageHeader/index.js +3 -0
  47. package/es/PageHeader/style/index.d.ts +2 -0
  48. package/es/PageHeader/style/index.js +2 -0
  49. package/es/PageHeader/style/index.less +1 -0
  50. package/es/Popover/index.d.ts +1 -0
  51. package/es/Radio/components/Group/index.d.ts +6 -0
  52. package/es/Radio/components/Group/index.js +72 -0
  53. package/es/Radio/components/Radio/index.d.ts +3 -0
  54. package/es/Radio/components/Radio/index.js +95 -0
  55. package/es/Radio/index.d.ts +9 -2
  56. package/es/Radio/index.js +5 -3
  57. package/es/Radio/interface/radio.d.ts +24 -0
  58. package/es/Radio/interface/radio.js +1 -0
  59. package/es/Radio/interface/radioGroup.d.ts +42 -0
  60. package/es/Radio/interface/radioGroup.js +1 -0
  61. package/es/Radio/style/index.less +348 -0
  62. package/es/Select/index.js +1 -1
  63. package/es/Select/rc-select/OptionList.js +4 -4
  64. package/es/Select/rc-select/Selector/MultipleSelector.js +11 -1
  65. package/es/Select/rc-select/hooks/useOptions.d.ts +1 -1
  66. package/es/Select/style/index.less +70 -45
  67. package/es/Select/style/variables.less +45 -45
  68. package/es/Select/utils/iconUtil.d.ts +2 -2
  69. package/es/Select/utils/iconUtil.js +9 -5
  70. package/es/Steps/components/ProcessIcon/index.d.ts +6 -0
  71. package/es/Steps/components/ProcessIcon/index.js +8 -0
  72. package/es/Steps/components/Step/index.d.ts +20 -0
  73. package/es/Steps/components/Step/index.js +45 -0
  74. package/es/Steps/index.d.ts +36 -2
  75. package/es/Steps/index.js +30 -1
  76. package/es/Steps/matchMedia.mock.d.ts +1 -0
  77. package/es/Steps/matchMedia.mock.js +17 -0
  78. package/es/Steps/style/index.less +251 -0
  79. package/es/Switch/index.d.ts +46 -2
  80. package/es/Switch/index.js +71 -1
  81. package/es/Switch/style/index.less +129 -0
  82. package/es/Table/Table.d.ts +2 -1
  83. package/es/Table/Table.js +223 -330
  84. package/es/Table/components/Empty/index.d.ts +3 -0
  85. package/es/Table/components/Empty/index.js +17 -0
  86. package/es/Table/components/Loading/index.d.ts +3 -0
  87. package/es/Table/components/Loading/index.js +19 -0
  88. package/es/Table/components/TableBodyRowList/index.d.ts +13 -0
  89. package/es/Table/components/TableBodyRowList/index.js +89 -0
  90. package/es/Table/components/TableHead/index.d.ts +23 -0
  91. package/es/Table/components/TableHead/index.js +262 -0
  92. package/es/Table/constant.d.ts +1 -0
  93. package/es/Table/constant.js +1 -0
  94. package/es/Table/hooks/useFrame.d.ts +7 -0
  95. package/es/Table/hooks/useFrame.js +90 -0
  96. package/es/Table/hooks/useTableColumn.d.ts +28 -0
  97. package/es/Table/hooks/useTableColumn.js +53 -0
  98. package/es/Table/interface.d.ts +3 -2
  99. package/es/Table/style/index.less +33 -30
  100. package/es/Table/utils.d.ts +15 -0
  101. package/es/Table/utils.js +131 -0
  102. package/es/Tabs/index.js +7 -9
  103. package/es/Tabs/style/index.less +57 -25
  104. package/es/_utils/hooks/useId.d.ts +4 -0
  105. package/es/_utils/hooks/useId.js +23 -0
  106. package/es/index.d.ts +9 -5
  107. package/es/index.js +3 -1
  108. package/es/locale/default.d.ts +2 -0
  109. package/es/locale/default.js +2 -0
  110. package/es/locale/en_US.d.ts +3 -0
  111. package/es/locale/en_US.js +132 -0
  112. package/es/locale/zh_CN.d.ts +3 -2
  113. package/es/locale/zh_CN.js +131 -2
  114. package/es/locale-provider/LocaleReceiver.d.ts +4 -0
  115. package/es/locale-provider/LocaleReceiver.js +3 -0
  116. package/es/locale-provider/context.d.ts +7 -0
  117. package/es/locale-provider/context.js +3 -0
  118. package/es/locale-provider/default.d.ts +2 -0
  119. package/es/locale-provider/default.js +2 -0
  120. package/es/locale-provider/en_US.d.ts +2 -0
  121. package/es/locale-provider/en_US.js +2 -0
  122. package/es/locale-provider/index.d.ts +65 -0
  123. package/es/locale-provider/index.js +102 -0
  124. package/es/locale-provider/style/index.d.ts +1 -0
  125. package/es/locale-provider/style/index.js +1 -0
  126. package/es/locale-provider/style/index.less +2 -0
  127. package/es/locale-provider/zh_CN.d.ts +2 -0
  128. package/es/locale-provider/zh_CN.js +2 -0
  129. package/es/style/index.d.ts +0 -1
  130. package/es/style/index.js +0 -1
  131. package/es/style/index.less +2 -2
  132. package/es/style/themes/default/index.less +30 -30
  133. package/lib/Breadcrumb/index.d.ts +1 -0
  134. package/lib/Button/index.js +5 -3
  135. package/lib/Button/style/index.less +135 -126
  136. package/lib/Button/style/variables.less +53 -53
  137. package/lib/Card/index.d.ts +3 -0
  138. package/lib/Card/index.js +15 -0
  139. package/lib/Card/style/index.d.ts +2 -0
  140. package/lib/Card/style/index.js +5 -0
  141. package/lib/Card/style/index.less +1 -0
  142. package/lib/Checkbox/index.d.ts +1 -0
  143. package/lib/ConfigProvider/defaultRenderEmpty.d.ts +4 -0
  144. package/lib/ConfigProvider/defaultRenderEmpty.js +55 -0
  145. package/lib/ConfigProvider/sizeContext.d.ts +9 -0
  146. package/lib/ConfigProvider/sizeContext.js +30 -0
  147. package/lib/Dropdown/Button.js +8 -6
  148. package/lib/Empty/image/Authority.d.ts +1 -0
  149. package/lib/Empty/image/Dataspace.d.ts +1 -0
  150. package/lib/Empty/image/Search.d.ts +1 -0
  151. package/lib/Empty/image/Simple.d.ts +1 -0
  152. package/lib/Empty/image/Worksheet.d.ts +1 -0
  153. package/lib/Empty/image/empty.d.ts +1 -0
  154. package/lib/Icon/icons/CheckLine.d.ts +13 -0
  155. package/lib/Icon/icons/CheckLine.js +90 -0
  156. package/lib/Icon/icons.json +410 -0
  157. package/lib/Input/components/Group/index.d.ts +3 -1
  158. package/lib/Input/components/Group/index.js +7 -12
  159. package/lib/Input/components/Input/index.d.ts +3 -2
  160. package/lib/Input/components/Input/index.js +13 -23
  161. package/lib/Input/components/Password/index.js +13 -17
  162. package/lib/Input/components/TextArea/index.d.ts +8 -1
  163. package/lib/Input/components/TextArea/index.js +10 -1
  164. package/lib/Input/style/index.less +180 -102
  165. package/lib/InputNumber/index.d.ts +1 -0
  166. package/lib/InputNumber/style/index.less +69 -69
  167. package/lib/Menu/Divider.d.ts +1 -0
  168. package/lib/Modal/index.js +25 -18
  169. package/lib/Modal/locale.d.ts +7 -0
  170. package/lib/Modal/locale.js +31 -0
  171. package/lib/Modal/style/index.less +48 -45
  172. package/lib/Navigator/components/Header/index.d.ts +1 -0
  173. package/lib/Navigator/components/Menu/index.d.ts +1 -0
  174. package/lib/Navigator/components/MenuItem/index.d.ts +1 -1
  175. package/lib/Navigator/index.d.ts +1 -1
  176. package/lib/PageHeader/index.d.ts +3 -0
  177. package/lib/PageHeader/index.js +15 -0
  178. package/lib/PageHeader/style/index.d.ts +2 -0
  179. package/lib/PageHeader/style/index.js +5 -0
  180. package/lib/PageHeader/style/index.less +1 -0
  181. package/lib/Popover/index.d.ts +1 -0
  182. package/lib/Radio/components/Group/index.d.ts +6 -0
  183. package/lib/Radio/components/Group/index.js +93 -0
  184. package/lib/Radio/components/Radio/index.d.ts +3 -0
  185. package/lib/Radio/components/Radio/index.js +115 -0
  186. package/lib/Radio/index.d.ts +9 -2
  187. package/lib/Radio/index.js +5 -3
  188. package/lib/Radio/interface/radio.d.ts +24 -0
  189. package/lib/Radio/interface/radio.js +5 -0
  190. package/lib/Radio/interface/radioGroup.d.ts +42 -0
  191. package/lib/Radio/interface/radioGroup.js +5 -0
  192. package/lib/Radio/style/index.less +348 -0
  193. package/lib/Select/index.js +1 -1
  194. package/lib/Select/rc-select/OptionList.js +8 -7
  195. package/lib/Select/rc-select/Selector/MultipleSelector.js +11 -1
  196. package/lib/Select/rc-select/hooks/useOptions.d.ts +1 -1
  197. package/lib/Select/style/index.less +70 -45
  198. package/lib/Select/style/variables.less +45 -45
  199. package/lib/Select/utils/iconUtil.d.ts +2 -2
  200. package/lib/Select/utils/iconUtil.js +13 -7
  201. package/lib/Steps/components/ProcessIcon/index.d.ts +6 -0
  202. package/lib/Steps/components/ProcessIcon/index.js +19 -0
  203. package/lib/Steps/components/Step/index.d.ts +20 -0
  204. package/lib/Steps/components/Step/index.js +61 -0
  205. package/lib/Steps/index.d.ts +36 -2
  206. package/lib/Steps/index.js +34 -1
  207. package/lib/Steps/matchMedia.mock.d.ts +1 -0
  208. package/lib/Steps/matchMedia.mock.js +17 -0
  209. package/lib/Steps/style/index.less +251 -0
  210. package/lib/Switch/index.d.ts +46 -2
  211. package/lib/Switch/index.js +78 -1
  212. package/lib/Switch/style/index.less +129 -0
  213. package/lib/Table/Table.d.ts +2 -1
  214. package/lib/Table/Table.js +228 -332
  215. package/lib/Table/components/Empty/index.d.ts +3 -0
  216. package/lib/Table/components/Empty/index.js +30 -0
  217. package/lib/Table/components/Loading/index.d.ts +3 -0
  218. package/lib/Table/components/Loading/index.js +33 -0
  219. package/lib/Table/components/TableBodyRowList/index.d.ts +13 -0
  220. package/lib/Table/components/TableBodyRowList/index.js +108 -0
  221. package/lib/Table/components/TableHead/index.d.ts +23 -0
  222. package/lib/Table/components/TableHead/index.js +286 -0
  223. package/lib/Table/constant.d.ts +1 -0
  224. package/lib/Table/constant.js +1 -0
  225. package/lib/Table/hooks/useFrame.d.ts +7 -0
  226. package/lib/Table/hooks/useFrame.js +98 -0
  227. package/lib/Table/hooks/useTableColumn.d.ts +28 -0
  228. package/lib/Table/hooks/useTableColumn.js +66 -0
  229. package/lib/Table/interface.d.ts +3 -2
  230. package/lib/Table/style/index.less +33 -30
  231. package/lib/Table/utils.d.ts +15 -0
  232. package/lib/Table/utils.js +147 -0
  233. package/lib/Tabs/index.js +9 -11
  234. package/lib/Tabs/style/index.less +57 -25
  235. package/lib/_utils/hooks/useId.d.ts +4 -0
  236. package/lib/_utils/hooks/useId.js +36 -0
  237. package/lib/index.d.ts +9 -5
  238. package/lib/index.js +16 -0
  239. package/lib/locale/default.d.ts +2 -0
  240. package/lib/locale/default.js +13 -0
  241. package/lib/locale/en_US.d.ts +3 -0
  242. package/lib/locale/en_US.js +146 -0
  243. package/lib/locale/zh_CN.d.ts +3 -2
  244. package/lib/locale/zh_CN.js +134 -2
  245. package/lib/locale-provider/LocaleReceiver.d.ts +4 -0
  246. package/lib/locale-provider/LocaleReceiver.js +23 -0
  247. package/lib/locale-provider/context.d.ts +7 -0
  248. package/lib/locale-provider/context.js +12 -0
  249. package/lib/locale-provider/default.d.ts +2 -0
  250. package/lib/locale-provider/default.js +13 -0
  251. package/lib/locale-provider/en_US.d.ts +2 -0
  252. package/lib/locale-provider/en_US.js +13 -0
  253. package/lib/locale-provider/index.d.ts +65 -0
  254. package/lib/locale-provider/index.js +116 -0
  255. package/lib/locale-provider/style/index.d.ts +1 -0
  256. package/lib/locale-provider/style/index.js +3 -0
  257. package/lib/locale-provider/style/index.less +2 -0
  258. package/lib/locale-provider/zh_CN.d.ts +2 -0
  259. package/lib/locale-provider/zh_CN.js +13 -0
  260. package/lib/style/index.d.ts +0 -1
  261. package/lib/style/index.js +0 -2
  262. package/lib/style/index.less +2 -2
  263. package/lib/style/themes/default/index.less +30 -30
  264. package/package.json +11 -8
@@ -7,14 +7,14 @@ interface IShowCountProps {
7
7
  maxLength?: number;
8
8
  }) => string;
9
9
  }
10
- export declare type TSize = 'mini' | 'small' | 'default' | 'large';
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' | 'default' | 'large';
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;
@@ -1,4 +1,4 @@
1
- var _excluded = ["size"];
1
+ var _excluded = ["size", "className"];
2
2
 
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
 
@@ -7,35 +7,23 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
7
7
  import React from 'react';
8
8
  import AntdInput from 'antd/lib/input/Input';
9
9
  import classnames from 'classnames';
10
+ export function getSizeType(sizeType) {
11
+ if (['mini', 'small', 'middle', 'large'].includes(sizeType)) {
12
+ return sizeType;
13
+ }
14
+
15
+ return 'middle';
16
+ }
10
17
  var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
11
18
  var _props$size = props.size,
12
- size = _props$size === void 0 ? 'default' : _props$size,
19
+ size = _props$size === void 0 ? 'middle' : _props$size,
20
+ className = props.className,
13
21
  rest = _objectWithoutProperties(props, _excluded);
14
22
 
15
- var getInputSize = function getInputSize(inputSize) {
16
- if (inputSize === 'small' || inputSize === 'large') {
17
- return inputSize;
18
- }
19
-
20
- return 'middle';
21
- };
22
-
23
- var getClassName = function getClassName(inputSize) {
24
- return classnames('ald-input', {
25
- 'ald-input-small': inputSize === 'small',
26
- 'ald-input-large': inputSize === 'large',
27
- 'ald-input-mini': inputSize === 'mini',
28
- 'ald-input-middle': !['small', 'mini', 'large'].includes(inputSize),
29
- 'ald-input-showCount': props.showCount
30
- });
31
- };
32
-
33
23
  return /*#__PURE__*/React.createElement(AntdInput, Object.assign({}, rest, {
34
- // @ts-ignore
35
24
  ref: ref,
36
- size: getInputSize(size),
37
25
  bordered: true,
38
- className: getClassName(size),
26
+ className: classnames('ald-input', "ald-input-".concat(getSizeType(size)), className),
39
27
  addonAfter: null,
40
28
  addonBefore: null,
41
29
  suffix: null
@@ -1,36 +1,31 @@
1
- var _excluded = ["size"];
1
+ import "@aloudata/icons-react/styles/index.less";
2
+ import _EyeOffLine from "@aloudata/icons-react/es/icons/EyeOffLine";
3
+ import "@aloudata/icons-react/styles/index.less";
4
+ import _EyeOnLine from "@aloudata/icons-react/es/icons/EyeOnLine";
5
+ var _excluded = ["size", "className"];
2
6
 
3
7
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
8
 
5
9
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
6
10
 
7
11
  import React from 'react';
8
- import EyeOffLine from '../../../Icon/icons/EyeOffLine';
9
- import EyeOnLine from '../../../Icon/icons/EyeOnLine';
10
12
  import AntdPassword from 'antd/lib/input/Password';
13
+ import { getSizeType } from '../Input';
11
14
  import classnames from 'classnames'; // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
15
 
13
16
  export default /*#__PURE__*/React.forwardRef(function (props, ref) {
14
17
  var _props$size = props.size,
15
- size = _props$size === void 0 ? 'default' : _props$size,
18
+ size = _props$size === void 0 ? 'middle' : _props$size,
19
+ className = props.className,
16
20
  restProps = _objectWithoutProperties(props, _excluded);
17
21
 
18
- var getClassName = function getClassName(inputSize) {
19
- return classnames('ald-input', {
20
- 'ald-input-small': inputSize === 'small',
21
- 'ald-input-large': inputSize === 'large',
22
- 'ald-input-mini': inputSize === 'mini',
23
- 'ald-input-middle': !['small', 'mini', 'large'].includes(inputSize)
24
- });
25
- };
26
-
27
22
  return /*#__PURE__*/React.createElement(AntdPassword, Object.assign({}, restProps, {
28
23
  ref: ref,
29
- className: getClassName(size),
24
+ className: classnames('ald-input', "ald-input-".concat(getSizeType(size)), className),
30
25
  iconRender: function iconRender(visible) {
31
- return visible ? /*#__PURE__*/React.createElement(EyeOnLine, {
26
+ return visible ? /*#__PURE__*/React.createElement(_EyeOnLine, {
32
27
  fill: "currentColor"
33
- }) : /*#__PURE__*/React.createElement(EyeOffLine, {
28
+ }) : /*#__PURE__*/React.createElement(_EyeOffLine, {
34
29
  fill: "currentColor"
35
30
  });
36
31
  }
@@ -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;
@@ -1,4 +1,4 @@
1
- var _excluded = ["bordered"];
1
+ var _excluded = ["bordered", "size", "className"];
2
2
 
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
 
@@ -6,12 +6,19 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
6
6
 
7
7
  import React from 'react';
8
8
  import AntdTextArea from 'antd/lib/input/TextArea';
9
+ import classnames from 'classnames';
10
+ import { getSizeType } from '../Input';
9
11
  export default /*#__PURE__*/React.forwardRef(function (props, ref) {
10
12
  var _props$bordered = props.bordered,
11
13
  bordered = _props$bordered === void 0 ? true : _props$bordered,
14
+ _props$size = props.size,
15
+ size = _props$size === void 0 ? 'middle' : _props$size,
16
+ _props$className = props.className,
17
+ className = _props$className === void 0 ? '' : _props$className,
12
18
  rest = _objectWithoutProperties(props, _excluded);
13
19
 
14
20
  return /*#__PURE__*/React.createElement(AntdTextArea, Object.assign({}, rest, {
21
+ className: classnames('ald-input-textarea', "ald-input-textarea-".concat(getSizeType(size)), className),
15
22
  ref: ref,
16
23
  bordered: bordered
17
24
  }));
@@ -6,57 +6,57 @@
6
6
 
7
7
  @ald-iconfont-css-prefix: anticon;
8
8
  // size===large
9
- @Input-height-large: 36px;
10
- @Input-padding-large: 5px 11px;
11
- @Input-fontSize-large: 16px;
12
- @Input-borderRadius-large: 8px;
13
- @input-prefix-marginRight-large: 8px;
9
+ @input-height-large: 36px;
10
+ @input-padding-large: 5px 11px;
11
+ @input-font-size-large: 16px;
12
+ @input-border-radius-large: 8px;
13
+ @input-prefix-margin-right-large: 8px;
14
14
  // size===middle
15
- @Input-height-middle: 32px;
16
- @Input-padding-middle: 5px 11px;
17
- @Input-fontSize-middle: 14px;
18
- @Input-borderRadius-middle: 6px;
19
- @input-prefix-marginRight-middle: 8px;
15
+ @input-height-middle: 32px;
16
+ @input-padding-middle: 5px 11px;
17
+ @input-font-size-middle: 14px;
18
+ @input-border-radius-middle: 6px;
19
+ @input-prefix-margin-right-middle: 8px;
20
20
  // size===small
21
- @Input-height-small: 28px;
22
- @Input-padding-small: 5px 7px;
23
- @Input-fontSize-small: 12px;
24
- @Input-borderRadius-small: 4px;
25
- @input-prefix-marginRight-small: 4px;
21
+ @input-height-small: 28px;
22
+ @input-padding-small: 5px 7px;
23
+ @input-font-size-small: 12px;
24
+ @input-border-radius-small: 4px;
25
+ @input-prefix-margin-right-small: 4px;
26
26
  // size===mini
27
- @Input-height-mini: 24px;
28
- @Input-padding-mini: 3px 7px;
29
- @Input-fontSize-mini: 12px;
30
- @Input-borderRadius-mini: 4px;
31
- @input-prefix-marginRight-mini: 4px;
27
+ @input-height-mini: 24px;
28
+ @input-padding-mini: 3px 7px;
29
+ @input-font-size-mini: 12px;
30
+ @input-border-radius-mini: 4px;
31
+ @input-prefix-margin-right-mini: 4px;
32
32
  //custom status
33
- @Input-borderColor: @NL90;
34
- @Input-fontColor: @NL0;
35
- @Input-placeholderColor: @NL80;
36
- @Input-prefix-color: @NL50;
37
- @Input-bgColor: @BG97;
33
+ @input-border-color: @NL90;
34
+ @input-fontColor: @NL0;
35
+ @input-placeholder-color: @NL80;
36
+ @input-prefix-color: @NL50;
37
+ @input-bg-color: @BG97;
38
38
  // active status
39
- @Input-active-borderColor: @B60;
40
- @Input-boxShadow-active: 0 0 0 0.5px @B60;
39
+ @input-active-border-color: @B60;
40
+ @input-box-shadow-active: 0 0 0 0.5px @B60;
41
41
  // disabled status
42
- @Input-disabled-borderColor: @NL90;
43
- @Input-disabled-bgColor: @BG95;
44
- @Input-disabled-fontColor: @NL60;
42
+ @input-disabled-border-color: @NL90;
43
+ @input-disabled-bg-color: @BG95;
44
+ @input-disabled-font-color: @NL60;
45
45
 
46
46
  .ant-input.ald-input {
47
47
  color: @NL0;
48
48
  font-weight: 400;
49
- background-color: @Input-bgColor;
50
- border-color: @Input-borderColor;
51
- border-radius: @Input-borderRadius-middle;
49
+ background-color: @input-bg-color;
50
+ border-color: @input-border-color;
51
+ border-radius: @input-border-radius-middle;
52
52
  caret-color: @B60;
53
53
 
54
54
  &::placeholder {
55
- color: @Input-placeholderColor;
55
+ color: @input-placeholder-color;
56
56
  }
57
57
 
58
58
  &-prefix {
59
- color: @Input-prefix-color;
59
+ color: @input-prefix-color;
60
60
  font-size: inherit;
61
61
  }
62
62
 
@@ -67,19 +67,19 @@
67
67
  &:focus,
68
68
  &:hover,
69
69
  &-focused {
70
- border-color: @Input-active-borderColor;
71
- box-shadow: @Input-boxShadow-active;
70
+ border-color: @input-active-border-color;
71
+ box-shadow: @input-box-shadow-active;
72
72
  }
73
73
 
74
74
  &[disabled].ald-input {
75
- color: @Input-disabled-fontColor;
76
- background-color: @Input-disabled-bgColor;
77
- border-color: @Input-disabled-borderColor;
75
+ color: @input-disabled-font-color;
76
+ background-color: @input-disabled-bg-color;
77
+ border-color: @input-disabled-border-color;
78
78
  box-shadow: none;
79
79
  cursor: default;
80
80
 
81
81
  &::placeholder {
82
- color: @Input-placeholderColor;
82
+ color: @input-placeholder-color;
83
83
  }
84
84
  }
85
85
 
@@ -106,24 +106,25 @@
106
106
  }
107
107
 
108
108
  .ant-input-affix-wrapper.ant-input-affix-wrapper {
109
- background-color: @Input-bgColor;
110
- border-color: @Input-borderColor;
109
+ background-color: @input-bg-color;
110
+ border-color: @input-border-color;
111
111
 
112
112
  &:hover,
113
113
  &:focus,
114
114
  &-focused {
115
- border-color: @Input-active-borderColor;
116
- box-shadow: @Input-boxShadow-active;
115
+ border-color: @input-active-border-color;
116
+ box-shadow: @input-box-shadow-active;
117
117
  }
118
118
 
119
119
  .ant-input {
120
120
  color: @NL0;
121
- background-color: @Input-bgColor;
121
+ background-color: @input-bg-color;
122
122
  border-radius: 0;
123
+ box-shadow: none;
123
124
  caret-color: @B60;
124
125
 
125
126
  &::placeholder {
126
- color: @Input-placeholderColor;
127
+ color: @input-placeholder-color;
127
128
  }
128
129
  }
129
130
 
@@ -154,58 +155,62 @@
154
155
 
155
156
  .ant-input-affix-wrapper-focused {
156
157
  &.ant-input-password {
157
- border-color: @Input-active-borderColor;
158
- box-shadow: @Input-boxShadow-active;
158
+ border-color: @input-active-border-color;
159
+ box-shadow: @input-box-shadow-active;
159
160
  }
160
161
 
161
162
  &:hover {
162
- border-color: @Input-active-borderColor;
163
- box-shadow: @Input-boxShadow-active;
163
+ border-color: @input-active-border-color;
164
+ box-shadow: @input-box-shadow-active;
165
+ }
166
+
167
+ .ant-input:hover {
168
+ box-shadow: none;
164
169
  }
165
170
  }
166
171
 
167
172
  .ald-input {
168
173
  &.ald-input-mini {
169
- height: @Input-height-mini;
170
- padding: @Input-padding-mini;
171
- font-size: @Input-fontSize-mini;
172
- border-radius: @Input-borderRadius-mini;
174
+ height: @input-height-mini;
175
+ padding: @input-padding-mini;
176
+ font-size: @input-font-size-mini;
177
+ border-radius: @input-border-radius-mini;
173
178
 
174
179
  .ant-input-prefix {
175
- margin-right: @input-prefix-marginRight-mini;
180
+ margin-right: @input-prefix-margin-right-mini;
176
181
  }
177
182
  }
178
183
 
179
184
  &.ald-input-small {
180
- height: @Input-height-small;
181
- padding: @Input-padding-small;
182
- font-size: @Input-fontSize-small;
183
- border-radius: @Input-borderRadius-small;
185
+ height: @input-height-small;
186
+ padding: @input-padding-small;
187
+ font-size: @input-font-size-small;
188
+ border-radius: @input-border-radius-small;
184
189
 
185
190
  .ant-input-prefix {
186
- margin-right: @input-prefix-marginRight-small;
191
+ margin-right: @input-prefix-margin-right-small;
187
192
  }
188
193
  }
189
194
 
190
195
  &.ald-input-middle {
191
- height: @Input-height-middle;
192
- padding: @Input-padding-middle;
193
- font-size: @Input-fontSize-middle;
194
- border-radius: @Input-borderRadius-middle;
196
+ height: @input-height-middle;
197
+ padding: @input-padding-middle;
198
+ font-size: @input-font-size-middle;
199
+ border-radius: @input-border-radius-middle;
195
200
 
196
201
  .ant-input-prefix {
197
- margin-right: @input-prefix-marginRight-middle;
202
+ margin-right: @input-prefix-margin-right-middle;
198
203
  }
199
204
  }
200
205
 
201
206
  &.ald-input-large {
202
- height: @Input-height-large;
203
- padding: @Input-padding-large;
204
- font-size: @Input-fontSize-large;
205
- border-radius: @Input-borderRadius-large;
207
+ height: @input-height-large;
208
+ padding: @input-padding-large;
209
+ font-size: @input-font-size-large;
210
+ border-radius: @input-border-radius-large;
206
211
 
207
212
  .ant-input-prefix {
208
- margin-right: @input-prefix-marginRight-large;
213
+ margin-right: @input-prefix-margin-right-large;
209
214
  }
210
215
  }
211
216
  }
@@ -218,27 +223,27 @@
218
223
 
219
224
  .ald-input-group-large {
220
225
  .ald-input {
221
- height: @Input-height-large;
222
- padding: @Input-padding-large;
223
- font-size: @Input-fontSize-large;
226
+ height: @input-height-large;
227
+ padding: @input-padding-large;
228
+ font-size: @input-font-size-large;
224
229
 
225
230
  &.ant-input {
226
- border-radius: @Input-borderRadius-large;
231
+ border-radius: @input-border-radius-large;
227
232
  }
228
233
 
229
234
  .ant-input-prefix {
230
- margin-right: @input-prefix-marginRight-large;
235
+ margin-right: @input-prefix-margin-right-large;
231
236
  }
232
237
  }
233
238
 
234
239
  &.ant-input-group-compact {
235
240
  .ald-input {
236
241
  &:first-of-type {
237
- border-radius: @Input-borderRadius-large 0 0 @Input-borderRadius-large;
242
+ border-radius: @input-border-radius-large 0 0 @input-border-radius-large;
238
243
  }
239
244
 
240
245
  &:last-of-type {
241
- border-radius: 0 @Input-borderRadius-large @Input-borderRadius-large 0;
246
+ border-radius: 0 @input-border-radius-large @input-border-radius-large 0;
242
247
  }
243
248
  }
244
249
  }
@@ -246,28 +251,28 @@
246
251
 
247
252
  .ald-input-group-middle {
248
253
  .ald-input {
249
- height: @Input-height-middle;
250
- padding: @Input-padding-middle;
251
- font-size: @Input-fontSize-middle;
252
- border-radius: @Input-borderRadius-middle;
254
+ height: @input-height-middle;
255
+ padding: @input-padding-middle;
256
+ font-size: @input-font-size-middle;
257
+ border-radius: @input-border-radius-middle;
253
258
 
254
259
  &.ant-input {
255
- border-radius: @Input-borderRadius-middle;
260
+ border-radius: @input-border-radius-middle;
256
261
  }
257
262
 
258
263
  .ant-input-prefix {
259
- margin-right: @input-prefix-marginRight-middle;
264
+ margin-right: @input-prefix-margin-right-middle;
260
265
  }
261
266
  }
262
267
 
263
268
  &.ant-input-group-compact {
264
269
  .ald-input {
265
270
  &:first-of-type {
266
- border-radius: @Input-borderRadius-middle 0 0 @Input-borderRadius-middle;
271
+ border-radius: @input-border-radius-middle 0 0 @input-border-radius-middle;
267
272
  }
268
273
 
269
274
  &:last-of-type {
270
- border-radius: 0 @Input-borderRadius-middle @Input-borderRadius-middle 0;
275
+ border-radius: 0 @input-border-radius-middle @input-border-radius-middle 0;
271
276
  }
272
277
  }
273
278
  }
@@ -275,28 +280,28 @@
275
280
 
276
281
  .ald-input-group-small {
277
282
  .ald-input {
278
- height: @Input-height-small;
279
- padding: @Input-padding-small;
280
- font-size: @Input-fontSize-small;
281
- border-radius: @Input-borderRadius-small;
283
+ height: @input-height-small;
284
+ padding: @input-padding-small;
285
+ font-size: @input-font-size-small;
286
+ border-radius: @input-border-radius-small;
282
287
 
283
288
  &.ant-input {
284
- border-radius: @Input-borderRadius-small;
289
+ border-radius: @input-border-radius-small;
285
290
  }
286
291
 
287
292
  .ant-input-prefix {
288
- margin-right: @input-prefix-marginRight-small;
293
+ margin-right: @input-prefix-margin-right-small;
289
294
  }
290
295
  }
291
296
 
292
297
  &.ant-input-group-compact {
293
298
  .ald-input {
294
299
  &:first-of-type {
295
- border-radius: @Input-borderRadius-small 0 0 @Input-borderRadius-small;
300
+ border-radius: @input-border-radius-small 0 0 @input-border-radius-small;
296
301
  }
297
302
 
298
303
  &:last-of-type {
299
- border-radius: 0 @Input-borderRadius-small @Input-borderRadius-small 0;
304
+ border-radius: 0 @input-border-radius-small @input-border-radius-small 0;
300
305
  }
301
306
  }
302
307
  }
@@ -304,29 +309,102 @@
304
309
 
305
310
  .ald-input-group-mini {
306
311
  .ald-input {
307
- height: @Input-height-mini;
308
- padding: @Input-padding-mini;
309
- font-size: @Input-fontSize-mini;
310
- border-radius: @Input-borderRadius-mini;
312
+ height: @input-height-mini;
313
+ padding: @input-padding-mini;
314
+ font-size: @input-font-size-mini;
315
+ border-radius: @input-border-radius-mini;
311
316
 
312
317
  &.ant-input {
313
- border-radius: @Input-borderRadius-mini;
318
+ border-radius: @input-border-radius-mini;
314
319
  }
315
320
 
316
321
  .ant-input-prefix {
317
- margin-right: @input-prefix-marginRight-mini;
322
+ margin-right: @input-prefix-margin-right-mini;
318
323
  }
319
324
  }
320
325
 
321
326
  &.ant-input-group-compact {
322
327
  .ald-input {
323
328
  &:first-of-type {
324
- border-radius: @Input-borderRadius-mini 0 0 @Input-borderRadius-mini;
329
+ border-radius: @input-border-radius-mini 0 0 @input-border-radius-mini;
325
330
  }
326
331
 
327
332
  &:last-of-type {
328
- border-radius: 0 @Input-borderRadius-mini @Input-borderRadius-mini 0;
333
+ border-radius: 0 @input-border-radius-mini @input-border-radius-mini 0;
329
334
  }
330
335
  }
331
336
  }
332
337
  }
338
+
339
+ .ald-textarea-large {
340
+ padding: 5px 11px;
341
+ font-size: @font-size-large;
342
+ line-height: @line-height-large;
343
+ border-radius: @border-radius-large;
344
+ }
345
+
346
+ .ald-textarea-middle {
347
+ padding: 5px 11px;
348
+ font-size: @font-size-middle;
349
+ line-height: @line-height-middle;
350
+ border-radius: @border-radius-middle;
351
+ }
352
+
353
+ .ald-textarea-small {
354
+ padding: 5px 7px;
355
+ font-size: @font-size-small;
356
+ line-height: @line-height-small;
357
+ border-radius: @border-radius-small;
358
+ }
359
+
360
+ textarea.ald-input-textarea-large,
361
+ .ald-input-textarea-large .ant-input {
362
+ .ald-textarea-large();
363
+ }
364
+
365
+ textarea.ald-input-textarea-middle,
366
+ .ald-input-textarea-middle .ant-input {
367
+ .ald-textarea-middle();
368
+ }
369
+
370
+ textarea.ald-input-textarea-small,
371
+ .ald-input-textarea-small .ant-input {
372
+ .ald-textarea-small();
373
+ }
374
+
375
+ textarea.ald-input-textarea,
376
+ .ald-input-textarea .ant-input {
377
+ color: @NL0;
378
+ background: @BG97;
379
+ caret-color: @B60;
380
+
381
+ &:hover,
382
+ &:active,
383
+ &:focus {
384
+ border-color: @B60;
385
+ box-shadow: none;
386
+ }
387
+
388
+ ::placeholder {
389
+ color: @NL80;
390
+ }
391
+
392
+ &.ant-input-disabled {
393
+ color: @NL60;
394
+ background: @BG95;
395
+ cursor: initial;
396
+
397
+ &:hover,
398
+ &:active,
399
+ &:focus {
400
+ border-color: @NL90;
401
+ box-shadow: none;
402
+ }
403
+ }
404
+ }
405
+
406
+ .ant-input-textarea-show-count::after {
407
+ color: @NL50;
408
+ font-size: 11px;
409
+ line-height: 16px;
410
+ }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { InputNumberProps } from 'antd';
2
3
  export default function InputNumber(props: InputNumberProps): JSX.Element;
3
4
  export type { InputNumberProps };