@alfalab/core-components-universal-modal 3.2.1 → 3.2.2

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 (203) hide show
  1. package/components/base-content/index.css +2 -3
  2. package/components/base-content/index.module.css.js +1 -1
  3. package/components/base-footer/index.css +5 -7
  4. package/components/base-footer/index.module.css.js +1 -1
  5. package/components/base-header/index.css +4 -4
  6. package/components/base-header/index.module.css.js +1 -1
  7. package/cssm/components/base-content/index.module.css +1 -2
  8. package/cssm/components/base-footer/index.module.css +2 -4
  9. package/cssm/desktop/components/center-modal/center-modal.js +2 -1
  10. package/cssm/desktop/components/center-modal/center-modal.js.map +1 -1
  11. package/cssm/desktop/components/center-modal/index.module.css +1 -2
  12. package/cssm/desktop/components/footer/layout.module.css +3 -6
  13. package/cssm/desktop/components/header/desktop.module.css +3 -6
  14. package/cssm/desktop/components/side-modal/index.module.css +1 -2
  15. package/cssm/desktop/components/side-modal/side-modal.js +2 -1
  16. package/cssm/desktop/components/side-modal/side-modal.js.map +1 -1
  17. package/cssm/desktop/utils/get-hug-content-styles.d.ts +8 -0
  18. package/cssm/desktop/utils/get-hug-content-styles.js +19 -0
  19. package/cssm/desktop/utils/get-hug-content-styles.js.map +1 -0
  20. package/cssm/desktop/utils/get-margin-styles.d.ts +0 -1
  21. package/cssm/desktop/utils/get-margin-styles.js +8 -14
  22. package/cssm/desktop/utils/get-margin-styles.js.map +1 -1
  23. package/cssm/mobile/components/content/index.module.css +1 -2
  24. package/cssm/mobile/components/footer/index.module.css +1 -2
  25. package/cssm/mobile/components/footer/layout.mobile.module.css +1 -2
  26. package/cssm/mobile/components/header/index.module.css +4 -8
  27. package/desktop/components/center-modal/center-modal.js +2 -1
  28. package/desktop/components/center-modal/center-modal.js.map +1 -1
  29. package/desktop/components/center-modal/index.css +784 -785
  30. package/desktop/components/center-modal/index.module.css.js +1 -1
  31. package/desktop/components/center-modal/transitions/safari-transitions.css +7 -7
  32. package/desktop/components/center-modal/transitions/safari-transitions.module.css.js +1 -1
  33. package/desktop/components/center-modal/transitions/transitions.css +7 -7
  34. package/desktop/components/center-modal/transitions/transitions.module.css.js +1 -1
  35. package/desktop/components/footer/desktop.css +1 -1
  36. package/desktop/components/footer/desktop.module.css.js +1 -1
  37. package/desktop/components/footer/layout.css +12 -15
  38. package/desktop/components/footer/layout.module.css.js +1 -1
  39. package/desktop/components/header/desktop.css +8 -11
  40. package/desktop/components/header/desktop.module.css.js +1 -1
  41. package/desktop/components/modal-content/modal-content.css +4 -4
  42. package/desktop/components/modal-content/modal-content.module.css.js +1 -1
  43. package/desktop/components/side-modal/index.css +786 -787
  44. package/desktop/components/side-modal/index.module.css.js +1 -1
  45. package/desktop/components/side-modal/side-modal.js +2 -1
  46. package/desktop/components/side-modal/side-modal.js.map +1 -1
  47. package/desktop/components/side-modal/transitions/transitions.css +71 -71
  48. package/desktop/components/side-modal/transitions/transitions.module.css.js +1 -1
  49. package/desktop/styles/transitions/full-size-backdrop-transitions.css +13 -13
  50. package/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js +1 -1
  51. package/desktop/styles/transitions/full-size-vertical-bottom-transitions.css +7 -7
  52. package/desktop/styles/transitions/full-size-vertical-bottom-transitions.module.css.js +1 -1
  53. package/desktop/styles/transitions/full-size-vertical-center-transitions.css +7 -7
  54. package/desktop/styles/transitions/full-size-vertical-center-transitions.module.css.js +1 -1
  55. package/desktop/styles/transitions/full-size-vertical-top-transitions.css +7 -7
  56. package/desktop/styles/transitions/full-size-vertical-top-transitions.module.css.js +1 -1
  57. package/desktop/utils/get-hug-content-styles.d.ts +8 -0
  58. package/desktop/utils/get-hug-content-styles.js +19 -0
  59. package/desktop/utils/get-hug-content-styles.js.map +1 -0
  60. package/desktop/utils/get-margin-styles.d.ts +0 -1
  61. package/desktop/utils/get-margin-styles.js +8 -14
  62. package/desktop/utils/get-margin-styles.js.map +1 -1
  63. package/esm/components/base-content/index.css +2 -3
  64. package/esm/components/base-content/index.module.css.js +1 -1
  65. package/esm/components/base-footer/index.css +5 -7
  66. package/esm/components/base-footer/index.module.css.js +1 -1
  67. package/esm/components/base-header/index.css +4 -4
  68. package/esm/components/base-header/index.module.css.js +1 -1
  69. package/esm/desktop/components/center-modal/center-modal.js +2 -1
  70. package/esm/desktop/components/center-modal/center-modal.js.map +1 -1
  71. package/esm/desktop/components/center-modal/index.css +784 -785
  72. package/esm/desktop/components/center-modal/index.module.css.js +1 -1
  73. package/esm/desktop/components/center-modal/transitions/safari-transitions.css +7 -7
  74. package/esm/desktop/components/center-modal/transitions/safari-transitions.module.css.js +1 -1
  75. package/esm/desktop/components/center-modal/transitions/transitions.css +7 -7
  76. package/esm/desktop/components/center-modal/transitions/transitions.module.css.js +1 -1
  77. package/esm/desktop/components/footer/desktop.css +1 -1
  78. package/esm/desktop/components/footer/desktop.module.css.js +1 -1
  79. package/esm/desktop/components/footer/layout.css +12 -15
  80. package/esm/desktop/components/footer/layout.module.css.js +1 -1
  81. package/esm/desktop/components/header/desktop.css +8 -11
  82. package/esm/desktop/components/header/desktop.module.css.js +1 -1
  83. package/esm/desktop/components/modal-content/modal-content.css +4 -4
  84. package/esm/desktop/components/modal-content/modal-content.module.css.js +1 -1
  85. package/esm/desktop/components/side-modal/index.css +786 -787
  86. package/esm/desktop/components/side-modal/index.module.css.js +1 -1
  87. package/esm/desktop/components/side-modal/side-modal.js +2 -1
  88. package/esm/desktop/components/side-modal/side-modal.js.map +1 -1
  89. package/esm/desktop/components/side-modal/transitions/transitions.css +71 -71
  90. package/esm/desktop/components/side-modal/transitions/transitions.module.css.js +1 -1
  91. package/esm/desktop/styles/transitions/full-size-backdrop-transitions.css +13 -13
  92. package/esm/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js +1 -1
  93. package/esm/desktop/styles/transitions/full-size-vertical-bottom-transitions.css +7 -7
  94. package/esm/desktop/styles/transitions/full-size-vertical-bottom-transitions.module.css.js +1 -1
  95. package/esm/desktop/styles/transitions/full-size-vertical-center-transitions.css +7 -7
  96. package/esm/desktop/styles/transitions/full-size-vertical-center-transitions.module.css.js +1 -1
  97. package/esm/desktop/styles/transitions/full-size-vertical-top-transitions.css +7 -7
  98. package/esm/desktop/styles/transitions/full-size-vertical-top-transitions.module.css.js +1 -1
  99. package/esm/desktop/utils/get-hug-content-styles.d.ts +8 -0
  100. package/esm/desktop/utils/get-hug-content-styles.js +15 -0
  101. package/esm/desktop/utils/get-hug-content-styles.js.map +1 -0
  102. package/esm/desktop/utils/get-margin-styles.d.ts +0 -1
  103. package/esm/desktop/utils/get-margin-styles.js +8 -14
  104. package/esm/desktop/utils/get-margin-styles.js.map +1 -1
  105. package/esm/mobile/components/content/index.css +4 -5
  106. package/esm/mobile/components/content/index.module.css.js +1 -1
  107. package/esm/mobile/components/footer/index.css +3 -4
  108. package/esm/mobile/components/footer/index.module.css.js +1 -1
  109. package/esm/mobile/components/footer/layout.mobile.css +10 -11
  110. package/esm/mobile/components/footer/layout.mobile.module.css.js +1 -1
  111. package/esm/mobile/components/header/index.css +7 -11
  112. package/esm/mobile/components/header/index.module.css.js +1 -1
  113. package/esm/mobile/mobile.css +3 -3
  114. package/esm/mobile/mobile.module.css.js +1 -1
  115. package/esm/mobile/transitions/right-side-transitions.mobile.css +7 -7
  116. package/esm/mobile/transitions/right-side-transitions.mobile.module.css.js +1 -1
  117. package/esm/mobile/transitions/transitions.mobile.css +7 -7
  118. package/esm/mobile/transitions/transitions.mobile.module.css.js +1 -1
  119. package/mobile/components/content/index.css +4 -5
  120. package/mobile/components/content/index.module.css.js +1 -1
  121. package/mobile/components/footer/index.css +3 -4
  122. package/mobile/components/footer/index.module.css.js +1 -1
  123. package/mobile/components/footer/layout.mobile.css +10 -11
  124. package/mobile/components/footer/layout.mobile.module.css.js +1 -1
  125. package/mobile/components/header/index.css +7 -11
  126. package/mobile/components/header/index.module.css.js +1 -1
  127. package/mobile/mobile.css +3 -3
  128. package/mobile/mobile.module.css.js +1 -1
  129. package/mobile/transitions/right-side-transitions.mobile.css +7 -7
  130. package/mobile/transitions/right-side-transitions.mobile.module.css.js +1 -1
  131. package/mobile/transitions/transitions.mobile.css +7 -7
  132. package/mobile/transitions/transitions.mobile.module.css.js +1 -1
  133. package/modern/components/base-content/index.css +2 -3
  134. package/modern/components/base-content/index.module.css.js +1 -1
  135. package/modern/components/base-footer/index.css +5 -7
  136. package/modern/components/base-footer/index.module.css.js +1 -1
  137. package/modern/components/base-header/index.css +4 -4
  138. package/modern/components/base-header/index.module.css.js +1 -1
  139. package/modern/desktop/components/center-modal/center-modal.js +3 -1
  140. package/modern/desktop/components/center-modal/center-modal.js.map +1 -1
  141. package/modern/desktop/components/center-modal/index.css +784 -785
  142. package/modern/desktop/components/center-modal/index.module.css.js +1 -1
  143. package/modern/desktop/components/center-modal/transitions/safari-transitions.css +7 -7
  144. package/modern/desktop/components/center-modal/transitions/safari-transitions.module.css.js +1 -1
  145. package/modern/desktop/components/center-modal/transitions/transitions.css +7 -7
  146. package/modern/desktop/components/center-modal/transitions/transitions.module.css.js +1 -1
  147. package/modern/desktop/components/footer/desktop.css +1 -1
  148. package/modern/desktop/components/footer/desktop.module.css.js +1 -1
  149. package/modern/desktop/components/footer/layout.css +12 -15
  150. package/modern/desktop/components/footer/layout.module.css.js +1 -1
  151. package/modern/desktop/components/header/desktop.css +8 -11
  152. package/modern/desktop/components/header/desktop.module.css.js +1 -1
  153. package/modern/desktop/components/modal-content/modal-content.css +4 -4
  154. package/modern/desktop/components/modal-content/modal-content.module.css.js +1 -1
  155. package/modern/desktop/components/side-modal/index.css +786 -787
  156. package/modern/desktop/components/side-modal/index.module.css.js +1 -1
  157. package/modern/desktop/components/side-modal/side-modal.js +3 -1
  158. package/modern/desktop/components/side-modal/side-modal.js.map +1 -1
  159. package/modern/desktop/components/side-modal/transitions/transitions.css +71 -71
  160. package/modern/desktop/components/side-modal/transitions/transitions.module.css.js +1 -1
  161. package/modern/desktop/styles/transitions/full-size-backdrop-transitions.css +13 -13
  162. package/modern/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js +1 -1
  163. package/modern/desktop/styles/transitions/full-size-vertical-bottom-transitions.css +7 -7
  164. package/modern/desktop/styles/transitions/full-size-vertical-bottom-transitions.module.css.js +1 -1
  165. package/modern/desktop/styles/transitions/full-size-vertical-center-transitions.css +7 -7
  166. package/modern/desktop/styles/transitions/full-size-vertical-center-transitions.module.css.js +1 -1
  167. package/modern/desktop/styles/transitions/full-size-vertical-top-transitions.css +7 -7
  168. package/modern/desktop/styles/transitions/full-size-vertical-top-transitions.module.css.js +1 -1
  169. package/modern/desktop/utils/get-hug-content-styles.d.ts +8 -0
  170. package/modern/desktop/utils/get-hug-content-styles.js +17 -0
  171. package/modern/desktop/utils/get-hug-content-styles.js.map +1 -0
  172. package/modern/desktop/utils/get-margin-styles.d.ts +0 -1
  173. package/modern/desktop/utils/get-margin-styles.js +11 -13
  174. package/modern/desktop/utils/get-margin-styles.js.map +1 -1
  175. package/modern/mobile/components/content/index.css +4 -5
  176. package/modern/mobile/components/content/index.module.css.js +1 -1
  177. package/modern/mobile/components/footer/index.css +3 -4
  178. package/modern/mobile/components/footer/index.module.css.js +1 -1
  179. package/modern/mobile/components/footer/layout.mobile.css +10 -11
  180. package/modern/mobile/components/footer/layout.mobile.module.css.js +1 -1
  181. package/modern/mobile/components/header/index.css +7 -11
  182. package/modern/mobile/components/header/index.module.css.js +1 -1
  183. package/modern/mobile/mobile.css +3 -3
  184. package/modern/mobile/mobile.module.css.js +1 -1
  185. package/modern/mobile/transitions/right-side-transitions.mobile.css +7 -7
  186. package/modern/mobile/transitions/right-side-transitions.mobile.module.css.js +1 -1
  187. package/modern/mobile/transitions/transitions.mobile.css +7 -7
  188. package/modern/mobile/transitions/transitions.mobile.module.css.js +1 -1
  189. package/moderncssm/desktop/components/center-modal/center-modal.js +3 -1
  190. package/moderncssm/desktop/components/center-modal/center-modal.js.map +1 -1
  191. package/moderncssm/desktop/components/side-modal/side-modal.js +3 -1
  192. package/moderncssm/desktop/components/side-modal/side-modal.js.map +1 -1
  193. package/moderncssm/desktop/utils/get-hug-content-styles.d.ts +8 -0
  194. package/moderncssm/desktop/utils/get-hug-content-styles.js +17 -0
  195. package/moderncssm/desktop/utils/get-hug-content-styles.js.map +1 -0
  196. package/moderncssm/desktop/utils/get-margin-styles.d.ts +0 -1
  197. package/moderncssm/desktop/utils/get-margin-styles.js +11 -13
  198. package/moderncssm/desktop/utils/get-margin-styles.js.map +1 -1
  199. package/package.json +8 -8
  200. package/src/desktop/components/center-modal/center-modal.tsx +3 -1
  201. package/src/desktop/components/side-modal/side-modal.tsx +3 -1
  202. package/src/desktop/utils/get-hug-content-styles.ts +24 -0
  203. package/src/desktop/utils/get-margin-styles.ts +11 -16
@@ -1,8 +1,7 @@
1
1
  :root {
2
- --gap-2xl: 32px;
3
- --gap-32: var(--gap-2xl);
2
+ --gap-32: 32px;
4
3
  }
5
- .universal-modal__content_8uhzg {
4
+ .universal-modal__content_1di2b {
6
5
  position: relative;
7
6
  box-sizing: border-box;
8
7
  width: 100%;
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"content":"universal-modal__content_8uhzg"};
5
+ var styles = {"content":"universal-modal__content_1di2b"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -3,17 +3,15 @@
3
3
  --color-light-neutral-300: #e7e8eb;
4
4
  }
5
5
  :root {
6
- --gap-m: 16px;
7
- --gap-2xl: 32px;
8
- --gap-16: var(--gap-m);
9
- --gap-32: var(--gap-2xl);
6
+ --gap-16: 16px;
7
+ --gap-32: 32px;
10
8
  }
11
9
  :root {
12
10
  --universal-modal-footer-background: var(--color-light-modal-bg-primary);
13
11
  --universal-modal-footer-highlight-background: var(--color-light-modal-bg-primary);
14
12
  --universal-modal-footer-highlight-box-shadow: 0 -1px 0 0 var(--color-light-neutral-300);
15
13
  }
16
- .universal-modal__footer_1fluc {
14
+ .universal-modal__footer_1w10h {
17
15
  width: 100%;
18
16
  box-sizing: border-box;
19
17
  transition:
@@ -21,12 +19,12 @@
21
19
  background 0.2s ease;
22
20
  padding: var(--gap-16) var(--gap-32) var(--gap-32);
23
21
  }
24
- .universal-modal__sticky_1fluc {
22
+ .universal-modal__sticky_1w10h {
25
23
  background: var(--universal-modal-footer-background);
26
24
  position: sticky;
27
25
  z-index: 1;
28
26
  }
29
- .universal-modal__highlighted_1fluc {
27
+ .universal-modal__highlighted_1w10h {
30
28
  background: var(--universal-modal-footer-highlight-background);
31
29
  box-shadow: var(--universal-modal-footer-highlight-box-shadow);
32
30
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"footer":"universal-modal__footer_1fluc","sticky":"universal-modal__sticky_1fluc","highlighted":"universal-modal__highlighted_1fluc"};
5
+ var styles = {"footer":"universal-modal__footer_1w10h","sticky":"universal-modal__sticky_1w10h","highlighted":"universal-modal__highlighted_1w10h"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -10,22 +10,22 @@
10
10
  --universal-modal-header-highlight-background: var(--color-light-modal-bg-primary);
11
11
  --universal-modal-header-highlight-box-shadow: 0 1px 0 0 var(--color-light-neutral-300);
12
12
  }
13
- .universal-modal__header_20jy7 {
13
+ .universal-modal__header_16lgw {
14
14
  width: 100%;
15
15
  box-sizing: border-box;
16
16
  transition:
17
17
  box-shadow 0.2s ease,
18
18
  background 0.2s ease;
19
19
  }
20
- .universal-modal__header_20jy7.universal-modal__highlighted_20jy7 {
20
+ .universal-modal__header_16lgw.universal-modal__highlighted_16lgw {
21
21
  background: var(--universal-modal-header-highlight-background);
22
22
  box-shadow: var(--universal-modal-header-highlight-box-shadow);
23
23
  }
24
- .universal-modal__header_20jy7.universal-modal__sticky_20jy7 {
24
+ .universal-modal__header_16lgw.universal-modal__sticky_16lgw {
25
25
  position: sticky;
26
26
  top: var(--gap-0);
27
27
  z-index: 1;
28
28
  }
29
- .universal-modal__header_20jy7.universal-modal__sticky_20jy7.universal-modal__hasContent_20jy7 {
29
+ .universal-modal__header_16lgw.universal-modal__sticky_16lgw.universal-modal__hasContent_16lgw {
30
30
  background: var(--universal-modal-header-background);
31
31
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"header":"universal-modal__header_20jy7","highlighted":"universal-modal__highlighted_20jy7","sticky":"universal-modal__sticky_20jy7","hasContent":"universal-modal__hasContent_20jy7"};
5
+ var styles = {"header":"universal-modal__header_16lgw","highlighted":"universal-modal__highlighted_16lgw","sticky":"universal-modal__sticky_16lgw","hasContent":"universal-modal__hasContent_16lgw"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -1,6 +1,5 @@
1
1
  :root {
2
- --gap-2xl: 32px;
3
- --gap-32: var(--gap-2xl);
2
+ --gap-32: 32px;
4
3
  }
5
4
  .content {
6
5
  position: relative;
@@ -3,10 +3,8 @@
3
3
  --color-light-neutral-300: #e7e8eb;
4
4
  }
5
5
  :root {
6
- --gap-m: 16px;
7
- --gap-2xl: 32px;
8
- --gap-16: var(--gap-m);
9
- --gap-32: var(--gap-2xl);
6
+ --gap-16: 16px;
7
+ --gap-32: 32px;
10
8
  }
11
9
  :root {
12
10
  --universal-modal-footer-background: var(--color-light-modal-bg-primary);
@@ -10,6 +10,7 @@ var cssm = require('@alfalab/core-components-shared/cssm');
10
10
  var useScrollableContainerRef = require('../../hooks/use-scrollable-container-ref.js');
11
11
  var getFullSizeModalTransitions = require('../../utils/get-full-size-modal-transitions.js');
12
12
  var getHeightStyle = require('../../utils/get-height-style.js');
13
+ var getHugContentStyles = require('../../utils/get-hug-content-styles.js');
13
14
  var getMarginStyles = require('../../utils/get-margin-styles.js');
14
15
  var getWidthStyle = require('../../utils/get-width-style.js');
15
16
  var modalContent = require('../modal-content/modal-content.js');
@@ -42,7 +43,7 @@ var CenterModal = React.forwardRef(function (props, ref) {
42
43
  _a[styles__default.default.wrapperJustifyCenter] = verticalAlign === 'center',
43
44
  _a[styles__default.default.wrapperJustifyEnd] = verticalAlign === 'bottom',
44
45
  _a[styles__default.default.withoutOverlay] = withoutOverlay,
45
- _a)), className: cn__default.default(styles__default.default.component, className, styles__default.default.baseModalComponent, tslib.__assign({}, getMarginStyles.getMarginStyles({ styles: styles__default.default, margin: margin, height: height }))), transitionProps: tslib.__assign(tslib.__assign({ classNames: transitionProps }, (isFullSizeModal && fullSizeModalContentTransitions)), restProps.transitionProps), backdropProps: tslib.__assign(tslib.__assign({ shouldRender: overlay }, (isFullSizeModal && fullSizeModalBackdropTransitions)), restProps.backdropProps), componentDivProps: {
46
+ _a)), className: cn__default.default(styles__default.default.component, className, styles__default.default.baseModalComponent, tslib.__assign(tslib.__assign({}, getMarginStyles.getMarginStyles({ styles: styles__default.default, margin: margin })), getHugContentStyles.getHugContentStyles({ styles: styles__default.default, margin: margin, height: height }))), transitionProps: tslib.__assign(tslib.__assign({ classNames: transitionProps }, (isFullSizeModal && fullSizeModalContentTransitions)), restProps.transitionProps), backdropProps: tslib.__assign(tslib.__assign({ shouldRender: overlay }, (isFullSizeModal && fullSizeModalBackdropTransitions)), restProps.backdropProps), componentDivProps: {
46
47
  style: tslib.__assign({ width: getWidthStyle.getWidthStyle(width, margin) }, getHeightStyle.getHeightStyle(height, margin)),
47
48
  }, onWheel: handleWheel, onClose: onClose }),
48
49
  React__default.default.createElement(modalContent.ModalContent, { height: height, scrollableContainerRef: scrollableContainerRef }, children)));
@@ -1 +1 @@
1
- {"version":3,"file":"center-modal.js","sources":["../../../../src/desktop/components/center-modal/center-modal.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\nimport cn from 'classnames';\n\nimport { BaseModal } from '@alfalab/core-components-base-modal';\nimport { isMacOS, isSafari } from '@alfalab/core-components-shared';\n\nimport { useScrollableContainerRef } from '../../hooks/use-scrollable-container-ref';\nimport { type UniversalModalDesktopProps } from '../../types/props';\nimport { getFullSizeModalTransitions } from '../../utils/get-full-size-modal-transitions';\nimport { getHeightStyle } from '../../utils/get-height-style';\nimport { getMarginStyles } from '../../utils/get-margin-styles';\nimport { getWidthStyle } from '../../utils/get-width-style';\nimport { ModalContent } from '../modal-content/modal-content';\n\nimport styles from './index.module.css';\nimport safariTransitions from './transitions/safari-transitions.module.css';\nimport transitions from './transitions/transitions.module.css';\n\n// в safari некорректно отрабатывает transform:scale (???), поэтому применяем немного другую анимацию\nconst transitionProps = isMacOS() && isSafari() ? safariTransitions : transitions;\n\nexport const CenterModal = forwardRef<HTMLDivElement, UniversalModalDesktopProps>((props, ref) => {\n const {\n dataTestId,\n className,\n open,\n children,\n width = 500,\n height = 'hugContent',\n verticalAlign = 'center',\n overlay = true,\n margin,\n scrollableContainerRef: scrollableContainerRefProp,\n onClose,\n ...restProps\n } = props;\n\n const componentRef = useRef<HTMLDivElement>(null);\n const { handleWheel, scrollableContainerRef } = useScrollableContainerRef({\n overlay,\n refObject: scrollableContainerRefProp,\n });\n\n const {\n isFullSizeModal,\n componentTransitions: fullSizeModalContentTransitions,\n backdropTransitions: fullSizeModalBackdropTransitions,\n } = getFullSizeModalTransitions({ verticalAlign, width, height });\n\n const withoutOverlay = !overlay;\n\n return (\n <BaseModal\n {...restProps}\n open={open}\n dataTestId={dataTestId}\n ref={ref}\n componentRef={componentRef}\n scrollHandler='content'\n scrollLock={overlay}\n wrapperClassName={cn(styles.baseModalContainer, {\n [styles.wrapperJustifyStart]: verticalAlign === 'top',\n [styles.wrapperJustifyCenter]: verticalAlign === 'center',\n [styles.wrapperJustifyEnd]: verticalAlign === 'bottom',\n [styles.withoutOverlay]: withoutOverlay,\n })}\n className={cn(styles.component, className, styles.baseModalComponent, {\n ...getMarginStyles({ styles, margin, height }),\n })}\n transitionProps={{\n classNames: transitionProps,\n ...(isFullSizeModal && fullSizeModalContentTransitions),\n ...restProps.transitionProps,\n }}\n backdropProps={{\n shouldRender: overlay,\n ...(isFullSizeModal && fullSizeModalBackdropTransitions),\n ...restProps.backdropProps,\n }}\n componentDivProps={{\n style: {\n width: getWidthStyle(width, margin),\n ...getHeightStyle(height, margin),\n },\n }}\n onWheel={handleWheel}\n onClose={onClose}\n >\n <ModalContent height={height} scrollableContainerRef={scrollableContainerRef}>\n {children}\n </ModalContent>\n </BaseModal>\n );\n});\n"],"names":["isMacOS","isSafari","safariTransitions","transitions","forwardRef","__rest","useRef","useScrollableContainerRef","getFullSizeModalTransitions","React","BaseModal","__assign","cn","styles","getMarginStyles","getWidthStyle","getHeightStyle","ModalContent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA;AACA,IAAM,eAAe,GAAGA,YAAO,EAAE,IAAIC,aAAQ,EAAE,GAAGC,kCAAiB,GAAGC,4BAAW;IAEpE,WAAW,GAAGC,gBAAU,CAA6C,UAAC,KAAK,EAAE,GAAG,EAAA;;AAErF,IAAA,IAAA,UAAU,GAYV,KAAK,CAZK,UAAA,EACV,SAAS,GAWT,KAAK,CAXI,SAAA,EACT,IAAI,GAUJ,KAAK,CAVD,IAAA,EACJ,QAAQ,GASR,KAAK,CATG,QAAA,EACR,KAQA,KAAK,CAAA,KARM,EAAX,KAAK,mBAAG,GAAG,GAAA,EAAA,EACX,EAAA,GAOA,KAAK,CAPgB,MAAA,EAArB,MAAM,GAAA,EAAA,KAAA,MAAA,GAAG,YAAY,GAAA,EAAA,EACrB,EAMA,GAAA,KAAK,cANmB,EAAxB,aAAa,GAAG,EAAA,KAAA,MAAA,GAAA,QAAQ,KAAA,EACxB,EAAA,GAKA,KAAK,CAAA,OALS,EAAd,OAAO,GAAA,EAAA,KAAA,MAAA,GAAG,IAAI,GAAA,EAAA,EACd,MAAM,GAIN,KAAK,CAAA,MAJC,EACkB,0BAA0B,GAGlD,KAAK,CAAA,sBAH6C,EAClD,OAAO,GAEP,KAAK,CAAA,OAFE,EACJ,SAAS,GAAAC,YAAA,CACZ,KAAK,EAbH,CAAA,YAAA,EAAA,WAAA,EAAA,MAAA,EAAA,UAAA,EAAA,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,EACF,SAAS,EAAED,mBAAE,CAACC,uBAAM,CAAC,SAAS,EAAE,SAAS,EAAEA,uBAAM,CAAC,kBAAkB,EAAAF,cAAA,CAAA,EAAA,EAC7DG,+BAAe,CAAC,EAAE,MAAM,EAAAD,uBAAA,EAAE,MAAM,EAAA,MAAA,EAAE,MAAM,EAAA,MAAA,EAAE,CAAC,CAAA,CAChD,EACF,eAAe,EAAAF,cAAA,CAAAA,cAAA,CAAA,EACX,UAAU,EAAE,eAAe,EAAA,GACvB,eAAe,IAAI,+BAA+B,EAAC,EACpD,SAAS,CAAC,eAAe,CAAA,EAEhC,aAAa,EAAAA,cAAA,CAAAA,cAAA,CAAA,EACT,YAAY,EAAE,OAAO,EAAA,GACjB,eAAe,IAAI,gCAAgC,EAAC,EACrD,SAAS,CAAC,aAAa,CAAA,EAE9B,iBAAiB,EAAE;AACf,YAAA,KAAK,mBACD,KAAK,EAAEI,2BAAa,CAAC,KAAK,EAAE,MAAM,CAAC,EAAA,EAChCC,6BAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CACpC;AACJ,SAAA,EACD,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,OAAO,EAAA,CAAA;AAEhB,QAAAP,sBAAA,CAAA,aAAA,CAACQ,yBAAY,EAAA,EAAC,MAAM,EAAE,MAAM,EAAE,sBAAsB,EAAE,sBAAsB,EACvE,EAAA,QAAQ,CACE,CACP;AAEpB,CAAC;;;;"}
1
+ {"version":3,"file":"center-modal.js","sources":["../../../../src/desktop/components/center-modal/center-modal.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\nimport cn from 'classnames';\n\nimport { BaseModal } from '@alfalab/core-components-base-modal';\nimport { isMacOS, isSafari } from '@alfalab/core-components-shared';\n\nimport { useScrollableContainerRef } from '../../hooks/use-scrollable-container-ref';\nimport { type UniversalModalDesktopProps } from '../../types/props';\nimport { getFullSizeModalTransitions } from '../../utils/get-full-size-modal-transitions';\nimport { getHeightStyle } from '../../utils/get-height-style';\nimport { getHugContentStyles } from '../../utils/get-hug-content-styles';\nimport { getMarginStyles } from '../../utils/get-margin-styles';\nimport { getWidthStyle } from '../../utils/get-width-style';\nimport { ModalContent } from '../modal-content/modal-content';\n\nimport styles from './index.module.css';\nimport safariTransitions from './transitions/safari-transitions.module.css';\nimport transitions from './transitions/transitions.module.css';\n\n// в safari некорректно отрабатывает transform:scale (???), поэтому применяем немного другую анимацию\nconst transitionProps = isMacOS() && isSafari() ? safariTransitions : transitions;\n\nexport const CenterModal = forwardRef<HTMLDivElement, UniversalModalDesktopProps>((props, ref) => {\n const {\n dataTestId,\n className,\n open,\n children,\n width = 500,\n height = 'hugContent',\n verticalAlign = 'center',\n overlay = true,\n margin,\n scrollableContainerRef: scrollableContainerRefProp,\n onClose,\n ...restProps\n } = props;\n\n const componentRef = useRef<HTMLDivElement>(null);\n const { handleWheel, scrollableContainerRef } = useScrollableContainerRef({\n overlay,\n refObject: scrollableContainerRefProp,\n });\n\n const {\n isFullSizeModal,\n componentTransitions: fullSizeModalContentTransitions,\n backdropTransitions: fullSizeModalBackdropTransitions,\n } = getFullSizeModalTransitions({ verticalAlign, width, height });\n\n const withoutOverlay = !overlay;\n\n return (\n <BaseModal\n {...restProps}\n open={open}\n dataTestId={dataTestId}\n ref={ref}\n componentRef={componentRef}\n scrollHandler='content'\n scrollLock={overlay}\n wrapperClassName={cn(styles.baseModalContainer, {\n [styles.wrapperJustifyStart]: verticalAlign === 'top',\n [styles.wrapperJustifyCenter]: verticalAlign === 'center',\n [styles.wrapperJustifyEnd]: verticalAlign === 'bottom',\n [styles.withoutOverlay]: withoutOverlay,\n })}\n className={cn(styles.component, className, styles.baseModalComponent, {\n ...getMarginStyles({ styles, margin }),\n ...getHugContentStyles({ styles, margin, height }),\n })}\n transitionProps={{\n classNames: transitionProps,\n ...(isFullSizeModal && fullSizeModalContentTransitions),\n ...restProps.transitionProps,\n }}\n backdropProps={{\n shouldRender: overlay,\n ...(isFullSizeModal && fullSizeModalBackdropTransitions),\n ...restProps.backdropProps,\n }}\n componentDivProps={{\n style: {\n width: getWidthStyle(width, margin),\n ...getHeightStyle(height, margin),\n },\n }}\n onWheel={handleWheel}\n onClose={onClose}\n >\n <ModalContent height={height} scrollableContainerRef={scrollableContainerRef}>\n {children}\n </ModalContent>\n </BaseModal>\n );\n});\n"],"names":["isMacOS","isSafari","safariTransitions","transitions","forwardRef","__rest","useRef","useScrollableContainerRef","getFullSizeModalTransitions","React","BaseModal","__assign","cn","styles","getMarginStyles","getHugContentStyles","getWidthStyle","getHeightStyle","ModalContent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA;AACA,IAAM,eAAe,GAAGA,YAAO,EAAE,IAAIC,aAAQ,EAAE,GAAGC,kCAAiB,GAAGC,4BAAW;IAEpE,WAAW,GAAGC,gBAAU,CAA6C,UAAC,KAAK,EAAE,GAAG,EAAA;;AAErF,IAAA,IAAA,UAAU,GAYV,KAAK,CAZK,UAAA,EACV,SAAS,GAWT,KAAK,CAXI,SAAA,EACT,IAAI,GAUJ,KAAK,CAVD,IAAA,EACJ,QAAQ,GASR,KAAK,CATG,QAAA,EACR,KAQA,KAAK,CAAA,KARM,EAAX,KAAK,mBAAG,GAAG,GAAA,EAAA,EACX,EAAA,GAOA,KAAK,CAPgB,MAAA,EAArB,MAAM,GAAA,EAAA,KAAA,MAAA,GAAG,YAAY,GAAA,EAAA,EACrB,EAMA,GAAA,KAAK,cANmB,EAAxB,aAAa,GAAG,EAAA,KAAA,MAAA,GAAA,QAAQ,KAAA,EACxB,EAAA,GAKA,KAAK,CAAA,OALS,EAAd,OAAO,GAAA,EAAA,KAAA,MAAA,GAAG,IAAI,GAAA,EAAA,EACd,MAAM,GAIN,KAAK,CAAA,MAJC,EACkB,0BAA0B,GAGlD,KAAK,CAAA,sBAH6C,EAClD,OAAO,GAEP,KAAK,CAAA,OAFE,EACJ,SAAS,GAAAC,YAAA,CACZ,KAAK,EAbH,CAAA,YAAA,EAAA,WAAA,EAAA,MAA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zC,YAAA,EAAA,EAAA,EACF,SAAS,EAAED,mBAAE,CAACC,uBAAM,CAAC,SAAS,EAAE,SAAS,EAAEA,uBAAM,CAAC,kBAAkB,EAAAF,cAAA,CAAAA,cAAA,CAAA,EAAA,EAC7DG,+BAAe,CAAC,EAAE,MAAM,EAAAD,uBAAA,EAAE,MAAM,EAAA,MAAA,EAAE,CAAC,CACnC,EAAAE,uCAAmB,CAAC,EAAE,MAAM,EAAAF,uBAAA,EAAE,MAAM,EAAA,MAAA,EAAE,MAAM,EAAA,MAAA,EAAE,CAAC,CACpD,CAAA,EACF,eAAe,EAAAF,cAAA,CAAAA,cAAA,CAAA,EACX,UAAU,EAAE,eAAe,EACxB,GAAC,eAAe,IAAI,+BAA+B,EAAC,EACpD,SAAS,CAAC,eAAe,CAEhC,EAAA,aAAa,kCACT,YAAY,EAAE,OAAO,EAAA,GACjB,eAAe,IAAI,gCAAgC,IACpD,SAAS,CAAC,aAAa,CAAA,EAE9B,iBAAiB,EAAE;AACf,YAAA,KAAK,mBACD,KAAK,EAAEK,2BAAa,CAAC,KAAK,EAAE,MAAM,CAAC,EAAA,EAChCC,6BAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CACpC;AACJ,SAAA,EACD,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,OAAO,EAAA,CAAA;AAEhB,QAAAR,sBAAA,CAAA,aAAA,CAACS,yBAAY,EAAA,EAAC,MAAM,EAAE,MAAM,EAAE,sBAAsB,EAAE,sBAAsB,EACvE,EAAA,QAAQ,CACE,CACP;AAEpB,CAAC;;;;"}
@@ -4,8 +4,7 @@
4
4
  0 4px 8px rgba(0, 0, 0, 0.04), 0 0 1px rgba(0, 0, 0, 0.04);
5
5
  }
6
6
  :root {
7
- --border-radius-3xl: 24px;
8
- --border-radius-24: var(--border-radius-3xl);
7
+ --border-radius-24: 24px;
9
8
  }
10
9
  :root {
11
10
  --gap-0: 0px;
@@ -1,10 +1,7 @@
1
1
  :root {
2
- --gap-xs: 8px;
3
- --gap-s: 12px;
4
- --gap-m: 16px;
5
- --gap-8: var(--gap-xs);
6
- --gap-12: var(--gap-s);
7
- --gap-16: var(--gap-m);
2
+ --gap-8: 8px;
3
+ --gap-12: 12px;
4
+ --gap-16: 16px;
8
5
  }
9
6
  .column {
10
7
  display: flex;
@@ -1,11 +1,8 @@
1
1
  :root {
2
- --gap-s: 12px;
3
- --gap-m: 16px;
4
- --gap-l: 20px;
5
2
  --gap-6: 6px;
6
- --gap-12: var(--gap-s);
7
- --gap-16: var(--gap-m);
8
- --gap-20: var(--gap-l);
3
+ --gap-12: 12px;
4
+ --gap-16: 16px;
5
+ --gap-20: 20px;
9
6
  }
10
7
  :root {
11
8
  --font-family-system:
@@ -4,8 +4,7 @@
4
4
  0 4px 8px rgba(0, 0, 0, 0.04), 0 0 1px rgba(0, 0, 0, 0.04);
5
5
  }
6
6
  :root {
7
- --border-radius-3xl: 24px;
8
- --border-radius-24: var(--border-radius-3xl);
7
+ --border-radius-24: 24px;
9
8
  }
10
9
  :root {
11
10
  --gap-0: 0px;
@@ -9,6 +9,7 @@ var cssm = require('@alfalab/core-components-base-modal/cssm');
9
9
  var useScrollableContainerRef = require('../../hooks/use-scrollable-container-ref.js');
10
10
  var getFullSizeModalTransitions = require('../../utils/get-full-size-modal-transitions.js');
11
11
  var getHeightStyle = require('../../utils/get-height-style.js');
12
+ var getHugContentStyles = require('../../utils/get-hug-content-styles.js');
12
13
  var getMarginStyles = require('../../utils/get-margin-styles.js');
13
14
  var getWidthStyle = require('../../utils/get-width-style.js');
14
15
  var modalContent = require('../modal-content/modal-content.js');
@@ -38,7 +39,7 @@ var SideModal = React.forwardRef(function (props, ref) {
38
39
  _a[styles__default.default.wrapperJustifyCenter] = verticalAlign === 'center',
39
40
  _a[styles__default.default.wrapperJustifyEnd] = verticalAlign === 'bottom',
40
41
  _a[styles__default.default.withoutOverlay] = withoutOverlay,
41
- _a)), className: cn__default.default(styles__default.default.component, className, styles__default.default.baseModalComponent, tslib.__assign({}, getMarginStyles.getMarginStyles({ styles: styles__default.default, margin: margin, height: height }))), contentClassName: styles__default.default.content, transitionProps: tslib.__assign(tslib.__assign(tslib.__assign({}, getDefaultTransitionProps.getDefaultTransitionProps({
42
+ _a)), className: cn__default.default(styles__default.default.component, className, styles__default.default.baseModalComponent, tslib.__assign(tslib.__assign({}, getMarginStyles.getMarginStyles({ styles: styles__default.default, margin: margin })), getHugContentStyles.getHugContentStyles({ styles: styles__default.default, margin: margin, height: height }))), contentClassName: styles__default.default.content, transitionProps: tslib.__assign(tslib.__assign(tslib.__assign({}, getDefaultTransitionProps.getDefaultTransitionProps({
42
43
  horizontalAlign: horizontalAlign,
43
44
  margin: margin,
44
45
  })), (isFullSizeModal && fullSizeModalContentTransitions)), restProps.transitionProps), backdropProps: tslib.__assign(tslib.__assign({ shouldRender: overlay }, (isFullSizeModal && fullSizeModalBackdropTransitions)), restProps.backdropProps), componentDivProps: {
@@ -1 +1 @@
1
- {"version":3,"file":"side-modal.js","sources":["../../../../src/desktop/components/side-modal/side-modal.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\nimport cn from 'classnames';\n\nimport { BaseModal } from '@alfalab/core-components-base-modal';\n\nimport { useScrollableContainerRef } from '../../hooks/use-scrollable-container-ref';\nimport { type UniversalModalDesktopProps } from '../../types/props';\nimport { getFullSizeModalTransitions } from '../../utils/get-full-size-modal-transitions';\nimport { getHeightStyle } from '../../utils/get-height-style';\nimport { getMarginStyles } from '../../utils/get-margin-styles';\nimport { getWidthStyle } from '../../utils/get-width-style';\nimport { ModalContent } from '../modal-content/modal-content';\n\nimport { getDefaultTransitionProps } from './get-default-transition-props';\n\nimport styles from './index.module.css';\n\nexport const SideModal = forwardRef<HTMLDivElement, UniversalModalDesktopProps>((props, ref) => {\n const {\n width = 500,\n height = 'fullHeight',\n horizontalAlign = 'center',\n verticalAlign = 'center',\n overlay = true,\n open,\n dataTestId,\n className,\n children,\n margin,\n scrollableContainerRef: scrollableContainerRefProp,\n onClose,\n ...restProps\n } = props;\n const componentRef = useRef<HTMLDivElement>(null);\n const contentRef = useRef<HTMLDivElement>(null);\n const { handleWheel, scrollableContainerRef } = useScrollableContainerRef({\n overlay,\n refObject: scrollableContainerRefProp,\n });\n\n const {\n isFullSizeModal,\n componentTransitions: fullSizeModalContentTransitions,\n backdropTransitions: fullSizeModalBackdropTransitions,\n } = getFullSizeModalTransitions({ verticalAlign, width, height });\n\n const withoutOverlay = !overlay;\n\n return (\n <BaseModal\n {...restProps}\n open={open}\n dataTestId={dataTestId}\n ref={ref}\n componentRef={componentRef}\n contentElementRef={contentRef}\n scrollHandler='content'\n scrollLock={overlay}\n wrapperClassName={cn(styles.wrapper, styles.baseModalContainer, {\n [styles.wrapperAlignStart]: horizontalAlign === 'start',\n [styles.wrapperAlignEnd]: horizontalAlign === 'end',\n [styles.wrapperJustifyCenter]: verticalAlign === 'center',\n [styles.wrapperJustifyEnd]: verticalAlign === 'bottom',\n [styles.withoutOverlay]: withoutOverlay,\n })}\n className={cn(styles.component, className, styles.baseModalComponent, {\n ...getMarginStyles({ styles, margin, height }),\n })}\n contentClassName={styles.content}\n transitionProps={{\n ...getDefaultTransitionProps({\n horizontalAlign,\n margin,\n }),\n ...(isFullSizeModal && fullSizeModalContentTransitions),\n ...restProps.transitionProps,\n }}\n backdropProps={{\n shouldRender: overlay,\n ...(isFullSizeModal && fullSizeModalBackdropTransitions),\n ...restProps.backdropProps,\n }}\n componentDivProps={{\n style: {\n width: getWidthStyle(width, margin),\n ...getHeightStyle(height, margin),\n },\n }}\n onWheel={handleWheel}\n onClose={onClose}\n >\n <ModalContent height={height} scrollableContainerRef={scrollableContainerRef}>\n {children}\n </ModalContent>\n </BaseModal>\n );\n});\n"],"names":["forwardRef","__rest","useRef","useScrollableContainerRef","getFullSizeModalTransitions","React","BaseModal","__assign","cn","styles","getMarginStyles","getDefaultTransitionProps","getWidthStyle","getHeightStyle","ModalContent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;IAiB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AA,EACF,gBAAgB,EAAEA,uBAAM,CAAC,OAAO,EAChC,eAAe,EAAAF,cAAA,CAAAA,cAAA,CAAAA,cAAA,CAAA,EAAA,EACRI,mDAAyB,CAAC;AACzB,YAAA,eAAe,EAAA,eAAA;AACf,YAAA,MAAM,EAAA,MAAA;AACT,SAAA,CAAC,CACC,GAAC,eAAe,IAAI,+BAA+B,EACnD,EAAA,SAAS,CAAC,eAAe,CAEhC,EAAA,aAAa,EACTJ,cAAA,CAAAA,cAAA,CAAA,EAAA,YAAY,EAAE,OAAO,EAClB,GAAC,eAAe,IAAI,gCAAgC,EACpD,EAAA,SAAS,CAAC,aAAa,CAE9B,EAAA,iBAAiB,EAAE;AACf,YAAA,KAAK,mBACD,KAAK,EAAEK,2BAAa,CAAC,KAAK,EAAE,MAAM,CAAC,EAAA,EAChCC,6BAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CACpC;AACJ,SAAA,EACD,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,OAAO,EAAA,CAAA;AAEhB,QAAAR,sBAAA,CAAA,aAAA,CAACS,yBAAY,EAAA,EAAC,MAAM,EAAE,MAAM,EAAE,sBAAsB,EAAE,sBAAsB,EACvE,EAAA,QAAQ,CACE,CACP;AAEpB,CAAC;;;;"}
1
+ {"version":3,"file":"side-modal.js","sources":["../../../../src/desktop/components/side-modal/side-modal.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\nimport cn from 'classnames';\n\nimport { BaseModal } from '@alfalab/core-components-base-modal';\n\nimport { useScrollableContainerRef } from '../../hooks/use-scrollable-container-ref';\nimport { type UniversalModalDesktopProps } from '../../types/props';\nimport { getFullSizeModalTransitions } from '../../utils/get-full-size-modal-transitions';\nimport { getHeightStyle } from '../../utils/get-height-style';\nimport { getHugContentStyles } from '../../utils/get-hug-content-styles';\nimport { getMarginStyles } from '../../utils/get-margin-styles';\nimport { getWidthStyle } from '../../utils/get-width-style';\nimport { ModalContent } from '../modal-content/modal-content';\n\nimport { getDefaultTransitionProps } from './get-default-transition-props';\n\nimport styles from './index.module.css';\n\nexport const SideModal = forwardRef<HTMLDivElement, UniversalModalDesktopProps>((props, ref) => {\n const {\n width = 500,\n height = 'fullHeight',\n horizontalAlign = 'center',\n verticalAlign = 'center',\n overlay = true,\n open,\n dataTestId,\n className,\n children,\n margin,\n scrollableContainerRef: scrollableContainerRefProp,\n onClose,\n ...restProps\n } = props;\n const componentRef = useRef<HTMLDivElement>(null);\n const contentRef = useRef<HTMLDivElement>(null);\n const { handleWheel, scrollableContainerRef } = useScrollableContainerRef({\n overlay,\n refObject: scrollableContainerRefProp,\n });\n\n const {\n isFullSizeModal,\n componentTransitions: fullSizeModalContentTransitions,\n backdropTransitions: fullSizeModalBackdropTransitions,\n } = getFullSizeModalTransitions({ verticalAlign, width, height });\n\n const withoutOverlay = !overlay;\n\n return (\n <BaseModal\n {...restProps}\n open={open}\n dataTestId={dataTestId}\n ref={ref}\n componentRef={componentRef}\n contentElementRef={contentRef}\n scrollHandler='content'\n scrollLock={overlay}\n wrapperClassName={cn(styles.wrapper, styles.baseModalContainer, {\n [styles.wrapperAlignStart]: horizontalAlign === 'start',\n [styles.wrapperAlignEnd]: horizontalAlign === 'end',\n [styles.wrapperJustifyCenter]: verticalAlign === 'center',\n [styles.wrapperJustifyEnd]: verticalAlign === 'bottom',\n [styles.withoutOverlay]: withoutOverlay,\n })}\n className={cn(styles.component, className, styles.baseModalComponent, {\n ...getMarginStyles({ styles, margin }),\n ...getHugContentStyles({ styles, margin, height }),\n })}\n contentClassName={styles.content}\n transitionProps={{\n ...getDefaultTransitionProps({\n horizontalAlign,\n margin,\n }),\n ...(isFullSizeModal && fullSizeModalContentTransitions),\n ...restProps.transitionProps,\n }}\n backdropProps={{\n shouldRender: overlay,\n ...(isFullSizeModal && fullSizeModalBackdropTransitions),\n ...restProps.backdropProps,\n }}\n componentDivProps={{\n style: {\n width: getWidthStyle(width, margin),\n ...getHeightStyle(height, margin),\n },\n }}\n onWheel={handleWheel}\n onClose={onClose}\n >\n <ModalContent height={height} scrollableContainerRef={scrollableContainerRef}>\n {children}\n </ModalContent>\n </BaseModal>\n );\n});\n"],"names":["forwardRef","__rest","useRef","useScrollableContainerRef","getFullSizeModalTransitions","React","BaseModal","__assign","cn","styles","getMarginStyles","getHugContentStyles","getDefaultTransitionProps","getWidthStyle","getHeightStyle","ModalContent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;IAkBa,SAAS,GAAGA,gBAAU,CAA6C,UAAC,KAAK,EAAE,GAAG,EAAA;;AAEnF,IAAA,IAAA,KAaA,KAAK,CAAA,KAbM,EAAX,KAAK,GAAA,EAAA,KAAA,MAAA,GAAG,GAAG,GAAA,EAAA,EACX,EAYA,GAAA,KAAK,OAZgB,EAArB,MAAM,mBAAG,YAAY,GAAA,EAAA,EACrB,EAWA,GAAA,KAAK,CAXqB,eAAA,EAA1B,eAAe,GAAG,EAAA,KAAA,MAAA,GAAA,QAAQ,KAAA,EAC1B,EAAA,GAUA,KAAK,CAVmB,aAAA,EAAxB,aAAa,GAAG,EAAA,KAAA,MAAA,GAAA,QAAQ,KAAA,EACxB,EAAA,GASA,KAAK,CATS,OAAA,EAAd,OAAO,GAAG,EAAA,KAAA,MAAA,GAAA,IAAI,GAAA,EAAA,EACd,IAAI,GAQJ,KAAK,KARD,EACJ,UAAU,GAOV,KAAK,CAAA,UAPK,EACV,SAAS,GAMT,KAAK,CAAA,SANI,EACT,QAAQ,GAKR,KAAK,CALG,QAAA,EACR,MAAM,GAIN,KAAK,CAJC,MAAA,EACkB,0BAA0B,GAGlD,KAAK,uBAH6C,EAClD,OAAO,GAEP,KAAK,CAAA,OAFE,EACJ,SAAS,GAAAC,YAAA,CACZ,KAAK,EAdH,CAAA,OAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,SAAA,EAAA,MAAA,EAAA,YAAA,EAAA,WAAA,EAAA,UAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,SAAA,CAcL,CADe;AAEh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3
+ styles: Record<string, string>;
4
+ margin: UniversalModalDesktopProps['margin'];
5
+ height: NonNullable<UniversalModalDesktopProps['height']>;
6
+ }
7
+ export declare const getHugContentStyles: (params: Params) => Record<string, boolean>;
8
+ export {};
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var tslib = require('tslib');
6
+ var cssm = require('@alfalab/core-components-shared/cssm');
7
+
8
+ var getHugContentStyles = function (params) {
9
+ var _a, _b, _c;
10
+ var margin = params.margin, styles = params.styles, height = params.height;
11
+ if (height !== 'hugContent') {
12
+ return {};
13
+ }
14
+ return tslib.__assign(tslib.__assign((_a = {}, _a[styles.hugContent] = true, _a), (margin && cssm.hasOwnProperty(margin, 'top') && (_b = {}, _b[styles["topGap-".concat(margin.top)]] = true, _b))), (margin &&
15
+ cssm.hasOwnProperty(margin, 'bottom') && (_c = {}, _c[styles["bottomGap-".concat(margin.bottom)]] = true, _c)));
16
+ };
17
+
18
+ exports.getHugContentStyles = getHugContentStyles;
19
+ //# sourceMappingURL=get-hug-content-styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-hug-content-styles.js","sources":["../../../src/desktop/utils/get-hug-content-styles.ts"],"sourcesContent":["import { hasOwnProperty } from '@alfalab/core-components-shared';\n\nimport { type UniversalModalDesktopProps } from '../types/props';\n\ninterface Params {\n styles: Record<string, string>;\n margin: UniversalModalDesktopProps['margin'];\n height: NonNullable<UniversalModalDesktopProps['height']>;\n}\n\nexport const getHugContentStyles = (params: Params): Record<string, boolean> => {\n const { margin, styles, height } = params;\n\n if (height !== 'hugContent') {\n return {};\n }\n\n return {\n [styles.hugContent]: true,\n ...(margin && hasOwnProperty(margin, 'top') && { [styles[`topGap-${margin.top}`]]: true }),\n ...(margin &&\n hasOwnProperty(margin, 'bottom') && { [styles[`bottomGap-${margin.bottom}`]]: true }),\n };\n};\n"],"names":["__assign","hasOwnProperty"],"mappings":";;;;;;;AAUO,IAAM,mBAAmB,GAAG,UAAC,MAAc,EAAA;;AACtC,IAAA,IAAA,MAAM,GAAqB,MAAM,CAAA,MAA3B,EAAE,MAAM,GAAa,MAAM,CAAA,MAAnB,EAAE,MAAM,GAAK,MAAM,OAAX;AAE9B,IAAA,IAAI,MAAM,KAAK,YAAY,EAAE;AACzB,QAAA,OAAO,EAAE;;AAGb,IAAA,OAAAA,cAAA,CAAAA,cAAA,EAAA,EAAA,GAAA,EAAA,EAAA,EAAA,CACK,MAAM,CAAC,UAAU,CAAA,GAAG,IAAI,EAAA,EAAA,IACrB,MAAM,IAAIC,mBAAc,CAAC,MAAM,EAAE,KAAK,CAAC,KAAM,EAAA,GAAA,EAAA,EAAA,EAAA,CAAC,MAAM,CAAC,SAAU,CAAA,MAAA,CAAA,MAAM,CAAC,GAAG,CAAE,CAAC,CAAA,GAAG,IAAI,EAAA,EAAA,CAAE,EAAC,GACtF,MAAM;AACN,QAAAA,mBAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAA,EAAA,GAAA,EAAA,EAAM,GAAC,MAAM,CAAC,oBAAa,MAAM,CAAC,MAAM,CAAE,CAAC,IAAG,IAAI,EAAA,EAAA,CAAE,EAC1F;AACN;;;;"}
@@ -2,7 +2,6 @@ import { type UniversalModalDesktopProps } from '../types/props';
2
2
  interface Params {
3
3
  styles: Record<string, string>;
4
4
  margin: UniversalModalDesktopProps['margin'];
5
- height: NonNullable<UniversalModalDesktopProps['height']>;
6
5
  }
7
6
  export declare const getMarginStyles: (params: Params) => Record<string, boolean>;
8
7
  export {};
@@ -2,24 +2,18 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var tslib = require('tslib');
5
6
  var cssm = require('@alfalab/core-components-shared/cssm');
6
7
 
7
8
  var getMarginStyles = function (params) {
8
- var _a;
9
- var margin = params.margin, styles = params.styles, height = params.height;
10
- if (margin) {
11
- var isHugContent = height === 'hugContent';
12
- return _a = {},
13
- _a[styles["marginTop-".concat(margin.top)]] = cssm.hasOwnProperty(margin, 'top'),
14
- _a[styles["marginRight-".concat(margin.right)]] = cssm.hasOwnProperty(margin, 'right'),
15
- _a[styles["marginBottom-".concat(margin.bottom)]] = cssm.hasOwnProperty(margin, 'bottom'),
16
- _a[styles["marginLeft-".concat(margin.left)]] = cssm.hasOwnProperty(margin, 'left'),
17
- _a[styles.hugContent] = isHugContent,
18
- _a[styles["topGap-".concat(margin.top)]] = isHugContent && cssm.hasOwnProperty(margin, 'top'),
19
- _a[styles["bottomGap-".concat(margin.bottom)]] = isHugContent && cssm.hasOwnProperty(margin, 'bottom'),
20
- _a;
9
+ var _a, _b, _c, _d;
10
+ var margin = params.margin, styles = params.styles;
11
+ if (!margin) {
12
+ return {};
21
13
  }
22
- return {};
14
+ return tslib.__assign(tslib.__assign(tslib.__assign(tslib.__assign({}, (cssm.hasOwnProperty(margin, 'top') && (_a = {}, _a[styles["marginTop-".concat(margin.top)]] = true, _a))), (cssm.hasOwnProperty(margin, 'right') && (_b = {}, _b[styles["marginRight-".concat(margin.right)]] = true, _b))), (cssm.hasOwnProperty(margin, 'bottom') && (_c = {},
15
+ _c[styles["marginBottom-".concat(margin.bottom)]] = true,
16
+ _c))), (cssm.hasOwnProperty(margin, 'left') && (_d = {}, _d[styles["marginLeft-".concat(margin.left)]] = true, _d)));
23
17
  };
24
18
 
25
19
  exports.getMarginStyles = getMarginStyles;
@@ -1 +1 @@
1
- {"version":3,"file":"get-margin-styles.js","sources":["../../../src/desktop/utils/get-margin-styles.ts"],"sourcesContent":["import { hasOwnProperty } from '@alfalab/core-components-shared';\n\nimport { type UniversalModalDesktopProps } from '../types/props';\n\ninterface Params {\n styles: Record<string, string>;\n margin: UniversalModalDesktopProps['margin'];\n height: NonNullable<UniversalModalDesktopProps['height']>;\n}\n\nexport const getMarginStyles = (params: Params): Record<string, boolean> => {\n const { margin, styles, height } = params;\n\n if (margin) {\n const isHugContent = height === 'hugContent';\n\n return {\n [styles[`marginTop-${margin.top}`]]: hasOwnProperty(margin, 'top'),\n [styles[`marginRight-${margin.right}`]]: hasOwnProperty(margin, 'right'),\n [styles[`marginBottom-${margin.bottom}`]]: hasOwnProperty(margin, 'bottom'),\n [styles[`marginLeft-${margin.left}`]]: hasOwnProperty(margin, 'left'),\n [styles.hugContent]: isHugContent,\n [styles[`topGap-${margin.top}`]]: isHugContent && hasOwnProperty(margin, 'top'),\n [styles[`bottomGap-${margin.bottom}`]]:\n isHugContent && hasOwnProperty(margin, 'bottom'),\n };\n }\n\n return {};\n};\n"],"names":["hasOwnProperty"],"mappings":";;;;;;AAUO,IAAM,eAAe,GAAG,UAAC,MAAc,EAAA;;AAClC,IAAA,IAAA,MAAM,GAAqB,MAAM,CAAA,MAA3B,EAAE,MAAM,GAAa,MAAM,CAAA,MAAnB,EAAE,MAAM,GAAK,MAAM,OAAX;IAE9B,IAAI,MAAM,EAAE;AACR,QAAA,IAAM,YAAY,GAAG,MAAM,KAAK,YAAY;AAE5C,QAAA,OAAA,EAAA,GAAA,EAAA;AACI,YAAA,EAAA,CAAC,MAAM,CAAC,YAAa,CAAA,MAAA,CAAA,MAAM,CAAC,GAAG,CAAE,CAAC,CAAA,GAAGA,mBAAc,CAAC,MAAM,EAAE,KAAK,CAAC;AAClE,YAAA,EAAA,CAAC,MAAM,CAAC,cAAe,CAAA,MAAA,CAAA,MAAM,CAAC,KAAK,CAAE,CAAC,CAAA,GAAGA,mBAAc,CAAC,MAAM,EAAE,OAAO,CAAC;AACxE,YAAA,EAAA,CAAC,MAAM,CAAC,eAAgB,CAAA,MAAA,CAAA,MAAM,CAAC,MAAM,CAAE,CAAC,CAAA,GAAGA,mBAAc,CAAC,MAAM,EAAE,QAAQ,CAAC;AAC3E,YAAA,EAAA,CAAC,MAAM,CAAC,aAAc,CAAA,MAAA,CAAA,MAAM,CAAC,IAAI,CAAE,CAAC,CAAA,GAAGA,mBAAc,CAAC,MAAM,EAAE,MAAM,CAAC;AACrE,YAAA,EAAA,CAAC,MAAM,CAAC,UAAU,CAAA,GAAG,YAAY;AACjC,YAAA,EAAA,CAAC,MAAM,CAAC,SAAA,CAAA,MAAA,CAAU,MAAM,CAAC,GAAG,CAAE,CAAC,CAAG,GAAA,YAAY,IAAIA,mBAAc,CAAC,MAAM,EAAE,KAAK,CAAC;AAC/E,YAAA,EAAA,CAAC,MAAM,CAAC,YAAA,CAAA,MAAA,CAAa,MAAM,CAAC,MAAM,CAAE,CAAC,CACjC,GAAA,YAAY,IAAIA,mBAAc,CAAC,MAAM,EAAE,QAAQ,CAAC;AACtD,YAAA,EAAA;;AAGN,IAAA,OAAO,EAAE;AACb;;;;"}
1
+ {"version":3,"file":"get-margin-styles.js","sources":["../../../src/desktop/utils/get-margin-styles.ts"],"sourcesContent":["import { hasOwnProperty } from '@alfalab/core-components-shared';\n\nimport { type UniversalModalDesktopProps } from '../types/props';\n\ninterface Params {\n styles: Record<string, string>;\n margin: UniversalModalDesktopProps['margin'];\n}\n\nexport const getMarginStyles = (params: Params): Record<string, boolean> => {\n const { margin, styles } = params;\n\n if (!margin) {\n return {};\n }\n\n return {\n ...(hasOwnProperty(margin, 'top') && { [styles[`marginTop-${margin.top}`]]: true }),\n ...(hasOwnProperty(margin, 'right') && { [styles[`marginRight-${margin.right}`]]: true }),\n ...(hasOwnProperty(margin, 'bottom') && {\n [styles[`marginBottom-${margin.bottom}`]]: true,\n }),\n ...(hasOwnProperty(margin, 'left') && { [styles[`marginLeft-${margin.left}`]]: true }),\n };\n};\n"],"names":["__assign","hasOwnProperty"],"mappings":";;;;;;;AASO,IAAM,eAAe,GAAG,UAAC,MAAc,EAAA;;IAClC,IAAA,MAAM,GAAa,MAAM,CAAA,MAAnB,EAAE,MAAM,GAAK,MAAM,CAAA,MAAX;IAEtB,IAAI,CAAC,MAAM,EAAE;AACT,QAAA,OAAO,EAAE;;IAGb,OACOA,cAAA,CAAAA,cAAA,CAAAA,cAAA,CAAAA,cAAA,CAAA,EAAA,GAACC,mBAAc,CAAC,MAAM,EAAE,KAAK,CAAC,KAAM,EAAA,GAAA,EAAA,EAAA,EAAA,CAAC,MAAM,CAAC,oBAAa,MAAM,CAAC,GAAG,CAAE,CAAC,CAAA,GAAG,IAAI,EAAE,EAAA,CAAA,EAC/E,GAACA,mBAAc,CAAC,MAAM,EAAE,OAAO,CAAC,KAAM,EAAA,GAAA,EAAA,EAAA,EAAA,CAAC,MAAM,CAAC,cAAA,CAAA,MAAA,CAAe,MAAM,CAAC,KAAK,CAAE,CAAC,CAAG,GAAA,IAAI,EAAE,EAAA,CAAA,EACrF,GAACA,mBAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAA,EAAA,GAAA,EAAA;QAChC,EAAC,CAAA,MAAM,CAAC,eAAgB,CAAA,MAAA,CAAA,MAAM,CAAC,MAAM,CAAE,CAAC,CAAA,GAAG,IAAI;WAClD,EAAC,GACEA,mBAAc,CAAC,MAAM,EAAE,MAAM,CAAC,KAAA,EAAA,GAAA,EAAA,EAAM,EAAC,CAAA,MAAM,CAAC,aAAc,CAAA,MAAA,CAAA,MAAM,CAAC,IAAI,CAAE,CAAC,CAAG,GAAA,IAAI,EAAE,EAAA,CAAA,EACvF;AACN;;;;"}
@@ -1,7 +1,6 @@
1
1
  :root {
2
- --gap-l: 20px;
3
2
  --gap-0: 0px;
4
- --gap-20: var(--gap-l);
3
+ --gap-20: 20px;
5
4
  }
6
5
  .content {
7
6
  padding: var(--gap-20);
@@ -1,7 +1,6 @@
1
1
  :root {
2
- --gap-l: 20px;
3
2
  --gap-0: 0px;
4
- --gap-20: var(--gap-l);
3
+ --gap-20: 20px;
5
4
  }
6
5
  .footer {
7
6
  padding: var(--gap-20);
@@ -1,6 +1,5 @@
1
1
  :root {
2
- --gap-xs: 8px;
3
- --gap-8: var(--gap-xs);
2
+ --gap-8: 8px;
4
3
  }
5
4
  .column {
6
5
  flex-direction: column;
@@ -1,13 +1,9 @@
1
1
  :root {
2
- --gap-2xs: 4px;
3
- --gap-xs: 8px;
4
- --gap-s: 12px;
5
- --gap-m: 16px;
6
- --gap-4: var(--gap-2xs);
2
+ --gap-4: 4px;
7
3
  --gap-6: 6px;
8
- --gap-8: var(--gap-xs);
9
- --gap-12: var(--gap-s);
10
- --gap-16: var(--gap-m);
4
+ --gap-8: 8px;
5
+ --gap-12: 12px;
6
+ --gap-16: 16px;
11
7
  }
12
8
  :root {
13
9
  --font-family-system:
@@ -10,6 +10,7 @@ var coreComponentsShared = require('@alfalab/core-components-shared');
10
10
  var useScrollableContainerRef = require('../../hooks/use-scrollable-container-ref.js');
11
11
  var getFullSizeModalTransitions = require('../../utils/get-full-size-modal-transitions.js');
12
12
  var getHeightStyle = require('../../utils/get-height-style.js');
13
+ var getHugContentStyles = require('../../utils/get-hug-content-styles.js');
13
14
  var getMarginStyles = require('../../utils/get-margin-styles.js');
14
15
  var getWidthStyle = require('../../utils/get-width-style.js');
15
16
  var modalContent = require('../modal-content/modal-content.js');
@@ -39,7 +40,7 @@ var CenterModal = React.forwardRef(function (props, ref) {
39
40
  _a[index_module.wrapperJustifyCenter] = verticalAlign === 'center',
40
41
  _a[index_module.wrapperJustifyEnd] = verticalAlign === 'bottom',
41
42
  _a[index_module.withoutOverlay] = withoutOverlay,
42
- _a)), className: cn__default.default(index_module.component, className, index_module.baseModalComponent, tslib.__assign({}, getMarginStyles.getMarginStyles({ styles: index_module, margin: margin, height: height }))), transitionProps: tslib.__assign(tslib.__assign({ classNames: transitionProps }, (isFullSizeModal && fullSizeModalContentTransitions)), restProps.transitionProps), backdropProps: tslib.__assign(tslib.__assign({ shouldRender: overlay }, (isFullSizeModal && fullSizeModalBackdropTransitions)), restProps.backdropProps), componentDivProps: {
43
+ _a)), className: cn__default.default(index_module.component, className, index_module.baseModalComponent, tslib.__assign(tslib.__assign({}, getMarginStyles.getMarginStyles({ styles: index_module, margin: margin })), getHugContentStyles.getHugContentStyles({ styles: index_module, margin: margin, height: height }))), transitionProps: tslib.__assign(tslib.__assign({ classNames: transitionProps }, (isFullSizeModal && fullSizeModalContentTransitions)), restProps.transitionProps), backdropProps: tslib.__assign(tslib.__assign({ shouldRender: overlay }, (isFullSizeModal && fullSizeModalBackdropTransitions)), restProps.backdropProps), componentDivProps: {
43
44
  style: tslib.__assign({ width: getWidthStyle.getWidthStyle(width, margin) }, getHeightStyle.getHeightStyle(height, margin)),
44
45
  }, onWheel: handleWheel, onClose: onClose }),
45
46
  React__default.default.createElement(modalContent.ModalContent, { height: height, scrollableContainerRef: scrollableContainerRef }, children)));
@@ -1 +1 @@
1
- {"version":3,"file":"center-modal.js","sources":["../../../src/desktop/components/center-modal/center-modal.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\nimport cn from 'classnames';\n\nimport { BaseModal } from '@alfalab/core-components-base-modal';\nimport { isMacOS, isSafari } from '@alfalab/core-components-shared';\n\nimport { useScrollableContainerRef } from '../../hooks/use-scrollable-container-ref';\nimport { type UniversalModalDesktopProps } from '../../types/props';\nimport { getFullSizeModalTransitions } from '../../utils/get-full-size-modal-transitions';\nimport { getHeightStyle } from '../../utils/get-height-style';\nimport { getMarginStyles } from '../../utils/get-margin-styles';\nimport { getWidthStyle } from '../../utils/get-width-style';\nimport { ModalContent } from '../modal-content/modal-content';\n\nimport styles from './index.module.css';\nimport safariTransitions from './transitions/safari-transitions.module.css';\nimport transitions from './transitions/transitions.module.css';\n\n// в safari некорректно отрабатывает transform:scale (???), поэтому применяем немного другую анимацию\nconst transitionProps = isMacOS() && isSafari() ? safariTransitions : transitions;\n\nexport const CenterModal = forwardRef<HTMLDivElement, UniversalModalDesktopProps>((props, ref) => {\n const {\n dataTestId,\n className,\n open,\n children,\n width = 500,\n height = 'hugContent',\n verticalAlign = 'center',\n overlay = true,\n margin,\n scrollableContainerRef: scrollableContainerRefProp,\n onClose,\n ...restProps\n } = props;\n\n const componentRef = useRef<HTMLDivElement>(null);\n const { handleWheel, scrollableContainerRef } = useScrollableContainerRef({\n overlay,\n refObject: scrollableContainerRefProp,\n });\n\n const {\n isFullSizeModal,\n componentTransitions: fullSizeModalContentTransitions,\n backdropTransitions: fullSizeModalBackdropTransitions,\n } = getFullSizeModalTransitions({ verticalAlign, width, height });\n\n const withoutOverlay = !overlay;\n\n return (\n <BaseModal\n {...restProps}\n open={open}\n dataTestId={dataTestId}\n ref={ref}\n componentRef={componentRef}\n scrollHandler='content'\n scrollLock={overlay}\n wrapperClassName={cn(styles.baseModalContainer, {\n [styles.wrapperJustifyStart]: verticalAlign === 'top',\n [styles.wrapperJustifyCenter]: verticalAlign === 'center',\n [styles.wrapperJustifyEnd]: verticalAlign === 'bottom',\n [styles.withoutOverlay]: withoutOverlay,\n })}\n className={cn(styles.component, className, styles.baseModalComponent, {\n ...getMarginStyles({ styles, margin, height }),\n })}\n transitionProps={{\n classNames: transitionProps,\n ...(isFullSizeModal && fullSizeModalContentTransitions),\n ...restProps.transitionProps,\n }}\n backdropProps={{\n shouldRender: overlay,\n ...(isFullSizeModal && fullSizeModalBackdropTransitions),\n ...restProps.backdropProps,\n }}\n componentDivProps={{\n style: {\n width: getWidthStyle(width, margin),\n ...getHeightStyle(height, margin),\n },\n }}\n onWheel={handleWheel}\n onClose={onClose}\n >\n <ModalContent height={height} scrollableContainerRef={scrollableContainerRef}>\n {children}\n </ModalContent>\n </BaseModal>\n );\n});\n"],"names":["isMacOS","isSafari","safariTransitions","transitions","forwardRef","__rest","useRef","useScrollableContainerRef","getFullSizeModalTransitions","React","BaseModal","__assign","cn","styles","getMarginStyles","getWidthStyle","getHeightStyle","ModalContent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAkBA;AACA,IAAM,eAAe,GAAGA,4BAAO,EAAE,IAAIC,6BAAQ,EAAE,GAAGC,wBAAiB,GAAGC,kBAAW;IAEpE,WAAW,GAAGC,gBAAU,CAA6C,UAAC,KAAK,EAAE,GAAG,EAAA;;AAErF,IAAA,IAAA,UAAU,GAYV,KAAK,CAZK,UAAA,EACV,SAAS,GAWT,KAAK,CAXI,SAAA,EACT,IAAI,GAUJ,KAAK,CAVD,IAAA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C,CACpC;AACJ,SAAA,EACD,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,OAAO,EAAA,CAAA;AAEhB,QAAAP,sBAAA,CAAA,aAAA,CAACQ,yBAAY,EAAA,EAAC,MAAM,EAAE,MAAM,EAAE,sBAAsB,EAAE,sBAAsB,EACvE,EAAA,QAAQ,CACE,CACP;AAEpB,CAAC;;;;"}
1
+ {"version":3,"file":"center-modal.js","sources":["../../../src/desktop/components/center-modal/center-modal.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\nimport cn from 'classnames';\n\nimport { BaseModal } from '@alfalab/core-components-base-modal';\nimport { isMacOS, isSafari } from '@alfalab/core-components-shared';\n\nimport { useScrollableContainerRef } from '../../hooks/use-scrollable-container-ref';\nimport { type UniversalModalDesktopProps } from '../../types/props';\nimport { getFullSizeModalTransitions } from '../../utils/get-full-size-modal-transitions';\nimport { getHeightStyle } from '../../utils/get-height-style';\nimport { getHugContentStyles } from '../../utils/get-hug-content-styles';\nimport { getMarginStyles } from '../../utils/get-margin-styles';\nimport { getWidthStyle } from '../../utils/get-width-style';\nimport { ModalContent } from '../modal-content/modal-content';\n\nimport styles from './index.module.css';\nimport safariTransitions from './transitions/safari-transitions.module.css';\nimport transitions from './transitions/transitions.module.css';\n\n// в safari некорректно отрабатывает transform:scale (???), поэтому применяем немного другую анимацию\nconst transitionProps = isMacOS() && isSafari() ? safariTransitions : transitions;\n\nexport const CenterModal = forwardRef<HTMLDivElement, UniversalModalDesktopProps>((props, ref) => {\n const {\n dataTestId,\n className,\n open,\n children,\n width = 500,\n height = 'hugContent',\n verticalAlign = 'center',\n overlay = true,\n margin,\n scrollableContainerRef: scrollableContainerRefProp,\n onClose,\n ...restProps\n } = props;\n\n const componentRef = useRef<HTMLDivElement>(null);\n const { handleWheel, scrollableContainerRef } = useScrollableContainerRef({\n overlay,\n refObject: scrollableContainerRefProp,\n });\n\n const {\n isFullSizeModal,\n componentTransitions: fullSizeModalContentTransitions,\n backdropTransitions: fullSizeModalBackdropTransitions,\n } = getFullSizeModalTransitions({ verticalAlign, width, height });\n\n const withoutOverlay = !overlay;\n\n return (\n <BaseModal\n {...restProps}\n open={open}\n dataTestId={dataTestId}\n ref={ref}\n componentRef={componentRef}\n scrollHandler='content'\n scrollLock={overlay}\n wrapperClassName={cn(styles.baseModalContainer, {\n [styles.wrapperJustifyStart]: verticalAlign === 'top',\n [styles.wrapperJustifyCenter]: verticalAlign === 'center',\n [styles.wrapperJustifyEnd]: verticalAlign === 'bottom',\n [styles.withoutOverlay]: withoutOverlay,\n })}\n className={cn(styles.component, className, styles.baseModalComponent, {\n ...getMarginStyles({ styles, margin }),\n ...getHugContentStyles({ styles, margin, height }),\n })}\n transitionProps={{\n classNames: transitionProps,\n ...(isFullSizeModal && fullSizeModalContentTransitions),\n ...restProps.transitionProps,\n }}\n backdropProps={{\n shouldRender: overlay,\n ...(isFullSizeModal && fullSizeModalBackdropTransitions),\n ...restProps.backdropProps,\n }}\n componentDivProps={{\n style: {\n width: getWidthStyle(width, margin),\n ...getHeightStyle(height, margin),\n },\n }}\n onWheel={handleWheel}\n onClose={onClose}\n >\n <ModalContent height={height} scrollableContainerRef={scrollableContainerRef}>\n {children}\n </ModalContent>\n </BaseModal>\n );\n});\n"],"names":["isMacOS","isSafari","safariTransitions","transitions","forwardRef","__rest","useRef","useScrollableContainerRef","getFullSizeModalTransitions","React","BaseModal","__assign","cn","styles","getMarginStyles","getHugContentStyles","getWidthStyle","getHeightStyle","ModalContent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAmBA;AACA,IAAM,eAAe,GAAGA,4BAAO,EAAE,IAAIC,6BAAQ,EAAE,GAAGC,wBAAiB,GAAGC,kBAAW;IAEpE,WAAW,GAAGC,gBAAU,CAA6C,UAAC,KAAK,EAAE,GAAG,EAAA;;AAErF,IAAA,IAAA,UAAU,GAYV,KAAK,CAZK,UAAA,EACV,SAAS,GAWT,KAAK,CAXI,SAAA,EACT,IAAI,GAUJ,KAAK,CA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