shineout 3.7.0-beta.3 → 3.7.0-beta.30

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/dist/shineout.js CHANGED
@@ -261,6 +261,13 @@ return /******/ (function() { // webpackBootstrap
261
261
 
262
262
 
263
263
 
264
+ /***/ }),
265
+
266
+ /***/ 6599:
267
+ /***/ (function() {
268
+
269
+
270
+
264
271
  /***/ }),
265
272
 
266
273
  /***/ 5864:
@@ -3787,6 +3794,76 @@ const figma = [
3787
3794
  token: 'Orange-9',
3788
3795
  locked: true,
3789
3796
  },
3797
+ {
3798
+ name: '褐色-1',
3799
+ value: '#FAF4E3',
3800
+ describe: '浅色背景',
3801
+ token: 'Brown-1',
3802
+ locked: true,
3803
+ },
3804
+ {
3805
+ name: '褐色-10',
3806
+ value: '#4D2100',
3807
+ describe: '-10',
3808
+ token: 'Brown-10',
3809
+ locked: true,
3810
+ },
3811
+ {
3812
+ name: '褐色-2',
3813
+ value: '#EBDDBC',
3814
+ describe: '聚焦',
3815
+ token: 'Brown-2',
3816
+ locked: true,
3817
+ },
3818
+ {
3819
+ name: '褐色-3',
3820
+ value: '#D6C094',
3821
+ describe: '禁用',
3822
+ token: 'Brown-3',
3823
+ locked: true,
3824
+ },
3825
+ {
3826
+ name: '褐色-4',
3827
+ value: '#C2A470',
3828
+ describe: '悬浮',
3829
+ token: 'Brown-4',
3830
+ locked: true,
3831
+ },
3832
+ {
3833
+ name: '褐色-5',
3834
+ value: '#AD8951',
3835
+ describe: '悬浮',
3836
+ token: 'Brown-5',
3837
+ locked: true,
3838
+ },
3839
+ {
3840
+ name: '褐色-6',
3841
+ value: '#996F37',
3842
+ describe: '常规',
3843
+ token: 'Brown-6',
3844
+ locked: true,
3845
+ },
3846
+ {
3847
+ name: '褐色-7',
3848
+ value: '#865824',
3849
+ describe: '点击',
3850
+ token: 'Brown-7',
3851
+ locked: true,
3852
+ },
3853
+ {
3854
+ name: '褐色-8',
3855
+ value: '#734415',
3856
+ describe: '-8',
3857
+ token: 'Brown-8',
3858
+ locked: true,
3859
+ },
3860
+ {
3861
+ name: '褐色-9',
3862
+ value: '#603109',
3863
+ describe: '-9',
3864
+ token: 'Brown-9',
3865
+ locked: true,
3866
+ },
3790
3867
  {
3791
3868
  name: '紫色-1',
3792
3869
  value: '#F8EEFE',
@@ -4475,7 +4552,8 @@ const figma = [
4475
4552
  },
4476
4553
  {
4477
4554
  name: 'Shadow-5',
4478
- value: 'rgba(0, 0, 0, 0.2) 0px 2px 1px -1px, rgba(0, 0, 0, 0.14) 0px 1px 1px 0px, rgba(0, 0, 0, 0.12) 0px 1px 3px 0px',
4555
+ value:
4556
+ 'rgba(0, 0, 0, 0.2) 0px 2px 1px -1px, rgba(0, 0, 0, 0.14) 0px 1px 1px 0px, rgba(0, 0, 0, 0.12) 0px 1px 3px 0px',
4479
4557
  describe: 'Switch圆圈阴影',
4480
4558
  token: 'Shadow-5',
4481
4559
  locked: true,
@@ -6374,6 +6452,7 @@ __webpack_require__.d(__webpack_exports__, {
6374
6452
  Rule: function() { return /* reexport */ Rule; },
6375
6453
  Select: function() { return /* reexport */ src_select_0; },
6376
6454
  SheetsRegistry: function() { return /* reexport */ SheetsRegistry; },
6455
+ Skeleton: function() { return /* reexport */ src_skeleton_0; },
6377
6456
  Slider: function() { return /* reexport */ src_slider_0; },
6378
6457
  Spin: function() { return /* reexport */ src_spin_0; },
6379
6458
  Steps: function() { return /* reexport */ src_steps_0; },
@@ -6652,6 +6731,7 @@ __webpack_require__.d(src_type_namespaceObject, {
6652
6731
  Rate: function() { return rate_interface; },
6653
6732
  Rule: function() { return rule_interface; },
6654
6733
  Select: function() { return select_interface; },
6734
+ Skeleton: function() { return skeleton_interface; },
6655
6735
  Slider: function() { return slider_interface; },
6656
6736
  Spin: function() { return spin_interface; },
6657
6737
  Steps: function() { return steps_interface; },
@@ -6780,7 +6860,11 @@ var arrowRight = [/*#__PURE__*/(0,jsx_runtime.jsx)("path", {
6780
6860
  clipRule: "evenodd",
6781
6861
  d: "M10.0625 17.9999C9.67198 18.3904 9.03881 18.3904 8.64829 17.9999C8.25776 17.6094 8.25776 16.9762 8.64829 16.5857L13.2341 11.9999L8.64829 7.41414C8.25776 7.02361 8.25776 6.39045 8.64829 5.99992C9.03881 5.6094 9.67198 5.6094 10.0625 5.99992L15.3554 11.2928C15.7459 11.6833 15.7459 12.3165 15.3554 12.707L10.0625 17.9999Z"
6782
6862
  }, '1')];
6783
- var caretFill = ['M18.2213 9.72149L12.6348 15.2953C12.2444 15.6847 11.6125 15.6847 11.2222 15.2952L5.69827 9.78345C5.30731 9.39335 5.30662 8.76019 5.69671 8.36924C5.88295 8.18259 6.13536 8.07705 6.39902 8.07558L17.5094 8.0136C18.0617 8.01052 18.5119 8.45573 18.515 9.008C18.5165 9.27554 18.4107 9.53253 18.2213 9.72149Z'];
6863
+ var caretFill = /*#__PURE__*/(0,jsx_runtime.jsx)("path", {
6864
+ fillRule: "evenodd",
6865
+ clipRule: "evenodd",
6866
+ d: "M18.262 9.92099L12.6754 15.4948C12.2851 15.8842 11.6531 15.8842 11.2628 15.4947L5.73891 9.98295C5.34796 9.59286 5.34727 8.95969 5.73736 8.56874C5.9236 8.3821 6.17601 8.27656 6.43967 8.27508L17.5501 8.2131C18.1024 8.21002 18.5526 8.65523 18.5556 9.2075C18.5571 9.47504 18.4514 9.73203 18.262 9.92099Z"
6867
+ });
6784
6868
  var imageCount = [/*#__PURE__*/(0,jsx_runtime.jsx)("path", {
6785
6869
  fillRule: "evenodd",
6786
6870
  clipRule: "evenodd",
@@ -7074,12 +7158,12 @@ var config = {
7074
7158
  Next: icons.ArrowRight,
7075
7159
  CollapseArrow: icons.ArrowLeft
7076
7160
  },
7077
- textarea: {
7078
- Close: icons.CloseFill
7079
- },
7080
7161
  tag: {
7081
7162
  Close: icons.Close
7082
7163
  },
7164
+ textarea: {
7165
+ Close: icons.CloseFill
7166
+ },
7083
7167
  transfer: {
7084
7168
  DeleteAll: icons.Delete,
7085
7169
  DeleteItem: icons.Close,
@@ -7090,7 +7174,8 @@ var config = {
7090
7174
  tree: {
7091
7175
  LineExpand: icons.Expand,
7092
7176
  LineCollapse: icons.Shrink,
7093
- Expand: icons.ArrowDownFill
7177
+ Expand: icons.ArrowDownFill,
7178
+ Leaf: icons.File
7094
7179
  },
7095
7180
  treeSelect: {
7096
7181
  More: icons.More,
@@ -12142,7 +12227,7 @@ var handleStyle = function handleStyle(style) {
12142
12227
  };
12143
12228
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
12144
12229
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
12145
- /* harmony default export */ var version = ('3.7.0-beta.3');
12230
+ /* harmony default export */ var version = ('3.7.0-beta.30');
12146
12231
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
12147
12232
 
12148
12233
 
@@ -12421,6 +12506,16 @@ var Token = {
12421
12506
  'Orange-7': '#865824',
12422
12507
  'Orange-8': '#734415',
12423
12508
  'Orange-9': '#603109',
12509
+ 'Brown-1': '#FAF4E3',
12510
+ 'Brown-10': '#4D2100',
12511
+ 'Brown-2': '#EBDDBC',
12512
+ 'Brown-3': '#D6C094',
12513
+ 'Brown-4': '#C2A470',
12514
+ 'Brown-5': '#AD8951',
12515
+ 'Brown-6': '#996F37',
12516
+ 'Brown-7': '#865824',
12517
+ 'Brown-8': '#734415',
12518
+ 'Brown-9': '#603109',
12424
12519
  'Purple-1': '#F8EEFE',
12425
12520
  'Purple-10': '#150530',
12426
12521
  'Purple-2': '#EDD6FE',
@@ -14338,6 +14433,24 @@ var selectTokens = {
14338
14433
 
14339
14434
 
14340
14435
  /* harmony default export */ var src_select = (tokenToVars(select_select, token));
14436
+ ;// CONCATENATED MODULE: ../theme/src/skeleton/skeleton.ts
14437
+ // 此文件由脚本自动生成,请勿直接修改。
14438
+ // This file was generated automatically by a script. Please do not modify it directly.
14439
+
14440
+ var skeletonTokens = {
14441
+ skeletonMargin: 'Spacing-12',
14442
+ skeletonHeight: 'Size-8',
14443
+ skeletonBackgroundColor: 'Neutral-fill-2',
14444
+ skeletonBackgroundRadius: 'Radius-default',
14445
+ skeletonAnimationFromColor: 'Neutral-fill-2',
14446
+ skeletonAnimationToColor: 'Neutral-fill-3'
14447
+ };
14448
+ /* harmony default export */ var skeleton = (skeletonTokens);
14449
+ ;// CONCATENATED MODULE: ../theme/src/skeleton/index.ts
14450
+
14451
+
14452
+
14453
+ /* harmony default export */ var src_skeleton = (tokenToVars(skeleton, token));
14341
14454
  ;// CONCATENATED MODULE: ../theme/src/slider/slider.ts
14342
14455
  // 此文件由脚本自动生成,请勿直接修改。
14343
14456
  // This file was generated automatically by a script. Please do not modify it directly.
@@ -14775,24 +14888,24 @@ var tagTokens = {
14775
14888
  tagMagentaFillDisabledFontColor: 'Neutral-text-1',
14776
14889
  tagMagentaFillDisabledBackgroundColor: 'Magenta-3',
14777
14890
  tagMagentaFillDisabledBorderColor: 'Magenta-3',
14778
- tagBrownFontColor: 'Orange-6',
14779
- tagBrownBackgroundColor: 'Orange-1',
14780
- tagBrownBorderColor: 'Orange-1',
14781
- tagBrownDisabledFontColor: 'Orange-3',
14782
- tagBrownDisabledBackgroundColor: 'Orange-1',
14783
- tagBrownDisabledBorderColor: 'Orange-1',
14784
- tagBrownOutlineFontColor: 'Orange-6',
14891
+ tagBrownFontColor: 'Brown-6',
14892
+ tagBrownBackgroundColor: 'Brown-1',
14893
+ tagBrownBorderColor: 'Brown-1',
14894
+ tagBrownDisabledFontColor: 'Brown-3',
14895
+ tagBrownDisabledBackgroundColor: 'Brown-1',
14896
+ tagBrownDisabledBorderColor: 'Brown-1',
14897
+ tagBrownOutlineFontColor: 'Brown-6',
14785
14898
  tagBrownOutlineBackgroundColor: 'Neutral-fill-1',
14786
- tagBrownOutlineBorderColor: 'Orange-6',
14787
- tagBrownOutlineDisabledFontColor: 'Orange-3',
14899
+ tagBrownOutlineBorderColor: 'Brown-6',
14900
+ tagBrownOutlineDisabledFontColor: 'Brown-3',
14788
14901
  tagBrownOutlineDisabledBackgroundColor: 'Neutral-fill-1',
14789
- tagBrownOutlineDisabledBorderColor: 'Orange-3',
14902
+ tagBrownOutlineDisabledBorderColor: 'Brown-3',
14790
14903
  tagBrownFillFontColor: 'Neutral-text-1',
14791
- tagBrownFillBackgroundColor: 'Orange-6',
14792
- tagBrownFillBorderColor: 'Orange-6',
14904
+ tagBrownFillBackgroundColor: 'Brown-6',
14905
+ tagBrownFillBorderColor: 'Brown-6',
14793
14906
  tagBrownFillDisabledFontColor: 'Neutral-text-1',
14794
- tagBrownFillDisabledBackgroundColor: 'Orange-3',
14795
- tagBrownFillDisabledBorderColor: 'Orange-3',
14907
+ tagBrownFillDisabledBackgroundColor: 'Brown-3',
14908
+ tagBrownFillDisabledBorderColor: 'Brown-3',
14796
14909
  tagPurpleFontColor: 'Purple-6',
14797
14910
  tagPurpleBackgroundColor: 'Purple-1',
14798
14911
  tagPurpleBorderColor: 'Purple-1',
@@ -14930,45 +15043,58 @@ var tagTokens = {
14930
15043
  tagInfoOutlineIconDisabledFontColor: 'Brand-3',
14931
15044
  tagInfoOutlineIconHoverBackgroundColor: 'Brand-1',
14932
15045
  tagInfoOutlineIconHoverFontColor: 'Brand-6',
15046
+ tagInfoFillIconHoverBackgroundColor: 'Brand-5',
14933
15047
  tagDefaultIconFontColor: 'Neutral-text-4',
14934
15048
  tagDefaultIconDisabledFontColor: 'Neutral-text-2',
14935
15049
  tagDefaultIconHoverBackgroundColor: 'Neutral-fill-3',
14936
15050
  tagDefaultIconHoverFontColor: 'Neutral-text-5',
15051
+ tagDefaultFillIconHoverBackgroundColor: 'Neutral-fill-4',
14937
15052
  tagSuccessIconFontColor: 'Success-6',
14938
15053
  tagSuccessIconDisabledFontColor: 'Success-3',
14939
15054
  tagSuccessIconHoverBackgroundColor: 'Success-2',
14940
15055
  tagSuccessOutlineIconDisabledFontColor: 'Success-3',
14941
15056
  tagSuccessOutlineIconHoverBackgroundColor: 'Success-2',
15057
+ tagSuccessFillIconHoverBackgroundColor: 'Success-5',
14942
15058
  tagWarningIconDisabledFontColor: 'Warning-3',
14943
15059
  tagWarningIconHoverBackgroundColor: 'Warning-2',
14944
15060
  tagWarningFillIconFontColor: 'Warning-6',
15061
+ tagWarningFillIconHoverBackgroundColor: 'Warning-5',
14945
15062
  tagDangerIconFontColor: 'Danger-6',
14946
15063
  tagDangerIconDisabledFontColor: 'Danger-3',
14947
15064
  tagDangerIconHoverBackgroundColor: 'Danger-2',
15065
+ tagDangerFillIconHoverBackgroundColor: 'Danger-5',
14948
15066
  tagMagentaIconFontColor: 'Magenta-6',
14949
15067
  tagMagentaIconDisabledFontColor: 'Magenta-3',
14950
15068
  tagMagentaIconHoverBackgroundColor: 'Magenta-2',
14951
- tagBrownIconFontColor: 'Orange-6',
14952
- tagBrownIconDisabledFontColor: 'Orange-3',
14953
- tagBrownIconHoverBackgroundColor: 'Orange-2',
15069
+ tagMagentaFillIconHoverBackgroundColor: 'Magenta-5',
15070
+ tagBrownIconFontColor: 'Brown-6',
15071
+ tagBrownIconDisabledFontColor: 'Brown-3',
15072
+ tagBrownIconHoverBackgroundColor: 'Brown-2',
15073
+ tagBrownFillIconHoverBackgroundColor: 'Brown-5',
14954
15074
  tagPurpleIconFontColor: 'Purple-6',
14955
15075
  tagPurpleIconDisabledFontColor: 'Purple-3',
14956
15076
  tagPurpleIconHoverBackgroundColor: 'Purple-2',
15077
+ tagPurpleFillIconHoverBackgroundColor: 'Purple-5',
14957
15078
  tagIndigoIconFontColor: 'Indigo-6',
14958
15079
  tagIndigoIconDisabledFontColor: 'Indigo-3',
14959
15080
  tagIndigoIconHoverBackgroundColor: 'Indigo-2',
15081
+ tagIndigoFillIconHoverBackgroundColor: 'Indigo-5',
14960
15082
  tagCyanIconFontColor: 'Cyan-6',
14961
15083
  tagCyanIconDisabledFontColor: 'Cyan-3',
14962
15084
  tagCyanIconHoverBackgroundColor: 'Cyan-2',
15085
+ tagCyanFillIconHoverBackgroundColor: 'Cyan-5',
14963
15086
  tagNeonIconFontColor: 'Neon-6',
14964
15087
  tagNeonIconDisabledFontColor: 'Neon-3',
14965
15088
  tagNeonIconHoverBackgroundColor: 'Neon-2',
15089
+ tagNeonFillIconHoverBackgroundColor: 'Neon-5',
14966
15090
  tagLemonIconFontColor: 'Lemon-6',
14967
15091
  tagLemonIconDisabledFontColor: 'Lemon-3',
14968
15092
  tagLemonIconHoverBackgroundColor: 'Lemon-2',
15093
+ tagLemonFillIconHoverBackgroundColor: 'Lemon-5',
14969
15094
  tagTangerineIconFontColor: 'Tangerine-6',
14970
15095
  tagTangerineIconDisabledFontColor: 'Tangerine-3',
14971
- tagTangerineIconHoverBackgroundColor: 'Tangerine-2'
15096
+ tagTangerineIconHoverBackgroundColor: 'Tangerine-2',
15097
+ tagTangerineFillIconHoverBackgroundColor: 'Tangerine-5'
14972
15098
  };
14973
15099
  /* harmony default export */ var tag = (tagTokens);
14974
15100
  ;// CONCATENATED MODULE: ../theme/src/tag/index.ts
@@ -15327,8 +15453,9 @@ var uploadTokens = {
15327
15453
 
15328
15454
 
15329
15455
 
15330
- var src_Tokens = objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, token_token), src_alert), src_avatar), src_badge), src_breadcrumb), src_button), src_card), src_card_group), src_carousel), src_cascader), src_checkbox), src_collapse), src_common), src_date_picker), src_descriptions), src_divider), src_dropdown), src_editable_area), src_empty), src_form), src_icon), src_image), src_input), src_link), src_list), src_menu), src_message), src_modal), src_pagination), src_popover), src_progress), src_radio), src_rate), src_select), src_slider), src_spin), src_steps), src_sticky), src_switch), src_table), src_tabs), src_tag), src_textarea), src_tooltip), src_transfer), src_tree), src_tree_select), src_upload);
15331
- var ComponentTokenMap = objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, src_alert_alert), avatar), badge), breadcrumb), button_button), card), card_group), carousel), cascader), checkbox_checkbox), collapse), common_common), date_picker), descriptions), divider), dropdown), editable_area), empty), form_form), icon_icon), image_image), input), link_link), list), menu), message), modal), pagination), popover), progress), radio_radio), rate), select_select), slider), spin), steps), sticky), switch_switch), table), tabs), tag), textarea_textarea), tooltip), transfer), tree), tree_select), upload);
15456
+
15457
+ var src_Tokens = objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, token_token), src_alert), src_avatar), src_badge), src_breadcrumb), src_button), src_card), src_card_group), src_carousel), src_cascader), src_checkbox), src_collapse), src_common), src_date_picker), src_descriptions), src_divider), src_dropdown), src_editable_area), src_empty), src_form), src_icon), src_image), src_input), src_link), src_list), src_menu), src_message), src_modal), src_pagination), src_popover), src_progress), src_radio), src_rate), src_select), src_skeleton), src_slider), src_spin), src_steps), src_sticky), src_switch), src_table), src_tabs), src_tag), src_textarea), src_tooltip), src_transfer), src_tree), src_tree_select), src_upload);
15458
+ var ComponentTokenMap = objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, src_alert_alert), avatar), badge), breadcrumb), button_button), card), card_group), carousel), cascader), checkbox_checkbox), collapse), common_common), date_picker), descriptions), divider), dropdown), editable_area), empty), form_form), icon_icon), image_image), input), link_link), list), menu), message), modal), pagination), popover), progress), radio_radio), rate), select_select), skeleton), slider), spin), steps), sticky), switch_switch), table), tabs), tag), textarea_textarea), tooltip), transfer), tree), tree_select), upload);
15332
15459
 
15333
15460
 
15334
15461
 
@@ -16053,7 +16180,6 @@ var ButtonStyle = {
16053
16180
  borderRadius: src.buttonBorderRadius,
16054
16181
  lineHeight: src.lineHeightDynamic,
16055
16182
  padding: "".concat(src.buttonPaddingY, " ").concat(src.buttonPaddingX),
16056
- transition: 'all .1s linear',
16057
16183
  fontFamily: 'inherit',
16058
16184
  // height: Token.buttonHeight,
16059
16185
 
@@ -16063,6 +16189,9 @@ var ButtonStyle = {
16063
16189
  '[class*="button-group"] > & + &': {
16064
16190
  margin: 0
16065
16191
  },
16192
+ '&:hover': {
16193
+ transition: 'all .1s linear'
16194
+ },
16066
16195
  '&:active': {
16067
16196
  transition: 'none'
16068
16197
  },
@@ -17247,12 +17376,14 @@ var cascaderStyle = objectSpread2_default()(objectSpread2_default()({
17247
17376
  minWidth: 0,
17248
17377
  position: 'relative',
17249
17378
  outline: 'none',
17250
- overflow: 'hidden'
17379
+ maxHeight: 78,
17380
+ overflow: 'auto'
17251
17381
  },
17252
17382
  result: {
17253
17383
  display: 'flex',
17254
17384
  flex: '1',
17255
17385
  minWidth: 0,
17386
+ height: '100%',
17256
17387
  alignItems: 'center',
17257
17388
  lineHeight: src.lineHeightDynamic
17258
17389
  },
@@ -17393,7 +17524,9 @@ var cascaderStyle = objectSpread2_default()(objectSpread2_default()({
17393
17524
  iconWrapper: {
17394
17525
  display: 'flex',
17395
17526
  alignItems: 'center',
17396
- justifyContent: 'center'
17527
+ justifyContent: 'center',
17528
+ position: 'sticky',
17529
+ top: 0
17397
17530
  },
17398
17531
  clearable: {},
17399
17532
  clearIcon: {
@@ -17521,12 +17654,14 @@ var cascaderStyle = objectSpread2_default()(objectSpread2_default()({
17521
17654
  visibility: 'hidden'
17522
17655
  },
17523
17656
  moreWrapper: {
17524
- // width: 248,
17525
- // height: 72,
17657
+ width: 'max-content',
17526
17658
  maxWidth: 400,
17527
17659
  maxHeight: 160,
17528
17660
  overflow: 'auto',
17529
- padding: "".concat(src.cascaderMorePaddingY, " ").concat(src.cascaderMorePaddingX)
17661
+ padding: "".concat(src.cascaderMorePaddingY, " ").concat(src.cascaderMorePaddingX),
17662
+ '& $tag': {
17663
+ maxWidth: 'none'
17664
+ }
17530
17665
  },
17531
17666
  virtualList: {
17532
17667
  margin: 0,
@@ -19657,9 +19792,14 @@ var ImageStyle = objectSpread2_default()(objectSpread2_default()({
19657
19792
  },
19658
19793
  fill: {
19659
19794
  '& $inner': {
19660
- backgroundSize: 'cover',
19661
- backgroundPosition: '50% 50%',
19662
- backgroundRepeat: 'no-repeat'
19795
+ '& > img': {
19796
+ position: 'absolute',
19797
+ top: '50%',
19798
+ left: '50%',
19799
+ transform: 'translate(-50%, -50%)',
19800
+ maxWidth: 'none',
19801
+ maxHeight: 'none'
19802
+ }
19663
19803
  }
19664
19804
  },
19665
19805
  previewMask: {
@@ -21655,7 +21795,8 @@ var modalStyle = objectSpread2_default()(objectSpread2_default()({
21655
21795
  '& $panel': {
21656
21796
  top: 0,
21657
21797
  height: '100vh',
21658
- width: '100vw'
21798
+ width: '100vw',
21799
+ overflow: 'auto'
21659
21800
  }
21660
21801
  },
21661
21802
  wrapperZoom: {
@@ -23046,6 +23187,7 @@ var selectStyle = objectSpread2_default()(objectSpread2_default()({
23046
23187
  result: {
23047
23188
  display: 'flex',
23048
23189
  flex: '1',
23190
+ height: '100%',
23049
23191
  minWidth: 0,
23050
23192
  alignItems: 'center',
23051
23193
  lineHeight: src.lineHeightDynamic
@@ -23325,10 +23467,14 @@ var selectStyle = objectSpread2_default()(objectSpread2_default()({
23325
23467
  visibility: 'hidden'
23326
23468
  },
23327
23469
  moreWrapper: {
23470
+ width: 'max-content',
23328
23471
  maxWidth: 400,
23329
23472
  maxHeight: 160,
23330
23473
  overflow: 'auto',
23331
23474
  padding: "".concat(src.selectMorePaddingY, " ").concat(src.selectMorePaddingX),
23475
+ '& $tag': {
23476
+ maxWidth: 'none'
23477
+ },
23332
23478
  '&:hover': {
23333
23479
  '& $clearIcon': {
23334
23480
  display: 'inline-block'
@@ -23483,6 +23629,113 @@ var selectStyle = objectSpread2_default()(objectSpread2_default()({
23483
23629
  var useSelectStyle = styled(src_select_select, 'select');
23484
23630
 
23485
23631
  /* harmony default export */ var shineout_style_src_select = ((/* unused pure expression or super */ null && (useSelectStyle)));
23632
+ ;// CONCATENATED MODULE: ../shineout-style/src/skeleton/skeleton.ts
23633
+
23634
+ // import token from '@sheinx/theme';
23635
+
23636
+
23637
+ var skeleton_animation = {
23638
+ '@keyframes skeleton-animation': {
23639
+ '0%': {
23640
+ backgroundPosition: '100% 50%'
23641
+ },
23642
+ '100%': {
23643
+ backgroundPosition: '0 50%'
23644
+ }
23645
+ }
23646
+ };
23647
+ var skeletonStyle = objectSpread2_default()(objectSpread2_default()({}, skeleton_animation), {}, {
23648
+ rootClass: {},
23649
+ wrapper: {
23650
+ display: 'flex'
23651
+ },
23652
+ animation: {
23653
+ '& $textItem, & $image, & $buttonItem': {
23654
+ background: "linear-gradient(90deg, ".concat(src.skeletonAnimationFromColor, " 25%, ").concat(src.skeletonAnimationToColor, " 37%, ").concat(src.skeletonAnimationFromColor, " 63%)"),
23655
+ backgroundSize: '400% 100%',
23656
+ animation: '$skeleton-animation 1.4s ease infinite'
23657
+ }
23658
+ },
23659
+ content: {
23660
+ flex: 1,
23661
+ minWidth: 0
23662
+ },
23663
+ text: {
23664
+ margin: 0,
23665
+ padding: 0,
23666
+ listStyle: 'none'
23667
+ },
23668
+ textItem: {
23669
+ height: src.skeletonHeight,
23670
+ marginBottom: src.skeletonMargin,
23671
+ backgroundColor: src.skeletonBackgroundColor,
23672
+ borderRadius: src.skeletonBackgroundRadius,
23673
+ '&:last-child': {
23674
+ marginBottom: 0
23675
+ }
23676
+ },
23677
+ image: {
23678
+ width: 48,
23679
+ height: 48,
23680
+ backgroundColor: src.skeletonBackgroundColor
23681
+ },
23682
+ imageLeft: {
23683
+ marginRight: src.skeletonMargin
23684
+ },
23685
+ imageRight: {
23686
+ marginLeft: src.skeletonMargin
23687
+ },
23688
+ imageCircle: {
23689
+ borderRadius: '50%'
23690
+ },
23691
+ imageSquare: {
23692
+ borderRadius: src.skeletonBackgroundRadius
23693
+ },
23694
+ imageSmall: {
23695
+ width: 32,
23696
+ height: 32
23697
+ },
23698
+ imageLarge: {
23699
+ width: 64,
23700
+ height: 64
23701
+ },
23702
+ button: {
23703
+ display: 'flex',
23704
+ '$text + &': {
23705
+ marginTop: src.skeletonMargin
23706
+ }
23707
+ },
23708
+ buttonItem: {
23709
+ width: 80,
23710
+ height: 32,
23711
+ backgroundColor: src.skeletonBackgroundColor,
23712
+ borderRadius: src.skeletonBackgroundRadius,
23713
+ '& + &': {
23714
+ marginLeft: src.skeletonMargin
23715
+ }
23716
+ },
23717
+ buttonLeft: {
23718
+ justifyContent: 'flex-start'
23719
+ },
23720
+ buttonRight: {
23721
+ justifyContent: 'flex-end'
23722
+ },
23723
+ buttonSmall: {
23724
+ width: 64,
23725
+ height: 24
23726
+ },
23727
+ buttonLarge: {
23728
+ width: 96,
23729
+ height: 40
23730
+ }
23731
+ });
23732
+ /* harmony default export */ var skeleton_skeleton = (skeletonStyle);
23733
+ ;// CONCATENATED MODULE: ../shineout-style/src/skeleton/index.ts
23734
+
23735
+
23736
+ var useSkeletonStyle = styled(skeleton_skeleton, 'skeleton');
23737
+
23738
+ /* harmony default export */ var shineout_style_src_skeleton = ((/* unused pure expression or super */ null && (useSkeletonStyle)));
23486
23739
  ;// CONCATENATED MODULE: ../shineout-style/src/slider/slider.ts
23487
23740
 
23488
23741
  var verticalLabelMargin = 4;
@@ -25700,8 +25953,11 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
25700
25953
  borderTop: "1px solid ".concat(src.tableCellBorderColor)
25701
25954
  }
25702
25955
  },
25703
- headMirrorScroller: {
25704
- overflow: 'scroll hidden'
25956
+ mirrorScroller: {
25957
+ overflow: 'scroll hidden',
25958
+ '[data-soui-sticky="false"] &': {
25959
+ display: 'none'
25960
+ }
25705
25961
  },
25706
25962
  headWrapper: {
25707
25963
  flex: '0 0 auto',
@@ -25734,13 +25990,39 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
25734
25990
  zIndex: fixedIndex + 1
25735
25991
  }
25736
25992
  }
25993
+ },
25994
+ '$wrapper & table > tfoot': {
25995
+ position: 'sticky',
25996
+ bottom: 0,
25997
+ zIndex: fixedFixedIndex + 1
25737
25998
  }
25738
25999
  },
25739
26000
  footWrapper: {
25740
26001
  flex: '0 0 auto',
25741
- // overflow: 'hidden',
25742
26002
  boxSizing: 'border-box',
25743
- background: src.tableTfootBackgroundColor
26003
+ background: src.tableTfootBackgroundColor,
26004
+ "[data-soui-role='scroll'] &": {
26005
+ position: 'sticky',
26006
+ bottom: 0,
26007
+ zIndex: fixedIndex + 1
26008
+ }
26009
+ },
26010
+ scrollY: {
26011
+ '&$headWrapper, &$footWrapper': objectSpread2_default()({
26012
+ overflow: 'hidden scroll'
26013
+ }, customScrollBar({
26014
+ background: 'transparent'
26015
+ }))
26016
+ },
26017
+ scrollX: {
26018
+ '&$headWrapper, &$footWrapper': {
26019
+ overflowX: 'hidden'
26020
+ }
26021
+ },
26022
+ emptyHeader: {
26023
+ position: 'sticky',
26024
+ top: 0,
26025
+ zIndex: 1
25744
26026
  },
25745
26027
  emptyWrapper: {
25746
26028
  minHeight: '170px',
@@ -25749,18 +26031,13 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
25749
26031
  position: 'sticky',
25750
26032
  left: 0,
25751
26033
  top: 0,
25752
- right: 0,
25753
26034
  justifyContent: 'center',
25754
26035
  display: 'flex',
25755
26036
  alignItems: 'center',
25756
26037
  borderBottom: "1px solid ".concat(src.tableCellBorderColor)
25757
26038
  },
25758
- scrollY: {
25759
- '&$headWrapper, &$footWrapper': objectSpread2_default()({
25760
- overflowY: 'scroll'
25761
- }, customScrollBar({
25762
- background: 'transparent'
25763
- }))
26039
+ emptyNoBorder: {
26040
+ borderBottom: 'none'
25764
26041
  },
25765
26042
  cellFixedLeft: {
25766
26043
  position: 'sticky'
@@ -26954,115 +27231,106 @@ var useTabsStyle = styled(tabs_tabs, 'tabs');
26954
27231
  ;// CONCATENATED MODULE: ../shineout-style/src/tag/tag.ts
26955
27232
 
26956
27233
 
26957
- var tag_tag = function tag(type) {
27234
+
27235
+ var brightTag = function brightTag(name, type) {
26958
27236
  return {
26959
- // bright 亮色风格
26960
- '&$bright': {
26961
- color: src["tag".concat(type, "FontColor")],
26962
- backgroundColor: src["tag".concat(type, "BackgroundColor")],
26963
- border: "1px solid transparent",
26964
- '& $closeIconWrapper': {
26965
- '&:hover': {
26966
- backgroundColor: src["tag".concat(type, "IconHoverBackgroundColor")]
26967
- }
26968
- },
26969
- '& $closeIcon': {
26970
- // fill: Token[`tag${type}IconFontColor`],
26971
- },
26972
- '&[data-soui-type="dark"]': {
26973
- '&$disabled': {
26974
- backgroundColor: src.tagDefaultFillBackgroundColor,
26975
- borderColor: src.tagDefaultFillBorderColor
26976
- }
26977
- },
27237
+ color: src["tag".concat(type, "FontColor")],
27238
+ backgroundColor: src["tag".concat(type, "BackgroundColor")],
27239
+ border: "1px solid ".concat(src["tag".concat(type, "BorderColor")]),
27240
+ '& $closeIconWrapper': {
27241
+ '&:hover': {
27242
+ backgroundColor: src["tag".concat(type, "IconHoverBackgroundColor")]
27243
+ }
27244
+ },
27245
+ '&[data-soui-type="dark"]': {
26978
27246
  '&$disabled': {
26979
- color: src["tag".concat(type, "DisabledFontColor")],
26980
- backgroundColor: src["tag".concat(type, "DisabledBackgroundColor")],
26981
- border: "1px solid ".concat(src["tag".concat(type, "DisabledBorderColor")]),
26982
- '& $closeIconWrapper': {
26983
- fill: src["tag".concat(type, "IconDisabledFontColor")],
26984
- '&:hover': {
26985
- backgroundColor: 'transparent'
26986
- }
26987
- }
27247
+ backgroundColor: src.tagDefaultFillBackgroundColor,
27248
+ borderColor: src.tagDefaultFillBorderColor
26988
27249
  }
26989
27250
  },
26990
- '&$fill': {
26991
- color: src["tag".concat(type, "FillFontColor")],
26992
- backgroundColor: src["tag".concat(type, "FillBackgroundColor")],
26993
- border: "1px solid ".concat(src["tag".concat(type, "FillBorderColor")]),
27251
+ '&$disabled': {
27252
+ color: src["tag".concat(type, "DisabledFontColor")],
27253
+ backgroundColor: src["tag".concat(type, "DisabledBackgroundColor")],
27254
+ border: "1px solid ".concat(src["tag".concat(type, "DisabledBorderColor")]),
26994
27255
  '& $closeIconWrapper': {
26995
- fill: src["tag".concat(type, "FillFontColor")],
27256
+ fill: src["tag".concat(type, "IconDisabledFontColor")],
26996
27257
  '&:hover': {
26997
- fill: src["tag".concat(type, "FontColor")],
26998
- backgroundColor: src["tag".concat(type, "IconHoverBackgroundColor")]
27258
+ backgroundColor: 'transparent'
26999
27259
  }
27000
- },
27001
- '& $closeIcon': {
27002
- fill: src["tag".concat(type, "FillFontColor")]
27003
- },
27004
- '&$disabled': {
27260
+ }
27261
+ }
27262
+ };
27263
+ };
27264
+ var fillTag = function fillTag(name, type) {
27265
+ return defineProperty_default()({}, "&$".concat(name), {
27266
+ color: src["tag".concat(type, "FillFontColor")],
27267
+ backgroundColor: src["tag".concat(type, "FillBackgroundColor")],
27268
+ border: "1px solid ".concat(src["tag".concat(type, "FillBorderColor")]),
27269
+ '& $closeIconWrapper': {
27270
+ color: src["tag".concat(type, "FillFontColor")],
27271
+ '&:hover': {
27272
+ backgroundColor: src["tag".concat(type, "FillIconHoverBackgroundColor")]
27273
+ }
27274
+ },
27275
+ '&$disabled': {
27276
+ color: src["tag".concat(type, "FillDisabledFontColor")],
27277
+ backgroundColor: src["tag".concat(type, "FillDisabledBackgroundColor")],
27278
+ border: "1px solid ".concat(src["tag".concat(type, "FillDisabledBorderColor")]),
27279
+ '& $closeIconWrapper': {
27005
27280
  color: src["tag".concat(type, "FillDisabledFontColor")],
27006
- backgroundColor: src["tag".concat(type, "FillDisabledBackgroundColor")],
27007
- border: "1px solid ".concat(src["tag".concat(type, "FillDisabledBorderColor")]),
27008
- '& $closeIconWrapper': {
27009
- fill: src["tag".concat(type, "FillDisabledFontColor")],
27010
- '&:hover': {
27011
- fill: src["tag".concat(type, "FillFontColor")],
27012
- backgroundColor: 'transparent'
27013
- }
27281
+ '&:hover': {
27282
+ fill: src["tag".concat(type, "FillFontColor")],
27283
+ backgroundColor: 'transparent'
27014
27284
  }
27015
27285
  }
27286
+ }
27287
+ });
27288
+ };
27289
+ var outlineTag = function outlineTag(name, type) {
27290
+ return defineProperty_default()({}, "&$".concat(name), {
27291
+ background: src["tag".concat(type, "OutlineBackgroundColor")],
27292
+ color: src["tag".concat(type, "OutlineFontColor")],
27293
+ border: "1px solid ".concat(src["tag".concat(type, "OutlineBorderColor")]),
27294
+ '& $closeIconWrapper': {
27295
+ '&:hover': {
27296
+ backgroundColor: src["tag".concat(type, "BackgroundColor")]
27297
+ }
27016
27298
  },
27017
- // outline 边框风格
27018
- '&$outline': {
27019
- background: src["tag".concat(type, "OutlineBackgroundColor")],
27020
- color: src["tag".concat(type, "OutlineFontColor")],
27021
- border: "1px solid ".concat(src["tag".concat(type, "OutlineBorderColor")]),
27299
+ '&$disabled': {
27300
+ color: src["tag".concat(type, "OutlineDisabledFontColor")],
27301
+ backgroundColor: src["tag".concat(type, "OutlineDisabledBackgroundColor")],
27302
+ border: "1px solid ".concat(src["tag".concat(type, "OutlineDisabledBorderColor")]),
27022
27303
  '& $closeIconWrapper': {
27023
- // hover
27304
+ fill: src["tag".concat(type, "DisabledFontColor")],
27024
27305
  '&:hover': {
27025
- backgroundColor: src["tag".concat(type, "BackgroundColor")]
27026
- }
27027
- },
27028
- '&$disabled': {
27029
- color: src["tag".concat(type, "OutlineDisabledFontColor")],
27030
- backgroundColor: src["tag".concat(type, "OutlineDisabledBackgroundColor")],
27031
- border: "1px solid ".concat(src["tag".concat(type, "OutlineDisabledBorderColor")]),
27032
- '& $closeIconWrapper': {
27033
- fill: src["tag".concat(type, "DisabledFontColor")],
27034
- '&:hover': {
27035
- backgroundColor: 'transparent'
27036
- }
27306
+ backgroundColor: 'transparent'
27037
27307
  }
27038
27308
  }
27309
+ }
27310
+ });
27311
+ };
27312
+ var brightOutlineTag = function brightOutlineTag(name, type) {
27313
+ return defineProperty_default()({}, "&$".concat(name), {
27314
+ color: src["tag".concat(type, "FontColor")],
27315
+ backgroundColor: src["tag".concat(type, "BackgroundColor")],
27316
+ border: "1px solid ".concat(src["tag".concat(type, "OutlineBorderColor")]),
27317
+ '& $closeIconWrapper': {
27318
+ '&:hover': {
27319
+ backgroundColor: src["tag".concat(type, "IconHoverBackgroundColor")]
27320
+ }
27039
27321
  },
27040
- // brightOutline 亮色边框风格
27041
- '&$brightOutline': {
27042
- color: src["tag".concat(type, "FontColor")],
27043
- backgroundColor: src["tag".concat(type, "BackgroundColor")],
27044
- border: "1px solid ".concat(src["tag".concat(type, "OutlineBorderColor")]),
27322
+ '&$disabled': {
27323
+ color: src["tag".concat(type, "DisabledFontColor")],
27324
+ backgroundColor: src["tag".concat(type, "DisabledBackgroundColor")],
27325
+ border: "1px solid ".concat(src["tag".concat(type, "OutlineDisabledBorderColor")]),
27045
27326
  '& $closeIconWrapper': {
27327
+ fill: src["tag".concat(type, "IconDisabledFontColor")],
27046
27328
  '&:hover': {
27047
- backgroundColor: src["tag".concat(type, "IconHoverBackgroundColor")]
27048
- }
27049
- },
27050
- '&$disabled': {
27051
- color: src["tag".concat(type, "DisabledFontColor")],
27052
- backgroundColor: src["tag".concat(type, "DisabledBackgroundColor")],
27053
- border: "1px solid ".concat(src["tag".concat(type, "OutlineDisabledBorderColor")]),
27054
- '& $closeIconWrapper': {
27055
- fill: src["tag".concat(type, "IconDisabledFontColor")],
27056
- '&:hover': {
27057
- backgroundColor: 'transparent'
27058
- }
27329
+ backgroundColor: 'transparent'
27059
27330
  }
27060
27331
  }
27061
- },
27062
- '& $closeIcon': {
27063
- fill: src["tag".concat(type, "FontColor")]
27064
27332
  }
27065
- };
27333
+ });
27066
27334
  };
27067
27335
  var TagStyle = {
27068
27336
  rootClass: {},
@@ -27174,32 +27442,32 @@ var TagStyle = {
27174
27442
  height: 12
27175
27443
  }
27176
27444
  },
27177
- info: objectSpread2_default()({}, tag_tag('Info')),
27178
- default: objectSpread2_default()({}, tag_tag('Default')),
27179
- success: objectSpread2_default()({}, tag_tag('Success')),
27180
- warning: objectSpread2_default()({}, tag_tag('Warning')),
27181
- danger: objectSpread2_default()({}, tag_tag('Danger')),
27182
- brown: objectSpread2_default()({}, tag_tag('Brown')),
27183
- magenta: objectSpread2_default()({}, tag_tag('Magenta')),
27184
- purple: objectSpread2_default()({}, tag_tag('Purple')),
27185
- indigo: objectSpread2_default()({}, tag_tag('Indigo')),
27186
- cyan: objectSpread2_default()({}, tag_tag('Cyan')),
27187
- neon: objectSpread2_default()({}, tag_tag('Neon')),
27188
- lemon: objectSpread2_default()({}, tag_tag('Lemon')),
27189
- tangerine: objectSpread2_default()({}, tag_tag('Tangerine')),
27190
- fill: {},
27445
+ info: objectSpread2_default()({}, brightTag('info', 'Info')),
27446
+ default: objectSpread2_default()({}, brightTag('default', 'Default')),
27447
+ success: objectSpread2_default()({}, brightTag('success', 'Success')),
27448
+ warning: objectSpread2_default()({}, brightTag('warning', 'Warning')),
27449
+ danger: objectSpread2_default()({}, brightTag('danger', 'Danger')),
27450
+ brown: objectSpread2_default()({}, brightTag('brown', 'Brown')),
27451
+ magenta: objectSpread2_default()({}, brightTag('magenta', 'Magenta')),
27452
+ purple: objectSpread2_default()({}, brightTag('purple', 'Purple')),
27453
+ indigo: objectSpread2_default()({}, brightTag('indigo', 'Indigo')),
27454
+ cyan: objectSpread2_default()({}, brightTag('cyan', 'Cyan')),
27455
+ neon: objectSpread2_default()({}, brightTag('neon', 'Neon')),
27456
+ lemon: objectSpread2_default()({}, brightTag('lemon', 'Lemon')),
27457
+ tangerine: objectSpread2_default()({}, brightTag('tangerine', 'Tangerine')),
27458
+ fill: objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, fillTag('default', 'Default')), fillTag('success', 'Success')), fillTag('warning', 'Warning')), fillTag('danger', 'Danger')), fillTag('info', 'Info')), fillTag('brown', 'Brown')), fillTag('magenta', 'Magenta')), fillTag('purple', 'Purple')), fillTag('indigo', 'Indigo')), fillTag('cyan', 'Cyan')), fillTag('neon', 'Neon')), fillTag('lemon', 'Lemon')), fillTag('tangerine', 'Tangerine')),
27191
27459
  bright: {},
27192
- outline: {},
27193
- brightOutline: {},
27460
+ outline: objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, outlineTag('default', 'Default')), outlineTag('success', 'Success')), outlineTag('warning', 'Warning')), outlineTag('danger', 'Danger')), outlineTag('info', 'Info')), outlineTag('brown', 'Brown')), outlineTag('magenta', 'Magenta')), outlineTag('purple', 'Purple')), outlineTag('indigo', 'Indigo')), outlineTag('cyan', 'Cyan')), outlineTag('neon', 'Neon')), outlineTag('lemon', 'Lemon')), outlineTag('tangerine', 'Tangerine')),
27461
+ brightOutline: objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({}, brightOutlineTag('default', 'Default')), brightOutlineTag('success', 'Success')), brightOutlineTag('warning', 'Warning')), brightOutlineTag('danger', 'Danger')), brightOutlineTag('info', 'Info')), brightOutlineTag('brown', 'Brown')), brightOutlineTag('magenta', 'Magenta')), brightOutlineTag('purple', 'Purple')), brightOutlineTag('indigo', 'Indigo')), brightOutlineTag('cyan', 'Cyan')), brightOutlineTag('neon', 'Neon')), brightOutlineTag('lemon', 'Lemon')), brightOutlineTag('tangerine', 'Tangerine')),
27194
27462
  rounded: {
27195
27463
  borderRadius: src.buttonRoundBorderRadius
27196
27464
  }
27197
27465
  };
27198
- /* harmony default export */ var src_tag_tag = (TagStyle);
27466
+ /* harmony default export */ var tag_tag = (TagStyle);
27199
27467
  ;// CONCATENATED MODULE: ../shineout-style/src/tag/index.ts
27200
27468
 
27201
27469
 
27202
- var useTagStyle = styled(src_tag_tag, 'tag');
27470
+ var useTagStyle = styled(tag_tag, 'tag');
27203
27471
 
27204
27472
  /* harmony default export */ var shineout_style_src_tag = ((/* unused pure expression or super */ null && (useTagStyle)));
27205
27473
  ;// CONCATENATED MODULE: ../shineout-style/src/textarea/textarea.ts
@@ -27863,10 +28131,26 @@ var useTransferStyle = styled(transfer_transfer, 'transfer');
27863
28131
  /* harmony default export */ var shineout_style_src_transfer = ((/* unused pure expression or super */ null && (useTransferStyle)));
27864
28132
  ;// CONCATENATED MODULE: ../shineout-style/src/tree/tree.ts
27865
28133
 
28134
+ var childNodeMarginLeft = 12;
27866
28135
  var treeStyle = {
27867
28136
  rootClass: {},
27868
28137
  tree: {},
27869
28138
  virtual: {},
28139
+ sizeSmall: {
28140
+ '&$line $node': {
28141
+ '&:last-child': {
28142
+ '&::before': {
28143
+ top: 0,
28144
+ height: 14
28145
+ }
28146
+ },
28147
+ '&::before': {
28148
+ top: -2,
28149
+ height: 'calc(100% + 2px)'
28150
+ }
28151
+ }
28152
+ },
28153
+ sizeLarge: {},
27870
28154
  notTree: {
27871
28155
  '&$root > $node$leaf': {
27872
28156
  paddingLeft: 0
@@ -27876,6 +28160,19 @@ var treeStyle = {
27876
28160
  }
27877
28161
  },
27878
28162
  line: {
28163
+ '&$virtual $node': {
28164
+ '&::before, &::after': {
28165
+ display: 'none'
28166
+ }
28167
+ },
28168
+ '&$virtual $leaf $contentWrapper': {
28169
+ marginLeft: 12
28170
+ },
28171
+ '&$virtual $leaf $contentWrapper, &$virtual $childnode$contentWrapper': {
28172
+ '&::after': {
28173
+ display: 'none'
28174
+ }
28175
+ },
27879
28176
  '& $node': {
27880
28177
  '&[dir=ltr]::before': {
27881
28178
  left: 0
@@ -27890,26 +28187,6 @@ var treeStyle = {
27890
28187
  height: 'calc(100% + 6px)',
27891
28188
  width: 1,
27892
28189
  background: src.treeLineBackgroundColor
27893
- },
27894
- '&[dir=ltr]::after': {
27895
- left: 0
27896
- },
27897
- '&[dir=rtl]::after': {
27898
- right: 0
27899
- },
27900
- '&::after': {
27901
- content: '""',
27902
- position: 'absolute',
27903
- top: 18,
27904
- height: 1,
27905
- width: 16,
27906
- background: src.treeLineBackgroundColor
27907
- }
27908
- },
27909
- '& $node:first-child': {},
27910
- '& $node:first-child:last-child': {
27911
- '&::before,&::after': {
27912
- display: 'none'
27913
28190
  }
27914
28191
  },
27915
28192
  '& $node:last-child': {
@@ -27920,19 +28197,123 @@ var treeStyle = {
27920
28197
  },
27921
28198
  '& $contentWrapper': {},
27922
28199
  '& $iconWrapper': {
28200
+ width: 24,
27923
28201
  '&[dir=ltr]': {
27924
- left: 16
28202
+ left: -24
27925
28203
  },
27926
28204
  '&[dir=rtl]': {
27927
- right: 16
27928
- },
27929
- width: 24,
27930
- '& $icon': {
27931
- // width: 16,
28205
+ right: -24
27932
28206
  }
27933
28207
  },
27934
28208
  '& $childnode': {
27935
- marginLeft: 12
28209
+ marginLeft: childNodeMarginLeft,
28210
+ '&$contentWrapper': {
28211
+ position: 'relative',
28212
+ '&::after': {
28213
+ content: '""',
28214
+ position: 'absolute',
28215
+ top: 18,
28216
+ left: 0,
28217
+ marginLeft: -24,
28218
+ transform: 'translate(-100%, 0)',
28219
+ height: 1,
28220
+ width: 16,
28221
+ background: src.treeLineBackgroundColor
28222
+ }
28223
+ }
28224
+ },
28225
+ '& $leaf': {
28226
+ '& $contentWrapper': {
28227
+ position: 'relative',
28228
+ '&::after': {
28229
+ content: '""',
28230
+ position: 'absolute',
28231
+ top: 18,
28232
+ left: 0,
28233
+ marginLeft: -24,
28234
+ transform: 'translate(-100%, 0)',
28235
+ height: 1,
28236
+ width: 16,
28237
+ background: src.treeLineBackgroundColor
28238
+ }
28239
+ }
28240
+ },
28241
+ '& $childnode[dir=rtl]': {
28242
+ '&$contentWrapper': {
28243
+ '&::after': {
28244
+ top: '50%',
28245
+ right: 0,
28246
+ transform: 'translate(100%, -50%)'
28247
+ }
28248
+ }
28249
+ },
28250
+ '&$sizeSmall': {
28251
+ '& $contentWrapper::after': {
28252
+ display: 'none'
28253
+ }
28254
+ },
28255
+ '&$sizeLarge': {
28256
+ '& $node:last-child::before': {
28257
+ height: 21
28258
+ },
28259
+ '& $iconWrapper': {
28260
+ '&[dir=ltr]': {
28261
+ left: -32
28262
+ },
28263
+ '&[dir=rtl]': {
28264
+ right: -32
28265
+ }
28266
+ },
28267
+ '&:not($virtual) $childnode, &:not($virtual) $leaf': {
28268
+ marginLeft: 20
28269
+ },
28270
+ '': {
28271
+ marginLeft: 20
28272
+ },
28273
+ '& $node': {
28274
+ paddingLeft: 32,
28275
+ '&[dir=ltr]::before': {
28276
+ left: 4
28277
+ },
28278
+ '&[dir=rtl]::before': {
28279
+ right: 4
28280
+ },
28281
+ '&::before': {
28282
+ top: -4,
28283
+ height: 'calc(100% + 4px)'
28284
+ }
28285
+ },
28286
+ '& $node$leaf': {
28287
+ '&[dir=ltr]::before': {
28288
+ left: -16
28289
+ },
28290
+ '&[dir=rtl]::before': {
28291
+ right: -16
28292
+ },
28293
+ '&::after': {
28294
+ left: -14
28295
+ }
28296
+ },
28297
+ '& > $root > $node': {
28298
+ paddingLeft: 12
28299
+ },
28300
+ '& $leaf $contentWrapper::after': {
28301
+ left: -24,
28302
+ top: 21,
28303
+ transform: 'translate(0, -50%)'
28304
+ },
28305
+ '& $contentWrapper$childnode::after': {
28306
+ top: 21,
28307
+ marginLeft: -32
28308
+ }
28309
+ },
28310
+ '& > $root > $node': {
28311
+ paddingLeft: 12,
28312
+ '& > $contentWrapper': {
28313
+ '&::after': {
28314
+ display: 'none'
28315
+ }
28316
+ }
27936
28317
  }
27937
28318
  },
27938
28319
  noline: {
@@ -27966,30 +28347,29 @@ var treeStyle = {
27966
28347
  '& > $node': {
27967
28348
  paddingLeft: 24
27968
28349
  }
28350
+ },
28351
+ '&$sizeLarge': {
28352
+ '& > $root > $node, & $node$leaf': {
28353
+ paddingLeft: 32
28354
+ }
28355
+ }
28356
+ },
28357
+ lineIndent: {
28358
+ position: 'absolute',
28359
+ top: 0,
28360
+ width: 1,
28361
+ height: '100%',
28362
+ background: src.treeLineBackgroundColor,
28363
+ '$sizeLarge &': {
28364
+ transform: 'translateX(-4px)'
27969
28365
  }
27970
28366
  },
27971
28367
  root: {
27972
- // '& > :first-child$node': {
27973
- // '&::before': {
27974
- // top: 18,
27975
- // },
27976
- // },
27977
- // '& > :last-child$node': {
27978
- // '&::before': {},
27979
- // },
27980
28368
  '& > $node': {
27981
28369
  paddingLeft: 12,
27982
28370
  '&$leaf': {
27983
28371
  paddingLeft: 24
27984
28372
  },
27985
- '& > $contentWrapper > $iconWrapper': {
27986
- '&[dir=ltr]': {
27987
- left: 0
27988
- },
27989
- '&[dir=rtl]': {
27990
- right: 0
27991
- }
27992
- },
27993
28373
  '&::before': {
27994
28374
  display: 'none'
27995
28375
  },
@@ -28003,7 +28383,13 @@ var treeStyle = {
28003
28383
  contentWrapper: {
28004
28384
  display: 'flex',
28005
28385
  alignItems: 'flex-start',
28006
- padding: '5px 0'
28386
+ padding: '5px 0',
28387
+ '$sizeSmall &': {
28388
+ padding: '1px 0'
28389
+ },
28390
+ '$sizeLarge & $text': {
28391
+ lineHeight: '28px'
28392
+ }
28007
28393
  },
28008
28394
  inlineContent: {
28009
28395
  display: 'inline-flex'
@@ -28024,15 +28410,6 @@ var treeStyle = {
28024
28410
  display: 'flex',
28025
28411
  alignItems: 'center',
28026
28412
  marginLeft: 4,
28027
- // 'label&': {
28028
- // cursor: 'pointer',
28029
- // userSelect: 'none',
28030
- // },
28031
-
28032
- // '$iconWrapper + &': {
28033
- // marginLeft: 4,
28034
- // },
28035
-
28036
28413
  '$contentDisabled &': {
28037
28414
  '& $text': {
28038
28415
  color: src.treeContentDisabledFontColor
@@ -28049,10 +28426,15 @@ var treeStyle = {
28049
28426
  checkbox: {
28050
28427
  '&[class*="checkbox-wrapper"]': {
28051
28428
  height: 26,
28429
+ alignSelf: 'flex-start',
28052
28430
  marginRight: src.treeCheckboxMarginX
28431
+ },
28432
+ '$sizeLarge &': {
28433
+ marginTop: 4
28053
28434
  }
28054
28435
  },
28055
28436
  text: {
28437
+ cursor: 'pointer',
28056
28438
  flex: 1,
28057
28439
  minWidth: 0,
28058
28440
  fontSize: src.treeFontSize,
@@ -28067,22 +28449,30 @@ var treeStyle = {
28067
28449
  background: src.treeContentHoverBackgroundColor
28068
28450
  }
28069
28451
  },
28070
- textClickable: {
28071
- cursor: 'pointer'
28072
- },
28073
- // textDisabled: {
28074
- // color: Token.treeItemDisabledFontColor,
28075
- // },
28076
28452
  list: {},
28077
28453
  node: {
28078
28454
  position: 'relative',
28079
28455
  paddingLeft: 28,
28080
- '&$leaf': {
28081
- paddingLeft: 40,
28082
- '&::after': {
28083
- width: 12
28456
+ '$sizeSmall$line &': {
28457
+ paddingLeft: 12,
28458
+ '&$leaf': {
28459
+ paddingLeft: 24
28460
+ },
28461
+ "&::after": {
28462
+ position: 'absolute',
28463
+ content: '""',
28464
+ top: 28,
28465
+ width: 1,
28466
+ height: 'calc(100% - 28px)',
28467
+ background: src.treeLineBackgroundColor
28084
28468
  }
28085
28469
  },
28470
+ '$sizeLarge &': {
28471
+ paddingLeft: 32
28472
+ },
28473
+ '&$leaf': {
28474
+ paddingLeft: 40
28475
+ },
28086
28476
  '&[draggable="true"]': {
28087
28477
  cursor: 'pointer'
28088
28478
  }
@@ -28098,7 +28488,8 @@ var treeStyle = {
28098
28488
  },
28099
28489
  position: 'absolute',
28100
28490
  width: 24,
28101
- height: 26,
28491
+ height: 24,
28492
+ margin: '1px 0',
28102
28493
  display: 'inline-flex',
28103
28494
  alignItems: 'center',
28104
28495
  justifyContent: 'center',
@@ -28106,11 +28497,16 @@ var treeStyle = {
28106
28497
  '& $icon': {
28107
28498
  transform: 'rotate(0deg)'
28108
28499
  }
28500
+ },
28501
+ '$sizeLarge &': {
28502
+ width: 32,
28503
+ height: 32,
28504
+ top: 5
28109
28505
  }
28110
28506
  },
28111
28507
  icon: {
28112
- width: 24,
28113
- height: 24,
28508
+ width: '100%',
28509
+ height: '100%',
28114
28510
  display: 'inline-flex',
28115
28511
  alignItems: 'center',
28116
28512
  justifyContent: 'center',
@@ -28126,7 +28522,10 @@ var treeStyle = {
28126
28522
  background: src.treeItemActiveBackgroundColor
28127
28523
  },
28128
28524
  '& svg': {
28129
- width: 14
28525
+ width: 14,
28526
+ '$sizeLarge &': {
28527
+ width: 16
28528
+ }
28130
28529
  }
28131
28530
  },
28132
28531
  children: {},
@@ -28298,13 +28697,14 @@ var treeSelectStyle = objectSpread2_default()(objectSpread2_default()({
28298
28697
  minWidth: 0,
28299
28698
  position: 'relative',
28300
28699
  outline: 'none',
28301
- overflow: 'hidden',
28302
- '&:hover': {}
28700
+ maxHeight: 78,
28701
+ overflow: 'auto'
28303
28702
  },
28304
28703
  result: {
28305
28704
  display: 'flex',
28306
28705
  flex: '1',
28307
28706
  minWidth: 0,
28707
+ height: '100%',
28308
28708
  alignItems: 'center',
28309
28709
  lineHeight: src.lineHeightDynamic
28310
28710
  },
@@ -28431,7 +28831,9 @@ var treeSelectStyle = objectSpread2_default()(objectSpread2_default()({
28431
28831
  iconWrapper: {
28432
28832
  display: 'flex',
28433
28833
  alignItems: 'center',
28434
- justifyContent: 'center'
28834
+ justifyContent: 'center',
28835
+ position: 'sticky',
28836
+ top: 0
28435
28837
  },
28436
28838
  clearable: {},
28437
28839
  clearIcon: {
@@ -28559,10 +28961,14 @@ var treeSelectStyle = objectSpread2_default()(objectSpread2_default()({
28559
28961
  visibility: 'hidden'
28560
28962
  },
28561
28963
  moreWrapper: {
28562
- width: 248,
28563
- height: 72,
28964
+ width: 'max-content',
28965
+ maxWidth: 400,
28966
+ maxHeight: 160,
28564
28967
  overflow: 'auto',
28565
- padding: "".concat(src.treeSelectMorePaddingY, " ").concat(src.treeSelectMorePaddingX)
28968
+ padding: "".concat(src.treeSelectMorePaddingY, " ").concat(src.treeSelectMorePaddingX),
28969
+ '& $tag': {
28970
+ maxWidth: 'none'
28971
+ }
28566
28972
  },
28567
28973
  virtualList: {
28568
28974
  margin: 0,
@@ -29145,6 +29551,7 @@ var useUploadStyle = styled(upload_upload, 'upload');
29145
29551
 
29146
29552
 
29147
29553
 
29554
+
29148
29555
 
29149
29556
 
29150
29557
  /* harmony default export */ var shineout_style_src = ({});
@@ -29677,6 +30084,8 @@ var getPosition = function getPosition(target) {
29677
30084
 
29678
30085
 
29679
30086
  var defaultContext = {
30087
+ addParent: function addParent(_ref) {},
30088
+ removeParent: function removeParent(_ref) {},
29680
30089
  bindChild: function bindChild(_ref) {},
29681
30090
  removeChild: function removeChild(_ref) {}
29682
30091
  };
@@ -29707,21 +30116,32 @@ var usePopup = function usePopup(props) {
29707
30116
  setOpenState = _useState2[1];
29708
30117
  var _useContext = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(popup_context),
29709
30118
  bindChild = _useContext.bindChild,
29710
- removeChild = _useContext.removeChild;
30119
+ removeChild = _useContext.removeChild,
30120
+ addParent = _useContext.addParent,
30121
+ removeParent = _useContext.removeParent;
29711
30122
  var targetRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
29712
30123
  var popupRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
29713
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
29714
- bindChild(popupRef);
29715
- return function () {
29716
- removeChild(popupRef);
29717
- };
29718
- }, []);
29719
30124
  var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
29720
30125
  triggerTimer: null,
29721
30126
  // 记录所有的子popup 点击子 popup 不关闭弹窗
29722
30127
  chain: [targetRef, popupRef]
29723
30128
  }),
29724
30129
  context = _useRef.current;
30130
+ var handleAddParent = function handleAddParent(elRef) {
30131
+ context.chain.push(elRef);
30132
+
30133
+ // 继续向上添加当前的 popupRef 到父级
30134
+ addParent(elRef);
30135
+ };
30136
+ var handleRemoveParent = function handleRemoveParent(elRef) {
30137
+ var index = context.chain.findIndex(function (item) {
30138
+ return item === elRef;
30139
+ });
30140
+ if (index > -1) {
30141
+ context.chain.splice(index, 1);
30142
+ removeParent(elRef);
30143
+ }
30144
+ };
29725
30145
  var open = openState;
29726
30146
  var changeOpen = function changeOpen(openIn, delay) {
29727
30147
  if (context.triggerTimer) clearTimeout(context.triggerTimer);
@@ -29751,11 +30171,6 @@ var usePopup = function usePopup(props) {
29751
30171
  updatePosition();
29752
30172
  }
29753
30173
  setOpenState(!!props.open);
29754
-
29755
- // 外部传了open时,需要正常的触发onCollapse;触发了onCollapse才能让组件内部的edit状态正确,否则可能会出现弹出层打开了但是用户却无法选择的情况
29756
- if (props.open !== undefined) {
29757
- changeOpen(!!props.open);
29758
- }
29759
30174
  }, [props.open]);
29760
30175
 
29761
30176
  // const getPopUpHeight = () => {
@@ -29860,8 +30275,13 @@ var usePopup = function usePopup(props) {
29860
30275
  });
29861
30276
  var providerValue = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
29862
30277
  return {
30278
+ addParent: handleAddParent,
30279
+ removeParent: handleRemoveParent,
29863
30280
  bindChild: function bindChild(elRef) {
29864
- context.chain.push(elRef);
30281
+ if (elRef.current) {
30282
+ addParent(elRef);
30283
+ context.chain.push(elRef);
30284
+ }
29865
30285
  },
29866
30286
  removeChild: function removeChild(elRef) {
29867
30287
  var index = context.chain.findIndex(function (item) {
@@ -29869,10 +30289,19 @@ var usePopup = function usePopup(props) {
29869
30289
  });
29870
30290
  if (index > -1) {
29871
30291
  context.chain.splice(index, 1);
30292
+ removeParent(elRef);
29872
30293
  }
29873
30294
  }
29874
30295
  };
29875
30296
  }, []);
30297
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
30298
+ if (open) {
30299
+ bindChild(popupRef);
30300
+ }
30301
+ return function () {
30302
+ removeChild(popupRef);
30303
+ };
30304
+ }, [open]);
29876
30305
  return {
29877
30306
  open: open,
29878
30307
  position: position,
@@ -29886,19 +30315,6 @@ var usePopup = function usePopup(props) {
29886
30315
  };
29887
30316
  };
29888
30317
  /* harmony default export */ var use_popup = (usePopup);
29889
- ;// CONCATENATED MODULE: ../hooks/src/utils/attribute.ts
29890
- var getDataAttribute = function getDataAttribute(attrs) {
29891
- return Object.keys(attrs).reduce(function (acc, key) {
29892
- var ns = "data-soui-".concat(key);
29893
- if (attrs[key] !== undefined) {
29894
- acc[ns] = attrs[key];
29895
- }
29896
- return acc;
29897
- }, {});
29898
- };
29899
- var getDataAttributeName = function getDataAttributeName(name) {
29900
- return "data-soui-".concat(name);
29901
- };
29902
30318
  ;// CONCATENATED MODULE: ../hooks/src/utils/func.ts
29903
30319
  // 节流函数
29904
30320
  var throttle = function throttle(func, wait) {
@@ -30117,6 +30533,19 @@ var getFieldId = function getFieldId(name, formName) {
30117
30533
  if (!name) return undefined;
30118
30534
  return "".concat(formName ? "".concat(formName, "_") : '').concat(name);
30119
30535
  };
30536
+ ;// CONCATENATED MODULE: ../hooks/src/utils/attribute.ts
30537
+ var getDataAttribute = function getDataAttribute(attrs) {
30538
+ return Object.keys(attrs).reduce(function (acc, key) {
30539
+ var ns = "data-soui-".concat(key);
30540
+ if (attrs[key] !== undefined) {
30541
+ acc[ns] = attrs[key];
30542
+ }
30543
+ return acc;
30544
+ }, {});
30545
+ };
30546
+ var getDataAttributeName = function getDataAttributeName(name) {
30547
+ return "data-soui-".concat(name);
30548
+ };
30120
30549
  ;// CONCATENATED MODULE: ../hooks/src/common/use-position-style/get-position-style.ts
30121
30550
 
30122
30551
  var ReverseDir = {
@@ -30283,6 +30712,61 @@ var useCheckElementBorderWidth = function useCheckElementBorderWidth(elementRef)
30283
30712
  }, [getBorderWidth]);
30284
30713
  return borderWidth;
30285
30714
  };
30715
+ ;// CONCATENATED MODULE: ../hooks/src/common/use-position-style/check-element-size.ts
30716
+
30717
+
30718
+ var useCheckElementSize = function useCheckElementSize(targetElementRef) {
30719
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
30720
+ var enable = options.enable;
30721
+ var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
30722
+ width: 0,
30723
+ height: 0
30724
+ }),
30725
+ _useState2 = slicedToArray_default()(_useState, 2),
30726
+ size = _useState2[0],
30727
+ setSize = _useState2[1];
30728
+ var lastSize = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
30729
+ width: 0,
30730
+ height: 0
30731
+ });
30732
+ var checkSize = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(function () {
30733
+ if (targetElementRef.current) {
30734
+ var rect = targetElementRef.current.getBoundingClientRect();
30735
+ var newSize = {
30736
+ width: rect.width,
30737
+ height: rect.height
30738
+ };
30739
+ if (newSize.width !== lastSize.current.width || newSize.height !== lastSize.current.height) {
30740
+ setSize(newSize);
30741
+ lastSize.current = newSize;
30742
+ }
30743
+ }
30744
+ }, [targetElementRef]);
30745
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
30746
+ var _window;
30747
+ if (!enable) return;
30748
+ var element = targetElementRef.current;
30749
+ if (!element) return;
30750
+
30751
+ // 初始检查
30752
+ checkSize();
30753
+ var resizeObserver = null;
30754
+ if ((_window = window) !== null && _window !== void 0 && _window.ResizeObserver) {
30755
+ resizeObserver = new ResizeObserver(checkSize);
30756
+ resizeObserver.observe(element);
30757
+ }
30758
+
30759
+ // 清理函数
30760
+ return function () {
30761
+ var _resizeObserver;
30762
+ (_resizeObserver = resizeObserver) === null || _resizeObserver === void 0 || _resizeObserver.disconnect();
30763
+ };
30764
+ }, [enable, targetElementRef, checkSize]);
30765
+ if (!enable || !targetElementRef) {
30766
+ return null;
30767
+ }
30768
+ return size;
30769
+ };
30286
30770
  // EXTERNAL MODULE: ../../node_modules/.pnpm/react-fast-compare@3.2.2/node_modules/react-fast-compare/index.js
30287
30771
  var react_fast_compare = __webpack_require__(5284);
30288
30772
  var react_fast_compare_default = /*#__PURE__*/__webpack_require__.n(react_fast_compare);
@@ -30409,6 +30893,7 @@ var getCurrentCSSZoom = function getCurrentCSSZoom() {
30409
30893
 
30410
30894
 
30411
30895
 
30896
+
30412
30897
  var horizontalPosition = ['left-bottom', 'left-top', 'right-bottom', 'right-top', 'left', 'right'];
30413
30898
  var verticalPosition = ['bottom-left', 'bottom-right', 'top-left', 'top-right', 'bottom', 'top'];
30414
30899
  var hideStyle = {
@@ -30463,6 +30948,9 @@ var usePositionStyle = function usePositionStyle(config) {
30463
30948
  var parentElBorderWidth = useCheckElementBorderWidth(parentElRef, {
30464
30949
  direction: 'horizontal'
30465
30950
  });
30951
+ var popupElSize = useCheckElementSize(popupElRef, {
30952
+ enable: show
30953
+ });
30466
30954
  var adjustPosition = function adjustPosition(position) {
30467
30955
  var winHeight = docSize.height;
30468
30956
  if (!verticalPosition.includes(position)) return position;
@@ -30558,13 +31046,6 @@ var usePositionStyle = function usePositionStyle(config) {
30558
31046
  style.right = containerRect.right - rect.right + containerScrollBarWidth - containerScroll.left - (offset ? offset[0] : 0);
30559
31047
  style.left = 'auto';
30560
31048
  style.transform = '';
30561
- if (adjust) {
30562
- overLeft = bodyRect.left - (rect.right - context.popUpWidth);
30563
- if (style.right < 0 && targetRect) {
30564
- style.left = bodyRect.width - targetRect.width;
30565
- style.right = 'auto';
30566
- }
30567
- }
30568
31049
  } else {
30569
31050
  // 居中对齐
30570
31051
  style.left = rect.left + rect.width / 2 - containerRect.left + containerScroll.left;
@@ -30706,7 +31187,7 @@ var usePositionStyle = function usePositionStyle(config) {
30706
31187
  // 当父元素的滚动容器滚动时,判断是否需要更新弹出层位置,包括是否隐藏弹出层(通过hideStyle隐藏,不是show状态)
30707
31188
  context.prevParentPosition = parentElNewPosition;
30708
31189
  });
30709
- (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(updateStyle, [show, position, absolute, updateKey, fixedWidth, parentElNewPosition]);
31190
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(updateStyle, [show, position, absolute, updateKey, fixedWidth, parentElNewPosition, popupElSize]);
30710
31191
  return {
30711
31192
  style: style
30712
31193
  };
@@ -31436,6 +31917,7 @@ var AbsoluteList = function AbsoluteList(props) {
31436
31917
 
31437
31918
 
31438
31919
 
31920
+
31439
31921
  var emptyEvent = function emptyEvent(e) {
31440
31922
  return e.stopPropagation();
31441
31923
  };
@@ -31495,7 +31977,17 @@ var Popover = function Popover(props) {
31495
31977
  Provider = _usePopup.Provider,
31496
31978
  providerValue = _usePopup.providerValue;
31497
31979
  var events = getTargetProps();
31980
+ var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(0),
31981
+ _React$useState2 = slicedToArray_default()(_React$useState, 2),
31982
+ updateKey = _React$useState2[0],
31983
+ setUpdateKey = _React$useState2[1];
31984
+ var handleUpdateKey = usePersistFn(function () {
31985
+ setUpdateKey(function (prev) {
31986
+ return (prev + 1) % 2;
31987
+ });
31988
+ });
31498
31989
  var bindEvents = function bindEvents() {
31990
+ var _window;
31499
31991
  var targetEl = targetRef.current;
31500
31992
  if (!targetEl) return;
31501
31993
  if (events.onMouseEnter) targetEl.addEventListener('mouseenter', events.onMouseEnter);
@@ -31505,8 +31997,14 @@ var Popover = function Popover(props) {
31505
31997
  if (trigger === 'hover' && props.clickToCancelDelay && props.mouseEnterDelay) {
31506
31998
  targetEl.addEventListener('click', closePop);
31507
31999
  }
32000
+ (_window = window) === null || _window === void 0 || _window.addEventListener('resize', handleUpdateKey);
32001
+ if (props.adjust) {
32002
+ var scrollContainer = getClosestScrollContainer(targetEl);
32003
+ if (scrollContainer) scrollContainer.addEventListener('scroll', handleUpdateKey);
32004
+ }
31508
32005
  };
31509
32006
  var unbindEvents = function unbindEvents() {
32007
+ var _window2;
31510
32008
  var targetEl = targetRef.current;
31511
32009
  if (!targetEl) return;
31512
32010
  var events = getTargetProps();
@@ -31514,6 +32012,11 @@ var Popover = function Popover(props) {
31514
32012
  if (events.onMouseLeave) targetEl.removeEventListener('mouseleave', events.onMouseLeave);
31515
32013
  if (events.onClick) targetEl.removeEventListener('click', events.onClick);
31516
32014
  targetEl.removeEventListener('click', closePop);
32015
+ (_window2 = window) === null || _window2 === void 0 || _window2.removeEventListener('resize', handleUpdateKey);
32016
+ if (props.adjust) {
32017
+ var scrollContainer = getClosestScrollContainer(targetEl);
32018
+ if (scrollContainer) scrollContainer.removeEventListener('scroll', handleUpdateKey);
32019
+ }
31517
32020
  };
31518
32021
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
31519
32022
  bindEvents();
@@ -31575,6 +32078,7 @@ var Popover = function Popover(props) {
31575
32078
  adjust: props.adjust,
31576
32079
  lazy: props.lazy,
31577
32080
  offset: props.offset,
32081
+ updateKey: updateKey,
31578
32082
  children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()(objectSpread2_default()({
31579
32083
  className: classnames_default()(className, popoverStyle === null || popoverStyle === void 0 ? void 0 : popoverStyle.rootClass, popoverStyle === null || popoverStyle === void 0 ? void 0 : popoverStyle.wrapper, open && (popoverStyle === null || popoverStyle === void 0 ? void 0 : popoverStyle.wrapperOpen), !showArrow && (popoverStyle === null || popoverStyle === void 0 ? void 0 : popoverStyle.hideArrow)),
31580
32084
  style: containerStyle
@@ -33816,9 +34320,16 @@ var accordion_jssStyle = {
33816
34320
  var ModalSubmit = function ModalSubmit(props) {
33817
34321
  var modalFormContext = useFormFooter();
33818
34322
  var handleClick = usePersistFn(function (e) {
33819
- var _props$onClick;
33820
- (_props$onClick = props.onClick) === null || _props$onClick === void 0 || _props$onClick.call(props, e);
33821
- modalFormContext === null || modalFormContext === void 0 || modalFormContext.func.submit();
34323
+ var _modalFormContext$fun;
34324
+ if (modalFormContext !== null && modalFormContext !== void 0 && (_modalFormContext$fun = modalFormContext.func) !== null && _modalFormContext$fun !== void 0 && _modalFormContext$fun.hasSubmit) {
34325
+ modalFormContext === null || modalFormContext === void 0 || modalFormContext.func.submit(true, function () {
34326
+ var _props$onClick;
34327
+ return (_props$onClick = props.onClick) === null || _props$onClick === void 0 ? void 0 : _props$onClick.call(props, e);
34328
+ });
34329
+ } else {
34330
+ var _props$onClick2;
34331
+ (_props$onClick2 = props.onClick) === null || _props$onClick2 === void 0 || _props$onClick2.call(props, e);
34332
+ }
33822
34333
  });
33823
34334
  return /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_button_button, objectSpread2_default()(objectSpread2_default()({
33824
34335
  htmlType: "button",
@@ -38080,9 +38591,10 @@ var useTree = function useTree(props) {
38080
38591
  };
38081
38592
  }
38082
38593
  if (virtual) {
38594
+ var _context$dataFlatStat;
38083
38595
  return {
38084
38596
  active: isActive,
38085
- expanded: context.dataFlatStatusMap.get(id).expanded
38597
+ expanded: !!((_context$dataFlatStat = context.dataFlatStatusMap.get(id)) !== null && _context$dataFlatStat !== void 0 && _context$dataFlatStat.expanded)
38086
38598
  };
38087
38599
  }
38088
38600
  return {
@@ -38093,11 +38605,12 @@ var useTree = function useTree(props) {
38093
38605
 
38094
38606
  // 注册节点
38095
38607
  var bindVirtualNode = function bindVirtualNode(id, update) {
38608
+ var _context$dataFlatStat2;
38096
38609
  context.updateMap.set(id, update);
38097
38610
  var isActive = activeProp === id;
38098
38611
  return {
38099
38612
  active: isActive,
38100
- expanded: context.dataFlatStatusMap.get(id).expanded
38613
+ expanded: !!((_context$dataFlatStat2 = context.dataFlatStatusMap.get(id)) !== null && _context$dataFlatStat2 !== void 0 && _context$dataFlatStat2.expanded)
38101
38614
  };
38102
38615
  };
38103
38616
  var get = function get(id) {
@@ -38469,7 +38982,7 @@ var useTree = function useTree(props) {
38469
38982
  var appendChildrenExpanded = function appendChildrenExpanded(child, level, pid, insertData) {
38470
38983
  if (!child) return;
38471
38984
  child.forEach(function (item, i) {
38472
- var _context$dataFlatStat;
38985
+ var _context$dataFlatStat3;
38473
38986
  var childId = getKey(item, pid, i);
38474
38987
  var node = {
38475
38988
  id: childId,
@@ -38478,7 +38991,7 @@ var useTree = function useTree(props) {
38478
38991
  pid: pid
38479
38992
  };
38480
38993
  insertData.push(node);
38481
- if ((_context$dataFlatStat = context.dataFlatStatusMap.get(childId)) !== null && _context$dataFlatStat !== void 0 && _context$dataFlatStat.expanded && item[childrenKey]) {
38994
+ if ((_context$dataFlatStat3 = context.dataFlatStatusMap.get(childId)) !== null && _context$dataFlatStat3 !== void 0 && _context$dataFlatStat3.expanded && item[childrenKey]) {
38482
38995
  appendChildrenExpanded(item[childrenKey], level + 1, childId, insertData);
38483
38996
  }
38484
38997
  });
@@ -38561,6 +39074,16 @@ var useTree = function useTree(props) {
38561
39074
  var getFlatData = function getFlatData() {
38562
39075
  return context.dataFlat;
38563
39076
  };
39077
+ var updateExpanded = usePersistFn(function (expanded) {
39078
+ var tempExpandMap = new Set(expanded);
39079
+ if (!expanded) return;
39080
+ if (virtual) {
39081
+ expandedFlat(expanded);
39082
+ }
39083
+ context.updateMap.forEach(function (update, id) {
39084
+ update('expanded', tempExpandMap.has(id));
39085
+ });
39086
+ });
38564
39087
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
38565
39088
  if (defaultExpandAll) {
38566
39089
  var nextExpanded = [];
@@ -38576,8 +39099,13 @@ var useTree = function useTree(props) {
38576
39099
  if (props.datum) return;
38577
39100
  if (!dataUpdate) return;
38578
39101
  setData(data);
39102
+ var nextExpanded = props.expanded || props.defaultExpanded || [];
39103
+ if (!shallowEqual(nextExpanded, expanded)) {
39104
+ onExpand(nextExpanded);
39105
+ updateExpanded(nextExpanded);
39106
+ }
38579
39107
  updateInnerCheckStatus();
38580
- }, [data]);
39108
+ }, [props.data]);
38581
39109
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
38582
39110
  if (props.datum) return;
38583
39111
  setValue(value);
@@ -38602,16 +39130,17 @@ var useTree = function useTree(props) {
38602
39130
  getChecked: getChecked,
38603
39131
  getKey: getKey,
38604
39132
  getFlatData: getFlatData,
39133
+ getDataById: getDataById,
38605
39134
  getDataByValues: getDataByValues,
38606
39135
  setValue: setValue,
38607
39136
  setData: setData,
38608
39137
  isDisabled: isDisabled,
39138
+ isUnMatched: isUnMatched,
38609
39139
  bindNode: bindNode,
38610
39140
  bindVirtualNode: bindVirtualNode,
38611
- getDataById: getDataById,
38612
39141
  bindUpdate: bindUpdate,
38613
39142
  unBindUpdate: unBindUpdate,
38614
- isUnMatched: isUnMatched,
39143
+ updateExpanded: updateExpanded,
38615
39144
  childrenKey: childrenKey,
38616
39145
  data: data,
38617
39146
  dataFlat: dataFlat,
@@ -40009,7 +40538,7 @@ var TagInput = function TagInput(props) {
40009
40538
 
40010
40539
 
40011
40540
 
40012
- var tag_excluded = ["jssStyle", "className", "type", "color", "size", "disabled", "mode", "shape", "children", "onClick", "onClose", "style", "backgroundColor", "inlineStyle", "onKeyUp", "onCompleted", "onEnterPress", "closable"];
40541
+ var tag_excluded = ["jssStyle", "className", "type", "color", "size", "disabled", "mode", "shape", "children", "onClick", "onClose", "style", "backgroundColor", "inlineStyle", "onKeyUp", "onCompleted", "onEnterPress", "closable", "onMouseDown"];
40013
40542
 
40014
40543
 
40015
40544
 
@@ -40040,6 +40569,7 @@ var Tag = function Tag(props) {
40040
40569
  onCompleted = props.onCompleted,
40041
40570
  onEnterPress = props.onEnterPress,
40042
40571
  closable = props.closable,
40572
+ onMouseDown = props.onMouseDown,
40043
40573
  rest = objectWithoutProperties_default()(props, tag_excluded);
40044
40574
  if (props.type) {
40045
40575
  tag_devUseWarning.deprecated('type', 'color', 'Tag');
@@ -40113,6 +40643,7 @@ var Tag = function Tag(props) {
40113
40643
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
40114
40644
  className: tagStyle.closeIcon,
40115
40645
  onClick: handleClose,
40646
+ onMouseDown: onMouseDown,
40116
40647
  children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
40117
40648
  className: tagStyle.closeIconWrapper,
40118
40649
  children: icons_config.tag.Close
@@ -40130,7 +40661,7 @@ var Tag = function Tag(props) {
40130
40661
  }));
40131
40662
  };
40132
40663
  Tag.Input = tag_input;
40133
- /* harmony default export */ var base_src_tag_tag = (Tag);
40664
+ /* harmony default export */ var src_tag_tag = (Tag);
40134
40665
  ;// CONCATENATED MODULE: ../base/src/select/result-more.tsx
40135
40666
 
40136
40667
 
@@ -40233,7 +40764,7 @@ var More = function More(props) {
40233
40764
  }
40234
40765
  if (showNum < 0 || showNum >= data.length) {
40235
40766
  return /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
40236
- children: [data, /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_tag_tag, {
40767
+ children: [data, /*#__PURE__*/(0,jsx_runtime.jsx)(src_tag_tag, {
40237
40768
  className: styles.tag,
40238
40769
  jssStyle: jssStyle,
40239
40770
  size: size,
@@ -40254,7 +40785,7 @@ var More = function More(props) {
40254
40785
  }
40255
40786
  var renderCompressedTag = function renderCompressedTag() {
40256
40787
  return /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
40257
- children: [/*#__PURE__*/(0,jsx_runtime.jsx)(base_src_tag_tag, {
40788
+ children: [/*#__PURE__*/(0,jsx_runtime.jsx)(src_tag_tag, {
40258
40789
  className: styles.tag,
40259
40790
  jssStyle: jssStyle,
40260
40791
  size: size,
@@ -40262,7 +40793,7 @@ var More = function More(props) {
40262
40793
  mode: visible ? 'fill' : 'bright',
40263
40794
  color: visible ? 'info' : 'default',
40264
40795
  children: shouldShowMore ? '+' : "+".concat(itemsLength)
40265
- }, 'more'), /*#__PURE__*/(0,jsx_runtime.jsx)(src_popover_popover, {
40796
+ }, 'more'), compressed !== 'hide-popover' && /*#__PURE__*/(0,jsx_runtime.jsx)(src_popover_popover, {
40266
40797
  jssStyle: jssStyle,
40267
40798
  className: compressedClassName,
40268
40799
  visible: visible,
@@ -40360,6 +40891,7 @@ var result_Result = function Result(props) {
40360
40891
  var render = useRender();
40361
40892
  var resultRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
40362
40893
  var prevMore = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(more);
40894
+ var removeLock = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
40363
40895
  var showInput = allowOnFilter;
40364
40896
  var mounted = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
40365
40897
  var styles = props.classes;
@@ -40435,6 +40967,12 @@ var result_Result = function Result(props) {
40435
40967
  })
40436
40968
  }, 'input');
40437
40969
  };
40970
+ var handleCloseMouseDown = function handleCloseMouseDown() {
40971
+ removeLock.current = true;
40972
+ setTimeout(function () {
40973
+ removeLock.current = false;
40974
+ }, 0);
40975
+ };
40438
40976
  var renderResultItem = function renderResultItem(item, index, nodes, v) {
40439
40977
  var handleClose = function handleClose() {
40440
40978
  onRemove === null || onRemove === void 0 || onRemove(item, v);
@@ -40469,12 +41007,13 @@ var result_Result = function Result(props) {
40469
41007
  type: disabled === true ? 'dark' : undefined
40470
41008
  })));
40471
41009
  }
40472
- return /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_tag_tag, objectSpread2_default()(objectSpread2_default()({
41010
+ return /*#__PURE__*/(0,jsx_runtime.jsx)(src_tag_tag, objectSpread2_default()(objectSpread2_default()({
40473
41011
  disabled: isDisabled,
40474
41012
  size: size,
40475
41013
  className: classnames_default()(styles.tag, more === 1 && styles.tagOnly, resultClassName),
40476
41014
  closable: closeable && 'only',
40477
41015
  onClose: closeable && handleClose,
41016
+ onMouseDown: closeable ? handleCloseMouseDown : undefined,
40478
41017
  onClick: handleClick,
40479
41018
  jssStyle: jssStyle,
40480
41019
  inlineStyle: true
@@ -40590,6 +41129,7 @@ var result_Result = function Result(props) {
40590
41129
  var handleResetMore = function handleResetMore() {
40591
41130
  if (!compressed) return;
40592
41131
  if (isCompressedBound()) return;
41132
+ if (removeLock.current) return;
40593
41133
  setMore(-1);
40594
41134
  setShouldResetMore(true);
40595
41135
  };
@@ -40598,7 +41138,7 @@ var result_Result = function Result(props) {
40598
41138
  props.setInputText('');
40599
41139
  setTimeout(function () {
40600
41140
  onFilter === null || onFilter === void 0 || onFilter('', 'blur');
40601
- }, 400);
41141
+ }, 200);
40602
41142
  }
40603
41143
 
40604
41144
  // 单选场景下,焦点时自动选中input文本
@@ -40782,7 +41322,8 @@ var Cascader = function Cascader(props0) {
40782
41322
  onCollapseProp = props.onCollapse,
40783
41323
  size = props.size,
40784
41324
  virtual = props.virtual,
40785
- filterSameChange = props.filterSameChange;
41325
+ filterSameChange = props.filterSameChange,
41326
+ beforeChange = props.beforeChange;
40786
41327
  var showInput = isFunc(onFilterProp);
40787
41328
  var isRealtime = cascader_isOptionalDisabled(props.disabled) ? props.disabled.isRealtime : false;
40788
41329
  var disabled = isOptionalDisabled(disabledProp) ? disabledProp.disabled : disabledProp;
@@ -40837,6 +41378,7 @@ var Cascader = function Cascader(props0) {
40837
41378
  defaultValue: defaultValue,
40838
41379
  childrenKey: childrenKey,
40839
41380
  value: valueProp,
41381
+ beforeChange: beforeChange,
40840
41382
  onChange: onChangeProp,
40841
41383
  filterSameChange: filterSameChange
40842
41384
  }),
@@ -41286,8 +41828,12 @@ var Cascader = function Cascader(props0) {
41286
41828
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
41287
41829
  if (!value) return;
41288
41830
  datum.setValue(value);
41831
+ if (!open) return;
41289
41832
  updatePathByValue();
41290
- }, [value]);
41833
+ if (props.renderOptionList) {
41834
+ updatePath();
41835
+ }
41836
+ }, [value, open]);
41291
41837
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
41292
41838
  if (filterText !== undefined) {
41293
41839
  updatePath();
@@ -41798,6 +42344,7 @@ var validate = function validate(value, formData, rules, p) {
41798
42344
 
41799
42345
 
41800
42346
 
42347
+
41801
42348
  var getValue = function getValue(name, formValue) {
41802
42349
  if (!name) return undefined;
41803
42350
  if (isArray(name)) {
@@ -41837,6 +42384,10 @@ function useFormControl(props) {
41837
42384
  _React$useState2 = slicedToArray_default()(_React$useState, 2),
41838
42385
  errorState = _React$useState2[0],
41839
42386
  setErrorState = _React$useState2[1];
42387
+ var _React$useRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef({
42388
+ mounted: false
42389
+ }),
42390
+ context = _React$useRef.current;
41840
42391
  var value;
41841
42392
  var error = errorState;
41842
42393
  var inForm = false;
@@ -41991,12 +42542,20 @@ function useFormControl(props) {
41991
42542
  if (isArray(name)) {
41992
42543
  var dv = isArray(defaultValue) ? defaultValue : [];
41993
42544
  name.forEach(function (n, index) {
41994
- controlFunc.bind(n, dv[index], validateField, update);
42545
+ var v = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(n);
42546
+ var bindedValue = v === undefined ? dv[index] : v;
42547
+ controlFunc.bind(n, context.mounted ? bindedValue : dv[index], validateField, update);
41995
42548
  });
41996
42549
  } else {
41997
- controlFunc.bind(name, defaultValue, validateField, update);
42550
+ var v = formFunc === null || formFunc === void 0 ? void 0 : formFunc.getValue(name);
42551
+ var bindedValue = v === undefined ? defaultValue : v;
42552
+ controlFunc.bind(name, context.mounted ? bindedValue : defaultValue, validateField, update);
42553
+ }
42554
+ if (context.mounted) {
42555
+ devUseWarning.warn('Please avoid modifying the name property after the component has mounted, as this may result in unintended behavior or errors.');
41998
42556
  }
41999
42557
  }
42558
+ context.mounted = true;
42000
42559
  return function () {
42001
42560
  if (inForm && controlFunc) {
42002
42561
  if (isArray(name)) {
@@ -46627,7 +47186,7 @@ var DatePicker = function DatePicker(props0) {
46627
47186
  if (props.open) {
46628
47187
  func.startEdit();
46629
47188
  }
46630
- }, []);
47189
+ }, [props.open]);
46631
47190
  var _usePopup = use_popup({
46632
47191
  open: props.open,
46633
47192
  onCollapse: onCollapse,
@@ -47359,7 +47918,8 @@ var Modal = function Modal(props) {
47359
47918
  renderEd: false,
47360
47919
  isMask: false,
47361
47920
  mouseDownTarget: null,
47362
- mouseUpTarget: null
47921
+ mouseUpTarget: null,
47922
+ content: null
47363
47923
  }),
47364
47924
  context = _useRef.current;
47365
47925
  var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(props.visible || props.autoShow),
@@ -47468,6 +48028,7 @@ var Modal = function Modal(props) {
47468
48028
  doc.style.paddingRight = "".concat(window.innerWidth - docSize.width, "px");
47469
48029
  }
47470
48030
  } else {
48031
+ if (!context.isMask) return;
47471
48032
  doc.style.paddingRight = '';
47472
48033
  doc.style.overflow = '';
47473
48034
  }
@@ -47492,6 +48053,7 @@ var Modal = function Modal(props) {
47492
48053
  hasMask = false;
47493
48054
  }
47494
48055
  {
48056
+ if (!context.isMask) return;
47495
48057
  var doc = document.body.parentNode;
47496
48058
  doc.style.paddingRight = '';
47497
48059
  doc.style.overflow = '';
@@ -47600,6 +48162,14 @@ var Modal = function Modal(props) {
47600
48162
  if (props.moveable && !props.fullScreen) {
47601
48163
  panelStyle.transform = "translate(".concat(moveInfo.pos.x, "px, ").concat(moveInfo.pos.y, "px)");
47602
48164
  }
48165
+ var renderContent = function renderContent() {
48166
+ if (!props.visible && context.content !== null) return context.content;
48167
+ return /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
48168
+ children: [renderHeader(), renderBody(), renderFooter(), renderResize()]
48169
+ });
48170
+ };
48171
+ var content = renderContent();
48172
+ context.content = content;
47603
48173
  return /*#__PURE__*/(0,jsx_runtime.jsx)(FormFooterProvider, {
47604
48174
  children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
47605
48175
  onClick: function onClick(e) {
@@ -47618,11 +48188,11 @@ var Modal = function Modal(props) {
47618
48188
  onMouseUp: handleMaskMouseUp,
47619
48189
  onClick: handleMaskClick,
47620
48190
  onAnimationStart: updateOrigin,
47621
- children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
48191
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
47622
48192
  ref: panelRef,
47623
48193
  className: classnames_default()(modalClasses === null || modalClasses === void 0 ? void 0 : modalClasses.panel, props.className),
47624
48194
  style: panelStyle,
47625
- children: [renderHeader(), renderBody(), renderFooter(), renderResize()]
48195
+ children: content
47626
48196
  })
47627
48197
  }))
47628
48198
  })
@@ -47765,6 +48335,9 @@ var method = function method(type, jssStyle) {
47765
48335
 
47766
48336
  var modal_devUseWarning = devUseWarning;
47767
48337
  var modal_Modal = function Modal(props) {
48338
+ var _props$jssStyle, _props$jssStyle$modal;
48339
+ // inject jssStyle
48340
+ (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 || (_props$jssStyle$modal = _props$jssStyle.modal) === null || _props$jssStyle$modal === void 0 || _props$jssStyle$modal.call(_props$jssStyle);
47768
48341
  if (props.maskOpacity) {
47769
48342
  modal_devUseWarning.deprecated('maskOpacity', 'maskBackground', 'Modal');
47770
48343
  }
@@ -49249,7 +49822,8 @@ var useForm = function useForm(props) {
49249
49822
  size = props.size,
49250
49823
  colon = props.colon,
49251
49824
  formName = props.name,
49252
- scrollParent = props.scrollParent;
49825
+ scrollParent = props.scrollParent,
49826
+ isControl = props.isControl;
49253
49827
  var deepSetOptions = {
49254
49828
  removeUndefined: removeUndefined,
49255
49829
  forceSet: true
@@ -49403,7 +49977,7 @@ var useForm = function useForm(props) {
49403
49977
  if (errors.length > 0) {
49404
49978
  var errorFields = [];
49405
49979
  for (var _key in context.errors) {
49406
- if (context.errors[_key]) {
49980
+ if (context.errors[_key] && context.names.has(_key)) {
49407
49981
  var _context$errors$_key;
49408
49982
  errorFields.push({
49409
49983
  name: _key,
@@ -49505,13 +50079,16 @@ var useForm = function useForm(props) {
49505
50079
  var values = Object.keys(vals);
49506
50080
  // 针对 name 为数组模式,如 datepicker 的 name={['startTime', 'endTime']} 时,前者校验可能需要依赖后者,因此需要提前将后者数据整合至 draft 用于多字段整合校验
49507
50081
  values.forEach(function (key) {
49508
- deepSet(draft, key, vals[key], deepSetOptions);
50082
+ // upload组件返回的可能是函数: (prev) => [...prev, file]
50083
+ var valueOfKey = typeof vals[key] === 'function' ? vals[key](getValue(key)) : vals[key];
50084
+ deepSet(draft, key, valueOfKey, deepSetOptions);
49509
50085
  });
49510
50086
  values.forEach(function (key) {
49511
50087
  if (option.validate) {
49512
50088
  var _context$validateMap$;
49513
50089
  (_context$validateMap$ = context.validateMap[key]) === null || _context$validateMap$ === void 0 || _context$validateMap$.forEach(function (validate) {
49514
- validate(key, vals[key], current(draft));
50090
+ var valueOfKey = typeof vals[key] === 'function' ? vals[key](getValue(key)) : vals[key];
50091
+ validate(key, valueOfKey, current(draft));
49515
50092
  });
49516
50093
  }
49517
50094
  });
@@ -49522,7 +50099,11 @@ var useForm = function useForm(props) {
49522
50099
  fullKeyPaths.forEach(function (key) {
49523
50100
  delete context.serverErrors[key];
49524
50101
  });
49525
- update(fullKeyPaths);
50102
+ if (option.forceUpdate) {
50103
+ update();
50104
+ } else {
50105
+ update(fullKeyPaths);
50106
+ }
49526
50107
  });
49527
50108
  var updateDefaultValue = function updateDefaultValue() {
49528
50109
  if (!context.mounted) return;
@@ -49567,6 +50148,7 @@ var useForm = function useForm(props) {
49567
50148
  });
49568
50149
  var submit = use_persist_fn(function () {
49569
50150
  var withValidate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
50151
+ var callback = arguments.length > 1 ? arguments[1] : undefined;
49570
50152
  if (disabled) return;
49571
50153
  if (context.submitLock) {
49572
50154
  return;
@@ -49584,32 +50166,29 @@ var useForm = function useForm(props) {
49584
50166
  while (1) switch (_context.prev = _context.next) {
49585
50167
  case 0:
49586
50168
  if (withValidate) {
49587
- _context.next = 3;
50169
+ _context.next = 4;
49588
50170
  break;
49589
50171
  }
49590
50172
  (_props$onSubmit = props.onSubmit) === null || _props$onSubmit === void 0 || _props$onSubmit.call(props, (_context$value = context.value) !== null && _context$value !== void 0 ? _context$value : {});
50173
+ callback === null || callback === void 0 || callback();
49591
50174
  return _context.abrupt("return");
49592
- case 3:
49593
- _context.next = 5;
50175
+ case 4:
50176
+ _context.next = 6;
49594
50177
  return validateFields(undefined, {
49595
50178
  ignoreBind: true
49596
50179
  }).catch(function (e) {
49597
50180
  return e;
49598
50181
  });
49599
- case 5:
50182
+ case 6:
49600
50183
  result = _context.sent;
49601
- if (!(result === true)) {
49602
- _context.next = 11;
49603
- break;
50184
+ if (result === true) {
50185
+ (_props$onSubmit2 = props.onSubmit) === null || _props$onSubmit2 === void 0 || _props$onSubmit2.call(props, (_context$value2 = context.value) !== null && _context$value2 !== void 0 ? _context$value2 : {});
50186
+ if (activeEl) activeEl.focus();
50187
+ } else {
50188
+ handleSubmitError(result);
49604
50189
  }
49605
- (_props$onSubmit2 = props.onSubmit) === null || _props$onSubmit2 === void 0 || _props$onSubmit2.call(props, (_context$value2 = context.value) !== null && _context$value2 !== void 0 ? _context$value2 : {});
49606
- if (activeEl) activeEl.focus();
49607
- _context.next = 13;
49608
- break;
49609
- case 11:
49610
- handleSubmitError(result);
49611
- return _context.abrupt("return");
49612
- case 13:
50190
+ callback === null || callback === void 0 || callback();
50191
+ case 9:
49613
50192
  case "end":
49614
50193
  return _context.stop();
49615
50194
  }
@@ -49691,15 +50270,15 @@ var useForm = function useForm(props) {
49691
50270
  context.updateMap[n] = new Set();
49692
50271
  }
49693
50272
  context.updateMap[n].add(updateFn);
50273
+ var shouldTriggerResetChange = context.removeArr.has(n);
49694
50274
  context.removeArr.delete(n);
49695
- if (df !== undefined && deepGet(context.value, n) === undefined) {
50275
+ var shouldTriggerDefaultChange = df !== undefined && deepGet(context.value, n) === undefined;
50276
+ if (shouldTriggerDefaultChange || shouldTriggerResetChange) {
49696
50277
  if (!context.mounted) context.defaultValues[n] = df;
49697
- setTimeout(function () {
49698
- onChange(function (v) {
49699
- deepSet(v, n, df, deepSetOptions);
49700
- });
49701
- update(n);
50278
+ onChange(function (v) {
50279
+ deepSet(v, n, df, deepSetOptions);
49702
50280
  });
50281
+ update(n);
49703
50282
  }
49704
50283
  },
49705
50284
  unbind: function unbind(n, reserveAble, validateField, update) {
@@ -49714,7 +50293,6 @@ var useForm = function useForm(props) {
49714
50293
  }
49715
50294
  if (validateFieldSet.size === 0 && updateFieldSet.size === 0) {
49716
50295
  context.names.delete(n);
49717
- delete context.errors[n];
49718
50296
  delete context.defaultValues[n];
49719
50297
  }
49720
50298
  var finalReserveAble = (_props$reserveAble = props.reserveAble) !== null && _props$reserveAble !== void 0 ? _props$reserveAble : reserveAble;
@@ -49809,7 +50387,10 @@ var useForm = function useForm(props) {
49809
50387
  external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
49810
50388
  context.removeLock = false;
49811
50389
  // 内部 onChange 改的 value, 不需要更新
49812
- if (props.value === context.value) return;
50390
+ if (props.value === context.value) {
50391
+ if (!isControl) update();
50392
+ return;
50393
+ }
49813
50394
  if (initValidate && !context.resetTime) {
49814
50395
  var keys = Object.keys(context.validateMap).filter(function (key) {
49815
50396
  var oldValue = deepGet(preValue || emptyObj, key);
@@ -49819,7 +50400,8 @@ var useForm = function useForm(props) {
49819
50400
  validateFields(keys).catch(function () {});
49820
50401
  }
49821
50402
  update();
49822
- updateDefaultValue();
50403
+ // 默认值上位时会提前触发外部的onChange, 导致外部的多次setFormValue不能合并后生效的问题(ReactDOM.render方式渲染)
50404
+ setTimeout(updateDefaultValue);
49823
50405
  context.resetTime = 0;
49824
50406
  }, [props.value]);
49825
50407
  external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
@@ -49878,11 +50460,12 @@ var Form = function Form(props) {
49878
50460
  rest = objectWithoutProperties_default()(props, form_excluded);
49879
50461
  var formClasses = jssStyle === null || jssStyle === void 0 || (_jssStyle$form = jssStyle.form) === null || _jssStyle$form === void 0 ? void 0 : _jssStyle$form.call(jssStyle);
49880
50462
  var modalFormContext = useFormFooter();
50463
+ var isControl = ('value' in props);
49881
50464
  var inputAbleParams = {
49882
50465
  value: props.value,
49883
50466
  onChange: props.onChange,
49884
50467
  defaultValue: props.defaultValue,
49885
- control: 'value' in props,
50468
+ control: isControl,
49886
50469
  beforeChange: undefined,
49887
50470
  reserveAble: false
49888
50471
  };
@@ -49893,7 +50476,8 @@ var Form = function Form(props) {
49893
50476
  var _useForm = use_form(objectSpread2_default()(objectSpread2_default()({}, rest), {}, {
49894
50477
  value: value,
49895
50478
  onChange: onChange,
49896
- formElRef: formElRef
50479
+ formElRef: formElRef,
50480
+ isControl: isControl
49897
50481
  })),
49898
50482
  Provider = _useForm.Provider,
49899
50483
  ProviderProps = _useForm.ProviderProps,
@@ -50061,6 +50645,7 @@ var UseFormItem = function UseFormItem() {
50061
50645
 
50062
50646
 
50063
50647
 
50648
+
50064
50649
  var tooltip_devUseWarning = devUseWarning;
50065
50650
  var defaultDelay = 0;
50066
50651
  var Tooltip = function Tooltip(props) {
@@ -50102,14 +50687,26 @@ var Tooltip = function Tooltip(props) {
50102
50687
  popupRef = _usePopup.popupRef,
50103
50688
  closePop = _usePopup.closePop;
50104
50689
  var events = getTargetProps();
50690
+ var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(0),
50691
+ _React$useState2 = slicedToArray_default()(_React$useState, 2),
50692
+ updateKey = _React$useState2[0],
50693
+ setUpdateKey = _React$useState2[1];
50694
+ var handleUpdateKey = usePersistFn(function () {
50695
+ setUpdateKey(function (prev) {
50696
+ return (prev + 1) % 2;
50697
+ });
50698
+ });
50105
50699
  var bindEvents = function bindEvents() {
50700
+ var _window;
50106
50701
  var targetEl = targetRef.current;
50107
50702
  if (!targetEl) return;
50108
50703
  if (events.onMouseEnter) targetEl.addEventListener('mouseenter', events.onMouseEnter);
50109
50704
  if (events.onMouseLeave) targetEl.addEventListener('mouseleave', events.onMouseLeave);
50110
50705
  if (events.onClick) targetEl.addEventListener('click', events.onClick);
50706
+ (_window = window) === null || _window === void 0 || _window.addEventListener('resize', handleUpdateKey);
50111
50707
  };
50112
50708
  var unbindEvents = function unbindEvents() {
50709
+ var _window2;
50113
50710
  var targetEl = targetRef.current;
50114
50711
  if (!targetEl) return;
50115
50712
  var events = getTargetProps();
@@ -50117,6 +50714,7 @@ var Tooltip = function Tooltip(props) {
50117
50714
  if (events.onMouseLeave) targetEl.removeEventListener('mouseleave', events.onMouseLeave);
50118
50715
  if (events.onClick) targetEl.removeEventListener('click', events.onClick);
50119
50716
  targetEl.removeEventListener('click', closePop);
50717
+ (_window2 = window) === null || _window2 === void 0 || _window2.removeEventListener('resize', handleUpdateKey);
50120
50718
  };
50121
50719
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
50122
50720
  if (!persistent) return;
@@ -50160,6 +50758,7 @@ var Tooltip = function Tooltip(props) {
50160
50758
  popupGap: 0,
50161
50759
  zIndex: zIndex,
50162
50760
  adjust: popsitionProps === 'auto',
50761
+ updateKey: updateKey,
50163
50762
  children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
50164
50763
  className: classnames_default()(className, tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.rootClass, tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.wrapper, open && (tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.wrapperOpen)),
50165
50764
  style: {
@@ -50527,7 +51126,7 @@ var FormFlow = function FormFlow(props) {
50527
51126
  return datum === null || datum === void 0 ? void 0 : datum.get(name);
50528
51127
  });
50529
51128
  var memoizedResult = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
50530
- if (!props.strict) return;
51129
+ if (!props.strict) return null;
50531
51130
  if (isFunc(props.children)) {
50532
51131
  return props.children(datum);
50533
51132
  }
@@ -51011,6 +51610,10 @@ var useImage = function useImage() {
51011
51610
  _React$useState2 = slicedToArray_default()(_React$useState, 2),
51012
51611
  status = _React$useState2[0],
51013
51612
  setStatus = _React$useState2[1];
51613
+ var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState({}),
51614
+ _React$useState4 = slicedToArray_default()(_React$useState3, 2),
51615
+ imgCoverStyle = _React$useState4[0],
51616
+ setImgCoverStyle = _React$useState4[1];
51014
51617
  var elementRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);
51015
51618
  var getUrl = function getUrl(url) {
51016
51619
  var auto = 'autoSSL' in props ? autoSSL : use_image_config.autoSSL;
@@ -51045,6 +51648,35 @@ var useImage = function useImage() {
51045
51648
  };
51046
51649
  img.src = getUrl(alt);
51047
51650
  };
51651
+ var handleCoverStyle = function handleCoverStyle(img) {
51652
+ var container = elementRef === null || elementRef === void 0 ? void 0 : elementRef.current;
51653
+ if (!container) return;
51654
+
51655
+ // 根据容器的宽高获取宽高比
51656
+ var containerWidth = container.clientWidth;
51657
+ var containerHeight = container.clientHeight;
51658
+ var containerRatio = containerWidth / containerHeight;
51659
+
51660
+ // 根据图片的自然尺寸获取宽高比
51661
+ var imageWidth = img.naturalWidth;
51662
+ var imageHeight = img.naturalHeight;
51663
+ var imageRatio = imageWidth / imageHeight;
51664
+
51665
+ // 判断宽高比,决定图片填充策略
51666
+ if (imageRatio > containerRatio) {
51667
+ // 图片更宽,宽度占满容器,高度自适应
51668
+ setImgCoverStyle({
51669
+ height: '100%',
51670
+ width: 'auto'
51671
+ });
51672
+ } else {
51673
+ // 图片更高,填满容器高度
51674
+ setImgCoverStyle({
51675
+ width: '100%',
51676
+ height: 'auto'
51677
+ });
51678
+ }
51679
+ };
51048
51680
  var markToRender = function markToRender() {
51049
51681
  if (!src) {
51050
51682
  handleAlt();
@@ -51052,7 +51684,10 @@ var useImage = function useImage() {
51052
51684
  }
51053
51685
  var img = new window.Image();
51054
51686
  img.onload = function () {
51055
- return setStatus(SRC);
51687
+ setStatus(SRC);
51688
+ if (props.fit === 'fill') {
51689
+ handleCoverStyle(img);
51690
+ }
51056
51691
  };
51057
51692
  img.onerror = function (e) {
51058
51693
  return handleError(SRC, e);
@@ -51081,7 +51716,9 @@ var useImage = function useImage() {
51081
51716
  alt: alt,
51082
51717
  draggable: !noImgDrag
51083
51718
  });
51084
- return objectSpread2_default()({}, mergedEventHandlers);
51719
+ return objectSpread2_default()({
51720
+ style: imgCoverStyle
51721
+ }, mergedEventHandlers);
51085
51722
  };
51086
51723
  var getImageDivProps = function getImageDivProps() {
51087
51724
  var externalProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -51849,7 +52486,8 @@ var Image = function Image(props) {
51849
52486
  href: href,
51850
52487
  lazy: lazy,
51851
52488
  autoSSL: autoSSL,
51852
- noImgDrag: noImgDrag
52489
+ noImgDrag: noImgDrag,
52490
+ fit: fit
51853
52491
  }, rest)),
51854
52492
  status = _useImage.status,
51855
52493
  getRootProps = _useImage.getRootProps,
@@ -51928,7 +52566,7 @@ var Image = function Image(props) {
51928
52566
 
51929
52567
  // 渲染 img / div 类型的内部标签
51930
52568
  var renderInner = function renderInner(src) {
51931
- return fit === 'fill' || fit === 'fit' ? renderDivInnerEl(src) : renderImgeInnerEl(src);
52569
+ return fit === 'fit' ? renderDivInnerEl(src) : renderImgeInnerEl(src);
51932
52570
  };
51933
52571
 
51934
52572
  // 默认占位图
@@ -52982,6 +53620,7 @@ var list_List = function List(props) {
52982
53620
  controlType = props.controlType,
52983
53621
  hideCreateOption = props.hideCreateOption,
52984
53622
  optionListRef = props.optionListRef,
53623
+ keepScrollTop = props.keepScrollTop,
52985
53624
  isAnimationFinish = props.isAnimationFinish,
52986
53625
  _props$renderItem = props.renderItem,
52987
53626
  renderItemProp = _props$renderItem === void 0 ? function (d) {
@@ -53149,7 +53788,7 @@ var list_List = function List(props) {
53149
53788
  return /*#__PURE__*/(0,jsx_runtime.jsx)(virtual_scroll_list, {
53150
53789
  virtualRef: virtualRef,
53151
53790
  data: data,
53152
- keepScrollTop: true,
53791
+ keepScrollTop: keepScrollTop,
53153
53792
  keygen: keygen,
53154
53793
  tag: 'ul',
53155
53794
  groupKey: groupKey,
@@ -53208,7 +53847,8 @@ var TreeCheckbox = function TreeCheckbox(props) {
53208
53847
  id = props.id,
53209
53848
  onChange = props.onChange,
53210
53849
  disabled = props.disabled,
53211
- checked = props.checked;
53850
+ checked = props.checked,
53851
+ size = props.size;
53212
53852
  var _useTreeContext = useTreeContext(),
53213
53853
  unBindUpdate = _useTreeContext.unBindUpdate;
53214
53854
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
@@ -53225,7 +53865,8 @@ var TreeCheckbox = function TreeCheckbox(props) {
53225
53865
  checked: checked,
53226
53866
  disabled: disabled,
53227
53867
  onChange: onChange,
53228
- needStopPropagation: true
53868
+ needStopPropagation: true,
53869
+ size: size
53229
53870
  });
53230
53871
  };
53231
53872
  /* harmony default export */ var tree_checkbox = (TreeCheckbox);
@@ -53272,14 +53913,15 @@ var NodeContent = function NodeContent(props) {
53272
53913
  var forceUpdate = useRender();
53273
53914
  var _useTreeContext = useTreeContext(),
53274
53915
  isDisabled = _useTreeContext.isDisabled,
53275
- bindUpdate = _useTreeContext.bindUpdate;
53916
+ bindUpdate = _useTreeContext.bindUpdate,
53917
+ size = _useTreeContext.size,
53918
+ leafIcon = _useTreeContext.leafIcon;
53276
53919
  var config = useConfig();
53277
53920
  var disabled = isDisabled(id);
53278
53921
  bindUpdate(id, forceUpdate);
53279
53922
  var contentStyle = (jssStyle === null || jssStyle === void 0 ? void 0 : jssStyle.tree()) || {};
53280
53923
  var rootClass = classnames_default()(contentStyle.contentWrapper, defineProperty_default()(defineProperty_default()(defineProperty_default()({}, contentStyle.childnode, data[childrenKey] && data[childrenKey].length > 0), contentStyle.inlineContent, inlineNode), contentStyle.contentDisabled, disabled));
53281
53924
  var contentClass = classnames_default()(contentStyle.content, isString(contentClassProp) && contentClassProp, isFunc(contentClassProp) && contentClassProp(data));
53282
- var textClass = classnames_default()(contentStyle.text, defineProperty_default()({}, contentStyle.textClickable, actionOnClick && !is_isEmpty(actionOnClick) || parentClickExpand || doubleClickExpand));
53283
53925
  var hasExpandIcons = expandIcons !== undefined;
53284
53926
  var children = data[childrenKey];
53285
53927
  var hasChildren = children && children.length > 0;
@@ -53314,7 +53956,7 @@ var NodeContent = function NodeContent(props) {
53314
53956
  var handleNodeCheck = function handleNodeCheck(_, checked) {
53315
53957
  set(id, checked ? 1 : 0);
53316
53958
  if (onChange) {
53317
- onChange(getValue());
53959
+ onChange(getValue(), id);
53318
53960
  }
53319
53961
  };
53320
53962
  var checked = getChecked(id);
@@ -53393,10 +54035,30 @@ var NodeContent = function NodeContent(props) {
53393
54035
  if (Array.isArray(children) || children === null) return null;
53394
54036
  if (fetching && !children) return renderLoading();
53395
54037
  if (loader && children === undefined) return indicator;
54038
+ if (leafIcon) {
54039
+ var $iconContent = null;
54040
+ if (leafIcon === true) {
54041
+ $iconContent = icons_config.tree.Leaf;
54042
+ } else if (isFunc(leafIcon)) {
54043
+ $iconContent = leafIcon(data);
54044
+ } else {
54045
+ $iconContent = leafIcon;
54046
+ }
54047
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
54048
+ className: contentStyle.iconWrapper,
54049
+ dir: config.direction,
54050
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
54051
+ className: classnames_default()(contentStyle.icon, iconClass),
54052
+ dir: config.direction,
54053
+ children: $iconContent
54054
+ })
54055
+ });
54056
+ }
53396
54057
  return null;
53397
54058
  };
53398
54059
  var renderCheckbox = function renderCheckbox() {
53399
54060
  return /*#__PURE__*/(0,jsx_runtime.jsx)(tree_checkbox, {
54061
+ size: size,
53400
54062
  jssStyle: jssStyle,
53401
54063
  id: id,
53402
54064
  disabled: disabled,
@@ -53423,7 +54085,7 @@ var NodeContent = function NodeContent(props) {
53423
54085
  }, contentDataProps()), {}, {
53424
54086
  children: [onChange && renderCheckbox(), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
53425
54087
  dir: config.direction,
53426
- className: textClass,
54088
+ className: contentStyle.text,
53427
54089
  onDoubleClick: onNodeDoubleClick,
53428
54090
  onClick: handleNodeClick,
53429
54091
  children: renderNode()
@@ -53869,6 +54531,7 @@ var useTreeVirtualNode = function useTreeVirtualNode(props) {
53869
54531
 
53870
54532
 
53871
54533
 
54534
+
53872
54535
  var tree_virtual_node_placeElement = null;
53873
54536
  var VirtualNode = function VirtualNode(props) {
53874
54537
  var jssStyle = props.jssStyle,
@@ -53894,7 +54557,8 @@ var VirtualNode = function VirtualNode(props) {
53894
54557
  onChange = props.onChange,
53895
54558
  onNodeClick = props.onNodeClick,
53896
54559
  onToggle = props.onToggle,
53897
- actionOnClick = props.actionOnClick;
54560
+ actionOnClick = props.actionOnClick,
54561
+ size = props.size;
53898
54562
  var config = useConfig();
53899
54563
  var datum = useTreeContext();
53900
54564
  var element = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
@@ -53935,14 +54599,28 @@ var VirtualNode = function VirtualNode(props) {
53935
54599
  });
53936
54600
  if (onToggle) onToggle(id, nextExpanded);
53937
54601
  };
53938
- return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
54602
+ var indent = size === "large" ? 32 : 24;
54603
+ var $indents;
54604
+ if (line) {
54605
+ $indents = Array.from({
54606
+ length: level - 1
54607
+ }).map(function (_, index) {
54608
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
54609
+ className: contentStyle.lineIndent,
54610
+ style: {
54611
+ left: (index + 1) * indent
54612
+ }
54613
+ }, index);
54614
+ });
54615
+ }
54616
+ return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
53939
54617
  ref: element,
53940
54618
  className: rootClass,
53941
54619
  dir: config.direction,
53942
54620
  style: {
53943
- paddingLeft: level * 24
54621
+ paddingLeft: level * indent
53944
54622
  },
53945
- children: /*#__PURE__*/(0,jsx_runtime.jsx)(tree_content, {
54623
+ children: [$indents, /*#__PURE__*/(0,jsx_runtime.jsx)(tree_content, {
53946
54624
  virtual: true,
53947
54625
  jssStyle: jssStyle,
53948
54626
  isControlled: isControlled,
@@ -53973,7 +54651,7 @@ var VirtualNode = function VirtualNode(props) {
53973
54651
  onNodeClick: onNodeClick,
53974
54652
  onToggle: handleToggle,
53975
54653
  actionOnClick: actionOnClick
53976
- })
54654
+ })]
53977
54655
  });
53978
54656
  };
53979
54657
  /* harmony default export */ var tree_virtual_node = (VirtualNode);
@@ -54152,11 +54830,16 @@ var Root = function Root(props) {
54152
54830
 
54153
54831
 
54154
54832
 
54833
+ var SIZE_MAP = {
54834
+ 'small': 28,
54835
+ 'default': 36,
54836
+ 'large': 42
54837
+ };
54155
54838
  var TreeVirtual = function TreeVirtual(props) {
54156
54839
  var jssStyle = props.jssStyle,
54157
54840
  height = props.height,
54158
- _props$lineHeight = props.lineHeight,
54159
- lineHeight = _props$lineHeight === void 0 ? 36 : _props$lineHeight,
54841
+ lineHeightProp = props.lineHeight,
54842
+ rowsInView = props.rowsInView,
54160
54843
  line = props.line,
54161
54844
  mode = props.mode,
54162
54845
  contentClass = props.contentClass,
@@ -54180,6 +54863,7 @@ var TreeVirtual = function TreeVirtual(props) {
54180
54863
  onToggle = props.onToggle,
54181
54864
  onChange = props.onChange;
54182
54865
  var datum = useTreeContext();
54866
+ var lineHeight = lineHeightProp || SIZE_MAP[datum.size || 'default'];
54183
54867
  var renderItem = function renderItem(item, index) {
54184
54868
  var id = item.id,
54185
54869
  data = item.data,
@@ -54212,13 +54896,14 @@ var TreeVirtual = function TreeVirtual(props) {
54212
54896
  expanded: expanded,
54213
54897
  onNodeClick: onNodeClick,
54214
54898
  onToggle: onToggle,
54215
- onChange: onChange
54899
+ onChange: onChange,
54900
+ size: datum.size
54216
54901
  }, id);
54217
54902
  };
54218
54903
  return /*#__PURE__*/(0,jsx_runtime.jsx)(virtual_scroll_list, {
54219
54904
  data: datum.dataFlat,
54220
54905
  height: height,
54221
- rowsInView: 10,
54906
+ rowsInView: rowsInView,
54222
54907
  scrollerStyle: {
54223
54908
  height: '100%',
54224
54909
  width: '100%',
@@ -54238,7 +54923,7 @@ var TreeVirtual = function TreeVirtual(props) {
54238
54923
 
54239
54924
 
54240
54925
 
54241
- var tree_excluded = ["jssStyle", "line", "childrenKey", "data", "value", "mode", "keygen", "virtual", "expanded", "expandIcons", "iconClass", "leafClass", "nodeClass", "contentClass", "rootStyle", "renderItem", "defaultValue", "dataUpdate", "childrenClass", "defaultExpandAll", "defaultExpanded", "parentClickExpand", "doubleClickExpand", "dragImageSelector", "dragImageStyle", "dragSibling", "unmatch", "ignoreSetFlat", "dragHoverExpand", "active", "setActive", "disabled", "inlineNode", "highlight", "className", "onClick", "loader", "getDatum", "onDrop", "onExpand", "onChange", "onDragEnd", "onDragLeave", "onDragOver", "onDragStart", "datum", "actionOnClick", "tiledData"];
54926
+ var tree_excluded = ["jssStyle", "line", "childrenKey", "data", "value", "mode", "keygen", "virtual", "expanded", "expandIcons", "iconClass", "leafClass", "nodeClass", "contentClass", "rootStyle", "renderItem", "defaultValue", "dataUpdate", "childrenClass", "defaultExpandAll", "defaultExpanded", "parentClickExpand", "doubleClickExpand", "dragImageSelector", "dragImageStyle", "dragSibling", "unmatch", "ignoreSetFlat", "dragHoverExpand", "active", "setActive", "disabled", "inlineNode", "highlight", "className", "onClick", "loader", "getDatum", "onDrop", "onExpand", "onChange", "onDragEnd", "onDragLeave", "onDragOver", "onDragStart", "datum", "rowsInView", "actionOnClick", "tiledData", "height"];
54242
54927
 
54243
54928
 
54244
54929
 
@@ -54300,8 +54985,11 @@ var Tree = function Tree(props) {
54300
54985
  onDragOver = props.onDragOver,
54301
54986
  onDragStart = props.onDragStart,
54302
54987
  propsDatum = props.datum,
54988
+ _props$rowsInView = props.rowsInView,
54989
+ rowsInView = _props$rowsInView === void 0 ? 20 : _props$rowsInView,
54303
54990
  actionOnClick = props.actionOnClick,
54304
54991
  tiledData = props.tiledData,
54992
+ height = props.height,
54305
54993
  rest = objectWithoutProperties_default()(props, tree_excluded);
54306
54994
  var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(propActive),
54307
54995
  _useState2 = slicedToArray_default()(_useState, 2),
@@ -54342,7 +55030,7 @@ var Tree = function Tree(props) {
54342
55030
  expanded = _useTree.expanded,
54343
55031
  onExpand = _useTree.onExpand;
54344
55032
  var treeStyle = (jssStyle === null || jssStyle === void 0 ? void 0 : jssStyle.tree()) || {};
54345
- var rootClass = classnames_default()(treeStyle.rootClass, treeStyle.tree, className, defineProperty_default()(defineProperty_default()(defineProperty_default()({}, treeStyle.line, line), treeStyle.noline, !line), treeStyle.virtual, virtual));
55033
+ var rootClass = classnames_default()(treeStyle.rootClass, treeStyle.tree, className, defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, treeStyle.line, line), treeStyle.noline, !line), treeStyle.virtual, virtual), treeStyle.sizeSmall, props.size === 'small'), treeStyle.sizeLarge, props.size === 'large'));
54346
55034
  var getDragImageSelector = function getDragImageSelector(data) {
54347
55035
  if (isFunc(dragImageSelector)) return dragImageSelector(data);
54348
55036
  return dragImageSelector;
@@ -54357,16 +55045,6 @@ var Tree = function Tree(props) {
54357
55045
  }
54358
55046
  return props.height || styleHeight;
54359
55047
  };
54360
- var handleUpdateExpanded = function handleUpdateExpanded(expanded) {
54361
- var tempExpandMap = new Set(expanded);
54362
- if (!expanded) return;
54363
- if (virtual) {
54364
- datum.expandedFlat(expanded);
54365
- }
54366
- datum.updateMap.forEach(function (update, id) {
54367
- update('expanded', tempExpandMap.has(id));
54368
- });
54369
- };
54370
55048
  var handleUpdateActive = function handleUpdateActive(active, item) {
54371
55049
  setActive(active);
54372
55050
  if (active !== props.active) {
@@ -54459,6 +55137,7 @@ var Tree = function Tree(props) {
54459
55137
  return /*#__PURE__*/(0,jsx_runtime.jsx)(tree_virtual, objectSpread2_default()(objectSpread2_default()({}, props), {}, {
54460
55138
  data: data,
54461
55139
  line: line,
55140
+ rowsInView: rowsInView,
54462
55141
  expanded: expanded,
54463
55142
  height: realHeight,
54464
55143
  childrenKey: props.childrenKey || 'children',
@@ -54514,7 +55193,7 @@ var Tree = function Tree(props) {
54514
55193
  return;
54515
55194
  }
54516
55195
  if (!props.expanded) return;
54517
- handleUpdateExpanded(expanded);
55196
+ datum.updateExpanded(expanded);
54518
55197
  }, [expanded]);
54519
55198
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
54520
55199
  // if (!active) return;
@@ -54532,7 +55211,10 @@ var Tree = function Tree(props) {
54532
55211
  id: fieldId
54533
55212
  }, rest), {}, {
54534
55213
  children: /*#__PURE__*/(0,jsx_runtime.jsx)(tree_context_Provider, {
54535
- value: datum,
55214
+ value: objectSpread2_default()(objectSpread2_default()({}, datum), {}, {
55215
+ size: props.size,
55216
+ leafIcon: props.leafIcon
55217
+ }),
54536
55218
  children: renderList()
54537
55219
  })
54538
55220
  }));
@@ -55002,6 +55684,7 @@ function Select(props0) {
55002
55684
  compressed = props.compressed,
55003
55685
  compressedBound = props.compressedBound,
55004
55686
  compressedClassName = props.compressedClassName,
55687
+ renderCompressed = props.renderCompressed,
55005
55688
  placeholder = props.placeholder,
55006
55689
  emptyAfterSelect = props.emptyAfterSelect,
55007
55690
  autoAdapt = props.autoAdapt,
@@ -55438,6 +56121,7 @@ function Select(props0) {
55438
56121
  reFocus: reFocus,
55439
56122
  convertBr: convertBr,
55440
56123
  compressed: compressed,
56124
+ renderCompressed: renderCompressed,
55441
56125
  compressedBound: compressedBound,
55442
56126
  compressedClassName: compressedClassName,
55443
56127
  multiple: multiple,
@@ -55500,6 +56184,7 @@ function Select(props0) {
55500
56184
  renderItem: renderItem,
55501
56185
  controlType: controlType,
55502
56186
  onLoadMore: onLoadMore,
56187
+ keepScrollTop: !!filterText ? false : true,
55503
56188
  isAnimationFinish: isAnimationFinish,
55504
56189
  threshold: threshold,
55505
56190
  onControlTypeChange: setControlType,
@@ -58861,6 +59546,164 @@ function select_Select(props) {
58861
59546
  var SelectComp = src_select_select_0;
58862
59547
  SelectComp.displayName = 'ShineoutSelect';
58863
59548
  /* harmony default export */ var src_select_0 = (SelectComp);
59549
+ ;// CONCATENATED MODULE: ../base/src/skeleton/text.tsx
59550
+
59551
+
59552
+
59553
+ function Text(_ref) {
59554
+ var classes = _ref.classes,
59555
+ className = _ref.className,
59556
+ _ref$rows = _ref.rows,
59557
+ rows = _ref$rows === void 0 ? 3 : _ref$rows,
59558
+ width = _ref.width,
59559
+ height = _ref.height,
59560
+ style = _ref.style;
59561
+ var cls = classnames_default()(classes.text, className);
59562
+ var nodes = [];
59563
+ function getTextWidth(index) {
59564
+ if (isArray(width)) {
59565
+ return width[index];
59566
+ }
59567
+ if (rows - 1 === index) {
59568
+ return width;
59569
+ }
59570
+ return undefined;
59571
+ }
59572
+ function getTextHeight(index) {
59573
+ if (isArray(height)) {
59574
+ return height[index];
59575
+ }
59576
+ if (rows - 1 === index) {
59577
+ return height;
59578
+ }
59579
+ return undefined;
59580
+ }
59581
+ for (var i = 0; i < rows; i++) {
59582
+ nodes.push( /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
59583
+ className: classes.textItem,
59584
+ style: {
59585
+ width: getTextWidth(i),
59586
+ height: getTextHeight(i)
59587
+ }
59588
+ }, i));
59589
+ }
59590
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("ul", {
59591
+ className: cls,
59592
+ style: style,
59593
+ children: nodes
59594
+ });
59595
+ }
59596
+ ;// CONCATENATED MODULE: ../base/src/skeleton/image.tsx
59597
+
59598
+
59599
+
59600
+ function skeleton_image_Image(_ref) {
59601
+ var classes = _ref.classes,
59602
+ className = _ref.className,
59603
+ size = _ref.size,
59604
+ position = _ref.position,
59605
+ _ref$shape = _ref.shape,
59606
+ shape = _ref$shape === void 0 ? 'circle' : _ref$shape,
59607
+ style = _ref.style;
59608
+ var cls = classnames_default()(classes.image, defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, classes.imageLeft, position !== 'right'), classes.imageRight, position === 'right'), classes.imageCircle, shape === 'circle'), classes.imageSquare, shape === 'square'), classes.imageSmall, size === 'small'), classes.imageLarge, size === 'large'), className);
59609
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
59610
+ className: cls,
59611
+ style: style
59612
+ });
59613
+ }
59614
+ ;// CONCATENATED MODULE: ../base/src/skeleton/button.tsx
59615
+
59616
+
59617
+
59618
+ function skeleton_button_Button(_ref) {
59619
+ var classes = _ref.classes,
59620
+ className = _ref.className,
59621
+ size = _ref.size,
59622
+ position = _ref.position,
59623
+ _ref$count = _ref.count,
59624
+ count = _ref$count === void 0 ? 1 : _ref$count,
59625
+ style = _ref.style;
59626
+ var cls = classnames_default()(classes.button, defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, classes.buttonLeft, position !== 'right'), classes.buttonRight, position === 'right'), classes.buttonSmall, size === 'small'), classes.buttonLarge, size === 'large'), className);
59627
+ var buttons = [];
59628
+ for (var i = 0; i < count; i++) {
59629
+ buttons.push( /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
59630
+ className: classes.buttonItem
59631
+ }, i));
59632
+ }
59633
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
59634
+ className: cls,
59635
+ style: style,
59636
+ children: buttons
59637
+ });
59638
+ }
59639
+ ;// CONCATENATED MODULE: ../base/src/skeleton/skeleton.tsx
59640
+
59641
+
59642
+
59643
+
59644
+
59645
+
59646
+
59647
+
59648
+
59649
+ function getComponentProps(prop) {
59650
+ return is_isObject(prop) ? prop : {};
59651
+ }
59652
+ var Skeleton = function Skeleton(props) {
59653
+ var _jssStyle$skeleton;
59654
+ var animation = props.animation,
59655
+ image = props.image,
59656
+ button = props.button,
59657
+ _props$text = props.text,
59658
+ text = _props$text === void 0 ? true : _props$text,
59659
+ children = props.children,
59660
+ loading = props.loading,
59661
+ jssStyle = props.jssStyle;
59662
+ var classes = jssStyle === null || jssStyle === void 0 || (_jssStyle$skeleton = jssStyle.skeleton) === null || _jssStyle$skeleton === void 0 ? void 0 : _jssStyle$skeleton.call(jssStyle);
59663
+ var rootClass = classnames_default()(classes.rootClass, classes.wrapper, props.className, defineProperty_default()({}, classes.animation, animation));
59664
+ var imageProps = getComponentProps(image);
59665
+ var textProps = getComponentProps(text);
59666
+ var buttonProps = getComponentProps(button);
59667
+ if (loading) {
59668
+ return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
59669
+ className: rootClass,
59670
+ style: props.style,
59671
+ children: [image && imageProps.position !== 'right' && /*#__PURE__*/(0,jsx_runtime.jsx)(skeleton_image_Image, objectSpread2_default()({
59672
+ classes: classes
59673
+ }, imageProps)), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
59674
+ className: classes.content,
59675
+ children: [text && /*#__PURE__*/(0,jsx_runtime.jsx)(Text, objectSpread2_default()({
59676
+ classes: classes
59677
+ }, textProps)), button && /*#__PURE__*/(0,jsx_runtime.jsx)(skeleton_button_Button, objectSpread2_default()({
59678
+ classes: classes
59679
+ }, buttonProps))]
59680
+ }), image && imageProps.position === 'right' && /*#__PURE__*/(0,jsx_runtime.jsx)(skeleton_image_Image, objectSpread2_default()({
59681
+ classes: classes
59682
+ }, imageProps))]
59683
+ });
59684
+ }
59685
+ return children;
59686
+ };
59687
+ /* harmony default export */ var src_skeleton_skeleton = (Skeleton);
59688
+ ;// CONCATENATED MODULE: ./src/skeleton/skeleton.tsx
59689
+
59690
+
59691
+
59692
+
59693
+
59694
+ var skeleton_jssStyle = {
59695
+ skeleton: useSkeletonStyle
59696
+ };
59697
+ /* harmony default export */ var src_skeleton_skeleton_0 = (function (props) {
59698
+ return /*#__PURE__*/(0,jsx_runtime.jsx)(src_skeleton_skeleton, objectSpread2_default()({
59699
+ jssStyle: skeleton_jssStyle
59700
+ }, props));
59701
+ });
59702
+ ;// CONCATENATED MODULE: ./src/skeleton/index.ts
59703
+
59704
+ var SkeletonComp = src_skeleton_skeleton_0;
59705
+ SkeletonComp.displayName = 'ShineoutSkeleton';
59706
+ /* harmony default export */ var src_skeleton_0 = (SkeletonComp);
58864
59707
  ;// CONCATENATED MODULE: ../hooks/src/components/use-slider/use-slider.ts
58865
59708
 
58866
59709
 
@@ -59964,6 +60807,12 @@ var Sticky = function Sticky(props) {
59964
60807
  }
59965
60808
  return cancelParentObserver;
59966
60809
  }, [props.parent, css, context.target, top, bottom]);
60810
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
60811
+ if (props.onChange) {
60812
+ props.onChange(show);
60813
+ }
60814
+ ;
60815
+ }, [show]);
59967
60816
 
59968
60817
  // 纯css方法 直接使用css
59969
60818
  // js方法
@@ -59999,12 +60848,15 @@ var Sticky = function Sticky(props) {
59999
60848
  pointerEvents: 'none'
60000
60849
  };
60001
60850
  return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
60002
- children: [isFixed ? StickyEl : context.target && context.div && /*#__PURE__*/(0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.createPortal)(StickyEl, context.div), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
60851
+ children: [isFixed ? StickyEl : context.target && context.div && /*#__PURE__*/(0,external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_.createPortal)(StickyEl, context.div), /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({
60003
60852
  className: props.className,
60004
60853
  style: objectSpread2_default()(objectSpread2_default()({}, props.style), show && parentVisible ? hideStyle : {}),
60005
- ref: handleElementRef,
60854
+ ref: handleElementRef
60855
+ }, getDataAttribute({
60856
+ sticky: show && parentVisible ? 'true' : 'false'
60857
+ })), {}, {
60006
60858
  children: children
60007
- })]
60859
+ }))]
60008
60860
  });
60009
60861
  };
60010
60862
  /* harmony default export */ var src_sticky_sticky = (Sticky);
@@ -60134,6 +60986,177 @@ var BaseSwitch = function BaseSwitch(props) {
60134
60986
  var SwitchComp = src_switch_switch_0;
60135
60987
  SwitchComp.displayName = 'ShineoutSwitch';
60136
60988
  /* harmony default export */ var src_switch_0 = (SwitchComp);
60989
+ ;// CONCATENATED MODULE: ../base/src/virtual-scroll/scroll-table.tsx
60990
+
60991
+
60992
+
60993
+
60994
+
60995
+
60996
+ var extractHeightValue = function extractHeightValue(num) {
60997
+ if (isNumber(num)) return num;
60998
+ var match = num.match(/(\d+)/);
60999
+ if (match) {
61000
+ return parseInt(match[0], 10);
61001
+ }
61002
+ return undefined;
61003
+ };
61004
+ var scroll_table_Scroll = function Scroll(props) {
61005
+ var containerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
61006
+ var scrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
61007
+ var wrapperRef = useForkRef(scrollRef, props.wrapperRef);
61008
+ var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
61009
+ isMouseDown: false,
61010
+ lastTableHeight: 0
61011
+ }),
61012
+ context = _useRef.current;
61013
+ var _props$scrollHeight = props.scrollHeight,
61014
+ scrollHeight = _props$scrollHeight === void 0 ? 0 : _props$scrollHeight,
61015
+ _props$scrollWidth = props.scrollWidth,
61016
+ scrollWidth = _props$scrollWidth === void 0 ? 0 : _props$scrollWidth,
61017
+ _props$defaultHeight = props.defaultHeight,
61018
+ defaultHeight = _props$defaultHeight === void 0 ? 0 : _props$defaultHeight;
61019
+ var _useResize = useResize({
61020
+ targetRef: containerRef,
61021
+ timer: 100
61022
+ }),
61023
+ width = _useResize.width,
61024
+ h = _useResize.height;
61025
+ var height = h || defaultHeight;
61026
+ var config = useConfig();
61027
+ var isRtl = config.direction === 'rtl';
61028
+ var scrollerStyle = {
61029
+ flex: 1,
61030
+ minWidth: 0,
61031
+ minHeight: 0,
61032
+ overflow: 'auto',
61033
+ width: '100%'
61034
+ };
61035
+ var containerStyle = {
61036
+ height: '100%',
61037
+ width: '100%',
61038
+ display: 'flex',
61039
+ position: 'sticky',
61040
+ flexDirection: 'column',
61041
+ overflow: props.isScrollX ? 'initial' : 'hidden',
61042
+ top: 0
61043
+ };
61044
+ var paddingTop = Math.max(0, Math.floor(scrollHeight - height));
61045
+ if (props.isEmpty) {
61046
+ paddingTop = 0;
61047
+ Object.assign(scrollerStyle, {
61048
+ display: 'flex',
61049
+ flexDirection: 'column'
61050
+ });
61051
+ }
61052
+ var placeStyle = {
61053
+ paddingTop: paddingTop,
61054
+ width: scrollWidth,
61055
+ overflow: props.isScrollY ? 'hidden' : 'auto hidden',
61056
+ height: props.isScrollY ? 0 : 1,
61057
+ marginTop: props.isScrollY ? 0 : -1,
61058
+ lineHeight: 0
61059
+ };
61060
+ var handleScroll = usePersistFn(function (e) {
61061
+ var onScrollToBottom = props.onScrollToBottom;
61062
+ var target = e.currentTarget;
61063
+ var scrollLeft = target.scrollLeft,
61064
+ scrollTop = target.scrollTop;
61065
+ if (props.height && onScrollToBottom) {
61066
+ var realHeight = extractHeightValue(props.height);
61067
+ if (realHeight !== undefined) {
61068
+ var touchBottom = target.scrollHeight === scrollTop + realHeight;
61069
+ if (touchBottom) onScrollToBottom();
61070
+ }
61071
+ }
61072
+ var maxY = target.scrollHeight - target.clientHeight;
61073
+ var maxX = target.scrollWidth - target.clientWidth;
61074
+ if (!isRtl) {
61075
+ // 解决浏览器缩放以后导致滚动条长度出现小数
61076
+ if (maxX - scrollLeft < 0 || maxX - scrollLeft < 1) scrollLeft = maxX;
61077
+ if (scrollLeft < 0) scrollLeft = 0;
61078
+ } else {
61079
+ if (maxX + scrollLeft < 0 || maxX + scrollLeft < 1) scrollLeft = 0 - maxX;
61080
+ if (scrollLeft > 0) scrollLeft = 0;
61081
+ }
61082
+ if (scrollTop > maxY || maxY - scrollTop < 1) scrollTop = maxY;
61083
+ if (scrollTop < 0) scrollTop = 0;
61084
+ var x = maxX === 0 ? 0 : Math.min(Math.abs(scrollLeft) / maxX, 1);
61085
+ var y = maxY === 0 ? 0 : Math.min(scrollTop / maxY, 1);
61086
+ if (props.onScroll) props.onScroll({
61087
+ scrollLeft: scrollLeft,
61088
+ scrollTop: scrollTop,
61089
+ x: x,
61090
+ y: y,
61091
+ height: height,
61092
+ width: width,
61093
+ fromDrag: context.isMouseDown
61094
+ });
61095
+ });
61096
+ var handleInnerScroll = usePersistFn(function (e) {
61097
+ var scrollTop = e.currentTarget.scrollTop;
61098
+ if (scrollRef.current) {
61099
+ e.currentTarget.scrollTop = 0;
61100
+ scrollRef.current.scrollTop += scrollTop;
61101
+ }
61102
+ });
61103
+ var scrollRoleProps = objectSpread2_default()(objectSpread2_default()({}, getDataAttribute({
61104
+ role: 'scroll'
61105
+ })), {}, {
61106
+ style: scrollerStyle,
61107
+ onScroll: handleScroll,
61108
+ ref: wrapperRef,
61109
+ onMouseDown: function onMouseDown() {
61110
+ context.isMouseDown = true;
61111
+ },
61112
+ onMouseUp: function onMouseUp() {
61113
+ context.isMouseDown = false;
61114
+ }
61115
+ });
61116
+
61117
+ // 非定高的Table但依旧采用了virtual渲染方式,需要渲染出全部的data
61118
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
61119
+ if (!props.tableRef.current) return;
61120
+ var rootTableHeight = props.tableRef.current.clientHeight;
61121
+ var container = containerRef.current;
61122
+ // 判断内容滚动高度是否真的超过了容器高度
61123
+ var isRealScroll = (container === null || container === void 0 ? void 0 : container.scrollHeight) !== undefined && container.scrollHeight > rootTableHeight;
61124
+ // 判断Table的根节点dom高度是否发生变化,如果变化了,则是因为不定高,被内部元素撑高了导致的
61125
+ if (paddingTop > 0 && context.lastTableHeight > 0 && context.lastTableHeight !== rootTableHeight && !isRealScroll) {
61126
+ props.setFakeVirtual(true);
61127
+ context.lastTableHeight = 0;
61128
+ } else {
61129
+ context.lastTableHeight = rootTableHeight;
61130
+ }
61131
+ }, [paddingTop]);
61132
+ if (props.isEmpty) {
61133
+ return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, scrollRoleProps), {}, {
61134
+ children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
61135
+ style: {
61136
+ width: scrollWidth
61137
+ }
61138
+ }), props.children]
61139
+ }));
61140
+ }
61141
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
61142
+ className: props.className,
61143
+ style: props.style,
61144
+ children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({}, scrollRoleProps), {}, {
61145
+ children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({}, getDataAttribute({
61146
+ role: 'scroll-container'
61147
+ })), {}, {
61148
+ style: containerStyle,
61149
+ ref: containerRef,
61150
+ onScroll: handleInnerScroll,
61151
+ children: props.children
61152
+ })), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
61153
+ style: placeStyle,
61154
+ children: "\xA0"
61155
+ })]
61156
+ }))
61157
+ });
61158
+ };
61159
+ /* harmony default export */ var scroll_table = (scroll_table_Scroll);
60137
61160
  ;// CONCATENATED MODULE: ../hooks/src/common/use-scrollbar-width/index.ts
60138
61161
 
60139
61162
 
@@ -60264,6 +61287,34 @@ var useColumns = function useColumns(props) {
60264
61287
 
60265
61288
 
60266
61289
 
61290
+ function getDecimalAndIntegerPart(num) {
61291
+ if (!num) return [0, 0];
61292
+ var str = num.toString();
61293
+ var dotIndex = str.indexOf('.');
61294
+ if (dotIndex === -1) return [parseInt(str), 0];
61295
+ var integerPart = parseInt(str.slice(0, dotIndex));
61296
+ var decimalPart = parseFloat("0.".concat(str.slice(dotIndex + 1)));
61297
+ return [integerPart, decimalPart];
61298
+ }
61299
+
61300
+ // 将所有的小数部分转移到最后一列
61301
+ function shiftDecimalToLastColumn(cols) {
61302
+ var decimalSum = 0;
61303
+ cols.forEach(function (v, i) {
61304
+ var _getDecimalAndInteger = getDecimalAndIntegerPart(v),
61305
+ _getDecimalAndInteger2 = slicedToArray_default()(_getDecimalAndInteger, 2),
61306
+ inter = _getDecimalAndInteger2[0],
61307
+ decimal = _getDecimalAndInteger2[1];
61308
+ if (decimal > 0) {
61309
+ decimalSum += decimal;
61310
+ cols[i] = inter;
61311
+ }
61312
+ });
61313
+ if (decimalSum > 0) {
61314
+ cols[cols.length - 1] = Number(cols[cols.length - 1]) + decimalSum;
61315
+ }
61316
+ return cols;
61317
+ }
60267
61318
  var MIN_RESIZABLE_WIDTH = 20;
60268
61319
  function compareColumnWidth(curCols, preCols) {
60269
61320
  if (curCols.length !== preCols.length) return false;
@@ -60385,7 +61436,7 @@ var useTableLayout = function useTableLayout(props) {
60385
61436
  if (cols && cols.every(function (v) {
60386
61437
  return v === 0;
60387
61438
  })) return;
60388
- setColgroup(cols);
61439
+ setColgroup(shiftDecimalToLastColumn(cols));
60389
61440
  setAdjust(adjust);
60390
61441
  if (!adjust) {
60391
61442
  updateResizeFlag();
@@ -60602,7 +61653,6 @@ var useTableLayout = function useTableLayout(props) {
60602
61653
  width: tableWidth,
60603
61654
  shouldLastColAuto: props.columnResizable && !adjust,
60604
61655
  scrollWidth: scrollWidth,
60605
- // maxScrollLeft: scrollWidth - context.clientWidth,
60606
61656
  resizeFlag: resizeFlag
60607
61657
  };
60608
61658
  };
@@ -60957,20 +62007,13 @@ var useTableVirtual = function useTableVirtual(props) {
60957
62007
  autoAddRows: 0
60958
62008
  }),
60959
62009
  context = _useRef.current;
60960
- var getTranslate = usePersistFn(function (left, top) {
60961
- var t = top === undefined ? innerTop + offsetY : top;
60962
- if (t < 0) {
60963
- t = 0;
60964
- }
60965
- return "translate3d(0, ".concat(0 - t, "px, 0)");
60966
- });
60967
62010
  var getContentHeight = function getContentHeight(index) {
60968
62011
  if (props.disabled) return 0;
60969
62012
  var sum = 0;
60970
62013
  for (var i = 0; i <= index; i++) {
60971
62014
  sum += context.cachedHeight[i] || props.rowHeight;
60972
62015
  }
60973
- return sum;
62016
+ return sum + props.theadAndTfootHeight;
60974
62017
  };
60975
62018
  var setRowHeight = usePersistFn(function (index, height) {
60976
62019
  if (props.disabled) return;
@@ -61063,7 +62106,7 @@ var useTableVirtual = function useTableVirtual(props) {
61063
62106
  };
61064
62107
  setHeight(sumHeight);
61065
62108
  });
61066
- var handleScroll = function handleScroll(info) {
62109
+ var handleScroll = usePersistFn(function (info) {
61067
62110
  var height = info.height,
61068
62111
  y = info.y,
61069
62112
  fromDrag = info.fromDrag;
@@ -61097,7 +62140,7 @@ var useTableVirtual = function useTableVirtual(props) {
61097
62140
  } else {
61098
62141
  updateIndexAndTopFromTop(scrollTop);
61099
62142
  }
61100
- };
62143
+ });
61101
62144
  var scrollToIndex = usePersistFn(function (index, callback) {
61102
62145
  if (props.disabled) return;
61103
62146
  if (props.scrollRef.current) {
@@ -61190,7 +62233,7 @@ var useTableVirtual = function useTableVirtual(props) {
61190
62233
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
61191
62234
  if (props.disabled) return;
61192
62235
  setHeight(getContentHeight(props.data.length - 1));
61193
- }, [props.data.length]);
62236
+ }, [props.data.length, props.theadAndTfootHeight]);
61194
62237
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
61195
62238
  if (props.disabled) return;
61196
62239
  if (context.heightCallback) {
@@ -61202,15 +62245,24 @@ var useTableVirtual = function useTableVirtual(props) {
61202
62245
  }
61203
62246
  }, [scrollHeight]);
61204
62247
  var finalRowsInView = rowsInView + context.rowSpanRows + context.autoAddRows;
61205
- var renderData = props.disabled ? props.data : toConsumableArray_default()(props.data).slice(startIndex, startIndex + finalRowsInView);
62248
+ var renderData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
62249
+ if (props.disabled) return props.data;
62250
+ return toConsumableArray_default()(props.data).slice(startIndex, startIndex + finalRowsInView);
62251
+ }, [props.data, props.disabled, startIndex, finalRowsInView]);
62252
+ var translateStyle = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
62253
+ var t = innerTop + offsetY;
62254
+ if (t < 0) {
62255
+ t = 0;
62256
+ }
62257
+ return "translate3d(0, ".concat(0 - t, "px, 0)");
62258
+ }, [innerTop]);
61206
62259
  return {
61207
62260
  scrollHeight: scrollHeight,
61208
62261
  startIndex: startIndex,
61209
- innerTop: innerTop + offsetY,
62262
+ translateStyle: translateStyle,
61210
62263
  data: renderData,
61211
62264
  handleScroll: handleScroll,
61212
62265
  setRowHeight: setRowHeight,
61213
- getTranslate: getTranslate,
61214
62266
  scrollToIndex: scrollToIndex,
61215
62267
  scrollColumnByLeft: scrollColumnByLeft,
61216
62268
  scrollColumnIntoView: scrollColumnIntoView
@@ -61520,6 +62572,7 @@ var useTableGroup = function useTableGroup(props) {
61520
62572
  last.colSpan += colSpan;
61521
62573
  if (col.fixed) last.fixed = col.fixed;
61522
62574
  if (col.lastFixed) last.lastFixed = true;
62575
+ if (col.groupProps) last.groupProps = col.groupProps;
61523
62576
  } else {
61524
62577
  var sub = [];
61525
62578
  colSpan = setColumns(sub, col, level + 1, index);
@@ -61532,7 +62585,8 @@ var useTableGroup = function useTableGroup(props) {
61532
62585
  fixed: col.fixed,
61533
62586
  firstFixed: col.firstFixed,
61534
62587
  index: index,
61535
- columns: sub
62588
+ columns: sub,
62589
+ groupProps: col.groupProps
61536
62590
  };
61537
62591
  columns.push(groupCol);
61538
62592
  }
@@ -61964,13 +63018,17 @@ var thead_toNum = toNum;
61964
63018
  });
61965
63019
  };
61966
63020
  var getFixedStyle = function getFixedStyle(fixed, index, colSpan, level) {
63021
+ // 累加level 至 0 的所有高度
63022
+ var top = context.trHeights.slice(0, level).reduce(function (a, b) {
63023
+ return thead_toNum(a) + thead_toNum(b);
63024
+ }, 0);
61967
63025
  if (fixed === 'left') {
61968
63026
  var left = colgroup.slice(0, index).reduce(function (a, b) {
61969
63027
  return thead_toNum(a) + thead_toNum(b);
61970
63028
  }, 0);
61971
63029
  return {
61972
63030
  left: left,
61973
- top: context.trHeights[level - 1] || 0,
63031
+ top: top,
61974
63032
  position: 'sticky'
61975
63033
  };
61976
63034
  }
@@ -61980,16 +63038,17 @@ var thead_toNum = toNum;
61980
63038
  }, 0);
61981
63039
  return {
61982
63040
  right: right,
61983
- top: context.trHeights[level - 1] || 0,
63041
+ top: top,
61984
63042
  position: 'sticky'
61985
63043
  };
61986
63044
  }
61987
63045
  return {
61988
- top: context.trHeights[level - 1] || 0,
63046
+ top: top,
61989
63047
  position: 'sticky'
61990
63048
  };
61991
63049
  };
61992
63050
  var createTh = function createTh(trs, col, level, isLast, columnIndex) {
63051
+ var _colTemp2$groupProps, _colTemp2$groupProps2;
61993
63052
  var colTemp = col;
61994
63053
  var colTemp2 = col;
61995
63054
  var fixedStyle = getFixedStyle(col.fixed, col.index, colTemp2.colSpan || 1, level);
@@ -62044,8 +63103,11 @@ var thead_toNum = toNum;
62044
63103
  var style = typeof colTemp2.name === 'string' ? fixedStyle : objectSpread2_default()({
62045
63104
  padding: 0
62046
63105
  }, fixedStyle);
63106
+ if (colTemp2 !== null && colTemp2 !== void 0 && (_colTemp2$groupProps = colTemp2.groupProps) !== null && _colTemp2$groupProps !== void 0 && _colTemp2$groupProps.style) {
63107
+ style = objectSpread2_default()(objectSpread2_default()({}, style), colTemp2.groupProps.style);
63108
+ }
62047
63109
  trs[level].push( /*#__PURE__*/(0,jsx_runtime.jsx)("th", {
62048
- className: classnames_default()(cellClassName, tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellGroup),
63110
+ className: classnames_default()(cellClassName, tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellGroup, colTemp2 === null || colTemp2 === void 0 || (_colTemp2$groupProps2 = colTemp2.groupProps) === null || _colTemp2$groupProps2 === void 0 ? void 0 : _colTemp2$groupProps2.className),
62049
63111
  style: style,
62050
63112
  colSpan: colTemp2.colSpan,
62051
63113
  dir: config.direction,
@@ -62202,16 +63264,6 @@ var useTableRow = function useTableRow(props) {
62202
63264
  }
62203
63265
  setHoverIndex(hoverIndex);
62204
63266
  });
62205
- var isCellHover = usePersistFn(function (rowIndex) {
62206
- var colSpan = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
62207
- if (!props.hover) return false;
62208
- var isHover = false;
62209
- for (var i = 0; i < colSpan; i++) {
62210
- isHover = hoverIndex.has(rowIndex + i);
62211
- if (isHover) break;
62212
- }
62213
- return isHover;
62214
- });
62215
63267
  var rowData = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
62216
63268
  var rows = [];
62217
63269
  context.rowSelectMergeStartData = [];
@@ -62245,15 +63297,14 @@ var useTableRow = function useTableRow(props) {
62245
63297
  return {
62246
63298
  rowData: rowData,
62247
63299
  handleCellHover: handleCellHover,
62248
- isCellHover: isCellHover,
62249
63300
  hoverIndex: hoverIndex,
62250
63301
  rowSelectMergeStartData: context.rowSelectMergeStartData
62251
63302
  };
62252
63303
  };
62253
63304
  /* harmony default export */ var use_table_row = (useTableRow);
62254
- ;// CONCATENATED MODULE: ../hooks/src/common/use-memo/use-memo.ts
63305
+ ;// CONCATENATED MODULE: ../hooks/src/common/use-component-memo/use-memo.ts
62255
63306
 
62256
- function useMemo(getValue, condition, shouldUpdate) {
63307
+ function useComponentMemo(getValue, condition, shouldUpdate) {
62257
63308
  var cacheRef = external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef({});
62258
63309
  if (!shouldUpdate) return getValue();
62259
63310
  if (!('value' in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {
@@ -62267,22 +63318,30 @@ function useMemo(getValue, condition, shouldUpdate) {
62267
63318
 
62268
63319
 
62269
63320
 
62270
-
62271
63321
  function Td(props) {
63322
+ var _React$useState = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(),
63323
+ _React$useState2 = slicedToArray_default()(_React$useState, 2),
63324
+ style = _React$useState2[0],
63325
+ setStyle = _React$useState2[1];
63326
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
63327
+ if (!props.style) return;
63328
+ if (shallowEqual(props.style, style)) {
63329
+ return;
63330
+ }
63331
+ setStyle(props.style);
63332
+ }, [props.style]);
62272
63333
  var col = props.col,
62273
63334
  colSpan = props.colSpan,
62274
63335
  rowSpan = props.rowSpan,
62275
63336
  className = props.className,
62276
- style = props.style,
62277
63337
  direction = props.direction,
62278
63338
  role = props.role,
63339
+ data = props.data,
62279
63340
  onClick = props.onClick,
62280
63341
  onMouseEnter = props.onMouseEnter,
62281
63342
  onMouseLeave = props.onMouseLeave,
62282
63343
  renderContent = props.renderContent;
62283
- var externalDependencies = typeof_default()(props.shouldUpdate) === 'object' && props.shouldUpdate.dependencies ? props.shouldUpdate.dependencies : [];
62284
- var updateFn = typeof_default()(props.shouldUpdate) === 'object' && 'update' in props.shouldUpdate ? props.shouldUpdate.update : props.shouldUpdate;
62285
- var $td = useMemo(function () {
63344
+ var $td = useComponentMemo(function () {
62286
63345
  var content = renderContent(props.col, props.data);
62287
63346
  return /*#__PURE__*/(0,jsx_runtime.jsx)("td", {
62288
63347
  colSpan: colSpan,
@@ -62296,17 +63355,13 @@ function Td(props) {
62296
63355
  onClick: onClick,
62297
63356
  children: content
62298
63357
  }, col.key);
62299
- }, [].concat(toConsumableArray_default()(externalDependencies), [className, style, col.type, col.treeColumnsName
62300
- // onClick,
62301
- // onMouseEnter,
62302
- // onMouseLeave,
62303
- ]), updateFn ? function (prev, next) {
63358
+ }, [data, className, style, col.type, col.treeColumnsName], props.virtual === 'lazy' ? function (prev, next) {
62304
63359
  if (col.type || col.treeColumnsName) {
62305
63360
  return true;
62306
63361
  }
62307
63362
  return prev.some(function (_, index) {
62308
- return !shallowEqual(prev[index], next[index]);
62309
- });
63363
+ return !shallowEqual(prev === null || prev === void 0 ? void 0 : prev[index], next === null || next === void 0 ? void 0 : next[index]);
63364
+ }) || !props.scrolling;
62310
63365
  } : undefined);
62311
63366
  return $td;
62312
63367
  }
@@ -62359,13 +63414,14 @@ var Tr = function Tr(props) {
62359
63414
  right: right
62360
63415
  };
62361
63416
  }
62362
- return {};
63417
+ return undefined;
62363
63418
  };
62364
- var getTdStyle = function getTdStyle(column, colSpan) {
63419
+ var getTdStyle = usePersistFn(function (column, colSpan) {
62365
63420
  var index = column.index;
62366
63421
  var fixedStyle = getFixedStyle(column.fixed, index, colSpan);
63422
+ if (!fixedStyle && !column.style) return;
62367
63423
  return objectSpread2_default()(objectSpread2_default()({}, column.style), fixedStyle);
62368
- };
63424
+ });
62369
63425
  var handleCellClick = usePersistFn(function (data, colIndex) {
62370
63426
  if (!props.onCellClick) return;
62371
63427
  props.onCellClick(data, {
@@ -62376,6 +63432,8 @@ var Tr = function Tr(props) {
62376
63432
  });
62377
63433
  var setVirtualRowHeight = usePersistFn(function () {
62378
63434
  if (props.setRowHeight && trRef.current) {
63435
+ // 祖先元素不可见时(display: none)
63436
+ if (!trRef.current.offsetParent) return;
62379
63437
  var expandHeight = expandRef.current ? expandRef.current.getBoundingClientRect().height : 0;
62380
63438
  props.setRowHeight(props.rowIndex, trRef.current.getBoundingClientRect().height + expandHeight);
62381
63439
  }
@@ -62428,7 +63486,7 @@ var Tr = function Tr(props) {
62428
63486
  return _ref.apply(this, arguments);
62429
63487
  };
62430
63488
  }());
62431
- var renderTreeExpand = function renderTreeExpand(content) {
63489
+ var renderTreeExpand = usePersistFn(function (content) {
62432
63490
  var treeIndent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 22;
62433
63491
  var level = props.treeExpandLevel.get(props.originKey) || 0;
62434
63492
  var className = tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.expandWrapper;
@@ -62481,8 +63539,8 @@ var Tr = function Tr(props) {
62481
63539
  },
62482
63540
  children: [$expandIconWrapper, content]
62483
63541
  });
62484
- };
62485
- var renderContent = function renderContent(col, data) {
63542
+ });
63543
+ var renderContent = usePersistFn(function (col, data) {
62486
63544
  if (col.type === 'expand' || col.type === 'row-expand') {
62487
63545
  var renderResult = typeof col.render === 'function' ? col.render(props.rawData, props.rowIndex) : undefined;
62488
63546
  if (typeof renderResult !== 'function') return null;
@@ -62547,9 +63605,10 @@ var Tr = function Tr(props) {
62547
63605
  if (col.treeColumnsName) {
62548
63606
  return renderTreeExpand(content, col.treeIndent);
62549
63607
  }
63608
+ if (col.render === undefined) return null;
62550
63609
  return content;
62551
- };
62552
- var renderTds = function renderTds(cols, data) {
63610
+ });
63611
+ var renderTds = usePersistFn(function (cols, data) {
62553
63612
  var tds = [];
62554
63613
  var skip = 0;
62555
63614
  var lastRowIndex = data.length - 1;
@@ -62565,27 +63624,38 @@ var Tr = function Tr(props) {
62565
63624
  if (data[i]) {
62566
63625
  var last = cols[i + (data[i].colSpan || 1) - 1] || {};
62567
63626
  var isRowSpanTd = data[i].rowSpan > 1;
63627
+ var shouldBindMouseEvent = props.hover && hasSiblingRowSpan || isRowSpanTd;
63628
+ var showCellHover = props.hoverIndex.has(props.rowIndex);
63629
+ if (!showCellHover && data[i].rowSpan > 1) {
63630
+ for (var j = 0; j < data[i].rowSpan; j++) {
63631
+ if (props.hoverIndex.has(props.rowIndex + j)) {
63632
+ showCellHover = true;
63633
+ break;
63634
+ }
63635
+ }
63636
+ }
62568
63637
  var td = /*#__PURE__*/(0,jsx_runtime.jsx)(Td, {
62569
63638
  col: col,
62570
63639
  data: data[i].data,
62571
63640
  colSpan: data[i].colSpan,
62572
63641
  rowSpan: data[i].rowSpan,
62573
- onMouseEnter: props.hover && hasSiblingRowSpan || isRowSpanTd ? function () {
62574
- props.handleCellHover(props.rowIndex, data[i].rowSpan);
63642
+ onMouseEnter: shouldBindMouseEvent ? function () {
63643
+ return props.handleCellHover(props.rowIndex, data[i].rowSpan);
62575
63644
  } : undefined,
62576
- onMouseLeave: props.hover && hasSiblingRowSpan || isRowSpanTd ? function () {
62577
- props.handleCellHover(-1, 0);
63645
+ onMouseLeave: shouldBindMouseEvent ? function () {
63646
+ return props.handleCellHover(-1, 0);
62578
63647
  } : undefined,
62579
- className: classnames_default()(col.className, col.type === 'checkbox' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellCheckbox), col.fixed === 'left' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedLeft), col.fixed === 'right' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedRight), col.align === 'center' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellAlignCenter), col.align === 'right' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellAlignRight), (col.lastFixed || col.firstFixed || last.lastFixed) && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedLast), lastRowIndex === i && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellIgnoreBorder), props.hoverIndex.has(props.rowIndex) && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellHover), isRowSpanTd && props.isCellHover(props.rowIndex, data[i].rowSpan) && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellHover)),
63648
+ className: classnames_default()(col.className, col.type === 'checkbox' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellCheckbox), col.fixed === 'left' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedLeft), col.fixed === 'right' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedRight), col.align === 'center' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellAlignCenter), col.align === 'right' && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellAlignRight), (col.lastFixed || col.firstFixed || last.lastFixed) && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellFixedLast), lastRowIndex === i && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellIgnoreBorder), showCellHover && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellHover)),
62580
63649
  style: getTdStyle(col, data[i].colSpan),
62581
63650
  direction: config.direction,
62582
63651
  "data-role": col.type === 'checkbox' ? 'checkbox' : undefined,
62583
63652
  onClick: props.onCellClick ? function () {
62584
63653
  return handleCellClick(data[i].data, i);
62585
63654
  } : undefined,
62586
- shouldUpdate: col.shouldUpdate,
62587
- renderContent: renderContent
62588
- });
63655
+ renderContent: renderContent,
63656
+ virtual: props.virtual,
63657
+ scrolling: props.scrolling
63658
+ }, "".concat(col.key, "-").concat(props.rowIndex, "-").concat(i));
62589
63659
  tds.push(td);
62590
63660
  if (data[i].colSpan) skip = data[i].colSpan - 1;
62591
63661
  }
@@ -62594,7 +63664,7 @@ var Tr = function Tr(props) {
62594
63664
  if (_loop(i)) continue;
62595
63665
  }
62596
63666
  return tds;
62597
- };
63667
+ });
62598
63668
  var renderExpand = function renderExpand() {
62599
63669
  if (!props.expanded) return null;
62600
63670
  var expandCol = props.expandCol;
@@ -62703,7 +63773,6 @@ var Tr = function Tr(props) {
62703
63773
  hover: hover
62704
63774
  }),
62705
63775
  rowData = _useTableRow.rowData,
62706
- isCellHover = _useTableRow.isCellHover,
62707
63776
  handleCellHover = _useTableRow.handleCellHover,
62708
63777
  hoverIndex = _useTableRow.hoverIndex,
62709
63778
  rowSelectMergeStartData = _useTableRow.rowSelectMergeStartData;
@@ -62711,9 +63780,10 @@ var Tr = function Tr(props) {
62711
63780
  return col.type === 'expand' || col.type === 'row-expand';
62712
63781
  });
62713
63782
  var renderRow = function renderRow(item, index) {
63783
+ var _props$rowEvents;
62714
63784
  var rowIndex = index + currentIndex;
62715
63785
  var originKey = getKey(props.keygen, item, rowIndex);
62716
- var trRenderKey = props.loader ? originKey : "".concat(originKey, "-").concat(rowIndex);
63786
+ var trRenderKey = props.loader || (_props$rowEvents = props.rowEvents) !== null && _props$rowEvents !== void 0 && _props$rowEvents.draggable ? originKey : "".concat(originKey, "-").concat(rowIndex);
62717
63787
  return /*#__PURE__*/(0,jsx_runtime.jsx)(tr, {
62718
63788
  originKey: originKey,
62719
63789
  row: rowData[index],
@@ -62740,7 +63810,6 @@ var Tr = function Tr(props) {
62740
63810
  setRowHeight: props.setRowHeight,
62741
63811
  striped: props.striped,
62742
63812
  radio: props.radio,
62743
- isCellHover: isCellHover,
62744
63813
  hover: hover,
62745
63814
  isSelect: props.datum.check(rowSelectMergeStartData[index]),
62746
63815
  handleCellHover: handleCellHover
@@ -62754,14 +63823,23 @@ var Tr = function Tr(props) {
62754
63823
  bodyScrollWidth: props.bodyScrollWidth,
62755
63824
  resizeFlag: props.resizeFlag,
62756
63825
  treeCheckAll: props.treeCheckAll,
62757
- onCellClick: props.onCellClick
63826
+ onCellClick: props.onCellClick,
63827
+ virtual: props.virtual,
63828
+ scrolling: props.scrolling
62758
63829
  }, trRenderKey);
62759
63830
  };
62760
- return /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
62761
- children: (props.data || []).map(function (item, index) {
62762
- return renderRow(item, index);
62763
- })
62764
- });
63831
+ var $tbody = useComponentMemo(function () {
63832
+ return /*#__PURE__*/(0,jsx_runtime.jsx)("tbody", {
63833
+ children: (props.data || []).map(function (item, index) {
63834
+ return renderRow(item, index);
63835
+ })
63836
+ });
63837
+ }, [props.data, currentIndex], props.virtual === 'lazy' ? function (prev, next) {
63838
+ return prev.some(function (_, index) {
63839
+ return !shallowEqual(prev === null || prev === void 0 ? void 0 : prev[index], next === null || next === void 0 ? void 0 : next[index]);
63840
+ }) || !props.scrolling;
63841
+ } : undefined);
63842
+ return $tbody;
62765
63843
  });
62766
63844
  ;// CONCATENATED MODULE: ../base/src/table/tfoot.tsx
62767
63845
 
@@ -62875,6 +63953,8 @@ function TbodyEmpty(_ref) {
62875
63953
 
62876
63954
 
62877
63955
 
63956
+
63957
+
62878
63958
  var table_excluded = ["data"];
62879
63959
 
62880
63960
 
@@ -62897,24 +63977,11 @@ var table_excluded = ["data"];
62897
63977
 
62898
63978
  var table_devUseWarning = devUseWarning;
62899
63979
  var table_emptyArr = [];
62900
- var virtualScrollerStyle = {
62901
- flex: 1,
62902
- minWidth: 0,
62903
- minHeight: 0,
62904
- overflow: 'auto',
62905
- width: '100%'
62906
- };
62907
- var scrollWrapperStyle = {
62908
- flex: 1,
62909
- minHeight: 0,
62910
- minWidth: 0,
62911
- display: 'flex'
62912
- };
62913
63980
  var emptyRef = {
62914
63981
  current: null
62915
63982
  };
62916
63983
  /* harmony default export */ var src_table_table = (function (props) {
62917
- var _props$jssStyle, _props$jssStyle$table, _props$data, _columns$find;
63984
+ var _props$jssStyle, _props$jssStyle$table, _columns$find;
62918
63985
  var _props$verticalAlign = props.verticalAlign,
62919
63986
  verticalAlign = _props$verticalAlign === void 0 ? 'top' : _props$verticalAlign,
62920
63987
  _props$size = props.size,
@@ -62926,20 +63993,21 @@ var emptyRef = {
62926
63993
  var tableClasses = props === null || props === void 0 || (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 || (_props$jssStyle$table = _props$jssStyle.table) === null || _props$jssStyle$table === void 0 ? void 0 : _props$jssStyle$table.call(_props$jssStyle);
62927
63994
  var tbodyRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
62928
63995
  var theadRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
63996
+ var theadIdRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)("thead-container-".concat(generateUUID()));
62929
63997
  var tfootRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
62930
63998
  var scrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
62931
- var mirrorScrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
63999
+ var headMirrorScrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
64000
+ var bottomMirrorScrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
62932
64001
  var tableRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
64002
+ var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
64003
+ _useState2 = slicedToArray_default()(_useState, 2),
64004
+ scrolling = _useState2[0],
64005
+ setScrolling = _useState2[1];
64006
+ var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
64007
+ _useState4 = slicedToArray_default()(_useState3, 2),
64008
+ fakeVirtual = _useState4[0],
64009
+ setFakeVirtual = _useState4[1];
62933
64010
  var browserScrollbarWidth = useScrollbarWidth();
62934
- var emptyStyle = objectSpread2_default()(objectSpread2_default()({}, virtualScrollerStyle), {}, {
62935
- overflow: 'auto hidden',
62936
- position: 'absolute',
62937
- zIndex: 1,
62938
- bottom: 0,
62939
- left: 0,
62940
- right: 0,
62941
- height: browserScrollbarWidth
62942
- });
62943
64011
  if (props.fixed) {
62944
64012
  table_devUseWarning.deprecated('fixed', 'virtual', 'Table');
62945
64013
  }
@@ -62960,10 +64028,12 @@ var emptyRef = {
62960
64028
  };
62961
64029
  };
62962
64030
  var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
62963
- emptyHeight: 0
64031
+ emptyHeight: 0,
64032
+ theadAndTfootHeight: 0,
64033
+ scrollingTimer: null
62964
64034
  }),
62965
64035
  context = _useRef.current;
62966
- var virtual = ((_props$data = props.data) === null || _props$data === void 0 ? void 0 : _props$data.length) && props.rowsInView !== 0 && (!!props.virtual || props.fixed === 'both' || props.fixed === 'y' || props.fixed === 'auto');
64036
+ var virtual = !fakeVirtual && props.rowsInView !== 0 && (!!props.virtual || props.fixed === 'both' || props.fixed === 'y' || props.fixed === 'auto');
62967
64037
 
62968
64038
  // 虚拟列表高度另外计算
62969
64039
  var _useResize = useResize({
@@ -63092,6 +64162,16 @@ var emptyRef = {
63092
64162
  onChange: inputableData.onChange,
63093
64163
  disabled: props.disabled
63094
64164
  });
64165
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
64166
+ var _theadRef$current, _tfootRef$current;
64167
+ var theadHeight = (theadRef === null || theadRef === void 0 || (_theadRef$current = theadRef.current) === null || _theadRef$current === void 0 ? void 0 : _theadRef$current.clientHeight) || 0;
64168
+ var tfootHeight = ((_tfootRef$current = tfootRef.current) === null || _tfootRef$current === void 0 ? void 0 : _tfootRef$current.clientHeight) || 0;
64169
+ if (props.sticky) {
64170
+ context.theadAndTfootHeight = tfootHeight;
64171
+ } else {
64172
+ context.theadAndTfootHeight = theadHeight + tfootHeight;
64173
+ }
64174
+ }, [theadRef.current, tfootRef.current]);
63095
64175
  var virtualInfo = use_table_virtual({
63096
64176
  disabled: !virtual,
63097
64177
  data: treeData,
@@ -63102,14 +64182,30 @@ var emptyRef = {
63102
64182
  scrollRef: scrollRef,
63103
64183
  innerRef: tbodyRef,
63104
64184
  scrollLeft: props.scrollLeft,
63105
- isRtl: isRtl
64185
+ isRtl: isRtl,
64186
+ theadAndTfootHeight: context.theadAndTfootHeight
63106
64187
  });
64188
+ var syncHeaderScroll = usePersistFn(function (left) {
64189
+ var _tableRef$current;
64190
+ if (props.hideHeader || !props.sticky) return;
64191
+
64192
+ // why use querySelectorAll: thead经历了Sticky组件的渲染再回来时,theadRef就丢失了
64193
+ var theads = tableRef === null || tableRef === void 0 || (_tableRef$current = tableRef.current) === null || _tableRef$current === void 0 ? void 0 : _tableRef$current.querySelectorAll("[data-soui-role=".concat(theadIdRef.current, "]"));
64194
+ theads === null || theads === void 0 || theads.forEach(function (item) {
64195
+ item.scrollLeft = left;
64196
+ });
64197
+ });
64198
+
64199
+ // 简单表格的滚动事件
63107
64200
  var handleBodyScroll = usePersistFn(function (e) {
63108
64201
  var target = e.currentTarget;
63109
64202
  if (!target) return;
63110
64203
  layoutFunc.checkFloat();
63111
- if (mirrorScrollRef.current) {
63112
- mirrorScrollRef.current.scrollLeft = target.scrollLeft;
64204
+ if (headMirrorScrollRef.current) {
64205
+ headMirrorScrollRef.current.scrollLeft = target.scrollLeft;
64206
+ }
64207
+ if (bottomMirrorScrollRef.current) {
64208
+ bottomMirrorScrollRef.current.scrollLeft = target.scrollLeft;
63113
64209
  }
63114
64210
  if (props.onScroll && typeof props.onScroll === 'function') {
63115
64211
  var maxWidth = target.scrollWidth - target.clientWidth;
@@ -63118,22 +64214,36 @@ var emptyRef = {
63118
64214
  var y = Math.min(target.scrollTop / maxHeight, 1);
63119
64215
  props.onScroll(x, y, target.scrollLeft, target.scrollTop);
63120
64216
  }
64217
+ syncHeaderScroll(target.scrollLeft);
63121
64218
  });
64219
+
64220
+ // 虚拟表格的滚动事件
63122
64221
  var handleVirtualScroll = usePersistFn(function (info) {
63123
64222
  virtualInfo.handleScroll(info);
63124
64223
  layoutFunc.checkFloat();
63125
- if (mirrorScrollRef.current) {
63126
- mirrorScrollRef.current.scrollLeft = info.scrollLeft;
64224
+ if (headMirrorScrollRef.current) {
64225
+ headMirrorScrollRef.current.scrollLeft = info.scrollLeft;
64226
+ }
64227
+ if (bottomMirrorScrollRef.current) {
64228
+ bottomMirrorScrollRef.current.scrollLeft = info.scrollLeft;
63127
64229
  }
63128
64230
  if (props.onScroll && typeof props.onScroll === 'function') {
63129
64231
  props.onScroll(info.x, info.y, info.scrollLeft, info.scrollTop);
63130
64232
  }
64233
+ syncHeaderScroll(info.scrollLeft);
64234
+ if (context.scrollingTimer) {
64235
+ clearTimeout(context.scrollingTimer);
64236
+ }
64237
+ setScrolling(true);
64238
+ context.scrollingTimer = setTimeout(function () {
64239
+ setScrolling(false);
64240
+ }, 100);
63131
64241
  });
63132
64242
  var renderEmpty = function renderEmpty() {
63133
- var _props$data2;
63134
- if (!((_props$data2 = props.data) !== null && _props$data2 !== void 0 && _props$data2.length) || filteredData !== undefined && filteredData.length === 0) {
64243
+ var _props$data;
64244
+ if (!((_props$data = props.data) !== null && _props$data !== void 0 && _props$data.length) || filteredData !== undefined && filteredData.length === 0) {
63135
64245
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
63136
- className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.emptyWrapper,
64246
+ className: classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.emptyWrapper, isScrollX && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.emptyNoBorder)),
63137
64247
  ref: function ref(el) {
63138
64248
  context.emptyHeight = (el === null || el === void 0 ? void 0 : el.clientHeight) || 0;
63139
64249
  },
@@ -63144,14 +64254,16 @@ var emptyRef = {
63144
64254
  }
63145
64255
  return null;
63146
64256
  };
64257
+ var $empty = renderEmpty();
63147
64258
  var renderTable = function renderTable() {
63148
- var _props$summary, _sticky$top, _props$data3;
64259
+ var _props$summary, _sticky$top, _props$data2;
63149
64260
  var Group = /*#__PURE__*/(0,jsx_runtime.jsx)(table_colgroup, {
63150
64261
  colgroup: colgroup,
63151
64262
  columns: columns,
63152
64263
  shouldLastColAuto: !!shouldLastColAuto
63153
64264
  });
63154
64265
  var bodyCommonProps = {
64266
+ virtual: props.virtual,
63155
64267
  hover: props.hover,
63156
64268
  disabled: props.disabled,
63157
64269
  rowClickAttr: props.rowClickAttr,
@@ -63220,17 +64332,22 @@ var emptyRef = {
63220
64332
  target: sticky === null || sticky === void 0 ? void 0 : sticky.target,
63221
64333
  top: (_sticky$top = sticky === null || sticky === void 0 ? void 0 : sticky.top) !== null && _sticky$top !== void 0 ? _sticky$top : 0,
63222
64334
  css: sticky === null || sticky === void 0 ? void 0 : sticky.css,
63223
- parent: tableRef === null || tableRef === void 0 ? void 0 : tableRef.current
64335
+ parent: tableRef === null || tableRef === void 0 ? void 0 : tableRef.current,
64336
+ onChange: function onChange(isSticky) {
64337
+ if (isSticky) {
64338
+ var _scrollRef$current;
64339
+ syncHeaderScroll(((_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 ? void 0 : _scrollRef$current.scrollLeft) || 0);
64340
+ }
64341
+ }
63224
64342
  };
63225
- var isRenderVirtualTable = virtual || props.sticky || !((_props$data3 = props.data) !== null && _props$data3 !== void 0 && _props$data3.length);
63226
- var headWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.headWrapper // isScrollY && scrollBarWidth && tableClasses?.scrollY,
63227
- );
63228
- var footWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.footWrapper, isScrollY && scrollBarWidth && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.scrollY));
64343
+ var isRenderVirtualTable = virtual || props.sticky || !((_props$data2 = props.data) !== null && _props$data2 !== void 0 && _props$data2.length);
64344
+ var headWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.headWrapper, !!$empty && tableClasses.emptyHeader, props.sticky && isScrollY && tableClasses.scrollY, props.sticky && !isScrollY && tableClasses.scrollX);
64345
+ var footWrapperClass = classnames_default()(tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.footWrapper);
63229
64346
  var renderHeadMirrorScroller = function renderHeadMirrorScroller() {
63230
- var _scrollRef$current, _scrollRef$current2, _scrollRef$current3;
64347
+ var _scrollRef$current2, _scrollRef$current3, _scrollRef$current4;
63231
64348
  if (!props.showTopScrollbar) return null;
63232
- var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current = scrollRef.current) === null || _scrollRef$current === void 0 ? void 0 : _scrollRef$current.clientWidth) || 0;
63233
- var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === void 0 ? void 0 : _scrollRef$current2.scrollWidth) || 0;
64349
+ var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current2 = scrollRef.current) === null || _scrollRef$current2 === void 0 ? void 0 : _scrollRef$current2.clientWidth) || 0;
64350
+ var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current3 = scrollRef.current) === null || _scrollRef$current3 === void 0 ? void 0 : _scrollRef$current3.scrollWidth) || 0;
63234
64351
  var mirrorScrollRefWidth = scrollRefWidth + scrollBarWidth;
63235
64352
  var showScroll = scrollRefScrollWidth > scrollRefWidth;
63236
64353
  // 开启了双滚,但是没有滚动条,不显示
@@ -63241,7 +64358,7 @@ var emptyRef = {
63241
64358
  });
63242
64359
  return /*#__PURE__*/(0,jsx_runtime.jsx)(StickyWrapper, objectSpread2_default()(objectSpread2_default()({}, props.sticky ? scrollerStickyProps : {}), {}, {
63243
64360
  children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
63244
- className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.headMirrorScroller,
64361
+ className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.mirrorScroller,
63245
64362
  style: {
63246
64363
  height: browserScrollbarWidth,
63247
64364
  width: mirrorScrollRefWidth
@@ -63252,49 +64369,102 @@ var emptyRef = {
63252
64369
  scrollRef.current.scrollLeft = target.scrollLeft;
63253
64370
  }
63254
64371
  },
63255
- ref: mirrorScrollRef,
64372
+ ref: headMirrorScrollRef,
63256
64373
  children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
63257
64374
  style: {
63258
- width: scrollRef === null || scrollRef === void 0 || (_scrollRef$current3 = scrollRef.current) === null || _scrollRef$current3 === void 0 ? void 0 : _scrollRef$current3.scrollWidth,
64375
+ width: scrollRef === null || scrollRef === void 0 || (_scrollRef$current4 = scrollRef.current) === null || _scrollRef$current4 === void 0 ? void 0 : _scrollRef$current4.scrollWidth,
63259
64376
  height: 1
63260
64377
  }
63261
64378
  })
63262
64379
  })
63263
64380
  }));
63264
64381
  };
64382
+ var renderBottomMirrorScroller = function renderBottomMirrorScroller() {
64383
+ var _scrollRef$current5, _scrollRef$current6, _scrollRef$current7;
64384
+ if (!props.showBottomScrollbar) return null;
64385
+ var scrollRefWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current5 = scrollRef.current) === null || _scrollRef$current5 === void 0 ? void 0 : _scrollRef$current5.clientWidth) || 0;
64386
+ var scrollRefScrollWidth = (scrollRef === null || scrollRef === void 0 || (_scrollRef$current6 = scrollRef.current) === null || _scrollRef$current6 === void 0 ? void 0 : _scrollRef$current6.scrollWidth) || 0;
64387
+ var mirrorScrollRefWidth = scrollRefWidth + scrollBarWidth;
64388
+ var showScroll = scrollRefScrollWidth > scrollRefWidth;
64389
+ // 开启了双滚,但是没有滚动条,不显示
64390
+ if (!scrollRefWidth || !mirrorScrollRefWidth || !showScroll) return null;
64391
+ var options = props.showBottomScrollbar === true ? {} : props.showBottomScrollbar;
64392
+ var scrollerStickyProps = {
64393
+ bottom: options.bottom || 0,
64394
+ zIndex: options.zIndex || defaultZIndex + 1,
64395
+ parent: tableRef === null || tableRef === void 0 ? void 0 : tableRef.current
64396
+ };
64397
+ return /*#__PURE__*/(0,jsx_runtime.jsx)(src_sticky_sticky, objectSpread2_default()(objectSpread2_default()({}, scrollerStickyProps), {}, {
64398
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
64399
+ className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.mirrorScroller,
64400
+ style: {
64401
+ height: browserScrollbarWidth,
64402
+ width: mirrorScrollRefWidth,
64403
+ marginTop: -browserScrollbarWidth
64404
+ },
64405
+ onScroll: function onScroll(e) {
64406
+ var target = e.currentTarget;
64407
+ if (scrollRef !== null && scrollRef !== void 0 && scrollRef.current && scrollRef.current.scrollLeft !== target.scrollLeft) {
64408
+ scrollRef.current.scrollLeft = target.scrollLeft;
64409
+ }
64410
+ },
64411
+ ref: bottomMirrorScrollRef,
64412
+ children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
64413
+ style: {
64414
+ width: scrollRef === null || scrollRef === void 0 || (_scrollRef$current7 = scrollRef.current) === null || _scrollRef$current7 === void 0 ? void 0 : _scrollRef$current7.scrollWidth,
64415
+ height: 1
64416
+ }
64417
+ })
64418
+ })
64419
+ }));
64420
+ };
64421
+ var $headTable = /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({
64422
+ className: headWrapperClass
64423
+ }, getDataAttribute({
64424
+ role: theadIdRef.current
64425
+ })), {}, {
64426
+ children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
64427
+ style: {
64428
+ width: width
64429
+ },
64430
+ ref: theadRef,
64431
+ children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(thead, objectSpread2_default()({}, headCommonProps))]
64432
+ })
64433
+ }));
63265
64434
  if (isRenderVirtualTable) {
63266
- var _props$data4;
64435
+ var _props$data3;
64436
+ var showStickyHeader = !props.hideHeader && props.sticky;
63267
64437
  return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
63268
- children: [renderHeadMirrorScroller(), /*#__PURE__*/(0,jsx_runtime.jsxs)(virtual_scroll_scroll, {
63269
- style: scrollWrapperStyle,
63270
- scrollerStyle: (_props$data4 = props.data) !== null && _props$data4 !== void 0 && _props$data4.length ? virtualScrollerStyle : emptyStyle,
64438
+ children: [renderHeadMirrorScroller(), showStickyHeader && /*#__PURE__*/(0,jsx_runtime.jsx)(StickyWrapper, objectSpread2_default()(objectSpread2_default()({}, stickyProps), {}, {
64439
+ children: $headTable
64440
+ })), /*#__PURE__*/(0,jsx_runtime.jsxs)(scroll_table, {
64441
+ style: {
64442
+ display: 'flex',
64443
+ minWidth: 0,
64444
+ minHeight: 0,
64445
+ flex: 1
64446
+ },
63271
64447
  wrapperRef: scrollRef,
63272
64448
  scrollWidth: width || 1,
63273
64449
  scrollHeight: virtual ? virtualInfo.scrollHeight : tbodyHeight,
63274
64450
  onScroll: handleVirtualScroll,
63275
64451
  defaultHeight: context.emptyHeight,
63276
64452
  isScrollY: isScrollY,
63277
- children: [!props.hideHeader && /*#__PURE__*/(0,jsx_runtime.jsx)(StickyWrapper, objectSpread2_default()(objectSpread2_default()({}, props.sticky ? stickyProps : {}), {}, {
63278
- children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
63279
- className: headWrapperClass,
63280
- children: /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
63281
- style: {
63282
- width: width
63283
- },
63284
- ref: theadRef,
63285
- children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(thead, objectSpread2_default()({}, headCommonProps))]
63286
- })
63287
- })
63288
- })), /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
64453
+ isScrollX: isScrollX,
64454
+ isEmpty: !!$empty,
64455
+ tableRef: tableRef,
64456
+ setFakeVirtual: setFakeVirtual,
64457
+ children: [!props.hideHeader && !props.sticky && $headTable, !!((_props$data3 = props.data) !== null && _props$data3 !== void 0 && _props$data3.length) && /*#__PURE__*/(0,jsx_runtime.jsxs)("table", {
63289
64458
  style: {
63290
64459
  width: width,
63291
- transform: virtualInfo.getTranslate()
64460
+ transform: virtualInfo.translateStyle
63292
64461
  },
63293
64462
  ref: tbodyRef,
63294
64463
  children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(tbody, objectSpread2_default()(objectSpread2_default()({}, bodyCommonProps), {}, {
63295
64464
  currentIndex: virtualInfo.startIndex,
63296
64465
  data: virtualInfo.data,
63297
- setRowHeight: virtualInfo.setRowHeight
64466
+ setRowHeight: virtualInfo.setRowHeight,
64467
+ scrolling: scrolling
63298
64468
  }))]
63299
64469
  }), showFoot ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
63300
64470
  className: footWrapperClass,
@@ -63305,8 +64475,8 @@ var emptyRef = {
63305
64475
  ref: tfootRef,
63306
64476
  children: [Group, /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()({}, footCommonProps))]
63307
64477
  })
63308
- }) : null]
63309
- }), renderEmpty()]
64478
+ }) : null, $empty]
64479
+ }), renderBottomMirrorScroller()]
63310
64480
  });
63311
64481
  }
63312
64482
  return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
@@ -63321,9 +64491,9 @@ var emptyRef = {
63321
64491
  ref: tbodyRef,
63322
64492
  children: [Group, !props.hideHeader && /*#__PURE__*/(0,jsx_runtime.jsx)(thead, objectSpread2_default()({}, headCommonProps)), bodyCommonProps.data.length === 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(TbodyEmpty, {
63323
64493
  children: renderEmpty()
63324
- }) : /*#__PURE__*/(0,jsx_runtime.jsx)(tbody, objectSpread2_default()({}, bodyCommonProps)), /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()({}, footCommonProps))]
64494
+ }) : /*#__PURE__*/(0,jsx_runtime.jsx)(tbody, objectSpread2_default()({}, bodyCommonProps)), showFoot && /*#__PURE__*/(0,jsx_runtime.jsx)(tfoot, objectSpread2_default()({}, footCommonProps))]
63325
64495
  })
63326
- })]
64496
+ }), renderBottomMirrorScroller()]
63327
64497
  });
63328
64498
  };
63329
64499
  var renderLoading = function renderLoading() {
@@ -63343,6 +64513,42 @@ var emptyRef = {
63343
64513
  align: "right"
63344
64514
  }, pagination), paginationInfo));
63345
64515
  };
64516
+
64517
+ // handle head and foot scroll
64518
+ var handleHeaderWheel = usePersistFn(function (e) {
64519
+ var _theadRef$current2;
64520
+ var scrollEl = scrollRef.current;
64521
+ if (!scrollEl) return;
64522
+ if (!(theadRef !== null && theadRef !== void 0 && (_theadRef$current2 = theadRef.current) !== null && _theadRef$current2 !== void 0 && _theadRef$current2.parentElement)) return;
64523
+ var max = scrollEl.scrollWidth - scrollEl.clientWidth;
64524
+ var scrollLeft = scrollEl.scrollLeft + e.deltaX;
64525
+ if (scrollLeft === scrollEl.scrollLeft) {
64526
+ return;
64527
+ }
64528
+ e.preventDefault();
64529
+ var left = Math.min(Math.max(scrollLeft, 0), max);
64530
+ scrollEl.scrollLeft = left;
64531
+ theadRef.current.parentElement.scrollLeft = left;
64532
+ });
64533
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
64534
+ var _scrollRef$current8;
64535
+ if (!props.sticky || !scrollRef.current || !isScrollX) return;
64536
+ // sticky场景下,从空数据到有数据切换时,同步一次滚动条的位置
64537
+ syncHeaderScroll(((_scrollRef$current8 = scrollRef.current) === null || _scrollRef$current8 === void 0 ? void 0 : _scrollRef$current8.scrollLeft) || 0);
64538
+ }, [isScrollX, props.sticky, $empty]);
64539
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
64540
+ // 绑定 wheel 事件
64541
+ if (props.sticky && theadRef.current && theadRef.current.parentElement) {
64542
+ theadRef.current.parentElement.addEventListener('wheel', handleHeaderWheel, {
64543
+ passive: false
64544
+ });
64545
+ }
64546
+ return function () {
64547
+ if (props.sticky && theadRef.current && theadRef.current.parentElement) {
64548
+ theadRef.current.parentElement.removeEventListener('wheel', handleHeaderWheel);
64549
+ }
64550
+ };
64551
+ }, [theadRef.current, props.sticky, isScrollY]);
63346
64552
  var getRenderIndexByData = function getRenderIndexByData(data) {
63347
64553
  var originKey = typeof data === 'string' ? data : getKey(props.keygen, data);
63348
64554
  var index = treeData.findIndex(function (item) {
@@ -63378,7 +64584,7 @@ var emptyRef = {
63378
64584
  });
63379
64585
  return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
63380
64586
  children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({
63381
- className: classnames_default()(tableWrapperClass, floatLeft && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.floatLeft), floatRight && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.floatRight), props.sticky && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.sticky)),
64587
+ className: classnames_default()(tableWrapperClass, defineProperty_default()(defineProperty_default()(defineProperty_default()({}, tableClasses.sticky, props.sticky), tableClasses.floatLeft, floatLeft), tableClasses.floatRight, floatRight)),
63382
64588
  style: objectSpread2_default()({
63383
64589
  height: defaultHeight
63384
64590
  }, props.style)
@@ -63507,7 +64713,8 @@ var TabsPanel = function TabsPanel(props) {
63507
64713
  active = _useTabsContext.active,
63508
64714
  lazy = _useTabsContext.lazy,
63509
64715
  setTabs = _useTabsContext.setTabs,
63510
- color = _useTabsContext.color;
64716
+ color = _useTabsContext.color,
64717
+ shape = _useTabsContext.shape;
63511
64718
  var isActive = active === id;
63512
64719
  var keekAlive = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
63513
64720
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(function () {
@@ -63516,7 +64723,7 @@ var TabsPanel = function TabsPanel(props) {
63516
64723
  tab: tab,
63517
64724
  disabled: props.disabled,
63518
64725
  jssStyle: jssStyle,
63519
- background: background,
64726
+ background: shape !== 'button' && shape !== 'fill' ? background : undefined,
63520
64727
  color: props.color || (active === id ? color : undefined)
63521
64728
  };
63522
64729
  setTabs(function (prev) {
@@ -63545,7 +64752,7 @@ var TabsPanel = function TabsPanel(props) {
63545
64752
  });
63546
64753
  });
63547
64754
  };
63548
- }, [id, tab, color, active, props.disabled, props.jssStyle]);
64755
+ }, [id, tab, color, active, shape, props.disabled, props.jssStyle]);
63549
64756
  if (!isActive && lazy && !keekAlive.current) {
63550
64757
  return null;
63551
64758
  }
@@ -64097,7 +65304,7 @@ var TabsHeader = function TabsHeader(props) {
64097
65304
 
64098
65305
 
64099
65306
 
64100
- 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", "className"];
65307
+ 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"];
64101
65308
 
64102
65309
 
64103
65310
 
@@ -64154,6 +65361,7 @@ var Tabs = function Tabs(props) {
64154
65361
  color = props.color,
64155
65362
  sticky = props.sticky,
64156
65363
  allowNonPanel = props.allowNonPanel,
65364
+ renderTabsHeader = props.renderTabsHeader,
64157
65365
  tabsClassName = props.className,
64158
65366
  rest = objectWithoutProperties_default()(props, tabs_excluded);
64159
65367
  var shape = shapeProps && shapeProps !== 'bordered' ? shapeProps : 'card';
@@ -64314,10 +65522,18 @@ var Tabs = function Tabs(props) {
64314
65522
  className: classnames_default()(stickyClassName, sticky.className)
64315
65523
  });
64316
65524
  }
65525
+ if (renderTabsHeader) {
65526
+ return renderTabsHeader( /*#__PURE__*/(0,jsx_runtime.jsx)(src_sticky_sticky, objectSpread2_default()(objectSpread2_default()({}, stickyProps), {}, {
65527
+ children: header
65528
+ })), props);
65529
+ }
64317
65530
  return /*#__PURE__*/(0,jsx_runtime.jsx)(src_sticky_sticky, objectSpread2_default()(objectSpread2_default()({}, stickyProps), {}, {
64318
65531
  children: header
64319
65532
  }));
64320
65533
  }
65534
+ if (renderTabsHeader) {
65535
+ return renderTabsHeader(header, props);
65536
+ }
64321
65537
  return header;
64322
65538
  };
64323
65539
  var renderTabs = function renderTabs() {
@@ -64408,7 +65624,7 @@ var tag_jssStyle = {
64408
65624
  input: useInputStyle
64409
65625
  };
64410
65626
  var tag_Tag = function Tag(props) {
64411
- return /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_tag_tag, objectSpread2_default()(objectSpread2_default()({}, props), {}, {
65627
+ return /*#__PURE__*/(0,jsx_runtime.jsx)(src_tag_tag, objectSpread2_default()(objectSpread2_default()({}, props), {}, {
64412
65628
  jssStyle: tag_jssStyle
64413
65629
  }));
64414
65630
  };
@@ -65134,6 +66350,7 @@ var TransferOperate = function TransferOperate(props) {
65134
66350
 
65135
66351
 
65136
66352
 
66353
+
65137
66354
  var Transfer = function Transfer(props) {
65138
66355
  var _jssStyle$transfer;
65139
66356
  var jssStyle = props.jssStyle,
@@ -65208,7 +66425,7 @@ var Transfer = function Transfer(props) {
65208
66425
  sourceSelectedKeys = _useTransfer.sourceSelectedKeys,
65209
66426
  targetSelectedKeys = _useTransfer.targetSelectedKeys,
65210
66427
  onFilter = _useTransfer.onFilter,
65211
- onSelectChange = _useTransfer.onSelectChange;
66428
+ _onSelectChange = _useTransfer.onSelectChange;
65212
66429
  var styles = (jssStyle === null || jssStyle === void 0 || (_jssStyle$transfer = jssStyle.transfer) === null || _jssStyle$transfer === void 0 ? void 0 : _jssStyle$transfer.call(jssStyle)) || {};
65213
66430
  var rootClass = classnames_default()(styles.rootClass, styles.transfer, className, defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, styles.simple, simple), styles.small, size === 'small'), styles.large, size === 'large'), styles.equalPanelWidth, equalPanelWidth));
65214
66431
  var renderOperations = function renderOperations() {
@@ -65282,7 +66499,15 @@ var Transfer = function Transfer(props) {
65282
66499
  searchPlaceholder: placeholder,
65283
66500
  renderFilter: renderFilter,
65284
66501
  onFilter: onFilterProp ? onFilter : undefined,
65285
- onSelectChange: onSelectChange
66502
+ onSelectChange: function onSelectChange(keys) {
66503
+ if (isSource) {
66504
+ var newAllKeys = Array.from(new Set([].concat(toConsumableArray_default()(keys), toConsumableArray_default()(targetSelectedKeys || []))));
66505
+ _onSelectChange(newAllKeys, keys, targetSelectedKeys);
66506
+ } else {
66507
+ var _newAllKeys = Array.from(new Set([].concat(toConsumableArray_default()(keys), toConsumableArray_default()(sourceSelectedKeys || []))));
66508
+ _onSelectChange(_newAllKeys, sourceSelectedKeys, keys);
66509
+ }
66510
+ }
65286
66511
  });
65287
66512
  };
65288
66513
  var renderSourceList = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
@@ -65487,6 +66712,7 @@ var TreeSelect = function TreeSelect(props0) {
65487
66712
  onChangeProp = props.onChange,
65488
66713
  compressedBound = props.compressedBound,
65489
66714
  compressedClassName = props.compressedClassName,
66715
+ renderCompressed = props.renderCompressed,
65490
66716
  expandedProp = props.expanded,
65491
66717
  defaultExpanded = props.defaultExpanded,
65492
66718
  defaultExpandAll = props.defaultExpandAll,
@@ -65499,6 +66725,7 @@ var TreeSelect = function TreeSelect(props0) {
65499
66725
  onChangeAddition = props.onChangeAddition,
65500
66726
  onEnterExpand = props.onEnterExpand,
65501
66727
  onExpand = props.onExpand,
66728
+ beforeChange = props.beforeChange,
65502
66729
  filterSameChange = props.filterSameChange;
65503
66730
  var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$treeSelect = jssStyle.treeSelect) === null || _jssStyle$treeSelect === void 0 ? void 0 : _jssStyle$treeSelect.call(jssStyle);
65504
66731
  var rootStyle = Object.assign({
@@ -65525,7 +66752,8 @@ var TreeSelect = function TreeSelect(props0) {
65525
66752
  defaultValue: defaultValue,
65526
66753
  control: 'value' in props,
65527
66754
  filterSameChange: filterSameChange,
65528
- multiple: multiple
66755
+ multiple: multiple,
66756
+ beforeChange: beforeChange
65529
66757
  }),
65530
66758
  value = _useTreeSelect.value,
65531
66759
  onChange = _useTreeSelect.onChange;
@@ -65772,17 +67000,28 @@ var TreeSelect = function TreeSelect(props0) {
65772
67000
  var key = datum.getKey(data);
65773
67001
  var isDisabled = datum === null || datum === void 0 ? void 0 : datum.isDisabled(key);
65774
67002
  var isCheck = datum === null || datum === void 0 ? void 0 : datum.getChecked(key);
67003
+ var contentClass = '';
67004
+ if (props.contentClass) {
67005
+ if (isString(props.contentClass)) {
67006
+ contentClass = props.contentClass;
67007
+ }
67008
+ if (isFunc(props.contentClass)) {
67009
+ contentClass = props.contentClass(data);
67010
+ }
67011
+ }
65775
67012
  if (isDisabled) {
65776
- return classnames_default()(styles.optionDisabled);
67013
+ return classnames_default()(styles.optionDisabled, contentClass);
65777
67014
  }
67015
+ var activeClassName = classnames_default()(styles.optionActive, contentClass);
67016
+ var inactiveClassName = classnames_default()(contentClass);
65778
67017
  if (multiple) {
65779
- return isCheck ? classnames_default()(styles.optionActive) : '';
67018
+ return isCheck ? activeClassName : inactiveClassName;
65780
67019
  }
65781
67020
  if (!isArray(value)) {
65782
67021
  var currentData = getDataByValues(value);
65783
- return currentData === data ? classnames_default()(styles.optionActive) : '';
67022
+ return currentData === data ? activeClassName : inactiveClassName;
65784
67023
  }
65785
- return '';
67024
+ return inactiveClassName;
65786
67025
  };
65787
67026
  var checkUnMatched = function checkUnMatched(item) {
65788
67027
  return isUnMatchedData(item);
@@ -65799,7 +67038,7 @@ var TreeSelect = function TreeSelect(props0) {
65799
67038
  if (from !== 'blur') {
65800
67039
  focusAndOpen();
65801
67040
  }
65802
- onTiledFilter === null || onTiledFilter === void 0 || onTiledFilter(trim ? text.trim() : text);
67041
+ onTiledFilter === null || onTiledFilter === void 0 || onTiledFilter(trim ? text.trim() : text, from);
65803
67042
  };
65804
67043
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
65805
67044
  if (virtual && expanded) {
@@ -65883,6 +67122,7 @@ var TreeSelect = function TreeSelect(props0) {
65883
67122
  disabled: disabled,
65884
67123
  compressed: compressed,
65885
67124
  compressedBound: compressedBound,
67125
+ renderCompressed: renderCompressed,
65886
67126
  compressedClassName: compressedClassName,
65887
67127
  multiple: multiple,
65888
67128
  placeholder: placeholder,
@@ -66174,6 +67414,7 @@ function attrAccept(file, acceptedFiles) {
66174
67414
 
66175
67415
 
66176
67416
 
67417
+
66177
67418
  var VALIDATORITEMS = [{
66178
67419
  key: 'size',
66179
67420
  param: function param(blob) {
@@ -66207,11 +67448,12 @@ var promised = function promised(action) {
66207
67448
  resolve(true);
66208
67449
  });
66209
67450
  };
67451
+ var defaultValue = [];
66210
67452
  var useUpload = function useUpload(props) {
66211
67453
  var _props$limit = props.limit,
66212
67454
  limit = _props$limit === void 0 ? 100 : _props$limit,
66213
67455
  _props$value = props.value,
66214
- value = _props$value === void 0 ? [] : _props$value;
67456
+ value = _props$value === void 0 ? defaultValue : _props$value;
66215
67457
  var accept = props.forceAccept || props.accept;
66216
67458
  var forceAccept = !!props.forceAccept;
66217
67459
  var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({}),
@@ -66331,21 +67573,22 @@ var useUpload = function useUpload(props) {
66331
67573
  responseType: props.responseType,
66332
67574
  onStart: props.onStart,
66333
67575
  onProgress: function onProgress(e, msg) {
66334
- if (throttle) return;
67576
+ var percent = typeof e.percent === 'number' ? e.percent : e.loaded / e.total * 100;
67577
+ if (throttle && percent !== 100) return;
66335
67578
  throttle = true;
66336
67579
  setTimeout(function () {
66337
67580
  throttle = false;
66338
67581
  }, 16);
66339
- var percent = typeof e.percent === 'number' ? e.percent : e.loaded / e.total * 100;
66340
- var filesState = latestState.filesState;
66341
- var newFiles = objectSpread2_default()({}, filesState);
66342
- if (!newFiles[id]) return;
66343
- newFiles[id].process = percent;
66344
- if (msg) newFiles[id].message = msg;
66345
- setFiles(newFiles);
66346
- if (typeof props.onProgress === 'function') {
66347
- props.onProgress(newFiles[id]);
66348
- }
67582
+ setFiles(function (files) {
67583
+ return utils_immer_produce(files, function (draft) {
67584
+ if (!draft[id]) return draft;
67585
+ draft[id].process = percent;
67586
+ if (msg) draft[id].message = msg;
67587
+ if (typeof props.onProgress === 'function') {
67588
+ props.onProgress(draft[id]);
67589
+ }
67590
+ });
67591
+ });
66349
67592
  },
66350
67593
  onLoad: function onLoad(xhr) {
66351
67594
  if (!/^2|1223/.test("".concat(xhr.status))) {
@@ -66373,11 +67616,17 @@ var useUpload = function useUpload(props) {
66373
67616
  delete draft[id];
66374
67617
  });
66375
67618
  });
66376
- // add value
66377
- var values = utils_immer_produce(latestState.value, function (draft) {
66378
- draft.push(result);
66379
- });
66380
- props.onChange(values);
67619
+ if (props.functionalOnChange) {
67620
+ // 回调型 setState不会丢值
67621
+ props.onChange(function (prev) {
67622
+ return [].concat(toConsumableArray_default()(prev || []), [result]);
67623
+ });
67624
+ } else {
67625
+ var latestValue = latestState.value;
67626
+ var newValue = toConsumableArray_default()(latestValue);
67627
+ newValue.push(result);
67628
+ props.onChange(newValue);
67629
+ }
66381
67630
  }
66382
67631
  },
66383
67632
  onError: function onError(xhr) {
@@ -66495,48 +67744,60 @@ var useUpload = function useUpload(props) {
66495
67744
  error = _context2.sent;
66496
67745
  case 21:
66497
67746
  if (!(error instanceof Error)) {
66498
- _context2.next = 30;
67747
+ _context2.next = 29;
66499
67748
  break;
66500
67749
  }
66501
67750
  if (validatorHandle(error, blob)) {
66502
- _context2.next = 26;
67751
+ _context2.next = 25;
66503
67752
  break;
66504
67753
  }
66505
- delete newFiles[id];
66506
- setFiles(objectSpread2_default()({}, newFiles));
67754
+ setFiles(function (prev) {
67755
+ return utils_immer_produce(prev, function (draft) {
67756
+ delete draft[id];
67757
+ });
67758
+ });
66507
67759
  return _context2.abrupt("return", 0);
66508
- case 26:
67760
+ case 25:
66509
67761
  fileRecord.message = error.message;
66510
67762
  fileRecord.status = 3;
66511
- setFiles(objectSpread2_default()({}, newFiles));
67763
+ setFiles(function (prev) {
67764
+ return objectSpread2_default()(objectSpread2_default()({}, prev), {}, defineProperty_default()({}, id, fileRecord));
67765
+ });
66512
67766
  return _context2.abrupt("return", 0);
66513
- case 30:
67767
+ case 29:
66514
67768
  if (!props.beforeUpload) {
66515
- _context2.next = 37;
67769
+ _context2.next = 36;
66516
67770
  break;
66517
67771
  }
66518
67772
  beforeUploadResult = props.beforeUpload(blob); // @ts-ignoreq
66519
67773
  if (!(beforeUploadResult && beforeUploadResult.then)) {
66520
- _context2.next = 35;
67774
+ _context2.next = 34;
66521
67775
  break;
66522
67776
  }
66523
67777
  props.beforeUpload(blob).then(function (args) {
66524
67778
  if (args.status !== 'error') {
66525
67779
  newFiles[id].xhr = uploadFile(id, blob, fileRecord.src);
66526
- setFiles(objectSpread2_default()({}, newFiles));
67780
+ setFiles(function (prev) {
67781
+ return objectSpread2_default()(objectSpread2_default()({}, prev), {}, defineProperty_default()({}, id, fileRecord));
67782
+ });
66527
67783
  }
66528
67784
  }).catch(function () {
66529
- delete newFiles[id];
66530
- setFiles(objectSpread2_default()({}, newFiles));
67785
+ setFiles(function (prev) {
67786
+ return utils_immer_produce(prev, function (draft) {
67787
+ delete draft[id];
67788
+ });
67789
+ });
66531
67790
  });
66532
67791
  return _context2.abrupt("return", 0);
66533
- case 35:
66534
- _context2.next = 39;
67792
+ case 34:
67793
+ _context2.next = 38;
66535
67794
  break;
66536
- case 37:
67795
+ case 36:
66537
67796
  fileRecord.xhr = uploadFile(id, blob, fileRecord.src);
66538
- setFiles(objectSpread2_default()({}, newFiles));
66539
- case 39:
67797
+ setFiles(function (prev) {
67798
+ return objectSpread2_default()(objectSpread2_default()({}, prev), {}, defineProperty_default()({}, id, fileRecord));
67799
+ });
67800
+ case 38:
66540
67801
  case "end":
66541
67802
  return _context2.stop();
66542
67803
  }
@@ -66640,23 +67901,53 @@ var useUpload = function useUpload(props) {
66640
67901
 
66641
67902
 
66642
67903
 
67904
+
67905
+
66643
67906
  var useDrop = function useDrop(props) {
66644
67907
  var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
66645
67908
  _useState2 = slicedToArray_default()(_useState, 2),
66646
67909
  isoOver = _useState2[0],
66647
67910
  setOver = _useState2[1];
66648
- var handleFileDrop = function handleFileDrop(e) {
66649
- var files = e.dataTransfer.files;
66650
- var accept = props.accept,
66651
- multiple = props.multiple,
66652
- onDrop = props.onDrop,
66653
- dropData = props.dropData;
66654
- var filter = accept ? Array.prototype.filter.call(files, function (f) {
66655
- return attrAccept(f, accept);
66656
- }) : Array.from(files);
66657
- if (!filter || filter.length === 0) return;
66658
- if (onDrop) onDrop(multiple ? filter : [filter[0]], dropData);
66659
- };
67911
+ var handleFileDrop = /*#__PURE__*/function () {
67912
+ var _ref = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee(e) {
67913
+ var accept, multiple, beforeDrop, onDrop, dropData, files, filter;
67914
+ return regeneratorRuntime_default()().wrap(function _callee$(_context) {
67915
+ while (1) switch (_context.prev = _context.next) {
67916
+ case 0:
67917
+ accept = props.accept, multiple = props.multiple, beforeDrop = props.beforeDrop, onDrop = props.onDrop, dropData = props.dropData;
67918
+ if (!(beforeDrop && isFunc(beforeDrop))) {
67919
+ _context.next = 7;
67920
+ break;
67921
+ }
67922
+ _context.next = 4;
67923
+ return beforeDrop(e);
67924
+ case 4:
67925
+ files = _context.sent;
67926
+ _context.next = 8;
67927
+ break;
67928
+ case 7:
67929
+ files = e.dataTransfer.files;
67930
+ case 8:
67931
+ filter = accept ? Array.prototype.filter.call(files, function (f) {
67932
+ return attrAccept(f, accept);
67933
+ }) : Array.from(files);
67934
+ if (!(!filter || filter.length === 0)) {
67935
+ _context.next = 11;
67936
+ break;
67937
+ }
67938
+ return _context.abrupt("return");
67939
+ case 11:
67940
+ if (onDrop) onDrop(multiple ? filter : [filter[0]], dropData);
67941
+ case 12:
67942
+ case "end":
67943
+ return _context.stop();
67944
+ }
67945
+ }, _callee);
67946
+ }));
67947
+ return function handleFileDrop(_x) {
67948
+ return _ref.apply(this, arguments);
67949
+ };
67950
+ }();
66660
67951
  var handleDrag = function handleDrag(e) {
66661
67952
  var disabled = props.disabled;
66662
67953
  if (disabled) return;
@@ -66934,7 +68225,8 @@ var Upload = function Upload(props0) {
66934
68225
  invalidImage: getLocale(locale, 'invalidImage')
66935
68226
  },
66936
68227
  value: value,
66937
- onChange: onChange
68228
+ onChange: onChange,
68229
+ functionalOnChange: props.functionalOnChange
66938
68230
  })),
66939
68231
  func = _useUpload.func,
66940
68232
  files = _useUpload.files,
@@ -66980,6 +68272,7 @@ var Upload = function Upload(props0) {
66980
68272
  accept: accept,
66981
68273
  disabled: props.disabled,
66982
68274
  onDrop: func.addFiles,
68275
+ beforeDrop: props.beforeDrop,
66983
68276
  multiple: !!props.multiple || limit > 1,
66984
68277
  className: classnames_default()(uploadClasses === null || uploadClasses === void 0 ? void 0 : uploadClasses.dropItem),
66985
68278
  children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", objectSpread2_default()(objectSpread2_default()({
@@ -69526,6 +70819,8 @@ var rate_interface = __webpack_require__(4188);
69526
70819
  var rule_interface = __webpack_require__(1645);
69527
70820
  // EXTERNAL MODULE: ./src/select/interface.ts
69528
70821
  var select_interface = __webpack_require__(7640);
70822
+ // EXTERNAL MODULE: ./src/skeleton/interface.ts
70823
+ var skeleton_interface = __webpack_require__(6599);
69529
70824
  // EXTERNAL MODULE: ./src/slider/interface.ts
69530
70825
  var slider_interface = __webpack_require__(5864);
69531
70826
  // EXTERNAL MODULE: ./src/spin/interface.ts
@@ -69652,6 +70947,8 @@ var upload_interface = __webpack_require__(8821);
69652
70947
 
69653
70948
 
69654
70949
 
70950
+
70951
+
69655
70952
 
69656
70953
 
69657
70954
 
@@ -69715,10 +71012,11 @@ var upload_interface = __webpack_require__(8821);
69715
71012
 
69716
71013
 
69717
71014
 
71015
+
69718
71016
 
69719
71017
 
69720
71018
  /* harmony default export */ var src_0 = ({
69721
- version: '3.7.0-beta.3'
71019
+ version: '3.7.0-beta.30'
69722
71020
  });
69723
71021
  }();
69724
71022
  /******/ return __webpack_exports__;