@douyinfe/semi-foundation 2.34.1-alpha.2 → 2.34.1

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.
Files changed (60) hide show
  1. package/breadcrumb/breadcrumb.scss +4 -4
  2. package/calendar/eventUtil.ts +9 -7
  3. package/calendar/foundation.ts +4 -4
  4. package/cascader/foundation.ts +24 -13
  5. package/lib/cjs/breadcrumb/breadcrumb.css +0 -3
  6. package/lib/cjs/breadcrumb/breadcrumb.scss +4 -4
  7. package/lib/cjs/calendar/eventUtil.d.ts +7 -6
  8. package/lib/cjs/calendar/eventUtil.js +8 -6
  9. package/lib/cjs/calendar/foundation.d.ts +2 -2
  10. package/lib/cjs/calendar/foundation.js +2 -2
  11. package/lib/cjs/cascader/foundation.d.ts +3 -1
  12. package/lib/cjs/cascader/foundation.js +26 -8
  13. package/lib/cjs/radio/radio.css +1 -0
  14. package/lib/cjs/radio/radio.scss +1 -0
  15. package/lib/cjs/steps/bacisSteps.scss +2 -2
  16. package/lib/cjs/steps/fillSteps.scss +3 -3
  17. package/lib/cjs/steps/steps.css +12 -12
  18. package/lib/cjs/table/foundation.d.ts +5 -0
  19. package/lib/cjs/table/table.css +23 -5
  20. package/lib/cjs/table/table.scss +25 -5
  21. package/lib/cjs/table/utils.d.ts +2 -0
  22. package/lib/cjs/table/utils.js +6 -0
  23. package/lib/cjs/timePicker/foundation.js +15 -1
  24. package/lib/cjs/typography/typography.css +8 -0
  25. package/lib/cjs/typography/typography.scss +13 -0
  26. package/lib/cjs/utils/date-fns-extra.d.ts +4 -0
  27. package/lib/cjs/utils/date-fns-extra.js +66 -3
  28. package/lib/es/breadcrumb/breadcrumb.css +0 -3
  29. package/lib/es/breadcrumb/breadcrumb.scss +4 -4
  30. package/lib/es/calendar/eventUtil.d.ts +7 -6
  31. package/lib/es/calendar/eventUtil.js +8 -6
  32. package/lib/es/calendar/foundation.d.ts +2 -2
  33. package/lib/es/calendar/foundation.js +2 -2
  34. package/lib/es/cascader/foundation.d.ts +3 -1
  35. package/lib/es/cascader/foundation.js +26 -8
  36. package/lib/es/radio/radio.css +1 -0
  37. package/lib/es/radio/radio.scss +1 -0
  38. package/lib/es/steps/bacisSteps.scss +2 -2
  39. package/lib/es/steps/fillSteps.scss +3 -3
  40. package/lib/es/steps/steps.css +12 -12
  41. package/lib/es/table/foundation.d.ts +5 -0
  42. package/lib/es/table/table.css +23 -5
  43. package/lib/es/table/table.scss +25 -5
  44. package/lib/es/table/utils.d.ts +2 -0
  45. package/lib/es/table/utils.js +5 -0
  46. package/lib/es/timePicker/foundation.js +14 -1
  47. package/lib/es/typography/typography.css +8 -0
  48. package/lib/es/typography/typography.scss +13 -0
  49. package/lib/es/utils/date-fns-extra.d.ts +4 -0
  50. package/lib/es/utils/date-fns-extra.js +61 -0
  51. package/package.json +2 -2
  52. package/radio/radio.scss +1 -0
  53. package/steps/bacisSteps.scss +2 -2
  54. package/steps/fillSteps.scss +3 -3
  55. package/table/foundation.ts +6 -2
  56. package/table/table.scss +25 -5
  57. package/table/utils.ts +6 -0
  58. package/timePicker/foundation.ts +12 -3
  59. package/typography/typography.scss +13 -0
  60. package/utils/date-fns-extra.ts +56 -0
@@ -83,6 +83,11 @@ $module: #{$prefix}-table;
83
83
  }
84
84
  }
85
85
 
86
+ &-operate-wrapper {
87
+ display: flex;
88
+ justify-content: flex-start;
89
+ }
90
+
86
91
  &-body {
87
92
  overflow: auto;
88
93
  width: 100%;
@@ -115,8 +120,9 @@ $module: #{$prefix}-table;
115
120
  padding-top: $spacing-table_row_head-paddingY;
116
121
  padding-bottom: $spacing-table_row_head-paddingY;
117
122
  vertical-align: middle;
118
- word-break: break-all;
119
- word-wrap: break-word;
123
+ overflow-wrap: break-word;
124
+ // word-break: break-all;
125
+ // word-wrap: break-word;
120
126
  position: relative;
121
127
 
122
128
  &.#{$module}-cell-fixed {
@@ -177,6 +183,14 @@ $module: #{$prefix}-table;
177
183
  display: inline-flex;
178
184
  align-items: center;
179
185
  }
186
+
187
+ &-ellipsis {
188
+ @include text-overflow-hidden;
189
+
190
+ .#{$module}-row-head-title {
191
+ @include text-overflow-hidden;
192
+ }
193
+ }
180
194
  }
181
195
 
182
196
  .react-resizable {
@@ -241,8 +255,9 @@ $module: #{$prefix}-table;
241
255
 
242
256
  & > .#{$module}-row-cell {
243
257
  display: table-cell;
244
- word-wrap: break-word;
245
- word-break: break-all;
258
+ overflow-wrap: break-word;
259
+ // word-wrap: break-word;
260
+ // word-break: break-all;
246
261
  border-left: none;
247
262
  border-right: none;
248
263
  border-bottom: $width-table_base_border $border-table_base-borderStyle $color-table-border-default;
@@ -254,6 +269,10 @@ $module: #{$prefix}-table;
254
269
  &.resizing {
255
270
  border-right: $width-table_resizer_border solid $color-table_resizer-bg-default;
256
271
  }
272
+
273
+ &-ellipsis {
274
+ @include text-overflow-hidden;
275
+ }
257
276
  }
258
277
  &.#{$module}-row {
259
278
  &-expand {
@@ -401,9 +420,10 @@ $module: #{$prefix}-table;
401
420
  text-align: center;
402
421
 
403
422
  &-wrapper {
404
- display: inline-flex;
423
+ display: flex;
405
424
  align-items: center;
406
425
  cursor: pointer;
426
+ overflow: hidden;
407
427
  }
408
428
 
409
429
  &-up,
@@ -1,4 +1,5 @@
1
1
  import { strings } from './constants';
2
+ import type { BaseEllipsis } from './foundation';
2
3
  export declare function equalWith(value: any, other: any, customizer?: (...args: any[]) => boolean): boolean;
3
4
  export declare function getColumnKey(column: any, keyPropNames: any[]): any;
4
5
  /**
@@ -151,3 +152,4 @@ export declare function isTreeTable({ dataSource, childrenRecordName }: {
151
152
  childrenRecordName?: string;
152
153
  }): boolean;
153
154
  export declare function getRTLAlign(align: typeof strings.ALIGNS[number], direction?: 'ltr' | 'rtl'): typeof strings.ALIGNS[number];
155
+ export declare function shouldShowEllipsisTitle(ellipsis: BaseEllipsis): any;
@@ -38,6 +38,7 @@ exports.isSelected = isSelected;
38
38
  exports.isSelectionColumn = isSelectionColumn;
39
39
  exports.isTreeTable = isTreeTable;
40
40
  exports.mergeQueries = mergeQueries;
41
+ exports.shouldShowEllipsisTitle = shouldShowEllipsisTitle;
41
42
  exports.sliceColumnsByLevel = sliceColumnsByLevel;
42
43
  exports.warnIfNoDataIndex = warnIfNoDataIndex;
43
44
  exports.withResizeWidth = withResizeWidth;
@@ -592,4 +593,9 @@ function getRTLAlign(align, direction) {
592
593
  }
593
594
 
594
595
  return align;
596
+ }
597
+
598
+ function shouldShowEllipsisTitle(ellipsis) {
599
+ const shouldShowTitle = ellipsis === true || (0, _get2.default)(ellipsis, 'showTitle', true);
600
+ return shouldShowTitle;
595
601
  }
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
+ var _isUndefined2 = _interopRequireDefault(require("lodash/isUndefined"));
9
+
8
10
  var _split2 = _interopRequireDefault(require("lodash/split"));
9
11
 
10
12
  var _constants = require("./constants");
@@ -374,7 +376,19 @@ class TimePickerFoundation extends _foundation.default {
374
376
  }
375
377
 
376
378
  if (_dates && Array.isArray(_dates)) {
377
- return _dates.map(date => (0, _utils.formatToString)(date, validFormat, dateFnsLocale)).join(rangeSeparator);
379
+ const result = _dates.map(date => {
380
+ let str;
381
+
382
+ if ((0, _isUndefined2.default)(date)) {
383
+ str = '';
384
+ } else {
385
+ str = (0, _utils.formatToString)(date, validFormat, dateFnsLocale);
386
+ }
387
+
388
+ return str;
389
+ });
390
+
391
+ return result.join(rangeSeparator);
378
392
  }
379
393
 
380
394
  return undefined;
@@ -98,11 +98,19 @@
98
98
  -webkit-box-orient: vertical;
99
99
  overflow: hidden;
100
100
  }
101
+ .semi-typography-ellipsis-multiple-line.semi-typography-ellipsis-multiple-line-text {
102
+ display: -webkit-inline-box;
103
+ }
101
104
  .semi-typography-ellipsis-overflow-ellipsis {
102
105
  display: block;
103
106
  white-space: nowrap;
104
107
  text-overflow: ellipsis;
105
108
  }
109
+ .semi-typography-ellipsis-overflow-ellipsis.semi-typography-ellipsis-overflow-ellipsis-text {
110
+ display: inline-block;
111
+ max-width: 100%;
112
+ vertical-align: top;
113
+ }
106
114
  .semi-typography-ellipsis-expand {
107
115
  display: inline;
108
116
  margin-left: 8px;
@@ -123,12 +123,25 @@ $module: #{$prefix}-typography;
123
123
  display: -webkit-box;
124
124
  -webkit-box-orient: vertical;
125
125
  overflow: hidden;
126
+
127
+ &.#{$module}-ellipsis-multiple-line-text {
128
+ // inline-block only works in the Text component, keeping the original external inline performance
129
+ display: -webkit-inline-box;
130
+ }
126
131
  }
127
132
 
128
133
  &-ellipsis-overflow-ellipsis {
129
134
  display: block;
130
135
  white-space: nowrap;
131
136
  text-overflow: ellipsis;
137
+
138
+ &.#{$module}-ellipsis-overflow-ellipsis-text {
139
+ // inline-block only works in the Text component, keeping the original external inline performance
140
+ display: inline-block;
141
+ // Ensure that Text component can be limited by the parent's width when no specific width is set
142
+ max-width: 100%;
143
+ vertical-align: top;
144
+ }
132
145
  }
133
146
 
134
147
  &-ellipsis-expand {
@@ -9,6 +9,10 @@ export declare const IANAOffsetMap: (number | string[])[][];
9
9
  * @returns {number|undefined}
10
10
  */
11
11
  export declare const toIANA: (tz: string | number) => any;
12
+ /**
13
+ * @see https://github.com/marnusw/date-fns-tz/blob/a92e0ad017d101a0c50e39a63ef5d322b4d849f6/src/_lib/tzParseTimezone/index.js#L137
14
+ */
15
+ export declare function isValidTimezoneIANAString(timeZoneString: string): boolean;
12
16
  /**
13
17
  *
14
18
  * @param {string | number | Date} date
@@ -3,7 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.zonedTimeToUtc = exports.utcToZonedTime = exports.toIANA = exports.parse = exports.getCurrentTimeZone = exports.format = exports.IANAOffsetMap = void 0;
6
+ exports.getCurrentTimeZone = exports.format = exports.IANAOffsetMap = void 0;
7
+ exports.isValidTimezoneIANAString = isValidTimezoneIANAString;
8
+ exports.zonedTimeToUtc = exports.utcToZonedTime = exports.toIANA = exports.parse = void 0;
7
9
 
8
10
  var _dateFnsTz = require("date-fns-tz");
9
11
 
@@ -17,7 +19,41 @@ var _dateFns = require("date-fns");
17
19
  * Need to be IANA logo without daylight saving time
18
20
  */
19
21
  const IANAOffsetMap = [[-11, ['Pacific/Midway']], [-10, ['Pacific/Honolulu']], [-9.5, ['Pacific/Marquesas']], [-9, ['Pacific/Gambier']], [-8, ['Pacific/Pitcairn']], [-7, ['America/Phoenix']], [-6, ['America/Tegucigalpa']], [-5, ['America/Bogota']], [-4, ['America/Puerto_Rico']], [-3.5, ['America/St_Johns']], [-3, ['America/Montevideo']], [-2, ['Atlantic/South_Georgia']], [-1, ['Atlantic/Cape_Verde']], [0, ['Africa/Accra']], [1, ['Africa/Bangui']], [2, ['Africa/Cairo']], [3, ['Asia/Bahrain', 'Indian/Antananarivo']], [3.5, ['Asia/Tehran']], [4, ['Asia/Dubai', 'Asia/Muscat']], [4.5, ['Asia/Kabul']], [5, ['Asia/Samarkand', 'Asia/Karachi']], [5.5, ['Asia/Kolkata']], [5.75, ['Asia/Kathmandu']], [6, ['Asia/Dhaka']], [6.5, ['Asia/Rangoon', 'Asia/Rangoon']], [7, ['Asia/Jakarta', 'Asia/Phnom_Penh', 'Asia/Bangkok']], [8, ['Asia/Shanghai', 'Asia/Singapore']], [8.75, ['Australia/Eucla']], [9, ['Asia/Tokyo', 'Asia/Seoul', 'Asia/Pyongyang']], [9.5, ['Australia/Darwin']], [10, ['Pacific/Guam']], [10.5, ['Australia/Adelaide']], [11, ['Pacific/Guadalcanal']], [12, ['Pacific/Funafuti']], [13, ['Pacific/Enderbury']], [13.75, ['Pacific/Chatham']], [14, ['Pacific/Kiritimati']]];
22
+ /**
23
+ * Etc/GMT* no DST
24
+ * @see https://data.iana.org/time-zones/tzdb/etcetera
25
+ */
26
+
20
27
  exports.IANAOffsetMap = IANAOffsetMap;
28
+ const IANAEtcGMTOffsetMap = {
29
+ '0': 'Etc/GMT',
30
+ '1': 'Etc/GMT-1',
31
+ '2': 'Etc/GMT-2',
32
+ '3': 'Etc/GMT-3',
33
+ '4': 'Etc/GMT-4',
34
+ '5': 'Etc/GMT-5',
35
+ '6': 'Etc/GMT-6',
36
+ '7': 'Etc/GMT-7',
37
+ '8': 'Etc/GMT-8',
38
+ '9': 'Etc/GMT-9',
39
+ '10': 'Etc/GMT-10',
40
+ '11': 'Etc/GMT-11',
41
+ '12': 'Etc/GMT-12',
42
+ '13': 'Etc/GMT-13',
43
+ '14': 'Etc/GMT-14',
44
+ '-1': 'Etc/GMT+1',
45
+ '-2': 'Etc/GMT+2',
46
+ '-3': 'Etc/GMT+3',
47
+ '-4': 'Etc/GMT+4',
48
+ '-5': 'Etc/GMT+5',
49
+ '-6': 'Etc/GMT+6',
50
+ '-7': 'Etc/GMT+7',
51
+ '-8': 'Etc/GMT+8',
52
+ '-9': 'Etc/GMT+9',
53
+ '-10': 'Etc/GMT+10',
54
+ '-11': 'Etc/GMT+11',
55
+ '-12': 'Etc/GMT+12'
56
+ };
21
57
  const GMTStringReg = /([\-\+]{1})(\d{2})\:(\d{2})/;
22
58
  /**
23
59
  *
@@ -43,10 +79,39 @@ const toIANA = tz => {
43
79
  }
44
80
 
45
81
  if (typeof tz === 'number') {
82
+ // if tz can be transformed to a Etc/GMT* and browser supports it
83
+ if (tz in IANAEtcGMTOffsetMap) {
84
+ const etcGMTtimeZone = IANAEtcGMTOffsetMap[tz];
85
+
86
+ if (isValidTimezoneIANAString(etcGMTtimeZone)) {
87
+ return etcGMTtimeZone;
88
+ }
89
+ }
90
+
46
91
  const found = IANAOffsetMap.find(item => item[0] === tz);
47
92
  return found && found[1][0];
48
93
  }
49
94
  };
95
+
96
+ exports.toIANA = toIANA;
97
+ const validIANATimezoneCache = {};
98
+ /**
99
+ * @see https://github.com/marnusw/date-fns-tz/blob/a92e0ad017d101a0c50e39a63ef5d322b4d849f6/src/_lib/tzParseTimezone/index.js#L137
100
+ */
101
+
102
+ function isValidTimezoneIANAString(timeZoneString) {
103
+ if (validIANATimezoneCache[timeZoneString]) return true;
104
+
105
+ try {
106
+ new Intl.DateTimeFormat(undefined, {
107
+ timeZone: timeZoneString
108
+ });
109
+ validIANATimezoneCache[timeZoneString] = true;
110
+ return true;
111
+ } catch (error) {
112
+ return false;
113
+ }
114
+ }
50
115
  /**
51
116
  *
52
117
  * @param {string | number | Date} date
@@ -59,8 +124,6 @@ const toIANA = tz => {
59
124
  /* istanbul ignore next */
60
125
 
61
126
 
62
- exports.toIANA = toIANA;
63
-
64
127
  const parse = (date, formatToken, options) => {
65
128
  if (typeof date === 'string') {
66
129
  date = (0, _dateFns.parse)(date, formatToken, new Date(), options);
@@ -54,9 +54,6 @@
54
54
  .semi-breadcrumb-item-more svg {
55
55
  vertical-align: middle;
56
56
  }
57
- .semi-breadcrumb-item-icon + .semi-breadcrumb-item-title {
58
- margin-left: 4px;
59
- }
60
57
  .semi-breadcrumb-item-link {
61
58
  display: inline-flex;
62
59
  align-items: center;
@@ -82,14 +82,14 @@ $module: #{$prefix}-breadcrumb;
82
82
  }
83
83
  }
84
84
 
85
- &-item-icon+&-item-title {
86
- margin-left: $spacing-breadcrumb_item_text-marginLeft;
87
- }
85
+ // &-item-icon+&-item-title {
86
+ // margin-left: $spacing-breadcrumb_item_text-marginLeft;
87
+ // }
88
88
 
89
89
  &-item-link {
90
90
  display: inline-flex;
91
91
  align-items: center;
92
- column-gap: 4px;
92
+ column-gap: $spacing-breadcrumb_item_text-marginLeft;
93
93
  text-decoration: inherit;
94
94
  transition: color $transition_duration-breadcrumb_link-text $transition-function_breadcrumb_link-text $transition_delay-breadcrumb_link-text;
95
95
  transform: scale($transform_scale-breadcrumb_link-text);
@@ -30,17 +30,18 @@ export interface DateObj {
30
30
  isSameMonth: boolean;
31
31
  month: string;
32
32
  }
33
- export declare type weeekStartsOnEnum = 0 | 1 | 2 | 3 | 4 | 5 | 6;
34
- export declare const calcRangeData: (value: Date, start: Date, rangeLen: number, mode: string, locale: Locale, weekStartsOn: weeekStartsOnEnum) => DateObj[];
33
+ export declare type weekStartsOnEnum = 0 | 1 | 2 | 3 | 4 | 5 | 6;
34
+ export declare const calcRangeData: (value: Date, start: Date, rangeLen: number, mode: string, locale: Locale, weekStartsOn: weekStartsOnEnum) => DateObj[];
35
35
  /**
36
36
  *
37
- * @param {value} date
37
+ * @param {Date} date
38
+ * @param {Date} monthStart current month start date, using for month mode
38
39
  * @param {string} mode
39
40
  * @param {string} locale
40
41
  * @returns {object[]} { date: Date, dayString: string, ind: number, isToday: boolean, isWeekend: boolean, weekday: string }
41
42
  * create weekly object array
42
43
  */
43
- export declare const calcWeekData: (value: Date, mode: string, locale: Locale, weekStartsOn: weeekStartsOnEnum) => DateObj[];
44
+ export declare const calcWeekData: (value: Date, monthStart: Date | null, mode: string, locale: Locale, weekStartsOn: weekStartsOnEnum) => DateObj[];
44
45
  /**
45
46
  *
46
47
  * @param {object} event
@@ -74,7 +75,7 @@ export declare const filterEvents: (events: Map<string, EventObject[]>, start: D
74
75
  * @returns {arr}
75
76
  * filter out event that is not in the week range
76
77
  */
77
- export declare const filterWeeklyEvents: (events: Map<string, EventObject[]>, weekStart: Date, weekStartsOn: weeekStartsOnEnum) => Map<string, EventObject[]>;
78
+ export declare const filterWeeklyEvents: (events: Map<string, EventObject[]>, weekStart: Date, weekStartsOn: weekStartsOnEnum) => Map<string, EventObject[]>;
78
79
  /**
79
80
  * @returns {arr}
80
81
  * arrange and sort all day event for a range
@@ -84,7 +85,7 @@ export declare const parseRangeAllDayEvent: (event: EventObject[], startDate: Da
84
85
  * @returns {arr}
85
86
  * arrange and sort weekly all day event
86
87
  */
87
- export declare const parseWeeklyAllDayEvent: (event: EventObject[], startDate: Date, weekStart: Date, parsed: Array<Array<ParsedRangeEvent>>, weekStartsOn: weeekStartsOnEnum) => ParsedRangeEvent[][];
88
+ export declare const parseWeeklyAllDayEvent: (event: EventObject[], startDate: Date, weekStart: Date, parsed: Array<Array<ParsedRangeEvent>>, weekStartsOn: weekStartsOnEnum) => ParsedRangeEvent[][];
88
89
  export declare const collectDailyEvents: (events: ParsedRangeEvent[][]) => ParsedRangeEvent[][];
89
90
  export declare const renderDailyEvent: (event: EventObject) => {
90
91
  startPos: number;
@@ -96,21 +96,23 @@ export const calcRangeData = (value, start, rangeLen, mode, locale, weekStartsOn
96
96
  };
97
97
  /**
98
98
  *
99
- * @param {value} date
99
+ * @param {Date} date
100
+ * @param {Date} monthStart current month start date, using for month mode
100
101
  * @param {string} mode
101
102
  * @param {string} locale
102
103
  * @returns {object[]} { date: Date, dayString: string, ind: number, isToday: boolean, isWeekend: boolean, weekday: string }
103
104
  * create weekly object array
104
105
  */
105
106
 
106
- export const calcWeekData = function (value) {
107
- let mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'week';
108
- let locale = arguments.length > 2 ? arguments[2] : undefined;
109
- let weekStartsOn = arguments.length > 3 ? arguments[3] : undefined;
107
+ export const calcWeekData = function (value, monthStart) {
108
+ let mode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'week';
109
+ let locale = arguments.length > 3 ? arguments[3] : undefined;
110
+ let weekStartsOn = arguments.length > 4 ? arguments[4] : undefined;
110
111
  const start = startOfWeek(value, {
111
112
  weekStartsOn
112
113
  });
113
- return calcRangeData(value, start, 7, mode, locale, weekStartsOn);
114
+ const realValue = monthStart || value;
115
+ return calcRangeData(realValue, start, 7, mode, locale, weekStartsOn);
114
116
  };
115
117
  /**
116
118
  *
@@ -1,8 +1,8 @@
1
1
  import BaseFoundation, { DefaultAdapter } from '../base/foundation';
2
2
  import { Locale } from 'date-fns';
3
3
  import { DateObj } from './eventUtil';
4
- import type { weeekStartsOnEnum } from './eventUtil';
5
- export { weeekStartsOnEnum };
4
+ import type { weekStartsOnEnum } from './eventUtil';
5
+ export { weekStartsOnEnum };
6
6
  export interface EventObject {
7
7
  [x: string]: any;
8
8
  key: string;
@@ -107,7 +107,7 @@ export default class CalendarFoundation extends BaseFoundation {
107
107
  locale: dateFnsLocale,
108
108
  weekStartsOn
109
109
  });
110
- data.week = calcWeekData(value, 'week', dateFnsLocale, weekStartsOn);
110
+ data.week = calcWeekData(value, null, 'week', dateFnsLocale, weekStartsOn);
111
111
 
112
112
  this._adapter.setWeeklyData(data);
113
113
 
@@ -142,7 +142,7 @@ export default class CalendarFoundation extends BaseFoundation {
142
142
  weekStartsOn
143
143
  });
144
144
  [...Array(numberOfWeek).keys()].map(ind => {
145
- data[ind] = calcWeekData(addDays(monthStart, ind * 7), 'month', dateFnsLocale, weekStartsOn);
145
+ data[ind] = calcWeekData(addDays(monthStart, ind * 7), monthStart, 'month', dateFnsLocale, weekStartsOn);
146
146
  });
147
147
 
148
148
  this._adapter.setMonthlyData(data);
@@ -149,6 +149,7 @@ export interface CascaderAdapter extends DefaultAdapter<BasicCascaderProps, Basi
149
149
  updateInputValue: (value: string) => void;
150
150
  updateInputPlaceHolder: (value: string) => void;
151
151
  focusInput: () => void;
152
+ blurInput: () => void;
152
153
  registerClickOutsideHandler: (cb: (e: any) => void) => void;
153
154
  unregisterClickOutsideHandler: () => void;
154
155
  rePositionDropdown: () => void;
@@ -196,8 +197,9 @@ export default class CascaderFoundation extends BaseFoundation<CascaderAdapter,
196
197
  open(): void;
197
198
  reCalcActiveKeys(): void;
198
199
  close(e: any, key?: string): void;
200
+ focus(): void;
201
+ blur(): void;
199
202
  toggle2SearchInput(isShow: boolean): void;
200
- focusInput(): void;
201
203
  updateSearching: (isSearching: boolean) => void;
202
204
  handleItemClick(e: any, item: BasicEntity | BasicData): void;
203
205
  handleItemHover(e: any, item: BasicEntity): void;
@@ -55,7 +55,7 @@ export default class CascaderFoundation extends BaseFoundation {
55
55
 
56
56
  if (multiple) {
57
57
  const valuePath = []; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
58
- // @ts-ignore
58
+ // @ts-ignore
59
59
 
60
60
  item.forEach(checkedKey => {
61
61
  const valuePathItem = this.getItemPropPath(checkedKey, valueProp);
@@ -425,20 +425,38 @@ export default class CascaderFoundation extends BaseFoundation {
425
425
  this._notifyBlur(e);
426
426
  }
427
427
 
428
+ focus() {
429
+ const {
430
+ filterTreeNode
431
+ } = this.getProps();
432
+
433
+ if (filterTreeNode) {
434
+ this._adapter.focusInput();
435
+ }
436
+
437
+ this._adapter.updateFocusState(true);
438
+ }
439
+
440
+ blur() {
441
+ const {
442
+ filterTreeNode
443
+ } = this.getProps();
444
+
445
+ if (filterTreeNode) {
446
+ this._adapter.blurInput();
447
+ }
448
+
449
+ this._adapter.updateFocusState(false);
450
+ }
451
+
428
452
  toggle2SearchInput(isShow) {
429
453
  if (isShow) {
430
- this._adapter.toggleInputShow(isShow, () => this.focusInput());
454
+ this._adapter.toggleInputShow(isShow, () => this.focus());
431
455
  } else {
432
456
  this._adapter.toggleInputShow(isShow, () => undefined);
433
457
  }
434
458
  }
435
459
 
436
- focusInput() {
437
- this._adapter.focusInput();
438
-
439
- this._adapter.updateFocusState(true);
440
- }
441
-
442
460
  handleItemClick(e, item) {
443
461
  const isDisabled = this._isDisabled();
444
462
 
@@ -301,6 +301,7 @@
301
301
  .semi-radioGroup-horizontal {
302
302
  display: inline-flex;
303
303
  flex-wrap: wrap;
304
+ vertical-align: bottom;
304
305
  gap: 16px;
305
306
  }
306
307
  .semi-radioGroup-buttonRadio {
@@ -416,6 +416,7 @@ $inner-width: $width-icon-medium;
416
416
  &-horizontal {
417
417
  display: inline-flex;
418
418
  flex-wrap: wrap;
419
+ vertical-align: bottom; // Fix 1573
419
420
  gap: $spacing-radio_group_horizontal-marginRight;
420
421
  }
421
422
 
@@ -173,7 +173,7 @@ $basicType: #{$module}-basic;
173
173
 
174
174
  transform:scale($transform_scale-step-item);
175
175
 
176
- &:hover {
176
+ &-hover:hover {
177
177
 
178
178
  .#{$item}-title {
179
179
  color: $color-steps_item_title-text-hover;
@@ -267,7 +267,7 @@ $basicType: #{$module}-basic;
267
267
  }
268
268
  }
269
269
 
270
- &:hover {
270
+ &-hover:hover {
271
271
  .#{$item}-left {
272
272
 
273
273
  .#{$item}-icon {
@@ -92,7 +92,7 @@ $module: #{$prefix}-steps;
92
92
  color: $color-steps_success-text-default;
93
93
  }
94
94
 
95
- &:hover {
95
+ &-hover:hover {
96
96
  background-color: $color-steps-bg-hover;
97
97
 
98
98
  .#{$prefix}-icon,
@@ -118,7 +118,7 @@ $module: #{$prefix}-steps;
118
118
  color: $color-steps_danger-text-default;
119
119
  }
120
120
 
121
- &:hover {
121
+ &-hover:hover {
122
122
  background: $color-steps-bg-hover;
123
123
 
124
124
  .#{$prefix}-icon,
@@ -144,7 +144,7 @@ $module: #{$prefix}-steps;
144
144
  color: $color-steps_warning-text-default;
145
145
  }
146
146
 
147
- &:hover {
147
+ &-hover:hover {
148
148
  background: $color-steps-bg-hover;
149
149
 
150
150
  .#{$module}-item-title,
@@ -64,11 +64,11 @@
64
64
  .semi-steps .semi-steps-item-finish .semi-steps-item-title {
65
65
  color: var(--semi-color-success);
66
66
  }
67
- .semi-steps .semi-steps-item-finish:hover {
67
+ .semi-steps .semi-steps-item-finish-hover:hover {
68
68
  background-color: var(--semi-color-fill-0);
69
69
  }
70
- .semi-steps .semi-steps-item-finish:hover .semi-icon,
71
- .semi-steps .semi-steps-item-finish:hover .semi-steps-item-title {
70
+ .semi-steps .semi-steps-item-finish-hover:hover .semi-icon,
71
+ .semi-steps .semi-steps-item-finish-hover:hover .semi-steps-item-title {
72
72
  color: var(--semi-color-success-hover);
73
73
  }
74
74
  .semi-steps .semi-steps-item-finish:active {
@@ -82,11 +82,11 @@
82
82
  .semi-steps .semi-steps-item-error .semi-steps-item-title {
83
83
  color: var(--semi-color-danger);
84
84
  }
85
- .semi-steps .semi-steps-item-error:hover {
85
+ .semi-steps .semi-steps-item-error-hover:hover {
86
86
  background: var(--semi-color-fill-0);
87
87
  }
88
- .semi-steps .semi-steps-item-error:hover .semi-icon,
89
- .semi-steps .semi-steps-item-error:hover .semi-steps-item-title {
88
+ .semi-steps .semi-steps-item-error-hover:hover .semi-icon,
89
+ .semi-steps .semi-steps-item-error-hover:hover .semi-steps-item-title {
90
90
  color: var(--semi-color-danger-hover);
91
91
  }
92
92
  .semi-steps .semi-steps-item-error:active {
@@ -100,11 +100,11 @@
100
100
  .semi-steps .semi-steps-item-warning .semi-icon {
101
101
  color: var(--semi-color-warning);
102
102
  }
103
- .semi-steps .semi-steps-item-warning:hover {
103
+ .semi-steps .semi-steps-item-warning-hover:hover {
104
104
  background: var(--semi-color-fill-0);
105
105
  }
106
- .semi-steps .semi-steps-item-warning:hover .semi-steps-item-title,
107
- .semi-steps .semi-steps-item-warning:hover .semi-icon {
106
+ .semi-steps .semi-steps-item-warning-hover:hover .semi-steps-item-title,
107
+ .semi-steps .semi-steps-item-warning-hover:hover .semi-icon {
108
108
  color: var(--semi-color-warning-hover);
109
109
  }
110
110
  .semi-steps .semi-steps-item-warning:active {
@@ -264,10 +264,10 @@
264
264
  transition: color var(--semi-transition_duration-none) var(--semi-transition_function-easeIn) var(--semi-transition_delay-none), background-color var(--semi-transition_duration-none) var(--semi-transition_function-easeIn) var(--semi-transition_delay-none);
265
265
  transform: scale(var(--semi-transform_scale-small));
266
266
  }
267
- .semi-steps-basic .semi-steps-item:hover .semi-steps-item-title {
267
+ .semi-steps-basic .semi-steps-item-hover:hover .semi-steps-item-title {
268
268
  color: var(--semi-color-focus-border);
269
269
  }
270
- .semi-steps-basic .semi-steps-item:hover .semi-steps-item-description {
270
+ .semi-steps-basic .semi-steps-item-hover:hover .semi-steps-item-description {
271
271
  color: var(--semi-color-focus-border);
272
272
  }
273
273
  .semi-steps-basic .semi-steps-item .semi-steps-item-container {
@@ -330,7 +330,7 @@
330
330
  background: var(--semi-color-fill-0);
331
331
  color: var(--semi-color-text-2);
332
332
  }
333
- .semi-steps-basic .semi-steps-item-wait:hover .semi-steps-item-left .semi-steps-item-icon .semi-steps-item-number-icon {
333
+ .semi-steps-basic .semi-steps-item-wait-hover:hover .semi-steps-item-left .semi-steps-item-icon .semi-steps-item-number-icon {
334
334
  background: var(--semi-color-secondary-light-default);
335
335
  color: var(--semi-color-focus-border);
336
336
  }
@@ -32,6 +32,7 @@ export interface BaseColumnProps<RecordType> {
32
32
  title?: any;
33
33
  useFullRender?: boolean;
34
34
  width?: string | number;
35
+ ellipsis?: BaseEllipsis;
35
36
  }
36
37
  export interface TableAdapter<RecordType> extends DefaultAdapter {
37
38
  resetScrollY: () => void;
@@ -81,6 +82,7 @@ export interface TableAdapter<RecordType> extends DefaultAdapter {
81
82
  getHandleColumns: () => (queries: BaseColumnProps<RecordType>[], cachedColumns: BaseColumnProps<RecordType>[]) => BaseColumnProps<RecordType>[];
82
83
  getMergePagination: () => (pagination: BasePagination) => BasePagination;
83
84
  setBodyHasScrollbar: (bodyHasScrollBar: boolean) => void;
85
+ getTableLayout: () => 'fixed' | 'auto';
84
86
  }
85
87
  declare class TableFoundation<RecordType> extends BaseFoundation<TableAdapter<RecordType>> {
86
88
  memoizedWithFnsColumns: (queries: BaseColumnProps<RecordType>[], cachedColumns: BaseColumnProps<RecordType>[], rowSelectionUpdate: boolean, hideExpandedColumn: boolean, bodyHasScrollBar: boolean) => BaseColumnProps<RecordType>[];
@@ -366,4 +368,7 @@ export interface BaseChangeInfoSorter<RecordType> {
366
368
  export declare type BaseIncludeGroupRecord<RecordType> = RecordType | {
367
369
  groupKey: string;
368
370
  };
371
+ export declare type BaseEllipsis = boolean | {
372
+ showTitle: boolean;
373
+ };
369
374
  export default TableFoundation;