shineout 3.9.8-beta.2 → 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.2'
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.2');
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;
@@ -66695,6 +66718,7 @@ var FilterSearch = function FilterSearch(props) {
66695
66718
 
66696
66719
 
66697
66720
 
66721
+
66698
66722
  var thead_toNum = toNum;
66699
66723
  /* harmony default export */ var thead = (function (props) {
66700
66724
  var _props$jssStyle, _props$jssStyle$table;
@@ -66834,6 +66858,7 @@ var thead_toNum = toNum;
66834
66858
  dir: config.direction
66835
66859
  });
66836
66860
  };
66861
+ var isRtl = config.direction === 'rtl';
66837
66862
  var getFixedStyle = function getFixedStyle(fixed, index, colSpan, level) {
66838
66863
  // 累加level 至 0 的所有高度
66839
66864
  var top = context.trHeights.slice(0, level).reduce(function (a, b) {
@@ -66843,21 +66868,13 @@ var thead_toNum = toNum;
66843
66868
  var left = colgroup.slice(0, index).reduce(function (a, b) {
66844
66869
  return thead_toNum(a) + thead_toNum(b);
66845
66870
  }, 0);
66846
- return {
66847
- left: left,
66848
- top: top,
66849
- position: 'sticky'
66850
- };
66871
+ return defineProperty_default()(defineProperty_default()(defineProperty_default()({}, isRtl ? 'right' : 'left', left), "top", top), "position", 'sticky');
66851
66872
  }
66852
66873
  if (fixed === 'right') {
66853
66874
  var right = colgroup.slice(index + (typeof colSpan === 'function' ? 1 : colSpan)).reduce(function (a, b) {
66854
66875
  return thead_toNum(a) + thead_toNum(b);
66855
66876
  }, 0);
66856
- return {
66857
- right: right,
66858
- top: top,
66859
- position: 'sticky'
66860
- };
66877
+ return defineProperty_default()(defineProperty_default()(defineProperty_default()({}, isRtl ? 'left' : 'right', right), "top", top), "position", 'sticky');
66861
66878
  }
66862
66879
  return {
66863
66880
  top: top,
@@ -67251,19 +67268,17 @@ var Tr = function Tr(props) {
67251
67268
  var left = props.colgroup.slice(0, index).reduce(function (a, b) {
67252
67269
  return tr_toNum(a) + tr_toNum(b);
67253
67270
  }, 0);
67254
- return {
67255
- position: 'sticky',
67256
- left: left
67257
- };
67271
+ return defineProperty_default()({
67272
+ position: 'sticky'
67273
+ }, isRtl ? 'right' : 'left', left);
67258
67274
  }
67259
67275
  if (fixed === 'right') {
67260
67276
  var right = props.colgroup.slice(index + colSpan).reduce(function (a, b) {
67261
67277
  return tr_toNum(a) + tr_toNum(b);
67262
67278
  }, 0);
67263
- return {
67264
- position: 'sticky',
67265
- right: right
67266
- };
67279
+ return defineProperty_default()({
67280
+ position: 'sticky'
67281
+ }, isRtl ? 'left' : 'right', right);
67267
67282
  }
67268
67283
  return undefined;
67269
67284
  };
@@ -67304,7 +67319,7 @@ var Tr = function Tr(props) {
67304
67319
  isExpandLoading = _useState2[0],
67305
67320
  setIsExpandLoading = _useState2[1];
67306
67321
  var innerExpandClick = usePersistFn( /*#__PURE__*/function () {
67307
- var _ref = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(showLoader) {
67322
+ var _ref3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(showLoader) {
67308
67323
  return regeneratorRuntime_default()().wrap(function _callee$(_context) {
67309
67324
  while (1) switch (_context.prev = _context.next) {
67310
67325
  case 0:
@@ -67334,7 +67349,7 @@ var Tr = function Tr(props) {
67334
67349
  }, _callee, null, [[2,, 6, 9]]);
67335
67350
  }));
67336
67351
  return function (_x) {
67337
- return _ref.apply(this, arguments);
67352
+ return _ref3.apply(this, arguments);
67338
67353
  };
67339
67354
  }());
67340
67355
  var renderTreeExpand = function renderTreeExpand(content) {
@@ -75088,7 +75103,7 @@ var upload_interface = __webpack_require__(8821);
75088
75103
 
75089
75104
 
75090
75105
  /* harmony default export */ var src_0 = ({
75091
- version: '3.9.8-beta.2'
75106
+ version: '3.9.8-beta.3'
75092
75107
  });
75093
75108
  }();
75094
75109
  /******/ return __webpack_exports__;