shineout 3.4.0-beta.3 → 3.4.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/shineout.js CHANGED
@@ -11991,7 +11991,7 @@ var handleStyle = function handleStyle(style) {
11991
11991
  };
11992
11992
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
11993
11993
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
11994
- /* harmony default export */ var version = ('3.4.0-beta.3');
11994
+ /* harmony default export */ var version = ('3.4.0-beta.5');
11995
11995
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
11996
11996
 
11997
11997
 
@@ -13337,6 +13337,8 @@ var datePickerTokens = {
13337
13337
  datePickerQuickPanelItemFontSize: 'Font-12',
13338
13338
  datePickerQuickPanelItemPaddingX: 'Spacing-12',
13339
13339
  datePickerQuickPanelItemPaddingY: 'Spacing-2',
13340
+ datePickerQuickPanelItemActiveBackgroundColor: 'Brand-1',
13341
+ datePickerQuickPanelItemActiveFontColor: 'Brand-6',
13340
13342
  datePickerQuickPanelItemHoverBackgroundColor: 'Neutral-fill-2'
13341
13343
  };
13342
13344
  /* harmony default export */ var date_picker = (datePickerTokens);
@@ -18133,6 +18135,10 @@ var datePickerStyle = objectSpread2_default()(objectSpread2_default()({
18133
18135
  cursor: 'pointer'
18134
18136
  }
18135
18137
  },
18138
+ quickPickerActiveItem: {
18139
+ color: src.datePickerQuickPanelItemActiveFontColor,
18140
+ background: src.datePickerQuickPanelItemActiveBackgroundColor
18141
+ },
18136
18142
  pickerFooterBtn: {}
18137
18143
  });
18138
18144
  /* harmony default export */ var date_picker_date_picker = (datePickerStyle);
@@ -21302,7 +21308,7 @@ var normalize_token = {
21302
21308
  };
21303
21309
  var lineHeightComputed = '20px';
21304
21310
  var lineHeightComputed2 = '10px';
21305
- var normalize_css = "*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\nhtml {\n font-family: sans-serif;\n line-height: 1.15;\n -ms-overflow-style: scrollbar;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n -webkit-text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n}\n\narticle,\naside,\ndialog,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nnav,\nsection {\n display: block;\n}\n\nbody {\n margin: 0;\n color: ".concat(normalize_token.color, ";\n font-family: ").concat(normalize_token.fontFamily, ";\n font-size: ").concat(normalize_token.fontSize, ";\n line-height: ").concat(normalize_token.lineHeight, ";\n}\n\n\narticle,\naside,\nfooter,\nheader,\nnav,\nsection {\n display: block;\n}\n\nh1 {\n margin: 0.67em 0;\n font-size: 2em;\n}\n\nfigcaption,\nfigure,\nmain {\n display: block;\n}\n\nfigure {\n margin: 1em 40px;\n}\n\nhr {\n overflow: visible;\n height: 0;\n box-sizing: content-box;\n}\n\npre {\n font-family: \"SFMono-Regular\", Menlo, Monaco, Consolas, \"Courier New\", monospace;\n font-size: 1em;\n}\n\na {\n background-color: transparent;\n color: ").concat(normalize_token.linkColor, ";\n cursor: pointer;\n outline: none;\n text-decoration: ").concat(normalize_token.linkHoverDecoration, ";\n -webkit-text-decoration-skip: objects;\n transition: color 0.3s;\n}\n\na:active,\na:hover {\n color: ").concat(normalize_token.linkColor, ";\n outline: 0;\n text-decoration: ").concat(normalize_token.linkHoverDecoration, ";\n}\na[disabled] {\n color: ").concat(normalize_token.linkDisabledColor, ";\n cursor: not-allowed;\n pointer-events: none;\n}\n\nabbr[title] {\n border-bottom: none;\n text-decoration: underline;\n text-decoration: underline dotted;\n}\n\nb,\nstrong {\n font-weight: inherit;\n}\n\nb,\nstrong {\n font-weight: bolder;\n}\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\ndfn {\n font-style: italic;\n}\n\nmark {\n background-color: #ff0;\n color: #000;\n}\n\nsmall {\n font-size: 80%;\n}\n\nsub,\nsup {\n position: relative;\n font-size: 75%;\n line-height: 0;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\naudio,\nvideo {\n display: inline-block;\n}\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\nimg {\n border-style: none;\n}\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n margin: 0;\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n}\n\nbutton,\ninput {\n overflow: visible;\n}\n\nbutton,\nselect {\n text-transform: none;\n}\n\nbutton,\nhtml [type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\nbutton::-moz-focus-inner,\n[type='button']::-moz-focus-inner,\n[type='reset']::-moz-focus-inner,\n[type='submit']::-moz-focus-inner {\n padding: 0;\n border-style: none;\n}\n\nbutton:-moz-focusring,\n[type='button']:-moz-focusring,\n[type='reset']:-moz-focusring,\n[type='submit']:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\nlegend {\n display: table;\n max-width: 100%;\n box-sizing: border-box;\n padding: 0;\n color: inherit;\n white-space: normal;\n}\n\nprogress {\n display: inline-block;\n vertical-align: baseline;\n}\n\ntextarea {\n overflow: auto;\n}\n\n[type='checkbox'],\n[type='radio'] {\n box-sizing: border-box;\n padding: 0;\n}\n\n\n[type='number']::-webkit-inner-spin-button,\n[type='number']::-webkit-outer-spin-button {\n height: auto;\n}\n\n[type='search'] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n}\n\n[type='search']::-webkit-search-cancel-button,\n[type='search']::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n\n::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n}\n\n\ndetails,\nmenu {\n display: block;\n}\n\n\nsummary {\n display: list-item;\n}\n\n\ncanvas {\n display: inline-block;\n}\n\n\ntemplate {\n display: none;\n}\n\n\n[hidden] {\n display: none;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n color: ").concat(normalize_token.headingsColor, ";\n font-family: ").concat(normalize_token.headingsFontFamily, ";\n font-weight: ").concat(normalize_token.headingsFontWeight, ";\n line-height: ").concat(normalize_token.headingsLineHeight, ";\n}\nh1 small, h1 .small, .h1 small, .h1 .small,\nh2 small, h2 .small, .h2 small, .h2 .small,\nh3 small, h3 .small, .h3 small, .h3 .small,\nh4 small, h4 .small, .h4 small, .h4 .small,\nh5 small, h5 .small, .h5 small, .h5 .small,\nh6 small, h6 .small, .h6 small, .h6 .small {\n color: ").concat(normalize_token.headingsSmallColor, ";\n font-weight: normal;\n line-height: 1;\n}\n\n\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n margin-top: ").concat(lineHeightComputed, ";\n margin-bottom: ").concat(lineHeightComputed, ";\n}\n\nhi small, h1 .small, .h1 small, .h1 .small,\nh2 small, h2 .small, .h2 small, .h2 .small,\nh3 small, h3 .small, .h3 small, .h3 .small {\n font-size: 65%;\n}\n\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n margin-top: ").concat(lineHeightComputed2, ";\n margin-bottom: ").concat(lineHeightComputed2, ";\n}\n\nh4 small, h4 .small, .h4 small, .h4 .small,\nh5 small, h5 .small, .h5 small, .h5 .small,\nh6 small, h6 .small, .h6 small, .h6 .small {\n font-size: 75%;\n}\n\np {\n margin: 0 0 ").concat(lineHeightComputed2, ";\n}");
21311
+ var normalize_css = "*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\nhtml {\n font-family: sans-serif;\n line-height: 1.15;\n -ms-overflow-style: scrollbar;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n -webkit-text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n}\n\narticle,\naside,\ndialog,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nnav,\nsection {\n display: block;\n}\n\nbody {\n margin: 0;\n color: ".concat(normalize_token.color, ";\n font-family: ").concat(normalize_token.fontFamily, ";\n font-size: ").concat(normalize_token.fontSize, ";\n line-height: ").concat(normalize_token.lineHeight, ";\n}\n\n\narticle,\naside,\nfooter,\nheader,\nnav,\nsection {\n display: block;\n}\n\nh1 {\n margin: 0.67em 0;\n font-size: 2em;\n}\n\nfigcaption,\nfigure,\nmain {\n display: block;\n}\n\nfigure {\n margin: 1em 40px;\n}\n\nhr {\n overflow: visible;\n height: 0;\n box-sizing: content-box;\n}\n\npre {\n font-family: \"SFMono-Regular\", Menlo, Monaco, Consolas, \"Courier New\", monospace;\n font-size: 1em;\n}\n\na {\n background-color: transparent;\n color: ").concat(normalize_token.linkColor, ";\n cursor: pointer;\n outline: none;\n text-decoration: ").concat(normalize_token.linkHoverDecoration, ";\n -webkit-text-decoration-skip: objects;\n transition: color 0.3s;\n}\n\na:active,\na:hover {\n color: ").concat(normalize_token.linkColor, ";\n outline: 0;\n text-decoration: ").concat(normalize_token.linkHoverDecoration, ";\n}\na[disabled] {\n color: ").concat(normalize_token.linkDisabledColor, ";\n cursor: not-allowed;\n pointer-events: none;\n}\n\nabbr[title] {\n border-bottom: none;\n text-decoration: underline;\n text-decoration: underline dotted;\n}\n\nb,\nstrong {\n font-weight: inherit;\n}\n\nb,\nstrong {\n font-weight: bolder;\n}\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\ndfn {\n font-style: italic;\n}\n\nmark {\n background-color: #ff0;\n color: #000;\n}\n\nsmall {\n font-size: 80%;\n}\n\nsub,\nsup {\n position: relative;\n font-size: 75%;\n line-height: 0;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\naudio,\nvideo {\n display: inline-block;\n}\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\nimg {\n border-style: none;\n}\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n margin: 0;\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n}\n\nbutton,\ninput {\n overflow: visible;\n}\n\nbutton,\nselect {\n text-transform: none;\n}\n\nbutton,\nhtml [type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\nbutton::-moz-focus-inner,\n[type='button']::-moz-focus-inner,\n[type='reset']::-moz-focus-inner,\n[type='submit']::-moz-focus-inner {\n padding: 0;\n border-style: none;\n}\n\nbutton:-moz-focusring,\n[type='button']:-moz-focusring,\n[type='reset']:-moz-focusring,\n[type='submit']:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\nlegend {\n display: table;\n max-width: 100%;\n box-sizing: border-box;\n padding: 0;\n color: inherit;\n white-space: normal;\n}\n\nprogress {\n display: inline-block;\n vertical-align: baseline;\n}\n\ntextarea {\n overflow: auto;\n}\n\n[type='checkbox'],\n[type='radio'] {\n box-sizing: border-box;\n padding: 0;\n}\n\n\n[type='number']::-webkit-inner-spin-button,\n[type='number']::-webkit-outer-spin-button {\n height: auto;\n}\n\n[type='search'] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n}\n\n[type='search']::-webkit-search-cancel-button,\n[type='search']::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n\n::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n}\n\n\ndetails,\nmenu {\n display: block;\n}\n\n\nsummary {\n display: list-item;\n}\n\n\ncanvas {\n display: inline-block;\n}\n\n\ntemplate {\n display: none;\n}\n\n\n[hidden] {\n display: none;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n color: ").concat(normalize_token.headingsColor, ";\n font-family: ").concat(normalize_token.headingsFontFamily, ";\n font-weight: ").concat(normalize_token.headingsFontWeight, ";\n line-height: ").concat(normalize_token.headingsLineHeight, ";\n}\nh1 small, h1 .small, .h1 small, .h1 .small,\nh2 small, h2 .small, .h2 small, .h2 .small,\nh3 small, h3 .small, .h3 small, .h3 .small,\nh4 small, h4 .small, .h4 small, .h4 .small,\nh5 small, h5 .small, .h5 small, .h5 .small,\nh6 small, h6 .small, .h6 small, .h6 .small {\n color: ").concat(normalize_token.headingsSmallColor, ";\n font-weight: normal;\n line-height: 1;\n}\n\n\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n margin-top: ").concat(lineHeightComputed, ";\n margin-bottom: ").concat(lineHeightComputed2, ";\n}\n\nhi small, h1 .small, .h1 small, .h1 .small,\nh2 small, h2 .small, .h2 small, .h2 .small,\nh3 small, h3 .small, .h3 small, .h3 .small {\n font-size: 65%;\n}\n\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n margin-top: ").concat(lineHeightComputed2, ";\n margin-bottom: ").concat(lineHeightComputed2, ";\n}\n\nh4 small, h4 .small, .h4 small, .h4 .small,\nh5 small, h5 .small, .h5 small, .h5 .small,\nh6 small, h6 .small, .h6 small, .h6 .small {\n font-size: 75%;\n}\n\np {\n margin: 0 0 ").concat(lineHeightComputed2, ";\n}");
21306
21312
  if (typeof window !== 'undefined') {
21307
21313
  var normalize_link = document.createElement('style');
21308
21314
  normalize_link.innerHTML = normalize_css;
@@ -22517,6 +22523,11 @@ var selectStyle = objectSpread2_default()(objectSpread2_default()({
22517
22523
  padding: 0,
22518
22524
  width: '100%'
22519
22525
  },
22526
+ dynamicList: {
22527
+ '& $optionInner': {
22528
+ textWrap: 'wrap'
22529
+ }
22530
+ },
22520
22531
  option: {
22521
22532
  listStyle: 'none',
22522
22533
  lineHeight: src.lineHeightDynamic,
@@ -24783,6 +24794,14 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({}, globalStyle
24783
24794
  background: "".concat(src.tableTbodyHoverBackgroundColor)
24784
24795
  }
24785
24796
  },
24797
+ rowHover: {
24798
+ '& td': {
24799
+ transition: 'background-color 0.2s'
24800
+ },
24801
+ '&&:hover td': {
24802
+ background: "".concat(src.tableTbodyHoverBackgroundColor)
24803
+ }
24804
+ },
24786
24805
  floatLeft: {
24787
24806
  '& $cellFixedLast$cellFixedLeft': {
24788
24807
  '&::after': {
@@ -26083,9 +26102,6 @@ var TagStyle = {
26083
26102
  padding: "0 ".concat(src.tagSmallPaddingX),
26084
26103
  fontWeight: src.tagSmallFontWeight,
26085
26104
  borderRadius: src.tagSmallBorderRadius,
26086
- '& $container': {
26087
- lineHeight: "calc(".concat(src.tagSmallFontSize, " + 6px)")
26088
- },
26089
26105
  '& $wrapper': {
26090
26106
  lineHeight: "calc(".concat(src.tagSmallFontSize, " + 6px)")
26091
26107
  },
@@ -26384,7 +26400,8 @@ var tooltipStyle = objectSpread2_default()(objectSpread2_default()({}, tooltip_a
26384
26400
  backgroundColor: src.tooltipDangerBackgroundColor,
26385
26401
  color: src.tooltipDangerColor
26386
26402
  },
26387
- '&::before': {
26403
+ // '&::before': {
26404
+ '& $arrow': {
26388
26405
  'z-index': 1,
26389
26406
  position: 'absolute',
26390
26407
  content: '" "',
@@ -26399,19 +26416,13 @@ var tooltipStyle = objectSpread2_default()(objectSpread2_default()({}, tooltip_a
26399
26416
  },
26400
26417
  '&[data-soui-position^="bottom"]': {
26401
26418
  marginTop: arrowGap - 2,
26402
- '&::before': {
26403
- top: '0',
26404
- left: '0',
26405
- right: '0',
26406
- margin: 'auto'
26407
- },
26408
- '&[dir=ltr]::before': {
26419
+ '&[dir=ltr] $arrow': {
26409
26420
  transform: 'translate(0, -50%) rotate(-45deg)'
26410
26421
  },
26411
- '&[dir=rtl]::before': {
26422
+ '&[dir=rtl] $arrow': {
26412
26423
  transform: 'translate(0, -50%) rotate(45deg)'
26413
26424
  },
26414
- '&::after': {
26425
+ '& $arrow::after': {
26415
26426
  top: arrowGap * -1,
26416
26427
  left: '0',
26417
26428
  right: '0',
@@ -26423,105 +26434,105 @@ var tooltipStyle = objectSpread2_default()(objectSpread2_default()({}, tooltip_a
26423
26434
  },
26424
26435
  '&[data-soui-position^="top"]': {
26425
26436
  marginTop: (arrowGap - 2) * -1,
26426
- '&::before': {
26427
- bottom: '0',
26428
- transform: 'translate(0, 50%) rotate(135deg)',
26429
- left: '0',
26430
- right: '0',
26431
- margin: 'auto'
26432
- },
26433
- '&[dir=ltr]::before': {
26437
+ '&[dir=ltr] $arrow': {
26434
26438
  transform: 'translate(0, 50%) rotate(135deg)'
26435
26439
  },
26436
- '&[dir=rtl]::before': {
26440
+ '&[dir=rtl] $arrow': {
26437
26441
  transform: 'translate(0, 50%) rotate(-135deg)'
26438
- },
26439
- '&::after': {
26440
- bottom: arrowGap * -1,
26441
- left: '0',
26442
- right: '0',
26443
- content: '" "',
26444
- display: 'block',
26445
- height: arrowGap,
26446
- position: 'absolute'
26447
26442
  }
26443
+ // '&::before': {
26444
+ // bottom: '0',
26445
+ // transform: 'translate(0, 50%) rotate(135deg)',
26446
+ // left: '0',
26447
+ // right: '0',
26448
+ // margin: 'auto',
26449
+ // },
26450
+ // '&[dir=ltr]::before': {
26451
+ // transform: 'translate(0, 50%) rotate(135deg)',
26452
+ // },
26453
+ // '&[dir=rtl]::before': {
26454
+ // transform: 'translate(0, 50%) rotate(-135deg)',
26455
+ // },
26456
+ // '&::after': {
26457
+ // bottom: arrowGap * -1,
26458
+ // left: '0',
26459
+ // right: '0',
26460
+ // content: '" "',
26461
+ // display: 'block',
26462
+ // height: arrowGap,
26463
+ // position: 'absolute',
26464
+ // },
26448
26465
  },
26449
26466
  '&[data-soui-position^="left"]': {
26450
26467
  marginLeft: (arrowGap - 2) * -1,
26451
- '&[dir=ltr]': {
26452
- marginLeft: (arrowGap - 2) * -1
26453
- },
26454
- '&[dir=rtl]': {
26455
- marginRight: (arrowGap - 2) * -1
26456
- },
26457
- '&::before': {
26458
- right: 0,
26459
- top: '0',
26460
- bottom: '0',
26461
- margin: 'auto'
26462
- },
26463
- '&[dir=ltr]::before': {
26468
+ '&[dir=ltr] $arrow': {
26464
26469
  transform: 'translate(50%, 0) rotate(45deg)'
26465
26470
  },
26466
- '&[dir=rtl]::before': {
26471
+ '&[dir=rtl] $arrow': {
26467
26472
  transform: 'translate(50%, 0) rotate(135deg)'
26468
- },
26469
- '&::after': {
26470
- left: arrowGap * -1,
26471
- top: '0',
26472
- bottom: '0',
26473
- content: '" "',
26474
- display: 'block',
26475
- width: arrowGap,
26476
- position: 'absolute'
26477
26473
  }
26474
+
26475
+ // '&[dir=ltr]': { marginLeft: (arrowGap - 2) * -1 },
26476
+ // '&[dir=rtl]': { marginRight: (arrowGap - 2) * -1 },
26477
+ // '&::before': {
26478
+ // right: 0,
26479
+ // top: '0',
26480
+ // bottom: '0',
26481
+ // margin: 'auto',
26482
+ // },
26483
+ // '&[dir=ltr]::before': {
26484
+ // transform: 'translate(50%, 0) rotate(45deg)',
26485
+ // },
26486
+ // '&[dir=rtl]::before': {
26487
+ // transform: 'translate(50%, 0) rotate(135deg)',
26488
+ // },
26489
+ // '&::after': {
26490
+ // left: arrowGap * -1,
26491
+ // top: '0',
26492
+ // bottom: '0',
26493
+ // content: '" "',
26494
+ // display: 'block',
26495
+ // width: arrowGap,
26496
+ // position: 'absolute',
26497
+ // },
26478
26498
  },
26479
26499
  '&[data-soui-position^="right"]': {
26480
26500
  marginLeft: arrowGap - 2,
26481
- '&[dir=ltr]': {
26482
- marginLeft: arrowGap - 2
26483
- },
26484
- '&[dir=rtl]': {
26485
- marginRight: arrowGap - 2
26486
- },
26487
- '&::before': {
26488
- left: '0',
26489
- top: '0',
26490
- bottom: '0',
26491
- margin: 'auto'
26492
- },
26493
- '&[dir=ltr]::before': {
26501
+ '&[dir=ltr] $arrow': {
26494
26502
  transform: 'translate(-50%, 0) rotate(-135deg)'
26495
26503
  },
26496
- '&[dir=rtl]::before': {
26504
+ '&[dir=rtl] $arrow': {
26497
26505
  transform: 'translate(-50%, 0) rotate(-45deg)'
26498
- },
26499
- '&::after': {
26500
- left: arrowGap * -1,
26501
- top: '0',
26502
- bottom: '0',
26503
- content: '" "',
26504
- display: 'block',
26505
- width: arrowGap,
26506
- position: 'absolute'
26507
26506
  }
26508
- },
26509
- '&&[data-soui-position$="-left"]::before': {
26510
- left: tooltip_arrowMargin,
26511
- right: 'auto'
26512
- },
26513
- '&&[data-soui-position$="-right"]::before': {
26514
- right: tooltip_arrowMargin,
26515
- left: 'auto'
26516
- },
26517
- '&&[data-soui-position$="-top"]::before': {
26518
- top: tooltip_arrowMargin,
26519
- bottom: 'auto'
26520
- },
26521
- '&&[data-soui-position$="-bottom"]::before': {
26522
- bottom: tooltip_arrowMargin,
26523
- top: 'auto'
26507
+
26508
+ // '&[dir=ltr]': { marginLeft: arrowGap - 2 },
26509
+ // '&[dir=rtl]': { marginRight: arrowGap - 2 },
26510
+ // '&::before': {
26511
+ // left: '0',
26512
+ // top: '0',
26513
+ // bottom: '0',
26514
+ // margin: 'auto',
26515
+ // },
26516
+ // '&[dir=ltr]::before': {
26517
+ // transform: 'translate(-50%, 0) rotate(-135deg)',
26518
+ // },
26519
+ // '&[dir=rtl]::before': {
26520
+ // transform: 'translate(-50%, 0) rotate(-45deg)',
26521
+ // },
26522
+ // '&::after': {
26523
+ // left: arrowGap * -1,
26524
+ // top: '0',
26525
+ // bottom: '0',
26526
+ // content: '" "',
26527
+ // display: 'block',
26528
+ // width: arrowGap,
26529
+ // position: 'absolute',
26530
+ // },
26524
26531
  }
26532
+ // '&&[data-soui-position$="-left"]::before': { left: arrowMargin, right: 'auto' },
26533
+ // '&&[data-soui-position$="-right"]::before': { right: arrowMargin, left: 'auto' },
26534
+ // '&&[data-soui-position$="-top"]::before': { top: arrowMargin, bottom: 'auto' },
26535
+ // '&&[data-soui-position$="-bottom"]::before': { bottom: arrowMargin, top: 'auto' },
26525
26536
  },
26526
26537
  wrapperOpen: {
26527
26538
  display: 'block',
@@ -26541,6 +26552,12 @@ var tooltipStyle = objectSpread2_default()(objectSpread2_default()({}, tooltip_a
26541
26552
  target: {
26542
26553
  display: 'inline-block'
26543
26554
  },
26555
+ arrow: {
26556
+ // before
26557
+ '&::before': {
26558
+ content: "''"
26559
+ }
26560
+ },
26544
26561
  content: {
26545
26562
  padding: "".concat(src.tooltipPaddingY, " ").concat(src.tooltipPaddingX),
26546
26563
  fontSize: src.tooltipFontSize
@@ -28772,6 +28789,10 @@ var usePositionStyle = function usePositionStyle(config) {
28772
28789
  _useState2 = slicedToArray_default()(_useState, 2),
28773
28790
  style = _useState2[0],
28774
28791
  setStyle = _useState2[1];
28792
+ var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({}),
28793
+ _useState4 = slicedToArray_default()(_useState3, 2),
28794
+ arrayStyle = _useState4[0],
28795
+ setArrayStyle = _useState4[1];
28775
28796
  var _React$useRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef({
28776
28797
  element: null,
28777
28798
  containerRect: {
@@ -28845,10 +28866,12 @@ var usePositionStyle = function usePositionStyle(config) {
28845
28866
  };
28846
28867
  };
28847
28868
  var getAbsolutePositionStyle = function getAbsolutePositionStyle(rect, position) {
28869
+ var _popupElRef$current;
28848
28870
  var style = {
28849
28871
  position: 'absolute',
28850
28872
  zIndex: zIndex
28851
28873
  };
28874
+ var arrayStyle = {};
28852
28875
  if (fixedWidth) {
28853
28876
  var widthKey = fixedWidth === 'min' ? 'minWidth' : 'width';
28854
28877
  style[widthKey] = rect.width;
@@ -28858,6 +28881,7 @@ var usePositionStyle = function usePositionStyle(config) {
28858
28881
  var containerRect = rootContainer.getBoundingClientRect();
28859
28882
  var bodyRect = (document.documentElement || document.body).getBoundingClientRect();
28860
28883
  var containerScrollBarWidth = rootContainer.offsetWidth - rootContainer.clientWidth;
28884
+ var targetRect = (_popupElRef$current = popupElRef.current) === null || _popupElRef$current === void 0 ? void 0 : _popupElRef$current.getBoundingClientRect();
28861
28885
  var containerScroll = {
28862
28886
  left: rootContainer.scrollLeft,
28863
28887
  top: rootContainer.scrollTop
@@ -28874,14 +28898,25 @@ var usePositionStyle = function usePositionStyle(config) {
28874
28898
  if (h === 'left') {
28875
28899
  style.left = rect.left - containerRect.left + containerScroll.left;
28876
28900
  style.transform = '';
28901
+ arrayStyle.left = "8px";
28877
28902
  if (adjust) {
28878
28903
  overRight = rect.left + context.popUpWidth - bodyRect.right + containerScrollBarWidth;
28904
+ if (style.left < 0 && targetRect) {
28905
+ style.left = 'auto';
28906
+ }
28879
28907
  }
28880
28908
  } else if (h === 'right') {
28881
28909
  style.right = containerRect.right - rect.right + containerScrollBarWidth - containerScroll.left;
28882
28910
  style.left = 'auto';
28883
28911
  style.transform = '';
28884
- if (adjust) overLeft = bodyRect.left - (rect.right - context.popUpWidth);
28912
+ arrayStyle.right = "8px";
28913
+ if (adjust) {
28914
+ overLeft = bodyRect.left - (rect.right - context.popUpWidth);
28915
+ if (style.right < 0 && targetRect) {
28916
+ style.left = bodyRect.width - targetRect.width;
28917
+ style.right = 'auto';
28918
+ }
28919
+ }
28885
28920
  } else {
28886
28921
  // 居中对齐
28887
28922
  style.left = rect.left + rect.width / 2 - containerRect.left + containerScroll.left;
@@ -28890,6 +28925,9 @@ var usePositionStyle = function usePositionStyle(config) {
28890
28925
  overRight = rect.left + rect.width / 2 + context.popUpWidth / 2 - bodyRect.width + containerScrollBarWidth;
28891
28926
  overLeft = bodyRect.left - (rect.left + rect.width / 2 - context.popUpWidth / 2);
28892
28927
  }
28928
+ if (targetRect) {
28929
+ arrayStyle.left = "".concat(targetRect.width / 2 - 5.9, "px");
28930
+ }
28893
28931
  }
28894
28932
  if (adjust) {
28895
28933
  // 调节左右溢出
@@ -28898,16 +28936,26 @@ var usePositionStyle = function usePositionStyle(config) {
28898
28936
  style.left -= overRight;
28899
28937
  // 扣除触发器距离页面右侧的距离,以保证从右侧弹出的窗口最右边对齐触发器最右边
28900
28938
  style.left -= toRightDistance;
28939
+ if (targetRect) {
28940
+ arrayStyle.left = "".concat((targetRect === null || targetRect === void 0 ? void 0 : targetRect.width) - context.parentRect.width / 2 - 5.9, "px");
28941
+ }
28901
28942
  }
28902
28943
  if (overLeft > 0) {
28903
28944
  style.left += overLeft;
28945
+ arrayStyle.left = "".concat(rect.width / 2 - 5.9, "px");
28904
28946
  }
28905
28947
  }
28906
28948
  if (v === 'bottom') {
28907
28949
  style.top = rect.bottom - containerRect.top + containerScroll.top + popupGap;
28950
+ if (targetRect) {
28951
+ arrayStyle.top = "".concat(0, "px");
28952
+ }
28908
28953
  } else {
28909
28954
  style.top = rect.top - containerRect.top + containerScroll.top - popupGap;
28910
28955
  style.transform += 'translateY(-100%)';
28956
+ if (targetRect) {
28957
+ arrayStyle.top = "".concat(targetRect.height - 5.9 - 4, "px");
28958
+ }
28911
28959
  }
28912
28960
  } else if (horizontalPosition.includes(targetPosition)) {
28913
28961
  var _targetPosition$split3 = targetPosition.split('-'),
@@ -28917,45 +28965,88 @@ var usePositionStyle = function usePositionStyle(config) {
28917
28965
  if (_v === 'top') {
28918
28966
  style.top = rect.top - containerRect.top + containerScroll.top;
28919
28967
  style.transform = '';
28968
+ arrayStyle.top = "8px";
28920
28969
  } else if (_v === 'bottom') {
28921
28970
  style.top = rect.bottom - containerRect.top + containerScroll.top;
28971
+ arrayStyle.bottom = "8px";
28922
28972
  style.transform = 'translateY(-100%)';
28923
28973
  } else {
28924
28974
  // 居中对齐
28925
28975
  style.top = rect.top - containerRect.top + containerScroll.top + rect.height / 2;
28976
+ if (targetRect) {
28977
+ arrayStyle.top = "".concat(targetRect.height / 2 - 5.9 / 2, "px");
28978
+ }
28926
28979
  style.transform = 'translateY(-50%)';
28927
28980
  }
28928
28981
  if (_h === 'right') {
28929
28982
  style.left = rect.right - containerRect.left + containerScroll.left + popupGap;
28930
28983
  } else {
28931
28984
  style.left = rect.left - containerRect.left + containerScroll.left - popupGap;
28985
+ arrayStyle.right = "0px";
28932
28986
  style.transform += ' translateX(-100%)';
28933
28987
  }
28934
28988
  } else if (position === 'cover') {
28935
28989
  style.top = rect.top - containerRect.top + containerScroll.top;
28936
28990
  style.left = rect.left - containerRect.left + containerScroll.left;
28937
28991
  }
28938
- return style;
28992
+ return {
28993
+ style: style,
28994
+ arrayStyle: arrayStyle
28995
+ };
28939
28996
  };
28940
28997
  var getAbsoluteStyle = function getAbsoluteStyle(position) {
28941
- if (!parentElRef.current) return hideStyle;
28998
+ if (!parentElRef.current) return {
28999
+ style: hideStyle
29000
+ };
28942
29001
  var rect = context.parentRect;
28943
29002
  if (scrollElRef !== null && scrollElRef !== void 0 && scrollElRef.current) {
28944
29003
  var _scrollElRef$current;
28945
29004
  var visibleRect = ((_scrollElRef$current = scrollElRef.current) === null || _scrollElRef$current === void 0 ? void 0 : _scrollElRef$current.getBoundingClientRect()) || {};
28946
29005
  if (rect.bottom < visibleRect.top || rect.top > visibleRect.bottom || rect.right < visibleRect.left || rect.left > visibleRect.right) {
28947
- return hideStyle;
29006
+ return {
29007
+ style: hideStyle
29008
+ };
28948
29009
  }
28949
29010
  }
28950
- var style = getAbsolutePositionStyle(rect, position);
28951
- return style;
29011
+ var _getAbsolutePositionS = getAbsolutePositionStyle(rect, position),
29012
+ style = _getAbsolutePositionS.style,
29013
+ arrayStyle = _getAbsolutePositionS.arrayStyle;
29014
+
29015
+ // TODO: 如果是版本大于chrome128,需要根据currentCSSZoom处理chrome的bug
29016
+ if (!isChromeLowerThan(128)) {
29017
+ // @ts-ignore currentCSSZoom
29018
+ var currentCSSZoom = document.body.currentCSSZoom;
29019
+ if (currentCSSZoom === 1 || !currentCSSZoom) return {
29020
+ style: style,
29021
+ arrayStyle: arrayStyle
29022
+ };
29023
+ if (style.left && typeof style.left === 'number') {
29024
+ style.left = style.left * (1 / currentCSSZoom);
29025
+ }
29026
+ if (style.top && typeof style.top === 'number') {
29027
+ style.top = style.top * (1 / currentCSSZoom);
29028
+ }
29029
+ if (style.right && typeof style.right === 'number') {
29030
+ style.right = style.right * (1 / currentCSSZoom);
29031
+ }
29032
+ if (style.bottom && typeof style.bottom === 'number') {
29033
+ style.bottom = style.bottom * (1 / currentCSSZoom);
29034
+ }
29035
+ }
29036
+ return {
29037
+ style: style,
29038
+ arrayStyle: arrayStyle
29039
+ };
28952
29040
  };
28953
29041
  var getStyle = function getStyle() {
28954
29042
  var newStyle = {};
29043
+ var newArrayStyle = {};
28955
29044
  var _ref2 = config || {},
28956
29045
  position = _ref2.position,
28957
29046
  absolute = _ref2.absolute;
28958
- if (!position || !show || !parentElRef.current) return style;
29047
+ if (!position || !show || !parentElRef.current) return {
29048
+ newStyle: style
29049
+ };
28959
29050
  context.parentRect = parentElRef.current.getBoundingClientRect();
28960
29051
  if (adjust) {
28961
29052
  var popupInfo = getPopUpInfo(context.parentRect);
@@ -28970,22 +29061,35 @@ var usePositionStyle = function usePositionStyle(config) {
28970
29061
  fixedWidth: fixedWidth
28971
29062
  });
28972
29063
  } else {
28973
- newStyle = getAbsoluteStyle(realPosition);
29064
+ var _ref3 = getAbsoluteStyle(realPosition),
29065
+ nextStyle = _ref3.style,
29066
+ nextArrayStyle = _ref3.arrayStyle;
29067
+ newStyle = nextStyle;
29068
+ newArrayStyle = nextArrayStyle;
28974
29069
  }
28975
29070
  // for animation
28976
29071
  if (realPosition.indexOf('top') === 0) {
28977
29072
  newStyle.transformOrigin = 'center bottom';
28978
29073
  }
28979
- return newStyle;
29074
+ return {
29075
+ newStyle: newStyle,
29076
+ newArrayStyle: newArrayStyle
29077
+ };
28980
29078
  };
28981
29079
  var updateStyle = use_persist_fn(function () {
28982
- var newStyle = getStyle();
29080
+ var _getStyle = getStyle(),
29081
+ newStyle = _getStyle.newStyle,
29082
+ newArrayStyle = _getStyle.newArrayStyle;
28983
29083
  if (newStyle && !shallow_equal(style, newStyle)) {
28984
29084
  setStyle(newStyle);
29085
+ setArrayStyle(newArrayStyle || {});
28985
29086
  }
28986
29087
  });
28987
29088
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(updateStyle, [show, position, absolute, updateKey, fixedWidth]);
28988
- return style;
29089
+ return {
29090
+ style: style,
29091
+ arrayStyle: arrayStyle
29092
+ };
28989
29093
  };
28990
29094
  /* harmony default export */ var use_position_style = ((/* unused pure expression or super */ null && (usePositionStyle)));
28991
29095
  // EXTERNAL MODULE: external {"root":"ReactDOM","commonjs2":"react-dom","commonjs":"react-dom","amd":"react-dom"}
@@ -29630,6 +29734,7 @@ var AbsoluteList = function AbsoluteList(props) {
29630
29734
  _props$zIndex = props.zIndex,
29631
29735
  zIndex = _props$zIndex === void 0 ? 1051 : _props$zIndex,
29632
29736
  focus = props.focus,
29737
+ arrowRef = props.arrowRef,
29633
29738
  popupElRef = props.popupElRef,
29634
29739
  updateKey = props.updateKey,
29635
29740
  popupGap = props.popupGap,
@@ -29648,23 +29753,33 @@ var AbsoluteList = function AbsoluteList(props) {
29648
29753
  rendered: false
29649
29754
  }),
29650
29755
  context = _useRef.current;
29651
- var style = usePositionStyle({
29652
- getContainer: getRoot,
29653
- position: position,
29654
- absolute: !!absolute,
29655
- parentElRef: parentElRef,
29656
- show: focus,
29657
- fixedWidth: fixedWidth,
29658
- zIndex: zIndex,
29659
- scrollElRef: scrollElRef,
29660
- popupElRef: popupElRef,
29661
- updateKey: updateKey,
29662
- popupGap: popupGap,
29663
- adjust: adjust
29664
- });
29756
+ var _usePositionStyle = usePositionStyle({
29757
+ getContainer: getRoot,
29758
+ position: position,
29759
+ absolute: !!absolute,
29760
+ parentElRef: parentElRef,
29761
+ show: focus,
29762
+ fixedWidth: fixedWidth,
29763
+ zIndex: zIndex,
29764
+ scrollElRef: scrollElRef,
29765
+ popupElRef: popupElRef,
29766
+ updateKey: updateKey,
29767
+ popupGap: popupGap,
29768
+ adjust: adjust
29769
+ }),
29770
+ style = _usePositionStyle.style,
29771
+ arrayStyle = _usePositionStyle.arrayStyle;
29665
29772
  var childStyle = children.props.style;
29666
29773
  var newStyle = objectSpread2_default()(objectSpread2_default()({}, style), childStyle);
29667
29774
  if ( /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(children) === false) return null;
29775
+ if (arrowRef && arrayStyle && Object.keys(arrayStyle).length > 0) {
29776
+ Object.keys(arrayStyle).forEach(function (key) {
29777
+ if (arrowRef.current) {
29778
+ // @ts-ignore
29779
+ arrowRef.current.style[key] = arrayStyle[key];
29780
+ }
29781
+ });
29782
+ }
29668
29783
  var styledChild = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, {
29669
29784
  style: newStyle
29670
29785
  });
@@ -29778,6 +29893,7 @@ var getMenuPosition = function getMenuPosition(target) {
29778
29893
  };
29779
29894
  var getPopoverPosition = function getPopoverPosition(target) {
29780
29895
  var priorityDirection = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'vertical';
29896
+ var popup = arguments.length > 2 ? arguments[2] : undefined;
29781
29897
  var position = 'bottom-left';
29782
29898
  if (!target) return position;
29783
29899
  var rect = target.getBoundingClientRect();
@@ -29799,11 +29915,24 @@ var getPopoverPosition = function getPopoverPosition(target) {
29799
29915
  position += '-top';
29800
29916
  }
29801
29917
  } else {
29918
+ var popupRect = popup === null || popup === void 0 ? void 0 : popup.getBoundingClientRect();
29802
29919
  if (verticalPoint > windowHeight / 2) position = 'top';else position = 'bottom';
29803
- if (horizontalPoint > windowWidth * 0.6) {
29804
- position += '-right';
29805
- } else if (horizontalPoint < windowWidth * 0.4) {
29806
- position += '-left';
29920
+
29921
+ // 如果渲染了弹出内容,则根据弹出内容宽度计算是否自动调整位置
29922
+ if (popupRect) {
29923
+ if ((popupRect === null || popupRect === void 0 ? void 0 : popupRect.width) / 2 > rect.left) {
29924
+ position += '-left';
29925
+ }
29926
+ if ((popupRect === null || popupRect === void 0 ? void 0 : popupRect.width) / 2 > windowWidth - rect.right) {
29927
+ position += '-right';
29928
+ }
29929
+ } else {
29930
+ // 兜底计算
29931
+ if (horizontalPoint > windowWidth * 0.6) {
29932
+ position += '-right';
29933
+ } else if (horizontalPoint < windowWidth * 0.4) {
29934
+ position += '-left';
29935
+ }
29807
29936
  }
29808
29937
  }
29809
29938
  return position;
@@ -29811,7 +29940,8 @@ var getPopoverPosition = function getPopoverPosition(target) {
29811
29940
  var getPosition = function getPosition(target) {
29812
29941
  var priorityDirection = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'vertical';
29813
29942
  var mode = arguments.length > 2 ? arguments[2] : undefined;
29814
- if (mode === 'popover') return getPopoverPosition(target, priorityDirection);
29943
+ var popup = arguments.length > 3 ? arguments[3] : undefined;
29944
+ if (mode === 'popover') return getPopoverPosition(target, priorityDirection, popup);
29815
29945
  if (mode === 'menu') return getMenuPosition(target, priorityDirection);
29816
29946
  return 'bottom-left';
29817
29947
  };
@@ -29853,6 +29983,7 @@ var usePopup = function usePopup(props) {
29853
29983
  removeChild = _useContext.removeChild;
29854
29984
  var targetRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
29855
29985
  var popupRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
29986
+ var arrowRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
29856
29987
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
29857
29988
  bindChild(popupRef);
29858
29989
  return function () {
@@ -29884,11 +30015,12 @@ var usePopup = function usePopup(props) {
29884
30015
  setPositionState = _useState4[1];
29885
30016
  var position = isPositionControl ? props.position : positionState;
29886
30017
  var updatePosition = use_persist_fn(function () {
29887
- if (isPositionControl) return;
29888
- if (props.position === 'auto' || !props.position) {
29889
- var newPosition = getPosition(targetRef.current, props.priorityDirection, autoMode);
30018
+ // if (isPositionControl) return;
30019
+ // if (props.position === 'auto' || !props.position) {
30020
+ setTimeout(function () {
30021
+ var newPosition = getPosition(targetRef.current, props.priorityDirection, autoMode, popupRef.current || undefined);
29890
30022
  if (newPosition !== position) setPositionState(newPosition);
29891
- }
30023
+ }, 10);
29892
30024
  });
29893
30025
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
29894
30026
  if (props.open) {
@@ -30017,6 +30149,7 @@ var usePopup = function usePopup(props) {
30017
30149
  position: position,
30018
30150
  targetRef: targetRef,
30019
30151
  popupRef: popupRef,
30152
+ arrowRef: arrowRef,
30020
30153
  getTargetProps: getTargetProps,
30021
30154
  openPop: openPop,
30022
30155
  closePop: closePop,
@@ -31411,11 +31544,15 @@ var FormFooterProvider = function FormFooterProvider(props) {
31411
31544
  formStats = _useState2[0],
31412
31545
  setFormS = _useState2[1];
31413
31546
  var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
31414
- submit: function submit() {}
31547
+ submit: function submit() {},
31548
+ hasSubmit: false
31415
31549
  }),
31416
31550
  context = _useRef.current;
31417
31551
  var setFormInfo = usePersistFn(function (info) {
31418
- context.submit = info.submit;
31552
+ if (!context.hasSubmit) {
31553
+ context.submit = info.submit;
31554
+ context.hasSubmit = true;
31555
+ }
31419
31556
  });
31420
31557
  var setFormStats = usePersistFn(function (disabled) {
31421
31558
  if (disabled !== formStats) {
@@ -36758,7 +36895,7 @@ var ResultInput = function ResultInput(props) {
36758
36895
 
36759
36896
  var Done = 2;
36760
36897
  var Finish = 0;
36761
- var Pendding = 1;
36898
+ var Pending = 1;
36762
36899
  var isEmpty = is_isEmpty,
36763
36900
  use_tag_isPromise = isPromise,
36764
36901
  use_tag_isString = isString,
@@ -36809,7 +36946,7 @@ var useTag = function useTag(props) {
36809
36946
  if (typeof onClose === 'function') {
36810
36947
  callback = onClose(e);
36811
36948
  if (use_tag_isPromise(callback)) {
36812
- setDismiss(Pendding);
36949
+ setDismiss(Pending);
36813
36950
  callback.then(function () {
36814
36951
  setDismiss(Done);
36815
36952
  }).catch(function () {
@@ -36915,7 +37052,7 @@ var tag_excluded = ["jssStyle", "className", "type", "color", "size", "disabled"
36915
37052
 
36916
37053
 
36917
37054
  var tag_Done = 2;
36918
- var tag_Pendding = 1;
37055
+ var tag_Pending = 1;
36919
37056
  var Tag = function Tag(props) {
36920
37057
  var _jssStyle$tag;
36921
37058
  var jssStyle = props.jssStyle,
@@ -36998,7 +37135,7 @@ var Tag = function Tag(props) {
36998
37135
  if (!showClose) {
36999
37136
  return null;
37000
37137
  }
37001
- if (dismiss === tag_Pendding) {
37138
+ if (dismiss === tag_Pending) {
37002
37139
  // 后面用 Spin 替换
37003
37140
  return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {});
37004
37141
  }
@@ -37110,7 +37247,7 @@ var More = function More(props) {
37110
37247
  var before = [];
37111
37248
  var after = [];
37112
37249
  var itemsLength = 0;
37113
- var tagStlye = shouldShowMore ? {
37250
+ var tagStyle = shouldShowMore ? {
37114
37251
  position: 'absolute',
37115
37252
  zIndex: -100,
37116
37253
  userSelect: 'none',
@@ -37158,7 +37295,7 @@ var More = function More(props) {
37158
37295
  className: styles.tag,
37159
37296
  jssStyle: jssStyle,
37160
37297
  size: size,
37161
- style: tagStlye,
37298
+ style: tagStyle,
37162
37299
  mode: visible ? 'fill' : 'bright',
37163
37300
  color: visible ? 'info' : 'default',
37164
37301
  children: shouldShowMore ? '+' : "+".concat(itemsLength)
@@ -37797,8 +37934,8 @@ var Cascader = function Cascader(props0) {
37797
37934
  return;
37798
37935
  }
37799
37936
  };
37800
- var handleChange = function handleChange(item) {
37801
- onChange === null || onChange === void 0 || onChange(item);
37937
+ var handleChange = function handleChange(item, selectId) {
37938
+ onChange === null || onChange === void 0 || onChange(item, selectId);
37802
37939
  };
37803
37940
  var handleClear = function handleClear(e) {
37804
37941
  e.stopPropagation();
@@ -38752,11 +38889,11 @@ function useFormControl(props) {
38752
38889
  if (inForm && controlFunc) {
38753
38890
  if (isArray(name)) {
38754
38891
  name.forEach(function (n) {
38755
- controlFunc.unbind(n, reserveAble);
38892
+ controlFunc.unbind(n, reserveAble, validateFiled, update);
38756
38893
  updateError(n, undefined);
38757
38894
  });
38758
38895
  } else {
38759
- controlFunc.unbind(name, reserveAble);
38896
+ controlFunc.unbind(name, reserveAble, validateFiled, update);
38760
38897
  updateError(name, undefined);
38761
38898
  }
38762
38899
  }
@@ -39223,6 +39360,10 @@ var checkbox_group_Group = function Group(props0) {
39223
39360
  } else {
39224
39361
  datum.remove(raw);
39225
39362
  }
39363
+ if (children && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().isValidElement(children)) {
39364
+ var _children$props$onCha, _children$props;
39365
+ (_children$props$onCha = (_children$props = children.props).onChange) === null || _children$props$onCha === void 0 || _children$props$onCha.call(_children$props, _, checked, children.props.htmlValue);
39366
+ }
39226
39367
  });
39227
39368
  var isChecked = usePersistFn(function (d) {
39228
39369
  return datum.check(d);
@@ -40642,11 +40783,12 @@ function clearHMS(date, options) {
40642
40783
  function compareDateArray(arr1, arr2) {
40643
40784
  var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'date';
40644
40785
  var options = arguments.length > 3 ? arguments[3] : undefined;
40786
+ var fmt = arguments.length > 4 ? arguments[4] : undefined;
40645
40787
  if (!arr1 || !arr2 || arr1.length !== arr2.length) return false;
40646
40788
  return arr1.every(function (v, i) {
40647
40789
  if (!v || !arr2[i]) return false;
40648
40790
  if (type === 'week') return format(v, 'gggg ww', options) === format(arr2[i], 'gggg ww', options);
40649
- return v.getTime() === arr2[i].getTime();
40791
+ return toDateWithFormat(v, fmt).getTime() === toDateWithFormat(arr2[i], fmt).getTime();
40650
40792
  });
40651
40793
  }
40652
40794
  function getFormat(fo) {
@@ -40942,7 +41084,7 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
40942
41084
  }
40943
41085
  } else {
40944
41086
  var _props$onChange;
40945
- var emptyValue = props.clearWithUndefined ? undefined : '';
41087
+ var emptyValue = props.clearWithUndefined || props.clearToUndefined ? undefined : '';
40946
41088
  var v = emptyValue;
40947
41089
  if (range) {
40948
41090
  v = [emptyValue, emptyValue];
@@ -40951,6 +41093,8 @@ var useDatePickerFormat = function useDatePickerFormat(props) {
40951
41093
  v = [props.value[0], emptyValue];
40952
41094
  } else if (props.value[1] && disabledStatus === 'right') {
40953
41095
  v = [emptyValue, props.value[1]];
41096
+ } else if (props.clearToUndefined) {
41097
+ v = undefined;
40954
41098
  }
40955
41099
  }
40956
41100
  }
@@ -41116,11 +41260,11 @@ var useDate = function useDate(props) {
41116
41260
  var getDateWithTime = function getDateWithTime(date) {
41117
41261
  return util.getDateWithTime(date, props.value, props.defaultTime, props.min, props.max, options);
41118
41262
  };
41119
- var handleDayClick = function handleDayClick(date) {
41263
+ var handleDayClick = function handleDayClick(date, noClose) {
41120
41264
  var _props$onChange;
41121
41265
  if (isDisabled(date)) return;
41122
41266
  var newDate = getDateWithTime(date);
41123
- (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, newDate);
41267
+ (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, newDate, noClose);
41124
41268
  setCurrent(newDate);
41125
41269
  };
41126
41270
  var getTimeStr = function getTimeStr() {
@@ -41590,8 +41734,8 @@ var Day = function Day(props) {
41590
41734
  direction = _useConfig.direction;
41591
41735
  var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$datePicker = jssStyle.datePicker) === null || _jssStyle$datePicker === void 0 ? void 0 : _jssStyle$datePicker.call(jssStyle);
41592
41736
  var areaType = props.type === 'week' ? 'week' : 'day';
41593
- var onChange = usePersistFn(function (date) {
41594
- props.onChange(date, props.type === 'datetime');
41737
+ var onChange = usePersistFn(function (date, noClose) {
41738
+ props.onChange(date, noClose || props.type === 'datetime');
41595
41739
  props.setTarget(undefined);
41596
41740
  });
41597
41741
  var setCurrent = usePersistFn(function (date) {
@@ -41633,7 +41777,12 @@ var Day = function Day(props) {
41633
41777
  dir: direction,
41634
41778
  className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.pickerCell, isActive && (styles === null || styles === void 0 ? void 0 : styles.pickerCellActive), !isCurrentMonth && (styles === null || styles === void 0 ? void 0 : styles.pickerCellBound), isDisabled && (styles === null || styles === void 0 ? void 0 : styles.pickerCellDisabled), isToday && (styles === null || styles === void 0 ? void 0 : styles.pickerCellToday), isInRange && (styles === null || styles === void 0 ? void 0 : styles.pickerCellInRange), (isInRange === 'start' || isInRange === 'start-end') && props.position === 'start' && (styles === null || styles === void 0 ? void 0 : styles.pickerCellInRangeStart), (isInRange === 'end' || isInRange === 'start-end') && props.position === 'end' && (styles === null || styles === void 0 ? void 0 : styles.pickerCellInRangeEnd)),
41635
41779
  onClick: function onClick() {
41636
- return func.handleDayClick(item);
41780
+ if (props.range) {
41781
+ func.handleDayClick(item, props.clickTimes < 1);
41782
+ props.setClickTimes(props.clickTimes + 1);
41783
+ } else {
41784
+ func.handleDayClick(item);
41785
+ }
41637
41786
  },
41638
41787
  onDoubleClick: function onDoubleClick() {
41639
41788
  var _props$onDoubleClick;
@@ -42512,10 +42661,15 @@ var Quick = function Quick(props) {
42512
42661
  quickSelect = props.quickSelect,
42513
42662
  format = props.format,
42514
42663
  options = props.options,
42515
- children = props.children;
42664
+ children = props.children,
42665
+ type = props.type;
42516
42666
  var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$datePicker = jssStyle.datePicker) === null || _jssStyle$datePicker === void 0 ? void 0 : _jssStyle$datePicker.call(jssStyle);
42517
- var handleClick = function handleClick(item) {
42667
+ var quickDateCache = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
42668
+ var quickActiveKey = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)();
42669
+ var handleClick = function handleClick(item, index) {
42518
42670
  var itemV = isFunc(item.value) ? item.value() : item.value;
42671
+ quickDateCache.current = itemV;
42672
+ quickActiveKey.current = index;
42519
42673
  if (!isArray(itemV)) {
42520
42674
  itemV = [itemV];
42521
42675
  }
@@ -42531,13 +42685,23 @@ var Quick = function Quick(props) {
42531
42685
  if (!(quickSelect !== null && quickSelect !== void 0 && quickSelect.length)) {
42532
42686
  return children || null;
42533
42687
  }
42688
+ var compareDate = function compareDate(index) {
42689
+ if (!quickDateCache.current) return false;
42690
+ if (index !== quickActiveKey.current) return false;
42691
+ var currentArr = quickDateCache.current;
42692
+ if (!isArray(currentArr)) {
42693
+ currentArr = [currentArr];
42694
+ }
42695
+ return util.compareDateArray(currentArr, props.dateArr, type, options, format);
42696
+ };
42534
42697
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
42535
42698
  className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.quickPicker, styles === null || styles === void 0 ? void 0 : styles.picker),
42536
42699
  children: quickSelect === null || quickSelect === void 0 ? void 0 : quickSelect.map(function (item, index) {
42700
+ var isActive = compareDate(index);
42537
42701
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
42538
- className: styles === null || styles === void 0 ? void 0 : styles.quickPickerItem,
42702
+ className: classnames_default()(styles === null || styles === void 0 ? void 0 : styles.quickPickerItem, isActive && (styles === null || styles === void 0 ? void 0 : styles.quickPickerActiveItem)),
42539
42703
  onClick: function onClick() {
42540
- handleClick(item);
42704
+ handleClick(item, index);
42541
42705
  },
42542
42706
  children: item.name
42543
42707
  }, index);
@@ -42775,7 +42939,8 @@ var Picker = function Picker(props) {
42775
42939
  dateArr = props.dateArr,
42776
42940
  options = props.options,
42777
42941
  jssStyle = props.jssStyle,
42778
- isDisabledDate = props.isDisabledDate;
42942
+ isDisabledDate = props.isDisabledDate,
42943
+ type = props.type;
42779
42944
  var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$datePicker = jssStyle.datePicker) === null || _jssStyle$datePicker === void 0 ? void 0 : _jssStyle$datePicker.call(jssStyle);
42780
42945
  var _useDatePickerRange = use_datepicker_range({
42781
42946
  type: props.type,
@@ -42832,7 +42997,10 @@ var Picker = function Picker(props) {
42832
42997
  setTarget: position === 'end' ? func.setTargetEnd : func.setTargetStart,
42833
42998
  registerModeDisabled: props.registerModeDisabled,
42834
42999
  onMouseEnter: function onMouseEnter() {},
42835
- onMouseLeave: function onMouseLeave() {}
43000
+ onMouseLeave: function onMouseLeave() {},
43001
+ range: range,
43002
+ setClickTimes: props.setClickTimes,
43003
+ clickTimes: props.clickTimes
42836
43004
  };
42837
43005
  if (range) {
42838
43006
  commonProps['onMouseEnter'] = position === 'end' ? handleEnterEnd : handleEnterStart;
@@ -42888,6 +43056,7 @@ var Picker = function Picker(props) {
42888
43056
  range: props.range,
42889
43057
  jssStyle: jssStyle,
42890
43058
  dateArr: dateArr,
43059
+ type: type,
42891
43060
  setDateArr: props.setDateArr,
42892
43061
  setCurrentArr: props.setCurrentArr,
42893
43062
  format: props.format,
@@ -42945,16 +43114,20 @@ var DatePicker = function DatePicker(props0) {
42945
43114
  _React$useState2 = slicedToArray_default()(_React$useState, 2),
42946
43115
  activeIndex = _React$useState2[0],
42947
43116
  setActiveIndex = _React$useState2[1];
43117
+ var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(0),
43118
+ _React$useState4 = slicedToArray_default()(_React$useState3, 2),
43119
+ clickTimes = _React$useState4[0],
43120
+ setClickTimes = _React$useState4[1];
42948
43121
  var inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
42949
43122
  inputRef: null
42950
43123
  });
42951
43124
  var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$datePicker = jssStyle.datePicker) === null || _jssStyle$datePicker === void 0 ? void 0 : _jssStyle$datePicker.call(jssStyle);
42952
43125
  var isRTL = direction === 'rtl';
42953
43126
  var dfp = isRTL ? 'bottom-right' : 'bottom-left';
42954
- var _React$useState3 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(false),
42955
- _React$useState4 = slicedToArray_default()(_React$useState3, 2),
42956
- focused = _React$useState4[0],
42957
- setFocused = _React$useState4[1];
43127
+ var _React$useState5 = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useState(false),
43128
+ _React$useState6 = slicedToArray_default()(_React$useState5, 2),
43129
+ focused = _React$useState6[0],
43130
+ setFocused = _React$useState6[1];
42958
43131
  var listPosition = props.position || dfp;
42959
43132
  if (date_picker_horizontalPosition.includes(listPosition)) {
42960
43133
  listPosition = listPosition.split('-').reverse().join('-');
@@ -42982,6 +43155,7 @@ var DatePicker = function DatePicker(props0) {
42982
43155
  clearable: clearable,
42983
43156
  disabled: disabled,
42984
43157
  clearWithUndefined: props.clearWithUndefined,
43158
+ clearToUndefined: props.clearToUndefined,
42985
43159
  onClear: undefined,
42986
43160
  allowSingle: props.allowSingle,
42987
43161
  defaultCurrent: props.defaultPickerValue || props.defaultRangeMonth,
@@ -43049,6 +43223,7 @@ var DatePicker = function DatePicker(props0) {
43049
43223
  var handleClose = function handleClose() {
43050
43224
  var _inputRef$current$inp;
43051
43225
  closePop();
43226
+ setClickTimes(0);
43052
43227
  (_inputRef$current$inp = inputRef.current.inputRef) === null || _inputRef$current$inp === void 0 || _inputRef$current$inp.blur();
43053
43228
  };
43054
43229
  var handleResultClick = usePersistFn(function () {
@@ -43157,6 +43332,8 @@ var DatePicker = function DatePicker(props0) {
43157
43332
  disabledTime: props.disabledTime,
43158
43333
  quickSelect: props.quickSelect,
43159
43334
  showSelNow: props.showSelNow,
43335
+ clickTimes: clickTimes,
43336
+ setClickTimes: setClickTimes,
43160
43337
  setActiveIndex: setActiveIndex,
43161
43338
  hourStep: props.hourStep,
43162
43339
  minuteStep: props.minuteStep,
@@ -45531,8 +45708,10 @@ var useForm = function useForm(props) {
45531
45708
  var _context$flowMap$glob;
45532
45709
  if (!name) {
45533
45710
  Object.keys(context.updateMap).forEach(function (key) {
45534
- var _context$updateMap$ke, _context$updateMap;
45535
- (_context$updateMap$ke = (_context$updateMap = context.updateMap)[key]) === null || _context$updateMap$ke === void 0 || _context$updateMap$ke.call(_context$updateMap, context.value, context.errors, context.serverErrors);
45711
+ var _context$updateMap$ke;
45712
+ (_context$updateMap$ke = context.updateMap[key]) === null || _context$updateMap$ke === void 0 || _context$updateMap$ke.forEach(function (update) {
45713
+ update(context.value, context.errors, context.serverErrors);
45714
+ });
45536
45715
  });
45537
45716
  Object.keys(context.flowMap).forEach(function (key) {
45538
45717
  context.flowMap[key].forEach(function (update) {
@@ -45542,8 +45721,10 @@ var useForm = function useForm(props) {
45542
45721
  } else {
45543
45722
  var names = isArray(name) ? name : [name];
45544
45723
  names.forEach(function (key) {
45545
- var _context$updateMap$ke2, _context$updateMap2, _context$flowMap$key;
45546
- (_context$updateMap$ke2 = (_context$updateMap2 = context.updateMap)[key]) === null || _context$updateMap$ke2 === void 0 || _context$updateMap$ke2.call(_context$updateMap2, context.value, context.errors, context.serverErrors);
45724
+ var _context$updateMap$ke2, _context$flowMap$key;
45725
+ (_context$updateMap$ke2 = context.updateMap[key]) === null || _context$updateMap$ke2 === void 0 || _context$updateMap$ke2.forEach(function (update) {
45726
+ update(context.value, context.errors, context.serverErrors);
45727
+ });
45547
45728
  (_context$flowMap$key = context.flowMap[key]) === null || _context$flowMap$key === void 0 || _context$flowMap$key.forEach(function (update) {
45548
45729
  update();
45549
45730
  });
@@ -45599,9 +45780,11 @@ var useForm = function useForm(props) {
45599
45780
  }) : Object.keys(context.validateMap);
45600
45781
  var validates = files2.map(function (key) {
45601
45782
  var validateField = context.validateMap[key];
45602
- return validateField(key, deepGet(context.value, key), context.value, config);
45783
+ return Array.from(validateField).map(function (validate) {
45784
+ return validate(key, deepGet(context.value, key), context.value, config);
45785
+ });
45603
45786
  });
45604
- Promise.all(validates).then(function (results) {
45787
+ Promise.all(validates.flat()).then(function (results) {
45605
45788
  var error = results.find(function (n) {
45606
45789
  return n !== true;
45607
45790
  });
@@ -45646,8 +45829,10 @@ var useForm = function useForm(props) {
45646
45829
  Object.keys(vals).forEach(function (key) {
45647
45830
  deepSet(draft, key, vals[key], deepSetOptions);
45648
45831
  if (option.validate) {
45649
- var _context$validateMap$, _context$validateMap;
45650
- (_context$validateMap$ = (_context$validateMap = context.validateMap)[key]) === null || _context$validateMap$ === void 0 || _context$validateMap$.call(_context$validateMap, key, vals[key], current(draft));
45832
+ var _context$validateMap$;
45833
+ (_context$validateMap$ = context.validateMap[key]) === null || _context$validateMap$ === void 0 || _context$validateMap$.forEach(function (validate) {
45834
+ validate(key, vals[key], current(draft));
45835
+ });
45651
45836
  }
45652
45837
  });
45653
45838
  });
@@ -45791,12 +45976,17 @@ var useForm = function useForm(props) {
45791
45976
  var controlFunc = use_latest_obj({
45792
45977
  bind: function bind(n, df, validate, updateFn) {
45793
45978
  if (context.names.has(n)) {
45794
- console.error("name \"".concat(n, "\" already exist"));
45795
- return;
45979
+ console.warn("name \"".concat(n, "\" already exist"));
45796
45980
  }
45797
45981
  context.names.add(n);
45798
- context.validateMap[n] = validate;
45799
- context.updateMap[n] = updateFn;
45982
+ if (!context.validateMap[n]) {
45983
+ context.validateMap[n] = new Set();
45984
+ }
45985
+ context.validateMap[n].add(validate);
45986
+ if (!context.updateMap[n]) {
45987
+ context.updateMap[n] = new Set();
45988
+ }
45989
+ context.updateMap[n].add(updateFn);
45800
45990
  context.removeArr.delete(n);
45801
45991
  if (df !== undefined && deepGet(context.value, n) === undefined) {
45802
45992
  if (!context.mounted) context.defaultValues[n] = df;
@@ -45806,11 +45996,19 @@ var useForm = function useForm(props) {
45806
45996
  }
45807
45997
  update(n);
45808
45998
  },
45809
- unbind: function unbind(n, reserveAble) {
45810
- delete context.validateMap[n];
45811
- delete context.defaultValues[n];
45812
- delete context.updateMap[n];
45813
- context.names.delete(n);
45999
+ unbind: function unbind(n, reserveAble, validateFiled, update) {
46000
+ var validateFieldSet = context.validateMap[n];
46001
+ if (validateFiled && validateFieldSet.has(validateFiled)) {
46002
+ validateFieldSet.delete(validateFiled);
46003
+ }
46004
+ var updateFieldSet = context.updateMap[n];
46005
+ if (update && updateFieldSet.has(update)) {
46006
+ updateFieldSet.delete(update);
46007
+ }
46008
+ if (validateFieldSet.size === 0 && updateFieldSet.size === 0) {
46009
+ context.names.delete(n);
46010
+ delete context.defaultValues[n];
46011
+ }
45814
46012
  if (!reserveAble && !context.removeLock) {
45815
46013
  addRemove(n);
45816
46014
  }
@@ -45885,12 +46083,12 @@ var useForm = function useForm(props) {
45885
46083
  external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
45886
46084
  // 服务端错误更新
45887
46085
  if (!props.error) context.serverErrors = {};else {
45888
- var _errors = Object.keys(props.error).reduce(function (prev, cur) {
46086
+ var errors = Object.keys(props.error).reduce(function (prev, cur) {
45889
46087
  var item = props.error[cur];
45890
46088
  var error = item instanceof Error ? item : new Error(item);
45891
46089
  return objectSpread2_default()(objectSpread2_default()({}, prev), {}, defineProperty_default()({}, cur, error));
45892
46090
  }, {});
45893
- context.serverErrors = _errors;
46091
+ context.serverErrors = errors;
45894
46092
  }
45895
46093
  update();
45896
46094
  }, [props.error]);
@@ -46008,7 +46206,9 @@ var Form = function Form(props) {
46008
46206
  if (status !== (modalFormContext === null || modalFormContext === void 0 ? void 0 : modalFormContext.formStats)) {
46009
46207
  modalFormContext === null || modalFormContext === void 0 || modalFormContext.setFormStats(status);
46010
46208
  }
46011
- modalFormContext === null || modalFormContext === void 0 || modalFormContext.setFormInfo(formRefObj);
46209
+ if (props.onSubmit) {
46210
+ modalFormContext === null || modalFormContext === void 0 || modalFormContext.setFormInfo(formRefObj);
46211
+ }
46012
46212
  };
46013
46213
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
46014
46214
  handleFormModalInfo();
@@ -48453,6 +48653,8 @@ var usePaginationList = function usePaginationList(props) {
48453
48653
 
48454
48654
  var Scroll = function Scroll(props) {
48455
48655
  var containerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
48656
+ var scrollRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
48657
+ var wrapperRef = useForkRef(scrollRef, props.wrapperRef);
48456
48658
  var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
48457
48659
  timer: null,
48458
48660
  isMouseDown: false,
@@ -48542,6 +48744,13 @@ var Scroll = function Scroll(props) {
48542
48744
  fromDrag: context.isMouseDown
48543
48745
  });
48544
48746
  });
48747
+ var handleInnerScroll = usePersistFn(function (e) {
48748
+ var scrollTop = e.currentTarget.scrollTop;
48749
+ if (scrollRef.current) {
48750
+ e.currentTarget.scrollTop = 0;
48751
+ scrollRef.current.scrollTop += scrollTop;
48752
+ }
48753
+ });
48545
48754
  return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
48546
48755
  className: props.className,
48547
48756
  style: props.style,
@@ -48551,7 +48760,7 @@ var Scroll = function Scroll(props) {
48551
48760
  })), {}, {
48552
48761
  style: scrollerStyle,
48553
48762
  onScroll: handleScroll,
48554
- ref: props.wrapperRef,
48763
+ ref: wrapperRef,
48555
48764
  onMouseDown: function onMouseDown() {
48556
48765
  context.isMouseDown = true;
48557
48766
  },
@@ -48563,6 +48772,7 @@ var Scroll = function Scroll(props) {
48563
48772
  })), {}, {
48564
48773
  style: containerStyle,
48565
48774
  ref: containerRef,
48775
+ onScroll: handleInnerScroll,
48566
48776
  children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
48567
48777
  style: objectSpread2_default()({
48568
48778
  flexGrow: 1
@@ -48598,30 +48808,110 @@ var VirtualList = function VirtualList(props) {
48598
48808
  _props$tag = props.tag,
48599
48809
  tag = _props$tag === void 0 ? 'div' : _props$tag,
48600
48810
  tagClassName = props.tagClassName,
48811
+ dynamicVirtual = props.dynamicVirtual,
48601
48812
  virtualRef = props.virtualRef,
48602
48813
  onControlTypeChange = props.onControlTypeChange;
48603
48814
  var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
48604
48815
  _useState2 = slicedToArray_default()(_useState, 2),
48605
- currentIndex = _useState2[0],
48606
- setCurrentIndex = _useState2[1];
48816
+ top = _useState2[0],
48817
+ setTop = _useState2[1];
48607
48818
  var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
48608
48819
  _useState4 = slicedToArray_default()(_useState3, 2),
48609
- top = _useState4[0],
48610
- setTop = _useState4[1];
48820
+ offsetY = _useState4[0],
48821
+ setOffsetY = _useState4[1];
48822
+ var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(props.data.length * lineHeight),
48823
+ _useState6 = slicedToArray_default()(_useState5, 2),
48824
+ scrollHeight = _useState6[0],
48825
+ setHeight = _useState6[1];
48826
+ var _useState7 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
48827
+ _useState8 = slicedToArray_default()(_useState7, 2),
48828
+ startIndex = _useState8[0],
48829
+ setCurrentIndex = _useState8[1];
48611
48830
  var wrapperRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
48612
- var getScrollHeight = function getScrollHeight() {
48613
- var rows = Math.ceil(data.length);
48614
- return rows * lineHeight;
48831
+ var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
48832
+ cachedHeight: [],
48833
+ controlScrollRate: null,
48834
+ heightCallback: null,
48835
+ preIndex: null,
48836
+ topTimer: null,
48837
+ rateTimer: null,
48838
+ shouldUpdateHeight: true
48839
+ }),
48840
+ context = _useRef.current;
48841
+ var getContentHeight = function getContentHeight(index) {
48842
+ var sum = 0;
48843
+ for (var i = 0; i <= index; i++) {
48844
+ sum += context.cachedHeight[i] || lineHeight;
48845
+ }
48846
+ return sum;
48615
48847
  };
48616
48848
  var getCurrentIndex = usePersistFn(function () {
48617
- return currentIndex;
48849
+ return startIndex;
48618
48850
  });
48619
48851
  var getTop = usePersistFn(function () {
48620
48852
  return top;
48621
48853
  });
48854
+ var setRowHeight = usePersistFn(function (index, height) {
48855
+ var beforeHeight = context.cachedHeight[index];
48856
+ if (beforeHeight && beforeHeight === height) return;
48857
+ context.cachedHeight[index] = height;
48858
+ if (context.shouldUpdateHeight) {
48859
+ setHeight(getContentHeight(props.data.length - 1));
48860
+ }
48861
+ var preIndex = context.preIndex;
48862
+ // 解决: 从下往上滚 由于高度变化会导致滚动条跳动
48863
+ if (preIndex && preIndex > startIndex && startIndex === index) {
48864
+ // 发生在顶部
48865
+ if (context.heightCallback) return;
48866
+ var offset = height - (beforeHeight || lineHeight);
48867
+ setOffsetY(function (s) {
48868
+ return s + offset;
48869
+ });
48870
+ }
48871
+ });
48872
+ var updateRateScroll = usePersistFn(function (rate) {
48873
+ var sumHeight = getContentHeight(props.data.length - 1);
48874
+ if (sumHeight === scrollHeight) return;
48875
+ context.shouldUpdateHeight = true;
48876
+ context.heightCallback = function () {
48877
+ if (wrapperRef && wrapperRef.current) {
48878
+ var _scrollHeight = wrapperRef.current.scrollHeight;
48879
+ var clientHeight = wrapperRef.current.clientHeight;
48880
+ var nowTop = wrapperRef.current.scrollTop;
48881
+ var max = _scrollHeight - clientHeight;
48882
+ var _top = rate * max;
48883
+ if (Math.abs(nowTop - _top) < 1) {
48884
+ context.controlScrollRate = null;
48885
+ } else {
48886
+ context.controlScrollRate = rate;
48887
+ wrapperRef.current.scrollTop = _top;
48888
+ }
48889
+ }
48890
+ };
48891
+ setHeight(sumHeight);
48892
+ });
48893
+ var updateIndexAndTopFromTop = function updateIndexAndTopFromTop(scrollTop) {
48894
+ var sum = 0;
48895
+ var nextCurrentIndex = 0;
48896
+ var top = 0;
48897
+ var maxIndex = Math.max(props.data.length - rowsInView, 0);
48898
+ for (var i = 0; i <= maxIndex; i++) {
48899
+ sum += context.cachedHeight[i] || lineHeight;
48900
+ if (scrollTop < sum || i === maxIndex) {
48901
+ nextCurrentIndex = i;
48902
+ var beforeHeight = i === 0 ? 0 : sum - (context.cachedHeight[i] || lineHeight);
48903
+ top = scrollTop - beforeHeight;
48904
+ break;
48905
+ }
48906
+ }
48907
+ if (nextCurrentIndex !== startIndex) {
48908
+ setCurrentIndex(nextCurrentIndex);
48909
+ }
48910
+ setTop(top);
48911
+ };
48622
48912
  var handleScrollByStep = usePersistFn(function (step, top) {
48623
48913
  var _wrapperRef$current;
48624
- var next = currentIndex + step;
48914
+ var next = startIndex + step;
48625
48915
  (_wrapperRef$current = wrapperRef.current) === null || _wrapperRef$current === void 0 || _wrapperRef$current.scrollTo({
48626
48916
  top: next * lineHeight + (top || 0)
48627
48917
  });
@@ -48631,21 +48921,36 @@ var VirtualList = function VirtualList(props) {
48631
48921
  };
48632
48922
  var handleScroll = function handleScroll(info) {
48633
48923
  var _props$onScroll;
48634
- var current = Math.floor(info.scrollTop / lineHeight);
48635
- var top = info.scrollTop - current * lineHeight;
48924
+ var scrollLeft = info.scrollLeft,
48925
+ height = info.height,
48926
+ y = info.y,
48927
+ fromDrag = info.fromDrag;
48928
+ var scrollTop = info.scrollTop;
48929
+ context.shouldUpdateHeight = !fromDrag;
48930
+ var sumHeight = getContentHeight(props.data.length - 1);
48931
+ var max = sumHeight - height;
48932
+ if (scrollTop > max) {
48933
+ scrollTop = max;
48934
+ }
48935
+ if (fromDrag) {
48936
+ var _top2 = y * max;
48937
+ updateIndexAndTopFromTop(_top2);
48938
+ if (context.rateTimer) clearTimeout(context.rateTimer);
48939
+ context.rateTimer = setTimeout(function () {
48940
+ updateRateScroll(y);
48941
+ }, 120);
48942
+ } else {
48943
+ updateIndexAndTopFromTop(scrollTop);
48944
+ }
48636
48945
  (_props$onScroll = props.onScroll) === null || _props$onScroll === void 0 || _props$onScroll.call(props, info);
48637
- setTop(top);
48638
- setCurrentIndex(current);
48639
48946
  };
48640
- var scrollHeight = getScrollHeight();
48641
48947
  var renderList = function renderList() {
48642
- var start = currentIndex;
48643
- var end = currentIndex + rowsInView;
48644
- var items = data.slice(start, end);
48948
+ var items = data.slice(startIndex, startIndex + rowsInView);
48645
48949
  var Tag = tag;
48646
48950
  var shouldScroll = data.length * lineHeight > height;
48647
48951
  var nextStyle = objectSpread2_default()({}, style);
48648
48952
  if (shouldScroll) nextStyle.height = height;
48953
+ var scrollHeight = getContentHeight(data.length - 1);
48649
48954
  return /*#__PURE__*/(0,jsx_runtime.jsx)(virtual_scroll_scroll, {
48650
48955
  className: className,
48651
48956
  style: nextStyle,
@@ -48666,16 +48971,48 @@ var VirtualList = function VirtualList(props) {
48666
48971
  children: items.map(function (d, i) {
48667
48972
  if (d[groupKey]) {
48668
48973
  return /*#__PURE__*/(0,jsx_runtime.jsx)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
48669
- children: customRenderItem(d, currentIndex + i, i)
48974
+ children: customRenderItem(d, startIndex + i, i)
48670
48975
  }, i);
48671
48976
  }
48672
48977
  return /*#__PURE__*/(0,jsx_runtime.jsx)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
48673
- children: renderItem(d, currentIndex + i, i)
48674
- }, i);
48978
+ children: renderItem(d, startIndex + i, i, setRowHeight)
48979
+ }, dynamicVirtual ? startIndex + i : i);
48675
48980
  })
48676
48981
  })
48677
48982
  });
48678
48983
  };
48984
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
48985
+ setHeight(getContentHeight(props.data.length - 1));
48986
+ }, [data.length]);
48987
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
48988
+ if (offsetY) {
48989
+ // if (wrapperRef.current && props.innerRef.current) {
48990
+ if (wrapperRef.current) {
48991
+ setOffsetY(0);
48992
+ setTop(function (s) {
48993
+ return s + offsetY;
48994
+ });
48995
+ wrapperRef.current.scrollTop += offsetY;
48996
+ }
48997
+ }
48998
+ }, [offsetY, startIndex]);
48999
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
49000
+ // 数据变化的时候清空掉 preIndex, 如果之前有缓存的index, setRowHeight 会有问题
49001
+ return function () {
49002
+ context.preIndex = null;
49003
+ };
49004
+ }, [props.data]);
49005
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
49006
+ if (context.heightCallback) {
49007
+ var cb = context.heightCallback;
49008
+ context.heightCallback = null;
49009
+ cb();
49010
+ }
49011
+ }, [scrollHeight]);
49012
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
49013
+ // 记录preIndex
49014
+ context.preIndex = startIndex;
49015
+ }, [startIndex]);
48679
49016
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
48680
49017
  if (virtualRef !== null && virtualRef !== void 0 && virtualRef.current) {
48681
49018
  virtualRef.current.scrollByStep = handleScrollByStep;
@@ -48908,6 +49245,8 @@ var UseSelectGroup = function UseSelectGroup(props) {
48908
49245
 
48909
49246
 
48910
49247
 
49248
+
49249
+
48911
49250
  var ListOption = function ListOption(props) {
48912
49251
  var _jssStyle$select;
48913
49252
  var jssStyle = props.jssStyle,
@@ -48918,8 +49257,10 @@ var ListOption = function ListOption(props) {
48918
49257
  multiple = props.multiple,
48919
49258
  isHover = props.isHover,
48920
49259
  renderItem = props.renderItem,
49260
+ dynamicVirtual = props.dynamicVirtual,
48921
49261
  onHover = props.onHover,
48922
49262
  onOptionClick = props.onOptionClick;
49263
+ var optionRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
48923
49264
  var config = useConfig();
48924
49265
  var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$select = jssStyle.select) === null || _jssStyle$select === void 0 ? void 0 : _jssStyle$select.call(jssStyle);
48925
49266
  var isChecked = datum.check(data);
@@ -48938,6 +49279,13 @@ var ListOption = function ListOption(props) {
48938
49279
  }
48939
49280
  onOptionClick(data, index);
48940
49281
  };
49282
+ var setVirtualRowHeight = usePersistFn(function () {
49283
+ if (!props.setRowHeight || !optionRef.current) return;
49284
+ var optionHeight = optionRef.current.getBoundingClientRect().height;
49285
+ if (optionHeight !== 0) {
49286
+ props.setRowHeight(index, optionHeight);
49287
+ }
49288
+ });
48941
49289
  var renderCheckedIcon = function renderCheckedIcon() {
48942
49290
  return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
48943
49291
  className: styles.checkedIcon,
@@ -48947,13 +49295,22 @@ var ListOption = function ListOption(props) {
48947
49295
  };
48948
49296
  var result = renderItem(data);
48949
49297
  var title = typeof result === 'string' ? result : '';
49298
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(setVirtualRowHeight, []);
49299
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
49300
+ if (!optionRef.current) return;
49301
+ var cancelObserver = addResizeObserver(optionRef.current, setVirtualRowHeight, {
49302
+ direction: 'y'
49303
+ });
49304
+ return function () {
49305
+ cancelObserver();
49306
+ };
49307
+ }, []);
48950
49308
  return /*#__PURE__*/(0,jsx_runtime.jsx)("li", {
49309
+ ref: optionRef,
48951
49310
  tabIndex: -1,
48952
49311
  className: rootClass,
48953
49312
  title: title,
48954
- style: {
48955
- height: lineHeight
48956
- },
49313
+ style: defineProperty_default()({}, dynamicVirtual ? 'minHeight' : 'height', lineHeight),
48957
49314
  onClick: handleClick,
48958
49315
  onMouseEnter: handleEnter,
48959
49316
  children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
@@ -48998,8 +49355,9 @@ var list_List = function List(props) {
48998
49355
  closePop = props.closePop,
48999
49356
  onControlTypeChange = props.onControlTypeChange,
49000
49357
  onOptionClick = props.onOptionClick;
49358
+ var dynamicVirtual = lineHeightProp === 'auto';
49001
49359
  var styles = jssStyle === null || jssStyle === void 0 || (_jssStyle$select = jssStyle.select) === null || _jssStyle$select === void 0 ? void 0 : _jssStyle$select.call(jssStyle);
49002
- var rootClass = classnames_default()(styles.list, defineProperty_default()(defineProperty_default()({}, styles.controlMouse, controlType === 'mouse'), styles.controlKeyboard, controlType === 'keyboard'));
49360
+ var rootClass = classnames_default()(styles.list, defineProperty_default()(defineProperty_default()(defineProperty_default()({}, styles.controlMouse, controlType === 'mouse'), styles.controlKeyboard, controlType === 'keyboard'), styles.dynamicList, dynamicVirtual));
49003
49361
  var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(hideCreateOption ? -1 : 0),
49004
49362
  _useState2 = slicedToArray_default()(_useState, 2),
49005
49363
  hoverIndex = _useState2[0],
@@ -49013,7 +49371,7 @@ var list_List = function List(props) {
49013
49371
  return hoverIndex;
49014
49372
  });
49015
49373
  var getLineHeight = function getLineHeight() {
49016
- if (lineHeightProp) return lineHeightProp;
49374
+ if (lineHeightProp && lineHeightProp !== 'auto') return lineHeightProp;
49017
49375
  if (size === 'small') return 26;
49018
49376
  if (size === 'default') return 34;
49019
49377
  if (size === 'large') return 42;
@@ -49124,17 +49482,7 @@ var list_List = function List(props) {
49124
49482
  return _ref.apply(this, arguments);
49125
49483
  };
49126
49484
  }());
49127
- var renderLoading = function renderLoading() {
49128
- return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
49129
- children: "loading"
49130
- });
49131
- };
49132
- var renderHeader = function renderHeader() {
49133
- return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
49134
- children: "header"
49135
- });
49136
- };
49137
- var renderItem = function renderItem(item, index, key) {
49485
+ var renderItem = function renderItem(item, index, key, setRowHeight) {
49138
49486
  return /*#__PURE__*/(0,jsx_runtime.jsx)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
49139
49487
  children: /*#__PURE__*/(0,jsx_runtime.jsx)(list_option, {
49140
49488
  datum: datum,
@@ -49142,9 +49490,11 @@ var list_List = function List(props) {
49142
49490
  jssStyle: jssStyle,
49143
49491
  index: index,
49144
49492
  data: item,
49493
+ setRowHeight: setRowHeight,
49145
49494
  lineHeight: lineHeight,
49146
49495
  isHover: hoverIndex === index,
49147
49496
  multiple: multiple,
49497
+ dynamicVirtual: dynamicVirtual,
49148
49498
  renderItem: renderItemProp,
49149
49499
  onHover: handleHover,
49150
49500
  onOptionClick: onOptionClick
@@ -49166,6 +49516,7 @@ var list_List = function List(props) {
49166
49516
  keygen: keygen,
49167
49517
  tag: 'ul',
49168
49518
  groupKey: groupKey,
49519
+ dynamicVirtual: dynamicVirtual,
49169
49520
  tagClassName: styles.virtualList,
49170
49521
  height: height,
49171
49522
  onScroll: handleVirtualScroll,
@@ -50380,7 +50731,7 @@ var ColumnsList = function ColumnsList(props) {
50380
50731
 
50381
50732
  // columns 模式无上下边距,故而 lineHeight 需要调整
50382
50733
  var getLineHeight = function getLineHeight() {
50383
- if (lineHeightProp) return lineHeightProp;
50734
+ if (lineHeightProp && lineHeightProp !== 'auto') return lineHeightProp;
50384
50735
  if (size === 'small') return 24;
50385
50736
  if (size === 'default') return 32;
50386
50737
  if (size === 'large') return 40;
@@ -51144,7 +51495,7 @@ function Select(props0) {
51144
51495
  var renderOptions = function renderOptions() {
51145
51496
  if (loading) return renderLoading();
51146
51497
  var isEmpty = !(filterData !== null && filterData !== void 0 && filterData.length);
51147
- if (isEmpty) return renderEmpty();
51498
+ if (isEmpty && props.emptyText !== false) return renderEmpty();
51148
51499
  var options = 'treeData' in props ? renderTreeList() : renderList();
51149
51500
  if (renderOptionList) {
51150
51501
  return renderOptionList(options, {
@@ -56296,6 +56647,7 @@ var useTableTree = function useTableTree(props) {
56296
56647
 
56297
56648
 
56298
56649
 
56650
+ var MAX_ROW_SPAN = 200;
56299
56651
  var useTableVirtual = function useTableVirtual(props) {
56300
56652
  var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
56301
56653
  _useState2 = slicedToArray_default()(_useState, 2),
@@ -56378,7 +56730,9 @@ var useTableVirtual = function useTableVirtual(props) {
56378
56730
  topTimer: null,
56379
56731
  controlScrollRate: null,
56380
56732
  heightCallback: null,
56381
- preIndex: null
56733
+ preIndex: null,
56734
+ rowSpanRows: 0,
56735
+ autoAddRows: 0
56382
56736
  }),
56383
56737
  context = _useRef.current;
56384
56738
  var getTranslate = usePersistFn(function (left, top) {
@@ -56429,17 +56783,20 @@ var useTableVirtual = function useTableVirtual(props) {
56429
56783
  var top = 0;
56430
56784
  var maxIndex = Math.max(props.data.length - rowsInView, 0);
56431
56785
  for (var i = 0; i <= maxIndex; i++) {
56786
+ context.rowSpanRows = 0;
56432
56787
  sum += context.cachedHeight[i] || props.rowHeight;
56433
56788
  var rowSpanHeight = 0;
56434
56789
  if (rowSpanInfos) {
56790
+ var maxRowSpanLenth = Math.min(rowSpanInfos.length, props.rowsInView > MAX_ROW_SPAN ? props.rowsInView : props.rowsInView || MAX_ROW_SPAN);
56435
56791
  var siblingsIndexs = [];
56436
- for (var k = 0; k < rowSpanInfos.length; k++) {
56792
+ for (var k = 0; k < maxRowSpanLenth; k++) {
56437
56793
  if (rowSpanInfos[k] <= i && k > i) {
56438
56794
  siblingsIndexs.push(k);
56439
56795
  }
56440
56796
  }
56441
56797
  for (var j = 0; j < siblingsIndexs.length; j++) {
56442
56798
  var index = siblingsIndexs[j];
56799
+ context.rowSpanRows += 1;
56443
56800
  rowSpanHeight += context.cachedHeight[index] || props.rowHeight;
56444
56801
  }
56445
56802
  }
@@ -56530,6 +56887,24 @@ var useTableVirtual = function useTableVirtual(props) {
56530
56887
  props.scrollRef.current.scrollTop = beforeHeight;
56531
56888
  }
56532
56889
  });
56890
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
56891
+ var scrollRefHeight = props.scrollRef.current ? props.scrollRef.current.clientHeight : 0;
56892
+ var tableRefHeight = props.innerRef.current ? props.innerRef.current.clientHeight : 0;
56893
+ var remainHeight = scrollRefHeight - tableRefHeight;
56894
+ if (remainHeight > 0) {
56895
+ var addonHeight = 0;
56896
+ var addonCount = 0;
56897
+ for (var i = startIndex + rowsInView; i < props.data.length; i++) {
56898
+ var height = context.cachedHeight[i] || props.rowHeight;
56899
+ addonHeight += height;
56900
+ addonCount += 1;
56901
+ if (addonHeight >= remainHeight + context.cachedHeight[0]) break;
56902
+ }
56903
+ if (addonCount > 0) {
56904
+ context.autoAddRows = addonCount;
56905
+ }
56906
+ }
56907
+ }, []);
56533
56908
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
56534
56909
  // 记录preIndex
56535
56910
  context.preIndex = startIndex;
@@ -56564,7 +56939,8 @@ var useTableVirtual = function useTableVirtual(props) {
56564
56939
  cb();
56565
56940
  }
56566
56941
  }, [scrollHeight]);
56567
- var renderData = props.disabled ? props.data : toConsumableArray_default()(props.data).slice(startIndex, startIndex + rowsInView);
56942
+ var finalRowsInView = rowsInView + context.rowSpanRows + context.autoAddRows;
56943
+ var renderData = props.disabled ? props.data : toConsumableArray_default()(props.data).slice(startIndex, startIndex + finalRowsInView);
56568
56944
  return {
56569
56945
  scrollHeight: scrollHeight,
56570
56946
  startIndex: startIndex,
@@ -57483,6 +57859,9 @@ var Tr = function Tr(props) {
57483
57859
  var tds = [];
57484
57860
  var skip = 0;
57485
57861
  var lastRowIndex = data.length - 1;
57862
+ var hasSiblingRowSpan = data === null || data === void 0 ? void 0 : data.some(function (item) {
57863
+ return item === null;
57864
+ });
57486
57865
  var _loop = function _loop(i) {
57487
57866
  if (skip > 0) {
57488
57867
  skip--;
@@ -57494,13 +57873,13 @@ var Tr = function Tr(props) {
57494
57873
  var td = /*#__PURE__*/(0,jsx_runtime.jsx)("td", {
57495
57874
  colSpan: data[i].colSpan,
57496
57875
  rowSpan: data[i].rowSpan,
57497
- onMouseEnter: function onMouseEnter() {
57876
+ onMouseEnter: props.hover && hasSiblingRowSpan ? function () {
57498
57877
  props.handleCellHover(props.rowIndex, data[i].rowSpan);
57499
- },
57500
- onMouseLeave: function onMouseLeave() {
57878
+ } : undefined,
57879
+ onMouseLeave: props.hover && hasSiblingRowSpan ? function () {
57501
57880
  props.handleCellHover(-1, 0);
57502
- },
57503
- 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.isCellHover(props.rowIndex, data[i].rowSpan) && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellHover)),
57881
+ } : undefined,
57882
+ 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), data[i].rowSpan > 1 && props.isCellHover(props.rowIndex, data[i].rowSpan) && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.cellHover)),
57504
57883
  style: getTdStyle(col, data[i].colSpan),
57505
57884
  dir: config.direction,
57506
57885
  onClick: props.onCellClick ? function () {
@@ -57566,7 +57945,7 @@ var Tr = function Tr(props) {
57566
57945
  return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
57567
57946
  children: [/*#__PURE__*/(0,jsx_runtime.jsx)("tr", objectSpread2_default()(objectSpread2_default()({
57568
57947
  ref: trRef,
57569
- className: classnames_default()(props === null || props === void 0 || (_props$rowClassName = props.rowClassName) === null || _props$rowClassName === void 0 ? void 0 : _props$rowClassName.call(props, props.rawData, props.rowIndex), props.striped && props.rowIndex % 2 === 1 && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.rowStriped), props.isSelect && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.rowChecked))
57948
+ className: classnames_default()(props === null || props === void 0 || (_props$rowClassName = props.rowClassName) === null || _props$rowClassName === void 0 ? void 0 : _props$rowClassName.call(props, props.rawData, props.rowIndex), props.striped && props.rowIndex % 2 === 1 && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.rowStriped), props.isSelect && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.rowChecked), props.hover && (tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.rowHover))
57570
57949
  }, props.rowEvents), {}, {
57571
57950
  onClick: handleRowClick,
57572
57951
  children: renderTds(props.columns, props.row)
@@ -57637,6 +58016,7 @@ var Tr = function Tr(props) {
57637
58016
  striped: props.striped,
57638
58017
  radio: props.radio,
57639
58018
  isCellHover: isCellHover,
58019
+ hover: hover,
57640
58020
  isSelect: props.datum.check(rowSelectMergeStartData[index]),
57641
58021
  handleCellHover: handleCellHover
57642
58022
  // to update
@@ -57976,14 +58356,14 @@ var emptyRef = {
57976
58356
  var maxHeight = target.scrollHeight - target.clientHeight;
57977
58357
  var x = Math.min(target.scrollLeft / maxWidth, 1);
57978
58358
  var y = Math.min(target.scrollTop / maxHeight, 1);
57979
- props.onScroll(x, y, target.scrollLeft);
58359
+ props.onScroll(x, y, target.scrollLeft, target.scrollTop);
57980
58360
  }
57981
58361
  });
57982
58362
  var handleVirtualScroll = usePersistFn(function (info) {
57983
58363
  virtualInfo.handleScroll(info);
57984
58364
  layoutFunc.checkFloat();
57985
58365
  if (props.onScroll && typeof props.onScroll === 'function') {
57986
- props.onScroll(info.x, info.y, info.scrollLeft);
58366
+ props.onScroll(info.x, info.y, info.scrollLeft, info.scrollTop);
57987
58367
  }
57988
58368
  });
57989
58369
  var renderEmpty = function renderEmpty() {
@@ -58954,11 +59334,10 @@ var Tabs = function Tabs(props) {
58954
59334
  className: tabsStyle.panelWrapper,
58955
59335
  style: panelStyle,
58956
59336
  children: external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.toArray(children).map(function (child, index) {
58957
- var Chlid = child;
58958
- if (tabs_isNamedComponent(Chlid.type) && Chlid.type.displayName === 'ShineoutTabsPanel') {
58959
- return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(Chlid, {
58960
- id: Chlid.props.id !== undefined ? Chlid.props.id : index,
58961
- active: active
59337
+ var Child = child;
59338
+ if (tabs_isNamedComponent(Child.type) && Child.type.displayName === 'ShineoutTabsPanel') {
59339
+ return /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(Child, {
59340
+ id: Child.props.id !== undefined ? Child.props.id : index
58962
59341
  });
58963
59342
  }
58964
59343
  return null;
@@ -58969,20 +59348,20 @@ var Tabs = function Tabs(props) {
58969
59348
  var tabs = [];
58970
59349
  var border = getSplitColor();
58971
59350
  external_root_React_commonjs2_react_commonjs_react_amd_react_.Children.toArray(children).forEach(function (child, index) {
58972
- var Chlid = child;
58973
- if (!Chlid || !Chlid.type) return;
58974
- var childBorder = Chlid.props.splitColor || Chlid.props.border;
58975
- var _Chlid$props$id = Chlid.props.id,
58976
- id = _Chlid$props$id === void 0 ? index : _Chlid$props$id;
59351
+ var Child = child;
59352
+ if (!Child || !Child.type) return;
59353
+ var childBorder = Child.props.splitColor || Child.props.border;
59354
+ var _Child$props$id = Child.props.id,
59355
+ id = _Child$props$id === void 0 ? index : _Child$props$id;
58977
59356
  if (active === id && childBorder) {
58978
59357
  border = childBorder;
58979
59358
  }
58980
59359
  tabs.push({
58981
- id: Chlid.props.id !== undefined ? Chlid.props.id : index,
58982
- tab: Chlid.props.tab,
58983
- disabled: Chlid.props.disabled,
59360
+ id: Child.props.id !== undefined ? Child.props.id : index,
59361
+ tab: Child.props.tab,
59362
+ disabled: Child.props.disabled,
58984
59363
  jssStyle: jssStyle,
58985
- color: Chlid.props.color || (active === id ? color : undefined)
59364
+ color: Child.props.color || (active === id ? color : undefined)
58986
59365
  });
58987
59366
  });
58988
59367
  var header = /*#__PURE__*/(0,jsx_runtime.jsx)(tabs_header, {
@@ -59181,7 +59560,8 @@ var Tooltip = function Tooltip(props) {
59181
59560
  _props$type = props.type,
59182
59561
  type = _props$type === void 0 ? 'default' : _props$type,
59183
59562
  _props$position = props.position,
59184
- popsitionProps = _props$position === void 0 ? 'bottom' : _props$position;
59563
+ popsitionProps = _props$position === void 0 ? 'auto' : _props$position;
59564
+ var arrowStyleRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({});
59185
59565
  var tooltipClasses = jssStyle === null || jssStyle === void 0 || (_jssStyle$tooltip = jssStyle.tooltip) === null || _jssStyle$tooltip === void 0 ? void 0 : _jssStyle$tooltip.call(jssStyle);
59186
59566
  var config = useConfig();
59187
59567
  var childrenProps = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement)(children) ? children === null || children === void 0 ? void 0 : children.props : {};
@@ -59198,7 +59578,8 @@ var Tooltip = function Tooltip(props) {
59198
59578
  position = _usePopup.position,
59199
59579
  getTargetProps = _usePopup.getTargetProps,
59200
59580
  targetRef = _usePopup.targetRef,
59201
- popupRef = _usePopup.popupRef;
59581
+ popupRef = _usePopup.popupRef,
59582
+ arrowRef = _usePopup.arrowRef;
59202
59583
  if (! /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.isValidElement)(children)) {
59203
59584
  console.error(new Error('Tooltip children expect a single ReactElement.'));
59204
59585
  return null;
@@ -59229,12 +59610,16 @@ var Tooltip = function Tooltip(props) {
59229
59610
  focus: open,
59230
59611
  parentElRef: targetRef,
59231
59612
  popupElRef: popupRef,
59613
+ arrowRef: arrowRef,
59232
59614
  absolute: true,
59615
+ adjust: popsitionProps === 'auto',
59233
59616
  position: position,
59234
59617
  fixedWidth: false,
59235
- popupGap: 0,
59618
+ popupGap: 0
59619
+ // arrowStyleRef={arrowStyleRef}
59620
+ ,
59236
59621
  zIndex: zIndex,
59237
- children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({
59622
+ children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
59238
59623
  className: classnames_default()(className, tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.wrapper, open && (tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.wrapperOpen))
59239
59624
  }, getDataAttribute({
59240
59625
  type: type,
@@ -59243,11 +59628,17 @@ var Tooltip = function Tooltip(props) {
59243
59628
  ref: popupRef,
59244
59629
  onMouseLeave: events.onMouseLeave,
59245
59630
  dir: config.direction,
59246
- children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
59631
+ children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", objectSpread2_default()({
59632
+ ref: arrowRef,
59633
+ style: arrowStyleRef.current,
59634
+ className: tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.arrow
59635
+ }, getDataAttribute({
59636
+ role: 'arrow'
59637
+ }))), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
59247
59638
  style: style,
59248
59639
  className: classnames_default()(tooltipClasses === null || tooltipClasses === void 0 ? void 0 : tooltipClasses.content),
59249
59640
  children: tip
59250
- })
59641
+ })]
59251
59642
  }))
59252
59643
  })]
59253
59644
  });
@@ -64350,7 +64741,7 @@ var upload_interface = __webpack_require__(8821);
64350
64741
 
64351
64742
 
64352
64743
  /* harmony default export */ var src_0 = ({
64353
- version: '3.4.0-beta.3'
64744
+ version: '3.4.0-beta.5'
64354
64745
  });
64355
64746
  }();
64356
64747
  /******/ return __webpack_exports__;