@alfalab/core-components-universal-modal 3.0.5 → 3.0.6-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 (322) hide show
  1. package/Context.d.ts +0 -1
  2. package/components/content/base-content/index.css +1 -1
  3. package/components/content/base-content/index.module.css.js +1 -1
  4. package/components/content/desktop/desktop.css +2 -2
  5. package/components/content/desktop/desktop.module.css.js +1 -1
  6. package/components/content/mobile/Component.mobile.d.ts +1 -1
  7. package/components/content/mobile/mobile.css +3 -3
  8. package/components/content/mobile/mobile.module.css.js +1 -1
  9. package/components/content/responsive/Component.responsive.js.map +1 -1
  10. package/components/footer/base-footer/index.css +3 -3
  11. package/components/footer/base-footer/index.module.css.js +1 -1
  12. package/components/footer/base-footer/index.module.css.js.map +1 -1
  13. package/components/footer/desktop/desktop.css +1 -1
  14. package/components/footer/desktop/desktop.module.css.js +1 -1
  15. package/components/footer/desktop/layout.css +9 -9
  16. package/components/footer/desktop/layout.module.css.js +1 -1
  17. package/components/footer/mobile/Component.mobile.d.ts +1 -1
  18. package/components/footer/mobile/layout.mobile.css +8 -8
  19. package/components/footer/mobile/layout.mobile.module.css.js +1 -1
  20. package/components/footer/mobile/mobile.css +2 -2
  21. package/components/footer/mobile/mobile.module.css.js +1 -1
  22. package/components/footer/responsive/Component.responsive.js.map +1 -1
  23. package/components/header/base-header/index.css +4 -4
  24. package/components/header/base-header/index.module.css.js +1 -1
  25. package/components/header/base-header/index.module.css.js.map +1 -1
  26. package/components/header/base-header/useBaseHeader.d.ts +2 -2
  27. package/components/header/base-header/useBaseHeader.js.map +1 -1
  28. package/components/header/desktop/desktop.css +16 -11
  29. package/components/header/desktop/desktop.module.css.js +1 -1
  30. package/components/header/mobile/Component.mobile.d.ts +1 -1
  31. package/components/header/mobile/mobile.css +12 -9
  32. package/components/header/mobile/mobile.module.css.js +1 -1
  33. package/components/header/mobile/mobile.module.css.js.map +1 -1
  34. package/components/header/responsive/Component.responsive.js.map +1 -1
  35. package/cssm/Context.d.ts +0 -1
  36. package/cssm/components/content/mobile/Component.mobile.d.ts +1 -1
  37. package/cssm/components/content/responsive/Component.responsive.js.map +1 -1
  38. package/cssm/components/footer/mobile/Component.mobile.d.ts +1 -1
  39. package/cssm/components/footer/responsive/Component.responsive.js.map +1 -1
  40. package/cssm/components/header/base-header/useBaseHeader.d.ts +2 -3
  41. package/cssm/components/header/base-header/useBaseHeader.js.map +1 -1
  42. package/cssm/components/header/desktop/desktop.module.css +11 -6
  43. package/cssm/components/header/mobile/Component.mobile.d.ts +1 -1
  44. package/cssm/components/header/mobile/mobile.module.css +9 -6
  45. package/cssm/components/header/responsive/Component.responsive.js.map +1 -1
  46. package/cssm/desktop/Component.desktop.js.map +1 -1
  47. package/cssm/desktop/context/index.d.ts +0 -1
  48. package/cssm/desktop/hooks/use-modal-highlighted.js.map +1 -1
  49. package/cssm/desktop/hooks/use-outside-scroll.js.map +1 -1
  50. package/cssm/desktop/hooks/use-set-scrollbar-height.js.map +1 -1
  51. package/cssm/desktop/hooks/useModalWheel.js.map +1 -1
  52. package/cssm/desktop/types/context.d.ts +1 -1
  53. package/cssm/desktop/utils/get-full-size-modal-transitions.js.map +1 -1
  54. package/cssm/desktop/utils/get-height-style.d.ts +1 -1
  55. package/cssm/desktop/utils/get-height-style.js +1 -1
  56. package/cssm/desktop/utils/get-height-style.js.map +1 -1
  57. package/cssm/desktop/utils/get-margin-styles.js.map +1 -1
  58. package/cssm/desktop/utils/get-max-height-style.d.ts +1 -1
  59. package/cssm/desktop/utils/get-width-style.d.ts +1 -1
  60. package/cssm/desktop/utils/get-width-style.js +1 -1
  61. package/cssm/desktop/utils/get-width-style.js.map +1 -1
  62. package/cssm/desktop/utils/set-footer-and-header-refs.js +11 -2
  63. package/cssm/desktop/utils/set-footer-and-header-refs.js.map +1 -1
  64. package/cssm/typings/margin-type.d.ts +1 -1
  65. package/desktop/Component.desktop.js.map +1 -1
  66. package/desktop/components/center-modal/index.css +521 -521
  67. package/desktop/components/center-modal/index.module.css.js +1 -1
  68. package/desktop/components/center-modal/transitions/safari-transitions.css +7 -7
  69. package/desktop/components/center-modal/transitions/safari-transitions.module.css.js +1 -1
  70. package/desktop/components/center-modal/transitions/transitions.css +7 -7
  71. package/desktop/components/center-modal/transitions/transitions.module.css.js +1 -1
  72. package/desktop/components/modal-content/modal-content.css +4 -4
  73. package/desktop/components/modal-content/modal-content.module.css.js +1 -1
  74. package/desktop/components/modal-content/modal-content.module.css.js.map +1 -1
  75. package/desktop/components/side-modal/index.css +523 -523
  76. package/desktop/components/side-modal/index.module.css.js +1 -1
  77. package/desktop/components/side-modal/transitions/transitions.css +71 -71
  78. package/desktop/components/side-modal/transitions/transitions.module.css.js +1 -1
  79. package/desktop/context/index.d.ts +0 -1
  80. package/desktop/hooks/use-modal-highlighted.js.map +1 -1
  81. package/desktop/hooks/use-outside-scroll.js.map +1 -1
  82. package/desktop/hooks/use-set-scrollbar-height.js.map +1 -1
  83. package/desktop/hooks/useModalWheel.js.map +1 -1
  84. package/desktop/styles/transitions/full-size-backdrop-transitions.css +13 -13
  85. package/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js +1 -1
  86. package/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js.map +1 -1
  87. package/desktop/styles/transitions/full-size-vertical-bottom-transitions.css +7 -7
  88. package/desktop/styles/transitions/full-size-vertical-bottom-transitions.module.css.js +1 -1
  89. package/desktop/styles/transitions/full-size-vertical-center-transitions.css +7 -7
  90. package/desktop/styles/transitions/full-size-vertical-center-transitions.module.css.js +1 -1
  91. package/desktop/styles/transitions/full-size-vertical-top-transitions.css +7 -7
  92. package/desktop/styles/transitions/full-size-vertical-top-transitions.module.css.js +1 -1
  93. package/desktop/types/context.d.ts +1 -1
  94. package/desktop/utils/get-full-size-modal-transitions.js.map +1 -1
  95. package/desktop/utils/get-height-style.d.ts +1 -1
  96. package/desktop/utils/get-height-style.js +1 -1
  97. package/desktop/utils/get-height-style.js.map +1 -1
  98. package/desktop/utils/get-margin-styles.js.map +1 -1
  99. package/desktop/utils/get-max-height-style.d.ts +1 -1
  100. package/desktop/utils/get-width-style.d.ts +1 -1
  101. package/desktop/utils/get-width-style.js +1 -1
  102. package/desktop/utils/get-width-style.js.map +1 -1
  103. package/desktop/utils/set-footer-and-header-refs.js +11 -2
  104. package/desktop/utils/set-footer-and-header-refs.js.map +1 -1
  105. package/esm/Context.d.ts +0 -1
  106. package/esm/components/content/base-content/index.css +1 -1
  107. package/esm/components/content/base-content/index.module.css.js +1 -1
  108. package/esm/components/content/desktop/desktop.css +2 -2
  109. package/esm/components/content/desktop/desktop.module.css.js +1 -1
  110. package/esm/components/content/mobile/Component.mobile.d.ts +1 -1
  111. package/esm/components/content/mobile/mobile.css +3 -3
  112. package/esm/components/content/mobile/mobile.module.css.js +1 -1
  113. package/esm/components/content/responsive/Component.responsive.js.map +1 -1
  114. package/esm/components/footer/base-footer/index.css +3 -3
  115. package/esm/components/footer/base-footer/index.module.css.js +1 -1
  116. package/esm/components/footer/base-footer/index.module.css.js.map +1 -1
  117. package/esm/components/footer/desktop/desktop.css +1 -1
  118. package/esm/components/footer/desktop/desktop.module.css.js +1 -1
  119. package/esm/components/footer/desktop/layout.css +9 -9
  120. package/esm/components/footer/desktop/layout.module.css.js +1 -1
  121. package/esm/components/footer/mobile/Component.mobile.d.ts +1 -1
  122. package/esm/components/footer/mobile/layout.mobile.css +8 -8
  123. package/esm/components/footer/mobile/layout.mobile.module.css.js +1 -1
  124. package/esm/components/footer/mobile/mobile.css +2 -2
  125. package/esm/components/footer/mobile/mobile.module.css.js +1 -1
  126. package/esm/components/footer/responsive/Component.responsive.js.map +1 -1
  127. package/esm/components/header/base-header/index.css +4 -4
  128. package/esm/components/header/base-header/index.module.css.js +1 -1
  129. package/esm/components/header/base-header/index.module.css.js.map +1 -1
  130. package/esm/components/header/base-header/useBaseHeader.d.ts +2 -3
  131. package/esm/components/header/base-header/useBaseHeader.js.map +1 -1
  132. package/esm/components/header/desktop/desktop.css +16 -11
  133. package/esm/components/header/desktop/desktop.module.css.js +1 -1
  134. package/esm/components/header/mobile/Component.mobile.d.ts +1 -1
  135. package/esm/components/header/mobile/mobile.css +12 -9
  136. package/esm/components/header/mobile/mobile.module.css.js +1 -1
  137. package/esm/components/header/mobile/mobile.module.css.js.map +1 -1
  138. package/esm/components/header/responsive/Component.responsive.js.map +1 -1
  139. package/esm/desktop/Component.desktop.js.map +1 -1
  140. package/esm/desktop/components/center-modal/index.css +521 -521
  141. package/esm/desktop/components/center-modal/index.module.css.js +1 -1
  142. package/esm/desktop/components/center-modal/transitions/safari-transitions.css +7 -7
  143. package/esm/desktop/components/center-modal/transitions/safari-transitions.module.css.js +1 -1
  144. package/esm/desktop/components/center-modal/transitions/transitions.css +7 -7
  145. package/esm/desktop/components/center-modal/transitions/transitions.module.css.js +1 -1
  146. package/esm/desktop/components/modal-content/modal-content.css +4 -4
  147. package/esm/desktop/components/modal-content/modal-content.module.css.js +1 -1
  148. package/esm/desktop/components/modal-content/modal-content.module.css.js.map +1 -1
  149. package/esm/desktop/components/side-modal/index.css +523 -523
  150. package/esm/desktop/components/side-modal/index.module.css.js +1 -1
  151. package/esm/desktop/components/side-modal/transitions/transitions.css +71 -71
  152. package/esm/desktop/components/side-modal/transitions/transitions.module.css.js +1 -1
  153. package/esm/desktop/context/index.d.ts +0 -1
  154. package/esm/desktop/hooks/use-modal-highlighted.js.map +1 -1
  155. package/esm/desktop/hooks/use-outside-scroll.js.map +1 -1
  156. package/esm/desktop/hooks/use-set-scrollbar-height.js.map +1 -1
  157. package/esm/desktop/hooks/useModalWheel.js.map +1 -1
  158. package/esm/desktop/styles/transitions/full-size-backdrop-transitions.css +13 -13
  159. package/esm/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js +1 -1
  160. package/esm/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js.map +1 -1
  161. package/esm/desktop/styles/transitions/full-size-vertical-bottom-transitions.css +7 -7
  162. package/esm/desktop/styles/transitions/full-size-vertical-bottom-transitions.module.css.js +1 -1
  163. package/esm/desktop/styles/transitions/full-size-vertical-center-transitions.css +7 -7
  164. package/esm/desktop/styles/transitions/full-size-vertical-center-transitions.module.css.js +1 -1
  165. package/esm/desktop/styles/transitions/full-size-vertical-top-transitions.css +7 -7
  166. package/esm/desktop/styles/transitions/full-size-vertical-top-transitions.module.css.js +1 -1
  167. package/esm/desktop/types/context.d.ts +1 -1
  168. package/esm/desktop/utils/get-full-size-modal-transitions.js.map +1 -1
  169. package/esm/desktop/utils/get-height-style.d.ts +1 -1
  170. package/esm/desktop/utils/get-height-style.js +1 -1
  171. package/esm/desktop/utils/get-height-style.js.map +1 -1
  172. package/esm/desktop/utils/get-margin-styles.js.map +1 -1
  173. package/esm/desktop/utils/get-max-height-style.d.ts +1 -1
  174. package/esm/desktop/utils/get-width-style.d.ts +1 -1
  175. package/esm/desktop/utils/get-width-style.js +1 -1
  176. package/esm/desktop/utils/get-width-style.js.map +1 -1
  177. package/esm/desktop/utils/set-footer-and-header-refs.js +11 -2
  178. package/esm/desktop/utils/set-footer-and-header-refs.js.map +1 -1
  179. package/esm/mobile/mobile.css +3 -3
  180. package/esm/mobile/mobile.module.css.js +1 -1
  181. package/esm/mobile/mobile.module.css.js.map +1 -1
  182. package/esm/mobile/transitions/right-side-transitions.mobile.css +7 -7
  183. package/esm/mobile/transitions/right-side-transitions.mobile.module.css.js +1 -1
  184. package/esm/mobile/transitions/right-side-transitions.mobile.module.css.js.map +1 -1
  185. package/esm/mobile/transitions/transitions.mobile.css +7 -7
  186. package/esm/mobile/transitions/transitions.mobile.module.css.js +1 -1
  187. package/esm/typings/margin-type.d.ts +1 -1
  188. package/mobile/mobile.css +3 -3
  189. package/mobile/mobile.module.css.js +1 -1
  190. package/mobile/mobile.module.css.js.map +1 -1
  191. package/mobile/transitions/right-side-transitions.mobile.css +7 -7
  192. package/mobile/transitions/right-side-transitions.mobile.module.css.js +1 -1
  193. package/mobile/transitions/right-side-transitions.mobile.module.css.js.map +1 -1
  194. package/mobile/transitions/transitions.mobile.css +7 -7
  195. package/mobile/transitions/transitions.mobile.module.css.js +1 -1
  196. package/modern/Context.d.ts +0 -1
  197. package/modern/components/content/base-content/index.css +1 -1
  198. package/modern/components/content/base-content/index.module.css.js +1 -1
  199. package/modern/components/content/desktop/desktop.css +2 -2
  200. package/modern/components/content/desktop/desktop.module.css.js +1 -1
  201. package/modern/components/content/mobile/Component.mobile.d.ts +1 -1
  202. package/modern/components/content/mobile/mobile.css +3 -3
  203. package/modern/components/content/mobile/mobile.module.css.js +1 -1
  204. package/modern/components/content/responsive/Component.responsive.js.map +1 -1
  205. package/modern/components/footer/base-footer/index.css +3 -3
  206. package/modern/components/footer/base-footer/index.module.css.js +1 -1
  207. package/modern/components/footer/base-footer/index.module.css.js.map +1 -1
  208. package/modern/components/footer/desktop/desktop.css +1 -1
  209. package/modern/components/footer/desktop/desktop.module.css.js +1 -1
  210. package/modern/components/footer/desktop/layout.css +9 -9
  211. package/modern/components/footer/desktop/layout.module.css.js +1 -1
  212. package/modern/components/footer/mobile/Component.mobile.d.ts +1 -1
  213. package/modern/components/footer/mobile/layout.mobile.css +8 -8
  214. package/modern/components/footer/mobile/layout.mobile.module.css.js +1 -1
  215. package/modern/components/footer/mobile/mobile.css +2 -2
  216. package/modern/components/footer/mobile/mobile.module.css.js +1 -1
  217. package/modern/components/footer/responsive/Component.responsive.js.map +1 -1
  218. package/modern/components/header/base-header/index.css +4 -4
  219. package/modern/components/header/base-header/index.module.css.js +1 -1
  220. package/modern/components/header/base-header/index.module.css.js.map +1 -1
  221. package/modern/components/header/base-header/useBaseHeader.d.ts +2 -3
  222. package/modern/components/header/base-header/useBaseHeader.js.map +1 -1
  223. package/modern/components/header/desktop/desktop.css +16 -11
  224. package/modern/components/header/desktop/desktop.module.css.js +1 -1
  225. package/modern/components/header/mobile/Component.mobile.d.ts +1 -1
  226. package/modern/components/header/mobile/mobile.css +12 -9
  227. package/modern/components/header/mobile/mobile.module.css.js +1 -1
  228. package/modern/components/header/mobile/mobile.module.css.js.map +1 -1
  229. package/modern/components/header/responsive/Component.responsive.js.map +1 -1
  230. package/modern/desktop/Component.desktop.js.map +1 -1
  231. package/modern/desktop/components/center-modal/index.css +521 -521
  232. package/modern/desktop/components/center-modal/index.module.css.js +1 -1
  233. package/modern/desktop/components/center-modal/transitions/safari-transitions.css +7 -7
  234. package/modern/desktop/components/center-modal/transitions/safari-transitions.module.css.js +1 -1
  235. package/modern/desktop/components/center-modal/transitions/transitions.css +7 -7
  236. package/modern/desktop/components/center-modal/transitions/transitions.module.css.js +1 -1
  237. package/modern/desktop/components/modal-content/modal-content.css +4 -4
  238. package/modern/desktop/components/modal-content/modal-content.module.css.js +1 -1
  239. package/modern/desktop/components/modal-content/modal-content.module.css.js.map +1 -1
  240. package/modern/desktop/components/side-modal/index.css +523 -523
  241. package/modern/desktop/components/side-modal/index.module.css.js +1 -1
  242. package/modern/desktop/components/side-modal/transitions/transitions.css +71 -71
  243. package/modern/desktop/components/side-modal/transitions/transitions.module.css.js +1 -1
  244. package/modern/desktop/context/index.d.ts +0 -1
  245. package/modern/desktop/hooks/use-modal-highlighted.js.map +1 -1
  246. package/modern/desktop/hooks/use-outside-scroll.js.map +1 -1
  247. package/modern/desktop/hooks/use-set-scrollbar-height.js.map +1 -1
  248. package/modern/desktop/hooks/useModalWheel.js.map +1 -1
  249. package/modern/desktop/styles/transitions/full-size-backdrop-transitions.css +13 -13
  250. package/modern/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js +1 -1
  251. package/modern/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js.map +1 -1
  252. package/modern/desktop/styles/transitions/full-size-vertical-bottom-transitions.css +7 -7
  253. package/modern/desktop/styles/transitions/full-size-vertical-bottom-transitions.module.css.js +1 -1
  254. package/modern/desktop/styles/transitions/full-size-vertical-center-transitions.css +7 -7
  255. package/modern/desktop/styles/transitions/full-size-vertical-center-transitions.module.css.js +1 -1
  256. package/modern/desktop/styles/transitions/full-size-vertical-top-transitions.css +7 -7
  257. package/modern/desktop/styles/transitions/full-size-vertical-top-transitions.module.css.js +1 -1
  258. package/modern/desktop/types/context.d.ts +1 -1
  259. package/modern/desktop/utils/get-full-size-modal-transitions.js.map +1 -1
  260. package/modern/desktop/utils/get-height-style.d.ts +1 -1
  261. package/modern/desktop/utils/get-height-style.js +1 -1
  262. package/modern/desktop/utils/get-height-style.js.map +1 -1
  263. package/modern/desktop/utils/get-margin-styles.js.map +1 -1
  264. package/modern/desktop/utils/get-max-height-style.d.ts +1 -1
  265. package/modern/desktop/utils/get-width-style.d.ts +1 -1
  266. package/modern/desktop/utils/get-width-style.js +1 -1
  267. package/modern/desktop/utils/get-width-style.js.map +1 -1
  268. package/modern/desktop/utils/set-footer-and-header-refs.js +10 -2
  269. package/modern/desktop/utils/set-footer-and-header-refs.js.map +1 -1
  270. package/modern/mobile/mobile.css +3 -3
  271. package/modern/mobile/mobile.module.css.js +1 -1
  272. package/modern/mobile/mobile.module.css.js.map +1 -1
  273. package/modern/mobile/transitions/right-side-transitions.mobile.css +7 -7
  274. package/modern/mobile/transitions/right-side-transitions.mobile.module.css.js +1 -1
  275. package/modern/mobile/transitions/right-side-transitions.mobile.module.css.js.map +1 -1
  276. package/modern/mobile/transitions/transitions.mobile.css +7 -7
  277. package/modern/mobile/transitions/transitions.mobile.module.css.js +1 -1
  278. package/modern/typings/margin-type.d.ts +1 -1
  279. package/moderncssm/Context.d.ts +0 -1
  280. package/moderncssm/components/content/mobile/Component.mobile.d.ts +1 -1
  281. package/moderncssm/components/content/responsive/Component.responsive.js.map +1 -1
  282. package/moderncssm/components/footer/mobile/Component.mobile.d.ts +1 -1
  283. package/moderncssm/components/footer/responsive/Component.responsive.js.map +1 -1
  284. package/moderncssm/components/header/base-header/useBaseHeader.d.ts +2 -3
  285. package/moderncssm/components/header/base-header/useBaseHeader.js.map +1 -1
  286. package/moderncssm/components/header/desktop/desktop.module.css +8 -4
  287. package/moderncssm/components/header/mobile/Component.mobile.d.ts +1 -1
  288. package/moderncssm/components/header/mobile/mobile.module.css +6 -4
  289. package/moderncssm/components/header/responsive/Component.responsive.js.map +1 -1
  290. package/moderncssm/desktop/Component.desktop.js.map +1 -1
  291. package/moderncssm/desktop/context/index.d.ts +0 -1
  292. package/moderncssm/desktop/hooks/use-modal-highlighted.js.map +1 -1
  293. package/moderncssm/desktop/hooks/use-outside-scroll.js.map +1 -1
  294. package/moderncssm/desktop/hooks/use-set-scrollbar-height.js.map +1 -1
  295. package/moderncssm/desktop/hooks/useModalWheel.js.map +1 -1
  296. package/moderncssm/desktop/types/context.d.ts +1 -1
  297. package/moderncssm/desktop/utils/get-full-size-modal-transitions.js.map +1 -1
  298. package/moderncssm/desktop/utils/get-height-style.d.ts +1 -1
  299. package/moderncssm/desktop/utils/get-height-style.js +1 -1
  300. package/moderncssm/desktop/utils/get-height-style.js.map +1 -1
  301. package/moderncssm/desktop/utils/get-margin-styles.js.map +1 -1
  302. package/moderncssm/desktop/utils/get-max-height-style.d.ts +1 -1
  303. package/moderncssm/desktop/utils/get-width-style.d.ts +1 -1
  304. package/moderncssm/desktop/utils/get-width-style.js +1 -1
  305. package/moderncssm/desktop/utils/get-width-style.js.map +1 -1
  306. package/moderncssm/desktop/utils/set-footer-and-header-refs.js +10 -2
  307. package/moderncssm/desktop/utils/set-footer-and-header-refs.js.map +1 -1
  308. package/moderncssm/typings/margin-type.d.ts +1 -1
  309. package/package.json +9 -9
  310. package/src/components/footer/base-footer/index.module.css +1 -1
  311. package/src/components/header/base-header/index.module.css +1 -1
  312. package/src/components/header/mobile/mobile.module.css +1 -1
  313. package/src/desktop/components/modal-content/modal-content.module.css +1 -1
  314. package/src/desktop/components/side-modal/side-modal.module.css +1 -1
  315. package/src/desktop/styles/transitions/full-size-backdrop-transitions.module.css +1 -1
  316. package/src/desktop/utils/get-height-style.ts +1 -1
  317. package/src/desktop/utils/get-width-style.ts +1 -1
  318. package/src/desktop/utils/set-footer-and-header-refs.ts +13 -5
  319. package/src/mobile/mobile.module.css +1 -1
  320. package/src/mobile/transitions/right-side-transitions.mobile.module.css +1 -1
  321. package/src/vars.css +1 -1
  322. package/typings/margin-type.d.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"useBaseHeader.js","sources":["../../../../src/components/header/base-header/useBaseHeader.ts"],"sourcesContent":["import { useContext, useEffect, useRef } from 'react';\n\nimport { type NavigationBarPrivateProps } from '@alfalab/core-components-navigation-bar-private';\n\nimport { ModalContext } from '../../../Context';\n\ntype Params = Pick<NavigationBarPrivateProps, 'title' | 'children' | 'bottomAddons' | 'onClose'>;\n\nexport const useBaseHeader = (params: Params) => {\n const { title, children, bottomAddons, onClose } = params;\n\n const {\n componentRef,\n headerHighlighted,\n onClose: handleCloseByContext,\n setHasHeader,\n } = useContext(ModalContext);\n\n const titleRef = useRef<HTMLDivElement>(null);\n\n const hasContent = Boolean(title || children || bottomAddons);\n\n const handleClose: NavigationBarPrivateProps['onClose'] = (...args) => {\n if (onClose) {\n return onClose(...args);\n }\n\n return handleCloseByContext(...args);\n };\n\n useEffect(() => {\n setHasHeader(true);\n\n return () => {\n setHasHeader(false);\n };\n }, [setHasHeader]);\n\n return { headerHighlighted, hasContent, componentRef, titleRef, handleClose };\n};\n"],"names":[],"mappings":";;;AAQa,MAAA,aAAa,GAAG,CAAC,MAAc,KAAI;IAC5C,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,MAAM;AAEzD,IAAA,MAAM,EACF,YAAY,EACZ,iBAAiB,EACjB,OAAO,EAAE,oBAAoB,EAC7B,YAAY,GACf,GAAG,UAAU,CAAC,YAAY,CAAC;AAE5B,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAiB,IAAI,CAAC;IAE7C,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,IAAI,QAAQ,IAAI,YAAY,CAAC;AAE7D,IAAA,MAAM,WAAW,GAAyC,CAAC,GAAG,IAAI,KAAI;AAClE,QAAA,IAAI,OAAO,EAAE;AACT,YAAA,OAAO,OAAO,CAAC,GAAG,IAAI,CAAC;AAC1B;AAED,QAAA,OAAO,oBAAoB,CAAC,GAAG,IAAI,CAAC;AACxC,KAAC;IAED,SAAS,CAAC,MAAK;QACX,YAAY,CAAC,IAAI,CAAC;AAElB,QAAA,OAAO,MAAK;YACR,YAAY,CAAC,KAAK,CAAC;AACvB,SAAC;AACL,KAAC,EAAE,CAAC,YAAY,CAAC,CAAC;IAElB,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE;AACjF;;;;"}
1
+ {"version":3,"file":"useBaseHeader.js","sources":["../../../../src/components/header/base-header/useBaseHeader.ts"],"sourcesContent":["import { useContext, useEffect, useRef } from 'react';\n\nimport { type NavigationBarPrivateProps } from '@alfalab/core-components-navigation-bar-private';\n\nimport { ModalContext } from '../../../Context';\n\ntype Params = Pick<NavigationBarPrivateProps, 'title' | 'children' | 'bottomAddons' | 'onClose'>;\n\nexport const useBaseHeader = (params: Params) => {\n const { title, children, bottomAddons, onClose } = params;\n\n const {\n componentRef,\n headerHighlighted,\n onClose: handleCloseByContext,\n setHasHeader,\n } = useContext(ModalContext);\n\n const titleRef = useRef<HTMLDivElement>(null);\n\n const hasContent = Boolean(title || children || bottomAddons);\n\n const handleClose: NavigationBarPrivateProps['onClose'] = (...args) => {\n if (onClose) {\n return onClose(...args);\n }\n\n return handleCloseByContext(...args);\n };\n\n useEffect(() => {\n setHasHeader(true);\n\n return () => {\n setHasHeader(false);\n };\n }, [setHasHeader]);\n\n return { headerHighlighted, hasContent, componentRef, titleRef, handleClose };\n};\n"],"names":[],"mappings":";;;AAQa,MAAA,aAAa,GAAG,CAAC,MAAc,KAAI;IAC5C,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,MAAM;AAEzD,IAAA,MAAM,EACF,YAAY,EACZ,iBAAiB,EACjB,OAAO,EAAE,oBAAoB,EAC7B,YAAY,GACf,GAAG,UAAU,CAAC,YAAY,CAAC;AAE5B,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAiB,IAAI,CAAC;IAE7C,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,IAAI,QAAQ,IAAI,YAAY,CAAC;AAE7D,IAAA,MAAM,WAAW,GAAyC,CAAC,GAAG,IAAI,KAAI;QAClE,IAAI,OAAO,EAAE;AACT,YAAA,OAAO,OAAO,CAAC,GAAG,IAAI,CAAC;;AAG3B,QAAA,OAAO,oBAAoB,CAAC,GAAG,IAAI,CAAC;AACxC,KAAC;IAED,SAAS,CAAC,MAAK;QACX,YAAY,CAAC,IAAI,CAAC;AAElB,QAAA,OAAO,MAAK;YACR,YAAY,CAAC,KAAK,CAAC;AACvB,SAAC;AACL,KAAC,EAAE,CAAC,YAAY,CAAC,CAAC;IAElB,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE;AACjF;;;;"}
@@ -8,7 +8,8 @@
8
8
  font-size: 22px;
9
9
  line-height: 26px;
10
10
  font-weight: 700;
11
- font-family: var(--font-family-system);
11
+ letter-spacing: 0.2px;
12
+ font-family: var(--font-family-alfasans);
12
13
  padding: 11px var(--gap-12);
13
14
  }
14
15
 
@@ -16,7 +17,8 @@
16
17
  font-size: 22px;
17
18
  line-height: 26px;
18
19
  font-weight: 700;
19
- font-family: var(--font-family-system);
20
+ letter-spacing: 0.2px;
21
+ font-family: var(--font-family-alfasans);
20
22
  padding: var(--gap-6) var(--gap-12) var(--gap-16);
21
23
  }
22
24
 
@@ -24,7 +26,8 @@
24
26
  font-size: 30px;
25
27
  line-height: 36px;
26
28
  font-weight: 700;
27
- font-family: var(--font-family-system);
29
+ letter-spacing: 0.1px;
30
+ font-family: var(--font-family-alfasans);
28
31
  padding: var(--gap-6) var(--gap-12) var(--gap-16);
29
32
  }
30
33
 
@@ -32,5 +35,6 @@
32
35
  font-size: 30px;
33
36
  line-height: 36px;
34
37
  font-weight: 700;
35
- font-family: var(--font-family-system);
38
+ letter-spacing: 0.1px;
39
+ font-family: var(--font-family-alfasans);
36
40
  }
@@ -1,4 +1,4 @@
1
1
  import { type FC } from 'react';
2
2
  import { type NavigationBarPrivateProps } from '@alfalab/core-components-navigation-bar-private/moderncssm';
3
- export declare type HeaderMobileProps = Omit<NavigationBarPrivateProps, 'size' | 'view' | 'parentRef'>;
3
+ export type HeaderMobileProps = Omit<NavigationBarPrivateProps, 'size' | 'view' | 'parentRef'>;
4
4
  export declare const HeaderMobile: FC<HeaderMobileProps>;
@@ -7,8 +7,9 @@
7
7
  .content {
8
8
  font-size: 20px;
9
9
  line-height: 28px;
10
- font-weight: 600;
11
- font-family: var(--font-family-system);
10
+ font-weight: 500;
11
+ letter-spacing: -0.15px;
12
+ font-family: var(--font-family-alfasans);
12
13
  padding: 0 var(--gap-12);
13
14
  min-height: 40px;
14
15
  justify-content: center;
@@ -17,7 +18,8 @@
17
18
  .bottomAddons {
18
19
  font-size: 20px;
19
20
  line-height: 28px;
20
- font-weight: 600;
21
- font-family: var(--font-family-system);
21
+ font-weight: 500;
22
+ letter-spacing: -0.15px;
23
+ font-family: var(--font-family-alfasans);
22
24
  padding: var(--gap-6) var(--gap-16);
23
25
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Component.responsive.js","sources":["../../../../src/components/header/responsive/Component.responsive.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { useIsDesktop } from '@alfalab/core-components-mq';\n\nimport { HeaderDesktop, type HeaderDesktopProps } from '../desktop/Component.desktop';\nimport { HeaderMobile, type HeaderMobileProps } from '../mobile/Component.mobile';\n\nexport interface HeaderResponsiveProps extends HeaderDesktopProps, HeaderMobileProps {}\n\nexport const HeaderResponsive = forwardRef<HTMLDivElement, HeaderResponsiveProps>((props, ref) => {\n const isDesktop = useIsDesktop();\n\n if (isDesktop) {\n return <HeaderDesktop ref={ref} {...props} />;\n }\n\n return <HeaderMobile {...props} />;\n});\n\nHeaderResponsive.displayName = 'HeaderResponsive';\n"],"names":[],"mappings":";;;;;AASa,MAAA,gBAAgB,GAAG,UAAU,CAAwC,CAAC,KAAK,EAAE,GAAG,KAAI;AAC7F,IAAA,MAAM,SAAS,GAAG,YAAY,EAAE;AAEhC,IAAA,IAAI,SAAS,EAAE;QACX,OAAO,KAAA,CAAA,aAAA,CAAC,aAAa,EAAC,EAAA,GAAG,EAAE,GAAG,EAAA,GAAM,KAAK,EAAA,CAAI;AAChD;AAED,IAAA,OAAO,KAAC,CAAA,aAAA,CAAA,YAAY,EAAK,EAAA,GAAA,KAAK,GAAI;AACtC,CAAC;AAED,gBAAgB,CAAC,WAAW,GAAG,kBAAkB;;;;"}
1
+ {"version":3,"file":"Component.responsive.js","sources":["../../../../src/components/header/responsive/Component.responsive.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { useIsDesktop } from '@alfalab/core-components-mq';\n\nimport { HeaderDesktop, type HeaderDesktopProps } from '../desktop/Component.desktop';\nimport { HeaderMobile, type HeaderMobileProps } from '../mobile/Component.mobile';\n\nexport interface HeaderResponsiveProps extends HeaderDesktopProps, HeaderMobileProps {}\n\nexport const HeaderResponsive = forwardRef<HTMLDivElement, HeaderResponsiveProps>((props, ref) => {\n const isDesktop = useIsDesktop();\n\n if (isDesktop) {\n return <HeaderDesktop ref={ref} {...props} />;\n }\n\n return <HeaderMobile {...props} />;\n});\n\nHeaderResponsive.displayName = 'HeaderResponsive';\n"],"names":[],"mappings":";;;;;AASa,MAAA,gBAAgB,GAAG,UAAU,CAAwC,CAAC,KAAK,EAAE,GAAG,KAAI;AAC7F,IAAA,MAAM,SAAS,GAAG,YAAY,EAAE;IAEhC,IAAI,SAAS,EAAE;QACX,OAAO,KAAA,CAAA,aAAA,CAAC,aAAa,EAAC,EAAA,GAAG,EAAE,GAAG,EAAA,GAAM,KAAK,EAAA,CAAI;;AAGjD,IAAA,OAAO,KAAC,CAAA,aAAA,CAAA,YAAY,EAAK,EAAA,GAAA,KAAK,GAAI;AACtC,CAAC;AAED,gBAAgB,CAAC,WAAW,GAAG,kBAAkB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Component.desktop.js","sources":["../../src/desktop/Component.desktop.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\n\nimport { ContentDesktop } from '../components/content';\nimport { FooterDesktop } from '../components/footer';\nimport { HeaderDesktop } from '../components/header';\n\nimport { CenterModal } from './components/center-modal';\nimport { SideModal } from './components/side-modal';\nimport { type UniversalModalContextType } from './types/context';\nimport { type UniversalModalDesktopProps } from './types/props';\nimport { UniversalModalContext } from './context';\n\nexport const UniversalModalDesktopComponent = forwardRef<\n HTMLDivElement,\n UniversalModalDesktopProps\n>((props, ref) => {\n const { children, horizontalAlign = 'center', ...restProps } = props;\n const { width = 500 } = restProps;\n\n const contextValue = useMemo<UniversalModalContextType>(\n () => ({\n width,\n }),\n [width],\n );\n\n const renderModal = () => {\n if (horizontalAlign === 'center') {\n return (\n <CenterModal {...restProps} ref={ref} horizontalAlign={horizontalAlign}>\n {children}\n </CenterModal>\n );\n }\n\n return (\n <SideModal {...restProps} ref={ref} horizontalAlign={horizontalAlign}>\n {children}\n </SideModal>\n );\n };\n\n return (\n <UniversalModalContext.Provider value={contextValue}>\n {renderModal()}\n </UniversalModalContext.Provider>\n );\n});\n\nexport const UniversalModalDesktop = Object.assign(UniversalModalDesktopComponent, {\n Header: HeaderDesktop,\n Content: ContentDesktop,\n Footer: FooterDesktop,\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAYa,MAAA,8BAA8B,GAAG,UAAU,CAGtD,CAAC,KAAK,EAAE,GAAG,KAAI;AACb,IAAA,MAAM,EAAE,QAAQ,EAAE,eAAe,GAAG,QAAQ,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK;AACpE,IAAA,MAAM,EAAE,KAAK,GAAG,GAAG,EAAE,GAAG,SAAS;AAEjC,IAAA,MAAM,YAAY,GAAG,OAAO,CACxB,OAAO;QACH,KAAK;AACR,KAAA,CAAC,EACF,CAAC,KAAK,CAAC,CACV;IAED,MAAM,WAAW,GAAG,MAAK;QACrB,IAAI,eAAe,KAAK,QAAQ,EAAE;AAC9B,YAAA,QACI,KAAC,CAAA,aAAA,CAAA,WAAW,EAAK,EAAA,GAAA,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,eAAe,EAAE,eAAe,IACjE,QAAQ,CACC;AAErB;AAED,QAAA,QACI,KAAC,CAAA,aAAA,CAAA,SAAS,EAAK,EAAA,GAAA,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,eAAe,EAAE,eAAe,IAC/D,QAAQ,CACD;AAEpB,KAAC;AAED,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,qBAAqB,CAAC,QAAQ,EAAC,EAAA,KAAK,EAAE,YAAY,EAC9C,EAAA,WAAW,EAAE,CACe;AAEzC,CAAC;MAEY,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,8BAA8B,EAAE;AAC/E,IAAA,MAAM,EAAE,aAAa;AACrB,IAAA,OAAO,EAAE,cAAc;AACvB,IAAA,MAAM,EAAE,aAAa;AACxB,CAAA;;;;"}
1
+ {"version":3,"file":"Component.desktop.js","sources":["../../src/desktop/Component.desktop.tsx"],"sourcesContent":["import React, { forwardRef, useMemo } from 'react';\n\nimport { ContentDesktop } from '../components/content';\nimport { FooterDesktop } from '../components/footer';\nimport { HeaderDesktop } from '../components/header';\n\nimport { CenterModal } from './components/center-modal';\nimport { SideModal } from './components/side-modal';\nimport { type UniversalModalContextType } from './types/context';\nimport { type UniversalModalDesktopProps } from './types/props';\nimport { UniversalModalContext } from './context';\n\nexport const UniversalModalDesktopComponent = forwardRef<\n HTMLDivElement,\n UniversalModalDesktopProps\n>((props, ref) => {\n const { children, horizontalAlign = 'center', ...restProps } = props;\n const { width = 500 } = restProps;\n\n const contextValue = useMemo<UniversalModalContextType>(\n () => ({\n width,\n }),\n [width],\n );\n\n const renderModal = () => {\n if (horizontalAlign === 'center') {\n return (\n <CenterModal {...restProps} ref={ref} horizontalAlign={horizontalAlign}>\n {children}\n </CenterModal>\n );\n }\n\n return (\n <SideModal {...restProps} ref={ref} horizontalAlign={horizontalAlign}>\n {children}\n </SideModal>\n );\n };\n\n return (\n <UniversalModalContext.Provider value={contextValue}>\n {renderModal()}\n </UniversalModalContext.Provider>\n );\n});\n\nexport const UniversalModalDesktop = Object.assign(UniversalModalDesktopComponent, {\n Header: HeaderDesktop,\n Content: ContentDesktop,\n Footer: FooterDesktop,\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAYa,MAAA,8BAA8B,GAAG,UAAU,CAGtD,CAAC,KAAK,EAAE,GAAG,KAAI;AACb,IAAA,MAAM,EAAE,QAAQ,EAAE,eAAe,GAAG,QAAQ,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK;AACpE,IAAA,MAAM,EAAE,KAAK,GAAG,GAAG,EAAE,GAAG,SAAS;AAEjC,IAAA,MAAM,YAAY,GAAG,OAAO,CACxB,OAAO;QACH,KAAK;AACR,KAAA,CAAC,EACF,CAAC,KAAK,CAAC,CACV;IAED,MAAM,WAAW,GAAG,MAAK;AACrB,QAAA,IAAI,eAAe,KAAK,QAAQ,EAAE;AAC9B,YAAA,QACI,KAAC,CAAA,aAAA,CAAA,WAAW,EAAK,EAAA,GAAA,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,eAAe,EAAE,eAAe,IACjE,QAAQ,CACC;;AAItB,QAAA,QACI,KAAC,CAAA,aAAA,CAAA,SAAS,EAAK,EAAA,GAAA,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,eAAe,EAAE,eAAe,IAC/D,QAAQ,CACD;AAEpB,KAAC;AAED,IAAA,QACI,KAAA,CAAA,aAAA,CAAC,qBAAqB,CAAC,QAAQ,EAAC,EAAA,KAAK,EAAE,YAAY,EAC9C,EAAA,WAAW,EAAE,CACe;AAEzC,CAAC;MAEY,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,8BAA8B,EAAE;AAC/E,IAAA,MAAM,EAAE,aAAa;AACrB,IAAA,OAAO,EAAE,cAAc;AACvB,IAAA,MAAM,EAAE,aAAa;AACxB,CAAA;;;;"}
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const UniversalModalContext: import("react").Context<Required<Pick<import("..").UniversalModalDesktopProps, "width">>>;
@@ -1 +1 @@
1
- {"version":3,"file":"use-modal-highlighted.js","sources":["../../../src/desktop/hooks/use-modal-highlighted.ts"],"sourcesContent":["import { type RefObject, useContext, useEffect } from 'react';\n\nimport { type ScrollbarProps } from '@alfalab/core-components-scrollbar';\n\nimport { ModalContext } from '../../Context';\n\ninterface Params {\n scrollbarContentNodeRef: RefObject<HTMLDivElement>;\n scrollableNodeRef: RefObject<HTMLDivElement>;\n}\n\n/**\n * Расчет overlap состояния\n * Этот функционал есть в base-modal, но так как в desktop версии используется кастомный scroll необходимо обрабатывать это в ручную\n */\nexport const useModalHighlighted = (params: Params) => {\n const { scrollbarContentNodeRef, scrollableNodeRef } = params;\n\n const {\n setHeaderHighlighted: setModalHeaderHighlighted,\n setFooterHighlighted: setModalFooterHighlighted,\n } = useContext(ModalContext);\n\n const handleScroll: ScrollbarProps['onContentScroll'] = (e) => {\n const target = e.target as HTMLDivElement;\n const { scrollTop, scrollHeight, clientHeight } = target;\n\n const isElementFullScrolled = scrollHeight - scrollTop === clientHeight;\n\n if (setModalHeaderHighlighted) {\n setModalHeaderHighlighted(scrollTop > 0);\n }\n\n if (setModalFooterHighlighted) {\n setModalFooterHighlighted(!isElementFullScrolled);\n }\n };\n\n // Очищаем overlap значения в контексте\n useEffect(\n () => () => {\n if (setModalHeaderHighlighted) {\n setModalHeaderHighlighted(false);\n }\n\n if (setModalFooterHighlighted) {\n setModalFooterHighlighted(false);\n }\n },\n [setModalHeaderHighlighted, setModalFooterHighlighted],\n );\n\n // Расчет overlap футера при resize событии\n useEffect(() => {\n const resizeObserver = new ResizeObserver(() => {\n const contentHeight = scrollbarContentNodeRef.current?.clientHeight || 0;\n const wrapperHeight = scrollableNodeRef.current?.clientHeight || 0;\n\n if (setModalFooterHighlighted) {\n setModalFooterHighlighted(contentHeight > wrapperHeight);\n }\n });\n\n if (scrollbarContentNodeRef.current) {\n resizeObserver.observe(scrollbarContentNodeRef.current);\n }\n\n return () => {\n resizeObserver.disconnect();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [setModalFooterHighlighted]);\n\n return { handleScroll };\n};\n"],"names":[],"mappings":";;;AAWA;;;AAGG;AACU,MAAA,mBAAmB,GAAG,CAAC,MAAc,KAAI;AAClD,IAAA,MAAM,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,GAAG,MAAM;AAE7D,IAAA,MAAM,EACF,oBAAoB,EAAE,yBAAyB,EAC/C,oBAAoB,EAAE,yBAAyB,GAClD,GAAG,UAAU,CAAC,YAAY,CAAC;AAE5B,IAAA,MAAM,YAAY,GAAsC,CAAC,CAAC,KAAI;AAC1D,QAAA,MAAM,MAAM,GAAG,CAAC,CAAC,MAAwB;QACzC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,GAAG,MAAM;AAExD,QAAA,MAAM,qBAAqB,GAAG,YAAY,GAAG,SAAS,KAAK,YAAY;AAEvE,QAAA,IAAI,yBAAyB,EAAE;AAC3B,YAAA,yBAAyB,CAAC,SAAS,GAAG,CAAC,CAAC;AAC3C;AAED,QAAA,IAAI,yBAAyB,EAAE;AAC3B,YAAA,yBAAyB,CAAC,CAAC,qBAAqB,CAAC;AACpD;AACL,KAAC;;AAGD,IAAA,SAAS,CACL,MAAM,MAAK;AACP,QAAA,IAAI,yBAAyB,EAAE;YAC3B,yBAAyB,CAAC,KAAK,CAAC;AACnC;AAED,QAAA,IAAI,yBAAyB,EAAE;YAC3B,yBAAyB,CAAC,KAAK,CAAC;AACnC;AACL,KAAC,EACD,CAAC,yBAAyB,EAAE,yBAAyB,CAAC,CACzD;;IAGD,SAAS,CAAC,MAAK;AACX,QAAA,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,MAAK;YAC3C,MAAM,aAAa,GAAG,uBAAuB,CAAC,OAAO,EAAE,YAAY,IAAI,CAAC;YACxE,MAAM,aAAa,GAAG,iBAAiB,CAAC,OAAO,EAAE,YAAY,IAAI,CAAC;AAElE,YAAA,IAAI,yBAAyB,EAAE;AAC3B,gBAAA,yBAAyB,CAAC,aAAa,GAAG,aAAa,CAAC;AAC3D;AACL,SAAC,CAAC;QAEF,IAAI,uBAAuB,CAAC,OAAO,EAAE;AACjC,YAAA,cAAc,CAAC,OAAO,CAAC,uBAAuB,CAAC,OAAO,CAAC;AAC1D;AAED,QAAA,OAAO,MAAK;YACR,cAAc,CAAC,UAAU,EAAE;AAC/B,SAAC;;AAEL,KAAC,EAAE,CAAC,yBAAyB,CAAC,CAAC;IAE/B,OAAO,EAAE,YAAY,EAAE;AAC3B;;;;"}
1
+ {"version":3,"file":"use-modal-highlighted.js","sources":["../../../src/desktop/hooks/use-modal-highlighted.ts"],"sourcesContent":["import { type RefObject, useContext, useEffect } from 'react';\n\nimport { type ScrollbarProps } from '@alfalab/core-components-scrollbar';\n\nimport { ModalContext } from '../../Context';\n\ninterface Params {\n scrollbarContentNodeRef: RefObject<HTMLDivElement>;\n scrollableNodeRef: RefObject<HTMLDivElement>;\n}\n\n/**\n * Расчет overlap состояния\n * Этот функционал есть в base-modal, но так как в desktop версии используется кастомный scroll необходимо обрабатывать это в ручную\n */\nexport const useModalHighlighted = (params: Params) => {\n const { scrollbarContentNodeRef, scrollableNodeRef } = params;\n\n const {\n setHeaderHighlighted: setModalHeaderHighlighted,\n setFooterHighlighted: setModalFooterHighlighted,\n } = useContext(ModalContext);\n\n const handleScroll: ScrollbarProps['onContentScroll'] = (e) => {\n const target = e.target as HTMLDivElement;\n const { scrollTop, scrollHeight, clientHeight } = target;\n\n const isElementFullScrolled = scrollHeight - scrollTop === clientHeight;\n\n if (setModalHeaderHighlighted) {\n setModalHeaderHighlighted(scrollTop > 0);\n }\n\n if (setModalFooterHighlighted) {\n setModalFooterHighlighted(!isElementFullScrolled);\n }\n };\n\n // Очищаем overlap значения в контексте\n useEffect(\n () => () => {\n if (setModalHeaderHighlighted) {\n setModalHeaderHighlighted(false);\n }\n\n if (setModalFooterHighlighted) {\n setModalFooterHighlighted(false);\n }\n },\n [setModalHeaderHighlighted, setModalFooterHighlighted],\n );\n\n // Расчет overlap футера при resize событии\n useEffect(() => {\n const resizeObserver = new ResizeObserver(() => {\n const contentHeight = scrollbarContentNodeRef.current?.clientHeight || 0;\n const wrapperHeight = scrollableNodeRef.current?.clientHeight || 0;\n\n if (setModalFooterHighlighted) {\n setModalFooterHighlighted(contentHeight > wrapperHeight);\n }\n });\n\n if (scrollbarContentNodeRef.current) {\n resizeObserver.observe(scrollbarContentNodeRef.current);\n }\n\n return () => {\n resizeObserver.disconnect();\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [setModalFooterHighlighted]);\n\n return { handleScroll };\n};\n"],"names":[],"mappings":";;;AAWA;;;AAGG;AACU,MAAA,mBAAmB,GAAG,CAAC,MAAc,KAAI;AAClD,IAAA,MAAM,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,GAAG,MAAM;AAE7D,IAAA,MAAM,EACF,oBAAoB,EAAE,yBAAyB,EAC/C,oBAAoB,EAAE,yBAAyB,GAClD,GAAG,UAAU,CAAC,YAAY,CAAC;AAE5B,IAAA,MAAM,YAAY,GAAsC,CAAC,CAAC,KAAI;AAC1D,QAAA,MAAM,MAAM,GAAG,CAAC,CAAC,MAAwB;QACzC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,GAAG,MAAM;AAExD,QAAA,MAAM,qBAAqB,GAAG,YAAY,GAAG,SAAS,KAAK,YAAY;QAEvE,IAAI,yBAAyB,EAAE;AAC3B,YAAA,yBAAyB,CAAC,SAAS,GAAG,CAAC,CAAC;;QAG5C,IAAI,yBAAyB,EAAE;AAC3B,YAAA,yBAAyB,CAAC,CAAC,qBAAqB,CAAC;;AAEzD,KAAC;;AAGD,IAAA,SAAS,CACL,MAAM,MAAK;QACP,IAAI,yBAAyB,EAAE;YAC3B,yBAAyB,CAAC,KAAK,CAAC;;QAGpC,IAAI,yBAAyB,EAAE;YAC3B,yBAAyB,CAAC,KAAK,CAAC;;AAExC,KAAC,EACD,CAAC,yBAAyB,EAAE,yBAAyB,CAAC,CACzD;;IAGD,SAAS,CAAC,MAAK;AACX,QAAA,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,MAAK;YAC3C,MAAM,aAAa,GAAG,uBAAuB,CAAC,OAAO,EAAE,YAAY,IAAI,CAAC;YACxE,MAAM,aAAa,GAAG,iBAAiB,CAAC,OAAO,EAAE,YAAY,IAAI,CAAC;YAElE,IAAI,yBAAyB,EAAE;AAC3B,gBAAA,yBAAyB,CAAC,aAAa,GAAG,aAAa,CAAC;;AAEhE,SAAC,CAAC;AAEF,QAAA,IAAI,uBAAuB,CAAC,OAAO,EAAE;AACjC,YAAA,cAAc,CAAC,OAAO,CAAC,uBAAuB,CAAC,OAAO,CAAC;;AAG3D,QAAA,OAAO,MAAK;YACR,cAAc,CAAC,UAAU,EAAE;AAC/B,SAAC;;AAEL,KAAC,EAAE,CAAC,yBAAyB,CAAC,CAAC;IAE/B,OAAO,EAAE,YAAY,EAAE;AAC3B;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-outside-scroll.js","sources":["../../../src/desktop/hooks/use-outside-scroll.ts"],"sourcesContent":["import { type RefObject, useEffect } from 'react';\n\ninterface Params {\n scrollableNodeRef: RefObject<HTMLDivElement>;\n wheelDeltaY: number;\n}\n\n/** Изменение позиции скролла */\nexport const useOutsideScroll = (params: Params) => {\n const { scrollableNodeRef, wheelDeltaY } = params;\n\n useEffect(() => {\n if (scrollableNodeRef.current) {\n scrollableNodeRef.current.scrollBy({\n top: wheelDeltaY,\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [wheelDeltaY]);\n};\n"],"names":[],"mappings":";;AAOA;AACa,MAAA,gBAAgB,GAAG,CAAC,MAAc,KAAI;AAC/C,IAAA,MAAM,EAAE,iBAAiB,EAAE,WAAW,EAAE,GAAG,MAAM;IAEjD,SAAS,CAAC,MAAK;QACX,IAAI,iBAAiB,CAAC,OAAO,EAAE;AAC3B,YAAA,iBAAiB,CAAC,OAAO,CAAC,QAAQ,CAAC;AAC/B,gBAAA,GAAG,EAAE,WAAW;AACnB,aAAA,CAAC;AACL;;AAEL,KAAC,EAAE,CAAC,WAAW,CAAC,CAAC;AACrB;;;;"}
1
+ {"version":3,"file":"use-outside-scroll.js","sources":["../../../src/desktop/hooks/use-outside-scroll.ts"],"sourcesContent":["import { type RefObject, useEffect } from 'react';\n\ninterface Params {\n scrollableNodeRef: RefObject<HTMLDivElement>;\n wheelDeltaY: number;\n}\n\n/** Изменение позиции скролла */\nexport const useOutsideScroll = (params: Params) => {\n const { scrollableNodeRef, wheelDeltaY } = params;\n\n useEffect(() => {\n if (scrollableNodeRef.current) {\n scrollableNodeRef.current.scrollBy({\n top: wheelDeltaY,\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [wheelDeltaY]);\n};\n"],"names":[],"mappings":";;AAOA;AACa,MAAA,gBAAgB,GAAG,CAAC,MAAc,KAAI;AAC/C,IAAA,MAAM,EAAE,iBAAiB,EAAE,WAAW,EAAE,GAAG,MAAM;IAEjD,SAAS,CAAC,MAAK;AACX,QAAA,IAAI,iBAAiB,CAAC,OAAO,EAAE;AAC3B,YAAA,iBAAiB,CAAC,OAAO,CAAC,QAAQ,CAAC;AAC/B,gBAAA,GAAG,EAAE,WAAW;AACnB,aAAA,CAAC;;;AAGV,KAAC,EAAE,CAAC,WAAW,CAAC,CAAC;AACrB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-set-scrollbar-height.js","sources":["../../../src/desktop/hooks/use-set-scrollbar-height.ts"],"sourcesContent":["import { type RefObject, useEffect } from 'react';\n\nimport { SCROLLBAR_DEFAULT_GAP } from '../constants';\n\ninterface Params {\n scrollbarRef: RefObject<HTMLDivElement>;\n verticalBarRef: RefObject<HTMLDivElement>;\n headerElementRef: RefObject<HTMLDivElement>;\n footerElementRef: RefObject<HTMLDivElement>;\n}\n\n/** Устанавливает размер полосы прокрутки в зависимости от наличия хедера и футера */\nexport const useSetScrollbarHeight = (params: Params) => {\n const { scrollbarRef, verticalBarRef, headerElementRef, footerElementRef } = params;\n\n useEffect(() => {\n if (scrollbarRef.current) {\n const verticalBar = verticalBarRef.current;\n\n if (verticalBar) {\n const headerHeight = headerElementRef?.current?.offsetHeight || 0;\n const footerHeight = footerElementRef?.current?.offsetHeight || 0;\n\n let topGap;\n let topOffset;\n let bottomGap;\n\n if (headerHeight) {\n // если есть header уменьшаем размер скролла на величину хедера и добавляем отступ сверху\n topGap = headerHeight;\n topOffset = headerHeight;\n } else {\n // иначе уменьшаем размер скролла и увеличиваем отступ на величину скругления\n topGap = SCROLLBAR_DEFAULT_GAP;\n topOffset = SCROLLBAR_DEFAULT_GAP;\n }\n\n if (footerHeight) {\n // если есть footer уменьшаем размер скролла на величину футера\n bottomGap = footerHeight;\n } else {\n // иначе уменьшаем размер на величину скругления\n bottomGap = SCROLLBAR_DEFAULT_GAP;\n }\n\n verticalBar.style.height = `calc(100% - ${topGap}px - ${bottomGap}px)`;\n verticalBar.style.top = `${topOffset}px`;\n }\n }\n });\n};\n"],"names":[],"mappings":";;;AAWA;AACa,MAAA,qBAAqB,GAAG,CAAC,MAAc,KAAI;IACpD,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,GAAG,MAAM;IAEnF,SAAS,CAAC,MAAK;QACX,IAAI,YAAY,CAAC,OAAO,EAAE;AACtB,YAAA,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO;AAE1C,YAAA,IAAI,WAAW,EAAE;gBACb,MAAM,YAAY,GAAG,gBAAgB,EAAE,OAAO,EAAE,YAAY,IAAI,CAAC;gBACjE,MAAM,YAAY,GAAG,gBAAgB,EAAE,OAAO,EAAE,YAAY,IAAI,CAAC;AAEjE,gBAAA,IAAI,MAAM;AACV,gBAAA,IAAI,SAAS;AACb,gBAAA,IAAI,SAAS;AAEb,gBAAA,IAAI,YAAY,EAAE;;oBAEd,MAAM,GAAG,YAAY;oBACrB,SAAS,GAAG,YAAY;AAC3B;AAAM,qBAAA;;oBAEH,MAAM,GAAG,qBAAqB;oBAC9B,SAAS,GAAG,qBAAqB;AACpC;AAED,gBAAA,IAAI,YAAY,EAAE;;oBAEd,SAAS,GAAG,YAAY;AAC3B;AAAM,qBAAA;;oBAEH,SAAS,GAAG,qBAAqB;AACpC;gBAED,WAAW,CAAC,KAAK,CAAC,MAAM,GAAG,eAAe,MAAM,CAAA,KAAA,EAAQ,SAAS,CAAA,GAAA,CAAK;gBACtE,WAAW,CAAC,KAAK,CAAC,GAAG,GAAG,CAAG,EAAA,SAAS,IAAI;AAC3C;AACJ;AACL,KAAC,CAAC;AACN;;;;"}
1
+ {"version":3,"file":"use-set-scrollbar-height.js","sources":["../../../src/desktop/hooks/use-set-scrollbar-height.ts"],"sourcesContent":["import { type RefObject, useEffect } from 'react';\n\nimport { SCROLLBAR_DEFAULT_GAP } from '../constants';\n\ninterface Params {\n scrollbarRef: RefObject<HTMLDivElement>;\n verticalBarRef: RefObject<HTMLDivElement>;\n headerElementRef: RefObject<HTMLDivElement>;\n footerElementRef: RefObject<HTMLDivElement>;\n}\n\n/** Устанавливает размер полосы прокрутки в зависимости от наличия хедера и футера */\nexport const useSetScrollbarHeight = (params: Params) => {\n const { scrollbarRef, verticalBarRef, headerElementRef, footerElementRef } = params;\n\n useEffect(() => {\n if (scrollbarRef.current) {\n const verticalBar = verticalBarRef.current;\n\n if (verticalBar) {\n const headerHeight = headerElementRef?.current?.offsetHeight || 0;\n const footerHeight = footerElementRef?.current?.offsetHeight || 0;\n\n let topGap;\n let topOffset;\n let bottomGap;\n\n if (headerHeight) {\n // если есть header уменьшаем размер скролла на величину хедера и добавляем отступ сверху\n topGap = headerHeight;\n topOffset = headerHeight;\n } else {\n // иначе уменьшаем размер скролла и увеличиваем отступ на величину скругления\n topGap = SCROLLBAR_DEFAULT_GAP;\n topOffset = SCROLLBAR_DEFAULT_GAP;\n }\n\n if (footerHeight) {\n // если есть footer уменьшаем размер скролла на величину футера\n bottomGap = footerHeight;\n } else {\n // иначе уменьшаем размер на величину скругления\n bottomGap = SCROLLBAR_DEFAULT_GAP;\n }\n\n verticalBar.style.height = `calc(100% - ${topGap}px - ${bottomGap}px)`;\n verticalBar.style.top = `${topOffset}px`;\n }\n }\n });\n};\n"],"names":[],"mappings":";;;AAWA;AACa,MAAA,qBAAqB,GAAG,CAAC,MAAc,KAAI;IACpD,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,GAAG,MAAM;IAEnF,SAAS,CAAC,MAAK;AACX,QAAA,IAAI,YAAY,CAAC,OAAO,EAAE;AACtB,YAAA,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO;YAE1C,IAAI,WAAW,EAAE;gBACb,MAAM,YAAY,GAAG,gBAAgB,EAAE,OAAO,EAAE,YAAY,IAAI,CAAC;gBACjE,MAAM,YAAY,GAAG,gBAAgB,EAAE,OAAO,EAAE,YAAY,IAAI,CAAC;AAEjE,gBAAA,IAAI,MAAM;AACV,gBAAA,IAAI,SAAS;AACb,gBAAA,IAAI,SAAS;gBAEb,IAAI,YAAY,EAAE;;oBAEd,MAAM,GAAG,YAAY;oBACrB,SAAS,GAAG,YAAY;;qBACrB;;oBAEH,MAAM,GAAG,qBAAqB;oBAC9B,SAAS,GAAG,qBAAqB;;gBAGrC,IAAI,YAAY,EAAE;;oBAEd,SAAS,GAAG,YAAY;;qBACrB;;oBAEH,SAAS,GAAG,qBAAqB;;gBAGrC,WAAW,CAAC,KAAK,CAAC,MAAM,GAAG,eAAe,MAAM,CAAA,KAAA,EAAQ,SAAS,CAAA,GAAA,CAAK;gBACtE,WAAW,CAAC,KAAK,CAAC,GAAG,GAAG,CAAG,EAAA,SAAS,IAAI;;;AAGpD,KAAC,CAAC;AACN;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useModalWheel.js","sources":["../../../src/desktop/hooks/useModalWheel.ts"],"sourcesContent":["import { useState, type WheelEvent } from 'react';\n\nexport const useModalWheel = (overlay: boolean) => {\n const [wheelDeltaY, setWheelDeltaY] = useState<number>(0);\n\n // передаем e.deltaY от события на элементе dialog компонента base-modal\n const handleWheel = (e: WheelEvent<HTMLElement>) => {\n const target = e.target as HTMLDivElement;\n\n if (target.getAttribute('role') === 'dialog' && overlay) {\n setWheelDeltaY(e.deltaY);\n }\n };\n\n return { wheelDeltaY, handleWheel };\n};\n"],"names":[],"mappings":";;AAEa,MAAA,aAAa,GAAG,CAAC,OAAgB,KAAI;IAC9C,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC;;AAGzD,IAAA,MAAM,WAAW,GAAG,CAAC,CAA0B,KAAI;AAC/C,QAAA,MAAM,MAAM,GAAG,CAAC,CAAC,MAAwB;QAEzC,IAAI,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,QAAQ,IAAI,OAAO,EAAE;AACrD,YAAA,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC;AAC3B;AACL,KAAC;AAED,IAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE;AACvC;;;;"}
1
+ {"version":3,"file":"useModalWheel.js","sources":["../../../src/desktop/hooks/useModalWheel.ts"],"sourcesContent":["import { useState, type WheelEvent } from 'react';\n\nexport const useModalWheel = (overlay: boolean) => {\n const [wheelDeltaY, setWheelDeltaY] = useState<number>(0);\n\n // передаем e.deltaY от события на элементе dialog компонента base-modal\n const handleWheel = (e: WheelEvent<HTMLElement>) => {\n const target = e.target as HTMLDivElement;\n\n if (target.getAttribute('role') === 'dialog' && overlay) {\n setWheelDeltaY(e.deltaY);\n }\n };\n\n return { wheelDeltaY, handleWheel };\n};\n"],"names":[],"mappings":";;AAEa,MAAA,aAAa,GAAG,CAAC,OAAgB,KAAI;IAC9C,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC;;AAGzD,IAAA,MAAM,WAAW,GAAG,CAAC,CAA0B,KAAI;AAC/C,QAAA,MAAM,MAAM,GAAG,CAAC,CAAC,MAAwB;QAEzC,IAAI,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,QAAQ,IAAI,OAAO,EAAE;AACrD,YAAA,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC;;AAEhC,KAAC;AAED,IAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE;AACvC;;;;"}
@@ -1,2 +1,2 @@
1
1
  import { type UniversalModalDesktopProps } from './props';
2
- export declare type UniversalModalContextType = Required<Pick<UniversalModalDesktopProps, 'width'>>;
2
+ export type UniversalModalContextType = Required<Pick<UniversalModalDesktopProps, 'width'>>;
@@ -1 +1 @@
1
- {"version":3,"file":"get-full-size-modal-transitions.js","sources":["../../../src/desktop/utils/get-full-size-modal-transitions.ts"],"sourcesContent":["import { type TransitionProps } from 'react-transition-group/Transition';\n\nimport { type BackdropProps } from '@alfalab/core-components-backdrop';\nimport { exhaustiveCheck } from '@alfalab/core-components-shared';\n\nimport { type UniversalModalDesktopProps } from '../types/props';\n\nimport fullSizeBackdropTransitions from '../styles/transitions/full-size-backdrop-transitions.module.css';\nimport fullSizeVerticalBottomTransitions from '../styles/transitions/full-size-vertical-bottom-transitions.module.css';\nimport fullSizeVerticalCenterTransitions from '../styles/transitions/full-size-vertical-center-transitions.module.css';\nimport fullSizeVerticalTopTransitions from '../styles/transitions/full-size-vertical-top-transitions.module.css';\n\ninterface Params {\n verticalAlign: Exclude<UniversalModalDesktopProps['verticalAlign'], undefined>;\n width: UniversalModalDesktopProps['width'];\n height: UniversalModalDesktopProps['height'];\n}\n\ninterface ReturnType {\n isFullSizeModal: boolean;\n backdropTransitions: Partial<BackdropProps>;\n componentTransitions: Partial<TransitionProps>;\n}\n\nexport const getFullSizeModalTransitions = (params: Params): ReturnType => {\n const { verticalAlign, width, height } = params;\n\n const isFullSizeModal = width === 'fullWidth' && height === 'fullHeight';\n\n const backdropTransitions = {\n timeout: {\n enter: 0,\n exit: 400,\n },\n transitionClassNames: fullSizeBackdropTransitions,\n };\n\n const getContentTransitionsClassNames = () => {\n switch (verticalAlign) {\n case 'top':\n return fullSizeVerticalTopTransitions;\n case 'bottom':\n return fullSizeVerticalBottomTransitions;\n case 'center':\n return fullSizeVerticalCenterTransitions;\n default:\n return exhaustiveCheck(verticalAlign);\n }\n };\n\n const componentTransitions = {\n timeout: {\n enter: 200,\n exit: 400,\n },\n classNames: getContentTransitionsClassNames(),\n };\n\n return {\n isFullSizeModal,\n backdropTransitions,\n componentTransitions,\n };\n};\n"],"names":[],"mappings":";;;;;;AAwBa,MAAA,2BAA2B,GAAG,CAAC,MAAc,KAAgB;IACtE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM;IAE/C,MAAM,eAAe,GAAG,KAAK,KAAK,WAAW,IAAI,MAAM,KAAK,YAAY;AAExE,IAAA,MAAM,mBAAmB,GAAG;AACxB,QAAA,OAAO,EAAE;AACL,YAAA,KAAK,EAAE,CAAC;AACR,YAAA,IAAI,EAAE,GAAG;AACZ,SAAA;AACD,QAAA,oBAAoB,EAAE,2BAA2B;KACpD;IAED,MAAM,+BAA+B,GAAG,MAAK;AACzC,QAAA,QAAQ,aAAa;AACjB,YAAA,KAAK,KAAK;AACN,gBAAA,OAAO,8BAA8B;AACzC,YAAA,KAAK,QAAQ;AACT,gBAAA,OAAO,iCAAiC;AAC5C,YAAA,KAAK,QAAQ;AACT,gBAAA,OAAO,iCAAiC;AAC5C,YAAA;AACI,gBAAA,OAAO,eAAe,CAAC,aAAa,CAAC;AAC5C;AACL,KAAC;AAED,IAAA,MAAM,oBAAoB,GAAG;AACzB,QAAA,OAAO,EAAE;AACL,YAAA,KAAK,EAAE,GAAG;AACV,YAAA,IAAI,EAAE,GAAG;AACZ,SAAA;QACD,UAAU,EAAE,+BAA+B,EAAE;KAChD;IAED,OAAO;QACH,eAAe;QACf,mBAAmB;QACnB,oBAAoB;KACvB;AACL;;;;"}
1
+ {"version":3,"file":"get-full-size-modal-transitions.js","sources":["../../../src/desktop/utils/get-full-size-modal-transitions.ts"],"sourcesContent":["import { type TransitionProps } from 'react-transition-group/Transition';\n\nimport { type BackdropProps } from '@alfalab/core-components-backdrop';\nimport { exhaustiveCheck } from '@alfalab/core-components-shared';\n\nimport { type UniversalModalDesktopProps } from '../types/props';\n\nimport fullSizeBackdropTransitions from '../styles/transitions/full-size-backdrop-transitions.module.css';\nimport fullSizeVerticalBottomTransitions from '../styles/transitions/full-size-vertical-bottom-transitions.module.css';\nimport fullSizeVerticalCenterTransitions from '../styles/transitions/full-size-vertical-center-transitions.module.css';\nimport fullSizeVerticalTopTransitions from '../styles/transitions/full-size-vertical-top-transitions.module.css';\n\ninterface Params {\n verticalAlign: Exclude<UniversalModalDesktopProps['verticalAlign'], undefined>;\n width: UniversalModalDesktopProps['width'];\n height: UniversalModalDesktopProps['height'];\n}\n\ninterface ReturnType {\n isFullSizeModal: boolean;\n backdropTransitions: Partial<BackdropProps>;\n componentTransitions: Partial<TransitionProps>;\n}\n\nexport const getFullSizeModalTransitions = (params: Params): ReturnType => {\n const { verticalAlign, width, height } = params;\n\n const isFullSizeModal = width === 'fullWidth' && height === 'fullHeight';\n\n const backdropTransitions = {\n timeout: {\n enter: 0,\n exit: 400,\n },\n transitionClassNames: fullSizeBackdropTransitions,\n };\n\n const getContentTransitionsClassNames = () => {\n switch (verticalAlign) {\n case 'top':\n return fullSizeVerticalTopTransitions;\n case 'bottom':\n return fullSizeVerticalBottomTransitions;\n case 'center':\n return fullSizeVerticalCenterTransitions;\n default:\n return exhaustiveCheck(verticalAlign);\n }\n };\n\n const componentTransitions = {\n timeout: {\n enter: 200,\n exit: 400,\n },\n classNames: getContentTransitionsClassNames(),\n };\n\n return {\n isFullSizeModal,\n backdropTransitions,\n componentTransitions,\n };\n};\n"],"names":[],"mappings":";;;;;;AAwBa,MAAA,2BAA2B,GAAG,CAAC,MAAc,KAAgB;IACtE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM;IAE/C,MAAM,eAAe,GAAG,KAAK,KAAK,WAAW,IAAI,MAAM,KAAK,YAAY;AAExE,IAAA,MAAM,mBAAmB,GAAG;AACxB,QAAA,OAAO,EAAE;AACL,YAAA,KAAK,EAAE,CAAC;AACR,YAAA,IAAI,EAAE,GAAG;AACZ,SAAA;AACD,QAAA,oBAAoB,EAAE,2BAA2B;KACpD;IAED,MAAM,+BAA+B,GAAG,MAAK;QACzC,QAAQ,aAAa;AACjB,YAAA,KAAK,KAAK;AACN,gBAAA,OAAO,8BAA8B;AACzC,YAAA,KAAK,QAAQ;AACT,gBAAA,OAAO,iCAAiC;AAC5C,YAAA,KAAK,QAAQ;AACT,gBAAA,OAAO,iCAAiC;AAC5C,YAAA;AACI,gBAAA,OAAO,eAAe,CAAC,aAAa,CAAC;;AAEjD,KAAC;AAED,IAAA,MAAM,oBAAoB,GAAG;AACzB,QAAA,OAAO,EAAE;AACL,YAAA,KAAK,EAAE,GAAG;AACV,YAAA,IAAI,EAAE,GAAG;AACZ,SAAA;QACD,UAAU,EAAE,+BAA+B,EAAE;KAChD;IAED,OAAO;QACH,eAAe;QACf,mBAAmB;QACnB,oBAAoB;KACvB;AACL;;;;"}
@@ -6,4 +6,4 @@ import { type UniversalModalDesktopProps } from '../types/props';
6
6
  * 2. Высота строится по размеру viewport;
7
7
  * 3. Высота строится по переданному параметру.
8
8
  */
9
- export declare const getHeightStyle: (height: Exclude<UniversalModalDesktopProps['height'], undefined>, margin: UniversalModalDesktopProps['margin']) => Pick<CSSProperties, 'height' | 'maxHeight'>;
9
+ export declare const getHeightStyle: (height: Exclude<UniversalModalDesktopProps["height"], undefined>, margin: UniversalModalDesktopProps["margin"]) => Pick<CSSProperties, "height" | "maxHeight">;
@@ -15,7 +15,7 @@ const getHeightStyle = (height, margin) => {
15
15
  if (isClient()) {
16
16
  viewportHeight = Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0);
17
17
  }
18
- if (height > viewportHeight || height === 'fullHeight') {
18
+ if (height === 'fullHeight' || height > viewportHeight) {
19
19
  const marginTop = (margin && hasOwnProperty(margin, 'top') && margin.top) || 0;
20
20
  const marginBottom = (margin && hasOwnProperty(margin, 'bottom') && margin.bottom) || 0;
21
21
  return { height: `calc(100% - ${marginTop}px - ${marginBottom}px)` };
@@ -1 +1 @@
1
- {"version":3,"file":"get-height-style.js","sources":["../../../src/desktop/utils/get-height-style.ts"],"sourcesContent":["import { type CSSProperties } from 'react';\n\nimport { hasOwnProperty, isClient } from '@alfalab/core-components-shared';\n\nimport { type UniversalModalDesktopProps } from '../types/props';\n\nimport { getMaxHeightStyle } from './get-max-height-style';\n\n/**\n * Передает высоту компонента для нескольких кейсов\n * 1. Высота строится по контенту;\n * 2. Высота строится по размеру viewport;\n * 3. Высота строится по переданному параметру.\n */\nexport const getHeightStyle = (\n height: Exclude<UniversalModalDesktopProps['height'], undefined>,\n margin: UniversalModalDesktopProps['margin'],\n): Pick<CSSProperties, 'height' | 'maxHeight'> => {\n if (height === 'hugContent') {\n return { maxHeight: getMaxHeightStyle(margin) };\n }\n\n let viewportHeight = 0;\n\n if (isClient()) {\n viewportHeight = Math.max(\n document.documentElement.clientHeight || 0,\n window.innerHeight || 0,\n );\n }\n\n if (height > viewportHeight || height === 'fullHeight') {\n const marginTop = (margin && hasOwnProperty(margin, 'top') && margin.top) || 0;\n const marginBottom = (margin && hasOwnProperty(margin, 'bottom') && margin.bottom) || 0;\n\n return { height: `calc(100% - ${marginTop}px - ${marginBottom}px)` };\n }\n\n return { height };\n};\n"],"names":[],"mappings":";;;AAQA;;;;;AAKG;MACU,cAAc,GAAG,CAC1B,MAAgE,EAChE,MAA4C,KACC;IAC7C,IAAI,MAAM,KAAK,YAAY,EAAE;QACzB,OAAO,EAAE,SAAS,EAAE,iBAAiB,CAAC,MAAM,CAAC,EAAE;AAClD;IAED,IAAI,cAAc,GAAG,CAAC;IAEtB,IAAI,QAAQ,EAAE,EAAE;AACZ,QAAA,cAAc,GAAG,IAAI,CAAC,GAAG,CACrB,QAAQ,CAAC,eAAe,CAAC,YAAY,IAAI,CAAC,EAC1C,MAAM,CAAC,WAAW,IAAI,CAAC,CAC1B;AACJ;AAED,IAAA,IAAI,MAAM,GAAG,cAAc,IAAI,MAAM,KAAK,YAAY,EAAE;AACpD,QAAA,MAAM,SAAS,GAAG,CAAC,MAAM,IAAI,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,GAAG,KAAK,CAAC;AAC9E,QAAA,MAAM,YAAY,GAAG,CAAC,MAAM,IAAI,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAEvF,OAAO,EAAE,MAAM,EAAE,CAAA,YAAA,EAAe,SAAS,CAAQ,KAAA,EAAA,YAAY,CAAK,GAAA,CAAA,EAAE;AACvE;IAED,OAAO,EAAE,MAAM,EAAE;AACrB;;;;"}
1
+ {"version":3,"file":"get-height-style.js","sources":["../../../src/desktop/utils/get-height-style.ts"],"sourcesContent":["import { type CSSProperties } from 'react';\n\nimport { hasOwnProperty, isClient } from '@alfalab/core-components-shared';\n\nimport { type UniversalModalDesktopProps } from '../types/props';\n\nimport { getMaxHeightStyle } from './get-max-height-style';\n\n/**\n * Передает высоту компонента для нескольких кейсов\n * 1. Высота строится по контенту;\n * 2. Высота строится по размеру viewport;\n * 3. Высота строится по переданному параметру.\n */\nexport const getHeightStyle = (\n height: Exclude<UniversalModalDesktopProps['height'], undefined>,\n margin: UniversalModalDesktopProps['margin'],\n): Pick<CSSProperties, 'height' | 'maxHeight'> => {\n if (height === 'hugContent') {\n return { maxHeight: getMaxHeightStyle(margin) };\n }\n\n let viewportHeight = 0;\n\n if (isClient()) {\n viewportHeight = Math.max(\n document.documentElement.clientHeight || 0,\n window.innerHeight || 0,\n );\n }\n\n if (height === 'fullHeight' || height > viewportHeight) {\n const marginTop = (margin && hasOwnProperty(margin, 'top') && margin.top) || 0;\n const marginBottom = (margin && hasOwnProperty(margin, 'bottom') && margin.bottom) || 0;\n\n return { height: `calc(100% - ${marginTop}px - ${marginBottom}px)` };\n }\n\n return { height };\n};\n"],"names":[],"mappings":";;;AAQA;;;;;AAKG;MACU,cAAc,GAAG,CAC1B,MAAgE,EAChE,MAA4C,KACC;AAC7C,IAAA,IAAI,MAAM,KAAK,YAAY,EAAE;QACzB,OAAO,EAAE,SAAS,EAAE,iBAAiB,CAAC,MAAM,CAAC,EAAE;;IAGnD,IAAI,cAAc,GAAG,CAAC;IAEtB,IAAI,QAAQ,EAAE,EAAE;AACZ,QAAA,cAAc,GAAG,IAAI,CAAC,GAAG,CACrB,QAAQ,CAAC,eAAe,CAAC,YAAY,IAAI,CAAC,EAC1C,MAAM,CAAC,WAAW,IAAI,CAAC,CAC1B;;IAGL,IAAI,MAAM,KAAK,YAAY,IAAI,MAAM,GAAG,cAAc,EAAE;AACpD,QAAA,MAAM,SAAS,GAAG,CAAC,MAAM,IAAI,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,GAAG,KAAK,CAAC;AAC9E,QAAA,MAAM,YAAY,GAAG,CAAC,MAAM,IAAI,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAEvF,OAAO,EAAE,MAAM,EAAE,CAAA,YAAA,EAAe,SAAS,CAAQ,KAAA,EAAA,YAAY,CAAK,GAAA,CAAA,EAAE;;IAGxE,OAAO,EAAE,MAAM,EAAE;AACrB;;;;"}
@@ -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}\n\nexport const getMarginStyles = (params: Params): Record<string, boolean> => {\n const { margin, styles } = params;\n\n if (margin) {\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 };\n }\n\n return {};\n};\n"],"names":[],"mappings":";;AASa,MAAA,eAAe,GAAG,CAAC,MAAc,KAA6B;AACvE,IAAA,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM;AAEjC,IAAA,IAAI,MAAM,EAAE;QACR,OAAO;AACH,YAAA,CAAC,MAAM,CAAC,CAAa,UAAA,EAAA,MAAM,CAAC,GAAG,CAAA,CAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC;AAClE,YAAA,CAAC,MAAM,CAAC,CAAe,YAAA,EAAA,MAAM,CAAC,KAAK,CAAA,CAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC;AACxE,YAAA,CAAC,MAAM,CAAC,CAAgB,aAAA,EAAA,MAAM,CAAC,MAAM,CAAA,CAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC;AAC3E,YAAA,CAAC,MAAM,CAAC,CAAc,WAAA,EAAA,MAAM,CAAC,IAAI,CAAA,CAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC;SACxE;AACJ;AAED,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 [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 };\n }\n\n return {};\n};\n"],"names":[],"mappings":";;AASa,MAAA,eAAe,GAAG,CAAC,MAAc,KAA6B;AACvE,IAAA,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM;IAEjC,IAAI,MAAM,EAAE;QACR,OAAO;AACH,YAAA,CAAC,MAAM,CAAC,CAAa,UAAA,EAAA,MAAM,CAAC,GAAG,CAAA,CAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC;AAClE,YAAA,CAAC,MAAM,CAAC,CAAe,YAAA,EAAA,MAAM,CAAC,KAAK,CAAA,CAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC;AACxE,YAAA,CAAC,MAAM,CAAC,CAAgB,aAAA,EAAA,MAAM,CAAC,MAAM,CAAA,CAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC;AAC3E,YAAA,CAAC,MAAM,CAAC,CAAc,WAAA,EAAA,MAAM,CAAC,IAAI,CAAA,CAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC;SACxE;;AAGL,IAAA,OAAO,EAAE;AACb;;;;"}
@@ -1,2 +1,2 @@
1
1
  import { type UniversalModalDesktopProps } from '../types/props';
2
- export declare const getMaxHeightStyle: (margin: UniversalModalDesktopProps['margin']) => string;
2
+ export declare const getMaxHeightStyle: (margin: UniversalModalDesktopProps["margin"]) => string;
@@ -1,2 +1,2 @@
1
1
  import { type UniversalModalDesktopProps } from '../types/props';
2
- export declare const getWidthStyle: (width: Exclude<UniversalModalDesktopProps['width'], undefined>, margin: UniversalModalDesktopProps['margin']) => string;
2
+ export declare const getWidthStyle: (width: Exclude<UniversalModalDesktopProps["width"], undefined>, margin: UniversalModalDesktopProps["margin"]) => string;
@@ -5,7 +5,7 @@ const getWidthStyle = (width, margin) => {
5
5
  if (isClient()) {
6
6
  viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);
7
7
  }
8
- if (width > viewportWidth || width === 'fullWidth') {
8
+ if (width === 'fullWidth' || width > viewportWidth) {
9
9
  const marginLeft = (margin && hasOwnProperty(margin, 'left') && margin.left) || 0;
10
10
  const marginRight = (margin && hasOwnProperty(margin, 'right') && margin.right) || 0;
11
11
  return `calc(100% - ${marginLeft}px - ${marginRight}px)`;
@@ -1 +1 @@
1
- {"version":3,"file":"get-width-style.js","sources":["../../../src/desktop/utils/get-width-style.ts"],"sourcesContent":["import { hasOwnProperty, isClient } from '@alfalab/core-components-shared';\n\nimport { type UniversalModalDesktopProps } from '../types/props';\n\nexport const getWidthStyle = (\n width: Exclude<UniversalModalDesktopProps['width'], undefined>,\n margin: UniversalModalDesktopProps['margin'],\n) => {\n let viewportWidth = 0;\n\n if (isClient()) {\n viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n }\n\n if (width > viewportWidth || width === 'fullWidth') {\n const marginLeft = (margin && hasOwnProperty(margin, 'left') && margin.left) || 0;\n const marginRight = (margin && hasOwnProperty(margin, 'right') && margin.right) || 0;\n\n return `calc(100% - ${marginLeft}px - ${marginRight}px)`;\n }\n\n return `${width}px`;\n};\n"],"names":[],"mappings":";;MAIa,aAAa,GAAG,CACzB,KAA8D,EAC9D,MAA4C,KAC5C;IACA,IAAI,aAAa,GAAG,CAAC;IAErB,IAAI,QAAQ,EAAE,EAAE;AACZ,QAAA,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,WAAW,IAAI,CAAC,EAAE,MAAM,CAAC,UAAU,IAAI,CAAC,CAAC;AAC9F;AAED,IAAA,IAAI,KAAK,GAAG,aAAa,IAAI,KAAK,KAAK,WAAW,EAAE;AAChD,QAAA,MAAM,UAAU,GAAG,CAAC,MAAM,IAAI,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC;AACjF,QAAA,MAAM,WAAW,GAAG,CAAC,MAAM,IAAI,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,KAAK,KAAK,CAAC;AAEpF,QAAA,OAAO,CAAe,YAAA,EAAA,UAAU,CAAQ,KAAA,EAAA,WAAW,KAAK;AAC3D;IAED,OAAO,CAAA,EAAG,KAAK,CAAA,EAAA,CAAI;AACvB;;;;"}
1
+ {"version":3,"file":"get-width-style.js","sources":["../../../src/desktop/utils/get-width-style.ts"],"sourcesContent":["import { hasOwnProperty, isClient } from '@alfalab/core-components-shared';\n\nimport { type UniversalModalDesktopProps } from '../types/props';\n\nexport const getWidthStyle = (\n width: Exclude<UniversalModalDesktopProps['width'], undefined>,\n margin: UniversalModalDesktopProps['margin'],\n) => {\n let viewportWidth = 0;\n\n if (isClient()) {\n viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);\n }\n\n if (width === 'fullWidth' || width > viewportWidth) {\n const marginLeft = (margin && hasOwnProperty(margin, 'left') && margin.left) || 0;\n const marginRight = (margin && hasOwnProperty(margin, 'right') && margin.right) || 0;\n\n return `calc(100% - ${marginLeft}px - ${marginRight}px)`;\n }\n\n return `${width}px`;\n};\n"],"names":[],"mappings":";;MAIa,aAAa,GAAG,CACzB,KAA8D,EAC9D,MAA4C,KAC5C;IACA,IAAI,aAAa,GAAG,CAAC;IAErB,IAAI,QAAQ,EAAE,EAAE;AACZ,QAAA,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,WAAW,IAAI,CAAC,EAAE,MAAM,CAAC,UAAU,IAAI,CAAC,CAAC;;IAG/F,IAAI,KAAK,KAAK,WAAW,IAAI,KAAK,GAAG,aAAa,EAAE;AAChD,QAAA,MAAM,UAAU,GAAG,CAAC,MAAM,IAAI,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC;AACjF,QAAA,MAAM,WAAW,GAAG,CAAC,MAAM,IAAI,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,KAAK,KAAK,CAAC;AAEpF,QAAA,OAAO,CAAe,YAAA,EAAA,UAAU,CAAQ,KAAA,EAAA,WAAW,KAAK;;IAG5D,OAAO,CAAA,EAAG,KAAK,CAAA,EAAA,CAAI;AACvB;;;;"}
@@ -13,11 +13,19 @@ const setFooterAndHeaderRefs = (params) => {
13
13
  const { displayName } = child.type;
14
14
  if (displayName && isHeaderNode(displayName)) {
15
15
  const existingRef = child;
16
- return cloneElement(child, { ref: mergeRefs([existingRef.ref, headerElementRef]) });
16
+ return cloneElement(child, {
17
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
18
+ // @ts-expect-error
19
+ ref: mergeRefs([existingRef.ref ?? null, headerElementRef]),
20
+ });
17
21
  }
18
22
  if (displayName && isFooterNode(displayName)) {
19
23
  const existingRef = child;
20
- return cloneElement(child, { ref: mergeRefs([existingRef.ref, footerElementRef]) });
24
+ return cloneElement(child, {
25
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
26
+ // @ts-expect-error
27
+ ref: mergeRefs([existingRef.ref, footerElementRef]),
28
+ });
21
29
  }
22
30
  return child;
23
31
  });
@@ -1 +1 @@
1
- {"version":3,"file":"set-footer-and-header-refs.js","sources":["../../../src/desktop/utils/set-footer-and-header-refs.ts"],"sourcesContent":["import {\n Children,\n cloneElement,\n isValidElement,\n type MutableRefObject,\n type ReactElement,\n type ReactNode,\n type RefObject,\n} from 'react';\nimport mergeRefs from 'react-merge-refs';\n\nimport { type FooterDesktop } from '../../components/footer';\nimport { type HeaderDesktop } from '../../components/header';\n\nimport { isFooterNode } from './isFooterNode';\nimport { isHeaderNode } from './isHeaderNode';\n\ninterface Params {\n children: ReactNode;\n headerElementRef: RefObject<HTMLDivElement>;\n footerElementRef: RefObject<HTMLDivElement>;\n}\n\n/** Устанавливает рефы в хедер и футер если они переданы в модалку (необходимы для дальнейшего расчета высоты кастомного скроллбара) */\nexport const setFooterAndHeaderRefs = (params: Params) => {\n const { children, headerElementRef, footerElementRef } = params;\n\n const enhancedChildren = Children.map(children, (child) => {\n if (!isValidElement(child)) {\n return child;\n }\n\n const { displayName } = child.type as typeof HeaderDesktop | typeof FooterDesktop;\n\n if (displayName && isHeaderNode(displayName)) {\n const existingRef = child as ReactElement & { ref: MutableRefObject<HTMLDivElement> };\n\n return cloneElement(child, { ref: mergeRefs([existingRef.ref, headerElementRef]) });\n }\n\n if (displayName && isFooterNode(displayName)) {\n const existingRef = child as ReactElement & { ref: MutableRefObject<HTMLDivElement> };\n\n return cloneElement(child, { ref: mergeRefs([existingRef.ref, footerElementRef]) });\n }\n\n return child;\n });\n\n return { enhancedChildren };\n};\n"],"names":[],"mappings":";;;;;AAuBA;AACa,MAAA,sBAAsB,GAAG,CAAC,MAAc,KAAI;IACrD,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,GAAG,MAAM;IAE/D,MAAM,gBAAgB,GAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,KAAI;AACtD,QAAA,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE;AACxB,YAAA,OAAO,KAAK;AACf;AAED,QAAA,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC,IAAmD;AAEjF,QAAA,IAAI,WAAW,IAAI,YAAY,CAAC,WAAW,CAAC,EAAE;YAC1C,MAAM,WAAW,GAAG,KAAiE;AAErF,YAAA,OAAO,YAAY,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC,WAAW,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC;AACtF;AAED,QAAA,IAAI,WAAW,IAAI,YAAY,CAAC,WAAW,CAAC,EAAE;YAC1C,MAAM,WAAW,GAAG,KAAiE;AAErF,YAAA,OAAO,YAAY,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC,WAAW,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC;AACtF;AAED,QAAA,OAAO,KAAK;AAChB,KAAC,CAAC;IAEF,OAAO,EAAE,gBAAgB,EAAE;AAC/B;;;;"}
1
+ {"version":3,"file":"set-footer-and-header-refs.js","sources":["../../../src/desktop/utils/set-footer-and-header-refs.ts"],"sourcesContent":["import {\n Children,\n cloneElement,\n isValidElement,\n type ReactElement,\n type ReactNode,\n type RefAttributes,\n type RefObject,\n} from 'react';\nimport mergeRefs from 'react-merge-refs';\n\nimport { type FooterDesktop } from '../../components/footer';\nimport { type HeaderDesktop } from '../../components/header';\n\nimport { isFooterNode } from './isFooterNode';\nimport { isHeaderNode } from './isHeaderNode';\n\ninterface Params {\n children: ReactNode;\n headerElementRef: RefObject<HTMLDivElement>;\n footerElementRef: RefObject<HTMLDivElement>;\n}\n\n/** Устанавливает рефы в хедер и футер если они переданы в модалку (необходимы для дальнейшего расчета высоты кастомного скроллбара) */\nexport const setFooterAndHeaderRefs = (params: Params) => {\n const { children, headerElementRef, footerElementRef } = params;\n\n const enhancedChildren = Children.map(children, (child) => {\n if (!isValidElement(child)) {\n return child;\n }\n\n const { displayName } = child.type as typeof HeaderDesktop | typeof FooterDesktop;\n\n if (displayName && isHeaderNode(displayName)) {\n const existingRef = child as ReactElement & RefAttributes<HTMLDivElement>;\n\n return cloneElement(child, {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n ref: mergeRefs([existingRef.ref ?? null, headerElementRef]),\n });\n }\n\n if (displayName && isFooterNode(displayName)) {\n const existingRef = child as ReactElement & RefAttributes<HTMLDivElement>;\n\n return cloneElement(child, {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n ref: mergeRefs([existingRef.ref, footerElementRef]),\n });\n }\n\n return child;\n });\n\n return { enhancedChildren };\n};\n"],"names":[],"mappings":";;;;;AAuBA;AACa,MAAA,sBAAsB,GAAG,CAAC,MAAc,KAAI;IACrD,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,GAAG,MAAM;IAE/D,MAAM,gBAAgB,GAAG,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,KAAI;AACtD,QAAA,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE;AACxB,YAAA,OAAO,KAAK;;AAGhB,QAAA,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC,IAAmD;AAEjF,QAAA,IAAI,WAAW,IAAI,YAAY,CAAC,WAAW,CAAC,EAAE;YAC1C,MAAM,WAAW,GAAG,KAAqD;YAEzE,OAAO,YAAY,CAAC,KAAK,EAAE;;;AAGvB,gBAAA,GAAG,EAAE,SAAS,CAAC,CAAC,WAAW,CAAC,GAAG,IAAI,IAAI,EAAE,gBAAgB,CAAC,CAAC;AAC9D,aAAA,CAAC;;AAGN,QAAA,IAAI,WAAW,IAAI,YAAY,CAAC,WAAW,CAAC,EAAE;YAC1C,MAAM,WAAW,GAAG,KAAqD;YAEzE,OAAO,YAAY,CAAC,KAAK,EAAE;;;gBAGvB,GAAG,EAAE,SAAS,CAAC,CAAC,WAAW,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;AACtD,aAAA,CAAC;;AAGN,QAAA,OAAO,KAAK;AAChB,KAAC,CAAC;IAEF,OAAO,EAAE,gBAAgB,EAAE;AAC/B;;;;"}
@@ -1,4 +1,4 @@
1
- declare type MarginSize = 0 | 2 | 4 | 8 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 56 | 64 | 72 | 80 | 96 | 128;
1
+ type MarginSize = 0 | 2 | 4 | 8 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 56 | 64 | 72 | 80 | 96 | 128;
2
2
  export interface Margin {
3
3
  top?: MarginSize;
4
4
  right?: MarginSize;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-universal-modal",
3
- "version": "3.0.5",
3
+ "version": "3.0.6-alfasans",
4
4
  "description": "UniversalModal component",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -10,12 +10,12 @@
10
10
  "main": "index.js",
11
11
  "module": "./esm/index.js",
12
12
  "dependencies": {
13
- "@alfalab/core-components-backdrop": "^5.0.1",
14
- "@alfalab/core-components-base-modal": "^7.1.1",
15
- "@alfalab/core-components-mq": "^6.0.2",
16
- "@alfalab/core-components-navigation-bar-private": "^2.0.4",
17
- "@alfalab/core-components-scrollbar": "^5.0.1",
18
- "@alfalab/core-components-shared": "^2.1.0",
13
+ "@alfalab/core-components-backdrop": "5.0.2-alfasans",
14
+ "@alfalab/core-components-base-modal": "7.1.2-alfasans",
15
+ "@alfalab/core-components-mq": "6.0.3-alfasans",
16
+ "@alfalab/core-components-navigation-bar-private": "2.0.5-alfasans",
17
+ "@alfalab/core-components-scrollbar": "5.0.2-alfasans",
18
+ "@alfalab/core-components-shared": "2.1.1-alfasans",
19
19
  "@types/react-transition-group": "^4.4.12",
20
20
  "classnames": "^2.5.1",
21
21
  "react-merge-refs": "^1.1.0",
@@ -30,6 +30,6 @@
30
30
  "access": "public",
31
31
  "directory": "dist"
32
32
  },
33
- "themesVersion": "15.0.2",
34
- "varsVersion": "11.0.1"
33
+ "themesVersion": "15.0.2-alfasans",
34
+ "varsVersion": "11.0.2-alfasans"
35
35
  }
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/no-typography-index.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
  @import '../../../vars.css';
3
3
 
4
4
  .footer {
@@ -1,5 +1,5 @@
1
1
  @import '../../../vars.css';
2
- @import '@alfalab/core-components-vars/src/no-typography-index.css';
2
+ @import '@alfalab/core-components-vars/src/index.css';
3
3
 
4
4
  .header {
5
5
  width: 100%;
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/no-typography-index.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  .header {
4
4
  padding: var(--gap-8) var(--gap-4);
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/no-typography-index.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  .scrollable {
4
4
  height: 100%;
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/no-typography-index.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  .wrapper {
4
4
  overflow-x: hidden;
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/no-typography-index.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  :root {
4
4
  --universal-modal-backdrop-visible-background: var(--color-light-overlay-default);
@@ -29,7 +29,7 @@ export const getHeightStyle = (
29
29
  );
30
30
  }
31
31
 
32
- if (height > viewportHeight || height === 'fullHeight') {
32
+ if (height === 'fullHeight' || height > viewportHeight) {
33
33
  const marginTop = (margin && hasOwnProperty(margin, 'top') && margin.top) || 0;
34
34
  const marginBottom = (margin && hasOwnProperty(margin, 'bottom') && margin.bottom) || 0;
35
35
 
@@ -12,7 +12,7 @@ export const getWidthStyle = (
12
12
  viewportWidth = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);
13
13
  }
14
14
 
15
- if (width > viewportWidth || width === 'fullWidth') {
15
+ if (width === 'fullWidth' || width > viewportWidth) {
16
16
  const marginLeft = (margin && hasOwnProperty(margin, 'left') && margin.left) || 0;
17
17
  const marginRight = (margin && hasOwnProperty(margin, 'right') && margin.right) || 0;
18
18
 
@@ -2,9 +2,9 @@ import {
2
2
  Children,
3
3
  cloneElement,
4
4
  isValidElement,
5
- type MutableRefObject,
6
5
  type ReactElement,
7
6
  type ReactNode,
7
+ type RefAttributes,
8
8
  type RefObject,
9
9
  } from 'react';
10
10
  import mergeRefs from 'react-merge-refs';
@@ -33,15 +33,23 @@ export const setFooterAndHeaderRefs = (params: Params) => {
33
33
  const { displayName } = child.type as typeof HeaderDesktop | typeof FooterDesktop;
34
34
 
35
35
  if (displayName && isHeaderNode(displayName)) {
36
- const existingRef = child as ReactElement & { ref: MutableRefObject<HTMLDivElement> };
36
+ const existingRef = child as ReactElement & RefAttributes<HTMLDivElement>;
37
37
 
38
- return cloneElement(child, { ref: mergeRefs([existingRef.ref, headerElementRef]) });
38
+ return cloneElement(child, {
39
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
40
+ // @ts-expect-error
41
+ ref: mergeRefs([existingRef.ref ?? null, headerElementRef]),
42
+ });
39
43
  }
40
44
 
41
45
  if (displayName && isFooterNode(displayName)) {
42
- const existingRef = child as ReactElement & { ref: MutableRefObject<HTMLDivElement> };
46
+ const existingRef = child as ReactElement & RefAttributes<HTMLDivElement>;
43
47
 
44
- return cloneElement(child, { ref: mergeRefs([existingRef.ref, footerElementRef]) });
48
+ return cloneElement(child, {
49
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
50
+ // @ts-expect-error
51
+ ref: mergeRefs([existingRef.ref, footerElementRef]),
52
+ });
45
53
  }
46
54
 
47
55
  return child;
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/no-typography-index.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  .component {
4
4
  top: var(--gap-0);
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/no-typography-index.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  .appear,
4
4
  .enter {
package/src/vars.css CHANGED
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-vars/src/no-typography-index.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  :root {
4
4
  --universal-modal-header-background: var(--color-light-modal-bg-primary);
@@ -1,4 +1,4 @@
1
- declare type MarginSize = 0 | 2 | 4 | 8 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 56 | 64 | 72 | 80 | 96 | 128;
1
+ type MarginSize = 0 | 2 | 4 | 8 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 56 | 64 | 72 | 80 | 96 | 128;
2
2
  export interface Margin {
3
3
  top?: MarginSize;
4
4
  right?: MarginSize;