shineout 3.10.1-beta.3 → 3.10.1-beta.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
@@ -545,5 +545,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
545
545
  // 此文件由脚本自动生成,请勿直接修改。
546
546
  // This file was generated automatically by a script. Please do not modify it directly.
547
547
  var _default = exports.default = {
548
- version: '3.10.1-beta.3'
548
+ version: '3.10.1-beta.5'
549
549
  };
package/dist/shineout.js CHANGED
@@ -13686,7 +13686,7 @@ var handleStyle = function handleStyle(style) {
13686
13686
  };
13687
13687
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
13688
13688
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
13689
- /* harmony default export */ var version = ('3.10.1-beta.3');
13689
+ /* harmony default export */ var version = ('3.10.1-beta.5');
13690
13690
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
13691
13691
 
13692
13692
 
@@ -16294,7 +16294,57 @@ var tabsTokens = {
16294
16294
  tabsExtraFillHoverBackgroundColor: 'Neutral-fill-3',
16295
16295
  tabsArrowFontColor: 'Neutral-text-4',
16296
16296
  tabsArrowFontSize: 'Font-14',
16297
- tabsBadgeMargin: 'Spacing-0'
16297
+ tabsBadgeMargin: 'Spacing-0',
16298
+ tabsSmallTabPaddingX: 'Spacing-10',
16299
+ tabsSmallTabPaddingY: 'Spacing-5',
16300
+ tabsSmallTabFontSize: 'Font-12',
16301
+ tabsSmallLinePaddingX: 'Spacing-4',
16302
+ tabsSmallLinePaddingTop: 'Spacing-4',
16303
+ tabsSmallLinePaddingBottom: 'Spacing-4',
16304
+ tabsSmallLineInnerPaddingX: 'Spacing-6',
16305
+ tabsSmallLineInnerPaddingY: 'Spacing-2',
16306
+ tabsSmallLineFontSize: 'Font-12',
16307
+ tabsSmallLineCheckedFontSize: 'Font-12',
16308
+ tabsSmallLineHoverFontSize: 'Font-12',
16309
+ tabsSmallFillPaddingX: 'Spacing-2',
16310
+ tabsSmallFillPaddingY: 'Spacing-2',
16311
+ tabsSmallFillInnerPaddingX: 'Spacing-12',
16312
+ tabsSmallFillInnerPaddingY: 'Spacing-3',
16313
+ tabsSmallFillFontSize: 'Font-12',
16314
+ tabsSmallFillActiveFontSize: 'Font-12',
16315
+ tabsSmallFillCheckedFontSize: 'Font-12',
16316
+ tabsSmallCardPaddingX: 'Spacing-10',
16317
+ tabsSmallCardPaddingY: 'Spacing-5',
16318
+ tabsSmallCardFontSize: 'Font-12',
16319
+ tabsSmallCardActiveFontSize: 'Font-12',
16320
+ tabsSmallCardCheckedFontSize: 'Font-12',
16321
+ tabsSmallDashFontSize: 'Font-12',
16322
+ tabsSmallDashActiveFontSize: 'Font-12',
16323
+ tabsLargeTabPaddingX: 'Spacing-20',
16324
+ tabsLargeTabPaddingY: 'Spacing-12',
16325
+ tabsLargeTabFontSize: 'Font-16',
16326
+ tabsLargeLinePaddingX: 'Spacing-12',
16327
+ tabsLargeLinePaddingTop: 'Spacing-8',
16328
+ tabsLargeLinePaddingBottom: 'Spacing-8',
16329
+ tabsLargeLineInnerPaddingX: 'Spacing-12',
16330
+ tabsLargeLineInnerPaddingY: 'Spacing-6',
16331
+ tabsLargeLineFontSize: 'Font-16',
16332
+ tabsLargeLineCheckedFontSize: 'Font-16',
16333
+ tabsLargeLineHoverFontSize: 'Font-16',
16334
+ tabsLargeFillPaddingX: 'Spacing-6',
16335
+ tabsLargeFillPaddingY: 'Spacing-6',
16336
+ tabsLargeFillInnerPaddingX: 'Spacing-20',
16337
+ tabsLargeFillInnerPaddingY: 'Spacing-7',
16338
+ tabsLargeFillFontSize: 'Font-16',
16339
+ tabsLargeFillActiveFontSize: 'Font-16',
16340
+ tabsLargeFillCheckedFontSize: 'Font-16',
16341
+ tabsLargeCardPaddingX: 'Spacing-20',
16342
+ tabsLargeCardPaddingY: 'Spacing-12',
16343
+ tabsLargeCardFontSize: 'Font-16',
16344
+ tabsLargeCardActiveFontSize: 'Font-16',
16345
+ tabsLargeCardCheckedFontSize: 'Font-16',
16346
+ tabsLargeDashFontSize: 'Font-16',
16347
+ tabsLargeDashActiveFontSize: 'Font-16'
16298
16348
  };
16299
16349
  /* harmony default export */ var tabs = (tabsTokens);
16300
16350
  ;// CONCATENATED MODULE: ../theme/src/tabs/index.ts
@@ -29716,7 +29766,99 @@ var tabsStyle = {
29716
29766
  }
29717
29767
  }
29718
29768
  },
29719
- sticky: {}
29769
+ sticky: {},
29770
+ small: {
29771
+ '& $tab': {
29772
+ fontSize: src.tabsSmallTabFontSize
29773
+ },
29774
+ // card
29775
+ '& $headerWrapper[data-soui-shape="card"] $header $tab': {
29776
+ padding: "".concat(src.tabsSmallCardPaddingY, " ").concat(src.tabsSmallCardPaddingX),
29777
+ fontSize: src.tabsSmallCardFontSize,
29778
+ '&[data-soui-state="active"]': {
29779
+ fontSize: src.tabsSmallCardCheckedFontSize
29780
+ }
29781
+ },
29782
+ // line
29783
+ '& $headerWrapper[data-soui-shape="line"] $header $tab': {
29784
+ padding: "".concat(src.tabsSmallLinePaddingTop, " ").concat(src.tabsSmallLinePaddingX, " ").concat(src.tabsSmallLinePaddingBottom),
29785
+ fontSize: src.tabsSmallLineFontSize,
29786
+ '&[data-soui-state="active"]': {
29787
+ fontSize: src.tabsSmallLineCheckedFontSize
29788
+ }
29789
+ },
29790
+ '& $lineInner': {
29791
+ padding: "".concat(src.tabsSmallLineInnerPaddingY, " ").concat(src.tabsSmallLineInnerPaddingX)
29792
+ },
29793
+ // dash
29794
+ '& $headerWrapper[data-soui-shape="dash"] $header $tab': {
29795
+ padding: "".concat(src.tabsSmallLinePaddingTop, " ").concat(src.tabsSmallLinePaddingX, " ").concat(src.tabsSmallLinePaddingBottom),
29796
+ fontSize: src.tabsSmallDashFontSize,
29797
+ '&[data-soui-state="active"]': {
29798
+ fontSize: src.tabsSmallDashActiveFontSize
29799
+ }
29800
+ },
29801
+ // fill
29802
+ '& $headerWrapper[data-soui-shape="fill"] $header $tab': {
29803
+ fontSize: src.tabsSmallFillFontSize,
29804
+ padding: "".concat(src.tabsSmallFillPaddingY, " 0"),
29805
+ '&:first-child': {
29806
+ paddingLeft: src.tabsSmallFillPaddingX
29807
+ },
29808
+ '&:last-child': {
29809
+ paddingRight: src.tabsSmallFillPaddingX
29810
+ }
29811
+ },
29812
+ '& $fillInner': {
29813
+ padding: "".concat(src.tabsSmallFillInnerPaddingY, " ").concat(src.tabsSmallFillInnerPaddingX)
29814
+ }
29815
+ },
29816
+ large: {
29817
+ '& $tab': {
29818
+ fontSize: src.tabsLargeTabFontSize
29819
+ },
29820
+ // card
29821
+ '& $headerWrapper[data-soui-shape="card"] $header $tab': {
29822
+ padding: "".concat(src.tabsLargeCardPaddingY, " ").concat(src.tabsLargeCardPaddingX),
29823
+ fontSize: src.tabsLargeCardFontSize,
29824
+ '&[data-soui-state="active"]': {
29825
+ fontSize: src.tabsLargeCardCheckedFontSize
29826
+ }
29827
+ },
29828
+ // line
29829
+ '& $headerWrapper[data-soui-shape="line"] $header $tab': {
29830
+ padding: "".concat(src.tabsLargeLinePaddingTop, " ").concat(src.tabsLargeLinePaddingX, " ").concat(src.tabsLargeLinePaddingBottom),
29831
+ fontSize: src.tabsLargeLineFontSize,
29832
+ '&[data-soui-state="active"]': {
29833
+ fontSize: src.tabsLargeLineCheckedFontSize
29834
+ }
29835
+ },
29836
+ '& $lineInner': {
29837
+ padding: "".concat(src.tabsLargeLineInnerPaddingY, " ").concat(src.tabsLargeLineInnerPaddingX)
29838
+ },
29839
+ // dash
29840
+ '& $headerWrapper[data-soui-shape="dash"] $header $tab': {
29841
+ padding: "".concat(src.tabsLargeLinePaddingTop, " ").concat(src.tabsLargeLinePaddingX, " ").concat(src.tabsLargeLinePaddingBottom),
29842
+ fontSize: src.tabsLargeDashFontSize,
29843
+ '&[data-soui-state="active"]': {
29844
+ fontSize: src.tabsLargeDashActiveFontSize
29845
+ }
29846
+ },
29847
+ // fill
29848
+ '& $headerWrapper[data-soui-shape="fill"] $header $tab': {
29849
+ fontSize: src.tabsLargeFillFontSize,
29850
+ padding: "".concat(src.tabsLargeFillPaddingY, " 0"),
29851
+ '&:first-child': {
29852
+ paddingLeft: src.tabsLargeFillPaddingX
29853
+ },
29854
+ '&:last-child': {
29855
+ paddingRight: src.tabsLargeFillPaddingX
29856
+ }
29857
+ },
29858
+ '& $fillInner': {
29859
+ padding: "".concat(src.tabsLargeFillInnerPaddingY, " ").concat(src.tabsLargeFillInnerPaddingX)
29860
+ }
29861
+ }
29720
29862
  };
29721
29863
  /* harmony default export */ var tabs_tabs = (tabsStyle);
29722
29864
  ;// CONCATENATED MODULE: ../shineout-style/src/tabs/index.ts
@@ -67494,6 +67636,21 @@ var useTableLayout = function useTableLayout(props) {
67494
67636
  for (var i = 0, count = items.length; i < count; i++) {
67495
67637
  _loop();
67496
67638
  }
67639
+
67640
+ // offsetWidth 返回整数(四舍五入),多列累加可能导致总和比表格实际渲染宽度大 1~N px,
67641
+ // 这些多出的像素会让 table-layout:fixed 的表格撑宽,产生不必要的横向滚动条。
67642
+ // 用 <table> 自身的 offsetWidth 作为基准,将取整溢出部分从最后一列减去。
67643
+ if (target.current && newCols.length > 0) {
67644
+ var tableRenderedWidth = target.current.offsetWidth;
67645
+ var measuredSum = newCols.reduce(function (a, b) {
67646
+ return a + b;
67647
+ }, 0);
67648
+ var excess = measuredSum - tableRenderedWidth;
67649
+ // 仅修正取整误差范围内的溢出(最多每列 1px)
67650
+ if (tableRenderedWidth > 0 && excess > 0 && excess <= items.length) {
67651
+ newCols[newCols.length - 1] -= excess;
67652
+ }
67653
+ }
67497
67654
  if (fromDrag && props.columnResizable) {
67498
67655
  var widthArr = toConsumableArray_default()(newCols);
67499
67656
  if (typeof props.width === 'number') {
@@ -71578,6 +71735,7 @@ var TabsHeader = function TabsHeader(props) {
71578
71735
  splitColor = props.splitColor,
71579
71736
  tabBarStyle = props.tabBarStyle,
71580
71737
  getPosition = props.getPosition,
71738
+ size = props.size,
71581
71739
  semClass = props.semClass,
71582
71740
  semStyle = props.semStyle;
71583
71741
  var headerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
@@ -71725,7 +71883,7 @@ var TabsHeader = function TabsHeader(props) {
71725
71883
  });
71726
71884
  }, 0);
71727
71885
  }
71728
- }, [active, tabs]);
71886
+ }, [active, tabs, size]);
71729
71887
  var renderHeaderScrollBar = function renderHeaderScrollBar() {
71730
71888
  if (shape !== 'line' && shape !== 'dash') return;
71731
71889
  if (!currentTabSize.width || !currentTabSize.height) return;
@@ -71863,7 +72021,7 @@ var TabsHeader = function TabsHeader(props) {
71863
72021
 
71864
72022
 
71865
72023
 
71866
- var tabs_excluded = ["jssStyle", "align", "children", "shape", "position", "lazy", "autoFill", "hideSplit", "collapsible", "defaultCollapsed", "onChange", "extra", "border", "splitColor", "tabBarExtraContent", "background", "activeBackground", "inactiveBackground", "defaultActive", "tabBarStyle", "color", "sticky", "allowNonPanel", "renderTabsHeader", "className", "classNames", "styles", "style"];
72024
+ var tabs_excluded = ["jssStyle", "align", "children", "shape", "position", "size", "lazy", "autoFill", "hideSplit", "collapsible", "defaultCollapsed", "onChange", "extra", "border", "splitColor", "tabBarExtraContent", "background", "activeBackground", "inactiveBackground", "defaultActive", "tabBarStyle", "color", "sticky", "allowNonPanel", "renderTabsHeader", "className", "classNames", "styles", "style"];
71867
72025
 
71868
72026
 
71869
72027
 
@@ -71901,6 +72059,7 @@ var Tabs = function Tabs(props) {
71901
72059
  children = props.children,
71902
72060
  shapeProps = props.shape,
71903
72061
  position = props.position,
72062
+ size = props.size,
71904
72063
  _props$lazy = props.lazy,
71905
72064
  lazy = _props$lazy === void 0 ? true : _props$lazy,
71906
72065
  autoFill = props.autoFill,
@@ -71957,7 +72116,7 @@ var Tabs = function Tabs(props) {
71957
72116
  _useSemantic2 = slicedToArray_default()(_useSemantic, 2),
71958
72117
  semClass = _useSemantic2[0],
71959
72118
  semStyle = _useSemantic2[1];
71960
- var rootClass = classnames_default()(tabsStyle.rootClass, tabsStyle.tabs, tabsClassName, defineProperty_default()(defineProperty_default()({}, tabsStyle.autoFill, isVertical || autoFill), tabsStyle.collapsed, collapse), semClass('root'));
72119
+ var rootClass = classnames_default()(tabsStyle.rootClass, tabsStyle.tabs, tabsClassName, defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, tabsStyle.autoFill, isVertical || autoFill), tabsStyle.collapsed, collapse), tabsStyle.small, size === 'small'), tabsStyle.large, size === 'large'), semClass('root'));
71961
72120
  var getRootProps = function getRootProps() {
71962
72121
  return rest;
71963
72122
  };
@@ -71997,7 +72156,8 @@ var Tabs = function Tabs(props) {
71997
72156
  var getDataProps = function getDataProps() {
71998
72157
  return getDataAttribute({
71999
72158
  position: getPosition(),
72000
- shape: shape
72159
+ shape: shape,
72160
+ size: size || 'default'
72001
72161
  });
72002
72162
  };
72003
72163
  var handleCollapsible = function handleCollapsible() {
@@ -72071,6 +72231,7 @@ var Tabs = function Tabs(props) {
72071
72231
  align: align,
72072
72232
  jssStyle: jssStyle,
72073
72233
  position: position,
72234
+ size: size,
72074
72235
  hideSplit: hideSplit,
72075
72236
  extra: getExtra(),
72076
72237
  splitColor: border,
@@ -79777,7 +79938,7 @@ var watermark_interface = __webpack_require__(6640);
79777
79938
 
79778
79939
 
79779
79940
  /* harmony default export */ var src_0 = ({
79780
- version: '3.10.1-beta.3'
79941
+ version: '3.10.1-beta.5'
79781
79942
  });
79782
79943
  }();
79783
79944
  /******/ return __webpack_exports__;