@aloudata/aloudata-design 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -5
- 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/Dropdown/Button.js +3 -3
- package/es/Icon/icons/CheckLine.d.ts +13 -0
- package/es/Icon/icons/CheckLine.js +73 -0
- package/es/Modal/index.js +16 -9
- package/es/Modal/locale.d.ts +7 -0
- package/es/Modal/locale.js +20 -0
- package/es/Navigator/components/MenuItem/index.d.ts +1 -1
- package/es/Navigator/index.d.ts +1 -1
- package/es/Select/rc-select/OptionList.js +3 -4
- package/es/Select/rc-select/Selector/MultipleSelector.js +11 -1
- package/es/Select/style/index.less +24 -0
- package/es/Select/utils/iconUtil.d.ts +2 -2
- package/es/Select/utils/iconUtil.js +7 -5
- package/es/Table/Table.js +3 -3
- package/es/Tabs/index.js +6 -9
- package/es/Tabs/style/index.less +32 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +1 -0
- 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 +61 -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/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/Dropdown/Button.js +3 -3
- package/lib/Icon/icons/CheckLine.d.ts +13 -0
- package/lib/Icon/icons/CheckLine.js +90 -0
- package/lib/Modal/index.js +18 -9
- package/lib/Modal/locale.d.ts +7 -0
- package/lib/Modal/locale.js +31 -0
- package/lib/Navigator/components/MenuItem/index.d.ts +1 -1
- package/lib/Navigator/index.d.ts +1 -1
- package/lib/Select/rc-select/OptionList.js +3 -4
- package/lib/Select/rc-select/Selector/MultipleSelector.js +11 -1
- package/lib/Select/style/index.less +24 -0
- package/lib/Select/utils/iconUtil.d.ts +2 -2
- package/lib/Select/utils/iconUtil.js +9 -5
- package/lib/Table/Table.js +3 -3
- package/lib/Tabs/index.js +6 -10
- package/lib/Tabs/style/index.less +32 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +8 -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 +61 -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/package.json +10 -8
package/README.md
CHANGED
|
@@ -221,8 +221,18 @@ api展示为表格形势,可以使用**API**标签,如:
|
|
|
221
221
|
|
|
222
222
|
请在./public/style/common.css 中自定义修改样式
|
|
223
223
|
|
|
224
|
-
##
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
224
|
+
## 按需引用
|
|
225
|
+
|
|
226
|
+
```js
|
|
227
|
+
[
|
|
228
|
+
'import',
|
|
229
|
+
{
|
|
230
|
+
libraryName: '@aloudata/aloudata-design',
|
|
231
|
+
libraryDirectory: 'es',
|
|
232
|
+
style:(name)=>{
|
|
233
|
+
return `${name}/style/index.less`
|
|
234
|
+
},
|
|
235
|
+
camel2DashComponentName: false,
|
|
236
|
+
},
|
|
237
|
+
]
|
|
238
|
+
```
|
package/es/Card/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '../../style/index.less';
|
package/es/Dropdown/Button.js
CHANGED
|
@@ -9,7 +9,7 @@ import Button from '../Button';
|
|
|
9
9
|
import '../Button/style'; // eslint-disable-next-line import/no-cycle
|
|
10
10
|
|
|
11
11
|
import Dropdown from './index';
|
|
12
|
-
import
|
|
12
|
+
import ArrowsDownLine from '../Icon/icons/ArrowsDownLine';
|
|
13
13
|
export default function DropdownButton(props) {
|
|
14
14
|
var children = props.children,
|
|
15
15
|
overlay = props.overlay,
|
|
@@ -27,7 +27,7 @@ export default function DropdownButton(props) {
|
|
|
27
27
|
visible: visible,
|
|
28
28
|
disabled: disabled,
|
|
29
29
|
onVisibleChange: onVisibleChange
|
|
30
|
-
}, /*#__PURE__*/React.createElement(Button, Object.assign({}, buttonProps), children, /*#__PURE__*/React.createElement(
|
|
31
|
-
|
|
30
|
+
}, /*#__PURE__*/React.createElement(Button, Object.assign({}, buttonProps), children, /*#__PURE__*/React.createElement(ArrowsDownLine, {
|
|
31
|
+
fill: "currentColor"
|
|
32
32
|
})));
|
|
33
33
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface IconProps extends React.SVGProps<SVGSVGElement> {
|
|
3
|
+
size?: string | number;
|
|
4
|
+
width?: string | number;
|
|
5
|
+
height?: string | number;
|
|
6
|
+
spin?: boolean;
|
|
7
|
+
rtl?: boolean;
|
|
8
|
+
color?: string;
|
|
9
|
+
fill?: string;
|
|
10
|
+
stroke?: string;
|
|
11
|
+
}
|
|
12
|
+
export default function CheckLine(props: IconProps): JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
var _excluded = ["size", "width", "height", "spin", "rtl", "color", "fill", "stroke", "className"];
|
|
2
|
+
|
|
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
|
+
|
|
5
|
+
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
|
+
|
|
7
|
+
import React, { useEffect, useRef } from 'react';
|
|
8
|
+
import styles from './style.css';
|
|
9
|
+
export default function CheckLine(props) {
|
|
10
|
+
var root = useRef(null);
|
|
11
|
+
|
|
12
|
+
var _props$size = props.size,
|
|
13
|
+
size = _props$size === void 0 ? '1em' : _props$size,
|
|
14
|
+
width = props.width,
|
|
15
|
+
height = props.height,
|
|
16
|
+
spin = props.spin,
|
|
17
|
+
rtl = props.rtl,
|
|
18
|
+
color = props.color,
|
|
19
|
+
fill = props.fill,
|
|
20
|
+
stroke = props.stroke,
|
|
21
|
+
className = props.className,
|
|
22
|
+
rest = _objectWithoutProperties(props, _excluded);
|
|
23
|
+
|
|
24
|
+
var _width = width || size;
|
|
25
|
+
|
|
26
|
+
var _height = height || size;
|
|
27
|
+
|
|
28
|
+
var _stroke = stroke || color;
|
|
29
|
+
|
|
30
|
+
var _fill = fill || color;
|
|
31
|
+
|
|
32
|
+
useEffect(function () {
|
|
33
|
+
if (!_fill) {
|
|
34
|
+
var _root$current;
|
|
35
|
+
|
|
36
|
+
(_root$current = root.current) === null || _root$current === void 0 ? void 0 : _root$current.querySelectorAll('[data-follow-fill]').forEach(function (item) {
|
|
37
|
+
item.setAttribute('fill', item.getAttribute('data-follow-fill') || '');
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (!_stroke) {
|
|
42
|
+
var _root$current2;
|
|
43
|
+
|
|
44
|
+
(_root$current2 = root.current) === null || _root$current2 === void 0 ? void 0 : _root$current2.querySelectorAll('[data-follow-stroke]').forEach(function (item) {
|
|
45
|
+
item.setAttribute('stroke', item.getAttribute('data-follow-stroke') || '');
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}, [stroke, color, fill]);
|
|
49
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
50
|
+
ref: root,
|
|
51
|
+
width: _width,
|
|
52
|
+
height: _height,
|
|
53
|
+
viewBox: "0 0 24 24",
|
|
54
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
55
|
+
fill: "none",
|
|
56
|
+
role: "presentation",
|
|
57
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
58
|
+
className: "".concat(className || '', " ").concat(spin ? styles.spin : '', " ").concat(rtl ? styles.rtl : '').trim()
|
|
59
|
+
}, rest), /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("g", {
|
|
60
|
+
clipPath: "url(#650c5__a)"
|
|
61
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
62
|
+
"data-follow-fill": "#001A33",
|
|
63
|
+
fillRule: "evenodd",
|
|
64
|
+
clipRule: "evenodd",
|
|
65
|
+
d: "M23.646 2.237a1 1 0 0 1 .117 1.41L9.023 21.051l-.002.003a2.69 2.69 0 0 1-.942.705 2.727 2.727 0 0 1-2.313-.036 2.684 2.684 0 0 1-.931-.749L.218 15.183a1 1 0 0 1 1.564-1.247l4.623 5.8a.684.684 0 0 0 .238.19.727.727 0 0 0 .615.01.688.688 0 0 0 .24-.179H7.5L22.237 2.353a1 1 0 0 1 1.41-.117Z",
|
|
66
|
+
fill: _fill
|
|
67
|
+
})), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
|
|
68
|
+
id: "650c5__a"
|
|
69
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
70
|
+
d: "M0 0h24v24H0z",
|
|
71
|
+
fill: "#fff"
|
|
72
|
+
})))));
|
|
73
|
+
}
|
package/es/Modal/index.js
CHANGED
|
@@ -12,6 +12,8 @@ import confirm, { withWarn, withInfo, withSuccess, withError, withConfirm, modal
|
|
|
12
12
|
import classNames from 'classnames';
|
|
13
13
|
import Button from '../Button';
|
|
14
14
|
import CloseLine from '../Icon/icons/CloseLine';
|
|
15
|
+
import LocaleReceiver from '../locale-provider/LocaleReceiver';
|
|
16
|
+
import { getConfirmLocale } from './locale';
|
|
15
17
|
export var destroyFns = [];
|
|
16
18
|
|
|
17
19
|
function modalWarn(props) {
|
|
@@ -34,15 +36,20 @@ var OriginModal = function OriginModal(props) {
|
|
|
34
36
|
closeIcon = props.closeIcon,
|
|
35
37
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
36
38
|
|
|
37
|
-
var Footer = /*#__PURE__*/React.createElement(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
var Footer = /*#__PURE__*/React.createElement(LocaleReceiver, {
|
|
40
|
+
componentName: "Modal",
|
|
41
|
+
defaultLocale: getConfirmLocale()
|
|
42
|
+
}, function (locale) {
|
|
43
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
44
|
+
size: "large",
|
|
45
|
+
onClick: onCancel
|
|
46
|
+
}, cancelText || (locale === null || locale === void 0 ? void 0 : locale.cancelText)), /*#__PURE__*/React.createElement(Button, {
|
|
47
|
+
type: "primary",
|
|
48
|
+
loading: confirmLoading,
|
|
49
|
+
size: "large",
|
|
50
|
+
onClick: onOk
|
|
51
|
+
}, okText || (locale === null || locale === void 0 ? void 0 : locale.okText)));
|
|
52
|
+
});
|
|
46
53
|
return /*#__PURE__*/React.createElement(_Modal, Object.assign({}, restProps, {
|
|
47
54
|
onCancel: onCancel,
|
|
48
55
|
footer: footer !== undefined ? footer : Footer,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
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; }
|
|
2
|
+
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
|
|
5
|
+
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; }
|
|
6
|
+
|
|
7
|
+
import defaultLocale from '../locale/default';
|
|
8
|
+
|
|
9
|
+
var runtimeLocale = _objectSpread({}, defaultLocale.Modal);
|
|
10
|
+
|
|
11
|
+
export function changeConfirmLocale(newLocale) {
|
|
12
|
+
if (newLocale) {
|
|
13
|
+
runtimeLocale = _objectSpread(_objectSpread({}, runtimeLocale), newLocale);
|
|
14
|
+
} else {
|
|
15
|
+
runtimeLocale = _objectSpread({}, defaultLocale.Modal);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export function getConfirmLocale() {
|
|
19
|
+
return runtimeLocale;
|
|
20
|
+
}
|
package/es/Navigator/index.d.ts
CHANGED
|
@@ -47,5 +47,5 @@ export interface INavigatorProps {
|
|
|
47
47
|
}) => void;
|
|
48
48
|
}
|
|
49
49
|
export type { IMenuItem } from './components/Menu';
|
|
50
|
-
export type { ISelectedMenuInfo } from './components/MenuItem';
|
|
50
|
+
export type { ISelectedMenuInfo, IMenuItemContentProps } from './components/MenuItem';
|
|
51
51
|
export default Navigator;
|
|
@@ -39,7 +39,7 @@ import { isPlatformMac } from './utils/platformUtil';
|
|
|
39
39
|
import useBaseProps from './hooks/useBaseProps';
|
|
40
40
|
import SelectContext from './SelectContext';
|
|
41
41
|
import Checkbox from '../../Checkbox';
|
|
42
|
-
import
|
|
42
|
+
import CheckLine from '../../Icon/icons/CheckLine';
|
|
43
43
|
import colors from '../../style/themes/default/themeColor.module.less';
|
|
44
44
|
|
|
45
45
|
function isTitleType(content) {
|
|
@@ -382,10 +382,9 @@ var OptionList = function OptionList(_, ref) {
|
|
|
382
382
|
style: style
|
|
383
383
|
}), !multiple && /*#__PURE__*/React.createElement("div", {
|
|
384
384
|
className: 'ald-select-single-check'
|
|
385
|
-
}, selected && /*#__PURE__*/React.createElement(
|
|
385
|
+
}, selected && /*#__PURE__*/React.createElement(CheckLine, {
|
|
386
386
|
color: colors.B60,
|
|
387
|
-
size: '1em'
|
|
388
|
-
type: "check"
|
|
387
|
+
size: '1em'
|
|
389
388
|
})), multiple && /*#__PURE__*/React.createElement(Checkbox, {
|
|
390
389
|
className: 'ald-select-multiple-checkbox',
|
|
391
390
|
checked: selected,
|
|
@@ -48,7 +48,8 @@ var SelectSelector = function SelectSelector(props) {
|
|
|
48
48
|
removeIcon = props.removeIcon,
|
|
49
49
|
_props$maxTagCount = props.maxTagCount,
|
|
50
50
|
maxTagCount = _props$maxTagCount === void 0 ? "responsive" : _props$maxTagCount,
|
|
51
|
-
|
|
51
|
+
_props$maxTagTextLeng = props.maxTagTextLength,
|
|
52
|
+
maxTagTextLength = _props$maxTagTextLeng === void 0 ? 10 : _props$maxTagTextLeng,
|
|
52
53
|
_props$maxTagPlacehol = props.maxTagPlaceholder,
|
|
53
54
|
maxTagPlaceholder = _props$maxTagPlacehol === void 0 ? function (omittedValues) {
|
|
54
55
|
return "\u7B49".concat(omittedValues.length, "\u9879");
|
|
@@ -160,6 +161,15 @@ var SelectSelector = function SelectSelector(props) {
|
|
|
160
161
|
}
|
|
161
162
|
|
|
162
163
|
function renderRest(omittedValues) {
|
|
164
|
+
if (omittedValues.length === values.length && omittedValues.length) {
|
|
165
|
+
var length = values.length;
|
|
166
|
+
|
|
167
|
+
var _content = "\u5DF2\u9009".concat(length, "\u9879");
|
|
168
|
+
|
|
169
|
+
return defaultRenderSelector(_content, _content, false);
|
|
170
|
+
;
|
|
171
|
+
}
|
|
172
|
+
|
|
163
173
|
var content = typeof maxTagPlaceholder === 'function' ? maxTagPlaceholder(omittedValues) : maxTagPlaceholder;
|
|
164
174
|
return defaultRenderSelector(content, content, false);
|
|
165
175
|
} // >>> Input Node
|
|
@@ -143,6 +143,12 @@
|
|
|
143
143
|
line-height: @selector-lineHeight-large;
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
+
|
|
147
|
+
&.ant-select-show-arrow {
|
|
148
|
+
.ant-select-selector {
|
|
149
|
+
padding-right: @selector-paddingHorizontal-large + @selector-fontSize-large;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
146
152
|
}
|
|
147
153
|
|
|
148
154
|
&.ald-select-middle {
|
|
@@ -166,6 +172,12 @@
|
|
|
166
172
|
line-height: @selector-lineHeight-middle;
|
|
167
173
|
}
|
|
168
174
|
}
|
|
175
|
+
|
|
176
|
+
&.ant-select-show-arrow {
|
|
177
|
+
.ant-select-selector {
|
|
178
|
+
padding-right: @selector-paddingHorizontal-middle + @selector-fontSize-middle;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
169
181
|
}
|
|
170
182
|
|
|
171
183
|
&.ald-select-small {
|
|
@@ -189,6 +201,12 @@
|
|
|
189
201
|
line-height: @selector-lineHeight-small;
|
|
190
202
|
}
|
|
191
203
|
}
|
|
204
|
+
|
|
205
|
+
&.ant-select-show-arrow {
|
|
206
|
+
.ant-select-selector {
|
|
207
|
+
padding-right: @selector-paddingHorizontal-small + @selector-fontSize-small;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
192
210
|
}
|
|
193
211
|
|
|
194
212
|
&.ald-select-mini {
|
|
@@ -212,6 +230,12 @@
|
|
|
212
230
|
line-height: @selector-lineHeight-mini;
|
|
213
231
|
}
|
|
214
232
|
}
|
|
233
|
+
|
|
234
|
+
&.ant-select-show-arrow {
|
|
235
|
+
.ant-select-selector {
|
|
236
|
+
padding-right: @selector-paddingHorizontal-mini + @selector-fontSize-mini;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
215
239
|
}
|
|
216
240
|
|
|
217
241
|
&.ant-select-multiple {
|
|
@@ -18,7 +18,7 @@ export default function getIcons({ suffixIcon, clearIcon, menuItemSelectedIcon,
|
|
|
18
18
|
open: boolean;
|
|
19
19
|
showSearch: boolean;
|
|
20
20
|
}) => JSX.Element);
|
|
21
|
-
itemIcon:
|
|
22
|
-
removeIcon:
|
|
21
|
+
itemIcon: number | boolean | JSX.Element | React.ReactFragment | ((props: any) => React.ReactNode) | null;
|
|
22
|
+
removeIcon: number | boolean | JSX.Element | React.ReactFragment | ((props: any) => React.ReactNode) | null;
|
|
23
23
|
};
|
|
24
24
|
export {};
|
|
@@ -2,7 +2,9 @@ import * as React from 'react';
|
|
|
2
2
|
import LoadingOutlined from '@ant-design/icons/LoadingOutlined';
|
|
3
3
|
import CheckOutlined from '@ant-design/icons/CheckOutlined';
|
|
4
4
|
import CloseCircleFilled from '@ant-design/icons/CloseCircleFilled';
|
|
5
|
-
import
|
|
5
|
+
import CancelFill from '../../Icon/icons/CancelFill';
|
|
6
|
+
import Color from '../../style/themes/default/themeColor.module.less';
|
|
7
|
+
import ArrowsDownLine from '../../Icon/icons/ArrowsDownLine';
|
|
6
8
|
export default function getIcons(_ref) {
|
|
7
9
|
var suffixIcon = _ref.suffixIcon,
|
|
8
10
|
clearIcon = _ref.clearIcon,
|
|
@@ -44,8 +46,8 @@ export default function getIcons(_ref) {
|
|
|
44
46
|
// if (open && showSearch) {
|
|
45
47
|
// return getSuffixIconNode(<SearchOutlined className={iconCls} />);
|
|
46
48
|
// }
|
|
47
|
-
return getSuffixIconNode( /*#__PURE__*/React.createElement(
|
|
48
|
-
|
|
49
|
+
return getSuffixIconNode( /*#__PURE__*/React.createElement(ArrowsDownLine, {
|
|
50
|
+
color: Color.NL50,
|
|
49
51
|
className: iconCls
|
|
50
52
|
}));
|
|
51
53
|
};
|
|
@@ -67,8 +69,8 @@ export default function getIcons(_ref) {
|
|
|
67
69
|
if (removeIcon !== undefined) {
|
|
68
70
|
mergedRemoveIcon = removeIcon;
|
|
69
71
|
} else {
|
|
70
|
-
mergedRemoveIcon = /*#__PURE__*/React.createElement(
|
|
71
|
-
|
|
72
|
+
mergedRemoveIcon = /*#__PURE__*/React.createElement(CancelFill, {
|
|
73
|
+
color: Color.NL50,
|
|
72
74
|
size: '1em'
|
|
73
75
|
});
|
|
74
76
|
}
|
package/es/Table/Table.js
CHANGED
|
@@ -402,7 +402,7 @@ function Table(props, ref) {
|
|
|
402
402
|
}), row.cells.map(function (cell) {
|
|
403
403
|
return /*#__PURE__*/React.createElement("div", Object.assign({}, cell.getCellProps(), {
|
|
404
404
|
className: classnames("".concat(prefixCls, "-cell"))
|
|
405
|
-
}), cell.render('Cell'));
|
|
405
|
+
}), /*#__PURE__*/React.createElement(React.Fragment, null, cell.render('Cell')));
|
|
406
406
|
}));
|
|
407
407
|
});
|
|
408
408
|
};
|
|
@@ -456,9 +456,9 @@ function Table(props, ref) {
|
|
|
456
456
|
style: {
|
|
457
457
|
width: '100%'
|
|
458
458
|
}
|
|
459
|
-
}), column.render('Header'), /*#__PURE__*/React.createElement(SortIcons, {
|
|
459
|
+
}), /*#__PURE__*/React.createElement(React.Fragment, null, column.render('Header'), /*#__PURE__*/React.createElement(SortIcons, {
|
|
460
460
|
id: column.id
|
|
461
|
-
})), /*#__PURE__*/React.createElement("div", Object.assign({}, barPorps, {
|
|
461
|
+
}))), /*#__PURE__*/React.createElement("div", Object.assign({}, barPorps, {
|
|
462
462
|
className: classnames(_defineProperty({}, "".concat(prefixCls, "-dragBar"), resizeColumn), "".concat(prefixCls, "-bar"))
|
|
463
463
|
})));
|
|
464
464
|
}));
|
package/es/Tabs/index.js
CHANGED
|
@@ -14,8 +14,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
14
14
|
|
|
15
15
|
import React from 'react'; // import AntdTabs, { TabsProps } from 'antd/lib/tabs';
|
|
16
16
|
|
|
17
|
-
import
|
|
18
|
-
import Button from '../Button';
|
|
17
|
+
import More from '../Icon/icons/More';
|
|
19
18
|
import TabPane from './TabPane';
|
|
20
19
|
import classNames from 'classnames';
|
|
21
20
|
export default function Tabs(props) {
|
|
@@ -32,13 +31,11 @@ export default function Tabs(props) {
|
|
|
32
31
|
}
|
|
33
32
|
|
|
34
33
|
return /*#__PURE__*/React.createElement(_Tabs, Object.assign({
|
|
35
|
-
moreIcon: /*#__PURE__*/React.createElement(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
})
|
|
41
|
-
}),
|
|
34
|
+
moreIcon: /*#__PURE__*/React.createElement("div", {
|
|
35
|
+
className: "ald-tabs-moreIcon"
|
|
36
|
+
}, /*#__PURE__*/React.createElement(More, {
|
|
37
|
+
color: "currentColor"
|
|
38
|
+
})),
|
|
42
39
|
tabBarGutter: 24,
|
|
43
40
|
popupClassName: classNames(popupClassName, 'ald-tabs-dropdown'),
|
|
44
41
|
className: classNames('ald-tabs', className, {
|
package/es/Tabs/style/index.less
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* stylelint-disable no-descending-specificity */
|
|
1
2
|
@import '../../style/index.less';
|
|
2
3
|
@import '../../Button/style/index.less';
|
|
3
4
|
//status- default
|
|
@@ -60,6 +61,12 @@
|
|
|
60
61
|
.ant-tabs-ink-bar {
|
|
61
62
|
height: @Tabs-ink-link-bar-height-large;
|
|
62
63
|
}
|
|
64
|
+
|
|
65
|
+
.ald-tabs-moreIcon {
|
|
66
|
+
width: 36px;
|
|
67
|
+
height: 36px;
|
|
68
|
+
border-radius: 8px;
|
|
69
|
+
}
|
|
63
70
|
}
|
|
64
71
|
|
|
65
72
|
&.ald-tabs-default {
|
|
@@ -67,10 +74,35 @@
|
|
|
67
74
|
font-size: @Tabs-fontSize;
|
|
68
75
|
line-height: @Tabs-lineHeight;
|
|
69
76
|
}
|
|
77
|
+
|
|
78
|
+
.ald-tabs-moreIcon {
|
|
79
|
+
width: 32px;
|
|
80
|
+
height: 32px;
|
|
81
|
+
border-radius: 6px;
|
|
82
|
+
}
|
|
70
83
|
}
|
|
71
84
|
|
|
72
85
|
.ant-tabs-nav-more {
|
|
86
|
+
display: inline-flex;
|
|
87
|
+
align-items: center;
|
|
88
|
+
justify-content: center;
|
|
73
89
|
margin: 0 !important;
|
|
90
|
+
padding: 2px;
|
|
91
|
+
|
|
92
|
+
.ald-tabs-moreIcon {
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
justify-content: center;
|
|
96
|
+
color: inherit;
|
|
97
|
+
font-size: inherit;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&.ant-tabs-dropdown-open {
|
|
101
|
+
.ald-tabs-moreIcon {
|
|
102
|
+
color: @B60;
|
|
103
|
+
background-color: @NL97;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
74
106
|
}
|
|
75
107
|
|
|
76
108
|
/* body自适应高度 */
|
package/es/index.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export { default as Navigator } from './Navigator';
|
|
|
20
20
|
export type { INavigatorProps as NavigatorProps, IMenuItem as NavigatorMenu, ISelectedMenuInfo as SelectedMenuInfo, } from './Navigator';
|
|
21
21
|
export { default as Alert } from './Alert';
|
|
22
22
|
export type { AlertProps } from './Alert';
|
|
23
|
+
export { default as Card } from './Card';
|
|
24
|
+
export type { CardProps } from './Card';
|
|
23
25
|
export { default as Col } from './Col';
|
|
24
26
|
export type { ColProps } from './Col';
|
|
25
27
|
export type { TypographyProps } from './Typography';
|
package/es/index.js
CHANGED
|
@@ -9,6 +9,7 @@ export { default as Select } from './Select';
|
|
|
9
9
|
export { default as Table } from './Table';
|
|
10
10
|
export { default as Navigator } from './Navigator';
|
|
11
11
|
export { default as Alert } from './Alert';
|
|
12
|
+
export { default as Card } from './Card';
|
|
12
13
|
export { default as Col } from './Col';
|
|
13
14
|
export { default as Typography } from './Typography';
|
|
14
15
|
export { default as Upload } from './Upload';
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/* eslint-disable no-template-curly-in-string */
|
|
2
|
+
import Pagination from 'rc-pagination/lib/locale/en_US';
|
|
3
|
+
import Calendar from 'antd/es/calendar/locale/en_US';
|
|
4
|
+
import DatePicker from 'antd/es/date-picker/locale/en_US';
|
|
5
|
+
import TimePicker from 'antd/es/time-picker/locale/en_US';
|
|
6
|
+
var typeTemplate = '${label} is not a valid ${type}';
|
|
7
|
+
var localeValues = {
|
|
8
|
+
locale: 'en',
|
|
9
|
+
Pagination: Pagination,
|
|
10
|
+
DatePicker: DatePicker,
|
|
11
|
+
TimePicker: TimePicker,
|
|
12
|
+
Calendar: Calendar,
|
|
13
|
+
global: {
|
|
14
|
+
placeholder: 'Please select'
|
|
15
|
+
},
|
|
16
|
+
Table: {
|
|
17
|
+
filterTitle: 'Filter menu',
|
|
18
|
+
filterConfirm: 'OK',
|
|
19
|
+
filterReset: 'Reset',
|
|
20
|
+
filterEmptyText: 'No filters',
|
|
21
|
+
filterCheckall: 'Select all items',
|
|
22
|
+
filterSearchPlaceholder: 'Search in filters',
|
|
23
|
+
emptyText: 'No data',
|
|
24
|
+
selectAll: 'Select current page',
|
|
25
|
+
selectInvert: 'Invert current page',
|
|
26
|
+
selectNone: 'Clear all data',
|
|
27
|
+
selectionAll: 'Select all data',
|
|
28
|
+
sortTitle: 'Sort',
|
|
29
|
+
expand: 'Expand row',
|
|
30
|
+
collapse: 'Collapse row',
|
|
31
|
+
triggerDesc: 'Click to sort descending',
|
|
32
|
+
triggerAsc: 'Click to sort ascending',
|
|
33
|
+
cancelSort: 'Click to cancel sorting'
|
|
34
|
+
},
|
|
35
|
+
Modal: {
|
|
36
|
+
okText: 'OK',
|
|
37
|
+
cancelText: 'Cancel',
|
|
38
|
+
justOkText: 'OK'
|
|
39
|
+
},
|
|
40
|
+
Popconfirm: {
|
|
41
|
+
okText: 'OK',
|
|
42
|
+
cancelText: 'Cancel'
|
|
43
|
+
},
|
|
44
|
+
Transfer: {
|
|
45
|
+
titles: ['', ''],
|
|
46
|
+
searchPlaceholder: 'Search here',
|
|
47
|
+
itemUnit: 'item',
|
|
48
|
+
itemsUnit: 'items',
|
|
49
|
+
remove: 'Remove',
|
|
50
|
+
selectCurrent: 'Select current page',
|
|
51
|
+
removeCurrent: 'Remove current page',
|
|
52
|
+
selectAll: 'Select all data',
|
|
53
|
+
removeAll: 'Remove all data',
|
|
54
|
+
selectInvert: 'Invert current page'
|
|
55
|
+
},
|
|
56
|
+
Upload: {
|
|
57
|
+
uploading: 'Uploading...',
|
|
58
|
+
removeFile: 'Remove file',
|
|
59
|
+
uploadError: 'Upload error',
|
|
60
|
+
previewFile: 'Preview file',
|
|
61
|
+
downloadFile: 'Download file'
|
|
62
|
+
},
|
|
63
|
+
Empty: {
|
|
64
|
+
description: 'No Data'
|
|
65
|
+
},
|
|
66
|
+
Icon: {
|
|
67
|
+
icon: 'icon'
|
|
68
|
+
},
|
|
69
|
+
Text: {
|
|
70
|
+
edit: 'Edit',
|
|
71
|
+
copy: 'Copy',
|
|
72
|
+
copied: 'Copied',
|
|
73
|
+
expand: 'Expand'
|
|
74
|
+
},
|
|
75
|
+
PageHeader: {
|
|
76
|
+
back: 'Back'
|
|
77
|
+
},
|
|
78
|
+
Form: {
|
|
79
|
+
optional: '(optional)',
|
|
80
|
+
defaultValidateMessages: {
|
|
81
|
+
default: 'Field validation error for ${label}',
|
|
82
|
+
required: 'Please enter ${label}',
|
|
83
|
+
enum: '${label} must be one of [${enum}]',
|
|
84
|
+
whitespace: '${label} cannot be a blank character',
|
|
85
|
+
date: {
|
|
86
|
+
format: '${label} date format is invalid',
|
|
87
|
+
parse: '${label} cannot be converted to a date',
|
|
88
|
+
invalid: '${label} is an invalid date'
|
|
89
|
+
},
|
|
90
|
+
types: {
|
|
91
|
+
string: typeTemplate,
|
|
92
|
+
method: typeTemplate,
|
|
93
|
+
array: typeTemplate,
|
|
94
|
+
object: typeTemplate,
|
|
95
|
+
number: typeTemplate,
|
|
96
|
+
date: typeTemplate,
|
|
97
|
+
boolean: typeTemplate,
|
|
98
|
+
integer: typeTemplate,
|
|
99
|
+
float: typeTemplate,
|
|
100
|
+
regexp: typeTemplate,
|
|
101
|
+
email: typeTemplate,
|
|
102
|
+
url: typeTemplate,
|
|
103
|
+
hex: typeTemplate
|
|
104
|
+
},
|
|
105
|
+
string: {
|
|
106
|
+
len: '${label} must be ${len} characters',
|
|
107
|
+
min: '${label} must be at least ${min} characters',
|
|
108
|
+
max: '${label} must be up to ${max} characters',
|
|
109
|
+
range: '${label} must be between ${min}-${max} characters'
|
|
110
|
+
},
|
|
111
|
+
number: {
|
|
112
|
+
len: '${label} must be equal to ${len}',
|
|
113
|
+
min: '${label} must be minimum ${min}',
|
|
114
|
+
max: '${label} must be maximum ${max}',
|
|
115
|
+
range: '${label} must be between ${min}-${max}'
|
|
116
|
+
},
|
|
117
|
+
array: {
|
|
118
|
+
len: 'Must be ${len} ${label}',
|
|
119
|
+
min: 'At least ${min} ${label}',
|
|
120
|
+
max: 'At most ${max} ${label}',
|
|
121
|
+
range: 'The amount of ${label} must be between ${min}-${max}'
|
|
122
|
+
},
|
|
123
|
+
pattern: {
|
|
124
|
+
mismatch: '${label} does not match the pattern ${pattern}'
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
Image: {
|
|
129
|
+
preview: 'Preview'
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
export default localeValues;
|