@para-ui/core 3.0.85 → 4.0.0-alpha

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.
Files changed (263) hide show
  1. package/AutoBox/index.js +18 -19
  2. package/AutoTips/index.js +5 -4
  3. package/Breadcrumbs/index.js +5 -4
  4. package/Button/SplitButton.d.ts +13 -0
  5. package/Button/index.d.ts +1 -1
  6. package/Button/index.js +54 -12
  7. package/ButtonGroup/index.js +6 -5
  8. package/Carousel/index.d.ts +5 -5
  9. package/Carousel/index.js +21 -9
  10. package/Cascader/Cascader.d.ts +99 -0
  11. package/Cascader/OptionList/CacheContent.d.ts +7 -0
  12. package/Cascader/OptionList/Column.d.ts +21 -0
  13. package/Cascader/OptionList/index.d.ts +4 -0
  14. package/Cascader/OptionList/useActive.d.ts +6 -0
  15. package/Cascader/context.d.ts +23 -0
  16. package/Cascader/hooks/useDisplayValues.d.ts +10 -0
  17. package/Cascader/hooks/useEntities.d.ts +10 -0
  18. package/Cascader/hooks/useMissingValues.d.ts +3 -0
  19. package/Cascader/index.d.ts +3 -58
  20. package/Cascader/index.js +28 -177
  21. package/Cascader/utils/commonUtil.d.ts +18 -0
  22. package/Cascader/utils/treeUtil.d.ts +55 -0
  23. package/Checkbox/index.d.ts +7 -0
  24. package/Checkbox/index.js +50 -29
  25. package/CheckboxGroup/index.d.ts +3 -1
  26. package/CheckboxGroup/index.js +48 -18
  27. package/Collapse/index.js +2 -2
  28. package/Collapse/motion.d.ts +0 -2
  29. package/CollapseBox/index.js +3 -3
  30. package/CollapseLayout/index.d.ts +5 -0
  31. package/CollapseLayout/index.js +144 -22
  32. package/ColorPicker/chromePicker/index.d.ts +9 -0
  33. package/ColorPicker/compactPicker/index.d.ts +9 -0
  34. package/ColorPicker/config.d.ts +5 -0
  35. package/ColorPicker/index.d.ts +4 -1
  36. package/ColorPicker/index.js +7 -3
  37. package/ColorPicker/sketchPicker/index.d.ts +11 -0
  38. package/ColorPicker/swatchesPicker/index.d.ts +9 -0
  39. package/ComboSelect/index.js +14 -12
  40. package/Container/index.js +2 -2
  41. package/CopyText/index.d.ts +33 -0
  42. package/CopyText/index.js +180 -0
  43. package/DatePicker/generatePicker/generateRangePicker.d.ts +9 -2
  44. package/DatePicker/generatePicker/generateSinglePicker.d.ts +8 -8
  45. package/DatePicker/generatePicker/index.d.ts +32 -26
  46. package/DatePicker/generatePicker/interface.d.ts +12 -0
  47. package/DatePicker/index.d.ts +12 -8
  48. package/DatePicker/index.js +367 -454
  49. package/DatePicker/util.d.ts +40 -4
  50. package/Desktop/index.d.ts +16 -3
  51. package/Desktop/index.js +177 -68
  52. package/Desktop/lang/en_US.d.ts +6 -0
  53. package/Desktop/lang/index.d.ts +13 -0
  54. package/Desktop/lang/zh_CN.d.ts +6 -0
  55. package/DragVerify/index.js +9 -100
  56. package/Drawer/index.js +8 -8
  57. package/Drawer/interface.d.ts +2 -2
  58. package/Dropdown/index.js +2 -2
  59. package/DynamicMultiBox/index.js +57 -41
  60. package/DynamicMultiBox/interface.d.ts +4 -4
  61. package/Empty/index.js +2 -2
  62. package/Form/index.d.ts +20 -26
  63. package/Form/index.js +48 -69
  64. package/FormItem/index.js +15 -15
  65. package/FunctionModal/index.js +11 -9
  66. package/GlobalContext/constant.d.ts +1 -1
  67. package/GlobalContext/index.js +2 -2
  68. package/Help/index.js +4 -3
  69. package/HelperText/index.js +2 -2
  70. package/InputLang/index.d.ts +5 -0
  71. package/InputLang/index.js +35 -29
  72. package/InputNumber/index.d.ts +5 -0
  73. package/InputNumber/index.js +95 -80
  74. package/Label/index.js +4 -3
  75. package/Loading/index.js +2 -2
  76. package/Menu/index.js +114 -39
  77. package/Menu/interface.d.ts +8 -0
  78. package/Message/index.d.ts +4 -4
  79. package/Message/index.js +13 -11
  80. package/Modal/index.js +29 -15
  81. package/MultiBox/index.js +9 -8
  82. package/Notification/index.d.ts +9 -1
  83. package/Notification/index.js +29 -15
  84. package/OperateBtn/index.js +28 -11
  85. package/PageHeader/index.js +270 -74
  86. package/PageHeader/interface.d.ts +17 -0
  87. package/Pagination/index.d.ts +4 -3
  88. package/Pagination/index.js +117 -95
  89. package/Pagination/lang/en_US.d.ts +3 -2
  90. package/Pagination/lang/index.d.ts +6 -4
  91. package/Pagination/lang/zh_CN.d.ts +3 -2
  92. package/ParauiProvider/index.js +4 -4
  93. package/PasswordRules/index.js +5 -5
  94. package/PopConfirm/index.d.ts +15 -5
  95. package/PopConfirm/index.js +62 -16
  96. package/Popover/index.js +4 -3
  97. package/Progress/index.js +10 -9
  98. package/Querying/index.js +7 -7
  99. package/README.md +41 -1114
  100. package/Radio/index.d.ts +7 -0
  101. package/Radio/index.js +49 -27
  102. package/RadioGroup/index.d.ts +3 -1
  103. package/RadioGroup/index.js +48 -21
  104. package/Search/index.d.ts +3 -15
  105. package/Search/index.js +21 -83
  106. package/Select/index.d.ts +7 -2
  107. package/Select/index.js +114 -91
  108. package/Select/lang/en_US.d.ts +1 -1
  109. package/Select/lang/index.d.ts +2 -2
  110. package/Select/lang/zh_CN.d.ts +1 -1
  111. package/SelectInput/index.js +8 -7
  112. package/Selector/index.js +30 -22
  113. package/SelectorPicker/index.d.ts +5 -0
  114. package/SelectorPicker/index.js +47 -32
  115. package/SelectorPicker/lang/en_US.d.ts +1 -0
  116. package/SelectorPicker/lang/index.d.ts +2 -0
  117. package/SelectorPicker/lang/zh_CN.d.ts +1 -0
  118. package/SingleBox/index.js +8 -7
  119. package/Slider/index.js +5 -5
  120. package/Status/index.d.ts +6 -5
  121. package/Status/index.js +27 -4
  122. package/Stepper/index.d.ts +9 -10
  123. package/Stepper/index.js +69 -29
  124. package/Styles/index.scss +4 -0
  125. package/Styles/scrollbar.scss +24 -24
  126. package/Styles/theme.scss +104 -57
  127. package/Switch/index.d.ts +34 -14
  128. package/Switch/index.js +97 -30
  129. package/Table/index.js +33 -27
  130. package/Table/interface.d.ts +3 -1
  131. package/Table/tableHeadInterface.d.ts +1 -1
  132. package/Table/tablePaginationInterface.d.ts +5 -5
  133. package/Tabs/index.d.ts +11 -1
  134. package/Tabs/index.js +49 -16
  135. package/Tag/TagGroup.d.ts +11 -7
  136. package/Tag/index.d.ts +22 -7
  137. package/Tag/index.js +1382 -53
  138. package/TextEditor/index.js +4 -3
  139. package/TextField/index.d.ts +5 -0
  140. package/TextField/index.js +55 -38
  141. package/TimePicker/index.d.ts +5 -0
  142. package/TimePicker/index.js +39 -23
  143. package/Timeline/TimelineItem.d.ts +1 -1
  144. package/Timeline/index.d.ts +5 -5
  145. package/Timeline/index.js +21 -18
  146. package/Title/index.d.ts +15 -3
  147. package/Title/index.js +95 -29
  148. package/ToggleButton/ToggleButtonGroup.d.ts +1 -0
  149. package/ToggleButton/index.d.ts +4 -0
  150. package/ToggleButton/index.js +14 -52
  151. package/Tooltip/index.js +28 -34
  152. package/Tooltip/interface.d.ts +4 -10
  153. package/Tooltip/utils.d.ts +1 -3
  154. package/Transfer/index.d.ts +3 -3
  155. package/Transfer/index.js +72 -68
  156. package/Tree/Tree.d.ts +2 -2
  157. package/Tree/index.js +10 -9
  158. package/Tree/utils/treeUtil.d.ts +0 -7
  159. package/Upload/index.js +16 -14
  160. package/_verture/{constant-66aa48a1.js → constant-0d9802f7.js} +1 -1
  161. package/_verture/{defineProperty-62acccfc.js → defineProperty-1d116156.js} +1 -1
  162. package/_verture/index-5c77417d.js +150 -0
  163. package/_verture/index-68db2bc3.js +10530 -0
  164. package/_verture/{index-11e04b7f.js → index-7ec72724.js} +44 -38
  165. package/_verture/index-d63bd287.js +327 -0
  166. package/_verture/{index-c23dc3b0.js → index-e6f85fd5.js} +7 -8
  167. package/_verture/{index-77f9e0fb.js → index-e9007d6a.js} +6 -6
  168. package/_verture/{intl-4a9f1b44.js → intl-5c1ec055.js} +1 -1
  169. package/_verture/{modalContext-20780c9a.js → modalContext-c12ca3e8.js} +3 -3
  170. package/_verture/slicedToArray-a8206399.js +43 -0
  171. package/_verture/{toConsumableArray-81040c9e.js → toConsumableArray-8f4c9589.js} +1 -1
  172. package/_verture/typeof-adeedc13.js +11 -0
  173. package/_verture/typeof-b240b062.js +16 -0
  174. package/_verture/{utils-c9b9a157.js → utils-f0e81540.js} +8 -8
  175. package/index.d.ts +2 -2
  176. package/index.js +32 -27
  177. package/locale/en-US.d.ts +10 -6
  178. package/locale/index.d.ts +20 -12
  179. package/locale/index.js +33 -25
  180. package/locale/zh-CN.d.ts +10 -6
  181. package/package.json +25 -11
  182. package/umd/AutoBox.js +20 -21
  183. package/umd/AutoTips.js +31 -4
  184. package/umd/Breadcrumbs.js +7 -7
  185. package/umd/Button.js +7 -8
  186. package/umd/ButtonGroup.js +7 -8
  187. package/umd/Carousel.js +29 -1
  188. package/umd/Cascader.js +20 -21
  189. package/umd/Checkbox.js +7 -7
  190. package/umd/CheckboxGroup.js +7 -7
  191. package/umd/Collapse.js +19 -21
  192. package/umd/CollapseBox.js +1 -1
  193. package/umd/CollapseLayout.js +4 -4
  194. package/umd/ColorPicker.js +1 -1
  195. package/umd/ComboSelect.js +7 -7
  196. package/umd/Container.js +1 -1
  197. package/umd/CopyText.js +42 -0
  198. package/umd/DatePicker.js +7 -7
  199. package/umd/Desktop.js +7 -7
  200. package/umd/DragVerify.js +4 -4
  201. package/umd/Drawer.js +7 -8
  202. package/umd/Dropdown.js +3 -3
  203. package/umd/DynamicMultiBox.js +7 -7
  204. package/umd/Empty.js +1 -1
  205. package/umd/Form.js +6 -6
  206. package/umd/FormItem.js +6 -6
  207. package/umd/FunctionModal.js +7 -7
  208. package/umd/Help.js +7 -7
  209. package/umd/HelperText.js +1 -1
  210. package/umd/InputLang.js +7 -7
  211. package/umd/InputNumber.js +7 -7
  212. package/umd/Label.js +7 -7
  213. package/umd/Loading.js +4 -5
  214. package/umd/Menu.js +4 -4
  215. package/umd/Message.js +3 -4
  216. package/umd/Modal.js +7 -7
  217. package/umd/MultiBox.js +7 -7
  218. package/umd/Notification.js +5 -6
  219. package/umd/OperateBtn.js +7 -7
  220. package/umd/PageHeader.js +7 -7
  221. package/umd/Pagination.js +7 -7
  222. package/umd/ParauiProvider.js +1 -1
  223. package/umd/PasswordRules.js +3 -4
  224. package/umd/PopConfirm.js +7 -7
  225. package/umd/Popover.js +31 -4
  226. package/umd/Progress.js +4 -5
  227. package/umd/Querying.js +1 -1
  228. package/umd/Radio.js +7 -7
  229. package/umd/RadioGroup.js +7 -7
  230. package/umd/Search.js +7 -7
  231. package/umd/Select.js +7 -7
  232. package/umd/SelectInput.js +7 -7
  233. package/umd/Selector.js +7 -7
  234. package/umd/SelectorPicker.js +7 -7
  235. package/umd/SingleBox.js +7 -7
  236. package/umd/Slider.js +3 -3
  237. package/umd/Status.js +29 -1
  238. package/umd/Stepper.js +20 -20
  239. package/umd/Switch.js +7 -7
  240. package/umd/Table.js +7 -7
  241. package/umd/Tabs.js +7 -7
  242. package/umd/Tag.js +7 -8
  243. package/umd/TextEditor.js +19 -19
  244. package/umd/TextField.js +7 -7
  245. package/umd/TimePicker.js +7 -7
  246. package/umd/Timeline.js +1 -1
  247. package/umd/Title.js +42 -1
  248. package/umd/ToggleButton.js +7 -8
  249. package/umd/Tooltip.js +31 -4
  250. package/umd/Transfer.js +8 -8
  251. package/umd/Tree.js +7 -7
  252. package/umd/Upload.js +8 -8
  253. package/umd/locale.js +1 -1
  254. package/Cascader/lang/en_US.d.ts +0 -4
  255. package/Cascader/lang/index.d.ts +0 -9
  256. package/Cascader/lang/zh_CN.d.ts +0 -4
  257. package/Split/index.d.ts +0 -7
  258. package/Split/index.js +0 -123
  259. package/_verture/index-a369ca3f.js +0 -4
  260. package/_verture/index-beef914f.js +0 -340
  261. package/_verture/slicedToArray-76060636.js +0 -43
  262. package/_verture/typeof-498dd2b1.js +0 -11
  263. package/umd/Split.js +0 -1
@@ -2,7 +2,7 @@
2
2
  ::-webkit-scrollbar {
3
3
  width: 6px;
4
4
  height: 6px;
5
- background-color: $B8; // 背景色
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: $D3;
15
+ background: $T3;
16
16
  border-radius: 6px;
17
17
  }
18
18
 
19
19
  // 边角
20
20
  ::-webkit-scrollbar-corner {
21
- background: $Z9;
21
+ background: $A2;
22
22
  }
23
23
 
24
24
  // 鼠标移入上去
25
25
  ::-webkit-scrollbar-thumb:hover {
26
- background: $B6;
26
+ background: $A1;
27
27
  }
28
28
 
29
29
  // 鼠标点击
30
30
  ::-webkit-scrollbar-thumb:active {
31
- background: $B6;
31
+ background: $A1;
32
32
  }
33
33
 
34
34
  // 浏览器失焦的样式
35
35
  ::-webkit-scrollbar-thumb:window-inactive {
36
- background-color: $D3;
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: $B7; // 背景色
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: $B9;
76
+ background: $A1;
77
77
  }
78
78
 
79
79
  // 边角
80
80
  ::-webkit-scrollbar-corner {
81
- background: $Z10;
81
+ background: $T2;
82
82
  }
83
83
 
84
84
  // 鼠标移入上去
85
85
  ::-webkit-scrollbar-thumb:hover {
86
- background: $B6;
86
+ background: $T3;
87
87
  }
88
88
 
89
89
  // 鼠标点击
90
90
  ::-webkit-scrollbar-thumb:active {
91
- background: $B6;
91
+ background: $T3;
92
92
  }
93
93
 
94
94
  // 浏览器失焦的样式
95
95
  ::-webkit-scrollbar-thumb:window-inactive {
96
- background-color: $B9;
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: $B7; // 背景色
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: $B9;
138
+ background: $A1;
139
139
  }
140
140
 
141
141
  // 边角
142
142
  ::-webkit-scrollbar-corner {
143
- background: $Z10;
143
+ background: $T2;
144
144
  }
145
145
 
146
146
  // 鼠标移入上去
147
147
  ::-webkit-scrollbar-thumb:hover {
148
- background: $B6;
148
+ background: $T3;
149
149
  }
150
150
 
151
151
  // 鼠标点击
152
152
  ::-webkit-scrollbar-thumb:active {
153
- background: $B6;
153
+ background: $T3;
154
154
  }
155
155
 
156
156
  // 浏览器失焦的样式
157
157
  ::-webkit-scrollbar-thumb:window-inactive {
158
- background-color: $B9;
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: $B7; // 背景色
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: $B9;
200
+ background: $A1;
201
201
  }
202
202
 
203
203
  // 边角
204
204
  ::-webkit-scrollbar-corner {
205
- background: $Z10;
205
+ background: $T2;
206
206
  }
207
207
 
208
208
  // 鼠标移入上去
209
209
  ::-webkit-scrollbar-thumb:hover {
210
- background: $B6;
210
+ background: $T3;
211
211
  }
212
212
 
213
213
  // 鼠标点击
214
214
  ::-webkit-scrollbar-thumb:active {
215
- background: $B6;
215
+ background: $T3;
216
216
  }
217
217
 
218
218
  // 浏览器失焦的样式
219
219
  ::-webkit-scrollbar-thumb:window-inactive {
220
- background-color: $B9;
220
+ background-color: $A1;
221
221
  }
222
222
  }
223
223
  }
package/Styles/theme.scss CHANGED
@@ -1,74 +1,121 @@
1
1
  /**
2
- * @author Hanz
3
- * @date 2021/10/20 下午2:08
4
- * @description color
2
+ * @author linhd
3
+ * @date 2023/4/11 14:16
4
+ * @description 最新色卡
5
5
  */
6
+
6
7
  // 组件库前缀
7
- $prefixCls: 'paraui-v3';
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
- $light: 300;
53
- // 实色
54
- $Z1: rgba(248, 249, 251, 1);
55
- $Z2: rgba(237, 241, 249, 1);
56
- $Z3: rgba(227, 234, 247, 1);
57
- $Z4: rgba(245, 246, 247, 1);
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
- //全局弹窗index,往body里面插入的,比如toolTip,popover这类
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
- * @author Hanz
3
- * @date 2021/8/5
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?: 'small' | 'default';
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
- autoFocus?: boolean;
55
+ loadingTitle?: string;
60
56
  /**
61
- * 紧凑型开关
57
+ * 自动获得焦点
62
58
  */
63
- compact?: boolean;
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?: 'top' | 'bottom' | 'start' | 'end';
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-62acccfc.js';
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 LoadingOutlined from '@para-ui/icons/LoadingF';
7
+ import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-0d9802f7.js';
7
8
  import Label from '../Label/index.js';
8
- import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-66aa48a1.js';
9
+ import { Tooltip } from '../Tooltip/index.js';
9
10
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
10
- import '../_verture/typeof-498dd2b1.js';
11
+ import '../_verture/typeof-adeedc13.js';
11
12
  import '../Help/index.js';
12
- import '../Tooltip/index.js';
13
- import '../_verture/slicedToArray-76060636.js';
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/Help';
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 Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-switch {\n position: relative;\n display: inline-block;\n min-width: 32px;\n height: 18px;\n vertical-align: middle;\n background-color: transparent;\n border: 0;\n border-radius: 100px;\n cursor: pointer;\n transition: all 0.2s;\n user-select: none;\n}\n.paraui-v3-switch:before {\n position: absolute;\n top: 2px;\n left: 0;\n width: 100%;\n height: 14px;\n border-radius: 100px;\n background-color: rgba(171, 176, 185, 0.4);\n content: \"\";\n transition: all 0.2s;\n}\n.paraui-v3-switch:focus {\n outline: 0;\n box-shadow: none;\n}\n.paraui-v3-switch.component-switch-checked:focus {\n box-shadow: none;\n}\n.paraui-v3-switch:focus:hover {\n box-shadow: none;\n}\n.paraui-v3-switch.component-switch-checked:before {\n background-color: rgba(54, 102, 214, 0.2);\n}\n.paraui-v3-switch-loading, .paraui-v3-switch.component-switch-disabled {\n cursor: not-allowed;\n opacity: 0.4;\n}\n.paraui-v3-switch-loading *, .paraui-v3-switch.component-switch-disabled * {\n box-shadow: none;\n cursor: not-allowed;\n}\n.paraui-v3-switch .component-switch-inner {\n display: block;\n margin: 0 7px 0 25px;\n color: rgb(255, 255, 255);\n font-size: 14px;\n transition: margin 0.2s;\n}\n.paraui-v3-switch.component-switch-checked .component-switch-inner {\n margin: 0 25px 0 7px;\n}\n.paraui-v3-switch .component-switch-handle {\n position: absolute;\n top: 0;\n left: 0;\n width: 18px;\n height: 18px;\n transition: all 0.2s ease-in-out;\n}\n.paraui-v3-switch .component-switch-handle::before {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: #8996AA;\n border-radius: 9px;\n box-shadow: none;\n transition: all 0.2s ease-in-out;\n content: \"\";\n}\n.paraui-v3-switch.component-switch-checked .component-switch-handle {\n left: calc(100% - 18px);\n}\n.paraui-v3-switch.component-switch-checked .component-switch-handle::before {\n background-color: rgb(54, 102, 214);\n}\n.paraui-v3-switch:not(.paraui-v3-switch-disabled):active .component-switch-handle::before {\n right: -30%;\n left: 0;\n}\n.paraui-v3-switch:not(.paraui-v3-switch-disabled):active.component-switch-checked .component-switch-handle::before {\n right: 0;\n left: -30%;\n}\n.paraui-v3-switch .component-switch-loading-icon {\n position: relative;\n top: 1px;\n color: rgb(54, 102, 214);\n vertical-align: top;\n animation: switchLoadingCircle 1s infinite linear;\n}\n.paraui-v3-switch.component-switch-checked .component-switch-loading-icon {\n color: rgb(255, 255, 255);\n}\n.paraui-v3-switch-small {\n min-width: 28px;\n height: 14px;\n line-height: 14px;\n}\n.paraui-v3-switch-small .component-switch-inner {\n margin: 0 5px 0 18px;\n font-size: 14px;\n}\n.paraui-v3-switch-small .component-switch-handle {\n width: 12px;\n height: 12px;\n top: 3px;\n left: 2px;\n}\n.paraui-v3-switch-small .component-switch-loading-icon {\n top: 1.5px;\n font-size: 9px;\n}\n.paraui-v3-switch-small.component-switch-checked .component-switch-inner {\n margin: 0 18px 0 5px;\n}\n.paraui-v3-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.paraui-v3-switch-label {\n display: inline-flex;\n}\n.paraui-v3-switch-label .component-switch-text {\n color: rgba(46, 55, 67, 0.7);\n font-size: 14px;\n font-weight: 400;\n}\n.paraui-v3-switch-label-top {\n flex-direction: column-reverse;\n align-items: flex-start;\n}\n.paraui-v3-switch-label-top .component-switch-text {\n margin-bottom: 8px;\n}\n.paraui-v3-switch-label-bottom {\n flex-direction: column;\n align-items: flex-start;\n}\n.paraui-v3-switch-label-bottom .component-switch-text {\n margin-top: 8px;\n margin-bottom: 0;\n}\n.paraui-v3-switch-label-start {\n flex-direction: row-reverse;\n align-items: center;\n}\n.paraui-v3-switch-label-start .component-switch-text {\n margin-right: 8px;\n margin-bottom: 0;\n}\n.paraui-v3-switch-label-end {\n flex-direction: row;\n align-items: center;\n}\n.paraui-v3-switch-label-end .component-switch-text {\n margin-left: 8px;\n margin-bottom: 0;\n}";
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.compact;
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 ? 'top' : _props$labelPlacement,
34
- restProps = __rest(props, ["compact", "size", "loading", "disabled", "className", "label", "labelTooltip", "labelPlacement"]);
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
- if (label) {
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(RcSwitch, Object.assign({}, restProps, {
52
- prefixCls: "".concat($rcPrefixCls, "-switch"),
53
- className: classes,
54
- disabled: disabled || loading,
55
- loadingIcon: loadingIcon
56
- })), jsx(Label, Object.assign({
57
- label: label
58
- }, labelTooltip, {
59
- className: "".concat($rcPrefixCls, "-switch-text")
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 jsx(RcSwitch, Object.assign({}, restProps, {
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 };