@douyinfe/semi-ui 2.31.2-alpha.0 → 2.31.3-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 (79) hide show
  1. package/dist/umd/semi-ui.js +19 -61
  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 +2 -2
  6. package/lib/cjs/autoComplete/index.d.ts +2 -2
  7. package/lib/cjs/button/Button.d.ts +1 -1
  8. package/lib/cjs/button/buttonGroup.d.ts +1 -1
  9. package/lib/cjs/button/index.d.ts +1 -1
  10. package/lib/cjs/carousel/CarouselIndicator.d.ts +1 -1
  11. package/lib/cjs/carousel/index.d.ts +2 -2
  12. package/lib/cjs/datePicker/datePicker.d.ts +3 -3
  13. package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
  14. package/lib/cjs/datePicker/quickControl.d.ts +1 -1
  15. package/lib/cjs/datePicker/yearAndMonth.d.ts +1 -1
  16. package/lib/cjs/dropdown/index.d.ts +1 -1
  17. package/lib/cjs/form/baseForm.d.ts +4 -4
  18. package/lib/cjs/form/field.d.ts +4 -4
  19. package/lib/cjs/input/index.d.ts +1 -1
  20. package/lib/cjs/input/inputGroup.d.ts +1 -1
  21. package/lib/cjs/modal/confirm.d.ts +35 -35
  22. package/lib/cjs/navigation/Item.js +4 -2
  23. package/lib/cjs/navigation/nav-context.d.ts +2 -0
  24. package/lib/cjs/overflowList/index.d.ts +1 -1
  25. package/lib/cjs/popover/index.d.ts +1 -1
  26. package/lib/cjs/radio/radio.d.ts +1 -1
  27. package/lib/cjs/radio/radioGroup.d.ts +1 -1
  28. package/lib/cjs/rating/index.d.ts +1 -1
  29. package/lib/cjs/rating/item.d.ts +1 -1
  30. package/lib/cjs/select/index.d.ts +1 -1
  31. package/lib/cjs/switch/index.d.ts +1 -1
  32. package/lib/cjs/switch/index.js +1 -1
  33. package/lib/cjs/table/Table.d.ts +3 -3
  34. package/lib/cjs/table/Table.js +2 -2
  35. package/lib/cjs/table/index.d.ts +1 -1
  36. package/lib/cjs/tagInput/index.d.ts +1 -1
  37. package/lib/cjs/timePicker/TimePicker.d.ts +1 -1
  38. package/lib/cjs/timePicker/index.d.ts +1 -1
  39. package/lib/cjs/tooltip/index.d.ts +1 -1
  40. package/lib/cjs/typography/numeral.d.ts +1 -1
  41. package/lib/cjs/typography/title.d.ts +1 -1
  42. package/lib/es/anchor/index.d.ts +2 -2
  43. package/lib/es/autoComplete/index.d.ts +2 -2
  44. package/lib/es/button/Button.d.ts +1 -1
  45. package/lib/es/button/buttonGroup.d.ts +1 -1
  46. package/lib/es/button/index.d.ts +1 -1
  47. package/lib/es/carousel/CarouselIndicator.d.ts +1 -1
  48. package/lib/es/carousel/index.d.ts +2 -2
  49. package/lib/es/datePicker/datePicker.d.ts +3 -3
  50. package/lib/es/datePicker/monthsGrid.d.ts +1 -1
  51. package/lib/es/datePicker/quickControl.d.ts +1 -1
  52. package/lib/es/datePicker/yearAndMonth.d.ts +1 -1
  53. package/lib/es/dropdown/index.d.ts +1 -1
  54. package/lib/es/form/baseForm.d.ts +4 -4
  55. package/lib/es/form/field.d.ts +4 -4
  56. package/lib/es/input/index.d.ts +1 -1
  57. package/lib/es/input/inputGroup.d.ts +1 -1
  58. package/lib/es/modal/confirm.d.ts +35 -35
  59. package/lib/es/navigation/Item.js +4 -2
  60. package/lib/es/navigation/nav-context.d.ts +2 -0
  61. package/lib/es/overflowList/index.d.ts +1 -1
  62. package/lib/es/popover/index.d.ts +1 -1
  63. package/lib/es/radio/radio.d.ts +1 -1
  64. package/lib/es/radio/radioGroup.d.ts +1 -1
  65. package/lib/es/rating/index.d.ts +1 -1
  66. package/lib/es/rating/item.d.ts +1 -1
  67. package/lib/es/select/index.d.ts +1 -1
  68. package/lib/es/switch/index.d.ts +1 -1
  69. package/lib/es/switch/index.js +1 -1
  70. package/lib/es/table/Table.d.ts +3 -3
  71. package/lib/es/table/Table.js +2 -2
  72. package/lib/es/table/index.d.ts +1 -1
  73. package/lib/es/tagInput/index.d.ts +1 -1
  74. package/lib/es/timePicker/TimePicker.d.ts +1 -1
  75. package/lib/es/timePicker/index.d.ts +1 -1
  76. package/lib/es/tooltip/index.d.ts +1 -1
  77. package/lib/es/typography/numeral.d.ts +1 -1
  78. package/lib/es/typography/title.d.ts +1 -1
  79. package/package.json +8 -8
@@ -65245,12 +65245,14 @@ class Item_NavItem extends baseComponent_BaseComponent {
65245
65245
  tooltipHideDelay,
65246
65246
  tooltipShowDelay
65247
65247
  } = this.props;
65248
+ const hideDelay = tooltipHideDelay !== null && tooltipHideDelay !== void 0 ? tooltipHideDelay : this.context.tooltipHideDelay;
65249
+ const showDelay = tooltipShowDelay !== null && tooltipShowDelay !== void 0 ? tooltipShowDelay : this.context.tooltipShowDelay;
65248
65250
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(tooltip_Tooltip, {
65249
65251
  content: text,
65250
65252
  position: "right",
65251
65253
  trigger: 'hover',
65252
- mouseEnterDelay: tooltipShowDelay,
65253
- mouseLeaveDelay: tooltipHideDelay
65254
+ mouseEnterDelay: showDelay,
65255
+ mouseLeaveDelay: hideDelay
65254
65256
  }, node);
65255
65257
  };
65256
65258
 
@@ -70608,7 +70610,8 @@ class foundation_SelectFoundation extends foundation {
70608
70610
  handleValueChange(value) {
70609
70611
  const {
70610
70612
  allowCreate,
70611
- autoClearSearchValue
70613
+ autoClearSearchValue,
70614
+ remote
70612
70615
  } = this.getProps();
70613
70616
  const {
70614
70617
  inputValue
@@ -70628,7 +70631,7 @@ class foundation_SelectFoundation extends foundation {
70628
70631
 
70629
70632
  this._adapter.rePositionDropdown();
70630
70633
 
70631
- if (this._isFilterable() && !autoClearSearchValue && inputValue) {
70634
+ if (this._isFilterable() && !autoClearSearchValue && inputValue && !remote) {
70632
70635
  originalOptions = this._filterOption(originalOptions, inputValue);
70633
70636
  }
70634
70637
 
@@ -79920,11 +79923,8 @@ class foundation_SwitchFoundation extends foundation {
79920
79923
 
79921
79924
  init() {
79922
79925
  const {
79923
- defaultChecked,
79924
- checked,
79925
79926
  disabled
79926
79927
  } = this.getProps();
79927
- this.setChecked(defaultChecked || checked);
79928
79928
  this.setDisabled(disabled);
79929
79929
  }
79930
79930
 
@@ -80003,7 +80003,7 @@ class switch_Switch extends baseComponent_BaseComponent {
80003
80003
  };
80004
80004
 
80005
80005
  this.state = {
80006
- nativeControlChecked: false,
80006
+ nativeControlChecked: props.defaultChecked || props.checked,
80007
80007
  nativeControlDisabled: false,
80008
80008
  focusVisible: false
80009
80009
  };
@@ -80160,10 +80160,6 @@ var flattenDeep_default = /*#__PURE__*/__webpack_require__.n(flattenDeep);
80160
80160
  var some = __webpack_require__("oBkS");
80161
80161
  var some_default = /*#__PURE__*/__webpack_require__.n(some);
80162
80162
 
80163
- // EXTERNAL MODULE: /Users/shijia/code/semi-design/node_modules/lodash/clone.js
80164
- var lodash_clone = __webpack_require__("zr3P");
80165
- var clone_default = /*#__PURE__*/__webpack_require__.n(lodash_clone);
80166
-
80167
80163
  // EXTERNAL MODULE: /Users/shijia/code/semi-design/node_modules/lodash/filter.js
80168
80164
  var lodash_filter = __webpack_require__("+DnP");
80169
80165
  var filter_default = /*#__PURE__*/__webpack_require__.n(lodash_filter);
@@ -80172,10 +80168,6 @@ var filter_default = /*#__PURE__*/__webpack_require__.n(lodash_filter);
80172
80168
  var isEqualWith = __webpack_require__("6OdC");
80173
80169
  var isEqualWith_default = /*#__PURE__*/__webpack_require__.n(isEqualWith);
80174
80170
 
80175
- // EXTERNAL MODULE: /Users/shijia/code/semi-design/node_modules/lodash/cloneDeepWith.js
80176
- var cloneDeepWith = __webpack_require__("NdXQ");
80177
- var cloneDeepWith_default = /*#__PURE__*/__webpack_require__.n(cloneDeepWith);
80178
-
80179
80171
  // CONCATENATED MODULE: ../semi-foundation/table/constants.ts
80180
80172
  /* eslint-disable max-len */
80181
80173
 
@@ -80363,20 +80355,6 @@ class Logger {
80363
80355
 
80364
80356
 
80365
80357
 
80366
-
80367
-
80368
-
80369
- function utils_cloneDeep(value, customizer) {
80370
- return cloneDeepWith_default()(value, v => {
80371
- if (typeof v === 'function') {
80372
- return v;
80373
- } else if (typeof customizer === 'function') {
80374
- return customizer(v);
80375
- }
80376
-
80377
- return undefined;
80378
- });
80379
- }
80380
80358
  function equalWith(value, other, customizer) {
80381
80359
  return isEqualWith_default()(value, other, function (objVal, othVal) {
80382
80360
  if (typeof objVal === 'function' && typeof othVal === 'function') {
@@ -80411,34 +80389,6 @@ function getColumnKey(column, keyPropNames) {
80411
80389
 
80412
80390
  return key;
80413
80391
  }
80414
- function mergeColumns() {
80415
- let oldColumns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
80416
- let newColumns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
80417
- let keyPropNames = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
80418
- let deep = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
80419
- const finalColumns = [];
80420
- const clone = deep ? utils_cloneDeep : clone_default.a;
80421
-
80422
- if (deep) {
80423
- const logger = new utils_Logger('[@douyinfe/semi-ui Table]');
80424
- logger.warn('Should not deep merge columns from foundation since columns may have react elements. Merge columns deep from semi-ui');
80425
- }
80426
-
80427
- map_default()(newColumns, newColumn => {
80428
- newColumn = Object.assign({}, newColumn);
80429
- const key = getColumnKey(newColumn, keyPropNames);
80430
-
80431
- const oldColumn = key != null && find_default()(oldColumns, item => getColumnKey(item, keyPropNames) === key);
80432
-
80433
- if (oldColumn) {
80434
- finalColumns.push(clone(Object.assign(Object.assign({}, oldColumn), newColumn)));
80435
- } else {
80436
- finalColumns.push(clone(newColumn));
80437
- }
80438
- });
80439
-
80440
- return finalColumns;
80441
- }
80442
80392
  /**
80443
80393
  *
80444
80394
  * @param {Array<number>} arr
@@ -80797,7 +80747,7 @@ function mergeQueries(query) {
80797
80747
  */
80798
80748
 
80799
80749
  function withResizeWidth(columns, newColumns) {
80800
- const _newColumns = utils_cloneDeep(newColumns);
80750
+ const _newColumns = Object.assign({}, newColumns);
80801
80751
 
80802
80752
  for (const column of columns) {
80803
80753
  if (!isNullOrUndefined(column.width)) {
@@ -83497,6 +83447,10 @@ class bodyFoundation_TableBodyFoundation extends foundation {
83497
83447
  }
83498
83448
 
83499
83449
  }
83450
+ // EXTERNAL MODULE: /Users/shijia/code/semi-design/node_modules/lodash/clone.js
83451
+ var lodash_clone = __webpack_require__("zr3P");
83452
+ var clone_default = /*#__PURE__*/__webpack_require__.n(lodash_clone);
83453
+
83500
83454
  // CONCATENATED MODULE: ./table/utils.ts
83501
83455
 
83502
83456
 
@@ -83609,7 +83563,7 @@ function mergeComponents(components, virtualized) {
83609
83563
  }, components);
83610
83564
  }
83611
83565
  const utils_logger = new utils_Logger('[@douyinfe/semi-ui Table]');
83612
- function utils_mergeColumns() {
83566
+ function mergeColumns() {
83613
83567
  let oldColumns = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
83614
83568
  let newColumns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
83615
83569
  let keyPropNames = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
@@ -87457,7 +87411,7 @@ const ResizableTable = function () {
87457
87411
  // If there is a resize value, the width does not use the default value fix#1072
87458
87412
  const _newColumns = withResizeWidth(columns, newColumns);
87459
87413
 
87460
- setColumns(utils_mergeColumns(columns, _newColumns));
87414
+ setColumns(mergeColumns(columns, _newColumns));
87461
87415
  }, [propColumns, props.expandedRowRender, props.hideExpandedColumn, props.rowSelection]);
87462
87416
  const components = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_["useMemo"])(() => merge_default()({
87463
87417
  header: {
@@ -91727,6 +91681,10 @@ const tree_constants_strings = {
91727
91681
  };
91728
91682
  const tree_constants_numbers = {};
91729
91683
 
91684
+ // EXTERNAL MODULE: /Users/shijia/code/semi-design/node_modules/lodash/cloneDeepWith.js
91685
+ var cloneDeepWith = __webpack_require__("NdXQ");
91686
+ var cloneDeepWith_default = /*#__PURE__*/__webpack_require__.n(cloneDeepWith);
91687
+
91730
91688
  // CONCATENATED MODULE: ./tree/treeUtil.tsx
91731
91689
 
91732
91690