shineout 3.9.8-beta.1 → 3.9.8-beta.3

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.9.8-beta.1'
525
+ version: '3.9.8-beta.3'
526
526
  };
package/dist/shineout.js CHANGED
@@ -12401,7 +12401,7 @@ var handleStyle = function handleStyle(style) {
12401
12401
  };
12402
12402
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12403
12403
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12404
- /* harmony default export */ var version = ('3.9.8-beta.1');
12404
+ /* harmony default export */ var version = ('3.9.8-beta.3');
12405
12405
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12406
12406
 
12407
12407
 
@@ -17891,7 +17891,7 @@ var cascaderStyle = objectSpread2_default()(objectSpread2_default()({
17891
17891
  marginBottom: src.cascaderPlaceholderMarginY
17892
17892
  },
17893
17893
  multiple: {
17894
- '& $optionInner': {
17894
+ '& $optionInner:not($optionLeaf)': {
17895
17895
  paddingRight: src.cascaderOptionInnerPaddingRight
17896
17896
  },
17897
17897
  '& $resultTextWrapper': {
@@ -18060,7 +18060,10 @@ var cascaderStyle = objectSpread2_default()(objectSpread2_default()({
18060
18060
  },
18061
18061
  optionIcon: {
18062
18062
  position: 'absolute',
18063
- right: 8,
18063
+ '[dir=rtl] &': {
18064
+ left: 8,
18065
+ transform: 'rotate(180deg)'
18066
+ },
18064
18067
  top: 0,
18065
18068
  bottom: 0,
18066
18069
  fontSize: src.cascaderFontSize,
@@ -27036,7 +27039,8 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
27036
27039
  right: "-".concat(shadowWidth, "px")
27037
27040
  },
27038
27041
  '&[dir=rtl]::after': {
27039
- left: "-".concat(shadowWidth, "px")
27042
+ left: "-".concat(shadowWidth, "px"),
27043
+ boxShadow: 'inset -8px 0 10px -6px rgba(2,11,24,.1)'
27040
27044
  }
27041
27045
  },
27042
27046
  '& table': {
@@ -27065,7 +27069,8 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
27065
27069
  boxShadow: 'inset -8px 0 10px -6px rgba(2,11,24,.1)'
27066
27070
  },
27067
27071
  '&[dir=rtl]::before': {
27068
- right: "-".concat(shadowWidth, "px")
27072
+ right: "-".concat(shadowWidth, "px"),
27073
+ boxShadow: 'inset 8px 0 10px -6px rgba(2,11,24,.1)'
27069
27074
  },
27070
27075
  '&[dir=ltr]::before': {
27071
27076
  left: "-".concat(shadowWidth, "px")
@@ -41980,7 +41985,7 @@ var CascaderNode = function CascaderNode(props) {
41980
41985
  className: rootClass
41981
41986
  }, events), {}, {
41982
41987
  children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
41983
- className: classnames_default()(styles.optionInner),
41988
+ className: classnames_default()(styles.optionInner, isRealLeafNode && styles.optionLeaf),
41984
41989
  role: "button",
41985
41990
  children: [multiple && !(shouldFinal && hasChildren) && /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_checkbox_checkbox
41986
41991
  // @ts-ignore
@@ -43519,6 +43524,10 @@ var Cascader = function Cascader(props0) {
43519
43524
  var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(FormFieldContext),
43520
43525
  fieldId = _useContext.fieldId;
43521
43526
  var defaultHeight = 250;
43527
+ var _useConfig = useConfig(),
43528
+ locale = _useConfig.locale,
43529
+ direction = _useConfig.direction;
43530
+ var isRtl = direction === 'rtl';
43522
43531
  var jssStyle = props.jssStyle,
43523
43532
  style = props.style,
43524
43533
  _props$adjust = props.adjust,
@@ -43571,7 +43580,7 @@ var Cascader = function Cascader(props0) {
43571
43580
  compressed = props.compressed,
43572
43581
  compressedBound = props.compressedBound,
43573
43582
  _props$position = props.position,
43574
- positionProp = _props$position === void 0 ? 'bottom-left' : _props$position,
43583
+ positionProp = _props$position === void 0 ? isRtl ? 'bottom-right' : 'bottom-left' : _props$position,
43575
43584
  absolute = props.absolute,
43576
43585
  zIndex = props.zIndex,
43577
43586
  emptyText = props.emptyText,
@@ -43593,8 +43602,6 @@ var Cascader = function Cascader(props0) {
43593
43602
  var rootStyle = Object.assign({
43594
43603
  width: width
43595
43604
  }, style);
43596
- var _useConfig = useConfig(),
43597
- locale = _useConfig.locale;
43598
43605
  var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
43599
43606
  _useState2 = slicedToArray_default()(_useState, 2),
43600
43607
  focused = _useState2[0],
@@ -44182,6 +44189,7 @@ var Cascader = function Cascader(props0) {
44182
44189
  onFocus: handleFocus,
44183
44190
  onKeyDown: handleKeyDown,
44184
44191
  ref: targetRef,
44192
+ dir: direction,
44185
44193
  children: [tipNode, renderResult(), /*#__PURE__*/(0,jsx_runtime.jsx)(absolute_list, {
44186
44194
  adjust: adjust,
44187
44195
  focus: open,
@@ -49597,7 +49605,7 @@ var DatePicker = function DatePicker(props0) {
49597
49605
  });
49598
49606
  var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$datePicker = jssStyle.datePicker) === null || _jssStyle$datePicker === void 0 ? void 0 : _jssStyle$datePicker.call(jssStyle);
49599
49607
  var isRTL = direction === 'rtl';
49600
- var dfp = isRTL ? 'bottom-right' : 'bottom-left';
49608
+ var dfp = 'bottom-left';
49601
49609
  var _React$useState9 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(false),
49602
49610
  _React$useState10 = slicedToArray_default()(_React$useState9, 2),
49603
49611
  focused = _React$useState10[0],
@@ -49608,6 +49616,9 @@ var DatePicker = function DatePicker(props0) {
49608
49616
  } else if (!date_picker_verticalPosition.includes(listPosition)) {
49609
49617
  listPosition = dfp;
49610
49618
  }
49619
+ if (isRTL) {
49620
+ if (listPosition === 'bottom-left') listPosition = 'bottom-right';else if (listPosition === 'bottom-right') listPosition = 'bottom-left';else if (listPosition === 'top-left') listPosition = 'top-right';else if (listPosition === 'top-right') listPosition = 'top-left';
49621
+ }
49611
49622
  var options = {
49612
49623
  timeZone: props.timeZone,
49613
49624
  // 需要确保 weekStartsOn 是 number,否则后续的星期顺序计算都会出错
@@ -50970,6 +50981,7 @@ var method = function method(type, jssStyle) {
50970
50981
 
50971
50982
 
50972
50983
 
50984
+
50973
50985
  var modal_devUseWarning = devUseWarning;
50974
50986
  var modal_Modal = function Modal(props) {
50975
50987
  var _props$jssStyle, _props$jssStyle$modal;
@@ -50992,6 +51004,7 @@ var modal_Modal = function Modal(props) {
50992
51004
  rendered: false
50993
51005
  }),
50994
51006
  context = _useRef.current;
51007
+ var config = useConfig();
50995
51008
  var destroyed = props.destroy && !props.visible && canDestroy;
50996
51009
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
50997
51010
  if (destroyed) {
@@ -51005,9 +51018,19 @@ var modal_Modal = function Modal(props) {
51005
51018
  return null;
51006
51019
  }
51007
51020
  context.rendered = true;
51021
+ var isRtl = config.direction === 'rtl';
51022
+ var position = props.position;
51023
+ if (isRtl) {
51024
+ if (position === 'left') {
51025
+ position = 'right';
51026
+ } else if (position === 'right') {
51027
+ position = 'left';
51028
+ }
51029
+ }
51008
51030
  var Content = /*#__PURE__*/(0,jsx_runtime.jsx)(modal_content, objectSpread2_default()(objectSpread2_default()({}, props), {}, {
51009
51031
  shouldDestroy: seCanDestroy,
51010
- autoShow: false
51032
+ autoShow: false,
51033
+ position: position
51011
51034
  }));
51012
51035
  var root = getRoot();
51013
51036
  if (!root) return null;
@@ -55720,6 +55743,12 @@ var INNER_TITLE_SUPPORTED_COMPONENTS = ['Input', 'Select', 'Cascader', 'DatePick
55720
55743
  additionalProps.innerTitle = child.props.innerTitle || innerTitle;
55721
55744
  additionalProps.placeTitle = child.props.placeTitle || placeTitle;
55722
55745
  }
55746
+
55747
+ // 兼容旧版 Input.Group 透传 name 和 rules 的行为
55748
+ if (displayName && displayName.includes('Shineout')) {
55749
+ additionalProps.name = child.props.name || props.name;
55750
+ additionalProps.rules = child.props.rules || props.rules;
55751
+ }
55723
55752
  return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(child, additionalProps);
55724
55753
  }
55725
55754
  return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
@@ -66689,6 +66718,7 @@ var FilterSearch = function FilterSearch(props) {
66689
66718
 
66690
66719
 
66691
66720
 
66721
+
66692
66722
  var thead_toNum = toNum;
66693
66723
  /* harmony default export */ var thead = (function (props) {
66694
66724
  var _props$jssStyle, _props$jssStyle$table;
@@ -66828,6 +66858,7 @@ var thead_toNum = toNum;
66828
66858
  dir: config.direction
66829
66859
  });
66830
66860
  };
66861
+ var isRtl = config.direction === 'rtl';
66831
66862
  var getFixedStyle = function getFixedStyle(fixed, index, colSpan, level) {
66832
66863
  // 累加level 至 0 的所有高度
66833
66864
  var top = context.trHeights.slice(0, level).reduce(function (a, b) {
@@ -66837,21 +66868,13 @@ var thead_toNum = toNum;
66837
66868
  var left = colgroup.slice(0, index).reduce(function (a, b) {
66838
66869
  return thead_toNum(a) + thead_toNum(b);
66839
66870
  }, 0);
66840
- return {
66841
- left: left,
66842
- top: top,
66843
- position: 'sticky'
66844
- };
66871
+ return defineProperty_default()(defineProperty_default()(defineProperty_default()({}, isRtl ? 'right' : 'left', left), "top", top), "position", 'sticky');
66845
66872
  }
66846
66873
  if (fixed === 'right') {
66847
66874
  var right = colgroup.slice(index + (typeof colSpan === 'function' ? 1 : colSpan)).reduce(function (a, b) {
66848
66875
  return thead_toNum(a) + thead_toNum(b);
66849
66876
  }, 0);
66850
- return {
66851
- right: right,
66852
- top: top,
66853
- position: 'sticky'
66854
- };
66877
+ return defineProperty_default()(defineProperty_default()(defineProperty_default()({}, isRtl ? 'left' : 'right', right), "top", top), "position", 'sticky');
66855
66878
  }
66856
66879
  return {
66857
66880
  top: top,
@@ -67245,19 +67268,17 @@ var Tr = function Tr(props) {
67245
67268
  var left = props.colgroup.slice(0, index).reduce(function (a, b) {
67246
67269
  return tr_toNum(a) + tr_toNum(b);
67247
67270
  }, 0);
67248
- return {
67249
- position: 'sticky',
67250
- left: left
67251
- };
67271
+ return defineProperty_default()({
67272
+ position: 'sticky'
67273
+ }, isRtl ? 'right' : 'left', left);
67252
67274
  }
67253
67275
  if (fixed === 'right') {
67254
67276
  var right = props.colgroup.slice(index + colSpan).reduce(function (a, b) {
67255
67277
  return tr_toNum(a) + tr_toNum(b);
67256
67278
  }, 0);
67257
- return {
67258
- position: 'sticky',
67259
- right: right
67260
- };
67279
+ return defineProperty_default()({
67280
+ position: 'sticky'
67281
+ }, isRtl ? 'left' : 'right', right);
67261
67282
  }
67262
67283
  return undefined;
67263
67284
  };
@@ -67298,7 +67319,7 @@ var Tr = function Tr(props) {
67298
67319
  isExpandLoading = _useState2[0],
67299
67320
  setIsExpandLoading = _useState2[1];
67300
67321
  var innerExpandClick = usePersistFn( /*#__PURE__*/function () {
67301
- var _ref = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(showLoader) {
67322
+ var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(showLoader) {
67302
67323
  return regeneratorRuntime_default()().wrap(function _callee$(_context) {
67303
67324
  while (1) switch (_context.prev = _context.next) {
67304
67325
  case 0:
@@ -67328,7 +67349,7 @@ var Tr = function Tr(props) {
67328
67349
  }, _callee, null, [[2,, 6, 9]]);
67329
67350
  }));
67330
67351
  return function (_x) {
67331
- return _ref.apply(this, arguments);
67352
+ return _ref3.apply(this, arguments);
67332
67353
  };
67333
67354
  }());
67334
67355
  var renderTreeExpand = function renderTreeExpand(content) {
@@ -75082,7 +75103,7 @@ var upload_interface = __webpack_require__(8821);
75082
75103
 
75083
75104
 
75084
75105
  /* harmony default export */ var src_0 = ({
75085
- version: '3.9.8-beta.1'
75106
+ version: '3.9.8-beta.3'
75086
75107
  });
75087
75108
  }();
75088
75109
  /******/ return __webpack_exports__;