@alfalab/core-components-modal 5.2.7 → 5.4.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 (148) hide show
  1. package/Component-12cb5541.d.ts +50 -0
  2. package/Component-12cb5541.js +43 -0
  3. package/Component.desktop.js +4 -4
  4. package/Component.mobile.js +4 -4
  5. package/Component.responsive.d.ts +13 -1
  6. package/Component.responsive.js +6 -6
  7. package/components/closer/Component.d.ts +4 -0
  8. package/components/closer/Component.js +4 -4
  9. package/components/closer/index.css +4 -4
  10. package/components/content/Component.desktop.js +2 -2
  11. package/components/content/Component.js +1 -1
  12. package/components/content/Component.mobile.js +2 -2
  13. package/components/content/desktop.css +8 -8
  14. package/components/content/index.css +3 -3
  15. package/components/content/mobile.css +3 -3
  16. package/components/footer/Component.desktop.js +2 -2
  17. package/components/footer/Component.js +2 -2
  18. package/components/footer/Component.mobile.js +2 -2
  19. package/components/footer/desktop.css +9 -9
  20. package/components/footer/index.css +4 -4
  21. package/components/footer/layout.css +25 -25
  22. package/components/footer/mobile.css +3 -3
  23. package/components/header/Component.d.ts +0 -45
  24. package/components/header/Component.desktop.d.ts +1 -1
  25. package/components/header/Component.desktop.js +5 -5
  26. package/components/header/Component.js +5 -32
  27. package/components/header/Component.mobile.d.ts +1 -1
  28. package/components/header/Component.mobile.js +5 -5
  29. package/components/header/desktop.css +17 -17
  30. package/components/header/index.css +15 -15
  31. package/components/header/mobile.css +3 -3
  32. package/cssm/Component-5fe52731.d.ts +50 -0
  33. package/cssm/Component-5fe52731.js +42 -0
  34. package/cssm/Component.desktop.js +1 -1
  35. package/cssm/Component.mobile.js +1 -1
  36. package/cssm/Component.responsive.d.ts +13 -1
  37. package/cssm/Component.responsive.js +4 -4
  38. package/cssm/components/closer/Component.d.ts +4 -0
  39. package/cssm/components/closer/Component.js +2 -2
  40. package/cssm/components/header/Component.d.ts +0 -45
  41. package/cssm/components/header/Component.desktop.d.ts +1 -1
  42. package/cssm/components/header/Component.desktop.js +3 -3
  43. package/cssm/components/header/Component.js +6 -31
  44. package/cssm/components/header/Component.mobile.d.ts +1 -1
  45. package/cssm/components/header/Component.mobile.js +3 -3
  46. package/cssm/desktop.js +1 -1
  47. package/cssm/getDataTestId-3fe0d3e6.d.ts +2 -0
  48. package/cssm/index.js +1 -1
  49. package/cssm/mobile.js +1 -1
  50. package/cssm/responsive.js +1 -1
  51. package/desktop.css +9 -9
  52. package/desktop.js +3 -3
  53. package/esm/Component-e546d8c5.d.ts +50 -0
  54. package/esm/Component-e546d8c5.js +35 -0
  55. package/esm/Component.desktop.js +4 -4
  56. package/esm/Component.mobile.js +4 -4
  57. package/esm/Component.responsive.d.ts +13 -1
  58. package/esm/Component.responsive.js +6 -6
  59. package/esm/components/closer/Component.d.ts +4 -0
  60. package/esm/components/closer/Component.js +4 -4
  61. package/esm/components/closer/index.css +4 -4
  62. package/esm/components/content/Component.desktop.js +2 -2
  63. package/esm/components/content/Component.js +1 -1
  64. package/esm/components/content/Component.mobile.js +2 -2
  65. package/esm/components/content/desktop.css +8 -8
  66. package/esm/components/content/index.css +3 -3
  67. package/esm/components/content/mobile.css +3 -3
  68. package/esm/components/footer/Component.desktop.js +2 -2
  69. package/esm/components/footer/Component.js +2 -2
  70. package/esm/components/footer/Component.mobile.js +2 -2
  71. package/esm/components/footer/desktop.css +9 -9
  72. package/esm/components/footer/index.css +4 -4
  73. package/esm/components/footer/layout.css +25 -25
  74. package/esm/components/footer/mobile.css +3 -3
  75. package/esm/components/header/Component.d.ts +0 -45
  76. package/esm/components/header/Component.desktop.d.ts +1 -1
  77. package/esm/components/header/Component.desktop.js +5 -5
  78. package/esm/components/header/Component.js +4 -30
  79. package/esm/components/header/Component.mobile.d.ts +1 -1
  80. package/esm/components/header/Component.mobile.js +5 -5
  81. package/esm/components/header/desktop.css +17 -17
  82. package/esm/components/header/index.css +15 -15
  83. package/esm/components/header/mobile.css +3 -3
  84. package/esm/desktop.css +9 -9
  85. package/esm/desktop.js +3 -3
  86. package/esm/getDataTestId-3fe0d3e6.d.ts +2 -0
  87. package/esm/index.js +3 -3
  88. package/esm/mobile.css +2 -2
  89. package/esm/mobile.js +3 -3
  90. package/esm/responsive.js +3 -3
  91. package/esm/transitions.css +8 -8
  92. package/esm/transitions.module-246cce05.js +4 -0
  93. package/esm/{tslib.es6-95d263a8.d.ts → tslib.es6-c7c6d75c.d.ts} +0 -0
  94. package/esm/{tslib.es6-95d263a8.js → tslib.es6-c7c6d75c.js} +0 -0
  95. package/getDataTestId-3fe0d3e6.d.ts +2 -0
  96. package/index.js +3 -3
  97. package/mobile.css +2 -2
  98. package/mobile.js +3 -3
  99. package/modern/Component-d3db43e2.d.ts +50 -0
  100. package/modern/Component-d3db43e2.js +33 -0
  101. package/modern/Component.desktop.js +3 -3
  102. package/modern/Component.mobile.js +3 -3
  103. package/modern/Component.responsive.d.ts +13 -1
  104. package/modern/Component.responsive.js +5 -5
  105. package/modern/components/closer/Component.d.ts +4 -0
  106. package/modern/components/closer/Component.js +4 -4
  107. package/modern/components/closer/index.css +4 -4
  108. package/modern/components/content/Component.desktop.js +1 -1
  109. package/modern/components/content/Component.js +1 -1
  110. package/modern/components/content/Component.mobile.js +1 -1
  111. package/modern/components/content/desktop.css +8 -8
  112. package/modern/components/content/index.css +3 -3
  113. package/modern/components/content/mobile.css +3 -3
  114. package/modern/components/footer/Component.desktop.js +1 -1
  115. package/modern/components/footer/Component.js +2 -2
  116. package/modern/components/footer/Component.mobile.js +1 -1
  117. package/modern/components/footer/desktop.css +9 -9
  118. package/modern/components/footer/index.css +4 -4
  119. package/modern/components/footer/layout.css +25 -25
  120. package/modern/components/footer/mobile.css +3 -3
  121. package/modern/components/header/Component.d.ts +0 -45
  122. package/modern/components/header/Component.desktop.d.ts +1 -1
  123. package/modern/components/header/Component.desktop.js +4 -4
  124. package/modern/components/header/Component.js +4 -28
  125. package/modern/components/header/Component.mobile.d.ts +1 -1
  126. package/modern/components/header/Component.mobile.js +4 -4
  127. package/modern/components/header/desktop.css +17 -17
  128. package/modern/components/header/index.css +15 -15
  129. package/modern/components/header/mobile.css +3 -3
  130. package/modern/desktop.css +9 -9
  131. package/modern/desktop.js +2 -2
  132. package/modern/getDataTestId-3fe0d3e6.d.ts +2 -0
  133. package/modern/index.js +2 -2
  134. package/modern/mobile.css +2 -2
  135. package/modern/mobile.js +2 -2
  136. package/modern/responsive.js +2 -2
  137. package/modern/transitions.css +8 -8
  138. package/modern/transitions.module-246cce05.js +4 -0
  139. package/package.json +6 -6
  140. package/responsive.js +3 -3
  141. package/transitions.css +8 -8
  142. package/transitions.module-e148225b.js +6 -0
  143. package/{tslib.es6-eacbc725.d.ts → tslib.es6-2d094523.d.ts} +0 -0
  144. package/{tslib.es6-eacbc725.js → tslib.es6-2d094523.js} +0 -0
  145. package/CHANGELOG.md +0 -643
  146. package/esm/transitions.module-1403a282.js +0 -4
  147. package/modern/transitions.module-1403a282.js +0 -4
  148. package/transitions.module-21cce0a0.js +0 -6
@@ -3,10 +3,10 @@ import cn from 'classnames';
3
3
  import '@alfalab/core-components-base-modal/esm';
4
4
  import { ModalContext } from '../../Context.js';
5
5
 
6
- var styles = {"footer":"modal__footer_a501a","sticky":"modal__sticky_a501a","highlighted":"modal__highlighted_a501a"};
6
+ var styles = {"footer":"modal__footer_1ckue","sticky":"modal__sticky_1ckue","highlighted":"modal__highlighted_1ckue"};
7
7
  require('./index.css')
8
8
 
9
- var layoutStyles = {"column":"modal__column_74d01","gap-16":"modal__gap-16_74d01","gap-24":"modal__gap-24_74d01","gap-32":"modal__gap-32_74d01","start":"modal__start_74d01","center":"modal__center_74d01","space-between":"modal__space-between_74d01"};
9
+ var layoutStyles = {"column":"modal__column_djfss","gap-16":"modal__gap-16_djfss","gap-24":"modal__gap-24_djfss","gap-32":"modal__gap-32_djfss","start":"modal__start_djfss","center":"modal__center_djfss","space-between":"modal__space-between_djfss"};
10
10
  require('./layout.css')
11
11
 
12
12
  var Footer = function (_a) {
@@ -1,11 +1,11 @@
1
- import { _ as __rest, a as __assign } from '../../tslib.es6-95d263a8.js';
1
+ import { _ as __rest, a as __assign } from '../../tslib.es6-c7c6d75c.js';
2
2
  import React from 'react';
3
3
  import cn from 'classnames';
4
4
  import '@alfalab/core-components-base-modal/esm';
5
5
  import '../../Context.js';
6
6
  import { Footer } from './Component.js';
7
7
 
8
- var styles = {"footer":"modal__footer_1xqlk","sticky":"modal__sticky_1xqlk"};
8
+ var styles = {"footer":"modal__footer_lu7nw","sticky":"modal__sticky_lu7nw"};
9
9
  require('./mobile.css')
10
10
 
11
11
  var FooterMobile = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: e98if */
1
+ /* hash: jcnt6 */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -31,22 +31,22 @@
31
31
 
32
32
  /* mobile */
33
33
  }
34
- .modal__footer_1l3ew {
34
+ .modal__footer_1rihp {
35
35
  border-bottom-left-radius: var(--modal-border-radius);
36
36
  border-bottom-right-radius: var(--modal-border-radius);
37
37
  }
38
- .modal__sticky_1l3ew {
38
+ .modal__sticky_1rihp {
39
39
  bottom: calc(var(--modal-vertical-padding) * -1)
40
40
  }
41
- .modal__sticky_1l3ew.modal__fullscreen_1l3ew {
41
+ .modal__sticky_1rihp.modal__fullscreen_1rihp {
42
42
  bottom: 0;
43
43
  }
44
- .modal__s_1l3ew,
45
- .modal__m_1l3ew {
44
+ .modal__s_1rihp,
45
+ .modal__m_1rihp {
46
46
  padding: var(--modal-s-footer-paddings);
47
47
  }
48
- .modal__l_1l3ew,
49
- .modal__xl_1l3ew,
50
- .modal__fullscreen_1l3ew {
48
+ .modal__l_1rihp,
49
+ .modal__xl_1rihp,
50
+ .modal__fullscreen_1rihp {
51
51
  padding: var(--gap-2xl) var(--gap-6xl) var(--gap-6xl);
52
52
  }
@@ -1,4 +1,4 @@
1
- /* hash: dizyo */
1
+ /* hash: s630c */
2
2
  :root {
3
3
  --color-light-bg-primary: #fff;
4
4
  --color-light-border-primary: #dbdee1;
@@ -26,16 +26,16 @@
26
26
 
27
27
  /* mobile */
28
28
  }
29
- .modal__footer_a501a {
29
+ .modal__footer_1ckue {
30
30
  width: 100%;
31
31
  box-sizing: border-box;
32
32
  transition: box-shadow 0.2s ease, background 0.2s ease;
33
33
  }
34
- .modal__sticky_a501a {
34
+ .modal__sticky_1ckue {
35
35
  background: var(--modal-footer-background);
36
36
  position: sticky;
37
37
  }
38
- .modal__highlighted_a501a {
38
+ .modal__highlighted_1ckue {
39
39
  background: var(--modal-footer-highlight-background);
40
40
  box-shadow: var(--modal-footer-highlight-box-shadow);
41
41
  }
@@ -1,4 +1,4 @@
1
- /* hash: iwlpl */
1
+ /* hash: o010c */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -25,60 +25,60 @@
25
25
 
26
26
  /* mobile */
27
27
  }
28
- .modal__column_74d01 {
28
+ .modal__column_djfss {
29
29
  display: flex;
30
30
  flex-direction: column
31
31
  }
32
- .modal__column_74d01 > * {
32
+ .modal__column_djfss > * {
33
33
  margin-bottom: var(--modal-footer-default-gap);
34
34
  }
35
- .modal__column_74d01 > *:last-child,
36
- .modal__column_74d01 > *:only-child {
35
+ .modal__column_djfss > *:last-child,
36
+ .modal__column_djfss > *:only-child {
37
37
  margin-bottom: 0;
38
38
  }
39
- .modal__column_74d01.modal__gap-16_74d01 > * {
39
+ .modal__column_djfss.modal__gap-16_djfss > * {
40
40
  margin-bottom: var(--gap-m);
41
41
  }
42
- .modal__column_74d01.modal__gap-24_74d01 > * {
42
+ .modal__column_djfss.modal__gap-24_djfss > * {
43
43
  margin-bottom: var(--gap-xl);
44
44
  }
45
- .modal__column_74d01.modal__gap-32_74d01 > * {
45
+ .modal__column_djfss.modal__gap-32_djfss > * {
46
46
  margin-bottom: var(--gap-2xl);
47
47
  }
48
- .modal__start_74d01 {
48
+ .modal__start_djfss {
49
49
  justify-content: flex-start;
50
50
  }
51
- .modal__center_74d01 {
51
+ .modal__center_djfss {
52
52
  justify-content: center;
53
53
  }
54
- .modal__space-between_74d01 {
54
+ .modal__space-between_djfss {
55
55
  justify-content: space-between
56
56
  }
57
- .modal__space-between_74d01 > * {
57
+ .modal__space-between_djfss > * {
58
58
  flex: 1;
59
59
  }
60
- .modal__start_74d01,
61
- .modal__center_74d01,
62
- .modal__space-between_74d01 {
60
+ .modal__start_djfss,
61
+ .modal__center_djfss,
62
+ .modal__space-between_djfss {
63
63
  display: flex
64
64
  }
65
- .modal__start_74d01 > *, .modal__center_74d01 > *, .modal__space-between_74d01 > * {
65
+ .modal__start_djfss > *, .modal__center_djfss > *, .modal__space-between_djfss > * {
66
66
  margin-right: var(--modal-footer-default-gap);
67
67
  }
68
- .modal__start_74d01 > *:last-child,
69
- .modal__start_74d01 > *:only-child,
70
- .modal__center_74d01 > *:last-child,
71
- .modal__center_74d01 > *:only-child,
72
- .modal__space-between_74d01 > *:last-child,
73
- .modal__space-between_74d01 > *:only-child {
68
+ .modal__start_djfss > *:last-child,
69
+ .modal__start_djfss > *:only-child,
70
+ .modal__center_djfss > *:last-child,
71
+ .modal__center_djfss > *:only-child,
72
+ .modal__space-between_djfss > *:last-child,
73
+ .modal__space-between_djfss > *:only-child {
74
74
  margin-right: 0;
75
75
  }
76
- .modal__start_74d01.modal__gap-16_74d01 > *, .modal__center_74d01.modal__gap-16_74d01 > *, .modal__space-between_74d01.modal__gap-16_74d01 > * {
76
+ .modal__start_djfss.modal__gap-16_djfss > *, .modal__center_djfss.modal__gap-16_djfss > *, .modal__space-between_djfss.modal__gap-16_djfss > * {
77
77
  margin-right: var(--gap-m);
78
78
  }
79
- .modal__start_74d01.modal__gap-24_74d01 > *, .modal__center_74d01.modal__gap-24_74d01 > *, .modal__space-between_74d01.modal__gap-24_74d01 > * {
79
+ .modal__start_djfss.modal__gap-24_djfss > *, .modal__center_djfss.modal__gap-24_djfss > *, .modal__space-between_djfss.modal__gap-24_djfss > * {
80
80
  margin-right: var(--gap-xl);
81
81
  }
82
- .modal__start_74d01.modal__gap-32_74d01 > *, .modal__center_74d01.modal__gap-32_74d01 > *, .modal__space-between_74d01.modal__gap-32_74d01 > * {
82
+ .modal__start_djfss.modal__gap-32_djfss > *, .modal__center_djfss.modal__gap-32_djfss > *, .modal__space-between_djfss.modal__gap-32_djfss > * {
83
83
  margin-right: var(--gap-2xl);
84
84
  }
@@ -1,4 +1,4 @@
1
- /* hash: 1pd1v */
1
+ /* hash: 1xx5y */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -22,9 +22,9 @@
22
22
 
23
23
  /* mobile */
24
24
  }
25
- .modal__footer_1xqlk {
25
+ .modal__footer_lu7nw {
26
26
  padding: var(--gap-m);
27
27
  }
28
- .modal__sticky_1xqlk {
28
+ .modal__sticky_lu7nw {
29
29
  bottom: 0;
30
30
  }
@@ -1,45 +0,0 @@
1
- import { FC, ReactNode } from 'react';
2
- type HeaderProps = {
3
- /**
4
- * Контент шапки
5
- */
6
- children?: ReactNode;
7
- /**
8
- * Слот слева
9
- */
10
- leftAddons?: ReactNode;
11
- /**
12
- * Компонент крестика
13
- */
14
- closer?: ReactNode;
15
- /**
16
- * Дополнительный класс
17
- */
18
- className?: string;
19
- /**
20
- * Дополнительный класс для аддонов
21
- */
22
- addonClassName?: string;
23
- /**
24
- * Дополнительный класс для контента
25
- */
26
- contentClassName?: string;
27
- /**
28
- * Заголовок шапки
29
- */
30
- title?: string;
31
- /**
32
- * Выравнивание заголовка
33
- */
34
- align?: 'left' | 'center';
35
- /**
36
- * Обрезать ли заголовок
37
- */
38
- trim?: boolean;
39
- /**
40
- * Фиксирует шапку
41
- */
42
- sticky?: boolean;
43
- };
44
- declare const Header: FC<HeaderProps>;
45
- export { HeaderProps, Header };
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { HeaderProps } from "./Component";
2
+ import { HeaderProps } from "../../Component-e546d8c5";
3
3
  import { ModalDesktopProps } from "../../Component.desktop";
4
4
  type HeaderDesktopProps = Omit<HeaderProps, 'closer'> & {
5
5
  /**
@@ -1,24 +1,24 @@
1
- import { _ as __rest, a as __assign } from '../../tslib.es6-95d263a8.js';
1
+ import { _ as __rest, a as __assign } from '../../tslib.es6-c7c6d75c.js';
2
2
  import React from 'react';
3
3
  import cn from 'classnames';
4
4
  import '@alfalab/core-components-base-modal/esm';
5
5
  import '../../Context.js';
6
- import { Header } from './Component.js';
6
+ import { H as Header, g as getDataTestId } from '../../Component-e546d8c5.js';
7
7
  import '@alfalab/core-components-icon-button/esm';
8
8
  import '@alfalab/icons-glyph/CrossHeavyMIcon';
9
9
  import { Closer } from '../closer/Component.js';
10
10
 
11
- var styles = {"header":"modal__header_z7dpb","content":"modal__content_z7dpb","s":"modal__s_z7dpb","m":"modal__m_z7dpb","l":"modal__l_z7dpb","xl":"modal__xl_z7dpb","fullscreen":"modal__fullscreen_z7dpb","hasContent":"modal__hasContent_z7dpb","sticky":"modal__sticky_z7dpb"};
11
+ var styles = {"header":"modal__header_sfnqs","content":"modal__content_sfnqs","s":"modal__s_sfnqs","m":"modal__m_sfnqs","l":"modal__l_sfnqs","xl":"modal__xl_sfnqs","fullscreen":"modal__fullscreen_sfnqs","hasContent":"modal__hasContent_sfnqs","sticky":"modal__sticky_sfnqs"};
12
12
  require('./desktop.css')
13
13
 
14
14
  var HeaderDesktop = function (_a) {
15
15
  var _b;
16
- var size = _a.size, className = _a.className, contentClassName = _a.contentClassName, _c = _a.hasCloser, hasCloser = _c === void 0 ? true : _c, sticky = _a.sticky, _d = _a.leftAddons, leftAddons = _d === void 0 ? React.createElement("span", null) : _d, title = _a.title, children = _a.children, restProps = __rest(_a, ["size", "className", "contentClassName", "hasCloser", "sticky", "leftAddons", "title", "children"]);
16
+ var size = _a.size, className = _a.className, contentClassName = _a.contentClassName, _c = _a.hasCloser, hasCloser = _c === void 0 ? true : _c, sticky = _a.sticky, _d = _a.leftAddons, leftAddons = _d === void 0 ? React.createElement("span", null) : _d, title = _a.title, children = _a.children, dataTestId = _a.dataTestId, restProps = __rest(_a, ["size", "className", "contentClassName", "hasCloser", "sticky", "leftAddons", "title", "children", "dataTestId"]);
17
17
  var hasContent = title || Boolean(children);
18
18
  return (React.createElement(Header, __assign({ className: cn(className, styles.header, size && styles[size], (_b = {},
19
19
  _b[styles.sticky] = sticky,
20
20
  _b[styles.hasContent] = hasContent,
21
- _b)), contentClassName: cn(styles.content, contentClassName), closer: hasCloser ? React.createElement(Closer, null) : null, leftAddons: leftAddons, sticky: sticky, title: title }, restProps), children));
21
+ _b)), contentClassName: cn(styles.content, contentClassName), closer: hasCloser ? React.createElement(Closer, { dataTestId: getDataTestId(dataTestId, 'closer') }) : null, leftAddons: leftAddons, sticky: sticky, title: title, dataTestId: dataTestId }, restProps), children));
22
22
  };
23
23
 
24
24
  export { HeaderDesktop };
@@ -1,31 +1,5 @@
1
- import React, { useContext, useEffect } from 'react';
2
- import cn from 'classnames';
1
+ import 'react';
2
+ import 'classnames';
3
3
  import '@alfalab/core-components-base-modal/esm';
4
- import { ModalContext } from '../../Context.js';
5
-
6
- var styles = {"header":"modal__header_puwvl","hasContent":"modal__hasContent_puwvl","highlighted":"modal__highlighted_puwvl","sticky":"modal__sticky_puwvl","content":"modal__content_puwvl","title":"modal__title_puwvl","addon":"modal__addon_puwvl","closer":"modal__closer_puwvl","left":"modal__left_puwvl","center":"modal__center_puwvl","right":"modal__right_puwvl","trim":"modal__trim_puwvl"};
7
- require('./index.css')
8
-
9
- var Header = function (_a) {
10
- var _b, _c;
11
- var className = _a.className, addonClassName = _a.addonClassName, contentClassName = _a.contentClassName, leftAddons = _a.leftAddons, children = _a.children, _d = _a.align, align = _d === void 0 ? 'left' : _d, _e = _a.trim, trim = _e === void 0 ? true : _e, title = _a.title, closer = _a.closer, sticky = _a.sticky;
12
- var _f = useContext(ModalContext), headerHighlighted = _f.headerHighlighted, setHasHeader = _f.setHasHeader;
13
- var hasContent = title || Boolean(children);
14
- useEffect(function () {
15
- setHasHeader(true);
16
- }, [setHasHeader]);
17
- return (React.createElement("div", { className: cn(styles.header, className, (_b = {},
18
- _b[styles.highlighted] = hasContent && sticky && headerHighlighted,
19
- _b[styles.sticky] = sticky,
20
- _b[styles.hasContent] = hasContent,
21
- _b)) },
22
- leftAddons && React.createElement("div", { className: cn(styles.addon, addonClassName) }, leftAddons),
23
- hasContent && (React.createElement("div", { className: cn(styles.content, contentClassName, styles[align], (_c = {},
24
- _c[styles.trim] = trim,
25
- _c)) },
26
- children,
27
- title && React.createElement("div", { className: styles.title }, title))),
28
- closer && (React.createElement("div", { className: cn(styles.addon, styles.closer, addonClassName) }, closer))));
29
- };
30
-
31
- export { Header };
4
+ import '../../Context.js';
5
+ export { H as Header } from '../../Component-e546d8c5.js';
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { HeaderProps } from "./Component";
2
+ import { HeaderProps } from "../../Component-e546d8c5";
3
3
  type HeaderMobileProps = Omit<HeaderProps, 'closer'> & {
4
4
  /**
5
5
  * Наличие крестика
@@ -1,23 +1,23 @@
1
- import { _ as __rest, a as __assign } from '../../tslib.es6-95d263a8.js';
1
+ import { _ as __rest, a as __assign } from '../../tslib.es6-c7c6d75c.js';
2
2
  import React from 'react';
3
3
  import cn from 'classnames';
4
4
  import '@alfalab/core-components-base-modal/esm';
5
5
  import '../../Context.js';
6
- import { Header } from './Component.js';
6
+ import { H as Header, g as getDataTestId } from '../../Component-e546d8c5.js';
7
7
  import '@alfalab/core-components-icon-button/esm';
8
8
  import '@alfalab/icons-glyph/CrossHeavyMIcon';
9
9
  import { Closer } from '../closer/Component.js';
10
10
  import CrossMIcon from '@alfalab/icons-glyph/CrossMIcon';
11
11
 
12
- var styles = {"sticky":"modal__sticky_13ljz","content":"modal__content_13ljz"};
12
+ var styles = {"sticky":"modal__sticky_2q2gr","content":"modal__content_2q2gr"};
13
13
  require('./mobile.css')
14
14
 
15
15
  var HeaderMobile = function (_a) {
16
16
  var _b;
17
- var className = _a.className, contentClassName = _a.contentClassName, _c = _a.hasCloser, hasCloser = _c === void 0 ? true : _c, sticky = _a.sticky, restProps = __rest(_a, ["className", "contentClassName", "hasCloser", "sticky"]);
17
+ var className = _a.className, contentClassName = _a.contentClassName, _c = _a.hasCloser, hasCloser = _c === void 0 ? true : _c, sticky = _a.sticky, dataTestId = _a.dataTestId, restProps = __rest(_a, ["className", "contentClassName", "hasCloser", "sticky", "dataTestId"]);
18
18
  return (React.createElement(Header, __assign({ className: cn(className, (_b = {},
19
19
  _b[styles.sticky] = sticky,
20
- _b)), contentClassName: cn(styles.content, contentClassName), closer: hasCloser ? React.createElement(Closer, { icon: CrossMIcon, size: 'xs' }) : null, sticky: sticky }, restProps)));
20
+ _b)), contentClassName: cn(styles.content, contentClassName), closer: hasCloser ? (React.createElement(Closer, { icon: CrossMIcon, size: 'xs', dataTestId: getDataTestId(dataTestId, 'closer') })) : null, sticky: sticky, dataTestId: dataTestId }, restProps)));
21
21
  };
22
22
 
23
23
  export { HeaderMobile };
@@ -1,4 +1,4 @@
1
- /* hash: 18ady */
1
+ /* hash: 1dzxy */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -43,45 +43,45 @@
43
43
 
44
44
  /* mobile */
45
45
  }
46
- .modal__header_z7dpb {
46
+ .modal__header_sfnqs {
47
47
  border-top-left-radius: var(--modal-border-radius);
48
48
  border-top-right-radius: var(--modal-border-radius);
49
49
  }
50
- .modal__content_z7dpb {
50
+ .modal__content_sfnqs {
51
51
  font-weight: var(--modal-header-desktop-font-weight);
52
52
  font-family: var(--modal-header-desktop-font-family);
53
53
  }
54
- .modal__s_z7dpb .modal__content_z7dpb,
55
- .modal__m_z7dpb .modal__content_z7dpb {
54
+ .modal__s_sfnqs .modal__content_sfnqs,
55
+ .modal__m_sfnqs .modal__content_sfnqs {
56
56
  padding: var(--modal-s-header-desktop-content-paddings);
57
57
  font-size: var(--modal-s-header-desktop-font-size);
58
58
  line-height: var(--modal-s-header-desktop-line-height);
59
59
  }
60
- .modal__l_z7dpb .modal__content_z7dpb,
61
- .modal__xl_z7dpb .modal__content_z7dpb,
62
- .modal__fullscreen_z7dpb .modal__content_z7dpb {
60
+ .modal__l_sfnqs .modal__content_sfnqs,
61
+ .modal__xl_sfnqs .modal__content_sfnqs,
62
+ .modal__fullscreen_sfnqs .modal__content_sfnqs {
63
63
  padding: var(--modal-l-header-desktop-content-paddings);
64
64
  font-size: var(--modal-l-header-desktop-font-size);
65
65
  line-height: var(--modal-l-header-desktop-line-height);
66
66
  }
67
- .modal__s_z7dpb,
68
- .modal__m_z7dpb {
67
+ .modal__s_sfnqs,
68
+ .modal__m_sfnqs {
69
69
  padding: var(--modal-s-header-paddings)
70
70
  }
71
- .modal__s_z7dpb:not(.modal__hasContent_z7dpb), .modal__m_z7dpb:not(.modal__hasContent_z7dpb) {
71
+ .modal__s_sfnqs:not(.modal__hasContent_sfnqs), .modal__m_sfnqs:not(.modal__hasContent_sfnqs) {
72
72
  padding-bottom: 0;
73
73
  }
74
- .modal__l_z7dpb,
75
- .modal__xl_z7dpb,
76
- .modal__fullscreen_z7dpb {
74
+ .modal__l_sfnqs,
75
+ .modal__xl_sfnqs,
76
+ .modal__fullscreen_sfnqs {
77
77
  padding: var(--gap-xl) var(--gap-xl) var(--gap-m)
78
78
  }
79
- .modal__l_z7dpb:not(.modal__hasContent_z7dpb), .modal__xl_z7dpb:not(.modal__hasContent_z7dpb), .modal__fullscreen_z7dpb:not(.modal__hasContent_z7dpb) {
79
+ .modal__l_sfnqs:not(.modal__hasContent_sfnqs), .modal__xl_sfnqs:not(.modal__hasContent_sfnqs), .modal__fullscreen_sfnqs:not(.modal__hasContent_sfnqs) {
80
80
  padding-bottom: var(--gap-m);
81
81
  }
82
- .modal__sticky_z7dpb {
82
+ .modal__sticky_sfnqs {
83
83
  top: calc(var(--modal-vertical-padding) * -1)
84
84
  }
85
- .modal__sticky_z7dpb.modal__fullscreen_z7dpb {
85
+ .modal__sticky_sfnqs.modal__fullscreen_sfnqs {
86
86
  top: 0;
87
87
  }
@@ -1,4 +1,4 @@
1
- /* hash: 1qi8w */
1
+ /* hash: 6qcm7 */
2
2
  :root {
3
3
  --color-light-bg-primary: #fff;
4
4
  }
@@ -25,7 +25,7 @@
25
25
 
26
26
  /* mobile */
27
27
  }
28
- .modal__header_puwvl {
28
+ .modal__header_1f3yh {
29
29
  width: 100%;
30
30
  box-sizing: border-box;
31
31
  display: flex;
@@ -33,26 +33,26 @@
33
33
  justify-content: space-between;
34
34
  transition: box-shadow 0.2s ease, background 0.2s ease
35
35
  }
36
- .modal__header_puwvl:not(.modal__hasContent_puwvl) {
36
+ .modal__header_1f3yh:not(.modal__hasContent_1f3yh) {
37
37
  pointer-events: none;
38
38
  }
39
- .modal__highlighted_puwvl {
39
+ .modal__highlighted_1f3yh {
40
40
  background: var(--modal-header-highlight-background);
41
41
  box-shadow: var(--modal-header-highlight-box-shadow);
42
42
  }
43
- .modal__sticky_puwvl {
43
+ .modal__sticky_1f3yh {
44
44
  position: sticky
45
45
  }
46
- .modal__sticky_puwvl.modal__hasContent_puwvl {
46
+ .modal__sticky_1f3yh.modal__hasContent_1f3yh {
47
47
  background: var(--modal-header-background);
48
48
  }
49
- .modal__content_puwvl {
49
+ .modal__content_1f3yh {
50
50
  flex-grow: 1;
51
51
  }
52
- .modal__title_puwvl {
52
+ .modal__title_1f3yh {
53
53
  word-break: break-word;
54
54
  }
55
- .modal__addon_puwvl {
55
+ .modal__addon_1f3yh {
56
56
  min-width: 48px;
57
57
  height: 48px;
58
58
  display: flex;
@@ -60,25 +60,25 @@
60
60
  align-items: center;
61
61
  pointer-events: all;
62
62
  }
63
- .modal__closer_puwvl {
63
+ .modal__closer_1f3yh {
64
64
  margin-left: auto;
65
65
  }
66
- .modal__left_puwvl {
66
+ .modal__left_1f3yh {
67
67
  justify-content: flex-start;
68
68
  text-align: left;
69
69
  }
70
- .modal__center_puwvl {
70
+ .modal__center_1f3yh {
71
71
  justify-content: center;
72
72
  text-align: center;
73
73
  }
74
- .modal__right_puwvl {
74
+ .modal__right_1f3yh {
75
75
  justify-content: flex-end;
76
76
  text-align: right;
77
77
  }
78
- .modal__trim_puwvl {
78
+ .modal__trim_1f3yh {
79
79
  overflow: hidden
80
80
  }
81
- .modal__trim_puwvl .modal__title_puwvl {
81
+ .modal__trim_1f3yh .modal__title_1f3yh {
82
82
  overflow: hidden;
83
83
  white-space: nowrap;
84
84
  text-overflow: ellipsis;
@@ -1,4 +1,4 @@
1
- /* hash: iq1ld */
1
+ /* hash: 1c3il */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -33,10 +33,10 @@
33
33
  --modal-header-mobile-font-family: var(--font-family-system);
34
34
  --modal-header-mobile-font-weight: bold;
35
35
  }
36
- .modal__sticky_13ljz {
36
+ .modal__sticky_2q2gr {
37
37
  top: 0;
38
38
  }
39
- .modal__content_13ljz {
39
+ .modal__content_2q2gr {
40
40
  font-size: var(--modal-header-mobile-font-size);
41
41
  line-height: var(--modal-header-mobile-line-height);
42
42
  font-family: var(--modal-header-mobile-font-family);
package/esm/desktop.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 16efn */
1
+ /* hash: zo31j */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -31,32 +31,32 @@
31
31
 
32
32
  /* mobile */
33
33
  }
34
- .modal__wrapper_1gumq {
34
+ .modal__wrapper_1k6jx {
35
35
  padding-top: var(--modal-vertical-padding);
36
36
  padding-bottom: var(--modal-vertical-padding);
37
37
  }
38
- .modal__component_1gumq {
38
+ .modal__component_1k6jx {
39
39
  width: 100%;
40
40
  max-width: 100%;
41
41
  border-radius: var(--modal-border-radius);
42
42
  }
43
- .modal__fullscreen_1gumq {
43
+ .modal__fullscreen_1k6jx {
44
44
  padding-top: 0;
45
45
  padding-bottom: 0
46
46
  }
47
- .modal__fullscreen_1gumq .modal__component_1gumq {
47
+ .modal__fullscreen_1k6jx .modal__component_1k6jx {
48
48
  flex: 1;
49
49
  border-radius: 0;
50
50
  }
51
- .modal__s_1gumq {
51
+ .modal__s_1k6jx {
52
52
  width: var(--modal-s-width);
53
53
  }
54
- .modal__m_1gumq {
54
+ .modal__m_1k6jx {
55
55
  width: var(--modal-m-width);
56
56
  }
57
- .modal__l_1gumq {
57
+ .modal__l_1k6jx {
58
58
  width: var(--modal-l-width);
59
59
  }
60
- .modal__xl_1gumq {
60
+ .modal__xl_1k6jx {
61
61
  width: var(--modal-xl-width);
62
62
  }
package/esm/desktop.js CHANGED
@@ -1,10 +1,10 @@
1
- import './tslib.es6-95d263a8.js';
1
+ import './tslib.es6-c7c6d75c.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  import '@alfalab/core-components-base-modal/esm';
5
5
  import 'react-merge-refs';
6
6
  import './Context.js';
7
- import './components/header/Component.js';
7
+ import './Component-e546d8c5.js';
8
8
  import '@alfalab/core-components-icon-button/esm';
9
9
  import '@alfalab/icons-glyph/CrossHeavyMIcon';
10
10
  import './components/closer/Component.js';
@@ -14,4 +14,4 @@ import './components/content/Component.desktop.js';
14
14
  import './components/footer/Component.js';
15
15
  import './components/footer/Component.desktop.js';
16
16
  export { ModalDesktop } from './Component.desktop.js';
17
- import './transitions.module-1403a282.js';
17
+ import './transitions.module-246cce05.js';
@@ -0,0 +1,2 @@
1
+ declare const getDataTestId: (dataTestId?: string | undefined, element?: string | undefined) => string | undefined;
2
+ export { getDataTestId };
package/esm/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import './tslib.es6-95d263a8.js';
1
+ import './tslib.es6-c7c6d75c.js';
2
2
  import 'react';
3
3
  import 'classnames';
4
4
  import '@alfalab/core-components-base-modal/esm';
5
5
  import 'react-merge-refs';
6
6
  export { ModalContext } from './Context.js';
7
- import './components/header/Component.js';
7
+ import './Component-e546d8c5.js';
8
8
  import '@alfalab/core-components-icon-button/esm';
9
9
  import '@alfalab/icons-glyph/CrossHeavyMIcon';
10
10
  import './components/closer/Component.js';
@@ -14,7 +14,7 @@ import './components/content/Component.desktop.js';
14
14
  import './components/footer/Component.js';
15
15
  import './components/footer/Component.desktop.js';
16
16
  import './Component.desktop.js';
17
- import './transitions.module-1403a282.js';
17
+ import './transitions.module-246cce05.js';
18
18
  import '@alfalab/icons-glyph/CrossMIcon';
19
19
  import './components/header/Component.mobile.js';
20
20
  import './components/content/Component.mobile.js';
package/esm/mobile.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1cpbx */
1
+ /* hash: y28w2 */
2
2
  :root {
3
3
 
4
4
  /* Hard */
@@ -19,7 +19,7 @@
19
19
 
20
20
  /* mobile */
21
21
  }
22
- .modal__component_bp8q4 {
22
+ .modal__component_1n03x {
23
23
  flex: 1;
24
24
  width: 100%;
25
25
  }