@douyinfe/semi-ui 2.5.0 → 2.6.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 (97) hide show
  1. package/button/index.tsx +1 -1
  2. package/calendar/monthCalendar.tsx +14 -13
  3. package/cascader/index.tsx +21 -3
  4. package/cascader/item.tsx +25 -5
  5. package/datePicker/dateInput.tsx +8 -5
  6. package/datePicker/datePicker.tsx +6 -1
  7. package/datePicker/month.tsx +14 -7
  8. package/datePicker/monthsGrid.tsx +17 -5
  9. package/datePicker/navigation.tsx +8 -4
  10. package/datePicker/quickControl.tsx +1 -0
  11. package/datePicker/yearAndMonth.tsx +1 -1
  12. package/dist/css/semi.css +22 -8
  13. package/dist/css/semi.min.css +1 -1
  14. package/dist/umd/semi-ui.js +259 -104
  15. package/dist/umd/semi-ui.js.map +1 -1
  16. package/dist/umd/semi-ui.min.js +1 -1
  17. package/dist/umd/semi-ui.min.js.map +1 -1
  18. package/form/__test__/formApi.test.js +182 -0
  19. package/form/_story/FormApi/arrayDemo.jsx +4 -7
  20. package/form/_story/Layout/slotDemo.jsx +2 -2
  21. package/form/_story/demo.jsx +18 -1
  22. package/form/_story/form.stories.js +6 -6
  23. package/form/baseForm.tsx +2 -2
  24. package/form/hoc/withField.tsx +1 -1
  25. package/lib/cjs/_base/base.css +5 -5
  26. package/lib/cjs/button/Button.d.ts +4 -4
  27. package/lib/cjs/button/buttonGroup.d.ts +2 -2
  28. package/lib/cjs/button/index.d.ts +5 -6
  29. package/lib/cjs/calendar/monthCalendar.js +21 -5
  30. package/lib/cjs/cascader/index.d.ts +9 -2
  31. package/lib/cjs/cascader/index.js +14 -1
  32. package/lib/cjs/cascader/item.d.ts +6 -2
  33. package/lib/cjs/cascader/item.js +33 -4
  34. package/lib/cjs/datePicker/dateInput.d.ts +0 -2
  35. package/lib/cjs/datePicker/dateInput.js +17 -6
  36. package/lib/cjs/datePicker/datePicker.js +15 -12
  37. package/lib/cjs/datePicker/month.d.ts +1 -0
  38. package/lib/cjs/datePicker/month.js +18 -2
  39. package/lib/cjs/datePicker/monthsGrid.js +16 -4
  40. package/lib/cjs/datePicker/navigation.js +8 -0
  41. package/lib/cjs/datePicker/quickControl.js +1 -0
  42. package/lib/cjs/datePicker/yearAndMonth.js +1 -0
  43. package/lib/cjs/form/baseForm.js +2 -2
  44. package/lib/cjs/form/hoc/withField.js +1 -1
  45. package/lib/cjs/iconButton/index.d.ts +2 -2
  46. package/lib/cjs/navigation/Item.d.ts +2 -2
  47. package/lib/cjs/navigation/Item.js +8 -6
  48. package/lib/cjs/navigation/SubNav.js +2 -2
  49. package/lib/cjs/scrollList/scrollItem.d.ts +2 -1
  50. package/lib/cjs/scrollList/scrollItem.js +13 -3
  51. package/lib/cjs/table/Body/index.d.ts +2 -0
  52. package/lib/cjs/table/Body/index.js +13 -4
  53. package/lib/cjs/tooltip/index.js +6 -2
  54. package/lib/es/_base/base.css +5 -5
  55. package/lib/es/button/Button.d.ts +4 -4
  56. package/lib/es/button/buttonGroup.d.ts +2 -2
  57. package/lib/es/button/index.d.ts +5 -6
  58. package/lib/es/calendar/monthCalendar.js +22 -5
  59. package/lib/es/cascader/index.d.ts +9 -2
  60. package/lib/es/cascader/index.js +14 -1
  61. package/lib/es/cascader/item.d.ts +6 -2
  62. package/lib/es/cascader/item.js +31 -4
  63. package/lib/es/datePicker/dateInput.d.ts +0 -2
  64. package/lib/es/datePicker/dateInput.js +17 -6
  65. package/lib/es/datePicker/datePicker.js +15 -12
  66. package/lib/es/datePicker/month.d.ts +1 -0
  67. package/lib/es/datePicker/month.js +18 -2
  68. package/lib/es/datePicker/monthsGrid.js +16 -4
  69. package/lib/es/datePicker/navigation.js +8 -0
  70. package/lib/es/datePicker/quickControl.js +2 -0
  71. package/lib/es/datePicker/yearAndMonth.js +1 -0
  72. package/lib/es/form/baseForm.js +2 -2
  73. package/lib/es/form/hoc/withField.js +1 -1
  74. package/lib/es/iconButton/index.d.ts +2 -2
  75. package/lib/es/navigation/Item.d.ts +2 -2
  76. package/lib/es/navigation/Item.js +8 -6
  77. package/lib/es/navigation/SubNav.js +2 -2
  78. package/lib/es/scrollList/scrollItem.d.ts +2 -1
  79. package/lib/es/scrollList/scrollItem.js +13 -3
  80. package/lib/es/table/Body/index.d.ts +2 -0
  81. package/lib/es/table/Body/index.js +13 -4
  82. package/lib/es/tooltip/index.js +6 -2
  83. package/navigation/Item.tsx +15 -12
  84. package/navigation/SubNav.tsx +4 -4
  85. package/package.json +9 -9
  86. package/scrollList/_story/ScrollList/index.js +3 -0
  87. package/scrollList/_story/WheelList/index.js +3 -0
  88. package/scrollList/scrollItem.tsx +30 -9
  89. package/table/Body/index.tsx +15 -4
  90. package/table/__test__/table.test.js +18 -0
  91. package/table/_story/Perf/Virtualized/index.jsx +6 -0
  92. package/table/_story/v2/FixedExpandedRow/index.jsx +95 -0
  93. package/table/_story/v2/FixedHeaderMerge/index.jsx +1 -1
  94. package/table/_story/v2/defaultFilteredValue.tsx +0 -9
  95. package/table/_story/v2/index.js +2 -1
  96. package/tooltip/_story/tooltip.stories.js +702 -625
  97. package/tooltip/index.tsx +2 -2
@@ -26895,7 +26895,9 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
26895
26895
  } = _ref;
26896
26896
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", assign_default()({
26897
26897
  className: classnames_default()(className, animateCls),
26898
- style: assign_default()(assign_default()(assign_default()({}, animateStyle), {
26898
+ style: assign_default()(assign_default()(assign_default()({
26899
+ visibility: 'visible'
26900
+ }, animateStyle), {
26899
26901
  transformOrigin
26900
26902
  }), style)
26901
26903
  }, portalEventSet, animateEvents, {
@@ -26907,7 +26909,9 @@ class tooltip_Tooltip extends baseComponent_BaseComponent {
26907
26909
  className: className
26908
26910
  }, portalEventSet, {
26909
26911
  "x-placement": placement,
26910
- style: style
26912
+ style: assign_default()({
26913
+ visibility: motion ? undefined : 'visible'
26914
+ }, style)
26911
26915
  }), content, icon);
26912
26916
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(_portal, {
26913
26917
  getPopupContainer: this.props.getPopupContainer,
@@ -41517,6 +41521,8 @@ weekCalendar_WeekCalendar.contextType = locale_context;
41517
41521
 
41518
41522
 
41519
41523
 
41524
+ /* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */
41525
+
41520
41526
 
41521
41527
 
41522
41528
 
@@ -41572,11 +41578,13 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
41572
41578
  } = this.props;
41573
41579
  this.monthlyData = this.foundation.getMonthlyData(displayValue, dateFnsLocale);
41574
41580
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
41575
- className: "".concat(monthCalendar_prefixCls, "-header")
41581
+ className: "".concat(monthCalendar_prefixCls, "-header"),
41582
+ role: "presentation"
41576
41583
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
41577
- role: "gridcell",
41584
+ role: "presentation",
41578
41585
  className: "".concat(monthCalendar_prefixCls, "-grid")
41579
41586
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("ul", {
41587
+ role: "row",
41580
41588
  className: "".concat(monthCalendar_prefixCls, "-grid-row")
41581
41589
  }, map_default()(_context = this.monthlyData[0]).call(_context, day => {
41582
41590
  const {
@@ -41586,6 +41594,8 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
41586
41594
  ["".concat(calendar_constants_cssClasses.PREFIX, "-weekend")]: markWeekend && day.isWeekend
41587
41595
  });
41588
41596
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("li", {
41597
+ role: "columnheader",
41598
+ "aria-label": weekday,
41589
41599
  key: "".concat(weekday, "-monthheader"),
41590
41600
  className: listCls
41591
41601
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", null, weekday));
@@ -41668,7 +41678,10 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
41668
41678
  const pos = showCard && showCard[key] ? showCard[key][1] : 'leftTopOver';
41669
41679
  const text = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
41670
41680
  componentName: "Calendar"
41671
- }, locale => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
41681
+ }, locale =>
41682
+ /*#__PURE__*/
41683
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
41684
+ external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
41672
41685
  className: "".concat(cardCls, "-wrapper"),
41673
41686
  style: {
41674
41687
  bottom: 0
@@ -41736,11 +41749,12 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
41736
41749
  day
41737
41750
  } = events;
41738
41751
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
41739
- role: "gridcell",
41752
+ role: "presentation",
41740
41753
  className: "".concat(monthCalendar_prefixCls, "-weekrow"),
41741
41754
  ref: _this.cellDom,
41742
41755
  key: "".concat(index, "-weekrow")
41743
41756
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("ul", {
41757
+ role: "row",
41744
41758
  className: "".concat(monthCalendar_prefixCls, "-skeleton")
41745
41759
  }, map_default()(weekDay).call(weekDay, each => {
41746
41760
  const {
@@ -41759,6 +41773,9 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
41759
41773
  });
41760
41774
  const shouldRenderCollapsed = Boolean(day && day[ind] && day[ind].length > itemLimit);
41761
41775
  const inner = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("li", {
41776
+ role: "gridcell",
41777
+ "aria-label": date.toLocaleDateString(),
41778
+ "aria-current": isToday ? "date" : false,
41762
41779
  key: "".concat(date, "-weeksk"),
41763
41780
  className: listCls,
41764
41781
  onClick: e => _this.handleClick(e, [date])
@@ -41781,9 +41798,10 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
41781
41798
  parsedEvents
41782
41799
  } = this.state;
41783
41800
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
41784
- role: "gridcell",
41801
+ role: "presentation",
41785
41802
  className: "".concat(monthCalendar_prefixCls, "-week")
41786
41803
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("ul", {
41804
+ role: "presentation",
41787
41805
  className: "".concat(monthCalendar_prefixCls, "-grid-col")
41788
41806
  }, map_default()(_context3 = keys_default()(this.monthlyData)).call(_context3, weekInd => this.renderWeekRow(weekInd, this.monthlyData[weekInd], parsedEvents[weekInd]))));
41789
41807
  };
@@ -41914,12 +41932,15 @@ class monthCalendar_monthCalendar extends baseComponent_BaseComponent {
41914
41932
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(localeConsumer_LocaleConsumer, {
41915
41933
  componentName: "Calendar"
41916
41934
  }, (locale, localeCode, dateFnsLocale) => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
41935
+ role: "grid",
41917
41936
  className: monthCls,
41918
41937
  key: this.state.itemLimit,
41919
41938
  style: monthStyle
41920
41939
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
41940
+ role: "presentation",
41921
41941
  className: "".concat(monthCalendar_prefixCls, "-sticky-top")
41922
41942
  }, header, this.renderHeader(dateFnsLocale)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
41943
+ role: "presentation",
41923
41944
  className: "".concat(monthCalendar_prefixCls, "-grid-wrapper")
41924
41945
  }, this.renderMonthGrid())));
41925
41946
  }
@@ -43912,6 +43933,7 @@ function calcMergeType(autoMergeValue, leafOnly) {
43912
43933
 
43913
43934
 
43914
43935
 
43936
+
43915
43937
 
43916
43938
 
43917
43939
  // eslint-disable-next-line max-len
@@ -44421,6 +44443,16 @@ class foundation_CascaderFoundation extends foundation {
44421
44443
  this.close(e);
44422
44444
  }
44423
44445
  }
44446
+ /**
44447
+ * A11y: simulate selection click
44448
+ */
44449
+
44450
+
44451
+ handleSelectionEnterPress(keyboardEvent) {
44452
+ if (utils_isEnterPress(keyboardEvent)) {
44453
+ this.handleClick(keyboardEvent);
44454
+ }
44455
+ }
44424
44456
 
44425
44457
  toggleHoverState(bool) {
44426
44458
  this._adapter.toggleHovering(bool);
@@ -44852,6 +44884,16 @@ class foundation_CascaderFoundation extends foundation {
44852
44884
 
44853
44885
  this._adapter.rePositionDropdown();
44854
44886
  }
44887
+ /**
44888
+ * A11y: simulate clear button click
44889
+ */
44890
+
44891
+
44892
+ handleClearEnterPress(keyboardEvent) {
44893
+ if (utils_isEnterPress(keyboardEvent)) {
44894
+ this.handleClear();
44895
+ }
44896
+ }
44855
44897
 
44856
44898
  getRenderData() {
44857
44899
  var _context9, _context10;
@@ -45686,6 +45728,8 @@ checkbox_CheckboxWithGroup.Group = checkboxGroup;
45686
45728
 
45687
45729
 
45688
45730
 
45731
+
45732
+
45689
45733
  const item_prefixcls = cascader_constants_cssClasses.PREFIX_OPTION;
45690
45734
  class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_react_["PureComponent"] {
45691
45735
  constructor() {
@@ -45702,6 +45746,16 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
45702
45746
 
45703
45747
  onItemClick(e, item);
45704
45748
  };
45749
+ /**
45750
+ * A11y: simulate item click
45751
+ */
45752
+
45753
+
45754
+ this.handleItemEnterPress = (keyboardEvent, item) => {
45755
+ if (utils_isEnterPress(keyboardEvent)) {
45756
+ this.onClick(keyboardEvent, item);
45757
+ }
45758
+ };
45705
45759
 
45706
45760
  this.onHover = (e, item) => {
45707
45761
  const {
@@ -45781,6 +45835,7 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
45781
45835
 
45782
45836
  case 'empty':
45783
45837
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
45838
+ "aria-hidden": true,
45784
45839
  className: concat_default()(_context3 = "".concat(item_prefixcls, "-icon ")).call(_context3, item_prefixcls, "-icon-empty")
45785
45840
  });
45786
45841
 
@@ -45844,11 +45899,13 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
45844
45899
  ["".concat(item_prefixcls, "-disabled")]: disabled
45845
45900
  });
45846
45901
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("li", {
45902
+ role: 'menuitem',
45847
45903
  className: className,
45848
45904
  key: key,
45849
45905
  onClick: e => {
45850
45906
  this.onClick(e, item);
45851
- }
45907
+ },
45908
+ onKeyPress: e => this.handleItemEnterPress(e, item)
45852
45909
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
45853
45910
  className: "".concat(item_prefixcls, "-label")
45854
45911
  }, !multiple && this.renderIcon('empty'), multiple && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(checkbox_0, {
@@ -45873,13 +45930,15 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
45873
45930
  let showChildItem;
45874
45931
  const ind = content.length;
45875
45932
  content.push( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("ul", {
45933
+ role: 'menu',
45876
45934
  className: "".concat(item_prefixcls, "-list"),
45877
45935
  key: renderData[0].key,
45878
45936
  onScroll: e => this.props.onListScroll(e, ind)
45879
45937
  }, map_default()(renderData).call(renderData, item => {
45880
45938
  const {
45881
45939
  data,
45882
- key
45940
+ key,
45941
+ parentKey
45883
45942
  } = item;
45884
45943
  const {
45885
45944
  children,
@@ -45904,16 +45963,26 @@ class item_Item extends external_root_React_commonjs2_react_commonjs_react_amd_r
45904
45963
  ["".concat(item_prefixcls, "-select")]: selected && !multiple,
45905
45964
  ["".concat(item_prefixcls, "-disabled")]: disabled
45906
45965
  });
45907
- return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("li", {
45966
+ const otherAriaProps = parentKey ? {
45967
+ ['aria-owns']: "cascaderItem-".concat(parentKey)
45968
+ } : {};
45969
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("li", assign_default()({
45970
+ role: 'menuitem',
45971
+ id: "cascaderItem-".concat(key),
45972
+ "aria-expanded": active,
45973
+ "aria-haspopup": Boolean(showExpand),
45974
+ "aria-disabled": disabled
45975
+ }, otherAriaProps, {
45908
45976
  className: className,
45909
45977
  key: key,
45910
45978
  onClick: e => {
45911
45979
  this.onClick(e, item);
45912
45980
  },
45981
+ onKeyPress: e => this.handleItemEnterPress(e, item),
45913
45982
  onMouseEnter: e => {
45914
45983
  this.onHover(e, item);
45915
45984
  }
45916
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
45985
+ }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
45917
45986
  className: "".concat(item_prefixcls, "-label")
45918
45987
  }, selected && !multiple && this.renderIcon('tick'), !selected && !multiple && this.renderIcon('empty'), multiple && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(checkbox_0, {
45919
45988
  onChange: e => this.onCheckboxChange(e, item),
@@ -47237,6 +47306,15 @@ class cascader_Cascader extends baseComponent_BaseComponent {
47237
47306
  e && e.stopPropagation();
47238
47307
  this.foundation.handleClear();
47239
47308
  };
47309
+ /**
47310
+ * A11y: simulate clear button click
47311
+ */
47312
+
47313
+
47314
+ this.handleClearEnterPress = e => {
47315
+ e && e.stopPropagation();
47316
+ this.foundation.handleClearEnterPress();
47317
+ };
47240
47318
 
47241
47319
  this.showClearBtn = () => {
47242
47320
  const {
@@ -47263,6 +47341,7 @@ class cascader_Cascader extends baseComponent_BaseComponent {
47263
47341
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
47264
47342
  className: clearCls,
47265
47343
  onClick: this.handleClear,
47344
+ onKeyPress: this.handleClearEnterPress,
47266
47345
  role: 'button',
47267
47346
  tabIndex: 0
47268
47347
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClear, null));
@@ -47352,6 +47431,7 @@ class cascader_Cascader extends baseComponent_BaseComponent {
47352
47431
  style: style,
47353
47432
  ref: this.triggerRef,
47354
47433
  onClick: e => this.foundation.handleClick(e),
47434
+ onKeyPress: e => this.foundation.handleSelectionEnterPress(e),
47355
47435
  "aria-invalid": this.props['aria-invalid'],
47356
47436
  "aria-errormessage": this.props['aria-errormessage'],
47357
47437
  "aria-label": this.props['aria-label'],
@@ -47794,6 +47874,7 @@ cascader_Cascader.propTypes = {
47794
47874
  'aria-errormessage': prop_types_default.a.string,
47795
47875
  'aria-describedby': prop_types_default.a.string,
47796
47876
  'aria-required': prop_types_default.a.bool,
47877
+ 'aria-label': prop_types_default.a.string,
47797
47878
  arrowIcon: prop_types_default.a.node,
47798
47879
  changeOnSelect: prop_types_default.a.bool,
47799
47880
  defaultValue: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.array]),
@@ -47888,7 +47969,8 @@ cascader_Cascader.defaultProps = {
47888
47969
  onClear: noop_default.a,
47889
47970
  onDropdownVisibleChange: noop_default.a,
47890
47971
  onListScroll: noop_default.a,
47891
- enableLeafClick: false
47972
+ enableLeafClick: false,
47973
+ 'aria-label': 'Cascader'
47892
47974
  };
47893
47975
  /* harmony default export */ var cascader_0 = (cascader_Cascader);
47894
47976
  // CONCATENATED MODULE: ../semi-foundation/collapse/constants.ts
@@ -54108,6 +54190,8 @@ var dateInput_rest = undefined && undefined.__rest || function (s, e) {
54108
54190
  }
54109
54191
  return t;
54110
54192
  };
54193
+ /* eslint-disable jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions,jsx-a11y/interactive-supports-focus */
54194
+
54111
54195
  /* eslint-disable max-lines-per-function */
54112
54196
 
54113
54197
  /* eslint-disable no-unused-vars */
@@ -54263,9 +54347,14 @@ class dateInput_DateInput extends baseComponent_BaseComponent {
54263
54347
  } = this.props;
54264
54348
  const allowClear = (rangeStart || rangeEnd) && showClear;
54265
54349
  return allowClear && !disabled ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
54350
+ role: "button",
54351
+ tabIndex: 0,
54352
+ "aria-label": "Clear range input value",
54266
54353
  className: "".concat(prefixCls, "-range-input-clearbtn"),
54267
54354
  onMouseDown: e => !disabled && this.handleRangeInputClear(e)
54268
- }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClear, null)) : null;
54355
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClear, {
54356
+ "aria-hidden": true
54357
+ })) : null;
54269
54358
  }
54270
54359
 
54271
54360
  renderRangeSuffix(suffix) {
@@ -54366,6 +54455,8 @@ class dateInput_DateInput extends baseComponent_BaseComponent {
54366
54455
  validateStatus,
54367
54456
  block,
54368
54457
  prefixCls,
54458
+ multiple,
54459
+ // Whether to allow multiple values for email and file types
54369
54460
  dateFnsLocale,
54370
54461
  // No need to pass to input
54371
54462
  onBlur,
@@ -54383,10 +54474,14 @@ class dateInput_DateInput extends baseComponent_BaseComponent {
54383
54474
  rangeInputFocus,
54384
54475
  rangeSeparator
54385
54476
  } = _a,
54386
- rest = dateInput_rest(_a, ["placeholder", "type", "value", "inputValue", "inputStyle", "disabled", "showClear", "inputReadOnly", "insetLabel", "validateStatus", "block", "prefixCls", "dateFnsLocale", "onBlur", "onClear", "onFocus", "prefix", "autofocus", "size", "rangeInputStartRef", "rangeInputEndRef", "onRangeClear", "onRangeBlur", "onRangeEndTabPress", "rangeInputFocus", "rangeSeparator"]);
54477
+ rest = dateInput_rest(_a, ["placeholder", "type", "value", "inputValue", "inputStyle", "disabled", "showClear", "inputReadOnly", "insetLabel", "validateStatus", "block", "prefixCls", "multiple", "dateFnsLocale", "onBlur", "onClear", "onFocus", "prefix", "autofocus", "size", "rangeInputStartRef", "rangeInputEndRef", "onRangeClear", "onRangeBlur", "onRangeEndTabPress", "rangeInputFocus", "rangeSeparator"]);
54387
54478
 
54388
- const dateIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconCalendar, null);
54389
- const dateTimeIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconCalendarClock, null);
54479
+ const dateIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconCalendar, {
54480
+ "aria-hidden": true
54481
+ });
54482
+ const dateTimeIcon = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconCalendarClock, {
54483
+ "aria-hidden": true
54484
+ });
54390
54485
  const suffix = includes_default()(type).call(type, 'Time') ? dateTimeIcon : dateIcon;
54391
54486
  let text = '';
54392
54487
 
@@ -54441,7 +54536,6 @@ dateInput_DateInput.propTypes = {
54441
54536
  value: prop_types_default.a.array,
54442
54537
  disabled: prop_types_default.a.bool,
54443
54538
  type: prop_types_default.a.oneOf(datePicker_constants_strings.TYPE_SET),
54444
- multiple: prop_types_default.a.bool,
54445
54539
  showClear: prop_types_default.a.bool,
54446
54540
  format: prop_types_default.a.string,
54447
54541
  inputStyle: prop_types_default.a.object,
@@ -54465,7 +54559,6 @@ dateInput_DateInput.defaultProps = {
54465
54559
  onBlur: function_noop,
54466
54560
  onClear: function_noop,
54467
54561
  onFocus: function_noop,
54468
- multiple: false,
54469
54562
  type: 'date',
54470
54563
  inputStyle: {},
54471
54564
  inputReadOnly: false,
@@ -56120,7 +56213,9 @@ class navigation_Navigation extends external_root_React_commonjs2_react_commonjs
56120
56213
  ref: ref
56121
56214
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
56122
56215
  key: "double-chevron-left",
56216
+ "aria-label": "Previous year",
56123
56217
  icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconDoubleChevronLeft, {
56218
+ "aria-hidden": true,
56124
56219
  size: iconBtnSize
56125
56220
  }),
56126
56221
  size: buttonSize,
@@ -56130,7 +56225,9 @@ class navigation_Navigation extends external_root_React_commonjs2_react_commonjs
56130
56225
  style: leftButtonStyle
56131
56226
  }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
56132
56227
  key: "chevron-left",
56228
+ "aria-label": "Previous month",
56133
56229
  icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronLeft, {
56230
+ "aria-hidden": true,
56134
56231
  size: iconBtnSize
56135
56232
  }),
56136
56233
  size: buttonSize,
@@ -56146,7 +56243,9 @@ class navigation_Navigation extends external_root_React_commonjs2_react_commonjs
56146
56243
  size: buttonSize
56147
56244
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", null, monthText))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
56148
56245
  key: "chevron-right",
56246
+ "aria-label": "Next month",
56149
56247
  icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronRight, {
56248
+ "aria-hidden": true,
56150
56249
  size: iconBtnSize
56151
56250
  }),
56152
56251
  size: buttonSize,
@@ -56156,7 +56255,9 @@ class navigation_Navigation extends external_root_React_commonjs2_react_commonjs
56156
56255
  style: rightButtonStyle
56157
56256
  }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
56158
56257
  key: "double-chevron-right",
56258
+ "aria-label": "Next year",
56159
56259
  icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconDoubleChevronRight, {
56260
+ "aria-hidden": true,
56160
56261
  size: iconBtnSize
56161
56262
  }),
56162
56263
  size: buttonSize,
@@ -56426,6 +56527,8 @@ function isBetween(day, _ref) {
56426
56527
 
56427
56528
 
56428
56529
 
56530
+ /* eslint-disable jsx-a11y/click-events-have-key-events,jsx-a11y/no-noninteractive-element-interactions */
56531
+
56429
56532
  /* eslint-disable max-len */
56430
56533
 
56431
56534
 
@@ -56748,8 +56851,10 @@ class month_Month extends baseComponent_BaseComponent {
56748
56851
  const weekdaysText = map_default()(weekdays).call(weekdays, key => locale.weeks[key]);
56749
56852
 
56750
56853
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
56854
+ role: "row",
56751
56855
  className: weekdayCls
56752
56856
  }, map_default()(weekdaysText).call(weekdaysText, (E, i) => /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
56857
+ role: "columnheader",
56753
56858
  key: E + i,
56754
56859
  className: weekdayItemCls
56755
56860
  }, E)));
@@ -56784,6 +56889,7 @@ class month_Month extends baseComponent_BaseComponent {
56784
56889
  renderWeek(week, weekIndex) {
56785
56890
  const weekCls = datePicker_constants_cssClasses.WEEK;
56786
56891
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
56892
+ role: "row",
56787
56893
  className: weekCls,
56788
56894
  key: weekIndex
56789
56895
  }, map_default()(week).call(week, (day, dayIndex) => this.renderDay(day, dayIndex)));
@@ -56804,6 +56910,8 @@ class month_Month extends baseComponent_BaseComponent {
56804
56910
 
56805
56911
  if (!fullDate) {
56806
56912
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
56913
+ role: "gridcell",
56914
+ tabIndex: -1,
56807
56915
  key: dayNumber + dayIndex,
56808
56916
  className: datePicker_constants_cssClasses.DAY
56809
56917
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", null));
@@ -56841,6 +56949,11 @@ class month_Month extends baseComponent_BaseComponent {
56841
56949
  const customRender = isFunction_default()(renderFullDate);
56842
56950
 
56843
56951
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
56952
+ role: "gridcell",
56953
+ tabIndex: dayStatus.isDisabled ? -1 : 0,
56954
+ "aria-disabled": dayStatus.isDisabled,
56955
+ "aria-selected": dayStatus.isSelected,
56956
+ "aria-label": fullDate,
56844
56957
  className: !customRender ? dayCls : datePicker_constants_cssClasses.DAY,
56845
56958
  title: fullDate,
56846
56959
  key: dayNumber + dayIndex,
@@ -56854,13 +56967,16 @@ class month_Month extends baseComponent_BaseComponent {
56854
56967
 
56855
56968
  render() {
56856
56969
  const {
56857
- forwardRef
56970
+ forwardRef,
56971
+ multiple
56858
56972
  } = this.props;
56859
56973
  const weekday = this.renderDayOfWeek();
56860
56974
  const weeks = this.renderWeeks();
56861
56975
  const monthCls = classnames_default()(datePicker_constants_cssClasses.MONTH);
56862
56976
  const ref = forwardRef || this.monthRef;
56863
56977
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
56978
+ role: "grid",
56979
+ "aria-multiselectable": multiple,
56864
56980
  ref: ref,
56865
56981
  className: monthCls
56866
56982
  }, weekday, weeks);
@@ -56886,7 +57002,8 @@ month_Month.propTypes = {
56886
57002
  startDateOffset: prop_types_default.a.func,
56887
57003
  endDateOffset: prop_types_default.a.func,
56888
57004
  rangeInputFocus: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.bool]),
56889
- focusRecordsRef: prop_types_default.a.object
57005
+ focusRecordsRef: prop_types_default.a.object,
57006
+ multiple: prop_types_default.a.bool
56890
57007
  };
56891
57008
  month_Month.defaultProps = {
56892
57009
  month: new Date(),
@@ -57573,13 +57690,14 @@ class scrollItem_ScrollItem extends baseComponent_BaseComponent {
57573
57690
  transform: itemTrans
57574
57691
  } = item;
57575
57692
  const transform = typeof itemTrans === 'function' ? itemTrans : commonTrans;
57693
+ const selected = selectedIndex === index;
57576
57694
  const cls = classnames_default()({
57577
- ["".concat(scrollList_constants_cssClasses.PREFIX, "-item-sel")]: selectedIndex === index && mode !== wheelMode,
57695
+ ["".concat(scrollList_constants_cssClasses.PREFIX, "-item-sel")]: selected && mode !== wheelMode,
57578
57696
  ["".concat(scrollList_constants_cssClasses.PREFIX, "-item-disabled")]: Boolean(item.disabled)
57579
57697
  });
57580
57698
  let text = '';
57581
57699
 
57582
- if (selectedIndex === index) {
57700
+ if (selected) {
57583
57701
  if (typeof transform === 'function') {
57584
57702
  text = transform(item.value, item.text);
57585
57703
  } else {
@@ -57603,7 +57721,10 @@ class scrollItem_ScrollItem extends baseComponent_BaseComponent {
57603
57721
  external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("li", assign_default()({
57604
57722
  key: prefixKey + index
57605
57723
  }, events, {
57606
- className: cls
57724
+ className: cls,
57725
+ role: "option",
57726
+ "aria-selected": selected,
57727
+ "aria-disabled": item.disabled
57607
57728
  }), text)
57608
57729
  );
57609
57730
  });
@@ -57622,6 +57743,9 @@ class scrollItem_ScrollItem extends baseComponent_BaseComponent {
57622
57743
  className: wrapperCls,
57623
57744
  ref: this._cacheWrapperNode
57624
57745
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("ul", {
57746
+ role: "listbox",
57747
+ "aria-multiselectable": false,
57748
+ "aria-label": this.props['aria-label'],
57625
57749
  ref: this._cacheListNode
57626
57750
  }, inner));
57627
57751
  };
@@ -57679,6 +57803,9 @@ class scrollItem_ScrollItem extends baseComponent_BaseComponent {
57679
57803
  ref: this._cacheWrapperNode,
57680
57804
  onScroll: this.scrollToSelectItem
57681
57805
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("ul", {
57806
+ role: "listbox",
57807
+ "aria-label": this.props['aria-label'],
57808
+ "aria-multiselectable": false,
57682
57809
  ref: this._cacheListNode,
57683
57810
  onClick: this.clickToSelectItem
57684
57811
  }, prependList, inner, appendList)));
@@ -58701,6 +58828,7 @@ class yearAndMonth_YearAndMonth extends baseComponent_BaseComponent {
58701
58828
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(iconButton_0, {
58702
58829
  noHorizontalPadding: false,
58703
58830
  icon: /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconChevronLeft, {
58831
+ "aria-hidden": true,
58704
58832
  size: iconSize
58705
58833
  }),
58706
58834
  size: buttonSize,
@@ -58740,6 +58868,8 @@ yearAndMonth_YearAndMonth.defaultProps = {
58740
58868
 
58741
58869
 
58742
58870
 
58871
+ /* eslint-disable jsx-a11y/interactive-supports-focus,jsx-a11y/click-events-have-key-events */
58872
+
58743
58873
  /* eslint-disable react/no-did-update-set-state */
58744
58874
 
58745
58875
  /* eslint-disable max-len */
@@ -59095,7 +59225,8 @@ class monthsGrid_MonthsGrid extends baseComponent_BaseComponent {
59095
59225
  endDateOffset,
59096
59226
  density,
59097
59227
  rangeInputFocus,
59098
- syncSwitchMonth
59228
+ syncSwitchMonth,
59229
+ multiple
59099
59230
  } = this.props;
59100
59231
  let monthText = ''; // i18n monthText
59101
59232
 
@@ -59161,7 +59292,8 @@ class monthsGrid_MonthsGrid extends baseComponent_BaseComponent {
59161
59292
  onWeeksRowNumChange: weeksRowNum => this.handleWeeksRowNumChange(weeksRowNum, panelType),
59162
59293
  startDateOffset: startDateOffset,
59163
59294
  endDateOffset: endDateOffset,
59164
- focusRecordsRef: this.props.focusRecordsRef
59295
+ focusRecordsRef: this.props.focusRecordsRef,
59296
+ multiple: multiple
59165
59297
  }));
59166
59298
  }
59167
59299
 
@@ -59317,14 +59449,22 @@ class monthsGrid_MonthsGrid extends baseComponent_BaseComponent {
59317
59449
  className: switchCls,
59318
59450
  ref: current => this.adapter.setCache("switch-".concat(panelType), current)
59319
59451
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
59452
+ role: "button",
59453
+ "aria-label": "Switch to date panel",
59320
59454
  className: dateCls,
59321
59455
  onClick: e => this.foundation.showDatePanel(panelType)
59322
- }, showSwithIcon && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconCalendar, null), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
59456
+ }, showSwithIcon && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconCalendar, {
59457
+ "aria-hidden": true
59458
+ }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
59323
59459
  className: textCls
59324
59460
  }, dateText || monthText)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
59461
+ role: "button",
59462
+ "aria-label": "Switch to time panel",
59325
59463
  className: timeCls,
59326
59464
  onClick: e => this.foundation.showTimePicker(panelType, true)
59327
- }, showSwithIcon && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClock, null), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
59465
+ }, showSwithIcon && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(IconClock, {
59466
+ "aria-hidden": true
59467
+ }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
59328
59468
  className: textCls
59329
59469
  }, timeText)));
59330
59470
  }
@@ -59413,6 +59553,8 @@ monthsGrid_MonthsGrid.defaultProps = {
59413
59553
 
59414
59554
 
59415
59555
 
59556
+ /* eslint-disable jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events */
59557
+
59416
59558
 
59417
59559
 
59418
59560
 
@@ -59506,6 +59648,8 @@ var datePicker = __webpack_require__("IJ0B");
59506
59648
 
59507
59649
 
59508
59650
 
59651
+ /* eslint-disable jsx-a11y/click-events-have-key-events,jsx-a11y/interactive-supports-focus */
59652
+
59509
59653
  /* eslint-disable max-len */
59510
59654
 
59511
59655
 
@@ -60073,18 +60217,19 @@ class datePicker_DatePicker extends baseComponent_BaseComponent {
60073
60217
  onRangeEndTabPress: this.handleRangeEndTabPress
60074
60218
  });
60075
60219
 
60076
- return (
60077
- /*#__PURE__*/
60078
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events
60079
- external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
60080
- onClick: this.handleTriggerWrapperClick,
60081
- className: inputCls
60082
- }, typeof triggerRender === 'function' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(trigger_0, assign_default()({}, props, {
60083
- triggerRender: triggerRender,
60084
- componentName: "DatePicker",
60085
- componentProps: assign_default()({}, this.props)
60086
- })) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(dateInput_DateInput, assign_default()({}, props)))
60087
- );
60220
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
60221
+ // tooltip will mount a11y props to children
60222
+ // eslint-disable-next-line jsx-a11y/role-has-required-aria-props
60223
+ role: "combobox",
60224
+ "aria-label": is_array_default()(value) && value.length ? "Change date" : "Choose date",
60225
+ "aria-disabled": disabled,
60226
+ onClick: this.handleTriggerWrapperClick,
60227
+ className: inputCls
60228
+ }, typeof triggerRender === 'function' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(trigger_0, assign_default()({}, props, {
60229
+ triggerRender: triggerRender,
60230
+ componentName: "DatePicker",
60231
+ componentProps: assign_default()({}, this.props)
60232
+ })) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(dateInput_DateInput, assign_default()({}, props)));
60088
60233
  }
60089
60234
 
60090
60235
  render() {
@@ -66244,6 +66389,7 @@ class Item_NavItem extends baseComponent_BaseComponent {
66244
66389
  var _context3;
66245
66390
 
66246
66391
  let isToggleIcon = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
66392
+ let key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
66247
66393
 
66248
66394
  if (this.props.isSubNav) {
66249
66395
  return null;
@@ -66264,7 +66410,8 @@ class Item_NavItem extends baseComponent_BaseComponent {
66264
66410
  ["".concat(Item_clsPrefix, "-icon-info")]: !isToggleIcon
66265
66411
  });
66266
66412
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("i", {
66267
- className: className
66413
+ className: className,
66414
+ key: key
66268
66415
  }, Object(_utils["d" /* isSemiIcon */])(icon) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.cloneElement(icon, {
66269
66416
  size: icon.props.size || iconSize
66270
66417
  }) : icon);
@@ -66304,12 +66451,12 @@ class Item_NavItem extends baseComponent_BaseComponent {
66304
66451
 
66305
66452
  if (mode === navigation_constants_strings.MODE_VERTICAL && !limitIndent && !isCollapsed) {
66306
66453
  const iconAmount = icon && !indent ? level : level - 1;
66307
- placeholderIcons = times_default()(iconAmount, () => this.renderIcon(null, navigation_constants_strings.ICON_POS_RIGHT, false));
66454
+ placeholderIcons = times_default()(iconAmount, index => this.renderIcon(null, navigation_constants_strings.ICON_POS_RIGHT, false, index));
66308
66455
  }
66309
66456
 
66310
- itemChildren = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Fragment, null, placeholderIcons, this.context.toggleIconPosition === navigation_constants_strings.TOGGLE_ICON_LEFT && this.renderIcon(toggleIcon, navigation_constants_strings.ICON_POS_RIGHT, true), icon || indent || isInSubNav ? this.renderIcon(icon, navigation_constants_strings.ICON_POS_LEFT) : null, !isNullOrUndefined(text) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
66457
+ itemChildren = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.Fragment, null, placeholderIcons, this.context.toggleIconPosition === navigation_constants_strings.TOGGLE_ICON_LEFT && this.renderIcon(toggleIcon, navigation_constants_strings.ICON_POS_RIGHT, true, 'key-toggle-pos-right'), icon || indent || isInSubNav ? this.renderIcon(icon, navigation_constants_strings.ICON_POS_LEFT, false, 'key-position-left') : null, !isNullOrUndefined(text) ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
66311
66458
  className: "".concat(navigation_constants_cssClasses.PREFIX, "-item-text")
66312
- }, text) : '', this.context.toggleIconPosition === navigation_constants_strings.TOGGLE_ICON_RIGHT && this.renderIcon(toggleIcon, navigation_constants_strings.ICON_POS_RIGHT, true));
66459
+ }, text) : '', this.context.toggleIconPosition === navigation_constants_strings.TOGGLE_ICON_RIGHT && this.renderIcon(toggleIcon, navigation_constants_strings.ICON_POS_RIGHT, true, 'key-toggle-pos-right'));
66313
66460
  }
66314
66461
 
66315
66462
  if (typeof link === 'string') {
@@ -66750,7 +66897,7 @@ class SubNav_SubNav extends baseComponent_BaseComponent {
66750
66897
  if (mode === navigation_constants_strings.MODE_VERTICAL && !limitIndent && !isCollapsed) {
66751
66898
  /* Different icons' amount means different indents.*/
66752
66899
  const iconAmount = icon && !indent ? level : level - 1;
66753
- placeholderIcons = times_default()(iconAmount, index => this.renderIcon(null, navigation_constants_strings.ICON_POS_RIGHT, false, undefined, index));
66900
+ placeholderIcons = times_default()(iconAmount, index => this.renderIcon(null, navigation_constants_strings.ICON_POS_RIGHT, false, false, index));
66754
66901
  }
66755
66902
 
66756
66903
  const titleDiv = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
@@ -66762,7 +66909,7 @@ class SubNav_SubNav extends baseComponent_BaseComponent {
66762
66909
  onKeyPress: this.handleKeyPress
66763
66910
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("div", {
66764
66911
  className: "".concat(prefixCls, "-item-inner")
66765
- }, placeholderIcons, this.context.toggleIconPosition === navigation_constants_strings.TOGGLE_ICON_LEFT && this.renderIcon(toggleIconType, navigation_constants_strings.ICON_POS_RIGHT, withTransition, true, 'key-toggle-position-left'), icon || indent || isInSubNav && mode !== navigation_constants_strings.MODE_HORIZONTAL ? this.renderIcon(icon, navigation_constants_strings.ICON_POS_LEFT, undefined, undefined, 'key-inSubNav-position-left') : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
66912
+ }, placeholderIcons, this.context.toggleIconPosition === navigation_constants_strings.TOGGLE_ICON_LEFT && this.renderIcon(toggleIconType, navigation_constants_strings.ICON_POS_RIGHT, withTransition, true, 'key-toggle-position-left'), icon || indent || isInSubNav && mode !== navigation_constants_strings.MODE_HORIZONTAL ? this.renderIcon(icon, navigation_constants_strings.ICON_POS_LEFT, false, false, 'key-inSubNav-position-left') : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement("span", {
66766
66913
  className: "".concat(prefixCls, "-item-text")
66767
66914
  }, text), this.context.toggleIconPosition === navigation_constants_strings.TOGGLE_ICON_RIGHT && this.renderIcon(toggleIconType, navigation_constants_strings.ICON_POS_RIGHT, withTransition, true, 'key-toggle-position-right')));
66768
66915
  return titleDiv;
@@ -84822,8 +84969,13 @@ class Body_Body extends baseComponent_BaseComponent {
84822
84969
  const {
84823
84970
  flattenedColumns,
84824
84971
  getCellWidths
84825
- } = _this.context;
84826
- const cellWidths = getCellWidths(flattenedColumns);
84972
+ } = _this.context; // we use memoized cellWidths to avoid re-render expanded row (fix #686)
84973
+
84974
+ if (flattenedColumns !== _this.flattenedColumns) {
84975
+ _this.flattenedColumns = flattenedColumns;
84976
+ _this.cellWidths = getCellWidths(flattenedColumns);
84977
+ }
84978
+
84827
84979
  return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createElement(ExpandedRow_TableExpandedRow, {
84828
84980
  style: style,
84829
84981
  components: components,
@@ -84835,7 +84987,7 @@ class Body_Body extends baseComponent_BaseComponent {
84835
84987
  index: index,
84836
84988
  virtualized: virtualized,
84837
84989
  key: genExpandedRowKey(key),
84838
- cellWidths: cellWidths
84990
+ cellWidths: _this.cellWidths
84839
84991
  });
84840
84992
  };
84841
84993
  /**
@@ -85013,7 +85165,9 @@ class Body_Body extends baseComponent_BaseComponent {
85013
85165
  };
85014
85166
  this.listRef = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default.a.createRef();
85015
85167
  const {
85016
- getVirtualizedListRef
85168
+ getVirtualizedListRef,
85169
+ flattenedColumns,
85170
+ getCellWidths
85017
85171
  } = context;
85018
85172
 
85019
85173
  if (getVirtualizedListRef) {
@@ -85025,6 +85179,8 @@ class Body_Body extends baseComponent_BaseComponent {
85025
85179
  }
85026
85180
 
85027
85181
  this.foundation = new bodyFoundation_TableBodyFoundation(this.adapter);
85182
+ this.flattenedColumns = flattenedColumns;
85183
+ this.cellWidths = getCellWidths(flattenedColumns);
85028
85184
  this.observer = null;
85029
85185
  }
85030
85186
 
@@ -101249,7 +101405,7 @@ class foundation_FormFoundation extends foundation {
101249
101405
  } // update formState value
101250
101406
 
101251
101407
 
101252
- updateStateValue(field, value, opts) {
101408
+ updateStateValue(field, value, opts, callback) {
101253
101409
  const notNotify = opts && opts.notNotify;
101254
101410
  const notUpdate = opts && opts.notUpdate;
101255
101411
  const fieldAllowEmpty = opts && opts.fieldAllowEmpty;
@@ -101281,7 +101437,7 @@ class foundation_FormFoundation extends foundation {
101281
101437
  }
101282
101438
 
101283
101439
  if (!notUpdate) {
101284
- this._adapter.forceUpdate();
101440
+ this._adapter.forceUpdate(callback);
101285
101441
  }
101286
101442
  } // get touched from formState
101287
101443
 
@@ -101295,7 +101451,7 @@ class foundation_FormFoundation extends foundation {
101295
101451
  } // update formState touched
101296
101452
 
101297
101453
 
101298
- updateStateTouched(field, isTouched, opts) {
101454
+ updateStateTouched(field, isTouched, opts, callback) {
101299
101455
  const notNotify = opts && opts.notNotify;
101300
101456
  const notUpdate = opts && opts.notUpdate;
101301
101457
  object_set(this.data.touched, field, isTouched);
@@ -101305,7 +101461,7 @@ class foundation_FormFoundation extends foundation {
101305
101461
  }
101306
101462
 
101307
101463
  if (!notUpdate) {
101308
- this._adapter.forceUpdate();
101464
+ this._adapter.forceUpdate(callback);
101309
101465
  }
101310
101466
  } // get error from formState
101311
101467
 
@@ -101319,7 +101475,7 @@ class foundation_FormFoundation extends foundation {
101319
101475
  } // update formState error
101320
101476
 
101321
101477
 
101322
- updateStateError(field, error, opts) {
101478
+ updateStateError(field, error, opts, callback) {
101323
101479
  const notNotify = opts && opts.notNotify;
101324
101480
  const notUpdate = opts && opts.notUpdate;
101325
101481
  object_set(this.data.errors, field, error); // The setError caused by centralized validation does not need to trigger notify, otherwise it will be called too frequently, as many times as there are fields
@@ -101330,7 +101486,7 @@ class foundation_FormFoundation extends foundation {
101330
101486
  }
101331
101487
 
101332
101488
  if (!notUpdate) {
101333
- this._adapter.forceUpdate();
101489
+ this._adapter.forceUpdate(callback);
101334
101490
  }
101335
101491
  } // For internal use in the FormApi Operating Field
101336
101492
 
@@ -101349,22 +101505,21 @@ class foundation_FormFoundation extends foundation {
101349
101505
  // At this time, first modify formState directly, then find out the subordinate fields and drive them to update
101350
101506
  // Eg: peoples: [0, 2, 3]. Each value of the peoples array corresponds to an Input Field
101351
101507
  // When the user directly calls formA pi.set Value ('peoples', [2,3])
101352
- this.updateStateValue(field, newValue, opts);
101353
-
101354
- let nestedFields = this._getNestedField(field);
101355
-
101356
- if (nestedFields.size) {
101357
- for_each_default()(nestedFields).call(nestedFields, fieldStaff => {
101358
- let fieldPath = fieldStaff.field;
101359
- let newFieldVal = object_get(instance_values_default()(this.data), fieldPath);
101360
- let nestedBatchUpdateOpts = {
101361
- notNotify: true,
101362
- notUpdate: true
101363
- };
101364
- fieldStaff.fieldApi.setValue(newFieldVal, nestedBatchUpdateOpts);
101365
- });
101366
- } // If the reset happens to be, then update the updateKey corresponding to ArrayField to render it again
101367
-
101508
+ this.updateStateValue(field, newValue, opts, () => {
101509
+ let nestedFields = this._getNestedField(field);
101510
+
101511
+ if (nestedFields.size) {
101512
+ for_each_default()(nestedFields).call(nestedFields, fieldStaff => {
101513
+ let fieldPath = fieldStaff.field;
101514
+ let newFieldVal = object_get(instance_values_default()(this.data), fieldPath);
101515
+ let nestedBatchUpdateOpts = {
101516
+ notNotify: true,
101517
+ notUpdate: true
101518
+ };
101519
+ fieldStaff.fieldApi.setValue(newFieldVal, nestedBatchUpdateOpts);
101520
+ });
101521
+ }
101522
+ }); // If the reset happens to be, then update the updateKey corresponding to ArrayField to render it again
101368
101523
 
101369
101524
  if (this.getArrayField(field)) {
101370
101525
  this.updateArrayField(field, {
@@ -101382,21 +101537,21 @@ class foundation_FormFoundation extends foundation {
101382
101537
  if (fieldApi) {
101383
101538
  fieldApi.setError(newError, opts);
101384
101539
  } else {
101385
- this.updateStateError(field, newError, opts);
101386
-
101387
- let nestedFields = this._getNestedField(field);
101388
-
101389
- if (nestedFields.size) {
101390
- for_each_default()(nestedFields).call(nestedFields, fieldStaff => {
101391
- let fieldPath = fieldStaff.field;
101392
- let newFieldError = object_get(this.data.errors, fieldPath);
101393
- let nestedBatchUpdateOpts = {
101394
- notNotify: true,
101395
- notUpdate: true
101396
- };
101397
- fieldStaff.fieldApi.setError(newFieldError, nestedBatchUpdateOpts);
101398
- });
101399
- }
101540
+ this.updateStateError(field, newError, opts, () => {
101541
+ let nestedFields = this._getNestedField(field);
101542
+
101543
+ if (nestedFields.size) {
101544
+ for_each_default()(nestedFields).call(nestedFields, fieldStaff => {
101545
+ let fieldPath = fieldStaff.field;
101546
+ let newFieldError = object_get(this.data.errors, fieldPath);
101547
+ let nestedBatchUpdateOpts = {
101548
+ notNotify: true,
101549
+ notUpdate: true
101550
+ };
101551
+ fieldStaff.fieldApi.setError(newFieldError, nestedBatchUpdateOpts);
101552
+ });
101553
+ }
101554
+ });
101400
101555
 
101401
101556
  if (this.getArrayField(field)) {
101402
101557
  this.updateArrayField(field, {
@@ -101412,21 +101567,21 @@ class foundation_FormFoundation extends foundation {
101412
101567
  if (fieldApi) {
101413
101568
  fieldApi.setTouched(isTouched, opts);
101414
101569
  } else {
101415
- this.updateStateTouched(field, isTouched, opts);
101416
-
101417
- let nestedFields = this._getNestedField(field);
101418
-
101419
- if (nestedFields.size) {
101420
- for_each_default()(nestedFields).call(nestedFields, fieldStaff => {
101421
- let fieldPath = fieldStaff.field;
101422
- let newFieldTouch = object_get(this.data.touched, fieldPath);
101423
- let nestedBatchUpdateOpts = {
101424
- notNotify: true,
101425
- notUpdate: true
101426
- };
101427
- fieldStaff.fieldApi.setTouched(newFieldTouch, nestedBatchUpdateOpts);
101428
- });
101429
- }
101570
+ this.updateStateTouched(field, isTouched, opts, () => {
101571
+ let nestedFields = this._getNestedField(field);
101572
+
101573
+ if (nestedFields.size) {
101574
+ for_each_default()(nestedFields).call(nestedFields, fieldStaff => {
101575
+ let fieldPath = fieldStaff.field;
101576
+ let newFieldTouch = object_get(this.data.touched, fieldPath);
101577
+ let nestedBatchUpdateOpts = {
101578
+ notNotify: true,
101579
+ notUpdate: true
101580
+ };
101581
+ fieldStaff.fieldApi.setTouched(newFieldTouch, nestedBatchUpdateOpts);
101582
+ });
101583
+ }
101584
+ });
101430
101585
 
101431
101586
  if (this.getArrayField(field)) {
101432
101587
  this.updateArrayField(field, {
@@ -102582,7 +102737,7 @@ function withField(Component, opts) {
102582
102737
  text: label || field,
102583
102738
  id: labelId,
102584
102739
  required: required,
102585
- name: name || field,
102740
+ name: a11yId || name || field,
102586
102741
  width: mergeLabelWidth,
102587
102742
  align: mergeLabelAlign
102588
102743
  }, needSpread));
@@ -102784,8 +102939,8 @@ class baseForm_Form extends baseComponent_BaseComponent {
102784
102939
  notifySubmitFail: (errors, values) => {
102785
102940
  this.props.onSubmitFail(errors, values);
102786
102941
  },
102787
- forceUpdate: () => {
102788
- this.forceUpdate();
102942
+ forceUpdate: callback => {
102943
+ this.forceUpdate(callback);
102789
102944
  },
102790
102945
  notifyChange: formState => {
102791
102946
  this.props.onChange(formState);