shineout 3.7.2-beta.5 → 3.7.2-fix.1

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
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
522
522
  // 此文件由脚本自动生成,请勿直接修改。
523
523
  // This file was generated automatically by a script. Please do not modify it directly.
524
524
  var _default = exports.default = {
525
- version: '3.7.2-beta.5'
525
+ version: '3.7.2-fix.1'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12234,7 +12234,7 @@ var handleStyle = function handleStyle(style) {
12234
12234
  };
12235
12235
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12236
12236
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12237
- /* harmony default export */ var version = ('3.7.2-beta.5');
12237
+ /* harmony default export */ var version = ('3.7.2-fix.1');
12238
12238
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12239
12239
 
12240
12240
 
@@ -29286,7 +29286,11 @@ var uploadStyle = {
29286
29286
  border: "1px dashed ".concat(src.uploadImageHandlerBorderColor),
29287
29287
  backgroundColor: src.uploadImageHandlerBackgroundColor,
29288
29288
  color: src.uploadImageHandlerFontColor,
29289
- '&:hover, &:hover *': {
29289
+ '&:hover, &:hover': {
29290
+ borderColor: src.uploadImageHandlerHoverBorderColor,
29291
+ color: src.uploadImageHandlerHoverFontColor
29292
+ },
29293
+ '&:hover, &:hover svg': {
29290
29294
  borderColor: src.uploadImageHandlerHoverBorderColor,
29291
29295
  color: src.uploadImageHandlerHoverFontColor
29292
29296
  },
@@ -29407,7 +29411,7 @@ var uploadStyle = {
29407
29411
  borderColor: src.uploadImageHandlerHoverBorderColor,
29408
29412
  color: src.uploadImageHandlerHoverFontColor
29409
29413
  },
29410
- '$wrapper:not($wrapperDisabled) &:hover *': {
29414
+ '$wrapper:not($wrapperDisabled) &:hover svg': {
29411
29415
  color: "".concat(src.uploadImageHandlerHoverFontColor, " !important")
29412
29416
  },
29413
29417
  '$wrapper:not($wrapperDisabled) &:active, $wrapper:not($wrapperDisabled) &:active *': {
@@ -35418,19 +35422,18 @@ function useInputAble(props) {
35418
35422
  var render = useRender(syncValue);
35419
35423
  var shouldUseState = delay || !control;
35420
35424
  var value = shouldUseState ? stateValue : valuePo;
35421
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
35422
- if (context.timer) {
35423
- clearTimeout(context.timer);
35424
- context.timer = null;
35425
- }
35425
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
35426
35426
  if (delay && control && props.value !== stateValue) {
35427
35427
  changeStateValue(props.value);
35428
+ } else if (context.timer) {
35429
+ clearTimeout(context.timer);
35430
+ context.timer = null;
35428
35431
  }
35429
35432
  }, [props.value, delay, control]);
35430
35433
  var forceDelayChange = use_persist_fn(function () {
35431
- if (context.timer && context.delayChange) {
35434
+ if (context.delayChange) context.delayChange();
35435
+ if (context.timer) {
35432
35436
  clearTimeout(context.timer);
35433
- context.delayChange();
35434
35437
  context.timer = null;
35435
35438
  context.delayChange = null;
35436
35439
  }
@@ -39914,9 +39917,7 @@ var CascaderNode = function CascaderNode(props) {
39914
39917
  shouldFinal = props.shouldFinal,
39915
39918
  onChange = props.onChange,
39916
39919
  onPathChange = props.onPathChange,
39917
- mode = props.mode,
39918
- activeLeaf = props.activeLeaf,
39919
- setActiveLeaf = props.setActiveLeaf;
39920
+ mode = props.mode;
39920
39921
  var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
39921
39922
  _useState2 = slicedToArray_default()(_useState, 2),
39922
39923
  loading = _useState2[0],
@@ -39929,7 +39930,7 @@ var CascaderNode = function CascaderNode(props) {
39929
39930
  var uncertainChildren = loader && !loading && children === undefined;
39930
39931
  var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$cascader = jssStyle.cascader) === null || _jssStyle$cascader === void 0 ? void 0 : _jssStyle$cascader.call(jssStyle);
39931
39932
  var commonStyles = jssStyle === null || jssStyle === void 0 || (_jssStyle$common = jssStyle.common) === null || _jssStyle$common === void 0 ? void 0 : _jssStyle$common.call(jssStyle);
39932
- var rootClass = classnames_default()(styles.option, (active || activeLeaf === id) && styles.activeOption, isDisabled && mode !== 4 && styles.optionDisabled);
39933
+ var rootClass = classnames_default()(styles.option, active && styles.activeOption, isDisabled && mode !== 4 && styles.optionDisabled);
39933
39934
  var handlePathChange = function handlePathChange() {
39934
39935
  onPathChange === null || onPathChange === void 0 || onPathChange(id, data, path);
39935
39936
  };
@@ -39953,9 +39954,6 @@ var CascaderNode = function CascaderNode(props) {
39953
39954
  if (getParent(e.target, checkboxRef.current)) return;
39954
39955
  var checked = datum.getChecked(id);
39955
39956
  handleChange(null, !checked);
39956
- if (setActiveLeaf) {
39957
- setActiveLeaf(id);
39958
- }
39959
39957
  };
39960
39958
  var isHoverAble = expandTrigger === 'hover' || expandTrigger === 'hover-only';
39961
39959
  var isRealLeafNode = !hasChildren && !uncertainChildren;
@@ -39969,7 +39967,10 @@ var CascaderNode = function CascaderNode(props) {
39969
39967
  if (multiple) events.onClick = handleSelect;
39970
39968
  } else if (isRealLeafNode && multiple) {
39971
39969
  // 非hover模式下: 末级节点支持整个节点区域点击选中checkbox
39972
- events.onClick = handleSelect;
39970
+ events.onClick = function (e) {
39971
+ handleClick(e);
39972
+ handleSelect(e);
39973
+ };
39973
39974
  }
39974
39975
  return events;
39975
39976
  };
@@ -40038,7 +40039,6 @@ var CascaderNode = function CascaderNode(props) {
40038
40039
 
40039
40040
 
40040
40041
 
40041
-
40042
40042
  var list_devUseWarning = devUseWarning;
40043
40043
  var CascaderList = function CascaderList(props) {
40044
40044
  var _jssStyle$cascader;
@@ -40095,18 +40095,11 @@ var CascaderList = function CascaderList(props) {
40095
40095
  children: "noData"
40096
40096
  });
40097
40097
  };
40098
- var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(),
40099
- _useState2 = slicedToArray_default()(_useState, 2),
40100
- activeLeaf = _useState2[0],
40101
- setActiveLeaf = _useState2[1];
40102
- var needSetActiveLeaf = (multiple || mode !== undefined) && props.id === undefined;
40103
40098
  var renderItem = function renderItem(item, index) {
40104
40099
  var id = getKey(item, index);
40105
40100
  return /*#__PURE__*/(0,jsx_runtime.jsx)(node, {
40106
40101
  jssStyle: jssStyle,
40107
40102
  active: props.id === id,
40108
- activeLeaf: activeLeaf,
40109
- setActiveLeaf: needSetActiveLeaf ? setActiveLeaf : undefined,
40110
40103
  id: id,
40111
40104
  data: item,
40112
40105
  datum: datum,
@@ -71435,7 +71428,7 @@ var upload_interface = __webpack_require__(8821);
71435
71428
 
71436
71429
 
71437
71430
  /* harmony default export */ var src_0 = ({
71438
- version: '3.7.2-beta.5'
71431
+ version: '3.7.2-fix.1'
71439
71432
  });
71440
71433
  }();
71441
71434
  /******/ return __webpack_exports__;