@astral/ui 4.31.0 → 4.31.1
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/components/CodeField/CodeField.js +1 -1
- package/components/CodeField/{Resend/320/241odeButton/Resend/320/241odeButton.d.ts → ResendCodeButton/ResendCodeButton.d.ts} +2 -2
- package/components/CodeField/{Resend/320/241odeButton/Resend/320/241odeButton.js → ResendCodeButton/ResendCodeButton.js} +1 -2
- package/components/CodeField/ResendCodeButton/index.d.ts +1 -0
- package/components/CodeField/ResendCodeButton/index.js +1 -0
- package/node/components/CodeField/CodeField.js +2 -5
- package/node/components/CodeField/{Resend/320/241odeButton/Resend/320/241odeButton.d.ts → ResendCodeButton/ResendCodeButton.d.ts} +2 -2
- package/node/components/CodeField/{Resend/320/241odeButton/Resend/320/241odeButton.js → ResendCodeButton/ResendCodeButton.js} +2 -1
- package/node/components/CodeField/ResendCodeButton/index.d.ts +1 -0
- package/node/components/CodeField/{Resend/320/241odeButton → ResendCodeButton}/index.js +1 -1
- package/package.json +1 -1
- package/components/CodeField/Resend/320/241odeButton/index.d.ts +0 -1
- package/components/CodeField/Resend/320/241odeButton/index.js +0 -1
- package/node/components/CodeField/Resend/320/241odeButton/index.d.ts +0 -1
- /package/components/CodeField/{Resend/320/241odeButton/styles.d.ts" → ResendCodeButton/styles.d.ts} +0 -0
- /package/components/CodeField/{Resend/320/241odeButton/styles.js" → ResendCodeButton/styles.js} +0 -0
- /package/node/components/CodeField/{Resend/320/241odeButton/styles.d.ts" → ResendCodeButton/styles.d.ts} +0 -0
- /package/node/components/CodeField/{Resend/320/241odeButton/styles.js" → ResendCodeButton/styles.js} +0 -0
|
@@ -4,7 +4,7 @@ import { useHidePersonalData } from '../personalDataSecurity';
|
|
|
4
4
|
import { Skeleton } from '../Skeleton';
|
|
5
5
|
import { ERROR_TEXT_DEFAULT, RESEND_TIMEOUT_DEFAULT } from './constants';
|
|
6
6
|
import { useCodeState, useFocusInput } from './hooks';
|
|
7
|
-
import ResendCodeButton from './
|
|
7
|
+
import { ResendCodeButton } from './ResendCodeButton';
|
|
8
8
|
import { Digit, DigitsItem, DigitsWrapper, FieldLabel, StyledHelperText, Wrapper, } from './styles';
|
|
9
9
|
/**
|
|
10
10
|
* Поле для ввода кода подтверждения
|
|
@@ -20,5 +20,5 @@ type ResendCodeButtonProps = {
|
|
|
20
20
|
*/
|
|
21
21
|
clearCodeValue: () => void;
|
|
22
22
|
};
|
|
23
|
-
declare const ResendCodeButton: ({ loading, disabled, resendTimeout, onResendCode, clearCodeValue, }: ResendCodeButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export
|
|
23
|
+
export declare const ResendCodeButton: ({ loading, disabled, resendTimeout, onResendCode, clearCodeValue, }: ResendCodeButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -4,7 +4,7 @@ import { Button } from '../../Button';
|
|
|
4
4
|
import { Typography } from '../../Typography';
|
|
5
5
|
import { useSecondsCountdown } from '../../useSecondsCountDown';
|
|
6
6
|
import { Wrapper } from './styles';
|
|
7
|
-
const ResendCodeButton = ({ loading, disabled, resendTimeout, onResendCode, clearCodeValue, }) => {
|
|
7
|
+
export const ResendCodeButton = ({ loading, disabled, resendTimeout, onResendCode, clearCodeValue, }) => {
|
|
8
8
|
const { isActive, textTime: time, restart, } = useSecondsCountdown({
|
|
9
9
|
seconds: resendTimeout,
|
|
10
10
|
});
|
|
@@ -31,4 +31,3 @@ const ResendCodeButton = ({ loading, disabled, resendTimeout, onResendCode, clea
|
|
|
31
31
|
};
|
|
32
32
|
return (_jsxs(Wrapper, { children: [_jsx(Button, { variant: "link", disabled: disableButton, onClick: onClick, children: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434 \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E" }), showTimer && (_jsx(Typography, { color: "grey", colorIntensity: "700", children: time }))] }));
|
|
33
33
|
};
|
|
34
|
-
export default ResendCodeButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ResendCodeButton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ResendCodeButton';
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.CodeField = void 0;
|
|
7
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
@@ -10,7 +7,7 @@ const personalDataSecurity_1 = require("../personalDataSecurity");
|
|
|
10
7
|
const Skeleton_1 = require("../Skeleton");
|
|
11
8
|
const constants_1 = require("./constants");
|
|
12
9
|
const hooks_1 = require("./hooks");
|
|
13
|
-
const
|
|
10
|
+
const ResendCodeButton_1 = require("./ResendCodeButton");
|
|
14
11
|
const styles_1 = require("./styles");
|
|
15
12
|
/**
|
|
16
13
|
* Поле для ввода кода подтверждения
|
|
@@ -29,5 +26,5 @@ exports.CodeField = (0, react_1.forwardRef)(({ label, resendTimeout = constants_
|
|
|
29
26
|
});
|
|
30
27
|
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { ref: ref, children: [label && (0, jsx_runtime_1.jsx)(styles_1.FieldLabel, { children: label }), (0, jsx_runtime_1.jsx)(styles_1.DigitsWrapper, { children: codeValue.map((value, index) => (
|
|
31
28
|
// biome-ignore lint/suspicious/noArrayIndexKey: Элементы статичны
|
|
32
|
-
(0, jsx_runtime_1.jsx)(styles_1.DigitsItem, { children: loading ? ((0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { variant: "rounded", height: 60, children: (0, jsx_runtime_1.jsx)(styles_1.Digit, { disabled: true }) })) : ((0, jsx_runtime_1.jsx)(styles_1.Digit, { className: hidePersonalDataClassname, "$isError": isError, type: "text", inputMode: "numeric", pattern: "[0-9]", disabled: disabled, value: value ?? '', ref: setRef(index), onKeyUp: (e) => onKeyUp(e, index), onKeyDown: (e) => onKeyDown(e, index), onChange: (e) => onChange(e, index), onPaste: (e) => !disabled && onPaste(e) })) }, index))) }), isError && (0, jsx_runtime_1.jsx)(styles_1.StyledHelperText, { error: true, children: errorText }), isAllowResendCode && ((0, jsx_runtime_1.jsx)(
|
|
29
|
+
(0, jsx_runtime_1.jsx)(styles_1.DigitsItem, { children: loading ? ((0, jsx_runtime_1.jsx)(Skeleton_1.Skeleton, { variant: "rounded", height: 60, children: (0, jsx_runtime_1.jsx)(styles_1.Digit, { disabled: true }) })) : ((0, jsx_runtime_1.jsx)(styles_1.Digit, { className: hidePersonalDataClassname, "$isError": isError, type: "text", inputMode: "numeric", pattern: "[0-9]", disabled: disabled, value: value ?? '', ref: setRef(index), onKeyUp: (e) => onKeyUp(e, index), onKeyDown: (e) => onKeyDown(e, index), onChange: (e) => onChange(e, index), onPaste: (e) => !disabled && onPaste(e) })) }, index))) }), isError && (0, jsx_runtime_1.jsx)(styles_1.StyledHelperText, { error: true, children: errorText }), isAllowResendCode && ((0, jsx_runtime_1.jsx)(ResendCodeButton_1.ResendCodeButton, { resendTimeout: resendTimeout, disabled: disabled, loading: loading, onResendCode: onResendCode, clearCodeValue: clearCodeValue }))] }));
|
|
33
30
|
});
|
|
@@ -20,5 +20,5 @@ type ResendCodeButtonProps = {
|
|
|
20
20
|
*/
|
|
21
21
|
clearCodeValue: () => void;
|
|
22
22
|
};
|
|
23
|
-
declare const ResendCodeButton: ({ loading, disabled, resendTimeout, onResendCode, clearCodeValue, }: ResendCodeButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export
|
|
23
|
+
export declare const ResendCodeButton: ({ loading, disabled, resendTimeout, onResendCode, clearCodeValue, }: ResendCodeButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ResendCodeButton = void 0;
|
|
3
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
5
|
const react_1 = require("react");
|
|
5
6
|
const Button_1 = require("../../Button");
|
|
@@ -33,4 +34,4 @@ const ResendCodeButton = ({ loading, disabled, resendTimeout, onResendCode, clea
|
|
|
33
34
|
};
|
|
34
35
|
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { variant: "link", disabled: disableButton, onClick: onClick, children: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043A\u043E\u0434 \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u043E" }), showTimer && ((0, jsx_runtime_1.jsx)(Typography_1.Typography, { color: "grey", colorIntensity: "700", children: time }))] }));
|
|
35
36
|
};
|
|
36
|
-
exports.
|
|
37
|
+
exports.ResendCodeButton = ResendCodeButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ResendCodeButton';
|
|
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./ResendCodeButton"), exports);
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ResendСodeButton';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ResendСodeButton';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ResendСodeButton';
|
/package/components/CodeField/{Resend/320/241odeButton/styles.d.ts" → ResendCodeButton/styles.d.ts}
RENAMED
|
File without changes
|
/package/components/CodeField/{Resend/320/241odeButton/styles.js" → ResendCodeButton/styles.js}
RENAMED
|
File without changes
|
|
File without changes
|
/package/node/components/CodeField/{Resend/320/241odeButton/styles.js" → ResendCodeButton/styles.js}
RENAMED
|
File without changes
|