shineout 3.2.4 → 3.2.5

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
@@ -476,5 +476,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
476
476
  // 此文件由脚本自动生成,请勿直接修改。
477
477
  // This file was generated automatically by a script. Please do not modify it directly.
478
478
  var _default = exports.default = {
479
- version: '3.2.4'
479
+ version: '3.2.5'
480
480
  };
package/dist/shineout.js CHANGED
@@ -11960,7 +11960,7 @@ var handleStyle = function handleStyle(style) {
11960
11960
  };
11961
11961
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
11962
11962
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
11963
- /* harmony default export */ var version = ('3.2.4');
11963
+ /* harmony default export */ var version = ('3.2.5');
11964
11964
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
11965
11965
 
11966
11966
 
@@ -14945,6 +14945,9 @@ var alertStyle = {
14945
14945
  marginLeft: src.alertNearlyMargin,
14946
14946
  '&:hover': {
14947
14947
  color: src.alertCloseHoverColor
14948
+ },
14949
+ '& svg': {
14950
+ width: '100%'
14948
14951
  }
14949
14952
  },
14950
14953
  closeWrapper: {
@@ -15012,7 +15015,10 @@ var alertStyle = {
15012
15015
  height: src.lineHeightDynamic,
15013
15016
  flex: '0 0 auto',
15014
15017
  alignItems: 'center',
15015
- marginRight: src.alertNearlyMargin
15018
+ marginRight: src.alertNearlyMargin,
15019
+ '& svg': {
15020
+ width: '100%'
15021
+ }
15016
15022
  }
15017
15023
  };
15018
15024
  /* harmony default export */ var shineout_style_src_alert_alert = (alertStyle);
@@ -16606,6 +16612,12 @@ var cascaderStyle = objectSpread2_default()(objectSpread2_default()({
16606
16612
  borderRight: "1px solid ".concat(src.cascaderListBorderColor)
16607
16613
  }
16608
16614
  },
16615
+ filterList: {
16616
+ display: 'block',
16617
+ '& $list': {
16618
+ width: '100%'
16619
+ }
16620
+ },
16609
16621
  hideTag: {},
16610
16622
  list: {
16611
16623
  paddingTop: 3,
@@ -23324,7 +23336,10 @@ var stepsStyle = {
23324
23336
  iconWrapper: {
23325
23337
  display: 'inline-block',
23326
23338
  textAlign: 'center',
23327
- borderRadius: '50%'
23339
+ borderRadius: '50%',
23340
+ '& svg': {
23341
+ width: "calc(100% - 12px)"
23342
+ }
23328
23343
  },
23329
23344
  dot: {
23330
23345
  '&$vertical': {
@@ -28088,7 +28103,7 @@ var usePositionStyle = function usePositionStyle(config) {
28088
28103
  setStyle(newStyle);
28089
28104
  }
28090
28105
  });
28091
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(updateStyle, [show, position, absolute, updateKey]);
28106
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(updateStyle, [show, position, absolute, updateKey, fixedWidth]);
28092
28107
  return style;
28093
28108
  };
28094
28109
  /* harmony default export */ var use_position_style = ((/* unused pure expression or super */ null && (usePositionStyle)));
@@ -36624,12 +36639,14 @@ var preventDefault = function preventDefault(e) {
36624
36639
  var Cascader = function Cascader(props0) {
36625
36640
  var _jssStyle$cascader;
36626
36641
  var props = use_with_form_config(props0);
36642
+ var defaultHeight = 232;
36627
36643
  var jssStyle = props.jssStyle,
36628
36644
  style = props.style,
36629
36645
  _props$adjust = props.adjust,
36630
36646
  adjust = _props$adjust === void 0 ? true : _props$adjust,
36631
36647
  width = props.width,
36632
- height = props.height,
36648
+ _props$height = props.height,
36649
+ height = _props$height === void 0 ? defaultHeight : _props$height,
36633
36650
  className = props.className,
36634
36651
  _props$hideTag = props.hideTag,
36635
36652
  hideTag = _props$hideTag === void 0 ? false : _props$hideTag,
@@ -36725,6 +36742,7 @@ var Cascader = function Cascader(props0) {
36725
36742
  filterFunc = _useFilter.filterFunc,
36726
36743
  onFilter = _useFilter.onFilter;
36727
36744
  var isDataEmpty = !filterData || filterData.length === 0;
36745
+ var isMultiple = multiple === true || mode !== undefined;
36728
36746
  var _useCascader = use_cascader({
36729
36747
  data: data,
36730
36748
  control: 'value' in props,
@@ -37033,7 +37051,6 @@ var Cascader = function Cascader(props0) {
37033
37051
  };
37034
37052
  var renderList = function renderList() {
37035
37053
  var tempData = filterData;
37036
- var isMultiple = multiple === true || mode !== undefined;
37037
37054
  var cascaderList = [/*#__PURE__*/(0,jsx_runtime.jsx)(cascader_list, {
37038
37055
  jssStyle: jssStyle,
37039
37056
  datum: datum,
@@ -37084,11 +37101,10 @@ var Cascader = function Cascader(props0) {
37084
37101
  }
37085
37102
  var listStyle = data && data.length === 0 ? {
37086
37103
  height: 'auto',
37087
- minHeight: 232,
37104
+ minHeight: height,
37088
37105
  width: '100%'
37089
37106
  } : {
37090
- height: height,
37091
- minHeight: height || 232
37107
+ height: height
37092
37108
  };
37093
37109
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
37094
37110
  className: classnames_default()(styles.listContent),
@@ -37108,13 +37124,12 @@ var Cascader = function Cascader(props0) {
37108
37124
  };
37109
37125
  var renderFilterList = function renderFilterList() {
37110
37126
  var listStyle = data && data.length === 0 ? {
37111
- height: 'auto',
37112
- width: '100%'
37127
+ maxHeight: height
37113
37128
  } : {
37114
- height: height
37129
+ maxHeight: height
37115
37130
  };
37116
37131
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
37117
- className: classnames_default()(styles.listContent),
37132
+ className: classnames_default()(styles.listContent, styles.filterList),
37118
37133
  style: listStyle,
37119
37134
  children: /*#__PURE__*/(0,jsx_runtime.jsx)(filter_list, {
37120
37135
  jssStyle: jssStyle,
@@ -37198,8 +37213,17 @@ var Cascader = function Cascader(props0) {
37198
37213
  }, []);
37199
37214
  var shouldFullWidth = props.loading || isDataEmpty;
37200
37215
  var pickerWrapperStyle = shouldFullWidth ? {
37201
- minWidth: '100%'
37216
+ minWidth: absolute && isDataEmpty ? '' : '100%'
37202
37217
  } : {};
37218
+ var getFixedWidth = function getFixedWidth() {
37219
+ if (absolute && isDataEmpty) {
37220
+ return true;
37221
+ }
37222
+ if (filterText && !isMultiple) {
37223
+ return 'min';
37224
+ }
37225
+ return false;
37226
+ };
37203
37227
  return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
37204
37228
  tabIndex: disabled === true || showInput ? undefined : 0
37205
37229
  }, getDataAttribute(defineProperty_default()({}, 'input-border', 'true'))), {}, {
@@ -37217,7 +37241,7 @@ var Cascader = function Cascader(props0) {
37217
37241
  children: [tipNode, renderResult(), /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
37218
37242
  adjust: adjust,
37219
37243
  focus: open,
37220
- fixedWidth: false,
37244
+ fixedWidth: getFixedWidth(),
37221
37245
  absolute: absolute,
37222
37246
  zIndex: zIndex,
37223
37247
  position: position,
@@ -63089,7 +63113,7 @@ var upload_interface = __webpack_require__(4412);
63089
63113
 
63090
63114
 
63091
63115
  /* harmony default export */ var src_0 = ({
63092
- version: '3.2.4'
63116
+ version: '3.2.5'
63093
63117
  });
63094
63118
  }();
63095
63119
  /******/ return __webpack_exports__;