@douyinfe/semi-foundation 2.35.0 → 2.36.0-beta.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/calendar/calendar.scss +1 -1
- package/datePicker/_utils/getYears.ts +8 -4
- package/datePicker/datePicker.scss +0 -1
- package/datePicker/foundation.ts +1 -1
- package/datePicker/monthsGridFoundation.ts +2 -1
- package/datePicker/yearAndMonthFoundation.ts +3 -1
- package/lib/cjs/calendar/calendar.css +2 -2
- package/lib/cjs/calendar/calendar.scss +1 -1
- package/lib/cjs/datePicker/_utils/getYears.d.ts +1 -1
- package/lib/cjs/datePicker/_utils/getYears.js +11 -5
- package/lib/cjs/datePicker/datePicker.css +0 -1
- package/lib/cjs/datePicker/datePicker.scss +0 -1
- package/lib/cjs/datePicker/foundation.d.ts +1 -1
- package/lib/cjs/datePicker/monthsGridFoundation.d.ts +2 -1
- package/lib/cjs/datePicker/yearAndMonthFoundation.d.ts +2 -0
- package/lib/cjs/table/foundation.js +2 -1
- package/lib/cjs/table/table.css +6 -0
- package/lib/cjs/table/table.scss +12 -0
- package/lib/cjs/tabs/tabs.css +14 -14
- package/lib/cjs/tabs/tabs.scss +16 -14
- package/lib/cjs/timePicker/foundation.d.ts +1 -1
- package/lib/cjs/timePicker/foundation.js +3 -5
- package/lib/cjs/typography/constants.d.ts +1 -0
- package/lib/cjs/typography/constants.js +1 -0
- package/lib/cjs/typography/typography.css +120 -0
- package/lib/cjs/typography/typography.scss +131 -6
- package/lib/cjs/typography/variables.scss +48 -0
- package/lib/es/calendar/calendar.css +2 -2
- package/lib/es/calendar/calendar.scss +1 -1
- package/lib/es/datePicker/_utils/getYears.d.ts +1 -1
- package/lib/es/datePicker/_utils/getYears.js +11 -5
- package/lib/es/datePicker/datePicker.css +0 -1
- package/lib/es/datePicker/datePicker.scss +0 -1
- package/lib/es/datePicker/foundation.d.ts +1 -1
- package/lib/es/datePicker/monthsGridFoundation.d.ts +2 -1
- package/lib/es/datePicker/yearAndMonthFoundation.d.ts +2 -0
- package/lib/es/table/foundation.js +2 -1
- package/lib/es/table/table.css +6 -0
- package/lib/es/table/table.scss +12 -0
- package/lib/es/tabs/tabs.css +14 -14
- package/lib/es/tabs/tabs.scss +16 -14
- package/lib/es/timePicker/foundation.d.ts +1 -1
- package/lib/es/timePicker/foundation.js +3 -5
- package/lib/es/typography/constants.d.ts +1 -0
- package/lib/es/typography/constants.js +1 -0
- package/lib/es/typography/typography.css +120 -0
- package/lib/es/typography/typography.scss +131 -6
- package/lib/es/typography/variables.scss +48 -0
- package/overflowList/foundation.ts +4 -4
- package/package.json +2 -2
- package/table/foundation.ts +1 -0
- package/table/table.scss +12 -0
- package/tabs/tabs.scss +16 -14
- package/timePicker/foundation.ts +4 -6
- package/typography/constants.ts +1 -0
- package/typography/typography.scss +131 -6
- package/typography/variables.scss +48 -0
|
@@ -177,49 +177,174 @@ $module: #{$prefix}-typography;
|
|
|
177
177
|
&-paragraph {
|
|
178
178
|
margin: $spacing-typography_title_paragraph-margin;
|
|
179
179
|
}
|
|
180
|
+
|
|
180
181
|
}
|
|
181
182
|
|
|
182
183
|
// ============ Title ============
|
|
183
184
|
h1.#{$module},
|
|
184
185
|
.#{$module}-h1.#{$module} {
|
|
185
186
|
@include font-size-header-1;
|
|
186
|
-
font-weight: $font-
|
|
187
|
+
font-weight: $font-typography_title1-fontWeight;
|
|
187
188
|
margin: $spacing-typography_title_h1-margin;
|
|
189
|
+
|
|
190
|
+
&.#{$module}-h1-weight-light {
|
|
191
|
+
font-weight: $font-typography_title1-light-fontWeight;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
&.#{$module}-h1-weight-regular {
|
|
195
|
+
font-weight: $font-typography_title1-regular-fontWeight;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
&.#{$module}-h1-weight-medium {
|
|
199
|
+
font-weight: $font-typography_title1-medium-fontWeight;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
&.#{$module}-h1-weight-semibold {
|
|
203
|
+
font-weight: $font-typography_title1-semibold-fontWeight;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
&.#{$module}-h1-weight-bold {
|
|
207
|
+
font-weight: $font-typography_title1-bold-fontWeight;
|
|
208
|
+
}
|
|
209
|
+
|
|
188
210
|
}
|
|
189
211
|
|
|
190
212
|
h2.#{$module},
|
|
191
213
|
.#{$module}-h2.#{$module} {
|
|
192
214
|
@include font-size-header-2;
|
|
193
|
-
font-weight: $font-
|
|
215
|
+
font-weight: $font-typography_title2-fontWeight;
|
|
194
216
|
margin: $spacing-typography_title_h2-margin;
|
|
217
|
+
|
|
218
|
+
&.#{$module}-h2-weight-light {
|
|
219
|
+
font-weight: $font-typography_title2-light-fontWeight;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
&.#{$module}-h2-weight-regular {
|
|
223
|
+
font-weight: $font-typography_title2-regular-fontWeight;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
&.#{$module}-h2-weight-medium {
|
|
227
|
+
font-weight: $font-typography_title2-medium-fontWeight;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&.#{$module}-h2-weight-semibold {
|
|
231
|
+
font-weight: $font-typography_title2-semibold-fontWeight;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
&.#{$module}-h2-weight-bold {
|
|
235
|
+
font-weight: $font-typography_title2-bold-fontWeight;
|
|
236
|
+
}
|
|
237
|
+
|
|
195
238
|
}
|
|
196
239
|
|
|
197
240
|
h3.#{$module},
|
|
198
241
|
.#{$module}-h3.#{$module} {
|
|
199
242
|
@include font-size-header-3;
|
|
200
|
-
font-weight: $font-
|
|
243
|
+
font-weight: $font-typography_title3-fontWeight;
|
|
201
244
|
margin: $spacing-typography_title_h3-margin;
|
|
245
|
+
|
|
246
|
+
&.#{$module}-h3-weight-light {
|
|
247
|
+
font-weight: $font-typography_title3-light-fontWeight;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
&.#{$module}-h3-weight-regular {
|
|
251
|
+
font-weight: $font-typography_title3-regular-fontWeight;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
&.#{$module}-h3-weight-medium {
|
|
255
|
+
font-weight: $font-typography_title3-medium-fontWeight;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
&.#{$module}-h3-weight-semibold {
|
|
259
|
+
font-weight: $font-typography_title3-semibold-fontWeight;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
&.#{$module}-h3-weight-bold {
|
|
263
|
+
font-weight: $font-typography_title3-bold-fontWeight;
|
|
264
|
+
}
|
|
265
|
+
|
|
202
266
|
}
|
|
203
267
|
|
|
204
268
|
h4.#{$module},
|
|
205
269
|
.#{$module}-h4.#{$module} {
|
|
206
270
|
@include font-size-header-4;
|
|
207
|
-
font-weight: $font-
|
|
271
|
+
font-weight: $font-typography_title4-fontWeight;
|
|
208
272
|
margin: $spacing-typography_title_h4-margin;
|
|
273
|
+
|
|
274
|
+
&.#{$module}-h4-weight-light {
|
|
275
|
+
font-weight: $font-typography_title4-light-fontWeight;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
&.#{$module}-h4-weight-regular {
|
|
279
|
+
font-weight: $font-typography_title4-regular-fontWeight;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
&.#{$module}-h4-weight-medium {
|
|
283
|
+
font-weight: $font-typography_title4-medium-fontWeight;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
&.#{$module}-h4-weight-semibold {
|
|
287
|
+
font-weight: $font-typography_title4-semibold-fontWeight;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
&.#{$module}-h4-weight-bold {
|
|
291
|
+
font-weight: $font-typography_title4-bold-fontWeight;
|
|
292
|
+
}
|
|
209
293
|
}
|
|
210
294
|
|
|
211
295
|
h5.#{$module},
|
|
212
296
|
.#{$module}-h5.#{$module} {
|
|
213
297
|
@include font-size-header-5;
|
|
214
|
-
font-weight: $font-
|
|
298
|
+
font-weight: $font-typography_title5-fontWeight;
|
|
215
299
|
margin: $spacing-typography_title_h5-margin;
|
|
300
|
+
|
|
301
|
+
&.#{$module}-h5-weight-light {
|
|
302
|
+
font-weight: $font-typography_title5-light-fontWeight;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
&.#{$module}-h5-weight-regular {
|
|
306
|
+
font-weight: $font-typography_title5-regular-fontWeight;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
&.#{$module}-h5-weight-medium {
|
|
310
|
+
font-weight: $font-typography_title5-medium-fontWeight;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
&.#{$module}-h5-weight-semibold {
|
|
314
|
+
font-weight: $font-typography_title5-semibold-fontWeight;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
&.#{$module}-h5-weight-bold {
|
|
318
|
+
font-weight: $font-typography_title5-bold-fontWeight;
|
|
319
|
+
}
|
|
216
320
|
}
|
|
217
321
|
|
|
218
322
|
h6.#{$module},
|
|
219
323
|
.#{$module}-h6.#{$module} {
|
|
220
324
|
@include font-size-header-6;
|
|
221
|
-
font-weight: $font-
|
|
325
|
+
font-weight: $font-typography_title6-fontWeight;
|
|
222
326
|
margin: $spacing-typography_title_h6-margin;
|
|
327
|
+
|
|
328
|
+
&.#{$module}-h6-weight-light {
|
|
329
|
+
font-weight: $font-typography_title6-light-fontWeight;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
&.#{$module}-h6-weight-regular {
|
|
333
|
+
font-weight: $font-typography_title6-regular-fontWeight;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
&.#{$module}-h6-weight-medium {
|
|
337
|
+
font-weight: $font-typography_title6-medium-fontWeight;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
&.#{$module}-h6-weight-semibold {
|
|
341
|
+
font-weight: $font-typography_title6-semibold-fontWeight;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
&.#{$module}-h6-weight-bold {
|
|
345
|
+
font-weight: $font-typography_title6-bold-fontWeight;
|
|
346
|
+
}
|
|
347
|
+
|
|
223
348
|
}
|
|
224
349
|
|
|
225
350
|
// ============ Paragraph ============
|
|
@@ -27,6 +27,54 @@ $font-typography_link-fontWeight: $font-weight-bold; // 链接文本字重
|
|
|
27
27
|
$font-typography_strong-fontWeight: $font-weight-bold; // 强调文本字重
|
|
28
28
|
$font-typography_paragraph_extended-lineHeight: 24px; // 宽松行距段落文本行高
|
|
29
29
|
|
|
30
|
+
$font-typography_title1-fontWeight: $font-typography_title-fontWeight; // 一级标题文本字重
|
|
31
|
+
$font-typography_title2-fontWeight: $font-typography_title-fontWeight; // 二级标题文本字重
|
|
32
|
+
$font-typography_title3-fontWeight: $font-typography_title-fontWeight; // 三级标题文本字重
|
|
33
|
+
$font-typography_title4-fontWeight: $font-typography_title-fontWeight; // 四级标题文本字重
|
|
34
|
+
$font-typography_title5-fontWeight: $font-typography_title-fontWeight; // 五级标题文本字重
|
|
35
|
+
$font-typography_title6-fontWeight: $font-typography_title-fontWeight; // 六级标题文本字重
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
$font-typography_title1-light-fontWeight: 200; // 一级标题文本字重 - 细
|
|
41
|
+
$font-typography_title2-light-fontWeight: 200; // 二级标题文本字重 - 细
|
|
42
|
+
$font-typography_title3-light-fontWeight: 200; // 三级标题文本字重 - 细
|
|
43
|
+
$font-typography_title4-light-fontWeight: 200; // 四级标题文本字重 - 细
|
|
44
|
+
$font-typography_title5-light-fontWeight: 200; // 五级标题文本字重 - 细
|
|
45
|
+
$font-typography_title6-light-fontWeight: 200; // 六级标题文本字重 - 细
|
|
46
|
+
|
|
47
|
+
$font-typography_title1-regular-fontWeight: 400; // 一级标题文本字重 - 正常
|
|
48
|
+
$font-typography_title2-regular-fontWeight: 400; // 二级标题文本字重 - 正常
|
|
49
|
+
$font-typography_title3-regular-fontWeight: 400; // 三级标题文本字重 - 正常
|
|
50
|
+
$font-typography_title4-regular-fontWeight: 400; // 四级标题文本字重 - 正常
|
|
51
|
+
$font-typography_title5-regular-fontWeight: 400; // 五级标题文本字重 - 正常
|
|
52
|
+
$font-typography_title6-regular-fontWeight: 400; // 六级标题文本字重 - 正常
|
|
53
|
+
|
|
54
|
+
$font-typography_title1-medium-fontWeight: 500; // 一级标题文本字重 - 中等
|
|
55
|
+
$font-typography_title2-medium-fontWeight: 500; // 二级标题文本字重 - 中等
|
|
56
|
+
$font-typography_title3-medium-fontWeight: 500; // 三级标题文本字重 - 中等
|
|
57
|
+
$font-typography_title4-medium-fontWeight: 500; // 四级标题文本字重 - 中等
|
|
58
|
+
$font-typography_title5-medium-fontWeight: 500; // 五级标题文本字重 - 中等
|
|
59
|
+
$font-typography_title6-medium-fontWeight: 500; // 六级标题文本字重 - 中等
|
|
60
|
+
|
|
61
|
+
$font-typography_title1-semibold-fontWeight: 600; // 一级标题文本字重 - 半粗
|
|
62
|
+
$font-typography_title2-semibold-fontWeight: 600; // 二级标题文本字重 - 半粗
|
|
63
|
+
$font-typography_title3-semibold-fontWeight: 600; // 三级标题文本字重 - 半粗
|
|
64
|
+
$font-typography_title4-semibold-fontWeight: 600; // 三级标题文本字重 - 半粗
|
|
65
|
+
$font-typography_title5-semibold-fontWeight: 600; // 三级标题文本字重 - 半粗
|
|
66
|
+
$font-typography_title6-semibold-fontWeight: 600; // 三级标题文本字重 - 半粗
|
|
67
|
+
|
|
68
|
+
$font-typography_title1-bold-fontWeight: 700; // 一级标题文本字重 - 粗
|
|
69
|
+
$font-typography_title2-bold-fontWeight: 700; // 二级标题文本字重 - 粗
|
|
70
|
+
$font-typography_title3-bold-fontWeight: 700; // 三级标题文本字重 - 粗
|
|
71
|
+
$font-typography_title4-bold-fontWeight: 700; // 三级标题文本字重 - 粗
|
|
72
|
+
$font-typography_title5-bold-fontWeight: 700; // 三级标题文本字重 - 粗
|
|
73
|
+
$font-typography_title6-bold-fontWeight: 700; // 三级标题文本字重 - 粗
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
30
78
|
$spacing-typography_iconPrefix-marginRight: 4px; // 带前缀文本图标右侧外边距
|
|
31
79
|
$spacing-typography_expandText-marginLeft: 8px; // 支持展开文本展开按钮左侧外边距
|
|
32
80
|
$spacing-typography_copyIcon-marginLeft: 4px; // 可复制文本复制图标左侧外边距
|
|
@@ -263,13 +263,13 @@
|
|
|
263
263
|
justify-content: center;
|
|
264
264
|
align-items: center;
|
|
265
265
|
}
|
|
266
|
-
.semi-calendar-week-grid-row li span {
|
|
266
|
+
.semi-calendar-week-grid-row li > span {
|
|
267
267
|
display: flex;
|
|
268
268
|
align-items: center;
|
|
269
269
|
justify-content: center;
|
|
270
270
|
line-height: 26px;
|
|
271
271
|
}
|
|
272
|
-
.semi-calendar-week-grid-row li span:last-child {
|
|
272
|
+
.semi-calendar-week-grid-row li > span:last-child {
|
|
273
273
|
padding: 0 4px;
|
|
274
274
|
}
|
|
275
275
|
.semi-calendar-week .semi-calendar-all-day {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getYears: () => number[];
|
|
1
|
+
declare const getYears: (startYear?: number, endYear?: number) => number[];
|
|
2
2
|
export default getYears;
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
const getYears = () => {
|
|
2
|
-
const
|
|
3
|
-
|
|
1
|
+
const getYears = (startYear, endYear) => {
|
|
2
|
+
const currentYear = new Date().getFullYear();
|
|
3
|
+
let start = typeof startYear === 'number' ? startYear : currentYear - 100;
|
|
4
|
+
let end = typeof endYear === 'number' ? endYear : currentYear + 100;
|
|
5
|
+
|
|
6
|
+
if (end < start) {
|
|
7
|
+
[start, end] = [end, start];
|
|
8
|
+
}
|
|
9
|
+
|
|
4
10
|
return Array.from({
|
|
5
|
-
length:
|
|
6
|
-
}, (v, i) =>
|
|
11
|
+
length: end - start + 1
|
|
12
|
+
}, (v, i) => start + i);
|
|
7
13
|
};
|
|
8
14
|
|
|
9
15
|
export default getYears;
|
|
@@ -87,7 +87,7 @@ export interface EventHandlerProps {
|
|
|
87
87
|
onPresetClick?: OnPresetClickType;
|
|
88
88
|
onClickOutSide?: () => void;
|
|
89
89
|
}
|
|
90
|
-
export interface DatePickerFoundationProps extends ElementProps, RenderProps, EventHandlerProps {
|
|
90
|
+
export interface DatePickerFoundationProps extends ElementProps, RenderProps, EventHandlerProps, Pick<MonthsGridFoundationProps, 'startYear' | 'endYear'> {
|
|
91
91
|
autoAdjustOverflow?: boolean;
|
|
92
92
|
autoFocus?: boolean;
|
|
93
93
|
autoSwitchDate?: boolean;
|
|
@@ -4,6 +4,7 @@ import { WeekStartNumber } from './_utils/getMonthTable';
|
|
|
4
4
|
import { DateInputFoundationProps, PresetPosition, ValueType } from './foundation';
|
|
5
5
|
import { MonthDayInfo } from './monthFoundation';
|
|
6
6
|
import { ArrayElement } from '../utils/type';
|
|
7
|
+
import { YearAndMonthFoundationProps } from './yearAndMonthFoundation';
|
|
7
8
|
declare type Type = ArrayElement<typeof strings.TYPE_SET>;
|
|
8
9
|
interface MonthsGridElementProps {
|
|
9
10
|
navPrev?: any;
|
|
@@ -13,7 +14,7 @@ interface MonthsGridElementProps {
|
|
|
13
14
|
}
|
|
14
15
|
export declare type PanelType = 'left' | 'right';
|
|
15
16
|
export declare type YearMonthChangeType = 'prevMonth' | 'nextMonth' | 'prevYear' | 'nextYear';
|
|
16
|
-
export interface MonthsGridFoundationProps extends MonthsGridElementProps {
|
|
17
|
+
export interface MonthsGridFoundationProps extends MonthsGridElementProps, Pick<YearAndMonthFoundationProps, 'startYear' | 'endYear'> {
|
|
17
18
|
type?: Type;
|
|
18
19
|
/** may be null if selection is not complete when type is dateRange or dateTimeRange */
|
|
19
20
|
defaultValue?: (Date | null)[];
|
package/lib/es/table/table.css
CHANGED
|
@@ -94,6 +94,12 @@
|
|
|
94
94
|
.semi-table-header-sticky .semi-table-thead > .semi-table-row > .semi-table-row-head {
|
|
95
95
|
background-color: var(--semi-color-bg-1);
|
|
96
96
|
}
|
|
97
|
+
.semi-table-align-center .semi-table-operate-wrapper {
|
|
98
|
+
justify-content: center;
|
|
99
|
+
}
|
|
100
|
+
.semi-table-align-right .semi-table-operate-wrapper {
|
|
101
|
+
justify-content: flex-end;
|
|
102
|
+
}
|
|
97
103
|
.semi-table-operate-wrapper {
|
|
98
104
|
display: flex;
|
|
99
105
|
justify-content: flex-start;
|
package/lib/es/table/table.scss
CHANGED
|
@@ -83,6 +83,18 @@ $module: #{$prefix}-table;
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
&-align-center {
|
|
87
|
+
.#{$module}-operate-wrapper {
|
|
88
|
+
justify-content: center;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&-align-right {
|
|
93
|
+
.#{$module}-operate-wrapper {
|
|
94
|
+
justify-content: flex-end;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
86
98
|
&-operate-wrapper {
|
|
87
99
|
display: flex;
|
|
88
100
|
justify-content: flex-start;
|
package/lib/es/tabs/tabs.css
CHANGED
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
color: var(--semi-color-text-2);
|
|
35
35
|
user-select: none;
|
|
36
36
|
}
|
|
37
|
-
.semi-tabs-bar .semi-tabs-tab .semi-icon {
|
|
37
|
+
.semi-tabs-bar .semi-tabs-tab .semi-icon:not(.semi-icon-checkbox_tick, .semi-icon-radio, .semi-icon-checkbox_indeterminate) {
|
|
38
38
|
position: relative;
|
|
39
39
|
margin-right: 8px;
|
|
40
40
|
top: 3px;
|
|
41
41
|
color: var(--semi-color-text-2);
|
|
42
42
|
transition: color var(--semi-transition_duration-none) var(--semi-transition_function-easeIn) var(--semi-transition_delay-none);
|
|
43
43
|
}
|
|
44
|
-
.semi-tabs-bar .semi-tabs-tab .semi-icon-close {
|
|
44
|
+
.semi-tabs-bar .semi-tabs-tab .semi-icon.semi-tabs-tab-icon-close {
|
|
45
45
|
margin-right: 0;
|
|
46
46
|
font-size: 14px;
|
|
47
47
|
color: var(--semi-color-text-2);
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
.semi-tabs-bar .semi-tabs-tab:hover {
|
|
52
52
|
color: var(--semi-color-text-0);
|
|
53
53
|
}
|
|
54
|
-
.semi-tabs-bar .semi-tabs-tab:hover .semi-icon {
|
|
54
|
+
.semi-tabs-bar .semi-tabs-tab:hover .semi-icon:not(.semi-icon-checkbox_tick, .semi-icon-radio, .semi-icon-checkbox_indeterminate) {
|
|
55
55
|
color: var(--semi-color-text-0);
|
|
56
56
|
}
|
|
57
57
|
.semi-tabs-bar .semi-tabs-tab:active {
|
|
58
58
|
color: var(--semi-color-text-0);
|
|
59
59
|
}
|
|
60
|
-
.semi-tabs-bar .semi-tabs-tab:active .semi-icon {
|
|
60
|
+
.semi-tabs-bar .semi-tabs-tab:active .semi-icon:not(.semi-icon-checkbox_tick, .semi-icon-radio, .semi-icon-checkbox_indeterminate) {
|
|
61
61
|
color: var(--semi-color-text-0);
|
|
62
62
|
}
|
|
63
63
|
.semi-tabs-bar .semi-tabs-tab-active, .semi-tabs-bar .semi-tabs-tab-active:hover {
|
|
@@ -65,13 +65,13 @@
|
|
|
65
65
|
font-weight: 600;
|
|
66
66
|
color: var(--semi-color-text-0);
|
|
67
67
|
}
|
|
68
|
-
.semi-tabs-bar .semi-tabs-tab-active .semi-icon, .semi-tabs-bar .semi-tabs-tab-active:hover .semi-icon {
|
|
68
|
+
.semi-tabs-bar .semi-tabs-tab-active .semi-icon:not(.semi-icon-checkbox_tick, .semi-icon-radio, .semi-icon-checkbox_indeterminate), .semi-tabs-bar .semi-tabs-tab-active:hover .semi-icon:not(.semi-icon-checkbox_tick, .semi-icon-radio, .semi-icon-checkbox_indeterminate) {
|
|
69
69
|
color: var(--semi-color-primary);
|
|
70
70
|
}
|
|
71
|
-
.semi-tabs-bar .semi-tabs-tab-active .semi-icon-close, .semi-tabs-bar .semi-tabs-tab-active:hover .semi-icon-close {
|
|
71
|
+
.semi-tabs-bar .semi-tabs-tab-active .semi-icon.semi-tabs-tab-icon-close, .semi-tabs-bar .semi-tabs-tab-active:hover .semi-icon.semi-tabs-tab-icon-close {
|
|
72
72
|
color: var(--semi-color-text-2);
|
|
73
73
|
}
|
|
74
|
-
.semi-tabs-bar .semi-tabs-tab-active .semi-icon-close:hover {
|
|
74
|
+
.semi-tabs-bar .semi-tabs-tab-active .semi-icon.semi-tabs-tab-icon-close:hover {
|
|
75
75
|
color: var(--semi-color-text-1);
|
|
76
76
|
}
|
|
77
77
|
.semi-tabs-bar .semi-tabs-tab-disabled {
|
|
@@ -94,14 +94,14 @@
|
|
|
94
94
|
color: var(--semi-color-text-2);
|
|
95
95
|
user-select: none;
|
|
96
96
|
}
|
|
97
|
-
.semi-tabs-tab-single.semi-tabs-tab .semi-icon {
|
|
97
|
+
.semi-tabs-tab-single.semi-tabs-tab .semi-icon:not(.semi-icon-checkbox_tick, .semi-icon-radio, .semi-icon-checkbox_indeterminate) {
|
|
98
98
|
position: relative;
|
|
99
99
|
margin-right: 8px;
|
|
100
100
|
top: 3px;
|
|
101
101
|
color: var(--semi-color-text-2);
|
|
102
102
|
transition: color var(--semi-transition_duration-none) var(--semi-transition_function-easeIn) var(--semi-transition_delay-none);
|
|
103
103
|
}
|
|
104
|
-
.semi-tabs-tab-single.semi-tabs-tab .semi-icon-close {
|
|
104
|
+
.semi-tabs-tab-single.semi-tabs-tab .semi-icon.semi-tabs-tab-icon-close {
|
|
105
105
|
margin-right: 0;
|
|
106
106
|
font-size: 14px;
|
|
107
107
|
color: var(--semi-color-text-2);
|
|
@@ -111,13 +111,13 @@
|
|
|
111
111
|
.semi-tabs-tab-single.semi-tabs-tab:hover {
|
|
112
112
|
color: var(--semi-color-text-0);
|
|
113
113
|
}
|
|
114
|
-
.semi-tabs-tab-single.semi-tabs-tab:hover .semi-icon {
|
|
114
|
+
.semi-tabs-tab-single.semi-tabs-tab:hover .semi-icon:not(.semi-icon-checkbox_tick, .semi-icon-radio, .semi-icon-checkbox_indeterminate) {
|
|
115
115
|
color: var(--semi-color-text-0);
|
|
116
116
|
}
|
|
117
117
|
.semi-tabs-tab-single.semi-tabs-tab:active {
|
|
118
118
|
color: var(--semi-color-text-0);
|
|
119
119
|
}
|
|
120
|
-
.semi-tabs-tab-single.semi-tabs-tab:active .semi-icon {
|
|
120
|
+
.semi-tabs-tab-single.semi-tabs-tab:active .semi-icon:not(.semi-icon-checkbox_tick, .semi-icon-radio, .semi-icon-checkbox_indeterminate) {
|
|
121
121
|
color: var(--semi-color-text-0);
|
|
122
122
|
}
|
|
123
123
|
.semi-tabs-tab-single.semi-tabs-tab-active, .semi-tabs-tab-single.semi-tabs-tab-active:hover {
|
|
@@ -125,13 +125,13 @@
|
|
|
125
125
|
font-weight: 600;
|
|
126
126
|
color: var(--semi-color-text-0);
|
|
127
127
|
}
|
|
128
|
-
.semi-tabs-tab-single.semi-tabs-tab-active .semi-icon, .semi-tabs-tab-single.semi-tabs-tab-active:hover .semi-icon {
|
|
128
|
+
.semi-tabs-tab-single.semi-tabs-tab-active .semi-icon:not(.semi-icon-checkbox_tick, .semi-icon-radio, .semi-icon-checkbox_indeterminate), .semi-tabs-tab-single.semi-tabs-tab-active:hover .semi-icon:not(.semi-icon-checkbox_tick, .semi-icon-radio, .semi-icon-checkbox_indeterminate) {
|
|
129
129
|
color: var(--semi-color-primary);
|
|
130
130
|
}
|
|
131
|
-
.semi-tabs-tab-single.semi-tabs-tab-active .semi-icon-close, .semi-tabs-tab-single.semi-tabs-tab-active:hover .semi-icon-close {
|
|
131
|
+
.semi-tabs-tab-single.semi-tabs-tab-active .semi-icon.semi-tabs-tab-icon-close, .semi-tabs-tab-single.semi-tabs-tab-active:hover .semi-icon.semi-tabs-tab-icon-close {
|
|
132
132
|
color: var(--semi-color-text-2);
|
|
133
133
|
}
|
|
134
|
-
.semi-tabs-tab-single.semi-tabs-tab-active .semi-icon-close:hover {
|
|
134
|
+
.semi-tabs-tab-single.semi-tabs-tab-active .semi-icon.semi-tabs-tab-icon-close:hover {
|
|
135
135
|
color: var(--semi-color-text-1);
|
|
136
136
|
}
|
|
137
137
|
.semi-tabs-tab-single.semi-tabs-tab-disabled {
|
package/lib/es/tabs/tabs.scss
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
$module: #{$prefix}-tabs;
|
|
7
|
+
// Prevent the Radio and Checkbox in ReactNode passed in through the tab attribute in Tabs from being affected by the icon style override
|
|
8
|
+
$ignoreIcon: '.#{$prefix}-icon-checkbox_tick, .#{$prefix}-icon-radio, .#{$prefix}-icon-checkbox_indeterminate';
|
|
7
9
|
|
|
8
10
|
.#{$module} {
|
|
9
11
|
box-sizing: border-box;
|
|
@@ -41,7 +43,7 @@ $module: #{$prefix}-tabs;
|
|
|
41
43
|
|
|
42
44
|
user-select: none;
|
|
43
45
|
|
|
44
|
-
.#{$prefix}-icon {
|
|
46
|
+
.#{$prefix}-icon:not(#{$ignoreIcon}) {
|
|
45
47
|
position: relative;
|
|
46
48
|
margin-right: $spacing-tabs_tab_icon-marginRight;
|
|
47
49
|
top: $spacing-tabs_tab_icon-top;
|
|
@@ -50,7 +52,7 @@ $module: #{$prefix}-tabs;
|
|
|
50
52
|
|
|
51
53
|
}
|
|
52
54
|
|
|
53
|
-
.#{$prefix}-icon-close {
|
|
55
|
+
.#{$prefix}-icon.#{$module}-tab-icon-close {
|
|
54
56
|
margin-right: 0;
|
|
55
57
|
font-size: 14px;
|
|
56
58
|
color: var(--semi-color-text-2);
|
|
@@ -61,7 +63,7 @@ $module: #{$prefix}-tabs;
|
|
|
61
63
|
&:hover {
|
|
62
64
|
color: $color-tabs_tab_line_default-text-hover;
|
|
63
65
|
|
|
64
|
-
.#{$prefix}-icon {
|
|
66
|
+
.#{$prefix}-icon:not(#{$ignoreIcon}) {
|
|
65
67
|
color: $color-tabs_tab-icon-hover;
|
|
66
68
|
}
|
|
67
69
|
}
|
|
@@ -69,7 +71,7 @@ $module: #{$prefix}-tabs;
|
|
|
69
71
|
&:active {
|
|
70
72
|
color: $color-tabs_tab_line_default-text-active;
|
|
71
73
|
|
|
72
|
-
.#{$prefix}-icon {
|
|
74
|
+
.#{$prefix}-icon:not(#{$ignoreIcon}) {
|
|
73
75
|
color: $color-tabs_tab-icon-active;
|
|
74
76
|
}
|
|
75
77
|
}
|
|
@@ -84,16 +86,16 @@ $module: #{$prefix}-tabs;
|
|
|
84
86
|
font-weight: $font-tabs_tab_active-fontWeight;
|
|
85
87
|
color: $color-tabs_tab_line_selected-text-default;
|
|
86
88
|
|
|
87
|
-
.#{$prefix}-icon {
|
|
89
|
+
.#{$prefix}-icon:not(#{$ignoreIcon}) {
|
|
88
90
|
color: $color-tabs_tab_selected-icon-default;
|
|
89
91
|
}
|
|
90
92
|
|
|
91
|
-
.#{$prefix}-icon-close {
|
|
93
|
+
.#{$prefix}-icon.#{$module}-tab-icon-close {
|
|
92
94
|
color: var(--semi-color-text-2);
|
|
93
95
|
}
|
|
94
96
|
}
|
|
95
97
|
|
|
96
|
-
.#{$prefix}-icon-close:hover {
|
|
98
|
+
.#{$prefix}-icon.#{$module}-tab-icon-close:hover {
|
|
97
99
|
color: var(--semi-color-text-1);
|
|
98
100
|
}
|
|
99
101
|
}
|
|
@@ -123,7 +125,7 @@ $module: #{$prefix}-tabs;
|
|
|
123
125
|
|
|
124
126
|
user-select: none;
|
|
125
127
|
|
|
126
|
-
.#{$prefix}-icon {
|
|
128
|
+
.#{$prefix}-icon:not(#{$ignoreIcon}) {
|
|
127
129
|
position: relative;
|
|
128
130
|
margin-right: $spacing-tabs_tab_icon-marginRight;
|
|
129
131
|
top: $spacing-tabs_tab_icon-top;
|
|
@@ -132,7 +134,7 @@ $module: #{$prefix}-tabs;
|
|
|
132
134
|
|
|
133
135
|
}
|
|
134
136
|
|
|
135
|
-
.#{$prefix}-icon-close {
|
|
137
|
+
.#{$prefix}-icon.#{$module}-tab-icon-close {
|
|
136
138
|
margin-right: 0;
|
|
137
139
|
font-size: 14px;
|
|
138
140
|
color: var(--semi-color-text-2);
|
|
@@ -143,7 +145,7 @@ $module: #{$prefix}-tabs;
|
|
|
143
145
|
&:hover {
|
|
144
146
|
color: $color-tabs_tab_line_default-text-hover;
|
|
145
147
|
|
|
146
|
-
.#{$prefix}-icon {
|
|
148
|
+
.#{$prefix}-icon:not(#{$ignoreIcon}) {
|
|
147
149
|
color: $color-tabs_tab-icon-hover;
|
|
148
150
|
}
|
|
149
151
|
}
|
|
@@ -151,7 +153,7 @@ $module: #{$prefix}-tabs;
|
|
|
151
153
|
&:active {
|
|
152
154
|
color: $color-tabs_tab_line_default-text-active;
|
|
153
155
|
|
|
154
|
-
.#{$prefix}-icon {
|
|
156
|
+
.#{$prefix}-icon:not(#{$ignoreIcon}) {
|
|
155
157
|
color: $color-tabs_tab-icon-active;
|
|
156
158
|
}
|
|
157
159
|
}
|
|
@@ -166,16 +168,16 @@ $module: #{$prefix}-tabs;
|
|
|
166
168
|
font-weight: $font-tabs_tab_active-fontWeight;
|
|
167
169
|
color: $color-tabs_tab_line_selected-text-default;
|
|
168
170
|
|
|
169
|
-
.#{$prefix}-icon {
|
|
171
|
+
.#{$prefix}-icon:not(#{$ignoreIcon}) {
|
|
170
172
|
color: $color-tabs_tab_selected-icon-default;
|
|
171
173
|
}
|
|
172
174
|
|
|
173
|
-
.#{$prefix}-icon-close {
|
|
175
|
+
.#{$prefix}-icon.#{$module}-tab-icon-close {
|
|
174
176
|
color: var(--semi-color-text-2);
|
|
175
177
|
}
|
|
176
178
|
}
|
|
177
179
|
|
|
178
|
-
.#{$prefix}-icon-close:hover {
|
|
180
|
+
.#{$prefix}-icon.#{$module}-tab-icon-close:hover {
|
|
179
181
|
color: var(--semi-color-text-1);
|
|
180
182
|
}
|
|
181
183
|
}
|
|
@@ -21,7 +21,7 @@ declare class TimePickerFoundation<P = Record<string, any>, S = Record<string, a
|
|
|
21
21
|
minutes: number;
|
|
22
22
|
seconds: number;
|
|
23
23
|
}): boolean;
|
|
24
|
-
isValidTimeZone(timeZone
|
|
24
|
+
isValidTimeZone(timeZone: string | number): boolean;
|
|
25
25
|
getDefaultFormatIfNeed(): string;
|
|
26
26
|
/**
|
|
27
27
|
* User input value => save timestamp
|
|
@@ -50,9 +50,7 @@ class TimePickerFoundation extends BaseFoundation {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
isValidTimeZone(timeZone) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return ['string', 'number'].includes(typeof _timeZone) && _timeZone !== '';
|
|
53
|
+
return ['string', 'number'].includes(typeof timeZone) && timeZone !== '';
|
|
56
54
|
}
|
|
57
55
|
|
|
58
56
|
getDefaultFormatIfNeed() {
|
|
@@ -90,7 +88,7 @@ class TimePickerFoundation extends BaseFoundation {
|
|
|
90
88
|
const pv = parseToDate(v, formatToken, dateFnsLocale);
|
|
91
89
|
|
|
92
90
|
if (!isNaN(pv.getTime())) {
|
|
93
|
-
parsedValues.push(this.isValidTimeZone() ? utcToZonedTime(pv, timeZone) : pv);
|
|
91
|
+
parsedValues.push(this.isValidTimeZone(timeZone) ? utcToZonedTime(pv, timeZone) : pv);
|
|
94
92
|
}
|
|
95
93
|
});
|
|
96
94
|
const isAM = [true, false];
|
|
@@ -419,7 +417,7 @@ class TimePickerFoundation extends BaseFoundation {
|
|
|
419
417
|
_value = Array.isArray(_value) ? _value[0] : _value;
|
|
420
418
|
}
|
|
421
419
|
|
|
422
|
-
if (this.isValidTimeZone() && _value) {
|
|
420
|
+
if (this.isValidTimeZone(timeZone) && _value) {
|
|
423
421
|
const formatToken = this.getValidFormat();
|
|
424
422
|
|
|
425
423
|
if (Array.isArray(_value)) {
|
|
@@ -2,6 +2,7 @@ declare const cssClasses: {
|
|
|
2
2
|
PREFIX: string;
|
|
3
3
|
};
|
|
4
4
|
declare const strings: {
|
|
5
|
+
readonly WEIGHT: readonly ["light", "regular", "medium", "semibold", "bold", "default"];
|
|
5
6
|
readonly TYPE: readonly ["primary", "secondary", "danger", "warning", "success", "tertiary", "quaternary"];
|
|
6
7
|
readonly SIZE: readonly ["normal", "small"];
|
|
7
8
|
readonly SPACING: readonly ["normal", "extended"];
|
|
@@ -3,6 +3,7 @@ const cssClasses = {
|
|
|
3
3
|
PREFIX: `${BASE_CLASS_PREFIX}-typography`
|
|
4
4
|
};
|
|
5
5
|
const strings = {
|
|
6
|
+
WEIGHT: ['light', 'regular', 'medium', 'semibold', 'bold', "default"],
|
|
6
7
|
TYPE: ['primary', 'secondary', 'danger', 'warning', 'success', 'tertiary', 'quaternary'],
|
|
7
8
|
SIZE: ['normal', 'small'],
|
|
8
9
|
SPACING: ['normal', 'extended'],
|