shineout 3.8.0-beta.22 → 3.8.0-beta.24
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/empty/empty.type.d.ts +15 -1
- package/cjs/index.js +1 -1
- package/dist/shineout.js +98 -25
- package/dist/shineout.js.map +1 -1
- package/dist/shineout.min.js +1 -1
- package/dist/shineout.min.js.map +1 -1
- package/esm/empty/empty.type.d.ts +15 -1
- package/esm/index.js +1 -1
- package/package.json +5 -5
|
@@ -1,5 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { EmptyProps as UnStyledEmptyProps } from '@sheinx/base';
|
|
2
3
|
/**
|
|
3
4
|
* @title Empty
|
|
4
5
|
*/
|
|
5
|
-
export
|
|
6
|
+
export interface EmptyProps extends Omit<UnStyledEmptyProps, 'jssStyle' | 'icon' | 'description'> {
|
|
7
|
+
/**
|
|
8
|
+
* @en Empty state icon. Enhanced in v3.8.0 to support global configuration via setConfig
|
|
9
|
+
* @cn 空状态图标。3.8.0版本增强,支持通过setConfig进行全局配置
|
|
10
|
+
* @version 3.8.0
|
|
11
|
+
*/
|
|
12
|
+
icon?: React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* @en Description, if false, the description will not be displayed. Enhanced in v3.8.0 to support global configuration via setConfig
|
|
15
|
+
* @cn 描述,若为false则不显示描述。3.8.0版本增强,支持通过setConfig进行全局配置
|
|
16
|
+
* @version 3.8.0
|
|
17
|
+
*/
|
|
18
|
+
description?: React.ReactNode | boolean;
|
|
19
|
+
}
|
package/cjs/index.js
CHANGED
|
@@ -522,5 +522,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
522
522
|
// 此文件由脚本自动生成,请勿直接修改。
|
|
523
523
|
// This file was generated automatically by a script. Please do not modify it directly.
|
|
524
524
|
var _default = exports.default = {
|
|
525
|
-
version: '3.8.0-beta.
|
|
525
|
+
version: '3.8.0-beta.24'
|
|
526
526
|
};
|
package/dist/shineout.js
CHANGED
|
@@ -12386,7 +12386,7 @@ var handleStyle = function handleStyle(style) {
|
|
|
12386
12386
|
};
|
|
12387
12387
|
/* harmony default export */ var jss_style_handleStyle = (handleStyle);
|
|
12388
12388
|
;// CONCATENATED MODULE: ../shineout-style/src/version.ts
|
|
12389
|
-
/* harmony default export */ var version = ('3.8.0-beta.
|
|
12389
|
+
/* harmony default export */ var version = ('3.8.0-beta.24');
|
|
12390
12390
|
;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
|
|
12391
12391
|
|
|
12392
12392
|
|
|
@@ -14610,6 +14610,7 @@ var skeletonTokens = {
|
|
|
14610
14610
|
skeletonHeight: 'Size-8',
|
|
14611
14611
|
skeletonBackgroundColor: 'Neutral-fill-2',
|
|
14612
14612
|
skeletonBackgroundRadius: 'Radius-default',
|
|
14613
|
+
skeletonButtonMarginTop: 'Spacing-32',
|
|
14613
14614
|
skeletonAnimationFromColor: 'Neutral-fill-2',
|
|
14614
14615
|
skeletonAnimationToColor: 'Neutral-fill-3'
|
|
14615
14616
|
};
|
|
@@ -23493,7 +23494,7 @@ var radioStyle = objectSpread2_default()(objectSpread2_default()({}, animations)
|
|
|
23493
23494
|
color: src.radioIconColor,
|
|
23494
23495
|
backgroundColor: src.radioIconBackgroundColor,
|
|
23495
23496
|
border: '1px solid currentColor',
|
|
23496
|
-
'$wrapperChecked &': {
|
|
23497
|
+
'$wrapperChecked > $indicatorWrapper > &': {
|
|
23497
23498
|
backgroundColor: src.radioIconCheckedBackgroundColor,
|
|
23498
23499
|
color: src.radioIconCheckedColor,
|
|
23499
23500
|
'&::after': {
|
|
@@ -24325,7 +24326,7 @@ var skeletonStyle = objectSpread2_default()(objectSpread2_default()({}, skeleton
|
|
|
24325
24326
|
'& $textItem, & $image, & $buttonItem': {
|
|
24326
24327
|
backgroundImage: "linear-gradient(90deg, ".concat(src.skeletonAnimationFromColor, " 25%, ").concat(src.skeletonAnimationToColor, " 37%, ").concat(src.skeletonAnimationFromColor, " 63%)"),
|
|
24327
24328
|
backgroundSize: '400% 100%',
|
|
24328
|
-
animation: '$skeleton-animation 1.
|
|
24329
|
+
animation: '$skeleton-animation 1.5s cubic-bezier(0, 0, 1, 1) infinite'
|
|
24329
24330
|
}
|
|
24330
24331
|
},
|
|
24331
24332
|
content: {
|
|
@@ -24374,7 +24375,7 @@ var skeletonStyle = objectSpread2_default()(objectSpread2_default()({}, skeleton
|
|
|
24374
24375
|
button: {
|
|
24375
24376
|
display: 'flex',
|
|
24376
24377
|
'$text + &': {
|
|
24377
|
-
marginTop: src.
|
|
24378
|
+
marginTop: src.skeletonButtonMarginTop
|
|
24378
24379
|
}
|
|
24379
24380
|
},
|
|
24380
24381
|
buttonItem: {
|
|
@@ -26638,12 +26639,15 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
26638
26639
|
'$sticky > &': {
|
|
26639
26640
|
zIndex: headerIndex
|
|
26640
26641
|
},
|
|
26641
|
-
'& table th': {
|
|
26642
|
+
'$wrapper & table th': {
|
|
26642
26643
|
zIndex: fixedFixedIndex + 1,
|
|
26643
26644
|
'&$cellFixedLeft': {
|
|
26644
26645
|
position: 'sticky',
|
|
26645
26646
|
top: 'auto',
|
|
26646
26647
|
zIndex: fixedFixedIndex + 2
|
|
26648
|
+
},
|
|
26649
|
+
'&$cellFixedRight': {
|
|
26650
|
+
zIndex: fixedFixedIndex + 3
|
|
26647
26651
|
}
|
|
26648
26652
|
}
|
|
26649
26653
|
},
|
|
@@ -26665,7 +26669,10 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
26665
26669
|
'&$cellFixedLeft': {
|
|
26666
26670
|
position: 'sticky',
|
|
26667
26671
|
top: 'auto',
|
|
26668
|
-
zIndex: fixedIndex
|
|
26672
|
+
zIndex: fixedIndex
|
|
26673
|
+
},
|
|
26674
|
+
'&$cellFixedRight': {
|
|
26675
|
+
zIndex: fixedIndex
|
|
26669
26676
|
}
|
|
26670
26677
|
}
|
|
26671
26678
|
},
|
|
@@ -26719,10 +26726,13 @@ var tableStyle = objectSpread2_default()(objectSpread2_default()({
|
|
|
26719
26726
|
borderBottom: 'none'
|
|
26720
26727
|
},
|
|
26721
26728
|
cellFixedLeft: {
|
|
26722
|
-
position: 'sticky'
|
|
26729
|
+
position: 'sticky',
|
|
26730
|
+
// 快速横滚,有可能出现非固定列遮挡了固定列的短暂一瞬间,因此加上这个zIndex
|
|
26731
|
+
zIndex: fixedIndex + 1
|
|
26723
26732
|
},
|
|
26724
26733
|
cellFixedRight: {
|
|
26725
|
-
position: 'sticky'
|
|
26734
|
+
position: 'sticky',
|
|
26735
|
+
zIndex: fixedFixedIndex
|
|
26726
26736
|
},
|
|
26727
26737
|
cellAlignLeft: {
|
|
26728
26738
|
textAlign: 'left'
|
|
@@ -28227,7 +28237,8 @@ var textarea_input = objectSpread2_default()(objectSpread2_default()(objectSprea
|
|
|
28227
28237
|
width: '100%',
|
|
28228
28238
|
boxSizing: 'border-box',
|
|
28229
28239
|
position: 'relative',
|
|
28230
|
-
flexWrap: 'wrap'
|
|
28240
|
+
flexWrap: 'wrap',
|
|
28241
|
+
minHeight: "calc(".concat(src.lineHeightDynamic, " + ").concat(src.inputPaddingY, " * 2)")
|
|
28231
28242
|
}, textarea_wrapper)
|
|
28232
28243
|
}, textarea_resetWrapper), {}, {
|
|
28233
28244
|
textarea: {
|
|
@@ -28247,7 +28258,6 @@ var textarea_input = objectSpread2_default()(objectSpread2_default()(objectSprea
|
|
|
28247
28258
|
backgroundColor: 'transparent',
|
|
28248
28259
|
resize: 'none',
|
|
28249
28260
|
boxSizing: 'border-box',
|
|
28250
|
-
minHeight: "calc(".concat(src.lineHeightDynamic, " + ").concat(src.inputPaddingY, " * 2)"),
|
|
28251
28261
|
// why: 为了让滚动条的轨道不遮盖右上角和右下角的圆角; 注: chrome >= 121才支持scrollbar-color
|
|
28252
28262
|
scrollbarColor: "".concat(src.inputBorderColor, " transparent"),
|
|
28253
28263
|
'&$resize': {
|
|
@@ -32483,7 +32493,8 @@ var Popover = function Popover(props) {
|
|
|
32483
32493
|
_props$zIndex = props.zIndex,
|
|
32484
32494
|
zIndex = _props$zIndex === void 0 ? 1060 : _props$zIndex;
|
|
32485
32495
|
var _React$useRef = external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef({
|
|
32486
|
-
rendered: false
|
|
32496
|
+
rendered: false,
|
|
32497
|
+
hasOpened: false
|
|
32487
32498
|
}),
|
|
32488
32499
|
context = _React$useRef.current;
|
|
32489
32500
|
var config = useConfig();
|
|
@@ -32597,8 +32608,16 @@ var Popover = function Popover(props) {
|
|
|
32597
32608
|
});
|
|
32598
32609
|
}
|
|
32599
32610
|
context.rendered = true;
|
|
32600
|
-
|
|
32611
|
+
|
|
32612
|
+
// Track if popover has ever been opened
|
|
32613
|
+
if (open && !context.hasOpened) {
|
|
32614
|
+
context.hasOpened = true;
|
|
32615
|
+
}
|
|
32616
|
+
|
|
32617
|
+
// Only execute functional children after popover has been opened at least once
|
|
32618
|
+
var childrened = isFunc(children) ? context.hasOpened ? children(closePop) : null : children;
|
|
32601
32619
|
var containerStyle = {
|
|
32620
|
+
display: open ? undefined : 'none',
|
|
32602
32621
|
borderColor: props.border,
|
|
32603
32622
|
backgroundColor: props.background
|
|
32604
32623
|
};
|
|
@@ -35481,6 +35500,34 @@ function removeStack(id, removeListener) {
|
|
|
35481
35500
|
}
|
|
35482
35501
|
delete components[id];
|
|
35483
35502
|
}
|
|
35503
|
+
|
|
35504
|
+
// 检测容器是否高度受限
|
|
35505
|
+
var isRootHeightConstrained = function isRootHeightConstrained(root, targetElement) {
|
|
35506
|
+
if (!root || root === document.body) {
|
|
35507
|
+
var bodyRect = document.body.getBoundingClientRect();
|
|
35508
|
+
var _targetRect = targetElement.getBoundingClientRect();
|
|
35509
|
+
// body的底部和targetElement的顶部永远不可能有相交,则是受限的
|
|
35510
|
+
if (bodyRect.bottom < _targetRect.top) {
|
|
35511
|
+
return true;
|
|
35512
|
+
} else {
|
|
35513
|
+
return false;
|
|
35514
|
+
}
|
|
35515
|
+
}
|
|
35516
|
+
|
|
35517
|
+
// 当root的overflow是auto或hidden,则认为不是受限的
|
|
35518
|
+
var rootStyle = window.getComputedStyle(root);
|
|
35519
|
+
if (rootStyle.overflow === 'auto' || rootStyle.overflow === 'hidden') {
|
|
35520
|
+
return false;
|
|
35521
|
+
}
|
|
35522
|
+
|
|
35523
|
+
// 当root的底部与targetElement的顶部永远不可能有相交,则是受限的
|
|
35524
|
+
var rootRect = root.getBoundingClientRect();
|
|
35525
|
+
var targetRect = targetElement.getBoundingClientRect();
|
|
35526
|
+
if (rootRect.top > targetRect.bottom || rootRect.bottom < targetRect.top) {
|
|
35527
|
+
return true;
|
|
35528
|
+
}
|
|
35529
|
+
return false;
|
|
35530
|
+
};
|
|
35484
35531
|
function getObserver(obj, id) {
|
|
35485
35532
|
var _obj$container = obj.container,
|
|
35486
35533
|
container = _obj$container === void 0 ? null : _obj$container,
|
|
@@ -35490,6 +35537,10 @@ function getObserver(obj, id) {
|
|
|
35490
35537
|
offscreen = obj.offscreen,
|
|
35491
35538
|
noRemove = obj.noRemove;
|
|
35492
35539
|
var fixedContainer = getClosestPositionedContainer(element, ['fixed', 'absolute']);
|
|
35540
|
+
|
|
35541
|
+
// 获取最优的观察器配置
|
|
35542
|
+
var candidateRoot = fixedContainer || container;
|
|
35543
|
+
var observerRoot = isRootHeightConstrained(candidateRoot, element) ? null : candidateRoot;
|
|
35493
35544
|
var observer = new IntersectionObserver(function (entries) {
|
|
35494
35545
|
entries.forEach(function (en) {
|
|
35495
35546
|
if (en.isIntersecting || en.intersectionRatio > 0) {
|
|
@@ -35501,7 +35552,7 @@ function getObserver(obj, id) {
|
|
|
35501
35552
|
}
|
|
35502
35553
|
});
|
|
35503
35554
|
}, {
|
|
35504
|
-
root:
|
|
35555
|
+
root: observerRoot,
|
|
35505
35556
|
rootMargin: "".concat(offset, "px")
|
|
35506
35557
|
});
|
|
35507
35558
|
obj.observer = observer;
|
|
@@ -49440,7 +49491,8 @@ var Modal = function Modal(props) {
|
|
|
49440
49491
|
onAnimationEnd: handleAnimationEnd,
|
|
49441
49492
|
style: {
|
|
49442
49493
|
background: props.maskBackground,
|
|
49443
|
-
zIndex: props.zIndex
|
|
49494
|
+
zIndex: props.zIndex,
|
|
49495
|
+
display: !visible && !animation ? 'none' : undefined
|
|
49444
49496
|
},
|
|
49445
49497
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", objectSpread2_default()(objectSpread2_default()({
|
|
49446
49498
|
className: modalClasses === null || modalClasses === void 0 ? void 0 : modalClasses.mask
|
|
@@ -56707,7 +56759,8 @@ var Radio = function Radio(props) {
|
|
|
56707
56759
|
var inputProps = getInputProps();
|
|
56708
56760
|
var rootProps = getRootProps({
|
|
56709
56761
|
className: rootClass,
|
|
56710
|
-
style: style
|
|
56762
|
+
style: style,
|
|
56763
|
+
needStopPropagation: true
|
|
56711
56764
|
});
|
|
56712
56765
|
var indicatorProps = getIndicatorProps();
|
|
56713
56766
|
var simpleRadio = /*#__PURE__*/(0,jsx_runtime.jsxs)("div", objectSpread2_default()(objectSpread2_default()({
|
|
@@ -60325,6 +60378,7 @@ ProgressComp.displayName = 'ShineoutProgress';
|
|
|
60325
60378
|
|
|
60326
60379
|
|
|
60327
60380
|
var radio_group_context_groupContext = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext)({});
|
|
60381
|
+
radio_group_context_groupContext.displayName = 'RadioGroupContext';
|
|
60328
60382
|
/* harmony default export */ var radio_group_context = (radio_group_context_groupContext);
|
|
60329
60383
|
;// CONCATENATED MODULE: ../base/src/radio/radio.tsx
|
|
60330
60384
|
|
|
@@ -60428,7 +60482,6 @@ var useListSelectSingle = function useListSelectSingle(props) {
|
|
|
60428
60482
|
|
|
60429
60483
|
|
|
60430
60484
|
|
|
60431
|
-
|
|
60432
60485
|
var radio_group_defaultFormat = function defaultFormat(d) {
|
|
60433
60486
|
return d;
|
|
60434
60487
|
};
|
|
@@ -60530,7 +60583,11 @@ var radio_group_Group = function Group(props0) {
|
|
|
60530
60583
|
var Radios = props.data === undefined ? /*#__PURE__*/(0,jsx_runtime.jsx)(radio_group_context.Provider, {
|
|
60531
60584
|
value: providerValue,
|
|
60532
60585
|
children: children
|
|
60533
|
-
}) :
|
|
60586
|
+
}) :
|
|
60587
|
+
/*#__PURE__*/
|
|
60588
|
+
// 传一个空的providerValue目的是为了避免父级Radio向下传递的GroupContext.Consumer影响
|
|
60589
|
+
(0,jsx_runtime.jsxs)(radio_group_context.Provider, {
|
|
60590
|
+
value: {},
|
|
60534
60591
|
children: [props.data.map(function (d, i) {
|
|
60535
60592
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_radio_radio, {
|
|
60536
60593
|
jssStyle: jssStyle,
|
|
@@ -63767,7 +63824,8 @@ var useTableVirtual = function useTableVirtual(props) {
|
|
|
63767
63824
|
setRowHeight: setRowHeight,
|
|
63768
63825
|
scrollToIndex: scrollToIndex,
|
|
63769
63826
|
scrollColumnByLeft: scrollColumnByLeft,
|
|
63770
|
-
scrollColumnIntoView: scrollColumnIntoView
|
|
63827
|
+
scrollColumnIntoView: scrollColumnIntoView,
|
|
63828
|
+
rowSpanInfo: rowSpanInfo
|
|
63771
63829
|
};
|
|
63772
63830
|
};
|
|
63773
63831
|
/* harmony default export */ var use_table_virtual = (useTableVirtual);
|
|
@@ -65081,6 +65139,7 @@ var Tr = function Tr(props) {
|
|
|
65081
65139
|
return expandInstance;
|
|
65082
65140
|
}
|
|
65083
65141
|
if (col.type === 'checkbox') {
|
|
65142
|
+
var selectData = props.selectData || data;
|
|
65084
65143
|
var instance = /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
65085
65144
|
className: tableClasses === null || tableClasses === void 0 ? void 0 : tableClasses.iconWrapper,
|
|
65086
65145
|
children: props.radio ? /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_radio_radio, {
|
|
@@ -65092,9 +65151,9 @@ var Tr = function Tr(props) {
|
|
|
65092
65151
|
disabled: props.disabled,
|
|
65093
65152
|
onChange: function onChange(value) {
|
|
65094
65153
|
if (value) {
|
|
65095
|
-
props.datum.add(
|
|
65154
|
+
props.datum.add(selectData);
|
|
65096
65155
|
} else {
|
|
65097
|
-
props.datum.remove(
|
|
65156
|
+
props.datum.remove(selectData);
|
|
65098
65157
|
}
|
|
65099
65158
|
}
|
|
65100
65159
|
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(base_src_checkbox_checkbox, {
|
|
@@ -65106,11 +65165,11 @@ var Tr = function Tr(props) {
|
|
|
65106
65165
|
checked: props.isSelect,
|
|
65107
65166
|
onChange: function onChange(_value, check) {
|
|
65108
65167
|
if (check) {
|
|
65109
|
-
props.datum.add(
|
|
65168
|
+
props.datum.add(selectData, props.treeCheckAll ? {
|
|
65110
65169
|
childrenKey: props.treeColumnsName
|
|
65111
65170
|
} : undefined);
|
|
65112
65171
|
} else {
|
|
65113
|
-
props.datum.remove(
|
|
65172
|
+
props.datum.remove(selectData, props.treeCheckAll ? {
|
|
65114
65173
|
childrenKey: props.treeColumnsName
|
|
65115
65174
|
} : undefined);
|
|
65116
65175
|
}
|
|
@@ -65302,6 +65361,17 @@ var Tr = function Tr(props) {
|
|
|
65302
65361
|
var rowIndex = index + currentIndex;
|
|
65303
65362
|
var originKey = getKey(props.keygen, item, rowIndex);
|
|
65304
65363
|
var trRenderKey = props.loader || (_props$rowEvents = props.rowEvents) !== null && _props$rowEvents !== void 0 && _props$rowEvents.draggable ? originKey : "".concat(originKey, "-").concat(rowIndex);
|
|
65364
|
+
|
|
65365
|
+
// 在虚拟列表模式下,使用 virtualRowSpanInfo 来获取正确的选择数据
|
|
65366
|
+
var selectData = item;
|
|
65367
|
+
if (props.virtualRowSpanInfo && props.fullData) {
|
|
65368
|
+
// rowSpanIndexArray[rowIndex] 表示第 rowIndex 行所属合并组的起始行索引
|
|
65369
|
+
var selectIndex = props.virtualRowSpanInfo.rowSpanIndexArray[rowIndex];
|
|
65370
|
+
selectData = props.fullData[selectIndex];
|
|
65371
|
+
} else {
|
|
65372
|
+
// 非虚拟列表模式使用原有逻辑
|
|
65373
|
+
selectData = rowSelectMergeStartData[index];
|
|
65374
|
+
}
|
|
65305
65375
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(tr, {
|
|
65306
65376
|
originKey: originKey,
|
|
65307
65377
|
row: rowData[index],
|
|
@@ -65329,7 +65399,8 @@ var Tr = function Tr(props) {
|
|
|
65329
65399
|
striped: props.striped,
|
|
65330
65400
|
radio: props.radio,
|
|
65331
65401
|
hover: hover,
|
|
65332
|
-
isSelect: props.datum.check(
|
|
65402
|
+
isSelect: props.datum.check(selectData),
|
|
65403
|
+
selectData: selectData,
|
|
65333
65404
|
handleCellHover: handleCellHover
|
|
65334
65405
|
// to update
|
|
65335
65406
|
,
|
|
@@ -66017,7 +66088,9 @@ var emptyRef = {
|
|
|
66017
66088
|
currentIndex: virtualInfo.startIndex,
|
|
66018
66089
|
data: virtualInfo.data,
|
|
66019
66090
|
setRowHeight: virtualInfo.setRowHeight,
|
|
66020
|
-
scrolling: scrolling
|
|
66091
|
+
scrolling: scrolling,
|
|
66092
|
+
virtualRowSpanInfo: virtualInfo.rowSpanInfo,
|
|
66093
|
+
fullData: treeData
|
|
66021
66094
|
}))]
|
|
66022
66095
|
}), showFoot ? /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
66023
66096
|
className: footWrapperClass,
|
|
@@ -72618,7 +72691,7 @@ var upload_interface = __webpack_require__(8821);
|
|
|
72618
72691
|
|
|
72619
72692
|
|
|
72620
72693
|
/* harmony default export */ var src_0 = ({
|
|
72621
|
-
version: '3.8.0-beta.
|
|
72694
|
+
version: '3.8.0-beta.24'
|
|
72622
72695
|
});
|
|
72623
72696
|
}();
|
|
72624
72697
|
/******/ return __webpack_exports__;
|