@lokalise/harmony 1.27.3 → 1.28.0

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 (425) hide show
  1. package/dist/harmony.cjs +29 -25
  2. package/dist/harmony.cjs.map +1 -1
  3. package/dist/harmony.mjs +30 -26
  4. package/dist/harmony.mjs.map +1 -1
  5. package/dist/harmony100.cjs +59 -4
  6. package/dist/harmony100.cjs.map +1 -1
  7. package/dist/harmony100.mjs +60 -5
  8. package/dist/harmony100.mjs.map +1 -1
  9. package/dist/harmony101.cjs +6 -39
  10. package/dist/harmony101.cjs.map +1 -1
  11. package/dist/harmony101.mjs +6 -39
  12. package/dist/harmony101.mjs.map +1 -1
  13. package/dist/harmony102.cjs +18 -60
  14. package/dist/harmony102.cjs.map +1 -1
  15. package/dist/harmony102.mjs +18 -60
  16. package/dist/harmony102.mjs.map +1 -1
  17. package/dist/harmony103.cjs +13 -6
  18. package/dist/harmony103.cjs.map +1 -1
  19. package/dist/harmony103.mjs +13 -6
  20. package/dist/harmony103.mjs.map +1 -1
  21. package/dist/harmony104.cjs +17 -6
  22. package/dist/harmony104.cjs.map +1 -1
  23. package/dist/harmony104.mjs +16 -5
  24. package/dist/harmony104.mjs.map +1 -1
  25. package/dist/harmony105.cjs +6 -5
  26. package/dist/harmony105.cjs.map +1 -1
  27. package/dist/harmony105.mjs +6 -5
  28. package/dist/harmony106.cjs +5 -6
  29. package/dist/harmony106.cjs.map +1 -1
  30. package/dist/harmony106.mjs +5 -6
  31. package/dist/harmony107.cjs +6 -97
  32. package/dist/harmony107.cjs.map +1 -1
  33. package/dist/harmony107.mjs +5 -96
  34. package/dist/harmony107.mjs.map +1 -1
  35. package/dist/harmony108.cjs +62 -13
  36. package/dist/harmony108.cjs.map +1 -1
  37. package/dist/harmony108.mjs +61 -12
  38. package/dist/harmony108.mjs.map +1 -1
  39. package/dist/harmony109.cjs +87 -13
  40. package/dist/harmony109.cjs.map +1 -1
  41. package/dist/harmony109.mjs +87 -13
  42. package/dist/harmony109.mjs.map +1 -1
  43. package/dist/harmony110.cjs +19 -37
  44. package/dist/harmony110.cjs.map +1 -1
  45. package/dist/harmony110.mjs +18 -36
  46. package/dist/harmony110.mjs.map +1 -1
  47. package/dist/harmony111.cjs +87 -19
  48. package/dist/harmony111.cjs.map +1 -1
  49. package/dist/harmony111.mjs +87 -19
  50. package/dist/harmony111.mjs.map +1 -1
  51. package/dist/harmony112.cjs +13 -62
  52. package/dist/harmony112.cjs.map +1 -1
  53. package/dist/harmony112.mjs +12 -61
  54. package/dist/harmony112.mjs.map +1 -1
  55. package/dist/harmony113.cjs +13 -87
  56. package/dist/harmony113.cjs.map +1 -1
  57. package/dist/harmony113.mjs +13 -87
  58. package/dist/harmony113.mjs.map +1 -1
  59. package/dist/harmony114.cjs +37 -19
  60. package/dist/harmony114.cjs.map +1 -1
  61. package/dist/harmony114.mjs +36 -18
  62. package/dist/harmony114.mjs.map +1 -1
  63. package/dist/harmony115.cjs +27 -12
  64. package/dist/harmony115.cjs.map +1 -1
  65. package/dist/harmony115.mjs +27 -12
  66. package/dist/harmony115.mjs.map +1 -1
  67. package/dist/harmony116.cjs +7 -15
  68. package/dist/harmony116.cjs.map +1 -1
  69. package/dist/harmony116.mjs +7 -15
  70. package/dist/harmony116.mjs.map +1 -1
  71. package/dist/harmony117.cjs +57 -16
  72. package/dist/harmony117.cjs.map +1 -1
  73. package/dist/harmony117.mjs +57 -16
  74. package/dist/harmony117.mjs.map +1 -1
  75. package/dist/harmony118.cjs +60 -11
  76. package/dist/harmony118.cjs.map +1 -1
  77. package/dist/harmony118.mjs +60 -11
  78. package/dist/harmony118.mjs.map +1 -1
  79. package/dist/harmony119.cjs +19 -17
  80. package/dist/harmony119.cjs.map +1 -1
  81. package/dist/harmony119.mjs +18 -16
  82. package/dist/harmony119.mjs.map +1 -1
  83. package/dist/harmony120.cjs +12 -20
  84. package/dist/harmony120.cjs.map +1 -1
  85. package/dist/harmony120.mjs +12 -20
  86. package/dist/harmony120.mjs.map +1 -1
  87. package/dist/harmony121.cjs +13 -10
  88. package/dist/harmony121.cjs.map +1 -1
  89. package/dist/harmony121.mjs +13 -10
  90. package/dist/harmony121.mjs.map +1 -1
  91. package/dist/harmony122.cjs +15 -5
  92. package/dist/harmony122.cjs.map +1 -1
  93. package/dist/harmony122.mjs +15 -5
  94. package/dist/harmony122.mjs.map +1 -1
  95. package/dist/harmony123.cjs +11 -7
  96. package/dist/harmony123.cjs.map +1 -1
  97. package/dist/harmony123.mjs +11 -7
  98. package/dist/harmony123.mjs.map +1 -1
  99. package/dist/harmony124.cjs +15 -56
  100. package/dist/harmony124.cjs.map +1 -1
  101. package/dist/harmony124.mjs +15 -56
  102. package/dist/harmony124.mjs.map +1 -1
  103. package/dist/harmony125.cjs +20 -59
  104. package/dist/harmony125.cjs.map +1 -1
  105. package/dist/harmony125.mjs +20 -59
  106. package/dist/harmony125.mjs.map +1 -1
  107. package/dist/harmony126.cjs +13 -19
  108. package/dist/harmony126.cjs.map +1 -1
  109. package/dist/harmony126.mjs +12 -18
  110. package/dist/harmony126.mjs.map +1 -1
  111. package/dist/harmony127.cjs +46 -12
  112. package/dist/harmony127.cjs.map +1 -1
  113. package/dist/harmony127.mjs +46 -12
  114. package/dist/harmony127.mjs.map +1 -1
  115. package/dist/harmony128.cjs +13 -33
  116. package/dist/harmony128.cjs.map +1 -1
  117. package/dist/harmony128.mjs +12 -32
  118. package/dist/harmony128.mjs.map +1 -1
  119. package/dist/harmony129.cjs +5 -13
  120. package/dist/harmony129.cjs.map +1 -1
  121. package/dist/harmony129.mjs +5 -13
  122. package/dist/harmony129.mjs.map +1 -1
  123. package/dist/harmony130.cjs +12 -46
  124. package/dist/harmony130.cjs.map +1 -1
  125. package/dist/harmony130.mjs +12 -46
  126. package/dist/harmony130.mjs.map +1 -1
  127. package/dist/harmony131.cjs +33 -13
  128. package/dist/harmony131.cjs.map +1 -1
  129. package/dist/harmony131.mjs +32 -12
  130. package/dist/harmony131.mjs.map +1 -1
  131. package/dist/harmony132.cjs +17 -0
  132. package/dist/harmony132.cjs.map +1 -0
  133. package/dist/harmony132.mjs +17 -0
  134. package/dist/harmony132.mjs.map +1 -0
  135. package/dist/harmony15.cjs +1 -1
  136. package/dist/harmony15.mjs +1 -1
  137. package/dist/harmony22.cjs +2 -2
  138. package/dist/harmony22.mjs +2 -2
  139. package/dist/harmony23.cjs +1 -1
  140. package/dist/harmony23.mjs +1 -1
  141. package/dist/harmony24.cjs +1 -1
  142. package/dist/harmony24.mjs +1 -1
  143. package/dist/harmony25.cjs +1 -1
  144. package/dist/harmony25.mjs +1 -1
  145. package/dist/harmony26.cjs +2 -2
  146. package/dist/harmony26.mjs +2 -2
  147. package/dist/harmony27.cjs +2 -2
  148. package/dist/harmony27.mjs +2 -2
  149. package/dist/harmony28.cjs +2 -2
  150. package/dist/harmony28.mjs +2 -2
  151. package/dist/harmony29.cjs +11 -1
  152. package/dist/harmony29.cjs.map +1 -1
  153. package/dist/harmony29.mjs +12 -2
  154. package/dist/harmony29.mjs.map +1 -1
  155. package/dist/harmony3.cjs +3 -3
  156. package/dist/harmony3.mjs +3 -3
  157. package/dist/harmony30.cjs +3 -3
  158. package/dist/harmony30.mjs +3 -3
  159. package/dist/harmony31.cjs +1 -1
  160. package/dist/harmony31.mjs +1 -1
  161. package/dist/harmony32.cjs +1 -1
  162. package/dist/harmony32.mjs +1 -1
  163. package/dist/harmony33.cjs +1 -1
  164. package/dist/harmony33.mjs +1 -1
  165. package/dist/harmony37.cjs +7 -11
  166. package/dist/harmony37.cjs.map +1 -1
  167. package/dist/harmony37.mjs +9 -13
  168. package/dist/harmony37.mjs.map +1 -1
  169. package/dist/harmony38.cjs +8 -8
  170. package/dist/harmony38.cjs.map +1 -1
  171. package/dist/harmony38.mjs +8 -8
  172. package/dist/harmony38.mjs.map +1 -1
  173. package/dist/harmony39.cjs +14 -12
  174. package/dist/harmony39.cjs.map +1 -1
  175. package/dist/harmony39.mjs +14 -12
  176. package/dist/harmony39.mjs.map +1 -1
  177. package/dist/harmony4.cjs +10 -10
  178. package/dist/harmony4.mjs +10 -10
  179. package/dist/harmony40.cjs +8 -8
  180. package/dist/harmony40.cjs.map +1 -1
  181. package/dist/harmony40.mjs +9 -9
  182. package/dist/harmony40.mjs.map +1 -1
  183. package/dist/harmony41.cjs +9 -9
  184. package/dist/harmony41.cjs.map +1 -1
  185. package/dist/harmony41.mjs +10 -10
  186. package/dist/harmony41.mjs.map +1 -1
  187. package/dist/harmony42.cjs +12 -14
  188. package/dist/harmony42.cjs.map +1 -1
  189. package/dist/harmony42.mjs +12 -14
  190. package/dist/harmony42.mjs.map +1 -1
  191. package/dist/harmony43.cjs +10 -10
  192. package/dist/harmony43.cjs.map +1 -1
  193. package/dist/harmony43.mjs +10 -10
  194. package/dist/harmony43.mjs.map +1 -1
  195. package/dist/harmony44.cjs +8 -8
  196. package/dist/harmony44.cjs.map +1 -1
  197. package/dist/harmony44.mjs +8 -8
  198. package/dist/harmony44.mjs.map +1 -1
  199. package/dist/harmony45.cjs +7 -7
  200. package/dist/harmony45.cjs.map +1 -1
  201. package/dist/harmony45.mjs +7 -7
  202. package/dist/harmony45.mjs.map +1 -1
  203. package/dist/harmony46.cjs +14 -12
  204. package/dist/harmony46.cjs.map +1 -1
  205. package/dist/harmony46.mjs +14 -12
  206. package/dist/harmony46.mjs.map +1 -1
  207. package/dist/harmony47.cjs +12 -14
  208. package/dist/harmony47.cjs.map +1 -1
  209. package/dist/harmony47.mjs +12 -14
  210. package/dist/harmony47.mjs.map +1 -1
  211. package/dist/harmony48.cjs +8 -8
  212. package/dist/harmony48.cjs.map +1 -1
  213. package/dist/harmony48.mjs +8 -8
  214. package/dist/harmony48.mjs.map +1 -1
  215. package/dist/harmony49.cjs +10 -7
  216. package/dist/harmony49.cjs.map +1 -1
  217. package/dist/harmony49.mjs +12 -9
  218. package/dist/harmony49.mjs.map +1 -1
  219. package/dist/harmony5.cjs +1 -1
  220. package/dist/harmony5.mjs +1 -1
  221. package/dist/harmony50.cjs +14 -56
  222. package/dist/harmony50.cjs.map +1 -1
  223. package/dist/harmony50.mjs +14 -56
  224. package/dist/harmony50.mjs.map +1 -1
  225. package/dist/harmony51.cjs +48 -72
  226. package/dist/harmony51.cjs.map +1 -1
  227. package/dist/harmony51.mjs +47 -71
  228. package/dist/harmony51.mjs.map +1 -1
  229. package/dist/harmony52.cjs +78 -4
  230. package/dist/harmony52.cjs.map +1 -1
  231. package/dist/harmony52.mjs +78 -4
  232. package/dist/harmony52.mjs.map +1 -1
  233. package/dist/harmony53.cjs +4 -21
  234. package/dist/harmony53.cjs.map +1 -1
  235. package/dist/harmony53.mjs +4 -21
  236. package/dist/harmony53.mjs.map +1 -1
  237. package/dist/harmony54.cjs +20 -34
  238. package/dist/harmony54.cjs.map +1 -1
  239. package/dist/harmony54.mjs +20 -34
  240. package/dist/harmony54.mjs.map +1 -1
  241. package/dist/harmony55.cjs +35 -115
  242. package/dist/harmony55.cjs.map +1 -1
  243. package/dist/harmony55.mjs +34 -114
  244. package/dist/harmony55.mjs.map +1 -1
  245. package/dist/harmony56.cjs +121 -20
  246. package/dist/harmony56.cjs.map +1 -1
  247. package/dist/harmony56.mjs +120 -19
  248. package/dist/harmony56.mjs.map +1 -1
  249. package/dist/harmony57.cjs +20 -25
  250. package/dist/harmony57.cjs.map +1 -1
  251. package/dist/harmony57.mjs +20 -25
  252. package/dist/harmony57.mjs.map +1 -1
  253. package/dist/harmony58.cjs +24 -6
  254. package/dist/harmony58.cjs.map +1 -1
  255. package/dist/harmony58.mjs +24 -6
  256. package/dist/harmony58.mjs.map +1 -1
  257. package/dist/harmony59.cjs +6 -48
  258. package/dist/harmony59.cjs.map +1 -1
  259. package/dist/harmony59.mjs +6 -48
  260. package/dist/harmony59.mjs.map +1 -1
  261. package/dist/harmony6.cjs +4 -4
  262. package/dist/harmony6.mjs +4 -4
  263. package/dist/harmony60.cjs +46 -20
  264. package/dist/harmony60.cjs.map +1 -1
  265. package/dist/harmony60.mjs +46 -20
  266. package/dist/harmony60.mjs.map +1 -1
  267. package/dist/harmony61.cjs +22 -16
  268. package/dist/harmony61.cjs.map +1 -1
  269. package/dist/harmony61.mjs +22 -16
  270. package/dist/harmony61.mjs.map +1 -1
  271. package/dist/harmony62.cjs +19 -16
  272. package/dist/harmony62.cjs.map +1 -1
  273. package/dist/harmony62.mjs +18 -15
  274. package/dist/harmony62.mjs.map +1 -1
  275. package/dist/harmony63.cjs +15 -18
  276. package/dist/harmony63.cjs.map +1 -1
  277. package/dist/harmony63.mjs +15 -18
  278. package/dist/harmony63.mjs.map +1 -1
  279. package/dist/harmony64.cjs +18 -61
  280. package/dist/harmony64.cjs.map +1 -1
  281. package/dist/harmony64.mjs +18 -61
  282. package/dist/harmony64.mjs.map +1 -1
  283. package/dist/harmony65.cjs +61 -6
  284. package/dist/harmony65.cjs.map +1 -1
  285. package/dist/harmony65.mjs +61 -6
  286. package/dist/harmony65.mjs.map +1 -1
  287. package/dist/harmony66.cjs +7 -10
  288. package/dist/harmony66.cjs.map +1 -1
  289. package/dist/harmony66.mjs +6 -9
  290. package/dist/harmony66.mjs.map +1 -1
  291. package/dist/harmony67.cjs +8 -17
  292. package/dist/harmony67.cjs.map +1 -1
  293. package/dist/harmony67.mjs +8 -17
  294. package/dist/harmony67.mjs.map +1 -1
  295. package/dist/harmony68.cjs +13 -18
  296. package/dist/harmony68.cjs.map +1 -1
  297. package/dist/harmony68.mjs +14 -19
  298. package/dist/harmony68.mjs.map +1 -1
  299. package/dist/harmony69.cjs +22 -4
  300. package/dist/harmony69.cjs.map +1 -1
  301. package/dist/harmony69.mjs +22 -4
  302. package/dist/harmony69.mjs.map +1 -1
  303. package/dist/harmony70.cjs +4 -31
  304. package/dist/harmony70.cjs.map +1 -1
  305. package/dist/harmony70.mjs +5 -32
  306. package/dist/harmony70.mjs.map +1 -1
  307. package/dist/harmony71.cjs +26 -26
  308. package/dist/harmony71.cjs.map +1 -1
  309. package/dist/harmony71.mjs +28 -28
  310. package/dist/harmony71.mjs.map +1 -1
  311. package/dist/harmony72.cjs +25 -12
  312. package/dist/harmony72.cjs.map +1 -1
  313. package/dist/harmony72.mjs +26 -13
  314. package/dist/harmony72.mjs.map +1 -1
  315. package/dist/harmony73.cjs +12 -24
  316. package/dist/harmony73.cjs.map +1 -1
  317. package/dist/harmony73.mjs +13 -25
  318. package/dist/harmony73.mjs.map +1 -1
  319. package/dist/harmony74.cjs +27 -55
  320. package/dist/harmony74.cjs.map +1 -1
  321. package/dist/harmony74.mjs +29 -57
  322. package/dist/harmony74.mjs.map +1 -1
  323. package/dist/harmony75.cjs +60 -10
  324. package/dist/harmony75.cjs.map +1 -1
  325. package/dist/harmony75.mjs +59 -9
  326. package/dist/harmony75.mjs.map +1 -1
  327. package/dist/harmony76.cjs +10 -9
  328. package/dist/harmony76.cjs.map +1 -1
  329. package/dist/harmony76.mjs +9 -8
  330. package/dist/harmony76.mjs.map +1 -1
  331. package/dist/harmony77.cjs +5 -26
  332. package/dist/harmony77.cjs.map +1 -1
  333. package/dist/harmony77.mjs +8 -29
  334. package/dist/harmony77.mjs.map +1 -1
  335. package/dist/harmony78.cjs +29 -3
  336. package/dist/harmony78.cjs.map +1 -1
  337. package/dist/harmony78.mjs +29 -3
  338. package/dist/harmony78.mjs.map +1 -1
  339. package/dist/harmony79.cjs +3 -11
  340. package/dist/harmony79.cjs.map +1 -1
  341. package/dist/harmony79.mjs +3 -11
  342. package/dist/harmony79.mjs.map +1 -1
  343. package/dist/harmony80.cjs +5 -20
  344. package/dist/harmony80.cjs.map +1 -1
  345. package/dist/harmony80.mjs +5 -20
  346. package/dist/harmony80.mjs.map +1 -1
  347. package/dist/harmony81.cjs +6 -3
  348. package/dist/harmony81.cjs.map +1 -1
  349. package/dist/harmony81.mjs +6 -3
  350. package/dist/harmony81.mjs.map +1 -1
  351. package/dist/harmony82.cjs +6 -6
  352. package/dist/harmony82.mjs +6 -6
  353. package/dist/harmony83.cjs +57 -9
  354. package/dist/harmony83.cjs.map +1 -1
  355. package/dist/harmony83.mjs +56 -8
  356. package/dist/harmony83.mjs.map +1 -1
  357. package/dist/harmony84.cjs +26 -51
  358. package/dist/harmony84.cjs.map +1 -1
  359. package/dist/harmony84.mjs +27 -52
  360. package/dist/harmony84.mjs.map +1 -1
  361. package/dist/harmony85.cjs +5 -32
  362. package/dist/harmony85.cjs.map +1 -1
  363. package/dist/harmony85.mjs +5 -32
  364. package/dist/harmony85.mjs.map +1 -1
  365. package/dist/harmony86.cjs +10 -6
  366. package/dist/harmony86.cjs.map +1 -1
  367. package/dist/harmony86.mjs +9 -5
  368. package/dist/harmony86.mjs.map +1 -1
  369. package/dist/harmony87.cjs +21 -6
  370. package/dist/harmony87.cjs.map +1 -1
  371. package/dist/harmony87.mjs +21 -6
  372. package/dist/harmony87.mjs.map +1 -1
  373. package/dist/harmony88.cjs +3 -21
  374. package/dist/harmony88.cjs.map +1 -1
  375. package/dist/harmony88.mjs +3 -21
  376. package/dist/harmony88.mjs.map +1 -1
  377. package/dist/harmony89.cjs +21 -6
  378. package/dist/harmony89.cjs.map +1 -1
  379. package/dist/harmony89.mjs +20 -5
  380. package/dist/harmony89.mjs.map +1 -1
  381. package/dist/harmony90.cjs +12 -21
  382. package/dist/harmony90.cjs.map +1 -1
  383. package/dist/harmony90.mjs +11 -20
  384. package/dist/harmony90.mjs.map +1 -1
  385. package/dist/harmony91.cjs +12 -13
  386. package/dist/harmony91.cjs.map +1 -1
  387. package/dist/harmony91.mjs +11 -12
  388. package/dist/harmony91.mjs.map +1 -1
  389. package/dist/harmony92.cjs +21 -99
  390. package/dist/harmony92.cjs.map +1 -1
  391. package/dist/harmony92.mjs +20 -81
  392. package/dist/harmony92.mjs.map +1 -1
  393. package/dist/harmony93.cjs +99 -18
  394. package/dist/harmony93.cjs.map +1 -1
  395. package/dist/harmony93.mjs +82 -18
  396. package/dist/harmony93.mjs.map +1 -1
  397. package/dist/harmony94.cjs +21 -14
  398. package/dist/harmony94.cjs.map +1 -1
  399. package/dist/harmony94.mjs +20 -13
  400. package/dist/harmony94.mjs.map +1 -1
  401. package/dist/harmony95.cjs +5 -16
  402. package/dist/harmony95.cjs.map +1 -1
  403. package/dist/harmony95.mjs +5 -16
  404. package/dist/harmony95.mjs.map +1 -1
  405. package/dist/harmony96.cjs +132 -21
  406. package/dist/harmony96.cjs.map +1 -1
  407. package/dist/harmony96.mjs +131 -20
  408. package/dist/harmony96.mjs.map +1 -1
  409. package/dist/harmony97.cjs +12 -5
  410. package/dist/harmony97.cjs.map +1 -1
  411. package/dist/harmony97.mjs +11 -4
  412. package/dist/harmony97.mjs.map +1 -1
  413. package/dist/harmony98.cjs +5 -132
  414. package/dist/harmony98.cjs.map +1 -1
  415. package/dist/harmony98.mjs +5 -132
  416. package/dist/harmony98.mjs.map +1 -1
  417. package/dist/harmony99.cjs +40 -12
  418. package/dist/harmony99.cjs.map +1 -1
  419. package/dist/harmony99.mjs +39 -11
  420. package/dist/harmony99.mjs.map +1 -1
  421. package/dist/types/src/features/publicApi/hooks/useDeleteProjectMutation.d.ts +16 -0
  422. package/dist/types/src/features/publicApi/node.d.ts +1 -0
  423. package/dist/types/src/features/publicApi/projects.d.ts +72 -0
  424. package/dist/types/src/features/publicApi/types/projectTypes.d.ts +11 -0
  425. package/package.json +1 -1
@@ -1,26 +1,21 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { Menu as Menu$1, MenuList, Tooltip } from "@lokalise/louis";
3
- import { clsx } from "./harmony62.mjs";
4
- import styles from "./harmony83.mjs";
5
- const Menu = ({ children, icon: Icon }) => {
6
- return /* @__PURE__ */ jsx(
7
- Menu$1,
2
+ import { Tooltip, Link } from "@lokalise/louis";
3
+ import { clsx } from "./harmony63.mjs";
4
+ import styles from "./harmony81.mjs";
5
+ const IconLink = ({ label, to, icon: Icon }) => {
6
+ return /* @__PURE__ */ jsx(Tooltip, { placement: "right", tooltip: label, children: /* @__PURE__ */ jsx(
7
+ Link,
8
8
  {
9
- menuButton: ({ opened }) => /* @__PURE__ */ jsx(Tooltip, { placement: "right", tooltip: "Help", children: /* @__PURE__ */ jsx(
10
- "button",
11
- {
12
- type: "button",
13
- className: clsx(styles.dropdownButton, {
14
- [styles.dropdownButtonActive]: opened
15
- }),
16
- children: /* @__PURE__ */ jsx(Icon, { size: "25px" })
17
- }
18
- ) }),
19
- children: /* @__PURE__ */ jsx(MenuList, { placement: "right-start", children })
9
+ "aria-label": label,
10
+ className: clsx(styles.link, {
11
+ [styles.active]: window.location.pathname.startsWith(to)
12
+ }),
13
+ href: to,
14
+ children: /* @__PURE__ */ jsx(Icon, { size: "25px" })
20
15
  }
21
- );
16
+ ) });
22
17
  };
23
18
  export {
24
- Menu
19
+ IconLink
25
20
  };
26
21
  //# sourceMappingURL=harmony68.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony68.mjs","sources":["../src/components/Sidebar/Widgets/Menu/Menu.tsx"],"sourcesContent":["import { MenuList, type SvgIconProps, Tooltip, Menu as UIMenu } from '@lokalise/louis'\nimport clsx from 'clsx'\nimport type { FC, PropsWithChildren } from 'react'\nimport styles from './Menu.module.css'\n\ntype MenuProps = PropsWithChildren<{\n\t/** Icon component from @lokalise/louis to display in the menu button */\n\ticon: FC<SvgIconProps>\n}>\n\n/**\n * A dropdown menu component that displays an icon button which reveals a menu list when clicked.\n * The menu is positioned to the right of the button and includes a tooltip.\n *\n * Used primarily for dropdown menus in the Sidebar, such as the Help menu.\n *\n * @example\n * ```tsx\n * <Menu icon={HelpCenterIcon}>\n * <MenuItem href=\"/docs\">Documentation</MenuItem>\n * <MenuItem href=\"/tutorial\">Tutorials</MenuItem>\n * <MenuDivider />\n * <MenuItem href=\"/blog\">Blog</MenuItem>\n * </Menu>\n * ```\n */\nexport const Menu = ({ children, icon: Icon }: MenuProps) => {\n\treturn (\n\t\t<UIMenu\n\t\t\tmenuButton={({ opened }) => (\n\t\t\t\t<Tooltip placement=\"right\" tooltip=\"Help\">\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclassName={clsx(styles.dropdownButton, {\n\t\t\t\t\t\t\t[styles.dropdownButtonActive]: opened,\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon size=\"25px\" />\n\t\t\t\t\t</button>\n\t\t\t\t</Tooltip>\n\t\t\t)}\n\t\t>\n\t\t\t<MenuList placement=\"right-start\">{children}</MenuList>\n\t\t</UIMenu>\n\t)\n}\n"],"names":["UIMenu"],"mappings":";;;;AA0BO,MAAM,OAAO,CAAC,EAAE,UAAU,MAAM,WAAsB;AAE3D,SAAA;AAAA,IAACA;AAAAA,IAAA;AAAA,MACA,YAAY,CAAC,EAAE,OAAO,0BACpB,SAAQ,EAAA,WAAU,SAAQ,SAAQ,QAClC,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACA,MAAK;AAAA,UACL,WAAW,KAAK,OAAO,gBAAgB;AAAA,YACtC,CAAC,OAAO,oBAAoB,GAAG;AAAA,UAAA,CAC/B;AAAA,UAED,UAAA,oBAAC,MAAK,EAAA,MAAK,OAAO,CAAA;AAAA,QAAA;AAAA,MAAA,GAEpB;AAAA,MAGD,UAAC,oBAAA,UAAA,EAAS,WAAU,eAAe,SAAS,CAAA;AAAA,IAAA;AAAA,EAC7C;AAEF;"}
1
+ {"version":3,"file":"harmony68.mjs","sources":["../src/components/Sidebar/Widgets/IconLink/IconLink.tsx"],"sourcesContent":["import { Link, type SvgIconProps, Tooltip } from '@lokalise/louis'\nimport clsx from 'clsx'\nimport type { FC } from 'react'\nimport styles from './IconLink.module.css'\n\ntype IconLinkProps = {\n\t/** URL destination for the link */\n\tto: string\n\t/** Text to display in the tooltip when hovering over the icon */\n\tlabel: string\n\t/** Icon component from @lokalise/louis to display */\n\ticon: FC<SvgIconProps>\n}\n\n/**\n * A navigation link component that displays an icon with a tooltip.\n * When hovered, shows a tooltip with the label text.\n * The link is highlighted when the current URL matches its destination.\n *\n * @example\n * ```tsx\n * <IconLink to=\"/projects\" label=\"Projects\" icon={FolderOpenIcon} />\n * ```\n */\nexport const IconLink = ({ label, to, icon: Icon }: IconLinkProps) => {\n\treturn (\n\t\t<Tooltip placement=\"right\" tooltip={label}>\n\t\t\t<Link\n\t\t\t\taria-label={label}\n\t\t\t\tclassName={clsx(styles.link, {\n\t\t\t\t\t[styles.active]: window.location.pathname.startsWith(to),\n\t\t\t\t})}\n\t\t\t\thref={to}\n\t\t\t>\n\t\t\t\t<Icon size=\"25px\" />\n\t\t\t</Link>\n\t\t</Tooltip>\n\t)\n}\n"],"names":[],"mappings":";;;;AAwBO,MAAM,WAAW,CAAC,EAAE,OAAO,IAAI,MAAM,WAA0B;AACrE,SACE,oBAAA,SAAA,EAAQ,WAAU,SAAQ,SAAS,OACnC,UAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,cAAY;AAAA,MACZ,WAAW,KAAK,OAAO,MAAM;AAAA,QAC5B,CAAC,OAAO,MAAM,GAAG,OAAO,SAAS,SAAS,WAAW,EAAE;AAAA,MAAA,CACvD;AAAA,MACD,MAAM;AAAA,MAEN,UAAA,oBAAC,MAAK,EAAA,MAAK,OAAO,CAAA;AAAA,IAAA;AAAA,EAAA,GAEpB;AAEF;"}
@@ -1,8 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
- const ProfileMenuContent = require("./harmony84.cjs");
5
- const ProfileMenuProvider = require("./harmony85.cjs");
6
- const ProfileMenu = ({ config, children }) => /* @__PURE__ */ jsxRuntime.jsx(ProfileMenuProvider.ProfileMenuProvider, { config, children: /* @__PURE__ */ jsxRuntime.jsx(ProfileMenuContent.ProfileMenuContent, { children }) });
7
- exports.ProfileMenu = ProfileMenu;
4
+ const louis = require("@lokalise/louis");
5
+ const clsx = require("./harmony63.cjs");
6
+ const Menu_module = require("./harmony82.cjs");
7
+ const Menu = ({ children, icon: Icon }) => {
8
+ return /* @__PURE__ */ jsxRuntime.jsx(
9
+ louis.Menu,
10
+ {
11
+ menuButton: ({ opened }) => /* @__PURE__ */ jsxRuntime.jsx(louis.Tooltip, { placement: "right", tooltip: "Help", children: /* @__PURE__ */ jsxRuntime.jsx(
12
+ "button",
13
+ {
14
+ type: "button",
15
+ className: clsx.clsx(Menu_module.default.dropdownButton, {
16
+ [Menu_module.default.dropdownButtonActive]: opened
17
+ }),
18
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: "25px" })
19
+ }
20
+ ) }),
21
+ children: /* @__PURE__ */ jsxRuntime.jsx(louis.MenuList, { placement: "right-start", children })
22
+ }
23
+ );
24
+ };
25
+ exports.Menu = Menu;
8
26
  //# sourceMappingURL=harmony69.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony69.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileMenu.tsx"],"sourcesContent":["import { ProfileMenuContent, type ProfileMenuContentProps } from './ProfileMenuContent'\nimport { ProfileMenuProvider } from './ProfileMenuProvider'\nimport type { SidebarProfileMenuConfig } from './types'\n\ntype ProfileMenuProps = {\n\t/** Configuration object containing team and user settings */\n\tconfig: SidebarProfileMenuConfig\n\t/** Render function for the menu content */\n\tchildren: ProfileMenuContentProps['children']\n}\n\n/**\n * A contextual menu component that provides team management functionality.\n * It manages team switching, profile settings, billing options, and upgrade prompts.\n *\n * The component uses a render prop pattern to provide context values to its children,\n * allowing flexible composition of menu items based on user permissions and team status.\n *\n * @example\n * ```tsx\n * <ProfileMenu config={profileMenuConfig}>\n * {({ allowTeamCreation, showBillingButton }) => (\n * <>\n * <TeamSwitch onSwitchTeam={handleTeamSwitch} />\n * {allowTeamCreation && <MenuItem>Create new team</MenuItem>}\n * {showBillingButton && <MenuItem href=\"/billing\">Billing</MenuItem>}\n * </>\n * )}\n * </ProfileMenu>\n * ```\n */\nexport const ProfileMenu = ({ config, children }: ProfileMenuProps) => (\n\t<ProfileMenuProvider config={config}>\n\t\t<ProfileMenuContent>{children}</ProfileMenuContent>\n\t</ProfileMenuProvider>\n)\n"],"names":["jsx","ProfileMenuProvider","ProfileMenuContent"],"mappings":";;;;;AA+BO,MAAM,cAAc,CAAC,EAAE,QAAQ,SAAS,MAC7CA,2BAAA,IAAAC,oBAAA,qBAAA,EAAoB,QACpB,UAAAD,2BAAA,IAACE,mBAAoB,oBAAA,EAAA,SAAS,CAAA,EAC/B,CAAA;;"}
1
+ {"version":3,"file":"harmony69.cjs","sources":["../src/components/Sidebar/Widgets/Menu/Menu.tsx"],"sourcesContent":["import { MenuList, type SvgIconProps, Tooltip, Menu as UIMenu } from '@lokalise/louis'\nimport clsx from 'clsx'\nimport type { FC, PropsWithChildren } from 'react'\nimport styles from './Menu.module.css'\n\ntype MenuProps = PropsWithChildren<{\n\t/** Icon component from @lokalise/louis to display in the menu button */\n\ticon: FC<SvgIconProps>\n}>\n\n/**\n * A dropdown menu component that displays an icon button which reveals a menu list when clicked.\n * The menu is positioned to the right of the button and includes a tooltip.\n *\n * Used primarily for dropdown menus in the Sidebar, such as the Help menu.\n *\n * @example\n * ```tsx\n * <Menu icon={HelpCenterIcon}>\n * <MenuItem href=\"/docs\">Documentation</MenuItem>\n * <MenuItem href=\"/tutorial\">Tutorials</MenuItem>\n * <MenuDivider />\n * <MenuItem href=\"/blog\">Blog</MenuItem>\n * </Menu>\n * ```\n */\nexport const Menu = ({ children, icon: Icon }: MenuProps) => {\n\treturn (\n\t\t<UIMenu\n\t\t\tmenuButton={({ opened }) => (\n\t\t\t\t<Tooltip placement=\"right\" tooltip=\"Help\">\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclassName={clsx(styles.dropdownButton, {\n\t\t\t\t\t\t\t[styles.dropdownButtonActive]: opened,\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon size=\"25px\" />\n\t\t\t\t\t</button>\n\t\t\t\t</Tooltip>\n\t\t\t)}\n\t\t>\n\t\t\t<MenuList placement=\"right-start\">{children}</MenuList>\n\t\t</UIMenu>\n\t)\n}\n"],"names":["jsx","UIMenu","Tooltip","clsx","styles","MenuList"],"mappings":";;;;;;AA0BO,MAAM,OAAO,CAAC,EAAE,UAAU,MAAM,WAAsB;AAE3D,SAAAA,2BAAA;AAAA,IAACC,MAAA;AAAA,IAAA;AAAA,MACA,YAAY,CAAC,EAAE,OAAO,qCACpBC,MAAQ,SAAA,EAAA,WAAU,SAAQ,SAAQ,QAClC,UAAAF,2BAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACA,MAAK;AAAA,UACL,WAAWG,KAAAA,KAAKC,YAAA,QAAO,gBAAgB;AAAA,YACtC,CAACA,YAAAA,QAAO,oBAAoB,GAAG;AAAA,UAAA,CAC/B;AAAA,UAED,UAAAJ,2BAAAA,IAAC,MAAK,EAAA,MAAK,OAAO,CAAA;AAAA,QAAA;AAAA,MAAA,GAEpB;AAAA,MAGD,UAACA,2BAAA,IAAAK,MAAA,UAAA,EAAS,WAAU,eAAe,SAAS,CAAA;AAAA,IAAA;AAAA,EAC7C;AAEF;;"}
@@ -1,8 +1,26 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { ProfileMenuContent } from "./harmony84.mjs";
3
- import { ProfileMenuProvider } from "./harmony85.mjs";
4
- const ProfileMenu = ({ config, children }) => /* @__PURE__ */ jsx(ProfileMenuProvider, { config, children: /* @__PURE__ */ jsx(ProfileMenuContent, { children }) });
2
+ import { Menu as Menu$1, MenuList, Tooltip } from "@lokalise/louis";
3
+ import { clsx } from "./harmony63.mjs";
4
+ import styles from "./harmony82.mjs";
5
+ const Menu = ({ children, icon: Icon }) => {
6
+ return /* @__PURE__ */ jsx(
7
+ Menu$1,
8
+ {
9
+ menuButton: ({ opened }) => /* @__PURE__ */ jsx(Tooltip, { placement: "right", tooltip: "Help", children: /* @__PURE__ */ jsx(
10
+ "button",
11
+ {
12
+ type: "button",
13
+ className: clsx(styles.dropdownButton, {
14
+ [styles.dropdownButtonActive]: opened
15
+ }),
16
+ children: /* @__PURE__ */ jsx(Icon, { size: "25px" })
17
+ }
18
+ ) }),
19
+ children: /* @__PURE__ */ jsx(MenuList, { placement: "right-start", children })
20
+ }
21
+ );
22
+ };
5
23
  export {
6
- ProfileMenu
24
+ Menu
7
25
  };
8
26
  //# sourceMappingURL=harmony69.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony69.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileMenu.tsx"],"sourcesContent":["import { ProfileMenuContent, type ProfileMenuContentProps } from './ProfileMenuContent'\nimport { ProfileMenuProvider } from './ProfileMenuProvider'\nimport type { SidebarProfileMenuConfig } from './types'\n\ntype ProfileMenuProps = {\n\t/** Configuration object containing team and user settings */\n\tconfig: SidebarProfileMenuConfig\n\t/** Render function for the menu content */\n\tchildren: ProfileMenuContentProps['children']\n}\n\n/**\n * A contextual menu component that provides team management functionality.\n * It manages team switching, profile settings, billing options, and upgrade prompts.\n *\n * The component uses a render prop pattern to provide context values to its children,\n * allowing flexible composition of menu items based on user permissions and team status.\n *\n * @example\n * ```tsx\n * <ProfileMenu config={profileMenuConfig}>\n * {({ allowTeamCreation, showBillingButton }) => (\n * <>\n * <TeamSwitch onSwitchTeam={handleTeamSwitch} />\n * {allowTeamCreation && <MenuItem>Create new team</MenuItem>}\n * {showBillingButton && <MenuItem href=\"/billing\">Billing</MenuItem>}\n * </>\n * )}\n * </ProfileMenu>\n * ```\n */\nexport const ProfileMenu = ({ config, children }: ProfileMenuProps) => (\n\t<ProfileMenuProvider config={config}>\n\t\t<ProfileMenuContent>{children}</ProfileMenuContent>\n\t</ProfileMenuProvider>\n)\n"],"names":[],"mappings":";;;AA+BO,MAAM,cAAc,CAAC,EAAE,QAAQ,SAAS,MAC7C,oBAAA,qBAAA,EAAoB,QACpB,UAAA,oBAAC,oBAAoB,EAAA,SAAS,CAAA,EAC/B,CAAA;"}
1
+ {"version":3,"file":"harmony69.mjs","sources":["../src/components/Sidebar/Widgets/Menu/Menu.tsx"],"sourcesContent":["import { MenuList, type SvgIconProps, Tooltip, Menu as UIMenu } from '@lokalise/louis'\nimport clsx from 'clsx'\nimport type { FC, PropsWithChildren } from 'react'\nimport styles from './Menu.module.css'\n\ntype MenuProps = PropsWithChildren<{\n\t/** Icon component from @lokalise/louis to display in the menu button */\n\ticon: FC<SvgIconProps>\n}>\n\n/**\n * A dropdown menu component that displays an icon button which reveals a menu list when clicked.\n * The menu is positioned to the right of the button and includes a tooltip.\n *\n * Used primarily for dropdown menus in the Sidebar, such as the Help menu.\n *\n * @example\n * ```tsx\n * <Menu icon={HelpCenterIcon}>\n * <MenuItem href=\"/docs\">Documentation</MenuItem>\n * <MenuItem href=\"/tutorial\">Tutorials</MenuItem>\n * <MenuDivider />\n * <MenuItem href=\"/blog\">Blog</MenuItem>\n * </Menu>\n * ```\n */\nexport const Menu = ({ children, icon: Icon }: MenuProps) => {\n\treturn (\n\t\t<UIMenu\n\t\t\tmenuButton={({ opened }) => (\n\t\t\t\t<Tooltip placement=\"right\" tooltip=\"Help\">\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tclassName={clsx(styles.dropdownButton, {\n\t\t\t\t\t\t\t[styles.dropdownButtonActive]: opened,\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon size=\"25px\" />\n\t\t\t\t\t</button>\n\t\t\t\t</Tooltip>\n\t\t\t)}\n\t\t>\n\t\t\t<MenuList placement=\"right-start\">{children}</MenuList>\n\t\t</UIMenu>\n\t)\n}\n"],"names":["UIMenu"],"mappings":";;;;AA0BO,MAAM,OAAO,CAAC,EAAE,UAAU,MAAM,WAAsB;AAE3D,SAAA;AAAA,IAACA;AAAAA,IAAA;AAAA,MACA,YAAY,CAAC,EAAE,OAAO,0BACpB,SAAQ,EAAA,WAAU,SAAQ,SAAQ,QAClC,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACA,MAAK;AAAA,UACL,WAAW,KAAK,OAAO,gBAAgB;AAAA,YACtC,CAAC,OAAO,oBAAoB,GAAG;AAAA,UAAA,CAC/B;AAAA,UAED,UAAA,oBAAC,MAAK,EAAA,MAAK,OAAO,CAAA;AAAA,QAAA;AAAA,MAAA,GAEpB;AAAA,MAGD,UAAC,oBAAA,UAAA,EAAS,WAAU,eAAe,SAAS,CAAA;AAAA,IAAA;AAAA,EAC7C;AAEF;"}
@@ -1,35 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
- const louis = require("@lokalise/louis");
5
- const ProfileMenuContext = require("./harmony86.cjs");
6
- const ProfileSettingsMenuItem_module = require("./harmony87.cjs");
7
- const ProfileSettingsMenuItem = ({
8
- href,
9
- onClick,
10
- userEmail,
11
- hideBottomDivider
12
- }) => {
13
- const { isEndOfTrialActive, isTeamSuspended } = ProfileMenuContext.useProfileMenu();
14
- if (isEndOfTrialActive || isTeamSuspended) {
15
- return null;
16
- }
17
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
18
- /* @__PURE__ */ jsxRuntime.jsx(
19
- louis.MenuItem,
20
- {
21
- href,
22
- onClick: () => {
23
- onClick == null ? void 0 : onClick();
24
- },
25
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-col ${ProfileSettingsMenuItem_module.default.container}`, children: [
26
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Profile Settings" }),
27
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: ProfileSettingsMenuItem_module.default.profileEmail, children: userEmail })
28
- ] })
29
- }
30
- ),
31
- !hideBottomDivider && /* @__PURE__ */ jsxRuntime.jsx(louis.MenuDivider, {})
32
- ] });
33
- };
34
- exports.ProfileSettingsMenuItem = ProfileSettingsMenuItem;
4
+ const ProfileMenuContent = require("./harmony83.cjs");
5
+ const ProfileMenuProvider = require("./harmony84.cjs");
6
+ const ProfileMenu = ({ config, children }) => /* @__PURE__ */ jsxRuntime.jsx(ProfileMenuProvider.ProfileMenuProvider, { config, children: /* @__PURE__ */ jsxRuntime.jsx(ProfileMenuContent.ProfileMenuContent, { children }) });
7
+ exports.ProfileMenu = ProfileMenu;
35
8
  //# sourceMappingURL=harmony70.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony70.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileSettingsMenuItem/ProfileSettingsMenuItem.tsx"],"sourcesContent":["import { MenuDivider, MenuItem } from '@lokalise/louis'\nimport { useProfileMenu } from '../ProfileMenuContext'\nimport styles from './ProfileSettingsMenuItem.module.css'\n\ntype ProfileSettingsMenuItemProps = {\n\t/** URL to the profile settings page */\n\thref: string\n\t/** User's email address to display below \"Profile Settings\" */\n\tuserEmail: string\n\t/** Optional callback function for tracking or additional actions */\n\tonClick?: () => void\n\t/** Whether to hide the divider that appears below this menu item */\n\thideBottomDivider?: boolean\n}\n\n/**\n * A menu item component that provides access to profile settings.\n *\n * Features:\n * - Displays \"Profile Settings\" with the user's email address below\n * - Conditionally renders based on team status\n * - Includes an optional divider below the item\n * - Will not render if:\n * - Team is suspended\n * - Team's trial period has ended\n *\n * @example\n * ```tsx\n * <ProfileSettingsMenuItem\n * href=\"/settings/profile\"\n * userEmail=\"user@example.com\"\n * onClick={() => trackSettingsClick()}\n * />\n *\n * // Without bottom divider\n * <ProfileSettingsMenuItem\n * href=\"/settings/profile\"\n * userEmail=\"user@example.com\"\n * hideBottomDivider\n * />\n * ```\n *\n * @note This component must be used within a ProfileMenu component\n * as it requires access to the ProfileMenu context for team status information.\n */\nexport const ProfileSettingsMenuItem = ({\n\thref,\n\tonClick,\n\tuserEmail,\n\thideBottomDivider,\n}: ProfileSettingsMenuItemProps) => {\n\tconst { isEndOfTrialActive, isTeamSuspended } = useProfileMenu()\n\n\tif (isEndOfTrialActive || isTeamSuspended) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem\n\t\t\t\thref={href}\n\t\t\t\tonClick={() => {\n\t\t\t\t\tonClick?.()\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<div className={`flex-col ${styles.container}`}>\n\t\t\t\t\t<span>Profile Settings</span>\n\t\t\t\t\t<span className={styles.profileEmail}>{userEmail}</span>\n\t\t\t\t</div>\n\t\t\t</MenuItem>\n\n\t\t\t{!hideBottomDivider && <MenuDivider />}\n\t\t</>\n\t)\n}\n"],"names":["useProfileMenu","jsxs","Fragment","jsx","MenuItem","styles","MenuDivider"],"mappings":";;;;;;AA6CO,MAAM,0BAA0B,CAAC;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,MAAoC;AACnC,QAAM,EAAE,oBAAoB,gBAAgB,IAAIA,kCAAe;AAE/D,MAAI,sBAAsB,iBAAiB;AACnC,WAAA;AAAA,EAAA;AAGR,SAEEC,2BAAA,KAAAC,qBAAA,EAAA,UAAA;AAAA,IAAAC,2BAAA;AAAA,MAACC,MAAA;AAAA,MAAA;AAAA,QACA;AAAA,QACA,SAAS,MAAM;AACJ;AAAA,QACX;AAAA,QAEA,0CAAC,OAAI,EAAA,WAAW,YAAYC,uCAAO,SAAS,IAC3C,UAAA;AAAA,UAAAF,2BAAAA,IAAC,UAAK,UAAgB,mBAAA,CAAA;AAAA,UACrBA,2BAAA,IAAA,QAAA,EAAK,WAAWE,+BAAA,QAAO,cAAe,UAAU,UAAA,CAAA;AAAA,QAAA,EAClD,CAAA;AAAA,MAAA;AAAA,IACD;AAAA,IAEC,CAAC,qBAAqBF,+BAACG,MAAAA,aAAY,CAAA,CAAA;AAAA,EAAA,GACrC;AAEF;;"}
1
+ {"version":3,"file":"harmony70.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileMenu.tsx"],"sourcesContent":["import { ProfileMenuContent, type ProfileMenuContentProps } from './ProfileMenuContent'\nimport { ProfileMenuProvider } from './ProfileMenuProvider'\nimport type { SidebarProfileMenuConfig } from './types'\n\ntype ProfileMenuProps = {\n\t/** Configuration object containing team and user settings */\n\tconfig: SidebarProfileMenuConfig\n\t/** Render function for the menu content */\n\tchildren: ProfileMenuContentProps['children']\n}\n\n/**\n * A contextual menu component that provides team management functionality.\n * It manages team switching, profile settings, billing options, and upgrade prompts.\n *\n * The component uses a render prop pattern to provide context values to its children,\n * allowing flexible composition of menu items based on user permissions and team status.\n *\n * @example\n * ```tsx\n * <ProfileMenu config={profileMenuConfig}>\n * {({ allowTeamCreation, showBillingButton }) => (\n * <>\n * <TeamSwitch onSwitchTeam={handleTeamSwitch} />\n * {allowTeamCreation && <MenuItem>Create new team</MenuItem>}\n * {showBillingButton && <MenuItem href=\"/billing\">Billing</MenuItem>}\n * </>\n * )}\n * </ProfileMenu>\n * ```\n */\nexport const ProfileMenu = ({ config, children }: ProfileMenuProps) => (\n\t<ProfileMenuProvider config={config}>\n\t\t<ProfileMenuContent>{children}</ProfileMenuContent>\n\t</ProfileMenuProvider>\n)\n"],"names":["jsx","ProfileMenuProvider","ProfileMenuContent"],"mappings":";;;;;AA+BO,MAAM,cAAc,CAAC,EAAE,QAAQ,SAAS,MAC7CA,2BAAA,IAAAC,oBAAA,qBAAA,EAAoB,QACpB,UAAAD,2BAAA,IAACE,mBAAoB,oBAAA,EAAA,SAAS,CAAA,EAC/B,CAAA;;"}
@@ -1,35 +1,8 @@
1
- import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
- import { MenuItem, MenuDivider } from "@lokalise/louis";
3
- import { useProfileMenu } from "./harmony86.mjs";
4
- import styles from "./harmony87.mjs";
5
- const ProfileSettingsMenuItem = ({
6
- href,
7
- onClick,
8
- userEmail,
9
- hideBottomDivider
10
- }) => {
11
- const { isEndOfTrialActive, isTeamSuspended } = useProfileMenu();
12
- if (isEndOfTrialActive || isTeamSuspended) {
13
- return null;
14
- }
15
- return /* @__PURE__ */ jsxs(Fragment, { children: [
16
- /* @__PURE__ */ jsx(
17
- MenuItem,
18
- {
19
- href,
20
- onClick: () => {
21
- onClick == null ? void 0 : onClick();
22
- },
23
- children: /* @__PURE__ */ jsxs("div", { className: `flex-col ${styles.container}`, children: [
24
- /* @__PURE__ */ jsx("span", { children: "Profile Settings" }),
25
- /* @__PURE__ */ jsx("span", { className: styles.profileEmail, children: userEmail })
26
- ] })
27
- }
28
- ),
29
- !hideBottomDivider && /* @__PURE__ */ jsx(MenuDivider, {})
30
- ] });
31
- };
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { ProfileMenuContent } from "./harmony83.mjs";
3
+ import { ProfileMenuProvider } from "./harmony84.mjs";
4
+ const ProfileMenu = ({ config, children }) => /* @__PURE__ */ jsx(ProfileMenuProvider, { config, children: /* @__PURE__ */ jsx(ProfileMenuContent, { children }) });
32
5
  export {
33
- ProfileSettingsMenuItem
6
+ ProfileMenu
34
7
  };
35
8
  //# sourceMappingURL=harmony70.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony70.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileSettingsMenuItem/ProfileSettingsMenuItem.tsx"],"sourcesContent":["import { MenuDivider, MenuItem } from '@lokalise/louis'\nimport { useProfileMenu } from '../ProfileMenuContext'\nimport styles from './ProfileSettingsMenuItem.module.css'\n\ntype ProfileSettingsMenuItemProps = {\n\t/** URL to the profile settings page */\n\thref: string\n\t/** User's email address to display below \"Profile Settings\" */\n\tuserEmail: string\n\t/** Optional callback function for tracking or additional actions */\n\tonClick?: () => void\n\t/** Whether to hide the divider that appears below this menu item */\n\thideBottomDivider?: boolean\n}\n\n/**\n * A menu item component that provides access to profile settings.\n *\n * Features:\n * - Displays \"Profile Settings\" with the user's email address below\n * - Conditionally renders based on team status\n * - Includes an optional divider below the item\n * - Will not render if:\n * - Team is suspended\n * - Team's trial period has ended\n *\n * @example\n * ```tsx\n * <ProfileSettingsMenuItem\n * href=\"/settings/profile\"\n * userEmail=\"user@example.com\"\n * onClick={() => trackSettingsClick()}\n * />\n *\n * // Without bottom divider\n * <ProfileSettingsMenuItem\n * href=\"/settings/profile\"\n * userEmail=\"user@example.com\"\n * hideBottomDivider\n * />\n * ```\n *\n * @note This component must be used within a ProfileMenu component\n * as it requires access to the ProfileMenu context for team status information.\n */\nexport const ProfileSettingsMenuItem = ({\n\thref,\n\tonClick,\n\tuserEmail,\n\thideBottomDivider,\n}: ProfileSettingsMenuItemProps) => {\n\tconst { isEndOfTrialActive, isTeamSuspended } = useProfileMenu()\n\n\tif (isEndOfTrialActive || isTeamSuspended) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem\n\t\t\t\thref={href}\n\t\t\t\tonClick={() => {\n\t\t\t\t\tonClick?.()\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<div className={`flex-col ${styles.container}`}>\n\t\t\t\t\t<span>Profile Settings</span>\n\t\t\t\t\t<span className={styles.profileEmail}>{userEmail}</span>\n\t\t\t\t</div>\n\t\t\t</MenuItem>\n\n\t\t\t{!hideBottomDivider && <MenuDivider />}\n\t\t</>\n\t)\n}\n"],"names":[],"mappings":";;;;AA6CO,MAAM,0BAA0B,CAAC;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,MAAoC;AACnC,QAAM,EAAE,oBAAoB,gBAAgB,IAAI,eAAe;AAE/D,MAAI,sBAAsB,iBAAiB;AACnC,WAAA;AAAA,EAAA;AAGR,SAEE,qBAAA,UAAA,EAAA,UAAA;AAAA,IAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACA;AAAA,QACA,SAAS,MAAM;AACJ;AAAA,QACX;AAAA,QAEA,+BAAC,OAAI,EAAA,WAAW,YAAY,OAAO,SAAS,IAC3C,UAAA;AAAA,UAAA,oBAAC,UAAK,UAAgB,mBAAA,CAAA;AAAA,UACrB,oBAAA,QAAA,EAAK,WAAW,OAAO,cAAe,UAAU,UAAA,CAAA;AAAA,QAAA,EAClD,CAAA;AAAA,MAAA;AAAA,IACD;AAAA,IAEC,CAAC,qBAAqB,oBAAC,aAAY,CAAA,CAAA;AAAA,EAAA,GACrC;AAEF;"}
1
+ {"version":3,"file":"harmony70.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileMenu.tsx"],"sourcesContent":["import { ProfileMenuContent, type ProfileMenuContentProps } from './ProfileMenuContent'\nimport { ProfileMenuProvider } from './ProfileMenuProvider'\nimport type { SidebarProfileMenuConfig } from './types'\n\ntype ProfileMenuProps = {\n\t/** Configuration object containing team and user settings */\n\tconfig: SidebarProfileMenuConfig\n\t/** Render function for the menu content */\n\tchildren: ProfileMenuContentProps['children']\n}\n\n/**\n * A contextual menu component that provides team management functionality.\n * It manages team switching, profile settings, billing options, and upgrade prompts.\n *\n * The component uses a render prop pattern to provide context values to its children,\n * allowing flexible composition of menu items based on user permissions and team status.\n *\n * @example\n * ```tsx\n * <ProfileMenu config={profileMenuConfig}>\n * {({ allowTeamCreation, showBillingButton }) => (\n * <>\n * <TeamSwitch onSwitchTeam={handleTeamSwitch} />\n * {allowTeamCreation && <MenuItem>Create new team</MenuItem>}\n * {showBillingButton && <MenuItem href=\"/billing\">Billing</MenuItem>}\n * </>\n * )}\n * </ProfileMenu>\n * ```\n */\nexport const ProfileMenu = ({ config, children }: ProfileMenuProps) => (\n\t<ProfileMenuProvider config={config}>\n\t\t<ProfileMenuContent>{children}</ProfileMenuContent>\n\t</ProfileMenuProvider>\n)\n"],"names":[],"mappings":";;;AA+BO,MAAM,cAAc,CAAC,EAAE,QAAQ,SAAS,MAC7C,oBAAA,qBAAA,EAAoB,QACpB,UAAA,oBAAC,oBAAoB,EAAA,SAAS,CAAA,EAC/B,CAAA;"}
@@ -2,34 +2,34 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const louis = require("@lokalise/louis");
5
- const plan = require("./harmony7.cjs");
6
- const ProfileMenuContext = require("./harmony86.cjs");
7
- const TeamMenuItem_module = require("./harmony88.cjs");
8
- const TeamMenuItem = ({ team, onClick, hidePlanLabel }) => {
9
- const { currentTeam, planId } = ProfileMenuContext.useProfileMenu();
10
- const contextTeam = team || currentTeam;
11
- if (!contextTeam) {
5
+ const ProfileMenuContext = require("./harmony85.cjs");
6
+ const ProfileSettingsMenuItem_module = require("./harmony86.cjs");
7
+ const ProfileSettingsMenuItem = ({
8
+ href,
9
+ onClick,
10
+ userEmail,
11
+ hideBottomDivider
12
+ }) => {
13
+ const { isEndOfTrialActive, isTeamSuspended } = ProfileMenuContext.useProfileMenu();
14
+ if (isEndOfTrialActive || isTeamSuspended) {
12
15
  return null;
13
16
  }
14
- const planLabel = plan.isFreePlan(planId) ? "Free" : plan.isTrialPlan(planId) ? "Trial" : void 0;
15
- const WrapperNode = onClick ? louis.MenuItem : "div";
16
- return /* @__PURE__ */ jsxRuntime.jsxs(
17
- WrapperNode,
18
- {
19
- className: TeamMenuItem_module.default.wrapper,
20
- ...onClick && { onClick: () => onClick(contextTeam) },
21
- children: [
22
- contextTeam.logoUrl ? /* @__PURE__ */ jsxRuntime.jsx("img", { className: TeamMenuItem_module.default.profileImage, src: contextTeam.logoUrl, alt: "Team logo" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${TeamMenuItem_module.default.defaultProfileImage}`, children: /* @__PURE__ */ jsxRuntime.jsx(louis.UserIcon, { size: "25px" }) }),
23
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: TeamMenuItem_module.default.teamDetails, children: [
24
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: TeamMenuItem_module.default.planWrapper, children: [
25
- /* @__PURE__ */ jsxRuntime.jsx("span", { title: contextTeam.name, className: TeamMenuItem_module.default.teamName, children: contextTeam.name }),
26
- planLabel && !hidePlanLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { className: TeamMenuItem_module.default.teamName, children: planLabel })
27
- ] }),
28
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: TeamMenuItem_module.default.membership, children: contextTeam.role })
17
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
18
+ /* @__PURE__ */ jsxRuntime.jsx(
19
+ louis.MenuItem,
20
+ {
21
+ href,
22
+ onClick: () => {
23
+ onClick == null ? void 0 : onClick();
24
+ },
25
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-col ${ProfileSettingsMenuItem_module.default.container}`, children: [
26
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Profile Settings" }),
27
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: ProfileSettingsMenuItem_module.default.profileEmail, children: userEmail })
29
28
  ] })
30
- ]
31
- }
32
- );
29
+ }
30
+ ),
31
+ !hideBottomDivider && /* @__PURE__ */ jsxRuntime.jsx(louis.MenuDivider, {})
32
+ ] });
33
33
  };
34
- exports.TeamMenuItem = TeamMenuItem;
34
+ exports.ProfileSettingsMenuItem = ProfileSettingsMenuItem;
35
35
  //# sourceMappingURL=harmony71.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony71.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/TeamMenuItem/TeamMenuItem.tsx"],"sourcesContent":["import { MenuItem, UserIcon } from '@lokalise/louis'\nimport { isFreePlan, isTrialPlan } from '../../../../../utils/billing/plan/plan'\nimport type { SidebarTeam } from '../../../types'\nimport { useProfileMenu } from '../ProfileMenuContext'\nimport styles from './TeamMenuItem.module.css'\n\ntype TeamMenuItemProps = {\n\t/** Team to display. If not provided, uses the current team from context */\n\tteam?: SidebarTeam\n\t/** Callback for when the team item is clicked. If provided, renders as a clickable MenuItem */\n\tonClick?: (team: SidebarTeam) => void\n\t/** Whether to hide the plan label (Free/Trial). Useful when displaying multiple teams */\n\thidePlanLabel?: boolean\n}\n\n/**\n * A component that displays team information in a menu item format.\n * Renders team logo (or default user icon), team name, role, and plan label.\n *\n * The component can be used in two modes:\n * 1. As a static display of the current team (when no onClick handler is provided)\n * 2. As a clickable menu item for team switching (when onClick handler is provided)\n *\n * @example\n * ```tsx\n * // Static current team display\n * <TeamMenuItem />\n *\n * // Clickable team item for switching\n * <TeamMenuItem\n * team={someTeam}\n * onClick={(team) => handleTeamSwitch(team)}\n * hidePlanLabel\n * />\n * ```\n *\n * @note This component must be used within a ProfileMenu component\n * as it requires access to the ProfileMenu context for current team\n * and plan information.\n */\nexport const TeamMenuItem = ({ team, onClick, hidePlanLabel }: TeamMenuItemProps) => {\n\tconst { currentTeam, planId } = useProfileMenu()\n\n\tconst contextTeam = team || currentTeam\n\n\tif (!contextTeam) {\n\t\treturn null\n\t}\n\n\tconst planLabel = isFreePlan(planId) ? 'Free' : isTrialPlan(planId) ? 'Trial' : undefined\n\n\tconst WrapperNode = onClick ? MenuItem : 'div'\n\n\treturn (\n\t\t<WrapperNode\n\t\t\tclassName={styles.wrapper}\n\t\t\t{...(onClick && { onClick: () => onClick(contextTeam) })}\n\t\t>\n\t\t\t{contextTeam.logoUrl ? (\n\t\t\t\t<img className={styles.profileImage} src={contextTeam.logoUrl} alt=\"Team logo\" />\n\t\t\t) : (\n\t\t\t\t<span className={`${styles.defaultProfileImage}`}>\n\t\t\t\t\t<UserIcon size=\"25px\" />\n\t\t\t\t</span>\n\t\t\t)}\n\t\t\t<div className={styles.teamDetails}>\n\t\t\t\t<div className={styles.planWrapper}>\n\t\t\t\t\t<span title={contextTeam.name} className={styles.teamName}>\n\t\t\t\t\t\t{contextTeam.name}\n\t\t\t\t\t</span>\n\t\t\t\t\t{planLabel && !hidePlanLabel && <span className={styles.teamName}>{planLabel}</span>}\n\t\t\t\t</div>\n\t\t\t\t<span className={styles.membership}>{contextTeam.role}</span>\n\t\t\t</div>\n\t\t</WrapperNode>\n\t)\n}\n"],"names":["useProfileMenu","isFreePlan","isTrialPlan","MenuItem","jsxs","styles","jsx","UserIcon"],"mappings":";;;;;;;AAwCO,MAAM,eAAe,CAAC,EAAE,MAAM,SAAS,oBAAuC;AACpF,QAAM,EAAE,aAAa,OAAO,IAAIA,kCAAe;AAE/C,QAAM,cAAc,QAAQ;AAE5B,MAAI,CAAC,aAAa;AACV,WAAA;AAAA,EAAA;AAGF,QAAA,YAAYC,gBAAW,MAAM,IAAI,SAASC,iBAAY,MAAM,IAAI,UAAU;AAE1E,QAAA,cAAc,UAAUC,MAAAA,WAAW;AAGxC,SAAAC,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,WAAWC,oBAAO,QAAA;AAAA,MACjB,GAAI,WAAW,EAAE,SAAS,MAAM,QAAQ,WAAW,EAAE;AAAA,MAErD,UAAA;AAAA,QAAY,YAAA,yCACX,OAAI,EAAA,WAAWA,oBAAAA,QAAO,cAAc,KAAK,YAAY,SAAS,KAAI,YAAA,CAAY,IAE9EC,+BAAA,QAAA,EAAK,WAAW,GAAGD,oBAAO,QAAA,mBAAmB,IAC7C,UAACC,2BAAAA,IAAAC,MAAAA,UAAA,EAAS,MAAK,OAAA,CAAO,EACvB,CAAA;AAAA,QAEAH,2BAAA,KAAA,OAAA,EAAI,WAAWC,oBAAAA,QAAO,aACtB,UAAA;AAAA,UAACD,2BAAA,KAAA,OAAA,EAAI,WAAWC,oBAAAA,QAAO,aACtB,UAAA;AAAA,YAACC,2BAAAA,IAAA,QAAA,EAAK,OAAO,YAAY,MAAM,WAAWD,oBAAAA,QAAO,UAC/C,sBAAY,KACd,CAAA;AAAA,YACC,aAAa,CAAC,iBAAiBC,2BAAAA,IAAC,UAAK,WAAWD,4BAAO,UAAW,UAAU,UAAA,CAAA;AAAA,UAAA,GAC9E;AAAA,yCACC,QAAK,EAAA,WAAWA,oBAAAA,QAAO,YAAa,sBAAY,KAAK,CAAA;AAAA,QAAA,EACvD,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACD;AAEF;;"}
1
+ {"version":3,"file":"harmony71.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileSettingsMenuItem/ProfileSettingsMenuItem.tsx"],"sourcesContent":["import { MenuDivider, MenuItem } from '@lokalise/louis'\nimport { useProfileMenu } from '../ProfileMenuContext'\nimport styles from './ProfileSettingsMenuItem.module.css'\n\ntype ProfileSettingsMenuItemProps = {\n\t/** URL to the profile settings page */\n\thref: string\n\t/** User's email address to display below \"Profile Settings\" */\n\tuserEmail: string\n\t/** Optional callback function for tracking or additional actions */\n\tonClick?: () => void\n\t/** Whether to hide the divider that appears below this menu item */\n\thideBottomDivider?: boolean\n}\n\n/**\n * A menu item component that provides access to profile settings.\n *\n * Features:\n * - Displays \"Profile Settings\" with the user's email address below\n * - Conditionally renders based on team status\n * - Includes an optional divider below the item\n * - Will not render if:\n * - Team is suspended\n * - Team's trial period has ended\n *\n * @example\n * ```tsx\n * <ProfileSettingsMenuItem\n * href=\"/settings/profile\"\n * userEmail=\"user@example.com\"\n * onClick={() => trackSettingsClick()}\n * />\n *\n * // Without bottom divider\n * <ProfileSettingsMenuItem\n * href=\"/settings/profile\"\n * userEmail=\"user@example.com\"\n * hideBottomDivider\n * />\n * ```\n *\n * @note This component must be used within a ProfileMenu component\n * as it requires access to the ProfileMenu context for team status information.\n */\nexport const ProfileSettingsMenuItem = ({\n\thref,\n\tonClick,\n\tuserEmail,\n\thideBottomDivider,\n}: ProfileSettingsMenuItemProps) => {\n\tconst { isEndOfTrialActive, isTeamSuspended } = useProfileMenu()\n\n\tif (isEndOfTrialActive || isTeamSuspended) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem\n\t\t\t\thref={href}\n\t\t\t\tonClick={() => {\n\t\t\t\t\tonClick?.()\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<div className={`flex-col ${styles.container}`}>\n\t\t\t\t\t<span>Profile Settings</span>\n\t\t\t\t\t<span className={styles.profileEmail}>{userEmail}</span>\n\t\t\t\t</div>\n\t\t\t</MenuItem>\n\n\t\t\t{!hideBottomDivider && <MenuDivider />}\n\t\t</>\n\t)\n}\n"],"names":["useProfileMenu","jsxs","Fragment","jsx","MenuItem","styles","MenuDivider"],"mappings":";;;;;;AA6CO,MAAM,0BAA0B,CAAC;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,MAAoC;AACnC,QAAM,EAAE,oBAAoB,gBAAgB,IAAIA,kCAAe;AAE/D,MAAI,sBAAsB,iBAAiB;AACnC,WAAA;AAAA,EAAA;AAGR,SAEEC,2BAAA,KAAAC,qBAAA,EAAA,UAAA;AAAA,IAAAC,2BAAA;AAAA,MAACC,MAAA;AAAA,MAAA;AAAA,QACA;AAAA,QACA,SAAS,MAAM;AACJ;AAAA,QACX;AAAA,QAEA,0CAAC,OAAI,EAAA,WAAW,YAAYC,uCAAO,SAAS,IAC3C,UAAA;AAAA,UAAAF,2BAAAA,IAAC,UAAK,UAAgB,mBAAA,CAAA;AAAA,UACrBA,2BAAA,IAAA,QAAA,EAAK,WAAWE,+BAAA,QAAO,cAAe,UAAU,UAAA,CAAA;AAAA,QAAA,EAClD,CAAA;AAAA,MAAA;AAAA,IACD;AAAA,IAEC,CAAC,qBAAqBF,+BAACG,MAAAA,aAAY,CAAA,CAAA;AAAA,EAAA,GACrC;AAEF;;"}
@@ -1,35 +1,35 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
- import { MenuItem, UserIcon } from "@lokalise/louis";
3
- import { isFreePlan, isTrialPlan } from "./harmony7.mjs";
4
- import { useProfileMenu } from "./harmony86.mjs";
5
- import styles from "./harmony88.mjs";
6
- const TeamMenuItem = ({ team, onClick, hidePlanLabel }) => {
7
- const { currentTeam, planId } = useProfileMenu();
8
- const contextTeam = team || currentTeam;
9
- if (!contextTeam) {
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import { MenuItem, MenuDivider } from "@lokalise/louis";
3
+ import { useProfileMenu } from "./harmony85.mjs";
4
+ import styles from "./harmony86.mjs";
5
+ const ProfileSettingsMenuItem = ({
6
+ href,
7
+ onClick,
8
+ userEmail,
9
+ hideBottomDivider
10
+ }) => {
11
+ const { isEndOfTrialActive, isTeamSuspended } = useProfileMenu();
12
+ if (isEndOfTrialActive || isTeamSuspended) {
10
13
  return null;
11
14
  }
12
- const planLabel = isFreePlan(planId) ? "Free" : isTrialPlan(planId) ? "Trial" : void 0;
13
- const WrapperNode = onClick ? MenuItem : "div";
14
- return /* @__PURE__ */ jsxs(
15
- WrapperNode,
16
- {
17
- className: styles.wrapper,
18
- ...onClick && { onClick: () => onClick(contextTeam) },
19
- children: [
20
- contextTeam.logoUrl ? /* @__PURE__ */ jsx("img", { className: styles.profileImage, src: contextTeam.logoUrl, alt: "Team logo" }) : /* @__PURE__ */ jsx("span", { className: `${styles.defaultProfileImage}`, children: /* @__PURE__ */ jsx(UserIcon, { size: "25px" }) }),
21
- /* @__PURE__ */ jsxs("div", { className: styles.teamDetails, children: [
22
- /* @__PURE__ */ jsxs("div", { className: styles.planWrapper, children: [
23
- /* @__PURE__ */ jsx("span", { title: contextTeam.name, className: styles.teamName, children: contextTeam.name }),
24
- planLabel && !hidePlanLabel && /* @__PURE__ */ jsx("span", { className: styles.teamName, children: planLabel })
25
- ] }),
26
- /* @__PURE__ */ jsx("span", { className: styles.membership, children: contextTeam.role })
15
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
16
+ /* @__PURE__ */ jsx(
17
+ MenuItem,
18
+ {
19
+ href,
20
+ onClick: () => {
21
+ onClick == null ? void 0 : onClick();
22
+ },
23
+ children: /* @__PURE__ */ jsxs("div", { className: `flex-col ${styles.container}`, children: [
24
+ /* @__PURE__ */ jsx("span", { children: "Profile Settings" }),
25
+ /* @__PURE__ */ jsx("span", { className: styles.profileEmail, children: userEmail })
27
26
  ] })
28
- ]
29
- }
30
- );
27
+ }
28
+ ),
29
+ !hideBottomDivider && /* @__PURE__ */ jsx(MenuDivider, {})
30
+ ] });
31
31
  };
32
32
  export {
33
- TeamMenuItem
33
+ ProfileSettingsMenuItem
34
34
  };
35
35
  //# sourceMappingURL=harmony71.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony71.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/TeamMenuItem/TeamMenuItem.tsx"],"sourcesContent":["import { MenuItem, UserIcon } from '@lokalise/louis'\nimport { isFreePlan, isTrialPlan } from '../../../../../utils/billing/plan/plan'\nimport type { SidebarTeam } from '../../../types'\nimport { useProfileMenu } from '../ProfileMenuContext'\nimport styles from './TeamMenuItem.module.css'\n\ntype TeamMenuItemProps = {\n\t/** Team to display. If not provided, uses the current team from context */\n\tteam?: SidebarTeam\n\t/** Callback for when the team item is clicked. If provided, renders as a clickable MenuItem */\n\tonClick?: (team: SidebarTeam) => void\n\t/** Whether to hide the plan label (Free/Trial). Useful when displaying multiple teams */\n\thidePlanLabel?: boolean\n}\n\n/**\n * A component that displays team information in a menu item format.\n * Renders team logo (or default user icon), team name, role, and plan label.\n *\n * The component can be used in two modes:\n * 1. As a static display of the current team (when no onClick handler is provided)\n * 2. As a clickable menu item for team switching (when onClick handler is provided)\n *\n * @example\n * ```tsx\n * // Static current team display\n * <TeamMenuItem />\n *\n * // Clickable team item for switching\n * <TeamMenuItem\n * team={someTeam}\n * onClick={(team) => handleTeamSwitch(team)}\n * hidePlanLabel\n * />\n * ```\n *\n * @note This component must be used within a ProfileMenu component\n * as it requires access to the ProfileMenu context for current team\n * and plan information.\n */\nexport const TeamMenuItem = ({ team, onClick, hidePlanLabel }: TeamMenuItemProps) => {\n\tconst { currentTeam, planId } = useProfileMenu()\n\n\tconst contextTeam = team || currentTeam\n\n\tif (!contextTeam) {\n\t\treturn null\n\t}\n\n\tconst planLabel = isFreePlan(planId) ? 'Free' : isTrialPlan(planId) ? 'Trial' : undefined\n\n\tconst WrapperNode = onClick ? MenuItem : 'div'\n\n\treturn (\n\t\t<WrapperNode\n\t\t\tclassName={styles.wrapper}\n\t\t\t{...(onClick && { onClick: () => onClick(contextTeam) })}\n\t\t>\n\t\t\t{contextTeam.logoUrl ? (\n\t\t\t\t<img className={styles.profileImage} src={contextTeam.logoUrl} alt=\"Team logo\" />\n\t\t\t) : (\n\t\t\t\t<span className={`${styles.defaultProfileImage}`}>\n\t\t\t\t\t<UserIcon size=\"25px\" />\n\t\t\t\t</span>\n\t\t\t)}\n\t\t\t<div className={styles.teamDetails}>\n\t\t\t\t<div className={styles.planWrapper}>\n\t\t\t\t\t<span title={contextTeam.name} className={styles.teamName}>\n\t\t\t\t\t\t{contextTeam.name}\n\t\t\t\t\t</span>\n\t\t\t\t\t{planLabel && !hidePlanLabel && <span className={styles.teamName}>{planLabel}</span>}\n\t\t\t\t</div>\n\t\t\t\t<span className={styles.membership}>{contextTeam.role}</span>\n\t\t\t</div>\n\t\t</WrapperNode>\n\t)\n}\n"],"names":[],"mappings":";;;;;AAwCO,MAAM,eAAe,CAAC,EAAE,MAAM,SAAS,oBAAuC;AACpF,QAAM,EAAE,aAAa,OAAO,IAAI,eAAe;AAE/C,QAAM,cAAc,QAAQ;AAE5B,MAAI,CAAC,aAAa;AACV,WAAA;AAAA,EAAA;AAGF,QAAA,YAAY,WAAW,MAAM,IAAI,SAAS,YAAY,MAAM,IAAI,UAAU;AAE1E,QAAA,cAAc,UAAU,WAAW;AAGxC,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,WAAW,OAAO;AAAA,MACjB,GAAI,WAAW,EAAE,SAAS,MAAM,QAAQ,WAAW,EAAE;AAAA,MAErD,UAAA;AAAA,QAAY,YAAA,8BACX,OAAI,EAAA,WAAW,OAAO,cAAc,KAAK,YAAY,SAAS,KAAI,YAAA,CAAY,IAE9E,oBAAA,QAAA,EAAK,WAAW,GAAG,OAAO,mBAAmB,IAC7C,UAAC,oBAAA,UAAA,EAAS,MAAK,OAAA,CAAO,EACvB,CAAA;AAAA,QAEA,qBAAA,OAAA,EAAI,WAAW,OAAO,aACtB,UAAA;AAAA,UAAC,qBAAA,OAAA,EAAI,WAAW,OAAO,aACtB,UAAA;AAAA,YAAC,oBAAA,QAAA,EAAK,OAAO,YAAY,MAAM,WAAW,OAAO,UAC/C,sBAAY,KACd,CAAA;AAAA,YACC,aAAa,CAAC,iBAAiB,oBAAC,UAAK,WAAW,OAAO,UAAW,UAAU,UAAA,CAAA;AAAA,UAAA,GAC9E;AAAA,8BACC,QAAK,EAAA,WAAW,OAAO,YAAa,sBAAY,KAAK,CAAA;AAAA,QAAA,EACvD,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACD;AAEF;"}
1
+ {"version":3,"file":"harmony71.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileSettingsMenuItem/ProfileSettingsMenuItem.tsx"],"sourcesContent":["import { MenuDivider, MenuItem } from '@lokalise/louis'\nimport { useProfileMenu } from '../ProfileMenuContext'\nimport styles from './ProfileSettingsMenuItem.module.css'\n\ntype ProfileSettingsMenuItemProps = {\n\t/** URL to the profile settings page */\n\thref: string\n\t/** User's email address to display below \"Profile Settings\" */\n\tuserEmail: string\n\t/** Optional callback function for tracking or additional actions */\n\tonClick?: () => void\n\t/** Whether to hide the divider that appears below this menu item */\n\thideBottomDivider?: boolean\n}\n\n/**\n * A menu item component that provides access to profile settings.\n *\n * Features:\n * - Displays \"Profile Settings\" with the user's email address below\n * - Conditionally renders based on team status\n * - Includes an optional divider below the item\n * - Will not render if:\n * - Team is suspended\n * - Team's trial period has ended\n *\n * @example\n * ```tsx\n * <ProfileSettingsMenuItem\n * href=\"/settings/profile\"\n * userEmail=\"user@example.com\"\n * onClick={() => trackSettingsClick()}\n * />\n *\n * // Without bottom divider\n * <ProfileSettingsMenuItem\n * href=\"/settings/profile\"\n * userEmail=\"user@example.com\"\n * hideBottomDivider\n * />\n * ```\n *\n * @note This component must be used within a ProfileMenu component\n * as it requires access to the ProfileMenu context for team status information.\n */\nexport const ProfileSettingsMenuItem = ({\n\thref,\n\tonClick,\n\tuserEmail,\n\thideBottomDivider,\n}: ProfileSettingsMenuItemProps) => {\n\tconst { isEndOfTrialActive, isTeamSuspended } = useProfileMenu()\n\n\tif (isEndOfTrialActive || isTeamSuspended) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem\n\t\t\t\thref={href}\n\t\t\t\tonClick={() => {\n\t\t\t\t\tonClick?.()\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<div className={`flex-col ${styles.container}`}>\n\t\t\t\t\t<span>Profile Settings</span>\n\t\t\t\t\t<span className={styles.profileEmail}>{userEmail}</span>\n\t\t\t\t</div>\n\t\t\t</MenuItem>\n\n\t\t\t{!hideBottomDivider && <MenuDivider />}\n\t\t</>\n\t)\n}\n"],"names":[],"mappings":";;;;AA6CO,MAAM,0BAA0B,CAAC;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,MAAoC;AACnC,QAAM,EAAE,oBAAoB,gBAAgB,IAAI,eAAe;AAE/D,MAAI,sBAAsB,iBAAiB;AACnC,WAAA;AAAA,EAAA;AAGR,SAEE,qBAAA,UAAA,EAAA,UAAA;AAAA,IAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACA;AAAA,QACA,SAAS,MAAM;AACJ;AAAA,QACX;AAAA,QAEA,+BAAC,OAAI,EAAA,WAAW,YAAY,OAAO,SAAS,IAC3C,UAAA;AAAA,UAAA,oBAAC,UAAK,UAAgB,mBAAA,CAAA;AAAA,UACrB,oBAAA,QAAA,EAAK,WAAW,OAAO,cAAe,UAAU,UAAA,CAAA;AAAA,QAAA,EAClD,CAAA;AAAA,MAAA;AAAA,IACD;AAAA,IAEC,CAAC,qBAAqB,oBAAC,aAAY,CAAA,CAAA;AAAA,EAAA,GACrC;AAEF;"}
@@ -1,22 +1,35 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
- const ProfileMenuContext = require("./harmony86.cjs");
5
- const TeamMenuItem = require("./harmony71.cjs");
6
- const TeamSwitch_module = require("./harmony89.cjs");
7
- const TeamSwitch = ({ onSwitchTeam }) => {
8
- const { otherTeams } = ProfileMenuContext.useProfileMenu();
9
- if (otherTeams.length === 0) {
4
+ const louis = require("@lokalise/louis");
5
+ const plan = require("./harmony7.cjs");
6
+ const ProfileMenuContext = require("./harmony85.cjs");
7
+ const TeamMenuItem_module = require("./harmony87.cjs");
8
+ const TeamMenuItem = ({ team, onClick, hidePlanLabel }) => {
9
+ const { currentTeam, planId } = ProfileMenuContext.useProfileMenu();
10
+ const contextTeam = team || currentTeam;
11
+ if (!contextTeam) {
10
12
  return null;
11
13
  }
12
- return /* @__PURE__ */ jsxRuntime.jsx(
13
- "div",
14
+ const planLabel = plan.isFreePlan(planId) ? "Free" : plan.isTrialPlan(planId) ? "Trial" : void 0;
15
+ const WrapperNode = onClick ? louis.MenuItem : "div";
16
+ return /* @__PURE__ */ jsxRuntime.jsxs(
17
+ WrapperNode,
14
18
  {
15
- "data-testid": "sidebar-team-switch",
16
- className: `flex-col items-stretch ${TeamSwitch_module.default.teamsContainer}`,
17
- children: otherTeams.map((team) => /* @__PURE__ */ jsxRuntime.jsx(TeamMenuItem.TeamMenuItem, { team, onClick: onSwitchTeam, hidePlanLabel: true }, team.id))
19
+ className: TeamMenuItem_module.default.wrapper,
20
+ ...onClick && { onClick: () => onClick(contextTeam) },
21
+ children: [
22
+ contextTeam.logoUrl ? /* @__PURE__ */ jsxRuntime.jsx("img", { className: TeamMenuItem_module.default.profileImage, src: contextTeam.logoUrl, alt: "Team logo" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${TeamMenuItem_module.default.defaultProfileImage}`, children: /* @__PURE__ */ jsxRuntime.jsx(louis.UserIcon, { size: "25px" }) }),
23
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: TeamMenuItem_module.default.teamDetails, children: [
24
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: TeamMenuItem_module.default.planWrapper, children: [
25
+ /* @__PURE__ */ jsxRuntime.jsx("span", { title: contextTeam.name, className: TeamMenuItem_module.default.teamName, children: contextTeam.name }),
26
+ planLabel && !hidePlanLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { className: TeamMenuItem_module.default.teamName, children: planLabel })
27
+ ] }),
28
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: TeamMenuItem_module.default.membership, children: contextTeam.role })
29
+ ] })
30
+ ]
18
31
  }
19
32
  );
20
33
  };
21
- exports.TeamSwitch = TeamSwitch;
34
+ exports.TeamMenuItem = TeamMenuItem;
22
35
  //# sourceMappingURL=harmony72.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony72.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/TeamSwitch/TeamSwitch.tsx"],"sourcesContent":["import type { SidebarTeam } from '../../../types'\nimport { useProfileMenu } from '../ProfileMenuContext'\nimport { TeamMenuItem } from '../TeamMenuItem/TeamMenuItem'\nimport styles from './TeamSwitch.module.css'\n\ntype TeamSwitchProps = {\n\t/** Callback function triggered when a user selects a different team */\n\tonSwitchTeam: (team: SidebarTeam) => void\n}\n\n/**\n * A component that displays a list of available teams for switching.\n * It automatically excludes the current team from the list and renders\n * nothing if there are no other teams available.\n *\n * Uses the ProfileMenu context to access the list of other teams and\n * renders each team as a TeamMenuItem with click functionality.\n *\n * @example\n * ```tsx\n * <TeamSwitch\n * onSwitchTeam={(team) => {\n * console.log(`Switching to team: ${team.name}`);\n * // Handle team switch logic\n * }}\n * />\n * ```\n *\n * @note This component must be used within a ProfileMenu component\n * as it requires access to the ProfileMenu context.\n */\nexport const TeamSwitch = ({ onSwitchTeam }: TeamSwitchProps) => {\n\tconst { otherTeams } = useProfileMenu()\n\n\tif (otherTeams.length === 0) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tdata-testid=\"sidebar-team-switch\"\n\t\t\tclassName={`flex-col items-stretch ${styles.teamsContainer}`}\n\t\t>\n\t\t\t{otherTeams.map((team) => (\n\t\t\t\t<TeamMenuItem team={team} key={team.id} onClick={onSwitchTeam} hidePlanLabel />\n\t\t\t))}\n\t\t</div>\n\t)\n}\n"],"names":["useProfileMenu","jsx","styles","TeamMenuItem"],"mappings":";;;;;;AA+BO,MAAM,aAAa,CAAC,EAAE,mBAAoC;AAC1D,QAAA,EAAE,WAAW,IAAIA,kCAAe;AAElC,MAAA,WAAW,WAAW,GAAG;AACrB,WAAA;AAAA,EAAA;AAIP,SAAAC,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,eAAY;AAAA,MACZ,WAAW,0BAA0BC,kBAAA,QAAO,cAAc;AAAA,MAEzD,UAAW,WAAA,IAAI,CAAC,SACfD,2BAAAA,IAAAE,aAAAA,cAAA,EAAa,MAA0B,SAAS,cAAc,eAAa,KAA7C,GAAA,KAAK,EAAyC,CAC7E;AAAA,IAAA;AAAA,EACF;AAEF;;"}
1
+ {"version":3,"file":"harmony72.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/TeamMenuItem/TeamMenuItem.tsx"],"sourcesContent":["import { MenuItem, UserIcon } from '@lokalise/louis'\nimport { isFreePlan, isTrialPlan } from '../../../../../utils/billing/plan/plan'\nimport type { SidebarTeam } from '../../../types'\nimport { useProfileMenu } from '../ProfileMenuContext'\nimport styles from './TeamMenuItem.module.css'\n\ntype TeamMenuItemProps = {\n\t/** Team to display. If not provided, uses the current team from context */\n\tteam?: SidebarTeam\n\t/** Callback for when the team item is clicked. If provided, renders as a clickable MenuItem */\n\tonClick?: (team: SidebarTeam) => void\n\t/** Whether to hide the plan label (Free/Trial). Useful when displaying multiple teams */\n\thidePlanLabel?: boolean\n}\n\n/**\n * A component that displays team information in a menu item format.\n * Renders team logo (or default user icon), team name, role, and plan label.\n *\n * The component can be used in two modes:\n * 1. As a static display of the current team (when no onClick handler is provided)\n * 2. As a clickable menu item for team switching (when onClick handler is provided)\n *\n * @example\n * ```tsx\n * // Static current team display\n * <TeamMenuItem />\n *\n * // Clickable team item for switching\n * <TeamMenuItem\n * team={someTeam}\n * onClick={(team) => handleTeamSwitch(team)}\n * hidePlanLabel\n * />\n * ```\n *\n * @note This component must be used within a ProfileMenu component\n * as it requires access to the ProfileMenu context for current team\n * and plan information.\n */\nexport const TeamMenuItem = ({ team, onClick, hidePlanLabel }: TeamMenuItemProps) => {\n\tconst { currentTeam, planId } = useProfileMenu()\n\n\tconst contextTeam = team || currentTeam\n\n\tif (!contextTeam) {\n\t\treturn null\n\t}\n\n\tconst planLabel = isFreePlan(planId) ? 'Free' : isTrialPlan(planId) ? 'Trial' : undefined\n\n\tconst WrapperNode = onClick ? MenuItem : 'div'\n\n\treturn (\n\t\t<WrapperNode\n\t\t\tclassName={styles.wrapper}\n\t\t\t{...(onClick && { onClick: () => onClick(contextTeam) })}\n\t\t>\n\t\t\t{contextTeam.logoUrl ? (\n\t\t\t\t<img className={styles.profileImage} src={contextTeam.logoUrl} alt=\"Team logo\" />\n\t\t\t) : (\n\t\t\t\t<span className={`${styles.defaultProfileImage}`}>\n\t\t\t\t\t<UserIcon size=\"25px\" />\n\t\t\t\t</span>\n\t\t\t)}\n\t\t\t<div className={styles.teamDetails}>\n\t\t\t\t<div className={styles.planWrapper}>\n\t\t\t\t\t<span title={contextTeam.name} className={styles.teamName}>\n\t\t\t\t\t\t{contextTeam.name}\n\t\t\t\t\t</span>\n\t\t\t\t\t{planLabel && !hidePlanLabel && <span className={styles.teamName}>{planLabel}</span>}\n\t\t\t\t</div>\n\t\t\t\t<span className={styles.membership}>{contextTeam.role}</span>\n\t\t\t</div>\n\t\t</WrapperNode>\n\t)\n}\n"],"names":["useProfileMenu","isFreePlan","isTrialPlan","MenuItem","jsxs","styles","jsx","UserIcon"],"mappings":";;;;;;;AAwCO,MAAM,eAAe,CAAC,EAAE,MAAM,SAAS,oBAAuC;AACpF,QAAM,EAAE,aAAa,OAAO,IAAIA,kCAAe;AAE/C,QAAM,cAAc,QAAQ;AAE5B,MAAI,CAAC,aAAa;AACV,WAAA;AAAA,EAAA;AAGF,QAAA,YAAYC,gBAAW,MAAM,IAAI,SAASC,iBAAY,MAAM,IAAI,UAAU;AAE1E,QAAA,cAAc,UAAUC,MAAAA,WAAW;AAGxC,SAAAC,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,WAAWC,oBAAO,QAAA;AAAA,MACjB,GAAI,WAAW,EAAE,SAAS,MAAM,QAAQ,WAAW,EAAE;AAAA,MAErD,UAAA;AAAA,QAAY,YAAA,yCACX,OAAI,EAAA,WAAWA,oBAAAA,QAAO,cAAc,KAAK,YAAY,SAAS,KAAI,YAAA,CAAY,IAE9EC,+BAAA,QAAA,EAAK,WAAW,GAAGD,oBAAO,QAAA,mBAAmB,IAC7C,UAACC,2BAAAA,IAAAC,MAAAA,UAAA,EAAS,MAAK,OAAA,CAAO,EACvB,CAAA;AAAA,QAEAH,2BAAA,KAAA,OAAA,EAAI,WAAWC,oBAAAA,QAAO,aACtB,UAAA;AAAA,UAACD,2BAAA,KAAA,OAAA,EAAI,WAAWC,oBAAAA,QAAO,aACtB,UAAA;AAAA,YAACC,2BAAAA,IAAA,QAAA,EAAK,OAAO,YAAY,MAAM,WAAWD,oBAAAA,QAAO,UAC/C,sBAAY,KACd,CAAA;AAAA,YACC,aAAa,CAAC,iBAAiBC,2BAAAA,IAAC,UAAK,WAAWD,4BAAO,UAAW,UAAU,UAAA,CAAA;AAAA,UAAA,GAC9E;AAAA,yCACC,QAAK,EAAA,WAAWA,oBAAAA,QAAO,YAAa,sBAAY,KAAK,CAAA;AAAA,QAAA,EACvD,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACD;AAEF;;"}
@@ -1,22 +1,35 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { useProfileMenu } from "./harmony86.mjs";
3
- import { TeamMenuItem } from "./harmony71.mjs";
4
- import styles from "./harmony89.mjs";
5
- const TeamSwitch = ({ onSwitchTeam }) => {
6
- const { otherTeams } = useProfileMenu();
7
- if (otherTeams.length === 0) {
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { MenuItem, UserIcon } from "@lokalise/louis";
3
+ import { isFreePlan, isTrialPlan } from "./harmony7.mjs";
4
+ import { useProfileMenu } from "./harmony85.mjs";
5
+ import styles from "./harmony87.mjs";
6
+ const TeamMenuItem = ({ team, onClick, hidePlanLabel }) => {
7
+ const { currentTeam, planId } = useProfileMenu();
8
+ const contextTeam = team || currentTeam;
9
+ if (!contextTeam) {
8
10
  return null;
9
11
  }
10
- return /* @__PURE__ */ jsx(
11
- "div",
12
+ const planLabel = isFreePlan(planId) ? "Free" : isTrialPlan(planId) ? "Trial" : void 0;
13
+ const WrapperNode = onClick ? MenuItem : "div";
14
+ return /* @__PURE__ */ jsxs(
15
+ WrapperNode,
12
16
  {
13
- "data-testid": "sidebar-team-switch",
14
- className: `flex-col items-stretch ${styles.teamsContainer}`,
15
- children: otherTeams.map((team) => /* @__PURE__ */ jsx(TeamMenuItem, { team, onClick: onSwitchTeam, hidePlanLabel: true }, team.id))
17
+ className: styles.wrapper,
18
+ ...onClick && { onClick: () => onClick(contextTeam) },
19
+ children: [
20
+ contextTeam.logoUrl ? /* @__PURE__ */ jsx("img", { className: styles.profileImage, src: contextTeam.logoUrl, alt: "Team logo" }) : /* @__PURE__ */ jsx("span", { className: `${styles.defaultProfileImage}`, children: /* @__PURE__ */ jsx(UserIcon, { size: "25px" }) }),
21
+ /* @__PURE__ */ jsxs("div", { className: styles.teamDetails, children: [
22
+ /* @__PURE__ */ jsxs("div", { className: styles.planWrapper, children: [
23
+ /* @__PURE__ */ jsx("span", { title: contextTeam.name, className: styles.teamName, children: contextTeam.name }),
24
+ planLabel && !hidePlanLabel && /* @__PURE__ */ jsx("span", { className: styles.teamName, children: planLabel })
25
+ ] }),
26
+ /* @__PURE__ */ jsx("span", { className: styles.membership, children: contextTeam.role })
27
+ ] })
28
+ ]
16
29
  }
17
30
  );
18
31
  };
19
32
  export {
20
- TeamSwitch
33
+ TeamMenuItem
21
34
  };
22
35
  //# sourceMappingURL=harmony72.mjs.map