@douyinfe/semi-ui 2.45.3-alpha.1 → 2.45.3

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 (45) hide show
  1. package/dist/umd/semi-ui.js +9 -4
  2. package/dist/umd/semi-ui.js.map +1 -1
  3. package/dist/umd/semi-ui.min.js +1 -1
  4. package/dist/umd/semi-ui.min.js.map +1 -1
  5. package/lib/cjs/anchor/index.d.ts +1 -1
  6. package/lib/cjs/autoComplete/index.d.ts +1 -1
  7. package/lib/cjs/button/Button.d.ts +1 -1
  8. package/lib/cjs/button/buttonGroup.d.ts +1 -1
  9. package/lib/cjs/carousel/CarouselIndicator.d.ts +1 -1
  10. package/lib/cjs/carousel/index.d.ts +2 -2
  11. package/lib/cjs/datePicker/datePicker.d.ts +1 -1
  12. package/lib/cjs/dropdown/index.d.ts +1 -1
  13. package/lib/cjs/form/baseForm.d.ts +3 -3
  14. package/lib/cjs/form/field.d.ts +3 -3
  15. package/lib/cjs/modal/confirm.d.ts +11 -11
  16. package/lib/cjs/popover/index.d.ts +1 -1
  17. package/lib/cjs/select/index.d.ts +1 -1
  18. package/lib/cjs/select/index.js +1 -1
  19. package/lib/cjs/select/utils.js +5 -1
  20. package/lib/cjs/table/Table.d.ts +1 -1
  21. package/lib/cjs/tooltip/index.d.ts +1 -1
  22. package/lib/cjs/treeSelect/index.d.ts +1 -1
  23. package/lib/cjs/treeSelect/index.js +2 -2
  24. package/lib/cjs/typography/title.d.ts +2 -2
  25. package/lib/es/anchor/index.d.ts +1 -1
  26. package/lib/es/autoComplete/index.d.ts +1 -1
  27. package/lib/es/button/Button.d.ts +1 -1
  28. package/lib/es/button/buttonGroup.d.ts +1 -1
  29. package/lib/es/carousel/CarouselIndicator.d.ts +1 -1
  30. package/lib/es/carousel/index.d.ts +2 -2
  31. package/lib/es/datePicker/datePicker.d.ts +1 -1
  32. package/lib/es/dropdown/index.d.ts +1 -1
  33. package/lib/es/form/baseForm.d.ts +3 -3
  34. package/lib/es/form/field.d.ts +3 -3
  35. package/lib/es/modal/confirm.d.ts +11 -11
  36. package/lib/es/popover/index.d.ts +1 -1
  37. package/lib/es/select/index.d.ts +1 -1
  38. package/lib/es/select/index.js +1 -1
  39. package/lib/es/select/utils.js +5 -1
  40. package/lib/es/table/Table.d.ts +1 -1
  41. package/lib/es/tooltip/index.d.ts +1 -1
  42. package/lib/es/treeSelect/index.d.ts +1 -1
  43. package/lib/es/treeSelect/index.js +2 -2
  44. package/lib/es/typography/title.d.ts +2 -2
  45. package/package.json +8 -8
@@ -69896,6 +69896,7 @@ class SelectFoundation extends foundation {
69896
69896
  delete newOption._show;
69897
69897
  delete newOption._selected;
69898
69898
  delete newOption._scrollIndex;
69899
+ delete newOption._keyInJsx;
69899
69900
  if ('_keyInOptionList' in newOption) {
69900
69901
  newOption.key = newOption._keyInOptionList;
69901
69902
  delete newOption._keyInOptionList;
@@ -70281,7 +70282,7 @@ const generateOption = (child, parent, index) => {
70281
70282
  }
70282
70283
  const option = Object.assign(Object.assign({
70283
70284
  value: childProps.value,
70284
- // Drop-down menu rendering priority label value, children, value in turn downgrade
70285
+ // Dropdown menu rendering priority label value, children, value in turn downgrade
70285
70286
  label: childProps.label || childProps.children || childProps.value,
70286
70287
  _show: true,
70287
70288
  _selected: false,
@@ -70289,6 +70290,10 @@ const generateOption = (child, parent, index) => {
70289
70290
  }, childProps), {
70290
70291
  _parentGroup: parent
70291
70292
  });
70293
+ // Props are collected from ReactNode, after React.Children.toArray
70294
+ // no need to determine whether the key exists in child
70295
+ // Even if the user does not explicitly declare it, React will always generate a key.
70296
+ option._keyInJsx = child.key;
70292
70297
  return option;
70293
70298
  };
70294
70299
  const getOptionsFromGroup = selectChildren => {
@@ -71086,7 +71091,7 @@ class Select extends BaseComponent {
71086
71091
  focused: isFocused,
71087
71092
  onMouseEnter: () => this.onOptionHover(optionIndex),
71088
71093
  style: optionStyle,
71089
- key: option.key || option.label + option.value + optionIndex,
71094
+ key: option._keyInOptionList || option._keyInJsx || option.label + option.value + optionIndex,
71090
71095
  renderOptionItem: renderOptionItem,
71091
71096
  inputValue: inputValue,
71092
71097
  semiOptionId: `${this.selectID}-option-${optionIndex}`
@@ -90417,7 +90422,7 @@ class TreeSelect extends BaseComponent {
90417
90422
  } = item && treeNodeLabelProp in item ? renderSelectedItem(item, {
90418
90423
  index,
90419
90424
  onClose
90420
- }) : null;
90425
+ }) : {};
90421
90426
  if (isNull_default()(content) || isUndefined_default()(content)) {
90422
90427
  return;
90423
90428
  }
@@ -90713,7 +90718,7 @@ class TreeSelect extends BaseComponent {
90713
90718
  } = item && treeNodeLabelProp in item ? renderSelectedItem(item, {
90714
90719
  index: idx,
90715
90720
  onClose
90716
- }) : null;
90721
+ }) : {};
90717
90722
  if (isRenderInTag) {
90718
90723
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(Tag, Object.assign({}, tagProps), content);
90719
90724
  } else {