@ccs-ui/rc-pro 1.1.24 → 1.1.25-beta-2
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/es/aj-captcha/index.js +28 -2
- package/es/aj-captcha/index.less +0 -7
- package/package.json +2 -2
package/es/aj-captcha/index.js
CHANGED
|
@@ -14,14 +14,15 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
14
14
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
15
15
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
16
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
|
+
import { Button, Modal, Spin, theme } from 'antd';
|
|
18
|
+
import { useEffect, useRef, useState } from 'react';
|
|
17
19
|
import { CloseOutlined, LeftOutlined, LoadingOutlined, ReloadOutlined, RightOutlined } from '@ant-design/icons';
|
|
18
20
|
import { useEventListener } from 'ahooks';
|
|
19
|
-
import { Button, Modal, Spin } from 'antd';
|
|
20
|
-
import { useEffect, useRef, useState } from 'react';
|
|
21
21
|
import "./index.less";
|
|
22
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
23
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
25
|
+
var useToken = theme.useToken;
|
|
25
26
|
function ShowMsg(_ref) {
|
|
26
27
|
var msg = _ref.msg;
|
|
27
28
|
var _useState = useState(true),
|
|
@@ -115,6 +116,8 @@ function AjCaptchaSliding(_ref2) {
|
|
|
115
116
|
// { target: sliderBarRef },
|
|
116
117
|
// );
|
|
117
118
|
|
|
119
|
+
var _useToken = useToken(),
|
|
120
|
+
token = _useToken.token;
|
|
118
121
|
return /*#__PURE__*/_jsxs(Spin, {
|
|
119
122
|
indicator: /*#__PURE__*/_jsx(LoadingOutlined, {
|
|
120
123
|
style: {
|
|
@@ -124,6 +127,9 @@ function AjCaptchaSliding(_ref2) {
|
|
|
124
127
|
spinning: loadingImg,
|
|
125
128
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
126
129
|
className: "ccs-aj-body",
|
|
130
|
+
style: {
|
|
131
|
+
background: token.colorBgContainerDisabled
|
|
132
|
+
},
|
|
127
133
|
children: [/*#__PURE__*/_jsx("img", {
|
|
128
134
|
className: "ccs-aj-bg",
|
|
129
135
|
src: bgImg ? "data:image/png;base64,".concat(bgImg) : undefined,
|
|
@@ -156,12 +162,22 @@ function AjCaptchaSliding(_ref2) {
|
|
|
156
162
|
}), /*#__PURE__*/_jsxs("div", {
|
|
157
163
|
className: "ccs-aj-slider",
|
|
158
164
|
ref: sliderRef,
|
|
165
|
+
style: {
|
|
166
|
+
background: token.colorBgElevated
|
|
167
|
+
},
|
|
159
168
|
children: [/*#__PURE__*/_jsx("div", {
|
|
160
169
|
className: "ccs-aj-slider-track",
|
|
170
|
+
style: {
|
|
171
|
+
background: token.colorBgContainerDisabled
|
|
172
|
+
},
|
|
161
173
|
children: "\u6309\u4F4F\u6ED1\u5757\uFF0C\u62D6\u52A8\u5B8C\u6210\u4E0A\u65B9\u62FC\u56FE"
|
|
162
174
|
}), /*#__PURE__*/_jsx("div", {
|
|
163
175
|
className: "ccs-aj-slider-bar",
|
|
164
176
|
ref: sliderBarRef,
|
|
177
|
+
style: {
|
|
178
|
+
backgroundColor: token.colorBgBase,
|
|
179
|
+
border: "1px solid ".concat(token.colorBorder)
|
|
180
|
+
},
|
|
165
181
|
children: loadingValid ? /*#__PURE__*/_jsx(LoadingOutlined, {}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
166
182
|
children: [/*#__PURE__*/_jsx(LeftOutlined, {}), /*#__PURE__*/_jsx(RightOutlined, {})]
|
|
167
183
|
})
|
|
@@ -201,6 +217,9 @@ function AjCaptchaWord(_ref3) {
|
|
|
201
217
|
onValid(points, 'wordSelect');
|
|
202
218
|
}
|
|
203
219
|
}, [points.length]);
|
|
220
|
+
var _useToken2 = useToken(),
|
|
221
|
+
token = _useToken2.token;
|
|
222
|
+
console.log('token', token);
|
|
204
223
|
return /*#__PURE__*/_jsxs(Spin, {
|
|
205
224
|
indicator: /*#__PURE__*/_jsx(LoadingOutlined, {
|
|
206
225
|
style: {
|
|
@@ -210,6 +229,9 @@ function AjCaptchaWord(_ref3) {
|
|
|
210
229
|
spinning: loadingImg || loadingValid,
|
|
211
230
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
212
231
|
className: "ccs-aj-body",
|
|
232
|
+
style: {
|
|
233
|
+
background: token.colorBgContainerDisabled
|
|
234
|
+
},
|
|
213
235
|
children: [/*#__PURE__*/_jsx("img", {
|
|
214
236
|
ref: bgImgRef,
|
|
215
237
|
className: "ccs-aj-bg",
|
|
@@ -244,6 +266,10 @@ function AjCaptchaWord(_ref3) {
|
|
|
244
266
|
})]
|
|
245
267
|
}), /*#__PURE__*/_jsxs("div", {
|
|
246
268
|
className: "ccs-aj-word-slider",
|
|
269
|
+
style: {
|
|
270
|
+
color: token.colorTextLabel,
|
|
271
|
+
border: "1px solid ".concat(token.colorTextLabel)
|
|
272
|
+
},
|
|
247
273
|
children: ["\u8BF7\u4F9D\u6B21\u70B9\u51FB\u3010", words === null || words === void 0 ? void 0 : words.join(', '), "\u3011"]
|
|
248
274
|
})]
|
|
249
275
|
});
|
package/es/aj-captcha/index.less
CHANGED
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
|
|
18
18
|
.ccs-aj-body {
|
|
19
19
|
position: relative;
|
|
20
|
-
background-color: #f5f6f7;
|
|
21
20
|
}
|
|
22
21
|
|
|
23
22
|
.ccs-aj-btn {
|
|
@@ -48,13 +47,11 @@
|
|
|
48
47
|
.ccs-aj-slider {
|
|
49
48
|
position: relative;
|
|
50
49
|
height: 40px;
|
|
51
|
-
background-color: #fff;
|
|
52
50
|
}
|
|
53
51
|
|
|
54
52
|
.ccs-aj-slider-track {
|
|
55
53
|
height: 30px;
|
|
56
54
|
margin-top: 10px;
|
|
57
|
-
background-color: #f5f6f7;
|
|
58
55
|
text-align: center;
|
|
59
56
|
line-height: 30px;
|
|
60
57
|
border-radius: 15px;
|
|
@@ -66,16 +63,12 @@
|
|
|
66
63
|
width: 40px;
|
|
67
64
|
position: absolute;
|
|
68
65
|
bottom: 5px;
|
|
69
|
-
background: #fff;
|
|
70
66
|
border-radius: 50%;
|
|
71
67
|
display: flex;
|
|
72
68
|
align-items: center;
|
|
73
69
|
justify-content: center;
|
|
74
70
|
color: gray;
|
|
75
71
|
font-size: 12px;
|
|
76
|
-
box-shadow: 0 0 3px #ccc;
|
|
77
|
-
background-color: #f5f6f7;
|
|
78
|
-
border: 1px solid #e1e1e1;
|
|
79
72
|
cursor: move;
|
|
80
73
|
|
|
81
74
|
&:hover {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ccs-ui/rc-pro",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.1.25-beta-2",
|
|
4
|
+
"description": "验证码组件兼容暗黑模式;",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Hong",
|