shineout 3.2.0-beta.2 → 3.2.0-beta.4
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/dist/shineout.js +312 -316
- 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/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-beta.
|
|
11963
|
+
/* harmony default export */ var version = ('3.2.0-beta.4');
|
|
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(),
|
|
@@ -12521,6 +12524,8 @@ var breadcrumbTokens = {
|
|
|
12521
12524
|
breadcrumbFontWieght: 'Weight-regular',
|
|
12522
12525
|
breadcrumbLinkColor: 'Neutral-text-3',
|
|
12523
12526
|
breadcrumbLinkHoverColor: 'Brand-5',
|
|
12527
|
+
breadcrumbDefaultLinkColor: 'Brand-6',
|
|
12528
|
+
breadcrumbDefaultLinkHoverColor: 'Brand-5',
|
|
12524
12529
|
breadcrumbListPaddingY: 'Spacing-4',
|
|
12525
12530
|
breadcrumbListItemBorderRadius: 'Radius-default',
|
|
12526
12531
|
breadcrumbListItemWrapperPaddingX: 'Spacing-4',
|
|
@@ -12528,6 +12533,7 @@ var breadcrumbTokens = {
|
|
|
12528
12533
|
breadcrumbListItemPaddingY: 'Spacing-5',
|
|
12529
12534
|
breadcrumbListItemHoverBackgroundColor: 'Neutral-fill-2',
|
|
12530
12535
|
breadcrumbListItemHoverFontColor: 'Neutral-text-3',
|
|
12536
|
+
breadcrumbPrevFontWeight: 'Weight-regular',
|
|
12531
12537
|
breadcrumbSeparatorMarginX: 'Spacing-8',
|
|
12532
12538
|
breadcrumbIconBackgroundColor: 'Neutral-text-4'
|
|
12533
12539
|
};
|
|
@@ -13209,12 +13215,15 @@ var datePickerTokens = {
|
|
|
13209
13215
|
datePickerPanelTitlePaddingTop: 'Spacing-10',
|
|
13210
13216
|
datePickerPanelTitleFontSize: 'Font-14',
|
|
13211
13217
|
datePickerPanelColor: 'Neutral-text-5',
|
|
13218
|
+
datePickerPanelFontWeight: 'Weight-regular',
|
|
13212
13219
|
datePickerPanelBackgroundColor: 'Neutral-fill-1',
|
|
13213
13220
|
datePickerPanelShadow: 'Shadow-2',
|
|
13214
13221
|
datePickerPanelRadius: 'Radius-default',
|
|
13215
13222
|
datePickerPanelMargin: 'Spacing-24',
|
|
13216
13223
|
datePickerPanelBorder: 'Neutral-border-1',
|
|
13217
13224
|
datePickerPanelHeaderFontSize: 'Font-14',
|
|
13225
|
+
datePickerPanelHeaderFontColor: 'Neutral-text-5',
|
|
13226
|
+
datePickerPanelHeaderFontWeight: 'Weight-regular',
|
|
13218
13227
|
datePickerPanelHeaderPaddingX: 'Spacing-12',
|
|
13219
13228
|
datePickerPanelHeaderPaddingY: 'Spacing-8',
|
|
13220
13229
|
datePickerPanelHeaderBorderColor: 'Neutral-border-1',
|
|
@@ -13322,7 +13331,7 @@ var dividerTokens = {
|
|
|
13322
13331
|
dividerHorizontalMarginY: 'Spacing-24',
|
|
13323
13332
|
dividerHorizontalTextMarginY: 'Spacing-16',
|
|
13324
13333
|
dividerVerticalMarginX: 'Spacing-12',
|
|
13325
|
-
dividerTextPaddingX: '
|
|
13334
|
+
dividerTextPaddingX: 'Spacing-12'
|
|
13326
13335
|
};
|
|
13327
13336
|
/* harmony default export */ var divider = (dividerTokens);
|
|
13328
13337
|
;// CONCATENATED MODULE: ../theme/src/divider/index.ts
|
|
@@ -13642,7 +13651,7 @@ var menuTokens = {
|
|
|
13642
13651
|
menuDarkItemDisabledBackgroundColor: 'Neutral-fill-10',
|
|
13643
13652
|
menuDarkItemDisabledFontColor: 'Neutral-text-4',
|
|
13644
13653
|
menuDarkHeaderBorderColor: 'Neutral-fill-8',
|
|
13645
|
-
menuSearchBorderRadius: 'Radius-
|
|
13654
|
+
menuSearchBorderRadius: 'Radius-full',
|
|
13646
13655
|
menuSearchBorderColor: 'Neutral-border-2',
|
|
13647
13656
|
menuSearchPaddingX: 'Spacing-8',
|
|
13648
13657
|
menuSearchIconSize: 'Size-7',
|
|
@@ -14207,9 +14216,6 @@ var tableTokens = {
|
|
|
14207
14216
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
14208
14217
|
|
|
14209
14218
|
var tabsTokens = {
|
|
14210
|
-
tabsExtraFillHoverBackgroundColor: 'Neutral-fill-3',
|
|
14211
|
-
tabsCardDisabledBackgroundColor: 'Neutral-fill-2',
|
|
14212
|
-
tabsArrowFontColor: 'Neutral-text-4',
|
|
14213
14219
|
tabsFontColor: 'Neutral-text-5',
|
|
14214
14220
|
tabsBackgroundColor: 'Neutral-fill-2',
|
|
14215
14221
|
tabsBorderColor: 'Neutral-border-1',
|
|
@@ -14226,17 +14232,67 @@ var tabsTokens = {
|
|
|
14226
14232
|
tabsNearlyMargin: 'Spacing-4',
|
|
14227
14233
|
tabsLinePaddingX: 'Spacing-8',
|
|
14228
14234
|
tabsLinePaddingY: 'Spacing-6',
|
|
14235
|
+
tabsLineHrBackgroundColor: 'Neutral-border-1',
|
|
14236
|
+
tabsLineAfterBackgroundColor: 'Brand-6',
|
|
14229
14237
|
tabsLineInnerPaddingX: 'Spacing-8',
|
|
14230
14238
|
tabsLineInnerPaddingY: 'Spacing-4',
|
|
14239
|
+
tabsLineFontColor: 'Neutral-text-5',
|
|
14240
|
+
tabsLineFontWeight: 'Weight-regular',
|
|
14241
|
+
tabsLineFontSize: 'Font-14',
|
|
14242
|
+
tabsLineBackgroundColor: 'Neutral-fill-1',
|
|
14243
|
+
tabsLineActiveBackgroundColor: 'Neutral-fill-3',
|
|
14244
|
+
tabsLineCheckedFontColor: 'Brand-6',
|
|
14245
|
+
tabsLineCheckedFontSize: 'Font-14',
|
|
14246
|
+
tabsLineCheckedFontWeight: 'Weight-medium',
|
|
14247
|
+
tabsLineCheckedBackgroundColor: 'Neutral-fill-1',
|
|
14248
|
+
tabsLineHoverFontSize: 'Font-14',
|
|
14249
|
+
tabsLineHoverBackgroundColor: 'Neutral-fill-2',
|
|
14250
|
+
tabsLineDisabledFontColor: 'Neutral-text-2',
|
|
14231
14251
|
tabsFillPaddingX: 'Spacing-4',
|
|
14232
14252
|
tabsFillPaddingY: 'Spacing-4',
|
|
14233
14253
|
tabsFillInnerPaddingX: 'Spacing-16',
|
|
14234
14254
|
tabsFillInnerPaddingY: 'Spacing-5',
|
|
14255
|
+
tabsFillFontColor: 'Neutral-text-5',
|
|
14256
|
+
tabsFillFontWeight: 'Weight-regular',
|
|
14257
|
+
tabsFillFontSize: 'Font-14',
|
|
14258
|
+
tabsFillBackgroundColor: 'Neutral-fill-2',
|
|
14259
|
+
tabsFillActiveFontWeight: 'Weight-medium',
|
|
14260
|
+
tabsFillActiveFontSize: 'Font-14',
|
|
14261
|
+
tabsFillActiveBackgroundColor: 'Neutral-fill-4',
|
|
14262
|
+
tabsFillCheckedFontColor: 'Brand-6',
|
|
14263
|
+
tabsFillCheckedFontSize: 'Font-14',
|
|
14264
|
+
tabsFillCheckedFontWeight: 'Weight-medium',
|
|
14265
|
+
tabsFillCheckedBackgroundColor: 'Neutral-fill-1',
|
|
14266
|
+
tabsFillHoverBackgroundColor: 'Neutral-fill-3',
|
|
14267
|
+
tabsFillDisabledFontColor: 'Neutral-text-2',
|
|
14268
|
+
tabsDashFontWeight: 'Weight-regular',
|
|
14269
|
+
tabsDashFontSize: 'Font-14',
|
|
14270
|
+
tabsDashActiveFontWeight: 'Weight-medium',
|
|
14271
|
+
tabsDashActiveFontSize: 'Font-14',
|
|
14272
|
+
tabsCardPaddingX: 'Spacing-15',
|
|
14273
|
+
tabsCardPaddingY: 'Spacing-9',
|
|
14274
|
+
tabsCardFontColor: 'Neutral-text-5',
|
|
14275
|
+
tabsCardFontWeight: 'Weight-regular',
|
|
14276
|
+
tabsCardFontSize: 'Font-14',
|
|
14277
|
+
tabsCardBackgroundColor: 'Neutral-fill-2',
|
|
14278
|
+
tabsCardActiveFontWeight: 'Weight-medium',
|
|
14279
|
+
tabsCardActiveFontSize: 'Font-14',
|
|
14280
|
+
tabsCardActiveBackgroundColor: 'Neutral-fill-4',
|
|
14281
|
+
tabsCardBorderColor: 'Neutral-border-1',
|
|
14282
|
+
tabsCardCheckedFontColor: 'Brand-6',
|
|
14283
|
+
tabsCardCheckedFontSize: 'Font-14',
|
|
14284
|
+
tabsCardCheckedFontWeight: 'Weight-medium',
|
|
14285
|
+
tabsCardCheckedBackgroundColor: 'Neutral-fill-1',
|
|
14286
|
+
tabsCardHoverBackgroundColor: 'Neutral-fill-3',
|
|
14287
|
+
tabsCardDisabledFontColor: 'Neutral-text-2',
|
|
14288
|
+
tabsCardDisabledBackgroundColor: 'Neutral-fill-2',
|
|
14235
14289
|
tabsSplitBorderColor: 'Neutral-border-2',
|
|
14236
14290
|
tabsActionVerticalPaddingX: 'Spacing-7',
|
|
14237
14291
|
tabsActionVerticalPaddingY: 'Spacing-4',
|
|
14238
14292
|
tabsActionHorizontalPaddingX: 'Spacing-7',
|
|
14239
|
-
tabsActionHorizontalPaddingY: 'Spacing-8'
|
|
14293
|
+
tabsActionHorizontalPaddingY: 'Spacing-8',
|
|
14294
|
+
tabsExtraFillHoverBackgroundColor: 'Neutral-fill-3',
|
|
14295
|
+
tabsArrowFontColor: 'Neutral-text-4'
|
|
14240
14296
|
};
|
|
14241
14297
|
/* harmony default export */ var tabs = (tabsTokens);
|
|
14242
14298
|
;// CONCATENATED MODULE: ../theme/src/tabs/index.ts
|
|
@@ -14976,7 +15032,7 @@ var alertStyle = {
|
|
|
14976
15032
|
width: src.alertFontSize,
|
|
14977
15033
|
color: src.alertCloseFontColor,
|
|
14978
15034
|
fontSize: src.alertFontSize,
|
|
14979
|
-
height: src.
|
|
15035
|
+
height: src.alertFontSize,
|
|
14980
15036
|
flex: '0 0 auto',
|
|
14981
15037
|
display: 'flex',
|
|
14982
15038
|
alignItems: 'center',
|
|
@@ -14986,8 +15042,15 @@ var alertStyle = {
|
|
|
14986
15042
|
color: src.alertCloseHoverColor
|
|
14987
15043
|
}
|
|
14988
15044
|
},
|
|
15045
|
+
closeWrapper: {
|
|
15046
|
+
width: src.alertFontSize,
|
|
15047
|
+
height: src.lineHeightDynamic,
|
|
15048
|
+
display: 'flex',
|
|
15049
|
+
alignItems: 'center'
|
|
15050
|
+
},
|
|
14989
15051
|
content: {
|
|
14990
15052
|
flex: '1 1 0',
|
|
15053
|
+
minWidth: 0,
|
|
14991
15054
|
wordBreak: 'break-all'
|
|
14992
15055
|
},
|
|
14993
15056
|
pending: {
|
|
@@ -15060,6 +15123,7 @@ var breadcrumbStyle = {
|
|
|
15060
15123
|
wrapper: {
|
|
15061
15124
|
lineHeight: src.lineHeightDynamic,
|
|
15062
15125
|
fontSize: src.breadcrumbFontSize,
|
|
15126
|
+
fontWeight: src.breadcrumbFontWieght,
|
|
15063
15127
|
display: 'flex',
|
|
15064
15128
|
alignItems: 'center',
|
|
15065
15129
|
color: src.breadcrumbFontColor,
|
|
@@ -15088,7 +15152,13 @@ var breadcrumbStyle = {
|
|
|
15088
15152
|
},
|
|
15089
15153
|
item: {
|
|
15090
15154
|
display: 'flex',
|
|
15091
|
-
alignItems: 'center'
|
|
15155
|
+
alignItems: 'center',
|
|
15156
|
+
'& a:not(a[class])': {
|
|
15157
|
+
color: src.breadcrumbDefaultLinkColor,
|
|
15158
|
+
'&:hover': {
|
|
15159
|
+
color: src.breadcrumbDefaultLinkHoverColor
|
|
15160
|
+
}
|
|
15161
|
+
}
|
|
15092
15162
|
// '&:not(a) svg': {
|
|
15093
15163
|
// color: token.breadcrumbIconBackgroundColor,
|
|
15094
15164
|
// },
|
|
@@ -15324,12 +15394,17 @@ var textBeforeLine = function textBeforeLine() {
|
|
|
15324
15394
|
}
|
|
15325
15395
|
};
|
|
15326
15396
|
};
|
|
15327
|
-
|
|
15328
|
-
|
|
15329
|
-
|
|
15330
|
-
|
|
15331
|
-
|
|
15332
|
-
|
|
15397
|
+
|
|
15398
|
+
// const loading = (type: ButtonTypeWithoutLink, styles: ButtonStyleType) => {
|
|
15399
|
+
// const buttonStyle = button(type, styles);
|
|
15400
|
+
|
|
15401
|
+
// return {
|
|
15402
|
+
// '&$loading': {
|
|
15403
|
+
// ...buttonStyle['&$disabled'],
|
|
15404
|
+
// },
|
|
15405
|
+
// };
|
|
15406
|
+
// };
|
|
15407
|
+
|
|
15333
15408
|
var ButtonStyle = {
|
|
15334
15409
|
button: {
|
|
15335
15410
|
outline: 'none',
|
|
@@ -15450,13 +15525,26 @@ var ButtonStyle = {
|
|
|
15450
15525
|
cursor: 'not-allowed'
|
|
15451
15526
|
},
|
|
15452
15527
|
loading: {
|
|
15453
|
-
cursor: 'not-allowed'
|
|
15454
|
-
|
|
15455
|
-
'&$
|
|
15456
|
-
|
|
15457
|
-
|
|
15458
|
-
'&$
|
|
15459
|
-
|
|
15528
|
+
cursor: 'not-allowed'
|
|
15529
|
+
|
|
15530
|
+
// '&$default': {
|
|
15531
|
+
// ...loading('Secondary', ''),
|
|
15532
|
+
// },
|
|
15533
|
+
// '&$primary': {
|
|
15534
|
+
// ...loading('Primary', ''),
|
|
15535
|
+
// },
|
|
15536
|
+
// '&$success': {
|
|
15537
|
+
// ...loading('Success', ''),
|
|
15538
|
+
// },
|
|
15539
|
+
// '&$danger': {
|
|
15540
|
+
// ...loading('Danger', ''),
|
|
15541
|
+
// },
|
|
15542
|
+
// '&$warning': {
|
|
15543
|
+
// ...loading('Warning', ''),
|
|
15544
|
+
// },
|
|
15545
|
+
// '&$secondary': {
|
|
15546
|
+
// ...loading('Secondary', ''),
|
|
15547
|
+
// },
|
|
15460
15548
|
},
|
|
15461
15549
|
groupItem: {},
|
|
15462
15550
|
group: {
|
|
@@ -17116,6 +17204,7 @@ var datePickerStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
17116
17204
|
position: 'relative',
|
|
17117
17205
|
// width: token.datePickerDateWidth,
|
|
17118
17206
|
width: 240,
|
|
17207
|
+
cursor: 'pointer',
|
|
17119
17208
|
'&[data-soui-type="datetime"]': {
|
|
17120
17209
|
// width: token.datePickerDatetimeWidth,
|
|
17121
17210
|
width: 240
|
|
@@ -17346,6 +17435,7 @@ var datePickerStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
17346
17435
|
cursor: 'pointer',
|
|
17347
17436
|
width: src.datePickerPanelHeaderIconHotWidth,
|
|
17348
17437
|
height: src.datePickerPanelHeaderIconHotWidth,
|
|
17438
|
+
color: src.datePickerPanelHeaderIconColor,
|
|
17349
17439
|
borderRadius: '50%',
|
|
17350
17440
|
'&[dir=rtl]': {
|
|
17351
17441
|
transform: 'rotate(180deg)'
|
|
@@ -17369,6 +17459,8 @@ var datePickerStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
17369
17459
|
pickerHeaderInfo: {
|
|
17370
17460
|
cursor: 'pointer',
|
|
17371
17461
|
borderRadius: '2px',
|
|
17462
|
+
color: src.datePickerPanelHeaderFontColor,
|
|
17463
|
+
fontWeight: src.datePickerPanelHeaderFontWeight,
|
|
17372
17464
|
'&:hover': {
|
|
17373
17465
|
backgroundColor: src.datePickerPanelHeaderIconHoverBackgroundColor
|
|
17374
17466
|
}
|
|
@@ -17386,7 +17478,7 @@ var datePickerStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
17386
17478
|
'& th, & td': {
|
|
17387
17479
|
boxSizing: 'border-box',
|
|
17388
17480
|
padding: '0',
|
|
17389
|
-
fontWeight:
|
|
17481
|
+
fontWeight: src.datePickerPanelFontWeight
|
|
17390
17482
|
},
|
|
17391
17483
|
'& th': {
|
|
17392
17484
|
color: src.datePickerCellHeaderColor,
|
|
@@ -19498,7 +19590,9 @@ var menuStyle = {
|
|
|
19498
19590
|
width: '100%',
|
|
19499
19591
|
backgroundColor: src.menuItemBackgroundColor,
|
|
19500
19592
|
transition: "width ".concat(animationDuration, " ").concat(transitionFunc),
|
|
19501
|
-
color: src.menuFontColor
|
|
19593
|
+
color: src.menuFontColor,
|
|
19594
|
+
display: 'flex',
|
|
19595
|
+
flexDirection: 'column'
|
|
19502
19596
|
},
|
|
19503
19597
|
wrapperLight: {},
|
|
19504
19598
|
wrapperDark: {
|
|
@@ -19575,12 +19669,46 @@ var menuStyle = {
|
|
|
19575
19669
|
}
|
|
19576
19670
|
},
|
|
19577
19671
|
scrollbox: {
|
|
19672
|
+
flex: 1,
|
|
19673
|
+
minWidth: 0,
|
|
19674
|
+
minHeight: 0,
|
|
19675
|
+
overflow: 'auto',
|
|
19676
|
+
// scrollbarWidth: 'thin',
|
|
19677
|
+
// '$wrapperLight &': {
|
|
19678
|
+
// scrollbarColor: 'rgba(0, 0, 0, 0.1) transparent',
|
|
19679
|
+
// '&::-moz-scrollbar-thumb:hover': {
|
|
19680
|
+
// backgroundColor: 'rgba(0, 0, 0, 0.2)',
|
|
19681
|
+
// },
|
|
19682
|
+
// },
|
|
19683
|
+
// '$wrapperDark &': {
|
|
19684
|
+
// scrollbarColor: 'rgba(255, 255, 255, 0.4) transparent',
|
|
19685
|
+
// },
|
|
19578
19686
|
'$wrapperVertical &': {
|
|
19579
|
-
|
|
19580
|
-
height: '100%'
|
|
19687
|
+
overflowX: 'hidden'
|
|
19581
19688
|
},
|
|
19582
19689
|
'$wrapperHorizontal &': {
|
|
19583
|
-
|
|
19690
|
+
overflowY: 'hidden'
|
|
19691
|
+
},
|
|
19692
|
+
'&::-webkit-scrollbar': {
|
|
19693
|
+
width: '6px',
|
|
19694
|
+
height: '6px'
|
|
19695
|
+
},
|
|
19696
|
+
'&::-webkit-scrollbar-thumb': {
|
|
19697
|
+
border: '0px solid transparent',
|
|
19698
|
+
backgroundClip: 'content-box',
|
|
19699
|
+
borderRadius: '11px',
|
|
19700
|
+
'$wrapperLight &': {
|
|
19701
|
+
backgroundColor: 'rgba(0, 0, 0, 0.05)',
|
|
19702
|
+
'&:hover': {
|
|
19703
|
+
backgroundColor: 'rgba(0, 0, 0, 0.1)'
|
|
19704
|
+
}
|
|
19705
|
+
},
|
|
19706
|
+
'$wrapperDark &': {
|
|
19707
|
+
backgroundColor: 'rgba(255, 255, 255, 0.4)',
|
|
19708
|
+
'&:hover': {
|
|
19709
|
+
backgroundColor: 'rgba(255, 255, 255, 0.5)'
|
|
19710
|
+
}
|
|
19711
|
+
}
|
|
19584
19712
|
}
|
|
19585
19713
|
},
|
|
19586
19714
|
root: {
|
|
@@ -19595,11 +19723,9 @@ var menuStyle = {
|
|
|
19595
19723
|
}
|
|
19596
19724
|
},
|
|
19597
19725
|
wrapperInline: {},
|
|
19598
|
-
wrapperVertical: {
|
|
19599
|
-
position: 'relative'
|
|
19600
|
-
},
|
|
19726
|
+
wrapperVertical: {},
|
|
19601
19727
|
wrapperHorizontal: {
|
|
19602
|
-
|
|
19728
|
+
flexDirection: 'row'
|
|
19603
19729
|
},
|
|
19604
19730
|
wrapperHasOpen: {},
|
|
19605
19731
|
children: {
|
|
@@ -24518,12 +24644,12 @@ var getLineStyle = function getLineStyle() {
|
|
|
24518
24644
|
bottom: 0,
|
|
24519
24645
|
left: 0,
|
|
24520
24646
|
width: 2
|
|
24521
|
-
}))
|
|
24522
|
-
'& :not([data-soui-state="active"])$tab': {
|
|
24523
|
-
|
|
24524
|
-
|
|
24525
|
-
|
|
24526
|
-
}
|
|
24647
|
+
}))
|
|
24648
|
+
// '& :not([data-soui-state="active"])$tab': {
|
|
24649
|
+
// '&:after': {
|
|
24650
|
+
// display: 'none',
|
|
24651
|
+
// },
|
|
24652
|
+
// },
|
|
24527
24653
|
},
|
|
24528
24654
|
'&[data-soui-position^="right-"][data-soui-shape="line"]': {
|
|
24529
24655
|
'&[dir=ltr]': objectSpread2_default()({
|
|
@@ -24549,12 +24675,7 @@ var getLineStyle = function getLineStyle() {
|
|
|
24549
24675
|
bottom: 0,
|
|
24550
24676
|
right: 0,
|
|
24551
24677
|
width: 2
|
|
24552
|
-
}))
|
|
24553
|
-
'& :not([data-soui-state="active"])$tab': {
|
|
24554
|
-
'&:after': {
|
|
24555
|
-
display: 'none'
|
|
24556
|
-
}
|
|
24557
|
-
}
|
|
24678
|
+
}))
|
|
24558
24679
|
},
|
|
24559
24680
|
'&[data-soui-position^="top-"][data-soui-shape="line"]': objectSpread2_default()({
|
|
24560
24681
|
'& $hr': {
|
|
@@ -24582,7 +24703,13 @@ var getLineStyle = function getLineStyle() {
|
|
|
24582
24703
|
})), {}, {
|
|
24583
24704
|
'& :not([data-soui-state="active"])$tab': {
|
|
24584
24705
|
'&:after': {
|
|
24585
|
-
|
|
24706
|
+
position: 'absolute',
|
|
24707
|
+
content: '""',
|
|
24708
|
+
top: 0,
|
|
24709
|
+
left: 0,
|
|
24710
|
+
width: '100%',
|
|
24711
|
+
height: 1,
|
|
24712
|
+
background: src.tabsBorderColor
|
|
24586
24713
|
}
|
|
24587
24714
|
}
|
|
24588
24715
|
})
|
|
@@ -24642,12 +24769,6 @@ var getFillStyle = function getFillStyle() {
|
|
|
24642
24769
|
color: src.tabsActiveFontColor
|
|
24643
24770
|
}
|
|
24644
24771
|
},
|
|
24645
|
-
'&:not([data-soui-state="active"]):not([data-soui-state="disabled"]):hover $fillInner': {
|
|
24646
|
-
background: src.tabsExtraFillHoverBackgroundColor
|
|
24647
|
-
},
|
|
24648
|
-
'&:not([data-soui-state="active"]):not([data-soui-state="disabled"]):active $fillInner': {
|
|
24649
|
-
background: src.tabsClickBackgroundColor
|
|
24650
|
-
},
|
|
24651
24772
|
'&:before': {
|
|
24652
24773
|
content: '""',
|
|
24653
24774
|
position: 'absolute',
|
|
@@ -24790,7 +24911,10 @@ var tabsStyle = {
|
|
|
24790
24911
|
},
|
|
24791
24912
|
hr: {
|
|
24792
24913
|
position: 'absolute',
|
|
24793
|
-
background: src.tabsBorderColor
|
|
24914
|
+
background: src.tabsBorderColor,
|
|
24915
|
+
'$headerWrapper[data-soui-shape="line"] &': {
|
|
24916
|
+
background: src.tabsLineHrBackgroundColor
|
|
24917
|
+
}
|
|
24794
24918
|
},
|
|
24795
24919
|
cardHr: {
|
|
24796
24920
|
// aflter
|
|
@@ -24999,23 +25123,27 @@ var tabsStyle = {
|
|
|
24999
25123
|
'$headerWrapper[data-soui-shape="card"] &': {
|
|
25000
25124
|
'& $tab': {
|
|
25001
25125
|
position: 'relative',
|
|
25002
|
-
border: "1px solid ".concat(src.
|
|
25003
|
-
padding: "".concat(src.
|
|
25004
|
-
|
|
25126
|
+
border: "1px solid ".concat(src.tabsCardBorderColor),
|
|
25127
|
+
padding: "".concat(src.tabsCardPaddingY, " ").concat(src.tabsCardPaddingX),
|
|
25128
|
+
color: src.tabsCardFontColor,
|
|
25129
|
+
fontSize: src.tabsCardFontSize,
|
|
25130
|
+
fontWeight: src.tabsCardFontWeight,
|
|
25131
|
+
background: src.tabsCardBackgroundColor,
|
|
25005
25132
|
'&[data-soui-state="active"]': {
|
|
25006
|
-
color: src.
|
|
25007
|
-
|
|
25008
|
-
fontWeight:
|
|
25133
|
+
color: src.tabsCardCheckedFontColor,
|
|
25134
|
+
fontSize: src.tabsCardCheckedFontSize,
|
|
25135
|
+
fontWeight: src.tabsCardCheckedFontWeight,
|
|
25136
|
+
background: src.tabsCardCheckedBackgroundColor
|
|
25009
25137
|
},
|
|
25010
25138
|
'&[data-soui-state="disabled"]': {
|
|
25011
|
-
color: src.
|
|
25139
|
+
color: src.tabsCardDisabledFontColor,
|
|
25012
25140
|
cursor: 'not-allowed'
|
|
25013
25141
|
},
|
|
25014
25142
|
'&:not([data-soui-state="active"]):not([data-soui-state="disabled"]):hover': {
|
|
25015
|
-
background: src.
|
|
25143
|
+
background: src.tabsCardHoverBackgroundColor
|
|
25016
25144
|
},
|
|
25017
25145
|
'&:not([data-soui-state="active"]):not([data-soui-state="disabled"]):active': {
|
|
25018
|
-
background: src.
|
|
25146
|
+
background: src.tabsCardActiveBackgroundColor
|
|
25019
25147
|
}
|
|
25020
25148
|
}
|
|
25021
25149
|
},
|
|
@@ -25023,17 +25151,39 @@ var tabsStyle = {
|
|
|
25023
25151
|
'& $tab': {
|
|
25024
25152
|
position: 'relative',
|
|
25025
25153
|
padding: "".concat(src.tabsLinePaddingY, " ").concat(src.tabsLinePaddingX),
|
|
25026
|
-
|
|
25027
|
-
|
|
25154
|
+
color: src.tabsLineFontColor,
|
|
25155
|
+
fontSize: src.tabsLineFontSize,
|
|
25156
|
+
fontWeight: src.tabsLineFontWeight,
|
|
25157
|
+
background: src.tabsLineBackgroundColor,
|
|
25028
25158
|
'&[data-soui-state="active"]': {
|
|
25029
|
-
color: src.
|
|
25030
|
-
|
|
25031
|
-
|
|
25159
|
+
color: src.tabsLineCheckedFontColor,
|
|
25160
|
+
fontSize: src.tabsLineCheckedFontSize,
|
|
25161
|
+
background: src.tabsLineCheckedBackgroundColor,
|
|
25162
|
+
fontWeight: src.tabsLineCheckedFontWeight,
|
|
25163
|
+
'&:after': {
|
|
25164
|
+
background: src.tabsLineAfterBackgroundColor
|
|
25165
|
+
}
|
|
25032
25166
|
},
|
|
25033
25167
|
'&[data-soui-state="disabled"]': {
|
|
25034
|
-
color: src.
|
|
25168
|
+
color: src.tabsLineDisabledFontColor,
|
|
25035
25169
|
cursor: 'not-allowed'
|
|
25036
25170
|
},
|
|
25171
|
+
'[data-soui-position^="left-"] &': {
|
|
25172
|
+
'&:after': {
|
|
25173
|
+
width: 1,
|
|
25174
|
+
right: 0,
|
|
25175
|
+
left: 'auto',
|
|
25176
|
+
height: '100%',
|
|
25177
|
+
background: src.tabsBorderColor
|
|
25178
|
+
}
|
|
25179
|
+
},
|
|
25180
|
+
'[data-soui-position^="right-"] &': {
|
|
25181
|
+
'&:after': {
|
|
25182
|
+
width: 1,
|
|
25183
|
+
height: '100%',
|
|
25184
|
+
background: src.tabsBorderColor
|
|
25185
|
+
}
|
|
25186
|
+
},
|
|
25037
25187
|
'&:not([data-soui-state="active"])': {
|
|
25038
25188
|
'&:after': {
|
|
25039
25189
|
position: 'absolute',
|
|
@@ -25046,41 +25196,64 @@ var tabsStyle = {
|
|
|
25046
25196
|
}
|
|
25047
25197
|
},
|
|
25048
25198
|
'&:not([data-soui-state="active"]):not([data-soui-state="disabled"]):hover $lineInner': {
|
|
25049
|
-
background: src.
|
|
25199
|
+
background: src.tabsLineHoverBackgroundColor
|
|
25050
25200
|
},
|
|
25051
25201
|
'&:not([data-soui-state="active"]):not([data-soui-state="disabled"]):active $lineInner': {
|
|
25052
|
-
background: src.
|
|
25202
|
+
background: src.tabsLineActiveBackgroundColor
|
|
25053
25203
|
}
|
|
25054
25204
|
}
|
|
25055
25205
|
},
|
|
25056
25206
|
'$headerWrapper[data-soui-shape="dash"] &': {
|
|
25057
25207
|
'& $tab': {
|
|
25058
25208
|
padding: "".concat(src.tabsLinePaddingY, " ").concat(src.tabsLinePaddingX),
|
|
25209
|
+
color: src.tabsLineFontColor,
|
|
25210
|
+
fontSize: src.tabsLineFontSize,
|
|
25211
|
+
fontWeight: src.tabsLineFontWeight,
|
|
25212
|
+
background: src.tabsLineBackgroundColor,
|
|
25059
25213
|
'&[data-soui-state="active"]': {
|
|
25060
|
-
color: src.
|
|
25061
|
-
|
|
25062
|
-
|
|
25214
|
+
color: src.tabsLineCheckedFontColor,
|
|
25215
|
+
fontSize: src.tabsLineCheckedFontSize,
|
|
25216
|
+
background: src.tabsLineCheckedBackgroundColor,
|
|
25217
|
+
fontWeight: src.tabsLineCheckedFontWeight,
|
|
25218
|
+
'&:after': {
|
|
25219
|
+
background: src.tabsLineAfterBackgroundColor
|
|
25220
|
+
}
|
|
25063
25221
|
},
|
|
25064
25222
|
'&:not([data-soui-state="active"]):not([data-soui-state="disabled"]):hover $lineInner': {
|
|
25065
|
-
background: src.
|
|
25223
|
+
background: src.tabsLineHoverBackgroundColor
|
|
25066
25224
|
},
|
|
25067
25225
|
'&:not([data-soui-state="active"]):not([data-soui-state="disabled"]):active $lineInner': {
|
|
25068
|
-
background: src.
|
|
25226
|
+
background: src.tabsLineActiveBackgroundColor
|
|
25069
25227
|
},
|
|
25070
25228
|
'&[data-soui-state="disabled"]': {
|
|
25071
|
-
color: src.
|
|
25229
|
+
color: src.tabsLineDisabledFontColor,
|
|
25072
25230
|
cursor: 'not-allowed'
|
|
25073
25231
|
}
|
|
25074
25232
|
}
|
|
25075
25233
|
},
|
|
25076
25234
|
'$headerWrapper[data-soui-shape="fill"] &': {
|
|
25077
25235
|
'& $tab': {
|
|
25236
|
+
color: src.tabsFillFontColor,
|
|
25237
|
+
fontSize: src.tabsFillFontSize,
|
|
25238
|
+
fontWeight: src.tabsFillFontWeight,
|
|
25239
|
+
background: src.tabsFillBackgroundColor,
|
|
25078
25240
|
'&[data-soui-state="active"]': {
|
|
25079
|
-
|
|
25241
|
+
color: src.tabsFillCheckedFontColor,
|
|
25242
|
+
// fontSize: Token.tabsFillCheckedFontSize,
|
|
25243
|
+
fontWeight: src.tabsFillCheckedFontWeight,
|
|
25244
|
+
'& $fillInner': {
|
|
25245
|
+
background: src.tabsFillCheckedBackgroundColor
|
|
25246
|
+
}
|
|
25080
25247
|
},
|
|
25081
25248
|
'&[data-soui-state="disabled"]': {
|
|
25082
|
-
color: src.
|
|
25249
|
+
color: src.tabsFillDisabledFontColor,
|
|
25083
25250
|
cursor: 'not-allowed'
|
|
25251
|
+
},
|
|
25252
|
+
'&:not([data-soui-state="active"]):not([data-soui-state="disabled"]):hover $fillInner': {
|
|
25253
|
+
background: src.tabsFillHoverBackgroundColor
|
|
25254
|
+
},
|
|
25255
|
+
'&:not([data-soui-state="active"]):not([data-soui-state="disabled"]):active $fillInner': {
|
|
25256
|
+
background: src.tabsFillActiveBackgroundColor
|
|
25084
25257
|
}
|
|
25085
25258
|
}
|
|
25086
25259
|
},
|
|
@@ -25324,7 +25497,6 @@ var TagStyle = {
|
|
|
25324
25497
|
wrapper: {
|
|
25325
25498
|
lineHeight: src.lineHeightDynamic
|
|
25326
25499
|
},
|
|
25327
|
-
container: {},
|
|
25328
25500
|
inline: {
|
|
25329
25501
|
display: 'inline-block',
|
|
25330
25502
|
flex: 1,
|
|
@@ -28847,7 +29019,10 @@ function useClickAway(params) {
|
|
|
28847
29019
|
}
|
|
28848
29020
|
return function () {
|
|
28849
29021
|
// @ts-ignore
|
|
28850
|
-
document.removeEventListener(event, handleClickAway
|
|
29022
|
+
document.removeEventListener(event, handleClickAway, {
|
|
29023
|
+
// 解决 点击后立刻删除dom导致获取不到元素; contains(target) 为 false 的问题
|
|
29024
|
+
capture: true
|
|
29025
|
+
});
|
|
28851
29026
|
};
|
|
28852
29027
|
}, [effect]);
|
|
28853
29028
|
}
|
|
@@ -29554,7 +29729,7 @@ var useButton = function useButton() {
|
|
|
29554
29729
|
return mergedEventHandlers;
|
|
29555
29730
|
};
|
|
29556
29731
|
return {
|
|
29557
|
-
disabled: disabled,
|
|
29732
|
+
disabled: disabled || loading,
|
|
29558
29733
|
getAnchorProps: getAnchorProps,
|
|
29559
29734
|
getButtonProps: getButtonProps,
|
|
29560
29735
|
getSpaceChildren: getSpaceChildren
|
|
@@ -36079,10 +36254,7 @@ var Tag = function Tag(props) {
|
|
|
36079
36254
|
if (onClose) {
|
|
36080
36255
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
36081
36256
|
className: classnames_default()(tagStyle.wrapper, inlineStyle && tagStyle.inline),
|
|
36082
|
-
children:
|
|
36083
|
-
className: tagStyle.container,
|
|
36084
|
-
children: wrapSpan(children)
|
|
36085
|
-
})
|
|
36257
|
+
children: wrapSpan(children)
|
|
36086
36258
|
});
|
|
36087
36259
|
}
|
|
36088
36260
|
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
@@ -45032,9 +45204,9 @@ var form_item_excluded = ["children", "jssStyle", "className", "style", "label",
|
|
|
45032
45204
|
style: style,
|
|
45033
45205
|
children: [label !== undefined ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
45034
45206
|
className: classnames_default()(formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.label, labelAlign === 'left' && (formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.labelLeft)),
|
|
45035
|
-
style: {
|
|
45207
|
+
style: labelAlign !== 'top' || inline ? {
|
|
45036
45208
|
width: labelWidth
|
|
45037
|
-
},
|
|
45209
|
+
} : undefined,
|
|
45038
45210
|
children: label
|
|
45039
45211
|
}) : null, /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
|
|
45040
45212
|
className: formItemClasses === null || formItemClasses === void 0 ? void 0 : formItemClasses.control
|
|
@@ -45391,7 +45563,7 @@ var Gap = function Gap(props) {
|
|
|
45391
45563
|
marginBottom: -Number(row),
|
|
45392
45564
|
marginRight: -Number(column)
|
|
45393
45565
|
};
|
|
45394
|
-
var itemStyle = supportFlexGap ?
|
|
45566
|
+
var itemStyle = supportFlexGap ? itemStyleProps : objectSpread2_default()(objectSpread2_default()({}, itemStyleProps), {}, {
|
|
45395
45567
|
marginBottom: row,
|
|
45396
45568
|
marginRight: column
|
|
45397
45569
|
});
|
|
@@ -47303,11 +47475,15 @@ var Scroll = function Scroll(props) {
|
|
|
47303
47475
|
height: '100%',
|
|
47304
47476
|
width: '100%',
|
|
47305
47477
|
display: 'inline-flex',
|
|
47478
|
+
overflow: 'hidden',
|
|
47306
47479
|
position: 'sticky'
|
|
47307
47480
|
}, isRtl ? 'right' : 'left', 0), "top", 0);
|
|
47308
|
-
var placeStyle =
|
|
47309
|
-
|
|
47310
|
-
|
|
47481
|
+
var placeStyle = {
|
|
47482
|
+
paddingTop: height > 0 && scrollHeight > 0 ? Math.max(0, Math.floor(scrollHeight - height)) : 0,
|
|
47483
|
+
width: scrollWidth,
|
|
47484
|
+
overflow: 'hidden',
|
|
47485
|
+
lineHeight: 0
|
|
47486
|
+
};
|
|
47311
47487
|
var handleScroll = usePersistFn(function (e) {
|
|
47312
47488
|
var target = e.currentTarget;
|
|
47313
47489
|
var scrollLeft = target.scrollLeft,
|
|
@@ -51262,6 +51438,7 @@ var useMenuItem = function useMenuItem(props) {
|
|
|
51262
51438
|
|
|
51263
51439
|
|
|
51264
51440
|
|
|
51441
|
+
|
|
51265
51442
|
var MenuItem = function MenuItem(props) {
|
|
51266
51443
|
var _props$jssStyle, _props$jssStyle$menu;
|
|
51267
51444
|
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);
|
|
@@ -51272,14 +51449,24 @@ var MenuItem = function MenuItem(props) {
|
|
|
51272
51449
|
frontCaretType = _props$frontCaretType === void 0 ? 'solid' : _props$frontCaretType,
|
|
51273
51450
|
mode = props.mode,
|
|
51274
51451
|
_props$toggleDuration = props.toggleDuration,
|
|
51275
|
-
toggleDuration = _props$toggleDuration === void 0 ?
|
|
51452
|
+
toggleDuration = _props$toggleDuration === void 0 ? 50 : _props$toggleDuration;
|
|
51276
51453
|
var config = useConfig();
|
|
51277
51454
|
var shoudPop = mode === 'vertical' || mode === 'vertical-auto' || mode === 'horizontal';
|
|
51278
51455
|
var isVertical = mode === 'vertical' || mode === 'vertical-auto';
|
|
51279
51456
|
var isSubHorizontal = mode === 'horizontal' && props.level > 0;
|
|
51457
|
+
var isRootHorizontal = mode === 'horizontal' && props.level === 0;
|
|
51458
|
+
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
51459
|
+
_useState2 = slicedToArray_default()(_useState, 2),
|
|
51460
|
+
popOpen = _useState2[0],
|
|
51461
|
+
setOpen = _useState2[1];
|
|
51280
51462
|
var hasExpandAbleChildren = children.some(function (item) {
|
|
51281
51463
|
return item && item.children && (props.looseChildren || item.children.length);
|
|
51282
51464
|
});
|
|
51465
|
+
var handleVisibleChange = usePersistFn(function (visible) {
|
|
51466
|
+
if (isRootHorizontal) {
|
|
51467
|
+
setOpen(visible);
|
|
51468
|
+
}
|
|
51469
|
+
});
|
|
51283
51470
|
var _useMenuItem = use_menu_item({
|
|
51284
51471
|
dataItem: props.dataItem,
|
|
51285
51472
|
keyResult: props.keyResult,
|
|
@@ -51350,8 +51537,10 @@ var MenuItem = function MenuItem(props) {
|
|
|
51350
51537
|
theme: props.theme || 'light',
|
|
51351
51538
|
mode: isVertical ? 'vertical' : mode
|
|
51352
51539
|
}),
|
|
51540
|
+
onVisibleChange: handleVisibleChange,
|
|
51353
51541
|
jssStyle: props.jssStyle,
|
|
51354
51542
|
arrowClass: classnames_default()(classes === null || classes === void 0 ? void 0 : classes.popArrow, props.theme === 'dark' && (classes === null || classes === void 0 ? void 0 : classes.popArrowDark)),
|
|
51543
|
+
showArrow: !isRootHorizontal,
|
|
51355
51544
|
position: position,
|
|
51356
51545
|
lazy: false,
|
|
51357
51546
|
children: function children(close) {
|
|
@@ -51436,7 +51625,7 @@ var MenuItem = function MenuItem(props) {
|
|
|
51436
51625
|
}
|
|
51437
51626
|
};
|
|
51438
51627
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("li", {
|
|
51439
|
-
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)),
|
|
51628
|
+
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)),
|
|
51440
51629
|
onMouseEnter: handleMouseEnter,
|
|
51441
51630
|
onMouseLeave: handleMouseLeave,
|
|
51442
51631
|
dir: config.direction,
|
|
@@ -51444,203 +51633,6 @@ var MenuItem = function MenuItem(props) {
|
|
|
51444
51633
|
});
|
|
51445
51634
|
};
|
|
51446
51635
|
/* harmony default export */ var menu_item = (MenuItem);
|
|
51447
|
-
;// CONCATENATED MODULE: ../base/src/menu/scrollbar.tsx
|
|
51448
|
-
|
|
51449
|
-
|
|
51450
|
-
|
|
51451
|
-
|
|
51452
|
-
|
|
51453
|
-
var Scrollbar = function Scrollbar(props) {
|
|
51454
|
-
var _props$jssStyle, _props$jssStyle$menu;
|
|
51455
|
-
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);
|
|
51456
|
-
var show = props.scrollLength > props.length;
|
|
51457
|
-
var config = useConfig();
|
|
51458
|
-
var isRtl = config.direction === 'rtl';
|
|
51459
|
-
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
51460
|
-
cachedOffset: props.offset
|
|
51461
|
-
}),
|
|
51462
|
-
context = _useRef.current;
|
|
51463
|
-
var barLength = props.length * props.length / props.scrollLength;
|
|
51464
|
-
if (barLength < 20) barLength = 20;
|
|
51465
|
-
var onDragStart = usePersistFn(function () {
|
|
51466
|
-
context.cachedOffset = props.offset;
|
|
51467
|
-
});
|
|
51468
|
-
var onDragMove = usePersistFn(function (deltaX, deltaY) {
|
|
51469
|
-
var value = props.direction === 'x' ? deltaX : deltaY;
|
|
51470
|
-
var newOffset;
|
|
51471
|
-
if (props.direction === 'x' && isRtl) {
|
|
51472
|
-
newOffset = context.cachedOffset - value / (props.length - barLength);
|
|
51473
|
-
} else {
|
|
51474
|
-
newOffset = context.cachedOffset + value / (props.length - barLength);
|
|
51475
|
-
}
|
|
51476
|
-
if (newOffset < 0) newOffset = 0;
|
|
51477
|
-
if (newOffset > 1) newOffset = 1;
|
|
51478
|
-
if (newOffset === context.cachedOffset) return;
|
|
51479
|
-
context.cachedOffset = newOffset;
|
|
51480
|
-
props.onScroll(newOffset);
|
|
51481
|
-
});
|
|
51482
|
-
var handleBgClick = usePersistFn(function (e) {
|
|
51483
|
-
if (e.target !== e.currentTarget) return;
|
|
51484
|
-
var inner = e.target.firstChild;
|
|
51485
|
-
if (!inner) return;
|
|
51486
|
-
var rect = inner.getBoundingClientRect();
|
|
51487
|
-
var newOffset = props.offset;
|
|
51488
|
-
var page = props.length / (props.scrollLength - props.length);
|
|
51489
|
-
var plus = isRtl ? e.clientX < rect.left : e.clientX > rect.left;
|
|
51490
|
-
var add = isRtl ? e.clientX > rect.left : e.clientX < rect.left;
|
|
51491
|
-
if (props.direction === 'x' && add || props.direction === 'y' && e.clientY < rect.top) {
|
|
51492
|
-
newOffset = props.offset - page;
|
|
51493
|
-
if (newOffset < 0) newOffset = 0;
|
|
51494
|
-
} else if (props.direction === 'x' && plus || props.direction === 'y' && e.clientY > rect.top) {
|
|
51495
|
-
newOffset = props.offset + page;
|
|
51496
|
-
if (newOffset > 1) newOffset = 1;
|
|
51497
|
-
}
|
|
51498
|
-
props.onScroll(newOffset);
|
|
51499
|
-
});
|
|
51500
|
-
var _useDragMock = use_drag_mock({
|
|
51501
|
-
onDragStart: onDragStart,
|
|
51502
|
-
onDragMove: onDragMove
|
|
51503
|
-
}),
|
|
51504
|
-
handleMouseDown = _useDragMock.handleMouseDown,
|
|
51505
|
-
isDragging = _useDragMock.isDragging;
|
|
51506
|
-
if (!show) return null;
|
|
51507
|
-
var style = {};
|
|
51508
|
-
var value = (props.length - barLength) * props.offset;
|
|
51509
|
-
var x = isRtl ? 'right' : 'left';
|
|
51510
|
-
if (props.scrollLength > 0) {
|
|
51511
|
-
if (props.direction === 'x') {
|
|
51512
|
-
style.width = "".concat(props.length / props.scrollLength * 100, "%");
|
|
51513
|
-
style[x] = value;
|
|
51514
|
-
} else {
|
|
51515
|
-
style.height = "".concat(props.length / props.scrollLength * 100, "%");
|
|
51516
|
-
style.top = value;
|
|
51517
|
-
}
|
|
51518
|
-
}
|
|
51519
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
51520
|
-
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)),
|
|
51521
|
-
dir: config.direction,
|
|
51522
|
-
onClick: handleBgClick,
|
|
51523
|
-
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
51524
|
-
className: classes === null || classes === void 0 ? void 0 : classes.scrolbarHandler,
|
|
51525
|
-
onMouseDown: handleMouseDown,
|
|
51526
|
-
style: style
|
|
51527
|
-
})
|
|
51528
|
-
});
|
|
51529
|
-
};
|
|
51530
|
-
/* harmony default export */ var scrollbar = (Scrollbar);
|
|
51531
|
-
;// CONCATENATED MODULE: ../base/src/menu/scroll.tsx
|
|
51532
|
-
|
|
51533
|
-
|
|
51534
|
-
|
|
51535
|
-
|
|
51536
|
-
|
|
51537
|
-
var scroll_Scroll = function Scroll(props) {
|
|
51538
|
-
var _useRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({
|
|
51539
|
-
timer: 0
|
|
51540
|
-
}),
|
|
51541
|
-
context = _useRef.current;
|
|
51542
|
-
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(0),
|
|
51543
|
-
_useState2 = slicedToArray_default()(_useState, 2),
|
|
51544
|
-
offset = _useState2[0],
|
|
51545
|
-
setScroll = _useState2[1];
|
|
51546
|
-
var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)({
|
|
51547
|
-
width: 0,
|
|
51548
|
-
scrollWidth: 0,
|
|
51549
|
-
height: 0,
|
|
51550
|
-
scrollHeight: 0
|
|
51551
|
-
}),
|
|
51552
|
-
_useState4 = slicedToArray_default()(_useState3, 2),
|
|
51553
|
-
info = _useState4[0],
|
|
51554
|
-
setInfo = _useState4[1];
|
|
51555
|
-
var scrollLength = props.direction === 'x' ? info.scrollWidth : info.scrollHeight;
|
|
51556
|
-
var length = props.direction === 'x' ? info.width : info.height;
|
|
51557
|
-
var show = scrollLength > length;
|
|
51558
|
-
var handleResize = usePersistFn(function () {
|
|
51559
|
-
var target = props.targetRef.current;
|
|
51560
|
-
if (!target) return;
|
|
51561
|
-
if (context.timer) {
|
|
51562
|
-
clearTimeout(context.timer);
|
|
51563
|
-
context.timer = null;
|
|
51564
|
-
}
|
|
51565
|
-
context.timer = setTimeout(function () {
|
|
51566
|
-
var scrollWidth = target.scrollWidth,
|
|
51567
|
-
scrollHeight = target.scrollHeight,
|
|
51568
|
-
clientHeight = target.clientHeight,
|
|
51569
|
-
clientWidth = target.clientWidth;
|
|
51570
|
-
setInfo({
|
|
51571
|
-
width: clientWidth,
|
|
51572
|
-
scrollWidth: scrollWidth,
|
|
51573
|
-
height: clientHeight,
|
|
51574
|
-
scrollHeight: scrollHeight
|
|
51575
|
-
});
|
|
51576
|
-
}, 200);
|
|
51577
|
-
});
|
|
51578
|
-
useResize({
|
|
51579
|
-
targetRef: props.targetRef,
|
|
51580
|
-
cb: handleResize,
|
|
51581
|
-
timer: 0
|
|
51582
|
-
});
|
|
51583
|
-
var handleWheel = usePersistFn(function (e) {
|
|
51584
|
-
e.preventDefault();
|
|
51585
|
-
var target = e.currentTarget;
|
|
51586
|
-
var wheel = normalize_wheel(e);
|
|
51587
|
-
var delta = props.direction === 'x' ? wheel.pixelX : wheel.pixelY;
|
|
51588
|
-
if (props.direction === 'x') {
|
|
51589
|
-
target.scrollLeft += delta;
|
|
51590
|
-
} else {
|
|
51591
|
-
target.scrollTop += delta;
|
|
51592
|
-
}
|
|
51593
|
-
var newOffset = offset + delta / (scrollLength - length);
|
|
51594
|
-
if (newOffset < 0) newOffset = 0;
|
|
51595
|
-
if (newOffset > 1) newOffset = 1;
|
|
51596
|
-
setScroll(newOffset);
|
|
51597
|
-
});
|
|
51598
|
-
var handleScroll = usePersistFn(function (percent) {
|
|
51599
|
-
var target = props.targetRef.current;
|
|
51600
|
-
if (!target) return;
|
|
51601
|
-
if (props.direction === 'x') {
|
|
51602
|
-
target.scrollLeft = percent * (info.scrollWidth - info.width);
|
|
51603
|
-
} else {
|
|
51604
|
-
target.scrollTop = percent * (info.scrollHeight - info.height);
|
|
51605
|
-
}
|
|
51606
|
-
setScroll(percent);
|
|
51607
|
-
});
|
|
51608
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
51609
|
-
var target = props.targetRef.current;
|
|
51610
|
-
if (target) {
|
|
51611
|
-
if (show) {
|
|
51612
|
-
target.addEventListener('wheel', handleWheel, {
|
|
51613
|
-
passive: false
|
|
51614
|
-
});
|
|
51615
|
-
} else {
|
|
51616
|
-
target.removeEventListener('wheel', handleWheel);
|
|
51617
|
-
}
|
|
51618
|
-
}
|
|
51619
|
-
return function () {
|
|
51620
|
-
if (target) {
|
|
51621
|
-
target.removeEventListener('wheel', handleWheel);
|
|
51622
|
-
}
|
|
51623
|
-
};
|
|
51624
|
-
}, [show, props.targetRef.current]);
|
|
51625
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
51626
|
-
handleResize();
|
|
51627
|
-
return function () {
|
|
51628
|
-
if (context.timer) {
|
|
51629
|
-
clearTimeout(context.timer);
|
|
51630
|
-
context.timer = null;
|
|
51631
|
-
}
|
|
51632
|
-
};
|
|
51633
|
-
}, [props.data]);
|
|
51634
|
-
return /*#__PURE__*/(0,jsx_runtime.jsx)(scrollbar, {
|
|
51635
|
-
direction: props.direction,
|
|
51636
|
-
length: props.direction === 'x' ? info.width : info.height,
|
|
51637
|
-
scrollLength: props.direction === 'x' ? info.scrollWidth : info.scrollHeight,
|
|
51638
|
-
offset: offset,
|
|
51639
|
-
onScroll: handleScroll,
|
|
51640
|
-
jssStyle: props.jssStyle
|
|
51641
|
-
});
|
|
51642
|
-
};
|
|
51643
|
-
/* harmony default export */ var menu_scroll = (scroll_Scroll);
|
|
51644
51636
|
;// CONCATENATED MODULE: ../base/src/menu/menu.tsx
|
|
51645
51637
|
|
|
51646
51638
|
|
|
@@ -51648,7 +51640,7 @@ var scroll_Scroll = function Scroll(props) {
|
|
|
51648
51640
|
|
|
51649
51641
|
|
|
51650
51642
|
|
|
51651
|
-
|
|
51643
|
+
// import Scroll from './scroll';
|
|
51652
51644
|
|
|
51653
51645
|
|
|
51654
51646
|
var menu_emptyArray = [];
|
|
@@ -51676,7 +51668,7 @@ var Menu = function Menu(props) {
|
|
|
51676
51668
|
}
|
|
51677
51669
|
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);
|
|
51678
51670
|
var isVertical = mode === 'vertical' || mode === 'vertical-auto';
|
|
51679
|
-
|
|
51671
|
+
// const isHorizontal = mode === 'horizontal';
|
|
51680
51672
|
var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
51681
51673
|
_useState2 = slicedToArray_default()(_useState, 2),
|
|
51682
51674
|
hasOpen = _useState2[0],
|
|
@@ -51697,7 +51689,9 @@ var Menu = function Menu(props) {
|
|
|
51697
51689
|
var hasExpand = data.some(function (item) {
|
|
51698
51690
|
return item && item.children && (props.looseChildren || item.children.length);
|
|
51699
51691
|
});
|
|
51700
|
-
|
|
51692
|
+
|
|
51693
|
+
// const showScrollBar = isHorizontal || isVertical;
|
|
51694
|
+
|
|
51701
51695
|
var renderHeader = function renderHeader() {
|
|
51702
51696
|
if (modeProps === 'horizontal') return;
|
|
51703
51697
|
if (props.header) {
|
|
@@ -51772,11 +51766,6 @@ var Menu = function Menu(props) {
|
|
|
51772
51766
|
}, key);
|
|
51773
51767
|
})
|
|
51774
51768
|
})
|
|
51775
|
-
}), showScrollBar && /*#__PURE__*/(0,jsx_runtime.jsx)(menu_scroll, {
|
|
51776
|
-
targetRef: scrollRef,
|
|
51777
|
-
direction: mode === 'vertical' || mode === 'vertical-auto' ? 'y' : 'x',
|
|
51778
|
-
data: data,
|
|
51779
|
-
jssStyle: props.jssStyle
|
|
51780
51769
|
})]
|
|
51781
51770
|
}));
|
|
51782
51771
|
};
|
|
@@ -51993,9 +51982,11 @@ var message_Message = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
51993
51982
|
_this = _super.call(this, props);
|
|
51994
51983
|
defineProperty_default()(assertThisInitialized_default()(_this), "cachedHeight", void 0);
|
|
51995
51984
|
defineProperty_default()(assertThisInitialized_default()(_this), "timeoutMap", void 0);
|
|
51985
|
+
defineProperty_default()(assertThisInitialized_default()(_this), "messages", void 0);
|
|
51996
51986
|
_this.state = {
|
|
51997
51987
|
messages: []
|
|
51998
51988
|
};
|
|
51989
|
+
_this.messages = [];
|
|
51999
51990
|
_this.cachedHeight = {};
|
|
52000
51991
|
_this.timeoutMap = {};
|
|
52001
51992
|
_this.removeMessage = _this.removeMessage.bind(assertThisInitialized_default()(_this));
|
|
@@ -52003,16 +51994,24 @@ var message_Message = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
52003
51994
|
return _this;
|
|
52004
51995
|
}
|
|
52005
51996
|
createClass_default()(Message, [{
|
|
51997
|
+
key: "setMessages",
|
|
51998
|
+
value: function setMessages(messages) {
|
|
51999
|
+
this.messages = messages;
|
|
52000
|
+
this.setState({
|
|
52001
|
+
messages: messages
|
|
52002
|
+
});
|
|
52003
|
+
}
|
|
52004
|
+
}, {
|
|
52006
52005
|
key: "addMessage",
|
|
52007
52006
|
value: function addMessage(msg) {
|
|
52008
52007
|
var _this2 = this;
|
|
52009
52008
|
var id = message_getUidStr();
|
|
52010
|
-
var
|
|
52011
|
-
|
|
52009
|
+
var newMessages = message_produce(this.messages, function (messages) {
|
|
52010
|
+
messages.push(Object.assign({
|
|
52012
52011
|
id: id
|
|
52013
52012
|
}, msg));
|
|
52014
52013
|
});
|
|
52015
|
-
this.
|
|
52014
|
+
this.setMessages(newMessages);
|
|
52016
52015
|
if (msg.duration > 0) {
|
|
52017
52016
|
var closeTimeDelay = setTimeout(function () {
|
|
52018
52017
|
_this2.closeMessageForAnimation(id, dismissDuration, _this2.cachedHeight[id]);
|
|
@@ -52025,7 +52024,7 @@ var message_Message = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
52025
52024
|
key: "removeMessage",
|
|
52026
52025
|
value: function removeMessage(id) {
|
|
52027
52026
|
var callback;
|
|
52028
|
-
var messages = this.
|
|
52027
|
+
var messages = this.messages.filter(function (m) {
|
|
52029
52028
|
if (m.id !== id) return true;
|
|
52030
52029
|
if (m.onClose) {
|
|
52031
52030
|
callback = m.onClose;
|
|
@@ -52036,9 +52035,7 @@ var message_Message = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
52036
52035
|
var _this$props$onDestroy, _this$props;
|
|
52037
52036
|
(_this$props$onDestroy = (_this$props = this.props).onDestroy) === null || _this$props$onDestroy === void 0 || _this$props$onDestroy.call(_this$props);
|
|
52038
52037
|
} else {
|
|
52039
|
-
this.
|
|
52040
|
-
messages: messages
|
|
52041
|
-
});
|
|
52038
|
+
this.setMessages(messages);
|
|
52042
52039
|
}
|
|
52043
52040
|
if (callback) callback();
|
|
52044
52041
|
}
|
|
@@ -52047,16 +52044,15 @@ var message_Message = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
52047
52044
|
value: function closeMessageForAnimation(id, duration, msgHeight) {
|
|
52048
52045
|
var _this3 = this;
|
|
52049
52046
|
// duration animation duration time
|
|
52050
|
-
this.
|
|
52051
|
-
|
|
52052
|
-
|
|
52053
|
-
|
|
52054
|
-
|
|
52055
|
-
|
|
52056
|
-
}
|
|
52057
|
-
});
|
|
52047
|
+
var newMessages = message_produce(this.messages, function (messages) {
|
|
52048
|
+
messages.forEach(function (m) {
|
|
52049
|
+
if (m.id === id) {
|
|
52050
|
+
m.dismiss = true;
|
|
52051
|
+
m.h = msgHeight || 0;
|
|
52052
|
+
}
|
|
52058
52053
|
});
|
|
52059
52054
|
});
|
|
52055
|
+
this.setMessages(newMessages);
|
|
52060
52056
|
setTimeout(function () {
|
|
52061
52057
|
_this3.removeMessage(id);
|
|
52062
52058
|
}, duration);
|
|
@@ -63096,7 +63092,7 @@ var upload_interface = __webpack_require__(4412);
|
|
|
63096
63092
|
|
|
63097
63093
|
|
|
63098
63094
|
/* harmony default export */ var src_0 = ({
|
|
63099
|
-
version: '3.2.0-beta.
|
|
63095
|
+
version: '3.2.0-beta.4'
|
|
63100
63096
|
});
|
|
63101
63097
|
}();
|
|
63102
63098
|
/******/ return __webpack_exports__;
|