@kne/super-select 0.1.39 → 0.1.40

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.
@@ -170,6 +170,7 @@ const TagOverflowInner = ({
170
170
 
171
171
  const _excluded$4 = ["children"];
172
172
  const MOBILE_SHEET_MAX_HEIGHT = '80%';
173
+ const MOBILE_SHEET_MIN_HEIGHT = '30%';
173
174
  const MOBILE_MASK_Z_INDEX = 1000;
174
175
  const MOBILE_POPUP_Z_INDEX = 1050;
175
176
  const MASK_ANIMATION_DURATION = 180;
@@ -262,8 +263,8 @@ const ModalContent = _ref => {
262
263
  setValue(propsValue);
263
264
  }
264
265
  }, [open]);
265
- // 保留 isPopup 以沿用弹层内搜索等 padding 样式;
266
- // 拦截内容区 onOpenChange(false),避免单选自动关闭(由取消/确认关)
266
+ // 半屏(isPopup=true)拦截内容区 onOpenChange(false),避免单选自动关(由取消/确认关);
267
+ // Modal 模式(isPopup=false)必须放行关闭,否则取消/右上角关不掉
267
268
  const contextProps = Object.assign({}, others, {
268
269
  value,
269
270
  setValue,
@@ -272,8 +273,9 @@ const ModalContent = _ref => {
272
273
  onSelect: item => others.onSelect(item, setValue),
273
274
  onRemove: item => others.onRemove(item, setValue),
274
275
  onOpenChange: nextOpen => {
275
- if (nextOpen) {
276
- others.onOpenChange && others.onOpenChange(true);
276
+ var _others$props;
277
+ if (nextOpen || ((_others$props = others.props) == null ? void 0 : _others$props.isPopup) === false) {
278
+ others.onOpenChange && others.onOpenChange(!!nextOpen);
277
279
  }
278
280
  }
279
281
  });
@@ -360,7 +362,8 @@ const MobileSheetPanel = ({
360
362
  className: classnames(style$6['mobile-sheet-popup'], style$6['mobile-sheet-portal'], fixedModeClass, overlayClassName),
361
363
  style: {
362
364
  zIndex: MOBILE_POPUP_Z_INDEX,
363
- maxHeight: MOBILE_SHEET_MAX_HEIGHT
365
+ maxHeight: MOBILE_SHEET_MAX_HEIGHT,
366
+ minHeight: MOBILE_SHEET_MIN_HEIGHT
364
367
  },
365
368
  onTouchMove: e => {
366
369
  // 仅非列表区域阻止穿透;列表滚动容器内允许原生滚动
@@ -1888,7 +1891,7 @@ const createTreeUtils = mapping => {
1888
1891
  };
1889
1892
  };
1890
1893
 
1891
- var style = {"kne-responsive-boundary":"kne-super-select_5gTKr","kne-responsive-scroll":"kne-super-select_fhAr5","content":"kne-super-select_fHNBt","columns":"kne-super-select_VgpIp","content-item":"kne-super-select_kSkN1","last-level-area":"kne-super-select_1QV-l","is-popup":"kne-super-select_zFwDF","menu":"kne-super-select_s-ON4","scroll-plus-box":"kne-super-select_rIix2","menu-label":"kne-super-select_XAs20","menu-label-text":"kne-super-select_Y8AoQ","menu-item":"kne-super-select_ZwakZ","checkbox-hidden":"kne-super-select_0FUoe","single-mode":"kne-super-select_dahnB","menu-item-icon":"kne-super-select_AZZvN","menu-item-placeholder":"kne-super-select_TudTj","loading":"kne-super-select_ljvZk","search-input":"kne-super-select_FVxuS","scroller":"kne-super-select_vnHAM","list":"kne-super-select_iUhv7","is-selected":"kne-super-select_tx4-l","custom-menu":"kne-super-select_OerpL","selected":"kne-super-select_OUkpN","is-mobile":"kne-super-select_HjXMw"};
1894
+ var style = {"kne-responsive-boundary":"kne-super-select_5gTKr","kne-responsive-scroll":"kne-super-select_fhAr5","content":"kne-super-select_fHNBt","columns":"kne-super-select_VgpIp","content-item":"kne-super-select_kSkN1","last-level-area":"kne-super-select_1QV-l","is-popup":"kne-super-select_zFwDF","menu":"kne-super-select_s-ON4","scroll-plus-box":"kne-super-select_rIix2","menu-label":"kne-super-select_XAs20","menu-label-text":"kne-super-select_Y8AoQ","menu-item":"kne-super-select_ZwakZ","checkbox-hidden":"kne-super-select_0FUoe","single-mode":"kne-super-select_dahnB","menu-item-icon":"kne-super-select_AZZvN","menu-item-placeholder":"kne-super-select_TudTj","loading":"kne-super-select_ljvZk","search-input":"kne-super-select_FVxuS","scroller":"kne-super-select_vnHAM","is-mobile":"kne-super-select_HjXMw","list":"kne-super-select_iUhv7","is-selected":"kne-super-select_tx4-l","custom-menu":"kne-super-select_OerpL","selected":"kne-super-select_OUkpN"};
1892
1895
 
1893
1896
  const CustomMenu = ({
1894
1897
  className,
@@ -2129,7 +2132,7 @@ const CascaderInner = ({
2129
2132
  if (searchText && searchResults) {
2130
2133
  const _currentIds3 = value.map(v => typeof v === 'object' ? v[valueKey] : v);
2131
2134
  return /*#__PURE__*/React.createElement("div", {
2132
- className: classnames(style['content'], {
2135
+ className: classnames(style['content'], 'select-cascader-content', {
2133
2136
  [style['is-popup']]: isPopup,
2134
2137
  [style['is-mobile']]: isMobile
2135
2138
  })
@@ -2171,7 +2174,7 @@ const CascaderInner = ({
2171
2174
  // 渲染级联列
2172
2175
  const currentIds = value.map(v => typeof v === 'object' ? v[valueKey] : v);
2173
2176
  return /*#__PURE__*/React.createElement("div", {
2174
- className: classnames(style['content'], {
2177
+ className: classnames(style['content'], 'select-cascader-content', {
2175
2178
  [style['is-popup']]: isPopup,
2176
2179
  [style['has-search']]: !!onSearch,
2177
2180
  [style['is-mobile']]: isMobile
@@ -2189,7 +2192,7 @@ const CascaderInner = ({
2189
2192
  simple: isPopup,
2190
2193
  showSearchButton: !isPopup
2191
2194
  }), /*#__PURE__*/React.createElement(ScrollBox, _extends({
2192
- className: style['scroller']
2195
+ className: classnames(style['scroller'], 'select-cascader-scroller')
2193
2196
  }, isMobile ? {} : {
2194
2197
  options: {
2195
2198
  autoHide: false