@hsu-react/ui 0.0.1 → 0.0.3
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/README.md +2 -0
- package/es/components/ChainGraph/_components/SearchSelect/index.js +13 -10
- package/es/components/ChainGraph/_components/SearchSelect/index.module.less +8 -2
- package/es/components/ChainGraph/index.module.less +1 -1
- package/es/components/Chat/ChatInput/_components/SendButton/index.module.less +1 -1
- package/es/components/Chat/ChatInput/_components/UploadButton/index.module.less +1 -1
- package/es/components/Chat/ChatInput/index.module.less +2 -2
- package/es/components/Chat/ChatList/_components/Assistant/AssistantItem/index.module.less +1 -1
- package/es/components/Checkbox/CheckboxGroup/index.module.less +16 -16
- package/es/components/Checkbox/index.module.less +13 -13
- package/es/components/CodeMirror/index.module.less +4 -4
- package/es/components/DatePicker/RangePicker/index.module.less +1 -1
- package/es/components/DatePicker/StepPicker/index.module.less +1 -1
- package/es/components/DatePicker/index.module.less +2 -1
- package/es/components/Form/DrawerForm/index.module.less +2 -2
- package/es/components/FormItem/FormInput/FormPasswordStrength/index.js +2 -2
- package/es/components/FormItem/FormInput/FormPasswordStrength/index.module.less +12 -0
- package/es/components/FormItem/FormRadio/index.module.less +9 -9
- package/es/components/FormItem/FormSegmented/index.module.less +2 -2
- package/es/components/FormItem/FormUpload/index.module.less +4 -4
- package/es/components/FormItem/ItemContainer/index.module.less +22 -22
- package/es/components/Icon/index.js +9 -24
- package/es/components/Input/Number/index.module.less +9 -9
- package/es/components/Input/Password/index.module.less +3 -3
- package/es/components/Input/Range/index.module.less +4 -4
- package/es/components/Input/Search/index.module.less +5 -5
- package/es/components/Input/TextArea/index.module.less +5 -5
- package/es/components/Input/index.module.less +7 -4
- package/es/components/Modal/index.module.less +2 -2
- package/es/components/Operate/index.module.less +2 -2
- package/es/components/Panel/IframePanel/index.module.less +1 -1
- package/es/components/Panel/ListPanel/_components/ColumnMgt/index.module.less +1 -1
- package/es/components/Search/index.module.less +2 -2
- package/es/components/Select/AutoCompleteSelect/index.module.less +35 -35
- package/es/components/Select/IconSelect/index.module.less +3 -3
- package/es/components/Select/TreeSelect/index.module.less +17 -17
- package/es/components/Select/_utils/getElementPosition.d.ts +6 -2
- package/es/components/Select/_utils/getElementPosition.js +8 -6
- package/es/components/Select/index.module.less +37 -34
- package/es/components/Slider/index.module.less +5 -4
- package/es/components/Spreadsheet/index.module.less +4 -4
- package/es/components/Switch/index.js +12 -8
- package/es/components/Switch/index.module.less +7 -0
- package/es/components/Table/_components/Pagination/index.module.less +23 -23
- package/es/components/Table/index.module.less +61 -61
- package/es/components/Tree/index.module.less +11 -11
- package/es/components/Upload/index.module.less +3 -3
- package/es/styles/antd-overload.less +1 -1
- package/lib/components/ChainGraph/_components/SearchSelect/index.js +10 -7
- package/lib/components/ChainGraph/_components/SearchSelect/index.module.less +8 -2
- package/lib/components/ChainGraph/index.module.less +1 -1
- package/lib/components/Chat/ChatInput/_components/SendButton/index.module.less +1 -1
- package/lib/components/Chat/ChatInput/_components/UploadButton/index.module.less +1 -1
- package/lib/components/Chat/ChatInput/index.module.less +2 -2
- package/lib/components/Chat/ChatList/_components/Assistant/AssistantItem/index.module.less +1 -1
- package/lib/components/Checkbox/CheckboxGroup/index.module.less +16 -16
- package/lib/components/Checkbox/index.module.less +13 -13
- package/lib/components/CodeMirror/index.module.less +4 -4
- package/lib/components/DatePicker/RangePicker/index.module.less +1 -1
- package/lib/components/DatePicker/StepPicker/index.module.less +1 -1
- package/lib/components/DatePicker/index.module.less +2 -1
- package/lib/components/Form/DrawerForm/index.module.less +2 -2
- package/lib/components/FormItem/FormInput/FormPasswordStrength/index.js +2 -1
- package/lib/components/FormItem/FormInput/FormPasswordStrength/index.module.less +12 -0
- package/lib/components/FormItem/FormRadio/index.module.less +9 -9
- package/lib/components/FormItem/FormSegmented/index.module.less +2 -2
- package/lib/components/FormItem/FormUpload/index.module.less +4 -4
- package/lib/components/FormItem/ItemContainer/index.module.less +22 -22
- package/lib/components/Icon/index.js +9 -27
- package/lib/components/Input/Number/index.module.less +9 -9
- package/lib/components/Input/Password/index.module.less +3 -3
- package/lib/components/Input/Range/index.module.less +4 -4
- package/lib/components/Input/Search/index.module.less +5 -5
- package/lib/components/Input/TextArea/index.module.less +5 -5
- package/lib/components/Input/index.module.less +7 -4
- package/lib/components/Modal/index.module.less +2 -2
- package/lib/components/Operate/index.module.less +2 -2
- package/lib/components/Panel/IframePanel/index.module.less +1 -1
- package/lib/components/Panel/ListPanel/_components/ColumnMgt/index.module.less +1 -1
- package/lib/components/Search/index.module.less +2 -2
- package/lib/components/Select/AutoCompleteSelect/index.module.less +35 -35
- package/lib/components/Select/IconSelect/index.module.less +3 -3
- package/lib/components/Select/TreeSelect/index.module.less +17 -17
- package/lib/components/Select/_utils/getElementPosition.d.ts +6 -2
- package/lib/components/Select/_utils/getElementPosition.js +8 -6
- package/lib/components/Select/index.module.less +37 -34
- package/lib/components/Slider/index.module.less +5 -4
- package/lib/components/Spreadsheet/index.module.less +4 -4
- package/lib/components/Switch/index.js +8 -4
- package/lib/components/Switch/index.module.less +7 -0
- package/lib/components/Table/_components/Pagination/index.module.less +23 -23
- package/lib/components/Table/index.module.less +61 -61
- package/lib/components/Tree/index.module.less +11 -11
- package/lib/components/Upload/index.module.less +3 -3
- package/lib/styles/antd-overload.less +1 -1
- package/package.json +1 -1
- package/src/components/Button/index.md +20 -4
- package/src/components/ChainGraph/_components/SearchSelect/index.module.less +8 -2
- package/src/components/ChainGraph/_components/SearchSelect/index.tsx +18 -16
- package/src/components/ChainGraph/index.md +67 -1
- package/src/components/ChainGraph/index.module.less +1 -1
- package/src/components/Chart/index.md +351 -1
- package/src/components/Chat/ChatInput/_components/SendButton/index.module.less +1 -1
- package/src/components/Chat/ChatInput/_components/UploadButton/index.module.less +1 -1
- package/src/components/Chat/ChatInput/index.module.less +2 -2
- package/src/components/Chat/ChatList/_components/Assistant/AssistantItem/index.module.less +1 -1
- package/src/components/Chat/index.md +140 -1
- package/src/components/Checkbox/CheckboxGroup/index.module.less +16 -16
- package/src/components/Checkbox/index.md +85 -1
- package/src/components/Checkbox/index.module.less +13 -13
- package/src/components/CodeMirror/index.md +41 -1
- package/src/components/CodeMirror/index.module.less +4 -4
- package/src/components/Copy/index.md +1 -1
- package/src/components/DatePicker/RangePicker/index.module.less +1 -1
- package/src/components/DatePicker/StepPicker/index.module.less +1 -1
- package/src/components/DatePicker/index.md +82 -1
- package/src/components/DatePicker/index.module.less +2 -1
- package/src/components/Descriptions/index.md +45 -1
- package/src/components/Editor/index.md +40 -1
- package/src/components/FileCol/index.md +24 -1
- package/src/components/FilePreview/index.md +45 -1
- package/src/components/FlexFill/index.md +46 -1
- package/src/components/Form/DrawerForm/index.module.less +2 -2
- package/src/components/Form/index.md +179 -1
- package/src/components/FormItem/FormInput/FormPasswordStrength/index.module.less +12 -0
- package/src/components/FormItem/FormInput/FormPasswordStrength/index.tsx +2 -2
- package/src/components/FormItem/FormRadio/index.module.less +9 -9
- package/src/components/FormItem/FormSegmented/index.module.less +2 -2
- package/src/components/FormItem/FormUpload/index.module.less +4 -4
- package/src/components/FormItem/ItemContainer/index.module.less +22 -22
- package/src/components/FormItem/index.md +514 -1
- package/src/components/Icon/index.md +24 -4
- package/src/components/Icon/index.tsx +9 -37
- package/src/components/Input/Number/index.module.less +9 -9
- package/src/components/Input/Password/index.module.less +3 -3
- package/src/components/Input/Range/index.module.less +4 -4
- package/src/components/Input/Search/index.module.less +5 -5
- package/src/components/Input/TextArea/index.module.less +5 -5
- package/src/components/Input/index.md +148 -1
- package/src/components/Input/index.module.less +7 -4
- package/src/components/Markdown/index.md +73 -1
- package/src/components/Modal/index.md +43 -1
- package/src/components/Modal/index.module.less +2 -2
- package/src/components/Operate/index.md +43 -1
- package/src/components/Operate/index.module.less +2 -2
- package/src/components/Panel/IframePanel/index.module.less +1 -1
- package/src/components/Panel/ListPanel/_components/ColumnMgt/index.module.less +1 -1
- package/src/components/Panel/index.md +193 -1
- package/src/components/Search/index.md +248 -1
- package/src/components/Search/index.module.less +2 -2
- package/src/components/SecondConf/index.md +39 -1
- package/src/components/Select/AutoCompleteSelect/index.module.less +35 -35
- package/src/components/Select/IconSelect/index.module.less +3 -3
- package/src/components/Select/TreeSelect/index.module.less +17 -17
- package/src/components/Select/_utils/getElementPosition.ts +8 -6
- package/src/components/Select/index.md +47 -1
- package/src/components/Select/index.module.less +37 -34
- package/src/components/Slider/index.md +28 -1
- package/src/components/Slider/index.module.less +5 -4
- package/src/components/Spreadsheet/index.md +42 -1
- package/src/components/Spreadsheet/index.module.less +4 -4
- package/src/components/Switch/index.md +33 -1
- package/src/components/Switch/index.module.less +7 -0
- package/src/components/Switch/index.tsx +14 -11
- package/src/components/TabBar/index.md +70 -1
- package/src/components/Table/_components/Pagination/index.module.less +23 -23
- package/src/components/Table/index.md +60 -1
- package/src/components/Table/index.module.less +61 -61
- package/src/components/Tags/index.md +23 -1
- package/src/components/TextEllipsis/index.md +29 -1
- package/src/components/Tree/index.md +66 -1
- package/src/components/Tree/index.module.less +11 -11
- package/src/components/Upload/index.md +72 -1
- package/src/components/Upload/index.module.less +3 -3
- package/src/styles/antd-overload.less +1 -1
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* 获取元素相对于视口的顶部位置。
|
|
3
|
+
* 下拉框为 position: fixed(相对视口定位),故此处必须返回视口坐标,
|
|
4
|
+
* 不能叠加 document.scrollTop——否则当文档本身可滚动时(如文档站长页面),
|
|
5
|
+
* 下拉框会被定位到 scrollTop 像素之外而“消失”。
|
|
6
|
+
* 在固定布局(document 不滚动,scrollTop=0)下与原行为一致。
|
|
3
7
|
*/
|
|
4
8
|
export function getElementTop(element) {
|
|
5
|
-
|
|
6
|
-
return rect.top + document.documentElement.scrollTop;
|
|
9
|
+
return element.getBoundingClientRect().top;
|
|
7
10
|
}
|
|
8
11
|
|
|
9
12
|
/**
|
|
10
|
-
*
|
|
13
|
+
* 获取元素相对于视口的左侧位置(同上,配合 position: fixed)。
|
|
11
14
|
*/
|
|
12
15
|
export function getElementLeft(element) {
|
|
13
|
-
|
|
14
|
-
return rect.left + document.documentElement.scrollLeft;
|
|
16
|
+
return element.getBoundingClientRect().left;
|
|
15
17
|
}
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
width: 100%;
|
|
8
8
|
height: 100%;
|
|
9
|
+
// 父级未给定高度时(height:100% 解析为 auto),保证最小高度,
|
|
10
|
+
// 与 Input 等录入控件高度一致,避免被压扁或在搜索行中高度异常。
|
|
11
|
+
min-height: 32px;
|
|
9
12
|
padding: 0px 11px;
|
|
10
13
|
|
|
11
14
|
// CF 风格:随外观切换的描边输入控件
|
|
@@ -30,11 +33,11 @@
|
|
|
30
33
|
.antdSelect {
|
|
31
34
|
cursor: not-allowed;
|
|
32
35
|
|
|
33
|
-
.ant-select-selection-item {
|
|
36
|
+
:global(.ant-select-selection-item) {
|
|
34
37
|
color: var(--cf-text-3);
|
|
35
38
|
}
|
|
36
39
|
|
|
37
|
-
.ant-select-arrow {
|
|
40
|
+
:global(.ant-select-arrow) {
|
|
38
41
|
cursor: not-allowed;
|
|
39
42
|
}
|
|
40
43
|
}
|
|
@@ -77,7 +80,7 @@
|
|
|
77
80
|
margin-inline-start: 4px;
|
|
78
81
|
}
|
|
79
82
|
|
|
80
|
-
&:has(> .ant-select-status-error) {
|
|
83
|
+
&:has(> :global(.ant-select-status-error)) {
|
|
81
84
|
border: 1px solid #ff4d4f;
|
|
82
85
|
|
|
83
86
|
.prefix,
|
|
@@ -113,20 +116,20 @@
|
|
|
113
116
|
font-weight: inherit;
|
|
114
117
|
color: inherit !important;
|
|
115
118
|
|
|
116
|
-
&:has(> .ant-select-arrow),
|
|
117
|
-
&:has(> .ant-select-clear) {
|
|
118
|
-
.ant-select-selector {
|
|
119
|
+
&:has(> :global(.ant-select-arrow)),
|
|
120
|
+
&:has(> :global(.ant-select-clear)) {
|
|
121
|
+
:global(.ant-select-selector) {
|
|
119
122
|
padding-right: 20px;
|
|
120
123
|
}
|
|
121
124
|
}
|
|
122
125
|
|
|
123
126
|
&.legacyHasArrowOrClear {
|
|
124
|
-
.ant-select-selector {
|
|
127
|
+
:global(.ant-select-selector) {
|
|
125
128
|
padding-right: 20px;
|
|
126
129
|
}
|
|
127
130
|
}
|
|
128
131
|
|
|
129
|
-
.ant-select-selector {
|
|
132
|
+
:global(.ant-select-selector) {
|
|
130
133
|
width: 100%;
|
|
131
134
|
height: 100%;
|
|
132
135
|
padding: 0;
|
|
@@ -145,7 +148,7 @@
|
|
|
145
148
|
content: none;
|
|
146
149
|
}
|
|
147
150
|
|
|
148
|
-
.ant-select-selection-wrap {
|
|
151
|
+
:global(.ant-select-selection-wrap) {
|
|
149
152
|
height: 100%;
|
|
150
153
|
|
|
151
154
|
font-family: inherit;
|
|
@@ -154,7 +157,7 @@
|
|
|
154
157
|
color: inherit;
|
|
155
158
|
}
|
|
156
159
|
|
|
157
|
-
.ant-select-selection-search {
|
|
160
|
+
:global(.ant-select-selection-search) {
|
|
158
161
|
inset-inline-start: 0px;
|
|
159
162
|
inset-inline-end: 0px;
|
|
160
163
|
|
|
@@ -173,7 +176,7 @@
|
|
|
173
176
|
}
|
|
174
177
|
}
|
|
175
178
|
|
|
176
|
-
.ant-select-selection-placeholder {
|
|
179
|
+
:global(.ant-select-selection-placeholder) {
|
|
177
180
|
display: inline-flex;
|
|
178
181
|
align-items: center;
|
|
179
182
|
|
|
@@ -185,7 +188,7 @@
|
|
|
185
188
|
font-weight: inherit;
|
|
186
189
|
}
|
|
187
190
|
|
|
188
|
-
.ant-select-selection-item {
|
|
191
|
+
:global(.ant-select-selection-item) {
|
|
189
192
|
padding-inline-end: 0px;
|
|
190
193
|
|
|
191
194
|
font-family: inherit;
|
|
@@ -194,8 +197,8 @@
|
|
|
194
197
|
color: inherit;
|
|
195
198
|
}
|
|
196
199
|
|
|
197
|
-
.ant-select-selection-overflow-item {
|
|
198
|
-
.ant-select-selection-item {
|
|
200
|
+
:global(.ant-select-selection-overflow-item) {
|
|
201
|
+
:global(.ant-select-selection-item) {
|
|
199
202
|
line-height: normal;
|
|
200
203
|
|
|
201
204
|
padding-inline-end: 4px;
|
|
@@ -203,34 +206,34 @@
|
|
|
203
206
|
}
|
|
204
207
|
}
|
|
205
208
|
|
|
206
|
-
|
|
207
|
-
.ant-select-selector {
|
|
209
|
+
&:global(.ant-select-focused) {
|
|
210
|
+
:global(.ant-select-selector) {
|
|
208
211
|
border: none !important;
|
|
209
212
|
|
|
210
213
|
box-shadow: none !important;
|
|
211
214
|
}
|
|
212
215
|
}
|
|
213
216
|
|
|
214
|
-
|
|
215
|
-
.ant-select-arrow {
|
|
217
|
+
&:global(.ant-select-open) {
|
|
218
|
+
:global(.ant-select-arrow) {
|
|
216
219
|
transform: rotate(-180deg) translateY(50%);
|
|
217
220
|
}
|
|
218
221
|
|
|
219
222
|
&.noArrowAnimation {
|
|
220
|
-
.ant-select-arrow {
|
|
223
|
+
:global(.ant-select-arrow) {
|
|
221
224
|
transform: translateY(-50%);
|
|
222
225
|
transition: none !important;
|
|
223
226
|
}
|
|
224
227
|
}
|
|
225
228
|
}
|
|
226
229
|
|
|
227
|
-
|
|
228
|
-
.ant-select-selector {
|
|
230
|
+
&:global(.ant-select-status-error) {
|
|
231
|
+
:global(.ant-select-selector) {
|
|
229
232
|
border: none !important;
|
|
230
233
|
}
|
|
231
234
|
}
|
|
232
235
|
|
|
233
|
-
.ant-select-arrow {
|
|
236
|
+
:global(.ant-select-arrow) {
|
|
234
237
|
width: 14px;
|
|
235
238
|
height: 14px;
|
|
236
239
|
margin-top: 0px;
|
|
@@ -244,7 +247,7 @@
|
|
|
244
247
|
pointer-events: all;
|
|
245
248
|
}
|
|
246
249
|
|
|
247
|
-
.ant-select-clear {
|
|
250
|
+
:global(.ant-select-clear) {
|
|
248
251
|
width: 14px;
|
|
249
252
|
height: 14px;
|
|
250
253
|
margin-top: 0px;
|
|
@@ -256,17 +259,17 @@
|
|
|
256
259
|
inset-inline-end: 0px;
|
|
257
260
|
}
|
|
258
261
|
|
|
259
|
-
|
|
260
|
-
> .ant-select-selector {
|
|
261
|
-
> .ant-select-selection-overflow {
|
|
262
|
-
.ant-select-selection-search {
|
|
262
|
+
&:global(.ant-select-multiple) {
|
|
263
|
+
> :global(.ant-select-selector) {
|
|
264
|
+
> :global(.ant-select-selection-overflow) {
|
|
265
|
+
:global(.ant-select-selection-search) {
|
|
263
266
|
width: 0px !important;
|
|
264
267
|
|
|
265
268
|
margin-inline-start: 0px;
|
|
266
269
|
}
|
|
267
270
|
}
|
|
268
271
|
|
|
269
|
-
> .ant-select-selection-placeholder {
|
|
272
|
+
> :global(.ant-select-selection-placeholder) {
|
|
270
273
|
inset-inline-start: 0px;
|
|
271
274
|
}
|
|
272
275
|
}
|
|
@@ -274,14 +277,14 @@
|
|
|
274
277
|
}
|
|
275
278
|
|
|
276
279
|
&.popupMatchContentWidth {
|
|
277
|
-
.ant-select-dropdown {
|
|
280
|
+
:global(.ant-select-dropdown) {
|
|
278
281
|
[class="rc-virtual-list-holder-inner"] {
|
|
279
282
|
position: relative !important;
|
|
280
283
|
}
|
|
281
284
|
}
|
|
282
285
|
}
|
|
283
286
|
|
|
284
|
-
.ant-select-dropdown {
|
|
287
|
+
:global(.ant-select-dropdown) {
|
|
285
288
|
position: fixed;
|
|
286
289
|
|
|
287
290
|
font-family: inherit;
|
|
@@ -291,7 +294,7 @@
|
|
|
291
294
|
|
|
292
295
|
border-radius: inherit;
|
|
293
296
|
|
|
294
|
-
.ant-select-item {
|
|
297
|
+
:global(.ant-select-item) {
|
|
295
298
|
font-family: inherit;
|
|
296
299
|
font-size: inherit;
|
|
297
300
|
font-weight: inherit;
|
|
@@ -300,9 +303,9 @@
|
|
|
300
303
|
border-radius: inherit;
|
|
301
304
|
}
|
|
302
305
|
|
|
303
|
-
.ant-select-item-empty,
|
|
304
|
-
.ant-empty,
|
|
305
|
-
.ant-empty-description {
|
|
306
|
+
:global(.ant-select-item-empty),
|
|
307
|
+
:global(.ant-empty),
|
|
308
|
+
:global(.ant-empty-description) {
|
|
306
309
|
font-family: inherit;
|
|
307
310
|
font-size: inherit;
|
|
308
311
|
font-weight: inherit;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
.slider {
|
|
2
|
+
width: 100%;
|
|
2
3
|
height: 32px;
|
|
3
4
|
margin: 0px;
|
|
4
5
|
padding-block: 0px;
|
|
@@ -6,14 +7,14 @@
|
|
|
6
7
|
overflow-x: hidden;
|
|
7
8
|
overflow-y: visible;
|
|
8
9
|
|
|
9
|
-
.ant-slider-step,
|
|
10
|
-
.ant-slider-track,
|
|
11
|
-
.ant-slider-rail {
|
|
10
|
+
:global(.ant-slider-step),
|
|
11
|
+
:global(.ant-slider-track),
|
|
12
|
+
:global(.ant-slider-rail) {
|
|
12
13
|
top: 0px;
|
|
13
14
|
height: 100% !important;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
.ant-slider-handle {
|
|
17
|
+
:global(.ant-slider-handle) {
|
|
17
18
|
position: relative;
|
|
18
19
|
top: 50%;
|
|
19
20
|
transform: translate(calc(-50% - 4px), calc(-50% + 1px)) !important;
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
overflow: hidden;
|
|
6
6
|
|
|
7
|
-
.x-spreadsheet-toolbar,
|
|
8
|
-
.x-spreadsheet-bottombar {
|
|
7
|
+
:global(.x-spreadsheet-toolbar),
|
|
8
|
+
:global(.x-spreadsheet-bottombar) {
|
|
9
9
|
width: 100% !important;
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
background-size: auto;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.x-spreadsheet-menu {
|
|
16
|
+
:global(.x-spreadsheet-menu) {
|
|
17
17
|
> li:first-child {
|
|
18
18
|
display: none;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
&.showBottomTool {
|
|
23
|
-
.x-spreadsheet-menu {
|
|
23
|
+
:global(.x-spreadsheet-menu) {
|
|
24
24
|
> li:first-child {
|
|
25
25
|
display: list-item;
|
|
26
26
|
}
|
|
@@ -9,6 +9,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
9
9
|
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; }
|
|
10
10
|
import { Switch as AntSwitch } from "antd";
|
|
11
11
|
import React from "react";
|
|
12
|
+
import styles from "./index.module.less";
|
|
12
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
14
|
var Switch = function Switch(props) {
|
|
14
15
|
var _options$find, _options$find2;
|
|
@@ -18,13 +19,16 @@ var Switch = function Switch(props) {
|
|
|
18
19
|
checkedChildren = props.checkedChildren,
|
|
19
20
|
unCheckedChildren = props.unCheckedChildren,
|
|
20
21
|
rest = _objectWithoutProperties(props, _excluded);
|
|
21
|
-
return /*#__PURE__*/_jsx(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
return /*#__PURE__*/_jsx("span", {
|
|
23
|
+
className: styles.SwitchWrapper,
|
|
24
|
+
children: /*#__PURE__*/_jsx(AntSwitch, _objectSpread(_objectSpread({}, rest), {}, {
|
|
25
|
+
checkedChildren: checkedChildren || (options === null || options === void 0 || (_options$find = options.find(function (item) {
|
|
26
|
+
return item.value === trueValue;
|
|
27
|
+
})) === null || _options$find === void 0 ? void 0 : _options$find.label),
|
|
28
|
+
unCheckedChildren: unCheckedChildren || (options === null || options === void 0 || (_options$find2 = options.find(function (item) {
|
|
29
|
+
return item.value === falseValue;
|
|
30
|
+
})) === null || _options$find2 === void 0 ? void 0 : _options$find2.label)
|
|
31
|
+
}))
|
|
32
|
+
});
|
|
29
33
|
};
|
|
30
34
|
export default Switch;
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
justify-content: flex-end;
|
|
5
5
|
column-gap: 8px;
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
&:global(.ant-pagination-start) {
|
|
8
8
|
justify-content: flex-start;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
&:global(.ant-pagination-center) {
|
|
12
12
|
justify-content: center;
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
width: 100%;
|
|
26
26
|
height: 100%;
|
|
27
27
|
|
|
28
|
-
.ant-pagination-item-container {
|
|
28
|
+
:global(.ant-pagination-item-container) {
|
|
29
29
|
width: 100%;
|
|
30
30
|
|
|
31
|
-
.ant-pagination-item-ellipsis {
|
|
31
|
+
:global(.ant-pagination-item-ellipsis) {
|
|
32
32
|
width: 100%;
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -40,17 +40,17 @@
|
|
|
40
40
|
justify-content: center;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
.ant-pagination-options-size-changer,
|
|
45
|
-
.ant-pagination-options-quick-jumper {
|
|
43
|
+
&:global(.ant-pagination-options) {
|
|
44
|
+
:global(.ant-pagination-options-size-changer),
|
|
45
|
+
:global(.ant-pagination-options-quick-jumper) {
|
|
46
46
|
height: 100% !important;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.ant-pagination-options-size-changer {
|
|
50
|
-
.ant-select-selector {
|
|
49
|
+
:global(.ant-pagination-options-size-changer) {
|
|
50
|
+
:global(.ant-select-selector) {
|
|
51
51
|
height: 100% !important;
|
|
52
52
|
|
|
53
|
-
.ant-select-selection-item {
|
|
53
|
+
:global(.ant-select-selection-item) {
|
|
54
54
|
display: flex;
|
|
55
55
|
align-items: center;
|
|
56
56
|
|
|
@@ -58,14 +58,14 @@
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
.ant-select-arrow {
|
|
61
|
+
:global(.ant-select-arrow) {
|
|
62
62
|
margin-top: 0px;
|
|
63
63
|
|
|
64
64
|
transform: translateY(-50%);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
.ant-pagination-options-quick-jumper {
|
|
68
|
+
:global(.ant-pagination-options-quick-jumper) {
|
|
69
69
|
display: inline-flex;
|
|
70
70
|
align-items: center;
|
|
71
71
|
|
|
@@ -78,18 +78,18 @@
|
|
|
78
78
|
|
|
79
79
|
&.bordered {
|
|
80
80
|
> li {
|
|
81
|
-
&:not(.ant-pagination-options):not(.ant-pagination-total-text) {
|
|
81
|
+
&:not(:global(.ant-pagination-options)):not(:global(.ant-pagination-total-text)) {
|
|
82
82
|
border: 1px solid var(--cf-border);
|
|
83
83
|
border-radius: 4px;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
&:global(.ant-pagination-item) {
|
|
87
87
|
margin: 0px 4px 0px 0px;
|
|
88
88
|
|
|
89
|
-
&:not(.ant-pagination-item-active):not(
|
|
90
|
-
.ant-pagination-item-disabled
|
|
89
|
+
&:not(:global(.ant-pagination-item-active)):not(
|
|
90
|
+
:global(.ant-pagination-item-disabled)
|
|
91
91
|
):hover,
|
|
92
|
-
|
|
92
|
+
&:global(.ant-pagination-item-active) {
|
|
93
93
|
background-color: var(--primary-color, #1890ff);
|
|
94
94
|
border-color: var(--primary-color, #1890ff);
|
|
95
95
|
|
|
@@ -98,11 +98,11 @@
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
&:not(.ant-pagination-item-active):not(.ant-pagination-item-disabled) {
|
|
101
|
+
&:not(:global(.ant-pagination-item-active)):not(:global(.ant-pagination-item-disabled)) {
|
|
102
102
|
border-color: var(--cf-border);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
&:not(.ant-pagination-item-active).ant-pagination-item-disabled {
|
|
105
|
+
&:not(:global(.ant-pagination-item-active)):global(.ant-pagination-item-disabled) {
|
|
106
106
|
cursor: not-allowed;
|
|
107
107
|
|
|
108
108
|
&:hover {
|
|
@@ -117,16 +117,16 @@
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
&:global(.ant-pagination-prev) {
|
|
121
121
|
margin-right: 4px;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
&:global(.ant-pagination-options) {
|
|
125
125
|
margin-left: 4px;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
&:global(.ant-pagination-jump-next),
|
|
129
|
+
&:global(.ant-pagination-jump-prev) {
|
|
130
130
|
margin-right: 4px;
|
|
131
131
|
}
|
|
132
132
|
}
|