@baseline-ui/core 3.7.0 → 3.9.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 (326) hide show
  1. package/dist/Accordion.mjs +1 -1
  2. package/dist/ActionButton.mjs +1 -1
  3. package/dist/ActionGroup.mjs +1 -1
  4. package/dist/ActionIconButton.mjs +1 -1
  5. package/dist/Actionable.mjs +1 -1
  6. package/dist/AlertDialog.css +1 -1
  7. package/dist/AlertDialog.mjs +1 -1
  8. package/dist/AudioPlayer.css +1 -1
  9. package/dist/AudioPlayer.mjs +1 -1
  10. package/dist/Breadcrumbs.mjs +1 -1
  11. package/dist/ButtonSelect.css +1 -1
  12. package/dist/ButtonSelect.mjs +1 -1
  13. package/dist/Calendar.css +1 -1
  14. package/dist/Calendar.mjs +1 -1
  15. package/dist/Checkbox.mjs +1 -1
  16. package/dist/ColorInput.css +1 -1
  17. package/dist/ColorInput.mjs +1 -1
  18. package/dist/ColorSwatch.mjs +1 -1
  19. package/dist/ColorSwatchPicker.mjs +1 -1
  20. package/dist/ComboBox.css +1 -1
  21. package/dist/ComboBox.mjs +1 -1
  22. package/dist/DateField.css +1 -1
  23. package/dist/DateField.mjs +1 -1
  24. package/dist/Dialog.mjs +1 -1
  25. package/dist/Disclosure.mjs +1 -1
  26. package/dist/DomNodeRenderer.mjs +1 -1
  27. package/dist/Drawer.mjs +1 -1
  28. package/dist/Editor.css +1 -1
  29. package/dist/Editor.mjs +1 -1
  30. package/dist/FileInput.css +1 -1
  31. package/dist/FileInput.mjs +1 -1
  32. package/dist/FileList.css +1 -1
  33. package/dist/FileList.mjs +1 -1
  34. package/dist/FileUploader.css +1 -1
  35. package/dist/FileUploader.mjs +1 -1
  36. package/dist/FrameProvider.mjs +1 -1
  37. package/dist/FreehandCanvas.mjs +1 -1
  38. package/dist/GridList.mjs +1 -1
  39. package/dist/Group.mjs +1 -1
  40. package/dist/Icon.mjs +1 -1
  41. package/dist/Image.css +10 -0
  42. package/dist/Image.mjs +1 -0
  43. package/dist/ImageDropZone.mjs +1 -1
  44. package/dist/ImageGallery.css +1 -1
  45. package/dist/ImageGallery.mjs +1 -1
  46. package/dist/InlineAlert.mjs +1 -1
  47. package/dist/InlineToolbar.mjs +2 -2
  48. package/dist/Kbd.mjs +1 -1
  49. package/dist/Link.mjs +1 -1
  50. package/dist/ListBox.mjs +1 -1
  51. package/dist/Menu.mjs +1 -1
  52. package/dist/Modal.mjs +1 -1
  53. package/dist/NumberInput.css +1 -1
  54. package/dist/NumberInput.mjs +1 -1
  55. package/dist/Pagination.mjs +1 -1
  56. package/dist/Panel.mjs +1 -1
  57. package/dist/PointPicker.mjs +1 -1
  58. package/dist/Popover.mjs +1 -1
  59. package/dist/Portal.mjs +1 -1
  60. package/dist/Preview.mjs +1 -1
  61. package/dist/ProgressBar.css +1 -1
  62. package/dist/ProgressBar.mjs +1 -1
  63. package/dist/ProgressSpinner.mjs +1 -1
  64. package/dist/RadioGroup.css +1 -1
  65. package/dist/RadioGroup.mjs +1 -1
  66. package/dist/Reaction.mjs +1 -1
  67. package/dist/ScrollControlButton.mjs +1 -1
  68. package/dist/SearchInput.mjs +1 -1
  69. package/dist/Select.css +1 -1
  70. package/dist/Select.mjs +1 -1
  71. package/dist/Slider.css +1 -1
  72. package/dist/Slider.mjs +1 -1
  73. package/dist/Stepper.mjs +1 -1
  74. package/dist/Switch.css +1 -1
  75. package/dist/Switch.mjs +1 -1
  76. package/dist/Table.mjs +1 -1
  77. package/dist/Tabs.mjs +1 -1
  78. package/dist/Tag.mjs +1 -1
  79. package/dist/TagGroup.mjs +1 -1
  80. package/dist/TaggedPagination.mjs +1 -1
  81. package/dist/Text.mjs +1 -1
  82. package/dist/TextInput.css +1 -1
  83. package/dist/TextInput.mjs +1 -1
  84. package/dist/ThemeProvider.mjs +1 -1
  85. package/dist/TimeField.css +1 -1
  86. package/dist/TimeField.mjs +1 -1
  87. package/dist/Toast.mjs +1 -1
  88. package/dist/ToggleButton.mjs +1 -1
  89. package/dist/ToggleIconButton.mjs +1 -1
  90. package/dist/Toolbar.mjs +1 -1
  91. package/dist/Tooltip.mjs +1 -1
  92. package/dist/TreeView.css +1 -1
  93. package/dist/TreeView.mjs +1 -1
  94. package/dist/UNSAFE_ListBox.mjs +1 -1
  95. package/dist/Virtualizer.mjs +1 -1
  96. package/dist/chunk-25NW6ZEB.mjs +10 -0
  97. package/dist/chunk-2O4HB7UL.mjs +10 -0
  98. package/dist/{chunk-4QGZDJW4.mjs → chunk-2UDXAKWA.mjs} +1 -1
  99. package/dist/{chunk-ETM4MNG4.mjs → chunk-35AM4QEA.mjs} +1 -1
  100. package/dist/{chunk-XO7MAUFC.mjs → chunk-3COKCTB2.mjs} +2 -2
  101. package/dist/chunk-3JOOFCEF.mjs +10 -0
  102. package/dist/{chunk-4S4GGUSH.mjs → chunk-3PBFSDMT.mjs} +1 -1
  103. package/dist/{chunk-G5MSZV5O.mjs → chunk-3V4W6OGG.mjs} +1 -1
  104. package/dist/{chunk-CU6D2EA6.mjs → chunk-3ZX5CLZO.mjs} +1 -1
  105. package/dist/chunk-45EAFDOZ.mjs +10 -0
  106. package/dist/{chunk-IROFSPEN.mjs → chunk-4HOAPQDQ.mjs} +1 -1
  107. package/dist/{chunk-KHDWTXGG.mjs → chunk-4PZGQTXE.mjs} +1 -1
  108. package/dist/{chunk-B5VHU77N.mjs → chunk-54MWEZUP.mjs} +2 -2
  109. package/dist/chunk-5GZAORDK.mjs +10 -0
  110. package/dist/{chunk-BA5OA5DY.mjs → chunk-5LGYS5CZ.mjs} +1 -1
  111. package/dist/chunk-5MR5L5JZ.mjs +10 -0
  112. package/dist/{chunk-XAM3AXXK.mjs → chunk-64ZD4EKW.mjs} +1 -1
  113. package/dist/{chunk-YS3Z53YT.mjs → chunk-67QIBKUN.mjs} +1 -1
  114. package/dist/{chunk-YAI33K42.mjs → chunk-6CSP66NI.mjs} +1 -1
  115. package/dist/{chunk-LSPDPDB6.mjs → chunk-6HTOSJOJ.mjs} +1 -1
  116. package/dist/chunk-6LFOODXI.mjs +10 -0
  117. package/dist/chunk-6MTVNQKW.mjs +10 -0
  118. package/dist/{chunk-YNJD34U4.mjs → chunk-6NUHEJGL.mjs} +1 -1
  119. package/dist/{chunk-QIYZRQGP.mjs → chunk-6PBBHYCA.mjs} +1 -1
  120. package/dist/chunk-6RN7DKRF.mjs +10 -0
  121. package/dist/{chunk-S2XIFW52.mjs → chunk-7JE2SRIH.mjs} +2 -2
  122. package/dist/{chunk-I7LPPUZS.mjs → chunk-A455VRNY.mjs} +1 -1
  123. package/dist/{chunk-GQIS4QBN.mjs → chunk-A63HMTSM.mjs} +1 -1
  124. package/dist/chunk-AALXW5AP.mjs +10 -0
  125. package/dist/{chunk-5GW36EQJ.mjs → chunk-AC44TKUI.mjs} +1 -1
  126. package/dist/{chunk-QL7SC5BW.mjs → chunk-ADEALCJB.mjs} +1 -1
  127. package/dist/{chunk-SGZWUG3H.mjs → chunk-ALMW6S4I.mjs} +1 -1
  128. package/dist/{chunk-6DETJFO2.mjs → chunk-ARMWQYH2.mjs} +1 -1
  129. package/dist/chunk-B3W7VMJR.mjs +10 -0
  130. package/dist/{chunk-ZZ7YJ2FN.mjs → chunk-B5NICAFU.mjs} +1 -1
  131. package/dist/{chunk-Q6R75IOP.mjs → chunk-BFW26T6V.mjs} +1 -1
  132. package/dist/{chunk-EGLD5KVP.mjs → chunk-BK3RBPST.mjs} +1 -1
  133. package/dist/{chunk-TLU2GNUT.mjs → chunk-BPLTQDXX.mjs} +1 -1
  134. package/dist/{chunk-4WVW4KEK.mjs → chunk-BSFG32AL.mjs} +1 -1
  135. package/dist/{chunk-FJO6KCT5.mjs → chunk-C4XJOYAW.mjs} +1 -1
  136. package/dist/{chunk-UZ672WDX.mjs → chunk-CFDIUF4H.mjs} +1 -1
  137. package/dist/{chunk-6CEV43ZA.mjs → chunk-CHBF3XQ6.mjs} +1 -1
  138. package/dist/chunk-CIOPWCOS.mjs +10 -0
  139. package/dist/{chunk-UI2VBG26.mjs → chunk-CKUHFL5G.mjs} +1 -1
  140. package/dist/{chunk-GMALMQWI.mjs → chunk-D2NVLRIU.mjs} +1 -1
  141. package/dist/{chunk-JHA7DIPG.mjs → chunk-D6AOHRAV.mjs} +1 -1
  142. package/dist/chunk-DFMPVQM3.mjs +10 -0
  143. package/dist/{chunk-MHAPHPNN.mjs → chunk-DHZKZ3AV.mjs} +1 -1
  144. package/dist/{chunk-K5RYVERS.mjs → chunk-DLJHL4V7.mjs} +1 -1
  145. package/dist/{chunk-4Y4WKIL5.mjs → chunk-DOFT4BQH.mjs} +1 -1
  146. package/dist/{chunk-235S3EB7.mjs → chunk-DPFX25HC.mjs} +1 -1
  147. package/dist/{chunk-73UBSCJ2.mjs → chunk-DRQHSYY3.mjs} +1 -1
  148. package/dist/{chunk-AQTRFPF2.mjs → chunk-DV72V6NI.mjs} +1 -1
  149. package/dist/chunk-DZFNVFYT.mjs +10 -0
  150. package/dist/chunk-DZJTPX2G.mjs +10 -0
  151. package/dist/chunk-E2VXJPSE.mjs +10 -0
  152. package/dist/chunk-E3TD3EJQ.mjs +10 -0
  153. package/dist/{chunk-EFFODO2N.mjs → chunk-E6DZSC2G.mjs} +1 -1
  154. package/dist/{chunk-I7SMG6PT.mjs → chunk-EISLHUT5.mjs} +1 -1
  155. package/dist/chunk-ENUU2IVX.mjs +10 -0
  156. package/dist/{chunk-OQPYPKZV.mjs → chunk-ES3IQZSH.mjs} +1 -1
  157. package/dist/{chunk-KVIV5RTE.mjs → chunk-F3EOLTFM.mjs} +1 -1
  158. package/dist/chunk-F4YBUGLD.mjs +10 -0
  159. package/dist/{chunk-STMDFIUL.mjs → chunk-FDDB7QNQ.mjs} +1 -1
  160. package/dist/{chunk-Z4QTH4TB.mjs → chunk-FTV6OWMI.mjs} +1 -1
  161. package/dist/chunk-G76NJ3IU.mjs +10 -0
  162. package/dist/{chunk-INFMXVHD.mjs → chunk-GIUNLLWW.mjs} +1 -1
  163. package/dist/{chunk-UPCEZ32D.mjs → chunk-GLIN7JAI.mjs} +1 -1
  164. package/dist/{chunk-S4HLMIFK.mjs → chunk-GOCBU65X.mjs} +1 -1
  165. package/dist/{chunk-D4NW56YQ.mjs → chunk-GPT4DR4P.mjs} +1 -1
  166. package/dist/{chunk-BULEKXBD.mjs → chunk-GXQQZWIP.mjs} +1 -1
  167. package/dist/{chunk-GCBMNOA6.mjs → chunk-HNKEI45D.mjs} +1 -1
  168. package/dist/chunk-IBBDZQPO.mjs +10 -0
  169. package/dist/{chunk-F7WPMQ3P.mjs → chunk-IIBBR266.mjs} +1 -1
  170. package/dist/{chunk-MURSKAKT.mjs → chunk-INHZHYOF.mjs} +1 -1
  171. package/dist/{chunk-BGRGRUG4.mjs → chunk-IOHULFEP.mjs} +1 -1
  172. package/dist/{chunk-TUY23KMK.mjs → chunk-IVM5IBQS.mjs} +1 -1
  173. package/dist/{chunk-FX3THTOK.mjs → chunk-J7BCMF23.mjs} +1 -1
  174. package/dist/chunk-JB3UIJ3I.mjs +10 -0
  175. package/dist/{chunk-UFN2OAM2.mjs → chunk-JC22ELJM.mjs} +1 -1
  176. package/dist/chunk-JDDA4R2D.mjs +10 -0
  177. package/dist/{chunk-NO3DNA2U.mjs → chunk-JIGOXUY4.mjs} +1 -1
  178. package/dist/{chunk-KX7WG3L4.mjs → chunk-JOK6I52O.mjs} +1 -1
  179. package/dist/{chunk-6GV3YWV7.mjs → chunk-JTGVIAOK.mjs} +1 -1
  180. package/dist/chunk-JVD752FA.mjs +10 -0
  181. package/dist/{chunk-NT2MFIKD.mjs → chunk-JXJZIKEY.mjs} +1 -1
  182. package/dist/chunk-K276BGP2.mjs +10 -0
  183. package/dist/{chunk-TIGGKOJQ.mjs → chunk-KADD66HZ.mjs} +1 -1
  184. package/dist/{chunk-QAAOC64D.mjs → chunk-KBLJ34QI.mjs} +1 -1
  185. package/dist/{chunk-X3ACY7IY.mjs → chunk-KFJE5ZBK.mjs} +1 -1
  186. package/dist/{chunk-23WMOYTQ.mjs → chunk-KMSNBINF.mjs} +1 -1
  187. package/dist/{chunk-SZCVQU55.mjs → chunk-KMZ3YVPE.mjs} +1 -1
  188. package/dist/chunk-KOPAIJJU.mjs +10 -0
  189. package/dist/{chunk-C4WHTPLY.mjs → chunk-KRVEGSVY.mjs} +1 -1
  190. package/dist/{chunk-VPVF5N62.mjs → chunk-L5H5GE3H.mjs} +1 -1
  191. package/dist/{chunk-6TRBOQVN.mjs → chunk-L6ISOTLH.mjs} +1 -1
  192. package/dist/chunk-LHLY432N.mjs +10 -0
  193. package/dist/{chunk-2JGVUCP5.mjs → chunk-LN2NT32E.mjs} +1 -1
  194. package/dist/{chunk-B3EZOXNU.mjs → chunk-LRFFL765.mjs} +1 -1
  195. package/dist/{chunk-PCR5FD43.mjs → chunk-LXZOYBTL.mjs} +1 -1
  196. package/dist/chunk-LZEZW5RE.mjs +10 -0
  197. package/dist/{chunk-EGYIHFEQ.mjs → chunk-M7BCIQ2J.mjs} +1 -1
  198. package/dist/{chunk-2VOWBYNS.mjs → chunk-MPJXTZ6L.mjs} +1 -1
  199. package/dist/{chunk-SAATXQOW.mjs → chunk-MUQR2YER.mjs} +1 -1
  200. package/dist/{chunk-NUCSMH4S.mjs → chunk-N4NDPTX6.mjs} +1 -1
  201. package/dist/chunk-NN6HKMC4.mjs +10 -0
  202. package/dist/{chunk-KUDCYGII.mjs → chunk-NQVTVL24.mjs} +1 -1
  203. package/dist/chunk-NTUW55EB.mjs +10 -0
  204. package/dist/{chunk-6Z3GYFG5.mjs → chunk-NWYRVUTX.mjs} +1 -1
  205. package/dist/{chunk-RINS2TBF.mjs → chunk-NYNS3UDR.mjs} +1 -1
  206. package/dist/{chunk-MKHLBKSN.mjs → chunk-OAOIUNNG.mjs} +1 -1
  207. package/dist/{chunk-5USQ6HBY.mjs → chunk-OKEXEU3C.mjs} +1 -1
  208. package/dist/chunk-OMCGORTH.mjs +10 -0
  209. package/dist/{chunk-3IPRT57V.mjs → chunk-OO3ZVB2T.mjs} +2 -2
  210. package/dist/{chunk-TZGK36KC.mjs → chunk-OS6PVCFX.mjs} +1 -1
  211. package/dist/{chunk-EDMVODCD.mjs → chunk-P6LYION6.mjs} +1 -1
  212. package/dist/{chunk-3WKDIXCM.mjs → chunk-PJINRIA6.mjs} +1 -1
  213. package/dist/{chunk-6DYTFYPO.mjs → chunk-PLRUMLNB.mjs} +1 -1
  214. package/dist/{chunk-YF63IQQR.mjs → chunk-PQIDCA7P.mjs} +1 -1
  215. package/dist/{chunk-6Q5PNIYZ.mjs → chunk-PSUZMSD3.mjs} +1 -1
  216. package/dist/{chunk-VFO35ZLL.mjs → chunk-Q3FYMLAA.mjs} +1 -1
  217. package/dist/{chunk-Y2MIU76N.mjs → chunk-QSFRMY47.mjs} +1 -1
  218. package/dist/{chunk-HH4VLTF3.mjs → chunk-QVFGEXDU.mjs} +1 -1
  219. package/dist/{chunk-MBRNO6IW.mjs → chunk-R5JHN4X6.mjs} +1 -1
  220. package/dist/{chunk-NLVJYKSA.mjs → chunk-R7Y36JCO.mjs} +1 -1
  221. package/dist/chunk-RFCTQQMD.mjs +10 -0
  222. package/dist/{chunk-5ZC64ZG7.mjs → chunk-RXADOJLS.mjs} +1 -1
  223. package/dist/{chunk-PPHSLODC.mjs → chunk-SCJ3RG7B.mjs} +1 -1
  224. package/dist/chunk-SCUNJNIO.mjs +0 -0
  225. package/dist/{chunk-PMDRFB75.mjs → chunk-SI7LO2L4.mjs} +1 -1
  226. package/dist/{chunk-ZC5WXVNV.mjs → chunk-SY24O432.mjs} +1 -1
  227. package/dist/{chunk-KQOXSF4J.mjs → chunk-SYA6LAFU.mjs} +1 -1
  228. package/dist/{chunk-IIURKT24.mjs → chunk-SZNDCHMJ.mjs} +1 -1
  229. package/dist/{chunk-QUWRO3HT.mjs → chunk-TEQHGF4G.mjs} +1 -1
  230. package/dist/{chunk-TYKMNZJ4.mjs → chunk-TGLVJRZE.mjs} +1 -1
  231. package/dist/{chunk-GFBRKKX4.mjs → chunk-TN7FPPGM.mjs} +1 -1
  232. package/dist/chunk-TYOEGCPS.mjs +10 -0
  233. package/dist/{chunk-R6TFTLMV.mjs → chunk-U6M2GCPD.mjs} +1 -1
  234. package/dist/{chunk-6QQEK5I6.mjs → chunk-UBC32WQB.mjs} +1 -1
  235. package/dist/{chunk-P6V5EAYL.mjs → chunk-UCRJ3AR5.mjs} +1 -1
  236. package/dist/{chunk-BTPAZDGG.mjs → chunk-UI4SJCQU.mjs} +1 -1
  237. package/dist/{chunk-7SQRBY7N.mjs → chunk-UKBBSYRC.mjs} +1 -1
  238. package/dist/{chunk-IM3E5JL4.mjs → chunk-UPOQXYUI.mjs} +1 -1
  239. package/dist/{chunk-22MA6EYO.mjs → chunk-UQJB6AGO.mjs} +1 -1
  240. package/dist/{chunk-AI6WQPRX.mjs → chunk-UR42GQO4.mjs} +1 -1
  241. package/dist/{chunk-SXZP556C.mjs → chunk-V6DZG4PM.mjs} +1 -1
  242. package/dist/chunk-VEIBPZDL.mjs +10 -0
  243. package/dist/{chunk-LY2ZVEGJ.mjs → chunk-VKWXATZ3.mjs} +1 -1
  244. package/dist/{chunk-54ZKQAA3.mjs → chunk-VNJDCKLQ.mjs} +1 -1
  245. package/dist/{chunk-F3THHK5C.mjs → chunk-VPN55UVA.mjs} +1 -1
  246. package/dist/{chunk-QMV2O57M.mjs → chunk-VQ45RUYJ.mjs} +1 -1
  247. package/dist/chunk-VQHI3ZCW.mjs +10 -0
  248. package/dist/{chunk-BGQRLALS.mjs → chunk-VSGVHATE.mjs} +1 -1
  249. package/dist/{chunk-IMXJCV7G.mjs → chunk-VWSTMBQK.mjs} +1 -1
  250. package/dist/chunk-VYBJ36ZR.mjs +10 -0
  251. package/dist/{chunk-YDUKC7QS.mjs → chunk-W3YUV7IF.mjs} +1 -1
  252. package/dist/{chunk-4QBHQCCK.mjs → chunk-WAPBLICF.mjs} +1 -1
  253. package/dist/chunk-WBOFQ4BH.mjs +10 -0
  254. package/dist/{chunk-CIPPPD6E.mjs → chunk-WD2TPSZV.mjs} +1 -1
  255. package/dist/{chunk-TAT552A5.mjs → chunk-WID7IWNC.mjs} +1 -1
  256. package/dist/chunk-WSRXTVYB.mjs +10 -0
  257. package/dist/{chunk-O7IU5NHN.mjs → chunk-WXILHRBE.mjs} +1 -1
  258. package/dist/{chunk-4I7K4CCG.mjs → chunk-X34RHNLT.mjs} +1 -1
  259. package/dist/{chunk-XOS3JIQX.mjs → chunk-X6K4M542.mjs} +1 -1
  260. package/dist/chunk-XC5H4EVW.mjs +10 -0
  261. package/dist/chunk-XF65LVBQ.mjs +10 -0
  262. package/dist/{chunk-XVL2GXTB.mjs → chunk-XKNL5LSL.mjs} +2 -2
  263. package/dist/{chunk-4P247R4V.mjs → chunk-Y6PZKRST.mjs} +1 -1
  264. package/dist/{chunk-7YCV7MPI.mjs → chunk-YK3KAPIK.mjs} +2 -2
  265. package/dist/{chunk-OVJT5F2R.mjs → chunk-YQFS4UHL.mjs} +1 -1
  266. package/dist/{chunk-5YKRWGEJ.mjs → chunk-YSQ3YHJN.mjs} +2 -2
  267. package/dist/{chunk-VQ2K6Q3G.mjs → chunk-Z7JRM3NW.mjs} +2 -2
  268. package/dist/chunk-Z7UPVYL5.mjs +10 -0
  269. package/dist/{chunk-CBV6KXGO.mjs → chunk-ZRD2DMEX.mjs} +1 -1
  270. package/dist/hooks/useDevice.mjs +1 -1
  271. package/dist/hooks/useIntersectionObserver.mjs +1 -1
  272. package/dist/hooks/useLiveInteractionModality.mjs +1 -1
  273. package/dist/hooks/useLocalStorage.mjs +1 -1
  274. package/dist/hooks/useMutationObserver.mjs +1 -1
  275. package/dist/hooks/usePortalContainer.mjs +1 -1
  276. package/dist/hooks/usePreventFocus.mjs +1 -1
  277. package/dist/hooks/useResizeObserver.mjs +1 -1
  278. package/dist/hooks/useTextSelection.mjs +1 -1
  279. package/dist/index.css +1 -1
  280. package/dist/index.d.ts +280 -60
  281. package/dist/index.js +22 -22
  282. package/dist/index.mjs +1 -1
  283. package/dist/react-aria.mjs +1 -1
  284. package/dist/utils/dom.mjs +1 -1
  285. package/dist/utils/isInShadowDOM.mjs +1 -1
  286. package/dist/utils/keyboards.mjs +1 -1
  287. package/package.json +5 -5
  288. package/sbom.json +13 -13
  289. package/dist/chunk-2JRDTJWJ.mjs +0 -10
  290. package/dist/chunk-5EI2562M.mjs +0 -10
  291. package/dist/chunk-5ILCVLWY.mjs +0 -10
  292. package/dist/chunk-5W6G3ZUT.mjs +0 -10
  293. package/dist/chunk-7DCQF3EP.mjs +0 -10
  294. package/dist/chunk-BROSGYL3.mjs +0 -10
  295. package/dist/chunk-BSSLS6MF.mjs +0 -10
  296. package/dist/chunk-CD5KKXIM.mjs +0 -10
  297. package/dist/chunk-CY6W27WG.mjs +0 -10
  298. package/dist/chunk-DG5VNJOH.mjs +0 -10
  299. package/dist/chunk-F56P4EKI.mjs +0 -10
  300. package/dist/chunk-GJ6ZPLFR.mjs +0 -10
  301. package/dist/chunk-HTRO6BM5.mjs +0 -10
  302. package/dist/chunk-IN7BLI4M.mjs +0 -10
  303. package/dist/chunk-IVDIKT6F.mjs +0 -10
  304. package/dist/chunk-JXCL5CUV.mjs +0 -10
  305. package/dist/chunk-L45T2KGW.mjs +0 -10
  306. package/dist/chunk-LDWNE2JT.mjs +0 -10
  307. package/dist/chunk-M3R4ZM34.mjs +0 -10
  308. package/dist/chunk-MJPCLLDU.mjs +0 -10
  309. package/dist/chunk-MYT5CSGX.mjs +0 -10
  310. package/dist/chunk-NKC4MIX3.mjs +0 -10
  311. package/dist/chunk-NWWH62TU.mjs +0 -10
  312. package/dist/chunk-O6PPXOEX.mjs +0 -10
  313. package/dist/chunk-OPIPJTLG.mjs +0 -10
  314. package/dist/chunk-PG3WDHSK.mjs +0 -10
  315. package/dist/chunk-PR3CD3UC.mjs +0 -10
  316. package/dist/chunk-SBR5UAUY.mjs +0 -10
  317. package/dist/chunk-SD43KVTU.mjs +0 -10
  318. package/dist/chunk-SSWWJZRE.mjs +0 -10
  319. package/dist/chunk-SZTFMBPY.mjs +0 -10
  320. package/dist/chunk-TFBJ767L.mjs +0 -10
  321. package/dist/chunk-UCDGZFQ7.mjs +0 -10
  322. package/dist/chunk-VNWKXT3X.mjs +0 -10
  323. package/dist/chunk-XC2S3RLC.mjs +0 -10
  324. package/dist/chunk-YEIRJNEA.mjs +0 -10
  325. package/dist/chunk-YQKEP62C.mjs +0 -10
  326. package/dist/chunk-ZXN5VT4G.mjs +0 -10
@@ -1,10 +0,0 @@
1
- import {a as a$2}from'./chunk-KVIV5RTE.mjs';import {c,d,e,f,i,g,h as h$1}from'./chunk-23WMOYTQ.mjs';import {a as a$4}from'./chunk-OVJT5F2R.mjs';import {c as c$2}from'./chunk-6DYTFYPO.mjs';import {a as a$3}from'./chunk-TAT552A5.mjs';import {l}from'./chunk-6Z3GYFG5.mjs';import {b,c as c$1}from'./chunk-IDIZSV2Y.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import {CaretDownIcon}from'@baseline-ui/icons/12';import p from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- var R=a({defaultClassName:"_1enn18vd _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6m6",variantClassNames:{isFocusVisible:{true:"_1yep5z614w _1yep5z618s _1yep5z618q _1yep5z618t"}},defaultVariants:{},compoundVariants:[]}),z=a({defaultClassName:"_1enn18v2 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6dw _1yep5z6f1 _1yep5z6g9 _1yep5z6m6",variantClassNames:{allowsSorting:{true:"_1enn18v3"},isFocusVisible:{true:"_1yep5z614w _1yep5z618s _1yep5z618q _1yep5z618t"}},defaultVariants:{},compoundVariants:[]}),I=a({defaultClassName:"_1enn18vi _1yep5z6m8 _1yep5z6m7 _1yep5z6is _1yep5z6lq",variantClassNames:{isDropTarget:{true:"_1yep5z614w"}},defaultVariants:{},compoundVariants:[]}),w=a({defaultClassName:"_1enn18v8 _1yep5z6m6 _1yep5z6lt _1yep5z6lq",variantClassNames:{isHovered:{true:"_1yep5z612t"},isSelected:{true:"_1yep5z612u"},isFocusVisible:{true:"_1yep5z614w _1yep5z618s _1yep5z618q _1yep5z618t"},isDisabled:{true:"_1enn18vc"}},defaultVariants:{},compoundVariants:[]}),P=a({defaultClassName:"_1enn18vf",variantClassNames:{sortDirection:{ascending:"_1enn18vg",descending:"_1enn18vh"}},defaultVariants:{},compoundVariants:[]}),B="_1enn18v5",E="_1enn18v0",H="_1enn18v1",S="_1enn18v6",h="_1enn18v7";var L=p.forwardRef(({className:e,style:r,...a},t)=>jsx(c,{ref:t,className:o=>a$1(typeof e=="function"?e(o):e,E,"BaselineUI-Table"),style:r,...a}));L.displayName="Table";var M=p.forwardRef(({className:e,style:r,...a},t)=>jsx(d,{ref:t,className:o=>a$1(typeof e=="function"?e(o):e,H,"BaselineUI-TableHeader"),style:r,...a}));M.displayName="TableHeader";var A=p.forwardRef(({className:e$1,style:r,children:a,...t},o)=>jsx(e,{ref:o,className:n=>a$1(typeof e$1=="function"?e$1(n):e$1,z({allowsSorting:n.allowsSorting,isFocusVisible:n.isFocusVisible}),"BaselineUI-Column"),style:r,...t,children:n=>jsxs(Fragment,{children:[typeof a=="function"?a(n):a,n.allowsSorting&&n.sortDirection?jsx(CaretDownIcon,{className:P({sortDirection:n.sortDirection}),"aria-hidden":"true"}):null]})}));A.displayName="Column";var V=p.forwardRef(({children:e,className:r,dependencies:a,isLoading:t,items:o,onLoadMore:n,scrollOffset:U,loadingLabel:k,style:q,...j},K)=>{let{formatMessage:G}=b();return process.env.NODE_ENV!=="production"&&t&&!n&&console.warn("[Baseline UI] TableBody: `isLoading` is set but `onLoadMore` is not provided. The loading spinner will not be displayed. Either provide `onLoadMore` or remove `isLoading`."),jsxs(f,{ref:K,className:J=>a$1(typeof r=="function"?r(J):r,B,"BaselineUI-TableBody"),style:q,...j,children:[o&&typeof e=="function"?jsx(l,{items:o,dependencies:a,children:e}):typeof e=="function"?null:e,n?jsx(i,{className:a$1(S,"BaselineUI-TableLoadMoreItem"),isLoading:t,onLoadMore:n,scrollOffset:U,children:t?jsx("div",{className:a$1(h,"BaselineUI-TableLoadMoreItemContent"),children:jsx(a$2,{"aria-label":k??G(W.loading),size:"sm"})}):null}):null]})});V.displayName="TableBody";var N=p.forwardRef(({className:e,style:r,...a},t)=>jsx(g,{ref:t,className:o=>a$1(typeof e=="function"?e(o):e,w({isHovered:o.isHovered,isSelected:o.isSelected,isFocusVisible:o.isFocusVisible,isDisabled:o.isDisabled}),"BaselineUI-Row"),style:r,...a}));N.displayName="Row";var F=p.forwardRef(({className:e,style:r,...a},t)=>jsx(h$1,{ref:t,className:o=>a$1(typeof e=="function"?e(o):e,R({isFocusVisible:o.isFocusVisible}),"BaselineUI-Cell"),style:r,...a}));F.displayName="Cell";var W=c$1({loading:{defaultMessage:"Loading",id:"bui.table.loading"}});function Y(e){let{scrollRef:r,...a}=e;return a$3({ref:r??{current:null},isDisabled:!r}),a$4({getItems:t=>[...t].map(o=>({"text/plain":String(o)})),renderDropIndicator(t){return jsx(c$2,{target:t,className:({isDropTarget:o})=>a$1(I({isDropTarget:o}),"BaselineUI-DropIndicator")})},...a})}export{L as a,M as b,A as c,V as d,N as e,F as f,Y as g};
@@ -1,10 +0,0 @@
1
- import {useState,useRef}from'react';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- function i(o,r){let[c,s]=useState(()=>{try{let t=window.localStorage.getItem(o);return t?JSON.parse(t):r}catch(t){return console.log(t),r}}),a=useRef(c);return [c,t=>{try{let e=typeof t=="function"?t(a.current):t;a.current=e,s(e),window.localStorage.setItem(o,JSON.stringify(e));}catch(e){console.log(e);}}]}export{i as a};
@@ -1,10 +0,0 @@
1
- /**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- var w=e=>p(e)?e.document:E(e)?e:e?.ownerDocument??(typeof document<"u"?document:void 0),s=e=>w(e)?.defaultView??(typeof window<"u"?window:void 0);function f(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function p(e){return typeof e=="object"&&e!=null&&"window"in e&&e.window===e}function E(e){return f(e)&&e.nodeType===9}function a(e){return f(e)&&e.nodeType===11&&"host"in e}function y(e,t,n,o){if(n==null||e==null)return ()=>{};let r=Array.isArray(e)?e:[e];for(let l of r)l.addEventListener(t,n,o);return ()=>{for(let l of r)l.removeEventListener(t,n,o);}}function h(e,t,n,o){if(e==null)return ()=>{};let r=new Array,l=Array.isArray(e)?e:[e];for(let i of l){let d=i.style.getPropertyValue(t),m=i.style.getPropertyPriority(t);i.style.setProperty(t,n,o),r.unshift(()=>{d?i.style.setProperty(t,d,m):i.style.removeProperty(t);});}return ()=>{for(let i of r)i();}}var T=true;function u(){return T}function P(e,t){if(!e||!t)return false;let n=t;for(;n!=null;){if(n===e)return true;let o=n.assignedSlot;o?n=o:a(n)?n=n.host:n=n.parentNode;}return false}var L=(e=document)=>{let t=e.activeElement;for(;t&&"shadowRoot"in t&&t.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t};function O(e){let t=e.target;if(t&&"shadowRoot"in t&&t.shadowRoot){if("composedPath"in e)return e.composedPath()[0]??null;if("composedPath"in e.nativeEvent)return e.nativeEvent.composedPath()[0]??null}return t}function c(e,t=document){if(typeof t.getElementById=="function"){let o=t.getElementById(e);if(o)return o}let n=t.children||[];for(let o of n){if(o.getAttribute&&o.getAttribute("id")===e)return o;if(o.shadowRoot){let l=c(e,o.shadowRoot);if(l)return l}let r=c(e,o);if(r)return r}return null}function A(e,t){if(t===null)return [];t=t??s(e);let n=[t];if(!e||e===t)return n;let o="getRootNode"in t?t.getRootNode():null,r=e.getRootNode()??null;for(;a(r)&&r!==o;)n.push(r),r=r.host.getRootNode();return n}function W(e){if(!e)return false;let t=e.getRootNode(),n=s(e);if(!(t instanceof n.Document||t instanceof n.ShadowRoot))return false;let o=t.activeElement;return o!=null&&e.contains(o)}export{w as a,s as b,f as c,a as d,y as e,h as f,u as g,P as h,L as i,O as j,c as k,A as l,W as m};
@@ -1,10 +0,0 @@
1
- import {a as a$3}from'./chunk-CWPFUB7B.mjs';import {a as a$e}from'./chunk-NV7KQVPE.mjs';import {a as a$f}from'./chunk-KVIV5RTE.mjs';import {f,b as b$4,i,g,a as a$b,h,c as c$3,e as e$1,d}from'./chunk-F3THHK5C.mjs';import {a as a$a}from'./chunk-NMSOOQB2.mjs';import {a as a$9}from'./chunk-OVJT5F2R.mjs';import {q}from'./chunk-3IPRT57V.mjs';import {c as c$2}from'./chunk-6DYTFYPO.mjs';import {p}from'./chunk-6Z3GYFG5.mjs';import {a as a$8}from'./chunk-EGYIHFEQ.mjs';import {a as a$7,b as b$5}from'./chunk-KCHAWPUN.mjs';import {b as b$3,e}from'./chunk-VPVF5N62.mjs';import {b}from'./chunk-4Y4WKIL5.mjs';import {b as b$2,c as c$1}from'./chunk-IDIZSV2Y.mjs';import {a as a$d}from'./chunk-DIL5HL6K.mjs';import {a as a$c}from'./chunk-OPIPJTLG.mjs';import {a as a$4}from'./chunk-5W6G3ZUT.mjs';import {a as a$6}from'./chunk-FPM5UJRF.mjs';import {a}from'./chunk-SGZWUG3H.mjs';import {a as a$1}from'./chunk-B3EZOXNU.mjs';import {a as a$5}from'./chunk-RT4LMB6X.mjs';import {b as b$1,c}from'./chunk-3WKDIXCM.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {sprinkles}from'@baseline-ui/tokens';import Z,{useRef,useLayoutEffect,useState,useContext,useEffect,useCallback,useMemo}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {XIcon}from'@baseline-ui/icons/12';import {useReducedMotion,motion}from'motion/react';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- var Fe=t=>a$9({getItems:(e,r)=>r.map(i=>({"text/plain":i.label})),renderDropIndicator(e){return jsx(c$2,{target:e,className:({isDropTarget:r})=>a$2(a$a({isDropTarget:r}),"BaselineUI-DropIndicator")})},...t});function Y(t,e){return t.find(r=>r.id===e)}function We(t,e,r){let i=[...t],l=i.filter(o=>r.has(o.id)),n=i.filter(o=>!r.has(o.id)),s=n.findIndex(o=>o.id===e);return n.flatMap((o,p)=>p===s?[...l,o]:o)}function $e(t,e,r){let i=[...t],l=i.filter(o=>r.has(o.id)),n=i.filter(o=>!r.has(o.id)),s=n.findIndex(o=>o.id===e);return n.flatMap((o,p)=>p===s?[o,...l]:o)}function oe(t){return t.map(e=>({id:e.id,label:e.label,data:{src:e.src,alt:e.alt}}))}function K(t){return t.map(e=>({id:e.id,label:e.label,src:e.data?.src,alt:e.data?.alt}))}var H={src:"src",alt:"alt"},T={sm:102,md:170};function Xe(t,e){let r=Y(t,e);return {[H.src]:r?.data?.src||"",[H.alt]:r?.data?.alt||"",key:String(e)}}function je(t){let e=t[H.src];return e?{src:String(e),alt:t[H.alt]?String(t[H.alt]):""}:null}function qe({fit:t,imageDimensions:e,item:r,isSelected:i}){let l={display:"block",objectFit:t},n=typeof e=="function"?r?e(r,{isSelected:i}):void 0:e;if(!n)return l;let s=typeof n.width=="string"?T[n.width]:n.width;return l.width=s,l.aspectRatio="height"in n?`${s} / ${n.height}`:n.aspectRatio.toString(),l}var Qe=Z.forwardRef(({className:t,children:e,style:r,isDisabled:i,onTruncatedChange:l,onHoverChange:n},s)=>{let o=useRef(null),{buttonProps:p}=a({elementType:"span",isDisabled:i},o);useLayoutEffect(()=>{o.current&&l?.(o.current.scrollWidth>o.current.clientWidth);},[e,l]);let{hoverProps:I}=a$1({isDisabled:i,onHoverChange:n});return jsx(b,{elementType:"span",slot:"label",...c(p,I),className:a$2(t,"BaselineUI-AdaptiveText"),tabIndex:-1,ref:b$1(o,s),style:r,role:void 0,children:e})});Qe.displayName="Label";var ie=Z.memo(Z.forwardRef(({children:t,isOpen:e,isDisabled:r,...i},l)=>{let[n,s]=useState(false),[o,p]=useState(false),I=a$3(),A=r||!o||I;return jsx(a$4,{text:t,variant:"inverse",includeArrow:false,size:"sm",placement:"bottom start",isOpen:(n||e)&&o,isDisabled:A,children:jsx(Qe,{...i,isDisabled:A,onTruncatedChange:p,onHoverChange:s,ref:l,children:t})})}));ie.displayName="AdaptiveText";var ut=({fit:t,item:e,deleteElement:r,loadingLabel:i})=>{let{formatMessage:l}=b$2(),{isLoading:n,imgProps:s}=a$e({src:e.data?.src,alt:e.data?.alt||""});return jsxs("div",{className:e$1,children:[n?jsx(a$f,{"aria-label":i??l(_.loading)}):jsx("div",{role:"img",className:d({isLoading:n}),"aria-label":s.alt||"",style:{backgroundImage:`url(${s.src})`,backgroundSize:t}}),r]})},Ye=({item:t,options:{isFocusVisible:e,isSelected:r,isFocused:i,isDisabled:l,isPressed:n},fit:s="contain",onDelete:o,className:p,imageClassName:I,imageLabelClassName:A,imageDimensions:O,style:U,layoutTransition:P=true,deleteLabel:z,loadingLabel:F,renderImage:W=(w,{deleteElement:k})=>jsx(ut,{item:w,deleteElement:k,fit:s,loadingLabel:F})})=>{let{formatMessage:w}=b$2(),k=o?jsx("div",{className:a$b,children:jsx(a$c,{"aria-label":z??w(_.delete),size:"xs",icon:XIcon,onPress:()=>{o(t.id);},isDisabled:l,UNSAFE_isVisuallyInteractiveOnly:true})}):null,v=K([t])[0],R=useCallback(C=>{let y={},c=typeof C=="function"?C(v,{isSelected:r}):C;return c&&(y.width=typeof c.width=="string"?T[c.width]:c.width,y.aspectRatio="height"in c?`${y.width} / ${c.height}`:c?.aspectRatio?.toString()),y},[v,r]),x=useMemo(()=>({isFocusVisible:e,isSelected:r,isFocused:i,isDisabled:l,isPressed:n}),[e,r,i,l,n]),B=!useReducedMotion()&&(typeof P=="boolean"?P:true),b=typeof P=="object"?P:void 0,$=R(O),X=B?motion.div:"div";return jsxs(X,{...B?{layout:"position",initial:false,transition:b}:{},className:a$2(c$3,a$7(p,v,x)),style:b$5(U,v,x),children:[jsx(a$d,{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center",flexGrow:0,children:jsx("div",{className:a$2(g({isFocusVisible:e,isSelected:r,isLoading:true}),a$7(I,v,x)),style:$,"data-image-key":t.id,children:W(t,{deleteElement:k??void 0,onDelete:o})})}),jsx(ie,{className:a$2(h({isFocusVisible:e,isSelected:r}),A),style:{maxWidth:$.width},isOpen:e,children:t.label})]})};var V={keys:[],isAll:false};function ht(t,e){return t==="all"?true:"has"in t&&typeof t.has=="function"?t.has(e):[...t].includes(e)}var et=Z.forwardRef(({className:t,style:e$1,fit:r="cover",onReorder:i$1,"data-block-id":l,"data-block-class":n,onDelete:s,imageWidth:o,aspectRatio:p$1,items:I,defaultItems:A=[],onKeyDown:O,imageContainerClassName:U,imageClassName:P,labelClassName:z,onListChange:F,renderImage:W,layoutTransition:w,imageDimensions:k,imageContainerStyle:v,deleteConfirmationTitle:R="Are you sure you want to delete this item?",deleteLabel:x,cancelLabel:le,loadingLabel:B,...b},$)=>{let{isVirtualized:X}=useContext(p),C=a$5($),[y,c]=useState(V),S=y.keys,{formatMessage:me}=b$2(),ce=o??T.sm,de=p$1??3/4,pe=o!==void 0||p$1!==void 0;useEffect(()=>{pe&&console.warn("ImageGallery: aspectRatio and imageWidth are deprecated. Use imageDimensions instead.");},[pe]);let ee=Z.useMemo(()=>k??{width:ce,aspectRatio:de},[k,ce,de]),[h,j]=a$6(b.selectedKeys,b.defaultSelectedKeys??[],b.onSelectionChange),tt=Z.useMemo(()=>I?oe(I):void 0,[I]),rt=Z.useMemo(()=>oe(A),[]),[u,N]=a$6(tt,rt,F?a=>{F?.(K(a));}:void 0),ot=useCallback(a=>{let m=a.target.key,d=a.keys;if(a.target.dropPosition==="before"){let f=We(u,m,d);N(f);}else if(a.target.dropPosition==="after"){let f=$e(u,m,d);N(f);}i$1?.(a);},[u,i$1,N]),{dragAndDropHooks:at}=Fe({onReorder:ot,isDisabled:!i$1,renderDragPreview:a=>jsx(i,{items:a,containerClassName:".BaselineUI-ImageGallery",previewClassName:g(),itemDataAttribute:"data-image-key",showCount:true,renderFallback:m=>{let d=je(m);if(!d)return null;let f=Y(u,m.key),q=f?K([f])[0]:void 0;return jsx("img",{...d,style:qe({fit:r,imageDimensions:ee,item:q,isSelected:ht(h,m.key)})})}}),getItems:a=>[...a].map(m=>Xe(u,m)),renderDropIndicator(a){return jsx(c$2,{target:a,className:a$2(b$4({isVirtualized:!!X}),"BaselineUI-DropIndicator")})}}),nt=useCallback(()=>{if(s&&S.length){if(y.isAll)j(new Set);else if(h!=="all"){let a=[...h],m=a.filter(d=>!S.includes(d));m.length!==a.length&&j(new Set(m));}N(u.filter(a=>!S.includes(a.id))),s(S),c(V);}},[S,y.isAll,u,s,h,N,j]),it=useCallback((a,m)=>{let d={id:a.id,label:a.label,src:a.data?.src,alt:a.data?.alt};return jsx(Ye,{item:a,options:m,fit:r,onDelete:s?f=>{m.isDisabled||c({keys:[f],isAll:false});}:void 0,renderImage:W,className:a$7(U,d,m),imageClassName:P,imageLabelClassName:z,imageDimensions:ee,style:v,layoutTransition:w,deleteLabel:x,loadingLabel:B},a.id)},[r,s,W,U,P,z,ee,v,w,x,B]);return useEffect(()=>{let a=C.current;if(!a)return;let m=d=>{if(O?.(d),d.key==="Backspace"||d.key==="Delete"){if(!s)return;let f=new Set(b.disabledKeys);if(h==="all"){c({keys:u.map(G=>G.id).filter(G=>!f.has(G)),isAll:true});return}let q=[...h];if(q.length){let G=q.filter(st=>!f.has(st));G.length&&c({keys:G,isAll:false});return}let te=d.target.closest("[data-key]");if(!te||!a.contains(te))return;let fe=te.dataset.key;if(f.has(fe))return;c({keys:[fe],isAll:false});}};return a.addEventListener("keydown",m),()=>{a.removeEventListener("keydown",m);}},[C,s,O,h,u,b.disabledKeys]),jsxs(Fragment,{children:[jsx(q,{...b,ref:C,style:e$1,className:a$2(f,"BaselineUI-ImageGallery",t),"data-block-id":l,"data-block-class":n,selectedKeys:h,items:u,dragAndDropHooks:at,layout:"grid",orientation:"vertical",renderOption:it,onSelectionChange:j,optionClassName:i$1&&!X?sprinkles({marginLeft:"sm"}):void 0}),jsx(b$3,{isOpen:!![...S].length,onOpenChange:a=>{a||c(V);},children:jsx(e,{isDismissable:true,children:jsx(a$8,{showCloseButton:false,title:typeof R=="function"?R(y.isAll?"all":new Set(S)):R,primaryActionLabel:x??me(_.delete),cancelLabel:le??me(_.cancel),onCancel:()=>{c(V);},onPrimaryAction:nt,autoFocusButton:"cancel"})})})]})});et.displayName="ImageGallery";var _=c$1({delete:{id:"bui.imageGallery.delete",defaultMessage:"Delete"},cancel:{id:"bui.imageGallery.cancel",defaultMessage:"Cancel"},loading:{id:"bui.imageGallery.loading",defaultMessage:"Loading"}});export{et as a};
@@ -1,10 +0,0 @@
1
- import {a}from'./chunk-PG3WDHSK.mjs';import {jsx}from'react/jsx-runtime';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- function M({description:r,errorMessage:t,warningMessage:a}){return r?"description":t?"errorMessage":a?"warningMessage":null}function d({description:r,errorMessageProps:t,descriptionProps:a$1,warningMessage:o,warningMessageProps:g,errorMessage:c,labelPosition:i,isDisabled:e}){switch(M({description:r,errorMessage:c,warningMessage:o})){case "description":return jsx("div",{...a$1,className:a({isDisabled:e,labelPosition:i}),"aria-disabled":e,children:r});case "errorMessage":return jsx("div",{...t,className:a({hasError:true,labelPosition:i}),"aria-disabled":e,children:c});case "warningMessage":return jsx("div",{...g,className:a({isDisabled:e,labelPosition:i}),"aria-disabled":e,children:o});default:return null}}export{M as a,d as b};
@@ -1,10 +0,0 @@
1
- import {b as b$1,d,e,c as c$1}from'./chunk-5ILCVLWY.mjs';import {a as a$2}from'./chunk-EFFODO2N.mjs';import {a,b as b$2}from'./chunk-SZTFMBPY.mjs';import {a as a$3}from'./chunk-DIL5HL6K.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$3}from'./chunk-K5RYVERS.mjs';import {a as a$5}from'./chunk-FPM5UJRF.mjs';import {a as a$1}from'./chunk-STMDFIUL.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import E,{useMemo,useCallback}from'react';import {Time,toZoned,toTime,GregorianCalendar,toCalendarDateTime,today,getLocalTimeZone}from'@internationalized/date';import {jsxs,jsx}from'react/jsx-runtime';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- function P(i){let{placeholderValue:a=new Time,minValue:p,maxValue:u,defaultValue:e,granularity:g,validate:f}=i,[t,m]=a$5(i.value,e??null,i.onChange),r=t||a,o=r&&"day"in r?r:void 0,d=e&&"timeZone"in e?e.timeZone:void 0,F=useMemo(()=>{let l=r&&"timeZone"in r?r.timeZone:void 0;return (l||d)&&a?toZoned(s(a),l||d):s(a)},[a,r,d]),T=useMemo(()=>s(p,o),[p,o]),y=useMemo(()=>s(u,o),[u,o]),V=useMemo(()=>t&&"day"in t?toTime(t):t,[t]),x=useMemo(()=>t==null?null:s(t),[t]),S=useMemo(()=>e==null?null:s(e),[e]);return {...c$1({...i,value:x,defaultValue:S,minValue:T,maxValue:y,onChange:l=>{m(o||d?l:l&&toTime(l));},granularity:g||"minute",maxGranularity:"hour",placeholderValue:F??void 0,createCalendar:()=>new GregorianCalendar,validate:useCallback(()=>f?.(t),[f,t])}),timeValue:V}}function s(i,a=today(getLocalTimeZone())){return i?"day"in i?i:toCalendarDateTime(a,i):null}var G=E.forwardRef(({className:i,labelPosition:a$5,"data-block-id":p,"data-block-class":u,...e$1},g)=>{let{locale:f}=b(),t={...e$1,validationState:void 0,isInvalid:e$1.validationState==="error"||!!e$1.errorMessage||void 0},m=P({...t,locale:f}),r=e$1.errorMessage||m.displayValidation.validationErrors.join(" "),o=c(),F=a({...e$1,errorMessage:r})==="warningMessage"?{...t,"aria-describedby":[e$1["aria-describedby"],o].filter(Boolean).join(" ")}:t,T=E.useRef(null),{labelProps:y,fieldProps:V,descriptionProps:x,errorMessageProps:S,isInvalid:D,inputProps:k}=b$1(F,m,T),l=b$2({...e$1,errorMessage:r,descriptionProps:x,errorMessageProps:S,warningMessageProps:{id:o},labelPosition:a$5}),{focusProps:W,isFocused:j}=a$1({within:true});return jsxs(a$2,{className:a$4("BaselineUI-TimeField",i),labelProps:y,fieldProps:V,ref:g,wrapperRef:T,wrapperClassName:d,labelPosition:a$5,message:l,isFocused:j,"data-block-id":p,"data-block-class":u,isInvalid:D,...e$1,children:[jsx(b$3,{children:jsx("input",{...k})}),jsx(a$3,{display:"flex",flexDirection:"row",paddingRight:"md",...W,children:m.segments.map((U,_)=>jsx(e,{segment:U,state:m},_))})]})});G.displayName="TimeField";export{G as a};
@@ -1,10 +0,0 @@
1
- import {a as a$2}from'./chunk-2JGVUCP5.mjs';import {a as a$6}from'./chunk-E3FP4B25.mjs';import {a as a$1}from'./chunk-7SKQUEHP.mjs';import {b}from'./chunk-K5RYVERS.mjs';import {a as a$5}from'./chunk-RSKKEGJZ.mjs';import {a as a$3}from'./chunk-STMDFIUL.mjs';import {a as a$4}from'./chunk-B3EZOXNU.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$7}from'./chunk-4QEH5CGK.mjs';import {CheckmarkIcon as CheckmarkIcon$1}from'@baseline-ui/icons/16';import {CheckmarkIcon}from'@baseline-ui/icons/20';import h from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- var R="_1yep5z6jb _1yep5z6jc _1yep5z6jd",x=a({defaultClassName:"_9b1tml0",variantClassNames:{isSelected:{true:"_9b1tml1",false:"_9b1tml2"},isDisabled:{true:"z9nup82"},isHovered:{true:"_9b1tml4"},isFocusVisible:{true:"_9b1tml5"},isReadOnly:{true:"_9b1tml6"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isFocusVisible:true,isReadOnly:false},"_9b1tml7"],[{isSelected:true,isHovered:true,isDisabled:false,isReadOnly:false},"_9b1tml8"],[{isSelected:false,isHovered:true,isDisabled:false,isReadOnly:false},"_9b1tml9"],[{isSelected:true,isDisabled:true},"_9b1tmla"],[{isSelected:true,isReadOnly:true},"_9b1tmlb"]]}),z=a({defaultClassName:"_9b1tmlf _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6ey _1yep5z6lq _1yep5z6e9",variantClassNames:{isSelected:{true:"_9b1tmlg"},size:{sm:"_9b1tmlh",md:"_9b1tmli"},isDisabled:{true:"_9b1tmlj"},isReadOnly:{true:"_1yep5z611h"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isDisabled:false,isReadOnly:false},"_1yep5z61o6"],[{isSelected:true,isDisabled:true},"_1yep5z61o6"],[{isSelected:false,isDisabled:true},"_1yep5z61o4"]]}),C=a({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var N=h.forwardRef(({className:P,count:V,style:D,size:t="md",icon:H,"data-block-id":I,"data-block-class":O,...a},T)=>{let l={isRequired:false},j=H||(t==="md"?CheckmarkIcon:CheckmarkIcon$1);!a["aria-label"]&&!a["aria-labelledby"]&&console.warn("You must provide either an `aria-label` or `aria-labelledby` prop to the `Reaction` component.");let s=h.useRef(null),d=a$1({...a,...l}),{inputProps:F,isPressed:w,isDisabled:r,isReadOnly:i,isSelected:c$1}=a$2({...a,...l},d,s),{focusProps:M,isFocused:q,isFocusVisible:n}=a$3(),{hoverProps:A,isHovered:b$1}=a$4({isDisabled:r}),B=a$5({"data-block-id":I,"data-block-class":O,"data-focused":q,"data-focus-visible":n,"data-disabled":r,"data-hovered":b$1,"data-pressed":w,"data-selected":c$1});return jsxs("label",{ref:T,style:D,className:a$7(R,"BaselineUI-Reaction",P),...B,children:[jsx(b,{children:jsx("input",{...c(F,M),ref:s})}),jsxs("div",{...A,className:x({isSelected:c$1,isFocusVisible:n,isHovered:b$1,isReadOnly:i,isDisabled:r}),children:[jsx("div",{className:C({isDisabled:r,isReadOnly:i}),children:jsx(j,{size:t==="md"?20:16})}),jsx("div",{className:z({isSelected:d.isSelected,isDisabled:r,isReadOnly:i,size:t}),children:jsx(a$6,{value:V})})]})]})});N.displayName="Reaction";export{N as a};
@@ -1,10 +0,0 @@
1
- import {a as a$m}from'./chunk-WDWBYTJG.mjs';import {a as a$a}from'./chunk-I7SMG6PT.mjs';import {a as a$3}from'./chunk-SVV6DLJH.mjs';import {a as a$c,b as b$4}from'./chunk-KQOXSF4J.mjs';import {b as b$6,c as c$4}from'./chunk-MHAPHPNN.mjs';import {a as a$2}from'./chunk-KT4FTBJ2.mjs';import {a as a$7,b as b$3,g,d,e as e$1,f,h as h$2}from'./chunk-6DYTFYPO.mjs';import {a as a$g}from'./chunk-TAT552A5.mjs';import {b as b$1}from'./chunk-XAM3AXXK.mjs';import {i,l,p,j,n,k,h as h$1,d as d$1,g as g$1,a as a$i}from'./chunk-6Z3GYFG5.mjs';import {a as a$o}from'./chunk-LDWNE2JT.mjs';import {a as a$l}from'./chunk-TLU2GNUT.mjs';import {a as a$p}from'./chunk-6GV3YWV7.mjs';import {c as c$3,b as b$8}from'./chunk-IDIZSV2Y.mjs';import {a as a$k}from'./chunk-DIL5HL6K.mjs';import {a as a$n}from'./chunk-OPIPJTLG.mjs';import {a as a$6}from'./chunk-GMALMQWI.mjs';import {a}from'./chunk-USMC34OO.mjs';import {b as b$7}from'./chunk-KG2EHFYA.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$b}from'./chunk-K5RYVERS.mjs';import {a as a$d}from'./chunk-NQIZ3U7Q.mjs';import {e,c,h,b as b$2,a as a$e}from'./chunk-RINS2TBF.mjs';import {k as k$1,l as l$1}from'./chunk-TZGK36KC.mjs';import {a as a$j}from'./chunk-Y2MIU76N.mjs';import {a as a$1}from'./chunk-FPM5UJRF.mjs';import {a as a$4}from'./chunk-STMDFIUL.mjs';import {a as a$9}from'./chunk-B3EZOXNU.mjs';import {a as a$8}from'./chunk-RT4LMB6X.mjs';import {c as c$1,b as b$5}from'./chunk-3WKDIXCM.mjs';import {a as a$5}from'./chunk-SVIYLH7R.mjs';import {c as c$2}from'./chunk-ETM4MNG4.mjs';import {a as a$f}from'./chunk-JQQGRJ5J.mjs';import {a as a$h}from'./chunk-4QEH5CGK.mjs';import Bt,{createContext,forwardRef,useRef,useEffect,useContext,useState,useMemo,useCallback,isValidElement}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {ChevronRightIcon}from'@baseline-ui/icons/8';import {DragIndicatorIcon}from'@baseline-ui/icons/12';import {themeVars,sprinkles}from'@baseline-ui/tokens';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- function he(t,o,e){let{gridProps:r}=b$6(t,o,e);return r.role="treegrid",{gridProps:r}}var bt={"ar-AE":{collapse:"\u0637\u064A",expand:"\u062A\u0645\u062F\u064A\u062F"},"bg-BG":{collapse:"\u0421\u0432\u0438\u0432\u0430\u043D\u0435",expand:"\u0420\u0430\u0437\u0448\u0438\u0440\u044F\u0432\u0430\u043D\u0435"},"cs-CZ":{collapse:"Sbalit",expand:"Rozt\xE1hnout"},"da-DK":{collapse:"Skjul",expand:"Udvid"},"de-DE":{collapse:"Reduzieren",expand:"Erweitern"},"el-GR":{collapse:"\u03A3\u03CD\u03BC\u03C0\u03C4\u03C5\u03BE\u03B7",expand:"\u0391\u03BD\u03AC\u03C0\u03C4\u03C5\u03BE\u03B7"},"en-US":{expand:"Expand",collapse:"Collapse"},"es-ES":{collapse:"Contraer",expand:"Expandir"},"et-EE":{collapse:"Ahenda",expand:"Laienda"},"fi-FI":{collapse:"Pienenn\xE4",expand:"Laajenna"},"fr-FR":{collapse:"R\xE9duire",expand:"D\xE9velopper"},"he-IL":{collapse:"\u05DB\u05D5\u05D5\u05E5",expand:"\u05D4\u05E8\u05D7\u05D1"},"hr-HR":{collapse:"Sa\u017Emi",expand:"Pro\u0161iri"},"hu-HU":{collapse:"\xD6sszecsuk\xE1s",expand:"Kibont\xE1s"},"it-IT":{collapse:"Comprimi",expand:"Espandi"},"ja-JP":{collapse:"\u6298\u308A\u305F\u305F\u3080",expand:"\u5C55\u958B"},"ko-KR":{collapse:"\uC811\uAE30",expand:"\uD3BC\uCE58\uAE30"},"lt-LT":{collapse:"Sutraukti",expand:"I\u0161skleisti"},"lv-LV":{collapse:"Sak\u013Caut",expand:"Izv\u0113rst"},"nb-NO":{collapse:"Skjul",expand:"Utvid"},"nl-NL":{collapse:"Samenvouwen",expand:"Uitvouwen"},"pl-PL":{collapse:"Zwi\u0144",expand:"Rozwi\u0144"},"pt-BR":{collapse:"Recolher",expand:"Expandir"},"pt-PT":{collapse:"Colapsar",expand:"Expandir"},"ro-RO":{collapse:"Restr\xE2nge\u021Bi",expand:"Extinde\u021Bi"},"ru-RU":{collapse:"\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C",expand:"\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C"},"sk-SK":{collapse:"Zbali\u0165",expand:"Rozbali\u0165"},"sl-SI":{collapse:"Strni",expand:"Raz\u0161iri"},"sr-SP":{collapse:" Skupi",expand:"Pro\u0161iri"},"sv-SE":{collapse:"D\xF6lj",expand:"Expandera"},"tr-TR":{collapse:"Daralt",expand:"Geni\u015Flet"},"uk-UA":{collapse:"\u0417\u0433\u043E\u0440\u043D\u0443\u0442\u0438",expand:"\u0420\u043E\u0437\u0433\u043E\u0440\u043D\u0443\u0442\u0438"},"zh-CN":{collapse:"\u6298\u53E0",expand:"\u6269\u5C55"},"zh-TW":{collapse:"\u6536\u5408",expand:"\u5C55\u958B"}};function pe(t,o,e){let{node:r}=t,n=c$4(t,o,e),a=n.rowProps["aria-expanded"]===true,s=b$7(bt,"@react-aria/tree"),c=a$j({"aria-label":a?s.format("collapse"):s.format("expand"),"aria-labelledby":n.rowProps.id}),p={onPress:()=>{n.isDisabled||(o.toggleKey(r.key),o.selectionManager.setFocused(true),o.selectionManager.setFocusedKey(r.key));},excludeFromTabOrder:true,preventFocusOnPress:true,"data-react-aria-prevent-focus":true,...c};return {...n,expandButtonProps:p}}var Pe=class t extends g$1{expandedKeys=new Set;withExpandedKeys(o,e){let r=this.clone();return r.expandedKeys=e,t.cloneAncestorSections(e,o,r),t.cloneAncestorSections(o,e,r),r.frozen=this.frozen,r}static cloneAncestorSections(o,e,r){for(let n of o)if(!e.has(n)){let a=n;for(;a!=null;){let s=r.getItem(a);if(s?.type==="section"){r.keyMap.set(a,s.clone());break}else a=s?.parentKey??null;}}}*[Symbol.iterator](){let o=this.getFirstKey(),e=o!=null?this.getItem(o):null;for(;e;)if(yield e,e.type==="section")e=e.nextKey!=null?this.getItem(e.nextKey):null;else {let r=this.getKeyAfter(e.key);e=r!=null?this.getItem(r):null;}}getLastKey(){let o=this.lastKey;if(o==null)return null;let e=this.getItem(o);for(;e?.lastChildKey!=null&&(e.type!=="item"||this.expandedKeys.has(e.key));)e=this.getItem(e.lastChildKey);return e?.key}getKeyAfter(o){let e=this.getItem(o);if(!e)return null;if((this.expandedKeys.has(e.key)||e.type!=="item")&&e.firstChildKey!=null)return e.firstChildKey;for(;e;){if(e.nextKey!=null)return e.nextKey;if(e.parentKey!=null)e=this.getItem(e.parentKey);else return null}return null}getKeyBefore(o){let e=this.getItem(o);if(!e)return null;if(e.prevKey!=null){for(e=this.getItem(e.prevKey);e&&(e.type!=="item"||this.expandedKeys.has(e.key))&&e.lastChildKey!=null;)e=this.getItem(e.lastChildKey);return e?.key??null}return e.parentKey}getChildren(o){let e=this;return {*[Symbol.iterator](){let r=e.getItem(o),n=r?.firstChildKey!=null?e.getItem(r.firstChildKey):null;if(r&&r.type==="section"&&n)for(;n&&n.key!==r.nextKey;){yield e.getItem(n.key);let a=e.getKeyAfter(n.key);n=a!=null?e.getItem(a):null;}else for(;n;)yield n,n=n.nextKey!=null?e.getItem(n.nextKey):null;}}}getTextValue(o){let e=this.getItem(o);return e?e.textValue:""}},Pt=createContext(null),fe=createContext(null),Re=forwardRef(function(o,e$1){return [o,e$1]=e(o,e$1,Pt),jsx(i,{content:jsx(l,{...o}),createCollection:()=>new Pe,children:r=>jsx(zt,{props:o,collection:r,treeRef:e$1})})}),Dt={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function zt({props:t,collection:o,treeRef:e}){let{dragAndDropHooks:r}=t,{direction:n}=b(),a$8=a({usage:"search",sensitivity:"base"}),s=!!r?.useDraggableCollectionState,c$2=!!r?.useDroppableCollectionState,p$1=useRef(s),D=useRef(c$2);useEffect(()=>{p$1.current!==s&&console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."),D.current!==c$2&&console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior.");},[s,c$2]);let{selectionMode:y="none",expandedKeys:S,defaultExpandedKeys:m,onExpandedChange:h$1,disabledBehavior:x="all"}=t,{CollectionRoot:P,isVirtualized:I,layoutDelegate:b$4,dropTargetDelegate:M}=useContext(p),[T,L]=a$1(S?new Set(S):void 0,m?new Set(m):new Set,h$1),[C,N]=useState(o),[E,v]=useState(T),[K,k]=useState(()=>o.withExpandedKeys(E,T));(!qt(E,T)||o!==C)&&(k(o.withExpandedKeys(E,T)),N(o),v(T));let l=a$2({...t,selectionMode:y,expandedKeys:T,onExpandedChange:L,collection:K,children:void 0,disabledBehavior:x}),{gridProps:i}=he({...t,isVirtualized:I,layoutDelegate:b$4},l,e),g$1,u,f,A=false,j=null,_=useRef(null);if(s&&r){g$1=r.useDraggableCollectionState({collection:l.collection,selectionManager:l.selectionManager,preview:r.renderDragPreview?_:void 0}),r.useDraggableCollection({},g$1,e);let te=r.DragPreview;j=r.renderDragPreview?jsx(te,{ref:_,children:r.renderDragPreview}):null;}let[J]=useState(()=>new a$3);if(c$2&&r){u=r.useDroppableCollectionState({collection:l.collection,selectionManager:l.selectionManager});let te=r.dropTargetDelegate||M||new r.ListDropTargetDelegate(l.collection,e,{direction:n});J.setup(te,l,n);let ge=new b$1({collection:l.collection,collator:a$8,ref:e,disabledKeys:l.selectionManager.disabledKeys,disabledBehavior:l.selectionManager.disabledBehavior,direction:n,layoutDelegate:b$4});f=r.useDroppableCollection({keyboardDelegate:ge,dropTargetDelegate:J,onDropActivate:V=>{if(V.target.type==="item"){let w=V.target.key,$=l.collection.getItem(w),_t=T.has(w);$&&$.hasChildNodes&&(!_t||r?.isVirtualDragging?.())&&l.toggleKey(w);}},onKeyDown:V=>{let w=u?.target;if(w&&w.type==="item"&&w.dropPosition==="on"){let $=l.collection.getItem(w.key);(V.key===Dt.expand[n]&&$?.hasChildNodes&&!l.expandedKeys.has(w.key)||V.key===Dt.collapse[n]&&$?.hasChildNodes&&l.expandedKeys.has(w.key))&&l.toggleKey(w.key);}}},u,e),A=u.isDropTarget({type:"root"});}let Q=!!(s&&!g$1?.isDisabled),{focusProps:ee,isFocused:U,isFocusVisible:X}=a$4(),B={isEmpty:l.collection.size===0,isFocused:U,isFocusVisible:X,isDropTarget:A,selectionMode:l.selectionManager.selectionMode,allowsDragging:!!Q,state:l},Nt=c({...t,children:void 0,defaultClassName:"react-aria-Tree",values:B}),Ae=null;if(l.collection.size===0&&t.renderEmptyState){let{isEmpty:te,...ge}=B,V=t.renderEmptyState({...ge});Ae=jsx("div",{role:"row",style:{display:"contents"},...{"aria-level":1},children:jsx("div",{role:"gridcell",style:{display:"contents"},children:V})});}let Ot=a$5(t,{global:true});return jsxs(Fragment,{children:[jsx(a$6,{children:jsxs(h.div,{...c$1(Ot,Nt,i,ee,f?.collectionProps),ref:e,slot:t.slot||void 0,"data-empty":l.collection.size===0||void 0,"data-focused":U||void 0,"data-drop-target":A||void 0,"data-focus-visible":X||void 0,"data-selection-mode":l.selectionManager.selectionMode==="none"?void 0:l.selectionManager.selectionMode,"data-allows-dragging":!!Q||void 0,children:[jsxs(b$2,{values:[[fe,l],[a$7,{dragAndDropHooks:r,dragState:g$1,dropState:u}],[b$3,{render:Gt}]],children:[c$2&&jsx(Wt,{}),jsx(g,{children:jsx(P,{collection:l.collection,persistedKeys:e$1(l.selectionManager,r,u),scrollRef:e,renderDropIndicator:d(r,u)})})]}),Ae]})}),j]})}var Ie=class extends a$i{static type="content"},Se=j(Ie,function(o){let e=useContext(It),r=c({children:o.children,values:e});return jsx(p.Provider,{value:n,children:r.children})}),It=createContext(null),Ce=class extends a$i{static type="item"},Ee=k(Ce,(t,o,e)=>{let r=useContext(fe);o=a$8(o);let{dragAndDropHooks:n,dragState:a,dropState:s}=useContext(a$7),c$3=a&&!(a.isDisabled||a.selectionManager.isDisabled(e.key)),{rowProps:p,gridCellProps:D,expandButtonProps:y,descriptionProps:S,...m}=pe({node:e,shouldSelectOnPressUp:!!a,focusMode:t.focusMode,allowsArrowNavigation:t.allowsArrowNavigation},r,o),h$3=p["aria-expanded"]===true,x=t.hasChildItems||[...r.collection.getChildren(e.key)].length>1,P=p["aria-level"]||1,{hoverProps:I,isHovered:b}=a$9({isDisabled:!m.allowsSelection&&!m.hasAction&&!c$3,onHoverStart:t.onHoverStart,onHoverChange:t.onHoverChange,onHoverEnd:t.onHoverEnd}),{isFocusVisible:M,focusProps:T}=a$4(),{isFocusVisible:L,focusProps:C}=a$4({within:true}),{checkboxProps:N}=a$a({key:e.key},r),E=null;a&&n&&(E=n.useDraggableItem({key:e.key,hasDragButton:true},a,o));let v=null,K=useRef(null),k=useRef(null),l=useRef(null),{visuallyHiddenProps:i}=a$b();s&&n&&(v=n.useDropIndicator({target:{type:"item",key:e.key,dropPosition:"on"},activateButtonRef:l},s,k));let g=a&&a.isDragging(e.key),u=v?.isDropTarget,f$1=r.selectionManager.selectionMode,A=r.selectionManager.selectionBehavior,j=Bt.useMemo(()=>({...m,isHovered:b,isFocusVisible:M,isExpanded:h$3,hasChildItems:x,level:P,selectionMode:f$1,selectionBehavior:A,isFocusVisibleWithin:L,state:r,id:e.key,allowsDragging:!!a,isDragging:g,isDropTarget:u}),[m,b,M,h$3,x,P,L,r,e.key,a,g,u,A,f$1]),_=c({...t,id:void 0,children:e.rendered,defaultClassName:"react-aria-TreeItem",defaultStyle:{"--tree-item-level":P},values:j});useEffect(()=>{!e.textValue&&process.env.NODE_ENV!=="production"&&console.warn("A `textValue` prop is required for <TreeItem> elements in order to support accessibility features such as type to select.");},[e.textValue]),useEffect(()=>{x&&!K.current&&process.env.NODE_ENV!=="production"&&console.warn("Expandable tree items must contain a expand button so screen reader users can expand/collapse the item.");},[]);let J=useRef(null);useEffect(()=>{a&&!J.current&&process.env.NODE_ENV!=="production"&&console.warn('Draggable items in a Tree must contain a <Button slot="drag"> element so that keyboard and screen reader users can drag them.');},[]);let Q=h$1({items:r.collection.getChildren(e.key),children:B=>{switch(B.type){case "content":return B.render(B);case "loader":case "item":return jsx(Fragment,{});default:throw new Error("Unsupported element type in TreeRow: "+B.type)}}}),ee=c$2(),U=a$5(t,{global:true});delete U.id,delete U.onClick;let X=f(E,n,o);return jsxs(Fragment,{children:[v&&!v.isHidden&&jsx("div",{role:"row","aria-level":p["aria-level"],"aria-expanded":p["aria-expanded"],"aria-label":v.dropIndicatorProps["aria-label"],children:jsxs("div",{role:"gridcell","aria-colindex":1,style:{display:"contents"},children:[jsx("div",{role:"button",...i,...v.dropIndicatorProps,ref:k}),p["aria-expanded"]!=null?jsx("div",{role:"button",...i,id:ee,"aria-label":y["aria-label"],"aria-labelledby":`${ee} ${p.id}`,tabIndex:-1,ref:l}):null]})}),jsx(h.div,{...c$1(U,p,T,I,C,X.itemProps),..._,ref:o,"data-expanded":x&&h$3||void 0,"data-has-child-items":x||void 0,"data-level":P,"data-selected":m.isSelected||void 0,"data-disabled":m.isDisabled||void 0,"data-hovered":b||void 0,"data-focused":m.isFocused||void 0,"data-focus-visible":M||void 0,"data-pressed":m.isPressed||void 0,"data-selection-mode":r.selectionManager.selectionMode==="none"?void 0:r.selectionManager.selectionMode,"data-allows-dragging":!!a||void 0,"data-dragging":g||void 0,"data-drop-target":u||void 0,children:jsx("div",{...D,style:{display:"contents"},children:jsx(b$2,{values:[[a$c,{slots:{[a$e]:{},selection:N}}],[b$4,{slots:{[a$e]:{},selection:N}}],[a$d,{slots:{[a$e]:{},chevron:{...y,ref:K},drag:{...X.dragButtonProps,ref:J}}}],[It,{...j}],[h$2,{isSelected:m.isSelected}]],children:Q})})})]})});j(d$1,function(o,e,r){let{isVirtualized:n}=useContext(p),a=useContext(fe),{isLoading:s,onLoadMore:c$2,scrollOffset:p$1,...D}=o,y=useRef(null),S=useMemo(()=>({onLoadMore:c$2,collection:a?.collection,sentinelRef:y,scrollOffset:p$1}),[c$2,p$1,a?.collection]);k$1(S,y),e=a$8(e);let{rowProps:m,gridCellProps:h$1}=pe({node:r},a,e),x=m["aria-level"]||1,P={role:"row","aria-level":m["aria-level"]},I=c({...D,id:void 0,children:r.rendered,defaultClassName:"react-aria-TreeLoader",values:{level:x}}),b={};return n&&(b={display:"contents"}),jsxs(Fragment,{children:[jsx("div",{style:{position:"relative",width:0,height:0},inert:l$1(true),children:jsx("div",{"data-testid":"loadMoreSentinel",ref:y,style:{position:"absolute",height:1,width:1}})}),s&&I.children&&jsx(h.div,{ref:e,...c$1(a$5(o),P),...I,"data-level":x,children:jsx("div",{...h$1,style:b,children:I.children})})]})});function Gt(t,o){o=a$8(o);let{dragAndDropHooks:e,dropState:r}=useContext(a$7),n=useRef(null),{dropIndicatorProps:a,isHidden:s,isDropTarget:c}=e.useDropIndicator(t,r,n);if(s)return null;let p=r&&t.target.type==="item"?(r.collection.getItem(t.target.key)?.level||0)+1:1;return jsx(Ut,{...t,dropIndicatorProps:a,isDropTarget:c,ref:o,buttonRef:n,level:p})}function jt(t,o){let{dropIndicatorProps:e,isDropTarget:r,buttonRef:n,level:a,...s}=t,{visuallyHiddenProps:c$1}=a$b(),p=c({...s,defaultClassName:"react-aria-DropIndicator",defaultStyle:{position:"relative","--tree-item-level":a},values:{isDropTarget:r}});return jsx(h.div,{...p,role:"row","aria-level":a,ref:o,"data-drop-target":r||void 0,children:jsxs("div",{role:"gridcell",children:[jsx("div",{...c$1,role:"button",...e,ref:n}),p.children]})})}var Ut=forwardRef(jt);function Wt(){let{dragAndDropHooks:t,dropState:o}=useContext(a$7),e=useRef(null),{dropIndicatorProps:r}=t.useDropIndicator({target:{type:"root"}},o,e),n=o.isDropTarget({type:"root"}),{visuallyHiddenProps:a}=a$b();return !n&&r["aria-hidden"]?null:jsx("div",{role:"row","aria-hidden":r["aria-hidden"],style:{position:"absolute"},children:jsx("div",{role:"gridcell",children:jsx("div",{role:"button",...a,...r,ref:e})})})}function qt(t,o){if(t.size!==o.size)return false;for(let e of t)if(!o.has(e))return false;return true}var Ct=({actionsPosition:t,onPrimaryAction:o,onSecondaryAction:e,primaryActionIcon:r,secondaryActionIcon:n,primaryActionAriaLabel:a,secondaryActionAriaLabel:s,expandLabel:c,collapseLabel:p,onRename:D,renameLabel:y,renderItemTitle:S,renderItem:m})=>Object.values({actionsPosition:t,onPrimaryAction:o,onSecondaryAction:e,primaryActionIcon:r,secondaryActionIcon:n,primaryActionAriaLabel:a,secondaryActionAriaLabel:s,expandLabel:c,collapseLabel:p,onRename:D,renameLabel:y,renderItemTitle:S,renderItem:m});var wt="_10dw1p98",Rt="_10dw1p96",St=["_10dw1p9b","_10dw1p9c"],Et="_10dw1p97",Lt=a$f({defaultClassName:"_10dw1p90 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z69f _1yep5z69g _1yep5z69h _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6m6 _1yep5z6lt _1yep5z6lq",variantClassNames:{isSelected:{true:"_1yep5z612u"},isHovered:{true:"_10dw1p92"},isRenaming:{true:"_10dw1p93"},isDropTarget:{true:"_1yep5z612t _1yep5z614w _1yep5z618s _1yep5z618q _1yep5z618t"},isFocusVisible:{true:"_1yep5z614w _1yep5z618s _1yep5z618q _1yep5z618t"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isSelected:false,isRenaming:false},"_1yep5z61pc _1yep5z61rl _1yep5z61va _1yep5z61v9 _1yep5z61vd"]]}),kt="_10dw1p99";function At(t,o){if(typeof t=="function"&&!t.prototype?.isReactComponent){let e=t(o);return isValidElement(e)?t:e}return t}var ke=({item:t,id:o,value:e,...r})=>{let{onPrimaryAction:n,onSecondaryAction:a,actionsPosition:s,primaryActionIcon:c,secondaryActionIcon:p,primaryActionAriaLabel:D,secondaryActionAriaLabel:y,expandLabel:S,collapseLabel:m,onRename:h,renameLabel:x,renderItemTitle:P,renderItem:I}=r,{formatMessage:b}=b$8(),{renamingKey:M,setRenamingKey:T}=useContext(Me),L=M===t.id,C=!!t.children?.length,N=t.icon,E=!!h,v=useRef(false),K=useMemo(()=>{let i=At(c,t.id),g=At(p,t.id),u=typeof D=="function"?D(t.id):D,f=typeof y=="function"?y(t.id):y;return i||g?jsxs(a$k,{display:"flex",flexDirection:"row",style:s==="end"?{marginInlineStart:"auto"}:void 0,children:[i?jsx(a$l,{icon:i,"aria-label":u,size:"sm",excludeFromTabOrder:true,variant:"secondary",onPress:()=>{n?.(t.id);},tooltip:true}):null,g?jsx(a$l,{icon:g,"aria-label":f,size:"sm",excludeFromTabOrder:true,variant:"secondary",onPress:()=>{a?.(t.id);},tooltip:true}):null]}):null},[s,c,t.id,p,D,y,n,a]),k=useCallback(i=>{a$m(i)||(i.key==="Enter"?(v.current=true,h?.({key:t.id,value:i.target.value}),T(null)):i.key==="Escape"&&(v.current=true,T(null)));},[t.id,h,T]),l$1=useCallback(()=>P?P(t):t.label,[P,t]);return jsxs(Ee,{id:t.id,value:t,textValue:t.label,"data-key":t.id,className:I?a$h(Rt,"BaselineUI-TreeView-Row"):i=>a$h(Et,Lt({isHovered:i.isHovered,isSelected:i.isSelected,isFocusVisible:i.isFocusVisible,isRenaming:L,isDropTarget:i.isDropTarget}),"BaselineUI-TreeView-Row"),children:[jsx(Se,{children:i=>{let g=i.allowsDragging?jsx(a$n,{slot:"drag",icon:DragIndicatorIcon,size:"xs",variant:"secondary",className:"BaselineUI-TreeView-DragHandle","data-testid":"tree-view-drag-handle"}):null;if(I){let f=I(t,{level:i.level,isExpanded:i.isExpanded,hasChildItems:i.hasChildItems,isSelected:i.isSelected,isFocusVisible:i.isFocusVisible,isFocusVisibleWithin:i.isFocusVisibleWithin,isHovered:i.isHovered,isPressed:i.isPressed,isDropTarget:!!i.isDropTarget,isDragging:!!i.isDragging,toggleExpanded:()=>{i.state.toggleKey(i.id);}});return g?jsxs(a$k,{display:"flex",flexDirection:"row",alignItems:"center",children:[g,jsx("div",{style:{flex:1,minWidth:0},children:f})]}):f}let u=i.level-1;return jsxs(Fragment,{children:[g,s==="start"?K:null,jsxs(a$k,{display:"flex",flexDirection:"row",alignItems:"center",children:[jsxs(a$k,{display:"flex",padding:"sm",flexDirection:"row",alignItems:"center",gap:"md",style:{marginInlineStart:`calc(${u*2} * ${themeVars.spacing.lg})`},children:[jsx(a$n,{icon:ChevronRightIcon,size:"xxs",variant:"secondary",onPress:()=>{i.state.toggleKey(i.id);},"aria-label":i.isExpanded?m??b(Le.collapse):S??b(Le.expand),style:{visibility:C?"visible":"hidden"},className:a$h(wt,"BaselineUI-TreeView-ExpansionToggle")}),N?jsx(N,{size:16,style:{color:themeVars.color.icon.interactive.disabled}}):null]}),jsxs(a$k,{paddingLeft:"sm",paddingY:L?"none":"md",display:"flex",flexDirection:"column",gap:"xs",onDoubleClick:f=>{E&&(f.stopPropagation(),f.preventDefault(),T(t.id));},children:[L?jsx("div",{onClick:f=>{f.stopPropagation();},children:jsx(a$o,{defaultValue:t.label,autoFocus:true,onFocus:()=>{v.current=false;},onBlur:f=>{if(v.current){v.current=false;return}h?.({key:t.id,value:f.target.value}),T(null);},"aria-label":x??b(Le.rename),onKeyDown:k,className:"BaselineUI-TreeView-RenameInput"})}):jsx(a$p,{type:"label",size:"sm",className:a$h(sprinkles.compoundVariants({color:"text.primary"}),"BaselineUI-TreeView-Title"),children:l$1()}),t.description?jsx(a$p,{type:"helper",size:"sm",className:"BaselineUI-TreeView-Description",children:t.description}):null]})]}),s==="end"?K:null]})}}),jsx(l,{items:t.children,children:i=>jsx(ke,{item:i,...r})})]})},Le=c$3({expand:{id:"bui.treeView.expand",defaultMessage:"Expand"},collapse:{id:"bui.treeView.collapse",defaultMessage:"Collapse"},rename:{id:"bui.treeView.rename",defaultMessage:"Rename"}});var Me=createContext({renamingKey:null,setRenamingKey:()=>{}}),Ht=Bt.forwardRef(({className:t,style:o,"data-block-id":e,"data-block-class":r,items:n,onPrimaryAction:a,onSecondaryAction:s,primaryActionIcon:c,secondaryActionIcon:p,primaryActionAriaLabel:D,secondaryActionAriaLabel:y,actionsPosition:S="start",expandLabel:m,collapseLabel:h,onRename:x,renameLabel:P,onAction:I,renderItemTitle:b,dragAndDropHooks:M,keyboardNavigationBehavior:T,renderItem:L,...C},N)=>{let E=useRef(null);a$g({ref:E,isDisabled:!M});let[v,K]=useState(null),k=L!==void 0,l=S==="start"?[c,p].filter(Boolean).length:0;useEffect(()=>{let u=E.current;if(!u||!x||k)return;let f=A=>{if(A.key==="F2"){let _=u.querySelector("[data-focused='true']")?.dataset.key;_&&(A.preventDefault(),A.stopPropagation(),K(_));}};return u.addEventListener("keydown",f),()=>{u.removeEventListener("keydown",f);}},[x,k]);let i=useMemo(()=>({renamingKey:v,setRenamingKey:K}),[v]),g={actionsPosition:S,onPrimaryAction:a,onSecondaryAction:s,primaryActionIcon:c,secondaryActionIcon:p,primaryActionAriaLabel:D,secondaryActionAriaLabel:y,expandLabel:m,collapseLabel:h,onRename:x,renameLabel:P,renderItemTitle:b,renderItem:L};return jsx(Me.Provider,{value:i,children:jsx(Re,{ref:b$5(N,E),items:n.children||[],selectionMode:"multiple",expandedKeys:C.expandedKeys,defaultExpandedKeys:C.defaultExpandedKeys,onExpandedChange:C.onExpandedChange,selectedKeys:C.selectedKeys,disallowEmptySelection:C.disallowEmptySelection,onAction:I,dragAndDropHooks:M,keyboardNavigationBehavior:T,"aria-label":C["aria-label"],"aria-labelledby":C["aria-labelledby"],"data-block-id":e,"data-block-class":r,style:o,className:a$h(t,!k&&kt,!k&&St[l-1],"BaselineUI-TreeView"),dependencies:Ct(g),children:u=>jsx(ke,{item:u,...g})})})});Ht.displayName="TreeView";export{Ht as a};
@@ -1,10 +0,0 @@
1
- import {a as a$2}from'./chunk-2JGVUCP5.mjs';import {a as a$1}from'./chunk-7SKQUEHP.mjs';import {a as a$7}from'./chunk-DIL5HL6K.mjs';import {b}from'./chunk-K5RYVERS.mjs';import {a as a$5}from'./chunk-RSKKEGJZ.mjs';import {a as a$3}from'./chunk-STMDFIUL.mjs';import {a as a$4}from'./chunk-B3EZOXNU.mjs';import {c as c$1}from'./chunk-3WKDIXCM.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import T from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- var D=a({defaultClassName:"bpklwaa z9nup88",variantClassNames:{isReadOnly:{true:"bpklwab"},isDisabled:{true:"bpklwac"},isSelected:{true:"bpklwad"},isFocused:{true:"bpklwae"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isDisabled:false,isReadOnly:false},"bpklwaf"]]}),R=a({defaultClassName:"bpklwal",variantClassNames:{isDisabled:{true:"bpklwam"},isSelected:{true:"bpklwan"},isReadOnly:{true:"bpklwao"}},defaultVariants:{},compoundVariants:[]}),P=a({defaultClassName:"bpklwag",variantClassNames:{isDisabled:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),B=a({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"},hasDescription:{true:"bpklwa3"}},defaultVariants:{},compoundVariants:[[{labelPosition:"left",hasDescription:true},"bpklwa4"]]}),I=a({defaultClassName:"bpklwa8",variantClassNames:{isDisabled:{true:"bpklwa9"}},defaultVariants:{},compoundVariants:[]}),L=a({defaultClassName:"bpklwai",variantClassNames:{labelPosition:{top:"bpklwaj",left:"bpklwak"}},defaultVariants:{},compoundVariants:[]}),O=a({defaultClassName:"bpklwa5",variantClassNames:{labelPosition:{top:"bpklwa6",left:"bpklwa7"}},defaultVariants:{},compoundVariants:[]});var H=T.forwardRef(({className:U,description:s,label:o,labelPosition:d="top",statusLabel:r,style:F,"data-block-id":E,"data-block-class":K,...a},j)=>{let w=T.useRef(null),f=c(),k=c(),t=a$1(a),n=!!a.isDisabled,p=!!s&&!!o&&!a["aria-label"]&&!a["aria-labelledby"],z=p?[f,r&&k].filter(Boolean).join(" "):a["aria-labelledby"],{inputProps:M,isPressed:W,labelProps:_,descriptionProps:A}=a$2({...a,children:o,"aria-labelledby":z},t,w),{isFocusVisible:c$2,focusProps:X}=a$3(),{hoverProps:q,isHovered:G}=a$4({isDisabled:a.isDisabled}),J=a$5({"data-block-id":E,"data-block-class":K,"data-focused":c$2,"data-disabled":a.isDisabled,"data-focus-visible":c$2,"data-selected":t.isSelected,"data-readonly":a.isReadOnly,"data-hovered":G,"data-pressed":W}),h=jsx("div",{className:a$6(D({isSelected:t.isSelected,isDisabled:n,isFocused:c$2,isReadOnly:!!a.isReadOnly}),"BaselineUI-Switch-Track"),children:jsx("div",{className:a$6(R({isSelected:t.isSelected,isDisabled:a.isDisabled,isReadOnly:a.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})}),v=o?jsx("span",{id:p?f:void 0,className:a$6(P({isDisabled:n}),"BaselineUI-Switch-Label"),children:o}):null;return jsxs("label",{...c$1(J,_,q),className:a$6(B({labelPosition:d,hasDescription:!!s}),"BaselineUI-Switch",U),style:F,ref:j,children:[s?jsxs("span",{className:L({labelPosition:d}),children:[v,jsx(a$7,{...A,elementType:"span",className:"BaselineUI-Switch-Description",color:n?"text.interactive.disabled":"text.helper",typography:"label.sm.medium",children:s})]}):v,jsx(b,{children:jsx("input",{...c$1(M,X),ref:w})}),r?jsxs("div",{className:O({labelPosition:d}),children:[jsx("span",{id:p?k:void 0,className:a$6("BaselineUI-Switch-Status-Label",I({isDisabled:n})),children:t.isSelected?r.on:r.off}),h]}):h]})});H.displayName="Switch";export{H as a};
@@ -1,10 +0,0 @@
1
- import {a as a$4}from'./chunk-G77E7EDE.mjs';import {a as a$6}from'./chunk-LSPDPDB6.mjs';import {d}from'./chunk-QMV2O57M.mjs';import {a as a$1}from'./chunk-NGZRN4SF.mjs';import {c,b}from'./chunk-IDIZSV2Y.mjs';import {b as b$1}from'./chunk-KG2EHFYA.mjs';import {b as b$2}from'./chunk-K5RYVERS.mjs';import {a as a$5}from'./chunk-FPM5UJRF.mjs';import {a as a$9}from'./chunk-STMDFIUL.mjs';import {a as a$8}from'./chunk-B3EZOXNU.mjs';import {a as a$2}from'./chunk-RT4LMB6X.mjs';import {c as c$1}from'./chunk-3WKDIXCM.mjs';import {a as a$7}from'./chunk-SVIYLH7R.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import fe,{useMemo,useCallback,useEffect,useRef}from'react';import {CheckmarkIcon}from'@baseline-ui/icons/12';import {CheckmarkIcon as CheckmarkIcon$1}from'@baseline-ui/icons/16';import {jsx,jsxs}from'react/jsx-runtime';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- var Y={"ar-AE":{steplist:"\u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u062E\u0637\u0648\u0627\u062A"},"bg-BG":{steplist:"\u0421\u043F\u0438\u0441\u044A\u043A \u0441\u044A\u0441 \u0441\u0442\u044A\u043F\u043A\u0438"},"cs-CZ":{steplist:"Seznam krok\u016F"},"da-DK":{steplist:"Trinliste"},"de-DE":{steplist:"Schrittliste"},"el-GR":{steplist:"\u039B\u03AF\u03C3\u03C4\u03B1 \u03B2\u03B7\u03BC\u03AC\u03C4\u03C9\u03BD"},"en-US":{steplist:"Step List"},"es-ES":{steplist:"Lista de pasos"},"et-EE":{steplist:"Sammude loend"},"fi-FI":{steplist:"Vaiheluettelo"},"fr-FR":{steplist:"Liste des \xE9tapes"},"he-IL":{steplist:"\u05E8\u05E9\u05D9\u05DE\u05EA \u05E6\u05E2\u05D3\u05D9\u05DD"},"hr-HR":{steplist:"Lista koraka"},"hu-HU":{steplist:"L\xE9p\xE9sek list\xE1ja"},"it-IT":{steplist:"Elenco dei passaggi"},"ja-JP":{steplist:"\u624B\u9806\u30EA\u30B9\u30C8"},"ko-KR":{steplist:"\uB2E8\uACC4 \uBAA9\uB85D"},"lt-LT":{steplist:"\u017Dingsni\u0173 s\u0105ra\u0161as"},"lv-LV":{steplist:"Darb\u012Bbu saraksts"},"nb-NO":{steplist:"Trinnliste"},"nl-NL":{steplist:"Stappenlijst"},"pl-PL":{steplist:"Lista krok\xF3w"},"pt-BR":{steplist:"Lista de etapas"},"pt-PT":{steplist:"Lista de passos"},"ro-RO":{steplist:"Lista de pa\u0219i"},"ru-RU":{steplist:"\u0421\u043F\u0438\u0441\u043E\u043A \u0448\u0430\u0433\u043E\u0432"},"sk-SK":{steplist:"Zoznam krokov"},"sl-SI":{steplist:"Seznam korakov"},"sr-SP":{steplist:"Lista koraka"},"sv-SE":{steplist:"Steglista"},"tr-TR":{steplist:"Ad\u0131m Listesi"},"uk-UA":{steplist:"\u0421\u043F\u0438\u0441\u043E\u043A \u043A\u0440\u043E\u043A\u0456\u0432"},"zh-CN":{steplist:"\u6B65\u9AA4\u5217\u8868"},"zh-TW":{steplist:"\u6B65\u9A5F\u6E05\u55AE"}};function N(p,t,a){let{"aria-label":s}=p,{listProps:i}=a$6({...p,...t,allowsTabNavigation:true,ref:a}),r=b$1(Y,"@react-aria/steplist");return {listProps:{...{...c$1(i,a$7(p,{labelable:true})),"aria-label":s||r.format("steplist")},tabIndex:void 0}}}function D(p){let t=a$4({...p,onSelectionChange:p.onSelectionChange?e=>{e!=null&&p.onSelectionChange?.(e);}:void 0}),[a,s]=a$5(p.lastCompletedStep,p.defaultLastCompletedStep??null,p.onLastCompletedStepChange),{setSelectedKey:i,selectedKey:r,collection:l}=t,{indexMap:n,keysLinkedList:_}=useMemo(()=>me(l),[l]),z=r!=null?n.get(r):0,c=useCallback(e=>e===void 0?false:e!==null&&a!==null&&n.has(e)&&n.has(a)&&n.get(e)<=n.get(a),[n,a]),g=useCallback((e,d)=>{let y=null;if(e&&e.size>0)for(y=e.getFirstKey();y!==e.getLastKey()&&y&&(d.has(y)||c(y));)y=e.getKeyAfter(y);return y},[c]);useEffect(()=>{let e=t.selectedKey;(t.selectionManager.isEmpty||e==null||!t.collection.getItem(e))&&(e=g(t.collection,t.disabledKeys),e!==null&&t.selectionManager.replaceSelection(e)),t.selectionManager.focusedKey==null&&t.selectionManager.setFocusedKey(e);let d=(a!==null?n.get(a):-1)??-1;z!==void 0&&z>0&&z>d+1&&e!==null&&_.has(e)&&s(_.get(e));});function m(e){if(p.isDisabled||t.disabledKeys.has(e)||p.isReadOnly)return false;if(c(e))return true;let d=_.get(e);return c(d)||e===t.collection.getFirstKey()}function h(e){let d=_.get(e);d&&!c(d)&&s(d),i(e);}return {...t,setSelectedKey:h,setLastCompletedStep:s,isCompleted:c,isSelectable:m}}function me(p){let t=new Map,a=new Map,s=0,i;for(let r of p)t.set(r.key,s),a.set(r.key,i?.key),i=r,s++;return {indexMap:t,keysLinkedList:a}}var ee=a({defaultClassName:"_41r3q2q _1yep5z6kb _1yep5z6kc _1yep5z6kd",variantClassNames:{variant:{condensed:"_41r3q2r _1yep5z618j",expanded:"_41r3q2s _1yep5z6us _1yep5z6ut _1yep5z6uu _1yep5z6sg _1yep5z6sh _1yep5z6si _1yep5z6173 _1yep5z6174 _1yep5z6175"},status:{complete:"_1yep5z6136",active:"_41r3q2u",incomplete:"_41r3q2v"}},defaultVariants:{},compoundVariants:[]}),te=a({defaultClassName:"_1yep5z6ez",variantClassNames:{size:{sm:"_1yep5z610e",md:"_1yep5z610h"},isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),se=a({defaultClassName:"_41r3q28 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6mf _1yep5z6mh _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv _1yep5z6m0",variantClassNames:{size:{sm:"_41r3q29 _1yep5z610e",md:"_41r3q2a _1yep5z610h"},status:{complete:"_41r3q2b _1yep5z6136 _1yep5z611n",active:"_1yep5z612s _1yep5z611h _1yep5z6142",incomplete:"_1yep5z612s _1yep5z611h _1yep5z613z"},isDisabled:{true:"_41r3q2e"},isFocusVisible:{true:"_41r3q2f"}},defaultVariants:{},compoundVariants:[[{status:"complete",isDisabled:true},"_41r3q2g _1yep5z61pt _1yep5z61o6"],[{status:"active",isDisabled:true},"_1yep5z61pb _1yep5z61o4 _1yep5z61qp"],[{status:"incomplete",isDisabled:true},"_1yep5z61pb _1yep5z61o4 _1yep5z61qp"]]}),pe=a({defaultClassName:"_41r3q23 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1",variantClassNames:{variant:{condensed:"_1yep5z618j _1yep5z6vy _1yep5z6vz _1yep5z6w0",expanded:"_41r3q25 _1yep5z6173 _1yep5z6174 _1yep5z6175"},isLast:{true:"_41r3q26"}},defaultVariants:{},compoundVariants:[]}),ae="_41r3q27 _1yep5z60 _1yep5z61 _1yep5z62 _1yep5z62c _1yep5z62d _1yep5z62e _1yep5z63i _1yep5z63j _1yep5z63k _1yep5z616 _1yep5z617 _1yep5z618 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6m5",ie=a({defaultClassName:"_41r3q20 _1yep5z613 _1yep5z614 _1yep5z615 _1yep5z63f _1yep5z63g _1yep5z63h _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b _1yep5z65r _1yep5z65s _1yep5z65t _1yep5z683 _1yep5z684 _1yep5z685 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z66x _1yep5z66y _1yep5z66z _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj",variantClassNames:{variant:{condensed:"_1yep5z616i _1yep5z616j _1yep5z616k _1yep5z6vy _1yep5z6vz _1yep5z6w0",expanded:"_1yep5z616c _1yep5z616d _1yep5z616e _1yep5z618m _1yep5z618l _1yep5z6wy _1yep5z6wz _1yep5z6x0"}},defaultVariants:{},compoundVariants:[]}),re="_41r3q2h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6jw _1yep5z6jx _1yep5z6jy _1yep5z6kt _1yep5z6ku _1yep5z6kv _1yep5z6kk _1yep5z6kl _1yep5z6km _1yep5z69c _1yep5z69d _1yep5z69e",oe=a({defaultClassName:"_1yep5z6ey",variantClassNames:{size:{sm:"_1yep5z610h",md:"_1yep5z610k"},isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]});function A(p,t,a){let{key:s}=p,{selectionManager:i,selectedKey:r}=t,l=!t.isSelectable(s),{itemProps:n}=d({isDisabled:l,key:s,ref:a,selectionManager:i});return {stepProps:{...n,role:"link","aria-current":r===s?"step":void 0,"aria-disabled":l?true:void 0,tabIndex:l?void 0:0}}}function ne({state:p,item:t,size:a,variant:s,index:i,isLast:r,stepLabel:l,completedLabel:n,isDisabled:_}){let z=useRef(null),c=b(),{stepProps:g}=A({key:t.key},p,z),m=_||p.disabledKeys.has(t.key),{hoverProps:h,isHovered:e}=a$8({isDisabled:m}),{focusProps:d,isFocused:y,isFocusVisible:v}=a$9(),k=p.isCompleted(t.key),P=p.selectedKey===t.key,b$1=k?"complete":P?"active":"incomplete",S=t["aria-label"],C=!!S&&!t.description,j=s==="expanded"&&!!t.title&&!C,q=s==="expanded"&&!!t.description,o=t.title||((typeof l=="function"?l({index:i+1}):l)??c.formatMessage(le.step,{index:i+1})),x=n??c.formatMessage(le.completed),M=a==="sm"?CheckmarkIcon:CheckmarkIcon$1;return jsxs("li",{className:a$3("BaselineUI-Stepper-Item",pe({variant:s,isLast:r})),"data-status":b$1,children:[jsxs("a",{...c$1(g,h,d),ref:z,"aria-label":k&&S?[x,S].join(" "):S||void 0,className:a$3("BaselineUI-Stepper-StepLink",ae),"data-status":b$1,"data-hovered":e||void 0,"data-focused":y||void 0,"data-focus-visible":v||void 0,"data-disabled":m||void 0,children:[jsx("span",{className:a$3("BaselineUI-Stepper-Indicator",se({size:a,status:b$1,isDisabled:m,isFocusVisible:v})),"aria-hidden":"true",children:k?jsx(M,{}):jsx("span",{children:i+1})}),k?jsx(b$2,{children:x}):null,j?jsxs("span",{className:a$3("BaselineUI-Stepper-Text",re),children:[jsx("span",{className:a$3("BaselineUI-Stepper-Title",oe({size:a,isDisabled:m})),children:t.title}),q?jsx("span",{className:a$3("BaselineUI-Stepper-Description",te({size:a,isDisabled:m})),children:t.description}):null]}):S?null:jsx(b$2,{children:o})]}),!r&&jsx("span",{className:a$3("BaselineUI-Stepper-Connector",ee({variant:s,status:b$1})),"aria-hidden":"true"})]})}var le=c({step:{defaultMessage:"Step {index}",id:"bui.stepper.step"},completed:{defaultMessage:"Completed",id:"bui.stepper.completed"}});var de=fe.forwardRef(function(t,a){let{items:s,variant:i="expanded",size:r="md",selectedStep:l,defaultSelectedStep:n,onSelectionChange:_,lastCompletedStep:z,defaultLastCompletedStep:c,onLastCompletedStepChange:g,isDisabled:m,className:h,style:e,"aria-label":d,stepLabel:y,completedLabel:v}=t,k=b(),P=useMemo(()=>new Set(s.filter(o=>o.isDisabled).map(o=>o.key)),[s]),b$1=useMemo(()=>s.map(o=>jsx(a$1,{textValue:o.title??String(o.key),children:o.title??""},o.key)),[s]),S=useMemo(()=>new Map(s.map(o=>[o.key,o])),[s]),C=D({children:b$1,selectedKey:l,defaultSelectedKey:n,onSelectionChange:_,lastCompletedStep:z,defaultLastCompletedStep:c,onLastCompletedStepChange:g,disabledKeys:P,isDisabled:m}),j=a$2(a),{listProps:q}=N({children:b$1,"aria-label":d||k.formatMessage(be.label)},C,j);return jsx("ol",{...q,ref:j,className:a$3("BaselineUI-Stepper",ie({variant:i}),h),style:e,"data-variant":i,"data-size":r,children:[...C.collection].map((o,x,M)=>{let E=S.get(o.key);return E?jsx(ne,{state:C,item:E,size:r,variant:i,index:x,isLast:x===M.length-1,stepLabel:y,completedLabel:v,isDisabled:m},o.key):null})})});de.displayName="Stepper";var be=c({label:{defaultMessage:"Progress",id:"bui.stepper.label"}});export{de as a};
@@ -1,10 +0,0 @@
1
- import {a as a$2}from'./chunk-4WVW4KEK.mjs';import {a as a$1}from'./chunk-TAYP2OGC.mjs';import {a as a$3}from'./chunk-FX3THTOK.mjs';import {B as B$1}from'./chunk-TYKMNZJ4.mjs';import {b}from'./chunk-INFMXVHD.mjs';import {a as a$5}from'./chunk-DIL5HL6K.mjs';import {a as a$4}from'./chunk-OQPYPKZV.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {UploadIcon}from'@baseline-ui/icons/20';import o from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- var U="_1yep5z6dv _1yep5z6f0",B=a({defaultClassName:"_12y0zas5 _1yep5z6c _1yep5z6d _1yep5z6e _1yep5z62o _1yep5z62p _1yep5z62q _1yep5z63u _1yep5z63v _1yep5z63w _1yep5z61i _1yep5z61j _1yep5z61k _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6m3 _1yep5z6dy _1yep5z6f5",variantClassNames:{isDisabled:{true:"_12y0zas6 _1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),P=a({defaultClassName:"_12y0zas0 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6m3 _1yep5z6gb",variantClassNames:{isInline:{true:"_1yep5z6x4 _1yep5z6x5 _1yep5z6x6 _1yep5z6xs _1yep5z6xt _1yep5z6xu _1yep5z6yg _1yep5z6yh _1yep5z6yi _1yep5z6z4 _1yep5z6z5 _1yep5z6z6 _1yep5z618z _1yep5z6190 _1yep5z6140"},isDropTarget:{true:"_1yep5z6132"},isError:{true:"_1yep5z618y _1yep5z6191 _1yep5z613e"},isDisabled:{true:"_1yep5z618y _1yep5z6190 _1yep5z6146"}},defaultVariants:{},compoundVariants:[[{isInline:true,isError:true},"_1yep5z61vi _1yep5z61vk _1yep5z61px"]]}),E=a({defaultClassName:"_12y0zas7 _1yep5z6fa",variantClassNames:{isDisabled:{true:"_1yep5z611u"}},defaultVariants:{},compoundVariants:[]}),L="_1yep5z6dv _1yep5z6ee",w="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69f _1yep5z69g _1yep5z69h",D="_1yep5z6dy _1yep5z6ez",R="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6m3";var Y="Drop files here or click to upload",ee="Upload",A=o.forwardRef(({className:O,style:S,variant:f="dropzone",isInline:H=false,label:t,description:n,onAdd:c$1,accept:a,allowsMultiple:i=true,isDisabled:e,errorMessage:y,buttonLabel:$=ee,dropzoneLabel:q=Y},Z)=>{let l=o.useId(),v=o.useId(),b$1=o.useId(),j=o.useId(),x=o.useRef(null),z=o.useCallback(r=>{if(!r.length)return;let X=i?r:r.slice(0,1);c$1?.(X);},[i,c$1]),C=r=>{r&&z([...r]);},{dropProps:G,isDropTarget:J}=B$1({ref:x,isDisabled:e,onDrop:async r=>{z(await a$1({items:r.items,accept:a}));}}),{clipboardProps:K}=a$2({isDisabled:e,onPaste:async r=>{z(await a$1({items:r,accept:a}));}}),F=[n?b$1:null,y?j:null].filter(Boolean).join(" ")||void 0,M=t||n?jsxs("div",{className:w,children:[t?jsx("div",{id:l,className:D,children:t}):null,n?jsx("div",{id:b$1,className:U,children:n}):null]}):null,Q=f==="dropzone"?jsx(a$3,{acceptedFileTypes:a?[a]:void 0,allowsMultiple:i,onSelect:C,children:jsx(a$4,{isDisabled:e,children:jsx("div",{ref:x,...c(e?{}:G,K),role:"button",tabIndex:e?-1:0,"aria-labelledby":t?l:void 0,"aria-describedby":F,"aria-disabled":e||void 0,"data-testid":"file-uploader-dropzone",className:P({isInline:H,isDropTarget:J,isDisabled:e,isError:!!y}),children:jsxs("div",{className:B({isDisabled:e}),children:[jsx(UploadIcon,{width:20,height:20,className:E({isDisabled:e})}),jsx("span",{children:q})]})})})}):jsx(a$3,{acceptedFileTypes:a?[a]:void 0,allowsMultiple:i,onSelect:C,children:jsx(b,{variant:"primary",iconStart:UploadIcon,label:$,id:v,"aria-labelledby":t?`${l} ${v}`:void 0,isDisabled:e,"aria-describedby":F})}),W=y?jsx(a$5,{id:j,elementType:"span",role:"alert",className:L,children:y}):null;return jsxs("div",{ref:Z,className:a$6(R,"BaselineUI-FileUploader",O),style:S,"data-variant":f,"data-testid":"file-uploader",children:[M,Q,W]})});A.displayName="FileUploader";export{A as a};
@@ -1,10 +0,0 @@
1
- import {a as a$k}from'./chunk-SBR5UAUY.mjs';import {a as a$m}from'./chunk-NLVJYKSA.mjs';import {c as c$2}from'./chunk-54ZKQAA3.mjs';import {c as c$4}from'./chunk-HTRO6BM5.mjs';import {I,j,f,e,p,F,A,H,i,B,s,C,G,z,h,g,m,q,D,E,t,l,v,y,u,a as a$n,w,d,c as c$6,x,k,b as b$8,o,n,r}from'./chunk-LY2ZVEGJ.mjs';import {a as a$7,b as b$7,c as c$5,d as d$1}from'./chunk-FCKJCFMD.mjs';import {a as a$p}from'./chunk-IN7BLI4M.mjs';import {a as a$i}from'./chunk-YAI33K42.mjs';import {a as a$c}from'./chunk-4QGZDJW4.mjs';import {a as a$d}from'./chunk-NT2MFIKD.mjs';import {b as b$5,e as e$1}from'./chunk-VPVF5N62.mjs';import {a as a$e}from'./chunk-JZXLV6JU.mjs';import {b as b$2,c as c$3}from'./chunk-IDIZSV2Y.mjs';import {b as b$4}from'./chunk-INFMXVHD.mjs';import {a as a$h}from'./chunk-DIL5HL6K.mjs';import {a as a$l}from'./chunk-OPIPJTLG.mjs';import {a as a$g}from'./chunk-5W6G3ZUT.mjs';import {a as a$a}from'./chunk-BA5OA5DY.mjs';import {a as a$o}from'./chunk-4EAXDHSV.mjs';import {a as a$j}from'./chunk-KX7WG3L4.mjs';import {b as b$3}from'./chunk-N2XGJKZG.mjs';import {b}from'./chunk-K5RYVERS.mjs';import {b as b$6,j as j$1}from'./chunk-MBRNO6IW.mjs';import {a as a$9}from'./chunk-22MA6EYO.mjs';import {a as a$f}from'./chunk-VDUFLHKK.mjs';import {a as a$8}from'./chunk-22VRCVTH.mjs';import {a as a$6}from'./chunk-66CUIXA6.mjs';import {a as a$b}from'./chunk-FPM5UJRF.mjs';import {a as a$5}from'./chunk-HPUUQKKH.mjs';import {a as a$1}from'./chunk-SGZWUG3H.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {a}from'./chunk-B3EZOXNU.mjs';import {b as b$1,c as c$1}from'./chunk-3WKDIXCM.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {j as j$2}from'./chunk-SD43KVTU.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import io,{useCallback,useMemo,useEffect}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {TextIcon,PlusIcon,MinusIcon}from'@baseline-ui/icons/20';import {sprinkles}from'@baseline-ui/tokens';/**
2
- * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
- *
4
- * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
5
- * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
6
- * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
7
- * This notice may not be removed from this file.
8
- *
9
- */
10
- var no=io.forwardRef(({color:o,colorLabel:e,colorName:l,isIndeterminate:r,indeterminateIcon:t,noneLabel:s,...a$5},n)=>{let i=io.useRef(null),{hoverProps:c$2,isHovered:m}=a({isDisabled:a$5.isDisabled}),{buttonProps:d,isPressed:g}=a$1(a$5,i),{isFocusVisible:f$1,focusProps:b$2}=a$2(),v=a$3({"data-block-id":a$5["data-block-id"],"data-focused":f$1,"data-focus-visible":f$1,"data-disabled":a$5.isDisabled,"data-hovered":m,"data-pressed":g}),P=c(),R=c();return jsxs("button",{...c$1(d,c$2,b$2,v),style:a$5.style,className:a$4(f({isHovered:m,isFocusVisible:f$1||a$5.isOpen,isDisabled:a$5.isDisabled,labelPosition:a$5.labelPosition}),"BaselineUI-ColorInputButton",a$5.className),ref:b$1(n,i),id:P,"aria-labelledby":a$5["aria-labelledby"]||`${P} ${R}`,children:[jsx(I,{color:o?.toString("hexa"),isIndeterminate:r,indeterminateIcon:t,noneLabel:s}),e?jsx("div",{className:j,id:R,"aria-hidden":"true",children:l}):typeof l=="string"&&jsx(b,{children:l})]})});no.displayName="ColorInputButton";var So=io.forwardRef(({className:o,style:e$1,icon:l,elementType:r="button",...t},s)=>{let a$6=io.useRef(null),{hoverProps:n,isHovered:i}=a({isDisabled:t.isDisabled}),{buttonProps:c,isPressed:m}=a$1({...t,elementType:r},a$6),{isFocusVisible:d,focusProps:g}=a$2(),f=a$3({"data-block-id":t["data-block-id"],"data-focused":d,"data-focus-visible":d,"data-disabled":t.isDisabled,"data-hovered":i,"data-pressed":m});return jsxs(r,{...c$1(a$5(r,t.isDisabled),c,n,g,f),ref:b$1(s,a$6),style:e$1,className:a$4(p({isHovered:i||m||t.isOpen,isFocusVisible:d,isDisabled:t.isDisabled}),"BaselineUI-IconColorInputButton","BaselineUI-IconColorInput-Button",o),children:[jsx(l,{size:16}),jsx("div",{className:e,style:{backgroundColor:t.color||void 0}})]})});So.displayName="IconColorInputButton";var qo=io.forwardRef(({setColor:o,color:e,triggerRef:l,autoFocus:r,presets:t,state:s$1,isIndeterminate:a,colorPresetsLabel:n},i$1)=>{let{formatMessage:c}=b$2(),m=useCallback(d=>{if(d instanceof Set&&d.size){let g=[...d][0],f=t.find(b=>b.id===g);a$6(f,"Preset not found"),o(f.id===F?null:a$7(f.id).toFormat(A)),s$1.close();}},[s$1,t,o]);return jsx("div",{className:a$4(s,"BaselineUI-ColorInput-Presets"),style:{minWidth:l.current?.offsetWidth},ref:i$1,children:jsx(c$2,{autoFocus:r,items:t,layout:"grid","aria-label":n??c(dt.colorPresets),className:i,renderOption:H,selectionMode:"single",selectedKeys:a?[]:[e?.toString(B)||F],onSelectionChange:m,shouldSelectOnPressUp:true,escapeKeyBehavior:"none"})})});qo.displayName="ColorPresetList";var dt=c$3({colorPresets:{defaultMessage:"Color Presets",id:"bui.colorInput.colorPresets"}});var Ye=({value:o,...e})=>{let l=io.useRef(null),r=io.useRef(null),t=io.useRef(null),s=b$7({...e,value:o}),{colorAreaProps:a,xInputProps:n,yInputProps:i,thumbProps:c}=a$n({...e,value:o,inputXRef:l,inputYRef:r,containerRef:t},s);useEffect(()=>{l.current?.focus();},[]);let{focusProps:m,isFocusVisible:d$1}=a$2();return jsx("div",{ref:t,...a,className:a$4(d,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...c,className:a$4(w({isFocusVisible:d$1}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...c.style,transform:"translate(-50%, -50%)",backgroundColor:C(o)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:l,...n,...m}),jsx("input",{ref:r,...i,...m})]})})};var qe=({color:o$1,setColor:e,allowAlpha:l,...r})=>{let t=d$1({value:o$1,onChange:d=>{e(C(d)?.toFormat(A).withChannelValue("alpha",o$1.getChannelValue("alpha")??1)||z);}}),s=io.useRef(null),{inputProps:a$1}=b$8({...r,"aria-label":"Hex"},t,s),{focusProps:n$1,isFocused:i}=a$2({isTextInput:true}),{hoverProps:c,isHovered:m}=a({});return jsxs("div",{className:a$4(n,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":l?"hexa":"hex",children:[jsx("input",{...c$1(a$1,n$1,c),ref:s,className:o({isFocused:i,isHovered:m,allowAlpha:l})}),l?jsx(Je,{color:o$1,setColor:e}):null]})},Ge=({color:o,setColor:e,allowAlpha:l})=>{let r$1=o.toFormat("rgba"),{locale:t}=b$3();return jsxs("div",{className:a$4(n,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":l?"rgba":"rgb",children:[jsx(a$p,{"aria-label":o.getChannelName("red",t),value:r$1.getChannelValue("red"),showStepper:false,className:r,onChange:s=>{e(r$1.withChannelValue("red",s).toFormat(A));},step:1,minValue:0,maxValue:255}),jsx(a$p,{"aria-label":o.getChannelName("green",t),value:r$1.getChannelValue("green"),showStepper:false,className:r,onChange:s=>{e(r$1.withChannelValue("green",s).toFormat(A));},step:1,minValue:0,maxValue:255}),jsx(a$p,{"aria-label":o.getChannelName("blue",t),value:r$1.getChannelValue("blue"),showStepper:false,className:r,onChange:s=>{e(r$1.withChannelValue("blue",s).toFormat(A));},step:1,minValue:0,maxValue:255}),l?jsx(Je,{color:o,setColor:e}):null]})},It={style:"percent",maximumFractionDigits:0},Je=({color:o,setColor:e})=>{let{locale:l}=b$3(),r$1=useCallback(t=>{e(o.withChannelValue("alpha",t));},[o,e]);return jsx(a$p,{"aria-label":o.getChannelName("alpha",l),value:o.getChannelValue("alpha"),formatOptions:It,className:r,showStepper:false,onChange:r$1,minValue:0,maxValue:1})};var Qo=({channel:o,...e})=>{let{locale:l}=b$3(),r=c$5({...e,channel:o,locale:l}),t=io.useRef(null),s=io.useRef(null),{trackProps:a,thumbProps:n,inputProps:i}=c$6({...e,channel:o,trackRef:t,inputRef:s,"aria-label":r.value.getChannelName(o,l)},r),{focusProps:c,isFocusVisible:m}=a$2();return jsxs("div",{className:a$4(k,{[a$o({size:"xs"})]:o==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":o,...a,ref:t,children:[o==="alpha"&&jsx("div",{className:x}),jsx("div",{className:k,style:a.style}),jsxs("div",{className:a$4(w({isFocusVisible:m}),"BaselineUI-ColorInput-ColorSliderThumb"),...n,children:[jsx("div",{className:x,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:k}),jsx(b,{children:jsx("input",{ref:s,...i,...c})})]})]})};var Fo=({color:o,setColor:e,allowAlpha:l,colorFormatLabel:r,onChangeEnd:t})=>{let[s,a]=io.useState("hex"),{formatMessage:n}=b$2();return jsxs(Fragment,{children:[jsx(Ye,{value:o,xChannel:"saturation",yChannel:"lightness",onChange:e,onChangeEnd:t}),jsxs("div",{className:v,children:[jsx(Qo,{channel:"hue",value:o,onChange:e,onChangeEnd:t}),l?jsx(Qo,{channel:"alpha",value:o,onChange:e,onChangeEnd:t}):null]}),jsxs("div",{className:a$4(v,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(c$4,{label:r??n(vt.colorFormat),labelPosition:"start",variant:"ghost",items:y,selectedKey:s,onSelectionChange:i=>{a(i);}}),s==="hex"&&jsx(qe,{color:o,setColor:i=>{e(i),t?.(i);},allowAlpha:l}),s==="rgb"&&jsx(Ge,{color:o,setColor:i=>{e(i),t?.(i);},allowAlpha:l})]})]})},vt=c$3({colorFormat:{defaultMessage:"Color Format",id:"bui.colorInput.colorFormat"}});var ot=({color:o,setColor:e,storePickedColorKey:l$1,addColorButtonLabel:r,removeColorButtonLabel:t$1,customColorsLabel:s$1,addLabel:a,cancelLabel:n,newColorLabel:i$1,colorFormatLabel:c$1,pickerMode:m$1,allowAlpha:d,isIndeterminate:g,state:f})=>{let{locale:b}=b$3(),{formatMessage:v}=b$2(),P=io.useRef(null),R=a$j(P.current),[A$1,M]=a$k(l$1,[]),I=io.useMemo(()=>Array.isArray(A$1)?A$1.filter(p=>St(p)):[],[A$1]),H$1=io.useRef(null),[$,Ao]=io.useState(o),Mo=io.useMemo(()=>I.map(p=>({id:p,label:a$7(p).getColorName(b),description:p})),[I,b]),Q=useCallback(()=>{let p=m$1==="active"?o:$;if(I.includes(p.toString(B))){H$1.current?.querySelector(`[data-key='${p.toString(B)}']`)?.classList.add(t);return}M([...I,p.toString(B)]);},[I,o,M,$,m$1]);useEffect(()=>{let p=H$1.current;function y(co){co.animationName===u&&j$2(co)?.classList.remove(t);}return p?.addEventListener("animationend",y),()=>{p?.removeEventListener("animationend",y);}},[]);let O=c(),Z=jsx(a$l,{ref:P,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon,onPress:m$1==="active"?Q:void 0}),uo=useCallback(p=>jsxs(a$d,{size:"content",className:m({includesCustomColorPicker:true}),style:{paddingBlockEnd:0},"aria-label":i$1??v(oe.newColor),children:[jsx(Fo,{color:$,setColor:Ao,allowAlpha:d,colorFormatLabel:c$1}),jsx(a$e,{}),jsx(a$h,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(a$h,{display:"inline-flex",gap:"lg",children:[jsx(b$4,{label:n??v(oe.cancel),size:"sm",variant:"secondary",onPress:p}),jsx(b$4,{label:a??v(oe.add),variant:"primary",onPress:()=>{Q(),p();},size:"sm"})]})})]}),[$,Q,v,d,i$1,c$1,n,a]),Oo=useCallback(p=>{a$6(p instanceof Set,"Key must be a set");let y=[...p][0];y&&(e(a$7(y).toFormat(A)),m$1==="lazy"&&f.close());},[e,m$1,f]);return jsxs(Fragment,{children:[jsx(a$e,{}),jsxs("div",{className:a$4(l,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:O,children:s$1}),jsxs(a$h,{display:"flex",children:[!!I.length&&I.includes(o.toString(B))&&jsx(a$l,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon,"aria-label":t$1,onPress:()=>{M(I.filter(p=>p!==o.toString(B)));}}),m$1==="active"&&Z,m$1==="lazy"&&(R==="mobile"?jsxs(b$5,{children:[jsx(a$m,{children:Z}),jsx(e$1,{style:{zIndex:1e5},children:({close:p})=>uo(p)})]}):jsxs(b$6,{type:"dialog",children:[jsx(j$1,{children:Z}),jsx(a$c,{placement:"right top",className:q,offset:6,children:({close:p})=>uo(p)})]}))]})]}),!!I.length&&jsx(c$2,{items:Mo,layout:"grid","aria-labelledby":O,className:a$4(i,s,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:H,ref:H$1,autoFocus:false,selectionMode:"single",selectedKeys:g?[]:[o.toString(B)],onSelectionChange:Oo,shouldSelectOnPressUp:true})]})},oe=c$3({newColor:{defaultMessage:"New Custom Color",id:"bui.colorInput.newColor"},cancel:{defaultMessage:"Cancel",id:"bui.colorInput.cancel"},add:{defaultMessage:"Add",id:"bui.colorInput.add"}});function St(o){if(typeof o!="string")return false;try{return a$7(o),!0}catch{return false}}function tt({colorLabel:o,color:e,presets:l,isIndeterminate:r,indeterminateLabel:t,transparentLabel:s}){let{formatMessage:a}=b$2(),{locale:n}=b$3(),i=useMemo(()=>r?{id:"indeterminate",label:t??a(et.indeterminate)}:l.find(d=>d.id===F?!e:e?D(e,a$7(d.id)):false),[l,e,r,a,t]),c=useMemo(()=>{if(typeof o=="function")return o?.(e,{isIndeterminate:!!r});if(typeof o=="boolean")return o?E(e,i,s??a(et.transparent)):false;throw new TypeError("`colorLabel` must be a function or a boolean")},[e,o,a,i,r,s]),m=useMemo(()=>{if(i?.label)return i.label;e?.getColorName(n);},[e,n,i?.label]);return {colorName:c,humanReadableName:m}}var et=c$3({transparent:{defaultMessage:"Transparent",id:"bui.colorInput.transparent"},indeterminate:{defaultMessage:"Indeterminate",id:"bui.colorInput.indeterminate"}});var To=io.forwardRef(({className:o,style:e,allowRemoval:l,allowAlpha:r=true,presets:t,labelPosition:s="top",colorLabel:a=true,includePicker:n=true,onChange:i,onChangeEnd:c$2,defaultValue:m$1,storePickedColorKey:d="baselinePickedColor",value:g$1,addColorButtonLabel:f,removeColorButtonLabel:b,customColorsLabel:v,addLabel:P,cancelLabel:R,newColorLabel:A,colorFormatLabel:M,colorPresetsLabel:I,noColorLabel:H,indeterminateLabel:$,transparentLabel:Ao,onTriggerPress:Mo,renderTriggerButton:Q=({isOpen:Y,color:wo,ref:k,colorName:Do,triggerProps:Ho,labelId:ko,isIndeterminate:E,indeterminateIcon:j,noneLabel:V})=>jsx(no,{...c$1(Ho,{...B.label?{"aria-labelledby":ko}:{"aria-label":B["aria-label"]}}),ref:k,isOpen:Y,isDisabled:B.isDisabled,labelPosition:s,color:wo,colorLabel:a,colorName:Do,isIndeterminate:E,indeterminateIcon:j,noneLabel:V}),pickerMode:O="active",offset:Z=2,placement:uo=s==="start"?"bottom end":"bottom start","data-block-id":Oo,"data-block-class":p,isIndeterminate:y,indeterminateIcon:co,...B},st)=>{let Y=io.useRef(null),wo=io.useRef(null),k=a$8(B),{triggerProps:Do,overlayProps:Ho}=a$9({type:"listbox"},k,Y),ko=a$a(B.portalContainer),[E,j]=a$b(g$1===void 0?void 0:C(g$1),C(m$1),h=>i?.(h?.toFormat("rgba")||null)),{formatMessage:V}=b$2(),Eo=useMemo(()=>G(H??V(xo.noColor),t),[t,V,H]),Vo=c(),{colorName:nt}=tt({colorLabel:a,color:E,presets:Eo,isIndeterminate:y,indeterminateLabel:$,transparentLabel:Ao}),le=useMemo(()=>Eo.filter(h=>l||h.id!==F),[Eo,l]),it=f||V(xo.addColor),mt=b||V(xo.removeColor),pt=v||V(xo.customColors),ae=jsx(ot,{color:E||z,setColor:h=>{j(h),c$2?.(h?.toFormat("rgba")||null);},storePickedColorKey:d,addColorButtonLabel:it,removeColorButtonLabel:mt,customColorsLabel:pt,addLabel:P,cancelLabel:R,newColorLabel:A,colorFormatLabel:M,pickerMode:O,allowAlpha:r,isIndeterminate:!!y,state:k});return jsxs(Fragment,{children:[jsxs("div",{className:a$4({[g]:s==="start"},"BaselineUI-ColorInput-Trigger",o),"data-block-id":Oo,"data-block-class":p,style:e,ref:st,children:[B.label?jsx("label",{id:Vo,className:h({labelPosition:s}),children:B.label}):null,Q({isOpen:k.isOpen,color:E,ref:Y,colorName:nt,triggerProps:c$1(Do,{onPress:Mo}),labelId:Vo,isIndeterminate:y,indeterminateIcon:co,noneLabel:H})]}),jsx(a$c,{...B,portalContainer:ko,placement:uo,state:k,offset:Z,className:a$4(q,"BaselineUI-ColorInput-Popover"),triggerRef:Y,overlayProps:Ho,children:jsxs(a$d,{size:"content",className:m({includesCustomColorPicker:n}),ref:wo,"aria-labelledby":B.label?Vo:void 0,"aria-label":B["aria-label"],children:[n&&O==="active"?jsxs(Fragment,{children:[jsx(Fo,{color:E||z,setColor:j,allowAlpha:r,colorFormatLabel:M,onChangeEnd:h=>{c$2?.(h?.toFormat("rgba")||null);}}),ae]}):null,!!le.length&&jsxs(Fragment,{children:[n&&O==="active"?jsx(a$e,{}):null,jsx(qo,{autoFocus:n&&O==="active"?false:"first",state:k,triggerRef:Y,presets:le,colorPresetsLabel:I,color:E,setColor:h=>{j(h),c$2?.(h?.toFormat("rgba")||null);},isIndeterminate:!!y})]}),n&&O==="lazy"?ae:null]})})]})});To.displayName="ColorInput";var xo=c$3({addColor:{defaultMessage:"Add Color",id:"bui.colorInput.addColor"},removeColor:{defaultMessage:"Remove Color",id:"bui.colorInput.removeColor"},customColors:{defaultMessage:"Custom Colors",id:"bui.colorInput.customColors"},noColor:{defaultMessage:"None",id:"bui.colorInput.noColor"}});var at=io.forwardRef(({className:o,style:e,icon:l,variant:r="standard","data-block-id":t,tooltip:s=true,iconTooltip:a=true,...n},i)=>{let c=io.useRef(null),{tooltipProps:m}=a$f({label:n["aria-label"],tooltip:s}),d=useCallback(({isOpen:g,color:f,ref:b,colorName:v,triggerProps:P,isIndeterminate:R,indeterminateIcon:A,noneLabel:M})=>jsx(a$g,{...m,children:r==="standard"?jsx(no,{...P,"aria-label":n["aria-label"],ref:b,isOpen:g,isDisabled:n.isDisabled,color:f,colorLabel:false,colorName:v,isIndeterminate:R,indeterminateIcon:A,noneLabel:M}):jsx(So,{...P,isOpen:g,icon:TextIcon,color:f?.toString("hexa"),ref:b,isDisabled:n.isDisabled,"aria-label":n["aria-label"],isIndeterminate:R,indeterminateIcon:A})}),[n,m,r]);return jsxs(a$h,{display:"flex",flexDirection:"row",gap:"md",paddingX:r==="standard"?"md":"none",alignItems:"center",className:a$4("BaselineUI-IconColorInput",o),"data-block-id":t,style:e,ref:b$1(i,c),children:[r==="standard"&&l?jsx(a$i,{icon:l,label:n["aria-label"],tooltip:a,"aria-hidden":"true",size:24,isFocusable:false,className:sprinkles({color:"icon.primary"})}):null,jsx(To,{...n,colorLabel:false,renderTriggerButton:d})]})});at.displayName="IconColorInput";export{So as a,To as b,at as c};