@alfalab/core-components-universal-modal 3.2.3 → 3.2.4-alfasans

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 (165) hide show
  1. package/components/base-content/index.css +1 -1
  2. package/components/base-content/index.module.css.js +1 -1
  3. package/components/base-footer/index.css +3 -3
  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/desktop/components/center-modal/center-modal.js +1 -1
  8. package/cssm/desktop/components/center-modal/center-modal.js.map +1 -1
  9. package/cssm/desktop/components/header/desktop.module.css +11 -6
  10. package/cssm/desktop/components/side-modal/side-modal.js +1 -1
  11. package/cssm/desktop/components/side-modal/side-modal.js.map +1 -1
  12. package/cssm/mobile/components/header/index.module.css +9 -6
  13. package/desktop/components/center-modal/center-modal.js +1 -1
  14. package/desktop/components/center-modal/center-modal.js.map +1 -1
  15. package/desktop/components/center-modal/index.css +814 -814
  16. package/desktop/components/center-modal/index.module.css.js +1 -1
  17. package/desktop/components/center-modal/transitions/safari-transitions.css +7 -7
  18. package/desktop/components/center-modal/transitions/safari-transitions.module.css.js +1 -1
  19. package/desktop/components/center-modal/transitions/transitions.css +7 -7
  20. package/desktop/components/center-modal/transitions/transitions.module.css.js +1 -1
  21. package/desktop/components/footer/desktop.css +1 -1
  22. package/desktop/components/footer/desktop.module.css.js +1 -1
  23. package/desktop/components/footer/layout.css +9 -9
  24. package/desktop/components/footer/layout.module.css.js +1 -1
  25. package/desktop/components/header/desktop.css +16 -11
  26. package/desktop/components/header/desktop.module.css.js +1 -1
  27. package/desktop/components/modal-content/modal-content.css +4 -4
  28. package/desktop/components/modal-content/modal-content.module.css.js +1 -1
  29. package/desktop/components/side-modal/index.css +816 -816
  30. package/desktop/components/side-modal/index.module.css.js +1 -1
  31. package/desktop/components/side-modal/side-modal.js +1 -1
  32. package/desktop/components/side-modal/side-modal.js.map +1 -1
  33. package/desktop/components/side-modal/transitions/transitions.css +71 -71
  34. package/desktop/components/side-modal/transitions/transitions.module.css.js +1 -1
  35. package/desktop/styles/transitions/full-size-backdrop-transitions.css +13 -13
  36. package/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js +1 -1
  37. package/desktop/styles/transitions/full-size-vertical-bottom-transitions.css +7 -7
  38. package/desktop/styles/transitions/full-size-vertical-bottom-transitions.module.css.js +1 -1
  39. package/desktop/styles/transitions/full-size-vertical-center-transitions.css +7 -7
  40. package/desktop/styles/transitions/full-size-vertical-center-transitions.module.css.js +1 -1
  41. package/desktop/styles/transitions/full-size-vertical-top-transitions.css +7 -7
  42. package/desktop/styles/transitions/full-size-vertical-top-transitions.module.css.js +1 -1
  43. package/esm/components/base-content/index.css +1 -1
  44. package/esm/components/base-content/index.module.css.js +1 -1
  45. package/esm/components/base-footer/index.css +3 -3
  46. package/esm/components/base-footer/index.module.css.js +1 -1
  47. package/esm/components/base-header/index.css +4 -4
  48. package/esm/components/base-header/index.module.css.js +1 -1
  49. package/esm/desktop/components/center-modal/center-modal.js +1 -1
  50. package/esm/desktop/components/center-modal/center-modal.js.map +1 -1
  51. package/esm/desktop/components/center-modal/index.css +814 -814
  52. package/esm/desktop/components/center-modal/index.module.css.js +1 -1
  53. package/esm/desktop/components/center-modal/transitions/safari-transitions.css +7 -7
  54. package/esm/desktop/components/center-modal/transitions/safari-transitions.module.css.js +1 -1
  55. package/esm/desktop/components/center-modal/transitions/transitions.css +7 -7
  56. package/esm/desktop/components/center-modal/transitions/transitions.module.css.js +1 -1
  57. package/esm/desktop/components/footer/desktop.css +1 -1
  58. package/esm/desktop/components/footer/desktop.module.css.js +1 -1
  59. package/esm/desktop/components/footer/layout.css +9 -9
  60. package/esm/desktop/components/footer/layout.module.css.js +1 -1
  61. package/esm/desktop/components/header/desktop.css +16 -11
  62. package/esm/desktop/components/header/desktop.module.css.js +1 -1
  63. package/esm/desktop/components/modal-content/modal-content.css +4 -4
  64. package/esm/desktop/components/modal-content/modal-content.module.css.js +1 -1
  65. package/esm/desktop/components/side-modal/index.css +816 -816
  66. package/esm/desktop/components/side-modal/index.module.css.js +1 -1
  67. package/esm/desktop/components/side-modal/side-modal.js +1 -1
  68. package/esm/desktop/components/side-modal/side-modal.js.map +1 -1
  69. package/esm/desktop/components/side-modal/transitions/transitions.css +71 -71
  70. package/esm/desktop/components/side-modal/transitions/transitions.module.css.js +1 -1
  71. package/esm/desktop/styles/transitions/full-size-backdrop-transitions.css +13 -13
  72. package/esm/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js +1 -1
  73. package/esm/desktop/styles/transitions/full-size-vertical-bottom-transitions.css +7 -7
  74. package/esm/desktop/styles/transitions/full-size-vertical-bottom-transitions.module.css.js +1 -1
  75. package/esm/desktop/styles/transitions/full-size-vertical-center-transitions.css +7 -7
  76. package/esm/desktop/styles/transitions/full-size-vertical-center-transitions.module.css.js +1 -1
  77. package/esm/desktop/styles/transitions/full-size-vertical-top-transitions.css +7 -7
  78. package/esm/desktop/styles/transitions/full-size-vertical-top-transitions.module.css.js +1 -1
  79. package/esm/mobile/components/content/index.css +3 -3
  80. package/esm/mobile/components/content/index.module.css.js +1 -1
  81. package/esm/mobile/components/footer/index.css +2 -2
  82. package/esm/mobile/components/footer/index.module.css.js +1 -1
  83. package/esm/mobile/components/footer/layout.mobile.css +9 -9
  84. package/esm/mobile/components/footer/layout.mobile.module.css.js +1 -1
  85. package/esm/mobile/components/header/index.css +12 -9
  86. package/esm/mobile/components/header/index.module.css.js +1 -1
  87. package/esm/mobile/mobile.css +3 -3
  88. package/esm/mobile/mobile.module.css.js +1 -1
  89. package/esm/mobile/transitions/right-side-transitions.mobile.css +7 -7
  90. package/esm/mobile/transitions/right-side-transitions.mobile.module.css.js +1 -1
  91. package/esm/mobile/transitions/transitions.mobile.css +7 -7
  92. package/esm/mobile/transitions/transitions.mobile.module.css.js +1 -1
  93. package/mobile/components/content/index.css +3 -3
  94. package/mobile/components/content/index.module.css.js +1 -1
  95. package/mobile/components/footer/index.css +2 -2
  96. package/mobile/components/footer/index.module.css.js +1 -1
  97. package/mobile/components/footer/layout.mobile.css +9 -9
  98. package/mobile/components/footer/layout.mobile.module.css.js +1 -1
  99. package/mobile/components/header/index.css +12 -9
  100. package/mobile/components/header/index.module.css.js +1 -1
  101. package/mobile/mobile.css +3 -3
  102. package/mobile/mobile.module.css.js +1 -1
  103. package/mobile/transitions/right-side-transitions.mobile.css +7 -7
  104. package/mobile/transitions/right-side-transitions.mobile.module.css.js +1 -1
  105. package/mobile/transitions/transitions.mobile.css +7 -7
  106. package/mobile/transitions/transitions.mobile.module.css.js +1 -1
  107. package/modern/components/base-content/index.css +1 -1
  108. package/modern/components/base-content/index.module.css.js +1 -1
  109. package/modern/components/base-footer/index.css +3 -3
  110. package/modern/components/base-footer/index.module.css.js +1 -1
  111. package/modern/components/base-header/index.css +4 -4
  112. package/modern/components/base-header/index.module.css.js +1 -1
  113. package/modern/desktop/components/center-modal/center-modal.js +1 -1
  114. package/modern/desktop/components/center-modal/center-modal.js.map +1 -1
  115. package/modern/desktop/components/center-modal/index.css +814 -814
  116. package/modern/desktop/components/center-modal/index.module.css.js +1 -1
  117. package/modern/desktop/components/center-modal/transitions/safari-transitions.css +7 -7
  118. package/modern/desktop/components/center-modal/transitions/safari-transitions.module.css.js +1 -1
  119. package/modern/desktop/components/center-modal/transitions/transitions.css +7 -7
  120. package/modern/desktop/components/center-modal/transitions/transitions.module.css.js +1 -1
  121. package/modern/desktop/components/footer/desktop.css +1 -1
  122. package/modern/desktop/components/footer/desktop.module.css.js +1 -1
  123. package/modern/desktop/components/footer/layout.css +9 -9
  124. package/modern/desktop/components/footer/layout.module.css.js +1 -1
  125. package/modern/desktop/components/header/desktop.css +16 -11
  126. package/modern/desktop/components/header/desktop.module.css.js +1 -1
  127. package/modern/desktop/components/modal-content/modal-content.css +4 -4
  128. package/modern/desktop/components/modal-content/modal-content.module.css.js +1 -1
  129. package/modern/desktop/components/side-modal/index.css +816 -816
  130. package/modern/desktop/components/side-modal/index.module.css.js +1 -1
  131. package/modern/desktop/components/side-modal/side-modal.js +1 -1
  132. package/modern/desktop/components/side-modal/side-modal.js.map +1 -1
  133. package/modern/desktop/components/side-modal/transitions/transitions.css +71 -71
  134. package/modern/desktop/components/side-modal/transitions/transitions.module.css.js +1 -1
  135. package/modern/desktop/styles/transitions/full-size-backdrop-transitions.css +13 -13
  136. package/modern/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js +1 -1
  137. package/modern/desktop/styles/transitions/full-size-vertical-bottom-transitions.css +7 -7
  138. package/modern/desktop/styles/transitions/full-size-vertical-bottom-transitions.module.css.js +1 -1
  139. package/modern/desktop/styles/transitions/full-size-vertical-center-transitions.css +7 -7
  140. package/modern/desktop/styles/transitions/full-size-vertical-center-transitions.module.css.js +1 -1
  141. package/modern/desktop/styles/transitions/full-size-vertical-top-transitions.css +7 -7
  142. package/modern/desktop/styles/transitions/full-size-vertical-top-transitions.module.css.js +1 -1
  143. package/modern/mobile/components/content/index.css +3 -3
  144. package/modern/mobile/components/content/index.module.css.js +1 -1
  145. package/modern/mobile/components/footer/index.css +2 -2
  146. package/modern/mobile/components/footer/index.module.css.js +1 -1
  147. package/modern/mobile/components/footer/layout.mobile.css +9 -9
  148. package/modern/mobile/components/footer/layout.mobile.module.css.js +1 -1
  149. package/modern/mobile/components/header/index.css +12 -9
  150. package/modern/mobile/components/header/index.module.css.js +1 -1
  151. package/modern/mobile/mobile.css +3 -3
  152. package/modern/mobile/mobile.module.css.js +1 -1
  153. package/modern/mobile/transitions/right-side-transitions.mobile.css +7 -7
  154. package/modern/mobile/transitions/right-side-transitions.mobile.module.css.js +1 -1
  155. package/modern/mobile/transitions/transitions.mobile.css +7 -7
  156. package/modern/mobile/transitions/transitions.mobile.module.css.js +1 -1
  157. package/moderncssm/desktop/components/center-modal/center-modal.js +1 -1
  158. package/moderncssm/desktop/components/center-modal/center-modal.js.map +1 -1
  159. package/moderncssm/desktop/components/header/desktop.module.css +8 -4
  160. package/moderncssm/desktop/components/side-modal/side-modal.js +1 -1
  161. package/moderncssm/desktop/components/side-modal/side-modal.js.map +1 -1
  162. package/moderncssm/mobile/components/header/index.module.css +6 -4
  163. package/package.json +9 -9
  164. package/src/desktop/components/center-modal/center-modal.tsx +1 -1
  165. package/src/desktop/components/side-modal/side-modal.tsx +1 -1
@@ -11,7 +11,7 @@
11
11
  --universal-modal-footer-highlight-background: var(--color-light-modal-bg-primary);
12
12
  --universal-modal-footer-highlight-box-shadow: 0 -1px 0 0 var(--color-light-neutral-300);
13
13
  }
14
- .universal-modal__footer_gxgdh {
14
+ .universal-modal__footer_6e330 {
15
15
  width: 100%;
16
16
  box-sizing: border-box;
17
17
  transition:
@@ -19,12 +19,12 @@
19
19
  background 0.2s ease;
20
20
  padding: var(--gap-16) var(--gap-32) var(--gap-32);
21
21
  }
22
- .universal-modal__sticky_gxgdh {
22
+ .universal-modal__sticky_6e330 {
23
23
  background: var(--universal-modal-footer-background);
24
24
  position: sticky;
25
25
  z-index: 1;
26
26
  }
27
- .universal-modal__highlighted_gxgdh {
27
+ .universal-modal__highlighted_6e330 {
28
28
  background: var(--universal-modal-footer-highlight-background);
29
29
  box-shadow: var(--universal-modal-footer-highlight-box-shadow);
30
30
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- var styles = {"footer":"universal-modal__footer_gxgdh","sticky":"universal-modal__sticky_gxgdh","highlighted":"universal-modal__highlighted_gxgdh"};
3
+ var styles = {"footer":"universal-modal__footer_6e330","sticky":"universal-modal__sticky_6e330","highlighted":"universal-modal__highlighted_6e330"};
4
4
 
5
5
  export { styles as default };
6
6
  //# 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_11hsa {
13
+ .universal-modal__header_vy5tw {
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_11hsa.universal-modal__highlighted_11hsa {
20
+ .universal-modal__header_vy5tw.universal-modal__highlighted_vy5tw {
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_11hsa.universal-modal__sticky_11hsa {
24
+ .universal-modal__header_vy5tw.universal-modal__sticky_vy5tw {
25
25
  position: sticky;
26
26
  top: var(--gap-0);
27
27
  z-index: 1;
28
28
  }
29
- .universal-modal__header_11hsa.universal-modal__sticky_11hsa.universal-modal__hasContent_11hsa {
29
+ .universal-modal__header_vy5tw.universal-modal__sticky_vy5tw.universal-modal__hasContent_vy5tw {
30
30
  background: var(--universal-modal-header-background);
31
31
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css';
2
2
 
3
- var styles = {"header":"universal-modal__header_11hsa","highlighted":"universal-modal__highlighted_11hsa","sticky":"universal-modal__sticky_11hsa","hasContent":"universal-modal__hasContent_11hsa"};
3
+ var styles = {"header":"universal-modal__header_vy5tw","highlighted":"universal-modal__highlighted_vy5tw","sticky":"universal-modal__sticky_vy5tw","hasContent":"universal-modal__hasContent_vy5tw"};
4
4
 
5
5
  export { styles as default };
6
6
  //# sourceMappingURL=index.module.css.js.map
@@ -26,7 +26,7 @@ var CenterModal = forwardRef(function (props, ref) {
26
26
  }), handleWheel = _f.handleWheel, scrollableContainerRef = _f.scrollableContainerRef;
27
27
  var _g = getFullSizeModalTransitions({ verticalAlign: verticalAlign, width: width, height: height }), isFullSizeModal = _g.isFullSizeModal, fullSizeModalContentTransitions = _g.componentTransitions, fullSizeModalBackdropTransitions = _g.backdropTransitions;
28
28
  var withoutOverlay = !overlay;
29
- return (React.createElement(BaseModal, __assign({}, restProps, { open: open, dataTestId: dataTestId, ref: ref, componentRef: componentRef, scrollHandler: 'content', scrollLock: overlay, wrapperClassName: cn(styles.baseModalContainer, (_a = {},
29
+ return (React.createElement(BaseModal, __assign({}, restProps, { open: open, dataTestId: dataTestId, ref: ref, componentRef: componentRef, scrollHandler: 'content', disableBlockingScroll: withoutOverlay, wrapperClassName: cn(styles.baseModalContainer, (_a = {},
30
30
  _a[styles.wrapperJustifyStart] = verticalAlign === 'top',
31
31
  _a[styles.wrapperJustifyCenter] = verticalAlign === 'center',
32
32
  _a[styles.wrapperJustifyEnd] = verticalAlign === 'bottom',
@@ -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 { 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":[],"mappings":";;;;;;;;;;;;;;;;AAmBA;AACA,IAAM,eAAe,GAAG,OAAO,EAAE,IAAI,QAAQ,EAAE,GAAG,iBAAiB,GAAG,WAAW;IAEpE,WAAW,GAAG,UAAU,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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,WAAW,EACpB,OAAO,EAAE,OAAO,EAAA,CAAA;AAEhB,QAAA,KAAA,CAAA,aAAA,CAAC,YAAY,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 disableBlockingScroll={withoutOverlay}\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":[],"mappings":";;;;;;;;;;;;;;;;AAmBA;AACA,IAAM,eAAe,GAAG,OAAO,EAAE,IAAI,QAAQ,EAAE,GAAG,iBAAiB,GAAG,WAAW;IAEpE,WAAW,GAAG,UAAU,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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