@alfalab/core-components-confirmation 13.8.2 → 13.8.3
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/component.responsive.d.ts +5 -0
- package/component.responsive.js +2 -3
- package/components/base-confirmation/component.js +4 -4
- package/components/base-confirmation/index.css +2 -2
- package/components/countdown-loader/component.js +1 -1
- package/components/countdown-loader/index.css +2 -2
- package/components/header/component.js +1 -1
- package/components/header/index.css +4 -4
- package/components/screens/fatal-error/component.js +3 -3
- package/components/screens/fatal-error/index.css +7 -7
- package/components/screens/hint/component.js +3 -3
- package/components/screens/hint/index.css +13 -13
- package/components/screens/initial/component.js +1 -1
- package/components/screens/initial/countdown-section.js +1 -1
- package/components/screens/initial/index.css +19 -19
- package/components/screens/temp-block/component.js +1 -1
- package/components/screens/temp-block/index.css +8 -8
- package/context.js +1 -0
- package/{countdown-section-b633717a.js → countdown-section-0f785844.js} +4 -4
- package/cssm/component.responsive.d.ts +5 -0
- package/cssm/component.responsive.js +2 -3
- package/cssm/components/base-confirmation/component.js +3 -3
- package/cssm/components/screens/fatal-error/component.js +2 -2
- package/cssm/components/screens/hint/component.js +2 -2
- package/cssm/components/screens/initial/countdown-section.js +3 -3
- package/cssm/context.js +1 -0
- package/cssm/types.d.ts +5 -7
- package/esm/component.responsive.d.ts +5 -0
- package/esm/component.responsive.js +3 -4
- package/esm/components/base-confirmation/component.js +4 -4
- package/esm/components/base-confirmation/index.css +2 -2
- package/esm/components/countdown-loader/component.js +1 -1
- package/esm/components/countdown-loader/index.css +2 -2
- package/esm/components/header/component.js +1 -1
- package/esm/components/header/index.css +4 -4
- package/esm/components/screens/fatal-error/component.js +3 -3
- package/esm/components/screens/fatal-error/index.css +7 -7
- package/esm/components/screens/hint/component.js +3 -3
- package/esm/components/screens/hint/index.css +13 -13
- package/esm/components/screens/initial/component.js +1 -1
- package/esm/components/screens/initial/countdown-section.js +1 -1
- package/esm/components/screens/initial/index.css +19 -19
- package/esm/components/screens/temp-block/component.js +1 -1
- package/esm/components/screens/temp-block/index.css +8 -8
- package/esm/context.js +1 -0
- package/esm/{countdown-section-88d8eded.js → countdown-section-3516a8a6.js} +4 -4
- package/esm/mobile/component.mobile.js +1 -1
- package/esm/mobile/mobile.css +2 -2
- package/esm/types.d.ts +5 -7
- package/mobile/component.mobile.js +1 -1
- package/mobile/mobile.css +2 -2
- package/modern/component.responsive.d.ts +5 -0
- package/modern/component.responsive.js +3 -4
- package/modern/components/base-confirmation/component.js +3 -3
- package/modern/components/base-confirmation/index.css +2 -2
- package/modern/components/countdown-loader/component.js +1 -1
- package/modern/components/countdown-loader/index.css +2 -2
- package/modern/components/header/component.js +1 -1
- package/modern/components/header/index.css +4 -4
- package/modern/components/screens/fatal-error/component.js +3 -3
- package/modern/components/screens/fatal-error/index.css +7 -7
- package/modern/components/screens/hint/component.js +3 -3
- package/modern/components/screens/hint/index.css +13 -13
- package/modern/components/screens/initial/component.js +1 -1
- package/modern/components/screens/initial/countdown-section.js +1 -1
- package/modern/components/screens/initial/index.css +19 -19
- package/modern/components/screens/temp-block/component.js +1 -1
- package/modern/components/screens/temp-block/index.css +8 -8
- package/modern/context.js +1 -0
- package/modern/{countdown-section-9cd2a918.js → countdown-section-7563320f.js} +4 -4
- package/modern/mobile/component.mobile.js +1 -1
- package/modern/mobile/mobile.css +2 -2
- package/modern/types.d.ts +5 -7
- package/moderncssm/component.responsive.d.ts +5 -0
- package/moderncssm/component.responsive.js +3 -4
- package/moderncssm/components/base-confirmation/component.js +2 -2
- package/moderncssm/components/screens/fatal-error/component.js +2 -2
- package/moderncssm/components/screens/hint/component.js +2 -2
- package/moderncssm/components/screens/initial/countdown-section.js +3 -3
- package/moderncssm/context.js +1 -0
- package/moderncssm/types.d.ts +5 -7
- package/package.json +5 -5
- package/src/component.responsive.tsx +11 -5
- package/src/components/base-confirmation/component.tsx +3 -2
- package/src/components/screens/fatal-error/component.tsx +2 -1
- package/src/components/screens/hint/component.tsx +2 -1
- package/src/components/screens/initial/countdown-section.tsx +4 -2
- package/src/context.ts +1 -0
- package/src/types.ts +7 -6
- package/types.d.ts +5 -7
- /package/{countdown-section-b633717a.d.ts → countdown-section-0f785844.d.ts} +0 -0
- /package/esm/{countdown-section-88d8eded.d.ts → countdown-section-3516a8a6.d.ts} +0 -0
- /package/modern/{countdown-section-9cd2a918.d.ts → countdown-section-7563320f.d.ts} +0 -0
|
@@ -17,7 +17,7 @@ export type FatalErrorProps = {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
export const FatalError: FC<FatalErrorProps> = ({ mobile }) => {
|
|
20
|
-
const { alignContent, texts, onFatalErrorOkButtonClick, breakpoint } =
|
|
20
|
+
const { alignContent, texts, onFatalErrorOkButtonClick, breakpoint, client } =
|
|
21
21
|
useContext(ConfirmationContext);
|
|
22
22
|
|
|
23
23
|
return (
|
|
@@ -41,6 +41,7 @@ export const FatalError: FC<FatalErrorProps> = ({ mobile }) => {
|
|
|
41
41
|
onClick={onFatalErrorOkButtonClick}
|
|
42
42
|
className={styles.button}
|
|
43
43
|
breakpoint={breakpoint}
|
|
44
|
+
client={client}
|
|
44
45
|
>
|
|
45
46
|
{texts.fatalErrorButton}
|
|
46
47
|
</Button>
|
|
@@ -18,7 +18,7 @@ export type HintProps = {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export const Hint: FC<HintProps> = ({ mobile }) => {
|
|
21
|
-
const { alignContent, texts, onChangeScreen, onChangeState, breakpoint } =
|
|
21
|
+
const { alignContent, texts, onChangeScreen, onChangeState, breakpoint, client } =
|
|
22
22
|
useContext(ConfirmationContext);
|
|
23
23
|
|
|
24
24
|
const handleReturnButtonClick = () => {
|
|
@@ -110,6 +110,7 @@ export const Hint: FC<HintProps> = ({ mobile }) => {
|
|
|
110
110
|
onClick={handleReturnButtonClick}
|
|
111
111
|
className={styles.hintButton}
|
|
112
112
|
breakpoint={breakpoint}
|
|
113
|
+
client={client}
|
|
113
114
|
>
|
|
114
115
|
{texts.hintButton}
|
|
115
116
|
</Button>
|
|
@@ -25,7 +25,8 @@ export const CountdownSection: FC<CountdownSectionProps> = ({
|
|
|
25
25
|
mobile,
|
|
26
26
|
handleSmsRetryClick,
|
|
27
27
|
}) => {
|
|
28
|
-
const { state, texts, timeLeft, blockSmsRetry, breakpoint } =
|
|
28
|
+
const { state, texts, timeLeft, blockSmsRetry, breakpoint, client } =
|
|
29
|
+
useContext(ConfirmationContext);
|
|
29
30
|
|
|
30
31
|
const renderText = (text?: string) => (
|
|
31
32
|
<Typography.Text
|
|
@@ -50,7 +51,7 @@ export const CountdownSection: FC<CountdownSectionProps> = ({
|
|
|
50
51
|
[styles.typographyTheme]: !mobile,
|
|
51
52
|
})}
|
|
52
53
|
>
|
|
53
|
-
<Spinner visible={true} />
|
|
54
|
+
<Spinner preset={24} visible={true} />
|
|
54
55
|
|
|
55
56
|
<span className={styles.loaderText}>
|
|
56
57
|
{state === 'CODE_CHECKING' ? texts.codeChecking : texts.codeSending}
|
|
@@ -69,6 +70,7 @@ export const CountdownSection: FC<CountdownSectionProps> = ({
|
|
|
69
70
|
onClick={handleSmsRetryClick}
|
|
70
71
|
className={cn(styles.getCodeButton, { [styles.getCodeButtonMobile]: mobile })}
|
|
71
72
|
breakpoint={breakpoint}
|
|
73
|
+
client={client}
|
|
72
74
|
>
|
|
73
75
|
{texts.buttonRetry}
|
|
74
76
|
</Button>
|
package/src/context.ts
CHANGED
package/src/types.ts
CHANGED
|
@@ -123,6 +123,11 @@ export type ConfirmationProps = {
|
|
|
123
123
|
*/
|
|
124
124
|
breakpoint?: number;
|
|
125
125
|
|
|
126
|
+
/**
|
|
127
|
+
* Версия, которая будет использоваться при серверном рендеринге
|
|
128
|
+
*/
|
|
129
|
+
client?: 'desktop' | 'mobile';
|
|
130
|
+
|
|
126
131
|
/**
|
|
127
132
|
* Продолжительность отображения ошибки
|
|
128
133
|
* @default 1300
|
|
@@ -156,14 +161,10 @@ export type TConfirmationContext = Required<
|
|
|
156
161
|
| 'clearCodeOnError'
|
|
157
162
|
| 'initialScreenHintSlot'
|
|
158
163
|
| 'errorVisibleDuration'
|
|
164
|
+
| 'breakpoint'
|
|
165
|
+
| 'client'
|
|
159
166
|
> & {
|
|
160
167
|
timeLeft: number;
|
|
161
|
-
} & {
|
|
162
|
-
/**
|
|
163
|
-
* Контрольная точка для кнопки, с нее начинается desktop версия
|
|
164
|
-
* @default 1024
|
|
165
|
-
*/
|
|
166
|
-
breakpoint?: number;
|
|
167
168
|
};
|
|
168
169
|
|
|
169
170
|
export type ConfirmationTexts = {
|
package/types.d.ts
CHANGED
|
@@ -98,20 +98,18 @@ type ConfirmationProps = {
|
|
|
98
98
|
* @default 1024
|
|
99
99
|
*/
|
|
100
100
|
breakpoint?: number;
|
|
101
|
+
/**
|
|
102
|
+
* Версия, которая будет использоваться при серверном рендеринге
|
|
103
|
+
*/
|
|
104
|
+
client?: 'desktop' | 'mobile';
|
|
101
105
|
/**
|
|
102
106
|
* Продолжительность отображения ошибки
|
|
103
107
|
* @default 1300
|
|
104
108
|
*/
|
|
105
109
|
errorVisibleDuration?: number;
|
|
106
110
|
};
|
|
107
|
-
type TConfirmationContext = Required<Pick<ConfirmationProps, 'alignContent' | 'texts' | 'state' | 'screen' | 'requiredCharAmount' | 'onInputFinished' | 'countdownDuration' | 'onChangeState' | 'onSmsRetryClick' | 'onChangeScreen' | 'onFatalErrorOkButtonClick' | 'tempBlockDuration' | 'hideCountdownSection'>> & Pick<ConfirmationProps, 'phone' | 'blockSmsRetry' | 'onTempBlockFinished' | 'clearCodeOnError' | 'initialScreenHintSlot' | 'errorVisibleDuration'> & {
|
|
111
|
+
type TConfirmationContext = Required<Pick<ConfirmationProps, 'alignContent' | 'texts' | 'state' | 'screen' | 'requiredCharAmount' | 'onInputFinished' | 'countdownDuration' | 'onChangeState' | 'onSmsRetryClick' | 'onChangeScreen' | 'onFatalErrorOkButtonClick' | 'tempBlockDuration' | 'hideCountdownSection'>> & Pick<ConfirmationProps, 'phone' | 'blockSmsRetry' | 'onTempBlockFinished' | 'clearCodeOnError' | 'initialScreenHintSlot' | 'errorVisibleDuration' | 'breakpoint' | 'client'> & {
|
|
108
112
|
timeLeft: number;
|
|
109
|
-
} & {
|
|
110
|
-
/**
|
|
111
|
-
* Контрольная точка для кнопки, с нее начинается desktop версия
|
|
112
|
-
* @default 1024
|
|
113
|
-
*/
|
|
114
|
-
breakpoint?: number;
|
|
115
113
|
};
|
|
116
114
|
type ConfirmationTexts = {
|
|
117
115
|
/**
|
|
File without changes
|
|
File without changes
|
|
File without changes
|