@cloud-ru/uikit-product-fields-predefined 3.0.3-preview-7cd1981e.0 → 3.0.3-preview-30fdf48b.0
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 +1 -1
- package/dist/cjs/components/FieldCode/FieldCode.d.ts +21 -5
- package/dist/cjs/components/FieldCode/FieldCode.js +4 -2
- package/dist/cjs/components/FieldCode/hooks/index.d.ts +1 -0
- package/dist/cjs/components/FieldCode/hooks/index.js +1 -0
- package/dist/cjs/components/FieldCode/hooks/useFieldCodeOverflow.d.ts +6 -0
- package/dist/cjs/components/FieldCode/hooks/useFieldCodeOverflow.js +43 -0
- package/dist/cjs/components/FieldCode/styles.module.css +5 -1
- package/dist/esm/components/FieldCode/FieldCode.d.ts +21 -5
- package/dist/esm/components/FieldCode/FieldCode.js +5 -3
- package/dist/esm/components/FieldCode/hooks/index.d.ts +1 -0
- package/dist/esm/components/FieldCode/hooks/index.js +1 -0
- package/dist/esm/components/FieldCode/hooks/useFieldCodeOverflow.d.ts +6 -0
- package/dist/esm/components/FieldCode/hooks/useFieldCodeOverflow.js +40 -0
- package/dist/esm/components/FieldCode/styles.module.css +5 -1
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/components/FieldCode/FieldCode.tsx +18 -9
- package/src/components/FieldCode/hooks/index.ts +1 -0
- package/src/components/FieldCode/hooks/useFieldCodeOverflow.ts +54 -0
- package/src/components/FieldCode/styles.module.scss +5 -1
package/README.md
CHANGED
|
@@ -325,7 +325,7 @@
|
|
|
325
325
|
| name | type | default value | description |
|
|
326
326
|
|------|------|---------------|-------------|
|
|
327
327
|
| codeLength* | `number` | - | Количество цифр в коде (ожидается целое ≥ 1) |
|
|
328
|
-
|
|
|
328
|
+
| layoutType* | enum LayoutType: `"mobile"`, `"tablet"`, `"desktop"`, `"desktopSmall"` | - | |
|
|
329
329
|
| className | `string` | - | CSS-класс компонента |
|
|
330
330
|
| cellClassName | `string` | - | CSS-класс ячейки кода |
|
|
331
331
|
| spacing | `number[]` | - | Позиции, после которых нужно вставить пробел (индексы символов, после которых будет пробел) |
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WithLayoutType } from '@cloud-ru/uikit-product-utils';
|
|
1
2
|
import { FieldDecoratorProps } from '@snack-uikit/fields';
|
|
2
3
|
import { type ResendCodeProps } from './components';
|
|
3
4
|
import { UseCodeInputParams } from './hooks';
|
|
@@ -10,7 +11,7 @@ export type FieldCodeRef = {
|
|
|
10
11
|
resetCode: () => void;
|
|
11
12
|
};
|
|
12
13
|
/** Собственные пропсы `FieldCode` */
|
|
13
|
-
export type FieldCodeOwnProps = {
|
|
14
|
+
export type FieldCodeOwnProps = WithLayoutType<{
|
|
14
15
|
/** CSS-класс компонента */
|
|
15
16
|
className?: string;
|
|
16
17
|
/** CSS-класс ячейки кода */
|
|
@@ -21,12 +22,27 @@ export type FieldCodeOwnProps = {
|
|
|
21
22
|
showEmptyChars?: boolean;
|
|
22
23
|
/** Компонент отправки нового кода */
|
|
23
24
|
resendCode?: ResendCodeProps;
|
|
24
|
-
/** Отключить автофокус (при монтировании, сбросе и при ошибке валидации) */
|
|
25
|
-
isMobile: boolean;
|
|
26
25
|
/** Сообщение при неверном коде, если не передан свой `error` */
|
|
27
26
|
invalidCode?: string;
|
|
28
27
|
/** Растягивать ячейки на всю доступную ширину; иначе фиксированная ширина по `size` */
|
|
29
28
|
stretchCells?: boolean;
|
|
30
|
-
}
|
|
29
|
+
}>;
|
|
31
30
|
export type FieldCodeProps = FieldCodeOwnProps & Omit<UseCodeInputParams, 'moveFocus'> & Pick<FieldDecoratorProps, 'size' | 'disabled' | 'label' | 'error' | 'data-test-id'>;
|
|
32
|
-
export declare const FieldCode: import("react").ForwardRefExoticComponent<
|
|
31
|
+
export declare const FieldCode: import("react").ForwardRefExoticComponent<{
|
|
32
|
+
/** CSS-класс компонента */
|
|
33
|
+
className?: string;
|
|
34
|
+
/** CSS-класс ячейки кода */
|
|
35
|
+
cellClassName?: string;
|
|
36
|
+
/** Позиции, после которых нужно вставить пробел (индексы символов, после которых будет пробел) */
|
|
37
|
+
spacing?: number[];
|
|
38
|
+
/** Подсветить пустые символы кода */
|
|
39
|
+
showEmptyChars?: boolean;
|
|
40
|
+
/** Компонент отправки нового кода */
|
|
41
|
+
resendCode?: ResendCodeProps;
|
|
42
|
+
/** Сообщение при неверном коде, если не передан свой `error` */
|
|
43
|
+
invalidCode?: string;
|
|
44
|
+
/** Растягивать ячейки на всю доступную ширину; иначе фиксированная ширина по `size` */
|
|
45
|
+
stretchCells?: boolean;
|
|
46
|
+
} & {
|
|
47
|
+
layoutType: import("@cloud-ru/uikit-product-utils/.").LayoutType;
|
|
48
|
+
} & Omit<UseCodeInputParams, "moveFocus"> & Pick<FieldDecoratorProps, "size" | "label" | "error" | "disabled" | "data-test-id"> & import("react").RefAttributes<FieldCodeRef>>;
|
|
@@ -14,7 +14,8 @@ const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
|
14
14
|
const utils_1 = require("./utils");
|
|
15
15
|
exports.FieldCode = (0, react_1.forwardRef)(function FieldCode(props, ref) {
|
|
16
16
|
var _a;
|
|
17
|
-
const { codeLength, className, cellClassName, value, onChange, spacing, onComplete, size, disabled, label, error, invalidCode, showEmptyChars, resendCode,
|
|
17
|
+
const { codeLength, className, cellClassName, value, onChange, spacing, onComplete, size, disabled, label, error, invalidCode, showEmptyChars, resendCode, layoutType, stretchCells = false, 'data-test-id': dataTestId, } = props;
|
|
18
|
+
const isMobile = layoutType === 'mobile';
|
|
18
19
|
const { inputsRef, moveFocus, blurFields } = (0, hooks_1.useFocusCell)(codeLength);
|
|
19
20
|
const { code, cellHandlers, onChangeCode } = (0, hooks_1.useCodeInput)({ value, onChange, codeLength, moveFocus, onComplete });
|
|
20
21
|
const { resetCode } = (0, hooks_1.useFieldHelpers)({
|
|
@@ -25,6 +26,7 @@ exports.FieldCode = (0, react_1.forwardRef)(function FieldCode(props, ref) {
|
|
|
25
26
|
code,
|
|
26
27
|
codeLength,
|
|
27
28
|
});
|
|
29
|
+
const { rootRef, codeContainerRef, hasOverflow } = (0, hooks_1.useFieldCodeOverflow)();
|
|
28
30
|
(0, react_1.useImperativeHandle)(ref, () => ({
|
|
29
31
|
moveFocus,
|
|
30
32
|
blurFields,
|
|
@@ -37,7 +39,7 @@ exports.FieldCode = (0, react_1.forwardRef)(function FieldCode(props, ref) {
|
|
|
37
39
|
size,
|
|
38
40
|
error: resolvedError,
|
|
39
41
|
};
|
|
40
|
-
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: (0, classnames_1.default)(styles_module_scss_1.default.fieldCode, className), "data-stretch-cells": stretchCells || undefined }, (dataTestId ? { 'data-test-id': dataTestId } : undefined), { children: [(0, jsx_runtime_1.jsx)(fields_1.FieldDecorator, Object.assign({ className: styles_module_scss_1.default.fieldDecorator }, resolvedDecoratorProps, { children: (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.codeContainer, "data-size": size, "data-stretch-cells": stretchCells || undefined, children: code.map((char, index) => ((0, jsx_runtime_1.jsx)(components_1.Cell, { ref: inputRef => {
|
|
42
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ ref: rootRef, className: (0, classnames_1.default)(styles_module_scss_1.default.fieldCode, hasOverflow && styles_module_scss_1.default.fieldCodeScrollable, className), "data-stretch-cells": stretchCells || undefined }, (dataTestId ? { 'data-test-id': dataTestId } : undefined), { children: [(0, jsx_runtime_1.jsx)(fields_1.FieldDecorator, Object.assign({ className: (0, classnames_1.default)(!hasOverflow && styles_module_scss_1.default.fieldDecorator) }, resolvedDecoratorProps, { children: (0, jsx_runtime_1.jsx)("div", { ref: codeContainerRef, className: styles_module_scss_1.default.codeContainer, "data-size": size, "data-stretch-cells": stretchCells || undefined, children: code.map((char, index) => ((0, jsx_runtime_1.jsx)(components_1.Cell, { ref: inputRef => {
|
|
41
43
|
if (inputRef) {
|
|
42
44
|
inputsRef.current[index] = inputRef;
|
|
43
45
|
}
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./useCodeInput"), exports);
|
|
18
|
+
__exportStar(require("./useFieldCodeOverflow"), exports);
|
|
18
19
|
__exportStar(require("./useFieldCodeValidate"), exports);
|
|
19
20
|
__exportStar(require("./useFocusCell"), exports);
|
|
20
21
|
__exportStar(require("./useFieldHelpers"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Fallback на крайний случай: включает горизонтальный скролл, если ряд ячеек шире контейнера. */
|
|
2
|
+
export declare function useFieldCodeOverflow(): {
|
|
3
|
+
rootRef: import("react").RefObject<HTMLDivElement>;
|
|
4
|
+
codeContainerRef: import("react").RefObject<HTMLDivElement>;
|
|
5
|
+
hasOverflow: boolean;
|
|
6
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useFieldCodeOverflow = useFieldCodeOverflow;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const utils_1 = require("@snack-uikit/utils");
|
|
6
|
+
function hasCodeOverflow(root, codeContainer) {
|
|
7
|
+
return codeContainer.scrollWidth > root.clientWidth;
|
|
8
|
+
}
|
|
9
|
+
/** Fallback на крайний случай: включает горизонтальный скролл, если ряд ячеек шире контейнера. */
|
|
10
|
+
function useFieldCodeOverflow() {
|
|
11
|
+
const [hasOverflow, setHasOverflow] = (0, react_1.useState)(false);
|
|
12
|
+
const rootRef = (0, react_1.useRef)(null);
|
|
13
|
+
const codeContainerRef = (0, react_1.useRef)(null);
|
|
14
|
+
const measure = (0, react_1.useCallback)(() => {
|
|
15
|
+
const root = rootRef.current;
|
|
16
|
+
const codeContainer = codeContainerRef.current;
|
|
17
|
+
if (!root || !codeContainer) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
setHasOverflow(prev => {
|
|
21
|
+
const next = hasCodeOverflow(root, codeContainer);
|
|
22
|
+
return prev === next ? prev : next;
|
|
23
|
+
});
|
|
24
|
+
}, []);
|
|
25
|
+
(0, utils_1.useLayoutEffect)(() => {
|
|
26
|
+
const root = rootRef.current;
|
|
27
|
+
const codeContainer = codeContainerRef.current;
|
|
28
|
+
if (!root || !codeContainer) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
measure();
|
|
32
|
+
const resizeObserver = new ResizeObserver(measure);
|
|
33
|
+
resizeObserver.observe(root);
|
|
34
|
+
resizeObserver.observe(codeContainer);
|
|
35
|
+
const mutationObserver = new MutationObserver(measure);
|
|
36
|
+
mutationObserver.observe(codeContainer, { childList: true });
|
|
37
|
+
return () => {
|
|
38
|
+
resizeObserver.disconnect();
|
|
39
|
+
mutationObserver.disconnect();
|
|
40
|
+
};
|
|
41
|
+
}, [measure]);
|
|
42
|
+
return { rootRef, codeContainerRef, hasOverflow };
|
|
43
|
+
}
|
|
@@ -8,13 +8,17 @@
|
|
|
8
8
|
width:100%;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
.fieldCodeScrollable{
|
|
12
|
+
overflow-x:auto;
|
|
13
|
+
}
|
|
14
|
+
|
|
11
15
|
.fieldDecorator{
|
|
12
16
|
width:unset;
|
|
13
17
|
}
|
|
14
18
|
|
|
15
19
|
.codeContainer{
|
|
16
20
|
display:flex;
|
|
17
|
-
justify-content:center;
|
|
21
|
+
justify-content:safe center;
|
|
18
22
|
}
|
|
19
23
|
.codeContainer[data-size=s]{
|
|
20
24
|
gap:8px;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WithLayoutType } from '@cloud-ru/uikit-product-utils';
|
|
1
2
|
import { FieldDecoratorProps } from '@snack-uikit/fields';
|
|
2
3
|
import { type ResendCodeProps } from './components';
|
|
3
4
|
import { UseCodeInputParams } from './hooks';
|
|
@@ -10,7 +11,7 @@ export type FieldCodeRef = {
|
|
|
10
11
|
resetCode: () => void;
|
|
11
12
|
};
|
|
12
13
|
/** Собственные пропсы `FieldCode` */
|
|
13
|
-
export type FieldCodeOwnProps = {
|
|
14
|
+
export type FieldCodeOwnProps = WithLayoutType<{
|
|
14
15
|
/** CSS-класс компонента */
|
|
15
16
|
className?: string;
|
|
16
17
|
/** CSS-класс ячейки кода */
|
|
@@ -21,12 +22,27 @@ export type FieldCodeOwnProps = {
|
|
|
21
22
|
showEmptyChars?: boolean;
|
|
22
23
|
/** Компонент отправки нового кода */
|
|
23
24
|
resendCode?: ResendCodeProps;
|
|
24
|
-
/** Отключить автофокус (при монтировании, сбросе и при ошибке валидации) */
|
|
25
|
-
isMobile: boolean;
|
|
26
25
|
/** Сообщение при неверном коде, если не передан свой `error` */
|
|
27
26
|
invalidCode?: string;
|
|
28
27
|
/** Растягивать ячейки на всю доступную ширину; иначе фиксированная ширина по `size` */
|
|
29
28
|
stretchCells?: boolean;
|
|
30
|
-
}
|
|
29
|
+
}>;
|
|
31
30
|
export type FieldCodeProps = FieldCodeOwnProps & Omit<UseCodeInputParams, 'moveFocus'> & Pick<FieldDecoratorProps, 'size' | 'disabled' | 'label' | 'error' | 'data-test-id'>;
|
|
32
|
-
export declare const FieldCode: import("react").ForwardRefExoticComponent<
|
|
31
|
+
export declare const FieldCode: import("react").ForwardRefExoticComponent<{
|
|
32
|
+
/** CSS-класс компонента */
|
|
33
|
+
className?: string;
|
|
34
|
+
/** CSS-класс ячейки кода */
|
|
35
|
+
cellClassName?: string;
|
|
36
|
+
/** Позиции, после которых нужно вставить пробел (индексы символов, после которых будет пробел) */
|
|
37
|
+
spacing?: number[];
|
|
38
|
+
/** Подсветить пустые символы кода */
|
|
39
|
+
showEmptyChars?: boolean;
|
|
40
|
+
/** Компонент отправки нового кода */
|
|
41
|
+
resendCode?: ResendCodeProps;
|
|
42
|
+
/** Сообщение при неверном коде, если не передан свой `error` */
|
|
43
|
+
invalidCode?: string;
|
|
44
|
+
/** Растягивать ячейки на всю доступную ширину; иначе фиксированная ширина по `size` */
|
|
45
|
+
stretchCells?: boolean;
|
|
46
|
+
} & {
|
|
47
|
+
layoutType: import("@cloud-ru/uikit-product-utils/.").LayoutType;
|
|
48
|
+
} & Omit<UseCodeInputParams, "moveFocus"> & Pick<FieldDecoratorProps, "size" | "label" | "error" | "disabled" | "data-test-id"> & import("react").RefAttributes<FieldCodeRef>>;
|
|
@@ -3,12 +3,13 @@ import cn from 'classnames';
|
|
|
3
3
|
import { forwardRef, useImperativeHandle } from 'react';
|
|
4
4
|
import { FieldDecorator } from '@snack-uikit/fields';
|
|
5
5
|
import { Cell, ResendCode } from './components';
|
|
6
|
-
import { useCodeInput, useFieldHelpers, useFocusCell } from './hooks';
|
|
6
|
+
import { useCodeInput, useFieldCodeOverflow, useFieldHelpers, useFocusCell } from './hooks';
|
|
7
7
|
import styles from './styles.module.css';
|
|
8
8
|
import { getCellValidationState } from './utils';
|
|
9
9
|
export const FieldCode = forwardRef(function FieldCode(props, ref) {
|
|
10
10
|
var _a;
|
|
11
|
-
const { codeLength, className, cellClassName, value, onChange, spacing, onComplete, size, disabled, label, error, invalidCode, showEmptyChars, resendCode,
|
|
11
|
+
const { codeLength, className, cellClassName, value, onChange, spacing, onComplete, size, disabled, label, error, invalidCode, showEmptyChars, resendCode, layoutType, stretchCells = false, 'data-test-id': dataTestId, } = props;
|
|
12
|
+
const isMobile = layoutType === 'mobile';
|
|
12
13
|
const { inputsRef, moveFocus, blurFields } = useFocusCell(codeLength);
|
|
13
14
|
const { code, cellHandlers, onChangeCode } = useCodeInput({ value, onChange, codeLength, moveFocus, onComplete });
|
|
14
15
|
const { resetCode } = useFieldHelpers({
|
|
@@ -19,6 +20,7 @@ export const FieldCode = forwardRef(function FieldCode(props, ref) {
|
|
|
19
20
|
code,
|
|
20
21
|
codeLength,
|
|
21
22
|
});
|
|
23
|
+
const { rootRef, codeContainerRef, hasOverflow } = useFieldCodeOverflow();
|
|
22
24
|
useImperativeHandle(ref, () => ({
|
|
23
25
|
moveFocus,
|
|
24
26
|
blurFields,
|
|
@@ -31,7 +33,7 @@ export const FieldCode = forwardRef(function FieldCode(props, ref) {
|
|
|
31
33
|
size,
|
|
32
34
|
error: resolvedError,
|
|
33
35
|
};
|
|
34
|
-
return (_jsxs("div", Object.assign({ className: cn(styles.fieldCode, className), "data-stretch-cells": stretchCells || undefined }, (dataTestId ? { 'data-test-id': dataTestId } : undefined), { children: [_jsx(FieldDecorator, Object.assign({ className: styles.fieldDecorator }, resolvedDecoratorProps, { children: _jsx("div", { className: styles.codeContainer, "data-size": size, "data-stretch-cells": stretchCells || undefined, children: code.map((char, index) => (_jsx(Cell, { ref: inputRef => {
|
|
36
|
+
return (_jsxs("div", Object.assign({ ref: rootRef, className: cn(styles.fieldCode, hasOverflow && styles.fieldCodeScrollable, className), "data-stretch-cells": stretchCells || undefined }, (dataTestId ? { 'data-test-id': dataTestId } : undefined), { children: [_jsx(FieldDecorator, Object.assign({ className: cn(!hasOverflow && styles.fieldDecorator) }, resolvedDecoratorProps, { children: _jsx("div", { ref: codeContainerRef, className: styles.codeContainer, "data-size": size, "data-stretch-cells": stretchCells || undefined, children: code.map((char, index) => (_jsx(Cell, { ref: inputRef => {
|
|
35
37
|
if (inputRef) {
|
|
36
38
|
inputsRef.current[index] = inputRef;
|
|
37
39
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Fallback на крайний случай: включает горизонтальный скролл, если ряд ячеек шире контейнера. */
|
|
2
|
+
export declare function useFieldCodeOverflow(): {
|
|
3
|
+
rootRef: import("react").RefObject<HTMLDivElement>;
|
|
4
|
+
codeContainerRef: import("react").RefObject<HTMLDivElement>;
|
|
5
|
+
hasOverflow: boolean;
|
|
6
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useCallback, useRef, useState } from 'react';
|
|
2
|
+
import { useLayoutEffect } from '@snack-uikit/utils';
|
|
3
|
+
function hasCodeOverflow(root, codeContainer) {
|
|
4
|
+
return codeContainer.scrollWidth > root.clientWidth;
|
|
5
|
+
}
|
|
6
|
+
/** Fallback на крайний случай: включает горизонтальный скролл, если ряд ячеек шире контейнера. */
|
|
7
|
+
export function useFieldCodeOverflow() {
|
|
8
|
+
const [hasOverflow, setHasOverflow] = useState(false);
|
|
9
|
+
const rootRef = useRef(null);
|
|
10
|
+
const codeContainerRef = useRef(null);
|
|
11
|
+
const measure = useCallback(() => {
|
|
12
|
+
const root = rootRef.current;
|
|
13
|
+
const codeContainer = codeContainerRef.current;
|
|
14
|
+
if (!root || !codeContainer) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
setHasOverflow(prev => {
|
|
18
|
+
const next = hasCodeOverflow(root, codeContainer);
|
|
19
|
+
return prev === next ? prev : next;
|
|
20
|
+
});
|
|
21
|
+
}, []);
|
|
22
|
+
useLayoutEffect(() => {
|
|
23
|
+
const root = rootRef.current;
|
|
24
|
+
const codeContainer = codeContainerRef.current;
|
|
25
|
+
if (!root || !codeContainer) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
measure();
|
|
29
|
+
const resizeObserver = new ResizeObserver(measure);
|
|
30
|
+
resizeObserver.observe(root);
|
|
31
|
+
resizeObserver.observe(codeContainer);
|
|
32
|
+
const mutationObserver = new MutationObserver(measure);
|
|
33
|
+
mutationObserver.observe(codeContainer, { childList: true });
|
|
34
|
+
return () => {
|
|
35
|
+
resizeObserver.disconnect();
|
|
36
|
+
mutationObserver.disconnect();
|
|
37
|
+
};
|
|
38
|
+
}, [measure]);
|
|
39
|
+
return { rootRef, codeContainerRef, hasOverflow };
|
|
40
|
+
}
|
|
@@ -8,13 +8,17 @@
|
|
|
8
8
|
width:100%;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
.fieldCodeScrollable{
|
|
12
|
+
overflow-x:auto;
|
|
13
|
+
}
|
|
14
|
+
|
|
11
15
|
.fieldDecorator{
|
|
12
16
|
width:unset;
|
|
13
17
|
}
|
|
14
18
|
|
|
15
19
|
.codeContainer{
|
|
16
20
|
display:flex;
|
|
17
|
-
justify-content:center;
|
|
21
|
+
justify-content:safe center;
|
|
18
22
|
}
|
|
19
23
|
.codeContainer[data-size=s]{
|
|
20
24
|
gap:8px;
|