se-design 1.0.59 → 1.0.61-dev

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 (459) hide show
  1. package/dist/assets/colors.css +2 -2
  2. package/dist/assets/icons/checkbox-disabled-minus.svg +1 -1
  3. package/dist/assets/icons/checkbox-disabled-tick.svg +1 -1
  4. package/dist/assets/icons/checkbox-fill.svg +1 -1
  5. package/dist/assets/icons/checkbox-hover-fill.svg +2 -2
  6. package/dist/assets/icons/sort-asc.svg +3 -4
  7. package/dist/assets/icons/sort-desc.svg +2 -3
  8. package/dist/assets/style.css +1 -1
  9. package/dist/components/AutoCompleteInput/index.d.ts +37 -7
  10. package/dist/components/DropdownWithInputTags/index.d.ts +7 -1
  11. package/dist/components/Header/index.d.ts +1 -0
  12. package/dist/components/OTPInput/index.d.ts +1 -0
  13. package/dist/components/PhoneInput/index.d.ts +19 -0
  14. package/dist/components/RadioGroup/index.d.ts +17 -0
  15. package/dist/components/SidebarOverlay/index.d.ts +4 -0
  16. package/dist/components/SkipLinksBar/index.d.ts +11 -0
  17. package/dist/components/index.d.ts +1 -0
  18. package/dist/index.js +124 -120
  19. package/dist/index.js.map +1 -1
  20. package/dist/index10.js +56 -46
  21. package/dist/index10.js.map +1 -1
  22. package/dist/index100.js +2 -2
  23. package/dist/index100.js.map +1 -1
  24. package/dist/index101.js +2 -2
  25. package/dist/index101.js.map +1 -1
  26. package/dist/index102.js +2 -2
  27. package/dist/index102.js.map +1 -1
  28. package/dist/index103.js +2 -2
  29. package/dist/index103.js.map +1 -1
  30. package/dist/index104.js +1 -1
  31. package/dist/index104.js.map +1 -1
  32. package/dist/index105.js +1 -1
  33. package/dist/index105.js.map +1 -1
  34. package/dist/index106.js +2 -2
  35. package/dist/index106.js.map +1 -1
  36. package/dist/index107.js +2 -2
  37. package/dist/index107.js.map +1 -1
  38. package/dist/index108.js +2 -2
  39. package/dist/index108.js.map +1 -1
  40. package/dist/index109.js +2 -2
  41. package/dist/index109.js.map +1 -1
  42. package/dist/index11.js +48 -18
  43. package/dist/index11.js.map +1 -1
  44. package/dist/index110.js +1 -1
  45. package/dist/index110.js.map +1 -1
  46. package/dist/index111.js +1 -1
  47. package/dist/index111.js.map +1 -1
  48. package/dist/index112.js +2 -2
  49. package/dist/index112.js.map +1 -1
  50. package/dist/index113.js +1 -1
  51. package/dist/index113.js.map +1 -1
  52. package/dist/index114.js +1 -1
  53. package/dist/index114.js.map +1 -1
  54. package/dist/index115.js +2 -2
  55. package/dist/index115.js.map +1 -1
  56. package/dist/index116.js +2 -2
  57. package/dist/index116.js.map +1 -1
  58. package/dist/index117.js +2 -2
  59. package/dist/index117.js.map +1 -1
  60. package/dist/index118.js +2 -2
  61. package/dist/index118.js.map +1 -1
  62. package/dist/index119.js +1 -1
  63. package/dist/index119.js.map +1 -1
  64. package/dist/index12.js +20 -11
  65. package/dist/index12.js.map +1 -1
  66. package/dist/index120.js +1 -1
  67. package/dist/index120.js.map +1 -1
  68. package/dist/index121.js +1 -1
  69. package/dist/index121.js.map +1 -1
  70. package/dist/index122.js +1 -1
  71. package/dist/index122.js.map +1 -1
  72. package/dist/index123.js +1 -1
  73. package/dist/index123.js.map +1 -1
  74. package/dist/index124.js +1 -1
  75. package/dist/index124.js.map +1 -1
  76. package/dist/index125.js +1 -1
  77. package/dist/index125.js.map +1 -1
  78. package/dist/index126.js +2 -2
  79. package/dist/index126.js.map +1 -1
  80. package/dist/index127.js +1 -1
  81. package/dist/index127.js.map +1 -1
  82. package/dist/index128.js +2 -2
  83. package/dist/index128.js.map +1 -1
  84. package/dist/index129.js +1 -1
  85. package/dist/index129.js.map +1 -1
  86. package/dist/index13.js +15 -9
  87. package/dist/index13.js.map +1 -1
  88. package/dist/index130.js +1 -1
  89. package/dist/index130.js.map +1 -1
  90. package/dist/index131.js +1 -1
  91. package/dist/index131.js.map +1 -1
  92. package/dist/index132.js +1 -1
  93. package/dist/index132.js.map +1 -1
  94. package/dist/index133.js +1 -1
  95. package/dist/index133.js.map +1 -1
  96. package/dist/index134.js +2 -2
  97. package/dist/index134.js.map +1 -1
  98. package/dist/index135.js +2 -2
  99. package/dist/index135.js.map +1 -1
  100. package/dist/index136.js +2 -2
  101. package/dist/index136.js.map +1 -1
  102. package/dist/index137.js +2 -2
  103. package/dist/index137.js.map +1 -1
  104. package/dist/index138.js +2 -2
  105. package/dist/index138.js.map +1 -1
  106. package/dist/index139.js +2 -2
  107. package/dist/index139.js.map +1 -1
  108. package/dist/index14.js +10 -202
  109. package/dist/index14.js.map +1 -1
  110. package/dist/index140.js +2 -2
  111. package/dist/index140.js.map +1 -1
  112. package/dist/index141.js +1 -1
  113. package/dist/index141.js.map +1 -1
  114. package/dist/index142.js +1 -1
  115. package/dist/index142.js.map +1 -1
  116. package/dist/index143.js +1 -1
  117. package/dist/index143.js.map +1 -1
  118. package/dist/index144.js +1 -1
  119. package/dist/index144.js.map +1 -1
  120. package/dist/index145.js +1 -1
  121. package/dist/index145.js.map +1 -1
  122. package/dist/index146.js +1 -1
  123. package/dist/index146.js.map +1 -1
  124. package/dist/index147.js +1 -1
  125. package/dist/index147.js.map +1 -1
  126. package/dist/index148.js +1 -1
  127. package/dist/index148.js.map +1 -1
  128. package/dist/index149.js +1 -1
  129. package/dist/index149.js.map +1 -1
  130. package/dist/index15.js +216 -59
  131. package/dist/index15.js.map +1 -1
  132. package/dist/index150.js +1 -1
  133. package/dist/index150.js.map +1 -1
  134. package/dist/index151.js +1 -1
  135. package/dist/index151.js.map +1 -1
  136. package/dist/index152.js +1 -1
  137. package/dist/index152.js.map +1 -1
  138. package/dist/index153.js +1 -1
  139. package/dist/index153.js.map +1 -1
  140. package/dist/index154.js +1 -1
  141. package/dist/index154.js.map +1 -1
  142. package/dist/index155.js +1 -1
  143. package/dist/index155.js.map +1 -1
  144. package/dist/index156.js +1 -1
  145. package/dist/index156.js.map +1 -1
  146. package/dist/index157.js +1 -1
  147. package/dist/index157.js.map +1 -1
  148. package/dist/index158.js +1 -1
  149. package/dist/index158.js.map +1 -1
  150. package/dist/index159.js +1 -1
  151. package/dist/index159.js.map +1 -1
  152. package/dist/index16.js +60 -84
  153. package/dist/index16.js.map +1 -1
  154. package/dist/index160.js +1 -1
  155. package/dist/index160.js.map +1 -1
  156. package/dist/index161.js +1 -1
  157. package/dist/index161.js.map +1 -1
  158. package/dist/index162.js +1 -1
  159. package/dist/index162.js.map +1 -1
  160. package/dist/index163.js +2 -2
  161. package/dist/index163.js.map +1 -1
  162. package/dist/index164.js +1 -1
  163. package/dist/index164.js.map +1 -1
  164. package/dist/index165.js +2 -2
  165. package/dist/index165.js.map +1 -1
  166. package/dist/index166.js +1 -1
  167. package/dist/index166.js.map +1 -1
  168. package/dist/index167.js +2 -2
  169. package/dist/index167.js.map +1 -1
  170. package/dist/index168.js +1 -1
  171. package/dist/index168.js.map +1 -1
  172. package/dist/index169.js +2 -2
  173. package/dist/index169.js.map +1 -1
  174. package/dist/index17.js +80 -274
  175. package/dist/index17.js.map +1 -1
  176. package/dist/index170.js +1 -1
  177. package/dist/index170.js.map +1 -1
  178. package/dist/index171.js +1 -1
  179. package/dist/index171.js.map +1 -1
  180. package/dist/index172.js +1 -1
  181. package/dist/index172.js.map +1 -1
  182. package/dist/index173.js +1 -1
  183. package/dist/index173.js.map +1 -1
  184. package/dist/index174.js +1 -1
  185. package/dist/index174.js.map +1 -1
  186. package/dist/index175.js +1 -1
  187. package/dist/index175.js.map +1 -1
  188. package/dist/index176.js +1 -1
  189. package/dist/index176.js.map +1 -1
  190. package/dist/index177.js +2 -2
  191. package/dist/index177.js.map +1 -1
  192. package/dist/index178.js +1 -1
  193. package/dist/index178.js.map +1 -1
  194. package/dist/index179.js +2 -2
  195. package/dist/index179.js.map +1 -1
  196. package/dist/index18.js +281 -11
  197. package/dist/index18.js.map +1 -1
  198. package/dist/index180.js +2 -149
  199. package/dist/index180.js.map +1 -1
  200. package/dist/index181.js +2 -6
  201. package/dist/index181.js.map +1 -1
  202. package/dist/index182.js +149 -5
  203. package/dist/index182.js.map +1 -1
  204. package/dist/index183.js +12 -0
  205. package/dist/index183.js.map +1 -0
  206. package/dist/index184.js +9 -0
  207. package/dist/index184.js.map +1 -0
  208. package/dist/index185.js +4 -23
  209. package/dist/index185.js.map +1 -1
  210. package/dist/index188.js +27 -0
  211. package/dist/index188.js.map +1 -0
  212. package/dist/index189.js +60 -21
  213. package/dist/index189.js.map +1 -1
  214. package/dist/index19.js +12 -31
  215. package/dist/index19.js.map +1 -1
  216. package/dist/index191.js +87 -0
  217. package/dist/index191.js.map +1 -0
  218. package/dist/index193.js +26 -0
  219. package/dist/index193.js.map +1 -0
  220. package/dist/index20.js +32 -56
  221. package/dist/index20.js.map +1 -1
  222. package/dist/{index197.js → index201.js} +1 -1
  223. package/dist/{index197.js.map → index201.js.map} +1 -1
  224. package/dist/{index205.js → index209.js} +1 -1
  225. package/dist/{index205.js.map → index209.js.map} +1 -1
  226. package/dist/index21.js +53 -75
  227. package/dist/index21.js.map +1 -1
  228. package/dist/{index207.js → index211.js} +1 -1
  229. package/dist/{index207.js.map → index211.js.map} +1 -1
  230. package/dist/{index208.js → index212.js} +2 -2
  231. package/dist/{index208.js.map → index212.js.map} +1 -1
  232. package/dist/index22.js +77 -21
  233. package/dist/index22.js.map +1 -1
  234. package/dist/index222.js +3 -9
  235. package/dist/index222.js.map +1 -1
  236. package/dist/index224.js +56 -167
  237. package/dist/index224.js.map +1 -1
  238. package/dist/index225.js +54 -11
  239. package/dist/index225.js.map +1 -1
  240. package/dist/index227.js +18 -5
  241. package/dist/index227.js.map +1 -1
  242. package/dist/index228.js +9 -5
  243. package/dist/index228.js.map +1 -1
  244. package/dist/index229.js +8 -36
  245. package/dist/index229.js.map +1 -1
  246. package/dist/index23.js +19 -190
  247. package/dist/index23.js.map +1 -1
  248. package/dist/index230.js +5 -2
  249. package/dist/index230.js.map +1 -1
  250. package/dist/index231.js +170 -8
  251. package/dist/index231.js.map +1 -1
  252. package/dist/index232.js +11 -327
  253. package/dist/index232.js.map +1 -1
  254. package/dist/index233.js +5 -49
  255. package/dist/index233.js.map +1 -1
  256. package/dist/index234.js +6 -2
  257. package/dist/index234.js.map +1 -1
  258. package/dist/index235.js +35 -73
  259. package/dist/index235.js.map +1 -1
  260. package/dist/index236.js +2 -93
  261. package/dist/index236.js.map +1 -1
  262. package/dist/index237.js +5 -49
  263. package/dist/index237.js.map +1 -1
  264. package/dist/index238.js +326 -7
  265. package/dist/index238.js.map +1 -1
  266. package/dist/index239.js +49 -4
  267. package/dist/index239.js.map +1 -1
  268. package/dist/index24.js +217 -44
  269. package/dist/index24.js.map +1 -1
  270. package/dist/index240.js +2 -52
  271. package/dist/index240.js.map +1 -1
  272. package/dist/index241.js +76 -2
  273. package/dist/index241.js.map +1 -1
  274. package/dist/index242.js +93 -2
  275. package/dist/index242.js.map +1 -1
  276. package/dist/index243.js +55 -0
  277. package/dist/index243.js.map +1 -0
  278. package/dist/index244.js +11 -0
  279. package/dist/index244.js.map +1 -0
  280. package/dist/index245.js +8 -0
  281. package/dist/index245.js.map +1 -0
  282. package/dist/index246.js +55 -0
  283. package/dist/index246.js.map +1 -0
  284. package/dist/index247.js +5 -0
  285. package/dist/index247.js.map +1 -0
  286. package/dist/index248.js +5 -0
  287. package/dist/index248.js.map +1 -0
  288. package/dist/index25.js +48 -18
  289. package/dist/index25.js.map +1 -1
  290. package/dist/index26.js +16 -80
  291. package/dist/index26.js.map +1 -1
  292. package/dist/index27.js +82 -79
  293. package/dist/index27.js.map +1 -1
  294. package/dist/index28.js +80 -130
  295. package/dist/index28.js.map +1 -1
  296. package/dist/index29.js +131 -55
  297. package/dist/index29.js.map +1 -1
  298. package/dist/index3.js +2 -2
  299. package/dist/index30.js +53 -97
  300. package/dist/index30.js.map +1 -1
  301. package/dist/index31.js +99 -61
  302. package/dist/index31.js.map +1 -1
  303. package/dist/index32.js +59 -32
  304. package/dist/index32.js.map +1 -1
  305. package/dist/index33.js +40 -71
  306. package/dist/index33.js.map +1 -1
  307. package/dist/index34.js +68 -41
  308. package/dist/index34.js.map +1 -1
  309. package/dist/index35.js +45 -57
  310. package/dist/index35.js.map +1 -1
  311. package/dist/index36.js +54 -230
  312. package/dist/index36.js.map +1 -1
  313. package/dist/index37.js +281 -70
  314. package/dist/index37.js.map +1 -1
  315. package/dist/index38.js +68 -80
  316. package/dist/index38.js.map +1 -1
  317. package/dist/index39.js +82 -32
  318. package/dist/index39.js.map +1 -1
  319. package/dist/index40.js +26 -44
  320. package/dist/index40.js.map +1 -1
  321. package/dist/index41.js +45 -67
  322. package/dist/index41.js.map +1 -1
  323. package/dist/index42.js +65 -49
  324. package/dist/index42.js.map +1 -1
  325. package/dist/index43.js +49 -89
  326. package/dist/index43.js.map +1 -1
  327. package/dist/index44.js +141 -93
  328. package/dist/index44.js.map +1 -1
  329. package/dist/index45.js +189 -35
  330. package/dist/index45.js.map +1 -1
  331. package/dist/index46.js +34 -29
  332. package/dist/index46.js.map +1 -1
  333. package/dist/index47.js +31 -147
  334. package/dist/index47.js.map +1 -1
  335. package/dist/index48.js +138 -45
  336. package/dist/index48.js.map +1 -1
  337. package/dist/index49.js +52 -373
  338. package/dist/index49.js.map +1 -1
  339. package/dist/index5.js +116 -115
  340. package/dist/index5.js.map +1 -1
  341. package/dist/index50.js +375 -63
  342. package/dist/index50.js.map +1 -1
  343. package/dist/index51.js +65 -38
  344. package/dist/index51.js.map +1 -1
  345. package/dist/index52.js +35 -35
  346. package/dist/index52.js.map +1 -1
  347. package/dist/index53.js +35 -82
  348. package/dist/index53.js.map +1 -1
  349. package/dist/index54.js +81 -159
  350. package/dist/index54.js.map +1 -1
  351. package/dist/index55.js +157 -135
  352. package/dist/index55.js.map +1 -1
  353. package/dist/index56.js +149 -29
  354. package/dist/index56.js.map +1 -1
  355. package/dist/index57.js +29 -86
  356. package/dist/index57.js.map +1 -1
  357. package/dist/index58.js +80 -113
  358. package/dist/index58.js.map +1 -1
  359. package/dist/index59.js +114 -56
  360. package/dist/index59.js.map +1 -1
  361. package/dist/index6.js +32 -51
  362. package/dist/index6.js.map +1 -1
  363. package/dist/index60.js +56 -147
  364. package/dist/index60.js.map +1 -1
  365. package/dist/index61.js +146 -312
  366. package/dist/index61.js.map +1 -1
  367. package/dist/index62.js +317 -44
  368. package/dist/index62.js.map +1 -1
  369. package/dist/index63.js +43 -139
  370. package/dist/index63.js.map +1 -1
  371. package/dist/index64.js +140 -12
  372. package/dist/index64.js.map +1 -1
  373. package/dist/index65.js +10 -42
  374. package/dist/index65.js.map +1 -1
  375. package/dist/index66.js +44 -5
  376. package/dist/index66.js.map +1 -1
  377. package/dist/index67.js +18 -8
  378. package/dist/index67.js.map +1 -1
  379. package/dist/index68.js +8 -0
  380. package/dist/index68.js.map +1 -0
  381. package/dist/index69.js +9 -2
  382. package/dist/index69.js.map +1 -1
  383. package/dist/index7.js +47 -81
  384. package/dist/index7.js.map +1 -1
  385. package/dist/index71.js +1 -1
  386. package/dist/index71.js.map +1 -1
  387. package/dist/index72.js +1 -1
  388. package/dist/index72.js.map +1 -1
  389. package/dist/index73.js +2 -2
  390. package/dist/index73.js.map +1 -1
  391. package/dist/index74.js +1 -1
  392. package/dist/index74.js.map +1 -1
  393. package/dist/index75.js +1 -1
  394. package/dist/index75.js.map +1 -1
  395. package/dist/index76.js +1 -1
  396. package/dist/index76.js.map +1 -1
  397. package/dist/index77.js +1 -1
  398. package/dist/index77.js.map +1 -1
  399. package/dist/index78.js +1 -1
  400. package/dist/index78.js.map +1 -1
  401. package/dist/index79.js +1 -1
  402. package/dist/index79.js.map +1 -1
  403. package/dist/index8.js +86 -26
  404. package/dist/index8.js.map +1 -1
  405. package/dist/index80.js +1 -1
  406. package/dist/index80.js.map +1 -1
  407. package/dist/index81.js +1 -1
  408. package/dist/index81.js.map +1 -1
  409. package/dist/index82.js +1 -1
  410. package/dist/index82.js.map +1 -1
  411. package/dist/index83.js +1 -1
  412. package/dist/index83.js.map +1 -1
  413. package/dist/index84.js +1 -1
  414. package/dist/index84.js.map +1 -1
  415. package/dist/index85.js +1 -1
  416. package/dist/index85.js.map +1 -1
  417. package/dist/index86.js +1 -1
  418. package/dist/index86.js.map +1 -1
  419. package/dist/index87.js +1 -1
  420. package/dist/index87.js.map +1 -1
  421. package/dist/index88.js +1 -1
  422. package/dist/index88.js.map +1 -1
  423. package/dist/index89.js +1 -1
  424. package/dist/index89.js.map +1 -1
  425. package/dist/index9.js +23 -59
  426. package/dist/index9.js.map +1 -1
  427. package/dist/index90.js +1 -1
  428. package/dist/index90.js.map +1 -1
  429. package/dist/index91.js +1 -1
  430. package/dist/index91.js.map +1 -1
  431. package/dist/index92.js +1 -1
  432. package/dist/index92.js.map +1 -1
  433. package/dist/index93.js +1 -1
  434. package/dist/index93.js.map +1 -1
  435. package/dist/index94.js +1 -1
  436. package/dist/index94.js.map +1 -1
  437. package/dist/index95.js +2 -2
  438. package/dist/index95.js.map +1 -1
  439. package/dist/index96.js +2 -2
  440. package/dist/index96.js.map +1 -1
  441. package/dist/index97.js +2 -2
  442. package/dist/index97.js.map +1 -1
  443. package/dist/index98.js +2 -2
  444. package/dist/index98.js.map +1 -1
  445. package/dist/index99.js +1 -1
  446. package/dist/index99.js.map +1 -1
  447. package/package.json +3 -2
  448. package/dist/index186.js +0 -65
  449. package/dist/index186.js.map +0 -1
  450. package/dist/index218.js +0 -7
  451. package/dist/index218.js.map +0 -1
  452. package/dist/index220.js +0 -62
  453. package/dist/index220.js.map +0 -1
  454. package/dist/index221.js +0 -13
  455. package/dist/index221.js.map +0 -1
  456. package/dist/index223.js +0 -8
  457. package/dist/index223.js.map +0 -1
  458. package/dist/index70.js +0 -5
  459. package/dist/index70.js.map +0 -1
package/dist/index60.js CHANGED
@@ -1,155 +1,64 @@
1
- import o, { useState as B, useRef as C, useCallback as m, useEffect as w } from "react";
2
- import { Button as L } from "./index3.js";
3
- import { Tooltip as D } from "./index14.js";
1
+ import i, { useState as p, useCallback as v, useEffect as E } from "react";
2
+ import { Popover as y } from "./index18.js";
4
3
  /* empty css */
5
- const u = {
6
- gotIt: "got_it",
7
- finish: "finish",
8
- next: "next",
9
- back: "back"
10
- }, Q = ({
11
- steps: e = [],
12
- screenBaseElementSelector: T = "",
13
- handleCloseProductTour: d,
14
- tourType: g = "",
15
- automationId: f = "onboarding-tour",
16
- highlightBorderRadius: E = 6,
17
- labels: A
18
- }) => {
19
- const [t, k] = B(0), c = C(null), l = C(null), {
20
- next: H = "Next",
21
- gotIt: P = "Got It",
22
- finish: M = "Finish",
23
- skip: W = "Skip tour",
24
- stepInfo: O = "Step {step} of {total}"
25
- } = A || {}, s = document.querySelector(T), y = m(() => {
26
- let n;
27
- if (t >= e.length)
28
- return n;
29
- const i = document.querySelector(e[t]?.targetElementContainerSelector ? e[t].targetElementContainerSelector : e[t]?.targetElementSelector);
30
- if (!i)
31
- return n;
32
- const r = i.getBoundingClientRect();
33
- return r.top >= 0 && r.left >= 0 && r.bottom <= window.innerHeight && r.right <= window.innerWidth || (r.top < 0 ? i.scrollIntoView({
34
- behavior: "auto",
35
- block: "start"
36
- }) : r.bottom > window.innerHeight && i.scrollIntoView({
37
- behavior: "auto",
38
- block: "end"
39
- })), n = setTimeout(() => {
40
- const x = document.querySelector(e[t]?.targetElementSelector);
41
- if (!x || !c.current || !l.current)
42
- return;
43
- const a = x.getBoundingClientRect(), p = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);
44
- c.current.style.height = `${p}px`;
45
- const h = e[t]?.targetElementGap || {
46
- horizontal: 0,
47
- vertical: 0
48
- }, S = E * 2, I = a.left - h.horizontal, N = a.top + window.scrollY - h.vertical, z = a.right + h.horizontal, F = a.bottom + window.scrollY + h.vertical, G = z - I, q = F - N, R = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth), _ = encodeURIComponent(`
49
- <svg width="${R}" height="${p}" xmlns="http://www.w3.org/2000/svg">
50
- <defs>
51
- <mask id="highlight-mask-${t}">
52
- <rect x="0" y="0" width="${R}" height="${p}" fill="white"/>
53
- <rect x="${I}" y="${N}" width="${G}" height="${q}" rx="${S}" ry="${S}" fill="black"/>
54
- </mask>
55
- </defs>
56
- </svg>
57
- `);
58
- c.current.style.maskImage = `url("data:image/svg+xml,${_}#highlight-mask-${t}")`, c.current.style.webkitMaskImage = `url("data:image/svg+xml,${_}#highlight-mask-${t}")`, l.current.style.top = `${a.top}px`, l.current.style.left = `${a.left}px`, l.current.style.width = `${a.width}px`, l.current.style.height = `${a.height}px`, l.current.style.borderRadius = `${E}px`;
59
- }, 50), n;
60
- }, [t, e]), V = m(() => {
61
- d(), s && s.scrollTo({
62
- top: 0,
63
- behavior: "smooth"
64
- });
65
- }, [d, s]), v = m((n) => {
66
- n?.preventDefault(), n?.stopPropagation(), t < e.length - 1 ? k((i) => i + 1) : (d(n), s && s.scrollTo({
67
- top: 0,
68
- behavior: "smooth"
69
- })), e[t]?.tourMixPanelHandler?.({
70
- user_path: g,
71
- action_type: `clicked_${t === e.length - 1 ? e.length === 1 ? u.gotIt : u.finish : u.next}`
72
- });
73
- }, [t, e, d, g, s]), $ = m(() => {
74
- t > 0 && k((n) => n - 1), e[t]?.tourMixPanelHandler?.({
75
- user_path: g,
76
- action_type: `clicked_${u.back}`
77
- });
78
- }, [t, e, g]), b = m((n) => {
79
- (n.keyCode === 37 || n.key === "ArrowLeft") && t > 0 && $(), (n.keyCode === 39 || n.key === "ArrowRight") && v();
80
- }, [t, v, $]);
81
- return w(() => (window.addEventListener("keydown", b), () => {
82
- window.removeEventListener("keydown", b);
83
- }), [b]), w(() => {
84
- let n;
85
- return t < e.length && (n = y()), () => {
86
- n && clearTimeout(n);
87
- };
88
- }, [t, e, y]), w(() => {
89
- if (t < e.length && c.current) {
90
- const n = c.current, i = (r) => {
91
- r.preventDefault(), r.stopPropagation();
92
- };
93
- return n.addEventListener("wheel", i, {
94
- passive: !1
95
- }), n.addEventListener("touchmove", i, {
96
- passive: !1
97
- }), n.addEventListener("scroll", i, {
98
- passive: !1
99
- }), () => {
100
- n.removeEventListener("wheel", i), n.removeEventListener("touchmove", i), n.removeEventListener("scroll", i);
101
- };
4
+ function d() {
5
+ return d = Object.assign ? Object.assign.bind() : function(n) {
6
+ for (var o = 1; o < arguments.length; o++) {
7
+ var t = arguments[o];
8
+ for (var e in t) ({}).hasOwnProperty.call(t, e) && (n[e] = t[e]);
102
9
  }
103
- }, [t]), !e || e.length === 0 ? null : /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("div", {
104
- className: "se-design-onboarding-tour-overlay",
105
- ref: c,
106
- "data-automation-id": `${f}-overlay`
107
- }), /* @__PURE__ */ o.createElement(D, {
108
- content: /* @__PURE__ */ o.createElement("div", {
109
- className: "se-design-onboarding-tour-tooltip-content"
110
- }, e[t]?.content?.illustration && /* @__PURE__ */ o.createElement("img", {
111
- src: e[t].content.illustration,
112
- className: "se-design-onboarding-tour-illustration",
113
- alt: "illustration"
114
- }), /* @__PURE__ */ o.createElement("div", {
115
- className: "se-design-onboarding-tour-content"
116
- }, e[t]?.content?.title && /* @__PURE__ */ o.createElement("p", {
117
- className: "se-design-onboarding-tour-title"
118
- }, e[t].content.title), e[t]?.content?.description && /* @__PURE__ */ o.createElement("p", {
119
- className: "se-design-onboarding-tour-description"
120
- }, e[t].content.description)), /* @__PURE__ */ o.createElement("div", {
121
- className: "se-design-onboarding-tour-actions"
122
- }, e.length > 1 && /* @__PURE__ */ o.createElement("span", {
123
- className: "steps"
124
- }, O.replace("{step}", `${t + 1}`).replace("{total}", `${e.length}`)), /* @__PURE__ */ o.createElement("div", {
125
- className: "btns-container"
126
- }, t !== e.length - 1 && /* @__PURE__ */ o.createElement(L, {
127
- theme: "white",
128
- type: "link",
129
- label: W,
130
- automationId: `${f}-skip-button`,
131
- onClick: V
132
- }), /* @__PURE__ */ o.createElement(L, {
133
- theme: "white",
134
- type: "primary",
135
- size: "sm",
136
- label: t === e.length - 1 ? e.length === 1 ? P : M : H,
137
- automationId: `${f}-next-button`,
138
- onClick: v
139
- })))),
140
- tooltipSrc: /* @__PURE__ */ o.createElement("div", {
141
- className: "blocker",
142
- ref: l
143
- }),
144
- tooltipSrcRef: l,
145
- position: e[t]?.tooltipPosition || "bottom-center",
146
- tooltipOffset: 16,
147
- displayOn: "always-on",
10
+ return n;
11
+ }, d.apply(null, arguments);
12
+ }
13
+ const w = ({
14
+ label: n,
15
+ children: o,
16
+ iconColor: t = "var(--color-blue-500)",
17
+ isDisabled: e = !1,
18
+ noPadding: u = !1
19
+ }) => {
20
+ const [f, r] = p(!1), [m, s] = p(!1), l = f || m, c = v((a) => {
21
+ a.key === "Escape" && (r(!1), s(!1), a.stopImmediatePropagation());
22
+ }, []);
23
+ E(() => {
24
+ if (l)
25
+ return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
26
+ }, [l, c]);
27
+ const g = {
28
+ onMouseEnter: () => r(!0),
29
+ onMouseLeave: () => r(!1),
30
+ onFocus: () => s(!0),
31
+ onBlur: () => s(!1)
32
+ };
33
+ return /* @__PURE__ */ i.createElement("div", d({
34
+ className: e ? "se-design-info-tooltip-wrapper-disabled" : ""
35
+ }, e ? {} : g), /* @__PURE__ */ i.createElement(y, {
36
+ position: "bottom-center",
37
+ isPopoverOpen: l,
38
+ onPopoverToggle: (a) => {
39
+ a || (r(!1), s(!1));
40
+ },
41
+ renderPopoverSrcElement: () => /* @__PURE__ */ i.createElement("div", {
42
+ className: `se-design-info-tooltip-src ${u ? "no-padding" : ""} ${e ? "se-design-info-tooltip-disabled" : ""}`,
43
+ style: {
44
+ "--info-tooltip-icon-color": t,
45
+ cursor: e ? "not-allowed" : "pointer"
46
+ }
47
+ }, o),
48
+ renderPopoverContents: () => /* @__PURE__ */ i.createElement("div", {
49
+ className: "se-design-info-tooltip-content",
50
+ "data-automation-id": "se-design-info-tooltip-content"
51
+ }, n),
148
52
  isWithPortal: !0,
149
- maxWidth: 384
53
+ noBorder: !0,
54
+ disableClickToggle: !0,
55
+ popoverContentStyleProperty: {
56
+ zIndex: 2e3,
57
+ backgroundColor: ""
58
+ }
150
59
  }));
151
60
  };
152
61
  export {
153
- Q as OnboardingTour
62
+ w as InfoTooltip
154
63
  };
155
64
  //# sourceMappingURL=index60.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index60.js","sources":["../src/components/OnboardingTour/index.tsx"],"sourcesContent":["import React, { FC, useEffect, useRef, useState, useCallback } from 'react';\n\nimport { Button } from 'components/Button';\nimport { Tooltip } from 'components/Tooltip';\n\nimport './style.scss';\n\nconst TOUR_NAVIGATION_STEPS = {\n gotIt: 'got_it',\n finish: 'finish',\n next: 'next',\n back: 'back'\n};\n\nexport interface TourStep {\n targetElementSelector: string;\n targetElementContainerSelector?: string;\n targetElementGap?: {\n horizontal: number;\n vertical: number;\n };\n tooltipPosition?:\n | 'top-left'\n | 'top-center'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'bottom-right'\n | 'left-top'\n | 'left-center'\n | 'left-bottom'\n | 'right-top'\n | 'right-center'\n | 'right-bottom';\n content: {\n title?: string;\n description?: string;\n illustration?: any;\n };\n tourMixPanelHandler?: (data: { user_path: string; action_type: string }) => void;\n}\n\nexport interface OnboardingTourProps {\n steps: TourStep[];\n screenBaseElementSelector: string;\n handleCloseProductTour: (e?: React.MouseEvent<HTMLButtonElement>) => void;\n tourType?: string;\n highlightBorderRadius?: number;\n automationId?: string;\n labels?: {\n next: string;\n gotIt: string;\n finish: string;\n skip: string;\n stepInfo: string;\n };\n}\n\nexport const OnboardingTour: FC<OnboardingTourProps> = ({\n steps = [],\n screenBaseElementSelector = '',\n handleCloseProductTour,\n tourType = '',\n automationId = 'onboarding-tour',\n highlightBorderRadius = 6,\n labels\n}) => {\n const [currentStep, setCurrentStep] = useState(0);\n const overlayRef = useRef<HTMLDivElement>(null);\n const blockerRef = useRef<HTMLDivElement>(null);\n\n const {\n next = 'Next',\n gotIt = 'Got It',\n finish = 'Finish',\n skip = 'Skip tour',\n stepInfo = 'Step {step} of {total}'\n } = labels || {};\n\n const parentScreenElement = document.querySelector(screenBaseElementSelector) as HTMLElement | null;\n\n const clipTargetElementAndPositionTooltip = useCallback(() => {\n let timerId: any;\n\n if (currentStep >= steps.length) {\n return timerId;\n }\n\n // get the target element\n const initialTargetElement = document.querySelector(\n steps[currentStep]?.targetElementContainerSelector\n ? steps[currentStep].targetElementContainerSelector\n : steps[currentStep]?.targetElementSelector\n ) as HTMLElement | null;\n\n if (!initialTargetElement) {\n return timerId;\n }\n\n const initialTargetArea = initialTargetElement.getBoundingClientRect();\n\n // check whether target element is fully visible in viewport\n const isFullyVisible =\n initialTargetArea.top >= 0 &&\n initialTargetArea.left >= 0 &&\n initialTargetArea.bottom <= window.innerHeight &&\n initialTargetArea.right <= window.innerWidth;\n\n if (!isFullyVisible) {\n if (initialTargetArea.top < 0) {\n initialTargetElement.scrollIntoView({ behavior: 'auto', block: 'start' });\n } else if (initialTargetArea.bottom > window.innerHeight) {\n initialTargetElement.scrollIntoView({ behavior: 'auto', block: 'end' });\n }\n }\n\n // if the target element is visible, then clip the target element and position the tooltip\n timerId = setTimeout(() => {\n const targetElement = document.querySelector(steps[currentStep]?.targetElementSelector) as HTMLElement | null;\n\n if (!targetElement || !overlayRef.current || !blockerRef.current) {\n return;\n }\n\n const targetArea = targetElement.getBoundingClientRect();\n\n const documentHeight = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);\n\n // Update overlay dimensions and calculate target element area to focus\n overlayRef.current.style.height = `${documentHeight}px`;\n\n // Providing gap around target element\n const targetElementGap = steps[currentStep]?.targetElementGap || { horizontal: 0, vertical: 0 };\n\n // clip the target element with rounded corners\n const borderRadius = highlightBorderRadius * 2;\n const left = targetArea.left - targetElementGap.horizontal;\n const top = targetArea.top + window.scrollY - targetElementGap.vertical;\n const right = targetArea.right + targetElementGap.horizontal;\n const bottom = targetArea.bottom + window.scrollY + targetElementGap.vertical;\n const width = right - left;\n const height = bottom - top;\n const documentWidth = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth);\n\n // Create SVG mask with rounded rectangle hole\n const svgMask = encodeURIComponent(`\n <svg width=\"${documentWidth}\" height=\"${documentHeight}\" xmlns=\"http://www.w3.org/2000/svg\">\n <defs>\n <mask id=\"highlight-mask-${currentStep}\">\n <rect x=\"0\" y=\"0\" width=\"${documentWidth}\" height=\"${documentHeight}\" fill=\"white\"/>\n <rect x=\"${left}\" y=\"${top}\" width=\"${width}\" height=\"${height}\" rx=\"${borderRadius}\" ry=\"${borderRadius}\" fill=\"black\"/>\n </mask>\n </defs>\n </svg>\n `);\n\n // Apply created mask to the overlay\n overlayRef.current.style.maskImage = `url(\"data:image/svg+xml,${svgMask}#highlight-mask-${currentStep}\")`;\n overlayRef.current.style.webkitMaskImage = `url(\"data:image/svg+xml,${svgMask}#highlight-mask-${currentStep}\")`;\n\n // Position blocker over clipped area to avoid clicks on the target element\n blockerRef.current.style.top = `${targetArea.top}px`;\n blockerRef.current.style.left = `${targetArea.left}px`;\n blockerRef.current.style.width = `${targetArea.width}px`;\n blockerRef.current.style.height = `${targetArea.height}px`;\n blockerRef.current.style.borderRadius = `${highlightBorderRadius}px`;\n }, 50);\n\n return timerId;\n }, [currentStep, steps]);\n\n const handleSkipTour = useCallback(() => {\n handleCloseProductTour();\n if (parentScreenElement) {\n parentScreenElement.scrollTo({ top: 0, behavior: 'smooth' });\n }\n }, [handleCloseProductTour, parentScreenElement]);\n\n const handleNextClick = useCallback(\n (e?: React.MouseEvent<HTMLButtonElement>) => {\n e?.preventDefault();\n e?.stopPropagation();\n\n if (currentStep < steps.length - 1) {\n setCurrentStep((prev) => prev + 1);\n } else {\n handleCloseProductTour(e);\n if (parentScreenElement) {\n parentScreenElement.scrollTo({ top: 0, behavior: 'smooth' });\n }\n }\n steps[currentStep]?.tourMixPanelHandler?.({\n user_path: tourType,\n action_type: `clicked_${\n currentStep === steps.length - 1\n ? steps.length === 1\n ? TOUR_NAVIGATION_STEPS.gotIt\n : TOUR_NAVIGATION_STEPS.finish\n : TOUR_NAVIGATION_STEPS.next\n }`\n });\n },\n [currentStep, steps, handleCloseProductTour, tourType, parentScreenElement]\n );\n\n const handlePrevClick = useCallback(() => {\n if (currentStep > 0) {\n setCurrentStep((prev) => prev - 1);\n }\n steps[currentStep]?.tourMixPanelHandler?.({\n user_path: tourType,\n action_type: `clicked_${TOUR_NAVIGATION_STEPS.back}`\n });\n }, [currentStep, steps, tourType]);\n\n const handleKeyPress = useCallback(\n (e: KeyboardEvent) => {\n if (e.keyCode === 37 || e.key === 'ArrowLeft') {\n // for previous navigation\n if (currentStep > 0) {\n handlePrevClick();\n }\n }\n if (e.keyCode === 39 || e.key === 'ArrowRight') {\n // for next navigation\n handleNextClick();\n }\n },\n [currentStep, handleNextClick, handlePrevClick]\n );\n\n useEffect(() => {\n // Adding event listener for keydown\n window.addEventListener('keydown', handleKeyPress);\n\n return () => {\n window.removeEventListener('keydown', handleKeyPress);\n };\n }, [handleKeyPress]);\n\n useEffect(() => {\n let timerId: any;\n if (currentStep < steps.length) {\n timerId = clipTargetElementAndPositionTooltip();\n }\n\n return () => {\n if (timerId) {\n clearTimeout(timerId);\n }\n };\n }, [currentStep, steps, clipTargetElementAndPositionTooltip]);\n\n // To prevent scroll when tour is active\n useEffect(() => {\n if (currentStep < steps.length && overlayRef.current) {\n const overlay = overlayRef.current;\n\n const preventScroll = (e: Event) => {\n e.preventDefault();\n e.stopPropagation();\n };\n\n overlay.addEventListener('wheel', preventScroll, { passive: false });\n overlay.addEventListener('touchmove', preventScroll, { passive: false });\n overlay.addEventListener('scroll', preventScroll, { passive: false });\n\n return () => {\n overlay.removeEventListener('wheel', preventScroll);\n overlay.removeEventListener('touchmove', preventScroll);\n overlay.removeEventListener('scroll', preventScroll);\n };\n }\n }, [currentStep]);\n\n if (!steps || steps.length === 0) {\n return null;\n }\n\n return (\n <>\n <div\n className=\"se-design-onboarding-tour-overlay\"\n ref={overlayRef}\n data-automation-id={`${automationId}-overlay`}\n />\n\n <Tooltip\n content={\n <div className=\"se-design-onboarding-tour-tooltip-content\">\n {steps[currentStep]?.content?.illustration && (\n <img\n src={steps[currentStep].content.illustration}\n className=\"se-design-onboarding-tour-illustration\"\n alt=\"illustration\"\n />\n )}\n <div className=\"se-design-onboarding-tour-content\">\n {steps[currentStep]?.content?.title && (\n <p className=\"se-design-onboarding-tour-title\">{steps[currentStep].content.title}</p>\n )}\n {steps[currentStep]?.content?.description && (\n <p className=\"se-design-onboarding-tour-description\">{steps[currentStep].content.description}</p>\n )}\n </div>\n\n <div className=\"se-design-onboarding-tour-actions\">\n {steps.length > 1 && (\n <span className=\"steps\">\n {stepInfo.replace('{step}', `${currentStep + 1}`).replace('{total}', `${steps.length}`)}\n </span>\n )}\n <div className=\"btns-container\">\n {currentStep !== steps.length - 1 && (\n <Button\n theme=\"white\"\n type=\"link\"\n label={skip}\n automationId={`${automationId}-skip-button`}\n onClick={handleSkipTour}\n />\n )}\n <Button\n theme=\"white\"\n type=\"primary\"\n size=\"sm\"\n label={currentStep === steps.length - 1 ? (steps.length === 1 ? gotIt : finish) : next}\n automationId={`${automationId}-next-button`}\n onClick={handleNextClick}\n />\n </div>\n </div>\n </div>\n }\n tooltipSrc={<div className=\"blocker\" ref={blockerRef} />}\n tooltipSrcRef={blockerRef as React.RefObject<HTMLDivElement>}\n position={steps[currentStep]?.tooltipPosition || 'bottom-center'}\n tooltipOffset={16}\n displayOn=\"always-on\"\n isWithPortal={true}\n maxWidth={384}\n />\n </>\n );\n};\n"],"names":["React__default","useState","useRef","useCallback","useEffect","Button","Tooltip","TOUR_NAVIGATION_STEPS","gotIt","finish","next","back","OnboardingTour","steps","screenBaseElementSelector","handleCloseProductTour","tourType","automationId","highlightBorderRadius","labels","currentStep","setCurrentStep","overlayRef","blockerRef","skip","stepInfo","parentScreenElement","document","querySelector","clipTargetElementAndPositionTooltip","timerId","length","initialTargetElement","targetElementContainerSelector","targetElementSelector","initialTargetArea","getBoundingClientRect","top","left","bottom","window","innerHeight","right","innerWidth","scrollIntoView","behavior","block","setTimeout","targetElement","current","targetArea","documentHeight","Math","max","documentElement","scrollHeight","body","style","height","targetElementGap","horizontal","vertical","borderRadius","scrollY","width","documentWidth","scrollWidth","svgMask","encodeURIComponent","maskImage","webkitMaskImage","handleSkipTour","scrollTo","handleNextClick","e","preventDefault","stopPropagation","prev","tourMixPanelHandler","user_path","action_type","handlePrevClick","handleKeyPress","keyCode","key","addEventListener","removeEventListener","clearTimeout","overlay","preventScroll","passive","createElement","React","Fragment","className","ref","content","illustration","src","alt","title","description","replace","theme","type","label","onClick","size","tooltipSrc","tooltipSrcRef","position","tooltipPosition","tooltipOffset","displayOn","isWithPortal","maxWidth"],"mappings":"AAOA,OAAAA,KAAA,YAAAC,GAAA,UAAAC,GAAA,eAAAC,GAAA,aAAAC,SAAA;AAAA,SAAA,UAAAC,SAAA;AAAA,SAAA,WAAAC,SAAA;AAAA,OAAA;AAAA,MAAMC,IAAwB;AAAA,EAC5BC,OAAO;AAAA,EACPC,QAAQ;AAAA,EACRC,MAAM;AAAA,EACNC,MAAM;AACR,GA8CaC,IAA0CA,CAAC;AAAA,EACtDC,OAAAA,IAAQ,CAAA;AAAA,EACRC,2BAAAA,IAA4B;AAAA,EAC5BC,wBAAAA;AAAAA,EACAC,UAAAA,IAAW;AAAA,EACXC,cAAAA,IAAe;AAAA,EACfC,uBAAAA,IAAwB;AAAA,EACxBC,QAAAA;AACF,MAAM;AACJ,QAAM,CAACC,GAAaC,CAAc,IAAIpB,EAAS,CAAC,GAC1CqB,IAAapB,EAAuB,IAAI,GACxCqB,IAAarB,EAAuB,IAAI,GAExC;AAAA,IACJQ,MAAAA,IAAO;AAAA,IACPF,OAAAA,IAAQ;AAAA,IACRC,QAAAA,IAAS;AAAA,IACTe,MAAAA,IAAO;AAAA,IACPC,UAAAA,IAAW;AAAA,EAAA,IACTN,KAAU,CAAA,GAERO,IAAsBC,SAASC,cAAcd,CAAyB,GAEtEe,IAAsC1B,EAAY,MAAM;AAC5D,QAAI2B;AAEJ,QAAIV,KAAeP,EAAMkB;AACvB,aAAOD;AAIT,UAAME,IAAu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CACX,CACD;AAEN;"}
1
+ {"version":3,"file":"index60.js","sources":["../src/components/InfoTooltip/index.tsx"],"sourcesContent":["import React, { useState, useEffect, useCallback } from 'react';\nimport { Popover } from '../Popover';\nimport './styles.scss';\n\nexport interface InfoTooltipProps {\n label: string;\n children: React.ReactNode;\n iconColor?: string;\n isDisabled?: boolean;\n /**\n * Remove padding from tooltip wrapper (useful for precise alignment)\n */\n noPadding?: boolean;\n}\n\nexport const InfoTooltip = ({\n label,\n children,\n iconColor = 'var(--color-blue-500)',\n isDisabled = false,\n noPadding = false\n}: InfoTooltipProps) => {\n const [isHovered, setIsHovered] = useState(false);\n const [isFocused, setIsFocused] = useState(false);\n\n // Show tooltip on hover OR focus (for keyboard accessibility)\n const isOpen = isHovered || isFocused;\n\n // Global Escape key handler (W3C WAI-ARIA tooltip pattern requirement)\n const handleEscapeKey = useCallback((event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n setIsHovered(false);\n setIsFocused(false);\n // Prevent other handlers (e.g., modal) from also closing - \"innermost first\" pattern\n event.stopImmediatePropagation();\n }\n }, []);\n\n useEffect(() => {\n if (isOpen) {\n document.addEventListener('keydown', handleEscapeKey);\n return () => document.removeEventListener('keydown', handleEscapeKey);\n }\n }, [isOpen, handleEscapeKey]);\n\n const interactionHandlers = {\n onMouseEnter: () => setIsHovered(true),\n onMouseLeave: () => setIsHovered(false),\n onFocus: () => setIsFocused(true),\n onBlur: () => setIsFocused(false)\n };\n\n return (\n <div\n className={isDisabled ? 'se-design-info-tooltip-wrapper-disabled' : ''}\n {...(isDisabled ? {} : interactionHandlers)}\n >\n <Popover\n position={'bottom-center'}\n isPopoverOpen={isOpen}\n onPopoverToggle={(open) => {\n // Sync popover state changes (e.g., Escape key) back to component state\n if (!open) {\n setIsHovered(false);\n setIsFocused(false);\n }\n }}\n renderPopoverSrcElement={() => (\n <div\n className={`se-design-info-tooltip-src ${noPadding ? 'no-padding' : ''} ${isDisabled ? 'se-design-info-tooltip-disabled' : ''}`}\n style={\n {\n '--info-tooltip-icon-color': iconColor,\n cursor: isDisabled ? 'not-allowed' : 'pointer'\n } as React.CSSProperties\n }\n >\n {children}\n </div>\n )}\n renderPopoverContents={() => (\n <div className=\"se-design-info-tooltip-content\" data-automation-id=\"se-design-info-tooltip-content\">\n {label}\n </div>\n )}\n isWithPortal\n noBorder\n disableClickToggle\n popoverContentStyleProperty={{\n zIndex: 2000,\n backgroundColor: ''\n }}\n />\n </div>\n );\n};\n"],"names":["InfoTooltip","label","children","iconColor","isDisabled","noPadding","isHovered","setIsHovered","useState","isFocused","setIsFocused","isOpen","handleEscapeKey","useCallback","event","key","stopImmediatePropagation","useEffect","document","addEventListener","removeEventListener","interactionHandlers","onMouseEnter","onMouseLeave","onFocus","onBlur","React","createElement","_extends","className","Popover","position","isPopoverOpen","onPopoverToggle","open","renderPopoverSrcElement","style","cursor","renderPopoverContents","isWithPortal","noBorder","disableClickToggle","popoverContentStyleProperty","zIndex","backgroundColor"],"mappings":";;;;;;;;;;;;AAeO,MAAMA,IAAcA,CAAC;AAAA,EAC1BC,OAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAC,WAAAA,IAAY;AAAA,EACZC,YAAAA,IAAa;AAAA,EACbC,WAAAA,IAAY;AACI,MAAM;AACtB,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAC1C,CAACC,GAAWC,CAAY,IAAIF,EAAS,EAAK,GAG1CG,IAASL,KAAaG,GAGtBG,IAAkBC,EAAY,CAACC,MAAyB;AAC5D,IAAIA,EAAMC,QAAQ,aAChBR,EAAa,EAAK,GAClBG,EAAa,EAAK,GAElBI,EAAME,yBAAAA;AAAAA,EAEV,GAAG,CAAA,CAAE;AAELC,EAAAA,EAAU,MAAM;AACd,QAAIN;AACFO,sBAASC,iBAAiB,WAAWP,CAAe,GAC7C,MAAMM,SAASE,oBAAoB,WAAWR,CAAe;AAAA,EAExE,GAAG,CAACD,GAAQC,CAAe,CAAC;AAE5B,QAAMS,IAAsB;AA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