@douyinfe/semi-foundation 2.53.0 → 2.53.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/badge/constants.ts
CHANGED
|
@@ -7,7 +7,7 @@ const cssClasses = {
|
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
const strings = {
|
|
10
|
-
TYPE_SET: ['primary', 'secondary', 'tertiary', 'warning', 'danger'],
|
|
10
|
+
TYPE_SET: ['success', 'primary', 'secondary', 'tertiary', 'warning', 'danger'],
|
|
11
11
|
THEME_SET: ['solid', 'light', 'inverted'],
|
|
12
12
|
POS_SET: ['leftTop', 'leftBottom', 'rightTop', 'rightBottom'],
|
|
13
13
|
};
|
|
@@ -10,7 +10,7 @@ const cssClasses = {
|
|
|
10
10
|
};
|
|
11
11
|
exports.cssClasses = cssClasses;
|
|
12
12
|
const strings = {
|
|
13
|
-
TYPE_SET: ['primary', 'secondary', 'tertiary', 'warning', 'danger'],
|
|
13
|
+
TYPE_SET: ['success', 'primary', 'secondary', 'tertiary', 'warning', 'danger'],
|
|
14
14
|
THEME_SET: ['solid', 'light', 'inverted'],
|
|
15
15
|
POS_SET: ['leftTop', 'leftBottom', 'rightTop', 'rightBottom']
|
|
16
16
|
};
|
|
@@ -160,11 +160,16 @@ class TimePickerFoundation extends _foundation.default {
|
|
|
160
160
|
__prevTimeZone
|
|
161
161
|
} = props;
|
|
162
162
|
let dates = this.parseValue(value);
|
|
163
|
-
|
|
163
|
+
let invalid = dates.some(d => isNaN(Number(d)));
|
|
164
164
|
if (!invalid) {
|
|
165
165
|
if (this.isValidTimeZone(timeZone)) {
|
|
166
166
|
dates = dates.map(date => (0, _dateFnsExtra.utcToZonedTime)(this.isValidTimeZone(__prevTimeZone) ? (0, _dateFnsExtra.zonedTimeToUtc)(date, __prevTimeZone) : date, timeZone));
|
|
167
167
|
}
|
|
168
|
+
invalid = dates.some(d => this.isDisabledHMS({
|
|
169
|
+
hours: d.getHours(),
|
|
170
|
+
minutes: d.getMinutes(),
|
|
171
|
+
seconds: d.getSeconds()
|
|
172
|
+
}));
|
|
168
173
|
}
|
|
169
174
|
const inputValue = this.formatValue(dates);
|
|
170
175
|
this.setState({
|
|
@@ -3,7 +3,7 @@ const cssClasses = {
|
|
|
3
3
|
PREFIX: `${BASE_CLASS_PREFIX}-badge`
|
|
4
4
|
};
|
|
5
5
|
const strings = {
|
|
6
|
-
TYPE_SET: ['primary', 'secondary', 'tertiary', 'warning', 'danger'],
|
|
6
|
+
TYPE_SET: ['success', 'primary', 'secondary', 'tertiary', 'warning', 'danger'],
|
|
7
7
|
THEME_SET: ['solid', 'light', 'inverted'],
|
|
8
8
|
POS_SET: ['leftTop', 'leftBottom', 'rightTop', 'rightBottom']
|
|
9
9
|
};
|
|
@@ -153,11 +153,16 @@ class TimePickerFoundation extends BaseFoundation {
|
|
|
153
153
|
__prevTimeZone
|
|
154
154
|
} = props;
|
|
155
155
|
let dates = this.parseValue(value);
|
|
156
|
-
|
|
156
|
+
let invalid = dates.some(d => isNaN(Number(d)));
|
|
157
157
|
if (!invalid) {
|
|
158
158
|
if (this.isValidTimeZone(timeZone)) {
|
|
159
159
|
dates = dates.map(date => utcToZonedTime(this.isValidTimeZone(__prevTimeZone) ? zonedTimeToUtc(date, __prevTimeZone) : date, timeZone));
|
|
160
160
|
}
|
|
161
|
+
invalid = dates.some(d => this.isDisabledHMS({
|
|
162
|
+
hours: d.getHours(),
|
|
163
|
+
minutes: d.getMinutes(),
|
|
164
|
+
seconds: d.getSeconds()
|
|
165
|
+
}));
|
|
161
166
|
}
|
|
162
167
|
const inputValue = this.formatValue(dates);
|
|
163
168
|
this.setState({
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.53.
|
|
3
|
+
"version": "2.53.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build:lib": "node ./scripts/compileLib.js",
|
|
7
7
|
"prepublishOnly": "npm run build:lib"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@douyinfe/semi-animation": "2.53.
|
|
10
|
+
"@douyinfe/semi-animation": "2.53.2",
|
|
11
11
|
"async-validator": "^3.5.0",
|
|
12
12
|
"classnames": "^2.2.6",
|
|
13
13
|
"date-fns": "^2.29.3",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"*.scss",
|
|
25
25
|
"*.css"
|
|
26
26
|
],
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "89bf62ba8b59c0c2c43eaa46922fa9a1ff6a3e35",
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
30
30
|
"@babel/preset-env": "^7.15.8",
|
package/timePicker/foundation.ts
CHANGED
|
@@ -202,8 +202,8 @@ class TimePickerFoundation<P = Record<string, any>, S = Record<string, any>> ext
|
|
|
202
202
|
const { value, timeZone, __prevTimeZone } = props;
|
|
203
203
|
|
|
204
204
|
let dates = this.parseValue(value);
|
|
205
|
-
const invalid = this.validateDates(dates);
|
|
206
205
|
|
|
206
|
+
let invalid = dates.some(d => isNaN(Number(d)));
|
|
207
207
|
if (!invalid) {
|
|
208
208
|
if (this.isValidTimeZone(timeZone)) {
|
|
209
209
|
dates = dates.map(date =>
|
|
@@ -213,6 +213,9 @@ class TimePickerFoundation<P = Record<string, any>, S = Record<string, any>> ext
|
|
|
213
213
|
)
|
|
214
214
|
);
|
|
215
215
|
}
|
|
216
|
+
invalid = dates.some(d =>
|
|
217
|
+
this.isDisabledHMS({ hours: d.getHours(), minutes: d.getMinutes(), seconds: d.getSeconds() })
|
|
218
|
+
);
|
|
216
219
|
}
|
|
217
220
|
const inputValue = this.formatValue(dates);
|
|
218
221
|
|