@tendaui/react 1.1.4 → 1.1.6
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/LICENSE +21 -0
- package/README.md +1 -1
- package/es/_chunks/dep-5U9UjDaf.js.map +1 -1
- package/es/_chunks/dep-CD_4-1Xb.js.map +1 -1
- package/es/_chunks/{dep-CRURwzDj.js → dep-CsSvR9wN.js} +9 -3
- package/es/_chunks/dep-CsSvR9wN.js.map +1 -0
- package/es/_chunks/dep-DJmE940f.js.map +1 -1
- package/es/_chunks/dep-DbVHGoUC.js.map +1 -1
- package/es/_chunks/{dep-D8jki30S.js → dep-aX8qrQpB.js} +2 -2
- package/es/_chunks/{dep-D8jki30S.js.map → dep-aX8qrQpB.js.map} +1 -1
- package/es/alert/Alert.js +9 -2
- package/es/alert/Alert.js.map +1 -1
- package/es/alert/index.js +4 -1
- package/es/alert/index.js.map +1 -1
- package/es/alert/style/index.css +7 -30
- package/es/badge/style/index.css +5 -10
- package/es/button/_example/base.js +1 -158
- package/es/button/_example/base.js.map +1 -1
- package/es/button/_example/icon.js +1 -157
- package/es/button/_example/icon.js.map +1 -1
- package/es/button/style/index.css +4 -19
- package/es/checkbox/style/index.css +9 -26
- package/es/color-picker/ColorPicker.js +3 -3
- package/es/color-picker/components/panel/format/index.js +4 -1
- package/es/color-picker/components/panel/format/index.js.map +1 -1
- package/es/color-picker/components/panel/format/inputs.js +3 -0
- package/es/color-picker/components/panel/format/inputs.js.map +1 -1
- package/es/color-picker/components/trigger.js +3 -0
- package/es/color-picker/components/trigger.js.map +1 -1
- package/es/color-picker/index.js +1 -1
- package/es/color-picker/style/css.js +1 -0
- package/es/color-picker/style/index.css +43 -138
- package/es/color-picker/utils/color-picker/index.js.map +1 -1
- package/es/dialog/Dialog.js +4 -1
- package/es/dialog/Dialog.js.map +1 -1
- package/es/dialog/DialogCard.js +5 -2
- package/es/dialog/DialogCard.js.map +1 -1
- package/es/dialog/index.js +4 -3
- package/es/dialog/index.js.map +1 -1
- package/es/dialog/plugin.js +3 -2
- package/es/dialog/plugin.js.map +1 -1
- package/es/dialog/style/index.css +51 -188
- package/es/drawer/Drawer.js +15 -8
- package/es/drawer/Drawer.js.map +1 -1
- package/es/drawer/index.js +5 -2
- package/es/drawer/index.js.map +1 -1
- package/es/drawer/style/css.js +1 -1
- package/es/drawer/style/index.css +12 -41
- package/es/fireworks/style/css.js +0 -2
- package/es/form/Form.js +3 -0
- package/es/form/Form.js.map +1 -1
- package/es/form/FormItem.js +3 -0
- package/es/form/FormItem.js.map +1 -1
- package/es/form/index.js +3 -0
- package/es/form/index.js.map +1 -1
- package/es/form/style/index.css +13 -33
- package/es/index.js +4 -4
- package/es/input/Input.js +10 -2
- package/es/input/Input.js.map +1 -1
- package/es/input/index.js +4 -1
- package/es/input/index.js.map +1 -1
- package/es/input/style/index.css +17 -63
- package/es/input-number/InputNumber.js +4 -1
- package/es/input-number/InputNumber.js.map +1 -1
- package/es/input-number/index.js +4 -1
- package/es/input-number/index.js.map +1 -1
- package/es/input-number/style/css.js +1 -1
- package/es/input-number/style/index.css +7 -39
- package/es/input-number/useInputNumber.js.map +1 -1
- package/es/ip-input/style/index.css +21 -87
- package/es/layout/style/index.css +5 -19
- package/es/list/List.js.map +1 -1
- package/es/list/ListItem.js.map +1 -1
- package/es/list/ListItemMeta.js.map +1 -1
- package/es/list/style/css.js +1 -1
- package/es/list/style/index.css +11 -39
- package/es/loading/style/index.css +10 -65
- package/es/notification/style/index.css +6 -24
- package/es/popup/style/index.css +9 -20
- package/es/radio/style/index.css +11 -36
- package/es/select/Select.js +4 -1
- package/es/select/Select.js.map +1 -1
- package/es/select/index.js +4 -1
- package/es/select/index.js.map +1 -1
- package/es/select/style/index.css +17 -52
- package/es/select-input/SelectInput.js +3 -0
- package/es/select-input/SelectInput.js.map +1 -1
- package/es/select-input/hook/useMultiple.js +3 -0
- package/es/select-input/hook/useMultiple.js.map +1 -1
- package/es/select-input/hook/useSingle.js +3 -0
- package/es/select-input/hook/useSingle.js.map +1 -1
- package/es/select-input/index.js +3 -0
- package/es/select-input/index.js.map +1 -1
- package/es/slider/Slider.js +3 -0
- package/es/slider/Slider.js.map +1 -1
- package/es/slider/SliderHandleButton.js.map +1 -1
- package/es/slider/index.js +3 -0
- package/es/slider/index.js.map +1 -1
- package/es/slider/style/css.js +1 -1
- package/es/slider/style/index.css +18 -59
- package/es/style/index.css +0 -2
- package/es/switch/Switch.js +1 -1
- package/es/switch/index.js +1 -1
- package/es/switch/style/index.css +10 -37
- package/es/tab/style/index.css +6 -31
- package/es/table/TBody.js +10 -1
- package/es/table/TBody.js.map +1 -1
- package/es/table/Table.js +4 -0
- package/es/table/Table.js.map +1 -1
- package/es/table/index.js +4 -0
- package/es/table/index.js.map +1 -1
- package/es/table/style/index.css +5 -15
- package/es/tag/style/index.css +4 -16
- package/es/tag-input/TagInput.js +3 -0
- package/es/tag-input/TagInput.js.map +1 -1
- package/es/tag-input/index.js +3 -0
- package/es/tag-input/index.js.map +1 -1
- package/es/tag-input/style/index.css +7 -53
- package/es/utils/log/index.js.map +1 -1
- package/package.json +3 -3
- package/es/_chunks/dep-CRURwzDj.js.map +0 -1
- package/es/fireworks/style/index.css +0 -121
package/es/slider/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../components/slider/index.ts"],"sourcesContent":["import _Slider from \"./Slider\";\n\nimport \"./style/index.js\";\n\nexport type { SliderProps } from \"./Slider\";\nexport * from \"./type\";\n\nexport const Slider = _Slider;\nexport default Slider;\n"],"names":["Slider","_Slider"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../components/slider/index.ts"],"sourcesContent":["import _Slider from \"./Slider\";\n\nimport \"./style/index.js\";\n\nexport type { SliderProps } from \"./Slider\";\nexport * from \"./type\";\n\nexport const Slider = _Slider;\nexport default Slider;\n"],"names":["Slider","_Slider"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOO,IAAMA,MAAA,GAASC;;;;"}
|
package/es/slider/style/css.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import "./index.css";
|
|
1
|
+
import "./index.css";
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
.t-slider__input-container {
|
|
2
|
-
display: -webkit-box;
|
|
3
|
-
display: -ms-flexbox;
|
|
4
2
|
display: flex;
|
|
5
|
-
-
|
|
6
|
-
-ms-flex-align: center;
|
|
7
|
-
align-items: center;
|
|
3
|
+
align-items: center;
|
|
8
4
|
margin-left: var(--td-comp-margin-xxl);
|
|
9
5
|
}
|
|
10
6
|
.t-slider__input-container.is-vertical {
|
|
@@ -21,8 +17,7 @@
|
|
|
21
17
|
.t-slider {
|
|
22
18
|
font: var(--td-font-body-medium);
|
|
23
19
|
color: var(--td-text-color-primary);
|
|
24
|
-
|
|
25
|
-
box-sizing: border-box;
|
|
20
|
+
box-sizing: border-box;
|
|
26
21
|
margin: 0;
|
|
27
22
|
padding: 0;
|
|
28
23
|
list-style: none;
|
|
@@ -33,29 +28,19 @@
|
|
|
33
28
|
}
|
|
34
29
|
.t-slider__container {
|
|
35
30
|
width: 100%;
|
|
36
|
-
display: -webkit-box;
|
|
37
|
-
display: -ms-flexbox;
|
|
38
31
|
display: flex;
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
justify-content: center;
|
|
42
|
-
-webkit-box-align: center;
|
|
43
|
-
-ms-flex-align: center;
|
|
44
|
-
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
align-items: center;
|
|
45
34
|
}
|
|
46
35
|
.t-slider__container.is-vertical {
|
|
47
36
|
height: 100%;
|
|
48
|
-
-
|
|
49
|
-
-webkit-box-direction: normal;
|
|
50
|
-
-ms-flex-direction: column;
|
|
51
|
-
flex-direction: column;
|
|
37
|
+
flex-direction: column;
|
|
52
38
|
}
|
|
53
39
|
.t-slider__rail {
|
|
54
40
|
position: absolute;
|
|
55
41
|
width: 100%;
|
|
56
42
|
height: var(--td-size-2);
|
|
57
43
|
background-color: var(--td-bg-color-secondarycomponent);
|
|
58
|
-
-webkit-transition: 0.2s linear;
|
|
59
44
|
transition: 0.2s linear;
|
|
60
45
|
border-radius: var(--td-radius-round);
|
|
61
46
|
}
|
|
@@ -81,20 +66,15 @@
|
|
|
81
66
|
border: 2px solid var(--td-brand-color);
|
|
82
67
|
background-color: #fff;
|
|
83
68
|
border-radius: var(--td-radius-circle);
|
|
84
|
-
-webkit-transition: 0.2s;
|
|
85
69
|
transition: 0.2s;
|
|
86
70
|
-webkit-user-select: none;
|
|
87
71
|
-moz-user-select: none;
|
|
88
|
-
-ms-user-select: none;
|
|
89
72
|
user-select: none;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
-webkit-box-shadow: var(--td-shadow-1);
|
|
93
|
-
box-shadow: var(--td-shadow-1);
|
|
73
|
+
box-sizing: border-box;
|
|
74
|
+
box-shadow: var(--td-shadow-1);
|
|
94
75
|
}
|
|
95
76
|
.t-slider__button--dragging {
|
|
96
|
-
|
|
97
|
-
box-shadow: 0 0 0px 2px var(--td-brand-color-focus);
|
|
77
|
+
box-shadow: 0 0 0px 2px var(--td-brand-color-focus);
|
|
98
78
|
}
|
|
99
79
|
.t-slider__button:hover {
|
|
100
80
|
background-color: var(--td-gray-color-1);
|
|
@@ -103,23 +83,17 @@
|
|
|
103
83
|
position: absolute;
|
|
104
84
|
z-index: 2;
|
|
105
85
|
top: 50%;
|
|
106
|
-
|
|
107
|
-
transform: translate(-50%, -50%);
|
|
86
|
+
transform: translate(-50%, -50%);
|
|
108
87
|
background-color: transparent;
|
|
109
88
|
text-align: center;
|
|
110
89
|
-webkit-user-select: none;
|
|
111
90
|
-moz-user-select: none;
|
|
112
|
-
-ms-user-select: none;
|
|
113
91
|
user-select: none;
|
|
114
92
|
line-height: normal;
|
|
115
93
|
outline: none;
|
|
116
94
|
cursor: pointer;
|
|
117
|
-
display: -webkit-box;
|
|
118
|
-
display: -ms-flexbox;
|
|
119
95
|
display: flex;
|
|
120
|
-
-
|
|
121
|
-
-ms-flex-align: center;
|
|
122
|
-
align-items: center;
|
|
96
|
+
align-items: center;
|
|
123
97
|
}
|
|
124
98
|
.t-slider__stop {
|
|
125
99
|
position: absolute;
|
|
@@ -140,29 +114,22 @@
|
|
|
140
114
|
font: var(--td-font-body-small);
|
|
141
115
|
color: var(--td-text-color-primary);
|
|
142
116
|
top: calc(var(--td-size-2) + var(--td-comp-paddingTB-xs) + 2px);
|
|
143
|
-
|
|
144
|
-
transform: translateX(-50%);
|
|
117
|
+
transform: translateX(-50%);
|
|
145
118
|
cursor: pointer;
|
|
146
119
|
white-space: nowrap;
|
|
147
120
|
}
|
|
148
121
|
.t-slider__mark-text:first-child {
|
|
149
|
-
|
|
150
|
-
transform: translateX(0%);
|
|
122
|
+
transform: translateX(0%);
|
|
151
123
|
}
|
|
152
124
|
.t-slider__mark-text:last-child {
|
|
153
|
-
|
|
154
|
-
transform: translateX(-100%);
|
|
125
|
+
transform: translateX(-100%);
|
|
155
126
|
}
|
|
156
127
|
|
|
157
128
|
.t-slider--vertical {
|
|
158
129
|
height: 100%;
|
|
159
130
|
padding: 0;
|
|
160
|
-
display: -webkit-box;
|
|
161
|
-
display: -ms-flexbox;
|
|
162
131
|
display: flex;
|
|
163
|
-
-
|
|
164
|
-
-ms-flex-pack: center;
|
|
165
|
-
justify-content: center;
|
|
132
|
+
justify-content: center;
|
|
166
133
|
position: relative;
|
|
167
134
|
}
|
|
168
135
|
.t-slider--vertical .t-slider__rail {
|
|
@@ -181,8 +148,7 @@
|
|
|
181
148
|
margin-top: -6px;
|
|
182
149
|
margin-left: -5px;
|
|
183
150
|
top: auto;
|
|
184
|
-
|
|
185
|
-
transform: translateY(50%);
|
|
151
|
+
transform: translateY(50%);
|
|
186
152
|
}
|
|
187
153
|
.t-slider--vertical .t-slider__mark {
|
|
188
154
|
top: 0;
|
|
@@ -197,8 +163,7 @@
|
|
|
197
163
|
background-color: var(--td-bg-color-secondarycomponent);
|
|
198
164
|
}
|
|
199
165
|
.t-slider--vertical .t-slider__mark-text {
|
|
200
|
-
|
|
201
|
-
transform: translateY(-50%);
|
|
166
|
+
transform: translateY(-50%);
|
|
202
167
|
margin-top: 0;
|
|
203
168
|
margin-left: var(--td-comp-margin-xxs);
|
|
204
169
|
}
|
|
@@ -208,23 +173,17 @@
|
|
|
208
173
|
position: absolute;
|
|
209
174
|
z-index: 2;
|
|
210
175
|
left: 50%;
|
|
211
|
-
|
|
212
|
-
transform: translate(-50%, 50%);
|
|
176
|
+
transform: translate(-50%, 50%);
|
|
213
177
|
background-color: transparent;
|
|
214
178
|
text-align: center;
|
|
215
179
|
-webkit-user-select: none;
|
|
216
180
|
-moz-user-select: none;
|
|
217
|
-
-ms-user-select: none;
|
|
218
181
|
user-select: none;
|
|
219
182
|
line-height: normal;
|
|
220
183
|
outline: none;
|
|
221
184
|
cursor: pointer;
|
|
222
|
-
display: -webkit-box;
|
|
223
|
-
display: -ms-flexbox;
|
|
224
185
|
display: flex;
|
|
225
|
-
-
|
|
226
|
-
-ms-flex-align: center;
|
|
227
|
-
align-items: center;
|
|
186
|
+
align-items: center;
|
|
228
187
|
}
|
|
229
188
|
|
|
230
189
|
.t-is-disabled {
|
package/es/style/index.css
CHANGED
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.t-fake-arrow path {
|
|
25
|
-
-webkit-transition: d 0.2s;
|
|
26
25
|
transition: d 0.2s;
|
|
27
26
|
stroke: currentcolor;
|
|
28
27
|
}
|
|
@@ -32,7 +31,6 @@
|
|
|
32
31
|
|
|
33
32
|
.t-slide-down-enter-active,
|
|
34
33
|
.t-slide-down-leave-active {
|
|
35
|
-
-webkit-transition: height 0.2s cubic-bezier(0.38, 0, 0.24, 1), max-height 0.2s cubic-bezier(0.38, 0, 0.24, 1);
|
|
36
34
|
transition: height 0.2s cubic-bezier(0.38, 0, 0.24, 1), max-height 0.2s cubic-bezier(0.38, 0, 0.24, 1);
|
|
37
35
|
}
|
|
38
36
|
:root,
|
package/es/switch/Switch.js
CHANGED
|
@@ -6,7 +6,7 @@ import classNames from 'classnames';
|
|
|
6
6
|
import { Loading } from '../loading/index.js';
|
|
7
7
|
import { u as useConfig } from '../_chunks/dep-gy8uvBaS.js';
|
|
8
8
|
import { u as useCommonClassName } from '../_chunks/dep-DTlQ2dCA.js';
|
|
9
|
-
import {
|
|
9
|
+
import { p as parseTNode } from '../_chunks/dep-aX8qrQpB.js';
|
|
10
10
|
import { u as useDefaultProps } from '../_chunks/dep-DGvfel3I.js';
|
|
11
11
|
import '../_chunks/dep-D-UKOauR.js';
|
|
12
12
|
import '../loading/Loading.js';
|
package/es/switch/index.js
CHANGED
|
@@ -23,7 +23,7 @@ import '../_chunks/dep-DGvfel3I.js';
|
|
|
23
23
|
import '../_chunks/dep-DbVHGoUC.js';
|
|
24
24
|
import '../loading/style/css.js';
|
|
25
25
|
import '../_chunks/dep-DTlQ2dCA.js';
|
|
26
|
-
import '../_chunks/dep-
|
|
26
|
+
import '../_chunks/dep-aX8qrQpB.js';
|
|
27
27
|
|
|
28
28
|
var Switch = Switch$1;
|
|
29
29
|
|
|
@@ -1,19 +1,14 @@
|
|
|
1
1
|
.t-switch {
|
|
2
2
|
font: var(--td-font-body-medium);
|
|
3
3
|
color: var(--td-text-color-primary);
|
|
4
|
-
|
|
5
|
-
box-sizing: border-box;
|
|
4
|
+
box-sizing: border-box;
|
|
6
5
|
margin: 0;
|
|
7
6
|
padding: 0;
|
|
8
7
|
list-style: none;
|
|
9
8
|
position: relative;
|
|
10
|
-
display: -webkit-inline-box;
|
|
11
|
-
display: -ms-inline-flexbox;
|
|
12
9
|
display: inline-flex;
|
|
13
10
|
vertical-align: middle;
|
|
14
|
-
-
|
|
15
|
-
-ms-flex-align: center;
|
|
16
|
-
align-items: center;
|
|
11
|
+
align-items: center;
|
|
17
12
|
outline: none;
|
|
18
13
|
border: 0;
|
|
19
14
|
padding: 0;
|
|
@@ -22,13 +17,11 @@
|
|
|
22
17
|
line-height: var(--td-comp-size-xxs);
|
|
23
18
|
border-radius: var(--td-radius-round);
|
|
24
19
|
min-width: calc(var(--td-comp-size-xxs) / 0.618);
|
|
25
|
-
-webkit-transition: all 0.2s cubic-bezier(0.38, 0, 0.24, 1);
|
|
26
20
|
transition: all 0.2s cubic-bezier(0.38, 0, 0.24, 1);
|
|
27
21
|
background-color: var(--td-bg-color-secondarycomponent);
|
|
28
22
|
cursor: pointer;
|
|
29
23
|
-webkit-user-select: none;
|
|
30
24
|
-moz-user-select: none;
|
|
31
|
-
-ms-user-select: none;
|
|
32
25
|
user-select: none;
|
|
33
26
|
}
|
|
34
27
|
.t-switch:hover {
|
|
@@ -36,24 +29,16 @@
|
|
|
36
29
|
}
|
|
37
30
|
.t-switch__handle {
|
|
38
31
|
position: absolute;
|
|
39
|
-
display: -webkit-box;
|
|
40
|
-
display: -ms-flexbox;
|
|
41
32
|
display: flex;
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
align-items: center;
|
|
45
|
-
-webkit-box-pack: center;
|
|
46
|
-
-ms-flex-pack: center;
|
|
47
|
-
justify-content: center;
|
|
33
|
+
align-items: center;
|
|
34
|
+
justify-content: center;
|
|
48
35
|
top: 4px;
|
|
49
36
|
left: 4px;
|
|
50
37
|
width: calc(var(--td-comp-size-xxs) - 8px);
|
|
51
38
|
height: calc(var(--td-comp-size-xxs) - 8px);
|
|
52
39
|
border-radius: var(--td-radius-round);
|
|
53
|
-
-webkit-transition: all 0.2s cubic-bezier(0.38, 0, 0.24, 1);
|
|
54
40
|
transition: all 0.2s cubic-bezier(0.38, 0, 0.24, 1);
|
|
55
|
-
|
|
56
|
-
box-shadow: var(--td-shadow-1);
|
|
41
|
+
box-shadow: var(--td-shadow-1);
|
|
57
42
|
}
|
|
58
43
|
.t-switch__handle .t-icon {
|
|
59
44
|
font-size: calc(var(--td-comp-size-xxs) - 4px);
|
|
@@ -68,7 +53,6 @@
|
|
|
68
53
|
bottom: 0;
|
|
69
54
|
border-radius: var(--td-radius-round);
|
|
70
55
|
background-color: #fff;
|
|
71
|
-
-webkit-transition: all 0.2s cubic-bezier(0.38, 0, 0.24, 1);
|
|
72
56
|
transition: all 0.2s cubic-bezier(0.38, 0, 0.24, 1);
|
|
73
57
|
}
|
|
74
58
|
.t-switch:active:not(.t-is-disabled):not(.t-is-loading) .t-switch__handle::before {
|
|
@@ -83,19 +67,13 @@
|
|
|
83
67
|
opacity: 0;
|
|
84
68
|
}
|
|
85
69
|
.t-switch__content {
|
|
86
|
-
|
|
87
|
-
box-sizing: border-box;
|
|
88
|
-
display: -webkit-inline-box;
|
|
89
|
-
display: -ms-inline-flexbox;
|
|
70
|
+
box-sizing: border-box;
|
|
90
71
|
display: inline-flex;
|
|
91
|
-
-
|
|
92
|
-
-ms-flex-align: center;
|
|
93
|
-
align-items: center;
|
|
72
|
+
align-items: center;
|
|
94
73
|
color: var(--td-text-color-anti);
|
|
95
74
|
padding: 0 var(--td-comp-margin-xs) 0 calc(var(--td-comp-size-xxs) / 0.618 / 2 + 2px);
|
|
96
75
|
font-size: var(--td-font-size-body-small);
|
|
97
76
|
min-width: calc(var(--td-comp-size-xxs) / 0.618);
|
|
98
|
-
-webkit-transition: padding 0.2s cubic-bezier(0.38, 0, 0.24, 1), opacity 0.2s linear;
|
|
99
77
|
transition: padding 0.2s cubic-bezier(0.38, 0, 0.24, 1), opacity 0.2s linear;
|
|
100
78
|
}
|
|
101
79
|
.t-switch__content .t-icon {
|
|
@@ -109,8 +87,7 @@
|
|
|
109
87
|
}
|
|
110
88
|
.t-switch.t-is-checked .t-switch__handle {
|
|
111
89
|
left: calc(100% - 2.5px);
|
|
112
|
-
|
|
113
|
-
transform: translate(-100%, 0);
|
|
90
|
+
transform: translate(-100%, 0);
|
|
114
91
|
width: calc(var(--td-comp-size-xxs) - 5px);
|
|
115
92
|
height: calc(var(--td-comp-size-xxs) - 5px);
|
|
116
93
|
top: 2.5px;
|
|
@@ -124,8 +101,6 @@
|
|
|
124
101
|
background-color: var(--td-bg-color-component-disabled);
|
|
125
102
|
}
|
|
126
103
|
.t-switch.t-is-loading .t-loading {
|
|
127
|
-
display: -webkit-inline-box;
|
|
128
|
-
display: -ms-inline-flexbox;
|
|
129
104
|
display: inline-flex;
|
|
130
105
|
}
|
|
131
106
|
.t-switch.t-is-loading .t-switch__handle .t-icon {
|
|
@@ -142,15 +117,13 @@
|
|
|
142
117
|
background-color: var(--td-bg-color-component-disabled);
|
|
143
118
|
}
|
|
144
119
|
.t-switch.t-is-disabled .t-switch__handle {
|
|
145
|
-
|
|
146
|
-
box-shadow: none;
|
|
120
|
+
box-shadow: none;
|
|
147
121
|
}
|
|
148
122
|
.t-switch.t-is-disabled.t-is-checked {
|
|
149
123
|
background-color: var(--td-brand-color-disabled);
|
|
150
124
|
}
|
|
151
125
|
.t-switch.t-is-disabled.t-is-checked .t-switch__handle {
|
|
152
|
-
|
|
153
|
-
box-shadow: none;
|
|
126
|
+
box-shadow: none;
|
|
154
127
|
}
|
|
155
128
|
.t-switch.t-is-disabled.t-is-checked .t-switch__handle .t-icon {
|
|
156
129
|
color: var(--td-brand-color-disabled);
|
package/es/tab/style/index.css
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
.t-tabs {
|
|
2
2
|
font: var(--td-font-body-medium);
|
|
3
3
|
color: var(--td-text-color-primary);
|
|
4
|
-
|
|
5
|
-
box-sizing: border-box;
|
|
4
|
+
box-sizing: border-box;
|
|
6
5
|
margin: 0;
|
|
7
6
|
padding: 0;
|
|
8
7
|
list-style: none;
|
|
@@ -23,7 +22,6 @@
|
|
|
23
22
|
overflow: hidden;
|
|
24
23
|
-webkit-user-select: none;
|
|
25
24
|
-moz-user-select: none;
|
|
26
|
-
-ms-user-select: none;
|
|
27
25
|
user-select: none;
|
|
28
26
|
}
|
|
29
27
|
.t-tabs__nav-container {
|
|
@@ -37,36 +35,25 @@
|
|
|
37
35
|
background-color: transparent;
|
|
38
36
|
}
|
|
39
37
|
.t-tabs__nav-item {
|
|
40
|
-
display: -webkit-inline-box;
|
|
41
|
-
display: -ms-inline-flexbox;
|
|
42
38
|
display: inline-flex;
|
|
43
|
-
-
|
|
44
|
-
-ms-flex-align: center;
|
|
45
|
-
align-items: center;
|
|
39
|
+
align-items: center;
|
|
46
40
|
font: var(--td-font-body-medium);
|
|
47
41
|
color: var(--td-text-color-secondary);
|
|
48
42
|
position: relative;
|
|
49
43
|
overflow: hidden;
|
|
50
44
|
z-index: 0;
|
|
51
45
|
cursor: pointer;
|
|
52
|
-
|
|
53
|
-
flex-shrink: 0;
|
|
54
|
-
-webkit-transition: background-color cubic-bezier(0.38, 0, 0.24, 1) 0.2s;
|
|
46
|
+
flex-shrink: 0;
|
|
55
47
|
transition: background-color cubic-bezier(0.38, 0, 0.24, 1) 0.2s;
|
|
56
48
|
}
|
|
57
49
|
.t-tabs__nav-item-wrapper {
|
|
58
|
-
display: -webkit-box;
|
|
59
|
-
display: -ms-flexbox;
|
|
60
50
|
display: flex;
|
|
61
|
-
-
|
|
62
|
-
-ms-flex-align: center;
|
|
63
|
-
align-items: center;
|
|
51
|
+
align-items: center;
|
|
64
52
|
height: var(--td-comp-size-m);
|
|
65
53
|
padding: 0 var(--td-comp-paddingLR-s);
|
|
66
54
|
margin-left: var(--td-comp-margin-s);
|
|
67
55
|
margin-right: var(--td-comp-margin-s);
|
|
68
56
|
border-radius: var(--td-radius-default);
|
|
69
|
-
-webkit-transition: background-color cubic-bezier(0.38, 0, 0.24, 1) 0.2s;
|
|
70
57
|
transition: background-color cubic-bezier(0.38, 0, 0.24, 1) 0.2s;
|
|
71
58
|
--ripple-color: $bg-color-container-active;
|
|
72
59
|
}
|
|
@@ -79,23 +66,15 @@
|
|
|
79
66
|
}
|
|
80
67
|
.t-tabs__nav-item-text-wrapper {
|
|
81
68
|
position: relative;
|
|
82
|
-
display: -webkit-box;
|
|
83
|
-
display: -ms-flexbox;
|
|
84
69
|
display: flex;
|
|
85
|
-
-
|
|
86
|
-
-ms-flex-align: center;
|
|
87
|
-
align-items: center;
|
|
70
|
+
align-items: center;
|
|
88
71
|
}
|
|
89
72
|
.t-tabs__nav-item:not(.t-is-disabled):not(.t-is-active):hover .t-tabs__nav-item-wrapper {
|
|
90
73
|
background-color: var(--td-bg-color-container-hover);
|
|
91
74
|
}
|
|
92
75
|
.t-tabs__nav-item.t-is-left, .t-tabs__nav-item.t-is-right {
|
|
93
|
-
display: -webkit-box;
|
|
94
|
-
display: -ms-flexbox;
|
|
95
76
|
display: flex;
|
|
96
|
-
-
|
|
97
|
-
-ms-flex-align: center;
|
|
98
|
-
align-items: center;
|
|
77
|
+
align-items: center;
|
|
99
78
|
}
|
|
100
79
|
.t-tabs__nav-item.t-size-m {
|
|
101
80
|
height: var(--td-comp-size-xxl);
|
|
@@ -115,10 +94,7 @@
|
|
|
115
94
|
}
|
|
116
95
|
.t-tabs__nav-item > .remove-btn {
|
|
117
96
|
margin-left: var(--td-comp-margin-s);
|
|
118
|
-
-webkit-transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
119
97
|
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
120
|
-
display: -webkit-box;
|
|
121
|
-
display: -ms-flexbox;
|
|
122
98
|
display: flex;
|
|
123
99
|
}
|
|
124
100
|
.t-tabs__content {
|
|
@@ -129,7 +105,6 @@
|
|
|
129
105
|
position: absolute;
|
|
130
106
|
background-color: var(--td-brand-color);
|
|
131
107
|
z-index: 1;
|
|
132
|
-
-webkit-transition: all 0.24s cubic-bezier(0.38, 0, 0.24, 1);
|
|
133
108
|
transition: all 0.24s cubic-bezier(0.38, 0, 0.24, 1);
|
|
134
109
|
border-radius: var(--td-radius-small);
|
|
135
110
|
}
|
package/es/table/TBody.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
import { _ as _slicedToArray } from '../_chunks/dep-CzLhKWCf.js';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { get } from 'lodash-es';
|
|
3
4
|
import { u as useConfig } from '../_chunks/dep-gy8uvBaS.js';
|
|
5
|
+
import { u as useLocaleReceiver } from '../_chunks/dep-CD_4-1Xb.js';
|
|
4
6
|
import TR from './TR.js';
|
|
5
7
|
import '../_chunks/dep-5U9UjDaf.js';
|
|
6
8
|
import '../_chunks/dep-Cwish4GD.js';
|
|
7
9
|
import '../_chunks/dep-D-UKOauR.js';
|
|
8
10
|
import 'dayjs';
|
|
11
|
+
import '../config-provider/index.js';
|
|
12
|
+
import '../config-provider/ConfigProvider.js';
|
|
9
13
|
import 'classnames';
|
|
10
14
|
import './Cell.js';
|
|
11
15
|
|
|
@@ -21,6 +25,11 @@ var TBody = function TBody(props) {
|
|
|
21
25
|
onCellClick = props.onCellClick;
|
|
22
26
|
var _useConfig = useConfig(),
|
|
23
27
|
classPrefix = _useConfig.classPrefix;
|
|
28
|
+
var _useLocaleReceiver = useLocaleReceiver("table"),
|
|
29
|
+
_useLocaleReceiver2 = _slicedToArray(_useLocaleReceiver, 2),
|
|
30
|
+
local = _useLocaleReceiver2[0],
|
|
31
|
+
t = _useLocaleReceiver2[1];
|
|
32
|
+
var emptyText = typeof local.empty === "string" ? t(local.empty) : local.empty;
|
|
24
33
|
var renderEmpty = function renderEmpty() {
|
|
25
34
|
if (empty !== void 0) {
|
|
26
35
|
return /* @__PURE__ */React.createElement("tr", {
|
|
@@ -37,7 +46,7 @@ var TBody = function TBody(props) {
|
|
|
37
46
|
colSpan: columns.length
|
|
38
47
|
}, /* @__PURE__ */React.createElement("div", {
|
|
39
48
|
className: "".concat(classPrefix, "-table__empty")
|
|
40
|
-
},
|
|
49
|
+
}, emptyText)));
|
|
41
50
|
};
|
|
42
51
|
if (!data || data.length === 0) {
|
|
43
52
|
return /* @__PURE__ */React.createElement("tbody", {
|
package/es/table/TBody.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TBody.js","sources":["../../../components/table/TBody.tsx"],"sourcesContent":["import React from \"react\";\nimport { get } from \"lodash-es\";\nimport useConfig from \"../hooks/useConfig\";\nimport { TableRowData, BaseTableCol, BaseTableCellParams } from \"./type\";\nimport TR from \"./TR\";\n\nexport interface TBodyProps<T extends TableRowData = TableRowData> {\n data: T[];\n columns: BaseTableCol<T>[];\n rowKey: string;\n rowClassName?: string | ((params: { row: T; rowIndex: number }) => string);\n rowAttributes?: Record<string, unknown> | ((params: { row: T; rowIndex: number }) => Record<string, unknown>);\n cellEmptyContent?: React.ReactNode | ((params: BaseTableCellParams<T>) => React.ReactNode);\n empty?: React.ReactNode;\n onRowClick?: (params: { row: T; rowIndex: number; e: React.MouseEvent<HTMLTableRowElement> }) => void;\n onCellClick?: (params: BaseTableCellParams<T>) => void;\n}\n\nconst TBody = <T extends TableRowData = TableRowData>(props: TBodyProps<T>) => {\n const { data, columns, rowKey, rowClassName, rowAttributes, cellEmptyContent, empty, onRowClick, onCellClick } =\n props;\n const { classPrefix } = useConfig();\n\n // 空数据渲染\n const renderEmpty = () => {\n if (empty !== undefined) {\n return (\n <tr className={`${classPrefix}-table__empty-row`}>\n <td colSpan={columns.length}>\n <div className={`${classPrefix}-table__empty`}>{empty}</div>\n </td>\n </tr>\n );\n }\n return (\n <tr className={`${classPrefix}-table__empty-row`}>\n <td colSpan={columns.length}>\n <div className={`${classPrefix}-table__empty`}
|
|
1
|
+
{"version":3,"file":"TBody.js","sources":["../../../components/table/TBody.tsx"],"sourcesContent":["import React from \"react\";\nimport { get } from \"lodash-es\";\nimport useConfig from \"../hooks/useConfig\";\nimport { useLocaleReceiver } from \"../locale/LocalReceiver\";\nimport { TableRowData, BaseTableCol, BaseTableCellParams } from \"./type\";\nimport TR from \"./TR\";\n\nexport interface TBodyProps<T extends TableRowData = TableRowData> {\n data: T[];\n columns: BaseTableCol<T>[];\n rowKey: string;\n rowClassName?: string | ((params: { row: T; rowIndex: number }) => string);\n rowAttributes?: Record<string, unknown> | ((params: { row: T; rowIndex: number }) => Record<string, unknown>);\n cellEmptyContent?: React.ReactNode | ((params: BaseTableCellParams<T>) => React.ReactNode);\n empty?: React.ReactNode;\n onRowClick?: (params: { row: T; rowIndex: number; e: React.MouseEvent<HTMLTableRowElement> }) => void;\n onCellClick?: (params: BaseTableCellParams<T>) => void;\n}\n\nconst TBody = <T extends TableRowData = TableRowData>(props: TBodyProps<T>) => {\n const { data, columns, rowKey, rowClassName, rowAttributes, cellEmptyContent, empty, onRowClick, onCellClick } =\n props;\n const { classPrefix } = useConfig();\n const [local, t] = useLocaleReceiver(\"table\");\n const emptyText = typeof local.empty === \"string\" ? t(local.empty) : local.empty;\n\n // 空数据渲染\n const renderEmpty = () => {\n if (empty !== undefined) {\n return (\n <tr className={`${classPrefix}-table__empty-row`}>\n <td colSpan={columns.length}>\n <div className={`${classPrefix}-table__empty`}>{empty}</div>\n </td>\n </tr>\n );\n }\n return (\n <tr className={`${classPrefix}-table__empty-row`}>\n <td colSpan={columns.length}>\n <div className={`${classPrefix}-table__empty`}>{emptyText}</div>\n </td>\n </tr>\n );\n };\n\n // 如果没有数据,显示空状态\n if (!data || data.length === 0) {\n return <tbody className={`${classPrefix}-table__body`}>{renderEmpty()}</tbody>;\n }\n\n // 渲染数据行\n const rows = data.map((row, rowIndex) => {\n const rowKeyValue = get(row, rowKey);\n const key = typeof rowKeyValue === \"string\" || typeof rowKeyValue === \"number\" ? rowKeyValue : rowIndex;\n return (\n <TR\n key={key}\n row={row}\n rowIndex={rowIndex}\n columns={columns}\n rowKey={rowKey}\n rowClassName={rowClassName}\n rowAttributes={rowAttributes}\n cellEmptyContent={cellEmptyContent}\n onRowClick={onRowClick}\n onCellClick={onCellClick}\n />\n );\n });\n\n return <tbody className={`${classPrefix}-table__body`}>{rows}</tbody>;\n};\n\nTBody.displayName = \"TBody\";\n\nexport default TBody;\n"],"names":["TBody","props","data","columns","rowKey","rowClassName","rowAttributes","cellEmptyContent","empty","onRowClick","onCellClick","_useConfig","useConfig","classPrefix","_useLocaleReceiver","useLocaleReceiver","_useLocaleReceiver2","_slicedToArray","local","t","emptyText","renderEmpty","className","concat","colSpan","length","React","createElement","rows","map","row","rowIndex","rowKeyValue","get","key","TR","displayName"],"mappings":";;;;;;;;;;;;;;;AAmBA,IAAMA,KAAA,GAAQ,SAARA,KAAAA,CAAgDC,KAAA,EAAyB;AAC7E,EAAA,IAAQC,IAAA,GACND,KAAA,CADMC,IAAA;IAAMC,OAAA,GACZF,KAAA,CADYE,OAAA;IAASC,MAAA,GACrBH,KAAA,CADqBG,MAAA;IAAQC,YAAA,GAC7BJ,KAAA,CAD6BI,YAAA;IAAcC,gBAC3CL,KAAA,CAD2CK;IAAeC,gBAAA,GAC1DN,KAAA,CAD0DM,gBAAA;IAAkBC,KAAA,GAC5EP,KAAA,CAD4EO,KAAA;IAAOC,UAAA,GACnFR,KAAA,CADmFQ,UAAA;IAAYC,WAAA,GAC/FT,KAAA,CAD+FS,WAAA;AAEjG,EAAA,IAAAC,UAAA,GAAwBC,SAAA,EAAU;IAA1BC,WAAA,GAAAF,UAAA,CAAAE,WAAA;AACR,EAAA,IAAAC,kBAAA,GAAmBC,kBAAkB,OAAO,CAAA;IAAAC,mBAAA,GAAAC,cAAA,CAAAH,kBAAA,EAAA,CAAA,CAAA;AAArCI,IAAAA,KAAA,GAAAF,mBAAA,CAAA,CAAA,CAAA;AAAOG,IAAAA,CAAC,GAAAH,mBAAA,CAAA,CAAA,CAAA;AACf,EAAA,IAAMI,SAAA,GAAY,OAAOF,KAAA,CAAMV,KAAA,KAAU,WAAWW,CAAA,CAAED,KAAA,CAAMV,KAAK,CAAA,GAAIU,KAAA,CAAMV,KAAA;AAG3E,EAAA,IAAMa,cAAc,SAAdA,cAAoB;AACxB,IAAA,IAAIb,UAAU,KAAA,CAAA,EAAW;AACvB,MAAA,0CACG,IAAA,EAAA;QAAGc,SAAA,EAAA,EAAA,CAAAC,MAAA,CAAcV,WAAW,EAAA,mBAAA;AAAA,OAAA,qCAC1B,IAAA,EAAA;QAAGW,OAAA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,MAAAA,aAAA,EAAAA,aAAA;AACAC,MAAAA,gBAAA,EAAAA,gBAAA;AACAE,MAAAA,UAAA,EAAAA,UAAA;AACAC,MAAAA,WAAA,EAAAA;AAAA,KACF,CAAA;AAEJ,EAAA,CAAC,CAAA;AAED,EAAA,0CAAQ,OAAA,EAAA;IAAMY,SAAA,EAAA,EAAA,CAAAC,MAAA,CAAcV,WAAW,EAAA,cAAA;KAAiBe,IAAK,CAAA;AAC/D;AAEA5B,KAAA,CAAMoC,WAAA,GAAc,OAAA;;;;"}
|
package/es/table/Table.js
CHANGED
|
@@ -11,6 +11,10 @@ import '../_chunks/dep-5U9UjDaf.js';
|
|
|
11
11
|
import 'dayjs';
|
|
12
12
|
import 'classnames';
|
|
13
13
|
import 'lodash-es';
|
|
14
|
+
import '../_chunks/dep-CzLhKWCf.js';
|
|
15
|
+
import '../_chunks/dep-CD_4-1Xb.js';
|
|
16
|
+
import '../config-provider/index.js';
|
|
17
|
+
import '../config-provider/ConfigProvider.js';
|
|
14
18
|
import './TR.js';
|
|
15
19
|
import './Cell.js';
|
|
16
20
|
|
package/es/table/Table.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","sources":["../../../components/table/defaultProps.ts","../../../components/table/Table.tsx"],"sourcesContent":["import { BaseTableProps } from \"./type\";\n\nexport const tableDefaultProps: BaseTableProps = {\n columns: [],\n data: [],\n rowKey: \"id\",\n showHeader: true,\n bordered: false,\n stripe: false,\n hover: false,\n size: \"medium\",\n tableLayout: \"fixed\",\n verticalAlign: \"middle\"\n};\n","import React, { forwardRef } from \"react\";\nimport useConfig from \"../hooks/useConfig\";\nimport useDefaultProps from \"../hooks/useDefaultProps\";\nimport { BaseTableProps, TableRowData } from \"./type\";\nimport { tableDefaultProps } from \"./defaultProps\";\nimport { useTableStyle, formatCSSUnit } from \"./hooks\";\nimport THead from \"./THead\";\nimport TBody from \"./TBody\";\n\nexport interface TableProps<T extends TableRowData = TableRowData>\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onClick\">,\n BaseTableProps<T> {}\n\nconst TableComponent = forwardRef<HTMLDivElement, TableProps<TableRowData>>((originalProps, ref) => {\n const props = useDefaultProps<TableProps<TableRowData>>(originalProps, tableDefaultProps);\n const {\n columns = [],\n data = [],\n rowKey = \"id\",\n showHeader = true,\n empty,\n cellEmptyContent,\n rowClassName,\n rowAttributes,\n onRowClick,\n onCellClick,\n ...restProps\n } = props;\n\n const { classPrefix } = useConfig();\n const { tableClasses, tableContentStyles, tableElementStyles } = useTableStyle(props);\n\n return (\n <div ref={ref} className={tableClasses} style={tableElementStyles} {...restProps}>\n <div className={`${classPrefix}-table__content`} style={tableContentStyles}>\n <table className={`${classPrefix}-table__table`} style={{ tableLayout: props.tableLayout || \"fixed\" }}>\n <colgroup>\n {columns.map((col, index) => {\n const colStyle: React.CSSProperties = {};\n if (col.width) {\n colStyle.width = formatCSSUnit(col.width);\n }\n if (col.minWidth) {\n colStyle.minWidth = formatCSSUnit(col.minWidth);\n }\n return <col key={col.colKey || index} style={colStyle} />;\n })}\n </colgroup>\n {showHeader && <THead columns={columns} />}\n <TBody\n data={data}\n columns={columns}\n rowKey={rowKey}\n rowClassName={rowClassName}\n rowAttributes={rowAttributes}\n cellEmptyContent={cellEmptyContent}\n empty={empty}\n onRowClick={onRowClick}\n onCellClick={onCellClick}\n />\n </table>\n </div>\n </div>\n );\n});\n\nTableComponent.displayName = \"Table\";\n\nconst Table = TableComponent as <T extends TableRowData = TableRowData>(\n props: TableProps<T> & React.RefAttributes<HTMLDivElement>\n) => React.ReactElement;\n\nexport default Table;\n"],"names":["tableDefaultProps","columns","data","rowKey","showHeader","bordered","stripe","hover","size","tableLayout","verticalAlign","TableComponent","forwardRef","originalProps","ref","props","useDefaultProps","_props$columns","_props$data","_props$rowKey","_props$showHeader","empty","cellEmptyContent","rowClassName","rowAttributes","onRowClick","onCellClick","restProps","_objectWithoutProperties","_excluded","_useConfig","useConfig","classPrefix","_useTableStyle","useTableStyle","tableClasses","tableContentStyles","tableElementStyles","_objectSpread","className","style","React","createElement","concat","map","col","index","colStyle","width","formatCSSUnit","minWidth","key","colKey","THead","TBody","displayName","Table"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Table.js","sources":["../../../components/table/defaultProps.ts","../../../components/table/Table.tsx"],"sourcesContent":["import { BaseTableProps } from \"./type\";\n\nexport const tableDefaultProps: BaseTableProps = {\n columns: [],\n data: [],\n rowKey: \"id\",\n showHeader: true,\n bordered: false,\n stripe: false,\n hover: false,\n size: \"medium\",\n tableLayout: \"fixed\",\n verticalAlign: \"middle\"\n};\n","import React, { forwardRef } from \"react\";\nimport useConfig from \"../hooks/useConfig\";\nimport useDefaultProps from \"../hooks/useDefaultProps\";\nimport { BaseTableProps, TableRowData } from \"./type\";\nimport { tableDefaultProps } from \"./defaultProps\";\nimport { useTableStyle, formatCSSUnit } from \"./hooks\";\nimport THead from \"./THead\";\nimport TBody from \"./TBody\";\n\nexport interface TableProps<T extends TableRowData = TableRowData>\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"onClick\">,\n BaseTableProps<T> {}\n\nconst TableComponent = forwardRef<HTMLDivElement, TableProps<TableRowData>>((originalProps, ref) => {\n const props = useDefaultProps<TableProps<TableRowData>>(originalProps, tableDefaultProps);\n const {\n columns = [],\n data = [],\n rowKey = \"id\",\n showHeader = true,\n empty,\n cellEmptyContent,\n rowClassName,\n rowAttributes,\n onRowClick,\n onCellClick,\n ...restProps\n } = props;\n\n const { classPrefix } = useConfig();\n const { tableClasses, tableContentStyles, tableElementStyles } = useTableStyle(props);\n\n return (\n <div ref={ref} className={tableClasses} style={tableElementStyles} {...restProps}>\n <div className={`${classPrefix}-table__content`} style={tableContentStyles}>\n <table className={`${classPrefix}-table__table`} style={{ tableLayout: props.tableLayout || \"fixed\" }}>\n <colgroup>\n {columns.map((col, index) => {\n const colStyle: React.CSSProperties = {};\n if (col.width) {\n colStyle.width = formatCSSUnit(col.width);\n }\n if (col.minWidth) {\n colStyle.minWidth = formatCSSUnit(col.minWidth);\n }\n return <col key={col.colKey || index} style={colStyle} />;\n })}\n </colgroup>\n {showHeader && <THead columns={columns} />}\n <TBody\n data={data}\n columns={columns}\n rowKey={rowKey}\n rowClassName={rowClassName}\n rowAttributes={rowAttributes}\n cellEmptyContent={cellEmptyContent}\n empty={empty}\n onRowClick={onRowClick}\n onCellClick={onCellClick}\n />\n </table>\n </div>\n </div>\n );\n});\n\nTableComponent.displayName = \"Table\";\n\nconst Table = TableComponent as <T extends TableRowData = TableRowData>(\n props: TableProps<T> & React.RefAttributes<HTMLDivElement>\n) => React.ReactElement;\n\nexport default Table;\n"],"names":["tableDefaultProps","columns","data","rowKey","showHeader","bordered","stripe","hover","size","tableLayout","verticalAlign","TableComponent","forwardRef","originalProps","ref","props","useDefaultProps","_props$columns","_props$data","_props$rowKey","_props$showHeader","empty","cellEmptyContent","rowClassName","rowAttributes","onRowClick","onCellClick","restProps","_objectWithoutProperties","_excluded","_useConfig","useConfig","classPrefix","_useTableStyle","useTableStyle","tableClasses","tableContentStyles","tableElementStyles","_objectSpread","className","style","React","createElement","concat","map","col","index","colStyle","width","formatCSSUnit","minWidth","key","colKey","THead","TBody","displayName","Table"],"mappings":";;;;;;;;;;;;;;;;;;;;AAEO,IAAMA,iBAAA,GAAoC;AAC/CC,EAAAA,SAAS,EAAC;AACVC,EAAAA,MAAM,EAAC;AACPC,EAAAA,MAAA,EAAQ,IAAA;AACRC,EAAAA,UAAA,EAAY,IAAA;AACZC,EAAAA,QAAA,EAAU,KAAA;AACVC,EAAAA,MAAA,EAAQ,KAAA;AACRC,EAAAA,KAAA,EAAO,KAAA;AACPC,EAAAA,IAAA,EAAM,QAAA;AACNC,EAAAA,WAAA,EAAa,OAAA;AACbC,EAAAA,aAAA,EAAe;AACjB,CAAA;;;;;ACAA,IAAMC,cAAA,gBAAiBC,UAAA,CAAqD,UAACC,aAAA,EAAeC,GAAA,EAAQ;AAClG,EAAA,IAAMC,KAAA,G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,CACF,CACF,CACF,CAAA;AAEJ,CAAC,CAAA;AAEDf,cAAA,CAAe4C,WAAA,GAAc,OAAA;AAE7B,IAAMC,KAAA,GAAQ7C;;;;"}
|
package/es/table/index.js
CHANGED
|
@@ -13,6 +13,10 @@ import 'classnames';
|
|
|
13
13
|
import './THead.js';
|
|
14
14
|
import 'lodash-es';
|
|
15
15
|
import './TBody.js';
|
|
16
|
+
import '../_chunks/dep-CzLhKWCf.js';
|
|
17
|
+
import '../_chunks/dep-CD_4-1Xb.js';
|
|
18
|
+
import '../config-provider/index.js';
|
|
19
|
+
import '../config-provider/ConfigProvider.js';
|
|
16
20
|
import './TR.js';
|
|
17
21
|
import './Cell.js';
|
|
18
22
|
|
package/es/table/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../components/table/index.ts"],"sourcesContent":["import _Table from \"./Table\";\nimport \"./style/index\";\n\nexport type { TableProps } from \"./Table\";\nexport type * from \"./type\";\nexport const Table = _Table;\nexport default Table;\n"],"names":["Table","_Table"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../components/table/index.ts"],"sourcesContent":["import _Table from \"./Table\";\nimport \"./style/index\";\n\nexport type { TableProps } from \"./Table\";\nexport type * from \"./type\";\nexport const Table = _Table;\nexport default Table;\n"],"names":["Table","_Table"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAKO,IAAMA,KAAA,GAAQC;;;;"}
|
package/es/table/style/index.css
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
.t-table {
|
|
2
2
|
font: var(--td-font-body-medium);
|
|
3
3
|
color: var(--td-text-color-primary);
|
|
4
|
-
|
|
5
|
-
box-sizing: border-box;
|
|
4
|
+
box-sizing: border-box;
|
|
6
5
|
margin: 0;
|
|
7
6
|
padding: 0;
|
|
8
7
|
list-style: none;
|
|
@@ -37,8 +36,7 @@
|
|
|
37
36
|
font-weight: normal;
|
|
38
37
|
overflow-wrap: break-word;
|
|
39
38
|
background-color: inherit;
|
|
40
|
-
|
|
41
|
-
box-sizing: border-box;
|
|
39
|
+
box-sizing: border-box;
|
|
42
40
|
text-align: left;
|
|
43
41
|
}
|
|
44
42
|
.t-table .t-align-left {
|
|
@@ -66,8 +64,7 @@
|
|
|
66
64
|
.t-table__cell--ellipsis > div {
|
|
67
65
|
width: 100%;
|
|
68
66
|
max-width: 100%;
|
|
69
|
-
|
|
70
|
-
box-sizing: border-box;
|
|
67
|
+
box-sizing: border-box;
|
|
71
68
|
}
|
|
72
69
|
.t-table--bordered td,
|
|
73
70
|
.t-table--bordered th {
|
|
@@ -85,7 +82,6 @@
|
|
|
85
82
|
background-color: var(--td-bg-color-secondarycontainer);
|
|
86
83
|
}
|
|
87
84
|
.t-table--hover tbody tr {
|
|
88
|
-
-webkit-transition: background-color 0.2s linear;
|
|
89
85
|
transition: background-color 0.2s linear;
|
|
90
86
|
}
|
|
91
87
|
.t-table--hover tbody tr:hover {
|
|
@@ -125,15 +121,9 @@
|
|
|
125
121
|
border: 0;
|
|
126
122
|
}
|
|
127
123
|
.t-table__empty {
|
|
128
|
-
display: -webkit-box;
|
|
129
|
-
display: -ms-flexbox;
|
|
130
124
|
display: flex;
|
|
131
|
-
-
|
|
132
|
-
|
|
133
|
-
align-items: center;
|
|
134
|
-
-webkit-box-pack: center;
|
|
135
|
-
-ms-flex-pack: center;
|
|
136
|
-
justify-content: center;
|
|
125
|
+
align-items: center;
|
|
126
|
+
justify-content: center;
|
|
137
127
|
min-height: 120px;
|
|
138
128
|
color: var(--td-text-color-disabled);
|
|
139
129
|
}
|