@alfalab/core-components-modal 8.1.3 → 9.0.1

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 (156) hide show
  1. package/Component.js +6 -6
  2. package/Component.responsive.d.ts +3 -2
  3. package/Component.responsive.js +9 -7
  4. package/browser-a216f694.d.ts +6 -0
  5. package/components/content/Component.js +7 -5
  6. package/components/content/desktop.css +7 -7
  7. package/components/content/index.css +4 -4
  8. package/components/content/mobile.css +3 -3
  9. package/components/controls/Component.d.ts +29 -0
  10. package/components/controls/Component.js +32 -0
  11. package/components/controls/index.css +4 -0
  12. package/components/controls/index.d.ts +1 -0
  13. package/components/controls/index.js +15 -0
  14. package/components/footer/Component.js +8 -9
  15. package/components/footer/desktop.css +9 -9
  16. package/components/footer/index.css +9 -9
  17. package/components/footer/layout.css +17 -35
  18. package/components/footer/mobile.css +3 -3
  19. package/components/header/Component.js +7 -5
  20. package/components/header/desktop.css +16 -16
  21. package/components/header/index.css +9 -9
  22. package/components/header/mobile.css +4 -4
  23. package/cssm/Component.js +3 -3
  24. package/cssm/Component.responsive.d.ts +3 -2
  25. package/cssm/Component.responsive.js +10 -8
  26. package/cssm/browser-a216f694.d.ts +6 -0
  27. package/cssm/components/content/Component.js +4 -2
  28. package/cssm/components/controls/Component.d.ts +29 -0
  29. package/cssm/components/controls/Component.js +32 -0
  30. package/cssm/components/controls/index.d.ts +1 -0
  31. package/cssm/components/controls/index.js +16 -0
  32. package/cssm/components/controls/index.module.css +3 -0
  33. package/cssm/components/footer/Component.js +4 -3
  34. package/cssm/components/footer/index.module.css +5 -5
  35. package/cssm/components/footer/layout.module.css +8 -26
  36. package/cssm/components/header/Component.js +4 -2
  37. package/cssm/components/header/desktop.module.css +1 -1
  38. package/cssm/components/header/index.module.css +5 -5
  39. package/cssm/desktop/Component.desktop.d.ts +5 -3
  40. package/cssm/desktop/Component.desktop.js +6 -1
  41. package/cssm/desktop/index.js +5 -1
  42. package/cssm/getDataTestId-5c876d98.d.ts +2 -0
  43. package/cssm/getDataTestId-5c876d98.js +8 -0
  44. package/cssm/index-a5b021bd.d.ts +70 -0
  45. package/cssm/index.js +6 -2
  46. package/cssm/mobile/Component.mobile.d.ts +2 -0
  47. package/cssm/mobile/Component.mobile.js +6 -1
  48. package/cssm/mobile/index.js +5 -1
  49. package/cssm/typings.d.ts +5 -0
  50. package/cssm/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
  51. package/desktop/Component.desktop.d.ts +5 -3
  52. package/desktop/Component.desktop.js +5 -0
  53. package/desktop/desktop.css +9 -9
  54. package/desktop/index.js +4 -0
  55. package/esm/Component.js +6 -6
  56. package/esm/Component.responsive.d.ts +3 -2
  57. package/esm/Component.responsive.js +9 -7
  58. package/esm/browser-a216f694.d.ts +6 -0
  59. package/esm/components/content/Component.js +7 -5
  60. package/esm/components/content/desktop.css +7 -7
  61. package/esm/components/content/index.css +4 -4
  62. package/esm/components/content/mobile.css +3 -3
  63. package/esm/components/controls/Component.d.ts +29 -0
  64. package/esm/components/controls/Component.js +23 -0
  65. package/esm/components/controls/index.css +4 -0
  66. package/esm/components/controls/index.d.ts +1 -0
  67. package/esm/components/controls/index.js +7 -0
  68. package/esm/components/footer/Component.js +8 -9
  69. package/esm/components/footer/desktop.css +9 -9
  70. package/esm/components/footer/index.css +9 -9
  71. package/esm/components/footer/layout.css +17 -35
  72. package/esm/components/footer/mobile.css +3 -3
  73. package/esm/components/header/Component.js +7 -5
  74. package/esm/components/header/desktop.css +16 -16
  75. package/esm/components/header/index.css +9 -9
  76. package/esm/components/header/mobile.css +4 -4
  77. package/esm/desktop/Component.desktop.d.ts +5 -3
  78. package/esm/desktop/Component.desktop.js +5 -0
  79. package/esm/desktop/desktop.css +9 -9
  80. package/esm/desktop/index.js +4 -0
  81. package/esm/getDataTestId-143c099f.d.ts +2 -0
  82. package/esm/getDataTestId-143c099f.js +6 -0
  83. package/esm/index-a5b021bd.d.ts +70 -0
  84. package/esm/index.js +5 -1
  85. package/esm/layout.module-9932f3ea.js +4 -0
  86. package/esm/mobile/Component.mobile.d.ts +2 -0
  87. package/esm/mobile/Component.mobile.js +5 -0
  88. package/esm/mobile/index.js +4 -0
  89. package/esm/mobile/mobile.css +2 -2
  90. package/esm/transitions.css +8 -8
  91. package/esm/typings.d.ts +5 -0
  92. package/esm/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
  93. package/getDataTestId-2c8d1d4f.d.ts +2 -0
  94. package/getDataTestId-2c8d1d4f.js +8 -0
  95. package/index-a5b021bd.d.ts +70 -0
  96. package/index.js +5 -1
  97. package/layout.module-61746462.js +6 -0
  98. package/mobile/Component.mobile.d.ts +2 -0
  99. package/mobile/Component.mobile.js +5 -0
  100. package/mobile/index.js +4 -0
  101. package/mobile/mobile.css +2 -2
  102. package/modern/Component.js +6 -6
  103. package/modern/Component.responsive.d.ts +3 -2
  104. package/modern/Component.responsive.js +9 -7
  105. package/modern/browser-a216f694.d.ts +6 -0
  106. package/modern/components/content/Component.js +7 -5
  107. package/modern/components/content/desktop.css +7 -7
  108. package/modern/components/content/index.css +4 -4
  109. package/modern/components/content/mobile.css +3 -3
  110. package/modern/components/controls/Component.d.ts +29 -0
  111. package/modern/components/controls/Component.js +22 -0
  112. package/modern/components/controls/index.css +4 -0
  113. package/modern/components/controls/index.d.ts +1 -0
  114. package/modern/components/controls/index.js +7 -0
  115. package/modern/components/footer/Component.js +8 -9
  116. package/modern/components/footer/desktop.css +9 -9
  117. package/modern/components/footer/index.css +9 -9
  118. package/modern/components/footer/layout.css +17 -35
  119. package/modern/components/footer/mobile.css +3 -3
  120. package/modern/components/header/Component.js +7 -5
  121. package/modern/components/header/desktop.css +16 -16
  122. package/modern/components/header/index.css +9 -9
  123. package/modern/components/header/mobile.css +4 -4
  124. package/modern/desktop/Component.desktop.d.ts +5 -3
  125. package/modern/desktop/Component.desktop.js +6 -1
  126. package/modern/desktop/desktop.css +9 -9
  127. package/modern/desktop/index.js +4 -0
  128. package/modern/getDataTestId-a8aae71a.d.ts +2 -0
  129. package/modern/getDataTestId-a8aae71a.js +6 -0
  130. package/modern/index-a5b021bd.d.ts +70 -0
  131. package/modern/index.js +5 -1
  132. package/modern/layout.module-bff97609.js +4 -0
  133. package/modern/mobile/Component.mobile.d.ts +2 -0
  134. package/modern/mobile/Component.mobile.js +5 -0
  135. package/modern/mobile/index.js +4 -0
  136. package/modern/mobile/mobile.css +2 -2
  137. package/modern/transitions.css +8 -8
  138. package/modern/typings.d.ts +5 -0
  139. package/modern/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
  140. package/package.json +4 -4
  141. package/src/Component.responsive.tsx +7 -13
  142. package/src/Component.tsx +6 -2
  143. package/src/components/content/Component.tsx +4 -1
  144. package/src/components/controls/Component.tsx +75 -0
  145. package/src/components/controls/index.module.css +3 -0
  146. package/src/components/controls/index.ts +1 -0
  147. package/src/components/footer/Component.tsx +4 -2
  148. package/src/components/footer/layout.module.css +8 -34
  149. package/src/components/header/Component.tsx +3 -1
  150. package/src/desktop/Component.desktop.tsx +4 -5
  151. package/src/mobile/Component.mobile.tsx +2 -0
  152. package/src/typings.ts +6 -0
  153. package/src/vars.css +7 -7
  154. package/transitions.css +8 -8
  155. package/typings.d.ts +5 -0
  156. package/useCustomWebkitScrollbar-a216f694.d.ts +2 -0
package/Component.js CHANGED
@@ -15,18 +15,18 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
15
15
  var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
16
16
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
17
17
 
18
- var 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"};
18
+ var desktopStyles = {"wrapper":"modal__wrapper_1ccgp","component":"modal__component_1ccgp","fullscreen":"modal__fullscreen_1ccgp","s":"modal__s_1ccgp","m":"modal__m_1ccgp","l":"modal__l_1ccgp","xl":"modal__xl_1ccgp"};
19
19
  require('./desktop/desktop.css')
20
20
 
21
- var mobileStyles = {"component":"modal__component_o9513"};
21
+ var mobileStyles = {"component":"modal__component_1odq1"};
22
22
  require('./mobile/mobile.css')
23
23
 
24
- var 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"};
24
+ var transitions = {"appear":"modal__appear_24xq3","enter":"modal__enter_24xq3","appearActive":"modal__appearActive_24xq3","enterActive":"modal__enterActive_24xq3","exit":"modal__exit_24xq3","exitActive":"modal__exitActive_24xq3","exitDone":"modal__exitDone_24xq3"};
25
25
  require('./transitions.css')
26
26
 
27
27
  var Modal = React.forwardRef(function (_a, ref) {
28
28
  var _b;
29
- var _c = _a.size, size = _c === void 0 ? 's' : _c, fixedPosition = _a.fixedPosition, fullscreen = _a.fullscreen, children = _a.children, className = _a.className, wrapperClassName = _a.wrapperClassName, _d = _a.transitionProps, transitionProps = _d === void 0 ? {} : _d, view = _a.view, restProps = tslib.__rest(_a, ["size", "fixedPosition", "fullscreen", "children", "className", "wrapperClassName", "transitionProps", "view"]);
29
+ var _c = _a.size, size = _c === void 0 ? 's' : _c, fixedPosition = _a.fixedPosition, fullscreen = _a.fullscreen, children = _a.children, className = _a.className, wrapperClassName = _a.wrapperClassName, _d = _a.transitionProps, transitionProps = _d === void 0 ? {} : _d, view = _a.view, dataTestId = _a.dataTestId, restProps = tslib.__rest(_a, ["size", "fixedPosition", "fullscreen", "children", "className", "wrapperClassName", "transitionProps", "view", "dataTestId"]);
30
30
  // TODO: удалить, после удаления пропсы fullscreen
31
31
  var componentSize = fullscreen ? 'fullscreen' : size;
32
32
  var modalRef = React.useRef(null);
@@ -58,9 +58,9 @@ var Modal = React.forwardRef(function (_a, ref) {
58
58
  transitionProps: tslib.__assign({ classNames: transitions }, transitionProps),
59
59
  className: cn__default.default(className, mobileStyles.component),
60
60
  };
61
- var contextValue = React.useMemo(function () { return ({ size: componentSize, view: view }); }, [componentSize, view]);
61
+ var contextValue = React.useMemo(function () { return ({ size: componentSize, view: view, dataTestId: dataTestId }); }, [componentSize, view, dataTestId]);
62
62
  return (React__default.default.createElement(ResponsiveContext.ResponsiveContext.Provider, { value: contextValue },
63
- React__default.default.createElement(coreComponentsBaseModal.BaseModal, tslib.__assign({}, restProps, baseModalProps), children)));
63
+ React__default.default.createElement(coreComponentsBaseModal.BaseModal, tslib.__assign({}, restProps, baseModalProps, { dataTestId: dataTestId }), children)));
64
64
  });
65
65
 
66
66
  exports.Modal = Modal;
@@ -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 };
@@ -4,15 +4,19 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var tslib = require('tslib');
6
6
  var React = require('react');
7
- var hooks = require('@alfalab/hooks');
7
+ var coreComponentsMq = require('@alfalab/core-components-mq');
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
  var Component = require('./Component.js');
12
13
  require('classnames');
14
+ require('./getDataTestId-2c8d1d4f.js');
15
+ require('@alfalab/hooks');
13
16
  require('./Context.js');
14
17
  require('@alfalab/core-components-base-modal');
15
18
  require('./ResponsiveContext.js');
19
+ require('./layout.module-61746462.js');
16
20
  require('@alfalab/core-components-navigation-bar');
17
21
  require('react-merge-refs');
18
22
 
@@ -21,17 +25,15 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
21
25
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
22
26
 
23
27
  var ModalResponsiveComponent = React.forwardRef(function (_a, ref) {
24
- var children = _a.children, _b = _a.breakpoint, breakpoint = _b === void 0 ? 1024 : _b, restProps = tslib.__rest(_a, ["children", "breakpoint"]);
25
- var view = hooks.useMedia([
26
- ['mobile', "(max-width: ".concat(breakpoint - 1, "px)")],
27
- ['desktop', "(min-width: ".concat(breakpoint, "px)")],
28
- ], 'desktop')[0];
29
- return (React__default.default.createElement(Component.Modal, tslib.__assign({ ref: ref }, restProps, { view: view }), children));
28
+ var children = _a.children, _b = _a.breakpoint, breakpoint = _b === void 0 ? 1024 : _b, _c = _a.defaultMatchMediaValue, defaultMatchMediaValue = _c === void 0 ? true : _c, restProps = tslib.__rest(_a, ["children", "breakpoint", "defaultMatchMediaValue"]);
29
+ var isDesktop = coreComponentsMq.useMatchMedia("(min-width: ".concat(breakpoint, "px)"), defaultMatchMediaValue)[0];
30
+ return (React__default.default.createElement(Component.Modal, tslib.__assign({ ref: ref }, restProps, { view: isDesktop ? 'desktop' : 'mobile' }), children));
30
31
  });
31
32
  var ModalResponsive = Object.assign(ModalResponsiveComponent, {
32
33
  Header: components_header_Component.Header,
33
34
  Content: components_content_Component.Content,
34
35
  Footer: components_footer_Component.Footer,
36
+ Controls: components_controls_Component.Controls,
35
37
  });
36
38
 
37
39
  exports.ModalResponsive = ModalResponsive;
@@ -0,0 +1,6 @@
1
+ declare function isWebkitBased(): boolean;
2
+ declare const browser: {
3
+ getScrollbarSize: () => number;
4
+ isWebkitBased: typeof isWebkitBased;
5
+ };
6
+ export { browser };
@@ -4,6 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
6
  var cn = require('classnames');
7
+ var getDataTestId = require('../../getDataTestId-2c8d1d4f.js');
8
+ require('@alfalab/hooks');
7
9
  var Context = require('../../Context.js');
8
10
  var ResponsiveContext = require('../../ResponsiveContext.js');
9
11
  require('@alfalab/core-components-base-modal');
@@ -13,26 +15,26 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
13
15
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
14
16
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
15
17
 
16
- var desktopStyles = {"s":"modal__s_1pngk","m":"modal__m_1pngk","l":"modal__l_1pngk","xl":"modal__xl_1pngk","fullscreen":"modal__fullscreen_1pngk"};
18
+ var desktopStyles = {"s":"modal__s_15gj1","m":"modal__m_15gj1","l":"modal__l_15gj1","xl":"modal__xl_15gj1","fullscreen":"modal__fullscreen_15gj1"};
17
19
  require('./desktop.css')
18
20
 
19
- var styles = {"content":"modal__content_1ubc5","withHeader":"modal__withHeader_1ubc5","flex":"modal__flex_1ubc5"};
21
+ var styles = {"content":"modal__content_1ws0z","withHeader":"modal__withHeader_1ws0z","flex":"modal__flex_1ws0z"};
20
22
  require('./index.css')
21
23
 
22
- var mobileStyles = {"content":"modal__content_q4eh8"};
24
+ var mobileStyles = {"content":"modal__content_yw1nl"};
23
25
  require('./mobile.css')
24
26
 
25
27
  var Content = function (_a) {
26
28
  var _b;
27
29
  var children = _a.children, flex = _a.flex, className = _a.className;
28
30
  var _c = React.useContext(Context.ModalContext), contentRef = _c.contentRef, hasHeader = _c.hasHeader;
29
- var _d = React.useContext(ResponsiveContext.ResponsiveContext), size = _d.size, view = _d.view;
31
+ var _d = React.useContext(ResponsiveContext.ResponsiveContext), size = _d.size, view = _d.view, dataTestId = _d.dataTestId;
30
32
  return (React__default.default.createElement("div", { className: cn__default.default(styles.content, className, (_b = {},
31
33
  _b[styles.flex] = flex,
32
34
  _b[styles.withHeader] = hasHeader,
33
35
  _b[desktopStyles[size]] = view === 'desktop' && size,
34
36
  _b[mobileStyles.content] = view === 'mobile',
35
- _b)), ref: contentRef }, children));
37
+ _b)), ref: contentRef, "data-test-id": getDataTestId.getDataTestId(dataTestId, 'content') }, children));
36
38
  };
37
39
 
38
40
  exports.Content = Content;
@@ -1,4 +1,4 @@
1
- /* hash: 4tvbu */
1
+ /* hash: 1w9cp */
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_15gj1,
34
+ .modal__m_15gj1,
35
+ .modal__l_15gj1,
36
+ .modal__xl_15gj1,
37
+ .modal__fullscreen_15gj1 {
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_15gj1:last-child, .modal__m_15gj1:last-child, .modal__l_15gj1:last-child, .modal__xl_15gj1:last-child, .modal__fullscreen_15gj1:last-child {
40
40
  padding-bottom: var(--modal-s-content-only-bottom-padding);
41
41
  }
@@ -1,4 +1,4 @@
1
- /* hash: 1m34j */
1
+ /* hash: 1ehhv */
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_1ws0z {
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_1ws0z.modal__withHeader_1ws0z {
36
36
  padding-top: 0;
37
- } .modal__flex_1ubc5 {
37
+ } .modal__flex_1ws0z {
38
38
  flex: 1;
39
39
  }
@@ -1,4 +1,4 @@
1
- /* hash: 11k7f */
1
+ /* hash: yi6fv */
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_yw1nl {
32
32
  padding: var(--gap-m) var(--gap-m) 0
33
- } .modal__content_q4eh8:last-child {
33
+ } .modal__content_yw1nl: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,32 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React = require('react');
6
+ var cn = require('classnames');
7
+ var getDataTestId = require('../../getDataTestId-2c8d1d4f.js');
8
+ require('@alfalab/hooks');
9
+ var ResponsiveContext = require('../../ResponsiveContext.js');
10
+ var layout_module = require('../../layout.module-61746462.js');
11
+
12
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
13
+
14
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
15
+ var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
16
+
17
+ var styles = {"component":"modal__component_1t3vp"};
18
+ require('./index.css')
19
+
20
+ var Controls = function (_a) {
21
+ var primary = _a.primary, secondary = _a.secondary, _b = _a.gap, gap = _b === void 0 ? 16 : _b, _c = _a.layout, layoutProp = _c === void 0 ? 'start' : _c, _d = _a.mobileLayout, mobileLayout = _d === void 0 ? layoutProp : _d;
22
+ var _e = React.useContext(ResponsiveContext.ResponsiveContext), view = _e.view, dataTestId = _e.dataTestId;
23
+ var layout = view === 'mobile' ? mobileLayout : layoutProp;
24
+ var shouldReverse = view === 'mobile' && layout !== 'column';
25
+ return (React__default.default.createElement("div", { "data-test-id": getDataTestId.getDataTestId(dataTestId, 'controls'), className: cn__default.default(styles.component, layout_module.layoutStyles[layout], gap && layout_module.layoutStyles["gap-".concat(gap)]) }, shouldReverse ? (React__default.default.createElement(React__default.default.Fragment, null,
26
+ secondary,
27
+ primary)) : (React__default.default.createElement(React__default.default.Fragment, null,
28
+ primary,
29
+ secondary))));
30
+ };
31
+
32
+ exports.Controls = Controls;
@@ -0,0 +1,4 @@
1
+ /* hash: d9khk */
2
+ .modal__component_1t3vp {
3
+ width: 100%;
4
+ }
@@ -0,0 +1 @@
1
+ export * from "./Component";
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var components_controls_Component = require('./Component.js');
6
+ require('react');
7
+ require('classnames');
8
+ require('../../getDataTestId-2c8d1d4f.js');
9
+ require('@alfalab/hooks');
10
+ require('../../ResponsiveContext.js');
11
+ require('../../layout.module-61746462.js');
12
+
13
+
14
+
15
+ exports.Controls = components_controls_Component.Controls;
@@ -4,8 +4,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
6
  var cn = require('classnames');
7
+ var getDataTestId = require('../../getDataTestId-2c8d1d4f.js');
8
+ require('@alfalab/hooks');
7
9
  var Context = require('../../Context.js');
8
10
  var ResponsiveContext = require('../../ResponsiveContext.js');
11
+ var layout_module = require('../../layout.module-61746462.js');
9
12
  require('@alfalab/core-components-base-modal');
10
13
 
11
14
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
@@ -13,27 +16,24 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
13
16
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
14
17
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
15
18
 
16
- var 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"};
19
+ var desktopStyles = {"footer":"modal__footer_86xrg","sticky":"modal__sticky_86xrg","fullscreen":"modal__fullscreen_86xrg","s":"modal__s_86xrg","m":"modal__m_86xrg","l":"modal__l_86xrg","xl":"modal__xl_86xrg"};
17
20
  require('./desktop.css')
18
21
 
19
- var styles = {"footer":"modal__footer_cx131","sticky":"modal__sticky_cx131","highlighted":"modal__highlighted_cx131"};
22
+ var styles = {"footer":"modal__footer_1d1m3","sticky":"modal__sticky_1d1m3","highlighted":"modal__highlighted_1d1m3"};
20
23
  require('./index.css')
21
24
 
22
- var 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"};
23
- require('./layout.css')
24
-
25
- var mobileStyles = {"footer":"modal__footer_159cp","sticky":"modal__sticky_159cp"};
25
+ var mobileStyles = {"footer":"modal__footer_1o4x5","sticky":"modal__sticky_1o4x5"};
26
26
  require('./mobile.css')
27
27
 
28
28
  var Footer = function (_a) {
29
29
  var _b;
30
30
  var children = _a.children, className = _a.className, sticky = _a.sticky, _c = _a.layout, layout = _c === void 0 ? 'start' : _c, gap = _a.gap;
31
31
  var _d = React.useContext(Context.ModalContext), footerHighlighted = _d.footerHighlighted, setHasFooter = _d.setHasFooter;
32
- var _e = React.useContext(ResponsiveContext.ResponsiveContext), size = _e.size, view = _e.view;
32
+ var _e = React.useContext(ResponsiveContext.ResponsiveContext), size = _e.size, view = _e.view, dataTestId = _e.dataTestId;
33
33
  React.useEffect(function () {
34
34
  setHasFooter(true);
35
35
  }, [setHasFooter]);
36
- return (React__default.default.createElement("div", { className: cn__default.default(styles.footer, className, layoutStyles[layout], gap && layoutStyles["gap-".concat(gap)], (_b = {},
36
+ return (React__default.default.createElement("div", { "data-test-id": getDataTestId.getDataTestId(dataTestId, 'footer'), className: cn__default.default(styles.footer, className, layout_module.layoutStyles[layout], gap && layout_module.layoutStyles["gap-".concat(gap)], (_b = {},
37
37
  _b[styles.highlighted] = sticky && footerHighlighted,
38
38
  _b[styles.sticky] = sticky,
39
39
  _b[desktopStyles.footer] = view === 'desktop',
@@ -41,7 +41,6 @@ var Footer = function (_a) {
41
41
  _b[desktopStyles[size]] = view === 'desktop',
42
42
  _b[mobileStyles.footer] = view === 'mobile',
43
43
  _b[mobileStyles.sticky] = view === 'mobile' && sticky,
44
- _b[layoutStyles["".concat(layout, "-mobile")]] = view === 'mobile',
45
44
  _b)) }, children));
46
45
  };
47
46
 
@@ -1,4 +1,4 @@
1
- /* hash: wcit7 */
1
+ /* hash: 182pi */
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 */
@@ -33,17 +33,17 @@
33
33
  /* mobile */
34
34
 
35
35
  /* paddings */
36
- } .modal__footer_kfufc {
36
+ } .modal__footer_86xrg {
37
37
  border-bottom-left-radius: var(--modal-border-radius);
38
38
  border-bottom-right-radius: var(--modal-border-radius);
39
- } .modal__sticky_kfufc {
39
+ } .modal__sticky_86xrg {
40
40
  bottom: calc(var(--modal-vertical-padding) * -1)
41
- } .modal__sticky_kfufc.modal__fullscreen_kfufc {
41
+ } .modal__sticky_86xrg.modal__fullscreen_86xrg {
42
42
  bottom: 0;
43
- } .modal__s_kfufc,
44
- .modal__m_kfufc,
45
- .modal__l_kfufc,
46
- .modal__xl_kfufc,
47
- .modal__fullscreen_kfufc {
43
+ } .modal__s_86xrg,
44
+ .modal__m_86xrg,
45
+ .modal__l_86xrg,
46
+ .modal__xl_86xrg,
47
+ .modal__fullscreen_86xrg {
48
48
  padding: var(--modal-s-footer-paddings);
49
49
  }
@@ -1,8 +1,8 @@
1
- /* hash: 1g6qx */
1
+ /* hash: 1rwxm */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
- --color-light-bg-primary: #fff;
5
- --color-light-border-secondary: #e7e8ec; /* 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
+ --color-light-modal-bg-primary: #fff;
5
+ --color-light-neutral-300: #e7e8eb; /* 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 */
6
6
  } :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 */
7
7
  } :root {
8
8
  } :root {
@@ -17,29 +17,29 @@
17
17
  } :root {
18
18
  } :root {
19
19
  } :root {
20
- --modal-footer-background: var(--color-light-bg-primary);
20
+ --modal-footer-background: var(--color-light-modal-bg-primary);
21
21
 
22
22
  /* sizes */
23
23
 
24
24
  /* paddings */
25
25
 
26
26
  /* scroll */
27
- --modal-footer-highlight-background: var(--color-light-bg-primary);
28
- --modal-footer-highlight-box-shadow: 0 -1px 0 0 var(--color-light-border-secondary);
27
+ --modal-footer-highlight-background: var(--color-light-modal-bg-primary);
28
+ --modal-footer-highlight-box-shadow: 0 -1px 0 0 var(--color-light-neutral-300);
29
29
 
30
30
  /* desktop */
31
31
 
32
32
  /* mobile */
33
33
 
34
34
  /* paddings */
35
- } .modal__footer_cx131 {
35
+ } .modal__footer_1d1m3 {
36
36
  width: 100%;
37
37
  box-sizing: border-box;
38
38
  transition: box-shadow 0.2s ease, background 0.2s ease;
39
- } .modal__sticky_cx131 {
39
+ } .modal__sticky_1d1m3 {
40
40
  background: var(--modal-footer-background);
41
41
  position: sticky;
42
- } .modal__highlighted_cx131 {
42
+ } .modal__highlighted_1d1m3 {
43
43
  background: var(--modal-footer-highlight-background);
44
44
  box-shadow: var(--modal-footer-highlight-box-shadow);
45
45
  }
@@ -1,4 +1,4 @@
1
- /* hash: 18dkq */
1
+ /* hash: 1k3rf */
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 */
@@ -31,53 +31,35 @@
31
31
  /* mobile */
32
32
 
33
33
  /* paddings */
34
- } .modal__column_1gjuq {
34
+ } .modal__column_14ay2 {
35
35
  display: flex;
36
36
  flex-direction: column
37
- } .modal__column_1gjuq > * {
37
+ } .modal__column_14ay2 > *:not(:last-child):not(:only-child) {
38
38
  margin-bottom: var(--modal-footer-default-gap);
39
- } .modal__column_1gjuq > *:last-child,
40
- .modal__column_1gjuq > *:only-child {
41
- margin-bottom: 0;
42
- } .modal__column_1gjuq.modal__gap-16_1gjuq > * {
39
+ } .modal__column_14ay2.modal__gap-16_14ay2 > *:not(:last-child):not(:only-child) {
43
40
  margin-bottom: var(--gap-m);
44
- } .modal__column_1gjuq.modal__gap-24_1gjuq > * {
41
+ } .modal__column_14ay2.modal__gap-24_14ay2 > *:not(:last-child):not(:only-child) {
45
42
  margin-bottom: var(--gap-xl);
46
- } .modal__column_1gjuq.modal__gap-32_1gjuq > * {
43
+ } .modal__column_14ay2.modal__gap-32_14ay2 > *:not(:last-child):not(:only-child) {
47
44
  margin-bottom: var(--gap-2xl);
48
- } .modal__column-mobile_1gjuq {
49
- flex-direction: column-reverse
50
- } .modal__column-mobile_1gjuq > * {
51
- margin-bottom: 0;
52
- } .modal__column-mobile_1gjuq > *:last-child {
53
- margin-bottom: var(--modal-footer-default-gap);
54
- } .modal__column-mobile_1gjuq > *:only-child {
55
- margin-bottom: 0;
56
- } .modal__start_1gjuq {
45
+ } .modal__start_14ay2 {
57
46
  justify-content: flex-start;
58
- } .modal__center_1gjuq {
47
+ } .modal__center_14ay2 {
59
48
  justify-content: center;
60
- } .modal__space-between_1gjuq {
49
+ } .modal__space-between_14ay2 {
61
50
  justify-content: space-between
62
- } .modal__space-between_1gjuq > * {
51
+ } .modal__space-between_14ay2 > * {
63
52
  flex: 1;
64
- } .modal__start_1gjuq,
65
- .modal__center_1gjuq,
66
- .modal__space-between_1gjuq {
53
+ } .modal__start_14ay2,
54
+ .modal__center_14ay2,
55
+ .modal__space-between_14ay2 {
67
56
  display: flex
68
- } .modal__start_1gjuq > *, .modal__center_1gjuq > *, .modal__space-between_1gjuq > * {
57
+ } .modal__start_14ay2 > *:not(:last-child):not(:only-child), .modal__center_14ay2 > *:not(:last-child):not(:only-child), .modal__space-between_14ay2 > *:not(:last-child):not(:only-child) {
69
58
  margin-right: var(--modal-footer-default-gap);
70
- } .modal__start_1gjuq > *:last-child,
71
- .modal__start_1gjuq > *:only-child,
72
- .modal__center_1gjuq > *:last-child,
73
- .modal__center_1gjuq > *:only-child,
74
- .modal__space-between_1gjuq > *:last-child,
75
- .modal__space-between_1gjuq > *:only-child {
76
- margin-right: 0;
77
- } .modal__start_1gjuq.modal__gap-16_1gjuq > *, .modal__center_1gjuq.modal__gap-16_1gjuq > *, .modal__space-between_1gjuq.modal__gap-16_1gjuq > * {
59
+ } .modal__start_14ay2.modal__gap-16_14ay2 > *:not(:last-child):not(:only-child), .modal__center_14ay2.modal__gap-16_14ay2 > *:not(:last-child):not(:only-child), .modal__space-between_14ay2.modal__gap-16_14ay2 > *:not(:last-child):not(:only-child) {
78
60
  margin-right: var(--gap-m);
79
- } .modal__start_1gjuq.modal__gap-24_1gjuq > *, .modal__center_1gjuq.modal__gap-24_1gjuq > *, .modal__space-between_1gjuq.modal__gap-24_1gjuq > * {
61
+ } .modal__start_14ay2.modal__gap-24_14ay2 > *:not(:last-child):not(:only-child), .modal__center_14ay2.modal__gap-24_14ay2 > *:not(:last-child):not(:only-child), .modal__space-between_14ay2.modal__gap-24_14ay2 > *:not(:last-child):not(:only-child) {
80
62
  margin-right: var(--gap-xl);
81
- } .modal__start_1gjuq.modal__gap-32_1gjuq > *, .modal__center_1gjuq.modal__gap-32_1gjuq > *, .modal__space-between_1gjuq.modal__gap-32_1gjuq > * {
63
+ } .modal__start_14ay2.modal__gap-32_14ay2 > *:not(:last-child):not(:only-child), .modal__center_14ay2.modal__gap-32_14ay2 > *:not(:last-child):not(:only-child), .modal__space-between_14ay2.modal__gap-32_14ay2 > *:not(:last-child):not(:only-child) {
82
64
  margin-right: var(--gap-2xl);
83
65
  }
@@ -1,4 +1,4 @@
1
- /* hash: zxa5z */
1
+ /* hash: dyvc4 */
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__footer_159cp {
31
+ } .modal__footer_1o4x5 {
32
32
  padding: var(--gap-m);
33
- } .modal__sticky_159cp {
33
+ } .modal__sticky_1o4x5 {
34
34
  bottom: 0;
35
35
  }
@@ -6,6 +6,8 @@ var tslib = require('tslib');
6
6
  var React = require('react');
7
7
  var cn = require('classnames');
8
8
  var coreComponentsNavigationBar = require('@alfalab/core-components-navigation-bar');
9
+ var getDataTestId = require('../../getDataTestId-2c8d1d4f.js');
10
+ require('@alfalab/hooks');
9
11
  var Context = require('../../Context.js');
10
12
  var ResponsiveContext = require('../../ResponsiveContext.js');
11
13
  require('@alfalab/core-components-base-modal');
@@ -15,25 +17,25 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
15
17
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
16
18
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
17
19
 
18
- var desktopStyles = {"header":"modal__header_1k8x9","content":"modal__content_1k8x9","s":"modal__s_1k8x9","m":"modal__m_1k8x9","l":"modal__l_1k8x9","xl":"modal__xl_1k8x9","fullscreen":"modal__fullscreen_1k8x9","sticky":"modal__sticky_1k8x9"};
20
+ var desktopStyles = {"header":"modal__header_d2h5p","content":"modal__content_d2h5p","s":"modal__s_d2h5p","m":"modal__m_d2h5p","l":"modal__l_d2h5p","xl":"modal__xl_d2h5p","fullscreen":"modal__fullscreen_d2h5p","sticky":"modal__sticky_d2h5p"};
19
21
  require('./desktop.css')
20
22
 
21
- var styles = {"highlighted":"modal__highlighted_1s85n","sticky":"modal__sticky_1s85n","hasContent":"modal__hasContent_1s85n"};
23
+ var styles = {"highlighted":"modal__highlighted_1xf78","sticky":"modal__sticky_1xf78","hasContent":"modal__hasContent_1xf78"};
22
24
  require('./index.css')
23
25
 
24
- var mobileStyles = {"header":"modal__header_vulyt","sticky":"modal__sticky_vulyt","content":"modal__content_vulyt"};
26
+ var mobileStyles = {"header":"modal__header_11vwf","sticky":"modal__sticky_11vwf","content":"modal__content_11vwf"};
25
27
  require('./mobile.css')
26
28
 
27
29
  var Header = function (_a) {
28
30
  var _b, _c;
29
31
  var className = _a.className, sticky = _a.sticky, title = _a.title, children = _a.children, contentClassName = _a.contentClassName, _d = _a.hasCloser, hasCloser = _d === void 0 ? true : _d, restProps = tslib.__rest(_a, ["className", "sticky", "title", "children", "contentClassName", "hasCloser"]);
30
32
  var _e = React.useContext(Context.ModalContext), setHasHeader = _e.setHasHeader, headerHighlighted = _e.headerHighlighted, parentRef = _e.parentRef, onClose = _e.onClose;
31
- var _f = React.useContext(ResponsiveContext.ResponsiveContext), view = _f.view, size = _f.size;
33
+ var _f = React.useContext(ResponsiveContext.ResponsiveContext), view = _f.view, size = _f.size, dataTestId = _f.dataTestId;
32
34
  React.useEffect(function () {
33
35
  setHasHeader(true);
34
36
  }, [setHasHeader]);
35
37
  var hasContent = Boolean(title || children);
36
- return (React__default.default.createElement(coreComponentsNavigationBar.NavigationBar, tslib.__assign({}, restProps, { scrollableParentRef: parentRef, hasCloser: hasCloser, sticky: sticky, view: view, title: title, onClose: onClose, className: cn__default.default(className, (_b = {},
38
+ return (React__default.default.createElement(coreComponentsNavigationBar.NavigationBar, tslib.__assign({}, restProps, { dataTestId: getDataTestId.getDataTestId(dataTestId, 'header'), scrollableParentRef: parentRef, hasCloser: hasCloser, sticky: sticky, view: view, title: title, onClose: onClose, className: cn__default.default(className, (_b = {},
37
39
  _b[styles.highlighted] = hasContent && sticky && headerHighlighted,
38
40
  _b[styles.sticky] = sticky,
39
41
  _b[styles.hasContent] = hasContent,