@alfalab/core-components-confirmation 13.5.8 → 13.6.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.
Files changed (67) hide show
  1. package/component.responsive.d.ts +4 -0
  2. package/component.responsive.js +2 -2
  3. package/components/base-confirmation/component.js +1 -1
  4. package/components/base-confirmation/index.css +2 -2
  5. package/components/countdown-loader/component.js +1 -1
  6. package/components/countdown-loader/index.css +2 -2
  7. package/components/header/component.js +1 -1
  8. package/components/header/index.css +4 -4
  9. package/components/screens/fatal-error/component.js +1 -1
  10. package/components/screens/fatal-error/index.css +6 -6
  11. package/components/screens/hint/component.js +1 -1
  12. package/components/screens/hint/index.css +12 -12
  13. package/components/screens/initial/component.js +1 -1
  14. package/components/screens/initial/countdown-section.js +1 -1
  15. package/components/screens/initial/index.css +18 -18
  16. package/components/screens/temp-block/component.js +1 -1
  17. package/components/screens/temp-block/index.css +7 -7
  18. package/{countdown-section-e051574d.js → countdown-section-917473e6.js} +1 -1
  19. package/cssm/component.responsive.d.ts +4 -0
  20. package/cssm/component.responsive.js +2 -2
  21. package/esm/component.responsive.d.ts +4 -0
  22. package/esm/component.responsive.js +2 -2
  23. package/esm/components/base-confirmation/component.js +1 -1
  24. package/esm/components/base-confirmation/index.css +2 -2
  25. package/esm/components/countdown-loader/component.js +1 -1
  26. package/esm/components/countdown-loader/index.css +2 -2
  27. package/esm/components/header/component.js +1 -1
  28. package/esm/components/header/index.css +4 -4
  29. package/esm/components/screens/fatal-error/component.js +1 -1
  30. package/esm/components/screens/fatal-error/index.css +6 -6
  31. package/esm/components/screens/hint/component.js +1 -1
  32. package/esm/components/screens/hint/index.css +12 -12
  33. package/esm/components/screens/initial/component.js +1 -1
  34. package/esm/components/screens/initial/countdown-section.js +1 -1
  35. package/esm/components/screens/initial/index.css +18 -18
  36. package/esm/components/screens/temp-block/component.js +1 -1
  37. package/esm/components/screens/temp-block/index.css +7 -7
  38. package/esm/{countdown-section-56d3e06a.js → countdown-section-53c5fb8d.js} +1 -1
  39. package/esm/mobile/component.mobile.js +1 -1
  40. package/esm/mobile/mobile.css +2 -2
  41. package/mobile/component.mobile.js +1 -1
  42. package/mobile/mobile.css +2 -2
  43. package/modern/component.responsive.d.ts +4 -0
  44. package/modern/component.responsive.js +2 -2
  45. package/modern/components/base-confirmation/component.js +1 -1
  46. package/modern/components/base-confirmation/index.css +2 -2
  47. package/modern/components/countdown-loader/component.js +1 -1
  48. package/modern/components/countdown-loader/index.css +2 -2
  49. package/modern/components/header/component.js +1 -1
  50. package/modern/components/header/index.css +4 -4
  51. package/modern/components/screens/fatal-error/component.js +1 -1
  52. package/modern/components/screens/fatal-error/index.css +6 -6
  53. package/modern/components/screens/hint/component.js +1 -1
  54. package/modern/components/screens/hint/index.css +12 -12
  55. package/modern/components/screens/initial/component.js +1 -1
  56. package/modern/components/screens/initial/countdown-section.js +1 -1
  57. package/modern/components/screens/initial/index.css +18 -18
  58. package/modern/components/screens/temp-block/component.js +1 -1
  59. package/modern/components/screens/temp-block/index.css +7 -7
  60. package/modern/{countdown-section-3fbfd7fb.js → countdown-section-2725d6e5.js} +1 -1
  61. package/modern/mobile/component.mobile.js +1 -1
  62. package/modern/mobile/mobile.css +2 -2
  63. package/package.json +5 -5
  64. package/src/component.responsive.tsx +7 -1
  65. /package/{countdown-section-e051574d.d.ts → countdown-section-917473e6.d.ts} +0 -0
  66. /package/esm/{countdown-section-56d3e06a.d.ts → countdown-section-53c5fb8d.d.ts} +0 -0
  67. /package/modern/{countdown-section-3fbfd7fb.d.ts → countdown-section-2725d6e5.d.ts} +0 -0
@@ -6,7 +6,7 @@ import { Typography } from '@alfalab/core-components-typography/modern';
6
6
  import { ConfirmationContext } from './context.js';
7
7
  import { formatMsAsMinutes } from './utils.js';
8
8
 
9
- const styles = {"component":"confirmation__component_1eu5b","typographyTheme":"confirmation__typographyTheme_1eu5b","phone":"confirmation__phone_1eu5b","compact":"confirmation__compact_1eu5b","loaderWrap":"confirmation__loaderWrap_1eu5b","left":"confirmation__left_1eu5b","center":"confirmation__center_1eu5b","codeInput":"confirmation__codeInput_1eu5b","smsBtn":"confirmation__smsBtn_1eu5b","smsComeLink":"confirmation__smsComeLink_1eu5b","countdownContainer":"confirmation__countdownContainer_1eu5b","countdownMobile":"confirmation__countdownMobile_1eu5b","countdownLoaderMobile":"confirmation__countdownLoaderMobile_1eu5b","getCodeButton":"confirmation__getCodeButton_1eu5b","getCodeButtonMobile":"confirmation__getCodeButtonMobile_1eu5b","containerInput":"confirmation__containerInput_1eu5b"};
9
+ const styles = {"component":"confirmation__component_5puog","typographyTheme":"confirmation__typographyTheme_5puog","phone":"confirmation__phone_5puog","compact":"confirmation__compact_5puog","loaderWrap":"confirmation__loaderWrap_5puog","left":"confirmation__left_5puog","center":"confirmation__center_5puog","codeInput":"confirmation__codeInput_5puog","smsBtn":"confirmation__smsBtn_5puog","smsComeLink":"confirmation__smsComeLink_5puog","countdownContainer":"confirmation__countdownContainer_5puog","countdownMobile":"confirmation__countdownMobile_5puog","countdownLoaderMobile":"confirmation__countdownLoaderMobile_5puog","getCodeButton":"confirmation__getCodeButton_5puog","getCodeButtonMobile":"confirmation__getCodeButtonMobile_5puog","containerInput":"confirmation__containerInput_5puog"};
10
10
  require('./components/screens/initial/index.css')
11
11
 
12
12
  const CountdownSection = ({ codeSendHintVisible, timePassed, processing, mobile, handleSmsRetryClick, }) => {
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import cn from 'classnames';
3
3
  import { BaseConfirmation } from '../components/base-confirmation/component.js';
4
4
 
5
- const styles = {"container":"confirmation__container_1g3xz"};
5
+ const styles = {"container":"confirmation__container_ixawe"};
6
6
  require('./mobile.css')
7
7
 
8
8
  const ConfirmationMobile = ({ className, ...resProps }) => (React.createElement(BaseConfirmation, { mobile: true, className: cn(className, styles.container), ...resProps }));
@@ -1,4 +1,4 @@
1
- /* hash: 1l965 */
2
- .confirmation__container_1g3xz {
1
+ /* hash: 1q8s4 */
2
+ .confirmation__container_ixawe {
3
3
  max-width: 288px;
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-confirmation",
3
- "version": "13.5.8",
3
+ "version": "13.6.0",
4
4
  "description": "Sms confirmation component",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -11,12 +11,12 @@
11
11
  "directory": "dist"
12
12
  },
13
13
  "dependencies": {
14
- "@alfalab/core-components-button": "^11.5.2",
15
- "@alfalab/core-components-code-input": "^3.3.1",
14
+ "@alfalab/core-components-button": "^11.5.3",
15
+ "@alfalab/core-components-code-input": "^3.4.0",
16
16
  "@alfalab/core-components-link": "^5.2.2",
17
17
  "@alfalab/core-components-spinner": "^3.4.0",
18
- "@alfalab/core-components-typography": "^4.6.0",
19
- "@alfalab/core-components-mq": "^4.2.0",
18
+ "@alfalab/core-components-typography": "^4.7.0",
19
+ "@alfalab/core-components-mq": "^4.3.0",
20
20
  "@alfalab/hooks": "^1.13.0",
21
21
  "classnames": "^2.3.1",
22
22
  "tslib": "^2.4.0"
@@ -15,13 +15,19 @@ export type ResponsiveConfirmationProps = Omit<
15
15
  * @default 1024
16
16
  */
17
17
  breakpoint?: number;
18
+
19
+ /**
20
+ * Значение по-умолчанию для хука useMatchMedia
21
+ */
22
+ defaultMatchMediaValue?: boolean | (() => boolean);
18
23
  };
19
24
 
20
25
  export const ConfirmationResponsive: FC<ResponsiveConfirmationProps> = ({
21
26
  breakpoint = 1024,
27
+ defaultMatchMediaValue = true,
22
28
  ...restProps
23
29
  }) => {
24
- const [isDesktop] = useMatchMedia(`(min-width: ${breakpoint}px)`, true);
30
+ const [isDesktop] = useMatchMedia(`(min-width: ${breakpoint}px)`, defaultMatchMediaValue);
25
31
 
26
32
  return isDesktop ? (
27
33
  <ConfirmationDesktop {...restProps} />