@douyinfe/semi-foundation 2.97.0 → 2.99.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 (180) hide show
  1. package/cascader/foundation.ts +3 -1
  2. package/codeHighlight/codeHighlight.scss +1 -1
  3. package/datePicker/foundation.ts +7 -0
  4. package/datePicker/inputFoundation.ts +5 -0
  5. package/form/foundation.ts +50 -4
  6. package/inputNumber/foundation.ts +119 -3
  7. package/jsonViewer/jsonViewer.scss +2 -2
  8. package/lib/cjs/aiChatInput/aiChatInput.css +7 -7
  9. package/lib/cjs/anchor/anchor.css +3 -3
  10. package/lib/cjs/autoComplete/autoComplete.css +1 -1
  11. package/lib/cjs/avatar/avatar.css +5 -5
  12. package/lib/cjs/badge/badge.css +1 -1
  13. package/lib/cjs/breadcrumb/breadcrumb.css +2 -2
  14. package/lib/cjs/calendar/calendar.css +9 -9
  15. package/lib/cjs/cascader/cascader.css +6 -6
  16. package/lib/cjs/cascader/foundation.js +4 -1
  17. package/lib/cjs/checkbox/checkbox.css +2 -2
  18. package/lib/cjs/codeHighlight/codeHighlight.css +1 -1
  19. package/lib/cjs/codeHighlight/codeHighlight.scss +1 -1
  20. package/lib/cjs/collapse/collapse.css +2 -2
  21. package/lib/cjs/datePicker/datePicker.css +8 -8
  22. package/lib/cjs/datePicker/foundation.d.ts +5 -0
  23. package/lib/cjs/datePicker/foundation.js +2 -0
  24. package/lib/cjs/datePicker/inputFoundation.d.ts +5 -0
  25. package/lib/cjs/descriptions/descriptions.css +6 -6
  26. package/lib/cjs/dropdown/dropdown.css +2 -2
  27. package/lib/cjs/form/form.css +4 -4
  28. package/lib/cjs/form/foundation.js +51 -3
  29. package/lib/cjs/hotKeys/hotKeys.css +2 -2
  30. package/lib/cjs/image/image.css +2 -2
  31. package/lib/cjs/input/input.css +8 -8
  32. package/lib/cjs/input/textarea.css +2 -2
  33. package/lib/cjs/inputNumber/foundation.d.ts +15 -0
  34. package/lib/cjs/inputNumber/foundation.js +113 -3
  35. package/lib/cjs/jsonViewer/jsonViewer.css +2 -2
  36. package/lib/cjs/jsonViewer/jsonViewer.scss +2 -2
  37. package/lib/cjs/list/list.css +1 -1
  38. package/lib/cjs/modal/modal.css +1 -1
  39. package/lib/cjs/navigation/navigation.css +2 -2
  40. package/lib/cjs/notification/notification.css +4 -4
  41. package/lib/cjs/pagination/pagination.css +5 -5
  42. package/lib/cjs/popconfirm/popconfirm.css +1 -1
  43. package/lib/cjs/popover/popover.css +5 -5
  44. package/lib/cjs/radio/radio.css +2 -2
  45. package/lib/cjs/scrollList/itemFoundation.js +12 -0
  46. package/lib/cjs/scrollList/scrollList.css +2 -2
  47. package/lib/cjs/select/select.css +6 -6
  48. package/lib/cjs/sideSheet/sideSheet.css +2 -2
  49. package/lib/cjs/sidebar/sidebar.css +11 -11
  50. package/lib/cjs/slider/foundation.js +46 -12
  51. package/lib/cjs/slider/rtl.scss +62 -0
  52. package/lib/cjs/slider/slider.css +45 -0
  53. package/lib/cjs/slider/slider.scss +2 -0
  54. package/lib/cjs/steps/steps.css +11 -11
  55. package/lib/cjs/table/foundation.d.ts +36 -0
  56. package/lib/cjs/table/foundation.js +162 -28
  57. package/lib/cjs/table/rtl.scss +21 -0
  58. package/lib/cjs/table/table.css +38 -2
  59. package/lib/cjs/table/table.scss +49 -0
  60. package/lib/cjs/tabs/tabs.css +2 -2
  61. package/lib/cjs/tag/tag.css +2 -2
  62. package/lib/cjs/tagInput/tagInput.css +2 -2
  63. package/lib/cjs/timePicker/timePicker.css +1 -1
  64. package/lib/cjs/timeline/timeline.css +2 -2
  65. package/lib/cjs/toast/toast.css +1 -1
  66. package/lib/cjs/tooltip/arrow.scss +4 -4
  67. package/lib/cjs/tooltip/foundation.js +72 -5
  68. package/lib/cjs/tooltip/tooltip.css +5 -5
  69. package/lib/cjs/transfer/constants.d.ts +3 -1
  70. package/lib/cjs/transfer/constants.js +3 -1
  71. package/lib/cjs/transfer/foundation.d.ts +3 -0
  72. package/lib/cjs/transfer/foundation.js +4 -0
  73. package/lib/cjs/transfer/transfer.css +14 -5
  74. package/lib/cjs/transfer/transfer.scss +10 -0
  75. package/lib/cjs/tree/foundation.d.ts +3 -0
  76. package/lib/cjs/tree/foundation.js +31 -4
  77. package/lib/cjs/tree/tree.css +1 -1
  78. package/lib/cjs/treeSelect/foundation.d.ts +1 -0
  79. package/lib/cjs/treeSelect/foundation.js +8 -1
  80. package/lib/cjs/treeSelect/treeSelect.css +36 -4
  81. package/lib/cjs/treeSelect/treeSelect.scss +49 -1
  82. package/lib/cjs/typography/typography.css +8 -8
  83. package/lib/cjs/upload/upload.css +8 -8
  84. package/lib/cjs/utils/Store.d.ts +1 -1
  85. package/lib/cjs/utils/Store.js +1 -0
  86. package/lib/es/aiChatInput/aiChatInput.css +7 -7
  87. package/lib/es/anchor/anchor.css +3 -3
  88. package/lib/es/autoComplete/autoComplete.css +1 -1
  89. package/lib/es/avatar/avatar.css +5 -5
  90. package/lib/es/badge/badge.css +1 -1
  91. package/lib/es/breadcrumb/breadcrumb.css +2 -2
  92. package/lib/es/calendar/calendar.css +9 -9
  93. package/lib/es/cascader/cascader.css +6 -6
  94. package/lib/es/cascader/foundation.js +4 -1
  95. package/lib/es/checkbox/checkbox.css +2 -2
  96. package/lib/es/codeHighlight/codeHighlight.css +1 -1
  97. package/lib/es/codeHighlight/codeHighlight.scss +1 -1
  98. package/lib/es/collapse/collapse.css +2 -2
  99. package/lib/es/datePicker/datePicker.css +8 -8
  100. package/lib/es/datePicker/foundation.d.ts +5 -0
  101. package/lib/es/datePicker/foundation.js +2 -0
  102. package/lib/es/datePicker/inputFoundation.d.ts +5 -0
  103. package/lib/es/descriptions/descriptions.css +6 -6
  104. package/lib/es/dropdown/dropdown.css +2 -2
  105. package/lib/es/form/form.css +4 -4
  106. package/lib/es/form/foundation.js +51 -3
  107. package/lib/es/hotKeys/hotKeys.css +2 -2
  108. package/lib/es/image/image.css +2 -2
  109. package/lib/es/input/input.css +8 -8
  110. package/lib/es/input/textarea.css +2 -2
  111. package/lib/es/inputNumber/foundation.d.ts +15 -0
  112. package/lib/es/inputNumber/foundation.js +113 -3
  113. package/lib/es/jsonViewer/jsonViewer.css +2 -2
  114. package/lib/es/jsonViewer/jsonViewer.scss +2 -2
  115. package/lib/es/list/list.css +1 -1
  116. package/lib/es/modal/modal.css +1 -1
  117. package/lib/es/navigation/navigation.css +2 -2
  118. package/lib/es/notification/notification.css +4 -4
  119. package/lib/es/pagination/pagination.css +5 -5
  120. package/lib/es/popconfirm/popconfirm.css +1 -1
  121. package/lib/es/popover/popover.css +5 -5
  122. package/lib/es/radio/radio.css +2 -2
  123. package/lib/es/scrollList/itemFoundation.js +12 -0
  124. package/lib/es/scrollList/scrollList.css +2 -2
  125. package/lib/es/select/select.css +6 -6
  126. package/lib/es/sideSheet/sideSheet.css +2 -2
  127. package/lib/es/sidebar/sidebar.css +11 -11
  128. package/lib/es/slider/foundation.js +46 -12
  129. package/lib/es/slider/rtl.scss +62 -0
  130. package/lib/es/slider/slider.css +45 -0
  131. package/lib/es/slider/slider.scss +2 -0
  132. package/lib/es/steps/steps.css +11 -11
  133. package/lib/es/table/foundation.d.ts +36 -0
  134. package/lib/es/table/foundation.js +162 -28
  135. package/lib/es/table/rtl.scss +21 -0
  136. package/lib/es/table/table.css +38 -2
  137. package/lib/es/table/table.scss +49 -0
  138. package/lib/es/tabs/tabs.css +2 -2
  139. package/lib/es/tag/tag.css +2 -2
  140. package/lib/es/tagInput/tagInput.css +2 -2
  141. package/lib/es/timePicker/timePicker.css +1 -1
  142. package/lib/es/timeline/timeline.css +2 -2
  143. package/lib/es/toast/toast.css +1 -1
  144. package/lib/es/tooltip/arrow.scss +4 -4
  145. package/lib/es/tooltip/foundation.js +72 -5
  146. package/lib/es/tooltip/tooltip.css +5 -5
  147. package/lib/es/transfer/constants.d.ts +3 -1
  148. package/lib/es/transfer/constants.js +3 -1
  149. package/lib/es/transfer/foundation.d.ts +3 -0
  150. package/lib/es/transfer/foundation.js +4 -0
  151. package/lib/es/transfer/transfer.css +14 -5
  152. package/lib/es/transfer/transfer.scss +10 -0
  153. package/lib/es/tree/foundation.d.ts +3 -0
  154. package/lib/es/tree/foundation.js +31 -4
  155. package/lib/es/tree/tree.css +1 -1
  156. package/lib/es/treeSelect/foundation.d.ts +1 -0
  157. package/lib/es/treeSelect/foundation.js +8 -1
  158. package/lib/es/treeSelect/treeSelect.css +36 -4
  159. package/lib/es/treeSelect/treeSelect.scss +49 -1
  160. package/lib/es/typography/typography.css +8 -8
  161. package/lib/es/upload/upload.css +8 -8
  162. package/lib/es/utils/Store.d.ts +1 -1
  163. package/lib/es/utils/Store.js +1 -0
  164. package/package.json +19 -4
  165. package/scrollList/itemFoundation.ts +12 -0
  166. package/slider/foundation.ts +55 -15
  167. package/slider/rtl.scss +62 -0
  168. package/slider/slider.scss +2 -0
  169. package/table/foundation.ts +197 -29
  170. package/table/rtl.scss +21 -0
  171. package/table/table.scss +49 -0
  172. package/tooltip/arrow.scss +4 -4
  173. package/tooltip/foundation.ts +86 -5
  174. package/transfer/constants.ts +3 -1
  175. package/transfer/foundation.ts +8 -1
  176. package/transfer/transfer.scss +10 -0
  177. package/tree/foundation.ts +34 -5
  178. package/treeSelect/foundation.ts +10 -1
  179. package/treeSelect/treeSelect.scss +49 -1
  180. package/utils/Store.ts +2 -1
@@ -650,7 +650,9 @@ export default class CascaderFoundation extends BaseFoundation<CascaderAdapter,
650
650
  } else if (selectedKeys.size && !multiple) {
651
651
  inputValue = this.renderDisplayText([...selectedKeys][0]);
652
652
  }
653
- this._adapter.updateStates({ inputValue });
653
+ // Reset isSearching immediately in close() instead of relying on afterClose callback
654
+ // This prevents timing issues where open() clears inputValue but isSearching is still true
655
+ this._adapter.updateStates({ inputValue, isSearching: false });
654
656
  !multiple && this.toggle2SearchInput(false);
655
657
  !multiple && this._adapter.updateFocusState(false);
656
658
  }
@@ -16,7 +16,7 @@ $module: #{$prefix}-codeHighlight;
16
16
  font-size: 13px;
17
17
  text-shadow: none;
18
18
  // font-family: 'Inconsolata', Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
19
- font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
19
+ font-family: ui-monospace, 'SFMono-Regular', 'SF Mono', Menlo, Monaco, Consolas, 'Liberation Mono', 'DejaVu Sans Mono', 'Courier New', monospace;
20
20
  direction: ltr;
21
21
  text-align: left;
22
22
  white-space: pre;
@@ -168,6 +168,11 @@ export interface DatePickerFoundationProps extends ElementProps, RenderProps, Ev
168
168
  dateFnsLocale?: any;
169
169
  localeCode?: string;
170
170
  rangeSeparator?: string;
171
+ /**
172
+ * Only for UI render. Keep `semi-foundation` framework-agnostic (no React types).
173
+ * `semi-ui` layer should declare this as `React.ReactNode`.
174
+ */
175
+ rangeSeparatorNode?: any;
171
176
  insetInput?: DateInputFoundationProps['insetInput'];
172
177
  preventScroll?: boolean
173
178
  }
@@ -1265,6 +1270,8 @@ export default class DatePickerFoundation extends BaseFoundation<DatePickerAdapt
1265
1270
  _isRangeValueComplete = (value: Date[] | Date) => {
1266
1271
  let result = false;
1267
1272
  if (Array.isArray(value)) {
1273
+ // Note: empty array should be treated as "complete" (not partially selected)
1274
+ // to keep behaviors such as clear/confirm/change consistent.
1268
1275
  result = !value.some(date => isNullOrUndefined(date));
1269
1276
  }
1270
1277
  return result;
@@ -61,6 +61,11 @@ export interface DateInputFoundationProps extends DateInputElementProps, DateInp
61
61
  validateStatus?: ValidateStatus;
62
62
  prefixCls?: string;
63
63
  rangeSeparator?: string;
64
+ /**
65
+ * Only for UI render. Keep `semi-foundation` framework-agnostic (no React types).
66
+ * `semi-ui` layer should declare this as `React.ReactNode`.
67
+ */
68
+ rangeSeparatorNode?: any;
64
69
  panelType?: PanelType;
65
70
  insetInput?: boolean | InsetInputProps;
66
71
  insetInputValue?: InsetInputValue;
@@ -94,14 +94,58 @@ export default class FormFoundation extends BaseFoundation<BaseFormAdapter> {
94
94
  const registered = this.registered[field];
95
95
  this.registered[field] = true;
96
96
  this.fields.set(field, fieldStuff);
97
- if (fieldStuff.keepState) {
98
- // TODO support keepState
97
+ if (fieldStuff.keepState && registered) {
98
+ // When keepState is true and the field was previously registered (remounting),
99
+ // restore the saved state from formState instead of using the initial value
100
+ const hasSavedValue = ObjectUtil.has(this.data.values, field);
101
+ const savedValue = ObjectUtil.get(this.data.values, field);
102
+ const hasSavedError = ObjectUtil.has(this.data.errors, field);
103
+ const savedError = ObjectUtil.get(this.data.errors, field);
104
+ const hasSavedTouched = ObjectUtil.has(this.data.touched, field);
105
+ const savedTouched = ObjectUtil.get(this.data.touched, field);
106
+
107
+ const allowEmpty = fieldStuff.allowEmpty || false;
108
+ const opts: CallOpts = {
109
+ notNotify: true,
110
+ notUpdate: false,
111
+ // updateStateValue reads `fieldAllowEmpty` (field-level override)
112
+ fieldAllowEmpty: allowEmpty,
113
+ };
114
+
115
+ // Restore value from formState if it exists
116
+ if (hasSavedValue) {
117
+ // Keep formState as source of truth; still trigger a forceUpdate so that
118
+ // consumers of formState can get the latest snapshot when field remounts.
119
+ this.updateStateValue(field, savedValue, opts);
120
+ // Sync the restored value back to the field component's local state.
121
+ // Avoid a second forceUpdate/notify from FieldApi.
122
+ fieldStuff.fieldApi.setValue(savedValue, { ...opts, notUpdate: true });
123
+ } else {
124
+ // No saved value, use initial value
125
+ let fieldValue = fieldState.value;
126
+ if (!allowEmpty && fieldValue === '') {
127
+ fieldValue = undefined;
128
+ }
129
+ this.updateStateValue(field, fieldValue, opts);
130
+ }
131
+
132
+ // Restore error from formState if it exists
133
+ if (hasSavedError) {
134
+ this.updateStateError(field, savedError, opts);
135
+ fieldStuff.fieldApi.setError(savedError, { ...opts, notUpdate: true });
136
+ }
137
+
138
+ // Restore touched from formState if it exists
139
+ if (hasSavedTouched) {
140
+ this.updateStateTouched(field, savedTouched, opts);
141
+ fieldStuff.fieldApi.setTouched(savedTouched, { ...opts, notUpdate: true });
142
+ }
99
143
  } else {
100
144
  const allowEmpty = fieldStuff.allowEmpty || false;
101
- const opts = {
145
+ const opts: CallOpts = {
102
146
  notNotify: true,
103
147
  notUpdate: false,
104
- allowEmpty,
148
+ fieldAllowEmpty: allowEmpty,
105
149
  };
106
150
  let fieldValue = fieldState.value;
107
151
  // When allowEmpty is false, 'is equivalent to undefined, and the key of the field does not need to be reflected on values
@@ -476,6 +520,8 @@ export default class FormFoundation extends BaseFoundation<BaseFormAdapter> {
476
520
  const formAllowEmpty = this.getProp('allowEmpty');
477
521
 
478
522
  // priority at Field level
523
+ // NOTE: Keep legacy semantics here to avoid implicit breaking changes.
524
+ // (Field-level allowEmpty overriding behavior is handled during register/restore paths.)
479
525
  const allowEmpty = fieldAllowEmpty ? fieldAllowEmpty : formAllowEmpty;
480
526
 
481
527
  ObjectUtil.set(this.data.values, field, value, allowEmpty);
@@ -164,8 +164,18 @@ class InputNumberFoundation extends BaseFoundation<InputNumberAdapter> {
164
164
  const value = this.getState('value');
165
165
 
166
166
  if (value !== '') {
167
- // let parsedStr = this.doParse(this.getState('value'));
168
- // this._adapter.setValue(Number(parsedStr));
167
+ // When scientific notation is enabled, convert to full number on focus
168
+ if (this._isScientificNotation() && !this._isCurrency()) {
169
+ const strVal = toString(value);
170
+ const isScientificStr = /e/i.test(strVal) && /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)[eE][+-]?\d+$/.test(strVal.trim());
171
+ if (isScientificStr) {
172
+ const parsedNum = this.doParse(strVal, false, false, false);
173
+ if (this.isValidNumber(parsedNum)) {
174
+ const fullNumberStr = this.doFormat(parsedNum, true, false);
175
+ this._adapter.setValue(fullNumberStr);
176
+ }
177
+ }
178
+ }
169
179
  }
170
180
  this._adapter.recordCursorPosition();
171
181
  this._adapter.setFocusing(true, null);
@@ -284,6 +294,36 @@ class InputNumberFoundation extends BaseFoundation<InputNumberAdapter> {
284
294
  numHasChanged = true;
285
295
  }
286
296
 
297
+ // Fix issue #38: When input contains non-numeric characters (e.g., "1000CNY"),
298
+ // doParse returns NaN, but we should still apply max/min limit if a number
299
+ // can be extracted from the input or if currentNumber is out of range.
300
+ if (!this.isValidNumber(parsedNum)) {
301
+ // Try to extract a number from the input using parseFloat
302
+ // (parseFloat can extract numbers from strings like "1000CNY" -> 1000)
303
+ const extractedNum = parseFloat(currentValue);
304
+ if (!isNaN(extractedNum)) {
305
+ const limitedNum = this.fetchMinOrMax(extractedNum);
306
+ if (limitedNum !== currentNumber) {
307
+ willSetNum = limitedNum;
308
+ if (!this.isControlled()) {
309
+ currentNumber = willSetNum;
310
+ }
311
+ numHasChanged = true;
312
+ }
313
+ } else if (typeof currentNumber === 'number' && !isNaN(currentNumber)) {
314
+ // If we can't extract a number but currentNumber exists and is out of range,
315
+ // apply the max/min limit to currentNumber
316
+ const limitedNum = this.fetchMinOrMax(currentNumber);
317
+ if (limitedNum !== currentNumber) {
318
+ willSetNum = limitedNum;
319
+ if (!this.isControlled()) {
320
+ currentNumber = willSetNum;
321
+ }
322
+ numHasChanged = true;
323
+ }
324
+ }
325
+ }
326
+
287
327
  const currentFormattedNum = this.doFormat(currentNumber, true, true);
288
328
 
289
329
  if (currentFormattedNum !== currentValue) {
@@ -475,7 +515,11 @@ class InputNumberFoundation extends BaseFoundation<InputNumberAdapter> {
475
515
 
476
516
  // console.log('scale: ', scale, 'curNum: ', curNum);
477
517
 
478
- return this.doFormat(curNum, true, true);
518
+ // NOTE:
519
+ // In non-currency mode, `needAdjustCurrency=true` is used by blur/init formatting paths.
520
+ // Step operations often happen while focused, and should keep full-number display.
521
+ // Currency mode still needs `needAdjustCurrency=true` to format currency strings.
522
+ return this.doFormat(curNum, true, this._isCurrency());
479
523
  }
480
524
 
481
525
  minus(step?: number, event?: any): string {
@@ -526,6 +570,54 @@ class InputNumberFoundation extends BaseFoundation<InputNumberAdapter> {
526
570
  return showCurrencySymbol ? formatted : formatted.replace(this._currencySymbol, '').trim();
527
571
  }
528
572
 
573
+ /**
574
+ * Check if scientific notation is enabled
575
+ */
576
+ _isScientificNotation() {
577
+ const { scientificNotation } = this.getProps();
578
+ return scientificNotation === true || (typeof scientificNotation === 'object' && scientificNotation !== null);
579
+ }
580
+
581
+ /**
582
+ * Get scientific notation threshold
583
+ * @returns {number} threshold for digit count
584
+ */
585
+ _getScientificNotationThreshold() {
586
+ const { scientificNotation } = this.getProps();
587
+ if (typeof scientificNotation === 'object' && scientificNotation !== null) {
588
+ const t = (scientificNotation as any).threshold;
589
+ return typeof t === 'number' && Number.isFinite(t) && t >= 1 ? t : 15;
590
+ }
591
+ return 15; // Default threshold: 15 digits
592
+ }
593
+
594
+ /**
595
+ * Convert number to scientific notation if exceeds threshold
596
+ * @param {number} num
597
+ * @returns {string}
598
+ */
599
+ _toScientificNotation(num: number): string {
600
+ const threshold = this._getScientificNotationThreshold();
601
+ const absNum = Math.abs(num);
602
+ const numStr = String(absNum);
603
+
604
+ // Count significant digits (excluding decimal point, sign, exponent symbol and leading zeros)
605
+ // If JS already stringifies it with exponent (contains e/E), it is eligible for scientific notation display.
606
+ const hasExp = /e/i.test(numStr);
607
+ const significantDigits = numStr.replace(/[.\-+eE]/g, '').replace(/^0+/, '');
608
+
609
+ // Check if number exceeds threshold
610
+ if ((hasExp || significantDigits.length >= threshold) && absNum !== 0) {
611
+ // Prefer preserving coefficient digits up to threshold (total significant digits = fractionDigits + 1)
612
+ const fractionDigits = Math.max(0, Math.min(100, Math.floor(threshold) - 1));
613
+ const exp = num.toExponential(fractionDigits);
614
+ // Remove trailing zeros in the coefficient
615
+ return exp.replace(/(\.\d*?)0+e/, '$1e').replace(/\.e/, 'e');
616
+ }
617
+
618
+ return String(num);
619
+ }
620
+
529
621
  /**
530
622
  * format number to string
531
623
  * @param {string|number} value
@@ -547,6 +639,16 @@ class InputNumberFoundation extends BaseFoundation<InputNumberAdapter> {
547
639
  } else {
548
640
  str = toString(value);
549
641
  }
642
+
643
+ // Apply scientific notation for long numbers in blur state
644
+ // needAdjustCurrency indicates blur state (when true, we're formatting for display after blur)
645
+ if (this._isScientificNotation() && needAdjustCurrency && !this._isCurrency()) {
646
+ const numValue = typeof value === 'number' ? value : parseFloat(str);
647
+ if (!isNaN(numValue) && isFinite(numValue)) {
648
+ str = this._toScientificNotation(numValue);
649
+ }
650
+ }
651
+
550
652
  if (typeof formatter === 'function') {
551
653
  str = formatter(str);
552
654
  }
@@ -616,6 +718,20 @@ class InputNumberFoundation extends BaseFoundation<InputNumberAdapter> {
616
718
  value = typeof parsedValue === 'number' ? toString(parsedValue) : parsedValue as string;
617
719
  }
618
720
 
721
+ // Support scientific notation parsing (e.g., "1.23e+15", "1.23E-10", ".5e3", "1.e3")
722
+ if (typeof value === 'string' && /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)[eE][+-]?\d+$/.test(value.trim())) {
723
+ const scientificNum = parseFloat(value.trim());
724
+ if (!isNaN(scientificNum)) {
725
+ if (needAdjustMaxMin) {
726
+ return this.fetchMinOrMax(scientificNum);
727
+ }
728
+ if (needAdjustPrec) {
729
+ return toNumber(this._adjustPrec(scientificNum));
730
+ }
731
+ return scientificNum;
732
+ }
733
+ }
734
+
619
735
  if (needCheckPrec && typeof value === 'string') {
620
736
  const zeroIsValid =
621
737
  value.indexOf('.') === -1 ||
@@ -64,7 +64,7 @@ $module: #{$prefix}-json-viewer;
64
64
  }
65
65
 
66
66
  &-view-line {
67
- font-family: Menlo, Firecode, Monaco, 'Courier New', monospace;
67
+ font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, 'Fira Code', Consolas, 'Liberation Mono', 'DejaVu Sans Mono', 'Courier New', monospace;
68
68
  font-weight: normal;
69
69
  font-size: 12px;
70
70
  font-feature-settings: 'liga' 0, 'calt' 0;
@@ -76,7 +76,7 @@ $module: #{$prefix}-json-viewer;
76
76
  }
77
77
 
78
78
  &-line-number {
79
- font-family: Menlo, Firecode, Monaco, 'Courier New', monospace;
79
+ font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, 'Fira Code', Consolas, 'Liberation Mono', 'DejaVu Sans Mono', 'Courier New', monospace;
80
80
  font-weight: normal;
81
81
  font-size: 12px;
82
82
  font-feature-settings: 'liga' 0, 'calt' 0;
@@ -36,7 +36,7 @@
36
36
  color: var(--semi-color-text-0);
37
37
  font-size: 14px;
38
38
  line-height: 20px;
39
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
39
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
40
40
  }
41
41
  .semi-aiChatInput-suggestion-item-active {
42
42
  background-color: var(--semi-color-fill-0);
@@ -81,7 +81,7 @@
81
81
  margin-bottom: 8px;
82
82
  font-size: 12px;
83
83
  line-height: 16px;
84
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
84
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
85
85
  color: var(--semi-color-text-2);
86
86
  column-gap: 4px;
87
87
  row-gap: 4px;
@@ -243,7 +243,7 @@
243
243
  padding: 8px 16px 0px;
244
244
  font-size: 12px;
245
245
  line-height: 16px;
246
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
246
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
247
247
  height: 16px;
248
248
  align-items: center;
249
249
  display: flex;
@@ -259,7 +259,7 @@
259
259
  height: fit-content;
260
260
  font-size: 12px;
261
261
  line-height: 16px;
262
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
262
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
263
263
  }
264
264
  .semi-aiChatInput-attachment {
265
265
  position: relative;
@@ -304,7 +304,7 @@
304
304
  color: var(--semi-color-text-0);
305
305
  font-size: 12px;
306
306
  line-height: 16px;
307
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
307
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
308
308
  font-weight: 600;
309
309
  }
310
310
  .semi-aiChatInput-attachment-content-size {
@@ -315,7 +315,7 @@
315
315
  color: var(--semi-color-text-2);
316
316
  font-size: 12px;
317
317
  line-height: 16px;
318
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
318
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
319
319
  text-transform: uppercase;
320
320
  }
321
321
  .semi-aiChatInput-attachment-delete {
@@ -467,7 +467,7 @@
467
467
  .semi-aiChatInput-editor-content .tiptap .select-slot {
468
468
  font-size: 14px;
469
469
  line-height: 20px;
470
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
470
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
471
471
  height: 24px;
472
472
  padding: 2px 4px;
473
473
  border-radius: 4px;
@@ -4,7 +4,7 @@
4
4
  .semi-anchor {
5
5
  font-size: 14px;
6
6
  line-height: 20px;
7
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
7
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
8
8
  overflow-y: auto;
9
9
  overflow-x: hidden;
10
10
  position: relative;
@@ -12,7 +12,7 @@
12
12
  .semi-anchor-size-small {
13
13
  font-size: 12px;
14
14
  line-height: 16px;
15
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
15
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
16
16
  }
17
17
  .semi-anchor-slide {
18
18
  position: absolute;
@@ -95,7 +95,7 @@
95
95
  .semi-anchor-link-tooltip-small {
96
96
  font-size: 12px;
97
97
  line-height: 16px;
98
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
98
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
99
99
  }
100
100
  .semi-anchor-link-tooltip:hover {
101
101
  color: var(--semi-color-tertiary-hover) !important;
@@ -4,7 +4,7 @@
4
4
  .semi-autocomplete-option {
5
5
  font-size: 14px;
6
6
  line-height: 20px;
7
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
7
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
8
8
  word-break: break-all;
9
9
  padding-left: 12px;
10
10
  padding-right: 12px;
@@ -25,7 +25,7 @@
25
25
  align-items: center;
26
26
  font-size: 14px;
27
27
  line-height: 20px;
28
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
28
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
29
29
  font-weight: 600;
30
30
  }
31
31
  .semi-avatar-content {
@@ -65,7 +65,7 @@
65
65
  .semi-avatar-small .semi-avatar-label {
66
66
  font-size: 12px;
67
67
  line-height: 16px;
68
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
68
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
69
69
  }
70
70
  .semi-avatar-default {
71
71
  width: 40px;
@@ -75,7 +75,7 @@
75
75
  .semi-avatar-default .semi-avatar-label {
76
76
  font-size: 18px;
77
77
  line-height: 24px;
78
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
78
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
79
79
  }
80
80
  .semi-avatar-medium {
81
81
  width: 48px;
@@ -85,7 +85,7 @@
85
85
  .semi-avatar-medium .semi-avatar-label {
86
86
  font-size: 20px;
87
87
  line-height: 28px;
88
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
88
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
89
89
  }
90
90
  .semi-avatar-large {
91
91
  width: 72px;
@@ -95,7 +95,7 @@
95
95
  .semi-avatar-large .semi-avatar-label {
96
96
  font-size: 32px;
97
97
  line-height: 44px;
98
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
98
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
99
99
  }
100
100
  .semi-avatar-extra-large {
101
101
  width: 128px;
@@ -26,7 +26,7 @@
26
26
  text-align: center;
27
27
  font-size: 12px;
28
28
  line-height: 16px;
29
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
29
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
30
30
  font-weight: 400;
31
31
  color: var(--semi-color-bg-2);
32
32
  }
@@ -11,13 +11,13 @@
11
11
  .semi-breadcrumb-wrapper-loose {
12
12
  font-size: 14px;
13
13
  line-height: 20px;
14
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
14
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
15
15
  font-size: 14px;
16
16
  }
17
17
  .semi-breadcrumb-wrapper-compact {
18
18
  font-size: 12px;
19
19
  line-height: 16px;
20
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
20
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
21
21
  font-size: 12px;
22
22
  }
23
23
  .semi-breadcrumb-item-wrap {
@@ -72,7 +72,7 @@
72
72
  .semi-calendar-week .semi-calendar-tag {
73
73
  font-size: 14px;
74
74
  line-height: 20px;
75
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
75
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
76
76
  min-width: 70px;
77
77
  color: var(--semi-color-text-2);
78
78
  }
@@ -188,7 +188,7 @@
188
188
  .semi-calendar-week .semi-calendar-time-item span {
189
189
  font-size: 14px;
190
190
  line-height: 20px;
191
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
191
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
192
192
  display: block;
193
193
  position: relative;
194
194
  top: -10px;
@@ -239,7 +239,7 @@
239
239
  align-items: flex-start;
240
240
  font-size: 14px;
241
241
  line-height: 20px;
242
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
242
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
243
243
  color: var(--semi-color-text-2);
244
244
  }
245
245
  .semi-calendar-week-header {
@@ -301,7 +301,7 @@
301
301
  .semi-calendar-week .semi-calendar-all-day .semi-calendar-event-items .semi-calendar-event-allday > * {
302
302
  font-size: 14px;
303
303
  line-height: 20px;
304
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
304
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
305
305
  }
306
306
  .semi-calendar-week .semi-calendar-week-tag {
307
307
  text-align: right;
@@ -318,7 +318,7 @@
318
318
  overflow: hidden;
319
319
  font-size: 14px;
320
320
  line-height: 20px;
321
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
321
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
322
322
  }
323
323
  .semi-calendar-month-grid-wrapper {
324
324
  height: calc(100% - 27px);
@@ -372,7 +372,7 @@
372
372
  .semi-calendar-month-skeleton li span {
373
373
  font-size: 14px;
374
374
  line-height: 20px;
375
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
375
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
376
376
  }
377
377
  .semi-calendar-month-skeleton li:last-child {
378
378
  border-right: none;
@@ -383,7 +383,7 @@
383
383
  .semi-calendar-month-skeleton .semi-calendar-month-event-card-wrapper {
384
384
  font-size: 14px;
385
385
  line-height: 20px;
386
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
386
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
387
387
  display: block;
388
388
  position: absolute;
389
389
  right: 8px;
@@ -420,7 +420,7 @@
420
420
  .semi-calendar-month-weekrow .semi-calendar-event-items .semi-calendar-event-month > * {
421
421
  font-size: 14px;
422
422
  line-height: 20px;
423
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
423
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
424
424
  }
425
425
  .semi-calendar-month-date {
426
426
  position: absolute;
@@ -460,7 +460,7 @@
460
460
  .semi-calendar-month-event-card-header-info-date {
461
461
  font-size: 20px;
462
462
  line-height: 28px;
463
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
463
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
464
464
  margin-top: 4px;
465
465
  }
466
466
  .semi-calendar-month-event-card-body {
@@ -48,7 +48,7 @@
48
48
  .semi-cascader-large .semi-cascader-selection {
49
49
  font-size: 16px;
50
50
  line-height: 22px;
51
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
51
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
52
52
  }
53
53
  .semi-cascader-large .semi-cascader-selection {
54
54
  padding-left: 12px;
@@ -104,7 +104,7 @@
104
104
  .semi-cascader-selection {
105
105
  font-size: 14px;
106
106
  line-height: 20px;
107
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
107
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
108
108
  height: 100%;
109
109
  display: inline-flex;
110
110
  align-items: center;
@@ -218,7 +218,7 @@
218
218
  font-weight: 600;
219
219
  font-size: 14px;
220
220
  line-height: 20px;
221
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
221
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
222
222
  color: var(--semi-color-text-2);
223
223
  }
224
224
  .semi-cascader-prefix-icon, .semi-cascader-suffix-icon {
@@ -231,7 +231,7 @@
231
231
  font-weight: 600;
232
232
  font-size: 14px;
233
233
  line-height: 20px;
234
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
234
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
235
235
  color: var(--semi-color-text-2);
236
236
  flex-shrink: 0;
237
237
  white-space: nowrap;
@@ -275,7 +275,7 @@
275
275
  .semi-cascader-popover .semi-cascader-option-lists .semi-cascader-option-empty {
276
276
  font-size: 14px;
277
277
  line-height: 20px;
278
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
278
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
279
279
  border-radius: var(--semi-border-radius-medium);
280
280
  color: var(--semi-color-disabled-text);
281
281
  margin: 0;
@@ -369,7 +369,7 @@
369
369
  transition: background-color var(--semi-transition_duration-none) var(--semi-transition_function-easeIn) var(--semi-transition_delay-none);
370
370
  font-size: 14px;
371
371
  line-height: 20px;
372
- font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
372
+ font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
373
373
  min-width: min-content;
374
374
  word-break: break-all;
375
375
  color: var(--semi-color-text-0);
@@ -454,8 +454,11 @@ class CascaderFoundation extends _foundation.default {
454
454
  } else if (selectedKeys.size && !multiple) {
455
455
  inputValue = this.renderDisplayText([...selectedKeys][0]);
456
456
  }
457
+ // Reset isSearching immediately in close() instead of relying on afterClose callback
458
+ // This prevents timing issues where open() clears inputValue but isSearching is still true
457
459
  this._adapter.updateStates({
458
- inputValue
460
+ inputValue,
461
+ isSearching: false
459
462
  });
460
463
  !multiple && this.toggle2SearchInput(false);
461
464
  !multiple && this._adapter.updateFocusState(false);