@douyinfe/semi-ui 2.20.7 → 2.20.9-alpha.0
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/dist/css/semi.css +14 -7
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +264 -222
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/autoComplete/index.d.ts +3 -0
- package/lib/cjs/autoComplete/index.js +6 -1
- package/lib/cjs/datePicker/month.js +5 -1
- package/lib/cjs/form/baseForm.d.ts +1 -1
- package/lib/cjs/form/field.d.ts +1 -1
- package/lib/cjs/form/interface.d.ts +1 -1
- package/lib/cjs/locale/source/fr.js +1 -1
- package/lib/cjs/locale/source/ro.d.ts +156 -0
- package/lib/cjs/locale/source/ro.js +165 -0
- package/lib/cjs/modal/ModalContent.js +2 -2
- package/lib/cjs/select/index.d.ts +2 -2
- package/lib/cjs/select/index.js +2 -2
- package/lib/cjs/table/HeadTable.js +12 -2
- package/lib/cjs/table/Table.js +10 -3
- package/lib/cjs/table/interface.d.ts +4 -0
- package/lib/cjs/typography/title.d.ts +1 -1
- package/lib/cjs/upload/index.d.ts +5 -0
- package/lib/cjs/upload/index.js +9 -0
- package/lib/es/autoComplete/index.d.ts +3 -0
- package/lib/es/autoComplete/index.js +6 -1
- package/lib/es/datePicker/month.js +5 -1
- package/lib/es/form/baseForm.d.ts +1 -1
- package/lib/es/form/field.d.ts +1 -1
- package/lib/es/form/interface.d.ts +1 -1
- package/lib/es/locale/source/fr.js +1 -1
- package/lib/es/locale/source/ro.d.ts +156 -0
- package/lib/es/locale/source/ro.js +157 -0
- package/lib/es/modal/ModalContent.js +2 -2
- package/lib/es/select/index.d.ts +2 -2
- package/lib/es/select/index.js +2 -2
- package/lib/es/table/HeadTable.js +13 -2
- package/lib/es/table/Table.js +10 -3
- package/lib/es/table/interface.d.ts +4 -0
- package/lib/es/typography/title.d.ts +1 -1
- package/lib/es/upload/index.d.ts +5 -0
- package/lib/es/upload/index.js +9 -0
- package/package.json +7 -7
|
@@ -65,6 +65,9 @@ export default class Month extends BaseComponent {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
getSingleDayStatus(options) {
|
|
68
|
+
const {
|
|
69
|
+
rangeInputFocus
|
|
70
|
+
} = this.props;
|
|
68
71
|
const {
|
|
69
72
|
fullDate,
|
|
70
73
|
todayText,
|
|
@@ -75,7 +78,8 @@ export default class Month extends BaseComponent {
|
|
|
75
78
|
} = options;
|
|
76
79
|
const disabledOptions = {
|
|
77
80
|
rangeStart,
|
|
78
|
-
rangeEnd
|
|
81
|
+
rangeEnd,
|
|
82
|
+
rangeInputFocus
|
|
79
83
|
};
|
|
80
84
|
const isToday = fullDate === todayText;
|
|
81
85
|
const isSelected = selected.has(fullDate);
|
|
@@ -126,7 +126,7 @@ declare class Form extends BaseComponent<BaseFormProps, BaseFormState> {
|
|
|
126
126
|
onListScroll?: (e: React.UIEvent<HTMLDivElement, UIEvent>) => void;
|
|
127
127
|
children?: React.ReactNode;
|
|
128
128
|
preventScroll?: boolean;
|
|
129
|
-
} & Pick<import("../tooltip").TooltipProps, "
|
|
129
|
+
} & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & React.RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
130
130
|
static Checkbox: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
131
131
|
static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
|
|
132
132
|
static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
|
package/lib/es/form/field.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
|
|
|
74
74
|
onListScroll?: (e: import("react").UIEvent<HTMLDivElement, UIEvent>) => void;
|
|
75
75
|
children?: import("react").ReactNode;
|
|
76
76
|
preventScroll?: boolean;
|
|
77
|
-
} & Pick<import("../tooltip").TooltipProps, "
|
|
77
|
+
} & Pick<import("../tooltip").TooltipProps, "getPopupContainer" | "stopPropagation" | "spacing" | "mouseEnterDelay" | "autoAdjustOverflow" | "mouseLeaveDelay" | "motion"> & import("react").RefAttributes<any> & import("./interface").CommonFieldProps, import("./interface").CommonexcludeType>> & import("./interface").SelectStatic;
|
|
78
78
|
declare const FormCheckboxGroup: import("react").ComponentType<import("utility-types").Subtract<import("../checkbox/checkboxGroup").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
|
|
79
79
|
declare const FormCheckbox: import("react").ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../checkbox/checkbox").CheckboxProps & import("./interface").RCIncludeType>;
|
|
80
80
|
declare const FormRadioGroup: import("react").ComponentType<import("utility-types").Subtract<import("../radio/radioGroup").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & import("react").RefAttributes<any>>;
|
|
@@ -10,7 +10,7 @@ import { CheckboxProps } from '../checkbox/index';
|
|
|
10
10
|
import { RadioProps } from '../radio/index';
|
|
11
11
|
import { ReactFieldError as FieldError } from './errorMessage';
|
|
12
12
|
import { LabelProps } from './label';
|
|
13
|
-
export { FormState, FormApi, WithFieldOption };
|
|
13
|
+
export { FormState, FormApi, WithFieldOption, RuleItem };
|
|
14
14
|
export declare type CommonFieldProps = {
|
|
15
15
|
/** Field is required (except Form. Checkbox within the Group, Form. Radio) */
|
|
16
16
|
field: string;
|
|
@@ -120,7 +120,7 @@ const local = {
|
|
|
120
120
|
Upload: {
|
|
121
121
|
mainText: 'Cliquez pour télécharger le fichier ou faites glisser le fichier vers ici',
|
|
122
122
|
illegalTips: 'Ce type de fichier n\'est pas pris en charge',
|
|
123
|
-
legalTips: 'Libérer et commencer le
|
|
123
|
+
legalTips: 'Libérer et commencer le chargement',
|
|
124
124
|
retry: 'Réessayer',
|
|
125
125
|
replace: 'Remplacer le fichier',
|
|
126
126
|
clear: 'Supprimer',
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
code: string;
|
|
3
|
+
dateFnsLocale: Locale;
|
|
4
|
+
Pagination: {
|
|
5
|
+
item: string;
|
|
6
|
+
pageSize: string;
|
|
7
|
+
page: string;
|
|
8
|
+
total: string;
|
|
9
|
+
jumpTo: string;
|
|
10
|
+
};
|
|
11
|
+
Modal: {
|
|
12
|
+
confirm: string;
|
|
13
|
+
cancel: string;
|
|
14
|
+
};
|
|
15
|
+
TimePicker: {
|
|
16
|
+
placeholder: {
|
|
17
|
+
time: string;
|
|
18
|
+
timeRange: string;
|
|
19
|
+
};
|
|
20
|
+
begin: string;
|
|
21
|
+
end: string;
|
|
22
|
+
hour: string;
|
|
23
|
+
minute: string;
|
|
24
|
+
second: string;
|
|
25
|
+
AM: string;
|
|
26
|
+
PM: string;
|
|
27
|
+
};
|
|
28
|
+
DatePicker: {
|
|
29
|
+
placeholder: {
|
|
30
|
+
date: string;
|
|
31
|
+
dateTime: string;
|
|
32
|
+
dateRange: string[];
|
|
33
|
+
dateTimeRange: string[];
|
|
34
|
+
};
|
|
35
|
+
footer: {
|
|
36
|
+
confirm: string;
|
|
37
|
+
cancel: string;
|
|
38
|
+
};
|
|
39
|
+
selectDate: string;
|
|
40
|
+
selectTime: string;
|
|
41
|
+
year: string;
|
|
42
|
+
month: string;
|
|
43
|
+
day: string;
|
|
44
|
+
monthText: string;
|
|
45
|
+
months: {
|
|
46
|
+
1: string;
|
|
47
|
+
2: string;
|
|
48
|
+
3: string;
|
|
49
|
+
4: string;
|
|
50
|
+
5: string;
|
|
51
|
+
6: string;
|
|
52
|
+
7: string;
|
|
53
|
+
8: string;
|
|
54
|
+
9: string;
|
|
55
|
+
10: string;
|
|
56
|
+
11: string;
|
|
57
|
+
12: string;
|
|
58
|
+
};
|
|
59
|
+
fullMonths: {
|
|
60
|
+
1: string;
|
|
61
|
+
2: string;
|
|
62
|
+
3: string;
|
|
63
|
+
4: string;
|
|
64
|
+
5: string;
|
|
65
|
+
6: string;
|
|
66
|
+
7: string;
|
|
67
|
+
8: string;
|
|
68
|
+
9: string;
|
|
69
|
+
10: string;
|
|
70
|
+
11: string;
|
|
71
|
+
12: string;
|
|
72
|
+
};
|
|
73
|
+
weeks: {
|
|
74
|
+
Mon: string;
|
|
75
|
+
Tue: string;
|
|
76
|
+
Wed: string;
|
|
77
|
+
Thu: string;
|
|
78
|
+
Fri: string;
|
|
79
|
+
Sat: string;
|
|
80
|
+
Sun: string;
|
|
81
|
+
};
|
|
82
|
+
localeFormatToken: {
|
|
83
|
+
FORMAT_SWITCH_DATE: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
Popconfirm: {
|
|
87
|
+
confirm: string;
|
|
88
|
+
cancel: string;
|
|
89
|
+
};
|
|
90
|
+
Navigation: {
|
|
91
|
+
collapseText: string;
|
|
92
|
+
expandText: string;
|
|
93
|
+
};
|
|
94
|
+
Table: {
|
|
95
|
+
emptyText: string;
|
|
96
|
+
pageText: string;
|
|
97
|
+
};
|
|
98
|
+
Select: {
|
|
99
|
+
emptyText: string;
|
|
100
|
+
createText: string;
|
|
101
|
+
};
|
|
102
|
+
Tree: {
|
|
103
|
+
emptyText: string;
|
|
104
|
+
};
|
|
105
|
+
Cascader: {
|
|
106
|
+
emptyText: string;
|
|
107
|
+
};
|
|
108
|
+
List: {
|
|
109
|
+
emptyText: string;
|
|
110
|
+
};
|
|
111
|
+
Calendar: {
|
|
112
|
+
allDay: string;
|
|
113
|
+
AM: string;
|
|
114
|
+
PM: string;
|
|
115
|
+
datestring: string;
|
|
116
|
+
remaining: string;
|
|
117
|
+
};
|
|
118
|
+
Upload: {
|
|
119
|
+
mainText: string;
|
|
120
|
+
illegalTips: string;
|
|
121
|
+
legalTips: string;
|
|
122
|
+
retry: string;
|
|
123
|
+
replace: string;
|
|
124
|
+
clear: string;
|
|
125
|
+
selectedFiles: string;
|
|
126
|
+
illegalSize: string;
|
|
127
|
+
fail: string;
|
|
128
|
+
};
|
|
129
|
+
TreeSelect: {
|
|
130
|
+
searchPlaceholder: string;
|
|
131
|
+
};
|
|
132
|
+
Typography: {
|
|
133
|
+
copy: string;
|
|
134
|
+
copied: string;
|
|
135
|
+
expand: string;
|
|
136
|
+
collapse: string;
|
|
137
|
+
};
|
|
138
|
+
Transfer: {
|
|
139
|
+
emptyLeft: string;
|
|
140
|
+
emptySearch: string;
|
|
141
|
+
emptyRight: string;
|
|
142
|
+
placeholder: string;
|
|
143
|
+
clear: string;
|
|
144
|
+
selectAll: string;
|
|
145
|
+
clearSelectAll: string;
|
|
146
|
+
total: string;
|
|
147
|
+
selected: string;
|
|
148
|
+
};
|
|
149
|
+
Form: {
|
|
150
|
+
optional: string;
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* [i18n-Romanian]
|
|
155
|
+
*/
|
|
156
|
+
export default _default;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { ro } from 'date-fns/locale';
|
|
2
|
+
/**
|
|
3
|
+
* [i18n-Romanian]
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
code: 'ro',
|
|
8
|
+
dateFnsLocale: ro,
|
|
9
|
+
Pagination: {
|
|
10
|
+
item: 'articol',
|
|
11
|
+
pageSize: 'articole/pagină',
|
|
12
|
+
page: ' pagini',
|
|
13
|
+
total: '',
|
|
14
|
+
jumpTo: 'Treci la'
|
|
15
|
+
},
|
|
16
|
+
Modal: {
|
|
17
|
+
confirm: 'Confirmă',
|
|
18
|
+
cancel: 'Anulează'
|
|
19
|
+
},
|
|
20
|
+
TimePicker: {
|
|
21
|
+
placeholder: {
|
|
22
|
+
time: 'Selectează timpul',
|
|
23
|
+
timeRange: 'Selectează o perioadă de timp'
|
|
24
|
+
},
|
|
25
|
+
begin: 'Ora de începere',
|
|
26
|
+
end: 'Ora de încheiere',
|
|
27
|
+
hour: '',
|
|
28
|
+
minute: '',
|
|
29
|
+
second: '',
|
|
30
|
+
AM: 'AM',
|
|
31
|
+
PM: 'PM'
|
|
32
|
+
},
|
|
33
|
+
DatePicker: {
|
|
34
|
+
placeholder: {
|
|
35
|
+
date: 'Selectează data',
|
|
36
|
+
dateTime: 'Selectează data și ora',
|
|
37
|
+
dateRange: ['Data de început', 'Data de sfârșit'],
|
|
38
|
+
dateTimeRange: ['Data de început', 'Data de sfârșit']
|
|
39
|
+
},
|
|
40
|
+
footer: {
|
|
41
|
+
confirm: 'Confirmă',
|
|
42
|
+
cancel: 'Anulează'
|
|
43
|
+
},
|
|
44
|
+
selectDate: 'Selectează data',
|
|
45
|
+
selectTime: 'Selectează timpul',
|
|
46
|
+
year: 'an',
|
|
47
|
+
month: 'lună',
|
|
48
|
+
day: 'zi',
|
|
49
|
+
monthText: '${month} ${year}',
|
|
50
|
+
months: {
|
|
51
|
+
1: 'Ian',
|
|
52
|
+
2: 'Feb',
|
|
53
|
+
3: 'Mar',
|
|
54
|
+
4: 'Apr',
|
|
55
|
+
5: 'Mai',
|
|
56
|
+
6: 'Iun',
|
|
57
|
+
7: 'Iul',
|
|
58
|
+
8: 'Aug',
|
|
59
|
+
9: 'Sep',
|
|
60
|
+
10: 'Oct',
|
|
61
|
+
11: 'Noi',
|
|
62
|
+
12: 'Dec'
|
|
63
|
+
},
|
|
64
|
+
fullMonths: {
|
|
65
|
+
1: 'Ianuarie',
|
|
66
|
+
2: 'Februarie',
|
|
67
|
+
3: 'Martie',
|
|
68
|
+
4: 'Aprilie',
|
|
69
|
+
5: 'Mai',
|
|
70
|
+
6: 'Iunie',
|
|
71
|
+
7: 'Iulie',
|
|
72
|
+
8: 'August',
|
|
73
|
+
9: 'Septembrie',
|
|
74
|
+
10: 'Octombrie',
|
|
75
|
+
11: 'Noiembrie',
|
|
76
|
+
12: 'Decembrie'
|
|
77
|
+
},
|
|
78
|
+
weeks: {
|
|
79
|
+
Mon: 'Lun',
|
|
80
|
+
Tue: 'Mar',
|
|
81
|
+
Wed: 'Mie',
|
|
82
|
+
Thu: 'Joi',
|
|
83
|
+
Fri: 'Vin',
|
|
84
|
+
Sat: 'Sâm',
|
|
85
|
+
Sun: 'dum'
|
|
86
|
+
},
|
|
87
|
+
localeFormatToken: {
|
|
88
|
+
FORMAT_SWITCH_DATE: 'yyyy-MM-dd'
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
Popconfirm: {
|
|
92
|
+
confirm: 'Confirmă',
|
|
93
|
+
cancel: 'Anulează'
|
|
94
|
+
},
|
|
95
|
+
Navigation: {
|
|
96
|
+
collapseText: 'Comprimă bara laterală',
|
|
97
|
+
expandText: 'Extinde bara laterală'
|
|
98
|
+
},
|
|
99
|
+
Table: {
|
|
100
|
+
emptyText: 'Nici un rezultat',
|
|
101
|
+
pageText: 'Arată ${currentStart} la ${currentEnd} de ${total}'
|
|
102
|
+
},
|
|
103
|
+
Select: {
|
|
104
|
+
emptyText: 'Nici un rezultat',
|
|
105
|
+
createText: 'Creează'
|
|
106
|
+
},
|
|
107
|
+
Tree: {
|
|
108
|
+
emptyText: 'Nici un rezultat'
|
|
109
|
+
},
|
|
110
|
+
Cascader: {
|
|
111
|
+
emptyText: 'Nici un rezultat'
|
|
112
|
+
},
|
|
113
|
+
List: {
|
|
114
|
+
emptyText: 'Nici un rezultat'
|
|
115
|
+
},
|
|
116
|
+
Calendar: {
|
|
117
|
+
allDay: 'Toată ziua',
|
|
118
|
+
AM: '${time} AM',
|
|
119
|
+
PM: '${time} PM',
|
|
120
|
+
datestring: '',
|
|
121
|
+
remaining: '${remained} plus'
|
|
122
|
+
},
|
|
123
|
+
Upload: {
|
|
124
|
+
mainText: 'Dă clic pentru a descărca fișierul sau trage fișierul aici',
|
|
125
|
+
illegalTips: 'Acest tip de fișier nu este acceptat',
|
|
126
|
+
legalTips: 'Eliberează și începe încărcarea',
|
|
127
|
+
retry: 'Încearcă din nou',
|
|
128
|
+
replace: 'Înlocuiește fișierul',
|
|
129
|
+
clear: 'Șterge',
|
|
130
|
+
selectedFiles: 'Fișiere selectate',
|
|
131
|
+
illegalSize: 'Dimensiunea greșită a fișierului',
|
|
132
|
+
fail: 'Eșec de încărcare'
|
|
133
|
+
},
|
|
134
|
+
TreeSelect: {
|
|
135
|
+
searchPlaceholder: 'Căutare'
|
|
136
|
+
},
|
|
137
|
+
Typography: {
|
|
138
|
+
copy: 'Copiază',
|
|
139
|
+
copied: 'Copiat',
|
|
140
|
+
expand: 'Extinde',
|
|
141
|
+
collapse: 'Comprimare'
|
|
142
|
+
},
|
|
143
|
+
Transfer: {
|
|
144
|
+
emptyLeft: 'Nu există date',
|
|
145
|
+
emptySearch: 'Nu s-au găsit rezultate',
|
|
146
|
+
emptyRight: 'Fără conținut, verifică la stânga',
|
|
147
|
+
placeholder: 'Căutare',
|
|
148
|
+
clear: 'Șterge',
|
|
149
|
+
selectAll: 'Selectează toate',
|
|
150
|
+
clearSelectAll: 'Deselectează toate',
|
|
151
|
+
total: 'Total ${total} articole',
|
|
152
|
+
selected: '${total} articole selectate'
|
|
153
|
+
},
|
|
154
|
+
Form: {
|
|
155
|
+
optional: '(opțional)'
|
|
156
|
+
}
|
|
157
|
+
};
|
|
@@ -242,12 +242,12 @@ export default class ModalContent extends BaseComponent {
|
|
|
242
242
|
},
|
|
243
243
|
addKeyDownEventListener: () => {
|
|
244
244
|
if (this.props.closeOnEsc) {
|
|
245
|
-
document.addEventListener('keydown', this.foundation.handleKeyDown
|
|
245
|
+
document.addEventListener('keydown', this.foundation.handleKeyDown);
|
|
246
246
|
}
|
|
247
247
|
},
|
|
248
248
|
removeKeyDownEventListener: () => {
|
|
249
249
|
if (this.props.closeOnEsc) {
|
|
250
|
-
document.removeEventListener('keydown', this.foundation.handleKeyDown
|
|
250
|
+
document.removeEventListener('keydown', this.foundation.handleKeyDown);
|
|
251
251
|
}
|
|
252
252
|
},
|
|
253
253
|
getMouseState: () => this.state.dialogMouseDown,
|
package/lib/es/select/index.d.ts
CHANGED
|
@@ -6,9 +6,9 @@ import BaseComponent, { ValidateStatus } from '../_base/baseComponent';
|
|
|
6
6
|
import { InputProps } from '../input/index';
|
|
7
7
|
import Option, { OptionProps } from './option';
|
|
8
8
|
import OptionGroup from './optionGroup';
|
|
9
|
-
import { Subtract } from 'utility-types';
|
|
10
9
|
import '@douyinfe/semi-foundation/lib/es/select/select.css';
|
|
11
|
-
import { Position, TooltipProps } from '../tooltip';
|
|
10
|
+
import type { Position, TooltipProps } from '../tooltip';
|
|
11
|
+
import type { Subtract } from 'utility-types';
|
|
12
12
|
export type { OptionProps } from './option';
|
|
13
13
|
export type { OptionGroupProps } from './optionGroup';
|
|
14
14
|
export type { VirtualRowProps } from './virtualRow';
|
package/lib/es/select/index.js
CHANGED
|
@@ -633,7 +633,7 @@ class Select extends BaseComponent {
|
|
|
633
633
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
634
634
|
React.createElement("div", {
|
|
635
635
|
id: "".concat(prefixcls, "-").concat(this.selectOptionListID),
|
|
636
|
-
className: dropdownClassName,
|
|
636
|
+
className: cls("".concat(prefixcls, "-option-list-wrapper"), dropdownClassName),
|
|
637
637
|
style: style,
|
|
638
638
|
ref: this.setOptionContainerEl,
|
|
639
639
|
onKeyDown: e => this.foundation.handleContainerKeyDown(e)
|
|
@@ -1145,7 +1145,7 @@ Select.defaultProps = {
|
|
|
1145
1145
|
onBlur: _noop,
|
|
1146
1146
|
onClear: _noop,
|
|
1147
1147
|
onListScroll: _noop,
|
|
1148
|
-
maxHeight:
|
|
1148
|
+
maxHeight: numbers.LIST_HEIGHT,
|
|
1149
1149
|
dropdownMatchSelectWidth: true,
|
|
1150
1150
|
defaultActiveFirstOption: true,
|
|
1151
1151
|
showArrow: true,
|
|
@@ -31,7 +31,8 @@ class HeadTable extends React.PureComponent {
|
|
|
31
31
|
onDidUpdate,
|
|
32
32
|
showHeader,
|
|
33
33
|
anyColumnFixed,
|
|
34
|
-
bodyHasScrollBar
|
|
34
|
+
bodyHasScrollBar,
|
|
35
|
+
sticky
|
|
35
36
|
} = this.props;
|
|
36
37
|
|
|
37
38
|
if (!showHeader) {
|
|
@@ -62,10 +63,20 @@ class HeadTable extends React.PureComponent {
|
|
|
62
63
|
components: components,
|
|
63
64
|
onDidUpdate: onDidUpdate
|
|
64
65
|
}));
|
|
66
|
+
const headTableCls = classnames("".concat(prefixCls, "-header"), {
|
|
67
|
+
["".concat(prefixCls, "-header-sticky")]: sticky
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
const stickyTop = _get(sticky, 'top', 0);
|
|
71
|
+
|
|
72
|
+
if (typeof stickyTop === 'number') {
|
|
73
|
+
headStyle.top = stickyTop;
|
|
74
|
+
}
|
|
75
|
+
|
|
65
76
|
return /*#__PURE__*/React.createElement("div", {
|
|
66
77
|
key: "headTable",
|
|
67
78
|
style: headStyle,
|
|
68
|
-
className:
|
|
79
|
+
className: headTableCls,
|
|
69
80
|
ref: forwardedRef,
|
|
70
81
|
onScroll: handleBodyScroll
|
|
71
82
|
}, /*#__PURE__*/React.createElement(Table, {
|
package/lib/es/table/Table.js
CHANGED
|
@@ -655,7 +655,8 @@ class Table extends BaseComponent {
|
|
|
655
655
|
rowSelection,
|
|
656
656
|
dataSource,
|
|
657
657
|
bodyHasScrollBar,
|
|
658
|
-
disabledRowKeysSet
|
|
658
|
+
disabledRowKeysSet,
|
|
659
|
+
sticky
|
|
659
660
|
} = props;
|
|
660
661
|
|
|
661
662
|
const selectedRowKeysSet = _get(rowSelection, 'selectedRowKeysSet', new Set());
|
|
@@ -674,7 +675,8 @@ class Table extends BaseComponent {
|
|
|
674
675
|
selectedRowKeysSet: selectedRowKeysSet,
|
|
675
676
|
onHeaderRow: onHeaderRow,
|
|
676
677
|
dataSource: dataSource,
|
|
677
|
-
bodyHasScrollBar: bodyHasScrollBar
|
|
678
|
+
bodyHasScrollBar: bodyHasScrollBar,
|
|
679
|
+
sticky: sticky
|
|
678
680
|
}) : null;
|
|
679
681
|
const bodyTable = /*#__PURE__*/React.createElement(BodyTable, Object.assign({}, _omit(props, ['rowSelection', 'headWidths']), {
|
|
680
682
|
key: "body",
|
|
@@ -993,13 +995,18 @@ class Table extends BaseComponent {
|
|
|
993
995
|
isAnyColumnFixed: columns => _some(this.getColumns(columns || this.props.columns, this.props.children), column => Boolean(column.fixed)),
|
|
994
996
|
useFixedHeader: () => {
|
|
995
997
|
const {
|
|
996
|
-
scroll
|
|
998
|
+
scroll,
|
|
999
|
+
sticky
|
|
997
1000
|
} = this.props;
|
|
998
1001
|
|
|
999
1002
|
if (_get(scroll, 'y')) {
|
|
1000
1003
|
return true;
|
|
1001
1004
|
}
|
|
1002
1005
|
|
|
1006
|
+
if (sticky) {
|
|
1007
|
+
return true;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1003
1010
|
return false;
|
|
1004
1011
|
},
|
|
1005
1012
|
setHeadWidths: function (headWidths) {
|
|
@@ -55,6 +55,7 @@ export interface TableProps<RecordType extends Record<string, any> = any> extend
|
|
|
55
55
|
onGroupedRow?: OnGroupedRow<RecordType>;
|
|
56
56
|
onHeaderRow?: OnHeaderRow<RecordType>;
|
|
57
57
|
onRow?: OnRow<RecordType>;
|
|
58
|
+
sticky?: Sticky;
|
|
58
59
|
}
|
|
59
60
|
export interface ColumnProps<RecordType extends Record<string, any> = any> {
|
|
60
61
|
[x: string]: any;
|
|
@@ -288,4 +289,7 @@ export declare type BodyScrollPosition = 'both' | 'middle' | 'left' | 'right';
|
|
|
288
289
|
export declare type TableLocale = Locale['Table'];
|
|
289
290
|
export declare type Direction = CSSDirection;
|
|
290
291
|
export declare type IncludeGroupRecord<RecordType> = BaseIncludeGroupRecord<RecordType>;
|
|
292
|
+
export declare type Sticky = boolean | {
|
|
293
|
+
top?: number;
|
|
294
|
+
};
|
|
291
295
|
export {};
|
|
@@ -37,7 +37,7 @@ export default class Title extends PureComponent<TitleProps> {
|
|
|
37
37
|
underline: PropTypes.Requireable<boolean>;
|
|
38
38
|
strong: PropTypes.Requireable<boolean>;
|
|
39
39
|
type: PropTypes.Requireable<"warning" | "success" | "primary" | "tertiary" | "secondary" | "danger" | "quaternary">;
|
|
40
|
-
heading: PropTypes.Requireable<
|
|
40
|
+
heading: PropTypes.Requireable<4 | 2 | 1 | 3 | 6 | 5>;
|
|
41
41
|
style: PropTypes.Requireable<object>;
|
|
42
42
|
className: PropTypes.Requireable<string>;
|
|
43
43
|
component: PropTypes.Requireable<string>;
|
package/lib/es/upload/index.d.ts
CHANGED
|
@@ -184,6 +184,11 @@ declare class Upload extends BaseComponent<UploadProps, UploadState> {
|
|
|
184
184
|
* manual upload by user
|
|
185
185
|
*/
|
|
186
186
|
upload: () => void;
|
|
187
|
+
/**
|
|
188
|
+
* ref method
|
|
189
|
+
* manual open file select dialog
|
|
190
|
+
*/
|
|
191
|
+
openFileDialog: () => void;
|
|
187
192
|
renderFile: (file: FileItem, index: number, locale: Locale['Upload']) => ReactNode;
|
|
188
193
|
renderFileList: () => ReactNode;
|
|
189
194
|
renderFileListPic: () => JSX.Element;
|
package/lib/es/upload/index.js
CHANGED
|
@@ -94,6 +94,15 @@ class Upload extends BaseComponent {
|
|
|
94
94
|
} = this.state;
|
|
95
95
|
this.foundation.startUpload(fileList);
|
|
96
96
|
};
|
|
97
|
+
/**
|
|
98
|
+
* ref method
|
|
99
|
+
* manual open file select dialog
|
|
100
|
+
*/
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
this.openFileDialog = () => {
|
|
104
|
+
this.onClick();
|
|
105
|
+
};
|
|
97
106
|
|
|
98
107
|
this.renderFile = (file, index, locale) => {
|
|
99
108
|
const {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.20.
|
|
3
|
+
"version": "2.20.9-alpha.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@douyinfe/semi-animation": "2.12.0",
|
|
21
|
-
"@douyinfe/semi-animation-react": "2.20.
|
|
22
|
-
"@douyinfe/semi-foundation": "2.20.
|
|
23
|
-
"@douyinfe/semi-icons": "2.20.
|
|
21
|
+
"@douyinfe/semi-animation-react": "2.20.9-alpha.0",
|
|
22
|
+
"@douyinfe/semi-foundation": "2.20.9-alpha.0",
|
|
23
|
+
"@douyinfe/semi-icons": "2.20.9-alpha.0",
|
|
24
24
|
"@douyinfe/semi-illustrations": "2.15.0",
|
|
25
|
-
"@douyinfe/semi-theme-default": "2.20.
|
|
25
|
+
"@douyinfe/semi-theme-default": "2.20.9-alpha.0",
|
|
26
26
|
"async-validator": "^3.5.0",
|
|
27
27
|
"classnames": "^2.2.6",
|
|
28
28
|
"copy-text-to-clipboard": "^2.1.1",
|
|
@@ -69,13 +69,13 @@
|
|
|
69
69
|
],
|
|
70
70
|
"author": "",
|
|
71
71
|
"license": "MIT",
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "023bcb9e58c4d547ac53ca44c6d093eeb9ada6e2",
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
75
75
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
76
76
|
"@babel/preset-env": "^7.15.8",
|
|
77
77
|
"@babel/preset-react": "^7.14.5",
|
|
78
|
-
"@douyinfe/semi-scss-compile": "2.20.
|
|
78
|
+
"@douyinfe/semi-scss-compile": "2.20.9-alpha.0",
|
|
79
79
|
"@storybook/addon-knobs": "^6.3.1",
|
|
80
80
|
"@types/lodash": "^4.14.176",
|
|
81
81
|
"@types/react": ">=16.0.0",
|