@hhgtech/hhg-components 1.29.392 → 1.29.394-beta-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (527) hide show
  1. package/build/{InputDate-7c667a25.js → InputDate-c1865790.js} +17 -7
  2. package/build/{LastPeriod-dda1203c.js → LastPeriod-7e67526a.js} +1 -1
  3. package/build/{MobileBottomNavigationIcon-4a80b6c7.js → MobileBottomNavigationIcon-7804ffcd.js} +3 -3
  4. package/build/{Spinner-48dd7d71.js → Spinner-9ad81cc2.js} +1 -1
  5. package/build/{WhatsApp-03bea647.js → WhatsApp-bd102c81.js} +1 -1
  6. package/build/adapters.js +19 -19
  7. package/build/atoms.js +54 -55
  8. package/build/babyGrowth.js +83 -83
  9. package/build/cache.js +2 -2
  10. package/build/care.js +17 -17
  11. package/build/careBookingSearchBar.js +14 -14
  12. package/build/careBookingSearchBarV2.js +15 -15
  13. package/build/components/atoms/drawerComponent/index.d.ts +7 -0
  14. package/build/components.js +146 -147
  15. package/build/{constants-3eee3bed.js → constants-6df10328.js} +1 -1
  16. package/build/constants.js +3 -3
  17. package/build/constantsDomainLocales.js +1 -1
  18. package/build/constantsRiskScreener.js +2 -2
  19. package/build/constantsSite.js +2 -2
  20. package/build/{core-61111236.js → core-04b34389.js} +1 -1
  21. package/build/{dataTransform-ab7d0955.js → dataTransform-d9461a8f.js} +1 -1
  22. package/build/ecom.js +4 -4
  23. package/build/{editor-07db6249.js → editor-e72a022f.js} +11 -11
  24. package/build/embeddedHeathToolCards_babyGrowth.js +23 -23
  25. package/build/embeddedHeathToolCards_babyPoop.js +19 -19
  26. package/build/embeddedHeathToolCards_babyVaccine.js +22 -22
  27. package/build/embeddedHeathToolCards_bmi_bmi.js +25 -25
  28. package/build/embeddedHeathToolCards_bmrBmr.js +25 -25
  29. package/build/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
  30. package/build/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
  31. package/build/embeddedHeathToolCards_pwg_pwg.js +26 -26
  32. package/build/embeddedHeathToolCards_targetHeartRate.js +27 -27
  33. package/build/esm/{InputDate-5b2fc89b.js → InputDate-36198e12.js} +17 -7
  34. package/build/esm/{LastPeriod-288b1869.js → LastPeriod-21826093.js} +1 -1
  35. package/build/esm/{MobileBottomNavigationIcon-6f57a780.js → MobileBottomNavigationIcon-57248f6d.js} +3 -3
  36. package/build/esm/{Spinner-495ee36e.js → Spinner-301b48d8.js} +1 -1
  37. package/build/esm/{WhatsApp-3d10d70b.js → WhatsApp-dc584d73.js} +1 -1
  38. package/build/esm/adapters.js +19 -19
  39. package/build/esm/atoms.js +53 -54
  40. package/build/esm/babyGrowth.js +83 -83
  41. package/build/esm/cache.js +2 -2
  42. package/build/esm/care.js +17 -17
  43. package/build/esm/careBookingSearchBar.js +14 -14
  44. package/build/esm/careBookingSearchBarV2.js +15 -15
  45. package/build/esm/components/atoms/drawerComponent/index.d.ts +7 -0
  46. package/build/esm/components.js +102 -103
  47. package/build/esm/{constants-e36958c7.js → constants-fb7d3dd5.js} +1 -1
  48. package/build/esm/constants.js +3 -3
  49. package/build/esm/constantsDomainLocales.js +1 -1
  50. package/build/esm/constantsRiskScreener.js +2 -2
  51. package/build/esm/constantsSite.js +2 -2
  52. package/build/esm/{core-8540c768.js → core-3280d7df.js} +1 -1
  53. package/build/esm/{dataTransform-4d3a6854.js → dataTransform-b2803509.js} +1 -1
  54. package/build/esm/ecom.js +4 -4
  55. package/build/esm/{editor-13b3031d.js → editor-f6ffc468.js} +11 -11
  56. package/build/esm/embeddedHeathToolCards_babyGrowth.js +23 -23
  57. package/build/esm/embeddedHeathToolCards_babyPoop.js +19 -19
  58. package/build/esm/embeddedHeathToolCards_babyVaccine.js +22 -22
  59. package/build/esm/embeddedHeathToolCards_bmi_bmi.js +25 -25
  60. package/build/esm/embeddedHeathToolCards_bmrBmr.js +25 -25
  61. package/build/esm/embeddedHeathToolCards_dueDate_dueDate.js +22 -22
  62. package/build/esm/embeddedHeathToolCards_ovulation_ovulation.js +22 -22
  63. package/build/esm/embeddedHeathToolCards_pwg_pwg.js +26 -26
  64. package/build/esm/embeddedHeathToolCards_targetHeartRate.js +27 -27
  65. package/build/esm/footer.js +21 -21
  66. package/build/esm/gAssets.js +2 -2
  67. package/build/esm/{healthTools-246d57b9.js → healthTools-e5020eb5.js} +1 -1
  68. package/build/esm/healthToolsCardWrapper.js +18 -18
  69. package/build/esm/healthToolsForm.js +33 -33
  70. package/build/esm/hooks/usePreventScroll.d.ts +2 -2
  71. package/build/esm/hooks.js +13 -13
  72. package/build/esm/i18n/translationKeys.d.ts +1 -1
  73. package/build/esm/i18n-values/en-PH.js +1 -0
  74. package/build/esm/i18n-values/hi-IN.js +1 -0
  75. package/build/esm/i18n-values/id-ID.js +1 -0
  76. package/build/esm/i18n-values/km-KH.js +1 -0
  77. package/build/esm/i18n-values/ms-MY.js +1 -0
  78. package/build/esm/i18n-values/my-MM.js +1 -0
  79. package/build/esm/i18n-values/th-TH.js +1 -0
  80. package/build/esm/i18n-values/tl-PH.js +1 -0
  81. package/build/esm/i18n-values/vi-VN.js +1 -0
  82. package/build/esm/i18n-values/vi-VN_MB.js +1 -0
  83. package/build/esm/i18n-values/zh-CN.js +1 -0
  84. package/build/esm/i18n-values/zh-TW.js +1 -0
  85. package/build/esm/i18n.js +2 -2
  86. package/build/esm/i18nV2.js +2 -2
  87. package/build/esm/{index-3549f196.js → index-08e8d95e.js} +24 -24
  88. package/build/esm/{index-09b9153c.js → index-121eca86.js} +6 -6
  89. package/build/esm/{index-07161a73.js → index-142421a4.js} +1 -1
  90. package/build/esm/{index-6d9baa6a.js → index-14afb455.js} +2 -2
  91. package/build/esm/{index-19ce2735.js → index-15518ce2.js} +2 -2
  92. package/build/esm/{index-6cfdd367.js → index-176e704f.js} +31 -31
  93. package/build/esm/{index-c68db016.js → index-1ab47fc4.js} +213 -147
  94. package/build/esm/{index-8fcf227d.js → index-1b4a9dc3.js} +7 -7
  95. package/build/esm/{index-b87cc20c.js → index-1da7704d.js} +18 -18
  96. package/build/esm/{index-f377ee16.js → index-231b01bc.js} +31 -31
  97. package/build/esm/{index-5bbef3e1.js → index-2adc09ee.js} +1 -1
  98. package/build/esm/{index-fd50ebba.js → index-2c6e15e2.js} +2 -2
  99. package/build/esm/{index-0d91f904.js → index-324e3c4e.js} +4 -4
  100. package/build/esm/{index-b43b8fce.js → index-353aaf10.js} +2 -2
  101. package/build/esm/{index-02754236.js → index-3627cf3f.js} +3 -3
  102. package/build/esm/{index-5c821474.js → index-3a326de5.js} +2 -2
  103. package/build/esm/{index-a0aefa52.js → index-3d74a659.js} +11 -11
  104. package/build/esm/{index-f0f24b0e.js → index-4116584b.js} +2 -2
  105. package/build/esm/{index-64a73e02.js → index-4173d41f.js} +5 -5
  106. package/build/esm/{index-bfdb755b.js → index-49fdfdd6.js} +13 -13
  107. package/build/esm/{index-feed474a.js → index-4d2eb768.js} +6 -6
  108. package/build/esm/{index-b20207a3.js → index-55bb8385.js} +16 -16
  109. package/build/esm/{index-3cee170a.js → index-5a4fc9b1.js} +16 -16
  110. package/build/esm/{index-1fa5a0e8.js → index-5a7b6624.js} +8 -8
  111. package/build/esm/{index-5cd16acb.js → index-6bd4486d.js} +22 -22
  112. package/build/esm/{index-97ca7d33.js → index-6cac828f.js} +3 -3
  113. package/build/esm/{index-28a1dbbd.js → index-6fca5112.js} +1 -1
  114. package/build/esm/{index-61d04b9e.js → index-705b8d1a.js} +1 -1
  115. package/build/esm/{index-4313a9a0.js → index-75b4acc9.js} +10 -10
  116. package/build/esm/{index-84655909.js → index-77138666.js} +2 -2
  117. package/build/esm/{index-28e68d00.js → index-78288732.js} +17 -17
  118. package/build/esm/{index-05391cf0.js → index-7e3aac35.js} +1 -1
  119. package/build/esm/{index-5dbf5789.js → index-8230aa5f.js} +17 -17
  120. package/build/esm/{index-420637a8.js → index-950269df.js} +13 -13
  121. package/build/esm/{index-e3f42063.js → index-9a0668ca.js} +1 -1
  122. package/build/esm/{index-5d721bea.js → index-a0357cdc.js} +2 -2
  123. package/build/esm/{index-b407f3d6.js → index-a34a5a9c.js} +17 -17
  124. package/build/esm/{index-fd8d47d1.js → index-a4323bc7.js} +4 -4
  125. package/build/esm/{index-c11b4bd7.js → index-ab42b6e5.js} +2 -2
  126. package/build/esm/{index-bfbe673d.js → index-ad88a49e.js} +6 -6
  127. package/build/esm/{index-b270fe20.js → index-aed5fe53.js} +1 -1
  128. package/build/esm/{index-77725655.js → index-af09ed8e.js} +16 -16
  129. package/build/esm/{index-fedd765d.js → index-b44bb5f6.js} +6 -6
  130. package/build/esm/{index-947fba42.js → index-b61d2fa5.js} +2 -2
  131. package/build/esm/{index-a482546a.js → index-b8bd63dd.js} +3 -3
  132. package/build/esm/{index-007da62d.js → index-ba2e10fa.js} +21 -21
  133. package/build/esm/{index-7e4bdaaa.js → index-c2a219c5.js} +7 -7
  134. package/build/esm/{index-42b16695.js → index-c68f7778.js} +3 -3
  135. package/build/esm/{index-938a3f78.js → index-c7b5065c.js} +1 -1
  136. package/build/esm/{index-0cd8c99b.js → index-c893696a.js} +13 -13
  137. package/build/esm/{index-ee75daff.js → index-d672db33.js} +3 -3
  138. package/build/esm/{index-724bc222.js → index-da12fcca.js} +3 -3
  139. package/build/esm/{index-990b5e8f.js → index-db81491b.js} +6 -6
  140. package/build/esm/{index-d1400900.js → index-dd3538ae.js} +16 -16
  141. package/build/esm/{index-4ce00177.js → index-e0002280.js} +18 -18
  142. package/build/esm/{index-14fb86be.js → index-e0506a38.js} +17 -17
  143. package/build/esm/{index-b36a3861.js → index-e1c2537c.js} +120 -7
  144. package/build/esm/{index-dd82f09b.js → index-e2b7b7f8.js} +13 -13
  145. package/build/esm/{index-563c3e02.js → index-e2feca56.js} +2 -2
  146. package/build/esm/{index-ca5e4379.js → index-e4c26cc5.js} +2 -2
  147. package/build/esm/{index-1201f785.js → index-eff68c42.js} +15 -15
  148. package/build/esm/{index-780ee2fa.js → index-f1eaad47.js} +25 -25
  149. package/build/esm/{index-70906a72.js → index-f25cc557.js} +2 -2
  150. package/build/esm/{index-ecab2db0.js → index-fbf3d4f8.js} +1 -1
  151. package/build/esm/index.js +118 -119
  152. package/build/esm/{labelSorting-4c6b40fe.js → labelSorting-5704e799.js} +4 -4
  153. package/build/esm/lead/LeadGenForm/LeadGenEmpty.d.ts +8 -0
  154. package/build/esm/lead/LeadGenLightBoxB/LeadGenLightBoxB.styled.d.ts +262 -0
  155. package/build/esm/lead/icons/NoData.d.ts +3 -0
  156. package/build/esm/lead/icons/index.d.ts +5 -0
  157. package/build/esm/lead.css +1 -1
  158. package/build/esm/lead.js +737 -131
  159. package/build/esm/{logoIcon-b268928b.js → logoIcon-e56c0447.js} +2 -2
  160. package/build/esm/mantine.js +25 -25
  161. package/build/esm/misc.js +17 -17
  162. package/build/esm/miscGetDynamicHealthTool.js +4 -4
  163. package/build/esm/miscGetSocialList.js +8 -8
  164. package/build/esm/miscScreenSizeContext.js +1 -1
  165. package/build/esm/mobileBottomNavigation.js +5 -5
  166. package/build/esm/mobileBottomNavigationIcon.js +5 -5
  167. package/build/esm/molecules.js +74 -74
  168. package/build/esm/moleculesArticleCard.js +6 -6
  169. package/build/esm/moleculesArticleCardV2.js +16 -16
  170. package/build/esm/navigation.js +46 -46
  171. package/build/esm/navigationLogoutPopup.js +9 -9
  172. package/build/esm/navigationProfileButton.js +23 -23
  173. package/build/esm/onboardingV2.js +29 -29
  174. package/build/esm/organisms.js +50 -50
  175. package/build/esm/{post-56703738.js → post-92683818.js} +2 -2
  176. package/build/esm/profileNavigation.js +19 -19
  177. package/build/esm/progressBar.js +1 -1
  178. package/build/esm/pwg.js +22 -22
  179. package/build/esm/ssoV2/api/featureFlag.d.ts +2 -1
  180. package/build/esm/ssoV2.js +52 -40
  181. package/build/esm/{store-25c6b828.js → store-899aa3dd.js} +3 -3
  182. package/build/esm/subot.js +36 -36
  183. package/build/esm/surveyOrPremiumBanner.js +33 -33
  184. package/build/esm/surveyQuestionCard.js +10 -10
  185. package/build/esm/{surveyThankyouCard-9258b07d.js → surveyThankyouCard-272d1a63.js} +5 -5
  186. package/build/esm/together/components/molecules/createNewPostContentV2/index.styled.d.ts +7 -0
  187. package/build/esm/together/utils/index.d.ts +1 -0
  188. package/build/esm/together.js +56 -56
  189. package/build/esm/togetherApiUtils.js +4 -4
  190. package/build/esm/togetherAtoms.js +30 -30
  191. package/build/esm/togetherComponentGlobalContext.js +4 -4
  192. package/build/esm/togetherMolecules.js +51 -51
  193. package/build/esm/togetherMoleculesCardAuthor.js +28 -28
  194. package/build/esm/togetherMoleculesPostImagePreview.js +11 -11
  195. package/build/esm/togetherMoleculesProfileDetail.js +39 -39
  196. package/build/esm/togetherOrganisms.js +50 -50
  197. package/build/esm/togetherRichTextEditor.js +17 -17
  198. package/build/esm/togetherShareBox.js +10 -10
  199. package/build/esm/{translationsProvider-47642b78.js → translationsProvider-c06d92ab.js} +1 -1
  200. package/build/esm/{treePopoverMenu-e22aa257.js → treePopoverMenu-79eb6005.js} +19 -19
  201. package/build/esm/{types-d32c678d.js → types-afae9694.js} +2 -2
  202. package/build/esm/types.js +2 -2
  203. package/build/esm/{useCategory-f03c9e67.js → useCategory-527a2dba.js} +5 -5
  204. package/build/esm/{useHealthToolCache-848a58f6.js → useHealthToolCache-228044ce.js} +1 -1
  205. package/build/esm/{useMantineLocale-41118166.js → useMantineLocale-9b2cc745.js} +6 -6
  206. package/build/esm/{usePlacesAutocomplete-790db45f.js → usePlacesAutocomplete-b847fa53.js} +1 -1
  207. package/build/esm/{useScreenSize-6f13a7fd.js → useScreenSize-e5a11e21.js} +2 -2
  208. package/build/esm/useTogetherAuthRequiredAction.js +10 -10
  209. package/build/esm/{utils-15e98ad8.js → utils-1472497c.js} +5 -5
  210. package/build/esm/{utils-83401f11.js → utils-696f17ac.js} +3 -3
  211. package/build/esm/{utils-a3f438a4.js → utils-d0fc162a.js} +2 -2
  212. package/build/esm/{utils-dbc3846f.js → utils-f6a2afa8.js} +2 -2
  213. package/build/esm/vaccination.js +21 -21
  214. package/build/footer.js +21 -21
  215. package/build/gAssets.js +2 -2
  216. package/build/{healthTools-3bf83db8.js → healthTools-653caa50.js} +1 -1
  217. package/build/healthToolsCardWrapper.js +18 -18
  218. package/build/healthToolsForm.js +33 -33
  219. package/build/hooks/usePreventScroll.d.ts +2 -2
  220. package/build/hooks.js +13 -13
  221. package/build/i18n/translationKeys.d.ts +1 -1
  222. package/build/i18n-values/en-PH.js +1 -0
  223. package/build/i18n-values/hi-IN.js +1 -0
  224. package/build/i18n-values/id-ID.js +1 -0
  225. package/build/i18n-values/km-KH.js +1 -0
  226. package/build/i18n-values/ms-MY.js +1 -0
  227. package/build/i18n-values/my-MM.js +1 -0
  228. package/build/i18n-values/th-TH.js +1 -0
  229. package/build/i18n-values/tl-PH.js +1 -0
  230. package/build/i18n-values/vi-VN.js +1 -0
  231. package/build/i18n-values/vi-VN_MB.js +1 -0
  232. package/build/i18n-values/zh-CN.js +1 -0
  233. package/build/i18n-values/zh-TW.js +1 -0
  234. package/build/i18n.js +2 -2
  235. package/build/i18nV2.js +1 -1
  236. package/build/{index-644eb5a7.js → index-06dbea59.js} +7 -7
  237. package/build/{index-f7372714.js → index-10b1f42a.js} +15 -15
  238. package/build/{index-0395e458.js → index-1101dfdc.js} +31 -31
  239. package/build/{index-9856b9ef.js → index-21d84e7b.js} +1 -1
  240. package/build/{index-0611ad61.js → index-21eade5f.js} +2 -2
  241. package/build/{index-ddb6b444.js → index-25a87fcf.js} +17 -17
  242. package/build/{index-6ba6df7e.js → index-25c28b49.js} +3 -3
  243. package/build/{index-be7f512c.js → index-26c8a767.js} +24 -24
  244. package/build/{index-bfb52fca.js → index-26f118d2.js} +16 -16
  245. package/build/{index-6c4bee8e.js → index-320c9632.js} +2 -2
  246. package/build/{index-7f05c8a7.js → index-32a9e4ae.js} +13 -13
  247. package/build/{index-12464ef6.js → index-38ac79da.js} +1 -1
  248. package/build/{index-f17a396c.js → index-3e1e7484.js} +6 -6
  249. package/build/{index-3a5b485a.js → index-3f1880c4.js} +1 -1
  250. package/build/{index-b0d41cce.js → index-4037d951.js} +2 -2
  251. package/build/{index-47dfeae7.js → index-48764132.js} +16 -16
  252. package/build/{index-d9eef270.js → index-4f64c513.js} +1 -1
  253. package/build/{index-ed6fc31b.js → index-52347ef0.js} +2 -2
  254. package/build/{index-856226fb.js → index-5682321c.js} +2 -2
  255. package/build/{index-abdc048e.js → index-5bc43e8f.js} +2 -2
  256. package/build/{index-d8a37820.js → index-5e7659c6.js} +3 -3
  257. package/build/{index-e5275d1f.js → index-64b6b559.js} +18 -18
  258. package/build/{index-856c2891.js → index-66a4e511.js} +2 -2
  259. package/build/{index-9e3f7d45.js → index-6a41c996.js} +4 -4
  260. package/build/{index-0dffb6c4.js → index-74f52a77.js} +119 -5
  261. package/build/{index-5c09228b.js → index-794b7e5b.js} +13 -13
  262. package/build/{index-a006bd68.js → index-81d7ceae.js} +2 -2
  263. package/build/{index-95d5222f.js → index-82b21243.js} +6 -6
  264. package/build/{index-b74bd81f.js → index-83f6cfa6.js} +3 -3
  265. package/build/{index-c41e383f.js → index-8453f5e1.js} +3 -3
  266. package/build/{index-b2c78e7e.js → index-85cbd270.js} +2 -2
  267. package/build/{index-cbacaaee.js → index-8bda455f.js} +11 -11
  268. package/build/{index-ae24413b.js → index-93d97716.js} +1 -1
  269. package/build/{index-437a1767.js → index-94506884.js} +3 -3
  270. package/build/{index-2eda3c07.js → index-95a0e7d1.js} +7 -7
  271. package/build/{index-0b7789cb.js → index-95a4a19d.js} +16 -16
  272. package/build/{index-af161468.js → index-99997dc7.js} +212 -146
  273. package/build/{index-8c03a89a.js → index-9a0129ef.js} +1 -1
  274. package/build/{index-2ba74822.js → index-9b749bae.js} +21 -21
  275. package/build/{index-6cc14025.js → index-9b9bc510.js} +17 -17
  276. package/build/{index-878f8dc8.js → index-9f4d2f6a.js} +22 -22
  277. package/build/{index-4aad3984.js → index-a67ea5b9.js} +8 -8
  278. package/build/{index-dcae31ae.js → index-aa4f5002.js} +25 -25
  279. package/build/{index-f305f43f.js → index-b0b7671b.js} +16 -16
  280. package/build/{index-45eca5e2.js → index-b468d338.js} +6 -6
  281. package/build/{index-0dbec5e2.js → index-b9938263.js} +5 -5
  282. package/build/{index-54d513ab.js → index-bcf73fc1.js} +31 -31
  283. package/build/{index-43b5370e.js → index-c7cad49b.js} +2 -2
  284. package/build/{index-908d7f27.js → index-c896959e.js} +18 -18
  285. package/build/{index-a7d78872.js → index-cc27e469.js} +17 -17
  286. package/build/{index-982076f5.js → index-ce581ccb.js} +10 -10
  287. package/build/{index-36e6ab4b.js → index-d0dd024f.js} +3 -3
  288. package/build/{index-1371f85a.js → index-d244a891.js} +2 -2
  289. package/build/{index-44af5fe1.js → index-d6ba08ae.js} +13 -13
  290. package/build/{index-efbf26eb.js → index-d83af8e4.js} +6 -6
  291. package/build/{index-1c7561b3.js → index-dac62e55.js} +1 -1
  292. package/build/{index-f46495e8.js → index-dbb59ecb.js} +2 -2
  293. package/build/{index-27db637d.js → index-e71d7076.js} +2 -2
  294. package/build/{index-354f526f.js → index-eb2a4a99.js} +1 -1
  295. package/build/{index-6008020d.js → index-ec120e45.js} +6 -6
  296. package/build/{index-4fd8817f.js → index-ed60d558.js} +13 -13
  297. package/build/{index-57abfea5.js → index-f2a87773.js} +17 -17
  298. package/build/{index-f39922db.js → index-f6aac7e2.js} +1 -1
  299. package/build/{index-f53850dd.js → index-f77114be.js} +4 -4
  300. package/build/index.js +184 -185
  301. package/build/{labelSorting-5efeb80c.js → labelSorting-e7776dea.js} +4 -4
  302. package/build/lead/LeadGenForm/LeadGenEmpty.d.ts +8 -0
  303. package/build/lead/LeadGenLightBoxB/LeadGenLightBoxB.styled.d.ts +262 -0
  304. package/build/lead/icons/NoData.d.ts +3 -0
  305. package/build/lead/icons/index.d.ts +5 -0
  306. package/build/lead.css +1 -1
  307. package/build/lead.js +735 -129
  308. package/build/{logoIcon-b82964e8.js → logoIcon-9b552c6b.js} +2 -2
  309. package/build/mantine.js +22 -22
  310. package/build/misc.js +17 -17
  311. package/build/miscGetDynamicHealthTool.js +4 -4
  312. package/build/miscGetSocialList.js +8 -8
  313. package/build/miscScreenSizeContext.js +1 -1
  314. package/build/mobileBottomNavigation.js +5 -5
  315. package/build/mobileBottomNavigationIcon.js +5 -5
  316. package/build/molecules.js +74 -74
  317. package/build/moleculesArticleCard.js +6 -6
  318. package/build/moleculesArticleCardV2.js +16 -16
  319. package/build/navigation.js +46 -46
  320. package/build/navigationLogoutPopup.js +9 -9
  321. package/build/navigationProfileButton.js +23 -23
  322. package/build/onboardingV2.js +28 -28
  323. package/build/organisms.js +50 -50
  324. package/build/{post-ff6145f1.js → post-a890e84e.js} +2 -2
  325. package/build/profileNavigation.js +19 -19
  326. package/build/progressBar.js +1 -1
  327. package/build/pwg.js +22 -22
  328. package/build/ssoV2/api/featureFlag.d.ts +2 -1
  329. package/build/ssoV2.js +50 -38
  330. package/build/{store-dcbaa402.js → store-782200be.js} +3 -3
  331. package/build/subot.js +35 -35
  332. package/build/surveyOrPremiumBanner.js +33 -33
  333. package/build/surveyQuestionCard.js +10 -10
  334. package/build/{surveyThankyouCard-39255f44.js → surveyThankyouCard-2d6083c8.js} +5 -5
  335. package/build/together/components/molecules/createNewPostContentV2/index.styled.d.ts +7 -0
  336. package/build/together/utils/index.d.ts +1 -0
  337. package/build/together.js +56 -56
  338. package/build/togetherApiUtils.js +4 -4
  339. package/build/togetherAtoms.js +30 -30
  340. package/build/togetherComponentGlobalContext.js +4 -4
  341. package/build/togetherMolecules.js +51 -51
  342. package/build/togetherMoleculesCardAuthor.js +28 -28
  343. package/build/togetherMoleculesPostImagePreview.js +11 -11
  344. package/build/togetherMoleculesProfileDetail.js +39 -39
  345. package/build/togetherOrganisms.js +50 -50
  346. package/build/togetherRichTextEditor.js +17 -17
  347. package/build/togetherShareBox.js +10 -10
  348. package/build/{translationsProvider-1f3fa7f9.js → translationsProvider-e394c55a.js} +1 -1
  349. package/build/{treePopoverMenu-8efa842d.js → treePopoverMenu-b601dbeb.js} +19 -19
  350. package/build/{types-0a7a06d0.js → types-2c12bc70.js} +2 -2
  351. package/build/types.js +2 -2
  352. package/build/{useCategory-fc9d2495.js → useCategory-9e6fd5ca.js} +5 -5
  353. package/build/{useHealthToolCache-f0f3c021.js → useHealthToolCache-7096516c.js} +1 -1
  354. package/build/{useMantineLocale-70c2855e.js → useMantineLocale-c8139bb7.js} +6 -6
  355. package/build/{usePlacesAutocomplete-3851d770.js → usePlacesAutocomplete-80b6a1e1.js} +1 -1
  356. package/build/{useScreenSize-1014b9df.js → useScreenSize-fa9a40dc.js} +2 -2
  357. package/build/useTogetherAuthRequiredAction.js +10 -10
  358. package/build/{utils-842f5cbb.js → utils-1de1db2d.js} +5 -5
  359. package/build/{utils-9dbb9b30.js → utils-6c1cf762.js} +2 -2
  360. package/build/{utils-619f5126.js → utils-99e1e148.js} +3 -3
  361. package/build/{utils-a2025a7b.js → utils-b0814ee8.js} +2 -2
  362. package/build/vaccination.js +21 -21
  363. package/package.json +1 -1
  364. package/build/esm/index-35fefdf8.js +0 -118
  365. package/build/index-397fe63a.js +0 -125
  366. /package/build/{BMI_BOYS.percentile.monthly-ad877ea9.js → BMI_BOYS.percentile.monthly-4d41c55c.js} +0 -0
  367. /package/build/{BMI_BOYS.percentile.weekly-20f25b98.js → BMI_BOYS.percentile.weekly-0bbdced4.js} +0 -0
  368. /package/build/{BMI_BOYS.percentile.yearly-b28dd1f4.js → BMI_BOYS.percentile.yearly-f4393bc6.js} +0 -0
  369. /package/build/{BMI_BOYS.zscore.monthly-cd57a7b4.js → BMI_BOYS.zscore.monthly-aae853cc.js} +0 -0
  370. /package/build/{BMI_BOYS.zscore.weekly-02ced639.js → BMI_BOYS.zscore.weekly-6255c659.js} +0 -0
  371. /package/build/{BMI_BOYS.zscore.yearly-09fcbeee.js → BMI_BOYS.zscore.yearly-62fc5e16.js} +0 -0
  372. /package/build/{BMI_GIRLS.percentile.monthly-63c8a9f4.js → BMI_GIRLS.percentile.monthly-9d68b1a1.js} +0 -0
  373. /package/build/{BMI_GIRLS.percentile.weekly-782b69b5.js → BMI_GIRLS.percentile.weekly-3614e5bb.js} +0 -0
  374. /package/build/{BMI_GIRLS.percentile.yearly-d11b201d.js → BMI_GIRLS.percentile.yearly-bc551fb0.js} +0 -0
  375. /package/build/{BMI_GIRLS.zscore.monthly-68daac75.js → BMI_GIRLS.zscore.monthly-54ce035b.js} +0 -0
  376. /package/build/{BMI_GIRLS.zscore.weekly-365398d0.js → BMI_GIRLS.zscore.weekly-e6f1bd2c.js} +0 -0
  377. /package/build/{BMI_GIRLS.zscore.yearly-f958b797.js → BMI_GIRLS.zscore.yearly-1aaf4bae.js} +0 -0
  378. /package/build/{ChevronDown-ee087832.js → ChevronDown-2cd29bf1.js} +0 -0
  379. /package/build/{Close-9f319481.js → Close-f80f974b.js} +0 -0
  380. /package/build/{Google-a803a647.js → Google-d92c7d7e.js} +0 -0
  381. /package/build/{HEAD CIRCUM_BOYS.percentile.monthly-d5048969.js → HEAD CIRCUM_BOYS.percentile.monthly-2d3e11e4.js} +0 -0
  382. /package/build/{HEAD CIRCUM_BOYS.percentile.weekly-44a391ee.js → HEAD CIRCUM_BOYS.percentile.weekly-d549e837.js} +0 -0
  383. /package/build/{HEAD CIRCUM_BOYS.percentile.yearly-ffbec09a.js → HEAD CIRCUM_BOYS.percentile.yearly-5b7c1144.js} +0 -0
  384. /package/build/{HEAD CIRCUM_BOYS.zscore.monthly-9239a118.js → HEAD CIRCUM_BOYS.zscore.monthly-8f8c0f27.js} +0 -0
  385. /package/build/{HEAD CIRCUM_BOYS.zscore.weekly-7f4c5a2c.js → HEAD CIRCUM_BOYS.zscore.weekly-e42060db.js} +0 -0
  386. /package/build/{HEAD CIRCUM_BOYS.zscore.yearly-9b6734d7.js → HEAD CIRCUM_BOYS.zscore.yearly-067624be.js} +0 -0
  387. /package/build/{HEAD CIRCUM_GIRLS.percentile.monthly-be241e7c.js → HEAD CIRCUM_GIRLS.percentile.monthly-a15af00e.js} +0 -0
  388. /package/build/{HEAD CIRCUM_GIRLS.percentile.weekly-6c92302c.js → HEAD CIRCUM_GIRLS.percentile.weekly-45f5a4b9.js} +0 -0
  389. /package/build/{HEAD CIRCUM_GIRLS.percentile.yearly-92092433.js → HEAD CIRCUM_GIRLS.percentile.yearly-3bcd95ad.js} +0 -0
  390. /package/build/{HEAD CIRCUM_GIRLS.zscore.monthly-9180f72a.js → HEAD CIRCUM_GIRLS.zscore.monthly-e8454274.js} +0 -0
  391. /package/build/{HEAD CIRCUM_GIRLS.zscore.weekly-60ae4529.js → HEAD CIRCUM_GIRLS.zscore.weekly-d3dbb659.js} +0 -0
  392. /package/build/{HEAD CIRCUM_GIRLS.zscore.yearly-707dc4e8.js → HEAD CIRCUM_GIRLS.zscore.yearly-d91d82e0.js} +0 -0
  393. /package/build/{HEIGHT_BOYS.percentile.monthly-a68374b4.js → HEIGHT_BOYS.percentile.monthly-3ac06ede.js} +0 -0
  394. /package/build/{HEIGHT_BOYS.percentile.weekly-aa0781d8.js → HEIGHT_BOYS.percentile.weekly-e5fd04d3.js} +0 -0
  395. /package/build/{HEIGHT_BOYS.percentile.yearly-7e9d1319.js → HEIGHT_BOYS.percentile.yearly-c329c1d7.js} +0 -0
  396. /package/build/{HEIGHT_BOYS.zscore.monthly-2dafd6bd.js → HEIGHT_BOYS.zscore.monthly-15dc2e18.js} +0 -0
  397. /package/build/{HEIGHT_BOYS.zscore.weekly-6b147ba5.js → HEIGHT_BOYS.zscore.weekly-7b2d1a00.js} +0 -0
  398. /package/build/{HEIGHT_BOYS.zscore.yearly-c71ade21.js → HEIGHT_BOYS.zscore.yearly-3c6d7abf.js} +0 -0
  399. /package/build/{HEIGHT_GIRLS.percentile.monthly-0ae4b3e0.js → HEIGHT_GIRLS.percentile.monthly-c9b83e03.js} +0 -0
  400. /package/build/{HEIGHT_GIRLS.percentile.weekly-bb2adf78.js → HEIGHT_GIRLS.percentile.weekly-8497ca54.js} +0 -0
  401. /package/build/{HEIGHT_GIRLS.percentile.yearly-448741a8.js → HEIGHT_GIRLS.percentile.yearly-38b91770.js} +0 -0
  402. /package/build/{HEIGHT_GIRLS.zscore.monthly-95e226f6.js → HEIGHT_GIRLS.zscore.monthly-154003c8.js} +0 -0
  403. /package/build/{HEIGHT_GIRLS.zscore.weekly-bfa9530c.js → HEIGHT_GIRLS.zscore.weekly-22d875d9.js} +0 -0
  404. /package/build/{HEIGHT_GIRLS.zscore.yearly-513d2cdd.js → HEIGHT_GIRLS.zscore.yearly-d4f7f1a1.js} +0 -0
  405. /package/build/{Locale-07761401.js → Locale-635991da.js} +0 -0
  406. /package/build/{Visible-d53e80e8.js → Visible-3a19dcd9.js} +0 -0
  407. /package/build/{WEIGHT_BOYS.percentile.monthly-e4504e21.js → WEIGHT_BOYS.percentile.monthly-d9c7a5da.js} +0 -0
  408. /package/build/{WEIGHT_BOYS.percentile.weekly-408f6229.js → WEIGHT_BOYS.percentile.weekly-98fbe22d.js} +0 -0
  409. /package/build/{WEIGHT_BOYS.percentile.yearly-fbf7b423.js → WEIGHT_BOYS.percentile.yearly-2370f316.js} +0 -0
  410. /package/build/{WEIGHT_BOYS.zscore.monthly-8ad79df1.js → WEIGHT_BOYS.zscore.monthly-ecff2b53.js} +0 -0
  411. /package/build/{WEIGHT_BOYS.zscore.weekly-152e5b81.js → WEIGHT_BOYS.zscore.weekly-691e0972.js} +0 -0
  412. /package/build/{WEIGHT_BOYS.zscore.yearly-eafff075.js → WEIGHT_BOYS.zscore.yearly-f3dde836.js} +0 -0
  413. /package/build/{WEIGHT_GIRLS.percentile.monthly-8926de73.js → WEIGHT_GIRLS.percentile.monthly-1e5c08c9.js} +0 -0
  414. /package/build/{WEIGHT_GIRLS.percentile.weekly-81513545.js → WEIGHT_GIRLS.percentile.weekly-9525bab3.js} +0 -0
  415. /package/build/{WEIGHT_GIRLS.percentile.yearly-0c4d0577.js → WEIGHT_GIRLS.percentile.yearly-8352f79a.js} +0 -0
  416. /package/build/{WEIGHT_GIRLS.zscore.monthly-4f9f7e50.js → WEIGHT_GIRLS.zscore.monthly-51e5f4fd.js} +0 -0
  417. /package/build/{WEIGHT_GIRLS.zscore.weekly-14b366c1.js → WEIGHT_GIRLS.zscore.weekly-ff4c8327.js} +0 -0
  418. /package/build/{WEIGHT_GIRLS.zscore.yearly-d2c4271f.js → WEIGHT_GIRLS.zscore.yearly-229bddb3.js} +0 -0
  419. /package/build/{animation-ca60f37f.js → animation-27b62223.js} +0 -0
  420. /package/build/{constants-1e73c9ee.js → constants-2761c1ca.js} +0 -0
  421. /package/build/{constants-577f2346.js → constants-601f5c57.js} +0 -0
  422. /package/build/{constants-2ef2576b.js → constants-88c217e9.js} +0 -0
  423. /package/build/{dataTransform-70a89108.js → dataTransform-4d86f853.js} +0 -0
  424. /package/build/esm/{BMI_BOYS.percentile.monthly-4ed3845a.js → BMI_BOYS.percentile.monthly-9d2865c9.js} +0 -0
  425. /package/build/esm/{BMI_BOYS.percentile.weekly-ca402c08.js → BMI_BOYS.percentile.weekly-a88623f5.js} +0 -0
  426. /package/build/esm/{BMI_BOYS.percentile.yearly-16aa0ea7.js → BMI_BOYS.percentile.yearly-e38296b1.js} +0 -0
  427. /package/build/esm/{BMI_BOYS.zscore.monthly-4188ea03.js → BMI_BOYS.zscore.monthly-f6b08b71.js} +0 -0
  428. /package/build/esm/{BMI_BOYS.zscore.weekly-9cd31b4b.js → BMI_BOYS.zscore.weekly-203321fe.js} +0 -0
  429. /package/build/esm/{BMI_BOYS.zscore.yearly-b2e79e14.js → BMI_BOYS.zscore.yearly-42facc2d.js} +0 -0
  430. /package/build/esm/{BMI_GIRLS.percentile.monthly-8487754a.js → BMI_GIRLS.percentile.monthly-da7c670b.js} +0 -0
  431. /package/build/esm/{BMI_GIRLS.percentile.weekly-7d9db100.js → BMI_GIRLS.percentile.weekly-7622536c.js} +0 -0
  432. /package/build/esm/{BMI_GIRLS.percentile.yearly-0acdaed3.js → BMI_GIRLS.percentile.yearly-b4f425f8.js} +0 -0
  433. /package/build/esm/{BMI_GIRLS.zscore.monthly-d0e4723a.js → BMI_GIRLS.zscore.monthly-1929ac3c.js} +0 -0
  434. /package/build/esm/{BMI_GIRLS.zscore.weekly-32e3f351.js → BMI_GIRLS.zscore.weekly-e2cdae1f.js} +0 -0
  435. /package/build/esm/{BMI_GIRLS.zscore.yearly-dad5d653.js → BMI_GIRLS.zscore.yearly-75e1959d.js} +0 -0
  436. /package/build/esm/{ChevronDown-c3f963a5.js → ChevronDown-4f1b9955.js} +0 -0
  437. /package/build/esm/{Close-20df0bd5.js → Close-6fe1b9a2.js} +0 -0
  438. /package/build/esm/{Google-dd3016a9.js → Google-0cd3c69d.js} +0 -0
  439. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.monthly-8894d48b.js → HEAD CIRCUM_BOYS.percentile.monthly-9c18ff34.js} +0 -0
  440. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.weekly-dc5cdd48.js → HEAD CIRCUM_BOYS.percentile.weekly-4a61bacf.js} +0 -0
  441. /package/build/esm/{HEAD CIRCUM_BOYS.percentile.yearly-c09badba.js → HEAD CIRCUM_BOYS.percentile.yearly-44125ece.js} +0 -0
  442. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.monthly-d2d6a979.js → HEAD CIRCUM_BOYS.zscore.monthly-d9a45b24.js} +0 -0
  443. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.weekly-8f61e2e7.js → HEAD CIRCUM_BOYS.zscore.weekly-6b7a699b.js} +0 -0
  444. /package/build/esm/{HEAD CIRCUM_BOYS.zscore.yearly-6994ed4e.js → HEAD CIRCUM_BOYS.zscore.yearly-e163e188.js} +0 -0
  445. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.monthly-4ce5505d.js → HEAD CIRCUM_GIRLS.percentile.monthly-4c6bc353.js} +0 -0
  446. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.weekly-1834ad81.js → HEAD CIRCUM_GIRLS.percentile.weekly-520df883.js} +0 -0
  447. /package/build/esm/{HEAD CIRCUM_GIRLS.percentile.yearly-a90bc53d.js → HEAD CIRCUM_GIRLS.percentile.yearly-82eb37ff.js} +0 -0
  448. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.monthly-ec718985.js → HEAD CIRCUM_GIRLS.zscore.monthly-c7aefa10.js} +0 -0
  449. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.weekly-dd6fb048.js → HEAD CIRCUM_GIRLS.zscore.weekly-5aa8d19f.js} +0 -0
  450. /package/build/esm/{HEAD CIRCUM_GIRLS.zscore.yearly-d52f81be.js → HEAD CIRCUM_GIRLS.zscore.yearly-05f0a933.js} +0 -0
  451. /package/build/esm/{HEIGHT_BOYS.percentile.monthly-57d1cc48.js → HEIGHT_BOYS.percentile.monthly-fb8d2a02.js} +0 -0
  452. /package/build/esm/{HEIGHT_BOYS.percentile.weekly-8c9ba925.js → HEIGHT_BOYS.percentile.weekly-fe63a8da.js} +0 -0
  453. /package/build/esm/{HEIGHT_BOYS.percentile.yearly-1a00f66d.js → HEIGHT_BOYS.percentile.yearly-852109aa.js} +0 -0
  454. /package/build/esm/{HEIGHT_BOYS.zscore.monthly-3d4d60c7.js → HEIGHT_BOYS.zscore.monthly-99451d28.js} +0 -0
  455. /package/build/esm/{HEIGHT_BOYS.zscore.weekly-6a7b2ac9.js → HEIGHT_BOYS.zscore.weekly-f7bd0016.js} +0 -0
  456. /package/build/esm/{HEIGHT_BOYS.zscore.yearly-ddddccce.js → HEIGHT_BOYS.zscore.yearly-751bb07c.js} +0 -0
  457. /package/build/esm/{HEIGHT_GIRLS.percentile.monthly-95d07f66.js → HEIGHT_GIRLS.percentile.monthly-9b7f95e0.js} +0 -0
  458. /package/build/esm/{HEIGHT_GIRLS.percentile.weekly-8aa56c60.js → HEIGHT_GIRLS.percentile.weekly-8fc67913.js} +0 -0
  459. /package/build/esm/{HEIGHT_GIRLS.percentile.yearly-466b8b7c.js → HEIGHT_GIRLS.percentile.yearly-e0fc0cef.js} +0 -0
  460. /package/build/esm/{HEIGHT_GIRLS.zscore.monthly-8738228c.js → HEIGHT_GIRLS.zscore.monthly-54920f91.js} +0 -0
  461. /package/build/esm/{HEIGHT_GIRLS.zscore.weekly-a566d7d8.js → HEIGHT_GIRLS.zscore.weekly-fe43d7f6.js} +0 -0
  462. /package/build/esm/{HEIGHT_GIRLS.zscore.yearly-222a4655.js → HEIGHT_GIRLS.zscore.yearly-30088e6d.js} +0 -0
  463. /package/build/esm/{Locale-2680ebb3.js → Locale-3c079669.js} +0 -0
  464. /package/build/esm/{Visible-89fc62dd.js → Visible-74e0fd50.js} +0 -0
  465. /package/build/esm/{WEIGHT_BOYS.percentile.monthly-0761d04a.js → WEIGHT_BOYS.percentile.monthly-9ba88b6a.js} +0 -0
  466. /package/build/esm/{WEIGHT_BOYS.percentile.weekly-5399ce71.js → WEIGHT_BOYS.percentile.weekly-21738f23.js} +0 -0
  467. /package/build/esm/{WEIGHT_BOYS.percentile.yearly-6a3fd579.js → WEIGHT_BOYS.percentile.yearly-2db979c3.js} +0 -0
  468. /package/build/esm/{WEIGHT_BOYS.zscore.monthly-7b810532.js → WEIGHT_BOYS.zscore.monthly-976c506e.js} +0 -0
  469. /package/build/esm/{WEIGHT_BOYS.zscore.weekly-f241b744.js → WEIGHT_BOYS.zscore.weekly-e8447e35.js} +0 -0
  470. /package/build/esm/{WEIGHT_BOYS.zscore.yearly-f188c232.js → WEIGHT_BOYS.zscore.yearly-a0ac81d2.js} +0 -0
  471. /package/build/esm/{WEIGHT_GIRLS.percentile.monthly-d942be86.js → WEIGHT_GIRLS.percentile.monthly-481857dd.js} +0 -0
  472. /package/build/esm/{WEIGHT_GIRLS.percentile.weekly-b9d69043.js → WEIGHT_GIRLS.percentile.weekly-8c85e143.js} +0 -0
  473. /package/build/esm/{WEIGHT_GIRLS.percentile.yearly-efd30967.js → WEIGHT_GIRLS.percentile.yearly-ed8939b4.js} +0 -0
  474. /package/build/esm/{WEIGHT_GIRLS.zscore.monthly-ad05061e.js → WEIGHT_GIRLS.zscore.monthly-189bcee0.js} +0 -0
  475. /package/build/esm/{WEIGHT_GIRLS.zscore.weekly-1bb61a63.js → WEIGHT_GIRLS.zscore.weekly-379a055e.js} +0 -0
  476. /package/build/esm/{WEIGHT_GIRLS.zscore.yearly-420c6d2b.js → WEIGHT_GIRLS.zscore.yearly-026457d0.js} +0 -0
  477. /package/build/esm/{animation-cb77c558.js → animation-0d7dec8f.js} +0 -0
  478. /package/build/esm/{constants-34416881.js → constants-10c6bd63.js} +0 -0
  479. /package/build/esm/{constants-54f00416.js → constants-23d94304.js} +0 -0
  480. /package/build/esm/{constants-d137c8ef.js → constants-b9518376.js} +0 -0
  481. /package/build/esm/{dataTransform-49e51307.js → dataTransform-dfff0623.js} +0 -0
  482. /package/build/esm/{index-eb396268.js → index-07c24591.js} +0 -0
  483. /package/build/esm/{index-7a4cfc95.js → index-1721ed88.js} +0 -0
  484. /package/build/esm/{index-67830e99.js → index-5c6c0311.js} +0 -0
  485. /package/build/esm/{index-188012d7.js → index-8839fe4b.js} +0 -0
  486. /package/build/esm/{index-6d329505.js → index-8e5beeda.js} +0 -0
  487. /package/build/esm/{index-1ee3b4c0.js → index-def91b42.js} +0 -0
  488. /package/build/esm/{index-495e0eca.js → index-edd9916a.js} +0 -0
  489. /package/build/esm/{index-57ef8115.js → index-f93e5017.js} +0 -0
  490. /package/build/esm/{index.styles-bcc9b795.js → index.styles-491e88da.js} +0 -0
  491. /package/build/esm/lead/layouts/{ emptyIcon.d.ts → emptyIcon.d.ts} +0 -0
  492. /package/build/esm/{localizeNumberFormat-415f8b3b.js → localizeNumberFormat-44c5e76d.js} +0 -0
  493. /package/build/esm/{normalizeLink-e7bcd5c8.js → normalizeLink-7cb62382.js} +0 -0
  494. /package/build/esm/{number-55c31619.js → number-69408502.js} +0 -0
  495. /package/build/esm/{other-680529e5.js → other-94474cd6.js} +0 -0
  496. /package/build/esm/{paths-608ea9ef.js → paths-ede75552.js} +0 -0
  497. /package/build/esm/{translationsContext-c41a99f3.js → translationsContext-4576c0e2.js} +0 -0
  498. /package/build/esm/{tslib.es6-7369a886.js → tslib.es6-14dd4d35.js} +0 -0
  499. /package/build/esm/{types-db49d755.js → types-c668ae44.js} +0 -0
  500. /package/build/esm/{useIsInit-7e5346fc.js → useIsInit-c50f4ae4.js} +0 -0
  501. /package/build/esm/{useOutsideClick-3a261a60.js → useOutsideClick-9c282fb7.js} +0 -0
  502. /package/build/esm/{useScrollbarSize-21b194d3.js → useScrollbarSize-e529618a.js} +0 -0
  503. /package/build/esm/{useUniqueId-d6bcf402.js → useUniqueId-a1f357b3.js} +0 -0
  504. /package/build/esm/{utils-e60df37f.js → utils-33115067.js} +0 -0
  505. /package/build/{index-eb579552.js → index-0e412c95.js} +0 -0
  506. /package/build/{index-8645866a.js → index-2d7cafe2.js} +0 -0
  507. /package/build/{index-74085b56.js → index-2f78dffb.js} +0 -0
  508. /package/build/{index-d468e339.js → index-34cfe316.js} +0 -0
  509. /package/build/{index-49e3f7a6.js → index-35ef2747.js} +0 -0
  510. /package/build/{index-53e2737c.js → index-3d7b00a9.js} +0 -0
  511. /package/build/{index-0603e5ad.js → index-75612645.js} +0 -0
  512. /package/build/{index-58c9ecc0.js → index-e0a2e6c4.js} +0 -0
  513. /package/build/{index.styles-c72f23e6.js → index.styles-daf6d59a.js} +0 -0
  514. /package/build/lead/layouts/{ emptyIcon.d.ts → emptyIcon.d.ts} +0 -0
  515. /package/build/{localizeNumberFormat-5e848aeb.js → localizeNumberFormat-f6aeb325.js} +0 -0
  516. /package/build/{normalizeLink-9a857fc1.js → normalizeLink-1cd199de.js} +0 -0
  517. /package/build/{number-1f09201d.js → number-84913da7.js} +0 -0
  518. /package/build/{other-364bdd32.js → other-8fdfa714.js} +0 -0
  519. /package/build/{paths-6ff798b4.js → paths-a41bd71a.js} +0 -0
  520. /package/build/{translationsContext-4ffd4844.js → translationsContext-16e64ae3.js} +0 -0
  521. /package/build/{tslib.es6-d58803ed.js → tslib.es6-84736a3d.js} +0 -0
  522. /package/build/{types-821bed4a.js → types-5f7fee1e.js} +0 -0
  523. /package/build/{useIsInit-80f58117.js → useIsInit-337fe815.js} +0 -0
  524. /package/build/{useOutsideClick-f78bb49d.js → useOutsideClick-a95ebce3.js} +0 -0
  525. /package/build/{useScrollbarSize-0f19f4af.js → useScrollbarSize-dc8b348d.js} +0 -0
  526. /package/build/{useUniqueId-ab6eea4a.js → useUniqueId-a4b561bf.js} +0 -0
  527. /package/build/{utils-7cc85cb5.js → utils-eedfe9e1.js} +0 -0
package/build/esm/lead.js CHANGED
@@ -1,52 +1,52 @@
1
- import { _ as __rest, a as __awaiter } from './tslib.es6-7369a886.js';
2
- import React__default, { createContext, useMemo, useEffect, useRef, useState, useContext, useCallback, forwardRef, useImperativeHandle, memo } from 'react';
3
- import { createStyles, Box, Button as Button$1, Input as Input$1, clsx, Autocomplete, Checkbox as Checkbox$1, Radio as Radio$1, Select as Select$1, TextInput, NumberInput as NumberInput$1, Portal, Transition, Overlay } from '@mantine/core';
1
+ import { _ as __rest, a as __awaiter } from './tslib.es6-14dd4d35.js';
2
+ import React__default, { createContext, useMemo, useEffect, useRef, useState, useContext, useCallback, forwardRef, useImperativeHandle, memo, useLayoutEffect } from 'react';
3
+ import { createStyles, Box, Button as Button$1, Input as Input$1, Autocomplete, clsx, Checkbox as Checkbox$1, Radio as Radio$1, Select as Select$1, TextInput, NumberInput as NumberInput$1, Portal, Transition, Overlay } from '@mantine/core';
4
4
  import dayjs from 'dayjs';
5
5
  import debounce from 'lodash/debounce';
6
6
  import { createFormContext, useForm } from '@mantine/form';
7
- import { B as BEARER_TOKEN_COOKIE } from './index-fd8d47d1.js';
7
+ import { B as BEARER_TOKEN_COOKIE } from './index-a4323bc7.js';
8
8
  import { getCookie, setCookie } from './miscCookieHelper.js';
9
- import { u as useTranslations } from './index-28a1dbbd.js';
10
- import { T as TranslationsContext } from './translationsContext-c41a99f3.js';
11
- import { M as MediaQueries, b as getWrapperDomWithSelector, a as getPopupWrapperDom } from './utils-e60df37f.js';
12
- import { T as Text } from './index-b43b8fce.js';
13
- import { S as Select, d as Checkbox, I as Input, R as Radio, P as Phone, N as NumberInput, O as OTP } from './index-a0aefa52.js';
14
- import { D as DatePicker } from './index-feed474a.js';
15
- import { B as Button } from './index-61d04b9e.js';
16
- import './index.styles-bcc9b795.js';
9
+ import { u as useTranslations } from './index-6fca5112.js';
10
+ import { T as TranslationsContext } from './translationsContext-4576c0e2.js';
11
+ import { M as MediaQueries, b as getWrapperDomWithSelector, a as getPopupWrapperDom } from './utils-33115067.js';
12
+ import { T as Text } from './index-353aaf10.js';
13
+ import { S as Select, d as Checkbox, I as Input, R as Radio, P as Phone, N as NumberInput, O as OTP } from './index-3d74a659.js';
14
+ import { D as DatePicker } from './index-4d2eb768.js';
15
+ import { B as Button } from './index-705b8d1a.js';
16
+ import './index.styles-491e88da.js';
17
17
  import { useClickOutside } from '@mantine/hooks';
18
- import './useMantineLocale-41118166.js';
19
- import { C as COMMON_DATE_TRANSLATE_KEY } from './index-938a3f78.js';
20
- import './index-1ee3b4c0.js';
21
- import { Z as ZINDEX_SSO, I as ISO_FORMAT } from './index-19ce2735.js';
22
- import './other-680529e5.js';
23
- import './index-42b16695.js';
24
- import { M as MAPPED_LOCALE } from './utils-a3f438a4.js';
18
+ import './useMantineLocale-9b2cc745.js';
19
+ import { C as COMMON_DATE_TRANSLATE_KEY } from './index-c7b5065c.js';
20
+ import './index-def91b42.js';
21
+ import { Z as ZINDEX_SSO, I as ISO_FORMAT } from './index-15518ce2.js';
22
+ import './other-94474cd6.js';
23
+ import './index-c68f7778.js';
24
+ import { M as MAPPED_LOCALE } from './utils-d0fc162a.js';
25
25
  import { DateInput } from '@mantine/dates';
26
- import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY } from './usePlacesAutocomplete-790db45f.js';
27
- import { H as Heading$1 } from './index-fd50ebba.js';
28
- import { t as translationsMap$1 } from './translationsProvider-47642b78.js';
29
- import { L as LOCALE } from './Locale-2680ebb3.js';
26
+ import { u as usePlacesAutocomplete, G as GOOGLE_API_KEY } from './usePlacesAutocomplete-b847fa53.js';
27
+ import { H as Heading$1 } from './index-2c6e15e2.js';
28
+ import { t as translationsMap$1 } from './translationsProvider-c06d92ab.js';
29
+ import { L as LOCALE } from './Locale-3c079669.js';
30
30
  import { v1 } from 'uuid';
31
31
  import { parsePhoneNumber } from 'react-phone-number-input';
32
32
  import styled from '@emotion/styled';
33
33
  import { theme } from './miscTheme.js';
34
34
  import { css } from '@emotion/react';
35
- import { T as TogetherComponentGlobalContext } from './utils-83401f11.js';
36
- import { i as isVideo } from './index-eb396268.js';
37
- import { u as useScreenSize } from './useScreenSize-6f13a7fd.js';
35
+ import { T as TogetherComponentGlobalContext } from './utils-696f17ac.js';
36
+ import { i as isVideo } from './index-07c24591.js';
37
+ import { u as useScreenSize } from './useScreenSize-e5a11e21.js';
38
+ import { motion } from 'framer-motion';
38
39
  import { createPortal } from 'react-dom';
39
- import { B as Button$2 } from './index-947fba42.js';
40
- import { I as InputDate } from './InputDate-5b2fc89b.js';
41
- import { D as DrawerComponent } from './index-35fefdf8.js';
42
- import { C as Close } from './Close-20df0bd5.js';
40
+ import { B as Button$2 } from './index-b61d2fa5.js';
41
+ import { I as InputDate } from './InputDate-36198e12.js';
42
+ import { C as Close } from './Close-6fe1b9a2.js';
43
43
  import './constantsIsProduction.js';
44
- import './normalizeLink-e7bcd5c8.js';
44
+ import './normalizeLink-7cb62382.js';
45
45
  import './constantsDomainLocales.js';
46
46
  import '@hhgtech/icons/other';
47
47
  import '@mantine/carousel';
48
48
  import 'classnames';
49
- import './useUniqueId-d6bcf402.js';
49
+ import './useUniqueId-a1f357b3.js';
50
50
  import './constantsSite.js';
51
51
  import '@hhgtech/icons/core';
52
52
  import '@mantine/notifications';
@@ -63,12 +63,11 @@ import './i18n-values/tl-PH.js';
63
63
  import './i18n-values/vi-VN.js';
64
64
  import './i18n-values/vi-VN_MB.js';
65
65
  import './i18n-values/zh-TW.js';
66
- import './index-6d329505.js';
66
+ import './index-8e5beeda.js';
67
67
  import 'slugify';
68
68
  import 'string-format';
69
69
  import './togetherApiPaths.js';
70
- import './constants-54f00416.js';
71
- import 'vaul';
70
+ import './constants-23d94304.js';
72
71
 
73
72
  const LeadGenComponentContext = createContext({});
74
73
 
@@ -2281,7 +2280,7 @@ const useLeadFormConfig = ({ listBlockAdded = [], validatingPhoneRef, validating
2281
2280
  }, {});
2282
2281
  }, [listBlockAdded.map((b) => b.name).join(','), format]);
2283
2282
  const form = useLeadForm({
2284
- validateInputOnChange: true,
2283
+ validateInputOnChange: false,
2285
2284
  validateInputOnBlur: true,
2286
2285
  clearInputErrorOnChange: true,
2287
2286
  validate: validateObj,
@@ -2467,6 +2466,66 @@ const PhoneInput = forwardRef((props, ref) => {
2467
2466
  React__default.createElement(Phone, Object.assign({}, restProps, { id: id, ref: ref, name: name, spellCheck: false, placeholder: placeholder, defaultCountry: defaultCountry, className: "mantine-Input-input", type: "tel", "data-control": "tel" })))));
2468
2467
  });
2469
2468
 
2469
+ const NoData = ({ className, style }) => {
2470
+ return (React__default.createElement("svg", { width: "64", height: "55", viewBox: "0 0 64 55", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className, style: style },
2471
+ React__default.createElement("path", { d: "M32.6226 54.0001C46.2852 54.0001 57.3652 43.0033 57.3652 29.4239C57.3652 15.8446 46.2852 4.84778 32.6226 4.84778C18.9599 4.84778 7.87988 15.8446 7.87988 29.4239C7.87988 43.0033 18.9599 54.0001 32.6226 54.0001Z", fill: "#E6EAF5" }),
2472
+ React__default.createElement("path", { d: "M51.5751 26.2165V41.2537C51.5751 44.3778 49.0342 46.9187 45.8684 46.9187H19.4596C16.3355 46.9187 13.7946 44.4195 13.7529 41.2954C13.7529 41.2537 13.7529 41.2537 13.7529 41.2121V26.2165C13.7529 26.1748 13.7529 26.1748 13.7529 26.1332C13.7529 26.0498 13.7529 25.9665 13.7946 25.8832C13.8362 25.7583 13.8779 25.675 13.9195 25.55L21.0008 12.0123C21.2507 11.4708 21.7922 11.1792 22.3754 11.1792H42.911C43.4941 11.1792 43.994 11.4708 44.2856 12.0123L51.3668 25.55C51.4085 25.6333 51.4501 25.7583 51.4918 25.8832C51.5751 25.9665 51.5751 26.0915 51.5751 26.2165Z", fill: "#D5DDEA" }),
2473
+ React__default.createElement("path", { d: "M51.5751 26.2164V42.7949C51.5751 45.0859 49.7423 46.9187 47.4096 46.9187H17.9184C15.6274 46.9187 13.7529 45.0859 13.7529 42.7949V26.1331C13.7529 26.0498 13.7529 25.9665 13.7946 25.8832H23.2918C24.708 25.8832 25.8743 27.0078 25.8743 28.4658C25.8743 29.1739 26.1659 29.8404 26.6241 30.2986C27.124 30.7984 27.7071 31.0483 28.4569 31.0483H36.9127C38.329 31.0483 39.4953 29.9237 39.4953 28.4658C39.4953 27.7576 39.7869 27.0912 40.2451 26.633C40.7449 26.1331 41.3281 25.8832 42.0362 25.8832H51.4918C51.5751 25.9665 51.5751 26.0915 51.5751 26.2164Z", fill: "url(#paint0_linear_2578_27197)" }),
2474
+ React__default.createElement("path", { d: "M56.7342 17.6773C57.6774 17.6773 58.442 16.9126 58.442 15.9694C58.442 15.0262 57.6774 14.2616 56.7342 14.2616C55.791 14.2616 55.0264 15.0262 55.0264 15.9694C55.0264 16.9126 55.791 17.6773 56.7342 17.6773Z", fill: "#EAEEF9" }),
2475
+ React__default.createElement("path", { d: "M55.0257 12.1373C55.6698 12.1373 56.192 11.6152 56.192 10.971C56.192 10.3269 55.6698 9.80469 55.0257 9.80469C54.3816 9.80469 53.8594 10.3269 53.8594 10.971C53.8594 11.6152 54.3816 12.1373 55.0257 12.1373Z", fill: "#EAEEF9" }),
2476
+ React__default.createElement("path", { d: "M7.79034 15.9694C8.43449 15.9694 8.95667 15.4472 8.95667 14.803C8.95667 14.1589 8.43449 13.6367 7.79034 13.6367C7.1462 13.6367 6.62402 14.1589 6.62402 14.803C6.62402 15.4472 7.1462 15.9694 7.79034 15.9694Z", fill: "#EAEEF9" }),
2477
+ React__default.createElement("path", { d: "M5.16603 41.6286C6.36229 41.6286 7.33205 40.6588 7.33205 39.4625C7.33205 38.2663 6.36229 37.2965 5.16603 37.2965C3.96976 37.2965 3 38.2663 3 39.4625C3 40.6588 3.96976 41.6286 5.16603 41.6286Z", fill: "#EAEEF9" }),
2478
+ React__default.createElement("path", { d: "M43.0864 6.16785C43.6301 12.1024 43.9019 13.4615 42.6711 18.8361C42.2708 20.0309 41.8705 21.3396 41.0128 22.25C39.812 23.6725 37.6392 24.2984 35.8666 23.8432C34.0368 23.388 32.5501 21.7948 32.2071 19.8602C31.9212 18.6654 32.3214 17.2429 33.3507 16.5032C34.4371 15.8204 35.981 15.9911 36.8958 16.8446C37.9251 17.6981 38.3254 19.0068 38.2682 20.2585C38.211 21.5103 37.7536 22.7621 37.1246 23.8432C35.7027 26.5014 35.1173 26.4916 32.2071 30.8575", stroke: "#ABB5CC", strokeMiterlimit: "10", strokeDasharray: "4 4" }),
2479
+ React__default.createElement("path", { d: "M46.2749 3.95757C46.0575 4.75059 45.1881 5.03896 44.3187 4.53431C43.3769 4.10176 42.7249 3.74129 42.8698 3.02037C43.0871 2.29945 43.9565 2.22735 44.9708 2.15526C46.2024 2.01108 46.4198 3.16455 46.2749 3.95757Z", fill: "#DAE2EB" }),
2480
+ React__default.createElement("path", { d: "M39.2479 4.67842C39.6102 5.32726 40.6245 5.75981 41.3489 5.11098C42.1459 4.39005 42.7979 3.88541 42.4357 3.16448C42.0734 2.51565 41.4938 2.73193 40.2622 2.87611C39.2479 3.09239 38.8132 3.9575 39.2479 4.67842Z", fill: "#DAE2EB" }),
2481
+ React__default.createElement("path", { d: "M42.4358 2.01104C42.9429 1.93895 43.4501 2.22732 43.595 2.65987C43.6674 2.80406 43.7399 3.02034 43.7399 3.16452C43.8848 4.17381 43.5225 5.03892 42.9429 5.11102C42.2909 5.2552 41.6389 4.53428 41.5664 3.59707C41.5664 3.3087 41.5664 3.16452 41.5664 2.94824C41.6389 2.4436 41.9286 2.08313 42.4358 2.01104C42.5082 2.01104 42.4358 2.01104 42.4358 2.01104Z", fill: "#989FB0" }),
2482
+ React__default.createElement("path", { d: "M27.9127 37.0298C28.4405 37.0298 28.8684 36.6019 28.8684 36.0741C28.8684 35.5463 28.4405 35.1184 27.9127 35.1184C27.3849 35.1184 26.957 35.5463 26.957 36.0741C26.957 36.6019 27.3849 37.0298 27.9127 37.0298Z", fill: "#989FB0" }),
2483
+ React__default.createElement("path", { d: "M37.4186 37.0298C37.9464 37.0298 38.3742 36.6019 38.3742 36.0741C38.3742 35.5463 37.9464 35.1184 37.4186 35.1184C36.8908 35.1184 36.4629 35.5463 36.4629 36.0741C36.4629 36.6019 36.8908 37.0298 37.4186 37.0298Z", fill: "#989FB0" }),
2484
+ React__default.createElement("path", { d: "M34.2147 43.3063H31.2186C30.7536 43.3063 30.3662 42.9188 30.3662 42.4539C30.3662 41.989 30.7536 41.6016 31.2186 41.6016H34.1889C34.6538 41.6016 35.0413 41.989 35.0413 42.4539C35.0671 42.9188 34.6797 43.3063 34.2147 43.3063Z", fill: "#989FB0" }),
2485
+ React__default.createElement("defs", null,
2486
+ React__default.createElement("linearGradient", { id: "paint0_linear_2578_27197", x1: "32.6517", y1: "25.3966", x2: "32.6517", y2: "47.1455", gradientUnits: "userSpaceOnUse" },
2487
+ React__default.createElement("stop", { stopColor: "#FDFEFF" }),
2488
+ React__default.createElement("stop", { offset: "0.9964", stopColor: "#ECF0F5" })))));
2489
+ };
2490
+
2491
+ const libraries = ['places'];
2492
+ const GoogleLocationBlock = (props) => {
2493
+ var _a;
2494
+ const { inputWrapperOrder = ['label', 'input', 'description', 'error'], defaultValue, value: valueProps, onChange: onChangeProps, locale } = props, restProps = __rest(props, ["inputWrapperOrder", "defaultValue", "value", "onChange", "locale"]);
2495
+ const [LoadScript, setLoadScript] = useState(null);
2496
+ const [value, setValue] = useState(defaultValue || valueProps);
2497
+ const { predictions } = usePlacesAutocomplete(value, '', locale === 'tl-PH' ? 'en' : (_a = locale === null || locale === void 0 ? void 0 : locale.split('-')) === null || _a === void 0 ? void 0 : _a[0]);
2498
+ const onChangeAutocomplete = useCallback((s) => {
2499
+ setValue(s);
2500
+ onChangeProps === null || onChangeProps === void 0 ? void 0 : onChangeProps(s);
2501
+ }, []);
2502
+ const onClickItem = useCallback((item) => {
2503
+ /** For sure get value */
2504
+ setValue(item.value);
2505
+ const predCur = predictions === null || predictions === void 0 ? void 0 : predictions.find(({ description }) => description === item.value);
2506
+ onChangeProps === null || onChangeProps === void 0 ? void 0 : onChangeProps(item.value, predCur === null || predCur === void 0 ? void 0 : predCur.rawData);
2507
+ }, [onChangeProps, predictions]);
2508
+ useEffect(() => {
2509
+ setValue(valueProps);
2510
+ }, [valueProps]);
2511
+ useEffect(() => {
2512
+ var _a, _b, _c;
2513
+ // only load extra google script when not yet loaded
2514
+ if (!((_c = (_b = (_a = window === null || window === void 0 ? void 0 : window.google) === null || _a === void 0 ? void 0 : _a.maps) === null || _b === void 0 ? void 0 : _b.places) === null || _c === void 0 ? void 0 : _c.AutocompleteService) && !LoadScript) {
2515
+ import('@react-google-maps/api').then((m) => {
2516
+ setLoadScript(() => m.LoadScript);
2517
+ });
2518
+ }
2519
+ }, []);
2520
+ return (React__default.createElement(Autocomplete, Object.assign({ defaultValue: defaultValue, value: value, onChange: onChangeAutocomplete, data: predictions.map((pred) => {
2521
+ return { value: pred.description, label: pred.description };
2522
+ }), filter: () => true, onItemSubmit: onClickItem, inputWrapperOrder: inputWrapperOrder, zIndex: ZINDEX_SSO - 9e6 + 2, withinPortal: true, styles: { dropdown: { pointerEvents: 'auto' } }, inputContainer: (children) => {
2523
+ return (React__default.createElement(React__default.Fragment, null,
2524
+ LoadScript && (React__default.createElement(LoadScript, { googleMapsApiKey: GOOGLE_API_KEY, libraries: libraries, loadingElement: React__default.createElement(React__default.Fragment, null), style: { width: '100%' } })),
2525
+ children));
2526
+ } }, restProps)));
2527
+ };
2528
+
2470
2529
  const formatLeadGenFormValue = (values, blocks) => {
2471
2530
  const newValues = {};
2472
2531
  for (const block of blocks) {
@@ -2815,17 +2874,22 @@ const TextField$1 = (props) => {
2815
2874
  onChangeShrink === null || onChangeShrink === void 0 ? void 0 : onChangeShrink(false);
2816
2875
  });
2817
2876
  const [shrink, setShrink] = useState(shrinkProps);
2877
+ const focusInput = (target) => {
2878
+ const $textEl = target.querySelectorAll('input:not([disabled]):not([type="submit"]),select:not([disabled]),textarea:not([disabled])');
2879
+ const $focusEl = $textEl.item($textEl.length - 1);
2880
+ if ($focusEl) {
2881
+ $focusEl.focus({ preventScroll: true });
2882
+ }
2883
+ };
2818
2884
  const onClick = useCallback((e) => {
2819
- setShrink(true);
2820
- onChangeShrink === null || onChangeShrink === void 0 ? void 0 : onChangeShrink(true);
2821
2885
  if (shrink) {
2886
+ e.preventDefault();
2887
+ focusInput(e.currentTarget);
2822
2888
  return;
2823
2889
  }
2824
- const $textEl = e.currentTarget.querySelectorAll('input:not([disabled]):not([type="submit"]),select:not([disabled]),textarea:not([disabled])');
2825
- const $focusEl = $textEl.item($textEl.length - 1);
2826
- if ($focusEl) {
2827
- $focusEl.focus();
2828
- }
2890
+ setShrink(true);
2891
+ onChangeShrink === null || onChangeShrink === void 0 ? void 0 : onChangeShrink(true);
2892
+ focusInput(e.currentTarget);
2829
2893
  }, [shrink]);
2830
2894
  useEffect(() => {
2831
2895
  setShrink(shrinkProps);
@@ -2838,44 +2902,6 @@ const ChoiceField$1 = (props) => {
2838
2902
  return (React__default.createElement(StyledChoiceFieldContainer$1, Object.assign({ className: clsx(className, 'choiceField') }, restProps), children));
2839
2903
  };
2840
2904
 
2841
- const libraries = ['places'];
2842
- const GoogleLocationBlock = (props) => {
2843
- var _a;
2844
- const { inputWrapperOrder = ['label', 'input', 'description', 'error'], defaultValue, value: valueProps, onChange: onChangeProps, locale } = props, restProps = __rest(props, ["inputWrapperOrder", "defaultValue", "value", "onChange", "locale"]);
2845
- const [LoadScript, setLoadScript] = useState(null);
2846
- const [value, setValue] = useState(defaultValue || valueProps);
2847
- const { predictions } = usePlacesAutocomplete(value, '', locale === 'tl-PH' ? 'en' : (_a = locale === null || locale === void 0 ? void 0 : locale.split('-')) === null || _a === void 0 ? void 0 : _a[0]);
2848
- const onChangeAutocomplete = useCallback((s) => {
2849
- setValue(s);
2850
- onChangeProps === null || onChangeProps === void 0 ? void 0 : onChangeProps(s);
2851
- }, []);
2852
- const onClickItem = useCallback((item) => {
2853
- /** For sure get value */
2854
- setValue(item.value);
2855
- const predCur = predictions === null || predictions === void 0 ? void 0 : predictions.find(({ description }) => description === item.value);
2856
- onChangeProps === null || onChangeProps === void 0 ? void 0 : onChangeProps(item.value, predCur === null || predCur === void 0 ? void 0 : predCur.rawData);
2857
- }, [onChangeProps, predictions]);
2858
- useEffect(() => {
2859
- setValue(valueProps);
2860
- }, [valueProps]);
2861
- useEffect(() => {
2862
- var _a, _b, _c;
2863
- // only load extra google script when not yet loaded
2864
- if (!((_c = (_b = (_a = window === null || window === void 0 ? void 0 : window.google) === null || _a === void 0 ? void 0 : _a.maps) === null || _b === void 0 ? void 0 : _b.places) === null || _c === void 0 ? void 0 : _c.AutocompleteService) && !LoadScript) {
2865
- import('@react-google-maps/api').then((m) => {
2866
- setLoadScript(() => m.LoadScript);
2867
- });
2868
- }
2869
- }, []);
2870
- return (React__default.createElement(Autocomplete, Object.assign({ defaultValue: defaultValue, value: value, onChange: onChangeAutocomplete, data: predictions.map((pred) => {
2871
- return { value: pred.description, label: pred.description };
2872
- }), filter: () => true, onItemSubmit: onClickItem, inputWrapperOrder: inputWrapperOrder, zIndex: ZINDEX_SSO - 9e6 + 2, withinPortal: true, styles: { dropdown: { pointerEvents: 'auto' } }, inputContainer: (children) => {
2873
- return (React__default.createElement(React__default.Fragment, null,
2874
- LoadScript && (React__default.createElement(LoadScript, { googleMapsApiKey: GOOGLE_API_KEY, libraries: libraries, loadingElement: React__default.createElement(React__default.Fragment, null), style: { width: '100%' } })),
2875
- children));
2876
- } }, restProps)));
2877
- };
2878
-
2879
2905
  const LeadGenForm = forwardRef((props, ref) => {
2880
2906
  const { locale, blocks, scrollToErrorField = true, form: formProps, rules: validate, initialValues, onFinish, onFinishFailed, className, style, } = props;
2881
2907
  const formRef = useRef(null);
@@ -2929,52 +2955,73 @@ const LeadGenForm = forwardRef((props, ref) => {
2929
2955
  return (React__default.createElement("form", { ref: formRef, onSubmit: form.onSubmit(middlewareFinish, middlewareFinishFailed), className: className, style: style },
2930
2956
  React__default.createElement(StyledLeadGenFormInner, { className: "leadgen-form_inputs" }, blocks.map((block, idx) => {
2931
2957
  const { id, name: blockName, data } = block;
2932
- const { placeholder, value: name, required, listQuestion, valueHTML, isSendMailChimp = false, } = data;
2958
+ const { placeholder: label, value: name, required, listQuestion, valueHTML, isSendMailChimp = false, } = data;
2933
2959
  const formInputProps = form.getInputProps(name);
2934
2960
  const { value, error } = formInputProps;
2935
2961
  const reactKey = `${id}-${idx}`;
2936
2962
  switch (blockName) {
2937
2963
  case LEADGEN_BLOCK.TextBlock: {
2938
2964
  return (React__default.createElement(TextField$1, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
2939
- React__default.createElement(TextInput, Object.assign({ name: name, spellCheck: false, withAsterisk: required, label: placeholder, placeholder: placeholder, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, type: "text", "data-control": "text" }, formInputProps))));
2965
+ React__default.createElement(TextInput, Object.assign({ name: name, spellCheck: false, withAsterisk: required, label: label, placeholder: " ", inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, type: "text", "data-control": "text" }, formInputProps))));
2940
2966
  }
2941
2967
  case LEADGEN_BLOCK.NumberBlock: {
2942
2968
  return (React__default.createElement(TextField$1, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
2943
- React__default.createElement(NumberInput$1, Object.assign({ name: value, spellCheck: false, withAsterisk: required, label: placeholder, placeholder: placeholder, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, type: "number", "data-control": "number" }, formInputProps))));
2969
+ React__default.createElement(NumberInput$1, Object.assign({ name: value, spellCheck: false, withAsterisk: required, label: label, placeholder: " ", inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, type: "number", "data-control": "number" }, formInputProps))));
2944
2970
  }
2945
2971
  case LEADGEN_BLOCK.EmailBlock: {
2946
2972
  return (React__default.createElement(TextField$1, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
2947
- React__default.createElement(TextInput, Object.assign({ name: name, spellCheck: false, withAsterisk: required, label: placeholder, placeholder: placeholder, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, "data-control": "email" }, formInputProps))));
2973
+ React__default.createElement(TextInput, Object.assign({ name: name, spellCheck: false, withAsterisk: required, label: label, placeholder: " ", inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, "data-control": "email" }, formInputProps))));
2948
2974
  }
2949
2975
  case LEADGEN_BLOCK.PhoneOtpBlock:
2950
2976
  case LEADGEN_BLOCK.WhatsappOtpBlock:
2951
2977
  case LEADGEN_BLOCK.ZaloOtpBlock:
2952
2978
  case LEADGEN_BLOCK.PhoneBlock: {
2953
2979
  return (React__default.createElement(TextField$1, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
2954
- React__default.createElement(PhoneInput, Object.assign({ name: name, spellCheck: false, withAsterisk: required, label: placeholder, placeholder: placeholder, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), type: "text", "data-control": "text" }, formInputProps))));
2980
+ React__default.createElement(PhoneInput, Object.assign({ name: name, spellCheck: false, withAsterisk: required, label: label, placeholder: " ", inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), type: "text", "data-control": "text" }, formInputProps))));
2955
2981
  }
2956
2982
  case LEADGEN_BLOCK.LocationBlock: {
2957
2983
  return (React__default.createElement(TextField$1, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
2958
- React__default.createElement(GoogleLocationBlock, Object.assign({ name: name, withAsterisk: required, label: placeholder, placeholder: placeholder, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, locale: locale, "data-control": "text" }, formInputProps))));
2984
+ React__default.createElement(GoogleLocationBlock, Object.assign({ name: name, withAsterisk: required, label: label, placeholder: " ", inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, locale: locale, "data-control": "text" }, formInputProps))));
2959
2985
  }
2960
2986
  case LEADGEN_BLOCK.DateBlock: {
2961
2987
  return (React__default.createElement(TextField$1, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
2962
- React__default.createElement(DateInput, Object.assign({ locale: (MAPPED_LOCALE === null || MAPPED_LOCALE === void 0 ? void 0 : MAPPED_LOCALE[locale]) || MAPPED_LOCALE['vi-VN'], valueFormat: "DD/MM/YYYY", name: name, withAsterisk: required, label: placeholder, placeholder: placeholder, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, type: "default", "data-control": "date" }, formInputProps))));
2988
+ React__default.createElement(DateInput, Object.assign({ locale: (MAPPED_LOCALE === null || MAPPED_LOCALE === void 0 ? void 0 : MAPPED_LOCALE[locale]) || MAPPED_LOCALE['vi-VN'], valueFormat: "DD/MM/YYYY", name: name, withAsterisk: required, label: label, placeholder: " ", inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, type: "default", "data-control": "date" }, formInputProps))));
2963
2989
  }
2964
2990
  case LEADGEN_BLOCK.DropdownBlock:
2965
2991
  return (React__default.createElement(TextField$1, { key: reactKey, shrink: !!value, className: "leadgen-form_input" },
2966
2992
  React__default.createElement("div", { style: { display: 'none' }, "data-extra": true, "data-name": value, "data-control": 'dropdown' }),
2967
- React__default.createElement(Select$1, Object.assign({ name: name, withAsterisk: required, label: placeholder, placeholder: placeholder, data: listQuestion.map((l) => ({
2993
+ React__default.createElement(Select$1, Object.assign({ name: name, withAsterisk: required, label: label, placeholder: " ", searchable: true, data: listQuestion.map((l) => ({
2968
2994
  value: l.value,
2969
2995
  label: l.placeholder,
2970
- })) }, formInputProps))));
2996
+ })), nothingFound: React__default.createElement(NoData, null), styles: {
2997
+ item: {
2998
+ paddingBlock: 12,
2999
+ paddingInline: 10,
3000
+ fontSize: 16,
3001
+ lineHeight: 1.5,
3002
+ },
3003
+ nothingFound: {
3004
+ fontSize: 54,
3005
+ paddingBlock: 30,
3006
+ },
3007
+ itemsWrapper: {
3008
+ padding: 6,
3009
+ },
3010
+ dropdown: {
3011
+ '.mantine-ScrollArea-scrollbar[data-orientation="vertical"]': {
3012
+ '--radix-scroll-area-thumb-width': '6px',
3013
+ width: 'var(--radix-scroll-area-thumb-width)',
3014
+ paddingInline: 0,
3015
+ },
3016
+ },
3017
+ }, maxDropdownHeight: 192 }, formInputProps))));
2971
3018
  case LEADGEN_BLOCK.CheckboxBlock: {
2972
3019
  const formInputCheckboxProps = form.getInputProps(name, {
2973
3020
  type: 'checkbox',
2974
3021
  });
2975
3022
  return (React__default.createElement(ChoiceField$1, { className: "leadgen-form_input leadgen-form_input_checkbox", key: reactKey },
2976
3023
  isSendMailChimp && (React__default.createElement("div", { style: { display: 'none' }, "data-name": name + '-mailchimp' })),
2977
- React__default.createElement(Checkbox$1.Group, Object.assign({ size: "md", withAsterisk: required, label: placeholder, value: value, sx: {
3024
+ React__default.createElement(Checkbox$1.Group, Object.assign({ size: "md", withAsterisk: required, label: label, value: value, sx: {
2978
3025
  display: 'flex',
2979
3026
  flexDirection: 'column',
2980
3027
  flexWrap: 'wrap',
@@ -2986,7 +3033,7 @@ const LeadGenForm = forwardRef((props, ref) => {
2986
3033
  case LEADGEN_BLOCK.RadioBlock: {
2987
3034
  return (React__default.createElement(ChoiceField$1, { className: "leadgen-form_input leadgen-form_input_checkbox", key: reactKey },
2988
3035
  isSendMailChimp && (React__default.createElement("div", { style: { display: 'none' }, "data-name": name + '-mailchimp' })),
2989
- React__default.createElement(Radio$1.Group, Object.assign({ size: "md", withAsterisk: required, label: placeholder, value: value, spellCheck: true, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, inputContainer: (children) => {
3036
+ React__default.createElement(Radio$1.Group, Object.assign({ size: "md", withAsterisk: required, label: label, value: value, spellCheck: true, inputWrapperOrder: LEADGEN_ORDER_INPUT_WRAPPER, inputContainer: (children) => {
2990
3037
  return (React__default.createElement("div", { className: "leadgen-choiceContainer" }, children));
2991
3038
  } }, formInputProps), listQuestion.map((l, _index) => (React__default.createElement(Radio$1, { name: name, key: _index, value: l.value, label: l.placeholder, "data-control": "radio" }))))));
2992
3039
  }
@@ -3225,9 +3272,17 @@ const CloseButton = ({ onClose, containerClassName, svgClassName, }) => (React__
3225
3272
  const CenterTabLayout = ({ popupId, url, newTab, imageDestkop, imageMobile, onClose, onOtherSubmit, }) => {
3226
3273
  const { width: imageMobileWidth, height: imageMobileHeight, loaded: imageMobileLoaded, } = useImageSize(imageMobile);
3227
3274
  const { width: imageDestkopWidth, height: imageDestkopHeight, loaded: imageDestkopLoaded, } = useImageSize(imageDestkop);
3275
+ useEffect(() => {
3276
+ if (popupId && imageMobileLoaded && imageDestkopLoaded) {
3277
+ document.body.classList.add('noscroll');
3278
+ }
3279
+ return () => {
3280
+ document.body.classList.remove('noscroll');
3281
+ };
3282
+ }, [popupId, imageMobileLoaded, imageDestkopLoaded]);
3228
3283
  if (!imageMobileLoaded || !imageDestkopLoaded)
3229
3284
  return null;
3230
- return (React__default.createElement("div", { id: popupId, className: "lead-modal-wrapper", "data-popup-url": location.pathname, "data-popup-type": "center_tab" },
3285
+ return (React__default.createElement("div", { id: popupId, className: "leadgen lead-modal-wrapper", "data-popup-url": location.pathname, "data-popup-type": "center_tab" },
3231
3286
  React__default.createElement("div", { className: "le-center-tab-popup" },
3232
3287
  React__default.createElement("div", { style: { position: 'relative' } },
3233
3288
  React__default.createElement("a", { className: "js-popup-other-submit", href: url, target: newTab ? 'blank' : '_parent', onClick: onOtherSubmit },
@@ -3293,6 +3348,486 @@ const FloatingLayout = ({ popupId, url, title, urlText, titleAlign, subtitle, su
3293
3348
  React__default.createElement(CloseButton, { onClose: onClose, containerClassName: "close-button-top-right" }))))));
3294
3349
  };
3295
3350
 
3351
+ function isMac() {
3352
+ return testPlatform(/^Mac/);
3353
+ }
3354
+ function isIPhone() {
3355
+ return testPlatform(/^iPhone/);
3356
+ }
3357
+ function isIPad() {
3358
+ return (testPlatform(/^iPad/) ||
3359
+ // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
3360
+ (isMac() && navigator.maxTouchPoints > 1));
3361
+ }
3362
+ function isIOS() {
3363
+ return isIPhone() || isIPad();
3364
+ }
3365
+ function testPlatform(re) {
3366
+ return typeof window !== 'undefined' && window.navigator != null
3367
+ ? re.test(window.navigator.platform)
3368
+ : undefined;
3369
+ }
3370
+
3371
+ function chain(...callbacks) {
3372
+ return (...args) => {
3373
+ for (const callback of callbacks) {
3374
+ if (typeof callback === 'function') {
3375
+ callback(...args);
3376
+ }
3377
+ }
3378
+ };
3379
+ }
3380
+
3381
+ function isScrollable(node) {
3382
+ const style = window.getComputedStyle(node);
3383
+ return /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);
3384
+ }
3385
+
3386
+ const getParentScroll = (element) => {
3387
+ if (element === document.documentElement || element === document.body) {
3388
+ return element;
3389
+ }
3390
+ const parentElement = element.parentElement;
3391
+ if (isScrollable(parentElement)) {
3392
+ return parentElement;
3393
+ }
3394
+ return getParentScroll(parentElement);
3395
+ };
3396
+
3397
+ // This code comes from https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/overlays/src/usePreventScroll.ts
3398
+ const KEYBOARD_BUFFER = 24;
3399
+ const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;
3400
+ // @ts-ignore
3401
+ const visualViewport = typeof document !== 'undefined' && window.visualViewport;
3402
+ // HTML input types that do not cause the software keyboard to appear.
3403
+ const nonTextInputTypes = new Set([
3404
+ 'checkbox',
3405
+ 'radio',
3406
+ 'range',
3407
+ 'color',
3408
+ 'file',
3409
+ 'image',
3410
+ 'button',
3411
+ 'submit',
3412
+ 'reset',
3413
+ ]);
3414
+ // The number of active usePreventScroll calls. Used to determine whether to revert back to the original page style/scroll position
3415
+ let preventScrollCount = 0;
3416
+ let restore;
3417
+ /**
3418
+ * Prevents scrolling on the document body on mount, and
3419
+ * restores it on unmount. Also ensures that content does not
3420
+ * shift due to the scrollbars disappearing.
3421
+ */
3422
+ function usePreventScroll(options = {}) {
3423
+ const { isDisabled } = options;
3424
+ useIsomorphicLayoutEffect(() => {
3425
+ if (isDisabled) {
3426
+ return;
3427
+ }
3428
+ preventScrollCount++;
3429
+ if (preventScrollCount === 1) {
3430
+ if (isIOS()) {
3431
+ restore = preventScrollMobileSafari();
3432
+ }
3433
+ }
3434
+ return () => {
3435
+ preventScrollCount--;
3436
+ if (preventScrollCount === 0) {
3437
+ restore === null || restore === void 0 ? void 0 : restore();
3438
+ }
3439
+ };
3440
+ }, [isDisabled]);
3441
+ }
3442
+ // Mobile Safari is a whole different beast. Even with overflow: hidden,
3443
+ // it still scrolls the page in many situations:
3444
+ //
3445
+ // 1. When the bottom toolbar and address bar are collapsed, page scrolling is always allowed.
3446
+ // 2. When the keyboard is visible, the viewport does not resize. Instead, the keyboard covers part of
3447
+ // it, so it becomes scrollable.
3448
+ // 3. When tapping on an input, the page always scrolls so that the input is centered in the visual viewport.
3449
+ // This may cause even fixed position elements to scroll off the screen.
3450
+ // 4. When using the next/previous buttons in the keyboard to navigate between inputs, the whole page always
3451
+ // scrolls, even if the input is inside a nested scrollable element that could be scrolled instead.
3452
+ //
3453
+ // In order to work around these cases, and prevent scrolling without jankiness, we do a few things:
3454
+ //
3455
+ // 1. Prevent default on `touchmove` events that are not in a scrollable element. This prevents touch scrolling
3456
+ // on the window.
3457
+ // 2. Prevent default on `touchmove` events inside a scrollable element when the scroll position is at the
3458
+ // top or bottom. This avoids the whole page scrolling instead, but does prevent overscrolling.
3459
+ // 3. Prevent default on `touchend` events on input elements and handle focusing the element ourselves.
3460
+ // 4. When focusing an input, apply a transform to trick Safari into thinking the input is at the top
3461
+ // of the page, which prevents it from scrolling the page. After the input is focused, scroll the element
3462
+ // into view ourselves, without scrolling the whole page.
3463
+ // 5. Offset the body by the scroll position using a negative margin and scroll to the top. This should appear the
3464
+ // same visually, but makes the actual scroll position always zero. This is required to make all of the
3465
+ // above work or Safari will still try to scroll the page when focusing an input.
3466
+ // 6. As a last resort, handle window scroll events, and scroll back to the top. This can happen when attempting
3467
+ // to navigate to an input with the next/previous buttons that's outside a modal.
3468
+ function preventScrollMobileSafari() {
3469
+ let scrollable;
3470
+ let lastY = 0;
3471
+ const onTouchStart = (e) => {
3472
+ // Store the nearest scrollable parent element from the element that the user touched.
3473
+ scrollable = getParentScroll(e.target);
3474
+ if (scrollable === document.documentElement &&
3475
+ scrollable === document.body) {
3476
+ return;
3477
+ }
3478
+ lastY = e.changedTouches[0].pageY;
3479
+ };
3480
+ const onTouchMove = (e) => {
3481
+ // Prevent scrolling the window.
3482
+ if (!scrollable ||
3483
+ scrollable === document.documentElement ||
3484
+ scrollable === document.body) {
3485
+ e.preventDefault();
3486
+ return;
3487
+ }
3488
+ // Prevent scrolling up when at the top and scrolling down when at the bottom
3489
+ // of a nested scrollable area, otherwise mobile Safari will start scrolling
3490
+ // the window instead. Unfortunately, this disables bounce scrolling when at
3491
+ // the top but it's the best we can do.
3492
+ const y = e.changedTouches[0].pageY;
3493
+ const scrollTop = scrollable.scrollTop;
3494
+ const bottom = scrollable.scrollHeight - scrollable.clientHeight;
3495
+ if (bottom === 0) {
3496
+ return;
3497
+ }
3498
+ if ((scrollTop <= 0 && y > lastY) || (scrollTop >= bottom && y < lastY)) {
3499
+ e.preventDefault();
3500
+ }
3501
+ lastY = y;
3502
+ };
3503
+ const onTouchEnd = (e) => {
3504
+ const target = e.target;
3505
+ // Apply this change if we're not already focused on the target element
3506
+ if (isInput(target) && target !== document.activeElement) {
3507
+ e.preventDefault();
3508
+ // Apply a transform to trick Safari into thinking the input is at the top of the page
3509
+ // so it doesn't try to scroll it into view. When tapping on an input, this needs to
3510
+ // be done before the "focus" event, so we have to focus the element ourselves.
3511
+ target.style.transform = 'translateY(-2000px)';
3512
+ target.focus();
3513
+ requestAnimationFrame(() => {
3514
+ target.style.transform = '';
3515
+ });
3516
+ }
3517
+ };
3518
+ const onFocus = (e) => {
3519
+ const target = e.target;
3520
+ if (isInput(target)) {
3521
+ // Transform also needs to be applied in the focus event in cases where focus moves
3522
+ // other than tapping on an input directly, e.g. the next/previous buttons in the
3523
+ // software keyboard. In these cases, it seems applying the transform in the focus event
3524
+ // is good enough, whereas when tapping an input, it must be done before the focus event. 🤷‍♂️
3525
+ target.style.transform = 'translateY(-2000px)';
3526
+ requestAnimationFrame(() => {
3527
+ target.style.transform = '';
3528
+ // This will have prevented the browser from scrolling the focused element into view,
3529
+ // so we need to do this ourselves in a way that doesn't cause the whole page to scroll.
3530
+ if (visualViewport) {
3531
+ if (visualViewport.height < window.innerHeight) {
3532
+ // If the keyboard is already visible, do this after one additional frame
3533
+ // to wait for the transform to be removed.
3534
+ requestAnimationFrame(() => {
3535
+ scrollIntoView(target);
3536
+ });
3537
+ }
3538
+ else {
3539
+ // Otherwise, wait for the visual viewport to resize before scrolling so we can
3540
+ // measure the correct position to scroll to.
3541
+ visualViewport.addEventListener('resize', () => scrollIntoView(target), { once: true });
3542
+ }
3543
+ }
3544
+ });
3545
+ }
3546
+ };
3547
+ const onWindowScroll = () => {
3548
+ // Last resort. If the window scrolled, scroll it back to the top.
3549
+ // It should always be at the top because the body will have a negative margin (see below).
3550
+ window.scrollTo(0, 0);
3551
+ };
3552
+ // Record the original scroll position so we can restore it.
3553
+ // Then apply a negative margin to the body to offset it by the scroll position. This will
3554
+ // enable us to scroll the window to the top, which is required for the rest of this to work.
3555
+ const scrollX = window.pageXOffset;
3556
+ const scrollY = window.pageYOffset;
3557
+ const restoreStyles = chain(setStyle(document.documentElement, 'paddingRight', `${window.innerWidth - document.documentElement.clientWidth}px`));
3558
+ // Scroll to the top. The negative margin on the body will make this appear the same.
3559
+ window.scrollTo(0, 0);
3560
+ const removeEvents = chain(addEvent(document, 'touchstart', onTouchStart, {
3561
+ passive: false,
3562
+ capture: true,
3563
+ }), addEvent(document, 'touchmove', onTouchMove, {
3564
+ passive: false,
3565
+ capture: true,
3566
+ }), addEvent(document, 'touchend', onTouchEnd, {
3567
+ passive: false,
3568
+ capture: true,
3569
+ }), addEvent(document, 'focus', onFocus, true), addEvent(window, 'scroll', onWindowScroll));
3570
+ return () => {
3571
+ // Restore styles and scroll the page back to where it was.
3572
+ restoreStyles();
3573
+ removeEvents();
3574
+ window.scrollTo(scrollX, scrollY);
3575
+ };
3576
+ }
3577
+ // Sets a CSS property on an element, and returns a function to revert it to the previous value.
3578
+ function setStyle(element, style, value) {
3579
+ // https://github.com/microsoft/TypeScript/issues/17827#issuecomment-391663310
3580
+ // @ts-ignore
3581
+ const cur = element.style[style];
3582
+ // @ts-ignore
3583
+ element.style[style] = value;
3584
+ return () => {
3585
+ // @ts-ignore
3586
+ element.style[style] = cur;
3587
+ };
3588
+ }
3589
+ // Adds an event listener to an element, and returns a function to remove it.
3590
+ function addEvent(target, event, handler, options) {
3591
+ // @ts-ignore
3592
+ target.addEventListener(event, handler, options);
3593
+ return () => {
3594
+ // @ts-ignore
3595
+ target.removeEventListener(event, handler, options);
3596
+ };
3597
+ }
3598
+ function scrollIntoView(target) {
3599
+ const root = document.scrollingElement || document.documentElement;
3600
+ while (target && target !== root) {
3601
+ // Find the parent scrollable element and adjust the scroll position if the target is not already in view.
3602
+ const scrollable = getParentScroll(target);
3603
+ if (scrollable !== document.documentElement &&
3604
+ scrollable !== document.body &&
3605
+ scrollable !== target) {
3606
+ const scrollableTop = scrollable.getBoundingClientRect().top;
3607
+ const targetTop = target.getBoundingClientRect().top;
3608
+ const targetBottom = target.getBoundingClientRect().bottom;
3609
+ // Buffer is needed for some edge cases
3610
+ const keyboardHeight = scrollable.getBoundingClientRect().bottom + KEYBOARD_BUFFER;
3611
+ if (targetBottom > keyboardHeight) {
3612
+ scrollable.scrollTop += targetTop - scrollableTop;
3613
+ }
3614
+ }
3615
+ // @ts-ignore
3616
+ target = scrollable.parentElement;
3617
+ }
3618
+ }
3619
+ function isInput(target) {
3620
+ return ((target instanceof HTMLInputElement &&
3621
+ !nonTextInputTypes.has(target.type)) ||
3622
+ target instanceof HTMLTextAreaElement ||
3623
+ (target instanceof HTMLElement && target.isContentEditable));
3624
+ }
3625
+
3626
+ const useViewportDimensions = () => {
3627
+ const dimensionsRef = useRef({ width: 0, height: 0 });
3628
+ const [dimensions, setDimensions] = useState(() => ({
3629
+ width: window.screen.availWidth,
3630
+ height: window.screen.availHeight,
3631
+ }));
3632
+ useEffect(() => {
3633
+ var _a;
3634
+ function visualViewport(e) {
3635
+ if (dimensionsRef.current.width === e.target.width &&
3636
+ dimensionsRef.current.height === e.target.height) {
3637
+ return;
3638
+ }
3639
+ const newDimensions = {
3640
+ width: e.target.width,
3641
+ height: e.target.height,
3642
+ };
3643
+ dimensionsRef.current = newDimensions;
3644
+ setDimensions(newDimensions);
3645
+ }
3646
+ (_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.addEventListener('resize', visualViewport);
3647
+ return () => {
3648
+ var _a;
3649
+ (_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.removeEventListener('resize', visualViewport);
3650
+ };
3651
+ }, []);
3652
+ return useMemo(() => (Object.assign({}, dimensions)), [dimensions.height, dimensions.width]);
3653
+ };
3654
+
3655
+ const StyledLeadGenLightBoxBFooter = styled.div `
3656
+ padding-top: calc(var(--spacing-y, 20px) * 8 / 20);
3657
+ padding-inline: var(--spacing-x, 20px);
3658
+ padding-bottom: var(--spacing-y, 20px);
3659
+ `;
3660
+ const StyledLeadGenLightBoxBBody = styled.div `
3661
+ flex: 1;
3662
+ min-height: 0;
3663
+ overflow: auto;
3664
+ padding-inline: var(--spacing-y, 20px);
3665
+ padding-block: calc(var(--spacing-x, 20px) * 8 / 20);
3666
+ &::-webkit-scrollbar {
3667
+ width: 6px;
3668
+ height: 6px;
3669
+ }
3670
+
3671
+ &::-webkit-scrollbar-track {
3672
+ background-color: transparent;
3673
+ }
3674
+
3675
+ &::-webkit-scrollbar-thumb {
3676
+ background-color: rgba(0, 0, 0, 0.4);
3677
+ border-radius: 6px;
3678
+ }
3679
+ `;
3680
+ const StyledLeadGenLightBoxBHeader = styled.div `
3681
+ display: flex;
3682
+ padding-top: var(--spacing-y, 20px);
3683
+ padding-inline: var(--spacing-x, 20px);
3684
+ padding-bottom: calc(var(--spacing-y, 20px) * 8 / 20);
3685
+ `;
3686
+ const StyledLeadGenLightBoxBWrapper = styled.div `
3687
+ height: 100%;
3688
+ display: flex;
3689
+ flex-direction: column;
3690
+ `;
3691
+ const StyledLeadGenLightBoxB = styled.div `
3692
+ --spacing-x: 20px;
3693
+ --spacing-y: 20px;
3694
+ --close-width: 24px;
3695
+ --close-height: 24px;
3696
+
3697
+ // For old version, Wrap every thing in children
3698
+ &[data-type='LightBoxB_typeA'] {
3699
+ height: 100%;
3700
+ width: 100%;
3701
+ .leadgen-wrapper,
3702
+ .leadgen-inner,
3703
+ .leadgen-form {
3704
+ height: 100%;
3705
+ }
3706
+ .leadgen-content {
3707
+ height: 100%;
3708
+ display: flex;
3709
+ flex-direction: column;
3710
+ }
3711
+ .leadgen-header {
3712
+ display: none;
3713
+ }
3714
+ .leadgen-title {
3715
+ padding-right: calc(var(--close-width, 24px) * 50 / 24);
3716
+ }
3717
+ .leadgen-description {
3718
+ display: none;
3719
+ }
3720
+ .leadgen-body {
3721
+ flex: 1;
3722
+ min-height: 0;
3723
+ }
3724
+
3725
+ .leadgen-close_btn {
3726
+ top: var(--spacing-y, 20px);
3727
+ right: var(--spacing-x, 20px);
3728
+ width: var(--close-width, 24px) !important;
3729
+ height: var(--close-height, 24px);
3730
+ box-shadow: none;
3731
+ font-size: 24px;
3732
+ }
3733
+
3734
+ .leadgen-empty_footer {
3735
+ .leadgen-btn {
3736
+ flex: 1;
3737
+ min-width: 0;
3738
+ }
3739
+ }
3740
+
3741
+ .leadgen-form_body {
3742
+ overflow: auto;
3743
+ animation: scrolling forwards;
3744
+ animation-timeline: scroll(self);
3745
+ }
3746
+ @keyframes scrolling {
3747
+ 0%,
3748
+ to {
3749
+ border-bottom: 1px solid ${theme.colors.neutral100};
3750
+ }
3751
+ }
3752
+ }
3753
+ `;
3754
+ const StyledMotionContainer = styled(motion.div) `
3755
+ position: fixed;
3756
+ inset: 0;
3757
+ z-index: ${ZINDEX_SSO + 1};
3758
+ background-color: #fff;
3759
+ `;
3760
+
3761
+ const PREFIX_CLS = 'LightBoxB_typeA';
3762
+ const DURATION = 1000 * 0.5;
3763
+ const DRAWER_STYLE = {
3764
+ visible: {
3765
+ opacity: 1,
3766
+ translateY: '0px',
3767
+ transitionProperty: 'translate',
3768
+ transitionDuration: '0.25s',
3769
+ },
3770
+ hidden: {
3771
+ opacity: 0,
3772
+ translateY: '100%',
3773
+ transitionProperty: 'translate',
3774
+ transitionDuration: '0.25s',
3775
+ },
3776
+ };
3777
+ const LeadGenLightBoxBTypeA = (props) => {
3778
+ const { visible, onVisible, icon, title, buttonText, blocks, children } = props, restProps = __rest(props, ["visible", "onVisible", "icon", "title", "buttonText", "blocks", "children"]);
3779
+ const formRef = useRef();
3780
+ const [open, setOpen] = useState(visible);
3781
+ const { height } = useViewportDimensions();
3782
+ usePreventScroll();
3783
+ const onOpenChange = useCallback((open) => {
3784
+ if (!open) {
3785
+ // Wait for duration of animation
3786
+ setTimeout(() => {
3787
+ onVisible === null || onVisible === void 0 ? void 0 : onVisible(open);
3788
+ }, DURATION);
3789
+ return;
3790
+ }
3791
+ onVisible === null || onVisible === void 0 ? void 0 : onVisible(open);
3792
+ }, [onVisible]);
3793
+ const iconComp = useMemo(() => {
3794
+ if (!icon) {
3795
+ return null;
3796
+ }
3797
+ return React__default.createElement(React__default.Fragment, null);
3798
+ }, [icon]);
3799
+ const titleComp = useMemo(() => {
3800
+ if (!title) {
3801
+ return null;
3802
+ }
3803
+ return title;
3804
+ }, [title]);
3805
+ const childrenComp = useMemo(() => {
3806
+ if (children) {
3807
+ return children;
3808
+ }
3809
+ return (React__default.createElement(StyledLeadGenLightBoxBWrapper, { className: `${PREFIX_CLS}_wrapper lightboxB_wrapper` },
3810
+ React__default.createElement(StyledLeadGenLightBoxBHeader, { className: `${PREFIX_CLS}_header lightboxB_header` },
3811
+ React__default.createElement("div", { className: "lightBoxB_header_icon" }, iconComp),
3812
+ React__default.createElement("div", { className: "lightBoxB_header_title" }, titleComp),
3813
+ React__default.createElement("div", { className: "lightBoxB_header_close", onClick: () => onOpenChange(false) },
3814
+ React__default.createElement(CloseButton, null))),
3815
+ React__default.createElement(StyledLeadGenLightBoxBBody, { className: `${PREFIX_CLS}_body lightboxB_body` },
3816
+ React__default.createElement(LeadGenForm, Object.assign({ ref: formRef, blocks: blocks }, restProps))),
3817
+ React__default.createElement(StyledLeadGenLightBoxBFooter, { className: `${PREFIX_CLS}_footer lightboxB_footer` },
3818
+ React__default.createElement(Button, { onClick: () => { var _a; return (_a = formRef.current) === null || _a === void 0 ? void 0 : _a.submit(); } }, buttonText))));
3819
+ }, [children, onOpenChange]);
3820
+ useEffect(() => {
3821
+ setOpen(visible);
3822
+ }, [visible]);
3823
+ return (React__default.createElement(StyledMotionContainer, { animate: open ? 'visible' : 'hidden', variants: DRAWER_STYLE },
3824
+ React__default.createElement(StyledLeadGenLightBoxB, { "data-type": "LightBoxB_typeA", style: height ? { maxHeight: height } : undefined }, childrenComp)));
3825
+ };
3826
+
3827
+ const LeadGenLightBoxB = (props) => {
3828
+ return React__default.createElement(LeadGenLightBoxBTypeA, Object.assign({}, props));
3829
+ };
3830
+
3296
3831
  const ThankyouPopup = ({ title, titleAlign, subtitle, subtitleAlign, link, linkNewTab, linkText, image, }) => {
3297
3832
  const { primaryColor } = useContext(LeadGenContext$1);
3298
3833
  const { width: imageWidth, height: imageHeight, loaded: imageLoaded, } = useImageSize(image);
@@ -3662,6 +4197,7 @@ const StyledTextFieldContainer = styled.div `
3662
4197
  outline: none !important;
3663
4198
  border: none;
3664
4199
  box-shadow: none;
4200
+ font-size: var(--input, 15px);
3665
4201
  padding: 0 var(--phone-input-space-x, 8px);
3666
4202
  opacity: 0;
3667
4203
  color: ${theme.colors.gray800} !important;
@@ -3781,17 +4317,22 @@ const TextField = (props) => {
3781
4317
  onChangeShrink === null || onChangeShrink === void 0 ? void 0 : onChangeShrink(false);
3782
4318
  });
3783
4319
  const [shrink, setShrink] = useState(shrinkProps);
4320
+ const focusInput = (target) => {
4321
+ const $textEl = target.querySelectorAll('input:not([disabled]):not([type="submit"]),select:not([disabled]),textarea:not([disabled])');
4322
+ const $focusEl = $textEl.item($textEl.length - 1);
4323
+ if ($focusEl) {
4324
+ $focusEl.focus({ preventScroll: true });
4325
+ }
4326
+ };
3784
4327
  const onClick = useCallback((e) => {
3785
- setShrink(true);
3786
- onChangeShrink === null || onChangeShrink === void 0 ? void 0 : onChangeShrink(true);
3787
4328
  if (shrink) {
4329
+ e.preventDefault();
4330
+ focusInput(e.currentTarget);
3788
4331
  return;
3789
4332
  }
3790
- const $textEl = e.currentTarget.querySelectorAll('input:not([disabled]):not([type="submit"]),select:not([disabled]),textarea:not([disabled])');
3791
- const $focusEl = $textEl.item($textEl.length - 1);
3792
- if ($focusEl) {
3793
- $focusEl.focus();
3794
- }
4333
+ setShrink(true);
4334
+ onChangeShrink === null || onChangeShrink === void 0 ? void 0 : onChangeShrink(true);
4335
+ focusInput(e.currentTarget);
3795
4336
  }, [shrink]);
3796
4337
  useEffect(() => {
3797
4338
  setShrink(shrinkProps);
@@ -3818,7 +4359,7 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
3818
4359
  return (React__default.createElement(React__default.Fragment, null, listBlockAdded.map((b, index) => {
3819
4360
  var _a;
3820
4361
  const { name = '', data = {}, id } = b || {};
3821
- const { placeholder, value, align, listQuestion, isSendMailChimp = false, newtab, url, } = data;
4362
+ const { placeholder: label, value, align, listQuestion, isSendMailChimp = false, newtab, url, } = data;
3822
4363
  const required = (_a = data.required) !== null && _a !== void 0 ? _a : true;
3823
4364
  const formValue = (formValues === null || formValues === void 0 ? void 0 : formValues[value]) || null;
3824
4365
  switch (name) {
@@ -3828,23 +4369,23 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
3828
4369
  return (React__default.createElement(SubtitleBlock, { key: index, align: align }, value));
3829
4370
  case 'TextBlock':
3830
4371
  return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
3831
- React__default.createElement(TextInput, Object.assign({ withAsterisk: required, spellCheck: false, type: "text", placeholder: placeholder,
4372
+ React__default.createElement(TextInput, Object.assign({ withAsterisk: required, spellCheck: false, type: "text", placeholder: " ",
3832
4373
  // className="lead-modal__form-control leadgen-form_field"
3833
4374
  // onChangeRaw={(e) => inputOnChange('text', e)}
3834
- label: placeholder, "data-control": "text", name: value, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
4375
+ label: label, "data-control": "text", name: value, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
3835
4376
  case 'NumberBlock':
3836
4377
  return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
3837
- React__default.createElement(NumberInput$1, Object.assign({ withAsterisk: required, spellCheck: false, type: "number", placeholder: placeholder,
4378
+ React__default.createElement(NumberInput$1, Object.assign({ withAsterisk: required, spellCheck: false, type: "number", placeholder: " ",
3838
4379
  // className="lead-modal__form-control leadgen-form_field"
3839
4380
  // onChange={(e) => inputOnChange('number', e)}
3840
- label: placeholder, "data-control": "number", name: value, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
4381
+ label: label, "data-control": "number", name: value, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
3841
4382
  case 'EmailBlock':
3842
4383
  return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
3843
4384
  React__default.createElement(TextInput, Object.assign({ withAsterisk: required, spellCheck: false,
3844
4385
  // type="email"
3845
- placeholder: placeholder,
4386
+ placeholder: " ",
3846
4387
  // className="lead-modal__form-control leadgen-form_field"
3847
- label: placeholder, "data-control": "email", name: value, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
4388
+ label: label, "data-control": "email", name: value, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
3848
4389
  case 'PhoneOtpBlock':
3849
4390
  case 'WhatsappOtpBlock':
3850
4391
  case 'ZaloOtpBlock':
@@ -3854,19 +4395,19 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
3854
4395
  return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: clsx('lead-modal__form-control leadgen-form_field', {
3855
4396
  'leadgen-form_field_error': !!error,
3856
4397
  }) },
3857
- React__default.createElement(Input$1.Wrapper, { size: "md", withAsterisk: required, label: placeholder, "data-invalid": !!error, labelProps: { htmlFor: htmlForId }, inputWrapperOrder: ['label', 'input', 'description', 'error'], error: error },
4398
+ React__default.createElement(Input$1.Wrapper, { size: "md", withAsterisk: required, label: label, "data-invalid": !!error, labelProps: { htmlFor: htmlForId }, inputWrapperOrder: ['label', 'input', 'description', 'error'], error: error },
3858
4399
  React__default.createElement("div", { className: "mantine-Input-wrapper" },
3859
- React__default.createElement(Phone, Object.assign({ className: "mantine-Input-input", name: value, spellCheck: false, type: "tel", placeholder: placeholder,
4400
+ React__default.createElement(Phone, Object.assign({ className: "mantine-Input-input", name: value, spellCheck: false, type: "tel", placeholder: " ",
3860
4401
  // onBlur={(e) => inputOnBlur('tel', e)}
3861
4402
  id: htmlForId, defaultCountry: (locale ? MAPPED_LOCALE[locale] || 'VN' : 'VN'), "data-control": "tel" }, formPhoneInputWrapper))))));
3862
4403
  }
3863
4404
  case 'LocationBlock': {
3864
4405
  return (React__default.createElement(TextField, { key: index, shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field" },
3865
- React__default.createElement(GoogleLocationBlock, Object.assign({ withAsterisk: required, name: value, placeholder: placeholder, label: placeholder, "data-control": "text", locale: locale, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
4406
+ React__default.createElement(GoogleLocationBlock, Object.assign({ withAsterisk: required, name: value, placeholder: " ", label: label, "data-control": "text", locale: locale, inputWrapperOrder: ['label', 'input', 'description', 'error'] }, form.getInputProps(value)))));
3866
4407
  }
3867
4408
  case 'DateBlock': {
3868
4409
  const _c = form.getInputProps(value), { error } = _c, formInputProps = __rest(_c, ["error"]);
3869
- return (React__default.createElement(Input$1.Wrapper, { key: index, size: "md", withAsterisk: required, label: placeholder, "data-invalid": !!error, inputWrapperOrder: ['label', 'input', 'description', 'error'], error: error, className: "lead-modal__form-control leadgen-form_field" },
4410
+ return (React__default.createElement(Input$1.Wrapper, { key: index, size: "md", withAsterisk: required, label: label, "data-invalid": !!error, inputWrapperOrder: ['label', 'input', 'description', 'error'], error: error, className: "lead-modal__form-control leadgen-form_field" },
3870
4411
  React__default.createElement(InputDate, Object.assign({ name: value, error: Boolean(error), locale: locale, "data-extra": true, "data-name": value, "data-control": "date", className: "leadgen-form_field_date", labelTuples: labelTuples }, formInputProps))));
3871
4412
  }
3872
4413
  case 'LinkButtonBlock':
@@ -3883,7 +4424,7 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
3883
4424
  }, "data-name": value + '-mailchimp' })),
3884
4425
  React__default.createElement(Checkbox.Group, Object.assign({ withAsterisk: required,
3885
4426
  // className="lead-modal__form-control leadgen-form_field"
3886
- label: placeholder, size: "md", sx: {
4427
+ label: label, size: "md", sx: {
3887
4428
  display: 'flex',
3888
4429
  flexDirection: 'column',
3889
4430
  flexWrap: 'wrap',
@@ -3896,20 +4437,41 @@ const LightboxFields = ({ listBlockAdded, popupId, locale, onClose, onOtherSubmi
3896
4437
  isSendMailChimp && (React__default.createElement(Input$1, { type: "hidden", name: value + '-mailchimp', value: isSendMailChimp })),
3897
4438
  React__default.createElement(Radio.Group, Object.assign({ withAsterisk: required,
3898
4439
  // className="lead-modal__form-control leadgen-form_field"
3899
- label: placeholder, size: "md", inputWrapperOrder: ['label', 'input', 'description', 'error'], inputContainer: (children) => {
4440
+ label: label, size: "md", inputWrapperOrder: ['label', 'input', 'description', 'error'], inputContainer: (children) => {
3900
4441
  return (React__default.createElement("div", { className: "leadgen-choiceContainer" }, children));
3901
4442
  } }, form.getInputProps(value)), listQuestion.map((l, _index) => (React__default.createElement(Radio, { name: value, key: _index, value: l.value, label: l.placeholder, "data-control": "radio" }))))));
3902
4443
  case 'DropdownBlock':
3903
- return (React__default.createElement(TextField, { shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field", key: index },
4444
+ return (React__default.createElement(TextField, { shrink: !!formValue, className: "lead-modal__form-control leadgen-form_field DropdownBlock", key: index },
3904
4445
  React__default.createElement("div", { style: { display: 'none' }, "data-extra": true, "data-name": value, "data-control": 'dropdown' }),
3905
4446
  React__default.createElement(Select
3906
4447
  // className="lead-modal__form-control leadgen-form_field"
3907
4448
  , Object.assign({
3908
4449
  // className="lead-modal__form-control leadgen-form_field"
3909
- label: placeholder, placeholder: placeholder, withAsterisk: required, name: value, data: listQuestion.map((l) => ({
4450
+ label: label, placeholder: " ", searchable: true, withAsterisk: required, name: value, data: listQuestion.map((l) => ({
3910
4451
  value: l.value,
3911
4452
  label: l.placeholder,
3912
- })) }, form.getInputProps(value)))));
4453
+ })), nothingFound: React__default.createElement(NoData, null), styles: {
4454
+ item: {
4455
+ paddingBlock: 12,
4456
+ paddingInline: 10,
4457
+ fontSize: 16,
4458
+ lineHeight: 1.5,
4459
+ },
4460
+ nothingFound: {
4461
+ fontSize: 54,
4462
+ paddingBlock: 30,
4463
+ },
4464
+ itemsWrapper: {
4465
+ padding: 6,
4466
+ },
4467
+ dropdown: {
4468
+ '.mantine-ScrollArea-scrollbar[data-orientation="vertical"]': {
4469
+ '--radix-scroll-area-thumb-width': '6px',
4470
+ width: 'var(--radix-scroll-area-thumb-width)',
4471
+ paddingInline: 0,
4472
+ },
4473
+ },
4474
+ }, maxDropdownHeight: 192 }, form.getInputProps(value)))));
3913
4475
  case 'TncBlock':
3914
4476
  const _d = form.getInputProps(`TNC-${id}`), { error } = _d, tncInputProps = __rest(_d, ["error"]);
3915
4477
  return (React__default.createElement(ChoiceField, { className: "leadgen-form_checkbox", key: id },
@@ -4169,7 +4731,7 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
4169
4731
  const [open, setOpen] = useState(!!campaignId);
4170
4732
  const [showOtpPhone, setShowOtpPhone] = useState(null);
4171
4733
  const [isSubmitLoading, setIsSubmitLoading] = useState(false);
4172
- const [snap, setSnap] = useState(0.8);
4734
+ // const [snap, setSnap] = useState<string | number | null>(0.8)
4173
4735
  const formRef = useRef();
4174
4736
  const onClose = () => {
4175
4737
  if (showOtpPhone) {
@@ -4179,6 +4741,8 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
4179
4741
  onCloseProp === null || onCloseProp === void 0 ? void 0 : onCloseProp();
4180
4742
  }
4181
4743
  };
4744
+ const { height } = useViewportDimensions();
4745
+ usePreventScroll();
4182
4746
  const textBlocks = JSON.parse(extraFields.textBlocks);
4183
4747
  const listBlockAdded = JSON.parse(extraFields.listBlockAdded);
4184
4748
  const actionBlocks = JSON.parse(extraFields.actionBlocks);
@@ -4237,10 +4801,46 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
4237
4801
  }, [...listBlockAddedRequired.map((k) => form.values[k])]);
4238
4802
  const onFocus = (e) => {
4239
4803
  e.preventDefault();
4240
- setTimeout(() => {
4241
- const target = e.target;
4242
- target.scrollIntoView({ block: 'center', behavior: 'auto' });
4243
- }, 300); // Wait a bit to let keyboard open
4804
+ function scrollIntoView() {
4805
+ const $Input = e.target;
4806
+ const $TextField = $Input.closest('.leadgen-form_field');
4807
+ const scrollIntoView = {
4808
+ block: 'center',
4809
+ behavior: 'auto',
4810
+ };
4811
+ if ($TextField.classList.contains('DropdownBlock')) {
4812
+ scrollIntoView.block = 'start';
4813
+ const tfOffsetTop = ($TextField === null || $TextField === void 0 ? void 0 : $TextField.offsetTop) || 0;
4814
+ const tfHeight = $TextField.clientHeight;
4815
+ const $ScrollableElement = getParentScroll($TextField);
4816
+ if ($ScrollableElement) {
4817
+ // https://hhgdev.atlassian.net/browse/EL-682
4818
+ const scrollHeight = $ScrollableElement.scrollHeight;
4819
+ if (scrollHeight - (tfOffsetTop + tfHeight) < 192) {
4820
+ scrollIntoView.block = 'end';
4821
+ }
4822
+ }
4823
+ }
4824
+ if (isMobile) {
4825
+ window.scrollTo(0, 0);
4826
+ }
4827
+ $TextField.scrollIntoView(scrollIntoView);
4828
+ }
4829
+ let time = 0;
4830
+ function requestFrame(timestamp) {
4831
+ if (time === 0) {
4832
+ time = timestamp;
4833
+ }
4834
+ if (timestamp - time <= 250) {
4835
+ requestAnimationFrame(requestFrame);
4836
+ }
4837
+ else {
4838
+ scrollIntoView();
4839
+ }
4840
+ }
4841
+ if (isMobile) {
4842
+ requestAnimationFrame(requestFrame);
4843
+ }
4244
4844
  };
4245
4845
  const middlewareOnSubmit = (e) => {
4246
4846
  e.preventDefault();
@@ -4388,18 +4988,24 @@ const LightboxLayout = ({ popupId, extraFields, onClose: onCloseProp, onOtherSub
4388
4988
  'leadgen-inline': isInPage,
4389
4989
  'leadgen-slider': isSlider,
4390
4990
  });
4391
- const PopupContainer = isDrawer ? (
4392
- // <LeadGenLightBoxB
4393
- // form={form}
4394
- // loading={isSubmitLoading}
4395
- // visible={open}
4396
- // onVisible={() => onOpenChange(false)}
4991
+ const PopupContainer = isDrawer ? (React__default.createElement(LeadGenLightBoxB, { form: form, loading: isSubmitLoading, visible: open, onVisible: () => onOpenChange(false) }, PopupWrapper)) : (
4992
+ // <DrawerComponent
4993
+ // fadeFromIndex={ZINDEX_SSO - 9e6}
4994
+ // open={open}
4995
+ // snapPoints={[0.8, 1]}
4996
+ // activeSnapPoint={snap}
4997
+ // setActiveSnapPoint={setSnap}
4998
+ // onOpenChange={onOpenChange}
4999
+ // overlayClassName={popupContainerClassName}
5000
+ // className="leadgen-drawer"
4397
5001
  // >
4398
5002
  // {PopupWrapper}
4399
- // </LeadGenLightBoxB>
4400
- React__default.createElement(DrawerComponent, { fadeFromIndex: ZINDEX_SSO - 9e6, open: open, snapPoints: [0.8, 1], activeSnapPoint: snap, setActiveSnapPoint: setSnap, onOpenChange: onOpenChange, overlayClassName: popupContainerClassName, className: "leadgen-drawer" },
4401
- PopupWrapper,
4402
- React__default.createElement("div", { style: { position: 'absolute', inset: 0, zIndex: snap === 1 ? -1 : 1 }, onClick: () => setSnap(1) }))) : (React__default.createElement("div", { id: popupId, "data-popup-url": currentPath, "data-popup-type": "lightbox-inline", className: popupContainerClassName },
5003
+ // <div
5004
+ // style={{ position: 'absolute', inset: 0, zIndex: snap === 1 ? -1 : 1 }}
5005
+ // onClick={() => setSnap(1)}
5006
+ // />
5007
+ // </DrawerComponent>
5008
+ React__default.createElement("div", { id: popupId, "data-popup-url": currentPath, "data-popup-type": "lightbox-inline", className: popupContainerClassName, style: isMobile ? { maxHeight: height } : undefined },
4403
5009
  isFullscreen ? (React__default.createElement("img", { className: "le-only-desktop le-fullscreen-img", draggable: false, src: imageBackground || '', style: {
4404
5010
  aspectRatio: `${imageBackgroundWidth}/${imageBackgroundHeight}`,
4405
5011
  } })) : null,