@para-ui/core 3.0.86 → 4.0.0-beta
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/AutoBox/index.js +18 -19
- package/AutoTips/index.js +5 -4
- package/Breadcrumbs/index.js +5 -4
- package/Button/SplitButton.d.ts +13 -0
- package/Button/index.d.ts +1 -1
- package/Button/index.js +54 -12
- package/ButtonGroup/index.js +6 -5
- package/Carousel/index.d.ts +5 -5
- package/Carousel/index.js +21 -9
- package/Cascader/Cascader.d.ts +99 -0
- package/Cascader/OptionList/CacheContent.d.ts +7 -0
- package/Cascader/OptionList/Column.d.ts +21 -0
- package/Cascader/OptionList/index.d.ts +4 -0
- package/Cascader/OptionList/useActive.d.ts +6 -0
- package/Cascader/context.d.ts +23 -0
- package/Cascader/hooks/useDisplayValues.d.ts +10 -0
- package/Cascader/hooks/useEntities.d.ts +10 -0
- package/Cascader/hooks/useMissingValues.d.ts +3 -0
- package/Cascader/index.d.ts +3 -58
- package/Cascader/index.js +28 -177
- package/Cascader/utils/commonUtil.d.ts +18 -0
- package/Cascader/utils/treeUtil.d.ts +55 -0
- package/Checkbox/index.d.ts +7 -0
- package/Checkbox/index.js +50 -29
- package/CheckboxGroup/index.d.ts +3 -1
- package/CheckboxGroup/index.js +48 -18
- package/Collapse/index.js +2 -2
- package/Collapse/motion.d.ts +0 -2
- package/CollapseBox/index.js +3 -3
- package/CollapseLayout/index.d.ts +5 -0
- package/CollapseLayout/index.js +144 -22
- package/ColorPicker/chromePicker/index.d.ts +9 -0
- package/ColorPicker/compactPicker/index.d.ts +9 -0
- package/ColorPicker/config.d.ts +5 -0
- package/ColorPicker/index.d.ts +4 -1
- package/ColorPicker/index.js +7 -3
- package/ColorPicker/sketchPicker/index.d.ts +11 -0
- package/ColorPicker/swatchesPicker/index.d.ts +9 -0
- package/ComboSelect/index.js +14 -12
- package/Container/index.js +2 -2
- package/CopyText/index.d.ts +33 -0
- package/CopyText/index.js +180 -0
- package/DatePicker/generatePicker/generateRangePicker.d.ts +9 -2
- package/DatePicker/generatePicker/generateSinglePicker.d.ts +8 -8
- package/DatePicker/generatePicker/index.d.ts +32 -26
- package/DatePicker/generatePicker/interface.d.ts +12 -0
- package/DatePicker/index.d.ts +12 -8
- package/DatePicker/index.js +367 -454
- package/DatePicker/util.d.ts +40 -4
- package/Desktop/index.d.ts +16 -3
- package/Desktop/index.js +177 -68
- package/Desktop/lang/en_US.d.ts +6 -0
- package/Desktop/lang/index.d.ts +13 -0
- package/Desktop/lang/zh_CN.d.ts +6 -0
- package/DragVerify/index.js +9 -100
- package/Drawer/index.js +8 -8
- package/Drawer/interface.d.ts +2 -2
- package/Dropdown/index.js +2 -2
- package/DynamicMultiBox/index.js +57 -41
- package/DynamicMultiBox/interface.d.ts +4 -4
- package/Empty/index.js +2 -2
- package/Form/index.d.ts +20 -26
- package/Form/index.js +48 -69
- package/FormItem/index.js +15 -15
- package/FunctionModal/index.js +11 -9
- package/GlobalContext/constant.d.ts +1 -1
- package/GlobalContext/index.js +2 -2
- package/Help/index.js +4 -3
- package/HelperText/index.js +2 -2
- package/InputLang/index.d.ts +5 -0
- package/InputLang/index.js +35 -29
- package/InputNumber/index.d.ts +5 -0
- package/InputNumber/index.js +95 -80
- package/Label/index.js +4 -3
- package/Loading/index.js +2 -2
- package/Menu/index.js +114 -39
- package/Menu/interface.d.ts +8 -0
- package/Message/index.d.ts +4 -4
- package/Message/index.js +13 -11
- package/Modal/index.js +29 -15
- package/MultiBox/index.js +9 -8
- package/Notification/index.d.ts +9 -1
- package/Notification/index.js +29 -15
- package/OperateBtn/index.js +28 -11
- package/PageHeader/index.js +270 -74
- package/PageHeader/interface.d.ts +17 -0
- package/Pagination/index.d.ts +4 -3
- package/Pagination/index.js +117 -95
- package/Pagination/lang/en_US.d.ts +3 -2
- package/Pagination/lang/index.d.ts +6 -4
- package/Pagination/lang/zh_CN.d.ts +3 -2
- package/ParauiProvider/index.js +4 -4
- package/PasswordRules/index.js +5 -5
- package/PopConfirm/index.d.ts +15 -5
- package/PopConfirm/index.js +62 -16
- package/Popover/index.js +4 -3
- package/Progress/index.js +10 -9
- package/Querying/index.js +7 -7
- package/README.md +40 -1120
- package/Radio/index.d.ts +7 -0
- package/Radio/index.js +49 -27
- package/RadioGroup/index.d.ts +3 -1
- package/RadioGroup/index.js +48 -21
- package/Search/index.d.ts +3 -15
- package/Search/index.js +21 -83
- package/Select/index.d.ts +7 -2
- package/Select/index.js +114 -91
- package/Select/lang/en_US.d.ts +1 -1
- package/Select/lang/index.d.ts +2 -2
- package/Select/lang/zh_CN.d.ts +1 -1
- package/SelectInput/index.js +8 -7
- package/Selector/index.js +30 -22
- package/SelectorPicker/index.d.ts +5 -0
- package/SelectorPicker/index.js +47 -32
- package/SelectorPicker/lang/en_US.d.ts +1 -0
- package/SelectorPicker/lang/index.d.ts +2 -0
- package/SelectorPicker/lang/zh_CN.d.ts +1 -0
- package/SingleBox/index.js +8 -7
- package/Slider/index.js +5 -5
- package/Status/index.d.ts +6 -5
- package/Status/index.js +27 -4
- package/Stepper/index.d.ts +9 -10
- package/Stepper/index.js +69 -29
- package/Styles/index.scss +4 -0
- package/Styles/scrollbar.scss +24 -24
- package/Styles/theme.scss +104 -57
- package/Switch/index.d.ts +34 -14
- package/Switch/index.js +97 -30
- package/Table/index.js +33 -27
- package/Table/interface.d.ts +3 -1
- package/Table/tableHeadInterface.d.ts +1 -1
- package/Table/tablePaginationInterface.d.ts +5 -5
- package/Tabs/index.d.ts +11 -1
- package/Tabs/index.js +49 -16
- package/Tag/TagGroup.d.ts +11 -7
- package/Tag/index.d.ts +22 -7
- package/Tag/index.js +1382 -53
- package/TextEditor/index.js +4 -3
- package/TextField/index.d.ts +5 -0
- package/TextField/index.js +50 -32
- package/TimePicker/index.d.ts +5 -0
- package/TimePicker/index.js +39 -23
- package/Timeline/TimelineItem.d.ts +1 -1
- package/Timeline/index.d.ts +5 -5
- package/Timeline/index.js +21 -18
- package/Title/index.d.ts +15 -3
- package/Title/index.js +95 -29
- package/ToggleButton/ToggleButtonGroup.d.ts +1 -0
- package/ToggleButton/index.d.ts +4 -0
- package/ToggleButton/index.js +14 -52
- package/Tooltip/index.js +28 -34
- package/Tooltip/interface.d.ts +4 -10
- package/Tooltip/utils.d.ts +1 -3
- package/Transfer/index.d.ts +3 -3
- package/Transfer/index.js +72 -68
- package/Tree/Tree.d.ts +2 -2
- package/Tree/index.js +10 -9
- package/Tree/utils/treeUtil.d.ts +0 -7
- package/Upload/index.js +16 -14
- package/_verture/{constant-66aa48a1.js → constant-0d9802f7.js} +1 -1
- package/_verture/{defineProperty-62acccfc.js → defineProperty-1d116156.js} +1 -1
- package/_verture/index-5c77417d.js +150 -0
- package/_verture/index-68db2bc3.js +10530 -0
- package/_verture/{index-9738004e.js → index-7ec72724.js} +44 -38
- package/_verture/index-d63bd287.js +327 -0
- package/_verture/{index-fa8a0124.js → index-e6f85fd5.js} +7 -8
- package/_verture/{index-77f9e0fb.js → index-e9007d6a.js} +6 -6
- package/_verture/{intl-4a9f1b44.js → intl-5c1ec055.js} +1 -1
- package/_verture/{modalContext-20780c9a.js → modalContext-c12ca3e8.js} +3 -3
- package/_verture/slicedToArray-a8206399.js +43 -0
- package/_verture/{toConsumableArray-81040c9e.js → toConsumableArray-8f4c9589.js} +1 -1
- package/_verture/typeof-adeedc13.js +11 -0
- package/_verture/typeof-b240b062.js +16 -0
- package/_verture/{utils-c9b9a157.js → utils-f0e81540.js} +8 -8
- package/index.d.ts +2 -2
- package/index.js +32 -27
- package/locale/en-US.d.ts +10 -6
- package/locale/index.d.ts +20 -12
- package/locale/index.js +33 -25
- package/locale/zh-CN.d.ts +10 -6
- package/package.json +25 -10
- package/umd/AutoBox.js +20 -21
- package/umd/AutoTips.js +31 -4
- package/umd/Breadcrumbs.js +7 -7
- package/umd/Button.js +7 -8
- package/umd/ButtonGroup.js +7 -8
- package/umd/Carousel.js +29 -1
- package/umd/Cascader.js +20 -21
- package/umd/Checkbox.js +7 -7
- package/umd/CheckboxGroup.js +7 -7
- package/umd/Collapse.js +19 -21
- package/umd/CollapseBox.js +1 -1
- package/umd/CollapseLayout.js +4 -4
- package/umd/ColorPicker.js +1 -1
- package/umd/ComboSelect.js +7 -7
- package/umd/Container.js +1 -1
- package/umd/CopyText.js +42 -0
- package/umd/DatePicker.js +7 -7
- package/umd/Desktop.js +7 -7
- package/umd/DragVerify.js +4 -4
- package/umd/Drawer.js +7 -8
- package/umd/Dropdown.js +3 -3
- package/umd/DynamicMultiBox.js +7 -7
- package/umd/Empty.js +1 -1
- package/umd/Form.js +6 -6
- package/umd/FormItem.js +6 -6
- package/umd/FunctionModal.js +7 -7
- package/umd/Help.js +7 -7
- package/umd/HelperText.js +1 -1
- package/umd/InputLang.js +7 -7
- package/umd/InputNumber.js +7 -7
- package/umd/Label.js +7 -7
- package/umd/Loading.js +4 -5
- package/umd/Menu.js +4 -4
- package/umd/Message.js +3 -4
- package/umd/Modal.js +7 -7
- package/umd/MultiBox.js +7 -7
- package/umd/Notification.js +5 -6
- package/umd/OperateBtn.js +7 -7
- package/umd/PageHeader.js +7 -7
- package/umd/Pagination.js +7 -7
- package/umd/ParauiProvider.js +1 -1
- package/umd/PasswordRules.js +3 -4
- package/umd/PopConfirm.js +7 -7
- package/umd/Popover.js +31 -4
- package/umd/Progress.js +4 -5
- package/umd/Querying.js +1 -1
- package/umd/Radio.js +7 -7
- package/umd/RadioGroup.js +7 -7
- package/umd/Search.js +7 -7
- package/umd/Select.js +7 -7
- package/umd/SelectInput.js +7 -7
- package/umd/Selector.js +7 -7
- package/umd/SelectorPicker.js +7 -7
- package/umd/SingleBox.js +7 -7
- package/umd/Slider.js +3 -3
- package/umd/Status.js +29 -1
- package/umd/Stepper.js +20 -20
- package/umd/Switch.js +7 -7
- package/umd/Table.js +7 -7
- package/umd/Tabs.js +7 -7
- package/umd/Tag.js +7 -8
- package/umd/TextEditor.js +19 -19
- package/umd/TextField.js +7 -7
- package/umd/TimePicker.js +7 -7
- package/umd/Timeline.js +1 -1
- package/umd/Title.js +42 -1
- package/umd/ToggleButton.js +7 -8
- package/umd/Tooltip.js +31 -4
- package/umd/Transfer.js +8 -8
- package/umd/Tree.js +7 -7
- package/umd/Upload.js +8 -8
- package/umd/locale.js +1 -1
- package/Cascader/lang/en_US.d.ts +0 -4
- package/Cascader/lang/index.d.ts +0 -9
- package/Cascader/lang/zh_CN.d.ts +0 -4
- package/Split/index.d.ts +0 -7
- package/Split/index.js +0 -123
- package/_verture/index-a369ca3f.js +0 -4
- package/_verture/index-beef914f.js +0 -340
- package/_verture/slicedToArray-76060636.js +0 -43
- package/_verture/typeof-498dd2b1.js +0 -11
- package/umd/Split.js +0 -1
package/Styles/scrollbar.scss
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
::-webkit-scrollbar {
|
|
3
3
|
width: 6px;
|
|
4
4
|
height: 6px;
|
|
5
|
-
background-color: $
|
|
5
|
+
background-color: $A2; // 背景色
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
// 滚动条滑槽样式
|
|
@@ -12,28 +12,28 @@
|
|
|
12
12
|
|
|
13
13
|
// 滚动条样式
|
|
14
14
|
::-webkit-scrollbar-thumb {
|
|
15
|
-
background: $
|
|
15
|
+
background: $T3;
|
|
16
16
|
border-radius: 6px;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
// 边角
|
|
20
20
|
::-webkit-scrollbar-corner {
|
|
21
|
-
background: $
|
|
21
|
+
background: $A2;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
// 鼠标移入上去
|
|
25
25
|
::-webkit-scrollbar-thumb:hover {
|
|
26
|
-
background: $
|
|
26
|
+
background: $A1;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// 鼠标点击
|
|
30
30
|
::-webkit-scrollbar-thumb:active {
|
|
31
|
-
background: $
|
|
31
|
+
background: $A1;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
// 浏览器失焦的样式
|
|
35
35
|
::-webkit-scrollbar-thumb:window-inactive {
|
|
36
|
-
background-color: $
|
|
36
|
+
background-color: $T3;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
.#{$prefixCls}-scrollbar-small {
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
::-webkit-scrollbar {
|
|
63
63
|
width: 4px;
|
|
64
64
|
height: 4px;
|
|
65
|
-
background-color: $
|
|
65
|
+
background-color: $T2; // 背景色
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
// 滚动条滑槽样式
|
|
@@ -73,27 +73,27 @@
|
|
|
73
73
|
// 滚动条样式
|
|
74
74
|
::-webkit-scrollbar-thumb {
|
|
75
75
|
border-radius: 4px;
|
|
76
|
-
background: $
|
|
76
|
+
background: $A1;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
// 边角
|
|
80
80
|
::-webkit-scrollbar-corner {
|
|
81
|
-
background: $
|
|
81
|
+
background: $T2;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
// 鼠标移入上去
|
|
85
85
|
::-webkit-scrollbar-thumb:hover {
|
|
86
|
-
background: $
|
|
86
|
+
background: $T3;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
// 鼠标点击
|
|
90
90
|
::-webkit-scrollbar-thumb:active {
|
|
91
|
-
background: $
|
|
91
|
+
background: $T3;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
// 浏览器失焦的样式
|
|
95
95
|
::-webkit-scrollbar-thumb:window-inactive {
|
|
96
|
-
background-color: $
|
|
96
|
+
background-color: $A1;
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
}
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
::-webkit-scrollbar {
|
|
125
125
|
width: 6px;
|
|
126
126
|
height: 6px;
|
|
127
|
-
background-color: $
|
|
127
|
+
background-color: $T2; // 背景色
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
// 滚动条滑槽样式
|
|
@@ -135,27 +135,27 @@
|
|
|
135
135
|
// 滚动条样式
|
|
136
136
|
::-webkit-scrollbar-thumb {
|
|
137
137
|
border-radius: 6px;
|
|
138
|
-
background: $
|
|
138
|
+
background: $A1;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
// 边角
|
|
142
142
|
::-webkit-scrollbar-corner {
|
|
143
|
-
background: $
|
|
143
|
+
background: $T2;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
// 鼠标移入上去
|
|
147
147
|
::-webkit-scrollbar-thumb:hover {
|
|
148
|
-
background: $
|
|
148
|
+
background: $T3;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
// 鼠标点击
|
|
152
152
|
::-webkit-scrollbar-thumb:active {
|
|
153
|
-
background: $
|
|
153
|
+
background: $T3;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
// 浏览器失焦的样式
|
|
157
157
|
::-webkit-scrollbar-thumb:window-inactive {
|
|
158
|
-
background-color: $
|
|
158
|
+
background-color: $A1;
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
}
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
::-webkit-scrollbar {
|
|
187
187
|
width: 8px;
|
|
188
188
|
height: 8px;
|
|
189
|
-
background-color: $
|
|
189
|
+
background-color: $T2; // 背景色
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
// 滚动条滑槽样式
|
|
@@ -197,27 +197,27 @@
|
|
|
197
197
|
// 滚动条样式
|
|
198
198
|
::-webkit-scrollbar-thumb {
|
|
199
199
|
border-radius: 8px;
|
|
200
|
-
background: $
|
|
200
|
+
background: $A1;
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
// 边角
|
|
204
204
|
::-webkit-scrollbar-corner {
|
|
205
|
-
background: $
|
|
205
|
+
background: $T2;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
// 鼠标移入上去
|
|
209
209
|
::-webkit-scrollbar-thumb:hover {
|
|
210
|
-
background: $
|
|
210
|
+
background: $T3;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
// 鼠标点击
|
|
214
214
|
::-webkit-scrollbar-thumb:active {
|
|
215
|
-
background: $
|
|
215
|
+
background: $T3;
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
// 浏览器失焦的样式
|
|
219
219
|
::-webkit-scrollbar-thumb:window-inactive {
|
|
220
|
-
background-color: $
|
|
220
|
+
background-color: $A1;
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
}
|
package/Styles/theme.scss
CHANGED
|
@@ -1,74 +1,121 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @author
|
|
3
|
-
* @date
|
|
4
|
-
* @description
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2023/4/11 14:16
|
|
4
|
+
* @description 最新色卡
|
|
5
5
|
*/
|
|
6
|
+
|
|
6
7
|
// 组件库前缀
|
|
7
|
-
$prefixCls: 'paraui-
|
|
8
|
+
$prefixCls: 'paraui-v4';
|
|
8
9
|
// rc组件前缀
|
|
9
10
|
$rcPrefixCls: 'component';
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
$A1: rgba(28, 41, 60, 1);
|
|
13
|
-
$A2: rgba(34, 62, 103, 1);
|
|
14
|
-
$A3: linear-gradient(180deg, rgba(241, 241, 244, 1), rgba(243, 243, 243, 1));
|
|
15
|
-
$A4: rgba(255, 255, 255, 0.6);
|
|
16
|
-
$A5: rgba(54, 102, 214, 1);
|
|
17
|
-
//辅助色
|
|
18
|
-
$B1: linear-gradient(90deg, rgba(61, 102, 248, 1), rgba(119, 147, 249, 1) 74%, rgba(216, 223, 250, 1));
|
|
19
|
-
$B2: rgba(54, 102, 214, 0.8);
|
|
20
|
-
$B3: rgba(54, 102, 214, 0.4);
|
|
21
|
-
$B4: rgba(54, 102, 214, 0.2);
|
|
22
|
-
$B5: rgba(54, 102, 214, 0.05);
|
|
23
|
-
$B6: rgba(171, 176, 185, 0.4);
|
|
24
|
-
$B7: rgba(171, 176, 185, 0.2);
|
|
25
|
-
$B8: rgba(171, 176, 185, 0.12);
|
|
26
|
-
$B9: rgba(248, 249, 251, 0.8);
|
|
27
|
-
$B10: rgba(255, 255, 255, 1);
|
|
28
|
-
$B11: rgba(243, 246, 252, 1);
|
|
29
|
-
$B12: rgba(254, 249, 245, 1);
|
|
30
|
-
$B13: rgba(253, 246, 245, 1);
|
|
31
|
-
$B14: rgba(245, 251, 242, 1);
|
|
32
|
-
//状态色
|
|
33
|
-
$C1: rgba(235, 96, 84, 1);
|
|
34
|
-
$C2: rgba(235, 96, 84, 0.05);
|
|
35
|
-
$C3: rgba(83, 195, 27, 1);
|
|
36
|
-
$C4: rgba(83, 195, 27, 0.05);
|
|
37
|
-
$C5: rgba(255, 161, 80, 1);
|
|
38
|
-
$C6: rgba(255, 161, 80, 0.05);
|
|
39
|
-
$C7: rgba(235, 96, 84, 0.8);
|
|
40
|
-
//文字色
|
|
41
|
-
$D1: rgba(46, 55, 67, 1);
|
|
42
|
-
$D2: rgba(46, 55, 67, 0.7);
|
|
43
|
-
$D3: rgba(46, 55, 67, 0.4);
|
|
44
|
-
//字体
|
|
12
|
+
// 字体
|
|
45
13
|
$font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;
|
|
46
14
|
$large: 18px;
|
|
47
15
|
$medium: 16px;
|
|
48
16
|
$small: 14px;
|
|
49
17
|
$smallest: 12px;
|
|
50
18
|
$normal: 400;
|
|
19
|
+
$medium: 500;
|
|
51
20
|
$bold: 700;
|
|
52
|
-
|
|
53
|
-
//
|
|
54
|
-
$
|
|
55
|
-
$
|
|
56
|
-
$
|
|
57
|
-
$
|
|
58
|
-
$Z5: rgba(243, 246, 252, 1);
|
|
59
|
-
$Z6: rgba(253, 246, 245, 1);
|
|
60
|
-
$Z7: rgba(245, 251, 242, 1);
|
|
61
|
-
$Z8: rgba(254, 249, 245, 1);
|
|
62
|
-
$Z9: rgba(236, 238, 240, 1);
|
|
63
|
-
$Z10: rgba(79, 89, 105, 1);
|
|
64
|
-
$Z11: rgba(249, 250, 251, 1);
|
|
65
|
-
|
|
66
|
-
//阴影
|
|
67
|
-
$boxShadow: 0px 2px 8px 0px rgba(171, 176, 185, 0.40);
|
|
68
|
-
$boxShadowLeft: inset -10px 0 10px -8px rgba(0, 0, 0, 0.1); // 表格固定列
|
|
69
|
-
$boxShadowRight: inset 10px 0 10px -8px rgba(0, 0, 0, 0.1); // 表格固定列
|
|
21
|
+
|
|
22
|
+
// 阴影
|
|
23
|
+
$boxShadow: 0px 2px 8px 0px rgba(234, 236, 241, 1);
|
|
24
|
+
$boxShadowLeft: inset -10px 0 10px -8px rgba(234, 236, 241, 1); // 表格固定列
|
|
25
|
+
$boxShadowRight: inset 10px 0 10px -8px rgba(234, 236, 241, 1); // 表格固定列
|
|
26
|
+
$radius-sm: 2px;
|
|
70
27
|
$radius: 4px;
|
|
28
|
+
$radius-lg: 8px;
|
|
71
29
|
|
|
72
|
-
|
|
30
|
+
// 全局弹窗index,往body里面插入的,比如toolTip,popover这类
|
|
73
31
|
$ZIndexBody: 1500;
|
|
74
32
|
|
|
33
|
+
// 下拉 浮层 最大高
|
|
34
|
+
$dropdownMaxHeight: 320px;
|
|
35
|
+
|
|
36
|
+
// 下拉浮层每项内容的高度
|
|
37
|
+
$dropdownItemHeight: 30px;
|
|
38
|
+
|
|
39
|
+
// -------- UI提供的色卡--------//
|
|
40
|
+
// 主题色
|
|
41
|
+
$P1: rgba(46, 101, 230, 1); // 主题蓝
|
|
42
|
+
$PT8: rgba(87, 131, 235, 1); // (80%)Hover
|
|
43
|
+
$PT2: rgba(213, 224, 250, 1); // (20%)黛色分割线
|
|
44
|
+
$PT05: rgba(240, 245, 255, 1); // (5%)背景
|
|
45
|
+
$P2: rgba(46, 101, 230, 0.1); // (15%)背景
|
|
46
|
+
|
|
47
|
+
// 文字色
|
|
48
|
+
$T1: rgba(29, 33, 38, 1); // 一级文案
|
|
49
|
+
$T2: rgba(92, 101, 115, 1); // 二级文案
|
|
50
|
+
$T3: rgba(161, 168, 179, 1); // 三级文案
|
|
51
|
+
|
|
52
|
+
// 辅助色
|
|
53
|
+
$A1: rgba(212, 218, 227, 1); // 描边、分割线
|
|
54
|
+
$A2: rgba(234, 236, 241, 1); // 分割线
|
|
55
|
+
$A3: rgba(247, 248, 250, 1); // 背景
|
|
56
|
+
$A4: rgba(255, 255, 255, 1); // 万能色
|
|
57
|
+
$A5: rgba(255, 255, 255, 0.5); // 万能色
|
|
58
|
+
$A6: rgba(255, 255, 255, 0.3); // 万能色
|
|
59
|
+
|
|
60
|
+
// 导航色
|
|
61
|
+
$B1: rgba(28, 41, 60, 1); // 深色导航背景
|
|
62
|
+
$B2: rgba(34, 54, 102, 1); // 深色导航背景 - 选中&Hover
|
|
63
|
+
|
|
64
|
+
// 渐变色
|
|
65
|
+
$C1: linear-gradient(90deg, rgba(46, 101, 230, 1) 50%, rgba(240, 245, 255, 1) 100%); // 渐变色
|
|
66
|
+
|
|
67
|
+
// 透明色
|
|
68
|
+
$D1: rgba(29, 33, 38, 0.9); // 背景、蒙层
|
|
69
|
+
$D2: rgba(29, 33, 38, 0.4); // 背景
|
|
70
|
+
$D3: rgba(212, 218, 227, 0.4); // 投影
|
|
71
|
+
|
|
72
|
+
//////////// 状态色 //////////////
|
|
73
|
+
// 基准色
|
|
74
|
+
$E1: rgba(19, 191, 76, 1); // 辅助色(成功)
|
|
75
|
+
$E2: rgba(19, 191, 76, 0.1); //辅助色(成功)
|
|
76
|
+
$ET05: rgba(232, 252, 239, 1); // 辅助色(成功)
|
|
77
|
+
|
|
78
|
+
$F1: rgba(255, 147, 38, 1); // 辅助色(警示)
|
|
79
|
+
$F2: rgba(255, 147, 38, 0.1); // 辅助色(警示)
|
|
80
|
+
$FT05: rgba(255, 246, 235, 1); // 辅助色(警示)
|
|
81
|
+
|
|
82
|
+
$G1: rgba(244, 66, 66, 1); // 辅助色(失败、错误)
|
|
83
|
+
$G2: rgba(244, 66, 66, 0.1); // 辅助色(失败、错误)
|
|
84
|
+
$GT8: rgba(246, 103, 103, 1); // 辅助色(失败、错误)
|
|
85
|
+
$GT05: rgba(255, 235, 235, 1); // 辅助色(失败、错误)
|
|
86
|
+
|
|
87
|
+
// 常用
|
|
88
|
+
$J1: rgba(38, 129, 255, 1);
|
|
89
|
+
$K1: rgba(38, 129, 255, 0.1);
|
|
90
|
+
$J2: rgba(19, 163, 191, 1);
|
|
91
|
+
$K2: rgba(19, 163, 191, 0.1);
|
|
92
|
+
$J3: rgba(70, 70, 230, 1);
|
|
93
|
+
$K3: rgba(70, 70, 230, 0.1);
|
|
94
|
+
$J4: rgba(11, 97, 217, 1);
|
|
95
|
+
$K4: rgba(11, 97, 217, 0.1);
|
|
96
|
+
$J5: rgba(255, 185, 0, 1);
|
|
97
|
+
$K5: rgba(255, 185, 0, 0.1);
|
|
98
|
+
$J6: rgba(204, 61, 204, 1);
|
|
99
|
+
$K6: rgba(204, 61, 204, 0.1);
|
|
100
|
+
$J7: rgba(134, 50, 245, 1);
|
|
101
|
+
$K7: rgba(134, 50, 245, 0.1);
|
|
102
|
+
$J8: rgba(200, 20, 15, 1);
|
|
103
|
+
$K8: rgba(200, 20, 15, 0.1);
|
|
104
|
+
|
|
105
|
+
// 其他
|
|
106
|
+
$L1: rgba(20, 153, 255, 1);
|
|
107
|
+
$M1: rgba(20, 153, 255, 0.1);
|
|
108
|
+
$L2: rgba(0, 180, 170, 1);
|
|
109
|
+
$M2: rgba(0, 180, 170, 0.1);
|
|
110
|
+
$L3: rgba(9, 94, 179, 1);
|
|
111
|
+
$M3: rgba(9, 94, 179, 0.1);
|
|
112
|
+
$L4: rgba(182, 61, 242, 1);
|
|
113
|
+
$M4: rgba(182, 61, 242, 0.1);
|
|
114
|
+
$L5: rgba(242, 91, 61, 1);
|
|
115
|
+
$M5: rgba(242, 91, 61, 0.1);
|
|
116
|
+
$L6: rgba(90, 210, 0, 1);
|
|
117
|
+
$M6: rgba(90, 210, 0, 0.1);
|
|
118
|
+
$L7: rgba(255, 111, 38, 1);
|
|
119
|
+
$M7: rgba(255, 111, 38, 0.1);
|
|
120
|
+
|
|
121
|
+
|
package/Switch/index.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
* @description switch 开关
|
|
5
|
-
*/
|
|
6
|
-
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
|
-
import { LabelTooltipProps } from '../Label';
|
|
1
|
+
import React, { FunctionComponent, ReactNode } from "react";
|
|
2
|
+
import { LabelTooltipProps } from "../Label";
|
|
3
|
+
import { TooltipProps } from "../Tooltip";
|
|
8
4
|
import "./index.scss";
|
|
9
5
|
type SwitchChangeEventHandler = (checked: boolean, event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
10
6
|
type SwitchClickEventHandler = SwitchChangeEventHandler;
|
|
@@ -12,7 +8,7 @@ export interface SwitchProps {
|
|
|
12
8
|
/**
|
|
13
9
|
* 开关大小
|
|
14
10
|
*/
|
|
15
|
-
size?:
|
|
11
|
+
size?: "small" | "default";
|
|
16
12
|
/**
|
|
17
13
|
* 类名
|
|
18
14
|
*/
|
|
@@ -54,25 +50,49 @@ export interface SwitchProps {
|
|
|
54
50
|
*/
|
|
55
51
|
loading?: boolean;
|
|
56
52
|
/**
|
|
57
|
-
*
|
|
53
|
+
* loading帮助提示文案
|
|
58
54
|
*/
|
|
59
|
-
|
|
55
|
+
loadingTitle?: string;
|
|
60
56
|
/**
|
|
61
|
-
*
|
|
57
|
+
* 自动获得焦点
|
|
62
58
|
*/
|
|
63
|
-
|
|
59
|
+
autoFocus?: boolean;
|
|
64
60
|
/**
|
|
65
61
|
* 标题
|
|
66
62
|
*/
|
|
67
63
|
label?: ReactNode;
|
|
68
64
|
/**
|
|
69
|
-
*
|
|
65
|
+
* 描述
|
|
66
|
+
*/
|
|
67
|
+
desc?: ReactNode;
|
|
68
|
+
/**
|
|
69
|
+
* 描述是否必填
|
|
70
|
+
*/
|
|
71
|
+
required?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* 标题帮助提示
|
|
70
74
|
*/
|
|
71
75
|
labelTooltip?: LabelTooltipProps;
|
|
76
|
+
/**
|
|
77
|
+
* 描述帮助提示
|
|
78
|
+
*/
|
|
79
|
+
descTooltip?: LabelTooltipProps;
|
|
80
|
+
/**
|
|
81
|
+
* 禁用提示
|
|
82
|
+
*/
|
|
83
|
+
disabledTooltip?: TooltipProps;
|
|
72
84
|
/**
|
|
73
85
|
* 标题位置
|
|
74
86
|
*/
|
|
75
|
-
labelPlacement?:
|
|
87
|
+
labelPlacement?: "top" | "bottom" | "start" | "end";
|
|
88
|
+
/**
|
|
89
|
+
* 描述位置
|
|
90
|
+
*/
|
|
91
|
+
descPlacement?: "start" | "end";
|
|
92
|
+
/**
|
|
93
|
+
* 辅助文本
|
|
94
|
+
*/
|
|
95
|
+
supText?: ReactNode;
|
|
76
96
|
}
|
|
77
97
|
export declare const Switch: FunctionComponent<SwitchProps>;
|
|
78
98
|
export default Switch;
|
package/Switch/index.js
CHANGED
|
@@ -1,41 +1,51 @@
|
|
|
1
|
-
import { _ as _defineProperty } from '../_verture/defineProperty-
|
|
1
|
+
import { _ as _defineProperty } from '../_verture/defineProperty-1d116156.js';
|
|
2
2
|
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
3
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
|
+
import LoadingOutlined from '@para-ui/icons/LoadingF';
|
|
4
5
|
import RcSwitch from 'rc-switch';
|
|
5
6
|
import clsx from 'clsx';
|
|
6
|
-
import
|
|
7
|
+
import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-0d9802f7.js';
|
|
7
8
|
import Label from '../Label/index.js';
|
|
8
|
-
import {
|
|
9
|
+
import { Tooltip } from '../Tooltip/index.js';
|
|
9
10
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
10
|
-
import '../_verture/typeof-
|
|
11
|
+
import '../_verture/typeof-adeedc13.js';
|
|
11
12
|
import '../Help/index.js';
|
|
12
|
-
import '
|
|
13
|
-
import '../_verture/slicedToArray-
|
|
13
|
+
import '@para-ui/icons/Help';
|
|
14
|
+
import '../_verture/slicedToArray-a8206399.js';
|
|
14
15
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
15
16
|
import 'react';
|
|
16
17
|
import 'rc-tooltip';
|
|
17
18
|
import 'rc-tooltip/lib/placements';
|
|
18
|
-
import '@para-ui/icons/
|
|
19
|
+
import '@para-ui/icons/Forbid';
|
|
19
20
|
|
|
20
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/3 下午5:58\n* @description\n*/\n/**\n* @author
|
|
21
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/3 下午5:58\n* @description\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-switch {\n position: relative;\n display: inline-block;\n width: 32px;\n height: 16px;\n vertical-align: middle;\n background-color: transparent;\n border: 0;\n cursor: pointer;\n transition: all 0.2s;\n user-select: none;\n}\n.paraui-v4-switch .component-switch {\n border: none;\n cursor: pointer;\n}\n.paraui-v4-switch:before {\n position: absolute;\n top: 0px;\n left: 0;\n width: 100%;\n height: 16px;\n border-radius: 8px;\n background-color: rgb(212, 218, 227);\n content: \"\";\n transition: all 0.2s;\n}\na .paraui-v4-switch:focus {\n outline: 0;\n box-shadow: none;\n}\n.paraui-v4-switch.component-switch-checked:focus {\n box-shadow: none;\n}\n.paraui-v4-switch:focus:hover {\n box-shadow: none;\n}\n.paraui-v4-switch.component-switch-checked:before {\n background-color: rgb(46, 101, 230);\n}\n.paraui-v4-switch-loading *, .paraui-v4-switch.component-switch-disabled * {\n box-shadow: none;\n}\n.paraui-v4-switch-loading .component-switch-inner::before, .paraui-v4-switch.component-switch-disabled .component-switch-inner::before {\n position: absolute;\n top: 0px;\n left: 0;\n width: 100%;\n height: 16px;\n background-color: rgba(255, 255, 255, 0.5);\n content: \"\";\n z-index: 100;\n}\n.paraui-v4-switch .component-switch-inner {\n display: block;\n margin: 0 7px 0 25px;\n font-size: 14px;\n transition: margin 0.2s;\n}\n.paraui-v4-switch.component-switch-checked .component-switch-inner {\n margin: 0 25px 0 7px;\n}\n.paraui-v4-switch .component-switch-handle {\n position: absolute;\n top: 2px;\n left: 2px;\n width: 12px;\n height: 12px;\n transition: all 0.2s ease-in-out;\n}\n.paraui-v4-switch .component-switch-handle::before {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: rgb(255, 255, 255);\n border-radius: 9px;\n box-shadow: none;\n transition: all 0.2s ease-in-out;\n content: \"\";\n}\n.paraui-v4-switch.component-switch-checked .component-switch-handle {\n left: calc(100% - 14px);\n}\n.paraui-v4-switch.component-switch-checked .component-switch-handle::before {\n background-color: rgb(255, 255, 255);\n}\n.paraui-v4-switch:not(.paraui-v4-switch-disabled):active .component-switch-handle::before {\n right: -30%;\n left: 0;\n}\n.paraui-v4-switch:not(.paraui-v4-switch-disabled):active.component-switch-checked .component-switch-handle::before {\n right: 0;\n left: -30%;\n}\n.paraui-v4-switch .component-switch-loading-icon {\n position: relative;\n top: 1px;\n color: rgb(46, 101, 230);\n font-size: 10px;\n vertical-align: top;\n animation: switchLoadingCircle 1s infinite linear;\n}\n.paraui-v4-switch.component-switch-checked .component-switch-loading-icon {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-switch-small {\n min-width: 28px;\n height: 14px;\n line-height: 14px;\n}\n.paraui-v4-switch-small .component-switch-inner {\n margin: 0 5px 0 18px;\n font-size: 14px;\n}\n.paraui-v4-switch-small .component-switch-handle {\n width: 12px;\n height: 12px;\n top: 3px;\n left: 2px;\n}\n.paraui-v4-switch-small .component-switch-loading-icon {\n top: 1.5px;\n font-size: 9px;\n}\n.paraui-v4-switch-small.component-switch-checked .component-switch-inner {\n margin: 0 18px 0 5px;\n}\n.paraui-v4-switch-small.component-switch-checked .component-switch-handle {\n left: calc(100% - 12px - 2px);\n}\n@keyframes switchLoadingCircle {\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.component-label-box {\n display: flex;\n align-items: center;\n}\n.component-label-box .sup-text {\n color: rgb(92, 101, 115);\n font-size: 14px;\n margin-left: 10px;\n line-height: 16px;\n}\n.component-label-box .sup-text > a {\n text-decoration: none;\n cursor: pointer;\n color: rgb(46, 101, 230);\n}\n\n.paraui-v4-switch-label {\n display: inline-flex;\n align-items: flex-end;\n}\n.paraui-v4-switch-label .component-disabled-text {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-switch-label .component-desc-text {\n margin-bottom: 0;\n margin-right: 10px;\n line-height: 16px;\n color: rgb(29, 33, 38);\n}\n.paraui-v4-switch-label .component-desc-text .paraui-v4-help {\n line-height: 1;\n}\n.paraui-v4-switch-label .component-desc-text .paraui-v4-help svg {\n top: 0;\n}\n.paraui-v4-switch-label .paraui-v4-label-text-container {\n display: flex;\n flex-direction: column;\n}\n\n.paraui-v4-switch-desc-end {\n flex-direction: row-reverse;\n}\n.paraui-v4-switch-desc-end .component-desc-text {\n margin-right: 0;\n}";
|
|
21
22
|
styleInject(css_248z);
|
|
22
23
|
|
|
23
24
|
//Switch 开关
|
|
24
25
|
var Switch = function Switch(props) {
|
|
25
|
-
props.
|
|
26
|
-
props.size;
|
|
26
|
+
props.size;
|
|
27
27
|
var loading = props.loading,
|
|
28
28
|
disabled = props.disabled,
|
|
29
29
|
className = props.className,
|
|
30
30
|
label = props.label,
|
|
31
|
+
_props$required = props.required,
|
|
32
|
+
required = _props$required === void 0 ? false : _props$required,
|
|
33
|
+
desc = props.desc,
|
|
31
34
|
labelTooltip = props.labelTooltip,
|
|
35
|
+
descTooltip = props.descTooltip,
|
|
36
|
+
disabledTooltip = props.disabledTooltip,
|
|
37
|
+
_props$loadingTitle = props.loadingTitle,
|
|
38
|
+
loadingTitle = _props$loadingTitle === void 0 ? "正在执行中" : _props$loadingTitle,
|
|
32
39
|
_props$labelPlacement = props.labelPlacement,
|
|
33
|
-
labelPlacement = _props$labelPlacement === void 0 ?
|
|
34
|
-
|
|
40
|
+
labelPlacement = _props$labelPlacement === void 0 ? "top" : _props$labelPlacement,
|
|
41
|
+
_props$descPlacement = props.descPlacement,
|
|
42
|
+
descPlacement = _props$descPlacement === void 0 ? "start" : _props$descPlacement,
|
|
43
|
+
supText = props.supText,
|
|
44
|
+
restProps = __rest(props, ["size", "loading", "disabled", "className", "label", "required", "desc", "labelTooltip", "descTooltip", "disabledTooltip", "loadingTitle", "labelPlacement", "descPlacement", "supText"]);
|
|
35
45
|
//cls
|
|
36
46
|
var classes = clsx("".concat($prefixCls, "-switch"), _defineProperty({}, "".concat($prefixCls, "-switch-loading"), loading), className);
|
|
37
47
|
//label cls
|
|
38
|
-
var labelClasses = clsx("".concat($prefixCls, "-switch-label"), "".concat($prefixCls, "-switch-label-").concat(labelPlacement));
|
|
48
|
+
var labelClasses = clsx("".concat($prefixCls, "-switch-label"), "".concat($prefixCls, "-switch-label-").concat(labelPlacement), "".concat($prefixCls, "-switch-desc-").concat(descPlacement));
|
|
39
49
|
//loading circle
|
|
40
50
|
var loadingIcon = jsx("div", Object.assign({
|
|
41
51
|
className: "".concat($rcPrefixCls, "-switch-handle")
|
|
@@ -44,28 +54,85 @@ var Switch = function Switch(props) {
|
|
|
44
54
|
className: "".concat($rcPrefixCls, "-switch-loading-icon")
|
|
45
55
|
})
|
|
46
56
|
}));
|
|
47
|
-
|
|
57
|
+
// 开关
|
|
58
|
+
var renderSwitch = function renderSwitch() {
|
|
59
|
+
return disabled && disabledTooltip ? jsx(Tooltip, Object.assign({
|
|
60
|
+
disabled: true
|
|
61
|
+
}, disabledTooltip, {
|
|
62
|
+
children: jsx("span", Object.assign({
|
|
63
|
+
className: classes
|
|
64
|
+
}, {
|
|
65
|
+
children: jsxs("div", Object.assign({
|
|
66
|
+
className: "".concat($rcPrefixCls, "-label-box")
|
|
67
|
+
}, {
|
|
68
|
+
children: [jsx(RcSwitch, Object.assign({}, restProps, {
|
|
69
|
+
prefixCls: "".concat($rcPrefixCls, "-switch"),
|
|
70
|
+
disabled: disabled || loading,
|
|
71
|
+
loadingIcon: loadingIcon
|
|
72
|
+
})), jsx("span", Object.assign({
|
|
73
|
+
className: "sup-text"
|
|
74
|
+
}, {
|
|
75
|
+
children: supText && supText
|
|
76
|
+
}))]
|
|
77
|
+
}))
|
|
78
|
+
}))
|
|
79
|
+
})) : jsx(Fragment, {
|
|
80
|
+
children: loadingTitle && loading ? jsx(Tooltip, Object.assign({
|
|
81
|
+
disabled: true,
|
|
82
|
+
title: loadingTitle
|
|
83
|
+
}, {
|
|
84
|
+
children: jsxs("div", Object.assign({
|
|
85
|
+
className: "".concat($rcPrefixCls, "-label-box")
|
|
86
|
+
}, {
|
|
87
|
+
children: [jsx(RcSwitch, Object.assign({}, restProps, {
|
|
88
|
+
prefixCls: "".concat($rcPrefixCls, "-switch"),
|
|
89
|
+
className: classes,
|
|
90
|
+
disabled: disabled || loading,
|
|
91
|
+
loadingIcon: loadingIcon
|
|
92
|
+
})), jsx("span", Object.assign({
|
|
93
|
+
className: "sup-text"
|
|
94
|
+
}, {
|
|
95
|
+
children: supText && supText
|
|
96
|
+
}))]
|
|
97
|
+
}))
|
|
98
|
+
})) : jsxs("div", Object.assign({
|
|
99
|
+
className: "".concat($rcPrefixCls, "-label-box")
|
|
100
|
+
}, {
|
|
101
|
+
children: [jsx(RcSwitch, Object.assign({}, restProps, {
|
|
102
|
+
prefixCls: "".concat($rcPrefixCls, "-switch"),
|
|
103
|
+
className: classes,
|
|
104
|
+
disabled: disabled || loading,
|
|
105
|
+
loadingIcon: loadingIcon
|
|
106
|
+
})), jsx("span", Object.assign({
|
|
107
|
+
className: "sup-text"
|
|
108
|
+
}, {
|
|
109
|
+
children: supText && supText
|
|
110
|
+
}))]
|
|
111
|
+
}))
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
if (label || desc) {
|
|
48
115
|
return jsxs("span", Object.assign({
|
|
49
116
|
className: labelClasses
|
|
50
117
|
}, {
|
|
51
|
-
children: [jsx(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
})),
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
|
|
118
|
+
children: [desc && jsx(Label, Object.assign({
|
|
119
|
+
label: desc,
|
|
120
|
+
required: required
|
|
121
|
+
}, descTooltip, {
|
|
122
|
+
className: "".concat($rcPrefixCls, "-desc-text ").concat(disabled ? "".concat($rcPrefixCls, "-disabled-text") : "")
|
|
123
|
+
})), jsxs("span", Object.assign({
|
|
124
|
+
className: "".concat($prefixCls, "-label-text-container")
|
|
125
|
+
}, {
|
|
126
|
+
children: [label && jsx(Label, Object.assign({
|
|
127
|
+
label: label,
|
|
128
|
+
required: required
|
|
129
|
+
}, labelTooltip, {
|
|
130
|
+
className: "".concat($rcPrefixCls, "-switch-text ").concat(disabled ? "".concat($rcPrefixCls, "-disabled-text") : "")
|
|
131
|
+
})), renderSwitch()]
|
|
60
132
|
}))]
|
|
61
133
|
}));
|
|
62
134
|
}
|
|
63
|
-
return
|
|
64
|
-
prefixCls: "".concat($rcPrefixCls, "-switch"),
|
|
65
|
-
className: classes,
|
|
66
|
-
disabled: disabled || loading,
|
|
67
|
-
loadingIcon: loadingIcon
|
|
68
|
-
}));
|
|
135
|
+
return renderSwitch();
|
|
69
136
|
};
|
|
70
137
|
|
|
71
138
|
export { Switch, Switch as default };
|