shineout 3.2.0-rc.5 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.js +1 -1
- package/cjs/menu/search.type.d.ts +0 -3
- package/dist/shineout.js +259 -312
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/index.js +1 -1
- package/esm/menu/search.type.d.ts +0 -3
- package/package.json +5 -5
package/dist/shineout.js
CHANGED
|
@@ -7104,9 +7104,12 @@ var Alert = function Alert(props) {
|
|
|
7104
7104
|
onClick: handleClose
|
|
7105
7105
|
});
|
|
7106
7106
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
7107
|
-
className: alertStyle.
|
|
7108
|
-
|
|
7109
|
-
|
|
7107
|
+
className: alertStyle.closeWrapper,
|
|
7108
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
7109
|
+
className: alertStyle.close,
|
|
7110
|
+
onClick: handleClose,
|
|
7111
|
+
children: closeItem || icons_config.alert.Close
|
|
7112
|
+
})
|
|
7110
7113
|
});
|
|
7111
7114
|
};
|
|
7112
7115
|
if (dismiss === HIDE) {
|
|
@@ -11957,7 +11960,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
11957
11960
|
};
|
|
11958
11961
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
11959
11962
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
11960
|
-
/* harmony default export */ var version = ('3.2.0
|
|
11963
|
+
/* harmony default export */ var version = ('3.2.0');
|
|
11961
11964
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
11962
11965
|
|
|
11963
11966
|
|
|
@@ -12119,7 +12122,7 @@ function replaceNonAlphanumeric(str) {
|
|
|
12119
12122
|
return result;
|
|
12120
12123
|
}
|
|
12121
12124
|
function camelCaseToDash(str) {
|
|
12122
|
-
return str.replace(/(
|
|
12125
|
+
return str.replace(/([A-Z])/g, '-$1').toLowerCase().replace(/^-/, '');
|
|
12123
12126
|
}
|
|
12124
12127
|
var cssvar = function cssvar(str, value, key, _size) {
|
|
12125
12128
|
var _getConfig = getConfig(),
|
|
@@ -13597,8 +13600,11 @@ var menuTokens = {
|
|
|
13597
13600
|
menuItemActiveBackgroundColor: 'Brand-1',
|
|
13598
13601
|
menuItemActiveHoverBackgroundColor: 'Brand-2',
|
|
13599
13602
|
menuItemActiveFontColor: 'Brand-6',
|
|
13603
|
+
menuItemActiveDisabledFontColor: 'Brand-3',
|
|
13600
13604
|
menuItemDisabledBackgroundColor: 'Neutral-fill-1',
|
|
13601
13605
|
menuItemDisabledFontColor: 'Neutral-text-2',
|
|
13606
|
+
menuItemCollpaseActiveBackgroundColor: 'Brand-6',
|
|
13607
|
+
menuItemCollpaseActiveFontColor: 'Neutral-text-1',
|
|
13602
13608
|
menuTitlePaddingX: 'Spacing-16',
|
|
13603
13609
|
menuTitlePaddingY: 'Spacing-9',
|
|
13604
13610
|
menuExpandWidth: 'Spacing-46',
|
|
@@ -13606,6 +13612,8 @@ var menuTokens = {
|
|
|
13606
13612
|
menuExpandHoverBackgroundColor: 'Neutral-fill-3',
|
|
13607
13613
|
menuChildrenBoxShadow: '0 2px 8px rgba(0, 0, 0, 0.15)',
|
|
13608
13614
|
menuHeaderBorderColor: 'Neutral-border-1',
|
|
13615
|
+
menuHeaderPaddingX: 'Spacing-12',
|
|
13616
|
+
menuHeaderPaddingY: 'Spacing-12',
|
|
13609
13617
|
menuDarkFontColor: 'Neutral-text-1',
|
|
13610
13618
|
menuDarkItemBackgroundColor: 'Neutral-fill-10',
|
|
13611
13619
|
menuDarkItemFontColor: 'Neutral-text-1',
|
|
@@ -13617,10 +13625,12 @@ var menuTokens = {
|
|
|
13617
13625
|
menuDarkItemOpenFontColor: 'Neutral-text-1',
|
|
13618
13626
|
menuDarkItemDisabledBackgroundColor: 'Neutral-fill-10',
|
|
13619
13627
|
menuDarkItemDisabledFontColor: 'Neutral-text-4',
|
|
13628
|
+
menuDarkItemCollpaseActiveBackgroundColor: 'Brand-6',
|
|
13629
|
+
menuDarkItemCollpaseActiveFontColor: 'Neutral-text-1',
|
|
13620
13630
|
menuDarkHeaderBorderColor: 'Neutral-fill-8',
|
|
13621
|
-
menuSearchBorderRadius: 'Radius-
|
|
13631
|
+
menuSearchBorderRadius: 'Radius-full',
|
|
13622
13632
|
menuSearchBorderColor: 'Neutral-border-2',
|
|
13623
|
-
|
|
13633
|
+
menuSearchCollpaseSize: 'Size-16',
|
|
13624
13634
|
menuSearchIconSize: 'Size-7',
|
|
13625
13635
|
menuSearchIconColor: 'Neutral-text-4',
|
|
13626
13636
|
menuSearchIconMarginX: 'Spacing-8',
|
|
@@ -14927,7 +14937,7 @@ var alertStyle = {
|
|
|
14927
14937
|
width: src.alertFontSize,
|
|
14928
14938
|
color: src.alertCloseFontColor,
|
|
14929
14939
|
fontSize: src.alertFontSize,
|
|
14930
|
-
height: src.
|
|
14940
|
+
height: src.alertFontSize,
|
|
14931
14941
|
flex: '0 0 auto',
|
|
14932
14942
|
display: 'flex',
|
|
14933
14943
|
alignItems: 'center',
|
|
@@ -14937,8 +14947,15 @@ var alertStyle = {
|
|
|
14937
14947
|
color: src.alertCloseHoverColor
|
|
14938
14948
|
}
|
|
14939
14949
|
},
|
|
14950
|
+
closeWrapper: {
|
|
14951
|
+
width: src.alertFontSize,
|
|
14952
|
+
height: src.lineHeightDynamic,
|
|
14953
|
+
display: 'flex',
|
|
14954
|
+
alignItems: 'center'
|
|
14955
|
+
},
|
|
14940
14956
|
content: {
|
|
14941
14957
|
flex: '1 1 0',
|
|
14958
|
+
minWidth: 0,
|
|
14942
14959
|
wordBreak: 'break-all'
|
|
14943
14960
|
},
|
|
14944
14961
|
pending: {
|
|
@@ -15275,12 +15292,17 @@ var textBeforeLine = function textBeforeLine() {
|
|
|
15275
15292
|
}
|
|
15276
15293
|
};
|
|
15277
15294
|
};
|
|
15278
|
-
|
|
15279
|
-
|
|
15280
|
-
|
|
15281
|
-
|
|
15282
|
-
|
|
15283
|
-
|
|
15295
|
+
|
|
15296
|
+
// const loading = (type: ButtonTypeWithoutLink, styles: ButtonStyleType) => {
|
|
15297
|
+
// const buttonStyle = button(type, styles);
|
|
15298
|
+
|
|
15299
|
+
// return {
|
|
15300
|
+
// '&$loading': {
|
|
15301
|
+
// ...buttonStyle['&$disabled'],
|
|
15302
|
+
// },
|
|
15303
|
+
// };
|
|
15304
|
+
// };
|
|
15305
|
+
|
|
15284
15306
|
var ButtonStyle = {
|
|
15285
15307
|
button: {
|
|
15286
15308
|
outline: 'none',
|
|
@@ -15401,13 +15423,26 @@ var ButtonStyle = {
|
|
|
15401
15423
|
cursor: 'not-allowed'
|
|
15402
15424
|
},
|
|
15403
15425
|
loading: {
|
|
15404
|
-
cursor: 'not-allowed'
|
|
15405
|
-
|
|
15406
|
-
'&$
|
|
15407
|
-
|
|
15408
|
-
|
|
15409
|
-
'&$
|
|
15410
|
-
|
|
15426
|
+
cursor: 'not-allowed'
|
|
15427
|
+
|
|
15428
|
+
// '&$default': {
|
|
15429
|
+
// ...loading('Secondary', ''),
|
|
15430
|
+
// },
|
|
15431
|
+
// '&$primary': {
|
|
15432
|
+
// ...loading('Primary', ''),
|
|
15433
|
+
// },
|
|
15434
|
+
// '&$success': {
|
|
15435
|
+
// ...loading('Success', ''),
|
|
15436
|
+
// },
|
|
15437
|
+
// '&$danger': {
|
|
15438
|
+
// ...loading('Danger', ''),
|
|
15439
|
+
// },
|
|
15440
|
+
// '&$warning': {
|
|
15441
|
+
// ...loading('Warning', ''),
|
|
15442
|
+
// },
|
|
15443
|
+
// '&$secondary': {
|
|
15444
|
+
// ...loading('Secondary', ''),
|
|
15445
|
+
// },
|
|
15411
15446
|
},
|
|
15412
15447
|
groupItem: {},
|
|
15413
15448
|
group: {
|
|
@@ -17063,6 +17098,7 @@ var datePickerStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
17063
17098
|
position: 'relative',
|
|
17064
17099
|
// width: token.datePickerDateWidth,
|
|
17065
17100
|
width: 240,
|
|
17101
|
+
cursor: 'pointer',
|
|
17066
17102
|
'&[data-soui-type="datetime"]': {
|
|
17067
17103
|
// width: token.datePickerDatetimeWidth,
|
|
17068
17104
|
width: 240
|
|
@@ -19438,7 +19474,9 @@ var menuStyle = {
|
|
|
19438
19474
|
width: '100%',
|
|
19439
19475
|
backgroundColor: src.menuItemBackgroundColor,
|
|
19440
19476
|
transition: "width ".concat(animationDuration, " ").concat(transitionFunc),
|
|
19441
|
-
color: src.menuFontColor
|
|
19477
|
+
color: src.menuFontColor,
|
|
19478
|
+
display: 'flex',
|
|
19479
|
+
flexDirection: 'column'
|
|
19442
19480
|
},
|
|
19443
19481
|
wrapperLight: {},
|
|
19444
19482
|
wrapperDark: {
|
|
@@ -19458,7 +19496,6 @@ var menuStyle = {
|
|
|
19458
19496
|
justifyContent: 'center'
|
|
19459
19497
|
},
|
|
19460
19498
|
'& $titleContent': {
|
|
19461
|
-
opacity: 0,
|
|
19462
19499
|
alignItems: 'center',
|
|
19463
19500
|
whiteSpace: 'nowrap',
|
|
19464
19501
|
overflow: 'hidden'
|
|
@@ -19515,12 +19552,46 @@ var menuStyle = {
|
|
|
19515
19552
|
}
|
|
19516
19553
|
},
|
|
19517
19554
|
scrollbox: {
|
|
19555
|
+
flex: 1,
|
|
19556
|
+
minWidth: 0,
|
|
19557
|
+
minHeight: 0,
|
|
19558
|
+
overflow: 'auto',
|
|
19559
|
+
// scrollbarWidth: 'thin',
|
|
19560
|
+
// '$wrapperLight &': {
|
|
19561
|
+
// scrollbarColor: 'rgba(0, 0, 0, 0.1) transparent',
|
|
19562
|
+
// '&::-moz-scrollbar-thumb:hover': {
|
|
19563
|
+
// backgroundColor: 'rgba(0, 0, 0, 0.2)',
|
|
19564
|
+
// },
|
|
19565
|
+
// },
|
|
19566
|
+
// '$wrapperDark &': {
|
|
19567
|
+
// scrollbarColor: 'rgba(255, 255, 255, 0.4) transparent',
|
|
19568
|
+
// },
|
|
19518
19569
|
'$wrapperVertical &': {
|
|
19519
|
-
|
|
19520
|
-
height: '100%'
|
|
19570
|
+
overflowX: 'hidden'
|
|
19521
19571
|
},
|
|
19522
19572
|
'$wrapperHorizontal &': {
|
|
19523
|
-
|
|
19573
|
+
overflowY: 'hidden'
|
|
19574
|
+
},
|
|
19575
|
+
'&::-webkit-scrollbar': {
|
|
19576
|
+
width: '6px',
|
|
19577
|
+
height: '6px'
|
|
19578
|
+
},
|
|
19579
|
+
'&::-webkit-scrollbar-thumb': {
|
|
19580
|
+
border: '0px solid transparent',
|
|
19581
|
+
backgroundClip: 'content-box',
|
|
19582
|
+
borderRadius: '11px',
|
|
19583
|
+
'$wrapperLight &': {
|
|
19584
|
+
backgroundColor: 'rgba(0, 0, 0, 0.05)',
|
|
19585
|
+
'&:hover': {
|
|
19586
|
+
backgroundColor: 'rgba(0, 0, 0, 0.1)'
|
|
19587
|
+
}
|
|
19588
|
+
},
|
|
19589
|
+
'$wrapperDark &': {
|
|
19590
|
+
backgroundColor: 'rgba(255, 255, 255, 0.4)',
|
|
19591
|
+
'&:hover': {
|
|
19592
|
+
backgroundColor: 'rgba(255, 255, 255, 0.5)'
|
|
19593
|
+
}
|
|
19594
|
+
}
|
|
19524
19595
|
}
|
|
19525
19596
|
},
|
|
19526
19597
|
root: {
|
|
@@ -19535,11 +19606,9 @@ var menuStyle = {
|
|
|
19535
19606
|
}
|
|
19536
19607
|
},
|
|
19537
19608
|
wrapperInline: {},
|
|
19538
|
-
wrapperVertical: {
|
|
19539
|
-
position: 'relative'
|
|
19540
|
-
},
|
|
19609
|
+
wrapperVertical: {},
|
|
19541
19610
|
wrapperHorizontal: {
|
|
19542
|
-
|
|
19611
|
+
flexDirection: 'row'
|
|
19543
19612
|
},
|
|
19544
19613
|
wrapperHasOpen: {},
|
|
19545
19614
|
children: {
|
|
@@ -19570,6 +19639,9 @@ var menuStyle = {
|
|
|
19570
19639
|
alignItems: 'center',
|
|
19571
19640
|
cursor: 'pointer',
|
|
19572
19641
|
position: 'relative',
|
|
19642
|
+
'& a': {
|
|
19643
|
+
transition: 'none'
|
|
19644
|
+
},
|
|
19573
19645
|
'[data-soui-theme=light] &': {
|
|
19574
19646
|
color: src.menuItemFontColor,
|
|
19575
19647
|
backgroundColor: src.menuItemBackgroundColor,
|
|
@@ -19600,6 +19672,12 @@ var menuStyle = {
|
|
|
19600
19672
|
color: src.menuItemActiveFontColor
|
|
19601
19673
|
}
|
|
19602
19674
|
},
|
|
19675
|
+
'[data-soui-theme=light] $itemDisabled&': {
|
|
19676
|
+
color: src.menuItemActiveDisabledFontColor,
|
|
19677
|
+
'& $icon': {
|
|
19678
|
+
color: src.menuItemActiveDisabledFontColor
|
|
19679
|
+
}
|
|
19680
|
+
},
|
|
19603
19681
|
'[data-soui-theme=dark][data-soui-mode=inline] &::before, [data-soui-theme=dark][data-soui-mode=vertical] &::before': {
|
|
19604
19682
|
content: '""',
|
|
19605
19683
|
position: 'absolute',
|
|
@@ -19608,7 +19686,25 @@ var menuStyle = {
|
|
|
19608
19686
|
bottom: 0,
|
|
19609
19687
|
width: '3px',
|
|
19610
19688
|
backgroundColor: src.menuDarkItemActiveBackgroundColor
|
|
19689
|
+
},
|
|
19690
|
+
'$wrapperCollpase[data-soui-theme=light] $root > &': {
|
|
19691
|
+
color: src.menuItemCollpaseActiveFontColor,
|
|
19692
|
+
backgroundColor: src.menuItemCollpaseActiveBackgroundColor,
|
|
19693
|
+
'& $icon': {
|
|
19694
|
+
color: src.menuItemCollpaseActiveFontColor
|
|
19695
|
+
}
|
|
19696
|
+
},
|
|
19697
|
+
'$wrapperCollpase[data-soui-theme=dark] $root > &': {
|
|
19698
|
+
color: src.menuDarkItemCollpaseActiveFontColor,
|
|
19699
|
+
backgroundColor: src.menuDarkItemCollpaseActiveBackgroundColor,
|
|
19700
|
+
'& $icon': {
|
|
19701
|
+
color: src.menuDarkItemCollpaseActiveFontColor
|
|
19702
|
+
}
|
|
19703
|
+
},
|
|
19704
|
+
'$wrapperCollpase $root > &::before': {
|
|
19705
|
+
display: 'none'
|
|
19611
19706
|
}
|
|
19707
|
+
|
|
19612
19708
|
// '[data-soui-theme=light][data-soui-mode=vertical]:not($wrapperCollpase) &': {
|
|
19613
19709
|
// '&::before': {
|
|
19614
19710
|
// display: 'block',
|
|
@@ -19632,13 +19728,29 @@ var menuStyle = {
|
|
|
19632
19728
|
color: src.menuItemActiveFontColor
|
|
19633
19729
|
}
|
|
19634
19730
|
},
|
|
19731
|
+
'[data-soui-theme=light] $itemDisabled&': {
|
|
19732
|
+
color: src.menuItemActiveDisabledFontColor,
|
|
19733
|
+
'& $icon': {
|
|
19734
|
+
color: src.menuItemActiveDisabledFontColor
|
|
19735
|
+
}
|
|
19736
|
+
},
|
|
19635
19737
|
'$wrapperCollpase[data-soui-theme=light] $root > &': {
|
|
19636
|
-
color: src.
|
|
19637
|
-
backgroundColor: src.
|
|
19738
|
+
color: src.menuItemCollpaseActiveFontColor,
|
|
19739
|
+
backgroundColor: src.menuItemCollpaseActiveBackgroundColor,
|
|
19638
19740
|
'& $icon': {
|
|
19639
|
-
color: src.
|
|
19741
|
+
color: src.menuItemCollpaseActiveFontColor
|
|
19742
|
+
}
|
|
19743
|
+
},
|
|
19744
|
+
'$wrapperCollpase[data-soui-theme=dark] $root > &': {
|
|
19745
|
+
color: src.menuDarkItemCollpaseActiveFontColor,
|
|
19746
|
+
backgroundColor: src.menuDarkItemCollpaseActiveBackgroundColor,
|
|
19747
|
+
'& $icon': {
|
|
19748
|
+
color: src.menuDarkItemCollpaseActiveFontColor
|
|
19640
19749
|
}
|
|
19641
19750
|
},
|
|
19751
|
+
'$wrapperCollpase $root > &::before': {
|
|
19752
|
+
display: 'none'
|
|
19753
|
+
},
|
|
19642
19754
|
'[data-soui-theme=dark]:not($wrapperCollpase) &': {
|
|
19643
19755
|
color: src.menuDarkItemActiveFontColor,
|
|
19644
19756
|
backgroundColor: src.menuDarkItemActiveBackgroundColor,
|
|
@@ -19703,7 +19815,7 @@ var menuStyle = {
|
|
|
19703
19815
|
itemContentFront: {},
|
|
19704
19816
|
itemContentBack: {},
|
|
19705
19817
|
header: {
|
|
19706
|
-
padding: "".concat(src.
|
|
19818
|
+
padding: "".concat(src.menuHeaderPaddingX, " ").concat(src.menuHeaderPaddingY),
|
|
19707
19819
|
width: '100%',
|
|
19708
19820
|
transition: "width ".concat(animationDuration, " ").concat(transitionFunc),
|
|
19709
19821
|
color: src.menuFontColor,
|
|
@@ -19760,9 +19872,11 @@ var menuStyle = {
|
|
|
19760
19872
|
display: 'inline-flex'
|
|
19761
19873
|
},
|
|
19762
19874
|
titleContent: {
|
|
19763
|
-
whiteSpace: 'pre-wrap'
|
|
19764
|
-
|
|
19765
|
-
|
|
19875
|
+
whiteSpace: 'pre-wrap'
|
|
19876
|
+
// '$wrapperCollpase &': {
|
|
19877
|
+
// transition: `opacity ${animationDuration} ${transitionFunc}`,
|
|
19878
|
+
// },
|
|
19879
|
+
// opacity: 1,
|
|
19766
19880
|
},
|
|
19767
19881
|
expand: {
|
|
19768
19882
|
alignSelf: 'stretch',
|
|
@@ -19869,36 +19983,12 @@ var menuSearchStyle = {
|
|
|
19869
19983
|
wrapperDark: (_wrapperDark = {}, defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(_wrapperDark, getTokenName('inputClearColor'), src.menuSearchDarkClearColor), getTokenName('inputHoverClearColor'), src.menuSearchDarkHoverClearColor), getTokenName('inputBorderColor'), src.menuSearchDarkBackgroundColor), getTokenName('inputBackgroundColor'), src.menuSearchDarkBackgroundColor), getTokenName('inputFontColor'), src.menuSearchDarkFontColor), getTokenName('inputPlaceholderFontColor'), src.menuSearchDarkPlaceholderFontColor), getTokenName('inputHoverBorderColor'), src.menuSearchDarkHoverBorderColor), getTokenName('inputHoverBackgroundColor'), src.menuSearchDarkHoverBackgroundColor), getTokenName('inputFocusBorderColor'), src.menuSearchDarkFocusBorderColor), getTokenName('inputFocusBackgroundColor'), src.menuSearchDarkFocusBackgroundColor), defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(_wrapperDark, getTokenName('inputFocusShadow'), src.menuSearchDarkFocusShadow), getTokenName('inputDisabledBorderColor'), src.menuSearchDarkBackgroundColor), getTokenName('inputDisabledBackgroundColor'), src.menuSearchDarkBackgroundColor), getTokenName('inputDisabledFontColor'), src.menuSearchDarkFontColor), getTokenName('inputDisabledPlaceholderFontColor'), src.menuSearchDarkPlaceholderFontColor)),
|
|
19870
19984
|
wrapperLight: defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()(defineProperty_default()({}, getTokenName('inputBorderColor'), src.menuSearchBackgroundColor), getTokenName('inputBackgroundColor'), src.menuSearchBackgroundColor), getTokenName('inputHoverBorderColor'), src.menuSearchHoverBorderColor), getTokenName('inputHoverBackgroundColor'), src.menuSearchHoverBackgroundColor), getTokenName('inputDisabledBorderColor'), src.menuSearchDisabledBackgroundColor), getTokenName('inputDisabledBackgroundColor'), src.menuSearchDisabledBackgroundColor), getTokenName('inputClearColor'), src.menuSearchClearColor), getTokenName('inputHoverClearColor'), src.menuSearchHoverClearColor),
|
|
19871
19985
|
wrapperCollapsed: {
|
|
19872
|
-
borderRadius: '50%',
|
|
19873
|
-
padding: src.menuSearchPaddingX,
|
|
19874
19986
|
cursor: 'pointer',
|
|
19987
|
+
width: src.menuSearchCollpaseSize,
|
|
19988
|
+
height: src.menuSearchCollpaseSize,
|
|
19875
19989
|
lineHeight: 1,
|
|
19876
|
-
'
|
|
19877
|
-
|
|
19878
|
-
border: "1px solid ".concat(src.menuSearchBackgroundColor),
|
|
19879
|
-
'&:hover': {
|
|
19880
|
-
background: src.menuSearchHoverBackgroundColor,
|
|
19881
|
-
borderColor: src.menuSearchHoverBorderColor
|
|
19882
|
-
},
|
|
19883
|
-
'$wrapperDisabled&': {
|
|
19884
|
-
background: src.menuSearchDisabledBackgroundColor,
|
|
19885
|
-
borderColor: src.menuSearchDisabledBackgroundColor
|
|
19886
|
-
}
|
|
19887
|
-
},
|
|
19888
|
-
'$wrapperDark&': {
|
|
19889
|
-
background: src.menuSearchDarkBackgroundColor,
|
|
19890
|
-
border: "1px solid ".concat(src.menuSearchDarkBackgroundColor),
|
|
19891
|
-
'&:hover': {
|
|
19892
|
-
background: src.menuSearchDarkHoverBackgroundColor,
|
|
19893
|
-
borderColor: src.menuSearchDarkHoverBorderColor
|
|
19894
|
-
},
|
|
19895
|
-
'$wrapperDisabled&': {
|
|
19896
|
-
background: src.menuSearchDarkBackgroundColor,
|
|
19897
|
-
borderColor: src.menuSearchDarkBackgroundColor,
|
|
19898
|
-
'&$search': {
|
|
19899
|
-
color: src.menuSearchDarkIconColor
|
|
19900
|
-
}
|
|
19901
|
-
}
|
|
19990
|
+
'& input': {
|
|
19991
|
+
opacity: 0
|
|
19902
19992
|
}
|
|
19903
19993
|
},
|
|
19904
19994
|
wrapperDisabled: {
|
|
@@ -22077,7 +22167,7 @@ var sliderStyle = {
|
|
|
22077
22167
|
bottom: '100%',
|
|
22078
22168
|
'&[dir=ltr]': {
|
|
22079
22169
|
left: 0,
|
|
22080
|
-
transform: 'translate(-50%, 10px)'
|
|
22170
|
+
transform: 'translate(-50%, -10px)'
|
|
22081
22171
|
},
|
|
22082
22172
|
'&[dir=rtl]': {
|
|
22083
22173
|
right: 0,
|
|
@@ -25225,7 +25315,6 @@ var TagStyle = {
|
|
|
25225
25315
|
wrapper: {
|
|
25226
25316
|
lineHeight: src.lineHeightDynamic
|
|
25227
25317
|
},
|
|
25228
|
-
container: {},
|
|
25229
25318
|
inline: {
|
|
25230
25319
|
display: 'inline-block',
|
|
25231
25320
|
flex: 1,
|
|
@@ -25247,9 +25336,6 @@ var TagStyle = {
|
|
|
25247
25336
|
small: {
|
|
25248
25337
|
lineHeight: "calc(".concat(src.tagSmallFontSize, " + 6px)"),
|
|
25249
25338
|
padding: "0 ".concat(src.tagSmallPaddingX),
|
|
25250
|
-
'& $container': {
|
|
25251
|
-
lineHeight: "calc(".concat(src.tagSmallFontSize, " + 6px)")
|
|
25252
|
-
},
|
|
25253
25339
|
'& $wrapper': {
|
|
25254
25340
|
lineHeight: "calc(".concat(src.tagSmallFontSize, " + 6px)")
|
|
25255
25341
|
},
|
|
@@ -28741,7 +28827,10 @@ function useClickAway(params) {
|
|
|
28741
28827
|
}
|
|
28742
28828
|
return function () {
|
|
28743
28829
|
// @ts-ignore
|
|
28744
|
-
document.removeEventListener(event, handleClickAway
|
|
28830
|
+
document.removeEventListener(event, handleClickAway, {
|
|
28831
|
+
// 解决 点击后立刻删除dom导致获取不到元素; contains(target) 为 false 的问题
|
|
28832
|
+
capture: true
|
|
28833
|
+
});
|
|
28745
28834
|
};
|
|
28746
28835
|
}, [effect]);
|
|
28747
28836
|
}
|
|
@@ -29448,7 +29537,7 @@ var useButton = function useButton() {
|
|
|
29448
29537
|
return mergedEventHandlers;
|
|
29449
29538
|
};
|
|
29450
29539
|
return {
|
|
29451
|
-
disabled: disabled,
|
|
29540
|
+
disabled: disabled || loading,
|
|
29452
29541
|
getAnchorProps: getAnchorProps,
|
|
29453
29542
|
getButtonProps: getButtonProps,
|
|
29454
29543
|
getSpaceChildren: getSpaceChildren
|
|
@@ -35740,6 +35829,7 @@ var ResultInput = function ResultInput(props) {
|
|
|
35740
35829
|
onChange: onChange,
|
|
35741
35830
|
onBlur: handleBlur,
|
|
35742
35831
|
open: focus,
|
|
35832
|
+
disabled: props.disabled,
|
|
35743
35833
|
onPaste: handlePaste
|
|
35744
35834
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
35745
35835
|
className: styles.inputMirror,
|
|
@@ -35972,10 +36062,7 @@ var Tag = function Tag(props) {
|
|
|
35972
36062
|
if (onClose) {
|
|
35973
36063
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
35974
36064
|
className: classnames_default()(tagStyle.wrapper, inlineStyle && tagStyle.inline),
|
|
35975
|
-
children:
|
|
35976
|
-
className: tagStyle.container,
|
|
35977
|
-
children: wrapSpan(children)
|
|
35978
|
-
})
|
|
36065
|
+
children: wrapSpan(children)
|
|
35979
36066
|
});
|
|
35980
36067
|
}
|
|
35981
36068
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
@@ -36128,6 +36215,27 @@ var More = function More(props) {
|
|
|
36128
36215
|
});
|
|
36129
36216
|
itemsLength = after.length;
|
|
36130
36217
|
}
|
|
36218
|
+
if (showNum < 0 || showNum >= data.length) {
|
|
36219
|
+
return /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
|
|
36220
|
+
children: [data, /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_tag_tag, {
|
|
36221
|
+
className: styles.tag,
|
|
36222
|
+
jssStyle: jssStyle,
|
|
36223
|
+
size: size,
|
|
36224
|
+
style: {
|
|
36225
|
+
position: 'absolute',
|
|
36226
|
+
zIndex: -100,
|
|
36227
|
+
userSelect: 'none',
|
|
36228
|
+
msUserSelect: 'none',
|
|
36229
|
+
contain: 'layout'
|
|
36230
|
+
},
|
|
36231
|
+
mode: visible ? 'fill' : 'bright',
|
|
36232
|
+
color: visible ? 'info' : 'default',
|
|
36233
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
36234
|
+
children: "+"
|
|
36235
|
+
})
|
|
36236
|
+
}, 'hidden')]
|
|
36237
|
+
});
|
|
36238
|
+
}
|
|
36131
36239
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, {
|
|
36132
36240
|
children: [shouldShowMore ? data : before, /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
|
|
36133
36241
|
style: {
|
|
@@ -36281,7 +36389,8 @@ var result_Result = function Result(props) {
|
|
|
36281
36389
|
convertBr: convertBr,
|
|
36282
36390
|
onInputBlur: onInputBlur,
|
|
36283
36391
|
onClearCreatedData: onClearCreatedData,
|
|
36284
|
-
placeholder: placeholder2
|
|
36392
|
+
placeholder: placeholder2,
|
|
36393
|
+
disabled: isFunc(disabled) ? false : !!disabled
|
|
36285
36394
|
})
|
|
36286
36395
|
}, 'input');
|
|
36287
36396
|
};
|
|
@@ -40389,7 +40498,8 @@ var TimeScroll = function TimeScroll(props) {
|
|
|
40389
40498
|
var elRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
40390
40499
|
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
40391
40500
|
timer: null,
|
|
40392
|
-
changeTimer: null
|
|
40501
|
+
changeTimer: null,
|
|
40502
|
+
controlScroll: false
|
|
40393
40503
|
}),
|
|
40394
40504
|
context = _useRef.current;
|
|
40395
40505
|
var _useResize = useResize({
|
|
@@ -40402,11 +40512,12 @@ var TimeScroll = function TimeScroll(props) {
|
|
|
40402
40512
|
var el = elRef.current;
|
|
40403
40513
|
if (!el) return;
|
|
40404
40514
|
var lineHeight = el.childNodes[0].clientHeight;
|
|
40515
|
+
context.controlScroll = true;
|
|
40405
40516
|
el.scrollTop = lineHeight * index;
|
|
40406
40517
|
}, immudiate ? 0 : 30);
|
|
40407
40518
|
};
|
|
40408
40519
|
var changeToIndex = function changeToIndex(index) {
|
|
40409
|
-
if (!times[index] || times[index].disabled || index === currentIndex) {
|
|
40520
|
+
if (!times[index] || times[index].disabled || index === currentIndex && !props.isEmpty) {
|
|
40410
40521
|
return;
|
|
40411
40522
|
}
|
|
40412
40523
|
onChange(times[index].date);
|
|
@@ -40414,6 +40525,10 @@ var TimeScroll = function TimeScroll(props) {
|
|
|
40414
40525
|
var handleScroll = function handleScroll(e) {
|
|
40415
40526
|
if (context.changeTimer) clearTimeout(context.changeTimer);
|
|
40416
40527
|
var el = e.currentTarget;
|
|
40528
|
+
if (context.controlScroll) {
|
|
40529
|
+
context.controlScroll = false;
|
|
40530
|
+
return;
|
|
40531
|
+
}
|
|
40417
40532
|
context.changeTimer = setTimeout(function () {
|
|
40418
40533
|
if (!el) return;
|
|
40419
40534
|
var lineHeight = el.childNodes[0].clientHeight;
|
|
@@ -40514,6 +40629,7 @@ var Time = function Time(props) {
|
|
|
40514
40629
|
jssStyle: props.jssStyle,
|
|
40515
40630
|
times: item.times,
|
|
40516
40631
|
currentIndex: item.currentIndex,
|
|
40632
|
+
isEmpty: props.value === null || props.value === undefined,
|
|
40517
40633
|
onChange: func.handleChange
|
|
40518
40634
|
}, item.mode);
|
|
40519
40635
|
})
|
|
@@ -44645,6 +44761,13 @@ var useForm = function useForm(props) {
|
|
|
44645
44761
|
size: size
|
|
44646
44762
|
};
|
|
44647
44763
|
}, [labelWidth, labelAlign, labelVerticalAlign, keepErrorHeight, inline, disabled, size]);
|
|
44764
|
+
var updateValue = function updateValue() {
|
|
44765
|
+
if (props.value !== context.lastValue && props.value !== context.value) {
|
|
44766
|
+
context.value = deepClone(props.value) || emptyObj;
|
|
44767
|
+
context.lastValue = props.value;
|
|
44768
|
+
}
|
|
44769
|
+
};
|
|
44770
|
+
updateValue();
|
|
44648
44771
|
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
|
|
44649
44772
|
// 服务端错误更新
|
|
44650
44773
|
if (!props.error) context.serverErrors = {};else {
|
|
@@ -44661,8 +44784,8 @@ var useForm = function useForm(props) {
|
|
|
44661
44784
|
// 默认值更新
|
|
44662
44785
|
external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect(function () {
|
|
44663
44786
|
context.removeLock = false;
|
|
44664
|
-
|
|
44665
|
-
|
|
44787
|
+
// 内部 onChange 改的 value, 不需要更新
|
|
44788
|
+
if (props.value === context.value) return;
|
|
44666
44789
|
if (initValidate && !context.resetTime) {
|
|
44667
44790
|
var keys = Object.keys(context.validateMap).filter(function (key) {
|
|
44668
44791
|
var oldValue = deepGet(context.lastValue || emptyObj, key);
|
|
@@ -44889,9 +45012,9 @@ var form_item_excluded = ["children", "jssStyle", "className", "style", "label",
|
|
|
44889
45012
|
style: style,
|
|
44890
45013
|
children: [label !== undefined ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
44891
45014
|
className: classnames_default()(formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.label, labelAlign === 'left' && (formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.labelLeft)),
|
|
44892
|
-
style: {
|
|
45015
|
+
style: labelAlign !== 'top' || inline ? {
|
|
44893
45016
|
width: labelWidth
|
|
44894
|
-
},
|
|
45017
|
+
} : undefined,
|
|
44895
45018
|
children: label
|
|
44896
45019
|
}) : null, /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
|
|
44897
45020
|
className: formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.control
|
|
@@ -45248,7 +45371,7 @@ var Gap = function Gap(props) {
|
|
|
45248
45371
|
marginBottom: -Number(row),
|
|
45249
45372
|
marginRight: -Number(column)
|
|
45250
45373
|
};
|
|
45251
|
-
var itemStyle = supportFlexGap ?
|
|
45374
|
+
var itemStyle = supportFlexGap ? itemStyleProps : objectSpread2_default()(objectSpread2_default()({}, itemStyleProps), {}, {
|
|
45252
45375
|
marginBottom: row,
|
|
45253
45376
|
marginRight: column
|
|
45254
45377
|
});
|
|
@@ -47160,11 +47283,15 @@ var Scroll = function Scroll(props) {
|
|
|
47160
47283
|
height: '100%',
|
|
47161
47284
|
width: '100%',
|
|
47162
47285
|
display: 'inline-flex',
|
|
47286
|
+
overflow: 'hidden',
|
|
47163
47287
|
position: 'sticky'
|
|
47164
47288
|
}, isRtl ? 'right' : 'left', 0), "top", 0);
|
|
47165
|
-
var placeStyle =
|
|
47166
|
-
|
|
47167
|
-
|
|
47289
|
+
var placeStyle = {
|
|
47290
|
+
paddingTop: height > 0 && scrollHeight > 0 ? Math.max(0, Math.floor(scrollHeight - height)) : 0,
|
|
47291
|
+
width: scrollWidth,
|
|
47292
|
+
overflow: 'hidden',
|
|
47293
|
+
lineHeight: 0
|
|
47294
|
+
};
|
|
47168
47295
|
var handleScroll = usePersistFn(function (e) {
|
|
47169
47296
|
var target = e.currentTarget;
|
|
47170
47297
|
var scrollLeft = target.scrollLeft,
|
|
@@ -51119,6 +51246,7 @@ var useMenuItem = function useMenuItem(props) {
|
|
|
51119
51246
|
|
|
51120
51247
|
|
|
51121
51248
|
|
|
51249
|
+
|
|
51122
51250
|
var MenuItem = function MenuItem(props) {
|
|
51123
51251
|
var _props$jssStyle, _props$jssStyle$menu;
|
|
51124
51252
|
var classes = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 || (_props$jssStyle$menu = _props$jssStyle.menu) === null || _props$jssStyle$menu === void 0 ? void 0 : _props$jssStyle$menu.call(_props$jssStyle);
|
|
@@ -51129,14 +51257,24 @@ var MenuItem = function MenuItem(props) {
|
|
|
51129
51257
|
frontCaretType = _props$frontCaretType === void 0 ? 'solid' : _props$frontCaretType,
|
|
51130
51258
|
mode = props.mode,
|
|
51131
51259
|
_props$toggleDuration = props.toggleDuration,
|
|
51132
|
-
toggleDuration = _props$toggleDuration === void 0 ?
|
|
51260
|
+
toggleDuration = _props$toggleDuration === void 0 ? 50 : _props$toggleDuration;
|
|
51133
51261
|
var config = useConfig();
|
|
51134
51262
|
var shoudPop = mode === 'vertical' || mode === 'vertical-auto' || mode === 'horizontal';
|
|
51135
51263
|
var isVertical = mode === 'vertical' || mode === 'vertical-auto';
|
|
51136
51264
|
var isSubHorizontal = mode === 'horizontal' && props.level > 0;
|
|
51265
|
+
var isRootHorizontal = mode === 'horizontal' && props.level === 0;
|
|
51266
|
+
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
51267
|
+
_useState2 = slicedToArray_default()(_useState, 2),
|
|
51268
|
+
popOpen = _useState2[0],
|
|
51269
|
+
setOpen = _useState2[1];
|
|
51137
51270
|
var hasExpandAbleChildren = children.some(function (item) {
|
|
51138
51271
|
return item && item.children && (props.looseChildren || item.children.length);
|
|
51139
51272
|
});
|
|
51273
|
+
var handleVisibleChange = usePersistFn(function (visible) {
|
|
51274
|
+
if (isRootHorizontal) {
|
|
51275
|
+
setOpen(visible);
|
|
51276
|
+
}
|
|
51277
|
+
});
|
|
51140
51278
|
var _useMenuItem = use_menu_item({
|
|
51141
51279
|
dataItem: props.dataItem,
|
|
51142
51280
|
keyResult: props.keyResult,
|
|
@@ -51207,8 +51345,10 @@ var MenuItem = function MenuItem(props) {
|
|
|
51207
51345
|
theme: props.theme || 'light',
|
|
51208
51346
|
mode: isVertical ? 'vertical' : mode
|
|
51209
51347
|
}),
|
|
51348
|
+
onVisibleChange: handleVisibleChange,
|
|
51210
51349
|
jssStyle: props.jssStyle,
|
|
51211
51350
|
arrowClass: classnames_default()(classes === null || classes === void 0 ? void 0 : classes.popArrow, props.theme === 'dark' && (classes === null || classes === void 0 ? void 0 : classes.popArrowDark)),
|
|
51351
|
+
showArrow: mode !== 'horizontal',
|
|
51212
51352
|
position: position,
|
|
51213
51353
|
lazy: false,
|
|
51214
51354
|
children: function children(close) {
|
|
@@ -51293,7 +51433,7 @@ var MenuItem = function MenuItem(props) {
|
|
|
51293
51433
|
}
|
|
51294
51434
|
};
|
|
51295
51435
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
51296
|
-
className: classnames_default()(classes === null || classes === void 0 ? void 0 : classes.item, isDisabled && (classes === null || classes === void 0 ? void 0 : classes.itemDisabled), isInPath && (classes === null || classes === void 0 ? void 0 : classes.itemInPath), isOpen && (classes === null || classes === void 0 ? void 0 : classes.itemOpen), isChecked && (classes === null || classes === void 0 ? void 0 : classes.itemActive), expandAble && (classes === null || classes === void 0 ? void 0 : classes.itemHasChildren)),
|
|
51436
|
+
className: classnames_default()(classes === null || classes === void 0 ? void 0 : classes.item, isDisabled && (classes === null || classes === void 0 ? void 0 : classes.itemDisabled), isInPath && (classes === null || classes === void 0 ? void 0 : classes.itemInPath), (isOpen || popOpen) && (classes === null || classes === void 0 ? void 0 : classes.itemOpen), isChecked && (classes === null || classes === void 0 ? void 0 : classes.itemActive), expandAble && (classes === null || classes === void 0 ? void 0 : classes.itemHasChildren)),
|
|
51297
51437
|
onMouseEnter: handleMouseEnter,
|
|
51298
51438
|
onMouseLeave: handleMouseLeave,
|
|
51299
51439
|
dir: config.direction,
|
|
@@ -51301,203 +51441,6 @@ var MenuItem = function MenuItem(props) {
|
|
|
51301
51441
|
});
|
|
51302
51442
|
};
|
|
51303
51443
|
/* harmony default export */ var menu_item = (MenuItem);
|
|
51304
|
-
;// CONCATENATED MODULE: ../base/src/menu/scrollbar.tsx
|
|
51305
|
-
|
|
51306
|
-
|
|
51307
|
-
|
|
51308
|
-
|
|
51309
|
-
|
|
51310
|
-
var Scrollbar = function Scrollbar(props) {
|
|
51311
|
-
var _props$jssStyle, _props$jssStyle$menu;
|
|
51312
|
-
var classes = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 || (_props$jssStyle$menu = _props$jssStyle.menu) === null || _props$jssStyle$menu === void 0 ? void 0 : _props$jssStyle$menu.call(_props$jssStyle);
|
|
51313
|
-
var show = props.scrollLength > props.length;
|
|
51314
|
-
var config = useConfig();
|
|
51315
|
-
var isRtl = config.direction === 'rtl';
|
|
51316
|
-
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
51317
|
-
cachedOffset: props.offset
|
|
51318
|
-
}),
|
|
51319
|
-
context = _useRef.current;
|
|
51320
|
-
var barLength = props.length * props.length / props.scrollLength;
|
|
51321
|
-
if (barLength < 20) barLength = 20;
|
|
51322
|
-
var onDragStart = usePersistFn(function () {
|
|
51323
|
-
context.cachedOffset = props.offset;
|
|
51324
|
-
});
|
|
51325
|
-
var onDragMove = usePersistFn(function (deltaX, deltaY) {
|
|
51326
|
-
var value = props.direction === 'x' ? deltaX : deltaY;
|
|
51327
|
-
var newOffset;
|
|
51328
|
-
if (props.direction === 'x' && isRtl) {
|
|
51329
|
-
newOffset = context.cachedOffset - value / (props.length - barLength);
|
|
51330
|
-
} else {
|
|
51331
|
-
newOffset = context.cachedOffset + value / (props.length - barLength);
|
|
51332
|
-
}
|
|
51333
|
-
if (newOffset < 0) newOffset = 0;
|
|
51334
|
-
if (newOffset > 1) newOffset = 1;
|
|
51335
|
-
if (newOffset === context.cachedOffset) return;
|
|
51336
|
-
context.cachedOffset = newOffset;
|
|
51337
|
-
props.onScroll(newOffset);
|
|
51338
|
-
});
|
|
51339
|
-
var handleBgClick = usePersistFn(function (e) {
|
|
51340
|
-
if (e.target !== e.currentTarget) return;
|
|
51341
|
-
var inner = e.target.firstChild;
|
|
51342
|
-
if (!inner) return;
|
|
51343
|
-
var rect = inner.getBoundingClientRect();
|
|
51344
|
-
var newOffset = props.offset;
|
|
51345
|
-
var page = props.length / (props.scrollLength - props.length);
|
|
51346
|
-
var plus = isRtl ? e.clientX < rect.left : e.clientX > rect.left;
|
|
51347
|
-
var add = isRtl ? e.clientX > rect.left : e.clientX < rect.left;
|
|
51348
|
-
if (props.direction === 'x' && add || props.direction === 'y' && e.clientY < rect.top) {
|
|
51349
|
-
newOffset = props.offset - page;
|
|
51350
|
-
if (newOffset < 0) newOffset = 0;
|
|
51351
|
-
} else if (props.direction === 'x' && plus || props.direction === 'y' && e.clientY > rect.top) {
|
|
51352
|
-
newOffset = props.offset + page;
|
|
51353
|
-
if (newOffset > 1) newOffset = 1;
|
|
51354
|
-
}
|
|
51355
|
-
props.onScroll(newOffset);
|
|
51356
|
-
});
|
|
51357
|
-
var _useDragMock = use_drag_mock({
|
|
51358
|
-
onDragStart: onDragStart,
|
|
51359
|
-
onDragMove: onDragMove
|
|
51360
|
-
}),
|
|
51361
|
-
handleMouseDown = _useDragMock.handleMouseDown,
|
|
51362
|
-
isDragging = _useDragMock.isDragging;
|
|
51363
|
-
if (!show) return null;
|
|
51364
|
-
var style = {};
|
|
51365
|
-
var value = (props.length - barLength) * props.offset;
|
|
51366
|
-
var x = isRtl ? 'right' : 'left';
|
|
51367
|
-
if (props.scrollLength > 0) {
|
|
51368
|
-
if (props.direction === 'x') {
|
|
51369
|
-
style.width = "".concat(props.length / props.scrollLength * 100, "%");
|
|
51370
|
-
style[x] = value;
|
|
51371
|
-
} else {
|
|
51372
|
-
style.height = "".concat(props.length / props.scrollLength * 100, "%");
|
|
51373
|
-
style.top = value;
|
|
51374
|
-
}
|
|
51375
|
-
}
|
|
51376
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
51377
|
-
className: classnames_default()(classes === null || classes === void 0 ? void 0 : classes.scrollbar, props.direction === 'x' && (classes === null || classes === void 0 ? void 0 : classes.scrollbarX), props.direction === 'y' && (classes === null || classes === void 0 ? void 0 : classes.scrollbarY), isDragging && (classes === null || classes === void 0 ? void 0 : classes.scrollbarDragging)),
|
|
51378
|
-
dir: config.direction,
|
|
51379
|
-
onClick: handleBgClick,
|
|
51380
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
51381
|
-
className: classes === null || classes === void 0 ? void 0 : classes.scrolbarHandler,
|
|
51382
|
-
onMouseDown: handleMouseDown,
|
|
51383
|
-
style: style
|
|
51384
|
-
})
|
|
51385
|
-
});
|
|
51386
|
-
};
|
|
51387
|
-
/* harmony default export */ var scrollbar = (Scrollbar);
|
|
51388
|
-
;// CONCATENATED MODULE: ../base/src/menu/scroll.tsx
|
|
51389
|
-
|
|
51390
|
-
|
|
51391
|
-
|
|
51392
|
-
|
|
51393
|
-
|
|
51394
|
-
var scroll_Scroll = function Scroll(props) {
|
|
51395
|
-
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
51396
|
-
timer: 0
|
|
51397
|
-
}),
|
|
51398
|
-
context = _useRef.current;
|
|
51399
|
-
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
|
|
51400
|
-
_useState2 = slicedToArray_default()(_useState, 2),
|
|
51401
|
-
offset = _useState2[0],
|
|
51402
|
-
setScroll = _useState2[1];
|
|
51403
|
-
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
|
|
51404
|
-
width: 0,
|
|
51405
|
-
scrollWidth: 0,
|
|
51406
|
-
height: 0,
|
|
51407
|
-
scrollHeight: 0
|
|
51408
|
-
}),
|
|
51409
|
-
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
51410
|
-
info = _useState4[0],
|
|
51411
|
-
setInfo = _useState4[1];
|
|
51412
|
-
var scrollLength = props.direction === 'x' ? info.scrollWidth : info.scrollHeight;
|
|
51413
|
-
var length = props.direction === 'x' ? info.width : info.height;
|
|
51414
|
-
var show = scrollLength > length;
|
|
51415
|
-
var handleResize = usePersistFn(function () {
|
|
51416
|
-
var target = props.targetRef.current;
|
|
51417
|
-
if (!target) return;
|
|
51418
|
-
if (context.timer) {
|
|
51419
|
-
clearTimeout(context.timer);
|
|
51420
|
-
context.timer = null;
|
|
51421
|
-
}
|
|
51422
|
-
context.timer = setTimeout(function () {
|
|
51423
|
-
var scrollWidth = target.scrollWidth,
|
|
51424
|
-
scrollHeight = target.scrollHeight,
|
|
51425
|
-
clientHeight = target.clientHeight,
|
|
51426
|
-
clientWidth = target.clientWidth;
|
|
51427
|
-
setInfo({
|
|
51428
|
-
width: clientWidth,
|
|
51429
|
-
scrollWidth: scrollWidth,
|
|
51430
|
-
height: clientHeight,
|
|
51431
|
-
scrollHeight: scrollHeight
|
|
51432
|
-
});
|
|
51433
|
-
}, 200);
|
|
51434
|
-
});
|
|
51435
|
-
useResize({
|
|
51436
|
-
targetRef: props.targetRef,
|
|
51437
|
-
cb: handleResize,
|
|
51438
|
-
timer: 0
|
|
51439
|
-
});
|
|
51440
|
-
var handleWheel = usePersistFn(function (e) {
|
|
51441
|
-
e.preventDefault();
|
|
51442
|
-
var target = e.currentTarget;
|
|
51443
|
-
var wheel = normalize_wheel(e);
|
|
51444
|
-
var delta = props.direction === 'x' ? wheel.pixelX : wheel.pixelY;
|
|
51445
|
-
if (props.direction === 'x') {
|
|
51446
|
-
target.scrollLeft += delta;
|
|
51447
|
-
} else {
|
|
51448
|
-
target.scrollTop += delta;
|
|
51449
|
-
}
|
|
51450
|
-
var newOffset = offset + delta / (scrollLength - length);
|
|
51451
|
-
if (newOffset < 0) newOffset = 0;
|
|
51452
|
-
if (newOffset > 1) newOffset = 1;
|
|
51453
|
-
setScroll(newOffset);
|
|
51454
|
-
});
|
|
51455
|
-
var handleScroll = usePersistFn(function (percent) {
|
|
51456
|
-
var target = props.targetRef.current;
|
|
51457
|
-
if (!target) return;
|
|
51458
|
-
if (props.direction === 'x') {
|
|
51459
|
-
target.scrollLeft = percent * (info.scrollWidth - info.width);
|
|
51460
|
-
} else {
|
|
51461
|
-
target.scrollTop = percent * (info.scrollHeight - info.height);
|
|
51462
|
-
}
|
|
51463
|
-
setScroll(percent);
|
|
51464
|
-
});
|
|
51465
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
51466
|
-
var target = props.targetRef.current;
|
|
51467
|
-
if (target) {
|
|
51468
|
-
if (show) {
|
|
51469
|
-
target.addEventListener('wheel', handleWheel, {
|
|
51470
|
-
passive: false
|
|
51471
|
-
});
|
|
51472
|
-
} else {
|
|
51473
|
-
target.removeEventListener('wheel', handleWheel);
|
|
51474
|
-
}
|
|
51475
|
-
}
|
|
51476
|
-
return function () {
|
|
51477
|
-
if (target) {
|
|
51478
|
-
target.removeEventListener('wheel', handleWheel);
|
|
51479
|
-
}
|
|
51480
|
-
};
|
|
51481
|
-
}, [show, props.targetRef.current]);
|
|
51482
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
51483
|
-
handleResize();
|
|
51484
|
-
return function () {
|
|
51485
|
-
if (context.timer) {
|
|
51486
|
-
clearTimeout(context.timer);
|
|
51487
|
-
context.timer = null;
|
|
51488
|
-
}
|
|
51489
|
-
};
|
|
51490
|
-
}, [props.data]);
|
|
51491
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)(scrollbar, {
|
|
51492
|
-
direction: props.direction,
|
|
51493
|
-
length: props.direction === 'x' ? info.width : info.height,
|
|
51494
|
-
scrollLength: props.direction === 'x' ? info.scrollWidth : info.scrollHeight,
|
|
51495
|
-
offset: offset,
|
|
51496
|
-
onScroll: handleScroll,
|
|
51497
|
-
jssStyle: props.jssStyle
|
|
51498
|
-
});
|
|
51499
|
-
};
|
|
51500
|
-
/* harmony default export */ var menu_scroll = (scroll_Scroll);
|
|
51501
51444
|
;// CONCATENATED MODULE: ../base/src/menu/menu.tsx
|
|
51502
51445
|
|
|
51503
51446
|
|
|
@@ -51505,7 +51448,7 @@ var scroll_Scroll = function Scroll(props) {
|
|
|
51505
51448
|
|
|
51506
51449
|
|
|
51507
51450
|
|
|
51508
|
-
|
|
51451
|
+
// import Scroll from './scroll';
|
|
51509
51452
|
|
|
51510
51453
|
|
|
51511
51454
|
var menu_emptyArray = [];
|
|
@@ -51533,7 +51476,7 @@ var Menu = function Menu(props) {
|
|
|
51533
51476
|
}
|
|
51534
51477
|
var classes = (_props$jssStyle = props.jssStyle) === null || _props$jssStyle === void 0 || (_props$jssStyle$menu = _props$jssStyle.menu) === null || _props$jssStyle$menu === void 0 ? void 0 : _props$jssStyle$menu.call(_props$jssStyle);
|
|
51535
51478
|
var isVertical = mode === 'vertical' || mode === 'vertical-auto';
|
|
51536
|
-
|
|
51479
|
+
// const isHorizontal = mode === 'horizontal';
|
|
51537
51480
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
51538
51481
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
51539
51482
|
hasOpen = _useState2[0],
|
|
@@ -51554,7 +51497,9 @@ var Menu = function Menu(props) {
|
|
|
51554
51497
|
var hasExpand = data.some(function (item) {
|
|
51555
51498
|
return item && item.children && (props.looseChildren || item.children.length);
|
|
51556
51499
|
});
|
|
51557
|
-
|
|
51500
|
+
|
|
51501
|
+
// const showScrollBar = isHorizontal || isVertical;
|
|
51502
|
+
|
|
51558
51503
|
var renderHeader = function renderHeader() {
|
|
51559
51504
|
if (modeProps === 'horizontal') return;
|
|
51560
51505
|
if (props.header) {
|
|
@@ -51629,11 +51574,6 @@ var Menu = function Menu(props) {
|
|
|
51629
51574
|
}, key);
|
|
51630
51575
|
})
|
|
51631
51576
|
})
|
|
51632
|
-
}), showScrollBar && /*#__PURE__*/(0,jsx_runtime.jsx)(menu_scroll, {
|
|
51633
|
-
targetRef: scrollRef,
|
|
51634
|
-
direction: mode === 'vertical' || mode === 'vertical-auto' ? 'y' : 'x',
|
|
51635
|
-
data: data,
|
|
51636
|
-
jssStyle: props.jssStyle
|
|
51637
51577
|
})]
|
|
51638
51578
|
}));
|
|
51639
51579
|
};
|
|
@@ -51684,8 +51624,8 @@ var Search = function Search(props) {
|
|
|
51684
51624
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
51685
51625
|
className: classnames_default()(classes === null || classes === void 0 ? void 0 : classes.wrapper, theme === 'light' && (classes === null || classes === void 0 ? void 0 : classes.wrapperLight), theme === 'dark' && (classes === null || classes === void 0 ? void 0 : classes.wrapperDark), !!rest.disabled && (classes === null || classes === void 0 ? void 0 : classes.wrapperDisabled), collpase && (classes === null || classes === void 0 ? void 0 : classes.wrapperCollapsed), className),
|
|
51686
51626
|
style: style,
|
|
51687
|
-
onClick: onSearchClick,
|
|
51688
|
-
children:
|
|
51627
|
+
onClick: !props.disabled ? onSearchClick : undefined,
|
|
51628
|
+
children: /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_input_input, objectSpread2_default()(objectSpread2_default()({
|
|
51689
51629
|
prefix: Search,
|
|
51690
51630
|
className: classes === null || classes === void 0 ? void 0 : classes.input
|
|
51691
51631
|
}, rest), {}, {
|
|
@@ -51850,9 +51790,11 @@ var message_Message = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
51850
51790
|
_this = _super.call(this, props);
|
|
51851
51791
|
defineProperty_default()(assertThisInitialized_default()(_this), "cachedHeight", void 0);
|
|
51852
51792
|
defineProperty_default()(assertThisInitialized_default()(_this), "timeoutMap", void 0);
|
|
51793
|
+
defineProperty_default()(assertThisInitialized_default()(_this), "messages", void 0);
|
|
51853
51794
|
_this.state = {
|
|
51854
51795
|
messages: []
|
|
51855
51796
|
};
|
|
51797
|
+
_this.messages = [];
|
|
51856
51798
|
_this.cachedHeight = {};
|
|
51857
51799
|
_this.timeoutMap = {};
|
|
51858
51800
|
_this.removeMessage = _this.removeMessage.bind(assertThisInitialized_default()(_this));
|
|
@@ -51860,16 +51802,24 @@ var message_Message = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
51860
51802
|
return _this;
|
|
51861
51803
|
}
|
|
51862
51804
|
createClass_default()(Message, [{
|
|
51805
|
+
key: "setMessages",
|
|
51806
|
+
value: function setMessages(messages) {
|
|
51807
|
+
this.messages = messages;
|
|
51808
|
+
this.setState({
|
|
51809
|
+
messages: messages
|
|
51810
|
+
});
|
|
51811
|
+
}
|
|
51812
|
+
}, {
|
|
51863
51813
|
key: "addMessage",
|
|
51864
51814
|
value: function addMessage(msg) {
|
|
51865
51815
|
var _this2 = this;
|
|
51866
51816
|
var id = message_getUidStr();
|
|
51867
|
-
var
|
|
51868
|
-
|
|
51817
|
+
var newMessages = message_produce(this.messages, function (messages) {
|
|
51818
|
+
messages.push(Object.assign({
|
|
51869
51819
|
id: id
|
|
51870
51820
|
}, msg));
|
|
51871
51821
|
});
|
|
51872
|
-
this.
|
|
51822
|
+
this.setMessages(newMessages);
|
|
51873
51823
|
if (msg.duration > 0) {
|
|
51874
51824
|
var closeTimeDelay = setTimeout(function () {
|
|
51875
51825
|
_this2.closeMessageForAnimation(id, dismissDuration, _this2.cachedHeight[id]);
|
|
@@ -51882,7 +51832,7 @@ var message_Message = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
51882
51832
|
key: "removeMessage",
|
|
51883
51833
|
value: function removeMessage(id) {
|
|
51884
51834
|
var callback;
|
|
51885
|
-
var messages = this.
|
|
51835
|
+
var messages = this.messages.filter(function (m) {
|
|
51886
51836
|
if (m.id !== id) return true;
|
|
51887
51837
|
if (m.onClose) {
|
|
51888
51838
|
callback = m.onClose;
|
|
@@ -51893,9 +51843,7 @@ var message_Message = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
51893
51843
|
var _this$props$onDestroy, _this$props;
|
|
51894
51844
|
(_this$props$onDestroy = (_this$props = this.props).onDestroy) === null || _this$props$onDestroy === void 0 || _this$props$onDestroy.call(_this$props);
|
|
51895
51845
|
} else {
|
|
51896
|
-
this.
|
|
51897
|
-
messages: messages
|
|
51898
|
-
});
|
|
51846
|
+
this.setMessages(messages);
|
|
51899
51847
|
}
|
|
51900
51848
|
if (callback) callback();
|
|
51901
51849
|
}
|
|
@@ -51904,16 +51852,15 @@ var message_Message = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
51904
51852
|
value: function closeMessageForAnimation(id, duration, msgHeight) {
|
|
51905
51853
|
var _this3 = this;
|
|
51906
51854
|
// duration animation duration time
|
|
51907
|
-
this.
|
|
51908
|
-
|
|
51909
|
-
|
|
51910
|
-
|
|
51911
|
-
|
|
51912
|
-
|
|
51913
|
-
}
|
|
51914
|
-
});
|
|
51855
|
+
var newMessages = message_produce(this.messages, function (messages) {
|
|
51856
|
+
messages.forEach(function (m) {
|
|
51857
|
+
if (m.id === id) {
|
|
51858
|
+
m.dismiss = true;
|
|
51859
|
+
m.h = msgHeight || 0;
|
|
51860
|
+
}
|
|
51915
51861
|
});
|
|
51916
51862
|
});
|
|
51863
|
+
this.setMessages(newMessages);
|
|
51917
51864
|
setTimeout(function () {
|
|
51918
51865
|
_this3.removeMessage(id);
|
|
51919
51866
|
}, duration);
|
|
@@ -62953,7 +62900,7 @@ var upload_interface = __webpack_require__(4412);
|
|
|
62953
62900
|
|
|
62954
62901
|
|
|
62955
62902
|
/* harmony default export */ var src_0 = ({
|
|
62956
|
-
version: '3.2.0
|
|
62903
|
+
version: '3.2.0'
|
|
62957
62904
|
});
|
|
62958
62905
|
}();
|
|
62959
62906
|
/******/ return __webpack_exports__;
|