@mieweb/ui 0.10.0-dev.31 → 0.10.0-dev.32

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 (479) hide show
  1. package/dist/CsvBlock-CFXSDPBI.js +9 -0
  2. package/dist/{CsvBlock-VLMG7GUO.js.map → CsvBlock-CFXSDPBI.js.map} +1 -1
  3. package/dist/CsvBlock-RGO7JXHJ.cjs +18 -0
  4. package/dist/{CsvBlock-FX5YNGNE.cjs.map → CsvBlock-RGO7JXHJ.cjs.map} +1 -1
  5. package/dist/HtmlPreviewBlock-VBYXCXVT.cjs +18 -0
  6. package/dist/{HtmlPreviewBlock-UO37JQ3K.cjs.map → HtmlPreviewBlock-VBYXCXVT.cjs.map} +1 -1
  7. package/dist/HtmlPreviewBlock-Z2GCK325.js +9 -0
  8. package/dist/{HtmlPreviewBlock-5JE7L3GR.js.map → HtmlPreviewBlock-Z2GCK325.js.map} +1 -1
  9. package/dist/MermaidBlock-I2R2BQOX.cjs +18 -0
  10. package/dist/{MermaidBlock-RZ75RPZA.cjs.map → MermaidBlock-I2R2BQOX.cjs.map} +1 -1
  11. package/dist/MermaidBlock-XCAK7IA5.js +9 -0
  12. package/dist/{MermaidBlock-3XHFBAMV.js.map → MermaidBlock-XCAK7IA5.js.map} +1 -1
  13. package/dist/SurveyBlock-KI5JOWCL.js +9 -0
  14. package/dist/{SurveyBlock-MUVJ3JUI.js.map → SurveyBlock-KI5JOWCL.js.map} +1 -1
  15. package/dist/SurveyBlock-UKSGISRT.cjs +18 -0
  16. package/dist/{SurveyBlock-VH47YXZC.cjs.map → SurveyBlock-UKSGISRT.cjs.map} +1 -1
  17. package/dist/brands/index.cjs +7 -7
  18. package/dist/brands/index.js +2 -2
  19. package/dist/{chunk-6ZPTZTKN.js → chunk-24AFHH4J.js} +3 -3
  20. package/dist/{chunk-6ZPTZTKN.js.map → chunk-24AFHH4J.js.map} +1 -1
  21. package/dist/{chunk-TYE5K5WV.cjs → chunk-32ZCJOSR.cjs} +4 -4
  22. package/dist/{chunk-TYE5K5WV.cjs.map → chunk-32ZCJOSR.cjs.map} +1 -1
  23. package/dist/{chunk-SD7ONW6S.js → chunk-3DLLTITK.js} +4 -4
  24. package/dist/{chunk-SD7ONW6S.js.map → chunk-3DLLTITK.js.map} +1 -1
  25. package/dist/chunk-47P5QLX4.cjs +42 -0
  26. package/dist/chunk-47P5QLX4.cjs.map +1 -0
  27. package/dist/chunk-4ZB7RSMY.cjs +306 -0
  28. package/dist/chunk-4ZB7RSMY.cjs.map +1 -0
  29. package/dist/{chunk-WXFGHDTV.cjs → chunk-57G3O552.cjs} +13 -13
  30. package/dist/{chunk-WXFGHDTV.cjs.map → chunk-57G3O552.cjs.map} +1 -1
  31. package/dist/{chunk-D22GE27K.js → chunk-5A4SL436.js} +4 -4
  32. package/dist/{chunk-D22GE27K.js.map → chunk-5A4SL436.js.map} +1 -1
  33. package/dist/chunk-6BNZLN4B.cjs +548 -0
  34. package/dist/chunk-6BNZLN4B.cjs.map +1 -0
  35. package/dist/chunk-6JSFT2J5.js +130 -0
  36. package/dist/chunk-6JSFT2J5.js.map +1 -0
  37. package/dist/{chunk-NKV76R65.cjs → chunk-6M63CM7X.cjs} +26 -26
  38. package/dist/{chunk-NKV76R65.cjs.map → chunk-6M63CM7X.cjs.map} +1 -1
  39. package/dist/chunk-6N7NMOSV.js +233 -0
  40. package/dist/chunk-6N7NMOSV.js.map +1 -0
  41. package/dist/chunk-6TTCZY3P.cjs +4 -0
  42. package/dist/chunk-6TTCZY3P.cjs.map +1 -0
  43. package/dist/{chunk-TTSSUOEV.cjs → chunk-7C5W744U.cjs} +8 -8
  44. package/dist/{chunk-TTSSUOEV.cjs.map → chunk-7C5W744U.cjs.map} +1 -1
  45. package/dist/chunk-7HUTR6RX.js +178 -0
  46. package/dist/chunk-7HUTR6RX.js.map +1 -0
  47. package/dist/chunk-7IRTD4JT.cjs +61 -0
  48. package/dist/chunk-7IRTD4JT.cjs.map +1 -0
  49. package/dist/{chunk-YU55JD35.js → chunk-7QW6TU4X.js} +3 -3
  50. package/dist/{chunk-YU55JD35.js.map → chunk-7QW6TU4X.js.map} +1 -1
  51. package/dist/chunk-7WJ6MBF5.cjs +47 -0
  52. package/dist/chunk-7WJ6MBF5.cjs.map +1 -0
  53. package/dist/chunk-A4W5CSK7.cjs +216 -0
  54. package/dist/chunk-A4W5CSK7.cjs.map +1 -0
  55. package/dist/chunk-AMYFRY7K.js +3 -0
  56. package/dist/chunk-AMYFRY7K.js.map +1 -0
  57. package/dist/{chunk-X6A27RGO.cjs → chunk-ANMX7YDL.cjs} +2 -2
  58. package/dist/{chunk-X6A27RGO.cjs.map → chunk-ANMX7YDL.cjs.map} +1 -1
  59. package/dist/{chunk-DVOQ3JNO.js → chunk-B4CKCNWD.js} +16 -8
  60. package/dist/chunk-B4CKCNWD.js.map +1 -0
  61. package/dist/chunk-BJ6ABRSQ.cjs +256 -0
  62. package/dist/chunk-BJ6ABRSQ.cjs.map +1 -0
  63. package/dist/chunk-BXRQ6HEP.cjs +4 -0
  64. package/dist/chunk-BXRQ6HEP.cjs.map +1 -0
  65. package/dist/{chunk-TJCX4OML.cjs → chunk-C77FAR3F.cjs} +2 -2
  66. package/dist/{chunk-TJCX4OML.cjs.map → chunk-C77FAR3F.cjs.map} +1 -1
  67. package/dist/chunk-CBBKWRLG.js +213 -0
  68. package/dist/chunk-CBBKWRLG.js.map +1 -0
  69. package/dist/{chunk-BNH4SXJB.js → chunk-CMF7VCGP.js} +5 -5
  70. package/dist/{chunk-BNH4SXJB.js.map → chunk-CMF7VCGP.js.map} +1 -1
  71. package/dist/chunk-CPDNX3LS.cjs +47 -0
  72. package/dist/chunk-CPDNX3LS.cjs.map +1 -0
  73. package/dist/chunk-CVNPNZMX.js +44 -0
  74. package/dist/chunk-CVNPNZMX.js.map +1 -0
  75. package/dist/chunk-DHGCLPFZ.js +91 -0
  76. package/dist/chunk-DHGCLPFZ.js.map +1 -0
  77. package/dist/chunk-DO2YN46R.cjs +201 -0
  78. package/dist/chunk-DO2YN46R.cjs.map +1 -0
  79. package/dist/chunk-DVDT7TX7.js +151 -0
  80. package/dist/chunk-DVDT7TX7.js.map +1 -0
  81. package/dist/{chunk-R5Z7AOVU.cjs → chunk-DZ3JTMKM.cjs} +9 -9
  82. package/dist/{chunk-R5Z7AOVU.cjs.map → chunk-DZ3JTMKM.cjs.map} +1 -1
  83. package/dist/chunk-EACNRR3C.cjs +4 -0
  84. package/dist/chunk-EACNRR3C.cjs.map +1 -0
  85. package/dist/{chunk-E2PBPQGS.js → chunk-EEOGIGIA.js} +2 -2
  86. package/dist/{chunk-E2PBPQGS.js.map → chunk-EEOGIGIA.js.map} +1 -1
  87. package/dist/{chunk-QURJVPRH.cjs → chunk-EMRWTCCN.cjs} +41 -2
  88. package/dist/chunk-EMRWTCCN.cjs.map +1 -0
  89. package/dist/chunk-EPCUPHEO.js +193 -0
  90. package/dist/chunk-EPCUPHEO.js.map +1 -0
  91. package/dist/chunk-EPTP3VKT.js +283 -0
  92. package/dist/chunk-EPTP3VKT.js.map +1 -0
  93. package/dist/{chunk-HIZWOAWY.cjs → chunk-ERACGSDY.cjs} +8 -8
  94. package/dist/{chunk-HIZWOAWY.cjs.map → chunk-ERACGSDY.cjs.map} +1 -1
  95. package/dist/{chunk-VOQJHSXN.cjs → chunk-F2FOG4EG.cjs} +9 -9
  96. package/dist/{chunk-VOQJHSXN.cjs.map → chunk-F2FOG4EG.cjs.map} +1 -1
  97. package/dist/{chunk-GBUVIGD5.js → chunk-F3EWRDIT.js} +99 -3
  98. package/dist/chunk-F3EWRDIT.js.map +1 -0
  99. package/dist/{chunk-ZTMYKAVU.cjs → chunk-FCV7GBNQ.cjs} +24 -23
  100. package/dist/chunk-FCV7GBNQ.cjs.map +1 -0
  101. package/dist/{chunk-GVLNXPJX.js → chunk-FGLIP6YR.js} +4 -4
  102. package/dist/{chunk-GVLNXPJX.js.map → chunk-FGLIP6YR.js.map} +1 -1
  103. package/dist/chunk-FKGFOBC2.js +314 -0
  104. package/dist/chunk-FKGFOBC2.js.map +1 -0
  105. package/dist/chunk-FSGJXCBG.cjs +318 -0
  106. package/dist/chunk-FSGJXCBG.cjs.map +1 -0
  107. package/dist/chunk-FTEZNCRI.js +29 -0
  108. package/dist/chunk-FTEZNCRI.js.map +1 -0
  109. package/dist/{chunk-COM7RNZU.cjs → chunk-FYQZWLAM.cjs} +2 -2
  110. package/dist/{chunk-COM7RNZU.cjs.map → chunk-FYQZWLAM.cjs.map} +1 -1
  111. package/dist/{chunk-YVPC65ZJ.cjs → chunk-GF2BE4FB.cjs} +91 -32
  112. package/dist/chunk-GF2BE4FB.cjs.map +1 -0
  113. package/dist/{chunk-JEIW7BSV.cjs → chunk-GKDHMNUA.cjs} +2 -52
  114. package/dist/chunk-GKDHMNUA.cjs.map +1 -0
  115. package/dist/{chunk-N7C4OEP7.cjs → chunk-GM32IDVL.cjs} +6 -6
  116. package/dist/{chunk-N7C4OEP7.cjs.map → chunk-GM32IDVL.cjs.map} +1 -1
  117. package/dist/chunk-GNOQFTLL.cjs +286 -0
  118. package/dist/chunk-GNOQFTLL.cjs.map +1 -0
  119. package/dist/chunk-GY5SP4ST.js +3 -0
  120. package/dist/chunk-GY5SP4ST.js.map +1 -0
  121. package/dist/chunk-H2Y7HZV5.js +3 -0
  122. package/dist/chunk-H2Y7HZV5.js.map +1 -0
  123. package/dist/chunk-H3QPREIJ.js +195 -0
  124. package/dist/chunk-H3QPREIJ.js.map +1 -0
  125. package/dist/{chunk-QOVJ6Z6R.js → chunk-HDY7YQFX.js} +3 -3
  126. package/dist/{chunk-QOVJ6Z6R.js.map → chunk-HDY7YQFX.js.map} +1 -1
  127. package/dist/chunk-HNFFFFYH.cjs +114 -0
  128. package/dist/chunk-HNFFFFYH.cjs.map +1 -0
  129. package/dist/chunk-HNXLLDPN.js +25 -0
  130. package/dist/chunk-HNXLLDPN.js.map +1 -0
  131. package/dist/chunk-I2MMUFCN.cjs +154 -0
  132. package/dist/chunk-I2MMUFCN.cjs.map +1 -0
  133. package/dist/{chunk-GYXUS65N.cjs → chunk-IGDO62KR.cjs} +5 -5
  134. package/dist/{chunk-GYXUS65N.cjs.map → chunk-IGDO62KR.cjs.map} +1 -1
  135. package/dist/{chunk-JBIGSP2T.js → chunk-ILDLYRTP.js} +5 -4
  136. package/dist/chunk-ILDLYRTP.js.map +1 -0
  137. package/dist/{chunk-HC3NAN55.cjs → chunk-IPL2O2OL.cjs} +19 -19
  138. package/dist/{chunk-HC3NAN55.cjs.map → chunk-IPL2O2OL.cjs.map} +1 -1
  139. package/dist/chunk-ISUIKUX7.cjs +337 -0
  140. package/dist/chunk-ISUIKUX7.cjs.map +1 -0
  141. package/dist/{chunk-N5O47VGS.cjs → chunk-IVGI353O.cjs} +2 -2
  142. package/dist/{chunk-N5O47VGS.cjs.map → chunk-IVGI353O.cjs.map} +1 -1
  143. package/dist/chunk-IWRBJHO3.cjs +51 -0
  144. package/dist/chunk-IWRBJHO3.cjs.map +1 -0
  145. package/dist/{chunk-KRU6IGV7.js → chunk-JUJGWUAN.js} +28 -6
  146. package/dist/chunk-JUJGWUAN.js.map +1 -0
  147. package/dist/{chunk-BUT6MF5K.cjs → chunk-KQ6GLYFZ.cjs} +4 -4
  148. package/dist/{chunk-BUT6MF5K.cjs.map → chunk-KQ6GLYFZ.cjs.map} +1 -1
  149. package/dist/chunk-L6K4PRZK.cjs +4 -0
  150. package/dist/chunk-L6K4PRZK.cjs.map +1 -0
  151. package/dist/{chunk-P7UMS4E6.cjs → chunk-LC7PVBXH.cjs} +16 -8
  152. package/dist/chunk-LC7PVBXH.cjs.map +1 -0
  153. package/dist/chunk-LRRSD7LR.js +248 -0
  154. package/dist/chunk-LRRSD7LR.js.map +1 -0
  155. package/dist/chunk-LSMS6DY7.cjs +331 -0
  156. package/dist/chunk-LSMS6DY7.cjs.map +1 -0
  157. package/dist/chunk-M3VPGJMV.js +283 -0
  158. package/dist/chunk-M3VPGJMV.js.map +1 -0
  159. package/dist/{chunk-2JICT4A2.js → chunk-N54FYWG6.js} +3 -3
  160. package/dist/{chunk-2JICT4A2.js.map → chunk-N54FYWG6.js.map} +1 -1
  161. package/dist/chunk-N5JDL4VE.js +3 -0
  162. package/dist/chunk-N5JDL4VE.js.map +1 -0
  163. package/dist/{chunk-KGKBZN3T.cjs → chunk-NAH65KPK.cjs} +8 -8
  164. package/dist/{chunk-KGKBZN3T.cjs.map → chunk-NAH65KPK.cjs.map} +1 -1
  165. package/dist/chunk-O4WGSOJI.js +261 -0
  166. package/dist/chunk-O4WGSOJI.js.map +1 -0
  167. package/dist/{chunk-SVSHA7XV.js → chunk-O6XDA3SI.js} +31 -33
  168. package/dist/chunk-O6XDA3SI.js.map +1 -0
  169. package/dist/chunk-OIF34LEN.cjs +425 -0
  170. package/dist/chunk-OIF34LEN.cjs.map +1 -0
  171. package/dist/chunk-ORCCJ5VY.cjs +218 -0
  172. package/dist/chunk-ORCCJ5VY.cjs.map +1 -0
  173. package/dist/{chunk-CRS2CQWM.js → chunk-OSTSZDQC.js} +3 -3
  174. package/dist/{chunk-CRS2CQWM.js.map → chunk-OSTSZDQC.js.map} +1 -1
  175. package/dist/{chunk-MLAWXPRY.js → chunk-OZ5CKVQN.js} +41 -2
  176. package/dist/chunk-OZ5CKVQN.js.map +1 -0
  177. package/dist/chunk-P22YCUVM.cjs +4 -0
  178. package/dist/chunk-P22YCUVM.cjs.map +1 -0
  179. package/dist/chunk-P55LNEDH.cjs +306 -0
  180. package/dist/chunk-P55LNEDH.cjs.map +1 -0
  181. package/dist/{chunk-R6KPWIGO.js → chunk-P7D7BYFE.js} +4 -4
  182. package/dist/{chunk-R6KPWIGO.js.map → chunk-P7D7BYFE.js.map} +1 -1
  183. package/dist/{chunk-GU5OS7JJ.cjs → chunk-PYI2IWNX.cjs} +4 -4
  184. package/dist/{chunk-GU5OS7JJ.cjs.map → chunk-PYI2IWNX.cjs.map} +1 -1
  185. package/dist/chunk-Q3YVLO52.cjs +174 -0
  186. package/dist/chunk-Q3YVLO52.cjs.map +1 -0
  187. package/dist/{chunk-K34DXMLZ.js → chunk-QJ2L5RU6.js} +7 -7
  188. package/dist/{chunk-K34DXMLZ.js.map → chunk-QJ2L5RU6.js.map} +1 -1
  189. package/dist/{chunk-X4LBUPJO.cjs → chunk-QX6AAVDE.cjs} +31 -33
  190. package/dist/chunk-QX6AAVDE.cjs.map +1 -0
  191. package/dist/{chunk-LFPJ3OUM.cjs → chunk-RIUQP2QS.cjs} +5 -5
  192. package/dist/{chunk-LFPJ3OUM.cjs.map → chunk-RIUQP2QS.cjs.map} +1 -1
  193. package/dist/{chunk-JHG3ELS2.js → chunk-RPFATYUI.js} +2 -2
  194. package/dist/{chunk-JHG3ELS2.js.map → chunk-RPFATYUI.js.map} +1 -1
  195. package/dist/{chunk-FZURBQJ2.js → chunk-RSJGTWLM.js} +3 -3
  196. package/dist/{chunk-FZURBQJ2.js.map → chunk-RSJGTWLM.js.map} +1 -1
  197. package/dist/{chunk-XBTKZCZF.js → chunk-RZSSQ7AT.js} +3 -3
  198. package/dist/{chunk-XBTKZCZF.js.map → chunk-RZSSQ7AT.js.map} +1 -1
  199. package/dist/{chunk-VROIMIHB.cjs → chunk-SHBCUXFS.cjs} +28 -6
  200. package/dist/chunk-SHBCUXFS.cjs.map +1 -0
  201. package/dist/{chunk-JELTRRR5.cjs → chunk-SW2E7XKY.cjs} +9 -9
  202. package/dist/{chunk-JELTRRR5.cjs.map → chunk-SW2E7XKY.cjs.map} +1 -1
  203. package/dist/chunk-SZSRGUVO.js +402 -0
  204. package/dist/chunk-SZSRGUVO.js.map +1 -0
  205. package/dist/{chunk-HZ4MBUC3.js → chunk-TI3TQQ7F.js} +4 -53
  206. package/dist/chunk-TI3TQQ7F.js.map +1 -0
  207. package/dist/{chunk-H2IAMSHK.js → chunk-TVEJKKIM.js} +3 -3
  208. package/dist/{chunk-H2IAMSHK.js.map → chunk-TVEJKKIM.js.map} +1 -1
  209. package/dist/{chunk-LHBWRMNC.cjs → chunk-TVU4KB27.cjs} +130 -12
  210. package/dist/chunk-TVU4KB27.cjs.map +1 -0
  211. package/dist/{chunk-ZYL4SNOR.js → chunk-UJDWFDKE.js} +3 -3
  212. package/dist/{chunk-ZYL4SNOR.js.map → chunk-UJDWFDKE.js.map} +1 -1
  213. package/dist/{chunk-4HC2IBOX.js → chunk-UNFDIBKJ.js} +3 -3
  214. package/dist/{chunk-4HC2IBOX.js.map → chunk-UNFDIBKJ.js.map} +1 -1
  215. package/dist/{chunk-IYWG72DM.js → chunk-VEE46VTX.js} +4 -4
  216. package/dist/{chunk-IYWG72DM.js.map → chunk-VEE46VTX.js.map} +1 -1
  217. package/dist/{chunk-Y4E2WRUR.cjs → chunk-VFFV7EMT.cjs} +6 -6
  218. package/dist/{chunk-Y4E2WRUR.cjs.map → chunk-VFFV7EMT.cjs.map} +1 -1
  219. package/dist/chunk-VNEAQCY2.js +308 -0
  220. package/dist/chunk-VNEAQCY2.js.map +1 -0
  221. package/dist/chunk-VOYLX32A.cjs +271 -0
  222. package/dist/chunk-VOYLX32A.cjs.map +1 -0
  223. package/dist/{chunk-7ZV67VZE.js → chunk-VSRO4PAI.js} +21 -3
  224. package/dist/chunk-VSRO4PAI.js.map +1 -0
  225. package/dist/{chunk-L6MDULYB.js → chunk-VU3ZMJBN.js} +2 -2
  226. package/dist/{chunk-L6MDULYB.js.map → chunk-VU3ZMJBN.js.map} +1 -1
  227. package/dist/{chunk-35Y4ILCU.cjs → chunk-VXW7D5LR.cjs} +21 -3
  228. package/dist/chunk-VXW7D5LR.cjs.map +1 -0
  229. package/dist/{chunk-7YO7DNUV.js → chunk-WFBUBT54.js} +2 -2
  230. package/dist/{chunk-7YO7DNUV.js.map → chunk-WFBUBT54.js.map} +1 -1
  231. package/dist/chunk-WQHBMZSC.js +295 -0
  232. package/dist/chunk-WQHBMZSC.js.map +1 -0
  233. package/dist/chunk-X5JOEZVR.js +525 -0
  234. package/dist/chunk-X5JOEZVR.js.map +1 -0
  235. package/dist/chunk-XBAAHOCP.js +3 -0
  236. package/dist/chunk-XBAAHOCP.js.map +1 -0
  237. package/dist/chunk-XNPDZANN.cjs +238 -0
  238. package/dist/chunk-XNPDZANN.cjs.map +1 -0
  239. package/dist/chunk-XXA4NZUC.js +3 -0
  240. package/dist/chunk-XXA4NZUC.js.map +1 -0
  241. package/dist/chunk-Y424YL55.js +59 -0
  242. package/dist/chunk-Y424YL55.js.map +1 -0
  243. package/dist/chunk-YGS2TRMP.js +38 -0
  244. package/dist/chunk-YGS2TRMP.js.map +1 -0
  245. package/dist/chunk-YUMOM3KE.js +167 -0
  246. package/dist/chunk-YUMOM3KE.js.map +1 -0
  247. package/dist/{chunk-3KPDQG5O.cjs → chunk-ZG6FXMDX.cjs} +5 -5
  248. package/dist/{chunk-3KPDQG5O.cjs.map → chunk-ZG6FXMDX.cjs.map} +1 -1
  249. package/dist/chunk-ZNUMOJOI.cjs +4 -0
  250. package/dist/chunk-ZNUMOJOI.cjs.map +1 -0
  251. package/dist/components/Accordion/index.cjs +2 -2
  252. package/dist/components/Accordion/index.d.cts +6 -0
  253. package/dist/components/Accordion/index.d.ts +6 -0
  254. package/dist/components/Accordion/index.js +1 -1
  255. package/dist/components/ActionPlan/index.cjs +34 -0
  256. package/dist/components/ActionPlan/index.cjs.map +1 -0
  257. package/dist/components/ActionPlan/index.d.cts +65 -0
  258. package/dist/components/ActionPlan/index.d.ts +65 -0
  259. package/dist/components/ActionPlan/index.js +21 -0
  260. package/dist/components/ActionPlan/index.js.map +1 -0
  261. package/dist/components/ActivityFeed/index.cjs +31 -0
  262. package/dist/components/ActivityFeed/index.cjs.map +1 -0
  263. package/dist/components/ActivityFeed/index.d.cts +99 -0
  264. package/dist/components/ActivityFeed/index.d.ts +99 -0
  265. package/dist/components/ActivityFeed/index.js +18 -0
  266. package/dist/components/ActivityFeed/index.js.map +1 -0
  267. package/dist/components/AlertDialog/index.cjs +16 -3
  268. package/dist/components/AlertDialog/index.d.cts +66 -13
  269. package/dist/components/AlertDialog/index.d.ts +66 -13
  270. package/dist/components/AlertDialog/index.js +3 -2
  271. package/dist/components/AssociationList/index.cjs +29 -0
  272. package/dist/components/AssociationList/index.cjs.map +1 -0
  273. package/dist/components/AssociationList/index.d.cts +50 -0
  274. package/dist/components/AssociationList/index.d.ts +50 -0
  275. package/dist/components/AssociationList/index.js +16 -0
  276. package/dist/components/AssociationList/index.js.map +1 -0
  277. package/dist/components/Avatar/index.cjs +9 -7
  278. package/dist/components/Avatar/index.d.cts +45 -14
  279. package/dist/components/Avatar/index.d.ts +45 -14
  280. package/dist/components/Avatar/index.js +3 -1
  281. package/dist/components/AvatarGroup/index.cjs +20 -0
  282. package/dist/components/AvatarGroup/index.cjs.map +1 -0
  283. package/dist/components/AvatarGroup/index.d.cts +57 -0
  284. package/dist/components/AvatarGroup/index.d.ts +57 -0
  285. package/dist/components/AvatarGroup/index.js +7 -0
  286. package/dist/components/AvatarGroup/index.js.map +1 -0
  287. package/dist/components/Button/index.cjs +3 -2
  288. package/dist/components/Button/index.js +2 -1
  289. package/dist/components/CalendarHeatmap/index.cjs +18 -0
  290. package/dist/components/CalendarHeatmap/index.cjs.map +1 -0
  291. package/dist/components/CalendarHeatmap/index.d.cts +47 -0
  292. package/dist/components/CalendarHeatmap/index.d.ts +47 -0
  293. package/dist/components/CalendarHeatmap/index.js +5 -0
  294. package/dist/components/CalendarHeatmap/index.js.map +1 -0
  295. package/dist/components/CalendarView/index.cjs +5 -4
  296. package/dist/components/CalendarView/index.js +3 -2
  297. package/dist/components/ClampedText/index.cjs +3 -2
  298. package/dist/components/ClampedText/index.js +2 -1
  299. package/dist/components/CollabStatus/index.cjs +6 -4
  300. package/dist/components/CollabStatus/index.d.cts +11 -0
  301. package/dist/components/CollabStatus/index.d.ts +11 -0
  302. package/dist/components/CollabStatus/index.js +3 -1
  303. package/dist/components/Collapsible/index.cjs +4 -4
  304. package/dist/components/Collapsible/index.d.cts +6 -0
  305. package/dist/components/Collapsible/index.d.ts +6 -0
  306. package/dist/components/Collapsible/index.js +1 -1
  307. package/dist/components/CompletenessMeter/index.cjs +22 -0
  308. package/dist/components/CompletenessMeter/index.cjs.map +1 -0
  309. package/dist/components/CompletenessMeter/index.d.cts +52 -0
  310. package/dist/components/CompletenessMeter/index.d.ts +52 -0
  311. package/dist/components/CompletenessMeter/index.js +5 -0
  312. package/dist/components/CompletenessMeter/index.js.map +1 -0
  313. package/dist/components/CustomizableDashboard/index.cjs +10 -9
  314. package/dist/components/CustomizableDashboard/index.js +3 -2
  315. package/dist/components/DateInput/index.d.cts +36 -4
  316. package/dist/components/DateInput/index.d.ts +36 -4
  317. package/dist/components/Dropdown/index.cjs +9 -8
  318. package/dist/components/Dropdown/index.js +2 -1
  319. package/dist/components/FieldHistory/index.cjs +34 -0
  320. package/dist/components/FieldHistory/index.cjs.map +1 -0
  321. package/dist/components/FieldHistory/index.d.cts +66 -0
  322. package/dist/components/FieldHistory/index.d.ts +66 -0
  323. package/dist/components/FieldHistory/index.js +21 -0
  324. package/dist/components/FieldHistory/index.js.map +1 -0
  325. package/dist/components/FloatingWindow/index.cjs +5 -4
  326. package/dist/components/FloatingWindow/index.js +3 -2
  327. package/dist/components/InlineEdit/index.cjs +20 -0
  328. package/dist/components/InlineEdit/index.cjs.map +1 -0
  329. package/dist/components/InlineEdit/index.d.cts +56 -0
  330. package/dist/components/InlineEdit/index.d.ts +56 -0
  331. package/dist/components/InlineEdit/index.js +7 -0
  332. package/dist/components/InlineEdit/index.js.map +1 -0
  333. package/dist/components/ListView/index.cjs +5 -4
  334. package/dist/components/ListView/index.js +3 -2
  335. package/dist/components/LogoUploader/index.cjs +18 -0
  336. package/dist/components/LogoUploader/index.cjs.map +1 -0
  337. package/dist/components/LogoUploader/index.d.cts +49 -0
  338. package/dist/components/LogoUploader/index.d.ts +49 -0
  339. package/dist/components/LogoUploader/index.js +5 -0
  340. package/dist/components/LogoUploader/index.js.map +1 -0
  341. package/dist/components/Markdown/index.cjs +17 -16
  342. package/dist/components/Markdown/index.js +8 -7
  343. package/dist/components/MediaEditor/index.cjs +9 -8
  344. package/dist/components/MediaEditor/index.js +4 -3
  345. package/dist/components/MediaFeed/index.cjs +8 -5
  346. package/dist/components/MediaFeed/index.js +7 -4
  347. package/dist/components/MediaPlayer/index.cjs +6 -5
  348. package/dist/components/MediaPlayer/index.js +3 -2
  349. package/dist/components/MegaMenu/index.cjs +2 -1
  350. package/dist/components/MegaMenu/index.js +2 -1
  351. package/dist/components/PhiMask/index.cjs +18 -0
  352. package/dist/components/PhiMask/index.cjs.map +1 -0
  353. package/dist/components/PhiMask/index.d.cts +45 -0
  354. package/dist/components/PhiMask/index.d.ts +45 -0
  355. package/dist/components/PhiMask/index.js +5 -0
  356. package/dist/components/PhiMask/index.js.map +1 -0
  357. package/dist/components/PhoneInput/index.d.cts +3 -36
  358. package/dist/components/PhoneInput/index.d.ts +3 -36
  359. package/dist/components/PropertyList/index.cjs +25 -0
  360. package/dist/components/PropertyList/index.cjs.map +1 -0
  361. package/dist/components/PropertyList/index.d.cts +71 -0
  362. package/dist/components/PropertyList/index.d.ts +71 -0
  363. package/dist/components/PropertyList/index.js +12 -0
  364. package/dist/components/PropertyList/index.js.map +1 -0
  365. package/dist/components/RadialExplorer/index.cjs +2 -1
  366. package/dist/components/RadialExplorer/index.js +2 -1
  367. package/dist/components/Rating/index.cjs +28 -0
  368. package/dist/components/Rating/index.cjs.map +1 -0
  369. package/dist/components/Rating/index.d.cts +85 -0
  370. package/dist/components/Rating/index.d.ts +85 -0
  371. package/dist/components/Rating/index.js +7 -0
  372. package/dist/components/Rating/index.js.map +1 -0
  373. package/dist/components/RecordHeader/index.cjs +29 -0
  374. package/dist/components/RecordHeader/index.cjs.map +1 -0
  375. package/dist/components/RecordHeader/index.d.cts +86 -0
  376. package/dist/components/RecordHeader/index.d.ts +86 -0
  377. package/dist/components/RecordHeader/index.js +16 -0
  378. package/dist/components/RecordHeader/index.js.map +1 -0
  379. package/dist/components/RecordLayout/index.cjs +21 -0
  380. package/dist/components/RecordLayout/index.cjs.map +1 -0
  381. package/dist/components/RecordLayout/index.d.cts +40 -0
  382. package/dist/components/RecordLayout/index.d.ts +40 -0
  383. package/dist/components/RecordLayout/index.js +8 -0
  384. package/dist/components/RecordLayout/index.js.map +1 -0
  385. package/dist/components/RichTextEditor/index.cjs +8 -6
  386. package/dist/components/RichTextEditor/index.js +5 -3
  387. package/dist/components/SectionSpyNav/index.cjs +2 -1
  388. package/dist/components/SectionSpyNav/index.js +2 -1
  389. package/dist/components/SuperChat/index.cjs +22 -18
  390. package/dist/components/SuperChat/index.cjs.map +1 -1
  391. package/dist/components/SuperChat/index.js +10 -6
  392. package/dist/components/SuperChat/index.js.map +1 -1
  393. package/dist/components/SuperChat/plugins/index.cjs +5 -4
  394. package/dist/components/SuperChat/plugins/index.cjs.map +1 -1
  395. package/dist/components/SuperChat/plugins/index.js +4 -3
  396. package/dist/components/SuperChat/plugins/index.js.map +1 -1
  397. package/dist/components/Tabs/index.cjs +9 -7
  398. package/dist/components/Tabs/index.d.cts +12 -1
  399. package/dist/components/Tabs/index.d.ts +12 -1
  400. package/dist/components/Tabs/index.js +3 -1
  401. package/dist/components/TagEditor/index.cjs +20 -0
  402. package/dist/components/TagEditor/index.cjs.map +1 -0
  403. package/dist/components/TagEditor/index.d.cts +46 -0
  404. package/dist/components/TagEditor/index.d.ts +46 -0
  405. package/dist/components/TagEditor/index.js +7 -0
  406. package/dist/components/TagEditor/index.js.map +1 -0
  407. package/dist/components/UserPicker/index.cjs +24 -0
  408. package/dist/components/UserPicker/index.cjs.map +1 -0
  409. package/dist/components/UserPicker/index.d.cts +60 -0
  410. package/dist/components/UserPicker/index.d.ts +60 -0
  411. package/dist/components/UserPicker/index.js +11 -0
  412. package/dist/components/UserPicker/index.js.map +1 -0
  413. package/dist/components/ViewSet/index.cjs +6 -5
  414. package/dist/components/ViewSet/index.d.cts +2 -1
  415. package/dist/components/ViewSet/index.d.ts +2 -1
  416. package/dist/components/ViewSet/index.js +5 -4
  417. package/dist/components/ViewSwitcher/index.d.cts +39 -4
  418. package/dist/components/ViewSwitcher/index.d.ts +39 -4
  419. package/dist/datavis.cjs +3 -2
  420. package/dist/datavis.cjs.map +1 -1
  421. package/dist/datavis.js +2 -1
  422. package/dist/datavis.js.map +1 -1
  423. package/dist/esheet.cjs +8 -6
  424. package/dist/esheet.cjs.map +1 -1
  425. package/dist/esheet.js +5 -3
  426. package/dist/esheet.js.map +1 -1
  427. package/dist/hooks/index.cjs +53 -27
  428. package/dist/hooks/index.d.cts +91 -6
  429. package/dist/hooks/index.d.ts +91 -6
  430. package/dist/hooks/index.js +5 -3
  431. package/dist/index.cjs +1258 -714
  432. package/dist/index.cjs.map +1 -1
  433. package/dist/index.d.cts +1253 -168
  434. package/dist/index.d.ts +1253 -168
  435. package/dist/index.js +536 -168
  436. package/dist/index.js.map +1 -1
  437. package/dist/org-chart.cjs +1302 -0
  438. package/dist/org-chart.cjs.map +1 -0
  439. package/dist/org-chart.d.cts +164 -0
  440. package/dist/org-chart.d.ts +164 -0
  441. package/dist/org-chart.js +1277 -0
  442. package/dist/org-chart.js.map +1 -0
  443. package/dist/styles.css +1 -1
  444. package/dist/tailwind-preset.cjs +4 -4
  445. package/dist/tailwind-preset.js +1 -1
  446. package/dist/{index-DoYYWsNc.d.cts → types-CDeBNZiE.d.cts} +1 -36
  447. package/dist/{index-DoYYWsNc.d.ts → types-CDeBNZiE.d.ts} +1 -36
  448. package/package.json +22 -2
  449. package/dist/CsvBlock-FX5YNGNE.cjs +0 -17
  450. package/dist/CsvBlock-VLMG7GUO.js +0 -8
  451. package/dist/HtmlPreviewBlock-5JE7L3GR.js +0 -8
  452. package/dist/HtmlPreviewBlock-UO37JQ3K.cjs +0 -17
  453. package/dist/MermaidBlock-3XHFBAMV.js +0 -8
  454. package/dist/MermaidBlock-RZ75RPZA.cjs +0 -17
  455. package/dist/SurveyBlock-MUVJ3JUI.js +0 -8
  456. package/dist/SurveyBlock-VH47YXZC.cjs +0 -17
  457. package/dist/chunk-35Y4ILCU.cjs.map +0 -1
  458. package/dist/chunk-6N6LIAUJ.cjs +0 -80
  459. package/dist/chunk-6N6LIAUJ.cjs.map +0 -1
  460. package/dist/chunk-7ZV67VZE.js.map +0 -1
  461. package/dist/chunk-7ZVTLTJF.js +0 -109
  462. package/dist/chunk-7ZVTLTJF.js.map +0 -1
  463. package/dist/chunk-DVOQ3JNO.js.map +0 -1
  464. package/dist/chunk-GBUVIGD5.js.map +0 -1
  465. package/dist/chunk-HZ4MBUC3.js.map +0 -1
  466. package/dist/chunk-JBIGSP2T.js.map +0 -1
  467. package/dist/chunk-JEIW7BSV.cjs.map +0 -1
  468. package/dist/chunk-KRU6IGV7.js.map +0 -1
  469. package/dist/chunk-LHBWRMNC.cjs.map +0 -1
  470. package/dist/chunk-MLAWXPRY.js.map +0 -1
  471. package/dist/chunk-P7UMS4E6.cjs.map +0 -1
  472. package/dist/chunk-QURJVPRH.cjs.map +0 -1
  473. package/dist/chunk-SVSHA7XV.js.map +0 -1
  474. package/dist/chunk-UBSH27C2.js +0 -78
  475. package/dist/chunk-UBSH27C2.js.map +0 -1
  476. package/dist/chunk-VROIMIHB.cjs.map +0 -1
  477. package/dist/chunk-X4LBUPJO.cjs.map +0 -1
  478. package/dist/chunk-YVPC65ZJ.cjs.map +0 -1
  479. package/dist/chunk-ZTMYKAVU.cjs.map +0 -1
@@ -0,0 +1,1277 @@
1
+ import './chunk-H2Y7HZV5.js';
2
+ import './chunk-DVDT7TX7.js';
3
+ import { Avatar } from './chunk-TI3TQQ7F.js';
4
+ import { accentClasses } from './chunk-3YBS4WUQ.js';
5
+ import { Spinner } from './chunk-UA7E7PDS.js';
6
+ import './chunk-N5JDL4VE.js';
7
+ import { Button } from './chunk-WFBUBT54.js';
8
+ import './chunk-GVM6DTR5.js';
9
+ import { cn } from './chunk-TQONQSJO.js';
10
+ import './chunk-PX6F3LHL.js';
11
+ import * as React3 from 'react';
12
+ import { Search, Network, List, X, ExternalLink, ChevronDown, ChevronRight, UnfoldVertical, FoldVertical, Scan, Map as Map$1, Minimize, Maximize, Building2 } from 'lucide-react';
13
+ import { ReactFlowProvider, useReactFlow, ReactFlow, Background, BackgroundVariant, Panel, MiniMap, Position, Handle } from '@xyflow/react';
14
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
15
+
16
+ // src/components/OrgChart/layout.ts
17
+ var ORG_CHART_LAYOUT_OPTIONS = {
18
+ "elk.algorithm": "layered",
19
+ "elk.layered.considerModelOrder.strategy": "NODES_AND_EDGES",
20
+ "elk.layered.nodePlacement.strategy": "BRANDES_KOEPF",
21
+ "elk.layered.spacing.nodeNodeBetweenLayers": "64",
22
+ "elk.spacing.nodeNode": "28",
23
+ "elk.spacing.componentComponent": "64",
24
+ "elk.edgeRouting": "ORTHOGONAL"
25
+ };
26
+ var elkPromise = null;
27
+ function getElk() {
28
+ elkPromise ??= import('elkjs/lib/elk.bundled.js').then(
29
+ (m) => new m.default()
30
+ );
31
+ return elkPromise;
32
+ }
33
+ async function layoutOrgChart(req) {
34
+ const graph = {
35
+ id: "org-chart-root",
36
+ layoutOptions: {
37
+ ...ORG_CHART_LAYOUT_OPTIONS,
38
+ "elk.direction": req.direction
39
+ },
40
+ children: req.ids.map((id) => ({
41
+ id,
42
+ width: req.width,
43
+ height: req.height
44
+ })),
45
+ edges: req.edges.map((e) => ({
46
+ id: JSON.stringify([e.source, e.target]),
47
+ sources: [e.source],
48
+ targets: [e.target]
49
+ }))
50
+ };
51
+ try {
52
+ const elk = await getElk();
53
+ const out = await elk.layout(graph);
54
+ return new Map(
55
+ (out.children ?? []).map((c) => [c.id, { x: c.x ?? 0, y: c.y ?? 0 }])
56
+ );
57
+ } catch {
58
+ return gridLayout(req);
59
+ }
60
+ }
61
+ function gridLayout(req) {
62
+ const parent = new Map(req.edges.map((e) => [e.target, e.source]));
63
+ const perDepth = /* @__PURE__ */ new Map();
64
+ const out = /* @__PURE__ */ new Map();
65
+ for (const id of req.ids) {
66
+ let depth = 0;
67
+ for (let p = parent.get(id); p != null; p = parent.get(p)) depth++;
68
+ const slot = perDepth.get(depth) ?? 0;
69
+ perDepth.set(depth, slot + 1);
70
+ const along = slot * (req.direction === "DOWN" ? req.width + 28 : req.height + 28);
71
+ const across = depth * (req.direction === "DOWN" ? req.height + 64 : req.width + 64);
72
+ out.set(
73
+ id,
74
+ req.direction === "DOWN" ? { x: along, y: across } : { x: across, y: along }
75
+ );
76
+ }
77
+ return out;
78
+ }
79
+
80
+ // src/components/OrgChart/shared.ts
81
+ var plural = (n, one, many) => `${n} ${n === 1 ? one : many}`;
82
+ var defaultOrgChartLabels = {
83
+ chart: "Organization chart",
84
+ tree: "Organization",
85
+ toolbar: "Organization chart tools",
86
+ search: "Search",
87
+ searchPlaceholder: "Search name, title or group",
88
+ results: (n) => n === 0 ? "No matches" : plural(n, "match", "matches"),
89
+ groupFilter: "Filter by group",
90
+ allGroups: "All groups",
91
+ expandAll: "Expand all",
92
+ collapseAll: "Collapse all",
93
+ fitView: "Fit to view",
94
+ minimap: "Minimap",
95
+ fullscreen: "Full screen",
96
+ viewToggle: "View",
97
+ chartView: "Chart",
98
+ listView: "List",
99
+ canvasHint: "Use the card buttons to show details or expand reports. Switch to the list view to browse with arrow keys.",
100
+ expand: (name, n) => `Expand ${name}, ${plural(n, "report", "reports")}`,
101
+ collapse: (name) => `Collapse ${name}`,
102
+ directReports: (n) => plural(n, "direct report", "direct reports"),
103
+ orgSize: (n) => `${n} in organization`,
104
+ reportsTo: (name) => `Reports to ${name}`,
105
+ highlighted: "Current",
106
+ open: "Open",
107
+ close: "Close details",
108
+ loading: "Loading organization",
109
+ empty: "No one to show",
110
+ error: "Could not load the organization",
111
+ retry: "Try again"
112
+ };
113
+ var ORG_CHART_GROUP_ACCENTS = [
114
+ "primary",
115
+ "info",
116
+ "success",
117
+ "warning",
118
+ "neutral"
119
+ ];
120
+ var accentClassesFor = (accent) => accent ? accentClasses[accent] : void 0;
121
+ var ORG_CHART_NODE_SIZE = {
122
+ person: { width: 248, height: 92 },
123
+ location: { width: 248, height: 76 }
124
+ };
125
+ function prefersReducedMotion() {
126
+ return typeof window !== "undefined" && !!window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
127
+ }
128
+ function GroupPill({
129
+ group,
130
+ accent
131
+ }) {
132
+ const a = accentClassesFor(accent);
133
+ return /* @__PURE__ */ jsxs(
134
+ "span",
135
+ {
136
+ className: cn(
137
+ "text-foreground inline-flex max-w-full items-center gap-1.5 rounded-full px-2 py-0.5 text-[11px] font-medium",
138
+ a?.tint ?? "bg-muted"
139
+ ),
140
+ children: [
141
+ /* @__PURE__ */ jsx(
142
+ "span",
143
+ {
144
+ "aria-hidden": "true",
145
+ className: cn("size-1.5 shrink-0 rounded-full", a?.marker)
146
+ }
147
+ ),
148
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: group })
149
+ ]
150
+ }
151
+ );
152
+ }
153
+ function NodeBody({
154
+ node,
155
+ variant,
156
+ accent
157
+ }) {
158
+ const secondary = variant === "person" ? node.title : node.subtitle;
159
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
160
+ variant === "person" ? /* @__PURE__ */ jsx(Avatar, { src: node.avatarUrl, name: node.name, alt: "", size: "md" }) : /* @__PURE__ */ jsx(
161
+ "span",
162
+ {
163
+ "aria-hidden": "true",
164
+ className: "bg-primary-500/10 text-primary-700 dark:text-primary-300 flex size-10 shrink-0 items-center justify-center rounded-md",
165
+ children: /* @__PURE__ */ jsx(Building2, { className: "size-5" })
166
+ }
167
+ ),
168
+ /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
169
+ /* @__PURE__ */ jsx("span", { className: "text-foreground truncate text-sm font-semibold", children: node.name }),
170
+ secondary && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground truncate text-xs", children: secondary }),
171
+ node.group && /* @__PURE__ */ jsx("span", { className: "mt-0.5 flex", children: /* @__PURE__ */ jsx(GroupPill, { group: node.group, accent }) })
172
+ ] })
173
+ ] });
174
+ }
175
+ var CanvasContext = React3.createContext(null);
176
+ var hiddenHandle = { opacity: 0, pointerEvents: "none" };
177
+ function OrgFlowNodeView({ data }) {
178
+ const c = React3.useContext(CanvasContext);
179
+ const { node, ctx, focused } = data;
180
+ const accent = accentClassesFor(ctx.accent);
181
+ const start = c.horizontal ? c.rtl ? Position.Right : Position.Left : Position.Top;
182
+ const end = c.horizontal ? c.rtl ? Position.Left : Position.Right : Position.Bottom;
183
+ const Chevron = ctx.expanded ? ChevronDown : ChevronRight;
184
+ return /* @__PURE__ */ jsxs(
185
+ "div",
186
+ {
187
+ "data-slot": "org-chart-node",
188
+ "data-highlighted": ctx.highlighted || void 0,
189
+ "data-matched": ctx.matched || void 0,
190
+ style: { pointerEvents: "auto" },
191
+ className: cn(
192
+ "bg-card text-foreground relative h-full w-full rounded-lg border border-s-4 shadow-sm",
193
+ "motion-safe:transition-[opacity,box-shadow]",
194
+ accent?.border ?? "border-border",
195
+ (ctx.highlighted || focused) && "ring-primary-500 ring-offset-background ring-2 ring-offset-2",
196
+ ctx.matched && "ring-ring ring-2",
197
+ ctx.dimmed && "opacity-40",
198
+ c.classNames?.node
199
+ ),
200
+ children: [
201
+ /* @__PURE__ */ jsx(
202
+ Handle,
203
+ {
204
+ type: "target",
205
+ position: start,
206
+ isConnectable: false,
207
+ style: hiddenHandle
208
+ }
209
+ ),
210
+ /* @__PURE__ */ jsx(
211
+ "button",
212
+ {
213
+ type: "button",
214
+ "aria-haspopup": "dialog",
215
+ onClick: () => c.onSelect(node.id),
216
+ className: "nodrag nopan focus-visible:ring-ring flex h-full w-full items-center gap-3 rounded-md px-3 text-start focus-visible:ring-2 focus-visible:outline-none",
217
+ children: c.renderNode ? c.renderNode(node, ctx) : /* @__PURE__ */ jsx(NodeBody, { node, variant: ctx.variant, accent: ctx.accent })
218
+ }
219
+ ),
220
+ (ctx.highlighted || c.renderBadges) && /* @__PURE__ */ jsxs("span", { className: "absolute end-2 -top-2.5 flex gap-1", children: [
221
+ ctx.highlighted && /* @__PURE__ */ jsx("span", { className: "bg-primary-600 rounded-full px-1.5 py-0.5 text-[10px] font-bold text-white uppercase shadow-sm", children: c.labels.highlighted }),
222
+ c.renderBadges?.(node)
223
+ ] }),
224
+ ctx.directReports > 0 && /* @__PURE__ */ jsxs(
225
+ "button",
226
+ {
227
+ type: "button",
228
+ "aria-expanded": ctx.expanded,
229
+ "aria-label": ctx.expanded ? c.labels.collapse(node.name) : c.labels.expand(node.name, ctx.directReports),
230
+ onClick: () => c.onToggle(node.id),
231
+ className: cn(
232
+ "nodrag nopan absolute z-10 flex h-6 min-w-6 items-center justify-center gap-0.5 rounded-full border px-1.5 text-[11px] font-semibold shadow-sm",
233
+ "focus-visible:ring-ring focus-visible:ring-2 focus-visible:outline-none",
234
+ c.horizontal ? "-end-3 top-1/2 -translate-y-1/2" : "-bottom-3 left-1/2 -translate-x-1/2",
235
+ ctx.expanded ? "border-primary-600 bg-primary-600 text-white" : "border-border bg-card text-foreground hover:border-primary-500"
236
+ ),
237
+ children: [
238
+ /* @__PURE__ */ jsx(Chevron, { "aria-hidden": "true", className: "size-3 rtl:-scale-x-100" }),
239
+ ctx.directReports
240
+ ]
241
+ }
242
+ ),
243
+ /* @__PURE__ */ jsx(
244
+ Handle,
245
+ {
246
+ type: "source",
247
+ position: end,
248
+ isConnectable: false,
249
+ style: hiddenHandle
250
+ }
251
+ )
252
+ ]
253
+ }
254
+ );
255
+ }
256
+ var nodeTypes = { org: OrgFlowNodeView };
257
+ var flowStyle = {
258
+ "--xy-background-color": "transparent",
259
+ "--xy-background-pattern-color": "var(--mieweb-border)",
260
+ "--xy-edge-stroke": "var(--mieweb-muted-foreground)",
261
+ "--xy-edge-stroke-width": "1.25",
262
+ "--xy-node-background-color": "transparent",
263
+ "--xy-node-border": "none",
264
+ "--xy-node-border-radius": "0.5rem",
265
+ "--xy-node-boxshadow-hover": "none",
266
+ "--xy-node-boxshadow-selected": "none",
267
+ "--xy-node-color": "inherit",
268
+ "--xy-minimap-background-color": "var(--mieweb-card)",
269
+ "--xy-minimap-mask-background-color": "color-mix(in srgb, var(--mieweb-muted) 70%, transparent)",
270
+ "--xy-minimap-node-background-color": "var(--mieweb-muted-foreground)",
271
+ "--xy-attribution-background-color": "transparent"
272
+ };
273
+ function OrgChartCanvas(props) {
274
+ return /* @__PURE__ */ jsx(ReactFlowProvider, { children: /* @__PURE__ */ jsx(CanvasInner, { ...props }) });
275
+ }
276
+ function CanvasInner({
277
+ forest,
278
+ visible,
279
+ nodeContext,
280
+ focusId,
281
+ direction,
282
+ variant,
283
+ showMinimap,
284
+ fitTargets,
285
+ fitRequest,
286
+ labels,
287
+ classNames,
288
+ renderNode,
289
+ renderBadges,
290
+ onToggle,
291
+ onSelect,
292
+ children
293
+ }) {
294
+ const { fitView } = useReactFlow();
295
+ const wrapRef = React3.useRef(null);
296
+ const [rtl, setRtl] = React3.useState(false);
297
+ const [positions, setPositions] = React3.useState(null);
298
+ const size = ORG_CHART_NODE_SIZE[variant];
299
+ const horizontal = direction === "RIGHT";
300
+ React3.useLayoutEffect(() => {
301
+ const el = wrapRef.current;
302
+ if (el) setRtl(getComputedStyle(el).direction === "rtl");
303
+ }, []);
304
+ const edgeList = React3.useMemo(() => {
305
+ const out = [];
306
+ for (const v of visible) {
307
+ const p = forest.parentOf.get(v.node.id);
308
+ if (p != null) out.push({ source: p, target: v.node.id });
309
+ }
310
+ return out;
311
+ }, [visible, forest]);
312
+ const layoutKey = JSON.stringify([
313
+ direction,
314
+ variant,
315
+ visible.map((v) => v.node.id),
316
+ edgeList.map((e) => [e.source, e.target])
317
+ ]);
318
+ React3.useEffect(() => {
319
+ let cancelled = false;
320
+ void layoutOrgChart({
321
+ ids: visible.map((v) => v.node.id),
322
+ edges: edgeList,
323
+ direction,
324
+ ...size
325
+ }).then((p) => {
326
+ if (!cancelled) setPositions(p);
327
+ });
328
+ return () => {
329
+ cancelled = true;
330
+ };
331
+ }, [layoutKey]);
332
+ const flowNodes = React3.useMemo(() => {
333
+ if (!positions) return [];
334
+ const out = [];
335
+ for (const v of visible) {
336
+ const pos = positions.get(v.node.id);
337
+ if (!pos) continue;
338
+ out.push({
339
+ id: v.node.id,
340
+ type: "org",
341
+ position: { x: rtl ? -pos.x - size.width : pos.x, y: pos.y },
342
+ width: size.width,
343
+ height: size.height,
344
+ draggable: false,
345
+ selectable: false,
346
+ connectable: false,
347
+ data: {
348
+ node: v.node,
349
+ ctx: nodeContext(v),
350
+ focused: v.node.id === focusId
351
+ }
352
+ });
353
+ }
354
+ return out;
355
+ }, [positions, visible, nodeContext, focusId, rtl, size.width, size.height]);
356
+ const flowEdges = React3.useMemo(
357
+ () => positions ? edgeList.filter((e) => positions.has(e.source) && positions.has(e.target)).map((e) => ({
358
+ id: JSON.stringify([e.source, e.target]),
359
+ source: e.source,
360
+ target: e.target,
361
+ type: "smoothstep",
362
+ focusable: false
363
+ })) : [],
364
+ [edgeList, positions]
365
+ );
366
+ const fitKey = JSON.stringify(fitTargets);
367
+ const pendingFit = React3.useRef(true);
368
+ React3.useEffect(() => {
369
+ pendingFit.current = true;
370
+ }, [fitKey, fitRequest]);
371
+ React3.useEffect(() => {
372
+ if (!pendingFit.current || !positions || positions.size === 0) return;
373
+ const targets = fitTargets?.filter((id) => positions.has(id));
374
+ if (fitTargets && fitTargets.length && !targets?.length) return;
375
+ const raf = requestAnimationFrame(() => {
376
+ pendingFit.current = false;
377
+ void fitView({
378
+ nodes: targets?.length ? targets.map((id) => ({ id })) : void 0,
379
+ padding: 0.2,
380
+ maxZoom: 1.1,
381
+ duration: prefersReducedMotion() ? 0 : 300
382
+ });
383
+ });
384
+ return () => cancelAnimationFrame(raf);
385
+ }, [positions, fitKey, fitRequest, fitTargets, fitView]);
386
+ const ctxValue = React3.useMemo(
387
+ () => ({
388
+ labels,
389
+ classNames,
390
+ horizontal,
391
+ rtl,
392
+ renderNode,
393
+ renderBadges,
394
+ onToggle,
395
+ onSelect
396
+ }),
397
+ [
398
+ labels,
399
+ classNames,
400
+ horizontal,
401
+ rtl,
402
+ renderNode,
403
+ renderBadges,
404
+ onToggle,
405
+ onSelect
406
+ ]
407
+ );
408
+ return /* @__PURE__ */ jsx(CanvasContext.Provider, { value: ctxValue, children: /* @__PURE__ */ jsxs(
409
+ "div",
410
+ {
411
+ ref: wrapRef,
412
+ role: "region",
413
+ "aria-label": labels.chart,
414
+ "data-slot": "org-chart-canvas",
415
+ className: cn("relative h-[560px] w-full", classNames?.canvas),
416
+ children: [
417
+ /* @__PURE__ */ jsxs(
418
+ ReactFlow,
419
+ {
420
+ nodes: flowNodes,
421
+ edges: flowEdges,
422
+ nodeTypes,
423
+ nodesDraggable: false,
424
+ nodesConnectable: false,
425
+ nodesFocusable: false,
426
+ edgesFocusable: false,
427
+ elementsSelectable: false,
428
+ minZoom: 0.1,
429
+ maxZoom: 2,
430
+ style: flowStyle,
431
+ proOptions: { hideAttribution: true },
432
+ ariaLabelConfig: {
433
+ "node.a11yDescription.default": labels.canvasHint,
434
+ "node.a11yDescription.keyboardDisabled": labels.canvasHint,
435
+ "edge.a11yDescription.default": labels.canvasHint,
436
+ "minimap.ariaLabel": labels.minimap
437
+ },
438
+ children: [
439
+ /* @__PURE__ */ jsx(Background, { variant: BackgroundVariant.Dots, gap: 20, size: 1 }),
440
+ /* @__PURE__ */ jsx(Panel, { position: rtl ? "bottom-right" : "bottom-left", children: /* @__PURE__ */ jsx(
441
+ "a",
442
+ {
443
+ href: "https://reactflow.dev",
444
+ target: "_blank",
445
+ rel: "noopener noreferrer",
446
+ className: "text-muted-foreground hover:text-foreground focus-visible:ring-ring rounded-sm text-[10px] focus-visible:ring-2 focus-visible:outline-none",
447
+ children: "React Flow"
448
+ }
449
+ ) }),
450
+ showMinimap && /* @__PURE__ */ jsx(
451
+ MiniMap,
452
+ {
453
+ pannable: true,
454
+ zoomable: true,
455
+ position: rtl ? "bottom-left" : "bottom-right",
456
+ className: "border-border overflow-hidden rounded-md border"
457
+ }
458
+ )
459
+ ]
460
+ }
461
+ ),
462
+ children
463
+ ]
464
+ }
465
+ ) });
466
+ }
467
+
468
+ // src/components/OrgChart/tree.ts
469
+ var EMPTY = [];
470
+ function buildOrgForest(nodes) {
471
+ const byId = /* @__PURE__ */ new Map();
472
+ for (const n of nodes) if (!byId.has(n.id)) byId.set(n.id, n);
473
+ const declared = /* @__PURE__ */ new Map();
474
+ const roots = [];
475
+ for (const n of byId.values()) {
476
+ const p = n.parentId;
477
+ if (p != null && p !== n.id && byId.has(p)) {
478
+ const list = declared.get(p);
479
+ if (list) list.push(n);
480
+ else declared.set(p, [n]);
481
+ } else {
482
+ roots.push(n);
483
+ }
484
+ }
485
+ const children = /* @__PURE__ */ new Map();
486
+ const parentOf = /* @__PURE__ */ new Map();
487
+ const depth = /* @__PURE__ */ new Map();
488
+ const order = [];
489
+ const walk = (root) => {
490
+ parentOf.set(root.id, null);
491
+ depth.set(root.id, 0);
492
+ const stack = [root];
493
+ while (stack.length) {
494
+ const u = stack.pop();
495
+ order.push(u.id);
496
+ const kids = [];
497
+ for (const c of declared.get(u.id) ?? EMPTY) {
498
+ if (depth.has(c.id)) continue;
499
+ depth.set(c.id, depth.get(u.id) + 1);
500
+ parentOf.set(c.id, u.id);
501
+ kids.push(c);
502
+ }
503
+ if (kids.length) children.set(u.id, kids);
504
+ for (let i = kids.length - 1; i >= 0; i--) stack.push(kids[i]);
505
+ }
506
+ };
507
+ for (const r of roots) walk(r);
508
+ for (const n of byId.values()) {
509
+ if (depth.has(n.id)) continue;
510
+ roots.push(n);
511
+ walk(n);
512
+ }
513
+ const orgSize = /* @__PURE__ */ new Map();
514
+ for (let i = order.length - 1; i >= 0; i--) {
515
+ const id = order[i];
516
+ let size = 0;
517
+ for (const c of children.get(id) ?? EMPTY) size += 1 + orgSize.get(c.id);
518
+ orgSize.set(id, size);
519
+ }
520
+ return { byId, roots, children, parentOf, depth, orgSize };
521
+ }
522
+ function childrenOf(forest, id) {
523
+ return forest.children.get(id) ?? EMPTY;
524
+ }
525
+ function ancestorsOf(forest, id) {
526
+ const out = [];
527
+ let p = forest.parentOf.get(id) ?? null;
528
+ while (p != null) {
529
+ out.push(p);
530
+ p = forest.parentOf.get(p) ?? null;
531
+ }
532
+ return out;
533
+ }
534
+ function initialExpanded(forest, levels) {
535
+ const out = /* @__PURE__ */ new Set();
536
+ for (const [id, d] of forest.depth) {
537
+ if (d < levels - 1 && forest.children.has(id)) out.add(id);
538
+ }
539
+ return out;
540
+ }
541
+ function allExpandable(forest) {
542
+ return new Set(forest.children.keys());
543
+ }
544
+ function visibleNodes(forest, expanded) {
545
+ const out = [];
546
+ const visit = (n, depth) => {
547
+ out.push({ node: n, depth });
548
+ if (!expanded.has(n.id)) return;
549
+ for (const c of childrenOf(forest, n.id)) visit(c, depth + 1);
550
+ };
551
+ for (const r of forest.roots) visit(r, 0);
552
+ return out;
553
+ }
554
+ function matchesQuery(node, query) {
555
+ const q = query.trim().toLocaleLowerCase();
556
+ if (!q) return false;
557
+ return [node.name, node.title, node.subtitle, node.group].some(
558
+ (v) => v?.toLocaleLowerCase().includes(q)
559
+ );
560
+ }
561
+ function distinctGroups(nodes) {
562
+ const set = /* @__PURE__ */ new Set();
563
+ for (const n of nodes) if (n.group) set.add(n.group);
564
+ return [...set].sort((a, b) => a.localeCompare(b));
565
+ }
566
+ function OrgChartTree({
567
+ forest,
568
+ visible,
569
+ nodeContext,
570
+ selectedId,
571
+ labels,
572
+ classNames,
573
+ renderBadges,
574
+ onToggle,
575
+ onSelect
576
+ }) {
577
+ const listRef = React3.useRef(null);
578
+ const items = React3.useRef(/* @__PURE__ */ new Map());
579
+ const [activeId, setActiveId] = React3.useState(selectedId);
580
+ const active = activeId && visible.some((v) => v.node.id === activeId) ? activeId : visible[0]?.node.id ?? null;
581
+ const move = (id) => {
582
+ if (!id) return;
583
+ setActiveId(id);
584
+ items.current.get(id)?.focus();
585
+ };
586
+ const onKeyDown = (e) => {
587
+ const index = visible.findIndex((v) => v.node.id === active);
588
+ if (index < 0) return;
589
+ const current = visible[index];
590
+ const id = current.node.id;
591
+ const hasKids = childrenOf(forest, id).length > 0;
592
+ const expanded = nodeContext(current).expanded;
593
+ const rtl = !!listRef.current && getComputedStyle(listRef.current).direction === "rtl";
594
+ let key = e.key;
595
+ if (rtl && key === "ArrowLeft") key = "ArrowRight";
596
+ else if (rtl && key === "ArrowRight") key = "ArrowLeft";
597
+ switch (key) {
598
+ case "ArrowDown":
599
+ move(visible[index + 1]?.node.id);
600
+ break;
601
+ case "ArrowUp":
602
+ move(visible[index - 1]?.node.id);
603
+ break;
604
+ case "Home":
605
+ move(visible[0]?.node.id);
606
+ break;
607
+ case "End":
608
+ move(visible[visible.length - 1]?.node.id);
609
+ break;
610
+ case "ArrowRight":
611
+ if (hasKids && !expanded) onToggle(id);
612
+ else if (hasKids) move(childrenOf(forest, id)[0]?.id);
613
+ break;
614
+ case "ArrowLeft":
615
+ if (hasKids && expanded) onToggle(id);
616
+ else move(forest.parentOf.get(id) ?? void 0);
617
+ break;
618
+ case "Enter":
619
+ case " ":
620
+ onSelect(id);
621
+ break;
622
+ default:
623
+ return;
624
+ }
625
+ e.preventDefault();
626
+ };
627
+ return /* @__PURE__ */ jsx(
628
+ "ul",
629
+ {
630
+ ref: listRef,
631
+ role: "tree",
632
+ "aria-label": labels.tree,
633
+ "data-slot": "org-chart-tree",
634
+ className: cn("max-h-[560px] overflow-auto p-2", classNames?.tree),
635
+ children: visible.map((v) => {
636
+ const { node } = v;
637
+ const ctx = nodeContext(v);
638
+ const parent = forest.parentOf.get(node.id);
639
+ const siblings = parent != null ? childrenOf(forest, parent) : forest.roots;
640
+ const Chevron = ctx.expanded ? ChevronDown : ChevronRight;
641
+ const secondary = ctx.variant === "person" ? node.title : node.subtitle;
642
+ return /* @__PURE__ */ jsxs(
643
+ "li",
644
+ {
645
+ ref: (el) => {
646
+ if (el) items.current.set(node.id, el);
647
+ else items.current.delete(node.id);
648
+ },
649
+ role: "treeitem",
650
+ "aria-level": v.depth + 1,
651
+ "aria-setsize": siblings.length,
652
+ "aria-posinset": siblings.indexOf(node) + 1,
653
+ "aria-expanded": ctx.directReports > 0 ? ctx.expanded : void 0,
654
+ "aria-selected": node.id === selectedId,
655
+ "aria-current": ctx.highlighted || void 0,
656
+ tabIndex: node.id === active ? 0 : -1,
657
+ "data-slot": "org-chart-tree-item",
658
+ "data-matched": ctx.matched || void 0,
659
+ onFocus: () => setActiveId(node.id),
660
+ onKeyDown,
661
+ onClick: (e) => {
662
+ setActiveId(node.id);
663
+ const onChevron = e.target.closest(
664
+ '[data-slot="org-chart-tree-toggle"]'
665
+ );
666
+ if (onChevron && ctx.directReports > 0) onToggle(node.id);
667
+ else onSelect(node.id);
668
+ },
669
+ style: { paddingInlineStart: `${v.depth * 1.25 + 0.25}rem` },
670
+ className: cn(
671
+ "flex cursor-pointer items-center gap-2 rounded-md py-1.5 pe-2 text-sm",
672
+ "hover:bg-muted focus-visible:ring-ring focus-visible:ring-2 focus-visible:outline-none",
673
+ node.id === selectedId && "bg-primary-500/10",
674
+ ctx.matched && "ring-ring ring-1",
675
+ ctx.dimmed && "opacity-50",
676
+ classNames?.treeItem
677
+ ),
678
+ children: [
679
+ /* @__PURE__ */ jsx(
680
+ "span",
681
+ {
682
+ "aria-hidden": "true",
683
+ "data-slot": "org-chart-tree-toggle",
684
+ className: "text-muted-foreground flex size-5 shrink-0 items-center justify-center",
685
+ children: ctx.directReports > 0 && /* @__PURE__ */ jsx(Chevron, { className: "size-4 rtl:-scale-x-100" })
686
+ }
687
+ ),
688
+ /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 flex-wrap items-baseline gap-x-2", children: [
689
+ /* @__PURE__ */ jsx("span", { className: "text-foreground font-medium", children: node.name }),
690
+ secondary && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs", children: secondary })
691
+ ] }),
692
+ ctx.highlighted && /* @__PURE__ */ jsx("span", { className: "bg-primary-600 rounded-full px-1.5 text-[10px] font-bold text-white uppercase", children: labels.highlighted }),
693
+ renderBadges?.(node),
694
+ node.group && /* @__PURE__ */ jsx(GroupPill, { group: node.group, accent: ctx.accent }),
695
+ ctx.directReports > 0 && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs tabular-nums", children: ctx.directReports })
696
+ ]
697
+ },
698
+ node.id
699
+ );
700
+ })
701
+ }
702
+ );
703
+ }
704
+ var isNarrow = () => typeof window !== "undefined" && !!window.matchMedia?.("(max-width: 639px)").matches;
705
+ var union = (a, ids) => {
706
+ let out = null;
707
+ for (const id of ids) {
708
+ if (a.has(id)) continue;
709
+ out ??= new Set(a);
710
+ out.add(id);
711
+ }
712
+ return out ?? a;
713
+ };
714
+ var ancestorsOfAll = (forest, ids) => {
715
+ const out = [];
716
+ for (const id of ids) out.push(...ancestorsOf(forest, id));
717
+ return out;
718
+ };
719
+ var OrgChart = React3.forwardRef(
720
+ function OrgChart2({
721
+ nodes,
722
+ loading = false,
723
+ error = null,
724
+ onRetry,
725
+ nodeVariant = "person",
726
+ direction = "DOWN",
727
+ initialDepth = 2,
728
+ focusId = null,
729
+ highlightedId = null,
730
+ defaultQuery = "",
731
+ defaultGroup = "",
732
+ view: viewProp,
733
+ defaultView,
734
+ onViewChange,
735
+ defaultShowMinimap = false,
736
+ getGroupAccent,
737
+ onSelect,
738
+ onOpen,
739
+ getHref,
740
+ renderNode,
741
+ renderBadges,
742
+ renderDetail,
743
+ emptyState,
744
+ labels: labelsProp,
745
+ classNames,
746
+ className,
747
+ ...rest
748
+ }, ref) {
749
+ const labels = React3.useMemo(
750
+ () => ({ ...defaultOrgChartLabels, ...labelsProp }),
751
+ [labelsProp]
752
+ );
753
+ const rootRef = React3.useRef(null);
754
+ React3.useImperativeHandle(ref, () => rootRef.current);
755
+ const searchId = React3.useId();
756
+ const forest = React3.useMemo(() => buildOrgForest(nodes), [nodes]);
757
+ const groups = React3.useMemo(() => distinctGroups(nodes), [nodes]);
758
+ const accentOf = React3.useMemo(() => {
759
+ const map = /* @__PURE__ */ new Map();
760
+ groups.forEach(
761
+ (g, i) => map.set(
762
+ g,
763
+ getGroupAccent?.(g, i) ?? ORG_CHART_GROUP_ACCENTS[i % ORG_CHART_GROUP_ACCENTS.length]
764
+ )
765
+ );
766
+ return map;
767
+ }, [groups, getGroupAccent]);
768
+ const [expanded, setExpanded] = React3.useState(
769
+ () => union(
770
+ initialExpanded(forest, initialDepth),
771
+ ancestorsOfAll(
772
+ forest,
773
+ [focusId, highlightedId].filter((id) => !!id)
774
+ )
775
+ )
776
+ );
777
+ const seeded = React3.useRef(forest.byId.size > 0);
778
+ const [query, setQuery] = React3.useState(defaultQuery);
779
+ const [groupState, setGroup] = React3.useState(defaultGroup);
780
+ const group = groupState && groups.includes(groupState) ? groupState : "";
781
+ const [selectedId, setSelectedId] = React3.useState(null);
782
+ const [viewState, setViewState] = React3.useState(
783
+ defaultView ?? "chart"
784
+ );
785
+ const appliedNarrowDefault = React3.useRef(false);
786
+ React3.useEffect(() => {
787
+ if (appliedNarrowDefault.current) return;
788
+ appliedNarrowDefault.current = true;
789
+ if (defaultView === void 0 && isNarrow()) setViewState("list");
790
+ }, [defaultView]);
791
+ const view = viewProp ?? viewState;
792
+ const [showMinimap, setShowMinimap] = React3.useState(defaultShowMinimap);
793
+ const [nativeFull, setNativeFull] = React3.useState(false);
794
+ const [pseudoFull, setPseudoFull] = React3.useState(false);
795
+ const fullscreen = nativeFull || pseudoFull;
796
+ const [fitRequest, setFitRequest] = React3.useState(0);
797
+ const returnFocus = React3.useRef(null);
798
+ React3.useEffect(() => {
799
+ if (seeded.current || forest.byId.size === 0) return;
800
+ seeded.current = true;
801
+ setExpanded((prev) => union(prev, initialExpanded(forest, initialDepth)));
802
+ }, [forest, initialDepth]);
803
+ React3.useEffect(() => {
804
+ const ids = [focusId, highlightedId].filter(
805
+ (id) => !!id && forest.byId.has(id)
806
+ );
807
+ if (ids.length)
808
+ setExpanded((prev) => union(prev, ancestorsOfAll(forest, ids)));
809
+ }, [forest, focusId, highlightedId]);
810
+ const matches = React3.useMemo(() => {
811
+ if (!query.trim()) return null;
812
+ const out = [];
813
+ for (const n of forest.byId.values())
814
+ if (matchesQuery(n, query)) out.push(n.id);
815
+ return out;
816
+ }, [forest, query]);
817
+ const groupMembers = React3.useMemo(() => {
818
+ if (!group) return null;
819
+ const out = [];
820
+ for (const n of forest.byId.values())
821
+ if (n.group === group) out.push(n.id);
822
+ return out;
823
+ }, [forest, group]);
824
+ const revealKey = JSON.stringify([matches, groupMembers]);
825
+ React3.useEffect(() => {
826
+ const ids = [...matches ?? [], ...groupMembers ?? []];
827
+ if (ids.length)
828
+ setExpanded((prev) => union(prev, ancestorsOfAll(forest, ids)));
829
+ }, [revealKey, forest]);
830
+ React3.useEffect(() => {
831
+ const onChange = () => setNativeFull(
832
+ !!rootRef.current && document.fullscreenElement === rootRef.current
833
+ );
834
+ document.addEventListener("fullscreenchange", onChange);
835
+ return () => document.removeEventListener("fullscreenchange", onChange);
836
+ }, []);
837
+ React3.useEffect(() => {
838
+ if (!pseudoFull) return;
839
+ const onKey = (e) => {
840
+ if (e.key === "Escape") setPseudoFull(false);
841
+ };
842
+ document.addEventListener("keydown", onKey);
843
+ return () => document.removeEventListener("keydown", onKey);
844
+ }, [pseudoFull]);
845
+ const visible = React3.useMemo(
846
+ () => visibleNodes(forest, expanded),
847
+ [forest, expanded]
848
+ );
849
+ const matchSet = React3.useMemo(() => new Set(matches ?? []), [matches]);
850
+ const groupSet = React3.useMemo(
851
+ () => groupMembers ? new Set(groupMembers) : null,
852
+ [groupMembers]
853
+ );
854
+ const nodeContext = React3.useCallback(
855
+ (v) => ({
856
+ variant: nodeVariant,
857
+ depth: v.depth,
858
+ directReports: childrenOf(forest, v.node.id).length,
859
+ expanded: expanded.has(v.node.id),
860
+ highlighted: v.node.id === highlightedId,
861
+ matched: matchSet.has(v.node.id),
862
+ dimmed: !!groupSet && !groupSet.has(v.node.id),
863
+ accent: v.node.group ? accentOf.get(v.node.group) : void 0
864
+ }),
865
+ [
866
+ nodeVariant,
867
+ forest,
868
+ expanded,
869
+ highlightedId,
870
+ matchSet,
871
+ groupSet,
872
+ accentOf
873
+ ]
874
+ );
875
+ const fitTargets = React3.useMemo(() => {
876
+ if (matches?.length) return matches;
877
+ if (groupMembers?.length) return groupMembers;
878
+ if (focusId && forest.byId.has(focusId)) return [focusId];
879
+ return null;
880
+ }, [matches, groupMembers, focusId, forest]);
881
+ const toggle = React3.useCallback((id) => {
882
+ setExpanded((prev) => {
883
+ const next = new Set(prev);
884
+ if (next.has(id)) next.delete(id);
885
+ else next.add(id);
886
+ return next;
887
+ });
888
+ }, []);
889
+ const select = React3.useCallback(
890
+ (id) => {
891
+ if (id && typeof document !== "undefined")
892
+ returnFocus.current = document.activeElement;
893
+ setSelectedId(id);
894
+ onSelect?.(id, id ? forest.byId.get(id) ?? null : null);
895
+ },
896
+ [forest, onSelect]
897
+ );
898
+ const closeDetail = React3.useCallback(() => {
899
+ select(null);
900
+ const el = returnFocus.current;
901
+ if (el?.isConnected) el.focus();
902
+ }, [select]);
903
+ const setView = (v) => {
904
+ setViewState(v);
905
+ onViewChange?.(v);
906
+ };
907
+ const toggleFullscreen = async () => {
908
+ const el = rootRef.current;
909
+ if (!el) return;
910
+ if (fullscreen) {
911
+ setPseudoFull(false);
912
+ if (document.fullscreenElement) await document.exitFullscreen?.();
913
+ return;
914
+ }
915
+ try {
916
+ if (!el.requestFullscreen) throw new Error("unsupported");
917
+ await el.requestFullscreen();
918
+ } catch {
919
+ setPseudoFull(true);
920
+ }
921
+ };
922
+ const stateBox = (content) => /* @__PURE__ */ jsx(
923
+ "div",
924
+ {
925
+ "data-slot": "org-chart-state",
926
+ className: cn(
927
+ "text-muted-foreground flex min-h-48 flex-col items-center justify-center gap-3 p-6 text-center text-sm",
928
+ classNames?.state
929
+ ),
930
+ children: content
931
+ }
932
+ );
933
+ let body;
934
+ if (error) {
935
+ body = stateBox(
936
+ /* @__PURE__ */ jsxs(Fragment, { children: [
937
+ /* @__PURE__ */ jsx(
938
+ "p",
939
+ {
940
+ role: "alert",
941
+ className: "text-destructive-700 dark:text-destructive-400",
942
+ children: labels.error
943
+ }
944
+ ),
945
+ onRetry && /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", onClick: onRetry, children: labels.retry })
946
+ ] })
947
+ );
948
+ } else if (loading) {
949
+ body = stateBox(
950
+ /* @__PURE__ */ jsxs("div", { role: "status", className: "flex items-center gap-2", children: [
951
+ /* @__PURE__ */ jsx(Spinner, { size: "sm" }),
952
+ /* @__PURE__ */ jsx("span", { children: labels.loading })
953
+ ] })
954
+ );
955
+ } else if (forest.byId.size === 0) {
956
+ body = stateBox(emptyState ?? /* @__PURE__ */ jsx("p", { children: labels.empty }));
957
+ }
958
+ const selected = selectedId ? forest.byId.get(selectedId) ?? null : null;
959
+ const detail = selected && /* @__PURE__ */ jsx(
960
+ DetailPanel,
961
+ {
962
+ node: selected,
963
+ forest,
964
+ variant: nodeVariant,
965
+ accent: selected.group ? accentOf.get(selected.group) : void 0,
966
+ labels,
967
+ className: classNames?.detail,
968
+ onClose: closeDetail,
969
+ onOpen,
970
+ getHref,
971
+ renderDetail,
972
+ renderBadges
973
+ },
974
+ selected.id
975
+ );
976
+ const iconButton = (label, icon, onClick, pressed) => /* @__PURE__ */ jsx(
977
+ Button,
978
+ {
979
+ type: "button",
980
+ variant: "ghost",
981
+ size: "icon",
982
+ "aria-label": label,
983
+ title: label,
984
+ "aria-pressed": pressed,
985
+ onClick,
986
+ className: cn(pressed && "bg-primary-500/10"),
987
+ children: icon
988
+ }
989
+ );
990
+ return /* @__PURE__ */ jsx(
991
+ "div",
992
+ {
993
+ ref: rootRef,
994
+ "data-slot": "org-chart",
995
+ "data-view": view,
996
+ className: cn(
997
+ "bg-card text-foreground border-border relative flex flex-col overflow-hidden rounded-lg border",
998
+ fullscreen && "bg-background",
999
+ pseudoFull && "fixed inset-0 z-50 rounded-none",
1000
+ className,
1001
+ classNames?.root
1002
+ ),
1003
+ ...rest,
1004
+ children: body ?? /* @__PURE__ */ jsxs(Fragment, { children: [
1005
+ /* @__PURE__ */ jsxs(
1006
+ "div",
1007
+ {
1008
+ role: "toolbar",
1009
+ "aria-label": labels.toolbar,
1010
+ "data-slot": "org-chart-toolbar",
1011
+ className: cn(
1012
+ "border-border flex flex-wrap items-center gap-2 border-b p-2",
1013
+ classNames?.toolbar
1014
+ ),
1015
+ children: [
1016
+ /* @__PURE__ */ jsxs("div", { className: "relative min-w-40 flex-1", children: [
1017
+ /* @__PURE__ */ jsx("label", { htmlFor: searchId, className: "sr-only", children: labels.search }),
1018
+ /* @__PURE__ */ jsx(
1019
+ Search,
1020
+ {
1021
+ "aria-hidden": "true",
1022
+ className: "text-muted-foreground pointer-events-none absolute start-2.5 top-1/2 size-4 -translate-y-1/2"
1023
+ }
1024
+ ),
1025
+ /* @__PURE__ */ jsx(
1026
+ "input",
1027
+ {
1028
+ id: searchId,
1029
+ type: "search",
1030
+ value: query,
1031
+ placeholder: labels.searchPlaceholder,
1032
+ onChange: (e) => setQuery(e.target.value),
1033
+ className: "border-border bg-background text-foreground placeholder:text-muted-foreground focus-visible:ring-ring h-9 w-full rounded-md border ps-8 pe-2 text-sm focus-visible:ring-2 focus-visible:outline-none"
1034
+ }
1035
+ )
1036
+ ] }),
1037
+ /* @__PURE__ */ jsx(
1038
+ "p",
1039
+ {
1040
+ role: "status",
1041
+ "aria-live": "polite",
1042
+ className: "text-muted-foreground min-w-0 text-xs empty:hidden",
1043
+ children: matches ? labels.results(matches.length) : ""
1044
+ }
1045
+ ),
1046
+ groups.length > 0 && /* @__PURE__ */ jsxs(
1047
+ "select",
1048
+ {
1049
+ "aria-label": labels.groupFilter,
1050
+ value: group,
1051
+ onChange: (e) => setGroup(e.target.value),
1052
+ className: "border-border bg-background text-foreground focus-visible:ring-ring h-9 max-w-48 rounded-md border px-2 text-sm focus-visible:ring-2 focus-visible:outline-none",
1053
+ children: [
1054
+ /* @__PURE__ */ jsx("option", { value: "", children: labels.allGroups }),
1055
+ groups.map((g) => /* @__PURE__ */ jsx("option", { value: g, children: g }, g))
1056
+ ]
1057
+ }
1058
+ ),
1059
+ /* @__PURE__ */ jsxs("div", { className: "ms-auto flex flex-wrap items-center gap-1", children: [
1060
+ iconButton(
1061
+ labels.expandAll,
1062
+ /* @__PURE__ */ jsx(UnfoldVertical, { "aria-hidden": "true", className: "size-4" }),
1063
+ () => setExpanded(allExpandable(forest))
1064
+ ),
1065
+ iconButton(
1066
+ labels.collapseAll,
1067
+ /* @__PURE__ */ jsx(FoldVertical, { "aria-hidden": "true", className: "size-4" }),
1068
+ () => setExpanded(/* @__PURE__ */ new Set())
1069
+ ),
1070
+ view === "chart" && /* @__PURE__ */ jsxs(Fragment, { children: [
1071
+ iconButton(
1072
+ labels.fitView,
1073
+ /* @__PURE__ */ jsx(Scan, { "aria-hidden": "true", className: "size-4" }),
1074
+ () => setFitRequest((n) => n + 1)
1075
+ ),
1076
+ iconButton(
1077
+ labels.minimap,
1078
+ /* @__PURE__ */ jsx(Map$1, { "aria-hidden": "true", className: "size-4" }),
1079
+ () => setShowMinimap((v) => !v),
1080
+ showMinimap
1081
+ )
1082
+ ] }),
1083
+ iconButton(
1084
+ labels.fullscreen,
1085
+ fullscreen ? /* @__PURE__ */ jsx(Minimize, { "aria-hidden": "true", className: "size-4" }) : /* @__PURE__ */ jsx(Maximize, { "aria-hidden": "true", className: "size-4" }),
1086
+ () => void toggleFullscreen(),
1087
+ fullscreen
1088
+ ),
1089
+ /* @__PURE__ */ jsx(
1090
+ "div",
1091
+ {
1092
+ role: "group",
1093
+ "aria-label": labels.viewToggle,
1094
+ className: "border-border ms-1 flex rounded-md border p-0.5",
1095
+ children: [
1096
+ ["chart", labels.chartView, Network],
1097
+ ["list", labels.listView, List]
1098
+ ].map(([v, label, Icon]) => /* @__PURE__ */ jsxs(
1099
+ "button",
1100
+ {
1101
+ type: "button",
1102
+ "aria-pressed": view === v,
1103
+ onClick: () => setView(v),
1104
+ className: cn(
1105
+ "focus-visible:ring-ring flex h-7 items-center gap-1 rounded px-2 text-xs font-medium focus-visible:ring-2 focus-visible:outline-none",
1106
+ view === v ? "bg-primary-500/10 text-foreground" : "text-muted-foreground hover:bg-muted"
1107
+ ),
1108
+ children: [
1109
+ /* @__PURE__ */ jsx(Icon, { "aria-hidden": "true", className: "size-3.5" }),
1110
+ label
1111
+ ]
1112
+ },
1113
+ v
1114
+ ))
1115
+ }
1116
+ )
1117
+ ] })
1118
+ ]
1119
+ }
1120
+ ),
1121
+ view === "chart" ? /* @__PURE__ */ jsx(
1122
+ OrgChartCanvas,
1123
+ {
1124
+ forest,
1125
+ visible,
1126
+ nodeContext,
1127
+ focusId,
1128
+ direction,
1129
+ variant: nodeVariant,
1130
+ showMinimap,
1131
+ fitTargets,
1132
+ fitRequest,
1133
+ labels,
1134
+ classNames: fullscreen ? {
1135
+ ...classNames,
1136
+ canvas: cn(classNames?.canvas, "h-auto flex-1")
1137
+ } : classNames,
1138
+ renderNode,
1139
+ renderBadges,
1140
+ onToggle: toggle,
1141
+ onSelect: select,
1142
+ children: detail
1143
+ }
1144
+ ) : /* @__PURE__ */ jsxs("div", { className: cn("relative", fullscreen && "flex-1"), children: [
1145
+ /* @__PURE__ */ jsx(
1146
+ OrgChartTree,
1147
+ {
1148
+ forest,
1149
+ visible,
1150
+ nodeContext,
1151
+ selectedId,
1152
+ labels,
1153
+ classNames,
1154
+ renderBadges,
1155
+ onToggle: toggle,
1156
+ onSelect: select
1157
+ }
1158
+ ),
1159
+ detail
1160
+ ] })
1161
+ ] })
1162
+ }
1163
+ );
1164
+ }
1165
+ );
1166
+ function DetailPanel({
1167
+ node,
1168
+ forest,
1169
+ variant,
1170
+ accent,
1171
+ labels,
1172
+ className,
1173
+ onClose,
1174
+ onOpen,
1175
+ getHref,
1176
+ renderDetail,
1177
+ renderBadges
1178
+ }) {
1179
+ const ref = React3.useRef(null);
1180
+ const closeRef = React3.useRef(onClose);
1181
+ React3.useEffect(() => {
1182
+ closeRef.current = onClose;
1183
+ });
1184
+ React3.useEffect(() => {
1185
+ const el = ref.current;
1186
+ if (!el) return;
1187
+ el.focus();
1188
+ const onKey = (e) => {
1189
+ if (e.key !== "Escape") return;
1190
+ e.stopPropagation();
1191
+ closeRef.current();
1192
+ };
1193
+ el.addEventListener("keydown", onKey);
1194
+ return () => el.removeEventListener("keydown", onKey);
1195
+ }, []);
1196
+ const directReports = childrenOf(forest, node.id).length;
1197
+ const orgSize = forest.orgSize.get(node.id) ?? 0;
1198
+ const parentId = forest.parentOf.get(node.id);
1199
+ const parent = parentId ? forest.byId.get(parentId) ?? null : null;
1200
+ const secondary = variant === "person" ? node.title : node.subtitle;
1201
+ const href = getHref?.(node.id, node);
1202
+ const actionClass = "bg-primary-600 hover:bg-primary-700 focus-visible:ring-ring inline-flex h-8 items-center gap-1.5 rounded-md px-3 text-sm font-medium text-white focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none";
1203
+ return /* @__PURE__ */ jsxs(
1204
+ "div",
1205
+ {
1206
+ ref,
1207
+ role: "dialog",
1208
+ "aria-modal": "false",
1209
+ "aria-label": node.name,
1210
+ tabIndex: -1,
1211
+ "data-slot": "org-chart-detail",
1212
+ className: cn(
1213
+ "bg-card text-foreground border-border absolute end-3 top-3 z-10 w-72 max-w-[calc(100%-1.5rem)] rounded-lg border p-4 shadow-lg focus:outline-none",
1214
+ className
1215
+ ),
1216
+ children: [
1217
+ /* @__PURE__ */ jsx(
1218
+ "button",
1219
+ {
1220
+ type: "button",
1221
+ "aria-label": labels.close,
1222
+ onClick: onClose,
1223
+ className: "text-muted-foreground hover:bg-muted focus-visible:ring-ring absolute end-2 top-2 rounded p-1 focus-visible:ring-2 focus-visible:outline-none",
1224
+ children: /* @__PURE__ */ jsx(X, { "aria-hidden": "true", className: "size-4" })
1225
+ }
1226
+ ),
1227
+ renderDetail ? renderDetail(node, { directReports, orgSize, parent, close: onClose }) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 pe-6", children: [
1228
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
1229
+ variant === "person" && /* @__PURE__ */ jsx(Avatar, { src: node.avatarUrl, name: node.name, alt: "", size: "lg" }),
1230
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
1231
+ /* @__PURE__ */ jsx("p", { className: "text-foreground font-semibold", children: node.name }),
1232
+ secondary && /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm", children: secondary })
1233
+ ] })
1234
+ ] }),
1235
+ (node.group || renderBadges) && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-1.5", children: [
1236
+ node.group && /* @__PURE__ */ jsx(GroupPill, { group: node.group, accent }),
1237
+ renderBadges?.(node)
1238
+ ] }),
1239
+ /* @__PURE__ */ jsxs("ul", { className: "text-muted-foreground flex flex-col gap-1 text-sm", children: [
1240
+ parent && /* @__PURE__ */ jsx("li", { children: labels.reportsTo(parent.name) }),
1241
+ /* @__PURE__ */ jsx("li", { children: labels.directReports(directReports) }),
1242
+ orgSize > directReports && /* @__PURE__ */ jsx("li", { children: labels.orgSize(orgSize) })
1243
+ ] }),
1244
+ href ? /* @__PURE__ */ jsxs(
1245
+ "a",
1246
+ {
1247
+ href,
1248
+ className: cn(actionClass, "self-start"),
1249
+ onClick: (e) => {
1250
+ if (!onOpen || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey)
1251
+ return;
1252
+ e.preventDefault();
1253
+ onOpen(node.id, node);
1254
+ },
1255
+ children: [
1256
+ labels.open,
1257
+ /* @__PURE__ */ jsx(ExternalLink, { "aria-hidden": "true", className: "size-3.5" })
1258
+ ]
1259
+ }
1260
+ ) : onOpen && /* @__PURE__ */ jsx(
1261
+ "button",
1262
+ {
1263
+ type: "button",
1264
+ className: cn(actionClass, "self-start"),
1265
+ onClick: () => onOpen(node.id, node),
1266
+ children: labels.open
1267
+ }
1268
+ )
1269
+ ] })
1270
+ ]
1271
+ }
1272
+ );
1273
+ }
1274
+
1275
+ export { ORG_CHART_GROUP_ACCENTS, ORG_CHART_LAYOUT_OPTIONS, OrgChart, defaultOrgChartLabels };
1276
+ //# sourceMappingURL=org-chart.js.map
1277
+ //# sourceMappingURL=org-chart.js.map