@alfalab/core-components-modal 8.1.3 → 9.0.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 (130) hide show
  1. package/Component.js +3 -3
  2. package/Component.responsive.d.ts +3 -2
  3. package/Component.responsive.js +7 -7
  4. package/components/content/Component.js +3 -3
  5. package/components/content/desktop.css +7 -7
  6. package/components/content/index.css +4 -4
  7. package/components/content/mobile.css +3 -3
  8. package/components/controls/Component.d.ts +29 -0
  9. package/components/controls/Component.js +30 -0
  10. package/components/controls/index.css +4 -0
  11. package/components/controls/index.d.ts +1 -0
  12. package/components/controls/index.js +13 -0
  13. package/components/footer/Component.js +5 -8
  14. package/components/footer/desktop.css +9 -9
  15. package/components/footer/index.css +9 -9
  16. package/components/footer/layout.css +17 -35
  17. package/components/footer/mobile.css +3 -3
  18. package/components/header/Component.js +3 -3
  19. package/components/header/desktop.css +16 -16
  20. package/components/header/index.css +9 -9
  21. package/components/header/mobile.css +4 -4
  22. package/cssm/Component.responsive.d.ts +3 -2
  23. package/cssm/Component.responsive.js +8 -8
  24. package/cssm/components/controls/Component.d.ts +29 -0
  25. package/cssm/components/controls/Component.js +30 -0
  26. package/cssm/components/controls/index.d.ts +1 -0
  27. package/cssm/components/controls/index.js +14 -0
  28. package/cssm/components/controls/index.module.css +3 -0
  29. package/cssm/components/footer/Component.js +0 -1
  30. package/cssm/components/footer/index.module.css +5 -5
  31. package/cssm/components/footer/layout.module.css +8 -26
  32. package/cssm/components/header/desktop.module.css +1 -1
  33. package/cssm/components/header/index.module.css +5 -5
  34. package/cssm/desktop/Component.desktop.d.ts +5 -3
  35. package/cssm/desktop/Component.desktop.js +4 -1
  36. package/cssm/desktop/index.js +3 -1
  37. package/cssm/index.js +4 -2
  38. package/cssm/mobile/Component.mobile.d.ts +2 -0
  39. package/cssm/mobile/Component.mobile.js +4 -1
  40. package/cssm/mobile/index.js +3 -1
  41. package/cssm/typings.d.ts +4 -0
  42. package/desktop/Component.desktop.d.ts +5 -3
  43. package/desktop/Component.desktop.js +3 -0
  44. package/desktop/desktop.css +9 -9
  45. package/desktop/index.js +2 -0
  46. package/esm/Component.js +3 -3
  47. package/esm/Component.responsive.d.ts +3 -2
  48. package/esm/Component.responsive.js +7 -7
  49. package/esm/components/content/Component.js +3 -3
  50. package/esm/components/content/desktop.css +7 -7
  51. package/esm/components/content/index.css +4 -4
  52. package/esm/components/content/mobile.css +3 -3
  53. package/esm/components/controls/Component.d.ts +29 -0
  54. package/esm/components/controls/Component.js +21 -0
  55. package/esm/components/controls/index.css +4 -0
  56. package/esm/components/controls/index.d.ts +1 -0
  57. package/esm/components/controls/index.js +5 -0
  58. package/esm/components/footer/Component.js +4 -7
  59. package/esm/components/footer/desktop.css +9 -9
  60. package/esm/components/footer/index.css +9 -9
  61. package/esm/components/footer/layout.css +17 -35
  62. package/esm/components/footer/mobile.css +3 -3
  63. package/esm/components/header/Component.js +3 -3
  64. package/esm/components/header/desktop.css +16 -16
  65. package/esm/components/header/index.css +9 -9
  66. package/esm/components/header/mobile.css +4 -4
  67. package/esm/desktop/Component.desktop.d.ts +5 -3
  68. package/esm/desktop/Component.desktop.js +3 -0
  69. package/esm/desktop/desktop.css +9 -9
  70. package/esm/desktop/index.js +2 -0
  71. package/esm/index.js +3 -1
  72. package/esm/layout.module-9ffd30f9.js +4 -0
  73. package/esm/mobile/Component.mobile.d.ts +2 -0
  74. package/esm/mobile/Component.mobile.js +3 -0
  75. package/esm/mobile/index.js +2 -0
  76. package/esm/mobile/mobile.css +2 -2
  77. package/esm/transitions.css +8 -8
  78. package/esm/typings.d.ts +4 -0
  79. package/index.js +3 -1
  80. package/layout.module-57c7b9be.js +6 -0
  81. package/mobile/Component.mobile.d.ts +2 -0
  82. package/mobile/Component.mobile.js +3 -0
  83. package/mobile/index.js +2 -0
  84. package/mobile/mobile.css +2 -2
  85. package/modern/Component.js +3 -3
  86. package/modern/Component.responsive.d.ts +3 -2
  87. package/modern/Component.responsive.js +7 -7
  88. package/modern/components/content/Component.js +3 -3
  89. package/modern/components/content/desktop.css +7 -7
  90. package/modern/components/content/index.css +4 -4
  91. package/modern/components/content/mobile.css +3 -3
  92. package/modern/components/controls/Component.d.ts +29 -0
  93. package/modern/components/controls/Component.js +20 -0
  94. package/modern/components/controls/index.css +4 -0
  95. package/modern/components/controls/index.d.ts +1 -0
  96. package/modern/components/controls/index.js +5 -0
  97. package/modern/components/footer/Component.js +4 -7
  98. package/modern/components/footer/desktop.css +9 -9
  99. package/modern/components/footer/index.css +9 -9
  100. package/modern/components/footer/layout.css +17 -35
  101. package/modern/components/footer/mobile.css +3 -3
  102. package/modern/components/header/Component.js +3 -3
  103. package/modern/components/header/desktop.css +16 -16
  104. package/modern/components/header/index.css +9 -9
  105. package/modern/components/header/mobile.css +4 -4
  106. package/modern/desktop/Component.desktop.d.ts +5 -3
  107. package/modern/desktop/Component.desktop.js +4 -1
  108. package/modern/desktop/desktop.css +9 -9
  109. package/modern/desktop/index.js +2 -0
  110. package/modern/index.js +3 -1
  111. package/modern/layout.module-29d4c7c9.js +4 -0
  112. package/modern/mobile/Component.mobile.d.ts +2 -0
  113. package/modern/mobile/Component.mobile.js +3 -0
  114. package/modern/mobile/index.js +2 -0
  115. package/modern/mobile/mobile.css +2 -2
  116. package/modern/transitions.css +8 -8
  117. package/modern/typings.d.ts +4 -0
  118. package/package.json +4 -4
  119. package/src/Component.responsive.tsx +7 -13
  120. package/src/components/controls/Component.tsx +72 -0
  121. package/src/components/controls/index.module.css +3 -0
  122. package/src/components/controls/index.ts +1 -0
  123. package/src/components/footer/Component.tsx +0 -1
  124. package/src/components/footer/layout.module.css +8 -34
  125. package/src/desktop/Component.desktop.tsx +4 -5
  126. package/src/mobile/Component.mobile.tsx +2 -0
  127. package/src/typings.ts +5 -0
  128. package/src/vars.css +7 -7
  129. package/transitions.css +8 -8
  130. package/typings.d.ts +4 -0
@@ -1,14 +1,16 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { BaseModalProps } from "@alfalab/core-components-base-modal";
4
- declare const ModalDesktop: React.ForwardRefExoticComponent<BaseModalProps & {
3
+ import { ControlsProps } from "../components/controls/index";
4
+ import { HeaderProps } from "../components/header/Component";
5
+ declare const ModalDesktop: React.ForwardRefExoticComponent<import("@alfalab/core-components-base-modal").BaseModalProps & {
5
6
  size?: "s" | "m" | "l" | "xl" | "fullscreen" | undefined;
6
7
  fullscreen?: boolean | undefined;
7
8
  fixedPosition?: boolean | undefined;
8
9
  hasCloser?: boolean | undefined;
9
10
  } & React.RefAttributes<HTMLDivElement>> & {
10
11
  Content: React.FC<import("../typings").ContentProps>;
11
- Header: React.FC<import("../components/header/Component").HeaderProps>;
12
+ Header: React.FC<Omit<HeaderProps, "titleSize" | "subtitle">>;
12
13
  Footer: React.FC<import("../components/footer/Component").FooterProps>;
14
+ Controls: React.FC<Omit<ControlsProps, "mobileLayout">>;
13
15
  };
14
16
  export { ModalDesktop };
@@ -2,6 +2,7 @@ import { __assign } from 'tslib';
2
2
  import React, { forwardRef } from 'react';
3
3
  import { Modal } from '../Component.js';
4
4
  import { Content } from '../components/content/Component.js';
5
+ import { Controls } from '../components/controls/Component.js';
5
6
  import { Footer } from '../components/footer/Component.js';
6
7
  import { Header } from '../components/header/Component.js';
7
8
  import 'react-merge-refs';
@@ -9,6 +10,7 @@ import 'classnames';
9
10
  import '@alfalab/core-components-base-modal/esm';
10
11
  import '../ResponsiveContext.js';
11
12
  import '../Context.js';
13
+ import '../layout.module-9ffd30f9.js';
12
14
  import '@alfalab/core-components-navigation-bar/esm';
13
15
 
14
16
  var ModalDesktopComponent = forwardRef(function (props, ref) { return (React.createElement(Modal, __assign({}, props, { ref: ref, view: 'desktop' }))); });
@@ -16,6 +18,7 @@ var ModalDesktop = Object.assign(ModalDesktopComponent, {
16
18
  Content: Content,
17
19
  Header: Header,
18
20
  Footer: Footer,
21
+ Controls: Controls,
19
22
  });
20
23
 
21
24
  export { ModalDesktop };
@@ -1,4 +1,4 @@
1
- /* hash: 2ys8x */
1
+ /* hash: 1ps40 */
2
2
  :root {
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -35,25 +35,25 @@
35
35
  /* mobile */
36
36
 
37
37
  /* paddings */
38
- } .modal__wrapper_6hdpw {
38
+ } .modal__wrapper_1hhc8 {
39
39
  padding-top: var(--modal-vertical-padding);
40
40
  padding-bottom: var(--modal-vertical-padding);
41
- } .modal__component_6hdpw {
41
+ } .modal__component_1hhc8 {
42
42
  width: 100%;
43
43
  max-width: 100%;
44
44
  border-radius: var(--modal-border-radius);
45
- } .modal__fullscreen_6hdpw {
45
+ } .modal__fullscreen_1hhc8 {
46
46
  padding-top: 0;
47
47
  padding-bottom: 0
48
- } .modal__fullscreen_6hdpw .modal__component_6hdpw {
48
+ } .modal__fullscreen_1hhc8 .modal__component_1hhc8 {
49
49
  flex: 1;
50
50
  border-radius: 0;
51
- } .modal__s_6hdpw {
51
+ } .modal__s_1hhc8 {
52
52
  width: var(--modal-s-width);
53
- } .modal__m_6hdpw {
53
+ } .modal__m_1hhc8 {
54
54
  width: var(--modal-m-width);
55
- } .modal__l_6hdpw {
55
+ } .modal__l_1hhc8 {
56
56
  width: var(--modal-l-width);
57
- } .modal__xl_6hdpw {
57
+ } .modal__xl_1hhc8 {
58
58
  width: var(--modal-xl-width);
59
59
  }
@@ -8,6 +8,8 @@ import '@alfalab/core-components-base-modal/esm';
8
8
  import '../ResponsiveContext.js';
9
9
  import '../components/content/Component.js';
10
10
  import '../Context.js';
11
+ import '../components/controls/Component.js';
12
+ import '../layout.module-9ffd30f9.js';
11
13
  import '../components/footer/Component.js';
12
14
  import '../components/header/Component.js';
13
15
  import '@alfalab/core-components-navigation-bar/esm';
package/esm/index.js CHANGED
@@ -1,12 +1,14 @@
1
1
  export { ModalResponsive as Modal } from './Component.responsive.js';
2
2
  import 'tslib';
3
3
  import 'react';
4
- import '@alfalab/hooks';
4
+ import '@alfalab/core-components-mq/esm';
5
5
  import './components/content/Component.js';
6
6
  import 'classnames';
7
7
  import './Context.js';
8
8
  import '@alfalab/core-components-base-modal/esm';
9
9
  import './ResponsiveContext.js';
10
+ import './components/controls/Component.js';
11
+ import './layout.module-9ffd30f9.js';
10
12
  import './components/footer/Component.js';
11
13
  import './components/header/Component.js';
12
14
  import '@alfalab/core-components-navigation-bar/esm';
@@ -0,0 +1,4 @@
1
+ var layoutStyles = {"column":"modal__column_1gona","gap-16":"modal__gap-16_1gona","gap-24":"modal__gap-24_1gona","gap-32":"modal__gap-32_1gona","start":"modal__start_1gona","center":"modal__center_1gona","space-between":"modal__space-between_1gona"};
2
+ require('./components/footer/layout.css')
3
+
4
+ export { layoutStyles as l };
@@ -1,9 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
+ import { ControlsProps } from "../components/controls/index";
3
4
  import { ModalMobileProps } from "../typings";
4
5
  declare const ModalMobile: React.ForwardRefExoticComponent<ModalMobileProps & React.RefAttributes<HTMLDivElement>> & {
5
6
  Content: React.FC<import("../typings").ContentProps>;
6
7
  Header: React.FC<import("../components/header/Component").HeaderProps>;
7
8
  Footer: React.FC<import("../components/footer/Component").FooterProps>;
9
+ Controls: React.FC<Omit<ControlsProps, "mobileLayout">>;
8
10
  };
9
11
  export { ModalMobile };
@@ -2,6 +2,7 @@ import { __assign } from 'tslib';
2
2
  import React, { forwardRef } from 'react';
3
3
  import { Modal } from '../Component.js';
4
4
  import { Content } from '../components/content/Component.js';
5
+ import { Controls } from '../components/controls/Component.js';
5
6
  import { Footer } from '../components/footer/Component.js';
6
7
  import { Header } from '../components/header/Component.js';
7
8
  import 'react-merge-refs';
@@ -9,6 +10,7 @@ import 'classnames';
9
10
  import '@alfalab/core-components-base-modal/esm';
10
11
  import '../ResponsiveContext.js';
11
12
  import '../Context.js';
13
+ import '../layout.module-9ffd30f9.js';
12
14
  import '@alfalab/core-components-navigation-bar/esm';
13
15
 
14
16
  var ModalMobileComponent = forwardRef(function (props, ref) { return (React.createElement(Modal, __assign({}, props, { ref: ref, view: 'mobile' }))); });
@@ -16,6 +18,7 @@ var ModalMobile = Object.assign(ModalMobileComponent, {
16
18
  Content: Content,
17
19
  Header: Header,
18
20
  Footer: Footer,
21
+ Controls: Controls,
19
22
  });
20
23
 
21
24
  export { ModalMobile };
@@ -8,6 +8,8 @@ import '@alfalab/core-components-base-modal/esm';
8
8
  import '../ResponsiveContext.js';
9
9
  import '../components/content/Component.js';
10
10
  import '../Context.js';
11
+ import '../components/controls/Component.js';
12
+ import '../layout.module-9ffd30f9.js';
11
13
  import '../components/footer/Component.js';
12
14
  import '../components/header/Component.js';
13
15
  import '@alfalab/core-components-navigation-bar/esm';
@@ -1,4 +1,4 @@
1
- /* hash: 1kjid */
1
+ /* hash: 1hozm */
2
2
  :root {
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -27,7 +27,7 @@
27
27
  /* mobile */
28
28
 
29
29
  /* paddings */
30
- } .modal__component_o9513 {
30
+ } .modal__component_odxlq {
31
31
  flex: 1;
32
32
  width: 100%;
33
33
  max-width: 600px;
@@ -1,24 +1,24 @@
1
- /* hash: 1sdt2 */
2
- .modal__appear_4lmkq,
3
- .modal__enter_4lmkq {
1
+ /* hash: i34gk */
2
+ .modal__appear_4gu03,
3
+ .modal__enter_4gu03 {
4
4
  opacity: 0;
5
5
  transform: translateY(15px);
6
6
  }
7
7
 
8
- .modal__appearActive_4lmkq,
9
- .modal__enterActive_4lmkq {
8
+ .modal__appearActive_4gu03,
9
+ .modal__enterActive_4gu03 {
10
10
  opacity: 1;
11
11
  transform: translateY(0);
12
12
  transition: opacity 200ms ease-in, transform 200ms ease-in;
13
13
  }
14
14
 
15
- .modal__exit_4lmkq {
15
+ .modal__exit_4gu03 {
16
16
  opacity: 1;
17
17
  transform: translateY(0);
18
18
  }
19
19
 
20
- .modal__exitActive_4lmkq,
21
- .modal__exitDone_4lmkq {
20
+ .modal__exitActive_4gu03,
21
+ .modal__exitDone_4gu03 {
22
22
  opacity: 0;
23
23
  transform: translateY(15px);
24
24
  transition: opacity 200ms ease-out, transform 200ms ease-out;
package/esm/typings.d.ts CHANGED
@@ -29,6 +29,10 @@ type ModalResponsiveProps = ModalDesktopProps & {
29
29
  * @default 1024
30
30
  */
31
31
  breakpoint?: number;
32
+ /**
33
+ * Значение по-умолчанию для хука useMatchMedia
34
+ */
35
+ defaultMatchMediaValue?: boolean | (() => boolean);
32
36
  };
33
37
  type View = 'desktop' | 'mobile';
34
38
  type TResponsiveModalContext = {
package/index.js CHANGED
@@ -5,12 +5,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var Component_responsive = require('./Component.responsive.js');
6
6
  require('tslib');
7
7
  require('react');
8
- require('@alfalab/hooks');
8
+ require('@alfalab/core-components-mq');
9
9
  require('./components/content/Component.js');
10
10
  require('classnames');
11
11
  require('./Context.js');
12
12
  require('@alfalab/core-components-base-modal');
13
13
  require('./ResponsiveContext.js');
14
+ require('./components/controls/Component.js');
15
+ require('./layout.module-57c7b9be.js');
14
16
  require('./components/footer/Component.js');
15
17
  require('./components/header/Component.js');
16
18
  require('@alfalab/core-components-navigation-bar');
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ var layoutStyles = {"column":"modal__column_1gona","gap-16":"modal__gap-16_1gona","gap-24":"modal__gap-24_1gona","gap-32":"modal__gap-32_1gona","start":"modal__start_1gona","center":"modal__center_1gona","space-between":"modal__space-between_1gona"};
4
+ require('./components/footer/layout.css')
5
+
6
+ exports.layoutStyles = layoutStyles;
@@ -1,9 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
+ import { ControlsProps } from "../components/controls/index";
3
4
  import { ModalMobileProps } from "../typings";
4
5
  declare const ModalMobile: React.ForwardRefExoticComponent<ModalMobileProps & React.RefAttributes<HTMLDivElement>> & {
5
6
  Content: React.FC<import("../typings").ContentProps>;
6
7
  Header: React.FC<import("../components/header/Component").HeaderProps>;
7
8
  Footer: React.FC<import("../components/footer/Component").FooterProps>;
9
+ Controls: React.FC<Omit<ControlsProps, "mobileLayout">>;
8
10
  };
9
11
  export { ModalMobile };
@@ -6,6 +6,7 @@ var tslib = require('tslib');
6
6
  var React = require('react');
7
7
  var Component = require('../Component.js');
8
8
  var components_content_Component = require('../components/content/Component.js');
9
+ var components_controls_Component = require('../components/controls/Component.js');
9
10
  var components_footer_Component = require('../components/footer/Component.js');
10
11
  var components_header_Component = require('../components/header/Component.js');
11
12
  require('react-merge-refs');
@@ -13,6 +14,7 @@ require('classnames');
13
14
  require('@alfalab/core-components-base-modal');
14
15
  require('../ResponsiveContext.js');
15
16
  require('../Context.js');
17
+ require('../layout.module-57c7b9be.js');
16
18
  require('@alfalab/core-components-navigation-bar');
17
19
 
18
20
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
@@ -24,6 +26,7 @@ var ModalMobile = Object.assign(ModalMobileComponent, {
24
26
  Content: components_content_Component.Content,
25
27
  Header: components_header_Component.Header,
26
28
  Footer: components_footer_Component.Footer,
29
+ Controls: components_controls_Component.Controls,
27
30
  });
28
31
 
29
32
  exports.ModalMobile = ModalMobile;
package/mobile/index.js CHANGED
@@ -12,6 +12,8 @@ require('@alfalab/core-components-base-modal');
12
12
  require('../ResponsiveContext.js');
13
13
  require('../components/content/Component.js');
14
14
  require('../Context.js');
15
+ require('../components/controls/Component.js');
16
+ require('../layout.module-57c7b9be.js');
15
17
  require('../components/footer/Component.js');
16
18
  require('../components/header/Component.js');
17
19
  require('@alfalab/core-components-navigation-bar');
package/mobile/mobile.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1kjid */
1
+ /* hash: 1hozm */
2
2
  :root {
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -27,7 +27,7 @@
27
27
  /* mobile */
28
28
 
29
29
  /* paddings */
30
- } .modal__component_o9513 {
30
+ } .modal__component_odxlq {
31
31
  flex: 1;
32
32
  width: 100%;
33
33
  max-width: 600px;
@@ -4,13 +4,13 @@ import cn from 'classnames';
4
4
  import { BaseModal } from '@alfalab/core-components-base-modal/modern';
5
5
  import { ResponsiveContext } from './ResponsiveContext.js';
6
6
 
7
- const desktopStyles = {"wrapper":"modal__wrapper_6hdpw","component":"modal__component_6hdpw","fullscreen":"modal__fullscreen_6hdpw","s":"modal__s_6hdpw","m":"modal__m_6hdpw","l":"modal__l_6hdpw","xl":"modal__xl_6hdpw"};
7
+ const desktopStyles = {"wrapper":"modal__wrapper_1hhc8","component":"modal__component_1hhc8","fullscreen":"modal__fullscreen_1hhc8","s":"modal__s_1hhc8","m":"modal__m_1hhc8","l":"modal__l_1hhc8","xl":"modal__xl_1hhc8"};
8
8
  require('./desktop/desktop.css')
9
9
 
10
- const mobileStyles = {"component":"modal__component_o9513"};
10
+ const mobileStyles = {"component":"modal__component_odxlq"};
11
11
  require('./mobile/mobile.css')
12
12
 
13
- const transitions = {"appear":"modal__appear_4lmkq","enter":"modal__enter_4lmkq","appearActive":"modal__appearActive_4lmkq","enterActive":"modal__enterActive_4lmkq","exit":"modal__exit_4lmkq","exitActive":"modal__exitActive_4lmkq","exitDone":"modal__exitDone_4lmkq"};
13
+ const transitions = {"appear":"modal__appear_4gu03","enter":"modal__enter_4gu03","appearActive":"modal__appearActive_4gu03","enterActive":"modal__enterActive_4gu03","exit":"modal__exit_4gu03","exitActive":"modal__exitActive_4gu03","exitDone":"modal__exitDone_4gu03"};
14
14
  require('./transitions.css')
15
15
 
16
16
  const Modal = forwardRef(({ size = 's', fixedPosition, fullscreen, children, className, wrapperClassName, transitionProps = {}, view, ...restProps }, ref) => {
@@ -1,16 +1,17 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { BaseModalProps } from "@alfalab/core-components-base-modal";
4
- declare const ModalResponsive: React.ForwardRefExoticComponent<BaseModalProps & {
3
+ declare const ModalResponsive: React.ForwardRefExoticComponent<import("@alfalab/core-components-base-modal").BaseModalProps & {
5
4
  size?: "s" | "m" | "l" | "xl" | "fullscreen" | undefined;
6
5
  fullscreen?: boolean | undefined;
7
6
  fixedPosition?: boolean | undefined;
8
7
  hasCloser?: boolean | undefined;
9
8
  } & {
10
9
  breakpoint?: number | undefined;
10
+ defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
11
11
  } & React.RefAttributes<HTMLDivElement>> & {
12
12
  Header: React.FC<import("./components/header/Component").HeaderProps>;
13
13
  Content: React.FC<import("./typings").ContentProps>;
14
14
  Footer: React.FC<import("./components/footer/Component").FooterProps>;
15
+ Controls: React.FC<import("./components/controls/index").ControlsProps>;
15
16
  };
16
17
  export { ModalResponsive };
@@ -1,6 +1,7 @@
1
1
  import React, { forwardRef } from 'react';
2
- import { useMedia } from '@alfalab/hooks';
2
+ import { useMatchMedia } from '@alfalab/core-components-mq/modern';
3
3
  import { Content } from './components/content/Component.js';
4
+ import { Controls } from './components/controls/Component.js';
4
5
  import { Footer } from './components/footer/Component.js';
5
6
  import { Header } from './components/header/Component.js';
6
7
  import { Modal } from './Component.js';
@@ -8,20 +9,19 @@ import 'classnames';
8
9
  import './Context.js';
9
10
  import '@alfalab/core-components-base-modal/modern';
10
11
  import './ResponsiveContext.js';
12
+ import './layout.module-29d4c7c9.js';
11
13
  import '@alfalab/core-components-navigation-bar/modern';
12
14
  import 'react-merge-refs';
13
15
 
14
- const ModalResponsiveComponent = forwardRef(({ children, breakpoint = 1024, ...restProps }, ref) => {
15
- const [view] = useMedia([
16
- ['mobile', `(max-width: ${breakpoint - 1}px)`],
17
- ['desktop', `(min-width: ${breakpoint}px)`],
18
- ], 'desktop');
19
- return (React.createElement(Modal, { ref: ref, ...restProps, view: view }, children));
16
+ const ModalResponsiveComponent = forwardRef(({ children, breakpoint = 1024, defaultMatchMediaValue = true, ...restProps }, ref) => {
17
+ const [isDesktop] = useMatchMedia(`(min-width: ${breakpoint}px)`, defaultMatchMediaValue);
18
+ return (React.createElement(Modal, { ref: ref, ...restProps, view: isDesktop ? 'desktop' : 'mobile' }, children));
20
19
  });
21
20
  const ModalResponsive = Object.assign(ModalResponsiveComponent, {
22
21
  Header,
23
22
  Content,
24
23
  Footer,
24
+ Controls,
25
25
  });
26
26
 
27
27
  export { ModalResponsive };
@@ -4,13 +4,13 @@ import { ModalContext } from '../../Context.js';
4
4
  import { ResponsiveContext } from '../../ResponsiveContext.js';
5
5
  import '@alfalab/core-components-base-modal/modern';
6
6
 
7
- const desktopStyles = {"s":"modal__s_1pngk","m":"modal__m_1pngk","l":"modal__l_1pngk","xl":"modal__xl_1pngk","fullscreen":"modal__fullscreen_1pngk"};
7
+ const desktopStyles = {"s":"modal__s_1ps95","m":"modal__m_1ps95","l":"modal__l_1ps95","xl":"modal__xl_1ps95","fullscreen":"modal__fullscreen_1ps95"};
8
8
  require('./desktop.css')
9
9
 
10
- const styles = {"content":"modal__content_1ubc5","withHeader":"modal__withHeader_1ubc5","flex":"modal__flex_1ubc5"};
10
+ const styles = {"content":"modal__content_1ug4p","withHeader":"modal__withHeader_1ug4p","flex":"modal__flex_1ug4p"};
11
11
  require('./index.css')
12
12
 
13
- const mobileStyles = {"content":"modal__content_q4eh8"};
13
+ const mobileStyles = {"content":"modal__content_y4sbt"};
14
14
  require('./mobile.css')
15
15
 
16
16
  const Content = ({ children, flex, className }) => {
@@ -1,4 +1,4 @@
1
- /* hash: 4tvbu */
1
+ /* hash: vsqki */
2
2
  :root {
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -30,12 +30,12 @@
30
30
  /* mobile */
31
31
 
32
32
  /* paddings */
33
- } .modal__s_1pngk,
34
- .modal__m_1pngk,
35
- .modal__l_1pngk,
36
- .modal__xl_1pngk,
37
- .modal__fullscreen_1pngk {
33
+ } .modal__s_1ps95,
34
+ .modal__m_1ps95,
35
+ .modal__l_1ps95,
36
+ .modal__xl_1ps95,
37
+ .modal__fullscreen_1ps95 {
38
38
  padding: var(--modal-s-content-paddings)
39
- } .modal__s_1pngk:last-child, .modal__m_1pngk:last-child, .modal__l_1pngk:last-child, .modal__xl_1pngk:last-child, .modal__fullscreen_1pngk:last-child {
39
+ } .modal__s_1ps95:last-child, .modal__m_1ps95:last-child, .modal__l_1ps95:last-child, .modal__xl_1ps95:last-child, .modal__fullscreen_1ps95:last-child {
40
40
  padding-bottom: var(--modal-s-content-only-bottom-padding);
41
41
  }
@@ -1,4 +1,4 @@
1
- /* hash: 1m34j */
1
+ /* hash: e0vq9 */
2
2
  :root {
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -27,13 +27,13 @@
27
27
  /* mobile */
28
28
 
29
29
  /* paddings */
30
- } .modal__content_1ubc5 {
30
+ } .modal__content_1ug4p {
31
31
  position: relative;
32
32
  box-sizing: border-box;
33
33
  width: 100%;
34
34
  z-index: 0
35
- } .modal__content_1ubc5.modal__withHeader_1ubc5 {
35
+ } .modal__content_1ug4p.modal__withHeader_1ug4p {
36
36
  padding-top: 0;
37
- } .modal__flex_1ubc5 {
37
+ } .modal__flex_1ug4p {
38
38
  flex: 1;
39
39
  }
@@ -1,4 +1,4 @@
1
- /* hash: 11k7f */
1
+ /* hash: pcf58 */
2
2
  :root {
3
3
  } /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
4
4
  } :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -28,8 +28,8 @@
28
28
  /* mobile */
29
29
 
30
30
  /* paddings */
31
- } .modal__content_q4eh8 {
31
+ } .modal__content_y4sbt {
32
32
  padding: var(--gap-m) var(--gap-m) 0
33
- } .modal__content_q4eh8:last-child {
33
+ } .modal__content_y4sbt:last-child {
34
34
  padding-bottom: var(--gap-m);
35
35
  }
@@ -0,0 +1,29 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { ReactNode } from "react";
4
+ interface ControlsProps {
5
+ /**
6
+ * Основной слот
7
+ */
8
+ primary?: ReactNode;
9
+ /**
10
+ * Дополнительный слот
11
+ */
12
+ secondary?: ReactNode;
13
+ /**
14
+ * Выравнивание элементов футера
15
+ * @default start
16
+ */
17
+ layout?: 'start' | 'center' | 'space-between' | 'column';
18
+ /**
19
+ * Выравнивание элементов футера (мобильный view)
20
+ * @default start
21
+ */
22
+ mobileLayout?: 'start' | 'center' | 'space-between' | 'column';
23
+ /**
24
+ * Отступы между элементами футера
25
+ */
26
+ gap?: 16 | 24 | 32;
27
+ }
28
+ declare const Controls: React.FC<ControlsProps>;
29
+ export { ControlsProps, Controls };
@@ -0,0 +1,20 @@
1
+ import React, { useContext } from 'react';
2
+ import cn from 'classnames';
3
+ import { ResponsiveContext } from '../../ResponsiveContext.js';
4
+ import { l as layoutStyles } from '../../layout.module-29d4c7c9.js';
5
+
6
+ const styles = {"component":"modal__component_hhndl"};
7
+ require('./index.css')
8
+
9
+ const Controls = ({ primary, secondary, gap = 16, layout: layoutProp = 'start', mobileLayout = layoutProp, }) => {
10
+ const { view } = useContext(ResponsiveContext);
11
+ const layout = view === 'mobile' ? mobileLayout : layoutProp;
12
+ const shouldReverse = view === 'mobile' && layout !== 'column';
13
+ return (React.createElement("div", { className: cn(styles.component, layoutStyles[layout], gap && layoutStyles[`gap-${gap}`]) }, shouldReverse ? (React.createElement(React.Fragment, null,
14
+ secondary,
15
+ primary)) : (React.createElement(React.Fragment, null,
16
+ primary,
17
+ secondary))));
18
+ };
19
+
20
+ export { Controls };
@@ -0,0 +1,4 @@
1
+ /* hash: 13rud */
2
+ .modal__component_hhndl {
3
+ width: 100%;
4
+ }
@@ -0,0 +1 @@
1
+ export * from "./Component";
@@ -0,0 +1,5 @@
1
+ export { Controls } from './Component.js';
2
+ import 'react';
3
+ import 'classnames';
4
+ import '../../ResponsiveContext.js';
5
+ import '../../layout.module-29d4c7c9.js';
@@ -2,18 +2,16 @@ import React, { useContext, useEffect } from 'react';
2
2
  import cn from 'classnames';
3
3
  import { ModalContext } from '../../Context.js';
4
4
  import { ResponsiveContext } from '../../ResponsiveContext.js';
5
+ import { l as layoutStyles } from '../../layout.module-29d4c7c9.js';
5
6
  import '@alfalab/core-components-base-modal/modern';
6
7
 
7
- const desktopStyles = {"footer":"modal__footer_kfufc","sticky":"modal__sticky_kfufc","fullscreen":"modal__fullscreen_kfufc","s":"modal__s_kfufc","m":"modal__m_kfufc","l":"modal__l_kfufc","xl":"modal__xl_kfufc"};
8
+ const desktopStyles = {"footer":"modal__footer_kkmzz","sticky":"modal__sticky_kkmzz","fullscreen":"modal__fullscreen_kkmzz","s":"modal__s_kkmzz","m":"modal__m_kkmzz","l":"modal__l_kkmzz","xl":"modal__xl_kkmzz"};
8
9
  require('./desktop.css')
9
10
 
10
- const styles = {"footer":"modal__footer_cx131","sticky":"modal__sticky_cx131","highlighted":"modal__highlighted_cx131"};
11
+ const styles = {"footer":"modal__footer_d1tnp","sticky":"modal__sticky_d1tnp","highlighted":"modal__highlighted_d1tnp"};
11
12
  require('./index.css')
12
13
 
13
- const layoutStyles = {"column":"modal__column_1gjuq","gap-16":"modal__gap-16_1gjuq","gap-24":"modal__gap-24_1gjuq","gap-32":"modal__gap-32_1gjuq","column-mobile":"modal__column-mobile_1gjuq","start":"modal__start_1gjuq","center":"modal__center_1gjuq","space-between":"modal__space-between_1gjuq"};
14
- require('./layout.css')
15
-
16
- const mobileStyles = {"footer":"modal__footer_159cp","sticky":"modal__sticky_159cp"};
14
+ const mobileStyles = {"footer":"modal__footer_1d9qk","sticky":"modal__sticky_1d9qk"};
17
15
  require('./mobile.css')
18
16
 
19
17
  const Footer = ({ children, className, sticky, layout = 'start', gap }) => {
@@ -30,7 +28,6 @@ const Footer = ({ children, className, sticky, layout = 'start', gap }) => {
30
28
  [desktopStyles[size]]: view === 'desktop',
31
29
  [mobileStyles.footer]: view === 'mobile',
32
30
  [mobileStyles.sticky]: view === 'mobile' && sticky,
33
- [layoutStyles[`${layout}-mobile`]]: view === 'mobile',
34
31
  }) }, children));
35
32
  };
36
33