@aloudata/aloudata-design 0.3.1 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -5
- package/es/Breadcrumb/index.d.ts +1 -0
- package/es/Button/index.js +3 -2
- package/es/Button/style/index.less +135 -126
- package/es/Button/style/variables.less +53 -53
- package/es/Card/index.d.ts +3 -0
- package/es/Card/index.js +3 -0
- package/es/Card/style/index.d.ts +2 -0
- package/es/Card/style/index.js +2 -0
- package/es/Card/style/index.less +1 -0
- package/es/Checkbox/index.d.ts +1 -0
- package/es/ConfigProvider/defaultRenderEmpty.d.ts +4 -0
- package/es/ConfigProvider/defaultRenderEmpty.js +37 -0
- package/es/ConfigProvider/sizeContext.d.ts +9 -0
- package/es/ConfigProvider/sizeContext.js +12 -0
- package/es/Dropdown/Button.js +4 -3
- package/es/Empty/image/Authority.d.ts +1 -0
- package/es/Empty/image/Dataspace.d.ts +1 -0
- package/es/Empty/image/Search.d.ts +1 -0
- package/es/Empty/image/Simple.d.ts +1 -0
- package/es/Empty/image/Worksheet.d.ts +1 -0
- package/es/Empty/image/empty.d.ts +1 -0
- package/es/Icon/icons/CheckLine.d.ts +13 -0
- package/es/Icon/icons/CheckLine.js +73 -0
- package/es/Icon/icons.json +410 -0
- package/es/Input/components/Group/index.d.ts +3 -1
- package/es/Input/components/Group/index.js +6 -12
- package/es/Input/components/Input/index.d.ts +3 -2
- package/es/Input/components/Input/index.js +11 -23
- package/es/Input/components/Password/index.js +11 -16
- package/es/Input/components/TextArea/index.d.ts +8 -1
- package/es/Input/components/TextArea/index.js +8 -1
- package/es/Input/style/index.less +180 -102
- package/es/InputNumber/index.d.ts +1 -0
- package/es/InputNumber/style/index.less +69 -69
- package/es/Menu/Divider.d.ts +1 -0
- package/es/Modal/index.js +20 -16
- package/es/Modal/locale.d.ts +7 -0
- package/es/Modal/locale.js +20 -0
- package/es/Modal/style/index.less +48 -45
- package/es/Navigator/components/Header/index.d.ts +1 -0
- package/es/Navigator/components/Menu/index.d.ts +1 -0
- package/es/Navigator/components/MenuItem/index.d.ts +1 -1
- package/es/Navigator/index.d.ts +1 -1
- package/es/PageHeader/index.d.ts +3 -0
- package/es/PageHeader/index.js +3 -0
- package/es/PageHeader/style/index.d.ts +2 -0
- package/es/PageHeader/style/index.js +2 -0
- package/es/PageHeader/style/index.less +1 -0
- package/es/Popover/index.d.ts +1 -0
- package/es/Radio/components/Group/index.d.ts +6 -0
- package/es/Radio/components/Group/index.js +72 -0
- package/es/Radio/components/Radio/index.d.ts +3 -0
- package/es/Radio/components/Radio/index.js +95 -0
- package/es/Radio/index.d.ts +9 -2
- package/es/Radio/index.js +5 -3
- package/es/Radio/interface/radio.d.ts +24 -0
- package/es/Radio/interface/radio.js +1 -0
- package/es/Radio/interface/radioGroup.d.ts +42 -0
- package/es/Radio/interface/radioGroup.js +1 -0
- package/es/Radio/style/index.less +348 -0
- package/es/Select/index.js +1 -1
- package/es/Select/rc-select/OptionList.js +4 -4
- package/es/Select/rc-select/Selector/MultipleSelector.js +11 -1
- package/es/Select/rc-select/hooks/useOptions.d.ts +1 -1
- package/es/Select/style/index.less +70 -45
- package/es/Select/style/variables.less +45 -45
- package/es/Select/utils/iconUtil.d.ts +2 -2
- package/es/Select/utils/iconUtil.js +9 -5
- package/es/Steps/components/ProcessIcon/index.d.ts +6 -0
- package/es/Steps/components/ProcessIcon/index.js +8 -0
- package/es/Steps/components/Step/index.d.ts +20 -0
- package/es/Steps/components/Step/index.js +45 -0
- package/es/Steps/index.d.ts +36 -2
- package/es/Steps/index.js +30 -1
- package/es/Steps/matchMedia.mock.d.ts +1 -0
- package/es/Steps/matchMedia.mock.js +17 -0
- package/es/Steps/style/index.less +251 -0
- package/es/Switch/index.d.ts +46 -2
- package/es/Switch/index.js +71 -1
- package/es/Switch/style/index.less +129 -0
- package/es/Table/Table.d.ts +2 -1
- package/es/Table/Table.js +223 -330
- package/es/Table/components/Empty/index.d.ts +3 -0
- package/es/Table/components/Empty/index.js +17 -0
- package/es/Table/components/Loading/index.d.ts +3 -0
- package/es/Table/components/Loading/index.js +19 -0
- package/es/Table/components/TableBodyRowList/index.d.ts +13 -0
- package/es/Table/components/TableBodyRowList/index.js +89 -0
- package/es/Table/components/TableHead/index.d.ts +23 -0
- package/es/Table/components/TableHead/index.js +262 -0
- package/es/Table/constant.d.ts +1 -0
- package/es/Table/constant.js +1 -0
- package/es/Table/hooks/useFrame.d.ts +7 -0
- package/es/Table/hooks/useFrame.js +90 -0
- package/es/Table/hooks/useTableColumn.d.ts +28 -0
- package/es/Table/hooks/useTableColumn.js +53 -0
- package/es/Table/interface.d.ts +3 -2
- package/es/Table/style/index.less +33 -30
- package/es/Table/utils.d.ts +15 -0
- package/es/Table/utils.js +131 -0
- package/es/Tabs/index.js +7 -9
- package/es/Tabs/style/index.less +57 -25
- package/es/_utils/hooks/useId.d.ts +4 -0
- package/es/_utils/hooks/useId.js +23 -0
- package/es/index.d.ts +9 -5
- package/es/index.js +3 -1
- package/es/locale/default.d.ts +2 -0
- package/es/locale/default.js +2 -0
- package/es/locale/en_US.d.ts +3 -0
- package/es/locale/en_US.js +132 -0
- package/es/locale/zh_CN.d.ts +3 -2
- package/es/locale/zh_CN.js +131 -2
- package/es/locale-provider/LocaleReceiver.d.ts +4 -0
- package/es/locale-provider/LocaleReceiver.js +3 -0
- package/es/locale-provider/context.d.ts +7 -0
- package/es/locale-provider/context.js +3 -0
- package/es/locale-provider/default.d.ts +2 -0
- package/es/locale-provider/default.js +2 -0
- package/es/locale-provider/en_US.d.ts +2 -0
- package/es/locale-provider/en_US.js +2 -0
- package/es/locale-provider/index.d.ts +65 -0
- package/es/locale-provider/index.js +102 -0
- package/es/locale-provider/style/index.d.ts +1 -0
- package/es/locale-provider/style/index.js +1 -0
- package/es/locale-provider/style/index.less +2 -0
- package/es/locale-provider/zh_CN.d.ts +2 -0
- package/es/locale-provider/zh_CN.js +2 -0
- package/es/style/index.d.ts +0 -1
- package/es/style/index.js +0 -1
- package/es/style/index.less +2 -2
- package/es/style/themes/default/index.less +30 -30
- package/lib/Breadcrumb/index.d.ts +1 -0
- package/lib/Button/index.js +5 -3
- package/lib/Button/style/index.less +135 -126
- package/lib/Button/style/variables.less +53 -53
- package/lib/Card/index.d.ts +3 -0
- package/lib/Card/index.js +15 -0
- package/lib/Card/style/index.d.ts +2 -0
- package/lib/Card/style/index.js +5 -0
- package/lib/Card/style/index.less +1 -0
- package/lib/Checkbox/index.d.ts +1 -0
- package/lib/ConfigProvider/defaultRenderEmpty.d.ts +4 -0
- package/lib/ConfigProvider/defaultRenderEmpty.js +55 -0
- package/lib/ConfigProvider/sizeContext.d.ts +9 -0
- package/lib/ConfigProvider/sizeContext.js +30 -0
- package/lib/Dropdown/Button.js +8 -6
- package/lib/Empty/image/Authority.d.ts +1 -0
- package/lib/Empty/image/Dataspace.d.ts +1 -0
- package/lib/Empty/image/Search.d.ts +1 -0
- package/lib/Empty/image/Simple.d.ts +1 -0
- package/lib/Empty/image/Worksheet.d.ts +1 -0
- package/lib/Empty/image/empty.d.ts +1 -0
- package/lib/Icon/icons/CheckLine.d.ts +13 -0
- package/lib/Icon/icons/CheckLine.js +90 -0
- package/lib/Icon/icons.json +410 -0
- package/lib/Input/components/Group/index.d.ts +3 -1
- package/lib/Input/components/Group/index.js +7 -12
- package/lib/Input/components/Input/index.d.ts +3 -2
- package/lib/Input/components/Input/index.js +13 -23
- package/lib/Input/components/Password/index.js +13 -17
- package/lib/Input/components/TextArea/index.d.ts +8 -1
- package/lib/Input/components/TextArea/index.js +10 -1
- package/lib/Input/style/index.less +180 -102
- package/lib/InputNumber/index.d.ts +1 -0
- package/lib/InputNumber/style/index.less +69 -69
- package/lib/Menu/Divider.d.ts +1 -0
- package/lib/Modal/index.js +25 -18
- package/lib/Modal/locale.d.ts +7 -0
- package/lib/Modal/locale.js +31 -0
- package/lib/Modal/style/index.less +48 -45
- package/lib/Navigator/components/Header/index.d.ts +1 -0
- package/lib/Navigator/components/Menu/index.d.ts +1 -0
- package/lib/Navigator/components/MenuItem/index.d.ts +1 -1
- package/lib/Navigator/index.d.ts +1 -1
- package/lib/PageHeader/index.d.ts +3 -0
- package/lib/PageHeader/index.js +15 -0
- package/lib/PageHeader/style/index.d.ts +2 -0
- package/lib/PageHeader/style/index.js +5 -0
- package/lib/PageHeader/style/index.less +1 -0
- package/lib/Popover/index.d.ts +1 -0
- package/lib/Radio/components/Group/index.d.ts +6 -0
- package/lib/Radio/components/Group/index.js +93 -0
- package/lib/Radio/components/Radio/index.d.ts +3 -0
- package/lib/Radio/components/Radio/index.js +115 -0
- package/lib/Radio/index.d.ts +9 -2
- package/lib/Radio/index.js +5 -3
- package/lib/Radio/interface/radio.d.ts +24 -0
- package/lib/Radio/interface/radio.js +5 -0
- package/lib/Radio/interface/radioGroup.d.ts +42 -0
- package/lib/Radio/interface/radioGroup.js +5 -0
- package/lib/Radio/style/index.less +348 -0
- package/lib/Select/index.js +1 -1
- package/lib/Select/rc-select/OptionList.js +8 -7
- package/lib/Select/rc-select/Selector/MultipleSelector.js +11 -1
- package/lib/Select/rc-select/hooks/useOptions.d.ts +1 -1
- package/lib/Select/style/index.less +70 -45
- package/lib/Select/style/variables.less +45 -45
- package/lib/Select/utils/iconUtil.d.ts +2 -2
- package/lib/Select/utils/iconUtil.js +13 -7
- package/lib/Steps/components/ProcessIcon/index.d.ts +6 -0
- package/lib/Steps/components/ProcessIcon/index.js +19 -0
- package/lib/Steps/components/Step/index.d.ts +20 -0
- package/lib/Steps/components/Step/index.js +61 -0
- package/lib/Steps/index.d.ts +36 -2
- package/lib/Steps/index.js +34 -1
- package/lib/Steps/matchMedia.mock.d.ts +1 -0
- package/lib/Steps/matchMedia.mock.js +17 -0
- package/lib/Steps/style/index.less +251 -0
- package/lib/Switch/index.d.ts +46 -2
- package/lib/Switch/index.js +78 -1
- package/lib/Switch/style/index.less +129 -0
- package/lib/Table/Table.d.ts +2 -1
- package/lib/Table/Table.js +228 -332
- package/lib/Table/components/Empty/index.d.ts +3 -0
- package/lib/Table/components/Empty/index.js +30 -0
- package/lib/Table/components/Loading/index.d.ts +3 -0
- package/lib/Table/components/Loading/index.js +33 -0
- package/lib/Table/components/TableBodyRowList/index.d.ts +13 -0
- package/lib/Table/components/TableBodyRowList/index.js +108 -0
- package/lib/Table/components/TableHead/index.d.ts +23 -0
- package/lib/Table/components/TableHead/index.js +286 -0
- package/lib/Table/constant.d.ts +1 -0
- package/lib/Table/constant.js +1 -0
- package/lib/Table/hooks/useFrame.d.ts +7 -0
- package/lib/Table/hooks/useFrame.js +98 -0
- package/lib/Table/hooks/useTableColumn.d.ts +28 -0
- package/lib/Table/hooks/useTableColumn.js +66 -0
- package/lib/Table/interface.d.ts +3 -2
- package/lib/Table/style/index.less +33 -30
- package/lib/Table/utils.d.ts +15 -0
- package/lib/Table/utils.js +147 -0
- package/lib/Tabs/index.js +9 -11
- package/lib/Tabs/style/index.less +57 -25
- package/lib/_utils/hooks/useId.d.ts +4 -0
- package/lib/_utils/hooks/useId.js +36 -0
- package/lib/index.d.ts +9 -5
- package/lib/index.js +16 -0
- package/lib/locale/default.d.ts +2 -0
- package/lib/locale/default.js +13 -0
- package/lib/locale/en_US.d.ts +3 -0
- package/lib/locale/en_US.js +146 -0
- package/lib/locale/zh_CN.d.ts +3 -2
- package/lib/locale/zh_CN.js +134 -2
- package/lib/locale-provider/LocaleReceiver.d.ts +4 -0
- package/lib/locale-provider/LocaleReceiver.js +23 -0
- package/lib/locale-provider/context.d.ts +7 -0
- package/lib/locale-provider/context.js +12 -0
- package/lib/locale-provider/default.d.ts +2 -0
- package/lib/locale-provider/default.js +13 -0
- package/lib/locale-provider/en_US.d.ts +2 -0
- package/lib/locale-provider/en_US.js +13 -0
- package/lib/locale-provider/index.d.ts +65 -0
- package/lib/locale-provider/index.js +116 -0
- package/lib/locale-provider/style/index.d.ts +1 -0
- package/lib/locale-provider/style/index.js +3 -0
- package/lib/locale-provider/style/index.less +2 -0
- package/lib/locale-provider/zh_CN.d.ts +2 -0
- package/lib/locale-provider/zh_CN.js +13 -0
- package/lib/style/index.d.ts +0 -1
- package/lib/style/index.js +0 -2
- package/lib/style/index.less +2 -2
- package/lib/style/themes/default/index.less +30 -30
- package/package.json +11 -8
package/es/locale/zh_CN.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import type { Locale } from '../locale-provider';
|
|
2
|
+
declare const localeValues: Locale;
|
|
3
|
+
export default localeValues;
|
package/es/locale/zh_CN.js
CHANGED
|
@@ -1,2 +1,131 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/* eslint-disable no-template-curly-in-string */
|
|
2
|
+
import Pagination from 'rc-pagination/lib/locale/zh_CN';
|
|
3
|
+
import Calendar from 'antd/es/calendar/locale/zh_CN';
|
|
4
|
+
import DatePicker from 'antd/es/date-picker/locale/zh_CN';
|
|
5
|
+
import TimePicker from 'antd/es/time-picker/locale/zh_CN';
|
|
6
|
+
var typeTemplate = '${label}不是一个有效的${type}';
|
|
7
|
+
var localeValues = {
|
|
8
|
+
locale: 'zh-cn',
|
|
9
|
+
Pagination: Pagination,
|
|
10
|
+
DatePicker: DatePicker,
|
|
11
|
+
TimePicker: TimePicker,
|
|
12
|
+
Calendar: Calendar,
|
|
13
|
+
// locales for all components
|
|
14
|
+
global: {
|
|
15
|
+
placeholder: '请选择'
|
|
16
|
+
},
|
|
17
|
+
Table: {
|
|
18
|
+
filterTitle: '筛选',
|
|
19
|
+
filterConfirm: '确定',
|
|
20
|
+
filterReset: '重置',
|
|
21
|
+
filterEmptyText: '无筛选项',
|
|
22
|
+
filterCheckall: '全选',
|
|
23
|
+
filterSearchPlaceholder: '在筛选项中搜索',
|
|
24
|
+
selectAll: '全选当页',
|
|
25
|
+
selectInvert: '反选当页',
|
|
26
|
+
selectNone: '清空所有',
|
|
27
|
+
selectionAll: '全选所有',
|
|
28
|
+
sortTitle: '排序',
|
|
29
|
+
expand: '展开行',
|
|
30
|
+
collapse: '关闭行',
|
|
31
|
+
triggerDesc: '点击降序',
|
|
32
|
+
triggerAsc: '点击升序',
|
|
33
|
+
cancelSort: '取消排序'
|
|
34
|
+
},
|
|
35
|
+
Modal: {
|
|
36
|
+
okText: '确定',
|
|
37
|
+
cancelText: '取消',
|
|
38
|
+
justOkText: '知道了'
|
|
39
|
+
},
|
|
40
|
+
Popconfirm: {
|
|
41
|
+
cancelText: '取消',
|
|
42
|
+
okText: '确定'
|
|
43
|
+
},
|
|
44
|
+
Transfer: {
|
|
45
|
+
searchPlaceholder: '请输入搜索内容',
|
|
46
|
+
itemUnit: '项',
|
|
47
|
+
itemsUnit: '项',
|
|
48
|
+
remove: '删除',
|
|
49
|
+
selectCurrent: '全选当页',
|
|
50
|
+
removeCurrent: '删除当页',
|
|
51
|
+
selectAll: '全选所有',
|
|
52
|
+
removeAll: '删除全部',
|
|
53
|
+
selectInvert: '反选当页'
|
|
54
|
+
},
|
|
55
|
+
Upload: {
|
|
56
|
+
uploading: '文件上传中',
|
|
57
|
+
removeFile: '删除文件',
|
|
58
|
+
uploadError: '上传错误',
|
|
59
|
+
previewFile: '预览文件',
|
|
60
|
+
downloadFile: '下载文件'
|
|
61
|
+
},
|
|
62
|
+
Empty: {
|
|
63
|
+
description: '暂无数据'
|
|
64
|
+
},
|
|
65
|
+
Icon: {
|
|
66
|
+
icon: '图标'
|
|
67
|
+
},
|
|
68
|
+
Text: {
|
|
69
|
+
edit: '编辑',
|
|
70
|
+
copy: '复制',
|
|
71
|
+
copied: '复制成功',
|
|
72
|
+
expand: '展开'
|
|
73
|
+
},
|
|
74
|
+
PageHeader: {
|
|
75
|
+
back: '返回'
|
|
76
|
+
},
|
|
77
|
+
Form: {
|
|
78
|
+
optional: '(可选)',
|
|
79
|
+
defaultValidateMessages: {
|
|
80
|
+
default: '字段验证错误${label}',
|
|
81
|
+
required: '请输入${label}',
|
|
82
|
+
enum: '${label}必须是其中一个[${enum}]',
|
|
83
|
+
whitespace: '${label}不能为空字符',
|
|
84
|
+
date: {
|
|
85
|
+
format: '${label}日期格式无效',
|
|
86
|
+
parse: '${label}不能转换为日期',
|
|
87
|
+
invalid: '${label}是一个无效日期'
|
|
88
|
+
},
|
|
89
|
+
types: {
|
|
90
|
+
string: typeTemplate,
|
|
91
|
+
method: typeTemplate,
|
|
92
|
+
array: typeTemplate,
|
|
93
|
+
object: typeTemplate,
|
|
94
|
+
number: typeTemplate,
|
|
95
|
+
date: typeTemplate,
|
|
96
|
+
boolean: typeTemplate,
|
|
97
|
+
integer: typeTemplate,
|
|
98
|
+
float: typeTemplate,
|
|
99
|
+
regexp: typeTemplate,
|
|
100
|
+
email: typeTemplate,
|
|
101
|
+
url: typeTemplate,
|
|
102
|
+
hex: typeTemplate
|
|
103
|
+
},
|
|
104
|
+
string: {
|
|
105
|
+
len: '${label}须为${len}个字符',
|
|
106
|
+
min: '${label}最少${min}个字符',
|
|
107
|
+
max: '${label}最多${max}个字符',
|
|
108
|
+
range: '${label}须在${min}-${max}字符之间'
|
|
109
|
+
},
|
|
110
|
+
number: {
|
|
111
|
+
len: '${label}必须等于${len}',
|
|
112
|
+
min: '${label}最小值为${min}',
|
|
113
|
+
max: '${label}最大值为${max}',
|
|
114
|
+
range: '${label}须在${min}-${max}之间'
|
|
115
|
+
},
|
|
116
|
+
array: {
|
|
117
|
+
len: '须为${len}个${label}',
|
|
118
|
+
min: '最少${min}个${label}',
|
|
119
|
+
max: '最多${max}个${label}',
|
|
120
|
+
range: '${label}数量须在${min}-${max}之间'
|
|
121
|
+
},
|
|
122
|
+
pattern: {
|
|
123
|
+
mismatch: '${label}与模式不匹配${pattern}'
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
Image: {
|
|
128
|
+
preview: '预览'
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
export default localeValues;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { Locale } from '.';
|
|
3
|
+
export declare type LocaleContextProps = Partial<Locale> & {
|
|
4
|
+
exist?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare const LocaleContext: import("react").Context<LocaleContextProps | undefined>;
|
|
7
|
+
export default LocaleContext;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { ValidateMessages } from 'rc-field-form/lib/interface';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import type { PickerLocale as DatePickerLocale } from 'antd/es/date-picker/generatePicker';
|
|
4
|
+
import type { TransferLocale as TransferLocaleForEmpty } from 'antd/es/empty';
|
|
5
|
+
import type { ModalLocale } from 'antd/es/modal/locale';
|
|
6
|
+
import type { PaginationLocale } from 'antd/es/pagination/Pagination';
|
|
7
|
+
import type { TableLocale } from 'antd/es/table/interface';
|
|
8
|
+
import type { TransferLocale } from 'antd/es/transfer';
|
|
9
|
+
import type { UploadLocale } from 'antd/es/upload/interface';
|
|
10
|
+
interface PopconfirmLocale {
|
|
11
|
+
okText: string;
|
|
12
|
+
cancelText: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const ANT_MARK = "internalMark";
|
|
15
|
+
export interface Locale {
|
|
16
|
+
locale: string;
|
|
17
|
+
Pagination?: PaginationLocale;
|
|
18
|
+
DatePicker?: DatePickerLocale;
|
|
19
|
+
TimePicker?: Record<string, any>;
|
|
20
|
+
Calendar?: Record<string, any>;
|
|
21
|
+
Table?: TableLocale;
|
|
22
|
+
Modal?: ModalLocale;
|
|
23
|
+
Popconfirm?: PopconfirmLocale;
|
|
24
|
+
Transfer?: Partial<TransferLocale>;
|
|
25
|
+
Select?: Record<string, any>;
|
|
26
|
+
Upload?: UploadLocale;
|
|
27
|
+
Empty?: TransferLocaleForEmpty;
|
|
28
|
+
global?: Record<string, any>;
|
|
29
|
+
PageHeader?: {
|
|
30
|
+
back: string;
|
|
31
|
+
};
|
|
32
|
+
Icon?: Record<string, any>;
|
|
33
|
+
Text?: {
|
|
34
|
+
edit?: any;
|
|
35
|
+
copy?: any;
|
|
36
|
+
copied?: any;
|
|
37
|
+
expand?: any;
|
|
38
|
+
};
|
|
39
|
+
Form?: {
|
|
40
|
+
optional?: string;
|
|
41
|
+
defaultValidateMessages: ValidateMessages;
|
|
42
|
+
};
|
|
43
|
+
Image?: {
|
|
44
|
+
preview: string;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export interface LocaleProviderProps {
|
|
48
|
+
locale: Locale;
|
|
49
|
+
children?: React.ReactNode;
|
|
50
|
+
_ANT_MARK__?: string;
|
|
51
|
+
}
|
|
52
|
+
export default class LocaleProvider extends React.Component<LocaleProviderProps, any> {
|
|
53
|
+
static defaultProps: {
|
|
54
|
+
locale: {};
|
|
55
|
+
};
|
|
56
|
+
constructor(props: LocaleProviderProps);
|
|
57
|
+
componentDidMount(): void;
|
|
58
|
+
componentDidUpdate(prevProps: LocaleProviderProps): void;
|
|
59
|
+
componentWillUnmount(): void;
|
|
60
|
+
getMemoizedContextValue: (localeValue: Locale) => Locale & {
|
|
61
|
+
exist?: boolean;
|
|
62
|
+
};
|
|
63
|
+
render(): JSX.Element;
|
|
64
|
+
}
|
|
65
|
+
export {};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
|
|
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
|
+
|
|
5
|
+
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; }
|
|
6
|
+
|
|
7
|
+
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; }
|
|
8
|
+
|
|
9
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
10
|
+
|
|
11
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
12
|
+
|
|
13
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
14
|
+
|
|
15
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
16
|
+
|
|
17
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
18
|
+
|
|
19
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
20
|
+
|
|
21
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
22
|
+
|
|
23
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
24
|
+
|
|
25
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
26
|
+
|
|
27
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
28
|
+
|
|
29
|
+
/* eslint-disable react/static-property-placement */
|
|
30
|
+
|
|
31
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
32
|
+
|
|
33
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
34
|
+
import memoizeOne from 'memoize-one';
|
|
35
|
+
import * as React from 'react';
|
|
36
|
+
import warning from 'antd/es/_util/warning';
|
|
37
|
+
import { changeConfirmLocale } from 'antd/es/modal/locale';
|
|
38
|
+
import LocaleContext from './context';
|
|
39
|
+
export var ANT_MARK = 'internalMark';
|
|
40
|
+
|
|
41
|
+
var LocaleProvider = /*#__PURE__*/function (_React$Component) {
|
|
42
|
+
_inherits(LocaleProvider, _React$Component);
|
|
43
|
+
|
|
44
|
+
var _super = _createSuper(LocaleProvider);
|
|
45
|
+
|
|
46
|
+
function LocaleProvider(props) {
|
|
47
|
+
var _this;
|
|
48
|
+
|
|
49
|
+
_classCallCheck(this, LocaleProvider);
|
|
50
|
+
|
|
51
|
+
_this = _super.call(this, props);
|
|
52
|
+
_this.getMemoizedContextValue = memoizeOne(function (localeValue) {
|
|
53
|
+
return _objectSpread(_objectSpread({}, localeValue), {}, {
|
|
54
|
+
exist: true
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
changeConfirmLocale(props.locale && props.locale.Modal);
|
|
58
|
+
warning( // eslint-disable-next-line no-underscore-dangle
|
|
59
|
+
props._ANT_MARK__ === ANT_MARK, 'LocaleProvider', '`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale');
|
|
60
|
+
return _this;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
_createClass(LocaleProvider, [{
|
|
64
|
+
key: "componentDidMount",
|
|
65
|
+
value: function componentDidMount() {
|
|
66
|
+
changeConfirmLocale(this.props.locale && this.props.locale.Modal);
|
|
67
|
+
}
|
|
68
|
+
}, {
|
|
69
|
+
key: "componentDidUpdate",
|
|
70
|
+
value: function componentDidUpdate(prevProps) {
|
|
71
|
+
var locale = this.props.locale;
|
|
72
|
+
|
|
73
|
+
if (prevProps.locale !== locale) {
|
|
74
|
+
changeConfirmLocale(locale && locale.Modal);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}, {
|
|
78
|
+
key: "componentWillUnmount",
|
|
79
|
+
value: function componentWillUnmount() {
|
|
80
|
+
changeConfirmLocale();
|
|
81
|
+
}
|
|
82
|
+
}, {
|
|
83
|
+
key: "render",
|
|
84
|
+
value: function render() {
|
|
85
|
+
var _this$props = this.props,
|
|
86
|
+
locale = _this$props.locale,
|
|
87
|
+
children = _this$props.children;
|
|
88
|
+
var contextValue = this.getMemoizedContextValue(locale);
|
|
89
|
+
return /*#__PURE__*/React.createElement(LocaleContext.Provider, {
|
|
90
|
+
value: contextValue
|
|
91
|
+
}, children);
|
|
92
|
+
}
|
|
93
|
+
}]);
|
|
94
|
+
|
|
95
|
+
return LocaleProvider;
|
|
96
|
+
}(React.Component);
|
|
97
|
+
|
|
98
|
+
export { LocaleProvider as default };
|
|
99
|
+
LocaleProvider.defaultProps = {
|
|
100
|
+
// eslint-disable-next-line react/default-props-match-prop-types
|
|
101
|
+
locale: {}
|
|
102
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.less';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.less';
|
package/es/style/index.d.ts
CHANGED
package/es/style/index.js
CHANGED
package/es/style/index.less
CHANGED
|
@@ -3,34 +3,34 @@
|
|
|
3
3
|
@ald-prefix: ant;
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
//
|
|
7
|
-
@height-base: 28px;
|
|
8
|
-
@height-lg: 32px;
|
|
9
|
-
@height-sm: 22px;
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
// base 不分大小写情况
|
|
12
7
|
@border-radius-base: 8px;
|
|
13
|
-
@
|
|
14
|
-
@
|
|
15
|
-
|
|
16
|
-
//
|
|
17
|
-
@
|
|
18
|
-
@
|
|
19
|
-
@
|
|
20
|
-
@
|
|
21
|
-
@
|
|
22
|
-
@
|
|
23
|
-
@
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
@
|
|
27
|
-
@
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
@
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
@
|
|
36
|
-
@
|
|
8
|
+
@line-height-base:20px;
|
|
9
|
+
@font-size-base:14px;
|
|
10
|
+
|
|
11
|
+
// large
|
|
12
|
+
@font-size-large:16px;
|
|
13
|
+
@line-height-large:24px;
|
|
14
|
+
@padding-top-large:6px;
|
|
15
|
+
@padding-bottom-large:6px;
|
|
16
|
+
@padding-left-large:12px;
|
|
17
|
+
@padding-right-large:12px;
|
|
18
|
+
@border-radius-large:8px;
|
|
19
|
+
|
|
20
|
+
// middle
|
|
21
|
+
@font-size-middle:14px;
|
|
22
|
+
@line-height-middle:20px;
|
|
23
|
+
@padding-top-middle:6px;
|
|
24
|
+
@padding-bottom-middle:6px;
|
|
25
|
+
@padding-left-middle:12px;
|
|
26
|
+
@padding-right-middle:12px;
|
|
27
|
+
@border-radius-middle:6px;
|
|
28
|
+
|
|
29
|
+
// small
|
|
30
|
+
@font-size-small:12px;
|
|
31
|
+
@line-height-small:16px;
|
|
32
|
+
@padding-top-small:6px;
|
|
33
|
+
@padding-bottom-small:6px;
|
|
34
|
+
@padding-left-small:8px;
|
|
35
|
+
@padding-right-small:8px;
|
|
36
|
+
@border-radius-small:4px;
|
package/lib/Button/index.js
CHANGED
|
@@ -9,12 +9,14 @@ require("antd/es/button/style");
|
|
|
9
9
|
|
|
10
10
|
var _button = _interopRequireDefault(require("antd/es/button"));
|
|
11
11
|
|
|
12
|
+
require("@aloudata/icons-react/styles/index.less");
|
|
13
|
+
|
|
14
|
+
var _LoadingLine2 = _interopRequireDefault(require("@aloudata/icons-react/es/icons/LoadingLine"));
|
|
15
|
+
|
|
12
16
|
var _react = _interopRequireDefault(require("react"));
|
|
13
17
|
|
|
14
18
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
19
|
|
|
16
|
-
var _Loading = _interopRequireDefault(require("../Icon/icons/Loading"));
|
|
17
|
-
|
|
18
20
|
var _excluded = ["type", "size", "shape", "loading", "disabled", "icon", "className"];
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -117,7 +119,7 @@ function Button(props) {
|
|
|
117
119
|
}
|
|
118
120
|
|
|
119
121
|
if (loading) {
|
|
120
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
122
|
+
return /*#__PURE__*/_react.default.createElement(_LoadingLine2.default, {
|
|
121
123
|
spin: true,
|
|
122
124
|
size: ICON_LARGE,
|
|
123
125
|
className: (0, _classnames.default)("".concat(iconPrefixCls, "-icon-left"), iconPrefixCls),
|