@dtjoy/dt-design 1.0.6 → 1.0.8
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/esm/_util/easings.d.ts +1 -0
- package/esm/_util/easings.js +9 -0
- package/esm/_util/extendsObject.d.ts +4 -0
- package/esm/_util/extendsObject.js +17 -0
- package/esm/_util/gapSize.d.ts +3 -3
- package/esm/_util/getScroll.d.ts +3 -0
- package/esm/_util/getScroll.js +32 -0
- package/esm/_util/hooks/index.d.ts +4 -1
- package/esm/_util/hooks/index.js +4 -1
- package/esm/_util/hooks/useForceUpdate.d.ts +2 -0
- package/esm/_util/hooks/useForceUpdate.js +6 -0
- package/esm/_util/hooks/useOrientation.d.ts +2 -2
- package/esm/_util/hooks/useProxyImperativeHandle.d.ts +4 -0
- package/esm/_util/hooks/useProxyImperativeHandle.js +31 -0
- package/esm/_util/hooks/useSyncState.d.ts +3 -0
- package/esm/_util/hooks/useSyncState.js +20 -0
- package/esm/_util/index.d.ts +3 -3
- package/esm/_util/isNonNullable.d.ts +2 -2
- package/esm/_util/scrollTo.d.ts +10 -0
- package/esm/_util/scrollTo.js +38 -0
- package/esm/_util/type.d.ts +52 -52
- package/esm/_util/warning.d.ts +31 -31
- package/esm/_util/warning.js +5 -5
- package/esm/blockHeader/index.d.ts +50 -48
- package/esm/blockHeader/index.js +13 -15
- package/esm/blockHeader/style/index.d.ts +2 -2
- package/esm/blockHeader/style/index.less +143 -143
- package/esm/button/index.d.ts +10 -10
- package/esm/button/index.js +2 -2
- package/esm/button/style/index.d.ts +2 -2
- package/esm/collapsible/index.d.ts +102 -97
- package/esm/collapsible/index.js +53 -55
- package/esm/collapsible/style/index.d.ts +1 -1
- package/esm/collapsibleActionItems/index.d.ts +24 -24
- package/esm/collapsibleActionItems/index.js +2 -2
- package/esm/collapsibleActionItems/style/index.d.ts +2 -2
- package/esm/flex/index.d.ts +7 -7
- package/esm/flex/index.js +1 -1
- package/esm/flex/interface.d.ts +16 -16
- package/esm/flex/style/index.d.ts +2 -2
- package/esm/flex/style/index.less +76 -76
- package/esm/flex/utils.d.ts +7 -7
- package/esm/flex/utils.js +1 -1
- package/esm/formList/index.d.ts +78 -77
- package/esm/formList/index.js +13 -11
- package/esm/formList/style/index.d.ts +2 -2
- package/esm/formList/style/index.less +45 -45
- package/esm/index.d.ts +17 -14
- package/esm/index.js +3 -1
- package/esm/overflowList/index.d.ts +40 -39
- package/esm/overflowList/index.js +4 -3
- package/esm/overflowList/style/index.d.ts +2 -2
- package/esm/resize/index.d.ts +9 -8
- package/esm/resize/index.js +1 -1
- package/esm/resizeObserver/index.d.ts +45 -45
- package/esm/resizeObserver/index.js +3 -2
- package/esm/splitter/Panel.d.ts +7 -7
- package/esm/splitter/Panel.js +3 -3
- package/esm/splitter/SplitBar.d.ts +24 -24
- package/esm/splitter/SplitBar.js +8 -7
- package/esm/splitter/Splitter.d.ts +5 -5
- package/esm/splitter/Splitter.js +5 -4
- package/esm/splitter/hooks/sizeUtil.d.ts +3 -3
- package/esm/splitter/hooks/useItems.d.ts +14 -14
- package/esm/splitter/hooks/useItems.js +2 -2
- package/esm/splitter/hooks/useResizable.d.ts +10 -10
- package/esm/splitter/hooks/useResize.d.ts +6 -6
- package/esm/splitter/hooks/useResize.js +5 -5
- package/esm/splitter/hooks/useSizes.d.ts +4 -4
- package/esm/splitter/index.d.ts +8 -8
- package/esm/splitter/interface.d.ts +69 -69
- package/esm/splitter/style/index.d.ts +2 -2
- package/esm/statusTag/index.d.ts +29 -28
- package/esm/statusTag/index.js +8 -8
- package/esm/statusTag/style/index.d.ts +2 -2
- package/esm/style/index.d.ts +1 -1
- package/esm/style/index.less +1 -1
- package/esm/style/themes/index.less +2 -2
- package/esm/style/themes/variable.less +4 -0
- package/esm/table/InternalTable.d.ts +32 -0
- package/esm/table/InternalTable.js +429 -0
- package/esm/table/RcTable/VirtualTable.d.ts +2 -0
- package/esm/table/RcTable/VirtualTable.js +9 -0
- package/esm/table/RcTable/index.d.ts +2 -0
- package/esm/table/RcTable/index.js +9 -0
- package/esm/table/Table.d.ts +17 -0
- package/esm/table/Table.js +28 -0
- package/esm/table/TableMeasureRowContext.d.ts +3 -0
- package/esm/table/TableMeasureRowContext.js +3 -0
- package/esm/table/hooks/useContainerWidth.d.ts +1 -0
- package/esm/table/hooks/useContainerWidth.js +14 -0
- package/esm/table/index.d.ts +7 -0
- package/esm/table/index.js +2 -0
- package/esm/table/interface.d.ts +196 -0
- package/esm/table/interface.js +4 -0
- package/esm/table/style/bordered.less +141 -0
- package/esm/table/style/fixed.less +88 -0
- package/esm/table/style/index.d.ts +2 -0
- package/esm/table/style/index.js +2 -0
- package/esm/table/style/index.less +150 -0
- package/esm/table/style/selection.less +90 -0
- package/esm/table/style/sticky.less +55 -0
- package/esm/table/style/virtual.less +65 -0
- package/esm/table/util.d.ts +14 -0
- package/esm/table/util.js +33 -0
- package/lib/_util/easings.d.ts +1 -0
- package/lib/_util/easings.js +15 -0
- package/lib/_util/extendsObject.d.ts +4 -0
- package/lib/_util/extendsObject.js +20 -0
- package/lib/_util/gapSize.d.ts +3 -3
- package/lib/_util/getScroll.d.ts +3 -0
- package/lib/_util/getScroll.js +39 -0
- package/lib/_util/hooks/index.d.ts +4 -1
- package/lib/_util/hooks/index.js +33 -0
- package/lib/_util/hooks/useForceUpdate.d.ts +2 -0
- package/lib/_util/hooks/useForceUpdate.js +12 -0
- package/lib/_util/hooks/useOrientation.d.ts +2 -2
- package/lib/_util/hooks/useProxyImperativeHandle.d.ts +4 -0
- package/lib/_util/hooks/useProxyImperativeHandle.js +40 -0
- package/lib/_util/hooks/useSyncState.d.ts +3 -0
- package/lib/_util/hooks/useSyncState.js +19 -0
- package/lib/_util/index.d.ts +3 -3
- package/lib/_util/isNonNullable.d.ts +2 -2
- package/lib/_util/scrollTo.d.ts +10 -0
- package/lib/_util/scrollTo.js +44 -0
- package/lib/_util/type.d.ts +52 -52
- package/lib/_util/warning.d.ts +31 -31
- package/lib/_util/warning.js +7 -8
- package/lib/blockHeader/index.d.ts +50 -48
- package/lib/blockHeader/index.js +13 -12
- package/lib/blockHeader/style/index.d.ts +2 -2
- package/lib/blockHeader/style/index.less +143 -143
- package/lib/button/index.d.ts +10 -10
- package/lib/button/index.js +2 -2
- package/lib/button/style/index.d.ts +2 -2
- package/lib/collapsible/index.d.ts +102 -97
- package/lib/collapsible/index.js +49 -49
- package/lib/collapsible/style/index.d.ts +1 -1
- package/lib/collapsibleActionItems/index.d.ts +24 -24
- package/lib/collapsibleActionItems/index.js +2 -2
- package/lib/collapsibleActionItems/style/index.d.ts +2 -2
- package/lib/flex/index.d.ts +7 -7
- package/lib/flex/index.js +2 -2
- package/lib/flex/interface.d.ts +16 -16
- package/lib/flex/style/index.d.ts +2 -2
- package/lib/flex/style/index.less +76 -76
- package/lib/flex/utils.d.ts +7 -7
- package/lib/flex/utils.js +2 -2
- package/lib/formList/index.d.ts +78 -77
- package/lib/formList/index.js +10 -10
- package/lib/formList/style/index.d.ts +2 -2
- package/lib/formList/style/index.less +45 -45
- package/lib/index.d.ts +17 -14
- package/lib/index.js +21 -2
- package/lib/overflowList/index.d.ts +40 -39
- package/lib/overflowList/index.js +4 -3
- package/lib/overflowList/style/index.d.ts +2 -2
- package/lib/resize/index.d.ts +9 -8
- package/lib/resize/index.js +1 -1
- package/lib/resizeObserver/index.d.ts +45 -45
- package/lib/resizeObserver/index.js +3 -2
- package/lib/splitter/Panel.d.ts +7 -7
- package/lib/splitter/Panel.js +3 -3
- package/lib/splitter/SplitBar.d.ts +24 -24
- package/lib/splitter/SplitBar.js +8 -7
- package/lib/splitter/Splitter.d.ts +5 -5
- package/lib/splitter/Splitter.js +5 -4
- package/lib/splitter/hooks/sizeUtil.d.ts +3 -3
- package/lib/splitter/hooks/useItems.d.ts +14 -14
- package/lib/splitter/hooks/useItems.js +2 -2
- package/lib/splitter/hooks/useResizable.d.ts +10 -10
- package/lib/splitter/hooks/useResize.d.ts +6 -6
- package/lib/splitter/hooks/useResize.js +5 -5
- package/lib/splitter/hooks/useSizes.d.ts +4 -4
- package/lib/splitter/index.d.ts +8 -8
- package/lib/splitter/interface.d.ts +69 -69
- package/lib/splitter/style/index.d.ts +2 -2
- package/lib/statusTag/index.d.ts +29 -28
- package/lib/statusTag/index.js +8 -8
- package/lib/statusTag/style/index.d.ts +2 -2
- package/lib/style/index.d.ts +1 -1
- package/lib/style/index.less +1 -1
- package/lib/style/themes/index.less +2 -2
- package/lib/style/themes/variable.less +4 -0
- package/lib/table/InternalTable.d.ts +32 -0
- package/lib/table/InternalTable.js +395 -0
- package/lib/table/RcTable/VirtualTable.d.ts +2 -0
- package/lib/table/RcTable/VirtualTable.js +17 -0
- package/lib/table/RcTable/index.d.ts +2 -0
- package/lib/table/RcTable/index.js +17 -0
- package/lib/table/Table.d.ts +17 -0
- package/lib/table/Table.js +37 -0
- package/lib/table/TableMeasureRowContext.d.ts +3 -0
- package/lib/{_util/zindexContext.js → table/TableMeasureRowContext.js} +2 -5
- package/lib/table/hooks/useContainerWidth.d.ts +1 -0
- package/lib/table/hooks/useContainerWidth.js +20 -0
- package/lib/table/index.d.ts +7 -0
- package/lib/table/index.js +9 -0
- package/lib/table/interface.d.ts +196 -0
- package/lib/table/interface.js +8 -0
- package/lib/table/style/bordered.less +141 -0
- package/lib/table/style/fixed.less +88 -0
- package/lib/table/style/index.d.ts +2 -0
- package/lib/table/style/index.js +4 -0
- package/lib/table/style/index.less +150 -0
- package/lib/table/style/selection.less +90 -0
- package/lib/table/style/sticky.less +55 -0
- package/lib/table/style/virtual.less +65 -0
- package/lib/table/util.d.ts +14 -0
- package/lib/table/util.js +44 -0
- package/package.json +82 -66
- package/esm/_util/convertToTooltipProps.d.ts +0 -4
- package/esm/_util/convertToTooltipProps.js +0 -15
- package/esm/_util/hooks/useZIndex.d.ts +0 -8
- package/esm/_util/hooks/useZIndex.js +0 -51
- package/esm/_util/zindexContext.d.ts +0 -3
- package/esm/_util/zindexContext.js +0 -6
- package/lib/_util/convertToTooltipProps.d.ts +0 -4
- package/lib/_util/convertToTooltipProps.js +0 -21
- package/lib/_util/hooks/useZIndex.d.ts +0 -8
- package/lib/_util/hooks/useZIndex.js +0 -59
- package/lib/_util/zindexContext.d.ts +0 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '../../style';
|
|
2
|
-
import './index.less';
|
|
1
|
+
import '../../style';
|
|
2
|
+
import './index.less';
|
|
@@ -1,143 +1,143 @@
|
|
|
1
|
-
@import '../../style/themes/index.less';
|
|
2
|
-
|
|
3
|
-
@card_prefix: ~'@{ant-prefix}-block-header';
|
|
4
|
-
|
|
5
|
-
.@{card_prefix} {
|
|
6
|
-
&__title {
|
|
7
|
-
border-radius: 4px;
|
|
8
|
-
display: flex;
|
|
9
|
-
align-items: center;
|
|
10
|
-
justify-content: space-between;
|
|
11
|
-
&--large {
|
|
12
|
-
.title__box {
|
|
13
|
-
line-height: 24px;
|
|
14
|
-
.title__text {
|
|
15
|
-
font-size: 16px;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
&--middle {
|
|
20
|
-
.title__box {
|
|
21
|
-
line-height: 22px;
|
|
22
|
-
.title__text {
|
|
23
|
-
font-size: 14px;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
&--small {
|
|
28
|
-
.title__box {
|
|
29
|
-
line-height: 20px;
|
|
30
|
-
.title__text {
|
|
31
|
-
font-size: 12px;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
&--background {
|
|
36
|
-
padding: 0 12px;
|
|
37
|
-
background-color: #f9f9fa;
|
|
38
|
-
&.@{card_prefix}__title {
|
|
39
|
-
&--middle,
|
|
40
|
-
&--large {
|
|
41
|
-
height: 40px;
|
|
42
|
-
}
|
|
43
|
-
&--small {
|
|
44
|
-
height: 32px;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
&--pointer {
|
|
49
|
-
cursor: pointer;
|
|
50
|
-
}
|
|
51
|
-
.title {
|
|
52
|
-
&__box {
|
|
53
|
-
flex: 1;
|
|
54
|
-
display: flex;
|
|
55
|
-
align-items: center;
|
|
56
|
-
}
|
|
57
|
-
&__addon-before {
|
|
58
|
-
margin-right: 8px;
|
|
59
|
-
color: @primary-color;
|
|
60
|
-
&--middle {
|
|
61
|
-
.addon-before--default {
|
|
62
|
-
width: 4px;
|
|
63
|
-
height: 16px;
|
|
64
|
-
background-color: @primary-color;
|
|
65
|
-
}
|
|
66
|
-
font-size: 20px;
|
|
67
|
-
}
|
|
68
|
-
&--small {
|
|
69
|
-
.addon-before--default {
|
|
70
|
-
width: 4px;
|
|
71
|
-
height: 16px;
|
|
72
|
-
background-color: @primary-color;
|
|
73
|
-
}
|
|
74
|
-
font-size: 16px;
|
|
75
|
-
}
|
|
76
|
-
&--large {
|
|
77
|
-
.addon-before--default {
|
|
78
|
-
width: 4px;
|
|
79
|
-
height: 20px;
|
|
80
|
-
background-color: @primary-color;
|
|
81
|
-
}
|
|
82
|
-
font-size: 24px;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
&__tooltip {
|
|
86
|
-
display: flex;
|
|
87
|
-
margin-right: 4px;
|
|
88
|
-
font-size: 14px;
|
|
89
|
-
color: #b1b4c5;
|
|
90
|
-
cursor: pointer;
|
|
91
|
-
}
|
|
92
|
-
&__text {
|
|
93
|
-
color: @text-color;
|
|
94
|
-
font-weight: 500;
|
|
95
|
-
margin-right: 4px;
|
|
96
|
-
}
|
|
97
|
-
&__description {
|
|
98
|
-
display: flex;
|
|
99
|
-
align-items: center;
|
|
100
|
-
color: @label-color;
|
|
101
|
-
font-size: 12px;
|
|
102
|
-
}
|
|
103
|
-
&__addon-after {
|
|
104
|
-
color: @label-color;
|
|
105
|
-
}
|
|
106
|
-
&__collapse {
|
|
107
|
-
color: @label-color;
|
|
108
|
-
display: flex;
|
|
109
|
-
align-items: center;
|
|
110
|
-
cursor: pointer;
|
|
111
|
-
user-select: none;
|
|
112
|
-
.collapse {
|
|
113
|
-
&__text {
|
|
114
|
-
font-size: 12px;
|
|
115
|
-
margin: 0 4px;
|
|
116
|
-
}
|
|
117
|
-
&__icon {
|
|
118
|
-
font-size: 16px;
|
|
119
|
-
transition: transform 0.4s;
|
|
120
|
-
&--down {
|
|
121
|
-
transform: rotate(-180deg);
|
|
122
|
-
}
|
|
123
|
-
&--up {
|
|
124
|
-
transform: rotate(0deg);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
&__content {
|
|
132
|
-
padding: 16px 24px;
|
|
133
|
-
|
|
134
|
-
// opacity: 0;
|
|
135
|
-
// height: 0;
|
|
136
|
-
// overflow: hidden;
|
|
137
|
-
// transition: opacity 0.5s ease, height 0.5s ease;
|
|
138
|
-
&--active {
|
|
139
|
-
// opacity: 1;
|
|
140
|
-
// height: auto;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
1
|
+
@import '../../style/themes/index.less';
|
|
2
|
+
|
|
3
|
+
@card_prefix: ~'@{ant-prefix}-block-header';
|
|
4
|
+
|
|
5
|
+
.@{card_prefix} {
|
|
6
|
+
&__title {
|
|
7
|
+
border-radius: 4px;
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
&--large {
|
|
12
|
+
.title__box {
|
|
13
|
+
line-height: 24px;
|
|
14
|
+
.title__text {
|
|
15
|
+
font-size: 16px;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
&--middle {
|
|
20
|
+
.title__box {
|
|
21
|
+
line-height: 22px;
|
|
22
|
+
.title__text {
|
|
23
|
+
font-size: 14px;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
&--small {
|
|
28
|
+
.title__box {
|
|
29
|
+
line-height: 20px;
|
|
30
|
+
.title__text {
|
|
31
|
+
font-size: 12px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
&--background {
|
|
36
|
+
padding: 0 12px;
|
|
37
|
+
background-color: #f9f9fa;
|
|
38
|
+
&.@{card_prefix}__title {
|
|
39
|
+
&--middle,
|
|
40
|
+
&--large {
|
|
41
|
+
height: 40px;
|
|
42
|
+
}
|
|
43
|
+
&--small {
|
|
44
|
+
height: 32px;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
&--pointer {
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
}
|
|
51
|
+
.title {
|
|
52
|
+
&__box {
|
|
53
|
+
flex: 1;
|
|
54
|
+
display: flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
}
|
|
57
|
+
&__addon-before {
|
|
58
|
+
margin-right: 8px;
|
|
59
|
+
color: @primary-color;
|
|
60
|
+
&--middle {
|
|
61
|
+
.addon-before--default {
|
|
62
|
+
width: 4px;
|
|
63
|
+
height: 16px;
|
|
64
|
+
background-color: @primary-color;
|
|
65
|
+
}
|
|
66
|
+
font-size: 20px;
|
|
67
|
+
}
|
|
68
|
+
&--small {
|
|
69
|
+
.addon-before--default {
|
|
70
|
+
width: 4px;
|
|
71
|
+
height: 16px;
|
|
72
|
+
background-color: @primary-color;
|
|
73
|
+
}
|
|
74
|
+
font-size: 16px;
|
|
75
|
+
}
|
|
76
|
+
&--large {
|
|
77
|
+
.addon-before--default {
|
|
78
|
+
width: 4px;
|
|
79
|
+
height: 20px;
|
|
80
|
+
background-color: @primary-color;
|
|
81
|
+
}
|
|
82
|
+
font-size: 24px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
&__tooltip {
|
|
86
|
+
display: flex;
|
|
87
|
+
margin-right: 4px;
|
|
88
|
+
font-size: 14px;
|
|
89
|
+
color: #b1b4c5;
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
}
|
|
92
|
+
&__text {
|
|
93
|
+
color: @text-color;
|
|
94
|
+
font-weight: 500;
|
|
95
|
+
margin-right: 4px;
|
|
96
|
+
}
|
|
97
|
+
&__description {
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
color: @label-color;
|
|
101
|
+
font-size: 12px;
|
|
102
|
+
}
|
|
103
|
+
&__addon-after {
|
|
104
|
+
color: @label-color;
|
|
105
|
+
}
|
|
106
|
+
&__collapse {
|
|
107
|
+
color: @label-color;
|
|
108
|
+
display: flex;
|
|
109
|
+
align-items: center;
|
|
110
|
+
cursor: pointer;
|
|
111
|
+
user-select: none;
|
|
112
|
+
.collapse {
|
|
113
|
+
&__text {
|
|
114
|
+
font-size: 12px;
|
|
115
|
+
margin: 0 4px;
|
|
116
|
+
}
|
|
117
|
+
&__icon {
|
|
118
|
+
font-size: 16px;
|
|
119
|
+
transition: transform 0.4s;
|
|
120
|
+
&--down {
|
|
121
|
+
transform: rotate(-180deg);
|
|
122
|
+
}
|
|
123
|
+
&--up {
|
|
124
|
+
transform: rotate(0deg);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
&__content {
|
|
132
|
+
padding: 16px 24px;
|
|
133
|
+
|
|
134
|
+
// opacity: 0;
|
|
135
|
+
// height: 0;
|
|
136
|
+
// overflow: hidden;
|
|
137
|
+
// transition: opacity 0.5s ease, height 0.5s ease;
|
|
138
|
+
&--active {
|
|
139
|
+
// opacity: 1;
|
|
140
|
+
// height: auto;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
package/esm/button/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ButtonProps as AntdButtonProps } from 'antd';
|
|
3
|
-
import { ButtonType as AntdButtonType } from 'antd/es/button';
|
|
4
|
-
import './style';
|
|
5
|
-
|
|
6
|
-
export interface ButtonProps extends Omit<AntdButtonProps, 'type'> {
|
|
7
|
-
type?: ButtonType;
|
|
8
|
-
}
|
|
9
|
-
declare const _default: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLElement>>;
|
|
10
|
-
export default _default;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ButtonProps as AntdButtonProps } from 'antd';
|
|
3
|
+
import type { ButtonType as AntdButtonType } from 'antd/es/button';
|
|
4
|
+
import './style';
|
|
5
|
+
type ButtonType = AntdButtonType | 'secondary' | 'tertiary';
|
|
6
|
+
export interface ButtonProps extends Omit<AntdButtonProps, 'type'> {
|
|
7
|
+
type?: ButtonType;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLElement>>;
|
|
10
|
+
export default _default;
|
package/esm/button/index.js
CHANGED
|
@@ -4,7 +4,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
4
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { Button as AntdButton } from 'antd';
|
|
7
|
-
import
|
|
7
|
+
import clsx from 'clsx';
|
|
8
8
|
import "./style";
|
|
9
9
|
function Button(_ref) {
|
|
10
10
|
var className = _ref.className,
|
|
@@ -13,7 +13,7 @@ function Button(_ref) {
|
|
|
13
13
|
type = _ref.type,
|
|
14
14
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
15
15
|
return /*#__PURE__*/React.createElement(AntdButton, _extends({
|
|
16
|
-
className:
|
|
16
|
+
className: clsx(className),
|
|
17
17
|
size: size,
|
|
18
18
|
type: type
|
|
19
19
|
}, rest));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '../../style/index.less';
|
|
2
|
-
import './index.less';
|
|
1
|
+
import '../../style/index.less';
|
|
2
|
+
import './index.less';
|
|
@@ -1,97 +1,102 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './style';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
static displayName: string;
|
|
83
|
-
|
|
84
|
-
private
|
|
85
|
-
private
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
static getDerivedStateFromProps(props: CollapsibleProps, prevState: CollapsibleState): Partial<CollapsibleState>;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style';
|
|
3
|
+
import type { ConfigConsumerProps } from 'antd/lib/config-provider';
|
|
4
|
+
interface BaseComponentProps {
|
|
5
|
+
/**
|
|
6
|
+
* 类名
|
|
7
|
+
*/
|
|
8
|
+
className?: string;
|
|
9
|
+
/**
|
|
10
|
+
* 样式
|
|
11
|
+
*/
|
|
12
|
+
style?: React.CSSProperties;
|
|
13
|
+
/**
|
|
14
|
+
* id
|
|
15
|
+
*/
|
|
16
|
+
id?: string;
|
|
17
|
+
'data-*'?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface CollapsibleProps extends BaseComponentProps {
|
|
20
|
+
/**
|
|
21
|
+
* 是否开启动画
|
|
22
|
+
*/
|
|
23
|
+
motion?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* 子元素
|
|
26
|
+
*/
|
|
27
|
+
children?: React.ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* 是否展开内容区域
|
|
30
|
+
*/
|
|
31
|
+
isOpen?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* 动画执行的时间
|
|
34
|
+
*/
|
|
35
|
+
duration?: number;
|
|
36
|
+
/**
|
|
37
|
+
* 是否保留隐藏的面板 DOM 树,默认销毁
|
|
38
|
+
*/
|
|
39
|
+
keepDOM?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* 配合 keepDOM 使用,为 true 时挂载时不会渲染组件
|
|
42
|
+
*/
|
|
43
|
+
lazyRender?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* 折叠高度
|
|
46
|
+
*/
|
|
47
|
+
collapseHeight?: number;
|
|
48
|
+
/**
|
|
49
|
+
* 当 reCalcKey 改变时,将重新计算子节点的高度,用于优化动态渲染时的计算
|
|
50
|
+
*/
|
|
51
|
+
reCalcKey?: number | string;
|
|
52
|
+
/**
|
|
53
|
+
* 动画结束的回调
|
|
54
|
+
*/
|
|
55
|
+
onMotionEnd?: () => void;
|
|
56
|
+
/**
|
|
57
|
+
* 是否开启淡入淡出
|
|
58
|
+
*/
|
|
59
|
+
fade?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* 样式前缀
|
|
62
|
+
*/
|
|
63
|
+
prefixCls?: string;
|
|
64
|
+
}
|
|
65
|
+
interface CollapsibleState {
|
|
66
|
+
domInRenderTree: boolean;
|
|
67
|
+
domHeight: number;
|
|
68
|
+
visible: boolean;
|
|
69
|
+
isTransitioning: boolean;
|
|
70
|
+
cacheIsOpen: boolean;
|
|
71
|
+
}
|
|
72
|
+
declare class Collapsible extends React.Component<CollapsibleProps, CollapsibleState> {
|
|
73
|
+
static defaultProps: {
|
|
74
|
+
isOpen: boolean;
|
|
75
|
+
duration: number;
|
|
76
|
+
motion: boolean;
|
|
77
|
+
keepDOM: boolean;
|
|
78
|
+
lazyRender: boolean;
|
|
79
|
+
collapseHeight: number;
|
|
80
|
+
fade: boolean;
|
|
81
|
+
};
|
|
82
|
+
static displayName: string;
|
|
83
|
+
foundation: any;
|
|
84
|
+
private domRef;
|
|
85
|
+
private resizeObserver;
|
|
86
|
+
private hasBeenRendered;
|
|
87
|
+
constructor(props: CollapsibleProps);
|
|
88
|
+
static getEntryInfo: (entry: ResizeObserverEntry) => {
|
|
89
|
+
isShown: boolean;
|
|
90
|
+
height: number;
|
|
91
|
+
};
|
|
92
|
+
static getDerivedStateFromProps(props: CollapsibleProps, prevState: CollapsibleState): Partial<CollapsibleState>;
|
|
93
|
+
componentDidMount(): void;
|
|
94
|
+
componentDidUpdate(prevProps: Readonly<CollapsibleProps>, prevState: Readonly<CollapsibleState>): void;
|
|
95
|
+
componentWillUnmount(): void;
|
|
96
|
+
renderCollapsible: ({ getPrefixCls }: ConfigConsumerProps) => React.JSX.Element;
|
|
97
|
+
render(): React.JSX.Element;
|
|
98
|
+
private handleResize;
|
|
99
|
+
private isChildrenInRenderTree;
|
|
100
|
+
private getDataAttr;
|
|
101
|
+
}
|
|
102
|
+
export default Collapsible;
|