@douyinfe/semi-foundation 2.5.1 → 2.7.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.
Files changed (82) hide show
  1. package/button/button.scss +11 -0
  2. package/button/variables.scss +4 -0
  3. package/cascader/foundation.ts +19 -0
  4. package/datePicker/_utils/formatter.ts +2 -2
  5. package/datePicker/_utils/getInsetInputFormatToken.ts +42 -0
  6. package/datePicker/_utils/getInsetInputValueFromInsetInputStr.ts +60 -0
  7. package/datePicker/constants.ts +2 -0
  8. package/datePicker/datePicker.scss +136 -3
  9. package/datePicker/foundation.ts +96 -19
  10. package/datePicker/inputFoundation.ts +133 -5
  11. package/datePicker/monthFoundation.ts +1 -0
  12. package/datePicker/monthsGridFoundation.ts +4 -0
  13. package/datePicker/rtl.scss +8 -0
  14. package/datePicker/variables.scss +30 -0
  15. package/lib/cjs/button/button.css +9 -0
  16. package/lib/cjs/button/button.scss +11 -0
  17. package/lib/cjs/button/variables.scss +4 -0
  18. package/lib/cjs/cascader/foundation.d.ts +19 -0
  19. package/lib/cjs/cascader/foundation.js +22 -0
  20. package/lib/cjs/datePicker/_utils/formatter.d.ts +2 -2
  21. package/lib/cjs/datePicker/_utils/getInsetInputFormatToken.d.ts +20 -0
  22. package/lib/cjs/datePicker/_utils/getInsetInputFormatToken.js +61 -0
  23. package/lib/cjs/datePicker/_utils/getInsetInputValueFromInsetInputStr.d.ts +31 -0
  24. package/lib/cjs/datePicker/_utils/getInsetInputValueFromInsetInputStr.js +76 -0
  25. package/lib/cjs/datePicker/constants.d.ts +2 -0
  26. package/lib/cjs/datePicker/constants.js +4 -3
  27. package/lib/cjs/datePicker/datePicker.css +104 -2
  28. package/lib/cjs/datePicker/datePicker.scss +136 -3
  29. package/lib/cjs/datePicker/foundation.d.ts +34 -11
  30. package/lib/cjs/datePicker/foundation.js +122 -9
  31. package/lib/cjs/datePicker/inputFoundation.d.ts +73 -4
  32. package/lib/cjs/datePicker/inputFoundation.js +196 -3
  33. package/lib/cjs/datePicker/monthFoundation.d.ts +1 -0
  34. package/lib/cjs/datePicker/monthsGridFoundation.d.ts +1 -0
  35. package/lib/cjs/datePicker/monthsGridFoundation.js +4 -2
  36. package/lib/cjs/datePicker/rtl.scss +8 -0
  37. package/lib/cjs/datePicker/variables.scss +30 -0
  38. package/lib/cjs/table/table.css +1 -1
  39. package/lib/cjs/table/table.scss +1 -1
  40. package/lib/cjs/table/variables.scss +1 -0
  41. package/lib/cjs/tag/tag.css +1 -0
  42. package/lib/cjs/tag/tag.scss +1 -0
  43. package/lib/cjs/tooltip/foundation.js +8 -8
  44. package/lib/cjs/treeSelect/foundation.d.ts +3 -2
  45. package/lib/cjs/treeSelect/foundation.js +28 -15
  46. package/lib/es/button/button.css +9 -0
  47. package/lib/es/button/button.scss +11 -0
  48. package/lib/es/button/variables.scss +4 -0
  49. package/lib/es/cascader/foundation.d.ts +19 -0
  50. package/lib/es/cascader/foundation.js +22 -1
  51. package/lib/es/datePicker/_utils/formatter.d.ts +2 -2
  52. package/lib/es/datePicker/_utils/getInsetInputFormatToken.d.ts +20 -0
  53. package/lib/es/datePicker/_utils/getInsetInputFormatToken.js +48 -0
  54. package/lib/es/datePicker/_utils/getInsetInputValueFromInsetInputStr.d.ts +31 -0
  55. package/lib/es/datePicker/_utils/getInsetInputValueFromInsetInputStr.js +66 -0
  56. package/lib/es/datePicker/constants.d.ts +2 -0
  57. package/lib/es/datePicker/constants.js +4 -3
  58. package/lib/es/datePicker/datePicker.css +104 -2
  59. package/lib/es/datePicker/datePicker.scss +136 -3
  60. package/lib/es/datePicker/foundation.d.ts +34 -11
  61. package/lib/es/datePicker/foundation.js +120 -9
  62. package/lib/es/datePicker/inputFoundation.d.ts +73 -4
  63. package/lib/es/datePicker/inputFoundation.js +192 -4
  64. package/lib/es/datePicker/monthFoundation.d.ts +1 -0
  65. package/lib/es/datePicker/monthsGridFoundation.d.ts +1 -0
  66. package/lib/es/datePicker/monthsGridFoundation.js +4 -2
  67. package/lib/es/datePicker/rtl.scss +8 -0
  68. package/lib/es/datePicker/variables.scss +30 -0
  69. package/lib/es/table/table.css +1 -1
  70. package/lib/es/table/table.scss +1 -1
  71. package/lib/es/table/variables.scss +1 -0
  72. package/lib/es/tag/tag.css +1 -0
  73. package/lib/es/tag/tag.scss +1 -0
  74. package/lib/es/tooltip/foundation.js +8 -8
  75. package/lib/es/treeSelect/foundation.d.ts +3 -2
  76. package/lib/es/treeSelect/foundation.js +27 -15
  77. package/package.json +3 -3
  78. package/table/table.scss +1 -1
  79. package/table/variables.scss +1 -0
  80. package/tag/tag.scss +1 -0
  81. package/tooltip/foundation.ts +8 -8
  82. package/treeSelect/foundation.ts +26 -19
@@ -10,6 +10,7 @@ $color-button_primary-text-hover: white; // 主要按钮文字颜色 - 悬浮
10
10
  $color-button_primary-bg-active: var(--semi-color-primary-active); // 主要按钮背景颜色 - 按下
11
11
  $color-button_primary-border-active: var(--semi-color-primary-active); // 主要按钮描边颜色 - 按下
12
12
  $color-button_primary-text-active: white; // 主要按钮文字颜色 - 按下
13
+ $color-button_primary-outline-focus: var(--semi-color-primary-light-active); // 主要按钮轮廓 - 聚焦
13
14
 
14
15
  // secondary
15
16
  $color-button_secondary-bg-default: var(--semi-color-secondary); // 次要按钮背景颜色
@@ -36,6 +37,7 @@ $color-button_danger-text-hover: white; // 危险按钮文字颜色 - 悬浮
36
37
  $color-button_danger-bg-active: var(--semi-color-danger-active); // 危险按钮背景颜色 - 按下
37
38
  $color-button_danger-border-active: var(--semi-color-danger-active); // 危险按钮描边颜色 - 按下
38
39
  $color-button_danger-text-active: white; // 危险按钮文字颜色 - 按下
40
+ $color-button_danger-outline-focus: var(--semi-color-danger-light-active); // 危险按钮轮廓 - 聚焦
39
41
 
40
42
  // warning
41
43
  $color-button_warning-bg-default: var(--semi-color-warning); // 警告按钮背景颜色
@@ -49,6 +51,7 @@ $color-button_warning-text-hover: white; // 警告按钮文字颜色 - 悬浮
49
51
  $color-button_warning-bg-active: var(--semi-color-warning-active); // 警告按钮背景颜色 - 按下
50
52
  $color-button_warning-border-active: var(--semi-color-warning-active); // 警告按钮描边颜色 - 按下
51
53
  $color-button_warning-text-active: white; // 警告按钮文字颜色 - 按下
54
+ $color-button_warning-outline-focus: var(--semi-color-warning-light-active); // 警告按钮轮廓 - 聚焦
52
55
 
53
56
  // tertiary
54
57
  $color-button_tertiary-bg-default: var(--semi-color-tertiary); // 第三按钮背景颜色
@@ -134,3 +137,4 @@ $height-button_default: $height-control-default; // 按钮高度 - 默认
134
137
  $width-button-border: $border-thickness; // 按钮描边宽度
135
138
  $radius-button: var(--semi-border-radius-small); // 按钮圆角大小
136
139
  $radius-button_group: $radius-button; // 按钮组圆角大小
140
+ $width-button-outline: 2px; // 按钮轮廓宽度
@@ -193,6 +193,10 @@ export default class CascaderFoundation extends BaseFoundation<CascaderAdapter,
193
193
  handleShowNextByHover(item: BasicEntity): void;
194
194
  onItemCheckboxClick(item: BasicEntity | BasicData): void;
195
195
  handleClick(e: any): void;
196
+ /**
197
+ * A11y: simulate selection click
198
+ */
199
+ handleSelectionEnterPress(keyboardEvent: any): void;
196
200
  toggleHoverState(bool: boolean): void;
197
201
  _defaultRenderText(path: any[], displayRender?: BasicCascaderProps['displayRender']): any;
198
202
  renderDisplayText(targetKey: string, keyEntities?: BasicEntities): any;
@@ -201,6 +205,17 @@ export default class CascaderFoundation extends BaseFoundation<CascaderAdapter,
201
205
  handleSingleSelect(e: any, item: BasicEntity | BasicData): void;
202
206
  _handleMultipleSelect(item: BasicEntity | BasicData): void;
203
207
  calcNonDisabedCheckedKeys(eventKey: string, targetStatus: boolean): {
208
+ /**
209
+ * The typical scenario is: suppose we select the 0-0 node, at this time
210
+ * selectedKeys=Set('0-0'), the input box will display a 0-0 label. When
211
+ * treeData is updated, assuming 0-0 does not exist in treeData at this
212
+ * time, then selectedKeys=Set('not-exist-0-0'), at this time the input
213
+ * box displays 0-0, which means not-exist -After the content. When treeData
214
+ * is updated again, assuming that 0-0 exists in treeData at this time,
215
+ * then selectedKeys=Set('0-0'), and the input box displays a label of
216
+ * 0-0 at this time. The operation done here is for the 0-0 label to be
217
+ * displayed normally after the second update in the example.
218
+ */
204
219
  checkedKeys: Set<string>;
205
220
  halfCheckedKeys: Set<any>;
206
221
  };
@@ -217,6 +232,10 @@ export default class CascaderFoundation extends BaseFoundation<CascaderAdapter,
217
232
  };
218
233
  handleInputChange(sugInput: string): void;
219
234
  handleClear(): void;
235
+ /**
236
+ * A11y: simulate clear button click
237
+ */
238
+ handleClearEnterPress(keyboardEvent: any): void;
220
239
  getRenderData(): BasicEntity[] | BasicData[];
221
240
  getFilteredData(): BasicData[];
222
241
  handleListScroll(e: any, ind: number): void;
@@ -64,6 +64,8 @@ var _util = require("./util");
64
64
 
65
65
  var _constants = require("./constants");
66
66
 
67
+ var _isEnterPress = _interopRequireDefault(require("../utils/isEnterPress"));
68
+
67
69
  // eslint-disable-next-line max-len
68
70
  class CascaderFoundation extends _foundation.default {
69
71
  constructor(adapter) {
@@ -564,6 +566,16 @@ class CascaderFoundation extends _foundation.default {
564
566
  this.close(e);
565
567
  }
566
568
  }
569
+ /**
570
+ * A11y: simulate selection click
571
+ */
572
+
573
+
574
+ handleSelectionEnterPress(keyboardEvent) {
575
+ if ((0, _isEnterPress.default)(keyboardEvent)) {
576
+ this.handleClick(keyboardEvent);
577
+ }
578
+ }
567
579
 
568
580
  toggleHoverState(bool) {
569
581
  this._adapter.toggleHovering(bool);
@@ -986,6 +998,16 @@ class CascaderFoundation extends _foundation.default {
986
998
 
987
999
  this._adapter.rePositionDropdown();
988
1000
  }
1001
+ /**
1002
+ * A11y: simulate clear button click
1003
+ */
1004
+
1005
+
1006
+ handleClearEnterPress(keyboardEvent) {
1007
+ if ((0, _isEnterPress.default)(keyboardEvent)) {
1008
+ this.handleClear();
1009
+ }
1010
+ }
989
1011
 
990
1012
  getRenderData() {
991
1013
  var _context9, _context10;
@@ -8,7 +8,7 @@ import { BaseValueType } from '../foundation';
8
8
  * @returns {string}
9
9
  */
10
10
  export declare function formatDateValues(values: BaseValueType[], formatToken: string, { groupInnerSeparator, groupSize, groupSeparator, }: {
11
- groupInnerSeparator?: " ~ ";
11
+ groupInnerSeparator?: string;
12
12
  groupSize?: number;
13
- groupSeparator?: ",";
13
+ groupSeparator?: string;
14
14
  }, locale: any): string;
@@ -0,0 +1,20 @@
1
+ import { strings } from '../constants';
2
+ /**
3
+ * 获取 insetInput 输入框的 placeholder
4
+ * Get the placeholder of the insetInput input
5
+ *
6
+ * If type is time related, we only recognize the format like `dateFormat timeFormat`
7
+ * - 'yyyy-MM-dd HH:mm:ss' // ok
8
+ * - 'yyyy-MM-dd HH:mm:ss' // bad format
9
+ *
10
+ * @example
11
+ * 'yyyy-MM-dd' => 'yyyy-MM-dd'
12
+ * 'yyyy-MM' => 'yyyy-MM'
13
+ * 'yyyy-MM-dd HH:mm:ss' => 'yyyy-MM-dd HH:mm:ss'
14
+ * 'yyyy-MM-dd HH:mm' => 'yyyy-MM-dd HH:mm'
15
+ * 'Pp' => 'yyyy-MM-dd'
16
+ */
17
+ export default function getInsetInputFormatToken(options: {
18
+ format: string;
19
+ type: typeof strings.TYPE_SET[number];
20
+ }): string;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+
3
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
+
5
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
6
+
7
+ _Object$defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+
11
+ exports.default = getInsetInputFormatToken;
12
+
13
+ var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
14
+
15
+ var _getDefaultFormatToken = require("./getDefaultFormatToken");
16
+
17
+ /**
18
+ * 获取 insetInput 输入框的 placeholder
19
+ * Get the placeholder of the insetInput input
20
+ *
21
+ * If type is time related, we only recognize the format like `dateFormat timeFormat`
22
+ * - 'yyyy-MM-dd HH:mm:ss' // ok
23
+ * - 'yyyy-MM-dd HH:mm:ss' // bad format
24
+ *
25
+ * @example
26
+ * 'yyyy-MM-dd' => 'yyyy-MM-dd'
27
+ * 'yyyy-MM' => 'yyyy-MM'
28
+ * 'yyyy-MM-dd HH:mm:ss' => 'yyyy-MM-dd HH:mm:ss'
29
+ * 'yyyy-MM-dd HH:mm' => 'yyyy-MM-dd HH:mm'
30
+ * 'Pp' => 'yyyy-MM-dd'
31
+ */
32
+ function getInsetInputFormatToken(options) {
33
+ var _context;
34
+
35
+ const {
36
+ format,
37
+ type
38
+ } = options;
39
+ const dateReg = /([yMd]{0,4}[^a-z\s]*[yMd]{0,4}[^a-z\s]*[yMd]{0,4})/i;
40
+ const dateTimeReg = /([yMd]{0,4}[^a-z\s]*[yMd]{0,4}[^a-z\s]*[yMd]{0,4}) (H{0,2}[^a-z\s]*m{0,2}[^a-z\s]*s{0,2})/i;
41
+ const defaultToken = (0, _getDefaultFormatToken.getDefaultFormatTokenByType)(type);
42
+ let insetInputFormat;
43
+
44
+ switch (type) {
45
+ case 'dateTime':
46
+ case 'dateTimeRange':
47
+ const dateTimeResult = dateTimeReg.exec(format);
48
+ insetInputFormat = dateTimeResult && dateTimeResult[1] && dateTimeResult[2] ? (0, _concat.default)(_context = "".concat(dateTimeResult[1], " ")).call(_context, dateTimeResult[2]) : defaultToken;
49
+ break;
50
+
51
+ case 'date':
52
+ case 'month':
53
+ case 'dateRange':
54
+ default:
55
+ const dateResult = dateReg.exec(format);
56
+ insetInputFormat = dateResult && dateResult[1] || defaultToken;
57
+ break;
58
+ }
59
+
60
+ return insetInputFormat;
61
+ }
@@ -0,0 +1,31 @@
1
+ import { strings } from '../constants';
2
+ /**
3
+ * 从 insetInputStr 字符串解析出 insetInputValue 对象
4
+ * Parse the insetInputValue object from the insetInputStr string
5
+ *
6
+ * @example
7
+ * ```
8
+ * '2022-02-01' => { monthLeft: { dateInput: '2022-02-01' } }
9
+ * '2022-02-01 00:00:00' => { monthLeft: { dateInput: '2022-02-01', timeInput: '00:00:00' } }
10
+ * '2022-02-01 00:00:00 ~ 2022-02-15 00:00:00' => { monthLeft: { dateInput: '2022-02-01', timeInput: '00:00:00'}, monthRight: { dateInput: '2022-02-15', timeInput: '00:00:00' } }
11
+ *
12
+ * '2022-0' => { monthLeft: { dateInput: '2022-0' } }
13
+ * '2022-02-01 00:00:' => { monthLeft: { dateInput: '2022-02-01', timeInput: '00:00:' } }
14
+ * '2022-02-01 00:00:00 ~ ' => { monthLeft: { dateInput: '2022-02-01', timeInput: '00:00:00'}, monthRight: { dateInput: '', timeInput: '' } }
15
+ * ' ~ 2022-02-15 00:00:00' => { monthLeft: { dateInput: '', timeInput: '' }, monthRight: { dateInput: '2022-02-15', timeInput: '00:00:00' } }
16
+ * ```
17
+ */
18
+ export default function getInsetInputValueFromInsetInputStr(options: {
19
+ inputValue: string;
20
+ rangeSeparator: string;
21
+ type: typeof strings.TYPE_SET[number];
22
+ }): {
23
+ monthLeft: {
24
+ dateInput: string;
25
+ timeInput: string;
26
+ };
27
+ monthRight: {
28
+ dateInput: string;
29
+ timeInput: string;
30
+ };
31
+ };
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+
3
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
+
5
+ _Object$defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+
9
+ exports.default = getInsetInputValueFromInsetInputStr;
10
+
11
+ /**
12
+ * 从 insetInputStr 字符串解析出 insetInputValue 对象
13
+ * Parse the insetInputValue object from the insetInputStr string
14
+ *
15
+ * @example
16
+ * ```
17
+ * '2022-02-01' => { monthLeft: { dateInput: '2022-02-01' } }
18
+ * '2022-02-01 00:00:00' => { monthLeft: { dateInput: '2022-02-01', timeInput: '00:00:00' } }
19
+ * '2022-02-01 00:00:00 ~ 2022-02-15 00:00:00' => { monthLeft: { dateInput: '2022-02-01', timeInput: '00:00:00'}, monthRight: { dateInput: '2022-02-15', timeInput: '00:00:00' } }
20
+ *
21
+ * '2022-0' => { monthLeft: { dateInput: '2022-0' } }
22
+ * '2022-02-01 00:00:' => { monthLeft: { dateInput: '2022-02-01', timeInput: '00:00:' } }
23
+ * '2022-02-01 00:00:00 ~ ' => { monthLeft: { dateInput: '2022-02-01', timeInput: '00:00:00'}, monthRight: { dateInput: '', timeInput: '' } }
24
+ * ' ~ 2022-02-15 00:00:00' => { monthLeft: { dateInput: '', timeInput: '' }, monthRight: { dateInput: '2022-02-15', timeInput: '00:00:00' } }
25
+ * ```
26
+ */
27
+ function getInsetInputValueFromInsetInputStr(options) {
28
+ const timeSeparator = ' ';
29
+ const {
30
+ inputValue = '',
31
+ rangeSeparator,
32
+ type
33
+ } = options;
34
+ let leftDateInput, leftTimeInput, rightDateInput, rightTimeInput;
35
+ const insetInputValue = {
36
+ monthLeft: {
37
+ dateInput: '',
38
+ timeInput: ''
39
+ },
40
+ monthRight: {
41
+ dateInput: '',
42
+ timeInput: ''
43
+ }
44
+ };
45
+
46
+ switch (type) {
47
+ case 'date':
48
+ case 'month':
49
+ insetInputValue.monthLeft.dateInput = inputValue;
50
+ break;
51
+
52
+ case 'dateRange':
53
+ [leftDateInput = '', rightDateInput = ''] = inputValue.split(rangeSeparator);
54
+ insetInputValue.monthLeft.dateInput = leftDateInput;
55
+ insetInputValue.monthRight.dateInput = rightDateInput;
56
+ break;
57
+
58
+ case 'dateTime':
59
+ [leftDateInput = '', leftTimeInput = ''] = inputValue.split(timeSeparator);
60
+ insetInputValue.monthLeft.dateInput = leftDateInput;
61
+ insetInputValue.monthLeft.timeInput = leftTimeInput;
62
+ break;
63
+
64
+ case 'dateTimeRange':
65
+ const [leftInput = '', rightInput = ''] = inputValue.split(rangeSeparator);
66
+ [leftDateInput = '', leftTimeInput = ''] = leftInput.split(timeSeparator);
67
+ [rightDateInput = '', rightTimeInput = ''] = rightInput.split(timeSeparator);
68
+ insetInputValue.monthLeft.dateInput = leftDateInput;
69
+ insetInputValue.monthLeft.timeInput = leftTimeInput;
70
+ insetInputValue.monthRight.dateInput = rightDateInput;
71
+ insetInputValue.monthRight.timeInput = rightTimeInput;
72
+ break;
73
+ }
74
+
75
+ return insetInputValue;
76
+ }
@@ -41,10 +41,12 @@ declare const strings: {
41
41
  readonly PANEL_TYPE_RIGHT: "right";
42
42
  readonly STATUS: readonly ["default", "error", "warning", "success"];
43
43
  readonly POSITION_SET: readonly ["top", "topLeft", "topRight", "left", "leftTop", "leftBottom", "right", "rightTop", "rightBottom", "bottom", "bottomLeft", "bottomRight", "leftTopOver", "rightTopOver"];
44
+ readonly POSITION_INLINE_INPUT: "leftTopOver";
44
45
  };
45
46
  declare const numbers: {
46
47
  readonly WEEK_START_ON: 0;
47
48
  readonly WEEK_HEIGHT: 36;
48
49
  readonly SPACING: number;
50
+ readonly SPACING_INSET_INPUT: 1;
49
51
  };
50
52
  export { cssClasses, strings, numbers };
@@ -63,13 +63,14 @@ const strings = (0, _assign.default)({
63
63
  PANEL_TYPE_LEFT: 'left',
64
64
  PANEL_TYPE_RIGHT: 'right',
65
65
  STATUS: _constants.VALIDATE_STATUS,
66
- POSITION_SET: _constants2.strings.POSITION_SET
66
+ POSITION_SET: _constants2.strings.POSITION_SET,
67
+ POSITION_INLINE_INPUT: 'leftTopOver'
67
68
  }, formatToken);
68
69
  exports.strings = strings;
69
70
  const numbers = {
70
71
  WEEK_START_ON: 0,
71
72
  WEEK_HEIGHT: 36,
72
- SPACING: _constants2.numbers.SPACING // Floating distance trigger interval
73
-
73
+ SPACING: _constants2.numbers.SPACING,
74
+ SPACING_INSET_INPUT: 1
74
75
  };
75
76
  exports.numbers = numbers;
@@ -4,6 +4,7 @@
4
4
  .semi-datepicker {
5
5
  box-sizing: border-box;
6
6
  display: inline-block;
7
+ vertical-align: top;
7
8
  }
8
9
  .semi-datepicker-month-grid {
9
10
  user-select: none;
@@ -29,6 +30,24 @@
29
30
  .semi-datepicker-month-grid[x-type=date] .semi-datepicker-yam-showing {
30
31
  min-height: 325px;
31
32
  }
33
+ .semi-datepicker-month-grid[x-insetInput=true] .semi-datepicker-month-grid-left[x-open-type=year],
34
+ .semi-datepicker-month-grid[x-insetInput=true] .semi-datepicker-month-grid-right[x-open-type=year] {
35
+ min-height: 312px;
36
+ }
37
+ .semi-datepicker-month-grid[x-insetInput=true] .semi-datepicker-month-grid-left[x-open-type=time],
38
+ .semi-datepicker-month-grid[x-insetInput=true] .semi-datepicker-month-grid-right[x-open-type=time] {
39
+ min-height: 314px;
40
+ }
41
+ .semi-datepicker-month-grid[x-insetInput=true] .semi-datepicker-navigation {
42
+ padding-top: 8px;
43
+ padding-bottom: 8px;
44
+ }
45
+ .semi-datepicker-month-grid[x-insetInput=true] .semi-datepicker-tpk {
46
+ min-height: 100%;
47
+ }
48
+ .semi-datepicker-month-grid[x-insetInput=true][x-type=dateTime] .semi-datepicker-yam, .semi-datepicker-month-grid[x-insetInput=true][x-type=dateTimeRange] .semi-datepicker-yam {
49
+ height: 100%;
50
+ }
32
51
  .semi-datepicker-month-grid .semi-datepicker-yearmonth-header {
33
52
  background: var(--semi-color-bg-3);
34
53
  padding: 12px 16px;
@@ -70,6 +89,7 @@
70
89
  line-height: 20px;
71
90
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
72
91
  min-height: 24px;
92
+ line-height: 24px;
73
93
  }
74
94
  .semi-datepicker-month-grid[x-panel-yearandmonth-open-type=left] .semi-datepicker-weeks, .semi-datepicker-month-grid[x-panel-yearandmonth-open-type=right] .semi-datepicker-weeks {
75
95
  min-height: 216px;
@@ -370,6 +390,34 @@
370
390
  .semi-datepicker .semi-datepicker-input-readonly {
371
391
  cursor: pointer;
372
392
  }
393
+ .semi-datepicker-inset-input-wrapper {
394
+ display: flex;
395
+ flex-wrap: nowrap;
396
+ justify-content: space-between;
397
+ box-sizing: border-box;
398
+ column-gap: 8px;
399
+ padding: 12px 16px;
400
+ padding-bottom: 0;
401
+ width: 284px;
402
+ }
403
+ .semi-datepicker-inset-input-wrapper[x-type=dateRange], .semi-datepicker-inset-input-wrapper[x-type=dateTimeRange] {
404
+ width: 568px;
405
+ }
406
+ .semi-datepicker-inset-input-wrapper[x-type=month] {
407
+ width: 204px;
408
+ }
409
+ .semi-datepicker-inset-input-wrapper .semi-input-wrapper {
410
+ flex: 1;
411
+ flex-shrink: 0;
412
+ }
413
+ .semi-datepicker-inset-input-separator {
414
+ flex-grow: 0;
415
+ flex-shrink: 0;
416
+ height: 32px;
417
+ line-height: 32px;
418
+ padding: 0 4px;
419
+ color: var(--semi-color-text-3);
420
+ }
373
421
  .semi-datepicker-range-input {
374
422
  display: flex;
375
423
  align-items: center;
@@ -572,6 +620,23 @@
572
620
  .semi-datepicker-compact .semi-datepicker-month-grid[x-panel-yearandmonth-open-type=left] .semi-datepicker-weeks, .semi-datepicker-compact .semi-datepicker-month-grid[x-panel-yearandmonth-open-type=right] .semi-datepicker-weeks {
573
621
  min-height: 168px;
574
622
  }
623
+ .semi-datepicker-compact .semi-datepicker-month-grid[x-insetInput=true] .semi-datepicker-month-grid-left[x-open-type=year],
624
+ .semi-datepicker-compact .semi-datepicker-month-grid[x-insetInput=true] .semi-datepicker-month-grid-right[x-open-type=year] {
625
+ min-height: 236px;
626
+ }
627
+ .semi-datepicker-compact .semi-datepicker-month-grid[x-insetInput=true] .semi-datepicker-month-grid-left[x-open-type=time],
628
+ .semi-datepicker-compact .semi-datepicker-month-grid[x-insetInput=true] .semi-datepicker-month-grid-right[x-open-type=time] {
629
+ min-height: 236px;
630
+ }
631
+ .semi-datepicker-compact .semi-datepicker-month-grid[x-insetInput=true] .semi-datepicker-yam-showing {
632
+ min-height: 236px;
633
+ }
634
+ .semi-datepicker-compact .semi-datepicker-month-grid[x-insetInput=true] .semi-datepicker-tpk {
635
+ min-height: 100%;
636
+ }
637
+ .semi-datepicker-compact .semi-datepicker-month-grid[x-insetInput=true][x-type=dateTime] .semi-datepicker-yam, .semi-datepicker-compact .semi-datepicker-month-grid[x-insetInput=true][x-type=dateTimeRange] .semi-datepicker-yam {
638
+ height: 100%;
639
+ }
575
640
  .semi-datepicker-compact.semi-datepicker-panel-yam .semi-scrolllist {
576
641
  font-size: 12px;
577
642
  line-height: 16px;
@@ -687,11 +752,42 @@
687
752
  padding-right: 8px;
688
753
  padding-bottom: 10px;
689
754
  }
755
+ .semi-datepicker-compact .semi-datepicker-inset-input-wrapper {
756
+ column-gap: 4px;
757
+ padding: 8px 8px;
758
+ padding-bottom: 0;
759
+ width: 216px;
760
+ }
761
+ .semi-datepicker-compact .semi-datepicker-inset-input-wrapper[x-type=dateRange], .semi-datepicker-compact .semi-datepicker-inset-input-wrapper[x-type=dateTimeRange] {
762
+ width: 432px;
763
+ padding-top: 0;
764
+ }
765
+ .semi-datepicker-compact .semi-datepicker-inset-input-wrapper[x-type=dateRange] .semi-input-wrapper, .semi-datepicker-compact .semi-datepicker-inset-input-wrapper[x-type=dateTimeRange] .semi-input-wrapper {
766
+ margin-top: 8px;
767
+ }
768
+ .semi-datepicker-compact .semi-datepicker-inset-input-wrapper[x-type=month] {
769
+ width: 195px;
770
+ }
771
+ .semi-datepicker-compact .semi-datepicker-inset-input-wrapper .semi-input-wrapper {
772
+ height: 28px;
773
+ box-sizing: border-box;
774
+ }
775
+ .semi-datepicker-compact .semi-datepicker-inset-input-wrapper .semi-input-wrapper .semi-input {
776
+ font-size: 12px;
777
+ line-height: 26px;
778
+ height: 26px;
779
+ vertical-align: top;
780
+ }
781
+ .semi-datepicker-compact .semi-datepicker-inset-input-separator {
782
+ border-left: 1px solid var(--semi-color-border);
783
+ transform: translateX(50%);
784
+ height: auto;
785
+ }
690
786
 
691
- .semi-popover-wrapper[x-placement*=top] .semi-datepicker .semi-datepicker-weeks, .semi-popover-wrapper[x-placement*=Top] .semi-datepicker .semi-datepicker-weeks {
787
+ .semi-popover-wrapper[x-placement^=top] .semi-datepicker .semi-datepicker-weeks, .semi-popover-wrapper[x-placement=leftTop] .semi-datepicker .semi-datepicker-weeks, .semi-popover-wrapper[x-placement=rightTop] .semi-datepicker .semi-datepicker-weeks, .semi-popover-wrapper[x-placement*=BottomOver] .semi-datepicker .semi-datepicker-weeks {
692
788
  min-height: 216px;
693
789
  }
694
- .semi-popover-wrapper[x-placement*=top] .semi-datepicker-compact .semi-datepicker-weeks, .semi-popover-wrapper[x-placement*=Top] .semi-datepicker-compact .semi-datepicker-weeks {
790
+ .semi-popover-wrapper[x-placement^=top] .semi-datepicker-compact .semi-datepicker-weeks, .semi-popover-wrapper[x-placement=leftTop] .semi-datepicker-compact .semi-datepicker-weeks, .semi-popover-wrapper[x-placement=rightTop] .semi-datepicker-compact .semi-datepicker-weeks, .semi-popover-wrapper[x-placement*=BottomOver] .semi-datepicker-compact .semi-datepicker-weeks {
695
791
  min-height: 168px;
696
792
  }
697
793
 
@@ -836,4 +932,10 @@
836
932
  .semi-portal-rtl .semi-datepicker-compact .semi-datepicker-footer {
837
933
  padding-left: 8px;
838
934
  padding-right: auto;
935
+ }
936
+ .semi-rtl .semi-datepicker-compact .semi-datepicker-inset-input-separator,
937
+ .semi-portal-rtl .semi-datepicker-compact .semi-datepicker-inset-input-separator {
938
+ border-right: 1px solid var(--semi-color-border);
939
+ border-left: 0;
940
+ transform: translateX(-50%);
839
941
  }