@douyinfe/semi-foundation 2.64.0 → 2.65.0-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.
Files changed (75) hide show
  1. package/button/button.scss +5 -0
  2. package/button/iconButton.scss +5 -1
  3. package/cascader/foundation.ts +2 -0
  4. package/chat/chat.scss +1 -1
  5. package/datePicker/datePicker.scss +12 -0
  6. package/datePicker/monthsGridFoundation.ts +3 -4
  7. package/input/foundation.ts +3 -14
  8. package/input/textareaFoundation.ts +2 -14
  9. package/input/util/truncateValue.ts +25 -0
  10. package/lib/cjs/button/button.css +4 -0
  11. package/lib/cjs/button/button.scss +5 -0
  12. package/lib/cjs/button/iconButton.css +4 -0
  13. package/lib/cjs/button/iconButton.scss +5 -1
  14. package/lib/cjs/cascader/foundation.js +2 -0
  15. package/lib/cjs/chat/chat.css +1 -1
  16. package/lib/cjs/chat/chat.scss +1 -1
  17. package/lib/cjs/datePicker/datePicker.css +9 -0
  18. package/lib/cjs/datePicker/datePicker.scss +12 -0
  19. package/lib/cjs/datePicker/monthsGridFoundation.js +2 -3
  20. package/lib/cjs/input/foundation.d.ts +1 -1
  21. package/lib/cjs/input/foundation.js +7 -14
  22. package/lib/cjs/input/textareaFoundation.js +6 -14
  23. package/lib/cjs/input/util/truncateValue.d.ts +5 -0
  24. package/lib/cjs/input/util/truncateValue.js +31 -0
  25. package/lib/cjs/markdownRender/foundation.d.ts +3 -0
  26. package/lib/cjs/markdownRender/foundation.js +6 -2
  27. package/lib/cjs/overflowList/foundation.js +4 -3
  28. package/lib/cjs/slider/foundation.js +6 -1
  29. package/lib/cjs/table/animation.scss +2 -0
  30. package/lib/cjs/table/table.css +10 -0
  31. package/lib/cjs/table/table.scss +17 -0
  32. package/lib/cjs/table/variables.scss +1 -0
  33. package/lib/cjs/tabs/constants.d.ts +1 -0
  34. package/lib/cjs/tabs/constants.js +2 -1
  35. package/lib/cjs/tabs/tabs.css +29 -0
  36. package/lib/cjs/tabs/tabs.scss +42 -0
  37. package/lib/cjs/tabs/variables.scss +12 -0
  38. package/lib/es/button/button.css +4 -0
  39. package/lib/es/button/button.scss +5 -0
  40. package/lib/es/button/iconButton.css +4 -0
  41. package/lib/es/button/iconButton.scss +5 -1
  42. package/lib/es/cascader/foundation.js +2 -0
  43. package/lib/es/chat/chat.css +1 -1
  44. package/lib/es/chat/chat.scss +1 -1
  45. package/lib/es/datePicker/datePicker.css +9 -0
  46. package/lib/es/datePicker/datePicker.scss +12 -0
  47. package/lib/es/datePicker/monthsGridFoundation.js +2 -3
  48. package/lib/es/input/foundation.d.ts +1 -1
  49. package/lib/es/input/foundation.js +7 -14
  50. package/lib/es/input/textareaFoundation.js +6 -14
  51. package/lib/es/input/util/truncateValue.d.ts +5 -0
  52. package/lib/es/input/util/truncateValue.js +24 -0
  53. package/lib/es/markdownRender/foundation.d.ts +3 -0
  54. package/lib/es/markdownRender/foundation.js +6 -2
  55. package/lib/es/overflowList/foundation.js +4 -3
  56. package/lib/es/slider/foundation.js +6 -1
  57. package/lib/es/table/animation.scss +2 -0
  58. package/lib/es/table/table.css +10 -0
  59. package/lib/es/table/table.scss +17 -0
  60. package/lib/es/table/variables.scss +1 -0
  61. package/lib/es/tabs/constants.d.ts +1 -0
  62. package/lib/es/tabs/constants.js +2 -1
  63. package/lib/es/tabs/tabs.css +29 -0
  64. package/lib/es/tabs/tabs.scss +42 -0
  65. package/lib/es/tabs/variables.scss +12 -0
  66. package/markdownRender/foundation.ts +9 -3
  67. package/overflowList/foundation.ts +6 -4
  68. package/package.json +3 -3
  69. package/slider/foundation.ts +6 -1
  70. package/table/animation.scss +2 -0
  71. package/table/table.scss +17 -0
  72. package/table/variables.scss +1 -0
  73. package/tabs/constants.ts +2 -1
  74. package/tabs/tabs.scss +42 -0
  75. package/tabs/variables.scss +12 -0
@@ -135,18 +135,27 @@
135
135
  margin-left: 10px;
136
136
  cursor: pointer;
137
137
  }
138
+ .semi-tabs-tab-single.semi-tabs-tab .semi-icon.semi-tabs-tab-icon-close.semi-icon-close:hover {
139
+ color: var(--semi-color-text-0);
140
+ }
138
141
  .semi-tabs-tab-single.semi-tabs-tab:hover {
139
142
  color: var(--semi-color-text-0);
140
143
  }
141
144
  .semi-tabs-tab-single.semi-tabs-tab:hover .semi-icon:not(.semi-icon-checkbox_tick, .semi-icon-radio, .semi-icon-checkbox_indeterminate) {
142
145
  color: var(--semi-color-text-0);
143
146
  }
147
+ .semi-tabs-tab-single.semi-tabs-tab:hover .semi-icon.semi-tabs-tab-icon-close {
148
+ color: var(--semi-color-text-2);
149
+ }
144
150
  .semi-tabs-tab-single.semi-tabs-tab:active {
145
151
  color: var(--semi-color-text-0);
146
152
  }
147
153
  .semi-tabs-tab-single.semi-tabs-tab:active .semi-icon:not(.semi-icon-checkbox_tick, .semi-icon-radio, .semi-icon-checkbox_indeterminate) {
148
154
  color: var(--semi-color-text-0);
149
155
  }
156
+ .semi-tabs-tab-single.semi-tabs-tab:active .semi-icon.semi-tabs-tab-icon-close {
157
+ color: var(--semi-color-text-2);
158
+ }
150
159
  .semi-tabs-tab-single.semi-tabs-tab-active, .semi-tabs-tab-single.semi-tabs-tab-active:hover {
151
160
  cursor: default;
152
161
  font-weight: 600;
@@ -424,6 +433,26 @@
424
433
  border: none;
425
434
  background-color: var(--semi-color-primary-light-default);
426
435
  }
436
+ .semi-tabs-bar-slash .semi-tabs-tab {
437
+ padding: 12px 0px;
438
+ }
439
+ .semi-tabs-bar-slash .semi-tabs-tab:nth-of-type(1) {
440
+ padding-left: 0;
441
+ }
442
+ .semi-tabs-bar-slash .semi-tabs-tab:not(:last-of-type) {
443
+ margin-right: 16px;
444
+ }
445
+ .semi-tabs-bar-slash .semi-tabs-tab:not(:last-of-type):after {
446
+ content: "";
447
+ margin-left: 16px;
448
+ display: inline-block;
449
+ height: 14px;
450
+ width: 8px;
451
+ margin-top: 3px;
452
+ margin-bottom: 3px;
453
+ vertical-align: bottom;
454
+ background: linear-gradient(to bottom right, transparent 0%, transparent calc(50% - 1px), var(--semi-color-text-2) 50%, transparent calc(50% + 1px), transparent 100%);
455
+ }
427
456
  .semi-tabs-content {
428
457
  width: 100%;
429
458
  padding: 5px 0;
@@ -174,6 +174,10 @@ $ignoreIcon: '.#{$prefix}-icon-checkbox_tick, .#{$prefix}-icon-radio, .#{$prefix
174
174
  color: var(--semi-color-text-2);
175
175
  margin-left: 10px;
176
176
  cursor: pointer;
177
+
178
+ &.#{$prefix}-icon-close:hover {
179
+ color: var(--semi-color-text-0);
180
+ }
177
181
  }
178
182
 
179
183
  &:hover {
@@ -182,6 +186,10 @@ $ignoreIcon: '.#{$prefix}-icon-checkbox_tick, .#{$prefix}-icon-radio, .#{$prefix
182
186
  .#{$prefix}-icon:not(#{$ignoreIcon}) {
183
187
  color: $color-tabs_tab-icon-hover;
184
188
  }
189
+
190
+ .#{$prefix}-icon.#{$module}-tab-icon-close {
191
+ color: var(--semi-color-text-2);
192
+ }
185
193
  }
186
194
 
187
195
  &:active {
@@ -190,6 +198,10 @@ $ignoreIcon: '.#{$prefix}-icon-checkbox_tick, .#{$prefix}-icon-radio, .#{$prefix
190
198
  .#{$prefix}-icon:not(#{$ignoreIcon}) {
191
199
  color: $color-tabs_tab-icon-active;
192
200
  }
201
+
202
+ .#{$prefix}-icon.#{$module}-tab-icon-close {
203
+ color: var(--semi-color-text-2);
204
+ }
193
205
  }
194
206
  }
195
207
 
@@ -583,6 +595,36 @@ $ignoreIcon: '.#{$prefix}-icon-checkbox_tick, .#{$prefix}-icon-radio, .#{$prefix
583
595
  }
584
596
  }
585
597
 
598
+ &-bar-slash {
599
+
600
+ .#{$module}-tab {
601
+ padding: $spacing-tabs_bar_slash_tab-paddingY $spacing-tabs_bar_slash_tab-paddingX;
602
+
603
+ &:nth-of-type(1) {
604
+ padding-left: 0;
605
+ }
606
+
607
+ &:not(:last-of-type) {
608
+ margin-right: $spacing-tabs_bar_slash-marginRight;
609
+
610
+ &:after {
611
+ content: "";
612
+ margin-left: $spacing-tabs_bar_slash_line_marginLeft;
613
+ display: inline-block;
614
+ height: $height-tabs_tab_slash_line;
615
+ width: $width-tabs_tab_slash_line;
616
+ margin-top: $spacing-tabs_bar_slash_line_marginTop;
617
+ margin-bottom: $spacing-tabs_bar_slash_line_marginBottom;
618
+ vertical-align: bottom;
619
+ // Get diagonal slash
620
+ background: linear-gradient(to bottom right, transparent 0%,
621
+ transparent calc(50% - 1px), $color-tabs_tab_slash_line 50%,
622
+ transparent calc(50% + 1px), transparent 100%);
623
+ }
624
+ }
625
+ }
626
+ }
627
+
586
628
  &-content {
587
629
  width: 100%;
588
630
  padding: $spacing-tabs_content-paddingY $spacing-tabs_content-paddingX;
@@ -65,6 +65,8 @@ $color-tabs_tab-pane_arrow_disabled-bg-hover: transparent;
65
65
  $color-tabs_tab-pane_arrow_disabled-text-default: var(--semi-color-disabled-text);
66
66
  $color-tabs_tab-pane_arrow_disabled-text-hover: var(--semi-color-disabled-text);
67
67
 
68
+ $color-tabs_tab_slash_line: var(--semi-color-text-2); //斜线式页签分割线颜色
69
+
68
70
  $font-tabs_tab-fontWeight: $font-weight-regular; // 页签文本字重 - 默认
69
71
  $font-tabs_tab_active-fontWeight: $font-weight-bold; // 页签文本字重 - 选中
70
72
 
@@ -79,6 +81,9 @@ $width-tabs-outline-offset: -2px; // 聚焦轮廓偏移宽度
79
81
  $width-tabs_bar_line-outline-offset: -1px; // 线条式页签聚焦轮廓偏移宽度
80
82
  $width-tabs_tab-pane_arrow-border:0px; // 滚动折叠箭头边框宽度
81
83
 
84
+ $width-tabs_tab_slash_line: 8px; // 斜线式页签分割线宽度
85
+ $height-tabs_tab_slash_line: 14px; // 斜线式页签分割线高度
86
+
82
87
  $height-tabs_bar_extra_large: 50px; // 大尺寸页签高度
83
88
  $font-tabs_bar_extra_large-lineHeight: $height-tabs_bar_extra_large; // 大尺寸页签文字行高
84
89
 
@@ -118,6 +123,13 @@ $spacing-tabs_bar_line_tab_left-padding: 12px; // 垂直线条式页签左侧内
118
123
  $spacing-tabs_bar_line_tab_left_small-padding: $spacing-tight - 2px; // 小尺寸垂直线条式页签左侧内边距
119
124
  $spacing-tabs_bar_line_tab_left_medium-padding: $spacing-base-tight - 2px; // 中等尺寸垂直线条式页签左侧内边距
120
125
 
126
+ $spacing-tabs_bar_slash_tab-paddingY: 12px; // 斜线式页签上下内边距
127
+ $spacing-tabs_bar_slash_tab-paddingX: 0px; // 斜线式页签水平内边距
128
+ $spacing-tabs_bar_slash-marginRight: 16px; // 斜线式页签右侧外边距
129
+ $spacing-tabs_bar_slash_line_marginLeft: 16px; // 斜线式页签斜线左侧外边距
130
+ $spacing-tabs_bar_slash_line_marginTop: 3px; // 斜线式页签斜线顶部外边距
131
+ $spacing-tabs_bar_slash_line_marginBottom: 3px; // 斜线式页签斜线底部外边距
132
+
121
133
  $spacing-tabs_content-paddingY: 5px; // 页签内容区垂直方向内边距
122
134
  $spacing-tabs_content-paddingX: 0; // 页签内容区水平方向内边距
123
135
 
@@ -46,6 +46,10 @@
46
46
  .semi-button.semi-button-primary:focus-visible, .semi-button.semi-button-secondary:focus-visible, .semi-button.semi-button-tertiary:focus-visible, .semi-button.semi-button-warning:focus-visible, .semi-button.semi-button-danger:focus-visible {
47
47
  outline: 2px solid var(--semi-color-primary-light-active);
48
48
  }
49
+ .semi-button-content {
50
+ display: flex;
51
+ align-items: center;
52
+ }
49
53
  .semi-button-danger {
50
54
  background-color: var(--semi-color-danger);
51
55
  color: rgba(var(--semi-white), 1);
@@ -36,6 +36,11 @@ $module: #{$prefix}-button;
36
36
  }
37
37
  }
38
38
 
39
+ &-content{
40
+ display: flex;
41
+ align-items: center;
42
+ }
43
+
39
44
  &-danger {
40
45
  background-color: $color-button_danger-bg-default;
41
46
  color: $color-button_danger-text-default;
@@ -42,9 +42,13 @@
42
42
  }
43
43
  .semi-button-content-left {
44
44
  margin-right: 8px;
45
+ display: flex;
46
+ align-items: center;
45
47
  }
46
48
  .semi-button-content-right {
47
49
  margin-left: 8px;
50
+ display: flex;
51
+ align-items: center;
48
52
  }
49
53
 
50
54
  .semi-rtl .semi-button,
@@ -60,12 +60,16 @@ $module: #{$prefix}-button;
60
60
 
61
61
  &-left {
62
62
  margin-right: $spacing-button_iconOnly_content-marginRight;
63
+ display: flex;
64
+ align-items: center;
63
65
  }
64
66
 
65
67
  &-right {
66
68
  margin-left: $spacing-button_iconOnly_content-marginLeft;
69
+ display: flex;
70
+ align-items: center;
67
71
  }
68
72
  }
69
73
  }
70
74
 
71
- @import "./rtl.scss";
75
+ @import "./rtl.scss";
@@ -42,6 +42,7 @@ export default class CascaderFoundation extends BaseFoundation {
42
42
  }
43
43
  const removedItem = (_a = keyEntities[key]) !== null && _a !== void 0 ? _a : {};
44
44
  !((_b = removedItem === null || removedItem === void 0 ? void 0 : removedItem.data) === null || _b === void 0 ? void 0 : _b.disable) && this._handleMultipleSelect(removedItem);
45
+ this._adapter.rePositionDropdown();
45
46
  };
46
47
  this.handleTagRemoveInTrigger = pos => {
47
48
  const {
@@ -751,6 +752,7 @@ export default class CascaderFoundation extends BaseFoundation {
751
752
  filteredKeys: new Set(filteredKeys)
752
753
  });
753
754
  this._adapter.notifyOnSearch(sugInput);
755
+ this._adapter.rePositionDropdown();
754
756
  }
755
757
  handleClear() {
756
758
  const {
@@ -93,7 +93,7 @@
93
93
  display: flex;
94
94
  flex-direction: row;
95
95
  margin-top: 8px;
96
- margin-Bottom: 8px;
96
+ margin-bottom: 8px;
97
97
  column-gap: 12px;
98
98
  }
99
99
  .semi-chat-chatBox:hover .semi-chat-chatBox-action:not(.semi-chat-chatBox-action-hidden) {
@@ -119,7 +119,7 @@ $module: #{$prefix}-chat;
119
119
  display: flex;
120
120
  flex-direction: row;
121
121
  margin-top: $spacing-chat_chatBox-marginY;
122
- margin-Bottom: $spacing-chat_chatBox-marginY;
122
+ margin-bottom: $spacing-chat_chatBox-marginY;
123
123
  column-gap: $spacing-chat_chatBox-columnGap;
124
124
 
125
125
  &:hover {
@@ -5,6 +5,9 @@
5
5
  box-sizing: border-box;
6
6
  display: inline-block;
7
7
  }
8
+ .semi-datepicker-container {
9
+ display: flex;
10
+ }
8
11
  .semi-datepicker .semi-scrolllist-body .semi-scrolllist-item {
9
12
  -ms-overflow-style: none; /* Internet Explorer 10+ */
10
13
  scrollbar-width: none; /* Firefox */
@@ -531,6 +534,12 @@
531
534
  .semi-datepicker-topSlot {
532
535
  border-bottom: 1px solid var(--semi-color-border);
533
536
  }
537
+ .semi-datepicker-leftSlot {
538
+ border-right: 1px solid var(--semi-color-border);
539
+ }
540
+ .semi-datepicker-rightSlot {
541
+ border-left: 1px solid var(--semi-color-border);
542
+ }
534
543
  .semi-datepicker-bottomSlot {
535
544
  border-top: 1px solid var(--semi-color-border);
536
545
  }
@@ -8,6 +8,10 @@ $module-list: #{$prefix}-scrolllist;
8
8
  box-sizing: border-box;
9
9
  display: inline-block;
10
10
 
11
+ &-container {
12
+ display: flex;
13
+ }
14
+
11
15
  .#{$module-list}-body {
12
16
  .#{$module-list}-item {
13
17
  -ms-overflow-style: none; /* Internet Explorer 10+ */
@@ -820,6 +824,14 @@ $module-list: #{$prefix}-scrolllist;
820
824
  &-topSlot {
821
825
  border-bottom: $width-datepicker_slot-border solid $color-datepicker_border-bg-default;
822
826
  }
827
+
828
+ &-leftSlot {
829
+ border-right: $width-datepicker_slot-border solid $color-datepicker_border-bg-default;
830
+ }
831
+
832
+ &-rightSlot {
833
+ border-left: $width-datepicker_slot-border solid $color-datepicker_border-bg-default;
834
+ }
823
835
 
824
836
  &-bottomSlot {
825
837
  border-top: $width-datepicker_slot-border solid $color-datepicker_border-bg-default;
@@ -537,7 +537,7 @@ export default class MonthsGridFoundation extends BaseFoundation {
537
537
  fullDate
538
538
  } = day;
539
539
  const time = monthDetail.pickerDate;
540
- const dateStr = type === 'dateTime' ? this._mergeDateAndTime(fullDate, time) : fullDate;
540
+ const dateStr = fullDate;
541
541
  if (!multiple) {
542
542
  newSelected.add(dateStr);
543
543
  } else {
@@ -549,9 +549,8 @@ export default class MonthsGridFoundation extends BaseFoundation {
549
549
  newSelected.add(dateStr);
550
550
  }
551
551
  }
552
- const dateFormat = this.getValidDateFormat();
553
552
  // When passed to the upper layer, it is converted into a Date object to ensure that the input parameter format of initFormDefaultValue is consistent
554
- const newSelectedDates = [...newSelected].map(_dateStr => compatibleParse(_dateStr, dateFormat, undefined, dateFnsLocale));
553
+ const newSelectedDates = [...newSelected].map(_dateStr => type === 'dateTime' ? this._mergeDateAndTime(_dateStr, time) : compatibleParse(_dateStr, strings.FORMAT_FULL_DATE, undefined, dateFnsLocale));
555
554
  this.handleShowDateAndTime(panelType, time);
556
555
  if (!isControlledComponent) {
557
556
  // Uncontrolled components, update internal values when operating, and notify external
@@ -47,7 +47,7 @@ declare class InputFoundation extends BaseFoundation<InputAdapter> {
47
47
  * @param {Number} maxLength
48
48
  * @returns {String}
49
49
  */
50
- handleTruncateValue(value: any, maxLength: number): any;
50
+ handleTruncateValue(value: any, maxLength: number): string;
51
51
  handleClear(e: any): void;
52
52
  /**
53
53
  * trigger when click input wrapper
@@ -6,6 +6,7 @@ import _noop from "lodash/noop";
6
6
  import BaseFoundation from '../base/foundation';
7
7
  import { strings } from './constants';
8
8
  import { ENTER_KEY } from './../utils/keyCode';
9
+ import truncateValue from './util/truncateValue';
9
10
  class InputFoundation extends BaseFoundation {
10
11
  static get inputDefaultAdapter() {
11
12
  return {
@@ -96,6 +97,7 @@ class InputFoundation extends BaseFoundation {
96
97
  return value;
97
98
  }
98
99
  }
100
+ return value;
99
101
  }
100
102
  /**
101
103
  * Truncate input values based on maximum length
@@ -107,20 +109,11 @@ class InputFoundation extends BaseFoundation {
107
109
  const {
108
110
  getValueLength
109
111
  } = this._adapter.getProps();
110
- if (_isFunction(getValueLength)) {
111
- let truncatedValue = '';
112
- for (let i = 1, len = value.length; i <= len; i++) {
113
- const currentValue = value.slice(0, i);
114
- if (getValueLength(currentValue) > maxLength) {
115
- return truncatedValue;
116
- } else {
117
- truncatedValue = currentValue;
118
- }
119
- }
120
- return truncatedValue;
121
- } else {
122
- return value.slice(0, maxLength);
123
- }
112
+ return truncateValue({
113
+ value,
114
+ maxLength,
115
+ getValueLength
116
+ });
124
117
  }
125
118
  handleClear(e) {
126
119
  let eventObj = e;
@@ -5,6 +5,7 @@ import _noop from "lodash/noop";
5
5
  import BaseFoundation from '../base/foundation';
6
6
  import calculateNodeHeight from './util/calculateNodeHeight';
7
7
  import getSizingData from './util/getSizingData';
8
+ import truncateValue from './util/truncateValue';
8
9
  export default class TextAreaFoundation extends BaseFoundation {
9
10
  static get textAreaDefaultAdapter() {
10
11
  return {
@@ -128,20 +129,11 @@ export default class TextAreaFoundation extends BaseFoundation {
128
129
  const {
129
130
  getValueLength
130
131
  } = this._adapter.getProps();
131
- if (_isFunction(getValueLength)) {
132
- let truncatedValue = '';
133
- for (let i = 1, len = value.length; i <= len; i++) {
134
- const currentValue = value.slice(0, i);
135
- if (getValueLength(currentValue) > maxLength) {
136
- return truncatedValue;
137
- } else {
138
- truncatedValue = currentValue;
139
- }
140
- }
141
- return truncatedValue;
142
- } else {
143
- return value.slice(0, maxLength);
144
- }
132
+ return truncateValue({
133
+ value,
134
+ maxLength,
135
+ getValueLength
136
+ });
145
137
  }
146
138
  handleFocus(e) {
147
139
  const {
@@ -0,0 +1,5 @@
1
+ export default function truncateValue(options: {
2
+ value: string;
3
+ maxLength: number;
4
+ getValueLength?: (value: string) => number;
5
+ }): string;
@@ -0,0 +1,24 @@
1
+ import _isFunction from "lodash/isFunction";
2
+ export default function truncateValue(options) {
3
+ const {
4
+ value,
5
+ maxLength,
6
+ getValueLength
7
+ } = options;
8
+ if (_isFunction(getValueLength)) {
9
+ let left = 0;
10
+ let right = value.length;
11
+ while (left < right) {
12
+ const mid = left + Math.floor((right - left) / 2);
13
+ const currentValue = value.slice(0, mid + 1);
14
+ if (getValueLength(currentValue) > maxLength) {
15
+ right = mid;
16
+ } else {
17
+ left = mid + 1;
18
+ }
19
+ }
20
+ return value.slice(0, left);
21
+ } else {
22
+ return value.slice(0, maxLength);
23
+ }
24
+ }
@@ -1,5 +1,6 @@
1
1
  import BaseFoundation, { DefaultAdapter } from '../base/foundation';
2
2
  import { MDXProps } from 'mdx/types';
3
+ import { type PluggableList } from "@mdx-js/mdx/lib/core";
3
4
  export interface MarkdownRenderAdapter<P = Record<string, any>, S = Record<string, any>> extends DefaultAdapter<P, S> {
4
5
  getRuntime: () => any;
5
6
  }
@@ -7,6 +8,8 @@ export interface MarkdownRenderBaseProps {
7
8
  raw: string;
8
9
  components: MDXProps['components'];
9
10
  format: "md" | "mdx";
11
+ remarkPlugins?: PluggableList;
12
+ rehypePlugins?: PluggableList;
10
13
  }
11
14
  export interface MarkdownRenderBaseState {
12
15
  MDXContentComponent: any;
@@ -32,13 +32,17 @@ class MarkdownRenderFoundation extends BaseFoundation {
32
32
  constructor() {
33
33
  super(...arguments);
34
34
  this.getOptions = () => {
35
+ var _a, _b, _c, _d;
35
36
  return {
36
37
  evaluateOptions: {
37
- remarkPlugins: [remarkGfm],
38
+ remarkPlugins: [remarkGfm, ...((_a = this.getProp("remarkPlugins")) !== null && _a !== void 0 ? _a : [])],
39
+ rehypePlugins: (_b = this.getProp("rehypePlugins")) !== null && _b !== void 0 ? _b : [],
38
40
  format: this.getProp("format")
39
41
  },
40
42
  compileOptions: {
41
- format: this.getProp("format")
43
+ format: this.getProp("format"),
44
+ remarkPlugins: [remarkGfm, ...((_c = this.getProp("remarkPlugins")) !== null && _c !== void 0 ? _c : [])],
45
+ rehypePlugins: (_d = this.getProp("rehypePlugins")) !== null && _d !== void 0 ? _d : []
42
46
  },
43
47
  runOptions: {}
44
48
  };
@@ -32,7 +32,8 @@ class OverflowListFoundation extends BaseFoundation {
32
32
  if (!this.isScrollMode()) {
33
33
  return overflow;
34
34
  }
35
- const visibleStateArr = items.map(_ref => {
35
+ const cloneItems = copy(items);
36
+ const visibleStateArr = cloneItems.map(_ref => {
36
37
  let {
37
38
  key
38
39
  } = _ref;
@@ -41,8 +42,8 @@ class OverflowListFoundation extends BaseFoundation {
41
42
  const visibleStart = visibleStateArr.indexOf(true);
42
43
  const visibleEnd = visibleStateArr.lastIndexOf(true);
43
44
  const overflowList = [];
44
- overflowList[0] = visibleStart >= 0 ? items.slice(0, visibleStart) : [];
45
- overflowList[1] = visibleEnd >= 0 ? items.slice(visibleEnd + 1, items.length) : items;
45
+ overflowList[0] = visibleStart >= 0 ? cloneItems.slice(0, visibleStart) : [];
46
+ overflowList[1] = visibleEnd >= 0 ? cloneItems.slice(visibleEnd + 1, cloneItems.length) : cloneItems;
46
47
  return overflowList;
47
48
  }
48
49
  handleIntersect(entries) {
@@ -302,7 +302,12 @@ export default class SliderFoundation extends BaseFoundation {
302
302
  };
303
303
  })();
304
304
  if (Array.isArray(inputValue)) {
305
- return [transWay(inputValue[0]), transWay(inputValue[1])];
305
+ const min = transWay(inputValue[0]);
306
+ const max = transWay(inputValue[1]);
307
+ if (min > max) {
308
+ return this.getState("focusPos") === "min" ? [max, max] : [min, min];
309
+ }
310
+ return [min, max];
306
311
  } else {
307
312
  return transWay(inputValue);
308
313
  }
@@ -1,3 +1,5 @@
1
1
  $transition_duration-table_body-bg: var(--semi-transition_duration-none); // 表格-背景颜色-动画持续时间
2
2
  $transition_function-table_body-bg: var(--semi-transition_function-easeOut); // 表格-背景颜色-过渡曲线
3
3
  $transition_delay-table_body-bg: 0ms; // 表格-背景颜色-延迟时间
4
+ $transition_duration-table_row-head-bg: 0.1s; // 表格-行头-背景颜色-动画持续时间
5
+ $transition_function-table_row-head-bg: linear; // 表格-行头-背景颜色-过渡曲线
@@ -134,6 +134,16 @@
134
134
  vertical-align: middle;
135
135
  overflow-wrap: break-word;
136
136
  position: relative;
137
+ transition: background-color 0.1s linear;
138
+ }
139
+ .semi-table-thead > .semi-table-row > .semi-table-row-head.semi-table-row-head-clickSort {
140
+ cursor: pointer;
141
+ }
142
+ .semi-table-thead > .semi-table-row > .semi-table-row-head.semi-table-row-head-clickSort:hover {
143
+ background: var(--semi-color-fill-0);
144
+ }
145
+ .semi-table-thead > .semi-table-row > .semi-table-row-head.semi-table-row-head-clickSort:hover.semi-table-cell-fixed-left::before, .semi-table-thead > .semi-table-row > .semi-table-row-head.semi-table-row-head-clickSort:hover.semi-table-cell-fixed-right::before {
146
+ background-color: transparent;
137
147
  }
138
148
  .semi-table-thead > .semi-table-row > .semi-table-row-head.semi-table-cell-fixed-left, .semi-table-thead > .semi-table-row > .semi-table-row-head.semi-table-cell-fixed-right {
139
149
  z-index: 101;
@@ -140,6 +140,23 @@ $module: #{$prefix}-table;
140
140
  // word-break: break-all;
141
141
  // word-wrap: break-word;
142
142
  position: relative;
143
+ transition: background-color $transition_duration-table_row-head-bg $transition_function-table_row-head-bg;
144
+
145
+ &.#{$module}-row-head-clickSort {
146
+ cursor: pointer;
147
+ &:hover {
148
+ background: $color-table_th-clickSort-bg-hover;
149
+
150
+ &.#{$module}-cell-fixed {
151
+ &-left,
152
+ &-right {
153
+ &::before {
154
+ background-color: transparent;
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }
143
160
 
144
161
  &.#{$module}-cell-fixed {
145
162
  &-left,
@@ -57,6 +57,7 @@ $color-table_shadow-border-default: var(--semi-color-border); // 表格拟阴影
57
57
  $color-table_th-bg-default: var(--semi-color-bg-1); // 表头背景色
58
58
  $color-table_th-border-default: var(--semi-color-border); // 表头底部分割线颜色
59
59
  $color-table_th-text-default: var(--semi-color-text-2); // 表头文字颜色
60
+ $color-table_th-clickSort-bg-hover: var(--semi-color-fill-0); //点击表头触发排序背景色 - 悬浮
60
61
 
61
62
  $color-table_pl-bg-default: transparent;
62
63
  $color-table_body-bg-default: var(--semi-color-bg-1); // 表格背景颜色 - 默认
@@ -4,6 +4,7 @@ declare const cssClasses: {
4
4
  TABS_BAR_LINE: string;
5
5
  TABS_BAR_CARD: string;
6
6
  TABS_BAR_BUTTON: string;
7
+ TABS_BAR_SLASH: string;
7
8
  TABS_BAR_EXTRA: string;
8
9
  TABS_TAB: string;
9
10
  TABS_TAB_ACTIVE: string;
@@ -5,6 +5,7 @@ const cssClasses = {
5
5
  TABS_BAR_LINE: `${BASE_CLASS_PREFIX}-tabs-bar-line`,
6
6
  TABS_BAR_CARD: `${BASE_CLASS_PREFIX}-tabs-bar-card`,
7
7
  TABS_BAR_BUTTON: `${BASE_CLASS_PREFIX}-tabs-bar-button`,
8
+ TABS_BAR_SLASH: `${BASE_CLASS_PREFIX}-tabs-bar-slash`,
8
9
  TABS_BAR_EXTRA: `${BASE_CLASS_PREFIX}-tabs-bar-extra`,
9
10
  TABS_TAB: `${BASE_CLASS_PREFIX}-tabs-tab`,
10
11
  TABS_TAB_ACTIVE: `${BASE_CLASS_PREFIX}-tabs-tab-active`,
@@ -26,7 +27,7 @@ const numbers = {
26
27
  DEFAULT_ACTIVE_KEY: 1
27
28
  };
28
29
  const strings = {
29
- TYPE_MAP: ['line', 'card', 'button'],
30
+ TYPE_MAP: ['line', 'card', 'button', 'slash'],
30
31
  SIZE: ['small', 'medium', 'large'],
31
32
  POSITION_MAP: ['top', 'left']
32
33
  };
@@ -135,18 +135,27 @@
135
135
  margin-left: 10px;
136
136
  cursor: pointer;
137
137
  }
138
+ .semi-tabs-tab-single.semi-tabs-tab .semi-icon.semi-tabs-tab-icon-close.semi-icon-close:hover {
139
+ color: var(--semi-color-text-0);
140
+ }
138
141
  .semi-tabs-tab-single.semi-tabs-tab:hover {
139
142
  color: var(--semi-color-text-0);
140
143
  }
141
144
  .semi-tabs-tab-single.semi-tabs-tab:hover .semi-icon:not(.semi-icon-checkbox_tick, .semi-icon-radio, .semi-icon-checkbox_indeterminate) {
142
145
  color: var(--semi-color-text-0);
143
146
  }
147
+ .semi-tabs-tab-single.semi-tabs-tab:hover .semi-icon.semi-tabs-tab-icon-close {
148
+ color: var(--semi-color-text-2);
149
+ }
144
150
  .semi-tabs-tab-single.semi-tabs-tab:active {
145
151
  color: var(--semi-color-text-0);
146
152
  }
147
153
  .semi-tabs-tab-single.semi-tabs-tab:active .semi-icon:not(.semi-icon-checkbox_tick, .semi-icon-radio, .semi-icon-checkbox_indeterminate) {
148
154
  color: var(--semi-color-text-0);
149
155
  }
156
+ .semi-tabs-tab-single.semi-tabs-tab:active .semi-icon.semi-tabs-tab-icon-close {
157
+ color: var(--semi-color-text-2);
158
+ }
150
159
  .semi-tabs-tab-single.semi-tabs-tab-active, .semi-tabs-tab-single.semi-tabs-tab-active:hover {
151
160
  cursor: default;
152
161
  font-weight: 600;
@@ -424,6 +433,26 @@
424
433
  border: none;
425
434
  background-color: var(--semi-color-primary-light-default);
426
435
  }
436
+ .semi-tabs-bar-slash .semi-tabs-tab {
437
+ padding: 12px 0px;
438
+ }
439
+ .semi-tabs-bar-slash .semi-tabs-tab:nth-of-type(1) {
440
+ padding-left: 0;
441
+ }
442
+ .semi-tabs-bar-slash .semi-tabs-tab:not(:last-of-type) {
443
+ margin-right: 16px;
444
+ }
445
+ .semi-tabs-bar-slash .semi-tabs-tab:not(:last-of-type):after {
446
+ content: "";
447
+ margin-left: 16px;
448
+ display: inline-block;
449
+ height: 14px;
450
+ width: 8px;
451
+ margin-top: 3px;
452
+ margin-bottom: 3px;
453
+ vertical-align: bottom;
454
+ background: linear-gradient(to bottom right, transparent 0%, transparent calc(50% - 1px), var(--semi-color-text-2) 50%, transparent calc(50% + 1px), transparent 100%);
455
+ }
427
456
  .semi-tabs-content {
428
457
  width: 100%;
429
458
  padding: 5px 0;