shineout 3.0.0-alpha.19 → 3.0.0-alpha.20

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.
package/cjs/index.js CHANGED
@@ -456,6 +456,6 @@ exports.TYPE = _TYPE;
456
456
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
457
457
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
458
458
  var _default = {
459
- version: '3.0.0-alpha.19'
459
+ version: '3.0.0-alpha.20'
460
460
  };
461
461
  exports.default = _default;
package/dist/shineout.js CHANGED
@@ -4299,13 +4299,16 @@ exports["default"] = void 0;
4299
4299
  var dropdownTokens = {
4300
4300
  dropdownCaretMarginLeft: 'Margin-4',
4301
4301
  dropdownListBorderRadius: 'Radius-4',
4302
- dropdownListPadding: 'Padding-4',
4302
+ dropdownListPaddingX: 'Padding-4',
4303
+ dropdownListPaddingY: 'Padding-4',
4303
4304
  dropdownListFontSize: '14/regular',
4304
4305
  dropdownListSmallBorderRadius: 'Radius-4',
4305
- dropdownListSmallPadding: '[object Object]',
4306
+ dropdownListSmallPaddingX: 'Padding-4',
4307
+ dropdownListSmallPaddingY: 'Padding-4',
4306
4308
  dropdownListSmallFontSize: '12/regular',
4307
4309
  dropdownListLargeBorderRadius: 'Radius-4',
4308
- dropdownListLargePadding: '[object Object]',
4310
+ dropdownListLargePaddingX: 'Padding-4',
4311
+ dropdownListLargePaddingY: 'Padding-4',
4309
4312
  dropdownListLargeFontSize: '16/regular',
4310
4313
  dropdownListBackgroundColor: 'Neutral-fill-1',
4311
4314
  dropdownListBorderColor: 'Neutral-border-1',
@@ -19101,7 +19104,7 @@ var handleStyle = function handleStyle(style) {
19101
19104
  };
19102
19105
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
19103
19106
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
19104
- /* harmony default export */ var version = ('3.0.0-alpha.19');
19107
+ /* harmony default export */ var version = ('3.0.0-alpha.20');
19105
19108
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
19106
19109
 
19107
19110
 
@@ -22074,7 +22077,7 @@ var dropdown = {
22074
22077
  fontSize: esm/* default.dropdownListFontSize */.ZP.dropdownListFontSize,
22075
22078
  border: "".concat(esm/* default.dropdownListBorderWidth */.ZP.dropdownListBorderWidth, " solid ").concat(esm/* default.dropdownListBorderColor */.ZP.dropdownListBorderColor),
22076
22079
  borderRadius: esm/* default.dropdownListBorderRadius */.ZP.dropdownListBorderRadius,
22077
- padding: "".concat(esm/* default.dropdownListPadding */.ZP.dropdownListPadding),
22080
+ padding: "".concat(esm/* default.dropdownListPaddingY */.ZP.dropdownListPaddingY, " ").concat(esm/* default.dropdownListPaddingX */.ZP.dropdownListPaddingX),
22078
22081
  background: esm/* default.dropdownListBackgroundColor */.ZP.dropdownListBackgroundColor,
22079
22082
  boxShadow: esm/* default.dropdownListBoxShadow */.ZP.dropdownListBoxShadow,
22080
22083
  width: 'max-content',
@@ -22087,12 +22090,24 @@ var dropdown = {
22087
22090
  listSmall: {
22088
22091
  fontSize: esm/* default.dropdownListSmallFontSize */.ZP.dropdownListSmallFontSize,
22089
22092
  borderRadius: esm/* default.dropdownListSmallBorderRadius */.ZP.dropdownListSmallBorderRadius,
22090
- padding: "".concat(esm/* default.dropdownListSmallPaddingY */.ZP.dropdownListSmallPaddingY)
22093
+ padding: "".concat(esm/* default.dropdownListSmallPaddingY */.ZP.dropdownListSmallPaddingY, " ").concat(esm/* default.dropdownListSmallPaddingX */.ZP.dropdownListSmallPaddingX)
22091
22094
  },
22092
22095
  listLarge: {
22093
22096
  fontSize: esm/* default.dropdownListLargeFontSize */.ZP.dropdownListLargeFontSize,
22094
22097
  borderRadius: esm/* default.dropdownListLargeBorderRadius */.ZP.dropdownListLargeBorderRadius,
22095
- padding: "".concat(esm/* default.dropdownListLargePaddingY */.ZP.dropdownListLargePaddingY)
22098
+ padding: "".concat(esm/* default.dropdownListLargePaddingY */.ZP.dropdownListLargePaddingY, " ").concat(esm/* default.dropdownListLargePaddingX */.ZP.dropdownListLargePaddingX)
22099
+ },
22100
+ listHasChildren: {
22101
+ '$wrapper[data-position^="left"] > &': {
22102
+ '& > $itemWrapper > $item': {
22103
+ '&::before': {
22104
+ content: '""',
22105
+ width: '1em',
22106
+ marginLeft: esm/* default.dropdownCaretMarginLeft */.ZP.dropdownCaretMarginLeft,
22107
+ display: 'inline-block'
22108
+ }
22109
+ }
22110
+ }
22096
22111
  },
22097
22112
  boxList: {
22098
22113
  padding: "".concat(esm/* default.dropdownColumnPaddingY */.ZP.dropdownColumnPaddingY, " ").concat(esm/* default.dropdownColumnPaddingX */.ZP.dropdownColumnPaddingX),
@@ -22109,9 +22124,15 @@ var dropdown = {
22109
22124
  '$wrapper[data-position^="right"] > $button & > svg': {
22110
22125
  transform: 'rotate(-90deg)'
22111
22126
  },
22112
- '$wrapper[data-position^="left"] > $button & > svg': {
22113
- transform: 'rotate(90deg)'
22127
+ '$wrapper[data-position^="left"] > $button &': {
22128
+ marginLeft: '0',
22129
+ marginRight: esm/* default.dropdownCaretMarginLeft */.ZP.dropdownCaretMarginLeft,
22130
+ textAlign: 'right',
22131
+ '& > svg': {
22132
+ transform: 'rotate(90deg)'
22133
+ }
22114
22134
  },
22135
+ '$wrapper[data-position^="left"] > $button & > svg': {},
22115
22136
  '$wrapper[data-position^="top"] > $button & > svg': {
22116
22137
  transform: 'rotate(180deg)'
22117
22138
  }
@@ -22865,7 +22886,11 @@ var ImageStyle = {
22865
22886
  outline: 'none',
22866
22887
  width: 32,
22867
22888
  height: 32,
22868
- color: '#666C7C'
22889
+ color: '#666C7C',
22890
+ // hover
22891
+ '&:hover': {
22892
+ color: '#666C7C'
22893
+ }
22869
22894
  },
22870
22895
  // gallery
22871
22896
  gallery: {
@@ -25414,7 +25439,10 @@ var selectStyle = objectSpread2_default()(objectSpread2_default()({
25414
25439
  '& $compressedWrapper': {
25415
25440
  flexWrap: 'nowrap'
25416
25441
  },
25417
- '& $placeholder': {}
25442
+ '& $placeholder': {},
25443
+ '& $arrowIconOpen': {
25444
+ transform: 'none'
25445
+ }
25418
25446
  },
25419
25447
  multipleCompressedWrapper: {
25420
25448
  flexWrap: 'nowrap'
@@ -27790,7 +27818,7 @@ var getCardStyle = function getCardStyle() {
27790
27818
  };
27791
27819
  var getLineStyle = function getLineStyle() {
27792
27820
  return {
27793
- '&[data-soui-position^="left-"][data-soui-shape="line"]': objectSpread2_default()({
27821
+ '&[data-soui-position^="left-"][data-soui-shape="line"]': objectSpread2_default()(objectSpread2_default()({
27794
27822
  '& $hr': {
27795
27823
  right: 0,
27796
27824
  width: 1,
@@ -27801,8 +27829,14 @@ var getLineStyle = function getLineStyle() {
27801
27829
  bottom: 0,
27802
27830
  right: 0,
27803
27831
  width: 2
27804
- })),
27805
- '&[data-soui-position^="right-"][data-soui-shape="line"]': objectSpread2_default()({
27832
+ })), {}, {
27833
+ '& :not([data-soui-state="active"])$tab': {
27834
+ '&:after': {
27835
+ display: 'none'
27836
+ }
27837
+ }
27838
+ }),
27839
+ '&[data-soui-position^="right-"][data-soui-shape="line"]': objectSpread2_default()(objectSpread2_default()({
27806
27840
  '& $hr': {
27807
27841
  left: 0,
27808
27842
  width: 1,
@@ -27813,7 +27847,13 @@ var getLineStyle = function getLineStyle() {
27813
27847
  bottom: 0,
27814
27848
  left: 0,
27815
27849
  width: 2
27816
- })),
27850
+ })), {}, {
27851
+ '& :not([data-soui-state="active"])$tab': {
27852
+ '&:after': {
27853
+ display: 'none'
27854
+ }
27855
+ }
27856
+ }),
27817
27857
  '&[data-soui-position^="top-"][data-soui-shape="line"]': objectSpread2_default()({
27818
27858
  '& $hr': {
27819
27859
  bottom: 0,
@@ -27826,7 +27866,7 @@ var getLineStyle = function getLineStyle() {
27826
27866
  right: 0,
27827
27867
  height: 2
27828
27868
  })),
27829
- '&[data-soui-position^="bottom-"][data-soui-shape="line"]': objectSpread2_default()({
27869
+ '&[data-soui-position^="bottom-"][data-soui-shape="line"]': objectSpread2_default()(objectSpread2_default()({
27830
27870
  '& $hr': {
27831
27871
  top: 0,
27832
27872
  height: 1,
@@ -27837,7 +27877,13 @@ var getLineStyle = function getLineStyle() {
27837
27877
  left: 0,
27838
27878
  right: 0,
27839
27879
  height: 2
27840
- }))
27880
+ })), {}, {
27881
+ '& :not([data-soui-state="active"])$tab': {
27882
+ '&:after': {
27883
+ display: 'none'
27884
+ }
27885
+ }
27886
+ })
27841
27887
  };
27842
27888
  };
27843
27889
  var getDashStyle = function getDashStyle() {
@@ -28252,6 +28298,17 @@ var tabsStyle = {
28252
28298
  color: esm/* default.tabsDisabledFontColor */.ZP.tabsDisabledFontColor,
28253
28299
  cursor: 'not-allowed'
28254
28300
  },
28301
+ '&:not([data-soui-state="active"])': {
28302
+ '&:after': {
28303
+ position: 'absolute',
28304
+ content: '""',
28305
+ bottom: 0,
28306
+ left: 0,
28307
+ width: '100%',
28308
+ height: 1,
28309
+ background: esm/* default.tabsBorderColor */.ZP.tabsBorderColor
28310
+ }
28311
+ },
28255
28312
  '&:not([data-soui-state="active"]):not([data-soui-state="disabled"]):hover $lineInner': {
28256
28313
  background: esm/* default.tabsHoverBackgroundColor */.ZP.tabsHoverBackgroundColor
28257
28314
  },
@@ -29634,7 +29691,9 @@ var treeSelectStyle = objectSpread2_default()(objectSpread2_default()({
29634
29691
  backgroundColor: esm/* default.treeSelectPanelBackgroundColor */.ZP.treeSelectPanelBackgroundColor,
29635
29692
  boxShadow: esm/* default.treeSelectPanelShadow */.ZP.treeSelectPanelShadow,
29636
29693
  borderRadius: esm/* default.treeSelectPanelRadius */.ZP.treeSelectPanelRadius,
29637
- transformOrigin: '0 0'
29694
+ transformOrigin: '0 0',
29695
+ width: 'max-content',
29696
+ maxWidth: '640px'
29638
29697
  },
29639
29698
  clearable: {},
29640
29699
  clearIcon: {
@@ -30682,11 +30741,15 @@ var getPositionStyle = function getPositionStyle(position, config) {
30682
30741
  var _ref = config || {},
30683
30742
  _ref$popupGap = _ref.popupGap,
30684
30743
  popupGap = _ref$popupGap === void 0 ? 0 : _ref$popupGap;
30685
- var mainMargin = "calc(100% + ".concat(popupGap, "px");
30686
- var halfMargin = "calc(50% + ".concat(popupGap, "px");
30744
+ var mainMargin = "calc(100% + ".concat(popupGap, "px)");
30745
+ var halfMargin = "calc(50% + ".concat(popupGap, "px)");
30687
30746
  var newStyle = {
30688
30747
  zIndex: config === null || config === void 0 ? void 0 : config.zIndex
30689
30748
  };
30749
+ if (config !== null && config !== void 0 && config.fixedWidth) {
30750
+ var key = config.fixedWidth === 'min' ? 'minWidth' : 'width';
30751
+ newStyle[key] = '100%';
30752
+ }
30690
30753
  if (position === 'drop-down') {
30691
30754
  newStyle.top = mainMargin;
30692
30755
  newStyle.left = 0;
@@ -30957,6 +31020,12 @@ function isInDocument(element) {
30957
31020
 
30958
31021
  var horizontalPosition = ['left-bottom', 'left-top', 'right-bottom', 'right-top', 'left', 'right'];
30959
31022
  var verticalPosition = ['bottom-left', 'bottom-right', 'top-left', 'top-right', 'bottom', 'top'];
31023
+ var hideStyle = {
31024
+ pointerEvents: 'none',
31025
+ position: 'absolute',
31026
+ zIndex: -1000,
31027
+ opacity: 0
31028
+ };
30960
31029
  var usePositionStyle = function usePositionStyle(config) {
30961
31030
  var _ref = config || {},
30962
31031
  absolute = _ref.absolute,
@@ -30968,17 +31037,13 @@ var usePositionStyle = function usePositionStyle(config) {
30968
31037
  _ref$popupGap = _ref.popupGap,
30969
31038
  popupGap = _ref$popupGap === void 0 ? 2 : _ref$popupGap,
30970
31039
  getContainer = _ref.getContainer,
30971
- parentEl = _ref.parentEl,
30972
- popupEl = _ref.popupEl,
30973
- visibleEl = _ref.visibleEl,
31040
+ parentElRef = _ref.parentElRef,
31041
+ popupElRef = _ref.popupElRef,
31042
+ scrollElRef = _ref.scrollElRef,
30974
31043
  updateKey = _ref.updateKey,
30975
31044
  adjust = _ref.adjust;
30976
31045
  // 初次渲染无样式的时候, 隐藏展示
30977
- var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
30978
- pointerEvents: 'none',
30979
- position: 'absolute',
30980
- zIndex: -1000
30981
- }),
31046
+ var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(hideStyle),
30982
31047
  _useState2 = slicedToArray_default()(_useState, 2),
30983
31048
  style = _useState2[0],
30984
31049
  setStyle = _useState2[1];
@@ -31018,12 +31083,12 @@ var usePositionStyle = function usePositionStyle(config) {
31018
31083
  return newPosition;
31019
31084
  };
31020
31085
  var getPopUpInfo = function getPopUpInfo(parentRect) {
31021
- var _popupEl$parentElemen;
31022
- if (!popupEl) return {
31086
+ var _popupElRef$current$p;
31087
+ if (!popupElRef.current) return {
31023
31088
  width: 0,
31024
31089
  height: 0
31025
31090
  };
31026
- var el = popupEl.cloneNode(true);
31091
+ var el = popupElRef.current.cloneNode(true);
31027
31092
  el.style.visibility = 'true';
31028
31093
  el.style.opacity = '0';
31029
31094
  el.style.pointerEvents = 'none';
@@ -31032,7 +31097,7 @@ var usePositionStyle = function usePositionStyle(config) {
31032
31097
  var widthKey = fixedWidth === 'min' ? 'minWidth' : 'width';
31033
31098
  el.style[widthKey] = parentRect.width + 'px';
31034
31099
  }
31035
- (_popupEl$parentElemen = popupEl.parentElement) === null || _popupEl$parentElemen === void 0 ? void 0 : _popupEl$parentElemen.appendChild(el);
31100
+ (_popupElRef$current$p = popupElRef.current.parentElement) === null || _popupElRef$current$p === void 0 ? void 0 : _popupElRef$current$p.appendChild(el);
31036
31101
  var height = el.offsetHeight;
31037
31102
  var width = el.offsetWidth;
31038
31103
  el.remove();
@@ -31053,6 +31118,7 @@ var usePositionStyle = function usePositionStyle(config) {
31053
31118
  var targetPosition = position;
31054
31119
  var rootContainer = getContainer() || document.body;
31055
31120
  var containerRect = rootContainer.getBoundingClientRect();
31121
+ var bodyRect = (document.documentElement || document.body).getBoundingClientRect();
31056
31122
  var containerScrollBarWidth = rootContainer.offsetWidth - rootContainer.clientWidth;
31057
31123
  var containerScroll = {
31058
31124
  left: rootContainer.scrollLeft,
@@ -31071,20 +31137,20 @@ var usePositionStyle = function usePositionStyle(config) {
31071
31137
  style.left = rect.left - containerRect.left + containerScroll.left;
31072
31138
  style.transform = '';
31073
31139
  if (adjust) {
31074
- overRight = rect.left + context.popUpWidth - containerRect.right + containerScrollBarWidth;
31140
+ overRight = rect.left + context.popUpWidth - bodyRect.right + containerScrollBarWidth;
31075
31141
  }
31076
31142
  } else if (h === 'right') {
31077
31143
  style.right = containerRect.right - rect.right + containerScrollBarWidth - containerScroll.left;
31078
31144
  style.left = 'auto';
31079
31145
  style.transform = '';
31080
- if (adjust) overLeft = containerRect.left - (rect.right - context.popUpWidth);
31146
+ if (adjust) overLeft = bodyRect.left - (rect.right - context.popUpWidth);
31081
31147
  } else {
31082
31148
  // 居中对齐
31083
31149
  style.left = rect.left + rect.width / 2 - containerRect.left + containerScroll.left;
31084
31150
  style.transform = 'translateX(-50%)';
31085
31151
  if (adjust) {
31086
- overRight = rect.left + rect.width / 2 + context.popUpWidth / 2 - containerRect.width + containerScrollBarWidth;
31087
- overLeft = containerRect.left - (rect.left + rect.width / 2 - context.popUpWidth / 2);
31152
+ overRight = rect.left + rect.width / 2 + context.popUpWidth / 2 - bodyRect.width + containerScrollBarWidth;
31153
+ overLeft = bodyRect.left - (rect.left + rect.width / 2 - context.popUpWidth / 2);
31088
31154
  }
31089
31155
  }
31090
31156
  if (adjust) {
@@ -31131,12 +31197,13 @@ var usePositionStyle = function usePositionStyle(config) {
31131
31197
  return style;
31132
31198
  };
31133
31199
  var getAbsoluteStyle = function getAbsoluteStyle(position) {
31134
- if (!parentEl) return;
31200
+ if (!parentElRef.current) return hideStyle;
31135
31201
  var rect = context.parentRect;
31136
- if (visibleEl) {
31137
- var visibleRect = (visibleEl === null || visibleEl === void 0 ? void 0 : visibleEl.getBoundingClientRect()) || {};
31202
+ if (scrollElRef !== null && scrollElRef !== void 0 && scrollElRef.current) {
31203
+ var _scrollElRef$current;
31204
+ var visibleRect = ((_scrollElRef$current = scrollElRef.current) === null || _scrollElRef$current === void 0 ? void 0 : _scrollElRef$current.getBoundingClientRect()) || {};
31138
31205
  if (rect.bottom < visibleRect.top || rect.top > visibleRect.bottom || rect.right < visibleRect.left || rect.left > visibleRect.right) {
31139
- return;
31206
+ return hideStyle;
31140
31207
  }
31141
31208
  }
31142
31209
  var style = getAbsolutePositionStyle(rect, position);
@@ -31147,8 +31214,8 @@ var usePositionStyle = function usePositionStyle(config) {
31147
31214
  var _ref2 = config || {},
31148
31215
  position = _ref2.position,
31149
31216
  absolute = _ref2.absolute;
31150
- if (!position || !show || !parentEl) return style;
31151
- context.parentRect = parentEl.getBoundingClientRect();
31217
+ if (!position || !show || !parentElRef.current) return style;
31218
+ context.parentRect = parentElRef.current.getBoundingClientRect();
31152
31219
  if (adjust) {
31153
31220
  var popupInfo = getPopUpInfo(context.parentRect);
31154
31221
  context.popUpHeight = popupInfo.height;
@@ -31158,7 +31225,8 @@ var usePositionStyle = function usePositionStyle(config) {
31158
31225
  if (!absolute) {
31159
31226
  newStyle = getPositionStyle(realPosition, {
31160
31227
  popupGap: popupGap,
31161
- zIndex: zIndex
31228
+ zIndex: zIndex,
31229
+ fixedWidth: fixedWidth
31162
31230
  });
31163
31231
  } else {
31164
31232
  newStyle = getAbsoluteStyle(realPosition);
@@ -31175,7 +31243,7 @@ var usePositionStyle = function usePositionStyle(config) {
31175
31243
  setStyle(newStyle);
31176
31244
  }
31177
31245
  });
31178
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(updateStyle, [show, position, absolute, parentEl, visibleEl, updateKey]);
31246
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(updateStyle, [show, position, absolute, updateKey]);
31179
31247
  return style;
31180
31248
  };
31181
31249
  /* harmony default export */ var use_position_style = ((/* unused pure expression or super */ null && (usePositionStyle)));
@@ -31791,8 +31859,13 @@ var getRootContainer = function getRootContainer(props) {
31791
31859
  if (!root || isInDocument(root) === false) {
31792
31860
  root = document.createElement('div');
31793
31861
  root.setAttribute('style', 'contain: size');
31862
+ if (defaultContainer) {
31863
+ defaultContainer.appendChild(root);
31864
+ }
31794
31865
  }
31795
- if (defaultContainer && root.parentElement !== defaultContainer) {
31866
+ if (is_isBrowser() && defaultContainer &&
31867
+ // body在微前端会被劫持导致死循环
31868
+ defaultContainer !== document.body && root.parentElement !== defaultContainer) {
31796
31869
  defaultContainer.appendChild(root);
31797
31870
  }
31798
31871
  return root;
@@ -31851,13 +31924,13 @@ var AbsoluteList = function AbsoluteList(props) {
31851
31924
  var absolute = props.absolute,
31852
31925
  position = props.position,
31853
31926
  children = props.children,
31854
- parentElement = props.parentElement,
31855
- scrollElement = props.scrollElement,
31927
+ parentElRef = props.parentElRef,
31928
+ scrollElRef = props.scrollElRef,
31856
31929
  fixedWidth = props.fixedWidth,
31857
31930
  _props$zIndex = props.zIndex,
31858
31931
  zIndex = _props$zIndex === void 0 ? 1051 : _props$zIndex,
31859
31932
  focus = props.focus,
31860
- popupEl = props.popupEl,
31933
+ popupElRef = props.popupElRef,
31861
31934
  updateKey = props.updateKey,
31862
31935
  popupGap = props.popupGap,
31863
31936
  adjust = props.adjust,
@@ -31875,12 +31948,12 @@ var AbsoluteList = function AbsoluteList(props) {
31875
31948
  getContainer: getRoot,
31876
31949
  position: position,
31877
31950
  absolute: !!absolute,
31878
- parentEl: parentElement,
31951
+ parentElRef: parentElRef,
31879
31952
  show: focus,
31880
31953
  fixedWidth: fixedWidth,
31881
31954
  zIndex: zIndex,
31882
- visibleEl: scrollElement,
31883
- popupEl: popupEl,
31955
+ scrollElRef: scrollElRef,
31956
+ popupElRef: popupElRef,
31884
31957
  updateKey: updateKey,
31885
31958
  popupGap: popupGap,
31886
31959
  adjust: adjust
@@ -32301,10 +32374,10 @@ var List = function List(props) {
32301
32374
  }), /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
32302
32375
  position: position,
32303
32376
  focus: open,
32304
- parentElement: targetRef.current,
32377
+ parentElRef: targetRef,
32305
32378
  absolute: true,
32306
32379
  fixedWidth: 'min',
32307
- popupEl: popupRef.current,
32380
+ popupElRef: popupRef,
32308
32381
  adjust: true,
32309
32382
  children: /*#__PURE__*/(0,jsx_runtime.jsx)(animation_list, {
32310
32383
  className: classnames_default()(classes === null || classes === void 0 ? void 0 : classes.dropdown),
@@ -35442,8 +35515,8 @@ var Popover = function Popover(props) {
35442
35515
  };
35443
35516
  return /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
35444
35517
  focus: open,
35445
- parentElement: targetRef.current,
35446
- popupEl: popupRef.current,
35518
+ parentElRef: targetRef,
35519
+ popupElRef: popupRef,
35447
35520
  absolute: typeof props.getPopupContainer === 'function' ? props.getPopupContainer : true,
35448
35521
  position: position,
35449
35522
  fixedWidth: false,
@@ -40160,8 +40233,8 @@ var Cascader = function Cascader(props0) {
40160
40233
  zIndex: zIndex,
40161
40234
  position: position,
40162
40235
  popupGap: 4,
40163
- popupEl: popupRef.current,
40164
- parentElement: targetRef.current,
40236
+ popupElRef: popupRef,
40237
+ parentElRef: targetRef,
40165
40238
  children: /*#__PURE__*/(0,jsx_runtime.jsx)(animation_list, {
40166
40239
  onRef: popupRef,
40167
40240
  show: open,
@@ -44989,8 +45062,8 @@ var DatePicker = function DatePicker(props0) {
44989
45062
  width: props.width
44990
45063
  }, props.style),
44991
45064
  children: [tipNode, renderResult(), /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
44992
- parentElement: targetRef.current,
44993
- popupEl: popupRef.current,
45065
+ parentElRef: targetRef,
45066
+ popupElRef: popupRef,
44994
45067
  absolute: props.absolute,
44995
45068
  zIndex: props.zIndex,
44996
45069
  position: position,
@@ -46050,8 +46123,8 @@ var positionMap = {
46050
46123
  'bottom-left': 'right-top',
46051
46124
  left: 'left',
46052
46125
  right: 'right',
46053
- top: 'right',
46054
- bottom: 'right',
46126
+ top: 'right-bottom',
46127
+ bottom: 'right-top',
46055
46128
  auto: ''
46056
46129
  };
46057
46130
  var Dropdown = function Dropdown(props) {
@@ -46174,6 +46247,9 @@ var Dropdown = function Dropdown(props) {
46174
46247
  }, index);
46175
46248
  });
46176
46249
  };
46250
+ var hasChildren = data.some(function (d) {
46251
+ return d.children;
46252
+ });
46177
46253
  var targetProps = getTargetProps();
46178
46254
  return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
46179
46255
  className: classnames_default()(className, dropdownClasses === null || dropdownClasses === void 0 ? void 0 : dropdownClasses.wrapper, !isSub && open && (dropdownClasses === null || dropdownClasses === void 0 ? void 0 : dropdownClasses.open)),
@@ -46185,15 +46261,15 @@ var Dropdown = function Dropdown(props) {
46185
46261
  children: [renderButton(), /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
46186
46262
  position: position,
46187
46263
  focus: open,
46188
- parentElement: targetRef.current,
46264
+ parentElRef: targetRef,
46189
46265
  absolute: absolute,
46190
46266
  fixedWidth: 'min',
46191
46267
  popupGap: 4,
46192
- popupEl: popupRef.current,
46268
+ popupElRef: popupRef,
46193
46269
  adjust: !isSub,
46194
46270
  children: /*#__PURE__*/(0,jsx_runtime.jsx)(animation_list, {
46195
46271
  display: columns ? 'grid' : 'block',
46196
- className: classnames_default()(dropdownClasses === null || dropdownClasses === void 0 ? void 0 : dropdownClasses.list, columns !== undefined && columns > 1 && (dropdownClasses === null || dropdownClasses === void 0 ? void 0 : dropdownClasses.boxList), size === 'small' && (dropdownClasses === null || dropdownClasses === void 0 ? void 0 : dropdownClasses.listSmall), size === 'large' && (dropdownClasses === null || dropdownClasses === void 0 ? void 0 : dropdownClasses.listLarge)),
46272
+ className: classnames_default()(dropdownClasses === null || dropdownClasses === void 0 ? void 0 : dropdownClasses.list, hasChildren && (dropdownClasses === null || dropdownClasses === void 0 ? void 0 : dropdownClasses.listHasChildren), columns !== undefined && columns > 1 && (dropdownClasses === null || dropdownClasses === void 0 ? void 0 : dropdownClasses.boxList), size === 'small' && (dropdownClasses === null || dropdownClasses === void 0 ? void 0 : dropdownClasses.listSmall), size === 'large' && (dropdownClasses === null || dropdownClasses === void 0 ? void 0 : dropdownClasses.listLarge)),
46197
46273
  style: {
46198
46274
  width: width,
46199
46275
  gridTemplateColumns: columns ? "repeat(".concat(columns, ", 1fr)") : undefined
@@ -46694,11 +46770,8 @@ var EditableArea = function EditableArea(props) {
46694
46770
  bordered = _props$bordered === void 0 ? false : _props$bordered;
46695
46771
  var editableAreaStyle = jssStyle === null || jssStyle === void 0 ? void 0 : (_jssStyle$editableAre = jssStyle.editableArea) === null || _jssStyle$editableAre === void 0 ? void 0 : _jssStyle$editableAre.call(jssStyle);
46696
46772
  var status = error ? 'error' : props.status;
46697
- var _React$useRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef({
46698
- wrapper: null,
46699
- textarea: null
46700
- }),
46701
- context = _React$useRef.current;
46773
+ var textareaRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
46774
+ var wrapperRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
46702
46775
  var _useInputAble = useInputAble({
46703
46776
  control: 'value' in props,
46704
46777
  value: props.value,
@@ -46714,9 +46787,9 @@ var EditableArea = function EditableArea(props) {
46714
46787
  show = _useState2[0],
46715
46788
  setShow = _useState2[1];
46716
46789
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
46717
- if (show && context.textarea) {
46790
+ if (show && textareaRef.current) {
46718
46791
  setTimeout(function () {
46719
- if (show && context.textarea) context.textarea.focus();
46792
+ if (show && textareaRef.current) textareaRef.current.focus();
46720
46793
  });
46721
46794
  }
46722
46795
  }, [show]);
@@ -46763,14 +46836,13 @@ var EditableArea = function EditableArea(props) {
46763
46836
  return /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
46764
46837
  absolute: getPopupContainer || true,
46765
46838
  focus: show,
46766
- parentElement: context.wrapper,
46839
+ parentElRef: wrapperRef,
46840
+ popupElRef: textareaRef,
46767
46841
  fixedWidth: true,
46768
46842
  position: 'cover',
46769
46843
  children: /*#__PURE__*/(0,jsx_runtime.jsx)(src_textarea_textarea, {
46770
46844
  jssStyle: jssStyle,
46771
- textareaRef: function textareaRef(el) {
46772
- context.textarea = el;
46773
- },
46845
+ textareaRef: textareaRef,
46774
46846
  status: status,
46775
46847
  placeholder: placeholder,
46776
46848
  className: classnames_default()(editableAreaStyle === null || editableAreaStyle === void 0 ? void 0 : editableAreaStyle.popup, show && (editableAreaStyle === null || editableAreaStyle === void 0 ? void 0 : editableAreaStyle.popupShow)),
@@ -46805,9 +46877,7 @@ var EditableArea = function EditableArea(props) {
46805
46877
  style: objectSpread2_default()(objectSpread2_default()({}, style), {}, {
46806
46878
  width: width
46807
46879
  }),
46808
- ref: function ref(el) {
46809
- context.wrapper = el;
46810
- },
46880
+ ref: wrapperRef,
46811
46881
  children: [renderPlaceholder(), renderClear(), renderPopup()]
46812
46882
  });
46813
46883
  };
@@ -51844,8 +51914,7 @@ function Select(props0) {
51844
51914
  keygen = props.keygen,
51845
51915
  _props$focusSelected = props.focusSelected,
51846
51916
  focusSelected = _props$focusSelected === void 0 ? true : _props$focusSelected,
51847
- _props$optionWidth = props.optionWidth,
51848
- optionWidth = _props$optionWidth === void 0 ? '100%' : _props$optionWidth,
51917
+ optionWidth = props.optionWidth,
51849
51918
  _props$height = props.height,
51850
51919
  height = _props$height === void 0 ? 250 : _props$height,
51851
51920
  openProp = props.open,
@@ -52213,7 +52282,7 @@ function Select(props0) {
52213
52282
  return renderClearable();
52214
52283
  }
52215
52284
  if (!multiple && !showArrow) return null;
52216
- var defaultIcon = compressed ? icons.More : icons.ArrowDown;
52285
+ var defaultIcon = multiple ? icons.More : icons.ArrowDown;
52217
52286
  return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
52218
52287
  className: classnames_default()(styles.arrowIcon, open && !compressed && styles.arrowIconOpen),
52219
52288
  onClick: handleResultClick,
@@ -52366,18 +52435,11 @@ function Select(props0) {
52366
52435
  };
52367
52436
  var getListStyle = function getListStyle() {
52368
52437
  var style = {};
52369
- if (autoAdapt) {
52370
- if (width) {
52371
- style.minWidth = width || 'auto';
52372
- } else {
52373
- style.width = width || 'auto';
52374
- }
52375
- return style;
52376
- } else {
52438
+ {
52377
52439
  if (columns > 1) {
52378
52440
  style.width = columns * columnWidth;
52379
- } else {
52380
- style.width = ('optionWidth' in props ? optionWidth : undefined) || width || '100%';
52441
+ } else if (optionWidth) {
52442
+ style.width = optionWidth;
52381
52443
  }
52382
52444
  }
52383
52445
  return style;
@@ -52402,8 +52464,8 @@ function Select(props0) {
52402
52464
  zIndex: props.zIndex,
52403
52465
  position: position,
52404
52466
  popupGap: 4,
52405
- popupEl: popupRef.current,
52406
- parentElement: targetRef.current,
52467
+ popupElRef: popupRef,
52468
+ parentElRef: targetRef,
52407
52469
  children: /*#__PURE__*/(0,jsx_runtime.jsxs)(animation_list, {
52408
52470
  onRef: popupRef,
52409
52471
  show: open,
@@ -59607,7 +59669,8 @@ var Tabs = function Tabs(props) {
59607
59669
  background = props.background,
59608
59670
  activeBackground = props.activeBackground,
59609
59671
  inactiveBackground = props.inactiveBackground,
59610
- defaultActive = props.defaultActive,
59672
+ _props$defaultActive = props.defaultActive,
59673
+ defaultActive = _props$defaultActive === void 0 ? 0 : _props$defaultActive,
59611
59674
  tabBarStyle = props.tabBarStyle,
59612
59675
  color = props.color,
59613
59676
  sticky = props.sticky,
@@ -59978,7 +60041,8 @@ var Tooltip = function Tooltip(props) {
59978
60041
  }
59979
60042
  }, 'ns'), /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(inner, events), /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
59980
60043
  focus: open,
59981
- parentElement: targetRef.current,
60044
+ parentElRef: targetRef,
60045
+ popupElRef: popupRef,
59982
60046
  absolute: true,
59983
60047
  position: position,
59984
60048
  fixedWidth: false,
@@ -60971,7 +61035,7 @@ var useTiled = function useTiled(props) {
60971
61035
 
60972
61036
 
60973
61037
  var TreeSelect = function TreeSelect(props0) {
60974
- var _jssStyle$select;
61038
+ var _jssStyle$treeSelect;
60975
61039
  var props = use_with_form_config(props0);
60976
61040
  var _useConfig = useConfig(),
60977
61041
  locale = _useConfig.locale;
@@ -61037,7 +61101,7 @@ var TreeSelect = function TreeSelect(props0) {
61037
61101
  onChangeAddition = props.onChangeAddition,
61038
61102
  onEnterExpand = props.onEnterExpand,
61039
61103
  onExpand = props.onExpand;
61040
- var styles = jssStyle === null || jssStyle === void 0 ? void 0 : (_jssStyle$select = jssStyle.select) === null || _jssStyle$select === void 0 ? void 0 : _jssStyle$select.call(jssStyle);
61104
+ var styles = jssStyle === null || jssStyle === void 0 ? void 0 : (_jssStyle$treeSelect = jssStyle.treeSelect) === null || _jssStyle$treeSelect === void 0 ? void 0 : _jssStyle$treeSelect.call(jssStyle);
61041
61105
  var rootStyle = Object.assign({
61042
61106
  width: width
61043
61107
  }, style);
@@ -61456,13 +61520,13 @@ var TreeSelect = function TreeSelect(props0) {
61456
61520
  children: [tipNode, renderResult(), renderIcon(), /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
61457
61521
  adjust: true,
61458
61522
  focus: open,
61459
- fixedWidth: true,
61523
+ fixedWidth: "min",
61460
61524
  absolute: props.absolute,
61461
61525
  zIndex: props.zIndex,
61462
61526
  position: position,
61463
61527
  popupGap: 4,
61464
- popupEl: popupRef.current,
61465
- parentElement: targetRef.current,
61528
+ popupElRef: popupRef,
61529
+ parentElRef: targetRef,
61466
61530
  children: /*#__PURE__*/(0,jsx_runtime.jsx)(animation_list, {
61467
61531
  onRef: popupRef,
61468
61532
  show: open,
@@ -61470,9 +61534,6 @@ var TreeSelect = function TreeSelect(props0) {
61470
61534
  display: 'block',
61471
61535
  type: "scale-y",
61472
61536
  duration: 'fast',
61473
- style: {
61474
- width: width || '100%'
61475
- },
61476
61537
  children: renderList()
61477
61538
  })
61478
61539
  })]
@@ -64991,7 +65052,7 @@ var upload_interface = __webpack_require__(7818);
64991
65052
 
64992
65053
 
64993
65054
  /* harmony default export */ var src_0 = ({
64994
- version: '3.0.0-alpha.19'
65055
+ version: '3.0.0-alpha.20'
64995
65056
  });
64996
65057
  }();
64997
65058
  /******/ return __webpack_exports__;